/*
   * Seazonify Controller
   * Author: Seazonify
   * Copyright: © 2025 Seazonify
   * Version: 3.0.0
   * License: https://seazonify.com/license
   * Support: https://seazonify.com/contact
   * Source: https://github.com/itsmimakhtar/Seazonify
   */
!function () {
   const e = "'Inter', 'ui-sans-serif', 'system-ui', 'sans-serif'", n = "linear-gradient(135deg, #3b82f6, #60a5fa, #22d3a8, #fbbf24)"; let t = [], a = [], o = null, i = null, s = null, l = null, r = null, c = null, d = !1, u = !1, f = 0, m = !1;const p = (() => { const s = document.currentScript || document.querySelector('script[seazonify-logo]'); return s && s.getAttribute('seazonify-logo') || '' })(), sz_base = window.sz_base = (() => { const s = document.currentScript || document.querySelector('script[seazonify-base]'); let b = (s && s.getAttribute('seazonify-base') || '').replace(/\/$/, ''); if (!b || b.length < 2 || (b.indexOf('http') === -1 && b.indexOf('//') !== 0)) { if (s && s.src) { b = s.src.replace('admin/js/controller.js', '').replace(/\?.*/, '').replace(/\/$/, ''); } } if (b && b.indexOf('http') === -1 && b.indexOf('//') !== 0) { if (b.indexOf('/') === 0) { b = window.location.origin + b; } } return (b || '').replace(/\/$/, '') + '/'; })(), sz_res = window.sz_res = (u) => (u && !u.startsWith('http') && !u.startsWith('data:') ? sz_base + u.replace(/^\//, '') : u);
   const y = new Set, g = new Set, h = "seazonify_audio_consent", b = "seazonify_no_auto_popup", x = "seazonify_first_seen", z = e => { try { localStorage.setItem(h, e ? "1" : "0") } catch { } }, v = () => { try { return "1" === localStorage.getItem(b) } catch { return !1 } }, w = () => { try { return "1" === localStorage.getItem(x) } catch { return !1 } }, C = "seazonify_audio_toggle", I = "seazonify_visual_toggle", k = "seazonify_visited", A = () => { try { return "1" !== localStorage.getItem(k) } catch { return !0 } }, M = () => { try { localStorage.setItem(k, "1") } catch { } }, S = () => { if (A()) return !0; try { return "0" !== localStorage.getItem(C) } catch { return !0 } }, E = e => { try { localStorage.setItem(C, e ? "1" : "0") } catch { } M() }, T = () => { if (A()) return !0; try { return "0" !== localStorage.getItem(I) } catch { return !0 } }, D = e => { try { localStorage.setItem(I, e ? "1" : "0") } catch { } M() }; function N(e) { e = sz_res(e); return y.has(e) ? Promise.resolve() : new Promise((n, t) => { const a = document.createElement("script"); a.src = e, a.async = !0, a.onload = () => { y.add(e), n() }, a.onerror = () => { t() }, document.head.appendChild(a) }) } const L = document.createElement("style"); L.textContent = `\n    .szfy-sidebar-btn {\n      font-family: ${e};\n      position: fixed;\n      top: 50%;\n      right: 0;\n      transform: translateY(-50%);\n      z-index: 2147483646;\n      background: #181f2a;\n      color: #fff;\n      border-radius: 40px 0 0 40px;\n      box-shadow: 0 2px 10px rgba(0,0,0,0.12);\n      padding: 6px 12px 6px 8px;\n      font-size: 0;\n      cursor: pointer;\n      border: 1px solid #232b3a;\n      display: flex;\n      align-items: center;\n      gap: 0;\n      transition: background 0.3s, box-shadow 0.2s;\n      opacity: 0.96;\n      width: auto;\n      height: auto;\n    }\n    .szfy-sidebar-btn.white {\n      background: #fff;\n      color: #181f2a;\n      border: 1px solid #e5e7eb;\n    }\n    .szfy-sidebar-btn:hover {\n      background: #232b3a;\n      box-shadow: 0 4px 18px rgba(0,0,0,0.13);\n      opacity: 1;\n    }\n    .szfy-sidebar-logo {\n      width: 22px;\n      height: 22px;\n      display: block;\n      transition: width 0.2s, height 0.2s;\n    }\n    @media (max-width: 600px) {\n      .szfy-sidebar-btn {\n        padding: 4px 8px 4px 6px;\n      }\n      .szfy-sidebar-logo {\n        width: 18px;\n        height: 18px;\n      }\n    }\n    .szfy-overlay {\n      font-family: ${e};\n      position: fixed;\n      inset: 0;\n      background: rgba(8, 12, 21, 0.7);\n      backdrop-filter: blur(8px);\n      z-index: 2147483647;\n      display: flex;\n      align-items: center;\n      justify-content: center;\n      animation: szfy-fade-in 0.2s ease-out;\n    }\n    @keyframes szfy-fade-in {\n      from { opacity: 0; }\n      to { opacity: 1; }\n    }\n    .szfy-modal {\n      font-family: ${e};\n      background: rgba(24, 31, 42, 0.82);\n      border-radius: 20px;\n      box-shadow: 0 12px 40px rgba(0,0,0,0.3);\n      border: 1px solid rgba(255, 255, 255, 0.08);\n      padding: 18px 14px 14px 14px;\n      min-width: 280px;\n      max-width: 420px;\n      max-height: 85vh;\n      width: 90%;\n      position: relative;\n      display: flex;\n      flex-direction: column;\n      align-items: center;\n      animation: szfy-pop-in 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);\n      color: #f8fafc;\n      overflow-y: auto;\n      scrollbar-width: none;\n    }\n    .szfy-modal::-webkit-scrollbar { display: none; }\n    .szfy-nature {\n      position: absolute;\n      pointer-events: none;\n      z-index: 0;\n      opacity: 0.1;\n      animation: szfy-nature-float 8s infinite alternate ease-in-out;\n      filter: blur(0.5px);\n    }\n    @keyframes szfy-nature-float {\n      0% { transform: translateY(0) rotate(0deg) scale(1); }\n      100% { transform: translateY(-8px) rotate(2deg) scale(1.05); }\n    }\n    .szfy-nature.n1 { --c1: #2d5016; --c2: #4a7c59; --c3: #6b8e23; left: 8px; top: 12px; width: 36px; animation-delay: 0s; }\n    .szfy-nature.n2 { --c1: #8b4513; --c2: #cd853f; --c3: #daa520; right: 12px; top: 24px; width: 32px; animation-delay: 1.8s; }\n    .szfy-nature.n3 { --c1: #228b22; --c2: #32cd32; --c3: #90ee90; left: 32px; bottom: 16px; width: 28px; animation-delay: 3.2s; }\n    .szfy-nature.n4 { --c1: #556b2f; --c2: #6b8e23; --c3: #9acd32; right: 24px; bottom: 8px; width: 40px; animation-delay: 2.4s; }\n    .szfy-nature.n5 { --c1: #8b0000; --c2: #dc143c; --c3: #ff6347; left: 20px; top: 50%; width: 24px; animation-delay: 4.1s; }\n    .szfy-nature.n6 { --c1: #2f4f4f; --c2: #708090; --c3: #a9a9a9; right: 40px; top: 60%; width: 30px; animation-delay: 1.5s; }\n    @keyframes szfy-pop-in {\n      from { transform: scale(0.96); opacity: 0; }\n      to { transform: scale(1); opacity: 1; }\n    }\n    .szfy-modal .szfy-close {\n      position: absolute;\n      top: 10px;\n      right: 10px;\n      background: rgba(255, 255, 255, 0.04);\n      border: 1px solid rgba(255, 255, 255, 0.08);\n      font-size: 18px;\n      color: #94a3b8;\n      cursor: pointer;\n      transition: all 0.15s ease;\n      width: 26px;\n      height: 26px;\n      border-radius: 6px;\n      display: flex;\n      align-items: center;\n      justify-content: center;\n      z-index: 10;\n    }\n    .szfy-modal .szfy-close:hover {\n      color: #ef4444;\n      background: rgba(239, 68, 68, 0.1);\n      border-color: rgba(239, 68, 68, 0.2);\n    }\n    .szfy-modal .szfy-feedback {\n      position: absolute;\n      top: 10px;\n      left: 10px;\n      background: rgba(255, 255, 255, 0.04);\n      border: 1px solid rgba(255, 255, 255, 0.08);\n      font-size: 14px;\n      color: #94a3b8;\n      cursor: pointer;\n      transition: all 0.15s ease;\n      width: 26px;\n      height: 26px;\n      border-radius: 6px;\n      display: flex;\n      align-items: center;\n      justify-content: center;\n      z-index: 10;\n    }\n    .szfy-modal .szfy-feedback:hover {\n      color: #3b82f6;\n      background: rgba(59, 130, 246, 0.1);\n      border-color: rgba(59, 130, 246, 0.2);\n    }\n    .szfy-brand {\n      display: flex;\n      flex-direction: column;\n      align-items: center;\n      gap: 1px;\n      margin-bottom: 10px;\n      z-index: 2;\n    }\n    .szfy-brand img {\n      height: 32px;\n      width: 32px;\n      border-radius: 9px;\n      margin-bottom: 0;\n    }\n    .szfy-brand span {\n      font-size: 1.35rem;\n      font-weight: 800;\n      letter-spacing: -0.01em;\n      background: ${n};\n      -webkit-background-clip: text;\n      -webkit-text-fill-color: transparent;\n      background-clip: text;\n      display: block;\n      text-align: center;\n    }\n    .szfy-message {\n      font-size: 0.92rem;\n      color: #cbd5e1;\n      margin-bottom: 12px;\n      text-align: center;\n      font-weight: 500;\n      line-height: 1.4;\n      opacity: 0.9;\n      z-index: 2;\n      max-width: 340px;\n    }\n    .szfy-instructions {\n      font-size: 0.8rem;\n      color: #94a3b8;\n      text-align: center;\n      font-weight: 400;\n      z-index: 2;\n      margin-bottom: 10px;\n    }\n    .szfy-cards {\n      width: 100%;\n      display: flex;\n      gap: 10px;\n      z-index: 2;\n      justify-content: center;\n      flex-wrap: nowrap;\n      margin-bottom: 16px;\n    }\n    .szfy-card {\n      background: rgba(30, 41, 59, 0.45);\n      border: 1px solid rgba(255, 255, 255, 0.05);\n      border-radius: 14px;\n      padding: 10px 8px;\n      min-width: 120px;\n      flex: 1;\n      display: flex;\n      flex-direction: column;\n      align-items: center;\n      transition: all 0.2s ease;\n      cursor: pointer;\n      user-select: none;\n    }\n    .szfy-card:hover {\n      background: rgba(30, 41, 59, 0.6);\n      border-color: rgba(255, 255, 255, 0.12);\n    }\n    .szfy-card.selected {\n      background: rgba(59, 130, 246, 0.1);\n      border-color: rgba(59, 130, 246, 0.4);\n    }\n    .szfy-thumb {\n      width: 40px;\n      height: 40px;\n      border-radius: 10px;\n      margin-bottom: 6px;\n      object-fit: cover;\n      border: 1px solid rgba(255, 255, 255, 0.12);\n      padding: 1px;\n    }\n    .szfy-label {\n      font-size: 0.82rem;\n      font-weight: 700;\n      margin-bottom: 1px;\n      color: #f1f5f9;\n    }\n    .szfy-desc {\n      font-size: 0.7rem;\n      color: #94a3b8;\n      text-align: center;\n      line-height: 1.2;\n    }\n    .szfy-powered {\n      font-size: 0.68rem;\n      color: #64748b;\n      margin-top: 10px;\n      text-align: center;\n      z-index: 2;\n      display: flex;\n      align-items: center;\n      justify-content: center;\n      gap: 3px;\n    }\n    .szfy-powered .szfy-brand-gradient {\n      font-weight: bold;\n      background: ${n};\n      -webkit-background-clip: text;\n      -webkit-text-fill-color: transparent;\n      background-clip: text;\n      font-size: 0.72rem;\n    }\n    .szfy-powered a {\n      color: #3b82f6;\n      text-decoration: none;\n      font-weight: 600;\n      opacity: 0.9;\n    }\n    @media (max-width: 600px) {\n      .szfy-modal {\n        width: 88%;\n        padding: 14px 12px 12px 12px;\n      }\n      .szfy-brand img { height: 28px; width: 28px; }\n      .szfy-brand span { font-size: 1.15rem; }\n      .szfy-message { font-size: 0.8rem; margin-bottom: 10px; max-width: 220px; }\n      .szfy-cards { gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }\n      .szfy-card { min-width: 90px; padding: 8px 6px; }\n      .szfy-thumb { width: 34px; height: 34px; border-radius: 8px; }\n      .szfy-label { font-size: 0.78rem; }\n      .szfy-desc { font-size: 0.65rem; }\n    }\n    @media (max-height: 500px) {\n      .szfy-modal { padding-top: 10px; max-height: 92vh; }\n      .szfy-brand { margin-bottom: 5px; }\n      .szfy-brand img { height: 24px; width: 24px; }\n      .szfy-brand span { font-size: 1rem; }\n      .szfy-message { font-size: 0.75rem; margin-bottom: 8px; }\n      .szfy-cards { margin-bottom: 8px; }\n    }\n  `, document.head.appendChild(L); let P = { audio: !1, visual: !1, overlay: null, modal: null, btn: null, selectedAudio: 0, selectedVisual: 0 }; function j(e) { s && (s.pause(), s.remove(), s = null), o = e, s = new Audio, s.src = sz_res(e.url), s.loop = !1 !== e.loop, s.volume = "number" == typeof e.volume ? e.volume : 1, s.autoplay = !0, s.id = "szfy-audio", e.url, s.loop, s.volume, d && f > 0 && (s.currentTime = f); const n = s.play(); m = !1, n && "function" == typeof n.then && n.then(() => { z(!0) }).catch(() => { m = !0, se() }), G() } function H() { s && (s.pause(), d = !0, f = s.currentTime, G()) } function Z() { s && s.paused && (s.play().then(() => { z(!0) }).catch(() => { se() }), d = !1, G()) } function _() { s && (s.pause(), s.remove(), s = null), d = !1, f = 0, G() } function V(e) { if (B(), e) { if (i = e, e.file) { N(e.file).then(() => { const e = a.length, n = setInterval(() => { a.length > e && (clearInterval(n), V(a[a.length - 1])) }, 50) }).catch(() => { }) } const rz = (s) => s ? s.replace(/url\(['"]?(assets\/effects\/[^'"]+)['"]?\)/g, (m, p) => `url('${sz_res(p)}')`).replace(/src=['"]?(assets\/effects\/[^'"]+)['"]?/g, (m, p) => `src="${sz_res(p)}"`) : s; if (e.css) { r = document.createElement("style"); r.textContent = rz(e.css); document.head.appendChild(r) } if (e.html) { l = document.createElement("div"); l.innerHTML = rz(e.html); l.id = "szfy-visual"; document.body.appendChild(l) } if (e.js) { c = document.createElement("script"); c.textContent = e.js; document.body.appendChild(c) } u = !1 } } function Y() { l && (l.style.display = "none", u = !0) } function B() { l && (l.remove(), l = null), r && (r.remove(), r = null), c && (c.remove(), c = null), i = null, u = !1 } function G() { const e = { audio: o ? { src: o.url || o.src, paused: d, pauseTime: s ? s.currentTime : 0 } : null, visual: i ? { src: i.url || i.src, hidden: u } : null }; localStorage.setItem("seazonify_state", JSON.stringify(e)) } function R() { const e = { visualUrls: a.map(e => e.file).filter(Boolean), audioUrls: t.map(e => e.audioJsUrl).filter(Boolean), lastSaved: Date.now() }; localStorage.setItem("seazonify_cdn_state", JSON.stringify(e)) } const U = j; j = function (e) { U(e), G() }; const J = H; H = function () { J(), G() }; const O = Z; Z = function () { O(), G() }; const $ = _; _ = function () { $(), G() }; const F = V; V = function (e) { F(e), G() }; const X = B; function W() { if (!P.modal) return; t.length, a.length, P.audio, P.visual; const e = []; t.length && t[P.selectedAudio]?.thumbnail && e.push(t[P.selectedAudio].thumbnail), a.length && a[P.selectedVisual]?.thumbnail && e.push(a[P.selectedVisual].thumbnail), Promise.all(e.map(e => function (e) { return g.has(e) ? Promise.resolve() : new Promise((n, t) => { const a = new Image; a.onload = () => { g.add(e), n() }, a.onerror = () => { t() }, a.src = sz_res(e) }) }(e))).catch(() => { }), Array.from(P.modal.children).forEach(e => { e.classList.contains("szfy-close") || e.classList.contains("szfy-feedback") || e.classList.contains("szfy-brand") || e.classList.contains("szfy-nature") || P.modal.removeChild(e) }); const n = document.createElement("div"); n.className = "szfy-message", n.textContent = "Enjoy immersive soundscapes and stunning visuals as you explore this site.", P.modal.appendChild(n); const o = P.audio && t.length > 0 && !d, i = P.visual && a.length > 0 && !u, s = document.createElement("div"); s.className = "szfy-cards"; const r = document.createElement("div"); r.className = "szfy-card" + (o ? " selected" : ""); const c = sz_res(t.length && t[P.selectedAudio].thumbnail ? t[P.selectedAudio].thumbnail : "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjOTRhM2I4IiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PHBhdGggZD0iTTkgMThoNXYtOC4yYTIgMiAwIDAgMC0xLjY3LTEuOTdsLTItLjMzQTIgMiAwIDAgMCA4IDkuNVYxOGF6Ij48L3BhdGg+PHBhdGggZD0iTTkgMTlhMyAzIDAgMSAwIDAtNmEzIDMgMCAwIDAgMCA2eiI+PC9wYXRoPjxwYXRoIGQ9Ik0xOCAxM2EzIDMgMCAxIDAgMC02YTMgMyAwIDAgMCAwIDZ6Ij48L3BhdGg+PC9zdmc+"); r.innerHTML = `<img class="szfy-thumb" src="${c}" alt="Audio Effect" /><div class="szfy-label">Audio</div><div class="szfy-desc">${t.length ? t[P.selectedAudio].name : "No audio loaded."}</div>`, r.onclick = () => { t.length, P.audio, t.length > 0 && (P.audio && !d ? (H(), E(!1)) : P.audio && d ? (Z(), E(!0)) : (P.audio = !0, E(!0), z(!0), j(t[P.selectedAudio])), r.classList.toggle("selected", P.audio && !d)) }; const f = document.createElement("div"); f.className = "szfy-card" + (i ? " selected" : ""); const m = sz_res(a.length && a[P.selectedVisual].thumbnail ? a[P.selectedVisual].thumbnail : "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjOTRhM2I4IiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PHBhdGggZD0iTTIgOGEyIDIgMCAwIDEgMi0yaDE2YTIgMiAwIDAgMSAyIDJ2OGEyIDIgMCAwIDEtMiAyaC0xNmEyIDIgMCAwIDEtMi0yeiI+PC9wYXRoPjxwYXRoIGQ9Ik0xMiAxM2EzIDMgMCAxIDAgMC02YTMgMyAwIDAgMCAwIDZ6Ij48L3BhdGg+PHBhdGggZD0iTTcgMjFoMTBNMTIgMTd2NCI+PC9wYXRoPjwvc3ZnPg=="); f.innerHTML = `<img class="szfy-thumb" src="${m}" alt="Visual Effect" /><div class="szfy-label">Visual</div><div class="szfy-desc">${a.length ? a[P.selectedVisual].name : "No visual loaded."}</div>`, f.onclick = () => { a.length, P.visual, a.length > 0 && (P.visual && !u ? (Y(), D(!1)) : P.visual && u ? (l && u && (l.style.display = "", u = !1), D(!0)) : (P.visual = !0, D(!0), V(a[P.selectedVisual])), f.classList.toggle("selected", P.visual && !u)) }, s.appendChild(r), s.appendChild(f), P.modal.appendChild(s); const p = document.createElement("div"); p.className = "szfy-instructions", p.textContent = "Toggle audio or visual effects.", P.modal.appendChild(p); const y = document.createElement("div"); y.style.margin = "10px 0 0 0", y.style.display = "flex", y.style.alignItems = "center", y.style.gap = "8px"; const h = document.createElement("input"); h.type = "checkbox", h.id = "szfy-hide-sidebar", h.checked = "1" === localStorage.getItem("szfyHideSidebar"), h.onchange = function () { h.checked ? (localStorage.setItem("szfyHideSidebar", "1"), P.btn && (P.btn.style.display = "none")) : (localStorage.removeItem("szfyHideSidebar"), P.btn && (P.btn.style.display = "")) }; const x = document.createElement("label"); x.htmlFor = "szfy-hide-sidebar", x.style.fontSize = "0.85em", x.style.color = "#cbd5e1", x.textContent = "Hide sidebar button", y.appendChild(h), y.appendChild(x), P.modal.appendChild(y); const w = document.createElement("div"); w.style.margin = "8px 0 0 0", w.style.display = "flex", w.style.alignItems = "center", w.style.gap = "8px"; const C = document.createElement("input"); C.type = "checkbox", C.id = "szfy-no-auto-popup", C.checked = v(), C.onchange = function () { (e => { try { localStorage.setItem(b, e ? "1" : "0") } catch { } })(C.checked) }; const I = document.createElement("label"); I.htmlFor = "szfy-no-auto-popup", I.style.fontSize = "0.85em", I.style.color = "#cbd5e1", I.textContent = "Don't auto-open on new pages or refresh", w.appendChild(C), w.appendChild(I), P.modal.appendChild(w); const k = document.createElement("div"); k.style.fontSize = "0.85em", k.style.color = "#a0aec0", k.style.marginTop = "4px", k.style.textAlign = "center", k.innerHTML = "<strong>Tip:</strong> You can always open this controller by tripple-tapping, tripple-clicking anywhere, or pressing Ctrl+Shift+Z.", P.modal.appendChild(k); const A = document.createElement("div"); A.className = "szfy-powered"; const M = encodeURIComponent(window.location.hostname); A.innerHTML = `Bring your site to life with <a href="https://seazonify.com?ref=${M}" target="_blank" rel="noopener"><span class="szfy-brand-gradient">Seazonify</span></a>.`, P.modal.appendChild(A) } function q() { if (P.overlay) return; const e = document.createElement("div"); e.className = "szfy-overlay", e.onclick = n => { n.target === e && K() }; const n = document.createElement("div"); n.className = "szfy-modal", n.innerHTML += '\n      <svg class="szfy-nature" style="display:none">\n        <symbol id="szfy-leaf" viewBox="0 0 36 36">\n          <path d="M18 2C15 3 12 5 10 8C8 12 9 16 11 20C13 24 16 26 18 28C20 26 23 24 25 20C27 16 28 12 26 8C24 5 21 3 18 2Z" fill="var(--c1)" fill-opacity="0.4"/>\n          <path d="M18 4C16 5 14 7 13 9C12 12 13 15 14 18C15 21 17 23 18 25C19 23 21 21 22 18C23 15 24 12 23 9C22 7 20 5 18 4Z" fill="var(--c2)" fill-opacity="0.3"/>\n          <path d="M18 6C17 7 16 8 15 10C14 12 15 14 16 16C17 18 18 19 18 20C18 19 19 18 20 16C21 14 22 12 21 10C20 8 19 7 18 6Z" fill="var(--c3)" fill-opacity="0.2"/>\n        </symbol>\n      </svg>\n      <svg class="szfy-nature n1"><use href="#szfy-leaf" /></svg>\n      <svg class="szfy-nature n2"><use href="#szfy-leaf" /></svg>\n      <svg class="szfy-nature n3"><use href="#szfy-leaf" /></svg>\n      <svg class="szfy-nature n4"><use href="#szfy-leaf" /></svg>\n      <svg class="szfy-nature n5"><use href="#szfy-leaf" /></svg>\n      <svg class="szfy-nature n6"><use href="#szfy-leaf" /></svg>\n    '; const o = document.createElement("button"); o.className = "szfy-close", o.setAttribute("aria-label", "Close Modal"), o.innerHTML = "&times;", o.onclick = K, n.appendChild(o); const i = document.createElement("button"); i.className = "szfy-feedback", i.setAttribute("aria-label", "Submit Feedback"), i.setAttribute("title", "Give Feedback"), i.innerHTML = '<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"></path></svg>', i.onclick = () => { const e = t.length ? t[P.selectedAudio].name : "None", n = a.length ? a[P.selectedVisual].name : "None", o = window.location.href, i = P.audio && !d, s = P.visual && !u, l = new URL("https://seazonify.com/feedback"); l.searchParams.set("url", o), l.searchParams.set("audio_effect", i ? e : "None"), l.searchParams.set("visual_effect", s ? n : "None"), l.searchParams.set("audio_status", i ? "active" : "inactive"), l.searchParams.set("visual_status", s ? "active" : "inactive"), l.searchParams.set("utm_source", window.location.hostname), l.searchParams.set("utm_medium", "controller_v2"), window.open(l.toString(), "_blank") }, n.appendChild(i); const s = document.createElement("div"); s.className = "szfy-brand", s.innerHTML = `<img src="${p}" alt="Seazonify Logo" /><span>Seazonify</span>`, n.appendChild(s), P.modal = n, W(), e.appendChild(n), document.body.appendChild(e), P.overlay = e, w() || (() => { try { localStorage.setItem(x, "1") } catch { } })(), se() } function K() { P.overlay && (document.body.removeChild(P.overlay), P.overlay = null, P.modal = null) } function Q(e) { N(e).then(() => { setTimeout(() => { a.length > 0 && (T() ? (P.visual = !0, V(a[0]), P.modal && W()) : P.visual = !1) }, 100) }).catch(() => { }) } function ee(e) { N(e).then(() => { setTimeout(() => { if (t.length > 0) { S() ? (P.audio = !0, j(t[0]), P.modal && W()) : P.audio = !1; const e = w() ? 500 : 7e3; setTimeout(() => { P.overlay || v() || q() }, e) } }, 100) }).catch(() => { }) } B = function () { X(), G() }, window.addEventListener("DOMContentLoaded", () => { const e = function () { try { return JSON.parse(localStorage.getItem("seazonify_state")) || {} } catch { return {} } }(), n = (() => { try { return "1" === localStorage.getItem(h) } catch { return !1 } })(); !function a(o = 0) { if (!e.audio || !S()) return; "number" == typeof e.selectedAudio && (P.selectedAudio = e.selectedAudio); const i = t.find(n => e.audio.name && n.name === e.audio.name || e.audio.src && (n.url === e.audio.src || n.audioJsUrl === e.audio.src || n.src === e.audio.src)); if (e.audio.name, i) return P.audio = !0, e.audio && n || (e.audio.paused = !0), j(i), s && e.audio.pauseTime && (s.currentTime = e.audio.pauseTime), e.audio.paused ? (H(), d = !0) : d = !1, void (P.modal && W()); o < 20 && setTimeout(() => a(o + 1), 100) }(), function n(t = 0) { if (!e.visual || !T()) return; "number" == typeof e.selectedVisual && (P.selectedVisual = e.selectedVisual); const o = a.find(n => e.visual.name && n.name === e.visual.name || e.visual.src && (n.url === e.visual.src || n.visualJsUrl === e.visual.src || n.src === e.visual.src || "string" == typeof n.file && n.file === e.visual.src)); if (e.visual.name, o) return P.visual = !0, V(o), e.visual.hidden ? (Y(), u = !0) : u = !1, void (P.modal && W()); t < 20 && setTimeout(() => n(t + 1), 100) }() }), window.SeazonifyController = { open: q, close: K, setAudio: e => { P.audio = !!e, e && t.length ? j(t[P.selectedAudio]) : _() }, setVisual: e => { P.visual = !!e, e && a.length ? V(a[P.selectedVisual]) : B() }, isAudio: () => !!P.audio, isVisual: () => !!P.visual, injectAudioEffect: function (e) { t.push(e), R(), P.modal && W() }, injectVisualEffect: function (e) { a.push(e), R(), P.modal && W() }, clearAudioEffects: function () { t = [], _(), R(), P.modal && W() }, clearVisualEffects: function () { a = [], B(), R(), P.modal && W() } }, function () { if (P.btn) return; const e = document.createElement("button"); e.className = "szfy-sidebar-btn", e.setAttribute("aria-label", "Open Seazonify Controller"), e.innerHTML = `<img src="${p}" alt="" class="szfy-sidebar-logo" />`, e.onclick = q, document.body.appendChild(e), P.btn = e, "1" === localStorage.getItem("szfyHideSidebar") && (e.style.display = "none") }(), function () { const e = document.currentScript; if (!e) return; const n = e.getAttribute("visual"), t = e.getAttribute("audio"), o = e.getAttribute("combo"); if (n) { n.split(",").map(e => e.trim()).forEach(e => { Q(e) }) } if (t) { t.split(",").map(e => e.trim()).forEach(e => { ee(e) }) } if (o) { o.split(",").map(e => e.trim()).forEach(e => { !function (e) { N(e).then(() => { setTimeout(() => { a.length > 0 && (T() ? (P.visual = !0, V(a[0]), P.modal && W()) : P.visual = !1) }, 100) }).catch(() => { }) }(e) }) } }(); const ne = function () { try { return JSON.parse(localStorage.getItem("seazonify_cdn_state") || "{}") } catch { return {} } }(); ne.visualUrls && ne.visualUrls.length > 0 && ne.visualUrls.forEach(e => Q(e)), ne.audioUrls && ne.audioUrls.length > 0 && ne.audioUrls.forEach(e => ee(e)); let te = 0, ae = 0, oe = 0, ie = ""; function se() { if (!m) return; const e = () => { s && S() && !d ? s.play().then(() => { m = !1, t() }).catch(() => { }) : t() }, n = ["click", "touchstart", "keydown"], t = () => { n.forEach(n => document.removeEventListener(n, e, !0)) }; n.forEach(n => document.addEventListener(n, e, !0)) } document.addEventListener("pointerup", function (e) { const n = Date.now(); if (!1 === e.isPrimary) return; const t = "touch" === e.pointerType ? "touch" : "mouse" === e.pointerType ? "mouse" : ""; if (t) { if (ie && ie !== t && (te = 0, ae = 0), ie = t, n - oe < 2e3) return te = 0, void (ae = n); if (n - ae > 600 && (te = 0), te++, ae = n, 3 === te) { if (!window.SeazonifyController || document.querySelector(".szfy-overlay")) return; if (e.target.closest(".szfy-modal")) return; window.SeazonifyController.open(), te = 0, oe = n } } }, !0), document.addEventListener("keydown", function (e) { if ((e.ctrlKey || e.metaKey) && e.shiftKey && ("Z" === e.key || "z" === e.key)) { const e = Date.now(); if (e - oe < 2e3) return; if (!window.SeazonifyController || document.querySelector(".szfy-overlay")) return; window.SeazonifyController.open(), oe = e } })
}();
