@dcl/builder-site 6.117.0 → 6.117.1-13029408051.commit-83eee39

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/assets/{Back-IVZes_Ab.js → Back-vJO5KaRC.js} +1 -1
  2. package/assets/CollectionProvider.container-DDSUVcDe.js +1 -0
  3. package/assets/{CollectionStatus.container-B4S-JefG.js → CollectionStatus.container-Bt3t18Iw.js} +1 -1
  4. package/assets/{ConfirmDelete-BTl6aSz6.js → ConfirmDelete-CKGaLGSN.js} +1 -1
  5. package/assets/{FileSaver.min-CY0UTpDF.js → FileSaver.min-BFQ1Otn2.js} +1 -1
  6. package/assets/{ItemProvider.container-Cz8cqMeL.js → ItemProvider.container-BpcU8OeK.js} +1 -1
  7. package/assets/{JumpIn.container-CG723M0C.js → JumpIn.container-C7PYQ-NX.js} +1 -1
  8. package/assets/{LandAction-qsQvRpo2.js → LandAction-BRlLqwvl.js} +1 -1
  9. package/assets/{LandProviderPage-CjmGo5NU.js → LandProviderPage-YonUWYPv.js} +1 -1
  10. package/assets/{LoggedInDetailPage.container-OvyIkhnT.js → LoggedInDetailPage.container-DzlaFDdE.js} +1 -1
  11. package/assets/{Navigation-Be5SLbo1.css → Navigation-DjwLDXrK.css} +1 -1
  12. package/assets/{Navigation.container-BWFTBOiv.js → Navigation.container-D1FZTUzP.js} +1 -1
  13. package/assets/{NotFound-Cp2AS0S2.js → NotFound-BiVAKBxy.js} +1 -1
  14. package/assets/{OptionsDropdown-DBa_yTT3.js → OptionsDropdown-Cmr_eLip.js} +1 -1
  15. package/assets/{RentalPeriod-F_obsrQn.js → RentalPeriod-BhsL4tf5.js} +1 -1
  16. package/assets/{SDKTag-n9q9Yn2L.js → SDKTag-Che2mSHv.js} +1 -1
  17. package/assets/{SceneStats.container-CWHrTx3X.js → SceneStats.container-CcyiFiIZ.js} +1 -1
  18. package/assets/{SignInRequired-BI7xuOee.js → SignInRequired-CyBpNy0X.js} +1 -1
  19. package/assets/{ThirdPartyKindBadge-jDtkUak0.js → ThirdPartyKindBadge-OAN3xi1b.js} +1 -1
  20. package/assets/{dataReader-N7VKGvQy.js → dataReader-CsKMeDjS.js} +1 -1
  21. package/assets/{date-YJaRvhOI.js → date-C3j4SMyi.js} +1 -1
  22. package/assets/{fortmatic-DAAly0yX.js → fortmatic-StlHjBT9.js} +1 -1
  23. package/assets/{index-CnjFsBuM.js → index-0Dh2Mntd.js} +1 -1
  24. package/assets/{index-B5ttKDxn.js → index-0b-4YtIt.js} +1 -1
  25. package/assets/index-1VK4j89i.css +1 -0
  26. package/assets/{index-B0r0Nu5q.js → index-3XP4CWcB.js} +1 -1
  27. package/assets/{index-CFxDLD0q.js → index-B5Mh9o2l.js} +1 -1
  28. package/assets/{index-Dvj4R1FZ.js → index-B5UWikX_.js} +1 -1
  29. package/assets/{index-BaqBG2aT.js → index-B6SjNz4q.js} +1 -1
  30. package/assets/{index-DYu2ykQA.js → index-BJA-f8nq.js} +1 -1
  31. package/assets/{index-DJoN2Xwx.js → index-BKSGU8fA.js} +1 -1
  32. package/assets/{index-CEOnH1Ri.js → index-BNlUrVjT.js} +1 -1
  33. package/assets/{index-Ygj9psci.js → index-BONs2GkK.js} +1 -1
  34. package/assets/{index-C-6MOH4L.js → index-BTu7eWod.js} +1 -1
  35. package/assets/{index-D6GGy32T.js → index-BVhNl-6b.js} +1 -1
  36. package/assets/{index-C7C4LodM.js → index-BX_f5hwg.js} +1 -1
  37. package/assets/index-BZP3xkLL.css +1 -0
  38. package/assets/{index-BrmEwLto.js → index-BfCCCIU2.js} +1 -1
  39. package/assets/{index-RNCX2Thk.js → index-BnHcR3oe.js} +1 -1
  40. package/assets/{index-DsxQG_qa.js → index-BzV5yMtf.js} +1 -1
  41. package/assets/index-C0-dkxLS.css +1 -0
  42. package/assets/{index-BauiAY8U.js → index-C05wCAkK.js} +1 -1
  43. package/assets/{index-B1sWZuew.js → index-C4Zm5TID.js} +1 -1
  44. package/assets/index-CGHB83Vl.js +2 -0
  45. package/assets/{index-D0Qfvylt.js → index-CkYZ0JLs.js} +1 -1
  46. package/assets/index-Cl18N8Wh.css +1 -0
  47. package/assets/index-CnbApfEQ.js +1 -0
  48. package/assets/{index-VXGnlWrX.js → index-Co91-zEg.js} +76 -76
  49. package/assets/index-CvOcBj4Y.js +1 -0
  50. package/assets/{index-BlzbTiJj.js → index-CxfY71Xg.js} +1 -1
  51. package/assets/index-D1Qtz3J_.js +1 -0
  52. package/assets/{index-Bwu3L7iE.js → index-D23tX5NC.js} +1 -1
  53. package/assets/{index-sP6Uv6gI.js → index-DEWIxXMf.js} +1 -1
  54. package/assets/{index-CbiKs_Oc.js → index-DGC16zOH.js} +1 -1
  55. package/assets/{index-D8PGgnip.js → index-DM8CBRPU.js} +1 -1
  56. package/assets/{index-BRUxQr1M.js → index-DN8-6WGI.js} +1 -1
  57. package/assets/{index-CYo0Y3z6.js → index-DQ8v8Ytx.js} +1 -1
  58. package/assets/index-DRpsUTSw.js +1 -0
  59. package/assets/{index-C4QxiB6U.js → index-DTd4NWJn.js} +1 -1
  60. package/assets/{index-Dg1inUIU.js → index-D_IeQCiu.js} +1 -1
  61. package/assets/{index-DYN0EHjc.css → index-DifLFcCc.css} +1 -1
  62. package/assets/{index-BCPDehrv.js → index-DnKA5g3D.js} +1 -1
  63. package/assets/index-Do0sSquE.js +1 -0
  64. package/assets/{index-bpAIYC2O.js → index-HdUKsP9Z.js} +1 -1
  65. package/assets/{index-B278tHFi.js → index-JxkwDgHz.js} +1 -1
  66. package/assets/{index-DYVhq7e0.css → index-UzaZfe1i.css} +7 -7
  67. package/assets/{index-DDijEo7D.js → index-gFBJnB3I.js} +1 -1
  68. package/assets/index-s-93L5R0.js +1 -0
  69. package/assets/{index-BpA8Zhlc.css → index-ttSMyn7s.css} +1 -1
  70. package/assets/{index-BP6Zqn0K.js → index-vbVQpJdH.js} +1 -1
  71. package/assets/{index-D0hSkIJP.js → index-vfILv0RG.js} +1 -1
  72. package/assets/{index.es-DjCm4_S5.js → index.es-Crnc4pJO.js} +4 -4
  73. package/assets/{selectors-C473pIzA.js → selectors-skzFLW_U.js} +1 -1
  74. package/index.html +3 -3
  75. package/package.json +3 -3
  76. package/assets/CollectionProvider.container-D-pnB2Qb.js +0 -1
  77. package/assets/index-BSptZ5gu.js +0 -1
  78. package/assets/index-BU1Fd_bo.css +0 -1
  79. package/assets/index-BqGjTozK.css +0 -1
  80. package/assets/index-C408mKHt.css +0 -1
  81. package/assets/index-C6Npo4Mc.js +0 -1
  82. package/assets/index-CtibBdSg.js +0 -1
  83. package/assets/index-Df2a4Jj5.js +0 -2
  84. package/assets/index-DudBSU05.js +0 -1
  85. package/assets/index-Dyrzbd0_.css +0 -1
  86. package/assets/index-tlmBojrl.js +0 -1
  87. package/assets/index-vGSM5xBR.js +0 -1
@@ -1 +1 @@
1
- import{bO as g,ca as D,bP as C,cb as S,G as f}from"./index-VXGnlWrX.js";import{g as T,f as j,b as s,a as o,c as k,d,l as y}from"./index-D6GGy32T.js";function p(t,e){var r,a,n,i,l,c,h,v;g(1,arguments);var b=T(),u=D((r=(a=(n=(i=e==null?void 0:e.weekStartsOn)!==null&&i!==void 0?i:e==null||(l=e.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&n!==void 0?n:b.weekStartsOn)!==null&&a!==void 0?a:(h=b.locale)===null||h===void 0||(v=h.options)===null||v===void 0?void 0:v.weekStartsOn)!==null&&r!==void 0?r:0);if(!(u>=0&&u<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var m=C(t),w=m.getUTCDay(),$=(w<u?7:0)+w-u;return m.setUTCDate(m.getUTCDate()-$),m.setUTCHours(0,0,0,0),m}function x(t,e){return g(1,arguments),j(t,Date.now(),e)}var N={lessThanXSeconds:{one:"menos de un segundo",other:"menos de {{count}} segundos"},xSeconds:{one:"1 segundo",other:"{{count}} segundos"},halfAMinute:"medio minuto",lessThanXMinutes:{one:"menos de un minuto",other:"menos de {{count}} minutos"},xMinutes:{one:"1 minuto",other:"{{count}} minutos"},aboutXHours:{one:"alrededor de 1 hora",other:"alrededor de {{count}} horas"},xHours:{one:"1 hora",other:"{{count}} horas"},xDays:{one:"1 día",other:"{{count}} días"},aboutXWeeks:{one:"alrededor de 1 semana",other:"alrededor de {{count}} semanas"},xWeeks:{one:"1 semana",other:"{{count}} semanas"},aboutXMonths:{one:"alrededor de 1 mes",other:"alrededor de {{count}} meses"},xMonths:{one:"1 mes",other:"{{count}} meses"},aboutXYears:{one:"alrededor de 1 año",other:"alrededor de {{count}} años"},xYears:{one:"1 año",other:"{{count}} años"},overXYears:{one:"más de 1 año",other:"más de {{count}} años"},almostXYears:{one:"casi 1 año",other:"casi {{count}} años"}},O=function(e,r,a){var n,i=N[e];return typeof i=="string"?n=i:r===1?n=i.one:n=i.other.replace("{{count}}",r.toString()),a!=null&&a.addSuffix?a.comparison&&a.comparison>0?"en "+n:"hace "+n:n},z={full:"EEEE, d 'de' MMMM 'de' y",long:"d 'de' MMMM 'de' y",medium:"d MMM y",short:"dd/MM/y"},V={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},X={full:"{{date}} 'a las' {{time}}",long:"{{date}} 'a las' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},E={date:s({formats:z,defaultWidth:"full"}),time:s({formats:V,defaultWidth:"full"}),dateTime:s({formats:X,defaultWidth:"full"})},F={lastWeek:"'el' eeee 'pasado a la' p",yesterday:"'ayer a la' p",today:"'hoy a la' p",tomorrow:"'mañana a la' p",nextWeek:"eeee 'a la' p",other:"P"},L={lastWeek:"'el' eeee 'pasado a las' p",yesterday:"'ayer a las' p",today:"'hoy a las' p",tomorrow:"'mañana a las' p",nextWeek:"eeee 'a las' p",other:"P"},H=function(e,r,a,n){return r.getUTCHours()!==1?L[e]:F[e]},R={narrow:["AC","DC"],abbreviated:["AC","DC"],wide:["antes de cristo","después de cristo"]},_={narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},Y={narrow:["e","f","m","a","m","j","j","a","s","o","n","d"],abbreviated:["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"],wide:["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"]},q={narrow:["d","l","m","m","j","v","s"],short:["do","lu","ma","mi","ju","vi","sá"],abbreviated:["dom","lun","mar","mié","jue","vie","sáb"],wide:["domingo","lunes","martes","miércoles","jueves","viernes","sábado"]},A={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"mañana",afternoon:"tarde",evening:"tarde",night:"noche"},abbreviated:{am:"AM",pm:"PM",midnight:"medianoche",noon:"mediodia",morning:"mañana",afternoon:"tarde",evening:"tarde",night:"noche"},wide:{am:"a.m.",pm:"p.m.",midnight:"medianoche",noon:"mediodia",morning:"mañana",afternoon:"tarde",evening:"tarde",night:"noche"}},U={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"de la mañana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"},abbreviated:{am:"AM",pm:"PM",midnight:"medianoche",noon:"mediodia",morning:"de la mañana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"},wide:{am:"a.m.",pm:"p.m.",midnight:"medianoche",noon:"mediodia",morning:"de la mañana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"}},Q=function(e,r){var a=Number(e);return a+"º"},I={ordinalNumber:Q,era:o({values:R,defaultWidth:"wide"}),quarter:o({values:_,defaultWidth:"wide",argumentCallback:function(e){return Number(e)-1}}),month:o({values:Y,defaultWidth:"wide"}),day:o({values:q,defaultWidth:"wide"}),dayPeriod:o({values:A,defaultWidth:"wide",formattingValues:U,defaultFormattingWidth:"wide"})},G=/^(\d+)(º)?/i,B=/\d+/i,J={narrow:/^(ac|dc|a|d)/i,abbreviated:/^(a\.?\s?c\.?|a\.?\s?e\.?\s?c\.?|d\.?\s?c\.?|e\.?\s?c\.?)/i,wide:/^(antes de cristo|antes de la era com[uú]n|despu[eé]s de cristo|era com[uú]n)/i},K={any:[/^ac/i,/^dc/i],wide:[/^(antes de cristo|antes de la era com[uú]n)/i,/^(despu[eé]s de cristo|era com[uú]n)/i]},Z={narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](º)? trimestre/i},ee={any:[/1/i,/2/i,/3/i,/4/i]},ae={narrow:/^[efmajsond]/i,abbreviated:/^(ene|feb|mar|abr|may|jun|jul|ago|sep|oct|nov|dic)/i,wide:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i},te={narrow:[/^e/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^en/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i]},re={narrow:/^[dlmjvs]/i,short:/^(do|lu|ma|mi|ju|vi|s[áa])/i,abbreviated:/^(dom|lun|mar|mi[ée]|jue|vie|s[áa]b)/i,wide:/^(domingo|lunes|martes|mi[ée]rcoles|jueves|viernes|s[áa]bado)/i},ne={narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^j/i,/^v/i,/^s/i],any:[/^do/i,/^lu/i,/^ma/i,/^mi/i,/^ju/i,/^vi/i,/^sa/i]},ie={narrow:/^(a|p|mn|md|(de la|a las) (mañana|tarde|noche))/i,any:/^([ap]\.?\s?m\.?|medianoche|mediodia|(de la|a las) (mañana|tarde|noche))/i},oe={any:{am:/^a/i,pm:/^p/i,midnight:/^mn/i,noon:/^md/i,morning:/mañana/i,afternoon:/tarde/i,evening:/tarde/i,night:/noche/i}},de={ordinalNumber:k({matchPattern:G,parsePattern:B,valueCallback:function(e){return parseInt(e,10)}}),era:d({matchPatterns:J,defaultMatchWidth:"wide",parsePatterns:K,defaultParseWidth:"any"}),quarter:d({matchPatterns:Z,defaultMatchWidth:"wide",parsePatterns:ee,defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:d({matchPatterns:ae,defaultMatchWidth:"wide",parsePatterns:te,defaultParseWidth:"any"}),day:d({matchPatterns:re,defaultMatchWidth:"wide",parsePatterns:ne,defaultParseWidth:"any"}),dayPeriod:d({matchPatterns:ie,defaultMatchWidth:"any",parsePatterns:oe,defaultParseWidth:"any"})},P={code:"es",formatDistance:O,formatLong:E,formatRelative:H,localize:I,match:de,options:{weekStartsOn:1,firstWeekContainsDate:1}},se={lessThanXSeconds:{one:"不到 1 秒",other:"不到 {{count}} 秒"},xSeconds:{one:"1 秒",other:"{{count}} 秒"},halfAMinute:"半分钟",lessThanXMinutes:{one:"不到 1 分钟",other:"不到 {{count}} 分钟"},xMinutes:{one:"1 分钟",other:"{{count}} 分钟"},xHours:{one:"1 小时",other:"{{count}} 小时"},aboutXHours:{one:"大约 1 小时",other:"大约 {{count}} 小时"},xDays:{one:"1 天",other:"{{count}} 天"},aboutXWeeks:{one:"大约 1 个星期",other:"大约 {{count}} 个星期"},xWeeks:{one:"1 个星期",other:"{{count}} 个星期"},aboutXMonths:{one:"大约 1 个月",other:"大约 {{count}} 个月"},xMonths:{one:"1 个月",other:"{{count}} 个月"},aboutXYears:{one:"大约 1 年",other:"大约 {{count}} 年"},xYears:{one:"1 年",other:"{{count}} 年"},overXYears:{one:"超过 1 年",other:"超过 {{count}} 年"},almostXYears:{one:"将近 1 年",other:"将近 {{count}} 年"}},me=function(e,r,a){var n,i=se[e];return typeof i=="string"?n=i:r===1?n=i.one:n=i.other.replace("{{count}}",String(r)),a!=null&&a.addSuffix?a.comparison&&a.comparison>0?n+"内":n+"前":n},ue={full:"y'年'M'月'd'日' EEEE",long:"y'年'M'月'd'日'",medium:"yyyy-MM-dd",short:"yy-MM-dd"},le={full:"zzzz a h:mm:ss",long:"z a h:mm:ss",medium:"a h:mm:ss",short:"a h:mm"},ce={full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},he={date:s({formats:ue,defaultWidth:"full"}),time:s({formats:le,defaultWidth:"full"}),dateTime:s({formats:ce,defaultWidth:"full"})};function ve(t,e,r){g(2,arguments);var a=p(t,r),n=p(e,r);return a.getTime()===n.getTime()}function W(t,e,r){var a="eeee p";return ve(t,e,r)?a:t.getTime()>e.getTime()?"'下个'"+a:"'上个'"+a}var fe={lastWeek:W,yesterday:"'昨天' p",today:"'今天' p",tomorrow:"'明天' p",nextWeek:W,other:"PP p"},ge=function(e,r,a,n){var i=fe[e];return typeof i=="function"?i(r,a,n):i},be={narrow:["前","公元"],abbreviated:["前","公元"],wide:["公元前","公元"]},we={narrow:["1","2","3","4"],abbreviated:["第一季","第二季","第三季","第四季"],wide:["第一季度","第二季度","第三季度","第四季度"]},ye={narrow:["一","二","三","四","五","六","七","八","九","十","十一","十二"],abbreviated:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],wide:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},pe={narrow:["日","一","二","三","四","五","六"],short:["日","一","二","三","四","五","六"],abbreviated:["周日","周一","周二","周三","周四","周五","周六"],wide:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"]},Pe={narrow:{am:"上",pm:"下",midnight:"凌晨",noon:"午",morning:"早",afternoon:"下午",evening:"晚",night:"夜"},abbreviated:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"},wide:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"}},We={narrow:{am:"上",pm:"下",midnight:"凌晨",noon:"午",morning:"早",afternoon:"下午",evening:"晚",night:"夜"},abbreviated:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"},wide:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"}},Me=function(e,r){var a=Number(e);switch(r==null?void 0:r.unit){case"date":return a.toString()+"日";case"hour":return a.toString()+"时";case"minute":return a.toString()+"分";case"second":return a.toString()+"秒";default:return"第 "+a.toString()}},ke={ordinalNumber:Me,era:o({values:be,defaultWidth:"wide"}),quarter:o({values:we,defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:o({values:ye,defaultWidth:"wide"}),day:o({values:pe,defaultWidth:"wide"}),dayPeriod:o({values:Pe,defaultWidth:"wide",formattingValues:We,defaultFormattingWidth:"wide"})},$e=/^(第\s*)?\d+(日|时|分|秒)?/i,De=/\d+/i,Ce={narrow:/^(前)/i,abbreviated:/^(前)/i,wide:/^(公元前|公元)/i},Se={any:[/^(前)/i,/^(公元)/i]},Te={narrow:/^[1234]/i,abbreviated:/^第[一二三四]刻/i,wide:/^第[一二三四]刻钟/i},je={any:[/(1|一)/i,/(2|二)/i,/(3|三)/i,/(4|四)/i]},xe={narrow:/^(一|二|三|四|五|六|七|八|九|十[二一])/i,abbreviated:/^(一|二|三|四|五|六|七|八|九|十[二一]|\d|1[12])月/i,wide:/^(一|二|三|四|五|六|七|八|九|十[二一])月/i},Ne={narrow:[/^一/i,/^二/i,/^三/i,/^四/i,/^五/i,/^六/i,/^七/i,/^八/i,/^九/i,/^十(?!(一|二))/i,/^十一/i,/^十二/i],any:[/^一|1/i,/^二|2/i,/^三|3/i,/^四|4/i,/^五|5/i,/^六|6/i,/^七|7/i,/^八|8/i,/^九|9/i,/^十(?!(一|二))|10/i,/^十一|11/i,/^十二|12/i]},Oe={narrow:/^[一二三四五六日]/i,short:/^[一二三四五六日]/i,abbreviated:/^周[一二三四五六日]/i,wide:/^星期[一二三四五六日]/i},ze={any:[/日/i,/一/i,/二/i,/三/i,/四/i,/五/i,/六/i]},Ve={any:/^(上午?|下午?|午夜|[中正]午|早上?|下午|晚上?|凌晨|)/i},Xe={any:{am:/^上午?/i,pm:/^下午?/i,midnight:/^午夜/i,noon:/^[中正]午/i,morning:/^早上/i,afternoon:/^下午/i,evening:/^晚上?/i,night:/^凌晨/i}},Ee={ordinalNumber:k({matchPattern:$e,parsePattern:De,valueCallback:function(e){return parseInt(e,10)}}),era:d({matchPatterns:Ce,defaultMatchWidth:"wide",parsePatterns:Se,defaultParseWidth:"any"}),quarter:d({matchPatterns:Te,defaultMatchWidth:"wide",parsePatterns:je,defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:d({matchPatterns:xe,defaultMatchWidth:"wide",parsePatterns:Ne,defaultParseWidth:"any"}),day:d({matchPatterns:Oe,defaultMatchWidth:"wide",parsePatterns:ze,defaultParseWidth:"any"}),dayPeriod:d({matchPatterns:Ve,defaultMatchWidth:"any",parsePatterns:Xe,defaultParseWidth:"any"})},M={code:"zh-CN",formatDistance:me,formatLong:he,formatRelative:ge,localize:ke,match:Ee,options:{weekStartsOn:1,firstWeekContainsDate:4}};const Fe={en:y,"en-EN":y,es:P,"es-ES":P,zh:M,"zh-CN":M};function _e(t,e={}){return x(t,Le(e))}function Ye(t){return t>3600?f("time.hours",{amount:Number((t/3600).toFixed(1)).toLocaleString()}):t>60?f("time.minutes",{amount:Math.round(t/60)}):f("time.seconds",{amount:Math.round(t)})}function Le(t){const e=Fe[S().locale];return e?{...t,locale:e}:{...t}}export{_e as a,Ye as f,p as s};
1
+ import{bO as g,ca as D,bP as C,cb as S,G as f}from"./index-Co91-zEg.js";import{g as T,f as j,b as s,a as o,c as k,d,l as y}from"./index-BVhNl-6b.js";function p(t,e){var r,a,n,i,l,c,h,v;g(1,arguments);var b=T(),u=D((r=(a=(n=(i=e==null?void 0:e.weekStartsOn)!==null&&i!==void 0?i:e==null||(l=e.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&n!==void 0?n:b.weekStartsOn)!==null&&a!==void 0?a:(h=b.locale)===null||h===void 0||(v=h.options)===null||v===void 0?void 0:v.weekStartsOn)!==null&&r!==void 0?r:0);if(!(u>=0&&u<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var m=C(t),w=m.getUTCDay(),$=(w<u?7:0)+w-u;return m.setUTCDate(m.getUTCDate()-$),m.setUTCHours(0,0,0,0),m}function x(t,e){return g(1,arguments),j(t,Date.now(),e)}var N={lessThanXSeconds:{one:"menos de un segundo",other:"menos de {{count}} segundos"},xSeconds:{one:"1 segundo",other:"{{count}} segundos"},halfAMinute:"medio minuto",lessThanXMinutes:{one:"menos de un minuto",other:"menos de {{count}} minutos"},xMinutes:{one:"1 minuto",other:"{{count}} minutos"},aboutXHours:{one:"alrededor de 1 hora",other:"alrededor de {{count}} horas"},xHours:{one:"1 hora",other:"{{count}} horas"},xDays:{one:"1 día",other:"{{count}} días"},aboutXWeeks:{one:"alrededor de 1 semana",other:"alrededor de {{count}} semanas"},xWeeks:{one:"1 semana",other:"{{count}} semanas"},aboutXMonths:{one:"alrededor de 1 mes",other:"alrededor de {{count}} meses"},xMonths:{one:"1 mes",other:"{{count}} meses"},aboutXYears:{one:"alrededor de 1 año",other:"alrededor de {{count}} años"},xYears:{one:"1 año",other:"{{count}} años"},overXYears:{one:"más de 1 año",other:"más de {{count}} años"},almostXYears:{one:"casi 1 año",other:"casi {{count}} años"}},O=function(e,r,a){var n,i=N[e];return typeof i=="string"?n=i:r===1?n=i.one:n=i.other.replace("{{count}}",r.toString()),a!=null&&a.addSuffix?a.comparison&&a.comparison>0?"en "+n:"hace "+n:n},z={full:"EEEE, d 'de' MMMM 'de' y",long:"d 'de' MMMM 'de' y",medium:"d MMM y",short:"dd/MM/y"},V={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},X={full:"{{date}} 'a las' {{time}}",long:"{{date}} 'a las' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},E={date:s({formats:z,defaultWidth:"full"}),time:s({formats:V,defaultWidth:"full"}),dateTime:s({formats:X,defaultWidth:"full"})},F={lastWeek:"'el' eeee 'pasado a la' p",yesterday:"'ayer a la' p",today:"'hoy a la' p",tomorrow:"'mañana a la' p",nextWeek:"eeee 'a la' p",other:"P"},L={lastWeek:"'el' eeee 'pasado a las' p",yesterday:"'ayer a las' p",today:"'hoy a las' p",tomorrow:"'mañana a las' p",nextWeek:"eeee 'a las' p",other:"P"},H=function(e,r,a,n){return r.getUTCHours()!==1?L[e]:F[e]},R={narrow:["AC","DC"],abbreviated:["AC","DC"],wide:["antes de cristo","después de cristo"]},_={narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},Y={narrow:["e","f","m","a","m","j","j","a","s","o","n","d"],abbreviated:["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"],wide:["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"]},q={narrow:["d","l","m","m","j","v","s"],short:["do","lu","ma","mi","ju","vi","sá"],abbreviated:["dom","lun","mar","mié","jue","vie","sáb"],wide:["domingo","lunes","martes","miércoles","jueves","viernes","sábado"]},A={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"mañana",afternoon:"tarde",evening:"tarde",night:"noche"},abbreviated:{am:"AM",pm:"PM",midnight:"medianoche",noon:"mediodia",morning:"mañana",afternoon:"tarde",evening:"tarde",night:"noche"},wide:{am:"a.m.",pm:"p.m.",midnight:"medianoche",noon:"mediodia",morning:"mañana",afternoon:"tarde",evening:"tarde",night:"noche"}},U={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"de la mañana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"},abbreviated:{am:"AM",pm:"PM",midnight:"medianoche",noon:"mediodia",morning:"de la mañana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"},wide:{am:"a.m.",pm:"p.m.",midnight:"medianoche",noon:"mediodia",morning:"de la mañana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"}},Q=function(e,r){var a=Number(e);return a+"º"},I={ordinalNumber:Q,era:o({values:R,defaultWidth:"wide"}),quarter:o({values:_,defaultWidth:"wide",argumentCallback:function(e){return Number(e)-1}}),month:o({values:Y,defaultWidth:"wide"}),day:o({values:q,defaultWidth:"wide"}),dayPeriod:o({values:A,defaultWidth:"wide",formattingValues:U,defaultFormattingWidth:"wide"})},G=/^(\d+)(º)?/i,B=/\d+/i,J={narrow:/^(ac|dc|a|d)/i,abbreviated:/^(a\.?\s?c\.?|a\.?\s?e\.?\s?c\.?|d\.?\s?c\.?|e\.?\s?c\.?)/i,wide:/^(antes de cristo|antes de la era com[uú]n|despu[eé]s de cristo|era com[uú]n)/i},K={any:[/^ac/i,/^dc/i],wide:[/^(antes de cristo|antes de la era com[uú]n)/i,/^(despu[eé]s de cristo|era com[uú]n)/i]},Z={narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](º)? trimestre/i},ee={any:[/1/i,/2/i,/3/i,/4/i]},ae={narrow:/^[efmajsond]/i,abbreviated:/^(ene|feb|mar|abr|may|jun|jul|ago|sep|oct|nov|dic)/i,wide:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i},te={narrow:[/^e/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^en/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i]},re={narrow:/^[dlmjvs]/i,short:/^(do|lu|ma|mi|ju|vi|s[áa])/i,abbreviated:/^(dom|lun|mar|mi[ée]|jue|vie|s[áa]b)/i,wide:/^(domingo|lunes|martes|mi[ée]rcoles|jueves|viernes|s[áa]bado)/i},ne={narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^j/i,/^v/i,/^s/i],any:[/^do/i,/^lu/i,/^ma/i,/^mi/i,/^ju/i,/^vi/i,/^sa/i]},ie={narrow:/^(a|p|mn|md|(de la|a las) (mañana|tarde|noche))/i,any:/^([ap]\.?\s?m\.?|medianoche|mediodia|(de la|a las) (mañana|tarde|noche))/i},oe={any:{am:/^a/i,pm:/^p/i,midnight:/^mn/i,noon:/^md/i,morning:/mañana/i,afternoon:/tarde/i,evening:/tarde/i,night:/noche/i}},de={ordinalNumber:k({matchPattern:G,parsePattern:B,valueCallback:function(e){return parseInt(e,10)}}),era:d({matchPatterns:J,defaultMatchWidth:"wide",parsePatterns:K,defaultParseWidth:"any"}),quarter:d({matchPatterns:Z,defaultMatchWidth:"wide",parsePatterns:ee,defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:d({matchPatterns:ae,defaultMatchWidth:"wide",parsePatterns:te,defaultParseWidth:"any"}),day:d({matchPatterns:re,defaultMatchWidth:"wide",parsePatterns:ne,defaultParseWidth:"any"}),dayPeriod:d({matchPatterns:ie,defaultMatchWidth:"any",parsePatterns:oe,defaultParseWidth:"any"})},P={code:"es",formatDistance:O,formatLong:E,formatRelative:H,localize:I,match:de,options:{weekStartsOn:1,firstWeekContainsDate:1}},se={lessThanXSeconds:{one:"不到 1 秒",other:"不到 {{count}} 秒"},xSeconds:{one:"1 秒",other:"{{count}} 秒"},halfAMinute:"半分钟",lessThanXMinutes:{one:"不到 1 分钟",other:"不到 {{count}} 分钟"},xMinutes:{one:"1 分钟",other:"{{count}} 分钟"},xHours:{one:"1 小时",other:"{{count}} 小时"},aboutXHours:{one:"大约 1 小时",other:"大约 {{count}} 小时"},xDays:{one:"1 天",other:"{{count}} 天"},aboutXWeeks:{one:"大约 1 个星期",other:"大约 {{count}} 个星期"},xWeeks:{one:"1 个星期",other:"{{count}} 个星期"},aboutXMonths:{one:"大约 1 个月",other:"大约 {{count}} 个月"},xMonths:{one:"1 个月",other:"{{count}} 个月"},aboutXYears:{one:"大约 1 年",other:"大约 {{count}} 年"},xYears:{one:"1 年",other:"{{count}} 年"},overXYears:{one:"超过 1 年",other:"超过 {{count}} 年"},almostXYears:{one:"将近 1 年",other:"将近 {{count}} 年"}},me=function(e,r,a){var n,i=se[e];return typeof i=="string"?n=i:r===1?n=i.one:n=i.other.replace("{{count}}",String(r)),a!=null&&a.addSuffix?a.comparison&&a.comparison>0?n+"内":n+"前":n},ue={full:"y'年'M'月'd'日' EEEE",long:"y'年'M'月'd'日'",medium:"yyyy-MM-dd",short:"yy-MM-dd"},le={full:"zzzz a h:mm:ss",long:"z a h:mm:ss",medium:"a h:mm:ss",short:"a h:mm"},ce={full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},he={date:s({formats:ue,defaultWidth:"full"}),time:s({formats:le,defaultWidth:"full"}),dateTime:s({formats:ce,defaultWidth:"full"})};function ve(t,e,r){g(2,arguments);var a=p(t,r),n=p(e,r);return a.getTime()===n.getTime()}function W(t,e,r){var a="eeee p";return ve(t,e,r)?a:t.getTime()>e.getTime()?"'下个'"+a:"'上个'"+a}var fe={lastWeek:W,yesterday:"'昨天' p",today:"'今天' p",tomorrow:"'明天' p",nextWeek:W,other:"PP p"},ge=function(e,r,a,n){var i=fe[e];return typeof i=="function"?i(r,a,n):i},be={narrow:["前","公元"],abbreviated:["前","公元"],wide:["公元前","公元"]},we={narrow:["1","2","3","4"],abbreviated:["第一季","第二季","第三季","第四季"],wide:["第一季度","第二季度","第三季度","第四季度"]},ye={narrow:["一","二","三","四","五","六","七","八","九","十","十一","十二"],abbreviated:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],wide:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},pe={narrow:["日","一","二","三","四","五","六"],short:["日","一","二","三","四","五","六"],abbreviated:["周日","周一","周二","周三","周四","周五","周六"],wide:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"]},Pe={narrow:{am:"上",pm:"下",midnight:"凌晨",noon:"午",morning:"早",afternoon:"下午",evening:"晚",night:"夜"},abbreviated:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"},wide:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"}},We={narrow:{am:"上",pm:"下",midnight:"凌晨",noon:"午",morning:"早",afternoon:"下午",evening:"晚",night:"夜"},abbreviated:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"},wide:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"}},Me=function(e,r){var a=Number(e);switch(r==null?void 0:r.unit){case"date":return a.toString()+"日";case"hour":return a.toString()+"时";case"minute":return a.toString()+"分";case"second":return a.toString()+"秒";default:return"第 "+a.toString()}},ke={ordinalNumber:Me,era:o({values:be,defaultWidth:"wide"}),quarter:o({values:we,defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:o({values:ye,defaultWidth:"wide"}),day:o({values:pe,defaultWidth:"wide"}),dayPeriod:o({values:Pe,defaultWidth:"wide",formattingValues:We,defaultFormattingWidth:"wide"})},$e=/^(第\s*)?\d+(日|时|分|秒)?/i,De=/\d+/i,Ce={narrow:/^(前)/i,abbreviated:/^(前)/i,wide:/^(公元前|公元)/i},Se={any:[/^(前)/i,/^(公元)/i]},Te={narrow:/^[1234]/i,abbreviated:/^第[一二三四]刻/i,wide:/^第[一二三四]刻钟/i},je={any:[/(1|一)/i,/(2|二)/i,/(3|三)/i,/(4|四)/i]},xe={narrow:/^(一|二|三|四|五|六|七|八|九|十[二一])/i,abbreviated:/^(一|二|三|四|五|六|七|八|九|十[二一]|\d|1[12])月/i,wide:/^(一|二|三|四|五|六|七|八|九|十[二一])月/i},Ne={narrow:[/^一/i,/^二/i,/^三/i,/^四/i,/^五/i,/^六/i,/^七/i,/^八/i,/^九/i,/^十(?!(一|二))/i,/^十一/i,/^十二/i],any:[/^一|1/i,/^二|2/i,/^三|3/i,/^四|4/i,/^五|5/i,/^六|6/i,/^七|7/i,/^八|8/i,/^九|9/i,/^十(?!(一|二))|10/i,/^十一|11/i,/^十二|12/i]},Oe={narrow:/^[一二三四五六日]/i,short:/^[一二三四五六日]/i,abbreviated:/^周[一二三四五六日]/i,wide:/^星期[一二三四五六日]/i},ze={any:[/日/i,/一/i,/二/i,/三/i,/四/i,/五/i,/六/i]},Ve={any:/^(上午?|下午?|午夜|[中正]午|早上?|下午|晚上?|凌晨|)/i},Xe={any:{am:/^上午?/i,pm:/^下午?/i,midnight:/^午夜/i,noon:/^[中正]午/i,morning:/^早上/i,afternoon:/^下午/i,evening:/^晚上?/i,night:/^凌晨/i}},Ee={ordinalNumber:k({matchPattern:$e,parsePattern:De,valueCallback:function(e){return parseInt(e,10)}}),era:d({matchPatterns:Ce,defaultMatchWidth:"wide",parsePatterns:Se,defaultParseWidth:"any"}),quarter:d({matchPatterns:Te,defaultMatchWidth:"wide",parsePatterns:je,defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:d({matchPatterns:xe,defaultMatchWidth:"wide",parsePatterns:Ne,defaultParseWidth:"any"}),day:d({matchPatterns:Oe,defaultMatchWidth:"wide",parsePatterns:ze,defaultParseWidth:"any"}),dayPeriod:d({matchPatterns:Ve,defaultMatchWidth:"any",parsePatterns:Xe,defaultParseWidth:"any"})},M={code:"zh-CN",formatDistance:me,formatLong:he,formatRelative:ge,localize:ke,match:Ee,options:{weekStartsOn:1,firstWeekContainsDate:4}};const Fe={en:y,"en-EN":y,es:P,"es-ES":P,zh:M,"zh-CN":M};function _e(t,e={}){return x(t,Le(e))}function Ye(t){return t>3600?f("time.hours",{amount:Number((t/3600).toFixed(1)).toLocaleString()}):t>60?f("time.minutes",{amount:Math.round(t/60)}):f("time.seconds",{amount:Math.round(t)})}function Le(t){const e=Fe[S().locale];return e?{...t,locale:e}:{...t}}export{_e as a,Ye as f,p as s};
@@ -1,4 +1,4 @@
1
- import{q as J}from"./index-VXGnlWrX.js";var Z=function(y){var b={};function a(r){if(b[r])return b[r].exports;var o=b[r]={i:r,l:!1,exports:{}};return y[r].call(o.exports,o,o.exports,a),o.l=!0,o.exports}return a.m=y,a.c=b,a.d=function(r,o,l){a.o(r,o)||Object.defineProperty(r,o,{enumerable:!0,get:l})},a.r=function(r){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},a.t=function(r,o){if(1&o&&(r=a(r)),8&o||4&o&&typeof r=="object"&&r&&r.__esModule)return r;var l=Object.create(null);if(a.r(l),Object.defineProperty(l,"default",{enumerable:!0,value:r}),2&o&&typeof r!="string")for(var u in r)a.d(l,u,(function(R){return r[R]}).bind(null,u));return l},a.n=function(r){var o=r&&r.__esModule?function(){return r.default}:function(){return r};return a.d(o,"a",o),o},a.o=function(r,o){return Object.prototype.hasOwnProperty.call(r,o)},a.p="",a(a.s=3)}([function(y,b){y.exports=function(a){return a&&a.__esModule?a:{default:a}}},function(y,b){y.exports=function(a,r){if(!(a instanceof r))throw new TypeError("Cannot call a class as a function")}},function(y,b,a){function r(){return Math.floor(9e4*Math.random())+1e4}Object.defineProperty(b,"__esModule",{value:!0}),b.sendAsyncWrapper=function(o,l){var u=this;return new Promise(function(R,x){u.sendAsync({jsonrpc:"2.0",id:r(),method:o,params:l||[]},function(T,A){T?x(T):R(A.result)})})},b.sendFortmaticAsyncWrapper=function(o){var l=this;return new Promise(function(u,R){l.getProvider().sendFortmaticAsync(o,function(x,T){x?R(x):u(T?T.result:{})})})},b.randomId=r,b.findExistingResponse=function(o,l){for(var u=0;u<o.length;u++)if(o[u].id===l)return o[u];return null}},function(y,b,a){y.exports=a(4)},function(y,b,a){var r=a(0),o=r(a(1)),l=r(a(5)),u=a(2),R="fm_composeSend",x="fm_logout",T="fm_get_balances",A="fm_get_transactions",w="fm_is_logged_in",P="fm_accountSettings",n="fm_deposit",s="fm_get_user",c="fm_configure",f={};y.exports=function g(_,O,I){var m=this;if((0,o.default)(this,g),this.fortmaticClient="https://x2.fortmatic.com",!_)throw new Error("Please provide a Fortmatic API key that you acquired from the developer dashboard.");this.apiKey=_,this.options=I,this.ethNetwork=O,this.queryParams=btoa(JSON.stringify({API_KEY:_,ETH_NETWORK:O})),this.transactions={send:function(h,M){var C=new v(R,{to:h.to,value:h.amount});m.getProvider().sendFortmaticAsync(C,M)}},this.getProvider=function(){return f["fortmatic-".concat(m.queryParams)]||(f["fortmatic-".concat(m.queryParams)]=new l.default(m.fortmaticClient,{API_KEY:_,ETH_NETWORK:O})),f["fortmatic-".concat(m.queryParams)]},this.user={login:function(){return m.getProvider().enable()},logout:function(){m.getProvider().account=null,m.getProvider().network=null;var h=new v(x);return u.sendFortmaticAsyncWrapper.call(m,h)},getUser:function(){var h=new v(s);return u.sendFortmaticAsyncWrapper.call(m,h)},getBalances:function(){var h=new v(T);return u.sendFortmaticAsyncWrapper.call(m,h)},getTransactions:function(){var h=new v(A);return u.sendFortmaticAsyncWrapper.call(m,h)},isLoggedIn:function(){var h=new v(w);return u.sendFortmaticAsyncWrapper.call(m,h)},settings:function(){var h=new v(P);return u.sendFortmaticAsyncWrapper.call(m,h)},deposit:function(h){var M=new v(n,h);return u.sendFortmaticAsyncWrapper.call(m,M)}},this.configure=function(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},M=new v(c);return M.params=[h],u.sendFortmaticAsyncWrapper.call(m,M)}};var v=function g(_,O){(0,o.default)(this,g),this.id=(0,u.randomId)(),this.method=_,this.params=O?[O]:[{}]}},function(y,b,a){var r=a(0);Object.defineProperty(b,"__esModule",{value:!0}),b.default=void 0;var o=r(a(6)),l=r(a(9)),u=r(a(1)),R=r(a(10)),x=a(11),T=r(a(12)),A=a(2),w=function(){function P(n,s){if((0,u.default)(this,P),this.fortmaticClient=n,this.requests={},this.queue=[],this.account=null,this.network=null,this.isFortmatic=!0,this.overlayReady=!1,this.isLoggedIn=!1,this.postMessages={FORTMATIC_HANDLE_BATCH_REQUEST:"FORTMATIC_HANDLE_BATCH_REQUEST",FORTMATIC_HANDLE_REQUEST:"FORTMATIC_HANDLE_REQUEST",FORTMATIC_HANDLE_FORTMATIC_REQUEST:"FORTMATIC_HANDLE_FORTMATIC_REQUEST",FORTMATIC_HANDLE_RESPONSE:"FORTMATIC_HANDLE_RESPONSE",FORTMATIC_OVERLAY_READY:"FORTMATIC_OVERLAY_READY",FORTMATIC_SHOW_OVERLAY:"FORTMATIC_SHOW_OVERLAY",FORTMATIC_HIDE_OVERLAY:"FORTMATIC_HIDE_OVERLAY",FORTMATIC_USER_DENIED:"FORTMATIC_USER_DENIED",FORTMATIC_USER_LOGOUT:"FORTMATIC_USER_LOGOUT",FORTMATIC_UNAUTHORIZED_API_KEY:"FORTMATIC_UNAUTHORIZED_API_KEY"},!s.API_KEY)throw new Error("Please provide a Fortmatic API key that you acquired from the developer dashboard.");this.options={API_KEY:s.API_KEY,ETH_NETWORK:s.ETH_NETWORK,DOMAIN_ORIGIN:window.location?window.location.origin:"",version:x.version},this.queryParams=btoa(JSON.stringify(this.options)),this.constructPostMessage(),this.overlay=this.createOverlay(),this.listenMessage()}return(0,R.default)(P,[{key:"constructPostMessage",value:function(){var n=this;Object.keys(this.postMessages).map(function(s){n.postMessages[s]+="-".concat(n.queryParams)})}},{key:"createOverlay",value:function(){var n=this;return new Promise(function(s,c){var f=function(){if(function(){var O=!0,I=!1,m=void 0;try{for(var h,M=document.getElementsByClassName("fortmatic-iframe")[Symbol.iterator]();!(O=(h=M.next()).done);O=!0)if(h.value.src.includes(n.queryParams))return!1}catch(C){I=!0,m=C}finally{try{O||M.return==null||M.return()}finally{if(I)throw m}}return!0}()){var v=document.createElement("style");v.innerHTML=T.default.css,v.type="text/css",document.head.appendChild(v);var g=document.createElement("iframe");g.className="fortmatic-iframe",g.src="".concat(n.fortmaticClient,"/send?params=").concat(n.queryParams),document.body.appendChild(g);var _=document.createElement("img");_.src="https://static.fortmatic.com/assets/trans.gif",document.body.appendChild(_),s({iframe:g})}else console.error("Fortmatic: Duplicate instances found.")};["loaded","interactive","complete"].indexOf(document.readyState)>-1?f():window.addEventListener("load",f.bind(n),!1)})}},{key:"showOverlay",value:function(){var n=(0,l.default)(o.default.mark(function s(){return o.default.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this.overlay;case 2:c.sent.iframe.style.display="block";case 4:case"end":return c.stop()}},s,this)}));return function(){return n.apply(this,arguments)}}()},{key:"hideOverlay",value:function(){var n=(0,l.default)(o.default.mark(function s(){return o.default.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this.overlay;case 2:c.sent.iframe.style.display="none";case 4:case"end":return c.stop()}},s,this)}));return function(){return n.apply(this,arguments)}}()},{key:"sendAsync",value:function(n,s){n.length>0?this.enqueue({payload:{id:(0,A.randomId)(),batch:n.map(function(c){return c.id=(0,A.randomId)(),c}),method:"eth_batchRequest"},cb:s}):this.enqueue({payload:n,cb:s})}},{key:"sendFortmaticAsync",value:function(n,s){this.enqueue({payload:n,cb:s,isNative:!0})}},{key:"send",value:function(n,s){if(typeof n=="string")return A.sendAsyncWrapper.call(this,n,s);if(!s){console.warn("Non-async web3 methods will be deprecated in web3 > 1.0, and are not supported by the Fortmatic provider. An async method to be used instead."),this.sendAsync(n,function(){});var c={};switch(n.method){case"eth_accounts":c=this.account?[this.account]:[];break;case"eth_coinbase":c=this.account;break;case"net_version":c=this.network||(this.options.API_KEY.startsWith("pk_live")?1:4);break;case"eth_uninstallFilter":c=!0;break;default:c={}}return{id:n.id,jsonrpc:n.jsonrpc,result:c}}this.sendAsync(n,s)}},{key:"enqueue",value:function(n){this.queue.push(n),this.overlayReady&&this.dequeue()}},{key:"dequeue",value:function(){var n=(0,l.default)(o.default.mark(function s(){var c,f,v,g=this;return o.default.wrap(function(_){for(;;)switch(_.prev=_.next){case 0:if(this.queue.length!==0){_.next=2;break}return _.abrupt("return");case 2:if(!(c=this.queue.shift())){_.next=11;break}return f=c.payload,v=c.cb,f.id=(0,A.randomId)(),_.next=9,this.postMessage(c.isNative?this.postMessages.FORTMATIC_HANDLE_FORTMATIC_REQUEST:this.postMessages.FORTMATIC_HANDLE_REQUEST,c.payload);case 9:f.batch&&f.batch.length>0?(f.batch.forEach(function(O){g.requests[O.id]={parentId:f.id,payload:O,cb:function(I,m){var h=g.requests[f.id].batchResponse;if(I&&I.response&&!(0,A.findExistingResponse)(h,I.response.id))throw h.push({jsonrpc:"2.0",id:I.response.id,error:{code:I.response.code,message:I.response.message}}),g.requests[f.id].cb(null,h),I.response;if(m&&m.result&&!(0,A.findExistingResponse)(h,m.id))return h.push(m);throw new Error("Fortmatic: unexpected callback behavior")}}}),this.requests[f.id]={payload:f,cb:v,batchResponse:[]}):this.requests[f.id]={payload:f,cb:v},this.dequeue();case 11:case"end":return _.stop()}},s,this)}));return function(){return n.apply(this,arguments)}}()},{key:"postMessage",value:function(){var n=(0,l.default)(o.default.mark(function s(c,f){var v;return o.default.wrap(function(g){for(;;)switch(g.prev=g.next){case 0:return g.next=2,this.overlay;case 2:if(!(v=g.sent).iframe.contentWindow){g.next=7;break}v.iframe.contentWindow.postMessage({msgType:c,payload:f},"*"),g.next=8;break;case 7:throw new Error("Fortmatic: Modal is not ready.");case 8:case"end":return g.stop()}},s,this)}));return function(s,c){return n.apply(this,arguments)}}()},{key:"enable",value:function(){return A.sendAsyncWrapper.call(this,"eth_accounts")}},{key:"listenMessage",value:function(){var n=this;window.addEventListener("message",function(s){if(s.origin===n.fortmaticClient){var c=s.data.response?s.data.response.id:null;switch(s.data.msgType){case n.postMessages.FORTMATIC_OVERLAY_READY:n.overlayReady=!0,n.dequeue();break;case n.postMessages.FORTMATIC_HANDLE_RESPONSE:try{n.requests[c].cb(null,s.data.response);var f=n.requests[c].parentId;f&&n.requests[f].payload.batch.length===n.requests[f].batchResponse.length&&n.requests[f].cb(null,n.requests[f].batchResponse),n.requests[c].payload.method==="eth_accounts"?n.account=s.data.response.result[0]:n.requests[c].payload.method==="eth_coinbase"?n.account=s.data.response.result:n.requests[c].payload.method==="net_version"&&(n.network=s.data.response.result)}catch{}n.isLoggedIn=!0,n.dequeue();break;case n.postMessages.FORTMATIC_HIDE_OVERLAY:n.hideOverlay();break;case n.postMessages.FORTMATIC_SHOW_OVERLAY:n.showOverlay();break;case n.postMessages.FORTMATIC_USER_LOGOUT:n.account=null,n.network=null,n.isLoggedIn=!1;break;case n.postMessages.FORTMATIC_UNAUTHORIZED_API_KEY:throw n.overlayReady=!1,new Error("Given API key is not authorized to access the resource.");case n.postMessages.FORTMATIC_USER_DENIED:if(c){var v=s.data.response&&s.data.response.message?s.data.response.message:"Fortmatic: Modal was closed without executing action!",g=s.data.response&&s.data.response.code?s.data.response.code:1;n.requests[c].cb({message:v,code:g,response:s.data.response})}else n.queue.forEach(function(_){return _.cb({message:"Fortmatic: Modal was closed without executing action!",code:1})});n.dequeue()}}})}}]),P}();b.default=w},function(y,b,a){y.exports=a(7)},function(y,b,a){var r=function(){return this||typeof self=="object"&&self}()||Function("return this")(),o=r.regeneratorRuntime&&Object.getOwnPropertyNames(r).indexOf("regeneratorRuntime")>=0,l=o&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,y.exports=a(8),o)r.regeneratorRuntime=l;else try{delete r.regeneratorRuntime}catch{r.regeneratorRuntime=void 0}},function(y,b){(function(a){var r,o=Object.prototype,l=o.hasOwnProperty,u=typeof Symbol=="function"?Symbol:{},R=u.iterator||"@@iterator",x=u.asyncIterator||"@@asyncIterator",T=u.toStringTag||"@@toStringTag",A=typeof y=="object",w=a.regeneratorRuntime;if(w)A&&(y.exports=w);else{(w=a.regeneratorRuntime=A?y.exports:{}).wrap=I;var P="suspendedStart",n="suspendedYield",s="executing",c="completed",f={},v={};v[R]=function(){return this};var g=Object.getPrototypeOf,_=g&&g(g(G([])));_&&_!==o&&l.call(_,R)&&(v=_);var O=C.prototype=h.prototype=Object.create(v);M.prototype=O.constructor=C,C.constructor=M,C[T]=M.displayName="GeneratorFunction",w.isGeneratorFunction=function(t){var e=typeof t=="function"&&t.constructor;return!!e&&(e===M||(e.displayName||e.name)==="GeneratorFunction")},w.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,C):(t.__proto__=C,T in t||(t[T]="GeneratorFunction")),t.prototype=Object.create(O),t},w.awrap=function(t){return{__await:t}},V(U.prototype),U.prototype[x]=function(){return this},w.AsyncIterator=U,w.async=function(t,e,d,p){var i=new U(I(t,e,d,p));return w.isGeneratorFunction(e)?i:i.next().then(function(F){return F.done?F.value:i.next()})},V(O),O[T]="Generator",O[R]=function(){return this},O.toString=function(){return"[object Generator]"},w.keys=function(t){var e=[];for(var d in t)e.push(d);return e.reverse(),function p(){for(;e.length;){var i=e.pop();if(i in t)return p.value=i,p.done=!1,p}return p.done=!0,p}},w.values=G,K.prototype={constructor:K,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(Y),!t)for(var e in this)e.charAt(0)==="t"&&l.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=r)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if(t.type==="throw")throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function d(W,E){return F.type="throw",F.arg=t,e.next=W,E&&(e.method="next",e.arg=r),!!E}for(var p=this.tryEntries.length-1;p>=0;--p){var i=this.tryEntries[p],F=i.completion;if(i.tryLoc==="root")return d("end");if(i.tryLoc<=this.prev){var j=l.call(i,"catchLoc"),q=l.call(i,"finallyLoc");if(j&&q){if(this.prev<i.catchLoc)return d(i.catchLoc,!0);if(this.prev<i.finallyLoc)return d(i.finallyLoc)}else if(j){if(this.prev<i.catchLoc)return d(i.catchLoc,!0)}else{if(!q)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return d(i.finallyLoc)}}}},abrupt:function(t,e){for(var d=this.tryEntries.length-1;d>=0;--d){var p=this.tryEntries[d];if(p.tryLoc<=this.prev&&l.call(p,"finallyLoc")&&this.prev<p.finallyLoc){var i=p;break}}i&&(t==="break"||t==="continue")&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var F=i?i.completion:{};return F.type=t,F.arg=e,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(F)},complete:function(t,e){if(t.type==="throw")throw t.arg;return t.type==="break"||t.type==="continue"?this.next=t.arg:t.type==="return"?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):t.type==="normal"&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var d=this.tryEntries[e];if(d.finallyLoc===t)return this.complete(d.completion,d.afterLoc),Y(d),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var d=this.tryEntries[e];if(d.tryLoc===t){var p=d.completion;if(p.type==="throw"){var i=p.arg;Y(d)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,d){return this.delegate={iterator:G(t),resultName:e,nextLoc:d},this.method==="next"&&(this.arg=r),f}}}function I(t,e,d,p){var i=e&&e.prototype instanceof h?e:h,F=Object.create(i.prototype),j=new K(p||[]);return F._invoke=function(q,W,E){var k=P;return function(S,D){if(k===s)throw new Error("Generator is already running");if(k===c){if(S==="throw")throw D;return Q()}for(E.method=S,E.arg=D;;){var H=E.delegate;if(H){var N=B(H,E);if(N){if(N===f)continue;return N}}if(E.method==="next")E.sent=E._sent=E.arg;else if(E.method==="throw"){if(k===P)throw k=c,E.arg;E.dispatchException(E.arg)}else E.method==="return"&&E.abrupt("return",E.arg);k=s;var L=m(q,W,E);if(L.type==="normal"){if(k=E.done?c:n,L.arg===f)continue;return{value:L.arg,done:E.done}}L.type==="throw"&&(k=c,E.method="throw",E.arg=L.arg)}}}(t,d,j),F}function m(t,e,d){try{return{type:"normal",arg:t.call(e,d)}}catch(p){return{type:"throw",arg:p}}}function h(){}function M(){}function C(){}function V(t){["next","throw","return"].forEach(function(e){t[e]=function(d){return this._invoke(e,d)}})}function U(t){var e;this._invoke=function(d,p){function i(){return new Promise(function(F,j){(function q(W,E,k,S){var D=m(t[W],t,E);if(D.type!=="throw"){var H=D.arg,N=H.value;return N&&typeof N=="object"&&l.call(N,"__await")?Promise.resolve(N.__await).then(function(L){q("next",L,k,S)},function(L){q("throw",L,k,S)}):Promise.resolve(N).then(function(L){H.value=L,k(H)},function(L){return q("throw",L,k,S)})}S(D.arg)})(d,p,F,j)})}return e=e?e.then(i,i):i()}}function B(t,e){var d=t.iterator[e.method];if(d===r){if(e.delegate=null,e.method==="throw"){if(t.iterator.return&&(e.method="return",e.arg=r,B(t,e),e.method==="throw"))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var p=m(d,t.iterator,e.arg);if(p.type==="throw")return e.method="throw",e.arg=p.arg,e.delegate=null,f;var i=p.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,e.method!=="return"&&(e.method="next",e.arg=r),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function z(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function Y(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function K(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(z,this),this.reset(!0)}function G(t){if(t){var e=t[R];if(e)return e.call(t);if(typeof t.next=="function")return t;if(!isNaN(t.length)){var d=-1,p=function i(){for(;++d<t.length;)if(l.call(t,d))return i.value=t[d],i.done=!1,i;return i.value=r,i.done=!0,i};return p.next=p}}return{next:Q}}function Q(){return{value:r,done:!0}}})(function(){return this||typeof self=="object"&&self}()||Function("return this")())},function(y,b){function a(r,o,l,u,R,x,T){try{var A=r[x](T),w=A.value}catch(P){return void l(P)}A.done?o(w):Promise.resolve(w).then(u,R)}y.exports=function(r){return function(){var o=this,l=arguments;return new Promise(function(u,R){var x=r.apply(o,l);function T(w){a(x,u,R,T,A,"next",w)}function A(w){a(x,u,R,T,A,"throw",w)}T(void 0)})}}},function(y,b){function a(r,o){for(var l=0;l<o.length;l++){var u=o[l];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(r,u.key,u)}}y.exports=function(r,o,l){return o&&a(r.prototype,o),l&&a(r,l),r}},function(y){y.exports={name:"fortmatic",version:"1.1.3",description:"Fortmatic Javascript SDK",main:"lib/fortmatic.js",scripts:{build:"WEBPACK_ENV=production webpack","build:dev":"WEBPACK_ENV=development BABEL_ENV=development webpack --progress --colors --watch",test:"nyc --reporter=lcov --reporter=text-summary ava"},author:"Fortmatic <team@fortmatic.com> (https://fortmatic.com/)",license:"MIT",repository:{type:"git",url:"https://github.com/fortmatic/fortmatic-js"},keywords:["Auth","Login","Web3","Crypto","Ethereum","MetaMask","Wallet","Blockchain","Dapp"],homepage:"https://www.fortmatic.com",ava:{require:["@babel/register"],files:["test/**/*.spec.js"],babel:{testOptions:{presets:["@babel/env"],plugins:["@babel/plugin-proposal-function-bind","@babel/plugin-transform-runtime"]}},verbose:!0},nyc:{all:!1,"check-coverage":!0,"per-file":!0,lines:80,statements:80,functions:80,branches:80,include:["src/**/*.js"],exclude:["*/style.js"],require:[],reporter:["html","lcov"]},dependencies:{"@babel/runtime":"7.3.4"},devDependencies:{"@babel/core":"7.3.4","@babel/plugin-proposal-function-bind":"7.2.0","@babel/plugin-transform-modules-commonjs":"7.2.0","@babel/plugin-transform-runtime":"7.3.4","@babel/preset-env":"7.3.4","@babel/register":"7.0.0",ava:"2.2.0","babel-eslint":"10.0.1","babel-loader":"8.0.5",eslint:"5.9.0",lodash:"4.17.11",nyc:"13.1.0",sinon:"7.1.1",webpack:"4.26.1","webpack-cli":"3.1.2"}}},function(y,b,a){b.css=`
1
+ import{q as J}from"./index-Co91-zEg.js";var Z=function(y){var b={};function a(r){if(b[r])return b[r].exports;var o=b[r]={i:r,l:!1,exports:{}};return y[r].call(o.exports,o,o.exports,a),o.l=!0,o.exports}return a.m=y,a.c=b,a.d=function(r,o,l){a.o(r,o)||Object.defineProperty(r,o,{enumerable:!0,get:l})},a.r=function(r){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},a.t=function(r,o){if(1&o&&(r=a(r)),8&o||4&o&&typeof r=="object"&&r&&r.__esModule)return r;var l=Object.create(null);if(a.r(l),Object.defineProperty(l,"default",{enumerable:!0,value:r}),2&o&&typeof r!="string")for(var u in r)a.d(l,u,(function(R){return r[R]}).bind(null,u));return l},a.n=function(r){var o=r&&r.__esModule?function(){return r.default}:function(){return r};return a.d(o,"a",o),o},a.o=function(r,o){return Object.prototype.hasOwnProperty.call(r,o)},a.p="",a(a.s=3)}([function(y,b){y.exports=function(a){return a&&a.__esModule?a:{default:a}}},function(y,b){y.exports=function(a,r){if(!(a instanceof r))throw new TypeError("Cannot call a class as a function")}},function(y,b,a){function r(){return Math.floor(9e4*Math.random())+1e4}Object.defineProperty(b,"__esModule",{value:!0}),b.sendAsyncWrapper=function(o,l){var u=this;return new Promise(function(R,x){u.sendAsync({jsonrpc:"2.0",id:r(),method:o,params:l||[]},function(T,A){T?x(T):R(A.result)})})},b.sendFortmaticAsyncWrapper=function(o){var l=this;return new Promise(function(u,R){l.getProvider().sendFortmaticAsync(o,function(x,T){x?R(x):u(T?T.result:{})})})},b.randomId=r,b.findExistingResponse=function(o,l){for(var u=0;u<o.length;u++)if(o[u].id===l)return o[u];return null}},function(y,b,a){y.exports=a(4)},function(y,b,a){var r=a(0),o=r(a(1)),l=r(a(5)),u=a(2),R="fm_composeSend",x="fm_logout",T="fm_get_balances",A="fm_get_transactions",w="fm_is_logged_in",P="fm_accountSettings",n="fm_deposit",s="fm_get_user",c="fm_configure",f={};y.exports=function g(_,O,I){var m=this;if((0,o.default)(this,g),this.fortmaticClient="https://x2.fortmatic.com",!_)throw new Error("Please provide a Fortmatic API key that you acquired from the developer dashboard.");this.apiKey=_,this.options=I,this.ethNetwork=O,this.queryParams=btoa(JSON.stringify({API_KEY:_,ETH_NETWORK:O})),this.transactions={send:function(h,M){var C=new v(R,{to:h.to,value:h.amount});m.getProvider().sendFortmaticAsync(C,M)}},this.getProvider=function(){return f["fortmatic-".concat(m.queryParams)]||(f["fortmatic-".concat(m.queryParams)]=new l.default(m.fortmaticClient,{API_KEY:_,ETH_NETWORK:O})),f["fortmatic-".concat(m.queryParams)]},this.user={login:function(){return m.getProvider().enable()},logout:function(){m.getProvider().account=null,m.getProvider().network=null;var h=new v(x);return u.sendFortmaticAsyncWrapper.call(m,h)},getUser:function(){var h=new v(s);return u.sendFortmaticAsyncWrapper.call(m,h)},getBalances:function(){var h=new v(T);return u.sendFortmaticAsyncWrapper.call(m,h)},getTransactions:function(){var h=new v(A);return u.sendFortmaticAsyncWrapper.call(m,h)},isLoggedIn:function(){var h=new v(w);return u.sendFortmaticAsyncWrapper.call(m,h)},settings:function(){var h=new v(P);return u.sendFortmaticAsyncWrapper.call(m,h)},deposit:function(h){var M=new v(n,h);return u.sendFortmaticAsyncWrapper.call(m,M)}},this.configure=function(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},M=new v(c);return M.params=[h],u.sendFortmaticAsyncWrapper.call(m,M)}};var v=function g(_,O){(0,o.default)(this,g),this.id=(0,u.randomId)(),this.method=_,this.params=O?[O]:[{}]}},function(y,b,a){var r=a(0);Object.defineProperty(b,"__esModule",{value:!0}),b.default=void 0;var o=r(a(6)),l=r(a(9)),u=r(a(1)),R=r(a(10)),x=a(11),T=r(a(12)),A=a(2),w=function(){function P(n,s){if((0,u.default)(this,P),this.fortmaticClient=n,this.requests={},this.queue=[],this.account=null,this.network=null,this.isFortmatic=!0,this.overlayReady=!1,this.isLoggedIn=!1,this.postMessages={FORTMATIC_HANDLE_BATCH_REQUEST:"FORTMATIC_HANDLE_BATCH_REQUEST",FORTMATIC_HANDLE_REQUEST:"FORTMATIC_HANDLE_REQUEST",FORTMATIC_HANDLE_FORTMATIC_REQUEST:"FORTMATIC_HANDLE_FORTMATIC_REQUEST",FORTMATIC_HANDLE_RESPONSE:"FORTMATIC_HANDLE_RESPONSE",FORTMATIC_OVERLAY_READY:"FORTMATIC_OVERLAY_READY",FORTMATIC_SHOW_OVERLAY:"FORTMATIC_SHOW_OVERLAY",FORTMATIC_HIDE_OVERLAY:"FORTMATIC_HIDE_OVERLAY",FORTMATIC_USER_DENIED:"FORTMATIC_USER_DENIED",FORTMATIC_USER_LOGOUT:"FORTMATIC_USER_LOGOUT",FORTMATIC_UNAUTHORIZED_API_KEY:"FORTMATIC_UNAUTHORIZED_API_KEY"},!s.API_KEY)throw new Error("Please provide a Fortmatic API key that you acquired from the developer dashboard.");this.options={API_KEY:s.API_KEY,ETH_NETWORK:s.ETH_NETWORK,DOMAIN_ORIGIN:window.location?window.location.origin:"",version:x.version},this.queryParams=btoa(JSON.stringify(this.options)),this.constructPostMessage(),this.overlay=this.createOverlay(),this.listenMessage()}return(0,R.default)(P,[{key:"constructPostMessage",value:function(){var n=this;Object.keys(this.postMessages).map(function(s){n.postMessages[s]+="-".concat(n.queryParams)})}},{key:"createOverlay",value:function(){var n=this;return new Promise(function(s,c){var f=function(){if(function(){var O=!0,I=!1,m=void 0;try{for(var h,M=document.getElementsByClassName("fortmatic-iframe")[Symbol.iterator]();!(O=(h=M.next()).done);O=!0)if(h.value.src.includes(n.queryParams))return!1}catch(C){I=!0,m=C}finally{try{O||M.return==null||M.return()}finally{if(I)throw m}}return!0}()){var v=document.createElement("style");v.innerHTML=T.default.css,v.type="text/css",document.head.appendChild(v);var g=document.createElement("iframe");g.className="fortmatic-iframe",g.src="".concat(n.fortmaticClient,"/send?params=").concat(n.queryParams),document.body.appendChild(g);var _=document.createElement("img");_.src="https://static.fortmatic.com/assets/trans.gif",document.body.appendChild(_),s({iframe:g})}else console.error("Fortmatic: Duplicate instances found.")};["loaded","interactive","complete"].indexOf(document.readyState)>-1?f():window.addEventListener("load",f.bind(n),!1)})}},{key:"showOverlay",value:function(){var n=(0,l.default)(o.default.mark(function s(){return o.default.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this.overlay;case 2:c.sent.iframe.style.display="block";case 4:case"end":return c.stop()}},s,this)}));return function(){return n.apply(this,arguments)}}()},{key:"hideOverlay",value:function(){var n=(0,l.default)(o.default.mark(function s(){return o.default.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this.overlay;case 2:c.sent.iframe.style.display="none";case 4:case"end":return c.stop()}},s,this)}));return function(){return n.apply(this,arguments)}}()},{key:"sendAsync",value:function(n,s){n.length>0?this.enqueue({payload:{id:(0,A.randomId)(),batch:n.map(function(c){return c.id=(0,A.randomId)(),c}),method:"eth_batchRequest"},cb:s}):this.enqueue({payload:n,cb:s})}},{key:"sendFortmaticAsync",value:function(n,s){this.enqueue({payload:n,cb:s,isNative:!0})}},{key:"send",value:function(n,s){if(typeof n=="string")return A.sendAsyncWrapper.call(this,n,s);if(!s){console.warn("Non-async web3 methods will be deprecated in web3 > 1.0, and are not supported by the Fortmatic provider. An async method to be used instead."),this.sendAsync(n,function(){});var c={};switch(n.method){case"eth_accounts":c=this.account?[this.account]:[];break;case"eth_coinbase":c=this.account;break;case"net_version":c=this.network||(this.options.API_KEY.startsWith("pk_live")?1:4);break;case"eth_uninstallFilter":c=!0;break;default:c={}}return{id:n.id,jsonrpc:n.jsonrpc,result:c}}this.sendAsync(n,s)}},{key:"enqueue",value:function(n){this.queue.push(n),this.overlayReady&&this.dequeue()}},{key:"dequeue",value:function(){var n=(0,l.default)(o.default.mark(function s(){var c,f,v,g=this;return o.default.wrap(function(_){for(;;)switch(_.prev=_.next){case 0:if(this.queue.length!==0){_.next=2;break}return _.abrupt("return");case 2:if(!(c=this.queue.shift())){_.next=11;break}return f=c.payload,v=c.cb,f.id=(0,A.randomId)(),_.next=9,this.postMessage(c.isNative?this.postMessages.FORTMATIC_HANDLE_FORTMATIC_REQUEST:this.postMessages.FORTMATIC_HANDLE_REQUEST,c.payload);case 9:f.batch&&f.batch.length>0?(f.batch.forEach(function(O){g.requests[O.id]={parentId:f.id,payload:O,cb:function(I,m){var h=g.requests[f.id].batchResponse;if(I&&I.response&&!(0,A.findExistingResponse)(h,I.response.id))throw h.push({jsonrpc:"2.0",id:I.response.id,error:{code:I.response.code,message:I.response.message}}),g.requests[f.id].cb(null,h),I.response;if(m&&m.result&&!(0,A.findExistingResponse)(h,m.id))return h.push(m);throw new Error("Fortmatic: unexpected callback behavior")}}}),this.requests[f.id]={payload:f,cb:v,batchResponse:[]}):this.requests[f.id]={payload:f,cb:v},this.dequeue();case 11:case"end":return _.stop()}},s,this)}));return function(){return n.apply(this,arguments)}}()},{key:"postMessage",value:function(){var n=(0,l.default)(o.default.mark(function s(c,f){var v;return o.default.wrap(function(g){for(;;)switch(g.prev=g.next){case 0:return g.next=2,this.overlay;case 2:if(!(v=g.sent).iframe.contentWindow){g.next=7;break}v.iframe.contentWindow.postMessage({msgType:c,payload:f},"*"),g.next=8;break;case 7:throw new Error("Fortmatic: Modal is not ready.");case 8:case"end":return g.stop()}},s,this)}));return function(s,c){return n.apply(this,arguments)}}()},{key:"enable",value:function(){return A.sendAsyncWrapper.call(this,"eth_accounts")}},{key:"listenMessage",value:function(){var n=this;window.addEventListener("message",function(s){if(s.origin===n.fortmaticClient){var c=s.data.response?s.data.response.id:null;switch(s.data.msgType){case n.postMessages.FORTMATIC_OVERLAY_READY:n.overlayReady=!0,n.dequeue();break;case n.postMessages.FORTMATIC_HANDLE_RESPONSE:try{n.requests[c].cb(null,s.data.response);var f=n.requests[c].parentId;f&&n.requests[f].payload.batch.length===n.requests[f].batchResponse.length&&n.requests[f].cb(null,n.requests[f].batchResponse),n.requests[c].payload.method==="eth_accounts"?n.account=s.data.response.result[0]:n.requests[c].payload.method==="eth_coinbase"?n.account=s.data.response.result:n.requests[c].payload.method==="net_version"&&(n.network=s.data.response.result)}catch{}n.isLoggedIn=!0,n.dequeue();break;case n.postMessages.FORTMATIC_HIDE_OVERLAY:n.hideOverlay();break;case n.postMessages.FORTMATIC_SHOW_OVERLAY:n.showOverlay();break;case n.postMessages.FORTMATIC_USER_LOGOUT:n.account=null,n.network=null,n.isLoggedIn=!1;break;case n.postMessages.FORTMATIC_UNAUTHORIZED_API_KEY:throw n.overlayReady=!1,new Error("Given API key is not authorized to access the resource.");case n.postMessages.FORTMATIC_USER_DENIED:if(c){var v=s.data.response&&s.data.response.message?s.data.response.message:"Fortmatic: Modal was closed without executing action!",g=s.data.response&&s.data.response.code?s.data.response.code:1;n.requests[c].cb({message:v,code:g,response:s.data.response})}else n.queue.forEach(function(_){return _.cb({message:"Fortmatic: Modal was closed without executing action!",code:1})});n.dequeue()}}})}}]),P}();b.default=w},function(y,b,a){y.exports=a(7)},function(y,b,a){var r=function(){return this||typeof self=="object"&&self}()||Function("return this")(),o=r.regeneratorRuntime&&Object.getOwnPropertyNames(r).indexOf("regeneratorRuntime")>=0,l=o&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,y.exports=a(8),o)r.regeneratorRuntime=l;else try{delete r.regeneratorRuntime}catch{r.regeneratorRuntime=void 0}},function(y,b){(function(a){var r,o=Object.prototype,l=o.hasOwnProperty,u=typeof Symbol=="function"?Symbol:{},R=u.iterator||"@@iterator",x=u.asyncIterator||"@@asyncIterator",T=u.toStringTag||"@@toStringTag",A=typeof y=="object",w=a.regeneratorRuntime;if(w)A&&(y.exports=w);else{(w=a.regeneratorRuntime=A?y.exports:{}).wrap=I;var P="suspendedStart",n="suspendedYield",s="executing",c="completed",f={},v={};v[R]=function(){return this};var g=Object.getPrototypeOf,_=g&&g(g(G([])));_&&_!==o&&l.call(_,R)&&(v=_);var O=C.prototype=h.prototype=Object.create(v);M.prototype=O.constructor=C,C.constructor=M,C[T]=M.displayName="GeneratorFunction",w.isGeneratorFunction=function(t){var e=typeof t=="function"&&t.constructor;return!!e&&(e===M||(e.displayName||e.name)==="GeneratorFunction")},w.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,C):(t.__proto__=C,T in t||(t[T]="GeneratorFunction")),t.prototype=Object.create(O),t},w.awrap=function(t){return{__await:t}},V(U.prototype),U.prototype[x]=function(){return this},w.AsyncIterator=U,w.async=function(t,e,d,p){var i=new U(I(t,e,d,p));return w.isGeneratorFunction(e)?i:i.next().then(function(F){return F.done?F.value:i.next()})},V(O),O[T]="Generator",O[R]=function(){return this},O.toString=function(){return"[object Generator]"},w.keys=function(t){var e=[];for(var d in t)e.push(d);return e.reverse(),function p(){for(;e.length;){var i=e.pop();if(i in t)return p.value=i,p.done=!1,p}return p.done=!0,p}},w.values=G,K.prototype={constructor:K,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(Y),!t)for(var e in this)e.charAt(0)==="t"&&l.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=r)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if(t.type==="throw")throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function d(W,E){return F.type="throw",F.arg=t,e.next=W,E&&(e.method="next",e.arg=r),!!E}for(var p=this.tryEntries.length-1;p>=0;--p){var i=this.tryEntries[p],F=i.completion;if(i.tryLoc==="root")return d("end");if(i.tryLoc<=this.prev){var j=l.call(i,"catchLoc"),q=l.call(i,"finallyLoc");if(j&&q){if(this.prev<i.catchLoc)return d(i.catchLoc,!0);if(this.prev<i.finallyLoc)return d(i.finallyLoc)}else if(j){if(this.prev<i.catchLoc)return d(i.catchLoc,!0)}else{if(!q)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return d(i.finallyLoc)}}}},abrupt:function(t,e){for(var d=this.tryEntries.length-1;d>=0;--d){var p=this.tryEntries[d];if(p.tryLoc<=this.prev&&l.call(p,"finallyLoc")&&this.prev<p.finallyLoc){var i=p;break}}i&&(t==="break"||t==="continue")&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var F=i?i.completion:{};return F.type=t,F.arg=e,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(F)},complete:function(t,e){if(t.type==="throw")throw t.arg;return t.type==="break"||t.type==="continue"?this.next=t.arg:t.type==="return"?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):t.type==="normal"&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var d=this.tryEntries[e];if(d.finallyLoc===t)return this.complete(d.completion,d.afterLoc),Y(d),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var d=this.tryEntries[e];if(d.tryLoc===t){var p=d.completion;if(p.type==="throw"){var i=p.arg;Y(d)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,d){return this.delegate={iterator:G(t),resultName:e,nextLoc:d},this.method==="next"&&(this.arg=r),f}}}function I(t,e,d,p){var i=e&&e.prototype instanceof h?e:h,F=Object.create(i.prototype),j=new K(p||[]);return F._invoke=function(q,W,E){var k=P;return function(S,D){if(k===s)throw new Error("Generator is already running");if(k===c){if(S==="throw")throw D;return Q()}for(E.method=S,E.arg=D;;){var H=E.delegate;if(H){var N=B(H,E);if(N){if(N===f)continue;return N}}if(E.method==="next")E.sent=E._sent=E.arg;else if(E.method==="throw"){if(k===P)throw k=c,E.arg;E.dispatchException(E.arg)}else E.method==="return"&&E.abrupt("return",E.arg);k=s;var L=m(q,W,E);if(L.type==="normal"){if(k=E.done?c:n,L.arg===f)continue;return{value:L.arg,done:E.done}}L.type==="throw"&&(k=c,E.method="throw",E.arg=L.arg)}}}(t,d,j),F}function m(t,e,d){try{return{type:"normal",arg:t.call(e,d)}}catch(p){return{type:"throw",arg:p}}}function h(){}function M(){}function C(){}function V(t){["next","throw","return"].forEach(function(e){t[e]=function(d){return this._invoke(e,d)}})}function U(t){var e;this._invoke=function(d,p){function i(){return new Promise(function(F,j){(function q(W,E,k,S){var D=m(t[W],t,E);if(D.type!=="throw"){var H=D.arg,N=H.value;return N&&typeof N=="object"&&l.call(N,"__await")?Promise.resolve(N.__await).then(function(L){q("next",L,k,S)},function(L){q("throw",L,k,S)}):Promise.resolve(N).then(function(L){H.value=L,k(H)},function(L){return q("throw",L,k,S)})}S(D.arg)})(d,p,F,j)})}return e=e?e.then(i,i):i()}}function B(t,e){var d=t.iterator[e.method];if(d===r){if(e.delegate=null,e.method==="throw"){if(t.iterator.return&&(e.method="return",e.arg=r,B(t,e),e.method==="throw"))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var p=m(d,t.iterator,e.arg);if(p.type==="throw")return e.method="throw",e.arg=p.arg,e.delegate=null,f;var i=p.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,e.method!=="return"&&(e.method="next",e.arg=r),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function z(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function Y(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function K(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(z,this),this.reset(!0)}function G(t){if(t){var e=t[R];if(e)return e.call(t);if(typeof t.next=="function")return t;if(!isNaN(t.length)){var d=-1,p=function i(){for(;++d<t.length;)if(l.call(t,d))return i.value=t[d],i.done=!1,i;return i.value=r,i.done=!0,i};return p.next=p}}return{next:Q}}function Q(){return{value:r,done:!0}}})(function(){return this||typeof self=="object"&&self}()||Function("return this")())},function(y,b){function a(r,o,l,u,R,x,T){try{var A=r[x](T),w=A.value}catch(P){return void l(P)}A.done?o(w):Promise.resolve(w).then(u,R)}y.exports=function(r){return function(){var o=this,l=arguments;return new Promise(function(u,R){var x=r.apply(o,l);function T(w){a(x,u,R,T,A,"next",w)}function A(w){a(x,u,R,T,A,"throw",w)}T(void 0)})}}},function(y,b){function a(r,o){for(var l=0;l<o.length;l++){var u=o[l];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(r,u.key,u)}}y.exports=function(r,o,l){return o&&a(r.prototype,o),l&&a(r,l),r}},function(y){y.exports={name:"fortmatic",version:"1.1.3",description:"Fortmatic Javascript SDK",main:"lib/fortmatic.js",scripts:{build:"WEBPACK_ENV=production webpack","build:dev":"WEBPACK_ENV=development BABEL_ENV=development webpack --progress --colors --watch",test:"nyc --reporter=lcov --reporter=text-summary ava"},author:"Fortmatic <team@fortmatic.com> (https://fortmatic.com/)",license:"MIT",repository:{type:"git",url:"https://github.com/fortmatic/fortmatic-js"},keywords:["Auth","Login","Web3","Crypto","Ethereum","MetaMask","Wallet","Blockchain","Dapp"],homepage:"https://www.fortmatic.com",ava:{require:["@babel/register"],files:["test/**/*.spec.js"],babel:{testOptions:{presets:["@babel/env"],plugins:["@babel/plugin-proposal-function-bind","@babel/plugin-transform-runtime"]}},verbose:!0},nyc:{all:!1,"check-coverage":!0,"per-file":!0,lines:80,statements:80,functions:80,branches:80,include:["src/**/*.js"],exclude:["*/style.js"],require:[],reporter:["html","lcov"]},dependencies:{"@babel/runtime":"7.3.4"},devDependencies:{"@babel/core":"7.3.4","@babel/plugin-proposal-function-bind":"7.2.0","@babel/plugin-transform-modules-commonjs":"7.2.0","@babel/plugin-transform-runtime":"7.3.4","@babel/preset-env":"7.3.4","@babel/register":"7.0.0",ava:"2.2.0","babel-eslint":"10.0.1","babel-loader":"8.0.5",eslint:"5.9.0",lodash:"4.17.11",nyc:"13.1.0",sinon:"7.1.1",webpack:"4.26.1","webpack-cli":"3.1.2"}}},function(y,b,a){b.css=`
2
2
  .fortmatic-iframe {
3
3
  display: none;
4
4
  position: fixed;
@@ -1 +1 @@
1
- import{N as n,am as s,an as r,ao as i,ap as m,aq as g,ar as t,ae as d,as as c,at as u,au as S,X as I,av as P,aw as l,ax as p,ay as y,az as O}from"./index-VXGnlWrX.js";const R=a=>({isPreviewing:r(a),isSidebarOpen:i(a),isReady:m(a),isLoading:g(a),isFetching:t(a),isLoggedIn:d(a),isScreenshotReady:c(a),currentProject:u(a),numItems:S(a)}),C=a=>({onOpenModal:(e,o)=>a(I(e,o)),onCloseEditor:()=>a(P()),onZoomIn:()=>a(l()),onZoomOut:()=>a(p()),onResetCamera:()=>a(y()),onTakeScreenshot:()=>a(O())}),L=n(R,C)(s);export{L as default};
1
+ import{N as n,am as s,an as r,ao as i,ap as m,aq as g,ar as t,ae as d,as as c,at as u,au as S,X as I,av as P,aw as l,ax as p,ay as y,az as O}from"./index-Co91-zEg.js";const R=a=>({isPreviewing:r(a),isSidebarOpen:i(a),isReady:m(a),isLoading:g(a),isFetching:t(a),isLoggedIn:d(a),isScreenshotReady:c(a),currentProject:u(a),numItems:S(a)}),C=a=>({onOpenModal:(e,o)=>a(I(e,o)),onCloseEditor:()=>a(P()),onZoomIn:()=>a(l()),onZoomOut:()=>a(p()),onResetCamera:()=>a(y()),onTakeScreenshot:()=>a(O())}),L=n(R,C)(s);export{L as default};
@@ -1 +1 @@
1
- var f=Object.defineProperty;var R=(l,o,s)=>o in l?f(l,o,{enumerable:!0,configurable:!0,writable:!0,value:s}):l[o]=s;var x=(l,o,s)=>R(l,typeof o!="symbol"?o+"":o,s);import{D as g,K as m,H as e,aZ as B,M as t,N,a_ as O,bQ as z,bR as H,aA as P,bB as _,bS as A,bT as F,bI as j,bU as C,G as a,bM as $,bA as X,bC as E,bV as Y,bW as W,bX as U,bY as V,bZ as J,b_ as Z,aW as G,b$ as K,X as Q}from"./index-VXGnlWrX.js";import{L as q}from"./LandProviderPage-CjmGo5NU.js";import{B as ee}from"./Back-IVZes_Ab.js";import{J as se}from"./JumpIn.container-CG723M0C.js";import{R as te}from"./RentalPeriod-F_obsrQn.js";import{S as oe}from"./SceneStats.container-CWHrTx3X.js";import"./NotFound-Cp2AS0S2.js";import"./index-D6GGy32T.js";import"./date-YJaRvhOI.js";let ie=class extends g.PureComponent{constructor(){super(...arguments);x(this,"handleOnClick",()=>{const{isLoading:s,history:i}=this.props;s&&i.push(m.activity())})}render(){const{ens:s,isLoading:i,onIconClick:n}=this.props;return e.jsx(B,{className:"ENSChip",text:i?e.jsxs(e.Fragment,{children:[s.subdomain,e.jsx(t.Loader,{active:!0,size:"tiny"})]}):s.subdomain,isActive:i,icon:i?"":"minus",onClick:this.handleOnClick,onIconClick:n})}};const ne=(l,o)=>{const{ens:s}=o;return{isLoading:z(l)[s.subdomain]||H(l)[s.subdomain]}},le=N(ne)(O(ie)),ae=l=>{const{deployment:o,onMouseEnter:s,onMouseLeave:i,onNavigate:n,onOpenModal:u,projects:c,disabled:r}=l,d=o.projectId&&o.projectId in c?c[o.projectId]:null,p=g.useCallback(()=>{r||s(o)},[s,r,o]),h=g.useCallback(()=>{r||i(o)},[i,r,o]),v=g.useCallback(()=>{d&&!r&&n(m.sceneDetail(d.id))},[n,d,r]),S=g.useCallback(()=>{u("DeployModal",{view:P.CLEAR_DEPLOYMENT,deploymentId:o.id})},[u,o]);return e.jsxs("div",{className:`Scene ${d&&!r?"clickable":""}`,onClick:v,onMouseEnter:p,onMouseLeave:h,children:[o.thumbnail?e.jsx("div",{className:"thumbnail",style:{backgroundImage:`url(${o.thumbnail})`}}):e.jsx("div",{className:"no-thumbnail"}),e.jsxs("div",{className:"stat",children:[e.jsx("div",{className:"title",title:o.name,children:o.name}),o.layout?e.jsxs("div",{className:"secondary-text",children:[o.layout.rows,"x",o.layout.cols]}):null]}),e.jsx(oe,{deployment:o}),e.jsx(t.Dropdown,{trigger:e.jsx(t.Button,{basic:!0,children:e.jsx(t.Icon,{name:"ellipsis horizontal"})}),inline:!0,disabled:r,direction:"left",children:e.jsx(t.Dropdown.Menu,{children:e.jsx(t.Dropdown.Item,{text:"Unpublish",onClick:S})})})]})},L=({children:l,land:o})=>{const s=g.Children.map(l,i=>g.isValidElement(i)?g.cloneElement(i,{disabled:o.roles.includes(j.LESSOR)}):i);return e.jsx(t.Popup,{content:a("land_detail_page.land_is_locked"),position:"top left",disabled:!o.roles.includes(j.LESSOR),trigger:e.jsx("span",{children:s})})};let re=class extends g.PureComponent{constructor(){super(...arguments);x(this,"state",{hovered:null,mouseX:0,mouseY:0,showTooltip:!1});x(this,"handleMouseEnter",s=>{this.setState({hovered:s,showTooltip:!1})});x(this,"handleMouseLeave",()=>{this.setState({hovered:null,showTooltip:!1})});x(this,"handleMouseMove",s=>{this.setState({mouseX:s.clientX,mouseY:s.clientY})});x(this,"handleHover",s=>(i,n)=>{const{deploymentsByCoord:u}=this.props,c=u[_(i,n)];c&&s.some(r=>r.id===c.id)?this.setState({hovered:c,showTooltip:!0}):this.setState({hovered:null,showTooltip:!1})});x(this,"handleClick",(s,i)=>{const{deploymentsByCoord:n,projects:u,onNavigate:c,onReplace:r,landTiles:d}=this.props,p=_(s,i),h=n[p];h&&h.projectId&&h.projectId in u?c(m.sceneDetail(h.projectId)):p in d&&r(m.landDetail(d[p].land.id))});x(this,"isHovered",(s,i)=>{const{deploymentsByCoord:n}=this.props,{hovered:u}=this.state,c=_(s,i),r=n[c];return!!r&&!!u&&u.id===r.id});x(this,"getHoverStrokeLayer",s=>(i,n)=>this.isHovered(i,n)?{color:A[s.role],scale:1.4}:null);x(this,"getHoverFillLayer",s=>(i,n)=>this.isHovered(i,n)?{color:F[s.role],scale:1.2}:null)}computeOccupiedLand(s,i){const{landTiles:n}=this.props;return i.reduce((c,r)=>c+r.parcels.filter(d=>{const p=n[d];return!!p&&p.land.id===s.id}).length,0)}renderDetail(s,i,n){const{ensList:u,parcelsAvailableToBuildEstates:c,projects:r,onNavigate:d,onOpenModal:p}=this.props,{hovered:h,mouseX:v,mouseY:S,showTooltip:y}=this.state,D=this.computeOccupiedLand(s,i),w=n&&(s.roles.includes(j.LESSOR)||s.roles.includes(j.TENANT))?n.lessor:s.owner,M=s.roles.includes(j.LESSOR),k=c[s.id],T=y&&h&&h.projectId&&h.projectId in r;return e.jsxs(e.Fragment,{children:[h&&y?e.jsxs("div",{className:"tooltip",style:{top:S,left:v},children:[h.thumbnail?e.jsx("div",{className:"thumbnail",style:{backgroundImage:`url(${h.thumbnail})`}}):null,e.jsx("div",{className:"name",children:h.name})]}):null,e.jsx(t.Section,{size:"large",children:e.jsxs(t.Row,{children:[e.jsx(ee,{absolute:!0,onClick:()=>d(m.land())}),e.jsx(t.Narrow,{children:e.jsxs(t.Row,{children:[e.jsx(t.Column,{children:e.jsxs(t.Row,{children:[e.jsx(t.Header,{size:"huge",children:s.name}),s.type===C.PARCEL?e.jsx(e.Fragment,{children:e.jsxs(t.Badge,{color:"#37333D",children:[e.jsx("i",{className:"pin"}),s.id]})}):e.jsxs(t.Badge,{color:"#37333D",children:[s.size," LAND"]}),e.jsx(se,{land:s})]})}),s.role===j.OWNER||s.role===j.LESSOR?e.jsx(t.Column,{className:"actions",align:"right",children:e.jsxs(t.Row,{children:[e.jsx(L,{land:s,children:e.jsx(t.Button,{basic:!0,onClick:()=>d(m.landTransfer(s.id)),children:a("land_detail_page.transfer")})}),e.jsx(L,{land:s,children:e.jsx(t.Button,{basic:!0,onClick:()=>d(m.landEdit(s.id)),children:a("global.edit")})}),e.jsx(L,{land:s,children:e.jsx(t.Dropdown,{trigger:e.jsx(t.Button,{basic:!0,children:e.jsx(t.Icon,{name:"ellipsis horizontal"})}),inline:!0,direction:"left",children:e.jsxs(t.Dropdown.Menu,{children:[k?e.jsxs(e.Fragment,{children:[e.jsx(t.Dropdown.Item,{text:a("land_detail_page.build_estate"),onClick:()=>p("EstateEditorModal",{land:s})}),e.jsx(t.Dropdown.Divider,{})]}):null,s.type===C.ESTATE?e.jsxs(e.Fragment,{children:[e.jsx(t.Dropdown.Item,{text:a("land_detail_page.add_or_remove_parcels"),onClick:()=>p("EstateEditorModal",{land:s})}),e.jsx(t.Dropdown.Item,{text:a("land_detail_page.dissolve_estate"),onClick:()=>p("DissolveModal",{land:s})}),e.jsx(t.Dropdown.Divider,{})]}):null,e.jsxs(e.Fragment,{children:[e.jsx(t.Dropdown.Item,{text:a("land_detail_page.assign_name"),onClick:()=>d(m.landSelectENS(s.id))}),e.jsx(t.Dropdown.Divider,{})]}),e.jsx(t.Dropdown.Item,{text:a("land_detail_page.set_operator"),onClick:()=>d(m.landOperator(s.id))})]})})})]})}):s.roles.includes(j.TENANT)&&n&&!$(n)?e.jsx(t.Dropdown,{trigger:e.jsx(t.Button,{basic:!0,children:e.jsx(t.Icon,{name:"ellipsis horizontal"})}),inline:!0,direction:"left",children:e.jsx(t.Dropdown.Menu,{children:e.jsx(t.Dropdown.Item,{text:a("land_detail_page.set_operator"),onClick:()=>d(m.landOperator(s.id))})})}):null]})})]})}),e.jsxs(t.Narrow,{children:[e.jsx(t.Section,{size:"large",children:e.jsx("div",{className:`atlas-wrapper ${T?"clickable":""}`,onMouseLeave:this.handleMouseLeave,onMouseMove:this.handleMouseMove,children:e.jsx(X,{landId:s.id,layers:[this.getHoverStrokeLayer(s),this.getHoverFillLayer(s)],isDraggable:!0,zoom:s.size&&s.size>=1e3?.5:1,onHover:this.handleHover(i),onClick:this.handleClick})})}),e.jsxs(t.Section,{size:"large",children:[e.jsx(t.Header,{sub:!0,children:a("land_detail_page.online_scenes")}),i.length===0?e.jsx(t.Empty,{height:100,children:a("global.none")}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"deployments",children:i.map(b=>e.jsx(ae,{disabled:M,deployment:b,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,onNavigate:d,onOpenModal:p,projects:r},b.id))}),e.jsx("div",{className:"notice",children:a("analytics.notice")})]})]}),u.length>0?e.jsxs(t.Section,{size:"large",children:[e.jsx(t.Header,{sub:!0,children:e.jsx(t.Row,{children:e.jsx(t.Column,{children:a("land_detail_page.assigned_names")})})}),e.jsx("div",{className:"ens-list",children:u.map(b=>e.jsx(le,{ens:b,onIconClick:()=>p("UnsetENSContentModal",{ens:b,land:s})},b.subdomain))})]}):null,s.description?e.jsxs(t.Section,{size:"large",children:[e.jsx(t.Header,{sub:!0,children:a("land_detail_page.description")}),e.jsx("p",{children:s.description})]}):null,e.jsxs(t.Section,{className:"data",children:[e.jsxs(t.Stats,{title:a("global.role"),className:"role",children:[e.jsx(t.Header,{children:a(`roles.${s.role}`)}),n?e.jsx(te,{land:s,rental:n}):null]}),e.jsx(t.Stats,{title:a("land_detail_page.owner"),children:e.jsx(E,{address:w,size:"large"})}),n&&s.roles.includes(j.LESSOR)?e.jsx(t.Stats,{title:a("land_detail_page.tenant"),children:e.jsx(E,{address:n.tenant,size:"large"})}):null,s.operators.length>0?e.jsx(t.Stats,{title:a("land_detail_page.operated_by"),className:"operators",children:e.jsx(t.Row,{children:s.operators.map((b,I)=>e.jsx(E,{address:b,size:"large"},I))})}):null,s.type===C.ESTATE?e.jsxs(e.Fragment,{children:[e.jsx(t.Stats,{title:a("land_detail_page.total_land"),children:e.jsx(t.Header,{children:s.size})}),e.jsx(t.Stats,{title:a("land_detail_page.empty_land"),children:e.jsx(t.Header,{children:s.size-D})})]}):null]})]})]})}render(){return e.jsx(q,{className:"LandDetailPage",children:(s,{deployments:i,rental:n})=>this.renderDetail(s,i,n)})}};const de=l=>{const o=Y(l)||"";return{ensList:W(l,o),parcelsAvailableToBuildEstates:U(l),deploymentsByCoord:V(l),landTiles:J(l),projects:Z(l)}},ce=l=>({onNavigate:o=>l(G(o)),onReplace:o=>l(K(o)),onOpenModal:(o,s)=>l(Q(o,s))}),Ee=N(de,ce)(re);export{Ee as default};
1
+ var f=Object.defineProperty;var R=(l,o,s)=>o in l?f(l,o,{enumerable:!0,configurable:!0,writable:!0,value:s}):l[o]=s;var x=(l,o,s)=>R(l,typeof o!="symbol"?o+"":o,s);import{D as g,K as m,H as e,aZ as B,M as t,N,a_ as O,bQ as z,bR as H,aA as P,bB as _,bS as A,bT as F,bI as j,bU as C,G as a,bM as $,bA as X,bC as E,bV as Y,bW as W,bX as U,bY as V,bZ as J,b_ as Z,aW as G,b$ as K,X as Q}from"./index-Co91-zEg.js";import{L as q}from"./LandProviderPage-YonUWYPv.js";import{B as ee}from"./Back-vJO5KaRC.js";import{J as se}from"./JumpIn.container-C7PYQ-NX.js";import{R as te}from"./RentalPeriod-BhsL4tf5.js";import{S as oe}from"./SceneStats.container-CcyiFiIZ.js";import"./NotFound-BiVAKBxy.js";import"./index-BVhNl-6b.js";import"./date-C3j4SMyi.js";let ie=class extends g.PureComponent{constructor(){super(...arguments);x(this,"handleOnClick",()=>{const{isLoading:s,history:i}=this.props;s&&i.push(m.activity())})}render(){const{ens:s,isLoading:i,onIconClick:n}=this.props;return e.jsx(B,{className:"ENSChip",text:i?e.jsxs(e.Fragment,{children:[s.subdomain,e.jsx(t.Loader,{active:!0,size:"tiny"})]}):s.subdomain,isActive:i,icon:i?"":"minus",onClick:this.handleOnClick,onIconClick:n})}};const ne=(l,o)=>{const{ens:s}=o;return{isLoading:z(l)[s.subdomain]||H(l)[s.subdomain]}},le=N(ne)(O(ie)),ae=l=>{const{deployment:o,onMouseEnter:s,onMouseLeave:i,onNavigate:n,onOpenModal:u,projects:c,disabled:r}=l,d=o.projectId&&o.projectId in c?c[o.projectId]:null,p=g.useCallback(()=>{r||s(o)},[s,r,o]),h=g.useCallback(()=>{r||i(o)},[i,r,o]),v=g.useCallback(()=>{d&&!r&&n(m.sceneDetail(d.id))},[n,d,r]),S=g.useCallback(()=>{u("DeployModal",{view:P.CLEAR_DEPLOYMENT,deploymentId:o.id})},[u,o]);return e.jsxs("div",{className:`Scene ${d&&!r?"clickable":""}`,onClick:v,onMouseEnter:p,onMouseLeave:h,children:[o.thumbnail?e.jsx("div",{className:"thumbnail",style:{backgroundImage:`url(${o.thumbnail})`}}):e.jsx("div",{className:"no-thumbnail"}),e.jsxs("div",{className:"stat",children:[e.jsx("div",{className:"title",title:o.name,children:o.name}),o.layout?e.jsxs("div",{className:"secondary-text",children:[o.layout.rows,"x",o.layout.cols]}):null]}),e.jsx(oe,{deployment:o}),e.jsx(t.Dropdown,{trigger:e.jsx(t.Button,{basic:!0,children:e.jsx(t.Icon,{name:"ellipsis horizontal"})}),inline:!0,disabled:r,direction:"left",children:e.jsx(t.Dropdown.Menu,{children:e.jsx(t.Dropdown.Item,{text:"Unpublish",onClick:S})})})]})},L=({children:l,land:o})=>{const s=g.Children.map(l,i=>g.isValidElement(i)?g.cloneElement(i,{disabled:o.roles.includes(j.LESSOR)}):i);return e.jsx(t.Popup,{content:a("land_detail_page.land_is_locked"),position:"top left",disabled:!o.roles.includes(j.LESSOR),trigger:e.jsx("span",{children:s})})};let re=class extends g.PureComponent{constructor(){super(...arguments);x(this,"state",{hovered:null,mouseX:0,mouseY:0,showTooltip:!1});x(this,"handleMouseEnter",s=>{this.setState({hovered:s,showTooltip:!1})});x(this,"handleMouseLeave",()=>{this.setState({hovered:null,showTooltip:!1})});x(this,"handleMouseMove",s=>{this.setState({mouseX:s.clientX,mouseY:s.clientY})});x(this,"handleHover",s=>(i,n)=>{const{deploymentsByCoord:u}=this.props,c=u[_(i,n)];c&&s.some(r=>r.id===c.id)?this.setState({hovered:c,showTooltip:!0}):this.setState({hovered:null,showTooltip:!1})});x(this,"handleClick",(s,i)=>{const{deploymentsByCoord:n,projects:u,onNavigate:c,onReplace:r,landTiles:d}=this.props,p=_(s,i),h=n[p];h&&h.projectId&&h.projectId in u?c(m.sceneDetail(h.projectId)):p in d&&r(m.landDetail(d[p].land.id))});x(this,"isHovered",(s,i)=>{const{deploymentsByCoord:n}=this.props,{hovered:u}=this.state,c=_(s,i),r=n[c];return!!r&&!!u&&u.id===r.id});x(this,"getHoverStrokeLayer",s=>(i,n)=>this.isHovered(i,n)?{color:A[s.role],scale:1.4}:null);x(this,"getHoverFillLayer",s=>(i,n)=>this.isHovered(i,n)?{color:F[s.role],scale:1.2}:null)}computeOccupiedLand(s,i){const{landTiles:n}=this.props;return i.reduce((c,r)=>c+r.parcels.filter(d=>{const p=n[d];return!!p&&p.land.id===s.id}).length,0)}renderDetail(s,i,n){const{ensList:u,parcelsAvailableToBuildEstates:c,projects:r,onNavigate:d,onOpenModal:p}=this.props,{hovered:h,mouseX:v,mouseY:S,showTooltip:y}=this.state,D=this.computeOccupiedLand(s,i),w=n&&(s.roles.includes(j.LESSOR)||s.roles.includes(j.TENANT))?n.lessor:s.owner,M=s.roles.includes(j.LESSOR),k=c[s.id],T=y&&h&&h.projectId&&h.projectId in r;return e.jsxs(e.Fragment,{children:[h&&y?e.jsxs("div",{className:"tooltip",style:{top:S,left:v},children:[h.thumbnail?e.jsx("div",{className:"thumbnail",style:{backgroundImage:`url(${h.thumbnail})`}}):null,e.jsx("div",{className:"name",children:h.name})]}):null,e.jsx(t.Section,{size:"large",children:e.jsxs(t.Row,{children:[e.jsx(ee,{absolute:!0,onClick:()=>d(m.land())}),e.jsx(t.Narrow,{children:e.jsxs(t.Row,{children:[e.jsx(t.Column,{children:e.jsxs(t.Row,{children:[e.jsx(t.Header,{size:"huge",children:s.name}),s.type===C.PARCEL?e.jsx(e.Fragment,{children:e.jsxs(t.Badge,{color:"#37333D",children:[e.jsx("i",{className:"pin"}),s.id]})}):e.jsxs(t.Badge,{color:"#37333D",children:[s.size," LAND"]}),e.jsx(se,{land:s})]})}),s.role===j.OWNER||s.role===j.LESSOR?e.jsx(t.Column,{className:"actions",align:"right",children:e.jsxs(t.Row,{children:[e.jsx(L,{land:s,children:e.jsx(t.Button,{basic:!0,onClick:()=>d(m.landTransfer(s.id)),children:a("land_detail_page.transfer")})}),e.jsx(L,{land:s,children:e.jsx(t.Button,{basic:!0,onClick:()=>d(m.landEdit(s.id)),children:a("global.edit")})}),e.jsx(L,{land:s,children:e.jsx(t.Dropdown,{trigger:e.jsx(t.Button,{basic:!0,children:e.jsx(t.Icon,{name:"ellipsis horizontal"})}),inline:!0,direction:"left",children:e.jsxs(t.Dropdown.Menu,{children:[k?e.jsxs(e.Fragment,{children:[e.jsx(t.Dropdown.Item,{text:a("land_detail_page.build_estate"),onClick:()=>p("EstateEditorModal",{land:s})}),e.jsx(t.Dropdown.Divider,{})]}):null,s.type===C.ESTATE?e.jsxs(e.Fragment,{children:[e.jsx(t.Dropdown.Item,{text:a("land_detail_page.add_or_remove_parcels"),onClick:()=>p("EstateEditorModal",{land:s})}),e.jsx(t.Dropdown.Item,{text:a("land_detail_page.dissolve_estate"),onClick:()=>p("DissolveModal",{land:s})}),e.jsx(t.Dropdown.Divider,{})]}):null,e.jsxs(e.Fragment,{children:[e.jsx(t.Dropdown.Item,{text:a("land_detail_page.assign_name"),onClick:()=>d(m.landSelectENS(s.id))}),e.jsx(t.Dropdown.Divider,{})]}),e.jsx(t.Dropdown.Item,{text:a("land_detail_page.set_operator"),onClick:()=>d(m.landOperator(s.id))})]})})})]})}):s.roles.includes(j.TENANT)&&n&&!$(n)?e.jsx(t.Dropdown,{trigger:e.jsx(t.Button,{basic:!0,children:e.jsx(t.Icon,{name:"ellipsis horizontal"})}),inline:!0,direction:"left",children:e.jsx(t.Dropdown.Menu,{children:e.jsx(t.Dropdown.Item,{text:a("land_detail_page.set_operator"),onClick:()=>d(m.landOperator(s.id))})})}):null]})})]})}),e.jsxs(t.Narrow,{children:[e.jsx(t.Section,{size:"large",children:e.jsx("div",{className:`atlas-wrapper ${T?"clickable":""}`,onMouseLeave:this.handleMouseLeave,onMouseMove:this.handleMouseMove,children:e.jsx(X,{landId:s.id,layers:[this.getHoverStrokeLayer(s),this.getHoverFillLayer(s)],isDraggable:!0,zoom:s.size&&s.size>=1e3?.5:1,onHover:this.handleHover(i),onClick:this.handleClick})})}),e.jsxs(t.Section,{size:"large",children:[e.jsx(t.Header,{sub:!0,children:a("land_detail_page.online_scenes")}),i.length===0?e.jsx(t.Empty,{height:100,children:a("global.none")}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"deployments",children:i.map(b=>e.jsx(ae,{disabled:M,deployment:b,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,onNavigate:d,onOpenModal:p,projects:r},b.id))}),e.jsx("div",{className:"notice",children:a("analytics.notice")})]})]}),u.length>0?e.jsxs(t.Section,{size:"large",children:[e.jsx(t.Header,{sub:!0,children:e.jsx(t.Row,{children:e.jsx(t.Column,{children:a("land_detail_page.assigned_names")})})}),e.jsx("div",{className:"ens-list",children:u.map(b=>e.jsx(le,{ens:b,onIconClick:()=>p("UnsetENSContentModal",{ens:b,land:s})},b.subdomain))})]}):null,s.description?e.jsxs(t.Section,{size:"large",children:[e.jsx(t.Header,{sub:!0,children:a("land_detail_page.description")}),e.jsx("p",{children:s.description})]}):null,e.jsxs(t.Section,{className:"data",children:[e.jsxs(t.Stats,{title:a("global.role"),className:"role",children:[e.jsx(t.Header,{children:a(`roles.${s.role}`)}),n?e.jsx(te,{land:s,rental:n}):null]}),e.jsx(t.Stats,{title:a("land_detail_page.owner"),children:e.jsx(E,{address:w,size:"large"})}),n&&s.roles.includes(j.LESSOR)?e.jsx(t.Stats,{title:a("land_detail_page.tenant"),children:e.jsx(E,{address:n.tenant,size:"large"})}):null,s.operators.length>0?e.jsx(t.Stats,{title:a("land_detail_page.operated_by"),className:"operators",children:e.jsx(t.Row,{children:s.operators.map((b,I)=>e.jsx(E,{address:b,size:"large"},I))})}):null,s.type===C.ESTATE?e.jsxs(e.Fragment,{children:[e.jsx(t.Stats,{title:a("land_detail_page.total_land"),children:e.jsx(t.Header,{children:s.size})}),e.jsx(t.Stats,{title:a("land_detail_page.empty_land"),children:e.jsx(t.Header,{children:s.size-D})})]}):null]})]})]})}render(){return e.jsx(q,{className:"LandDetailPage",children:(s,{deployments:i,rental:n})=>this.renderDetail(s,i,n)})}};const de=l=>{const o=Y(l)||"";return{ensList:W(l,o),parcelsAvailableToBuildEstates:U(l),deploymentsByCoord:V(l),landTiles:J(l),projects:Z(l)}},ce=l=>({onNavigate:o=>l(G(o)),onReplace:o=>l(K(o)),onOpenModal:(o,s)=>l(Q(o,s))}),Ee=N(de,ce)(re);export{Ee as default};
@@ -0,0 +1 @@
1
+ .ProjectCard{position:relative;width:100%;max-width:var(--scenespage-card-width);height:var(--scenespage-card-height);border-radius:10px;background:rgba(var(--bluish-steel-raw),.16);cursor:pointer;display:flex;justify-content:flex-end;flex-direction:column}.ProjectCard .project-thumbnail{height:170px;width:100%;max-width:256px;background-size:100% 170px;border-top-left-radius:10px;border-top-right-radius:10px}.ProjectCard .deployment-status{align-self:flex-end;margin-right:8px;margin-bottom:8px;position:absolute;right:0;bottom:70px}.ProjectCard .project-data{height:70px;width:100%;padding:12px 9px 14px;background-color:#313131;align-self:flex-end;color:var(--text);z-index:1;border-bottom-left-radius:10px;border-bottom-right-radius:10px}.ProjectCard .title{font-size:18px;line-height:24px;font-weight:600;overflow:hidden;white-space:nowrap;width:240px;text-overflow:ellipsis}.ProjectCard .description{display:flex;align-items:center;font-size:14px;font-weight:400;line-height:24px;letter-spacing:0px;text-align:left;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;-webkit-user-select:none;user-select:none}.ProjectCard .description .Icon{margin-right:5px}.ProjectCard .description .Icon.scene-object{margin-left:11px}.ProjectCard .overlay{position:absolute;left:0;right:0;top:0;bottom:0;background:var(--background);opacity:.3}.ProjectCard:hover{z-index:999}.ProjectCard .options-container{display:flex;justify-content:space-between;align-items:center;position:absolute;top:0;width:100%;padding:8px}.ProjectCard .options-container .options-dropdown{visibility:hidden}.ProjectCard:hover .options-container .options-dropdown{visibility:visible}.ProjectCard .options-dropdown .icon:before{color:var(--text)!important}.ProjectCard.has-thumbnail{position:relative;background-size:cover;background-position:center}.ProjectCard .title-wrapper{display:flex}.ProjectCard .Icon.is-uploading{margin-left:4px;margin-top:2px}.ProjectCard .error-indicator{width:16px;height:16px;background:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='28'%20height='28'%20viewBox='0%200%2028%2028'%3e%3cdefs%3e%3cfilter%20id='a'%20width='108.5%25'%20height='175%25'%20x='-4.2%25'%20y='-37.5%25'%20filterUnits='objectBoundingBox'%3e%3cfeOffset%20dy='2'%20in='SourceAlpha'%20result='shadowOffsetOuter1'/%3e%3cfeGaussianBlur%20in='shadowOffsetOuter1'%20result='shadowBlurOuter1'%20stdDeviation='2'/%3e%3cfeColorMatrix%20in='shadowBlurOuter1'%20result='shadowMatrixOuter1'%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200.16%200'/%3e%3cfeMerge%3e%3cfeMergeNode%20in='shadowMatrixOuter1'/%3e%3cfeMergeNode%20in='SourceGraphic'/%3e%3c/feMerge%3e%3c/filter%3e%3ccircle%20id='c'%20cx='8'%20cy='8'%20r='8'/%3e%3cfilter%20id='b'%20width='187.5%25'%20height='187.5%25'%20x='-43.8%25'%20y='-31.2%25'%20filterUnits='objectBoundingBox'%3e%3cfeOffset%20dy='2'%20in='SourceAlpha'%20result='shadowOffsetOuter1'/%3e%3cfeGaussianBlur%20in='shadowOffsetOuter1'%20result='shadowBlurOuter1'%20stdDeviation='2'/%3e%3cfeComposite%20in='shadowBlurOuter1'%20in2='SourceAlpha'%20operator='out'%20result='shadowBlurOuter1'/%3e%3cfeColorMatrix%20in='shadowBlurOuter1'%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200.5%200'/%3e%3c/filter%3e%3c/defs%3e%3cg%20fill='none'%20fill-rule='evenodd'%20filter='url(%23a)'%20transform='translate(-2%20-6)'%3e%3cg%20transform='translate(8%208)'%3e%3cuse%20fill='%23000'%20filter='url(%23b)'%20xlink:href='%23c'/%3e%3ccircle%20cx='8'%20cy='8'%20r='7.25'%20fill='%23F00'%20stroke='%23FFF'%20stroke-linejoin='square'%20stroke-width='1.5'/%3e%3c/g%3e%3cpath%20fill='%23FFF'%20d='M17%2012.5v4a1%201%200%201%201-2%200v-4a1%201%200%201%201%202%200zm-2%207a1%201%200%201%201%202%200%201%201%200%200%201-2%200z'/%3e%3c/g%3e%3c/svg%3e");background-repeat:no-repeat;background-position:center -2px;margin-top:3px;margin-left:7px}.ScenesPageAd{padding-top:32px}.ScenesPage .ui.button.inverted,.ScenesPage .ui.button.inverted:hover{background-color:#fff;color:var(--shadows)}.ScenesPage .project-cards{position:relative}.ScenesPage .subtitle{display:flex;align-items:center;justify-content:space-between}.ScenesPage .empty-projects{display:flex;flex-direction:column;width:100%;border-radius:12px;border:1px solid var(--divider);align-items:center;justify-content:center;color:var(--text);background-color:var(--dark-two);-webkit-user-select:none;user-select:none;text-align:center;line-height:28px;padding-top:105px;padding-bottom:122px}.ScenesPage .empty-projects .empty-project-thumbnail{width:86px;height:86px;background:url(https://cdn.decentraland.org/@dcl/builder-site/6.117.1-13029408051.commit-83eee39/assets/scene-CZXq89b-.svg);background-size:contain;background-repeat:no-repeat;background-position:center;margin-bottom:30px}.ScenesPage .empty-projects .description{margin-bottom:40px}.ScenesPage .empty-projects .actions{display:flex;align-items:center;justify-content:center;gap:14px}.ScenesPage .template-cards{margin-top:80px}.ScenesPage .template-cards.animate .TemplateCard{animation:templateAnimation 2s}.ScenesPage .project-cards .subtitle,.ScenesPage .template-cards .subtitle{font-size:20px}.ScenesPage .CardList .ProjectCard,.ScenesPage .CardList .ProjectCard .project-thumbnail{max-width:unset}.ScenesPage .CardList{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:var(--scenespage-card-margin)}.ScenesPage .ProjectCard{transition:transform .2s ease-in-out;box-shadow:0 2px 4px #00000029}.ScenesPage .ProjectCard:hover{box-shadow:0 10px 20px #0000003d;transform:translateY(-4px)}.ScenesPage .dcl.tabs,.ScenesPage .dcl.tabs .ui.container{position:relative}.ScenesPage .projects-menu .items-count,.ScenesPage .scene-pool-menu .ui.header.sub{flex:1 0 auto;color:var(--secondary-text);text-transform:uppercase;font-size:13px;line-height:18px;font-weight:500}.ScenesPage .projects-menu .actions{display:flex;flex:1 0 auto;align-items:center;justify-content:flex-end;font-size:13px;line-height:18px;text-transform:uppercase;margin-bottom:8px}.ScenesPage .projects-menu .actions .ui.button{font-size:14px;font-weight:600}.ScenesPage .projects-menu .actions .ui.button+.ui.button{margin-left:16px}.ScenesPage .projects-menu .actions .ui.button.create-scene{display:flex;align-items:center}.ScenesPage .projects-menu .actions .ui.dropdown.active.visible{z-index:99999}.ScenesPage .projects-menu .actions .ui.dropdown+.ui.button{margin-left:24px}.ScenesPage .project-cards.has-pagination .CardList{min-height:606px}.ScenesPage .project-cards .ui.pagination{width:100%;display:flex;justify-content:center}.ScenesPage .project-cards .ui.pagination{margin-top:40px}.ScenesPage .project-cards .ui.pagination .item[type=nextItem],.ScenesPage .project-cards .ui.pagination .item[type=prevItem]{position:absolute;background-color:var(--secondary)}.ScenesPage .project-cards .ui.pagination .item[type=prevItem]{left:0}.ScenesPage .project-cards .ui.pagination .item[type=nextItem]{right:0}.ScenesPage .SyncToast{top:77px}.ScenesPage .scene-pool-projects{display:flex;overflow:auto;padding-top:20px;gap:var(--scenespage-card-margin)}.ScenesPage .scene-pool-projects .ProjectCard{flex:none}.ScenesPage .ui.button.import-scene,.ScenesPage .ui.button.create-scene{display:flex;align-items:center;justify-content:center;gap:10px;padding:12px 18px}.ScenesPage .import-scene:before,.ScenesPage .create-scene:before{content:"";width:20px;height:20px;background-position:center;background-repeat:no-repeat;display:block}.ScenesPage .import-scene:before{background-image:url("data:image/svg+xml,%3csvg%20width='19'%20height='18'%20viewBox='0%200%2019%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M4.25%203H14.75C15.1625%203%2015.5%203.3375%2015.5%203.75V5.25C15.5%205.6625%2015.1625%206%2014.75%206C14.3375%206%2014%205.6625%2014%205.25V4.5H5V5.25C5%205.6625%204.6625%206%204.25%206C3.8375%206%203.5%205.6625%203.5%205.25V3.75C3.5%203.3375%203.8375%203%204.25%203ZM6.50075%2010.5C6.272%2010.5%206.04775%2010.3965%205.9%2010.2C5.651%209.8685%205.7185%209.39825%206.05%209.15L9.05%206.9C9.3095%206.705%209.6665%206.69975%209.93125%206.8865L12.9312%208.997C13.2703%209.2355%2013.352%209.7035%2013.1135%2010.0417C12.875%2010.38%2012.4078%2010.4625%2012.0688%2010.224L10.2479%208.94308C10.2493%208.96187%2010.25%208.98085%2010.25%209V15C10.25%2015.414%209.91475%2015.75%209.5%2015.75C9.08525%2015.75%208.75%2015.414%208.75%2015V9.00013L6.95%2010.35C6.815%2010.4513%206.6575%2010.5%206.50075%2010.5Z'%20fill='black'/%3e%3c/svg%3e")}.ScenesPage .create-scene:before{background-image:url("data:image/svg+xml,%3csvg%20width='18'%20height='18'%20viewBox='0%200%2018%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10.7829%2015.3424V16.7893C10.7824%2016.9117%2010.7338%2017.0289%2010.6479%2017.1152C10.562%2017.2015%2010.4457%2017.25%2010.3245%2017.25H8.48794C8.36653%2017.25%208.25008%2017.2014%208.16414%2017.1148C8.0782%2017.0283%208.02979%2016.9109%208.02954%2016.7883V15.3424H10.7829ZM13.1042%2011.8362L14.1897%2013.7281C14.2295%2013.7983%2014.2502%2013.8779%2014.25%2013.9588C14.2498%2014.0397%2014.2285%2014.1192%2014.1883%2014.1892C14.1481%2014.2592%2014.0905%2014.3174%2014.0211%2014.3579C13.9516%2014.3984%2013.8729%2014.4198%2013.7927%2014.42H4.95725C4.87708%2014.4198%204.79835%2014.3984%204.72894%2014.3579C4.65953%2014.3174%204.60186%2014.2592%204.56169%2014.1892C4.52152%2014.1192%204.50025%2014.0397%204.5%2013.9588C4.49976%2013.8779%204.52055%2013.7983%204.5603%2013.7281L5.64681%2011.8362H13.1042ZM12.3493%208.32899L13.4358%2010.2219C13.4755%2010.2921%2013.4963%2010.3717%2013.4961%2010.4526C13.4958%2010.5335%2013.4746%2010.613%2013.4344%2010.683C13.3942%2010.753%2013.3365%2010.8112%2013.2671%2010.8517C13.1977%2010.8922%2013.119%2010.9136%2013.0388%2010.9138H5.71216C5.63198%2010.9136%205.55326%2010.8922%205.48385%2010.8517C5.41443%2010.8112%205.35677%2010.753%205.31659%2010.683C5.27642%2010.613%205.25515%2010.5335%205.25491%2010.4526C5.25466%2010.3717%205.27545%2010.2921%205.3152%2010.2219L6.40074%208.32899H12.3493ZM9.77342%201.731L12.635%206.71468C12.6748%206.78496%2012.6956%206.86453%2012.6953%206.94545C12.6951%207.02636%2012.6738%207.1058%2012.6336%207.17583C12.5935%207.24586%2012.5358%207.30403%2012.4664%207.34454C12.397%207.38504%2012.3183%207.40647%2012.2381%207.40667H6.5129C6.43272%207.40647%206.354%207.38504%206.28459%207.34454C6.21518%207.30403%206.15751%207.24586%206.11734%207.17583C6.07716%207.1058%206.05589%207.02636%206.05565%206.94545C6.0554%206.86453%206.07619%206.78496%206.11594%206.71468L8.97755%201.731C9.01806%201.66073%209.07612%201.60241%209.14595%201.56187C9.21578%201.52133%209.29493%201.5%209.37549%201.5C9.45604%201.5%209.53519%201.52133%209.60502%201.56187C9.67485%201.60241%209.73292%201.66073%209.77342%201.731Z'%20fill='white'/%3e%3c/svg%3e")}.ScenesPage .no-scenes-container{display:flex;flex-direction:column;width:100%;padding:50px;background:#242129;border-radius:10px;align-items:center;justify-content:center}.ScenesPage .no-scenes-title{font-size:24px}.ScenesPage .no-scenes-description{color:#fff;width:100%;max-width:620px;font-size:14px;line-height:24px;text-align:center;margin-bottom:36px}.ScenesPage .no-scenes-description a{color:#fff;text-decoration:underline}@keyframes templateAnimation{0%{background:rgba(var(--bluish-steel-raw),.16)}25%{background:rgba(var(--bluish-steel-raw),.3)}50%{background:rgba(var(--bluish-steel-raw),.16)}75%{background:rgba(var(--bluish-steel-raw),.3)}to{background:rgba(var(--bluish-steel-raw),.16)}}
@@ -1 +1 @@
1
- var B=Object.defineProperty;var D=(e,t,n)=>t in e?B(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var R=(e,t,n)=>D(e,typeof t!="symbol"?t+"":t,n);import{Z as f,D as d,aA as $,aB as E,aC as v,G as _,H as s,M as o,J as N,I as U,N as T,at as C,aD as V,aE as w,aF as k,aG as y,X as O,aH as M,ae as A,aI as G,aJ as J,aK as X,aL as H}from"./index-VXGnlWrX.js";import{S as z}from"./SignInRequired-BI7xuOee.js";const K="_container_1abv2_1",q="_nameContainer_1abv2_8",F="_editNameBtn_1abv2_20",Y="_actions_1abv2_30",W="_downloadBtn_1abv2_36",Z="_button_1abv2_13",I={container:K,nameContainer:q,editNameBtn:F,actions:Y,downloadBtn:W,button:Z},Q=E.get("EXPLORER_URL",""),ee=E.get("BUILDER_SERVER_URL",""),se=E.get("PEER_TESTING_URL","");function te({currentProject:e,metrics:t,limits:n,areEntitiesOutOfBoundaries:r,isUploading:c,onOpenModal:l}){const b=f(),m=d.useCallback(()=>{l("ExportModal",{project:e})},[e,l]),u=d.useCallback(()=>{l("EditProjectModal")},[l]),a=d.useCallback(()=>{l("DeployModal",{view:$.NONE,projectId:e.id})},[l,e]),h=d.useMemo(()=>{if(!e)return"";const i=new URL(Q);return i.searchParams.set("skipSetup","true"),i.searchParams.set("realm",`${ee}/projects/${e.id}`),i.searchParams.set("DEBUG_MODE","true"),E.is(v.Env.DEVELOPMENT)?(i.searchParams.set("NETWORK","sepolia"),i.searchParams.set("DEBUG_SCENE_LOG","")):i.searchParams.set("CATALYST",se),i.toString()},[]),g=d.useMemo(()=>Object.keys(t).some(i=>t[i]>n[i]),[t]),x=d.useMemo(()=>c||r,[t,n,r,c]),j=d.useMemo(()=>c||!x,[c,x]),L=d.useCallback(()=>r?_("topbar.bounds_exceeded",{br:s.jsx("br",{})}):g?_("topbar.limits_exceeded"):null,[r,g]),S=d.useCallback(()=>{b.goBack()},[b]);return s.jsxs("div",{className:I.container,children:[s.jsxs("div",{className:I.nameContainer,children:[s.jsx(o.Button,{basic:!0,"aria-label":_("inspector.top_bar.back"),onClick:S,children:s.jsx(o.Icon,{name:"chevron left"})}),e&&s.jsxs(o.Button,{basic:!0,onClick:u,disabled:c,className:I.editNameBtn,children:[e.title,s.jsx(N,{name:"layout",className:"edit-project-icon"})]}),c&&s.jsx(N,{name:"cloud-upload",className:"cloud-upload-indicator is-uploading"})]}),s.jsxs("div",{className:I.actions,children:[e?s.jsx(U,{projectId:e.id}):null,s.jsx(o.Popup,{content:_("inspector.top_bar.download"),trigger:s.jsx(o.Button,{secondary:!0,"aria-label":_("inspector.top_bar.download"),size:"small",className:I.downloadBtn,disabled:c,onClick:m,children:s.jsx(o.Icon,{name:"download"})})}),s.jsxs(o.Button,{as:"a",href:h,target:"_blank",secondary:!0,size:"small",disabled:c,children:[s.jsx(o.Icon,{name:"eye"}),_("inspector.top_bar.preview")]}),s.jsx(o.Popup,{content:L(),position:"bottom center",disabled:j,trigger:s.jsx("span",{children:s.jsxs(o.Button,{primary:!0,size:"small",disabled:x,onClick:a,children:[s.jsx(o.Icon,{name:"globe"}),_("inspector.top_bar.publish")]})}),on:"hover"})]})]})}const ne=e=>({currentProject:C(e),metrics:V(e),limits:w(e),areEntitiesOutOfBoundaries:k(e)>0,isUploading:y(e)}),ae=e=>({onOpenModal:(t,n)=>e(O(t,n))}),oe=T(ne,ae)(te);var p={VITE_BASE_URL:"https://cdn.decentraland.org/@dcl/builder-site/6.117.0"};const re=e=>e.replace(/\/$/,""),P=re(p.VITE_BASE_URL);let ce=class extends d.PureComponent{constructor(){super(...arguments);R(this,"state",{isLoaded:!1});R(this,"refIframe",n=>{const{onConnect:r}=this.props;n&&(n.onload=()=>{this.setState({isLoaded:!0})},r(n.id))})}componentDidMount(){const{onOpen:n}=this.props;n()}render(){const{scene:n,project:r,isLoggedIn:c,isReloading:l,address:b=""}=this.props;if(!c)return s.jsx(z,{});let m=`${P}/inspector-index.html`,u=`${P}/bin/index.js`;p.VITE_INSPECTOR_PORT&&(m=`http://localhost:${p.VITE_INSPECTOR_PORT}`,u=`${m}/bin/index.js`);let a=`?dataLayerRpcParentUrl=${window.location.origin}`;if(p.VITE_BIN_INDEX_JS_DEV_PORT&&p.VITE_BIN_INDEX_JS_DEV_PATH){const h=btoa(p.VITE_BIN_INDEX_JS_DEV_PATH);u=`http://localhost:${p.VITE_BIN_INDEX_JS_DEV_PORT}/content/contents/b64-${h}`}return a=a.concat(`&binIndexJsUrl=${u}`),a=a.concat(`&contentUrl=${E.get("INSPECTOR_CONTENT_URL")}`),a=a.concat(`&segmentKey=${E.get("INSPECTOR_SEGMENT_API_KEY")}`),a=a.concat(`&segmentAppId=${E.get("INSPECTOR_SEGMENT_APP_ID")}`),a=a.concat(`&segmentUserId=${b}`),r!=null&&r.id&&(a=a.concat(`&projectId=${r.id}`)),s.jsxs("div",{className:"InspectorPage",children:[(!this.state.isLoaded||l)&&s.jsx(o.Loader,{active:!0}),n&&!l&&s.jsxs(s.Fragment,{children:[s.jsx(oe,{}),s.jsx("iframe",{ref:this.refIframe,title:"inspector",id:"inspector",src:`${m}${a}`})]})]})}};const ie=e=>({address:M(e),isLoggedIn:A(e),scene:G(e),project:C(e),isReloading:J(e)}),de=e=>({onOpen:()=>e(X()),onConnect:t=>e(H(t))}),me=T(ie,de)(ce);export{me as default};
1
+ var B=Object.defineProperty;var D=(e,t,n)=>t in e?B(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var R=(e,t,n)=>D(e,typeof t!="symbol"?t+"":t,n);import{Z as f,D as d,aA as $,aB as m,aC as v,G as _,H as s,M as o,J as N,I as U,N as T,at as C,aD as V,aE as w,aF as k,aG as y,X as O,aH as M,ae as A,aI as G,aJ as J,aK as X,aL as H}from"./index-Co91-zEg.js";import{S as z}from"./SignInRequired-CyBpNy0X.js";const K="_container_1abv2_1",q="_nameContainer_1abv2_8",F="_editNameBtn_1abv2_20",Y="_actions_1abv2_30",W="_downloadBtn_1abv2_36",Z="_button_1abv2_13",I={container:K,nameContainer:q,editNameBtn:F,actions:Y,downloadBtn:W,button:Z},Q=m.get("EXPLORER_URL",""),ee=m.get("BUILDER_SERVER_URL",""),se=m.get("PEER_TESTING_URL","");function te({currentProject:e,metrics:t,limits:n,areEntitiesOutOfBoundaries:r,isUploading:c,onOpenModal:l}){const b=f(),E=d.useCallback(()=>{l("ExportModal",{project:e})},[e,l]),u=d.useCallback(()=>{l("EditProjectModal")},[l]),a=d.useCallback(()=>{l("DeployModal",{view:$.NONE,projectId:e.id})},[l,e]),h=d.useMemo(()=>{if(!e)return"";const i=new URL(Q);return i.searchParams.set("skipSetup","true"),i.searchParams.set("realm",`${ee}/projects/${e.id}`),i.searchParams.set("DEBUG_MODE","true"),m.is(v.Env.DEVELOPMENT)?(i.searchParams.set("NETWORK","sepolia"),i.searchParams.set("DEBUG_SCENE_LOG","")):i.searchParams.set("CATALYST",se),i.toString()},[]),g=d.useMemo(()=>Object.keys(t).some(i=>t[i]>n[i]),[t]),x=d.useMemo(()=>c||r,[t,n,r,c]),j=d.useMemo(()=>c||!x,[c,x]),L=d.useCallback(()=>r?_("topbar.bounds_exceeded",{br:s.jsx("br",{})}):g?_("topbar.limits_exceeded"):null,[r,g]),S=d.useCallback(()=>{b.goBack()},[b]);return s.jsxs("div",{className:I.container,children:[s.jsxs("div",{className:I.nameContainer,children:[s.jsx(o.Button,{basic:!0,"aria-label":_("inspector.top_bar.back"),onClick:S,children:s.jsx(o.Icon,{name:"chevron left"})}),e&&s.jsxs(o.Button,{basic:!0,onClick:u,disabled:c,className:I.editNameBtn,children:[e.title,s.jsx(N,{name:"layout",className:"edit-project-icon"})]}),c&&s.jsx(N,{name:"cloud-upload",className:"cloud-upload-indicator is-uploading"})]}),s.jsxs("div",{className:I.actions,children:[e?s.jsx(U,{projectId:e.id}):null,s.jsx(o.Popup,{content:_("inspector.top_bar.download"),trigger:s.jsx(o.Button,{secondary:!0,"aria-label":_("inspector.top_bar.download"),size:"small",className:I.downloadBtn,disabled:c,onClick:E,children:s.jsx(o.Icon,{name:"download"})})}),s.jsxs(o.Button,{as:"a",href:h,target:"_blank",secondary:!0,size:"small",disabled:c,children:[s.jsx(o.Icon,{name:"eye"}),_("inspector.top_bar.preview")]}),s.jsx(o.Popup,{content:L(),position:"bottom center",disabled:j,trigger:s.jsx("span",{children:s.jsxs(o.Button,{primary:!0,size:"small",disabled:x,onClick:a,children:[s.jsx(o.Icon,{name:"globe"}),_("inspector.top_bar.publish")]})}),on:"hover"})]})]})}const ne=e=>({currentProject:C(e),metrics:V(e),limits:w(e),areEntitiesOutOfBoundaries:k(e)>0,isUploading:y(e)}),ae=e=>({onOpenModal:(t,n)=>e(O(t,n))}),oe=T(ne,ae)(te);var p={VITE_BASE_URL:"https://cdn.decentraland.org/@dcl/builder-site/6.117.1-13029408051.commit-83eee39"};const re=e=>e.replace(/\/$/,""),P=re(p.VITE_BASE_URL);let ce=class extends d.PureComponent{constructor(){super(...arguments);R(this,"state",{isLoaded:!1});R(this,"refIframe",n=>{const{onConnect:r}=this.props;n&&(n.onload=()=>{this.setState({isLoaded:!0})},r(n.id))})}componentDidMount(){const{onOpen:n}=this.props;n()}render(){const{scene:n,project:r,isLoggedIn:c,isReloading:l,address:b=""}=this.props;if(!c)return s.jsx(z,{});let E=`${P}/inspector-index.html`,u=`${P}/bin/index.js`;p.VITE_INSPECTOR_PORT&&(E=`http://localhost:${p.VITE_INSPECTOR_PORT}`,u=`${E}/bin/index.js`);let a=`?dataLayerRpcParentUrl=${window.location.origin}`;if(p.VITE_BIN_INDEX_JS_DEV_PORT&&p.VITE_BIN_INDEX_JS_DEV_PATH){const h=btoa(p.VITE_BIN_INDEX_JS_DEV_PATH);u=`http://localhost:${p.VITE_BIN_INDEX_JS_DEV_PORT}/content/contents/b64-${h}`}return a=a.concat(`&binIndexJsUrl=${u}`),a=a.concat(`&contentUrl=${m.get("INSPECTOR_CONTENT_URL")}`),a=a.concat(`&segmentKey=${m.get("INSPECTOR_SEGMENT_API_KEY")}`),a=a.concat(`&segmentAppId=${m.get("INSPECTOR_SEGMENT_APP_ID")}`),a=a.concat(`&segmentUserId=${b}`),r!=null&&r.id&&(a=a.concat(`&projectId=${r.id}`)),s.jsxs("div",{className:"InspectorPage",children:[(!this.state.isLoaded||l)&&s.jsx(o.Loader,{active:!0}),n&&!l&&s.jsxs(s.Fragment,{children:[s.jsx(oe,{}),s.jsx("iframe",{ref:this.refIframe,title:"inspector",id:"inspector",src:`${E}${a}`})]})]})}};const ie=e=>({address:M(e),isLoggedIn:A(e),scene:G(e),project:C(e),isReloading:J(e)}),de=e=>({onOpen:()=>e(X()),onConnect:t=>e(H(t))}),Ee=T(ie,de)(ce);export{Ee as default};
@@ -1 +1 @@
1
- var C=Object.defineProperty;var v=(s,r,e)=>r in s?C(s,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[r]=e;var l=(s,r,e)=>v(s,typeof r!="symbol"?r+"":r,e);import{aB as b,D as u,Q as P,H as t,al as L,ah as p,M as a,aj as g,G as d,aX as f,K as y,aY as k,aZ as j,J as h,N as w,a_ as N,an as S,aq as F,ap as m,a$ as I,ae as R,at as A,b0 as E,O as _,b1 as O,b2 as T,b3 as B,b4 as M,b5 as D,av as U,b6 as $,X as V,Y as q}from"./index-VXGnlWrX.js";import{B as W}from"./Back-IVZes_Ab.js";import{S as K}from"./SDKTag-n9q9Yn2L.js";function X(s){return s?{id:s.id,title:s.title,description:s.description,thumbnail:s.thumbnail,isPublic:!1,sceneId:s.sceneId,ethAddress:s.ethAddress,createdAt:s.createdAt,updatedAt:s.updatedAt,layout:s.layout,isTemplate:!1,video:s.video,templateStatus:null}:null}const Y=b.get("PROFILE_URL","");let z=class extends u.PureComponent{constructor(){super(...arguments);l(this,"handlePreview",()=>{this.props.onPreview()});l(this,"handleLike",()=>{const{currentPool:e,isLoggedIn:n,onOpenModal:o}=this.props;e&&(n?this.props.onLikePool(e.id,!e.like):o("LikeModal",{}))});l(this,"handleBack",()=>{const{history:e}=this.props;e.push(y.poolSearch())})}componentDidMount(){const{match:e,onLoadProject:n}=this.props;e.params.projectId&&n(e.params.projectId,this.getType())}componentDidUpdate(){const e=this.getCurrentProject(),n=this.getCurrentScene(),{isLoading:o,onLoadProjectScene:i}=this.props;e&&!n&&!o&&i(e,this.getType())}componentWillUnmount(){this.props.onCloseEditor()}getType(){return this.props.match&&this.props.match.params&&this.props.match.params.type||P.PUBLIC}getCurrentProject(){const{currentProject:e,currentPool:n}=this.props;switch(this.getType()){case"pool":return n;default:return e}}getCurrentScene(){const{scenes:e}=this.props,n=this.getCurrentProject();return n&&e[n.sceneId]||null}getCurrentPool(){const{currentPool:e}=this.props;switch(this.getType()){case"pool":return e;default:return null}}getParcelCount(){const e=this.getCurrentProject();return e?e.layout.cols*e.layout.rows:0}getObjectCount(){const e=this.getCurrentScene();if(!e||!e.sdk6)return 0;const n=this.getParcelCount();if(n===0)return 0;const o=Object.keys(e.sdk6.entities).length;return o<n?0:o-n}renderNotFount(){return t.jsx(L,{})}renderLoading(){return t.jsxs(t.Fragment,{children:[t.jsx(p,{}),t.jsx(a.Page,{isFullscreen:!0,children:t.jsx(a.Loader,{active:!0,size:"huge"})}),t.jsx(g,{isFullscreen:!0})]})}handleExportProject(){const{onOpenModal:e}=this.props;e("ExportModal",{project:X(this.getCurrentProject())})}renderAuthor(){const{currentAuthor:e}=this.props;if(!e)return null;const n=e.avatars[0].ethAddress;return t.jsxs("div",{className:"author",children:[d("public_page.made_by"),t.jsx(f,{address:n,as:"a",href:`${Y}/accounts/${n}`})]})}render(){const{isFetching:e,isPreviewing:n,isReady:o}=this.props;if(e)return this.renderLoading();const i=this.getCurrentProject();if(!i)return this.renderNotFount();const c=this.getCurrentPool(),x=this.getCurrentScene();return t.jsxs(t.Fragment,{children:[!n&&t.jsxs(t.Fragment,{children:[t.jsx(p,{}),t.jsxs(a.Container,{className:"back-container",children:[t.jsx(W,{absolute:!0,onClick:this.handleBack}),t.jsxs(a.Button,{secondary:!0,onClick:this.handleExportProject.bind(this),loading:!i,disabled:!i,children:[t.jsx(a.Icon,{name:"download"}),d("scene_detail_page.download_scene")]})]})]}),t.jsxs("div",{className:"SceneViewPage"+(n?" preview":" mini"),children:[t.jsx("div",{className:"thumbnail",style:{backgroundImage:`url("${i.thumbnail}")`},children:t.jsx(a.Responsive,{minWidth:1025,as:u.Fragment,children:t.jsx(k,{isReadOnly:!0,type:this.getType()},i.id)})}),t.jsxs("div",{className:"scene-action-list",children:[c&&t.jsx("div",{className:"scene-action",children:t.jsx(j,{text:t.jsxs(t.Fragment,{children:[t.jsx(h,{name:c.like?"heart-full":"heart"}),c.likes>0&&t.jsx("span",{className:"LikeCount",children:c.likes})]}),type:"circle",onClick:this.handleLike})}),t.jsx("div",{style:{flex:1}}),t.jsx(a.Responsive,{minWidth:1025,as:u.Fragment,children:t.jsx("div",{className:"scene-action",children:t.jsx(j,{icon:"view",type:"circle",isActive:n,isDisabled:!o,onClick:this.handlePreview})})})]}),t.jsxs("div",{className:"detail",children:[t.jsxs("div",{className:"title",children:[t.jsx("h1",{children:i.title}),t.jsx(K,{scene:x})]}),this.renderAuthor(),i.description&&t.jsx("div",{className:"description",children:t.jsx("p",{children:i.description})}),t.jsxs("div",{className:"component-list",children:[t.jsxs("div",{className:"component",children:[t.jsx(h,{name:"scene-parcel"})," ",d("public_page.parcel_count",{parcels:this.getParcelCount()})]}),t.jsxs("div",{className:"component",children:[t.jsx(h,{name:"scene-object"})," ",d("public_page.item_count",{items:this.getObjectCount()})]})]})]})]}),!n&&t.jsx(g,{})]})}};const G=s=>({isPreviewing:S(s),isReady:!F(s)&&m(s),isFetching:I(s)&&!m(s),isLoggedIn:R(s),currentProject:A(s),currentPool:E(s),scenes:_(s),currentAuthor:O(s),isLoading:T(s)||!!B(s).length}),H=s=>({onLikePool:(r,e=!0)=>s(M(r,e)),onPreview:()=>s(D(!0)),onCloseEditor:()=>s(U()),onLoadProject:(r,e=P.PUBLIC)=>s($(r,e)),onOpenModal:(r,e)=>s(V(r,e)),onLoadProjectScene:(r,e)=>s(q(r,e))}),se=w(G,H)(N(z));export{se as default};
1
+ var C=Object.defineProperty;var v=(s,r,e)=>r in s?C(s,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[r]=e;var l=(s,r,e)=>v(s,typeof r!="symbol"?r+"":r,e);import{aB as b,D as u,Q as P,H as t,al as L,ah as p,M as a,aj as g,G as d,aX as f,K as y,aY as k,aZ as j,J as h,N as w,a_ as N,an as S,aq as F,ap as m,a$ as I,ae as R,at as A,b0 as E,O as _,b1 as O,b2 as T,b3 as B,b4 as M,b5 as D,av as U,b6 as $,X as V,Y as q}from"./index-Co91-zEg.js";import{B as W}from"./Back-vJO5KaRC.js";import{S as K}from"./SDKTag-Che2mSHv.js";function X(s){return s?{id:s.id,title:s.title,description:s.description,thumbnail:s.thumbnail,isPublic:!1,sceneId:s.sceneId,ethAddress:s.ethAddress,createdAt:s.createdAt,updatedAt:s.updatedAt,layout:s.layout,isTemplate:!1,video:s.video,templateStatus:null}:null}const Y=b.get("PROFILE_URL","");let z=class extends u.PureComponent{constructor(){super(...arguments);l(this,"handlePreview",()=>{this.props.onPreview()});l(this,"handleLike",()=>{const{currentPool:e,isLoggedIn:n,onOpenModal:o}=this.props;e&&(n?this.props.onLikePool(e.id,!e.like):o("LikeModal",{}))});l(this,"handleBack",()=>{const{history:e}=this.props;e.push(y.poolSearch())})}componentDidMount(){const{match:e,onLoadProject:n}=this.props;e.params.projectId&&n(e.params.projectId,this.getType())}componentDidUpdate(){const e=this.getCurrentProject(),n=this.getCurrentScene(),{isLoading:o,onLoadProjectScene:i}=this.props;e&&!n&&!o&&i(e,this.getType())}componentWillUnmount(){this.props.onCloseEditor()}getType(){return this.props.match&&this.props.match.params&&this.props.match.params.type||P.PUBLIC}getCurrentProject(){const{currentProject:e,currentPool:n}=this.props;switch(this.getType()){case"pool":return n;default:return e}}getCurrentScene(){const{scenes:e}=this.props,n=this.getCurrentProject();return n&&e[n.sceneId]||null}getCurrentPool(){const{currentPool:e}=this.props;switch(this.getType()){case"pool":return e;default:return null}}getParcelCount(){const e=this.getCurrentProject();return e?e.layout.cols*e.layout.rows:0}getObjectCount(){const e=this.getCurrentScene();if(!e||!e.sdk6)return 0;const n=this.getParcelCount();if(n===0)return 0;const o=Object.keys(e.sdk6.entities).length;return o<n?0:o-n}renderNotFount(){return t.jsx(L,{})}renderLoading(){return t.jsxs(t.Fragment,{children:[t.jsx(p,{}),t.jsx(a.Page,{isFullscreen:!0,children:t.jsx(a.Loader,{active:!0,size:"huge"})}),t.jsx(g,{isFullscreen:!0})]})}handleExportProject(){const{onOpenModal:e}=this.props;e("ExportModal",{project:X(this.getCurrentProject())})}renderAuthor(){const{currentAuthor:e}=this.props;if(!e)return null;const n=e.avatars[0].ethAddress;return t.jsxs("div",{className:"author",children:[d("public_page.made_by"),t.jsx(f,{address:n,as:"a",href:`${Y}/accounts/${n}`})]})}render(){const{isFetching:e,isPreviewing:n,isReady:o}=this.props;if(e)return this.renderLoading();const i=this.getCurrentProject();if(!i)return this.renderNotFount();const c=this.getCurrentPool(),x=this.getCurrentScene();return t.jsxs(t.Fragment,{children:[!n&&t.jsxs(t.Fragment,{children:[t.jsx(p,{}),t.jsxs(a.Container,{className:"back-container",children:[t.jsx(W,{absolute:!0,onClick:this.handleBack}),t.jsxs(a.Button,{secondary:!0,onClick:this.handleExportProject.bind(this),loading:!i,disabled:!i,children:[t.jsx(a.Icon,{name:"download"}),d("scene_detail_page.download_scene")]})]})]}),t.jsxs("div",{className:"SceneViewPage"+(n?" preview":" mini"),children:[t.jsx("div",{className:"thumbnail",style:{backgroundImage:`url("${i.thumbnail}")`},children:t.jsx(a.Responsive,{minWidth:1025,as:u.Fragment,children:t.jsx(k,{isReadOnly:!0,type:this.getType()},i.id)})}),t.jsxs("div",{className:"scene-action-list",children:[c&&t.jsx("div",{className:"scene-action",children:t.jsx(j,{text:t.jsxs(t.Fragment,{children:[t.jsx(h,{name:c.like?"heart-full":"heart"}),c.likes>0&&t.jsx("span",{className:"LikeCount",children:c.likes})]}),type:"circle",onClick:this.handleLike})}),t.jsx("div",{style:{flex:1}}),t.jsx(a.Responsive,{minWidth:1025,as:u.Fragment,children:t.jsx("div",{className:"scene-action",children:t.jsx(j,{icon:"view",type:"circle",isActive:n,isDisabled:!o,onClick:this.handlePreview})})})]}),t.jsxs("div",{className:"detail",children:[t.jsxs("div",{className:"title",children:[t.jsx("h1",{children:i.title}),t.jsx(K,{scene:x})]}),this.renderAuthor(),i.description&&t.jsx("div",{className:"description",children:t.jsx("p",{children:i.description})}),t.jsxs("div",{className:"component-list",children:[t.jsxs("div",{className:"component",children:[t.jsx(h,{name:"scene-parcel"})," ",d("public_page.parcel_count",{parcels:this.getParcelCount()})]}),t.jsxs("div",{className:"component",children:[t.jsx(h,{name:"scene-object"})," ",d("public_page.item_count",{items:this.getObjectCount()})]})]})]})]}),!n&&t.jsx(g,{})]})}};const G=s=>({isPreviewing:S(s),isReady:!F(s)&&m(s),isFetching:I(s)&&!m(s),isLoggedIn:R(s),currentProject:A(s),currentPool:E(s),scenes:_(s),currentAuthor:O(s),isLoading:T(s)||!!B(s).length}),H=s=>({onLikePool:(r,e=!0)=>s(M(r,e)),onPreview:()=>s(D(!0)),onCloseEditor:()=>s(U()),onLoadProject:(r,e=P.PUBLIC)=>s($(r,e)),onOpenModal:(r,e)=>s(V(r,e)),onLoadProjectScene:(r,e)=>s(q(r,e))}),se=w(G,H)(N(z));export{se as default};
@@ -1 +1 @@
1
- var _=Object.defineProperty;var E=(n,t,a)=>t in n?_(n,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):n[t]=a;var j=(n,t,a)=>E(n,typeof t!="symbol"?t+"":t,a);import{D as v,H as e,bm as R,G as r,bz as T,M as s,K as k,bA as y,bB as D,bC as I,bD as f,bE as C,N as O,a_ as F,bF as H,bG as $,bH as h,bI as g,aZ as S,bJ as G,bK as B,bL as V}from"./index-VXGnlWrX.js";import{N as W}from"./Navigation.container-BWFTBOiv.js";import{L as z}from"./LoggedInDetailPage.container-OvyIkhnT.js";import{R as K}from"./RentalPeriod-F_obsrQn.js";import"./selectors-C473pIzA.js";import"./SignInRequired-BI7xuOee.js";import"./index-D6GGy32T.js";const M=n=>n.ui.land,Z=n=>M(n).view;class A extends v.PureComponent{render(){const{list:t}=this.props;switch(t.length){case 0:return r("global.none");case 1:return t[0];case 2:return e.jsx(R,{id:"list.two",values:{first:t[0],second:t[1]}});default:return e.jsx(R,{id:"list.two",values:{first:t[0],second:r("list.more",{count:t.length-1})}})}}}const q=(n,t)=>f(n,C)?1:f(t,C)?-1:n>t?1:-1;let J=class extends v.PureComponent{render(){const{land:t,deployments:a,rental:l,history:o}=this.props,{x:d,y:p}=T(t);return e.jsxs(s.Table.Row,{className:"TableRow",onClick:()=>o.push(k.landDetail(t.id)),children:[e.jsx(s.Table.Cell,{children:e.jsxs(s.Row,{children:[e.jsx(s.Column,{width:67,grow:!1,shrink:!1,children:e.jsx(y,{landId:t.id,width:45,height:45,isDraggable:!1,size:9})}),e.jsx(s.Column,{className:"name",children:e.jsxs("div",{children:[t.name," ",e.jsx("span",{className:"secondary-text",children:D(d,p)})]})})]})}),e.jsx(s.Table.Cell,{children:e.jsxs("div",{children:[r(`roles.${t.role}`)," ",l?e.jsx(K,{land:t,rental:l}):null]})}),e.jsx(s.Table.Cell,{children:e.jsx(A,{list:t.operators.sort(q).map(c=>e.jsx(I,{address:c}))})}),e.jsx(s.Table.Cell,{children:e.jsx(A,{list:a.map(c=>c.name)})})]})}};const X=(n,t)=>{const{land:a}=t,o=H(n)[a.id]||[],d=$(n,a);return{deployments:o,rental:d}},Y=O(X)(F(J)),b=20;let Q=class extends v.PureComponent{constructor(){super(...arguments);j(this,"state",{showOwner:!0,showOperator:!0,showLessor:!0,showTenant:!0,page:1,selectedLand:0});j(this,"handleNext",()=>{const{selectedLand:a}=this.state,l=this.getFilteredLands();a===l.length-1?this.setState({selectedLand:0}):this.setState({selectedLand:a+1})});j(this,"handlePrev",()=>{const{selectedLand:a}=this.state;if(a===0){const l=this.getFilteredLands();this.setState({selectedLand:l.length-1})}else this.setState({selectedLand:a-1})})}componentWillReceiveProps(a){a.lands!==this.props.lands&&this.setState({page:1})}renderLand(){const{view:a,onSetView:l}=this.props,{page:o,showOwner:d,showOperator:p,showTenant:c,showLessor:u,selectedLand:N}=this.state,i=this.getFilteredLands(),P=Math.ceil(i.length/b);let w,L;if(i.length>1&&N<i.length){const{x:m,y:x}=T(i[N]);w=m,L=x}else if(i.length===1){const{x:m,y:x}=T(i[0]);w=m,L=x}return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"filters",children:e.jsx(s.Container,{children:e.jsxs(s.Row,{height:30,children:[e.jsx(s.Column,{children:e.jsxs(s.Row,{children:[e.jsx(s.Header,{sub:!0,children:r("land_page.results",{count:i.length.toLocaleString()})}),a===h.ATLAS&&i.length>1?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"arrow prev",onClick:this.handlePrev}),e.jsx("div",{className:"arrow next",onClick:this.handleNext})]}):null]})}),e.jsx(s.Column,{align:"right",children:e.jsxs(s.Row,{children:[e.jsx(s.Popup,{trigger:e.jsx(s.Radio,{value:"owner",checked:d,onClick:()=>this.setState({showOwner:!d}),label:r(`roles.${g.OWNER}`)}),content:r("land_page.owner_explanation")}),e.jsx(s.Popup,{trigger:e.jsx(s.Radio,{className:"operator-checkbox",value:"operator",checked:p,onClick:()=>this.setState({showOperator:!p}),label:r(`roles.${g.OPERATOR}`)}),className:"radio-popup",content:e.jsx("div",{children:r("land_page.operator_explanation")})}),e.jsx(s.Popup,{trigger:e.jsx(s.Radio,{className:"tenant-checkbox",value:"tentant",checked:c,onClick:()=>this.setState({showTenant:!c}),label:r(`roles.${g.TENANT}`)}),className:"radio-popup",content:e.jsx("div",{children:r("land_page.tenant_explanation")})}),e.jsx(S,{className:"grid",icon:"table",isActive:a===h.GRID,onClick:()=>l(h.GRID)}),e.jsx(S,{className:"atlas",icon:"pin",isActive:a===h.ATLAS,onClick:()=>l(h.ATLAS)})]})})]})})}),a===h.GRID?e.jsxs(s.Container,{children:[e.jsx(s.Section,{className:"table-section",children:i.length>0?e.jsxs(s.Table,{basic:"very",children:[e.jsx(s.Table.Header,{children:e.jsxs(s.Table.Row,{children:[e.jsx(s.Table.HeaderCell,{width:"4",children:r("global.name")}),e.jsx(s.Table.HeaderCell,{width:"4",children:r("global.role")}),e.jsx(s.Table.HeaderCell,{width:"4",children:r("land_page.operated_by")}),e.jsx(s.Table.HeaderCell,{width:"4",children:r("land_page.online_scenes")})]})}),e.jsx(s.Table.Body,{children:i.slice((o-1)*b,o*b).map((m,x)=>e.jsx(Y,{land:m},x))})]}):null}),P>1?e.jsx(s.Section,{className:"pagination-section",children:e.jsx(s.Pagination,{firstItem:null,lastItem:null,activePage:o,onPageChange:(m,x)=>this.setState({page:+x.activePage}),totalPages:P})}):null]}):e.jsx("div",{className:"atlas-wrapper",children:e.jsx(y,{className:"main",x:w,y:L,showOperator:p,showOwner:d,showTenant:c,showLessor:u,hasPopup:!0})})]})}getFilteredLands(){const{lands:a}=this.props,{showOwner:l,showOperator:o,showLessor:d,showTenant:p}=this.state;return a.filter(u=>!!(l&&u.roles.includes(g.OWNER)||o&&u.roles.includes(g.OPERATOR)||p&&u.roles.includes(g.TENANT)||d&&u.roles.includes(g.LESSOR)))}render(){const{isLoading:a,view:l}=this.props;return e.jsx(z,{className:`LandPage ${l}-view`,activeTab:W.LAND,isLoading:a,isPageFullscreen:!0,isFooterFullscreen:l===h.ATLAS,isNavigationFullscreen:l===h.ATLAS,children:this.renderLand()})}};const U=n=>({lands:G(n),view:Z(n),isLoading:B(n)}),ee=n=>({onSetView:t=>n(V(t))}),he=O(U,ee)(Q);export{he as default};
1
+ var _=Object.defineProperty;var E=(n,t,a)=>t in n?_(n,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):n[t]=a;var j=(n,t,a)=>E(n,typeof t!="symbol"?t+"":t,a);import{D as v,H as e,bm as R,G as r,bz as T,M as s,K as k,bA as y,bB as D,bC as I,bD as f,bE as C,N as O,a_ as F,bF as H,bG as $,bH as h,bI as g,aZ as S,bJ as G,bK as B,bL as V}from"./index-Co91-zEg.js";import{N as W}from"./Navigation.container-D1FZTUzP.js";import{L as z}from"./LoggedInDetailPage.container-DzlaFDdE.js";import{R as K}from"./RentalPeriod-BhsL4tf5.js";import"./selectors-skzFLW_U.js";import"./SignInRequired-CyBpNy0X.js";import"./index-BVhNl-6b.js";const M=n=>n.ui.land,Z=n=>M(n).view;class A extends v.PureComponent{render(){const{list:t}=this.props;switch(t.length){case 0:return r("global.none");case 1:return t[0];case 2:return e.jsx(R,{id:"list.two",values:{first:t[0],second:t[1]}});default:return e.jsx(R,{id:"list.two",values:{first:t[0],second:r("list.more",{count:t.length-1})}})}}}const q=(n,t)=>f(n,C)?1:f(t,C)?-1:n>t?1:-1;let J=class extends v.PureComponent{render(){const{land:t,deployments:a,rental:l,history:o}=this.props,{x:d,y:p}=T(t);return e.jsxs(s.Table.Row,{className:"TableRow",onClick:()=>o.push(k.landDetail(t.id)),children:[e.jsx(s.Table.Cell,{children:e.jsxs(s.Row,{children:[e.jsx(s.Column,{width:67,grow:!1,shrink:!1,children:e.jsx(y,{landId:t.id,width:45,height:45,isDraggable:!1,size:9})}),e.jsx(s.Column,{className:"name",children:e.jsxs("div",{children:[t.name," ",e.jsx("span",{className:"secondary-text",children:D(d,p)})]})})]})}),e.jsx(s.Table.Cell,{children:e.jsxs("div",{children:[r(`roles.${t.role}`)," ",l?e.jsx(K,{land:t,rental:l}):null]})}),e.jsx(s.Table.Cell,{children:e.jsx(A,{list:t.operators.sort(q).map(c=>e.jsx(I,{address:c}))})}),e.jsx(s.Table.Cell,{children:e.jsx(A,{list:a.map(c=>c.name)})})]})}};const X=(n,t)=>{const{land:a}=t,o=H(n)[a.id]||[],d=$(n,a);return{deployments:o,rental:d}},Y=O(X)(F(J)),b=20;let Q=class extends v.PureComponent{constructor(){super(...arguments);j(this,"state",{showOwner:!0,showOperator:!0,showLessor:!0,showTenant:!0,page:1,selectedLand:0});j(this,"handleNext",()=>{const{selectedLand:a}=this.state,l=this.getFilteredLands();a===l.length-1?this.setState({selectedLand:0}):this.setState({selectedLand:a+1})});j(this,"handlePrev",()=>{const{selectedLand:a}=this.state;if(a===0){const l=this.getFilteredLands();this.setState({selectedLand:l.length-1})}else this.setState({selectedLand:a-1})})}componentWillReceiveProps(a){a.lands!==this.props.lands&&this.setState({page:1})}renderLand(){const{view:a,onSetView:l}=this.props,{page:o,showOwner:d,showOperator:p,showTenant:c,showLessor:u,selectedLand:N}=this.state,i=this.getFilteredLands(),P=Math.ceil(i.length/b);let w,L;if(i.length>1&&N<i.length){const{x:m,y:x}=T(i[N]);w=m,L=x}else if(i.length===1){const{x:m,y:x}=T(i[0]);w=m,L=x}return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"filters",children:e.jsx(s.Container,{children:e.jsxs(s.Row,{height:30,children:[e.jsx(s.Column,{children:e.jsxs(s.Row,{children:[e.jsx(s.Header,{sub:!0,children:r("land_page.results",{count:i.length.toLocaleString()})}),a===h.ATLAS&&i.length>1?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"arrow prev",onClick:this.handlePrev}),e.jsx("div",{className:"arrow next",onClick:this.handleNext})]}):null]})}),e.jsx(s.Column,{align:"right",children:e.jsxs(s.Row,{children:[e.jsx(s.Popup,{trigger:e.jsx(s.Radio,{value:"owner",checked:d,onClick:()=>this.setState({showOwner:!d}),label:r(`roles.${g.OWNER}`)}),content:r("land_page.owner_explanation")}),e.jsx(s.Popup,{trigger:e.jsx(s.Radio,{className:"operator-checkbox",value:"operator",checked:p,onClick:()=>this.setState({showOperator:!p}),label:r(`roles.${g.OPERATOR}`)}),className:"radio-popup",content:e.jsx("div",{children:r("land_page.operator_explanation")})}),e.jsx(s.Popup,{trigger:e.jsx(s.Radio,{className:"tenant-checkbox",value:"tentant",checked:c,onClick:()=>this.setState({showTenant:!c}),label:r(`roles.${g.TENANT}`)}),className:"radio-popup",content:e.jsx("div",{children:r("land_page.tenant_explanation")})}),e.jsx(S,{className:"grid",icon:"table",isActive:a===h.GRID,onClick:()=>l(h.GRID)}),e.jsx(S,{className:"atlas",icon:"pin",isActive:a===h.ATLAS,onClick:()=>l(h.ATLAS)})]})})]})})}),a===h.GRID?e.jsxs(s.Container,{children:[e.jsx(s.Section,{className:"table-section",children:i.length>0?e.jsxs(s.Table,{basic:"very",children:[e.jsx(s.Table.Header,{children:e.jsxs(s.Table.Row,{children:[e.jsx(s.Table.HeaderCell,{width:"4",children:r("global.name")}),e.jsx(s.Table.HeaderCell,{width:"4",children:r("global.role")}),e.jsx(s.Table.HeaderCell,{width:"4",children:r("land_page.operated_by")}),e.jsx(s.Table.HeaderCell,{width:"4",children:r("land_page.online_scenes")})]})}),e.jsx(s.Table.Body,{children:i.slice((o-1)*b,o*b).map((m,x)=>e.jsx(Y,{land:m},x))})]}):null}),P>1?e.jsx(s.Section,{className:"pagination-section",children:e.jsx(s.Pagination,{firstItem:null,lastItem:null,activePage:o,onPageChange:(m,x)=>this.setState({page:+x.activePage}),totalPages:P})}):null]}):e.jsx("div",{className:"atlas-wrapper",children:e.jsx(y,{className:"main",x:w,y:L,showOperator:p,showOwner:d,showTenant:c,showLessor:u,hasPopup:!0})})]})}getFilteredLands(){const{lands:a}=this.props,{showOwner:l,showOperator:o,showLessor:d,showTenant:p}=this.state;return a.filter(u=>!!(l&&u.roles.includes(g.OWNER)||o&&u.roles.includes(g.OPERATOR)||p&&u.roles.includes(g.TENANT)||d&&u.roles.includes(g.LESSOR)))}render(){const{isLoading:a,view:l}=this.props;return e.jsx(z,{className:`LandPage ${l}-view`,activeTab:W.LAND,isLoading:a,isPageFullscreen:!0,isFooterFullscreen:l===h.ATLAS,isNavigationFullscreen:l===h.ATLAS,children:this.renderLand()})}};const U=n=>({lands:G(n),view:Z(n),isLoading:B(n)}),ee=n=>({onSetView:t=>n(V(t))}),he=O(U,ee)(Q);export{he as default};
@@ -1 +1 @@
1
- import{H as e,f_ as Ae,f$ as Ge,a1 as V,dz as Re,M as n,N as B,f9 as je,Z as Y,eX as We,G as i,fI as Ue,eP as ee,g0 as He,cC as Oe,X as D,er as ze,g1 as Fe,fU as qe,bw as Ie,fW as Ve,eC as Ne,g2 as Ye,fY as Ze,D as r,K as T,g3 as Qe,g4 as Ke,eM as M,dA as fe,en as Xe,g5 as Je,bu as ke,L as ye,fa as be,em as ve,ep as _e,g6 as es,g7 as ue,g8 as ss,g9 as ts,ga as ns,gb as as,gc as is,fd as os,gd as ls,ge as we,es as rs,gf as cs,gg as ds,gh as ge,J as ms,cA as _s,cB as us,fM as gs,eN as he,ex as pe,fo as hs,aN as ps,e6 as Cs,gi as xs,gj as js,gk as Is,eA as Ns,gl as fs,gm as ks,gn as ys,go as bs,gp as vs,fQ as ws}from"./index-VXGnlWrX.js";import{g as Ss}from"./selector-CtnQnmhq.js";import{L as Ps}from"./LoggedInDetailPage.container-OvyIkhnT.js";import{C as Ds}from"./CollectionProvider.container-D-pnB2Qb.js";import{N as Es}from"./NotFound-Cp2AS0S2.js";import{B as Ms}from"./Back-IVZes_Ab.js";import{C as Ts,T as $s}from"./ThirdPartyKindBadge-jDtkUak0.js";import{C as se}from"./ConfirmDelete-BTl6aSz6.js";import"./Navigation.container-BWFTBOiv.js";import"./selectors-C473pIzA.js";import"./SignInRequired-BI7xuOee.js";const Ls=s=>e.jsx("img",{"data-testid":Ae,src:Ge[s.network],alt:s.network,className:s.className}),Bs="_image_142g7_1",As="_main_142g7_2",Gs="_network_142g7_13",z={image:Bs,main:As,network:Gs},Rs=s=>{const{collection:t,collectionId:o,className:l,shape:c}=s;return e.jsxs("div",{className:V(z.main,l),children:[t!=null&&t.itemCount?e.jsx(Re,{collectionId:o,className:z.image}):e.jsx(n.Blockie,{className:z.image,seed:o,size:8,scale:8,shape:c??"circle"}),t!=null&&t.linkedContractNetwork?e.jsx(Ls,{network:t==null?void 0:t.linkedContractNetwork,className:z.network}):null]})},Ws=(s,t)=>({collection:je(s,t.collectionId)}),Us=B(Ws)(Rs),Hs="_ellipsis_4huv2_1",Ce={ellipsis:Hs},Os=s=>{const{collection:t}=s,o=Y(),l=()=>{t.isPublished&&t.forumLink&&v(t.forumLink,"_blank")},c=()=>{const{items:m,onOpenModal:d}=s;d("SeeInWorldModal",{itemIds:m.map(k=>k.id)})},a=()=>{const{collection:m,items:d}=s;o.push(Ue(m,d),{fromParam:ee.TP_COLLECTIONS})},x=()=>{const{collection:m,onDelete:d}=s;d(m)},p=()=>{const{collection:m,onOpenModal:d}=s;m.isPublished||d("EditCollectionURNModal",{collection:m})},N=()=>{const{collection:m,onOpenModal:d}=s;d("CreateAndEditMultipleItemsModal",{collectionId:m.id,type:He.EDIT})},v=(m,d="")=>{const k=window.open(m,d);k&&k.focus()},f=!We(t)&&!t.isPublished;return e.jsx(n.Dropdown,{className:Ce.dropdown,trigger:e.jsx(n.Button,{basic:!0,children:e.jsx(n.Icon,{className:Ce.ellipsis,size:"large",name:"ellipsis horizontal"})}),inline:!0,direction:"left",children:e.jsxs(n.Dropdown.Menu,{children:[e.jsx(n.Dropdown.Item,{text:i("collection_context_menu.see_in_decentraland"),onClick:c}),e.jsx(n.Dropdown.Item,{text:i("global.open_in_editor"),onClick:a}),e.jsx(n.Popup,{content:i("collection_context_menu.delete_published_collection"),position:"right center",disabled:f,trigger:f?e.jsx(se,{name:t.name,onDelete:x,trigger:e.jsx(n.Dropdown.Item,{text:i("global.delete")})}):e.jsx(n.Dropdown.Item,{text:i("global.delete"),disabled:!0}),hideOnScroll:!0,on:"hover",inverted:!0}),e.jsx(n.Popup,{content:i("collection_context_menu.change_published_urn"),position:"right center",disabled:!t.isPublished,trigger:e.jsx(n.Dropdown.Item,{text:i("collection_context_menu.edit_urn"),onClick:p,disabled:t.isPublished}),hideOnScroll:!0,on:"hover",inverted:!0}),e.jsx(n.Dropdown.Item,{text:i("collection_context_menu.edit_in_bulk"),onClick:N}),e.jsx(n.Popup,{content:i("collection_context_menu.unpublished"),position:"right center",disabled:t.isPublished||!!t.forumLink,trigger:e.jsx(n.Dropdown.Item,{disabled:!t.isPublished||!t.forumLink,text:i("collection_context_menu.forum_post"),onClick:l}),hideOnScroll:!0,on:"hover",inverted:!0})]})})},zs=Os,Fs=s=>({name:Oe(s)||""}),qs=s=>({onOpenModal:(t,o)=>s(D(t,o)),onDelete:t=>s(ze(t))}),Vs=B(Fs,qs)(zs),Ys=(s,t)=>{const{collection:o,items:l}=t;return{itemCurations:qe(s,o.id),isLoadingItemCurations:Ie(Ve(s),Ze),isLinkedWearablesPaymentsEnabled:Ne(s),itemsStatus:Ye(s,l.map(c=>c.id))}},Zs=s=>({onNewClick:(t,o,l)=>s(D("PublishWizardCollectionModal",{collectionId:t,itemsWithChanges:o,itemsToPublish:l})),onPushChangesClick:(t,o)=>s(D("PushChangesModal",{collectionId:t,itemsWithChanges:o})),onClick:(t,o,l)=>s(D("PublishThirdPartyCollectionModal",{collectionId:t,itemIds:o,action:l}))}),Qs=B(Ys,Zs)(Fe),Ks="_itemImage_1y9df_1",Xs="_itemStatus_1y9df_10",Js="_grid_1y9df_14",et="_row_1y9df_25",st="_column_1y9df_30",tt="_statusColumn_1y9df_34",nt="_synced_1y9df_39",at="_unsynced_1y9df_43",it="_avatarColumn_1y9df_47",ot="_nameWrapper_1y9df_52",lt="_name_1y9df_52",rt="_itemActions_1y9df_65",ct="_action_1y9df_72",C={itemImage:Ks,itemStatus:Xs,grid:Js,row:et,column:st,statusColumn:tt,synced:nt,unsynced:at,avatarColumn:it,nameWrapper:ot,name:lt,itemActions:rt,action:ct};function dt({item:s,status:t,selected:o,onSelect:l,onOpenModal:c,onDelete:a}){const x=Y(),p=r.useCallback((h,P)=>{l(s,P.checked)},[s,l]),N=r.useCallback(()=>{c("SeeInWorldModal",{itemIds:[s.id]})},[s,c]),v=r.useCallback(()=>{s.isPublished||c("EditItemURNModal",{item:s})},[s,c]),f=r.useCallback(()=>{x.push(T.itemEditor({itemId:s.id,collectionId:s.collectionId}),{fromParam:ee.TP_COLLECTIONS})},[s,x]),m=r.useCallback(()=>{a(s)},[a,s]),d=r.useMemo(()=>{if(!s.urn)return"";try{const h=Qe(s.urn);return Ke(h)?h.thirdPartyTokenId??"":""}catch{return""}},[s]),k=r.useMemo(()=>{switch(t){case M.UNDER_REVIEW:return e.jsx(n.Icon,{name:"clock outline"});case M.SYNCED:return e.jsx(n.Icon,{name:"check circle outline"});case M.UNSYNCED:return e.jsx(n.Icon,{name:"exclamation circle"});default:return null}},[t]),y=s.data;return e.jsx(n.Grid,{className:`CollectionItem ${C.grid}`,columns:"equal",children:e.jsxs(n.Grid.Row,{className:C.row,children:[e.jsxs(n.Grid.Column,{className:`${C.column} ${C.avatarColumn}`,width:5,children:[e.jsx(n.Checkbox,{checked:o,disabled:s.isPublished,onClick:p}),e.jsx(fe,{className:C.itemImage,item:s,hasBadge:!0,badgeSize:"small"}),e.jsx("div",{className:C.nameWrapper,children:e.jsxs("div",{className:C.name,title:s.name,children:[e.jsx(Xe,{className:C.itemStatus,item:s}),s.name]})})]}),e.jsx(n.Grid.Column,{className:C.column,children:y.category?e.jsx("div",{children:i(`wearable.category.${y.category}`)}):null}),e.jsx(n.Grid.Column,{className:C.column,children:e.jsx("div",{children:i(`body_shapes.${Je(s)}`)})}),e.jsx(n.Grid.Column,{className:C.column,children:e.jsx("div",{children:d})}),e.jsxs(n.Grid.Column,{width:3,className:`${C.column} ${C.statusColumn} ${C[t]}`,children:[k,e.jsx("div",{children:i(`third_party_collection_detail_page.synced_statuses.${t}`)})]}),e.jsx(n.Grid.Column,{width:1,className:C.column,children:e.jsx("div",{className:C.itemActions,children:e.jsx(n.Dropdown,{trigger:e.jsx(n.Button,{basic:!0,children:e.jsx(n.Icon,{name:"ellipsis horizontal"})}),inline:!0,direction:"left",className:C.action,onClick:ke(),children:e.jsxs(n.Dropdown.Menu,{children:[e.jsx(n.Dropdown.Item,{text:i("collection_item.see_details"),as:ye,to:T.itemDetail(s.id)}),e.jsx(n.Dropdown.Item,{text:i("collection_context_menu.see_in_decentraland"),onClick:N}),e.jsx(n.Dropdown.Item,{text:i("global.open_in_editor"),onClick:f}),e.jsx(n.Popup,{content:i("collection_item.cannot_edit_urn"),position:"right center",disabled:!s.isPublished,trigger:e.jsx(n.Dropdown.Item,{text:i("collection_item.edit_urn"),onClick:v,disabled:s.isPublished}),hideOnScroll:!0,on:"hover",inverted:!0,flowing:!0}),!s.isPublished&&e.jsx(se,{name:s.name,onDelete:m,trigger:e.jsx(n.Dropdown.Item,{text:i("global.delete")})})]})})})})]})})}const mt=(s,t)=>({status:be(s)[t.item.id]}),_t=s=>({onDelete:t=>s(ve(t)),onOpenModal:(t,o)=>s(D(t,o))}),ut=B(mt,_t)(dt),gt="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_8524_427)'%3e%3cpath%20d='M20.5%203L20.34%203.03L15%205.1L9%203L3.36%204.9C3.15%204.97%203%205.15%203%205.38V20.5C3%2020.78%203.22%2021%203.5%2021L3.66%2020.97L9%2018.9L15%2021L20.64%2019.1C20.85%2019.03%2021%2018.85%2021%2018.62V3.5C21%203.22%2020.78%203%2020.5%203ZM15%2019L9%2016.89V5L15%207.11V19Z'%20fill='%23A09BA8'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_8524_427'%3e%3crect%20width='24'%20height='24'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",ht="data:image/svg+xml,%3csvg%20width='12'%20height='12'%20viewBox='0%200%2012%2012'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10.669%200H1.33362C0.593463%200%200%200.600131%200%201.33362V10.669C0%2011.4025%200.593463%2012.0026%201.33362%2012.0026H10.669C11.4025%2012.0026%2012.0026%2011.4025%2012.0026%2010.669V1.33362C12.0026%200.600131%2011.4092%200%2010.669%200ZM10.669%2010.669H1.33362V2.66725H10.669V10.669ZM7.00152%206.66812C7.00152%207.22157%206.55476%207.66834%206.00131%207.66834C5.44785%207.66834%205.00109%207.22157%205.00109%206.66812C5.00109%206.11466%205.44785%205.6679%206.00131%205.6679C6.55476%205.6679%207.00152%206.11466%207.00152%206.66812ZM6.00131%204.00087C4.18091%204.00087%202.62724%205.10778%202.00044%206.66812C2.62724%208.22846%204.18091%209.33537%206.00131%209.33537C7.8217%209.33537%209.37537%208.22846%2010.0022%206.66812C9.37537%205.10778%207.8217%204.00087%206.00131%204.00087ZM6.00131%208.33515C5.08111%208.33515%204.33428%207.58832%204.33428%206.66812C4.33428%205.74792%205.08111%205.00109%206.00131%205.00109C6.92151%205.00109%207.66834%205.74792%207.66834%206.66812C7.66834%207.58832%206.92151%208.33515%206.00131%208.33515Z'%20fill='%23ECEBED'/%3e%3c/svg%3e",pt="_status_rgxu1_1",Ct="_pending_migration_rgxu1_14",xt="_synced_rgxu1_19",jt="_unpublished_rgxu1_24",It="_unsynced_rgxu1_25",Nt="_pending_mapping_rgxu1_30",ft="_under_review_rgxu1_31",kt="_icon_rgxu1_10",F={status:pt,pending_migration:Ct,synced:xt,unpublished:jt,unsynced:It,pending_mapping:Nt,under_review:ft,icon:kt},yt=s=>{const{status:t,item:o}=s,l=!o.mappings&&_e(o.urn),c=!o.isMappingComplete&&_e(o.urn),a=r.useMemo(()=>{if(l)return e.jsx("img",{src:gt,className:F.icon});if(c)return e.jsx(n.Icon,{name:"warning circle"});switch(t){case M.UNDER_REVIEW:return e.jsx("img",{src:ht,className:F.icon});case M.SYNCED:return e.jsx(n.Icon,{name:"check circle"});case M.UNSYNCED:case M.UNPUBLISHED:return e.jsx(n.Icon,{name:"cloud upload"})}},[t,l,c]),x=r.useMemo(()=>l?i("item_status.pending_mapping"):c?i("item_status.pending_migration"):i(`item_status.${t}`),[t,l,c]),p=r.useMemo(()=>l?"pending_mapping":c?"pending_migration":t,[t,l,c]);return e.jsxs("div",{className:V(F[p],F.status),children:[a," ",x]})},bt="_itemImage_1rili_1",vt="_itemStatus_1rili_10",wt="_grid_1rili_14",St="_loading_1rili_21",Pt="_row_1rili_26",Dt="_column_1rili_31",Et="_avatarColumn_1rili_35",Mt="_nameWrapper_1rili_40",Tt="_name_1rili_40",$t="_itemActions_1rili_53",Lt="_action_1rili_60",Bt="_overlay_1rili_65",I={itemImage:bt,itemStatus:vt,grid:wt,loading:St,row:Pt,column:Dt,avatarColumn:Et,nameWrapper:Mt,name:Tt,itemActions:$t,action:Lt,overlay:Bt};function At({item:s,status:t,selected:o,loading:l,collection:c,onSaveItem:a,onSelect:x,onOpenModal:p,onDelete:N}){const v=Y(),f=r.useMemo(()=>es(s),[s]),m=r.useMemo(()=>c.linkedContractAddress&&c.linkedContractNetwork?{address:c.linkedContractAddress,network:c.linkedContractNetwork}:null,[c]),[d,k]=r.useState(f),y=r.useMemo(()=>{if(d&&m){const S=ue(d,m);return ss(S)?void 0:"Invalid mapping"}},[d,m]);r.useEffect(()=>{!m||y||(!f&&d||f&&d&&!ts(f,d))&&h(d,m)},[f,y,d,m]);const h=r.useCallback(ns((S,E)=>{const $=ue(S,E);a({...s,mappings:$})},1e3),[a]),P=r.useCallback((S,E)=>{l||x(s,E.checked)},[s,l,x]),w=r.useCallback(()=>{p("SeeInWorldModal",{itemIds:[s.id]})},[s,p]),H=r.useCallback(()=>{s.isPublished||p("EditItemURNModal",{item:s})},[s,p]),Z=r.useCallback(()=>{v.push(T.itemEditor({itemId:s.id,collectionId:s.collectionId}),{fromParam:ee.TP_COLLECTIONS})},[s,v]),A=r.useCallback(()=>{N(s)},[N,s]);return e.jsxs(n.Grid,{className:V(I.grid,l&&I.loading),columns:"equal",children:[l&&e.jsx("div",{className:I.overlay,children:e.jsx(n.Loader,{size:"large",active:!0})}),e.jsxs(n.Grid.Row,{className:I.row,children:[e.jsxs(n.Grid.Column,{className:`${I.column} ${I.avatarColumn}`,width:4,children:[e.jsx(n.Checkbox,{checked:o,disabled:s.isPublished||l,onClick:P}),e.jsx(fe,{className:I.itemImage,item:s,hasBadge:!0,badgeSize:"small"}),e.jsx("div",{className:I.nameWrapper,children:e.jsx("div",{className:I.name,title:s.name,children:s.name})})]}),e.jsx(n.Grid.Column,{children:m&&e.jsx(as,{disabled:l,mapping:d,error:y,onChange:k,isCompact:!0})}),e.jsx(n.Grid.Column,{width:3,className:V(I.column,I.statusColumn),children:e.jsx(yt,{status:t,item:s})}),e.jsx(n.Grid.Column,{width:1,className:I.column,children:e.jsx("div",{className:I.itemActions,children:e.jsx(n.Dropdown,{trigger:e.jsx(n.Button,{basic:!0,children:e.jsx(n.Icon,{name:"ellipsis horizontal"})}),inline:!0,direction:"left",className:I.action,disabled:l,onClick:ke(),children:e.jsxs(n.Dropdown.Menu,{children:[e.jsx(n.Dropdown.Item,{text:i("collection_item.see_details"),as:ye,to:T.itemDetail(s.id)}),e.jsx(n.Dropdown.Item,{text:i("collection_context_menu.see_in_decentraland"),onClick:w}),e.jsx(n.Dropdown.Item,{text:i("global.open_in_editor"),onClick:Z}),e.jsx(n.Popup,{content:i("collection_item.cannot_edit_urn"),position:"right center",disabled:!s.isPublished,trigger:e.jsx(n.Dropdown.Item,{text:i("collection_item.edit_urn"),onClick:H,disabled:s.isPublished}),hideOnScroll:!0,on:"hover",inverted:!0,flowing:!0}),!s.isPublished&&e.jsx(se,{name:s.name,onDelete:A,trigger:e.jsx(n.Dropdown.Item,{text:i("global.delete")})})]})})})})]})]})}const Gt=(s,t)=>{const o=be(s);return{loading:!!is(s)[t.item.id],status:o[t.item.id]}},Rt=s=>({onDelete:t=>s(ve(t)),onSaveItem:t=>s(os(t,{},{onlySaveItem:!0})),onOpenModal:(t,o)=>s(D(t,o))}),Wt=B(Gt,Rt)(At),L=50,Ut="_itemCheckbox_2k9qa_1",Ht="_gridHeader_2k9qa_5",Ot="_itemColumn_2k9qa_15",J={itemCheckbox:Ut,gridHeader:Ht,itemColumn:Ot},zt=({areAllSelected:s,onSelectedAllClick:t})=>e.jsx(n.Grid,{columns:"equal",className:J.gridHeader,children:e.jsxs(n.Grid.Row,{children:[e.jsxs(n.Grid.Column,{width:5,className:J.itemColumn,children:[e.jsx(n.Checkbox,{className:J.itemCheckbox,checked:s,onClick:t})," ",i("global.item")]}),e.jsx(n.Grid.Column,{children:i("global.category")}),e.jsx(n.Grid.Column,{children:i("global.body_shape")}),e.jsx(n.Grid.Column,{children:"URN ID"}),e.jsxs(n.Grid.Column,{width:3,children:[" ",i("collection_row.status")," "]}),e.jsx(n.Grid.Column,{width:1})]})}),Ft="_gridHeader_4acv6_1",qt="_itemColumn_4acv6_11",Vt="_itemCheckbox_4acv6_16",Yt="_linkedToColumn_4acv6_20",q={gridHeader:Ft,itemColumn:qt,itemCheckbox:Vt,linkedToColumn:Yt},Zt=({areAllSelected:s,onSelectedAllClick:t})=>e.jsx(n.Grid,{columns:"equal",className:q.gridHeader,children:e.jsxs(n.Grid.Row,{children:[e.jsxs(n.Grid.Column,{width:4,className:q.itemColumn,children:[e.jsx(n.Checkbox,{className:q.itemCheckbox,checked:s,onClick:t})," ",i("global.item")]}),e.jsxs(n.Grid.Column,{className:q.linkedToColumn,children:[e.jsx("span",{children:i("third_party_collection_detail_page.linked_to")}),e.jsx(ls,{})]}),e.jsxs(n.Grid.Column,{width:3,children:[" ",i("collection_row.status")," "]}),e.jsx(n.Grid.Column,{width:1})]})}),Qt="_main_16i8r_3",Kt="_slots_16i8r_11",Xt="_empty_16i8r_28",Jt="_searchContainer_16i8r_32",en="_searchInfo_16i8r_42",sn="_syncedStatusList_16i8r_46",tn="_selectionInfo_16i8r_53",nn="_header_16i8r_63",an="_content_16i8r_74",on="_title_16i8r_83",ln="_editCollectionName_16i8r_96",rn="_name_16i8r_101",cn="_nameAndType_16i8r_105",dn="_nameWrapper_16i8r_115",mn="_size_16i8r_139",_n="_actions_16i8r_143",un="_body_16i8r_151",gn="_info_16i8r_162",hn="_infoHeader_16i8r_170",pn="_infoContent_16i8r_178",Cn="_slotsIcon_16i8r_195",xn="_copyButton_16i8r_207",jn="_sparkles_16i8r_232",In="_start_16i8r_241",Nn="_migrationBanner_16i8r_254",fn="_type_16i8r_277",kn="_linkedWearableBadge_16i8r_283",yn="_typeBadge_16i8r_288",bn="_programmaticBadge_16i8r_292",vn="_standardBadge_16i8r_296",wn="_loader_16i8r_302",_={main:Qt,slots:Kt,empty:Xt,searchContainer:Jt,searchInfo:en,syncedStatusList:sn,selectionInfo:tn,header:nn,content:an,title:on,editCollectionName:ln,name:rn,nameAndType:cn,nameWrapper:dn,size:mn,actions:_n,body:un,info:gn,infoHeader:hn,infoContent:pn,slotsIcon:Cn,copyButton:xn,sparkles:jn,start:In,migrationBanner:Nn,type:fn,linkedWearableBadge:kn,typeBadge:yn,programmaticBadge:bn,standardBadge:vn,loader:wn},xe=({children:s,title:t,info:o})=>e.jsxs("div",{className:_.info,children:[e.jsxs("div",{className:_.infoHeader,children:[t," ",o&&e.jsx(n.InfoTooltip,{content:o})]}),e.jsx("div",{className:_.infoContent,children:s})]});function Sn({currentPage:s,lastLocation:t,wallet:o,thirdParty:l,items:c,collection:a,totalItems:x,isLoading:p,isThirdPartyV2Enabled:N,isLinkedWearablesPaymentsEnabled:v,onFetchAvailableSlots:f,onFetchThirdParty:m,onNewItem:d,onEditName:k,isLoadingAvailableSlots:y}){const[h,P]=r.useState({}),[w,H]=r.useState(s),[Z,A]=r.useState(!1),[S,E]=r.useState(!1),[$,te]=r.useState("ALL"),G=Y(),ne=t===T.collections();r.useEffect(()=>{l&&l.availableSlots===void 0&&!y&&f(l.id)},[l,y,f]),r.useEffect(()=>{!p&&!l&&(a!=null&&a.urn)&&m(we(a.urn))},[a==null?void 0:a.urn,p,l]),r.useEffect(()=>{if(s!==w&&H(s),S){const u=c.reduce((g,j)=>(g[j.id]=!0,g),{});P(u),A(!1)}},[w,S,c,l,s]);const Se=r.useCallback(()=>{a!=null&&a.id&&d(a.id)},[a==null?void 0:a.id,d]),Pe=r.useCallback(()=>{a&&k(a)},[a,k]),De=r.useCallback(()=>{ne?G.goBack():G.push(T.collections(rs.THIRD_PARTY))},[G,ne]),Ee=r.useCallback((u,g)=>{H(+g.activePage),G.push(T.thirdPartyCollectionDetail(a.id,{page:+g.activePage}))},[a,G]),Q=r.useCallback((u,g)=>{P({...h,[u.id]:g}),E(!1),A(!1)},[h]),R=r.useCallback(u=>u.every(g=>h[g.id]),[h]),ae=r.useCallback((u,g)=>{const j={...h},W=!R(u);for(const U of u)j[U.id]=W;P(j),A(!0),E(S&&!!g.checked)},[h,S,R]),ie=r.useCallback(()=>{P({})},[]),oe=r.useMemo(()=>a&&l&&o&&cs(o.address,l),[a,l,o]),Me=r.useCallback(u=>{if(E(!0),a){const g=Math.ceil(x/L);u(a.id,{page:ds(g),limit:L,overridePaginationData:!1})}},[x]),le=r.useCallback((u,{value:g})=>{te(g)},[te]),Te=[{value:"ALL",text:i("third_party_collection_detail_page.synced_filter.all")},{value:"SYNCED",text:i("item_status.synced")},{value:"UNSYNCED",text:i("item_status.unsynced")},...a!=null&&a.isMappingComplete?[]:[{value:"MIGRATION_REQUIRED",text:i("item_status.pending_migration")},{value:"MAPPING_PENDING",text:i("item_status.pending_mapping")}]],$e=r.useMemo(()=>{switch($){case"SYNCED":return{synced:!0};case"UNSYNCED":return{synced:!1};case"MIGRATION_REQUIRED":return{mappingStatus:ge.UNPUBLISHED_MAPPING};case"MAPPING_PENDING":return{mappingStatus:ge.MISSING_MAPPING};default:return{}}},[$]),Le=r.useCallback((u,g,j,W,U)=>{const re=g.filter(b=>h[b.id]),ce=re.length,de=!!(a!=null&&a.linkedContractAddress&&(a!=null&&a.linkedContractNetwork)),O=x,K=Math.ceil(O/L),me=(a==null?void 0:a.itemCount)===0;return a?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:_.header,children:[e.jsx(Ms,{absolute:!0,onClick:De}),e.jsxs("div",{className:_.content,children:[e.jsxs("div",{className:_.title,children:[e.jsx(Us,{collectionId:a.id}),e.jsxs("div",{className:_.nameAndType,children:[e.jsxs("div",{className:_.nameWrapper,children:[e.jsx(n.Header,{size:"large",className:_.name,onClick:Pe,children:a.name}),!a.isPublished&&e.jsx(ms,{name:"edit",className:_.editCollectionName})]}),e.jsxs("div",{className:_.type,children:[e.jsx(Ts,{isThirdParty:!0}),e.jsx($s,{isProgrammatic:u.isProgrammatic})]})]})]}),e.jsxs("div",{className:_.actions,children:[a.linkedContractAddress&&a.linkedContractNetwork&&e.jsxs(xe,{title:i("third_party_collection_detail_page.smart_contract_address_short"),info:i("third_party_collection_detail_page.smart_contract_address_long"),children:[_s(a.linkedContractAddress)," ",e.jsx(us,{className:_.copyButton,showPopup:!0,text:a.linkedContractAddress,role:"button",children:e.jsx(n.Icon,{name:"copy outline"})})]}),!v&&e.jsxs(xe,{title:i("third_party_collection_detail_page.slots_short"),info:i("third_party_collection_detail_page.slots_long"),children:[e.jsx("div",{className:_.slotsIcon}),y?e.jsx(n.Loader,{active:!0,inline:!0,size:"tiny"}):e.jsxs("span",{children:[u.availableSlots??0," / ",u.maxItems]})]}),e.jsxs(n.Button,{inverted:!0,onClick:Se,children:[e.jsx(n.Icon,{name:"plus"}),i("third_party_collection_detail_page.new_items")]}),u.availableSlots!==void 0?e.jsx(Qs,{collection:a,items:re,slots:u.availableSlots}):null,e.jsx(Vs,{collection:a,items:j})]})]})]}),!a.isMappingComplete&&e.jsxs("div",{className:_.migrationBanner,children:[e.jsx(n.Icon,{name:"sync"})," ",i("third_party_collection_detail_page.migration_banner")]}),e.jsx("div",{className:_.body,children:W?e.jsx("div",{className:_.loader,children:e.jsx(n.Loader,{size:"massive",inline:!0,active:!0})}):e.jsxs(e.Fragment,{children:[(a.itemCount??0)>0&&e.jsxs("div",{className:_.searchContainer,children:[j.length>0&&e.jsx("div",{className:_.searchInfo,children:i("third_party_collection_detail_page.search_info",{page:(w-1)*L+1,pageTotal:Math.min(O,w*L),total:O})}),e.jsx(n.Dropdown,{className:_.syncedStatusList,direction:"left",value:$,options:Te,onChange:le})]}),j.length?e.jsxs(e.Fragment,{children:[ce>0?e.jsxs("div",{className:_.selectionInfo,children:[i("third_party_collection_detail_page.selection",{count:ce})," ",e.jsx("span",{className:"link",onClick:ie,children:i("third_party_collection_detail_page.clear_selection")}),".  ",Z&&K>1?e.jsx("span",{className:"link",onClick:()=>Me(U),children:i("third_party_collection_detail_page.select_all",{total:O})}):null," "]}):null,e.jsxs("div",{children:[N&&de?e.jsx(Zt,{areAllSelected:R(j),onSelectedAllClick:(b,X)=>ae(j,X)}):e.jsx(zt,{areAllSelected:R(j),onSelectedAllClick:(b,X)=>ae(j,X)}),j.map(b=>N&&de?e.jsx(Wt,{collection:a,item:b,selected:!!h[b.id],onSelect:Q},b.id):e.jsx(ut,{collection:a,item:b,selected:!!h[b.id],onSelect:Q},b.id)),K>1?e.jsx(n.Pagination,{firstItem:null,lastItem:null,totalPages:K,activePage:w,onPageChange:Ee}):null]})]}):e.jsxs("div",{className:_.empty,children:[e.jsx("div",{className:me?_.start:_.sparkles}),me?e.jsxs(e.Fragment,{children:[e.jsx("h3",{children:i("third_party_collection_detail_page.start_adding_items")}),e.jsx("p",{children:i("third_party_collection_detail_page.cant_remove")})]}):e.jsxs(e.Fragment,{children:[e.jsx("h3",{children:i("third_party_collection_detail_page.not_found")}),e.jsx("p",{children:i("third_party_collection_detail_page.try_again")})]})]})]})})]}):(console.error("No collection defined"),null)},[a,h,y,v,N,x,w,Q,R,le,ie,$]),Be=oe&&a;return e.jsx(Ds,{id:a==null?void 0:a.id,itemsPage:w,itemsPageSize:L,fetchCollectionItemsOptions:$e,children:({isLoadingCollection:u,isLoadingCollectionItems:g,items:j,paginatedItems:W,onFetchCollectionItemsPages:U})=>e.jsx(Ps,{className:_.main,hasNavigation:!oe&&!p&&!u,isLoading:p||u,children:Be&&l?Le(l,j,W,g,U):e.jsx(Es,{})})})}const Pn=s=>{var N;const t=gs(s)||"",o=je(s,t),l=o?he(o):!1,c=((N=pe(s,t))==null?void 0:N.total)||null,a=o?hs(s,o.id):[],x=o&&pe(s,o.id)||null,p=Number(ps(s).query.page??1);return{items:a,totalItems:c,currentPage:p,paginatedData:x,wallet:Cs(s),collection:o,isThirdPartyV2Enabled:xs(s),isLinkedWearablesPaymentsEnabled:Ne(s),thirdParty:o&&he(o)?js(s,o):null,authorizations:Is(s),isLoading:Ie(Ns(s),ws)||fs(s)||!!(l&&o&&ks(s,we(o.urn))),isLoadingAvailableSlots:ys(s),lastLocation:Ss(s)}},Dn=s=>({onNewItem:t=>s(D("CreateItemsModal",{collectionId:t})),onEditName:t=>s(D("EditCollectionNameModal",{collection:t})),onFetchAvailableSlots:t=>s(bs(t)),onFetchThirdParty:t=>s(vs(t))}),Hn=B(Pn,Dn)(Sn);export{Hn as default};
1
+ import{H as e,g0 as Ae,g1 as Ge,a1 as V,dB as Re,M as n,N as B,fb as je,Z as Y,eZ as We,G as i,fK as Ue,eR as ee,g2 as Oe,cC as He,X as D,et as ze,g3 as Fe,fW as qe,bw as Ie,fY as Ve,eE as Ne,g4 as Ye,f_ as Ze,D as r,K as M,g5 as Ke,g6 as Qe,eO as T,dC as fe,ep as Je,g7 as Xe,bu as ke,L as ye,fc as be,eo as ve,er as _e,g8 as es,g9 as ue,ga as ss,gb as ts,gc as ns,gd as as,ge as is,ff as os,gf as ls,gg as we,eu as rs,gh as cs,gi as ds,gj as ge,J as ms,cA as _s,cB as us,fO as gs,eP as he,ez as pe,fq as hs,aN as ps,e8 as Cs,gk as xs,gl as js,gm as Is,eC as Ns,gn as fs,go as ks,gp as ys,gq as bs,gr as vs,fS as ws}from"./index-Co91-zEg.js";import{g as Ss}from"./selector-CtnQnmhq.js";import{L as Ps}from"./LoggedInDetailPage.container-DzlaFDdE.js";import{C as Ds}from"./CollectionProvider.container-DDSUVcDe.js";import{N as Es}from"./NotFound-BiVAKBxy.js";import{B as Ts}from"./Back-vJO5KaRC.js";import{C as Ms,T as $s}from"./ThirdPartyKindBadge-OAN3xi1b.js";import{C as se}from"./ConfirmDelete-CKGaLGSN.js";import"./Navigation.container-D1FZTUzP.js";import"./selectors-skzFLW_U.js";import"./SignInRequired-CyBpNy0X.js";const Ls=s=>e.jsx("img",{"data-testid":Ae,src:Ge[s.network],alt:s.network,className:s.className}),Bs="_image_142g7_1",As="_main_142g7_2",Gs="_network_142g7_13",z={image:Bs,main:As,network:Gs},Rs=s=>{const{collection:t,collectionId:o,className:l,shape:c}=s;return e.jsxs("div",{className:V(z.main,l),children:[t!=null&&t.itemCount?e.jsx(Re,{collectionId:o,className:z.image}):e.jsx(n.Blockie,{className:z.image,seed:o,size:8,scale:8,shape:c??"circle"}),t!=null&&t.linkedContractNetwork?e.jsx(Ls,{network:t==null?void 0:t.linkedContractNetwork,className:z.network}):null]})},Ws=(s,t)=>({collection:je(s,t.collectionId)}),Us=B(Ws)(Rs),Os="_ellipsis_4huv2_1",Ce={ellipsis:Os},Hs=s=>{const{collection:t}=s,o=Y(),l=()=>{t.isPublished&&t.forumLink&&v(t.forumLink,"_blank")},c=()=>{const{items:m,onOpenModal:d}=s;d("SeeInWorldModal",{itemIds:m.map(k=>k.id)})},a=()=>{const{collection:m,items:d}=s;o.push(Ue(m,d),{fromParam:ee.TP_COLLECTIONS})},x=()=>{const{collection:m,onDelete:d}=s;d(m)},p=()=>{const{collection:m,onOpenModal:d}=s;m.isPublished||d("EditCollectionURNModal",{collection:m})},N=()=>{const{collection:m,onOpenModal:d}=s;d("CreateAndEditMultipleItemsModal",{collectionId:m.id,type:Oe.EDIT})},v=(m,d="")=>{const k=window.open(m,d);k&&k.focus()},f=!We(t)&&!t.isPublished;return e.jsx(n.Dropdown,{className:Ce.dropdown,trigger:e.jsx(n.Button,{basic:!0,children:e.jsx(n.Icon,{className:Ce.ellipsis,size:"large",name:"ellipsis horizontal"})}),inline:!0,direction:"left",children:e.jsxs(n.Dropdown.Menu,{children:[e.jsx(n.Dropdown.Item,{text:i("collection_context_menu.see_in_decentraland"),onClick:c}),e.jsx(n.Dropdown.Item,{text:i("global.open_in_editor"),onClick:a}),e.jsx(n.Popup,{content:i("collection_context_menu.delete_published_collection"),position:"right center",disabled:f,trigger:f?e.jsx(se,{name:t.name,onDelete:x,trigger:e.jsx(n.Dropdown.Item,{text:i("global.delete")})}):e.jsx(n.Dropdown.Item,{text:i("global.delete"),disabled:!0}),hideOnScroll:!0,on:"hover",inverted:!0}),e.jsx(n.Popup,{content:i("collection_context_menu.change_published_urn"),position:"right center",disabled:!t.isPublished,trigger:e.jsx(n.Dropdown.Item,{text:i("collection_context_menu.edit_urn"),onClick:p,disabled:t.isPublished}),hideOnScroll:!0,on:"hover",inverted:!0}),e.jsx(n.Dropdown.Item,{text:i("collection_context_menu.edit_in_bulk"),onClick:N}),e.jsx(n.Popup,{content:i("collection_context_menu.unpublished"),position:"right center",disabled:t.isPublished||!!t.forumLink,trigger:e.jsx(n.Dropdown.Item,{disabled:!t.isPublished||!t.forumLink,text:i("collection_context_menu.forum_post"),onClick:l}),hideOnScroll:!0,on:"hover",inverted:!0})]})})},zs=Hs,Fs=s=>({name:He(s)||""}),qs=s=>({onOpenModal:(t,o)=>s(D(t,o)),onDelete:t=>s(ze(t))}),Vs=B(Fs,qs)(zs),Ys=(s,t)=>{const{collection:o,items:l}=t;return{itemCurations:qe(s,o.id),isLoadingItemCurations:Ie(Ve(s),Ze),isLinkedWearablesPaymentsEnabled:Ne(s),itemsStatus:Ye(s,l.map(c=>c.id))}},Zs=s=>({onNewClick:(t,o,l)=>s(D("PublishWizardCollectionModal",{collectionId:t,itemsWithChanges:o,itemsToPublish:l})),onPushChangesClick:(t,o)=>s(D("PushChangesModal",{collectionId:t,itemsWithChanges:o})),onClick:(t,o,l)=>s(D("PublishThirdPartyCollectionModal",{collectionId:t,itemIds:o,action:l}))}),Ks=B(Ys,Zs)(Fe),Qs="_itemImage_1y9df_1",Js="_itemStatus_1y9df_10",Xs="_grid_1y9df_14",et="_row_1y9df_25",st="_column_1y9df_30",tt="_statusColumn_1y9df_34",nt="_synced_1y9df_39",at="_unsynced_1y9df_43",it="_avatarColumn_1y9df_47",ot="_nameWrapper_1y9df_52",lt="_name_1y9df_52",rt="_itemActions_1y9df_65",ct="_action_1y9df_72",C={itemImage:Qs,itemStatus:Js,grid:Xs,row:et,column:st,statusColumn:tt,synced:nt,unsynced:at,avatarColumn:it,nameWrapper:ot,name:lt,itemActions:rt,action:ct};function dt({item:s,status:t,selected:o,onSelect:l,onOpenModal:c,onDelete:a}){const x=Y(),p=r.useCallback((h,P)=>{l(s,P.checked)},[s,l]),N=r.useCallback(()=>{c("SeeInWorldModal",{itemIds:[s.id]})},[s,c]),v=r.useCallback(()=>{s.isPublished||c("EditItemURNModal",{item:s})},[s,c]),f=r.useCallback(()=>{x.push(M.itemEditor({itemId:s.id,collectionId:s.collectionId}),{fromParam:ee.TP_COLLECTIONS})},[s,x]),m=r.useCallback(()=>{a(s)},[a,s]),d=r.useMemo(()=>{if(!s.urn)return"";try{const h=Ke(s.urn);return Qe(h)?h.thirdPartyTokenId??"":""}catch{return""}},[s]),k=r.useMemo(()=>{switch(t){case T.UNDER_REVIEW:return e.jsx(n.Icon,{name:"clock outline"});case T.SYNCED:return e.jsx(n.Icon,{name:"check circle outline"});case T.UNSYNCED:return e.jsx(n.Icon,{name:"exclamation circle"});default:return null}},[t]),y=s.data;return e.jsx(n.Grid,{className:`CollectionItem ${C.grid}`,columns:"equal",children:e.jsxs(n.Grid.Row,{className:C.row,children:[e.jsxs(n.Grid.Column,{className:`${C.column} ${C.avatarColumn}`,width:5,children:[e.jsx(n.Checkbox,{checked:o,disabled:s.isPublished,onClick:p}),e.jsx(fe,{className:C.itemImage,item:s,hasBadge:!0,badgeSize:"small"}),e.jsx("div",{className:C.nameWrapper,children:e.jsxs("div",{className:C.name,title:s.name,children:[e.jsx(Je,{className:C.itemStatus,item:s}),s.name]})})]}),e.jsx(n.Grid.Column,{className:C.column,children:y.category?e.jsx("div",{children:i(`wearable.category.${y.category}`)}):null}),e.jsx(n.Grid.Column,{className:C.column,children:e.jsx("div",{children:i(`body_shapes.${Xe(s)}`)})}),e.jsx(n.Grid.Column,{className:C.column,children:e.jsx("div",{children:d})}),e.jsxs(n.Grid.Column,{width:3,className:`${C.column} ${C.statusColumn} ${C[t]}`,children:[k,e.jsx("div",{children:i(`third_party_collection_detail_page.synced_statuses.${t}`)})]}),e.jsx(n.Grid.Column,{width:1,className:C.column,children:e.jsx("div",{className:C.itemActions,children:e.jsx(n.Dropdown,{trigger:e.jsx(n.Button,{basic:!0,children:e.jsx(n.Icon,{name:"ellipsis horizontal"})}),inline:!0,direction:"left",className:C.action,onClick:ke(),children:e.jsxs(n.Dropdown.Menu,{children:[e.jsx(n.Dropdown.Item,{text:i("collection_item.see_details"),as:ye,to:M.itemDetail(s.id)}),e.jsx(n.Dropdown.Item,{text:i("collection_context_menu.see_in_decentraland"),onClick:N}),e.jsx(n.Dropdown.Item,{text:i("global.open_in_editor"),onClick:f}),e.jsx(n.Popup,{content:i("collection_item.cannot_edit_urn"),position:"right center",disabled:!s.isPublished,trigger:e.jsx(n.Dropdown.Item,{text:i("collection_item.edit_urn"),onClick:v,disabled:s.isPublished}),hideOnScroll:!0,on:"hover",inverted:!0,flowing:!0}),!s.isPublished&&e.jsx(se,{name:s.name,onDelete:m,trigger:e.jsx(n.Dropdown.Item,{text:i("global.delete")})})]})})})})]})})}const mt=(s,t)=>({status:be(s)[t.item.id]}),_t=s=>({onDelete:t=>s(ve(t)),onOpenModal:(t,o)=>s(D(t,o))}),ut=B(mt,_t)(dt),gt="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_8524_427)'%3e%3cpath%20d='M20.5%203L20.34%203.03L15%205.1L9%203L3.36%204.9C3.15%204.97%203%205.15%203%205.38V20.5C3%2020.78%203.22%2021%203.5%2021L3.66%2020.97L9%2018.9L15%2021L20.64%2019.1C20.85%2019.03%2021%2018.85%2021%2018.62V3.5C21%203.22%2020.78%203%2020.5%203ZM15%2019L9%2016.89V5L15%207.11V19Z'%20fill='%23A09BA8'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_8524_427'%3e%3crect%20width='24'%20height='24'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",ht="data:image/svg+xml,%3csvg%20width='12'%20height='12'%20viewBox='0%200%2012%2012'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10.669%200H1.33362C0.593463%200%200%200.600131%200%201.33362V10.669C0%2011.4025%200.593463%2012.0026%201.33362%2012.0026H10.669C11.4025%2012.0026%2012.0026%2011.4025%2012.0026%2010.669V1.33362C12.0026%200.600131%2011.4092%200%2010.669%200ZM10.669%2010.669H1.33362V2.66725H10.669V10.669ZM7.00152%206.66812C7.00152%207.22157%206.55476%207.66834%206.00131%207.66834C5.44785%207.66834%205.00109%207.22157%205.00109%206.66812C5.00109%206.11466%205.44785%205.6679%206.00131%205.6679C6.55476%205.6679%207.00152%206.11466%207.00152%206.66812ZM6.00131%204.00087C4.18091%204.00087%202.62724%205.10778%202.00044%206.66812C2.62724%208.22846%204.18091%209.33537%206.00131%209.33537C7.8217%209.33537%209.37537%208.22846%2010.0022%206.66812C9.37537%205.10778%207.8217%204.00087%206.00131%204.00087ZM6.00131%208.33515C5.08111%208.33515%204.33428%207.58832%204.33428%206.66812C4.33428%205.74792%205.08111%205.00109%206.00131%205.00109C6.92151%205.00109%207.66834%205.74792%207.66834%206.66812C7.66834%207.58832%206.92151%208.33515%206.00131%208.33515Z'%20fill='%23ECEBED'/%3e%3c/svg%3e",pt="_status_rgxu1_1",Ct="_pending_migration_rgxu1_14",xt="_synced_rgxu1_19",jt="_unpublished_rgxu1_24",It="_unsynced_rgxu1_25",Nt="_pending_mapping_rgxu1_30",ft="_under_review_rgxu1_31",kt="_icon_rgxu1_10",F={status:pt,pending_migration:Ct,synced:xt,unpublished:jt,unsynced:It,pending_mapping:Nt,under_review:ft,icon:kt},yt=s=>{const{status:t,item:o}=s,l=!o.mappings&&_e(o.urn),c=!o.isMappingComplete&&_e(o.urn),a=r.useMemo(()=>{if(l)return e.jsx("img",{src:gt,className:F.icon});if(c)return e.jsx(n.Icon,{name:"warning circle"});switch(t){case T.UNDER_REVIEW:return e.jsx("img",{src:ht,className:F.icon});case T.SYNCED:return e.jsx(n.Icon,{name:"check circle"});case T.UNSYNCED:case T.UNPUBLISHED:return e.jsx(n.Icon,{name:"cloud upload"})}},[t,l,c]),x=r.useMemo(()=>l?i("item_status.pending_mapping"):c?i("item_status.pending_migration"):i(`item_status.${t}`),[t,l,c]),p=r.useMemo(()=>l?"pending_mapping":c?"pending_migration":t,[t,l,c]);return e.jsxs("div",{className:V(F[p],F.status),children:[a," ",x]})},bt="_itemImage_1rili_1",vt="_itemStatus_1rili_10",wt="_grid_1rili_14",St="_loading_1rili_21",Pt="_row_1rili_26",Dt="_column_1rili_31",Et="_avatarColumn_1rili_35",Tt="_nameWrapper_1rili_40",Mt="_name_1rili_40",$t="_itemActions_1rili_53",Lt="_action_1rili_60",Bt="_overlay_1rili_65",I={itemImage:bt,itemStatus:vt,grid:wt,loading:St,row:Pt,column:Dt,avatarColumn:Et,nameWrapper:Tt,name:Mt,itemActions:$t,action:Lt,overlay:Bt};function At({item:s,status:t,selected:o,loading:l,collection:c,onSaveItem:a,onSelect:x,onOpenModal:p,onDelete:N}){const v=Y(),f=r.useMemo(()=>es(s),[s]),m=r.useMemo(()=>c.linkedContractAddress&&c.linkedContractNetwork?{address:c.linkedContractAddress,network:c.linkedContractNetwork}:null,[c]),[d,k]=r.useState(f),y=r.useMemo(()=>{if(d&&m){const S=ue(d,m);return ss(S)?void 0:"Invalid mapping"}},[d,m]);r.useEffect(()=>{!m||y||(!f&&d||f&&d&&!ts(f,d))&&h(d,m)},[f,y,d,m]);const h=r.useCallback(ns((S,E)=>{const $=ue(S,E);a({...s,mappings:$})},1e3),[a]),P=r.useCallback((S,E)=>{l||x(s,E.checked)},[s,l,x]),w=r.useCallback(()=>{p("SeeInWorldModal",{itemIds:[s.id]})},[s,p]),O=r.useCallback(()=>{s.isPublished||p("EditItemURNModal",{item:s})},[s,p]),Z=r.useCallback(()=>{v.push(M.itemEditor({itemId:s.id,collectionId:s.collectionId}),{fromParam:ee.TP_COLLECTIONS})},[s,v]),A=r.useCallback(()=>{N(s)},[N,s]);return e.jsxs(n.Grid,{className:V(I.grid,l&&I.loading),columns:"equal",children:[l&&e.jsx("div",{className:I.overlay,children:e.jsx(n.Loader,{size:"large",active:!0})}),e.jsxs(n.Grid.Row,{className:I.row,children:[e.jsxs(n.Grid.Column,{className:`${I.column} ${I.avatarColumn}`,width:4,children:[e.jsx(n.Checkbox,{checked:o,disabled:s.isPublished||l,onClick:P}),e.jsx(fe,{className:I.itemImage,item:s,hasBadge:!0,badgeSize:"small"}),e.jsx("div",{className:I.nameWrapper,children:e.jsx("div",{className:I.name,title:s.name,children:s.name})})]}),e.jsx(n.Grid.Column,{children:m&&e.jsx(as,{disabled:l,mapping:d,error:y,onChange:k,isCompact:!0})}),e.jsx(n.Grid.Column,{width:3,className:V(I.column,I.statusColumn),children:e.jsx(yt,{status:t,item:s})}),e.jsx(n.Grid.Column,{width:1,className:I.column,children:e.jsx("div",{className:I.itemActions,children:e.jsx(n.Dropdown,{trigger:e.jsx(n.Button,{basic:!0,children:e.jsx(n.Icon,{name:"ellipsis horizontal"})}),inline:!0,direction:"left",className:I.action,disabled:l,onClick:ke(),children:e.jsxs(n.Dropdown.Menu,{children:[e.jsx(n.Dropdown.Item,{text:i("collection_item.see_details"),as:ye,to:M.itemDetail(s.id)}),e.jsx(n.Dropdown.Item,{text:i("collection_context_menu.see_in_decentraland"),onClick:w}),e.jsx(n.Dropdown.Item,{text:i("global.open_in_editor"),onClick:Z}),e.jsx(n.Popup,{content:i("collection_item.cannot_edit_urn"),position:"right center",disabled:!s.isPublished,trigger:e.jsx(n.Dropdown.Item,{text:i("collection_item.edit_urn"),onClick:O,disabled:s.isPublished}),hideOnScroll:!0,on:"hover",inverted:!0,flowing:!0}),!s.isPublished&&e.jsx(se,{name:s.name,onDelete:A,trigger:e.jsx(n.Dropdown.Item,{text:i("global.delete")})})]})})})})]})]})}const Gt=(s,t)=>{const o=be(s);return{loading:!!is(s)[t.item.id],status:o[t.item.id]}},Rt=s=>({onDelete:t=>s(ve(t)),onSaveItem:t=>s(os(t,{},{onlySaveItem:!0})),onOpenModal:(t,o)=>s(D(t,o))}),Wt=B(Gt,Rt)(At),L=50,Ut="_itemCheckbox_2k9qa_1",Ot="_gridHeader_2k9qa_5",Ht="_itemColumn_2k9qa_15",X={itemCheckbox:Ut,gridHeader:Ot,itemColumn:Ht},zt=({areAllSelected:s,onSelectedAllClick:t})=>e.jsx(n.Grid,{columns:"equal",className:X.gridHeader,children:e.jsxs(n.Grid.Row,{children:[e.jsxs(n.Grid.Column,{width:5,className:X.itemColumn,children:[e.jsx(n.Checkbox,{className:X.itemCheckbox,checked:s,onClick:t})," ",i("global.item")]}),e.jsx(n.Grid.Column,{children:i("global.category")}),e.jsx(n.Grid.Column,{children:i("global.body_shape")}),e.jsx(n.Grid.Column,{children:"URN ID"}),e.jsxs(n.Grid.Column,{width:3,children:[" ",i("collection_row.status")," "]}),e.jsx(n.Grid.Column,{width:1})]})}),Ft="_gridHeader_4acv6_1",qt="_itemColumn_4acv6_11",Vt="_itemCheckbox_4acv6_16",Yt="_linkedToColumn_4acv6_20",q={gridHeader:Ft,itemColumn:qt,itemCheckbox:Vt,linkedToColumn:Yt},Zt=({areAllSelected:s,onSelectedAllClick:t})=>e.jsx(n.Grid,{columns:"equal",className:q.gridHeader,children:e.jsxs(n.Grid.Row,{children:[e.jsxs(n.Grid.Column,{width:4,className:q.itemColumn,children:[e.jsx(n.Checkbox,{className:q.itemCheckbox,checked:s,onClick:t})," ",i("global.item")]}),e.jsxs(n.Grid.Column,{className:q.linkedToColumn,children:[e.jsx("span",{children:i("third_party_collection_detail_page.linked_to")}),e.jsx(ls,{})]}),e.jsxs(n.Grid.Column,{width:3,children:[" ",i("collection_row.status")," "]}),e.jsx(n.Grid.Column,{width:1})]})}),Kt="_main_16i8r_3",Qt="_slots_16i8r_11",Jt="_empty_16i8r_28",Xt="_searchContainer_16i8r_32",en="_searchInfo_16i8r_42",sn="_syncedStatusList_16i8r_46",tn="_selectionInfo_16i8r_53",nn="_header_16i8r_63",an="_content_16i8r_74",on="_title_16i8r_83",ln="_editCollectionName_16i8r_96",rn="_name_16i8r_101",cn="_nameAndType_16i8r_105",dn="_nameWrapper_16i8r_115",mn="_size_16i8r_139",_n="_actions_16i8r_143",un="_body_16i8r_151",gn="_info_16i8r_162",hn="_infoHeader_16i8r_170",pn="_infoContent_16i8r_178",Cn="_slotsIcon_16i8r_195",xn="_copyButton_16i8r_207",jn="_sparkles_16i8r_232",In="_start_16i8r_241",Nn="_migrationBanner_16i8r_254",fn="_type_16i8r_277",kn="_linkedWearableBadge_16i8r_283",yn="_typeBadge_16i8r_288",bn="_programmaticBadge_16i8r_292",vn="_standardBadge_16i8r_296",wn="_loader_16i8r_302",_={main:Kt,slots:Qt,empty:Jt,searchContainer:Xt,searchInfo:en,syncedStatusList:sn,selectionInfo:tn,header:nn,content:an,title:on,editCollectionName:ln,name:rn,nameAndType:cn,nameWrapper:dn,size:mn,actions:_n,body:un,info:gn,infoHeader:hn,infoContent:pn,slotsIcon:Cn,copyButton:xn,sparkles:jn,start:In,migrationBanner:Nn,type:fn,linkedWearableBadge:kn,typeBadge:yn,programmaticBadge:bn,standardBadge:vn,loader:wn},xe=({children:s,title:t,info:o})=>e.jsxs("div",{className:_.info,children:[e.jsxs("div",{className:_.infoHeader,children:[t," ",o&&e.jsx(n.InfoTooltip,{content:o})]}),e.jsx("div",{className:_.infoContent,children:s})]});function Sn({currentPage:s,lastLocation:t,wallet:o,thirdParty:l,items:c,collection:a,totalItems:x,isLoading:p,isThirdPartyV2Enabled:N,isLinkedWearablesPaymentsEnabled:v,onFetchAvailableSlots:f,onFetchThirdParty:m,onNewItem:d,onEditName:k,isLoadingAvailableSlots:y}){const[h,P]=r.useState({}),[w,O]=r.useState(s),[Z,A]=r.useState(!1),[S,E]=r.useState(!1),[$,te]=r.useState("ALL"),G=Y(),ne=t===M.collections();r.useEffect(()=>{l&&l.availableSlots===void 0&&!y&&f(l.id)},[l,y,f]),r.useEffect(()=>{!p&&!l&&(a!=null&&a.urn)&&m(we(a.urn))},[a==null?void 0:a.urn,p,l]),r.useEffect(()=>{if(s!==w&&O(s),S){const u=c.reduce((g,j)=>(g[j.id]=!0,g),{});P(u),A(!1)}},[w,S,c,l,s]);const Se=r.useCallback(()=>{a!=null&&a.id&&d(a.id)},[a==null?void 0:a.id,d]),Pe=r.useCallback(()=>{a&&k(a)},[a,k]),De=r.useCallback(()=>{ne?G.goBack():G.push(M.collections(rs.THIRD_PARTY))},[G,ne]),Ee=r.useCallback((u,g)=>{O(+g.activePage),G.push(M.thirdPartyCollectionDetail(a.id,{page:+g.activePage}))},[a,G]),K=r.useCallback((u,g)=>{P({...h,[u.id]:g}),E(!1),A(!1)},[h]),R=r.useCallback(u=>u.every(g=>h[g.id]),[h]),ae=r.useCallback((u,g)=>{const j={...h},W=!R(u);for(const U of u)j[U.id]=W;P(j),A(!0),E(S&&!!g.checked)},[h,S,R]),ie=r.useCallback(()=>{P({})},[]),oe=r.useMemo(()=>a&&l&&o&&cs(o.address,l),[a,l,o]),Te=r.useCallback(u=>{if(E(!0),a){const g=Math.ceil(x/L);u(a.id,{page:ds(g),limit:L,overridePaginationData:!1})}},[x]),le=r.useCallback((u,{value:g})=>{te(g)},[te]),Me=[{value:"ALL",text:i("third_party_collection_detail_page.synced_filter.all")},{value:"SYNCED",text:i("item_status.synced")},{value:"UNSYNCED",text:i("item_status.unsynced")},...a!=null&&a.isMappingComplete?[]:[{value:"MIGRATION_REQUIRED",text:i("item_status.pending_migration")},{value:"MAPPING_PENDING",text:i("item_status.pending_mapping")}]],$e=r.useMemo(()=>{switch($){case"SYNCED":return{synced:!0};case"UNSYNCED":return{synced:!1};case"MIGRATION_REQUIRED":return{mappingStatus:ge.UNPUBLISHED_MAPPING};case"MAPPING_PENDING":return{mappingStatus:ge.MISSING_MAPPING};default:return{}}},[$]),Le=r.useCallback((u,g,j,W,U)=>{const re=g.filter(b=>h[b.id]),ce=re.length,de=!!(a!=null&&a.linkedContractAddress&&(a!=null&&a.linkedContractNetwork)),H=x,Q=Math.ceil(H/L),me=(a==null?void 0:a.itemCount)===0;return a?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:_.header,children:[e.jsx(Ts,{absolute:!0,onClick:De}),e.jsxs("div",{className:_.content,children:[e.jsxs("div",{className:_.title,children:[e.jsx(Us,{collectionId:a.id}),e.jsxs("div",{className:_.nameAndType,children:[e.jsxs("div",{className:_.nameWrapper,children:[e.jsx(n.Header,{size:"large",className:_.name,onClick:Pe,children:a.name}),!a.isPublished&&e.jsx(ms,{name:"edit",className:_.editCollectionName})]}),e.jsxs("div",{className:_.type,children:[e.jsx(Ms,{isThirdParty:!0}),e.jsx($s,{isProgrammatic:u.isProgrammatic})]})]})]}),e.jsxs("div",{className:_.actions,children:[a.linkedContractAddress&&a.linkedContractNetwork&&e.jsxs(xe,{title:i("third_party_collection_detail_page.smart_contract_address_short"),info:i("third_party_collection_detail_page.smart_contract_address_long"),children:[_s(a.linkedContractAddress)," ",e.jsx(us,{className:_.copyButton,showPopup:!0,text:a.linkedContractAddress,role:"button",children:e.jsx(n.Icon,{name:"copy outline"})})]}),!v&&e.jsxs(xe,{title:i("third_party_collection_detail_page.slots_short"),info:i("third_party_collection_detail_page.slots_long"),children:[e.jsx("div",{className:_.slotsIcon}),y?e.jsx(n.Loader,{active:!0,inline:!0,size:"tiny"}):e.jsxs("span",{children:[u.availableSlots??0," / ",u.maxItems]})]}),e.jsxs(n.Button,{inverted:!0,onClick:Se,children:[e.jsx(n.Icon,{name:"plus"}),i("third_party_collection_detail_page.new_items")]}),u.availableSlots!==void 0?e.jsx(Ks,{collection:a,items:re,slots:u.availableSlots}):null,e.jsx(Vs,{collection:a,items:j})]})]})]}),!a.isMappingComplete&&e.jsxs("div",{className:_.migrationBanner,children:[e.jsx(n.Icon,{name:"sync"})," ",i("third_party_collection_detail_page.migration_banner")]}),e.jsx("div",{className:_.body,children:W?e.jsx("div",{className:_.loader,children:e.jsx(n.Loader,{size:"massive",inline:!0,active:!0})}):e.jsxs(e.Fragment,{children:[(a.itemCount??0)>0&&e.jsxs("div",{className:_.searchContainer,children:[j.length>0&&e.jsx("div",{className:_.searchInfo,children:i("third_party_collection_detail_page.search_info",{page:(w-1)*L+1,pageTotal:Math.min(H,w*L),total:H})}),e.jsx(n.Dropdown,{className:_.syncedStatusList,direction:"left",value:$,options:Me,onChange:le})]}),j.length?e.jsxs(e.Fragment,{children:[ce>0?e.jsxs("div",{className:_.selectionInfo,children:[i("third_party_collection_detail_page.selection",{count:ce})," ",e.jsx("span",{className:"link",onClick:ie,children:i("third_party_collection_detail_page.clear_selection")}),".  ",Z&&Q>1?e.jsx("span",{className:"link",onClick:()=>Te(U),children:i("third_party_collection_detail_page.select_all",{total:H})}):null," "]}):null,e.jsxs("div",{children:[N&&de?e.jsx(Zt,{areAllSelected:R(j),onSelectedAllClick:(b,J)=>ae(j,J)}):e.jsx(zt,{areAllSelected:R(j),onSelectedAllClick:(b,J)=>ae(j,J)}),j.map(b=>N&&de?e.jsx(Wt,{collection:a,item:b,selected:!!h[b.id],onSelect:K},b.id):e.jsx(ut,{collection:a,item:b,selected:!!h[b.id],onSelect:K},b.id)),Q>1?e.jsx(n.Pagination,{firstItem:null,lastItem:null,totalPages:Q,activePage:w,onPageChange:Ee}):null]})]}):e.jsxs("div",{className:_.empty,children:[e.jsx("div",{className:me?_.start:_.sparkles}),me?e.jsxs(e.Fragment,{children:[e.jsx("h3",{children:i("third_party_collection_detail_page.start_adding_items")}),e.jsx("p",{children:i("third_party_collection_detail_page.cant_remove")})]}):e.jsxs(e.Fragment,{children:[e.jsx("h3",{children:i("third_party_collection_detail_page.not_found")}),e.jsx("p",{children:i("third_party_collection_detail_page.try_again")})]})]})]})})]}):(console.error("No collection defined"),null)},[a,h,y,v,N,x,w,K,R,le,ie,$]),Be=oe&&a;return e.jsx(Ds,{id:a==null?void 0:a.id,itemsPage:w,itemsPageSize:L,fetchCollectionItemsOptions:$e,children:({isLoadingCollection:u,isLoadingCollectionItems:g,items:j,paginatedItems:W,onFetchCollectionItemsPages:U})=>e.jsx(Ps,{className:_.main,hasNavigation:!oe&&!p&&!u,isLoading:p||u,children:Be&&l?Le(l,j,W,g,U):e.jsx(Es,{})})})}const Pn=s=>{var N;const t=gs(s)||"",o=je(s,t),l=o?he(o):!1,c=((N=pe(s,t))==null?void 0:N.total)||null,a=o?hs(s,o.id):[],x=o&&pe(s,o.id)||null,p=Number(ps(s).query.page??1);return{items:a,totalItems:c,currentPage:p,paginatedData:x,wallet:Cs(s),collection:o,isThirdPartyV2Enabled:xs(s),isLinkedWearablesPaymentsEnabled:Ne(s),thirdParty:o&&he(o)?js(s,o):null,authorizations:Is(s),isLoading:Ie(Ns(s),ws)||fs(s)||!!(l&&o&&ks(s,we(o.urn))),isLoadingAvailableSlots:ys(s),lastLocation:Ss(s)}},Dn=s=>({onNewItem:t=>s(D("CreateItemsModal",{collectionId:t})),onEditName:t=>s(D("EditCollectionNameModal",{collection:t})),onFetchAvailableSlots:t=>s(bs(t)),onFetchThirdParty:t=>s(vs(t))}),On=B(Pn,Dn)(Sn);export{On as default};
@@ -1 +1 @@
1
- import{af as b,Z as k,D as o,K as T,H as e,ah as C,M as s,aj as f,bl as w,G as l,N as D,hK as S,hI as L,O as y,bw as E,b3 as P,X as R,Y as M,Q as v,ek as F}from"./index-VXGnlWrX.js";import{N as I}from"./NotFound-Cp2AS0S2.js";const H=n=>{const{template:a,isLoading:t,scene:c,onOpenModal:i,onLoadTemplateScene:m}=n,u=k(),r=w(),d=o.useMemo(()=>({id:a==null?void 0:a.id,name:a==null?void 0:a.title,description:a==null?void 0:a.description}),[a]);o.useEffect(()=>{a&&!c&&m(a)},[a,c,m]);const x=()=>e.jsx(s.Center,{children:e.jsx(s.Loader,{active:!0,size:"large"})}),j=()=>e.jsx(I,{}),h=o.useCallback(()=>{r.track("Download Template",d),i("ExportModal",{project:a})},[r,a,d,i]),g=o.useCallback(()=>{u.push(T.templates())},[u]),_=o.useCallback(()=>{a&&(r.track("Select Template",d),i("CloneTemplateModal",{template:a}))},[r,a,d,i]),N=p=>e.jsxs(e.Fragment,{children:[e.jsx(s.Section,{size:"large",children:e.jsx(s.Row,{children:e.jsx(s.Column,{children:e.jsx(s.Row,{children:e.jsxs("div",{className:"title-container",children:[e.jsx(s.Button,{className:"back-button",basic:!0,icon:e.jsx(s.Icon,{name:"arrow alternate circle left outline"}),onClick:g,"aria-label":l("templates_page.back_to_scenes")}),e.jsx(s.Header,{className:"name",children:p.title})]})})})})}),e.jsx(s.Section,{children:e.jsx("div",{className:"header-image",style:{backgroundImage:`url(${p.thumbnail})`}})}),e.jsxs(s.Section,{children:[e.jsxs(s.Row,{className:"content info-container",children:[e.jsxs(s.Column,{className:"creator-container",children:[e.jsx(s.Header,{children:l("template_detail_page.creator")}),e.jsxs("p",{className:"description-content",children:[e.jsx(s.Logo,{})," Decentraland",e.jsx("br",{}),"Foundation"]})]}),e.jsxs(s.Column,{className:"description-container",children:[e.jsx(s.Header,{children:l("template_detail_page.description")}),e.jsx("p",{className:"description-content",children:p.description})]}),e.jsxs(s.Column,{className:"action-buttons-container",children:[e.jsx(s.Button,{primary:!0,className:"select-button",onClick:_,children:l("template_detail_page.select_template")}),e.jsx(s.Button,{inverted:!0,className:"download-button",onClick:h,children:l("template_detail_page.download_scene")})]})]}),e.jsx(s.Row,{className:"content",children:e.jsxs(s.Column,{className:"scene-details-container",children:[e.jsx(s.Header,{children:l("template_detail_page.scene_details")}),e.jsx("p",{className:"description-content world",children:l("template_detail_page.built_for_world")}),e.jsx("p",{className:"description-content size-scene",children:l("template_detail_page.parcels",{...p.layout})}),e.jsx("p",{className:"description-content personalize-content",children:l("template_detail_page.personalize_it_yourself")}),c&&e.jsx("p",{className:"description-content sdk",children:c!=null&&c.sdk6?"SDK 6":"SDK 7"})]})})]})]});return e.jsxs(e.Fragment,{children:[e.jsx(C,{}),e.jsxs(s.Page,{className:"TemplateDetailPage",isFullscreen:!0,children:[t&&!a?x():null,!t&&!a?j():null,a?N(a):null]}),e.jsx(f,{})]})},z=b.memo(H),O=n=>{const a=S(n),t=a&&L(n)[a],c=t?y(n)[t.sceneId]:null;return{template:t||null,scene:c,isLoading:E(P(n),F)}},B=n=>({onOpenModal:(a,t)=>n(R(a,t)),onLoadTemplateScene:a=>n(M(a,v.TEMPLATE))}),$=D(O,B)(z);export{$ as default};
1
+ import{af as b,Z as T,D as o,K as k,H as e,ah as C,M as s,aj as f,bl as w,G as l,N as D,hM as S,hK as L,O as y,bw as E,b3 as P,X as M,Y as R,Q as v,em as F}from"./index-Co91-zEg.js";import{N as H}from"./NotFound-BiVAKBxy.js";const I=n=>{const{template:a,isLoading:t,scene:c,onOpenModal:i,onLoadTemplateScene:m}=n,u=T(),r=w(),d=o.useMemo(()=>({id:a==null?void 0:a.id,name:a==null?void 0:a.title,description:a==null?void 0:a.description}),[a]);o.useEffect(()=>{a&&!c&&m(a)},[a,c,m]);const x=()=>e.jsx(s.Center,{children:e.jsx(s.Loader,{active:!0,size:"large"})}),j=()=>e.jsx(H,{}),h=o.useCallback(()=>{r.track("Download Template",d),i("ExportModal",{project:a})},[r,a,d,i]),g=o.useCallback(()=>{u.push(k.templates())},[u]),_=o.useCallback(()=>{a&&(r.track("Select Template",d),i("CloneTemplateModal",{template:a}))},[r,a,d,i]),N=p=>e.jsxs(e.Fragment,{children:[e.jsx(s.Section,{size:"large",children:e.jsx(s.Row,{children:e.jsx(s.Column,{children:e.jsx(s.Row,{children:e.jsxs("div",{className:"title-container",children:[e.jsx(s.Button,{className:"back-button",basic:!0,icon:e.jsx(s.Icon,{name:"arrow alternate circle left outline"}),onClick:g,"aria-label":l("templates_page.back_to_scenes")}),e.jsx(s.Header,{className:"name",children:p.title})]})})})})}),e.jsx(s.Section,{children:e.jsx("div",{className:"header-image",style:{backgroundImage:`url(${p.thumbnail})`}})}),e.jsxs(s.Section,{children:[e.jsxs(s.Row,{className:"content info-container",children:[e.jsxs(s.Column,{className:"creator-container",children:[e.jsx(s.Header,{children:l("template_detail_page.creator")}),e.jsxs("p",{className:"description-content",children:[e.jsx(s.Logo,{})," Decentraland",e.jsx("br",{}),"Foundation"]})]}),e.jsxs(s.Column,{className:"description-container",children:[e.jsx(s.Header,{children:l("template_detail_page.description")}),e.jsx("p",{className:"description-content",children:p.description})]}),e.jsxs(s.Column,{className:"action-buttons-container",children:[e.jsx(s.Button,{primary:!0,className:"select-button",onClick:_,children:l("template_detail_page.select_template")}),e.jsx(s.Button,{inverted:!0,className:"download-button",onClick:h,children:l("template_detail_page.download_scene")})]})]}),e.jsx(s.Row,{className:"content",children:e.jsxs(s.Column,{className:"scene-details-container",children:[e.jsx(s.Header,{children:l("template_detail_page.scene_details")}),e.jsx("p",{className:"description-content world",children:l("template_detail_page.built_for_world")}),e.jsx("p",{className:"description-content size-scene",children:l("template_detail_page.parcels",{...p.layout})}),e.jsx("p",{className:"description-content personalize-content",children:l("template_detail_page.personalize_it_yourself")}),c&&e.jsx("p",{className:"description-content sdk",children:c!=null&&c.sdk6?"SDK 6":"SDK 7"})]})})]})]});return e.jsxs(e.Fragment,{children:[e.jsx(C,{}),e.jsxs(s.Page,{className:"TemplateDetailPage",isFullscreen:!0,children:[t&&!a?x():null,!t&&!a?j():null,a?N(a):null]}),e.jsx(f,{})]})},z=b.memo(I),O=n=>{const a=S(n),t=a&&L(n)[a],c=t?y(n)[t.sceneId]:null;return{template:t||null,scene:c,isLoading:E(P(n),F)}},B=n=>({onOpenModal:(a,t)=>n(M(a,t)),onLoadTemplateScene:a=>n(R(a,v.TEMPLATE))}),$=D(O,B)(z);export{$ as default};