PageSourceSearch

https://www.coastmagazine.co.uk/_static/??/wp-content/themes/kelse…/js/dist/hooks.min.js?m=1790755858j

js coastmagazine.co.uk collected 2026-10-02 17:33:50 UTC 16,502 bytes, 8 lines download raw bytes

1(()=>{"use strict";const e={init:function(){this.pageSkinAds()},pageSkinAds:function(){var e,t=this,n=function(){if(t.breakpoint=window.matchMedia("(max-width: 1850px)"),!t.breakpoint.matches){var e=document.querySelector(".js-pageskin-ads");if(e){var n=document.querySelector("#content > .wrapper"),i=e.querySelector(".page-skin-ad--left"),a=e.querySelector(".page-skin-ad--right");if(n&&(i||a)){var s=n.getBoundingClientRect(),r=(window.innerWidth-s.width)/2,o=r-160-20,c=r-160-20;o<0&&(o=0),c<0&&(c=0);var l=s.top>0?s.top:50;document.body.classList.contains("admin-bar")&&(l+=32),e.style.top="".concat(l,"px"),i&&(i.style.left="".concat(o,"px")),a&&(a.style.right="".concat(c,"px")),e.classList.add("show")}}}};n(),window.addEventListener("jumpPoints:added",function(){n()}),document.addEventListener("scroll",n),window.addEventListener("resize",function(){clearTimeout(e),e=setTimeout(function(){n()},500)})}};function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}function n(e,n,i){return(n=function(e){var n=function(e,n){if("object"!=t(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var a=i.call(e,n||"default");if("object"!=t(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"==t(n)?n:n+""}(n))in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i,e}var i;jQuery(document).ready(function(){if(jQuery(".post-content").length&&jQuery(window).width()<979){var e=jQuery(".post-content .editable-content");e.length||(e=jQuery(".post-content"));var t=e.find("> p").size(),i=Math.round(t/3),a=2*i,s=jQuery("#aside .cta.side-ad-1").html(),r=jQuery("#aside .cta.side-ad-2").html();jQuery(".post-content p:eq("+i+")").after('<div class="post-content-ad">'+s+"</div>"),jQuery(".post-content p:eq("+a+")").after('<div class="post-content-ad">'+r+"</div>"),jQuery("#aside .cta.side-ad").each(function(){jQuery(this).remove()})}jQuery("body").hasClass("archive")&&jQuery(window).width()<979&&jQuery("#aside .cta.side-ad").each(function(){jQuery(this).remove()});jQuery("body").attr("data-theme-path");jQuery(".content-form .text, .content-form .textarea, .content-form .email, .content-form .tel, .content-form .date, .content-form .password").each(function(){var e=jQuery(this).find("label").text();jQuery(this).find('input[type!="hidden"], textarea').attr("placeholder",e)}),jQuery(".content-form .select select").length&&jQuery(".content-form .select select").customSelect(),jQuery("#header .nav-toggle").click(function(){return jQuery("body").toggleClass("side-nav-active"),!1}),jQuery("#main-nav .menu > li > a").each(function(){var e=jQuery(this),t=jQuery(this).parent();e.wrap('<div class="item" />'),t.hasClass("menu-item-has-children")&&(t.append('<button class="more">More</button>'),t.find(".more").click(function(){var e=jQuery(this),t=e.parentsUntil(".menu").find(".sub-menu");jQuery(".main-nav .more").not(e).removeClass("active"),jQuery(".main-nav .sub-menu").not(t).removeClass("active").slideUp(),e.hasClass("active")?(e.removeClass("active"),t.removeClass("active").slideUp()):(e.addClass("active"),t.addClass("active").slideDown())}))}),jQuery(".filter-form select").change(function(){window.location=jQuery(this).val()}),jQuery("#aside .facetwp header button").click(function(){return jQuery(this).toggleClass("active"),jQuery(this).closest(".cta").find(".filters").slideToggle(),!1}),jQuery(".scroll").click(function(){var e=jQuery(this).attr("href");return jQuery("html, body").animate({scrollTop:jQuery(e).offset().top-100},1e3),!1}),jQuery("p").each(function(){var e=jQuery(this);0==e.html().replace(/\s|&nbsp;/g,"").length&&e.remove()}),jQuery(".editable-content table").each(function(){jQuery(this).wrap('<div class="table-wrap"></div>')}),jQuery('iframe[src*="youtube.com"], iframe[src*="vimeo.com"]').each(function(){var e=jQuery(this).attr("src");jQuery(this).attr("src",e+"?rel=0").width("100%").height("100%").wrap('<div class="video-wrap"><div class="video"></div></div>')}),jQuery('iframe[src*="https://www.google.com/maps/"]').each(function(){jQuery(this).width("100%").height("100%").wrap('<div class="map-wrap"></div>')}),jQuery.fn.magnificPopup&&(jQuery(".video-link").magnificPopup({disableOn:0,type:"iframe",mainClass:"mfp-fade",removalDelay:160,preloader:!1,fixedContentPos:!1}),jQuery(".gallery-list li a, .gallery .gallery-item a").magnificPopup({type:"image",gallery:{enabled:!0}}),jQuery(".button.login-form").magnificPopup({type:"inline",midClick:!0}),jQuery(".button.newsletter").magnificPopup({midClick:!0,items:{src:"#
1newsletter-form",type:"inline"}})),jQuery.fn.slick&&jQuery("#trending-posts .posts ul li:nth-child(2)").length&&jQuery("#trending-posts .posts ul").slick({autoplay:!0,autoplaySpeed:5e3,speed:1e3,arrows:!1,fade:!0,pauseOnHover:!0,dots:!1}),jQuery.fn.slick&&jQuery("#content .cta-posts").each(function(){var e=jQuery(this);e.find(".posts-list li:nth-child(2)").length&&(e.append('<div class="controls" />'),e.find(".posts-list").slick(n(n(n(n({autoplay:!0,autoplaySpeed:5e3,speed:1e3,arrows:!1,fade:!0,pauseOnHover:!0,dots:!1},"arrows",!0),"prevArrow",'<button class="control prev">Previous</button>'),"nextArrow",'<button class="control next">Next</button>'),"appendArrows",e.find(".controls"))))}),jQuery(".info-list").each(function(){var e=jQuery(this);e.find("li:first .toggle").addClass("active"),e.find("li:not(:first) .info").hide(),e.find(".toggle").each(function(){jQuery(this).click(function(){var t=jQuery(this),n=t.attr("href");return t.hasClass("active")?(t.removeClass("active"),e.find(n).slideUp()):(e.find("li .toggle").each(function(){jQuery(this).removeClass("active")}),t.addClass("active"),e.find("li .info").each(function(){jQuery(this).slideUp()}),e.find(n).slideDown()),!1})})}),jQuery(document).on("facetwp-loaded",function(){FWP.loaded&&jQuery("html, body").animate({scrollTop:jQuery("body").offset().top},0)})}),jQuery(window).load(function(){setTimeout(function(){var e=new ScrollMagic.Controller,t=130;if(jQuery("body").hasClass("logged-in"))t=98;new ScrollMagic.Scene({triggerElement:"#header",triggerHook:0}).setClassToggle("body","nav-active").offset(t).addTo(e);var n=-30;if(jQuery("body").hasClass("logged-in"))n=-52;jQuery("#content .header-ad iframe").length&&(90==jQuery("#content .header-ad iframe").outerHeight()&&(jQuery("#content .header-ad").addClass("sml"),new ScrollMagic.Scene({triggerElement:"#content .header-ad",triggerHook:0,duration:80}).setClassToggle("#content .header-ad","active").offset(n+80).addTo(e),new ScrollMagic.Scene({triggerElement:"#content .header-ad",triggerHook:0,duration:90}).setClassToggle("#content .header-ad","sticky").offset(n+160).addTo(e)));jQuery("#aside .side-ad-1 iframe").length&&(250==jQuery("#aside .side-ad-1 iframe").outerHeight()&&(new ScrollMagic.Scene({triggerElement:"#aside .side-ad-1",triggerHook:0,duration:350}).setClassToggle("#aside .side-ad-1 .ad","active").offset(n).addTo(e),new ScrollMagic.Scene({triggerElement:"#aside .side-ad-1",triggerHook:0}).setClassToggle("#aside .side-ad-1 .ad","sticky").offset(n+350).addTo(e)));if(jQuery("#aside .side-ad-2 iframe").length){var i=jQuery("#aside").outerHeight(),a=jQuery("#aside .ctas").outerHeight(),s=(jQuery("#aside .side-ad-2 iframe").outerHeight(),jQuery("#main").outerHeight());if(a<s){var r=i-a-20,o=s-a-20;new ScrollMagic.Scene({triggerElement:"#aside .side-ad-2",triggerHook:0,duration:r}).setClassToggle("#aside .side-ad-2 .ad","active").offset(n).addTo(e),new ScrollMagic.Scene({triggerElement:"#aside .side-ad-2",triggerHook:0}).setClassToggle("#aside .side-ad-2 .ad","sticky").offset(n+o).addTo(e)}}if(jQuery("#content .site-ad iframe").length){var c=jQuery("#content").outerHeight(),l=jQuery("#content .site-ad").outerHeight();if(l<c){var d=c-l;new ScrollMagic.Scene({triggerElement:"#content",triggerHook:0,duration:d}).setClassToggle("#content .site-ad ","active").offset(n+50).addTo(e),new ScrollMagic.Scene({triggerElement:"#content",triggerHook:0}).setClassToggle("#content .site-ad","sticky").offset(d).addTo(e)}}},2e3),jQuery(".tabs-wrap").each(function(){var e=jQuery(this);function t(){e.find(".tabs-list li").removeClass("selected"),e.find('a[href="'+currentTab+'"]').parent().addClass("selected"),e.find(".select-tabs").length&&(e.find(".select-tabs select option:first").attr("selected",!1),e.find('.select-tabs select option[value="'+currentTab+'"]').attr("selected",!0),jQuery(".select-tabs select").trigger("render")),e.find(".tabs .tab").hide(),jQuery(currentTab).show()}e.find(".tabs .tab").hide(),e.find(".tabs .tab:first").show(),e.find(".tabs-list li:first").addClass("selected"),e.find(".tabs-list li a").click(function(){return currentTab=jQuery(this).attr("href"),t(),!1}),e.find(".select-tabs").length&&(e.find(".select-tabs select option:first").attr("selected",!0),e.find(".select-tabs select").change(function(){currentTab=jQuery(this).val(),t()}))})}),(i=jQuery).fn.extend({customSelect:function(e){if(void 0===document.body.style.maxHeight)return this;var t=(e=i.extend({customClass:"customSelect",mapClass:!0,mapStyle:!0},e)).customClass,n=function(e,t){var n=e.find(":selected"),s=t.children(":first"),r=n.html()||"&nbsp;";s.html(r),n.attr("disabled")?t.addClass(a("DisabledOption")):t.removeClass(a("DisabledOption")),setTimeout(function(){t.removeClass(a("Open")),i(document).off("mouseup.customSelect")},60)},a=function(e){return t+e};return this.each(function(){var s=i(this),r=i("<span />").addClass(a("Inner")),o=i("<span />");s.after(o.append(r)),o.addClass(t),e.mapClass&&o.addClass(s.attr("class")),e.mapStyle&&o.attr("style",s.attr("style")),s.addClass("hasCustomSelect").on("render.customSelect",function(){n(s,o),s.css("width","");var e=parseInt(s.outerWidth(),10)-(parseInt(o.outerWidth(),10)-parseInt(o.width(),10));o.css({display:"inline-block"});var t=o.outerHeight();s.attr("disabled")?o.addClass(a("Disabled")):o.removeClass(a("Disabled")),r.css({width:e,display:"inline-block"}),s.css({"-webkit-appearance":"menulist-button",width:o.outerWidth(),position:"absolute",opacity:0,height:t,fontSize:o.css("font-size")})}).on("change.customSelect",function(){o.addClass(a("Changed")),n(s,o)}).on("keyup.customSelect",function(e){o.hasClass(a("Open"))?13!=e.which&&27!=e.which||n(s,o):(s.trigger("blur.customSelect"),s.trigger("focus.customSelect"))}).on("mousedown.customSelect",function(){o.removeClass(a("Changed"))}).on("mouseup.customSelect",function(e){o.hasClass(a("Open"))||(i("."+a("Open")).not(o).length>0&&"undefined"!=typeof InstallTrigger?s.trigger("focus.customSelect"):(o.addClass(a("Open")),e.stopPropagation(),i(document).one("mouseup.customSelect",function(e){e.target!=s.get(0)&&i.inArray(e.target,s.find("*").get())<0?s.trigger("blur.customSelect"):n(s,o)})))}).on("focus.customSelect",function(){o.removeClass(a("Changed")).addClass(a("Focus"))}).on("blur.customSelect",function(){o.removeClass(a("Focus")+" "+a("Open"))}).on("mouseenter.customSelect",function(){o.addClass(a("Hover"))}).on("mouseleave.customSelect",function(){o.removeClass(a("Hover"))}).trigger("render.customSelect")})}}),document.addEventListener("DOMContentLoaded",function(){e.init()})})();
2//# sourceMappingURL=main.js.map;
3/*! This file is auto-generated */
4(function() {
5"use strict";var wp;(wp||={}).hooks=(()=>{var v=Object.defineProperty;var S=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var I=Object.prototype.hasOwnProperty;var w=(e,n)=>{for(var s in n)v(e,s,{get:n[s],enumerable:!0})},D=(e,n,s,r)=>{if(n&&typeof n=="object"||typeof n=="function")for(let t of g(n))!I.call(e,t)&&t!==s&&v(e,t,{get:()=>n[t],enumerable:!(r=S(n,t))||r.enumerable});return e};var T=e=>D(v({},"__esModule",{value:!0}),e);var le={};w(le,{actions:()=>ae,addAction:()=>J,addFilter:()=>K,applyFilters:()=>N,applyFiltersAsync:()=>ee,createHooks:()=>F,currentAction:()=>te,currentFilter:()=>re,defaultHooks:()=>b,didAction:()=>ie,didFilter:()=>se,doAction:()=>X,doActionAsync:()=>Y,doingAction:()=>ne,doingFilter:()=>oe,filters:()=>ce,hasAction:()=>P,hasFilter:()=>Q,removeAction:()=>L,removeAllActions:()=>U,removeAllFilters:()=>W,removeFilter:()=>M});function z(e){return typeof e!="string"||e===""?(console.error("The namespace must be a non-empty string."),!1):/^[a-zA-Z][a-zA-Z0-9_.\-\/]*$/.test(e)?!0:(console.error("The namespace can only contain numbers, letters, dashes, periods, underscores and slashes."),!1)}var m=z;function E(e){return typeof e!="string"||e===""?(console.error("The hook name must be a non-empty string."),!1):/^__/.test(e)?(console.error("The hook name cannot begin with `__`."),!1):/^[a-zA-Z][a-zA-Z0-9_.-]*$/.test(e)?!0:(console.error("The hook name can only contain numbers, letters, dashes, periods and underscores."),!1)}var f=E;function Z(e,n){return function(r,t,a,i=10){let c=e[n];if(!f(r)||!m(t))return;if(typeof a!="function"){console.error("The hook callback must be a function.");return}if(typeof i!="number"){console.error("If specified, the hook priority must be a number.");return}let l={callback:a,priority:i,namespace:t};if(c[r]){let o=c[r].handlers,d;for(d=o.length;d>0&&!(i>=o[d-1].priority);d--);d===o.length?o[d]=l:o.splice(d,0,l),c.__current.forEach(h=>{h.name===r&&h.currentIndex>=d&&h.currentIndex++})}else c[r]={handlers:[l],runs:0};r!=="hookAdded"&&e.doAction("hookAdded",r,t,a,i)}}var H=Z;function C(e,n,s=!1){return function(t,a){let i=e[n];if(!f(t)||!s&&!m(a))return;if(!i[t])return 0;let c=0;if(s)c=i[t].handlers.length,i[t]={runs:i[t].runs,handlers:[]};else{let l=i[t].handlers;for(let o=l.length-1;o>=0;o--)l[o].namespace===a&&(l.splice(o,1),c++,i.__current.forEach(d=>{d.name===t&&d.currentIndex>=o&&d.currentIndex--}))}return t!=="hookRemoved"&&e.doAction("hookRemoved",t,a),c}}var p=C;function O(e,n){return function(r,t){let a=e[n];return typeof t<"u"?r in a&&a[r].handlers.some(i=>i.namespace===t):r in a}}var _=O;function j(e,n,s,r){return function(a,...i){let c=e[n];c[a]||(c[a]={handlers:[],runs:0}),c[a].runs++;let l=c[a].handlers;if(!l||!l.length)return s?i[0]:void 0;let o={name:a,currentIndex:0};async function d(){try{c.__current.add(o);let u=s?i[0]:void 0;for(;o.currentIndex<l.length;
5)u=await l[o.currentIndex].callback.apply(null,i),s&&(i[0]=u),o.currentIndex++;return s?u:void 0}finally{c.__current.delete(o)}}function h(){try{c.__current.add(o);let u=s?i[0]:void 0;for(;o.currentIndex<l.length;)u=l[o.currentIndex].callback.apply(null,i),s&&(i[0]=u),o.currentIndex++;return s?u:void 0}finally{c.__current.delete(o)}}return(r?d:h)()}}var A=j;function $(e,n){return function(){let r=e[n];return Array.from(r.__current).at(-1)?.name??null}}var y=$;function V(e,n){return function(r){let t=e[n];return typeof r>"u"?t.__current.size>0:Array.from(t.__current).some(a=>a.name===r)}}var k=V;function q(e,n){return function(r){let t=e[n];if(f(r))return t[r]&&t[r].runs?t[r].runs:0}}var x=q;var B=class{actions;filters;addAction;addFilter;removeAction;removeFilter;hasAction;hasFilter;removeAllActions;removeAllFilters;doAction;doActionAsync;applyFilters;applyFiltersAsync;currentAction;currentFilter;doingAction;doingFilter;didAction;didFilter;constructor(){this.actions=Object.create(null),this.actions.__current=new Set,this.filters=Object.create(null),this.filters.__current=new Set,this.addAction=H(this,"actions"),this.addFilter=H(this,"filters"),this.removeAction=p(this,"actions"),this.removeFilter=p(this,"filters"),this.hasAction=_(this,"actions"),this.hasFilter=_(this,"filters"),this.removeAllActions=p(this,"actions",!0),this.removeAllFilters=p(this,"filters",!0),this.doAction=A(this,"actions",!1,!1),this.doActionAsync=A(this,"actions",!1,!0),this.applyFilters=A(this,"filters",!0,!1),this.applyFiltersAsync=A(this,"filters",!0,!0),this.currentAction=y(this,"actions"),this.currentFilter=y(this,"filters"),this.doingAction=k(this,"actions"),this.doingFilter=k(this,"filters"),this.didAction=x(this,"actions"),this.didFilter=x(this,"filters")}};function G(){return new B}var F=G;var b=F(),{addAction:J,addFilter:K,removeAction:L,removeFilter:M,hasAction:P,hasFilter:Q,removeAllActions:U,removeAllFilters:W,doAction:X,doActionAsync:Y,applyFilters:N,applyFiltersAsync:ee,currentAction:te,currentFilter:re,doingAction:ne,doingFilter:oe,didAction:ie,didFilter:se,actions:ae,filters:ce}=b;return T(le);})();
6(window.wp ||= {}).hooks = wp.hooks;
7})();
8;

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.