PageSourceSearch

https://www.hamienet.com/assets/CollectionSectionPage-B3vygqKD.js

js hamienet.com collected 2026-10-02 05:00:12 UTC 4,810 bytes, 102 lines download raw bytes

1import { r as reactExports, j as jsxRuntimeExports } from "./vendor-react-Bay9Y7Lb.js";
2import { a as api } from "./index-w5lXls15.js";
3import { S as SectionContent } from "./SectionContent-dHWQOZ9q.js";
4import { a as useAdmin } from "./main-aQ5jZgYp.js";
5import { aX as ArrowLeft } from "./vendor-D0P4XgNj.js";
6import "./vendor-i18n-BC7ZMXWQ.js";
7import "./utils-CEVb7nN1.js";
8import "./bilingual-CBk-npe4.js";
9import "./vendor-react-three-BCww3P1x.js";
10import "./synth-Fr-K52Ox.js";
11import "./wasm-synth-adapter-DpNGIIyM.js";
12import "./vendor-spessasynth-DH8n6o_V.js";
13import "./vendor-audio-D-wTggbx.js";
14import "./Waveform-BgnMyg5E.js";
15import "./vendor-framer-B-4FZk1Z.js";
16import "./labTools-HX5HYAPB.js";
17import "./UserAvatar-BQN4jlY-.js";
18function CollectionSectionPage({
19  slug,
20  sectionId,
21  onNavigate,
22  currentUser,
23  onUploadRequested
24}) {
25  const { staffModeEnabled } = useAdmin();
26  const cleanSectionId = sectionId.split("-").pop() || "";
27  const [collection, setCollection] = reactExports.useState(null);
28  const [section, setSection] = reactExports.useState(null);
29  const [loadingMeta, setLoadingMeta] = reactExports.useState(true);
30  reactExports.useEffect(() => {
31    const fetchMetadata = async () => {
32      setLoadingMeta(true);
33      try {
34        const col = await api.getCollection(slug);
35        setCollection(col);
36        const targetSlug = cleanSectionId;
37        const sec = col.sections.find(
38          (s) => String(s.id) === String(targetSlug) || s.title && s.title.toLowerCase().replace(/\s+/g, "-").replace(/[^\w-]/g, "") === targetSlug
39        );
40        setSection(sec || null);
41      } catch (e) {
42        console.error("Failed to load section metadata:", e);
43      } finally {
44        setLoadingMeta(false);
45      }
46    };
47    fetchMetadata();
48  }, [slug, cleanSectionId, sectionId]);
49  if (loadingMeta) {
50    return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex-1 flex flex-col justify-center items-center py-40 text-zinc-500", children: [
51      /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "animate-spin rounded-full h-8 w-8 border-b-2 border-indigo-600 mb-4" }),
52      /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: "Loading section details..." })
53    ] });
54  }
55  const isVisible = section && (staffModeEnabled || section.trackCount == null || section.trackCount > 0);
56  if (!section || !isVisible) {
57    return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "p-12 text-center rounded-3xl border-2 border-dashed border-zinc-200 dark:border-zinc-800 bg-white dark:bg-zinc-900/30 max-w-xl mx-auto my-20", children: [
58      /* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: "text-lg font-bold text-zinc-800 dark:text-zinc-200", children: "Show Section Not Found" }),
59      /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm text-zinc-500 mt-2", children: "The requested musical show section could not be found or has been removed." }),
60      /* @__PURE__ */ jsxRuntimeExports.jsx(
61        "button",
62        {
63          onClick: () => onNavigate("collection", slug),
64          className: "mt-4 px-4 py-2 bg-indigo-600 hover:bg-indigo-700 text-white rounded-xl text-sm font-semibold transition",
65          children: "Back to Collection"
66        }
67      )
68    ] });
69  }
70  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "min-h-screen bg-zinc-50 dark:bg-zinc-950 pb-20", children: [
71    /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "sticky top-0 z-40 bg-white/70 dark:bg-zinc-950/70 backdrop-blur-md border-b border-zinc-200/50 dark:border-zinc-900/50 px-6 py-3 flex justify-between items-center transition-all select-none", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
72      "a",
73      {
74        href: `/collections/${slug}`,
75        onClick: (e) => {
76          if (!e.ctrlKey && !e.metaKey && !e.shiftKey && e.button === 0) {
77            e.preventDefault();
78            onNavigate("collection", slug);
79          }
80        },
81        className: "flex items-center gap-2 text-zinc-650 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-white transition font-semibold text-sm no-underline",
82        children: [
83          /* @__PURE__ */ jsxRuntimeExports.jsx(ArrowLeft, { size: 16 }),
84          "Back to ",
85          (collection == null ? void 0 : collection.title) || "Collection"
86        ]
87      }
88    ) }),
89    /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "max-w-4xl mx-auto mt-8 bg-white dark:bg-[#0f0f0f] rounded-2xl shadow-sm border border-zinc-200/50 dark:border-zinc-800/80 overflow-hidden", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
90      SectionContent,
91      {
92        section,
93        activeSlug: slug,
94        currentUser,
95        onUploadRequested
96      }
97    ) })
98  ] });
99}
100export {
101  CollectionSectionPage as default
102};

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.