1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[177],{445:(e,t,r)=>{"use strict";r.d(t,{default:()=>n});var a=r(5155),o=r(2115);function n(e){let{className:t="",style:r={},title:n=""}=e,[i,s]=(0,o.useState)(!1),[l,d]=(0,o.useState)(!1),c=()=>{try{window.authState?s(window.authState.isLoggedIn):s(!1)}catch(e){s(!1)}};(0,o.useEffect)(()=>{d(!0),c();let e=()=>{c()};return window.addEventListener("authStateChanged",e),()=>{window.removeEventListener("authStateChanged",e)}},[]);let u=async e=>{e.preventDefault(),window.logout&&await window.logout()};return l?(0,a.jsx)("a",{href:"#",className:t,style:r,title:i?"Log Out":n||"Login / Register",onClick:i?u:e=>{e.preventDefault(),window.openAuthModal&&window.openAuthModal("login")},children:(0,a.jsx)("i",{className:i?"bi bi-box-arrow-right":"bi bi-person-circle"})}):(0,a.jsx)("a",{href:"#",className:t,style:r,title:"Loading...",children:(0,a.jsx)("i",{className:"bi bi-person-circle"})})}},653:(e,t,r)=>{"use strict";r.d(t,{default:()=>i});var a=r(5155),o=r(2115);async function n(){try{let e=await fetch("https://users.yorkmix.com/auth/logout.php",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"}});if((await e.json()).success)return window.location.reload(),!0;return!1}catch(e){return!1}}function i(){let[e,t]=(0,o.useState)(!1),[r,i]=(0,o.useState)("login"),[s,l]=(0,o.useState)({email:"",password:"",confirmPassword:"",firstName:"",lastName:""}),[d,c]=(0,o.useState)({}),[u,m]=(0,o.useState)(!1),[p,b]=(0,o.useState)(""),[x,h]=(0,o.useState)(!1),[g,f]=(0,o.useState)(null),w=async()=>{try{let e=await fetch("https://users.yorkmix.com/verifyc.php",{method:"GET",credentials:"include"}),t=await e.json();t.success&&t.authenticated?(h(!0),f(t.user)):(h(!1),f(null))}catch(e){h(!1),f(null)}};(0,o.useEffect)(()=>{let e=async e=>{let{type:r}=e.detail||{};i(r||"login"),t(!0),c({}),b(""),await w(),document.body.style.overflow="hidden"};return window.addEventListener("openAuthModal",e),()=>{window.removeEventListener("openAuthModal",e),document.body.style.overflow=""}},[]);let y=e=>{let{name:t,value:r}=e.target;l(e=>({...e,[t]:r})),d[t]&&c(e=>({...e,[t]:""}))},j=async e=>{if(e.preventDefault(),(()=>{let e={};return s.email?/\S+@\S+\.\S+/.test(s.email)||(e.email="Email is invalid"):e.email="Email is required","forgot"!==r&&(s.password?s.password.length<6&&(e.password="Password must be at least 6 characters"):e.password="Password is required"),"register"===r&&(s.firstName||(e.firstName="First name is required"),s.lastName||(e.lastName="Last name is required"),s.confirmPassword?s.password!==s.confirmPassword&&(e.confirmPassword="Passwords do not match"):e.confirmPassword="Please confirm your password"),c(e),0===Object.keys(e).length})()){m(!0),b("");try{let e=await fetch("https://users.yorkmix.com/auth/".concat("login"===r?"login":"register",".php"),{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({email:s.email,password:s.password,..."register"===r&&{firstName:s.firstName,lastName:s.lastName}})}),t=await e.json();if(t.success){if(b("".concat("login"===r?"Login":"Registration"," successful!")),"login"===r&&t.token)try{await fetch("https://users.yorkmix.com/verifyc.php",{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(t.token)},credentials:"include",body:JSON.stringify({token:t.token})})}catch(e){}setTimeout(()=>{N(),window.location.reload()},1500)}else c({general:t.message||t.error||"An error occurred"})}catch(e){c({general:"Network error. Please try again."})}finally{m(!1)}}},v=async()=>{m(!0),b("");try{document.cookie="yorkMixAuth=false; path=/; domain=.yorkmix.com; max-age=0",document.cookie="auth_token=; path=/; domain=.yorkmix.com; max-age=0",await n()?(b("Logged out successfully!"),h(!1),f(null),setTimeout(()=>{N()},500)):c({general:"Logout failed. Please try again."})}catch(e){c({general:"Network error. Please try again."})}finally{m(!1)}},k=async()=>{if(!s.email)return void c({email:"Please enter your email address"});m(!0),b("");try{let e=await fetch("https://users.yorkmix.com/auth/forgot-password.php",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:s.email})}),t=await e.json();t.success?(b("Password reset email sent! Please check your inbox."),i("login")):c({general:t.message||t.error||"Failed to send reset email"})}catch(e){c({general:"Network error. Please try again."})}finally{m(!1)}},N=()=>{t(!1),document.body.style.overflow="",l({email:"",password:"",confirmPassword:"",firstName:"",lastName:""}),c({}),b("")};return e?(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.6)",backdropFilter:"blur(4px)",zIndex:9998,display:"flex",alignItems:"center",justifyContent:"center",padding:"20px"},onClick:N,children:(0,a.jsxs)("div",{style:{backgroundColor:"white",borderRadius:"12px",boxShadow:"0 20px 60px rgba(0, 0, 0, 0.3)",maxWidth:"500px",width:"100%",maxHeight:"90vh",display:"flex",flexDirection:"column",position:"relative"},onClick:e=>e.stopPropagation(),children:[(0,a.jsxs)("div",{style:{background:"linear-gradient(135deg, #374151 0%, #1f2937 100%)",color:"white",padding:"24px",borderTopLeftRadius:"12px",borderTopRightRadius:"12px",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,a.jsx)("h2",{style:{fontSize:"24px",fontWeight:"bold",margin:0},children:x?"Account Settings":"login"===r?"Welcome Back":"register"===r?"Create Account":"Reset Password"}),(0,a.jsx)("button",{onClick:N,style:{background:"none",border:"none",cursor:"pointer",padding:"4px",color:"white",fontSize:"24px"},onMouseEnter:e=>e.target.style.color="#ccc",onMouseLeave:e=>e.target.style.color="white",children:"\xd7"})]}),(0,a.jsxs)("div",{style:{padding:"24px",overflowY:"auto",flex:1},children:[!x&&(0,a.jsx)("div",{style:{display:"flex",borderBottom:"2px s
1olid #f1f5f9",marginBottom:"24px",gap:"4px"},children:[{key:"login",label:"Login"},{key:"forgot",label:"Reset"}].map(e=>(0,a.jsx)("button",{onClick:()=>{i(e.key),c({}),b("")},style:{flex:1,padding:"12px",border:"none",backgroundColor:"transparent",color:r===e.key?"#2563eb":"#6b7280",fontWeight:r===e.key?"600":"500",borderBottom:r===e.key?"2px solid #2563eb":"2px solid transparent",cursor:"pointer",transition:"all 0.2s"},onMouseEnter:t=>{r!==e.key&&(t.target.style.color="#374151")},onMouseLeave:t=>{r!==e.key&&(t.target.style.color="#6b7280")},children:e.label},e.key))}),x&&g&&(0,a.jsx)("div",{style:{textAlign:"center",marginBottom:"24px"},children:(0,a.jsxs)("div",{style:{backgroundColor:"#f8f9fa",padding:"20px",borderRadius:"12px",marginBottom:"20px",border:"1px solid #e5e7eb"},children:[(0,a.jsxs)("div",{style:{fontSize:"18px",fontWeight:"600",color:"#333",marginBottom:"8px"},children:["Welcome back, ",g.first_name,"!"]}),(0,a.jsx)("div",{style:{fontSize:"14px",color:"#666",marginBottom:"16px"},children:g.email}),(0,a.jsxs)("div",{style:{display:"flex",gap:"12px",justifyContent:"center",flexWrap:"wrap"},children:[(0,a.jsx)("a",{href:"https://users.yorkmix.com/account.php",target:"_blank",rel:"noopener noreferrer",style:{padding:"10px 20px",backgroundColor:"#2563eb",color:"white",textDecoration:"none",borderRadius:"6px",fontSize:"14px",fontWeight:"500",transition:"background-color 0.2s"},children:"Manage Account"}),(0,a.jsx)("button",{onClick:v,disabled:u,style:{padding:"10px 20px",backgroundColor:u?"#9ca3af":"#ef4444",color:"white",border:"none",borderRadius:"6px",fontSize:"14px",fontWeight:"500",cursor:u?"not-allowed":"pointer",transition:"background-color 0.2s"},children:u?"Signing Out...":"Sign Out"})]})]})}),p&&(0,a.jsx)("div",{style:{backgroundColor:"#d1fae5",color:"#065f46",padding:"12px 16px",borderRadius:"8px",marginBottom:"16px",border:"1px solid #a7f3d0"},children:p}),d.general&&(0,a.jsx)("div",{style:{backgroundColor:"#fee2e2",color:"#b91c1c",padding:"12px 16px",borderRadius:"8px",marginBottom:"16px",border:"1px solid #fca5a5"},children:d.general}),!x&&(0,a.jsxs)("form",{onSubmit:"forgot"===r?e=>{e.preventDefault(),k()}:j,children:["login"===r&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{style:{marginBottom:"20px"},children:[(0,a.jsx)("label",{style:{display:"block",marginBottom:"6px",color:"#374151",fontWeight:"500"},children:"Email Address"}),(0,a.jsx)("input",{type:"email",name:"email",value:s.email,onChange:y,style:{width:"100%",padding:"12px 16px",border:d.email?"2px solid #ef4444":"2px solid #e5e7eb",borderRadius:"8px",fontSize:"16px",transition:"border-color 0.2s",outline:"none"},onFocus:e=>{d.email||(e.target.style.borderColor="#2563eb")},onBlur:e=>{d.email||(e.target.style.borderColor="#e5e7eb")},required:!0}),d.email&&(0,a.jsx)("div",{style:{color:"#ef4444",fontSize:"14px",marginTop:"4px"},children:d.email})]}),(0,a.jsxs)("div",{style:{marginBottom:"20px"},children:[(0,a.jsx)("label",{style:{display:"block",marginBottom:"6px",color:"#374151",fontWeight:"500"},children:"Password"}),(0,a.jsx)("input",{type:"password",name:"password",value:s.password,onChange:y,style:{width:"100%",padding:"12px 16px",border:d.password?"2px solid #ef4444":"2px solid #e5e7eb",borderRadius:"8px",fontSize:"16px",transition:"border-color 0.2s",outline:"none"},onFocus:e=>{d.password||(e.target.style.borderColor="#2563eb")},onBlur:e=>{d.password||(e.target.style.borderColor="#e5e7eb")},required:!0}),d.password&&(0,a.jsx)("div",{style:{color:"#ef4444",fontSize:"14px",marginTop:"4px"},children:d.password})]}),(0,a.jsx)("button",{type:"submit",disabled:u,style:{width:"100%",padding:"14px 24px",border:"none",borderRadius:"8px",backgroundColor:u?"#9ca3af":"#2563eb",color:"white",fontWeight:"600",fontSize:"16px",cursor:u?"not-allowed":"pointer",boxShadow:"0 4px 12px rgba(37, 99, 235, 0.3)",transition:"all 0.2s"},onMouseEnter:e=>{u||(e.target.style.backgroundColor="#1d4ed8",e.target.style.boxShadow="0 6px 16px rgba(37, 99, 235, 0.4)")},onMouseLeave:e=>{u||(e.target.style.backgroundColor="#2563eb",e.target.style.boxShadow="0 4px 12px rgba(37, 99, 235, 0.3)")},children:u?"Logging in...":"Log In"})]}),"register"===r&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{style:{display:"flex",gap:"12px",marginBottom:"20px"},children:[(0,a.jsxs)("div",{style:{flex:1},children:[(0,a.jsx)("label",{style:{display:"block",marginBottom:"6px",color:"#374151",fontWeight:"500"},children:"First Name"}),(0,a.jsx)("input",{type:"text",name:"firstName",value:s.firstName,onChange:y,style:{width:"100%",padding:"12px 16px",border:d.firstName?"2px solid #ef4444":"2px s
1olid #e5e7eb",borderRadius:"8px",fontSize:"16px",transition:"border-color 0.2s",outline:"none"},onFocus:e=>{d.firstName||(e.target.style.borderColor="#2563eb")},onBlur:e=>{d.firstName||(e.target.style.borderColor="#e5e7eb")},required:!0}),d.firstName&&(0,a.jsx)("div",{style:{color:"#ef4444",fontSize:"14px",marginTop:"4px"},children:d.firstName})]}),(0,a.jsxs)("div",{style:{flex:1},children:[(0,a.jsx)("label",{style:{display:"block",marginBottom:"6px",color:"#374151",fontWeight:"500"},children:"Last Name"}),(0,a.jsx)("input",{type:"text",name:"lastName",value:s.lastName,onChange:y,style:{width:"100%",padding:"12px 16px",border:d.lastName?"2px solid #ef4444":"2px solid #e5e7eb",borderRadius:"8px",fontSize:"16px",transition:"border-color 0.2s",outline:"none"},onFocus:e=>{d.lastName||(e.target.style.borderColor="#2563eb")},onBlur:e=>{d.lastName||(e.target.style.borderColor="#e5e7eb")},required:!0}),d.lastName&&(0,a.jsx)("div",{style:{color:"#ef4444",fontSize:"14px",marginTop:"4px"},children:d.lastName})]})]}),(0,a.jsxs)("div",{style:{marginBottom:"20px"},children:[(0,a.jsx)("label",{style:{display:"block",marginBottom:"6px",color:"#374151",fontWeight:"500"},children:"Email Address"}),(0,a.jsx)("input",{type:"email",name:"email",value:s.email,onChange:y,style:{width:"100%",padding:"12px 16px",border:d.email?"2px solid #ef4444":"2px solid #e5e7eb",borderRadius:"8px",fontSize:"16px",transition:"border-color 0.2s",outline:"none"},onFocus:e=>{d.email||(e.target.style.borderColor="#2563eb")},onBlur:e=>{d.email||(e.target.style.borderColor="#e5e7eb")},required:!0}),d.email&&(0,a.jsx)("div",{style:{color:"#ef4444",fontSize:"14px",marginTop:"4px"},children:d.email})]}),(0,a.jsxs)("div",{style:{marginBottom:"20px"},children:[(0,a.jsx)("label",{style:{display:"block",marginBottom:"6px",color:"#374151",fontWeight:"500"},children:"Password"}),(0,a.jsx)("input",{type:"password",name:"password",value:s.password,onChange:y,style:{width:"100%",padding:"12px 16px",border:d.password?"2px solid #ef4444":"2px solid #e5e7eb",borderRadius:"8px",fontSize:"16px",transition:"border-color 0.2s",outline:"none"},onFocus:e=>{d.password||(e.target.style.borderColor="#2563eb")},onBlur:e=>{d.password||(e.target.style.borderColor="#e5e7eb")},required:!0}),d.password&&(0,a.jsx)("div",{style:{color:"#ef4444",fontSize:"14px",marginTop:"4px"},children:d.password})]}),(0,a.jsxs)("div",{style:{marginBottom:"24px"},children:[(0,a.jsx)("label",{style:{display:"block",marginBottom:"6px",color:"#374151",fontWeight:"500"},children:"Confirm Password"}),(0,a.jsx)("input",{type:"password",name:"confirmPassword",value:s.confirmPassword,onChange:y,style:{width:"100%",padding:"12px 16px",border:d.confirmPassword?"2px solid #ef4444":"2px solid #e5e7eb",borderRadius:"8px",fontSize:"16px",transition:"border-color 0.2s",outline:"none"},onFocus:e=>{d.confirmPassword||(e.target.style.borderColor="#2563eb")},onBlur:e=>{d.confirmPassword||(e.target.style.borderColor="#e5e7eb")},required:!0}),d.confirmPassword&&(0,a.jsx)("div",{style:{color:"#ef4444",fontSize:"14px",marginTop:"4px"},children:d.confirmPassword})]}),(0,a.jsx)("button",{type:"submit",disabled:u,style:{width:"100%",padding:"14px 24px",border:"none",borderRadius:"8px",backgroundColor:u?"#9ca3af":"#2563eb",color:"white",fontWeight:"600",fontSize:"16px",cursor:u?"not-allowed":"pointer",boxShadow:"0 4px 12px rgba(37, 99, 235, 0.3)",transition:"all 0.2s"},onMouseEnter:e=>{u||(e.target.style.backgroundColor="#1d4ed8",e.target.style.boxShadow="0 6px 16px rgba(37, 99, 235, 0.4)")},onMouseLeave:e=>{u||(e.target.style.backgroundColor="#2563eb",e.target.style.boxShadow="0 4px 12px rgba(37, 99, 235, 0.3)")},children:u?"Creating Account...":"Create Account"})]}),"forgot"===r&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{style:{marginBottom:"20px"},children:[(0,a.jsx)("label",{style:{display:"block",marginBottom:"6px",color:"#374151",fontWeight:"500"},children:"Email Address"}),(0,a.jsx)("input",{type:"email",name:"email",value:s.email,onChange:y,style:{width:"100%",padding:"12px 16px",border:d.email?"2px solid #ef4444":"2px solid #e5e7eb",borderRadius:"8px",fontSize:"16px",transition:"border-color 0.2s",outline:"none"},onFocus:e=>{d.email||(e.target.style.borderColor="#2563eb")},onBlur:e=>{d.email||(e.target.style.borderColor="#e5e7eb")},required:!0}),d.email&&(0,a.jsx)("div",{style:{color:"#ef4444",fontSize:"14px",marginTop:"4px"},children:d.email}),(0,a.jsx)("div",{style:{color:"#6b7280",fontSize:"14px",marginTop:"8px"},children:"Enter your email address and we'll send you a password reset link."})]}),(0,a.jsx)("button",{type:"submit",disabled:u,style:{width:"100%",padding:"14px 24px",border:"none",borderRadius:"8px",backgroundColor:u?"#9c
1a3af":"#2563eb",color:"white",fontWeight:"600",fontSize:"16px",cursor:u?"not-allowed":"pointer",boxShadow:"0 4px 12px rgba(37, 99, 235, 0.3)",transition:"all 0.2s"},onMouseEnter:e=>{u||(e.target.style.backgroundColor="#1d4ed8",e.target.style.boxShadow="0 6px 16px rgba(37, 99, 235, 0.4)")},onMouseLeave:e=>{u||(e.target.style.backgroundColor="#2563eb",e.target.style.boxShadow="0 4px 12px rgba(37, 99, 235, 0.3)")},children:u?"Sending Reset Email...":"Send Reset Email"})]})]})]})]})})}):null}},773:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n});var a=r(5155),o=r(2115);function n(e){let{className:t="",containerId:r="",parentItem:n=null,menuId:i=1}=e,[s,l]=(0,o.useState)(null),[d,c]=(0,o.useState)(!0),[u,m]=(0,o.useState)(null);if((0,o.useEffect)(()=>{(async()=>{try{let e=Date.now(),t=await fetch("https://blogs.theyorkmix.com/navigation-api.php?action=get_navigation&menu_id=".concat(i,"&_t=").concat(e)),r=await t.json();if(r&&r.items){let e=n?r.items.find(e=>e.id===n||e.label===n):r.items.find(e=>"MORE"===e.label);if(e&&e.children&&e.children.length>0)if(e.hasMegamenuColumns||e.children.some(e=>"column_header"===e.item_type)){let t=e.children.filter(e=>"column_header"===e.item_type).map(t=>({name:t.label,width:Math.floor(12/Math.max(e.children.filter(e=>"column_header"===e.item_type).length,1)),items:t.children||[],type:"column",columnId:t.id}));l(t)}else l([{name:"",width:12,items:e.children,type:"simple"}]);else m("No dropdown items available")}else m("Failed to load dropdown data")}catch(e){m("Error loading dropdown")}finally{c(!1)}})()},[n,i]),d)return(0,a.jsx)("div",{className:"col-12 text-center p-3",children:(0,a.jsx)("div",{className:"text-muted",children:"Loading megamenu..."})});if(u)return(0,a.jsx)("div",{className:"col-12 text-center p-3",children:(0,a.jsx)("div",{className:"text-muted",children:u})});if(!s||0===s.length)return(0,a.jsx)("div",{className:"col-12 text-center p-3",children:(0,a.jsx)("div",{className:"text-muted",children:"No megamenu content available"})});let p=function(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n="".concat(r,"-item-").concat(o,"-").concat(t);return e.hasChildren&&e.children&&e.children.length>0?(0,a.jsxs)("li",{className:"dropdown-submenu",children:[(0,a.jsxs)("a",{href:e.url,target:e.target||"_self",className:"dropdown-item dropdown-toggle",children:[e.icon&&(0,a.jsx)("i",{className:"bi ".concat(e.icon," me-2")}),e.label]}),(0,a.jsx)("ul",{className:"dropdown-menu",children:e.children.map((e,r)=>p(e,r,"".concat(o,"-").concat(t)))})]},n):(0,a.jsx)("li",{children:(0,a.jsxs)("a",{href:e.url,target:e.target||"_self",className:"dropdown-item",children:[e.icon&&(0,a.jsx)("i",{className:"bi ".concat(e.icon," me-2")}),e.label]})},n)};return(0,a.jsx)(a.Fragment,{children:s.map((e,t)=>(0,a.jsxs)("div",{className:"col-".concat(e.width),children:["column"===e.type&&e.name&&(0,a.jsx)("h6",{className:"dropdown-header",children:e.name}),(0,a.jsx)("ul",{className:"column"===e.type?"list-unstyled":"dropdown-menu-items",children:e.items.map((o,n)=>"column"===e.type?(0,a.jsxs)("li",{children:[(0,a.jsxs)("a",{href:o.url,target:o.target||"_self",className:"dropdown-item",children:[o.icon&&(0,a.jsx)("i",{className:"bi ".concat(o.icon," me-2")}),o.label]}),o.hasChildren&&o.children&&(0,a.jsx)("ul",{className:"submenu-items ms-3 mt-1",children:o.children.map((e,o)=>(0,a.jsx)("li",{children:(0,a.jsxs)("a",{href:e.url,target:e.target||"_self",className:"dropdown-item small",children:[e.icon&&(0,a.jsx)("i",{className:"bi ".concat(e.icon," me-1")}),e.label]})},"".concat(r,"-child-").concat(t,"-").concat(n,"-").concat(o)))})]},"".concat(r,"-item-").concat(t,"-").concat(n)):p(o,n,t))})]},"".concat(r,"-col-").concat(t)))})}},1289:(e,t,r)=>{"use strict";r.d(t,{default:()=>s});var a=r(5155),o=r(8661),n=r.n(o),i=r(2115);function s(){let[e,t]=(0,i.useState)(!1),[r,o]=(0,i.useState)([]),[s,l]=(0,i.useState)(0),[d,c]=(0,i.useState)(!1),[u,m]=(0,i.useState)("");(0,i.useEffect)(()=>{let e=()=>{p()};return window.addEventListener("openGiftModal",e),window.openGiftModal=e,()=>{window.removeEventListener("openGiftModal",e),delete window.openGiftModal}},[]);let p=async()=>{t(!0),c(!0),m("");try{if(window.authState){var e;if(window.authState.isLoggedIn&&window.authState.hasActiveSubscription&&(null==(e=window.authState.user)?void 0:e.id)){let e=window.authState.user.id,t=await fetch("/api/user-gifts?user_id=".concat(e)),r=await t.json();r.success&&r.data&&r.data.length>0?(o(r.data),l(0)):m("No gifts available at this time.")}else window.authState.isLoggedIn?window.authState.hasActiveSubscription?m("Unable to verify your account. Please try again."):m("Please subscribe to YorkMix+ to access monthly gifts."):m("Please log in to view your gifts.")}else m("Authentication system is loading. Please try again in a moment.")}catch(e){m("Failed to load gifts. Please try again.")}finally{c(!1)}},b=()=>{t(!1),o([]),l(0),m("")};if(!e)return null;let x=r[s];return(0,a.jsxs)("div",{onClick:b,className:"jsx-9b6f4d382e9c8395 modal-overlay",children:[(0,a.jsxs)("div",{onClick:e=>e.stopPropagation(),className:"jsx-9b6f4d382e9c8395 modal-content",children:[(0,a.jsxs)("div",{className:"jsx-9b6f4d382e9c8395 modal-header",children:[(0,a.jsx)("h2",{className:"jsx-9b6f4d382e9c8395",children:"Your Monthly Gifts"}),(0,a.jsx)("button",{onClick:b,className:"jsx-9b6f4d382e9c8395 close-button",children:(0,a.jsx)("i",{className:"jsx-9b6f4d382e9c8395 bi bi-x-lg"})})]}),(0,a.jsxs)("div",{className:"jsx-9b6f4d382e9c8395 modal-body",children:[d&&(0,a.jsxs)("div",{className:"jsx-9b6f4d382e9c8395 loading-container",children:[(0,a.jsx)("div",{className:"jsx-9b6f4d382e9c8395 spinner"}),(0,a.jsx)("p",{className:"jsx-9b6f4d382e9c8395",children:"Loading your gifts..."})]}),u&&(0,a.jsxs)("div",{className:"jsx-9b6f4d382e9c8395 error-container",children:[(0,a.jsx)("p",{className:"jsx-9b6f4d382e9c8395 error-message",children:u}),(0,a.jsx)("button",{onClick:b,className:"jsx-9b6f4d382e9c8395 btn-primary",children:"Close"})]}),!d&&!u&&r.length>0&&x&&(0,a.jsxs)("div",{className:"jsx-9b6f4d382e9c8395 gift-container",children:[r.length>1&&(0,a.jsxs)("div",{className:"jsx-9b6f4d382e9c8395 gift-navigation",children:[(0,a.jsx)("button",{onClick:()=>{r.length>1&&l(e=>(e-1+r.length)%r.length)},disabled:r.length<=1,className:"jsx-9b6f4d382e9c8395 nav-button prev",children:(0,a.jsx)("i",{className:"jsx-9b6f4d382e9c8395 bi bi-chevron-left"})}),(0,a.jsx)("div",{className:"jsx-9b6f4d382e9c8395 gift-indicators",children:r.map((e,t)=>(0,a.jsx)("button",{onClick:()=>{l(t)},className:"jsx-9b6f4d382e9c8395 "+"indicator ".concat(t===s?"active":"")},t))}),(0,a.jsx)("button",{onClick:()=>{r.length>1&&l(e=>(e+1)%r.length)},disabled:r.length<=1,className:"jsx-9b6f4d382e9c8395 nav-button next",children:(0,a.jsx)("i",{className:"jsx-9b6f4d382e9c8395 bi bi-chevron-right"})})]}),(0,a.jsxs)("div",{className:"jsx-9b6f4d382e9c8395 gift-card",children:[(0,a.jsxs)("div",{className:"jsx-9b6f4d382e9c8395 gift-header",children:[(0,a.jsx)("h3",{className:"jsx-9b6f4d382e9c8395",children:x.gift_name}),(0,a.jsx)("p",{className:"jsx-9b6f4d382e9c8395 gift-month",children:x.gift_month})]}),x.gift_description&&(0,a.jsx)("div",{className:"jsx-9b6f4d382e9c8395 gift-description",children:(0,a.jsx)("p",{className:"jsx-9b6f4d382e9c8395",children:x.gift_description})}),(0,a.jsx)("div",{className:"jsx-9b6f4d382e9c8395 redeem-container",children:x.redeem_url?(0,a.jsx)("a",{href:x.redeem_url,onClick:e=>{window.location.href=x.redeem_url},className:"jsx-9b6f4d382e9c8395 redeem-button",children:x.redeem_button_text||"Redeem Gift"}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"jsx-9b6f4d382e9c8395 qr-code",children:(0,a.jsx)("img",{src:"https://api.qrserver.com/v1/create-qr-code/?size=160x160&data=".concat(encodeURIComponent(x.scan_url||x.qr_code)),alt:"QR Code for ".concat(x.gift_name),onError:e=>{e.target.src="https://api.qrserver.com/v1/create-qr-code/?size=160x160&data=".concat(encodeURIComponent(x.qr_code))},onLoad:()=>{},className:"jsx-9b6f4d382e9c8395"})}),(0,a.jsx)("p",{className:"jsx-9b6f4d382e9c8395 qr-code-label",children:x.qr_code})]})}),x.gift_instructions&&!x.redeem_url&&(0,a.jsxs)("div",{className:"jsx-9b6f4d382e9c8395 gift-instructions",children:[(0,a.jsx)("h4",{className:"jsx-9b6f4d382e9c8395",children:"How to Redeem:"}),(0,a.jsx)("p",{className:"jsx-9b6f4d382e9c8395",children:x.gift_instructions})]}),(0,a.jsx)("div",{className:"jsx-9b6f4d382e9c8395 gift-footer",children:(0,a.jsxs)("p",{className:"jsx-9b6f4d382e9c8395 expires-text",children:["Expires: ",new Date(x.expires_at).toLocaleDateString("en-GB",{day:"numeric",month:"long",year:"numeric"})]})})]})]}),!d&&!u&&0===r.length&&(0,a.jsxs)("div",{className:"jsx-9b6f4d382e9c8395 no-gifts-container",children:[(0,a.jsx)("i",{style:{fontSize:"3rem",color:"#ccc",marginBottom:"1rem"},className:"jsx-9b6f4d382e9c8395 bi bi-gift"}),(0,a.jsx)("p",{className:"jsx-9b6f4d382e9c8395",children:"No gifts available at this time."}),(0,a.jsx)("p",{className:"jsx-9b6f4d382e9c8395 small-text",children:"Gifts are generated monthly for active subscribers."})]})]})]}
1),(0,a.jsx)(n(),{id:"9b6f4d382e9c8395",children:".modal-overlay.jsx-9b6f4d382e9c8395{position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,.7);display:flex;align-items:center;justify-content:center;z-index:10000;padding:20px}@media(max-width:480px){.modal-overlay.jsx-9b6f4d382e9c8395{padding:10px;align-items:flex-start;padding-top:20px}}.modal-content.jsx-9b6f4d382e9c8395{background:white;border-radius:12px;max-width:400px;width:100%;max-height:95vh;overflow-y:auto;box-shadow:0 10px 25px rgba(0,0,0,.3)}@media(max-width:480px){.modal-content.jsx-9b6f4d382e9c8395{max-width:calc(100vw - 20px);margin:10px;border-radius:8px}}.modal-header.jsx-9b6f4d382e9c8395{display:flex;justify-content:space-between;align-items:center;padding:16px 20px;border-bottom:1px solid#eee}.modal-header.jsx-9b6f4d382e9c8395 h2.jsx-9b6f4d382e9c8395{margin:0;font-size:1.3rem;color:#333}@media(max-width:480px){.modal-header.jsx-9b6f4d382e9c8395{padding:14px 16px}.modal-header.jsx-9b6f4d382e9c8395 h2.jsx-9b6f4d382e9c8395{font-size:1.2rem}}.close-button.jsx-9b6f4d382e9c8395{background:none;border:none;font-size:1.2rem;cursor:pointer;color:#666;padding:4px}.close-button.jsx-9b6f4d382e9c8395:hover{color:#333}.modal-body.jsx-9b6f4d382e9c8395{padding:20px}@media(max-width:480px){.modal-body.jsx-9b6f4d382e9c8395{padding:16px}}.loading-container.jsx-9b6f4d382e9c8395,.error-container.jsx-9b6f4d382e9c8395,.no-gifts-container.jsx-9b6f4d382e9c8395{text-align:center;padding:30px 20px}@media(max-width:480px){.loading-container.jsx-9b6f4d382e9c8395,.error-container.jsx-9b6f4d382e9c8395,.no-gifts-container.jsx-9b6f4d382e9c8395{padding:20px 16px}}.spinner.jsx-9b6f4d382e9c8395{width:40px;height:40px;border:4px solid#f3f3f3;border-top:4px solid#fa770f;border-radius:50%;animation:spin 1s linear infinite;margin:0 auto 20px}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.error-message.jsx-9b6f4d382e9c8395{color:#dc3545;margin-bottom:20px}.small-text.jsx-9b6f4d382e9c8395{color:#666;font-size:.9rem}.gift-navigation.jsx-9b6f4d382e9c8395{display:flex;align-items:center;justify-content:center;margin-bottom:16px;gap:16px}@media(max-width:480px){.gift-navigation.jsx-9b6f4d382e9c8395{gap:12px;margin-bottom:12px}}.nav-button.jsx-9b6f4d382e9c8395{background:#f8f9fa;border:1px solid#dee2e6;border-radius:50%;width:36px;height:36px;display:flex;align-items:center;justify-content:center;cursor:pointer;color:#333}@media(max-width:480px){.nav-button.jsx-9b6f4d382e9c8395{width:32px;height:32px;font-size:.9rem}}.nav-button.jsx-9b6f4d382e9c8395:hover:not(:disabled){background:#e9ecef}.nav-button.jsx-9b6f4d382e9c8395:disabled{opacity:.5;cursor:not-allowed}.gift-indicators.jsx-9b6f4d382e9c8395{display:flex;gap:8px}.indicator.jsx-9b6f4d382e9c8395{width:12px;height:12px;border-radius:50%;border:none;background:#dee2e6;cursor:pointer}.indicator.active.jsx-9b6f4d382e9c8395{background:#fa770f}.gift-card.jsx-9b6f4d382e9c8395{background:linear-gradient(135deg,#fa770f 0%,#ff8c42 100%);color:white;border-radius:10px;padding:20px;text-align:center}@media(max-width:480px){.gift-card.jsx-9b6f4d382e9c8395{padding:16px;border-radius:8px}}.gift-header.jsx-9b6f4d382e9c8395 h3.jsx-9b6f4d382e9c8395{margin:0 0 6px 0;font-size:1.3rem}.gift-month.jsx-9b6f4d382e9c8395{margin:0 0 14px 0;opacity:.9;font-size:1rem}@media(max-width:480px){.gift-header.jsx-9b6f4d382e9c8395 h3.jsx-9b6f4d382e9c8395{font-size:1.2rem;margin-bottom:4px}.gift-month.jsx-9b6f4d382e9c8395{font-size:.9rem;margin-bottom:12px}}.gift-description.jsx-9b6f4d382e9c8395{margin-bottom:18px;padding:14px;background:rgba(255,255,255,.1);border-radius:6px}.redeem-container.jsx-9b6f4d382e9c8395{margin:18px 0}.redeem-button.jsx-9b6f4d382e9c8395{display:inline-block;background:white;color:#fa770f;padding:14px 28px;border-radius:8px;font-size:1rem;font-weight:600;text-decoration:none;cursor:pointer;transition:all.2s ease;border:2px solid white}.redeem-button.jsx-9b6f4d382e9c8395:hover{background:rgba(255,255,255,.9);transform:translatey(-2px);box-shadow:0 4px 12px rgba(0,0,0,.2)}.redeem-button.jsx-9b6f4d382e9c8395:active{transform:translatey(0)}@media(max-width:480px){.gift-description.jsx-9b6f4d382e9c8395{margin-bottom:14px;padding:12px;font-size:.9rem}.redeem-container.jsx-9b6f4d382e9c8395{margin:14px 0}.redeem-button.jsx-9b6f4d382e9c8395{padding:12px 24px;font-size:.9rem}}.qr-code.jsx-9b6f4d382e9c8395{background:white;padding:14px;border-radius:6px;display:inline-block;margin-bottom:10px}.qr-code.jsx-9b6f4d382e9c8395 img.jsx-9b6f4d382e9c8395{width:160px;height:160px;display:block}@media(max-width:480px){.qr-code.jsx-9b6f4d382e9c8395{padding:10px}.qr-code.jsx-9b6f4d382e9c8395 img.jsx-9b6f4d382e9c8395{width:120px;height:120px}}.qr-code-label.jsx-9b6f4d382e9c8395{font-family:monospace;font-size:.9rem;margin:0;opacity:.9}.gift-instructions.jsx-9b6f4d382e9c8395{margin-top:18px;padding:14px;background:rgba(255,255,255,.1);border-radius:6px;text-align:left}.gift-instructions.jsx-9b6f4d382e9c8395 h4.jsx-9b6f4d382e9c8395{margin:0 0 6px 0;font-size:.95rem}.gift-instructions.jsx-9b6f4d382e9c8395 p.jsx-9b6f4d382e9c8395{margin:0;font-size:.85rem;line-height:1.4}.gift-footer.jsx-9b6f4d382e9c8395{margin-top:18px;padding-top:14px;border-top:1px solid rgba(255,255,255,.2)}@media(max-width:480px){.gift-instructions.jsx-9b6f4d382e9c8395{margin-top:14px;padding:12px}.gift-instructions.jsx-9b6f4d382e9c8395 h4.jsx-9b6f4d382e9c8395{font-size:.9rem}.gift-instructions.jsx-9b6f4d382e9c8395 p.jsx-9b6f4d382e9c8395{font-size:.8rem}.gift-footer.jsx-9b6f4d382e9c8395{margin-top:14px;padding-top:12px}}.expires-text.jsx-9b6f4d382e9c8395{margin:0;font-size:.85rem;opacity:.9}@media(max-width:480px){.expires-text.jsx-9b6f4d382e9c8395{font-size:.8rem}}.btn-primary.jsx-9b6f4d382e9c8395{background:#fa770f;color:white;border:none;padding:10px 20px;border-radius:6px;cursor:pointer;font-size:1rem}.btn-primary.jsx-9b6f4d382e9c8395:hover{background:#e06a0d}"})]})}},1735:(e,t,r)=>{"use strict";r.d(t,{default:()=>l});var a=r(5155),o=r(8661),n=r.n(o),i=r(2115),s=r(7958);function l(){let[e,t]=(0,i.useState)(!1);(0,i.useEffect)(()=>{let e=()=>{t(!0)};return window.addEventListener("openSearchModal",e),window.openSearchModal=e,()=>{window.removeEventListener("openSearchModal",e),delete window.openSearchModal}},[]);let r=()=>{t(!1)};return((0,i.useEffect)(()=>{let t=t=>{"Escape"===t.key&&e&&r()};return e&&(document.addEventListener("keydown",t),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",t),document.body.style.overflow=""}},[e]),e)?(0,a.jsxs)("div",{onClick:r,className:"jsx-519e030b1120251b modal-overlay",children:[(0,a.jsxs)("div",{onClick:e=>e.stopPropagation(),className:"jsx-519e030b1120251b modal-content",children:[(0,a.jsxs)("div",{className:"jsx-519e030b1120251b modal-header",children:[(0,a.jsx)("h2",{className:"jsx-519e030b1120251b",children:"Search YorkMix"}),(0,a.jsx)("button",{onClick:r,className:"jsx-519e030b1120251b close-button",children:(0,a.jsx)("i",{className:"jsx-519e030b1120251b bi bi-x-lg"})})]}),(0,a.jsx)("div",{className:"jsx-519e030b1120251b modal-body",children:(0,a.jsx)(s.A,{placeholder:"Search YorkMix.com",resultsLimit:20})})]}
1),(0,a.jsx)(n(),{id:"519e030b1120251b",children:".modal-overlay.jsx-519e030b1120251b{position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,.7);display:flex;align-items:flex-start;justify-content:center;z-index:10000;padding:50px 20px 20px;overflow-y:auto}@media(max-width:480px){.modal-overlay.jsx-519e030b1120251b{padding:20px 10px 10px}}.modal-content.jsx-519e030b1120251b{background:white;border-radius:12px;max-width:600px;width:100%;max-height:90vh;overflow-y:auto;box-shadow:0 10px 25px rgba(0,0,0,.3);margin:auto}@media(max-width:480px){.modal-content.jsx-519e030b1120251b{max-width:calc(100vw - 20px);margin:10px;border-radius:8px;max-height:85vh}}.modal-header.jsx-519e030b1120251b{display:flex;justify-content:space-between;align-items:center;padding:20px 24px;border-bottom:1px solid#eee;position:sticky;top:0;background:white;z-index:1;border-radius:12px 12px 0 0}.modal-header.jsx-519e030b1120251b h2.jsx-519e030b1120251b{margin:0;font-size:1.4rem;color:#333;font-weight:600}@media(max-width:480px){.modal-header.jsx-519e030b1120251b{padding:16px 20px;border-radius:8px 8px 0 0}.modal-header.jsx-519e030b1120251b h2.jsx-519e030b1120251b{font-size:1.3rem}}.close-button.jsx-519e030b1120251b{background:none;border:none;font-size:1.3rem;cursor:pointer;color:#666;padding:8px;border-radius:4px;display:flex;align-items:center;justify-content:center}.close-button.jsx-519e030b1120251b:hover{color:#333;background:#f8f9fa}.modal-body.jsx-519e030b1120251b{padding:24px}@media(max-width:480px){.modal-body.jsx-519e030b1120251b{padding:20px}}.modal-body.jsx-519e030b1120251b .search-tool{margin:0}.modal-body.jsx-519e030b1120251b .search-form{margin-bottom:20px}.modal-body.jsx-519e030b1120251b .search-input{font-size:1.1rem;padding:12px 16px;border-radius:8px;border:2px solid#e9ecef}.modal-body.jsx-519e030b1120251b .search-input:focus{border-color:#fa770f;box-shadow:0 0 0 .2rem rgba(250,119,15,.25)}.modal-body.jsx-519e030b1120251b .btn-primary{padding:12px 24px;font-size:1.1rem;background:#fa770f;border:none;border-radius:8px}.modal-body.jsx-519e030b1120251b .btn-primary:hover{background:#e06a0d}.modal-body.jsx-519e030b1120251b .search-results{max-height:60vh;overflow-y:auto}@media(max-width:480px){.modal-body.jsx-519e030b1120251b .search-results{max-height:50vh}}.modal-body.jsx-519e030b1120251b .search-results ul li{padding:12px 0;border-bottom:1px solid#f8f9fa}.modal-body.jsx-519e030b1120251b .search-results ul li:last-child{border-bottom:none}.modal-body.jsx-519e030b1120251b .search-results a{font-size:1.1rem;line-height:1.4;color:#333}.modal-body.jsx-519e030b1120251b .search-results a:hover{color:#fa770f}.modal-body.jsx-519e030b1120251b .text-muted{color:#6c757d!important}.modal-body.jsx-519e030b1120251b .btn-outline-primary{border-color:#fa770f;color:#fa770f}.modal-body.jsx-519e030b1120251b .btn-outline-primary:hover{background:#fa770f;border-color:#fa770f}"})]}):null}},2106:(e,t,r)=>{"use strict";r.d(t,{default:()=>o});var a=r(5155);function o(){return(0,a.jsx)("p",{children:(0,a.jsx)("button",{onClick:()=>{window.open("https://player.yorkmixradio.com/player/","name","width=400,height=700")},style:{background:"none",border:"none",color:"inherit",textDecoration:"underline",cursor:"pointer",padding:0,font:"inherit"},children:"Click here to listen to YorkMix Radio"})})}},2368:(e,t,r)=>{"use strict";r.d(t,{default:()=>o});var a=r(2115);function o(){return(0,a.useEffect)(()=>{let e=!1,t=!1,r=async()=>{if(!e)try{if(await new Promise((e,t)=>{if(window.freestar)return void e();if(document.querySelector('script[src*="pubfig.min.js"]')){let r=setInterval(()=>{window.freestar&&(clearInterval(r),e())},50);setTimeout(()=>{clearInterval(r),window.freestar?e():t(Error("Freestar script timeout"))},1e4);return}let r=document.querySelector("base"),a=r?r.href:null;if(window.freestar=window.freestar||{},window.freestar.queue=window.freestar.queue||[],window.freestar.config=window.freestar.config||{},window.freestar.config.enabled_slots=window.freestar.config.enabled_slots||[],window.freestarWithoutBase=function(e){if(!e)return;let t=document.querySelector("base");t&&t.removeAttribute("href");let r=setTimeout(()=>{},1e4);try{e(),clearTimeout(r)}catch(e){clearTimeout(r)}finally{t&&a&&(t.href=a)}},window.freestar&&(window.freestar.onConsentReady=function(){try{window.freestar&&window.freestar._originalOnConsentReady&&window.freestar._originalOnConsentReady.apply(this,arguments)}catch(e){}}),window.location&&window.location.search&&window.freestar&&window.freestar.config)for(let[e,t]of new URLSearchParams(window.location.search))window.freestar.config[e]=t;window.freestar&&(window.freestar.initCallback=function(){window.freestarWithoutBase&&window.freestarWithoutBase(()=>{try{window.freestar&&window.freestar.config&&window.freestar.config.enabled_slots&&(0===window.freestar.config.enabled_slots.length?window.freestar.initCallbackCalled=!1:window.freestar.newAdSlots&&window.freestar.newAdSlots(window.freestar.config.enabled_slots))}catch(e){}})});let o=document.createElement("script");o.src="https://a.pub.network/yorkmix-com/pubfig.min.js",o.async=!0,o.setAttribute("data-cfasync","false"),o.onload=()=>{e()},o.onerror=()=>{t(Error("Failed to load Freestar script"))},document.head.appendChild(o)}),document.querySelectorAll("[data-freestar-ad]:not([data-freestar-initialized]
1)").forEach(e=>{if(e.setAttribute("data-freestar-initialized","true"),window.freestar&&window.freestar.newAdSlots)try{document.getElementById(e.id)&&window.freestarWithoutBase&&window.freestarWithoutBase(()=>{window.freestar&&window.freestar.newAdSlots&&window.freestar.newAdSlots([{placementName:e.id,slotId:e.id}])})}catch(e){}}),window.freestar&&window.freestar.initCallback)try{window.freestarWithoutBase&&window.freestarWithoutBase(()=>{window.freestar&&window.freestar.initCallback&&window.freestar.initCallback()})}catch(e){}}catch(e){}},a=()=>{e&&(document.querySelectorAll("[data-ad-url]").forEach(e=>{e.setAttribute("data-ad-loaded","subscriber-disabled"),e.style.display="none"}),document.querySelectorAll("[data-freestar-ad]").forEach(e=>{e.setAttribute("data-ad-loaded","subscriber-disabled");let t=e.closest(".nationaladblock");t?t.innerHTML='<div style="color: #6c757d; font-style: italic; padding: 20px; text-align: center; background: #f8f9fa; border: 1px dashed #6c757d; border-radius: 5px;">Thank you for being a YorkMix+ subscriber</div>':e.innerHTML='<div style="color: #6c757d; font-style: italic; padding: 20px; text-align: center; background: #f8f9fa; border: 1px dashed #6c757d; border-radius: 5px;">Thank you for being a YorkMix+ subscriber</div>'}))},o=()=>{if(e)return void a();let t=Array.from(document.querySelectorAll('[data-ad-url]:not([data-ad-loaded]):not([data-ad-loaded="true"]):not([data-ad-loaded="loading"]):not([data-ad-loaded="subscriber-disabled"])')).filter(e=>{let t=e.innerHTML.trim();return!(t.length>50)||!!t.includes("\x3c!-- Ad content will be loaded by client-side script --\x3e")||(e.setAttribute("data-ad-loaded","already-has-content"),!1)});t.length>0&&t.forEach(e=>{let t=e.getAttribute("data-ad-url");t&&n(e,t)})},n=async function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;try{e.setAttribute("data-ad-loaded","loading");let r=await fetch(t,{cache:"no-store"});if(!r.ok)throw Error("Failed to fetch ad: ".concat(r.status));let a=await r.text();if(!a||0===a.trim().length)throw Error("Empty ad response received");e.innerHTML=a,e.querySelectorAll("script").forEach(e=>{let t=document.createElement("script");Array.from(e.attributes).forEach(e=>{t.setAttribute(e.name,e.value)}),t.appendChild(document.createTextNode(e.innerHTML)),e.parentNode.replaceChild(t,e)}),e.setAttribute("data-ad-loaded","true")}catch(a){r<3?(e.innerHTML='<div style="text-align: center; padding: 10px; font-size: 12px; color: #666; background: #f5f5f5; border-radius: 4px;">Loading advertisement... ('.concat(r+1,"/").concat(4,")</div>"),e.setAttribute("data-ad-loaded","retrying"),setTimeout(()=>{n(e,t,r+1)},2e3*(r+1))):(e.innerHTML='<div style="text-align: center; padding: 10px; font-size: 12px; color: #999; background: #f5f5f5; border-radius: 4px;">Advertisement currently unavailable</div>',e.setAttribute("data-ad-loaded","permanent-error"))}},i=async()=>{(()=>{if(!t){try{if(window.authState)return e=window.authState.hasActiveSubscription,t=!0,e}catch(e){}return e=!1}})(),e?a():(r(),o())},s=()=>{t=!1,i()},l=t=>{if(e)a();else if(r(),window.freestar&&window.freestar.queue)try{window.freestar.queue.push(function(){window.freestarWithoutBase&&window.freestarWithoutBase(()=>{try{window.freestar&&window.freestar.newIai&&window.freestar.newIai("yorkmix_dynamic_incontent_iai")}catch(e){}})})}catch(e){}},d=t=>{if(e)a();else if(r(),window.freestar&&window.freestar.queue)try{window.freestar.queue.push(function(){window.freestarWithoutBase&&window.freestarWithoutBase(()=>{try{window.freestar&&window.freestar.newIai&&window.freestar.newIai("yorkmix_dynamic_incontent_iai")}catch(e){}})})}catch(e){}};window.addEventListener("authStateChanged",s),window.addEventListener("infiniteScrollArticleLoaded",l),window.addEventListener("liveBlogContentLoaded",d),requestAnimationFrame(()=>{i()});let c=new MutationObserver(t=>{let n=[],i=[];t.forEach(e=>{e.addedNodes.forEach(e=>{if(e.nodeType===Node.ELEMENT_NODE){e.getAttribute&&e.getAttribute("data-freestar-ad")&&!e.getAttribute("data-freestar-initialized")&&n.push(e);let t=e.querySelectorAll?e.querySelectorAll("[data-freestar-ad]:not([data-freestar-initialized]
1)"):[];n.push(...t),e.getAttribute&&e.getAttribute("data-ad-url")&&!e.getAttribute("data-ad-loaded")&&i.push(e);let r=e.querySelectorAll?e.querySelectorAll("[data-ad-url]:not([data-ad-loaded])"):[];i.push(...r)}})}),(n.length>0||i.length>0)&&(e?a():(n.length>0&&r(),i.length>0&&o()))});return c.observe(document.body,{childList:!0,subtree:!0}),()=>{c.disconnect(),window.removeEventListener("authStateChanged",s),window.removeEventListener("infiniteScrollArticleLoaded",l),window.removeEventListener("liveBlogContentLoaded",d)}},[]),null}},2909:(e,t,r)=>{"use strict";r.d(t,{default:()=>n});var a=r(5155),o=r(2115);function n(e){let{className:t="",style:r={}}=e,[n,i]=(0,o.useState)(!1),[s,l]=(0,o.useState)(!1),[d,c]=(0,o.useState)(0);return("".concat(t||"default","-").concat(Date.now(),"-").concat(Math.random().toString(36).substr(2,5)),(0,o.useEffect)(()=>{i(!0);let e=async()=>{try{if(window.authState){var e;if(window.authState.isLoggedIn&&window.authState.hasActiveSubscription&&(null==(e=window.authState.user)?void 0:e.id))try{let e=await fetch("/api/user-gifts?user_id=".concat(window.authState.user.id));if(e.ok){let t=await e.json();if(t.success&&t.data&&t.data.length>0){let e=t.data.length;l(!0),c(e)}else l(!1),c(0)}else l(!1),c(0)}catch(e){l(!1),c(0)}else l(!1),c(0)}else l(!1),c(0)}catch(e){l(!1),c(0)}};setTimeout(e,200);let t=()=>{e()};return window.addEventListener("authStateChanged",t),()=>{window.removeEventListener("authStateChanged",t)}},[]),n&&s)?(0,a.jsxs)("a",{href:"#",className:t,style:{position:"relative",textDecoration:"none",display:"inline-block",...r},title:"You have ".concat(d," gift").concat(d>1?"s":""," available!"),onClick:e=>{e.preventDefault(),window.openGiftModal&&window.openGiftModal()},children:[(0,a.jsx)("i",{className:"bi bi-gift"}),d>0&&(0,a.jsx)("span",{style:{position:"absolute",top:"-8px",right:"-8px",background:"#dc3545",color:"white",borderRadius:"50%",width:"16px",height:"16px",fontSize:"10px",display:"flex",alignItems:"center",justifyContent:"center",fontWeight:"bold"},children:d>9?"9+":d})]}):null}},3691:(e,t,r)=>{"use strict";r.d(t,{default:()=>n});var a=r(5155),o=r(8321);function n(){return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(o.default,{src:"https://fundingchoicesmessages.google.com/i/pub-4193607936331778?ers=1",strategy:"afterInteractive"}),(0,a.jsx)(o.default,{id:"google-cmp",strategy:"afterInteractive",children:"\n (function() {\n function signalGooglefcPresent() {\n if (!window.frames['googlefcPresent']) {\n if (document.body) {\n const iframe = document.createElement('iframe');\n iframe.style = 'width: 0; height: 0; border: none; z-index: -1000; left: -1000px; top: -1000px;';\n iframe.style.display = 'none';\n iframe.name = 'googlefcPresent';\n document.body.appendChild(iframe);\n } else {\n setTimeout(signalGooglefcPresent, 0);\n }\n }\n }\n signalGooglefcPresent();\n })();\n "})]})}},5220:(e,t,r)=>{"use strict";r.d(t,{default:()=>o});var a=r(2115);function o(){return(0,a.useEffect)(()=>{window.closeMobileMenu=()=>{let e=document.getElementById("sideMenu"),t=document.getElementById("menuOverlay");e&&t&&(e.classList.remove("active"),t.classList.remove("active"),document.body.style.overflow="")};let e=()=>{let e=document.querySelector(".desktop-header-sticky .bi-play-circle");e&&(e.style.cursor="pointer",e.onclick=()=>{window.open("https://player.yorkmixradio.com/player/","name","width=400,height=700")});let t=document.querySelector(".mobile-sticky-play");t&&(t.onclick=()=>{window.open("https://player.yorkmixradio.com/player/","name","width=400,height=700")});let r=document.querySelector('.mobile-header-sticky div[style*="inline-block"]');r&&(r.style.cursor="pointer",r.onclick=()=>{let e=document.getElementById("sideMenu"),t=document.getElementById("menuOverlay");e&&t&&(e.classList.add("active"),t.classList.add("active"),document.body.style.overflow="hidden")});let a=document.querySelector("#sideMenu .bi-play-circle");a&&(a.style.cursor="pointer",a.onclick=()=>{window.open("https://player.yorkmixradio.com/player/","name","width=400,height=700")})};e();let t=new MutationObserver(()=>{e()});return t.observe(document.body,{childList:!0,subtree:!0}),()=>{t.disconnect()}},[]),null}},5399:(e,t,r)=>{"use strict";r.d(t,{default:()=>n});var a=r(5155),o=r(8321);function n(e){let{measurementId:t}=e;return t?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(o.default,{src:"https://www.googletagmanager.com/gtag/js?i
1d=".concat(t),strategy:"afterInteractive"}),(0,a.jsx)(o.default,{id:"google-analytics",strategy:"afterInteractive",children:"\n window.dataLayer = window.dataLayer || [];\n function gtag(){dataLayer.push(arguments);}\n window.gtag = gtag;\n \n // Set default consent state (denied until CMP loads)\n gtag('consent', 'default', {\n 'analytics_storage': 'denied',\n 'ad_storage': 'denied',\n 'ad_user_data': 'denied',\n 'ad_personalization': 'denied',\n 'wait_for_update': 500\n });\n \n gtag('js', new Date());\n gtag('config', '".concat(t,"', {\n send_page_view: true\n });\n ")})]}):null}},5831:(e,t,r)=>{"use strict";r.d(t,{default:()=>l});var a=r(5155),o=r(8661),n=r.n(o),i=r(2115),s=r(2669);function l(){let[e,t]=(0,i.useState)(!1);return(0,i.useEffect)(()=>{if(e)return;document.querySelectorAll(".liveblog-container:not([data-rendered])").forEach(e=>{e.setAttribute("data-rendered","true");let t=e.dataset.slug,r=parseInt(e.dataset.pollInterval||"60000");(0,s.createRoot)(e).render((0,a.jsx)(e=>{let{slug:t,pollInterval:r}=e;return(0,a.jsx)(d,{slug:t,pollInterval:r})},{slug:t,pollInterval:r}))}),t(!0);let r=new MutationObserver(e=>{e.forEach(e=>{e.addedNodes.forEach(e=>{if(e.nodeType===Node.ELEMENT_NODE&&((e.querySelectorAll?e.querySelectorAll(".liveblog-container:not([data-rendered])"):[]).forEach(e=>{e.setAttribute("data-rendered","true");let t=e.dataset.slug,r=parseInt(e.dataset.pollInterval||"60000");(0,s.createRoot)(e).render((0,a.jsx)(e=>{let{slug:t,pollInterval:r}=e;return(0,a.jsx)(d,{slug:t,pollInterval:r})},{slug:t,pollInterval:r}))}),e.classList&&e.classList.contains("liveblog-container")&&!e.hasAttribute("data-rendered"))){e.setAttribute("data-rendered","true");let t=e.dataset.slug,r=parseInt(e.dataset.pollInterval||"60000");(0,s.createRoot)(e).render((0,a.jsx)(e=>{let{slug:t,pollInterval:r}=e;return(0,a.jsx)(d,{slug:t,pollInterval:r})},{slug:t,pollInterval:r}))}})})});return r.observe(document.body,{childList:!0,subtree:!0}),()=>{r.disconnect()}},[]),null}function d(e){let{slug:t,pollInterval:r=6e4}=e,[o,s]=(0,i.useState)(null),[l,d]=(0,i.useState)([]),[c,u]=(0,i.useState)(!0),[m,p]=(0,i.useState)(null),[b,x]=(0,i.useState)(!1),[h,g]=(0,i.useState)(null),[f,w]=(0,i.useState)(!0),[y,j]=(0,i.useState)(!0),v=e=>{try{let t=new Date(e),r=["January","February","March","April","May","June","July","August","September","October","November","December"][t.getUTCMonth()],a=t.getUTCDate(),o=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"][t.getUTCDay()],n=t.getUTCHours(),i=t.getUTCMinutes().toString().padStart(2,"0"),s=n>=12?"pm":"am";n%=12,n=n||12;let l=t.getUTCFullYear();return"".concat(o," ").concat(a," ").concat(r," ").concat(l," at ").concat(n,":").concat(i).concat(s)}catch(t){return e}},k=async function(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0];try{e&&u(!0);let r=await fetch("https://wp.theyorkmix.com/wp-json/wp/v2/liveblog?slug=".concat(t),{next:{revalidate:120}});if(!r.ok)throw Error("Failed to load live blog category");let a=await r.json();if(!a||0===a.length)throw Error("Live blog category not found");let o=a[0];s(o);let n=await fetch("https://wp.theyorkmix.com/wp-json/wp/v2/liveblogs?liveblog=".concat(o.id,"&per_page=100&orderby=date&order=desc"),{next:{revalidate:60}});if(!n.ok)throw Error("Failed to load live blog posts");let i=await n.json();if(l.length>0&&i.length>0){let e=l[0];(i[0].modified!==e.modified||i.length!==l.length)&&x(!0)}(!l.length||b||e)&&(d(i),g(i.length>0?i[0].modified:o.modified||new Date().toISOString()),b&&x(!1),setTimeout(()=>{window.dispatchEvent(new CustomEvent("liveBlogContentLoaded",{detail:{slug:t,postsCount:i.length,hasNewContent:b}})),window.freestar&&window.freestar.queue&&window.freestar.queue.push(function(){if(window.freestarWithoutBase)window.freestarWithoutBase(()=>{try{window.freestar.newIai("yorkmix_dynamic_incontent_iai")}catch(e){}});else try{window.freestar.newIai("yorkmix_dynamic_incontent_iai")}catch(e){}})},100)),p(null)}catch(e){p(e.message)}finally{e&&u(!1)}};(0,i.useEffect)(()=>{k()},[t]),(0,i.useEffect)(()=>{let e=()=>{j(!document.hidden)};return document.addEventListener("visibilitychange",e),()=>document.removeEventListener("visibilitychange",e)},[]),(0,i.useEffect)(()=>
1{if(!f||!y)return;let e=setInterval(()=>{y&&!document.hidden&&k(!1)},r);return()=>{clearInterval(e)}},[r,f,y,t]);let N=()=>{x(!1),k(!0)};return c&&!o?(0,a.jsxs)("div",{className:"text-center p-4",children:[(0,a.jsx)("div",{className:"spinner-border",role:"status",children:(0,a.jsx)("span",{className:"visually-hidden",children:"Loading..."})}),(0,a.jsx)("p",{className:"mt-2",children:"Loading live blog..."})]}):m&&!o?(0,a.jsxs)("div",{className:"alert alert-warning",children:[(0,a.jsx)("h4",{children:"Unable to Load Live Blog"}),(0,a.jsx)("p",{children:"Sorry, we're unable to load the live blog at this time. Please try again later."}),(0,a.jsx)("button",{className:"btn btn-primary",onClick:()=>k(!0),children:"Try Again"})]}):o?(0,a.jsxs)("div",{className:"jsx-c21880068b3cb2bd liveblog-content",children:[(0,a.jsx)(n(),{id:"c21880068b3cb2bd",children:".liveblog-header.jsx-c21880068b3cb2bd{background:linear-gradient(135deg,#494949ff,#757575ff);color:white;padding:20px;margin-bottom:20px}.liveblog-status.jsx-c21880068b3cb2bd{display:inline-flex;align-items:center;background:rgba(255,255,255,.2);padding:5px 10px;border-radius:15px;font-size:.9rem;font-weight:500}.liveblog-pulse.jsx-c21880068b3cb2bd{width:8px;height:8px;background:#28a745;border-radius:50%;margin-right:6px;animation:pulse 2s infinite}@keyframes pulse{0%{opacity:1}50%{opacity:.3}100%{opacity:1}}.liveblog-controls.jsx-c21880068b3cb2bd{display:flex;gap:10px;margin-bottom:20px;flex-wrap:wrap}.new-updates-alert.jsx-c21880068b3cb2bd{background:#28a745;color:white;border:none;animation:glow 1.5s ease-in-out infinite alternate}@keyframes glow{from{box-shadow:0 0 5px rgba(40,167,69,.5)}to{box-shadow:0 0 20px rgba(40,167,69,.8)}}.liveblog-meta.jsx-c21880068b3cb2bd{font-size:.9rem;color:#6c757d;margin-bottom:15px}.liveblog-content-body.jsx-c21880068b3cb2bd{line-height:1.6}.liveblog-content-body.jsx-c21880068b3cb2bd img.jsx-c21880068b3cb2bd{max-width:100%;height:auto;border-radius:8px;margin:15px 0}"}),(0,a.jsx)("div",{className:"jsx-c21880068b3cb2bd liveblog-header",children:(0,a.jsx)("div",{className:"jsx-c21880068b3cb2bd d-flex justify-content-between align-items-start",children:(0,a.jsxs)("div",{className:"jsx-c21880068b3cb2bd",children:[(0,a.jsx)("h1",{dangerouslySetInnerHTML:{__html:o.name||""},className:"jsx-c21880068b3cb2bd h3 mb-2"}),o.description&&(0,a.jsx)("div",{className:"jsx-c21880068b3cb2bd mb-4",children:(0,a.jsx)("div",{dangerouslySetInnerHTML:{__html:o.description},className:"jsx-c21880068b3cb2bd liveblog-description"})}),(0,a.jsxs)("div",{className:"jsx-c21880068b3cb2bd liveblog-status",children:[(0,a.jsx)("span",{className:"jsx-c21880068b3cb2bd liveblog-pulse"}),"LIVE BLOG"]})]})})}),(0,a.jsxs)("div",{className:"jsx-c21880068b3cb2bd liveblog-controls",children:[b?(0,a.jsxs)("button",{onClick:N,className:"jsx-c21880068b3cb2bd btn new-updates-alert",children:[(0,a.jsx)("i",{className:"jsx-c21880068b3cb2bd bi bi-arrow-clockwise me-2"}),"New Updates Available - Click to Reload"]}):(0,a.jsxs)("button",{onClick:N,disabled:c,className:"jsx-c21880068b3cb2bd btn btn-outline-primary",children:[(0,a.jsx)("i",{className:"jsx-c21880068b3cb2bd bi bi-arrow-clockwise me-2"}),c?"Reloading...":"Reload"]}),(0,a.jsxs)("button",{onClick:()=>{w(!f)},title:f?"Auto-checking for updates every 60 seconds":"Enable auto-refresh to check for new updates",className:"jsx-c21880068b3cb2bd "+"btn ".concat(f?"btn-success":"btn-outline-secondary"),children:[(0,a.jsx)("i",{className:"jsx-c21880068b3cb2bd "+"bi ".concat(f?"bi-pause-fill":"bi-play-fill"," me-2")}),"Auto-refresh ",f?"ON":"OFF"]})]}),(0,a.jsx)("div",{className:"jsx-c21880068b3cb2bd liveblog-meta",children:(0,a.jsxs)("div",{className:"jsx-c21880068b3cb2bd row",children:[(0,a.jsxs)("div",{className:"jsx-c21880068b3cb2bd col-md-6",children:[(0,a.jsx)("strong",{className:"jsx-c21880068b3cb2bd",children:"Last Updated:"})," ",v(h)]}),(0,a.jsxs)("div",{className:"jsx-c21880068b3cb2bd col-md-6",children:[(0,a.jsx)("strong",{className:"jsx-c21880068b3cb2bd",children:"Total Posts:"})," ",l.length]})]})}),(0,a.jsx)("div",{className:"jsx-c21880068b3cb2bd liveblog-posts",children:l.length>0?l.map(e=>{var t,r,o,n,i;return(0,a.jsxs)("div",{className:"jsx-c21880068b3cb2bd liveblog-post mb-4 p-3 border rounded",children:[(0,a.jsxs)("div",{className:"jsx-c21880068b3cb2bd d-flex justify-content-between align-items-start mb-2",children:[(0,a.jsx)("h3",{dangerouslySetInnerHTML:{__html:(null==(t=e.title)?void 0:t.rendered)||""},className:"jsx-c21880068b3cb2bd h5 mb-0"}),(0,a.jsx)("small",{className:"jsx-c21880068b3cb2bd text-muted ms-3",children:v(e.date)})]}),(null==(o=e.featured_image_urls_v2)||null==(r=o.medium)?void 0:r[0])&&(0,a.jsx)("div",{className:"jsx-c21880068b3cb2bd mb-3",children:(0,a.jsx)("img",{src:e.featured_image_urls_v2.medium[0],alt:(null==(n=e.title)?void 0:n.rendered)||"",style:{maxHeight:"300px",width:"auto"},className:"jsx-c21880068b3cb2bd img-fluid rounded"})}),(0,a.jsx)("div",{dangerouslySetInnerHTML:{__html:(null==(i=e.content)?void 0:i.rendered)||""},className:"jsx-c21880068b3cb2bd liveblog-post-content"}),(0,a.jsx)("div",{className:"jsx-c21880068b3cb2bd mt-2 pt-2 border-top",children:(0,a.jsxs)("small",{className:"jsx-c21880068b3cb2bd text-muted",children:[e.modified!==e.date&&(0,a.jsxs)(a.Fragment,{children:["Updated: ",v(e.modified)," ⢠"]}),"Posted: ",v(e.date)]})})]},e.id)}):(0,a.jsxs)("div",{className:"jsx-c21880068b3cb2bd alert alert-info",children:[(0,a.jsx)("h4",{className:"jsx-c21880068b3cb2bd",children:"No Posts Yet"}),(0,a.jsx)("p",{className:"jsx-c21880068b3cb2bd",children:"This live blog doesn't have any posts yet. Check back soon for updates!"})]})}),f&&y&&(0,a.jsx)("div",{className:"jsx-c21880068b3cb2bd text-center mt-4 text-muted",children:(0,a.jsxs)("small",{className:"jsx-c21880068b3cb2bd",children:[(0,a.jsx)("i",{className:"jsx-c21880068b3cb2bd bi bi-arrow-clockwise me-1"}),"Auto-checking for updates every ",r/1e3," seconds",!y&&" (paused - tab not visible)"]})})]}):(0,a.jsxs)("div",{className:"alert alert-info",children:[(0,a.jsx)("h4",{children:"Live Blog Not Found"}),(0,a.jsx)("p",{children:"The requested live blog could not be found."})]})}},5880:(e,t,r)=>{"use strict";r.d(t,{default:()=>s});var a=r(5155),o=r(2115),n=r(2669);let i=e=>{let{sliderId:t,slides:r,maxWidth:n="1000px",maxHeight:i="750px"}=e,[s,l]=(0,o.useState)(0),[d,c]=(0,o.useState)(!0);return((0,o.useEffect)(()=>
1{if(!d||r.length<=1)return;let e=setInterval(()=>{l(e=>(e+1)%r.length)},5e3);return()=>clearInterval(e)},[d,r.length]),r&&0!==r.length)?(0,a.jsx)("div",{className:"soliloquy-container soliloquy-transition-fade soliloquy-theme-base",style:{maxWidth:n,maxHeight:i,position:"relative",margin:"20px 0"},children:(0,a.jsxs)("div",{className:"soliloquy-slider",style:{position:"relative",overflow:"hidden",borderRadius:"8px"},children:[r.map((e,t)=>(0,a.jsx)("div",{className:"soliloquy-slide ".concat(t===s?"active":""),style:{display:t===s?"block":"none",position:"relative"},children:(0,a.jsx)("img",{src:e.src,alt:e.alt||"Slide ".concat(t+1),style:{width:"100%",height:"auto",maxHeight:i,objectFit:"cover",display:"block"},onError:e=>{e.target.style.display="none"}})},t)),r.length>1&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("button",{className:"soliloquy-nav soliloquy-prev",onClick:()=>{l(e=>(e-1+r.length)%r.length)},style:{position:"absolute",left:"10px",top:"50%",transform:"translateY(-50%)",background:"rgba(0,0,0,0.5)",color:"white",border:"none",borderRadius:"50%",width:"40px",height:"40px",cursor:"pointer",fontSize:"18px",zIndex:10},onMouseEnter:e=>e.target.style.background="rgba(0,0,0,0.8)",onMouseLeave:e=>e.target.style.background="rgba(0,0,0,0.5)",children:"â¹"}),(0,a.jsx)("button",{className:"soliloquy-nav soliloquy-next",onClick:()=>{l(e=>(e+1)%r.length)},style:{position:"absolute",right:"10px",top:"50%",transform:"translateY(-50%)",background:"rgba(0,0,0,0.5)",color:"white",border:"none",borderRadius:"50%",width:"40px",height:"40px",cursor:"pointer",fontSize:"18px",zIndex:10},onMouseEnter:e=>e.target.style.background="rgba(0,0,0,0.8)",onMouseLeave:e=>e.target.style.background="rgba(0,0,0,0.5)",children:"âº"})]}),r.length>1&&(0,a.jsx)("div",{className:"soliloquy-indicators",style:{position:"absolute",bottom:"15px",left:"50%",transform:"translateX(-50%)",display:"flex",gap:"8px",zIndex:10},children:r.map((e,t)=>(0,a.jsx)("button",{className:"soliloquy-indicator ".concat(t===s?"active":""),onClick:()=>{l(t)},style:{width:"12px",height:"12px",borderRadius:"50%",border:"2px solid white",background:t===s?"white":"transparent",cursor:"pointer",opacity:t===s?1:.7}},t))}),r.length>1&&(0,a.jsx)("button",{className:"soliloquy-play-pause",onClick:()=>c(!d),style:{position:"absolute",top:"15px",right:"15px",background:"rgba(0,0,0,0.5)",color:"white",border:"none",borderRadius:"4px",padding:"5px 8px",cursor:"pointer",fontSize:"12px",zIndex:10},onMouseEnter:e=>e.target.style.background="rgba(0,0,0,0.8)",onMouseLeave:e=>e.target.style.background="rgba(0,0,0,0.5)",children:d?"â¸":"â¶"})]})}):null},s=()=>((0,o.useEffect)(()=>{let e=()=>{document.querySelectorAll(".soliloquy-container").forEach(e=>{if("true"===e.getAttribute("data-processed"))return;let t=(e.getAttribute("id")||"").replace("soliloquy-container-",""),r=Array.from(e.querySelectorAll(".soliloquy-item img")).map(e=>({src:e.getAttribute("src"),alt:e.getAttribute("alt")||""})),o=e.style.maxWidth||"1000px",s=e.style.maxHeight||"750px";r.length>0&&(e.innerHTML="",(0,n.createRoot)(e).render((0,a.jsx)(i,{sliderId:t,slides:r,maxWidth:o,maxHeight:s})),e.setAttribute("data-processed","true"))})};e();let t=new MutationObserver(t=>{t.forEach(t=>{"childList"===t.type&&e()})});return t.observe(document.body,{childList:!0,subtree:!0}),()=>t.disconnect()},[]),null)},6825:(e,t,r)=>{"use strict";r.d(t,{default:()=>o});var a=r(2115);let o=()=>((0,a.useEffect)(()=>{let e=()=>{document.querySelectorAll('.wp-block-stackable-expand:not([data-processed="true"])').forEach(e=>{let t=e.querySelector(".stk-block-expand__show-button"),r=e.querySelector(".stk-block-expand__hide-button"),a=e.querySelector(".stk-block-expand__more-text"),o=e.querySelector(".stk-block-expand__short-text"),n=null==t?void 0:t.querySelector(".stk-link"),i=null==r?void 0:r.querySelector(".stk-link");n&&i&&a&&o&&(o.setAttribute("aria-hidden","false"),n.setAttribute("aria-hidden","false"),a.setAttribute("aria-hidden","true"),i.setAttribute("aria-hidden","true"),n.addEventListener("click",e=>{e.preventDefault(),o.setAttribute("aria-hidden","true"),n.setAttribute("aria-hidden","true"),a.setAttribute("aria-hidden","false"),i.setAttribute("aria-hidden","false")}),i.addEventListener("click",e=>{e.preventDefault(),o.setAttribute("aria-hidden","false"),n.setAttribute("aria-hidden","false"),a.setAttribute("aria-hidden","true"),i.setAttribute("aria-hidden","true")}),e.setAttribute("data-processed","true"))})};e();let t=new MutationObserver(t=>{let r=!1;
1t.forEach(e=>{"childList"===e.type&&e.addedNodes.length>0&&e.addedNodes.forEach(e=>{var t,a;1===e.nodeType&&((null==(t=e.classList)?void 0:t.contains("wp-block-stackable-expand"))||(null==(a=e.querySelector)?void 0:a.call(e,".wp-block-stackable-expand")))&&(r=!0)})}),r&&setTimeout(e,100)});return t.observe(document.body,{childList:!0,subtree:!0}),()=>t.disconnect()},[]),null)},6867:(e,t,r)=>{Promise.resolve().then(r.bind(r,2368)),Promise.resolve().then(r.bind(r,445)),Promise.resolve().then(r.bind(r,653)),Promise.resolve().then(r.bind(r,8835)),Promise.resolve().then(r.bind(r,6825)),Promise.resolve().then(r.bind(r,2909)),Promise.resolve().then(r.bind(r,1289)),Promise.resolve().then(r.bind(r,5399)),Promise.resolve().then(r.bind(r,3691)),Promise.resolve().then(r.bind(r,5831)),Promise.resolve().then(r.bind(r,773)),Promise.resolve().then(r.bind(r,2106)),Promise.resolve().then(r.bind(r,8591)),Promise.resolve().then(r.bind(r,1735)),Promise.resolve().then(r.bind(r,5880)),Promise.resolve().then(r.bind(r,7836)),Promise.resolve().then(r.bind(r,5220)),Promise.resolve().then(r.bind(r,6999)),Promise.resolve().then(r.t.bind(r,2619,23))},6999:(e,t,r)=>{"use strict";r.d(t,{default:()=>o});var a=r(2115);function o(){return(0,a.useEffect)(()=>{var e;let t=document.querySelectorAll(".taboola-widget-container[data-taboola-mode]");if(0!==t.length){if((null==(e=window.authState)?void 0:e.hasActiveSubscription)===!0)return void t.forEach(e=>{e.style.display="none"});window._taboola=window._taboola||[],window._taboola.push({article:"auto",url:window.location.href}),t.forEach(e=>{let t=e.id,r=e.dataset.taboolaMode,a=e.dataset.taboolaPlacement,o=e.dataset.taboolaTargetType;t&&window._taboola.push({mode:r,container:t,placement:a,target_type:o})}),window._taboola.push({flush:!0})}},[]),null}},7836:(e,t,r)=>{"use strict";r.d(t,{default:()=>n});var a=r(5155),o=r(2115);function n(){let[e,t]=(0,o.useState)([]),[r,n]=(0,o.useState)(!0),[i,s]=(0,o.useState)(null),[l,d]=(0,o.useState)(!1),c=(0,o.useRef)(null);(0,o.useEffect)(()=>()=>{c.current&&clearTimeout(c.current)},[]),(0,o.useEffect)(()=>{d(!0);let e=async()=>{try{let e=localStorage.getItem("stickyNavigation"),r=localStorage.getItem("stickyNavigationTime");if(e&&r&&Date.now()-parseInt(r)<144e5){let r=JSON.parse(e);t(r.sort((e,t)=>(e.sort_order||0)-(t.sort_order||0))),n(!1);return}let a=Date.now(),o=await fetch("https://blogs.theyorkmix.com/navigation-api.php?action=get_navigation&menu_id=1&_t=".concat(a),{cache:"no-cache"}),i=await o.json();if(i&&i.items){let e=i.items.sort((e,t)=>(e.sort_order||0)-(t.sort_order||0));t(e),localStorage.setItem("stickyNavigation",JSON.stringify(i.items)),localStorage.setItem("stickyNavigationTime",Date.now().toString())}}catch(r){let e=localStorage.getItem("stickyNavigation");e&&t(JSON.parse(e).sort((e,t)=>(e.sort_order||0)-(t.sort_order||0)))}finally{n(!1)}};l&&e()},[l]);let u=()=>{c.current=setTimeout(()=>{s(null)},150)};if(!l||r)return(0,a.jsx)("nav",{className:"sticky-nav",children:(0,a.jsx)("ul",{className:"nav justify-content-center",children:(0,a.jsx)("li",{className:"nav-item",children:(0,a.jsx)("span",{className:"nav-link",children:"Loading..."})})})});let m=i?e.find(e=>e.id===i):null;return m&&m.hasMegamenuColumns||m&&m.children&&m.children.some(e=>"column_header"===e.item_type),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("nav",{className:"sticky-nav",children:(0,a.jsx)("ul",{className:"nav justify-content-center",children:e.map(e=>{let t=e.hasChildren&&e.children&&e.children.length>0,r=i===e.id;return(t&&(e.hasMegamenuColumns||e.children.some(e=>"column_header"===e.item_type)),t)?(0,a.jsx)("li",{className:"nav-item position-static",children:(0,a.jsx)("a",{className:"nav-link ".concat(r?"active":""),href:"#"===e.url?"#":e.url,target:e.target||"_self",onClick:"#"===e.url?t=>{var r;t.preventDefault(),s(i===(r=e.id)?null:r)}:void 0,onMouseEnter:()=>{var t;return t=e.id,void(c.current&&(clearTimeout(c.current),c.current=null),s(t))},onMouseLeave:u,"aria-expanded":r,children:e.label})},e.id):(0,a.jsx)("li",{className:"nav-item",children:(0,a.jsx)("a",{className:"nav-link",href:e.url,target:e.target||"_self",children:e.label})},e.id)})})}),m&&m.children&&(0,a.jsx)("div",{className:"sticky-megamenu-container",style:{display:"block",visibility:"visible",opacity:"1"},onMouseEnter:()=>{var e;return e=m.id,void(c.current&&(clearTimeout(c.current),c.current=null),s(e))},onMouseLeave:()=>{c.current=setTimeout(()=>{s(null)},150)},children:(0,a.jsx)("div",{className:"sticky-megamenu",children:(0,a.jsx)("div",{className:"container",children:(0,a.jsx)("div",{className:"row",children:m.children.filter(e=>"column_header"===e.item_type).map((e,t)=>{let r=Math.floor(12/Math.max(m.children.filter(e=>"column_header"===e.item_type).length,1));return(0,a.jsxs)("div",{className:"col-".concat(r),children:[e.header_image&&(0,a.jsx)("div",{className:"megamenu-header-image mb-2",children:(0,a.jsx)("img",{src:e.header_image,alt:e.header_image_alt||e.label,className:"img-fluid",style:{maxHeight:"60px",objectFit:"contain"}})}),!e.hide_header_text&&(0,a.jsx)("h6",{children:e.label}),(0,a.jsx)("ul",{className:"list-unstyled",children:e.children&&e.children.map(e=>(0,a.jsx)("li",{children:(0,a.jsx)("a",{href:e.url,target:e.target||"_self",children:e.label})},e.id))})]},e.id)})})})})})]})}},7958:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var a=r(5155),o=r(2115);let n=e=>{if(!e)return"";let t=document.createElement("textarea");return t.innerHTML=e,t.value};function i(e){let{placeholder:t="Search YorkMix.com",resultsLimit:r=50,className:i=""}=e,[s,l]=(0,o.useState)(""),[d,c]=(0,o.useState)([]),[u,m]=(0,o.useState)(!1),[p,b]=(0,o.useState)(null),[x,h]=(0,o.useState)(!1),[g,f]=(0,o.useState)(1),[w,y]=(0,o.useState)(!1),[j,v]=(0,o.useState)(!1),k=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return{news:{url:"https://wp.theyorkmix.com/wp-json/wp/v2/posts",params:{search:"{query}",per_page:100,page:e,orderby:"relevance",_embed:"1"},type:"wordpress"},blogs:{url:"https://blogs.theyorkmix.com/wp-api.php",params:{endpoint:"posts",search:"{query}",per_page:100,page:e},type:"custom"}}},N=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:g,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(s.trim()){t?v(!0):m(!0),b(null);try{let r=[],a=k(e);
1Object.entries(a).forEach(e=>{let[t,a]=e;if(a){let e=((e,t)=>{let r=new URL(e.url);return Object.entries(e.params).forEach(e=>{let[a,o]=e;"string"==typeof o&&o.includes("{query}")?r.searchParams.set(a,o.replace("{query}",t)):r.searchParams.set(a,o)}),r.toString()})(a,s),o=fetch(e).then(e=>{if(!e.ok)throw Error("Search failed for ".concat(t," (").concat(e.status,")"));return e.json()}).then(e=>{var t;let r=(t=a.type,Array.isArray(e)?e.map(e=>{var r,a,o,i,s,l,d,c;switch(t){case"wordpress":return{id:e.id,title:n((null==(r=e.title)?void 0:r.rendered)||e.title),excerpt:(null==(a=e.excerpt)?void 0:a.rendered)||"",url:e.slug,date:e.date,type:"article",category:"News",image:(null==(s=e._embedded)||null==(i=s["wp:featuredmedia"])||null==(o=i[0])?void 0:o.source_url)||null};case"custom":return{id:e.id,title:n((null==(l=e.title)?void 0:l.rendered)||e.title),excerpt:(null==(d=e.excerpt)?void 0:d.rendered)||(null==(c=e.content)?void 0:c.substring(0,150))+"...",url:"blogs/".concat(e.slug),date:e.date,type:"blog",category:"Blog Post",image:e.featured_image||null};default:return{id:e.id,title:n(e.title),excerpt:e.excerpt||"",url:e.slug||"#",type:"unknown",category:"Other"}}}):[]);return{results:r,hasMore:100===r.length}}).catch(e=>({results:[],hasMore:!1}));r.push(o)}});let o=await Promise.all(r),i=o.flatMap(e=>e.results),l=o.some(e=>e.hasMore),d=i.sort((e,t)=>new Date(t.date||0)-new Date(e.date||0));t?c(e=>[...e,...d]):c(d),y(l),f(e)}catch(e){b("Search failed. Please try again.")}finally{m(!1),v(!1)}}};return(0,a.jsxs)("div",{className:"search-tool ".concat(i),children:[(0,a.jsx)("form",{onSubmit:e=>{e.preventDefault(),s.trim()&&(h(!0),f(1),c([]),y(!1),N(1))},className:"search-form mb-3",children:(0,a.jsxs)("div",{className:"input-group",children:[(0,a.jsx)("input",{type:"text",value:s,onChange:e=>l(e.target.value),placeholder:t,className:"form-control search-input"}),(0,a.jsx)("button",{type:"submit",className:"btn btn-primary",disabled:u,children:u?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"spinner-border spinner-border-sm me-2",role:"status","aria-hidden":"true"}),"Searching..."]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("i",{className:"bi bi-search me-1"}),"Search"]})})]})}),p&&(0,a.jsx)("div",{className:"alert alert-danger",role:"alert",children:p}),d.length>0&&(0,a.jsxs)("div",{className:"search-results",children:[(0,a.jsx)("div",{className:"results-header mb-3",children:(0,a.jsxs)("small",{className:"text-muted",children:["Found ",d.length," result",1!==d.length?"s":"",' for "',s,'"']})}),(0,a.jsx)("ul",{className:"list-unstyled",children:d.map((e,t)=>{var r;return(0,a.jsxs)("li",{className:"mb-2",children:[(0,a.jsx)("a",{href:e.url,className:"text-decoration-none",children:(0,a.jsx)("strong",{children:e.title})}),e.date&&(0,a.jsxs)("span",{className:"text-muted ms-2",children:["- ",(r=e.date)?new Date(r).toLocaleDateString("en-GB",{day:"numeric",month:"short",year:"numeric"}):""]})]},"".concat(e.type,"-").concat(e.id,"-").concat(t))})}),w&&(0,a.jsx)("div",{className:"text-center mt-3",children:(0,a.jsx)("button",{onClick:()=>{N(g+1,!0)},className:"btn btn-outline-primary",disabled:j,children:j?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"spinner-border spinner-border-sm me-2",role:"status","aria-hidden":"true"}),"Searching for more..."]}):"Search for more..."})})]}),x&&!u&&0===d.length&&!p&&(0,a.jsxs)("div",{className:"no-results text-center py-4 text-muted",children:[(0,a.jsx)("div",{className:"mb-2",children:"\uD83D\uDD0D"}),(0,a.jsxs)("div",{children:['No results found for "',s,'"']}),(0,a.jsx)("small",{children:"Try different keywords or check spelling"})]})]})}},8321:(e,t,r)=>{"use strict";r.d(t,{default:()=>o.a});var a=r(1402),o=r.n(a)},8591:(e,t,r)=>{"use strict";r.d(t,{default:()=>o});var a=r(5155);function o(e){let{className:t="",style:r={}}=e;return(0,a.jsx)("i",{className:t,style:r,onClick:()=>{window.openSearchModal&&window.openSearchModal()}})}},8835:(e,t,r)=>{"use strict";r.d(t,{default:()=>o});var a=r(2115);function o(){let[e,t]=(0,a.useState)(!1),[r,o]=(0,a.useState)(!1),[n,i]=(0,a.useState)(0),[s,l]=(0,a.useState)("Lo
1ading..."),[d,c]=(0,a.useState)("/images/placeholderimage.png"),[u,m]=(0,a.useState)(!1),p=async()=>{try{if(window.authState){var e;if(t(window.authState.isLoggedIn),o(window.authState.hasActiveSubscription),window.authState.hasActiveSubscription&&(null==(e=window.authState.user)?void 0:e.id))try{let e=await fetch("/api/user-gifts?user_id=".concat(window.authState.user.id)),t=await e.json();t.success&&t.data&&t.data.length>0?i(t.data.length):i(0)}catch(e){i(0)}else i(0)}else t(!1),o(!1),i(0)}catch(e){t(!1),o(!1),i(0)}},b=()=>{let e=localStorage.getItem("presenterData");if(!e)return null;try{let{data:t}=JSON.parse(e);return t}catch(e){return null}},x=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=b();if(t&&!(()=>{let e=localStorage.getItem("presenterData");if(!e)return!0;try{let{timestamp:t}=JSON.parse(e);return Date.now()-t>3e5}catch(e){return!0}})()){l(t.presenter||"YorkMix Radio"),c(t.presenter_image||"/images/placeholderimage.png");return}try{let e=new AbortController,t=setTimeout(()=>e.abort(),3e4),r=await fetch("https://ymrapp.radiobroadcast.co.uk/presenter.php",{signal:e.signal,method:"GET",headers:{Accept:"application/json"},cache:"no-cache"});if(clearTimeout(t),r.ok){let e=await r.json();localStorage.setItem("presenterData",JSON.stringify({data:e,timestamp:Date.now()})),e.presenter&&l(e.presenter),e.presenter_image&&c(e.presenter_image)}else l("YorkMix Radio"),c("/images/placeholderimage.png")}catch(r){if("AbortError"===r.name||r instanceof TypeError&&r.message.includes("fetch"),e<2&&"AbortError"!==r.name)return void setTimeout(()=>x(e+1),5e3);let t=b();t?(l(t.presenter||"YorkMix Radio"),c(t.presenter_image||"/images/placeholderimage.png")):(l("YorkMix Radio"),c("/images/placeholderimage.png"))}},h=e=>{e.preventDefault(),window.openAuthModal&&window.openAuthModal("login")},g=async e=>{e.preventDefault(),window.logout&&await window.logout()},f=e=>{e.preventDefault(),window.openGiftModal&&window.openGiftModal()};return(0,a.useEffect)(()=>{m(!0),p(),x();let e=new Date,t=setTimeout(()=>{x();let e=setInterval(x,36e5);window.presenterUpdateInterval=e},new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours()+1,1,0).getTime()-e.getTime());window.presenterUpdateTimeout=t,window.handleLoginClick=h,window.handleLogoutClick=g,window.handleGiftClick=f,window.logout=async function(){try{let e=await fetch("https://users.yorkmix.com/auth/logout.php",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"}});if((await e.json()).success)return window.location.reload(),!0;return!1}catch(e){return window.location.reload(),!1}},window.openAuthModal=function(e){window.dispatchEvent(new CustomEvent("openAuthModal",{detail:{type:e||"login"}}))},window.openGiftModal=function(){window.dispatchEvent(new CustomEvent("openGiftModal"))},window.openSearchModal=function(){window.dispatchEvent(new CustomEvent("openSearchModal"))};let r=e=>{p()};return window.addEventListener("authStateChanged",r),()=>{window.removeEventListener("authStateChanged",r),window.presenterUpdateTimeout&&(clearTimeout(window.presenterUpdateTimeout),delete window.presenterUpdateTimeout),window.presenterUpdateInterval&&(clearInterval(window.presenterUpdateInterval),delete window.presenterUpdateInterval),delete window.handleLoginClick,delete window.handleLogoutClick,delete window.handleGiftClick,delete window.logout,delete window.openAuthModal,delete window.openGiftModal,delete window.openSearchModal}},[]),(0,a.useEffect)(()=>{if(!u)return;let t=setTimeout(()=>{let t=document.getElementById("desktop-auth-link");
1t&&(t.textContent=e?"LOG OUT":"LOG IN",t.onclick=e?g:h);let a=document.getElementById("desktop-subscribe-link");a&&(e&&r?(a.textContent="MY ACCOUNT",a.href="https://users.york-mix.com/account.php",a.target="_blank"):(a.textContent="SUBSCRIBE",a.href="/subscribe",a.target=""));let o=document.getElementById("main-gift-icon"),i=document.getElementById("main-gift-badge");o&&i&&(e&&r?(o.style.display="inline-block",n>0?(i.textContent=n.toString(),i.style.display="flex"):i.style.display="none"):(o.style.display="none",i.style.display="none"));let l=document.getElementById("mobile-gift-icon"),c=document.getElementById("mobile-gift-badge");l&&c&&(e&&r?(l.style.display="inline-block",n>0?(c.textContent=n.toString(),c.style.display="flex"):c.style.display="none"):(l.style.display="none",c.style.display="none"));let u=document.getElementById("mobile-header-auth-container"),m=document.getElementById("mobile-header-auth-icon");u&&m&&(e?(m.className="bi bi-box-arrow-right mobicon",u.title="Log Out",u.setAttribute("onclick",'if(typeof window.handleLogoutClick === "function") { window.handleLogoutClick(event); } else if(typeof window.logout === "function") { window.logout(); }')):(m.className="bi bi-person-circle mobicon",u.title="Login / Register",u.setAttribute("onclick",'if(typeof window.handleLoginClick === "function") { window.handleLoginClick(event); } else if(typeof window.openAuthModal === "function") { window.openAuthModal("login"); } else { console.log("Auth functions not ready yet"); }')));let p=document.getElementById("menu-account-container"),b=document.getElementById("menu-account-icon");p&&b&&(e?(p.style.display="block",p.title=r?"Manage YorkMix+ Account":"Manage Account",b.className="bi bi-person-circle",b.style.fontSize="24px",b.style.color="var(--bs-primary)"):p.style.display="none");let x=document.getElementById("sticky-presenter-name"),f=document.getElementById("sticky-presenter-image");x&&(x.textContent=s),f&&(f.src=d);let w=document.getElementById("desktop-presenter-name"),y=document.getElementById("desktop-presenter-image");w&&(w.textContent=s),y&&(y.src=d);let j=document.getElementById("mobile-presenter-name"),v=document.getElementById("mobile-presenter-image");j&&(j.textContent=s),v&&(v.src=d)},100);return()=>{clearTimeout(t)}},[u,e,r,n,s,d]),null}}},e=>{e.O(0,[458,619,441,255,358],()=>e(e.s=6867)),_N_E=e.O()}]);
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.