PageSourceSearch

https://studio.moises.ai/assets/HomeGate-BoDonEDP.js

js moises.ai collected 2026-09-24 08:53:55 UTC 37,027 bytes, 1,222 lines download raw bytes

1import { d as V, j as a, r as L, a as Ce } from "./react-_8SPL4h_.js";
2import { d4 as F, j as B, d6 as Z, W as ae, s as H, q as X, aj as Se, U as $e, d7 as le, dc as Pe, dg as Re, cQ as Ee, c_ as Ie, x as Le, L as Ae, a1 as de, de as ke, af as he, N as Te, l as qe, bP as ze, S as ue, dh as Ve, d5 as fe, a0 as Me, __tla as __tla_0 } from "./ui-D5FhdTEe.js";
3import { c as Oe, q as De, r as We, t as Fe, v as He, d as me, b as ne, w as Be, x as Ge, y as Ue, z as Ye, A as Qe, o as se, u as Ke, P as Xe, a as Je, __tla as __tla_1 } from "./index-qPXfSSwW.js";
4import { s as ge, C as Ze, __tla as __tla_2 } from "./ai-studio2-CBK5-ikX.js";
5import { c as _e, m as pe, __tla as __tla_3 } from "./daw-CRHA82Ge.js";
6import { u as et } from "./useEdgeShadows-BCf3kdzx.js";
7import "./lyric-writer-DOMCGd7S.js";
8let As, Ls;
9let __tla = Promise.all([
10  (() => {
11    try {
12      return __tla_0;
13    } catch {
14    }
15  })(),
16  (() => {
17    try {
18      return __tla_1;
19    } catch {
20    }
21  })(),
22  (() => {
23    try {
24      return __tla_2;
25    } catch {
26    }
27  })(),
28  (() => {
29    try {
30      return __tla_3;
31    } catch {
32    }
33  })()
34]).then(async () => {
35  const J = "all", ee = {
36    all: [
37      "SEPARATION",
38      "MASTERING",
39      "VOICE"
40    ],
41    play: [
42      "SEPARATION"
43    ],
44    mastering: [
45      "MASTERING"
46    ],
47    voice: [
48      "VOICE"
49    ],
50    studio: null
51  }, tt = (t) => t === "all" || t === "studio", st = async (t, e, s, c, n, r = []) => {
52    const i = s?.products ?? J, o = i in ee ? ee[i] : ee.all, l = De(e === 0 ? [] : r), f = [];
53    o && f.push(We(t, l.graphql, s, c, o)), tt(i) && f.push(ge(t, l.studio, s, c));
54    const u = await Promise.all(f), h = Fe(u.map((m) => m.data), c, 0, t), d = u.reduce((m, w) => m + w.totalCount, 0);
55    return {
56      data: h,
57      totalCount: d,
58      hasMore: e + h.length < d,
59      isLoading: false
60    };
61  }, at = async (t = 8) => {
62    await F.user.waitUntilUserIsAuthenticated();
63    const [{ recentTaskInteractions: e }, s] = await Promise.all([
64      F.graphql.query(F.queries.RECENT_TASK_INTERACTIONS, {
65        limit: t
66      }),
67      ge(t, 0, {
68        searchQuery: "",
69        scope: [
70          "MY_SONGS",
71          "SHARED_SONGS"
72        ]
73      }, {
74        field: "RECENT",
75        sort: "DESC"
76      })
77    ]);
78    return {
79      data: He(e, s.data, t)
80    };
81  }, Y = Oe("ALL", true, st), nt = "_banner_80zfu_4", ct = "_glow_8
810zfu_19", ot = "_media_80zfu_39", it = "_image_80zfu_50", rt = "_copy_80zfu_58", lt = "_title_80zfu_67", dt = "_description_80zfu_75", ht = "_cta_80zfu_80", W = {
82    banner: nt,
83    glow: ct,
84    media: ot,
85    image: it,
86    copy: rt,
87    title: lt,
88    description: dt,
89    cta: ht
90  };
91  function ut(t) {
92    const e = V.c(25), { track: s } = t, c = B(), n = Z();
93    let r;
94    e[0] !== c ? (r = null, e[0] = c, e[1] = r) : r = e[1];
95    const i = r;
96    if (!i) return null;
97    const { id: o, title: l, description: f, cta: u, image: h } = i;
98    let d;
99    e[2] !== u.path || e[3] !== o || e[4] !== n || e[5] !== s ? (d = () => {
100      s?.("banner_cta_click", {
101        event_category: "engagement",
102        banner: o
103      }), n(u.path);
104    }, e[2] = u.path, e[3] = o, e[4] = n, e[5] = s, e[6] = d) : d = e[6];
105    const m = d;
106    let w;
107    e[7] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (w = a.jsx("span", {
108      className: W.glow,
109      "aria-hidden": "true"
110    }), e[7] = w) : w = e[7];
111    let y;
112    e[8] !== h ? (y = h && a.jsx("span", {
113      className: W.media,
114      "aria-hidden": "true",
115      children: a.jsx("img", {
116        className: W.image,
117        src: h,
118        alt: "",
119        loading: "lazy"
120      })
121    }), e[8] = h, e[9] = y) : y = e[9];
122    let b;
123    e[10] !== l ? (b = a.jsx(H, {
124      as: "p",
125      className: W.title,
126      children: l
127    }), e[10] = l, e[11] = b) : b = e[11];
128    let p;
129    e[12] !== f ? (p = a.jsx(H, {
130      as: "p",
131      size: "2",
132      className: W.description,
133      children: f
134    }), e[12] = f, e[13] = p) : p = e[13];
135    let v;
136    e[14] !== u.label || e[15] !== m ? (v = a.jsx(ae, {
137      size: "2",
138      variant: "solid",
139      color: "cyan",
140      className: W.cta,
141      onClick: m,
142      children: u.label
143    }), e[14] = u.label, e[15] = m, e[16] = v) : v = e[16];
144    let g;
145    e[17] !== b || e[18] !== p || e[19] !== v ? (g = a.jsxs("div", {
146      className: W.copy,
147      children: [
148        b,
149        p,
150        v
151      ]
152    }), e[17] = b, e[18] = p, e[19] = v, e[20] = g) : g = e[20];
153    let _;
154    return e[21] !== y || e[22] !== g || e[23] !== l ? (_ = a.jsxs("section", {
155      className: W.banner,
156      "aria-label": l,
157      children: [
158        w,
159        y,
160        g
161      ]
162    }), e[21] = y, e[22] = g, e[23] = l, e[24] = _) : _ = e[24], _;
163  }
164  const ft = "_page_2q5zm_4", mt = "_topSections_2q5zm_15", gt = "_chips_2q5zm_46", _t = "_ghost_2q5zm_59", pt = "_chip_2q5zm_46", Q = {
165    page: ft,
166    topSections: mt,
167    chips: gt,
168    ghost: _t,
169    chip: pt
170  }, bt = "_headingRow_149pq_6", wt = "_rowViewport_149pq_12", yt = "_row_149pq_10", vt = "_rowTrack_149pq_35", jt = "_shadow_149pq_41", xt = "_shadowVisible_149pq_49", Nt = "_shadowLeft_149pq_56", Ct = "_shadowRight_149pq_68", St = "_pager_149pq_82", $t = "_pagerVisible_149pq_104", Pt = "_pagerLeft_149pq_114", Rt = "_pagerRight_149pq_118", z = {
171    headingRow: bt,
172    rowViewport: wt,
173    row: yt,
174    rowTrack: vt,
175    shadow: jt,
176    shadowVisible: xt,
177    shadowLeft: Nt,
178    shadowRight: Ct,
179    pager: St,
180    pagerVisible: $t,
181    pagerLeft: Pt,
182    pagerRight: Rt
183  }, Et = 16;
184  function be(t) {
185    const e = V.c(49), { heading: s, getScrollStep: c, children: n } = t, r = B([
186      {
187        $_hash: "4c2fb139351a9db3",
188        message: "Scroll left"
189      },
190      {
191        $_hash: "5cdf03652d35d964",
192        message: "Scroll right"
193      }
194    ]), i = L.useRef(null), [o, l] = L.useState(null), [f, u] = L.useState(false), h = me("(hover: hover)"), d = et(o);
195    let m, w;
196    e[0] !== o ? (m = () => {
197      const $ = i.current;
198      if (!$ || !o) return;
199      const N = (j) => {
200        if (j.ctrlKey || Math.abs(j.deltaX) > Math.abs(j.deltaY)) return;
201        const A = j.deltaY * (j.deltaMode === 1 ? Et : 1), T = Math.max(0, o.scrollWidth - o.clientWidth), q = Math.max(0, Math.min(T, o.scrollLeft + A));
202        q !== o.scrollLeft && (j.preventDefault(), o.scrollLeft = q);
203      };
204      return $.addEventListener("wheel", N, {
205        passive: false
206      }), () => $.removeEventListener("wheel", N);
207    }, w = [
208      o
209    ], e[0] = o, e[1] = m, e[2] = w) : (m = e[1], w = e[2]), L.useEffect(m, w);
210    let y;
211    e[3] !== c || e[4] !== o ? (y = ($) => {
212      o?.scrollBy({
213        left: $ * c(o),
214        behavior: "smooth"
215      });
216    }, e[3] = c, e[4] = o, e[5] = y) : y = e[5];
217    const b = y;
218    let p, v, g, _, E, P, C, R, S;
219    if (e[6] !== h || e[7] !== n || e[8] !== d.end || e[9] !== d.start || e[10] !== s || e[11] !== f || e[12] !== b || e[13] !== r) {
220      const $ = [
221        {
222          side: z.pagerLeft,
223          active: d.start,
224          direction: -1,
225          label: r("Scroll left", {
226            $_hash: "4c2fb139351a9db3"
227          })
228        },
229        {
230          side: z.pagerRight,
231          active: d.end,
232          direction: 1,
233          label: r("Scroll right", {
234            $_hash: "5cdf03652d35d964"
235          })
236        }
237      ];
238      e[23] !== s ? (g = s && a.jsx("div", {
239        className: z.headingRow,
240        children: s
241      }), e[23] = s, e[24] = g) : g = e[24], _ = i, E = z.rowViewport, e[25] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (P = () => u(true), C = () => u(false), e[25] = P, e[26] = C) : (P = e[25], C = e[26]), e[27] !== n ? (R = a.jsx("div", {
242        className: z.row,
243        ref: l,
244        children: a.jsx("div", {
245          className: z.rowTrack,
246          children: n
247        })
248      }), e[27] = n, e[28] = R) : R = e[28];
249      let N;
250      e[29] !== d.start ? (N = X(z.shadow, z.shadowLeft, {
251        [z.shadowVisible]: d.start
252      }), e[29] = d.start, e[30] = N) : N = e[30], e[31] !== N ? (S = a.jsx("span", {
253        "aria-hidden": true,
254        className: N
255      }), e[31] = N, e[32] = S) : S = e[32];
256      let j;
257      e[33] !== d.end ? (j = X(z.shadow, z.shadowRight, {
258        [z.shadowVisible]: d.end
259      }), e[33] = d.end, e[34] = j) : j = e[34], e[35] !== j ? (p = a.jsx("span", {
260        "aria-hidden": true,
261        className: j
262      }), e[35] = j, e[36] = p) : p = e[36], v = $.map((A) => {
263        const { side: T, active: q, direction: x, label: O } = A, G = q && (f || !h), K = x === -1 ? Se : $e;
264        return a.jsx("button", {
265          type: "button",
266          "aria-label": O,
267          "aria-hidden": G ? "false" : "true",
268          tabIndex: G ? 0 : -1,
269          className: X(z.pager, T, {
270            [z.pagerVisible]: G
271          }),
272          onClick: () => b(x),
273          children: a.jsx(K, {
274            width: 14,
275            height: 14
276          })
277        }, O);
278      }), e[6] = h, e[7] = n, e[8] = d.end, e[9] = d.start, e[10] = s, e[11] = f, e[12] = b, e[13] = r, e[14] = p, e[15] = v, e[16] = g, e[17] = _, e[18] = E, e[19] = P, e[20] = C, e[21] = R, e[22] = S;
279    } else p = e[14], v = e[15], g = e[16], _ = e[17], E = e[18], P = e[19], C = e[20], R = e[21], S = e[22];
280    let I;
281    e[37] !== p || e[38] !== v || e[39] !== _ || e[40] !== E || e[41] !== P || e[42] !== C || e[43] !== R || e[44] !== S ? (I = a.jsxs("div", {
282      ref: _,
283      className: E,
284      onPointerEnter: P,
285      onPointerLeave: C,
286      children: [
287        R,
288        S,
289        p,
290        v
291      ]
292    }
292), e[37] = p, e[38] = v, e[39] = _, e[40] = E, e[41] = P, e[42] = C, e[43] = R, e[44] = S, e[45] = I) : I = e[45];
293    let k;
294    return e[46] !== g || e[47] !== I ? (k = a.jsxs("section", {
295      children: [
296        g,
297        I
298      ]
299    }), e[46] = g, e[47] = I, e[48] = k) : k = e[48], k;
300  }
301  const It = "_card_1duqr_3", Lt = "_cardCompact_1duqr_31", At = "_cardLarge_1duqr_36", kt = "_body_1duqr_69", Tt = "_iconWrap_1duqr_80", qt = "_productIcon_1duqr_88", zt = "_plusIcon_1duqr_89", Vt = "_text_1duqr_107", Mt = "_labelWrap_1duqr_115", Ot = "_label_1duqr_115", Dt = "_hoverLabel_1duqr_120", Wt = "_largeCover_1duqr_162", Ft = "_largeDescription_1duqr_179", M = {
302    card: It,
303    cardCompact: Lt,
304    cardLarge: At,
305    body: kt,
306    iconWrap: Tt,
307    productIcon: qt,
308    plusIcon: zt,
309    text: Vt,
310    labelWrap: Mt,
311    label: Ot,
312    hoverLabel: Dt,
313    largeCover: Wt,
314    largeDescription: Ft
315  }, Ht = 12;
316  function Bt() {
317    const t = V.c(2), e = Z();
318    let s;
319    return t[0] !== e ? (s = async () => {
320      await F.blingBling.showPaywall("monthlyStemSeparationProcessedFiles-libraryStemSeparation") && e("/upload/split/3");
321    }, t[0] = e, t[1] = s) : s = t[1], s;
322  }
323  function we() {
324    const t = V.c(64), e = Z(), s = B([
325      {
326        $_hash: "326c4805381ff412",
327        message: "Learn, practice & share any song with stem separation"
328      },
329      {
330        $_hash: "6164ed9c21889385",
331        message: "New Track"
332      },
333      {
334        $_hash: "59371985c0554738",
335        message: "Collaborate, create & edit songs with advanced AI tools"
336      },
337      {
338        $_hash: "91a9b3a0e9de0821",
339        message: "New project"
340      },
341      {
342        $_hash: "f0e9bc28ab8200e5",
343        message: "Mastering"
344      },
345      {
346        $_hash: "3b0e15a188fa9fdd",
347        message: "Studio-quality AI Mastering for your songs"
348      },
349      {
350        $_hash: "6164ed9c21889385",
351        message: "New Track"
352      },
353      {
354        $_hash: "7bc1e8e2d5412b99",
355        message: "Voice Studio"
356      },
357      {
358        $_hash: "ceef63e0c420c8ba",
359        message: "Replace vocals with 50+ studio-quality AI Voice Models"
360      },
361      {
362        $_hash: "6164ed9c21889385",
363        message: "New Track"
364      },
365      {
366        $_hash: "1c9a88a0fa025c13",
367        message: "Lyric Writer"
368      },
369      {
370        $_hash: "c40fcc1f23d1bb03",
371        message: "Write, edit & organize your song lyrics"
372      },
373      {
374        $_hash: "91a9b3a0e9de0821",
375        message: "New project"
376      }
377    ]), c = le("studio-v2-beta", false), n = Pe(), r = !!(c && n), i = Bt();
378    let o;
379    t[0] !== e || t[1] !== r ? (o = () => {
380      if (!r) {
381        e("/app");
382        return;
383      }
384      const q = _e();
385      pe(q, F.user?.me), ne(q);
386    }, t[0] = e, t[1] = r, t[2] = o) : o = t[2];
387    const l = o;
388    let f;
389    t[3] !== e ? (f = async () => {
390      await F.blingBling.showPaywall("monthlyMasteringProcessedFiles-libraryMastering") && e("/mastering/upload");
391    }, t[3] = e, t[4] = f) : f = t[4];
392    const u = f;
393    let h;
394    t[5] !== e ? (h = async () => {
395      await F.blingBling.showPaywall("monthlyVoiceStudioProcessedFiles-libraryVoiceStudio") && e("/voice-studio/upload");
396    }, t[5] = e, t[6] = h) : h = t[6];
397    const d = h;
398    let m;
399    t[7] !== s ? (m = s("Learn, practice & share any song with stem separation", {
400      $_hash: "326c4805381ff412"
401    }), t[7] = s, t[8] = m) : m = t[8];
402    let w;
403    t[9] !== s ? (w = s("New Track", {
404      $_hash: "6164ed9c21889385"
405    }), t[9] = s, t[10] = w) : w = t[10];
406    let y;
407    t[11] !== i || t[12] !== m || t[13] !== w ? (y = {
408      id: "play",
409      label: "Play",
410      icon: Re,
411      accent: "var(--aqua-11, #00DAE8)",
412      description: m,
413      image: "/assets/images/home-card-play.png",
414      createLabel: w,
415      onCreate: i
416    }, t[11] = i, t[12] = m, t[13] = w, t[14] = y) : y = t[14];
417    let b;
418    t[15] !== s ? (b = s("Collaborate, create & edit songs with advanced AI tools", {
419      $_hash: "59371985c0554738"
420    }), t[15] = s, t[16] = b) : b = t[16];
421    let p;
422    t[17] !== s ? (p = s("New project", {
423      $_hash: "91a9b3a0e9de0821"
424    }), t[17] = s, t[18] = p) : p = t[18];
425    let v;
426    t[19] !== l || t[20] !== b || t[21] !== p ? (v = {
427      id: "studio",
428      label: "Studio",
429      icon: Ee,
430      accent: "var(--green-11, #30A46C)",
431      description: b,
432      image: "/assets/images/home-card-studio.png",
433      createLabel: p,
434      onCreate: l
435    }, t[19] = l, t[20] = b, t[21] = p, t[22] = v) : v = t[22];
436    let g;
437    t[23] !== s ? (g = s("Mastering", {
438      $_hash: "f0e9bc28ab8200e5"
439    }), t[23] = s, t[24] = g) : g = t[24];
440    let _;
441    t[25] !== s ? (_ = s("Studio-quality AI Mastering for your songs", {
442      $_hash: "3b0e15a188fa9fdd"
443    }), t[25] = s, t[26] = _) : _ = t[26];
444    let E;
445    t[27] !== s ? (E = s("New Track", {
446      $_hash: "6164ed9c21889385"
447    }), t[27] = s, t[28] = E) : E = t[28];
448    let P;
449    t[29] !== u || t[30] !== _ || t[31] !== E || t[32] !== g ? (P = {
450      id: "mastering",
451      label: g,
452      icon: Ie,
453      accent: "var(--purple-11, #8E4EC6)",
454      description: _,
455      image: "/assets/images/home-card-mastering.png",
456      createLabel: E,
457      onCreate: u
458    }, t[29] = u, t[30] = _, t[31] = E, t[32] = g, t[33] = P) : P = t[33];
459    let C;
460    t[34] !== s ? (C = s("Voice Studio", {
461      $_hash: "7bc1e8e2d5412b99"
462    }), t[34] = s, t[35] = C) : C = t[35];
463    let R;
464    t[36] !== s ? (R = s("Replace vocals with 50+ studio-quality AI Voice Models", {
465      $_hash: "ceef63e0c420c8ba"
466    }), t[36] = s, t[37] = R) : R = t[37];
467    let S;
468    t[38] !== s ? (S = s("New Track", {
469      $_hash: "6164ed9c21889385"
470    }), t[38] = s, t[39] = S) : S = t[39];
471    let I;
472    t[40] !== d || t[41] !== C || t[42] !== R || t[43] !== S ? (I = {
473      id: "voice",
474      label: C,
475      icon: Le,
476      accent: "var(--red-11, #E5484D)",
477      description: R,
478      image: "/assets/images/home-card-voice.png",
479      createLabel: S,
480      onCreate: d
481    }, t[40] = d, t[41] = C, t[42] = R, t[43] = S, t[44] = I) : I = t[44];
482    let k;
483    t[45] !== s ? (k = s("Lyric Writer", {
484      $_hash: "1c9a88a0fa025c13"
485    }), t[45] = s, t[46] = k) : k = t[46];
486    let $;
487    t[47] !== s ? ($ = s("Write, edit & organize your song lyrics", {
488      $_hash: "c40fcc1f23d1bb03"
489    }
489), t[47] = s, t[48] = $) : $ = t[48];
490    let N;
491    t[49] !== s ? (N = s("New project", {
492      $_hash: "91a9b3a0e9de0821"
493    }), t[49] = s, t[50] = N) : N = t[50];
494    let j;
495    t[51] !== e ? (j = () => e("/lyrics"), t[51] = e, t[52] = j) : j = t[52];
496    let A;
497    t[53] !== k || t[54] !== $ || t[55] !== N || t[56] !== j ? (A = {
498      id: "lyrics",
499      label: k,
500      icon: Ae,
501      accent: "var(--blue-10, #3B9EFF)",
502      description: $,
503      image: "/assets/images/home-card-lyrics.png",
504      createLabel: N,
505      onCreate: j
506    }, t[53] = k, t[54] = $, t[55] = N, t[56] = j, t[57] = A) : A = t[57];
507    let T;
508    return t[58] !== P || t[59] !== I || t[60] !== A || t[61] !== y || t[62] !== v ? (T = [
509      y,
510      v,
511      P,
512      I,
513      A
514    ], t[58] = P, t[59] = I, t[60] = A, t[61] = y, t[62] = v, t[63] = T) : T = t[63], T;
515  }
516  function Gt(t) {
517    const e = V.c(12), { track: s, variant: c } = t, n = c === void 0 ? "compact" : c, r = we(), i = n === "large";
518    let o;
519    e[0] !== s || e[1] !== n ? (o = (h) => {
520      s?.("new_project_card_click", {
521        event_category: "engagement",
522        product: h.id,
523        variant: n
524      }), h.onCreate();
525    }, e[0] = s, e[1] = n, e[2] = o) : o = e[2];
526    const l = o;
527    let f;
528    if (e[3] !== r || e[4] !== l || e[5] !== i) {
529      let h;
530      e[7] !== l || e[8] !== i ? (h = (d) => {
531        const m = d.icon;
532        return a.jsxs("button", {
533          type: "button",
534          className: X(M.card, i ? M.cardLarge : M.cardCompact),
535          style: {
536            "--card-accent": d.accent
537          },
538          onClick: () => l(d),
539          children: [
540            i && a.jsx("span", {
541              className: M.largeCover,
542              "aria-hidden": "true",
543              children: a.jsx("img", {
544                src: d.image,
545                alt: "",
546                loading: "lazy"
547              })
548            }),
549            a.jsxs("span", {
550              className: M.body,
551              children: [
552                a.jsxs("span", {
553                  className: M.iconWrap,
554                  "aria-hidden": "true",
555                  children: [
556                    a.jsx(m, {
557                      width: 20,
558                      height: 20,
559                      className: M.productIcon
560                    }),
561                    a.jsx(de, {
562                      width: 20,
563                      height: 20,
564                      className: M.plusIcon
565                    })
566                  ]
567                }),
568                a.jsxs("span", {
569                  className: M.text,
570                  children: [
571                    a.jsxs("span", {
572                      className: M.labelWrap,
573                      children: [
574                        a.jsx(H, {
575                          size: "3",
576                          weight: "medium",
577                          className: M.label,
578                          children: d.label
579                        }),
580                        a.jsx(H, {
581                          size: "3",
582                          weight: "medium",
583                          className: M.hoverLabel,
584                          "aria-hidden": "true",
585                          children: d.createLabel
586                        })
587                      ]
588                    }),
589                    i && a.jsx(H, {
590                      size: "2",
591                      className: M.largeDescription,
592                      children: d.description
593                    })
594                  ]
595                })
596              ]
597            })
598          ]
599        }, d.id);
600      }, e[7] = l, e[8] = i, e[9] = h) : h = e[9], f = r.map(h), e[3] = r, e[4] = l, e[5] = i, e[6] = f;
601    } else f = e[6];
602    let u;
603    return e[10] !== f ? (u = a.jsx(be, {
604      getScrollStep: Ut,
605      children: f
606    }), e[10] = f, e[11] = u) : u = e[11], u;
607  }
608  function Ut(t) {
609    return t.firstElementChild.firstElementChild.offsetWidth + Ht;
610  }
611  const Yt = "_heading_zicsi_3", Qt = "_card_zicsi_7", Kt = "_cover_zicsi_34", Xt = "_info_zicsi_51", Jt = "_titleRow_zicsi_58", Zt = "_title_zicsi_58", es = "_metaRow_zicsi_74", ts = "_typeIcon_zicsi_81", ss = "_meta_zicsi_74", as = "_skeleton_zicsi_94", D = {
612    heading: Yt,
613    card: Qt,
614    cover: Kt,
615    info: Xt,
616    titleRow: Jt,
617    title: Zt,
618    metaRow: es,
619    typeIcon: ts,
620    meta: ss,
621    skeleton: as
622  };
623  function ns(t = 8) {
624    const [e, s] = L.useState([]), [c, n] = L.useState(true), r = L.useRef(true);
625    L.useEffect(() => (r.current = true, () => {
626      r.current = false;
627    }), []);
628    const i = L.useCallback(async () => {
629      try {
630        const { data: o } = await at(t);
631        r.current && s(o);
632      } catch (o) {
633        console.error("Error fetching recent activity:", o);
634      } finally {
635        r.current && n(false);
636      }
637    }, [
638      t
639    ]);
640    return L.useEffect(() => {
641      i();
642    }, [
643      i
644    ]), Be(i), {
645      items: e,
646      isLoading: c
647    };
648  }
649  const ie = 8, cs = 150, os = 12, is = [
650    [
651      "year",
652      31536e3
653    ],
654    [
655      "month",
656      2592e3
657    ],
658    [
659      "day",
660      86400
661    ],
662    [
663      "hour",
664      3600
665    ],
666    [
667      "minute",
668      60
669    ]
670  ];
671  function rs(t, e = navigator.language) {
672    const s = t ? new Date(t).getTime() : Number.NaN;
673    if (Number.isNaN(s)) return null;
674    const c = Math.round((s - Date.now()) / 1e3), n = new Intl.RelativeTimeFormat(e, {
675      numeric: "auto"
676    });
677    for (const [r, i] of is) if (Math.abs(c) >= i) return n.format(Math.trunc(c / i), r);
678    return n.format(0, "second");
679  }
680  function ls(t) {
681    const e = V.c(25), { item: s, onClick: c } = t;
682    let n;
683    e[0] !== s.summary?.v1?.original ? (n = s?.summary?.v1?.original ?? {}, e[0] = s.summary?.v1?.original, e[1] = n) : n = e[1];
684    const r = n;
685    let i;
686    e[2] !== s.category ? (i = Ge(s.category), e[2] = s.category, e[3] = i) : i = e[3];
687    const o = i, l = o.Icon, f = r.title ?? s?.file?.name ?? "-";
688    let u;
689    e[4] !== r.createdAt ? (u = rs(r.createdAt), e[4] = r.createdAt, e[5] = u) : u = e[5];
690    const h = u, d = r.cover ?? Ue[o.pattern];
691    let m;
692    e[6] !== o.pattern || e[7] !== d ? (m = a.jsx("div", {
693      className: D.cover,
694      children: a.jsx(ke, {
695        size: "100%",
696        type: o.pattern,
697        cover: d
698      })
699    }), e[6] = o.pattern, e[7] = d, e[8] = m) : m = e[8];
700    let w;
701    e[9] !== f ? (w = a.jsx("div", {
702      className: D.titleRow,
703      children: a.jsx(H, {
704        size: "2",
705        className: D.title,
706        children: f
707      })
708    }), e[9] = f, e[10] = w) : w = e[10];
709    let y;
710    e[11] !== h ? (y = a.jsx(H, {
711      size: "1",
712      className: D.meta,
713      children: h
714    }), e[11] = h, e[12] = y) : y = e[12];
715    let b;
716    e[13] !== l ? (b = a.jsx(l, {
717      width: 16,
718      height: 16,
719      className: D.typeIcon,
720      "aria-hidden": "true"
721    }), e[13] = l, e[14] = b) : b = e[14];
722    let p;
723    e[15] !== y || e[16] !== b ? (p = a.jsxs("div", {
724      className: D.metaRow,
725      children: [
726        y,
727        b
728      ]
729    }), e[15] = y, e[16] = b, e[17] = p) : p = e[17];
730    let v;
731    e[18] !== w || e[19] !== p ? (v = a.jsxs("div", {
732      className: D.info,
733      children: [
734        w,
735        p
736      ]
737    }), e[18] = w, e[19] = p, e[20] = v) : v = e[20];
738    let g;
739    return e[21] !== c || e[22] !== v || e[23] !== m ? (g = a.jsxs("button", {
740      type: "button",
741      className: D.card,
742      onClick: c,
743      children: [
744        m,
745        v
746      ]
747    }), e[21] = c, e[22] = v, e[23] = m, e[24] = g) : g = e[24], g;
748  }
749  function ds(t) {
750    const e = V.c(14), { onOpenProject: s, track: c } = t, n = B([
751      {
752        $_hash: "708991e5756229fe",
753        message: "Recents"
754      }
755    ]), { items: r, isLoading: i } = ns(ie);
756    if (!i && r.length === 0) return null;
757    let o;
758    e[0] !== s || e[1] !== c ? (o = (m) => {
759      c?.("recent_activity_card_click", {
760        event_category: "engagement",
761        category: m.category
762      }), s(m);
763    }, e[0] = s, e[1] = c, e[2] = o) : o = e[2];
764    const l = o;
765    let f;
766    e[3] !== n ? (f = n("Recents", {
767      $_hash: "708991e5756229fe"
768    }), e[3] = n, e[4] = f) : f = e[4];
769    let u;
770    e[5] !== f ? (u = a.jsx(H, {
771      as: "p",
772      size: "4",
773      weight: "medium",
774      className: D.heading,
775      children: f
776    }), e[5] = f, e[6] = u) : u = e[6];
777    let h;
778    e[7] !== l || e[8] !== i || e[9] !== r ? (h = i ? Array.from({
779      length: ie
780    }, hs) : r.map((m) => a.jsx(ls, {
781      item: m,
782      onClick: () => l(m)
783    }, m.id)), e[7] = l, e[8] = i, e[9] = r, e[10] = h) : h = e[10];
784    let d;
785    return e[11] !== u || e[12] !== h ? (d = a.jsx(be, {
786      heading: u,
787      getScrollStep: us,
788      children: h
789    }), e[11] = u, e[12] = h, e[13] = d) : d = e[13], d;
790  }
791  function hs(t, e) {
792    return a.jsx("div", {
793      className: D.skeleton
794    }, e);
795  }
796  function us(t) {
797    return t.clientWidth - cs - os;
798  }
799  const fs = "_menu_1h9tm_6", ms = "_row_1h9tm_19", gs = "_iconTile_1h9tm_46", te = {
800    menu: fs,
801    row: ms,
802    iconTile: gs
803  };
804  function _s(t) {
805    const e = V.c(13), { track: s } = t, c = B([
806      {
807        $_hash: "013b05d5c8fc7a18",
808        message: "Start a Project"
809      }
810    ]), n = we();
811    let r;
812    if (e[0] !== n || e[1] !== s) {
813      let h;
814      e[3] !== s ? (h = (d) => {
815        const m = d.icon;
816        return {
817          type: "custom",
818          key: d.id,
819          customRender: () => a.jsxs("button", {
820            type: "button",
821            className: te.row,
822            onClick: () => {
823              s?.("start_project_option_click", {
824                event_category: "engagement",
825                product: d.id
826              }), d.onCreate();
827            },
828            children: [
829              a.jsx("span", {
830                className: te.iconTile,
831                children: a.jsx(m, {
832                  width: 20,
833                  height: 20
834                })
835              }),
836              d.label
837            ]
838          })
839        };
840      }, e[3] = s, e[4] = h) : h = e[4], r = n.map(h), e[0] = n, e[1] = s, e[2] = r;
841    } else r = e[2];
842    const i = r;
843    let o;
844    e[5] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (o = a.jsx(de, {
845      width: 18,
846      height: 18
847    }), e[5] = o) : o = e[5];
848    let l;
849    e[6] !== c ? (l = c("Start a Project", {
850      $_hash: "013b05d5c8fc7a18"
851    }), e[6] = c, e[7] = l) : l = e[7];
852    let f;
853    e[8] !== l ? (f = a.jsxs(ae, {
854      size: "3",
855      variant: "solid",
856      highContrast: true,
857      children: [
858        o,
859        l
860      ]
861    }
861), e[8] = l, e[9] = f) : f = e[9];
862    let u;
863    return e[10] !== i || e[11] !== f ? (u = a.jsx(he, {
864      trigger: f,
865      options: i,
866      className: te.menu,
867      align: "center",
868      sideOffset: 8
869    }), e[10] = i, e[11] = f, e[12] = u) : u = e[12], u;
870  }
871  function ps(t, e, s, c, n) {
872    if (t.reduce((u, h) => u + h, 0) + n * (t.length - 1) <= s) return [];
873    let i = e;
874    const o = c >= 0 && i + n + t[c] <= s;
875    o && (i += n + t[c]);
876    let l = false;
877    const f = [];
878    return t.forEach((u, h) => {
879      o && h === c || (!l && i + n + u <= s ? i += n + u : (l = true, f.push(h)));
880    }), f;
881  }
882  function bs(t) {
883    const e = V.c(6);
884    let s;
885    e[0] !== t ? (s = t === void 0 ? {} : t, e[0] = t, e[1] = s) : s = e[1];
886    const { onStudioV1: c } = s, n = Z(), r = !!le("new-mixer", false);
887    let i;
888    return e[2] !== n || e[3] !== r || e[4] !== c ? (i = {
889      openProject: (l) => {
890        e: switch (l.category) {
891          case "MASTERING": {
892            se(`/mastering/player/${l.id}`, {
893              navigate: n
894            });
895            break e;
896          }
897          case "VOICE": {
898            se(`/voice-studio/project/${l.id}`, {
899              navigate: n
900            });
901            break e;
902          }
903          case "STUDIO": {
904            c?.(l);
905            break e;
906          }
907          case "STUDIO_V2": {
908            ne(l.id);
909            break e;
910          }
911          default:
912            Ye({
913              trackId: l.id,
914              useNewPlayer: Qe({
915                eligible: r
916              }),
917              navigate: n
918            });
919        }
920      }
921    }, e[2] = n, e[3] = r, e[4] = c, e[5] = i) : i = e[5], i;
922  }
923  const re = "home", ws = 4, ys = 8, vs = 8;
924  function js(t) {
925    const e = V.c(53), { value: s, onChange: c } = t, n = B([
926      {
927        $_hash: "045741aa62df51f8",
928        message: "All"
929      },
930      {
931        $_hash: "f0e9bc28ab8200e5",
932        message: "Mastering"
933      },
934      {
935        $_hash: "7bc1e8e2d5412b99",
936        message: "Voice Studio"
937      },
938      {
939        $_hash: "41016dbecdc83ea6",
940        message: "More products"
941      }
942    ]), r = L.useRef(null), i = L.useRef(null);
943    let o;
944    e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (o = [], e[0] = o) : o = e[0];
945    const [l, f] = L.useState(o);
946    let u;
947    e[1] !== n ? (u = n("All", {
948      $_hash: "045741aa62df51f8"
949    }), e[1] = n, e[2] = u) : u = e[2];
950    let h;
951    e[3] !== u ? (h = {
952      value: J,
953      label: u
954    }, e[3] = u, e[4] = h) : h = e[4];
955    let d, m;
956    e[5] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (d = {
957      value: "play",
958      label: "Play"
959    }, m = {
960      value: "studio",
961      label: "Studio"
962    }, e[5] = d, e[6] = m) : (d = e[5], m = e[6]);
963    let w;
964    e[7] !== n ? (w = n("Mastering", {
965      $_hash: "f0e9bc28ab8200e5"
966    }), e[7] = n, e[8] = w) : w = e[8];
967    let y;
968    e[9] !== w ? (y = {
969      value: "mastering",
970      label: w
971    }, e[9] = w, e[10] = y) : y = e[10];
972    let b;
973    e[11] !== n ? (b = n("Voice Studio", {
974      $_hash: "7bc1e8e2d5412b99"
975    }), e[11] = n, e[12] = b) : b = e[12];
976    let p;
977    e[13] !== b ? (p = {
978      value: "voice",
979      label: b
980    }, e[13] = b, e[14] = p) : p = e[14];
981    let v;
982    e[15] !== h || e[16] !== y || e[17] !== p ? (v = [
983      h,
984      d,
985      m,
986      y,
987      p
988    ], e[15] = h, e[16] = y, e[17] = p, e[18] = v) : v = e[18];
989    const g = v;
990    let _;
991    e[19] !== g || e[20] !== s ? (_ = () => {
992      const x = r.current, O = i.current;
993      if (!x || !O) return;
994      const G = () => {
995        const ce = Array.from(O.children, xs), je = ce.pop(), xe = x.getBoundingClientRect().width - ys - vs, Ne = g.findIndex((U) => U.value === s), oe = ps(ce, je, xe, Ne, ws).map((U) => g[U].value);
996        f((U) => U.join() === oe.join() ? U : oe);
997      };
998      G();
999      const K = new ResizeObserver(() => Ce.flushSync(G));
1000      return K.observe(x), K.observe(O), () => K.disconnect();
1001    }, e[19] = g, e[20] = s, e[21] = _) : _ = e[21];
1002    let E;
1003    e[22] !== s ? (E = [
1004      s
1005    ], e[22] = s, e[23] = E) : E = e[23], L.useLayoutEffect(_, E);
1006    let P;
1007    e[24] !== c ? (P = (x, O) => a.jsx(ae, {
1008      size: "2",
1009      variant: O ? "solid" : "soft",
1010      highContrast: O,
1011      "aria-pressed": O,
1012      className: Q.chip,
1013      onClick: () => c(x.value),
1014      children: x.label
1015    }, x.value), e[24] = c, e[25] = P) : P = e[25];
1016    const C = P;
1017    let R;
1018    e[26] !== n ? (R = () => a.jsx(qe, {
1019      size: "2",
1020      variant: "soft",
1021      className: Q.chip,
1022      "aria-label": n("More products", {
1023        $_hash: "41016dbecdc83ea6"
1024      }),
1025      children: a.jsx(ze, {})
1026    }), e[26] = n, e[27] = R) : R = e[27];
1027    const S = R;
1028    let I;
1029    e[28] !== l || e[29] !== g ? (I = g.filter((x) => l.includes(x.value)), e[28] = l, e[29] = g, e[30] = I) : I = e[30];
1030    const k = I;
1031    let $;
1032    e[31] !== l || e[32] !== g || e[33] !== C || e[34] !== s ? ($ = g.filter((x) => !l.includes(x.value)).map((x) => C(x, x.value === s)), e[31] = l, e[32] = g, e[33] = C, e[34] = s, e[35] = $) : $ = e[35];
1033    let N;
1034    e[36] !== c || e[37] !== k || e[38] !== S || e[39] !== s ? (N = k.length > 0 && a.jsx(he, {
1035      trigger: S(),
1036      options: k.map((x) => ({
1037        type: "checkbox",
1038        key: x.value,
1039        label: x.label,
1040        checked: x.value === s,
1041        onChange: () => c(x.value)
1042      }))
1043    }), e[36] = c, e[37] = k, e[38] = S, e[39] = s, e[40] = N) : N = e[40];
1044    let j;
1045    e[41] !== g || e[42] !== C ? (j = g.map((x) => C(x, false)), e[41] = g, e[42] = C, e[43] = j) : j = e[43];
1046    let A;
1047    e[44] !== S ? (A = S(), e[44] = S, e[45] = A) : A = e[45];
1048    let T;
1049    e[46] !== j || e[47] !== A ? (T = a.jsxs("div", {
1050      ref: i,
1051      className: Q.ghost,
1052      "aria-hidden": "true",
1053      children: [
1054        j,
1055        A
1056      ]
1057    }), e[46] = j, e[47] = A, e[48] = T) : T = e[48];
1058    let q;
1059    return e[49] !== $ || e[50] !== N || e[51] !== T ? (q = a.jsxs(ue, {
1060      ref: r,
1061      gap: "1",
1062      align: "center",
1063      className: Q.chips,
1064      children: [
1065        $,
1066        N,
1067        T
1068      ]
1069    }), e[49] = $, e[50] = N, e[51] = T, e[52] = q) : q = e[52], q;
1070  }
1071  function xs(t) {
1072    return t.getBoundingClientRect().width;
1073  }
1074  function Ns() {
1075    const t = B([
1076      {
1077        $_hash: "cba3e832ece50257",
1078        message: "Files"
1079      }
1080    ]), { track: e } = Ke({
1081      prefix: re
1082    }), s = me("(max-width: 1124px)"), [c, n] = L.useState(null), [r, i] = L.useState(false), o = Y((_) => _.totalCount), l = Y((_) => _.hasFetched), f = Y((_) => _.filters), u = Y((_) => _.setFilters), h = Y((_) => _.fetch), { openProject: d } = bs({
1083      onStudioV1: (_) => {
1084        n(_), i(true);
1085      }
1086    }), m = c?.rawTitle ?? c?.summary?.v1?.original?.title ?? "", w = () => {
1087      if (!c) return;
1088      const _ = _e();
1089      pe(_, F.user?.me), ne(_, {
1090        convertFrom: c.id,
1091        projectName: m
1092      });
1093    }, y = () => {
1094      c && se(`/app/${c.id}`);
1095    }, b = f?.products ?? J, p = l && o === 0 && b === J, v = (_) => {
1096      _ !== b && (e?.("product_filter_change", {
1097        event_category: "engagement",
1098        product: _
1099      }), u({
1100        ...f,
1101        products: _
1102      }), h(true));
1103    }, g = () => a.jsx(js, {
1104      value: b,
1105      onChange: v
1106    });
1107    return a.jsxs("div", {
1108      className: Q.page,
1109      children: [
1110        a.jsx(Xe, {
1111          page: re,
1112          totalCount: o,
1113          hasFetched: l
1114        }),
1115        a.jsx(Te, {
1116          width: "100%",
1117          maxWidth: "1620px",
1118          style: {
1119            margin: "0 auto"
1120          },
1121          px: s ? "4" : "3",
1122          children: a.jsxs("div", {
1123            className: Q.topSections,
1124            children: [
1125              a.jsx(Gt, {
1126                track: e,
1127                variant: p ? "large" : "compact"
1128              }),
1129              !p && a.jsx(ut, {
1130                track: e
1131              }),
1132              !p && a.jsx(ds, {
1133                onOpenProject: d,
1134                track: e
1135              })
1136            ]
1137          })
1138        }),
1139        a.jsx(Je, {
1140          title: t("Files", {
1141            $_hash: "cba3e832ece50257"
1142          }),
1143          useStore: Y,
1144          onRowClick: d,
1145          track: e,
1146          type: "home",
1147          renderTitleActions: p ? void 0 : g,
1148          renderEmptyAction: () => a.jsx(_s, {
1149            track: e
1150          })
1151        }),
1152        a.jsx(Ze, {
1153          open: r,
1154          projectTitle: m,
1155          onOpenChange: i,
1156          onConfirm: w,
1157          onOpenV1: y
1158        })
1159      ]
1160    });
1161  }
1162  function ye() {
1163    const t = V.c(2), [e, s] = L.useState(null);
1164    let c, n;
1165    return t[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (c = () => {
1166      let r = false;
1167      return Ve().then((i) => {
1168        r || s(i);
1169      }).catch(() => {
1170        r || s(false);
1171      }), () => {
1172        r = true;
1173      };
1174    }, n = [], t[0] = c, t[1] = n) : (c = t[0], n = t[1]), L.useEffect(c, n), e;
1175  }
1176  function ve() {
1177    const t = V.c(1);
1178    let e;
1179    return t[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (e = a.jsx(ue, {
1180      align: "center",
1181      justify: "center",
1182      style: {
1183        height: "100%",
1184        minHeight: "50vh"
1185      },
1186      children: a.jsx(Me, {
1187        size: "2",
1188        color: "gray"
1189      })
1190    }), t[0] = e) : e = t[0], e;
1191  }
1192  Ls = function() {
1193    const t = V.c(3), e = ye();
1194    if (e === null) {
1195      let n;
1196      return t[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (n = a.jsx(ve, {}), t[0] = n) : n = t[0], n;
1197    }
1198    const s = e ? "/home" : "/play";
1199    let c;
1200    return t[1] !== s ? (c = a.jsx(fe, {
1201      to: s,
1202      replace: true
1203    }), t[1] = s, t[2] = c) : c = t[2], c;
1204  };
1205  As = function() {
1206    const t = V.c(3), e = ye();
1207    if (e === null) {
1208      let c;
1209      return t[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (c = a.jsx(ve, {}), t[0] = c) : c = t[0], c;
1210    }
1211    let s;
1212    return t[1] !== e ? (s = e ? a.jsx(Ns, {}) : a.jsx(fe, {
1213      to: "/play",
1214      replace: true
1215    }), t[1] = e, t[2] = s) : s = t[2], s;
1216  };
1217});
1218export {
1219  As as HomeGate,
1220  Ls as RootRedirect,
1221  __tla
1222};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.