PageSourceSearch

https://www.spotlight.com/wp-content/themes/spotlight/assets/build/js/script.js?ver=c58900158b842fdabf91

js spotlight.com collected 2026-10-01 10:16:18 UTC 26,089 bytes, 2 lines download raw bytes

1(()=>{let e=window.innerWidth<=800;function t(e){window.spotlightIsProduction&&(window.dataLayer=window.dataLayer||[],window.dataLayer.push(e))}function n(e){return e?e.textContent.replace(/\s+/g," ").trim():""}function o(e,t){const n=window.jQuery||window.$;return n?.ajax?t?n.ajax(e,t):n.ajax(e):null}function r(){const e=window.jQuery||window.$;return!!e?.ajax}function s(e,n){n&&t({event:"accordion_open",accordionType:e,accordionItem:n})}function i(e){("/"===window.location.pathname||document.body.classList.contains("home")||document.body.classList.contains("front-page"))&&t({event:"testimonial_carousel_nav",direction:e})}document.addEventListener("click",e=>{const o=e.target.closest(".news-card__image a, .news-card__title a");if(!o||e.defaultPrevented||0!==e.button)return;const r=o.closest(".news-card"),s=r?.querySelector(".news-card__title a"),i=n(s).toLowerCase(),c=s?.href||o.href;i&&c&&(function(e,n,o){n&&o&&t({event:"click_image_block",blockName:e,linkText:n,linkURL:o})}(function(e){const t=e.closest?.(".section-news-advice"),o=t?.querySelector("h2.wp-block-heading");return n(o).toLowerCase()}(r),i,c),"_blank"===o.target||e.metaKey||e.ctrlKey||(e.preventDefault(),window.setTimeout(()=>{window.location.href=c},250)))});const c=document.querySelector("#statistics .slides"),a=document.querySelector("#statistics .content");let l=0;const d=[];document.querySelectorAll("#home-resources .card .image-wrapper-outer").forEach(e=>{d.push(e)}),document.querySelectorAll("#apply-steps .grid-item .image-wrapper-outer").forEach(e=>{d.push(e)});let u=0+window.innerHeight/2;const f=e=>`translate3d(${e}px, 0, 0)`,m=(e,t)=>[...e.children].find(e=>parseInt(e.dataset.id)===t);function h(e,t,n){const o=m(e,t),r=m(e,n);o&&r&&e.insertBefore(r,o)}function y(e,t,n){const o=m(e,n);if(!o)return;const r=[...e.children].findIndex(e=>parseInt(e.dataset.id)===t);
1-1!==r&&e.insertBefore(o,[...e.children][r+1])}function p(t,n,o){const r=document.querySelector(`${t} .arrow.prev`),s=document.querySelector(`${t} .arrow.next`);r&&r.setAttribute("tabindex","0"),s&&s.setAttribute("tabindex","0");let c=document.querySelector(`${t} .indicators`);const a=o?document.querySelector(o):null,l=document.querySelector(`${t} ${n?".slides-inner":".slides"}`);if(!(l&&l.children.length&&r&&s))return;const d=l.children.length;let u,p=0;const g="#testimonials"===t;function v(e){c&&c[e]&&([...c].forEach(e=>e.classList.remove("active")),c[e].classList.add("active"))}function w(e){a?.children[e]&&([...a.children].forEach(e=>{e.querySelector(".selected-line")?.classList.remove("active")}),a.children[e].querySelector(".selected-line")?.classList.add("active"))}function b(e,t){if(e<0||e>=d)return;const n=p;if(p=e,n===e)return;u||(u=l.offsetWidth);const o=t?h:y;m(l,n)&&m(l,e)&&(o(l,n,e),t&&(l.style.transform=f(-1*u)),v(e),w(e),setTimeout(function(){l.style.transition="transform 0.5s ease",l.style.transform=f(t?0:-1*u)},10),setTimeout(function(){l.style.transition="none",t||(l.style.transform=f(0),h(l,n,e))},500))}function L(){const e=[...this.parentElement.children].findIndex(e=>e===this);b(e,e<[...this.parentElement.children].findIndex(e=>[...e.classList].includes("active")))}function E(){const e=[...this.parentElement.children].findIndex(e=>e===this);b(e,e<[...this.parentElement.children].findIndex(e=>[...e.querySelector(".selected-line")?.classList||[]].includes("active")))}[...l.children].forEach((e,t)=>{e.dataset.id=t}),c&&(c.innerHTML=[...Array(d).keys()].map(e=>'<div class="gallery-indicator"></div>').join(""),c=c.getElementsByClassName("gallery-indicator"),c[0]?.classList.add("active"),[...c].forEach(e=>{e.addEventListener("click",L)})),a&&[...a.children].forEach(e=>{e.addEventListener("click",E),e.addEventListener("keydown",function(e){"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),E.call(this))}),e.setAttribute("tabindex","0")}),r.addEventListener("click",function(){b(0===p?d-1:p-1,!0),g&&i("prev")}),r.addEventListener("keydown",function(e){"Enter"!==e.key&&" "!==e.key||(b(0===p?d-1:p-1,!0),g&&i("prev"))}),s.addEventListener("click",function(){b(p===d-1?0:p+1,!1),g&&i("next")}),s.addEventListener("keydown",function(e){"Enter"!==e.key&&" "!==e.key||(b(p===d-1?0:p+1,!1),g&&i("next"))}),window.addEventListener("resize",function(){e?(l.style.transform="none",l.replaceChildren(...[...l.children].sort((e,t)=>e.dataset.id-t.dataset.id)),p=0,v(0),w(0)):u=l.children[0]?.offsetWidth||l.offsetWidth})}function g(e){const t=e.children[0];if(!t)return 0;const n=window.getComputedStyle(e),o=window.getComputedStyle(t);return(parseInt(n.paddingTop)||0)+(parseInt(n.borderTopWidth)||0)+(parseInt(o.height)||0)}const v=document.querySelectorAll("#footer .link-col");function w(){const e=this,{scrollHeight:t}=e,n=parseInt(e.style.height);e.style.height=`${n===t?g(e):t}px`}window.addEventListener("resize",()=>{v.forEach(t=>{t.style.height=e?`${g(t)}px`:"auto"})});const b=document.querySelector("#navbar");let L;b&&new ResizeObserver(function(){const t=b.offsetHeight;t!==L&&(e?document.querySelector(":root").style.setProperty("--full-height",`calc(100dvh - ${b.offsetHeight}px)`):document.querySelector(":root").style.setProperty("--full-height",`calc(100vh - ${b.offsetHeight}px)`),L=t)}).observe(b),window.addEventListener("resize",function(){e=window.innerWidth<=800});const E=new URLSearchParams(window.location.search),q=E.has("category")?E.get("category"):"All";let S=E.has("tag")?E.get("tag"):"Popular Tags";const k=E.get("search");let A="All",x="all",T="Popular Tags";const _=document.getElementById("search-form"),I=document.querySelector("#search-form .search-input input");_&&I&&_.addEventListener("submit",function(e){e.preventDefault(),"All"!==A?E.set("category",x):E.delete("category"),"Popular Tags"!==T?E.set("tag",T):E.delete("tag"),""!==I.value?E.set("search",I.value):E.delete("search"),function(){const e=window.location.pathname.replace(/\/$/,"");return"/news-and-advice"===e||e.startsWith("/news-and-advice/")}()&&t({event:"article_search",searchTerm:I.value.trim(),articleCategory:"All"!==A?A:"",articleTags:"Popular Tags"!==T?T:""}),window.location.search=E.toString()}),document.addEventListener("DOMContentLoaded",()=>{const e=document.querySelectorAll(".nav-link.menu");let t=null;const n=document.querySelector("#navbar");
1if(!n||!e.length)return;const o=(n,o)=>{if(!n)return e.forEach(e=>{e.classList.remove("open"),e.querySelector("button")?.setAttribute("aria-expanded","false"),e.querySelectorAll(".submenu a").forEach(e=>e.setAttribute("tabindex","-1"))}),void(t=null);const r=o??!n.classList.contains("open");e.forEach(e=>{const t=e===n&&r;e.classList.toggle("open",t);const o=e.querySelector("button");o&&o.setAttribute("aria-expanded",t),e.querySelectorAll(".submenu a").forEach(e=>e.setAttribute("tabindex",t?"0":"-1"))}),t=r?n:null,r&&n.querySelector(".submenu a")&&setTimeout(()=>n.querySelector(".submenu a").focus(),10)},r=()=>o(null,!1);e.forEach(e=>{const t=e.querySelectorAll(".submenu a");t.forEach(e=>e.setAttribute("tabindex","-1"));const n=e.querySelector("button");n&&(n.addEventListener("click",()=>o(e)),n.addEventListener("keydown",e=>{"Escape"===e.key&&(r(),n.focus())})),t.forEach((e,o)=>{e.addEventListener("keydown",e=>{"Escape"===e.key?(e.preventDefault(),r(),n?.focus()):"Tab"!==e.key||e.shiftKey||o!==t.length-1||setTimeout(r,10)})})}),document.addEventListener("click",e=>{n.contains(e.target)||r()}),document.addEventListener("keydown",e=>{"Tab"===e.key&&t&&!n.contains(document.activeElement)&&r()})});const H=document.getElementById("name-search-form");H&&H.addEventListener("submit",function(e){e.preventDefault(),""===H.querySelector("input").value?(document.getElementById("name-search-validation").innerHTML="This field is required.",document.getElementById("name-search-validation").style.display="block",document.getElementById("name-search-validation").style.color="#d3053b"):(document.getElementById("name-search-validation").style.display="none",t({event:"name_checker_submit"}),async function(e){const n=document.getElementById("name-search-validation");try{const o=await fetch(`https://monickerapi.spotlight.com/monicker/search/casting?term=${encodeURIComponent(e)}`);
1if(!o.ok)throw new Error("Name checker request failed");const r=await o.json(),s=Array.isArray(r)&&r.length>0;s?(n.innerHTML="Name is already taken.",n.style.display="block",n.style.color="#d3053b"):(n.innerHTML="It looks like this name is available from an initial check on the system. Our team will need to do further checks to confirm this.",n.style.display="block",n.style.color="black"),t({event:"name_checker_result",result:s?"taken":"available"})}catch(e){n.innerHTML="Sorry, we could not check that name right now. Please try again.",n.style.display="block",n.style.color="#d3053b",t({event:"name_checker_result",result:"error"})}}(H.querySelector("input").value))});const $={4874:"studio_booking",5472:"voiceover_booking"};function M(e){const t=function(e){const t=e.querySelector('input[name="form_id"]');return t?.value||e.getAttribute("data-form-id")||""}(e);return $[t]?$[t]:e.closest(".section-voiceover-booth-hire")||window.location.pathname.includes("voiceover")?"voiceover_booking":e.closest("#request-space, .section-studio-space-hire")?"studio_booking":""}function B(e,t){return t&&e.name?t.getAll(e.name).map(e=>String(e)):[]}function j(e,t,o){const r=/studio|space|room|booth|hire|booking/i,s=[];e.querySelectorAll(".forminator-field").forEach(e=>{r.test(n(e))&&s.push(...function(e,t){const o=[];return e.querySelectorAll("select").forEach(e=>{const r=B(e,t);Array.from(e.options).filter(e=>r.length?r.includes(e.value):e.selected).forEach(e=>{""!==e.value&&o.push(n(e)||e.value)})}),e.querySelectorAll('input[type="checkbox"], input[type="radio"]').forEach(e=>{const r=B(e,t);var s;(r.length?r.includes(e.value):e.checked)&&o.push(n((s=e).closest("label"))||s.value)}),o.filter(Boolean)}(e,t))});const i=[...new Set(s.map(e=>e.trim()))].filter(Boolean);return i.length?i.join(", "):"voiceover_booking"===o?"Voiceover Booth":""}function z(e){const t=e?.element;return t?(t.getAttribute("name")||t.getAttribute("data-field")||t.id||"").replace(/\[\]$/,""):""}var C;document.querySelector("#footer")&&(C=".forminator-ui .forminator-button-submit",new Promise(e=>{if(document.querySelector(C))return e(document.querySelector(C));const t=new MutationObserver(n=>{document.querySelector(C)&&(t.disconnect(),e(document.querySelector(C)))});t.observe(document.body,{childList:!0,subtree:!0})})).then(e=>{const t=document.querySelector(".forminator-ui .forminator-button-submit");t&&(t.style.borderRadius="30px",t.classList.add("button","solid","body-copy-1"))});const D=document.getElementById("login-modal"),P=document.querySelector(".navbar");if(window.openLoginModal=()=>{window.location.assign("/join-us/")},D){const e="a[href], button, textarea, input, select";let t=null;const n=t=>{D.querySelectorAll(e).forEach(e=>t?e.setAttribute("tabindex","-1"):e.removeAttribute("tabindex"))};window.openLoginModal=()=>{D.classList.add("open"),document.body.classList.add("frozen"),P?.classList.remove("open"),D.setAttribute("aria-hidden","false"),n(!1),t=document.activeElement,D.querySelector(e)?.focus()};const o=()=>{D.classList.remove("open"),document.body.classList.remove("frozen"),D.setAttribute("aria-hidden","true"),n(!0),t?.focus()};D.querySelector(".modal-close")?.addEventListener("click",o),D.addEventListener("click",e=>e.target===D&&o()),document.addEventListener("keydown",t=>{if(D.classList.contains("open")){if("Escape"===t.key)return o();if("Tab"===t.key){const n=[...D.querySelectorAll(e)];if(!n.length)return t.preventDefault();const o=n[0],r=n.slice(-1)[0];(t.shiftKey&&document.activeElement===o||!t.shiftKey&&document.activeElement===r)&&(t.preventDefault(),(t.shiftKey?r:o).focus())}}}),n(!0),D.setAttribute("aria-hidden","true")}const W=document.querySelector("#premiere-paywall"),R=document.querySelector(".is-premiere-page");if(W&&R){const e='a[href], button, textarea, input, select, [tabindex]:not([tabindex="-1"])';let t=null;const n=t=>{W.querySelectorAll(e).forEach(e=>t?e.setAttribute("tabindex","-1"):e.removeAttribute("tabindex"))},s=()=>{W.classList.add("open"),document.body.classList.add("frozen"),W.setAttribute("aria-hidden","false"),n(!1),t=document.activeElement},i=()=>{W.classList.remove("open"),document.body.classList.remove("frozen"),W.setAttribute("aria-hidden","true"),window.location.replace("/")};W.querySelector(".modal-close")?.addEventListener("click",i),W.querySelector(".button")?.addEventListener("click",i),document.addEventListener("keydown",t=>{if(W.classList.contains("open")){if("Escape"===t.key)return i();if("Tab"===t.key){const n=[...W.querySelectorAll(e)];if(!n.length)return;const o=n[0],r=n.slice(-1)[0];(t.shiftKey&&document.activeElement===o||!t.shiftKey&&document.activeElement===r)&&(t.preventDefault(),(t.shiftKey?r:o).focus())}}}),(async e=>{r()?o("https://profileapi.spotlight.com/marketing/user/",{method:"GET",headers:{"X-Spotlight-Marketing":"bd5639ce-5541-44f9-b11f-f321543cd975"},xhrFields:{withCredentials:!0},crossDomain:!0,type:"jsonp",contentType:"application/json",secure:!0,success:function(t){(t?.entitlements||[]).includes("premium_site_access")||e()},error:function(t){e()}}):e()})(s),n(!0),W.setAttribute("aria-hidden","true")}!function(){if(!window.jQuery)return;const e=window.jQuery,n=new WeakMap;e(document).on("forminator:form:submit:success",".forminator-custom-form",function(e,n){const o=M(this);o&&t({event:"form_submit",formName:o,studioSelection:j(this,n,o)})}),e(document).on("validation:invalid",".forminator-custom-form",function(){n.set(this,!0)}),e(document).on("validation:showError",".forminator-custom-form",function(e){const o=M(this);var r;o&&n.get(this)&&(n.set(this,!1),(r=Array.prototype.slice.call(arguments,1
1),r.reduce((e,t)=>t?Array.isArray(t)?(e.push(...t),e):(e.push(t),e):e,[])).forEach(e=>{t({event:"form_validation_error",formName:o,errorField:z(e),errorMessage:e?.message||String(e||"")})}))})}(),function(){const e=document.querySelectorAll(".s-trig"),t=new IntersectionObserver(function(e){e.forEach(e=>{n&&!e.isIntersecting?e.target.classList.add("set-up"):!n&&e.isIntersecting&&e.intersectionRatio>=.33&&e.target.classList.remove("set-up")}),n=!1},{threshold:[.1,.33]});let n=!0;e.forEach(e=>{t.observe(e)})}(),function(){const e=document.querySelectorAll(".bgr-vid"),t=new IntersectionObserver(function(e){e.forEach(e=>{e.isIntersecting?e.target.classList.contains("user-paused")||e.target.play():e.target.pause()})},{threshold:[.5]});e.forEach(e=>{t.observe(e);const n=e.nextElementSibling;n&&n.addEventListener("click",function(){e.classList.contains("user-paused")?(e.classList.remove("user-paused"),e.play()):(e.classList.add("user-paused"),e.pause())})})}(),function e(){const t=window.pageYOffset,n=t+window.innerHeight/2;u+=.35*(n-u),d.forEach(e=>{const n=e.querySelector(".image-wrapper-inner");if(!n)return;const o=e.getBoundingClientRect(),r=t+o.top+o.height/2-u;n.style.transform=`translate3d(0, ${.1*-r}px, 0)`}),window.requestAnimationFrame(e)}(),document.querySelector("#statistics")&&function t(){if(e)c.style.transform="none";else{const e=c.getBoundingClientRect(),t=e.bottom+window.pageYOffset+64,n=window.pageYOffset+window.innerHeight,o=e.width-a.offsetWidth,r=(n-t)/(window.innerHeight/2-e.height);l+=.05*(o*r-l),l>o?l=o:l<0&&(l=0),c.style.transform=`translate3d(-${l}px, 0, 0)`}requestAnimationFrame(t)}(),document.querySelector("#testimonials")&&p("#testimonials",!0),document.querySelector("#rooms-studios-gallery")&&p("#rooms-studios-gallery"),document.querySelector("#rooms-gallery")&&p("#rooms-gallery"),document.querySelector("#spaces")&&p("#spaces .component-image-carousel",!1,"#spaces .options"),v.forEach(e=>{e.addEventListener("click",w)}),e&&v.forEach(e=>{e.style.height=`${g(e)}px`}),document.querySelector("#plans .accordion")&&function(){const e=document.querySelectorAll(".accordion-section");function t(){e.forEach(e=>{const t=e.querySelector(".accordion-head"),n=e.querySelector(".accordion-body");t&&(e.classList.contains("open")?e.style.height=`${t.offsetHeight+(n?.offsetHeight||0)}px`:e.style.height=`${t.offsetHeight}px`)})}e.forEach(e=>{const o=e.querySelector(".accordion-head");o&&(o.setAttribute("tabindex","0"),o.addEventListener("click",function(){e.classList.toggle("open"),e.classList.contains("open")&&s("feature",n(o)),t()}),o.addEventListener("keydown",function(r){"Enter"!==r.key&&" "!==r.key||(r.preventDefault(),e.classList.toggle("open"),e.classList.contains("open")&&s("feature",n(o)),t())}))}),window.addEventListener("resize",t),t()}(),document.querySelector("#faq .accordion")&&function(){const e=document.querySelectorAll("#faq .accordion .row");function t(){e.forEach(e=>{const t=e.querySelector(".row-header"),n=e.querySelector(".row-body");t&&(e.classList.contains("open")?e.style.height=`${t.offsetHeight+(n?.offsetHeight||0)}px`:e.style.height=`${t.offsetHeight}px`)})}e.forEach(e=>{const o=e.querySelector(".row-header");o&&o.addEventListener("click",function(){e.classList.toggle("open"),e.classList.contains("open")&&s("faq",n(o)),t()})}),window.addEventListener("resize",t),t()}(),document.querySelector("#insurance .accordion")&&function(){const e=document.querySelectorAll("#insurance .accordion .row");function t(){e.forEach(e=>{const t=e.querySelector(".row-header"),n=e.querySelector(".row-body");t&&(e.classList.contains("open")?e.style.height=`${t.offsetHeight+(n?.offsetHeight||0)}px`:e.style.height=`${t.offsetHeight}px`)})}e.forEach(e=>{const o=e.querySelector(".row-header");o&&o.addEventListener("click",function(){e.classList.toggle("open"),e.classList.contains("open")&&s("feature",n(o)),t()})}),window.addEventListener("resize",t),t()}(),document.querySelectorAll(".faq__item").forEach(e=>{"true"!==e.dataset.spotlightAccordionTracked&&(e.dataset.spotlightAccordionTracked="true",e.addEventListener("toggle",function(){e.open&&s("faq",n(e.querySelector(".faq__question-text, summary")))}))}),document.querySelector("#grid-header #categories-dropdown")&&function(){const e=document.querySelector("#grid-header #categories-dropdown");
1if(!e)return;const t=e.querySelector(".sizer"),n=e.querySelector(".selected"),o=e.querySelector(".list");if(!t||!n||!o)return;let r=[["All","all"]];function s(){n.innerHTML="",o.innerHTML="";const e=r[0][0],t=(r[0][1],r.slice(1)),s=document.createElement("div");s.classList.add("option"),s.setAttribute("role","option"),s.setAttribute("aria-selected","true"),s.setAttribute("tabindex","0"),s.innerHTML=e,n.append(s),t.forEach(e=>{const t=document.createElement("div");t.classList.add("option"),t.setAttribute("role","option"),t.setAttribute("tabindex","-1"),t.setAttribute("aria-selected","false"),t.setAttribute("data-slug",e[1]),t.innerHTML=e[0];const n=document.createElement("div");n.classList.add("dot"),n.style.backgroundColor=`var(--category-${e[1]})`,t.append(n),o.append(t)})}document.querySelectorAll(".categories-source-list div").forEach(e=>{r.push([e.innerText.trim(),e.getAttribute("data-slug")])});let i="";r.forEach(e=>{e[0].length>i.length&&(i=e[0])}),t.innerHTML=i;const c=Math.max(0,r.findIndex(e=>e[1]===q));A=r[c][0],x=r[c][1],I&&k&&(I.value=k),r=[r[c],...[...r.slice(0,c),...r.slice(c+1)].sort()],s(),document.addEventListener("click",function(t){const n=t.target,o=n?.classList?.contains("option");if(n===e||e.contains(n))if(o){const t=n.innerText,o=r.findIndex(e=>e[0]===t);if(-1===o)return;A=t,x=r[o][1],r=[r[o],...[...r.slice(0,o),...r.slice(o+1)].sort()],s(),e.classList.remove("open"),e.setAttribute("aria-expanded","false")}else e.classList.toggle("open"),e.setAttribute("aria-expanded",e.classList.contains("open"));else e.classList.remove("open"),e.setAttribute("aria-expanded","false")}),e.addEventListener("keydown",function(t){const n=e.classList.contains("open"),r=[...o.querySelectorAll(".option")],s=r.findIndex(e=>e===document.activeElement);switch(t.key){case"Enter":case" ":t.preventDefault(),n?-1!==s&&r[s].click():(e.classList.add("open"),e.setAttribute("aria-expanded","true"),r[0]?.focus());break;case"Escape":t.preventDefault(),e.classList.remove("open"),e.setAttribute("aria-expanded","false"),e.querySelector(".selected .option")?.focus();break;case"Tab":if(!n)return;if(t.preventDefault(),t.shiftKey){const e=(s-1+r.length)%r.length;r[e]?.focus()}else{const e=(s+1)%r.length;r[e]?.focus()}}})}(),document.querySelector("#grid-header #tags-dropdown")&&function(){const e=document.querySelector("#grid-header #tags-dropdown");if(!e)return;const t=e.querySelector(".sizer"),n=e.querySelector(".selected"),o=e.querySelector(".list");if(!t||!n||!o)return;let r=[["Popular Tags","popular-tags"]];function s(){n.innerHTML="",o.innerHTML="";const e=r[0][0],t=r.slice(1),s=document.createElement("div");s.classList.add("t-option"),s.innerHTML=e,n.append(s),t.forEach(e=>{const t=document.createElement("div");t.classList.add("t-option"),t.innerHTML=e[0],t.setAttribute("data-slug",e[1]),o.append(t)})}document.querySelectorAll(".tags-source-list div").forEach(e=>{r.push([e.innerText.trim(),e.getAttribute("data-slug")])});let i="";r.forEach((e,t)=>{e[0].length>i.length&&(i=e[0])}),t.innerHTML=i;let c=!1;r.forEach(e=>{e[0]===S&&(c=!0)}),c?T=S:(S="Popular Tags",T="Popular Tags");const a=r.findIndex(e=>e[0]===S);r=[r[a],...[...r.slice(0,a),...r.slice(a+1)].sort()],s(),document.addEventListener("click",function(t){const o=t.target;if(o===e||o===n)e.classList.toggle("open");else if(o?.classList?.contains("t-option")){const t=[o.innerText,o.getAttribute("slug")],n=r.findIndex(e=>e[0]===t[0]);if(-1===n)return;T=o.innerText,r=[r[n],...[...r.slice(0,n),...r.slice(n+1)].sort()],s(),e.classList.remove("open")}else e.classList.remove("open")})}(),document.querySelector("#navbar")&&(function t(){if(!e){const e=b?.querySelector(".links");if(!e)return void window.requestAnimationFrame(t);const n=e.getBoundingClientRect();b.querySelectorAll(".submenu").forEach(e=>{e.style.paddingLeft=`${n.left}px`,e.style.paddingRight=window.innerWidth-n.right+"px"})}window.requestAnimationFrame(t)}(),function(){const e=document.querySelector(".mobile-menu-button");if(!e||!b)return;e.addEventListener("click",function(){b.classList.toggle("open"),document.body.classList.toggle("frozen")});const t=b.querySelectorAll(".nav-link.menu");
1t.forEach(e=>{e.addEventListener("click",function(){window.innerWidth<=1240&&t.forEach(t=>{t===e?t.classList.toggle("open"):t.classList.remove("open")})})}),window.addEventListener("resize",function(){b.classList.remove("open"),document.getElementById("login-modal")?.classList.contains("open")||document.body.classList.remove("frozen"),t.forEach(e=>{e.classList.remove("open")})})}()),b&&(function(){const e=window.location.href,t=document.getElementById("navbar");t&&t.querySelectorAll("a[href]").forEach(t=>{const n=t.href;if(e===n||e.startsWith(n)){t.classList.add("current");const e=t.closest(".nav-item");e&&e.classList.add("current")}})}(),r()&&o("https://profileapi.spotlight.com/marketing/user/",{method:"GET",headers:{"X-Spotlight-Marketing":"bd5639ce-5541-44f9-b11f-f321543cd975"},xhrFields:{withCredentials:!0},crossDomain:!0,type:"jsonp",contentType:"application/json",secure:!0,success:function(e){e.portalId&&e.entitlements&&function(){const e=document.querySelector("#sign-in-button");e&&(e.innerText="My Home",e.setAttribute("href","https://app.spotlight.com/myhome"))}()},error:function(e){}})),document.querySelector("#grid")&&function(){const e=document.querySelector("#grid .cards-grid"),t=document.querySelector("#grid .bottom"),n=document.querySelector("#grid .see-more-link");let s=1;if(!e||!t||!n)return;const i={"/news-and-advice/":"load_more_news_advice_articles","/help-and-faqs/":"load_more_help_faq_articles","/the-small-print/":"load_more_small_print_articles"}[window.location.pathname],c=new URLSearchParams(window.location.search);i&&r()&&n.addEventListener("click",function(){s+=1;const n=e.children.length;o({type:"POST",url:"/wp-admin/admin-ajax.php",dataType:"json",data:{action:i,paged:s,category:c.get("category"),tag:c.get("tag"),tagSlug:(c.get("tag")||"").split(" ").join("-"),search:c.get("search")},success:function(o){s>=o.max&&(t.style.display="none"),e.innerHTML+=o.html,setTimeout(()=>{const t=Array.from(e.children).slice(n);t.length>0&&(t[0].hasAttribute("tabindex")||t[0].setAttribute("tabindex","-1"),t[0].focus())},0)}})})}(),document.getElementById("home-page-carousel")&&function(){const e=document.getElementById("home-page-carousel"),t=e.querySelector(".indicator-dots"),n=e.querySelector(".play-toggle"),o=e.querySelector(".bar"),r=e.querySelectorAll(".desktop-images img"),s=e.querySelectorAll(".mobile-images img");if(!(t&&n&&o&&r.length&&s.length))return;const i="transform 1s ease",c="transform 0s linear";let a=!0,l=!0,d=0,u=0,f=0;const m=r.length-1;function h(){d=0,o.style.transform=`scaleX(${d/5e3})`,r.forEach((e,t)=>{e.style.transition=t===f||t===u?i:c,t===u?e.style.transform="none":t>u?e.style.transform=t===m&&0===u?"translate3d(-100%, 0, 0)":"translate3d(100%, 0, 0)":t<u&&(e.style.transform=0===t&&u===m?"translate3d(100%, 0, 0)":"translate3d(-100%, 0, 0)")}),s.forEach((e,t)=>{e.style.transition=t===f||t===u?i:c,t===u?e.style.transform="none":t>u?e.style.transform=t===m&&0===u?"translate3d(-100%, 0, 0)":"translate3d(100%, 0, 0)":t<u&&(e.style.transform=0===t&&u===m?"translate3d(100%, 0, 0)":"translate3d(-100%, 0, 0)")}),t.querySelectorAll(".dot").forEach((e,t)=>{t===u?e.classList.add("current"):e.classList.remove("current")}),setTimeout(function(){a=!0},1100)}r.forEach((e,n)=>{const o=document.createElement("div");o.classList.add("dot"),n===u&&o.classList.add("current"),o.addEventListener("click",function(){a&&(a=!1,f=u,u=n,h())}),t.append(o)}),n.addEventListener("click",function(){l=!l,this.classList.toggle("paused")}),n.addEventListener("keydown",function(e){"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),l=!l,this.classList.toggle("paused"))}),h(),setInterval(function(){l&&(d+=10,o.style.transform=`scaleX(${d/5e3})`,d>5e3&&a&&(a=!1,f=u,u+1<=m?u+=1:u=0,h()))},10)}()})();
2//# sourceMappingURL=script.js.map

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.