@dcl/builder-site 7.11.0 → 7.11.1-16577655806.commit-745005c

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 (86) hide show
  1. package/assets/{Back-DKfQTc-Y.js → Back-Beh7jDMb.js} +1 -1
  2. package/assets/{CollectionProvider.container-C6IUyZKU.js → CollectionProvider.container-BhtNAG5n.js} +1 -1
  3. package/assets/{CollectionStatus.container-a5zybB7P.js → CollectionStatus.container-DZxv9DYE.js} +1 -1
  4. package/assets/{ConfirmDelete-CTK62F1s.js → ConfirmDelete-D0A6bMDt.js} +1 -1
  5. package/assets/{FileSaver.min-CLisL9ac.js → FileSaver.min-WPceHsxz.js} +1 -1
  6. package/assets/{ItemProvider.container-KlCiiC90.js → ItemProvider.container-BBZFU3wW.js} +1 -1
  7. package/assets/{JumpIn.container-CdFk520p.js → JumpIn.container-Bym5tDi8.js} +1 -1
  8. package/assets/{LandAction-BxqshKkr.js → LandAction-D-Bw6_Dm.js} +1 -1
  9. package/assets/{LandProviderPage-BXbGd9QQ.js → LandProviderPage-ClF5fjK3.js} +1 -1
  10. package/assets/{LoggedInDetailPage.container-BbV-GqgT.js → LoggedInDetailPage.container-sq9dWyyl.js} +1 -1
  11. package/assets/{Navigation-htI9Enob.css → Navigation-DklhG4SF.css} +1 -1
  12. package/assets/{Navigation.container-CbAL2KGU.js → Navigation.container-B6qgpcIy.js} +1 -1
  13. package/assets/{NotFound-DEabQsWJ.js → NotFound-BEqjavN8.js} +1 -1
  14. package/assets/{OptionsDropdown-B338lEhn.js → OptionsDropdown-BDLfjtgb.js} +1 -1
  15. package/assets/{RentalPeriod-BykgAFMU.js → RentalPeriod-3158ZoaJ.js} +1 -1
  16. package/assets/{SDKTag-C0RCmpAc.js → SDKTag-BcbGbxMU.js} +1 -1
  17. package/assets/{SceneStats.container-CpO_S1HK.js → SceneStats.container-DWPisc-N.js} +1 -1
  18. package/assets/{SignInRequired-CRze2iXs.js → SignInRequired-DYe97JEl.js} +1 -1
  19. package/assets/{ThirdPartyKindBadge-Bt4cuvuN.js → ThirdPartyKindBadge-LNadARSf.js} +1 -1
  20. package/assets/{dataReader-CRV4ol54.js → dataReader-DP6rrMiV.js} +1 -1
  21. package/assets/{date-BZvL0KCb.js → date-L74TbZHq.js} +1 -1
  22. package/assets/{fortmatic-DFVfZ7ns.js → fortmatic-DzZ1eSAN.js} +1 -1
  23. package/assets/{index-BEBVpPoE.js → index--MUBzUfF.js} +28 -28
  24. package/assets/index-4RoGV9bt.js +1 -0
  25. package/assets/{index-BTmIrER6.js → index-B7SZAi3R.js} +1 -1
  26. package/assets/{index-BDQ6yqIF.js → index-B7Y_-zvB.js} +1 -1
  27. package/assets/{index-CttBK3Kh.js → index-BKe2Nsow.js} +1 -1
  28. package/assets/{index-D2Bdx2HS.js → index-BLBIx9sZ.js} +1 -1
  29. package/assets/{index-DJnE2Vwp.js → index-BOGiijdu.js} +1 -1
  30. package/assets/{index-PKflfCWE.css → index-BXPjkDZ2.css} +1 -1
  31. package/assets/{index-D5reNhI9.js → index-BiIjj1V4.js} +1 -1
  32. package/assets/{index-BaiPwozb.js → index-Bju0m4Xv.js} +1 -1
  33. package/assets/index-BmIbQso3.css +1 -0
  34. package/assets/index-BqZOahwi.css +1 -0
  35. package/assets/{index-CAnKfGV7.js → index-BuSDBgY-.js} +1 -1
  36. package/assets/{index-h2PlxVEg.js → index-Bvx5pGor.js} +1 -1
  37. package/assets/{index-CshQo5QI.js → index-C2Gk16qJ.js} +1 -1
  38. package/assets/index-C6AYS928.js +1 -0
  39. package/assets/{index-BHKDVAWQ.js → index-CJ9IfKEI.js} +1 -1
  40. package/assets/index-CRajIjOt.js +1 -0
  41. package/assets/{index-rFkoEiox.js → index-CWSIDVuU.js} +1 -1
  42. package/assets/{index-BvYcj2kB.js → index-CX226wvM.js} +1 -1
  43. package/assets/index-C_qh2gyv.js +1 -0
  44. package/assets/{index-CD93MTZR.js → index-CcGXlZ1x.js} +1 -1
  45. package/assets/{index-BI6St4FX.js → index-CjhdraID.js} +1 -1
  46. package/assets/{index-BAg0O-bn.js → index-CkAPeT9P.js} +1 -1
  47. package/assets/{index-BoNWJ1Q-.js → index-Ckx3ufvD.js} +1 -1
  48. package/assets/{index-C3D1kFqV.js → index-CoAanQbi.js} +1 -1
  49. package/assets/{index-DzVl5ARu.js → index-CqscpKXe.js} +1 -1
  50. package/assets/index-D04LAMQG.css +1 -0
  51. package/assets/{index-DCQsy78n.js → index-D3ViBR4H.js} +1 -1
  52. package/assets/{index-CoVxS-zN.js → index-D6sMFzny.js} +1 -1
  53. package/assets/{index-DbXSDWoT.js → index-DCtvI_jK.js} +1 -1
  54. package/assets/{index-CumH0Dy8.js → index-DD8XGRRS.js} +1 -1
  55. package/assets/{index-C9UBvzSz.js → index-DKJ5y-9S.js} +1 -1
  56. package/assets/{index-DQYqZ-OT.js → index-DOji8a_4.js} +1 -1
  57. package/assets/{index-DJQOJmyB.css → index-DV7QtPlL.css} +7 -7
  58. package/assets/{index-DbxD2LiP.css → index-DrYu6k7T.css} +1 -1
  59. package/assets/index-DxOsWXAY.css +1 -0
  60. package/assets/{index-B-Lx6Aq-.js → index-DxxpkvaK.js} +1 -1
  61. package/assets/{index-D4vgViI2.js → index-DziTIpS_.js} +1 -1
  62. package/assets/{index-eqf__esV.js → index-DzvTSlCK.js} +1 -1
  63. package/assets/{index-DvxUjeoE.js → index-L16Bruda.js} +1 -1
  64. package/assets/{index-BmE1qhpl.js → index-Stt84vLk.js} +1 -1
  65. package/assets/{index-BfLhQObB.js → index-ZCqeKVzM.js} +1 -1
  66. package/assets/{index-DH0zRyiU.js → index-ZmYWEzK3.js} +1 -1
  67. package/assets/index-jN9qVAj7.js +2 -0
  68. package/assets/{index-CgeXCCkZ.js → index-mNDHvYhL.js} +1 -1
  69. package/assets/{index-CFCxlP2J.js → index-mXPHSAeJ.js} +1 -1
  70. package/assets/{index-DLlNimxa.js → index-wznIhua-.js} +1 -1
  71. package/assets/index-zLQyvfaL.css +1 -0
  72. package/assets/{index-DrxyU-JG.js → index-zljulAtW.js} +1 -1
  73. package/assets/{index.es-BnC1v_CZ.js → index.es-BJQk-Odo.js} +4 -4
  74. package/assets/{selectors-BhUsOLAO.js → selectors-SjzkoEVG.js} +1 -1
  75. package/index.html +3 -3
  76. package/package.json +3 -3
  77. package/assets/index-B0ZlFFkH.css +0 -1
  78. package/assets/index-Bw3QPhdk.js +0 -1
  79. package/assets/index-C65wrC4r.js +0 -1
  80. package/assets/index-CHpPssCb.js +0 -1
  81. package/assets/index-CgM_5JKq.css +0 -1
  82. package/assets/index-CgRnEuIT.css +0 -1
  83. package/assets/index-D8-mWlVa.css +0 -1
  84. package/assets/index-Dnlf6Pop.js +0 -1
  85. package/assets/index-FeGC_wx3.js +0 -2
  86. package/assets/index-HdllQPxi.css +0 -1
@@ -1 +1 @@
1
- import{H as e,g0 as Ae,g1 as Ge,a1 as V,dB as Re,M as n,N as B,fb as je,Z as Y,eZ as We,G as i,fK as Ue,eR as ee,g2 as Oe,cC as He,X as D,et as ze,g3 as Fe,fW as qe,bw as Ie,fY as Ve,eE as Ne,g4 as Ye,f_ as Ze,D as r,K as M,g5 as Ke,g6 as Qe,eO as T,dC as fe,ep as Je,g7 as Xe,bu as ke,L as ye,fc as be,eo as ve,er as _e,g8 as es,g9 as ue,ga as ss,gb as ts,gc as ns,gd as as,ge as is,ff as os,gf as ls,gg as we,eu as rs,gh as cs,gi as ds,gj as ge,J as ms,cA as _s,cB as us,fO as gs,eP as he,ez as pe,fq as hs,aN as ps,e8 as Cs,gk as xs,gl as js,gm as Is,eC as Ns,gn as fs,go as ks,gp as ys,gq as bs,gr as vs,fS as ws}from"./index-BEBVpPoE.js";import{g as Ss}from"./selector-CtnQnmhq.js";import{L as Ps}from"./LoggedInDetailPage.container-BbV-GqgT.js";import{C as Ds}from"./CollectionProvider.container-C6IUyZKU.js";import{N as Es}from"./NotFound-DEabQsWJ.js";import{B as Ts}from"./Back-DKfQTc-Y.js";import{C as Ms,T as $s}from"./ThirdPartyKindBadge-Bt4cuvuN.js";import{C as se}from"./ConfirmDelete-CTK62F1s.js";import"./Navigation.container-CbAL2KGU.js";import"./selectors-BhUsOLAO.js";import"./SignInRequired-CRze2iXs.js";const Ls=s=>e.jsx("img",{"data-testid":Ae,src:Ge[s.network],alt:s.network,className:s.className}),Bs="_image_142g7_1",As="_main_142g7_2",Gs="_network_142g7_13",z={image:Bs,main:As,network:Gs},Rs=s=>{const{collection:t,collectionId:o,className:l,shape:c}=s;return e.jsxs("div",{className:V(z.main,l),children:[t!=null&&t.itemCount?e.jsx(Re,{collectionId:o,className:z.image}):e.jsx(n.Blockie,{className:z.image,seed:o,size:8,scale:8,shape:c??"circle"}),t!=null&&t.linkedContractNetwork?e.jsx(Ls,{network:t==null?void 0:t.linkedContractNetwork,className:z.network}):null]})},Ws=(s,t)=>({collection:je(s,t.collectionId)}),Us=B(Ws)(Rs),Os="_ellipsis_4huv2_1",Ce={ellipsis:Os},Hs=s=>{const{collection:t}=s,o=Y(),l=()=>{t.isPublished&&t.forumLink&&v(t.forumLink,"_blank")},c=()=>{const{items:m,onOpenModal:d}=s;d("SeeInWorldModal",{itemIds:m.map(k=>k.id)})},a=()=>{const{collection:m,items:d}=s;o.push(Ue(m,d),{fromParam:ee.TP_COLLECTIONS})},x=()=>{const{collection:m,onDelete:d}=s;d(m)},p=()=>{const{collection:m,onOpenModal:d}=s;m.isPublished||d("EditCollectionURNModal",{collection:m})},N=()=>{const{collection:m,onOpenModal:d}=s;d("CreateAndEditMultipleItemsModal",{collectionId:m.id,type:Oe.EDIT})},v=(m,d="")=>{const k=window.open(m,d);k&&k.focus()},f=!We(t)&&!t.isPublished;return e.jsx(n.Dropdown,{className:Ce.dropdown,trigger:e.jsx(n.Button,{basic:!0,children:e.jsx(n.Icon,{className:Ce.ellipsis,size:"large",name:"ellipsis horizontal"})}),inline:!0,direction:"left",children:e.jsxs(n.Dropdown.Menu,{children:[e.jsx(n.Dropdown.Item,{text:i("collection_context_menu.see_in_decentraland"),onClick:c}),e.jsx(n.Dropdown.Item,{text:i("global.open_in_editor"),onClick:a}),e.jsx(n.Popup,{content:i("collection_context_menu.delete_published_collection"),position:"right center",disabled:f,trigger:f?e.jsx(se,{name:t.name,onDelete:x,trigger:e.jsx(n.Dropdown.Item,{text:i("global.delete")})}):e.jsx(n.Dropdown.Item,{text:i("global.delete"),disabled:!0}),hideOnScroll:!0,on:"hover",inverted:!0}),e.jsx(n.Popup,{content:i("collection_context_menu.change_published_urn"),position:"right center",disabled:!t.isPublished,trigger:e.jsx(n.Dropdown.Item,{text:i("collection_context_menu.edit_urn"),onClick:p,disabled:t.isPublished}),hideOnScroll:!0,on:"hover",inverted:!0}),e.jsx(n.Dropdown.Item,{text:i("collection_context_menu.edit_in_bulk"),onClick:N}),e.jsx(n.Popup,{content:i("collection_context_menu.unpublished"),position:"right center",disabled:t.isPublished||!!t.forumLink,trigger:e.jsx(n.Dropdown.Item,{disabled:!t.isPublished||!t.forumLink,text:i("collection_context_menu.forum_post"),onClick:l}),hideOnScroll:!0,on:"hover",inverted:!0})]})})},zs=Hs,Fs=s=>({name:He(s)||""}),qs=s=>({onOpenModal:(t,o)=>s(D(t,o)),onDelete:t=>s(ze(t))}),Vs=B(Fs,qs)(zs),Ys=(s,t)=>{const{collection:o,items:l}=t;return{itemCurations:qe(s,o.id),isLoadingItemCurations:Ie(Ve(s),Ze),isLinkedWearablesPaymentsEnabled:Ne(s),itemsStatus:Ye(s,l.map(c=>c.id))}},Zs=s=>({onNewClick:(t,o,l)=>s(D("PublishWizardCollectionModal",{collectionId:t,itemsWithChanges:o,itemsToPublish:l})),onPushChangesClick:(t,o)=>s(D("PushChangesModal",{collectionId:t,itemsWithChanges:o})),onClick:(t,o,l)=>s(D("PublishThirdPartyCollectionModal",{collectionId:t,itemIds:o,action:l}))}),Ks=B(Ys,Zs)(Fe),Qs="_itemImage_1y9df_1",Js="_itemStatus_1y9df_10",Xs="_grid_1y9df_14",et="_row_1y9df_25",st="_column_1y9df_30",tt="_statusColumn_1y9df_34",nt="_synced_1y9df_39",at="_unsynced_1y9df_43",it="_avatarColumn_1y9df_47",ot="_nameWrapper_1y9df_52",lt="_name_1y9df_52",rt="_itemActions_1y9df_65",ct="_action_1y9df_72",C={itemImage:Qs,itemStatus:Js,grid:Xs,row:et,column:st,statusColumn:tt,synced:nt,unsynced:at,avatarColumn:it,nameWrapper:ot,name:lt,itemActions:rt,action:ct};function dt({item:s,status:t,selected:o,onSelect:l,onOpenModal:c,onDelete:a}){const x=Y(),p=r.useCallback((h,P)=>{l(s,P.checked)},[s,l]),N=r.useCallback(()=>{c("SeeInWorldModal",{itemIds:[s.id]})},[s,c]),v=r.useCallback(()=>{s.isPublished||c("EditItemURNModal",{item:s})},[s,c]),f=r.useCallback(()=>{x.push(M.itemEditor({itemId:s.id,collectionId:s.collectionId}),{fromParam:ee.TP_COLLECTIONS})},[s,x]),m=r.useCallback(()=>{a(s)},[a,s]),d=r.useMemo(()=>{if(!s.urn)return"";try{const h=Ke(s.urn);return Qe(h)?h.thirdPartyTokenId??"":""}catch{return""}},[s]),k=r.useMemo(()=>{switch(t){case T.UNDER_REVIEW:return e.jsx(n.Icon,{name:"clock outline"});case T.SYNCED:return e.jsx(n.Icon,{name:"check circle outline"});case T.UNSYNCED:return e.jsx(n.Icon,{name:"exclamation circle"});default:return null}},[t]),y=s.data;return e.jsx(n.Grid,{className:`CollectionItem ${C.grid}`,columns:"equal",children:e.jsxs(n.Grid.Row,{className:C.row,children:[e.jsxs(n.Grid.Column,{className:`${C.column} ${C.avatarColumn}`,width:5,children:[e.jsx(n.Checkbox,{checked:o,disabled:s.isPublished,onClick:p}),e.jsx(fe,{className:C.itemImage,item:s,hasBadge:!0,badgeSize:"small"}),e.jsx("div",{className:C.nameWrapper,children:e.jsxs("div",{className:C.name,title:s.name,children:[e.jsx(Je,{className:C.itemStatus,item:s}),s.name]})})]}),e.jsx(n.Grid.Column,{className:C.column,children:y.category?e.jsx("div",{children:i(`wearable.category.${y.category}`)}):null}),e.jsx(n.Grid.Column,{className:C.column,children:e.jsx("div",{children:i(`body_shapes.${Xe(s)}`)})}),e.jsx(n.Grid.Column,{className:C.column,children:e.jsx("div",{children:d})}),e.jsxs(n.Grid.Column,{width:3,className:`${C.column} ${C.statusColumn} ${C[t]}`,children:[k,e.jsx("div",{children:i(`third_party_collection_detail_page.synced_statuses.${t}`)})]}),e.jsx(n.Grid.Column,{width:1,className:C.column,children:e.jsx("div",{className:C.itemActions,children:e.jsx(n.Dropdown,{trigger:e.jsx(n.Button,{basic:!0,children:e.jsx(n.Icon,{name:"ellipsis horizontal"})}),inline:!0,direction:"left",className:C.action,onClick:ke(),children:e.jsxs(n.Dropdown.Menu,{children:[e.jsx(n.Dropdown.Item,{text:i("collection_item.see_details"),as:ye,to:M.itemDetail(s.id)}),e.jsx(n.Dropdown.Item,{text:i("collection_context_menu.see_in_decentraland"),onClick:N}),e.jsx(n.Dropdown.Item,{text:i("global.open_in_editor"),onClick:f}),e.jsx(n.Popup,{content:i("collection_item.cannot_edit_urn"),position:"right center",disabled:!s.isPublished,trigger:e.jsx(n.Dropdown.Item,{text:i("collection_item.edit_urn"),onClick:v,disabled:s.isPublished}),hideOnScroll:!0,on:"hover",inverted:!0,flowing:!0}),!s.isPublished&&e.jsx(se,{name:s.name,onDelete:m,trigger:e.jsx(n.Dropdown.Item,{text:i("global.delete")})})]})})})})]})})}const mt=(s,t)=>({status:be(s)[t.item.id]}),_t=s=>({onDelete:t=>s(ve(t)),onOpenModal:(t,o)=>s(D(t,o))}),ut=B(mt,_t)(dt),gt="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_8524_427)'%3e%3cpath%20d='M20.5%203L20.34%203.03L15%205.1L9%203L3.36%204.9C3.15%204.97%203%205.15%203%205.38V20.5C3%2020.78%203.22%2021%203.5%2021L3.66%2020.97L9%2018.9L15%2021L20.64%2019.1C20.85%2019.03%2021%2018.85%2021%2018.62V3.5C21%203.22%2020.78%203%2020.5%203ZM15%2019L9%2016.89V5L15%207.11V19Z'%20fill='%23A09BA8'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_8524_427'%3e%3crect%20width='24'%20height='24'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",ht="data:image/svg+xml,%3csvg%20width='12'%20height='12'%20viewBox='0%200%2012%2012'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10.669%200H1.33362C0.593463%200%200%200.600131%200%201.33362V10.669C0%2011.4025%200.593463%2012.0026%201.33362%2012.0026H10.669C11.4025%2012.0026%2012.0026%2011.4025%2012.0026%2010.669V1.33362C12.0026%200.600131%2011.4092%200%2010.669%200ZM10.669%2010.669H1.33362V2.66725H10.669V10.669ZM7.00152%206.66812C7.00152%207.22157%206.55476%207.66834%206.00131%207.66834C5.44785%207.66834%205.00109%207.22157%205.00109%206.66812C5.00109%206.11466%205.44785%205.6679%206.00131%205.6679C6.55476%205.6679%207.00152%206.11466%207.00152%206.66812ZM6.00131%204.00087C4.18091%204.00087%202.62724%205.10778%202.00044%206.66812C2.62724%208.22846%204.18091%209.33537%206.00131%209.33537C7.8217%209.33537%209.37537%208.22846%2010.0022%206.66812C9.37537%205.10778%207.8217%204.00087%206.00131%204.00087ZM6.00131%208.33515C5.08111%208.33515%204.33428%207.58832%204.33428%206.66812C4.33428%205.74792%205.08111%205.00109%206.00131%205.00109C6.92151%205.00109%207.66834%205.74792%207.66834%206.66812C7.66834%207.58832%206.92151%208.33515%206.00131%208.33515Z'%20fill='%23ECEBED'/%3e%3c/svg%3e",pt="_status_rgxu1_1",Ct="_pending_migration_rgxu1_14",xt="_synced_rgxu1_19",jt="_unpublished_rgxu1_24",It="_unsynced_rgxu1_25",Nt="_pending_mapping_rgxu1_30",ft="_under_review_rgxu1_31",kt="_icon_rgxu1_10",F={status:pt,pending_migration:Ct,synced:xt,unpublished:jt,unsynced:It,pending_mapping:Nt,under_review:ft,icon:kt},yt=s=>{const{status:t,item:o}=s,l=!o.mappings&&_e(o.urn),c=!o.isMappingComplete&&_e(o.urn),a=r.useMemo(()=>{if(l)return e.jsx("img",{src:gt,className:F.icon});if(c)return e.jsx(n.Icon,{name:"warning circle"});switch(t){case T.UNDER_REVIEW:return e.jsx("img",{src:ht,className:F.icon});case T.SYNCED:return e.jsx(n.Icon,{name:"check circle"});case T.UNSYNCED:case T.UNPUBLISHED:return e.jsx(n.Icon,{name:"cloud upload"})}},[t,l,c]),x=r.useMemo(()=>l?i("item_status.pending_mapping"):c?i("item_status.pending_migration"):i(`item_status.${t}`),[t,l,c]),p=r.useMemo(()=>l?"pending_mapping":c?"pending_migration":t,[t,l,c]);return e.jsxs("div",{className:V(F[p],F.status),children:[a," ",x]})},bt="_itemImage_1rili_1",vt="_itemStatus_1rili_10",wt="_grid_1rili_14",St="_loading_1rili_21",Pt="_row_1rili_26",Dt="_column_1rili_31",Et="_avatarColumn_1rili_35",Tt="_nameWrapper_1rili_40",Mt="_name_1rili_40",$t="_itemActions_1rili_53",Lt="_action_1rili_60",Bt="_overlay_1rili_65",I={itemImage:bt,itemStatus:vt,grid:wt,loading:St,row:Pt,column:Dt,avatarColumn:Et,nameWrapper:Tt,name:Mt,itemActions:$t,action:Lt,overlay:Bt};function At({item:s,status:t,selected:o,loading:l,collection:c,onSaveItem:a,onSelect:x,onOpenModal:p,onDelete:N}){const v=Y(),f=r.useMemo(()=>es(s),[s]),m=r.useMemo(()=>c.linkedContractAddress&&c.linkedContractNetwork?{address:c.linkedContractAddress,network:c.linkedContractNetwork}:null,[c]),[d,k]=r.useState(f),y=r.useMemo(()=>{if(d&&m){const S=ue(d,m);return ss(S)?void 0:"Invalid mapping"}},[d,m]);r.useEffect(()=>{!m||y||(!f&&d||f&&d&&!ts(f,d))&&h(d,m)},[f,y,d,m]);const h=r.useCallback(ns((S,E)=>{const $=ue(S,E);a({...s,mappings:$})},1e3),[a]),P=r.useCallback((S,E)=>{l||x(s,E.checked)},[s,l,x]),w=r.useCallback(()=>{p("SeeInWorldModal",{itemIds:[s.id]})},[s,p]),O=r.useCallback(()=>{s.isPublished||p("EditItemURNModal",{item:s})},[s,p]),Z=r.useCallback(()=>{v.push(M.itemEditor({itemId:s.id,collectionId:s.collectionId}),{fromParam:ee.TP_COLLECTIONS})},[s,v]),A=r.useCallback(()=>{N(s)},[N,s]);return e.jsxs(n.Grid,{className:V(I.grid,l&&I.loading),columns:"equal",children:[l&&e.jsx("div",{className:I.overlay,children:e.jsx(n.Loader,{size:"large",active:!0})}),e.jsxs(n.Grid.Row,{className:I.row,children:[e.jsxs(n.Grid.Column,{className:`${I.column} ${I.avatarColumn}`,width:4,children:[e.jsx(n.Checkbox,{checked:o,disabled:s.isPublished||l,onClick:P}),e.jsx(fe,{className:I.itemImage,item:s,hasBadge:!0,badgeSize:"small"}),e.jsx("div",{className:I.nameWrapper,children:e.jsx("div",{className:I.name,title:s.name,children:s.name})})]}),e.jsx(n.Grid.Column,{children:m&&e.jsx(as,{disabled:l,mapping:d,error:y,onChange:k,isCompact:!0})}),e.jsx(n.Grid.Column,{width:3,className:V(I.column,I.statusColumn),children:e.jsx(yt,{status:t,item:s})}),e.jsx(n.Grid.Column,{width:1,className:I.column,children:e.jsx("div",{className:I.itemActions,children:e.jsx(n.Dropdown,{trigger:e.jsx(n.Button,{basic:!0,children:e.jsx(n.Icon,{name:"ellipsis horizontal"})}),inline:!0,direction:"left",className:I.action,disabled:l,onClick:ke(),children:e.jsxs(n.Dropdown.Menu,{children:[e.jsx(n.Dropdown.Item,{text:i("collection_item.see_details"),as:ye,to:M.itemDetail(s.id)}),e.jsx(n.Dropdown.Item,{text:i("collection_context_menu.see_in_decentraland"),onClick:w}),e.jsx(n.Dropdown.Item,{text:i("global.open_in_editor"),onClick:Z}),e.jsx(n.Popup,{content:i("collection_item.cannot_edit_urn"),position:"right center",disabled:!s.isPublished,trigger:e.jsx(n.Dropdown.Item,{text:i("collection_item.edit_urn"),onClick:O,disabled:s.isPublished}),hideOnScroll:!0,on:"hover",inverted:!0,flowing:!0}),!s.isPublished&&e.jsx(se,{name:s.name,onDelete:A,trigger:e.jsx(n.Dropdown.Item,{text:i("global.delete")})})]})})})})]})]})}const Gt=(s,t)=>{const o=be(s);return{loading:!!is(s)[t.item.id],status:o[t.item.id]}},Rt=s=>({onDelete:t=>s(ve(t)),onSaveItem:t=>s(os(t,{},{onlySaveItem:!0})),onOpenModal:(t,o)=>s(D(t,o))}),Wt=B(Gt,Rt)(At),L=50,Ut="_itemCheckbox_2k9qa_1",Ot="_gridHeader_2k9qa_5",Ht="_itemColumn_2k9qa_15",X={itemCheckbox:Ut,gridHeader:Ot,itemColumn:Ht},zt=({areAllSelected:s,onSelectedAllClick:t})=>e.jsx(n.Grid,{columns:"equal",className:X.gridHeader,children:e.jsxs(n.Grid.Row,{children:[e.jsxs(n.Grid.Column,{width:5,className:X.itemColumn,children:[e.jsx(n.Checkbox,{className:X.itemCheckbox,checked:s,onClick:t})," ",i("global.item")]}),e.jsx(n.Grid.Column,{children:i("global.category")}),e.jsx(n.Grid.Column,{children:i("global.body_shape")}),e.jsx(n.Grid.Column,{children:"URN ID"}),e.jsxs(n.Grid.Column,{width:3,children:[" ",i("collection_row.status")," "]}),e.jsx(n.Grid.Column,{width:1})]})}),Ft="_gridHeader_4acv6_1",qt="_itemColumn_4acv6_11",Vt="_itemCheckbox_4acv6_16",Yt="_linkedToColumn_4acv6_20",q={gridHeader:Ft,itemColumn:qt,itemCheckbox:Vt,linkedToColumn:Yt},Zt=({areAllSelected:s,onSelectedAllClick:t})=>e.jsx(n.Grid,{columns:"equal",className:q.gridHeader,children:e.jsxs(n.Grid.Row,{children:[e.jsxs(n.Grid.Column,{width:4,className:q.itemColumn,children:[e.jsx(n.Checkbox,{className:q.itemCheckbox,checked:s,onClick:t})," ",i("global.item")]}),e.jsxs(n.Grid.Column,{className:q.linkedToColumn,children:[e.jsx("span",{children:i("third_party_collection_detail_page.linked_to")}),e.jsx(ls,{})]}),e.jsxs(n.Grid.Column,{width:3,children:[" ",i("collection_row.status")," "]}),e.jsx(n.Grid.Column,{width:1})]})}),Kt="_main_16i8r_3",Qt="_slots_16i8r_11",Jt="_empty_16i8r_28",Xt="_searchContainer_16i8r_32",en="_searchInfo_16i8r_42",sn="_syncedStatusList_16i8r_46",tn="_selectionInfo_16i8r_53",nn="_header_16i8r_63",an="_content_16i8r_74",on="_title_16i8r_83",ln="_editCollectionName_16i8r_96",rn="_name_16i8r_101",cn="_nameAndType_16i8r_105",dn="_nameWrapper_16i8r_115",mn="_size_16i8r_139",_n="_actions_16i8r_143",un="_body_16i8r_151",gn="_info_16i8r_162",hn="_infoHeader_16i8r_170",pn="_infoContent_16i8r_178",Cn="_slotsIcon_16i8r_195",xn="_copyButton_16i8r_207",jn="_sparkles_16i8r_232",In="_start_16i8r_241",Nn="_migrationBanner_16i8r_254",fn="_type_16i8r_277",kn="_linkedWearableBadge_16i8r_283",yn="_typeBadge_16i8r_288",bn="_programmaticBadge_16i8r_292",vn="_standardBadge_16i8r_296",wn="_loader_16i8r_302",_={main:Kt,slots:Qt,empty:Jt,searchContainer:Xt,searchInfo:en,syncedStatusList:sn,selectionInfo:tn,header:nn,content:an,title:on,editCollectionName:ln,name:rn,nameAndType:cn,nameWrapper:dn,size:mn,actions:_n,body:un,info:gn,infoHeader:hn,infoContent:pn,slotsIcon:Cn,copyButton:xn,sparkles:jn,start:In,migrationBanner:Nn,type:fn,linkedWearableBadge:kn,typeBadge:yn,programmaticBadge:bn,standardBadge:vn,loader:wn},xe=({children:s,title:t,info:o})=>e.jsxs("div",{className:_.info,children:[e.jsxs("div",{className:_.infoHeader,children:[t," ",o&&e.jsx(n.InfoTooltip,{content:o})]}),e.jsx("div",{className:_.infoContent,children:s})]});function Sn({currentPage:s,lastLocation:t,wallet:o,thirdParty:l,items:c,collection:a,totalItems:x,isLoading:p,isThirdPartyV2Enabled:N,isLinkedWearablesPaymentsEnabled:v,onFetchAvailableSlots:f,onFetchThirdParty:m,onNewItem:d,onEditName:k,isLoadingAvailableSlots:y}){const[h,P]=r.useState({}),[w,O]=r.useState(s),[Z,A]=r.useState(!1),[S,E]=r.useState(!1),[$,te]=r.useState("ALL"),G=Y(),ne=t===M.collections();r.useEffect(()=>{l&&l.availableSlots===void 0&&!y&&f(l.id)},[l,y,f]),r.useEffect(()=>{!p&&!l&&(a!=null&&a.urn)&&m(we(a.urn))},[a==null?void 0:a.urn,p,l]),r.useEffect(()=>{if(s!==w&&O(s),S){const u=c.reduce((g,j)=>(g[j.id]=!0,g),{});P(u),A(!1)}},[w,S,c,l,s]);const Se=r.useCallback(()=>{a!=null&&a.id&&d(a.id)},[a==null?void 0:a.id,d]),Pe=r.useCallback(()=>{a&&k(a)},[a,k]),De=r.useCallback(()=>{ne?G.goBack():G.push(M.collections(rs.THIRD_PARTY))},[G,ne]),Ee=r.useCallback((u,g)=>{O(+g.activePage),G.push(M.thirdPartyCollectionDetail(a.id,{page:+g.activePage}))},[a,G]),K=r.useCallback((u,g)=>{P({...h,[u.id]:g}),E(!1),A(!1)},[h]),R=r.useCallback(u=>u.every(g=>h[g.id]),[h]),ae=r.useCallback((u,g)=>{const j={...h},W=!R(u);for(const U of u)j[U.id]=W;P(j),A(!0),E(S&&!!g.checked)},[h,S,R]),ie=r.useCallback(()=>{P({})},[]),oe=r.useMemo(()=>a&&l&&o&&cs(o.address,l),[a,l,o]),Te=r.useCallback(u=>{if(E(!0),a){const g=Math.ceil(x/L);u(a.id,{page:ds(g),limit:L,overridePaginationData:!1})}},[x]),le=r.useCallback((u,{value:g})=>{te(g)},[te]),Me=[{value:"ALL",text:i("third_party_collection_detail_page.synced_filter.all")},{value:"SYNCED",text:i("item_status.synced")},{value:"UNSYNCED",text:i("item_status.unsynced")},...a!=null&&a.isMappingComplete?[]:[{value:"MIGRATION_REQUIRED",text:i("item_status.pending_migration")},{value:"MAPPING_PENDING",text:i("item_status.pending_mapping")}]],$e=r.useMemo(()=>{switch($){case"SYNCED":return{synced:!0};case"UNSYNCED":return{synced:!1};case"MIGRATION_REQUIRED":return{mappingStatus:ge.UNPUBLISHED_MAPPING};case"MAPPING_PENDING":return{mappingStatus:ge.MISSING_MAPPING};default:return{}}},[$]),Le=r.useCallback((u,g,j,W,U)=>{const re=g.filter(b=>h[b.id]),ce=re.length,de=!!(a!=null&&a.linkedContractAddress&&(a!=null&&a.linkedContractNetwork)),H=x,Q=Math.ceil(H/L),me=(a==null?void 0:a.itemCount)===0;return a?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:_.header,children:[e.jsx(Ts,{absolute:!0,onClick:De}),e.jsxs("div",{className:_.content,children:[e.jsxs("div",{className:_.title,children:[e.jsx(Us,{collectionId:a.id}),e.jsxs("div",{className:_.nameAndType,children:[e.jsxs("div",{className:_.nameWrapper,children:[e.jsx(n.Header,{size:"large",className:_.name,onClick:Pe,children:a.name}),!a.isPublished&&e.jsx(ms,{name:"edit",className:_.editCollectionName})]}),e.jsxs("div",{className:_.type,children:[e.jsx(Ms,{isThirdParty:!0}),e.jsx($s,{isProgrammatic:u.isProgrammatic})]})]})]}),e.jsxs("div",{className:_.actions,children:[a.linkedContractAddress&&a.linkedContractNetwork&&e.jsxs(xe,{title:i("third_party_collection_detail_page.smart_contract_address_short"),info:i("third_party_collection_detail_page.smart_contract_address_long"),children:[_s(a.linkedContractAddress)," ",e.jsx(us,{className:_.copyButton,showPopup:!0,text:a.linkedContractAddress,role:"button",children:e.jsx(n.Icon,{name:"copy outline"})})]}),!v&&e.jsxs(xe,{title:i("third_party_collection_detail_page.slots_short"),info:i("third_party_collection_detail_page.slots_long"),children:[e.jsx("div",{className:_.slotsIcon}),y?e.jsx(n.Loader,{active:!0,inline:!0,size:"tiny"}):e.jsxs("span",{children:[u.availableSlots??0," / ",u.maxItems]})]}),e.jsxs(n.Button,{inverted:!0,onClick:Se,children:[e.jsx(n.Icon,{name:"plus"}),i("third_party_collection_detail_page.new_items")]}),u.availableSlots!==void 0?e.jsx(Ks,{collection:a,items:re,slots:u.availableSlots}):null,e.jsx(Vs,{collection:a,items:j})]})]})]}),!a.isMappingComplete&&e.jsxs("div",{className:_.migrationBanner,children:[e.jsx(n.Icon,{name:"sync"})," ",i("third_party_collection_detail_page.migration_banner")]}),e.jsx("div",{className:_.body,children:W?e.jsx("div",{className:_.loader,children:e.jsx(n.Loader,{size:"massive",inline:!0,active:!0})}):e.jsxs(e.Fragment,{children:[(a.itemCount??0)>0&&e.jsxs("div",{className:_.searchContainer,children:[j.length>0&&e.jsx("div",{className:_.searchInfo,children:i("third_party_collection_detail_page.search_info",{page:(w-1)*L+1,pageTotal:Math.min(H,w*L),total:H})}),e.jsx(n.Dropdown,{className:_.syncedStatusList,direction:"left",value:$,options:Me,onChange:le})]}),j.length?e.jsxs(e.Fragment,{children:[ce>0?e.jsxs("div",{className:_.selectionInfo,children:[i("third_party_collection_detail_page.selection",{count:ce})," ",e.jsx("span",{className:"link",onClick:ie,children:i("third_party_collection_detail_page.clear_selection")}),".  ",Z&&Q>1?e.jsx("span",{className:"link",onClick:()=>Te(U),children:i("third_party_collection_detail_page.select_all",{total:H})}):null," "]}):null,e.jsxs("div",{children:[N&&de?e.jsx(Zt,{areAllSelected:R(j),onSelectedAllClick:(b,J)=>ae(j,J)}):e.jsx(zt,{areAllSelected:R(j),onSelectedAllClick:(b,J)=>ae(j,J)}),j.map(b=>N&&de?e.jsx(Wt,{collection:a,item:b,selected:!!h[b.id],onSelect:K},b.id):e.jsx(ut,{collection:a,item:b,selected:!!h[b.id],onSelect:K},b.id)),Q>1?e.jsx(n.Pagination,{firstItem:null,lastItem:null,totalPages:Q,activePage:w,onPageChange:Ee}):null]})]}):e.jsxs("div",{className:_.empty,children:[e.jsx("div",{className:me?_.start:_.sparkles}),me?e.jsxs(e.Fragment,{children:[e.jsx("h3",{children:i("third_party_collection_detail_page.start_adding_items")}),e.jsx("p",{children:i("third_party_collection_detail_page.cant_remove")})]}):e.jsxs(e.Fragment,{children:[e.jsx("h3",{children:i("third_party_collection_detail_page.not_found")}),e.jsx("p",{children:i("third_party_collection_detail_page.try_again")})]})]})]})})]}):(console.error("No collection defined"),null)},[a,h,y,v,N,x,w,K,R,le,ie,$]),Be=oe&&a;return e.jsx(Ds,{id:a==null?void 0:a.id,itemsPage:w,itemsPageSize:L,fetchCollectionItemsOptions:$e,children:({isLoadingCollection:u,isLoadingCollectionItems:g,items:j,paginatedItems:W,onFetchCollectionItemsPages:U})=>e.jsx(Ps,{className:_.main,hasNavigation:!oe&&!p&&!u,isLoading:p||u,children:Be&&l?Le(l,j,W,g,U):e.jsx(Es,{})})})}const Pn=s=>{var N;const t=gs(s)||"",o=je(s,t),l=o?he(o):!1,c=((N=pe(s,t))==null?void 0:N.total)||null,a=o?hs(s,o.id):[],x=o&&pe(s,o.id)||null,p=Number(ps(s).query.page??1);return{items:a,totalItems:c,currentPage:p,paginatedData:x,wallet:Cs(s),collection:o,isThirdPartyV2Enabled:xs(s),isLinkedWearablesPaymentsEnabled:Ne(s),thirdParty:o&&he(o)?js(s,o):null,authorizations:Is(s),isLoading:Ie(Ns(s),ws)||fs(s)||!!(l&&o&&ks(s,we(o.urn))),isLoadingAvailableSlots:ys(s),lastLocation:Ss(s)}},Dn=s=>({onNewItem:t=>s(D("CreateItemsModal",{collectionId:t})),onEditName:t=>s(D("EditCollectionNameModal",{collection:t})),onFetchAvailableSlots:t=>s(bs(t)),onFetchThirdParty:t=>s(vs(t))}),On=B(Pn,Dn)(Sn);export{On as default};
1
+ import{H as e,g0 as Ae,g1 as Ge,a1 as V,dB as Re,M as n,N as B,fc as je,Z as Y,eZ as We,G as i,fK as Ue,eR as ee,g2 as Oe,cC as He,X as D,et as ze,g3 as Fe,fW as qe,bw as Ie,fY as Ve,eE as Ne,g4 as Ye,f_ as Ze,D as r,K as M,g5 as Ke,g6 as Qe,eO as T,dC as fe,ep as Je,g7 as Xe,bu as ke,L as ye,fd as be,eo as ve,er as _e,g8 as es,g9 as ue,ga as ss,gb as ts,gc as ns,gd as as,ge as is,fg as os,gf as ls,gg as we,eu as rs,gh as cs,gi as ds,gj as ge,J as ms,cA as _s,cB as us,fO as gs,eP as he,ez as pe,fr as hs,aN as ps,e8 as Cs,gk as xs,gl as js,gm as Is,eC as Ns,gn as fs,go as ks,gp as ys,gq as bs,gr as vs,fS as ws}from"./index--MUBzUfF.js";import{g as Ss}from"./selector-CtnQnmhq.js";import{L as Ps}from"./LoggedInDetailPage.container-sq9dWyyl.js";import{C as Ds}from"./CollectionProvider.container-BhtNAG5n.js";import{N as Es}from"./NotFound-BEqjavN8.js";import{B as Ts}from"./Back-Beh7jDMb.js";import{C as Ms,T as $s}from"./ThirdPartyKindBadge-LNadARSf.js";import{C as se}from"./ConfirmDelete-D0A6bMDt.js";import"./Navigation.container-B6qgpcIy.js";import"./selectors-SjzkoEVG.js";import"./SignInRequired-DYe97JEl.js";const Ls=s=>e.jsx("img",{"data-testid":Ae,src:Ge[s.network],alt:s.network,className:s.className}),Bs="_image_142g7_1",As="_main_142g7_2",Gs="_network_142g7_13",z={image:Bs,main:As,network:Gs},Rs=s=>{const{collection:t,collectionId:o,className:l,shape:c}=s;return e.jsxs("div",{className:V(z.main,l),children:[t!=null&&t.itemCount?e.jsx(Re,{collectionId:o,className:z.image}):e.jsx(n.Blockie,{className:z.image,seed:o,size:8,scale:8,shape:c??"circle"}),t!=null&&t.linkedContractNetwork?e.jsx(Ls,{network:t==null?void 0:t.linkedContractNetwork,className:z.network}):null]})},Ws=(s,t)=>({collection:je(s,t.collectionId)}),Us=B(Ws)(Rs),Os="_ellipsis_4huv2_1",Ce={ellipsis:Os},Hs=s=>{const{collection:t}=s,o=Y(),l=()=>{t.isPublished&&t.forumLink&&v(t.forumLink,"_blank")},c=()=>{const{items:m,onOpenModal:d}=s;d("SeeInWorldModal",{itemIds:m.map(k=>k.id)})},a=()=>{const{collection:m,items:d}=s;o.push(Ue(m,d),{fromParam:ee.TP_COLLECTIONS})},x=()=>{const{collection:m,onDelete:d}=s;d(m)},p=()=>{const{collection:m,onOpenModal:d}=s;m.isPublished||d("EditCollectionURNModal",{collection:m})},N=()=>{const{collection:m,onOpenModal:d}=s;d("CreateAndEditMultipleItemsModal",{collectionId:m.id,type:Oe.EDIT})},v=(m,d="")=>{const k=window.open(m,d);k&&k.focus()},f=!We(t)&&!t.isPublished;return e.jsx(n.Dropdown,{className:Ce.dropdown,trigger:e.jsx(n.Button,{basic:!0,children:e.jsx(n.Icon,{className:Ce.ellipsis,size:"large",name:"ellipsis horizontal"})}),inline:!0,direction:"left",children:e.jsxs(n.Dropdown.Menu,{children:[e.jsx(n.Dropdown.Item,{text:i("collection_context_menu.see_in_decentraland"),onClick:c}),e.jsx(n.Dropdown.Item,{text:i("global.open_in_editor"),onClick:a}),e.jsx(n.Popup,{content:i("collection_context_menu.delete_published_collection"),position:"right center",disabled:f,trigger:f?e.jsx(se,{name:t.name,onDelete:x,trigger:e.jsx(n.Dropdown.Item,{text:i("global.delete")})}):e.jsx(n.Dropdown.Item,{text:i("global.delete"),disabled:!0}),hideOnScroll:!0,on:"hover",inverted:!0}),e.jsx(n.Popup,{content:i("collection_context_menu.change_published_urn"),position:"right center",disabled:!t.isPublished,trigger:e.jsx(n.Dropdown.Item,{text:i("collection_context_menu.edit_urn"),onClick:p,disabled:t.isPublished}),hideOnScroll:!0,on:"hover",inverted:!0}),e.jsx(n.Dropdown.Item,{text:i("collection_context_menu.edit_in_bulk"),onClick:N}),e.jsx(n.Popup,{content:i("collection_context_menu.unpublished"),position:"right center",disabled:t.isPublished||!!t.forumLink,trigger:e.jsx(n.Dropdown.Item,{disabled:!t.isPublished||!t.forumLink,text:i("collection_context_menu.forum_post"),onClick:l}),hideOnScroll:!0,on:"hover",inverted:!0})]})})},zs=Hs,Fs=s=>({name:He(s)||""}),qs=s=>({onOpenModal:(t,o)=>s(D(t,o)),onDelete:t=>s(ze(t))}),Vs=B(Fs,qs)(zs),Ys=(s,t)=>{const{collection:o,items:l}=t;return{itemCurations:qe(s,o.id),isLoadingItemCurations:Ie(Ve(s),Ze),isLinkedWearablesPaymentsEnabled:Ne(s),itemsStatus:Ye(s,l.map(c=>c.id))}},Zs=s=>({onNewClick:(t,o,l)=>s(D("PublishWizardCollectionModal",{collectionId:t,itemsWithChanges:o,itemsToPublish:l})),onPushChangesClick:(t,o)=>s(D("PushChangesModal",{collectionId:t,itemsWithChanges:o})),onClick:(t,o,l)=>s(D("PublishThirdPartyCollectionModal",{collectionId:t,itemIds:o,action:l}))}),Ks=B(Ys,Zs)(Fe),Qs="_itemImage_1y9df_1",Js="_itemStatus_1y9df_10",Xs="_grid_1y9df_14",et="_row_1y9df_25",st="_column_1y9df_30",tt="_statusColumn_1y9df_34",nt="_synced_1y9df_39",at="_unsynced_1y9df_43",it="_avatarColumn_1y9df_47",ot="_nameWrapper_1y9df_52",lt="_name_1y9df_52",rt="_itemActions_1y9df_65",ct="_action_1y9df_72",C={itemImage:Qs,itemStatus:Js,grid:Xs,row:et,column:st,statusColumn:tt,synced:nt,unsynced:at,avatarColumn:it,nameWrapper:ot,name:lt,itemActions:rt,action:ct};function dt({item:s,status:t,selected:o,onSelect:l,onOpenModal:c,onDelete:a}){const x=Y(),p=r.useCallback((h,P)=>{l(s,P.checked)},[s,l]),N=r.useCallback(()=>{c("SeeInWorldModal",{itemIds:[s.id]})},[s,c]),v=r.useCallback(()=>{s.isPublished||c("EditItemURNModal",{item:s})},[s,c]),f=r.useCallback(()=>{x.push(M.itemEditor({itemId:s.id,collectionId:s.collectionId}),{fromParam:ee.TP_COLLECTIONS})},[s,x]),m=r.useCallback(()=>{a(s)},[a,s]),d=r.useMemo(()=>{if(!s.urn)return"";try{const h=Ke(s.urn);return Qe(h)?h.thirdPartyTokenId??"":""}catch{return""}},[s]),k=r.useMemo(()=>{switch(t){case T.UNDER_REVIEW:return e.jsx(n.Icon,{name:"clock outline"});case T.SYNCED:return e.jsx(n.Icon,{name:"check circle outline"});case T.UNSYNCED:return e.jsx(n.Icon,{name:"exclamation circle"});default:return null}},[t]),y=s.data;return e.jsx(n.Grid,{className:`CollectionItem ${C.grid}`,columns:"equal",children:e.jsxs(n.Grid.Row,{className:C.row,children:[e.jsxs(n.Grid.Column,{className:`${C.column} ${C.avatarColumn}`,width:5,children:[e.jsx(n.Checkbox,{checked:o,disabled:s.isPublished,onClick:p}),e.jsx(fe,{className:C.itemImage,item:s,hasBadge:!0,badgeSize:"small"}),e.jsx("div",{className:C.nameWrapper,children:e.jsxs("div",{className:C.name,title:s.name,children:[e.jsx(Je,{className:C.itemStatus,item:s}),s.name]})})]}),e.jsx(n.Grid.Column,{className:C.column,children:y.category?e.jsx("div",{children:i(`wearable.category.${y.category}`)}):null}),e.jsx(n.Grid.Column,{className:C.column,children:e.jsx("div",{children:i(`body_shapes.${Xe(s)}`)})}),e.jsx(n.Grid.Column,{className:C.column,children:e.jsx("div",{children:d})}),e.jsxs(n.Grid.Column,{width:3,className:`${C.column} ${C.statusColumn} ${C[t]}`,children:[k,e.jsx("div",{children:i(`third_party_collection_detail_page.synced_statuses.${t}`)})]}),e.jsx(n.Grid.Column,{width:1,className:C.column,children:e.jsx("div",{className:C.itemActions,children:e.jsx(n.Dropdown,{trigger:e.jsx(n.Button,{basic:!0,children:e.jsx(n.Icon,{name:"ellipsis horizontal"})}),inline:!0,direction:"left",className:C.action,onClick:ke(),children:e.jsxs(n.Dropdown.Menu,{children:[e.jsx(n.Dropdown.Item,{text:i("collection_item.see_details"),as:ye,to:M.itemDetail(s.id)}),e.jsx(n.Dropdown.Item,{text:i("collection_context_menu.see_in_decentraland"),onClick:N}),e.jsx(n.Dropdown.Item,{text:i("global.open_in_editor"),onClick:f}),e.jsx(n.Popup,{content:i("collection_item.cannot_edit_urn"),position:"right center",disabled:!s.isPublished,trigger:e.jsx(n.Dropdown.Item,{text:i("collection_item.edit_urn"),onClick:v,disabled:s.isPublished}),hideOnScroll:!0,on:"hover",inverted:!0,flowing:!0}),!s.isPublished&&e.jsx(se,{name:s.name,onDelete:m,trigger:e.jsx(n.Dropdown.Item,{text:i("global.delete")})})]})})})})]})})}const mt=(s,t)=>({status:be(s)[t.item.id]}),_t=s=>({onDelete:t=>s(ve(t)),onOpenModal:(t,o)=>s(D(t,o))}),ut=B(mt,_t)(dt),gt="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_8524_427)'%3e%3cpath%20d='M20.5%203L20.34%203.03L15%205.1L9%203L3.36%204.9C3.15%204.97%203%205.15%203%205.38V20.5C3%2020.78%203.22%2021%203.5%2021L3.66%2020.97L9%2018.9L15%2021L20.64%2019.1C20.85%2019.03%2021%2018.85%2021%2018.62V3.5C21%203.22%2020.78%203%2020.5%203ZM15%2019L9%2016.89V5L15%207.11V19Z'%20fill='%23A09BA8'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_8524_427'%3e%3crect%20width='24'%20height='24'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",ht="data:image/svg+xml,%3csvg%20width='12'%20height='12'%20viewBox='0%200%2012%2012'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10.669%200H1.33362C0.593463%200%200%200.600131%200%201.33362V10.669C0%2011.4025%200.593463%2012.0026%201.33362%2012.0026H10.669C11.4025%2012.0026%2012.0026%2011.4025%2012.0026%2010.669V1.33362C12.0026%200.600131%2011.4092%200%2010.669%200ZM10.669%2010.669H1.33362V2.66725H10.669V10.669ZM7.00152%206.66812C7.00152%207.22157%206.55476%207.66834%206.00131%207.66834C5.44785%207.66834%205.00109%207.22157%205.00109%206.66812C5.00109%206.11466%205.44785%205.6679%206.00131%205.6679C6.55476%205.6679%207.00152%206.11466%207.00152%206.66812ZM6.00131%204.00087C4.18091%204.00087%202.62724%205.10778%202.00044%206.66812C2.62724%208.22846%204.18091%209.33537%206.00131%209.33537C7.8217%209.33537%209.37537%208.22846%2010.0022%206.66812C9.37537%205.10778%207.8217%204.00087%206.00131%204.00087ZM6.00131%208.33515C5.08111%208.33515%204.33428%207.58832%204.33428%206.66812C4.33428%205.74792%205.08111%205.00109%206.00131%205.00109C6.92151%205.00109%207.66834%205.74792%207.66834%206.66812C7.66834%207.58832%206.92151%208.33515%206.00131%208.33515Z'%20fill='%23ECEBED'/%3e%3c/svg%3e",pt="_status_rgxu1_1",Ct="_pending_migration_rgxu1_14",xt="_synced_rgxu1_19",jt="_unpublished_rgxu1_24",It="_unsynced_rgxu1_25",Nt="_pending_mapping_rgxu1_30",ft="_under_review_rgxu1_31",kt="_icon_rgxu1_10",F={status:pt,pending_migration:Ct,synced:xt,unpublished:jt,unsynced:It,pending_mapping:Nt,under_review:ft,icon:kt},yt=s=>{const{status:t,item:o}=s,l=!o.mappings&&_e(o.urn),c=!o.isMappingComplete&&_e(o.urn),a=r.useMemo(()=>{if(l)return e.jsx("img",{src:gt,className:F.icon});if(c)return e.jsx(n.Icon,{name:"warning circle"});switch(t){case T.UNDER_REVIEW:return e.jsx("img",{src:ht,className:F.icon});case T.SYNCED:return e.jsx(n.Icon,{name:"check circle"});case T.UNSYNCED:case T.UNPUBLISHED:return e.jsx(n.Icon,{name:"cloud upload"})}},[t,l,c]),x=r.useMemo(()=>l?i("item_status.pending_mapping"):c?i("item_status.pending_migration"):i(`item_status.${t}`),[t,l,c]),p=r.useMemo(()=>l?"pending_mapping":c?"pending_migration":t,[t,l,c]);return e.jsxs("div",{className:V(F[p],F.status),children:[a," ",x]})},bt="_itemImage_1rili_1",vt="_itemStatus_1rili_10",wt="_grid_1rili_14",St="_loading_1rili_21",Pt="_row_1rili_26",Dt="_column_1rili_31",Et="_avatarColumn_1rili_35",Tt="_nameWrapper_1rili_40",Mt="_name_1rili_40",$t="_itemActions_1rili_53",Lt="_action_1rili_60",Bt="_overlay_1rili_65",I={itemImage:bt,itemStatus:vt,grid:wt,loading:St,row:Pt,column:Dt,avatarColumn:Et,nameWrapper:Tt,name:Mt,itemActions:$t,action:Lt,overlay:Bt};function At({item:s,status:t,selected:o,loading:l,collection:c,onSaveItem:a,onSelect:x,onOpenModal:p,onDelete:N}){const v=Y(),f=r.useMemo(()=>es(s),[s]),m=r.useMemo(()=>c.linkedContractAddress&&c.linkedContractNetwork?{address:c.linkedContractAddress,network:c.linkedContractNetwork}:null,[c]),[d,k]=r.useState(f),y=r.useMemo(()=>{if(d&&m){const S=ue(d,m);return ss(S)?void 0:"Invalid mapping"}},[d,m]);r.useEffect(()=>{!m||y||(!f&&d||f&&d&&!ts(f,d))&&h(d,m)},[f,y,d,m]);const h=r.useCallback(ns((S,E)=>{const $=ue(S,E);a({...s,mappings:$})},1e3),[a]),P=r.useCallback((S,E)=>{l||x(s,E.checked)},[s,l,x]),w=r.useCallback(()=>{p("SeeInWorldModal",{itemIds:[s.id]})},[s,p]),O=r.useCallback(()=>{s.isPublished||p("EditItemURNModal",{item:s})},[s,p]),Z=r.useCallback(()=>{v.push(M.itemEditor({itemId:s.id,collectionId:s.collectionId}),{fromParam:ee.TP_COLLECTIONS})},[s,v]),A=r.useCallback(()=>{N(s)},[N,s]);return e.jsxs(n.Grid,{className:V(I.grid,l&&I.loading),columns:"equal",children:[l&&e.jsx("div",{className:I.overlay,children:e.jsx(n.Loader,{size:"large",active:!0})}),e.jsxs(n.Grid.Row,{className:I.row,children:[e.jsxs(n.Grid.Column,{className:`${I.column} ${I.avatarColumn}`,width:4,children:[e.jsx(n.Checkbox,{checked:o,disabled:s.isPublished||l,onClick:P}),e.jsx(fe,{className:I.itemImage,item:s,hasBadge:!0,badgeSize:"small"}),e.jsx("div",{className:I.nameWrapper,children:e.jsx("div",{className:I.name,title:s.name,children:s.name})})]}),e.jsx(n.Grid.Column,{children:m&&e.jsx(as,{disabled:l,mapping:d,error:y,onChange:k,isCompact:!0})}),e.jsx(n.Grid.Column,{width:3,className:V(I.column,I.statusColumn),children:e.jsx(yt,{status:t,item:s})}),e.jsx(n.Grid.Column,{width:1,className:I.column,children:e.jsx("div",{className:I.itemActions,children:e.jsx(n.Dropdown,{trigger:e.jsx(n.Button,{basic:!0,children:e.jsx(n.Icon,{name:"ellipsis horizontal"})}),inline:!0,direction:"left",className:I.action,disabled:l,onClick:ke(),children:e.jsxs(n.Dropdown.Menu,{children:[e.jsx(n.Dropdown.Item,{text:i("collection_item.see_details"),as:ye,to:M.itemDetail(s.id)}),e.jsx(n.Dropdown.Item,{text:i("collection_context_menu.see_in_decentraland"),onClick:w}),e.jsx(n.Dropdown.Item,{text:i("global.open_in_editor"),onClick:Z}),e.jsx(n.Popup,{content:i("collection_item.cannot_edit_urn"),position:"right center",disabled:!s.isPublished,trigger:e.jsx(n.Dropdown.Item,{text:i("collection_item.edit_urn"),onClick:O,disabled:s.isPublished}),hideOnScroll:!0,on:"hover",inverted:!0,flowing:!0}),!s.isPublished&&e.jsx(se,{name:s.name,onDelete:A,trigger:e.jsx(n.Dropdown.Item,{text:i("global.delete")})})]})})})})]})]})}const Gt=(s,t)=>{const o=be(s);return{loading:!!is(s)[t.item.id],status:o[t.item.id]}},Rt=s=>({onDelete:t=>s(ve(t)),onSaveItem:t=>s(os(t,{},{onlySaveItem:!0})),onOpenModal:(t,o)=>s(D(t,o))}),Wt=B(Gt,Rt)(At),L=50,Ut="_itemCheckbox_2k9qa_1",Ot="_gridHeader_2k9qa_5",Ht="_itemColumn_2k9qa_15",X={itemCheckbox:Ut,gridHeader:Ot,itemColumn:Ht},zt=({areAllSelected:s,onSelectedAllClick:t})=>e.jsx(n.Grid,{columns:"equal",className:X.gridHeader,children:e.jsxs(n.Grid.Row,{children:[e.jsxs(n.Grid.Column,{width:5,className:X.itemColumn,children:[e.jsx(n.Checkbox,{className:X.itemCheckbox,checked:s,onClick:t})," ",i("global.item")]}),e.jsx(n.Grid.Column,{children:i("global.category")}),e.jsx(n.Grid.Column,{children:i("global.body_shape")}),e.jsx(n.Grid.Column,{children:"URN ID"}),e.jsxs(n.Grid.Column,{width:3,children:[" ",i("collection_row.status")," "]}),e.jsx(n.Grid.Column,{width:1})]})}),Ft="_gridHeader_4acv6_1",qt="_itemColumn_4acv6_11",Vt="_itemCheckbox_4acv6_16",Yt="_linkedToColumn_4acv6_20",q={gridHeader:Ft,itemColumn:qt,itemCheckbox:Vt,linkedToColumn:Yt},Zt=({areAllSelected:s,onSelectedAllClick:t})=>e.jsx(n.Grid,{columns:"equal",className:q.gridHeader,children:e.jsxs(n.Grid.Row,{children:[e.jsxs(n.Grid.Column,{width:4,className:q.itemColumn,children:[e.jsx(n.Checkbox,{className:q.itemCheckbox,checked:s,onClick:t})," ",i("global.item")]}),e.jsxs(n.Grid.Column,{className:q.linkedToColumn,children:[e.jsx("span",{children:i("third_party_collection_detail_page.linked_to")}),e.jsx(ls,{})]}),e.jsxs(n.Grid.Column,{width:3,children:[" ",i("collection_row.status")," "]}),e.jsx(n.Grid.Column,{width:1})]})}),Kt="_main_16i8r_3",Qt="_slots_16i8r_11",Jt="_empty_16i8r_28",Xt="_searchContainer_16i8r_32",en="_searchInfo_16i8r_42",sn="_syncedStatusList_16i8r_46",tn="_selectionInfo_16i8r_53",nn="_header_16i8r_63",an="_content_16i8r_74",on="_title_16i8r_83",ln="_editCollectionName_16i8r_96",rn="_name_16i8r_101",cn="_nameAndType_16i8r_105",dn="_nameWrapper_16i8r_115",mn="_size_16i8r_139",_n="_actions_16i8r_143",un="_body_16i8r_151",gn="_info_16i8r_162",hn="_infoHeader_16i8r_170",pn="_infoContent_16i8r_178",Cn="_slotsIcon_16i8r_195",xn="_copyButton_16i8r_207",jn="_sparkles_16i8r_232",In="_start_16i8r_241",Nn="_migrationBanner_16i8r_254",fn="_type_16i8r_277",kn="_linkedWearableBadge_16i8r_283",yn="_typeBadge_16i8r_288",bn="_programmaticBadge_16i8r_292",vn="_standardBadge_16i8r_296",wn="_loader_16i8r_302",_={main:Kt,slots:Qt,empty:Jt,searchContainer:Xt,searchInfo:en,syncedStatusList:sn,selectionInfo:tn,header:nn,content:an,title:on,editCollectionName:ln,name:rn,nameAndType:cn,nameWrapper:dn,size:mn,actions:_n,body:un,info:gn,infoHeader:hn,infoContent:pn,slotsIcon:Cn,copyButton:xn,sparkles:jn,start:In,migrationBanner:Nn,type:fn,linkedWearableBadge:kn,typeBadge:yn,programmaticBadge:bn,standardBadge:vn,loader:wn},xe=({children:s,title:t,info:o})=>e.jsxs("div",{className:_.info,children:[e.jsxs("div",{className:_.infoHeader,children:[t," ",o&&e.jsx(n.InfoTooltip,{content:o})]}),e.jsx("div",{className:_.infoContent,children:s})]});function Sn({currentPage:s,lastLocation:t,wallet:o,thirdParty:l,items:c,collection:a,totalItems:x,isLoading:p,isThirdPartyV2Enabled:N,isLinkedWearablesPaymentsEnabled:v,onFetchAvailableSlots:f,onFetchThirdParty:m,onNewItem:d,onEditName:k,isLoadingAvailableSlots:y}){const[h,P]=r.useState({}),[w,O]=r.useState(s),[Z,A]=r.useState(!1),[S,E]=r.useState(!1),[$,te]=r.useState("ALL"),G=Y(),ne=t===M.collections();r.useEffect(()=>{l&&l.availableSlots===void 0&&!y&&f(l.id)},[l,y,f]),r.useEffect(()=>{!p&&!l&&(a!=null&&a.urn)&&m(we(a.urn))},[a==null?void 0:a.urn,p,l]),r.useEffect(()=>{if(s!==w&&O(s),S){const u=c.reduce((g,j)=>(g[j.id]=!0,g),{});P(u),A(!1)}},[w,S,c,l,s]);const Se=r.useCallback(()=>{a!=null&&a.id&&d(a.id)},[a==null?void 0:a.id,d]),Pe=r.useCallback(()=>{a&&k(a)},[a,k]),De=r.useCallback(()=>{ne?G.goBack():G.push(M.collections(rs.THIRD_PARTY))},[G,ne]),Ee=r.useCallback((u,g)=>{O(+g.activePage),G.push(M.thirdPartyCollectionDetail(a.id,{page:+g.activePage}))},[a,G]),K=r.useCallback((u,g)=>{P({...h,[u.id]:g}),E(!1),A(!1)},[h]),R=r.useCallback(u=>u.every(g=>h[g.id]),[h]),ae=r.useCallback((u,g)=>{const j={...h},W=!R(u);for(const U of u)j[U.id]=W;P(j),A(!0),E(S&&!!g.checked)},[h,S,R]),ie=r.useCallback(()=>{P({})},[]),oe=r.useMemo(()=>a&&l&&o&&cs(o.address,l),[a,l,o]),Te=r.useCallback(u=>{if(E(!0),a){const g=Math.ceil(x/L);u(a.id,{page:ds(g),limit:L,overridePaginationData:!1})}},[x]),le=r.useCallback((u,{value:g})=>{te(g)},[te]),Me=[{value:"ALL",text:i("third_party_collection_detail_page.synced_filter.all")},{value:"SYNCED",text:i("item_status.synced")},{value:"UNSYNCED",text:i("item_status.unsynced")},...a!=null&&a.isMappingComplete?[]:[{value:"MIGRATION_REQUIRED",text:i("item_status.pending_migration")},{value:"MAPPING_PENDING",text:i("item_status.pending_mapping")}]],$e=r.useMemo(()=>{switch($){case"SYNCED":return{synced:!0};case"UNSYNCED":return{synced:!1};case"MIGRATION_REQUIRED":return{mappingStatus:ge.UNPUBLISHED_MAPPING};case"MAPPING_PENDING":return{mappingStatus:ge.MISSING_MAPPING};default:return{}}},[$]),Le=r.useCallback((u,g,j,W,U)=>{const re=g.filter(b=>h[b.id]),ce=re.length,de=!!(a!=null&&a.linkedContractAddress&&(a!=null&&a.linkedContractNetwork)),H=x,Q=Math.ceil(H/L),me=(a==null?void 0:a.itemCount)===0;return a?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:_.header,children:[e.jsx(Ts,{absolute:!0,onClick:De}),e.jsxs("div",{className:_.content,children:[e.jsxs("div",{className:_.title,children:[e.jsx(Us,{collectionId:a.id}),e.jsxs("div",{className:_.nameAndType,children:[e.jsxs("div",{className:_.nameWrapper,children:[e.jsx(n.Header,{size:"large",className:_.name,onClick:Pe,children:a.name}),!a.isPublished&&e.jsx(ms,{name:"edit",className:_.editCollectionName})]}),e.jsxs("div",{className:_.type,children:[e.jsx(Ms,{isThirdParty:!0}),e.jsx($s,{isProgrammatic:u.isProgrammatic})]})]})]}),e.jsxs("div",{className:_.actions,children:[a.linkedContractAddress&&a.linkedContractNetwork&&e.jsxs(xe,{title:i("third_party_collection_detail_page.smart_contract_address_short"),info:i("third_party_collection_detail_page.smart_contract_address_long"),children:[_s(a.linkedContractAddress)," ",e.jsx(us,{className:_.copyButton,showPopup:!0,text:a.linkedContractAddress,role:"button",children:e.jsx(n.Icon,{name:"copy outline"})})]}),!v&&e.jsxs(xe,{title:i("third_party_collection_detail_page.slots_short"),info:i("third_party_collection_detail_page.slots_long"),children:[e.jsx("div",{className:_.slotsIcon}),y?e.jsx(n.Loader,{active:!0,inline:!0,size:"tiny"}):e.jsxs("span",{children:[u.availableSlots??0," / ",u.maxItems]})]}),e.jsxs(n.Button,{inverted:!0,onClick:Se,children:[e.jsx(n.Icon,{name:"plus"}),i("third_party_collection_detail_page.new_items")]}),u.availableSlots!==void 0?e.jsx(Ks,{collection:a,items:re,slots:u.availableSlots}):null,e.jsx(Vs,{collection:a,items:j})]})]})]}),!a.isMappingComplete&&e.jsxs("div",{className:_.migrationBanner,children:[e.jsx(n.Icon,{name:"sync"})," ",i("third_party_collection_detail_page.migration_banner")]}),e.jsx("div",{className:_.body,children:W?e.jsx("div",{className:_.loader,children:e.jsx(n.Loader,{size:"massive",inline:!0,active:!0})}):e.jsxs(e.Fragment,{children:[(a.itemCount??0)>0&&e.jsxs("div",{className:_.searchContainer,children:[j.length>0&&e.jsx("div",{className:_.searchInfo,children:i("third_party_collection_detail_page.search_info",{page:(w-1)*L+1,pageTotal:Math.min(H,w*L),total:H})}),e.jsx(n.Dropdown,{className:_.syncedStatusList,direction:"left",value:$,options:Me,onChange:le})]}),j.length?e.jsxs(e.Fragment,{children:[ce>0?e.jsxs("div",{className:_.selectionInfo,children:[i("third_party_collection_detail_page.selection",{count:ce})," ",e.jsx("span",{className:"link",onClick:ie,children:i("third_party_collection_detail_page.clear_selection")}),".  ",Z&&Q>1?e.jsx("span",{className:"link",onClick:()=>Te(U),children:i("third_party_collection_detail_page.select_all",{total:H})}):null," "]}):null,e.jsxs("div",{children:[N&&de?e.jsx(Zt,{areAllSelected:R(j),onSelectedAllClick:(b,J)=>ae(j,J)}):e.jsx(zt,{areAllSelected:R(j),onSelectedAllClick:(b,J)=>ae(j,J)}),j.map(b=>N&&de?e.jsx(Wt,{collection:a,item:b,selected:!!h[b.id],onSelect:K},b.id):e.jsx(ut,{collection:a,item:b,selected:!!h[b.id],onSelect:K},b.id)),Q>1?e.jsx(n.Pagination,{firstItem:null,lastItem:null,totalPages:Q,activePage:w,onPageChange:Ee}):null]})]}):e.jsxs("div",{className:_.empty,children:[e.jsx("div",{className:me?_.start:_.sparkles}),me?e.jsxs(e.Fragment,{children:[e.jsx("h3",{children:i("third_party_collection_detail_page.start_adding_items")}),e.jsx("p",{children:i("third_party_collection_detail_page.cant_remove")})]}):e.jsxs(e.Fragment,{children:[e.jsx("h3",{children:i("third_party_collection_detail_page.not_found")}),e.jsx("p",{children:i("third_party_collection_detail_page.try_again")})]})]})]})})]}):(console.error("No collection defined"),null)},[a,h,y,v,N,x,w,K,R,le,ie,$]),Be=oe&&a;return e.jsx(Ds,{id:a==null?void 0:a.id,itemsPage:w,itemsPageSize:L,fetchCollectionItemsOptions:$e,children:({isLoadingCollection:u,isLoadingCollectionItems:g,items:j,paginatedItems:W,onFetchCollectionItemsPages:U})=>e.jsx(Ps,{className:_.main,hasNavigation:!oe&&!p&&!u,isLoading:p||u,children:Be&&l?Le(l,j,W,g,U):e.jsx(Es,{})})})}const Pn=s=>{var N;const t=gs(s)||"",o=je(s,t),l=o?he(o):!1,c=((N=pe(s,t))==null?void 0:N.total)||null,a=o?hs(s,o.id):[],x=o&&pe(s,o.id)||null,p=Number(ps(s).query.page??1);return{items:a,totalItems:c,currentPage:p,paginatedData:x,wallet:Cs(s),collection:o,isThirdPartyV2Enabled:xs(s),isLinkedWearablesPaymentsEnabled:Ne(s),thirdParty:o&&he(o)?js(s,o):null,authorizations:Is(s),isLoading:Ie(Ns(s),ws)||fs(s)||!!(l&&o&&ks(s,we(o.urn))),isLoadingAvailableSlots:ys(s),lastLocation:Ss(s)}},Dn=s=>({onNewItem:t=>s(D("CreateItemsModal",{collectionId:t})),onEditName:t=>s(D("EditCollectionNameModal",{collection:t})),onFetchAvailableSlots:t=>s(bs(t)),onFetchThirdParty:t=>s(vs(t))}),On=B(Pn,Dn)(Sn);export{On as default};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-CoAanQbi.js","assets/index--MUBzUfF.js","assets/index-DV7QtPlL.css"])))=>i.map(i=>d[i]);
2
+ import{B as pe,_ as me}from"./index--MUBzUfF.js";const he=Symbol(),ee=Object.getPrototypeOf,Y=new WeakMap,ge=e=>e&&(Y.has(e)?Y.get(e):ee(e)===Object.prototype||ee(e)===Array.prototype),ye=e=>ge(e)&&e[he]||null,te=(e,t=!0)=>{Y.set(e,t)},z={BASE_URL:"https://cdn.decentraland.org/@dcl/builder-site/7.11.1-16577655806.commit-745005c",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_BASE_URL:"https://cdn.decentraland.org/@dcl/builder-site/7.11.1-16577655806.commit-745005c",VITE_REACT_APP_WEBSITE_VERSION:"7.11.1-16577655806.commit-745005c"},F=e=>typeof e=="object"&&e!==null,C=new WeakMap,x=new WeakSet,ve=(e=Object.is,t=(o,g)=>new Proxy(o,g),s=o=>F(o)&&!x.has(o)&&(Array.isArray(o)||!(Symbol.iterator in o))&&!(o instanceof WeakMap)&&!(o instanceof WeakSet)&&!(o instanceof Error)&&!(o instanceof Number)&&!(o instanceof Date)&&!(o instanceof String)&&!(o instanceof RegExp)&&!(o instanceof ArrayBuffer),n=o=>{switch(o.status){case"fulfilled":return o.value;case"rejected":throw o.reason;default:throw o}},l=new WeakMap,c=(o,g,I=n)=>{const v=l.get(o);if((v==null?void 0:v[0])===g)return v[1];const b=Array.isArray(o)?[]:Object.create(Object.getPrototypeOf(o));return te(b,!0),l.set(o,[g,b]),Reflect.ownKeys(o).forEach(j=>{if(Object.getOwnPropertyDescriptor(b,j))return;const O=Reflect.get(o,j),A={value:O,enumerable:!0,configurable:!0};if(x.has(O))te(O,!1);else if(O instanceof Promise)delete A.value,A.get=()=>I(O);else if(C.has(O)){const[y,H]=C.get(O);A.value=c(y,H(),I)}Object.defineProperty(b,j,A)}),Object.preventExtensions(b)},d=new WeakMap,f=[1,1],W=o=>{if(!F(o))throw new Error("object required");const g=d.get(o);if(g)return g;let I=f[0];const v=new Set,b=(a,i=++f[0])=>{I!==i&&(I=i,v.forEach(r=>r(a,i)))};let j=f[1];const O=(a=++f[1])=>(j!==a&&!v.size&&(j=a,y.forEach(([i])=>{const r=i[1](a);r>I&&(I=r)})),I),A=a=>(i,r)=>{const h=[...i];h[1]=[a,...h[1]],b(h,r)},y=new Map,H=(a,i)=>{if((z?"production":void 0)!=="production"&&y.has(a))throw new Error("prop listener already exists");if(v.size){const r=i[3](A(a));y.set(a,[i,r])}else y.set(a,[i])},Z=a=>{var i;const r=y.get(a);r&&(y.delete(a),(i=r[1])==null||i.call(r))},ue=a=>(v.add(a),v.size===1&&y.forEach(([r,h],U)=>{if((z?"production":void 0)!=="production"&&h)throw new Error("remove already exists");const N=r[3](A(U));y.set(U,[r,N])}),()=>{v.delete(a),v.size===0&&y.forEach(([r,h],U)=>{h&&(h(),y.set(U,[r]))})}),q=Array.isArray(o)?[]:Object.create(Object.getPrototypeOf(o)),k=t(q,{deleteProperty(a,i){const r=Reflect.get(a,i);Z(i);const h=Reflect.deleteProperty(a,i);return h&&b(["delete",[i],r]),h},set(a,i,r,h){const U=Reflect.has(a,i),N=Reflect.get(a,i,h);if(U&&(e(N,r)||d.has(r)&&e(N,d.get(r))))return!0;Z(i),F(r)&&(r=ye(r)||r);let V=r;if(r instanceof Promise)r.then(L=>{r.status="fulfilled",r.value=L,b(["resolve",[i],L])}).catch(L=>{r.status="rejected",r.reason=L,b(["reject",[i],L])});else{!C.has(r)&&s(r)&&(V=W(r));const L=!x.has(V)&&C.get(V);L&&H(i,L)}return Reflect.set(a,i,V,h),b(["set",[i],r,N]),!0}});d.set(o,k);const fe=[q,O,c,ue];return C.set(k,fe),Reflect.ownKeys(o).forEach(a=>{const i=Object.getOwnPropertyDescriptor(o,a);"value"in i&&(k[a]=o[a],delete i.value,delete i.writable),Object.defineProperty(q,a,i)}),k})=>[W,C,x,e,t,s,n,l,c,d,f],[be]=ve();function P(e={}){return be(e)}function D(e,t,s){const n=C.get(e);(z?"production":void 0)!=="production"&&!n&&console.warn("Please use proxy object");let l;const c=[],d=n[3];let f=!1;const o=d(g=>{c.push(g),l||(l=Promise.resolve().then(()=>{l=void 0,f&&t(c.splice(0))}))});return f=!0,()=>{f=!1,o()}}function we(e,t){const s=C.get(e);(z?"production":void 0)!=="production"&&!s&&console.warn("Please use proxy object");const[n,l,c]=s;return c(n,l(),t)}const u=P({history:["ConnectWallet"],view:"ConnectWallet",data:void 0}),de={state:u,subscribe(e){return D(u,()=>e(u))},push(e,t){e!==u.view&&(u.view=e,t&&(u.data=t),u.history.push(e))},reset(e){u.view=e,u.history=[e]},replace(e){u.history.length>1&&(u.history[u.history.length-1]=e,u.view=e)},goBack(){if(u.history.length>1){u.history.pop();const[e]=u.history.slice(-1);u.view=e}},setData(e){u.data=e}},m={WALLETCONNECT_DEEPLINK_CHOICE:"WALLETCONNECT_DEEPLINK_CHOICE",WCM_VERSION:"WCM_VERSION",RECOMMENDED_WALLET_AMOUNT:9,isMobile(){return typeof window<"u"?!!(window.matchMedia("(pointer:coarse)").matches||/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini/u.test(navigator.userAgent)):!1},isAndroid(){return m.isMobile()&&navigator.userAgent.toLowerCase().includes("android")},isIos(){const e=navigator.userAgent.toLowerCase();return m.isMobile()&&(e.includes("iphone")||e.includes("ipad"))},isHttpUrl(e){return e.startsWith("http://")||e.startsWith("https://")},isArray(e){return Array.isArray(e)&&e.length>0},isTelegram(){return typeof window<"u"&&(!!window.TelegramWebviewProxy||!!window.Telegram||!!window.TelegramWebviewProxyProto)},formatNativeUrl(e,t,s){if(m.isHttpUrl(e))return this.formatUniversalUrl(e,t,s);let n=e;n.includes("://")||(n=e.replaceAll("/","").replaceAll(":",""),n=`${n}://`),n.endsWith("/")||(n=`${n}/`),this.setWalletConnectDeepLink(n,s);const l=encodeURIComponent(t);return`${n}wc?uri=${l}`},formatUniversalUrl(e,t,s){if(!m.isHttpUrl(e))return this.formatNativeUrl(e,t,s);let n=e;if(n.startsWith("https://t.me")){const c=pe.from(t).toString("base64").replace(/[=]/g,"");n.endsWith("/")&&(n=n.slice(0,-1)),this.setWalletConnectDeepLink(n,s);const d=new URL(n);return d.searchParams.set("startapp",c),d.toString()}n.endsWith("/")||(n=`${n}/`),this.setWalletConnectDeepLink(n,s);const l=encodeURIComponent(t);return`${n}wc?uri=${l}`},async wait(e){return new Promise(t=>{setTimeout(t,e)})},openHref(e,t){const s=this.isTelegram()?"_blank":t;window.open(e,s,"noreferrer noopener")},setWalletConnectDeepLink(e,t){try{localStorage.setItem(m.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:e,name:t}))}catch{console.info("Unable to set WalletConnect deep link")}},setWalletConnectAndroidDeepLink(e){try{const[t]=e.split("?");localStorage.setItem(m.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:t,name:"Android"}))}catch{console.info("Unable to set WalletConnect android deep link")}},removeWalletConnectDeepLink(){try{localStorage.removeItem(m.WALLETCONNECT_DEEPLINK_CHOICE)}catch{console.info("Unable to remove WalletConnect deep link")}},setModalVersionInStorage(){try{typeof localStorage<"u"&&localStorage.setItem(m.WCM_VERSION,"2.7.0")}catch{console.info("Unable to set Web3Modal version in storage")}},getWalletRouterData(){var e;const t=(e=de.state.data)==null?void 0:e.Wallet;if(!t)throw new Error('Missing "Wallet" view data');return t}},Ie=typeof location<"u"&&(location.hostname.includes("localhost")||location.protocol.includes("https")),p=P({enabled:Ie,userSessionId:"",events:[],connectedWalletId:void 0}),_e={state:p,subscribe(e){return D(p.events,()=>e(we(p.events[p.events.length-1])))},initialize(){p.enabled&&typeof(crypto==null?void 0:crypto.randomUUID)<"u"&&(p.userSessionId=crypto.randomUUID())},setConnectedWalletId(e){p.connectedWalletId=e},click(e){if(p.enabled){const t={type:"CLICK",name:e.name,userSessionId:p.userSessionId,timestamp:Date.now(),data:e};p.events.push(t)}},track(e){if(p.enabled){const t={type:"TRACK",name:e.name,userSessionId:p.userSessionId,timestamp:Date.now(),data:e};p.events.push(t)}},view(e){if(p.enabled){const t={type:"VIEW",name:e.name,userSessionId:p.userSessionId,timestamp:Date.now(),data:e};p.events.push(t)}}},_=P({chains:void 0,walletConnectUri:void 0,isAuth:!1,isCustomDesktop:!1,isCustomMobile:!1,isDataLoaded:!1,isUiLoaded:!1}),w={state:_,subscribe(e){return D(_,()=>e(_))},setChains(e){_.chains=e},setWalletConnectUri(e){_.walletConnectUri=e},setIsCustomDesktop(e){_.isCustomDesktop=e},setIsCustomMobile(e){_.isCustomMobile=e},setIsDataLoaded(e){_.isDataLoaded=e},setIsUiLoaded(e){_.isUiLoaded=e},setIsAuth(e){_.isAuth=e}},B=P({projectId:"",mobileWallets:void 0,desktopWallets:void 0,walletImages:void 0,chains:void 0,enableAuthMode:!1,enableExplorer:!0,explorerExcludedWalletIds:void 0,explorerRecommendedWalletIds:void 0,termsOfServiceUrl:void 0,privacyPolicyUrl:void 0}),$={state:B,subscribe(e){return D(B,()=>e(B))},setConfig(e){var t,s;_e.initialize(),w.setChains(e.chains),w.setIsAuth(!!e.enableAuthMode),w.setIsCustomMobile(!!((t=e.mobileWallets)!=null&&t.length)),w.setIsCustomDesktop(!!((s=e.desktopWallets)!=null&&s.length)),m.setModalVersionInStorage(),Object.assign(B,e)}};var Ee=Object.defineProperty,se=Object.getOwnPropertySymbols,Oe=Object.prototype.hasOwnProperty,We=Object.prototype.propertyIsEnumerable,ne=(e,t,s)=>t in e?Ee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,Le=(e,t)=>{for(var s in t||(t={}))Oe.call(t,s)&&ne(e,s,t[s]);if(se)for(var s of se(t))We.call(t,s)&&ne(e,s,t[s]);return e};const G="https://explorer-api.walletconnect.com",Q="wcm",X="js-2.7.0";async function K(e,t){const s=Le({sdkType:Q,sdkVersion:X},t),n=new URL(e,G);return n.searchParams.append("projectId",$.state.projectId),Object.entries(s).forEach(([c,d])=>{d&&n.searchParams.append(c,String(d))}),(await fetch(n)).json()}const S={async getDesktopListings(e){return K("/w3m/v1/getDesktopListings",e)},async getMobileListings(e){return K("/w3m/v1/getMobileListings",e)},async getInjectedListings(e){return K("/w3m/v1/getInjectedListings",e)},async getAllListings(e){return K("/w3m/v1/getAllListings",e)},getWalletImageUrl(e){return`${G}/w3m/v1/getWalletImage/${e}?projectId=${$.state.projectId}&sdkType=${Q}&sdkVersion=${X}`},getAssetImageUrl(e){return`${G}/w3m/v1/getAssetImage/${e}?projectId=${$.state.projectId}&sdkType=${Q}&sdkVersion=${X}`}};var Ce=Object.defineProperty,oe=Object.getOwnPropertySymbols,Pe=Object.prototype.hasOwnProperty,Ae=Object.prototype.propertyIsEnumerable,re=(e,t,s)=>t in e?Ce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,Se=(e,t)=>{for(var s in t||(t={}))Pe.call(t,s)&&re(e,s,t[s]);if(oe)for(var s of oe(t))Ae.call(t,s)&&re(e,s,t[s]);return e};const ie=m.isMobile(),E=P({wallets:{listings:[],total:0,page:1},search:{listings:[],total:0,page:1},recomendedWallets:[]}),ke={state:E,async getRecomendedWallets(){const{explorerRecommendedWalletIds:e,explorerExcludedWalletIds:t}=$.state;if(e==="NONE"||t==="ALL"&&!e)return E.recomendedWallets;if(m.isArray(e)){const n={recommendedIds:e.join(",")},{listings:l}=await S.getAllListings(n),c=Object.values(l);c.sort((d,f)=>{const W=e.indexOf(d.id),o=e.indexOf(f.id);return W-o}),E.recomendedWallets=c}else{const{chains:s,isAuth:n}=w.state,l=s==null?void 0:s.join(","),c=m.isArray(t),d={page:1,sdks:n?"auth_v1":void 0,entries:m.RECOMMENDED_WALLET_AMOUNT,chains:l,version:2,excludedIds:c?t.join(","):void 0},{listings:f}=ie?await S.getMobileListings(d):await S.getDesktopListings(d);E.recomendedWallets=Object.values(f)}return E.recomendedWallets},async getWallets(e){const t=Se({},e),{explorerRecommendedWalletIds:s,explorerExcludedWalletIds:n}=$.state,{recomendedWallets:l}=E;if(n==="ALL")return E.wallets;l.length?t.excludedIds=l.map(I=>I.id).join(","):m.isArray(s)&&(t.excludedIds=s.join(",")),m.isArray(n)&&(t.excludedIds=[t.excludedIds,n].filter(Boolean).join(",")),w.state.isAuth&&(t.sdks="auth_v1");const{page:c,search:d}=e,{listings:f,total:W}=ie?await S.getMobileListings(t):await S.getDesktopListings(t),o=Object.values(f),g=d?"search":"wallets";return E[g]={listings:[...E[g].listings,...o],total:W,page:c??1},{listings:o,total:W}},getWalletImageUrl(e){return S.getWalletImageUrl(e)},getAssetImageUrl(e){return S.getAssetImageUrl(e)},resetSearch(){E.search={listings:[],total:0,page:1}}},T=P({open:!1}),J={state:T,subscribe(e){return D(T,()=>e(T))},async open(e){return new Promise(t=>{const{isUiLoaded:s,isDataLoaded:n}=w.state;if(m.removeWalletConnectDeepLink(),w.setWalletConnectUri(e==null?void 0:e.uri),w.setChains(e==null?void 0:e.chains),de.reset("ConnectWallet"),s&&n)T.open=!0,t();else{const l=setInterval(()=>{const c=w.state;c.isUiLoaded&&c.isDataLoaded&&(clearInterval(l),T.open=!0,t())},200)}})},close(){T.open=!1}};var Me=Object.defineProperty,ae=Object.getOwnPropertySymbols,De=Object.prototype.hasOwnProperty,je=Object.prototype.propertyIsEnumerable,le=(e,t,s)=>t in e?Me(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,Ue=(e,t)=>{for(var s in t||(t={}))De.call(t,s)&&le(e,s,t[s]);if(ae)for(var s of ae(t))je.call(t,s)&&le(e,s,t[s]);return e};function Te(){return typeof matchMedia<"u"&&matchMedia("(prefers-color-scheme: dark)").matches}const R=P({themeMode:Te()?"dark":"light"}),ce={state:R,subscribe(e){return D(R,()=>e(R))},setThemeConfig(e){const{themeMode:t,themeVariables:s}=e;t&&(R.themeMode=t),s&&(R.themeVariables=Ue({},s))}},M=P({open:!1,message:"",variant:"success"}),Ve={state:M,subscribe(e){return D(M,()=>e(M))},openToast(e,t){M.open=!0,M.message=e,M.variant=t},closeToast(){M.open=!1}};class $e{constructor(t){this.openModal=J.open,this.closeModal=J.close,this.subscribeModal=J.subscribe,this.setTheme=ce.setThemeConfig,ce.setThemeConfig(t),$.setConfig(t),this.initUi()}async initUi(){if(typeof window<"u"){await me(()=>import("./index-CoAanQbi.js"),__vite__mapDeps([0,1,2]));const t=document.createElement("wcm-modal");document.body.insertAdjacentElement("beforeend",t),w.setIsUiLoaded(!0)}}}const xe=Object.freeze(Object.defineProperty({__proto__:null,WalletConnectModal:$e},Symbol.toStringTag,{value:"Module"}));export{m as C,ke as E,J as M,w as O,de as R,ce as T,Ve as a,_e as b,$ as c,xe as i};
@@ -1 +1 @@
1
- import{D as l,Z as E,du as w,K as I,bB as h,H as e,M as d,G as r,bA as H,N as y,de as B,dj as T,a6 as R,bw as A,cH as O,bK as P,bZ as D,cK as F}from"./index-BEBVpPoE.js";import{L as K}from"./LoggedInDetailPage.container-BbV-GqgT.js";import{B as z}from"./Back-DKfQTc-Y.js";import{N as G}from"./NotFound-DEabQsWJ.js";import"./Navigation.container-CbAL2KGU.js";import"./selectors-BhUsOLAO.js";import"./SignInRequired-CRze2iXs.js";function M(i){const[s,u]=l.useState(void 0),[g,L]=l.useState(void 0),{isLoading:b,ens:o,landTiles:c}=i,m=E(),x=l.useMemo(()=>{const a=Object.values(c||{});if(a.length===1)return a[0].land;let n;for(const t of a)if(t.land.id!==o.landId){n=t.land;break}return n},[c]);l.useEffect(()=>{!s&&!b&&o&&u(x)},[x]);const j=l.useCallback((a,n)=>{const t=h(a,n);return c&&t in c?c[t].land:void 0},[c]),f=l.useCallback((a,n)=>{const t=j(a,n);t&&u(t)},[]),v=l.useCallback(()=>{const a=w(c,s.id);u(a)},[s,c]),S=l.useCallback(()=>{s&&m.push(I.landAssignENS(s.id,o.subdomain))},[o,m,s]),C=l.useCallback((a,n)=>{const t=h(a,n);return(!s||s.id!==t)&&g===t},[]),_=l.useCallback((a,n)=>C(a,n)&&j(a,n)?{color:"#fcc6d1",scale:1.4}:null,[]),k=l.useCallback((a,n)=>{L(h(a,n))},[]),p=l.useCallback(()=>{m.goBack()},[m]),N=s&&o&&s.id===o.landId;return e.jsx(K,{className:"ENSSelectLandPage",hasNavigation:!1,children:b?e.jsx(d.Loader,{active:!0,size:"massive"}):o?e.jsxs(e.Fragment,{children:[e.jsx(z,{absolute:!0,onClick:p}),e.jsxs(d.Narrow,{children:[e.jsx(d.Row,{children:e.jsx(d.Column,{children:e.jsxs(d.Section,{children:[e.jsx(d.Header,{className:"title",size:"large",children:r("ens_select_land_page.title",{name:o?o.subdomain:r("global.name")})}),e.jsx("span",{className:"subtitle",children:r("ens_select_land_page.subtitle")})]})})}),e.jsx("div",{className:"atlas-wrapper",children:e.jsx(H,{showControls:!0,showOwner:!0,isDraggable:!0,landId:s?s.id:void 0,onClick:f,onHover:k,onLocateLand:v,layers:[_]})}),e.jsxs(d.Row,{className:"atlas-footer",children:[e.jsx(d.Column,{grow:!0,children:s?e.jsxs("div",{className:"selected-land",children:[e.jsx("div",{className:"label",children:r("ens_select_land_page.land_selected")}),e.jsxs("div",{className:"land",children:[s.name," (",s.id,")"]})]}):null}),e.jsx(d.Column,{grow:!1,children:e.jsxs("div",{className:"actions",children:[e.jsx(d.Button,{secondary:!0,onClick:p,children:r("global.cancel")}),e.jsx(d.Button,{primary:!0,disabled:!s||N,onClick:S,children:N?r("ens_select_land_page.already_assigned"):r("global.continue")})]})})]})]})]}):e.jsx(G,{})})}const Z=(i,s)=>{const{subdomain:u}=s.match.params,g=B(i);return{ens:T(g,u),isLoading:R(i)||A(O(i),F)||P(i),landTiles:D(i)}},X=y(Z)(M);export{X as default};
1
+ import{D as l,Z as E,du as w,K as I,bB as h,H as e,M as d,G as r,bA as H,N as y,de as B,dj as T,a6 as R,bw as A,cH as O,bK as P,bZ as D,cK as F}from"./index--MUBzUfF.js";import{L as K}from"./LoggedInDetailPage.container-sq9dWyyl.js";import{B as z}from"./Back-Beh7jDMb.js";import{N as G}from"./NotFound-BEqjavN8.js";import"./Navigation.container-B6qgpcIy.js";import"./selectors-SjzkoEVG.js";import"./SignInRequired-DYe97JEl.js";function M(i){const[s,u]=l.useState(void 0),[g,L]=l.useState(void 0),{isLoading:b,ens:o,landTiles:c}=i,m=E(),x=l.useMemo(()=>{const a=Object.values(c||{});if(a.length===1)return a[0].land;let n;for(const t of a)if(t.land.id!==o.landId){n=t.land;break}return n},[c]);l.useEffect(()=>{!s&&!b&&o&&u(x)},[x]);const j=l.useCallback((a,n)=>{const t=h(a,n);return c&&t in c?c[t].land:void 0},[c]),f=l.useCallback((a,n)=>{const t=j(a,n);t&&u(t)},[]),v=l.useCallback(()=>{const a=w(c,s.id);u(a)},[s,c]),S=l.useCallback(()=>{s&&m.push(I.landAssignENS(s.id,o.subdomain))},[o,m,s]),C=l.useCallback((a,n)=>{const t=h(a,n);return(!s||s.id!==t)&&g===t},[]),_=l.useCallback((a,n)=>C(a,n)&&j(a,n)?{color:"#fcc6d1",scale:1.4}:null,[]),k=l.useCallback((a,n)=>{L(h(a,n))},[]),p=l.useCallback(()=>{m.goBack()},[m]),N=s&&o&&s.id===o.landId;return e.jsx(K,{className:"ENSSelectLandPage",hasNavigation:!1,children:b?e.jsx(d.Loader,{active:!0,size:"massive"}):o?e.jsxs(e.Fragment,{children:[e.jsx(z,{absolute:!0,onClick:p}),e.jsxs(d.Narrow,{children:[e.jsx(d.Row,{children:e.jsx(d.Column,{children:e.jsxs(d.Section,{children:[e.jsx(d.Header,{className:"title",size:"large",children:r("ens_select_land_page.title",{name:o?o.subdomain:r("global.name")})}),e.jsx("span",{className:"subtitle",children:r("ens_select_land_page.subtitle")})]})})}),e.jsx("div",{className:"atlas-wrapper",children:e.jsx(H,{showControls:!0,showOwner:!0,isDraggable:!0,landId:s?s.id:void 0,onClick:f,onHover:k,onLocateLand:v,layers:[_]})}),e.jsxs(d.Row,{className:"atlas-footer",children:[e.jsx(d.Column,{grow:!0,children:s?e.jsxs("div",{className:"selected-land",children:[e.jsx("div",{className:"label",children:r("ens_select_land_page.land_selected")}),e.jsxs("div",{className:"land",children:[s.name," (",s.id,")"]})]}):null}),e.jsx(d.Column,{grow:!1,children:e.jsxs("div",{className:"actions",children:[e.jsx(d.Button,{secondary:!0,onClick:p,children:r("global.cancel")}),e.jsx(d.Button,{primary:!0,disabled:!s||N,onClick:S,children:N?r("ens_select_land_page.already_assigned"):r("global.continue")})]})})]})]})]}):e.jsx(G,{})})}const Z=(i,s)=>{const{subdomain:u}=s.match.params,g=B(i);return{ens:T(g,u),isLoading:R(i)||A(O(i),F)||P(i),landTiles:D(i)}},X=y(Z)(M);export{X as default};
@@ -1 +1 @@
1
- import{q as f,B as a}from"./index-BEBVpPoE.js";var l=function(o,r){if(typeof Blob>"u"||!(o instanceof Blob))throw new Error("first argument must be a Blob");if(typeof r!="function")throw new Error("second argument must be a function");const e=new FileReader;function n(t){e.removeEventListener("loadend",n,!1),t.error?r(t.error):r(null,a.from(e.result))}e.addEventListener("loadend",n,!1),e.readAsArrayBuffer(o)};const u=f(l),s=Object.freeze(Object.defineProperty({__proto__:null,default:u},Symbol.toStringTag,{value:"Module"}));export{s as i};
1
+ import{q as f,B as a}from"./index--MUBzUfF.js";var l=function(o,r){if(typeof Blob>"u"||!(o instanceof Blob))throw new Error("first argument must be a Blob");if(typeof r!="function")throw new Error("second argument must be a function");const e=new FileReader;function n(t){e.removeEventListener("loadend",n,!1),t.error?r(t.error):r(null,a.from(e.result))}e.addEventListener("loadend",n,!1),e.readAsArrayBuffer(o)};const u=f(l),s=Object.freeze(Object.defineProperty({__proto__:null,default:u},Symbol.toStringTag,{value:"Module"}));export{s as i};
@@ -1 +1 @@
1
- var C=Object.defineProperty;var v=(s,r,e)=>r in s?C(s,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[r]=e;var l=(s,r,e)=>v(s,typeof r!="symbol"?r+"":r,e);import{aB as b,D as u,Q as P,H as t,al as L,ah as p,M as a,aj as g,G as d,aX as f,K as y,aY as k,aZ as j,J as h,N as w,a_ as N,an as S,aq as F,ap as m,a$ as I,ae as R,at as A,b0 as E,O as _,b1 as O,b2 as T,b3 as B,b4 as M,b5 as D,av as U,b6 as $,X as V,Y as q}from"./index-BEBVpPoE.js";import{B as W}from"./Back-DKfQTc-Y.js";import{S as K}from"./SDKTag-C0RCmpAc.js";function X(s){return s?{id:s.id,title:s.title,description:s.description,thumbnail:s.thumbnail,isPublic:!1,sceneId:s.sceneId,ethAddress:s.ethAddress,createdAt:s.createdAt,updatedAt:s.updatedAt,layout:s.layout,isTemplate:!1,video:s.video,templateStatus:null}:null}const Y=b.get("PROFILE_URL","");let z=class extends u.PureComponent{constructor(){super(...arguments);l(this,"handlePreview",()=>{this.props.onPreview()});l(this,"handleLike",()=>{const{currentPool:e,isLoggedIn:n,onOpenModal:o}=this.props;e&&(n?this.props.onLikePool(e.id,!e.like):o("LikeModal",{}))});l(this,"handleBack",()=>{const{history:e}=this.props;e.push(y.poolSearch())})}componentDidMount(){const{match:e,onLoadProject:n}=this.props;e.params.projectId&&n(e.params.projectId,this.getType())}componentDidUpdate(){const e=this.getCurrentProject(),n=this.getCurrentScene(),{isLoading:o,onLoadProjectScene:i}=this.props;e&&!n&&!o&&i(e,this.getType())}componentWillUnmount(){this.props.onCloseEditor()}getType(){return this.props.match&&this.props.match.params&&this.props.match.params.type||P.PUBLIC}getCurrentProject(){const{currentProject:e,currentPool:n}=this.props;switch(this.getType()){case"pool":return n;default:return e}}getCurrentScene(){const{scenes:e}=this.props,n=this.getCurrentProject();return n&&e[n.sceneId]||null}getCurrentPool(){const{currentPool:e}=this.props;switch(this.getType()){case"pool":return e;default:return null}}getParcelCount(){const e=this.getCurrentProject();return e?e.layout.cols*e.layout.rows:0}getObjectCount(){const e=this.getCurrentScene();if(!e||!e.sdk6)return 0;const n=this.getParcelCount();if(n===0)return 0;const o=Object.keys(e.sdk6.entities).length;return o<n?0:o-n}renderNotFount(){return t.jsx(L,{})}renderLoading(){return t.jsxs(t.Fragment,{children:[t.jsx(p,{}),t.jsx(a.Page,{isFullscreen:!0,children:t.jsx(a.Loader,{active:!0,size:"huge"})}),t.jsx(g,{isFullscreen:!0})]})}handleExportProject(){const{onOpenModal:e}=this.props;e("ExportModal",{project:X(this.getCurrentProject())})}renderAuthor(){const{currentAuthor:e}=this.props;if(!e)return null;const n=e.avatars[0].ethAddress;return t.jsxs("div",{className:"author",children:[d("public_page.made_by"),t.jsx(f,{address:n,as:"a",href:`${Y}/accounts/${n}`})]})}render(){const{isFetching:e,isPreviewing:n,isReady:o}=this.props;if(e)return this.renderLoading();const i=this.getCurrentProject();if(!i)return this.renderNotFount();const c=this.getCurrentPool(),x=this.getCurrentScene();return t.jsxs(t.Fragment,{children:[!n&&t.jsxs(t.Fragment,{children:[t.jsx(p,{}),t.jsxs(a.Container,{className:"back-container",children:[t.jsx(W,{absolute:!0,onClick:this.handleBack}),t.jsxs(a.Button,{secondary:!0,onClick:this.handleExportProject.bind(this),loading:!i,disabled:!i,children:[t.jsx(a.Icon,{name:"download"}),d("scene_detail_page.download_scene")]})]})]}),t.jsxs("div",{className:"SceneViewPage"+(n?" preview":" mini"),children:[t.jsx("div",{className:"thumbnail",style:{backgroundImage:`url("${i.thumbnail}")`},children:t.jsx(a.Responsive,{minWidth:1025,as:u.Fragment,children:t.jsx(k,{isReadOnly:!0,type:this.getType()},i.id)})}),t.jsxs("div",{className:"scene-action-list",children:[c&&t.jsx("div",{className:"scene-action",children:t.jsx(j,{text:t.jsxs(t.Fragment,{children:[t.jsx(h,{name:c.like?"heart-full":"heart"}),c.likes>0&&t.jsx("span",{className:"LikeCount",children:c.likes})]}),type:"circle",onClick:this.handleLike})}),t.jsx("div",{style:{flex:1}}),t.jsx(a.Responsive,{minWidth:1025,as:u.Fragment,children:t.jsx("div",{className:"scene-action",children:t.jsx(j,{icon:"view",type:"circle",isActive:n,isDisabled:!o,onClick:this.handlePreview})})})]}),t.jsxs("div",{className:"detail",children:[t.jsxs("div",{className:"title",children:[t.jsx("h1",{children:i.title}),t.jsx(K,{scene:x})]}),this.renderAuthor(),i.description&&t.jsx("div",{className:"description",children:t.jsx("p",{children:i.description})}),t.jsxs("div",{className:"component-list",children:[t.jsxs("div",{className:"component",children:[t.jsx(h,{name:"scene-parcel"})," ",d("public_page.parcel_count",{parcels:this.getParcelCount()})]}),t.jsxs("div",{className:"component",children:[t.jsx(h,{name:"scene-object"})," ",d("public_page.item_count",{items:this.getObjectCount()})]})]})]})]}),!n&&t.jsx(g,{})]})}};const G=s=>({isPreviewing:S(s),isReady:!F(s)&&m(s),isFetching:I(s)&&!m(s),isLoggedIn:R(s),currentProject:A(s),currentPool:E(s),scenes:_(s),currentAuthor:O(s),isLoading:T(s)||!!B(s).length}),H=s=>({onLikePool:(r,e=!0)=>s(M(r,e)),onPreview:()=>s(D(!0)),onCloseEditor:()=>s(U()),onLoadProject:(r,e=P.PUBLIC)=>s($(r,e)),onOpenModal:(r,e)=>s(V(r,e)),onLoadProjectScene:(r,e)=>s(q(r,e))}),se=w(G,H)(N(z));export{se as default};
1
+ var C=Object.defineProperty;var v=(s,r,e)=>r in s?C(s,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[r]=e;var l=(s,r,e)=>v(s,typeof r!="symbol"?r+"":r,e);import{aB as b,D as u,Q as P,H as t,al as L,ah as p,M as a,aj as g,G as d,aX as f,K as y,aY as k,aZ as j,J as h,N as w,a_ as N,an as S,aq as F,ap as m,a$ as I,ae as R,at as A,b0 as E,O as _,b1 as O,b2 as T,b3 as B,b4 as M,b5 as D,av as U,b6 as $,X as V,Y as q}from"./index--MUBzUfF.js";import{B as W}from"./Back-Beh7jDMb.js";import{S as K}from"./SDKTag-BcbGbxMU.js";function X(s){return s?{id:s.id,title:s.title,description:s.description,thumbnail:s.thumbnail,isPublic:!1,sceneId:s.sceneId,ethAddress:s.ethAddress,createdAt:s.createdAt,updatedAt:s.updatedAt,layout:s.layout,isTemplate:!1,video:s.video,templateStatus:null}:null}const Y=b.get("PROFILE_URL","");let z=class extends u.PureComponent{constructor(){super(...arguments);l(this,"handlePreview",()=>{this.props.onPreview()});l(this,"handleLike",()=>{const{currentPool:e,isLoggedIn:n,onOpenModal:o}=this.props;e&&(n?this.props.onLikePool(e.id,!e.like):o("LikeModal",{}))});l(this,"handleBack",()=>{const{history:e}=this.props;e.push(y.poolSearch())})}componentDidMount(){const{match:e,onLoadProject:n}=this.props;e.params.projectId&&n(e.params.projectId,this.getType())}componentDidUpdate(){const e=this.getCurrentProject(),n=this.getCurrentScene(),{isLoading:o,onLoadProjectScene:i}=this.props;e&&!n&&!o&&i(e,this.getType())}componentWillUnmount(){this.props.onCloseEditor()}getType(){return this.props.match&&this.props.match.params&&this.props.match.params.type||P.PUBLIC}getCurrentProject(){const{currentProject:e,currentPool:n}=this.props;switch(this.getType()){case"pool":return n;default:return e}}getCurrentScene(){const{scenes:e}=this.props,n=this.getCurrentProject();return n&&e[n.sceneId]||null}getCurrentPool(){const{currentPool:e}=this.props;switch(this.getType()){case"pool":return e;default:return null}}getParcelCount(){const e=this.getCurrentProject();return e?e.layout.cols*e.layout.rows:0}getObjectCount(){const e=this.getCurrentScene();if(!e||!e.sdk6)return 0;const n=this.getParcelCount();if(n===0)return 0;const o=Object.keys(e.sdk6.entities).length;return o<n?0:o-n}renderNotFount(){return t.jsx(L,{})}renderLoading(){return t.jsxs(t.Fragment,{children:[t.jsx(p,{}),t.jsx(a.Page,{isFullscreen:!0,children:t.jsx(a.Loader,{active:!0,size:"huge"})}),t.jsx(g,{isFullscreen:!0})]})}handleExportProject(){const{onOpenModal:e}=this.props;e("ExportModal",{project:X(this.getCurrentProject())})}renderAuthor(){const{currentAuthor:e}=this.props;if(!e)return null;const n=e.avatars[0].ethAddress;return t.jsxs("div",{className:"author",children:[d("public_page.made_by"),t.jsx(f,{address:n,as:"a",href:`${Y}/accounts/${n}`})]})}render(){const{isFetching:e,isPreviewing:n,isReady:o}=this.props;if(e)return this.renderLoading();const i=this.getCurrentProject();if(!i)return this.renderNotFount();const c=this.getCurrentPool(),x=this.getCurrentScene();return t.jsxs(t.Fragment,{children:[!n&&t.jsxs(t.Fragment,{children:[t.jsx(p,{}),t.jsxs(a.Container,{className:"back-container",children:[t.jsx(W,{absolute:!0,onClick:this.handleBack}),t.jsxs(a.Button,{secondary:!0,onClick:this.handleExportProject.bind(this),loading:!i,disabled:!i,children:[t.jsx(a.Icon,{name:"download"}),d("scene_detail_page.download_scene")]})]})]}),t.jsxs("div",{className:"SceneViewPage"+(n?" preview":" mini"),children:[t.jsx("div",{className:"thumbnail",style:{backgroundImage:`url("${i.thumbnail}")`},children:t.jsx(a.Responsive,{minWidth:1025,as:u.Fragment,children:t.jsx(k,{isReadOnly:!0,type:this.getType()},i.id)})}),t.jsxs("div",{className:"scene-action-list",children:[c&&t.jsx("div",{className:"scene-action",children:t.jsx(j,{text:t.jsxs(t.Fragment,{children:[t.jsx(h,{name:c.like?"heart-full":"heart"}),c.likes>0&&t.jsx("span",{className:"LikeCount",children:c.likes})]}),type:"circle",onClick:this.handleLike})}),t.jsx("div",{style:{flex:1}}),t.jsx(a.Responsive,{minWidth:1025,as:u.Fragment,children:t.jsx("div",{className:"scene-action",children:t.jsx(j,{icon:"view",type:"circle",isActive:n,isDisabled:!o,onClick:this.handlePreview})})})]}),t.jsxs("div",{className:"detail",children:[t.jsxs("div",{className:"title",children:[t.jsx("h1",{children:i.title}),t.jsx(K,{scene:x})]}),this.renderAuthor(),i.description&&t.jsx("div",{className:"description",children:t.jsx("p",{children:i.description})}),t.jsxs("div",{className:"component-list",children:[t.jsxs("div",{className:"component",children:[t.jsx(h,{name:"scene-parcel"})," ",d("public_page.parcel_count",{parcels:this.getParcelCount()})]}),t.jsxs("div",{className:"component",children:[t.jsx(h,{name:"scene-object"})," ",d("public_page.item_count",{items:this.getObjectCount()})]})]})]})]}),!n&&t.jsx(g,{})]})}};const G=s=>({isPreviewing:S(s),isReady:!F(s)&&m(s),isFetching:I(s)&&!m(s),isLoggedIn:R(s),currentProject:A(s),currentPool:E(s),scenes:_(s),currentAuthor:O(s),isLoading:T(s)||!!B(s).length}),H=s=>({onLikePool:(r,e=!0)=>s(M(r,e)),onPreview:()=>s(D(!0)),onCloseEditor:()=>s(U()),onLoadProject:(r,e=P.PUBLIC)=>s($(r,e)),onOpenModal:(r,e)=>s(V(r,e)),onLoadProjectScene:(r,e)=>s(q(r,e))}),se=w(G,H)(N(z));export{se as default};
@@ -0,0 +1 @@
1
+ ._container_12bci_1{background-color:var(--dark-two);border-radius:10px;padding:22px}._container_12bci_1 ._used_12bci_7{font-weight:600;font-size:16px;margin-bottom:8px}._container_12bci_1 ._description_12bci_13{color:#cfcdd4;font-size:14px;font-weight:400;margin-bottom:12px}._container_12bci_1 ._description_12bci_13 ._link_12bci_20{color:#fff;cursor:pointer;text-decoration:underline;font-weight:700}._container_12bci_1 ._space_12bci_27{display:flex;align-items:center;gap:1rem}._container_12bci_1 ._space_12bci_27 ._current_12bci_33{flex:1;font-size:1.5rem}._container_12bci_1 ._space_12bci_27 ._bar_12bci_38{flex:1;margin-bottom:0!important;background-color:#a09ba8!important}._container_12bci_1 ._space_12bci_27 ._bar_12bci_38.ui.progress .bar{background-color:#ff2d55}._worldUrl_1sb6i_1{display:flex;width:100%;justify-content:space-between}._rightContainer_1sb6i_7{display:flex;align-items:center;margin-right:20px}._rightContainer_1sb6i_7 ._copyUrn_1sb6i_13{color:var(--text)}.WorldListPage .filters{margin-bottom:16px}.WorldListPage .filters .ui.header.items-count,.WorldListPage .ui.table>thead>tr th{color:var(--text)}.WorldListPage .TableRow{cursor:default}.WorldListPage .empty-names-container{display:flex;flex-direction:column;text-align:center}.WorldListPage .empty-names-container .empty-icon{margin-bottom:30px;height:87px;width:87px}.WorldListPage .empty-names-container .empty-icon.dcl-icon{background-image:url(https://cdn.decentraland.org/@dcl/builder-site/7.11.1-16577655806.commit-745005c/assets/dcl-empty-state-icon-BDDqmD-V.svg)}.WorldListPage .empty-names-container .empty-icon.ens-icon{background-image:url("data:image/svg+xml,%3csvg%20width='87'%20height='87'%20viewBox='0%200%2087%2087'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='43.5'%20cy='43.5'%20r='43.5'%20fill='white'/%3e%3cg%20clip-path='url(%23clip0_119_22392)'%3e%3cpath%20d='M22.9004%2037.517C23.5096%2038.8466%2025.0327%2041.5058%2025.0327%2041.5058L42.4718%2011.8638L25.4896%2024.0647C24.4996%2024.7686%2023.6619%2025.7071%2023.0527%2026.8021C21.4534%2030.1652%2021.4534%2034.0757%2022.9004%2037.517Z'%20fill='url(%23paint0_linear_119_22392)'/%3e%3cpath%20d='M16.0466%2047.215C16.4274%2052.9244%2019.2451%2058.2427%2023.662%2061.684L42.4719%2075.1363C42.4719%2075.1363%2030.6681%2057.6952%2020.7681%2040.3324C19.7781%2038.5335%2019.0928%2036.5%2018.7881%2034.3884C18.6358%2033.4498%2018.6358%2032.5113%2018.7881%2031.5728C18.5597%2032.042%2018.0266%2033.0588%2018.0266%2033.0588C17.0366%2035.1705%2016.3512%2037.4386%2015.9705%2039.7849C15.742%2042.2877%2015.742%2044.7904%2016.0466%2047.215Z'%20fill='%23A0A8D4'/%3e%3cpath%20d='M64.0234%2049.5615C63.4141%2048.2319%2061.8911%2045.5728%2061.8911%2045.5728L44.4519%2075.1365L61.5103%2063.0138C62.5003%2062.3099%2063.338%2061.3714%2063.9472%2060.2764C65.4703%2056.9134%2065.5464%2053.0028%2064.0234%2049.5615Z'%20fill='url(%23paint1_linear_119_22392)'/%3e%3cpath%20d='M70.9534%2039.7851C70.5726%2034.0757%2067.7549%2028.7574%2063.338%2025.3161L44.5281%2011.8638C44.5281%2011.8638%2056.3319%2029.3048%2066.2318%2046.6677C67.2218%2048.4665%2067.9072%2050.5%2068.2118%2052.6117C68.3641%2053.5503%2068.3641%2054.4888%2068.2118%2055.4273C68.4403%2054.9581%2068.9734%2053.9413%2068.9734%2053.9413C69.9634%2051.8296%2070.6487%2049.5615%2071.0295%2047.2934C71.1818%2044.7124%2071.1818%2042.2879%2070.9534%2039.7851Z'%20fill='%23A0A8D4'/%3e%3cpath%20d='M23.0535%2026.8021C23.6627%2025.7071%2024.4242%2024.7686%2025.4904%2024.0647L42.4726%2011.8638L25.0335%2041.4275C25.0335%2041.4275%2023.5104%2038.7684%2022.9012%2037.4388C21.4543%2034.0757%2021.4543%2030.1652%2023.0535%2026.8021ZM16.0474%2047.2152C16.4281%2052.9246%2019.2458%2058.2429%2023.6627%2061.6842L42.4726%2075.1365C42.4726%2075.1365%2030.6688%2057.6954%2020.7689%2040.3326C19.7789%2038.5337%2019.0935%2036.5002%2018.7889%2034.3885C18.6366%2033.45%2018.6366%2032.5115%2018.7889%2031.573C18.5604%2032.0422%2018.0273%2033.059%2018.0273%2033.059C17.0373%2035.1707%2016.352%2037.4388%2015.9712%2039.7851C15.7427%2042.2879%2015.7427%2044.7906%2016.0474%2047.2152ZM64.0241%2049.5615C63.4149%2048.2319%2061.8918%2045.5727%2061.8918%2045.5727L44.4526%2075.1365L61.511%2063.0138C62.501%2062.3099%2063.3387%2061.3714%2063.9479%2060.2764C65.471%2056.9133%2065.5472%2053.0028%2064.0241%2049.5615ZM70.8779%2039.8633C70.4972%2034.1539%2067.6795%2028.8356%2063.2626%2025.3943L44.5288%2011.8638C44.5288%2011.8638%2056.3326%2029.3048%2066.2325%2046.6677C67.2225%2048.4665%2067.9079%2050.5%2068.2125%2052.6117C68.3649%2053.5503%2068.3649%2054.4888%2068.2125%2055.4273C68.441%2054.958%2068.9741%2053.9413%2068.9741%2053.9413C69.9641%2051.8296%2070.6495%2049.5615%2071.0302%2047.2934C71.1825%2044.7124%2071.1825%2042.2879%2070.8779%2039.8633Z'%20fill='url(%23paint2_linear_119_22392)'/%3e%3c/g%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_119_22392'%20x1='43.265'%20y1='12.6053'%20x2='20.2441'%20y2='36.9051'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0.58'%20stop-color='%23A0A8D4'/%3e%3cstop%20offset='0.73'%20stop-color='%238791C7'/%3e%3cstop%20offset='0.91'%20stop-color='%236470B4'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint1_linear_119_22392'%20x1='43.735'%20y1='74.4471'%20x2='66.7471'%20y2='50.1648'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0.58'%20stop-color='%23A0A8D4'/%3e%3cstop%20offset='0.73'%20stop-color='%238791C7'/%3e%3cstop%20offset='0.91'%20stop-color='%236470B4'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint2_linear_119_22392'%20x1='43.4798'%20y1='11.551'%20x2='43.4798'%20y2='75.3711'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23513EFF'/%3e%3cstop%20offset='0.18'%20stop-color='%235157FF'/%3e%3cstop%20offset='0.57'%20stop-color='%235298FF'/%3e%3cstop%20offset='1'%20stop-color='%2352E5FF'/%3e%3c/linearGradient%3e%3cclipPath%20id='clip0_119_22392'%3e%3crect%20width='55.3636'%20height='63.2727'%20fill='white'%20transform='translate(15.8181%2011.8638)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e")}.WorldListPage .empty-names-container .empty-title{font-size:24px;font-weight:600;line-height:29px;color:var(--text)}.WorldListPage .empty-names-container .empty-description{font-size:14px;font-weight:500;line-height:24px;color:var(--text);max-width:612px}.WorldListPage .empty-names-container .empty-action{margin-top:40px;width:372px}.WorldListPage .Icon.right-round-arrow{margin-bottom:-2px}.WorldListPage .TableRow .dcl.column.subdomain-wrapper{display:flex;flex:none;flex-direction:row}.WorldListPage .TableRow .empty-url{color:#fffc;font-style:italic}.WorldListPage .TableRow .publish-scene{display:flex;width:100%;justify-content:space-between;align-items:center}.WorldListPage .TableRow .publish-scene span{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;max-width:100px}.WorldListPage .TableRow .publish-scene button{margin-right:20px;width:168px}.WorldListPage .TableRow .world-status.active{color:#34ce76}.WorldListPage .TableRow .world-status.inactive{color:#cfcdd4}.WorldListPage .TableRow .world-status.warning{color:var(--danger)}.WorldListPage .TableRow .world-status.blocked{color:var(--error)}.WorldListPage .ui.pagination{width:100%;display:flex;justify-content:center}.WorldListPage .ui.pagination .item[type=nextItem],.WorldListPage .ui.pagination .item[type=prevItem]{position:absolute;background-color:var(--secondary)}.WorldListPage .ui.pagination .item[type=prevItem]{left:0}.WorldListPage .ui.pagination .item[type=nextItem]{right:0}.WorldListPage .pagination-section{width:100%}.WorldListPage .ui.sub.header.items-count{flex:1 0 auto;text-transform:uppercase;font-size:13px;line-height:18px;font-weight:500}.WorldListPage .actions{display:flex;flex:1 0 auto;align-items:center;justify-content:flex-end;font-size:13px;line-height:18px;text-transform:uppercase}.WorldListPage .actions .ui.button.basic{width:16px;height:16px;box-sizing:content-box;padding:5px 10px;border-radius:4px;border:solid 1px var(--gray)}.WorldListPage .claim-name .Icon{display:block}.WorldListPage .ui.dropdown{margin-right:20px}.WorldListPage .worlds-storage{margin-bottom:24px}.WorldListPage .insufficient-storage-message{display:flex;align-items:center;gap:1rem;background-color:var(--dark-two);border-radius:10px;padding:22px;margin-bottom:24px}
@@ -1 +1 @@
1
- var B=Object.defineProperty;var D=(e,t,n)=>t in e?B(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var R=(e,t,n)=>D(e,typeof t!="symbol"?t+"":t,n);import{Z as f,D as d,aA as $,aB as E,aC as v,G as _,H as s,M as o,J as N,I as U,N as T,at as C,aD as V,aE as w,aF as k,aG as y,X as O,aH as M,ae as A,aI as G,aJ as J,aK as X,aL as H}from"./index-BEBVpPoE.js";import{S as z}from"./SignInRequired-CRze2iXs.js";const K="_container_1abv2_1",q="_nameContainer_1abv2_8",F="_editNameBtn_1abv2_20",Y="_actions_1abv2_30",W="_downloadBtn_1abv2_36",Z="_button_1abv2_13",I={container:K,nameContainer:q,editNameBtn:F,actions:Y,downloadBtn:W,button:Z},Q=E.get("EXPLORER_URL",""),ee=E.get("BUILDER_SERVER_URL",""),se=E.get("PEER_TESTING_URL","");function te({currentProject:e,metrics:t,limits:n,areEntitiesOutOfBoundaries:r,isUploading:c,onOpenModal:l}){const b=f(),m=d.useCallback(()=>{l("ExportModal",{project:e})},[e,l]),u=d.useCallback(()=>{l("EditProjectModal")},[l]),a=d.useCallback(()=>{l("DeployModal",{view:$.NONE,projectId:e.id})},[l,e]),h=d.useMemo(()=>{if(!e)return"";const i=new URL(Q);return i.searchParams.set("skipSetup","true"),i.searchParams.set("realm",`${ee}/projects/${e.id}`),i.searchParams.set("DEBUG_MODE","true"),E.is(v.Env.DEVELOPMENT)?(i.searchParams.set("NETWORK","sepolia"),i.searchParams.set("DEBUG_SCENE_LOG","")):i.searchParams.set("CATALYST",se),i.toString()},[]),g=d.useMemo(()=>Object.keys(t).some(i=>t[i]>n[i]),[t]),x=d.useMemo(()=>c||r,[t,n,r,c]),j=d.useMemo(()=>c||!x,[c,x]),L=d.useCallback(()=>r?_("topbar.bounds_exceeded",{br:s.jsx("br",{})}):g?_("topbar.limits_exceeded"):null,[r,g]),S=d.useCallback(()=>{b.goBack()},[b]);return s.jsxs("div",{className:I.container,children:[s.jsxs("div",{className:I.nameContainer,children:[s.jsx(o.Button,{basic:!0,"aria-label":_("inspector.top_bar.back"),onClick:S,children:s.jsx(o.Icon,{name:"chevron left"})}),e&&s.jsxs(o.Button,{basic:!0,onClick:u,disabled:c,className:I.editNameBtn,children:[e.title,s.jsx(N,{name:"layout",className:"edit-project-icon"})]}),c&&s.jsx(N,{name:"cloud-upload",className:"cloud-upload-indicator is-uploading"})]}),s.jsxs("div",{className:I.actions,children:[e?s.jsx(U,{projectId:e.id}):null,s.jsx(o.Popup,{content:_("inspector.top_bar.download"),trigger:s.jsx(o.Button,{secondary:!0,"aria-label":_("inspector.top_bar.download"),size:"small",className:I.downloadBtn,disabled:c,onClick:m,children:s.jsx(o.Icon,{name:"download"})})}),s.jsxs(o.Button,{as:"a",href:h,target:"_blank",secondary:!0,size:"small",disabled:c,children:[s.jsx(o.Icon,{name:"eye"}),_("inspector.top_bar.preview")]}),s.jsx(o.Popup,{content:L(),position:"bottom center",disabled:j,trigger:s.jsx("span",{children:s.jsxs(o.Button,{primary:!0,size:"small",disabled:x,onClick:a,children:[s.jsx(o.Icon,{name:"globe"}),_("inspector.top_bar.publish")]})}),on:"hover"})]})]})}const ne=e=>({currentProject:C(e),metrics:V(e),limits:w(e),areEntitiesOutOfBoundaries:k(e)>0,isUploading:y(e)}),ae=e=>({onOpenModal:(t,n)=>e(O(t,n))}),oe=T(ne,ae)(te);var p={VITE_BASE_URL:"https://cdn.decentraland.org/@dcl/builder-site/7.11.0"};const re=e=>e.replace(/\/$/,""),P=re(p.VITE_BASE_URL);let ce=class extends d.PureComponent{constructor(){super(...arguments);R(this,"state",{isLoaded:!1});R(this,"refIframe",n=>{const{onConnect:r}=this.props;n&&(n.onload=()=>{this.setState({isLoaded:!0})},r(n.id))})}componentDidMount(){const{onOpen:n}=this.props;n()}render(){const{scene:n,project:r,isLoggedIn:c,isReloading:l,address:b=""}=this.props;if(!c)return s.jsx(z,{});let m=`${P}/inspector-index.html`,u=`${P}/bin/index.js`;p.VITE_INSPECTOR_PORT&&(m=`http://localhost:${p.VITE_INSPECTOR_PORT}`,u=`${m}/bin/index.js`);let a=`?dataLayerRpcParentUrl=${window.location.origin}`;if(p.VITE_BIN_INDEX_JS_DEV_PORT&&p.VITE_BIN_INDEX_JS_DEV_PATH){const h=btoa(p.VITE_BIN_INDEX_JS_DEV_PATH);u=`http://localhost:${p.VITE_BIN_INDEX_JS_DEV_PORT}/content/contents/b64-${h}`}return a=a.concat(`&binIndexJsUrl=${u}`),a=a.concat(`&contentUrl=${E.get("INSPECTOR_CONTENT_URL")}`),a=a.concat(`&segmentKey=${E.get("INSPECTOR_SEGMENT_API_KEY")}`),a=a.concat(`&segmentAppId=${E.get("INSPECTOR_SEGMENT_APP_ID")}`),a=a.concat(`&segmentUserId=${b}`),r!=null&&r.id&&(a=a.concat(`&projectId=${r.id}`)),s.jsxs("div",{className:"InspectorPage",children:[(!this.state.isLoaded||l)&&s.jsx(o.Loader,{active:!0}),n&&!l&&s.jsxs(s.Fragment,{children:[s.jsx(oe,{}),s.jsx("iframe",{ref:this.refIframe,title:"inspector",id:"inspector",src:`${m}${a}`})]})]})}};const ie=e=>({address:M(e),isLoggedIn:A(e),scene:G(e),project:C(e),isReloading:J(e)}),de=e=>({onOpen:()=>e(X()),onConnect:t=>e(H(t))}),me=T(ie,de)(ce);export{me as default};
1
+ var B=Object.defineProperty;var D=(e,t,n)=>t in e?B(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var R=(e,t,n)=>D(e,typeof t!="symbol"?t+"":t,n);import{Z as f,D as d,aA as $,aB as m,aC as v,G as _,H as s,M as o,J as N,I as U,N as T,at as C,aD as V,aE as w,aF as k,aG as y,X as O,aH as M,ae as A,aI as G,aJ as J,aK as X,aL as H}from"./index--MUBzUfF.js";import{S as z}from"./SignInRequired-DYe97JEl.js";const K="_container_1abv2_1",q="_nameContainer_1abv2_8",F="_editNameBtn_1abv2_20",Y="_actions_1abv2_30",W="_downloadBtn_1abv2_36",Z="_button_1abv2_13",I={container:K,nameContainer:q,editNameBtn:F,actions:Y,downloadBtn:W,button:Z},Q=m.get("EXPLORER_URL",""),ee=m.get("BUILDER_SERVER_URL",""),se=m.get("PEER_TESTING_URL","");function te({currentProject:e,metrics:t,limits:n,areEntitiesOutOfBoundaries:r,isUploading:c,onOpenModal:l}){const b=f(),E=d.useCallback(()=>{l("ExportModal",{project:e})},[e,l]),u=d.useCallback(()=>{l("EditProjectModal")},[l]),a=d.useCallback(()=>{l("DeployModal",{view:$.NONE,projectId:e.id})},[l,e]),h=d.useMemo(()=>{if(!e)return"";const i=new URL(Q);return i.searchParams.set("skipSetup","true"),i.searchParams.set("realm",`${ee}/projects/${e.id}`),i.searchParams.set("DEBUG_MODE","true"),m.is(v.Env.DEVELOPMENT)?(i.searchParams.set("NETWORK","sepolia"),i.searchParams.set("DEBUG_SCENE_LOG","")):i.searchParams.set("CATALYST",se),i.toString()},[]),g=d.useMemo(()=>Object.keys(t).some(i=>t[i]>n[i]),[t]),x=d.useMemo(()=>c||r,[t,n,r,c]),j=d.useMemo(()=>c||!x,[c,x]),L=d.useCallback(()=>r?_("topbar.bounds_exceeded",{br:s.jsx("br",{})}):g?_("topbar.limits_exceeded"):null,[r,g]),S=d.useCallback(()=>{b.goBack()},[b]);return s.jsxs("div",{className:I.container,children:[s.jsxs("div",{className:I.nameContainer,children:[s.jsx(o.Button,{basic:!0,"aria-label":_("inspector.top_bar.back"),onClick:S,children:s.jsx(o.Icon,{name:"chevron left"})}),e&&s.jsxs(o.Button,{basic:!0,onClick:u,disabled:c,className:I.editNameBtn,children:[e.title,s.jsx(N,{name:"layout",className:"edit-project-icon"})]}),c&&s.jsx(N,{name:"cloud-upload",className:"cloud-upload-indicator is-uploading"})]}),s.jsxs("div",{className:I.actions,children:[e?s.jsx(U,{projectId:e.id}):null,s.jsx(o.Popup,{content:_("inspector.top_bar.download"),trigger:s.jsx(o.Button,{secondary:!0,"aria-label":_("inspector.top_bar.download"),size:"small",className:I.downloadBtn,disabled:c,onClick:E,children:s.jsx(o.Icon,{name:"download"})})}),s.jsxs(o.Button,{as:"a",href:h,target:"_blank",secondary:!0,size:"small",disabled:c,children:[s.jsx(o.Icon,{name:"eye"}),_("inspector.top_bar.preview")]}),s.jsx(o.Popup,{content:L(),position:"bottom center",disabled:j,trigger:s.jsx("span",{children:s.jsxs(o.Button,{primary:!0,size:"small",disabled:x,onClick:a,children:[s.jsx(o.Icon,{name:"globe"}),_("inspector.top_bar.publish")]})}),on:"hover"})]})]})}const ne=e=>({currentProject:C(e),metrics:V(e),limits:w(e),areEntitiesOutOfBoundaries:k(e)>0,isUploading:y(e)}),ae=e=>({onOpenModal:(t,n)=>e(O(t,n))}),oe=T(ne,ae)(te);var p={VITE_BASE_URL:"https://cdn.decentraland.org/@dcl/builder-site/7.11.1-16577655806.commit-745005c"};const re=e=>e.replace(/\/$/,""),P=re(p.VITE_BASE_URL);let ce=class extends d.PureComponent{constructor(){super(...arguments);R(this,"state",{isLoaded:!1});R(this,"refIframe",n=>{const{onConnect:r}=this.props;n&&(n.onload=()=>{this.setState({isLoaded:!0})},r(n.id))})}componentDidMount(){const{onOpen:n}=this.props;n()}render(){const{scene:n,project:r,isLoggedIn:c,isReloading:l,address:b=""}=this.props;if(!c)return s.jsx(z,{});let E=`${P}/inspector-index.html`,u=`${P}/bin/index.js`;p.VITE_INSPECTOR_PORT&&(E=`http://localhost:${p.VITE_INSPECTOR_PORT}`,u=`${E}/bin/index.js`);let a=`?dataLayerRpcParentUrl=${window.location.origin}`;if(p.VITE_BIN_INDEX_JS_DEV_PORT&&p.VITE_BIN_INDEX_JS_DEV_PATH){const h=btoa(p.VITE_BIN_INDEX_JS_DEV_PATH);u=`http://localhost:${p.VITE_BIN_INDEX_JS_DEV_PORT}/content/contents/b64-${h}`}return a=a.concat(`&binIndexJsUrl=${u}`),a=a.concat(`&contentUrl=${m.get("INSPECTOR_CONTENT_URL")}`),a=a.concat(`&segmentKey=${m.get("INSPECTOR_SEGMENT_API_KEY")}`),a=a.concat(`&segmentAppId=${m.get("INSPECTOR_SEGMENT_APP_ID")}`),a=a.concat(`&segmentUserId=${b}`),r!=null&&r.id&&(a=a.concat(`&projectId=${r.id}`)),s.jsxs("div",{className:"InspectorPage",children:[(!this.state.isLoaded||l)&&s.jsx(o.Loader,{active:!0}),n&&!l&&s.jsxs(s.Fragment,{children:[s.jsx(oe,{}),s.jsx("iframe",{ref:this.refIframe,title:"inspector",id:"inspector",src:`${E}${a}`})]})]})}};const ie=e=>({address:M(e),isLoggedIn:A(e),scene:G(e),project:C(e),isReloading:J(e)}),de=e=>({onOpen:()=>e(X()),onConnect:t=>e(H(t))}),Ee=T(ie,de)(ce);export{Ee as default};