@dcl/builder-site 7.6.0 → 7.6.1-15118997411.commit-d0685c7

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.
Files changed (83) hide show
  1. package/assets/{Back-DVDrV4XS.js → Back-BY-tj0mY.js} +1 -1
  2. package/assets/{CollectionProvider.container-Cen6wteT.js → CollectionProvider.container-DWsnvf6f.js} +1 -1
  3. package/assets/{CollectionStatus.container-IfxJ2FXJ.js → CollectionStatus.container-DttnapNH.js} +1 -1
  4. package/assets/{ConfirmDelete-DRi0COjr.js → ConfirmDelete-DQ4u3hXh.js} +1 -1
  5. package/assets/{FileSaver.min-BVvZzDC7.js → FileSaver.min-u5aI8Cn5.js} +1 -1
  6. package/assets/{ItemProvider.container-D5psKqp5.js → ItemProvider.container-Bf_RIv-R.js} +1 -1
  7. package/assets/{JumpIn.container-CHK-Z_Zl.js → JumpIn.container-gjuKK_p6.js} +1 -1
  8. package/assets/{LandAction-BpzpS-68.js → LandAction-BP4U4XrS.js} +1 -1
  9. package/assets/{LandProviderPage-CnKtwxuP.js → LandProviderPage-CYTBuWwn.js} +1 -1
  10. package/assets/{LoggedInDetailPage.container-CDSy4rw9.js → LoggedInDetailPage.container-BBbHDFzm.js} +1 -1
  11. package/assets/{Navigation-CZobJzn5.css → Navigation-DeX5Zr6s.css} +1 -1
  12. package/assets/{Navigation.container-D4bOX-AY.js → Navigation.container-Dviau9XL.js} +1 -1
  13. package/assets/{NotFound-BFf6zsjs.js → NotFound-Dq-4bANw.js} +1 -1
  14. package/assets/{OptionsDropdown-CBs9QAWV.js → OptionsDropdown-Bbi_h5LY.js} +1 -1
  15. package/assets/{RentalPeriod-B1VH40kP.js → RentalPeriod-Ca_RShVP.js} +1 -1
  16. package/assets/{SDKTag-xtuqGgmi.js → SDKTag-CwXrVTcJ.js} +1 -1
  17. package/assets/{SceneStats.container-CWVBefWA.js → SceneStats.container--sgxgGZX.js} +1 -1
  18. package/assets/{SignInRequired-DaqmN1AU.js → SignInRequired-KH0-S7eT.js} +1 -1
  19. package/assets/{ThirdPartyKindBadge-P-G-49ta.js → ThirdPartyKindBadge-fESJQlqA.js} +1 -1
  20. package/assets/{dataReader-DfqMoFvb.js → dataReader-D0DBKLsQ.js} +1 -1
  21. package/assets/{date-Bn2WlT-o.js → date-cTX0Inuv.js} +1 -1
  22. package/assets/{fortmatic-Cn2VTUyU.js → fortmatic-CEjNQhz5.js} +1 -1
  23. package/assets/{index-Ch-IVCGq.js → index-B0Q2gFep.js} +1 -1
  24. package/assets/{index-B6zCeUAv.js → index-BAxqf_Jg.js} +1 -1
  25. package/assets/{index-D3gQlTQW.css → index-BGYXI0jo.css} +7 -7
  26. package/assets/{index-D-2Wi5Z3.js → index-BHpVo-et.js} +1 -1
  27. package/assets/{index-PQI7Lnlg.js → index-BQMCdPST.js} +1 -1
  28. package/assets/{index-rpOZlV0B.js → index-BS2IMZXA.js} +1 -1
  29. package/assets/index-BS69Urz2.css +1 -0
  30. package/assets/{index-jU2hzkZA.js → index-Bg9e_EkI.js} +1 -1
  31. package/assets/index-BhXOqZJF.js +1 -0
  32. package/assets/{index-BqR14NG8.js → index-Bjieps_q.js} +1 -1
  33. package/assets/{index-B5JODbxO.js → index-Bo4vEw7Q.js} +1 -1
  34. package/assets/{index-DBkzP8CH.js → index-BpRB6Ndo.js} +1 -1
  35. package/assets/{index-CW1OdcU6.js → index-Bq5tYJQD.js} +1 -1
  36. package/assets/{index-BzEAPTQZ.css → index-BrVvC2rE.css} +1 -1
  37. package/assets/{index-DCzfVOZ6.js → index-BwpF4nv-.js} +1 -1
  38. package/assets/{index-X-h2qlu8.js → index-C4s33brx.js} +1 -1
  39. package/assets/index-C7IbvTYi.js +2 -0
  40. package/assets/{index-De3YKuL2.js → index-C7hn2t06.js} +1 -1
  41. package/assets/{index-BL_Hkw_R.js → index-CFz3YCmh.js} +1 -1
  42. package/assets/{index-BDp1J98i.js → index-CJr4W1Hk.js} +1 -1
  43. package/assets/{index-Di5fQIKj.js → index-CZdAVogC.js} +1 -1
  44. package/assets/{index-RCOBszic.js → index-Ci11OyMC.js} +1 -1
  45. package/assets/{index-CTRzUgxC.js → index-Cj_omZsN.js} +1 -1
  46. package/assets/{index-BV0Wmuj9.js → index-CmLk53nW.js} +1 -1
  47. package/assets/{index-77GGAofq.js → index-CoGgJMB4.js} +1 -1
  48. package/assets/{index-8hssZWsO.js → index-CrBBS28R.js} +1 -1
  49. package/assets/index-CwlCv3Ub.css +1 -0
  50. package/assets/{index-CwIUi20L.js → index-D-EYli9_.js} +1 -1
  51. package/assets/{index-CNAT8a6X.js → index-D34XsGW9.js} +1 -1
  52. package/assets/{index-HmaWOM5z.js → index-D7Wfd3NN.js} +1 -1
  53. package/assets/{index-CXaPtJgk.js → index-DHHjXc1v.js} +1 -1
  54. package/assets/{index-CkFGdPyY.js → index-DNA-0iyA.js} +1 -1
  55. package/assets/index-DSqQNXUs.css +1 -0
  56. package/assets/{index-nSeb2kLU.js → index-DTzHduGV.js} +240 -207
  57. package/assets/{index-BPHr7acD.css → index-Dr_oHYlJ.css} +1 -1
  58. package/assets/{index-DVVND4Lw.js → index-Dt9K7rJd.js} +1 -1
  59. package/assets/index-DvBI8uHA.js +1 -0
  60. package/assets/{index-CiOLXphq.js → index-DvjQkKON.js} +1 -1
  61. package/assets/{index-BV-yrbFj.js → index-DxHrwQXY.js} +1 -1
  62. package/assets/{index-obRQePTE.js → index-P4inI_Ba.js} +1 -1
  63. package/assets/{index-B7uYpu-V.js → index-Pl0wpddI.js} +1 -1
  64. package/assets/{index-CF3Lslie.js → index-SOV2_U1w.js} +1 -1
  65. package/assets/{index-DoC8BigK.js → index-X_GT3vbn.js} +1 -1
  66. package/assets/{index-C97e_oh9.js → index-_MBfMDRr.js} +1 -1
  67. package/assets/index-cuMh0kH0.js +1 -0
  68. package/assets/{index-D426xjd7.js → index-jJf5l6SW.js} +1 -1
  69. package/assets/index-nXSnTl50.css +1 -0
  70. package/assets/{index-BRXAPjGd.js → index-oXyeLpbs.js} +1 -1
  71. package/assets/{index-7W2dmX5K.js → index-pHLjfNPV.js} +1 -1
  72. package/assets/{index.es-y7JmZs9C.js → index.es-BGE3qCgM.js} +4 -4
  73. package/assets/{selectors-CRfPBNkn.js → selectors-B5a-ETQ1.js} +1 -1
  74. package/index.html +3 -3
  75. package/package.json +3 -3
  76. package/assets/index-BXnLNx0C.css +0 -1
  77. package/assets/index-BfJxH1qW.css +0 -1
  78. package/assets/index-CPs0EnPc.js +0 -1
  79. package/assets/index-D4pC8HQ_.css +0 -1
  80. package/assets/index-DAVEXbZi.js +0 -1
  81. package/assets/index-DMaklfqw.css +0 -1
  82. package/assets/index-DO565How.js +0 -1
  83. package/assets/index-RN1U8tL7.js +0 -2
@@ -1 +1 @@
1
- var rt=Object.defineProperty;var dt=(n,l,e)=>l in n?rt(n,l,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[l]=e;var h=(n,l,e)=>dt(n,typeof l!="symbol"?l+"":l,e);import{af as J,H as t,M as c,G as d,bm as H,bC as ct,D as x,gs as K,L as ee,K as R,ce as Me,b8 as _,N as B,bw as V,eC as ht,gt as mt,gu as gt,gv as pt,gw as ut,gx as Ct,gy as It,gz as bt,gA as xt,gB as _t,gC as L,eq as vt,gD as Z,gE as Et,gF as Q,fb as Le,fq as jt,fW as St,fX as ft,ez as he,gl as wt,aH as te,gG as Tt,da as be,gH as xe,bt as Oe,gI as yt,fY as Pt,eD as me,aW as At,gJ as Nt,gK as Rt,gL as Dt,fn as Mt,f_ as Lt,f$ as Ot,Z as ke,bv as Be,gM as kt,eR as fe,bD as Bt,fj as We,ae as Wt,gN as Fe,eG as _e,X as He,et as Ft,eo as Ve,fE as X,dC as ge,ep as Ht,eU as pe,gO as $e,bk as ve,fU as Ue,eX as y,er as Y,fz as ze,fA as ue,J as O,f5 as Ce,dB as Vt,eP as $t,eA as Ut,gP as Ee,fa as je,fi as zt,gQ as Yt,gR as Jt,gS as qt,gT as Ye,gU as Je,gV as qe,gW as Ge,fI as Ze,eJ as Gt,eI as Ke,eK as Zt,eM as Kt,eN as Qt,gX as Xt,gY as es,gZ as ts,g_ as se,g$ as oe,h0 as ss,ec as as,h1 as ns,h2 as is,h3 as ls,h4 as os,h5 as rs,h6 as ds,h7 as cs,h8 as hs,h9 as ms,ha as gs,hb as ps,hc as us,hd as Cs,he as Is,hf as bs,hg as xs,hh as _s,hi as vs,fZ as Es,bN as ne,hj as js,hk as we,hl as Ss,hm as fs,eT as Te,fF as re,hn as de,eS as ws,eO as ye,eV as Ts,eW as Pe,eY as Ae,eZ as Ne,ho as ys,hp as Ps,e_ as As,e$ as Re,f0 as De,hq as Ns,f8 as Rs,hr as Ds,hs as Ms,ht as Ls,hu as Qe,hv as Os,hw as ks,hx as Bs,fc as Ws,hy as Fs,hz as Hs,eF as Vs,hA as $s,fd as Us,ff as zs,hB as Ys}from"./index-nSeb2kLU.js";import{J as Js}from"./JumpIn.container-CHK-Z_Zl.js";import{C as qs}from"./CollectionProvider.container-Cen6wteT.js";import{C as Xe}from"./ConfirmDelete-DRi0COjr.js";import{C as et}from"./CollectionStatus.container-IfxJ2FXJ.js";import{d as Gs,e as Zs,c as Ks}from"./selectors-CRfPBNkn.js";import{I as Qs}from"./ItemProvider.container-D5psKqp5.js";const Xs=({open:n,assignee:l,onConfirm:e,onClose:s})=>t.jsxs(c.Modal,{size:"tiny",className:"ConfirmApprovalModal",open:n,children:[t.jsx(c.Modal.Header,{children:d("curation_page.confirm_not_assigned_curation_modal.title")}),t.jsxs(c.Modal.Content,{children:[t.jsx("div",{className:"message-container",children:t.jsx(H,{id:"curation_page.confirm_not_assigned_curation_modal.body",values:{assignee:t.jsx("strong",{children:t.jsx(ct,{textOnly:!0,address:l})})}})}),t.jsx("span",{children:t.jsx(H,{id:"curation_page.confirm_not_assigned_curation_modal.confirm_footer"})})]}),t.jsxs(c.Modal.Actions,{children:[t.jsx(c.Button,{onClick:s,children:d("global.cancel")}),t.jsx(c.Button,{primary:!0,onClick:e,children:d("curation_page.confirm_not_assigned_curation_modal.confirm_button")})]})]}),ea=J.memo(Xs);var T=(n=>(n.REJECT_COLLECTION="REJECT_COLLECTION",n.REJECT_CURATION="REJECT_CURATION",n.DISABLE_COLLECTION="DISABLE_COLLECTION",n.DISABLE_THIRD_PARTY="DISABLE_THIRD_PARTY",n))(T||{});const k="item_editor.top_panel.rejection_modal",ta=({open:n,type:l,isLoading:e,thirdParty:s,hasPendingTransaction:a,onDisableThirdParty:i,collection:o,curation:r,onReject:m,onRejectCuration:g,onClose:p})=>{const I=x.useMemo(()=>{switch(l){case T.DISABLE_COLLECTION:return k+".disable_collection";case T.REJECT_CURATION:return k+".reject_curation";case T.DISABLE_THIRD_PARTY:return k+".disable_third_party";default:return""}},[l]),S=()=>{switch(l){case T.DISABLE_COLLECTION:m(o);break;case T.REJECT_CURATION:g(r.collectionId);break;case T.DISABLE_THIRD_PARTY:s&&i(s.id);break}},E=l===T.DISABLE_COLLECTION&&!o.isApproved||l===T.DISABLE_THIRD_PARTY&&!(s!=null&&s.isApproved)||l===T.REJECT_COLLECTION&&!o.isApproved||l===T.REJECT_CURATION&&(r==null?void 0:r.status)===K.REJECTED;return t.jsx(c.Modal,{size:"tiny",className:"RejectionModal",open:n,children:a?t.jsx(sa,{i18nKey:I}):E?t.jsx(aa,{link:o.forumLink,onClose:p}):t.jsx(na,{i18nKey:I,isLoading:e,onClose:p,onConfirm:S})})},sa=({i18nKey:n})=>t.jsxs(t.Fragment,{children:[t.jsx(c.Modal.Header,{children:d(`${n}.title`)}),t.jsxs("div",{className:"loading-transaction",children:[t.jsx("div",{className:"danger-text",children:d(`${n}.tx_pending`)}),t.jsx("small",{className:"danger-text",children:t.jsx(H,{id:k+".visit_activity",values:{activity_link:t.jsx(ee,{to:R.activity(),children:d("global.activity")})}})}),t.jsx(c.Loader,{active:!0,size:"large"})]})]}),aa=({link:n,onClose:l})=>t.jsxs(t.Fragment,{children:[t.jsx(c.Modal.Header,{children:d(k+".veredict_explanation")}),t.jsx(c.Modal.Content,{children:d(k+".go_to_forum")}),t.jsxs(c.Modal.Actions,{children:[t.jsx("a",{href:n,className:"forum-link",target:"_blank",rel:"noopener noreferrer",children:t.jsxs(c.Button,{secondary:!0,icon:!0,labelPosition:"right",children:[t.jsx("div",{children:d(k+".forum_link")}),t.jsx("div",{className:"discussion",children:d(k+".discussion")}),t.jsx(c.Icon,{name:"chevron right"})]})}),t.jsx(c.Button,{basic:!0,onClick:l,children:d("global.done")})]})]}),na=({i18nKey:n,isLoading:l,onConfirm:e,onClose:s})=>t.jsxs(t.Fragment,{children:[t.jsx(c.Modal.Header,{children:d(`${n}.title`)}),t.jsx(c.Modal.Content,{children:d(`${n}.subtitle`)}),t.jsxs(c.Modal.Actions,{children:[t.jsx(Me,{primary:!0,onClick:e,disabled:l,loading:l,network:_.Network.MATIC,children:d(`${n}.action`)}),t.jsx(c.Button,{disabled:l,onClick:s,children:d("global.cancel")})]})]}),ia=J.memo(ta),la=(n,l)=>({isLoading:V(ht(n),xt)||V(mt(n),_t)||gt(n),hasPendingTransaction:pt(n)||!!(l.thirdParty&&ut(n,l.thirdParty.id))}),oa=n=>({onReject:l=>n(Ct(l)),onRejectCuration:l=>n(It(l)),onDisableThirdParty:l=>n(bt(l))}),ra=B(la,oa)(ia);var j=(n=>(n[n.APPROVE=0]="APPROVE",n[n.REJECT=1]="REJECT",n[n.ENABLE=2]="ENABLE",n[n.DISABLE=3]="DISABLE",n))(j||{});let da=class extends J.PureComponent{constructor(){super(...arguments);h(this,"state",{currentVeredict:void 0,showRejectionModal:null,showApproveConfirmModal:!1});h(this,"handleBack",()=>{this.props.onNavigate(R.curation())});h(this,"handleConfirmApprovalModal",(e,s)=>{const{address:a,onInitiateApprovalFlow:i,onInitiateTPApprovalFlow:o,onSetAssignee:r}=this.props;this.setState({showApproveConfirmModal:!1}),a&&r(e.id,a,s),L(e)?o(e):i(e)});h(this,"setShowRejectionModal",e=>this.setState({showRejectionModal:e}));h(this,"renderPage",e=>{const{items:s,itemCurations:a,curation:i,totalItems:o,thirdParty:r}=this.props,{showRejectionModal:m,showApproveConfirmModal:g}=this.state,{chainId:p}=this.props,I=vt(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," · ",d(`collection.type.${I}`),t.jsx(Js,{size:"small",active:!0,collection:e,chainId:p,items:L(e)?s:void 0,text:d("global.see_in_decentraland")})]}),t.jsx("div",{className:"actions",children:t.jsx("span",{className:"button-container",children:L(e)&&o!==void 0?this.renderTPButtons(e,i,a):this.renderButtons(e,i)})}),m&&t.jsx(ra,{type:m,open:!0,collection:e,curation:i,thirdParty:r,onClose:()=>this.setShowRejectionModal(null)}),(i==null?void 0:i.assignee)&&g&&t.jsx(ea,{open:!0,assignee:i.assignee,onConfirm:()=>this.handleConfirmApprovalModal(e,i),onClose:()=>this.setState({showApproveConfirmModal:!1})})]})});h(this,"renderButton",(e,s,a)=>{const{address:i,thirdParty:o,onInitiateApprovalFlow:r,onInitiateTPApprovalFlow:m,reviewedItems:g,totalItems:p}=this.props,I={[j.APPROVE]:()=>a!=null&&a.assignee&&i!==(a==null?void 0:a.assignee)?this.setState({showApproveConfirmModal:!0}):L(s)?m(s):r(s),[j.ENABLE]:()=>r(s),[j.DISABLE]:()=>this.setShowRejectionModal(o?T.DISABLE_THIRD_PARTY:T.DISABLE_COLLECTION),[j.REJECT]:()=>{(a==null?void 0:a.status)===K.PENDING?this.setShowRejectionModal(T.REJECT_CURATION):this.setShowRejectionModal(T.REJECT_COLLECTION)}},S={[j.APPROVE]:"approve",[j.ENABLE]:"enable",[j.DISABLE]:"disable",[j.REJECT]:"reject"},E=e===j.APPROVE||e===j.ENABLE,b=!L(s)||!!p&&g.length>=Z(p);return t.jsx(c.Popup,{content:d("item_editor.top_panel.items_pending_to_review"),disabled:b,position:"bottom center",trigger:t.jsx("div",{children:t.jsx(c.Button,{primary:E,onClick:()=>I[e](),disabled:L(s)&&e===j.APPROVE&&!!p&&g.length<Z(p),children:d(`item_editor.top_panel.${S[e]}`)})}),hideOnScroll:!0,on:"hover",inverted:!0,flowing:!0})});h(this,"renderTPButtons",(e,s,a)=>{const{reviewedItems:i,totalItems:o,thirdParty:r}=this.props,m=a==null?void 0:a.some(g=>g.status===K.PENDING);return t.jsxs(t.Fragment,{children:[t.jsxs(c.Header,{sub:!0,children:[m?d("item_editor.top_panel.reviewed_counter",{count:i.length,threshold:Z(o)}):d("item_editor.top_panel.not_enough_items_to_curate_more"),i.length>=Z(o)?t.jsx(c.Icon,{name:"check circle"}):null]}),m&&this.renderButton(j.APPROVE,e,s),m&&this.renderButton(j.REJECT,e,s),!m&&(r==null?void 0:r.isApproved)&&this.renderButton(j.DISABLE,e,null)]})});h(this,"renderButtons",(e,s)=>{if(s&&e.isApproved)switch(s.status){case"pending":return t.jsxs(t.Fragment,{children:[this.renderButton(j.APPROVE,e,s),this.renderButton(j.REJECT,e,s)]});case"approved":case"rejected":return this.renderButton(j.DISABLE,e,s)}return Et(e)?e.isApproved?this.renderButton(j.DISABLE,e,s):this.renderButton(j.ENABLE,e,s):t.jsxs(t.Fragment,{children:[this.renderButton(j.APPROVE,e,s),this.renderButton(j.REJECT,e,s)]})})}render(){const{collection:e,items:s,isCommitteeMember:a,isReviewing:i,isConnected:o,isLoading:r}=this.props,m=!e||r&&!s.length;return a&&i&&o?t.jsx("div",{className:"TopPanel",children:m?t.jsx(c.Loader,{size:"small",active:!0}):this.renderPage(e)}):null}};const ca=n=>{const l=Q(n),e=l?Le(n,l):null,s=e?jt(n,e.id):[],a=e?St(n,e.id):[],i=l?ft(n,l):null,o=l?he(n,l):void 0,r=e&&L(e)?wt(n,e):null;return{address:te(n),items:s,totalItems:(o==null?void 0:o.total)||null,collection:e,itemCurations:a,thirdParty:r,curation:i,chainId:Tt(n),isConnected:be(n),isReviewing:xe(n),isCommitteeMember:Oe(n),selectedCollectionId:Q(n),isLoading:V(yt(n),Mt)||V(Pt(n),Lt)||V(me(n),Ot)}},ha=n=>({onNavigate:l=>n(At(l)),onSetAssignee:(l,e,s)=>n(Nt(l,e,s)),onInitiateTPApprovalFlow:l=>n(Rt(l)),onInitiateApprovalFlow:l=>n(Dt(l))}),ma=B(ca,ha)(da),ga="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",pa=n=>{const{collectionId:l,itemName:e}=n,[s,a]=x.useState(!1),[i,o]=x.useState(null),r=ke(),m=Be();x.useEffect(()=>{e&&(a(!0),o(e))},[e]);function g(){a(!1);const p=new URLSearchParams(m.search);p.delete("newItem"),r.replace({search:p.toString()})}return s&&i&&l?t.jsx(c.Toast,{type:c.ToastType.INFO,title:d("sagas.item.item_added_toast.title"),closable:!0,icon:t.jsx("div",{className:"ItemAddedToast icon-container",children:t.jsx("img",{src:ga,alt:d("sagas.item.item_added_toast.title")})}),onClose:g,body:t.jsx(H,{id:"sagas.item.item_added_toast.body",values:{name:i,br:()=>t.jsx("br",{}),b:p=>t.jsx("strong",{children:p}),"collection-link":p=>t.jsx(ee,{to:R.collectionDetail(l),children:t.jsx(c.Button,{className:"ItemAddedToast view-collection-link",basic:!0,children:p})})}})}):null},ua=J.memo(pa),Ca=n=>({itemName:kt(n)}),Ia=B(Ca)(ua),ba=({collection:n,address:l,hasUserOrphanItems:e,isLoggedIn:s,isReviewing:a,onOpenModal:i,onDeleteCollection:o})=>{var u,W;const r=Be(),m=ke(),g=((u=r.state)==null?void 0:u.fromParam)===fe.COLLECTIONS,p=((W=r.state)==null?void 0:W.fromParam)===fe.TP_COLLECTIONS,I=x.useCallback(()=>{m.push(R.collections())},[m]),S=x.useCallback(()=>{if(n&&(g||p)){const F=g?R.collectionDetail:R.thirdPartyCollectionDetail;m.push(F(n.id))}else m.push(R.itemEditor())},[g,p,m,n]),E=x.useCallback(()=>{i("CreateCollectionModal")},[i]),b=x.useCallback(()=>{n&&i("CreateSingleItemModal",{collectionId:n.id})},[n,i]),C=x.useCallback(()=>{n&&i("AddExistingItemModal",{collectionId:n.id})},[n,i]),w=x.useCallback(()=>{n&&i("EditCollectionNameModal",{collection:n})},[n,i]),f=x.useCallback(()=>{n&&o(n)},[n,o]),D=x.useCallback(()=>{const F=n&&Bt(n.owner,l||"");return n?t.jsxs(t.Fragment,{children:[t.jsx("div",{className:`block ${g||p?"close":"back"}`,onClick:S}),t.jsxs("div",{className:"title",children:[t.jsx(ee,{to:R.collectionDetail(n.id),children:n.name}),t.jsx(et,{collection:n})]}),F&&!n.isPublished?t.jsx(c.Dropdown,{trigger:t.jsx("div",{className:"block actions"}),inline:!0,direction:"left",children:t.jsxs(c.Dropdown.Menu,{children:[t.jsx(c.Dropdown.Item,{onClick:w,children:d("item_editor.left_panel.actions.edit_name")}),t.jsx(c.Dropdown.Item,{onClick:b,children:d("item_editor.left_panel.actions.new_item")}),e&&t.jsx(c.Dropdown.Item,{onClick:C,children:d("item_editor.left_panel.actions.add_existing_item")}),t.jsx(Xe,{name:n.name,onDelete:f,trigger:t.jsx(c.Dropdown.Item,{text:d("global.delete")})})]})}):null]}):null},[n,l,e,g,p]),M=x.useCallback(()=>t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"block close",onClick:I}),t.jsx("div",{className:"title",children:e?d("item_editor.left_panel.title"):d("item_editor.left_panel.title_alternative")}),s?t.jsx(c.Dropdown,{trigger:t.jsx("div",{className:"block add"}),inline:!0,direction:"left",children:t.jsx(c.Dropdown.Menu,{children:t.jsx(c.Dropdown.Item,{onClick:E,children:d("item_editor.left_panel.actions.new_collection")})})}):t.jsx("div",{className:"block"})]}),[e,s]);return a?null:t.jsx(c.Row,{grow:!1,shrink:!1,className:"Header",children:n?D():M()})},xa=ba,_a=n=>{let l;const e=Q(n);e&&(l=We(n).find(i=>i.id===e));const s=te(n);return{address:s,isLoggedIn:Wt(n),isReviewing:xe(n),collection:l,hasEditRights:l!==void 0&&s!==void 0&&Fe(n,s,l),hasUserOrphanItems:_e(n)}},va=n=>({onOpenModal:(l,e)=>n(He(l,e)),onDeleteCollection:l=>n(Ft(l)),onDeleteItem:l=>n(Ve(l))}),Ea=B(_a,va)(xa),P=10;class N extends x.PureComponent{constructor(){super(...arguments);h(this,"state",{isCollapsed:!1});h(this,"handleToggle",()=>{this.setState({isCollapsed:!this.state.isCollapsed})})}render(){const{label:e,children:s}=this.props,{isCollapsed:a}=this.state,i=!a;return t.jsxs("div",{className:`Collapsable ${i?"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:i?s:null})]})}}class ja extends x.PureComponent{constructor(){super(...arguments);h(this,"handleClick",()=>{const{item:e,onClick:s}=this.props;s(e)})}renderToggleItem(){const{item:e,isVisible:s,isPlayingEmote:a}=this.props;return X(e)?t.jsx(c.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:i}=this.props;return t.jsx("div",{className:`SidebarItem ${s?"is-selected":""}`,children:t.jsxs(ee,{to:R.itemEditor({itemId:e.id,collectionId:a||void 0,newItem:void 0}),children:[t.jsx(ge,{item:e}),t.jsxs("div",{className:"name",children:[t.jsx(Ht,{item:e}),e.name]}),t.jsx(c.Popup,{content:d("item_editor.left_panel.invalid_representation_tooltip",{bodyShape:t.jsx("b",{children:d(`body_shapes.${pe(e)}`).toLowerCase()})}),disabled:$e(e,i),position:"top center",trigger:this.renderToggleItem()})]})})}}const Sa=ja;var v=(n=>(n.TO_REVIEW="to-review",n.REVIEWED="reviewed",n.ALL_ITEMS="all-items",n))(v||{});const fa={[v.TO_REVIEW]:1,[v.REVIEWED]:1,[v.ALL_ITEMS]:1};class wa extends x.PureComponent{constructor(){super(...arguments);h(this,"state",{currentTab:v.TO_REVIEW,currentPages:fa,reviewedTabPage:1,showGetMoreSamplesModal:!1,showAllItemsTabChangeModal:!1});h(this,"analytics",ve());h(this,"handleReviewItemsTrigger",e=>{const{items:s,onReviewItems:a}=this.props,{currentTab:i}=this.state;this.getIsReviewingTPItems()&&i===v.TO_REVIEW&&!Ue(s,e==null?void 0:e.items)&&a()});h(this,"isVisible",e=>{const{visibleItems:s}=this.props;return s.some(a=>a.id===e.id)});h(this,"handleClick",e=>{var g;const{bodyShape:s,visibleItems:a,wearableController:i,isPlayingEmote:o,onSetItems:r}=this.props;if(!$e(e,s))return;let m=a.filter(p=>p.id!==e.id);if(X(e))if(this.isVisible(e)){o?i==null||i.emote.pause():i==null||i.emote.play();return}else m=m.filter(p=>p.type!==y.EMOTE);this.isVisible(e)||(m.push(e),(g=this.analytics)==null||g.track("Preview Item",{ITEM_ID:e!=null&&e.urn?Y(e.urn)?ze(e.urn):ue(e.urn):null,ITEM_TYPE:e.type,ITEM_NAME:e.name,ITEM_IS_THIRD_PARTY:Y(e.urn)})),r(m)});h(this,"handleTabChange",e=>{const{onLoadPage:s,onReviewItems:a,onResetReviewedItems:i}=this.props,{currentPages:o}=this.state;e===v.ALL_ITEMS?this.setState({showAllItemsTabChangeModal:!1},()=>{i(),s(o[v.ALL_ITEMS])}):e===v.TO_REVIEW&&a(),this.setState({currentTab:e})});h(this,"handleGetRandomSampleClick",()=>{const{showSamplesModalAgain:e,onLoadRandomPage:s}=this.props;e?this.setState({showGetMoreSamplesModal:!0}):s()});h(this,"handleModalProceed",()=>{const{onLoadRandomPage:e}=this.props;e(),this.setState({showGetMoreSamplesModal:!1})});h(this,"handlePageChange",(e,s)=>{const{currentTab:a}=this.state,{onLoadPage:i}=this.props;this.setState(o=>({currentPages:{...o.currentPages,[a]:+s.activePage}})),a!==v.REVIEWED&&i(+s.activePage)});h(this,"handleSwitchToAllItemsTab",()=>{const{reviewedItems:e}=this.props;e.length>0?this.setState({showAllItemsTabChangeModal:!0}):this.handleTabChange(v.ALL_ITEMS)});h(this,"getIsReviewingTPItems",()=>{const{collection:e,isReviewing:s}=this.props;return e?Y(e.urn)&&s:!1});h(this,"renderSidebarItem",e=>{const{collection:s,selectedItemId:a,bodyShape:i,isPlayingEmote:o}=this.props;return t.jsx(Sa,{item:e,isSelected:a===e.id,isVisible:this.isVisible(e),isPlayingEmote:o,selectedCollectionId:(s==null?void 0:s.id)??null,bodyShape:i,onClick:this.handleClick},e.id)});h(this,"renderSidebarCategory",e=>{const s=e.filter(Ce),a=e.filter(X);return e.length===0?t.jsx("div",{className:"empty",children:t.jsx("div",{className:"subtitle",children:d("item_editor.left_panel.empty_collection")})}):s.length===0||a.length===0?e.map(this.renderSidebarItem):t.jsxs(t.Fragment,{children:[t.jsx(N,{label:this.renderCollapsableLabel(y.WEARABLE),children:s.map(this.renderSidebarItem)}),t.jsx(N,{label:this.renderCollapsableLabel(y.EMOTE),children:a.map(this.renderSidebarItem)})]})});h(this,"renderTabPagination",e=>{const{currentTab:s,currentPages:a}=this.state,i=a[s],o=Math.ceil(e/P);return o>1?t.jsx(c.Pagination,{siblingRange:0,firstItem:null,lastItem:null,totalPages:o,activePage:i,onPageChange:this.handlePageChange}):null});h(this,"renderPaginationStats",e=>{const{currentPages:s,currentTab:a}=this.state,i=s[a],o=(i-1)*P,r=i*P;return t.jsx(c.Header,{sub:!0,children:d("item_editor.left_panel.reviewed_tab.page_counter",{pageStart:o,pageEnd:r>e?e:r,total:e})})});h(this,"renderTabContent",()=>{const{items:e,isLoading:s,totalItems:a,reviewedItems:i}=this.props,{currentTab:o,currentPages:r}=this.state,m=this.getIsReviewingTPItems(),g=r[o];if(s)return t.jsx(c.Loader,{size:"large",active:!0});switch(o){case v.TO_REVIEW:return t.jsxs(t.Fragment,{children:[this.renderSidebarCategory(e),!m&&a?this.renderTabPagination(a):null]});case v.REVIEWED:{const p=i.slice((g-1)*P,g*P);return t.jsxs(t.Fragment,{children:[i.length?this.renderPaginationStats(i.length):null,this.renderSidebarCategory(p),i.length?this.renderTabPagination(i.length):null]})}case v.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}});h(this,"renderTabHeader",()=>{const{isLoading:e,totalItems:s,reviewedItems:a}=this.props,{currentTab:i}=this.state;let o;const r=!s||s<P||a.length===s;switch(i){case v.TO_REVIEW:o=t.jsx(c.Popup,{content:d("item_editor.top_panel.not_enough_items_to_curate_more"),disabled:!r,position:"bottom center",trigger:t.jsx("div",{children:t.jsxs(c.Button,{disabled:e||r,primary:!0,className:"random-sample-button",onClick:this.handleGetRandomSampleClick,children:[t.jsx(c.Icon,{name:"random"}),d("item_editor.left_panel.get_random_sample")]})}),hideOnScroll:!0,on:"hover",inverted:!0,flowing:!0});break;case v.REVIEWED:o=t.jsx(H,{id:"item_editor.left_panel.reviewed_samples",values:{reviewed_samples_bold:t.jsx("b",{children:d("item_editor.left_panel.reviewed_samples_bold",{count:a.length})}),total:Z(s??1)}});break;default:return null}return t.jsxs("div",{className:"tab-header",children:[" ",o," "]})});h(this,"renderModal",()=>{const{onToggleShowSamplesModalAgain:e,showSamplesModalAgain:s}=this.props,{showGetMoreSamplesModal:a}=this.state;return t.jsxs(c.Modal,{open:a,size:"small",className:"ConfirmNewSampleModal",children:[t.jsx(c.Modal.Header,{children:d("item_editor.left_panel.get_more_samples_modal.title")}),t.jsxs(c.Modal.Content,{children:[t.jsx(H,{id:"item_editor.left_panel.get_more_samples_modal.content",values:{count:10,tabName:t.jsx("b",{children:v.REVIEWED})}}),t.jsxs("div",{className:"checkbox-container",onClick:e,children:[t.jsx(c.Checkbox,{checked:!s}),d("item_editor.left_panel.get_more_samples_modal.dont_show_again")]})]}),t.jsxs(c.Modal.Actions,{children:[t.jsx(c.Button,{onClick:()=>this.setState({showGetMoreSamplesModal:!1}),children:d("global.cancel")}),t.jsx(c.Button,{primary:!0,onClick:this.handleModalProceed,children:d("item_editor.left_panel.get_more_samples_modal.understood")})]})]})});h(this,"renderAllItemsTabChangeModal",()=>{const{showAllItemsTabChangeModal:e}=this.state;return t.jsxs(c.Modal,{open:e,size:"small",className:"ConfirmNewSampleModal",children:[t.jsx(c.Modal.Header,{children:d("item_editor.left_panel.all_items_check.title")}),t.jsx(c.Modal.Content,{children:d("item_editor.left_panel.all_items_check.content")}),t.jsxs(c.Modal.Actions,{children:[t.jsx(c.Button,{onClick:()=>this.setState({showAllItemsTabChangeModal:!1}),children:d("global.cancel")}),t.jsx(c.Button,{primary:!0,onClick:()=>this.handleTabChange(v.ALL_ITEMS),children:d("item_editor.left_panel.get_more_samples_modal.understood")})]})]})});h(this,"renderTabs",()=>{const{currentTab:e}=this.state;return t.jsxs(c.Tabs,{isFullscreen:!0,children:[t.jsx(c.Tabs.Tab,{active:e===v.TO_REVIEW,onClick:()=>this.handleTabChange(v.TO_REVIEW),children:d("item_editor.left_panel.to_review")}),t.jsx(c.Tabs.Tab,{active:e===v.REVIEWED,onClick:()=>this.handleTabChange(v.REVIEWED),children:d("item_editor.left_panel.reviewed")}),t.jsx(c.Tabs.Tab,{active:e===v.ALL_ITEMS,onClick:this.handleSwitchToAllItemsTab,children:d("item_editor.left_panel.all_items")})]})})}componentDidMount(){this.handleReviewItemsTrigger()}componentDidUpdate(e){this.handleReviewItemsTrigger(e)}renderCollapsableLabel(e){return t.jsxs(t.Fragment,{children:[t.jsx(O,{name:e}),t.jsx(H,{id:`item_editor.left_panel.${e}`})]})}render(){return t.jsxs(c.Section,{className:"Items",children:[this.getIsReviewingTPItems()?t.jsxs(t.Fragment,{children:[this.renderTabs(),this.renderTabHeader()]}):null,this.renderTabContent(),this.renderModal(),this.renderAllItemsTabChangeModal()]})}}class Ta extends x.PureComponent{render(){const{collection:l,isSelected:e}=this.props;return t.jsx("div",{className:`SidebarCollection ${e?"is-selected":""}`,children:t.jsxs(ee,{to:R.itemEditor({collectionId:l.id}),children:[t.jsx(Vt,{collectionId:l.id}),t.jsxs("div",{className:"wrapper",children:[t.jsxs("div",{className:"name",children:[t.jsx(et,{collection:l}),l.name]}),t.jsx("div",{className:"count",children:d("item_editor.left_panel.items_count",{count:l.itemCount})})]})]})})}}const ya=Ta;class Pa extends x.PureComponent{constructor(){super(...arguments);h(this,"state",{currentPage:1});h(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:i,totalCollections:o}=this.props,{currentPage:r}=this.state;if(e.length===0)return null;const m=Math.ceil(o/P);return s?t.jsx(c.Loader,{size:"small",active:!0}):!s&&a.length===0&&e.length===0?t.jsx("div",{className:"empty",children:t.jsx("div",{className:"subtitle",children:d("collections_page.empty_description")})}):t.jsx(t.Fragment,{children:t.jsxs(c.Section,{className:"Collections",children:[e.map(g=>t.jsx(ya,{collection:g,items:a,isSelected:g.id===i},g.id)),m>1?t.jsx(c.Pagination,{siblingRange:0,firstItem:null,lastItem:null,totalPages:m,activePage:r,onPageChange:this.handlePageChange}):null]})})}}var z=(n=>(n.COLLECTIONS="collections",n.ORPHAN_ITEMS="orphanItems",n))(z||{});const U=1;let Aa=class extends x.PureComponent{constructor(){super(...arguments);h(this,"state",this.getInitialState());h(this,"handleToggleShowSamplesModalAgain",()=>{this.setState(e=>({showSamplesModalAgain:!e.showSamplesModalAgain}))});h(this,"fetchResource",()=>{const{address:e,onFetchCollections:s,onFetchOrphanItems:a,isReviewing:i,selectedCollectionId:o}=this.props,{pages:r}=this.state;if(e&&!i&&!o){const m=r[r.length-1];(this.isCollectionTabActive()?s:a)(e,{limit:P,page:m})}});h(this,"loadPage",e=>{this.setState({pages:[e]},()=>this.fetchResource())});h(this,"getRandomPage",(e,s)=>Math.floor(Math.random()*(s-e+1)+e));h(this,"loadRandomPage",e=>{const{pages:s}=this.state,{totalItems:a,totalCollections:i,onSetReviewedItems:o}=this.props,r=this.isCollectionTabActive()?i:a,m=Math.ceil(r/P);if(m>s.length){const g=[...Array(m).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(I=>({pages:[...I.pages,p]}),this.fetchResource)}}o(e)});h(this,"handleTabChange",e=>{this.setState({currentTab:e,pages:[U]},this.fetchResource)});h(this,"isCollectionTabActive",()=>{const{selectedCollectionId:e}=this.props,{currentTab:s}=this.state;return s===z.COLLECTIONS&&!e})}getInitialState(){const{selectedCollectionId:e,selectedItemId:s}=this.props;let a=z.COLLECTIONS;return!e&&s&&(a=z.ORPHAN_ITEMS),{pages:[U],currentTab:a,initialPage:U,showSamplesModalAgain:!0}}componentDidMount(){const{address:e,hasUserOrphanItems:s,selectedItem:a,onFetchOrphanItem:i,onSetItems:o}=this.props;this.fetchResource(),e&&s===void 0&&i(e),a&&o([a])}componentDidUpdate(e,s){const{isConnected:a,address:i,selectedCollectionId:o,selectedItemId:r,selectedItem:m,orphanItems:g,totalItems:p,visibleItems:I,hasUserOrphanItems:S,onSetItems:E,onFetchOrphanItem:b}=this.props,{initialPage:C,pages:w}=this.state;if(!o&&i&&r&&p&&(C===U||s.initialPage<C)){if(!g.find(f=>f.id===r)){const f=Math.ceil(p/P),D=w[w.length-1],M=Math.min(f,D+1);w.includes(M)||this.setState({pages:[M],initialPage:M},this.fetchResource)}}else if(e.selectedItemId&&r&&e.selectedItemId!==r){const f=I.filter(D=>D.type!==y.EMOTE);E(f)}else i&&a&&(a!==e.isConnected||e.selectedCollectionId&&!o)&&this.setState({pages:[U]},this.fetchResource),e.selectedCollectionId!==o&&this.setState({pages:[U]}),i&&i!==e.address&&S===void 0&&b(i);!e.selectedItem&&m&&m.type!==y.EMOTE&&E([m]),e.selectedCollectionId!==o&&E([])}componentWillUnmount(){const{onSetItems:e}=this.props;e([])}getItems(e,s,a){const{selectedCollectionId:i,orphanItems:o,isReviewing:r}=this.props;return i&&e?$t(e)&&r?s.filter(m=>!!(a!=null&&a.find(g=>g.itemId===m.id&&g.status===K.PENDING))):s:o}render(){const{items:e,totalItems:s,totalCollections:a,collections:i,selectedItemId:o,selectedCollectionId:r,visibleItems:m,bodyShape:g,reviewedItems:p,isReviewing:I,isPlayingEmote:S,isConnected:E,wearableController:b,isLoading:C,hasUserOrphanItems:w,onSetItems:f,onSetReviewedItems:D,onResetReviewedItems:M}=this.props,{pages:u,showSamplesModalAgain:W}=this.state,F=!r&&w,le=this.isCollectionTabActive()&&!r,A=!this.isCollectionTabActive()||r;return t.jsx("div",{className:"LeftPanel",children:E?t.jsx(qs,{id:r,itemSelected:o,itemsPage:u,itemsPageSize:P,fetchCollectionItemsOptions:{status:I?K.PENDING:void 0},onChangePage:q=>this.setState({pages:[q]}),children:({paginatedCollections:q,collection:$,paginatedItems:st,initialPage:at,isLoadingCollection:nt,isLoadingCollectionItems:it,itemCurations:lt})=>{const G=this.getItems($,st,lt),Se=this.isCollectionTabActive(),ot=r&&$?at:this.state.initialPage;return t.jsxs(t.Fragment,{children:[t.jsx(Ea,{}),F?t.jsxs(c.Tabs,{isFullscreen:!0,children:[t.jsx(c.Tabs.Tab,{active:Se,onClick:()=>this.handleTabChange(z.COLLECTIONS),children:d("collections_page.collections")}),t.jsx(c.Tabs.Tab,{active:!Se,onClick:()=>this.handleTabChange(z.ORPHAN_ITEMS),children:d("item_editor.left_panel.items")})]}):null,le?t.jsx(Pa,{collections:q,totalCollections:a||i.length,items:e,hasHeader:G.length>0,selectedCollectionId:r,onLoadPage:this.loadPage,isLoading:nt}):null,A?t.jsxs(t.Fragment,{children:[t.jsx(wa,{items:G,totalItems:s||G.length,hasHeader:!r&&i.length>0,selectedItemId:o,collection:$,isReviewing:I,isPlayingEmote:S,visibleItems:m,bodyShape:g,onResetReviewedItems:M,reviewedItems:p,onSetItems:f,wearableController:b,initialPage:ot,isLoading:it||C,onToggleShowSamplesModalAgain:this.handleToggleShowSamplesModalAgain,showSamplesModalAgain:W,onReviewItems:()=>D(G),onLoadRandomPage:()=>this.loadRandomPage(G),onLoadPage:this.loadPage}),t.jsx(Ia,{collectionId:r})]}):null]})}}):null})}};const Na=n=>{const l=Q(n),e=te(n),s=l?he(n,l):e?he(n,e):void 0,a=l?void 0:Ut(n),i=Ee(n)||"",o=je(n,i);return{address:e,isConnected:be(n),items:zt(n),totalItems:(s==null?void 0:s.total)||null,totalCollections:(a==null?void 0:a.total)||null,orphanItems:e&&!l?Yt(n,e,s==null?void 0:s.limit):Jt(n),collections:qt(n),selectedItemId:i,selectedItem:o,selectedCollectionId:l,visibleItems:Ye(n),bodyShape:Je(n),wearableController:qe(n),isReviewing:xe(n),isLoading:V(me(n),Kt)||V(me(n),Qt),isPlayingEmote:Ge(n),hasUserOrphanItems:_e(n)}},Ra=n=>({onSetItems:l=>n(Ze(l)),onFetchCollections:(l,e)=>n(Gt(l,e)),onFetchOrphanItems:(l,e)=>n(Ke(l,e)),onFetchOrphanItem:l=>n(Zt(l))}),Da=B(Na,Ra)(Aa);class ce extends J.PureComponent{constructor(){super(...arguments);h(this,"handleAvatarColorChange",(e,s)=>{const{currentColor:a,colors:i,onChange:o}=this.props;if(a.toHexString()!==s.value){const r=i.find(m=>m.toHexString()===s.value);o(r)}});h(this,"renderItem",(e,s)=>{const a=e.toHexString();return t.jsx(c.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,i=e.toHexString();return t.jsx(c.Dropdown,{inline:!0,direction:"right",className:"AvatarColorDropdown Select",value:i,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:i}})}),t.jsx("div",{className:"handle"})]}),children:t.jsx(c.Dropdown.Menu,{className:"colors-menu",children:s.map(this.renderItem)})})}}let Ma=class extends J.PureComponent{constructor(){super(...arguments);h(this,"handleAvatarChangeWearable",(e,s)=>{const{wearable:a,category:i,bodyShape:o,onChange:r,baseWearables:m}=this.props,g=s.value?m.find(p=>p.id===s.value):null;a!==g&&r(i,o,g??null)})}render(){const{wearable:e,bodyShape:s,category:a,label:i,isNullable:o,baseWearables:r}=this.props,m=Xt(r,a,s).map(p=>({value:p.id,text:es(p)}));o&&m.push({value:"",text:d("global.none")});const g=e?m.find(p=>p.value===e.id):null;return t.jsx(c.Dropdown,{inline:!0,direction:"right",className:"AvatarWearableDropdown Select",value:e?e.id:"",options:m,scrolling:!0,onChange:this.handleAvatarChangeWearable,trigger:t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"label",children:i}),t.jsx("div",{className:"value",children:g?g.text:d("global.none")}),t.jsx("div",{className:"handle"})]})})}};const La=n=>({baseWearables:ts(n)}),ae=B(La)(Ma);let Oa=class extends x.PureComponent{constructor(){super(...arguments);h(this,"state",{showSceneBoundaries:!1,isShowingAvatarAttributes:!1,isLoading:!1});h(this,"analytics",ve());h(this,"handleToggleShowingAvatarAttributes",()=>{this.setState({isShowingAvatarAttributes:!this.state.isShowingAvatarAttributes})});h(this,"handleBodyShapeChange",(e,{value:s})=>{const{onSetBodyShape:a}=this.props;a(s)});h(this,"handleAnimationChange",(e,{value:s})=>{const{emotes:a,visibleItems:i,onSetAvatarAnimation:o,onSetItems:r}=this.props,m=a.find(p=>p.id===s),g=i.filter(p=>p.type!==y.EMOTE);g.forEach(p=>{var I;(I=this.analytics)==null||I.track("Play Emote",{EMOTE_PLAYED_BASE:!m,EMOTE_PLAYED_ITEM_ID:m!=null&&m.urn?ue(m.urn):null,EMOTE_PLAYED_NAME:m?m.name:s,PREVIEWED_WEARABLE_ITEM_ID:p!=null&&p.urn?Y(p.urn)?ze(p.urn):ue(p.urn):null,PREVIEWED_WEARABLE_NAME:p.name})}),m?g.push(m):o(s),r(g)});h(this,"handleSkinColorChange",e=>{const{onSetSkinColor:s}=this.props;s(e)});h(this,"handleEyeColorChange",e=>{const{onSetEyeColor:s}=this.props;s(e)});h(this,"handleHairColorChange",e=>{const{onSetHairColor:s}=this.props;s(e)});h(this,"handleWearableChange",(e,s,a)=>{const{onSetBaseWearable:i}=this.props;i(e,s,a)});h(this,"handleWearablePreviewLoad",()=>{const{wearableController:e,onSetWearablePreviewController:s}=this.props;e||s(c.WearablePreview.createController("wearable-editor")),this.setState({isLoading:!1})});h(this,"handleControlActionChange",async e=>{const{wearableController:s}=this.props,a=.1;if(s)switch(await(s==null?void 0:s.emote.pause()),e){case se.ZOOM_IN:{await(s==null?void 0:s.scene.changeZoom(a));break}case se.ZOOM_OUT:{await(s==null?void 0:s.scene.changeZoom(-a));break}}});h(this,"handlePlayEmote",()=>{const{wearableController:e,isPlayingEmote:s,visibleItems:a,onSetAvatarAnimation:i,onSetItems:o}=this.props,r=a.filter(m=>m.type!==y.EMOTE);s?(i(_.PreviewEmote.IDLE),o(r)):e==null||e.emote.play()});h(this,"renderEmotePlayButton",()=>{const{isPlayingEmote:e}=this.props,s=e?"stop":"play",a=e?d("item_editor.center_panel.stop"):d("item_editor.center_panel.play_emote");return t.jsxs(c.Button,{icon:!0,onClick:this.handlePlayEmote,children:[t.jsx(c.Icon,{name:s}),t.jsx("span",{children:a})]})});h(this,"renderEmoteDropdownButton",()=>{const{collection:e,emotes:s,isPlayingEmote:a}=this.props,i=!!e,o=s.length>0;return a?null:t.jsx(c.Dropdown,{className:"avatar-animation button icon",floating:!0,scrolling:!0,children:t.jsxs(c.Dropdown.Menu,{children:[o&&t.jsxs(t.Fragment,{children:[t.jsx(c.Dropdown.Header,{content:i?d("item_editor.center_panel.from_collection"):d("item_editor.center_panel.from_items")}),t.jsx(c.Dropdown.Divider,{}),s.map(r=>t.jsx(c.Dropdown.Item,{value:r.id,text:r.name,onClick:this.handleAnimationChange},r.id)),t.jsx(c.Dropdown.Divider,{}),t.jsx(c.Dropdown.Header,{content:d("item_editor.center_panel.default")}),t.jsx(c.Dropdown.Divider,{})]}),_.PreviewEmote.schema.enum.map(r=>t.jsx(c.Dropdown.Item,{value:r,text:d(`emotes.${r}`),onClick:this.handleAnimationChange},r))]})})});h(this,"renderEmoteSelector",()=>t.jsx(c.Popup,{content:d("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(c.Button.Group,{children:[this.renderEmotePlayButton(),this.renderEmoteDropdownButton()]})})}))}componentDidMount(){const{address:e,collection:s,emotes:a,selectedBaseWearables:i,hasUserOrphanItems:o,onFetchBaseWearables:r,onFetchOrphanItems:m,onFetchCollectionItems:g}=this.props,p=a.length>0;i||r(),p||(s&&!L(s)?g(s.id):e&&o&&m(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 i=s.find(o=>o.value===e);return{value:e,options:s,trigger:this.renderSelectTrigger(a,i?i.text:"")}}render(){const{bodyShape:e,skinColor:s,eyeColor:a,hairColor:i,emote:o,selectedBaseWearables:r,selectedItem:m,visibleItems:g,isImportFilesModalOpen:p,wearableController:I}=this.props,{isShowingAvatarAttributes:S,showSceneBoundaries:E,isLoading:b}=this.state,C=g.some(X)&&(m==null?void 0:m.type)===y.EMOTE,w=o===_.PreviewEmote.JUMP?1:void 0;return t.jsxs("div",{className:`CenterPanel ${p?"import-files-modal-is-open":""}`,children:[t.jsx(c.WearablePreview,{id:"wearable-editor",profile:"default",bodyShape:e,emote:o,zoom:w,skin:oe(s),eyes:oe(a),hair:oe(i),urns:r?Object.values(r).map(f=>f?f.id:null).filter(f=>f!==null):[],base64s:g.map(ss),disableAutoRotate:!0,disableBackground:!0,wheelZoom:1.5,wheelStart:100,dev:as,onUpdate:()=>this.setState({isLoading:!0}),onLoad:this.handleWearablePreviewLoad,disableDefaultEmotes:C,showSceneBoundaries:E}),C?t.jsxs("div",{className:"zoom-controls",children:[t.jsx(c.Button,{className:"zoom-control zoom-in-control",onClick:()=>this.handleControlActionChange(se.ZOOM_IN),children:t.jsx(c.Icon,{name:"plus"})}),t.jsx(c.Button,{className:"zoom-control zoom-out-control",onClick:()=>this.handleControlActionChange(se.ZOOM_OUT),children:t.jsx(c.Icon,{name:"minus"})})]}):null,b&&t.jsx(c.Center,{children:t.jsx(c.Loader,{active:!0})}),t.jsxs("div",{className:"footer",children:[C&&!b&&I?t.jsx("div",{className:"emote-controls-container",children:t.jsx(c.EmoteControls,{className:"emote-controls",wearablePreviewId:"wearable-editor",wearablePreviewController:I})}):null,t.jsxs("div",{className:"options",children:[t.jsx("div",{className:`option ${S?"active":""}`,onClick:this.handleToggleShowingAvatarAttributes,children:t.jsx(c.Icon,{name:"user"})}),C?null:this.renderEmoteSelector(),t.jsx("div",{className:`option ${E?"active":""}`,children:t.jsx(O,{name:"cylinder",onClick:()=>this.setState(f=>({showSceneBoundaries:!f.showSceneBoundaries}))})})]}),t.jsxs("div",{className:`avatar-attributes ${S?"active":""}`,children:[t.jsx("div",{className:"dropdown-container",children:t.jsx(c.Dropdown,{inline:!0,direction:"right",className:"Select",onChange:this.handleBodyShapeChange,...this.getDropdownAttributes(e,[{value:_.BodyShape.MALE,text:d("body_shapes.male")},{value:_.BodyShape.FEMALE,text:d("body_shapes.female")}],d("wearable.category.body_shape"))})}),t.jsx("div",{className:"dropdown-container",children:t.jsx(ce,{currentColor:s,colors:ns(),label:d("wearable.color.skin"),onChange:this.handleSkinColorChange})}),t.jsx("div",{className:"dropdown-container",children:t.jsx(ce,{currentColor:a,colors:is(),label:d("wearable.color.eye"),onChange:this.handleEyeColorChange})}),t.jsx("div",{className:"dropdown-container",children:t.jsx(ce,{currentColor:i,colors:ls(),label:d("wearable.color.hair"),onChange:this.handleHairColorChange})}),t.jsx("div",{className:"dropdown-container",children:r&&t.jsx(ae,{wearable:r[_.WearableCategory.HAIR],category:_.WearableCategory.HAIR,bodyShape:e,label:d("wearable.category.hair"),onChange:this.handleWearableChange,isNullable:!0})}),t.jsx("div",{className:"dropdown-container",children:r&&t.jsx(ae,{wearable:r[_.WearableCategory.FACIAL_HAIR],category:_.WearableCategory.FACIAL_HAIR,bodyShape:e,label:d("wearable.category.facial_hair"),onChange:this.handleWearableChange,isNullable:!0})}),t.jsx("div",{className:"dropdown-container",children:r&&t.jsx(ae,{wearable:r[_.WearableCategory.UPPER_BODY],category:_.WearableCategory.UPPER_BODY,bodyShape:e,label:d("wearable.category.upper_body"),onChange:this.handleWearableChange})}),t.jsx("div",{className:"dropdown-container",children:r&&t.jsx(ae,{wearable:r[_.WearableCategory.LOWER_BODY],category:_.WearableCategory.LOWER_BODY,bodyShape:e,label:d("wearable.category.lower_body"),onChange:this.handleWearableChange})})]})]})]})}};const ka=n=>{const l=te(n);let e;const s=Q(n);let a=os(n);s?(e=We(n).find(b=>b.id===s),a=a.filter(b=>b.collectionId===s)):a=a.filter(E=>!E.collectionId);const i=Ee(n)||"",o=je(n,i),r=Je(n),m=rs(n),g=Ye(n),p=ds(n),I=!g.some(X)&&p===_.PreviewEmote.IDLE,S="CreateSingleItemModal"in cs(n);return{address:l,bodyShape:r,collection:e,selectedItem:o,selectedBaseWearables:m?m[r]:null,skinColor:hs(n),eyeColor:ms(n),hairColor:gs(n),emote:p,visibleItems:g,wearableController:qe(n),emotes:a,isPlayingEmote:I?!1:Ge(n),isImportFilesModalOpen:S,hasUserOrphanItems:_e(n)}},Ba=n=>({onSetBodyShape:l=>n(ps(l)),onSetAvatarAnimation:l=>n(us(l)),onSetSkinColor:l=>n(Cs(l)),onSetEyeColor:l=>n(Is(l)),onSetHairColor:l=>n(bs(l)),onSetBaseWearable:(l,e,s)=>n(xs(l,e,s)),onFetchBaseWearables:()=>n(_s()),onSetWearablePreviewController:l=>n(vs(l)),onSetItems:l=>n(Ze(l)),onFetchOrphanItems:(l,e)=>n(Ke(l,e)),onFetchCollectionItems:(l,e)=>n(Es(l,e))}),Wa=B(ka,Ba)(Oa);class Fa extends x.PureComponent{constructor(){super(...arguments);h(this,"handleChange",e=>{const{value:s,maxLength:a,onChange:i}=this.props,o=e.target.value;s!==o&&i(a?o.slice(0,a):o)})}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 ie extends x.PureComponent{constructor(){super(...arguments);h(this,"state",{value:this.props.value});h(this,"handleChange",(e,s)=>{const{value:a,onChange:i}=this.props,o=s.value;o!==a&&(this.setState({value:o}),i(o))})}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,i=s.find(o=>o.value===a);return t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"label",children:e}),t.jsx("div",{className:"value",children:i?i.text:d("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(c.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})}}h(ie,"defaultProps",{disabled:!1});class Ie extends x.PureComponent{constructor(){super(...arguments);h(this,"state",{value:this.props.value});h(this,"handleChange",(e,s)=>{const{onChange:a}=this.props,{value:i}=this.state,o=s.value,r=[...i];for(const m of o)i.includes(m)||r.push(m);r.length!==i.length&&(this.setState({value:r}),a(r))});h(this,"handleRemove",e=>{const{onChange:s}=this.props,a=this.state.value.filter(i=>i!==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:i}=this.state,o=a.reduce((r,m)=>(r[m.value]=m.text,r),{});return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"label",children:[e,s?t.jsx(ne,{content:s,className:"info"}):null]}),t.jsx("div",{className:"values",children:i.length>0?i.map(r=>t.jsxs("div",{className:"value",children:[o[r],t.jsx("div",{className:"remove",onClick:m=>{this.handleRemove(r),m.stopPropagation()}})]},r)):t.jsx("div",{className:"placeholder",children:d("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(c.Dropdown,{inline:!0,multiple:!0,className:`MultiSelect ${a.length>0?"":"blank"}`.trim(),trigger:this.renderTrigger(),direction:"right",value:a,scrolling:!1,options:e.filter(i=>!a.includes(i.value)),disabled:s,onChange:this.handleChange,closeOnChange:!0})}}h(Ie,"defaultProps",{disabled:!1});class tt extends x.PureComponent{constructor(){super(...arguments);h(this,"state",{draft:"",value:this.props.value});h(this,"handleChange",e=>{this.setState({draft:e.target.value})});h(this,"handleAdd",()=>{const{onChange:e}=this.props,{draft:s,value:a}=this.state,i=s.trim();if(i!=="")if(a.includes(i))this.setState({draft:""});else{const o=[...a,i];this.setState({value:o,draft:""}),e(o)}});h(this,"handleKeyDown",e=>{if(e.key==="#"){e.preventDefault();return}else if(e.keyCode===js||e.keyCode===we||e.keyCode===Ss)this.handleAdd();else if(e.keyCode===fs||e.keyCode===we){const{draft:s,value:a}=this.state,i=a[a.length-1];i&&s===""&&this.handleRemove(i)}});h(this,"handleRemove",e=>{const{onChange:s}=this.props,a=this.state.value.filter(i=>i!==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(i=>t.jsxs("div",{className:"value",children:[i,t.jsx("div",{className:"remove",onClick:o=>{this.handleRemove(i),o.stopPropagation()}})]},i)),t.jsx("input",{value:s,onChange:this.handleChange,onKeyDown:this.handleKeyDown,onBlur:this.handleAdd,disabled:e})]})})}}h(tt,"defaultProps",{isDisabled:!1});let Ha=class extends x.PureComponent{constructor(){super(...arguments);h(this,"analytics",ve());h(this,"state",this.getInitialState());h(this,"thumbnailInput",x.createRef());h(this,"handleDeleteItem",()=>{const{onDeleteItem:e}=this.props,{selectedItem:s}=this.props;e(s)});h(this,"handleAddRepresentationToItem",()=>{const{selectedItem:e,onOpenModal:s}=this.props;s("CreateSingleItemModal",{item:e,addRepresentation:!0})});h(this,"handleChangeItemFile",()=>{const{selectedItem:e,onOpenModal:s}=this.props;s("CreateSingleItemModal",{item:e,changeItemFile:!0})});h(this,"handleOpenVideoDialog",(e={})=>{const{selectedItem:s,onOpenModal:a}=this.props;a("EditVideoModal",{item:s,onSaveVideo:this.handleSaveVideo,...e})});h(this,"handleSaveVideo",e=>{this.setState({video:URL.createObjectURL(e),contents:{...this.state.contents,[Te]:e},isDirty:!0})});h(this,"handleChangeName",e=>{this.setState({name:e,isDirty:this.isDirty({name:e})})});h(this,"handleChangeDescription",(e,s)=>{const a=s.value??"";this.setState({description:a,isDirty:this.isDirty({description:a})})});h(this,"handleChangeUtility",(e,s)=>{const a=s.value??"";this.setState({utility:a,isDirty:this.isDirty({utility:a})})});h(this,"handleChangeRarity",e=>{this.setState({rarity:e,isDirty:this.isDirty({rarity:e})})});h(this,"handleAllowVrmExport",(e,{checked:s})=>{const a={...this.state.data,blockVrmExport:!s};this.setState({data:a,isDirty:this.isDirty({data:a})})});h(this,"handleAllowOutlineCompatible",(e,{checked:s})=>{const a={...this.state.data,outlineCompatible:s};this.setState({data:a,isDirty:this.isDirty({data:a})})});h(this,"handleChangeCategory",e=>{let s;re(this.state.data)?s={...this.state.data,category:e}:(s={...this.state.data,category:e},e===_.WearableCategory.SKIN&&(s=this.setReplaces(s,[]),s=this.setHides(s,[]))),this.setState({data:s,isDirty:this.isDirty({data:s})})});h(this,"handlePlayModeChange",e=>{const s={...this.state.data,loop:e===de.LOOP};this.setState({data:s,isDirty:this.isDirty({data:s})})});h(this,"handleChangeReplaces",e=>{const s=this.setReplaces(this.state.data,e);this.setState({data:s,isDirty:this.isDirty({data:s})})});h(this,"handleChangeHides",(e,s)=>{const a=this.state.data.hides;let i=[];s==="wearable"?i=[...a.filter(r=>!_.WearableCategory.schema.enum.includes(r)),...e]:i=[...a.filter(r=>!_.BodyPartCategory.schema.enum.includes(r)),...e];const o=this.setHides(this.state.data,i);this.setState({data:o,isDirty:this.isDirty({data:o})})});h(this,"handleChangeTags",e=>{const s={...this.state.data,tags:e};this.setState({data:s,isDirty:this.isDirty({data:s})})});h(this,"handleOnSaveItem",async()=>{var S,E;const{selectedItem:e,itemStatus:s,onSaveItem:a}=this.props,{name:i,description:o,utility:r,rarity:m,contents:g,data:p,isDirty:I}=this.state;if(I&&e){let b=p;b&&!re(b)&&(b={...b,removesDefaultHiding:b.category===_.WearableCategory.UPPER_BODY||(S=b.hides)!=null&&S.includes(_.WearableCategory.UPPER_BODY)?[_.BodyPartCategory.HANDS]:[],..."blockVrmExport"in b?{blockVrmExport:b.blockVrmExport}:{},..."outlineCompatible"in b?{outlineCompatible:b.outlineCompatible}:{}});const C={...e.contents,...await ws(g)},w={...e,name:i,description:o,rarity:m,data:b,contents:C,utility:r??void 0};s&&[ye.UNPUBLISHED,ye.UNDER_REVIEW].includes(s)&&(w.video=C[Te]),a(w,g),Y(w.urn)&&((E=this.analytics)==null||E.track("Edit Item",{contents:g})),this.setState({isDirty:!1}),this.handleOnResetItem()}});h(this,"handleOnResetItem",()=>{const{selectedItem:e}=this.props;e&&this.setItem(e)});h(this,"handleOpenThumbnailDialog",()=>{const{selectedItem:e,onOpenModal:s}=this.props;(e==null?void 0:e.type)===y.EMOTE?s("EditThumbnailModal",{onSaveThumbnail:this.handleEmoteThumbnailChange,item:e}):this.thumbnailInput.current&&this.thumbnailInput.current.click()});h(this,"handleEmoteThumbnailChange",e=>{const s=Ts(e);this.setState({thumbnail:e,contents:{[Pe]:s},isDirty:!0})});h(this,"handleThumbnailChange",async e=>{const{files:s}=e.target;if(s&&s.length>0){const a=s[0],i=await Ae(a),o=await Ae(a,1024,1024),r=URL.createObjectURL(i);this.setState({thumbnail:r,contents:{[Pe]:o},isDirty:!0})}});h(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;Ce(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&&Ne(s)?!1:a}isSkin(){const{data:e}=this.state;return(e==null?void 0:e.category)===_.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||!Ue(e.data,s.data)}asCategorySelect(e,s){return s.map(a=>({value:a,text:d(`${e}.category.${a}`)}))}asRaritySelect(e){return e.map(s=>({value:s,text:d(`wearable.rarity.${s}`)}))}asPlayModeSelect(e){return e.map(s=>({value:s,text:d(`emote.play_mode.${s}.text`),description:d(`emote.play_mode.${s}.description`)}))}renderOverrides(e){const s=this.canEditItemMetadata(e),a=this.state.data;if(!e||re(a))return null;const i=ys(e.contents,a.category),o=Ps(e.contents),r=a.hides.filter(g=>i.includes(g)),m=a.hides.filter(g=>o.includes(g));return t.jsxs(t.Fragment,{children:[t.jsx(Ie,{itemId:e.id,label:d("item_editor.right_panel.base_body"),info:d("item_editor.right_panel.base_body_info"),value:m,options:this.asCategorySelect(e.type,o),disabled:!s,onChange:g=>this.handleChangeHides(g,"bodypart")}),t.jsx(Ie,{itemId:e.id,label:d("item_editor.right_panel.wearables"),info:d("item_editor.right_panel.wearables_info"),value:r,options:this.asCategorySelect(e.type,r.some(g=>g===_.WearableCategory.BODY_SHAPE)?i:i.filter(g=>g!==_.WearableCategory.BODY_SHAPE)),disabled:!s,onChange:g=>this.handleChangeHides(g,"wearable")})]})}renderModelDetails(e){const{isDownloading:s}=this.props,{thumbnail:a}=this.state,i=this.canEditItemMetadata(e),o=s?t.jsx(c.Loader,{active:!0,size:"tiny",className:"donwload-item-loader"}):t.jsx(O,{name:"export",className:"download-item-button",onClick:this.handleDownloadItem});return t.jsxs("div",{className:"details",children:[i?t.jsxs(t.Fragment,{children:[t.jsx(O,{name:"edit",className:"edit-item-file",onClick:this.handleChangeItemFile}),o,t.jsxs("div",{className:"thumbnail-container",children:[t.jsx(ge,{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(O,{name:"camera",onClick:this.handleOpenThumbnailDialog})]})]})]}):t.jsxs(t.Fragment,{children:[o,t.jsx(ge,{item:e,src:a,hasBadge:!0,badgeSize:"small"})]}),t.jsx(As,{item:e})]})}renderVideoDetails(e){if(!Re(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(O,{name:"edit",className:"edit-item-file",onClick:a}),t.jsx(O,{name:"play",className:"play-video-button",onClick:a}),t.jsx(De,{item:e,src:this.state.video,showMetrics:!0,onClick:a})]}):t.jsxs(t.Fragment,{children:[Ns(e)&&t.jsx(O,{name:"play",className:"play-video-button",onClick:a}),t.jsx(De,{item:e,src:this.state.video,showMetrics:!0})]})})}renderPermissions(e){return t.jsx(Rs,{requiredPermissions:e.data.requiredPermissions})}render(){const{selectedItemId:e,address:s,isWearableUtilityEnabled:a,isConnected:i,error:o,isCampaignEnabled:r,isVrmOptOutEnabled:m,campaignName:g,campaignTag:p}=this.props,{name:I,description:S,utility:E,rarity:b,data:C,isDirty:w,hasItem:f}=this.state,D=_.Rarity.getRarities(),M=Ds();return t.jsx("div",{className:"RightPanel",children:i?t.jsx(Qs,{id:e,children:(u,W,F)=>{var $;const le=W&&Ne(W),A=this.canEditItemMetadata(u),q=u?Ce(u)?Ms(u.contents):Ls():[];return F?t.jsx(c.Loader,{size:"massive",active:!0}):f||!e?t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"header",children:[t.jsx("div",{className:"title",children:d("item_editor.right_panel.properties")}),u&&Qe(u,s)&&!u.isPublished&&!le?t.jsx(c.Dropdown,{trigger:t.jsx("div",{className:"actions"}),inline:!0,direction:"left",children:t.jsxs(c.Dropdown.Menu,{children:[pe(u)!==null?t.jsx(c.Dropdown.Item,{text:d("item_detail_page.add_representation",{bodyShape:d(`body_shapes.${pe(u)}`).toLowerCase()}),onClick:this.handleAddRepresentationToItem}):null,t.jsx(Xe,{name:I,onDelete:this.handleDeleteItem,trigger:t.jsx(c.Dropdown.Item,{text:d("global.delete")})})]})}):null]}),t.jsxs("div",{className:"container",children:[t.jsx(N,{label:d("item_editor.right_panel.details"),children:u?t.jsxs(t.Fragment,{children:[this.renderModelDetails(u),this.renderVideoDetails(u)]}):null}),t.jsx(N,{label:d("item_editor.right_panel.basics"),children:u?t.jsxs(t.Fragment,{children:[t.jsx(Fa,{label:d("global.name"),value:I,disabled:!A,maxLength:Os,onChange:this.handleChangeName}),t.jsx(c.TextAreaField,{maxLength:ks,onChange:this.handleChangeDescription,label:d("global.description"),placeholder:d("item_editor.right_panel.description_placeholder"),disabled:!A,value:S,rows:"2",cols:"12"}),a?t.jsx(c.TextAreaField,{maxLength:Bs,onChange:this.handleChangeUtility,label:d("global.utility"),placeholder:d("item_editor.right_panel.utility_placeholder"),disabled:!A,value:E,tooltip:{content:d("item_editor.right_panel.utility_tooltip")},rows:"2",cols:"12"}):null,t.jsx(ie,{itemId:u.id,label:d("global.category"),value:C.category,options:this.asCategorySelect(u.type,q),disabled:!A,onChange:this.handleChangeCategory}),!(u.urn&&Y(u.urn))&&t.jsx(ie,{itemId:u.id,label:d("global.rarity"),value:b,options:this.asRaritySelect(D),disabled:u.isPublished||!A,onChange:this.handleChangeRarity})]}):null}),(u==null?void 0:u.type)===y.WEARABLE&&t.jsx(N,{label:t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"overrides-label-panel",children:d("item_editor.right_panel.overrides")}),t.jsx(ne,{content:d("item_editor.right_panel.overrides_info"),className:"info"})]}),children:this.renderOverrides(u)}),(u==null?void 0:u.type)===y.EMOTE&&t.jsx(N,{label:d("item_editor.right_panel.animation"),children:u?t.jsx(ie,{itemId:u.id,label:d("create_single_item_modal.play_mode_label"),value:C.loop?de.LOOP:de.SIMPLE,options:this.asPlayModeSelect(M),disabled:!A,onChange:this.handlePlayModeChange}):null}),u&&Re(u)&&(($=u.data.requiredPermissions)!=null&&$.length)?t.jsx(N,{label:d("item_editor.right_panel.required_permissions"),children:this.renderPermissions(u)}):null,t.jsx(N,{label:d("item_editor.right_panel.tags"),children:u?t.jsxs(t.Fragment,{children:[t.jsx(tt,{itemId:u.id,value:C.tags,onChange:this.handleChangeTags,isDisabled:!A}),r&&g&&p&&A&&t.jsx("p",{className:"event-tag",children:d("item_editor.right_panel.event_tag",{event_tag:t.jsx("span",{children:p}),event_name:t.jsx("span",{children:g})})})]}):null}),(u==null?void 0:u.type)===y.WEARABLE&&m&&t.jsx(N,{label:t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"overrides-label-panel",children:d("item_editor.right_panel.copyright.title")}),t.jsx(ne,{content:d("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:d("item_editor.right_panel.copyright.vrm_export")}),t.jsx(c.Checkbox,{toggle:!0,label:C!=null&&C.blockVrmExport?d("item_editor.right_panel.copyright.disabled"):d("item_editor.right_panel.copyright.enabled"),checked:!(C!=null&&C.blockVrmExport),onChange:this.handleAllowVrmExport,"aria-label":d("item_editor.right_panel.copyright.vrm_export")})]})})}),(u==null?void 0:u.type)===y.WEARABLE&&t.jsx(N,{label:t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"overrides-label-panel",children:d("item_editor.right_panel.outline_compatible.title")}),t.jsx(ne,{content:d("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:d("item_editor.right_panel.outline_compatible.title")}),t.jsx(c.Checkbox,{toggle:!0,label:(C==null?void 0:C.outlineCompatible)!==!1?d("item_editor.right_panel.copyright.enabled"):d("item_editor.right_panel.copyright.disabled"),checked:(C==null?void 0:C.outlineCompatible)!==!1,onChange:this.handleAllowOutlineCompatible,"aria-label":d("item_editor.right_panel.outline_compatible.title")})]})})}),w?t.jsxs("div",{className:"edit-buttons",children:[t.jsx(c.Button,{secondary:!0,onClick:this.handleOnResetItem,children:d("global.cancel")}),t.jsx(Me,{primary:!0,onClick:this.handleOnSaveItem,network:_.Network.MATIC,children:d("global.save")})]}):o&&e?t.jsxs("p",{className:"danger-text",children:[d("global.error_ocurred"),": ",o]}):null]})]}):null}}):null})}};const Va=n=>{var r;const l=Ee(n)||"",e=je(n,l),s=te(n)||"",a=l&&e&&e.collectionId?Le(n,e.collectionId):null,i=Ws(n),o=l?i[l]:null;return{address:s,collection:a,selectedItem:e,selectedItemId:l,canEditSelectedItem:e?a?Fe(n,s,a):Qe(e,s):!1,itemStatus:o,error:Fs(n),isConnected:be(n),isDownloading:Hs(n),isCommitteeMember:Oe(n),isCampaignEnabled:Vs(n),campaignTag:Gs(n),campaignName:(r=Zs(n))==null?void 0:r[Ks(n)],isVrmOptOutEnabled:$s(n),isWearableUtilityEnabled:Us(n)}},$a=n=>({onSaveItem:(l,e)=>n(zs(l,e)),onDeleteItem:l=>n(Ve(l)),onOpenModal:(l,e)=>n(He(l,e)),onDownload:l=>n(Ys(l))}),Ua=B(Va,$a)(Ha);class nn extends x.PureComponent{constructor(){super(...arguments);h(this,"state",{reviewedItems:[]});h(this,"handleOnSetReviewedItems",e=>{this.setState(s=>({reviewedItems:[...s.reviewedItems,...e.filter(a=>!s.reviewedItems.some(i=>i.id===a.id))]}))});h(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(ma,{reviewedItems:e}),t.jsxs("div",{className:"content",children:[t.jsx(Da,{reviewedItems:e,onResetReviewedItems:this.handleResetReviewedItems,onSetReviewedItems:this.handleOnSetReviewedItems}),t.jsx(Wa,{}),t.jsx(Ua,{})]})]})})}}export{nn as default};
1
+ var rt=Object.defineProperty;var dt=(n,l,e)=>l in n?rt(n,l,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[l]=e;var h=(n,l,e)=>dt(n,typeof l!="symbol"?l+"":l,e);import{af as J,H as t,M as c,G as d,bm as H,bC as ct,D as x,gs as K,L as ee,K as R,ce as Me,b8 as _,N as B,bw as V,eC as ht,gt as mt,gu as gt,gv as pt,gw as ut,gx as Ct,gy as It,gz as bt,gA as xt,gB as _t,gC as L,eq as vt,gD as Z,gE as Et,gF as Q,fb as Le,fq as jt,fW as St,fX as ft,ez as he,gl as wt,aH as te,gG as Tt,da as be,gH as xe,bt as Oe,gI as yt,fY as Pt,eD as me,aW as At,gJ as Nt,gK as Rt,gL as Dt,fn as Mt,f_ as Lt,f$ as Ot,Z as ke,bv as Be,gM as kt,eR as fe,bD as Bt,fj as We,ae as Wt,gN as Fe,eG as _e,X as He,et as Ft,eo as Ve,fE as X,dC as ge,ep as Ht,eU as pe,gO as $e,bk as ve,fU as Ue,eX as y,er as Y,fz as ze,fA as ue,J as O,f5 as Ce,dB as Vt,eP as $t,eA as Ut,gP as Ee,fa as je,fi as zt,gQ as Yt,gR as Jt,gS as qt,gT as Ye,gU as Je,gV as qe,gW as Ge,fI as Ze,eJ as Gt,eI as Ke,eK as Zt,eM as Kt,eN as Qt,gX as Xt,gY as es,gZ as ts,g_ as se,g$ as oe,h0 as ss,ec as as,h1 as ns,h2 as is,h3 as ls,h4 as os,h5 as rs,h6 as ds,h7 as cs,h8 as hs,h9 as ms,ha as gs,hb as ps,hc as us,hd as Cs,he as Is,hf as bs,hg as xs,hh as _s,hi as vs,fZ as Es,bN as ne,hj as js,hk as we,hl as Ss,hm as fs,eT as Te,fF as re,hn as de,eS as ws,eO as ye,eV as Ts,eW as Pe,eY as Ae,eZ as Ne,ho as ys,hp as Ps,e_ as As,e$ as Re,f0 as De,hq as Ns,f8 as Rs,hr as Ds,hs as Ms,ht as Ls,hu as Qe,hv as Os,hw as ks,hx as Bs,fc as Ws,hy as Fs,hz as Hs,eF as Vs,hA as $s,fd as Us,ff as zs,hB as Ys}from"./index-DTzHduGV.js";import{J as Js}from"./JumpIn.container-gjuKK_p6.js";import{C as qs}from"./CollectionProvider.container-DWsnvf6f.js";import{C as Xe}from"./ConfirmDelete-DQ4u3hXh.js";import{C as et}from"./CollectionStatus.container-DttnapNH.js";import{d as Gs,e as Zs,c as Ks}from"./selectors-B5a-ETQ1.js";import{I as Qs}from"./ItemProvider.container-Bf_RIv-R.js";const Xs=({open:n,assignee:l,onConfirm:e,onClose:s})=>t.jsxs(c.Modal,{size:"tiny",className:"ConfirmApprovalModal",open:n,children:[t.jsx(c.Modal.Header,{children:d("curation_page.confirm_not_assigned_curation_modal.title")}),t.jsxs(c.Modal.Content,{children:[t.jsx("div",{className:"message-container",children:t.jsx(H,{id:"curation_page.confirm_not_assigned_curation_modal.body",values:{assignee:t.jsx("strong",{children:t.jsx(ct,{textOnly:!0,address:l})})}})}),t.jsx("span",{children:t.jsx(H,{id:"curation_page.confirm_not_assigned_curation_modal.confirm_footer"})})]}),t.jsxs(c.Modal.Actions,{children:[t.jsx(c.Button,{onClick:s,children:d("global.cancel")}),t.jsx(c.Button,{primary:!0,onClick:e,children:d("curation_page.confirm_not_assigned_curation_modal.confirm_button")})]})]}),ea=J.memo(Xs);var T=(n=>(n.REJECT_COLLECTION="REJECT_COLLECTION",n.REJECT_CURATION="REJECT_CURATION",n.DISABLE_COLLECTION="DISABLE_COLLECTION",n.DISABLE_THIRD_PARTY="DISABLE_THIRD_PARTY",n))(T||{});const k="item_editor.top_panel.rejection_modal",ta=({open:n,type:l,isLoading:e,thirdParty:s,hasPendingTransaction:a,onDisableThirdParty:i,collection:o,curation:r,onReject:m,onRejectCuration:g,onClose:p})=>{const I=x.useMemo(()=>{switch(l){case T.DISABLE_COLLECTION:return k+".disable_collection";case T.REJECT_CURATION:return k+".reject_curation";case T.DISABLE_THIRD_PARTY:return k+".disable_third_party";default:return""}},[l]),S=()=>{switch(l){case T.DISABLE_COLLECTION:m(o);break;case T.REJECT_CURATION:g(r.collectionId);break;case T.DISABLE_THIRD_PARTY:s&&i(s.id);break}},E=l===T.DISABLE_COLLECTION&&!o.isApproved||l===T.DISABLE_THIRD_PARTY&&!(s!=null&&s.isApproved)||l===T.REJECT_COLLECTION&&!o.isApproved||l===T.REJECT_CURATION&&(r==null?void 0:r.status)===K.REJECTED;return t.jsx(c.Modal,{size:"tiny",className:"RejectionModal",open:n,children:a?t.jsx(sa,{i18nKey:I}):E?t.jsx(aa,{link:o.forumLink,onClose:p}):t.jsx(na,{i18nKey:I,isLoading:e,onClose:p,onConfirm:S})})},sa=({i18nKey:n})=>t.jsxs(t.Fragment,{children:[t.jsx(c.Modal.Header,{children:d(`${n}.title`)}),t.jsxs("div",{className:"loading-transaction",children:[t.jsx("div",{className:"danger-text",children:d(`${n}.tx_pending`)}),t.jsx("small",{className:"danger-text",children:t.jsx(H,{id:k+".visit_activity",values:{activity_link:t.jsx(ee,{to:R.activity(),children:d("global.activity")})}})}),t.jsx(c.Loader,{active:!0,size:"large"})]})]}),aa=({link:n,onClose:l})=>t.jsxs(t.Fragment,{children:[t.jsx(c.Modal.Header,{children:d(k+".veredict_explanation")}),t.jsx(c.Modal.Content,{children:d(k+".go_to_forum")}),t.jsxs(c.Modal.Actions,{children:[t.jsx("a",{href:n,className:"forum-link",target:"_blank",rel:"noopener noreferrer",children:t.jsxs(c.Button,{secondary:!0,icon:!0,labelPosition:"right",children:[t.jsx("div",{children:d(k+".forum_link")}),t.jsx("div",{className:"discussion",children:d(k+".discussion")}),t.jsx(c.Icon,{name:"chevron right"})]})}),t.jsx(c.Button,{basic:!0,onClick:l,children:d("global.done")})]})]}),na=({i18nKey:n,isLoading:l,onConfirm:e,onClose:s})=>t.jsxs(t.Fragment,{children:[t.jsx(c.Modal.Header,{children:d(`${n}.title`)}),t.jsx(c.Modal.Content,{children:d(`${n}.subtitle`)}),t.jsxs(c.Modal.Actions,{children:[t.jsx(Me,{primary:!0,onClick:e,disabled:l,loading:l,network:_.Network.MATIC,children:d(`${n}.action`)}),t.jsx(c.Button,{disabled:l,onClick:s,children:d("global.cancel")})]})]}),ia=J.memo(ta),la=(n,l)=>({isLoading:V(ht(n),xt)||V(mt(n),_t)||gt(n),hasPendingTransaction:pt(n)||!!(l.thirdParty&&ut(n,l.thirdParty.id))}),oa=n=>({onReject:l=>n(Ct(l)),onRejectCuration:l=>n(It(l)),onDisableThirdParty:l=>n(bt(l))}),ra=B(la,oa)(ia);var j=(n=>(n[n.APPROVE=0]="APPROVE",n[n.REJECT=1]="REJECT",n[n.ENABLE=2]="ENABLE",n[n.DISABLE=3]="DISABLE",n))(j||{});let da=class extends J.PureComponent{constructor(){super(...arguments);h(this,"state",{currentVeredict:void 0,showRejectionModal:null,showApproveConfirmModal:!1});h(this,"handleBack",()=>{this.props.onNavigate(R.curation())});h(this,"handleConfirmApprovalModal",(e,s)=>{const{address:a,onInitiateApprovalFlow:i,onInitiateTPApprovalFlow:o,onSetAssignee:r}=this.props;this.setState({showApproveConfirmModal:!1}),a&&r(e.id,a,s),L(e)?o(e):i(e)});h(this,"setShowRejectionModal",e=>this.setState({showRejectionModal:e}));h(this,"renderPage",e=>{const{items:s,itemCurations:a,curation:i,totalItems:o,thirdParty:r}=this.props,{showRejectionModal:m,showApproveConfirmModal:g}=this.state,{chainId:p}=this.props,I=vt(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," · ",d(`collection.type.${I}`),t.jsx(Js,{size:"small",active:!0,collection:e,chainId:p,items:L(e)?s:void 0,text:d("global.see_in_decentraland")})]}),t.jsx("div",{className:"actions",children:t.jsx("span",{className:"button-container",children:L(e)&&o!==void 0?this.renderTPButtons(e,i,a):this.renderButtons(e,i)})}),m&&t.jsx(ra,{type:m,open:!0,collection:e,curation:i,thirdParty:r,onClose:()=>this.setShowRejectionModal(null)}),(i==null?void 0:i.assignee)&&g&&t.jsx(ea,{open:!0,assignee:i.assignee,onConfirm:()=>this.handleConfirmApprovalModal(e,i),onClose:()=>this.setState({showApproveConfirmModal:!1})})]})});h(this,"renderButton",(e,s,a)=>{const{address:i,thirdParty:o,onInitiateApprovalFlow:r,onInitiateTPApprovalFlow:m,reviewedItems:g,totalItems:p}=this.props,I={[j.APPROVE]:()=>a!=null&&a.assignee&&i!==(a==null?void 0:a.assignee)?this.setState({showApproveConfirmModal:!0}):L(s)?m(s):r(s),[j.ENABLE]:()=>r(s),[j.DISABLE]:()=>this.setShowRejectionModal(o?T.DISABLE_THIRD_PARTY:T.DISABLE_COLLECTION),[j.REJECT]:()=>{(a==null?void 0:a.status)===K.PENDING?this.setShowRejectionModal(T.REJECT_CURATION):this.setShowRejectionModal(T.REJECT_COLLECTION)}},S={[j.APPROVE]:"approve",[j.ENABLE]:"enable",[j.DISABLE]:"disable",[j.REJECT]:"reject"},E=e===j.APPROVE||e===j.ENABLE,b=!L(s)||!!p&&g.length>=Z(p);return t.jsx(c.Popup,{content:d("item_editor.top_panel.items_pending_to_review"),disabled:b,position:"bottom center",trigger:t.jsx("div",{children:t.jsx(c.Button,{primary:E,onClick:()=>I[e](),disabled:L(s)&&e===j.APPROVE&&!!p&&g.length<Z(p),children:d(`item_editor.top_panel.${S[e]}`)})}),hideOnScroll:!0,on:"hover",inverted:!0,flowing:!0})});h(this,"renderTPButtons",(e,s,a)=>{const{reviewedItems:i,totalItems:o,thirdParty:r}=this.props,m=a==null?void 0:a.some(g=>g.status===K.PENDING);return t.jsxs(t.Fragment,{children:[t.jsxs(c.Header,{sub:!0,children:[m?d("item_editor.top_panel.reviewed_counter",{count:i.length,threshold:Z(o)}):d("item_editor.top_panel.not_enough_items_to_curate_more"),i.length>=Z(o)?t.jsx(c.Icon,{name:"check circle"}):null]}),m&&this.renderButton(j.APPROVE,e,s),m&&this.renderButton(j.REJECT,e,s),!m&&(r==null?void 0:r.isApproved)&&this.renderButton(j.DISABLE,e,null)]})});h(this,"renderButtons",(e,s)=>{if(s&&e.isApproved)switch(s.status){case"pending":return t.jsxs(t.Fragment,{children:[this.renderButton(j.APPROVE,e,s),this.renderButton(j.REJECT,e,s)]});case"approved":case"rejected":return this.renderButton(j.DISABLE,e,s)}return Et(e)?e.isApproved?this.renderButton(j.DISABLE,e,s):this.renderButton(j.ENABLE,e,s):t.jsxs(t.Fragment,{children:[this.renderButton(j.APPROVE,e,s),this.renderButton(j.REJECT,e,s)]})})}render(){const{collection:e,items:s,isCommitteeMember:a,isReviewing:i,isConnected:o,isLoading:r}=this.props,m=!e||r&&!s.length;return a&&i&&o?t.jsx("div",{className:"TopPanel",children:m?t.jsx(c.Loader,{size:"small",active:!0}):this.renderPage(e)}):null}};const ca=n=>{const l=Q(n),e=l?Le(n,l):null,s=e?jt(n,e.id):[],a=e?St(n,e.id):[],i=l?ft(n,l):null,o=l?he(n,l):void 0,r=e&&L(e)?wt(n,e):null;return{address:te(n),items:s,totalItems:(o==null?void 0:o.total)||null,collection:e,itemCurations:a,thirdParty:r,curation:i,chainId:Tt(n),isConnected:be(n),isReviewing:xe(n),isCommitteeMember:Oe(n),selectedCollectionId:Q(n),isLoading:V(yt(n),Mt)||V(Pt(n),Lt)||V(me(n),Ot)}},ha=n=>({onNavigate:l=>n(At(l)),onSetAssignee:(l,e,s)=>n(Nt(l,e,s)),onInitiateTPApprovalFlow:l=>n(Rt(l)),onInitiateApprovalFlow:l=>n(Dt(l))}),ma=B(ca,ha)(da),ga="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",pa=n=>{const{collectionId:l,itemName:e}=n,[s,a]=x.useState(!1),[i,o]=x.useState(null),r=ke(),m=Be();x.useEffect(()=>{e&&(a(!0),o(e))},[e]);function g(){a(!1);const p=new URLSearchParams(m.search);p.delete("newItem"),r.replace({search:p.toString()})}return s&&i&&l?t.jsx(c.Toast,{type:c.ToastType.INFO,title:d("sagas.item.item_added_toast.title"),closable:!0,icon:t.jsx("div",{className:"ItemAddedToast icon-container",children:t.jsx("img",{src:ga,alt:d("sagas.item.item_added_toast.title")})}),onClose:g,body:t.jsx(H,{id:"sagas.item.item_added_toast.body",values:{name:i,br:()=>t.jsx("br",{}),b:p=>t.jsx("strong",{children:p}),"collection-link":p=>t.jsx(ee,{to:R.collectionDetail(l),children:t.jsx(c.Button,{className:"ItemAddedToast view-collection-link",basic:!0,children:p})})}})}):null},ua=J.memo(pa),Ca=n=>({itemName:kt(n)}),Ia=B(Ca)(ua),ba=({collection:n,address:l,hasUserOrphanItems:e,isLoggedIn:s,isReviewing:a,onOpenModal:i,onDeleteCollection:o})=>{var u,W;const r=Be(),m=ke(),g=((u=r.state)==null?void 0:u.fromParam)===fe.COLLECTIONS,p=((W=r.state)==null?void 0:W.fromParam)===fe.TP_COLLECTIONS,I=x.useCallback(()=>{m.push(R.collections())},[m]),S=x.useCallback(()=>{if(n&&(g||p)){const F=g?R.collectionDetail:R.thirdPartyCollectionDetail;m.push(F(n.id))}else m.push(R.itemEditor())},[g,p,m,n]),E=x.useCallback(()=>{i("CreateCollectionModal")},[i]),b=x.useCallback(()=>{n&&i("CreateSingleItemModal",{collectionId:n.id})},[n,i]),C=x.useCallback(()=>{n&&i("AddExistingItemModal",{collectionId:n.id})},[n,i]),w=x.useCallback(()=>{n&&i("EditCollectionNameModal",{collection:n})},[n,i]),f=x.useCallback(()=>{n&&o(n)},[n,o]),D=x.useCallback(()=>{const F=n&&Bt(n.owner,l||"");return n?t.jsxs(t.Fragment,{children:[t.jsx("div",{className:`block ${g||p?"close":"back"}`,onClick:S}),t.jsxs("div",{className:"title",children:[t.jsx(ee,{to:R.collectionDetail(n.id),children:n.name}),t.jsx(et,{collection:n})]}),F&&!n.isPublished?t.jsx(c.Dropdown,{trigger:t.jsx("div",{className:"block actions"}),inline:!0,direction:"left",children:t.jsxs(c.Dropdown.Menu,{children:[t.jsx(c.Dropdown.Item,{onClick:w,children:d("item_editor.left_panel.actions.edit_name")}),t.jsx(c.Dropdown.Item,{onClick:b,children:d("item_editor.left_panel.actions.new_item")}),e&&t.jsx(c.Dropdown.Item,{onClick:C,children:d("item_editor.left_panel.actions.add_existing_item")}),t.jsx(Xe,{name:n.name,onDelete:f,trigger:t.jsx(c.Dropdown.Item,{text:d("global.delete")})})]})}):null]}):null},[n,l,e,g,p]),M=x.useCallback(()=>t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"block close",onClick:I}),t.jsx("div",{className:"title",children:e?d("item_editor.left_panel.title"):d("item_editor.left_panel.title_alternative")}),s?t.jsx(c.Dropdown,{trigger:t.jsx("div",{className:"block add"}),inline:!0,direction:"left",children:t.jsx(c.Dropdown.Menu,{children:t.jsx(c.Dropdown.Item,{onClick:E,children:d("item_editor.left_panel.actions.new_collection")})})}):t.jsx("div",{className:"block"})]}),[e,s]);return a?null:t.jsx(c.Row,{grow:!1,shrink:!1,className:"Header",children:n?D():M()})},xa=ba,_a=n=>{let l;const e=Q(n);e&&(l=We(n).find(i=>i.id===e));const s=te(n);return{address:s,isLoggedIn:Wt(n),isReviewing:xe(n),collection:l,hasEditRights:l!==void 0&&s!==void 0&&Fe(n,s,l),hasUserOrphanItems:_e(n)}},va=n=>({onOpenModal:(l,e)=>n(He(l,e)),onDeleteCollection:l=>n(Ft(l)),onDeleteItem:l=>n(Ve(l))}),Ea=B(_a,va)(xa),P=10;class N extends x.PureComponent{constructor(){super(...arguments);h(this,"state",{isCollapsed:!1});h(this,"handleToggle",()=>{this.setState({isCollapsed:!this.state.isCollapsed})})}render(){const{label:e,children:s}=this.props,{isCollapsed:a}=this.state,i=!a;return t.jsxs("div",{className:`Collapsable ${i?"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:i?s:null})]})}}class ja extends x.PureComponent{constructor(){super(...arguments);h(this,"handleClick",()=>{const{item:e,onClick:s}=this.props;s(e)})}renderToggleItem(){const{item:e,isVisible:s,isPlayingEmote:a}=this.props;return X(e)?t.jsx(c.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:i}=this.props;return t.jsx("div",{className:`SidebarItem ${s?"is-selected":""}`,children:t.jsxs(ee,{to:R.itemEditor({itemId:e.id,collectionId:a||void 0,newItem:void 0}),children:[t.jsx(ge,{item:e}),t.jsxs("div",{className:"name",children:[t.jsx(Ht,{item:e}),e.name]}),t.jsx(c.Popup,{content:d("item_editor.left_panel.invalid_representation_tooltip",{bodyShape:t.jsx("b",{children:d(`body_shapes.${pe(e)}`).toLowerCase()})}),disabled:$e(e,i),position:"top center",trigger:this.renderToggleItem()})]})})}}const Sa=ja;var v=(n=>(n.TO_REVIEW="to-review",n.REVIEWED="reviewed",n.ALL_ITEMS="all-items",n))(v||{});const fa={[v.TO_REVIEW]:1,[v.REVIEWED]:1,[v.ALL_ITEMS]:1};class wa extends x.PureComponent{constructor(){super(...arguments);h(this,"state",{currentTab:v.TO_REVIEW,currentPages:fa,reviewedTabPage:1,showGetMoreSamplesModal:!1,showAllItemsTabChangeModal:!1});h(this,"analytics",ve());h(this,"handleReviewItemsTrigger",e=>{const{items:s,onReviewItems:a}=this.props,{currentTab:i}=this.state;this.getIsReviewingTPItems()&&i===v.TO_REVIEW&&!Ue(s,e==null?void 0:e.items)&&a()});h(this,"isVisible",e=>{const{visibleItems:s}=this.props;return s.some(a=>a.id===e.id)});h(this,"handleClick",e=>{var g;const{bodyShape:s,visibleItems:a,wearableController:i,isPlayingEmote:o,onSetItems:r}=this.props;if(!$e(e,s))return;let m=a.filter(p=>p.id!==e.id);if(X(e))if(this.isVisible(e)){o?i==null||i.emote.pause():i==null||i.emote.play();return}else m=m.filter(p=>p.type!==y.EMOTE);this.isVisible(e)||(m.push(e),(g=this.analytics)==null||g.track("Preview Item",{ITEM_ID:e!=null&&e.urn?Y(e.urn)?ze(e.urn):ue(e.urn):null,ITEM_TYPE:e.type,ITEM_NAME:e.name,ITEM_IS_THIRD_PARTY:Y(e.urn)})),r(m)});h(this,"handleTabChange",e=>{const{onLoadPage:s,onReviewItems:a,onResetReviewedItems:i}=this.props,{currentPages:o}=this.state;e===v.ALL_ITEMS?this.setState({showAllItemsTabChangeModal:!1},()=>{i(),s(o[v.ALL_ITEMS])}):e===v.TO_REVIEW&&a(),this.setState({currentTab:e})});h(this,"handleGetRandomSampleClick",()=>{const{showSamplesModalAgain:e,onLoadRandomPage:s}=this.props;e?this.setState({showGetMoreSamplesModal:!0}):s()});h(this,"handleModalProceed",()=>{const{onLoadRandomPage:e}=this.props;e(),this.setState({showGetMoreSamplesModal:!1})});h(this,"handlePageChange",(e,s)=>{const{currentTab:a}=this.state,{onLoadPage:i}=this.props;this.setState(o=>({currentPages:{...o.currentPages,[a]:+s.activePage}})),a!==v.REVIEWED&&i(+s.activePage)});h(this,"handleSwitchToAllItemsTab",()=>{const{reviewedItems:e}=this.props;e.length>0?this.setState({showAllItemsTabChangeModal:!0}):this.handleTabChange(v.ALL_ITEMS)});h(this,"getIsReviewingTPItems",()=>{const{collection:e,isReviewing:s}=this.props;return e?Y(e.urn)&&s:!1});h(this,"renderSidebarItem",e=>{const{collection:s,selectedItemId:a,bodyShape:i,isPlayingEmote:o}=this.props;return t.jsx(Sa,{item:e,isSelected:a===e.id,isVisible:this.isVisible(e),isPlayingEmote:o,selectedCollectionId:(s==null?void 0:s.id)??null,bodyShape:i,onClick:this.handleClick},e.id)});h(this,"renderSidebarCategory",e=>{const s=e.filter(Ce),a=e.filter(X);return e.length===0?t.jsx("div",{className:"empty",children:t.jsx("div",{className:"subtitle",children:d("item_editor.left_panel.empty_collection")})}):s.length===0||a.length===0?e.map(this.renderSidebarItem):t.jsxs(t.Fragment,{children:[t.jsx(N,{label:this.renderCollapsableLabel(y.WEARABLE),children:s.map(this.renderSidebarItem)}),t.jsx(N,{label:this.renderCollapsableLabel(y.EMOTE),children:a.map(this.renderSidebarItem)})]})});h(this,"renderTabPagination",e=>{const{currentTab:s,currentPages:a}=this.state,i=a[s],o=Math.ceil(e/P);return o>1?t.jsx(c.Pagination,{siblingRange:0,firstItem:null,lastItem:null,totalPages:o,activePage:i,onPageChange:this.handlePageChange}):null});h(this,"renderPaginationStats",e=>{const{currentPages:s,currentTab:a}=this.state,i=s[a],o=(i-1)*P,r=i*P;return t.jsx(c.Header,{sub:!0,children:d("item_editor.left_panel.reviewed_tab.page_counter",{pageStart:o,pageEnd:r>e?e:r,total:e})})});h(this,"renderTabContent",()=>{const{items:e,isLoading:s,totalItems:a,reviewedItems:i}=this.props,{currentTab:o,currentPages:r}=this.state,m=this.getIsReviewingTPItems(),g=r[o];if(s)return t.jsx(c.Loader,{size:"large",active:!0});switch(o){case v.TO_REVIEW:return t.jsxs(t.Fragment,{children:[this.renderSidebarCategory(e),!m&&a?this.renderTabPagination(a):null]});case v.REVIEWED:{const p=i.slice((g-1)*P,g*P);return t.jsxs(t.Fragment,{children:[i.length?this.renderPaginationStats(i.length):null,this.renderSidebarCategory(p),i.length?this.renderTabPagination(i.length):null]})}case v.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}});h(this,"renderTabHeader",()=>{const{isLoading:e,totalItems:s,reviewedItems:a}=this.props,{currentTab:i}=this.state;let o;const r=!s||s<P||a.length===s;switch(i){case v.TO_REVIEW:o=t.jsx(c.Popup,{content:d("item_editor.top_panel.not_enough_items_to_curate_more"),disabled:!r,position:"bottom center",trigger:t.jsx("div",{children:t.jsxs(c.Button,{disabled:e||r,primary:!0,className:"random-sample-button",onClick:this.handleGetRandomSampleClick,children:[t.jsx(c.Icon,{name:"random"}),d("item_editor.left_panel.get_random_sample")]})}),hideOnScroll:!0,on:"hover",inverted:!0,flowing:!0});break;case v.REVIEWED:o=t.jsx(H,{id:"item_editor.left_panel.reviewed_samples",values:{reviewed_samples_bold:t.jsx("b",{children:d("item_editor.left_panel.reviewed_samples_bold",{count:a.length})}),total:Z(s??1)}});break;default:return null}return t.jsxs("div",{className:"tab-header",children:[" ",o," "]})});h(this,"renderModal",()=>{const{onToggleShowSamplesModalAgain:e,showSamplesModalAgain:s}=this.props,{showGetMoreSamplesModal:a}=this.state;return t.jsxs(c.Modal,{open:a,size:"small",className:"ConfirmNewSampleModal",children:[t.jsx(c.Modal.Header,{children:d("item_editor.left_panel.get_more_samples_modal.title")}),t.jsxs(c.Modal.Content,{children:[t.jsx(H,{id:"item_editor.left_panel.get_more_samples_modal.content",values:{count:10,tabName:t.jsx("b",{children:v.REVIEWED})}}),t.jsxs("div",{className:"checkbox-container",onClick:e,children:[t.jsx(c.Checkbox,{checked:!s}),d("item_editor.left_panel.get_more_samples_modal.dont_show_again")]})]}),t.jsxs(c.Modal.Actions,{children:[t.jsx(c.Button,{onClick:()=>this.setState({showGetMoreSamplesModal:!1}),children:d("global.cancel")}),t.jsx(c.Button,{primary:!0,onClick:this.handleModalProceed,children:d("item_editor.left_panel.get_more_samples_modal.understood")})]})]})});h(this,"renderAllItemsTabChangeModal",()=>{const{showAllItemsTabChangeModal:e}=this.state;return t.jsxs(c.Modal,{open:e,size:"small",className:"ConfirmNewSampleModal",children:[t.jsx(c.Modal.Header,{children:d("item_editor.left_panel.all_items_check.title")}),t.jsx(c.Modal.Content,{children:d("item_editor.left_panel.all_items_check.content")}),t.jsxs(c.Modal.Actions,{children:[t.jsx(c.Button,{onClick:()=>this.setState({showAllItemsTabChangeModal:!1}),children:d("global.cancel")}),t.jsx(c.Button,{primary:!0,onClick:()=>this.handleTabChange(v.ALL_ITEMS),children:d("item_editor.left_panel.get_more_samples_modal.understood")})]})]})});h(this,"renderTabs",()=>{const{currentTab:e}=this.state;return t.jsxs(c.Tabs,{isFullscreen:!0,children:[t.jsx(c.Tabs.Tab,{active:e===v.TO_REVIEW,onClick:()=>this.handleTabChange(v.TO_REVIEW),children:d("item_editor.left_panel.to_review")}),t.jsx(c.Tabs.Tab,{active:e===v.REVIEWED,onClick:()=>this.handleTabChange(v.REVIEWED),children:d("item_editor.left_panel.reviewed")}),t.jsx(c.Tabs.Tab,{active:e===v.ALL_ITEMS,onClick:this.handleSwitchToAllItemsTab,children:d("item_editor.left_panel.all_items")})]})})}componentDidMount(){this.handleReviewItemsTrigger()}componentDidUpdate(e){this.handleReviewItemsTrigger(e)}renderCollapsableLabel(e){return t.jsxs(t.Fragment,{children:[t.jsx(O,{name:e}),t.jsx(H,{id:`item_editor.left_panel.${e}`})]})}render(){return t.jsxs(c.Section,{className:"Items",children:[this.getIsReviewingTPItems()?t.jsxs(t.Fragment,{children:[this.renderTabs(),this.renderTabHeader()]}):null,this.renderTabContent(),this.renderModal(),this.renderAllItemsTabChangeModal()]})}}class Ta extends x.PureComponent{render(){const{collection:l,isSelected:e}=this.props;return t.jsx("div",{className:`SidebarCollection ${e?"is-selected":""}`,children:t.jsxs(ee,{to:R.itemEditor({collectionId:l.id}),children:[t.jsx(Vt,{collectionId:l.id}),t.jsxs("div",{className:"wrapper",children:[t.jsxs("div",{className:"name",children:[t.jsx(et,{collection:l}),l.name]}),t.jsx("div",{className:"count",children:d("item_editor.left_panel.items_count",{count:l.itemCount})})]})]})})}}const ya=Ta;class Pa extends x.PureComponent{constructor(){super(...arguments);h(this,"state",{currentPage:1});h(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:i,totalCollections:o}=this.props,{currentPage:r}=this.state;if(e.length===0)return null;const m=Math.ceil(o/P);return s?t.jsx(c.Loader,{size:"small",active:!0}):!s&&a.length===0&&e.length===0?t.jsx("div",{className:"empty",children:t.jsx("div",{className:"subtitle",children:d("collections_page.empty_description")})}):t.jsx(t.Fragment,{children:t.jsxs(c.Section,{className:"Collections",children:[e.map(g=>t.jsx(ya,{collection:g,items:a,isSelected:g.id===i},g.id)),m>1?t.jsx(c.Pagination,{siblingRange:0,firstItem:null,lastItem:null,totalPages:m,activePage:r,onPageChange:this.handlePageChange}):null]})})}}var z=(n=>(n.COLLECTIONS="collections",n.ORPHAN_ITEMS="orphanItems",n))(z||{});const U=1;let Aa=class extends x.PureComponent{constructor(){super(...arguments);h(this,"state",this.getInitialState());h(this,"handleToggleShowSamplesModalAgain",()=>{this.setState(e=>({showSamplesModalAgain:!e.showSamplesModalAgain}))});h(this,"fetchResource",()=>{const{address:e,onFetchCollections:s,onFetchOrphanItems:a,isReviewing:i,selectedCollectionId:o}=this.props,{pages:r}=this.state;if(e&&!i&&!o){const m=r[r.length-1];(this.isCollectionTabActive()?s:a)(e,{limit:P,page:m})}});h(this,"loadPage",e=>{this.setState({pages:[e]},()=>this.fetchResource())});h(this,"getRandomPage",(e,s)=>Math.floor(Math.random()*(s-e+1)+e));h(this,"loadRandomPage",e=>{const{pages:s}=this.state,{totalItems:a,totalCollections:i,onSetReviewedItems:o}=this.props,r=this.isCollectionTabActive()?i:a,m=Math.ceil(r/P);if(m>s.length){const g=[...Array(m).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(I=>({pages:[...I.pages,p]}),this.fetchResource)}}o(e)});h(this,"handleTabChange",e=>{this.setState({currentTab:e,pages:[U]},this.fetchResource)});h(this,"isCollectionTabActive",()=>{const{selectedCollectionId:e}=this.props,{currentTab:s}=this.state;return s===z.COLLECTIONS&&!e})}getInitialState(){const{selectedCollectionId:e,selectedItemId:s}=this.props;let a=z.COLLECTIONS;return!e&&s&&(a=z.ORPHAN_ITEMS),{pages:[U],currentTab:a,initialPage:U,showSamplesModalAgain:!0}}componentDidMount(){const{address:e,hasUserOrphanItems:s,selectedItem:a,onFetchOrphanItem:i,onSetItems:o}=this.props;this.fetchResource(),e&&s===void 0&&i(e),a&&o([a])}componentDidUpdate(e,s){const{isConnected:a,address:i,selectedCollectionId:o,selectedItemId:r,selectedItem:m,orphanItems:g,totalItems:p,visibleItems:I,hasUserOrphanItems:S,onSetItems:E,onFetchOrphanItem:b}=this.props,{initialPage:C,pages:w}=this.state;if(!o&&i&&r&&p&&(C===U||s.initialPage<C)){if(!g.find(f=>f.id===r)){const f=Math.ceil(p/P),D=w[w.length-1],M=Math.min(f,D+1);w.includes(M)||this.setState({pages:[M],initialPage:M},this.fetchResource)}}else if(e.selectedItemId&&r&&e.selectedItemId!==r){const f=I.filter(D=>D.type!==y.EMOTE);E(f)}else i&&a&&(a!==e.isConnected||e.selectedCollectionId&&!o)&&this.setState({pages:[U]},this.fetchResource),e.selectedCollectionId!==o&&this.setState({pages:[U]}),i&&i!==e.address&&S===void 0&&b(i);!e.selectedItem&&m&&m.type!==y.EMOTE&&E([m]),e.selectedCollectionId!==o&&E([])}componentWillUnmount(){const{onSetItems:e}=this.props;e([])}getItems(e,s,a){const{selectedCollectionId:i,orphanItems:o,isReviewing:r}=this.props;return i&&e?$t(e)&&r?s.filter(m=>!!(a!=null&&a.find(g=>g.itemId===m.id&&g.status===K.PENDING))):s:o}render(){const{items:e,totalItems:s,totalCollections:a,collections:i,selectedItemId:o,selectedCollectionId:r,visibleItems:m,bodyShape:g,reviewedItems:p,isReviewing:I,isPlayingEmote:S,isConnected:E,wearableController:b,isLoading:C,hasUserOrphanItems:w,onSetItems:f,onSetReviewedItems:D,onResetReviewedItems:M}=this.props,{pages:u,showSamplesModalAgain:W}=this.state,F=!r&&w,le=this.isCollectionTabActive()&&!r,A=!this.isCollectionTabActive()||r;return t.jsx("div",{className:"LeftPanel",children:E?t.jsx(qs,{id:r,itemSelected:o,itemsPage:u,itemsPageSize:P,fetchCollectionItemsOptions:{status:I?K.PENDING:void 0},onChangePage:q=>this.setState({pages:[q]}),children:({paginatedCollections:q,collection:$,paginatedItems:st,initialPage:at,isLoadingCollection:nt,isLoadingCollectionItems:it,itemCurations:lt})=>{const G=this.getItems($,st,lt),Se=this.isCollectionTabActive(),ot=r&&$?at:this.state.initialPage;return t.jsxs(t.Fragment,{children:[t.jsx(Ea,{}),F?t.jsxs(c.Tabs,{isFullscreen:!0,children:[t.jsx(c.Tabs.Tab,{active:Se,onClick:()=>this.handleTabChange(z.COLLECTIONS),children:d("collections_page.collections")}),t.jsx(c.Tabs.Tab,{active:!Se,onClick:()=>this.handleTabChange(z.ORPHAN_ITEMS),children:d("item_editor.left_panel.items")})]}):null,le?t.jsx(Pa,{collections:q,totalCollections:a||i.length,items:e,hasHeader:G.length>0,selectedCollectionId:r,onLoadPage:this.loadPage,isLoading:nt}):null,A?t.jsxs(t.Fragment,{children:[t.jsx(wa,{items:G,totalItems:s||G.length,hasHeader:!r&&i.length>0,selectedItemId:o,collection:$,isReviewing:I,isPlayingEmote:S,visibleItems:m,bodyShape:g,onResetReviewedItems:M,reviewedItems:p,onSetItems:f,wearableController:b,initialPage:ot,isLoading:it||C,onToggleShowSamplesModalAgain:this.handleToggleShowSamplesModalAgain,showSamplesModalAgain:W,onReviewItems:()=>D(G),onLoadRandomPage:()=>this.loadRandomPage(G),onLoadPage:this.loadPage}),t.jsx(Ia,{collectionId:r})]}):null]})}}):null})}};const Na=n=>{const l=Q(n),e=te(n),s=l?he(n,l):e?he(n,e):void 0,a=l?void 0:Ut(n),i=Ee(n)||"",o=je(n,i);return{address:e,isConnected:be(n),items:zt(n),totalItems:(s==null?void 0:s.total)||null,totalCollections:(a==null?void 0:a.total)||null,orphanItems:e&&!l?Yt(n,e,s==null?void 0:s.limit):Jt(n),collections:qt(n),selectedItemId:i,selectedItem:o,selectedCollectionId:l,visibleItems:Ye(n),bodyShape:Je(n),wearableController:qe(n),isReviewing:xe(n),isLoading:V(me(n),Kt)||V(me(n),Qt),isPlayingEmote:Ge(n),hasUserOrphanItems:_e(n)}},Ra=n=>({onSetItems:l=>n(Ze(l)),onFetchCollections:(l,e)=>n(Gt(l,e)),onFetchOrphanItems:(l,e)=>n(Ke(l,e)),onFetchOrphanItem:l=>n(Zt(l))}),Da=B(Na,Ra)(Aa);class ce extends J.PureComponent{constructor(){super(...arguments);h(this,"handleAvatarColorChange",(e,s)=>{const{currentColor:a,colors:i,onChange:o}=this.props;if(a.toHexString()!==s.value){const r=i.find(m=>m.toHexString()===s.value);o(r)}});h(this,"renderItem",(e,s)=>{const a=e.toHexString();return t.jsx(c.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,i=e.toHexString();return t.jsx(c.Dropdown,{inline:!0,direction:"right",className:"AvatarColorDropdown Select",value:i,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:i}})}),t.jsx("div",{className:"handle"})]}),children:t.jsx(c.Dropdown.Menu,{className:"colors-menu",children:s.map(this.renderItem)})})}}let Ma=class extends J.PureComponent{constructor(){super(...arguments);h(this,"handleAvatarChangeWearable",(e,s)=>{const{wearable:a,category:i,bodyShape:o,onChange:r,baseWearables:m}=this.props,g=s.value?m.find(p=>p.id===s.value):null;a!==g&&r(i,o,g??null)})}render(){const{wearable:e,bodyShape:s,category:a,label:i,isNullable:o,baseWearables:r}=this.props,m=Xt(r,a,s).map(p=>({value:p.id,text:es(p)}));o&&m.push({value:"",text:d("global.none")});const g=e?m.find(p=>p.value===e.id):null;return t.jsx(c.Dropdown,{inline:!0,direction:"right",className:"AvatarWearableDropdown Select",value:e?e.id:"",options:m,scrolling:!0,onChange:this.handleAvatarChangeWearable,trigger:t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"label",children:i}),t.jsx("div",{className:"value",children:g?g.text:d("global.none")}),t.jsx("div",{className:"handle"})]})})}};const La=n=>({baseWearables:ts(n)}),ae=B(La)(Ma);let Oa=class extends x.PureComponent{constructor(){super(...arguments);h(this,"state",{showSceneBoundaries:!1,isShowingAvatarAttributes:!1,isLoading:!1});h(this,"analytics",ve());h(this,"handleToggleShowingAvatarAttributes",()=>{this.setState({isShowingAvatarAttributes:!this.state.isShowingAvatarAttributes})});h(this,"handleBodyShapeChange",(e,{value:s})=>{const{onSetBodyShape:a}=this.props;a(s)});h(this,"handleAnimationChange",(e,{value:s})=>{const{emotes:a,visibleItems:i,onSetAvatarAnimation:o,onSetItems:r}=this.props,m=a.find(p=>p.id===s),g=i.filter(p=>p.type!==y.EMOTE);g.forEach(p=>{var I;(I=this.analytics)==null||I.track("Play Emote",{EMOTE_PLAYED_BASE:!m,EMOTE_PLAYED_ITEM_ID:m!=null&&m.urn?ue(m.urn):null,EMOTE_PLAYED_NAME:m?m.name:s,PREVIEWED_WEARABLE_ITEM_ID:p!=null&&p.urn?Y(p.urn)?ze(p.urn):ue(p.urn):null,PREVIEWED_WEARABLE_NAME:p.name})}),m?g.push(m):o(s),r(g)});h(this,"handleSkinColorChange",e=>{const{onSetSkinColor:s}=this.props;s(e)});h(this,"handleEyeColorChange",e=>{const{onSetEyeColor:s}=this.props;s(e)});h(this,"handleHairColorChange",e=>{const{onSetHairColor:s}=this.props;s(e)});h(this,"handleWearableChange",(e,s,a)=>{const{onSetBaseWearable:i}=this.props;i(e,s,a)});h(this,"handleWearablePreviewLoad",()=>{const{wearableController:e,onSetWearablePreviewController:s}=this.props;e||s(c.WearablePreview.createController("wearable-editor")),this.setState({isLoading:!1})});h(this,"handleControlActionChange",async e=>{const{wearableController:s}=this.props,a=.1;if(s)switch(await(s==null?void 0:s.emote.pause()),e){case se.ZOOM_IN:{await(s==null?void 0:s.scene.changeZoom(a));break}case se.ZOOM_OUT:{await(s==null?void 0:s.scene.changeZoom(-a));break}}});h(this,"handlePlayEmote",()=>{const{wearableController:e,isPlayingEmote:s,visibleItems:a,onSetAvatarAnimation:i,onSetItems:o}=this.props,r=a.filter(m=>m.type!==y.EMOTE);s?(i(_.PreviewEmote.IDLE),o(r)):e==null||e.emote.play()});h(this,"renderEmotePlayButton",()=>{const{isPlayingEmote:e}=this.props,s=e?"stop":"play",a=e?d("item_editor.center_panel.stop"):d("item_editor.center_panel.play_emote");return t.jsxs(c.Button,{icon:!0,onClick:this.handlePlayEmote,children:[t.jsx(c.Icon,{name:s}),t.jsx("span",{children:a})]})});h(this,"renderEmoteDropdownButton",()=>{const{collection:e,emotes:s,isPlayingEmote:a}=this.props,i=!!e,o=s.length>0;return a?null:t.jsx(c.Dropdown,{className:"avatar-animation button icon",floating:!0,scrolling:!0,children:t.jsxs(c.Dropdown.Menu,{children:[o&&t.jsxs(t.Fragment,{children:[t.jsx(c.Dropdown.Header,{content:i?d("item_editor.center_panel.from_collection"):d("item_editor.center_panel.from_items")}),t.jsx(c.Dropdown.Divider,{}),s.map(r=>t.jsx(c.Dropdown.Item,{value:r.id,text:r.name,onClick:this.handleAnimationChange},r.id)),t.jsx(c.Dropdown.Divider,{}),t.jsx(c.Dropdown.Header,{content:d("item_editor.center_panel.default")}),t.jsx(c.Dropdown.Divider,{})]}),_.PreviewEmote.schema.enum.map(r=>t.jsx(c.Dropdown.Item,{value:r,text:d(`emotes.${r}`),onClick:this.handleAnimationChange},r))]})})});h(this,"renderEmoteSelector",()=>t.jsx(c.Popup,{content:d("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(c.Button.Group,{children:[this.renderEmotePlayButton(),this.renderEmoteDropdownButton()]})})}))}componentDidMount(){const{address:e,collection:s,emotes:a,selectedBaseWearables:i,hasUserOrphanItems:o,onFetchBaseWearables:r,onFetchOrphanItems:m,onFetchCollectionItems:g}=this.props,p=a.length>0;i||r(),p||(s&&!L(s)?g(s.id):e&&o&&m(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 i=s.find(o=>o.value===e);return{value:e,options:s,trigger:this.renderSelectTrigger(a,i?i.text:"")}}render(){const{bodyShape:e,skinColor:s,eyeColor:a,hairColor:i,emote:o,selectedBaseWearables:r,selectedItem:m,visibleItems:g,isImportFilesModalOpen:p,wearableController:I}=this.props,{isShowingAvatarAttributes:S,showSceneBoundaries:E,isLoading:b}=this.state,C=g.some(X)&&(m==null?void 0:m.type)===y.EMOTE,w=o===_.PreviewEmote.JUMP?1:void 0;return t.jsxs("div",{className:`CenterPanel ${p?"import-files-modal-is-open":""}`,children:[t.jsx(c.WearablePreview,{id:"wearable-editor",profile:"default",bodyShape:e,emote:o,zoom:w,skin:oe(s),eyes:oe(a),hair:oe(i),urns:r?Object.values(r).map(f=>f?f.id:null).filter(f=>f!==null):[],base64s:g.map(ss),disableAutoRotate:!0,disableBackground:!0,wheelZoom:1.5,wheelStart:100,dev:as,onUpdate:()=>this.setState({isLoading:!0}),onLoad:this.handleWearablePreviewLoad,disableDefaultEmotes:C,showSceneBoundaries:E}),C?t.jsxs("div",{className:"zoom-controls",children:[t.jsx(c.Button,{className:"zoom-control zoom-in-control",onClick:()=>this.handleControlActionChange(se.ZOOM_IN),children:t.jsx(c.Icon,{name:"plus"})}),t.jsx(c.Button,{className:"zoom-control zoom-out-control",onClick:()=>this.handleControlActionChange(se.ZOOM_OUT),children:t.jsx(c.Icon,{name:"minus"})})]}):null,b&&t.jsx(c.Center,{children:t.jsx(c.Loader,{active:!0})}),t.jsxs("div",{className:"footer",children:[C&&!b&&I?t.jsx("div",{className:"emote-controls-container",children:t.jsx(c.EmoteControls,{className:"emote-controls",wearablePreviewId:"wearable-editor",wearablePreviewController:I})}):null,t.jsxs("div",{className:"options",children:[t.jsx("div",{className:`option ${S?"active":""}`,onClick:this.handleToggleShowingAvatarAttributes,children:t.jsx(c.Icon,{name:"user"})}),C?null:this.renderEmoteSelector(),t.jsx("div",{className:`option ${E?"active":""}`,children:t.jsx(O,{name:"cylinder",onClick:()=>this.setState(f=>({showSceneBoundaries:!f.showSceneBoundaries}))})})]}),t.jsxs("div",{className:`avatar-attributes ${S?"active":""}`,children:[t.jsx("div",{className:"dropdown-container",children:t.jsx(c.Dropdown,{inline:!0,direction:"right",className:"Select",onChange:this.handleBodyShapeChange,...this.getDropdownAttributes(e,[{value:_.BodyShape.MALE,text:d("body_shapes.male")},{value:_.BodyShape.FEMALE,text:d("body_shapes.female")}],d("wearable.category.body_shape"))})}),t.jsx("div",{className:"dropdown-container",children:t.jsx(ce,{currentColor:s,colors:ns(),label:d("wearable.color.skin"),onChange:this.handleSkinColorChange})}),t.jsx("div",{className:"dropdown-container",children:t.jsx(ce,{currentColor:a,colors:is(),label:d("wearable.color.eye"),onChange:this.handleEyeColorChange})}),t.jsx("div",{className:"dropdown-container",children:t.jsx(ce,{currentColor:i,colors:ls(),label:d("wearable.color.hair"),onChange:this.handleHairColorChange})}),t.jsx("div",{className:"dropdown-container",children:r&&t.jsx(ae,{wearable:r[_.WearableCategory.HAIR],category:_.WearableCategory.HAIR,bodyShape:e,label:d("wearable.category.hair"),onChange:this.handleWearableChange,isNullable:!0})}),t.jsx("div",{className:"dropdown-container",children:r&&t.jsx(ae,{wearable:r[_.WearableCategory.FACIAL_HAIR],category:_.WearableCategory.FACIAL_HAIR,bodyShape:e,label:d("wearable.category.facial_hair"),onChange:this.handleWearableChange,isNullable:!0})}),t.jsx("div",{className:"dropdown-container",children:r&&t.jsx(ae,{wearable:r[_.WearableCategory.UPPER_BODY],category:_.WearableCategory.UPPER_BODY,bodyShape:e,label:d("wearable.category.upper_body"),onChange:this.handleWearableChange})}),t.jsx("div",{className:"dropdown-container",children:r&&t.jsx(ae,{wearable:r[_.WearableCategory.LOWER_BODY],category:_.WearableCategory.LOWER_BODY,bodyShape:e,label:d("wearable.category.lower_body"),onChange:this.handleWearableChange})})]})]})]})}};const ka=n=>{const l=te(n);let e;const s=Q(n);let a=os(n);s?(e=We(n).find(b=>b.id===s),a=a.filter(b=>b.collectionId===s)):a=a.filter(E=>!E.collectionId);const i=Ee(n)||"",o=je(n,i),r=Je(n),m=rs(n),g=Ye(n),p=ds(n),I=!g.some(X)&&p===_.PreviewEmote.IDLE,S="CreateSingleItemModal"in cs(n);return{address:l,bodyShape:r,collection:e,selectedItem:o,selectedBaseWearables:m?m[r]:null,skinColor:hs(n),eyeColor:ms(n),hairColor:gs(n),emote:p,visibleItems:g,wearableController:qe(n),emotes:a,isPlayingEmote:I?!1:Ge(n),isImportFilesModalOpen:S,hasUserOrphanItems:_e(n)}},Ba=n=>({onSetBodyShape:l=>n(ps(l)),onSetAvatarAnimation:l=>n(us(l)),onSetSkinColor:l=>n(Cs(l)),onSetEyeColor:l=>n(Is(l)),onSetHairColor:l=>n(bs(l)),onSetBaseWearable:(l,e,s)=>n(xs(l,e,s)),onFetchBaseWearables:()=>n(_s()),onSetWearablePreviewController:l=>n(vs(l)),onSetItems:l=>n(Ze(l)),onFetchOrphanItems:(l,e)=>n(Ke(l,e)),onFetchCollectionItems:(l,e)=>n(Es(l,e))}),Wa=B(ka,Ba)(Oa);class Fa extends x.PureComponent{constructor(){super(...arguments);h(this,"handleChange",e=>{const{value:s,maxLength:a,onChange:i}=this.props,o=e.target.value;s!==o&&i(a?o.slice(0,a):o)})}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 ie extends x.PureComponent{constructor(){super(...arguments);h(this,"state",{value:this.props.value});h(this,"handleChange",(e,s)=>{const{value:a,onChange:i}=this.props,o=s.value;o!==a&&(this.setState({value:o}),i(o))})}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,i=s.find(o=>o.value===a);return t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"label",children:e}),t.jsx("div",{className:"value",children:i?i.text:d("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(c.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})}}h(ie,"defaultProps",{disabled:!1});class Ie extends x.PureComponent{constructor(){super(...arguments);h(this,"state",{value:this.props.value});h(this,"handleChange",(e,s)=>{const{onChange:a}=this.props,{value:i}=this.state,o=s.value,r=[...i];for(const m of o)i.includes(m)||r.push(m);r.length!==i.length&&(this.setState({value:r}),a(r))});h(this,"handleRemove",e=>{const{onChange:s}=this.props,a=this.state.value.filter(i=>i!==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:i}=this.state,o=a.reduce((r,m)=>(r[m.value]=m.text,r),{});return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"label",children:[e,s?t.jsx(ne,{content:s,className:"info"}):null]}),t.jsx("div",{className:"values",children:i.length>0?i.map(r=>t.jsxs("div",{className:"value",children:[o[r],t.jsx("div",{className:"remove",onClick:m=>{this.handleRemove(r),m.stopPropagation()}})]},r)):t.jsx("div",{className:"placeholder",children:d("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(c.Dropdown,{inline:!0,multiple:!0,className:`MultiSelect ${a.length>0?"":"blank"}`.trim(),trigger:this.renderTrigger(),direction:"right",value:a,scrolling:!1,options:e.filter(i=>!a.includes(i.value)),disabled:s,onChange:this.handleChange,closeOnChange:!0})}}h(Ie,"defaultProps",{disabled:!1});class tt extends x.PureComponent{constructor(){super(...arguments);h(this,"state",{draft:"",value:this.props.value});h(this,"handleChange",e=>{this.setState({draft:e.target.value})});h(this,"handleAdd",()=>{const{onChange:e}=this.props,{draft:s,value:a}=this.state,i=s.trim();if(i!=="")if(a.includes(i))this.setState({draft:""});else{const o=[...a,i];this.setState({value:o,draft:""}),e(o)}});h(this,"handleKeyDown",e=>{if(e.key==="#"){e.preventDefault();return}else if(e.keyCode===js||e.keyCode===we||e.keyCode===Ss)this.handleAdd();else if(e.keyCode===fs||e.keyCode===we){const{draft:s,value:a}=this.state,i=a[a.length-1];i&&s===""&&this.handleRemove(i)}});h(this,"handleRemove",e=>{const{onChange:s}=this.props,a=this.state.value.filter(i=>i!==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(i=>t.jsxs("div",{className:"value",children:[i,t.jsx("div",{className:"remove",onClick:o=>{this.handleRemove(i),o.stopPropagation()}})]},i)),t.jsx("input",{value:s,onChange:this.handleChange,onKeyDown:this.handleKeyDown,onBlur:this.handleAdd,disabled:e})]})})}}h(tt,"defaultProps",{isDisabled:!1});let Ha=class extends x.PureComponent{constructor(){super(...arguments);h(this,"analytics",ve());h(this,"state",this.getInitialState());h(this,"thumbnailInput",x.createRef());h(this,"handleDeleteItem",()=>{const{onDeleteItem:e}=this.props,{selectedItem:s}=this.props;e(s)});h(this,"handleAddRepresentationToItem",()=>{const{selectedItem:e,onOpenModal:s}=this.props;s("CreateSingleItemModal",{item:e,addRepresentation:!0})});h(this,"handleChangeItemFile",()=>{const{selectedItem:e,onOpenModal:s}=this.props;s("CreateSingleItemModal",{item:e,changeItemFile:!0})});h(this,"handleOpenVideoDialog",(e={})=>{const{selectedItem:s,onOpenModal:a}=this.props;a("EditVideoModal",{item:s,onSaveVideo:this.handleSaveVideo,...e})});h(this,"handleSaveVideo",e=>{this.setState({video:URL.createObjectURL(e),contents:{...this.state.contents,[Te]:e},isDirty:!0})});h(this,"handleChangeName",e=>{this.setState({name:e,isDirty:this.isDirty({name:e})})});h(this,"handleChangeDescription",(e,s)=>{const a=s.value??"";this.setState({description:a,isDirty:this.isDirty({description:a})})});h(this,"handleChangeUtility",(e,s)=>{const a=s.value??"";this.setState({utility:a,isDirty:this.isDirty({utility:a})})});h(this,"handleChangeRarity",e=>{this.setState({rarity:e,isDirty:this.isDirty({rarity:e})})});h(this,"handleAllowVrmExport",(e,{checked:s})=>{const a={...this.state.data,blockVrmExport:!s};this.setState({data:a,isDirty:this.isDirty({data:a})})});h(this,"handleAllowOutlineCompatible",(e,{checked:s})=>{const a={...this.state.data,outlineCompatible:s};this.setState({data:a,isDirty:this.isDirty({data:a})})});h(this,"handleChangeCategory",e=>{let s;re(this.state.data)?s={...this.state.data,category:e}:(s={...this.state.data,category:e},e===_.WearableCategory.SKIN&&(s=this.setReplaces(s,[]),s=this.setHides(s,[]))),this.setState({data:s,isDirty:this.isDirty({data:s})})});h(this,"handlePlayModeChange",e=>{const s={...this.state.data,loop:e===de.LOOP};this.setState({data:s,isDirty:this.isDirty({data:s})})});h(this,"handleChangeReplaces",e=>{const s=this.setReplaces(this.state.data,e);this.setState({data:s,isDirty:this.isDirty({data:s})})});h(this,"handleChangeHides",(e,s)=>{const a=this.state.data.hides;let i=[];s==="wearable"?i=[...a.filter(r=>!_.WearableCategory.schema.enum.includes(r)),...e]:i=[...a.filter(r=>!_.BodyPartCategory.schema.enum.includes(r)),...e];const o=this.setHides(this.state.data,i);this.setState({data:o,isDirty:this.isDirty({data:o})})});h(this,"handleChangeTags",e=>{const s={...this.state.data,tags:e};this.setState({data:s,isDirty:this.isDirty({data:s})})});h(this,"handleOnSaveItem",async()=>{var S,E;const{selectedItem:e,itemStatus:s,onSaveItem:a}=this.props,{name:i,description:o,utility:r,rarity:m,contents:g,data:p,isDirty:I}=this.state;if(I&&e){let b=p;b&&!re(b)&&(b={...b,removesDefaultHiding:b.category===_.WearableCategory.UPPER_BODY||(S=b.hides)!=null&&S.includes(_.WearableCategory.UPPER_BODY)?[_.BodyPartCategory.HANDS]:[],..."blockVrmExport"in b?{blockVrmExport:b.blockVrmExport}:{},..."outlineCompatible"in b?{outlineCompatible:b.outlineCompatible}:{}});const C={...e.contents,...await ws(g)},w={...e,name:i,description:o,rarity:m,data:b,contents:C,utility:r??void 0};s&&[ye.UNPUBLISHED,ye.UNDER_REVIEW].includes(s)&&(w.video=C[Te]),a(w,g),Y(w.urn)&&((E=this.analytics)==null||E.track("Edit Item",{contents:g})),this.setState({isDirty:!1}),this.handleOnResetItem()}});h(this,"handleOnResetItem",()=>{const{selectedItem:e}=this.props;e&&this.setItem(e)});h(this,"handleOpenThumbnailDialog",()=>{const{selectedItem:e,onOpenModal:s}=this.props;(e==null?void 0:e.type)===y.EMOTE?s("EditThumbnailModal",{onSaveThumbnail:this.handleEmoteThumbnailChange,item:e}):this.thumbnailInput.current&&this.thumbnailInput.current.click()});h(this,"handleEmoteThumbnailChange",e=>{const s=Ts(e);this.setState({thumbnail:e,contents:{[Pe]:s},isDirty:!0})});h(this,"handleThumbnailChange",async e=>{const{files:s}=e.target;if(s&&s.length>0){const a=s[0],i=await Ae(a),o=await Ae(a,1024,1024),r=URL.createObjectURL(i);this.setState({thumbnail:r,contents:{[Pe]:o},isDirty:!0})}});h(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;Ce(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&&Ne(s)?!1:a}isSkin(){const{data:e}=this.state;return(e==null?void 0:e.category)===_.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||!Ue(e.data,s.data)}asCategorySelect(e,s){return s.map(a=>({value:a,text:d(`${e}.category.${a}`)}))}asRaritySelect(e){return e.map(s=>({value:s,text:d(`wearable.rarity.${s}`)}))}asPlayModeSelect(e){return e.map(s=>({value:s,text:d(`emote.play_mode.${s}.text`),description:d(`emote.play_mode.${s}.description`)}))}renderOverrides(e){const s=this.canEditItemMetadata(e),a=this.state.data;if(!e||re(a))return null;const i=ys(e.contents,a.category),o=Ps(e.contents),r=a.hides.filter(g=>i.includes(g)),m=a.hides.filter(g=>o.includes(g));return t.jsxs(t.Fragment,{children:[t.jsx(Ie,{itemId:e.id,label:d("item_editor.right_panel.base_body"),info:d("item_editor.right_panel.base_body_info"),value:m,options:this.asCategorySelect(e.type,o),disabled:!s,onChange:g=>this.handleChangeHides(g,"bodypart")}),t.jsx(Ie,{itemId:e.id,label:d("item_editor.right_panel.wearables"),info:d("item_editor.right_panel.wearables_info"),value:r,options:this.asCategorySelect(e.type,r.some(g=>g===_.WearableCategory.BODY_SHAPE)?i:i.filter(g=>g!==_.WearableCategory.BODY_SHAPE)),disabled:!s,onChange:g=>this.handleChangeHides(g,"wearable")})]})}renderModelDetails(e){const{isDownloading:s}=this.props,{thumbnail:a}=this.state,i=this.canEditItemMetadata(e),o=s?t.jsx(c.Loader,{active:!0,size:"tiny",className:"donwload-item-loader"}):t.jsx(O,{name:"export",className:"download-item-button",onClick:this.handleDownloadItem});return t.jsxs("div",{className:"details",children:[i?t.jsxs(t.Fragment,{children:[t.jsx(O,{name:"edit",className:"edit-item-file",onClick:this.handleChangeItemFile}),o,t.jsxs("div",{className:"thumbnail-container",children:[t.jsx(ge,{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(O,{name:"camera",onClick:this.handleOpenThumbnailDialog})]})]})]}):t.jsxs(t.Fragment,{children:[o,t.jsx(ge,{item:e,src:a,hasBadge:!0,badgeSize:"small"})]}),t.jsx(As,{item:e})]})}renderVideoDetails(e){if(!Re(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(O,{name:"edit",className:"edit-item-file",onClick:a}),t.jsx(O,{name:"play",className:"play-video-button",onClick:a}),t.jsx(De,{item:e,src:this.state.video,showMetrics:!0,onClick:a})]}):t.jsxs(t.Fragment,{children:[Ns(e)&&t.jsx(O,{name:"play",className:"play-video-button",onClick:a}),t.jsx(De,{item:e,src:this.state.video,showMetrics:!0})]})})}renderPermissions(e){return t.jsx(Rs,{requiredPermissions:e.data.requiredPermissions})}render(){const{selectedItemId:e,address:s,isWearableUtilityEnabled:a,isConnected:i,error:o,isCampaignEnabled:r,isVrmOptOutEnabled:m,campaignName:g,campaignTag:p}=this.props,{name:I,description:S,utility:E,rarity:b,data:C,isDirty:w,hasItem:f}=this.state,D=_.Rarity.getRarities(),M=Ds();return t.jsx("div",{className:"RightPanel",children:i?t.jsx(Qs,{id:e,children:(u,W,F)=>{var $;const le=W&&Ne(W),A=this.canEditItemMetadata(u),q=u?Ce(u)?Ms(u.contents):Ls():[];return F?t.jsx(c.Loader,{size:"massive",active:!0}):f||!e?t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"header",children:[t.jsx("div",{className:"title",children:d("item_editor.right_panel.properties")}),u&&Qe(u,s)&&!u.isPublished&&!le?t.jsx(c.Dropdown,{trigger:t.jsx("div",{className:"actions"}),inline:!0,direction:"left",children:t.jsxs(c.Dropdown.Menu,{children:[pe(u)!==null?t.jsx(c.Dropdown.Item,{text:d("item_detail_page.add_representation",{bodyShape:d(`body_shapes.${pe(u)}`).toLowerCase()}),onClick:this.handleAddRepresentationToItem}):null,t.jsx(Xe,{name:I,onDelete:this.handleDeleteItem,trigger:t.jsx(c.Dropdown.Item,{text:d("global.delete")})})]})}):null]}),t.jsxs("div",{className:"container",children:[t.jsx(N,{label:d("item_editor.right_panel.details"),children:u?t.jsxs(t.Fragment,{children:[this.renderModelDetails(u),this.renderVideoDetails(u)]}):null}),t.jsx(N,{label:d("item_editor.right_panel.basics"),children:u?t.jsxs(t.Fragment,{children:[t.jsx(Fa,{label:d("global.name"),value:I,disabled:!A,maxLength:Os,onChange:this.handleChangeName}),t.jsx(c.TextAreaField,{maxLength:ks,onChange:this.handleChangeDescription,label:d("global.description"),placeholder:d("item_editor.right_panel.description_placeholder"),disabled:!A,value:S,rows:"2",cols:"12"}),a?t.jsx(c.TextAreaField,{maxLength:Bs,onChange:this.handleChangeUtility,label:d("global.utility"),placeholder:d("item_editor.right_panel.utility_placeholder"),disabled:!A,value:E,tooltip:{content:d("item_editor.right_panel.utility_tooltip")},rows:"2",cols:"12"}):null,t.jsx(ie,{itemId:u.id,label:d("global.category"),value:C.category,options:this.asCategorySelect(u.type,q),disabled:!A,onChange:this.handleChangeCategory}),!(u.urn&&Y(u.urn))&&t.jsx(ie,{itemId:u.id,label:d("global.rarity"),value:b,options:this.asRaritySelect(D),disabled:u.isPublished||!A,onChange:this.handleChangeRarity})]}):null}),(u==null?void 0:u.type)===y.WEARABLE&&t.jsx(N,{label:t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"overrides-label-panel",children:d("item_editor.right_panel.overrides")}),t.jsx(ne,{content:d("item_editor.right_panel.overrides_info"),className:"info"})]}),children:this.renderOverrides(u)}),(u==null?void 0:u.type)===y.EMOTE&&t.jsx(N,{label:d("item_editor.right_panel.animation"),children:u?t.jsx(ie,{itemId:u.id,label:d("create_single_item_modal.play_mode_label"),value:C.loop?de.LOOP:de.SIMPLE,options:this.asPlayModeSelect(M),disabled:!A,onChange:this.handlePlayModeChange}):null}),u&&Re(u)&&(($=u.data.requiredPermissions)!=null&&$.length)?t.jsx(N,{label:d("item_editor.right_panel.required_permissions"),children:this.renderPermissions(u)}):null,t.jsx(N,{label:d("item_editor.right_panel.tags"),children:u?t.jsxs(t.Fragment,{children:[t.jsx(tt,{itemId:u.id,value:C.tags,onChange:this.handleChangeTags,isDisabled:!A}),r&&g&&p&&A&&t.jsx("p",{className:"event-tag",children:d("item_editor.right_panel.event_tag",{event_tag:t.jsx("span",{children:p}),event_name:t.jsx("span",{children:g})})})]}):null}),(u==null?void 0:u.type)===y.WEARABLE&&m&&t.jsx(N,{label:t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"overrides-label-panel",children:d("item_editor.right_panel.copyright.title")}),t.jsx(ne,{content:d("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:d("item_editor.right_panel.copyright.vrm_export")}),t.jsx(c.Checkbox,{toggle:!0,label:C!=null&&C.blockVrmExport?d("item_editor.right_panel.copyright.disabled"):d("item_editor.right_panel.copyright.enabled"),checked:!(C!=null&&C.blockVrmExport),onChange:this.handleAllowVrmExport,"aria-label":d("item_editor.right_panel.copyright.vrm_export")})]})})}),(u==null?void 0:u.type)===y.WEARABLE&&t.jsx(N,{label:t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"overrides-label-panel",children:d("item_editor.right_panel.outline_compatible.title")}),t.jsx(ne,{content:d("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:d("item_editor.right_panel.outline_compatible.title")}),t.jsx(c.Checkbox,{toggle:!0,label:(C==null?void 0:C.outlineCompatible)!==!1?d("item_editor.right_panel.copyright.enabled"):d("item_editor.right_panel.copyright.disabled"),checked:(C==null?void 0:C.outlineCompatible)!==!1,onChange:this.handleAllowOutlineCompatible,"aria-label":d("item_editor.right_panel.outline_compatible.title")})]})})}),w?t.jsxs("div",{className:"edit-buttons",children:[t.jsx(c.Button,{secondary:!0,onClick:this.handleOnResetItem,children:d("global.cancel")}),t.jsx(Me,{primary:!0,onClick:this.handleOnSaveItem,network:_.Network.MATIC,children:d("global.save")})]}):o&&e?t.jsxs("p",{className:"danger-text",children:[d("global.error_ocurred"),": ",o]}):null]})]}):null}}):null})}};const Va=n=>{var r;const l=Ee(n)||"",e=je(n,l),s=te(n)||"",a=l&&e&&e.collectionId?Le(n,e.collectionId):null,i=Ws(n),o=l?i[l]:null;return{address:s,collection:a,selectedItem:e,selectedItemId:l,canEditSelectedItem:e?a?Fe(n,s,a):Qe(e,s):!1,itemStatus:o,error:Fs(n),isConnected:be(n),isDownloading:Hs(n),isCommitteeMember:Oe(n),isCampaignEnabled:Vs(n),campaignTag:Gs(n),campaignName:(r=Zs(n))==null?void 0:r[Ks(n)],isVrmOptOutEnabled:$s(n),isWearableUtilityEnabled:Us(n)}},$a=n=>({onSaveItem:(l,e)=>n(zs(l,e)),onDeleteItem:l=>n(Ve(l)),onOpenModal:(l,e)=>n(He(l,e)),onDownload:l=>n(Ys(l))}),Ua=B(Va,$a)(Ha);class nn extends x.PureComponent{constructor(){super(...arguments);h(this,"state",{reviewedItems:[]});h(this,"handleOnSetReviewedItems",e=>{this.setState(s=>({reviewedItems:[...s.reviewedItems,...e.filter(a=>!s.reviewedItems.some(i=>i.id===a.id))]}))});h(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(ma,{reviewedItems:e}),t.jsxs("div",{className:"content",children:[t.jsx(Da,{reviewedItems:e,onResetReviewedItems:this.handleResetReviewedItems,onSetReviewedItems:this.handleOnSetReviewedItems}),t.jsx(Wa,{}),t.jsx(Ua,{})]})]})})}}export{nn as default};
@@ -1 +1 @@
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,bU as h,H as e,M as s,G as r,e7 as b,cA as v,cB as y,bm as u,bC as S,cc as A,N as _,e8 as T,e9 as z,ea as N}from"./index-nSeb2kLU.js";import{L as P}from"./LoggedInDetailPage.container-CDSy4rw9.js";import{S as f}from"./SignInRequired-DaqmN1AU.js";import"./Navigation.container-D4bOX-AY.js";import"./selectors-CRfPBNkn.js";let L=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 R=i=>({wallet:T(i),authorizations:z(i)}),E=i=>({onSetUpdateManager:(n,t,a)=>i(N(n,t,a))}),B=_(R,E)(L);export{B as default};
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,bU as h,H as e,M as s,G as r,e7 as b,cA as v,cB as y,bm as u,bC as S,cc as A,N as _,e8 as T,e9 as z,ea as N}from"./index-DTzHduGV.js";import{L as P}from"./LoggedInDetailPage.container-BBbHDFzm.js";import{S as f}from"./SignInRequired-KH0-S7eT.js";import"./Navigation.container-Dviau9XL.js";import"./selectors-B5a-ETQ1.js";let L=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 R=i=>({wallet:T(i),authorizations:z(i)}),E=i=>({onSetUpdateManager:(n,t,a)=>i(N(n,t,a))}),B=_(R,E)(L);export{B as default};
@@ -1 +1 @@
1
- var U=Object.defineProperty;var A=(t,n,s)=>n in t?U(t,n,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[n]=s;var d=(t,n,s)=>A(t,typeof n!="symbol"?n+"":n,s);import{D as p,E as H,F as W,G as a,H as e,I as q,J as v,L,K as _,M as o,N as w,O as z,P as J,Q as I,R as K,S as V,T as Z,U as G,V as Q,W as X,X as B,Y,Z as ee,$ as se,a0 as te,a1 as ne,a2 as b,a3 as oe,a4 as ae,a5 as ce,a6 as re,a7 as le,a8 as ie,a9 as de,aa as pe,ab as je,ac as he,ad as me}from"./index-nSeb2kLU.js";import{O as ge}from"./OptionsDropdown-CBs9QAWV.js";import{S as ue}from"./SDKTag-xtuqGgmi.js";import{L as xe}from"./LoggedInDetailPage.container-CDSy4rw9.js";import{N as Pe,S as Ce}from"./Navigation.container-D4bOX-AY.js";import"./SignInRequired-DaqmN1AU.js";import"./selectors-CRfPBNkn.js";var E;let Se=(E=class extends p.PureComponent{constructor(){super(...arguments);d(this,"state",{isDeleting:!1});d(this,"handleOnClick",()=>{const{onClick:s,project:c}=this.props;s&&s(c)});d(this,"handleConfirmDeleteProject",()=>{this.setState({isDeleting:!0})});d(this,"handleCancelDeleteProject",()=>{this.setState({isDeleting:!1})});d(this,"handleDeleteProject",()=>{const{project:s,onDeleteProject:c}=this.props;c(s),this.setState({isDeleting:!1})});d(this,"handleDuplicateProject",()=>{const{project:s,onDuplicateProject:c}=this.props;c(s)});d(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:l,onClick:j,isUploading:m,hasError:f,scene:g}=this.props,{isDeleting:i}=this.state,u="likes"in s;let P={},x="ProjectCard",h=H(s,g);h&&(h&&W(h)&&(h+=`?updated_at=${+new Date(s.updatedAt)}`),P={backgroundImage:`url(${h})`},x+=" has-thumbnail");const N=[{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}],C=e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"project-thumbnail",style:P}),u?null:e.jsxs(e.Fragment,{children:[e.jsx(q,{projectId:s.id,className:"deployment-status"}),e.jsxs("div",{className:"options-container",children:[e.jsx(ue,{scene:g}),e.jsx(ge,{className:"options-dropdown",options:N})]})]}),e.jsxs("div",{className:"project-data",children:[e.jsxs("div",{className:"title-wrapper",children:[e.jsx("div",{className:"title",children:s.title}),m?e.jsx(v,{name:"cloud-upload",className:"is-uploading"}):null,!m&&f?e.jsx("div",{className:"error-indicator"}):null]}),e.jsxs("div",{className:"description",title:s.description,children:[e.jsx(v,{name:"scene-parcel"})," ",a("public_page.parcel_count",{parcels:c}),e.jsx(v,{name:"scene-object"})," ",a("project_card.item_count",{items:l})]})]})]});return e.jsxs(e.Fragment,{children:[j?e.jsx("div",{className:x,onClick:this.handleOnClick,children:C}):e.jsx(L,{to:u?_.poolView(s.id,"pool"):_.sceneDetail(s.id),className:x,children:C}),e.jsx(o.Confirm,{size:"tiny",open:i,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})]})}},d(E,"defaultProps",{items:0,parcels:0}),E);const _e=(t,n)=>{const{project:s}=n,c=s.layout.cols*s.layout.rows,l=z(t)[s.sceneId],j=l&&l.sdk6?Object.keys(l.sdk6.entities).length-c:0,m=J(t)[s.id]?I.POOL:I.PROJECT;return{parcels:c,items:j,scene:l,deploymentStatus:K(t)[n.project.id],deployments:V(t)[n.project.id],isUploading:Z(t).has(s.id),hasError:G(t).has(s.id),type:m}},fe=t=>({onDeleteProject:n=>t(Q(n)),onDuplicateProject:n=>t(X(n)),onOpenModal:(n,s)=>t(B(n,s)),onLoadProjectScene:(n,s)=>t(Y(n,s))}),O=w(_e,fe)(Se),M=t=>{const{page:n,poolList:s,projects:c,sortBy:l,totalPages:j,isFetching:m,isLoggingIn:f,onLoadFromScenePool:g,onOpenModal:i}=t,u=ee();p.useEffect(()=>{g({sortBy:"updated_at",sortOrder:"desc"})},[g,i]),p.useEffect(()=>{se()&&i("WorldsForENSOwnersAnnouncementModal")},[i]);const P=p.useCallback(()=>{i("ImportModal")},[i]),x=p.useCallback(()=>{i("SceneCreationModal")},[i]),h=()=>e.jsx(o.Button,{inverted:!0,className:"import-scene",onClick:P,children:a("scenes_page.upload_scene")}),N=()=>e.jsx(o.Button,{primary:!0,className:"create-scene",onClick:x,children:a("scenes_page.create_scene")}),C=()=>e.jsx(o.Dropdown,{direction:"left",value:l,options:[{value:b.NEWEST,text:a("scenes_page.sort.newest")},{value:b.NAME,text:a("scenes_page.sort.name")},{value:b.SIZE,text:a("scenes_page.sort.size")}],onChange:R}),F=()=>c.length>0?e.jsx("div",{className:"CardList",children:c.map(r=>e.jsx(O,{project:r},r.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:r=>e.jsx("a",{rel:"noreferrer",target:"_blank",href:"https://docs.decentraland.org/creator/development-guide/sdk-101/",children:r})})}),e.jsx(oe,{})]}),S=p.useCallback((r={})=>{u.push(_.scenes({page:n,sortBy:l,...r}))},[n,l,u]),R=p.useCallback((r,{value:y})=>S({sortBy:y}),[S]),T=p.useCallback((r,{activePage:y})=>S({page:y}),[S]);if(f||m)return e.jsx(te,{});const k=j>1,D={firstItem:null,lastItem:null};n===1&&(D.prevItem=null),n===j&&(D.nextItem=null);const $=()=>e.jsxs(e.Fragment,{children:[e.jsx(Ce,{}),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:[h(),N()]})})]}),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?C():null})]})]}),e.jsxs(o.Section,{className:ne("project-cards",{"has-pagination":k}),children:[F(),k?e.jsx(o.Pagination,{...D,activePage:n,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(L,{to:_.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(r=>e.jsx(O,{project:r},r.id))})]}):null]})]});return e.jsx(xe,{className:"ScenesPage",activeTab:Pe.SCENES,children:$()})};M.defaultProps={projects:[]};const Ne=M,De=t=>({projects:ae(t),isLoggingIn:ce(t)||re(t),isFetching:le(t),page:ie(t),sortBy:de(t),totalPages:pe(t),didCreate:je(t),poolList:he(t)}),ye=t=>({onOpenModal:(n,s)=>t(B(n,s)),onLoadFromScenePool:n=>t(me(n))}),Me=w(De,ye)(Ne);export{Me as default};
1
+ var U=Object.defineProperty;var A=(t,n,s)=>n in t?U(t,n,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[n]=s;var d=(t,n,s)=>A(t,typeof n!="symbol"?n+"":n,s);import{D as p,E as H,F as W,G as a,H as e,I as q,J as v,L,K as _,M as o,N as w,O as z,P as J,Q as I,R as K,S as V,T as Z,U as G,V as Q,W as X,X as B,Y,Z as ee,$ as se,a0 as te,a1 as ne,a2 as b,a3 as oe,a4 as ae,a5 as ce,a6 as re,a7 as le,a8 as ie,a9 as de,aa as pe,ab as je,ac as he,ad as me}from"./index-DTzHduGV.js";import{O as ge}from"./OptionsDropdown-Bbi_h5LY.js";import{S as ue}from"./SDKTag-CwXrVTcJ.js";import{L as xe}from"./LoggedInDetailPage.container-BBbHDFzm.js";import{N as Pe,S as Ce}from"./Navigation.container-Dviau9XL.js";import"./SignInRequired-KH0-S7eT.js";import"./selectors-B5a-ETQ1.js";var E;let Se=(E=class extends p.PureComponent{constructor(){super(...arguments);d(this,"state",{isDeleting:!1});d(this,"handleOnClick",()=>{const{onClick:s,project:c}=this.props;s&&s(c)});d(this,"handleConfirmDeleteProject",()=>{this.setState({isDeleting:!0})});d(this,"handleCancelDeleteProject",()=>{this.setState({isDeleting:!1})});d(this,"handleDeleteProject",()=>{const{project:s,onDeleteProject:c}=this.props;c(s),this.setState({isDeleting:!1})});d(this,"handleDuplicateProject",()=>{const{project:s,onDuplicateProject:c}=this.props;c(s)});d(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:l,onClick:j,isUploading:m,hasError:f,scene:g}=this.props,{isDeleting:i}=this.state,u="likes"in s;let P={},x="ProjectCard",h=H(s,g);h&&(h&&W(h)&&(h+=`?updated_at=${+new Date(s.updatedAt)}`),P={backgroundImage:`url(${h})`},x+=" has-thumbnail");const N=[{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}],C=e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"project-thumbnail",style:P}),u?null:e.jsxs(e.Fragment,{children:[e.jsx(q,{projectId:s.id,className:"deployment-status"}),e.jsxs("div",{className:"options-container",children:[e.jsx(ue,{scene:g}),e.jsx(ge,{className:"options-dropdown",options:N})]})]}),e.jsxs("div",{className:"project-data",children:[e.jsxs("div",{className:"title-wrapper",children:[e.jsx("div",{className:"title",children:s.title}),m?e.jsx(v,{name:"cloud-upload",className:"is-uploading"}):null,!m&&f?e.jsx("div",{className:"error-indicator"}):null]}),e.jsxs("div",{className:"description",title:s.description,children:[e.jsx(v,{name:"scene-parcel"})," ",a("public_page.parcel_count",{parcels:c}),e.jsx(v,{name:"scene-object"})," ",a("project_card.item_count",{items:l})]})]})]});return e.jsxs(e.Fragment,{children:[j?e.jsx("div",{className:x,onClick:this.handleOnClick,children:C}):e.jsx(L,{to:u?_.poolView(s.id,"pool"):_.sceneDetail(s.id),className:x,children:C}),e.jsx(o.Confirm,{size:"tiny",open:i,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})]})}},d(E,"defaultProps",{items:0,parcels:0}),E);const _e=(t,n)=>{const{project:s}=n,c=s.layout.cols*s.layout.rows,l=z(t)[s.sceneId],j=l&&l.sdk6?Object.keys(l.sdk6.entities).length-c:0,m=J(t)[s.id]?I.POOL:I.PROJECT;return{parcels:c,items:j,scene:l,deploymentStatus:K(t)[n.project.id],deployments:V(t)[n.project.id],isUploading:Z(t).has(s.id),hasError:G(t).has(s.id),type:m}},fe=t=>({onDeleteProject:n=>t(Q(n)),onDuplicateProject:n=>t(X(n)),onOpenModal:(n,s)=>t(B(n,s)),onLoadProjectScene:(n,s)=>t(Y(n,s))}),O=w(_e,fe)(Se),M=t=>{const{page:n,poolList:s,projects:c,sortBy:l,totalPages:j,isFetching:m,isLoggingIn:f,onLoadFromScenePool:g,onOpenModal:i}=t,u=ee();p.useEffect(()=>{g({sortBy:"updated_at",sortOrder:"desc"})},[g,i]),p.useEffect(()=>{se()&&i("WorldsForENSOwnersAnnouncementModal")},[i]);const P=p.useCallback(()=>{i("ImportModal")},[i]),x=p.useCallback(()=>{i("SceneCreationModal")},[i]),h=()=>e.jsx(o.Button,{inverted:!0,className:"import-scene",onClick:P,children:a("scenes_page.upload_scene")}),N=()=>e.jsx(o.Button,{primary:!0,className:"create-scene",onClick:x,children:a("scenes_page.create_scene")}),C=()=>e.jsx(o.Dropdown,{direction:"left",value:l,options:[{value:b.NEWEST,text:a("scenes_page.sort.newest")},{value:b.NAME,text:a("scenes_page.sort.name")},{value:b.SIZE,text:a("scenes_page.sort.size")}],onChange:R}),F=()=>c.length>0?e.jsx("div",{className:"CardList",children:c.map(r=>e.jsx(O,{project:r},r.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:r=>e.jsx("a",{rel:"noreferrer",target:"_blank",href:"https://docs.decentraland.org/creator/development-guide/sdk-101/",children:r})})}),e.jsx(oe,{})]}),S=p.useCallback((r={})=>{u.push(_.scenes({page:n,sortBy:l,...r}))},[n,l,u]),R=p.useCallback((r,{value:y})=>S({sortBy:y}),[S]),T=p.useCallback((r,{activePage:y})=>S({page:y}),[S]);if(f||m)return e.jsx(te,{});const k=j>1,D={firstItem:null,lastItem:null};n===1&&(D.prevItem=null),n===j&&(D.nextItem=null);const $=()=>e.jsxs(e.Fragment,{children:[e.jsx(Ce,{}),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:[h(),N()]})})]}),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?C():null})]})]}),e.jsxs(o.Section,{className:ne("project-cards",{"has-pagination":k}),children:[F(),k?e.jsx(o.Pagination,{...D,activePage:n,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(L,{to:_.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(r=>e.jsx(O,{project:r},r.id))})]}):null]})]});return e.jsx(xe,{className:"ScenesPage",activeTab:Pe.SCENES,children:$()})};M.defaultProps={projects:[]};const Ne=M,De=t=>({projects:ae(t),isLoggingIn:ce(t)||re(t),isFetching:le(t),page:ie(t),sortBy:de(t),totalPages:pe(t),didCreate:je(t),poolList:he(t)}),ye=t=>({onOpenModal:(n,s)=>t(B(n,s)),onLoadFromScenePool:n=>t(me(n))}),Me=w(De,ye)(Ne);export{Me as default};
@@ -1 +1 @@
1
- import{af as N,H as s,a1 as P,G as x,dy as k,M as l,dz as T,dA as H,D as j,bB as y,c3 as w,bA as B,bC as _,dB as z,dC as F,dD as $,bm as i,L as S,K as h,dE as K,dF as V,dG as G,dH as Y,dI as J,dJ as Q,dK as W,dL as A,dM as q,dN as f,dO as X,dP as Z,dQ as b,dR as L,dS as D,dT as R,dU as ss,dV as es,dW as as,dX as ts,dY as ns,dZ as is,d_ as cs,d$ as os,e0 as rs,e1 as ls,e2 as O,e3 as U,e4 as M,ah as ds,aj as ms,N as xs,ae as us,aH as _s,e5 as js,e6 as Ss}from"./index-nSeb2kLU.js";import{a as hs}from"./Navigation.container-D4bOX-AY.js";import{S as Cs}from"./SignInRequired-DaqmN1AU.js";import{a as Es}from"./date-Bn2WlT-o.js";import"./selectors-CRfPBNkn.js";import"./index-C97e_oh9.js";const ps="_ensImage_er26d_1",gs="_name_er26d_15",Ns="_small_er26d_23",I={ensImage:ps,name:gs,small:Ns};class vs extends N.PureComponent{render(){const{subdomain:a,isSmall:e}=this.props;return s.jsx("div",{className:P(I.ensImage,{[I.small]:e}),children:s.jsx("div",{className:I.name,children:a.slice(0,2)})})}}const Ts=c=>{const a=c.replacedBy||c.hash;return a?H({txHash:a},c.chainId):""},ys=c=>{const{selection:a,address:e,collectionId:t,item:n,subdomain:r,slotsToyBuy:d}=c,u=j.useMemo(()=>new Set((a||[]).map(C=>y(C.x,C.y))),[a]),E=j.useCallback((C,v)=>u.has(y(C,v))?{color:"#ff0044",scale:1.4}:null,[u]),p=j.useCallback((C,v)=>u.has(y(C,v))?{color:"#ff9990",scale:1.2}:null,[u]),[m,g]=j.useMemo(()=>a?w(a):[0,0],[a]);return a?s.jsx(B,{x:m,y:g,layers:[E,p],width:48,height:48,size:9,isDraggable:!1}):e?s.jsx(_,{address:e,size:"huge",imageOnly:!0}):t?s.jsx(z,{collectionId:t}):n?s.jsx(F,{item:n}):r?s.jsx(vs,{subdomain:r,isSmall:!0}):d?s.jsx("div",{className:"slot-image"}):null},Is=c=>{const{text:a,tx:e}=c;return s.jsxs("div",{className:"TransactionDetail",children:[s.jsxs("div",{className:"left",children:[s.jsx("div",{className:"image",children:s.jsx(ys,{...c})}),s.jsxs("div",{className:"text",children:[s.jsx("div",{className:"description",children:a}),s.jsxs("div",{className:"timestamp",children:[Es(e.timestamp),"."]})]})]}),s.jsx("div",{className:"right",children:s.jsxs("a",{href:Ts(e),className:e.status?"status "+e.status:"status",target:"_blank",rel:"noopener noreferrer",children:[s.jsx("div",{className:"description",children:e.status||x("global.loading")}),k(e.status)?s.jsx("div",{className:"spinner",children:s.jsx(l.Loader,{active:!0,size:"mini"})}):null,e.status===T.REVERTED?s.jsx(l.Icon,{name:"warning sign"}):null,e.status===T.CONFIRMED||e.status===T.REPLACED?s.jsx(l.Icon,{name:"check"}):null]})})]})},o=N.memo(Is),As=c=>{const{tx:a}=c;switch(a.actionType){case U:case ls:{const{authorization:e}=a.payload,t=O(e.authorizedAddress),n=O(e.contractAddress),r=a.actionType===U?x("transaction.approved"):x("transaction.unapproved");return s.jsx(o,{address:e.address,text:s.jsx(i,{id:"transaction.approve_token",values:{action:r,contract:s.jsx(M,{chainId:e.chainId,address:e.authorizedAddress,txHash:"",children:t}),token:s.jsx(M,{chainId:e.chainId,address:e.contractAddress,txHash:"",children:n})}}),tx:a})}case rs:{const{name:e,address:t,selection:n}=a.payload;return s.jsx(o,{selection:n,text:s.jsx(i,{id:"transaction.transfer",values:{name:s.jsx("strong",{children:e}),address:s.jsx(_,{address:t})}}),tx:a})}case os:{const{name:e,selection:t}=a.payload;return s.jsx(o,{selection:t,text:s.jsx(i,{id:"transaction.edit",values:{name:s.jsx("strong",{children:e})}}),tx:a})}case cs:{const{name:e,address:t,selection:n}=a.payload;return s.jsx(o,{selection:n,text:s.jsx(i,{id:t?"transaction.set_operator_assigned":"transaction.set_operator_revoked",values:{name:s.jsx("strong",{children:e}),address:s.jsx(_,{address:t})}}),tx:a})}case is:{const{name:e,selection:t}=a.payload;return s.jsx(o,{selection:t,text:s.jsx(i,{id:"transaction.create_estate",values:{name:s.jsx("strong",{children:e})}}),tx:a})}case ns:{const{name:e,count:t,type:n,selection:r}=a.payload;return s.jsx(o,{selection:r,text:s.jsx(i,{id:`transaction.edit_estate_${n}`,values:{name:s.jsx("strong",{children:e}),count:t}}),tx:a})}case ts:{const{name:e,selection:t}=a.payload;return s.jsx(o,{selection:t,text:s.jsx(i,{id:"transaction.dissolve_estate",values:{name:s.jsx("strong",{children:e})}}),tx:a})}case as:{const{address:e,type:t,isApproved:n}=a.payload;return s.jsx(o,{address:e,text:s.jsx(i,{id:n?"transaction.set_manager_assigned":"transaction.set_manager_revoked",values:{address:s.jsx(_,{address:e,textOnly:!0}),type:x(`global.${t}_plural`)}}),tx:a})}case es:{const{item:e}=a.payload;return s.jsx(o,{item:e,text:s.jsx(i,{id:"transaction.set_price_and_beneficiary",values:{name:s.jsx(S,{to:h.itemDetail(e.id),children:e.name})}}),tx:a})}case ss:{const{thirdPartyId:e,thirdPartyName:t}=a.payload;return s.jsx(o,{thirdPartyId:e,text:s.jsx(i,{id:"transaction.disable_third_party",values:{name:t}}),tx:a})}case L:case D:case R:case b:{const{collection:e}=a.payload,t={[L]:"collection_published",[D]:"collection_approved",[R]:"collection_rejected",[b]:"updated_collection_managers"}[a.actionType];return s.jsx(o,{collectionId:e.id,text:s.jsx(i,{id:`transaction.${t}`,values:{name:s.jsx(S,{to:h.collectionDetail(e.id),children:e.name})}}),tx:a})}case X:{const{collection:e,mints:t}=a.payload,n=t.length===1,r=t[0].item,d=n?{item:r}:{collection:e};return s.jsx(o,{...d,text:s.jsx(i,{id:n?"transaction.collection_item_minted":"transaction.collection_items_minted",values:{collectionName:s.jsx(S,{to:h.collectionDetail(e.id),children:e.name}),itemName:s.jsx(S,{to:h.itemDetail(r.id),children:r.name}),count:Z(t)}}),tx:a})}case W:{const{chainId:e}=a,{collection:t,minters:n}=a.payload,r=A(n,t.minters),d=A(t.minters,n),u=q(e),E=f(d,u),p=f(r,u);let m="";return E?m="transaction.unset_collection_on_sale":p?m="transaction.set_collection_on_sale":m="transaction.updated_collection_minters",s.jsx(o,{collectionId:t.id,text:s.jsx(i,{id:m,values:{name:s.jsx(S,{to:h.collectionDetail(t.id),children:t.name})}}),tx:a})}case Q:{const{address:e,ens:t}=a.payload;return s.jsx(o,{subdomain:t.subdomain,text:s.jsx(i,{id:"transaction.set_ens_resolver",values:{address:s.jsx(_,{address:e}),name:t.subdomain}}),tx:a})}case J:{const{address:e,ens:t,land:n}=a.payload;return s.jsx(o,{subdomain:t.subdomain,text:n?s.jsx(i,{id:"transaction.set_ens_content",values:{address:s.jsx(_,{address:e}),name:t.subdomain,land_link:s.jsx(S,{to:h.landDetail(n.id),children:n.name})}}):s.jsx(i,{id:"transaction.unset_ens_content",values:{address:s.jsx(_,{address:e}),name:t.subdomain}}),tx:a})}case G:{const{address:e,allowance:t}=a.payload;return s.jsx(o,{address:e,text:Y(t)?s.jsx(i,{id:"transaction.allowed_claim_mana",values:{address:s.jsx(_,{address:e})}}):s.jsx(i,{id:"transaction.disallowed_claim_mana",values:{address:s.jsx(_,{address:e})}}),tx:a})}case V:{const{subdomain:e}=a.payload;return s.jsx(o,{subdomain:e,text:s.jsx(i,{id:"transaction.claim_name",values:{name:e}}),tx:a})}case K:{const{ens:e}=a.payload;return s.jsx(o,{subdomain:e.subdomain,text:s.jsx(i,{id:"transaction.reclaim_name",values:{subdomain:e.subdomain}}),tx:a})}case $:{const{count:e,collectionId:t,collectionName:n}=a.payload;return s.jsx(o,{tx:a,collectionId:t,text:s.jsx(i,{id:"transaction.rescue_items",values:{count:e,collectionName:s.jsx(S,{to:h.collectionDetail(t),children:n})}})})}default:return null}},fs=N.memo(As),bs=c=>{const{address:a,transactions:e,onClearHistory:t,isLoggedIn:n}=c,[r,d]=j.useState(!1),u=j.useCallback(()=>{a&&t(a),d(!1)},[a,t]),E=j.useCallback(()=>d(!0),[d]),p=j.useCallback(()=>d(!1),[d]);let m=null;return n?e.length===0?m=s.jsx("div",{className:"center",children:s.jsx("p",{children:x("activity_page.empty")})}):m=s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"history-header",children:[s.jsx("div",{className:"left",children:s.jsx(l.Header,{sub:!0,children:x("activity_page.latest_activity")})}),s.jsx("div",{className:"right",children:s.jsx(l.Button,{basic:!0,onClick:E,children:x("activity_page.clear_history")})})]}),s.jsx("div",{className:"transactions",children:e.map(g=>s.jsx(fs,{tx:g},g.hash)).reverse()})]}):m=s.jsx(Cs,{}),s.jsxs(s.Fragment,{children:[s.jsx(ds,{}),s.jsx(hs,{}),s.jsx(l.Page,{className:"ActivityPage",children:m}),s.jsxs(l.Modal,{size:"tiny",open:r,children:[s.jsx(l.Modal.Header,{children:x("activity_page.clear_history_modal.title")}),s.jsx(l.Modal.Content,{children:x("activity_page.clear_history_modal.text")}),s.jsxs(l.Modal.Actions,{children:[s.jsx(l.Button,{onClick:p,children:x("global.cancel")}),s.jsx(l.Button,{primary:!0,onClick:u,children:x("global.proceed")})]})]}),s.jsx(ms,{})]})},Ls=N.memo(bs),Ds=c=>({isLoggedIn:us(c),address:_s(c),transactions:js(c)}),Rs=c=>({onClearHistory:a=>c(Ss(a))}),ws=xs(Ds,Rs)(Ls);export{ws as default};
1
+ import{af as N,H as s,a1 as P,G as x,dy as k,M as l,dz as T,dA as H,D as j,bB as y,c3 as w,bA as B,bC as _,dB as z,dC as F,dD as $,bm as i,L as S,K as h,dE as K,dF as V,dG as G,dH as Y,dI as J,dJ as Q,dK as W,dL as A,dM as q,dN as f,dO as X,dP as Z,dQ as b,dR as L,dS as D,dT as R,dU as ss,dV as es,dW as as,dX as ts,dY as ns,dZ as is,d_ as cs,d$ as os,e0 as rs,e1 as ls,e2 as O,e3 as U,e4 as M,ah as ds,aj as ms,N as xs,ae as us,aH as _s,e5 as js,e6 as Ss}from"./index-DTzHduGV.js";import{a as hs}from"./Navigation.container-Dviau9XL.js";import{S as Cs}from"./SignInRequired-KH0-S7eT.js";import{a as Es}from"./date-cTX0Inuv.js";import"./selectors-B5a-ETQ1.js";import"./index-_MBfMDRr.js";const ps="_ensImage_er26d_1",gs="_name_er26d_15",Ns="_small_er26d_23",I={ensImage:ps,name:gs,small:Ns};class vs extends N.PureComponent{render(){const{subdomain:a,isSmall:e}=this.props;return s.jsx("div",{className:P(I.ensImage,{[I.small]:e}),children:s.jsx("div",{className:I.name,children:a.slice(0,2)})})}}const Ts=c=>{const a=c.replacedBy||c.hash;return a?H({txHash:a},c.chainId):""},ys=c=>{const{selection:a,address:e,collectionId:t,item:n,subdomain:r,slotsToyBuy:d}=c,u=j.useMemo(()=>new Set((a||[]).map(C=>y(C.x,C.y))),[a]),E=j.useCallback((C,v)=>u.has(y(C,v))?{color:"#ff0044",scale:1.4}:null,[u]),p=j.useCallback((C,v)=>u.has(y(C,v))?{color:"#ff9990",scale:1.2}:null,[u]),[m,g]=j.useMemo(()=>a?w(a):[0,0],[a]);return a?s.jsx(B,{x:m,y:g,layers:[E,p],width:48,height:48,size:9,isDraggable:!1}):e?s.jsx(_,{address:e,size:"huge",imageOnly:!0}):t?s.jsx(z,{collectionId:t}):n?s.jsx(F,{item:n}):r?s.jsx(vs,{subdomain:r,isSmall:!0}):d?s.jsx("div",{className:"slot-image"}):null},Is=c=>{const{text:a,tx:e}=c;return s.jsxs("div",{className:"TransactionDetail",children:[s.jsxs("div",{className:"left",children:[s.jsx("div",{className:"image",children:s.jsx(ys,{...c})}),s.jsxs("div",{className:"text",children:[s.jsx("div",{className:"description",children:a}),s.jsxs("div",{className:"timestamp",children:[Es(e.timestamp),"."]})]})]}),s.jsx("div",{className:"right",children:s.jsxs("a",{href:Ts(e),className:e.status?"status "+e.status:"status",target:"_blank",rel:"noopener noreferrer",children:[s.jsx("div",{className:"description",children:e.status||x("global.loading")}),k(e.status)?s.jsx("div",{className:"spinner",children:s.jsx(l.Loader,{active:!0,size:"mini"})}):null,e.status===T.REVERTED?s.jsx(l.Icon,{name:"warning sign"}):null,e.status===T.CONFIRMED||e.status===T.REPLACED?s.jsx(l.Icon,{name:"check"}):null]})})]})},o=N.memo(Is),As=c=>{const{tx:a}=c;switch(a.actionType){case U:case ls:{const{authorization:e}=a.payload,t=O(e.authorizedAddress),n=O(e.contractAddress),r=a.actionType===U?x("transaction.approved"):x("transaction.unapproved");return s.jsx(o,{address:e.address,text:s.jsx(i,{id:"transaction.approve_token",values:{action:r,contract:s.jsx(M,{chainId:e.chainId,address:e.authorizedAddress,txHash:"",children:t}),token:s.jsx(M,{chainId:e.chainId,address:e.contractAddress,txHash:"",children:n})}}),tx:a})}case rs:{const{name:e,address:t,selection:n}=a.payload;return s.jsx(o,{selection:n,text:s.jsx(i,{id:"transaction.transfer",values:{name:s.jsx("strong",{children:e}),address:s.jsx(_,{address:t})}}),tx:a})}case os:{const{name:e,selection:t}=a.payload;return s.jsx(o,{selection:t,text:s.jsx(i,{id:"transaction.edit",values:{name:s.jsx("strong",{children:e})}}),tx:a})}case cs:{const{name:e,address:t,selection:n}=a.payload;return s.jsx(o,{selection:n,text:s.jsx(i,{id:t?"transaction.set_operator_assigned":"transaction.set_operator_revoked",values:{name:s.jsx("strong",{children:e}),address:s.jsx(_,{address:t})}}),tx:a})}case is:{const{name:e,selection:t}=a.payload;return s.jsx(o,{selection:t,text:s.jsx(i,{id:"transaction.create_estate",values:{name:s.jsx("strong",{children:e})}}),tx:a})}case ns:{const{name:e,count:t,type:n,selection:r}=a.payload;return s.jsx(o,{selection:r,text:s.jsx(i,{id:`transaction.edit_estate_${n}`,values:{name:s.jsx("strong",{children:e}),count:t}}),tx:a})}case ts:{const{name:e,selection:t}=a.payload;return s.jsx(o,{selection:t,text:s.jsx(i,{id:"transaction.dissolve_estate",values:{name:s.jsx("strong",{children:e})}}),tx:a})}case as:{const{address:e,type:t,isApproved:n}=a.payload;return s.jsx(o,{address:e,text:s.jsx(i,{id:n?"transaction.set_manager_assigned":"transaction.set_manager_revoked",values:{address:s.jsx(_,{address:e,textOnly:!0}),type:x(`global.${t}_plural`)}}),tx:a})}case es:{const{item:e}=a.payload;return s.jsx(o,{item:e,text:s.jsx(i,{id:"transaction.set_price_and_beneficiary",values:{name:s.jsx(S,{to:h.itemDetail(e.id),children:e.name})}}),tx:a})}case ss:{const{thirdPartyId:e,thirdPartyName:t}=a.payload;return s.jsx(o,{thirdPartyId:e,text:s.jsx(i,{id:"transaction.disable_third_party",values:{name:t}}),tx:a})}case L:case D:case R:case b:{const{collection:e}=a.payload,t={[L]:"collection_published",[D]:"collection_approved",[R]:"collection_rejected",[b]:"updated_collection_managers"}[a.actionType];return s.jsx(o,{collectionId:e.id,text:s.jsx(i,{id:`transaction.${t}`,values:{name:s.jsx(S,{to:h.collectionDetail(e.id),children:e.name})}}),tx:a})}case X:{const{collection:e,mints:t}=a.payload,n=t.length===1,r=t[0].item,d=n?{item:r}:{collection:e};return s.jsx(o,{...d,text:s.jsx(i,{id:n?"transaction.collection_item_minted":"transaction.collection_items_minted",values:{collectionName:s.jsx(S,{to:h.collectionDetail(e.id),children:e.name}),itemName:s.jsx(S,{to:h.itemDetail(r.id),children:r.name}),count:Z(t)}}),tx:a})}case W:{const{chainId:e}=a,{collection:t,minters:n}=a.payload,r=A(n,t.minters),d=A(t.minters,n),u=q(e),E=f(d,u),p=f(r,u);let m="";return E?m="transaction.unset_collection_on_sale":p?m="transaction.set_collection_on_sale":m="transaction.updated_collection_minters",s.jsx(o,{collectionId:t.id,text:s.jsx(i,{id:m,values:{name:s.jsx(S,{to:h.collectionDetail(t.id),children:t.name})}}),tx:a})}case Q:{const{address:e,ens:t}=a.payload;return s.jsx(o,{subdomain:t.subdomain,text:s.jsx(i,{id:"transaction.set_ens_resolver",values:{address:s.jsx(_,{address:e}),name:t.subdomain}}),tx:a})}case J:{const{address:e,ens:t,land:n}=a.payload;return s.jsx(o,{subdomain:t.subdomain,text:n?s.jsx(i,{id:"transaction.set_ens_content",values:{address:s.jsx(_,{address:e}),name:t.subdomain,land_link:s.jsx(S,{to:h.landDetail(n.id),children:n.name})}}):s.jsx(i,{id:"transaction.unset_ens_content",values:{address:s.jsx(_,{address:e}),name:t.subdomain}}),tx:a})}case G:{const{address:e,allowance:t}=a.payload;return s.jsx(o,{address:e,text:Y(t)?s.jsx(i,{id:"transaction.allowed_claim_mana",values:{address:s.jsx(_,{address:e})}}):s.jsx(i,{id:"transaction.disallowed_claim_mana",values:{address:s.jsx(_,{address:e})}}),tx:a})}case V:{const{subdomain:e}=a.payload;return s.jsx(o,{subdomain:e,text:s.jsx(i,{id:"transaction.claim_name",values:{name:e}}),tx:a})}case K:{const{ens:e}=a.payload;return s.jsx(o,{subdomain:e.subdomain,text:s.jsx(i,{id:"transaction.reclaim_name",values:{subdomain:e.subdomain}}),tx:a})}case $:{const{count:e,collectionId:t,collectionName:n}=a.payload;return s.jsx(o,{tx:a,collectionId:t,text:s.jsx(i,{id:"transaction.rescue_items",values:{count:e,collectionName:s.jsx(S,{to:h.collectionDetail(t),children:n})}})})}default:return null}},fs=N.memo(As),bs=c=>{const{address:a,transactions:e,onClearHistory:t,isLoggedIn:n}=c,[r,d]=j.useState(!1),u=j.useCallback(()=>{a&&t(a),d(!1)},[a,t]),E=j.useCallback(()=>d(!0),[d]),p=j.useCallback(()=>d(!1),[d]);let m=null;return n?e.length===0?m=s.jsx("div",{className:"center",children:s.jsx("p",{children:x("activity_page.empty")})}):m=s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"history-header",children:[s.jsx("div",{className:"left",children:s.jsx(l.Header,{sub:!0,children:x("activity_page.latest_activity")})}),s.jsx("div",{className:"right",children:s.jsx(l.Button,{basic:!0,onClick:E,children:x("activity_page.clear_history")})})]}),s.jsx("div",{className:"transactions",children:e.map(g=>s.jsx(fs,{tx:g},g.hash)).reverse()})]}):m=s.jsx(Cs,{}),s.jsxs(s.Fragment,{children:[s.jsx(ds,{}),s.jsx(hs,{}),s.jsx(l.Page,{className:"ActivityPage",children:m}),s.jsxs(l.Modal,{size:"tiny",open:r,children:[s.jsx(l.Modal.Header,{children:x("activity_page.clear_history_modal.title")}),s.jsx(l.Modal.Content,{children:x("activity_page.clear_history_modal.text")}),s.jsxs(l.Modal.Actions,{children:[s.jsx(l.Button,{onClick:p,children:x("global.cancel")}),s.jsx(l.Button,{primary:!0,onClick:u,children:x("global.proceed")})]})]}),s.jsx(ms,{})]})},Ls=N.memo(bs),Ds=c=>({isLoggedIn:us(c),address:_s(c),transactions:js(c)}),Rs=c=>({onClearHistory:a=>c(Ss(a))}),ws=xs(Ds,Rs)(Ls);export{ws as default};
@@ -1 +1 @@
1
- import{bO as h,bP as s}from"./index-nSeb2kLU.js";var C={};function N(){return C}function D(e){var a=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return a.setUTCFullYear(e.getFullYear()),e.getTime()-a.getTime()}function M(e,a){h(2,arguments);var t=s(e),n=s(a),i=t.getTime()-n.getTime();return i<0?-1:i>0?1:i}function A(e,a){h(2,arguments);var t=s(e),n=s(a),i=t.getFullYear()-n.getFullYear(),o=t.getMonth()-n.getMonth();return i*12+o}function X(e,a){return h(2,arguments),s(e).getTime()-s(a).getTime()}var T={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(a){return a<0?Math.ceil(a):Math.floor(a)}},_="trunc";function I(e){return e?T[e]:T[_]}function R(e){h(1,arguments);var a=s(e);return a.setHours(23,59,59,999),a}function Y(e){h(1,arguments);var a=s(e),t=a.getMonth();return a.setFullYear(a.getFullYear(),t+1,0),a.setHours(23,59,59,999),a}function E(e){h(1,arguments);var a=s(e);return R(a).getTime()===Y(a).getTime()}function j(e,a){h(2,arguments);var t=s(e),n=s(a),i=M(t,n),o=Math.abs(A(t,n)),r;if(o<1)r=0;else{t.getMonth()===1&&t.getDate()>27&&t.setDate(30),t.setMonth(t.getMonth()-i*o);var l=M(t,n)===-i;E(s(e))&&o===1&&M(e,n)===1&&(l=!1),r=i*(o-Number(l))}return r===0?0:r}function q(e,a,t){h(2,arguments);var n=X(e,a)/1e3;return I(void 0)(n)}var V={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},z=function(a,t,n){var i,o=V[a];return typeof o=="string"?i=o:t===1?i=o.one:i=o.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+i:i+" ago":i};function w(e){return function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=a.width?String(a.width):e.defaultWidth,n=e.formats[t]||e.formats[e.defaultWidth];return n}}var H={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},J={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},L={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},U={date:w({formats:H,defaultWidth:"full"}),time:w({formats:J,defaultWidth:"full"}),dateTime:w({formats:L,defaultWidth:"full"})},Q={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},$=function(a,t,n,i){return Q[a]};function g(e){return function(a,t){var n=t!=null&&t.context?String(t.context):"standalone",i;if(n==="formatting"&&e.formattingValues){var o=e.defaultFormattingWidth||e.defaultWidth,r=t!=null&&t.width?String(t.width):o;i=e.formattingValues[r]||e.formattingValues[o]}else{var l=e.defaultWidth,u=t!=null&&t.width?String(t.width):e.defaultWidth;i=e.values[u]||e.values[l]}var m=e.argumentCallback?e.argumentCallback(a):a;return i[m]}}var B={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},K={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},G={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Z={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},ee={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},te={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},ae=function(a,t){var n=Number(a),i=n%100;if(i>20||i<10)switch(i%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},ne={ordinalNumber:ae,era:g({values:B,defaultWidth:"wide"}),quarter:g({values:K,defaultWidth:"wide",argumentCallback:function(a){return a-1}}),month:g({values:G,defaultWidth:"wide"}),day:g({values:Z,defaultWidth:"wide"}),dayPeriod:g({values:ee,defaultWidth:"wide",formattingValues:te,defaultFormattingWidth:"wide"})};function b(e){return function(a){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.width,i=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],o=a.match(i);if(!o)return null;var r=o[0],l=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(l)?ie(l,function(f){return f.test(r)}):re(l,function(f){return f.test(r)}),m;m=e.valueCallback?e.valueCallback(u):u,m=t.valueCallback?t.valueCallback(m):m;var c=a.slice(r.length);return{value:m,rest:c}}}function re(e,a){for(var t in e)if(e.hasOwnProperty(t)&&a(e[t]))return t}function ie(e,a){for(var t=0;t<e.length;t++)if(a(e[t]))return t}function oe(e){return function(a){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=a.match(e.matchPattern);if(!n)return null;var i=n[0],o=a.match(e.parsePattern);if(!o)return null;var r=e.valueCallback?e.valueCallback(o[0]):o[0];r=t.valueCallback?t.valueCallback(r):r;var l=a.slice(i.length);return{value:r,rest:l}}}var ue=/^(\d+)(th|st|nd|rd)?/i,se=/\d+/i,le={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},de={any:[/^b/i,/^(a|c)/i]},me={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},fe={any:[/1/i,/2/i,/3/i,/4/i]},he={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},ce={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},ve={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},ge={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},be={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Me={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},ye={ordinalNumber:oe({matchPattern:ue,parsePattern:se,valueCallback:function(a){return parseInt(a,10)}}),era:b({matchPatterns:le,defaultMatchWidth:"wide",parsePatterns:de,defaultParseWidth:"any"}),quarter:b({matchPatterns:me,defaultMatchWidth:"wide",parsePatterns:fe,defaultParseWidth:"any",valueCallback:function(a){return a+1}}),month:b({matchPatterns:he,defaultMatchWidth:"wide",parsePatterns:ce,defaultParseWidth:"any"}),day:b({matchPatterns:ve,defaultMatchWidth:"wide",parsePatterns:ge,defaultParseWidth:"any"}),dayPeriod:b({matchPatterns:be,defaultMatchWidth:"any",parsePatterns:Me,defaultParseWidth:"any"})},we={code:"en-US",formatDistance:z,formatLong:U,formatRelative:$,localize:ne,match:ye,options:{weekStartsOn:0,firstWeekContainsDate:1}};function W(e,a){if(e==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var t in a)Object.prototype.hasOwnProperty.call(a,t)&&(e[t]=a[t]);return e}function Pe(e){return W({},e)}var S=1440,pe=2520,P=43200,De=86400;function Se(e,a,t){var n,i;h(2,arguments);var o=N(),r=(n=(i=t==null?void 0:t.locale)!==null&&i!==void 0?i:o.locale)!==null&&n!==void 0?n:we;if(!r.formatDistance)throw new RangeError("locale must contain formatDistance property");var l=M(e,a);if(isNaN(l))throw new RangeError("Invalid time value");var u=W(Pe(t),{addSuffix:!!(t!=null&&t.addSuffix),comparison:l}),m,c;l>0?(m=s(a),c=s(e)):(m=s(e),c=s(a));var f=q(c,m),k=(D(c)-D(m))/1e3,d=Math.round((f-k)/60),v;if(d<2)return t!=null&&t.includeSeconds?f<5?r.formatDistance("lessThanXSeconds",5,u):f<10?r.formatDistance("lessThanXSeconds",10,u):f<20?r.formatDistance("lessThanXSeconds",20,u):f<40?r.formatDistance("halfAMinute",0,u):f<60?r.formatDistance("lessThanXMinutes",1,u):r.formatDistance("xMinutes",1,u):d===0?r.formatDistance("lessThanXMinutes",1,u):r.formatDistance("xMinutes",d,u);if(d<45)return r.formatDistance("xMinutes",d,u);if(d<90)return r.formatDistance("aboutXHours",1,u);if(d<S){var F=Math.round(d/60);return r.formatDistance("aboutXHours",F,u)}else{if(d<pe)return r.formatDistance("xDays",1,u);if(d<P){var O=Math.round(d/S);return r.formatDistance("xDays",O,u)}else if(d<De)return v=Math.round(d/P),r.formatDistance("aboutXMonths",v,u)}if(v=j(c,m),v<12){var x=Math.round(d/P);return r.formatDistance("xMonths",x,u)}else{var p=v%12,y=Math.floor(v/12);return p<3?r.formatDistance("aboutXYears",y,u):p<9?r.formatDistance("overXYears",y,u):r.formatDistance("almostXYears",y+1,u)}}export{g as a,w as b,oe as c,b as d,D as e,Se as f,N as g,we as l};
1
+ import{bO as h,bP as s}from"./index-DTzHduGV.js";var C={};function N(){return C}function D(e){var a=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return a.setUTCFullYear(e.getFullYear()),e.getTime()-a.getTime()}function M(e,a){h(2,arguments);var t=s(e),n=s(a),i=t.getTime()-n.getTime();return i<0?-1:i>0?1:i}function A(e,a){h(2,arguments);var t=s(e),n=s(a),i=t.getFullYear()-n.getFullYear(),o=t.getMonth()-n.getMonth();return i*12+o}function X(e,a){return h(2,arguments),s(e).getTime()-s(a).getTime()}var T={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(a){return a<0?Math.ceil(a):Math.floor(a)}},_="trunc";function I(e){return e?T[e]:T[_]}function R(e){h(1,arguments);var a=s(e);return a.setHours(23,59,59,999),a}function Y(e){h(1,arguments);var a=s(e),t=a.getMonth();return a.setFullYear(a.getFullYear(),t+1,0),a.setHours(23,59,59,999),a}function E(e){h(1,arguments);var a=s(e);return R(a).getTime()===Y(a).getTime()}function j(e,a){h(2,arguments);var t=s(e),n=s(a),i=M(t,n),o=Math.abs(A(t,n)),r;if(o<1)r=0;else{t.getMonth()===1&&t.getDate()>27&&t.setDate(30),t.setMonth(t.getMonth()-i*o);var l=M(t,n)===-i;E(s(e))&&o===1&&M(e,n)===1&&(l=!1),r=i*(o-Number(l))}return r===0?0:r}function q(e,a,t){h(2,arguments);var n=X(e,a)/1e3;return I(void 0)(n)}var V={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},z=function(a,t,n){var i,o=V[a];return typeof o=="string"?i=o:t===1?i=o.one:i=o.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+i:i+" ago":i};function w(e){return function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=a.width?String(a.width):e.defaultWidth,n=e.formats[t]||e.formats[e.defaultWidth];return n}}var H={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},J={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},L={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},U={date:w({formats:H,defaultWidth:"full"}),time:w({formats:J,defaultWidth:"full"}),dateTime:w({formats:L,defaultWidth:"full"})},Q={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},$=function(a,t,n,i){return Q[a]};function g(e){return function(a,t){var n=t!=null&&t.context?String(t.context):"standalone",i;if(n==="formatting"&&e.formattingValues){var o=e.defaultFormattingWidth||e.defaultWidth,r=t!=null&&t.width?String(t.width):o;i=e.formattingValues[r]||e.formattingValues[o]}else{var l=e.defaultWidth,u=t!=null&&t.width?String(t.width):e.defaultWidth;i=e.values[u]||e.values[l]}var m=e.argumentCallback?e.argumentCallback(a):a;return i[m]}}var B={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},K={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},G={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Z={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},ee={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},te={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},ae=function(a,t){var n=Number(a),i=n%100;if(i>20||i<10)switch(i%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},ne={ordinalNumber:ae,era:g({values:B,defaultWidth:"wide"}),quarter:g({values:K,defaultWidth:"wide",argumentCallback:function(a){return a-1}}),month:g({values:G,defaultWidth:"wide"}),day:g({values:Z,defaultWidth:"wide"}),dayPeriod:g({values:ee,defaultWidth:"wide",formattingValues:te,defaultFormattingWidth:"wide"})};function b(e){return function(a){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.width,i=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],o=a.match(i);if(!o)return null;var r=o[0],l=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(l)?ie(l,function(f){return f.test(r)}):re(l,function(f){return f.test(r)}),m;m=e.valueCallback?e.valueCallback(u):u,m=t.valueCallback?t.valueCallback(m):m;var c=a.slice(r.length);return{value:m,rest:c}}}function re(e,a){for(var t in e)if(e.hasOwnProperty(t)&&a(e[t]))return t}function ie(e,a){for(var t=0;t<e.length;t++)if(a(e[t]))return t}function oe(e){return function(a){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=a.match(e.matchPattern);if(!n)return null;var i=n[0],o=a.match(e.parsePattern);if(!o)return null;var r=e.valueCallback?e.valueCallback(o[0]):o[0];r=t.valueCallback?t.valueCallback(r):r;var l=a.slice(i.length);return{value:r,rest:l}}}var ue=/^(\d+)(th|st|nd|rd)?/i,se=/\d+/i,le={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},de={any:[/^b/i,/^(a|c)/i]},me={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},fe={any:[/1/i,/2/i,/3/i,/4/i]},he={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},ce={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},ve={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},ge={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},be={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Me={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},ye={ordinalNumber:oe({matchPattern:ue,parsePattern:se,valueCallback:function(a){return parseInt(a,10)}}),era:b({matchPatterns:le,defaultMatchWidth:"wide",parsePatterns:de,defaultParseWidth:"any"}),quarter:b({matchPatterns:me,defaultMatchWidth:"wide",parsePatterns:fe,defaultParseWidth:"any",valueCallback:function(a){return a+1}}),month:b({matchPatterns:he,defaultMatchWidth:"wide",parsePatterns:ce,defaultParseWidth:"any"}),day:b({matchPatterns:ve,defaultMatchWidth:"wide",parsePatterns:ge,defaultParseWidth:"any"}),dayPeriod:b({matchPatterns:be,defaultMatchWidth:"any",parsePatterns:Me,defaultParseWidth:"any"})},we={code:"en-US",formatDistance:z,formatLong:U,formatRelative:$,localize:ne,match:ye,options:{weekStartsOn:0,firstWeekContainsDate:1}};function W(e,a){if(e==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var t in a)Object.prototype.hasOwnProperty.call(a,t)&&(e[t]=a[t]);return e}function Pe(e){return W({},e)}var S=1440,pe=2520,P=43200,De=86400;function Se(e,a,t){var n,i;h(2,arguments);var o=N(),r=(n=(i=t==null?void 0:t.locale)!==null&&i!==void 0?i:o.locale)!==null&&n!==void 0?n:we;if(!r.formatDistance)throw new RangeError("locale must contain formatDistance property");var l=M(e,a);if(isNaN(l))throw new RangeError("Invalid time value");var u=W(Pe(t),{addSuffix:!!(t!=null&&t.addSuffix),comparison:l}),m,c;l>0?(m=s(a),c=s(e)):(m=s(e),c=s(a));var f=q(c,m),k=(D(c)-D(m))/1e3,d=Math.round((f-k)/60),v;if(d<2)return t!=null&&t.includeSeconds?f<5?r.formatDistance("lessThanXSeconds",5,u):f<10?r.formatDistance("lessThanXSeconds",10,u):f<20?r.formatDistance("lessThanXSeconds",20,u):f<40?r.formatDistance("halfAMinute",0,u):f<60?r.formatDistance("lessThanXMinutes",1,u):r.formatDistance("xMinutes",1,u):d===0?r.formatDistance("lessThanXMinutes",1,u):r.formatDistance("xMinutes",d,u);if(d<45)return r.formatDistance("xMinutes",d,u);if(d<90)return r.formatDistance("aboutXHours",1,u);if(d<S){var F=Math.round(d/60);return r.formatDistance("aboutXHours",F,u)}else{if(d<pe)return r.formatDistance("xDays",1,u);if(d<P){var O=Math.round(d/S);return r.formatDistance("xDays",O,u)}else if(d<De)return v=Math.round(d/P),r.formatDistance("aboutXMonths",v,u)}if(v=j(c,m),v<12){var x=Math.round(d/P);return r.formatDistance("xMonths",x,u)}else{var p=v%12,y=Math.floor(v/12);return p<3?r.formatDistance("aboutXYears",y,u):p<9?r.formatDistance("overXYears",y,u):r.formatDistance("almostXYears",y+1,u)}}export{g as a,w as b,oe as c,b as d,D as e,Se as f,N as g,we as l};
@@ -0,0 +1 @@
1
+ import{al as o}from"./index-DTzHduGV.js";export{o as default};
@@ -1 +1 @@
1
- var f=Object.defineProperty;var N=(a,l,e)=>l in a?f(a,l,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[l]=e;var c=(a,l,e)=>N(a,typeof l!="symbol"?l+"":l,e);import{D as j,aA as S,H as s,L as y,K as p,J as C,G as r,N as P,O as F,R as L,X as _,aM as d,ah as w,M as n,aj as A,aN as D,ac as E,aO as I,aP as M,aQ as O,aR as b,aS as B,aT as T,aU as R,aV as k,ae as G,ad as V,aW as m}from"./index-nSeb2kLU.js";import{B as $}from"./Back-DVDrV4XS.js";const W=["page","sortBy","sortOrder","group","ethAddress"];var x;let z=(x=class extends j.PureComponent{constructor(){super(...arguments);c(this,"state",{isDeleting:!1});c(this,"handleOnClick",()=>{const{onClick:e,pool:t}=this.props;e&&e(t)});c(this,"handleConfirmDeleteProject",()=>{this.setState({isDeleting:!0})});c(this,"handleCancelDeleteProject",()=>{this.setState({isDeleting:!1})});c(this,"handleClearDeployment",()=>{const{pool:e,onOpenModal:t}=this.props;t("DeployModal",{view:S.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(y,{to:p.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"})," ",r("public_page.parcel_count",{parcels:t})]}),e.statistics&&s.jsxs("div",{className:"component",children:[s.jsx(C,{name:"scene-object"})," ",r("public_page.item_count",{items:e.statistics.transforms})]})]})})]})]})}},c(x,"defaultProps",{items:0}),x);const U=(a,l)=>{const{pool:e}=l,t=F(a)[e.sceneId];return{items:t&&t.sdk6?t.sdk6.metrics.entities:0,deploymentStatus:L(a)[l.pool.id]}},H=a=>({onOpenModal:(l,e)=>a(_(l,e))}),K=P(U,H)(z);let q=class extends j.PureComponent{constructor(){super(...arguments);c(this,"handleChangeGroup",(e,t)=>{const{group:i,...o}=this.getFilters(),h=1;t.value==="all"?this.handleChangeFilters({...o,page:h}):this.handleChangeFilters({...o,page:h,group:t.value})});c(this,"handleChangeUser",(e,t)=>{const{ethAddress:i,...o}=this.getFilters(),h=1;t.value==="all"?this.handleChangeFilters({...o,page:h}):this.handleChangeFilters({...o,page:h,ethAddress:t.value})});c(this,"handleChangeSort",(e,t)=>{const i=this.getFilters(),o=1;if(t.value&&i.sortBy!==t.value)switch(t.value){case d.NAME:this.handleChangeFilters({...i,page:o,sortBy:t.value,sortOrder:"asc"});break;default:this.handleChangeFilters({...i,page:o,sortBy:t.value,sortOrder:"desc"})}});c(this,"handlePageChange",(e,t)=>{const i=this.getFilters(),o=Number(t.activePage);!Number.isNaN(o)&&o>0&&this.handleChangeFilters({...i,page:o})})}componentDidMount(){const{location:e}=this.props,t=this.getFilters();(e.search===""||e.search==="?")&&(t.sortBy=d.NEWEST,t.sortOrder="desc"),this.handleChangeFilters(t)}getFilters(e=this.props){return W.reduce((t,i)=>{const o=e[i];return o!==void 0&&(t[i]=o),t},{})}handleChangeFilters(e){const{onPageChange:t,onLoadPools:i}=this.props;t(e),i(e)}render(){const{pools:e,total:t,totalPages:i,isLoggedIn:o,onNavigateToScenes:h}=this.props,g=this.getFilters(),u={firstItem:null,lastItem:null};return g.page===1&&(u.prevItem=null),g.page===i&&(u.nextItem=null),s.jsxs(s.Fragment,{children:[s.jsx(w,{}),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($,{absolute:!0,onClick:h}),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:r("scene_list_page.projects_title")})})}),s.jsx(n.Column,{align:"right",children:s.jsxs(n.Row,{children:[s.jsx(n.Responsive,{minWidth:1025,as:j.Fragment,children:o&&s.jsx(n.Dropdown,{direction:"left",value:g.ethAddress||"all",options:[{value:"all",text:r("scene_list_page.filters.all_users")},{value:"me",text:r("scene_list_page.filters.only_me")}],onChange:this.handleChangeUser})}),s.jsx(n.Dropdown,{direction:"left",value:g.sortBy,options:[{value:d.NEWEST,text:r("scene_list_page.filters.newest")},{value:d.NAME,text:r("scene_list_page.filters.name")},{value:d.LIKES,text:r("scene_list_page.filters.likes")},{value:d.ITEMS,text:r("scene_list_page.filters.items")},{value:d.SMART_ITEMS,text:r("scene_list_page.filters.smart_items")},{value:d.SIZE,text:r("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:r("scene_list_page.no_projects")}),Array.isArray(e)&&t!==0&&s.jsx(s.Fragment,{children:e.map(v=>s.jsx(K,{pool:v},v.id))})]})})]}),s.jsx(n.Container,{children:t!==null&&i!==null&&s.jsx(n.Pagination,{totalPages:i,activePage:g.page,onPageChange:this.handlePageChange,...u})})]})}),s.jsx(A,{})]})}};const J=a=>({location:D(a),pools:E(a),poolGroups:I(a),total:M(a),totalPages:O(a),page:b(a),sortBy:B(a),sortOrder:T(a),group:R(a),ethAddress:k(a),isLoggedIn:G(a)}),Q=a=>({onOpenModal:(l,e)=>a(_(l,e)),onLoadPools:l=>a(V(l)),onPageChange:l=>a(m(p.poolSearch(l))),onNavigateToScenes:()=>a(m(p.scenes())),onNavegateToViewPool:l=>a(m(p.poolView(l)))}),te=P(J,Q)(q);export{te as default};
1
+ var f=Object.defineProperty;var N=(a,l,e)=>l in a?f(a,l,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[l]=e;var c=(a,l,e)=>N(a,typeof l!="symbol"?l+"":l,e);import{D as j,aA as S,H as s,L as y,K as p,J as C,G as r,N as P,O as F,R as L,X as _,aM as d,ah as w,M as n,aj as A,aN as D,ac as E,aO as I,aP as M,aQ as O,aR as b,aS as B,aT as T,aU as R,aV as k,ae as G,ad as V,aW as m}from"./index-DTzHduGV.js";import{B as $}from"./Back-BY-tj0mY.js";const W=["page","sortBy","sortOrder","group","ethAddress"];var x;let z=(x=class extends j.PureComponent{constructor(){super(...arguments);c(this,"state",{isDeleting:!1});c(this,"handleOnClick",()=>{const{onClick:e,pool:t}=this.props;e&&e(t)});c(this,"handleConfirmDeleteProject",()=>{this.setState({isDeleting:!0})});c(this,"handleCancelDeleteProject",()=>{this.setState({isDeleting:!1})});c(this,"handleClearDeployment",()=>{const{pool:e,onOpenModal:t}=this.props;t("DeployModal",{view:S.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(y,{to:p.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"})," ",r("public_page.parcel_count",{parcels:t})]}),e.statistics&&s.jsxs("div",{className:"component",children:[s.jsx(C,{name:"scene-object"})," ",r("public_page.item_count",{items:e.statistics.transforms})]})]})})]})]})}},c(x,"defaultProps",{items:0}),x);const U=(a,l)=>{const{pool:e}=l,t=F(a)[e.sceneId];return{items:t&&t.sdk6?t.sdk6.metrics.entities:0,deploymentStatus:L(a)[l.pool.id]}},H=a=>({onOpenModal:(l,e)=>a(_(l,e))}),K=P(U,H)(z);let q=class extends j.PureComponent{constructor(){super(...arguments);c(this,"handleChangeGroup",(e,t)=>{const{group:i,...o}=this.getFilters(),h=1;t.value==="all"?this.handleChangeFilters({...o,page:h}):this.handleChangeFilters({...o,page:h,group:t.value})});c(this,"handleChangeUser",(e,t)=>{const{ethAddress:i,...o}=this.getFilters(),h=1;t.value==="all"?this.handleChangeFilters({...o,page:h}):this.handleChangeFilters({...o,page:h,ethAddress:t.value})});c(this,"handleChangeSort",(e,t)=>{const i=this.getFilters(),o=1;if(t.value&&i.sortBy!==t.value)switch(t.value){case d.NAME:this.handleChangeFilters({...i,page:o,sortBy:t.value,sortOrder:"asc"});break;default:this.handleChangeFilters({...i,page:o,sortBy:t.value,sortOrder:"desc"})}});c(this,"handlePageChange",(e,t)=>{const i=this.getFilters(),o=Number(t.activePage);!Number.isNaN(o)&&o>0&&this.handleChangeFilters({...i,page:o})})}componentDidMount(){const{location:e}=this.props,t=this.getFilters();(e.search===""||e.search==="?")&&(t.sortBy=d.NEWEST,t.sortOrder="desc"),this.handleChangeFilters(t)}getFilters(e=this.props){return W.reduce((t,i)=>{const o=e[i];return o!==void 0&&(t[i]=o),t},{})}handleChangeFilters(e){const{onPageChange:t,onLoadPools:i}=this.props;t(e),i(e)}render(){const{pools:e,total:t,totalPages:i,isLoggedIn:o,onNavigateToScenes:h}=this.props,g=this.getFilters(),u={firstItem:null,lastItem:null};return g.page===1&&(u.prevItem=null),g.page===i&&(u.nextItem=null),s.jsxs(s.Fragment,{children:[s.jsx(w,{}),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($,{absolute:!0,onClick:h}),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:r("scene_list_page.projects_title")})})}),s.jsx(n.Column,{align:"right",children:s.jsxs(n.Row,{children:[s.jsx(n.Responsive,{minWidth:1025,as:j.Fragment,children:o&&s.jsx(n.Dropdown,{direction:"left",value:g.ethAddress||"all",options:[{value:"all",text:r("scene_list_page.filters.all_users")},{value:"me",text:r("scene_list_page.filters.only_me")}],onChange:this.handleChangeUser})}),s.jsx(n.Dropdown,{direction:"left",value:g.sortBy,options:[{value:d.NEWEST,text:r("scene_list_page.filters.newest")},{value:d.NAME,text:r("scene_list_page.filters.name")},{value:d.LIKES,text:r("scene_list_page.filters.likes")},{value:d.ITEMS,text:r("scene_list_page.filters.items")},{value:d.SMART_ITEMS,text:r("scene_list_page.filters.smart_items")},{value:d.SIZE,text:r("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:r("scene_list_page.no_projects")}),Array.isArray(e)&&t!==0&&s.jsx(s.Fragment,{children:e.map(v=>s.jsx(K,{pool:v},v.id))})]})})]}),s.jsx(n.Container,{children:t!==null&&i!==null&&s.jsx(n.Pagination,{totalPages:i,activePage:g.page,onPageChange:this.handlePageChange,...u})})]})}),s.jsx(A,{})]})}};const J=a=>({location:D(a),pools:E(a),poolGroups:I(a),total:M(a),totalPages:O(a),page:b(a),sortBy:B(a),sortOrder:T(a),group:R(a),ethAddress:k(a),isLoggedIn:G(a)}),Q=a=>({onOpenModal:(l,e)=>a(_(l,e)),onLoadPools:l=>a(V(l)),onPageChange:l=>a(m(p.poolSearch(l))),onNavigateToScenes:()=>a(m(p.scenes())),onNavegateToViewPool:l=>a(m(p.poolView(l)))}),te=P(J,Q)(q);export{te as default};
@@ -0,0 +1 @@
1
+ ._dropdown_1a07a_1{border:1px solid var(--gray);border-radius:0 5px 5px 0;border-left:0}._ellipsis_1a07a_9{margin:auto!important}._dropdown_1a07a_1 ._menu_1a07a_13>._disabled_1a07a_13._item_1a07a_13{pointer-events:all}._dropdown_1a07a_1 ._menu_1a07a_13>._disabled_1a07a_13._item_1a07a_13 a{cursor:default}._itemImage_10lcv_1{min-width:48px;max-width:48px;height:48px;padding:5px;margin-right:24px}._itemStatus_10lcv_9{margin-right:4px}._mana_10lcv_13{font-size:15px!important;font-weight:400;line-height:0}._grid_10lcv_19{padding:10px 0!important;color:var(--text);border-bottom:1px solid var(--divider)}._grid_10lcv_19:hover{background-color:#24212966;color:var(--text)}._row_10lcv_30{align-items:center;font-size:15px}._avatarColumn_10lcv_35{align-items:center;flex-direction:inherit!important}._avatarContainer_10lcv_40{display:flex}._info_10lcv_44{width:calc(100% - 80px);display:flex}._nameWrapper_10lcv_49{display:flex;align-items:center}._badgeContainer_10lcv_54{margin-left:8px}._badge_10lcv_54{background-color:#37333d}._badge_10lcv_54:before{filter:none}._name_10lcv_49{font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:flex;align-items:center;text-decoration:underline}._linkAction_10lcv_76{text-transform:uppercase}._subtitle_10lcv_80{margin-top:2px;color:var(--secondary-text);text-transform:uppercase}._itemActions_10lcv_86{display:flex;align-items:center;justify-content:flex-end;width:100%}._removeSaleButton_10lcv_93.ui.button.secondary{background:#fff;color:#000}._status_10lcv_98{padding:4px 10px 4px 8px;border-radius:32px;align-items:center;width:fit-content;text-transform:uppercase;font-weight:700;font-size:12px}._status_10lcv_98 i{margin-right:5px}._ready_10lcv_112{color:#63b4f6;background:#2196f333}._notReady_10lcv_117{background:#fb3b3b33;color:#e97177}._incomplete_10lcv_122{color:var(--primary)}._published_10lcv_126{color:#65d890;background:#34ce7733}._underReview_10lcv_131,._unsynced_10lcv_132{color:#fe9c2a;background:#fe9c2a33}._alertIcon_10lcv_137{display:inline-block;margin-right:.25rem;height:15px;width:15px;vertical-align:text-bottom;background:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='14'%20height='14'%20viewBox='0%200%2014%2014'%3e%3cg%20fill='none'%20fill-rule='evenodd'%3e%3cpath%20d='M-1-1h16v16H-1z'/%3e%3cpath%20fill='%23FFF'%20d='M7%2013.667A6.667%206.667%200%201%201%207%20.333a6.667%206.667%200%200%201%200%2013.334zM7%2012.5a5.5%205.5%200%201%200%200-11%205.5%205.5%200%200%200%200%2011zm0-8.833c.368%200%20.667.298.667.666V7a.667.667%200%200%201-1.334%200V4.333c0-.368.299-.666.667-.666zM7%209a.667.667%200%201%201%200%201.333A.667.667%200%200%201%207%209z'/%3e%3c/g%3e%3c/svg%3e") no-repeat;background-size:contain;filter:invert(64%) sepia(34%) saturate(797%) hue-rotate(331deg) brightness(140%) contrast(98%)}._check_10lcv_148{margin-left:2px}._contextMenuButton_10lcv_152{width:18px!important;background-color:transparent!important;box-shadow:none!important}._contextMenu_10lcv_152{background-color:var(--smart-grey)!important}.CollectionDetailPage>.ui.container>.dcl.section{margin-bottom:48px}.CollectionDetailPage .header-column{flex:none;width:calc(100% - 300px)}.CollectionDetailPage .header-row{width:100%}.CollectionDetailPage .header-row .ui.header.name{line-height:29px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.CollectionDetailPage .edit-collection-name{display:none;margin-left:16px;margin-bottom:2px}.CollectionDetailPage .section:not(.is-published) .header-row:hover .edit-collection-name{display:inline-block}.CollectionDetailPage .ui.circular.label.badge-on-sale{margin-left:1em;padding:.5em .667em!important;color:var(--text);background-color:var(--primary);text-transform:uppercase}.CollectionDetailPage .section:not(.is-published) .header-row:hover{cursor:pointer}.CollectionDetailPage .ui.toggle.on-sale{text-transform:uppercase;margin-right:16px}.CollectionDetailPage .ui.toggle.on-sale>label{white-space:nowrap}.CollectionDetailPage .ui.toggle.checkbox input.hidden:focus+label,.CollectionDetailPage .ui.toggle.on-sale input.hidden+label{padding-left:40px;color:var(--secondary-text)!important}.CollectionDetailPage .dcl.row.actions>.ui.button.action-button{border:1px solid rgba(115,110,125,.4);border-radius:5px;padding:9px 20px;white-space:nowrap}.CollectionDetailPage .left.actions .ui.dropdown{margin-left:8px;border:1px solid rgba(115,110,125,.4);border-radius:5px}.CollectionDetailPage .actions .ui.button.basic.action-button>.text{color:var(--primary)}.CollectionDetailPage .actions .ui.button.compact{padding:10px}.CollectionDetailPage .actions .popup-button{margin-left:16px}.CollectionDetailPage .dcl.row.left.actions.grow.shrink{margin-left:12px}.CollectionDetailPage .actions-container{margin-left:auto}.CollectionDetailPage .Notice{margin-bottom:32px}.CollectionDetailPage .ui.grid.equal.width>.row>.column{padding-left:0}.CollectionDetailPage .dcl.narrow>.empty{padding:200px 0;width:100%;border-radius:8px;border:1px solid var(--divider);justify-content:center;color:var(--secondary-text);text-align:center;line-height:22px;font-size:15px}.CollectionDetailPage .sparkles{width:54px;height:56px;background-image:url(https://cdn.decentraland.org/@dcl/builder-site/7.6.1-15118997411.commit-d0685c7/assets/sparkles-C-WJN0Gh.svg);background-repeat:no-repeat;margin:auto auto 20px}.CollectionDetailPage .CollectionItem:first-child .grid{border-top:1px solid var(--divider)}.CollectionDetailPage .narrow.dcl{width:100%;max-width:1200px}.CollectionDetailPage .CollectionStatus{width:16px;height:16px;margin-bottom:6px;margin-right:12px}.CollectionDetailPage .empty-collection-title{font-weight:500;font-size:17px;line-height:26px;color:#fff;padding-bottom:8px;display:inline-block}.CollectionDetailPage .ui.basic.button.empty-action-button{border:1px solid rgba(115,110,125,.4);border-radius:5px;padding:8px 58px;margin-top:32px;color:var(--primary)}.CollectionDetailPage .ui.basic.button.empty-action-button span{color:var(--primary);font-weight:600}.CollectionDetailPage .ui.container .dcl.back{position:absolute}.CollectionDetailPage .dcl.column.left.shrink.name-container{min-width:0}.CollectionDetailPage .Icon.wearable,.CollectionDetailPage .Icon.emote{margin-right:12px;filter:brightness(100)}.CollectionDetailPage .dcl.tab{display:inline-flex;align-items:center}.CollectionDetailPage .dcl.tab i.circle.icon{margin-left:5px;color:#ff3d61}.CollectionDetailPage .dcl.tabs.fullscreen .ui.container{border-bottom:1px solid rgba(115,110,125,.32)}.CollectionDetailPage.toast.move-item-to-another-collection{padding:0;margin-bottom:96px}.CollectionDetailPage.toast.move-item-to-another-collection>div{margin:16px}.CollectionDetailPage.toast.move-item-to-another-collection .title{color:var(--text);font-size:17px;font-weight:600;line-height:26px;margin-bottom:0}.CollectionDetailPage.toast.move-item-to-another-collection .body{display:flex;flex-direction:column;max-width:348px}.CollectionDetailPage.toast.move-item-to-another-collection .body .description{color:var(--text);font-size:15px;line-height:24px;letter-spacing:0px;margin-bottom:8px}.CollectionDetailPage.toast.move-item-to-another-collection .body .cta{font-size:13px;font-weight:600;line-height:18px;text-transform:uppercase}.CollectionDetailPage.toast.move-item-to-another-collection .toast-icon{margin-right:16px}.CollectionDetailPage.toast.move-item-to-another-collection .toast-icon .two-way-arrow-icon{background-image:url("data:image/svg+xml,%3csvg%20width='48'%20height='48'%20viewBox='0%200%2048%2048'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='48'%20height='48'%20rx='24'%20fill='%23242129'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M20.9395%2024.375C20.8612%2024.481%2020.7309%2024.5417%2020.5989%2024.5417C20.5023%2024.5417%2020.4041%2024.5086%2020.3145%2024.4459L14.2202%2020.1759C14.0799%2020.0776%2014%2019.9299%2014%2019.7707C14%2019.6115%2014.0817%2019.4638%2014.222%2019.3655L20.3188%2015.0959C20.4084%2015.0332%2020.5118%2015%2020.6084%2015C20.8181%2015%2021.0402%2015.1593%2021.0402%2015.4637V18.0513H32.7371C33.0518%2018.0513%2033.2776%2018.3291%2033.2776%2018.6437V20.8986C33.2776%2021.2132%2033.0518%2021.4752%2032.7371%2021.4752H21.0402V24.078C21.0402%2024.1917%2020.999%2024.2944%2020.9395%2024.375ZM27.6837%2024.0846L33.7783%2028.3545C33.9186%2028.4527%2034%2028.5996%2034%2028.7588C34%2028.918%2033.9201%2029.0647%2033.7798%2029.163L27.687%2033.4306C27.5983%2033.4928%2027.5037%2033.5221%2027.4081%2033.5226C27.1994%2033.5213%2027.0003%2033.3698%2027.0003%2033.0668V30.4791H15.2609C14.9462%2030.4791%2014.6995%2030.2013%2014.6995%2029.8867V27.6318C14.6995%2027.3172%2014.9462%2027.0552%2015.2609%2027.0552H27.0003V24.4523C27.0003%2024.1479%2027.2009%2023.9886%2027.4106%2023.9886C27.5073%2023.9886%2027.5941%2024.0218%2027.6837%2024.0846ZM27.4081%2033.5226C27.4071%2033.5226%2027.4061%2033.5226%2027.4052%2033.5226H27.4108C27.4099%2033.5226%2027.409%2033.5226%2027.4081%2033.5226Z'%20fill='white'/%3e%3c/svg%3e");height:48px;width:48px}.CollectionDetailPage .dcl.tabs .secondary-actions.tab{display:inline-flex;position:absolute;right:0;padding:19px 0}.CollectionDetailPage .dcl.narrow .secondary-actions{display:flex;justify-content:flex-end}.CollectionDetailPage .secondary-actions.tab .button.action-button,.CollectionDetailPage .dcl.narrow .secondary-actions .button.action-button{display:flex;align-items:center}.CollectionDetailPage .dcl.tabs .secondary-actions.tab .button.action-button:not(:last-child),.CollectionDetailPage .dcl.narrow .secondary-actions .button.action-button:not(:last-child){margin-right:24px}.CollectionDetailPage .dcl.tabs .secondary-actions.tab .button.basic.inverted{border:1px solid rgba(115,110,125,.4);border-radius:5px;box-shadow:none!important;padding:7px 20px}.CollectionDetailPage .dcl.tabs .secondary-actions.tab .button.action-button>.Icon,.CollectionDetailPage .dcl.narrow .secondary-actions .button.action-button>.Icon{margin-right:5px}.CollectionDetailPage .dcl.tabs .secondary-actions.tab .button.action-button.add-items,.CollectionDetailPage .dcl.narrow .secondary-actions .button.action-button.add-items{border:1px solid rgba(115,110,125,.4);padding:7px 20px}.CollectionDetailPage .dcl.tabs .secondary-actions.tab .button span,.CollectionDetailPage .dcl.narrow .secondary-actions .button span{color:var(--primary)}.CollectionDetailPage .badge-forum-unread-posts{margin-left:8px;color:var(--text);background-color:var(--primary)}.CollectionDetailPage .unsynced-collection.container{display:flex;padding:24px 30px;margin:24px 0;border-radius:8px;background-color:var(--dark-two);align-items:center;text-align:justify}.CollectionDetailPage .unsynced-collection.message{flex:1}.CollectionDetailPage .unsynced-collection.title{margin:0;font-size:15px;font-weight:600;line-height:24px}.CollectionDetailPage .unsynced-collection.text{font-size:15px;font-weight:400;line-height:24px}.CollectionDetailPage .unsynced-collection.alert-icon{margin-right:30px;height:36px;width:36px;background:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='14'%20height='14'%20viewBox='0%200%2014%2014'%3e%3cg%20fill='none'%20fill-rule='evenodd'%3e%3cpath%20d='M-1-1h16v16H-1z'/%3e%3cpath%20fill='%23FFF'%20d='M7%2013.667A6.667%206.667%200%201%201%207%20.333a6.667%206.667%200%200%201%200%2013.334zM7%2012.5a5.5%205.5%200%201%200%200-11%205.5%205.5%200%200%200%200%2011zm0-8.833c.368%200%20.667.298.667.666V7a.667.667%200%200%201-1.334%200V4.333c0-.368.299-.666.667-.666zM7%209a.667.667%200%201%201%200%201.333A.667.667%200%200%201%207%209z'/%3e%3c/g%3e%3c/svg%3e") no-repeat;background-size:contain;filter:invert(64%) sepia(34%) saturate(797%) hue-rotate(331deg) brightness(160%) contrast(98%)}.CollectionDetailPage .unsynced-collection.action-button{padding:7px 12px}.CollectionDetailPage .unsynced-collection.action-button .badge-forum-unread-posts{background-color:var(--text-on-primary);color:var(--primary)}.CollectionDetailPage.toast.deleted-item{padding:0;width:480px}.CollectionDetailPage.toast.deleted-item .toast-info{align-items:center;margin:16px}.CollectionDetailPage.toast.deleted-item .title{font-size:17px;font-weight:600;line-height:26px;margin-bottom:0}.CollectionDetailPage.toast.deleted-item .body .description{font-size:15px;font-weight:400;line-height:24px}.CollectionDetailPage.toast.deleted-item .toast-icon .delete-icon{background:url("data:image/svg+xml,%3csvg%20width='48'%20height='48'%20viewBox='0%200%2048%2048'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='48'%20height='48'%20rx='24'%20fill='%23242129'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M21.5693%2015.0303H17.2345C16.8856%2015.0303%2016.6029%2015.3131%2016.6029%2015.662V17.6462H31.5093V15.6619C31.5093%2015.3131%2031.2265%2015.0303%2030.8777%2015.0303H26.5428V14.2108C26.5428%2014.0944%2026.4485%2014%2026.3321%2014H21.7801C21.6636%2014%2021.5693%2014.0944%2021.5693%2014.2108V15.0303ZM28.7541%2034C29.2936%2034%2029.7372%2033.5746%2029.7598%2033.0355L30.4308%2018.8701H17.6812L18.3522%2033.0355C18.3748%2033.5746%2018.8184%2034%2019.3579%2034H28.7541ZM21.5216%2021.9797C21.7474%2021.9797%2021.9305%2022.1628%2021.9305%2022.3885V30.4815C21.9305%2030.7074%2021.7473%2030.8903%2021.5216%2030.8903H20.8677C20.6419%2030.8903%2020.4589%2030.7073%2020.4589%2030.4815V22.3885C20.4589%2022.1628%2020.6421%2021.9797%2020.8677%2021.9797H21.5216ZM24.3829%2021.9797C24.6087%2021.9797%2024.7917%2022.1628%2024.7917%2022.3885V30.4815C24.7917%2030.7074%2024.6087%2030.8903%2024.3829%2030.8903H23.7291C23.5033%2030.8903%2023.3203%2030.7073%2023.3203%2030.4815V22.3885C23.3203%2022.1628%2023.5034%2021.9797%2023.7291%2021.9797H24.3829ZM27.2443%2021.9797C27.4701%2021.9797%2027.6531%2022.1628%2027.6531%2022.3885V30.4815C27.6531%2030.7074%2027.47%2030.8903%2027.2443%2030.8903H26.5904C26.3646%2030.8903%2026.1816%2030.7073%2026.1816%2030.4815V22.3885C26.1816%2022.1628%2026.3647%2021.9797%2026.5904%2021.9797H27.2443Z'%20fill='white'/%3e%3c/svg%3e") no-repeat;background-size:contain;height:48px;width:48px}.CollectionDetailPage.popup-mint,.CollectionDetailPage.popup-mint:before{background-color:var(--smart-grey)!important}.toast-info .body{max-width:450px;overflow:hidden}