function getCookies(e){for(var t=e+"=",o=decodeURIComponent(document.cookie).split(";"),n=0;n */function getProducts(e){fetch("/reviews/products-in-review?invoiceNum="+e,{method:"GET",headers:{"Content-Type":"application/json"}}).then((e=>{if(!e.ok)throw new Error("Network response was not ok");return e.json()})).then((e=>{const t=document.querySelector("#buy-reviewed-products .panel-body table tbody");for(;t.firstChild;)t.removeChild(t.firstChild);e.forEach((e=>{const o=t.insertRow();o.dataset.prodCode=e.PartCode,console.log(t);const n=o.insertCell(0),i=o.insertCell(1),r=o.insertCell(2),a=o.insertCell(3);n.textContent=e.Description,r.textContent=e.Qty;const s=document.createElement("i"),l=document.createElement("input");l.type="checkbox",e.TotalAvailable>=e.Qty&&!e.quoteOnly?(s.className="icon-ok-circled",s.style.color="green",l.checked=!0):(s.className="icon-cancel-circled",s.style.color="red",l.disabled=!0),i.appendChild(l),a.appendChild(s)}))})).catch((e=>{console.error("Fetch error:",e)}))}function addProductsToBasket(){const e=[];document.querySelectorAll(".modal table tbody tr").forEach((t=>{const o=t.querySelector('input[type="checkbox"]');if(o&&o.checked){const o={sku:t.dataset.prodCode,qty:t.cells[2].textContent};e.push(o)}}));const t={items:e};fetch("/basket/add-multiple",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}).then((e=>{if(!e.ok)throw new Error("Network response was not ok");return e.json()})).then((e=>{setBasket({Qty:e.totalQty,Cost:e.totalPrice}),showAlert("icon-ok-circled",CONST_PRODUCT_ADD_TITLE,CONST_PRODUCT_ADDED+" "+CONST_PRODUCT_ADDED_APPEND,"#FFFFFF",!1),modalClose()})).catch((e=>{console.error("Fetch error:",e)}))}window.jsLoaded=function(){},function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Validator=t():e.Validator=t()}(window,(function(){return o={},e.m=t=[function(e,t,o){(function(t){function o(){return d.Date.now()}var n=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,r=/^0b[01]+$/i,a=/^0o[0-7]+$/i,s=parseInt,l="object"==typeof t&&t&&t.Object===Object&&t,c="object"==typeof self&&self&&self.Object===Object&&self,d=l||c||Function("return this")(),u=Object.prototype.toString,p=Math.max,f=Math.min;function m(e){var t=typeof e;return e&&("object"==t||"function"==t)}function h(e){if("number"==typeof e)return e;if("symbol"==typeof(t=e)||(o=t)&&"object"==typeof o&&"[object Symbol]"==u.call(t))return NaN;var t,o,l;if(m(e)&&(e=m(l="function"==typeof e.valueOf?e.valueOf():e)?l+"":l),"string"!=typeof e)return 0===e?e:+e;e=e.replace(n,"");var c=r.test(e);return c||a.test(e)?s(e.slice(2),c?2:8):i.test(e)?NaN:+e}e.exports=function(e,t,n){var i,r,a,s,l,c,d=0,u=!1,v=!1,y=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function g(t){var o=i,n=r;return i=r=void 0,d=t,s=e.apply(n,o)}function w(e){var o=e-c;return void 0===c||t<=o||o<0||v&&a<=e-d}function b(){var e,n,i=o();if(w(i))return E(i);l=setTimeout(b,(n=t-((e=i)-c),v?f(n,a-(e-d)):n))}function E(e){return l=void 0,y&&i?g(e):(i=r=void 0,s)}function S(){var e,n=o(),a=w(n);if(i=arguments,r=this,c=n,a){if(void 0===l)return d=e=c,l=setTimeout(b,t),u?g(e):s;if(v)return l=setTimeout(b,t),g(c)}return void 0===l&&(l=setTimeout(b,t)),s}return t=h(t)||0,m(n)&&(u=!!n.leading,a=(v="maxWait"in n)?p(h(n.maxWait)||0,t):a,y="trailing"in n?!!n.trailing:y),S.cancel=function(){void 0!==l&&clearTimeout(l),i=c=r=l=void(d=0)},S.flush=function(){return void 0===l?s:E(o())},S}}).call(this,o(2))},function(e,t,o){var n=o(5).default;n.plugin=n.prototype.plugin,n.plugin("match",o(3).default),n.plugin("email",o(4).default),e.exports=n},function(e,t){var o=function(){return this}();try{o=o||new Function("return this")()}catch(e){"object"==typeof window&&(o=window)}e.exports=o},function(e,t,o){"use strict";o.r(t),t.default={install:function(){},validate:function(e,t){return e.value===document.querySelector(t).value}}},function(e,t,o){"use strict";o.r(t),t.default={install:function(){},validate:function(e){return/^[_A-z0-9._%+-]+@[_A-z0-9.-]+\.[_A-z]{2,}$/.test(e.value)}}},function(e,t,o){"use strict";o.r(t),o.d(t,"default",(function(){return l}));var n=o(0),i=o.n(n);function r(e,t){for(Element.prototype.matches||(Element.prototype.matches=Element.prototype.matchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector||Element.prototype.webkitMatchesSelector||function(e){for(var t=(this.document||this.ownerDocument).querySelectorAll(e),o=t.length;0<=--o&&t.item(o)!==this;);return-1{if(t.isIntersecting){var o=t.target.getAttribute("data-animate");o&&t.target.classList.add(o),e.unobserve(t.target),observedElements.delete(t.target)}}))}),{threshold:.1});document.querySelectorAll("[data-animate]").forEach((t=>{observedElements.has(t)||(e.observe(t),observedElements.add(t))}))}function executeScripts(e){e.querySelectorAll("script").forEach((e=>{if(e.src){const t=document.createElement("script");t.src=e.src,document.head.appendChild(t)}else{const t=document.createElement("script");t.text=e.innerHTML,document.head.appendChild(t)}}))}async function modalOpen(e){try{if(e){if(document.body.classList.remove("modal-open"),document.body.classList.add("modal-open"),e&&e.hasAttribute("data-lazy")){var t=e.getAttribute("data-lazy");e.innerHTML.trim()||await fetch(t).then((e=>e.text())).then((t=>{e.innerHTML=t,executeScripts(e),leadHider(e),af_load(e)})).catch((e=>console.error("Error loading the form:",e)))}e.style.display="block",setTimeout((function(){e.classList.add("in")}),0);var o=document.createElement("div");o.classList.add("modal-backdrop"),o.classList.add("fade"),document.body.appendChild(o),setTimeout((function(){o.classList.add("in")}),0),setTimeout((function(){void 0!==validatorInit&&validatorInit&&validatorInit()}),0),setTimeout((()=>{addModalDismissListener(e)}),500);try{var n=e.id;gtag("event","modal_open",{event_category:"engagement",event_label:n,value:1}),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"modal_open"})}catch(e){console.log(e)}}}catch(e){console.error("Error in modalOpen function:",e)}}function modalClose(){modalCloseId(document.querySelector(".modal.in"))}function modalCloseId(e){try{document.body.classList.remove("modal-open");var t=e;t&&(t.classList.remove("in"),setTimeout((function(){t.style.display=""}),200));var o=document.querySelector(".modal-backdrop");o&&(o.classList.remove("in"),setTimeout((function(){o.remove()}),200))}catch(e){console.error("Error in modalClose function:",e)}}function addModalDismissListener(e){e.querySelectorAll('[data-dismiss="modal"]').forEach((function(e){e.dismissListenerAdded||(e.addEventListener("click",(function(){modalClose()}),!1),e.dismissListenerAdded=!0)}))}defer((function(){try{var e=document.querySelectorAll('[data-toggle="modal"]');Array.prototype.forEach.call(e,(function(e){e&&e.addEventListener("click",(function(e){e.preventDefault();var t=e.currentTarget.getAttribute("data-target");modalOpen(document.querySelector(t))}),!1)}))}catch(e){console.error("Error in defer function:",e)}}));const cdn={getSRC:function(e,t){let o=`https://cdn.galatent.co.uk/cdn${e}`,n="";return void 0!==t.w&&(n+=`&w=${t.w}`),void 0!==t.h&&(n+=`&h=${t.h}`),o+(n?`?${n.substr(1)}`:"")}};screen.width>=720&&"y"!==getCookies("lc")&&setTimeout((function(){try{document.getElementById("callbackBubbleQuote").classList.remove("noshow"),setTimeout((function(){document.getElementById("callbackBubbleQuote").classList.add("cbshow")}),0)}catch(e){}}),3e3);var acceptAllCookies=function(){var e={ad_storage:!0,ad_user_data:!0,ad_personalization:!0,analytics_storage:!0};localStorage.setItem("cookiePrefv2",JSON.stringify(e)),document.querySelectorAll(".cookiepolicy")[0].style.display="none",gtag("consent","update",{ad_storage:e.ad_storage?"granted":"denied",ad_user_data:e.ad_user_data?"granted":"denied",ad_personalization:e.ad_personalization?"granted":"denied",analytics_storage:e.analytics_storage?"granted":"denied"}),"undefined"!=typeof lensConsent&&lensConsent(e.analytics_storage?"granted":"denied")};if(!localStorage.getItem("cookiePrefv2"))try{document.getElementById("cookiepolicy").innerHTML='

Privacy Settings
Our website utilizes cookies to enhance your browsing experience and provide customized marketing across various platforms.
For more information, please consult our Cookie Policy.

Manage Preferences     
'}catch(e){}function showDiscountContainer(){var e=document.querySelector(".discountContainer");e&&(sessionStorage.getItem("discountClosed")||(e.style.display="block"))}function closeDiscount(){var e=document.querySelector(".discountContainer");e&&(e.style.display="none",sessionStorage.setItem("discountClosed","true"))}function mobNavFunction(){var e=document.getElementById("mobLinks");"block"===e.style.display?e.style.display="none":e.style.display="block"}setTimeout(showDiscountContainer,3e3),document.addEventListener("DOMContentLoaded",(function(){var e=document.getElementById("searchMob"),t=document.getElementById("toggleSearch");t&&t.addEventListener("click",(function(){e.classList.toggle("show-search-bar")}))}));var menuToggle=document.getElementById("menuToggle"),menu=document.getElementById("menu");function openMenu(){menu.style.left="0px",menuToggle.style.color="#000000"}function closeMenu(){menu.style.left="-105vw"}function leadHider(e){var t=e.querySelectorAll('input[name="email"], input[name="phone"]'),o=e.querySelectorAll(".modal.in tr");t.forEach((function(e){e.addEventListener("keyup",(function(e){o.forEach((function(e){e.classList.remove("noshowopa")})),e.currentTarget.closest("form").querySelectorAll(".noshowopa").forEach((function(e){e.classList.remove("noshowopa")}))}))})),screen.width<600&&t.forEach((function(e){e.addEventListener("mouseleave",(function(e){o.forEach((function(e){e.classList.remove("noshowopa")})),e.currentTarget.closest("form").querySelectorAll(".noshowopa").forEach((function(e){e.classList.remove("noshowopa")}))}))})),setTimeout((function(){t.forEach((function(e){""!==e.value&&(o.forEach((function(e){e.classList.remove("noshowopa")})),e.closest("form").querySelectorAll(".noshowopa").forEach((function(e){e.classList.remove("noshowopa")})))}))}),1e3)}function downloaddocument_click(e){window._CTA.widgetFile=e.getAttribute("data-widget-document"),window._CTA.downloadType=e.getAttribute("data-widget-comments"),window._CTA.docTitle=e.getAttribute("data-widget-file-title")}function loadDeferredCSS(e){var t=Array.from(document.head.getElementsByTagName("link")).some((function(t){return t.href===e}));if(!t){var o=document.createElement("link");o.rel="stylesheet",o.href=e,o.type="text/css",document.head.appendChild(o)}}function getSecondsSinceFirstVisit(){if(window.__popups&&window.__popups.ts){const e=(new Date).getTime(),t=window.__popups.ts;return parseInt((e-t)/1e3)}return null}function savePopupStates(){setTimeout((function(){sessionStorage.setItem("popups",JSON.stringify(window.__popups.session))}),0)}function loadPopupStates(){const e=sessionStorage.getItem("popups");if(e)try{return JSON.parse(e)}catch(e){}return{ts:(new Date).getTime()}}function isScriptLoaded(e){const t=document.getElementsByTagName("script");for(let o=0;o{document.addEventListener(e,updateActionTimestamp,{passive:!0})}));const loadPopup=e=>{if(!sessionStorage.getItem("popups."+e))return sessionStorage.setItem("popups."+e,!0),showOverlay({URL:e})},processPopups=()=>{if(screen.width<=920)return;if(document.body.classList.contains("modal-open")||document.body.classList.contains("overlay"))return;const e=getSecondsSinceFirstVisit(),t=getSecondsSinceLastInteraction(),{IntentBackground:o,IntentGazebo:n,IntentLeave:i,IntentMarquee:r,IntentPurchase:a,Interactions:s}=window.__popups.session,l=Number(Basket.Qty||0);if(s<100){if(e<=15&&i&&i>0)return loadPopup("/popups/pricematch-popup");if(t>=8&&l>0&&e>=3600)return loadPopup("/popups/pricematch-popup");if(t>=15&&a&&a>0)return loadPopup("/popups/pricematch-popup")}else if(n||r)if(o>0){if(t>=60&&0==Number(Basket.Qty))return loadPopup("/popups/pricematch-popup")}else if(t>=10&&a&&a>0)return loadPopup("/popups/pricematch-popup")};function isNotHost(){return!["www.galashade.co.uk","www.galagraphics.co.uk","dev.galagraphics.co.uk","www.inflatableshelters.co.uk","dev.inflatableshelters.co.uk","www.swisstrax.uk","dev.swisstrax.uk"].includes(window.location.hostname)}!isIframe()&&isNotHost()&&setTimeout((()=>{setInterval((()=>{processPopups()}),1e3)}),4e3);var pjsliderModule=null,pjsliderImport=null;function pjslider_init(){null!==document.querySelector(".project-slider")&&(null===pjsliderModule?null===pjsliderImport&&(pjsliderImport=import("/js/project-slider.terser.min.js?i=2").then((function(e){pjsliderModule=e,e.pjslider_init()})).catch((function(e){pjsliderImport=null,console.error("Project slider failed to load",e)}))):pjsliderModule.pjslider_init())}function loadScript(e,t){try{var o=document.createElement("script");o&&(o.src=e,"function"==typeof t&&(o.onload=t),document.body.appendChild(o))}catch(e){console.error("Error in loadScript function:",e)}}defer((function(){pjslider_init()})),document.addEventListener("DOMContentLoaded",(function(){try{var e=!1,t=document.getElementById("desktopSearch");t&&t.addEventListener("click",(function(){if(e){search.isVisible()||(search.isVisible(!0),document.getElementById("desktopSearchBox").focus());try{"function"==typeof searchFunction&&searchFunction()}catch(e){console.error("Error calling searchFunction:",e)}}else loadScript("/public/script-search.js",(function(){e=!0;try{"function"==typeof searchFunction&&searchFunction()}catch(e){console.error("Error calling searchFunction after script load:",e)}}))}))}catch(e){console.error("Error in DOMContentLoaded event:",e)}}));const tabs=document.querySelectorAll(".tablo li, .fluid-nav li");function setActive(e){var t=downToClass(downTo(upTo(e,"DIV"),"ul"),"active");if(t){t.classList.remove("active");var o=document.querySelector("."+t.getAttribute("tab-link"));o&&o.classList.add("noshow")}var n=e;"I"!==n.tagName&&"SPAN"!==n.tagName||(n=upTo(e,"LI")),n.classList.add("active");var i=document.querySelector("."+n.getAttribute("tab-link"));i&&(i.classList.remove("noshow"),i.classList.add("fadeIn","animated")),setTimeout((function(){n.scrollIntoView({behavior:"smooth",block:"center",inline:"center"})}),0)}function downToClass(e,t){for(var o=e.childNodes,n=0;n{e.addEventListener("click",(e=>{setActive(e.target)}))})),Validator.plugin("phone",{install(){},validate:(e,t)=>/^(\+44|01|02|03|04|05|06|07|08|09)[0-9 ()-]+$/.test(e.value)}),Validator.plugin("spam",{install(){},validate:(e,t)=>vc({currentTarget:e})}),Validator.plugin("function",{install(){},validate(e,t){const o=t;return"function"==typeof window[o]?window[o](e,t):(console.error(`Validation function ${o} does not exist.`),!1)}});var validatorInit=function(){document.querySelectorAll("form:not([data-no-validation])").forEach((function(e){new Validator(e,{})}));for(var e=document.getElementsByName("txtSpam"),t=0;t{if(e.ok)return e.json();throw e})).then((t=>{document.querySelectorAll(".error-message").forEach((e=>e.remove())),e.querySelector("button.af-submit").classList.remove("af-processing");var o=window[n];"function"==typeof o?o(e,t):af_success(e,t),setTimeout((function(){""!==r&&document.body.classList.remove(r)}),1500)})).catch((t=>{t.text().then((t=>{var o=JSON.parse(t);for(var n in document.querySelectorAll(".invalid-feedback").forEach((e=>e.innerHTML="")),e.querySelector("button.af-submit").classList.remove("af-processing"),o.errors){var r=e.querySelector('[name="'+n+'"]');if(r){r.classList.remove("is-valid"),r.classList.add("is-invalid");for(var a=[],s=r.nextElementSibling;s;){if(s.classList.contains("invalid-feedback")){a.push(s);break}s=s.nextElementSibling}s&&(s.innerHTML=o.errors[n].msg)}}var l=window[i];"function"==typeof l?l(e,t):console.log(o)}))}))}}function af_load(e){document.querySelectorAll("form[data-af-success] button.af-submit").forEach((function(e){e.addEventListener("click",(function(e){if(!e.target.classList.contains("af-processing")){var t=e.target.closest("form")||null;t&&AUTOFORM_NODE(t)}}))}))}function af_success(){parent.showAlert("icon-ok-circled","Success","Thank you for your interest","#FFFFFF",!1),void 0!==modalClose&&modalClose()}function af_fail(){parent.showAlert("icon-cancel-circled","Fail","There was an error with the form, please make sure all required information is entered and try again.","#FFFFFF",!1),void 0!==modalClose&&modalClose()}validatorInit(),document.addEventListener("DOMContentLoaded",(function(){af_load(document)}));var modaloElement=document.querySelector(".modalo"),overlay_EventAttached=!1;function isIframe(){try{return window.self!==window.top}catch(e){return!0}}function showOverlay(e){if(void 0!==e&&null!=e){var t=e.URL||"",o=e.Contents||"",n=e.W||1024,i=e.H||600,r=(e.NoExit,{W:screen.width,H:screen.height});void 0!==window.matchMedia&&(window.matchMedia("(orientation: portrait)").matches?r.W=screen.width:window.matchMedia("(orientation: landscape)").matches&&screen.height>r.W&&(r.W=screen.height,r.H=screen.width)),e.NoExit&&document.body.classList.add("noexit"),modaloElement.style.maxWidth=n+"px",modaloElement.style.maxHeight=i+"px";var a=Math.max(r.H/2-i/2-r.H/2,0);if(modaloElement.style.top=a+"px",isIframe()&&void 0===window.__lennontree)return console.log(`Going in here ${window.__lennontree}`),window.location=t;if(modaloElement.classList.remove("loaded"),modaloElement.innerHTML=o,""!==t){var s=n,l=i;s=s>r.W?r.W:s,l=l>r.H?r.H:l;var c="/_components/web_optimised/overlay-iframe.css";if(!document.head.querySelector('link[href="'+c+'"]')){var d=document.createElement("link");d.rel="stylesheet",d.href=c,document.head.appendChild(d)}var u=document.createElement("div");u.id="close",u.innerHTML="",modaloElement.appendChild(u);var p=document.createElement("iframe");p.width=s,p.id="iframeOverlay",p.src=t,modaloElement.appendChild(p),p.addEventListener("load",(function(){modaloElement.classList.add("loaded")}))}else modaloElement.classList.add("loaded");overlay_EventAttached||(document.body.addEventListener("click",clicked),overlay_EventAttached=!0),setTimeout((function(){document.body.classList.add("overlay")}),0)}}function clicked(e){if(!document.body.classList.contains("noexit")){var t=e?.target||e?.srcElement;t&&3===t.nodeType&&(t=t.parentNode),t&&t.classList.contains("modal")||(document.body.classList.remove("overlay"),parent.document?.body.classList.remove("overlay"),window.lastLink&&(window.location.href=window.lastLink,window.lastLink=null),setTimeout((()=>{document.body.classList.contains("overlay")||(document.querySelector(".modalo").innerHTML="")}),5e3))}}function showAlert(e,t,o,n,i){showOverlay({Contents:'

'+t+"

"+o+"

",NoExit:i})}var Basket=getBasket();function getBasket(){var e=localStorage.getItem("basket");if(null!==e&&""!==e&&"null"!==e){var t=e.split("**");return{Qty:t[0],Cost:parseFloat(t[1]).toFixed(2),TS:new Date(t[2]).toJSON()}}return{Qty:0,Cost:parseFloat(0).toFixed(2),TS:getPreviousDayJSON()}}function setBasket(e){void 0===(Basket=e).TS&&(Basket.TS=(new Date).toJSON());try{var t=localizeCost(Basket.Cost);localStorage.setItem("basket",Basket.Qty+"**"+Basket.Cost+"**"+Basket.TS);var o=document.querySelectorAll(".baskTotal");Array.prototype.forEach.call(o,(function(e,o){e.innerHTML=t}));o=document.querySelectorAll(".baskQty");Array.prototype.forEach.call(o,(function(e,t){e.innerHTML=Basket.Qty}))}catch(e){console.error("Error in setBasket:",e)}}function localizeCost(e){return parseFloat(e).toLocaleString("en-GB",{style:"currency",currency:"GBP",minimumFractionDigits:2,maximumFractionDigits:2})}function getMinutesBetweenDates(e,t){var o=new Date(e),n=new Date(t).getTime()-o.getTime(),i=Math.abs(n/6e4);return parseInt(i)}function getPreviousDayJSON(){var e=new Date;return e.setDate(e.getDate()-1),e.toJSON()}function fetchBasketTotals(){fetch("/basket/totals").then((function(e){if(!e.ok)throw new Error("Network response was not ok");return e.json()})).then((function(e){var t=e.totalQty,o=e.totalPrice;localStorage.setItem("loggedIn",e.loggedIn?"1":"0"),localStorage.setItem("recognised",e.recognised?"1":"0"),setRewardsFooter(),setBasket({Qty:t,Cost:o,TS:(new Date).toJSON()})})).catch((function(e){console.error("There has been a problem with your fetch operation:",e)}))}function setRewardsFooter(){var e=document.querySelector(".gtr__foot"),t=document.querySelector(".gtr__action");e&&(t&&(t.innerHTML=""),"1"===localStorage.getItem("loggedIn")?(e.innerHTML="

View your points and available rewards

",t&&(t.innerHTML='My rewards')):"1"===localStorage.getItem("recognised")?(e.innerHTML="

Welcome back. Sign in to see your collected points

",t&&(t.innerHTML='')):(e.innerHTML="

Create an account to collect points and rewards

",t&&(t.innerHTML='')))}defer((function(){getMinutesBetweenDates(Basket.TS,new Date)<=20&&null!==localStorage.getItem("recognised")?(setBasket({Qty:Basket.Qty,Cost:Basket.Cost,TS:Basket.TS}),setRewardsFooter()):fetchBasketTotals()}));