0?(n.ids&&(n.ids=[n.name]),e.helpers.each(t,n)):o(this);if(n.data&&n.ids){var i=r.createFrame(n.data);i.contextPath=r.appendContextPath(n.data.contextPath,n.name),n={data:i}}return a(t,n)}))},e.exports=t.default},6822:function(e,t,n){"use strict";t.__esModule=!0;var r,o=n(2392),a=n(8728),i=(r=a)&&r.__esModule?r:{default:r};t.default=function(e){e.registerHelper("each",(function(e,t){if(!t)throw new i.default("Must pass iterator to #each");var n,r=t.fn,a=t.inverse,s=0,c="",l=void 0,u=void 0;function d(t,n,a){l&&(l.key=t,l.index=n,l.first=0===n,l.last=!!a,u&&(l.contextPath=u+t)),c+=r(e[t],{data:l,blockParams:o.blockParams([e[t],t],[u+t,null])})}if(t.data&&t.ids&&(u=o.appendContextPath(t.data.contextPath,t.ids[0])+"."),o.isFunction(e)&&(e=e.call(this)),t.data&&(l=o.createFrame(t.data)),e&&"object"==typeof e)if(o.isArray(e))for(var p=e.length;s=0?t:parseInt(e,10)}return e},log:function(e){if(e=o.lookupLevel(e),"undefined"!=typeof console&&o.lookupLevel(o.level)<=e){var t=o.methodMap[e];console[t]||(t="log");for(var n=arguments.length,r=Array(n>1?n-1:0),a=1;a=s.LAST_COMPATIBLE_COMPILER_REVISION&&t<=s.COMPILER_REVISION)return;if(t":">",'"':""","'":"'","`":"`","=":"="},r=/[&<>"'`=]/g,o=/[&<>"'`=]/;function a(e){return n[e]}function i(e){for(var t=1;t0){var u=document.createElement("div");l.forEach((function(e){return u.appendChild(e)})),c.insertAdjacentElement("afterbegin",u)}}}))}))}function u(e,t,n){window.matchMedia("(max-width: ".concat(e,"px)")).matches?t.forEach((function(e,t){n[t]&&(n[t].style.order=e)})):Array.from(n).forEach((function(e){e.style.removeProperty("order")}))}function d(e){e.forEach((function(e){var t=e.getAttribute("data-breakpoint"),n=e.getAttribute("data-neworder"),r=null==n?void 0:n.split(",");if(t&&r){var o=e.children[0].children;u(t,r,o),window.addEventListener("resize",(function(){return u(t,r,o)}))}}))}if(i){document.querySelectorAll(".cmp-containersecondary2__container-inner").forEach((function(e){var t=e.getAttribute("data-custombackgroundcolor");t&&(e.style.background=t)})),s.forEach((function(e){var t=e.getAttribute("data-breakpoint"),n=e.getAttribute("data-neworder"),r=null==n?void 0:n.split(",");if(t&&r){var o=e.children[0].children;u(t,r,o),window.addEventListener("resize",(function(){return u(t,r,o)}))}})),c.forEach((function(e){var t=e.querySelector(".cmp-containersecondary2__container-inner"),n=e.clientHeight,r=t.getAttribute("data-videoUrlMobile"),o=t.getAttribute("data-videoUrlDesktop"),i=t.getAttribute("data-fallbackDesktopImageUrl"),s=t.getAttribute("data-fallbackMobileImageUrl"),c=t.getAttribute("data-fallbackDesktopImageUrl"),l=t.getAttribute("data-layout");if(o||r){var u=t.parentElement.classList.contains("cmp-containersecondary2--border-radius-top")||!1,d=t.parentElement.classList.contains("cmp-containersecondary2--border-radius-bottom")||!1,p=(0,a.S)(e,s,c,e,n);"borealisanimated"===l&&p.renderVideo(o,r,i||"",t,u,d)}}));var p=document.querySelectorAll(".cmp-containersecondary2--layout-two-columns"),m=document.querySelectorAll(".cmp-containersecondary2--layout-three-columns"),f=Array.from(document.querySelectorAll(".cmp-containersecondary2--layout-four-columns")).filter((function(e){return 4===e.childElementCount})),h=function(){var e=function(e,t,n){e.forEach((function(e){var o,a,i,s=null===(i=null===(a=null===(o=e.querySelectorAll(".container")[n-1])||void 0===o?void 0:o.firstElementChild)||void 0===a?void 0:a.firstElementChild)||void 0===i?void 0:i.childElementCount;(0,r.ZP)()=t&&e.children.length===n-1&&e.insertAdjacentHTML("beforeend",'')}))};e(p,596,2),e(m,1024,3),e(f,1320,4)};h(),window.addEventListener("resize",h),l(document.querySelectorAll(".cmp-containersecondary2[data-alignbuttons='true']"))}},142:function(e,t,n){"use strict";var r=n(9904),o=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,a=t.length;o[").concat(n,"]"))}})),!s){var u=[],d=[],p=0,m=function(e){var t,n,r=e.getAttribute("data-ordersiblings"),a=e.parentElement;if("true"===r&&-1==u.indexOf(a)){u.push(a),d[p]||(d[p]=[]),d[p]=o(o([],d[p],!0),[a],!1);var i=a.nextElementSibling;(null===(t=null==i?void 0:i.classList)||void 0===t?void 0:t.contains("offerstrip"))&&"true"===(null===(n=null==i?void 0:i.firstElementChild)||void 0===n?void 0:n.getAttribute("data-ordersiblings"))?m(i.firstElementChild):p++}};a.forEach((function(e){m(e)}));var f=function(e){var t;return parseInt(null===(t=e.querySelector("a"))||void 0===t?void 0:t.textContent.match(/\d+/)[0],10)||0};d.forEach((function(e){var t=e.sort((function(e,t){return f(e)-f(t)}));t.forEach((function(e,n){n!==t.length-1&&e.insertAdjacentElement("afterend",t[n+1])}))}))}i.forEach((function(e){var t=e.clientHeight,n=e.querySelector(".cmp-containersecondary2__container-inner"),o=e.getAttribute("data-videoUrlMobile"),a=e.getAttribute("data-videoUrlDesktop"),i=e.getAttribute("data-altTextFallback"),s=e.getAttribute("data-fallbackMobileImageUrl"),c=e.getAttribute("data-fallbackDesktopImageUrl"),l=e.getAttribute("data-imageUrlMobile"),u=e.getAttribute("data-imageUrlDesktop"),d=e.getAttribute("data-layout"),p=e.getAttribute("data-altText"),m=(0,r.S)(e,s,c,e,t);"borealisstatic"===d?m.renderImage(u,l,p||""):"borealisanimated"===d&&m.renderVideo(a,o,i||"",n)}))}},2871:function(e,t,n){"use strict";var r=n(3199);document.querySelectorAll(".cmp-stripbanner").forEach((function(e){var t=e.getAttribute("data-custombackgroundcolor"),n=e.getAttribute("data-backgroundimagelarge"),o=e.getAttribute("data-backgroundimagesmall"),a=e.getAttribute("data-monday"),i=e.getAttribute("data-tuesday"),s=e.getAttribute("data-wednesday"),c=e.getAttribute("data-thursday"),l=e.getAttribute("data-friday"),u=e.getAttribute("data-saturday"),d=e.getAttribute("data-sunday"),p=document.querySelector("#businessphone"),m=document.querySelector(".cmp-stripbanner--business"),f=e.querySelectorAll("[data-holidaydate]"),h=[];if(f.forEach((function(e){var t={date:e.getAttribute("data-holidaydate"),startHour:e.getAttribute("data-openhours").split("-")[0],endHour:e.getAttribute("data-openhours").split("-")[1]};h.push(t)})),t&&(e.style.background=t),n||o){var g=function(){!n||o?(n||!o)&&(0,r.ZP)()>899?e.style.backgroundImage="url(".concat(n,")"):e.style.backgroundImage="url(".concat(o,")"):e.style.backgroundImage="url(".concat(n,")")};g(),window.addEventListener("resize",g)}function y(e,t){document.querySelector(e).style.display="none",document.querySelector(".cmp-stripbanner__inner").classList.add(t)}function v(e,t){document.querySelector(e).style.display="block",document.querySelector(".cmp-stripbanner__inner").classList.remove(t)}if(m){var b=document.querySelectorAll(".cmp-stripbanner__section"),_=b[3],S=b[2];_&&""===_.textContent.trim()?(y(".item3","cmp-stripbanner__item3-hide"),S&&""===S.textContent.trim()?y(".item1","cmp-stripbanner__item2-hide"):v(".item1","cmp-stripbanner__item2-hide")):v(".item3","cmp-stripbanner__item3-hide")}function w(e){if(!e)return{start:0,end:24};var t=e.split("-").map(Number);return{start:t[0],end:t[1]}}function E(){p.style.display="none",document.querySelector(".item2").style.display="none",document.querySelector(".cmp-stripbanner__inner").classList.add("cmp-stripbanner__phone-hide")}if(p){var x={Monday:w(a),Tuesday:w(i),Wednesday:w(s),Thursday:w(c),Friday:w(l),Saturday:w(u),Sunday:w(d)},k=(new Date).toLocaleString("en-GB",{timeZone:"Europe/London",hour12:!1,weekday:"long",month:"long",day:"numeric",hour:"numeric"}),A=parseInt(k.split(" ")[4]),L=k.split(",")[0],C=k.split(" ")[1],q=k.split(" ")[2],D="".concat(C," ").concat(q),M=x[L],I=null;h.some((function(e){return e.date===D&&(I=e,!0)}))?I.startHour<=A&&A<=I.endHour?p.style.display="initial":E():M&&M.start<=A&&A<=M.end?p.style.display="initial":E()}}))},2834:function(e,t,n){"use strict";n.a(e,(async function(e,t){try{n(3853),n(5062),n(2161),n(6307),n(7368),n(3286),n(9827),n(2019),n(2981),n(1072),n(7639),n(4571),n(2385),n(5969),n(3204),n(1298),n(3660),n(6972),n(3729),n(3296),n(8992),n(6680),n(5842),n(7588),n(294),n(5834),n(1806),n(4809),n(7268),n(3232),n(5039),n(3261),n(7884),n(3504),n(6267),n(8104),n(7662),n(5374),n(280),n(1626),n(5451),n(3085),n(7064),n(9983),n(1560),n(1502),n(3158),n(5176),n(1498),n(55),n(491),n(3117);var r=n(5410),o=(n(3753),n(8333),n(769),n(2835),n(3745),n(8982),n(7431),n(4632),n(506),n(2903),n(5917),n(142),n(2871),e([r]));r=(o.then?(await o)():o)[0],t()}catch(e){t(e)}}))},3853:function(e,t,n){"use strict";var r=n(9880);document.querySelectorAll(".cmp-accordion").forEach((e=>{e.querySelectorAll(".cmp-accordion__item").forEach((e=>{let t=e.querySelector(".cmp-accordion__panel");for(;;){const e=t.querySelector(".lists.container, .linkgroup.container, .table.container, .text");if(!e)break;{const n=e.parentElement,r=n.children[n.children.length-1],o=r.className.startsWith("container responsivegrid");if(r.children.length>0&&!o&&(r.children[0].classList.contains("no-bottom-margins")||r.children[0].classList.add("no-bottom-margins")),!o)break;t=r}}}))})),document.querySelectorAll(".cmp-accordion").forEach((e=>{e.hasChildNodes()&&(0,r.lg)(e,"accordion","no_heading"),document.querySelectorAll(".cmp-accordion__item").forEach((e=>{const t=e.querySelector(".cmp-accordion__title"),n=e.querySelector(".cmp-accordion__button");if(t){const o=t.textContent;e.setAttribute("data-analytics-section-title",o.toLowerCase().trim()),(0,r.s0)(n,"button",o)}}))}))},9880:function(e,t,n){"use strict";n.d(t,{fS:function(){return r},lg:function(){return i},s0:function(){return a},u3:function(){return o}});const r="no_heading",o="no_label";function a(e,t,n){e&&t&&n&&(e.setAttribute("data-analytics-action-label",n?.toLowerCase().trim()),e.setAttribute("data-analytics-action-type",t))}function i(e,t,n){e&&t&&n&&(e.setAttribute("data-analytics-component-type",t),e.setAttribute("data-analytics-component-title",n))}},5062:function(e,t,n){"use strict";var r=n(3199),o=n(9880);const a=()=>{document.querySelectorAll(".cmp-bannergroup.cmp-bannergroup--thirdwidth").forEach((e=>{let t=0;Array.from(e.children).forEach(((e,n)=>{0===n?t=getComputedStyle(e).width:e.style.maxWidth=t}))}))};window.addEventListener("resize",a),a();const i=()=>{const e=(0,r.ZP)(),t=document.querySelectorAll(".cmp-bannergroup--halfwidth, .cmp-bannergroup--thirdwidth, .cmp-bannergroup--fourchildren, .cmp-bannergroup--fivechildren");Array.from(t).filter((e=>e.querySelector(".cmp-banner--promo"))).forEach((t=>{const n=t.querySelectorAll(".cmp-banner .cmp-banner__content > :nth-child(2)"),r=e=>{const t=Array.from(e).map((e=>{const t=getComputedStyle(e).height;return t.substring(0,t.length-2)})),n=Math.max(...t);e.forEach(((e,r)=>{e.style.marginBottom=n-t[r]+"px"}))};if(e<596)return void n.forEach((e=>{e.style.marginBottom=""}));const o=n.length;if(3===o&&(e>596&&e<871||e>899&&e<1025))return r([n[0],n[1]]),void(n[2].style.marginBottom="");if(4===o&&e>596&&e<1320)return r([n[0],n[1]]),void r([n[2],n[3]]);if(5===o){if(e<596)return;return e>595&&e<871||e>899&&e<1025?(r([n[0],n[1]]),r([n[2],n[3]]),void(n[4].style.marginBottom="")):(r([n[0],n[1],n[2]]),void r([n[3],n[4]]))}r(n)}))};window.addEventListener("resize",i),i();var s=[];document.querySelectorAll(".threedigital-amdocs .bannergroup").forEach((e=>{let t=e.querySelector(".cmp-banner__action-container .cmp-button__label");t&&s.push(t.getAttribute("href"))})),document.querySelectorAll(".threedigital-amdocs a").forEach((e=>{let t=document.createElement("div"),n=e.getAttribute("class");t.classList.add(n),t.innerHTML=e.innerHTML,e.parentNode.replaceChild(t,e)})),function(){let e=document.querySelectorAll(".threedigital-amdocs .bannergroup"),t=document.querySelector(".newpar");e.forEach(((e,n)=>{if(e.querySelector(".cmp-banner--text-only")){let t=e.querySelector('[class*="cmp-banner--bg"]'),n=(t&&t.getAttribute("class")).split(" ");var r=n&&n.find((e=>e.startsWith("cmp-banner--bg")));r&&t.classList.remove(r)}let o=e.previousElementSibling,a=document.createElement("a");if(s.forEach(((e,t)=>{n==t&&a.setAttribute("href",e)})),a.style.textDecoration="none",r&&a.setAttribute("class",r),o&&o.classList.contains("standaloneicon")&&a.appendChild(o),e.parentNode.appendChild(a),a.appendChild(e),t){t.parentElement.appendChild(t)}}))}(),document.querySelectorAll(".bannergroup").forEach((e=>{const t=e.querySelectorAll(".cmp-banner--hero"),n=e.querySelectorAll(".cmp-image img"),r=e.querySelector(".cmp-button"),a=e.querySelector(".cmp-banner__text p"),i=e.querySelectorAll(".cmp-banner__content"),s=e.querySelectorAll(".cmp-banner--promo");let c=e.querySelector(".cmp-bannergroup--superherobanner")?"superhero_banner":e.querySelector(".cmp-banner--hero")?"hero_banner":e.querySelector(".cmp-banner--promo")?"promo_banner":"bannergroup";(0,o.lg)(e,c,o.fS),e.querySelectorAll(".cmp-superherobanner__item").forEach((t=>{var n=t.querySelector(".cmp-title__text"),r=n?n.textContent.toLowerCase().trim():o.fS;t.setAttribute("data-analytics-section-title",r),e.querySelectorAll(".cmp-button").forEach((e=>{var t=e.querySelector(".cmp-button__label").textContent,n=""===t.trim()?o.fS:t.trim();(0,o.s0)(e,"button",n)}))})),document.querySelectorAll(".cmp-superherobanner__text").forEach((e=>{if(e.querySelector("a")){const t=e.querySelector("a").textContent;(0,o.s0)(e,"textlink",t)}})),document.querySelectorAll(".cmp-superherobanner__dots").forEach((e=>{(0,o.s0)(e,"dot","no-label")})),t.forEach((e=>{var t=e.querySelector(".cmp-banner__title").textContent;if(e.setAttribute("data-analytics-section-title",t.toLowerCase().trim()),r){var i=r.querySelector(".cmp-button__label").textContent;(0,o.s0)(r,"button",i)}if(n&&n.forEach((e=>{var t=e.getAttribute("alt");(0,o.s0)(e,"image",t)})),a&&a.querySelector("a")){var s=a.querySelector("a").textContent;(0,o.s0)(a,"textlink",s)}})),s.forEach((e=>{var t=e.querySelector(".cmp-banner__title")?e.querySelector(".cmp-banner__title").textContent:e.querySelector(".cmp-banner__text").textContent;if(e.setAttribute("data-analytics-section-title",t.toLowerCase().trim()),r){var a=r.querySelector(".cmp-button__label").textContent;(0,o.s0)(r,"button",a)}n&&n.forEach((e=>{var t=e.getAttribute("alt");(0,o.s0)(e,"image",t)})),i&&i.forEach((e=>{const t=e.querySelector("a");if(t){var n=e.querySelector("a").textContent;(0,o.s0)(t,"textlink",n)}}))}))}))},2161:function(){const e=document.querySelectorAll(".cmp-breadcrumb"),t=document.querySelector('meta[name="navigationTitle"]'),n=document.location.pathname.startsWith("/editor.html");let r=sessionStorage.getItem("threeCurrentPageNavigationTitle");(()=>{let e="";t&&(e=t.getAttribute("content")),document.URL==sessionStorage.getItem("threeCurrentPageUrl")&&(r=sessionStorage.getItem("threePreviousPageNavigationTitle")),r&&sessionStorage.setItem("threePreviousPageNavigationTitle",r),sessionStorage.setItem("threeCurrentPageNavigationTitle",e),sessionStorage.setItem("threeCurrentPageUrl",document.URL)})(),e.forEach((e=>{if("previousPage"===e.getAttribute("data-custom-variation")&&!n){const t=document.referrer,n=e.querySelector(".cmp-breadcrumb__item:last-child .cmp-breadcrumb__item-link"),o=e.getAttribute("data-base-url");t&&function(e,t){const n=new URL(e).hostname,r=new URL(e).pathname,o=document.location.hostname,a=r.startsWith("/business")||r.startsWith("/content/threedigital/uk/business");return"three"==t?o===n:"onlyb2c"==t?!a&&o===n:"onlyb2b"==t?a&&o===n:void 0}(t,o)&&n&&(n.setAttribute("href",t),n.querySelector("span").textContent=r?"Back to "+r:"Back")}}))},6307:function(e,t,n){"use strict";const r=(0,n(3047).p)();document.querySelectorAll(".cmp-buttongroup").forEach((e=>{e.setAttribute(r.componentType,"buttongroup"),e.setAttribute(r.componentTitle,r.fallback_heading_value);e.querySelectorAll(".cmp-buttongroup__item").forEach((e=>{const t=e.querySelector(".cmp-button__label, .cmp-link__link"),n=e.closest(".aem-Grid")?.querySelector('h1[class*="title"], h2[class*="title"], h3[class*="title"], h4[class*="title"], h5[class*="title"], h6[class*="title"]'),o=n&&n.textContent.trim()?n.textContent.trim().replace(/\u00A0/g," ").toLowerCase():r.fallback_heading_value,a=t&&t.textContent.trim()?t.textContent.trim().toLowerCase():r.fallback_label_value;e.setAttribute(r.sectionTitle,o),t&&(t.setAttribute(r.actionType,r.actionTypeValue),t.setAttribute(r.actionLabel,a))}))}))},7368:function(e,t,n){"use strict";n.d(t,{u:function(){return p}});var r=n(8279),o=n(3199),a=n(2903),i=n(5917);const s=document.querySelectorAll(".cmp-carousel"),c=!!document.querySelector('[data-wcmmode="EDIT"]'),l=Array.from(s).map((e=>({self:e,id:e.getAttribute("id"),layout:e.getAttribute("data-layout"),hideArrows:"true"===e.getAttribute("data-hide-arrows"),disableOnMobile:e.classList.contains("cmp-carousel--disable-mobile"),alignButtons:"true"===e.getAttribute("data-alignbuttons"),viewport:e.querySelector(".cmp-carousel__viewport"),list:e.querySelector(".cmp-carousel__list"),slides:e.querySelectorAll(".cmp-carousel__slide"),slider:e.querySelector(".cmp-carousel__slider"),sliderHandle:e.querySelector(".cmp-carousel__slider-handle"),heading:e.querySelector(".cmp-carousel__heading"),next:e.querySelector(".cmp-carousel__right"),prev:e.querySelector(".cmp-carousel__left"),taskQueue:Promise.resolve(),isReOrdered:"true"===e.getAttribute("data-isReOrder")})));function u(e){return new Promise((t=>{e.then((()=>{t()})).catch((e=>{console.log(e),t()}))}))}let d=new Set;const p=()=>{l.forEach((e=>{if(function(e){let t=e;for(;t;){if("none"===window.getComputedStyle(t).display)return!0;t=t.parentElement}return!1}(e.self))return;if(d.has(e.id))return;d.add(e.id);let t,n,r,s,p,m,f=!0,h=!1,g=!1,y=!1;function v(t){e.taskQueue=e.taskQueue.then((()=>u(e.flicking.moveTo(t))))}function b(){const t=e.viewport.getBoundingClientRect(),n=[],r=[],a=(0,o.tq)()?27:75;return e.slides.forEach(((e,o)=>{const i=e.getBoundingClientRect();i.leftMath.ceil(t.right)-a?r.push(o):n.push(o)})),{visibleSlides:n,slidesNotVisible:r}}function _(){const{slidesNotVisible:t}=b();e.slides.forEach(((e,n)=>{t.includes(n)?(e.setAttribute("aria-hidden","true"),e.setAttribute("inert",""),e.setAttribute("tabindex","-1")):(e.removeAttribute("aria-hidden"),e.removeAttribute("inert"),e.setAttribute("tabindex","0"))}))}function S(){let t=-window.getComputedStyle(e.list).transform.split(",")[4]/(e.list.clientWidth-(0,o.Em)(e.viewport));return t>.99?1:t<0?0:t}function w(t){const n=(t-r)/100*e.slider.clientWidth;e.sliderHandle.style.transform=`translateX(${n}px)`}function E(){const t=e.viewport.clientWidth,n=(0,o.tq)()?"mobile":"desktop",r=a.B[n].pageMargin,i=a.B[n].horizontalGap;e.slides.forEach((n=>{let a,s;e.disableOnMobile&&(0,o.tq)()?n.style.width="100%":((0,o.tq)()?s=1:"half-width"===e.layout?s=2:"third-width"===e.layout?s=3:"quarter-width"===e.layout&&(s=4),a=(t-2*r-i*(s-1))/s,n.style.width=`${a}px`)}))}E(),window.addEventListener("resize",(()=>{E()}));const x=new Flicking(`#flick__${e.id}`,{bound:!0,align:c?"prev":"center"});function k(){e.flicking.on(Flicking.EVENTS.WILL_CHANGE,(t=>{e.prev.classList.remove("cmp-carousel__arrows--disabled"),f=!1,0===t.index&&(e.prev.classList.add("cmp-carousel__arrows--disabled"),f=!0)})),e.flicking.on(Flicking.EVENTS.MOVE_END,(()=>{e.next.classList.remove("cmp-carousel__arrows--disabled"),h=!1,1===S()&&(e.next.classList.add("cmp-carousel__arrows--disabled"),h=!0)})),e.flicking.on(Flicking.EVENTS.REACH_EDGE,(t=>{var n;n=t.direction,e.next.classList.remove("cmp-carousel__arrows--disabled"),e.prev.classList.remove("cmp-carousel__arrows--disabled"),f=!1,h=!1,"PREV"===n?(e.prev.classList.add("cmp-carousel__arrows--disabled"),f=!0):"NEXT"===n&&(e.next.classList.add("cmp-carousel__arrows--disabled"),h=!0)})),e.flicking.on(Flicking.EVENTS.CHANGED,(()=>{_()})),e.flicking.on(Flicking.EVENTS.MOVE_END,(()=>{if(!y){const n=(100-t)*S()/100*e.slider.clientWidth;e.sliderHandle.style.transform=`translateX(${n}px)`}y=!1}))}e.flicking=x,window.swapCarouselSlides=function(){l.forEach((e=>{if(!e.isReOrdered)return;if(!e.flicking)return;const t=e.list;if(!t||!t.children||0===t.children.length)return;const n=Array.from(t.children),r=n[0];t.appendChild(r),_();const o=Array.from(t.children),a={prevList:n,added:[],removed:[],ordered:[[0,o.length-1]]};try{window.Flicking.sync(e.flicking,a,o)}catch(e){console.error("Error syncing Flicking instance:",e)}}))},_(),k();function A(t,n){const r=b().visibleSlides,o="next"===t?1:-1,a="next"===t?3:r.at(0),i="next"===t?-1:0;let s;return(n=n??("next"===t?f:h))&&g?(s=r.at(i)+o,4===r.length&&(s=a)):s=e.flicking.index+o,s}function L(t){y=!0,e.taskQueue=e.taskQueue.then((()=>new Promise((e=>{let r="next"===t?f:h;setTimeout((()=>{w(n[A(t,r)])}),50),e()})))).then((()=>u((f||h)&&g?e.flicking.moveTo(A(t)):"next"===t?e.flicking.next():e.flicking.prev())))}if(e.self.querySelectorAll("img").forEach((e=>{e.addEventListener("dragstart",(e=>e.preventDefault()))})),g=b().visibleSlides.length%2==0,e.next.addEventListener("click",(()=>L("next"))),e.prev.addEventListener("click",(()=>L("prev"))),e.heading){/\(\d+\)$/.test(e.heading.innerText)||(e.heading.innerText=e.heading.innerText+` (${e.flicking.panelCount})`)}if(e.slider){function D(){s=e.list.clientWidth,p=e.viewport.clientWidth,t=Math.min(100,Math.floor(p/s*100)),r=t/2,m=(100-t)/(e.flicking.panelCount-1),n=[],e.sliderHandle.style.width=`calc(${t}% + 1px)`,n.push(r);for(let t=1;tMath.abs(e-r))),a=o.indexOf(Math.min(...o));return{percentage:n[a],index:a}}D(),window.addEventListener("resize",D),e.slider.addEventListener("click",(e=>{e.preventDefault();const t=M(e.offsetX);w(t.percentage),y=!0,v(t.index)}));let I,T,P,N=!1;function O(t){t.stopPropagation(),N=!0,e.sliderHandle.style.transition="none",I="mousedown"===t.type?t.clientX:t.touches[0].clientX,T=parseInt(getComputedStyle(e.sliderHandle).transform.split(",")[4])||0}function B(t){if(!N)return;let n;n="mousemove"===t.type?t.clientX:t.touches[0].clientX;const r=e.slider.clientWidth-e.sliderHandle.clientWidth;P=n-I+T,P<0?P=0:P>r&&(P=r),e.sliderHandle.style.transform=`translateX(${P}px)`}function H(){if(!N)return;N=!1,y=!0,e.sliderHandle.style.transition="transform 0.6s cubic-bezier(0.4, 0, 0.2, 1)";const t=M(P+e.sliderHandle.clientWidth/2);w(t.percentage),v(t.index)}e.sliderHandle.addEventListener("click",(e=>e.stopPropagation())),e.sliderHandle.addEventListener("mousedown",O),e.sliderHandle.addEventListener("touchstart",O,{passive:!1}),document.addEventListener("mousemove",B),document.addEventListener("touchmove",B,{passive:!1}),document.addEventListener("mouseup",H),document.addEventListener("touchend",H)}function C(){!1!==e.flicking._initialized&&((0,o.Em)(e.viewport)>=e.list.clientWidth?(e.self.classList.add("cmp-carousel--hide-arrows-without-overflow"),e.flicking.bounce=0,e.flicking.align="prev",e.heading&&(e.heading.style.display="none")):(e.self.classList.remove("cmp-carousel--hide-arrows-without-overflow"),e.flicking.bounce="20%",e.align="center",e.heading&&(e.heading.style.display="block")))}function q(){(0,o.tq)()?(v(0),e.taskQueue=e.taskQueue.then((()=>e.flicking.destroy()))):(e.flicking.init(),k())}if(e.hideArrows&&(C(),window.addEventListener("resize",(()=>{C()}))),e.disableOnMobile&&(q(),window.addEventListener("resize",(()=>{q()}))),e.alignButtons){const F=e.self.querySelectorAll(".cmp-containersecondary2");(0,i.B6)(F)}c&&(v(0),e.taskQueue=e.taskQueue.then((()=>e.flicking.destroy())))}))};s.length>0&&(0,r.R4)(p),function(){for(var e=document.getElementsByClassName("cmp-carousel__heading"),t=0;t60&&(e[t].innerText=e[t].innerText.substring(0,60))}()},3286:function(e,t,n){"use strict";var r=n(3729);document.addEventListener("DOMContentLoaded",(function(){const e=sessionStorage.getItem("form_tracking_success_data");if(e){const t=JSON.parse(e);(0,r.W9)(t.formName,t.data.status,t.data.code)}}))},9827:function(e,t,n){"use strict";var r=n(5917),o=n(9880);const a=document.querySelectorAll(".cmp-containerbattenberg"),i=document.querySelectorAll(".cmp-containerbattenberg__container");i.forEach((e=>{0!==e.getElementsByClassName("cmp-image").length&&e.classList.add("cmp-containerbattenberg__container-nopadding");0!==e.getElementsByClassName("cmp-embed").length&&(e.classList.add("cmp-containerbattenberg__container-nopadding"),e.querySelectorAll(".embed").forEach((e=>{e.classList.add("cmp-embed--full-width")})))})),(0,r.s6)(a),a.forEach((e=>{const t=e.querySelector("h1, h2, h3, h4, h5, h6"),n=t?t.textContent.trim().toLowerCase():o.fS;(0,o.lg)(e,"battenberg_container",n)})),i.forEach((e=>{e.querySelectorAll("img").forEach((e=>{const t=e.alt.trim().toLowerCase()||o.fS;(0,o.s0)(e,"image",t)}));const t=e.querySelector(".cmp-title__text");if(t){const e=t.textContent.trim().toLowerCase()||o.fS;t.setAttribute("data-analytics-section-title",e)}e.querySelectorAll("a").forEach((e=>{const t=e.textContent.trim().toLowerCase()||o.u3;(0,o.s0)(e,"textlink",t)}));e.querySelectorAll("button").forEach((e=>{const t=e.textContent.trim().toLowerCase()||o.u3;(0,o.s0)(e,"button",t)}))}))},2019:function(e,t,n){"use strict";var r=n(3883),o=n(3199);var a=(e,t,n)=>{const a=document.querySelectorAll("."+t);if(a.length>0){const i=!!document.querySelector('[data-wcmmode="EDIT"]');if(!window.matchMedia("(prefers-reduced-motion: reduce)").matches&&!i){let s=120;const c=.6,l=()=>{(0,o.ZP)()>899&&(s=120,s*=c)};l(),window.addEventListener("resize",l);const u=-s/2;if(document.querySelector("."+n)){const d=(t,n)=>{const r=t.querySelector(n);if(!r)return;const o=r&&r.querySelector("."+e+"__parallax"),a=r&&r.getAttribute("data-direction")?r.getAttribute("data-direction"):"top";return{measureElement:r,moving:o,direction:a}},p=Array.prototype.map.call(a,(t=>{const n=[],r=d(t,"."+e+"__top-left-angle");r&&n.push(r);const o=d(t,"."+e+"__bottom-right-angle");return o&&n.push(o),n}));function m(e=!1){Array.prototype.forEach.call(p,(t=>{t.forEach((t=>{const{measureElement:n,moving:r}=t,o=n.getBoundingClientRect().top,a=Number((1-o/window.innerHeight).toFixed(2));if(e||a>-.3&&a<1.3){const e=r.getAttribute("d").split(" ");let t=Math.round(s*a),n=u+t;e[2]=n,r.setAttribute("d",e.join(" "))}}))}))}m("moveAll");document.querySelectorAll("."+e+"__parallax").forEach((t=>{t.classList.contains(e+"--transition")||t.classList.add(e+"--transition")}));const f=50,h=(0,r.Z)(m,f);let g=!1;const y=()=>{0==g?(g=!0,setTimeout((()=>{g=!1}),f),m()):h()};window.addEventListener("scroll",y,{passive:!0})}}}},i=n(9904),s=n(506);const c=document.querySelectorAll(".cmp-containerprimary"),l=document.querySelectorAll(".cmp-containerprimary:not(.cmp-containerprimary--page-width)[data-bespokecolor], .cmp-containerprimary:not(.cmp-containerprimary--page-width)[data-videoUrlMobile], .cmp-containerprimary:not(.cmp-containerprimary--page-width)[data-videoUrlDesktop], .cmp-containerprimary:not(.cmp-containerprimary--page-width)[data-imageUrlMobile], .cmp-containerprimary:not(.cmp-containerprimary--page-width)[data-imageUrlDesktop], .cmp-containerprimary:not(.cmp-containerprimary--page-width)[data-fallbackMobileImageUrl], .cmp-containerprimary:not(.cmp-containerprimary--page-width)[data-fallbackDesktopImageUrl], .cmp-containerprimary:not(.cmp-containerprimary--page-width)[data-layout]"),u=(0,s.tC)('meta[name="resourcePath"]'),d=(0,s.tC)('meta[name="twitter:title"]'),p=(0,s.tC)('meta[property="og:title"]'),m="EDIT"===(0,s.tC)('meta[name="wcmMode"]'),f=window.location.pathname,h=document.title,g=f.startsWith("/business")||f.includes("/business/"),{is404Page:y}=(()=>{const e=document.querySelector('meta[name="navigationTitle"]'),t=e?.getAttribute("content")||"",n=u.includes("404"),r=n&&!m,o=h.includes("404")||t.includes("404")||n;return{is404Page:r||o}})();c.length>0&&(a("cmp-containerprimary","cmp-containerprimary","cmp-containerprimary__parallax"),l.forEach((e=>{const t=e.clientHeight,n=e.getAttribute("data-videoUrlMobile"),r=e.getAttribute("data-videoUrlDesktop"),o=e.getAttribute("data-altTextFallback"),a=e.getAttribute("data-fallbackMobileImageUrl"),c=e.getAttribute("data-fallbackDesktopImageUrl"),l=e.getAttribute("data-imageUrlMobile"),u=e.getAttribute("data-imageUrlDesktop"),f=e.querySelector(".cmp-containerprimary__content"),h=e.getAttribute("data-layout"),v=e.getAttribute("data-bespokecolor"),b=e.getAttribute("data-bespokecolorprimary"),_=e.getAttribute("data-altText"),S=e.getAttribute("data-errorpage-view-type"),w=(0,i.S)(e,a,c,e,t);if("gradient"===h?w.renderGradient(v):"bespokecolor"===h?f.style.backgroundColor=b:"borealisstatic"===h?w.renderImage(u,l,_||""):"borealisanimated"===h&&w.renderVideo(r,n,o,f),y&&!m){const t="b2b"===S,n=!S||"b2c"===S;if(g){const e=" Business";document.title.endsWith(e)||(document.title+=e),d&&!d.endsWith(e)&&(0,s.Uo)('meta[name="twitter:title"]',d+e),p&&!p.endsWith(e)&&(0,s.Uo)('meta[property="og:title"]',p+e)}window.digitalData?.site&&(window.digitalData.site.siteFlag=g?"B2B":"B2C"),(0,s.Xr)(g),(0,s.YG)(g),t?e.style.display=g?"":"none":n&&(e.style.display=g?"none":"")}})))},2981:function(e,t,n){"use strict";var r=(e,t)=>e.currentStyle?e.currentStyle[t]:window.getComputedStyle?window.getComputedStyle(e,null).getPropertyValue(t):null,o=n(3883);const a=()=>window.matchMedia("(max-width: 900px)").matches;const i=document.querySelectorAll(".cmp-contentscheduler"),s=!!document.querySelector('[data-wcmmode="EDIT"]');i.forEach((async e=>{if(!s){const t=e.querySelectorAll("[data-cmp-start]"),n=e.querySelector("[data-cmp-holidays]"),i=e.querySelectorAll('[data-cmp-type="show"]'),c=e.querySelectorAll('[data-cmp-type="move"]'),l=e.querySelectorAll('[data-cmp-type="swap"]'),u=e.querySelectorAll("[data-cmp-exception]");let d=!1;n&&await async function(){try{const e=await fetch("https://www.gov.uk/bank-holidays.json"),t=(await e.json())["england-and-wales"].events,n=(new Date).toISOString().split("T")[0];for(const e of t){if(n===new Date(e.date).toISOString().split("T")[0])return!0}return!1}catch(e){return console.error("Error fetching UK holidays:",e),!1}}()&&(d=!0);let p=!1;function m(e){const t=document.getElementById(e);if(!t)return null;let n=t,r=/cmp-[A-Za-z0-9]+(?!\-\-|__|[A-Za-z0-9])/;for(;n&&!r.test(n.className);)n=n.parentElement;const o=n.className.match(r)[0];return n.parentElement.className.includes(o)||"cmp-containersecondary2container"===o?n=n.parentElement:"cmp-text"===o&&(n=t),n}const f=[],h=[],g=[];function y(){const e={monday:[],tuesday:[],wednesday:[],thursday:[],friday:[],saturday:[],sunday:[]};if(t.forEach((t=>{const n=t.getAttribute("data-cmp-start"),r=t.getAttribute("data-cmp-end");["data-cmp-monday","data-cmp-tuesday","data-cmp-wednesday","data-cmp-thursday","data-cmp-friday","data-cmp-saturday","data-cmp-sunday"].forEach((o=>{if(t.hasAttribute(o)){const t=o.replace("data-cmp-","");e[t].push({start:n,end:r})}}))})),n){const t=n.getAttribute("data-cmp-holidays");if("active"===t)e.holidays=[{start:"00:00",end:"23:59"}];else if("inactive"===t)e.holidays=[{start:"00:00",end:"00:00"}];else if("custom"===t){const t=n.getAttribute("data-cmp-holiday-start"),r=n.getAttribute("data-cmp-holiday-end");e.holidays=[{start:t,end:r}]}}return u.forEach((t=>{const n=t.getAttribute("data-cmp-exception"),r=t.getAttribute("data-cmp-exceptionaction");if(e[n]||(e[n]=[]),"active"===r)e[n].push({start:"00:00",end:"23:59"});else if("inactive"===r)e[n].push({start:"00:00",end:"00:00"});else if("custom"===r){const r=t.getAttribute("data-cmp-exception-start"),o=t.getAttribute("data-cmp-exception-end");e[n].push({start:r,end:o})}})),e}function v(e){const t=e.toLocaleString("en-GB",{timeZone:"Europe/London",year:"numeric",month:"2-digit",day:"2-digit"}),[n,r,o]=t.split("/");return`${o}-${r}-${n}`}function b(e){const t=new Date,n=t.toLocaleString("en-GB",{timeZone:"Europe/London",hour:"2-digit",minute:"2-digit"}),r=Number(n.split(":").join("")),o=t.toLocaleString("en-GB",{weekday:"long"}).toLowerCase(),a=v(t);let i=e[o];return d&&(i=e.holidays),e[a]&&(i=e[a]),i.some((({start:e,end:t})=>{const n=Number(e.split(":").join("")),o=Number(t.split(":").join("")),a=[n,o];return n>o&&(a[1]=2400,a[2]=0,a[3]=o),a[0]<=r&&r<=a[1]||a.length>2&&a[2]<=r&&r<=a[3]}))}function _(e){const t=e.hasAttribute("data-cmp-active");return!(!p&&t)&&!(p&&!t)}function S(e){const t=e.getAttribute("data-cmp-device");return("desktop"!==t||!a())&&!("mobile"===t&&!a())}function w(e,t){const n=t.parent;n.insertBefore(e,n.children[t.index])}function E(e,t){const n=m(e.getAttribute("data-cmp-id"));n&&(S(e)&&!_(e)&&n.style?n.style.display="none":n.style.display=f[t])}function x(e,t){const n=m(e.getAttribute("data-cmp-id")),r=m(e.getAttribute("data-cmp-movetoid")),o=e.getAttribute("data-cmp-where");n&&r&&o&&(S(e)&&_(e)?r.insertAdjacentElement(o,n):w(n,h[t]))}function k(e,t){const n=m(e.getAttribute("data-cmp-id")),r=m(e.getAttribute("data-cmp-swapwithid")),o=g[t];if(n&&r)if(S(e)&&_(e)){if(!o.isSwapped){const e=r.nextElementSibling,t=r.parentNode;n.replaceWith(r),t.insertBefore(n,e),o.isSwapped=!0}}else w(n,o.element1),w(r,o.element2),o.isSwapped=!1}function A(){i.forEach(((e,t)=>{E(e,t)})),c.forEach(((e,t)=>{x(e,t)})),l.forEach(((e,t)=>{k(e,t)}))}i.forEach((e=>{const t=m(e.getAttribute("data-cmp-id"));t&&f.push(r(t,"display"))})),c.forEach((e=>{const t=m(e.getAttribute("data-cmp-id"));t&&h.push({parent:t.parentNode,index:Array.from(t.parentNode.children).indexOf(t)})})),l.forEach((e=>{const t=m(e.getAttribute("data-cmp-id")),n=m(e.getAttribute("data-cmp-swapwithid"));t&&n&&g.push({element1:{parent:t.parentNode,index:Array.from(t.parentNode.children).indexOf(t)},element2:{parent:n.parentNode,index:Array.from(n.parentNode.children).indexOf(n)},isSwapped:!1})}));const L=y();p=b(L),A(),setInterval((()=>{p=b(L),A()}),6e4);const C=(0,o.Z)(A,200);window.addEventListener("resize",C)}}))},1072:function(){const e=document.querySelectorAll(".cmp-countdown");function t(e,t){const n=setInterval((function(){const r=t.children[0],o=t.children[1],a=t.children[2],i=t.getAttribute("data-wcmmode"),s="DISABLED"===i||"PREVIEW"===i,c="true"===t.getAttribute("data-hide-Timer-slot"),l="true"===t.getAttribute("data-show-timer"),u="true"===t.getAttribute("data-show-slot"),d=(new Date).getTime(),p=e-d,m=Math.floor(p/864e5),f=Math.floor(p%864e5/36e5),h=Math.floor(p%36e5/6e4),g=m<10?"0"+m:m,y=f<10?"0"+f:f,v=h<10?"0"+h:h;t.querySelector(".cmp-countdown__days-num").innerHTML=g,t.querySelector(".cmp-countdown__hours-num").innerHTML=y,t.querySelector(".cmp-countdown__minutes-num").innerHTML=v;const b=t.querySelector(".cmp-countdown__days-num"),_=t.querySelector(".cmp-countdown__hours-num"),S=t.querySelector(".cmp-countdown__minutes-num");p<0&&(clearInterval(n),l?(b.innerHTML="00",_.innerHTML="00",S.innerHTML="00"):o&&(o.style.display="none"));const w="true"===t.getAttribute("data-swap-desc-activate");if("EDIT"===i&&r&&w&&r.classList.add("cmp-countdown-description-visible"),o&&(null===b||""===b&&null===_||""===_&&null===S||""===S)&&(o.style.display="none"),function(e,t){e&&t&&(t.style.display="none")}(s,a),function(e,t,n,r){if(r&&e&&t&&n)return e.style.display="none",t.style.display="none",n.style.display="none",!0;return!1}(o,r,a,c))return;s&&(function(e,t,n,r,o,a,i,s,c){o&&t&&e&&r&&"00"===a&&"00"===i&&"00"===s&&(clearInterval(c),t.style.display=n?"block":"none",e.style.display="none",r.style.display="block")}(o,r,w,a,u,g,y,v,n),function(e,t,n,r){t&&n&&e&&"none"===t.style.display&&(n.style.display=r?"block":"none",e.style.display="block")}(a,o,r,w));"EDIT"===i&&u&&"00"===g&&"00"===y&&"00"===v&&(clearInterval(n),setTimeout((()=>{o&&r&&(o.style.display="none",r.style.display="block")}),1e3))}),1e3)}e.forEach((e=>{t(Number(e.getAttribute("data-attribute-timer"))+6e4,e)}))},7639:function(){!function(){const e={searchLocationForm:".cmp-coveragechecker--store-finder-footer .cmp-locationsearch__form",searchLocationBtn:".cmp-coveragechecker--store-finder-footer .cmp-locationsearch__searchicon",searchLocationInput:".cmp-coveragechecker--store-finder-footer .cmp-locationsearch__input"},t="https://locator.three.co.uk/search/?q=";function n(t){const n=document.querySelector(e.searchLocationInput).value;window.location=t+n}function r(){const r=document.querySelector(e.searchLocationForm);if(null!=r){const o=r.querySelector(e.searchLocationBtn),a=r.querySelector(e.searchLocationInput);o.addEventListener("click",(function(){n(t)})),a.addEventListener("keypress",(function(e){"Enter"==e.key&&(e.preventDefault(),n(t))}))}}"complete"===document.readyState||"loaded"===document.readyState?r():document.addEventListener("DOMContentLoaded",r)}()},4571:function(e,t,n){"use strict";var r=n(1626);const o=document.querySelectorAll(".coveragechecker"),a={0:"0",1:"3",2:"3",3:"2",4:"1"};Array.from(o).filter((e=>!e.classList.contains("networkstatuschecker"))).forEach((e=>{const t=e.querySelector(".cmp-networkcoveragechecker")?.getAttribute("data-google-apikey"),n=e.querySelectorAll(".cmp-coverageresults__button-item"),o=e.querySelector(".coverageresults-showhide-content"),i=e.querySelector(".cmp-form-text--networkcoveragechecker_input"),s=e.querySelector(".cmp-coverageresults__results-input"),c=e.querySelectorAll(".cmp-coverageresults__results-section"),l=e.querySelector(".cmp-coverageresults__broadband-section"),u=e.querySelector(".cmp-coverageresults__sunset-planned"),d=u.innerHTML,p=e.querySelector(".cmp-maps__legend--outdoor"),m=e.querySelector(".cmp-maps__legend--indoor"),f=e.querySelector(".cmp-maps__legend");let h=null;const g=e.querySelector("#default-network-button"),y=(()=>{if(0!==c.length&&g)return c[g.getAttribute("data-id")]})(),v=(e,t,n)=>{e.overlayMapTypes.clear();const r=new google.maps.ImageMapType({getTileUrl:function(e,r){return[n,t,"/",e.x,"/",e.y,"/",r].join("")},tileSize:new google.maps.Size(256,256),maxZooom:14});r.setOpacity(.5),e.overlayMapTypes.push(r)};function b(e,t){const n=t.getAttribute("data-id");c.forEach((t=>{if(n===t.getAttribute("data-id")){t.querySelectorAll(".cmp-coverageresults__icon").forEach((n=>{const r=e.coverage[t.getAttribute("data-coverage-id")],o=a[r];n.style.display="none",o===n.getAttribute("data-status")&&(n.style.display="block")}));t.querySelectorAll(".cmp-coverageresults__results-signal").forEach((n=>{const r=e.coverage[t.getAttribute("data-coverage-id")],o=a[r];n.style.display="none",o===n.getAttribute("data-status")&&(n.style.display="block")}))}})),v(window.threeGoogleMap,t.getAttribute("data-metricell"),t.getAttribute("data-metricell-url"))}function _(e,t,n){const r=t.getAttribute("data-hbb-availability");let o=e.hbb.availability[r];const a=e?.coverage?.extraCvgDetails;n&&"threeG"===n&&a&&"SUNSET_PLANNED"===a[0]?.name&&u?(u.innerHTML=d,u.querySelectorAll(".cmp-indication__message p").forEach((e=>{const t=a[0].value,n=new Date(t.split("/").reverse().join("-")).toLocaleDateString("en-GB",{day:"numeric",month:"long",year:"numeric"});e.innerHTML=e.innerHTML.replace("[dateplaceholder]",n),u.style.display="block"})),l&&(l.style.display="none")):(u&&(u.style.display="none"),l&&(l.style.display="Available"!==o&&r?"none":"block"))}(0,r.Z)(e,"COVERAGECHECKER",((t,r,a)=>{var l;l=t,0!==n.length&&(p&&(e.querySelector("#cmp-maps__legend-icon--outdoor").style.backgroundColor=p.getAttribute("data-outdoor-colour")),m&&(e.querySelector("#cmp-maps__legend-icon--indoor").style.backgroundColor=m.getAttribute("data-indoor-colour")),g&&(b(l,g),_(l,g)),n.forEach(((e,t)=>{e.addEventListener("click",(()=>{n.forEach((e=>{e.classList.contains("active")&&e.classList.remove("active")})),0!==c.length&&(c.forEach((e=>{e.style.display="none"})),c[t].style.display="flex",e.classList.add("active")),b(l,e),_(l,e,c[t]?.getAttribute("data-coverage-id"))}))}))),0!==c.length&&c.forEach((e=>{e.style.display="none"})),g&&y&&(0!==n.length&&n.forEach((e=>{e.classList.remove("active")})),g.classList.add("active"),y.style.display="flex"),o&&(s&&(s.textContent=i.value),window.threeGoogleMap.controls[google.maps.ControlPosition.RIGHT_BOTTOM].push(f),o.style.display="block",o.scrollIntoView({behavior:"smooth"})),window.threeGoogleMap.setCenter({lat:r,lng:a}),h&&h.setMap&&h.setMap(null),h=new google.maps.Marker({position:{lat:r,lng:a},map:window.threeGoogleMap,title:i.value})}),t)}))},2385:function(){"use strict";var e=function(e,t){for(;null!==e;){if(e.classList.contains(t))return!0;e=e.parentElement}return!1};let t,n,r=document.querySelector(".cmp-form-text--text-entry-dropdown"),o=r&&r.querySelector(".cmp-form-text--dropdown-input"),a=r&&r.querySelector(".cmp-form-text--dropdown-list"),i=a&&a.querySelectorAll(".cmp-form-text--dropdown-list__item"),s=document.querySelectorAll(".cmp-form-text--dropdown"),c=Array.from(s).filter((t=>!e(t,"cmp-form-dynamicdropdown")));if(0!==c.length){function l(e){let t=document.querySelectorAll(".cmp-form-text--dropdown-list");t&&t.forEach((e=>{e.classList.remove("cmp-form-text--dropdown-list__active"),e.parentElement.classList.remove("cmp-form-text--dropdown-active")})),e.classList.add("cmp-form-text--dropdown-list__active"),e.parentElement.classList.add("cmp-form-text--dropdown-active"),e.style.height="auto"}function u(e){e.style.height="0px",e.classList.remove("cmp-form-text--dropdown-list__active"),e.parentElement.classList.remove("cmp-form-text--dropdown-active")}function d(e,t){const n="cmp-form-text--dropdown-list__item--selected";e.querySelectorAll("li.cmp-form-text--dropdown-list__item").forEach((e=>{e.textContent.toLowerCase()===t.toLowerCase()?e.classList.contains(n)||e.classList.add(n):e.classList.remove(n)}))}function p(e){e.stopPropagation();const t=e.target.parentElement.parentElement.querySelector(".cmp-form-text--dropdown-list");if(t&&(t.classList.contains("cmp-form-text--dropdown-list__active")?u(t):l(t)),o&&0==o.value.length)for(let e=0;e0?(h=Array.from(t),c=h.findIndex((e=>e.classList.contains("hover"))),p=h.find((e=>e.classList.contains("hover")))):(h=Array.from(f),c=h.findIndex((e=>e.classList.contains("hover"))),p=h.find((e=>e.classList.contains("hover"))))):(h=Array.from(f),c=h.findIndex((e=>e.classList.contains("hover"))),p=h.find((e=>e.classList.contains("hover")))),40===e.keyCode&&(e.preventDefault(),i.classList.contains("cmp-form-text--text-entry-dropdown")&&0===n.value.length?(l(s),h.forEach((e=>e.style.display="block"))):l(s),-1!==c?(h[c].classList.remove("hover"),c+1===h.length?h[0].classList.add("hover"):h[c+1].classList.add("hover")):h.length>0&&h[0].classList.add("hover")),38===e.keyCode&&(-1!==c?(h[c].classList.remove("hover"),0===c?h[h.length-1].classList.add("hover"):h[c-1].classList.add("hover")):h.length>0&&h[0].classList.add("hover")),13===e.keyCode)if(e.preventDefault(),document.activeElement!=n||p)if(p){let e=p.innerText,t=p.getAttribute("value"),r=i.querySelector(".cmp-form-text--dropdown-input-hidden");n.value=e,n.setAttribute("value",e),r.setAttribute("value",t),r.value=t,p.classList.remove("hover"),d(i,e),u(s),m(i,s)}else{let e=o.value.toLowerCase();t=a.querySelectorAll('.cmp-form-text--dropdown-list__item:not([style*="display:none"]):not([style*="display: none"])'),t.forEach((t=>{t.textContent.toLowerCase()===e&&d(r,e)})),m(i,s)}else n.parentElement.classList.contains("cmp-form-text--dropdown-active")?u(s):l(s);27===e.keyCode&&u(s)}if(document.addEventListener("click",(function(){const e=document.querySelector(".cmp-form-text--dropdown .cmp-form-text--dropdown-list__active"),t=document.querySelectorAll(".cmp-form-text--dropdown label.cmp-form-text__label-active");e&&u(e),t.forEach((e=>{const t=e.parentElement.querySelector("input");""==t.value&&(e.classList.remove("cmp-form-text__label-active"),t.placeholder=e.innerText)}))})),c.forEach((e=>{const t=e.querySelector(".cmp-form-text__text");if(t){t.addEventListener("keydown",(n=>{f(n,t,e)})),e.classList.contains("cmp-form-text--text-entry-dropdown")||(t.addEventListener("click",(e=>p(e))),t.addEventListener("keydown",(e=>(9!==e.keyCode&&e.preventDefault(),!1)))),t.addEventListener("focus",(function(e){e.target.getAttribute("value")||(e.target.parentElement.parentElement.firstElementChild.classList.add("cmp-form-text__label-active"),e.target.setAttribute("placeholder",""))})),e.querySelector(".cmp-form-text--dropdown-box__arrow-icon").addEventListener("click",(e=>p(e)));const n=e.querySelector(".cmp-form-text--dropdown-list");if(n){let r=n.querySelectorAll(".cmp-form-text--dropdown-list__item"),o=e.querySelector(".cmp-form-text--dropdown-input-hidden");r&&r.forEach((e=>{e.addEventListener("click",(()=>{t.value=e.textContent,t.setAttribute("value",e.textContent),o.value=e.textContent,o.setAttribute("value",e.getAttribute("value"))}))})),n.addEventListener("click",(function(){n.classList.contains("cmp-form-text--dropdown-list__active")&&u(n)}))}e.querySelectorAll("li.cmp-form-text--dropdown-list__item").forEach((r=>{let o=e.querySelector(".cmp-form-text--dropdown-input-hidden");o&&(r.classList.contains("cmp-form-text--dropdown-list__item--selected")&&(t.setAttribute("value",r.innerHTML),t.value.length>0&&t.parentElement.parentElement.firstElementChild.classList.add("cmp-form-text__label-active"),o.setAttribute("value",r.getAttribute("value"))),r.addEventListener("mousedown",(r=>{d(e,r.target.innerText),t.setAttribute("value",r.target.innerHTML),n.parentElement.parentElement.firstElementChild.classList.contains("cmp-form-text__label-active")||n.parentElement.parentElement.firstElementChild.classList.add("cmp-form-text__label-active"),o.setAttribute("value",r.target.getAttribute("value"))})))}))}})),o){function h(e){let t=o.value.toLowerCase();const n=e.target.parentElement.parentElement.querySelector(".cmp-form-text--dropdown-list");e.target.setAttribute("placeholder","");for(let e=0;e-1&&t.length>2?(i[e].style.display="block",n&&l(n),i[e].addEventListener("mousedown",(()=>{o.value=r,o.setAttribute("value",r),o.blur(),a.classList.remove("cmp-form-text--dropdown-list__active"),a.parentElement.classList.remove("cmp-form-text--dropdown-active")}))):i[e].style.display="none"}}a=r.querySelector(".cmp-form-text--dropdown-list"),t=r.querySelectorAll('.cmp-form-text--dropdown-list__item:not([style*="display:none"]):not([style*="display: none"])'),n=Array.from(t),o.addEventListener("keyup",(e=>{o.value.length>0&&9!==e.keyCode?h(e):8===e.keyCode&&(l(a),i.forEach((e=>e.style.display="block")))})),o.addEventListener("input",(()=>{const e=n.find((e=>e.classList.contains("cmp-form-text--dropdown-list__item--selected")));e&&e.classList.remove("cmp-form-text--dropdown-list__item--selected")}))}}},5969:function(){const e=document.querySelectorAll(".cmp-form-dynamicdropdown"),t=0!==e.length;if(t){let c={},l="",u="",d=0;const p=(e,t,n,r=!1,...o)=>{t in c||(c[t]=[]);const a=(...e)=>n(...o,...e);c[t].push({node:e,handler:a,capture:r}),e.addEventListener(t,a,r)},m=(e,t)=>{c[t]&&(c[t].filter((({node:t})=>t===e)).forEach((({node:e,handler:n,capture:r})=>e.removeEventListener(t,n,r))),c[t]=c[t].filter((({node:t})=>t!==e)))};function n(e){let t=document.querySelectorAll(".cmp-form-text--dropdown-list");t&&t.forEach((e=>{e.classList.remove("cmp-form-text--dropdown-list__active"),e.parentElement.classList.remove("cmp-form-text--dropdown-active")})),e.classList.add("cmp-form-text--dropdown-list__active"),e.parentElement.classList.add("cmp-form-text--dropdown-active"),e.style.height="auto"}function r(e){e.style.height="0px",e.classList.remove("cmp-form-text--dropdown-list__active"),e.parentElement.classList.remove("cmp-form-text--dropdown-active"),""!==e.parentElement.querySelector(".cmp-form-text--dropdown-input").value&&e.parentElement.parentElement.querySelector(".cmp-form-text__error").classList.remove("active")}function o(e,t){const n="cmp-form-text--dropdown-list__item--selected";e.querySelectorAll("li.cmp-form-text--dropdown-list__item").forEach((e=>{e.textContent.toLowerCase().trim()===t.toLowerCase().trim()?e.classList.contains(n)||e.classList.add(n):e.classList.remove(n)}))}function a(e,t){t.stopPropagation();const o=e.querySelector(".cmp-form-text--dropdown-list");o&&(o.classList.contains("cmp-form-text--dropdown-list__active")?r(o):n(o))}function i(e,a,i,s,c,l){const p=c.querySelector(".cmp-form-text--dropdown-list");if(p){let m,f,h=p.querySelectorAll(".cmp-form-text--dropdown-list__item"),y=[];if(y=Array.from(h),m=y.findIndex((e=>e.classList.contains("hover"))),f=y.find((e=>e.classList.contains("hover"))),40===l.keyCode&&(n(p),-1!==m?(y[m].classList.remove("hover"),m+1===y.length?y[0].classList.add("hover"):y[m+1].classList.add("hover")):y.length>0&&y[0].classList.add("hover")),38===l.keyCode&&(-1!==m?(y[m].classList.remove("hover"),0===m?y[y.length-1].classList.add("hover"):y[m-1].classList.add("hover")):y.length>0&&y[0].classList.add("hover")),13===l.keyCode&&(l.preventDefault(),document.activeElement==s&&(s.parentElement.classList.contains("cmp-form-text--dropdown-active")?r(p):n(p)),f&&d>=Array.from(a).indexOf(l.target))){let n=f.innerText,d=c.querySelector(".cmp-form-text--dropdown-input-hidden");u=d.value,s.value=n,s.setAttribute("value",n),d.setAttribute("value",n),d.value=n,f.classList.remove("hover"),o(c,n),r(p),t&&g(e,a,i,l)}27===l.keyCode&&r(p)}}const f=e=>{e.target.getAttribute("value")||(e.target.parentElement.parentElement.firstElementChild.classList.add("cmp-form-text__label-active"),e.target.setAttribute("placeholder",""))};function s(e,n,s,c,l=!0){const d=c.querySelector(".cmp-form-text__text"),h=c.querySelector(".cmp-form-text--dropdown-box__arrow-icon");if(m(d,"click"),m(d,"keydown"),m(d,"focus"),m(h,"click"),d&&(p(d,"paste",(e=>e.preventDefault())),p(d,"click",a,!1,c),p(h,"click",a,!1,c),p(d,"keydown",i,!1,e,n,s,d,c),p(d,"focus",f),l)){const a=c.querySelector(".cmp-form-text--dropdown-list");if(a){let i=a.querySelectorAll(".cmp-form-text--dropdown-list__item"),l=c.querySelector(".cmp-form-text--dropdown-input-hidden");i&&i.forEach((e=>{e.addEventListener("click",(function(){u=l.value,d.value=e.textContent,d.setAttribute("value",e.textContent),l.value=e.textContent,l.setAttribute("value",e.textContent),""!==d.value?d.setAttribute("aria-invalid","false"):d.setAttribute("aria-invalid","true")}))})),a.addEventListener("click",(function(){a.classList.contains("cmp-form-text--dropdown-list__active")&&r(a)})),c.querySelectorAll("li.cmp-form-text--dropdown-list__item").forEach((r=>{let i=c.querySelector(".cmp-form-text--dropdown-input-hidden");i&&(c.parentElement.classList.contains("cmp-form-text--hide")&&1==c.querySelectorAll("li.cmp-form-text--dropdown-list__item").length&&i.setAttribute("value",r.getAttribute("value")),r.classList.contains("cmp-form-text--dropdown-list__item--selected")&&!c.parentElement.classList.contains("cmp-form-text--hide")&&(d.setAttribute("value",r.innerHTML),d.value.length>0&&d.parentElement.parentElement.firstElementChild.classList.add("cmp-form-text__label-active"),i.setAttribute("value",r.value),i.value=r.value),r.addEventListener("mousedown",(r=>{o(c,r.target.innerText),d.setAttribute("value",r.target.innerHTML),a.parentElement?.parentElement.firstElementChild.classList.contains("cmp-form-text__label-active")||a.parentElement?.parentElement.firstElementChild.classList.add("cmp-form-text__label-active"),i.setAttribute("value",r.target.value),t&&g(e,n,s,r)})))}))}}}const h=e=>{const t={},n=e.children;return n&&Array.from(n).forEach((e=>{const n=e.firstChild.textContent.replace(/\n/g,"").replace(/\s+/g," ").trim();let r={};0!==e.children.length&&(r={...h(e.children[0])}),t[n]={...r}})),{...t}};document.addEventListener("click",(function(){const e=document.querySelector(".cmp-form-text--dropdown-list__active"),t=document.querySelectorAll(".cmp-form-dynamicdropdown label.cmp-form-text__label-active");e&&r(e),t.forEach((e=>{const t=e.parentElement.querySelector("input");""==t.value&&(e.classList.remove("cmp-form-text__label-active"),t.placeholder=e.innerText)}))}));const g=(e,t,n,r)=>{const o=r.target.parentElement.parentElement.querySelector("input"),a=Array.from(t).indexOf(o);d=a+1;const i=e.length-1,s=[];if(t[a].getAttribute("value")!==u&&a{const o=e.length-1;l=e[r+1].parentElement.querySelector("label").innerText;for(let a=1;r+a<=o;a++){dropdown=e[r+a],input=t[r+a],inputHidden=dropdown.querySelector(".cmp-form-text--dropdown-input-hidden"),label=dropdown.parentElement.querySelector("label"),dropdown.querySelector("ul")?.remove(),label.classList.remove("cmp-form-text__label-active"),input.placeholder=label.innerText;let o=document.createElement("ul");o.classList.add("cmp-form-text--dropdown-list");const i=document.createElement("li");i.classList.add("cmp-form-text--dropdown-list__item"),i.setAttribute("value",`First choose from ${l}`),i.innerHTML=`First choose from ${l}`,o.appendChild(i),dropdown.appendChild(o),s(e,t,n,dropdown,!1),input.value="",inputHidden.value=""}},v=(e,t,n,r=0,o=[])=>{const a=e[r];a.querySelector("ul")?.remove();let i=document.createElement("ul");i.classList.add("cmp-form-text--dropdown-list");const c=o.reduce(((e,t)=>e?e[t]:null),n);Object.keys(c).forEach((e=>{const t=document.createElement("li");t.classList.add("cmp-form-text--dropdown-list__item"),t.setAttribute("value",e),t.innerHTML=e,i.appendChild(t),a.appendChild(i),1==Object.keys(c).length&&a.parentElement.classList.contains("cmp-form-text--hide")&&(t.parentElement.parentElement.querySelector(".cmp-form-text--dropdown-input").classList.add("cmp-form-text__label-active"),t.classList.add("cmp-form-text--dropdown-list__item--selected"),t.parentElement.style.height="0px")})),s(e,t,n,a)};e.forEach((e=>{const t=e.querySelectorAll('.cmp-form-text__text.cmp-form-text--dropdown-input[type="text"]'),n=e.querySelector(".cmp-form-dynamicdropdown__text ul"),r=e.querySelectorAll(".cmp-form-dynamicdropdown .cmp-form-text--dropdown-box");if(n){const e=h(n);y(r,t,e,-1),v(r,t,e)}}))}},3204:function(){document.addEventListener("click",(function(e){if(e.target.closest(".cmp-embed__play-button")){const t=e.target.closest(".cmp-embed__youtube-cover");if(t){t.style.display="none";const e=t.nextElementSibling;e&&"IFRAME"===e.tagName&&(e.src+="&autoplay=1")}}}))},1298:function(){document.querySelectorAll(".cmp-list--number-list").forEach((e=>{let t=1.6;const n=e.querySelectorAll(".cmp-list--number-list > ol > .cmp-list__item");if(n.length>0){const e=n.length.toString().length;n.forEach(((n,r)=>{const o=(r+1).toString().length,a=e-o;a>0&&(n.style.marginLeft=`calc(${a} * 1ch)`),r+1!==10&&r+1!==100&&r+1!==1e3||(t+=1),n.style.paddingLeft=`calc(${t}ch + 10px)`}))}}))},3660:function(){document.addEventListener("DOMContentLoaded",(()=>{document.querySelectorAll(".cmp-fileupload").forEach((e=>{const t=e?.querySelector(".cmp-fileupload__input"),n=e.querySelector(".cmp-fileupload__link"),r=e.querySelector(".cmp-fileupload__file-uploadsContainer"),o=e?.querySelector(".cmp-fileupload__file-list-title"),a=e?.querySelector(".cmp-fileupload__errorMsg"),i=e?.querySelector(".cmp-fileupload__errorMsgText"),s=["jpeg","jpg","png","doc","docx","pdf"],c=e?.getAttribute("data-required-checkbox"),l=e?.getAttribute("data-required-message");c&&e.addEventListener("focusout",(()=>{clearErrorMessages(),0===t.files.length?m(l||""):f()}));let u=0;n.addEventListener("click",(e=>{e.preventDefault(),t.click()}));const d=e?.querySelector(".cmp-fileupload__mainFileupload");d.addEventListener("click",(()=>t.click())),d.addEventListener("dragover",(e=>{e.preventDefault(),d.classList.add("dragover")})),d.addEventListener("dragleave",(()=>{d.classList.remove("dragover")})),d.addEventListener("drop",(e=>{e.preventDefault(),d.classList.remove("dragover"),d.classList.add("dropped");const t=e.dataTransfer.files;p(t)})),t.addEventListener("change",(e=>{const t=e.target.files;p(t)}));const p=e=>{if(document.querySelectorAll(".cmp-fileupload__file-info").length+e.length>20)return m("Maximum number of files added."),void(t.value="");f(),Array.from(e).forEach((e=>{if(u+=e.size,u>41943040)return m("40MB file size limit reached. Reduce file sizes to upload more."),t.value="",void(u-=e.size);f();const n=e.name.split(".").pop().toLowerCase();if(!s.includes(n))return void m("File type not supported. Try a jpeg, jpg, png, doc, docx, or PDF instead.");f();const o=h(e);r.appendChild(o),g(o)})),0!==document.querySelectorAll(".cmp-fileupload__file-info").length&&o.classList.add("cmp-fileupload--show")},m=e=>{i.textContent=e,a.classList.add("cmp-fileupload--visible")},f=()=>{a.classList.remove("cmp-fileupload--visible")},h=t=>{const n=e?.querySelector(".file-info-template").content.cloneNode(!0),r=n?.querySelector(".cmp-fileupload__file-info"),o=t.name.split(".").pop().toUpperCase(),a=(t.size/1024).toFixed(2)+" KB",i=t.name.substring(0,t.name.lastIndexOf("."));n.querySelector(".cmp-fileupload__file-name").textContent=i,n.querySelector(".cmp-fileupload__file-size").textContent=a,n.querySelector(".cmp-fileupload__file-extension").textContent=o;const s=n?.querySelector(".cmp-fileupload__cross-icon");return s.addEventListener("click",(e=>{e.target.closest(".cmp-fileupload__cross-icon")&&(r.classList.add("cmp-fileupload__deleteProgressBar"),setTimeout((()=>{r.classList.add("show-delete-options")}),200))})),r.addEventListener("click",(t=>{if(t.target.classList.contains("cmp-fileupload__delete-file")){const t=r.querySelector(".cmp-fileupload__trash");t.classList.add("open");const n=r?.querySelector(".cmp-fileupload__file-representation");n.classList.add("animate"),setTimeout((()=>{t.classList.remove("open");r.querySelector(".cmp-fileupload__delete-options").classList.add("cmp-fileupload__faded"),r.classList.remove("cmp-fileupload__deleteProgressBar")}),900),setTimeout((()=>{r.classList.add("cmp-fileupload--FileInfoDeleteTrans")}),1300),setTimeout((()=>{r.remove(),0===e?.querySelectorAll(".cmp-fileupload__file-info").length&&e?.querySelector(".cmp-fileupload__file-list-title").classList.remove("cmp-fileupload--show")}),1500)}t.target.classList.contains("cmp-fileupload__cancel-delete")&&(r.classList.remove("cmp-fileupload__deleteProgressBar"),r.classList.remove("show-delete-options"),setTimeout((()=>{r.classList.add("cmp-fileupload--cancel-animation")}),300),setTimeout((()=>{r.classList.add("cmp-fileupload__file-details"),r.classList.remove("cmp-fileupload--cancel-animation")}),500))})),r},g=e=>{const t=e?.querySelector(".cmp-fileupload__progress-bar"),n=e?.querySelector(".cmp-fileupload__progress-bar div"),r=e?.querySelector(".cmp-fileupload__progress-percentage"),o=e?.querySelector(".cmp-fileupload__cross-icon");let a=0;const i=setInterval((()=>{a+=5,n.style.width=`${a}%`,r.textContent=`${a}%`,a>=100&&(clearInterval(i),n.classList.add("cmp-fileupload__faded"),t.classList.add("cmp-fileupload__hidden"),r.classList.add("cmp-fileupload__hidden"),setTimeout((()=>{o.style.display="block",e.classList.add("file-info--padded")}),200))}),100)}}))}))},6972:function(e,t,n){"use strict";var r=n(9904),o=n(9880);const a=document.querySelectorAll(".footer");!function(){let e=0;const t=t=>{const n=document.querySelector(".top_sider");if(n&&!n.getAttribute("footerInitialized")){e++;const o=document.getElementsByClassName("bottom_width");if(0!==o.length){n.setAttribute("footerInitialized","true");for(var r=0;re.addEventListener("click",(function(e){e.stopPropagation()}))));const a=(e,t)=>{const n=Math.ceil(e.children.length/t);e.style.gridTemplateRows=`repeat(${n}, auto)`},i=document.querySelector(".footer_policies > .policies_container");if(i){const e=()=>{const e=window.innerWidth>0?window.innerWidth:screen.width;e<=413&&a(i,1),e>413&&e<=598&&a(i,2),e>598&&e<=783&&a(i,3),e>783&&a(i,4)};e(),window.addEventListener("resize",e)}const s=document.querySelectorAll(".footer-social-media a"),c=document.querySelectorAll(".footer-social-media cq");0===s.length&&0===c.length&&document.querySelector(".footer-social-media")&&document.querySelector(".footer-social-media").remove(),clearInterval(t)}else console.log("Footer not ready in HTML - elements required: accordionItems =\n document.getElementsByClassName('bottom_width');",o),e>30&&(console.log("Aborting attempts to initialize footer"),clearInterval(t))}};t();const n=setInterval((()=>t(n)),150)}(),a.forEach((e=>{const t=e.clientHeight,n=e.getAttribute("data-videoUrlMobile"),o=e.getAttribute("data-videoUrlDesktop"),a=e.getAttribute("data-altTextFallback"),i=(e.getAttribute("data-alttext"),e.getAttribute("data-fallbackMobileImageUrl")),s=e.getAttribute("data-fallbackDesktopImageUrl"),c=(e.getAttribute("data-imageUrlMobile"),e.getAttribute("data-imageUrlDesktop"),e.getAttribute("data-layout")),l=(0,r.S)(e,i,s,e,t);var u;"auroralight"===c?e.classList.remove("cmp-footer--dark"):"animated"===c?l.renderVideo(o,n,a||""):"liquorice"===c&&(u=e.parentElement)&&u.classList.contains("footer")&&u.classList.add("cmp-footer--dark")})),a.forEach((e=>{null!==e&&"footer"===e.className&&(0,o.lg)(e,"footer",o.fS);const t=[];e.querySelectorAll(".bottom_width").forEach((e=>{const n=e.querySelector(".style-intro-copy"),r=n?n.textContent.toLowerCase().trim():o.fS;e.setAttribute("data-analytics-section-title",r),t.push(r)}));let n=0;e.querySelectorAll(".bottom_width").forEach((e=>{e.querySelectorAll(".bottom_footer_link").forEach((e=>{const r=e.textContent.toLowerCase().trim()||o.fS;(0,o.s0)(e,"textlink",t[n]+":"+r)})),n++})),e.querySelectorAll(".cmp-link__link").forEach((e=>{const t=e.getAttribute("title")||o.u3;(0,o.s0)(e,e.querySelector("svg")?"image":"textlink",t)}));const r=e.querySelector(".footer_policies"),a=r.querySelector(".style-intro-copy"),i=a?a.textContent.toLowerCase().trim():o.fS;r.setAttribute("data-analytics-section-title",i),e.querySelectorAll(".policies_link").forEach((e=>{const t=e.textContent.toLowerCase().trim()||o.fS;(0,o.s0)(e,"textlink",i+":"+t)})),e.querySelectorAll(".cmp-link").forEach((e=>{const t=e.querySelector(".cmp-link__link"),n=t?t.textContent.toLowerCase().trim():o.fS;e.setAttribute("data-analytics-section-title",n)})),e.querySelectorAll(".cmp-locationsearch__searchicon").forEach((e=>{(0,o.s0)(e,"button",o.u3)}))}))},3729:function(e,t,n){"use strict";n.d(t,{E0:function(){return s},W9:function(){return i},_G:function(){return o}});const r=document.body.hasAttribute("data-cmp-data-layer-enabled"),o=r?window.adobeDataLayer=window.adobeDataLayer||[]:void 0,a=e=>{for(const[t,n]of Object.entries(e))n&&(e[t]=n.toString().trim().substring(0,100).toLowerCase().replace(/(<([^>]+)>)/gi,""));return e},i=(e,t,n,i)=>{if(r){const r={event_trigger:"form_submission",form_name:e,form_submission_status:t,form_submission_message:n,...i};o.push({event:"form_submission",data:a(r)})}},s=e=>{let t=Object.assign({},e);r&&o.push({event:"form_field_validation",data:a(t)})}},3296:function(){const e=document.querySelectorAll(".cmp-form-options__field--checkbox");if(0!==e.length){function t(){this.hasAttribute("checked")?this.removeAttribute("checked"):this.setAttribute("checked","")}e.forEach((e=>{e.addEventListener("change",t)}))}},8992:function(){const e=document.querySelectorAll("[data-hidefieldids]");!!document.querySelector('[data-wcmmode="EDIT"]')||e.forEach((e=>{const t=e.getAttribute("data-hidefieldids").split(","),n=e.getAttribute("data-starthidden"),r=e.getAttribute("data-clearonhide"),o=t.map((e=>document.getElementById(e))),a=o.map((e=>e.required));"true"===n&&o.forEach((e=>{e.parentElement.classList.add("threedigital-hide"),e.required=!1})),e.addEventListener("change",(()=>{o.forEach(((e,t)=>{const n=window.getComputedStyle(e.parentElement).display,o=e.parentElement.classList;"none"!==n?(o.add("threedigital-hide"),e.required=!1,"true"===r&&(e.value="")):(o.remove("threedigital-hide"),!0===a[t]&&(e.required=!0))}))}))}))},6680:function(e,t,n){"use strict";n.d(t,{HB:function(){return s},V9:function(){return i},ex:function(){return l},ho:function(){return a}});var r=n(7588),o=n(5842);const a="form-text-port-in-datepicker",i="data-cmp-formatted-date",s=e=>{e===a?(0,r.C)():(0,o.b)(e)},c=e=>1===e.toString().length?`0${e}`:e,l=(e,t)=>{if(e.length>0){let r=e[0];if(document.querySelector("#pac-form"))var n=`${r.getFullYear()}-${c(r.getMonth()+1)}-${c(r.getDate())}`;else n=`${r.getDate()}/${c(r.getMonth()+1)}/${r.getFullYear()}`;t.element.setAttribute(i,n)}}},5842:function(e,t,n){"use strict";n.d(t,{b:function(){return a}});var r=n(8527),o=n(6680);const a=e=>{const t=(0,r.Z)(`#${e}`,{mode:"single",showMonths:1,defaultDate:(new Date).setHours(0,0,0,0),disableMobile:!0,clickOpens:!1,dateFormat:"j F Y",monthSelectorType:"static",allowInput:!0,static:!0,locale:{weekdays:{shorthand:["S","M","T","W","T","F","S"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]}},onOpen:function(e,t,n){const r=n.element.closest(".flatpickr-wrapper").querySelector(".cmp-form-text_icon-arrow");r&&r.classList.remove("cmp-form-text_icon-arrow-down"),r&&r.classList.add("cmp-form-text_icon-arrow-up")},onClose:function(e,t,n){const r=n.element.closest(".flatpickr-wrapper").querySelector(".cmp-form-text_icon-arrow");r&&r.classList.remove("cmp-form-text_icon-arrow-up"),r&&r.classList.add("cmp-form-text_icon-arrow-down")},onReady:function(e,n,r){const a=r.currentYearElement,i=a.parentElement.children;for(let e in i)i.hasOwnProperty(e)&&(i[e].style.display="none");const s=document.createElement("select");for(let e=0;e<1e4;e++){const t=document.createElement("option");t.value=""+e,t.text=""+e,s.appendChild(t)}s.addEventListener("change",(function(e){a.value=e.target.value,r.currentYear=parseInt(e.target.value),r.redraw()})),s.className="flatpickr-monthDropdown-months",s.style.width="100%",s.id="flatpickr-custom-year-select",s.value=r.currentYearElement.value,s.setAttribute("onmousedown","return false;"),s.setAttribute("onclick","return false;"),a.parentElement.appendChild(s);r.element.closest(".flatpickr-wrapper").querySelector(".flatpickr-input").setAttribute("readonly",""),r.element.addEventListener("click",(function(){t.toggle()})),(0,o.ex)(e,r)},onMonthChange:function(e,t,n){n.element.closest(".flatpickr-wrapper").querySelector(".flatpickr-monthDropdown-months").value=""+n.currentYear},onChange:function(e,t,n){(0,o.ex)(e,n)}})}},7588:function(e,t,n){"use strict";n.d(t,{C:function(){return a}});var r=n(8527),o=n(6680);const a=()=>{const e=[new Date(2026,0,1),new Date(2025,3,18),new Date(2025,3,21),new Date(2025,4,5),new Date(2025,4,26),new Date(2025,7,25),new Date(2025,11,23),new Date(2025,11,24),new Date(2025,11,25),new Date(2025,11,26),new Date(2025,11,31)],t=t=>!!e.find((e=>{return r=t,(n=e).getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()&&n.getDate()===r.getDate();var n,r})),n=(e=>{const n=[],r=[];let o=(new Date).getHours()<17?0:1;const a=e,i=(e=0)=>new Date(Date.now()+24*e*60*60*1e3);for(;;){const e=i(++o);if(t(e)||0===e.getDay()||6===e.getDay()||(n.push(e),r.push(e.getMonth())),a===o)break}return{workingDays:n,enabledMonths:[...new Set(r)]}})(30).workingDays;const a=(0,r.Z)(`#${o.ho}`,{mode:"single",enable:n,showMonths:1,defaultDate:new Date(n[0]).setHours(0,0,0,0),disableMobile:!0,clickOpens:!1,dateFormat:"j F Y",monthSelectorType:"static",allowInput:!0,static:!0,locale:{weekdays:{shorthand:["S","M","T","W","T","F","S"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]}},minDate:(i=1,(s=new Date(n[0])).setDate(s.getDate()-i),s),maxDate:n[n.length-1],onOpen:function(e,t,n){const r=n.element.closest(".flatpickr-wrapper").querySelector(".cmp-form-text_icon-arrow");r&&r.classList.remove("cmp-form-text_icon-arrow-down"),r&&r.classList.add("cmp-form-text_icon-arrow-up")},onClose:function(e,t,n){const r=n.element.closest(".flatpickr-wrapper").querySelector(".cmp-form-text_icon-arrow");r&&r.classList.remove("cmp-form-text_icon-arrow-up"),r&&r.classList.add("cmp-form-text_icon-arrow-down")},onReady:function(e,t,n){const r=n.currentYearElement,i=r.parentElement.children;for(let e in i)i.hasOwnProperty(e)&&(i[e].style.display="none");const s=document.createElement("select");for(let e=0;e<1e4;e++){const t=document.createElement("option");t.value=""+e,t.text=""+e,s.appendChild(t)}s.addEventListener("change",(function(e){r.value=e.target.value,n.currentYear=parseInt(e.target.value),n.redraw()})),s.className="flatpickr-monthDropdown-months",s.style.width="100%",s.id="flatpickr-custom-year-select",s.value=n.currentYearElement.value,s.setAttribute("onmousedown","return false;"),s.setAttribute("onclick","return false;"),r.parentElement.appendChild(s);n.element.closest(".flatpickr-wrapper").querySelector(".flatpickr-input").setAttribute("readonly",""),n.element.addEventListener("click",(function(){a.toggle()})),(0,o.ex)(e,n)},onMonthChange:function(e,t,n){n.element.closest(".flatpickr-wrapper").querySelector(".flatpickr-monthDropdown-months").value=""+n.currentYear},onChange:function(e,t,n){(0,o.ex)(e,n)}});var i,s}},294:function(){document.querySelectorAll(".cmp-form-text-input-hidden--dropdown").forEach((e=>{let t=e.hasAttribute("data-showvalue")?e.getAttribute("data-showvalue"):"",n=e.hasAttribute("data-showfields")?e.getAttribute("data-showfields"):"";document.querySelector(`.cmp-form-text--dropdown-list li[value="${t}"]`)?.setAttribute("data-showfields",n),e.remove()}));const e=document.querySelectorAll(".cmp-form-text--dropdown");let t=[],n=[];e.forEach((e=>{e.querySelector(".cmp-form-text--dropdown-list").addEventListener("click",(e=>{for(e.currentTarget.querySelectorAll("li").forEach((e=>{e.classList.contains("cmp-form-text--dropdown-list__item--selected")?e.hasAttribute("data-showfields")&&e.getAttribute("data-showfields").split(",").forEach((e=>{n.push(e)})):e.hasAttribute("data-showfields")&&e.getAttribute("data-showfields").split(",").forEach((e=>{t.push(e)}))})),t=t.filter((e=>!n.includes(e)));n.length;){let e=n.shift();document.querySelector("#"+e).value="",document.querySelector("#"+e).parentElement.classList.remove("cmp-form-input-text--hide")}for(;t.length;){let e=t.shift();document.querySelector("#"+e).value="",document.querySelector("#"+e).parentElement.classList.add("cmp-form-input-text--hide")}}))}))},5834:function(e,t,n){"use strict";n.d(t,{B:function(){return N}});var r=n(6680),o=n(3729);var a=(e,t)=>{if("createEvent"in document){let n=new Event(t,{bubbles:!1,cancelable:!0});e.dispatchEvent(n)}else{let n=document.createEventObject();n.eventType=t,e.fireEvent("on"+n.eventType,n)}},i=n(7368),s=n(3117);const c="form-text-port-in-datepicker",l="cmp-form-text--number",u="button-minus",d="button-plus",p=document.querySelector(".primarycontainer.showhide-content .cmp-containerprimary__inner .carousel"),m=document.querySelector(".primarycontainer.showhide-content .cmp-containerprimary__inner .shortcuts2-component ");window.fieldValidationDataLayer=window.fieldValidationDataLayer||{};let f=document.querySelector(".cmp-form-dateinput__day input"),h=document.querySelector(".cmp-form-dateinput__month input"),g=document.querySelector(".cmp-form-dateinput__year input"),y=document.querySelectorAll(".cmp-form-dateinput input"),v=document.querySelectorAll(".cmp-form-dateinput .text"),b=document.querySelectorAll(".cmp-form-range .text"),_=document.querySelectorAll(".cmp-form-autocomplete"),S=document.querySelector(".cmp-form-range__min input"),w=document.querySelector(".cmp-form-range__max input"),E=document.querySelector(".h-captcha-container"),x=document.querySelector(".cmp-form__h-captcha-error"),k=!1,A=document.querySelectorAll(".cmp-form-options--checkbox"),L=document.querySelectorAll(".cmp-form-options--radio"),C=document.querySelectorAll(".cmp-fileupload");const q=e=>{const t=document.getElementById("port-in-form-submit"),n=document.querySelector("form#pac-form")?.parentElement?.classList?.contains("disabled-submit")||!1;t&&n&&(t.disabled=e)},D=()=>{if(v)for(var e=0;e{let t=e.querySelectorAll(".cmp-form-options__field--radio"),n=Array.from(t).filter((e=>e.hasAttribute("required")));if(0!==t.length){const e=Array.from(t).some((e=>e.checked));0!==n.length&&n.forEach(((t,r)=>{P(n,e,t,r)}))}}))}function O(e,t,n){e&&e.includes("/bin/threedigital/changepassword")&&function(e,t){if(!e||!t)return;const n=e.message||e.status;if("string"!=typeof n||""===n.trim())return;let r=document.getElementById("responseMessageDiv");r?r.textContent=n:(r=document.createElement("div"),r.id="responseMessageDiv",r.className="change-password-success",r.textContent=n,t.appendChild(r))}(t,n)}let B=document.querySelector(".cmp-form");if(document.getElementById("form-sim-calculator")&&(B=document.getElementById("form-sim-calculator")),B){fieldValidationDataLayer.form_name=B.getAttribute("name");const F=B.getAttribute("method"),j=B.getAttribute("action"),$=()=>Array.from(B.elements).filter((e=>"BUTTON"!==e.nodeName&&(e.classList.contains("cmp-form-text__text")||e.classList.contains("cmp-form-text--textarea__text")||e.classList.contains("cmp-form-options__field--checkbox")||e.classList.contains("cmp-form-options__field--radio")||e.classList.contains("active")||e.id===c))),R=()=>Array.from(B.elements).filter((e=>"BUTTON"!==e.nodeName&&(e.classList.contains("cmp-form-text__text")||e.classList.contains("cmp-form-text--textarea__text")||e.hasAttribute("checked")||e.id===c)||"hidden"===e.type&&e.parentElement.classList.contains("hidden")));B.noValidate=!0;const V=e=>{const t=e.target?.parentElement?.firstElementChild;if(t&&!t.classList.contains("cmp-form-text__label-active")&&setTimeout((()=>{t.classList.add("cmp-form-text__label-active")}),20),v)for(var n=0;n{t.classList.add("cmp-form-text__label-active")}),20)}},W=()=>{document.querySelectorAll(".cmp-form-input-text--hide").forEach((e=>{e.querySelector("input").required=!1}))},U=()=>{document.querySelectorAll(".cmp-form-input-text--identifier").forEach((e=>{const t=e.querySelector("input");if(!t)return;const n="true"===e.getAttribute("data-cmp-required");e.classList.contains("cmp-form-input-text--hide")||(t.required=n)}))};document.querySelectorAll(".cmp-form-text__text").forEach((e=>{"cmp-form-verification__text"!==e.getAttribute("id")&&e.addEventListener("focus",V)}));const Y=setInterval((()=>{const e=e=>document.querySelectorAll(e).forEach((e=>{if("cmp-form-verification__text"!==e.getAttribute("id")&&e.value.length>0){const t=e.parentElement?.firstElementChild;t&&!t.classList.contains("cmp-form-text__label-active")&&t.classList.add("cmp-form-text__label-active")}}));e(".cmp-form-text__text"),e(".cmp-form-text--textarea__text")}),300);setTimeout((()=>{clearInterval(Y)}),1e3),document.querySelectorAll(".cmp-form-text--textarea__text").forEach((e=>e.addEventListener("focus",V)));const z=[];function G(e){z.includes(e)||z.push(e)}const J=[];function K(e){const t=J.find((t=>t.confirmationId===e.id));if(t){const e=document.querySelector(`#${t.id}`);e&&z.includes(e)&&a(e,"blur")}}document.querySelectorAll("[data-confirmation-id]").forEach((e=>{J.push({id:e.getAttribute("id"),confirmationId:e.getAttribute("data-confirmation-id")})}));for(const De of $())De.addEventListener("invalid",(function(e){fieldValidationDataLayer.event_trigger="invalid",fieldValidationDataLayer.form_field_name=De.getAttribute("name"),"checkbox"!==De.getAttribute("type")&&"radio"!==De.getAttribute("type")&&Z(De),e.preventDefault()})),De.addEventListener("blur",(function(){fieldValidationDataLayer.event_trigger="blur",fieldValidationDataLayer.form_field_name=De.getAttribute("name"),De.classList.contains("cmp-form-text--dropdown-input")&&(fieldValidationDataLayer.form_field_name=De.nextElementSibling.getAttribute("name")),"checkbox"!==De.getAttribute("type")&&"radio"!==De.getAttribute("type")&&Z(De),K(De),G(De)})),De.addEventListener("input",(function(){fieldValidationDataLayer.event_trigger="input",fieldValidationDataLayer.form_field_name=De.getAttribute("name"),z.includes(De)&&Z(De)}));function Z(e){e.setCustomValidity(""),"minValue"===e.getAttribute("name")||"maxValue"===e.getAttribute("name")?le(e):(e!=f&&e!=h&&e!=g||(ce(e),se()),te(e)),e.validity.valid||e.classList.contains("cmp-form-text--dropdown-input")&&0!==e.value.length?ee(e):Q(e)}function X(e,t){e.classList.contains(`${l}__text`)&&document.getElementById(e.id).parentElement.setAttribute("aria-invalid",t.toString())}function Q(e){I(e),ue(e,!0),e.setAttribute("aria-invalid","true"),e.parentElement.classList.add("afterelement-error"),X(e,!0),fieldValidationDataLayer.form_field_validation_status="failed",(0,o.E0)(fieldValidationDataLayer)}function ee(e){const t=de(e);if(t){t.textContent="",ue(e,!1),e.removeAttribute("aria-invalid","false"),e.parentElement.classList.remove("afterelement-error"),X(e,!1);const n=document.getElementById(e.id).parentElement.parentElement.querySelector(".cmp-form-text__error");n&&n.classList.remove("active"),fieldValidationDataLayer.form_field_validation_status="success",(0,o.E0)(fieldValidationDataLayer)}}function te(e){const t=e.getAttribute("data-confirmation-id");if(t){const n=document.getElementById(e.id),r=document.querySelector(`#${t}`);if(r){r.value!==document.querySelector(`#${e.id}`).value?n.setCustomValidity(M(e,"data-cmp-constraint-message")):n.setCustomValidity("")}}}function ne(){if(f&&h&&g)return f.value.length>1&&h.value.length>1&&g.value.length>3}if(0!==A.length&&A.forEach((e=>{let t=e.querySelectorAll(".cmp-form-options__field--checkbox"),n=Array.from(t).filter((e=>e.hasAttribute("required")));0!==t.length&&t.forEach((e=>{e.addEventListener("change",(function(){if(0!==t.length){const e=Array.from(t).some((e=>e.checked));0!==n.length&&n.forEach(((t,r)=>{T(n,e,t,r)}))}}))}))})),0!==L.length&&L.forEach((e=>{let t=e.querySelectorAll(".cmp-form-options__field--radio");0!==t.length&&t.forEach((e=>{e.addEventListener("change",(function(){let e=Array.from(t).filter((e=>e.hasAttribute("required")));if(0!==t.length){const n=Array.from(t).some((e=>e.checked));0!==e.length&&e.forEach(((t,r)=>{P(e,n,t,r)}))}}))}))})),y)for(var H=0;H2&&(this.value=this.value.slice(0,2)):this.value&&this.value.length>4&&(this.value=this.value.slice(0,4))}));function re(){if(f&&h&&g)return f.value+"/"+h.value+"/"+g.value}function oe(e){var t=e.split("/"),n=new Date,r=new Date(+t[2],t[1]-1,+t[0]),o=n.getFullYear()-r.getFullYear(),a=n.getMonth()-r.getMonth();return(a<0||0===a&&n.getDate()2&&"0"===e.value.charAt(0))?t.setCustomValidity(M(e,"data-cmp-constraint-message")):t.setCustomValidity(""))}function le(e){const t=document.getElementById(e.id);S&&w&&S.value.length>0&&w.value.length>0&&(parseInt(S.value)>parseInt(w.value)?t.setCustomValidity(M(e,"data-cmp-constraint-message")):t.setCustomValidity(""))}function ue(e,t){t&&de(e)&&!de(e).parentElement.classList.contains("active")&&de(e).parentElement.classList.add("active")}function de(e){const t=e.getAttribute("aria-describedby");if(!t)return null;const n=t.split(" ").find((e=>e.endsWith("-error")));return document.getElementById(n)}let pe=document.querySelector(".cmp-form-text--text-entry-dropdown"),me=pe&&pe.querySelector(".cmp-form-text--dropdown-input"),fe=pe&&pe.querySelector(".cmp-form-text--dropdown-input-hidden");me&&me.addEventListener("blur",(e=>{we(e.target)})),me&&me.addEventListener("input",(e=>{Se(e.target)}));let he,ge,ye,ve=pe&&pe.querySelectorAll(".cmp-form-text--dropdown-list__item"),be=document.querySelectorAll(".cmp-form-text--dropdown");function _e(e){if(e){let t=e.querySelectorAll(".cmp-form-text--dropdown-list__item"),n=e.querySelector(".cmp-form-text__error__text");for(let r=0;r{n.parentElement.classList.remove("active"),ee(e.querySelector(".cmp-form-text--dropdown-input"))}));if(ve)for(let e=0;e{ee(me)}))}}function Se(e){let t=pe.querySelector(`#${e.id}-error`);e.validity.valid&&t&&ee(e)}function we(e){let t=pe.querySelector(".cmp-form-text--dropdown-list").querySelectorAll(".cmp-form-text--dropdown-list__item"),n=!1,r=pe.querySelector(`#${e.id}-error`),o=me&&me.value;if(r){for(let r=0;r0)}n||(r.textContent=M(e,"data-cmp-constraint-message"),Q(e)),e.validity.valid&&0!=o.length||(fe.setAttribute("value",""),fe.previousElementSibling.setAttribute("value",""))}}function Ee(e,t){const n=t>0?t:1;e.style.width=`${n}ch`}function xe(e){e.click(),e.blur()}function ke(e){e.preventDefault(),e.stopPropagation();let t=e.target.parentNode.querySelector(`.${l}__text`);e.target.className.endsWith(u)?t.value=Number(t.value)-1:e.target.className.endsWith(d)&&(t.value=Number(t.value)+1),a(t,"change"),z.includes(t)&&xe(t)}function Ae(e){e.preventDefault(),e.stopPropagation();let t=e.target.parentNode.querySelector(`.${l}__text`);t.value=e.target.attributes.quantity.value,a(t,"change"),z.includes(t)&&xe(t)}function Le(){let e=document.querySelector(".cmp-form-error-notification-box"),t=document.querySelectorAll(".cmp-form-text__error"),n=document.querySelector(".cmp-form-error-notification-box-list"),r=document.querySelector(".cmp-form-dateinput__day .cmp-form-text__error.active"),o=document.querySelector(".cmp-form-dateinput__month .cmp-form-text__error.active"),a=document.querySelector(".cmp-form-dateinput__year .cmp-form-text__error.active"),i=document.createElement("li"),s=document.querySelector(".postcodelookup");n&&(n.innerHTML="",t&&t.forEach((t=>{if(me=t.parentElement.querySelector(".cmp-form-text--dropdown-input"),me&&(""!==me?.value||1!=me?.required||t.parentElement.classList.contains("cmp-form-text--hide")?(t.classList.remove("active"),me?.setAttribute("aria-invalid",!1)):(t.classList.add("active"),me?.setAttribute("aria-invalid",!0))),s&&""===t.parentElement.parentElement.querySelector("[name=location]")?.value&&t.classList.add("active"),t.classList.contains("active")){var c,l=document.createElement("li"),u=t.parentElement.querySelector("label"),d=t.parentElement.querySelector("input"),p=t.parentElement.parentElement.querySelector("legend");u&&d&&""===d.value?c=document.createTextNode("'"+u.textContent+"' field is required"):u?c=document.createTextNode("'"+u.textContent+"' field is incorrect"):d.checked||(c=document.createTextNode("'"+p?.textContent+"' field is required")),t.classList.contains("cmp-form-dateinput__error")?r||o||a||(l&&l.appendChild(c),n&&n.appendChild(l)):(l&&l.appendChild(c),n&&n.appendChild(l),e&&e.scrollIntoView({behavior:"smooth",block:"center"}))}!e||n.hasChildNodes(l)||n.hasChildNodes(i)?e.style.display="block":e.style.display="none"})),E&&!k&&(i.textContent="'hCaptcha' field must be selected",e&&e.querySelector("ul").appendChild(i),e.style.display="block",e&&e.scrollIntoView({behavior:"smooth",block:"center"})))}function Ce(){if(E){const e=document.querySelector(".h-captcha-response");!(e?e.value:"")&&x&&(x.style.display=k?"none":"flex")}}function qe(){let e=document.querySelector(".cmp-form-text__error"),t=document.querySelector(".verification-form-text"),n=document.querySelector(".verification-form-text-success"),r=document.querySelector(".cmp-form-text__text"),o=document.querySelector(".cmp-form-text"),a=document.querySelector(".cmp-button"),c=document.querySelector(".showhide-content");e&&t&&n&&r&&o&&a&&c&&(0!=r.value.length&&e&&!e.classList.contains("active")&&(E&&k||!E)?(t.style.display="none",n.style.display="block",o.style.display="none",a.style.display="none",c.style.display="block",p&&(0,i.u)(),m&&(0,s.u)()):(t.style.display="block",n.style.display="none",o.style.display="flex",a.style.display="block",c.style.display="none"))}be&&be.forEach((e=>{e.classList.contains("cmp-form-text--text-entry-dropdown")||(he=e)})),_e(he),_e(pe),document.addEventListener("DOMContentLoaded",(()=>{(0,r.HB)(r.ho),(0,r.HB)("default-datepicker"),document.querySelectorAll("form").forEach((e=>{const t=e.getAttribute("action");if(t&&t.includes("/bin/threedigital/changepassword")){let t=!1,n="";try{const r=sessionStorage.getItem("persist:customerProfilePersistor"),o=r?JSON.parse(r):{},a=o?.customer,i=a?JSON.parse(a):{},s=i?.owningIndividual||{};n=s?.emailNotification||"",t="true"===sessionStorage.getItem("isCustomerLoggedIn");const c=e.querySelector("input[name='email']");t&&n&&c&&(c.value=n,c.setAttribute("readonly",!0))}catch(e){console.error("Error fetching session data:",e)}}}))})),document.querySelectorAll(`.${l}`).forEach((e=>{let t=e;if(t){const e=t.querySelector(`.${l}__text`);t.addEventListener("click",(function(t){(t.clientX>e.getBoundingClientRect().x+e.getBoundingClientRect().width||t.clientX{xe(e)}));const r=t.querySelector(`[class$=${d}]`);r.addEventListener("click",ke),r.addEventListener("blur",(()=>{xe(e)}));const o=t.querySelector("[class$=cmp-form-text__link]");o&&o.addEventListener("click",Ae),Ee(e,e.value.length),e.oninput=function(t){let n=t.target.value.toString();n.startsWith("0")&&n.length>1&&(n=n.substring(1)),e.value=n,Ee(e,n.length)},e.addEventListener("change",(function(t){Ee(e,t.target.value.length)}))}})),document.getElementById("verification-form-submit")?ge=document.getElementById("verification-form-submit"):document.getElementById("port-in-form-submit")?(ge=document.getElementById("port-in-form-submit"),ye=document.querySelector(".cmp-form-text--networkcoveragechecker_input")):document.getElementById("contact-us-forms-submit")&&(ge=document.getElementById("contact-us-forms-submit")),ge&&ge.addEventListener("click",(function(e){!function(){const e=document.getElementById("responseMessageDiv");e&&e.parentNode&&e.parentNode.removeChild(e)}(),q(!0),W(),U(),"verification-form-submit"===ge.getAttribute("id")&&(e.preventDefault(),qe());let t=B.reportValidity();function n(){if(document.querySelectorAll('.cmp-form-text--dropdown-input:not([id$="-hidden"])').forEach((e=>{e.required&&""==e.value&&(t=!1)})),t){function e(e,t){let n,r;const a=t?e:JSON.parse(e.response);if(q(!1),a&&a.code&&B.querySelector("#"+a.code))n=B.querySelector("#"+a.code),r=n.querySelector(".cmp-form-error__text").innerText;else if(a&&a.message){n=B.querySelector(".cmp-form-error:first-of-type");const e=a.message;if(e){n.querySelector(".cmp-form-error__text").innerHTML=e,r=e}}if(!e||t||n||(n=B.querySelector(".cmp-form-error:first-of-type")),n){B.querySelectorAll(".cmp-form-error").forEach((e=>{e.classList.remove("active"),e.removeAttribute("aria-invalid")})),n.classList.contains("active")||n.classList.add("active"),n.setAttribute("aria-invalid","true")}var i=n.querySelector("p");i&&i.scrollIntoView({behavior:"smooth",block:"center"}),(0,o.W9)(B.getAttribute("name"),"failed",r)}function n(t){if(q(!1),t.response&&"null"!=t.response){const n=JSON.parse(t.response);if("success"===n.status||"SUCCESS"===n.Header?.ActivityStatusEnum_T||n.SOATransactionID){O(j,n,B);const e=B.getAttribute("name"),t=JSON.stringify({formName:e,data:n});sessionStorage.setItem("form_tracking_success_data",t);const r=B.querySelector("#"+n.code);r&&(r.classList.remove("active"),r.removeAttribute("aria-invalid","false"));const o=B.querySelector("input[name=':redirect']");o&&window.location.replace(o.value)}else e(t)}else e(t)}function a(){let t=B.querySelector(`[name='${c}']`)?.value;t&&"0"==t[0]&&(t=t.replace("0","44")),fetch("/bin/threedigital/numbercheck?MSISDN="+t).then((e=>{if(!e.ok)throw new Error("Number check failed");return e.json()})).then((t=>{if(t)if("fail"===t.status)e(t,!0);else if("success"===t.status){const e=B.getAttribute("data-msisdn-org-name");if(e){const n=B.querySelector(`[name='${e}']`);n&&(n.value=t.Organization)}s()}})).catch((e=>{console.error("Error:",e),(0,o.W9)(B.getAttribute("name"),"failed",e)}))}const i=(t,r,o)=>{const a=new XMLHttpRequest;a.addEventListener("load",(()=>n(a))),a.addEventListener("error",(()=>e(a))),a.open(r,o),a.setRequestHeader("Content-Type","application/json;charset=UTF-8"),a.send(JSON.stringify(t))},s=()=>{let e={};for(const t of R()){const n=t.name.toString();t.getAttribute(r.V9)?e[n]=t.getAttribute(r.V9):""!==n&&(e.hasOwnProperty(n)?Array.isArray(e[n])?e[n].push(t.value.toString()):e[n]=[e[n],t.value.toString()]:e[n]=t.value.toString())}const t=document?.querySelector(".cmp-fileupload__input");if(t&&t?.files.length>0){const n=t.files;e.files=[];const r=(e,t)=>{const n=new FileReader;n.onload=()=>{const e=n.result&&n.result.includes(",")?{content:n.result.split(",")[1]}:null;e&&t(e)},n.readAsDataURL(e)};let o=0;for(const t of n)r(t,(t=>{e.files.push(t),o++,o===n.length&&j&&i(e,F,j)}))}else j&&i(e,F,j)},c=B.getAttribute("data-msisdn-number-name");c?a():s()}else q(!1)}if(D(),Ce(),function(e){0!==e.length&&e.forEach((e=>{let t=e.querySelectorAll(".cmp-form-options__field--checkbox"),n=Array.from(t).filter((e=>e.hasAttribute("required")));if(0!==t.length){const e=Array.from(t).some((e=>e.checked));0!==n.length&&n.forEach(((t,r)=>{T(n,e,t,r)}))}}))}(A),N(L),function(e){e.forEach((e=>{const t=e.querySelector(".cmp-fileupload__input"),n=e.querySelector(".cmp-fileupload__errorMsg"),r=e.querySelector(".cmp-fileupload__errorMsgText"),o=e.dataset.requiredCheckbox,a=e.dataset.requiredMessage;var i;t&&n&&r&&(o&&0===t.files.length?(i=a,r.innerHTML=i,r.classList.add("cmp-fileupload__error-message"),n.classList.add("cmp-fileupload--visible")):(r.textContent="",n.classList.remove("cmp-fileupload--visible")))}))}(C),t&&E&&k)n();else if(t&&!E)n();else{for(const e of $())G(e);(0,o.W9)(B.getAttribute("name"),"failed","form fields are invalid"),q(!1)}"port-in-form-submit"===ge.getAttribute("id")&&Le(),e.preventDefault()})),ye&&ye.addEventListener("keydown",(function(e){"Enter"===e.key&&(e.preventDefault(),ye.blur())}),!0),window.onHCaptchaVerify=function(e){k=!0,x&&(x.style.display="none")},window.onHCaptchaExpired=function(){k=!1}}},1806:function(){const e=document.querySelectorAll(".cmp-stepcontainer");let t,n=document.querySelector(".cmp-form-error-notification-box-list");e.forEach((e=>{const r=e.querySelector('[data-stepId="step-2"]'),o=e.querySelector('[data-stepId="step-3"]'),a=e.querySelector('[data-stepId="step-1"]'),i=e.querySelectorAll(".cmp-formstep__section"),s=e.querySelectorAll(".cmp-formstep__summaryDetails"),c=s[0]?.querySelector(".cmp-link__link"),l=s[1]?.querySelector(".cmp-link__link"),u=e.querySelectorAll(".cmp-formstep__section"),d=e.getElementsByClassName("cmp-form-options__field--radio"),p=e.getElementsByClassName("cmp-form-options__field--checkbox"),m=':is(input,textarea):not([name=":formstart"]):not([name="_charset_"]):not(.cur-year)',f=u[0].querySelectorAll(m),h=u[1].querySelectorAll(m);e.querySelectorAll(".cmp-form-text--dropdown-input").forEach((e=>{["focusout","input","invalid"].forEach((t=>{e.addEventListener(t,(function(){!function(e){const t=e.parentElement.parentElement.querySelector(".active");""!==e.value?(t?.classList.remove("active"),t?.parentElement.querySelector(".cmp-form-text--dropdown-input").setAttribute("aria-invalid",!1)):(t?.classList.add("active"),t?.parentElement.querySelector(".cmp-form-text--dropdown-input").setAttribute("aria-invalid",!0))}(e)}))}))}));const g=(e,t)=>{const n=t.querySelector(".cmp-linkgroup");t.querySelectorAll(".cmp-formstep__summaryDetails-label, .cmp-formstep__summaryDetails-value").forEach((e=>{e.remove()}));let r=!0,o=!0,a=!0,i=!0;e.forEach((e=>{if(e.classList.contains("cmp-form-text--dropdown-input-hidden"))return;const s=document.createElement("div"),c=document.createElement("div");if(s.classList.add("cmp-formstep__summaryDetails-label"),c.classList.add("cmp-formstep__summaryDetails-value"),e.classList.contains("cmp-form-text--dropdown-input"))s.textContent=e.parentElement.parentElement.querySelector("label")?.innerText,c.textContent=e.value;else if(e.classList.contains("cmp-form-text--date__text"))s.textContent=e.parentElement.parentElement.querySelector("label")?.innerText,c.textContent=v(e.value);else if(e.parentElement.parentElement.classList.contains("cmp-form-range__max")||e.parentElement.parentElement.classList.contains("cmp-form-range__min")){if(o){s.textContent=e.parentElement.parentElement.parentElement.parentElement.querySelector("label")?.innerText;var l=b();c.appendChild(l),o=!1}}else if(e.parentElement.parentElement.classList.contains("cmp-form-dateinput__day")||e.parentElement.parentElement.classList.contains("cmp-form-dateinput__month")||e.parentElement.parentElement.classList.contains("cmp-form-dateinput__year"))r&&""!==e.value&&(s.textContent=e.parentElement.parentElement.parentElement.parentElement.querySelector("label")?.innerText,c.textContent=y(),r=!1);else if(e.classList.contains("cmp-form-dateinput"))s.textContent=e.parentElement.parentElement.parentElement.querySelector("label")?.innerText;else if(e.classList.contains("cmp-form-text--password__text"))s.textContent=e.parentElement.querySelector("label")?.innerText,c.textContent=e.value.replace(/./gi,"•");else if(e.classList.contains("cmp-form-options__field--radio")){if(i){s.textContent=e.parentElement.parentElement.querySelector("legend")?.innerHTML;for(let e=0;e[document.querySelector('[name="dobday"]').value,document.querySelector('[name="dobmonth"]').value,document.querySelector('[name="dobyear"]').value].join("/"),v=e=>{let t=new Date(e),n=""+(t.getMonth()+1),r=""+t.getDate(),o=t.getFullYear();return n.length<2&&(n="0"+n),r.length<2&&(r="0"+r),[r,n,o].join("/")},b=()=>{var e=document.createElement("div"),t=document.createElement("span"),n=document.createElement("span");e.classList.add("rangeDiv"),n.classList.add("cmp-formstep__max_range");const r=document.querySelector(".cmp-form-range__min").querySelector("label").textContent,o=document.querySelector(".cmp-form-range__max").querySelector("label").textContent,a=document.querySelector('[name="minValue"]').value,i=document.querySelector('[name="maxValue"]').value;return t.textContent=r+": "+a,n.textContent=o+": "+i,e.appendChild(t),e.appendChild(n),e},_=e=>{let r=document.querySelector(".cmp-form-error-notification-box"),o=e.querySelectorAll(".cmp-form-text__error"),a=document.querySelector(".cmp-form-dateinput__day .cmp-form-text__error.active"),i=document.querySelector(".cmp-form-dateinput__month .cmp-form-text__error.active"),s=document.querySelector(".cmp-form-dateinput__year .cmp-form-text__error.active"),c=document.querySelector(".postcodelookup");n&&(n.innerHTML="",o&&o.forEach((e=>{if(dropdownInput=e.parentElement.querySelector(".cmp-form-text--dropdown-input"),""!==dropdownInput?.value||e.parentElement.classList.contains("cmp-form-text--hide")?(e.classList.remove("active"),dropdownInput?.setAttribute("aria-invalid",!1)):(e.classList.add("active"),dropdownInput?.setAttribute("aria-invalid",!0)),c&&""===e.parentElement.parentElement.querySelector("[name=location]")?.value&&e.classList.add("active"),e.classList.contains("active")){r&&(r.style.display="block");var o=document.createElement("li"),l=e.parentElement.querySelector("label"),u=e.parentElement.parentElement.querySelector("legend"),d=e.parentElement.querySelector("input");l&&d&&""===d.value?t=document.createTextNode("'"+l.textContent+"' field is required"):l?t=document.createTextNode("'"+l.textContent+"' field is incorrect"):d.checked||(t=document.createTextNode("'"+u.textContent+"' field is required")),e.classList.contains("cmp-form-dateinput__error")?a||i||s||(o&&o.appendChild(t),n&&n.appendChild(o)):(o&&o.appendChild(t),n&&n.appendChild(o),r&&r.scrollIntoView({behavior:"smooth",block:"center"}))}n.hasChildNodes(o)||r&&(r.style.display="none")})))};function S(){document.body.scrollTop=0,document.documentElement.scrollTop=0}r&&r.addEventListener("click",(e=>{e.preventDefault(),f.forEach((e=>{e.reportValidity()})),Array.from(f).some((e=>!0===e.checkValidity()))&&_(u[0]),n.querySelector("li")||(i[0].classList.remove("cmp-formstep__section-active"),i[1].classList.add("cmp-formstep__section-active")),S()})),o&&o.addEventListener("click",(e=>{e.preventDefault(),h.forEach((e=>{e.reportValidity()})),Array.from(h).some((e=>!0===e.checkValidity()))&&_(u[1]),n.querySelector("li")||(i[1].classList.remove("cmp-formstep__section-active"),i[2].classList.add("cmp-formstep__section-active"),g(f,s[0]),g(h,s[1])),S()})),a&&a.addEventListener("click",(e=>{e.preventDefault(),i[1].classList.remove("cmp-formstep__section-active"),i[0].classList.add("cmp-formstep__section-active"),S()})),c&&c.addEventListener("click",(e=>{e.preventDefault(),i[0].classList.add("cmp-formstep__section-active"),i[2].classList.remove("cmp-formstep__section-active"),S()})),l&&l.addEventListener("click",(e=>{e.preventDefault(),i[1].classList.add("cmp-formstep__section-active"),i[2].classList.remove("cmp-formstep__section-active"),S()}))}))},4809:function(){const e=document.querySelectorAll(".cmp-stepform");let t=document.querySelector(".cmp-form-error-notification-box-list");e.forEach((e=>{const n=e.querySelectorAll(".cmp-stepform__section");n.forEach(((e,o)=>{const a=e.querySelectorAll(".cmp-stepform__buttonwrapper .cmp-button"),i=e.querySelectorAll(':is(input,textarea):not([name=":formstart"]):not([name="_charset_"]):not(.cur-year)');2===a.length&&(0!==o&&a[0].addEventListener("click",(e=>{e.preventDefault(),n[o].classList.remove("cmp-stepform__section-active"),n[o-1].classList.add("cmp-stepform__section-active"),r()})),o!==n.length-1&&a[1].addEventListener("click",(e=>{e.preventDefault(),i.forEach((e=>{e.reportValidity()})),Array.from(i).some((e=>!1===e.checkValidity()))||t.querySelector("li")||(n[o].classList.remove("cmp-stepform__section-active"),n[o+1].classList.add("cmp-stepform__section-active")),r()})))}));function r(){document.body.scrollTop=0,document.documentElement.scrollTop=0}e.querySelectorAll(".cmp-form-text--dropdown-input").forEach((e=>{["focusout","input","invalid"].forEach((t=>{e.addEventListener(t,(function(){!function(e){const t=e.parentElement.parentElement.querySelector(".active");""!==e.value?(t?.classList.remove("active"),t?.parentElement.querySelector(".cmp-form-text--dropdown-input").setAttribute("aria-invalid",!1)):(t?.classList.add("active"),t?.parentElement.querySelector(".cmp-form-text--dropdown-input").setAttribute("aria-invalid",!0))}(e)}))}))}))}))},7268:function(){document.querySelectorAll(".cmp-form-text--textarea").forEach((e=>{e.addEventListener("input",(function(){const t=e.querySelector(".cmp-form-text--textarea_count"),n=e.querySelector(".cmp-form-text--textarea__text"),r=e.querySelector(".cmp-form-text--textarea_count"),o=n.value,a=n.maxLength;a>1&&(t.textContent=o.length+" of max "+a+" characters",r.innerHTML=t.textContent)}))}))},3232:function(e,t,n){"use strict";var r=n(8279),o=n(9904),a=n(9880),i=n(506);!function(){window.switchLoginRegisterMyAccountField=()=>{const e=document.getElementsByClassName("cmp-myaccount")[0],t=document.querySelector(".cmp-top-header--login-register"),n=document.querySelector(".cmp-loginregister > .cmp-link"),r=document.getElementsByClassName("cmp-myaccount__dropdown")[0];if(e&&t&&n&&r){const t=window.isCustomerLoggedIn,r=JSON.parse(window.sessionStorage.getItem("isCustomerLoggedIn"));t||r?(n.style.display="none",e.style.display="block"):(e.style.display="none",n.style.display="block")}else console.log("Error: switchLoginRegisterMyAccountField function\n - required components are not in the DOM")};let e=0;const t=t=>{const n=document.querySelector(".header-menu-list-container");if(e++,n&&!n.getAttribute("headerInitialized")){const u=document.querySelector(".cmp-header .hidden-navigation"),d=document.getElementById("menu-toggler"),p=document.querySelector(".menu-mobile"),m=document.querySelector(".header"),f=document.querySelector(".header-container"),h=document.querySelector(".locator_button_header"),g=document.querySelector(".js-yext-submit"),y=document.querySelector(".header-menu-list-container"),v=document.getElementsByClassName("submenu-footer"),b=document.querySelector(".menu-mobile-close"),_=document.getElementsByClassName("accordion"),S=document.querySelector(".cmp-menu-mobile__links"),w=document.querySelectorAll(".cmp-container--top-header .text"),E=document.querySelector(".cmp-myaccount"),x=document.querySelector(".cmp-top-header--login-register"),k=document.querySelector(".cmp-loginregister > .cmp-link"),A=document.querySelector(".cmp-myaccount__dropdown"),L=document.querySelector(".search-form"),C=document.querySelector(".cmp-myaccount .cmp-link__link"),q="true"===document.querySelector("[data-isbusiness]")?.getAttribute("data-isbusiness"),D="true"===document.querySelector("[data-disable-division-toggle]")?.getAttribute("data-disable-division-toggle"),M=document.querySelector(".cmp-link--basket-count");if(u&&d&&p&&m&&h&&y&&v&&b&&S&&w&&x&&k&&E&&A&&L){n.setAttribute("headerInitialized",!0),window.switchLoginRegisterMyAccountField();try{const pe=document.createElement("button");pe.classList.add("cmp-link__link"),pe.innerHTML=C.innerHTML,C.parentNode.replaceChild(pe,C),pe.addEventListener("click",(()=>{A.classList.toggle("cmp-myaccount__dropdown--open")})),document.addEventListener("click",(function(e){e.target.closest(".cmp-myaccount")||A.classList.remove("cmp-myaccount__dropdown--open")}))}catch(me){console.error(me),console.error("Above warning is caused by My account link being invalidated. This invalidation is disabled on SITA, stage and prod environments so it's safe to ignore.")}[...w].forEach((e=>S.innerHTML+=e.innerHTML));const I=document.querySelector(".cmp-menu-mobile__links").children[1];I.children[0].before(I.children[1]);let T=document.querySelectorAll(".cmp-menu-mobile__links .style-selected")[0];T&&(T.parentElement.style.display="none");try{let fe=Array.from(document.querySelectorAll(".cmp-menu-mobile__links li")).slice(0,2).find((e=>!e.firstElementChild.classList.contains("style-selected"))).firstElementChild;if(D){const he=fe.innerHTML.toLowerCase();fe.innerHTML="Switch to "+he,fe.title="Switch to "+he}else fe.style.display="none"}catch(ge){console.error(ge),console.error("Above warning is caused by one of the personal or business links being invalidated. This invalidation is disabled on SITA, stage and prod environments so it's safe to ignore.")}const P=e=>{const t=window.sessionStorage.getItem("basketHeaderCount"),n=t?Number(t):0;n?(e.style.opacity="1",e.previousElementSibling.style.marginLeft="40px"):(e.style.opacity="0",e.previousElementSibling.style.marginLeft="25px"),e.innerHTML=n};function N(){setInterval((function(){P(M)}),1e3)}N();const O=f.getAttribute("data-videoUrlMobile"),B=f.getAttribute("data-imageUrlMobile"),H=f.getAttribute("data-videoUrlDesktop"),F=f.getAttribute("data-imageUrlDesktop"),j=f.getAttribute("data-fallbackMobileImageUrl"),$=f.getAttribute("data-fallbackDesktopImageUrl"),R=f.getAttribute("data-layout"),V="linear-gradient(#FF8474, #FFABA9)",W=f.getAttribute("data-alttext"),U=f.getAttribute("data-alttextfallback"),Y=(0,o.S)(f,j,$,d);"gradient"===R?Y.renderGradient(V):"borealisstatic"===R?Y.renderImage(F,B,W):"borealisanimated"===R&&Y.renderVideo(H,O,U);const z=u.querySelector(".hidden-navigation-container");z.addEventListener("click",(function(){u.style.display="none"})),document.addEventListener("keydown",(function(e){"Tab"===e.key&&e.shiftKey&&(u.style.display="flex")})),z.addEventListener("focus",(function(){u.classList.add("hidden-navigation--focus")})),z.addEventListener("focusout",(function(){u.classList.remove("hidden-navigation--focus")}));let G=0;document.addEventListener("keydown",(function(e){"Tab"===e.key&&document.activeElement===z&&(e.shiftKey||2===G||(e.preventDefault(),z.children[G].classList.add("hidden-nav__link--hidden"),G++,z.children[G].classList.remove("hidden-nav__link--hidden")),e.shiftKey&&0!==G&&(e.preventDefault(),z.children[G].classList.add("hidden-nav__link--hidden"),G--,z.children[G].classList.remove("hidden-nav__link--hidden")))})),z.addEventListener("click",(function(){z.children[G].click()})),z.addEventListener("keydown",(function(e){"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),z.children[G].click())})),document.getElementById("hidden-nav-skip-to-search").addEventListener("click",(function(e){e.preventDefault(),document.querySelector("#yxt-SearchBar-input--search-bar").focus()})),document.getElementById("hidden-nav-skip-to-content").addEventListener("click",(function(e){e.preventDefault(),document.querySelector("main").scrollIntoView({behavior:"smooth"})})),document.getElementById("hidden-nav-skip-to-footer").addEventListener("click",(function(e){e.preventDefault(),document.querySelector("footer").scrollIntoView({behavior:"smooth"})}));const J=()=>{[...document.getElementsByClassName("accordion-header")].forEach((e=>{e.classList.remove("active")})),document.querySelectorAll(".menu-mobile > .panel").forEach((e=>{e.style.display="none"}))},K=()=>{d.classList.remove("open"),p.classList.remove("menu-mobile-active"),J()},Z=()=>{d.classList.contains("open")?K():(d.classList.add("open"),p.classList.add("menu-mobile-active"),oe())},X=e=>{if(window.innerWidth<900){let t=e.currentTarget.parentNode.firstChild;for(;t;){if(t!==e.currentTarget&&t.nodeType===Node.ELEMENT_NODE){t.classList.remove("active");let e=t.nextElementSibling||t.nextSibling;e.classList&&e.classList.contains("panel")&&(e.style.display="none")}t=t.nextElementSibling||t.nextSibling}}else{let t=document.getElementsByClassName("header-menu-list-container")[0].getBoundingClientRect(),n=e.currentTarget.getElementsByClassName("submenu-container");if(n.length>0){let r=n[0].style.left;if(!r&&r!==t.left){let e=t.left;n[0].style.left="-"+e+"px"}n[0].classList.add("submenu-container-visible"),n[0].addEventListener("mouseenter",(function(){y.classList.add("disable-hover")})),n[0].addEventListener("mouseleave",(function(){y.classList.remove("disable-hover")})),e.currentTarget.classList.add("border-selected");let o=e.currentTarget.parentNode.firstChild;for(;o;)o!==e.currentTarget&&o.nodeType===Node.ELEMENT_NODE&&(o.getElementsByClassName("submenu-container")[0].classList.remove("submenu-container-visible"),o.classList.remove("border-selected")),o=o.nextElementSibling||o.nextSibling}}e.stopPropagation()},Q=(e,t)=>{const n=t||e.target;n.closest(".submenu-container").classList.remove("submenu-container-visible"),n.closest("li.border-selected").classList.remove("border-selected"),e.stopPropagation()},ee=e=>e.match(/\d+/),te=e=>{const t=[];let n=0;e&&Array.from(e.children).forEach((r=>{const o=getComputedStyle(r).height,a=getComputedStyle(r).marginBottom,i=getComputedStyle(e).gap;if(o.endsWith("px")){const e=Number(ee(o))+Number(ee(a))+Number(ee(i));t.push(e),n+=e}}));let r=0;for(const e of t)if(r+=e,r>n/2)break;return r},ne=()=>{document.querySelectorAll(".panel").forEach((e=>{if("none"!==getComputedStyle(e).display&&getComputedStyle(e).display){const t=e.querySelector(".menu-mobile-navlist-container"),n=te(t);t.style.maxHeight=`${n}px`}}))},re=e=>{document.querySelectorAll(".panel").forEach((t=>{if("none"!==getComputedStyle(t).display&&getComputedStyle(t).display){const n=t.querySelector(".menu-mobile-navlist-container");getComputedStyle(n).maxHeight&&(n.style.maxHeight=e)}}))},oe=()=>{window.innerWidth<=899&&window.innerWidth>640?re(""):window.innerWidth<=640&&window.innerWidth>460?ne():window.innerWidth<=460&&re("none")};window.addEventListener("resize",(function(){if(window.innerWidth>899){[...y.children].forEach((e=>e.classList.remove("expanded-accordion"))),m.classList.remove("openedHeader"),d.classList.remove("open"),p.classList.remove("menu-mobile-active");let e=document.getElementsByClassName("header-menu-list-container")[0].getBoundingClientRect();if((document.getElementsByClassName("submenu-container-visible")[0]?document.getElementsByClassName("submenu-container-visible")[0].style.left:"")!==e.left+"px"){let t=e.left;document.getElementsByClassName("submenu-container-visible")[0]&&(document.getElementsByClassName("submenu-container-visible")[0].style.left="-"+t+"px")}}else oe()}),!0),[...y.children].forEach((e=>{e.addEventListener("click",(n=>{n.stopPropagation();const r="A"===n.target.tagName,o="LI"===n.target.tagName&&n.target.parentNode.classList.contains("header-menu-list-container"),a="DIV"===n.target.tagName&&n.target.parentNode.parentNode.classList.contains("header-menu-list-container");if(r||o||a){e.classList.contains("border-selected")&&!n.ctrlKey?(e.classList.remove("border-selected"),e.querySelector(".submenu-container-visible").classList.remove("submenu-container-visible")):X(n)}t()}));const t=()=>{let e=[[0,0,1,2,2,3,3],[0,1,2],[0,1,2,3],[0,1,2,3]];q&&(e=[[0,1,2,3],[0,1,2],[0,1,2,3],[0,1,2,3]]);var t=window.location.pathname;"/content/threedigital/uk/en/support/roaming-and-calling-abroad/roaming-abroad.html"!==t&&"/support/roaming-and-calling-abroad/roaming-abroad"!==t||(e=[[0,0,1,2,2,3,3],[0,1,2],[0,1,2,3],[0,1,2,3]]),Array.from(document.getElementsByClassName("submenu-container")).forEach(((t,o)=>{if(t.classList.contains("submenu-container-visible")){const a=t.querySelector(".submenu-navlist");if(!a)return;if(!Array.from(a.children)[0].classList.contains("submenu-navlist-column-0")){const t=n(a,4),i=Array.from(a.getElementsByClassName("submenu-navlist-item"));"object"==typeof e[o]?r(i,t,e[o]):r(i,t,[0,1,2,3])}}}))},n=(e,t)=>{const n=[];for(let r=0;r{e.forEach(((e,r)=>{"number"==typeof n[r]?t[n[r]].appendChild(e):t[3].appendChild(e)}))};e.addEventListener("keydown",(t=>{if("Enter"===t.key||"Space"===t.code)if(t.stopPropagation(),t.preventDefault(),e.classList.contains("border-selected")){const n=e.querySelector(".submenu-footer-close");Q(t,n)}else X(t);else if("Escape"===t.key&&e.classList.contains("border-selected")){const n=e.querySelector(".submenu-footer-close");Q(t,n)}}))})),document.addEventListener("click",(function(e){if(window.innerWidth>899){const t=document.querySelector(".submenu-container-visible");if(t){if(!e.target.closest(".submenu-container-visible")){t.closest(".border-selected").classList.remove("border-selected"),t.classList.remove("submenu-container-visible")}}}})),document.addEventListener("click",(function(e){if(window.innerWidth<900){if(document.querySelector(".menu-mobile-active")){e.target.closest(".menu-mobile-active")||e.target.closest(".menu-toggler")||(K(),e.stopPropagation())}}})),[..._].forEach((e=>e.addEventListener("click",(e=>{X(e)})))),[...v].forEach((e=>e.addEventListener("click",(e=>{Q(e)})))),h&&g&&h.addEventListener("click",(()=>g.click())),d.addEventListener("click",(()=>Z())),b.addEventListener("click",(()=>Z()));var a,s=document.getElementsByClassName("accordion-header");for(a=0;ae.addEventListener("click",(function(){localStorage.setItem("megaMenuClicked",!0),localStorage.setItem("megaMenuItem",e.childNodes[0].data)})))),[...l].forEach((e=>e.addEventListener("click",(function(){localStorage.setItem("megaMenuClicked",!0),localStorage.setItem("megaMenuItem",e.childNodes[0].data)}))));let ae=document.querySelector("header .search-form").getAttribute("data-personalredirecturl"),ie=document.querySelector("header .search-form").getAttribute("data-businessredirecturl");function se(){const e=document.querySelector(".locator_button_header");e&&e.addEventListener("click",(function(){const e=document.querySelector(".js-yext-submit.yxt-SearchBar-button");e&&e.click()}))}const ce=()=>{(0,r.fs)("https://assets.sitescdn.net/answers-search-bar/v1.2/answers.min.js",!0,(()=>{const e=document.querySelector(".menu-container .yxt-SearchBar");e&&e.remove(),q?ANSWERS.init({apiKey:"46281e259fc6522cc15ea1a0011c21a9",experienceKey:"threeconfigbusiness",experienceVersion:"PRODUCTION",locale:"en_GB",businessId:"1970093",templateBundle:TemplateBundle.default,onReady:function(){ANSWERS.addComponent("SearchBar",{container:".search-form",name:"search-bar",redirectUrl:ie,placeholderText:"Search Three Business"})}}):ANSWERS.init({apiKey:"46281e259fc6522cc15ea1a0011c21a9",experienceKey:"threeconfig",experienceVersion:"PRODUCTION",locale:"en_GB",businessId:"1970093",templateBundle:TemplateBundle.default,onReady:function(){ANSWERS.addComponent("SearchBar",{container:".search-form",name:"search-bar",redirectUrl:ae,placeholderText:"Search three.co.uk"})}}),se()}))};(0,r.fs)("https://assets.sitescdn.net/answers-search-bar/v1.2/answerstemplates.compiled.min.js",!0,ce);const le=document.querySelector(".yxt-SearchBar-container"),ue=document.querySelector(".yxt-SearchBar-input"),de=e=>{e&&!le.classList.contains("yxt-SearchBar-container--highlighted")?le.classList.add("yxt-SearchBar-container--highlighted"):e||le.classList.remove("yxt-SearchBar-container--highlighted")};ue&&(ue.addEventListener("focus",(function(){de(!0)})),ue.addEventListener("blur",(function(){de(!1)})));if(window.location.href==="https://devicesupport.three.co.uk/"){const ye=document.getElementsByClassName("locator_search_icon_background");if(ye&&ye.length>0){const be=document.createElement("div");be.className="device_support_search_icon",ye[0].appendChild(be)}const ve=document.querySelector(".cmp-top-header--logo .cmp-image__image");ve&&ve.classList.add("device-logo")}!function(){const e=()=>{!function(){const e=document.querySelector(".banner-phone-number-container");if(!e)return;let t={},n={};try{const r=e.dataset.internalPages,o=e.dataset.externalPages,a=JSON.parse(r||"[]"),i=JSON.parse(o||"[]");t=Object.assign({},...a),n=Object.assign({},...i)}catch(e){return void console.error("Error parsing phone number data attributes:",e)}const r=(0,i.tC)('meta[name="wcmMode"]'),o=null!=r&&""!==r,a=o&&("EDIT"===r||"PREVIEW"===r||"DISABLED"===r);let s=window.location.pathname.replace(/\.html$/,"").split("?")[0].split("#")[0];const c=o?a?s:s.replace("/content/threedigital/uk/en",""):s;let l=null;if(t.hasOwnProperty(c))l=t[c];else for(const[e,t]of Object.entries(n))if(c.startsWith(e)){l=t;break}if(l){const t=e.querySelector(".banner-phone-number-container--link"),n=e.querySelector(".banner-phone-number-container--number");t&&n&&(t.href=`tel:${l}`,t.setAttribute("aria-label",`Call us at ${l}`),n.textContent=l,e.classList.remove("threedigital-hide"))}else e.classList.add("threedigital-hide")}()},t=t=>{const n=history[t];history[t]=function(...t){const r=n.apply(this,t);return e(),r}};t("pushState"),t("replaceState"),window.addEventListener("popstate",e),e()}(),clearInterval(t)}}e>30&&clearInterval(t)};t();const n=setInterval((()=>t(n)),150)}(),document.querySelectorAll(".header").forEach((e=>{e.hasChildNodes()&&(0,a.lg)(e,"header",a.fS);const t=(e,t,n)=>{e.forEach((e=>{(0,a.s0)(e,t,n(e))}))};document.querySelectorAll(".menu-list-container, .accordion-header").forEach((e=>{(0,a.s0)(e,e.classList.contains("menu-list-container")?"textlink":"button",e.querySelector("button")?.textContent||e.querySelector("a")?.textContent||a.u3)})),document.querySelectorAll(".menu-container").forEach((e=>{(0,a.lg)(e,e.querySelector(".menu-toogler-text")?.textContent.toLowerCase(),""),(0,a.s0)(e,"textlink","")})),t(document.querySelectorAll(".cmp-top-header--logo img"),"logo",(e=>e?.getAttribute("alt")||"")),t(document.querySelectorAll(".cmp-text li"),"textlink",(e=>e.querySelector("a")?.getAttribute("title")||"")),t(document.querySelectorAll(".basketLink a"),"textlink",(e=>e.querySelector(".cmp-link__wrapper span")?.innerText||"")),t(document.querySelectorAll(".locator_button_header"),"button",(e=>e.querySelector("a")?.getAttribute("title")||"")),document.querySelectorAll(".locator_button_header").forEach((e=>{(0,a.s0)(e,"button",a.u3)})),document.querySelectorAll(".cmp-loginregister").forEach((e=>{var t=e.querySelector(".cmp-link__text-wrap span"),n=e.querySelector(".cmp-link__link");(0,a.s0)(n,"textlink",t?.textContent||"")})),document.querySelectorAll(".menu-list-container, .menu-container").forEach((e=>{var t=e.querySelector(".menu-list-main-link")?.textContent.trim().toLowerCase(),n=e.querySelector(".submenu-footer-close, .menu-mobile-close")?.textContent.trim().toLowerCase(),r=e.querySelectorAll(".submenu-container-toplink, .menu-mobile-top-link"),o=e.querySelectorAll(".menu-list-main-link ,.accordion-header__button"),i=Array.from(o).map((e=>e?.textContent.trim().toLowerCase()));r.forEach(((e,t)=>{var n=e.querySelector("div, a");(0,a.s0)(e,"textlink",i[t]+":"+n?.textContent||"")})),(0,a.s0)(e.querySelector(".submenu-footer-close"),"button",t+":"+n);let s=document.querySelector(".menu-mobile-close");s&&(0,a.s0)(s,"button",n),e.querySelectorAll(".submenu-container , .menu-mobile-navlist-container").forEach(((e,t)=>{var n=i[t];e.querySelectorAll(".submenu-navlist-item,.menu-mobile-navlist").forEach((e=>{var t=e.querySelector(".header-menu-section-header, .menu-sublist-mainlink")?.textContent;e.querySelectorAll(".menu-sublist a").forEach((e=>{var r=n+":"+t+":"+e?.textContent.trim();(0,a.s0)(e,"textlink",r)}))}))}))}))})),function(){try{let e=window.location.href.replace(/\?(?=[^?]*\?)/g,"&"),t=new URL(e);const n=new URLSearchParams(t.search);if(n.has("awc")){let e=n.get("awc");if(e){let t=window.location.hostname,n=t.startsWith("www.")?t.substring(4):t,r=`/bin/threedigital/awc?${`awc=${encodeURIComponent(e)}&domain=${encodeURIComponent(n)}`}`;fetch(r,{method:"GET",headers:{Accept:"application/json"}}).then((e=>{if(!e.ok)throw new Error(`HTTP error! Status: ${e.status}`);return e.json()})).then((e=>console.log(""))).catch((e=>console.error("Error fetching API:",e)))}}}catch(e){console.error("Error processing AWIN cookie:",e)}}()},5039:function(){document.querySelectorAll(".cmp-indication").forEach((e=>{const t=e.getAttribute("data-wcmmode");"EDIT"===t||"PREVIEW"===t||function(e){const t=e.querySelector(".cmp-indication-modal_dialogue-container-main");t&&t.classList.add("disabled-blur-editmode")}(e),e.querySelectorAll(".cmp-indication__button[action-dismiss]").forEach((t=>{t.addEventListener("click",(()=>{["information","success","error"].forEach((e=>{const n=t.closest(`.cmp-indication--${e}`);n&&(n.style.display="none")}))}));const n=e=>e.match(/\d+/),r=()=>{e.querySelectorAll(".cmp-indication__main-message").forEach((e=>{const t=e.querySelector(".cmp-indication__icon"),r=e.querySelector(".cmp-indication__headline");if(t&&r){let e=getComputedStyle(r).lineHeight,o=getComputedStyle(t).height;if(e.endsWith("px")&&o.endsWith("px")&&o{r.style.display="none"}),3e3)})),a&&a.addEventListener("click",(function(e){e.preventDefault(),n.style.display="none",r.style.display="none",i&&(i.style.display="block")}))}))}))},3504:function(e,t,n){"use strict";var r,o=n(3729),a=document.querySelectorAll(".cmp-containersecondary2"),i='a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, details, *[contenteditable], [tabindex]:not([tabindex="-1"])';const s=document.querySelectorAll(".cmp-lightbox"),c=document.querySelector("body");function l(e){return[...e.querySelectorAll(i)].filter((e=>!e.hasAttribute("disabled")&&!e.getAttribute("aria-hidden")))}function u(e,t){const n=document.querySelector("#genesys-messenger");n&&(n.style.display="block"),0!==a.length&&a.forEach((e=>{e.style.containerType="inline-size"})),e.style.display="none",e.setAttribute("aria-hidden","true"),c.style.overflow="",e.removeEventListener("scroll",p),t&&t.focus(),o._G&&o._G.push({event:"modal_dismiss",component:{title:d(e)}})}function d(e){const t=["h1","h2","h3","h4","p"];for(let n=0;n]+)>)/gi,"")}return"no_heading"}function p(e){const t=e.querySelector(".cmp-lightbox__close-button");modal.scrollTop>0?t.classList.add("cmp-lightbox__shadow"):t.classList.remove("cmp-lightbox__shadow")}function m(e,t,n){(n||0===t.screenX&&0===t.screenY)&&function(e){const t=l(e);t[0].focus()}(e)}s.forEach((e=>{const t=e.querySelector(".cmp-lightbox__overlay"),n=!!document.querySelector('[data-wcmmode="EDIT"]'),i=e.querySelector("[data-lightbox-start]"),s=e.querySelector(".cmp-lightbox"),f=e.getAttribute("data-open-type"),h=e.getAttribute("data-elements-id"),g=e.getAttribute("data-delay-seconds"),y=e.getAttribute("data-automatic-variant"),v=e.getAttribute("data-repetition"),b=e.getAttribute("data-repetition-days"),_=e.getAttribute("data-logged-in-user"),S=e.getAttribute("id"),w="lightboxFirstVisitTimestamp",E=`${S}-${w}`,x="lightboxOpened",k=`${S}-${x}`;const A=()=>{const e=window.isCustomerLoggedIn,t=JSON.parse(window.sessionStorage.getItem("isCustomerLoggedIn")),n=e||t;return!("loggedIn"===_&&!n)&&(("nonLoggedIn"!==_||!n)&&void 0)},L=()=>{if("none"===t.parentElement.style.display)return!1},C=()=>{if("once"===v)return!localStorage.getItem(k);if("xdays"===v){const e=parseInt(localStorage.getItem(k),10);if(!e)return!0;const t=Date.now();return Math.floor((t-e)/864e5)>=b}};function q(e,t,n=!1){const i=document.querySelector("#genesys-messenger");i&&(i.style.display="none"),0!==a.length&&a.forEach((e=>{e.style.containerType="normal"})),c.style.overflow="hidden",e.style.display="grid",e.setAttribute("aria-hidden","false"),r=document.activeElement,"once"!==v&&"xdays"!==v||localStorage.setItem(k,Date.now()),m(e,t,n),o._G&&o._G.push({event:"modal_launch",component:{title:d(e)}})}t&&!n&&(function(e,t,n){"selfbutton"===e&&t.addEventListener("click",(function(e){q(n,e)}))}(f,i,t),function(e,t,n){if("idbutton"===e&&t&&!1!==A()&&!1!==L()){const e=t?.split(",").map((e=>"#"+e));document.querySelectorAll(e).forEach((e=>{e.addEventListener("click",(function(e){q(n,e,!0)})),e.addEventListener("keydown",(function(e){"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),q(n,e,!0))}))}))}}(f,h,t),function(e,t,n,r){if("automatic"===e&&t&&!1!==A()&&!1!==L()&&!1!==C()&&("page"===n&&setTimeout((()=>{q(r,{screenX:0,screenY:0})}),1e3*t),"site"===n)){!function(e){const t=Object.keys(localStorage).map((e=>({key:e,value:localStorage.getItem(e)}))).filter((t=>e.some((e=>t.key.includes(e)))));t.length>200&&t.forEach((e=>{localStorage.removeItem(e.key)}))}([w,x]),localStorage.getItem(E)||localStorage.setItem(E,Date.now());const e=parseInt(localStorage.getItem(E),10),n=Date.now(),o=Math.floor((n-e)/1e3);setTimeout((()=>{"visible"===document.visibilityState&&localStorage.getItem(E)?(q(r,{screenX:0,screenY:0}),localStorage.removeItem(E)):window.addEventListener("visibilitychange",(function(){"visible"===document.visibilityState&&localStorage.getItem(E)&&(q(r,{screenX:0,screenY:0}),localStorage.removeItem(E))}))}),1e3*(t-o))}}(f,g,y,t),function(e){window.addEventListener("click",(t=>{t.target===e&&u(e,r)}))}(t),function(){let n=[];if(s){const t=Array.from(s.querySelectorAll("[data-lightbox-close]"));n=Array.from(e.querySelectorAll("[data-lightbox-close]")).filter((e=>!t.includes(e)))}else n=e.querySelectorAll("[data-lightbox-close]");n.forEach((e=>e.addEventListener("click",(function(){u(t,r)}))))}(),t.addEventListener("keydown",(function(e){!function(e,t){if(9==t.which){const n=l(e),r=document.activeElement,o=n.length,a=n.indexOf(r);t.shiftKey?0==a&&(n[o-1].focus(),t.preventDefault()):a==o-1&&(n[0].focus(),t.preventDefault())}}(this,e),function(e,t){27==t.which&&(e.querySelector("[data-lightbox-close]").click(),t.preventDefault())}(this,e)})),t.addEventListener("scroll",(function(){p(e)})),function(e){const t=e.querySelector("h1,h2,h3,h4,h5,h6");t&&(t.id=t.id||"cmp-lightbox__first-heading",e.setAttribute("aria-labelledby",t.id))}(t),function(){if(t.closest(".cmp-tabs2")){const e=document.querySelector("body"),n=document.createElement("div");n.classList.add("cmp-lightbox"),e.appendChild(n),n.insertBefore(t,n.firstChild)}}())}))},6267:function(){document.addEventListener("DOMContentLoaded",(function(){const e=document.querySelectorAll(".cmp-linkgroup");document.querySelectorAll(".cmp-linkgroup__item").forEach((e=>{const t=e.querySelector(".cmp-experiencefragment");if(t){const n=t.querySelector(".cmp-container").querySelector(".aem-Grid").querySelector(".cmp-link.cmp-link--footnotelink");n&&e.appendChild(n),t.remove()}})),e.forEach((e=>{const t="footnotelink"===e.getAttribute("data-linkgrouptype");e.querySelectorAll(".cmp-link.cmp-link--footnotelink").forEach(((e,n)=>{!function(e,t,n){const r=e.querySelector(".cmp-link__wrapper");if(!r)return;const o=r.firstElementChild;if(!o||"SPAN"!==o.tagName){const e=document.createElement("span");e.classList.add("cmp-link__links-count"),e.textContent=n?t+1+". ":"0",o?r.insertBefore(e,o):r.appendChild(e)}}(e,n,t)}))}))}))},8104:function(e,t,n){"use strict";var r=n(3729);const o=document.querySelector("#business_broadband_coverage_checker");if(o){const a=document.querySelector(".cmp-form-text--location-input"),i=document.querySelector(".cmp-form-location__search-button"),s=document.querySelectorAll(".cmp-containersecondary--hidden"),c=document.querySelector(".cmp-containersecondary-post-code"),l=o.getAttribute("data-api-error-Msg"),u=document.querySelector(".cmp-locationbusiness__overlay"),d=a.hasAttribute("required"),p=o.getAttribute("data-input-required-message"),m=o.getAttribute("data-input-errorMessageEmptySubmission"),f=document.getElementById("form-text-17513001801-error"),h=o.querySelector(".cmp-form-text__error"),g="business_broadband_coverage_checker";function y(){a&&a.value.length>0?(i.classList.add("active"),h&&h.classList.contains("active")&&h.classList.remove("active"),a.hasAttribute("aria-invalid")&&a.removeAttribute("aria-invalid")):i.classList.remove("active")}function v(e){e.preventDefault();const t=document.getElementById("udprn"),n=t?t.value:"";if(!a||""===a.value.trim()){return b(m||""),void(0,r.W9)(g,"failed","Form submission attempted with empty input")}const o="/libs/granite/csrf/token.json",i="/bin/threedigital/broadband/hbbcoveragechecker";_(),fetch(o).then((e=>{if(!e.ok)throw new Error("Failed to fetch CSRF token");return e.json()})).then((e=>fetch(i,{method:"POST",headers:{"Content-type":"application/json; charset=UTF-8","Access-Control-Allow-Methods":"POST","Access-Control-Allow-Headers":"Content-Type","CSRF-Token":e.token},body:JSON.stringify({udprn:n})}))).then((e=>{if(!e.ok)throw new Error("Network response for geolocation API errored");return e.json()})).then((e=>{if(a.value="",s.forEach((e=>{e.classList.add("cmp-containersecondary--hidden")})),e?.Payload){const t=e?.Payload?.Coveragestatus?.[0];if(t){const e={is4gAvailable:t.fourgavailability??!1,is5gIndoorAvailable:t.fivegindooravailability??!1,is5gOutdoorAvailable:t.fivegoutdooravailability??!1};c.style.display="none",function(e,t,n,o,a){let i="",s=-1;n?(i="5G Indoor broadband available",s=1):t?(i="4G broadband available",s=2):o?(i="5G Outdoor broadband available",s=0):(i="No coverage available",s=3);e[s].classList.remove("cmp-containersecondary--hidden"),(0,r.W9)(a,"success",i)}(s,e.is4gAvailable,e.is5gIndoorAvailable,e.is5gOutdoorAvailable,g)}}})).catch((e=>{b(l),document.querySelector(".cmp-form-text--location-input").setAttribute("api-failed",e?.message),(0,r.W9)(g,"failed",e?.message)}))}function b(e){f.textContent=e,o.querySelector(".cmp-form-text__error").classList.add("active")}function _(){f.textContent="",f.classList.remove("active")}function S(){a.addEventListener("focusout",(()=>{if(_(),""===a.value.trim()){const e=p||"";b(e);const t={form_field_validation_status:"failed",form_field_validation_message:e,form_name:g,event_trigger:"blur"};(0,r.E0)(t)}}))}d&&S(),a&&a.addEventListener("input",y),i&&i.addEventListener("click",v);const w=new MutationObserver((e=>{e.forEach((e=>{"attributes"===e.type&&"role"===e.attributeName&&"combobox"===e.target.getAttribute("role")&&(u&&(u.style.display="none",u.parentElement.inert=!1),w.disconnect())}))})),E=document.getElementById("form-text-17513001801");E&&w.observe(E,{attributes:!0,attributeFilter:["role"]})}},7662:function(){let e=document.querySelector(".cmp-form-text--location-input"),t=document.querySelector(".cmp-form-location__search-button");e&&e.addEventListener("input",(function(){e&&e.value.length>0?t.classList.add("active"):t.classList.remove("active")}))},5374:function(e,t,n){"use strict";var r=n(8279);const o=document.querySelector(".cmp-maps"),a=document.querySelectorAll(".cmp-maps__container"),i=document.getElementById("cmp-maps__mapId")?.getAttribute("data-google-apikey");o&&(window.initMap=function(){a.forEach((e=>{const t=Number(e.getAttribute("data-zoom")),n=e.getAttribute("data-mapId"),r=Number(e.getAttribute("data-lat")),o=Number(e.getAttribute("data-initial-radius")),a=Number(e.getAttribute("data-long")),i=JSON.parse(e.getAttribute("data-map-type-control")),s=e.getAttribute("data-map-type-control-position"),c=JSON.parse(e.getAttribute("data-zoom-control")),l=e.getAttribute("data-zoom-control-position"),u=Number(e.getAttribute("data-zoom-max")),d=JSON.parse(e.getAttribute("data-street-view-control")),p=e.getAttribute("data-street-view-control-position"),m=JSON.parse(e.getAttribute("data-full-screen-control")),f=JSON.parse(e.getAttribute("data-scale-control"));window.threeGoogleMap=new google.maps.Map(e,{center:{lat:r,lng:a},zoom:t,mapId:n,scaleControl:f,initialRadius:o,streetViewControl:d,fullscreenControl:m,zoomControl:c,maxZoom:u,mapTypeControl:i,mapTypeControlOptions:{position:google.maps.ControlPosition[s]},streetViewControlOptions:{position:google.maps.ControlPosition[p]},zoomControlOptions:{position:google.maps.ControlPosition[l]}})}))},(0,r.fs)(`https://maps.googleapis.com/maps/api/js?key=${i}&callback=initMap&v=weekly`,!0))},280:function(e,t,n){"use strict";var r=n(1626),o=n(3729);window.fieldValidationDataLayer=window.fieldValidationDataLayer||{};document.querySelectorAll(".networkstatuschecker").forEach((e=>{const t=e.querySelectorAll(".cmp-networkcoveragechecker__response"),n=e.querySelector(".cmp-networkcoveragechecker")?.getAttribute("data-google-apikey");(0,r.Z)(e,"STATUSCHECKER",(e=>{t.forEach((e=>{e.classList.contains("threedigital-hide")||e.classList.add("threedigital-hide")}));const n=Array.from(t).find((t=>t.getAttribute("data-result-category")===e.nsc.issue.category));n?.classList.remove("threedigital-hide")}),n)})),document.addEventListener("DOMContentLoaded",(function(){const e=document.getElementById("network_status_checker");if(e){fieldValidationDataLayer.form_name=e.getAttribute("name");const t=e.getAttribute("method"),n=e.getAttribute("action"),r=()=>Array.from(e.elements).filter((e=>"BUTTON"!==e.nodeName&&(e.classList.contains("cmp-form-text__text")||e.classList.contains("cmp-form-text--textarea__text")||e.classList.contains("cmp-form-options__field--checkbox")||e.classList.contains("cmp-form-options__field--radio")||e.classList.contains("active")||e.id===DATE_PICKER_ID))),a=[];function i(e){a.includes(e)||a.push(e)}for(const b of r())b.addEventListener("invalid",(function(e){fieldValidationDataLayer.event_trigger="invalid",fieldValidationDataLayer.form_field_name=b.getAttribute("name"),"checkbox"!==b.getAttribute("type")&&"radio"!==b.getAttribute("type")&&s(b),e.preventDefault()})),b.addEventListener("blur",(function(){fieldValidationDataLayer.event_trigger="blur",fieldValidationDataLayer.form_field_name=b.getAttribute("name"),b.classList.contains("cmp-form-text--dropdown-input")&&(fieldValidationDataLayer.form_field_name=b.nextElementSibling.getAttribute("name")),"checkbox"!==b.getAttribute("type")&&"radio"!==b.getAttribute("type")&&s(b),i(b)})),b.addEventListener("input",(function(){fieldValidationDataLayer.event_trigger="input",fieldValidationDataLayer.form_field_name=b.getAttribute("name"),a.includes(b)&&s(b)}));function s(e){e.setCustomValidity(""),e.validity.valid||e.classList.contains("cmp-form-text--dropdown-input")&&0!==e.value.length?l(e):c(e)}function c(e){p(e),u(e,!0),e.setAttribute("aria-invalid","true"),e.parentElement.classList.add("afterelement-error"),fieldValidationDataLayer.form_field_validation_status="failed",(0,o.E0)(fieldValidationDataLayer)}function l(e){const t=d(e);if(t){t.textContent="",u(e,!1),e.removeAttribute("aria-invalid","false"),e.parentElement.classList.remove("afterelement-error");const n=document.getElementById(e.id).parentElement.parentElement.querySelector(".cmp-form-text__error");n&&n.classList.remove("active"),fieldValidationDataLayer.form_field_validation_status="success",(0,o.E0)(fieldValidationDataLayer)}}function u(e,t){t&&d(e)&&!d(e).parentElement.classList.contains("active")&&d(e).parentElement.classList.add("active")}function d(e){const t=e.getAttribute("aria-describedby");if(!t)return null;const n=t.split(" ").find((e=>e.endsWith("-error")));return document.getElementById(n)}function p(e){let t;e.parentElement.querySelector(".cmp-form-text__error");t=document.querySelector(`#${e.id}-error`),t.parentElement.classList.add("active"),t&&(e.validity.valueMissing?t.textContent=m(e,"data-cmp-required-message"):e.validity.patternMismatch||e.validity.rangeUnderflow||e.validity.rangeOverflow?t.textContent=m(e,"data-cmp-constraint-message"):e.validity.valid||(t=document.querySelector(`#${e.id}-error`),t.textContent=e.validationMessage)),fieldValidationDataLayer.form_field_validation_message=t.textContent}function m(e,t){return document.getElementById(e.id).parentElement.getAttribute(t)}let f,h;document.getElementById("verification-form-submit")?f=document.getElementById("verification-form-submit"):document.querySelector("#network_status_checker #port-in-form-submit")?(f=document.querySelector("#network_status_checker #port-in-form-submit"),h=document.querySelector("#network_status_checker .cmp-form-text--networkcoveragechecker_input")):document.getElementById("contact-us-forms-submit")&&(f=document.getElementById("contact-us-forms-submit")),f&&f.addEventListener("click",(function(a){g();let s=e.reportValidity();if(s)!function(){if(s){function r(t,n){let r,a;const i=n?t:JSON.parse(t.response);if(disablePortInSubmit(!1),i&&i.code&&e.querySelector("#"+i.code))r=e.querySelector("#"+i.code),a=r.querySelector(".cmp-form-error__text").innerText;else if(i&&i.message){r=e.querySelector(".cmp-form-error:first-of-type");const t=i.message;t&&(r.querySelector(".cmp-form-error__text").innerHTML=t,a=t)}!t||n||r||(r=e.querySelector(".cmp-form-error:first-of-type")),r&&(e.querySelectorAll(".cmp-form-error").forEach((e=>{e.classList.remove("active"),e.removeAttribute("aria-invalid")})),r.classList.contains("active")||r.classList.add("active"),r.setAttribute("aria-invalid","true"));var s=r.querySelector("p");s&&s.scrollIntoView({behavior:"smooth",block:"center"}),(0,o.W9)(e.getAttribute("name"),"failed",a)}function a(t){if(t.response&&"null"!=t.response){const n=JSON.parse(t.response);if("success"===n.status||"SUCCESS"===n.Header?.ActivityStatusEnum_T||n.SOATransactionID){const t=e.getAttribute("name"),r=JSON.stringify({formName:t,data:n});sessionStorage.setItem("form_tracking_success_data",r);const o=e.querySelector("#"+n.code);o&&(o.classList.remove("active"),o.removeAttribute("aria-invalid","false"));const a=e.querySelector("input[name=':redirect']");a&&window.location.replace(a.value)}else r(t)}else r(t)}(()=>{let e={};for(const t of y()){const n=t.name.toString();""!==n&&(e.hasOwnProperty(n)?Array.isArray(e[n])?e[n].push(t.value.toString()):e[n]=[e[n],t.value.toString()]:e[n]=t.value.toString())}if(n){const o=new XMLHttpRequest;o.addEventListener("load",(()=>a(o))),o.addEventListener("error",(()=>r(o))),o.open(t,n),o.setRequestHeader("Content-Type","application/json;charset=UTF-8"),o.send(JSON.stringify(e))}})()}}();else{for(const e of r())i(e);(0,o.W9)(e.getAttribute("name"),"failed","form fields are invalid")}"port-in-form-submit"===f.getAttribute("id")&&v(),a.preventDefault()})),h&&h.addEventListener("keydown",(function(e){"Enter"===e.key&&(e.preventDefault(),h.blur())}),!0);const g=()=>{document.querySelectorAll(".cmp-form-input-text--hide").forEach((e=>{e.querySelector("input").required=!1}))},y=()=>Array.from(e.elements).filter((e=>"BUTTON"!==e.nodeName&&(e.classList.contains("cmp-form-text__text")||e.classList.contains("cmp-form-text--textarea__text")||e.hasAttribute("checked")||e.id===DATE_PICKER_ID)||"hidden"===e.type&&e.parentElement.classList.contains("hidden")));function v(){let e=document.querySelector(".cmp-form-error-notification-box"),t=document.querySelectorAll(".cmp-form-text__error"),n=document.querySelector(".cmp-form-error-notification-box-list"),r=document.querySelector(".cmp-form-dateinput__day .cmp-form-text__error.active"),o=document.querySelector(".cmp-form-dateinput__month .cmp-form-text__error.active"),a=document.querySelector(".cmp-form-dateinput__year .cmp-form-text__error.active"),i=document.createElement("li"),s=document.querySelector(".postcodelookup");n&&(n.innerHTML="",t&&t.forEach((t=>{if(dropdownInput=t.parentElement.querySelector(".cmp-form-text--dropdown-input"),dropdownInput&&(""!==dropdownInput?.value||1!=dropdownInput?.required||t.parentElement.classList.contains("cmp-form-text--hide")?(t.classList.remove("active"),dropdownInput?.setAttribute("aria-invalid",!1)):(t.classList.add("active"),dropdownInput?.setAttribute("aria-invalid",!0))),s&&""===t.parentElement.parentElement.querySelector("[name=location]")?.value&&t.classList.add("active"),t.classList.contains("active")){var c,l=document.createElement("li"),u=t.parentElement.querySelector("label"),d=t.parentElement.querySelector("input"),p=t.parentElement.parentElement.querySelector("legend");u&&d&&""===d.value?c=document.createTextNode("'"+u.textContent+"' field is required"):u?c=document.createTextNode("'"+u.textContent+"' field is incorrect"):d.checked||(c=document.createTextNode("'"+p?.textContent+"' field is required")),t.classList.contains("cmp-form-dateinput__error")?r||o||a||(l&&l.appendChild(c),n&&n.appendChild(l)):(l&&l.appendChild(c),n&&n.appendChild(l),e&&e.scrollIntoView({behavior:"smooth",block:"center"}))}!e||n.hasChildNodes(l)||n.hasChildNodes(i)?e.style.display="block":e.style.display="none"})),hCaptchaContainer&&!hCaptchaCompleted&&(i.textContent="'hCaptcha' field must be selected",e&&e.querySelector("ul").appendChild(i),e.style.display="block",e&&e.scrollIntoView({behavior:"smooth",block:"center"})))}}}))},1626:function(e,t,n){"use strict";var r=n(3729);let o=0,a=0,i=0;t.Z=(e,t,n,s)=>{const c=e.querySelector(".cmp-form-networkcoveragechecker .cmp-button__label"),l=e.querySelector(".cmp-form-text--networkcoveragechecker_input"),u=e.querySelector(".cmp-networkcoveragechecker__invalid-postcode"),d=e?.querySelector(".coverageresults-showhide-content"),p=e.querySelector(".cmp-form-text"),m=e.querySelector(".cmp-form-text__error"),f=e.querySelector(".cmp-form-text__error__text"),h=p.getAttribute("data-first-api-fail-message"),g=p.getAttribute("data-second-api-fail-message"),y=e.classList.contains("networkstatuschecker")?"network_status_checker":"coverage_checker";let v=!1;l&&(c.addEventListener("click",(function(){if(l&&"true"!==l.getAttribute("aria-invalid")&&0!==l.value.length){const e=encodeURIComponent(l.value);fetch(`https://maps.googleapis.com/maps/api/geocode/json?address=${e}&key=${s}`).then((e=>e.json())).then((e=>{if(!("OK"===e.status&&e.results.length>0))throw v=!0,u.classList.add("active"),l.ariaInvalid=!0,new Error(u.innerHTML);{b(c);const o=e.results[0].geometry.location,a=e.results[0].geometry.location_type??"",i=e.results[0]?.address_components?.find((e=>e.types.includes("postal_code")))?.short_name??"";let s,l=o.lat,d=o.lng,p={tokenApi:"/libs/granite/csrf/token.json",rigViewApi:"/bin/threedigital/rigview"};s&&(p={rigViewApi:"https://4da681b2-5792-4e14-926f-7d95a3ac5ea2.mock.pstmn.io/post",tokenApi:"https://b409415a-4d44-4363-9571-171743ba71a3.mock.pstmn.io/get?token"}),fetch(p.tokenApi).then((e=>e.json())).then((e=>{fetch(p.rigViewApi,{method:"POST",body:JSON.stringify({location:{postcode:i,latitude:l,longitude:d,precisionLocation:a},ClientID:t}),headers:{"Content-type":"application/json; charset=UTF-8","Access-Control-Allow-Origin":"*","Access-Control-Allow-Methods":"POST","Access-Control-Allow-Headers":"Content - Type","CSRF-Token":e.token}}).then((e=>{if(_(c),e.ok){const e=c.querySelector(".cmp-button__span");e.dataset.originalText&&(e.textContent=e.dataset.originalText,delete e.dataset.originalText)}else S(c);return e.json()})).then((e=>{if("400"==e.code)throw u.classList.add("active"),new Error(document.querySelector("#invalidPostcodeMessage").textContent);u.classList.remove("active"),(0,r.W9)(y,"success","RigView API response successful"),n(e,l,d)}))})).catch((()=>{_(c),S(c)}))}})).catch((e=>{console.error("Error:",e),(0,r.W9)(y,"failed",e)}))}else d&&(d.style.display="none"),e.classList.value.indexOf("networkstatuschecker")>-1&&e.querySelectorAll(".cmp-networkcoveragechecker__response").forEach((e=>{e.classList.add("threedigital-hide")}))})),l.addEventListener("keydown",(function(e){"Enter"===e.key&&(e.preventDefault(),c.click())})));const b=e=>{m.classList.remove("active");const t=e.querySelector(".cmp-button__span");t.dataset.originalText=t.textContent,t.textContent="Checking...";const n=e.closest(".cmp-button").querySelector(".cmp-networkcoveragechecker__spinnerContainer");e.appendChild(n),n.classList.add("cmp-networkcoveragechecker--show"),n.classList.remove("cmp-networkcoveragechecker--hide"),e.disabled=!0},_=e=>{const t=e.closest(".cmp-button").querySelector(".cmp-networkcoveragechecker__spinnerContainer");t?(e.disabled=!1,t.classList.remove("cmp-networkcoveragechecker--show")):console.error("Button not found.")},S=e=>{const t=e.querySelector(".cmp-button__span");"network_status_checker"===y?(a+=1,o=a):"coverage_checker"===y&&(i+=1,o=i),1===o?(t.textContent="Try again",f.textContent=h,m.classList.add("active"),e.disabled=!1):o>=2&&(t.textContent="Try again",e.disabled=!0,f.textContent=g,m.classList.add("active"))}}},3047:function(e,t,n){"use strict";function r(e){return e<10?"0"+e:e}function o(){if(window.digitalData={},null!=digitalData){var e=document.referrer,t=e.split("?")[1]||"",n=new Date,o=n.getFullYear(),a=n.getMonth(),i=n.getDate(),s=n.getHours(),c=n.getMinutes(),l=n.getSeconds();a+=1;var u="["+window.location.pathname.replace("/content/","").split(".")[0].replaceAll("/",":")+"]",d=o+":"+r(a)+":"+r(i)+":"+r(s)+":"+r(c)+":"+r(l),p=JSON.parse(sessionStorage.getItem("user")),m=JSON.parse(sessionStorage.getItem("basket")),f=new URLSearchParams(window.location.search),h=!!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),g=f.has("id")?f.get("id"):"",y=f.has("icid")?f.get("icid"):"",v=window.location.pathname.split("/").filter((e=>e)),b=v.join(":");const M=e=>("business"===e[0]&&e.shift(),e);var _=M(v)[0],S="blog"===_?.toLowerCase()?document.getElementsByName("pageType")[0]?.content:M(v)[1],w=localStorage.getItem("previousPageName")?localStorage.getItem("previousPageName"):"",E=!!localStorage.getItem("megaMenuClicked")&&localStorage.getItem("megaMenuClicked"),x=localStorage.getItem("megaMenuItem")?localStorage.getItem("megaMenuItem"):"",k=!!localStorage.getItem("footerMenuClicked")&&localStorage.getItem("footerMenuClicked"),A=localStorage.getItem("footerMenuItem")?localStorage.getItem("footerMenuItem"):"",L=document.querySelector(".cmp-header"),C=L&&L.getAttribute("data-isbusiness")?"B2B":"B2C";digitalData={site:{language:document.documentElement.lang,country:"UK",platform:"Web",siteFlag:C,timestamp:d},page:{url:document.location.href,path:document.location.pathname,pageName:b,pageBreadcrumb:u,pageSection:_,pageType:S,previousURL:e,previousPageName:w,javascriptErrors:window.jsDataLayerErrors,pageCategory:"",domain:document.domain,hash:document.location.hash,queryString:document.location.search,previousQueryString:t,pageError:""},journey:{footerMenuClicked:k,footerMenuItem:A,megaMenuClicked:E,megaMenuItem:x,isMobile:h,currencyCode:"GBP",accountSubNavigationItem:!1,accountSubNavigationClick:"",internalCampaign:y,campaignCode:g,loginSuccess:!1,logoutSuccess:!1,registrationSuccess:!1,journeyType:""}};var q=window.location.href,D=new XMLHttpRequest;D.open("HEAD",q,!0),D.send(),D.onload=function(){const e=D.status.toString();"4"!=e[0]&&"5"!=e[0]||(digitalData.page.pageError=e)},digitalData.user=p,digitalData.basket=m,localStorage.setItem("previousPageName",b)}}function a(){return{componentTitle:"data-analytics-component-title",componentType:"data-analytics-component-type",sectionTitle:"data-analytics-section-title",actionType:"data-analytics-action-type",actionTypeValue:"textlink",actionLabel:"data-analytics-action-label",fallback_heading_value:"no_heading",fallback_label_value:"no_label"}}n.d(t,{f:function(){return o},p:function(){return a}})},5451:function(e,t,n){"use strict";var r=n(8279);var o=()=>{document.querySelectorAll(".cmp-superherobanner__lottie-player").forEach((e=>{const t=e.shadowRoot.querySelector(".main"),n=e.shadowRoot.querySelector(".animation"),r=document.querySelector(".cmp-superherobanner__lottie");t.style.display="flex",t.style.justifyContent="center";const o=()=>{r.classList.contains("wrapped")?n.style.aspectRatio="1":n.style.aspectRatio="unset"};o(),window.addEventListener("resize",(()=>{o()}))}))},a=n(3047);!document.querySelector("lottie-player")||window.threeLottieElementInitialized||customElements.get("lottie-player")||(window.threeLottieElementInitialized=!0,(0,r.fs)("https://unpkg.com/@lottiefiles/lottie-player@0.4.0/dist/lottie-player.js",!0,o)),window.location.hostname.includes("auth.three.co.uk")||window.location.hostname.includes("auth0.devr1-techm-3uk.co.uk")||window.location.hostname.includes("testing-auth0.three.co.uk")||("complete"===document.readyState||"loaded"===document.readyState?(0,a.f)():document.addEventListener("DOMContentLoaded",(0,a.f)())),document.onreadystatechange=()=>{if("complete"===document.readyState){const{hash:e}=location;0!==e.length&&setTimeout((function(){document.querySelector(e).scrollIntoView()}),5)}}},3085:function(){const e=document.querySelector(".cmp-form-button");e&&e.addEventListener("click",(e=>{console.log(e),console.log(e.target)}))},7064:function(){if(document.querySelector(".postcodelookup")){const e=["Address-Line1","Address-Line2","Address-Town","Address-County"],t=document.querySelector("[name=location]");let n=!1;["focusout","input"].forEach((r=>{t.addEventListener(r,(function(){!function(){const r=document.querySelector("[name=location]"),o=r.parentElement.querySelector(".cmp-form-text__error");n||(n=!0,e.forEach((e=>{const t=document.querySelector(`[name=${e}]`),n=t?.parentElement.firstElementChild;n&&n.classList.add("cmp-form-text__label-active")})));""===t.value?o.classList.add("active"):(o.classList.remove("active"),r.setAttribute("aria-invalid",!1))}()}))}));let r=!1;t.addEventListener("focusin",(()=>{var e;r&&((e=t).setAttribute("readonly","readonly"),setTimeout((function(){e.blur(),e.removeAttribute("readonly")}),100),r=!1)})),pca.on("load",(function(e,t,n){t="pl-post-code-input";var o=document.getElementById(t);o&&o.setAttribute("aria-describedby",t+"-error"),n.listen("populate",(function(){r=!0}))}))}},9983:function(){document.querySelectorAll(".cmp-price-increase-calculator").forEach((e=>{const t=e.querySelector(".cmp-form-text__text"),n=e.querySelectorAll(".cmp-form-text__text"),r=e.querySelector(".cmp-form"),o=r.getAttribute("data-interest-rate"),a=o&&parseFloat(o),i=r.getAttribute("data-method"),s=r.getAttribute("data-increaseone"),c=r.getAttribute("data-increasetwo"),l=r.getAttribute("data-increasethree"),u=r.getAttribute("data-starttwo"),d=r.getAttribute("data-startthree"),p=e.querySelector(".cmp-button__label"),m=e.querySelector(".cmp-price-increase-calculator__cost-result"),f=e.querySelector(".cmp-form-text__error"),h=e.querySelectorAll(".cmp-price-increase-calculator__currency");let g="";function y(){t&&f&&(0!=t.value.length?(f.classList.remove("active"),f.style.display="none",t.removeAttribute("aria-invalid","true")):(f.classList.add("active"),f.style.display="flex",t.setAttribute("aria-invalid","true")))}function v(){const e=t&&parseFloat(t.value);let r;if(y(),e){if("flat"===i)r=e<=u?e+parseFloat(s):e<=d?e+parseFloat(c):e+parseFloat(l);else if(a){r=e+e*a/100}t&&0!==t.value.length&&m?m.textContent="£"+r.toFixed(2):m.textContent=""}n.forEach((e=>{e.value.endsWith(".")&&(e.value=e.value.slice(0,-1))}))}p&&p.addEventListener("click",(function(){v()})),t&&t.addEventListener("blur",(function(){y()})),n.forEach(((e,t)=>{e.addEventListener("focus",(function(){h[t].style.display="block"})),e.addEventListener("keydown",(e=>{"Enter"===e.key&&(e.preventDefault(),v())})),e.addEventListener("input",(function(){if(function(e){e.value.match(/^\d*\.?\d*$/)?g=e.value:e.value=g,parseFloat(this.value)<1&&(this.value="")}(e),0==t&&y(),this.value.includes(".")){const e=this.value.split(".");e[1].length>2&&(this.value=`${e[0]}.${e[1].slice(0,2)}`)}}))}))}))},1560:function(e,t,n){"use strict";n.d(t,{wG:function(){return o},So:function(){return a},jz:function(){return i}});var r=n(8705);function o(e,t){const n=e.threshold,r=e.increase;for(let e=0;e=3&&e.getUTCMonth()<=11?e.getUTCFullYear()+1:e.getUTCFullYear()}function i(e){const t=new Date(e.bufferDate),n=new Date(e.priceRiseDate),r=new Date,o=r.getUTCMonth(),a=t.getUTCMonth(),i=n.getUTCMonth(),s=r.getUTCDate(),c=t.getUTCDate(),l=n.getUTCDate();return o>a&&o=c||o==i&&se.getAttribute(t)));return n.filter(((e,t)=>n.indexOf(e)===t&&null!==e))}function c(e,t,n,r,s){const c=a(),l=o(e,t);let u=t,d=c,p=i(e);for(let e=0;e0&&(n=await async function(e,t,n){let o="";const a=t?"OR":"AND";e.forEach((e=>{o=(0,r.WD)("Sku",e,"keyValue",o)})),o&&(o+=`&filterType=${a}`);try{n||(n=await(0,r.RJ)());const e=await fetch("/bin/threedigital/retrieveJsonData",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","CSRF-Token":n},body:JSON.stringify({queryParam:o})});if(!e.ok)throw new Error(`Failed to fetch data: ${e.status} ${e.statusText}`);const t=await e.json();if(t&&Array.isArray(t))return t}catch(e){return console.error("Error fetching basket data:",e.message),Promise.reject(e)}}(a,"OR",i)),o.forEach((r=>{fetch(t,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","CSRF-Token":i},body:JSON.stringify({fragmentPath:r})}).then((e=>{if(!e.ok)throw new Error("Content fragment API errored");return e.json()})).then((t=>{const o=t?.data?.priceRiseModelList?.items[0];o&&e.forEach((e=>{const t=e.getAttribute("data-cmp-length"),a=e.getAttribute("data-cmp-fragment-path"),i=e.getAttribute("data-cmp-skucode"),s=e.querySelector(".cmp-pricing__breakdown"),l={36:3,24:2,12:1};function u(){s.style.display="none"}function d(e,t){!function(e,t,n){const r=document.createElement("div");r.innerHTML=`£${e.toFixed(2)} from Apr ${t}`,n.append(r)}(e,t,s),s.classList.remove("threedigital-hide")}if(a===r)if(i){const t=e.querySelectorAll(".cmp-pricing__pound"),r=e.querySelectorAll(".cmp-pricing__penny"),a=e.querySelectorAll(".cmp-pricing__label"),s=e.querySelectorAll(".cmp-pricing__small-print"),p=e.querySelectorAll(".cmp-pricing__footnote"),m=e.querySelector(".cmp-pricing__double-divider"),f=n.find((e=>e.Sku===i)),h=f.Tenure.replace(" Months","").replace(" Month",""),g=[],y={price:f.UFC,label:f["UFC label"]??"upfront"},v={price:f.MRC,label:f["MRC label"]??"a month",wasPrice:f["MRC was"],needsFootnote:!0};y.price&&g.push(y),v.price&&g.push(v),g.forEach(((e,n)=>{const o=Number(e.price).toFixed(2).split(".");t[n].textContent="£"+o[0],r[n].textContent="."+o[1],a[n].textContent=e.label,console.log("data.wasPrice",e.wasPrice),console.log("data.price",e.price),e.wasPrice>e.price&&(s[n].textContent=e.wasPrice?`Was £${Number(e.wasPrice).toFixed(2)}`:""),e.needsFootnote&&p[n].classList.remove("threedigital-hide"),1===n&&m.classList.remove("threedigital-hide")}));const b=l[h],_=Number(f.MRC);h>0&&c(o,_,b,u,d)}else if(t&&a){const n=e.querySelectorAll(".cmp-pricing__pound"),r=e.querySelectorAll(".cmp-pricing__penny"),a=Number(e.getAttribute("data-cmp-column")),i=l[t],s=Number(n[a].textContent.slice(1)+r[a].textContent);c(o,s,i,u,d)}}))})).catch((e=>{console.error("Error:",e)}))}))}}(document.querySelectorAll(".cmp-pricing"))},1502:function(e,t,n){"use strict";var r=n(9904);const o=document.querySelectorAll(".cmp-promocard__text-container"),a=document.querySelectorAll(".cmp-promocard__promo-text");o.forEach((e=>{let t=e.getAttribute("data-custombackgroundcolor");t&&("#"!==t[0]&&(t=`#${t}`),e.style.background=t)})),a.forEach((e=>{const t=e.clientHeight,n=e.querySelector(".cmp-containersecondary2__container-inner"),o=e.getAttribute("data-videoUrlMobile"),a=e.getAttribute("data-videoUrlDesktop"),i=e.getAttribute("data-altTextFallback"),s=e.getAttribute("data-fallbackMobileImageUrl"),c=e.getAttribute("data-fallbackDesktopImageUrl"),l=e.getAttribute("data-imageUrlMobile"),u=e.getAttribute("data-imageUrlDesktop"),d=e.getAttribute("data-layout"),p=e.getAttribute("data-altText"),m=e.parentElement.parentElement,f=(0,r.S)(e,s,c,e,t);var h;"borealisstatic"===d?f.renderImage(u,l,p||""):"borealisanimated"===d&&(f.renderVideo(a,o,i||"",n),h=m,["cmp-promocard--6amgradient","cmp-promocard--5amgradient"].forEach((e=>{h.classList.contains(e)&&h.classList.remove(e)})))}));const i="no_label";document.querySelectorAll(".cmp-promocardgroup").forEach((e=>{e.hasChildNodes()&&(e.setAttribute("data-analytics-component-title","no_heading"),e.setAttribute("data-analytics-component-type","promocardgroup")),document.querySelectorAll(".cmp-promocard").forEach((e=>{const t=e.querySelector(".cmp-promocard__headline"),n=e.querySelector(".cmp-promocard__image-container img"),r=e.querySelector(".cmp-promocard__image");t&&(e.setAttribute("data-analytics-action-label",t.textContent.toLowerCase().trim()),document.querySelectorAll(".cmp-promocardgroup").forEach((e=>{const t=e.children;Array.from(t).forEach((e=>{const t=e.querySelector(".cmp-promocard__headline"),n=t?t.textContent.toLowerCase().trim():i;e.setAttribute("data-analytics-section-title",n)}))})));const o=e.getAttribute("href")?"textlink":"div";if(e.setAttribute("data-analytics-action-type",o),n&&r){const e=n.getAttribute("alt");r.setAttribute("data-analytics-action-label",e?e.toLowerCase().trim():i),r.setAttribute("data-analytics-action-type","image")}}))}))},3158:function(){const e=document.querySelectorAll(".cmp-form-options__field--radio");if(0!==e.length){function t(){e.forEach((e=>{if(e===this){const t=e.closest("fieldset").querySelectorAll(".cmp-form-options__field--radio");t.length>0&&t.forEach((e=>{e.removeAttribute("checked")})),this.checked?this.setAttribute("checked",""):this.removeAttribute("checked")}}))}e.forEach((e=>{e.addEventListener("change",t)}))}},5176:function(e,t,n){"use strict";var r=n(5834);function o(e,t){e.classList.contains("cmp-form-text--number__text")&&document.getElementById(e.id).parentElement.setAttribute("aria-invalid",t.toString())}function a(e){const t=e.getAttribute("aria-describedby");if(!t)return null;const n=t.split(" ").find((e=>e.endsWith("-error")));return document.getElementById(n)}function i(e,t){t&&a(e)&&!a(e).parentElement.classList.contains("active")&&a(e).parentElement.classList.add("active")}function s(e,t){return document.getElementById(e.id).parentElement.getAttribute(t)}function c(e){const t=a(e);if(t){t.textContent="",i(e,!1),e.removeAttribute("aria-invalid","false"),e.parentElement.classList.remove("afterelement-error"),o(e,!1);const n=document.getElementById(e.id).parentElement.parentElement.querySelector(".cmp-form-text__error");n&&n.classList.remove("active")}}var l=n(3729);const u=document.querySelector(".cmp-roamingcostfinder");if(window.fieldValidationDataLayer=window.fieldValidationDataLayer||{},u){let d=!0;const p=u.getAttribute("data-flagpath"),m="true"===u.getAttribute("data-isbusiness"),f="true"===u.getAttribute("data-isinternationalcalling"),h=u.getAttribute("data-api-url"),g=document.querySelector(".cmp-autocomplete__container"),y=document.querySelector(".cmp-autocomplete__results"),v=document.querySelector(".cmp-autocomplete__input"),b=u.querySelectorAll(".options"),_=u.querySelector("[type=SUBMIT]"),S=u.querySelector("form"),w=document.querySelectorAll(".cmp-form-options--radio");let E=document.querySelectorAll(".cmp-roamingcostfinder__result-fragment"),x=!1,k=-1;function A(){if(v.value.length>1){x=!0;const e=y?.children?.length;g.setAttribute("aria-expanded","true"),v.setAttribute("aria-label",`Destination list opened. ${e||0} destinations displayed. You can use arrow buttons and enter to pick a destination.`),y?.classList.toggle("visible",e<=200)}}function L(){x=!1,y?.classList.remove("visible"),g.setAttribute("aria-expanded","false"),v.setAttribute("aria-activedescendant",""),I(v)?v.setAttribute("aria-label",`${v.value} selected`):v.setAttribute("aria-label","Enter destination name")}const C=[];function q(e){const t=e.id;v.setAttribute("aria-activedescendant",t),e.focus()}function D(e){const t=e.querySelector("span").innerText;v.value=t,e.setAttribute("aria-selected","true"),v.removeAttribute("aria-activedescendant"),v.focus(),L(),M();const n=new URLSearchParams(window.location.search);t&&"string"==typeof t&&n.set("country",t.trim());const r=R(n),o=`${window.location.pathname}?${r}`;o&&window.history.replaceState(null,"",o)}function M(){m||(b[0].classList.remove("threedigital-hide"),b[0].querySelectorAll("input").forEach((e=>{e.required=!0})))}function I(e){const t=e.value?.trim()?.toLowerCase();return!!C.some((e=>e?.label?.trim()?.toLowerCase()===t))||(u?.querySelector(".cmp-roamingcostfinder__results")?.classList.add("threedigital-hide"),!1)}function T(e){const t=document.querySelector(`#${e.id}-error`);t&&(e.validity.valueMissing?t.textContent=s(e,"data-cmp-required-message"):I(e)||(t.textContent=s(e,"data-cmp-constraint-message"))),fieldValidationDataLayer.form_field_validation_message=t.textContent}function P(e){T(e),i(e,!0),e.setAttribute("aria-invalid","true"),fieldValidationDataLayer.form_field_validation_status="failed",(0,l.E0)(fieldValidationDataLayer)}function N(e){if(Array.isArray(e)&&e.length>0){e.sort(((e,t)=>e.label.localeCompare(t.label)));const t=e.map(((e,t)=>`\n
\n ${e.label}\n `)).join("");y.innerHTML=t,k=-1}else y.innerHTML="",P(v)}function O(e){const t=y.childNodes;let n=null;switch(e.key){case"ArrowDown":if(e.preventDefault(),k0&&(k-=1,n=t.item(k),q(n));break;case"Home":k>0&&(k=0,n=t.item(k),q(n));break;case"End":ko.test(e?.label?.trim())));let a=null;n=[...t],t.forEach((e=>{e.main&&(a=e.main),e.alt===a&&n.splice(n.indexOf(e),1)}))}N(n)}function H(e){Array.from(e).slice(1).forEach((e=>{const t=e.querySelectorAll("input");e.classList.add("threedigital-hide");const n=e.getAttribute("data-radioid");t.forEach((e=>{j.includes(n)||(e.checked=!1),e.required=!1}))}))}Array.from(y.children).forEach(((e,t)=>{const n=e.getAttribute("data-flag"),r=e.getAttribute("data-label"),o=e.getAttribute("data-alternative"),a=o&&o.split(",");C.push({iso:n,flag:n?.toLowerCase(),label:r,main:t}),a&&a.forEach((e=>{C.push({iso:n,flag:n?.toLowerCase(),label:`${r} (including ${e})`,alt:t})}))})),v.addEventListener("click",A),document.addEventListener("click",(e=>{[v,...y.childNodes].includes(e.target)||L()})),y?.addEventListener("click",(e=>{[...y.childNodes].includes(e.target)&&D(e.target)})),y?.addEventListener("mousedown",(e=>{[...y.childNodes].includes(e.target)&&(d=!1)})),v.addEventListener("keydown",O),y?.addEventListener("keydown",O),v.addEventListener("input",(e=>{const t=e.target.value;t.length>1?(B(t),x||A(),I(v)&&(c(v),M())):L()})),v.addEventListener("blur",(()=>{fieldValidationDataLayer.event_trigger="blur",fieldValidationDataLayer.form_field_name=v.getAttribute("name"),x=!1,!d||!v.validity.valueMissing&&I(v)||x?(c(v),fieldValidationDataLayer.form_field_validation_status="success",fieldValidationDataLayer.form_field_validation_message="",(0,l.E0)(fieldValidationDataLayer)):P(v),d=!0}));const F=Array.from(b);let j=[],$=new Set;F.forEach((e=>{e.querySelectorAll('fieldset input[type="radio"]').forEach((e=>{e.addEventListener("change",(()=>{if(e.checked){let t=Number(e.id.split("-")[0].charAt(e.id.split("-")[0].length-1)),n=e.value+"/";function r(){n=1==t&&"Mobile Broadband"!==e.value?(j[j.length-1]||"")+e.value+"//":(j[j.length-1]||"")+e.value+"/"}0!==j.length&&$.has(t)?(j.pop(),r()):r(),$.add(t);for(let o of $)o>t&&($.delete(o),j.pop(),n=1==t&&"Mobile Broadband"!==e.value?(j[j.length-1]||"")+e.value+"//":(j[j.length-1]||"")+e.value+"/");j.push(n),H(b),j.forEach((e=>{const t=u.querySelector(`[data-radioid="${e}"]`);if(t){const e=t.querySelectorAll("input");t.classList.remove("threedigital-hide"),e.forEach((e=>{e.required=!0}))}}))}}))}))}));function R(e){return e.toString().replace(/%20/g,"+").replace(/%28/g,"(").replace(/%29/g,")").replace(/%2C/g,",")}(()=>{const e=u.querySelector(".cmp-roamingcostfinder__results");_.addEventListener("click",(()=>{const t=new MutationObserver((n=>{n.forEach((n=>{n.addedNodes.length&&e&&(e.scrollIntoView({behavior:"smooth"}),t.disconnect())}))}));t.observe(document.body,{childList:!0,subtree:!0}),setTimeout((()=>{e&&e.scrollIntoView({behavior:"smooth"})}),1500)}))})(),_.addEventListener("click",(e=>{e.preventDefault();const t='input[type="radio"]:not(.threedigital-hide):checked',n=Array.from(u.querySelectorAll(t)).length>0,o=S.reportValidity()&&I(v)&&(!!m||n);(0,r.B)(w);const a=h;if(v.validity.valueMissing&&v.blur(),o){const e=u.querySelector(".cmp-autocomplete__input")?.value||"",n=C.find((t=>t?.label?.trim()===e?.trim()))?.iso||"",r=C.find((t=>t?.label?.trim()===e?.trim()))?.label||"",o=Array.from(u.querySelectorAll(t)).reduce(((e,t)=>({...e,[t.name]:t.value})),{planname:"",plantype:"",start:"",plansubtype:"",term:""});fetch("/libs/granite/csrf/token.json").then((e=>e.json())).then((e=>{let t;t="Pay As You Go"===o.planname?{plantypepayload:[{planname:"Pay As You Go",plans:[{plantypes:[{plansubtypes:[{plansubtype:"Three Your Way"}]}]}]}],Countries:[{isocode:n,country:r}],isInternationalCalling:f}:{plantypepayload:[{planname:m?"Business - Pay Monthly":o.planname,plans:[{plantype:o.plantype,plantypes:[{start:o.start,plansubtypes:[{plansubtype:o.plansubtype,terms:[{term:o.term}]}]}]}]}],Countries:[{isocode:n,country:r}],isInternationalCalling:f},fetch(a,{method:"POST",headers:{"Content-type":"application/json; charset=UTF-8","Access-Control-Allow-Origin":"*","Access-Control-Allow-Methods":"POST","Access-Control-Allow-Headers":"Content-Type","CSRF-Token":e.token},body:JSON.stringify(t)}).then((e=>{const t="international_roaming"==S.getAttribute("name");if(!e.ok)throw new Error("Network response for roaming cost API errored");return(0,l.W9)(S.getAttribute("name"),"success",t?"International Roaming Cost Finder Form Submitted Successfully":"International Calling Cost Finder Form Submitted Successfully"),e.json()})).then((e=>{document.querySelector(".cmp-roamingcostfinder__results")?.classList.remove("threedigital-hide"),E.forEach((e=>{e.classList.contains("threedigital-hide")||e.classList.add("threedigital-hide")})),document.querySelector("#"+e.experienceFragmentId)?.classList.remove("threedigital-hide");const t=document.querySelector("#datapassport-"+e.experienceFragmentId);e.showDataPassport?t?.classList.remove("threedigital-hide"):t?.classList.add("threedigital-hide");var n=document.querySelectorAll("#callabroad-payg-addons"),r=document.querySelectorAll("#callabroad-paym-addons");if(!0===e.showCallAbroad&&"Pay As You Go"===o.planname)for(var a=0;a{console.error("Error:",e),(0,l.W9)(S.getAttribute("name"),"failed",e)}))}))}else n?(0,l.W9)(S.getAttribute("name"),"failed","No matching country found"):(0,l.W9)(S.getAttribute("name"),"failed","Please choose your plan")})),document.addEventListener("DOMContentLoaded",(()=>{let e=new URLSearchParams(window.location.search);const t=document.querySelector(".cmp-roamingcostfinder"),n=t.querySelector(".cmp-autocomplete__input");let r="country",o="plan";const a=t.querySelector("[type=SUBMIT]"),i=(t,n)=>{n?e.set(t,n):e.delete(t);const r=R(e),o=`${window.location.pathname}?${r.toString()}`;return window.history.replaceState(null,"",o),o},s=e.get(r)?decodeURIComponent(e.get(r)):null,c=e.get(o),l=(u=s)?u.split(/(\s|,)/).map(((e,t)=>0===t?e.charAt(0).toUpperCase()+e.slice(1):e)).join(""):u;var u;l&&I({value:l})?(n&&(n.value=l,n.focus()),(e=>{const n={paym:"Pay Monthly",payg:"Pay As You Go",mbbpaym:"Mobile Broadband Pay Monthly",mbbpayg:"Mobile Broadband Pay As You Go"};t.querySelectorAll('input[name="planname"]').forEach((t=>{t.checked=t.value===n[e]}))})(c),M()):(t.querySelectorAll('input[name="planname"]').forEach((e=>e.checked=!1)),s&&P(n)),a&&n&&a.addEventListener("click",(()=>{const e=n.value.trim(),a=t.querySelector('input[name="planname"]:checked')?.value,s=Object.entries({"Pay Monthly":"paym","Pay As You Go":"payg","Mobile Broadband Pay Monthly":"mbbpaym","Mobile Broadband Pay As You Go":"mbbpayg"}).find((([e])=>e===a))?.[1];e&&s&&(i(r,e),i(o,s))}));const d=()=>{i(r,n.value.trim())};n&&(n.addEventListener("input",d),n.addEventListener("blur",(()=>{n.value.trim()||i(r,null)})))}))}},1498:function(e,t,n){"use strict";var r=n(8279);const o=document.querySelector(".cmp-searchbar"),a=document.querySelector(".cmp-searchbar__search");if(o){const i=document.querySelector(".threedigital .header"),s=document.querySelector(".search-form");if(i&&s&&(s.style.display="none",i.style.height="auto"),a){function c(){const e=document.querySelector(".cmp-searchbar__button");e&&e.addEventListener("click",(function(){const e=document.querySelector(".cmp-searchbar .js-yext-submit.yxt-SearchBar-button");e&&e.click()}))}a.closest(".cmp-containerprimary").classList.add("cmp-searchbar--primary");const l=()=>{(0,r.fs)("https://assets.sitescdn.net/answers-search-bar/v1.2/answers.min.js",!0,(()=>{ANSWERS.init({apiKey:"46281e259fc6522cc15ea1a0011c21a9",experienceKey:"threeconfigbusiness",experienceVersion:"PRODUCTION",locale:"en_GB",businessId:"1970093",templateBundle:TemplateBundle.default,onReady:function(){ANSWERS.addComponent("SearchBar",{container:".cmp-searchbar__search-form",name:"search-bar-help",redirectUrl:"https://www.three.co.uk/business/search",placeholderText:"Search"})}}),c()}))};(0,r.fs)("https://assets.sitescdn.net/answers-search-bar/v1.2/answerstemplates.compiled.min.js",!0,l)}}},55:function(){let e=document.scrollingElement;e.style.setProperty("overflow","scroll"),requestAnimationFrame((()=>{e.style.setProperty("--scrollbar-width",(()=>{const t=window.innerWidth-e.clientWidth;return t>16?"16px":t+"px"})()),e.style.setProperty("overflow","")}))},491:function(){var e=document.querySelector(".cmp-containershortcuts"),t=document.querySelectorAll(".cmp-containershortcuts .cmp-linkgroup__item");t&&1==t.length&&e&&e.classList.add("cmp-containershortcuts--single-item")},3117:function(e,t,n){"use strict";n.d(t,{u:function(){return u}});var r=n(8279),o=n(3199);const a=document.querySelectorAll(".cmp-shortcuts2"),i=!!document.querySelector('[data-wcmmode="EDIT"]'),s=Array.from(a).map((e=>({self:e,id:e.getAttribute("id"),layout:e.getAttribute("data-layout"),hideArrows:"true"===e.getAttribute("data-hide-arrows"),carousel:"true"===e.getAttribute("data-carousel"),disableOnMobile:e.classList.contains("cmp-shortcuts2--disable-mobile"),viewport:e.querySelector(".cmp-shortcuts2__viewport"),list:e.querySelector(".cmp-shortcuts2__list"),slides:e.querySelectorAll(".cmp-shortcuts2__link-wrapper"),links:e.querySelectorAll(".cmp-shortcuts2__link"),heading:e.querySelector(".cmp-shortcuts2__heading"),next:e.querySelector(".cmp-shortcuts2__right"),prev:e.querySelector(".cmp-shortcuts2__left"),taskQueue:Promise.resolve()})));function c(e){return new Promise((t=>{e.then((()=>{t()})).catch((e=>{console.log(e),t()}))}))}let l=new Set;const u=()=>{m.forEach((e=>{if(function(e){let t=e;for(;t;){if("none"===window.getComputedStyle(t).display)return!0;t=t.parentElement}return!1}(e.self))return;if(l.has(e.id))return;l.add(e.id);let t=!0,n=!1,r=!1;function a(t){e.taskQueue=e.taskQueue.then((()=>c(e.flicking.moveTo(t))))}function s(){const t=e.viewport.getBoundingClientRect(),n=[],r=[],a=[],i=(0,o.tq)()?27:75;return e.slides.forEach(((e,o)=>{const s=e.getBoundingClientRect();s.leftMath.ceil(t.right)-i?(a.push(o),s.rightMath.ceil(t.right)-i||r.push(o)):n.push(o)})),{visibleSlides:n,notVisibleSlides:a,partiallyVisibleSlides:r}}function u(){const{notVisibleSlides:t,partiallyVisibleSlides:n}=s();e.slides.forEach(((r,o)=>{n.includes(o)?(r.setAttribute("aria-hidden","true"),r.removeAttribute("inert"),r.setAttribute("tabindex","-1"),e.links[o].setAttribute("tabindex","-1")):t.includes(o)?(r.setAttribute("aria-hidden","true"),r.setAttribute("inert",""),r.setAttribute("tabindex","-1")):(r.removeAttribute("aria-hidden"),r.removeAttribute("inert"),r.setAttribute("tabindex","0"))}))}const d=new Flicking(`#flick__${e.id}`,{bound:!0,align:i?"prev":"center"});function p(){e.flicking.on(Flicking.EVENTS.WILL_CHANGE,(n=>{e.prev.classList.remove("cmp-shortcuts2__arrows--disabled"),t=!1,0===n.index&&(e.prev.classList.add("cmp-shortcuts2__arrows--disabled"),t=!0)})),e.flicking.on(Flicking.EVENTS.MOVE_END,(()=>{e.next.classList.remove("cmp-shortcuts2__arrows--disabled"),n=!1,1===function(){let t=-window.getComputedStyle(e.list).transform.split(",")[4]/(e.list.clientWidth-(0,o.Em)(e.viewport));return t>.99?1:t<0?0:t}()&&(e.next.classList.add("cmp-shortcuts2__arrows--disabled"),n=!0)})),e.flicking.on(Flicking.EVENTS.REACH_EDGE,(r=>{var o;o=r.direction,e.next.classList.remove("cmp-shortcuts2__arrows--disabled"),e.prev.classList.remove("cmp-shortcuts2__arrows--disabled"),t=!1,n=!1,"PREV"===o?(e.prev.classList.add("cmp-shortcuts2__arrows--disabled"),t=!0):"NEXT"===o&&(e.next.classList.add("cmp-shortcuts2__arrows--disabled"),n=!0)})),e.flicking.on(Flicking.EVENTS.CHANGED,(()=>{u()}))}e.flicking=d,u(),p();function m(o){e.taskQueue=e.taskQueue.then((()=>new Promise((e=>{e()})))).then((()=>c((t||n)&&r?e.flicking.moveTo(function(o,a){const i=s().visibleSlides,c="next"===o?1:-1,l="next"===o?3:i.at(0),u="next"===o?-1:0;let d;return(a=a??("next"===o?t:n))&&r?(d=i.at(u)+c,4===i.length&&(d=l)):d=e.flicking.index+c,d}(o)):"next"===o?e.flicking.next():e.flicking.prev())))}function f(){!1!==e.flicking._initialized&&((0,o.Em)(e.viewport)>=e.list.clientWidth?(e.self.classList.add("cmp-shortcuts2--hide-arrows-without-overflow"),e.flicking.bounce=0,e.flicking.align="prev",e.heading&&(e.heading.style.display="none")):(e.self.classList.remove("cmp-shortcuts2--hide-arrows-without-overflow"),e.flicking.bounce="20%",e.align="center",e.heading&&(e.heading.style.display="block")))}function h(){(0,o.tq)()?(a(0),e.taskQueue=e.taskQueue.then((()=>e.flicking.destroy()))):(e.flicking.init(),p())}function g(){e.list.clientWidth>e.viewport.clientWidth?e.list.style.width="max-content":e.list.style.width="100%"}e.self.querySelectorAll("img").forEach((e=>{e.addEventListener("dragstart",(e=>e.preventDefault()))})),r=s().visibleSlides.length%2==0,e.next.addEventListener("click",(()=>m("next"))),e.prev.addEventListener("click",(()=>m("prev"))),e.heading&&(e.heading.innerText=e.heading.innerText+` (${e.flicking.panelCount})`),e.hideArrows&&(f(),window.addEventListener("resize",(()=>{f()}))),e.disableOnMobile&&(h(),window.addEventListener("resize",(()=>{h()}))),g(),window.addEventListener("resize",(()=>{g()})),i&&(a(0),e.taskQueue=e.taskQueue.then((()=>e.flicking.destroy())))}))},d=()=>{let e=1440,t=900;return(0,o.tq)()&&(e=899,t=320),1-(e-window.innerWidth)/(e-t)},p=e=>{e.self.querySelectorAll(".cmp-shortcuts2__image").forEach((e=>{e.style.width=(()=>{let e=160,t=125;return(0,o.tq)()&&(e=144,t=108),`${Math.floor(d()*(e-t))+t}px`})()}))},m=s.filter((e=>e.carousel));m.length>0&&(0,r.R4)(u),s.forEach((e=>{p(e),window.addEventListener("resize",(()=>{p(e)}))}))},5410:function(e,t,n){"use strict";n.a(e,(async function(e,t){try{var r=n(8705),o=n(3729),a=n(1560);const i=document.querySelectorAll(".cmp-simcalculator");let s;if(0!==i.length){const l="/bin/threedigital/content-fragments",u=i[0].getAttribute("data-cmp-fragment-path"),d=await(0,r.RJ)();s=await fetch(l,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","CSRF-Token":d},body:JSON.stringify({fragmentPath:u})}).then((e=>{if(!e.ok)throw new Error("Content fragment API errored");return e.json()})).then((e=>e?.data?.priceRiseModelList?.items[0])).catch((e=>{throw console.error("Error fetching content fragment:",e.message),e}))}function c(e){e.value=e.value.replace(/[^0-9]/g,"")}i.forEach((e=>{const t=e.querySelector('[name="total"]'),n=e.querySelector('[name="roameu"]'),r=e.querySelector('[name="roamworld"]'),i=e.querySelector(".cmp-simcalculator__price"),l=e.querySelector(".cmp-simcalculator__price-rise"),u=e.getAttribute("data-cmp-error-total-exceeded"),d=e.getAttribute("data-cmp-error-roaming-exceeded"),p=l.innerHTML,m=Number(e.getAttribute("data-cmp-basepriceone")),f=Number(e.getAttribute("data-cmp-basepricetwo")),h=Number(e.getAttribute("data-cmp-basepricethree")),g=Number(e.getAttribute("data-cmp-basepriceten")),y=Number(e.getAttribute("data-cmp-basepricetwenty")),v=Number(e.getAttribute("data-cmp-euextraone")),b=Number(e.getAttribute("data-cmp-euextratwo")),_=Number(e.getAttribute("data-cmp-euextrathree")),S=Number(e.getAttribute("data-cmp-euextraten")),w=Number(e.getAttribute("data-cmp-euextratwenty")),E=Number(e.getAttribute("data-cmp-rowextraone")),x=Number(e.getAttribute("data-cmp-rowextratwo")),k=Number(e.getAttribute("data-cmp-rowextrathree")),A=Number(e.getAttribute("data-cmp-rowextraten")),L=Number(e.getAttribute("data-cmp-rowextratwenty"));function C(){c(t),c(n),c(r);const e=parseInt(t.value,10)||0,C=parseInt(n.value,10)||0,q=parseInt(r.value,10)||0;if(C+q>e)return i.innerHTML=`${d}`,l.style.visibility="hidden",void(0,o.E0)({form_name:"simcalculator",event_trigger:"input",form_field_name:this.getAttribute("name"),form_field_validation_message:d,form_field_validation_status:"failed"});let D=0,M=0,I=0;1===e?(D=m,M=v,I=E):2===e?(D=f,M=b,I=x):e>=3&&e<=9?(D=h,M=_,I=k):e>=10&&e<=19?(D=g,M=S,I=A):e>=20&&e<=50&&(D=y,M=w,I=L);const T=e-(C+q),P=T*D+C*(D+M)+q*(D+I),N=T*(0,a.wG)(s,D)+C*(0,a.wG)(s,D+M)+q*(0,a.wG)(s,D+I);if(e>50)return i.innerHTML=`${u}`,l.style.visibility="hidden",void(0,o.E0)({form_name:"simcalculator",event_trigger:"input",form_field_name:this.getAttribute("name"),form_field_validation_message:u,form_field_validation_status:"failed"});if(0===P)i.innerHTML="£XX.xx",l.style.visibility="hidden",(0,o.E0)({form_name:"simcalculator",event_trigger:"input",form_field_name:this.getAttribute("name"),form_field_validation_status:"success"});else{i.innerHTML=`£${Math.floor(P)}.${(P%1).toFixed(2).slice(2)}`,l.innerHTML=p;const e=(0,a.So)(),t=2;let n=P,r=e,c=(0,a.jz)(s),u=!1;for(let o=0;o£${n.toFixed(2)} from Apr ${r}`,l.appendChild(e),l.style.visibility="visible"}(0,o.E0)({form_name:"simcalculator",event_trigger:"input",form_field_name:this.getAttribute("name"),form_field_validation_status:"success"})}}[t,n,r].forEach((e=>{e.addEventListener("input",C)}))})),t()}catch(p){t(p)}}),1)},3753:function(){document.querySelectorAll("[aria-labelledby=custom-svg-title]").forEach((e=>{const t="id"+Math.random().toString(16).slice(2);e.setAttribute("aria-labelledby",t),e.children[0].id=t}))},8333:function(){!function(){if(!window.aemIsSpriteInjectInitialized){if(!document.getElementById("svg-all-wrapper")){const t=document.getElementById("svg-path")?.href;var e=new XMLHttpRequest;e.open("GET",t,!0),e.send(),e.onload=function(){var t=document.createElement("div");t.style.display="none",t.id="svg-all-wrapper",t.innerHTML=e.responseText,document.body.insertBefore(t,document.body.childNodes[0])}}window.aemIsSpriteInjectInitialized=!0}}()},769:function(){"use strict";document.querySelectorAll("div.cmp-tabs:not(.cmp-tabs2)").forEach((e=>{const t="tabs2-dynamic-link"===e.getAttribute("data-action"),n="true"===e.getAttribute("data-noindex"),r=e.querySelectorAll(".cmp-tabs__tab");if(n){let e="";const t=document.createElement("meta"),n=()=>{e=document.querySelector(".cmp-tabs__tab--active")};window.addEventListener("load",n),t.setAttribute("name","robots"),t.setAttribute("content","index, follow"),document.head.appendChild(t),r.forEach((n=>{n.addEventListener("click",(()=>{n?.textContent.trim()!==e?.textContent.trim()?t.setAttribute("content","noindex, nofollow"):t.setAttribute("content","index, follow")}))}))}if(t){const e=new URL(window.location.href),t=new URLSearchParams(e.search).get("tab");r.forEach(((e,t)=>{e.addEventListener("click",(()=>{!function(e,t){const n=new URLSearchParams(window.location.search);n.set(e,t);const r=`${window.location.pathname}?${n.toString()}${window.location.hash}`;history.replaceState(null,"",r)}("tab",t+1)}))})),"2"==t?(r[0].classList.remove("cmp-tabs__tab--active"),r[1].classList.add("cmp-tabs__tab--active")):"3"==t&&(r[0].classList.remove("cmp-tabs__tab--active"),r[2].classList.add("cmp-tabs__tab--active"))}}))},2835:function(e,t,n){"use strict";var r=n(9880);document.querySelectorAll(".cmp-tabs2").forEach((e=>{const t="true"===e.getAttribute("data-noindex");e.querySelectorAll(".cmp-tabs2__tab").forEach((e=>{const t=e.querySelector(".cmp-tabs2__tab-label");if(t){const n=Math.floor(t.getBoundingClientRect().width);e.style.width=`${n+20}px`}}));const n=e.querySelector(".cmp-tabs2__viewport"),o=Array.from(e.querySelectorAll(".cmp-tabs2__tab")).reduce(((e,t)=>e+Math.ceil(t.getBoundingClientRect().width)),0);o{i=!1}),200)}if(a.addEventListener("mousedown",s),a.addEventListener("mouseup",s),a.addEventListener("focusin",(function(){i||a.classList.add("cmp-tabs2--focus-within")})),a.addEventListener("focusout",(function(e){a.contains(e.relatedTarget)||a.classList.remove("cmp-tabs2--focus-within")})),t){let t="";const n=document.createElement("meta"),r=e.querySelectorAll(".cmp-tabs__tab"),o=()=>{t=document.querySelector(".cmp-tabs__tab--active")};window.addEventListener("load",o),n.setAttribute("name","robots"),n.setAttribute("content","index, follow"),document.head.appendChild(n),r.forEach((e=>{e.addEventListener("click",(()=>{e?.textContent.trim()!==t?.textContent.trim()?n.setAttribute("content","noindex, nofollow"):n.setAttribute("content","index, follow")}))}))}if(e){(0,r.lg)(e,"tabs2",r.fS);const t=e.querySelectorAll(".cmp-tabs2__tab");t&&t.forEach((e=>{const t=e.querySelector(".cmp-tabs2__tab-label");if(t){const n=t.textContent.trim()?t.textContent.toLowerCase().trim():r.fS,o=t.textContent.trim()?t.textContent.toLowerCase().trim():r.u3;e.setAttribute("data-analytics-section-title",n),(0,r.s0)(e,"button",o)}}))}})),document.addEventListener("DOMContentLoaded",(function(){const e=document.querySelector(".cmp-tabs2"),t=e?.querySelectorAll(".cmp-tabs2__tab");if(0===(t?.length??0))return;const n=e?.querySelectorAll(".cmp-tabs2__tabpanel"),r=e?.querySelector(".cmp-tabs2__tabpanel-camera");function o(){if(window.innerWidth<=900){const t=e?.querySelector(".cmp-tabs2__tabpanel--active");if(t){const e=t.querySelector(".container").scrollHeight+10;r.style.height=`${e}px`}}else r.style.height="auto"}t.forEach((e=>{e.addEventListener("click",(function(){n.forEach((e=>{e.classList.remove("cmp-tabs2__tabpanel--active")}));const t=e.getAttribute("aria-controls"),r=document.getElementById(t);r&&r.classList.add("cmp-tabs2__tabpanel--active"),setTimeout((()=>{o()}),300)}))})),window.addEventListener("resize",o),o()}))},3745:function(){document.querySelectorAll(".cmp-tags.cmp-tags--dismissible").forEach((e=>{const t=e.querySelectorAll(".cmp-tags__item"),n=e.querySelector(".cmp-tags__link");t.forEach((e=>{e.addEventListener("click",(()=>function(e){e.style.display="none",Array.from(t).reduce(((e,t)=>"flex"===window.getComputedStyle(t).display?e+1:e),0)<2&&n.setAttribute("style","display: none;")}(e)))})),n.addEventListener("click",(function(){t.forEach((e=>{e.setAttribute("style","display: none;")}))})),t.length>=2&&(n.style.display="block")}))},8982:function(){document.addEventListener("DOMContentLoaded",(()=>{document.querySelectorAll(".cmp-text").forEach((e=>{const t=e.querySelector("ol");t&&t.querySelectorAll("li").forEach((e=>{const t=window.getComputedStyle(e,"::marker").getPropertyValue("content");t&&"none"!==t&&e.classList.add("cmp-text__marker-bold")}));const n=e.getElementsByTagName("p"),r=document.querySelectorAll(".stripbanner");Array.from(n).forEach((e=>{const t=Array.from(e.childNodes),n=t.filter((e=>!(e=>{const t="#text"===e.nodeName,n=!e.nodeValue||null===e.nodeValue||0===e.nodeValue.search(/\n/);return t&&n})(e)));if(1===n.length&&"A"===n[0].nodeName&&(o=e,!Array.from(r).some((e=>e.contains(o))))){const e=n[0];e.classList.contains("cmp-text--standalone-a")||e.classList.add("cmp-text--standalone-a")}var o;if(1===t.length&&"SPAN"===t[0].nodeName){const n=()=>{t[0].classList.contains("style-intro-copy")&&e.classList.add("cmp-text--heading-width"),e.style.marginBottom=window.getComputedStyle(t[0]).marginBottom};window.addEventListener("resize",n),n()}})),e.querySelectorAll("a").forEach((e=>{"_blank"!==e.target||e.nextElementSibling?.classList.contains("new-window-icon")?"newItem"!==e.target||e.nextElementSibling?.classList.contains("download-icon-svg")||(e.innerText+=" ",e.insertAdjacentHTML("beforeend",'')):(e.innerText+=" ",e.insertAdjacentHTML("beforeend",''))}))}))}))},7431:function(e,t,n){"use strict";var r=n(3729),o=n(8279),a=[];let i;const s=document.querySelectorAll(".cmp-thirdparty-plugins");function c(e){return e.parentElement.querySelector("label.mktoLabel.mktoHasWidth")}function l(e,t){if(t||(t=e.parentElement.querySelector(".cmp-marketo-error__msg")),t){t.classList.remove("cmp-marketo-error__msg--visible");const e=t.querySelector(".cmp-marketo-span-error__msg");e&&(e.textContent="")}}function u(e){let t,n,r=!0;const o=e.parentElement.querySelector(".cmp-marketo-error__msg");if("FirstName"!==e.id&&"LastName"!==e.id||(t=/^(?![\-])[a-zA-Z \-']{2,100}$/,n=`Please enter a valid ${e.id.replace(/([A-Z])/g," $1").trim()}.`),"Phone"===e.id&&(t=/^((\+?4{2})|0)\s?[0-9]{10,11}$/,n="Please enter a valid phone number."),"Email"===e.id&&(t=/^[A-Za-z0-9._%+\-]+@[A-Za-z0-9\.-]+(\.[A-Za-z0-9\-]{2,4})$/,n="Please enter a valid email address."),t&&n){const a=e.value.trim();""===a?(l(e,o),e.setAttribute("data-validate",""),h(e,!0,"Field is required"),r=!1):t.test(a)?(l(e,o),e.setAttribute("data-validate","Valid input"),h(e,!1,n)):(!function(e,t,n){if(!n){const t=document.createElement("div"),r=document.createElement("span");t.classList.add("cmp-marketo-error__msg"),r.classList.add("cmp-marketo-span-error__msg"),t.appendChild(r),e.parentElement.appendChild(t),n=t}n.querySelector(".cmp-marketo-span-error__msg").textContent=t,n.classList.add("cmp-marketo-error__msg--visible")}(e,n,o),e.setAttribute("data-validate","Invalid input"),h(e,!1,n),r=!1)}return r}function d(e,t,n,r){e.style.display="block",e.classList.add("accessible-dropdown--active"),e.querySelector("li").focus(),n.forEach((e=>e.classList.remove("accessible-hovered"))),n[r].classList.add("accessible-hovered"),n[r].focus()}function p(e,t){e.style.display="none",e.classList.remove("accessible-dropdown--active")}function m(e,t,n,r,o,a){t.querySelectorAll("li").forEach((e=>e.classList.remove("cmp-marketo-text--dropdown-list__item--selected"))),e.classList.add("cmp-marketo-text--dropdown-list__item--selected"),n.value=e.textContent,n.setAttribute("value",e.getAttribute("value")),"Company_Type__c_account"===e.getAttribute("id")&&"Sole Trader"===e.getAttribute("value")?(r.value="",n.value=""):r.value=e.getAttribute("value"),p(t),""!==n.value.trim()&&(o.classList.add("cmp-thirdparty-text-label--active__not-empty"),f())}function f(){const e=document.querySelectorAll(".mktoFormRow");e.length>0&&e.forEach((e=>{const t=e.querySelector(".cmp-thirdparty-text-label--active"),n=e.querySelector("ul.cmp-marketo-text--dropdown-list");t||n?e.classList.add("cmp-thirdparty-row--active"):e.classList.remove("cmp-thirdparty-row--active")}))}function h(e,t,n){const o={fieldName:e.name,isValid:t,errorMessage:n};(0,r.E0)(o)}s.forEach((e=>{if("marketoForm"===e.getAttribute("data-plugin-type")){const t=e.querySelector(".cmp-thirdparty-plugins__marketoForm"),n=t?t.querySelector("form"):null;if(n){const e=n.getAttribute("data-formId"),t=n.getAttribute("data-munchkinId");if(e&&t&&MktoForms2.loadForm("//pages.business.three.co.uk",t,e,(function(e){if(n){n.removeAttribute("style"),n.querySelectorAll("*").forEach((e=>{e.removeAttribute("style")}));const t=n.querySelectorAll(".mktoFormRow input"),o=n.querySelectorAll(".mktoFormRow select");t.forEach((e=>{!function(e,t){t&&e&&e.addEventListener("focus",(function(){t.classList.add("cmp-thirdparty-text-label--active"),f()}))}(e,c(e))})),o.forEach((e=>{const t=c(e);!function(e,t){e.forEach((e=>{const n=e.querySelector("option");n&&"Select..."===n.textContent.trim()&&(n.textContent=t.value,n.style.display="none")}))}(o,t),function(e,t){let n=!1;t&&(t.style.cursor="pointer");const r=document.createElement("input");r.setAttribute("class",e.getAttribute("class")),r.classList.add("cmp-marketo-text--dropdown-box"),r.setAttribute("autocomplete","off"),r.setAttribute("type","text"),r.setAttribute("id",e.getAttribute("id")),r.setAttribute("name",e.getAttribute("name")),r.setAttribute("aria-labelledby",e.getAttribute("aria-labelledby")),r.setAttribute("aria-required",e.getAttribute("aria-required")),r.setAttribute("aria-describedby",e.getAttribute("aria-describedby")),r.setAttribute("aria-invalid",e.getAttribute("aria-invalid")),r.setAttribute("readonly",!0),r.setAttribute("tabindex","0"),r.addEventListener("focus",(function(){t.classList.add("cmp-thirdparty-text-label--active")})),r.addEventListener("focusout",(function(){t.classList.remove("cmp-thirdparty-text-label--active")})),e.insertAdjacentElement("beforebegin",r);const o=document.createElement("ul");o.classList.add("cmp-marketo-text--dropdown-list"),o.style.display="none";const i=e.querySelectorAll("option");function s(e,t){e.forEach((e=>e.classList.remove("accessible-hovered"))),e[t]&&(e[t].classList.add("accessible-hovered"),e[t].scrollIntoView({block:"nearest"}))}i.forEach((a=>{const i=document.createElement("li");i.classList.add("cmp-marketo-text--dropdown-list__item"),i.textContent=a.textContent,i.setAttribute("value",a.value),i.setAttribute("tabindex","-1"),i.addEventListener("click",(function(){m(i,o,r,e,t,n)})),o.appendChild(i)})),r.insertAdjacentElement("afterend",o),r.addEventListener("click",(function(){!function(e){const t="none"===e.style.display;e.style.display=t?"block":"none",e.classList.toggle("accessible-dropdown--active",t)}(o)})),document.addEventListener("click",(function(e){r.contains(e.target)||o.contains(e.target)||p(o,n)})),r.addEventListener("keydown",(function(a){const i=Array.from(o.querySelectorAll("li"));let c=i.findIndex((e=>e.classList.contains("accessible-hovered")));switch(a.key){case"ArrowDown":a.preventDefault(),n?-1===c||c>=i.length-1?s(i,0):s(i,c+1):(d(o,n,i,0),s(i,0),n=!0);break;case"ArrowUp":a.preventDefault(),n&&s(i,c<=0||-1===c?i.length-1:c-1);break;case"Enter":a.preventDefault(),n&&-1!==c&&m(i[c],o,r,e,t);break;case"Tab":n&&(p(o,n),n=!1);break;case a.shiftKey:n||(a.preventDefault(),d(o,n,i,0),s(i,0),n=!0);break;case"Escape":a.preventDefault(),n&&(p(o,n),n=!1)}})),e.style.display="none",a.push(r)}(e,t)})),function(e){e.forEach((e=>{e.addEventListener("input",(()=>{u(e)})),e.addEventListener("blur",(()=>{u(e)})),"Email"===e.id&&e.addEventListener("focus",(()=>{e.parentElement.querySelector(".mktoError")?.remove()}))}))}(t),function(e,t,n,r){e.onValidate((function(){const o={};if(!function(e){let t=!0;return e.forEach((e=>{u(e)||(t=!1)})),t}(n))return void e.submitable(!1);e.submitable(!0),n&&n.forEach((e=>{e.name&&(o[e.name]=e.value)})),r&&r.forEach((e=>{e.name&&("Sole Trader"===e.value?o[e.name]="":o[e.name]=e.value)}));const a={formName:t.name,data:{status:"success",code:"Marketo Form has been submitted successfully",fields:o}};localStorage.setItem("marketo-form-tracking_success_data",JSON.stringify(a))})),e.onSuccess((()=>function(e,t,n,r){t.forEach((e=>{e.value="",e.removeAttribute("data-validate");const t=c(e);t&&t.classList.remove("marketo-form-text__label-active")})),n.forEach((e=>{e.value="";const t=c(e);t&&t.classList.remove("marketo-form-text__label-active")})),r.forEach((e=>{e.value="";const t=e.nextElementSibling;t&&t.querySelectorAll(".cmp-marketo-text--dropdown-list__item").forEach((e=>{e.classList.remove("cmp-marketo-text--dropdown-list__item--selected")}));const n=c(e);n&&n.classList.remove("marketo-form-text__label-active")}));const o=e.querySelectorAll(".cmp-marketo-error__msg");o.forEach((e=>{e.classList.remove("cmp-marketo-error__msg--visible");const t=e.querySelector(".cmp-marketo-span-error__msg");t&&(t.textContent="")}));const a=e.querySelector('button.mktoButton[type="submit"], input.mktoButton[type="submit"]');a&&(a.textContent="Submit",a.removeAttribute("disabled"))}(t,n,r,a)))}(e,n,t,o);const s=localStorage.getItem("marketo-form-tracking_success_data");s&&(i=JSON.parse(s),(0,r.W9)(n.name,i.data.status,i.data.code,i.data.fields),localStorage.removeItem("marketo-form-tracking_success_data"))}})),s.length>0){const e=(0,o.oj)();if(e&&e.marketoScriptUrl){const t=e.marketoScriptUrl;(0,o.fs)(t,!0,i)}}}}}))},4632:function(e,t,n){"use strict";var r=n(6750),o=n.n(r),a=n(3729);window.fieldValidationDataLayer=window.fieldValidationDataLayer||{},o().registerHelper("isHide",(function(e,t){return"Hide"===e?t.inverse(this):t.fn(this)})),o().registerHelper("split",(function(e,t){return e.split(t)})),o().registerHelper("or",(function(){return Array.prototype.slice.call(arguments,0,-1).some(Boolean)}));const i=document.querySelector(".cmp-threepayshortcodes"),s=i?.querySelector("#merchant-data-output"),c=i?.querySelector(".threepay-search-field"),l="/content/dam/threedigital/threepay-shortcode-records",u="/jcr:content/renditions/original",d=`${l}/shortcode.json${u}`,p=`${l}/paymentintermediary.json${u}`,m=`${l}/merchant.json${u}`;let f=[],h=[],g=[],y=!1;function v(e){e.forEach((e=>{i?.querySelectorAll(e).forEach((e=>{e.style.display="none"}))}))}function b(){C(),i?.querySelectorAll(".error-text, .icon-records").forEach((e=>{e.style.display="block"})),c.style.borderBottom="2px solid red"}function _(e,t,n){return Array.isArray(e)&&e.length&&Array.isArray(t)&&t.length&&Array.isArray(n)&&n.length}function S(e,t,n){return Array.isArray(e)&&e.some((e=>e[t]?.toString().toLowerCase().startsWith(n.toLowerCase())))}function w(e,t,n){return Array.isArray(e)?e.filter((e=>e[t]?.toString().toLowerCase().startsWith(n.toLowerCase()))).map((e=>e[t]?.toString().length)).reduce(((e,t)=>Math.max(e,t)),0):0}function E(e,t,n,r){const o=S(t,"Short Code",e),a=Math.max(w(t,"Short Code",e)),i=S(r,"Merchant",e),s=w(r,"Merchant",e),c=S(n,"Payment Intermediary",e),l=Math.max(w(n,"Payment Intermediary",e));return e.length<=1||o&&e.length<=a||i&&e.length<=s||c&&e.length<=l}document.addEventListener("DOMContentLoaded",(()=>{if(!i)return;k();const e=i?.querySelector("#form-submit-threepay-search"),t=i?.querySelectorAll(".intermidiary-contact-info");let n=i?.querySelector(".cmp-form-text__label_threepay_shortcode");const r="cmp-threepayshortcodes",l=i?.querySelector(".error-text").textContent,u=c.getAttribute("placeholder");t&&v([".icon-records",".error-text",".intermidiary-contact-info"]),c&&(c.addEventListener("focus",(()=>{n?.classList.remove("cmp-form-text__label_threepay_shortcode-hidden"),n?.classList.add("cmp-form-text__label_threepay_shortcode-visible"),c.removeAttribute("placeholder")})),c.addEventListener("click",(e=>{c.contains(e.target)||(n?.classList.remove("cmp-form-text__label_threepay_shortcode-visible"),n?.classList.add("cmp-form-text__label_threepay_shortcode-hidden"),c.setAttribute("placeholder",u))})),c.addEventListener("blur",(function(e){e.preventDefault();const t=c?.value?.trim()||"";if(!_(f,h,g))return;const n=E(t,f,h,g);t&&n?(y=!1,fieldValidationDataLayer.event_trigger="blur",fieldValidationDataLayer.form_name=r,fieldValidationDataLayer.form_field_name=c.getAttribute("name"),fieldValidationDataLayer.form_field_validation_message="",fieldValidationDataLayer.form_field_validation_status="success",(0,a.E0)(fieldValidationDataLayer)):(y=!0,b(),fieldValidationDataLayer.event_trigger="blur",fieldValidationDataLayer.form_field_name=c.getAttribute("name"),fieldValidationDataLayer.form_field_validation_message=l,fieldValidationDataLayer.form_field_validation_status="failed",fieldValidationDataLayer.form_name=r,(0,a.E0)(fieldValidationDataLayer))})),c.addEventListener("input",(function(e){e.preventDefault();const t=c?.value?.trim()||"";if(!_(f,h,g))return;const n=(e,n)=>Array.isArray(e)&&e.some((e=>e[n]?.toString().toLowerCase()===t.toLowerCase())),r=n(f,"Short Code"),o=n(g,"Merchant"),a=n(h,"Payment Intermediary")||n(h,"Payment Intermediary");r&&o&&a||C();E(t,f,h,g)?(y=!1,v([".icon-records",".error-text"]),c.style.borderBottom="2px solid #000"):(y=!0,b(),C())})),e&&e.addEventListener("click",(function(e){e.preventDefault();const t=c.value.trim();if(!t)return L(),void(0,a.W9)(r,"failed",y?"":l);var n;(n=t,fetch(A.csrfTokenAPI).then((e=>{if(!e.ok)throw new Error("Failed to fetch CSRF token");return e.json()})).then((e=>fetch(A.threepayShortcodeApi,{method:"POST",headers:{"Content-Type":"application/json","CSRF-Token":e.token},body:JSON.stringify({search:n})}))).then((e=>{if(!e.ok)throw new Error(`Request failed with status ${e.status}`);return e.json()})).then((e=>{if(!e||e.error){const t=e?.error||"No data returned";throw L(),t}s.style.border="1px solid #ffbfc5",c&&(c.style.borderBottom="2px solid #000"),v([".icon-records",".error-text"]);const t=function(e){let t={shortCode:(r=e)["Short Code"],outgoingMessageCost:q(r["Outgoing Message Cost"]),incomingMessageCost:q(r["Incoming Message Cost"]),serviceType:r["Service Category/Type of Service"],merchant:r.Merchant,mNumber:r["Merchant Number"],mContact:r["Merchant Contact"],mWebsite:r["Merchant Website"],paymentIntermidiary:r["Payment Intermediary"],pWebsite:r["Payment Intermediary Website"],pContact:r["Payment Intermediary Contact"],pNumber:r["Payment Intermediary Number"]},n={};var r;return t.shortCode&&"Hide"!=t.shortCode&&void 0!==t.shortCode?(n=t,n.type="Shortcode",n.shortCodes=t.shortCode,n.isShortCodeDataAvailable=!0,n.isMerchantDataAvailable=!!t.merchant,n.showContent=!0):void 0!==t.merchant&&"Hide"!==t.merchant||!t.paymentIntermidiary?void 0!==t.shortCode&&"Hide"!==t.shortCode||!t.merchant&&!t.paymentIntermidiary||(n=t,n.isMerchantDataAvailable=!!t.merchant,n.type="Threepay",n.showContent=!0,t.paymentIntermidiary&&(n.payment=t.paymentIntermidiary)):(n=t,n.isMerchantDataAvailable=!1,n.type="Intermediary",n.showContent=!1),n}(e[0]||{});return function(e){let t=i.querySelector("#merchant-template");if(e&&Object.keys(e).length>0){const n=t.innerHTML,r=o().compile(n);s.innerHTML=r(e),e.type&&"Intermediary"===e.type?(i.querySelectorAll(".intermidiary-contact-info").forEach((e=>{e.style.removeProperty("display")})),v([".toggle-button"])):v([".intermidiary-contact-info"])}else b()}(t),e})).catch((e=>{throw L(),e}))).then((e=>{(0,a.W9)(r,"success","")})).catch((e=>{(0,a.W9)(r,"failed",y?"":l)}))})))}));const x=async e=>{try{const t=await fetch(e);if(!t.ok)throw new Error(`Failed to fetch JSON. HTTP status: ${t.status}`);return await t.json()}catch(e){return[]}},k=async()=>{f=await x(d),h=await x(p),g=await x(m)},A={csrfTokenAPI:"/libs/granite/csrf/token.json",threepayShortcodeApi:"/bin/threedigital/threepayandshortcode"};function L(){b(),C(),i.querySelectorAll(".error-text, .icon-records").forEach((e=>{e.style.display="block"}))}function C(){s.innerHTML="",s.style.border="none"}function q(e){return e?.startsWith("£")?e:`£${e}`}document.addEventListener("click",(e=>{const t=e.target.closest(".toggle-button");if(t){const e=t.querySelector(".show-content"),n=t.querySelector(".toggle-icon svg"),r=i.querySelector(".intermidiary-contact-info");if(r){const t="none"===r.style.display||!r.style.display;r.style.display=t?"flex":"none",n.style.transform=t?"rotate(180deg)":"rotate(0deg)",e.textContent=t?"Hide content":"Show content"}}}))},506:function(e,t,n){"use strict";n.d(t,{Uo:function(){return c},Xr:function(){return o},YG:function(){return a},tC:function(){return s}});const r=document.querySelector("main");function o(e){const t=r?.parentNode?.firstElementChild,n=document.querySelector('.cmp-header[data-isbusiness="true"]')?.closest(".cmp-experiencefragment--header");if(!r||!t)return void console.warn("Main or header tag is missing.");if(!n)return void console.warn("Mapped business header is not available.");t.contains(n)||t.appendChild(n),n.classList.add("business-header__404page");const o=[...t.children].find((e=>!e.classList.contains("business-header__404page"))),a=n;e?(o&&t.removeChild(o),i(a,!0,"header")):(t.contains(a)&&t.removeChild(a),!o&&r?.contains(n)&&t.insertBefore(n,t.firstChild),i(o,!0,"header")),r.contains(n)&&r.removeChild(n)}function a(e){const t=r?.nextElementSibling,n=r?.querySelector(".cmp-experiencefragment--footer");if(!r||!t)return void console.warn("Main or footer tag is missing.");if(!n)return void console.warn("Mapped business footer is not available.");t.contains(n)||t.appendChild(n),n.classList.add("inner-footer");const o=[...t.children].find((e=>!e.classList.contains("inner-footer")));o&&o.classList.add("outside-footer"),e?(o&&t.removeChild(o),i(n,!0,"footer")):(t.contains(n)&&t.removeChild(n),o&&i(o,!0,"footer")),r.contains(n)&&r.removeChild(n)}function i(e,t,n="header"){if(!e)return;const r=`${n}-visible`,o=`${n}-hidden`;e.classList.toggle(r,t),e.classList.toggle(o,!t)}const s=e=>document.querySelector(e)?.getAttribute("content")||"",c=(e,t)=>{const n=document.querySelector(e);n&&n.setAttribute("content",t)}},8705:function(e,t,n){"use strict";n.d(t,{RJ:function(){return r},WD:function(){return o}});const r=async()=>{try{const e=await fetch("/libs/granite/csrf/token.json");if(!e.ok)throw new Error(`Failed to fetch CSRF token: ${e.status} ${e.statusText}`);const t=await e.json();if(!t)throw new Error("CSRF token not found in response");return t.token}catch(e){throw console.error("Error fetching CSRF token:",e.message),e}};function o(e,t,n,r){let o;return"keyValue"===n&&e&&null!=t?o=`${e}=${t}`:"keyOnly"===n&&e&&(o=`${e}`),o&&(r.length>0&&(r+="&"),r+=o),r}},3883:function(e,t){"use strict";t.Z=function(e,t=50){let n;return(...r)=>{clearTimeout(n),n=setTimeout((()=>{e.apply(this,r)}),t)}}},3199:function(e,t,n){"use strict";n.d(t,{Em:function(){return r},tq:function(){return o}});const r=e=>{const t=window.getComputedStyle(e),n=parseFloat(t.paddingLeft),r=parseFloat(t.paddingRight);return e.offsetWidth-n-r},o=()=>window.matchMedia("(max-width: 900px)").matches;t.ZP=()=>window.innerWidth>0?window.innerWidth:screen.width},8279:function(e,t,n){"use strict";function r(e,t=!0,n){let r=document.createElement("script");r.setAttribute("src",e),r.setAttribute("type","text/javascript"),r.setAttribute("async",t),document.body.appendChild(r),r.addEventListener("load",(()=>{n&&n()})),r.addEventListener("error",(e=>{console.log("Error on loading file",e)}))}function o(){const e="/content/dam/threedigital/static-files/script-loader/";return{marketoScriptUrl:`${e}396-QDS-172_marketo-form-tracking.js`,flickingLibraryScriptUrl:`${e}flicking.pkgd.min.js`,flickingLibraryCssUrl:`${e}flicking.css`}||{}}n.d(t,{R4:function(){return a},fs:function(){return r},oj:function(){return o}});const a=e=>{const t=o();if(t){const n=t.flickingLibraryScriptUrl,o=t.flickingLibraryCssUrl;n&&o&&(!function(e,t){let n=document.createElement("link");n.setAttribute("href",e),n.setAttribute("rel","stylesheet"),document.head.appendChild(n),n.addEventListener("load",(()=>{t&&t()})),n.addEventListener("error",(e=>{console.log("Error on loading file",e)}))}(o),r(n,!0,e))}}},2903:function(e,t,n){"use strict";n.d(t,{B:function(){return r}});const r={desktop:{pageWidth:1440,pageMargin:75,horizontalGap:30},mobile:{pageMargin:27,horizontalGap:10}}},9904:function(e,t,n){"use strict";function r(e,t="",n="",r,o){const a=e,i=document.createElement("img"),s=document.createElement("video"),c=document.createElement("div");function l(e,t){window.innerWidth<900?(e.style.height="40px",e.style.zIndex=-1):(e.style.height="70px",e.style.zIndex=0),t&&(e.style.height="100%",e.style.zIndex=-1)}function u(t){const n=t.parentElement.classList.contains("cmp-offerstrip__text"),r=t.parentElement.classList.contains("cmp-promocard__promo-text");e.style.position="relative",t.style.objectFit="cover",t.style.objectPosition="0 0",t.style.position="absolute",t.style.left=n||r?0:"",e.style.zIndex=n?0:""}function d(d,p="",m="",f,h="image",g="",y,v){function b(e){y&&(e.style.borderTopRightRadius="10px",e.style.borderTopLeftRadius="10px"),v&&(e.style.borderBottomLeftRadius="10px",e.style.borderBottomRightRadius="10px")}if(d.style.width="100%",d.style.position="absolute",d.style.top=0,r.style.backgroundColor="transparent",e.style.backgroundColor="transparent",l(d),window.onresize=function(){l(d),u(d)},"video"===h){const e=document.createElement("source");e.alt=f||"",e.type="video/mp4",e.src=window.innerWidth<900?m:p,s.autoplay=!0,s.playsinline=!0,s.loop=!0,s.muted=!0,s.style.objectFit="cover",s.playsInline=!0,s.controls=!1,l(s,o),s.appendChild(e),a.appendChild(s),s.onloadeddata=function(){a.removeChild(i),u(s)},b(s),window.onresize=function(){l(s,o)}}"image"===h&&(i.src=window.innerWidth<900?m:p,i.alt=f||"",a.appendChild(i),l(i,o),u(i),window.onresize=function(){l(i,o)}),"gradient"===h&&(c.style.background=g,a.appendChild(c),u(c),l(c,o),window.onresize=function(){l(c,o)}),"fallbackImage"===h&&null!=i&&(t&&n&&(i.src=window.innerWidth<900?t:n),i.alt=f||"",i.style.position="absolute",i.style.top=0,i.style.width="100%",l(i,o),a.appendChild(i),b(i),u(i),window.onresize=function(){l(i,o)})}return{renderVideo:function(e,r,o,a,c,l){!function(e,t,n,r,o){d(i,e,t,n,"fallbackImage","",r,o)}(t,n,o,c,l),(e||r)&&(a&&(a.style.background="transparent"),d(s,e,r,o,"video","",c,l))},renderImage:function(e,t,n){d(i,e,t,n,"image")},renderGradient:function(e){d(c,"","","","gradient",e)},setHeight:l}}n.d(t,{S:function(){return r}})}},a={};function i(e){var t=a[e];if(void 0!==t)return t.exports;var n=a[e]={exports:{}};return o[e](n,n.exports,i),n.exports}e="function"==typeof Symbol?Symbol("webpack queues"):"__webpack_queues__",t="function"==typeof Symbol?Symbol("webpack exports"):"__webpack_exports__",n="function"==typeof Symbol?Symbol("webpack error"):"__webpack_error__",r=function(e){e&&!e.d&&(e.d=1,e.forEach((function(e){e.r--})),e.forEach((function(e){e.r--?e.r++:e()})))},i.a=function(o,a,i){var s;i&&((s=[]).d=1);var c,l,u,d=new Set,p=o.exports,m=new Promise((function(e,t){u=t,l=e}));m[t]=p,m[e]=function(e){s&&e(s),d.forEach(e),m.catch((function(){}))},o.exports=m,a((function(o){var a;c=function(o){return o.map((function(o){if(null!==o&&"object"==typeof o){if(o[e])return o;if(o.then){var a=[];a.d=0,o.then((function(e){i[t]=e,r(a)}),(function(e){i[n]=e,r(a)}));var i={};return i[e]=function(e){e(a)},i}}var s={};return s[e]=function(){},s[t]=o,s}))}(o);var i=function(){return c.map((function(e){if(e[n])throw e[n];return e[t]}))},l=new Promise((function(t){(a=function(){t(i)}).r=0;var n=function(e){e!==s&&!d.has(e)&&(d.add(e),e&&!e.d&&(a.r++,e.push(a)))};c.map((function(t){t[e](n)}))}));return a.r?l:i()}),(function(e){e?u(m[n]=e):l(p),r(s)})),s&&(s.d=0)},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,{a:t}),t},i.d=function(e,t){for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};i(2834)}();