@dcl/builder-site 7.16.0 → 7.16.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/{Back-D94RsYQI.js → Back-QiLuX90P.js} +1 -1
- package/assets/{CollectionProvider.container-B6B7jeBx.js → CollectionProvider.container-BCBBpM_j.js} +1 -1
- package/assets/{CollectionStatus.container-CmB5tcfq.js → CollectionStatus.container-B57otCoh.js} +1 -1
- package/assets/{ConfirmDelete-DmmVVAp0.js → ConfirmDelete-B6uGrTwP.js} +1 -1
- package/assets/{FileSaver.min-C38aG5Wv.js → FileSaver.min-D9dMdhHA.js} +1 -1
- package/assets/{ItemProvider.container-C3ASCRbL.js → ItemProvider.container-DsO_p5Yr.js} +2 -2
- package/assets/{JumpIn.container-DNWn05IB.js → JumpIn.container-Bq0-dMMB.js} +1 -1
- package/assets/{LandAction-DhmPYdL8.js → LandAction-BtV4NICw.js} +1 -1
- package/assets/{LandProviderPage-D2JQ3F7v.js → LandProviderPage-DfWT7-dc.js} +1 -1
- package/assets/{LoggedInDetailPage.container-D3YwBYzF.js → LoggedInDetailPage.container-o0Dl3lEh.js} +1 -1
- package/assets/{Navigation-C34bp3Mt.css → Navigation-Cq3JszV-.css} +1 -1
- package/assets/{Navigation.container-Bvr99qLy.js → Navigation.container-5FtjkfRQ.js} +1 -1
- package/assets/{NotFound-mNWy5xM3.js → NotFound-Pab3HNpf.js} +1 -1
- package/assets/{OptionsDropdown-DEuKM56F.js → OptionsDropdown-BXsuPocQ.js} +1 -1
- package/assets/{RentalPeriod-D_beCQN0.js → RentalPeriod-DRqYcxO3.js} +1 -1
- package/assets/{SDKTag-26bb1MRo.js → SDKTag-B6m653_O.js} +1 -1
- package/assets/{SceneStats.container-BzjcXk6l.js → SceneStats.container-BW6-NM73.js} +1 -1
- package/assets/{SignInRequired-NQYfoxmv.js → SignInRequired-CAarWwWe.js} +1 -1
- package/assets/{ThirdPartyKindBadge-Be0Ad4fF.js → ThirdPartyKindBadge-DYB7Vvvm.js} +1 -1
- package/assets/{dataReader-BNRTZZiJ.js → dataReader-3H0Fsbhy.js} +1 -1
- package/assets/{date-C9ArxA_e.js → date-CSdtY-77.js} +1 -1
- package/assets/{fortmatic-DGqcSaN2.js → fortmatic-BiOO0QJs.js} +1 -1
- package/assets/{hooks-BBT2z0gO.js → hooks-yxtmZux-.js} +1 -1
- package/assets/{index-BWehEcif.js → index-8QysQ9MR.js} +1 -1
- package/assets/{index-DDKLiU5I.js → index-B2YMjxNG.js} +1 -1
- package/assets/{index-D_n7A5EP.css → index-B37WUxRc.css} +1 -1
- package/assets/{index-YAqkouTP.js → index-BHnMpakE.js} +1 -1
- package/assets/index-BINqItvC.js +1 -0
- package/assets/{index-BTGNYpgk.js → index-BIvqn_2X.js} +1 -1
- package/assets/{index-BIQTKV6z.js → index-BQ9MHzgx.js} +1 -1
- package/assets/{index-DdbnxO3S.css → index-BQs8_Bwz.css} +1 -1
- package/assets/{index-BJF4F6E2.js → index-Bbqk2wRT.js} +1 -1
- package/assets/{index-DN6zeLPW.js → index-BeHPP40r.js} +1 -1
- package/assets/{index-Dj7mQiFF.js → index-Beg4giBC.js} +1 -1
- package/assets/{index-WzZM31bL.js → index-Bf74R13E.js} +1 -1
- package/assets/{index-BspQeoNu.js → index-BiCvFw0e.js} +1 -1
- package/assets/{index-ZYJx20me.js → index-Bn4XkneF.js} +1 -1
- package/assets/{index-D-omXGcm.js → index-BngtyXPx.js} +1 -1
- package/assets/{index-BiiQf61S.css → index-BpDCzli-.css} +1 -1
- package/assets/{index--jj2eEdN.js → index-C-Q3iZvx.js} +1 -1
- package/assets/{index-CvYXhhW4.js → index-C1SsNUAc.js} +1 -1
- package/assets/{index-hHyn87hK.js → index-CBINpKW1.js} +1 -1
- package/assets/{index-Dnz1DwyM.js → index-CBvG8kZP.js} +1 -1
- package/assets/{index-C4HHYdhM.js → index-CE4nWsCj.js} +1 -1
- package/assets/{index-lVsZiQbZ.js → index-CFU6CpNH.js} +1 -1
- package/assets/{index-iqc2hUgY.js → index-CNvJbJBV.js} +1 -1
- package/assets/{index-CHW3a1d8.css → index-CRYe3jAC.css} +7 -7
- package/assets/index-CakLpXJW.js +1 -0
- package/assets/{index-CWBtF0Bm.css → index-CkX3RRv-.css} +1 -1
- package/assets/{index-By6X_sWo.js → index-Cpxalvgw.js} +1 -1
- package/assets/{index-BwKOgET4.js → index-CxP-J5XF.js} +2 -2
- package/assets/{index-CgalNfsG.js → index-D5KNxDOt.js} +1 -1
- package/assets/{index-hi-6PNHv.js → index-D807s1Lc.js} +1 -1
- package/assets/{index-dORSrkG_.js → index-D8CGIsXi.js} +1 -1
- package/assets/{index-DybHUI1B.css → index-DHRgDgLM.css} +1 -1
- package/assets/{index-Zh552Wzc.js → index-DNUxZpJn.js} +1 -1
- package/assets/{index-DmeQdYL_.js → index-DXvb1BNn.js} +1 -1
- package/assets/{index-kotSpI1A.js → index-DdFaDAq7.js} +1 -1
- package/assets/{index-C3s6sasx.js → index-DgBmp1kg.js} +1 -1
- package/assets/{index-jRpvNFmH.js → index-Dj60l86t.js} +1 -1
- package/assets/{index-wJdvWbwQ.js → index-DpICXdUn.js} +1 -1
- package/assets/{index-Blc255Kh.js → index-DqJXDFz0.js} +1 -1
- package/assets/{index-B1GtOexf.css → index-DtoAxbrz.css} +1 -1
- package/assets/{index-DV-S_Vo4.js → index-EWhL65Ci.js} +1 -1
- package/assets/{index-wgtjB6lV.js → index-NRj4ARHG.js} +1 -1
- package/assets/{index-BpSWUH3N.js → index-S8a1J8TH.js} +40 -40
- package/assets/{index-wJpnjryc.js → index-_ondS_zA.js} +1 -1
- package/assets/{index-BYp2WENw.js → index-cC-bEJcC.js} +1 -1
- package/assets/{index-BqzYHGMh.js → index-e58JOcvI.js} +1 -1
- package/assets/{index-UYYEhvXh.js → index-i6h1Pylf.js} +1 -1
- package/assets/{index-BpxsDhC6.css → index-mn6197ci.css} +1 -1
- package/assets/{index--dRbXcCy.js → index-q2a2g_bZ.js} +1 -1
- package/assets/{index-Dal8DaD9.js → index-vSe71kM3.js} +1 -1
- package/assets/{index.es-CZG9hSjz.js → index.es-BmaiGrml.js} +4 -4
- package/assets/{selectors-Hr22Peqo.js → selectors-DVaGn9o3.js} +1 -1
- package/index.html +3 -3
- package/package.json +3 -3
- package/assets/index-DDGKUpl1.js +0 -1
- package/assets/index-DgjHmPjs.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{aq as o}from"./index-S8a1J8TH.js";export{o as default};
|
|
@@ -1 +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.16.
|
|
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.16.1/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
|
-
import{J as l,a4 as E,dF as w,R as I,bP as h,N as e,S as t,M as r,bO as T,T as y,dq as B,dv as H,ad as R,bq as O,cT as P,bY as F,ca as A,cW as q}from"./index-
|
|
1
|
+
import{J as l,a4 as E,dF as w,R as I,bP as h,N as e,S as t,M as r,bO as T,T as y,dq as B,dv as H,ad as R,bq as O,cT as P,bY as F,ca as A,cW as q}from"./index-S8a1J8TH.js";import{L as z}from"./LoggedInDetailPage.container-o0Dl3lEh.js";import{B as D}from"./Back-QiLuX90P.js";import{N as M}from"./NotFound-Pab3HNpf.js";import"./Navigation.container-5FtjkfRQ.js";import"./selectors-DVaGn9o3.js";import"./SignInRequired-CAarWwWe.js";function G(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 d of a)if(d.land.id!==o.landId){n=d.land;break}return n},[c]);l.useEffect(()=>{!s&&!b&&o&&u(x)},[x]);const j=l.useCallback((a,n)=>{const d=h(a,n);return c&&d in c?c[d].land:void 0},[c]),f=l.useCallback((a,n)=>{const d=j(a,n);d&&u(d)},[]),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 d=h(a,n);return(!s||s.id!==d)&&g===d},[]),_=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(z,{className:"ENSSelectLandPage",hasNavigation:!1,children:b?e.jsx(t.Loader,{active:!0,size:"massive"}):o?e.jsxs(e.Fragment,{children:[e.jsx(D,{absolute:!0,onClick:p}),e.jsxs(t.Narrow,{children:[e.jsx(t.Row,{children:e.jsx(t.Column,{children:e.jsxs(t.Section,{children:[e.jsx(t.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(T,{showControls:!0,showOwner:!0,isDraggable:!0,landId:s?s.id:void 0,onClick:f,onHover:k,onLocateLand:v,layers:[_]})}),e.jsxs(t.Row,{className:"atlas-footer",children:[e.jsx(t.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(t.Column,{grow:!1,children:e.jsxs("div",{className:"actions",children:[e.jsx(t.Button,{secondary:!0,onClick:p,children:r("global.cancel")}),e.jsx(t.Button,{primary:!0,disabled:!s||N,onClick:S,children:N?r("ens_select_land_page.already_assigned"):r("global.continue")})]})})]})]})]}):e.jsx(M,{})})}const J=(i,s)=>{const{subdomain:u}=s.match.params,g=B(i);return{ens:H(g,u),isLoading:R(i)||O(P(i),q)||F(i),landTiles:A(i)}},X=y(J)(G);export{X as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-
|
|
2
|
-
import{B as pe,_ as me}from"./index-BpSWUH3N.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.16.0",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_BASE_URL:"https://cdn.decentraland.org/@dcl/builder-site/7.16.0",VITE_REACT_APP_WEBSITE_VERSION:"7.16.0"},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=(i,a=++f[0])=>{I!==a&&(I=a,v.forEach(r=>r(i,a)))};let j=f[1];const O=(i=++f[1])=>(j!==i&&!v.size&&(j=i,y.forEach(([a])=>{const r=a[1](i);r>I&&(I=r)})),I),A=i=>(a,r)=>{const h=[...a];h[1]=[i,...h[1]],b(h,r)},y=new Map,H=(i,a)=>{if((z?"production":void 0)!=="production"&&y.has(i))throw new Error("prop listener already exists");if(v.size){const r=a[3](A(i));y.set(i,[a,r])}else y.set(i,[a])},Z=i=>{var a;const r=y.get(i);r&&(y.delete(i),(a=r[1])==null||a.call(r))},ue=i=>(v.add(i),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(i),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(i,a){const r=Reflect.get(i,a);Z(a);const h=Reflect.deleteProperty(i,a);return h&&b(["delete",[a],r]),h},set(i,a,r,h){const U=Reflect.has(i,a),N=Reflect.get(i,a,h);if(U&&(e(N,r)||d.has(r)&&e(N,d.get(r))))return!0;Z(a),F(r)&&(r=ye(r)||r);let V=r;if(r instanceof Promise)r.then(L=>{r.status="fulfilled",r.value=L,b(["resolve",[a],L])}).catch(L=>{r.status="rejected",r.reason=L,b(["reject",[a],L])});else{!C.has(r)&&s(r)&&(V=W(r));const L=!x.has(V)&&C.get(V);L&&H(a,L)}return Reflect.set(i,a,V,h),b(["set",[a],r,N]),!0}});d.set(o,k);const fe=[q,O,c,ue];return C.set(k,fe),Reflect.ownKeys(o).forEach(i=>{const a=Object.getOwnPropertyDescriptor(o,i);"value"in a&&(k[i]=o[i],delete a.value,delete a.writable),Object.defineProperty(q,i,a)}),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 ae=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}=ae?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}=ae?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,ie=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(ie)for(var s of ie(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-wJdvWbwQ.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
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-DpICXdUn.js","assets/index-S8a1J8TH.js","assets/index-CRYe3jAC.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{B as pe,_ as me}from"./index-S8a1J8TH.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.16.1",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_BASE_URL:"https://cdn.decentraland.org/@dcl/builder-site/7.16.1",VITE_REACT_APP_WEBSITE_VERSION:"7.16.1"},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=(i,a=++f[0])=>{I!==a&&(I=a,v.forEach(r=>r(i,a)))};let j=f[1];const O=(i=++f[1])=>(j!==i&&!v.size&&(j=i,y.forEach(([a])=>{const r=a[1](i);r>I&&(I=r)})),I),A=i=>(a,r)=>{const h=[...a];h[1]=[i,...h[1]],b(h,r)},y=new Map,H=(i,a)=>{if((z?"production":void 0)!=="production"&&y.has(i))throw new Error("prop listener already exists");if(v.size){const r=a[3](A(i));y.set(i,[a,r])}else y.set(i,[a])},Z=i=>{var a;const r=y.get(i);r&&(y.delete(i),(a=r[1])==null||a.call(r))},ue=i=>(v.add(i),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(i),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(i,a){const r=Reflect.get(i,a);Z(a);const h=Reflect.deleteProperty(i,a);return h&&b(["delete",[a],r]),h},set(i,a,r,h){const U=Reflect.has(i,a),N=Reflect.get(i,a,h);if(U&&(e(N,r)||d.has(r)&&e(N,d.get(r))))return!0;Z(a),F(r)&&(r=ye(r)||r);let V=r;if(r instanceof Promise)r.then(L=>{r.status="fulfilled",r.value=L,b(["resolve",[a],L])}).catch(L=>{r.status="rejected",r.reason=L,b(["reject",[a],L])});else{!C.has(r)&&s(r)&&(V=W(r));const L=!x.has(V)&&C.get(V);L&&H(a,L)}return Reflect.set(i,a,V,h),b(["set",[a],r,N]),!0}});d.set(o,k);const fe=[q,O,c,ue];return C.set(k,fe),Reflect.ownKeys(o).forEach(i=>{const a=Object.getOwnPropertyDescriptor(o,i);"value"in a&&(k[i]=o[i],delete a.value,delete a.writable),Object.defineProperty(q,i,a)}),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 ae=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}=ae?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}=ae?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,ie=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(ie)for(var s of ie(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-DpICXdUn.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{b1 as be,a4 as F,J as n,ak as je,N as e,M as s,Q as de,R as E,dN as me,S as t,T as U,ey as Ie,a2 as he,ez as Se,eA as Z,a7 as Ne,dM as Ce,eB as fe,eC as ue,eD as Re,eE as ce,P as ve,eF as f,bD as oe,eG as w,aM as we,eH as Le,eI as De,eJ as Ee,eK as Ae,eL as Oe,bq as G,eM as Pe,eN as ie,eO as ye,eP as ke,eQ as Me,eR as He,eS as $e,eT as Be,eU as Fe,eV as Ue,eW as Ve,eX as ze}from"./index-BpSWUH3N.js";import{B as qe,c as Ge,N as Ye}from"./Navigation.container-Bvr99qLy.js";import{L as Ze}from"./LoggedInDetailPage.container-D3YwBYzF.js";import{O as ge}from"./OptionsDropdown-DEuKM56F.js";import{a as B}from"./date-C9ArxA_e.js";import{C as _e}from"./CollectionStatus.container-CmB5tcfq.js";import"./selectors-Hr22Peqo.js";import"./SignInRequired-NQYfoxmv.js";import"./index-UYYEhvXh.js";const Qe=l=>l.ui.collection,We=l=>Qe(l).view,re=20;function Je(l){const{search:a,pathname:c}=be(),d=F(),r=d.push.bind(d),o=n.useMemo(()=>{var i;return((i=l==null?void 0:l.pageSize)==null?void 0:i.toString())??re.toString()},[l==null?void 0:l.pageSize]),x=n.useMemo(()=>{const i=new URLSearchParams(a);return i.delete("page"),i.delete("first"),i.delete("offset"),i.delete("sortBy"),Object.fromEntries(i.entries())},[a]),u=n.useMemo(()=>new URLSearchParams(a).get("sortBy"),[a])??void 0,[g,b,A]=n.useMemo(()=>{const i=new URLSearchParams(a),_=parseInt(i.get("page")??"1"),p=parseInt(i.get("first")??o),I=(_-1)*p;return[_,p,I]},[o,a]),j=n.useCallback(()=>{const i=new URLSearchParams(a);i.set("page",(g+1).toString()),r(`${c}?${i.toString()}`)},[a,g,r,c]),S=n.useCallback(i=>{const _=new URLSearchParams(a);_.set("page",i.toString()),r(`${c}?${_.toString()}`)},[a,r,c]),O=n.useCallback(i=>{const _=new URLSearchParams(a);_.set("page","1"),_.set("sortBy",i),r(`${c}?${_.toString()}`)},[c,r,a]),V=n.useCallback((i,_,p={clearOldFilters:!1})=>{const I=new URLSearchParams(p.clearOldFilters?{}:a);I.set("page","1"),p.clearOldFilters&&u&&I.set("sortBy",u),I.set(i,_),r(`${c}?${I.toString()}`)},[c,r,a,u]),R=l!=null&&l.count?Math.ceil((l==null?void 0:l.count)/((l==null?void 0:l.pageSize)??re)):void 0,N=R?g<R:void 0;return{page:g,pages:R,hasMorePages:N,first:b,offset:A,sortBy:u,filters:x,goToNextPage:j,goToPage:S,changeSorting:O,changeFilter:V}}const Ke="data:image/svg+xml,%3csvg%20width='32'%20height='32'%20viewBox='0%200%2032%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M18%2018H28V28H18V18Z'%20fill='%23A09BA8'/%3e%3cpath%20d='M4%204H14V14H4V4Z'%20fill='%23A09BA8'/%3e%3cpath%20d='M18%204H28V14H18V4Z'%20fill='%23A09BA8'/%3e%3cpath%20d='M4%2018H14V28H4V18Z'%20fill='%23A09BA8'/%3e%3c/svg%3e",Xe=l=>{const{item:a,onDeleteItem:c,onOpenModal:d}=l,[r,o]=n.useState(!1),x=n.useCallback(()=>o(!1),[o]),u=n.useCallback(()=>o(!0),[o]),g=n.useCallback(()=>d("MoveItemToCollectionModal"),[d]),b=n.useCallback(()=>{o(!1),c()},[o,c]);return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"ItemCard is-card",children:[e.jsx(ge,{className:"options-dropdown",options:[{text:s("item_card.move_to_collection"),handler:g},{text:s("global.delete"),handler:u}]}),e.jsxs(de,{to:E.itemDetail(a.id),children:[e.jsx(me,{item:a}),e.jsxs(t.Card.Content,{children:[e.jsx("div",{className:"text",title:a.name,children:a.name}),e.jsx("div",{className:"subtitle",children:s(`item.type.${a.type}`)})]})]})]}),e.jsx(t.Confirm,{size:"tiny",open:r,header:s("item_card.confirm_delete_header",{name:a.name}),content:s("item_card.confirm_delete_content",{name:a.name}),confirmButton:e.jsx(t.Button,{primary:!0,children:s("global.confirm")}),cancelButton:e.jsx(t.Button,{secondary:!0,children:s("global.cancel")}),onCancel:x,onConfirm:b})]})},ea=je.memo(Xe),aa=(l,a)=>({onDeleteItem:()=>l(Ie(a.item)),onOpenModal:c=>l(he(c,{item:a.item}))}),ta=U(void 0,aa)(ea),la="_ItemRow_xmdia_1",sa="_image_xmdia_7",na="_name_xmdia_21",ca="_title_xmdia_29",oa="_imageColumn_xmdia_30",ia="_published_xmdia_35",D={ItemRow:la,image:sa,name:na,title:ca,imageColumn:oa,published:ia};function ra(l){const{item:a}=l,c=F(),d=n.useCallback(()=>{c.push(E.itemDetail(a.id))},[c]);return e.jsxs(t.Table.Row,{className:D.ItemRow,onClick:d,children:[e.jsx(t.Table.Cell,{width:4,children:e.jsxs("div",{className:D.imageColumn,children:[e.jsx(me,{className:D.image,item:a}),e.jsxs("div",{className:D.title,children:[e.jsx(Se,{item:a}),e.jsx("div",{className:D.name,children:a.name})]})]})}),e.jsx(t.Table.Cell,{width:3,children:B(a.createdAt,{addSuffix:!0})}),e.jsx(t.Table.Cell,{width:3,children:B(a.updatedAt,{addSuffix:!0})})]})}const da=l=>{const{collection:a,onDeleteCollection:c,itemCount:d}=l,[r,o]=n.useState(!1),x=n.useCallback(()=>o(!1),[o]),u=n.useCallback(()=>o(!0),[o]),g=n.useCallback(()=>{o(!1),c()},[o,c]),b=Z(a);return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"CollectionCard is-card",children:[!a.isPublished&&e.jsx(ge,{className:Ne({"empty-collection-options":d===0},"options-dropdown"),options:[{text:s("global.delete"),handler:u}]}),e.jsxs(de,{to:E.collectionDetail(a.id,b),children:[e.jsx(Ce,{collectionId:a.id}),e.jsxs(t.Card.Content,{children:[e.jsxs("div",{className:"text",title:a.name,children:[e.jsx(_e,{collection:a})," ",a.name]}),e.jsxs("div",{className:"subtitle",children:[s(`collection.type.${b}`)," · ",s("collection_card.item_count",{count:d})]}),!a.isMappingComplete&&fe(a.urn)&&e.jsxs("div",{className:"pending-migration",children:[e.jsx(t.Icon,{name:"warning circle"})," ",s("item_status.pending_migration")]})]})]})]}),e.jsx(t.Confirm,{size:"tiny",open:r,header:s("collection_card.confirm_delete_header",{name:a.name}),content:s("collection_card.confirm_delete_content",{name:a.name}),confirmButton:e.jsx(t.Button,{primary:!0,children:s("global.confirm")}),cancelButton:e.jsx(t.Button,{secondary:!0,children:s("global.cancel")}),onCancel:x,onConfirm:g,className:"delete-collection-confirm"})]})},ma=n.memo(da),ha=(l,a)=>({itemCount:ue(l,a.collection.id)}),Ca=(l,a)=>({onDeleteCollection:()=>l(Re(a.collection))}),ua=U(ha,Ca)(ma),ga="_CollectionRow_k7d4q_1",_a="_image_k7d4q_7",xa="_name_k7d4q_16",pa="_title_k7d4q_24",Ta="_imageColumn_k7d4q_25",ba="_published_k7d4q_30",L={CollectionRow:ga,image:_a,name:xa,title:pa,imageColumn:Ta,published:ba};function ja(l){const{collection:a,itemCount:c}=l,d=F(),r=n.useCallback(()=>{d.push(E.collectionDetail(a.id,Z(a)))},[d]),o=Z(a);return e.jsxs(t.Table.Row,{className:L.CollectionRow,onClick:r,children:[e.jsx(t.Table.Cell,{width:3,children:e.jsxs("div",{className:L.imageColumn,children:[e.jsx(Ce,{className:L.image,collectionId:a.id}),e.jsxs("div",{className:L.title,children:[e.jsx(_e,{collection:a}),e.jsx("div",{className:L.name,children:a.name})]})]})}),e.jsx(t.Table.Cell,{width:3,children:s(`collection.type.${o}`)}),e.jsx(t.Table.Cell,{width:2,children:c}),e.jsx(t.Table.Cell,{width:3,children:B(a.createdAt,{addSuffix:!0})}),e.jsx(t.Table.Cell,{width:3,children:B(a.updatedAt,{addSuffix:!0})}),e.jsx(t.Table.Cell,{width:3,children:a.isPublished?e.jsxs("div",{className:L.published,children:[s("global.published")," ",e.jsx(t.Icon,{name:"check"})]}):null})]})}const Ia=(l,a)=>({itemCount:ue(l,a.collection.id)}),Sa=U(Ia)(ja);var m=(l=>(l.STANDARD_COLLECTIONS="standard_collections",l.THIRD_PARTY_COLLECTIONS="third_party_collections",l.ITEMS="orphan_items",l))(m||{});const Y=20;function Na(l){const{address:a,items:c,collections:d,view:r,collectionsPaginationData:o,itemsPaginationData:x,hasUserOrphanItems:u,isLoadingItems:g,isLoadingCollections:b,isLoadingOrphanItem:A,isLinkedWearablesPaymentsEnabled:j,isThirdPartyManager:S,onFetchCollections:O,onFetchOrphanItem:V,onFetchOrphanItems:R,onOpenModal:N,onSetView:i}=l,_=F(),{page:p,pages:I,goToPage:Q,filters:P,changeFilter:y,sortBy:k,changeSorting:W}=Je({pageSize:Y,count:o==null?void 0:o.total}),h=P.section??m.STANDARD_COLLECTIONS,M=h===m.STANDARD_COLLECTIONS||h===m.THIRD_PARTY_COLLECTIONS,[J,xe]=n.useState(P.search??""),H=n.useRef(null);n.useEffect(()=>{u===void 0&&a&&V(a)},[a,u]),n.useEffect(()=>{a&&(h===m.ITEMS?R(a,{page:p,limit:Y}):O(a,{page:p,limit:Y,q:P.search??void 0,type:h===m.STANDARD_COLLECTIONS?ce.STANDARD:ce.THIRD_PARTY,sort:k}))},[a,p,h,P.search,k,R,O]);const pe=n.useCallback(()=>{N("CreateThirdPartyCollectionModal")},[N]),$=n.useCallback(()=>{N(j?"CreateCollectionSelectorModal":"CreateCollectionModal")},[N,j]),K=n.useCallback((C,T)=>{xe(T.value),H.current&&(clearTimeout(H.current),H.current=null),H.current=setTimeout(()=>{y("search",T.value)},500)},[y]),X=n.useCallback(()=>{_.push(E.itemEditor())},[_]),ee=n.useCallback((C,{value:T})=>{W(T)},[W]),z=n.useCallback(C=>{h!==C&&y("section",C)},[a,h,y]),ae=n.useCallback(()=>e.jsx(t.Card.Group,{children:M?d.map((C,T)=>e.jsx(ua,{collection:C},T)):g?e.jsx(t.Loader,{size:"large",active:!0}):c.map((C,T)=>e.jsx(ta,{item:C},T))}),[c,d,g,M,h]),te=n.useCallback(()=>M?e.jsx(t.Section,{children:e.jsxs(t.Table,{basic:"very",children:[e.jsx(t.Table.Header,{children:e.jsxs(t.Table.Row,{children:[e.jsx(t.Table.HeaderCell,{children:s("collections_page.collection")}),e.jsx(t.Table.HeaderCell,{children:s("collections_page.type")}),e.jsx(t.Table.HeaderCell,{children:s("collections_page.items")}),e.jsx(t.Table.HeaderCell,{children:s("collections_page.created_at")}),e.jsx(t.Table.HeaderCell,{children:s("collections_page.last_modified")}),e.jsx(t.Table.HeaderCell,{})]})}),e.jsx(t.Table.Body,{children:d.map(C=>e.jsx(Sa,{collection:C},C.id))})]})}):e.jsx(t.Section,{children:e.jsxs(t.Table,{basic:"very",children:[e.jsx(t.Table.Header,{children:e.jsxs(t.Table.Row,{children:[e.jsx(t.Table.HeaderCell,{children:s("global.item")}),e.jsx(t.Table.HeaderCell,{children:s("collections_page.created_at")}),e.jsx(t.Table.HeaderCell,{children:s("collections_page.last_modified")})]})}),e.jsx(t.Table.Body,{children:c.map(C=>e.jsx(ra,{item:C},C.id))})]})}),[c,d,M]),le=n.useCallback((C,T)=>{p!==T.activePage&&Q(Number(T.activePage))},[p,Q]),se=n.useCallback(()=>e.jsxs("div",{className:"collections-main-actions",children:[h!==m.ITEMS&&e.jsx(t.Field,{placeholder:s("itemdrawer.search_items"),className:"collections-search-field",input:{icon:"search"},onChange:K,icon:e.jsx(t.Icon,{name:"search",className:"searchIcon"}),iconPosition:"left",value:J,isClearable:!0}),e.jsxs(t.Row,{className:"actions",grow:!1,children:[S&&!j&&e.jsx(t.Button,{className:"action-button",size:"small",basic:!0,onClick:pe,children:s("collections_page.new_third_party_collection")}),e.jsxs(t.Button,{className:"action-button open-editor",size:"small",basic:!0,onClick:X,children:[e.jsx(ve,{name:"cube"}),s("item_editor.open")]}),e.jsxs(t.Button,{className:"action-button",size:"small",primary:!0,onClick:$,children:[e.jsx(t.Icon,{name:"plus square"})," ",s("collections_page.new_collection")]})]})]}),[J,S,j,K,X,$]),ne=n.useCallback(()=>e.jsx(t.Column,{align:"right",children:e.jsxs(t.Row,{className:"actions",children:[h===m.STANDARD_COLLECTIONS||m.THIRD_PARTY_COLLECTIONS&&e.jsx(t.Dropdown,{direction:"left",value:k,options:[{value:f.MOST_RELEVANT,text:s("curation_page.order.most_relevant")},{value:f.CREATED_AT_DESC,text:s("global.order.newest")},{value:f.CREATED_AT_ASC,text:s("global.order.oldest")},{value:f.UPDATED_AT_DESC,text:s("global.order.updated_at_desc")},{value:f.UPDATED_AT_ASC,text:s("global.order.updated_at_asc")},{value:f.NAME_DESC,text:s("global.order.name_desc")},{value:f.NAME_ASC,text:s("global.order.name_asc")}],onChange:ee}),e.jsx(oe,{className:"grid",icon:"grid",isActive:r===w.GRID,onClick:()=>i(w.GRID)}),e.jsx(oe,{className:"list",icon:"table",isActive:r===w.LIST,onClick:()=>i(w.LIST)})]})}),[r,i,k,ee]),Te=n.useCallback(()=>{const C=o==null?void 0:o.total,T=x==null?void 0:x.total,v=h===m.STANDARD_COLLECTIONS||h===m.THIRD_PARTY_COLLECTIONS?C:T,q=h===m.STANDARD_COLLECTIONS||h===m.THIRD_PARTY_COLLECTIONS?I:x==null?void 0:x.totalPages;return A?e.jsx(t.Loader,{active:!0,size:"large"}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"banner-container",children:e.jsx(qe,{id:Ge})}),e.jsx("div",{className:"filters",children:e.jsxs(t.Container,{children:[(u||S||j)&&e.jsxs("div",{className:"action-tabs-container",children:[e.jsx("img",{src:Ke,className:"collections-icon"}),e.jsxs(t.Tabs,{isFullscreen:!0,children:[e.jsx(t.Tabs.Tab,{active:h===m.STANDARD_COLLECTIONS,onClick:()=>z(m.STANDARD_COLLECTIONS),children:s("collections_page.collections")}),(S||j)&&e.jsx(t.Tabs.Tab,{active:h===m.THIRD_PARTY_COLLECTIONS,onClick:()=>z(m.THIRD_PARTY_COLLECTIONS),children:s("collections_page.third_party_collections")}),u&&e.jsx(t.Tabs.Tab,{active:h===m.ITEMS,onClick:()=>z(m.ITEMS),children:s("collections_page.single_items")})]})]}),se(),e.jsxs(t.Row,{height:30,children:[e.jsx(t.Column,{children:e.jsx(t.Row,{children:!g&&!b&&!!v&&v>0&&e.jsx(t.Header,{sub:!0,children:s("collections_page.results",{count:v})})})}),ne()]})]})}),g||b||v===void 0?e.jsx(t.Loader,{active:!0,size:"large"}):v>0?e.jsxs(e.Fragment,{children:[r===w.GRID?ae():r===w.LIST?te():null,!!q&&q>1&&e.jsx(t.Pagination,{className:"pagination",firstItem:null,lastItem:null,totalPages:q,activePage:p,onPageChange:le})]}):e.jsxs("div",{className:"empty",children:[e.jsx(t.Header,{className:"title",size:"large",children:s("collections_page.no_items")}),e.jsx("div",{className:"empty-description",children:s("collections_page.empty_description")}),e.jsx("div",{className:"create-new-wrapper",children:e.jsx("div",{className:"create-new create-new-collection",onClick:$,children:e.jsx("div",{className:"text",children:s("collections_page.new_collection")})})})]})]})},[p,I,o,x,r,u,g,b,A,j,S,le,$,ae,te,ne,se]);return e.jsx(Ze,{className:"CollectionsPage",activeTab:Ye.COLLECTIONS,children:Te()})}const fa=l=>{const a=we(l),c=Le(l),d=a?De(l,a):[],r=a?Ee(l,a):null,o=Ae(l);return{items:d,address:a,collections:c,collectionsPaginationData:o,itemsPaginationData:r,view:We(l),isThirdPartyManager:Oe(l),isLoadingCollections:G(Pe(l),Ue),isLoadingItems:G(ie(l),Ve),isLoadingOrphanItem:G(ie(l),ze),isLinkedWearablesPaymentsEnabled:ye(l),isCampaignEnabled:ke(l),hasUserOrphanItems:Me(l)}},Ra=l=>({onSetView:a=>l(He(a)),onOpenModal:(a,c)=>l(he(a,c)),onFetchOrphanItems:(a,c)=>l($e(a,c)),onFetchCollections:(a,c)=>l(Be(a,c)),onFetchOrphanItem:a=>l(Fe(a))}),ka=U(fa,Ra)(Na);export{ka as default};
|
|
1
|
+
import{b1 as be,a4 as F,J as n,ak as je,N as e,M as s,Q as de,R as E,dN as me,S as t,T as U,ey as Ie,a2 as he,ez as Se,eA as Z,a7 as Ne,dM as Ce,eB as fe,eC as ue,eD as Re,eE as ce,P as ve,eF as f,bD as oe,eG as w,aM as we,eH as Le,eI as De,eJ as Ee,eK as Ae,eL as Oe,bq as G,eM as Pe,eN as ie,eO as ye,eP as ke,eQ as Me,eR as He,eS as $e,eT as Be,eU as Fe,eV as Ue,eW as Ve,eX as ze}from"./index-S8a1J8TH.js";import{B as qe,c as Ge,N as Ye}from"./Navigation.container-5FtjkfRQ.js";import{L as Ze}from"./LoggedInDetailPage.container-o0Dl3lEh.js";import{O as ge}from"./OptionsDropdown-BXsuPocQ.js";import{a as B}from"./date-CSdtY-77.js";import{C as _e}from"./CollectionStatus.container-B57otCoh.js";import"./selectors-DVaGn9o3.js";import"./SignInRequired-CAarWwWe.js";import"./index-i6h1Pylf.js";const Qe=l=>l.ui.collection,We=l=>Qe(l).view,re=20;function Je(l){const{search:a,pathname:c}=be(),d=F(),r=d.push.bind(d),o=n.useMemo(()=>{var i;return((i=l==null?void 0:l.pageSize)==null?void 0:i.toString())??re.toString()},[l==null?void 0:l.pageSize]),x=n.useMemo(()=>{const i=new URLSearchParams(a);return i.delete("page"),i.delete("first"),i.delete("offset"),i.delete("sortBy"),Object.fromEntries(i.entries())},[a]),u=n.useMemo(()=>new URLSearchParams(a).get("sortBy"),[a])??void 0,[g,b,A]=n.useMemo(()=>{const i=new URLSearchParams(a),_=parseInt(i.get("page")??"1"),p=parseInt(i.get("first")??o),I=(_-1)*p;return[_,p,I]},[o,a]),j=n.useCallback(()=>{const i=new URLSearchParams(a);i.set("page",(g+1).toString()),r(`${c}?${i.toString()}`)},[a,g,r,c]),S=n.useCallback(i=>{const _=new URLSearchParams(a);_.set("page",i.toString()),r(`${c}?${_.toString()}`)},[a,r,c]),O=n.useCallback(i=>{const _=new URLSearchParams(a);_.set("page","1"),_.set("sortBy",i),r(`${c}?${_.toString()}`)},[c,r,a]),V=n.useCallback((i,_,p={clearOldFilters:!1})=>{const I=new URLSearchParams(p.clearOldFilters?{}:a);I.set("page","1"),p.clearOldFilters&&u&&I.set("sortBy",u),I.set(i,_),r(`${c}?${I.toString()}`)},[c,r,a,u]),R=l!=null&&l.count?Math.ceil((l==null?void 0:l.count)/((l==null?void 0:l.pageSize)??re)):void 0,N=R?g<R:void 0;return{page:g,pages:R,hasMorePages:N,first:b,offset:A,sortBy:u,filters:x,goToNextPage:j,goToPage:S,changeSorting:O,changeFilter:V}}const Ke="data:image/svg+xml,%3csvg%20width='32'%20height='32'%20viewBox='0%200%2032%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M18%2018H28V28H18V18Z'%20fill='%23A09BA8'/%3e%3cpath%20d='M4%204H14V14H4V4Z'%20fill='%23A09BA8'/%3e%3cpath%20d='M18%204H28V14H18V4Z'%20fill='%23A09BA8'/%3e%3cpath%20d='M4%2018H14V28H4V18Z'%20fill='%23A09BA8'/%3e%3c/svg%3e",Xe=l=>{const{item:a,onDeleteItem:c,onOpenModal:d}=l,[r,o]=n.useState(!1),x=n.useCallback(()=>o(!1),[o]),u=n.useCallback(()=>o(!0),[o]),g=n.useCallback(()=>d("MoveItemToCollectionModal"),[d]),b=n.useCallback(()=>{o(!1),c()},[o,c]);return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"ItemCard is-card",children:[e.jsx(ge,{className:"options-dropdown",options:[{text:s("item_card.move_to_collection"),handler:g},{text:s("global.delete"),handler:u}]}),e.jsxs(de,{to:E.itemDetail(a.id),children:[e.jsx(me,{item:a}),e.jsxs(t.Card.Content,{children:[e.jsx("div",{className:"text",title:a.name,children:a.name}),e.jsx("div",{className:"subtitle",children:s(`item.type.${a.type}`)})]})]})]}),e.jsx(t.Confirm,{size:"tiny",open:r,header:s("item_card.confirm_delete_header",{name:a.name}),content:s("item_card.confirm_delete_content",{name:a.name}),confirmButton:e.jsx(t.Button,{primary:!0,children:s("global.confirm")}),cancelButton:e.jsx(t.Button,{secondary:!0,children:s("global.cancel")}),onCancel:x,onConfirm:b})]})},ea=je.memo(Xe),aa=(l,a)=>({onDeleteItem:()=>l(Ie(a.item)),onOpenModal:c=>l(he(c,{item:a.item}))}),ta=U(void 0,aa)(ea),la="_ItemRow_xmdia_1",sa="_image_xmdia_7",na="_name_xmdia_21",ca="_title_xmdia_29",oa="_imageColumn_xmdia_30",ia="_published_xmdia_35",D={ItemRow:la,image:sa,name:na,title:ca,imageColumn:oa,published:ia};function ra(l){const{item:a}=l,c=F(),d=n.useCallback(()=>{c.push(E.itemDetail(a.id))},[c]);return e.jsxs(t.Table.Row,{className:D.ItemRow,onClick:d,children:[e.jsx(t.Table.Cell,{width:4,children:e.jsxs("div",{className:D.imageColumn,children:[e.jsx(me,{className:D.image,item:a}),e.jsxs("div",{className:D.title,children:[e.jsx(Se,{item:a}),e.jsx("div",{className:D.name,children:a.name})]})]})}),e.jsx(t.Table.Cell,{width:3,children:B(a.createdAt,{addSuffix:!0})}),e.jsx(t.Table.Cell,{width:3,children:B(a.updatedAt,{addSuffix:!0})})]})}const da=l=>{const{collection:a,onDeleteCollection:c,itemCount:d}=l,[r,o]=n.useState(!1),x=n.useCallback(()=>o(!1),[o]),u=n.useCallback(()=>o(!0),[o]),g=n.useCallback(()=>{o(!1),c()},[o,c]),b=Z(a);return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"CollectionCard is-card",children:[!a.isPublished&&e.jsx(ge,{className:Ne({"empty-collection-options":d===0},"options-dropdown"),options:[{text:s("global.delete"),handler:u}]}),e.jsxs(de,{to:E.collectionDetail(a.id,b),children:[e.jsx(Ce,{collectionId:a.id}),e.jsxs(t.Card.Content,{children:[e.jsxs("div",{className:"text",title:a.name,children:[e.jsx(_e,{collection:a})," ",a.name]}),e.jsxs("div",{className:"subtitle",children:[s(`collection.type.${b}`)," · ",s("collection_card.item_count",{count:d})]}),!a.isMappingComplete&&fe(a.urn)&&e.jsxs("div",{className:"pending-migration",children:[e.jsx(t.Icon,{name:"warning circle"})," ",s("item_status.pending_migration")]})]})]})]}),e.jsx(t.Confirm,{size:"tiny",open:r,header:s("collection_card.confirm_delete_header",{name:a.name}),content:s("collection_card.confirm_delete_content",{name:a.name}),confirmButton:e.jsx(t.Button,{primary:!0,children:s("global.confirm")}),cancelButton:e.jsx(t.Button,{secondary:!0,children:s("global.cancel")}),onCancel:x,onConfirm:g,className:"delete-collection-confirm"})]})},ma=n.memo(da),ha=(l,a)=>({itemCount:ue(l,a.collection.id)}),Ca=(l,a)=>({onDeleteCollection:()=>l(Re(a.collection))}),ua=U(ha,Ca)(ma),ga="_CollectionRow_k7d4q_1",_a="_image_k7d4q_7",xa="_name_k7d4q_16",pa="_title_k7d4q_24",Ta="_imageColumn_k7d4q_25",ba="_published_k7d4q_30",L={CollectionRow:ga,image:_a,name:xa,title:pa,imageColumn:Ta,published:ba};function ja(l){const{collection:a,itemCount:c}=l,d=F(),r=n.useCallback(()=>{d.push(E.collectionDetail(a.id,Z(a)))},[d]),o=Z(a);return e.jsxs(t.Table.Row,{className:L.CollectionRow,onClick:r,children:[e.jsx(t.Table.Cell,{width:3,children:e.jsxs("div",{className:L.imageColumn,children:[e.jsx(Ce,{className:L.image,collectionId:a.id}),e.jsxs("div",{className:L.title,children:[e.jsx(_e,{collection:a}),e.jsx("div",{className:L.name,children:a.name})]})]})}),e.jsx(t.Table.Cell,{width:3,children:s(`collection.type.${o}`)}),e.jsx(t.Table.Cell,{width:2,children:c}),e.jsx(t.Table.Cell,{width:3,children:B(a.createdAt,{addSuffix:!0})}),e.jsx(t.Table.Cell,{width:3,children:B(a.updatedAt,{addSuffix:!0})}),e.jsx(t.Table.Cell,{width:3,children:a.isPublished?e.jsxs("div",{className:L.published,children:[s("global.published")," ",e.jsx(t.Icon,{name:"check"})]}):null})]})}const Ia=(l,a)=>({itemCount:ue(l,a.collection.id)}),Sa=U(Ia)(ja);var m=(l=>(l.STANDARD_COLLECTIONS="standard_collections",l.THIRD_PARTY_COLLECTIONS="third_party_collections",l.ITEMS="orphan_items",l))(m||{});const Y=20;function Na(l){const{address:a,items:c,collections:d,view:r,collectionsPaginationData:o,itemsPaginationData:x,hasUserOrphanItems:u,isLoadingItems:g,isLoadingCollections:b,isLoadingOrphanItem:A,isLinkedWearablesPaymentsEnabled:j,isThirdPartyManager:S,onFetchCollections:O,onFetchOrphanItem:V,onFetchOrphanItems:R,onOpenModal:N,onSetView:i}=l,_=F(),{page:p,pages:I,goToPage:Q,filters:P,changeFilter:y,sortBy:k,changeSorting:W}=Je({pageSize:Y,count:o==null?void 0:o.total}),h=P.section??m.STANDARD_COLLECTIONS,M=h===m.STANDARD_COLLECTIONS||h===m.THIRD_PARTY_COLLECTIONS,[J,xe]=n.useState(P.search??""),H=n.useRef(null);n.useEffect(()=>{u===void 0&&a&&V(a)},[a,u]),n.useEffect(()=>{a&&(h===m.ITEMS?R(a,{page:p,limit:Y}):O(a,{page:p,limit:Y,q:P.search??void 0,type:h===m.STANDARD_COLLECTIONS?ce.STANDARD:ce.THIRD_PARTY,sort:k}))},[a,p,h,P.search,k,R,O]);const pe=n.useCallback(()=>{N("CreateThirdPartyCollectionModal")},[N]),$=n.useCallback(()=>{N(j?"CreateCollectionSelectorModal":"CreateCollectionModal")},[N,j]),K=n.useCallback((C,T)=>{xe(T.value),H.current&&(clearTimeout(H.current),H.current=null),H.current=setTimeout(()=>{y("search",T.value)},500)},[y]),X=n.useCallback(()=>{_.push(E.itemEditor())},[_]),ee=n.useCallback((C,{value:T})=>{W(T)},[W]),z=n.useCallback(C=>{h!==C&&y("section",C)},[a,h,y]),ae=n.useCallback(()=>e.jsx(t.Card.Group,{children:M?d.map((C,T)=>e.jsx(ua,{collection:C},T)):g?e.jsx(t.Loader,{size:"large",active:!0}):c.map((C,T)=>e.jsx(ta,{item:C},T))}),[c,d,g,M,h]),te=n.useCallback(()=>M?e.jsx(t.Section,{children:e.jsxs(t.Table,{basic:"very",children:[e.jsx(t.Table.Header,{children:e.jsxs(t.Table.Row,{children:[e.jsx(t.Table.HeaderCell,{children:s("collections_page.collection")}),e.jsx(t.Table.HeaderCell,{children:s("collections_page.type")}),e.jsx(t.Table.HeaderCell,{children:s("collections_page.items")}),e.jsx(t.Table.HeaderCell,{children:s("collections_page.created_at")}),e.jsx(t.Table.HeaderCell,{children:s("collections_page.last_modified")}),e.jsx(t.Table.HeaderCell,{})]})}),e.jsx(t.Table.Body,{children:d.map(C=>e.jsx(Sa,{collection:C},C.id))})]})}):e.jsx(t.Section,{children:e.jsxs(t.Table,{basic:"very",children:[e.jsx(t.Table.Header,{children:e.jsxs(t.Table.Row,{children:[e.jsx(t.Table.HeaderCell,{children:s("global.item")}),e.jsx(t.Table.HeaderCell,{children:s("collections_page.created_at")}),e.jsx(t.Table.HeaderCell,{children:s("collections_page.last_modified")})]})}),e.jsx(t.Table.Body,{children:c.map(C=>e.jsx(ra,{item:C},C.id))})]})}),[c,d,M]),le=n.useCallback((C,T)=>{p!==T.activePage&&Q(Number(T.activePage))},[p,Q]),se=n.useCallback(()=>e.jsxs("div",{className:"collections-main-actions",children:[h!==m.ITEMS&&e.jsx(t.Field,{placeholder:s("itemdrawer.search_items"),className:"collections-search-field",input:{icon:"search"},onChange:K,icon:e.jsx(t.Icon,{name:"search",className:"searchIcon"}),iconPosition:"left",value:J,isClearable:!0}),e.jsxs(t.Row,{className:"actions",grow:!1,children:[S&&!j&&e.jsx(t.Button,{className:"action-button",size:"small",basic:!0,onClick:pe,children:s("collections_page.new_third_party_collection")}),e.jsxs(t.Button,{className:"action-button open-editor",size:"small",basic:!0,onClick:X,children:[e.jsx(ve,{name:"cube"}),s("item_editor.open")]}),e.jsxs(t.Button,{className:"action-button",size:"small",primary:!0,onClick:$,children:[e.jsx(t.Icon,{name:"plus square"})," ",s("collections_page.new_collection")]})]})]}),[J,S,j,K,X,$]),ne=n.useCallback(()=>e.jsx(t.Column,{align:"right",children:e.jsxs(t.Row,{className:"actions",children:[h===m.STANDARD_COLLECTIONS||m.THIRD_PARTY_COLLECTIONS&&e.jsx(t.Dropdown,{direction:"left",value:k,options:[{value:f.MOST_RELEVANT,text:s("curation_page.order.most_relevant")},{value:f.CREATED_AT_DESC,text:s("global.order.newest")},{value:f.CREATED_AT_ASC,text:s("global.order.oldest")},{value:f.UPDATED_AT_DESC,text:s("global.order.updated_at_desc")},{value:f.UPDATED_AT_ASC,text:s("global.order.updated_at_asc")},{value:f.NAME_DESC,text:s("global.order.name_desc")},{value:f.NAME_ASC,text:s("global.order.name_asc")}],onChange:ee}),e.jsx(oe,{className:"grid",icon:"grid",isActive:r===w.GRID,onClick:()=>i(w.GRID)}),e.jsx(oe,{className:"list",icon:"table",isActive:r===w.LIST,onClick:()=>i(w.LIST)})]})}),[r,i,k,ee]),Te=n.useCallback(()=>{const C=o==null?void 0:o.total,T=x==null?void 0:x.total,v=h===m.STANDARD_COLLECTIONS||h===m.THIRD_PARTY_COLLECTIONS?C:T,q=h===m.STANDARD_COLLECTIONS||h===m.THIRD_PARTY_COLLECTIONS?I:x==null?void 0:x.totalPages;return A?e.jsx(t.Loader,{active:!0,size:"large"}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"banner-container",children:e.jsx(qe,{id:Ge})}),e.jsx("div",{className:"filters",children:e.jsxs(t.Container,{children:[(u||S||j)&&e.jsxs("div",{className:"action-tabs-container",children:[e.jsx("img",{src:Ke,className:"collections-icon"}),e.jsxs(t.Tabs,{isFullscreen:!0,children:[e.jsx(t.Tabs.Tab,{active:h===m.STANDARD_COLLECTIONS,onClick:()=>z(m.STANDARD_COLLECTIONS),children:s("collections_page.collections")}),(S||j)&&e.jsx(t.Tabs.Tab,{active:h===m.THIRD_PARTY_COLLECTIONS,onClick:()=>z(m.THIRD_PARTY_COLLECTIONS),children:s("collections_page.third_party_collections")}),u&&e.jsx(t.Tabs.Tab,{active:h===m.ITEMS,onClick:()=>z(m.ITEMS),children:s("collections_page.single_items")})]})]}),se(),e.jsxs(t.Row,{height:30,children:[e.jsx(t.Column,{children:e.jsx(t.Row,{children:!g&&!b&&!!v&&v>0&&e.jsx(t.Header,{sub:!0,children:s("collections_page.results",{count:v})})})}),ne()]})]})}),g||b||v===void 0?e.jsx(t.Loader,{active:!0,size:"large"}):v>0?e.jsxs(e.Fragment,{children:[r===w.GRID?ae():r===w.LIST?te():null,!!q&&q>1&&e.jsx(t.Pagination,{className:"pagination",firstItem:null,lastItem:null,totalPages:q,activePage:p,onPageChange:le})]}):e.jsxs("div",{className:"empty",children:[e.jsx(t.Header,{className:"title",size:"large",children:s("collections_page.no_items")}),e.jsx("div",{className:"empty-description",children:s("collections_page.empty_description")}),e.jsx("div",{className:"create-new-wrapper",children:e.jsx("div",{className:"create-new create-new-collection",onClick:$,children:e.jsx("div",{className:"text",children:s("collections_page.new_collection")})})})]})]})},[p,I,o,x,r,u,g,b,A,j,S,le,$,ae,te,ne,se]);return e.jsx(Ze,{className:"CollectionsPage",activeTab:Ye.COLLECTIONS,children:Te()})}const fa=l=>{const a=we(l),c=Le(l),d=a?De(l,a):[],r=a?Ee(l,a):null,o=Ae(l);return{items:d,address:a,collections:c,collectionsPaginationData:o,itemsPaginationData:r,view:We(l),isThirdPartyManager:Oe(l),isLoadingCollections:G(Pe(l),Ue),isLoadingItems:G(ie(l),Ve),isLoadingOrphanItem:G(ie(l),ze),isLinkedWearablesPaymentsEnabled:ye(l),isCampaignEnabled:ke(l),hasUserOrphanItems:Me(l)}},Ra=l=>({onSetView:a=>l(He(a)),onOpenModal:(a,c)=>l(he(a,c)),onFetchOrphanItems:(a,c)=>l($e(a,c)),onFetchCollections:(a,c)=>l(Be(a,c)),onFetchOrphanItem:a=>l(Fe(a))}),ka=U(fa,Ra)(Na);export{ka as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as g}from"./index-
|
|
1
|
+
import{a as g}from"./index-BIvqn_2X.js";import"./index-S8a1J8TH.js";var m=Object.defineProperty,v=Object.defineProperties,y=Object.getOwnPropertyDescriptors,c=Object.getOwnPropertySymbols,w=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable,d=(e,r,t)=>r in e?m(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,h=(e,r)=>{for(var t in r||(r={}))w.call(r,t)&&d(e,t,r[t]);if(c)for(var t of c(r))f.call(r,t)&&d(e,t,r[t]);return e},_=(e,r)=>v(e,y(r)),u=(e,r,t)=>new Promise((n,s)=>{var l=i=>{try{o(t.next(i))}catch(p){s(p)}},a=i=>{try{o(t.throw(i))}catch(p){s(p)}},o=i=>i.done?n(i.value):Promise.resolve(i.value).then(l,a);o((t=t.apply(e,r)).next())}),b=(e=>(e.Start="magic_oauth_login_with_redirect_start",e.Verify="magic_oauth_login_with_redirect_verify",e.Popup="magic_oauth_login_with_popup",e.VerifyTelegramData="magic_oauth_verify_telegram_data",e))(b||{}),R=(e=>(e.InvalidRequest="invalid_request",e.InvalidClient="invalid_client",e.InvalidScope="invalid_scope",e.InvalidGrant="invalid_grant",e.UnauthorizedClient="unauthorized_client",e.UnsupportedResponseType="unsupported_response_type",e.UnsupportedGrantType="unsupported_grant_type",e.UnsupportedTokenType="unsupported_token_type",e.AccessDenied="access_denied",e.ServerError="server_error",e.TemporarilyUnavailable="temporarily_unavailable",e))(R||{}),I=class extends g.Internal{constructor(){super(),this.name="oauth2",this.config={},this.compat={"magic-sdk":">=2.4.6","@magic-sdk/react-native":!1,"@magic-sdk/react-native-bare":!1,"@magic-sdk/react-native-expo":!1},this.seamlessTelegramLogin()}loginWithRedirect(e){return this.utils.createPromiEvent((r,t)=>u(this,null,function*(){var n;let s=this.utils.createJsonRpcRequestPayload("magic_oauth_login_with_redirect_start",[_(h({},e),{apiKey:this.sdk.apiKey,platform:"web"})]),l=yield this.request(s),a=l,o=l;if(o.error&&t(this.createError(o.error,(n=o.error_description)!=null?n:"An error occurred.",{errorURI:o.error_uri,provider:o.provider})),a!=null&&a.oauthAuthoriationURI){let i=a.useMagicServerCallback?new URL(a.oauthAuthoriationURI,this.sdk.endpoint).href:a.oauthAuthoriationURI;a!=null&&a.shouldReturnURI?r(i):window.location.href=i}r(null)}))}getRedirectResult(e,r){let t=r||window.location.search,n=window.location.origin+window.location.pathname;return window.history.replaceState(null,"",n),P.call(this,t,e)}loginWithPopup(e){let r=this.utils.createJsonRpcRequestPayload("magic_oauth_login_with_popup",[_(h({},e),{apiKey:this.sdk.apiKey,platform:"web"})]);return this.request(r)}seamlessTelegramLogin(){try{if(!window.location.hash.toString().includes("#tgWebAppData"))return;let e=document.createElement("script");e.src="https://telegram.org/js/telegram-web-app.js",document.head.prepend(e),e.onload=()=>u(this,null,function*(){var r;try{let t=(r=window.Telegram)==null?void 0:r.WebApp.initData,n=this.utils.createJsonRpcRequestPayload("magic_oauth_verify_telegram_data",[{userData:t,isMiniApp:!0}]);yield this.request(n)}catch(t){console.log("Error while verifying telegram data",t)}})}catch(e){console.log("Error while loading telegram-web-app script",e)}}};function P(e,r){return this.utils.createPromiEvent((t,n)=>u(this,null,function*(){var s;let l=this.utils.createJsonRpcRequestPayload("magic_oauth_login_with_redirect_verify",[{authorizationResponseParams:e,magicApiKey:this.sdk.apiKey,platform:"web",lifespan:r}]),a=yield this.request(l),o=a,i=a;i.error&&n(this.createError(i.error,(s=i.error_description)!=null?s:"An error occurred.",{errorURI:i.error_uri,provider:i.provider})),t(o)}))}export{R as OAuthErrorCode,I as OAuthExtension,b as OAuthPayloadMethods};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var x=Object.defineProperty;var h=(t,s,a)=>s in t?x(t,s,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[s]=a;var c=(t,s,a)=>h(t,typeof s!="symbol"?s+"":s,a);import{J as f,co as g,N as e,bR as p,M as i,b6 as u,S as l,cp as j,Q as b,R as v,cq as L,bW as T,aR as R,T as w,cr as E}from"./index-
|
|
1
|
+
var x=Object.defineProperty;var h=(t,s,a)=>s in t?x(t,s,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[s]=a;var c=(t,s,a)=>h(t,typeof s!="symbol"?s+"":s,a);import{J as f,co as g,N as e,bR as p,M as i,b6 as u,S as l,cp as j,Q as b,R as v,cq as L,bW as T,aR as R,T as w,cr as E}from"./index-S8a1J8TH.js";import{L as N}from"./LandAction-BtV4NICw.js";import{L as _}from"./LandProviderPage-DfWT7-dc.js";import"./Back-QiLuX90P.js";import"./NotFound-Pab3HNpf.js";import"./hooks-yxtmZux-.js";let P=class extends f.PureComponent{constructor(){super(...arguments);c(this,"state",{address:"",isValid:!0});c(this,"handleChange",(a,r)=>{this.setState({isValid:!r.value||g(r.value),address:r.value})})}render(){const{onTransfer:a}=this.props,{address:r,isValid:o}=this.state;return e.jsx(_,{className:"LandTransferPage",children:n=>{let d;const m=p(n.owner,r);return m?d=i("transfer_page.same_owner"):o||(d=i("transfer_page.invalid_address")),e.jsx(N,{land:n,title:i("transfer_page.title"),subtitle:e.jsx(u,{id:"transfer_page.subtitle",values:{name:e.jsx("strong",{children:n.name})}}),children:e.jsxs(l.Form,{onSubmit:()=>a(n,r),children:[e.jsx(j,{label:"Address",value:r,onChange:this.handleChange,placeholder:"0x...",error:!o||m,message:d}),e.jsx(l.Section,{className:"disclaimer",children:e.jsx("p",{className:"danger-text",children:e.jsx(u,{id:"transfer_page.disclaimer",values:{br:e.jsx("br",{})}})})}),e.jsxs(l.Row,{children:[e.jsx(b,{className:"cancel",to:v.landDetail(n.id),children:e.jsx(l.Button,{children:i("global.cancel")})}),e.jsx(L,{type:"submit",primary:!0,disabled:!r||!o||n.role!==T.OWNER||p(n.owner,r),network:R.Network.ETHEREUM,children:i("global.submit")})]})]})})}})}};const V=t=>({onTransfer:(s,a)=>t(E(s,a))}),F=w(void 0,V)(P);export{F as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.DeploymentDetail{border-bottom:1px solid var(--divider);display:flex;align-items:center;padding:24px;margin-bottom:8px;background-color:var(--dark-two);border-radius:10px;gap:45px}.DeploymentDetail:first-child{border-top:1px solid var(--divider)}.DeploymentDetail:last-child{grid-column-end:-1}.DeploymentDetail.clickable:hover{background-color:#24212966;cursor:pointer}.DeploymentDetail .atlas-wrapper{width:95px;height:95px;background-color:var(--card);border-radius:8px}.DeploymentDetail .atlas-wrapper canvas{border-radius:8px}.DeploymentDetail .thumbnail-wrapper{background-color:var(--card);border-radius:8px}.DeploymentDetail .thumbnail-wrapper .thumbnail{width:95px;height:95px;border-radius:8px}.DeploymentDetail .title{font-size:15px;font-weight:600;font-stretch:normal;font-style:normal;line-height:1.6;letter-spacing:normal}.DeploymentDetail .stat{display:flex;flex-direction:column;min-width:128px;margin-right:32px}.DeploymentDetail .status{width:10px;height:10px;margin-bottom:1px;display:inline-block;border-radius:100%;margin-right:6px}.DeploymentDetail .status.online{background-color:#3fff47}.DeploymentDetail .status.needs-sync{background-color:orange}.DeploymentDetail .ui.dropdown{position:absolute;right:0}.DeploymentDetail .Stats .value .world-url{display:flex;flex-direction:row}.DeploymentDetail .Stats .value .world-url .icon.link,.DeploymentDetail .Stats .value .world-url a{color:var(--text)}.DeploymentDetail .Stats .value .world-url .icon.link{margin-left:5px}._modalContainer_5geih_1.ui.modal{width:740px;height:740px;display:flex!important;flex-direction:column;align-items:center;justify-content:center}._modalContainer_5geih_1 .dcl.modal-navigation{width:100%}._modalContainer_5geih_1 .dcl.modal-navigation-title{max-width:560px;text-align:center}._subtitle_5geih_20{font-size:14px;line-height:16px;text-align:center;max-width:560px}._modalContainer_5geih_1.ui.modal>._content_5geih_27{flex:1;display:flex;flex-direction:column;justify-content:space-between;align-items:center}._actions_5geih_35{display:flex;flex-direction:column;gap:15px;align-items:center;justify-content:center;width:100%}._actions_5geih_35 button{width:100%;max-width:476px}._actions_5geih_35 button.ui.button:not(:first-child){margin-left:0}._loadingMessage_5geih_53{display:flex}._loader_5geih_57.ui.loader.inline{margin-right:10px}.SceneDetailPage{margin-top:24px}.SceneDetailPage .dcl.section.large{margin-bottom:26px}.SceneDetailPage .dcl.back{margin-right:8px}.SceneDetailPage .header-image{height:347px;width:100%;background-color:var(--card);background-size:cover;background-position:center;object-fit:cover}.SceneDetailPage .capitalize .ui.header:not(.sub){text-transform:capitalize}.SceneDetailPage .header.name{display:flex;align-items:baseline}.SceneDetailPage .header.name .icon.edit{margin-left:21px;font-size:20px;cursor:pointer}.SceneDetailPage .status-container{margin-left:40px}.SceneDetailPage .status-badge{height:22px;padding:2px 8px;border-radius:34px;color:var(--shadows);font-weight:500;margin-right:10px}.SceneDetailPage .button.download-button,.SceneDetailPage .button.download-button:hover{background-color:#fff;color:var(--shadows)}.SceneDetailPage .button.edit-button .icon.edit{margin-right:6.85px}.SceneDetailPage .dcl.column.actions{margin-left:20px}.SceneDetailPage .dcl.section.medium.no-margin-bottom{margin-bottom:0}.SceneDetailPage .dcl.section .ui.header.sub{margin-bottom:32px;color:var(--text);font-size:20px;font-weight:400}.SceneDetailPage .empty-deployments-container{display:flex;flex-direction:column;padding:28px;background-color:var(--dark-two);color:var(--text);border:none}.SceneDetailPage .empty-deployments-thumbnail{height:86px;width:86px;background-position:center;background-size:contain;background-repeat:no-repeat;background-image:url(https://cdn.decentraland.org/@dcl/builder-site/7.16.
|
|
1
|
+
.DeploymentDetail{border-bottom:1px solid var(--divider);display:flex;align-items:center;padding:24px;margin-bottom:8px;background-color:var(--dark-two);border-radius:10px;gap:45px}.DeploymentDetail:first-child{border-top:1px solid var(--divider)}.DeploymentDetail:last-child{grid-column-end:-1}.DeploymentDetail.clickable:hover{background-color:#24212966;cursor:pointer}.DeploymentDetail .atlas-wrapper{width:95px;height:95px;background-color:var(--card);border-radius:8px}.DeploymentDetail .atlas-wrapper canvas{border-radius:8px}.DeploymentDetail .thumbnail-wrapper{background-color:var(--card);border-radius:8px}.DeploymentDetail .thumbnail-wrapper .thumbnail{width:95px;height:95px;border-radius:8px}.DeploymentDetail .title{font-size:15px;font-weight:600;font-stretch:normal;font-style:normal;line-height:1.6;letter-spacing:normal}.DeploymentDetail .stat{display:flex;flex-direction:column;min-width:128px;margin-right:32px}.DeploymentDetail .status{width:10px;height:10px;margin-bottom:1px;display:inline-block;border-radius:100%;margin-right:6px}.DeploymentDetail .status.online{background-color:#3fff47}.DeploymentDetail .status.needs-sync{background-color:orange}.DeploymentDetail .ui.dropdown{position:absolute;right:0}.DeploymentDetail .Stats .value .world-url{display:flex;flex-direction:row}.DeploymentDetail .Stats .value .world-url .icon.link,.DeploymentDetail .Stats .value .world-url a{color:var(--text)}.DeploymentDetail .Stats .value .world-url .icon.link{margin-left:5px}._modalContainer_5geih_1.ui.modal{width:740px;height:740px;display:flex!important;flex-direction:column;align-items:center;justify-content:center}._modalContainer_5geih_1 .dcl.modal-navigation{width:100%}._modalContainer_5geih_1 .dcl.modal-navigation-title{max-width:560px;text-align:center}._subtitle_5geih_20{font-size:14px;line-height:16px;text-align:center;max-width:560px}._modalContainer_5geih_1.ui.modal>._content_5geih_27{flex:1;display:flex;flex-direction:column;justify-content:space-between;align-items:center}._actions_5geih_35{display:flex;flex-direction:column;gap:15px;align-items:center;justify-content:center;width:100%}._actions_5geih_35 button{width:100%;max-width:476px}._actions_5geih_35 button.ui.button:not(:first-child){margin-left:0}._loadingMessage_5geih_53{display:flex}._loader_5geih_57.ui.loader.inline{margin-right:10px}.SceneDetailPage{margin-top:24px}.SceneDetailPage .dcl.section.large{margin-bottom:26px}.SceneDetailPage .dcl.back{margin-right:8px}.SceneDetailPage .header-image{height:347px;width:100%;background-color:var(--card);background-size:cover;background-position:center;object-fit:cover}.SceneDetailPage .capitalize .ui.header:not(.sub){text-transform:capitalize}.SceneDetailPage .header.name{display:flex;align-items:baseline}.SceneDetailPage .header.name .icon.edit{margin-left:21px;font-size:20px;cursor:pointer}.SceneDetailPage .status-container{margin-left:40px}.SceneDetailPage .status-badge{height:22px;padding:2px 8px;border-radius:34px;color:var(--shadows);font-weight:500;margin-right:10px}.SceneDetailPage .button.download-button,.SceneDetailPage .button.download-button:hover{background-color:#fff;color:var(--shadows)}.SceneDetailPage .button.edit-button .icon.edit{margin-right:6.85px}.SceneDetailPage .dcl.column.actions{margin-left:20px}.SceneDetailPage .dcl.section.medium.no-margin-bottom{margin-bottom:0}.SceneDetailPage .dcl.section .ui.header.sub{margin-bottom:32px;color:var(--text);font-size:20px;font-weight:400}.SceneDetailPage .empty-deployments-container{display:flex;flex-direction:column;padding:28px;background-color:var(--dark-two);color:var(--text);border:none}.SceneDetailPage .empty-deployments-thumbnail{height:86px;width:86px;background-position:center;background-size:contain;background-repeat:no-repeat;background-image:url(https://cdn.decentraland.org/@dcl/builder-site/7.16.1/assets/scene-CZXq89b-.svg);margin-bottom:16px}.SceneDetailPage .deployments+.notice{color:var(--text);text-align:right;margin-top:8px}.SceneDetailPage .description-content{font-size:20px;font-weight:400}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var $=Object.defineProperty;var W=(n,t,s)=>t in n?$(n,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):n[t]=s;var j=(n,t,s)=>W(n,typeof t!="symbol"?t+"":t,s);import{J as p,K as A,L as q,M as o,N as e,O as G,P as k,Q as w,R as D,S as a,T as H,U as z,V as J,W as L,X as K,Y as V,Z,$ as Q,a0 as X,a1 as Y,a2 as B,a3 as ee,a4 as se,a5 as te,a6 as ne,a7 as ae,a8 as _,a9 as oe,aa as ce,ab as S,ac as re,ad as le,ae as ie,af as de,ag as pe,ah as he,ai as je}from"./index-
|
|
1
|
+
var $=Object.defineProperty;var W=(n,t,s)=>t in n?$(n,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):n[t]=s;var j=(n,t,s)=>W(n,typeof t!="symbol"?t+"":t,s);import{J as p,K as A,L as q,M as o,N as e,O as G,P as k,Q as w,R as D,S as a,T as H,U as z,V as J,W as L,X as K,Y as V,Z,$ as Q,a0 as X,a1 as Y,a2 as B,a3 as ee,a4 as se,a5 as te,a6 as ne,a7 as ae,a8 as _,a9 as oe,aa as ce,ab as S,ac as re,ad as le,ae as ie,af as de,ag as pe,ah as he,ai as je}from"./index-S8a1J8TH.js";import{N as ue,S as me,u as ge,a as xe}from"./Navigation.container-5FtjkfRQ.js";import{O as Pe}from"./OptionsDropdown-BXsuPocQ.js";import{S as Ce}from"./SDKTag-B6m653_O.js";import{L as Se}from"./LoggedInDetailPage.container-o0Dl3lEh.js";import{u as _e}from"./hooks-yxtmZux-.js";import"./selectors-DVaGn9o3.js";import"./SignInRequired-CAarWwWe.js";var E;let fe=(E=class extends p.PureComponent{constructor(){super(...arguments);j(this,"state",{isDeleting:!1});j(this,"handleOnClick",()=>{const{onClick:s,project:c}=this.props;s&&s(c)});j(this,"handleConfirmDeleteProject",()=>{this.setState({isDeleting:!0})});j(this,"handleCancelDeleteProject",()=>{this.setState({isDeleting:!1})});j(this,"handleDeleteProject",()=>{const{project:s,onDeleteProject:c}=this.props;c(s),this.setState({isDeleting:!1})});j(this,"handleDuplicateProject",()=>{const{project:s,onDuplicateProject:c}=this.props;c(s)});j(this,"handleExportScene",()=>{this.props.onOpenModal("ExportModal",{project:this.props.project})})}componentDidMount(){this.props.onLoadProjectScene(this.props.project,this.props.type)}render(){const{project:s,parcels:c,items:r,onClick:h,isUploading:u,hasError:C,scene:m}=this.props,{isDeleting:l}=this.state,g="likes"in s;let i={},x="ProjectCard",P=A(s,m);P&&(P&&q(P)&&(P+=`?updated_at=${+new Date(s.updatedAt)}`),i={backgroundImage:`url(${P})`},x+=" has-thumbnail");const v=[{text:o("scenes_page.project_actions.duplicate_project"),handler:this.handleDuplicateProject},{text:o("scenes_page.project_actions.export_project"),handler:this.handleExportScene},{text:o("scenes_page.project_actions.delete_project"),handler:this.handleConfirmDeleteProject}],f=e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"project-thumbnail",style:i}),g?null:e.jsxs(e.Fragment,{children:[e.jsx(G,{projectId:s.id,className:"deployment-status"}),e.jsxs("div",{className:"options-container",children:[e.jsx(Ce,{scene:m}),e.jsx(Pe,{className:"options-dropdown",options:v})]})]}),e.jsxs("div",{className:"project-data",children:[e.jsxs("div",{className:"title-wrapper",children:[e.jsx("div",{className:"title",children:s.title}),u?e.jsx(k,{name:"cloud-upload",className:"is-uploading"}):null,!u&&C?e.jsx("div",{className:"error-indicator"}):null]}),e.jsxs("div",{className:"description",title:s.description,children:[e.jsx(k,{name:"scene-parcel"})," ",o("public_page.parcel_count",{parcels:c}),e.jsx(k,{name:"scene-object"})," ",o("project_card.item_count",{items:r})]})]})]});return e.jsxs(e.Fragment,{children:[h?e.jsx("div",{className:x,onClick:this.handleOnClick,children:f}):e.jsx(w,{to:g?D.poolView(s.id,"pool"):D.sceneDetail(s.id),className:x,children:f}),e.jsx(a.Confirm,{size:"tiny",open:l,header:o("project_card.confirm_delete_header",{title:s.title}),content:o("project_card.confirm_delete_content",{title:s.title}),confirmButton:e.jsx(a.Button,{primary:!0,children:o("global.confirm")}),cancelButton:e.jsx(a.Button,{secondary:!0,children:o("global.cancel")}),onCancel:this.handleCancelDeleteProject,onConfirm:this.handleDeleteProject})]})}},j(E,"defaultProps",{items:0,parcels:0}),E);const Ne=(n,t)=>{const{project:s}=t,c=s.layout.cols*s.layout.rows,r=z(n)[s.sceneId],h=r&&r.sdk6?Object.keys(r.sdk6.entities).length-c:0,u=J(n)[s.id]?L.POOL:L.PROJECT;return{parcels:c,items:h,scene:r,deploymentStatus:K(n)[t.project.id],deployments:V(n)[t.project.id],isUploading:Z(n).has(s.id),hasError:Q(n).has(s.id),type:u}},De=n=>({onDeleteProject:t=>n(X(t)),onDuplicateProject:t=>n(Y(t)),onOpenModal:(t,s)=>n(B(t,s)),onLoadProjectScene:(t,s)=>n(ee(t,s))}),I=H(Ne,De)(fe),F=n=>{const{page:t,poolList:s,projects:c,sortBy:r,totalPages:h,isFetching:u,isLoggingIn:C,onLoadFromScenePool:m,onOpenModal:l}=n,g=se();p.useEffect(()=>{m({sortBy:"updated_at",sortOrder:"desc"})},[m,l]),p.useEffect(()=>{te()&&l("WorldsForENSOwnersAnnouncementModal")},[l]);const i=p.useCallback(()=>{l("ImportModal")},[l]),x=p.useCallback(()=>{l("SceneCreationModal")},[l]),P=()=>e.jsx(a.Button,{inverted:!0,className:"import-scene",onClick:i,children:o("scenes_page.upload_scene")}),v=()=>e.jsx(a.Button,{primary:!0,className:"create-scene",onClick:x,children:o("scenes_page.create_scene")}),f=()=>e.jsx(a.Dropdown,{direction:"left",value:r,options:[{value:_.NEWEST,text:o("scenes_page.sort.newest")},{value:_.NAME,text:o("scenes_page.sort.name")},{value:_.SIZE,text:o("scenes_page.sort.size")}],onChange:R}),M=()=>c.length>0?e.jsx("div",{className:"CardList",children:c.map(d=>e.jsx(I,{project:d},d.id))}):e.jsxs("div",{className:"no-scenes-container",children:[e.jsx("h3",{className:"no-scenes-title",children:o("scenes_page.no_scenes.title")}),e.jsx("span",{className:"no-scenes-description",children:o("scenes_page.no_scenes.description",{a:d=>e.jsx("a",{rel:"noreferrer",target:"_blank",href:"https://docs.decentraland.org/creator/development-guide/sdk-101/",children:d})})}),e.jsx(oe,{})]}),N=p.useCallback((d={})=>{g.push(D.scenes({page:t,sortBy:r,...d}))},[t,r,g]),R=p.useCallback((d,{value:b})=>N({sortBy:b}),[N]),T=p.useCallback((d,{activePage:b})=>N({page:b}),[N]);if(C||u)return e.jsx(ne,{});const O=h>1,y={firstItem:null,lastItem:null};t===1&&(y.prevItem=null),t===h&&(y.nextItem=null);const U=()=>e.jsxs(e.Fragment,{children:[e.jsx(me,{}),e.jsxs(a.Container,{children:[e.jsxs(a.Section,{className:"projects-menu",children:[e.jsxs(a.Row,{children:[e.jsx(a.Column,{children:e.jsx(a.Header,{children:o("scenes_page.my_scenes")})}),e.jsx(a.Column,{align:"right",children:e.jsxs("div",{className:"actions",children:[P(),v()]})})]}),e.jsxs(a.Row,{className:"actions",children:[e.jsx(a.Column,{children:e.jsx("div",{className:"items-count",children:o("scenes_page.results",{count:c.length})})}),e.jsx(a.Column,{align:"right",children:c.length>1?f():null})]})]}),e.jsxs(a.Section,{className:ae("project-cards",{"has-pagination":O}),children:[M(),O?e.jsx(a.Pagination,{...y,activePage:t,totalPages:h,onPageChange:T}):null]}),s?e.jsxs(e.Fragment,{children:[e.jsxs(a.Row,{children:[e.jsx(a.Row,{className:"scene-pool-menu",children:e.jsx(a.Header,{sub:!0,children:o("scenes_page.from_scene_pool")})}),e.jsx(a.Row,{align:"right",children:e.jsx(w,{to:D.poolSearch(),children:e.jsxs(a.Button,{basic:!0,children:[o("global.view_more")," ",e.jsx(a.Icon,{name:"chevron right"})]})})})]}),e.jsx("div",{className:"scene-pool-projects",children:s.map(d=>e.jsx(I,{project:d},d.id))})]}):null]})]});return e.jsx(Se,{className:"ScenesPage",activeTab:ue.SCENES,children:U()})};F.defaultProps={projects:[]};const ve=()=>{const n=ce(),t=ge(),s=xe(),c=_e(Object.values(_),_.NEWEST),r=S(i=>re(i)||le(i)),h=S(ie),u=S(de),C=S(pe),m=S(he),l=p.useCallback((i,x)=>n(B(i,x)),[n]),g=p.useCallback(i=>n(je(i)),[n]);return e.jsx(F,{projects:s,isLoggingIn:r,isFetching:h,page:t,sortBy:c,totalPages:u,didCreate:C,poolList:m,onOpenModal:l,onLoadFromScenePool:g})},Me=ve;export{Me as default};
|