1/******************************************************************************* 2 * Copyright 2020 Adobe 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 ******************************************************************************/ 16(function() { 17 "use strict"; 18 19 window.CQ = window.CQ || {}; 20 window.CQ.CoreComponents = window.CQ.CoreComponents || {}; 21 window.CQ.CoreComponents.container = window.CQ.CoreComponents.container || {}; 22 window.CQ.CoreComponents.container.utils = {}; 23 24 /** 25 * Utilities for Container Components (accordion, tabs) 26 * 27 * @namespace 28 * @alias CQ.CoreComponents.container.utils 29 * @type {{}} 30 */ 31 window.CQ.CoreComponents.container.utils = { 32 33 /** 34 * Removes the hash from the URL. 35 */ 36 removeUrlHash: function() { 37 history.replaceState(undefined, undefined, " "); 38 }, 39 40 /** 41 * Updates the URL hash with the panel ID without scrolling to it. 42 * 43 * @param {Object} component The container component (e.g. Accordion, Carousel, Tabs). 44 * @param {String} itemType The type of the item as defined in the component. 45 * @param {Number} index The index of the container item 46 */ 47 updateUrlHash: function(component, itemType, index) { 48 if (component && component._elements && component._elements[itemType] && 49 component._elements[itemType][index] && component._elements[itemType][index].id) { 50 var ID = component._elements[itemType][index].id; 51 history.replaceState(undefined, undefined, "#" + ID); 52 } 53 }, 54 55 /** 56 * Returns the index of the component item (accordion, carousel, tabs) that: 57 * - either corresponds to the deep link in the URL fragment 58 * - or contains the element that corresponds to the deep link in the URL fragment 59 * 60 * @param {Object} component The container component (Accordion, Carousel or Tabs). 61 * @param {String} itemType The type of the item as defined in the component. 62 * @param {String} itemContentType The type of the item content as defined in the component. 63 * @returns {Number} the index within the items array if the item exists, -1 otherwise. 64 */ 65 getDeepLinkItemIdx: function(component, itemType, itemContentType) { 66 if (window.location.hash) { 67 var deepLinkId = window.location.hash.substring(1); 68 if (deepLinkId && document.getElementById(deepLinkId) && 69 component && component._config && component._config.element && 70 component._elements[itemType] && 71 component._config.element.querySelector("[id='" + deepLinkId + "']")) { 72 for (var i = 0; i < component._elements[itemType].length; i++) { 73 var item = component._elements[itemType][i]; 74 var itemContentContainsId = false; 75 if (component._elements[itemContentType]) { 76 var itemContent = component._elements[itemContentType][i]; 77 itemContentContainsId = itemContent && itemContent.querySelector("[id='" + deepLinkId + "']"); 78 } 79 if (item.id === deepLinkId || itemContentContainsId) { 80 return i; 81 } 82 } 83 } 84 return -1; 85 } 86 return -1; 87 }, 88 89 /** 90 * Returns the item of the container component (accordion, carousel, tabs) that: 91 * - either corresponds to the deep link in the URL fragment 92 * - or contains the element that corresponds to the deep link in the URL fragment 93 * 94 * @param {Object} component The Accordion or Tabs component. 95 * @param {String} itemType The type of the item as defined in the component. 96 * @param {String} itemContentType The type of the item content as defined in the component. 97 * @returns {Object} the item if it exists, undefined otherwise. 98 */ 99 getDeepLinkItem: function(component, itemType, itemContentType) {
100 var idx = window.CQ.CoreComponents.container.utils.getDeepLinkItemIdx(component, itemType, itemContentType); 101 if (component && component._elements && component._elements[itemType]) { 102 return component._elements[itemType][idx]; 103 } 104 }, 105 106 /** 107 * Scrolls the browser on page reload (if URI contains URI fragment) to the item of the container component (accordion, tabs) 108 that corresponds to the deep link in the URI fragment. 109 * This method fixes the issue existent with Chrome and related browsers, which are not scrolling on page reload (if URI contains URI fragment) 110 to the element that corresponds to the deep link in the URI fragment. 111 * Small setTimeout is needed, otherwise the scrolling will not work on Chrome. 112 */ 113 scrollToAnchor: function() { 114 setTimeout(function() { 115 if (window.location.hash) { 116 var id = decodeURIComponent(window.location.hash.substring(1)); 117 var anchorElement = document.getElementById(id); 118 if (anchorElement && anchorElement.offsetTop) { 119 anchorElement.scrollIntoView(); 120 } 121 } 122 }, 100); 123 } 124 }; 125}()); 126 127function createCookie(name, value, minutes, domain) { 128Â Â Â if (!(typeof value == "undefined")) { 129Â Â Â Â Â Â Â var expires = ""; 130Â Â Â Â Â Â Â if (minutes) { 131Â Â Â Â Â Â Â Â Â Â Â var date = new Date(); 132Â Â Â Â Â Â Â Â Â Â Â date.setTime(date.getTime() + minutes * 60 * 1000); 133Â Â Â Â Â Â Â Â Â Â Â expires = "; expires=" + date.toGMTString(); 134Â Â Â Â Â Â Â } 135Â Â Â Â Â Â Â if (domain) { 136Â Â Â Â Â Â Â Â Â Â Â document.cookie = `${name}=${value}${expires}; domain=${domain}; path=/`; 137Â Â Â Â Â Â Â } else { 138Â Â Â Â Â Â Â Â Â Â Â document.cookie = `${name}=${value}${expires}; path=/`; 139Â Â Â Â Â Â Â } 140Â Â Â } 141} 142function readCookie(name) { 143Â Â Â var nameEQ = name + "="; 144Â Â Â var ca = document.cookie.split(";"); 145Â Â Â for (var i = 0; i < ca.length; i++) { 146Â Â Â Â Â Â Â var c = ca[i]; 147Â Â Â Â Â Â Â while (c.charAt(0) == " ") c = c.substring(1, c.length); 148Â Â Â Â Â Â Â if (c.indexOf(nameEQ) === 0) return c.substring(nameEQ.length, c.length); 149Â Â Â } 150Â Â Â return null; 151}Â 152const LANGUAGE_COOKIE = "langCodeCookie"; 153const EN_US_LOCALE = "en_US"; 154const ES_US_LOCALE = "es_US"; 155const EN_LANGUAGE = "en"; 156const ES_LANGUAGE = "es"; 157const MAX_AGE = (180 * 24 * 60 * 60) / 60; 158const DOMAIN = ".reliant.com"; 159const getCurrentLanguage = () => { 160Â Â Â let currentLanguage = EN_LANGUAGE; 161Â Â Â if (hasLanguage() !== null) { 162Â Â Â Â Â Â Â currentLanguage = hasLanguage(); 163Â Â Â } 164Â Â Â return currentLanguage; 165}; 166const hasLanguage = () => { 167Â Â Â let language = null; 168Â Â Â if (location.pathname.toLowerCase().indexOf(`/${EN_LANGUAGE}/`) > -1 169 || location.pathname.toLowerCase().indexOf(`/${EN_LANGUAGE}.html`) > -1) { 170Â Â Â Â Â Â Â language = EN_LANGUAGE; 171Â Â Â } 172Â Â Â if (location.pathname.toLowerCase().indexOf(`/${ES_LANGUAGE}/`) > -1 173 || location.pathname.toLowerCase().indexOf(`/${ES_LANGUAGE}.html`) > -1) { 174Â Â Â Â Â Â Â language = ES_LANGUAGE; 175Â Â Â } 176Â Â Â return language; 177};Â Â Â Â 178 let languageCookie = readCookie(LANGUAGE_COOKIE); 179Â Â Â let currentLanguage = getCurrentLanguage(); 180Â Â Â let cookieValToBeSet = EN_US_LOCALE; 181Â Â Â if (currentLanguage === ES_LANGUAGE) { 182Â Â Â Â Â Â Â cookieValToBeSet = ES_US_LOCALE; 183Â Â Â } 184Â Â Â if (languageCookie === null) { 185Â Â Â Â Â Â Â // Create cookie if it doesn't exist 186Â Â Â Â Â Â Â createCookie(LANGUAGE_COOKIE, cookieValToBeSet, MAX_AGE, DOMAIN); 187Â Â Â } else if (languageCookie !== cookieValToBeSet) { 188Â Â Â Â Â Â Â // Modify cookie to current language 189Â Â Â Â Â Â Â createCookie(LANGUAGE_COOKIE, cookieValToBeSet, MAX_AGE, DOMAIN); 190Â Â Â } 191!function(){"use strict";var e,t,n,r,o={},i={};function a(e){var t=i[e];if(void 0!==t)return t.exports;var n=i[e]={exports:{}};return o[e](n,n.exports,a),n.exports}a.m=o,t=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},a.t=function(n,r){if(1&r&&(n=this(n)),8&r)return n;if("object"==typeof n&&n){if(4&r&&n.__esModule)return n;if(16&r&&"function"==typeof n.then)return n}var s=Object.create(null);a.r(s);var o={};e=e||[null,t({}),t([]),t(t)];for(var i=2&r&&n;("object"==typeof i||"function"==typeof i)&&!~e.indexOf(i);
191i=t(i))Object.getOwnPropertyNames(i).forEach(function(e){o[e]=function(){return n[e]}});return o.default=function(){return n},a.d(s,o),s},a.d=function(e,t){for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.f={},a.e=function(e){return Promise.all(Object.keys(a.f).reduce(function(t,n){return a.f[n](e,t),t},[]))},a.u=function(e){return e+".js"},a.miniCssF=function(e){},a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n={},r="aem-maven-archetype:",a.l=function(e,t,s,o){if(n[e])n[e].push(t);else{var i,l;if(void 0!==s)for(var d=document.getElementsByTagName("script"),c=0;c<d.length;c++){var u=d[c];if(u.getAttribute("src")==e||u.getAttribute("data-webpack")==r+s){i=u;break}}i||(l=!0,(i=document.createElement("script")).charset="utf-8",a.nc&&i.setAttribute("nonce",a.nc),i.setAttribute("data-webpack",r+s),i.src=e),n[e]=[t];var p=function(t,r){i.onerror=i.onload=null,clearTimeout(m);var s=n[e];if(delete n[e],i.parentNode&&i.parentNode.removeChild(i),s&&s.forEach(function(e){return e(r)}),t)return t(r)},m=setTimeout(p.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=p.bind(null,i.onerror),i.onload=p.bind(null,i.onload),l&&document.head.appendChild(i)}},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){var e;a.g.importScripts&&(e=a.g.location+"");var t=a.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var r=n.length-1;r>-1&&(!e||!/^http(s?):/.test(e));)e=n[r--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),a.p=e+"../"}(),function(){var e={378:0};a.f.j=function(t,n){var r=a.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else{var s=new Promise(function(n,s){r=e[t]=[n,s]});n.push(r[2]=s);var o=a.p+a.u(t),i=new Error;a.l(o,function(n){if(a.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var s=n&&("load"===n.type?"missing":n.type),o=n&&n.target&&n.target.src;i.message="Loading chunk "+t+" failed.\n("+s+": "+o+")",i.name="ChunkLoadError",i.type=s,i.request=o,r[1](i)}},"chunk-"+t,t)}};var t=function(t,n){var r,s,o=n[0],i=n[1],l=n[2],d=0;if(o.some(function(t){return 0!==e[t]})){for(r in i)a.o(i,r)&&(a.m[r]=i[r]);if(l)l(a)}for(t&&t(n);d<o.length;d++)s=o[d],a.o(e,s)&&e[s]&&e[s][0](),e[s]=0},n=self.webpackChunkaem_maven_archetype=self.webpackChunkaem_maven_archetype||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))}();const l=()=>{const e=Array.from(document.getElementsByClassName("accordion-container")),t=e=>{const t=e.getAttribute("data-show-all-label"),n=e.getAttribute("data-hide-all-label");let r=!0;const s=Array.from(e.querySelectorAll(".collapse"));return s.length>0&&s.forEach(e=>{e.classList.contains("show")||(r=!1)}),e.querySelector(".accordion--toggleAll .link").innerHTML=r?n:t,r},n=(e,n)=>{if(n){Array.from(e.querySelectorAll(".accordion-item .accordion-collapse")).forEach(e=>{e!==n&&e.classList.contains("show")&&new window.bootstrap.Collapse(e).hide()})}else(e=>{const n=Array.from(e.querySelectorAll(".accordion-item .accordion-collapse")),r=t(e);n.length>0&&n.forEach(e=>{r&&e.classList.contains("show")?new window.bootstrap.Collapse(e).hide():r||e.classList.contains("show")||new window.bootstrap.Collapse(e).show()}),t(e)})(e)},r=e=>{const t=e.getAttribute("data-accordion-more-label"),n=e.getAttribute("data-accordion-less-label"),r=Array.from(e.querySelectorAll(".accordion-item")),s=e.querySelector(".accordion--view-more-items");if(!s)return;const o=r.slice(3);o.forEach(e=>e.classList.add("d-none"));s.addEventListener("click",()=>{o.forEach(e=>e.classList.toggle("d-none"));const e=s.querySelector("span");if(e){const r=o.some(e=>e.classList.contains("d-none"));e.innerHTML=r?t:n}(()=>
191{r.forEach(e=>e.style.borderBottom="");const e=r.filter(e=>!e.classList.contains("d-none"));e.length>0&&(e[e.length-1].style.borderBottom="none")})()})};e.length>0&&e.forEach(e=>{if("true"===e?.dataset?.isnested)return;if(e.classList.contains("single-expansion")){Array.from(e.querySelectorAll(".accordion-item")).forEach(t=>{const r=t.querySelector(".accordion-header");r.addEventListener("click",()=>n(e,t.querySelector(".accordion-collapse"))),r.addEventListener("keydown",r=>{"Space"!==r.code&&"Enter"!==r.code||(r.preventDefault(),n(e,t.querySelector(".accordion-collapse")))})})}if(e.querySelector(".accordion--toggleAll")){const r=e.querySelector(".accordion--toggleAll");r.addEventListener("click",()=>{n(e)}),r.addEventListener("keydown",t=>{"Space"!==t.code&&"Enter"!==t.code||(t.preventDefault(),n(e))}),e.addEventListener("hidden.bs.collapse",()=>{t(e)})}r(e);Array.from(e.querySelectorAll(".accordion-item")).forEach(e=>{e.querySelector(".accordion-header").addEventListener("keydown",t=>{if("Space"===t.code||"Enter"===t.code){t.preventDefault();const n=e.querySelector(".accordion-collapse");n.classList.contains("show")?new window.bootstrap.Collapse(n).hide():n.classList.contains("show")||new window.bootstrap.Collapse(n).show()}})})})};"loading"!==document.readyState?l():document.addEventListener("DOMContentLoaded",l);const d=()=>{const e=document.querySelectorAll(".bill-estimator-form");Array.prototype.slice.call(e).forEach(function(e){const t=e.querySelector("#billEstimatorAddressLookup"),n=e.querySelector("#billEstimatorSpecsLookup"),r=t?t.querySelector("#billEstimatorAddressForm"):null,s=n?n.querySelector("#billEstimatorSpecsForm"):null;if(null!==n&&null===t){n.classList.add("fade","show","active");const e=n.querySelector("#one-more-step-subheader");e&&e.classList.add("d-none")}else null!==t&&(t.classList.add("fade","show","active"),n&&n.classList.add("fade"));r&&r.addEventListener("submit",o=>{o.preventDefault(),o.stopPropagation();const i=t?t.querySelector(".bill-tdsp-not-found"):null;i&&i.classList.add("d-none");if(r.checkValidity()){const o=r.dataset.apiUrl;fetch(o,{method:r.method,body:new URLSearchParams(new FormData(r)).toString(),headers:{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8"}}).then(e=>e.json()).then(o=>{if(r.querySelector("#moveBillAddressDTO").value=JSON.stringify(o.modelMap.moveBillDTO),""===o.modelMap.error||null===o.modelMap.error)r.action=r.dataset.submitUrl,r.submit();else if(""===o.modelMap.moveBillDTO.tdspNum){const e=t.querySelector(".bill-tdsp-not-found");if(e){e.classList.remove("d-none"),e.classList.add("d-block");const t="object"==typeof o.modelMap.error?o.modelMap.error?.errorCode:o.modelMap.error;e.textContent=t||"An error occurred. Please try again."}}else if(n){t.classList.remove("show","active"),n.classList.add("fade","show","active");const r=e.querySelector(".billEstimatorHeader"),i=e.querySelector(".estimate-bill-on-addr"),a=e.querySelector("#one-more-step-subheader");r&&(r.style.display="none"),i&&(i.style.display="none"),a&&(a.style.display="block");let l=o.modelMap.moveBillDTO;if(s){const e=(e,t)=>{const n=s.querySelector(e);n&&(n.value=t)};e("#mbeStreetNum",l.streetNum),e("#mbeStreetName",l.streetName),e("#mbeUnitNumber",l.unitNumber),e("#mbeCity",l.city),e("#mbeState",l.state),null!==l.heatType&&""!==l.heatType&&e("#heatType",l.heatType),null!==l.sqft&&""!==l.sqft&&e("#sqft",l.sqft),null!==l.yb&&""!==l.yb&&e("#yearBuiltnoAddress",l.yb),null!==l.zip&&""!==l.zip&&e("#mbezipCodePrevious",l.zip),e("#mbehtcVal",l.htcVal),e("#mbeProfileId",l.profileId),e("#mbeEsidTdsp",l.esidTdsp),e("#mbeEsiidNum",l.esiidNum),e("#mbePlanName",l.planName),e("#zip",l.zip),e("#enrollmentURL",window.location.pathname)}}}).catch(e=>console.error(e))}}),s&&s.addEventListener("submit",e=>{e.preventDefault(),e.stopPropagation();if(s.checkValidity()){const e=s.dataset.apiUrl;c(n,s,e)}});const o=e.querySelector(".estimate-bill-on-specs");o&&o.addEventListener("click",e=>{e.preventDefault(),e.stopPropagation();const o=t?t.querySelector(".bill-tdsp-not-found"):null;if(o&&o.classList.add("d-none"),!r)return;const i=r.dataset.loadhomeUrl;fetch(i,{method:r.method}).then(e=>e.json()).then(e=>{if(t&&t.classList.remove("show","active"),n){n.classList.add("fade","show","active");const e=n.querySelector("#one-more-step-subheader"),t=n.querySelector(".estimate-bill-on-addr");e&&(e.style.display="none"),t&&(t.style.display="block")}s&&(s.querySelector("#moveBillSpecsDTO").value=JSON.stringify(e.moveBillDTO))}).catch(e=>console.error(e))});const i=e.querySelector(".estimate-bill-on-addr");i&&i.addEventListener("click",e=>{if(e.preventDefault(),n&&n.classList.remove("show","active"),t&&t.classList.add("fade","show","active"),n){const e=n.querySelector(".specs-addr-not-found");e&&e.classList.add("d-none")}})})},c=(e,t,n)=>{const r=e.querySelector(".specs-addr-not-found");r&&r.classList.add("d-none"),fetch(n,{method:t.method,body:new URLSearchParams(new FormData(t)).toString(),headers:{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8"}}).then(e=>e.json()).then(n=>{if(t.querySelector("#moveBillSpecsDTO").value=JSON.stringify(n.modelMap.moveBillDTO),""===n.modelMap.error||null===n.modelMap.error)t.action=t.dataset.submitUrl,t.submit();else{const t=e.querySelector(".specs-addr-not-found");if(t){t.classList.remove("d-none"),t.classList.add("d-block");const e="object"==typeof n.modelMap.error?n.modelMap.error?.errorCode:n.modelMap.error;t.textContent=e||"An error occurred. Please try again."}}}).catch(e=>console.error(e))};"loading"!==document.readyState?d():document.addEventListener("DOMContentLoaded",d);const u=()=>{let e=document.createElement("script");e.src="https://www.google.com/recaptcha/api.js",document.body.appendChild(e);let t=document.createElement("script");t.type="text/javascript";let n=document.createTextNode("var onRecaptchaSubmit = function(token) { };");t.appendChild(n),document.body.appendChild(t)};function p(e,t,n,r){if(void 0!==t){var s="";if(n){var o=new Date;o.setTime(o.getTime()+60*n*1e3),s="; expires="+o.toGMTString()}document.cookie=r?`${e}=${t}${s}; domain=${r}; path=/`:`${e}=${t}${s}; path=/`}}function m(e){for(var t=e+"=",n=document.cookie.split(";"),r=0;r<n.length;r++){for(var s=n[r];" "==s.charAt(0);)s=s.substring(1,s.length);if(0===s.indexOf(t))return s.substring(t.length,s.length)}return null}!function(){if("loading"!==document.readyState){document.querySelector(".g-recaptcha")&&u()}else document.addEventListener("DOMContentLoaded",()=>{document.querySelector(".g-recaptcha")&&u()})}();const h=()=>{const e="STANDARD_CHAT",t="CHATBOT";var n=t,r={},o="",i=m("lastSectionVisited_shared");o=function(e){var t=document.location.href.split("/");if("business"===e||"small-business"===e||"builder-multifamily"===e||"channel-partners"===e||"business"===t[4])return!0;return!1}(i)?"business":"residential";var a=m("ReliantLoginState_shared")||"NOT_LOGGED_IN",l={itViewName:"",itErrorVariable:"",itErrorCode:""};l.loginState=a;var d=window.location.hostname;l.env="www.reliant.com"===d?"prod":"non-prod";var c=m("langCodeCookie");const u=document.querySelector("[data-my-reliant-host-info]"),p=u?u.getAttribute("data-my-reliant-host-info"):null;var h=p&&p.length>0?p:"https://my.reliant.com";if("LOGGED_IN_3.0"===a){const e=document.querySelector("[data-myaccount-reliant-host-info]"),t=e?e.getAttribute("data-myaccount-reliant-host-info"):null;h=t&&t.length>0?t:"https://myaccount.reliant.com"}function f(s={}){var i=!1,l=!1;!function(e){"es_US"===c?(e.showTermsOfUse=e.showTermsOfUse||"Visite la PolÃtica de privacidad",e.externalLink=e.externalLink||"https://www.reliant.com/es/about/legal/privacy-statement"):(e.showTermsOfUse=e.showTermsOfUse||"Privacy Policy",e.externalLink=e.externalLink||"https://www.reliant.com/en/about/legal/privacy-statement");e.channel=e.channel||"6297f2c8-640b-4161-af8f-3f6f56f2915c",e.tkn=e.tkn||null,e.firstName=e.firstName||"there",e.accountNumber=e.accountNumber||null,e.checkDigit=e.checkDigit||"",e.accountStatus=e.accountStatus||"",e.mcaStatus=e.mcaStatus||"",e.phoneNumber=e.phoneNumber||"",e.emailAddress=e.emailAddress||"",e.serviceAddress=e.serviceAddress||"",e.offerCategory=e.offerCategory||"","LOGGED_IN"===a&&(e.chatbot=!1)}(s),r=s,function(r){var s=document.getElementById("outerChatWrap"),i=document.getElementById("chatWrapper"),a=document.getElementById("standardChatWrap");!r.chatbot||null!==s||null!==a||"es_US"===c||o&&"business"===o.toLowerCase()||"INACTIVE"===r.accountStatus||"Y"===r.mcaStatus?n=e:null!==i&&(n=t),console.log("getChatType -> "+n)}(s),function(){if(window.CXoneDfo)return;!function(e,t){window.CXoneDfo=e,window[e]=window[e]||function(){(window[e].q=window[e].q||[]).push(arguments)},window[e].u=t;const n=document.createElement("script");n.type="module",n.src=t+"?"+Math.round(Date.now()/1e3/3600),document.head.appendChild(n)}("cxone","https://web-modules-de-na1.niceincontact.com/loader/1/loader.js")}(),function(e){cxone("init","2930"),"es_US"===c?cxone("guide","init",{templateId:e.channel,locale:"es-MX"}):cxone("guide","init",e.channel);cxone("chat","enableCloseIcon",!0)}(s),y(s),n===t&&s.chatbot&&(cxone("guide","hidePreSurvey"),cxone("hideQueueCounterAfterAssignment"),cxone("chat","setCustomCss",'[data-selector="ACTIVITY_BAR"] {display: none !important}')),function(e){if(e.externalLink)cxone("chat","showTermsOfUse",e.showTermsOfUse,"externalLink",e.externalLink);else{var t="This webchat may be monitored and retained for quality assurance and regulatory purposes. Visit https://www.reliant.com/en/about/legal/privacy-statement for details.";"es_US"===c&&(t="Este chat puede ser monitoreado y retenido con fines regulatorios y de control de calida
191d. Visite https://www.reliant.com/es/about/legal/privacy-statement para obtener más detalles."),cxone("chat","showTermsOfUse",t,"modal",t)}}(s),cxone("chat","onPushUpdate",["MessageCreated","CaseStatusChanged"],e=>{var t,n,r=e.data,s=r.agentContact,o=r.case;null==s||null==s.user?(t="Not Assigned",n="Not Assigned"):(t=s.user.firstName+" "+s.user.surname,n=s.user.id),"new"!=o.status||l||(l=!0,analyticsChatInteractionUpdate(o.status,o.id,t,n,r)),"closed"==o.status&&(i=!1,l=!1,analyticsChatInteractionUpdate(o.status,o.id,t,n,r)),"open"!==o.status&&"pending"!==o.status&&"resolved"!==o.status||i||(i=!0,analyticsChatInteractionUpdate(o.status,o.id,t,n,r)),"closed"===e.data?.case?.status&&y()})}function y(i){console.log("setCustomFields - chat"),i||(i=r),cxone("chat","setCaseCustomField","language","es_US"===c?"Spanish":"English"),cxone("chat","setCaseCustomField","applaunchsource",i.applaunchsource||"mkt"),function(e){e.accountNumber&&(cxone("chat","setCaseCustomField","account_number",e.accountNumber),cxone("chat","setCaseCustomField","checkdigit",e.checkDigit),cxone("chat","setCaseCustomField","accountstatus",e.accountStatus),cxone("chat","setCaseCustomField","mcastatus",e.mcaStatus),cxone("chat","setCaseCustomField","phone_number",e.phoneNumber),cxone("chat","setCaseCustomField","email_address",e.emailAddress),cxone("chat","setCaseCustomField","service_address",e.serviceAddress),cxone("chat","setCaseCustomField","offercategory",e.offerCategory),e.tkn&&cxone("chat","setCaseCustomField","cb-token",e.tkn),cxone("guide","hidePreSurvey"))}(i),cxone("chat","setCaseCustomField","loggedin",i.accountNumber&&""!==i.accountNumber?"Y":"N"),cxone("chat","setCaseCustomField","full_name",i.firstName||"there");const a=o?o.toLowerCase():"residential";if(cxone("chat","setCaseCustomField","customer_type_nrg",a),"undefined"!=typeof s&&s.eVar5)cxone("chat","setCaseCustomField","adobe_visitor_id",function(t){if(n===e)return t;var r=new Date,o=("0"+r.getUTCFullYear()).slice(-2)+("0"+(r.getUTCMonth()+1)).slice(-2)+("0"+r.getUTCDate()).slice(-2)+("0"+r.getUTCHours()).slice(-2)+("0"+r.getUTCMinutes()).slice(-2);try{void 0!==t&&"undefined"!==t||(t=void 0!==s&&void 0!==s.eVar1?s.eVar1.replace(/[^\w\s]/gi,""):window.location.href.replace(/[^\w\s]/gi,"")).length>50&&(t=t.slice(-50)),t=t+"-"+o}catch(e){t=o+"-"+o}return t}(s.eVar5));else{var l=(new Date).getFullYear().toString()+("0"+((new Date).getMonth()+1)).slice(-2)+("0"+(new Date).getDate()).slice(-2);cxone("chat","setCaseCustomField","adobe_visitor_id",l)}cxone("chat","setCaseCustomField","chatbot",n==t&&i.chatbot?"Y":"N"),function(){const e=window.location.hostname,t=e.includes("reliant.com")&&!e.includes("dev")&&!e.includes("stg");cxone("chat","setCaseCustomField","environment",t?"PROD":"DEV")}()}document.body.addEventListener("adobeHelperFunctionsFinished",function(){new Promise(function(e,t){var n=new XMLHttpRequest,r=`${h}/getChatDetails.htm`;n.addEventListener("error",()=>{f({}),e()}),n.open("GET",r,!0),n.setRequestHeader("Content-Type","application/x-www-form-urlencoded;charset=UTF-8"),n.withCredentials=!0,n.onreadystatechange=function(){4==this.readyState&&(200==this.status?f(JSON.parse(this.responseText)):f({}),e())},n.send()})},!1),document.body.addEventListener("click",function(e){const t=e.target.closest("a[href]");if(t){const n=t.getAttribute("href");"openDockChat"!==n&&"#openDockChat"!==n||(e.preventDefault(),function(){let e=0;const t=1e4,n=setInterval(()=>{e+=100;const r=document.querySelector('button.be-label-button[data-selector="GUIDE_CHANNEL_BUTTON"]');r?(console.log("Chat button found, clicking now..."),r.click(),clearInterval(n)):e>=t&&(console.warn("Chat button not found within 10 seconds."),clearInterval(n))},100)}())}})};"loading"!==document.readyState?h():document.addEventListener("DOMContentLoaded",h);const f=()=>{let e=document.querySelectorAll(".cityselectorform select");const t=e=>{if(""!==e.currentTarget.value){let t=e.currentTarget.selectedOptions[0].getAttribute("data-href");e.currentTarget.closest(".cityselectorform").setAttribute("action",t)}};
191e.length&&e.forEach(e=>{let n=e.children;n.length&&Array.from(n).forEach(e=>{null!==e.getAttribute("data-href")&&e.getAttribute("data-href")===window.location.pathname&&e.setAttribute("hidden",!0)}),e.addEventListener("change",t)})};"loading"!==document.readyState?f():document.addEventListener("DOMContentLoaded",f);const y=e=>{if(e){const t=e.split("-");return t[0]+","+t[1]+","+t[2]}},g=(e,t,n,r,s,o)=>{if(t){const n=new Date(t);e.value=`${n.getMonth()+1}/${n.getDate()}/${n.getFullYear()}`,o?.(e.value,n,r?2:1,s)}else e.value="";const i="picker"===s?n:"picker2"===s?r:null;i&&(i.setDate(),i.navigate(new Date(i.currentYear,i.currentMonth),!0),b(n,r))},v=(e,t,n)=>{const r=Array.from(t.querySelectorAll(".qs-event"));n.forEach(t=>{if(t){const n=t.currentMonth,s=t.currentYear;r&&r.length>0&&r.forEach(t=>{const r=t.innerHTML;e.some(e=>{let o=!1;return e.dates.forEach(i=>{const a=new Date(i).getMonth(),l=new Date(i).getDate(),d=new Date(i).getFullYear();r==l&&n==a&&s===d&&(t.classList.add(`background--${e.color.replace("ui","pastel")}`,`border-color--${e.color}`,`color--${e.color}`),o=!0)}),o})})}})},w=(e,t,n)=>{let r,s;"next"===e?(r=new Date(t.currentYear,t.currentMonth).setMonth(t.currentMonth+2),s=new Date(n.currentYear,n.currentMonth).setMonth(n.currentMonth+2)):"previous"===e&&(r=new Date(t.currentYear,t.currentMonth).setMonth(t.currentMonth-2),s=new Date(n.currentYear,n.currentMonth).setMonth(n.currentMonth-2)),t.navigate(new Date(r),!0),n.navigate(new Date(s),!0),b(t,n)},b=(e,t)=>{const n=t.calendarContainer.querySelector(".qs-right"),r=e.calendarContainer.querySelector(".qs-left");n&&n.addEventListener("click",n=>{n.stopPropagation(),w("next",e,t)}),r&&r.addEventListener("click",n=>{n.stopPropagation(),w("previous",e,t)})},S=async(e=!1,t)=>{try{const{default:n}=await a.e(934).then(a.t.bind(a,934,19)),r=Array.from(document.querySelectorAll(".date-picker"));r.length>0&&r.forEach(r=>{const s=r.querySelector(".date-picker-1"),o=r.querySelector("input"),i=r.getAttribute("data-multi-month");let a,l;o.addEventListener("click",()=>{r.querySelector(".date-picker--container").classList.replace("d-none","d-block"),!e&&r.querySelector(".input-form-container__group").classList.add("d-none")});const d=JSON.parse(r.getAttribute("data-grouped-dates"));let c=[];d&&d.length>0&&d.forEach(e=>{c.push(...e.dates)}),c&&c.length>0&&(c=c.map(e=>new Date(e)));const u=c.some(e=>e.getMonth()===(new Date).getMonth())?null:c?.[0],p=u?{dateSelected:u,minDate:u}:{};if(r.getAttribute("data-date-range")){const e=new Date,t=new Date;t.setDate(e.getDate()+parseInt(r.getAttribute("data-date-range"))),e<=t?(p.minDate=e,p.maxDate=t):(p.minDate=t,p.maxDate=e)}else r.getAttribute("data-min-date")&&(p.minDate=new Date(y(r.getAttribute("data-min-date")))),r.getAttribute("data-max-date")&&(p.maxDate=new Date(y(r.getAttribute("data-max-date"))));if(s){const i=7!==s.getAttribute("data-custom-days")?.split(",").length?"":s.getAttribute("data-custom-days")?.split(","),u=12!==s.getAttribute("data-custom-months")?.split(",").length?"":s.getAttribute("data-custom-months")?.split(",");a=n(s,{formatter:(e=r.querySelector(e),t)=>{const n=t.toLocaleDateString();e.value=n},showAllDates:!0,events:c,disableYearOverlay:!0,...p,alwaysShow:!0,customDays:i,customMonths:u,onMonthChange:e=>{v(d,r,[e])},onSelect:n=>{g(o,n.dateSelected,a,l,"picker2",t),r.querySelector(".date-picker--container").classList.replace("d-block","d-none"),!e&&r.querySelector(".input-form-container__group").classList.remove("d-none")}}),a.calendarContainer.classList.add("qs-datepicker-container--one"),window.addEventListener("click",t=>{t.target.closest(".date-picker--container")||t.target.closest(".date-picker")||t.target.closest(".qs-controls")||(r.querySelector(".date-picker--container").classList.replace("d-block","d-none"),!e&&r.querySelector(".input-form-container__group").classList.remove("d-none"))})}if("true"===i){const e=7!==s.getAttribute("data-custom-days")?.split(",").length?"":s.getAttribute("data-custom-days")?.split(","),i=12!==s.getAttribute("data-custom-months")?.split(",")?"":s.getAttribute("data-custom-months")?.split(",");l=n(r.querySelector(".date-picker-2"),{showAllDates:!0,events:c,disableYearOverlay:!0,alwaysShow:!0,customDays:e,customMonths:i,...p,startDate:new Date(new Date(a.currentYear,a.currentMonth).setMonth(a.currentMonth+1)),onMonthChange:e=>{v(d,r,[e])},onSelect:e=>{g(o,e.dateSelected,a,l,"picker",t),r.querySelector(".date-picker--container").classList.replace("d-block","d-none")}}),l.calendarContainer.classList.add("qs-datepicker-container--two"),b(a,l)}v(d,r,[a,l||null])})}catch(e){console.log(e)}};"loading"!==document.readyState?S():document.addEventListener("DOMContentLoaded",S);class E{constructor(e,t={}){this.container=e,this.videoId=e.dataset.videoId,this.autoplay="1"===e.dataset.autoPlay,this.loop="1"===e.dataset.loop,this.width=e.style.width,this.height=e.style.height,this.preConnected=!1,this.player=null,this.needsYTApi=t.useYoutubeApi||navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome")||navigator.userAgent.includes("Mobi"),this.initialize()}initialize(){const e=this.container.querySelector(".video-preview");e.style.cursor="pointer",e.addEventListener("click",()=>this.activate()),this.container.addEventListener("pointerover",()=>this.warmConnections(),{once:!0}),this.container.addEventListener("focusin",()=>this.warmConnections(),{once:!0})}
191static addPrefetch(e,t,n){const r=document.createElement("link");r.rel=e,r.href=t,n&&(r.as=n),document.head.append(r)}warmConnections(){this.preConnected||(E.addPrefetch("preconnect","https://www.youtube-nocookie.com"),E.addPrefetch("preconnect","https://www.google.com"),E.addPrefetch("preconnect","https://googleads.g.doubleclick.net"),E.addPrefetch("preconnect","https://static.doubleclick.net"),this.preConnected=!0)}getParams(){const e=new URLSearchParams;return e.append("autoplay","1"),e.append("playsinline","1"),e.append("rel","0"),e.append("controls","1"),this.loop&&(e.append("loop","1"),e.append("playlist",this.videoId)),e}async fetchYTPlayerApi(){if(!(window.YT||window.YT&&window.YT.Player))return new Promise((e,t)=>{var n=document.createElement("script");n.src="https://www.youtube.com/iframe_api",n.async=!0,n.onload=()=>{YT.ready(e)},n.onerror=t,document.body.appendChild(n)})}handleStateChange(e){if(e.data===YT.PlayerState.ENDED){this.container.classList.remove("playing"),this.player&&(this.player.destroy(),this.player=null);this.container.querySelector(".video-layer").innerHTML="<div class='video-placeholder'></div>";this.container.querySelector(".video-preview").style.display="block",this.loop?this.activate():(this.container.dataset.autoPlay="0",this.autoplay=!1)}else e.data===YT.PlayerState.PLAYING&&this.container.classList.add("playing")}async addYTPlayerIframe(){await this.fetchYTPlayerApi();const e=document.createElement("div");this.container.querySelector(".video-layer").appendChild(e);const t=Object.fromEntries(this.getParams().entries());return new Promise(n=>{this.player=new YT.Player(e,{width:"100%",height:"100%",videoId:this.videoId,playerVars:t,events:{onReady:e=>{e.target.playVideo(),n(this.player)},onStateChange:e=>this.handleStateChange(e)}})})}createBasicIframe(){const e=document.createElement("iframe");return e.width="100%",e.height="100%",e.allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture",e.allowFullscreen=!0,e.src=`https://www.youtube-nocookie.com/embed/${encodeURIComponent(this.videoId)}?${this.getParams().toString()}`,e}async activate(){if(this.container.querySelector(".video-preview").style.display="none",this.needsYTApi)return this.playerPromise=this.addYTPlayerIframe(),this.playerPromise;const e=this.container.querySelector(".video-layer"),t=this.createBasicIframe();e.appendChild(t),this.container.classList.add("playing"),t.focus()}}const L=()=>{document.querySelectorAll(".video").forEach(e=>{new E(e,{useYoutubeApi:!0})})};"loading"!==document.readyState?L():document.addEventListener("DOMContentLoaded",L),function(){function e(){document.querySelectorAll(".cmp-experiencefragment").forEach(function(e){var t=e.getAttribute("data-experiences");if(t){var n=JSON.parse(t),r=Object.keys(n),s=m("ReliantLoginState_shared");s=null!=s?s.toLowerCase():"",r.includes(s)&&function(e,t){e&&fetch(e).then(function(e){if(e.ok)return e.text();throw new Error("Not2xxresponse",{cause:e})}).then(function(e){t.innerHTML=e}).catch(function(e){console.warn("ErrorinjectXfContent.",e)})}(n[s],e)}})}"loading"!==document.readyState?e():document.addEventListener("DOMContentLoaded",e)}();const C=()=>{const e="alertClosed",t=document.getElementsByClassName("alert-dismissible");Array.from(t).forEach(t=>{"true"!==function(e){let t=e+"=",n=decodeURIComponent(document.cookie).split(";");for(let e=0;e<n.length;e++){let r=n[e];for(;" "==r.charAt(0);)r=r.substring(1);if(0==r.indexOf(t))return r.substring(t.length,r.length)}return""}(`${e}${t.id}`)?t.classList.add("show"):t.classList.add("d-none")});const n=document.querySelectorAll("[data-bs-dismiss='alert']");Array.from(n).forEach(t=>{t.addEventListener("click",()=>{const n=t.closest(".alert-dismissible");!function(e,t,n){const r=new Date;r.setTime(r.getTime()+24*n*60*60*1e3);let s="expires="+r.toUTCString();document.cookie=e+"="+t+";"+s+";path=/"}(`${e}${n.id}`,"true",1)})})};"loading"!==document.readyState?C():document.addEventListener("DOMContentLoaded",C);const A=()=>{const e=document.querySelectorAll(".remove-active-page-link");if(e.length>0){const t=location.pathname.replace(/\//g,"").toLowerCase();
191e.forEach(e=>{const n=e.querySelectorAll("a");n.length>0&&n.forEach(e=>{const n=e.getAttribute("href");t.indexOf(n?.replace(/\//g,"").toLowerCase())>-1&&e.parentElement.remove()})})}},T=()=>{document.querySelectorAll(".modal").length>0&&(document.addEventListener("hidden.bs.modal",function(){document.body.classList.remove("modal-open")}),document.addEventListener("shown.bs.modal",function(){document.body.classList.add("modal-open")}))},x=(e=document)=>{"object"==typeof e&&null!==e&&"querySelectorAll"in e||(e=document);const t=e.querySelectorAll("[data-viewtype='zipcode']"),n=e.querySelectorAll("[data-viewtype='city']"),r=e.querySelectorAll("#rewardsNumber"),s=e.querySelectorAll("#rewardsFirstName"),o=e.querySelectorAll("#rewardsLastName");function i(e,t){e.target.value=e.target.value.replace(t,"")}Array.from(t).forEach(e=>{e.addEventListener("input",e=>i(e,new RegExp(/[^\d]/,"ig")))}),Array.from(n).forEach(e=>{e.addEventListener("input",e=>i(e,new RegExp(/[^a-z ]/,"ig")))}),Array.from(r).forEach(e=>{e.addEventListener("input",e=>i(e,new RegExp(/[^\d]/,"ig")))}),Array.from(s).forEach(e=>{e.addEventListener("input",e=>i(e,new RegExp(/[^a-z ]/,"ig")))}),Array.from(o).forEach(e=>{e.addEventListener("input",e=>i(e,new RegExp(/[^a-z ]/,"ig")))})},P=()=>{new URLSearchParams(window.location.search).forEach((e,t)=>{const n=[...Array.from(document.querySelectorAll(`[data-viewtype="${t}"]`)),...Array.from(document.querySelectorAll(`#${t}`))];n.length>0&&n.forEach(t=>{t&&"INPUT"===t.nodeName&&(t.value=e)})})},I=(e=document)=>{"object"==typeof e&&null!==e&&"querySelectorAll"in e||(e=document);let t=e.querySelectorAll("[data-viewtype='phonenumber']");Array.from(t).forEach(e=>{e.addEventListener("input",function(){e.value=function(e){if(!e)return e;const t=e.replace(/[^\d]/g,""),n=t.length;return n<4?t:n<7?`${t.slice(0,3)}-${t.slice(3)}`:`${t.slice(0,3)}-${t.slice(3,6)}-${t.slice(6,10)}`}(e.value)})})};const M=(e=document)=>{"object"==typeof e&&null!==e&&"querySelectorAll"in e||(e=document);let t=e.querySelectorAll("form.preventHashKey");const n=e=>{e.target.value.includes("#")&&(e.target.value=e.target.value.replace(/#/g,""))};Array.from(t).forEach(e=>{const t=e.elements;Array.from(t).forEach(e=>{e.addEventListener("input",n)})})};"loading"!==document.readyState?A():document.addEventListener("DOMContentLoaded",A),"loading"!==document.readyState?x():document.addEventListener("DOMContentLoaded",x),window.ContextHub&&window.ContextHub.eventing&&window.ContextHub.eventing.on(ContextHub.SegmentEngine.PageInteraction.Teaser.prototype.info.loadEvent,function(e,t){t.data.forEach(e=>{var t=window.document.getElementById(e.key);t&&x(t)})});const _=()=>{const e=document.getElementById("learn-more-btn"),t=document.querySelectorAll(".hub-page .col-md-4"),n=document.querySelector("#learn-more-btn .textIconContainer__text");if(!e||!n||t.length<=6)return void(e&&(n.style.display="none",e.style.display="none"));let r=0;if(t.length>6){document.querySelectorAll(".hub-page .col-md-4:nth-child(n+7)").forEach(e=>{e.style.display="none"})}e.addEventListener("click",function(s){s.preventDefault(),r++;const o=6+6*r;for(let e=0;e<o&&e<t.length;e++)t[e].style.display="block";o>=t.length&&(e.style.display="none",n.style.display="none")})};"loading"!==document.readyState?_():document.addEventListener("DOMContentLoaded",_);const k=async()=>{const e=[],t=Array.from(document.querySelectorAll("[data-match-height]"));if(t.length>0&&t.forEach(t=>{const n=t.closest(".row");n&&!e.includes(n)&&e.push(n)}),e.length>0)for(const t of e){var n=Array.prototype.slice.call(t.querySelectorAll("[data-match-height]")),r={};for(const e of n){var s=e.getAttribute("data-match-height");e.style.minHeight="auto",e.style.height="auto";let t=await O(e);Object.prototype.hasOwnProperty.call(r,s)?Object.defineProperty(r,s,{value:Math.max(r[s],t.clientHeight),configurable:!0,writable:!0,enumerable:!0}):r[s]=t.clientHeight}var o=r;Object.getOwnPropertyNames(o).forEach(function(e){for(var n=t.querySelectorAll("[data-match-height='"+e+"']"),r=n.length,s=0;s<r;s++)n[s].style.height=Object.getOwnPropertyDescriptor(o,e).value+"px"})}window.addEventListener("deviceorientation",k)},O=e=>new Promise((t,n)=>{let r=e.querySelector("img");r?r.complete?t(e):(r.onload=()=>t(e),r.onerror=()=>n("Error loading image")):t(e)});"loading"!==document.readyState?k():(document.addEventListener("DOMContentLoaded",k),window.addEventListener("resize",()=>k()));const D=()=>{let e=document.querySelectorAll(".overflowText");const t=()=>
191{e.forEach(e=>{const n=(r=e).offsetHeight<r.scrollHeight||r.offsetWidth<r.scrollWidth;var r;const s=e.nextElementSibling;s&&(n||s.innerHTML===s.dataset.showless?(s.classList.remove("d-none"),s.onclick||(s.onclick=function(n){!function(e,n){n.currentTarget.classList.toggle("shown"),e.classList.toggle("card-text-sm"),n.currentTarget.innerHTML.trim()===n.currentTarget.dataset.showmore?.trim()?n.currentTarget.innerHTML=n.currentTarget.dataset.showless?.trim():(n.currentTarget.innerHTML=n.currentTarget.dataset.showmore?.trim(),t())}(e,n)})):s.classList.add("d-none"))})};let n;e.length&&(t(),window.addEventListener("resize",function(){var e,r;e=t,r=250,n||(n=!0,setTimeout(()=>{e(),n=!1},r))}))};"loading"!==document.readyState?D():document.addEventListener("DOMContentLoaded",D),"loading"!==document.readyState?P():document.addEventListener("DOMContentLoaded",P),function(){if(window.ContextHub&&window.ContextHub.eventing){const e=new URLSearchParams(window.location.search);window.ContextHub.eventing.on(ContextHub.SegmentEngine.PageInteraction.Teaser.prototype.info.loadEvent,function(t,n){n.data.forEach(t=>{var n=window.document.getElementById(t.key);n&&((e,t)=>{e.forEach((e,n)=>{const r=[...Array.from(t.querySelectorAll(`[data-viewtype="${n}"]`)),...Array.from(t.querySelectorAll(`#${n}`))];r.length>0&&r.forEach(t=>{t&&"INPUT"===t.nodeName&&(t.value=e)})})})(e,n)})})}}(),"undefined"!=typeof window&&(window.onscroll=function(){q()});const q=()=>{document.body.scrollTop>100||document.documentElement.scrollTop>100?(document.querySelector(".scroll")?.classList.add("is-scrolling","py-1"),document.querySelector(".scroll")?.classList.remove("py-2"),document.querySelector(".sticky-header-container")?.classList.add("is-scrolling")):(document.querySelector(".scroll")?.classList.remove("is-scrolling","py-1"),document.querySelector(".scroll")?.classList.add("py-2"),document.querySelector(".sticky-header-container")?.classList.remove("is-scrolling"))};"loading"!==document.readyState?q():(document.addEventListener("DOMContentLoaded",q),document.addEventListener("scroll",q));const N=()=>{document.querySelectorAll("select").forEach(e=>{e.addEventListener("change",()=>{e.blur()})})},B=()=>{const e=document.querySelectorAll("#blog-categories");e&&e.length>0&&e.forEach(e=>{e.addEventListener("change",function(){const t=e.options[e.selectedIndex].getAttribute("data-href");t&&(window.location.href=t)})})};"loading"!==document.readyState?(N(),B()):(document.addEventListener("DOMContentLoaded",N),document.addEventListener("DOMContentLoaded",B));const z=(e=document)=>{"object"==typeof e&&null!==e&&"querySelectorAll"in e||(e=document);var t=e.querySelectorAll(".needs-validation");Array.prototype.slice.call(t).forEach(function(t){"login"===t.getAttribute("name")&&function(e){var t=e.querySelectorAll("[data-input-name]");t&&Array.prototype.slice.call(t).forEach(function(e){var t=e.getAttribute("data-input-name");if(t){var n=e.querySelectorAll("input");Array.prototype.slice.call(n).forEach(function(e){e.setAttribute("name",t)})}})}(t),t.addEventListener("submit",function(n){let r=Array.from(t.elements).filter(e=>["select","textarea","input"].includes(e.tagName.toLowerCase()));r=r.filter(e=>"checkbox"!==e.getAttribute("type"));let s=!0;r.forEach(e=>{s=function(e,t){let n=t;const r=e.closest(".input-form-container")?e.closest(".input-form-container"):e.parentElement;return e.checkValidity()?r.classList.remove("is-value-missing"):(n=!1,e.validity.valueMissing?r.classList.add("is-value-missing"):r.classList.remove("is-value-missing")),n}(e,s)});const o=function(e){let t=!0,n=e.querySelectorAll(".checkbox-group.required");return Array.from(n).map(e=>{0===e.querySelectorAll(".checkbox-input:checked").length?(e.closest(".checkbox-form-container").classList.add("is-value-missing"),t=!1):e.closest(".checkbox-form-container").classList.remove("is-value-missing")}),t}(t);if(s=s&&o,"confirmEmail"===n.target.getAttribute("data-validationtype")){const t=function(){var t=e.querySelector("input[data-matchvalue]");if(null===t)return null;var n=e.getElementById(t.getAttribute("data-matchvaluewith"));return null===n?null:(n.setCustomValidity(""),t.value&&!n.value?(n.setCustomValidity(!0),!1):n.value===t.value||(n.setCustomValidity(!0),!1))}();s=null===t?s:t}if("login-reliant-rewards"===t.getAttribute("id")){if(null!==t.querySelector("input[name='dl_dest']")){p("DL_DEST",t.querySelector("input[name='dl_dest']").value,20,".reliant.com")}if(null!==t.querySelector("input[name='dl_src']")){p("DL_SRC",t.querySelector("input[name='dl_src']").value,20,".reliant.com")}}"outage-report-form"!==t.getAttribute("name")&&"outage-report-tdsp-search-form"!==t.getAttribute("name")&&"lubbockForm"!==t.getAttribute("name")&&"solarForm"!==t.getAttribute("name")&&"security-form"!==t.getAttribute("name")&&"mover-concierge-form"!==t.getAttribute("name")&&"propertyManagerContact-form"!==t.getAttribute("name")&&"zipcode-address-referral"!==t.getAttribute("name")&&"billEstimatorAddressForm"!==t.getAttribute("name")&&"billEstimatorSpecsForm"!==t.getAttribute("name")&&"newsletter-signup-form"!==t.getAttribute("name")&&"ccpa-request-form"!==t.getAttribute("name")&&"solarLead"!==t.getAttribute("name")&&"referFriend"!==t.getAttribute("name")&&"friendlyPerksForm"!==t.getAttribute("name")&&"prepCompleteForm"!==t.getAttribute("name")&&"quoteforCommercialElectricityForm"!==t.getAttribute("name")&&"sunGrant"!==t.getAttribute("name")&&function(e,t,n,r){n&&t.checkValidity()?(e.detail&&e.detail.href&&(r.action=e.detail.href),r.submit()):(e.preventDefault(),e.stopPropagation())}(n,t,s,this),t.classList.add("was-validated")},!1),function(e){const t=e.querySelectorAll("div[data-submitbtn]");Array.prototype.slice.call(t).forEach(function(t){if(t){const n=t.querySelector("a"),r=t.getAttribute("data-href");n&&n.addEventListener("click",t=>{t.preventDefault(),t.stopPropagation(),e.dispatchEvent(new CustomEvent("submit",{detail:{href:r}}))},!1)}})}(t)})};"loading"!==document.readyState?z():document.addEventListener("DOMContentLoaded",z),window.ContextHub&&window.ContextHub.eventing&&window.ContextHub.eventing.on(ContextHub.SegmentEngine.PageInteraction.Teaser.prototype.info.loadEvent,function(e,t){t.data.forEach(e
191=>{var t=window.document.getElementById(e.key);t&&z(t)})});const F=()=>{var e,t=null!==document.querySelector("[data-audio-site-hash]")&&document.querySelector("[data-audio-site-hash]").getAttribute("data-audio-site-hash").length>0?document.querySelector("[data-audio-site-hash]").getAttribute("data-audio-site-hash"):"";e=function(){window.__AudioEyeSiteHash=t;var e=document.createElement("script");e.src="https://wsmcdn.audioeye.com/aem.js",e.type="text/javascript",e.setAttribute("async",""),document.getElementsByTagName("body")[0].appendChild(e)},"complete"!==document.readyState?window.addEventListener?window.addEventListener("load",e):window.attachEvent&&window.attachEvent("onload",e):e()};"loading"!==document.readyState?F():document.addEventListener("DOMContentLoaded",F);const R=()=>{const e=Array.from(document.querySelectorAll("#zipcode-address-referral-form"));e.length>0&&e.forEach(e=>{const t=Array.from(e.querySelectorAll("[name='serviceType']"));t.length>0&&t.forEach(t=>{t.addEventListener("change",()=>{((e,t)=>{"residentialAccount"===e.value?(t.querySelector(".residential-inputs").style.display="block",t.action=t.dataset.residentialAccountUrl):"businessAccount"===e.value&&(t.querySelector(".residential-inputs").style.display="none",t.action=t.dataset.businessAccountUrl)})(t,e)})})})},G=()=>{window.addEventListener("load",function(){const e=document.querySelectorAll("#goal-zero-form");e.length>0&&Array.prototype.slice.call(e).forEach(function(e){const t=e.dataset.apiUrl;e.querySelector("button").addEventListener("click",function(){fetch(t,{method:"GET",credentials:"include"}).then(e=>e.json()).then(t=>{if(t){let n=U("email",t.email),r=U("userKey",t.userKey);e.appendChild(n),e.appendChild(r),e.action=t.action,e.submit()}}).catch(e=>{console.error("Error:",e)})})})})},V=()=>{Array.from(document.querySelectorAll("[name='zipcodeAddressCustomerServiceBusinessForm']")).forEach(e=>{Array.from(e.querySelectorAll("[type='radio']")).forEach(t=>{t.addEventListener("change",()=>{(e=>{const t=e.querySelector("input[name='existingCustomerChoice']:checked"),n=e.querySelector("input[name='changingProvidersChoice']:checked"),r=e.querySelector("#fieldOptions1"),s=e.querySelector("#fieldOptions2");if("Yes"===t?.value)e.querySelector("#changingProvidersChoice-changePlan").closest("div").setAttribute("style","display: flex !important");else{const t=e.querySelector("#changingProvidersChoice-changePlan");t.checked&&(t.checked=!1,n.value=void 0),t.closest("div").setAttribute("style","display: none !important")}"MVI"===n?.value||"SWI"===n?.value?(r.setAttribute("style","display: block !important"),s.setAttribute("style","display: none !important")):"changePlan"===n?.value?(r.setAttribute("style","display: none !important"),s.setAttribute("style","display: block !important")):(r.setAttribute("style","display: none !important"),s.setAttribute("style","display: none !important"))})(e)})})})},$=()=>{Array.from(document.querySelectorAll(".add-hidden-fields")).forEach(e=>{H(e)})},H=e=>{const t=j(e),n=new URL(window.location);let r=[];n.searchParams.forEach((e,t)=>{r=[...r,{name:t,value:e}]}),r.map(({name:n,value:r})=>{if(r&&-1===t.indexOf(n)){let t=U(n,r);e.appendChild(t)}})},j=e=>Array.from(e.elements).filter(e=>["select","textarea","input"].includes(e.tagName.toLowerCase())).map(e=>e.getAttribute("name")||e.getAttribute("id")),U=(e,t)=>{let n=document.createElement("input");return n.type="hidden",n.name=e,n.id=e,n.value=t,n},Y=()=>{if(null===document.querySelector("#gmRewardsFormLookup"))return;const e=document.querySelector("#gm-rewards-form"),t=e.checkValidity();e.querySelector("button").addEventListener("click",function(){t&&e.submit()})},W=()=>{const e=document.querySelector("form.zipCodeAdressName");if(null===e)return;const t=new URL(window.location).searchParams.get("fromLP"),n=document.querySelector("label[for='loyaltyName']"),r=document.querySelector("label[for='loyaltyNumber']"),s=document.getElementById("loyaltyName"),o=document.getElementById("loyaltyNumber"),i=document.querySelector(`.fromLP--${t}`);if(!t||!["American","Southwest","United"].includes(t))return n.innerHTML="??????",void(r.innerHTML="??????");if(n.innerHTML=s.getAttribute(`data-${t.toLowerCase()}`),r.innerHTML=o.getAttribute(`data-${t.toLowerCase()}`),i.classList.remove("d-none"),t&&"American"===t){var a=document.createElement("input");a.type="hidden",a.name="customer",a.id="customer",a.value="New",e.appendChild(a)}},X=()=>{const e=document.querySelector("#zipcode-address-referral-form");null!==e&&e.addEventListener("submit",t=>{t.preventDefault(),fetch(e.dataset.validateReferralUrl,{method:"post",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({serviceType:e.querySelector("input[name='serviceType']:checked").value,streetAddress:e.querySelector("input[name='streetAddress']").value,unitNum:e.querySelector("input[name='unitNum']").value,zipcode:e.querySelector("input[name='zipcode']").value,txtReferralID:e.querySelector("input[name='txtReferralID']").value})}).then(e=>e.text()).then(t=>{"true"===t&&""!=e.querySelector("input[name='txtReferralID']").value?e.submit():e.querySelector("input[name='txtReferralID']").setCustomValidity(!1)}).catch(e=>{console.error("Error:",e)})})},Z={D0001:"centerPointEnergy",D0002:"oncor",D0003:"texasNewMexicoPower",D0004:"aepTexas"},K={"CENTERPOINT ENERGY":"centerPointEnergy",ONCOR:"oncor","TEXAS-NEW MEXICO POWER COMPANY":"texasNewMexicoPower","AEP TEXAS CENTRAL":"aepTexas"},J={response:"singleTdsp",esid:"",tdspData:{tdspCode:"08901",tdspName:"CenterPoint Energy",geoZone:"INF"},addressData:{unitNum:"",streetNum:"123",streetName:"test",city:"Humble",state:"TX",zipcode:"77346",zipcodeComplete:"",poBox:"",country:"US",trilliumMatchStatus:"NO_MATCH",trilliumCallStatus:"SYS_ER
191ROR",houseType:null,formattedAddress:"123 test, Humble, TX 77346",formattedAddressWithFullZipcode:"123 test, Humble, TX",streetAddress:"123 test",addressLine1:"123 test"},clickAction:null},Q=()=>{const e=document.querySelectorAll(".outage"),t=ne(),n=t?Z[t]:null;Array.prototype.slice.call(e).forEach(function(e){const t=e.querySelector("#outage-report-form");n&&te(t,n,e),t.addEventListener("submit",n=>{n.preventDefault();if(t.checkValidity()){const n=new FormData(t).get("TDSP");te(t,n,e)}})})},ee=()=>{const e=document.querySelectorAll(".outage");Array.prototype.slice.call(e).forEach(function(e){const t=e.querySelector("#outage-report-tdsp-search-form"),n=e.querySelector("#outage-report-form");t.addEventListener("submit",r=>{r.preventDefault(),r.stopPropagation();if(t.checkValidity()){const r=new URLSearchParams(new FormData(t)).toString(),s=t.dataset.apiUrl;re(s,r).then(function(r){const s=t.querySelector(".tdsp-not-found");if(-1===r&&s.classList.add("d-block"),r in K){e.querySelector("#tdspSearch").classList.remove("show","active"),s.classList.remove("d-block"),te(n,K[r],e)}})}})})},te=(e,t,n)=>{const r=n.querySelector(`#${t}`);e.classList.remove("show","active"),r.classList.add("show","active");const s=r.querySelector("[id^='outageReportAlt']");s&&s.addEventListener("click",t=>{t.preventDefault(),e.classList.add("show","active"),r.classList.remove("show","active")})},ne=()=>{let e="tdspCookie_shared=",t=document.cookie.split(";");for(var n=0;n<t.length;n++){let r=t[n];for(;" "==r.charAt(0);)r=r.substring(1);if(0==r.indexOf(e))return r.substring(18,r.length)}},re=async(e,t)=>e?fetch(e,{method:"POST",body:t,headers:{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8"}}).then(e=>e.json()).then(function(e){return"singleTdsp"===e.response?e?.tdspData?.tdspName.toUpperCase():"multiTdsp"===e.response||"noTdsp"===e.response?-1:void 0}).catch(function(){return-1}):J?.tdspData?.tdspName.toUpperCase(),se=()=>{if(window.location.href.indexOf("tdsp-information")>-1){const e=new URLSearchParams(window.location.search),t=Object.fromEntries(e.entries()),n=document.getElementById("centerPointEnergy"),r=document.getElementById("Oncor"),s=document.getElementById("texasNewMexicoPower"),o=document.getElementById("aepTexasNorthCentral");switch(t.tdsp){case"D0001":n.style.display="block",r.style.display="none",s.style.display="none",o.style.display="none";break;case"D0002":n.style.display="none",r.style.display="block",s.style.display="none",o.style.display="none";break;case"D0003":n.style.display="none",r.style.display="none",s.style.display="block",o.style.display="none";break;case"D0004":n.style.display="none",r.style.display="none",s.style.display="none",o.style.display="block";break;default:n.style.display="block",r.style.display="block",s.style.display="block",o.style.display="block"}}},oe=()=>{const e=document.getElementById("propertyManagerContact-form");e?.addEventListener("submit",t=>{t.preventDefault();if(e.checkValidity()){const t=new URLSearchParams(new FormData(e)).toString(),n=e.dataset.formUrl;ie(n,t).then(t=>{t>=200&&t<400&&(window.location.href=e.dataset.redirectUrl)})}})},ie=async(e,t)=>{if(e)return fetch(e,{method:"POST",body:t,headers:{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8"}}).then(e=>e.status).catch(function(){return-1})};"loading"!==document.readyState?R():document.addEventListener("DOMContentLoaded",R),"loading"!==document.readyState?V():document.addEventListener("DOMContentLoaded",V),"loading"!==document.readyState?G():document.addEventListener("DOMContentLoaded",G),"loading"!==document.readyState?$():document.addEventListener("DOMContentLoaded",$),"loading"!==document.readyState?Y():document.addEventListener("DOMContentLoaded",Y),"loading"!==document.readyState?W():document.addEventListener("DOMContentLoaded",W),"loading"!==document.readyState?X():document.addEventListener("DOMContentLoaded",X),"loading"!==document.readyState?Q():document.addEventListener("DOMContentLoaded",Q),"loading"!==document.readyState?ee():document.addEventListener("DOMContentLoaded",ee),"loading"!==document.readyState?se():document.addEventListener("DOMContentLoaded",se),"loading"!==document.readyState?oe():document.addEventListener("DOMContentLoaded",oe),"loading"!==document.readyState?z():document.addEventListener("DOMContentLoaded",z);const ae=()=>{const e=document.querySelector("#lubbockFormContainer");if(e){const t=e.querySelector("#lubbockForm"),n=Array.from(t.querySelectorAll(".input-form-container")),r=e.querySelector(".thank-you"),s=e.querySelector("input[name='Language_Preference__c']");let o=m("langCodeCookie");s.value="es_US"==o?"Spanish":"English",t.addEventListener("submit",e=>{e.preventDefault(),e.stopPropagation(),t.classList.contains("was-validated")&&(n.some(e=>e.classList.contains("is-value-missing"))||(t.classList.add("d-none"),r.classList.replace("d-none","d-block"),le("https://static.myreliant.com/lubbock-form/token.php").then(e=>{if(-1!=e){const n=new FormData(t),r=Object.fromEntries(n);r.Company=r.LastName,r.Most_Interested_Topic_s__c=n.getAll("Most_Interested_Topic_s__c").join(";"),r.Preferred_Contact__c=n.getAll("Preferred_Contact__c").join(";
191"),delete r.CEmail,delete r.id,delete r.viewMode,"undefined"!=typeof window&&void 0!==window.dataLayerInternal&&(window.dataLayerInternal.customFormCity=r.City,window.dataLayerInternal.customFormState=r.StateCode,window.dataLayerInternal.customFormZip=r.PostalCode,window.dataLayerInternal.customFormOwn=r.Own_Rent_Lease__c,window.dataLayerInternal.customFormPrefContact=r.Preferred_Contact__c,window.dataLayerInternal.customFormInterstedTopic=r.Most_Interested_Topic_s__c,window.dataLayerInternal.customFormCompany=r.LastName,r.Adobe_Visitor_ID__c=window.dataLayerInternal?.analyticsVisitorId);const s=JSON.stringify(r);de("https://directenergy.my.salesforce.com/services/data/v56.0/sobjects/lead",e,s)}})))})}},le=async e=>await fetch(e,{method:"GET"}).then(e=>e.body).then(e=>{const t=e.getReader();return new ReadableStream({start(e){!function n(){t.read().then(({done:t,value:r})=>{t?e.close():(e.enqueue(r),n())})}()}})}).then(e=>new Response(e,{headers:{"Content-Type":"text/html"}}).text()).catch(e=>{console.log(e)}),de=async(e,t,n)=>{if(e)try{const r=await fetch(e,{method:"POST",headers:{"Access-Control-Allow-Headers":"Authorization","Access-Control-Allow-Origin":"*","Access-Control-Allow-Credentials":"true","Access-Control-Request-Headers":"Authorization","Access-Control-Allow-Methods":"OPTIONS,POST,GET","Content-Type":"application/json",Authorization:"Bearer "+t},body:n});if(!r.ok){void 0!==window.dataLayerInternal&&(window.dataLayerInternal.customFormResponseId="FailedSalesForceID"),void 0!==window.analyticsDynamicLoad&&window.analyticsDynamicLoad("PAGE","residential:electricity:areas-we-serve:west-texas:lubbock-form:home:confirm","","Sales Force Call Failed","Sales Force Call Failed","Non Visible");const e=await r.text();throw new Error(e)}{let e=await r.json();void 0!==window.dataLayerInternal&&(window.dataLayerInternal.customFormResponseId=e.id),void 0!==window.analyticsDynamicLoad&&window.analyticsDynamicLoad("PAGE","residential:electricity:areas-we-serve:west-texas:lubbock-form:home:confirm","","","","")}}catch(e){console.log(e)}};"loading"!==document.readyState?ae():document.addEventListener("DOMContentLoaded",ae);const ce=()=>{"loading"!==document.readyState?ue():document.addEventListener("DOMContentLoaded",ue)},ue=()=>{const e=document.querySelector("#solarForm");if(!e)return;const t=e.querySelector("a.btn--primary-brand-ui");t&&he(e,t),document.getElementById("Contact_Phone__c").addEventListener("input",function(e){var t=e.target.value.replace(/\D/g,"").match(/(\d{0,3})(\d{0,3})(\d{0,4})/);e.target.value=t[2]?"("+t[1]+") "+t[2]+(t[3]?"-"+t[3]:""):t[1]}),t.addEventListener("click",function(t){t.preventDefault(),t.stopPropagation();e.checkValidity()&&pe("https://static.myreliant.com/salesforce-token/get.php").then(t=>{const n=new FormData(e);for(var r=0;r<e.elements.length;r++)"checkbox"===e.elements[r].type&&(e.elements[r].checked?n.append(e.elements[r].value,!0):n.append(e.elements[r].value,!1));let s=Object.fromEntries(n);"undefined"!=typeof window&&void 0!==window.dataLayerInternal&&(s.Adobe_Visitor_ID__c=window.dataLayerInternal?.analyticsVisitorId),Object.hasOwn(s,"sid")&&(s.campaign__c=s.sid);const o=["Adobe_Visitor_ID__c","Anything_else_you_d_like_us_to_know__c","campaign__c","City__c","Contact_Email__c","Contact_First_Name__C","Contact_Last_Name__c","Contact_Phone__c","Do_you_own_or_rent__c","Early_Afternoon__c","Early_Evening__c","Early_Morning__c","Email__c","GME_Customer__c","Late_Afternoon__c","Late_Evening__c","Late_Morning__c","Phone__c","RecordTypeId","State_Province__c","Street_Address1__c","Text__c","When_do_you_want_to_have_solar_panels_in__c","Why_do_you_want_to_install_solar_panels__c","Zip_Postal_Code__c","house_already_has_panels__c"];Object.keys(s).forEach(function(e){o.includes(e)||delete s[e]}),me(e,"https://nrg.my.salesforce.com/services/data/v42.0/sobjects/Custom_Lead__c",s,t)})})},pe=async e=>await fetch(e,{method:"GET"}).then(e=>e.body).then(e=>{const t=e.getReader();return new ReadableStream({start(e){!function n(){t.read().then(({done:t,value:r})=>{t?e.close():(e.enqueue(r),n())})}()}})}).then(e=>new Response(e,{headers:{"Content-Type":"text/html"}}).text()),me=async(e,t,n,r)=>{try{let s=await(async({url:e,formData:t,token:n})=>{const r={method:"POST",headers:{"Access-Control-Allow-Headers":"Authorization","Access-Control-Allow-Origin":"*","Access-Control-Allow-Credentials":"true","Access-Control-Request-Headers":"Authorization","Access-Control-Allow-Methods":"OPTIONS,PO
191ST,GET","Content-Type":"application/json",Authorization:"Bearer "+n},body:JSON.stringify(t)},s=await fetch(e,r);if(!s.ok){const e=await s.text();throw new Error(e)}return s.json()})({url:t,formData:n,token:r});if(s?.errors?.length>0)return;((e,t)=>{p("COID",t.id,60),p("buildingOwnershipInfo",e.Do_you_own_or_rent__c,60),p("solarPanelInfo",`${e.When_do_you_want_to_have_solar_panels_in__c} | ${e.Why_do_you_want_to_install_solar_panels__c}`,60),p("solarPanelInstalled",e.house_already_has_panels__c,60),p("serviceZipcode",e.Zip_Postal_Code__c,60),p("serviceState",e.State_Province__c,60),p("serviceCity",e.City__c,60)})(n,s),window.location.assign(e.getAttribute("action"))}catch(e){console.error(e)}},he=(e,t)=>{const n=t.getAttribute("href");t.addEventListener("click",t=>{t.preventDefault(),t.stopPropagation(),e.setAttribute("action",n),e.dispatchEvent(new MouseEvent("click"))},!1)};"loading"!==document.readyState?ce():document.addEventListener("DOMContentLoaded",ce);let fe=null;const ye=()=>(null===fe&&(fe="undefined"!=typeof window?new URLSearchParams(window.location.search):new URLSearchParams),fe),ge=e=>encodeURIComponent(e),ve=e=>{try{return decodeURIComponent(e)}catch(e){return null}},we=new WeakMap,be=(e={})=>{const{formSelector:t,param:n,persist:r=!1,caseInsensitive:s=!1,crossSite:o}=e,i=e.hiddenInputName||n;if(!t||!n)return void console.warn("queryParamCapture: 'formSelector' and 'param' are required.");const a=`qpc_${n}`;let l=s?(e=>{const t=e.toLowerCase();for(const[e,n]of ye())if(e.toLowerCase()===t)return n;return null})(n):ye().get(n);if(l){if(r)if(o){const e=void 0!==o.minutes?o.minutes:525600;p(a,ge(l),e,o.domain||void 0)}else try{sessionStorage.setItem(a,ge(l))}catch(e){}}else r&&(l=o?ve(m(a)||""):(e=>{try{return ve(sessionStorage.getItem(e)||"")}catch(e){return null}})(a));if(!l)return;const d=document.querySelectorAll(t);d.length&&d.forEach(e=>{const t=(e=>{if(we.has(e))return we.get(e);const t=new Map;return we.set(e,t),t})(e),n=t.get(i);if(n)n.value=l;else{let n=e.querySelector(`input[name="${CSS.escape(i)}"]`);n||(n=document.createElement("input"),n.type="hidden",n.name=i,n.id=i,e.appendChild(n)),n.value=l,t.set(i,n)}})},Se=(e="gclid-energy-quote")=>{if("gclid-energy-quote"===e)be({formSelector:".businessEnergyQuoteForm form",param:"gclid",hiddenInputName:"Google_Click_ID__c",persist:!0});else console.warn("queryParamCaptureWWW: Invalid type")};function Ee(e,t=0){return setTimeout(e,t)}function Le(){return Date.now()}function Ce(e,t="x"){const n=function(e){return window.getComputedStyle(e,null)}(e),r=n.transform||n.webkitTransform;if(!r||"none"===r)return 0;const s=new DOMMatrixReadOnly(r);return"x"===t?s.m41:s.m42}function Ae(e){return"object"==typeof e&&null!==e&&!!e.constructor&&"Object"===Object.prototype.toString.call(e).slice(8,-1)}function Te(e){return"undefined"!=typeof HTMLElement&&e instanceof HTMLElement||!!e&&"object"==typeof e&&(1===e.nodeType||11===e.nodeType)}function xe(e,...t){const n=Object(e);for(let e=0;e<t.length;e+=1){const r=t[e];if(null==r||Te(r))continue;const s=r,o=Object.keys(Object(s));for(let e=0,t=o.length;e<t;e+=1){const t=o[e];if("__proto__"===t||"constructor"===t||"prototype"===t)continue;const r=Object.getOwnPropertyDescriptor(s,t);if(!r||!r.enumerable)continue;const i=s[t];Ae(n[t])&&Ae(i)?i.__swiper__?n[t]=i:xe(n[t],i):!Ae(n[t])&&Ae(i)?(n[t]={},i.__swiper__?n[t]=i:xe(n[t],i)):n[t]=i}}return n}function Pe(e,t,n){e.style.setProperty(t,n)}function Ie(e,t=""){const n=[...e.children];return e instanceof HTMLSlotElement&&n.push(...e.assignedElements()),t?n.filter(e=>e.matches(t)):n}function Me(e){try{console.warn(e)}catch{}}function _e(e,t=[]){const n=document.createElement(e);return n.classList.add(...Array.isArray(t)?t:function(e=""){return e.trim().split(" ").filter(e=>!!e.trim())}(t)),n}function ke(e,t){return window.getComputedStyle(e,null).getPropertyValue(t)}function Oe(e){if(e&&e.parentNode)return[...e.parentNode.children].indexOf(e)}function De(e,t,n){{const n=window.getComputedStyle(e,null);return e["width"===t?"offsetWidth":"offsetHeight"]+parseFloat(n.getPropertyValue("width"===t?"margin-right":"margin-top"))+parseFloat(n.getPropertyValue("width"===t?"margin-left":"margin-bottom"))}}let qe,Ne,Be;function ze(){return qe||(qe="undefined"==typeof window?{touch:!1}:{touch:"ontouchstart"in window||navigator.maxTouchPoints>0}),qe}function Fe(e={}){return Ne||(Ne=function({userAgent:e}={}){if("undefined"==typeof window)return{ios:!1,android:!1};const t=ze(),n=navigator.platform,r=e||navigator.userAgent,s={ios:!1,android:!1},o=/(Android);?[\s/]+([\d.]+)?/.test(r),i=/(iPhone\sOS|iOS|iPod)/.test(r),a=/iPad/.test(r),l="MacIntel"===n&&t.touch&&navigator.maxTouchPoints>1,d=a||l;return o&&!("Win32"===n)&&(s.os="android",s.android=!0),(d||i)&&(s.os="ios",s.ios=!0),s}(e)),Ne}function Re(){return Be||(Be=function(){if("undefined"==typeof window)return{isSafari:!1,isWebView:!1,need3dFix:!1};const e=Fe(),t=navigator.userAgent,n=t.toLowerCase(),r=n.includes("safari")&&!n.includes("chrome")&&!n.includes("android"),s=/(iPhone|iPod|iPad).*AppleWeb
vendor: 59,331 bytes, line 191
191Kit(?!.*Safari)/i.test(t);return{isSafari:r,isWebView:s,need3dFix:r||s&&e.ios}}()),Be}"loading"!==document.readyState?Se():document.addEventListener("DOMContentLoaded",()=>Se());const Ge=(e,t)=>{if(!e||e.destroyed||!e.params||!e.params.lazyPreload)return;const n=t.closest(e.isElement?"swiper-slide":`.${e.params.slideClass}`);if(n){let t=n.querySelector(`.${e.params.lazyPreloaderClass}`);!t&&e.isElement&&(n.shadowRoot?t=n.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`):requestAnimationFrame(()=>{if(n.shadowRoot){const t=n.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`);t&&!t.lazyPreloaderManaged&&t.remove()}})),t&&!t.lazyPreloaderManaged&&t.remove()}},Ve=(e,t)=>{if(!e.slides[t])return;const n=e.slides[t].querySelector('[loading="lazy"]');n&&n.removeAttribute("loading")},$e=e=>{if(!e||e.destroyed||!e.params||!e.params.lazyPreload)return;let t=e.params.lazyPreloadPrevNext;const n=e.slides.length;if(!n||!t||t<0)return;t=Math.min(t,n);const r="auto"===e.params.slidesPerView?e.slidesPerViewDynamic():Math.ceil(e.params.slidesPerView),s=e.activeIndex;if(e.params.grid&&(e.params.grid.rows??1)>1){const n=s,o=[n-t];return o.push(...Array.from({length:t}).map((e,t)=>n+r+t)),void e.slides.forEach((t,n)=>{void 0!==t.column&&o.includes(t.column)&&Ve(e,n)})}const o=s+r-1;if(e.params.rewind||e.params.loop)for(let r=s-t;r<=o+t;r+=1){const t=(r%n+n)%n;(t<s||t>o)&&Ve(e,t)}else for(let r=Math.max(s-t,0);r<=Math.min(o+t,n-1);r+=1)r!==s&&(r>o||r<s)&&Ve(e,r)};const He=(e,t)=>!!(e.grid&&t.grid&&t.grid.rows>1);var je={setBreakpoint:function(){const e=this,{realIndex:t,initialized:n,params:r,el:s}=e,o=r.breakpoints;if(!o||o&&0===Object.keys(o).length)return;const i="window"!==r.breakpointsBase&&r.breakpointsBase?"container":r.breakpointsBase,a=["window","container"].includes(r.breakpointsBase)||!r.breakpointsBase?e.el:document.querySelector(r.breakpointsBase),l=e.getBreakpoint(o,i,a);if(!l||e.currentBreakpoint===l)return;const d=(l in o?o[l]:void 0)||e.originalParams,c=He(e,r),u=He(e,d),p=e.params.grabCursor,m=d.grabCursor,h=r.enabled;c&&!u?(s.classList.remove(`${r.containerModifierClass}grid`,`${r.containerModifierClass}grid-column`),e.emitContainerClasses()):!c&&u&&(s.classList.add(`${r.containerModifierClass}grid`),(d.grid.fill&&"column"===d.grid.fill||!d.grid.fill&&"column"===r.grid.fill)&&s.classList.add(`${r.containerModifierClass}grid-column`),e.emitContainerClasses()),p&&!m?e.unsetGrabCursor():!p&&m&&e.setGrabCursor();const f=(e,t)=>e[t];["navigation","pagination","scrollbar"].forEach(t=>{const n=f(d,t);if(void 0===n)return;const s=f(r,t),o="object"==typeof s&&null!==s&&s.enabled,i="object"==typeof n&&null!==n&&n.enabled,a=e[t];o&&!i&&a?.disable?.(),!o&&i&&a?.enable?.()});const y=d.direction&&d.direction!==r.direction,g=r.loop&&(d.slidesPerView!==r.slidesPerView||y),v=r.loop;y&&n&&e.changeDirection(),xe(e.params,d);const w=e.params.enabled,b=e.params.loop;Object.assign(e,{allowTouchMove:e.params.allowTouchMove,allowSlideNext:e.params.allowSlideNext,allowSlidePrev:e.params.allowSlidePrev}),h&&!w?e.disable():!h&&w&&e.enable(),e.currentBreakpoint=l,e.emit("_beforeBreakpoint",d),n&&(g?(e.loopDestroy(),e.loopCreate(t),e.updateSlides()):!v&&b?(e.loopCreate(t),e.updateSlides()):v&&!b&&e.loopDestroy()),e.emit("breakpoint",d)},getBreakpoint:function(e,t="window",n){if(!e||"container"===t&&!n)return;let r=!1;const s="window"===t?window.innerHeight:n.clientHeight,o=Object.keys(e).map(e=>{if("string"==typeof e&&0===e.indexOf("@")){const t=parseFloat(e.substr(1));return{value:s*t,point:e}}return{value:e,point:e}});o.sort((e,t)=>parseInt(String(e.value),10)-parseInt(String(t.value),10));for(let e=0;e<o.length;e+=1){const{point:s,value:i}=o[e];"window"===t?window.matchMedia(`(min-width: ${i}px)`).matches&&(r=s):i<=n.clientWidth&&(r=s)}return r||"max"}};var Ue={checkOverflow:function(){const e=this,{isLocked:t,params:n}=e,{slidesOffsetBefore:r}=n;if(r){const t=e.slides.length-1,n=e.slidesGrid[t]+e.slidesSizesGrid[t]+2*r;e.isLocked=e.size>n}else e.isLocked=1===e.snapGrid.length;!0===n.allowSlideNext&&(e.allowSlideNext=!e.isLocked),!0===n.allowSlidePrev&&(e.allowSlidePrev=!e.isLocked),t&&t!==e.isLocked&&(e.isEnd=!1),t!==e.isLocked&&e.emit(e.isLocked?"lock":"unlock")}};var Ye={addClasses:function(){const e=this,{classNames:t,params:n,rtl:r,el:s,device:o}=e,i=function(e,t){const n=[];return e.forEach(e=>{"object"==typeof e?Object.keys(e).forEach(r=>{e[r]&&n.push(t+r)}):"string"==typeof e&&n.push(t+e)}),n}(["initialized",n.direction,{"free-mode":e.params.freeMode&&n.freeMode.enabled},{autoheight:n.autoHeight},{rtl:r},{grid:n.grid&&n.grid.rows>1},{"grid-column":n.grid&&n.grid.rows>1&&"column"===n.grid.fill},{android:o.android},{ios:o.ios},{"css-mode":n.cssMode},{centered:n.cssMode&&n.centeredSlides},{"watch-progress":n.watchSlidesProgress}],n.containerModifierClass);t.push(...i),s.classList.add(...t),e.emitContainerClasses()},removeClasses:function(){const{el:e,classNames:t}=this;e&&"string"!=typeof e&&(e.classList.remove(...t),this.emitContainerClasses())}};const We={init:!0,direction:"horizontal",oneWayMovement:!1,swiperElementNodeName:"SWIPER-CONTAINER",touchEventsTarget:"wrapper",initialSlide:0,speed:300,cssMode:!1,updateOnWindowResize:!0,resizeObserver:!0,nested:!1,createElements:!1,eventsPrefix:"swiper",enabled:!0,focusableElements:"input, select, option, textarea, button, video, label",width:null,height:null,preventInteractionOnTransition:!1,userAgent:null,url:null,edgeSwipeDetection:!1,edgeSwipeThreshold:20,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",breakpoints:void 0,breakpointsBase:"window",spaceBetween:0,slidesPerView:1,slidesPerGroup:1,slidesPerGroupSkip:0,slidesPerGroupAuto:!1,centeredSlides:!1,centeredSlidesBounds:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,centerInsufficientSlides:!1,snapToSlideEdge:!1,watchOverflow:!0,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,allowTouchMove:!0,threshold:5,touchMoveStopPropagation:!1,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,loop:!1,loopAddBlankSlides:!0,loopAdditionalSlides:0,loopPreventsSliding:!0,rewind:!1,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:!0,maxBackfaceHiddenSlides:10,containerModifierClass:"swiper-",slideClass:"swiper-slide",slideBlankClass:"swiper-slide-blank",slideActiveClass:"swiper-slide-active",slideVisibleClass:"swiper-slide-visible",slideFullyVisibleClass:"swiper-slide-fully-visible",slideNextClass:"swiper-slide-next",slidePrevClass:"swiper-slide-prev",wrapperClass:"swiper-wrapper",lazyPreload:!0,lazyPreloaderClass:"swiper-lazy-preloader",lazyPreloadPrevNext:0,runCallbacksOnInit:!0,_emitClasses:!1};var Xe={on(e,t,n){const r=this;if(!r.eventsListeners||r.destroyed)return r;if("function"!=typeof t)return r;const s=n?"unshift":"push";return e.split(" ").forEach(e=>{r.eventsListeners[e]||(r.eventsListeners[e]=[]),r.eventsListeners[e][s](t)}),r},once(e,t,n){const r=this;if(!r.eventsListeners||r.destroyed)return r;if("function"!=typeof t)return r;const s=function(...n){r.off(e,s),s.__emitterProxy&&delete s.__emitterProxy,t.apply(r,n)};return s.__emitterProxy=t,r.on(e,s,n)},onAny(e,t){const n=this;if(!n.eventsListeners||n.destroyed)return n;if("function"!=typeof e)return n;const r=t?"unshift":"push";return n.eventsAnyListeners.indexOf(e)<0&&n.eventsAnyListeners[r](e),n},offAny(e){const t=this;if(!t.eventsListeners||t.destroyed)return t;if(!t.eventsAnyListeners)return t;const n=t.eventsAnyListeners.indexOf(e);return n>=0&&t.eventsAnyListeners.splice(n,1),t},off(e,t){const n=this;return!n.eventsListeners||n.destroyed?n:n.eventsListeners?(e.split(" ").forEach(e=>{void 0===t?n.eventsListeners[e]=[]:n.eventsListeners[e]&&n.eventsListeners[e].forEach((r,s)=>{(r===t||r.__emitterProxy&&r.__emitterProxy===t)&&n.eventsListeners[e].splice(s,1)})}),n):n},emit(...e){const t=this;if(!t.eventsListeners||t.destroyed)return t;if(!t.eventsListeners)return t;let n,r,s;if("string"==typeof e[0]||Array.isArray(e[0]))n=e[0],r=e.slice(1,e.length),s=t;else{const o=e[0];n=o.events,r=o.data??[],s=o.context||t}r.unshift(s);return(Array.isArray(n)?n:n.split(" ")).forEach(e=>{t.eventsAnyListeners&&t.eventsAnyListeners.length&&t.eventsAnyListeners.forEach(t=>{t.apply(s,[e,...r])}),t.eventsListeners&&t.eventsListeners[e]&&t.eventsListeners[e].forEach(e=>{e.apply(s,r)})}),t}};function Ze(e){const t=this;t.destroyed||t.enabled&&(t.allowClick||(t.params.preventClicks&&e.preventDefault(),t.params.preventClicksPropagation&&t.animating&&(e.stopPropagation(),e.stopImmediatePropagation())))}function Ke(){const e=this;e.destroyed||e.documentTouchHandlerProceeded||(e.documentTouchHandlerProceeded=!0,e.params.touchReleaseOnEdges&&(e.el.style.touchAction="auto"))}function Je(e){const t=this;t.destroyed||(Ge(t,e.target),t.params.cssMode||"auto"!==t.params.slidesPerView&&!t.params.autoHeight||t.update())}function Qe(){const e=this,{params:t,el:n}=e;if(n&&0===n.offsetWidth)return;t.breakpoints&&e.setBreakpoint();const{allowSlideNext:r,allowSlidePrev:s,snapGrid:o}=e,i=e.virtual&&e.params.virtual?.enabled;e.allowSlideNext=!0,e.allowSlidePrev=!0,e.updateSize(),e.updateSlides(),e.updateSlidesClasses();const a=i&&t.loop;if(!("auto"===t.slidesPerView||t.slidesPerView>1)||!e.isEnd||e.isBeginning||e.params.centeredSlides||a)e.params.loop&&!i?e.slideToLoop(e.realIndex,0,!1,!0):e.slideTo(e.activeIndex,0,!1,!0);else{const t=i?e.virtual.slides.length:e.slides.length;e.slideTo(t-1,0,!1,!0)}if(e.autoplay&&e.autoplay.running&&e.autoplay.paused){const t=e.autoplay;clearTimeout(t.resizeTimeout),t.resizeTimeout=setTimeout(()=>{e.autoplay&&e.autoplay.running&&e.autoplay.paused&&e.autoplay.resume()},500)}e.allowSlidePrev=s,e.allowSlideNext=r,e.params.watchOverflow&&o!==e.snapGrid&&e.checkOverflow()}function et(){const e=this;if(e.destroyed)return;const{wrapperEl:t,rtlTranslate:n,enabled:r}=e;if(!r)return;let s;e.previousTranslate=e.translate,e.isHorizontal()?e.translate=-t.scrollLeft:e.translate=-t.scrollTop,0===e.translate&&(e.translate=0),e.updateActiveIndex(),e.updateSlidesClasses();const o=e.maxTranslate()-e.minTranslate();s=0===o?0:(e.translate-e.minTranslate())/o,s!==e.progress&&e.updateProgress(n?-e.translate:e.translate),e.emit("setTranslate",e.translate,!1)}function tt(e){const t=this;if(t.destroyed)return;const n=t.touchEventsData;let r=e.originalEvent??e;if("touchend"===r.type||"touchcancel"===r.type){const e=[...r.changedTouches].find(e=>e.identifier===n.touchId);if(!e||e.identifier!==n.touchId)return}else{if(null!==n.touchId)return;if(r.pointerId!==n.pointerId)return}if(["pointercancel","pointerout","pointerleave","contextmenu"].includes(r.type)){if(!(["pointercancel","contextmenu"].includes(r.type)&&(t.browser.isSafari||t.browser.isWebView)))return}n.pointerId=null,n.touchId=null;const{params:s,touches:o,rtlTranslate:i,slidesGrid:a,enabled:l}=t;if(!l)return;if(!s.simulateTouch&&"mouse"===r.pointerType)return;if(n.allowTouchCallbacks&&t.emit("touchEnd",r),n.allowTouchCallbacks=!1,!n.isTouched)return n.isMoved&&s.grabCursor&&t.setGrabCursor(!1),n.isMoved=!1,void(n.startMoving=!1);s.grabCursor&&n.isMoved&&n.isTouched&&(!0===t.allowSlideNext||!0===t.allowSlidePrev)&&t.setGrabCursor(!1);const d=Le(),c=d-n.touchStartTime;if(t.allowClick){const e=r.path??(r.composedPath&&r.composedPath());t.updateClickedSlide(e&&e[0],e),t.emit("tap click",r),c<300&&d-n.lastClickTime<300&&t.emit("doubleTap doubleClick",r)}if(n.lastClickTime=Le(),Ee(()=>{t.destroyed||(t.allowClick=!0)}),!n.isTouched||!n.isMoved||!t.swipeDirection||0===o.diff&&!n.loopSwapReset||n.currentTranslate===n.startTranslate&&!n.loopSwapReset)return n.isTouched=!1,n.isMoved=!1,void(n.startMoving=!1);let u;if(n.isTouched=!1,n.isMoved=!1,n.startMoving=!1,u=s.followFinger?i?t.translate:-t.translate:-(n.currentTranslate??0),s.cssMode)return;if(s.freeMode&&s.freeMode.enabled)return void t.freeMode.onTouchEnd({currentPos:u});const p=u>=-t.maxTranslate()&&!t.params.loop;let m=0,h=t.slidesSizesGrid[0];for(let e=0;e<a.length;e+=e<s.slidesPerGroupSkip?1:s.slidesPerGroup){const t=e<s.slidesPerGroupSkip-1?1:s.slidesPerGroup;void 0!==a[e+t]?(p||u>=a[e]&&u<a[e+t])&&(m=e,h=a[e+t]-a[e]):(p||u>=a[e])&&(m=e,h=a[a.length-1]-a[a.length-2])}let f=null,y=null;s.rewind&&(t.isBeginning?y=s.virtual?.enabled&&t.virtual?t.virtual.slides.length-1:t.slides.length-1:t.isEnd&&(f=0));const g=(u-a[m])/h,v=m<s.slidesPerGroupSkip-1?1:s.slidesPerGroup;if(c>s.longSwipesMs){if(!s.longSwipes)return void t.slideTo(t.activeIndex);"next"===t.swipeDirection&&(g>=s.longSwipesRatio?t.slideTo(s.rewind&&t.isEnd?f:m+v):t.slideTo(m)),"prev"===t.swipeDirection&&(g>1-s.longSwipesRatio?t.slideTo(m+v):null!==y&&g<0&&Math.abs(g)>s.longSwipesRatio?t.slideTo(y):t.slideTo(m))}else{if(!s.shortSwipes)return void t.slideTo(t.activeIndex);t.navigation&&(r.target===t.navigation.nextEl||r.target===t.navigation.prevEl)?r.target===t.navigation.nextEl?t.slideTo(m+v):t.slideTo(m):("next"===t.swipeDirection&&t.slideTo(null!==f?f:m+v),"prev"===t.swipeDirection&&t.slideTo(null!==y?y:m))}}function nt(e){const t=this;if(t.destroyed)return;const n=t.touchEventsData,{params:r,touches:s,rtlTranslate:o,enabled:i}=t;if(!i)return;if(!r.simulateTouch&&"mouse"===e.pointerType)return;const a=e,l=a.originalEvent??a;if("pointermove"===l.type){if(null!==n.touchId)return;if(l.pointerId!==n.pointerId)return}let d;if("touchmove"===l.type){const e=[...l.changedTouches].find(e=>e.identifier===n.touchId);if(!e||e.identifier!==n.touchId)return;d=e}else d=l;if(!n.isTouched)return void(n.startMoving&&n.isScrolling&&t.emit("touchMoveOpposite",l));const c=d.pageX,u=d.pageY;if(l.preventedByNestedSwiper)return s.startX=c,void(s.startY=u);if(!t.allowTouchMove)return l.target.matches(n.focusableElements)||(t.allowClick=!1),void(n.isTouched&&(Object.assign(s,{startX:c,startY:u,currentX:c,currentY:u}),n.touchStartTime=Le()));if(r.touchReleaseOnEdges&&!r.loop)if(t.isVertical()){if(u<s.startY&&t.translate<=t.maxTranslate()||u>s.startY&&t.translate>=t.minTranslate())return n.isTouched=!1,void(n.isMoved=!1)}else{if(o&&(c>s.startX&&-t.translate<=t.maxTranslate()||c<s.startX&&-t.translate>=t.minTranslate()))return;if(!o&&(c<s.startX&&t.translate<=t.maxTranslate()||c>s.startX&&t.translate>=t.minTranslate()))return}if(document.activeElement&&document.activeElement.matches(n.focusableElements)&&document.activeElement!==l.target&&"mouse"!==l.pointerType&&document.activeElement.blur(),document.activeElement&&l.target===document.activeElement&&l.target.matches(n.focusableElements))return n.isMoved=!0,void(t.allowClick=!1);n.allowTouchCallbacks&&t.emit("touchMove",l),s.previousX=s.currentX,s.previousY=s.currentY,s.currentX=c,s.currentY=u;const p=s.currentX-s.startX,m=s.currentY-s.startY;if(t.params.threshold&&Math.sqrt(p**2+m**2)<t.params.threshold)return;if(void 0===n.isScrolling){let e;t.isHorizontal()&&s.currentY===s.startY||t.isVertical()&&s.currentX===s.startX?n.isScrolling=!1:p*p+m*m>=25&&(e=180*Math.atan2(Math.abs(m),Math.abs(p))/Math.PI,n.isScrolling=t.isHorizontal()?e>r.touchAngle:90-e>r.touchAngle)}if(n.isScrolling&&t.emit("touchMoveOpposite",l),void 0===n.startMoving&&(s.currentX===s.startX&&s.currentY===s.startY||(n.startMoving=!0)),n.isScrolling||"touchmove"===l.type&&n.preventTouchMoveFromPointerMove)return void(n.isTouched=!1);if(!n.startMoving)return;t.allowClick=!1,!r.cssMode&&l.cancelable&&l.preventDefault(),r.touchMoveStopPropagation&&!r.nested&&l.stopPropagation();let h=t.isHorizontal()?p:m,f=t.isHorizontal()?s.currentX-s.previousX:s.currentY-s.previousY;r.oneWayMovement&&(h=Math.abs(h)*(o?1:-1),f=Math.abs(f)*(o?1:-1)),s.diff=h,h*=r.touchRatio,o&&(h=-h,f=-f);const y=t.touchesDirection;t.swipeDirection=h>0?"prev":"next",t.touchesDirection=f>0?"prev":"next";const g=t.params.loop&&!r.cssMode,v="next"===t.touchesDirection&&t.allowSlideNext||"prev"===t.touchesDirection&&t.allowSlidePrev;if(!n.isMoved){if(g&&v&&t.loopFix({direction:t.swipeDirection}),n.startTranslate=t.getTranslate(),t.setTransition(0),t.animating){const e=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0,detail:{bySwiperTouchMove:!0}});t.wrapperEl.dispatchEvent(e)}n.allowMomentumBounce=!1,!r.grabCursor||!0!==t.allowSlideNext&&!0!==t.allowSlidePrev||t.setGrabCursor(!0),t.emit("sliderFirstMove",l)}if((new Date).getTime(),!1!==r._loopSwapReset&&n.isMoved&&n.allowThresholdMove&&y!==t.touchesDirection&&g&&v&&Math.abs(h)>=1)return Object.assign(s,{startX:c,startY:u,currentX:c,currentY:u,startTranslate:n.currentTranslate}),n.loopSwapReset=!0,void(n.startTranslate=n.currentTranslate);t.emit("sliderMove",l),n.isMoved=!0;const w=n.startTranslate??0;n.currentTranslate=h+w;let b=!0,S=r.resistanceRatio;if(r.touchReleaseOnEdges&&(S=0),h>0?(g&&v&&n.allowThresholdMove&&n.currentTranslate>(r.centeredSlides?t.minTranslate()-t.slidesSizesGrid[t.activeIndex+1]-("auto"!==r.slidesPerView&&t.slides.length-r.slidesPerView>=2?t.slidesSizesGrid[t.activeIndex+1]+t.params.spaceBetween:0)-t.params.spaceBetween:t.minTranslate())&&t.loopFix({direction:"prev",setTranslate:!0,activeSlideIndex:0}),n.currentTranslate>t.minTranslate()&&(b=!1,r.resistance&&(n.currentTranslate=t.minTranslate()-1+(-t.minTranslate()+w+h)**S))):h<0&&(g&&v&&n.allowThresholdMove&&n.currentTranslate<(r.centeredSlides?t.maxTranslate()+t.slidesSizesGrid[t.slidesSizesGrid.length-1]+t.params.spaceBetween+("auto"!==r.slidesPerView&&t.slides.length-r.slidesPerView>=2?t.slidesSizesGrid[t.slidesSizesGrid.length-1]+t.params.spaceBetween:0):t.maxTranslate())&&t.loopFix({direction:"next",setTranslate:!0,activeSlideIndex:t.slides.length-("auto"===r.slidesPerView?t.slidesPerViewDynamic():Math.ceil(parseFloat(String(r.slidesPerView))))}),n.currentTranslate<t.maxTranslate()&&(b=!1,r.resistance&&(n.currentTranslate=t.maxTranslate()+1-(t.maxTranslate()-w-h)**S))),b&&(l.preventedByNestedSwiper=!0),!t.allowSlideNext&&"next"===t.swipeDirection&&(n.currentTranslate??0)<w&&(n.currentTranslate=w),!t.allowSlidePrev&&"prev"===t.swipeDirection&&(n.currentTranslate??0)>w&&(n.currentTranslate=w),t.allowSlidePrev||t.allowSlideNext||(n.currentTranslate=w),r.threshold>0){if(!(Math.abs(h)>r.threshold||n.allowThresholdMove))return void(n.currentTranslate=n.startTranslate);if(!n.allowThresholdMove)return n.allowThresholdMove=!0,s.startX=s.currentX,s.startY=s.currentY,n.currentTranslate=n.startTranslate,void(s.diff=t.isHorizontal()?s.currentX-s.startX:s.currentY-s.startY)}r.followFinger&&!r.cssMode&&((r.freeMode&&r.freeMode.enabled&&t.freeMode||r.watchSlidesProgress)&&(t.updateActiveIndex(),t.updateSlidesClasses()),r.freeMode&&r.freeMode.enabled&&t.freeMode&&t.freeMode.onTouchMove(),t.updateProgress(n.currentTranslate),t.setTranslate(n.currentTranslate??0))}function rt(e,t,n){const{params:r}=e,s=r.edgeSwipeDetection,o=r.edgeSwipeThreshold;return!s||!(n<=o||n>=window.innerWidth-o)||"prevent"===s&&(t.preventDefault(),!0)}function st(e){const t=this;if(t.destroyed)return;const n=e.originalEvent??e,r=t.touchEventsData;if("pointerdown"===n.type){const e=n;if(null!==r.pointerId&&r.pointerId!==e.pointerId)return;r.pointerId=e.pointerId}else"touchstart"===n.type&&1===n.targetTouches.length&&(r.touchId=n.targetTouches[0].identifier);if("touchstart"===n.type)return void rt(t,n,n.targetTouches[0].pageX);const{params:s,touches:o,enabled:i}=t;if(!i)return;if(!s.simulateTouch&&"mouse"===n.pointerType)return;if(t.animating&&s.preventInteractionOnTransition)return;!t.animating&&s.cssMode&&s.loop&&t.loopFix();let a=n.target;if("wrapper"===s.touchEventsTarget&&!function(e,t){let n=t.contains(e);!n&&t instanceof HTMLSlotElement&&(n=[...t.assignedElements()].includes(e),n||(n=function(e,t){const n=[t];for(;n.length>0;){const t=n.shift();if(e===t)return!0;n.push(...t.children,...t.shadowRoot?t.shadowRoot.children:[],...t.assignedElements?t.assignedElements():[])}return!1}(e,t)));return n}(a,t.wrapperEl))return;const l=n;if("number"==typeof l.which&&3===l.which)return;if("number"==typeof l.button&&l.button>0)return;if(r.isTouched&&r.isMoved)return;const d=!!s.noSwipingClass&&""!==s.noSwipingClass,c=n.composedPath?n.composedPath():n.path;d&&n.target&&n.target.shadowRoot&&c&&(a=c[0]);const u=s.noSwipingSelector?s.noSwipingSelector:`.${s.noSwipingClass}`,p=!(!n.target||!n.target.shadowRoot);if(s.noSwiping&&(p?(m=u,function e(t){if(!t||t===document||t===window)return null;let n=t;n.assignedSlot&&(n=n.assignedSlot);const r=n.closest(m);if(!r&&!n.getRootNode)return null;const s=n.getRootNode();return r||e(s.host)}(a)):a.closest(u)))return void(t.allowClick=!0);var m;if(s.swipeHandler&&"string"==typeof s.swipeHandler&&!a.closest(s.swipeHandler))return;const h=n;o.currentX=h.pageX,o.currentY=h.pageY;const f=o.currentX,y=o.currentY;if(!rt(t,n,f))return;Object.assign(r,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),o.startX=f,o.startY=y,r.touchStartTime=Le(),t.allowClick=!0,t.updateSize(),t.swipeDirection=void 0,s.threshold>0&&(r.allowThresholdMove=!1);let g=!0;a.matches(r.focusableElements)&&(g=!1,"SELECT"===a.nodeName&&(r.isTouched=!1)),document.activeElement&&document.activeElement.matches(r.focusableElements)&&document.activeElement!==a&&("mouse"===h.pointerType||"mouse"!==h.pointerType&&!a.matches(r.focusableElements))&&document.activeElement.blur();const v=g&&t.allowTouchMove&&s.touchStartPreventDefault;!s.touchStartForcePreventDefault&&!v||a.isContentEditable||n.preventDefault(),s.freeMode&&s.freeMode.enabled&&t.freeMode&&t.animating&&!s.cssMode&&t.freeMode.onTouchStart(),t.emit("touchStart",n)}const ot=(e,t)=>{const{params:n,el:r,wrapperEl:s,device:o}=e,i=!!n.nested,a="on"===t?"addEventListener":"removeEventListener",l=t;if(!r||"string"==typeof r)return;document[a]("touchstart",e.onDocumentTouchStart,{passive:!1,capture:i}),r[a]("touchstart",e.onTouchStart,{passive:!1}),r[a]("pointerdown",e.onTouchStart,{passive:!1}),document[a]("touchmove",e.onTouchMove,{passive:!1,capture:i}),document[a]("pointermove",e.onTouchMove,{passive:!1,capture:i}),document[a]("touchend",e.onTouchEnd,{passive:!0}),document[a]("pointerup",e.onTouchEnd,{passive:!0}),document[a]("pointercancel",e.onTouchEnd,{passive:!0}),document[a]("touchcancel",e.onTouchEnd,{passive:!0}),document[a]("pointerout",e.onTouchEnd,{passive:!0}),document[a]("pointerleave",e.onTouchEnd,{passive:!0}),document[a]("contextmenu",e.onTouchEnd,{passive:!0}),(n.preventClicks||n.preventClicksPropagation)&&r[a]("click",e.onClick,!0),n.cssMode&&s[a]("scroll",e.onScroll);const d=t=>{e[l](t,Qe,!0)};n.updateOnWindowResize?d(o.ios||o.android?"resize orientationchange observerUpdate":"resize observerUpdate"):d("observerUpdate"),n.lazyPreload&&r[a]("load",e.onLoad,{capture:!0})};var it={loopCreate:function(e,t){const n=this,{params:r,slidesEl:s}=n;if(!r.loop||n.virtual&&n.params.virtual?.enabled)return;const o=()=>{Ie(s,`.${r.slideClass}, swiper-slide`).forEach((e,t)=>{e.setAttribute("data-swiper-slide-index",String(t))})},i=n.grid&&r.grid&&r.grid.rows>1;r.loopAddBlankSlides&&(r.slidesPerGroup>1||i)&&(()=>{const e=Ie(s,`.${r.slideBlankClass}`);e.forEach(e=>{e.remove()}),e.length>0&&(n.recalcSlides(),n.updateSlides())})();const a=r.slidesPerGroup*(i?r.grid.rows:1),l=n.slides.length%a!==0,d=i&&n.slides.length%r.grid.rows!==0,c=e=>{for(let t=0;t<e;t+=1){const e=n.isElement?_e("swiper-slide",[r.slideBlankClass]):_e("div",[r.slideClass,r.slideBlankClass]);n.slidesEl.append(e)}};if(l){if(r.loopAddBlankSlides){c(a-n.slides.length%a),n.recalcSlides(),n.updateSlides()}else Me("Swiper Loop Warning: The number of slides is not even to slidesPerGroup, loop mode may not function properly. You need to add more slides (or make duplicates, or empty slides)");o()}else if(d){if(r.loopAddBlankSlides){c(r.grid.rows-n.slides.length%r.grid.rows),n.recalcSlides(),n.updateSlides()}else Me("Swiper Loop Warning: The number of slides is not even to grid.rows, loop mode may not function properly. You need to add more slides (or make duplicates, or empty slides)");o()}else o();const u=r.centeredSlides||!!r.slidesOffsetBefore||!!r.slidesOffsetAfter;n.loopFix({slideRealIndex:e,direction:u?void 0:"next",initial:t})},loopFix:function(e={}){const{slideRealIndex:t,slideTo:n=!0,direction:r,setTranslate:s,activeSlideIndex:o,initial:i,byController:a,byMousewheel:l}=e;let d=o;const c=this;if(!c.params.loop)return;c.emit("beforeLoopFix"),c.__loopFixInProgress__=!0;const{slides:u,allowSlidePrev:p,allowSlideNext:m,slidesEl:h,params:f}=c,{centeredSlides:y,slidesOffsetBefore:g,slidesOffsetAfter:v,initialSlide:w}=f,b=y||!!g||!!v;if(c.allowSlidePrev=!0,c.allowSlideNext=!0,c.virtual&&f.virtual?.enabled){if(n){const e=c.virtual.slides.length,t=c.virtual.slidesBefore??0;b||0!==c.snapIndex?b&&c.snapIndex<f.slidesPerView?c.slideTo(e+c.snapIndex,0,!1,!0):c.snapIndex===c.snapGrid.length-1&&c.slideTo(t,0,!1,!0):c.slideTo(e,0,!1,!0)}return c.allowSlidePrev=p,c.allowSlideNext=m,c.__loopFixInProgress__=!1,void c.emit("loopFix")}let S=f.slidesPerView;"auto"===S?S=c.slidesPerViewDynamic():(S=Math.ceil(parseFloat(String(f.slidesPerView))),b&&S%2==0&&(S+=1));const E=f.slidesPerGroupAuto?S:f.slidesPerGroup,L=e=>("function"==typeof e?e.call(c):e)||0,C=c.slidesGrid.length>1?(c.slidesGrid[c.slidesGrid.length-1]-c.slidesGrid[0])/(c.slidesGrid.length-1):c.size,A=C>0?L(g)/C:0,T=C>0?L(v)/C:0;let x=b?Math.max(E,(y?Math.ceil(S/2):0)+Math.ceil(Math.max(A,T))):E;x%E!==0&&(x+=E-x%E),x+=f.loopAdditionalSlides,c.loopedSlides=x;const P=c.grid&&f.grid&&f.grid.rows>1;u.length<S+x||"cards"===c.params.effect&&u.length<S+2*x?Me("Swiper Loop Warning: The number of slides is not enough for loop mode, it will be disabled or not function properly. You need to add more slides (or make duplicates) or lower the values of slidesPerView and slidesPerGroup parameters"):P&&"row"===f.grid.fill&&Me("Swiper Loop Warning: Loop mode is not compatible with grid.fill = `row`");const I=[],M=[],_=P?Math.ceil(u.length/f.grid.rows):u.length,k=i&&_-w<S&&!b;let O=k?w:c.activeIndex;void 0===d?d=c.getSlideIndex(u.find(e=>e.classList.contains(f.slideActiveClass))):O=d;const D="next"===r||!r,q="prev"===r||!r;let N=0,B=0;const z=(P?u[d].column??0:d)+(b&&void 0===s?(y?-S/2+.5:0)-A:0);if(z<x){N=Math.max(x-z,E);for(let e=0;e<x-z;e+=1){const t=e-Math.floor(e/_)*_;if(P){const e=_-t-1;for(let t=u.length-1;t>=0;t-=1)u[t].column===e&&I.push(t)}else I.push(_-t-1)}}else if(z+S>_-x){B=Math.max(z-(_-2*x),E),k&&(B=Math.max(B,S-_+w+1));for(let e=0;e<B;e+=1){const t=e-Math.floor(e/_)*_;P?u.forEach((e,n)=>{e.column===t&&M.push(n)}):M.push(t)}}if(c.__preventObserver__=!0,requestAnimationFrame(()=>{c.__preventObserver__=!1}),"cards"===c.params.effect&&u.length<S+2*x&&(M.includes(d)&&M.splice(M.indexOf(d),1),I.includes(d)&&I.splice(I.indexOf(d),1)),q&&I.forEach(e=>{const t=u[e];t.swiperLoopMoveDOM=!0,h.prepend(t),t.swiperLoopMoveDOM=!1}),D&&M.forEach(e=>{const t=u[e];t.swiperLoopMoveDOM=!0,h.append(t),t.swiperLoopMoveDOM=!1}),c.recalcSlides(),"auto"===f.slidesPerView?c.updateSlides():P&&(I.length>0&&q||M.length>0&&D)&&c.slides.forEach((e,t)=>{c.grid.updateSlide(t,e,c.slides)}),f.watchSlidesProgress&&c.updateSlidesOffset(),n)if(I.length>0&&q){if(void 0===t){const e=c.slidesGrid[O],t=c.slidesGrid[O+N]-e;l?c.setTranslate(c.translate-t):(c.slideTo(O+Math.ceil(N),0,!1,!0),s&&(c.touchEventsData.startTranslate=c.touchEventsData.startTranslate-t,c.touchEventsData.currentTranslate=c.touchEventsData.currentTranslate-t))}else if(s){const e=P?I.length/f.grid.rows:I.length;c.slideTo(c.activeIndex+e,0,!1,!0),c.touchEventsData.currentTranslate=c.translate}}else if(M.length>0&&D)if(void 0===t){const e=c.slidesGrid[O],t=c.slidesGrid[O-B]-e;l?c.setTranslate(c.translate-t):(c.slideTo(O-B,0,!1,!0),s&&(c.touchEventsData.startTranslate=c.touchEventsData.startTranslate-t,c.touchEventsData.currentTranslate=c.touchEventsData.currentTranslate-t))}else{const e=P?M.length/f.grid.rows:M.length;c.slideTo(c.activeIndex-e,0,!1,!0)}c.allowSlidePrev=p,c.allowSlideNext=m;const F=c.controller?.control;if(F&&!a){const e={slideRealIndex:t,direction:r,setTranslate:s,activeSlideIndex:d,byController:!0};Array.isArray(F)?F.forEach(t=>{!t.destroyed&&t.params.loop&&t.loopFix({...e,slideTo:t.params.slidesPerView===f.slidesPerView&&n})}):F instanceof c.constructor&&F.params.loop&&F.loopFix({...e,slideTo:F.params.slidesPerView===f.slidesPerView&&n})}c.__loopFixInProgress__=!1,c.emit("loopFix")},loopDestroy:function(){const e=this,{params:t,slidesEl:n}=e;if(!t.loop||!n||e.virtual&&e.params.virtual?.enabled)return;e.recalcSlides();const r=[];e.slides.forEach(e=>{const t=e,n=void 0===t.swiperSlideIndex?Number(e.getAttribute("data-swiper-slide-index")):t.swiperSlideIndex;r[n]=e}),e.slides.forEach(e=>{e.removeAttribute("data-swiper-slide-index")}),r.forEach(e=>{n.append(e)}),e.recalcSlides(),e.slideTo(e.realIndex,0)}};function at(e,t){return function(n={}){const r=Object.keys(n)[0],s=n[r];"object"==typeof s&&null!==s?(!0===e[r]&&(e[r]={enabled:!0}),"navigation"===r&&e[r]&&e[r].enabled&&!e[r].prevEl&&!e[r].nextEl&&(e[r].auto=!0),["pagination","scrollbar"].indexOf(r)>=0&&e[r]&&e[r].enabled&&!e[r].el&&(e[r].auto=!0),r in e&&"enabled"in s?("object"!=typeof e[r]||"enabled"in e[r]||(e[r].enabled=!0),e[r]||(e[r]={enabled:!1}),xe(t,n)):xe(t,n)):xe(t,n)}}var lt={slideTo:function(e=0,t,n=!0,r,s){"string"==typeof e&&(e=parseInt(e,10));const o=this;let i=e;i<0&&(i=0);const{params:a,snapGrid:l,slidesGrid:d,previousIndex:c,activeIndex:u,rtlTranslate:p,wrapperEl:m,enabled:h}=o;if(!h&&!r&&!s||o.destroyed||o.animating&&a.preventInteractionOnTransition)return!1;void 0===t&&(t=o.params.speed);const f=Math.min(o.params.slidesPerGroupSkip,i);let y=f+Math.floor((i-f)/o.params.slidesPerGroup);y>=l.length&&(y=l.length-1);const g=-l[y];if(a.normalizeSlideIndex)for(let e=0;e<d.length;e+=1){const t=-Math.floor(100*g),n=Math.floor(100*d[e]),r=Math.floor(100*d[e+1]);void 0!==d[e+1]?t>=n&&t<r-(r-n)/2?i=e:t>=n&&t<r&&(i=e+1):t>=n&&(i=e)}if(o.initialized&&i!==u){if(!o.allowSlideNext&&(p?g>o.translate&&g>o.minTranslate():g<o.translate&&g<o.minTranslate()))return!1;if(!o.allowSlidePrev&&g>o.translate&&g>o.maxTranslate()&&(u||0)!==i)return!1}let v;i!==(c||0)&&n&&o.emit("beforeSlideChangeStart"),o.updateProgress(g),v=i>u?"next":i<u?"prev":"reset";const w=o.virtual&&o.params.virtual?.enabled;if(!(w&&s)&&(p&&-g===o.translate||!p&&g===o.translate))return o.updateActiveIndex(i),a.autoHeight&&o.updateAutoHeight(),o.updateSlidesClasses(),"slide"!==a.effect&&o.setTranslate(g),"reset"!==v&&(o.transitionStart(n,v),o.transitionEnd(n,v)),!1;if(a.cssMode){const e=o.isHorizontal(),n=p?g:-g;return 0===t?(w&&(o.wrapperEl.style.scrollSnapType="none",o._immediateVirtual=!0),w&&!o._cssModeVirtualInitialSet&&(o.params.initialSlide??0)>0?(o._cssModeVirtualInitialSet=!0,requestAnimationFrame(()=>{m[e?"scrollLeft":"scrollTop"]=n})):m[e?"scrollLeft":"scrollTop"]=n,w&&requestAnimationFrame(()=>{o.wrapperEl.style.scrollSnapType="",o._immediateVirtual=!1})):m.scrollTo({[e?"left":"top"]:n,behavior:"smooth"}),!0}const b=Re().isSafari;return w&&!s&&b&&o.isElement&&o.virtual.update(!1,!1,i),o.setTransition(t),o.setTranslate(g),o.updateActiveIndex(i),o.updateSlidesClasses(),o.emit("beforeTransitionStart",t,r),o.transitionStart(n,v),0===t?o.transitionEnd(n,v):o.animating||(o.animating=!0,o.onSlideToWrapperTransitionEnd||(o.onSlideToWrapperTransitionEnd=function(e){o&&!o.destroyed&&e.target===this&&(o.wrapperEl.removeEventListener("transitionend",o.onSlideToWrapperTransitionEnd),o.onSlideToWrapperTransitionEnd=null,delete o.onSlideToWrapperTransitionEnd,o.transitionEnd(n,v))}),o.wrapperEl.addEventListener("transitionend",o.onSlideToWrapperTransitionEnd)),!0},slideToLoop:function(e=0,t,n=!0,r){if("string"==typeof e){e=parseInt(e,10)}const s=this;if(s.destroyed)return;void 0===t&&(t=s.params.speed);const o=s.grid&&s.params.grid&&s.params.grid.rows>1;let i=e;if(s.params.loop)if(s.virtual&&s.params.virtual?.enabled)i+=s.virtual.slidesBefore??0;else{let e;if(o){const t=i*s.params.grid.rows,n=s.slides.find(e=>Number(e.getAttribute("data-swiper-slide-index"))===t);e=n?.column??0}else e=s.getSlideIndexByData(i);const t=o?Math.ceil(s.slides.length/s.params.grid.rows):s.slides.length,{centeredSlides:n,slidesOffsetBefore:a,slidesOffsetAfter:l}=s.params,d=n||!!a||!!l;let c;"auto"===s.params.slidesPerView?c=s.slidesPerViewDynamic():(c=Math.ceil(parseFloat(String(s.params.slidesPerView))),d&&c%2==0&&(c+=1));let u=t-e<c;if(d&&(u=u||e<Math.ceil(c/2)),r&&d&&"auto"!==s.params.slidesPerView&&!o&&(u=!1),u){const n=d?e<s.activeIndex?"prev":"next":e-s.activeIndex-1<s.params.slidesPerView?"next":"prev";s.loopFix({direction:n,slideTo:!0,activeSlideIndex:"next"===n?e+1:e-t+1,slideRealIndex:"next"===n?s.realIndex:void 0})}if(o){const e=i*s.params.grid.rows,t=s.slides.find(t=>Number(t.getAttribute("data-swiper-slide-index"))===e);i=t?.column??0}else i=s.getSlideIndexByData(i)}return requestAnimationFrame(()=>{s.slideTo(i,t,n,r)}),s},slideNext:function(e,t=!0,n){const r=this,{enabled:s,params:o,animating:i}=r;if(!s||r.destroyed)return r;void 0===e&&(e=r.params.speed);let a=o.slidesPerGroup;"auto"===o.slidesPerView&&1===o.slidesPerGroup&&o.slidesPerGroupAuto&&(a=Math.max(r.slidesPerViewDynamic("current",!0),1));const l=r.activeIndex<o.slidesPerGroupSkip?1:a,d=r.virtual&&o.virtual?.enabled;if(o.loop){if(i&&!d&&o.loopPreventsSliding)return!1;if(r.loopFix({direction:"next"}),r._clientLeft=r.wrapperEl.clientLeft,r.activeIndex===r.slides.length-1&&o.cssMode)return requestAnimationFrame(()=>{r.slideTo(r.activeIndex+l,e,t,n)}),!0}return o.rewind&&r.isEnd?r.slideTo(0,e,t,n):r.slideTo(r.activeIndex+l,e,t,n)},slidePrev:function(e,t=!0,n){const r=this,{params:s,snapGrid:o,slidesGrid:i,rtlTranslate:a,enabled:l,animating:d}=r;if(!l||r.destroyed)return r;void 0===e&&(e=r.params.speed);const c=r.virtual&&s.virtual?.enabled;if(s.loop){if(d&&!c&&s.loopPreventsSliding)return!1;r.loopFix({direction:"prev"}),r._clientLeft=r.wrapperEl.clientLeft}function u(e){return e<0?-Math.floor(Math.abs(e)):Math.floor(e)}const p=u(a?r.translate:-r.translate),m=o.map(e=>u(e)),h=s.freeMode&&s.freeMode.enabled;let f=o[m.indexOf(p)-1];if(void 0===f&&(s.cssMode||h)){let e;o.forEach((t,n)=>{p>=t&&(e=n)}),void 0!==e&&(f=h?o[e]:o[e>0?e-1:e])}let y=0;if(void 0!==f&&(y=i.indexOf(f),y<0&&(y=r.activeIndex-1),"auto"===s.slidesPerView&&1===s.slidesPerGroup&&s.slidesPerGroupAuto&&(y=y-r.slidesPerViewDynamic("previous",!0)+1,y=Math.max(y,0))),s.rewind&&r.isBeginning){const s=r.params.virtual?.enabled&&r.virtual?r.virtual.slides.length-1:r.slides.length-1;return r.slideTo(s,e,t,n)}return s.loop&&0===r.activeIndex&&s.cssMode?(requestAnimationFrame(()=>{r.slideTo(y,e,t,n)}),!0):r.slideTo(y,e,t,n)},slideReset:function(e,t=!0,n){const r=this;if(!r.destroyed)return void 0===e&&(e=r.params.speed),r.slideTo(r.activeIndex,e,t,n)},slideToClosest:function(e,t=!0,n,r=.5){const s=this;if(s.destroyed)return;void 0===e&&(e=s.params.speed);let o=s.activeIndex;const i=Math.min(s.params.slidesPerGroupSkip,o),a=i+Math.floor((o-i)/s.params.slidesPerGroup),l=s.rtlTranslate?s.translate:-s.translate;if(l>=s.snapGrid[a]){const e=s.snapGrid[a];l-e>(s.snapGrid[a+1]-e)*r&&(o+=s.params.slidesPerGroup)}else{const e=s.snapGrid[a-1];l-e<=(s.snapGrid[a]-e)*r&&(o-=s.params.slidesPerGroup)}return o=Math.max(o,0),o=Math.min(o,s.slidesGrid.length-1),s.slideTo(o,e,t,n)},slideToClickedSlide:function(){const e=this;if(e.destroyed)return;const{params:t,slidesEl:n,clickedSlide:r,clickedIndex:s}=e;if(void 0===r||void 0===s)return;const o="auto"===t.slidesPerView?e.slidesPerViewDynamic():t.slidesPerView;let i,a=e.getSlideIndexWhenGrid(s);const l=e.isElement?"swiper-slide":`.${t.slideClass}`,d=e.grid&&e.params.grid&&e.params.grid.rows>1;if(t.loop){if(e.animating)return;i=parseInt(r.getAttribute("data-swiper-slide-index"),10),t.centeredSlides?e.slideToLoop(i):a>(d?(e.slides.length-o)/2-(e.params.grid.rows-1):e.slides.length-o)?(e.loopFix(),a=e.getSlideIndex(Ie(n,`${l}[data-swiper-slide-index="${i}"]`)[0]),Ee(()=>{e.slideTo(a)})):e.slideTo(a)}else e.slideTo(a)}};function dt({swiper:e,runCallbacks:t,direction:n,step:r}){const{activeIndex:s,previousIndex:o}=e;let i=n;i||(i=s>o?"next":s<o?"prev":"reset"),e.emit(`transition${r}`),t&&"reset"===i?e.emit(`slideResetTransition${r}`):t&&s!==o&&(e.emit(`slideChangeTransition${r}`),"next"===i?e.emit(`slideNextTransition${r}`):e.emit(`slidePrevTransition${r}`))}var ct={getTranslate:function(e=(this.isHorizontal()?"x":"y")){const{params:t,rtlTranslate:n,translate:r,wrapperEl:s}=this;if(t.virtualTranslate)return n?-r:r;if(t.cssMode)return r;let o=Ce(s,e);return o+=this.cssOverflowAdjustment(),n&&(o=-o),o||0},setTranslate:function(e,t){const n=this,{rtlTranslate:r,params:s,wrapperEl:o,progress:i}=n;let a,l=0,d=0;n.isHorizontal()?l=r?-e:e:d=e,s.roundLengths&&(l=Math.floor(l),d=Math.floor(d)),n.previousTranslate=n.translate,n.translate=n.isHorizontal()?l:d,s.cssMode?o[n.isHorizontal()?"scrollLeft":"scrollTop"]=n.isHorizontal()?-l:-d:s.virtualTranslate||(n.isHorizontal()?l-=n.cssOverflowAdjustment():d-=n.cssOverflowAdjustment(),o.style.transform=`translate3d(${l}px, ${d}px, 0px)`);const c=n.maxTranslate()-n.minTranslate();a=0===c?0:(e-n.minTranslate())/c,a!==i&&n.updateProgress(e),n.emit("setTranslate",n.translate,t)},minTranslate:function(){return-this.snapGrid[0]},maxTranslate:function(){return-this.snapGrid[this.snapGrid.length-1]},translateTo:function(e=0,t=this.params.speed,n=!0,r=!0,s){const o=this,{params:i,wrapperEl:a}=o;if(o.animating&&i.preventInteractionOnTransition)return!1;const l=o.minTranslate(),d=o.maxTranslate();let c;if(c=r&&e>l?l:r&&e<d?d:e,o.updateProgress(c),i.cssMode){const e=o.isHorizontal();return 0===t?a[e?"scrollLeft":"scrollTop"]=-c:a.scrollTo({[e?"left":"top"]:-c,behavior:"smooth"}),!0}return 0===t?(o.setTransition(0),o.setTranslate(c),n&&(o.emit("beforeTransitionStart",t,s),o.emit("transitionEnd"))):(o.setTransition(t),o.setTranslate(c),n&&(o.emit("beforeTransitionStart",t,s),o.emit("transitionStart")),o.animating||(o.animating=!0,o.onTranslateToWrapperTransitionEnd||(o.onTranslateToWrapperTransitionEnd=function(e){o&&!o.destroyed&&e.target===this&&(o.wrapperEl.removeEventListener("transitionend",o.onTranslateToWrapperTransitionEnd),o.onTranslateToWrapperTransitionEnd=null,delete o.onTranslateToWrapperTransitionEnd,o.animating=!1,n&&o.emit("transitionEnd"))}),o.wrapperEl.addEventListener("transitionend",o.onTranslateToWrapperTransitionEnd))),!0}};const ut=(e,t,n)=>{t&&!e.classList.contains(n)?e.classList.add(n):!t&&e.classList.contains(n)&&e.classList.remove(n)};const pt=(e,t,n)=>{t&&!e.classList.contains(n)?e.classList.add(n):!t&&e.classList.contains(n)&&e.classList.remove(n)};var mt={updateSize:function(){const e=this;let t,n;const r=e.el;t=void 0!==e.params.width&&null!==e.params.width?e.params.width:r.clientWidth,n=void 0!==e.params.height&&null!==e.params.height?e.params.height:r.clientHeight,0===t&&e.isHorizontal()||0===n&&e.isVertical()||(t=t-parseInt(ke(r,"padding-left")||"0",10)-parseInt(ke(r,"padding-right")||"0",10),n=n-parseInt(ke(r,"padding-top")||"0",10)-parseInt(ke(r,"padding-bottom")||"0",10),Number.isNaN(t)&&(t=0),Number.isNaN(n)&&(n=0),Object.assign(e,{width:t,height:n,size:e.isHorizontal()?t:n}))},updateSlides:function(){const e=this;function t(t,n){return parseFloat(t.getPropertyValue(e.getDirectionLabel(n))||"0")}const n=e.params,{wrapperEl:r,slidesEl:s,rtlTranslate:o,wrongRTL:i}=e,a=!(!e.virtual||!n.virtual?.enabled),l=a?e.virtual.slides.length:e.slides.length,d=Ie(s,`.${e.params.slideClass}, swiper-slide`),c=a?e.virtual.slides.length:d.length;let u=[];const p=[],m=[],h=t=>"function"==typeof t?t.call(e):t,f=h(n.slidesOffsetBefore),y=h(n.slidesOffsetAfter),g=e.snapGrid.length,v=e.slidesGrid.length,w=e.size-f-y;let b=n.spaceBetween,S=-f,E=0,L=0;if(void 0===w)return;"string"==typeof b&&b.indexOf("%")>=0?b=parseFloat(b.replace("%",""))/100*w:"string"==typeof b&&(b=parseFloat(b)),e.virtualSize=-b-f-y,d.forEach(e=>{o?e.style.marginLeft="":e.style.marginRight="",e.style.marginBottom="",e.style.marginTop=""}),n.centeredSlides&&n.cssMode&&(Pe(r,"--swiper-centered-offset-before",""),Pe(r,"--swiper-centered-offset-after","")),n.cssMode&&(Pe(r,"--swiper-slides-offset-before",`${f}px`),Pe(r,"--swiper-slides-offset-after",`${y}px`));const C=n.grid&&n.grid.rows>1&&e.grid;C?e.grid.initSlides(d):e.grid&&e.grid.unsetSlides();let A=0;const T="auto"===n.slidesPerView&&n.breakpoints&&Object.keys(n.breakpoints).filter(e=>{const t=n.breakpoints[e];return void 0!==t?.slidesPerView}).length>0;for(let r=0;r<c;r+=1){A=0;const s=d[r];if(!s||(C&&e.grid.updateSlide(r,s,d),"none"!==ke(s,"display"))){if(a&&"auto"===n.slidesPerView)n.virtual?.slidesPerViewAutoSlideSize&&(A=n.virtual.slidesPerViewAutoSlideSize),A&&s&&(n.roundLengths&&(A=Math.floor(A)),s.style[e.getDirectionLabel("width")]=`${A}px`);else if("auto"===n.slidesPerView){T&&(s.style[e.getDirectionLabel("width")]="");const r=getComputedStyle(s),o=s.style.transform,i=s.style.webkitTransform;if(o&&(s.style.transform="none"),i&&(s.style.webkitTransform="none"),n.roundLengths)A=e.isHorizontal()?De(s,"width"):De(s,"height");else{const e=t(r,"width"),n=t(r,"padding-left"),o=t(r,"padding-right"),i=t(r,"margin-left"),a=t(r,"margin-right"),l=r.getPropertyValue("box-sizing");if(l&&"border-box"===l)A=e+i+a;else{const{clientWidth:t,offsetWidth:r}=s;A=e+n+o+i+a+(r-t)}}o&&(s.style.transform=o),i&&(s.style.webkitTransform=i),n.roundLengths&&(A=Math.floor(A))}else A=(w-(n.slidesPerView-1)*b)/n.slidesPerView,n.roundLengths&&(A=Math.floor(A)),s&&(s.style[e.getDirectionLabel("width")]=`${A}px`);s&&(s.swiperSlideSize=A),m.push(A),n.centeredSlides?(S=S+A/2+E/2+b,0===E&&0!==r&&(S=S-w/2-b),0===r&&(S=S-w/2-b),Math.abs(S)<.001&&(S=0),n.roundLengths&&(S=Math.floor(S)),L%n.slidesPerGroup===0&&u.push(S),p.push(S)):(n.roundLengths&&(S=Math.floor(S)),(L-Math.min(e.params.slidesPerGroupSkip,L))%e.params.slidesPerGroup===0&&u.push(S),p.push(S),S=S+A+b),e.virtualSize+=A+b,E=A,L+=1}}if(e.virtualSize=Math.max(e.virtualSize,w)+y,o&&i&&("slide"===n.effect||"coverflow"===n.effect)&&(r.style.width=`${e.virtualSize+b}px`),n.setWrapperSize&&(r.style[e.getDirectionLabel("width")]=`${e.virtualSize+b}px`),C&&e.grid.updateWrapperSize(A,u),!n.centeredSlides){const t="auto"!==n.slidesPerView&&n.slidesPerView%1!=0,r=n.snapToSlideEdge&&!n.loop&&("auto"===n.slidesPerView||t);let s=u.length;if(r){let e;if("auto"===n.slidesPerView){e=1;let t=0;for(let n=m.length-1;n>=0&&(t+=m[n]+(n<m.length-1?b:0),t<=w);n-=1)e=m.length-n}else e=Math.floor(n.slidesPerView);s=Math.max(c-e,0)}const o=[];for(let t=0;t<u.length;t+=1){let i=u[t];n.roundLengths&&(i=Math.floor(i)),r?t<=s&&o.push(i):u[t]<=e.virtualSize-w&&o.push(i)}u=o,Math.floor(e.virtualSize-w)-Math.floor(u[u.length-1])>1&&(r||u.push(e.virtualSize-w))}if(a&&n.loop){const t=m[0]+b,r=(e.virtual.slidesBefore??0)+(e.virtual.slidesAfter??0);if(n.slidesPerGroup>1){const e=Math.ceil(r/n.slidesPerGroup),s=t*n.slidesPerGroup;for(let t=0;t<e;t+=1)u.push(u[u.length-1]+s)}for(let s=0;s<r;s+=1)1===n.slidesPerGroup&&u.push(u[u.length-1]+t),p.push(p[p.length-1]+t),e.virtualSize+=t}if(0===u.length&&(u=[0]),0!==b){const t=e.isHorizontal()&&o?"marginLeft":e.getDirectionLabel("marginRight");d.filter((e,t)=>!(n.cssMode&&!n.loop)||t!==d.length-1).forEach(e=>{e.style[t]=`${b}px`})}if(n.centeredSlides&&n.centeredSlidesBounds){let e=0;m.forEach(t=>{e+=t+(b||0)}),e-=b;const t=e>w?e-w:0;u=u.map(e=>e<=0?-f:e>t?t+y:e)}if(n.centerInsufficientSlides){let e=0;if(m.forEach(t=>{e+=t+(b||0)}),e-=b,e<w){const t=(w-e)/2;u.forEach((e,n)=>{u[n]=e-t}),p.forEach((e,n)=>{p[n]=e+t})}}if(Object.assign(e,{slides:d,snapGrid:u,slidesGrid:p,slidesSizesGrid:m}),n.centeredSlides&&n.cssMode&&!n.centeredSlidesBounds){Pe(r,"--swiper-centered-offset-before",-u[0]+"px"),Pe(r,"--swiper-centered-offset-after",e.size/2-m[m.length-1]/2+"px");const t=-e.snapGrid[0],n=-e.slidesGrid[0];e.snapGrid=e.snapGrid.map(e=>e+t),e.slidesGrid=e.slidesGrid.map(e=>e+n)}if(c!==l&&e.emit("slidesLengthChange"),u.length!==g&&(e.params.watchOverflow&&e.checkOverflow(),e.emit("snapGridLengthChange")),p.length!==v&&e.emit("slidesGridLengthChange"),n.watchSlidesProgress&&e.updateSlidesOffset(),e.emit("slidesUpdated"),!(a||n.cssMode||"slide"!==n.effect&&"fade"!==n.effect)){const t=`${n.containerModifierClass}backface-hidden`,r=e.el.classList.contains(t);c<=n.maxBackfaceHiddenSlides?r||e.el.classList.add(t):r&&e.el.classList.remove(t)}},updateAutoHeight:function(e){const t=this,n=[],r=t.virtual&&t.params.virtual?.enabled;let s,o=0;"number"==typeof e?t.setTransition(e):!0===e&&t.setTransition(t.params.speed);const i=e=>r?t.slides[t.getSlideIndexByData(e)]:t.slides[e];if("auto"!==t.params.slidesPerView&&t.params.slidesPerView>1)if(t.params.centeredSlides)(t.visibleSlides||[]).forEach(e=>{n.push(e)});else for(s=0;s<Math.ceil(t.params.slidesPerView);s+=1){const e=t.activeIndex+s;if(e>t.slides.length&&!r)break;const o=i(e);o&&n.push(o)}else{const e=i(t.activeIndex);e&&n.push(e)}for(s=0;s<n.length;s+=1)if(void 0!==n[s]){const e=n[s].offsetHeight;o=e>o?e:o}(o||0===o)&&(t.wrapperEl.style.height=`${o}px`)},updateSlidesOffset:function(){const e=this,t=e.slides,n=e.isElement?e.isHorizontal()?e.wrapperEl.offsetLeft:e.wrapperEl.offsetTop:0;for(let r=0;r<t.length;r+=1)t[r].swiperSlideOffset=(e.isHorizontal()?t[r].offsetLeft:t[r].offsetTop)-n-e.cssOverflowAdjustment()},updateSlidesProgress:function(e=this&&this.translate||0){const t=this,n=t.params,{slides:r,rtlTranslate:s,snapGrid:o}=t;if(0===r.length)return;void 0===r[0].swiperSlideOffset&&t.updateSlidesOffset();let i=-e;s&&(i=e),t.visibleSlidesIndexes=[],t.visibleSlides=[];let a=n.spaceBetween;"string"==typeof a&&a.indexOf("%")>=0?a=parseFloat(a.replace("%",""))/100*t.size:"string"==typeof a&&(a=parseFloat(a));for(let e=0;e<r.length;e+=1){const l=r[e];let d=l.swiperSlideOffset??0;n.cssMode&&n.centeredSlides&&(d-=r[0].swiperSlideOffset??0);const c=l.swiperSlideSize??0,u=(i+(n.centeredSlides?t.minTranslate():0)-d)/(c+a),p=(i-o[0]+(n.centeredSlides?t.minTranslate():0)-d)/(c+a),m=-(i-d),h=m+t.slidesSizesGrid[e],f=m>=0&&m<=t.size-t.slidesSizesGrid[e],y=m>=0&&m<t.size-1||h>1&&h<=t.size||m<=0&&h>=t.size;y&&(t.visibleSlides.push(l),t.visibleSlidesIndexes.push(e)),pt(l,y,n.slideVisibleClass),pt(l,f,n.slideFullyVisibleClass),l.progress=s?-u:u,l.originalProgress=s?-p:p}},updateProgress:function(e){const t=this;if(void 0===e){const n=t.rtlTranslate?-1:1;e=t&&t.translate&&t.translate*n||0}const n=t.params,r=t.maxTranslate()-t.minTranslate();let{progress:s,isBeginning:o,isEnd:i}=t,a=t.progressLoop;const l=o,d=i;if(0===r)s=0,o=!0,i=!0;else{s=(e-t.minTranslate())/r;const n=Math.abs(e-t.minTranslate())<1,a=Math.abs(e-t.maxTranslate())<1;o=n||s<=0,i=a||s>=1,n&&(s=0),a&&(s=1)}if(n.loop){const n=t.getSlideIndexByData(0),r=t.getSlideIndexByData(t.slides.length-1),s=t.slidesGrid[n],o=t.slidesGrid[r],i=t.slidesGrid[t.slidesGrid.length-1],l=Math.abs(e);a=l>=s?(l-s)/i:(l+i-o)/i,a>1&&(a-=1)}Object.assign(t,{progress:s,progressLoop:a,isBeginning:o,isEnd:i}),(n.watchSlidesProgress||n.centeredSlides&&n.autoHeight)&&t.updateSlidesProgress(e),o&&!l&&t.emit("reachBeginning toEdge"),i&&!d&&t.emit("reachEnd toEdge"),(l&&!o||d&&!i)&&t.emit("fromEdge"),t.emit("progress",s)},updateSlidesClasses:function(){const e=this,{slides:t,params:n,slidesEl:r,activeIndex:s}=e,o=!(!e.virtual||!n.virtual?.enabled),i=e.grid&&n.grid&&n.grid.rows>1,a=e=>Ie(r,`.${n.slideClass}${e}, swiper-slide${e}`)[0];let l,d,c;if(o)if(n.loop){const t=e.virtual.slides;let n=s-(e.virtual.slidesBefore??0);n<0&&(n=t.length+n),n>=t.length&&(n-=t.length),l=a(`[data-swiper-slide-index="${n}"]`)}else l=a(`[data-swiper-slide-index="${s}"]`);else i?(l=t.find(e=>e.column===s),c=t.find(e=>e.column===s+1),d=t.find(e=>e.column===s-1)):l=t[s];l&&(i||(c=function(e,t){const n=[];let r=e.nextElementSibling;for(;r;)t&&!r.matches(t)||n.push(r),r=r.nextElementSibling;return n}(l,`.${n.slideClass}, swiper-slide`)[0],n.loop&&!c&&(c=t[0]),d=function(e,t){const n=[];let r=e.previousElementSibling;for(;r;)t&&!r.matches(t)||n.push(r),r=r.previousElementSibling;return n}(l,`.${n.slideClass}, swiper-slide`)[0],n.loop&&0===!d&&(d=t[t.length-1]))),t.forEach(e=>{ut(e,e===l,n.slideActiveClass),ut(e,e===c,n.slideNextClass),ut(e,e===d,n.slidePrevClass)}),e.emitSlidesClasses()},updateActiveIndex:function(e){const t=this,n=t.rtlTranslate?t.translate:-t.translate,{snapGrid:r,params:s,activeIndex:o,realIndex:i,snapIndex:a}=t;let l,d=e;const c=e=>{const n=t.virtual.slides;let r=e-(t.virtual.slidesBefore??0);return r<0&&(r=n.length+r),r>=n.length&&(r-=n.length),r};if(void 0===d&&(d=function(e){const{slidesGrid:t,params:n}=e,r=e.rtlTranslate?e.translate:-e.translate;let s;for(let e=0;e<t.length;e+=1)void 0!==t[e+1]?r>=t[e]&&r<t[e+1]-(t[e+1]-t[e])/2?s=e:r>=t[e]&&r<t[e+1]&&(s=e+1):r>=t[e]&&(s=e);return n.normalizeSlideIndex&&(s<0||void 0===s)&&(s=0),s}(t)),r.indexOf(n)>=0)l=r.indexOf(n);else{const e=Math.min(s.slidesPerGroupSkip,d);l=e+Math.floor((d-e)/s.slidesPerGroup)}if(l>=r.length&&(l=r.length-1),d===o&&!t.params.loop)return void(l!==a&&(t.snapIndex=l,t.emit("snapIndexChange")));if(d===o&&t.params.loop&&t.virtual&&t.params.virtual?.enabled)return void(t.realIndex=c(d));const u=t.grid&&s.grid&&s.grid.rows>1;let p;if(t.virtual&&s.virtual?.enabled)p=s.loop?c(d):d;else if(u){const e=t.slides.find(e=>e.column===d);let n=parseInt(e.getAttribute("data-swiper-slide-index"),10);Number.isNaN(n)&&(n=Math.max(t.slides.indexOf(e),0)),p=Math.floor(n/s.grid.rows)}else if(t.slides[d]){const e=t.slides[d].getAttribute("data-swiper-slide-index");p=e?parseInt(e,10):d}else p=d;Object.assign(t,{previousSnapIndex:a,snapIndex:l,previousRealIndex:i,realIndex:p,previousIndex:o,activeIndex:d}),t.initialized&&$e(t),t.__loopFixInProgress__||(t.emit("activeIndexChange"),t.emit("snapIndexChange"),(t.initialized||t.params.runCallbacksOnInit)&&((t.__lastEmittedRealIndex__??i)!==p&&t.emit("realIndexChange"),t.emit("slideChange")),t.__lastEmittedRealIndex__=p)},updateClickedSlide:function(e,t){const n=this,r=n.params;let s=e.closest(`.${r.slideClass}, swiper-slide`);!s&&n.isElement&&t&&t.length>1&&t.includes(e)&&[...t.slice(t.indexOf(e)+1,t.length)].forEach(e=>{!s&&e.matches&&e.matches(`.${r.slideClass}, swiper-slide`)&&(s=e)});let o,i=!1;if(s)for(let e=0;e<n.slides.length;e+=1)if(n.slides[e]===s){i=!0,o=e;break}if(!s||!i)return n.clickedSlide=void 0,void(n.clickedIndex=void 0);n.clickedSlide=s,n.virtual&&n.params.virtual?.enabled?n.clickedIndex=parseInt(s.getAttribute("data-swiper-slide-index"),10):n.clickedIndex=o,r.slideToClickedSlide&&void 0!==n.clickedIndex&&n.clickedIndex!==n.activeIndex&&n.slideToClickedSlide()}};const ht={eventsEmitter:Xe,update:mt,translate:ct,transition:{setTransition:function(e,t){const n=this;n.params.cssMode||(n.wrapperEl.style.transitionDuration=`${e}ms`,n.wrapperEl.style.transitionDelay=0===e?"0ms":""),n.emit("setTransition",e,t)},transitionStart:function(e=!0,t){const n=this,{params:r}=n;r.cssMode||(r.autoHeight&&n.updateAutoHeight(),dt({swiper:n,runCallbacks:e,direction:t,step:"Start"}))},transitionEnd:function(e=!0,t){const n=this,{params:r}=n;n.animating=!1,r.cssMode||(n.setTransition(0),dt({swiper:n,runCallbacks:e,direction:t,step:"End"}))}},slide:lt,loop:it,grabCursor:{setGrabCursor:function(e){const t=this;if(!t.params.simulateTouch||t.params.watchOverflow&&t.isLocked||t.params.cssMode)return;const n="container"===t.params.touchEventsTarget?t.el:t.wrapperEl;t.isElement&&(t.__preventObserver__=!0),n.style.cursor="move",n.style.cursor=e?"grabbing":"grab",t.isElement&&requestAnimationFrame(()=>{t.__preventObserver__=!1})},unsetGrabCursor:function(){const e=this;e.params.watchOverflow&&e.isLocked||e.params.cssMode||(e.isElement&&(e.__preventObserver__=!0),e["container"===e.params.touchEventsTarget?"el":"wrapperEl"].style.cursor="",e.isElement&&requestAnimationFrame(()=>{e.__preventObserver__=!1}))}},events:{attachEvents:function(){const e=this,{params:t}=e;e.onTouchStart=st.bind(e),e.onTouchMove=nt.bind(e),e.onTouchEnd=tt.bind(e),e.onDocumentTouchStart=Ke.bind(e),t.cssMode&&(e.onScroll=et.bind(e)),e.onClick=Ze.bind(e),e.onLoad=Je.bind(e),ot(e,"on")},detachEvents:function(){ot(this,"off")}},breakpoints:je,checkOverflow:Ue,classes:Ye},ft={};class yt{static extendedDefaults;static defaults;constructor(...e){let t,n;if(1===e.length&&null!==e[0]&&"object"==typeof e[0]&&"Object"===Object.prototype.toString.call(e[0]).slice(8,-1)?n=e[0]:[t,n]=e,n||(n={}),n=xe({},n),t&&!n.el&&(n.el=t),n.el&&"string"==typeof n.el&&"undefined"!=typeof document&&document.querySelectorAll(n.el).length>1){const e=[];return document.querySelectorAll(n.el).forEach(t=>{const r=xe({},n,{el:t});e.push(new yt(r))}),e}const r=this;r.__swiper__=!0,r.support=ze(),r.device=Fe({userAgent:n.userAgent??void 0}),r.browser=Re(),r.eventsListeners={},r.eventsAnyListeners=[],r.modules=[...r.__modules__||[]],n.modules&&Array.isArray(n.modules)&&n.modules.forEach(e=>{const t=e;"function"==typeof t&&r.modules.indexOf(t)<0&&r.modules.push(t)});const s={};r.modules.forEach(e=>{e({params:n,swiper:r,extendParams:at(n,s),on:r.on.bind(r),once:r.once.bind(r),off:r.off.bind(r),emit:r.emit.bind(r)})});const o=xe({},We,s);if(r.params=xe({},o,ft,n),r.originalParams=xe({},r.params),r.passedParams=xe({},n),r.params&&r.params.on){const e=r.params.on;Object.keys(e).forEach(t=>{const n=e[t];n&&r.on(t,n)})}return r.params&&r.params.onAny&&r.onAny(r.params.onAny),Object.assign(r,{enabled:r.params.enabled,el:t,classNames:[],slides:[],slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal(){return"horizontal"===r.params.direction},isVertical(){return"vertical"===r.params.direction},activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,cssOverflowAdjustment(){return Math.trunc(this.translate/2**23)*2**23},allowSlideNext:r.params.allowSlideNext,allowSlidePrev:r.params.allowSlidePrev,touchEventsData:{isTouched:void 0,isMoved:void 0,allowTouchCallbacks:void 0,touchStartTime:void 0,isScrolling:void 0,currentTranslate:void 0,startTranslate:void 0,allowThresholdMove:void 0,focusableElements:r.params.focusableElements,lastClickTime:0,clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,startMoving:void 0,pointerId:null,touchId:null},allowClick:!0,allowTouchMove:r.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),r.emit("_swiper"),r.params.init&&r.init(),r}getDirectionLabel(e){return this.isHorizontal()?e:{width:"height","margin-top":"margin-left","margin-bottom ":"margin-right","margin-left":"margin-top","margin-right":"margin-bottom","padding-left":"padding-top","padding-right":"padding-bottom",marginRight:"marginBottom"}[e]}isHorizontal(){return"horizontal"===this.params.direction}isVertical(){return"vertical"===this.params.direction}cssOverflowAdjustment(){return Math.trunc(this.translate/2**23)*2**23}getSlideIndex(e){const{slidesEl:t,params:n}=this,r=Oe(Ie(t,`.${n.slideClass}, swiper-slide`)[0]);return Oe(e)-(r??0)}getSlideIndexByData(e){return this.getSlideIndex(this.slides.find(t=>Number(t.getAttribute("data-swiper-slide-index"))===e))}getSlideIndexWhenGrid(e){return this.grid&&this.params.grid&&this.params.grid.rows>1&&("column"===this.params.grid.fill?e=Math.floor(e/this.params.grid.rows):"row"===this.params.grid.fill&&(e%=Math.ceil(this.slides.length/this.params.grid.rows))),e}recalcSlides(){const{slidesEl:e,params:t}=this;this.slides=Ie(e,`.${t.slideClass}, swiper-slide`)}enable(){this.enabled||(this.enabled=!0,this.params.grabCursor&&this.setGrabCursor(),this.emit("enable"))}disable(){this.enabled&&(this.enabled=!1,this.params.grabCursor&&this.unsetGrabCursor(),this.emit("disable"))}setProgress(e,t){e=Math.min(Math.max(e,0),1);const n=this.minTranslate(),r=(this.maxTranslate()-n)*e+n;this.translateTo(r,void 0===t?0:t),this.updateActiveIndex(),this.updateSlidesClasses()}emitContainerClasses(){if(!this.params._emitClasses||!this.el)return;const e=this.el.className.split(" ").filter(e=>0===e.indexOf("swiper")||0===e.indexOf(this.params.containerModifierClass));this.emit("_containerClasses",e.join(" "))}getSlideClasses(e){return this.destroyed?"":e.className.split(" ").filter(e=>0===e.indexOf("swiper-slide")||0===e.indexOf(this.params.slideClass)).join(" ")}emitSlidesClasses(){if(!this.params._emitClasses||!this.el)return;const e=[];this.slides.forEach(t=>{const n=this.getSlideClasses(t);e.push({slideEl:t,classNames:n}),this.emit("_slideClass",t,n)}),this.emit("_slideClasses",e)}slidesPerViewDynamic(e="current",t=!1){const{params:n,slides:r,slidesGrid:s,slidesSizesGrid:o,size:i,activeIndex:a}=this;let l=1;if("number"==typeof n.slidesPerView)return n.slidesPerView;if(!i)return l;if(n.centeredSlides){let e=r[a]?Math.ceil(r[a].swiperSlideSize??0):0,t=!1;for(let n=a+1;n<r.length;n+=1)r[n]&&!t&&(e+=Math.ceil(r[n].swiperSlideSize??0),l+=1,e>i&&(t=!0));for(let n=a-1;n>=0;n-=1)r[n]&&!t&&(e+=r[n].swiperSlideSize??0,l+=1,e>i&&(t=!0))}else if("current"===e)for(let e=a+1;e<r.length;e+=1){(t?s[e]+o[e]-s[a]<i:s[e]-s[a]<i)&&(l+=1)}else for(let e=a-1;e>=0;e-=1){s[a]-s[e]<i&&(l+=1)}return l}update(){const e=this;if(!e||e.destroyed)return;const{snapGrid:t,params:n}=e;function r(){const t=e.rtlTranslate?-1*e.translate:e.translate,n=Math.min(Math.max(t,e.maxTranslate()),e.minTranslate());e.setTranslate(n),e.updateActiveIndex(),e.updateSlidesClasses()}let s;if(n.breakpoints&&e.setBreakpoint(),n.lazyPreload&&[...e.el.querySelectorAll('[loading="lazy"]')].forEach(t=>{t.complete&&Ge(e,t)}),e.updateSize(),e.updateSlides(),e.updateProgress(),e.updateSlidesClasses(),n.freeMode?.enabled&&!n.cssMode)r(),n.autoHeight&&e.updateAutoHeight();else{if(("auto"===n.slidesPerView||n.slidesPerView>1)&&e.isEnd&&!n.centeredSlides){const t=e.virtual&&n.virtual?.enabled?e.virtual.slides.length:e.slides.length;s=e.slideTo(t-1,0,!1,!0)}else s=e.slideTo(e.activeIndex,0,!1,!0);s||r()}n.watchOverflow&&t!==e.snapGrid&&e.checkOverflow(),e.emit("update")}changeDirection(e,t=!0){const n=this,r=n.params.direction;return e||(e="horizontal"===r?"vertical":"horizontal"),e===r||"horizontal"!==e&&"vertical"!==e||(n.el.classList.remove(`${n.params.containerModifierClass}${r}`),n.el.classList.add(`${n.params.containerModifierClass}${e}`),n.emitContainerClasses(),n.params.direction=e,n.rtlTranslate="horizontal"===e&&n.rtl,n.slides.forEach(t=>{"vertical"===e?t.style.width="":t.style.height=""}),n.emit("changeDirection"),t&&n.update()),n}changeLanguageDirection(e){const t=this;t.rtl&&"rtl"===e||!t.rtl&&"ltr"===e||(t.rtl="rtl"===e,t.rtlTranslate="horizontal"===t.params.direction&&t.rtl,t.rtl?(t.el.classList.add(`${t.params.containerModifierClass}rtl`),t.el.dir="rtl"):(t.el.classList.remove(`${t.params.containerModifierClass}rtl`),t.el.dir="ltr"),t.update())}mount(e){const t=this;if(t.mounted)return!0;if("undefined"==typeof document)return!1;const n=e??t.params.el;let r=null;if("string"==typeof n?r=document.querySelector(n):n instanceof HTMLElement&&(r=n),!r)return!1;r.swiper=t;const s=r.parentNode;s&&s.host&&s.host.nodeName===t.params.swiperElementNodeName.toUpperCase()&&(t.isElement=!0);const o=()=>`.${(t.params.wrapperClass||"").trim().split(" ").join(".")}`;let i=(()=>
vendor: 4,553 bytes, line 191
191{if(r&&r.shadowRoot){return r.shadowRoot.querySelector(o())}return Ie(r,o())[0]})();!i&&t.params.createElements&&(i=_e("div",t.params.wrapperClass),r.append(i),Ie(r,`.${t.params.slideClass}`).forEach(e=>{i.append(e)}));const a=t.isElement?r.parentNode.host:null;return Object.assign(t,{el:r,wrapperEl:i,slidesEl:t.isElement&&!a.slideSlots?a:i,hostEl:t.isElement?a:r,mounted:!0,rtl:"rtl"===r.dir.toLowerCase()||"rtl"===ke(r,"direction"),rtlTranslate:"horizontal"===t.params.direction&&("rtl"===r.dir.toLowerCase()||"rtl"===ke(r,"direction")),wrongRTL:"-webkit-box"===ke(i,"display")}),!0}init(e){const t=this;if(t.initialized)return t;if(!1===t.mount(e))return t;if(t.emit("beforeInit"),t.params.breakpoints&&t.setBreakpoint(),t.addClasses(),t.updateSize(),t.updateSlides(),t.params.watchOverflow&&t.checkOverflow(),t.params.grabCursor&&t.enabled&&t.setGrabCursor(),t.params.loop&&t.virtual&&t.params.virtual?.enabled?t.slideTo((t.params.initialSlide??0)+(t.virtual.slidesBefore??0),0,t.params.runCallbacksOnInit,!1,!0):t.slideTo(t.params.initialSlide,0,t.params.runCallbacksOnInit,!1,!0),t.params.loop&&t.loopCreate(void 0,!0),t.attachEvents(),t.params.lazyPreload){const e=[...t.el.querySelectorAll('[loading="lazy"]')];t.isElement&&e.push(...t.hostEl.querySelectorAll('[loading="lazy"]')),e.forEach(e=>{e.complete?Ge(t,e):e.addEventListener("load",e=>{Ge(t,e.target)})})}return t.initialized=!0,$e(t),t.emit("init"),t.emit("afterInit"),t}destroy(e=!0,t=!0){const n=this,{params:r,el:s,wrapperEl:o,slides:i}=n;return void 0===n.params||n.destroyed||(n.emit("beforeDestroy"),n.initialized=!1,n.detachEvents(),r.loop&&n.loopDestroy(),t&&(n.removeClasses(),s&&"string"!=typeof s&&s.removeAttribute("style"),o&&o.removeAttribute("style"),i&&i.length&&i.forEach(e=>{e.classList.remove(r.slideVisibleClass,r.slideFullyVisibleClass,r.slideActiveClass,r.slideNextClass,r.slidePrevClass),e.removeAttribute("style"),e.removeAttribute("data-swiper-slide-index")})),n.emit("destroy"),Object.keys(n.eventsListeners).forEach(e=>{n.off(e)}),!1!==e&&(n.el&&"string"!=typeof n.el&&(n.el.swiper=null),a=n,Object.keys(a).forEach(e=>{try{a[e]=null}catch{}try{delete a[e]}catch{}})),n.destroyed=!0),null;var a}static extendDefaults(e){xe(ft,e)}static installModule(e){yt.prototype.__modules__||(yt.prototype.__modules__=[]);const t=yt.prototype.__modules__;"function"==typeof e&&t.indexOf(e)<0&&t.push(e)}static use(e){return Array.isArray(e)?(e.forEach(e=>yt.installModule(e)),yt):(yt.installModule(e),yt)}}Object.defineProperty(yt,"extendedDefaults",{get(){return ft}}),Object.defineProperty(yt,"defaults",{get(){return We}});const gt=ht,vt=yt.prototype;Object.keys(gt).forEach(e=>{const t=gt[e];Object.keys(t).forEach(e=>{vt[e]=t[e]})}),yt.use([({swiper:e,on:t,emit:n})=>{let r=null,s=null;const o=()=>{e&&!e.destroyed&&e.initialized&&(n("beforeResize"),n("resize"))},i=()=>{e&&!e.destroyed&&e.initialized&&n("orientationchange")};t("init",()=>{e.params.resizeObserver&&void 0!==window.ResizeObserver?e&&!e.destroyed&&e.initialized&&(r=new ResizeObserver(t=>{s=window.requestAnimationFrame(()=>{const{width:n,height:r}=e;let s=n,i=r;t.forEach(({contentBoxSize:t,contentRect:n,target:r})=>{if(r&&r!==e.el)return;const o=Array.isArray(t)?t[0]:t;s=n?n.width:o.inlineSize,i=n?n.height:o.blockSize}),s===n&&i===r||o()})}),r.observe(e.el)):(window.addEventListener("resize",o),window.addEventListener("orientationchange",i))}),t("destroy",()=>{s&&window.cancelAnimationFrame(s),r&&r.unobserve&&e.el&&(r.unobserve(e.el),r=null),window.removeEventListener("resize",o),window.removeEventListener("orientationchange",i)})},({swiper:e,extendParams:t,on:n})=>{const r=[],s=(t,n={})=>{const s=window.MutationObserver||window.WebkitMutationObserver;if(!s)return;const o=new s(t=>{if(e.__preventObserver__)return;if(1===t.length)return void e.emit("observerUpdate",t[0]);const n=function(){e.emit("observerUpdate",t[0])};window.requestAnimationFrame?window.requestAnimationFrame(n):window.setTimeout(n,0)});o.observe(t,{attributes:void 0===n.attributes||n.attributes,childList:e.isElement||void 0===n.childList||n.childList,characterData:void 0===n.characterData||n.characterData}),r.push(o)};t({observer:!1,observeParents:!1,observeSlideChildren:!1}),n("init",()=>{if(e.params.observer){if(e.params.observeParents){const t=function(e,t){const n=[];let r=e.parentElement;for(;r;)t&&!r.matches(t)||n.push(r),r=r.parentElement;return n}(e.hostEl);for(let e=0;e<t.length;e+=1)s(t[e])}s(e.hostEl,{childList:e.params.observeSlideChildren}),s(e.wrapperEl,{attributes:!1})}}),n("destroy",()=>
191{r.forEach(e=>{e.disconnect()}),r.splice(0,r.length)})}]);var wt=["78633","77378","76656","76655","76579","76557","76528","76166","75036","78161","78160","78147","78121","78114","78861","78066","78059","78056","78039","78016","78009","78027","78015","78006","78004","78670","78156","78155","78154","78124","78123","78115","78108","78623","78266","78163","78135","78133","78132","78131","78130","78070","78299","78298","78297","78296","78295","78294","78293","78292","78291","78289","78288","78285","78284","78283","78280","78279","78278","78270","78269","78268","78265","78264","78263","78261","78260","78259","78258","78257","78256","78255","78254","78253","78252","78251","78250","78249","78248","78247","78246","78245","78244","78243","78242","78241","78240","78239","78238","78237","78236","78235","78234","78233","78232","78231","78230","78229","78228","78227","78226","78225","78224","78223","78222","78221","78220","78219","78218","78217","78216","78215","78214","78213","78212","78211","78210","78209","78208","78207","78206","78205","78204","78203","78202","78201","78152","78150","78148","78112","78109","78101","78073","78069","78054","78023","78002","78063","78065","78064","78052","78050","78005","78648","78657","77363","78945","78654","78611","78608","78605","77468","77363","77434","76520","77523","77466","77446","77445","77423","77393","77387","77386","77385","77384","77382","77381","77380","77372","77365","77362","77357","77356","77355","77354","77353","77316","77306","77305","77304","77303","77302","77301","77582","77575","77535","77328","77327","77598","77587","77586","77572","77571","77562","77547","77536","77532","77530","77522","77521","77520","77508","77507","77506","77505","77504","77503","77502","77501","77493","77492","77491","77484","77450","77449","77447","77433","77429","77413","77411","77410","77402","77401","77396","77391","77389","77388","77383","77379","77377","77375","77373","77347","77346","77345","77339","77338","77337","77336","77325","77315","77299","77297","77293","77292","77291","77290","77289","77288","77287","77284","77282","77280","77279","77277","77275","77274","77273","77272","77271","77270","77269","77268","77267","77266","77265","77263","77262","77261","77259","77258","77257","77256","77255","77254","77253","77252","77251","77249","77248","77245","77244","77243","77242","77241","77240","77238","77237","77236","77235","77234","77233","77231","77230","77229","77228","77227","77226","77225","77224","77223","77222","77221","77220","77219","77218","77217","77216","77215","77213","77212","77210","77209","77208","77207","77206","77205","77204","77203","77202","77201","77099","77098","77096","77095","77094","77093","77092","77091","77090","77089","77088","77087","77086","77085","77084","77083","77082","77081","77080","77079","77078","77077","77076","77075","77074","77073","77072","77071","77070","77069","77068","77067","77066","77065","77064","77063","77062","77061","77060","77059","77058","77057","77056","77055","77054","77052","77051","77050","77049","77048","77047","77046","77045","77044","77043","77042","77041","77040","77039","77038","77037","77036","77035","77034","77033","77032","77031","77030","77029","77028","77027","77026","77025","77024","77023","77022","77021","77020","77019","77018","77017","77016","77015","77014","77013","77012","77011","77010","77009","77008","77007","77006","77005","77004","77003","77002","77001","77592","77591","77590","77574","77573","77568","77565","77563","77555","77554","77553","77552","77551","77550","77549","77546","77539","77518","77517","77510","77545","77497","77496","77494","77489","77487","77481","77479","77478","77477","77476","77471","77469","77464","77461","77459","77451","77444","77441","77417","77406","77053","77597","77580","77560","77588","77584","77583","77581","77578","77577","77566","77542","77541","77534","77531","77516","77515","77512","77511","77486","77480","77430","77422","77485","77474","77473","77418","77488","77435","77420","77407","75033","76426","76267","76246","76234","76225","76078","76073","76071","76023","75169","76248","76244","76199","76198","76197","76196","76195","76193","76192","76191","76185","76182","76181","76180","76179","76177","76164","76163","76162","76161","76155","76150","76148","76147","76140","76137","76136","76135","76134","76133","76132","76131","76130","76129","76127","76126","76124","76123","76122","76121","76120","76119","76118","76117","76116","76115","76114","76113","76112","76111","76110","76109","76108","76107","76106","76105","76104","76103","76102","76101","76099","76096","76095","76094","76092","76063","76060","76054","76053","76052","76051","76040","76039","76036","76034","76022","76021","76020","76019","76018","76017","76016","76015","76014","76013","76012","76011","76010","76007","76006","76005","76004","76003","76002","76001","76077","76070","76043","75189","75132","75087","75032","76487","76485","76439","76098","76088","76087","76086","76085","76082","76066","76008","75155","75105","75161","75160","75158","75157","75147","75143","75142","75126","75118","75114","76097","76093","76084","76061","76059","76058","76050","76044","76033","76031","76028","76009","75474","75458","75402","75401","75135","76049","76048","76035","75156","75124","76271","76233","75495","75491","75489","75459","75414","75092","75091","75090","75076","75058","75021","75020","75490","76670","76651","76623","76065","76064","76041","75168","75167","75165","75154","75152","75125","75120","75119","75101","76266","76262","76259","76258","76249","76247","76227","76226","76210","76209","76208","76207","76206","76205","76204","76203","76202","76201","75077","75068","75067","75065","75057","75056","75034","75029","75028","75027","75022","75010","75007","75398","75397","75395","75394","75393","75392","75391","75390","75389","75382","75381","75380","75379","75378","75376","75374","75373","75372","75371","75370","75368","75367","75360","75359","75358","75357","75356","75355","75354","75342","75339","75336","75326","75320","75315","75313","75312","75303","75301","75285","75284","75283","75277","75275","75270","75267","75266","75265","75264","75263","75262","75261","75260","75254","75253","75251","75250","75249","75248","75247","75246","75244","75243","75242","75241","75240","75238","75237","75236","75235","75234","75233","75232","75231","75230","75229","75228","75227","75226","75225","75224","75223","75222","75221","75220","75219","75218","75217","75216","75215","75214","75212","75211","75210","75209","75208","75207","75206","75205","75204","75203","75202","75201","75187","75185","75182","75181","75180","75172","75159","75150","75149","75146","75141","75138","75137","75134","75123","75116","75115","75106","75104","75099","75089","75088","75085","75083","75082","75081","75080","75063","75062","75061","75060","75054","75053","75052","75051","75050","75049","75048","75047","75046","75045","75044","75043","75042","75041","75040","75039","75038","75030","75019","75017","75016","75015","75014","75011","75006","75001","76272","76263","76238","75485","75454","75442","75424","75409","75407","75287","75252","75173","75166","75164","75121","75098","75097","75094","75093","75086","75078","75075","75074","75071","75070","75069","75035","75026","75025","75024","75023","75013","75009","75002","78665","78729","78717","78683","78682","78681","78680","78674","78673","78664","78646","78642","78641","78634","78630","78628","78627","78626","78615","78613","76578","76574","76573","76537","76530","76527","78799","78783","78779","78778","78774","78773","78772","78769","78768","78767","78766","78765","78764","78763","78762","78761","78760","78759","78758","78757","78756","78755","78754","78753","78752","78751","78750","78749","78748","78747","78746","78745","78744","78742","78741","78739","78738","78736","78735","78734","78733","78732","78731","78730","78728","78727","78726","78725","78724","78723","78722","78721","78720","78719","78718","78716","78715","78714","78713","78712","78711","78710","78709","78708","78705","78704","78703","78702","78701","78691","78669","78660","78653","78652","78651","78645","78617","73344","73301","76577","76520","76799","76798","76797","76714","76712","76711","76710","76708","76707","76706","76705","76704","76703","76702","76701","76657","76643","76633","76624","76524","76539","78737","78676","78667","78666","78640","78620","78619","78610","76570","76522","78661","78656","78655","78644","78622","78616","78663","78636","78606","76571","76569","76559","76554","76549","76548","76547","76543","76542","76541","76540","76534","76533","76513","76511","76508","76505","76504","76503","76502","76501","77498","75072","78957","78953","78662","78659","78650","78621","78612","78602"];const bt=["propertyType-form","propertySize-form","info-form","contactPreferences-form"],St=()=>{const e=document.querySelectorAll(".security");Array.prototype.slice.call(e).forEach(function(e){const t=e.querySelector("#security-form"),n=[e.querySelector("#propertyType-form"),e.querySelector("#propertySize-form"),e.querySelector("#info-form"),e.querySelector("#contactPreferences-form")],r=e.querySelectorAll(".progress-icon"),s=e.querySelectorAll(".divider"),o=e.querySelectorAll(".progress-label");n.map((n,i)=>{n.classList.add("security-view","fade"),0===i&&(n.classList.add("show","active"),r[i].classList.add("active"),o[i].classList.add("active")),n.addEventListener("submit",a=>{if(a.preventDefault(),"contactPreferences-form"===n.id){if(xt(a))return}if(n.checkValidity()){const a=new FormData(n);if("propertyType-form"===n.id){const e=a.get("F299");if("rental"===e)return void(document.location.href=n.dataset.thankyouRentalUrl);if("Commercial"===e)return void(document.location.href=n.dataset.thankyouCommercialUrl)}else if("info-form"===n.id){const e=a.get("F12");if(!wt.includes(e))return void(document.location.href=n.dataset.notServiceableUrl)}let l;l="contactPreferences-form"===n.id?Et(n):new FormData(n);for(const e of l.entries())if(e[1]){const n=document.createElement("input");n.name=e[0],n.value=e[1],t.appendChild(n)}i!==bt.length-1?(r[i].classList.remove("active"),r[i].classList.add("complete"),s[i].classList.add("active"),r[i+1].classList.add("active"),o[i+1].classList.add("active"),Tt(e,n)):fetch(t.dataset.serviceableUrl,{method:t.method,body:new FormData(t)}).then(()=>{document.location.href=t.dataset.submissionRedirectUrl}).catch(e=>{console.error(e)})}Lt()})})})},Et=e=>{let t=new FormData,n=e.querySelector("#contactOptionsChoice");if(n&&"anytime"===n.value)return t.append("anytime","anytime"),document.querySelector("#F282").value="Contact me anytime",e.querySelector("#F284").value="Contact me anytime",t;{let n=e.querySelector("#startTimeChoice").value,r=e.querySelector("#endTimeChoice").value,s=At(n),o=At(r),i={};i.hrStart=s.hr,i.minStart=s.min,i.pmStart=s.pm,i.hrEnd=o.hr,i.minEnd=o.min,i.pmEnd=o.pm,i.F284=e.querySelector("#F284").value,i.selectedTime=`${n} to ${r}`,document.querySelector("#F282").value=i.selectedTime;for(const e in i)i[e]&&t.append(e,i[e])}return t},Lt=()=>{let e=Ct(window.location.toString());"string"==typeof e.txtReferralID&&(document.querySelector("#F187").value=e.txtReferralID),"string"==typeof e.sid&&(document.querySelector("#F426").value=e.sid),"string"==typeof e.agentID&&(document.querySelector("#F295").value=e.agentID),"string"==typeof e.realtorNM&&(document.querySelector("#realtorNM").value=e.realtorNM,document.querySelector("#F288").value="Realtor")},Ct=e=>(e=>{var t,n,r,s,o={};for(r=0,s=(t=e.split("&")).length;r<s;r++)(n=t[r].split("="))[0]&&n[1]?o[n[0]]=n[1]:o[{}];return o}
191)((e=>{var t="",n=(e||window.location.href).split("?");return n.length>1&&(t=n[1]),t})(e)),At=e=>({hr:e.substring(0,e.indexOf(":")),min:e.substring(e.indexOf(":")+1,e.indexOf(" ")),pm:e.substring(e.length-2)}),Tt=(e,t)=>{const n=bt.indexOf(t.id);if(n!==bt.length-1){const r=e.querySelector("#"+bt[n+1]);t.classList.remove("show","active"),r.classList.add("show","active")}},xt=e=>{let t=!1;const n=e.target,r=n.querySelector("[name='contactOptionsChoice']");if("anytime"!==r.value){const e=Array.from(n.querySelectorAll(".form-control"));t=e.some(e=>""===e.value),t&&(e.forEach(e=>{e.value=""}),r.value="anytime",r.dispatchEvent(new Event("change")))}return t},Pt=()=>{const e=Array.from(document.querySelectorAll("#contactPreferences-form"));e.length>0&&e.forEach(e=>{const t=Array.from(e.querySelectorAll("[name='contactOptionsChoice']")),n=e.querySelector(".security-form--contact-preference--timedate");t.length>0&&(n.style.display="none",t.forEach(t=>{t.addEventListener("change",()=>{((e,t)=>{const n=t.querySelector(".security-form--contact-preference--timedate");"time range"===e.value?(n.style.display="block",t.querySelector("[name='startTimeChoice']").selectedIndex=0,t.querySelector("[name='endTimeChoice']").selectedIndex=0,t.querySelector("[name='F284']").value=""):n.style.display="none"})(t,e)})}))})};"undefined"!=typeof window&&window.addEventListener("load",()=>{const e=document.querySelectorAll(".security");Array.prototype.slice.call(e).forEach(function(e){(e=>{try{var t=window.retrieveDataElement("NON_ANALYTICS_External Campaign Code_sid");console.log("APPEND: "+t),""!==t&&(e.appendChild("<input type='hidden' name='F288' id='F288' value='Online'/>"),document.querySelector("#F426").value||e.appendChild("<input type='hidden' name='F426' id='F426' value='"+t+"'/>"),document.querySelector("#F426").value=t)}catch(e){console.log(e)}})(e.querySelector("#security-form"))})});const It=()=>{const e=JSON.parse(localStorage.getItem("teal_adbe_enrichment_data"));if(e&&Object.prototype.hasOwnProperty.call(e,"properties")){const t=e.properties.profile;let n=null;if(Object.prototype.hasOwnProperty.call(e,"audiences")&&("main"===t&&(Object.prototype.hasOwnProperty.call(e.audiences,"nrgenergy_main_159")&&"Prospect ZipAndOffer"==e.audiences.nrgenergy_main_159&&(n="ZipAndOffer"),Object.prototype.hasOwnProperty.call(e.audiences,"nrgenergy_main_160")&&"Prospect ZipNoOffer"==e.audiences.nrgenergy_main_160&&(n="ZipNoOffer")),"live"===t&&(Object.prototype.hasOwnProperty.call(e.audiences,"nrgenergy_live_146")&&"Prospect ZipAndOffer"==e.audiences.nrgenergy_live_146&&(n="ZipAndOffer"),Object.prototype.hasOwnProperty.call(e.audiences,"nrgenergy_live_147")&&"Prospect ZipNoOffer"==e.audiences.nrgenergy_live_147&&(n="ZipNoOffer"))),n){const r=function(e){let t=e+"=",n=decodeURIComponent(document.cookie).split(";");for(let e=0;e<n.length;e++){let r=n[e];for(;" "==r.charAt(0);)r=r.substring(1);if(0==r.indexOf(t))return r.substring(t.length,r.length)}return""}("langCodeCookie").substring(0,2);let s,o,i,a,l,d;if("main"===t&&(s=e.properties[5646],o=e.properties[5650],i=e.properties[6110],a=e.properties[6126],l=e.properties[5493],d=e.properties[6253]),"live"===t&&(s=e.properties[5504],o=e.properties[5508],i=e.properties[5828],a=e.properties[5820],l=e.properties[5407],d=e.properties[5834]),"undefined"!=typeof window&&"undefined"!==window.dataLayerInternal&&void 0!==window.analyticsDynamicLoad&&(window.dataLayerInternal.esid=l||"",window.dataLayerInternal.acquisitionType="",window.dataLayerInternal.languageCode=r||"",window.dataLayerInternal.loginState="",window.dataLayerInternal.promoCode=a||"",window.dataLayerInternal.salesAgentInfo="",window.dataLayerInternal.salesAgentPartnerInfo="",window.dataLayerInternal.serviceCity="",window.dataLayerInternal.serviceState="",window.dataLayerInternal.serviceZipcode=s||"",window.dataLayerInternal.tdspCode=o?_t(o).ercotCode:"",window.dataLayerInternal.tdspCodeCCS=o?_t(o).sapCode:"",window.dataLayerInternal.tdspName=o?_t(o).name:"",window.dataLayerInternal.txtLanguageCode=r||"","ExperienceA"==d&&Mt("Personalization|REL_OE_ACQ_66","ZipNoOffer"===n?"Personalization:Returning Shopper Grid View Plan not Selected":"Personalization:Returning Shopper Plan Selected","Prospects"),"ExperienceB"==d&&(Mt("Personalization|REL_OE_ACQ_66","ZipNoOffer"===n?"Control:Returning Shopper Grid View Plan not Selected":"Control:Returning Shopper Plan Selected","Prospects"),window.analyticsDynamicLoad("PAGE","ZipNoOffer"===n?"electricitysales:shop:viewedoffers:modal":"electricitysales:enroll:selectedplan:modal","","","","Visible"))),"ExperienceA"==d){const e=document.getElementById("returningShopperCustomerAddress");e&&e.classList.add("d-none");const t=document.getElementById("returningShopperViewMorePlansButton");t&&(t.parentNode?.parentNode?.classList.remove("col-md-6"),t.parentNode?.parentNode?.style.setProperty("width","unset","important"),t.classList.add("d-none"));const d=document.getElementById("returningShopperPlanOne"),c=document.getElementById("returningShopperPlanTwo"),u=document.getElementById("returningShopperPlanThree"),p=document.getElementById("returningShopperConfirmZipAndSelectPlan");p&&p.classList.add("d-none");
191const m=document.getElementById("returningShopperConfirmZipAndPlan");m&&m.classList.add("d-none");const h=document.getElementById("returningShopperDynamicPlan");h&&h.classList.add("d-none");const f=document.getElementById("planContainer");if(f&&f.classList.add("hide"),e){e.style.setProperty("flex-direction","column","important"),e.style.setProperty("align-items","center","important");const t=e.querySelector("div.benefit__text");t&&t.style.setProperty("margin-left","0px","important");const n=e.querySelector("div.benefit__text > div.rich-text-body > p");n&&s&&(n.innerText=s),e.classList.remove("d-none")}const y=f?.dataset?.environment;if(y&&s){const e=document.getElementById("returningShopperViewMorePlansButton");e&&(e.classList.add("analyticsClickAction"),e.setAttribute("analyticsvalue","Viewed Offers Modal - View More Offers"),e.setAttribute("analyticslocation","Viewed Offers Modal"),e.setAttribute("analyticscta","Button"),e.setAttribute("analyticskey","btnOEViewedOffersModalMoreOffers"),e.setAttribute("analyticsinteraction","always"),e.addEventListener("click",()=>{"undefined"!=typeof window&&(window.location.href=`${y}/plans-for-you/returning-shopper?txtPromocode=WR01TC&zipcode=${s}`)}))}const g=document.getElementById("returningShopperCancelButton");if(g&&(g.parentNode?.parentNode?.classList.remove("col-md-6"),g.parentNode?.parentNode?.style.setProperty("width","unset","important"),g.parentNode?.parentNode?.style.setProperty("padding-left","0px","important"),g.parentNode?.parentNode?.style.setProperty("padding-right","0px","important"),g.parentNode?.parentNode?.parentNode?.style.setProperty("flex-direction","row-reverse","important"),g.parentNode?.parentNode?.parentNode?.style.setProperty("margin-right","0px","important"),g.parentNode?.parentNode?.parentNode?.style.setProperty("align-items","center","important"),g.parentNode?.parentNode?.parentNode?.style.setProperty("justify-content","center","important"),g.parentNode?.parentNode?.parentNode?.parentNode?.parentNode?.style.setProperty("margin-bottom","0px","important"),g.parentNode?.parentNode?.parentNode?.parentNode?.parentNode?.style.setProperty("padding-bottom","40px","important"),g.parentNode?.parentNode?.parentNode?.parentNode?.parentNode?.style.setProperty("padding-top","12px","important"),g.parentNode?.parentNode?.parentNode?.parentNode?.parentNode?.parentNode?.parentNode?.style.setProperty("bottom","-1px","important"),g.parentNode?.parentNode?.parentNode?.parentNode?.parentNode?.parentNode?.parentNode?.style.setProperty("position","sticky","important")),"ZipNoOffer"==n&&s){if(g&&(g.style.setProperty("border","none","important"),g.classList.add("analyticsClickAction"),g.setAttribute("analyticsvalue","Viewed Offers Modal - Cancel"),g.setAttribute("analyticslocation","Vie
191wed Offers Modal"),g.setAttribute("analyticscta","Button"),g.setAttribute("analyticskey","btnOEViewedOffersModalCancel"),g.setAttribute("analyticsinteraction","always"),g.addEventListener("click",()=>{"undefined"!=typeof window&&void 0!==window.dataLayerInternal&&void 0!==window.analyticsDynamicLoad&&(window.dataLayerInternal.returningShopperExpCanceled="true",window.analyticsDynamicLoad("PAGE","electricitysales:shop:viewedoffers:modal","","","","Visible"));const e=document.getElementById("returningShopperMainExperience");e&&e.classList.add("d-none")})),t&&t.classList.remove("d-none"),d){const e=d.querySelector("div.cmp-separator");e&&e.classList.add("d-none");const t=d.querySelector("button");t&&(t.classList.add("analyticsClickAction"),t.setAttribute("analyticsvalue","Viewed Offers Modal â Show Me Pricing: Reliant Flextra Credits 24 plan"),t.setAttribute("analyticslocation","Viewed Offers Modal"),t.setAttribute("analyticscta","Button"),t.setAttribute("analyticskey","btnOEViewedOffersModalShowMePricing"),t.setAttribute("analyticsinteraction","always"),t.addEventListener("click",()=>{y&&"undefined"!=typeof window&&(window.location.href=`${y}/plans-for-you/returning-shopper?txtPromocode=WR01TC&zipcode=${s}&offerName=Reliant Flextra Credits 24 plan`)}));const n=document.createElement("div");n.classList.add(["d-none","analyticsProductGrid","analyticsProductOffered","analyticsProduct"]),n.setAttribute("analyticsid","PRODUCT_RS_Reliant Flextra Credits 24 plan"),n.setAttribute("analyticsproductname","Reliant Flextra Credits 24 plan"),n.setAttribute("analyticsproductsku","RS_Reliant Flextra Credits 24 plan"),n.setAttribute("analyticsproducttype","ELECTRICITY PLAN"),n.setAttribute("analyticsproductprice",""),n.setAttribute("analyticscontractterm","24"),n.setAttribute("analyticsplanratetype","Fixed"),n.setAttribute("analyticsproductcancelreturnfee",""),n.setAttribute("analyticsproductincentive","NONE"),n.setAttribute("analyticscontractrates",""),n.setAttribute("analyticsproductcategory",""),n.setAttribute("analyticsproductgridposition","1"),n.setAttribute("analyticsproductflags","2 Days Free Per Week"),n.setAttribute("analyticsvalue","RS_Reliant Flextra Credits 24 plan"),d.appendChild(n)}if(c){const e=c.querySelector("div.cmp-separator");e&&e.classList.add("d-none");const t=c.querySelector("button");t&&(t.classList.add("analyticsClickAction"),t.setAttribute("analyticsvalue","Viewed Offers Modal â Show Me Pricing: Reliant Secure Advantage 24 plan"),t.setAttribute("analyticslocation","Vie
191wed Offers Modal"),t.setAttribute("analyticscta","Button"),t.setAttribute("analyticskey","btnOEViewedOffersModalShowMePricing"),t.setAttribute("analyticsinteraction","always"),t.addEventListener("click",()=>{y&&"undefined"!=typeof window&&(window.location.href=`${y}/plans-for-you/returning-shopper?txtPromocode=WR01TC&zipcode=${s}&offerName=Reliant Secure Advantage® 24 plan`)}));const n=document.createElement("div");n.classList.add(["d-none","analyticsProductGrid","analyticsProductOffered","analyticsProduct"]),n.setAttribute("analyticsid","PRODUCT_RS_Reliant Secure Advantage 24 plan"),n.setAttribute("analyticsproductname","Reliant Secure Advantage 24 plan"),n.setAttribute("analyticsproductsku","RS_Reliant Secure Advantage 24 plan"),n.setAttribute("analyticsproducttype","ELECTRICITY PLAN"),n.setAttribute("analyticsproductprice",""),n.setAttribute("analyticscontractterm","24"),n.setAttribute("analyticsplanratetype","Fixed"),n.setAttribute("analyticsproductcancelreturnfee",""),n.setAttribute("analyticsproductincentive","NONE"),n.setAttribute("analyticscontractrates",""),n.setAttribute("analyticsproductcategory",""),n.setAttribute("analyticsproductgridposition","2"),n.setAttribute("analyticsproductflags","$100 Bill Credit"),n.setAttribute("analyticsvalue","RS_Reliant Secure Advantage 24 plan"),c.appendChild(n)}if(u){const e=u.querySelector("div.cmp-separator");e&&e.classList.add("d-none");const t=u.querySelector("button");t&&(t.classList.add("analyticsClickAction"),t.setAttribute("analyticsvalue","Viewed Offers Modal â Show Me Pricing: Reliant Apartment 12 plan"),t.setAttribute("analyticslocation","Vie
191wed Offers Modal"),t.setAttribute("analyticscta","Button"),t.setAttribute("analyticskey","btnOEViewedOffersModalShowMePricing"),t.setAttribute("analyticsinteraction","always"),t.addEventListener("click",()=>{y&&"undefined"!=typeof window&&(window.location.href=`${y}/plans-for-you/returning-shopper?txtPromocode=WR01TC&zipcode=${s}&offerName=Reliant Apartment 12 plan`)}));const n=document.createElement("div");n.classList.add(["d-none","analyticsProductGrid","analyticsProductOffered","analyticsProduct"]),n.setAttribute("analyticsid","PRODUCT_RS_Reliant Apartment 12 plan"),n.setAttribute("analyticsproductname","Reliant Apartment 12 plan"),n.setAttribute("analyticsproductsku","RS_Reliant Apartment 12 plan"),n.setAttribute("analyticsproducttype","ELECTRICITY PLAN"),n.setAttribute("analyticsproductprice",""),n.setAttribute("analyticscontractterm","12"),n.setAttribute("analyticsplanratetype","Fixed"),n.setAttribute("analyticsproductcancelreturnfee",""),n.setAttribute("analyticsproductincentive","NONE"),n.setAttribute("analyticscontractrates",""),n.setAttribute("analyticsproductcategory",""),n.setAttribute("analyticsproductgridposition","3"),n.setAttribute("analyticsproductflags","For Renters"),n.setAttribute("analyticsvalue","RS_Reliant Apartment 12 plan"),u.appendChild(n)}if(p){const e=p.querySelector("h5 span");if(e){const t=e.innerText;e.innerHTML=`${t} <strong>${s}</strong>`}p.classList.remove("d-none")}const e=document.getElementById("returningShopperMainExperience");if(e){const t=document.createElement("button");t.id="returningShopperExitButton",t.setAttribute("analyticsvalue","Viewed Offers Modal - Close Out X"),t.setAttribute("analyticslocation","Vie
191wed Offers Modal"),t.setAttribute("analyticscta","Icon"),t.setAttribute("analyticskey","btnOEViewedOffersModalCloseOut"),t.setAttribute("analyticsinteraction","always"),t.style.float="right",t.style.setProperty("margin-right","25px","important"),t.style.setProperty("margin-top","12px","important"),t.classList.add("close","appearance-none","analyticsClickAction"),t.innerHTML="<div class='icon-svg icon-fill--black icon-hover-fill--black'><div><svg xmlns='http://www.w3.org/2000/svg' width='17.04' height='17.039' viewBox='0 0 17.04 17.039' class='injected-svg' data-src='data:image/svg+xml,%3csvg xmlns=\"http://www.w3.org/2000/svg\" width=\"17.04\" height=\"17.039\" viewBox=\"0 0 17.04 17.039\"%3e %3cg id=\"icon-close\" transform=\"translate(-294.604 -88.608)\"%3e %3crect id=\"Rectangle_1062\" data-name=\"Rectangle 1062\" width=\"21.597\" height=\"2.5\" rx=\"1.25\" transform=\"translate(296.373 88.608) rotate(45)\" fill=\"%23231f20\"/%3e %3crect id=\"Rectangle_1065\" data-name=\"Rectangle 1065\" width=\"21.597\" height=\"2.5\" rx=\"1.25\" transform=\"translate(311.643 90.375) rotate(135)\" fill=\"%23231f20\"/%3e %3c/g%3e%3c/svg%3e' xmlns:xlink='http://www.w3.org/1999/xlink'> <g id='icon-close' transform='translate(-294.604 -88.608)'> <rect id='Rectangle_1062' data-name='Rectangle 1062' width='21.597' height='2.5' rx='1.25' transform='translate(296.373 88.608) rotate(45)' fill='#231f20'></rect> <rect id='Rectangle_1065' data-name='Rectangle 1065' width='21.597' height='2.5' rx='1.25' transform='translate(311.643 90.375) rotate(135)' fill='#231f20'></rect> </g></svg></div></div>",t.addEventListener("click",()=>{"undefined"!=typeof window&&void 0!==window.dataLayerInternal&&void 0!==window.analyticsDynamicLoad&&(window.dataLayerInternal.returningShopperExpCanceled="true",window.analyticsDynamicLoad("PAGE","electricitysales:shop:viewedoffers:modal","","","","Visible")),document.getElementById("returningShopperMainExperience")?.classList.add("d-none")});const n=document.getElementById("returningShopperModalExperience");n&&(n.classList.add("returning-shopper-modal"),n.parentNode?.prepe
191nd(t),n.parentNode?.classList.add("returning-shopper-modal-parent")),e.classList.add("returning-shopper-main"),e.classList.remove("d-none"),e.classList.add("show"),kt(e);const r=e.getElementsByClassName("three-column-container")[0]?.getElementsByClassName("plan--top");if(r?.length>0){Array.prototype.slice.call(r).forEach(e=>e.style.height="auto")}}"undefined"!=typeof window&&void 0!==window.analyticsDynamicLoad&&window.analyticsDynamicLoad("PAGE","electricitysales:shop:viewedoffers:modal","","","","Visible")}else if(s){if(d?.classList.add("d-none"),d?.parentNode?.parentNode?.parentNode?.parentNode?.parentNode?.parentNode?.classList.add("d-none"),c?.classList.add("d-none"),u?.classList.add("d-none"),m){const e=m.querySelector("h5 span");if(e){const t=e.innerText;e.innerHTML=`${t} <strong>${s}</strong>`}}if(y){const e=document.createElement("script");e.setAttribute("src",`${y}/returningShopperOffer.js`),e.onload=()=>{"undefined"!=typeof window&&void 0!==window.getReturningShopperOffer?window.getReturningShopperOffer(s,o,i,a,r,l):console.log("no window or no getReturningShopperOffer function")},document.head.appendChild(e)}}}}}};const Mt=(e,t,n)=>{"undefined"!=typeof window&&void 0!==window.dataLayerInternal&&void 0!==window.dataLayerInternal.analyticsTest&&"object"==typeof window.dataLayerInternal.analyticsTest?window.dataLayerInternal.analyticsTest.push(`${e}|${t}|${n}`):"undefined"!=typeof window&&void 0!==window.dataLayerInternal&&(window.dataLayerInternal.analyticsTest=[],window.dataLayerInternal.analyticsTest.push(`${e}|${t}|${n}`))},_t=e=>{switch(e){case"CenterPoint Energy":case"08901":case"D0001":return{name:"CenterPoint Energy",ercotCode:"08901",sapCode:"D0001"};case"Oncor":case"44372":case"D0002":return{name:"Oncor",ercotCode:"44372",sapCode:"D0002"};case"Texas-New Mexico Power Company":case"40051":case"D0003":return{name:"Texas-New Mexico Power Company",ercotCode:"40051",sapCode:"D0003"};case"AEP Texas Central":case"03278":case"D0004":return{name:"AEP Texas Central",ercotCode:"03278",sapCode:"D0004"};case"AEP Texas North":case"20404":case"D0005":return{name:"AEP Texas North",ercotCode:"20404",sapCode:"D0005"};case"Sharyland Utilities":case"03109":case"D0009":return{name:"Sharyland Utilities",ercotCode:"03109",sapCode:"D0009"};case"Lubbock Power & Light":case"11292":case"D0011":return{name:"Lubbock Power & Light",ercotCode:"11292",sapCode:"D0011"};default:return{name:"",ercotCode:"",sapCode:""}}},kt=e=>{const t=[],n=Array.from(e.querySelectorAll("[data-match-height]"));if(n.length>0&&n.forEach(e=>{const n=e.closest(".row");n&&!t.includes(n)&&t.push(n)}),t.length>0)for(const e of t){var r=Array.prototype.slice.call(e.querySelectorAll("[data-match-height]")),s={};for(const e of r){var o=e.getAttribute("data-match-height");e.style.minHeight="auto",e.style.height="auto";let t=e.querySelector("img");t&&(t.complete||(t.onload=()=>kt(),t.onerror=()=>kt()));let n=e;Object.prototype.hasOwnProperty.call(s,o)?Object.defineProperty(s,o,{value:Math.max(s[o],n.clientHeight),configurable:!0,writable:!0,enumerable:!0}):s[o]=n.clientHeight}var i=s;Object.getOwnPropertyNames(i).forEach(function(t){for(var n=e.querySelectorAll("[data-match-height='"+t+"']"),r=n.length,s=0;s<r;s++)n[s].style.height=Object.getOwnPropertyDescriptor(i,t).value+"px"})}},Ot=()=>{const e=document.getElementById("priceBreakdownButton");e?.addEventListener("click",()=>{const e=document.getElementById("priceCalculationModal");e?.classList.add("show")});const t=document.getElementById("priceBreakdownButtonMobile");t?.classList.add("price-breakdown-mobile"),t?.addEventListener("click",()=>{const e=document.getElementById("priceCalculationModal");e?.classList.add("show")});const n=document.getElementById("desktopViewHideDetails");n?.addEventListener("click",()=>{const e=document.getElementById("planContainer");if(e){const t=e.dataset.showmore,n=e.dataset.showless,r=document.getElementById("desktopViewHideDetails");if(r&&t&&n){const e=r.querySelector(".textIconContainer__text");if(e){const r=e.innerHTML;e.innerHTML=r===t?n:t}}}const t=document.getElementById("detailsContainer");t?.classList.contains("hide")?t?.classList.remove("hide"):t?.classList.add("hide");const n=document.getElementById("planDescription");n?.classList.contains("expanded")?n?.classList.remove("expanded"):n?.classList.add("expanded");const r=document.getElementById("planBodyContainer");r?.classList.contains("expanded")?r?.classList.remove("expanded"):r?.classList.add("expanded");const s=document.getElementById("planBody");s?.classList.contains("expanded")?s?.classList.remove("expanded"):s?.classList.add("expanded");const o=document.getElementById("planNameDescriptionPopular");o?.classList.contains("expanded")?o?.classList.remove("expanded"):o?.classList.add("expanded")});const r=document.getElementById("viewDetailsMobile");r?.addEventListener("click",()=>{const e=document.getElementById("detailsContainer");e?.classList.remove("hide");const t=document.getElementById("planDescription");t?.classList.add("expanded");const n=document.getElementById("planBodyContainer");n?.classList.add("fullscreen"),n?.classList.add("expanded");const r=document.getElementById("planContainer");r?.classList.add("fullscreen");const s=document.getElementById("planBody");s?.classList.add("fullscreen"),s?.classList.add("expanded");const o=document.getElementById("planNameDescriptionPopular");o?.classList.add("expanded");const i=document.getElementById("mobileCtas");i?.classList.add("hide");const a=document.getElementsByClassName("mobile-ctas-inner");a[0]?.classList.add("fullscreen");const l=document.getElementById("fullscreenCtas");l?.classList.add("fullscreen"),l?.classList.remove("hide");const d=document.getElementById("pricingDetailsMobile");d?.classList.remove("hide");const c=document.getElementById("banner");c?.classList.add("fullscreen")});const s=document.getElementById("viewDetailsFullscreen");s?.addEventListener("click",()=>{const e=document.getElementById("detailsContainer");e?.classList.add("hide");const t=document.getElementById("planDescription");t?.classList.remove("expanded");const n=document.getElementById("mobileCtas");n?.classList.remove("hide");const r=document.getElementById("fullscreenCtas");r?.classList.remove("fullscreen"),r?.classList.add("hide");const s=document.getElementById("pricingDetailsMobile");s?.classList.add("hide");const o=document.getElementById("banner");o?.classList.remove("fullscreen");const i=document.getElementById("planBodyContainer");i?.classList.remove("fullscreen"),i?.classList.remove("expanded");const a=document.getElementById("planContainer");a?.classList.remove("fullscreen");const l=document.getElementById("planBody");l?.classList.remove("fullscreen"),l?.classList.remove("expanded");const d=document.getElementById("planNameDescriptionPopular");d?.classList.remove("expanded");const c=document.getElementsByClassName("mobile-ctas-inner");c[0]?.classList.remove("fullscreen")});const o=document.getElementById("priceCalculationModal"),i=o?.querySelector("button.close");i?.addEventListener("click",()=>{const e=document.getElementById("priceCalculationModal");e?.classList.remove("show")});const a=window.matchMedia("(min-width: 801px)");a.addListener(()=>(e=>{if(e.matches){const e=document.getElementById("detailsContainer"),t=document.getElementById("planBodyContainer"),n=document.getElementById("planBody"),r=document.getElementById("planContainer"),s=document.getElementById("banner");e?.classList.contains("hide")||(t?.classList.remove("fullscreen"),n?.classList.remove("fullscreen"),r?.classList.remove("fullscreen"),s?.classList.remove("fullscreen"))}})(a));const l=window.matchMedia("(max-width: 800px)");l.addListener(()=>(e=>{if(e.matches){const e=document.getElementById("detailsContainer");if(e?.classList.contains("hide"));else{const e=document.getElementById("mobileCtas");e?.classList.add("hide");const t=document.getElementsByClassName("mobile-ctas-inner");t[0]?.classList.add("fullscreen");const n=document.getElementById("fullscreenCtas");n?.classList.add("fullscreen"),n?.classList.remove("hide");const r=document.getElementById("pricingDetailsMobile");r?.classList.remove("hide");const s=document.getElementById("banner");s?.classList.add("fullscreen")}}})(l))};
191class Dt extends Error{}function qt(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return function(e){return decodeURIComponent(atob(e).replace(/(.)/g,(e,t)=>{let n=t.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n}))}(t)}catch(e){return atob(t)}}Dt.prototype.name="InvalidTokenError";const Nt=e=>function(e,t){if("string"!=typeof e)throw new Dt("Invalid token specified: must be a string");t||(t={});const n=!0===t.header?0:1,r=e.split(".")[n];if("string"!=typeof r)throw new Dt(`Invalid token specified: missing part #${n+1}`);let s;try{s=qt(r)}catch(e){throw new Dt(`Invalid token specified: invalid base64 for part #${n+1} (${e.message})`)}try{return JSON.parse(s)}catch(e){throw new Dt(`Invalid token specified: invalid json for part #${n+1} (${e.message})`)}}(e),Bt=async(e,t,n="")=>{let r,s;try{s&&s.abort(),s=new AbortController,r=await fetch(`${e}/enrollment/auth`,{method:"POST",credentials:"include",signal:s?.signal,headers:{"x-api-key":t,"Content-Type":"application/json"},body:JSON.stringify({principle:n})})}catch(e){console.log("shop api request error: ",e)}if(r?.ok){const e=await r.json();return e?.token&&sessionStorage.setItem("token",e?.token),e?.token}return{systemDown:!0,message:"system is down",errorCode:500}},zt=async(e,t)=>{let n,r=!1;const s=Ft();if(s){const e=Nt(s).exp;(new Date).getTime()/1e3>e?r=!0:n=s}else r=!0;return!r&&s||await Bt(e,t).then(e=>{e&&(n=e)}),!r&&s||await Bt().then(e=>{e&&(n=e)}),`${n}`},Ft=()=>{let e="";return"undefined"!=typeof window&&window.sessionStorage.getItem("token")&&(e=window.sessionStorage.getItem("token")),e},Rt={selector:".www-search-address-form:not(.authoring-mode) input[name*='streetAddress']",fallbackBaseURL:"https://stg-api.reliant.com/api/v1",allowZipSearch:!0,inferApartmentStatus:!0,apartmentSwitchingPromo:"WAHEPK",apartmentMovingPromo:"WUAUFH",homeMovingPromo:"WHGV5N",homeSwitchingPromo:"WPAE7E",fullAddressPromo:"POW",enrollmentTypeParam:"movingOption",enrollmentTypeMoving:"Yes",enrollmentTypeSwitching:"No",ownershipParam:"homeowner",propertyType:"na",addressType:"na",ownership:"na"},Gt=(e,t)=>void 0===e?t:e,Vt=(e={})=>{const t=e||{},n={...t};return Object.entries(Rt).forEach(([e,r])=>{n[e]=Gt(t[e],r)}),n};class $t{constructor(e,t={}){if(!(e&&e instanceof HTMLInputElement))throw new Error("Invalid input element provided");if("true"===e.dataset.fasInitialized)throw new Error("FullAddressSearch already initialized for this input");const n=Vt(t),r=`fas-${Math.random().toString(36).slice(2,8)}`;try{this.input=e,this.instanceId=r,this.form=e.closest("div.www-search-address-form form");const t=new FormData(this.form);this.closeIcon=this.form.querySelector(".search-box__icon.close-icon"),this.loader=this.form.querySelector(".search-box__icon.loader-icon"),this.resultsSection=this.form.querySelector(".search-box-results__menu_header"),this.dropdown=this.form.querySelector(".search-box-results");const s=`--search-box-anchor-${this.instanceId}`,o=this.form.querySelector(".search-box-content");o&&o.style.setProperty("anchor-name",s),this.dropdown&&this.dropdown.style.setProperty("position-anchor",s),this.baseURL=Gt(n.baseURL,this.form.action?this.form.action:n.fallbackBaseURL),this.shopAction=Gt(n.shopAction,t?.get("shopAction")),this.apiKey=Gt(n.apiKey,t?.get("apiKey")),this._selectedAddress={zipCode:"",tds
191pCode:"",esiid:"",isFullAddress:!1,isApartment:!1},this.submitBtn=this.form.querySelector("[type='submit']"),this.hasPromoCodeOverride=void 0!==n.promoCode&&null!==n.promoCode&&""!==n.promoCode,this.promoCode=Gt(n.promoCode,t.get("txtPromocode")),this.apartmentSwitchingPromo=n.apartmentSwitchingPromo,this.apartmentMovingPromo=n.apartmentMovingPromo,this.homeMovingPromo=n.homeMovingPromo,this.homeSwitchingPromo=n.homeSwitchingPromo,this.fullAddressPromo=n.fullAddressPromo,this.enrollmentTypeParam=n.enrollmentTypeParam,this.enrollmentTypeMoving=n.enrollmentTypeMoving,this.enrollmentTypeSwitching=n.enrollmentTypeSwitching,this.ownershipParam=n.ownershipParam,this.defaultPropertyType=n.propertyType,this.defaultAddressType=n.addressType,this.defaultOwnership=n.ownership,this.propertyType=this.defaultPropertyType,this.addressType=this.defaultAddressType,this.ownership=this.defaultOwnership,this.allowZipSearch=n.allowZipSearch,this.inferApartmentStatus=n.inferApartmentStatus,this.radioSelection=this.form.querySelector(".radio-selection"),this.propertyGroup=this.radioSelection?.querySelector(".radio-group-propertyType"),this.addressGroup=this.radioSelection?.querySelector(".radio-group-addressType"),this.ownershipGroup=this.radioSelection?.querySelector(".radio-group-ownership"),this.currentSuggestionIndex=-1,this.suggestions=[],e.dataset.fasInitialized="true",e.dataset.fasInstanceId=r}catch(t){return delete e.dataset.fasInitialized,delete e.dataset.fasInstanceId,void console.log(t)}zt(this.baseURL,this.apiKey),this.init()}init(){const e=`address-suggestions-listbox-${this.instanceId}`;this.input.setAttribute("role","combobox"),this.input.setAttribute("aria-autocomplete","list"),this.input.setAttribute("aria-expanded","false"),this.input.setAttribute("aria-controls",e),this.input.setAttribute("aria-haspopup","listbox"),this.resultsSection.setAttribute("role","listbox"),this.resultsSection.setAttribute("id",e),this.resultsSection.setAttribute("aria-label","Address suggestions"),this.closeIcon.addEventListener("click",()=>{this.clearInput(),this.updateUI("noInput"),this.submitBtn.disabled=!0}),this.input.addEventListener("keydown",e=>{this.handleKeyboardNavigation(e)}),this.observeInputValue(async()=>{this.updateUI("loading");const e=await this.fetchSuggestions(this.input.value);this.updateSuggestions(e?.data)}),this.submitBtn.disabled=!0,this.radioSelection?.addEventListener("change",e=>{"radio"===e.target.type&&(this[e.target.name]=e.target.value,this.inferApartmentStatus&&"ownership"===e.target.name&&!this._selectedAddress.isFullAddress&&this.applyInferredApartmentVisibility(e.target.value),this.checkBothSelections())}),this.form.addEventListener("submit",e=>{e.preventDefault(),this._selectedAddress.zipCode&&!this.submitBtn.disabled&&this.redirectShop()})}async fetchSuggestions(e){return(async(e,t,n="https://stg-api.reliant.com/api/v1",r)=>{let s,o;try{o&&o.abort(),o=new AbortController;const i=await zt(n,r);s=await fetch(`${n}/address?q=${e}&premise=RES${t?"&zipSearch=true":""}`,{method:"GET",credentials:"include",signal:o?.signal,headers:{"x-api-key":r,Authorization:i,"Content-Type":"application/json"}})}catch(e){if("AbortError"==e?.name)return{canceled:!0}}if(s?.ok)return{data:await s.json()};console.error("response error",s)})(e,this.allowZipSearch,this.baseURL,this.apiKey)}debounce(e,t){let n;return function(...r){clearTimeout(n),n=setTimeout(()=>{e(r)},t)}}async redirectShop(){const e=this._selectedAddress,t=new URL(this.shopAction);if(e.zipCode&&t.searchParams.append("zipcode",e.zipCode),this.promoCode)t.searchParams.append("txtPromocode",this.promoCode);else if(!this.hasPromoCodeOverride){const e=this.resolvePromo();e&&t.searchParams.append("txtPromocode",e)}e.esiid&&t.searchParams.append("esidNumber",e.esiid),e.tdspCode&&t.searchParams.append("tdspCodeCCS",e.tdspCode),"newAddress"===this.addressType?t.searchParams.append(this.enrollmentTypeParam,this.enrollmentTypeMoving):"existingAddress"===this.addressType&&t.searchParams.append(this.enrollmentTypeParam,this.enrollmentTypeSwitching),"true"!==this.ownership&&"false"!==this.ownership||t.searchParams.append(this.ownershipParam,this.ownership),("apartment"===this.propertyType||this._selectedAddress.isApartment)&&t.searchParams.append("aptOption","YES"),this.navigateTo(t.toString())}navigateTo(e){window.location.href=e}updateSuggestions(e){e&&0!==e.length?(this.suggestions=e,this.currentSuggestionIndex=-1,this.resultsSection.innerHTML="",e.forEach((e,t)=>{const n=this.createDropDownItem(e,t);this.resultsSection?.appendChild(n),this.updateUI("display")})):this.updateUI("noInput")}updateUI(e){switch(e){case"loading":this.toggleDeleteIcon(!1),this.toggleDropdown(!1),this.toggleLoader(!0);break;case"display":this.toggleDeleteIcon(!0),this.toggleDropdown(!0),this.toggleLoader(!1);break;case"noInput":this.toggleDeleteIcon(!1),this.toggleDropdown(!1),this.toggleLoader(!1),this.submitBtn.style.display="inline-block",this.radioSelection&&(this.radioSelection.style.display="none");break;default:console.log("Unknown state:",e)}}observeInputValue(e){this.input.addEventListener("input",this.debounce(async()=>{const t=this.input.value;if(!t||0===t.length)return this.clearInput(),this.toggleDropdown(!1),this.clearRadioSelections(),this.setAddress({zipCode:"",tds
191pCode:"",esiid:"",isFullAddress:!1,isApartment:!1},""),this.updateUI("noInput"),void(this.submitBtn.disabled=!0);t.length>1?e(t):this.updateUI("noInput")},1e3))}resolvePromo(){if(this._selectedAddress.isFullAddress)return this.fullAddressPromo;if("true"===this.ownership){if("newAddress"===this.addressType)return this.homeMovingPromo;if("existingAddress"===this.addressType)return this.homeSwitchingPromo}if("false"===this.ownership){if("apartment"===this.propertyType){if("newAddress"===this.addressType)return this.apartmentMovingPromo;if("existingAddress"===this.addressType)return this.apartmentSwitchingPromo}if("house"===this.propertyType){if("newAddress"===this.addressType)return this.homeMovingPromo;if("existingAddress"===this.addressType)return this.homeSwitchingPromo}}return null}toggleDeleteIcon(e){this.closeIcon.style.display=e?"block":"none"}checkBothSelections(){const e="none"!==this.propertyGroup?.style.display,t=this.propertyGroup?.querySelector("input[type='radio']:checked"),n=this.addressGroup?.querySelector("input[type='radio']:checked"),r=this.ownershipGroup?.querySelector("input[type='radio']:checked");this.submitBtn.disabled=e?!(t&&n&&r):!(n&&r)}applyInferredApartmentVisibility(e){this.propertyGroup?.querySelectorAll("input[type='radio']").forEach(e=>{e.checked=!1}),this.propertyType=this.defaultPropertyType,"true"===e?(this.propertyGroup&&(this.propertyGroup.style.display="none"),this.propertyType="house"):this.propertyGroup&&(this.propertyGroup.style.display="block")}
191clearInput(){this._selectedAddress={zipCode:"",tdspCode:"",esiid:"",isFullAddress:!1,isApartment:!1},this.input.value="",this.toggleDeleteIcon(!1)}toggleDropdown(e){"showPopover"in this.dropdown?e?this.dropdown.showPopover():this.dropdown.hidePopover():this.dropdown.style.display=e?"block":"none",this.input.setAttribute("aria-expanded",e?"true":"false")}toggleLoader(e){this.loader.style.display=e?"block":"none"}toggleSubmissionAbility(e){this.submitBtn.disabled=e}setAddress(e,t){e.zipCode&&(this.clearRadioSelections(),e.addressText?e.addressText&&(this.radioSelection&&(this.radioSelection.style.display="block"),this.propertyGroup&&(this.propertyGroup.style.display="none"),this.addressGroup&&(this.addressGroup.style.display="block")):(this.radioSelection&&(this.radioSelection.style.display="block"),this.applyInferredApartmentVisibility(this.inferApartmentStatus?"true":"false"),this.addressGroup&&(this.addressGroup.style.display="block")),this.checkBothSelections(),this._selectedAddress.zipCode=e.zipCode,this._selectedAddress.tdspCode=e.tdsp,this._selectedAddress.esiid=e.esiId,this._selectedAddress.isFullAddress=!!e.addressText,this._selectedAddress.isApartment=!(!e.aptDesignator&&!e.aptUnit),this.input.value=t,this.toggleDropdown(!1),this.submitBtn.style.display="inline-block")}clearRadioSelections(){this.radioSelection?.querySelectorAll("input[type='radio']").forEach(e=>{e.checked=!1}),this.propertyType=this.defaultPropertyType,this.addressType=this.defaultAddressType,this.ownership=this.defaultOwnership}handleKeyboardNavigation(e){if(!("showPopover"in this.dropdown?this.dropdown.matches(":popover-open"):"none"!==this.dropdown.style.display))return;const t=this.resultsSection?.querySelectorAll(".search-box-results__list-item");if(t?.length)switch(e.key){case"ArrowDown":e.preventDefault(),this.currentSuggestionIndex=Math.min(this.currentSuggestionIndex+1,t.length-1),this.highlightSuggestion();break;case"ArrowUp":e.preventDefault(),this.currentSuggestionIndex=Math.max(this.currentSuggestionIndex-1,-1),this.highlightSuggestion();break;case"Home":e.preventDefault(),this.currentSuggestionIndex=0,this.highlightSuggestion();break;case"End":e.preventDefault(),this.currentSuggestionIndex=t.length-1,this.highlightSuggestion();break;case"Enter":if(this.currentSuggestionIndex>=0){e.preventDefault();const t=this.suggestions[this.currentSuggestionIndex];this.setAddress(t,this.createLabelFromAddress(t))}break;case"Escape":e.preventDefault(),this.currentSuggestionIndex=-1,this.highlightSuggestion(),this.toggleDropdown(!1);break;case"Tab":this.currentSuggestionIndex=-1,this.highlightSuggestion(),this.toggleDropdown(!1)}}highlightSuggestion(){const e=this.resultsSection?.querySelectorAll(".search-box-results__list-item");e?.forEach((e,t)=>{t===this.currentSuggestionIndex?(e.classList.add("highlighted"),e.setAttribute("aria-selected","true"),e.scrollIntoView({block:"nearest"}),this.input.setAttribute("aria-activedescendant",e.id)):(e.classList.remove("highlighted"),e.setAttribute("aria-selected","false"))}),-1===this.currentSuggestionIndex&&this.input.removeAttribute("aria-activedescendant")}createLabelFromAddress(e){return e.addressText||(e.zipCode&&e.state?`${e.zipCode},${e.state}`:null)}createDropDownItem(e,t){const n=e.addressText,r=e.zipCode&&e.state?e.zipCode+","+e.state:null,s=n||r,o=`<p>${s}</p>`,i=document.createElement("div");if(i.classList.add("search-box-results__list-item"),i.setAttribute("role","option"),i.setAttribute("id",`address-option-${this.instanceId}-${t}`),i.setAttribute("aria-selected","false"),s)return i.innerHTML=o.replace(new RegExp(this.input.value,"gi"),`<strong>${this.input.value}</strong>`),i.addEventListener("click",()=>{this.setAddress(e,s),this.toggleDropdown(!1)}),i}}const Ht=(e={})=>{const t=Vt(e);document.querySelectorAll(t.selector).forEach(e=>{try{new $t(e,t)}catch{}})},jt=new Intl.NumberFormat("en-US");function Ut(e){return parseFloat(String(e).replace(/[^0-9.-]/g,""))||0}function Yt(e){return`$${jt.format(e)}`}function Wt(e,t){e.style.position="",e.style.top="",e.style.left="",e.style.width="",e.style.zIndex="",t&&(t.style.paddingTop="")}function Xt(e,t,n){if(!e.length)return;let r=0;for(let e=0;e<t.length;e++){const s=Ut(n[e]?.textContent||"0");r+=t[e]*s}for(let t=0;t<e.length;t++){const n=e[t];n.textContent=Yt(Zt(n)+r)}}function Zt(e){const t=e.getAttribute("data-base-amount");if(t)return Ut(t);const n=e.closest("[data-price-summary]"),r=n?.getAttribute("data-base-amount"),s=Ut(r||(e.textContent||"0"));return e.setAttribute("data-base-amount",String(s)),s}let Kt=null;function Jt(e,t,n,r){if("true"===e.getAttribute("data-product-calculator-sticky-initialized"))return;const s=e.querySelector(t);if(!s)return;const o=s.closest('[class*="col-"]');e.setAttribute("data-product-calculator-sticky-initialized","true"),Kt||(Kt=new AbortController);let i=!1;const a=()=>
191{i=!1,function(e,t,n,r,s){if(!n||!r.matches)return void Wt(t,n);"fixed"===t.style.position&&Wt(t,n);const o=e.getBoundingClientRect(),i=n.getBoundingClientRect(),a=t.getBoundingClientRect(),l=a.height,d=a.top<=s,c=o.bottom>s+l;if(!d||!c)return;const u=Math.min(s,o.bottom-l);t.style.position="fixed",t.style.top=`${u}px`,t.style.left=`${i.left}px`,t.style.width=`${i.width}px`,t.style.zIndex="100",n.style.paddingTop=`${l}px`}(e,s,o,n,r)},l=()=>{i||(i=!0,window.requestAnimationFrame(a))},d=Kt.signal;window.addEventListener("scroll",l,{passive:!0,signal:d}),window.addEventListener("resize",l,{passive:!0,signal:d}),l()}function Qt(){const e=".qty-value",t="[data-price-summary]",n=window.matchMedia("(max-width: 991.98px)"),r=document.querySelectorAll(".two-column-container:has([data-price-summary])");r.length&&r.forEach(r=>{if("true"===r.getAttribute("data-product-calculator-initialized"))return;r.setAttribute("data-product-calculator-initialized","true");const s=[...r.querySelectorAll("[data-price-summary] .rich-text-header > *")],o=[...r.querySelectorAll(".product-item[data-cost]")];if(!o.length)return;const i=r.querySelector(t);i&&i.setAttribute("data-price-summary","active");const a=o.map(e=>Ut(e.getAttribute("data-cost")||"0")),l=o.map(t=>t.querySelector(e));s.forEach(e=>Zt(e)),r.addEventListener("click",t=>{const n=t.target instanceof Element?t.target:null,o=n?.closest(".qty-btn");if(!o||!r.contains(o))return;const i=o.closest(".product-quantity"),d=i?.querySelector(e);if(!d)return;const c=parseInt(d.textContent||"0",10);let u=c;o.classList.contains("increment")?u=c+1:o.classList.contains("decrement")&&(u=Math.max(c-1,0)),u!==c&&(d.textContent=String(u),Xt(s,a,l))}),Jt(r,t,n,0),Xt(s,a,l)})}"loading"!==document.readyState?Ht():document.addEventListener("DOMContentLoaded",Ht);const en=(e=document)=>{"object"==typeof e&&null!==e&&"querySelectorAll"in e||(e=document);if(!e.querySelector("#solar-form-submit"))return null;const t=m("COID");if(!t)return null;void 0===window.dataLayerInternal&&(window.dataLayerInternal={}),window.dataLayerInternal.OrderId=t;const n=m("buildingOwnershipInfo"),r=m("solarPanelInfo"),s=m("solarPanelInstalled"),o=m("serviceCity"),i=m("serviceState"),a=m("serviceZipcode");n&&(window.dataLayerInternal.buildingOwnershipInfo=n),r&&(window.dataLayerInternal.solarPanelInfo=r),o&&(window.dataLayerInternal.serviceCity=o),i&&(window.dataLayerInternal.serviceState=i),a&&(window.dataLayerInternal.serviceZipcode=a),window.dataLayerInternal.solarPanelInstalled=!!s};"loading"!==document.readyState?en():document.addEventListener("DOMContentLoaded",en);const tn=()=>{let e=document.querySelectorAll(".content-block__image-float-bottom");e&&e.length>0&&e.forEach(e=>{let t=e.querySelectorAll(".responsive-image");t&&t.length>0&&nn(t).then(t=>{let n=e.querySelector(".content-block__image-caption").clientHeight,r=n>0?n+t-24:t;e.style["shape-outside"]=`inset(calc(100% - ${r}px) 0 0 0)`})})},nn=e=>new Promise((t,n)=>{e.forEach(e=>{if("none"!==window.getComputedStyle(e).display){let r=e.querySelector("img");r.complete?t(r.clientHeight):(r.onload=()=>t(r.clientHeight),r.onerror=()=>n("Error loading image"))}})});"loading"!==document.readyState?tn():(document.addEventListener("DOMContentLoaded",tn),window.addEventListener("resize",()=>tn())),"loading"!==document.readyState?M():document.addEventListener("DOMContentLoaded",M),window.addEventListener("DOMContentLoaded",function(){document.body.append(...document.querySelectorAll("[data-modalcontent]"))}),"loading"!==document.readyState?T():document.addEventListener("DOMContentLoaded",T);const rn=["moverConcierge-InfoStep","moverConcierge-PropertyTypeStep","moverConcierge-DateStep","moverConcierge-SuccessStep"],sn=()=>{const e=document.querySelectorAll(".mover-concierge");Array.prototype.slice.call(e).forEach(function(e){const t=e.querySelector("#mover-concierge-form"),n=e.querySelector("#moverConcierge-InfoStep"),r=e.querySelector("#moverConcierge-PropertyTypeStep"),s=e.querySelector("#moverConcierge-DateStep"),o=e.querySelector("#moverConcierge-SuccessStep"),i=document.querySelector("#moverConciergeHomeO
191wner"),a=document.querySelector("#moverConciergeRental"),l=e.querySelector("#moverConcierge-heading");n.classList.add("mover-concierge-view","fade","show","active"),r.classList.add("mover-concierge-view","fade"),s.classList.add("mover-concierge-view","fade"),o.classList.add("mover-concierge-view","fade");let d=new FormData(t);n.addEventListener("submit",r=>{r.preventDefault();let s=dn(e,n,d,t);if(s)for(var o of s.entries())d.set(o[0],o[1])}),i.addEventListener("click",()=>{let t=new FormData(r);for(var n of(t.append("F299","Home Owner"),t.entries()))d.append(n[0],n[1]);on(e,r)}),a.addEventListener("click",()=>{let t=new FormData(r);for(var n of(t.append("F299","Rental"),t.entries()))d.append(n[0],n[1]);on(e,r)}),s.addEventListener("submit",n=>{n.preventDefault(),an();let r=cn(e,s,d);for(var o of r.entries())d.set(o[0],o[1]);for(const e of d.entries())if(e[1]){const n=document.createElement("input");n.name=e[0],n.value=e[1],t.appendChild(n)}fetch(t.dataset.serviceableUrl,{method:t.method,body:new FormData(t)}).then(()=>{on(e,s),l.classList.add("fade")}).catch(e=>{console.error("Error:",e)})})})},on=(e,t)=>{const n=rn.indexOf(t.id);if(n!==rn.length-1){const r=e.querySelector("#"+rn[n+1]);t.classList.remove("show","active"),r.classList.add("show","active")}},an=()=>{let e=ln(window.location.toString());"string"==typeof e.realtorID?document.querySelector("#F200").value=e.realtorID:document.querySelector("#F200").value="0"},ln=e=>(e=>{var t,n,r,s,o={};for(r=0,s=(t=e.split("&")).length;r<s;r++)(n=t[r].split("="))[0]&&n[1]?o[n[0]]=n[1]:o[{}];return o})((e=>{var t="",n=(e||window.location.href).split("?");return n.length>1&&(t=n[1]),t})(e)),dn=(e,t,n,r)=>{let s=new FormData(t);if(t.checkValidity()){const i=s.get("F12");if(!wt.includes(i))return void(document.location.href=r.dataset.nonServiceableUrl);for(var o of s.entries())n.set(o[0],o[1]);on(e,t)}return n},cn=(e,t,n)=>{let r=new FormData(t),s=t.querySelector("#moverConciergeStartTime").value,o=t.querySelector("#moverConciergeEndTime").value,i=un(s),a=un(o),l={};l.hrStart=i.hr,l.minStart=i.min,l.pmStart=i.pm,l.hrEnd=a.hr,l.minEnd=a.min,l.pmEnd=a.pm,l.F284=t.querySelector("#F284").value;let d=`${s.replace(/\s/g,":")} to ${o.replace(/\s/g,":")}`;document.querySelector("#F282").value=d;for(const e in l)l[e]&&r.append(e,l[e]);for(var c of n.entries())r.append(c[0],c[1]);return r},un=e=>({hr:e.substring(0,e.indexOf(":")),min:e.substring(e.indexOf(":")+1,e.indexOf(" ")),pm:e.substring(e.length-2)});"loading"!==document.readyState?sn():document.addEventListener("DOMContentLoaded",sn);const pn=()=>{const e=Array.from(document.getElementsByClassName("root-header-navigation")),t=e=>{Array.from(e.querySelectorAll(".sub-navigation.open")).forEach(e=>{e.classList.remove("open")})};e.length>0&&e.forEach(e=>{Array.from(e.querySelectorAll(".nav-item")).forEach(n=>{n.querySelector(".nav-link").addEventListener("keydown",r=>{if("Space"===r.code||"Enter"===r.code){r.preventDefault();const s=n.querySelector(".sub-navigation");((e,n)=>{n.classList.contains("open")?t(e):(t(e),n.classList.add("open"))})(e,s)}}),n.addEventListener("mouseover",()=>{t(e)})})})};"loading"!==document.readyState?pn():document.addEventListener("DOMContentLoaded",pn),"loading"!==document.readyState?I():document.addEventListener("DOMContentLoaded",I),document.addEventListener("tealiumEnrichDataFinished",Ot),document.addEventListener("tealiumEnrichDataFinished",It),"loading"!==document.readyState?(St(),Pt()):(document.addEventListener("DOMContentLoaded",St),document.addEventListener("DOMContentLoaded",Pt));const mn=()=>{document.querySelectorAll(".tabs-parent").forEach(e=>{e.querySelectorAll(".nav-tabs").forEach(t=>{t.querySelectorAll(".nav-item .nav-link").forEach(t=>{t.addEventListener("click",()=>{let n=t.id,r=e.querySelectorAll(`#${n}`);if(t.classList.contains("dropdown")&&!t.classList.contains("dropdown-item")||e.querySelectorAll(".nav-item .nav-link").forEach(e=>{e.classList.remove("active")}),t.classList.contains("dropdown")||r.forEach(t=>{if(!t.classList.contains("dropdown-item")){t.classList.add("active");let n=t.id.replace("-tab","");if(e.querySelector(`[data-bs-target="#${n}"]`)){e.querySelector(`[data-bs-target="#${n}"]`).classList.add("active");let t=e.querySelectorAll(".dropdown-item");for(let r=0;r<t.length;r++)t[r].getAttribute("data-bs-target")==`#${n}`&&e.querySelector(".dropdown").classList.add("active")}}}),t.classList.contains("dropdown-item")){t.classList.add("active");let n=t.getAttribute("data-bs-target");e.querySelector(`${n}
191-tab`).classList.add("active"),t.closest(".nav-item").querySelector(".dropdown").classList.add("active")}})})})});const e=()=>{if(location.hash&&"#"!==location.hash){let e=decodeURIComponent(location.hash),t=document.querySelectorAll(".nav-tabs"),n=Array.from(t).filter(e=>"none"!==window.getComputedStyle(e).display)[0].classList.contains("nav-tabs-carousel")?"-carousel-tab":"-tab";e&&(e+=n);const r=document.querySelector(e);r&&r.classList.contains("nav-link-tabs-anchor")&&!r.classList.contains("active")&&(r.click(),setTimeout(function(){r&&r.parentElement.parentElement.scrollIntoView()},100))}};document.querySelectorAll("a[href^='#']").forEach(t=>{t.getAttribute("href").length>1&&t.addEventListener("click",e)}),window.addEventListener("DOMContentLoaded",e,!1),window.addEventListener("hashchange",e,!1);let t=document.querySelectorAll("button[data-bs-toggle='tab']");t&&t.forEach(e=>{e.addEventListener("shown.bs.tab",function(){k()})})};"loading"!==document.readyState?mn():document.addEventListener("DOMContentLoaded",mn);const hn=()=>{[].slice.call(document.querySelectorAll("[data-bs-toggle='tooltip']")).map(function(e){let t=document.body.querySelector("[class*='theme-']")?document.body.querySelector("[class*='theme-']"):document.body;return new bootstrap.Tooltip(e,{container:t})})};"loading"!==document.readyState?hn():document.addEventListener("DOMContentLoaded",hn),"loading"!==document.readyState?Qt():document.addEventListener("DOMContentLoaded",Qt)}(); 192!function(){"use strict";function e(e,t=0){return setTimeout(e,t)}function t(){return Date.now()}function s(e,t="x"){const s=function(e){return window.getComputedStyle(e,null)}(e),i=s.transform||s.webkitTransform;if(!i||"none"===i)return 0;const r=new DOMMatrixReadOnly(i);return"x"===t?r.m41:r.m42}function i(e){return"object"==typeof e&&null!==e&&!!e.constructor&&"Object"===Object.prototype.toString.call(e).slice(8,-1)}function r(e){return"undefined"!=typeof HTMLElement&&e instanceof HTMLElement||!!e&&"object"==typeof e&&(1===e.nodeType||11===e.nodeType)}function n(e,...t){const s=Object(e);for(let e=0;e<t.length;e+=1){const a=t[e];if(null==a||r(a))continue;const l=a,o=Object.keys(Object(l));for(let e=0,t=o.length;e<t;e+=1){const t=o[e];if("__proto__"===t||"constructor"===t||"prototype"===t)continue;const r=Object.getOwnPropertyDescriptor(l,t);if(!r||!r.enumerable)continue;const a=l[t];i(s[t])&&i(a)?a.__swiper__?s[t]=a:n(s[t],a):!i(s[t])&&i(a)?(s[t]={},a.__swiper__?s[t]=a:n(s[t],a)):s[t]=a}}return s}function a(e,t,s){e.style.setProperty(t,s)}function l(e,t=""){const s=[...e.children];return e instanceof HTMLSlotElement&&s.push(...e.assignedElements()),t?s.filter(e=>e.matches(t)):s}function o(e){try{console.warn(e)}catch{}}function d(e,t=[]){const s=document.createElement(e);return s.classList.add(...Array.isArray(t)?t:function(e=""){return e.trim().split(" ").filter(e=>!!e.trim())}(t)),s}function c(e,t){return window.getComputedStyle(e,null).getPropertyValue(t)}function p(e){if(e&&e.parentNode)return[...e.parentNode.children].indexOf(e)}function u(e,t){const s=[];let i=e.parentElement;for(;i;)t&&!i.matches(t)||s.push(i),i=i.parentElement;return s}function m(e,t,s){{const s=window.getComputedStyle(e,null);return e["width"===t?"offsetWidth":"offsetHeight"]+parseFloat(s.getPropertyValue("width"===t?"margin-right":"margin-top"))+parseFloat(s.getPropertyValue("width"===t?"margin-left":"margin-bottom"))}}function f(e){return(Array.isArray(e)?e:[e]).filter(e=>!!e)}function h(e,t=""){const s=globalThis.trustedTypes;e.innerHTML=void 0!==s?s.createPolicy("html",{createHTML:e=>e}).createHTML(t):t}let g,v,w;function b(){return g||(g="undefined"==typeof window?{touch:!1}:{touch:"ontouchstart"in window||navigator.maxTouchPoints>0}),g}function y(e={}){return v||(v=function({userAgent:e}={}){if("undefined"==typeof window)return{ios:!1,android:!1};const t=b(),s=navigator.platform,i=e||navigator.userAgent,r={ios:!1,android:!1},n=/(Android);?[\s/]+([\d.]+)?/.test(i),a=/(iPhone\sOS|iOS|iPod)/.test(i),l=/iPad/.test(i),o="MacIntel"===s&&t.touch&&navigator.maxTouchPoints>1,d=l||o;return n&&!("Win32"===s)&&(r.os="android",r.android=!0),(d||a)&&(r.os="ios",r.ios=!0),r}(e)),v}function S(){return w||(w=function(){if("undefined"==typeof window)return{isSafari:!1,isWebView:!1,need3dFix:!1};const e=y(),t=navigator.userAgent,s=t.toLowerCase(),i=s.includes("safari")&&!s.includes("chrome")&&!s.includes("android"),r=/(iPhone|iPod|iPad).*AppleWeb
vendor: 61,773 bytes, line 192
192Kit(?!.*Safari)/i.test(t);return{isSafari:i,isWebView:r,need3dFix:i||r&&e.ios}}()),w}const T=(e,t)=>{if(!e||e.destroyed||!e.params||!e.params.lazyPreload)return;const s=t.closest(e.isElement?"swiper-slide":`.${e.params.slideClass}`);if(s){let t=s.querySelector(`.${e.params.lazyPreloaderClass}`);!t&&e.isElement&&(s.shadowRoot?t=s.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`):requestAnimationFrame(()=>{if(s.shadowRoot){const t=s.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`);t&&!t.lazyPreloaderManaged&&t.remove()}})),t&&!t.lazyPreloaderManaged&&t.remove()}},E=(e,t)=>{if(!e.slides[t])return;const s=e.slides[t].querySelector('[loading="lazy"]');s&&s.removeAttribute("loading")},x=e=>{if(!e||e.destroyed||!e.params||!e.params.lazyPreload)return;let t=e.params.lazyPreloadPrevNext;const s=e.slides.length;if(!s||!t||t<0)return;t=Math.min(t,s);const i="auto"===e.params.slidesPerView?e.slidesPerViewDynamic():Math.ceil(e.params.slidesPerView),r=e.activeIndex;if(e.params.grid&&(e.params.grid.rows??1)>1){const s=r,n=[s-t];return n.push(...Array.from({length:t}).map((e,t)=>s+i+t)),void e.slides.forEach((t,s)=>{void 0!==t.column&&n.includes(t.column)&&E(e,s)})}const n=r+i-1;if(e.params.rewind||e.params.loop)for(let i=r-t;i<=n+t;i+=1){const t=(i%s+s)%s;(t<r||t>n)&&E(e,t)}else for(let i=Math.max(r-t,0);i<=Math.min(n+t,s-1);i+=1)i!==r&&(i>n||i<r)&&E(e,i)};const C=(e,t)=>!!(e.grid&&t.grid&&t.grid.rows>1);var M={setBreakpoint:function(){const e=this,{realIndex:t,initialized:s,params:i,el:r}=e,a=i.breakpoints;if(!a||a&&0===Object.keys(a).length)return;const l="window"!==i.breakpointsBase&&i.breakpointsBase?"container":i.breakpointsBase,o=["window","container"].includes(i.breakpointsBase)||!i.breakpointsBase?e.el:document.querySelector(i.breakpointsBase),d=e.getBreakpoint(a,l,o);if(!d||e.currentBreakpoint===d)return;const c=(d in a?a[d]:void 0)||e.originalParams,p=C(e,i),u=C(e,c),m=e.params.grabCursor,f=c.grabCursor,h=i.enabled;p&&!u?(r.classList.remove(`${i.containerModifierClass}grid`,`${i.containerModifierClass}grid-column`),e.emitContainerClasses()):!p&&u&&(r.classList.add(`${i.containerModifierClass}grid`),(c.grid.fill&&"column"===c.grid.fill||!c.grid.fill&&"column"===i.grid.fill)&&r.classList.add(`${i.containerModifierClass}grid-column`),e.emitContainerClasses()),m&&!f?e.unsetGrabCursor():!m&&f&&e.setGrabCursor();const g=(e,t)=>e[t];["navigation","pagination","scrollbar"].forEach(t=>{const s=g(c,t);if(void 0===s)return;const r=g(i,t),n="object"==typeof r&&null!==r&&r.enabled,a="object"==typeof s&&null!==s&&s.enabled,l=e[t];n&&!a&&l?.disable?.(),!n&&a&&l?.enable?.()});const v=c.direction&&c.direction!==i.direction,w=i.loop&&(c.slidesPerView!==i.slidesPerView||v),b=i.loop;v&&s&&e.changeDirection(),n(e.params,c);const y=e.params.enabled,S=e.params.loop;Object.assign(e,{allowTouchMove:e.params.allowTouchMove,allowSlideNext:e.params.allowSlideNext,allowSlidePrev:e.params.allowSlidePrev}),h&&!y?e.disable():!h&&y&&e.enable(),e.currentBreakpoint=d,e.emit("_beforeBreakpoint",c),s&&(w?(e.loopDestroy(),e.loopCreate(t),e.updateSlides()):!b&&S?(e.loopCreate(t),e.updateSlides()):b&&!S&&e.loopDestroy()),e.emit("breakpoint",c)},getBreakpoint:function(e,t="window",s){if(!e||"container"===t&&!s)return;let i=!1;const r="window"===t?window.innerHeight:s.clientHeight,n=Object.keys(e).map(e=>{if("string"==typeof e&&0===e.indexOf("@")){const t=parseFloat(e.substr(1));return{value:r*t,point:e}}return{value:e,point:e}});n.sort((e,t)=>parseInt(String(e.value),10)-parseInt(String(t.value),10));for(let e=0;e<n.length;e+=1){const{point:r,value:a}=n[e];"window"===t?window.matchMedia(`(min-width: ${a}px)`).matches&&(i=r):a<=s.clientWidth&&(i=r)}return i||"max"}};var P={checkOverflow:function(){const e=this,{isLocked:t,params:s}=e,{slidesOffsetBefore:i}=s;if(i){const t=e.slides.length-1,s=e.slidesGrid[t]+e.slidesSizesGrid[t]+2*i;e.isLocked=e.size>s}else e.isLocked=1===e.snapGrid.length;!0===s.allowSlideNext&&(e.allowSlideNext=!e.isLocked),!0===s.allowSlidePrev&&(e.allowSlidePrev=!e.isLocked),t&&t!==e.isLocked&&(e.isEnd=!1),t!==e.isLocked&&e.emit(e.isLocked?"lock":"unlock")}};var L={addClasses:function(){const e=this,{classNames:t,params:s,rtl:i,el:r,device:n}=e,a=function(e,t){const s=[];return e.forEach(e=>{"object"==typeof e?Object.keys(e).forEach(i=>{e[i]&&s.push(t+i)}):"string"==typeof e&&s.push(t+e)}),s}(["initialized",s.direction,{"free-mode":e.params.freeMode&&s.freeMode.enabled},{autoheight:s.autoHeight},{rtl:i},{grid:s.grid&&s.grid.rows>1},{"grid-column":s.grid&&s.grid.rows>1&&"column"===s.grid.fill},{android:n.android},{ios:n.ios},{"css-mode":s.cssMode},{centered:s.cssMode&&s.centeredSlides},{"watch-progress":s.watchSlidesProgress}],s.containerModifierClass);t.push(...a),r.classList.add(...t),e.emitContainerClasses()},removeClasses:function(){const{el:e,classNames:t}=this;e&&"string"!=typeof e&&(e.classList.remove(...t),this.emitContainerClasses())}};const k={init:!0,direction:"horizontal",oneWayMovement:!1,swiperElementNodeName:"SWIPER-CONTAINER",touchEventsTarget:"wrapper",initialSlide:0,speed:300,cssMode:!1,updateOnWindowResize:!0,resizeObserver:!0,nested:!1,createElements:!1,eventsPrefix:"swiper",enabled:!0,focusableElements:"input, select, option, textarea, button, video, label",width:null,height:null,preventInteractionOnTransition:!1,userAgent:null,url:null,edgeSwipeDetection:!1,edgeSwipeThreshold:20,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",breakpoints:void 0,breakpointsBase:"window",spaceBetween:0,slidesPerView:1,slidesPerGroup:1,slidesPerGroupSkip:0,slidesPerGroupAuto:!1,centeredSlides:!1,centeredSlidesBounds:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,centerInsufficientSlides:!1,snapToSlideEdge:!1,watchOverflow:!0,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,allowTouchMove:!0,threshold:5,touchMoveStopPropagation:!1,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,loop:!1,loopAddBlankSlides:!0,loopAdditionalSlides:0,loopPreventsSliding:!0,rewind:!1,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:!0,maxBackfaceHiddenSlides:10,containerModifierClass:"swiper-",slideClass:"swiper-slide",slideBlankClass:"swiper-slide-blank",slideActiveClass:"swiper-slide-active",slideVisibleClass:"swiper-slide-visible",slideFullyVisibleClass:"swiper-slide-fully-visible",slideNextClass:"swiper-slide-next",slidePrevClass:"swiper-slide-prev",wrapperClass:"swiper-wrapper",lazyPreload:!0,lazyPreloaderClass:"swiper-lazy-preloader",lazyPreloadPrevNext:0,runCallbacksOnInit:!0,_emitClasses:!1};var I={on(e,t,s){const i=this;if(!i.eventsListeners||i.destroyed)return i;if("function"!=typeof t)return i;const r=s?"unshift":"push";return e.split(" ").forEach(e=>{i.eventsListeners[e]||(i.eventsListeners[e]=[]),i.eventsListeners[e][r](t)}),i},once(e,t,s){const i=this;if(!i.eventsListeners||i.destroyed)return i;if("function"!=typeof t)return i;const r=function(...s){i.off(e,r),r.__emitterProxy&&delete r.__emitterProxy,t.apply(i,s)};return r.__emitterProxy=t,i.on(e,r,s)},onAny(e,t){const s=this;if(!s.eventsListeners||s.destroyed)return s;if("function"!=typeof e)return s;const i=t?"unshift":"push";return s.eventsAnyListeners.indexOf(e)<0&&s.eventsAnyListeners[i](e),s},offAny(e){const t=this;if(!t.eventsListeners||t.destroyed)return t;if(!t.eventsAnyListeners)return t;const s=t.eventsAnyListeners.indexOf(e);return s>=0&&t.eventsAnyListeners.splice(s,1),t},off(e,t){const s=this;return!s.eventsListeners||s.destroyed?s:s.eventsListeners?(e.split(" ").forEach(e=>{void 0===t?s.eventsListeners[e]=[]:s.eventsListeners[e]&&s.eventsListeners[e].forEach((i,r)=>{(i===t||i.__emitterProxy&&i.__emitterProxy===t)&&s.eventsListeners[e].splice(r,1)})}),s):s},emit(...e){const t=this;if(!t.eventsListeners||t.destroyed)return t;if(!t.eventsListeners)return t;let s,i,r;if("string"==typeof e[0]||Array.isArray(e[0]))s=e[0],i=e.slice(1,e.length),r=t;else{const n=e[0];s=n.events,i=n.data??[],r=n.context||t}i.unshift(r);return(Array.isArray(s)?s:s.split(" ")).forEach(e=>{t.eventsAnyListeners&&t.eventsAnyListeners.length&&t.eventsAnyListeners.forEach(t=>{t.apply(r,[e,...i])}),t.eventsListeners&&t.eventsListeners[e]&&t.eventsListeners[e].forEach(e=>{e.apply(r,i)})}),t}};function A(e){const t=this;t.destroyed||t.enabled&&(t.allowClick||(t.params.preventClicks&&e.preventDefault(),t.params.preventClicksPropagation&&t.animating&&(e.stopPropagation(),e.stopImmediatePropagation())))}function O(){const e=this;e.destroyed||e.documentTouchHandlerProceeded||(e.documentTouchHandlerProceeded=!0,e.params.touchReleaseOnEdges&&(e.el.style.touchAction="auto"))}function z(e){const t=this;t.destroyed||(T(t,e.target),t.params.cssMode||"auto"!==t.params.slidesPerView&&!t.params.autoHeight||t.update())}function G(){const e=this,{params:t,el:s}=e;if(s&&0===s.offsetWidth)return;t.breakpoints&&e.setBreakpoint();const{allowSlideNext:i,allowSlidePrev:r,snapGrid:n}=e,a=e.virtual&&e.params.virtual?.enabled;e.allowSlideNext=!0,e.allowSlidePrev=!0,e.updateSize(),e.updateSlides(),e.updateSlidesClasses();const l=a&&t.loop;if(!("auto"===t.slidesPerView||t.slidesPerView>1)||!e.isEnd||e.isBeginning||e.params.centeredSlides||l)e.params.loop&&!a?e.slideToLoop(e.realIndex,0,!1,!0):e.slideTo(e.activeIndex,0,!1,!0);else{const t=a?e.virtual.slides.length:e.slides.length;e.slideTo(t-1,0,!1,!0)}if(e.autoplay&&e.autoplay.running&&e.autoplay.paused){const t=e.autoplay;clearTimeout(t.resizeTimeout),t.resizeTimeout=setTimeout(()=>{e.autoplay&&e.autoplay.running&&e.autoplay.paused&&e.autoplay.resume()},500)}e.allowSlidePrev=r,e.allowSlideNext=i,e.params.watchOverflow&&n!==e.snapGrid&&e.checkOverflow()}function _(){const e=this;if(e.destroyed)return;const{wrapperEl:t,rtlTranslate:s,enabled:i}=e;if(!i)return;let r;e.previousTranslate=e.translate,e.isHorizontal()?e.translate=-t.scrollLeft:e.translate=-t.scrollTop,0===e.translate&&(e.translate=0),e.updateActiveIndex(),e.updateSlidesClasses();const n=e.maxTranslate()-e.minTranslate();r=0===n?0:(e.translate-e.minTranslate())/n,r!==e.progress&&e.updateProgress(s?-e.translate:e.translate),e.emit("setTranslate",e.translate,!1)}function D(s){const i=this;if(i.destroyed)return;const r=i.touchEventsData;let n=s.originalEvent??s;if("touchend"===n.type||"touchcancel"===n.type){const e=[...n.changedTouches].find(e=>e.identifier===r.touchId);if(!e||e.identifier!==r.touchId)return}else{if(null!==r.touchId)return;if(n.pointerId!==r.pointerId)return}if(["pointercancel","pointerout","pointerleave","contextmenu"].includes(n.type)){if(!(["pointercancel","contextmenu"].includes(n.type)&&(i.browser.isSafari||i.browser.isWebView)))return}r.pointerId=null,r.touchId=null;const{params:a,touches:l,rtlTranslate:o,slidesGrid:d,enabled:c}=i;if(!c)return;if(!a.simulateTouch&&"mouse"===n.pointerType)return;if(r.allowTouchCallbacks&&i.emit("touchEnd",n),r.allowTouchCallbacks=!1,!r.isTouched)return r.isMoved&&a.grabCursor&&i.setGrabCursor(!1),r.isMoved=!1,void(r.startMoving=!1);a.grabCursor&&r.isMoved&&r.isTouched&&(!0===i.allowSlideNext||!0===i.allowSlidePrev)&&i.setGrabCursor(!1);const p=t(),u=p-r.touchStartTime;if(i.allowClick){const e=n.path??(n.composedPath&&n.composedPath());i.updateClickedSlide(e&&e[0],e),i.emit("tap click",n),u<300&&p-r.lastClickTime<300&&i.emit("doubleTap doubleClick",n)}if(r.lastClickTime=t(),e(()=>{i.destroyed||(i.allowClick=!0)}),!r.isTouched||!r.isMoved||!i.swipeDirection||0===l.diff&&!r.loopSwapReset||r.currentTranslate===r.startTranslate&&!r.loopSwapReset)return r.isTouched=!1,r.isMoved=!1,void(r.startMoving=!1);let m;if(r.isTouched=!1,r.isMoved=!1,r.startMoving=!1,m=a.followFinger?o?i.translate:-i.translate:-(r.currentTranslate??0),a.cssMode)return;if(a.freeMode&&a.freeMode.enabled)return void i.freeMode.onTouchEnd({currentPos:m});const f=m>=-i.maxTranslate()&&!i.params.loop;let h=0,g=i.slidesSizesGrid[0];for(let e=0;e<d.length;e+=e<a.slidesPerGroupSkip?1:a.slidesPerGroup){const t=e<a.slidesPerGroupSkip-1?1:a.slidesPerGroup;void 0!==d[e+t]?(f||m>=d[e]&&m<d[e+t])&&(h=e,g=d[e+t]-d[e]):(f||m>=d[e])&&(h=e,g=d[d.length-1]-d[d.length-2])}let v=null,w=null;a.rewind&&(i.isBeginning?w=a.virtual?.enabled&&i.virtual?i.virtual.slides.length-1:i.slides.length-1:i.isEnd&&(v=0));const b=(m-d[h])/g,y=h<a.slidesPerGroupSkip-1?1:a.slidesPerGroup;if(u>a.longSwipesMs){if(!a.longSwipes)return void i.slideTo(i.activeIndex);"next"===i.swipeDirection&&(b>=a.longSwipesRatio?i.slideTo(a.rewind&&i.isEnd?v:h+y):i.slideTo(h)),"prev"===i.swipeDirection&&(b>1-a.longSwipesRatio?i.slideTo(h+y):null!==w&&b<0&&Math.abs(b)>a.longSwipesRatio?i.slideTo(w):i.slideTo(h))}else{if(!a.shortSwipes)return void i.slideTo(i.activeIndex);i.navigation&&(n.target===i.navigation.nextEl||n.target===i.navigation.prevEl)?n.target===i.navigation.nextEl?i.slideTo(h+y):i.slideTo(h):("next"===i.swipeDirection&&i.slideTo(null!==v?v:h+y),"prev"===i.swipeDirection&&i.slideTo(null!==w?w:h))}}function B(e){const s=this;if(s.destroyed)return;const i=s.touchEventsData,{params:r,touches:n,rtlTranslate:a,enabled:l}=s;if(!l)return;if(!r.simulateTouch&&"mouse"===e.pointerType)return;const o=e,d=o.originalEvent??o;if("pointermove"===d.type){if(null!==i.touchId)return;if(d.pointerId!==i.pointerId)return}let c;if("touchmove"===d.type){const e=[...d.changedTouches].find(e=>e.identifier===i.touchId);if(!e||e.identifier!==i.touchId)return;c=e}else c=d;if(!i.isTouched)return void(i.startMoving&&i.isScrolling&&s.emit("touchMoveOpposite",d));const p=c.pageX,u=c.pageY;if(d.preventedByNestedSwiper)return n.startX=p,void(n.startY=u);if(!s.allowTouchMove)return d.target.matches(i.focusableElements)||(s.allowClick=!1),void(i.isTouched&&(Object.assign(n,{startX:p,startY:u,currentX:p,currentY:u}),i.touchStartTime=t()));if(r.touchReleaseOnEdges&&!r.loop)if(s.isVertical()){if(u<n.startY&&s.translate<=s.maxTranslate()||u>n.startY&&s.translate>=s.minTranslate())return i.isTouched=!1,void(i.isMoved=!1)}else{if(a&&(p>n.startX&&-s.translate<=s.maxTranslate()||p<n.startX&&-s.translate>=s.minTranslate()))return;if(!a&&(p<n.startX&&s.translate<=s.maxTranslate()||p>n.startX&&s.translate>=s.minTranslate()))return}if(document.activeElement&&document.activeElement.matches(i.focusableElements)&&document.activeElement!==d.target&&"mouse"!==d.pointerType&&document.activeElement.blur(),document.activeElement&&d.target===document.activeElement&&d.target.matches(i.focusableElements))return i.isMoved=!0,void(s.allowClick=!1);i.allowTouchCallbacks&&s.emit("touchMove",d),n.previousX=n.currentX,n.previousY=n.currentY,n.currentX=p,n.currentY=u;const m=n.currentX-n.startX,f=n.currentY-n.startY;if(s.params.threshold&&Math.sqrt(m**2+f**2)<s.params.threshold)return;if(void 0===i.isScrolling){let e;s.isHorizontal()&&n.currentY===n.startY||s.isVertical()&&n.currentX===n.startX?i.isScrolling=!1:m*m+f*f>=25&&(e=180*Math.atan2(Math.abs(f),Math.abs(m))/Math.PI,i.isScrolling=s.isHorizontal()?e>r.touchAngle:90-e>r.touchAngle)}if(i.isScrolling&&s.emit("touchMoveOpposite",d),void 0===i.startMoving&&(n.currentX===n.startX&&n.currentY===n.startY||(i.startMoving=!0)),i.isScrolling||"touchmove"===d.type&&i.preventTouchMoveFromPointerMove)return void(i.isTouched=!1);if(!i.startMoving)return;s.allowClick=!1,!r.cssMode&&d.cancelable&&d.preventDefault(),r.touchMoveStopPropagation&&!r.nested&&d.stopPropagation();let h=s.isHorizontal()?m:f,g=s.isHorizontal()?n.currentX-n.previousX:n.currentY-n.previousY;r.oneWayMovement&&(h=Math.abs(h)*(a?1:-1),g=Math.abs(g)*(a?1:-1)),n.diff=h,h*=r.touchRatio,a&&(h=-h,g=-g);const v=s.touchesDirection;s.swipeDirection=h>0?"prev":"next",s.touchesDirection=g>0?"prev":"next";const w=s.params.loop&&!r.cssMode,b="next"===s.touchesDirection&&s.allowSlideNext||"prev"===s.touchesDirection&&s.allowSlidePrev;if(!i.isMoved){if(w&&b&&s.loopFix({direction:s.swipeDirection}),i.startTranslate=s.getTranslate(),s.setTransition(0),s.animating){const e=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0,detail:{bySwiperTouchMove:!0}});s.wrapperEl.dispatchEvent(e)}i.allowMomentumBounce=!1,!r.grabCursor||!0!==s.allowSlideNext&&!0!==s.allowSlidePrev||s.setGrabCursor(!0),s.emit("sliderFirstMove",d)}if((new Date).getTime(),!1!==r._loopSwapReset&&i.isMoved&&i.allowThresholdMove&&v!==s.touchesDirection&&w&&b&&Math.abs(h)>=1)return Object.assign(n,{startX:p,startY:u,currentX:p,currentY:u,startTranslate:i.currentTranslate}),i.loopSwapReset=!0,void(i.startTranslate=i.currentTranslate);s.emit("sliderMove",d),i.isMoved=!0;const y=i.startTranslate??0;i.currentTranslate=h+y;let S=!0,T=r.resistanceRatio;if(r.touchReleaseOnEdges&&(T=0),h>0?(w&&b&&i.allowThresholdMove&&i.currentTranslate>(r.centeredSlides?s.minTranslate()-s.slidesSizesGrid[s.activeIndex+1]-("auto"!==r.slidesPerView&&s.slides.length-r.slidesPerView>=2?s.slidesSizesGrid[s.activeIndex+1]+s.params.spaceBetween:0)-s.params.spaceBetween:s.minTranslate())&&s.loopFix({direction:"prev",setTranslate:!0,activeSlideIndex:0}),i.currentTranslate>s.minTranslate()&&(S=!1,r.resistance&&(i.currentTranslate=s.minTranslate()-1+(-s.minTranslate()+y+h)**T))):h<0&&(w&&b&&i.allowThresholdMove&&i.currentTranslate<(r.centeredSlides?s.maxTranslate()+s.slidesSizesGrid[s.slidesSizesGrid.length-1]+s.params.spaceBetween+("auto"!==r.slidesPerView&&s.slides.length-r.slidesPerView>=2?s.slidesSizesGrid[s.slidesSizesGrid.length-1]+s.params.spaceBetween:0):s.maxTranslate())&&s.loopFix({direction:"next",setTranslate:!0,activeSlideIndex:s.slides.length-("auto"===r.slidesPerView?s.slidesPerViewDynamic():Math.ceil(parseFloat(String(r.slidesPerView))))}),i.currentTranslate<s.maxTranslate()&&(S=!1,r.resistance&&(i.currentTranslate=s.maxTranslate()+1-(s.maxTranslate()-y-h)**T))),S&&(d.preventedByNestedSwiper=!0),!s.allowSlideNext&&"next"===s.swipeDirection&&(i.currentTranslate??0)<y&&(i.currentTranslate=y),!s.allowSlidePrev&&"prev"===s.swipeDirection&&(i.currentTranslate??0)>y&&(i.currentTranslate=y),s.allowSlidePrev||s.allowSlideNext||(i.currentTranslate=y),r.threshold>0){if(!(Math.abs(h)>r.threshold||i.allowThresholdMove))return void(i.currentTranslate=i.startTranslate);if(!i.allowThresholdMove)return i.allowThresholdMove=!0,n.startX=n.currentX,n.startY=n.currentY,i.currentTranslate=i.startTranslate,void(n.diff=s.isHorizontal()?n.currentX-n.startX:n.currentY-n.startY)}r.followFinger&&!r.cssMode&&((r.freeMode&&r.freeMode.enabled&&s.freeMode||r.watchSlidesProgress)&&(s.updateActiveIndex(),s.updateSlidesClasses()),r.freeMode&&r.freeMode.enabled&&s.freeMode&&s.freeMode.onTouchMove(),s.updateProgress(i.currentTranslate),s.setTranslate(i.currentTranslate??0))}function $(e,t,s){const{params:i}=e,r=i.edgeSwipeDetection,n=i.edgeSwipeThreshold;return!r||!(s<=n||s>=window.innerWidth-n)||"prevent"===r&&(t.preventDefault(),!0)}function V(e){const s=this;if(s.destroyed)return;const i=e.originalEvent??e,r=s.touchEventsData;if("pointerdown"===i.type){const e=i;if(null!==r.pointerId&&r.pointerId!==e.pointerId)return;r.pointerId=e.pointerId}else"touchstart"===i.type&&1===i.targetTouches.length&&(r.touchId=i.targetTouches[0].identifier);if("touchstart"===i.type)return void $(s,i,i.targetTouches[0].pageX);const{params:n,touches:a,enabled:l}=s;if(!l)return;if(!n.simulateTouch&&"mouse"===i.pointerType)return;if(s.animating&&n.preventInteractionOnTransition)return;!s.animating&&n.cssMode&&n.loop&&s.loopFix();let o=i.target;if("wrapper"===n.touchEventsTarget&&!function(e,t){let s=t.contains(e);!s&&t instanceof HTMLSlotElement&&(s=[...t.assignedElements()].includes(e),s||(s=function(e,t){const s=[t];for(;s.length>0;){const t=s.shift();if(e===t)return!0;s.push(...t.children,...t.shadowRoot?t.shadowRoot.children:[],...t.assignedElements?t.assignedElements():[])}return!1}(e,t)));return s}(o,s.wrapperEl))return;const d=i;if("number"==typeof d.which&&3===d.which)return;if("number"==typeof d.button&&d.button>0)return;if(r.isTouched&&r.isMoved)return;const c=!!n.noSwipingClass&&""!==n.noSwipingClass,p=i.composedPath?i.composedPath():i.path;c&&i.target&&i.target.shadowRoot&&p&&(o=p[0]);const u=n.noSwipingSelector?n.noSwipingSelector:`.${n.noSwipingClass}`,m=!(!i.target||!i.target.shadowRoot);if(n.noSwiping&&(m?(f=u,function e(t){if(!t||t===document||t===window)return null;let s=t;s.assignedSlot&&(s=s.assignedSlot);const i=s.closest(f);if(!i&&!s.getRootNode)return null;const r=s.getRootNode();return i||e(r.host)}(o)):o.closest(u)))return void(s.allowClick=!0);var f;if(n.swipeHandler&&"string"==typeof n.swipeHandler&&!o.closest(n.swipeHandler))return;const h=i;a.currentX=h.pageX,a.currentY=h.pageY;const g=a.currentX,v=a.currentY;if(!$(s,i,g))return;Object.assign(r,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),a.startX=g,a.startY=v,r.touchStartTime=t(),s.allowClick=!0,s.updateSize(),s.swipeDirection=void 0,n.threshold>0&&(r.allowThresholdMove=!1);let w=!0;o.matches(r.focusableElements)&&(w=!1,"SELECT"===o.nodeName&&(r.isTouched=!1)),document.activeElement&&document.activeElement.matches(r.focusableElements)&&document.activeElement!==o&&("mouse"===h.pointerType||"mouse"!==h.pointerType&&!o.matches(r.focusableElements))&&document.activeElement.blur();const b=w&&s.allowTouchMove&&n.touchStartPreventDefault;!n.touchStartForcePreventDefault&&!b||o.isContentEditable||i.preventDefault(),n.freeMode&&n.freeMode.enabled&&s.freeMode&&s.animating&&!n.cssMode&&s.freeMode.onTouchStart(),s.emit("touchStart",i)}const N=(e,t)=>{const{params:s,el:i,wrapperEl:r,device:n}=e,a=!!s.nested,l="on"===t?"addEventListener":"removeEventListener",o=t;if(!i||"string"==typeof i)return;document[l]("touchstart",e.onDocumentTouchStart,{passive:!1,capture:a}),i[l]("touchstart",e.onTouchStart,{passive:!1}),i[l]("pointerdown",e.onTouchStart,{passive:!1}),document[l]("touchmove",e.onTouchMove,{passive:!1,capture:a}),document[l]("pointermove",e.onTouchMove,{passive:!1,capture:a}),document[l]("touchend",e.onTouchEnd,{passive:!0}),document[l]("pointerup",e.onTouchEnd,{passive:!0}),document[l]("pointercancel",e.onTouchEnd,{passive:!0}),document[l]("touchcancel",e.onTouchEnd,{passive:!0}),document[l]("pointerout",e.onTouchEnd,{passive:!0}),document[l]("pointerleave",e.onTouchEnd,{passive:!0}),document[l]("contextmenu",e.onTouchEnd,{passive:!0}),(s.preventClicks||s.preventClicksPropagation)&&i[l]("click",e.onClick,!0),s.cssMode&&r[l]("scroll",e.onScroll);const d=t=>{e[o](t,G,!0)};s.updateOnWindowResize?d(n.ios||n.android?"resize orientationchange observerUpdate":"resize observerUpdate"):d("observerUpdate"),s.lazyPreload&&i[l]("load",e.onLoad,{capture:!0})};var F={loopCreate:function(e,t){const s=this,{params:i,slidesEl:r}=s;if(!i.loop||s.virtual&&s.params.virtual?.enabled)return;const n=()=>{l(r,`.${i.slideClass}, swiper-slide`).forEach((e,t)=>{e.setAttribute("data-swiper-slide-index",String(t))})},a=s.grid&&i.grid&&i.grid.rows>1;i.loopAddBlankSlides&&(i.slidesPerGroup>1||a)&&(()=>{const e=l(r,`.${i.slideBlankClass}`);e.forEach(e=>{e.remove()}),e.length>0&&(s.recalcSlides(),s.updateSlides())})();const c=i.slidesPerGroup*(a?i.grid.rows:1),p=s.slides.length%c!==0,u=a&&s.slides.length%i.grid.rows!==0,m=e=>{for(let t=0;t<e;t+=1){const e=s.isElement?d("swiper-slide",[i.slideBlankClass]):d("div",[i.slideClass,i.slideBlankClass]);s.slidesEl.append(e)}};if(p){if(i.loopAddBlankSlides){m(c-s.slides.length%c),s.recalcSlides(),s.updateSlides()}else o("Swiper Loop Warning: The number of slides is not even to slidesPerGroup, loop mode may not function properly. You need to add more slides (or make duplicates, or empty slides)");n()}else if(u){if(i.loopAddBlankSlides){m(i.grid.rows-s.slides.length%i.grid.rows),s.recalcSlides(),s.updateSlides()}else o("Swiper Loop Warning: The number of slides is not even to grid.rows, loop mode may not function properly. You need to add more slides (or make duplicates, or empty slides)");n()}else n();const f=i.centeredSlides||!!i.slidesOffsetBefore||!!i.slidesOffsetAfter;s.loopFix({slideRealIndex:e,direction:f?void 0:"next",initial:t})},loopFix:function(e={}){const{slideRealIndex:t,slideTo:s=!0,direction:i,setTranslate:r,activeSlideIndex:n,initial:a,byController:l,byMousewheel:d}=e;let c=n;const p=this;if(!p.params.loop)return;p.emit("beforeLoopFix"),p.__loopFixInProgress__=!0;const{slides:u,allowSlidePrev:m,allowSlideNext:f,slidesEl:h,params:g}=p,{centeredSlides:v,slidesOffsetBefore:w,slidesOffsetAfter:b,initialSlide:y}=g,S=v||!!w||!!b;if(p.allowSlidePrev=!0,p.allowSlideNext=!0,p.virtual&&g.virtual?.enabled){if(s){const e=p.virtual.slides.length,t=p.virtual.slidesBefore??0;S||0!==p.snapIndex?S&&p.snapIndex<g.slidesPerView?p.slideTo(e+p.snapIndex,0,!1,!0):p.snapIndex===p.snapGrid.length-1&&p.slideTo(t,0,!1,!0):p.slideTo(e,0,!1,!0)}return p.allowSlidePrev=m,p.allowSlideNext=f,p.__loopFixInProgress__=!1,void p.emit("loopFix")}let T=g.slidesPerView;"auto"===T?T=p.slidesPerViewDynamic():(T=Math.ceil(parseFloat(String(g.slidesPerView))),S&&T%2==0&&(T+=1));const E=g.slidesPerGroupAuto?T:g.slidesPerGroup,x=e=>("function"==typeof e?e.call(p):e)||0,C=p.slidesGrid.length>1?(p.slidesGrid[p.slidesGrid.length-1]-p.slidesGrid[0])/(p.slidesGrid.length-1):p.size,M=C>0?x(w)/C:0,P=C>0?x(b)/C:0;let L=S?Math.max(E,(v?Math.ceil(T/2):0)+Math.ceil(Math.max(M,P))):E;L%E!==0&&(L+=E-L%E),L+=g.loopAdditionalSlides,p.loopedSlides=L;const k=p.grid&&g.grid&&g.grid.rows>1;u.length<T+L||"cards"===p.params.effect&&u.length<T+2*L?o("Swiper Loop Warning: The number of slides is not enough for loop mode, it will be disabled or not function properly. You need to add more slides (or make duplicates) or lower the values of slidesPerView and slidesPerGroup parameters"):k&&"row"===g.grid.fill&&o("Swiper Loop Warning: Loop mode is not compatible with grid.fill = `row`");const I=[],A=[],O=k?Math.ceil(u.length/g.grid.rows):u.length,z=a&&O-y<T&&!S;let G=z?y:p.activeIndex;void 0===c?c=p.getSlideIndex(u.find(e=>e.classList.contains(g.slideActiveClass))):G=c;const _="next"===i||!i,D="prev"===i||!i;let B=0,$=0;const V=(k?u[c].column??0:c)+(S&&void 0===r?(v?-T/2+.5:0)-M:0);if(V<L){B=Math.max(L-V,E);for(let e=0;e<L-V;e+=1){const t=e-Math.floor(e/O)*O;if(k){const e=O-t-1;for(let t=u.length-1;t>=0;t-=1)u[t].column===e&&I.push(t)}else I.push(O-t-1)}}else if(V+T>O-L){$=Math.max(V-(O-2*L),E),z&&($=Math.max($,T-O+y+1));for(let e=0;e<$;e+=1){const t=e-Math.floor(e/O)*O;k?u.forEach((e,s)=>{e.column===t&&A.push(s)}):A.push(t)}}if(p.__preventObserver__=!0,requestAnimationFrame(()=>{p.__preventObserver__=!1}),"cards"===p.params.effect&&u.length<T+2*L&&(A.includes(c)&&A.splice(A.indexOf(c),1),I.includes(c)&&I.splice(I.indexOf(c),1)),D&&I.forEach(e=>{const t=u[e];t.swiperLoopMoveDOM=!0,h.prepend(t),t.swiperLoopMoveDOM=!1}),_&&A.forEach(e=>{const t=u[e];t.swiperLoopMoveDOM=!0,h.append(t),t.swiperLoopMoveDOM=!1}),p.recalcSlides(),"auto"===g.slidesPerView?p.updateSlides():k&&(I.length>0&&D||A.length>0&&_)&&p.slides.forEach((e,t)=>{p.grid.updateSlide(t,e,p.slides)}),g.watchSlidesProgress&&p.updateSlidesOffset(),s)if(I.length>0&&D){if(void 0===t){const e=p.slidesGrid[G],t=p.slidesGrid[G+B]-e;d?p.setTranslate(p.translate-t):(p.slideTo(G+Math.ceil(B),0,!1,!0),r&&(p.touchEventsData.startTranslate=p.touchEventsData.startTranslate-t,p.touchEventsData.currentTranslate=p.touchEventsData.currentTranslate-t))}else if(r){const e=k?I.length/g.grid.rows:I.length;p.slideTo(p.activeIndex+e,0,!1,!0),p.touchEventsData.currentTranslate=p.translate}}else if(A.length>0&&_)if(void 0===t){const e=p.slidesGrid[G],t=p.slidesGrid[G-$]-e;d?p.setTranslate(p.translate-t):(p.slideTo(G-$,0,!1,!0),r&&(p.touchEventsData.startTranslate=p.touchEventsData.startTranslate-t,p.touchEventsData.currentTranslate=p.touchEventsData.currentTranslate-t))}else{const e=k?A.length/g.grid.rows:A.length;p.slideTo(p.activeIndex-e,0,!1,!0)}p.allowSlidePrev=m,p.allowSlideNext=f;const N=p.controller?.control;if(N&&!l){const e={slideRealIndex:t,direction:i,setTranslate:r,activeSlideIndex:c,byController:!0};Array.isArray(N)?N.forEach(t=>{!t.destroyed&&t.params.loop&&t.loopFix({...e,slideTo:t.params.slidesPerView===g.slidesPerView&&s})}):N instanceof p.constructor&&N.params.loop&&N.loopFix({...e,slideTo:N.params.slidesPerView===g.slidesPerView&&s})}p.__loopFixInProgress__=!1,p.emit("loopFix")},loopDestroy:function(){const e=this,{params:t,slidesEl:s}=e;if(!t.loop||!s||e.virtual&&e.params.virtual?.enabled)return;e.recalcSlides();const i=[];e.slides.forEach(e=>{const t=e,s=void 0===t.swiperSlideIndex?Number(e.getAttribute("data-swiper-slide-index")):t.swiperSlideIndex;i[s]=e}),e.slides.forEach(e=>{e.removeAttribute("data-swiper-slide-index")}),i.forEach(e=>{s.append(e)}),e.recalcSlides(),e.slideTo(e.realIndex,0)}};function H(e,t){return function(s={}){const i=Object.keys(s)[0],r=s[i];"object"==typeof r&&null!==r?(!0===e[i]&&(e[i]={enabled:!0}),"navigation"===i&&e[i]&&e[i].enabled&&!e[i].prevEl&&!e[i].nextEl&&(e[i].auto=!0),["pagination","scrollbar"].indexOf(i)>=0&&e[i]&&e[i].enabled&&!e[i].el&&(e[i].auto=!0),i in e&&"enabled"in r?("object"!=typeof e[i]||"enabled"in e[i]||(e[i].enabled=!0),e[i]||(e[i]={enabled:!1}),n(t,s)):n(t,s)):n(t,s)}}var R={slideTo:function(e=0,t,s=!0,i,r){"string"==typeof e&&(e=parseInt(e,10));const n=this;let a=e;a<0&&(a=0);const{params:l,snapGrid:o,slidesGrid:d,previousIndex:c,activeIndex:p,rtlTranslate:u,wrapperEl:m,enabled:f}=n;if(!f&&!i&&!r||n.destroyed||n.animating&&l.preventInteractionOnTransition)return!1;void 0===t&&(t=n.params.speed);const h=Math.min(n.params.slidesPerGroupSkip,a);let g=h+Math.floor((a-h)/n.params.slidesPerGroup);g>=o.length&&(g=o.length-1);const v=-o[g];if(l.normalizeSlideIndex)for(let e=0;e<d.length;e+=1){const t=-Math.floor(100*v),s=Math.floor(100*d[e]),i=Math.floor(100*d[e+1]);void 0!==d[e+1]?t>=s&&t<i-(i-s)/2?a=e:t>=s&&t<i&&(a=e+1):t>=s&&(a=e)}if(n.initialized&&a!==p){if(!n.allowSlideNext&&(u?v>n.translate&&v>n.minTranslate():v<n.translate&&v<n.minTranslate()))return!1;if(!n.allowSlidePrev&&v>n.translate&&v>n.maxTranslate()&&(p||0)!==a)return!1}let w;a!==(c||0)&&s&&n.emit("beforeSlideChangeStart"),n.updateProgress(v),w=a>p?"next":a<p?"prev":"reset";const b=n.virtual&&n.params.virtual?.enabled;if(!(b&&r)&&(u&&-v===n.translate||!u&&v===n.translate))return n.updateActiveIndex(a),l.autoHeight&&n.updateAutoHeight(),n.updateSlidesClasses(),"slide"!==l.effect&&n.setTranslate(v),"reset"!==w&&(n.transitionStart(s,w),n.transitionEnd(s,w)),!1;if(l.cssMode){const e=n.isHorizontal(),s=u?v:-v;return 0===t?(b&&(n.wrapperEl.style.scrollSnapType="none",n._immediateVirtual=!0),b&&!n._cssModeVirtualInitialSet&&(n.params.initialSlide??0)>0?(n._cssModeVirtualInitialSet=!0,requestAnimationFrame(()=>{m[e?"scrollLeft":"scrollTop"]=s})):m[e?"scrollLeft":"scrollTop"]=s,b&&requestAnimationFrame(()=>{n.wrapperEl.style.scrollSnapType="",n._immediateVirtual=!1})):m.scrollTo({[e?"left":"top"]:s,behavior:"smooth"}),!0}const y=S().isSafari;return b&&!r&&y&&n.isElement&&n.virtual.update(!1,!1,a),n.setTransition(t),n.setTranslate(v),n.updateActiveIndex(a),n.updateSlidesClasses(),n.emit("beforeTransitionStart",t,i),n.transitionStart(s,w),0===t?n.transitionEnd(s,w):n.animating||(n.animating=!0,n.onSlideToWrapperTransitionEnd||(n.onSlideToWrapperTransitionEnd=function(e){n&&!n.destroyed&&e.target===this&&(n.wrapperEl.removeEventListener("transitionend",n.onSlideToWrapperTransitionEnd),n.onSlideToWrapperTransitionEnd=null,delete n.onSlideToWrapperTransitionEnd,n.transitionEnd(s,w))}),n.wrapperEl.addEventListener("transitionend",n.onSlideToWrapperTransitionEnd)),!0},slideToLoop:function(e=0,t,s=!0,i){if("string"==typeof e){e=parseInt(e,10)}const r=this;if(r.destroyed)return;void 0===t&&(t=r.params.speed);const n=r.grid&&r.params.grid&&r.params.grid.rows>1;let a=e;if(r.params.loop)if(r.virtual&&r.params.virtual?.enabled)a+=r.virtual.slidesBefore??0;else{let e;if(n){const t=a*r.params.grid.rows,s=r.slides.find(e=>Number(e.getAttribute("data-swiper-slide-index"))===t);e=s?.column??0}else e=r.getSlideIndexByData(a);const t=n?Math.ceil(r.slides.length/r.params.grid.rows):r.slides.length,{centeredSlides:s,slidesOffsetBefore:l,slidesOffsetAfter:o}=r.params,d=s||!!l||!!o;let c;"auto"===r.params.slidesPerView?c=r.slidesPerViewDynamic():(c=Math.ceil(parseFloat(String(r.params.slidesPerView))),d&&c%2==0&&(c+=1));let p=t-e<c;if(d&&(p=p||e<Math.ceil(c/2)),i&&d&&"auto"!==r.params.slidesPerView&&!n&&(p=!1),p){const s=d?e<r.activeIndex?"prev":"next":e-r.activeIndex-1<r.params.slidesPerView?"next":"prev";r.loopFix({direction:s,slideTo:!0,activeSlideIndex:"next"===s?e+1:e-t+1,slideRealIndex:"next"===s?r.realIndex:void 0})}if(n){const e=a*r.params.grid.rows,t=r.slides.find(t=>Number(t.getAttribute("data-swiper-slide-index"))===e);a=t?.column??0}else a=r.getSlideIndexByData(a)}return requestAnimationFrame(()=>{r.slideTo(a,t,s,i)}),r},slideNext:function(e,t=!0,s){const i=this,{enabled:r,params:n,animating:a}=i;if(!r||i.destroyed)return i;void 0===e&&(e=i.params.speed);let l=n.slidesPerGroup;"auto"===n.slidesPerView&&1===n.slidesPerGroup&&n.slidesPerGroupAuto&&(l=Math.max(i.slidesPerViewDynamic("current",!0),1));const o=i.activeIndex<n.slidesPerGroupSkip?1:l,d=i.virtual&&n.virtual?.enabled;if(n.loop){if(a&&!d&&n.loopPreventsSliding)return!1;if(i.loopFix({direction:"next"}),i._clientLeft=i.wrapperEl.clientLeft,i.activeIndex===i.slides.length-1&&n.cssMode)return requestAnimationFrame(()=>{i.slideTo(i.activeIndex+o,e,t,s)}),!0}return n.rewind&&i.isEnd?i.slideTo(0,e,t,s):i.slideTo(i.activeIndex+o,e,t,s)},slidePrev:function(e,t=!0,s){const i=this,{params:r,snapGrid:n,slidesGrid:a,rtlTranslate:l,enabled:o,animating:d}=i;if(!o||i.destroyed)return i;void 0===e&&(e=i.params.speed);const c=i.virtual&&r.virtual?.enabled;if(r.loop){if(d&&!c&&r.loopPreventsSliding)return!1;i.loopFix({direction:"prev"}),i._clientLeft=i.wrapperEl.clientLeft}function p(e){return e<0?-Math.floor(Math.abs(e)):Math.floor(e)}const u=p(l?i.translate:-i.translate),m=n.map(e=>p(e)),f=r.freeMode&&r.freeMode.enabled;let h=n[m.indexOf(u)-1];if(void 0===h&&(r.cssMode||f)){let e;n.forEach((t,s)=>{u>=t&&(e=s)}),void 0!==e&&(h=f?n[e]:n[e>0?e-1:e])}let g=0;if(void 0!==h&&(g=a.indexOf(h),g<0&&(g=i.activeIndex-1),"auto"===r.slidesPerView&&1===r.slidesPerGroup&&r.slidesPerGroupAuto&&(g=g-i.slidesPerViewDynamic("previous",!0)+1,g=Math.max(g,0))),r.rewind&&i.isBeginning){const r=i.params.virtual?.enabled&&i.virtual?i.virtual.slides.length-1:i.slides.length-1;return i.slideTo(r,e,t,s)}return r.loop&&0===i.activeIndex&&r.cssMode?(requestAnimationFrame(()=>{i.slideTo(g,e,t,s)}),!0):i.slideTo(g,e,t,s)},slideReset:function(e,t=!0,s){const i=this;if(!i.destroyed)return void 0===e&&(e=i.params.speed),i.slideTo(i.activeIndex,e,t,s)},slideToClosest:function(e,t=!0,s,i=.5){const r=this;if(r.destroyed)return;void 0===e&&(e=r.params.speed);let n=r.activeIndex;const a=Math.min(r.params.slidesPerGroupSkip,n),l=a+Math.floor((n-a)/r.params.slidesPerGroup),o=r.rtlTranslate?r.translate:-r.translate;if(o>=r.snapGrid[l]){const e=r.snapGrid[l];o-e>(r.snapGrid[l+1]-e)*i&&(n+=r.params.slidesPerGroup)}else{const e=r.snapGrid[l-1];o-e<=(r.snapGrid[l]-e)*i&&(n-=r.params.slidesPerGroup)}return n=Math.max(n,0),n=Math.min(n,r.slidesGrid.length-1),r.slideTo(n,e,t,s)},slideToClickedSlide:function(){const t=this;if(t.destroyed)return;const{params:s,slidesEl:i,clickedSlide:r,clickedIndex:n}=t;if(void 0===r||void 0===n)return;const a="auto"===s.slidesPerView?t.slidesPerViewDynamic():s.slidesPerView;let o,d=t.getSlideIndexWhenGrid(n);const c=t.isElement?"swiper-slide":`.${s.slideClass}`,p=t.grid&&t.params.grid&&t.params.grid.rows>1;if(s.loop){if(t.animating)return;o=parseInt(r.getAttribute("data-swiper-slide-index"),10),s.centeredSlides?t.slideToLoop(o):d>(p?(t.slides.length-a)/2-(t.params.grid.rows-1):t.slides.length-a)?(t.loopFix(),d=t.getSlideIndex(l(i,`${c}[data-swiper-slide-index="${o}"]`)[0]),e(()=>{t.slideTo(d)})):t.slideTo(d)}else t.slideTo(d)}};function q({swiper:e,runCallbacks:t,direction:s,step:i}){const{activeIndex:r,previousIndex:n}=e;let a=s;a||(a=r>n?"next":r<n?"prev":"reset"),e.emit(`transition${i}`),t&&"reset"===a?e.emit(`slideResetTransition${i}`):t&&r!==n&&(e.emit(`slideChangeTransition${i}`),"next"===a?e.emit(`slideNextTransition${i}`):e.emit(`slidePrevTransition${i}`))}var j={getTranslate:function(e=(this.isHorizontal()?"x":"y")){const{params:t,rtlTranslate:i,translate:r,wrapperEl:n}=this;if(t.virtualTranslate)return i?-r:r;if(t.cssMode)return r;let a=s(n,e);return a+=this.cssOverflowAdjustment(),i&&(a=-a),a||0},setTranslate:function(e,t){const s=this,{rtlTranslate:i,params:r,wrapperEl:n,progress:a}=s;let l,o=0,d=0;s.isHorizontal()?o=i?-e:e:d=e,r.roundLengths&&(o=Math.floor(o),d=Math.floor(d)),s.previousTranslate=s.translate,s.translate=s.isHorizontal()?o:d,r.cssMode?n[s.isHorizontal()?"scrollLeft":"scrollTop"]=s.isHorizontal()?-o:-d:r.virtualTranslate||(s.isHorizontal()?o-=s.cssOverflowAdjustment():d-=s.cssOverflowAdjustment(),n.style.transform=`translate3d(${o}px, ${d}px, 0px)`);const c=s.maxTranslate()-s.minTranslate();l=0===c?0:(e-s.minTranslate())/c,l!==a&&s.updateProgress(e),s.emit("setTranslate",s.translate,t)},minTranslate:function(){return-this.snapGrid[0]},maxTranslate:function(){return-this.snapGrid[this.snapGrid.length-1]},translateTo:function(e=0,t=this.params.speed,s=!0,i=!0,r){const n=this,{params:a,wrapperEl:l}=n;if(n.animating&&a.preventInteractionOnTransition)return!1;const o=n.minTranslate(),d=n.maxTranslate();let c;if(c=i&&e>o?o:i&&e<d?d:e,n.updateProgress(c),a.cssMode){const e=n.isHorizontal();return 0===t?l[e?"scrollLeft":"scrollTop"]=-c:l.scrollTo({[e?"left":"top"]:-c,behavior:"smooth"}),!0}return 0===t?(n.setTransition(0),n.setTranslate(c),s&&(n.emit("beforeTransitionStart",t,r),n.emit("transitionEnd"))):(n.setTransition(t),n.setTranslate(c),s&&(n.emit("beforeTransitionStart",t,r),n.emit("transitionStart")),n.animating||(n.animating=!0,n.onTranslateToWrapperTransitionEnd||(n.onTranslateToWrapperTransitionEnd=function(e){n&&!n.destroyed&&e.target===this&&(n.wrapperEl.removeEventListener("transitionend",n.onTranslateToWrapperTransitionEnd),n.onTranslateToWrapperTransitionEnd=null,delete n.onTranslateToWrapperTransitionEnd,n.animating=!1,s&&n.emit("transitionEnd"))}),n.wrapperEl.addEventListener("transitionend",n.onTranslateToWrapperTransitionEnd))),!0}};const W=(e,t,s)=>{t&&!e.classList.contains(s)?e.classList.add(s):!t&&e.classList.contains(s)&&e.classList.remove(s)};const X=(e,t,s)=>{t&&!e.classList.contains(s)?e.classList.add(s):!t&&e.classList.contains(s)&&e.classList.remove(s)};var Y={updateSize:function(){const e=this;let t,s;const i=e.el;t=void 0!==e.params.width&&null!==e.params.width?e.params.width:i.clientWidth,s=void 0!==e.params.height&&null!==e.params.height?e.params.height:i.clientHeight,0===t&&e.isHorizontal()||0===s&&e.isVertical()||(t=t-parseInt(c(i,"padding-left")||"0",10)-parseInt(c(i,"padding-right")||"0",10),s=s-parseInt(c(i,"padding-top")||"0",10)-parseInt(c(i,"padding-bottom")||"0",10),Number.isNaN(t)&&(t=0),Number.isNaN(s)&&(s=0),Object.assign(e,{width:t,height:s,size:e.isHorizontal()?t:s}))},updateSlides:function(){const e=this;function t(t,s){return parseFloat(t.getPropertyValue(e.getDirectionLabel(s))||"0")}const s=e.params,{wrapperEl:i,slidesEl:r,rtlTranslate:n,wrongRTL:o}=e,d=!(!e.virtual||!s.virtual?.enabled),p=d?e.virtual.slides.length:e.slides.length,u=l(r,`.${e.params.slideClass}, swiper-slide`),f=d?e.virtual.slides.length:u.length;let h=[];const g=[],v=[],w=t=>"function"==typeof t?t.call(e):t,b=w(s.slidesOffsetBefore),y=w(s.slidesOffsetAfter),S=e.snapGrid.length,T=e.slidesGrid.length,E=e.size-b-y;let x=s.spaceBetween,C=-b,M=0,P=0;if(void 0===E)return;"string"==typeof x&&x.indexOf("%")>=0?x=parseFloat(x.replace("%",""))/100*E:"string"==typeof x&&(x=parseFloat(x)),e.virtualSize=-x-b-y,u.forEach(e=>{n?e.style.marginLeft="":e.style.marginRight="",e.style.marginBottom="",e.style.marginTop=""}),s.centeredSlides&&s.cssMode&&(a(i,"--swiper-centered-offset-before",""),a(i,"--swiper-centered-offset-after","")),s.cssMode&&(a(i,"--swiper-slides-offset-before",`${b}px`),a(i,"--swiper-slides-offset-after",`${y}px`));const L=s.grid&&s.grid.rows>1&&e.grid;L?e.grid.initSlides(u):e.grid&&e.grid.unsetSlides();let k=0;const I="auto"===s.slidesPerView&&s.breakpoints&&Object.keys(s.breakpoints).filter(e=>{const t=s.breakpoints[e];return void 0!==t?.slidesPerView}).length>0;for(let i=0;i<f;i+=1){k=0;const r=u[i];if(!r||(L&&e.grid.updateSlide(i,r,u),"none"!==c(r,"display"))){if(d&&"auto"===s.slidesPerView)s.virtual?.slidesPerViewAutoSlideSize&&(k=s.virtual.slidesPerViewAutoSlideSize),k&&r&&(s.roundLengths&&(k=Math.floor(k)),r.style[e.getDirectionLabel("width")]=`${k}px`);else if("auto"===s.slidesPerView){I&&(r.style[e.getDirectionLabel("width")]="");const i=getComputedStyle(r),n=r.style.transform,a=r.style.webkitTransform;if(n&&(r.style.transform="none"),a&&(r.style.webkitTransform="none"),s.roundLengths)k=e.isHorizontal()?m(r,"width"):m(r,"height");else{const e=t(i,"width"),s=t(i,"padding-left"),n=t(i,"padding-right"),a=t(i,"margin-left"),l=t(i,"margin-right"),o=i.getPropertyValue("box-sizing");if(o&&"border-box"===o)k=e+a+l;else{const{clientWidth:t,offsetWidth:i}=r;k=e+s+n+a+l+(i-t)}}n&&(r.style.transform=n),a&&(r.style.webkitTransform=a),s.roundLengths&&(k=Math.floor(k))}else k=(E-(s.slidesPerView-1)*x)/s.slidesPerView,s.roundLengths&&(k=Math.floor(k)),r&&(r.style[e.getDirectionLabel("width")]=`${k}px`);r&&(r.swiperSlideSize=k),v.push(k),s.centeredSlides?(C=C+k/2+M/2+x,0===M&&0!==i&&(C=C-E/2-x),0===i&&(C=C-E/2-x),Math.abs(C)<.001&&(C=0),s.roundLengths&&(C=Math.floor(C)),P%s.slidesPerGroup===0&&h.push(C),g.push(C)):(s.roundLengths&&(C=Math.floor(C)),(P-Math.min(e.params.slidesPerGroupSkip,P))%e.params.slidesPerGroup===0&&h.push(C),g.push(C),C=C+k+x),e.virtualSize+=k+x,M=k,P+=1}}if(e.virtualSize=Math.max(e.virtualSize,E)+y,n&&o&&("slide"===s.effect||"coverflow"===s.effect)&&(i.style.width=`${e.virtualSize+x}px`),s.setWrapperSize&&(i.style[e.getDirectionLabel("width")]=`${e.virtualSize+x}px`),L&&e.grid.updateWrapperSize(k,h),!s.centeredSlides){const t="auto"!==s.slidesPerView&&s.slidesPerView%1!=0,i=s.snapToSlideEdge&&!s.loop&&("auto"===s.slidesPerView||t);let r=h.length;if(i){let e;if("auto"===s.slidesPerView){e=1;let t=0;for(let s=v.length-1;s>=0&&(t+=v[s]+(s<v.length-1?x:0),t<=E);s-=1)e=v.length-s}else e=Math.floor(s.slidesPerView);r=Math.max(f-e,0)}const n=[];for(let t=0;t<h.length;t+=1){let a=h[t];s.roundLengths&&(a=Math.floor(a)),i?t<=r&&n.push(a):h[t]<=e.virtualSize-E&&n.push(a)}h=n,Math.floor(e.virtualSize-E)-Math.floor(h[h.length-1])>1&&(i||h.push(e.virtualSize-E))}if(d&&s.loop){const t=v[0]+x,i=(e.virtual.slidesBefore??0)+(e.virtual.slidesAfter??0);if(s.slidesPerGroup>1){const e=Math.ceil(i/s.slidesPerGroup),r=t*s.slidesPerGroup;for(let t=0;t<e;t+=1)h.push(h[h.length-1]+r)}for(let r=0;r<i;r+=1)1===s.slidesPerGroup&&h.push(h[h.length-1]+t),g.push(g[g.length-1]+t),e.virtualSize+=t}if(0===h.length&&(h=[0]),0!==x){const t=e.isHorizontal()&&n?"marginLeft":e.getDirectionLabel("marginRight");u.filter((e,t)=>!(s.cssMode&&!s.loop)||t!==u.length-1).forEach(e=>{e.style[t]=`${x}px`})}if(s.centeredSlides&&s.centeredSlidesBounds){let e=0;v.forEach(t=>{e+=t+(x||0)}),e-=x;const t=e>E?e-E:0;h=h.map(e=>e<=0?-b:e>t?t+y:e)}if(s.centerInsufficientSlides){let e=0;if(v.forEach(t=>{e+=t+(x||0)}),e-=x,e<E){const t=(E-e)/2;h.forEach((e,s)=>{h[s]=e-t}),g.forEach((e,s)=>{g[s]=e+t})}}if(Object.assign(e,{slides:u,snapGrid:h,slidesGrid:g,slidesSizesGrid:v}),s.centeredSlides&&s.cssMode&&!s.centeredSlidesBounds){a(i,"--swiper-centered-offset-before",-h[0]+"px"),a(i,"--swiper-centered-offset-after",e.size/2-v[v.length-1]/2+"px");const t=-e.snapGrid[0],s=-e.slidesGrid[0];e.snapGrid=e.snapGrid.map(e=>e+t),e.slidesGrid=e.slidesGrid.map(e=>e+s)}if(f!==p&&e.emit("slidesLengthChange"),h.length!==S&&(e.params.watchOverflow&&e.checkOverflow(),e.emit("snapGridLengthChange")),g.length!==T&&e.emit("slidesGridLengthChange"),s.watchSlidesProgress&&e.updateSlidesOffset(),e.emit("slidesUpdated"),!(d||s.cssMode||"slide"!==s.effect&&"fade"!==s.effect)){const t=`${s.containerModifierClass}backface-hidden`,i=e.el.classList.contains(t);f<=s.maxBackfaceHiddenSlides?i||e.el.classList.add(t):i&&e.el.classList.remove(t)}},updateAutoHeight:function(e){const t=this,s=[],i=t.virtual&&t.params.virtual?.enabled;let r,n=0;"number"==typeof e?t.setTransition(e):!0===e&&t.setTransition(t.params.speed);const a=e=>i?t.slides[t.getSlideIndexByData(e)]:t.slides[e];if("auto"!==t.params.slidesPerView&&t.params.slidesPerView>1)if(t.params.centeredSlides)(t.visibleSlides||[]).forEach(e=>{s.push(e)});else for(r=0;r<Math.ceil(t.params.slidesPerView);r+=1){const e=t.activeIndex+r;if(e>t.slides.length&&!i)break;const n=a(e);n&&s.push(n)}else{const e=a(t.activeIndex);e&&s.push(e)}for(r=0;r<s.length;r+=1)if(void 0!==s[r]){const e=s[r].offsetHeight;n=e>n?e:n}(n||0===n)&&(t.wrapperEl.style.height=`${n}px`)},updateSlidesOffset:function(){const e=this,t=e.slides,s=e.isElement?e.isHorizontal()?e.wrapperEl.offsetLeft:e.wrapperEl.offsetTop:0;for(let i=0;i<t.length;i+=1)t[i].swiperSlideOffset=(e.isHorizontal()?t[i].offsetLeft:t[i].offsetTop)-s-e.cssOverflowAdjustment()},updateSlidesProgress:function(e=this&&this.translate||0){const t=this,s=t.params,{slides:i,rtlTranslate:r,snapGrid:n}=t;if(0===i.length)return;void 0===i[0].swiperSlideOffset&&t.updateSlidesOffset();let a=-e;r&&(a=e),t.visibleSlidesIndexes=[],t.visibleSlides=[];let l=s.spaceBetween;"string"==typeof l&&l.indexOf("%")>=0?l=parseFloat(l.replace("%",""))/100*t.size:"string"==typeof l&&(l=parseFloat(l));for(let e=0;e<i.length;e+=1){const o=i[e];let d=o.swiperSlideOffset??0;s.cssMode&&s.centeredSlides&&(d-=i[0].swiperSlideOffset??0);const c=o.swiperSlideSize??0,p=(a+(s.centeredSlides?t.minTranslate():0)-d)/(c+l),u=(a-n[0]+(s.centeredSlides?t.minTranslate():0)-d)/(c+l),m=-(a-d),f=m+t.slidesSizesGrid[e],h=m>=0&&m<=t.size-t.slidesSizesGrid[e],g=m>=0&&m<t.size-1||f>1&&f<=t.size||m<=0&&f>=t.size;g&&(t.visibleSlides.push(o),t.visibleSlidesIndexes.push(e)),X(o,g,s.slideVisibleClass),X(o,h,s.slideFullyVisibleClass),o.progress=r?-p:p,o.originalProgress=r?-u:u}},updateProgress:function(e){const t=this;if(void 0===e){const s=t.rtlTranslate?-1:1;e=t&&t.translate&&t.translate*s||0}const s=t.params,i=t.maxTranslate()-t.minTranslate();let{progress:r,isBeginning:n,isEnd:a}=t,l=t.progressLoop;const o=n,d=a;if(0===i)r=0,n=!0,a=!0;else{r=(e-t.minTranslate())/i;const s=Math.abs(e-t.minTranslate())<1,l=Math.abs(e-t.maxTranslate())<1;n=s||r<=0,a=l||r>=1,s&&(r=0),l&&(r=1)}if(s.loop){const s=t.getSlideIndexByData(0),i=t.getSlideIndexByData(t.slides.length-1),r=t.slidesGrid[s],n=t.slidesGrid[i],a=t.slidesGrid[t.slidesGrid.length-1],o=Math.abs(e);l=o>=r?(o-r)/a:(o+a-n)/a,l>1&&(l-=1)}Object.assign(t,{progress:r,progressLoop:l,isBeginning:n,isEnd:a}),(s.watchSlidesProgress||s.centeredSlides&&s.autoHeight)&&t.updateSlidesProgress(e),n&&!o&&t.emit("reachBeginning toEdge"),a&&!d&&t.emit("reachEnd toEdge"),(o&&!n||d&&!a)&&t.emit("fromEdge"),t.emit("progress",r)},updateSlidesClasses:function(){const e=this,{slides:t,params:s,slidesEl:i,activeIndex:r}=e,n=!(!e.virtual||!s.virtual?.enabled),a=e.grid&&s.grid&&s.grid.rows>1,o=e=>l(i,`.${s.slideClass}${e}, swiper-slide${e}`)[0];let d,c,p;if(n)if(s.loop){const t=e.virtual.slides;let s=r-(e.virtual.slidesBefore??0);s<0&&(s=t.length+s),s>=t.length&&(s-=t.length),d=o(`[data-swiper-slide-index="${s}"]`)}else d=o(`[data-swiper-slide-index="${r}"]`);else a?(d=t.find(e=>e.column===r),p=t.find(e=>e.column===r+1),c=t.find(e=>e.column===r-1)):d=t[r];d&&(a||(p=function(e,t){const s=[];let i=e.nextElementSibling;for(;i;)t&&!i.matches(t)||s.push(i),i=i.nextElementSibling;return s}(d,`.${s.slideClass}, swiper-slide`)[0],s.loop&&!p&&(p=t[0]),c=function(e,t){const s=[];let i=e.previousElementSibling;for(;i;)t&&!i.matches(t)||s.push(i),i=i.previousElementSibling;return s}(d,`.${s.slideClass}, swiper-slide`)[0],s.loop&&0===!c&&(c=t[t.length-1]))),t.forEach(e=>{W(e,e===d,s.slideActiveClass),W(e,e===p,s.slideNextClass),W(e,e===c,s.slidePrevClass)}),e.emitSlidesClasses()},updateActiveIndex:function(e){const t=this,s=t.rtlTranslate?t.translate:-t.translate,{snapGrid:i,params:r,activeIndex:n,realIndex:a,snapIndex:l}=t;let o,d=e;const c=e=>{const s=t.virtual.slides;let i=e-(t.virtual.slidesBefore??0);return i<0&&(i=s.length+i),i>=s.length&&(i-=s.length),i};if(void 0===d&&(d=function(e){const{slidesGrid:t,params:s}=e,i=e.rtlTranslate?e.translate:-e.translate;let r;for(let e=0;e<t.length;e+=1)void 0!==t[e+1]?i>=t[e]&&i<t[e+1]-(t[e+1]-t[e])/2?r=e:i>=t[e]&&i<t[e+1]&&(r=e+1):i>=t[e]&&(r=e);return s.normalizeSlideIndex&&(r<0||void 0===r)&&(r=0),r}(t)),i.indexOf(s)>=0)o=i.indexOf(s);else{const e=Math.min(r.slidesPerGroupSkip,d);o=e+Math.floor((d-e)/r.slidesPerGroup)}if(o>=i.length&&(o=i.length-1),d===n&&!t.params.loop)return void(o!==l&&(t.snapIndex=o,t.emit("snapIndexChange")));if(d===n&&t.params.loop&&t.virtual&&t.params.virtual?.enabled)return void(t.realIndex=c(d));const p=t.grid&&r.grid&&r.grid.rows>1;let u;if(t.virtual&&r.virtual?.enabled)u=r.loop?c(d):d;else if(p){const e=t.slides.find(e=>e.column===d);let s=parseInt(e.getAttribute("data-swiper-slide-index"),10);Number.isNaN(s)&&(s=Math.max(t.slides.indexOf(e),0)),u=Math.floor(s/r.grid.rows)}else if(t.slides[d]){const e=t.slides[d].getAttribute("data-swiper-slide-index");u=e?parseInt(e,10):d}else u=d;Object.assign(t,{previousSnapIndex:l,snapIndex:o,previousRealIndex:a,realIndex:u,previousIndex:n,activeIndex:d}),t.initialized&&x(t),t.__loopFixInProgress__||(t.emit("activeIndexChange"),t.emit("snapIndexChange"),(t.initialized||t.params.runCallbacksOnInit)&&((t.__lastEmittedRealIndex__??a)!==u&&t.emit("realIndexChange"),t.emit("slideChange")),t.__lastEmittedRealIndex__=u)},updateClickedSlide:function(e,t){const s=this,i=s.params;let r=e.closest(`.${i.slideClass}, swiper-slide`);!r&&s.isElement&&t&&t.length>1&&t.includes(e)&&[...t.slice(t.indexOf(e)+1,t.length)].forEach(e=>{!r&&e.matches&&e.matches(`.${i.slideClass}, swiper-slide`)&&(r=e)});let n,a=!1;if(r)for(let e=0;e<s.slides.length;e+=1)if(s.slides[e]===r){a=!0,n=e;break}if(!r||!a)return s.clickedSlide=void 0,void(s.clickedIndex=void 0);s.clickedSlide=r,s.virtual&&s.params.virtual?.enabled?s.clickedIndex=parseInt(r.getAttribute("data-swiper-slide-index"),10):s.clickedIndex=n,i.slideToClickedSlide&&void 0!==s.clickedIndex&&s.clickedIndex!==s.activeIndex&&s.slideToClickedSlide()}};const U={eventsEmitter:I,update:Y,translate:j,transition:{setTransition:function(e,t){const s=this;s.params.cssMode||(s.wrapperEl.style.transitionDuration=`${e}ms`,s.wrapperEl.style.transitionDelay=0===e?"0ms":""),s.emit("setTransition",e,t)},transitionStart:function(e=!0,t){const s=this,{params:i}=s;i.cssMode||(i.autoHeight&&s.updateAutoHeight(),q({swiper:s,runCallbacks:e,direction:t,step:"Start"}))},transitionEnd:function(e=!0,t){const s=this,{params:i}=s;s.animating=!1,i.cssMode||(s.setTransition(0),q({swiper:s,runCallbacks:e,direction:t,step:"End"}))}},slide:R,loop:F,grabCursor:{setGrabCursor:function(e){const t=this;if(!t.params.simulateTouch||t.params.watchOverflow&&t.isLocked||t.params.cssMode)return;const s="container"===t.params.touchEventsTarget?t.el:t.wrapperEl;t.isElement&&(t.__preventObserver__=!0),s.style.cursor="move",s.style.cursor=e?"grabbing":"grab",t.isElement&&requestAnimationFrame(()=>{t.__preventObserver__=!1})},unsetGrabCursor:function(){const e=this;e.params.watchOverflow&&e.isLocked||e.params.cssMode||(e.isElement&&(e.__preventObserver__=!0),e["container"===e.params.touchEventsTarget?"el":"wrapperEl"].style.cursor="",e.isElement&&requestAnimationFrame(()=>{e.__preventObserver__=!1}))}},events:{attachEvents:function(){const e=this,{params:t}=e;e.onTouchStart=V.bind(e),e.onTouchMove=B.bind(e),e.onTouchEnd=D.bind(e),e.onDocumentTouchStart=O.bind(e),t.cssMode&&(e.onScroll=_.bind(e)),e.onClick=A.bind(e),e.onLoad=z.bind(e),N(e,"on")},detachEvents:function(){N(this,"off")}},breakpoints:M,checkOverflow:P,classes:L},J={};class K{static extendedDefaults;static defaults;constructor(...e){let t,s;if(1===e.length&&null!==e[0]&&"object"==typeof e[0]&&"Object"===Object.prototype.toString.call(e[0]).slice(8,-1)?s=e[0]:[t,s]=e,s||(s={}),s=n({},s),t&&!s.el&&(s.el=t),s.el&&"string"==typeof s.el&&"undefined"!=typeof document&&document.querySelectorAll(s.el).length>1){const e=[];return document.querySelectorAll(s.el).forEach(t=>{const i=n({},s,{el:t});e.push(new K(i))}),e}const i=this;i.__swiper__=!0,i.support=b(),i.device=y({userAgent:s.userAgent??void 0}),i.browser=S(),i.eventsListeners={},i.eventsAnyListeners=[],i.modules=[...i.__modules__||[]],s.modules&&Array.isArray(s.modules)&&s.modules.forEach(e=>{const t=e;"function"==typeof t&&i.modules.indexOf(t)<0&&i.modules.push(t)});const r={};i.modules.forEach(e=>{e({params:s,swiper:i,extendParams:H(s,r),on:i.on.bind(i),once:i.once.bind(i),off:i.off.bind(i),emit:i.emit.bind(i)})});const a=n({},k,r);if(i.params=n({},a,J,s),i.originalParams=n({},i.params),i.passedParams=n({},s),i.params&&i.params.on){const e=i.params.on;Object.keys(e).forEach(t=>{const s=e[t];s&&i.on(t,s)})}return i.params&&i.params.onAny&&i.onAny(i.params.onAny),Object.assign(i,{enabled:i.params.enabled,el:t,classNames:[],slides:[],slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal(){return"horizontal"===i.params.direction},isVertical(){return"vertical"===i.params.direction},activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,cssOverflowAdjustment(){return Math.trunc(this.translate/2**23)*2**23},allowSlideNext:i.params.allowSlideNext,allowSlidePrev:i.params.allowSlidePrev,touchEventsData:{isTouched:void 0,isMoved:void 0,allowTouchCallbacks:void 0,touchStartTime:void 0,isScrolling:void 0,currentTranslate:void 0,startTranslate:void 0,allowThresholdMove:void 0,focusableElements:i.params.focusableElements,lastClickTime:0,clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,startMoving:void 0,pointerId:null,touchId:null},allowClick:!0,allowTouchMove:i.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),i.emit("_swiper"),i.params.init&&i.init(),i}getDirectionLabel(e){return this.isHorizontal()?e:{width:"height","margin-top":"margin-left","margin-bottom ":"margin-right","margin-left":"margin-top","margin-right":"margin-bottom","padding-left":"padding-top","padding-right":"padding-bottom",marginRight:"marginBottom"}[e]}isHorizontal(){return"horizontal"===this.params.direction}isVertical(){return"vertical"===this.params.direction}cssOverflowAdjustment(){return Math.trunc(this.translate/2**23)*2**23}getSlideIndex(e){const{slidesEl:t,params:s}=this,i=p(l(t,`.${s.slideClass}, swiper-slide`)[0]);return p(e)-(i??0)}getSlideIndexByData(e){return this.getSlideIndex(this.slides.find(t=>Number(t.getAttribute("data-swiper-slide-index"))===e))}getSlideIndexWhenGrid(e){return this.grid&&this.params.grid&&this.params.grid.rows>1&&("column"===this.params.grid.fill?e=Math.floor(e/this.params.grid.rows):"row"===this.params.grid.fill&&(e%=Math.ceil(this.slides.length/this.params.grid.rows))),e}recalcSlides(){const{slidesEl:e,params:t}=this;this.slides=l(e,`.${t.slideClass}, swiper-slide`)}enable(){this.enabled||(this.enabled=!0,this.params.grabCursor&&this.setGrabCursor(),this.emit("enable"))}disable(){this.enabled&&(this.enabled=!1,this.params.grabCursor&&this.unsetGrabCursor(),this.emit("disable"))}setProgress(e,t){e=Math.min(Math.max(e,0),1);const s=this.minTranslate(),i=(this.maxTranslate()-s)*e+s;this.translateTo(i,void 0===t?0:t),this.updateActiveIndex(),this.updateSlidesClasses()}emitContainerClasses(){if(!this.params._emitClasses||!this.el)return;const e=this.el.className.split(" ").filter(e=>0===e.indexOf("swiper")||0===e.indexOf(this.params.containerModifierClass));this.emit("_containerClasses",e.join(" "))}getSlideClasses(e){return this.destroyed?"":e.className.split(" ").filter(e=>0===e.indexOf("swiper-slide")||0===e.indexOf(this.params.slideClass)).join(" ")}emitSlidesClasses(){if(!this.params._emitClasses||!this.el)return;const e=[];this.slides.forEach(t=>{const s=this.getSlideClasses(t);e.push({slideEl:t,classNames:s}),this.emit("_slideClass",t,s)}),this.emit("_slideClasses",e)}slidesPerViewDynamic(e="current",t=!1){const{params:s,slides:i,slidesGrid:r,slidesSizesGrid:n,size:a,activeIndex:l}=this;let o=1;if("number"==typeof s.slidesPerView)return s.slidesPerView;if(!a)return o;if(s.centeredSlides){let e=i[l]?Math.ceil(i[l].swiperSlideSize??0):0,t=!1;for(let s=l+1;s<i.length;s+=1)i[s]&&!t&&(e+=Math.ceil(i[s].swiperSlideSize??0),o+=1,e>a&&(t=!0));for(let s=l-1;s>=0;s-=1)i[s]&&!t&&(e+=i[s].swiperSlideSize??0,o+=1,e>a&&(t=!0))}else if("current"===e)for(let e=l+1;e<i.length;e+=1){(t?r[e]+n[e]-r[l]<a:r[e]-r[l]<a)&&(o+=1)}else for(let e=l-1;e>=0;e-=1){r[l]-r[e]<a&&(o+=1)}return o}update(){const e=this;if(!e||e.destroyed)return;const{snapGrid:t,params:s}=e;function i(){const t=e.rtlTranslate?-1*e.translate:e.translate,s=Math.min(Math.max(t,e.maxTranslate()),e.minTranslate());e.setTranslate(s),e.updateActiveIndex(),e.updateSlidesClasses()}let r;if(s.breakpoints&&e.setBreakpoint(),s.lazyPreload&&[...e.el.querySelectorAll('[loading="lazy"]')].forEach(t=>{t.complete&&T(e,t)}),e.updateSize(),e.updateSlides(),e.updateProgress(),e.updateSlidesClasses(),s.freeMode?.enabled&&!s.cssMode)i(),s.autoHeight&&e.updateAutoHeight();else{if(("auto"===s.slidesPerView||s.slidesPerView>1)&&e.isEnd&&!s.centeredSlides){const t=e.virtual&&s.virtual?.enabled?e.virtual.slides.length:e.slides.length;r=e.slideTo(t-1,0,!1,!0)}else r=e.slideTo(e.activeIndex,0,!1,!0);r||i()}s.watchOverflow&&t!==e.snapGrid&&e.checkOverflow(),e.emit("update")}changeDirection(e,t=!0){const s=this,i=s.params.direction;return e||(e="horizontal"===i?"vertical":"horizontal"),e===i||"horizontal"!==e&&"vertical"!==e||(s.el.classList.remove(`${s.params.containerModifierClass}${i}`),s.el.classList.add(`${s.params.containerModifierClass}${e}`),s.emitContainerClasses(),s.params.direction=e,s.rtlTranslate="horizontal"===e&&s.rtl,s.slides.forEach(t=>{"vertical"===e?t.style.width="":t.style.height=""}),s.emit("changeDirection"),t&&s.update()),s}changeLanguageDirection(e){const t=this;t.rtl&&"rtl"===e||!t.rtl&&"ltr"===e||(t.rtl="rtl"===e,t.rtlTranslate="horizontal"===t.params.direction&&t.rtl,t.rtl?(t.el.classList.add(`${t.params.containerModifierClass}rtl`),t.el.dir="rtl"):(t.el.classList.remove(`${t.params.containerModifierClass}rtl`),t.el.dir="ltr"),t.update())}mount(e){const t=this;if(t.mounted)return!0;if("undefined"==typeof document)return!1;const s=e??t.params.el;let i=null;if("string"==typeof s?i=document.querySelector(s):s instanceof HTMLElement&&(i=s),!i)return!1;i.swiper=t;const r=i.parentNode;r&&r.host&&r.host.nodeName===t.params.swiperElementNodeName.toUpperCase()&&(t.isElement=!0);const n=()=>`.${(t.params.wrapperClass||"").trim().split(" ").join(".")}`;let a=(()=>{if(i&&i.shadowRoot){return i.shadowRoot.querySelector(n())}return l(i,n())[0]})();!a&&t.params.createElements&&(a=d("div",t.params.wrapperClass),i.append(a),l(i,`.${t.params.slideClass}`).forEach(e=>{a.append(e)}));const o=t.isElement?i.parentNode.host:null;return Object.assign(t,{el:i,wrapperEl:a,slidesEl:t.isElement&&!o.slideSlots?o:a,hostEl:t.isElement?o:i,mounted:!0,rtl:"rtl"===i.dir.toLowerCase()||"rtl"===c(i,"direction"),rtlTranslate:"horizontal"===t.params.direction&&("rtl"===i.dir.toLowerCase()||"rtl"===c(i,"direction")),wrongRTL:"-webkit-box"===c(a,"display")}),!0}init(e){const t=this;if(t.initialized)return t;if(!1===t.mount(e))return t;if(t.emit("beforeInit"),t.params.breakpoints&&t.setBreakpoint(),t.addClasses(),t.updateSize(),t.updateSlides(),t.params.watchOverflow&&t.checkOverflow(),t.params.grabCursor&&t.enabled&&t.setGrabCursor(),t.params.loop&&t.virtual&&t.params.virtual?.enabled?t.slideTo((t.params.initialSlide??0)+(t.virtual.slidesBefore??0),0,t.params.runCallbacksOnInit,!1,!0):t.slideTo(t.params.initialSlide,0,t.params.runCallbacksOnInit,!1,!0),t.params.loop&&t.loopCreate(void 0,!0),t.attachEvents(),t.params.lazyPreload){const e=[...t.el.querySelectorAll('[loading="lazy"]')];t.isElement&&e.push(...t.hostEl.querySelectorAll('[loading="lazy"]')),e.forEach(e=>{e.complete?T(t,e):e.addEventListener("load",e=>{T(t,e.target)})})}return t.initialized=!0,x(t),t.emit("init"),t.emit("afterInit"),t}destroy(e=!0,t=!0){const s=this,{params:i,el:r,wrapperEl:n,slides:a}=s;return void 0===s.params||s.destroyed||(s.emit("beforeDestroy"),s.initialized=!1,s.detachEvents(),i.loop&&s.loopDestroy(),t&&(s.removeClasses(),r&&"string"!=typeof r&&r.removeAttribute("style"),n&&n.removeAttribute("style"),a&&a.length&&a.forEach(e=>{e.classList.remove(i.slideVisibleClass,i.slideFullyVisibleClass,i.slideActiveClass,i.slideNextClass,i.slidePrevClass),e.removeAttribute("style"),e.removeAttribute("data-swiper-slide-index")})),s.emit("destroy"),Object.keys(s.eventsListeners).forEach(e=>{s.off(e)}),!1!==e&&(s.el&&"string"!=typeof s.el&&(s.el.swiper=null),l=s,Object.keys(l).forEach(e=>{try{l[e]=null}catch{}try{delete l[e]}catch{}})),s.destroyed=!0),null;var l}static extendDefaults(e){n(J,e)}static installModule(e){K.prototype.__modules__||(K.prototype.__modules__=[]);const t=K.prototype.__modules__;"function"==typeof e&&t.indexOf(e)<0&&t.push(e)}static use(e){return Array.isArray(e)?(e.forEach(e=>K.installModule(e)),K):(K.installModule(e),K)}}Object.defineProperty(K,"extendedDefaults",{get(){return J}}),Object.defineProperty(K,"defaults",{get(){return k}});const Z=U,Q=K.prototype;function ee(e,t,s,i){const r=s??{},n=t??{};
192return e.params.createElements&&Object.keys(i).forEach(t=>{if(!r[t]&&!0===r.auto){let s=l(e.el,`.${i[t]}`)[0];s||(s=d("div",i[t]),s.className=i[t],e.el.append(s)),r[t]=s,n[t]=s}}),r}Object.keys(Z).forEach(e=>{const t=Z[e];Object.keys(t).forEach(e=>{Q[e]=t[e]})}),K.use([({swiper:e,on:t,emit:s})=>{let i=null,r=null;const n=()=>{e&&!e.destroyed&&e.initialized&&(s("beforeResize"),s("resize"))},a=()=>{e&&!e.destroyed&&e.initialized&&s("orientationchange")};t("init",()=>{e.params.resizeObserver&&void 0!==window.ResizeObserver?e&&!e.destroyed&&e.initialized&&(i=new ResizeObserver(t=>{r=window.requestAnimationFrame(()=>{const{width:s,height:i}=e;let r=s,a=i;t.forEach(({contentBoxSize:t,contentRect:s,target:i})=>{if(i&&i!==e.el)return;const n=Array.isArray(t)?t[0]:t;r=s?s.width:n.inlineSize,a=s?s.height:n.blockSize}),r===s&&a===i||n()})}),i.observe(e.el)):(window.addEventListener("resize",n),window.addEventListener("orientationchange",a))}),t("destroy",()=>{r&&window.cancelAnimationFrame(r),i&&i.unobserve&&e.el&&(i.unobserve(e.el),i=null),window.removeEventListener("resize",n),window.removeEventListener("orientationchange",a)})},({swiper:e,extendParams:t,on:s})=>{const i=[],r=(t,s={})=>{const r=window.MutationObserver||window.WebkitMutationObserver;if(!r)return;const n=new r(t=>{if(e.__preventObserver__)return;if(1===t.length)return void e.emit("observerUpdate",t[0]);const s=function(){e.emit("observerUpdate",t[0])};window.requestAnimationFrame?window.requestAnimationFrame(s):window.setTimeout(s,0)});n.observe(t,{attributes:void 0===s.attributes||s.attributes,childList:e.isElement||void 0===s.childList||s.childList,characterData:void 0===s.characterData||s.characterData}),i.push(n)};t({observer:!1,observeParents:!1,observeSlideChildren:!1}),s("init",()=>{if(e.params.observer){if(e.params.observeParents){const t=u(e.hostEl);for(let e=0;e<t.length;e+=1)r(t[e])}r(e.hostEl,{childList:e.params.observeSlideChildren}),r(e.wrapperEl,{attributes:!1})}}),s("destroy",()=>{i.forEach(e=>{e.disconnect()}),i.splice(0,i.length)})}]);const te='<svg class="swiper-navigation-icon" width="11" height="20" viewBox="0 0 11 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M0.38296 20.0762C0.111788 19.805 0.111788 19.3654 0.38296 19.0942L9.19758 10.2796L0.38296 1.46497C0.111788 1.19379 0.111788 0.754138 0.38296 0.482966C0.654131 0.211794 1.09379 0.211794 1.36496 0.482966L10.4341 9.55214C10.8359 9.9539 10.8359 10.6053 10.4341 11.007L1.36496 20.0762C1.09379 20.3474 0.654131 20.3474 0.38296 20.0762Z" fill="currentColor"/></svg>',se=({swiper:e,extendParams:t,on:s,emit:i})=>{function r(){return e.params.navigation}function n(t){let s;return t&&"string"==typeof t&&e.isElement&&(s=e.el.querySelector(t)||e.hostEl.querySelector(t),s)?s:(t&&("string"==typeof t&&(s=[...document.querySelectorAll(t)]),e.params.uniqueNavElements&&"string"==typeof t&&s&&s.length>1&&1===e.el.querySelectorAll(t).length?s=e.el.querySelector(t):s&&1===s.length&&(s=s[0])),t&&!s?t:s)}function a(t,s){const i=r();f(t).forEach(t=>{t&&(t.classList[s?"add":"remove"](...i.disabledClass.split(" ")),"BUTTON"===t.tagName&&(t.disabled=s),e.params.watchOverflow&&e.enabled&&t.classList[e.isLocked?"add":"remove"](i.lockClass))})}function l(){const{nextEl:t,prevEl:s}=e.navigation;if(e.params.loop)return a(s,!1),void a(t,!1);a(s,e.isBeginning&&!e.params.rewind),a(t,e.isEnd&&!e.params.rewind)}function o(t){t.preventDefault(),(!e.isBeginning||e.params.loop||e.params.rewind)&&(e.slidePrev(),i("navigationPrev"))}function d(t){t.preventDefault(),(!e.isEnd||e.params.loop||e.params.rewind)&&(e.slideNext(),i("navigationNext"))}function c(){e.params.navigation=ee(e,e.originalParams.navigation,e.params.navigation,{nextEl:"swiper-button-next",prevEl:"swiper-button-prev"});const t=r();if(!t.nextEl&&!t.prevEl)return;const s=n(t.nextEl),i=n(t.prevEl);Object.assign(e.navigation,{nextEl:s,prevEl:i});const a=f(s),l=f(i),c=(s,i)=>{if(s){if(t.addIcons&&s.matches(".swiper-button-next,.swiper-button-prev")&&!s.querySelector("svg")){const e=document.createElement("div");h(e,te);const t=e.querySelector("svg");t&&s.appendChild(t),e.remove()}s.addEventListener("click","next"===i?d:o)}!e.enabled&&s&&s.classList.add(...t.lockClass.split(" "))};
192a.forEach(e=>c(e,"next")),l.forEach(e=>c(e,"prev"))}function p(){const t=r(),{nextEl:s,prevEl:i}=e.navigation,n=f(s),a=f(i),l=(e,s)=>{e.removeEventListener("click","next"===s?d:o),e.classList.remove(...t.disabledClass.split(" "))};n.forEach(e=>l(e,"next")),a.forEach(e=>l(e,"prev"))}t({navigation:{nextEl:null,prevEl:null,addIcons:!0,hideOnClick:!1,disabledClass:"swiper-button-disabled",hiddenClass:"swiper-button-hidden",lockClass:"swiper-button-lock",navigationDisabledClass:"swiper-navigation-disabled"}}),e.navigation={nextEl:null,prevEl:null,arrowSvg:te},s("init",()=>{!1===r().enabled?u():(c(),l())}),s("toEdge fromEdge lock unlock",()=>{l()}),s("destroy",()=>{p()}),s("enable disable",()=>{const t=r(),{nextEl:s,prevEl:i}=e.navigation,n=f(s),a=f(i);e.enabled?l():[...n,...a].filter(e=>!!e).forEach(e=>e.classList.add(t.lockClass))}),s("click",(t,s)=>{const n=r(),{nextEl:a,prevEl:l}=e.navigation,o=f(a),d=f(l),c=s.target;let p=d.includes(c)||o.includes(c);if(e.isElement&&!p){const e=s.composedPath?s.composedPath():[];e.length&&(p=e.find(e=>o.includes(e)||d.includes(e)))}if(n.hideOnClick&&!p){if(e.pagination&&e.params.pagination&&e.params.pagination.clickable&&(e.pagination.el===c||e.pagination.el.contains(c)))return;let t;o.length?t=o[0].classList.contains(n.hiddenClass):d.length&&(t=d[0].classList.contains(n.hiddenClass)),i(!0===t?"navigationShow":"navigationHide"),[...o,...d].filter(e=>!!e).forEach(e=>e.classList.toggle(n.hiddenClass))}});const u=()=>{const t=r();e.el.classList.add(...t.navigationDisabledClass.split(" ")),p()};Object.assign(e.navigation,{enable:()=>{const t=r();e.el.classList.remove(...t.navigationDisabledClass.split(" ")),c(),l()},disable:u,update:l,init:c,destroy:p})};function ie(e=""){return`.${e.trim().replace(/([.:!+/()[\]#>~*^$|=,'"@{}\\])/g,"\\$1").replace(/ /g,".")}`}const re=e=>{if((e=>!!e.virtual&&!!e.params.virtual?.enabled)(e))return e.virtual.slides.length;const t=e.params.grid?.rows;return e.grid&&t&&t>1?e.slides.length/Math.ceil(t):e.slides.length},ne=({swiper:e,extendParams:t,on:s,emit:i})=>{const r="swiper-pagination";let n;t({pagination:{el:null,bulletElement:"span",clickable:!1,hideOnClick:!1,renderBullet:null,renderProgressbar:null,renderFraction:null,renderCustom:null,progressbarOpposite:!1,type:"bullets",dynamicBullets:!1,dynamicMainBullets:1,formatFractionCurrent:e=>e,formatFractionTotal:e=>e,bulletClass:`${r}-bullet`,bulletActiveClass:`${r}-bullet-active`,modifierClass:`${r}-`,currentClass:`${r}-current`,totalClass:`${r}-total`,hiddenClass:`${r}-hidden`,progressbarFillClass:`${r}-progressbar-fill`,progressbarOppositeClass:`${r}-progressbar-opposite`,clickableClass:`${r}-clickable`,lockClass:`${r}-lock`,horizontalClass:`${r}-horizontal`,verticalClass:`${r}-vertical`,paginationDisabledClass:`${r}-disabled`}}),e.pagination={el:null,bullets:[]};let a=0;function l(){return e.params.pagination}function o(){return!l().el||!e.pagination.el||Array.isArray(e.pagination.el)&&0===e.pagination.el.length}function d(e,t){const{bulletActiveClass:s}=l();if(!e)return;let i=e[("prev"===t?"previous":"next")+"ElementSibling"];i&&(i.classList.add(`${s}-${t}`),i=i[("prev"===t?"previous":"next")+"ElementSibling"],i&&i.classList.add(`${s}-${t}-${t}`))}function c(t){const s=t.target.closest(ie(l().bulletClass));if(!s)return;t.preventDefault();const i=(p(s)??0)*(e.params.slidesPerGroup??1);if(e.params.loop){if(e.realIndex===i)return;const t=(r=e.realIndex,n=i,a=e.slides.length,(n%=a)===1+(r%=a)?"next":n===r-1?"previous":void 0);"next"===t?e.slideNext():"previous"===t?e.slidePrev():e.slideToLoop(i)}else e.slideTo(i);var r,n,a}function g(){const t=e.rtl,s=l();if(o())return;const r=f(e.pagination.el);let c,u;const g=re(e),v=e.params.loop?Math.ceil(g/(e.params.slidesPerGroup??1)):e.snapGrid.length;if(e.params.loop?(u=e.previousRealIndex||0,c=(e.params.slidesPerGroup??1)>1?Math.floor(e.realIndex/(e.params.slidesPerGroup??1)):e.realIndex):void 0!==e.snapIndex?(c=e.snapIndex,u=e.previousSnapIndex):(u=e.previousIndex||0,c=e.activeIndex||0),"bullets"===s.type&&e.pagination.bullets&&e.pagination.bullets.length>0){const i=e.pagination.bullets;let l=0,o=0,f=0;
192if(s.dynamicBullets){n=m(i[0],e.isHorizontal()?"width":"height");const t=e.isHorizontal()?"width":"height";r.forEach(e=>{e.style[t]=(n??0)*(s.dynamicMainBullets+4)+"px"}),s.dynamicMainBullets>1&&void 0!==u&&(a+=c-(u||0),a>s.dynamicMainBullets-1?a=s.dynamicMainBullets-1:a<0&&(a=0)),l=Math.max(c-a,0),o=l+(Math.min(i.length,s.dynamicMainBullets)-1),f=(o+l)/2}if(i.forEach(e=>{const t=["","-next","-next-next","-prev","-prev-prev","-main"].map(e=>`${s.bulletActiveClass}${e}`).flatMap(e=>"string"==typeof e&&e.includes(" ")?e.split(" "):[e]);e.classList.remove(...t)}),r.length>1)i.forEach(t=>{const i=p(t);i===c?t.classList.add(...s.bulletActiveClass.split(" ")):e.isElement&&t.setAttribute("part","bullet"),s.dynamicBullets&&void 0!==i&&(i>=l&&i<=o&&t.classList.add(...`${s.bulletActiveClass}-main`.split(" ")),i===l&&d(t,"prev"),i===o&&d(t,"next"))});else{const t=i[c];if(t&&t.classList.add(...s.bulletActiveClass.split(" ")),e.isElement&&i.forEach((e,t)=>{e.setAttribute("part",t===c?"bullet-active":"bullet")}),s.dynamicBullets){const e=i[l],t=i[o];for(let e=l;e<=o;e+=1)i[e]&&i[e].classList.add(...`${s.bulletActiveClass}-main`.split(" "));d(e,"prev"),d(t,"next")}}if(s.dynamicBullets){const r=Math.min(i.length,s.dynamicMainBullets+4),a=((n??0)*r-(n??0))/2-f*(n??0),l=t?"right":"left",o=e.isHorizontal()?l:"top";
192i.forEach(e=>{e.style[o]=`${a}px`})}}r.forEach((t,r)=>{if("fraction"===s.type&&(t.querySelectorAll(ie(s.currentClass)).forEach(e=>{e.textContent=String(s.formatFractionCurrent(c+1))}),t.querySelectorAll(ie(s.totalClass)).forEach(e=>{e.textContent=String(s.formatFractionTotal(v))})),"progressbar"===s.type){let i;i=s.progressbarOpposite?e.isHorizontal()?"vertical":"horizontal":e.isHorizontal()?"horizontal":"vertical";const r=(c+1)/v;let n=1,a=1;"horizontal"===i?n=r:a=r,t.querySelectorAll(ie(s.progressbarFillClass)).forEach(t=>{t.style.transform=`translate3d(0,0,0) scaleX(${n}) scaleY(${a})`,t.style.transitionDuration=`${e.params.speed}ms`})}"custom"===s.type&&s.renderCustom?(h(t,s.renderCustom(e,c+1,v)),0===r&&i("paginationRender",t)):(0===r&&i("paginationRender",t),i("paginationUpdate",t)),e.params.watchOverflow&&e.enabled&&t.classList[e.isLocked?"add":"remove"](s.lockClass)})}function v(){const t=l();if(o())return;const s=re(e),r=f(e.pagination.el);let n="";if("bullets"===t.type){let i=e.params.loop?Math.ceil(s/(e.params.slidesPerGroup??1)):e.snapGrid.length;e.params.freeMode&&(e=>!!e.params.freeMode?.enabled)(e)&&i>s&&(i=s);for(let s=0;s<i;s+=1)t.renderBullet?n+=t.renderBullet.call(e,s,t.bulletClass):n+=`<${t.bulletElement} ${e.isElement?'part="bullet"':""} class="${t.bulletClass}"></${t.bulletElement}>`}"fraction"===t.type&&(n=t.renderFraction?t.renderFraction.call(e,t.currentClass,t.totalClass):`<span class="${t.currentClass}"></span> / <span class="${t.totalClass}"></span>`),"progressbar"===t.type&&(n=t.renderProgressbar?t.renderProgressbar.call(e,t.progressbarFillClass):`<span class="${t.progressbarFillClass}"></span>`),e.pagination.bullets=[],r.forEach(s=>{"custom"!==t.type&&h(s,n||""),"bullets"===t.type&&e.pagination.bullets.push(...Array.from(s.querySelectorAll(ie(t.bulletClass))))}),"custom"!==t.type&&i("paginationRender",r[0])}function w(){e.params.pagination=ee(e,e.originalParams.pagination,e.params.pagination,{el:"swiper-pagination"});const t=l();if(!t.el)return;let s;if("string"==typeof t.el&&e.isElement&&(s=e.el.querySelector(t.el)),s||"string"!=typeof t.el||(s=[...document.querySelectorAll(t.el)]),s||(s=t.el),!s||Array.isArray(s)&&0===s.length)return;if(e.params.uniqueNavElements&&"string"==typeof t.el&&Array.isArray(s)&&s.length>1&&(s=[...e.el.querySelectorAll(t.el)],s.length>1)){const t=s.find(t=>u(t,".swiper")[0]===e.el);t&&(s=t)}Array.isArray(s)&&1===s.length&&(s=s[0]),Object.assign(e.pagination,{el:s});f(s).forEach(s=>{"bullets"===t.type&&t.clickable&&s.classList.add(...(t.clickableClass||"").split(" ")),s.classList.add(t.modifierClass+t.type),s.classList.add(e.isHorizontal()?t.horizontalClass:t.verticalClass),"bullets"===t.type&&t.dynamicBullets&&(s.classList.add(`${t.modifierClass}${t.type}-dynamic`),a=0,t.dynamicMainBullets<1&&(t.dynamicMainBullets=1)),"progressbar"===t.type&&t.progressbarOpposite&&s.classList.add(t.progressbarOppositeClass),t.clickable&&s.addEventListener("click",c),e.enabled||s.classList.add(t.lockClass)})}function b(){const t=l();if(o())return;const s=e.pagination.el;if(s){f(s).forEach(s=>{s.classList.remove(t.hiddenClass),s.classList.remove(t.modifierClass+t.type),s.classList.remove(e.isHorizontal()?t.horizontalClass:t.verticalClass),t.clickable&&(s.classList.remove(...(t.clickableClass||"").split(" ")),s.removeEventListener("click",c))})}e.pagination.bullets&&e.pagination.bullets.forEach(e=>e.classList.remove(...t.bulletActiveClass.split(" ")))}s("changeDirection",()=>{if(!e.pagination||!e.pagination.el)return;const t=l();f(e.pagination.el).forEach(s=>{s.classList.remove(t.horizontalClass,t.verticalClass),s.classList.add(e.isHorizontal()?t.horizontalClass:t.verticalClass)})}),s("init",()=>{!1===l().enabled?y():(w(),v(),g())}),s("activeIndexChange",()=>{void 0===e.snapIndex&&g()}),s("snapIndexChange",()=>{g()}),s("snapGridLengthChange",()=>{v(),g()}),s("destroy",()=>{b()}),s("enable disable",()=>{const{el:t}=e.pagination;if(t){const s=l();f(t).forEach(t=>t.classList[e.enabled?"remove":"add"](s.lockClass))}}),s("lock unlock",()=>{g()}),s("click",(t,s)=>{const r=s.target,n=f(e.pagination.el),a=l();if(a.el&&a.hideOnClick&&n&&n.length>0&&!r.classList.contains(a.bulletClass)){if(e.navigation&&(e.navigation.nextEl&&r===e.navigation.nextEl||e.navigation.prevEl&&r===e.navigation.prevEl))return;const t=n[0].classList.contains(a.hiddenClass);
192i(!0===t?"paginationShow":"paginationHide"),n.forEach(e=>e.classList.toggle(a.hiddenClass))}});const y=()=>{const t=l();e.el.classList.add(t.paginationDisabledClass);const{el:s}=e.pagination;if(s){f(s).forEach(e=>e.classList.add(t.paginationDisabledClass))}b()};Object.assign(e.pagination,{enable:()=>{const t=l();e.el.classList.remove(t.paginationDisabledClass);const{el:s}=e.pagination;if(s){f(s).forEach(e=>e.classList.remove(t.paginationDisabledClass))}w(),v(),g()},disable:y,render:v,update:g,init:w,destroy:b})},ae=({swiper:e,extendParams:t,on:s,emit:i,params:r})=>{function n(){return e.params.autoplay}e.autoplay={running:!1,paused:!1,timeLeft:0},t({autoplay:{enabled:!1,delay:3e3,waitForTransition:!0,disableOnInteraction:!1,stopOnLastSlide:!1,reverseDirection:!1,pauseOnMouseEnter:!1}});const a="object"==typeof r.autoplay&&r.autoplay&&"number"==typeof r.autoplay.delay?r.autoplay.delay:3e3;let l,o,d,c=a,p=a,u=0,m=(new Date).getTime(),f=!1,h=!1,g=!1,v=!1,w=!1;function b(t){if(!e||e.destroyed||!e.wrapperEl)return;if(t.target!==e.wrapperEl)return;e.wrapperEl.removeEventListener("transitionend",b);const s=t.detail;w||s&&s.bySwiperTouchMove||M()}const y=()=>{if(e.destroyed||!e.autoplay.running)return;e.autoplay.paused?f=!0:f&&(p=u,f=!1);const t=e.autoplay.paused?u:m+p-(new Date).getTime();e.autoplay.timeLeft=t,i("autoplayTimeLeft",t,t/c),o=requestAnimationFrame(()=>{y()})},S=()=>{let t=n().delay;const s=(()=>{let t;const s=!!e.params.virtual?.enabled;if(t=e.virtual&&s?e.slides.find(e=>e.classList.contains("swiper-slide-active")):e.slides[e.activeIndex],!t)return;const i=t.getAttribute("data-swiper-autoplay");return null!=i?parseInt(i,10):void 0})();return"number"==typeof s&&!Number.isNaN(s)&&s>0&&(t=s),t},T=t=>{if(e.destroyed||!e.autoplay.running)return 0;void 0!==o&&cancelAnimationFrame(o),y();let s=t;void 0===s&&(s=S(),c=s,p=s),u=s;const r=e.params.speed,a=()=>{if(!e||e.destroyed)return;const t=n();t.reverseDirection?!e.isBeginning||e.params.loop||e.params.rewind?(e.slidePrev(r,!0,!0),i("autoplay")):t.stopOnLastSlide||(e.slideTo(e.slides.length-1,r,!0,!0),i("autoplay")):!e.isEnd||e.params.loop||e.params.rewind?(e.slideNext(r,!0,!0),i("autoplay")):t.stopOnLastSlide||(e.slideTo(0,r,!0,!0),i("autoplay")),e.params.cssMode&&(m=(new Date).getTime(),requestAnimationFrame(()=>{T()}))};return s>0?(void 0!==l&&clearTimeout(l),l=setTimeout(()=>{a()},s)):requestAnimationFrame(()=>{a()}),s},E=()=>(m=(new Date).getTime(),e.autoplay.running=!0,T(),i("autoplayStart"),!0),x=()=>(e.autoplay.running=!1,void 0!==l&&clearTimeout(l),void 0!==o&&cancelAnimationFrame(o),i("autoplayStop"),!0),C=(t,s)=>{if(e.destroyed||!e.autoplay.running)return;void 0!==l&&clearTimeout(l),t||(v=!0);const r=()=>{i("autoplayPause"),n().waitForTransition?e.wrapperEl.addEventListener("transitionend",b):M()};if(e.autoplay.paused=!0,s)return void r();const a=u||n().delay;u=a-((new Date).getTime()-m),e.isEnd&&u<0&&!e.params.loop||(u<0&&(u=0),r())},M=()=>{e.isEnd&&u<0&&!e.params.loop||e.destroyed||!e.autoplay.running||(m=(new Date).getTime(),v?(v=!1,T(u)):T(),e.autoplay.paused=!1,i("autoplayResume"))},P=()=>{!e.destroyed&&e.autoplay.running&&("hidden"===document.visibilityState&&(v=!0,C(!0)),"visible"===document.visibilityState&&M())},L=t=>{"mouse"===t.pointerType&&(v=!0,w=!0,e.animating||e.autoplay.paused||C(!0))},k=t=>{"mouse"===t.pointerType&&(w=!1,e.autoplay.paused&&M())};s("init",()=>{n().enabled&&(n().pauseOnMouseEnter&&(e.el.addEventListener("pointerenter",L),e.el.addEventListener("pointerleave",k)),document.addEventListener("visibilitychange",P),E())}),s("destroy",()=>{e.el&&"string"!=typeof e.el&&(e.el.removeEventListener("pointerenter",L),e.el.removeEventListener("pointerleave",k)),document.removeEventListener("visibilitychange",P),e.autoplay.running&&x()}),s("_freeModeStaticRelease",()=>{(g||v)&&M()}),s("_freeModeNoMomentumRelease",()=>{n().disableOnInteraction?x():C(!0,!0)}),s("beforeTransitionStart",(t,s,i)=>{!e.destroyed&&e.autoplay.running&&(i||!n().disableOnInteraction?C(!0,!0):x())}),s("sliderFirstMove",()=>{!e.destroyed&&e.autoplay.running&&(n().disableOnInteraction?x():(h=!0,g=!1,v=!1,d=setTimeout(()=>{v=!0,g=!0,C(!0)},200)))}),s("touchEnd",()=>{if(!e.destroyed&&e.autoplay.running&&h){if(void 0!==d&&clearTimeout(d),void 0!==l&&clearTimeout(l),n().disableOnInteraction)return g=!1,void(h=!1);g&&e.params.cssMode&&M(),g=!1,h=!1}}),s("slideChange",()=>{!e.destroyed&&e.autoplay.running&&e.autoplay.paused&&(u=S(),c=S())}),Object.assign(e.autoplay,{start:E,stop:x,pause:C,resume:M})},le=()=>{function e(e){const t=getComputedStyle(document.documentElement).getPropertyValue(`--breakpoint-${e}`).trim();return parseInt(t,10)}function t(t){const s=Array.from(t.querySelectorAll(".cmp-carousel"))[0];if(s){const i=t.querySelectorAll(".cmp-carousel__indicators")[0],r=t.querySelectorAll(".cmp-carousel__action--next")[0],n=t.querySelectorAll(".cmp-carousel__action--previous")[0],a=JSON.parse(s.getAttribute("data-autoplay")),l=parseInt(s.getAttribute("data-autoplay-delay")),o=JSON.parse(s.getAttribute("data-auto-pause-disabled"));
192let d=parseFloat(s.getAttribute("data-slides-per-view")),c=parseInt(s.getAttribute("data-space-between"));const p=JSON.parse(s.getAttribute("data-loop")),u=t.closest("[data-navigation-mode='snap']");let m,f;const h=t.querySelectorAll(".swiper-slide").length;m=!!a&&{delay:l,pauseOnMouseEnter:!o,disableOnInteraction:!1};const g=document.querySelector(".related-article-carousel");if(g?.contains(t)){const e=Math.max(document.documentElement.clientWidth||0,window.innerWidth||0);e<=1184&&e>670?(d=2.1,f=1):e<=670?(d=1.1,f=1):(d=3,f=3),c=6}u&&(d=1,f=1);const v=document.querySelector(".testimonial-card");if(v&&v.closest(".carousel")){const t=Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),s=e("xl"),i=e("lg"),r=e("sm");t>=s?(d=h<6?3:5.2,f=1):t<s&&t>i?(d=h<5?1:3.2,f=1):t<=i&&t>r?(d=2.2,f=1):(d=1.1,f=1)}const w={navigationNext:function(e){console.debug("Next button clicked on carousel"),b("next")},navigationPrev:function(e){console.debug("Previous button clicked on carousel"),b("prev")}},b=(e="next")=>{const s=t.closest(".tabs-parent"),i=s.querySelectorAll(".d-lg-none [data-bs-toggle='tab'"),r=s.querySelector(".d-lg-none .active[data-bs-toggle='tab'"),n=Array.from(i).indexOf(r),a="next"===e?n+1:n-1,l=a>i.length?0:a<0?i.length-1:a;i[l]?.click(),console.log("Navigating to tab index: "+l)},y=new K(s,{modules:[se,ne,ae],slidesPerView:d||1,spaceBetween:0===c?0:c||30,slidesPerGroup:f||1,pagination:{el:i,type:"bullets",clickable:!0},navigation:{nextEl:r,prevEl:n},autoplay:m,loop:!!p,on:u?w:{}});console.debug(y)}}const s=Array.from(document.getElementsByClassName("carousels"));s.length>0&&s.forEach(e=>{t(e);const s=document.querySelector(".related-article-carousel");s?.contains(e)&&window.addEventListener("resize",()=>{t(e)})})};!function(){if("loading"!==document.readyState){document.querySelector(".carousels")&&le()}else document.addEventListener("DOMContentLoaded",()=>{document.querySelector(".carousels")&&le()})}()}(); 193if (!Element.prototype.matches) { 194 Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector; 195} 196 197// eslint-disable-next-line valid-jsdoc 198/** 199 * Element.closest() 200 * https://developer.mozilla.org/enUS/docs/Web/API/Element/closest#Polyfill 201 */ 202if (!Element.prototype.closest) { 203 Element.prototype.closest = function(s) { 204 "use strict"; 205 var el = this; 206 if (!document.documentElement.contains(el)) { 207 return null; 208 } 209 do { 210 if (el.matches(s)) { 211 return el; 212 } 213 el = el.parentElement || el.parentNode; 214 } while (el !== null && el.nodeType === 1); 215 return null; 216 }; 217} 218 219 220 221(function() { 222 "use strict"; 223 224 var NS = "cmp"; 225 var IS = "tabs"; 226 227 var keyCodes = { 228 END: 35, 229 HOME: 36, 230 ARROW_LEFT: 37, 231 ARROW_UP: 38, 232 ARROW_RIGHT: 39, 233 ARROW_DOWN: 40 234 }; 235 236 var selectors = { 237 self: "[data-" + NS + '-is="nrgtabs"]', 238 active: { 239 tab: "active", 240 tabpanel: "active" 241 } 242 }; 243 244 245 /** 246 * Tabs 247 * 248 * @class Tabs 249 * @classdesc An interactive Tabs component for navigating a list of tabs 250 * @param {TabsConfig} config The Tabs configuration 251 */ 252 function Tabs(config) { 253 var that = this; 254 255 if (config && config.element ) { 256 init(config); 257 } 258 259 /** 260 * Initializes the Tabs 261 * 262 * @private 263 * @param {TabsConfig} config The Tabs configuration 264 */ 265 function init(config) { 266 that._config = config; 267 268 // prevents multiple initialization 269 config.element.removeAttribute("data-" + NS + "-is"); 270 271 cacheElements(config.element); 272 273 that._active = getActiveIndex(that._elements["tab"]); 274 275 if (that._elements.tabpanel) { 276 refreshActive(); 277 } 278 279 280 if (window.Granite && window.Granite.author && window.Granite.author.MessageChannel) { 281 /* 282 * Editor message handling: 283 * - subscribe to "cmp.panelcontainer" message requests sent by the editor frame
284 * - check that the message data panel container type is correct and that the id (path) matches this specific Tabs component 285 * - if so, route the "navigate" operation to enact a navigation of the Tabs based on index data 286 */ 287 CQ.CoreComponents.MESSAGE_CHANNEL = CQ.CoreComponents.MESSAGE_CHANNEL || new window.Granite.author.MessageChannel("cqauthor", window); 288 CQ.CoreComponents.MESSAGE_CHANNEL.subscribeRequestMessage("cmp.panelcontainer", function(message) { 289 if (message.data && message.data.type === "cmp-tabs" && message.data.id === that._elements.self.dataset["cmpPanelcontainerId"]) { 290 if (message.data.operation === "navigate") { 291 navigate(message.data.index); 292 } 293 } 294 }); 295 } 296 } 297 298 /** 299 * Returns the index of the active tab, if no tab is active returns 0 300 * 301 * @param {Array} tabs Tab elements 302 * @returns {Number} Index of the active tab, 0 if none is active 303 */ 304 function getActiveIndex(tabs) { 305 if (tabs) { 306 for (var i = 0; i < tabs.length; i++) { 307 if (tabs[i].classList.contains(selectors.active.tab)) { 308 return i; 309 } 310 } 311 } 312 return 0; 313 } 314 315 /** 316 * Caches the Tabs elements as defined via the {@code data-tabs-hook="ELEMENT_NAME"} markup API 317 * 318 * @private 319 * @param {HTMLElement} wrapper The Tabs wrapper element 320 */ 321 function cacheElements(wrapper) { 322 that._elements = {}; 323 that._elements.self = wrapper; 324 var hooks = that._elements.self.querySelectorAll("[data-" + NS + "-hook-" + IS + "]"); 325 326 for (var i = 0; i < hooks.length; i++) { 327 var hook = hooks[i]; 328 if (hook.closest("." + NS + "-" + IS) === that._elements.self) { // only process own tab elements 329 var capitalized = IS; 330 capitalized = capitalized.charAt(0).toUpperCase() + capitalized.slice(1); 331 var key = hook.dataset[NS + "Hook" + capitalized]; 332 if (that._elements[key]) { 333 if (!Array.isArray(that._elements[key])) { 334 var tmp = that._elements[key]; 335 that._elements[key] = [tmp]; 336 } 337 that._elements[key].push(hook); 338 } else { 339 that._elements[key] = hook; 340 } 341 } 342 } 343 } 344 345 346 /** 347 * Refreshes the tab markup based on the current {@code Tabs#_active} index 348 * 349 * @private 350 */ 351 function refreshActive() { 352 var tabpanels = that._elements["tabpanel"]; 353 var tabs = that._elements["tab"]; 354 355 if (tabpanels) { 356 if (Array.isArray(tabpanels)) { 357 for (var i = 0; i < tabpanels.length; i++) { 358 if (i === parseInt(that._active)) { 359 360 tabpanels[i].classList.add("active"); 361 tabpanels[i].classList.add("show"); 362 tabpanels[i].removeAttribute("aria-hidden"); 363 364 tabs[i].classList.add("active"); 365 tabs[i].setAttribute("aria-selected", true); 366 tabs[i].setAttribute("tabindex", "0"); 367 } else { 368 tabpanels[i].classList.remove("active"); 369 tabpanels[i].classList.remove("remove"); 370 tabpanels[i].setAttribute("aria-hidden", true); 371 372 tabs[i].classList.remove("active"); 373 tabs[i].setAttribute("aria-selected", false); 374 tabs[i].setAttribute("tabindex", "-1"); 375 } 376 } 377 } else { 378 // only one tab 379 tabpanels.classList.classList.add("active"); 380 tabpanels.classList.classList.add("show"); 381 tabs.classList.add("active"); 382 } 383 } 384 } 385 386 387 /** 388 * Navigates to the tab at the provided index 389 * 390 * @private 391 * @param {Number} index The index of the tab to navigate to 392 */ 393 function navigate(index) { 394 that._active = index; 395 refreshActive(); 396 } 397 398 } 399 400 401 /**
402 * Reads options data from the Tabs wrapper element, defined via {@code data-cmp-*} data attributes 403 * 404 * @private 405 * @param {HTMLElement} element The Tabs element to read options data from 406 * @returns {Object} The options read from the component data attributes 407 */ 408 function readData(element) { 409 var data = element.dataset; 410 var options = []; 411 var capitalized = IS; 412 capitalized = capitalized.charAt(0).toUpperCase() + capitalized.slice(1); 413 var reserved = ["is", "hook" + capitalized]; 414 415 for (var key in data) { 416 if (Object.prototype.hasOwnProperty.call(data, key)) { 417 var value = data[key]; 418 419 if (key.indexOf(NS) === 0) { 420 key = key.slice(NS.length); 421 key = key.charAt(0).toLowerCase() + key.substring(1); 422 423 if (reserved.indexOf(key) === -1) { 424 options[key] = value; 425 } 426 } 427 } 428 } 429 430 return options; 431 } 432 433 434 /** 435 * Document ready handler and DOM mutation observers. Initializes Tabs components as necessary. 436 * 437 * @private 438 */ 439 function onDocumentReady() { 440 441 var elements = document.querySelectorAll(selectors.self); 442 for (var i = 0; i < elements.length; i++) { 443 new Tabs({ element: elements[i], options: readData(elements[i]) }); 444 } 445 446 var MutationObserver = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver; 447 var body = document.querySelector("body"); 448 var observer = new MutationObserver(function(mutations) { 449 mutations.forEach(function(mutation) { 450 // needed for IE 451 var nodesArray = [].slice.call(mutation.addedNodes); 452 if (nodesArray.length > 0) { 453 nodesArray.forEach(function(addedNode) { 454 if (addedNode.querySelectorAll) { 455 var elementsArray = [].slice.call(addedNode.querySelectorAll(selectors.self)); 456 elementsArray.forEach(function(element) { 457 new Tabs({ element: element, options: readData(element) }); 458 }); 459 } 460 }); 461 } 462 }); 463 }); 464 465 observer.observe(body, { 466 subtree: true, 467 childList: true, 468 characterData: true 469 }); 470 } 471 472 if (document.readyState !== "loading") { 473 onDocumentReady(); 474 } else { 475 document.addEventListener("DOMContentLoaded", onDocumentReady); 476 } 477 478}()); 479
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.