@hsfx/attr 2.0.21 → 2.0.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/assets/hsfxanimationsB0vls1Xd.js +2 -0
- package/dist/assets/hsfxanimationsB0vls1Xd.js.br +0 -0
- package/dist/assets/hsfxanimationsB0vls1Xd.js.gz +0 -0
- package/dist/assets/{hsfxcounterCHBYPnnN.js → hsfxcounterCQpLWFg_.js} +1 -1
- package/dist/assets/hsfxcounterCQpLWFg_.js.br +0 -0
- package/dist/assets/hsfxcounterCQpLWFg_.js.gz +0 -0
- package/dist/assets/hsfxdefaultmzleUy4_.js +1 -0
- package/dist/assets/hsfxdefaultmzleUy4_.js.br +0 -0
- package/dist/assets/hsfxdefaultmzleUy4_.js.gz +0 -0
- package/dist/assets/{hsfxmarqueeBZW0uarL.js → hsfxmarqueeCe-3CBbc.js} +1 -1
- package/dist/assets/hsfxmarqueeCe-3CBbc.js.br +0 -0
- package/dist/assets/hsfxmarqueeCe-3CBbc.js.gz +0 -0
- package/dist/assets/{hsfxnormalizeRBQuLzMp.js → hsfxnormalizeWk_QT7bQ.js} +1 -1
- package/dist/assets/hsfxnormalizeWk_QT7bQ.js.br +0 -0
- package/dist/assets/hsfxnormalizeWk_QT7bQ.js.gz +0 -0
- package/dist/assets/{hsfxutilsBiyhgSbR.js → hsfxutilsCm-S93Uw.js} +1 -1
- package/dist/assets/hsfxutilsCm-S93Uw.js.br +0 -0
- package/dist/assets/hsfxutilsCm-S93Uw.js.gz +0 -0
- package/dist/main.js +2 -2
- package/dist/main.js.br +0 -0
- package/dist/main.js.gz +0 -0
- package/package.json +1 -1
- package/dist/assets/hsfxanimationspsjD9e2k.js +0 -2
- package/dist/assets/hsfxanimationspsjD9e2k.js.br +0 -0
- package/dist/assets/hsfxanimationspsjD9e2k.js.gz +0 -0
- package/dist/assets/hsfxcounterCHBYPnnN.js.br +0 -0
- package/dist/assets/hsfxcounterCHBYPnnN.js.gz +0 -0
- package/dist/assets/hsfxdefaultB8v7rms6.js +0 -1
- package/dist/assets/hsfxdefaultB8v7rms6.js.br +0 -0
- package/dist/assets/hsfxdefaultB8v7rms6.js.gz +0 -0
- package/dist/assets/hsfxmarqueeBZW0uarL.js.br +0 -0
- package/dist/assets/hsfxmarqueeBZW0uarL.js.gz +0 -0
- package/dist/assets/hsfxnormalizeRBQuLzMp.js.br +0 -0
- package/dist/assets/hsfxnormalizeRBQuLzMp.js.gz +0 -0
- package/dist/assets/hsfxutilsBiyhgSbR.js.br +0 -0
- package/dist/assets/hsfxutilsBiyhgSbR.js.gz +0 -0
package/README.md
CHANGED
|
@@ -156,10 +156,10 @@ window.hsfx.modal.onClose(() => {
|
|
|
156
156
|
|
|
157
157
|
## jsDelivr Cache Purge
|
|
158
158
|
|
|
159
|
-
After publishing to npm,
|
|
159
|
+
After publishing to npm, go to https://www.jsdelivr.com/tools/purge and paste:
|
|
160
160
|
|
|
161
161
|
```
|
|
162
|
-
https://
|
|
162
|
+
https://cdn.jsdelivr.net/npm/@hsfx/attr@2
|
|
163
163
|
```
|
|
164
164
|
|
|
165
165
|
---
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./hsfxcounterCQpLWFg_.js","./hsfxutilsCm-S93Uw.js","./hsfxmarqueeCe-3CBbc.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as e}from"../main.js";import{m as t}from"./hsfxutilsCm-S93Uw.js";const r=[{name:"counter",selector:'[data-hs-anim="counter"]',import:()=>e(()=>import("./hsfxcounterCQpLWFg_.js"),__vite__mapDeps([0,1]),import.meta.url)},{name:"marquee",selector:'[data-hs-marquee="wrapper"]',import:()=>e(()=>import("./hsfxmarqueeCe-3CBbc.js"),__vite__mapDeps([2,1]),import.meta.url)}],a=(()=>{const e=r.filter(e=>document.querySelector(e.selector)).map(e=>e.import().catch(t=>(console.error(`[animations] Failed to preload ${e.name}:`,t),null)));return Promise.allSettled(e)})();async function o(){await a;const e=t(r),{loaded:o}=await e.scan();return{result:`animations initialized (${o.length} active)`,rescan:e.scan,destroy:e.destroy}}export{o as init};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,d as t,j as r}from"./
|
|
1
|
+
import{p as e,d as t,j as r}from"./hsfxutilsCm-S93Uw.js";const n='[data-hs-anim="counter"]';async function o(){if(e())return{result:"counter skipped - prefers-reduced-motion enabled"};const o=t("counter");if(!o)return{result:"counter skipped - GSAP not loaded"};const{gsap:i,ScrollTrigger:s}=o;if(!s)return r("counter",["ScrollTrigger"],"error"),{result:"counter skipped - ScrollTrigger not loaded"};i.registerPlugin(s);const l=Array.from(document.querySelectorAll(n)),u={timelines:[],scrollTriggers:[]};return l.forEach(e=>{const t=e,r=t.textContent?.trim()||"",n=function(e){const t=e.replace(/,/g,"").match(/([^\d.]*)(\d*\.?\d+)(.*)/);return t?{prefix:t[1]||"",number:parseFloat(t[2]),suffix:t[3]||""}:{prefix:"",number:0,suffix:""}}(r),o=(n.number.toString().split(".")[1]||"").length,l=r.includes(",");t.setAttribute("aria-live","polite"),t.setAttribute("aria-atomic","true");const c={value:0},a=i.timeline({paused:!0});a.to(c,{value:n.number,duration:3,ease:"power4.out",onUpdate:function(){const e=c.value;let r=o>0?e.toFixed(o):Math.round(e).toString();l&&(r=r.replace(/\B(?=(\d{3})+(?!\d))/g,",")),t.textContent=`${n.prefix}${r}${n.suffix}`},onComplete:function(){t.textContent=r}}),u.timelines.push(a);const g=s.create({trigger:e,start:"top bottom",once:!0,onEnter:()=>{a.play()}});u.scrollTriggers.push(g)}),{result:`counter initialized (${l.length} instances)`,destroy:()=>{u.timelines.forEach(e=>{e&&e.kill()}),u.scrollTriggers.forEach(e=>{e&&e.kill()}),u.timelines.length=0,u.scrollTriggers.length=0}}}export{o as init};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,c as t,i as n,w as r,d as o,p as s,q as a,b as i,g as l,s as c,e as u,o as d,f as p,h as f,j as m,k as h,l as g}from"./hsfxutilsCm-S93Uw.js";const v=t._global,y=t.default.transition,b=v.apiName;async function w(){const t=e(y,"wrapper");if(!t)return{result:"transition skipped - no wrapper found",destroy:()=>{}};const o="data-hs-transition-initialized";if(t.hasAttribute(o))return{result:"transition already initialized",destroy:()=>{}};t.setAttribute(o,"true");const s=window[b]?.settings?.isSPA||!1,a=new Map;let i=null,l=null;const c=(e,n=null,r=t)=>{const o=y.attributes.elements.trigger.primary.match(/data-[^=]+/)?.[0],s=y.attributes.elements.namespace.primary.match(/data-[^=]+/)?.[0];if(!o||!s)return null;const a=r.querySelectorAll(`[${o}="${e}"]`);if(a.length>0){if(n){const t=r.querySelector(`[${s}="${n}"]`);if(t){const n=t.querySelector(`[${o}="${e}"]`);if(n)return n}}const t=Array.from(a).find(e=>{let t=e.parentElement;for(;t&&t!==r;){if(t.hasAttribute(s))return!1;t=t.parentElement}return!0});if(t)return t}const i="exit"===e?y.attributes.elements.exitTrigger.primary.match(/data-[^=]+/)?.[0]:y.attributes.elements.enterTrigger.primary.match(/data-[^=]+/)?.[0];if(!i)return null;const l=r.querySelectorAll(`[${i}]`);if(l.length>0){if(n){const e=r.querySelector(`[${s}="${n}"]`);if(e){const t=e.querySelector(`[${i}]`);if(t)return t}}const e=Array.from(l).find(e=>{let t=e.parentElement;for(;t&&t!==r;){if(t.hasAttribute(s))return!1;t=t.parentElement}return!0});if(e)return e}return null},u=(e=null)=>new Promise(n=>{const r=c("exit",e);if(!r)return void n();const o=(()=>{const e=y.attributes.elements.exitTime.primary.match(/data-[^=]+/)?.[0];if(!e)return 0;const n=t.getAttribute(e);return n?1e3*parseFloat(n):0})();r.click(),setTimeout(()=>n(),o)}),d=(e=null)=>new Promise(n=>{const r=c("enter",e);if(!r)return void n();const o=!sessionStorage.getItem("transition-loaded"),s=(()=>{const e=y.attributes.elements.firstDelay.primary.match(/data-[^=]+/)?.[0];if(!e)return 0;const n=t.getAttribute(e);return n?1e3*parseFloat(n):0})(),a=()=>{r.click(),o&&sessionStorage.setItem("transition-loaded","true"),n()};o&&s>0?i=setTimeout(a,s):a()}),p=e=>{u(e?.detail?.namespace||null)},f=e=>{d(e?.detail?.namespace||null)};if(a.set(`${b}:transition-exit`,p),a.set(`${b}:transition-enter`,f),window.addEventListener(`${b}:transition-exit`,p),window.addEventListener(`${b}:transition-enter`,f),!s){const e=e=>{const t=e.target.closest("a[href]");if(t&&t.hostname===window.location.hostname&&t.getAttribute("href")&&-1===t.getAttribute("href").indexOf("#")&&"_blank"!==t.getAttribute("target")){e.preventDefault();const n=t.href;u().then(()=>{window.location.href=n})}};a.set("click",e),document.addEventListener("click",e);const t=e=>{e.persisted&&window.location.reload()};a.set("pageshow",t),window.addEventListener("pageshow",t)}const m=()=>{t&&(t.style.display="none")};if(a.set("resize",m),window.addEventListener("resize",m),!s){const e=async()=>{n()&&(l=setTimeout(()=>{t.classList.add(v.classes.loading)},2e3),await r(),l&&(clearTimeout(l),l=null),t.classList.remove(v.classes.loading),t.classList.add(v.classes.loaded)),d()};a.set(`${b}:dom-ready`,e),window.addEventListener(`${b}:dom-ready`,e,{once:!0})}return{result:"transition initialized",destroy:()=>{i&&clearTimeout(i),l&&clearTimeout(l),a.forEach((e,t)=>{if("click"===t||"pageshow"===t||"resize"===t){("click"===t?document:window).removeEventListener(t,e)}else window.removeEventListener(t,e)}),a.clear(),t.removeAttribute(o)}}}async function E(t){let n=null,r=null;function a(n){const r=n.target.closest('a[href^="#"]');if(!r)return;const a=r.getAttribute("href");if(!a||"#"===a)return;const i=a.substring(1),l=document.getElementById(i);if(l){n.preventDefault(),history.replaceState&&history.replaceState(null,null,`#${l.id}`);!function(e,t=0){if(!e)return;const n=o("smooth-scroll",!1);if(s()||!n){const n=e.getBoundingClientRect().top+window.scrollY-t;return window.scrollTo(0,n),e.setAttribute("tabindex","-1"),void e.focus({preventScroll:!0})}n.gsap.to(window,{duration:1,scrollTo:{y:e,offsetY:t},ease:"power2.out",onComplete:function(){e.setAttribute("tabindex","-1"),e.focus({preventScroll:!0})}})}(l,function(){const n=e(t,"offset-proxy");if(console.log("[smooth-scroll] Proxy element:",n),n&&n instanceof HTMLElement){const e=getComputedStyle(n).top,t=parseFloat(e)||0;return console.log("[smooth-scroll] Computed top:",e,"-> offset:",t),t}return console.log("[smooth-scroll] No proxy element found, using offset: 0"),0}())}}return"undefined"!=typeof $&&$(document).off("click.wf-scroll"),document.documentElement.style.scrollBehavior="auto",document.body.style.scrollBehavior="auto",n=a,r=e=>{"Enter"!==e.key&&" "!==e.key||a(e)},document.addEventListener("click",n),document.addEventListener("keydown",r),{result:"autoInit-smooth-scroll initialized",destroy:()=>{n&&(document.removeEventListener("click",n),n=null),r&&(document.removeEventListener("keydown",r),r=null),document.documentElement.style.scrollBehavior="",document.body.style.scrollBehavior=""}}}let A=null;function x(t){A=t;const n={observers:[],handlers:[]};return function(t,n){const r=a(A,"wrapper"),o=[];r.forEach(r=>{const s=i(l.clickable,"button"),a=r.querySelector(s),d=e(A,"list",r);if(!a||!d)return void console.warn("[dropdown] Dropdown wrapper missing required elements:",r);const p=r.getAttribute("data-hs-nav-dropdown-type")||"hover",f=r.querySelector('[data-hs-height="element"]'),m=f?f.parentElement:null,h=a.textContent?.trim()||"dropdown",g=h.toLowerCase().replace(/[^a-z0-9\s]/g,"").replace(/\s+/g,"-").replace(/^-+|-+$/g,"").substring(0,50);const v=`navbar-dropdown-${g}-toggle`,y=`navbar-dropdown-${g}-list`;a.id=v,a.setAttribute("aria-haspopup","menu"),a.setAttribute("aria-expanded","false"),a.setAttribute("aria-controls",y),d.id=y,d.setAttribute("role","menu"),d.inert=!0;const b=Array.from(d.querySelectorAll(s));b.forEach((e,t)=>{if(e.setAttribute("role","menuitem"),e.setAttribute("tabindex","-1"),0===t){const t=a.textContent?.trim()||"menu";e.getAttribute("aria-label")||e.setAttribute("aria-label",`${e.textContent?.trim()}, ${t} submenu`)}});let w=-1;function E(){return r.classList.contains(l.classes.active)}function x(){const e=E();"true"===a.getAttribute("aria-expanded")&&!e&&d.contains(document.activeElement)&&a.focus(),a.setAttribute("aria-expanded",e?"true":"false"),d.inert=!e,b.forEach(t=>{t.setAttribute("tabindex",e?"0":"-1")}),e||(w=-1),u(m,e,{duration:"hover"===p?200:300,ease:"power2.inOut"})}c(m,E()),x();const k=new MutationObserver(()=>{x()});if(k.observe(r,{attributes:!0,attributeFilter:["class"]}),t(k),"hover"===p){o.push(r);const e=()=>{r.classList.add("is-active")},t=()=>{r.classList.remove("is-active")};n(r,"mouseenter",e),n(r,"mouseleave",t);n(a,"keydown",e=>{"ArrowDown"===e.key?(e.preventDefault(),E()||(r.classList.add(l.classes.active),b.length>0&&setTimeout(()=>{w=0,b[0].focus()},100))):" "===e.key||"Enter"===e.key?(e.preventDefault(),E()?r.classList.remove(l.classes.active):(r.classList.add(l.classes.active),b.length>0&&setTimeout(()=>{w=0,b[0].focus()},100))):"ArrowUp"===e.key?(e.preventDefault(),E()||(r.classList.add(l.classes.active),b.length>0&&setTimeout(()=>{w=b.length-1,b[w].focus()},100))):"Escape"===e.key&&(e.preventDefault(),E()&&r.classList.remove(l.classes.active))});const s=e=>{E()&&r.contains(document.activeElement)&&("ArrowDown"===e.key?(e.preventDefault(),w<b.length-1&&(w++,b[w].focus())):"ArrowUp"===e.key?(e.preventDefault(),0===w?(r.classList.remove(l.classes.active),a.focus(),w=-1):w>0?(w--,b[w].focus()):(a.focus(),w=-1)):"Escape"===e.key&&(e.preventDefault(),r.classList.remove("is-active")))};n(r,"keydown",s)}else if("click"===p){n(a,"click",e=>{e.preventDefault(),r.classList.toggle(l.classes.active)});n(a,"keydown",e=>{" "===e.key||"Enter"===e.key?(e.preventDefault(),r.classList.toggle(l.classes.active)):"Escape"===e.key&&(e.preventDefault(),E()&&r.classList.remove(l.classes.active))})}});const s=e=>{o.forEach(t=>{t.classList.contains("is-active")&&!t.contains(e.target)&&t.classList.remove("is-active")})};o.length>0&&n(document.body,"focusin",s)}(e=>{n.observers.push(e)},(e,t,r,o)=>{e.addEventListener(t,r,o),n.handlers.push({element:e,event:t,handler:r,options:o})}),{result:"dropdown initialized",destroy:()=>{n.observers.forEach(e=>e.disconnect()),n.observers.length=0,n.handlers.forEach(({element:e,event:t,handler:n,options:r})=>{e.removeEventListener(t,n,r)}),n.handlers.length=0,A=null}}}function k(t,n){const r={observers:[],handlers:[],state:{focusTrapHandler:null}},o=e=>{r.observers.push(e)};return function(o,s){const f=a(t,"button"),m=e(t,"wrapper");if(!f.length||!m)return;const h=n?e(n,"wrapper"):null,g=`menu-${Date.now()}`;m.id=g,m.setAttribute("role","dialog"),m.setAttribute("aria-modal","true"),m.inert=!0;const v=m.querySelector('[data-hs-height="element"]'),y=v?v.parentElement:null;f.forEach(a=>{a.setAttribute("aria-expanded","false"),a.setAttribute("aria-controls",g),a.setAttribute("aria-label","Open navigation menu");let v=null,b=!1;function w(){return a.classList.contains(l.classes.active)}function E(){const t=w(),r="true"===a.getAttribute("aria-expanded");t&&!r?(d(),m.classList.add(l.classes.active),m.inert=!1,h&&h.classList.add("hs-menu-open"),f.forEach(e=>{e.setAttribute("aria-expanded","true"),e.setAttribute("aria-label","Close navigation menu")}),y&&u(y,!0,{duration:300,ease:"power2.inOut"}),v=function(){const t=n?e(n,"wrapper"):document.querySelector('[data-hs-nav="wrapper"]');if(!t)return;const r=e=>{if("Tab"===e.key){const n=i(l.clickable,"button"),r=Array.from(t.querySelectorAll(n)),o=t.querySelectorAll('input, select, textarea, [tabindex]:not([tabindex="-1"])'),s=[...r,...Array.from(o)],a=s[0],c=s[s.length-1];e.shiftKey?document.activeElement===a&&(e.preventDefault(),c.focus()):document.activeElement===c&&(e.preventDefault(),a.focus())}};return document.addEventListener("keydown",r),r}(),b&&(setTimeout(()=>{const e=i(l.clickable,"button"),t=Array.from(m.querySelectorAll(e));if("last"===b){const e=t[t.length-1];e&&e.focus()}else{const e=t[0];e&&e.focus()}},100),b=!1)):!t&&r&&(m.contains(document.activeElement)&&a.focus(),p(),m.classList.remove(l.classes.active),m.inert=!0,h&&h.classList.remove("hs-menu-open"),f.forEach(e=>{e.setAttribute("aria-expanded","false"),e.setAttribute("aria-label","Open navigation menu")}),y&&u(y,!1,{duration:300,ease:"power2.inOut"}),function(e){e&&document.removeEventListener("keydown",e)}(v),v=null)}y&&c(y,w()),E();const A=new MutationObserver(()=>{E()});A.observe(a,{attributes:!0,attributeFilter:["class"]}),o(A);s(a,"click",function(e){e.preventDefault(),a.classList.toggle("is-active")});s(a,"keydown",function(e){" "===e.key||"Enter"===e.key?(e.preventDefault(),b=!0,a.classList.toggle(l.classes.active)):"ArrowDown"===e.key?(e.preventDefault(),w()||(b=!0,a.classList.add(l.classes.active))):"ArrowUp"===e.key?(e.preventDefault(),w()||(b="last",a.classList.add(l.classes.active))):"Escape"===e.key&&(e.preventDefault(),w()&&a.classList.remove(l.classes.active))}),r.state.focusTrapHandler=v;const x=t.attributes?.properties?.anchorClose;if(x&&"true"===m.getAttribute(x)){s(m,"click",e=>{e.target.closest('a[href^="#"]')&&w()&&a.classList.remove(l.classes.active)})}})}(o,(e,t,n,o)=>{e.addEventListener(t,n,o),r.handlers.push({element:e,event:t,handler:n,options:o})}),function(n){const r=e(t,"wrapper");if(!r)return;let o=null;function s(){const e=window.getComputedStyle(r).getPropertyValue(f.state).trim();if(o===l.cssVars.state.values.active&&e===l.cssVars.state.values.inactive){const e=document.querySelector('[data-hs-nav-menu="button"]');e&&"true"===e.getAttribute("aria-expanded")&&e&&e.classList.remove("is-active")}o=e}const a=new ResizeObserver(s);a.observe(r),n(a),s()}(o),{result:"menu initialized",destroy:()=>{r.state.focusTrapHandler&&(document.removeEventListener("keydown",r.state.focusTrapHandler),r.state.focusTrapHandler=null),r.observers.forEach(e=>e.disconnect()),r.observers.length=0,r.handlers.forEach(({element:e,event:t,handler:n,options:r})=>{e.removeEventListener(t,n,r)}),r.handlers.length=0,document.body.classList.remove("u-overflow-hidden")}}}function L(t,n){const r={handlers:[]},o=(e,t,n,o)=>{e.addEventListener(t,n,o),r.handlers.push({element:e,event:t,handler:n,options:o})};return o(document,"keydown",t=>{if("ArrowLeft"!==t.key&&"ArrowRight"!==t.key)return;const r=n?e(n.menu,"wrapper"):document.querySelector('[data-hs-nav-menu="wrapper"]');if(r&&r.contains(document.activeElement))return;const o=n?e(n,"wrapper"):document.querySelector('[data-hs-nav="wrapper"]');if(!o||!o.contains(document.activeElement))return;const s=o.querySelector(`.${l.classes.active}[data-hs-nav-dropdown]`);if(s&&s.contains(document.activeElement))return;t.preventDefault();const a=i(l.clickable,"button"),c=Array.from(o.querySelectorAll(a)),u=Array.from(c).filter(e=>{if("-1"===e.getAttribute("tabindex"))return!1;if(e.closest('[role="menu"]'))return!1;const t=n?n.menu.attributes.elements.wrapper.primary.split("=")[0]:"data-hs-nav-menu";if(e.closest(`[${t}="wrapper"]`))return!1;const r=n?n.attributes.elements["skip-link"].primary.split("=")[0]:"data-hs-nav";if(e.closest(`[${r}="skip-link"]`))return!1;const s=window.getComputedStyle(e),a=e;if("none"===s.display||"hidden"===s.visibility||"0"===s.opacity||0===a.offsetWidth||0===a.offsetHeight)return!1;let i=e.parentElement;for(;i&&i!==o;){const e=window.getComputedStyle(i),t=i;if("none"===e.display||"hidden"===e.visibility||0===t.offsetWidth||0===t.offsetHeight)return!1;i=i.parentElement}return!0}),d=u.indexOf(document.activeElement);-1!==d&&("ArrowRight"===t.key?d<u.length-1&&u[d+1].focus():d>0&&u[d-1].focus())}),function(t){const r=n?e(n.menu,"wrapper"):document.querySelector('[data-hs-nav-menu="wrapper"]');if(!r)return;let o=-1;t(r,"keydown",t=>{const s=function(){const e=i(l.clickable,"button"),t=Array.from(r.querySelectorAll(e));return Array.from(t).filter(e=>{let t=e;for(;t&&t!==r;){if(t.inert)return!1;t=t.parentElement}return!0})}();if(0===s.length)return;const a=document.activeElement;if(o=s.indexOf(a),"ArrowDown"===t.key)t.preventDefault(),o<s.length-1&&(o+=1,s[o].focus());else if("ArrowUp"===t.key)t.preventDefault(),o>0&&(o-=1,s[o].focus());else if("ArrowRight"===t.key){if(t.preventDefault(),a&&"BUTTON"===a.tagName&&a.hasAttribute("aria-controls")){return void("true"===a.getAttribute("aria-expanded")||a.click())}}else if("ArrowLeft"===t.key){if(t.preventDefault(),a&&"BUTTON"===a.tagName&&a.hasAttribute("aria-controls")){return void("true"===a.getAttribute("aria-expanded")&&a.click())}}else if("Home"===t.key)t.preventDefault(),o=0,s[0].focus();else if("End"===t.key)t.preventDefault(),o=s.length-1,s[s.length-1].focus();else if(" "===t.key&&a&&"A"===a.tagName)t.preventDefault();else if("Escape"===t.key){const t=n?e(n.menu,"button"):document.querySelector('[data-hs-nav-menu="button"]');t&&(t.click(),t.focus())}})}(o),{result:"arrow-navigation initialized",destroy:()=>{r.handlers.forEach(({element:e,event:t,handler:n,options:r})=>{e.removeEventListener(t,n,r)}),r.handlers.length=0}}}function S(t){const n={observers:[],handlers:[]};return function(n,r){const o=a(t,"wrapper");if(0===o.length)return 0;let s=0;o.forEach((o,a)=>{const d=e(t,"toggle",o),p=e(t,"content",o);if(!d||!p)return;s++;const f=`[${l.attributes.height}="${l.attributes.heightValue}"]`,m=o.querySelector(f),h=m?m.parentElement:p,g=`hs-accordion-btn-${a}`,v=`hs-accordion-content-${a}`,y=o.getAttribute(t.attributes.properties.open),b=o.getAttribute(t.attributes.properties.closed),w=y&&b;let E=[];if(w){const e=i(t,"state");E=Array.from(d.querySelectorAll(e))}function A(){return o.classList.contains(l.classes.active)}function x(){const e=A();if("true"===d.getAttribute("aria-expanded")&&!e&&p.contains(document.activeElement)){d.focus()}d.setAttribute("aria-expanded",e?"true":"false");var t;p.inert=!e,w&&E.length>0&&(t=e?y:b,w&&E.forEach(e=>{e.textContent=t})),u(h,e,{duration:300,ease:"power2.inOut"})}d.setAttribute("id",g),p.setAttribute("id",v),p.setAttribute("role","region"),p.setAttribute("aria-labelledby",g),d.setAttribute("aria-controls",v);const k=o.getAttribute(t.attributes.properties.default);k&&"open"===k.toLowerCase()&&o.classList.add(l.classes.active),c(h,A()),x();r(d,"click",e=>{e.preventDefault(),o.classList.toggle(l.classes.active)});const L=new MutationObserver(()=>{x()});L.observe(o,{attributes:!0,attributeFilter:["class"]}),n(L)})}(e=>n.observers.push(e),(e,t,r,o)=>{e.addEventListener(t,r,o),n.handlers.push({element:e,event:t,handler:r,options:o})}),{result:"accordion initialized",destroy:()=>{n.observers.forEach(e=>e.disconnect()),n.observers.length=0,n.handlers.forEach(({element:e,event:t,handler:n,options:r})=>{e.removeEventListener(t,n,r)}),n.handlers.length=0}}}function C(e){const n=t._global.classes.active,r={observers:[],handlers:[],scrollTimeout:null,headings:[]},o=a(e,"content"),s=a(e,"list");return o.forEach(e=>{const t=s[0];if(!t||0===t.children.length)return;const o=t.children[0].cloneNode(!0),a=o.querySelector("a");a&&a.classList.remove(n),t.innerHTML="";const i=e.querySelectorAll("h2");i.forEach(e=>{const t=e.textContent.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/(^-|-$)/g,"");e.id=t,r.headings.push(e)}),i.forEach((e,n)=>{const r=o.cloneNode(!0),s=r.querySelector("a"),a=e.id;s.href=`#${a}`;const i=document.createElement("strong");i.textContent=`${n+1}. `,s.innerHTML="",s.appendChild(i),s.appendChild(document.createTextNode(e.textContent)),t.appendChild(r)});const l=t.querySelectorAll("a");let c=null;const u=()=>{const e=.75*window.innerHeight;let t=null;for(let n=i.length-1;n>=0;n--){if(i[n].getBoundingClientRect().top<=e){t=i[n].id;break}}if(t!==c&&(c=t,l.forEach(e=>e.classList.remove(n)),c)){const e=Array.from(l).find(e=>e.getAttribute("href")===`#${c}`);e&&e.classList.add(n)}},d=new IntersectionObserver(()=>{u()},{rootMargin:"-75% 0px -25% 0px",threshold:0});i.forEach(e=>d.observe(e)),(e=>{r.observers.push(e)})(d);var p,f,m;p=window,f="scroll",m=()=>{r.scrollTimeout&&clearTimeout(r.scrollTimeout),r.scrollTimeout=setTimeout(u,50)},p.addEventListener(f,m),r.handlers.push({element:p,event:f,handler:m})}),{result:"toc initialized",destroy:()=>{r.headings.forEach(e=>{e.removeAttribute("id")}),r.headings.length=0,r.observers.forEach(e=>e.disconnect()),r.observers.length=0,r.handlers.forEach(({element:e,event:t,handler:n})=>{e.removeEventListener(t,n)}),r.handlers.length=0,r.scrollTimeout&&(clearTimeout(r.scrollTimeout),r.scrollTimeout=null)}}}async function T(){const n=t.default.toc,r={destroyFunctions:[]},l=i(n,"list");if(document.querySelector(l))try{const e=await C(n);e?.destroy&&r.destroyFunctions.push(e.destroy)}catch(u){console.error("[toc] Error initializing heading-links:",u)}const c=i(n["progress-bar"],"wrapper");if(document.querySelector(c))try{const t=await async function(t){const{progressConfig:n,tocConfig:r}=t;if(s())return{result:"progress-bar skipped - prefers-reduced-motion enabled"};const i=o("progress-bar");if(!i)return{result:"progress-bar skipped - GSAP not loaded"};const{gsap:l,ScrollTrigger:c}=i;if(!c)return console.warn("[progress-bar] GSAP ScrollTrigger plugin not loaded"),{result:"progress-bar skipped - ScrollTrigger not loaded"};l.registerPlugin(c);const u={scrollTriggers:[]},d=e(r,"content");if(!d)return{result:"progress-bar skipped - no content element found"};const p=a(n,"wrapper");return 0===p.length?{result:"progress-bar skipped - no wrapper elements found"}:(p.forEach(e=>{l.set(e,{display:"block"}),Array.from(e.querySelectorAll("*")).filter(e=>{const t=n.attributes.elements.element.primary,[r,o]=t.split("="),s=o?.replace(/['"]/g,"");return e.getAttribute(r)===s}).forEach(e=>{l.set(e,{width:"0%"}),l.to(e,{width:"100%",ease:"none",scrollTrigger:{trigger:d,start:"top bottom",end:"bottom 75%",scrub:!0,invalidateOnRefresh:!0,onUpdate:e=>{u.scrollTriggers.includes(e)||u.scrollTriggers.push(e)}}})})}),{result:`progress-bar initialized (${p.length} instances)`,destroy:()=>{u.scrollTriggers.forEach(e=>{e&&"object"==typeof e&&"kill"in e&&"function"==typeof e.kill&&e.kill()}),u.scrollTriggers.length=0}})}({progressConfig:n["progress-bar"],tocConfig:n});t?.destroy&&r.destroyFunctions.push(t.destroy)}catch(u){console.error("[toc] Error initializing progress-bar:",u)}return{result:`toc initialized (${r.destroyFunctions.length} modules active)`,destroy:()=>{r.destroyFunctions.forEach(e=>{try{e()}catch(u){console.error("[toc] Error during cleanup:",u)}}),r.destroyFunctions.length=0}}}function P(t){const n={observers:[],handlers:[],liveRegions:[]};try{a(t,"wrapper").forEach(r=>{try{const o=function(t,n,r){const o=e(r,"list",t);if(!o)return console.warn("[pagination] Missing required element: list"),null;const s=o.parentElement;if(!s)return null;const a={controls:e(r,"controls",t),counter:e(r,"counter",t),dotsWrap:e(r,"dots",t),nextButton:null,prevButton:null};if(!a.controls)return{initialized:!1};const c=e(r,"next",t),u=e(r,"previous",t),d=i(l.clickable,"button"),p=c?.querySelector(d)||c,m=u?.querySelector(d)||u;if(!p||!m)return console.warn("[pagination] Missing required navigation buttons"),null;a.nextButton=p,a.prevButton=m,a.nextButton.setAttribute("aria-label","Go to next page"),a.prevButton.setAttribute("aria-label","Go to previous page"),a.counter&&(a.counter.setAttribute("aria-live","polite"),a.counter.setAttribute("aria-label","Current page"));const h=parseInt(a.controls?.getAttribute(r.attributes.properties.show)||"6")||6,g=parseInt(a.controls?.getAttribute(r.attributes.properties.showMobile)||String(h))||h,v=()=>getComputedStyle(o).getPropertyValue(f.state).trim()===l.cssVars.state.values.active,y=Array.from(o.children),b=y.length;if(!b)return null;const w={totalPages:1,currentIndex:1,currentPage:1,isAnimating:!1,itemsPerPage:h,dotTemplates:{active:null,inactive:null}};let E=[];const A=document.createElement("div");A.className="sr-only",A.setAttribute("aria-live","assertive"),A.setAttribute("aria-atomic","true"),A.style.cssText="position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden;",t.appendChild(A),n.liveRegions.push(A);const x=()=>{a.counter&&(a.counter.textContent=`${w.currentPage} / ${w.totalPages}`)},k=()=>{A.textContent=`Page ${w.currentPage} of ${w.totalPages}`,setTimeout(()=>A.textContent="",1e3)},L=()=>{E.forEach((e,t)=>{const n=e;t===w.currentIndex?n.removeAttribute("inert"):n.setAttribute("inert","")})},S=()=>{const e=E[w.currentIndex];e&&void 0!==e.offsetHeight&&(s.style.height=e.offsetHeight+"px")},C=()=>{if(!a.dotsWrap)return;const e=Array.from(a.dotsWrap.children);if(!e.length)return;const t=e.find(e=>e.classList.contains("is-active")),r=e.find(e=>!e.classList.contains("is-active"));w.dotTemplates.active=t?t.cloneNode(!0):e[0].cloneNode(!0),w.dotTemplates.inactive=r?r.cloneNode(!0):e[0].cloneNode(!0),a.dotsWrap.innerHTML="",a.dotsWrap.setAttribute("role","group"),a.dotsWrap.setAttribute("aria-label","Page navigation");for(let o=1;o<=w.totalPages;o++){const e=(1===o?w.dotTemplates.active:w.dotTemplates.inactive).cloneNode(!0);e.setAttribute("role","button"),e.setAttribute("tabindex","0"),e.setAttribute("aria-label",`Go to page ${o}`),e.setAttribute("aria-current",1===o?"page":"false"),e.setAttribute("data-page",String(o)),1===o?e.classList.add("is-active"):e.classList.remove("is-active");const t=()=>D(o);e.addEventListener("click",t),n.handlers.push({element:e,event:"click",handler:t});const r=e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),D(o))};e.addEventListener("keydown",r),n.handlers.push({element:e,event:"keydown",handler:r}),a.dotsWrap.appendChild(e)}},T=()=>{if(!a.dotsWrap)return;Array.from(a.dotsWrap.children).forEach((e,t)=>{t+1===w.currentPage?(e.classList.add("is-active"),e.setAttribute("aria-current","page")):(e.classList.remove("is-active"),e.setAttribute("aria-current","false"))})},P=(e=null)=>{const t=v();if(w.itemsPerPage=e||(t?g:h),w.totalPages=Math.ceil(b/w.itemsPerPage),a.dotsWrap&&(n.handlers=n.handlers.filter(({element:e})=>!a.dotsWrap.contains(e))),Array.from(s.children).forEach(e=>{e!==o&&s.removeChild(e)}),o.innerHTML="",y.forEach(e=>o.appendChild(e)),w.totalPages<=1)return a.controls&&(a.controls.contains(document.activeElement)&&document.activeElement&&document.activeElement.blur(),a.controls.style.display="none",a.controls.setAttribute("aria-hidden","true")),a.dotsWrap&&(a.dotsWrap.style.display="none",a.dotsWrap.setAttribute("aria-hidden","true")),Object.assign(w,{totalPages:1,currentIndex:1,currentPage:1,isAnimating:!1}),s.style.cssText=`transform: translateX(0%); height: ${o.offsetHeight}px;`,E=[o],1;a.controls&&(a.controls.style.display="",a.controls.removeAttribute("aria-hidden")),a.dotsWrap&&(a.dotsWrap.style.display="",a.dotsWrap.removeAttribute("aria-hidden"));const r=Array.from({length:w.totalPages},(e,t)=>{const n=o.cloneNode(!1),r=t*w.itemsPerPage,s=Math.min(r+w.itemsPerPage,b);return y.slice(r,s).forEach(e=>n.appendChild(e.cloneNode(!0))),n});return s.insertBefore(r[r.length-1].cloneNode(!0),o),r.slice(1).forEach(e=>s.appendChild(e)),s.appendChild(r[0].cloneNode(!0)),o.innerHTML="",Array.from(r[0].children).forEach(e=>o.appendChild(e)),Object.assign(w,{currentIndex:1,currentPage:1,isAnimating:!1}),E=Array.from(s.children),s.style.transition="none",s.style.transform="translateX(-100%)",s.offsetHeight,s.style.transition="",x(),S(),L(),C(),w.totalPages};let q=v();const $=new ResizeObserver(()=>{if(w.isAnimating)return;const e=v();e!==q?(q=e,P()):S()});$.observe(s),n.observers.push($),P();const D=e=>{if(w.isAnimating||w.totalPages<=1||e===w.currentPage)return;w.isAnimating=!0,w.currentIndex=e,w.currentPage=e,x(),k(),S(),T(),v()&&a.controls&&setTimeout(()=>{const e=80,t=a.controls.getBoundingClientRect().bottom+window.pageYOffset-window.innerHeight+e;window.scrollTo({top:t,behavior:"smooth"})},50),s.style.transform=`translateX(${100*-w.currentIndex}%)`;let t=null;const n=()=>{clearTimeout(t),s.removeEventListener("transitionend",n),x(),k(),S(),L(),T(),w.isAnimating=!1};t=setTimeout(n,1e3),s.addEventListener("transitionend",n)},I=e=>{if(w.isAnimating||w.totalPages<=1)return;w.isAnimating=!0,w.currentIndex+=e,w.currentPage=w.currentIndex>w.totalPages?1:w.currentIndex<1?w.totalPages:w.currentIndex,x(),k(),S(),T(),v()&&a.controls&&setTimeout(()=>{const e=80,t=a.controls.getBoundingClientRect().bottom+window.pageYOffset-window.innerHeight+e;window.scrollTo({top:t,behavior:"smooth"})},50),s.style.transform=`translateX(${100*-w.currentIndex}%)`;let t=null;const n=()=>{clearTimeout(t),s.removeEventListener("transitionend",n),w.currentIndex>w.totalPages?(w.currentIndex=1,w.currentPage=1,s.style.transition="none",s.style.transform="translateX(-100%)",s.offsetHeight,s.style.transition=""):w.currentIndex<1&&(w.currentIndex=w.totalPages,w.currentPage=w.totalPages,s.style.transition="none",s.style.transform=`translateX(${100*-w.totalPages}%)`,s.offsetHeight,s.style.transition=""),x(),k(),S(),L(),T(),w.isAnimating=!1};t=setTimeout(n,1e3),s.addEventListener("transitionend",n)},M=()=>I(1),F=()=>I(-1);return a.nextButton.addEventListener("click",M),a.prevButton.addEventListener("click",F),n.handlers.push({element:a.nextButton,event:"click",handler:M},{element:a.prevButton,event:"click",handler:F}),{initialized:!0}}(r,n,t);o||console.warn("[pagination] Failed to initialize container",r)}catch(o){console.error("[pagination] Error initializing container:",o,r)}})}catch(r){console.error("[pagination] Critical error during initialization:",r)}return{result:"pagination initialized",destroy:()=>{try{n.liveRegions.forEach(e=>{try{e.parentNode&&e.parentNode.removeChild(e)}catch(r){console.error("[pagination] Error removing live region:",r)}}),n.liveRegions.length=0,n.observers.forEach(e=>{try{e.disconnect()}catch(r){console.error("[pagination] Error disconnecting observer:",r)}}),n.observers.length=0,n.handlers.forEach(({element:e,event:t,handler:n})=>{try{e.removeEventListener(t,n)}catch(r){console.error("[pagination] Error removing event listener:",r)}}),n.handlers.length=0}catch(r){console.error("[pagination] Critical error during cleanup:",r)}}}}async function q(t){const n=o("comparison");if(!n)return{result:"comparison skipped - GSAP not loaded"};const{gsap:r,Draggable:s}=n;m("comparison",["Draggable"],"error");const c=a(t,"wrapper"),u={draggables:[],handlers:[],observers:[]},d=i(t,"template-name"),p=i(t,"template-description"),h=i(t,"template-before-image"),g=i(t,"template-after-image");function v(e,t){e.style.setProperty(f.clip,`${t}%`)}function y(n,r){const o=n.templateItems[r];if(!o)return;const s=o.querySelector(d);n.nameElement&&s&&(n.nameElement.textContent=s.textContent);const a=o.querySelector(p);n.descElement&&a&&(n.descElement.textContent=a.textContent);const i=o.querySelector(h);n.beforeImage&&i&&(n.beforeImage.src=i.src,n.beforeImage.alt=i.alt||"");const c=o.querySelector(g);n.afterImage&&c&&(n.afterImage.src=c.src,n.afterImage.alt=c.alt||"",b(n)),n.currentIndex=r,function(n,r){const o=e(t,"pagination",n);if(!o)return;const s=l.classes.active;Array.from(o.children).forEach((e,t)=>{t===r?e.classList.add(s):e.classList.remove(s)})}(n.wrapper,r)}function b(e){const t=e.slider,n=e.wrapper;switch(e.mode){case"before":n.style.setProperty(f.clip,"100%"),t.style.display="none";break;case"after":n.style.setProperty(f.clip,"0%"),t.style.display="none";break;case"split":v(n,e.sliderPosition),t.style.display="flex"}}function w(e,t){const n=e.currentIndex+t,r=e.templateItems.length-1;let o;o=n>r?0:n<0?r:n,y(e,o)}return c.forEach(n=>{const o=e(t,"template-list",n);if(!o)return void console.warn("[comparison] No template list found in wrapper");const a=i(t,"template-item"),c=Array.from(o.querySelectorAll(a));if(0===c.length)return void console.warn("[comparison] No template items found");n.setAttribute("aria-live","polite"),n.setAttribute("aria-label","Before and after image comparison");const d=e(t,"image-wrapper",n),p=e(t,"slider",n),f=e(t,"before-image",n),m=e(t,"after-image",n),h=e(t,"name",n),g=e(t,"description",n);if(!d||!p||!m){const e=[];return d||e.push('image-wrapper (data-hs-comparison="image-wrapper")'),p||e.push('slider (data-hs-comparison="slider")'),m||e.push('after-image (data-hs-comparison-image="after")'),void console.warn(`[comparison] Missing required elements: ${e.join(", ")}`)}const E={wrapper:n,templateItems:c,currentIndex:0,mode:"split",sliderPosition:50,slider:p,beforeImage:f?.querySelector("img"),afterImage:m?.querySelector("img"),nameElement:h,descElement:g,draggable:null};if(y(E,0),v(n,50),s){const e=s.create(p,{type:"x",bounds:d,onDrag:function(){const e=d.getBoundingClientRect(),t=p.getBoundingClientRect().left-e.left,r=Math.max(0,Math.min(100,t/e.width*100));v(n,r),E.sliderPosition=r}});u.draggables.push(e),E.draggable=e[0];const t=new ResizeObserver(()=>{E.draggable&&E.draggable.update()});t.observe(d),u.observers=u.observers||[],u.observers.push(t);[E.beforeImage,E.afterImage].filter(Boolean).forEach(e=>{e instanceof HTMLImageElement&&!e.complete&&e.addEventListener("load",()=>{E.draggable&&E.draggable.update()},{once:!0})});const o=e=>{if("split"!==E.mode)return;const t=d.getBoundingClientRect(),o=e.clientX-t.left,s=Math.max(0,Math.min(100,o/t.width*100)),a=o-t.width/2;E.draggable&&(r.set(p,{x:a}),E.draggable.update()),v(n,s),E.sliderPosition=s};d.addEventListener("click",o),u.handlers.push({element:d,event:"click",handler:o})}n.querySelectorAll(`[${t.attributes.properties.modeType}]`).forEach(e=>{const n=e.getAttribute(t.attributes.properties.modeType),r=i(l.clickable,"button"),o=e.querySelector(r)||e;n===E.mode&&e.classList.add(l.classes.active);const s=e=>{e.preventDefault(),function(e,n){const r=e.wrapper.querySelectorAll(`[${t.attributes.properties.modeType}]`),o=l.classes.active;r.forEach(e=>{e.getAttribute(t.attributes.properties.modeType)===n?e.classList.add(o):e.classList.remove(o)}),e.mode=n,b(e)}(E,n)};o.addEventListener("click",s),u.handlers.push({element:o,event:"click",handler:s})}),function(e,n){const r=n.querySelector(`[${t.attributes.properties.navType}="previous"]`),o=n.querySelector(`[${t.attributes.properties.navType}="next"]`);if(r){const t=i(l.clickable,"button"),n=r.querySelector(t)||r;n.setAttribute("aria-label","Previous image");const o=t=>{t.preventDefault(),w(e,-1)};n.addEventListener("click",o),u.handlers.push({element:n,event:"click",handler:o})}if(o){const t=i(l.clickable,"button"),n=o.querySelector(t)||o;n.setAttribute("aria-label","Next image");const r=t=>{t.preventDefault(),w(e,1)};n.addEventListener("click",r),u.handlers.push({element:n,event:"click",handler:r})}}(E,n);const A=e(t,"pagination",n);A&&c.length>1&&function(e,t){const n=t.children[0];if(!n)return;const r=l.classes.active;t.innerHTML="",e.templateItems.forEach((o,s)=>{const a=n.cloneNode(!0);a.classList.remove(r),0===s&&a.classList.add(r);const i=()=>{y(e,s)};a.addEventListener("click",i),u.handlers.push({element:a,event:"click",handler:i}),t.appendChild(a)})}(E,A),function(e){const t=t=>{"ArrowLeft"===t.key||"ArrowUp"===t.key?(t.preventDefault(),w(e,-1)):"ArrowRight"!==t.key&&"ArrowDown"!==t.key||(t.preventDefault(),w(e,1))};e.wrapper.addEventListener("keydown",t),e.wrapper.setAttribute("tabindex","0"),u.handlers.push({element:e.wrapper,event:"keydown",handler:t})}(E)}),{result:`comparison initialized (${c.length} instances)`,destroy:()=>{u.draggables.forEach(e=>{e&&e[0]&&e[0].kill&&e[0].kill()}),u.handlers.forEach(({element:e,event:t,handler:n})=>{e.removeEventListener(t,n)}),u.observers.forEach(e=>e.disconnect()),u.draggables.length=0,u.handlers.length=0,u.observers.length=0}}}function D(t){const n={handlers:[],timers:[],animationFrames:[],observers:[]},r=(e,t,r,o)=>{e.addEventListener(t,r,o),n.handlers.push({element:e,event:t,handler:r,options:o})},c=e=>n.animationFrames.push(e),u=()=>`${l.cssVars.prefix}${t.cssVars?.progress||"progress"}`,d=(e,t)=>e.style.setProperty(u(),String(t));function p(a){const p=e(t,"links",a),f=e(t,"list",a);if(!p||!f)return;const m=Array.from(p.children),h=Array.from(f.children),g=i(l.clickable,"button"),v=m.map(e=>e.querySelector(g)).filter(e=>null!==e);if(0===v.length)return;const y=a.getAttribute(t.attributes.properties?.autoplay||"data-hs-tab-autoplay"),b=a.getAttribute(t.attributes.properties?.duration||"data-hs-tab-duration"),w=a.getAttribute(t.attributes.properties?.hover||"data-hs-tab-hover"),E=a.getAttribute(t.attributes.properties?.animation||"data-hs-tab-animation"),A=a.getAttribute(t.attributes.properties?.animationDuration||"data-hs-tab-animation-duration"),x="true"===y,k=b?parseFloat(b):6,L="pause"===w,S=E,C=A?parseFloat(A):.3,T=`${"hs-tab"}-${Math.random().toString(36).substring(2,9)}`;h.forEach((e,t)=>{const n=e.id||`${T}-panel-${t}`,r=`${T}-tab-${t}`;e.id=n,v[t]&&(v[t].id=r,v[t].setAttribute("aria-controls",n))});let P=0,q=null,$=null,D=null,I=!1,M=!1,F=!1;async function N(e,t=!1){if(M)return;if(e<0||e>=h.length)return;if(e===P&&!t)return;M=!0;const n=P;if(P=e,v.forEach((t,n)=>{t.setAttribute("aria-selected",n===e?"true":"false"),t.setAttribute("tabindex",n===e?"0":"-1")}),m.forEach((t,n)=>{t.classList.toggle(l.classes.active,n===e)}),x)if(I){const t=m[n]?parseFloat(getComputedStyle(m[n]).getPropertyValue(u())||"0"):0;m.forEach((n,r)=>d(n,r===e?t:0))}else H();const r=h[n],a=h[e];"fade"!==S||t?"clip"!==S||t?h.forEach((t,n)=>{n===e?("fade"===S||"clip"===S?(t.style.position="",t.style.display="block","fade"===S?t.style.opacity="1":t.style.clipPath=""):t.style.display="block",t.inert=!1,t.style.pointerEvents="",t.classList.add(l.classes.active)):("fade"===S||"clip"===S?(t.style.display="none","fade"===S?t.style.opacity="0":t.style.clipPath=""):t.style.display="none",t.inert=!0,t.style.pointerEvents="none",t.classList.remove(l.classes.active))}):await async function(e,t,n){s()&&(n=0);const r=o("tabs",!1);if(!r)return e.style.display="none",e.style.position="",e.style.clipPath="",e.inert=!0,e.style.pointerEvents="none",t.style.display="block",t.style.position="",t.style.clipPath="",t.inert=!1,void(t.style.pointerEvents="");const{gsap:a}=r;return new Promise(r=>{const o=a.timeline({onComplete:()=>{e.style.display="none",e.style.position="",e.style.clipPath="",e.inert=!0,e.style.pointerEvents="none",t.style.position="",t.style.clipPath="",t.inert=!1,t.style.pointerEvents="",r()},defaults:{duration:n,ease:"power1.inOut"}});o.set(e,{position:"absolute",top:0,left:0,width:"100%",clipPath:"inset(0% 0% 0% 0%)"}),o.set(t,{display:"block",position:"relative",clipPath:"inset(0% 0% 100% 0%)"}),o.to(e,{clipPath:"inset(100% 0% 0% 0%)"}),o.to(t,{clipPath:"inset(0% 0% 0% 0%)"},"<40%")})}(r,a,C):await async function(e,t,n){s()&&(n=0);const r=o("tabs",!1);if(!r)return e.style.display="none",e.style.position="",e.inert=!0,e.style.pointerEvents="none",t.style.display="block",t.style.position="",t.inert=!1,void(t.style.pointerEvents="");const{gsap:a}=r;return new Promise(r=>{const o=a.timeline({onComplete:()=>{e.style.display="none",e.style.position="",e.style.opacity="",e.inert=!0,e.style.pointerEvents="none",t.style.position="",t.style.opacity="",t.inert=!1,t.style.pointerEvents="",r()},defaults:{duration:n,ease:"power1.out"}});o.set(e,{position:"absolute",top:0,left:0,width:"100%"}),o.set(t,{display:"block",position:"relative",opacity:0}),o.to(e,{opacity:0}),o.to(t,{opacity:1},"<50%")})}(r,a,C),M=!1}function O(e){if(x){D||(D=e);const t=Math.min((e-D)/(1e3*k),1);m.forEach((e,n)=>d(e,n===P?t:0)),t<1&&!I&&($=requestAnimationFrame(O),$&&c($))}else m.forEach((e,t)=>d(e,t===P?1:0))}function H(){if(z(),!x)return O(0);if(I||!F)return;const e=m[P]?parseFloat(getComputedStyle(m[P]).getPropertyValue(u())||"0"):0,t=e*k*1e3,r=Math.max(0,1e3*k-t);D=null;const o=e,s=performance.now(),a=e=>{const t=Math.min(o+(e-s)/(1e3*k),1);m.forEach((e,n)=>d(e,n===P?t:0)),t<1&&!I&&($=requestAnimationFrame(a),$&&c($))};var i;$=requestAnimationFrame(a),$&&c($),q=window.setTimeout(()=>N((P+1)%h.length),r),i=q,n.timers.push(i)}function z(){null!==q&&(clearTimeout(q),q=null),null!==$&&(cancelAnimationFrame($),$=null),D=null}const B=()=>{I=!0,z()},W=()=>{I=!1,H()};v.forEach((e,t)=>{r(e,"click",e=>{e.preventDefault(),N(t)})});const R=e=>{const t=v.indexOf(e.target);if(-1===t)return;let n=t;switch(e.key){case"ArrowLeft":case"ArrowUp":e.preventDefault(),n=0===t?v.length-1:t-1;break;case"ArrowRight":case"ArrowDown":e.preventDefault(),n=t===v.length-1?0:t+1;break;case"Home":e.preventDefault(),n=0;break;case"End":e.preventDefault(),n=v.length-1;break;default:return}M||(N(n),v[n].focus())};v.forEach(e=>r(e,"keydown",R)),L&&x&&(r(a,"mouseenter",B),r(a,"mouseleave",W));let V=!1;r(document,"keydown",()=>V=!0),r(document,"mousedown",()=>V=!1),x&&(r(a,"focusin",()=>{V&&(B(),Y())}),r(a,"focusout",()=>{V&&I&&(W(),Y())}));const X=`[${t.attributes.properties?.controls||"data-hs-tab-controls"}]`,U=a.querySelectorAll(X);let j=null,G=null;U.forEach(e=>{const n=e.getAttribute(t.attributes.properties?.controls||"data-hs-tab-controls"),o=e.querySelector(g);if(o)if("previous"===n)o.setAttribute("aria-label","Previous tab"),r(o,"click",e=>{e.preventDefault(),N(0===P?h.length-1:P-1)});else if("next"===n)o.setAttribute("aria-label","Next tab"),r(o,"click",e=>{e.preventDefault(),N((P+1)%h.length)});else if("toggle"===n){if(!x)return void(e.style.display="none");j=e,G=o,G.setAttribute("aria-label",I?"Play":"Pause"),j.classList.toggle(l.classes.active,!I),r(o,"click",e=>{e.preventDefault(),I?W():B(),Y()})}});const Y=()=>{j&&G&&(j.classList.toggle(l.classes.active,!I),G.setAttribute("aria-label",I?"Play":"Pause"))};if(N(0,!0),x){const e=new IntersectionObserver(e=>{e.forEach(e=>{F=e.isIntersecting,e.isIntersecting&&!I?H():z()})},{threshold:.1});e.observe(a),K=e,n.observers.push(K)}var K}const f=a(t,"wrapper");return f.forEach(e=>{p(e)}),{result:`tabs initialized (${f.length} systems)`,destroy:()=>{n.timers.forEach(e=>clearTimeout(e)),n.timers.length=0,n.animationFrames.forEach(e=>cancelAnimationFrame(e)),n.animationFrames.length=0,n.observers.forEach(e=>e.disconnect()),n.observers.length=0,n.handlers.forEach(({element:e,event:t,handler:n,options:r})=>{e.removeEventListener(t,n,r)}),n.handlers.length=0}}}async function I(e){const t=l.classes.active,n={handlers:[],modals:[]},r=(e,t,r,o)=>{e.addEventListener(t,r,o),n.handlers.push({element:e,event:t,handler:r,options:o})},o=a(e,"wrapper");if(0===o.length)return{result:"modal: no modals found",destroy:()=>{}};o.forEach(e=>{const t=e.getAttribute("data-hs-modal-id");if(!t)return void console.warn("[modal] Wrapper missing data-hs-modal-id:",e);e.setAttribute("role","dialog"),e.setAttribute("aria-modal","true"),e.setAttribute("aria-hidden","true");const r=e.querySelector("h1, h2, h3, h4, h5, h6");r&&(r.id||(r.id=`modal-${t}-title`),e.setAttribute("aria-labelledby",r.id));const o=Array.from(e.querySelectorAll('[data-hs-modal="close"]'));o.forEach(e=>{e.setAttribute("aria-label","Close modal")});const s={wrapper:e,modalId:t,closeButtons:o,triggerButton:null,focusableElements:[]};n.modals.push(s)});const s=(e,r)=>{const o=n.modals.find(t=>t.modalId===e);if(!o)return void console.warn(`[modal] Modal with id "${e}" not found`);const{wrapper:s}=o;r&&(o.triggerButton=r),s.classList.add(t),s.setAttribute("aria-hidden","false"),d(),o.focusableElements=(e=>{const t=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(", ");return Array.from(e.querySelectorAll(t))})(s),o.closeButtons.length>0?o.closeButtons[0].focus():o.focusableElements.length>0&&o.focusableElements[0].focus()},i=e=>{const{wrapper:n,triggerButton:r}=e;c(n),n.classList.remove(t),n.setAttribute("aria-hidden","true"),p(),r&&(r.focus(),e.triggerButton=null),e.focusableElements=[]},c=e=>{e.querySelectorAll("video").forEach(e=>{e.pause(),e.currentTime=0});e.querySelectorAll("audio").forEach(e=>{e.pause(),e.currentTime=0});e.querySelectorAll("iframe").forEach(e=>{const t=e.src;e.src="",e.src=t})};document.querySelectorAll("[data-hs-modal-open]").forEach(e=>{const t=e.getAttribute("data-hs-modal-open");if(!t)return;e.setAttribute("aria-haspopup","dialog"),e.setAttribute("aria-controls",`modal-${t}`);r(e,"click",n=>{n.preventDefault(),s(t,e)})}),n.modals.forEach(e=>{e.closeButtons.forEach(t=>{r(t,"click",()=>{i(e)})});r(e.wrapper,"click",t=>{t.target===e.wrapper&&i(e)})});r(document,"keydown",e=>{if("Escape"===e.key){const e=n.modals.slice().reverse().find(e=>e.wrapper.classList.contains(t));e&&i(e)}});return r(document,"keydown",e=>{const r=n.modals.find(e=>e.wrapper.classList.contains(t));r&&((e,t)=>{if("Tab"!==e.key)return;const{focusableElements:n}=t;if(0===n.length)return;const r=n[0],o=n[n.length-1];e.shiftKey?document.activeElement===r&&(e.preventDefault(),o.focus()):document.activeElement===o&&(e.preventDefault(),r.focus())})(e,r)}),{result:`modal initialized (${n.modals.length} modals)`,destroy:()=>{n.handlers.forEach(({element:e,event:t,handler:n,options:r})=>{e.removeEventListener(t,n,r)}),n.handlers.length=0,n.modals.forEach(e=>{e.wrapper.classList.contains(t)&&(e.wrapper.classList.remove(t),e.wrapper.setAttribute("aria-hidden","true"),p())}),n.modals.length=0}}}function M(n){const r={handlers:[],domContentLoadedHandler:null},o=(e,t,n)=>{e.addEventListener(t,n),r.handlers.push({element:e,event:t,handler:n})};function s(){a(n,"wrapper").forEach(r=>{const s=r;s.dataset.hsFormRangeInit||(s.dataset.hsFormRangeInit="true",function(r,o){const s=r.querySelector("input[type='range']");if(!s)return void console.warn('[range] Missing <input type="range"> element in wrapper',r);const a=e(n,"output",r),i=()=>{const e=s.min?+s.min:0,o=s.max?+s.max:100,i=+s.value||e,l=(i-e)/(o-e);r.style.setProperty(`${t._global.cssVars.prefix}${n.cssVars?.progress||"progress"}`,String(l)),a&&(a.textContent=String(i))};o(s,"input",i),i()}(s,o))})}return"loading"===document.readyState?(r.domContentLoadedHandler=s,document.addEventListener("DOMContentLoaded",r.domContentLoadedHandler)):s(),{result:"range initialized",destroy:()=>{r.domContentLoadedHandler&&(document.removeEventListener("DOMContentLoaded",r.domContentLoadedHandler),r.domContentLoadedHandler=null),r.handlers.forEach(({element:e,event:t,handler:n})=>{e.removeEventListener(t,n)}),r.handlers.length=0;a(n,"wrapper").forEach(e=>{delete e.dataset.hsFormRangeInit})}}}const F=[{name:"Alabama",value:"AL"},{name:"Alaska",value:"AK"},{name:"Arizona",value:"AZ"},{name:"Arkansas",value:"AR"},{name:"California",value:"CA"},{name:"Colorado",value:"CO"},{name:"Connecticut",value:"CT"},{name:"Delaware",value:"DE"},{name:"Florida",value:"FL"},{name:"Georgia",value:"GA"},{name:"Hawaii",value:"HI"},{name:"Idaho",value:"ID"},{name:"Illinois",value:"IL"},{name:"Indiana",value:"IN"},{name:"Iowa",value:"IA"},{name:"Kansas",value:"KS"},{name:"Kentucky",value:"KY"},{name:"Louisiana",value:"LA"},{name:"Maine",value:"ME"},{name:"Maryland",value:"MD"},{name:"Massachusetts",value:"MA"},{name:"Michigan",value:"MI"},{name:"Minnesota",value:"MN"},{name:"Mississippi",value:"MS"},{name:"Missouri",value:"MO"},{name:"Montana",value:"MT"},{name:"Nebraska",value:"NE"},{name:"Nevada",value:"NV"},{name:"New Hampshire",value:"NH"},{name:"New Jersey",value:"NJ"},{name:"New Mexico",value:"NM"},{name:"New York",value:"NY"},{name:"North Carolina",value:"NC"},{name:"North Dakota",value:"ND"},{name:"Ohio",value:"OH"},{name:"Oklahoma",value:"OK"},{name:"Oregon",value:"OR"},{name:"Pennsylvania",value:"PA"},{name:"Rhode Island",value:"RI"},{name:"South Carolina",value:"SC"},{name:"South Dakota",value:"SD"},{name:"Tennessee",value:"TN"},{name:"Texas",value:"TX"},{name:"Utah",value:"UT"},{name:"Vermont",value:"VT"},{name:"Virginia",value:"VA"},{name:"Washington",value:"WA"},{name:"West Virginia",value:"WV"},{name:"Wisconsin",value:"WI"},{name:"Wyoming",value:"WY"}];function N(t){const n={observers:[],handlers:[],timeouts:[],domContentLoadedHandler:null},r=e=>n.observers.push(e),o=(e,t,r,o)=>{e.addEventListener(t,r,o),n.handlers.push({element:e,event:t,handler:r,options:o})},s=e=>n.timeouts.push(e);function i(){document.querySelectorAll("select > div").forEach(e=>{const t=e.parentElement;for(;e.firstChild;)t.appendChild(e.firstChild);e.remove()});a(t,"wrapper").forEach(a=>{!function(r,o,s,a){const i=r.querySelector("select");if(!i)return void console.warn("[select] Missing <select> element in custom select wrapper",r);i.setAttribute("aria-hidden","true"),i.setAttribute("tabindex","-1");const l=i.getAttribute("name")||"custom-select",f=e(t,"list",r),m=e(t,"button",r);if(!f||!m)return void console.warn("[select] Missing required elements (list or button) in custom select wrapper",r);function h(){i.disabled?(m.disabled=!0,m.setAttribute("aria-disabled","true")):(m.disabled=!1,m.removeAttribute("aria-disabled"))}h();const g=f.firstElementChild;if(!g)return void console.warn("[select] Missing option template in custom select list",r);const v=g.cloneNode(!0);g.remove();i.querySelectorAll("option").forEach((e,t)=>{const n=v.cloneNode(!0),r=n.querySelector("span");if(r&&(r.textContent=e.textContent),n.setAttribute("data-value",e.value),n.setAttribute("role","option"),n.setAttribute("id",`${l}-option-${t}`),n.setAttribute("tabindex","-1"),e.selected){n.setAttribute("aria-selected","true");const t=m.querySelector("span")||m;"SPAN"===t.tagName&&(t.textContent=e.textContent),e.value?m.classList.add("is-filled"):m.classList.remove("is-filled")}else n.setAttribute("aria-selected","false");f.appendChild(n)}),f.setAttribute("role","listbox"),f.setAttribute("id",`${l}-listbox`),f.setAttribute("tabindex","-1"),f.setAttribute("aria-hidden","true"),f.inert=!0,m.setAttribute("role","combobox"),m.setAttribute("aria-haspopup","listbox"),m.setAttribute("aria-controls",`${l}-listbox`),m.setAttribute("aria-expanded","false"),m.setAttribute("id",`${l}-button`);const y=r.querySelector("label")||document.querySelector(`label[for="${i.id}"]`);if(y){const e=y.id||`${l}-label`;y.id=e,i.id||(i.id=`${l}-select`),y.setAttribute("for",i.id),m.setAttribute("aria-labelledby",e)}const b=r.querySelector('[data-hs-height="element"]'),w=b||null;let E="",A=null;function x(){return r.classList.contains("is-active")}function k(){const e=x(),t="true"===m.getAttribute("aria-expanded");if(t&&!e&&f.contains(document.activeElement)&&m.focus(),m.setAttribute("aria-expanded",e?"true":"false"),f.setAttribute("aria-hidden",e?"false":"true"),f.inert=!e,e){f.querySelectorAll('[role="option"]').forEach(e=>{e.setAttribute("tabindex","0")}),t||d()}else{m.removeAttribute("aria-activedescendant");f.querySelectorAll('[role="option"]').forEach(e=>{e.setAttribute("tabindex","-1")}),t&&p()}w&&u(w,e,{duration:300,ease:"power2.inOut"})}w&&c(w,x());function L(e){const t=f.querySelectorAll('[role="option"]');e<0||e>=t.length||(t.forEach(e=>{e.classList.remove("focused"),e.setAttribute("tabindex","-1")}),t[e].classList.add("focused"),t[e].setAttribute("tabindex","0"),t[e].focus(),m.setAttribute("aria-activedescendant",t[e].id))}function S(e){if(1!==e.length)return!1;if(null!==A){clearTimeout(A);const e=n.timeouts.indexOf(A);e>-1&&n.timeouts.splice(e,1)}const t=Array.from(f.querySelectorAll('[role="option"]'));if(0===t.length)return!1;E+=e.toLowerCase();const o=t.findIndex(e=>e.classList.contains("focused"));if(1===E.length||E.split("").every(e=>e===E[0])){const e=E[0];let n=o+1;for(let o=0;o<t.length;o++){const s=(n+o)%t.length;if((t[s].querySelector("span")?.textContent||t[s].textContent).toLowerCase().startsWith(e))return L(s),x()||r.classList.add("is-active"),A=setTimeout(C,500),a(A),!0}}else{const e=t.findIndex(e=>(e.querySelector("span")?.textContent||e.textContent).toLowerCase().startsWith(E));if(-1!==e)return L(e),x()||r.classList.add("is-active"),A=setTimeout(C,500),a(A),!0}return A=setTimeout(C,500),a(A),!1}function C(){E="",A=null}function T(e){const t=e.getAttribute("data-value")||"",n=e.querySelector("span")?.textContent||e.textContent;i.value=t,i.dispatchEvent(new Event("change",{bubbles:!0}));const o=m.querySelector("span")||m;"SPAN"===o.tagName&&(o.textContent=n),t?m.classList.add("is-filled"):m.classList.remove("is-filled"),f.querySelectorAll('[role="option"]').forEach(e=>{e.setAttribute("aria-selected","false")}),e.setAttribute("aria-selected","true"),r.classList.remove("is-active")}k();const P=e=>{e.preventDefault(),r.classList.toggle("is-active")};o(m,"click",P);const q=e=>{switch(e.key){case"Enter":e.preventDefault();const t=m.closest("form");if(t){const e=t.querySelector('button[type="submit"], input[type="submit"]')||t.querySelector("button:not([type])");e&&e.click()}break;case" ":e.preventDefault(),r.classList.toggle("is-active");break;case"ArrowDown":e.preventDefault(),x()?L(0):(r.classList.add("is-active"),requestAnimationFrame(()=>{L(0)}));break;case"ArrowUp":if(e.preventDefault(),x()){L(f.querySelectorAll('[role="option"]').length-1)}else r.classList.add("is-active"),requestAnimationFrame(()=>{L(0)});break;case"Escape":x()&&(e.preventDefault(),r.classList.remove("is-active"));break;case"Home":e.preventDefault(),x()||r.classList.add("is-active"),L(0);break;case"End":e.preventDefault(),x()||r.classList.add("is-active");L(f.querySelectorAll('[role="option"]').length-1);break;default:S(e.key)&&e.preventDefault()}};o(m,"keydown",q);const $=e=>{const t=e.target.closest('[role="option"]');if(!t)return;const n=Array.from(f.querySelectorAll('[role="option"]')),o=n.indexOf(t);switch(e.key){case"ArrowDown":e.preventDefault(),o<n.length-1&&L(o+1);break;case"ArrowUp":e.preventDefault(),o>0&&L(o-1);break;case"Enter":e.preventDefault(),T(t);break;case"Escape":e.preventDefault(),r.classList.remove("is-active"),m.focus();break;case"Home":e.preventDefault(),L(0);break;case"End":e.preventDefault(),L(n.length-1);break;default:S(e.key)&&e.preventDefault()}};o(f,"keydown",$);o(f,"click",e=>{const t=e.target.closest('[role="option"]');t&&T(t)});const D=e=>{e.relatedTarget&&r.contains(e.relatedTarget)||!r.classList.contains("is-active")||r.classList.remove("is-active")};o(f,"focusout",D);const I=e=>{r.classList.contains("is-active")&&!r.contains(e.target)&&r.classList.remove("is-active")};o(document,"click",I);const M=new MutationObserver(()=>{k()});M.observe(r,{attributes:!0,attributeFilter:["class"]}),s(M);const F=new MutationObserver(()=>{h()});F.observe(i,{attributes:!0,attributeFilter:["disabled"]}),s(F);const N=()=>{const e=i.options[i.selectedIndex];if(e){const t=f.querySelectorAll('[role="option"]'),n=Array.from(t).find(t=>t.getAttribute("data-value")===e.value);if(n){const r=n.querySelector("span")?.textContent||n.textContent,o=m.querySelector("span")||m;"SPAN"===o.tagName&&(o.textContent=r),e.value?m.classList.add("is-filled"):m.classList.remove("is-filled"),t.forEach(e=>{e.setAttribute("aria-selected","false")}),n.setAttribute("aria-selected","true")}}};o(i,"change",N),o(i,"input",N);const O=i.closest("form");if(O){o(O,"reset",()=>{setTimeout(()=>{N()},0)})}}(a,o,r,s)})}return"loading"===document.readyState?(n.domContentLoadedHandler=i,document.addEventListener("DOMContentLoaded",n.domContentLoadedHandler)):i(),window.initCustomSelects=i,{result:"select initialized",destroy:()=>{n.domContentLoadedHandler&&(document.removeEventListener("DOMContentLoaded",n.domContentLoadedHandler),n.domContentLoadedHandler=null),n.observers.forEach(e=>e.disconnect()),n.observers.length=0,n.timeouts.forEach(e=>clearTimeout(e)),n.timeouts.length=0,n.handlers.forEach(({element:e,event:t,handler:n,options:r})=>{e.removeEventListener(t,n,r)}),n.handlers.length=0,window.initCustomSelects&&delete window.initCustomSelects}}}async function O(e){const t={destroyFunctions:[]};try{const n=function(e){const t=a(e,"states");return t.forEach(e=>{const t=e;if("SELECT"!==t.tagName)return void console.warn('[select-states] data-hs-form-select="states" must be on a <select> element',t);const n=t.querySelectorAll("option");if(1!==n.length)return void console.warn("[select-states] Select must have exactly 1 default template option (placeholder). Found:",n.length,t);const r=n[0];if(""!==r.value)return void console.warn("[select-states] Template option must have empty value for placeholder. Found value:",r.value,t);const o=r.textContent;t.innerHTML="";const s=document.createElement("option");s.value="",s.textContent=o,t.appendChild(s),F.forEach(e=>{const n=document.createElement("option");n.value=e.value,n.textContent=e.name,t.appendChild(n)})}),{result:`states initialized on ${t.length} select${1!==t.length?"s":""}`,destroy:()=>{}}}(e.states);n?.destroy&&t.destroyFunctions.push(n.destroy);const r=N(e["custom-select"]);return r?.destroy&&t.destroyFunctions.push(r.destroy),{result:"select initialized",destroy:()=>{t.destroyFunctions.forEach(e=>{try{e()}catch(t){console.error("[select] Error during cleanup:",t)}}),t.destroyFunctions.length=0}}}catch(n){throw console.error("[select] Initialization failed:",n),t.destroyFunctions.forEach(e=>{try{e()}catch(t){console.error("[select] Error during error cleanup:",t)}}),n}}const H="hsfx-form-persist";function z(e){const t={handlers:[],debounceTimers:new Map},n=i(e,"field"),r=document.querySelectorAll(n);if(0===r.length)return{result:"persist skipped - no fields found",destroy:()=>{}};const o=()=>{try{const e=localStorage.getItem(H);if(e){return JSON.parse(e)}}catch{}return{timestamp:Date.now().toString()}},s=e=>{e.timestamp=Date.now().toString(),localStorage.setItem(H,JSON.stringify(e))},a=e=>{if(e instanceof HTMLInputElement){if("checkbox"===e.type)return e.checked?"true":"false";if("radio"===e.type){const t=e.name;if(t){const e=document.querySelector(`input[type="radio"][name="${t}"]:checked`);return e?.value||""}return e.checked?e.value:""}return e.value}return e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement?e.value:""},l=e.attributes.elements.field.primary.match(/data-[^=]+/)?.[0];return l?(r.forEach(e=>{const n=e.getAttribute(l);if(!n)return;const r=()=>((e,n)=>{const r=t.debounceTimers.get(e);r&&clearTimeout(r);const i=setTimeout(()=>{const r=o(),i=a(e);r[n]=i,s(r),t.debounceTimers.delete(e)},300);t.debounceTimers.set(e,i)})(e,n),i=e instanceof HTMLSelectElement?"change":"input";e.addEventListener(i,r),t.handlers.push({element:e,event:i,handler:r}),"change"!==i&&(e.addEventListener("change",r),t.handlers.push({element:e,event:"change",handler:r}));const c=a(e);if(c){const e=o();e[n]=c,s(e)}}),{result:`persist initialized (${r.length} fields)`,destroy:()=>{t.debounceTimers.forEach(e=>clearTimeout(e)),t.debounceTimers.clear(),t.handlers.forEach(({element:e,event:t,handler:n})=>{e.removeEventListener(t,n)}),t.handlers.length=0}}):{result:"persist skipped - invalid config",destroy:()=>{}}}function B(t){const n={handlers:[],liveRegions:[]},r=(e,t,r,o)=>{e.addEventListener(t,r,o),n.handlers.push({element:e,event:t,handler:r,options:o})};function c(c){const u=[];let d=0,p=!1;const f=i(l.clickable,"button"),m=t.attributes.properties?.animation,h=t.attributes.properties?.animationDuration,g=t.attributes.properties?.validateOn,v=t.attributes.properties?.label,y=m&&(c.getAttribute(m)||t.defaults?.animation)||"fade",b=h&&(parseFloat(c.getAttribute(h)||"")||t.defaults?.animationDuration)||.3,w=g&&(c.getAttribute(g)||t.defaults?.validateOn)||"input",E=a(t,"step",c);if(0===E.length)return;const A=e(t,"progress-bar",c),x=e(t,"progress-fill",c),k=e(t,"step-current",c),L=e(t,"step-total",c),S=e(t,"step-label",c),C=document.createElement("div");function T(e){const t=e.element.querySelectorAll('input:not([type="hidden"]), select, textarea');let n=!0;return t.forEach(e=>{e.checkValidity()||(n=!1)}),e.isValid=n,n}function P(e){e.nextButton&&(e.nextButton.disabled=!e.isValid,e.nextButton.setAttribute("aria-disabled",e.isValid?"false":"true"))}function q(){const e=(d+1)/u.length*100;x&&(x.style.setProperty("--progress",`${e}%`),x.style.width=`${e}%`),A&&(A.setAttribute("aria-valuenow",String(d+1)),A.setAttribute("aria-valuetext",`Step ${d+1} of ${u.length}`))}function $(){k&&(k.textContent=String(d+1)),S&&(S.textContent=u[d].label)}async function D(e,t=!1){if(p)return;if(e<0||e>=u.length)return;if(e===d&&!t)return;if(e>d){const e=u[d];if(!T(e))return void e.element.reportValidity()}p=!0;const n=d;d=e;const r=u[n],a=u[d],i=e>n?"forward":"backward";r.element.classList.remove("step-active"),a.element.classList.add("step-active"),t||"none"===y?(r.element.style.display="none",r.element.inert=!0,a.element.style.display="block",a.element.inert=!1):"fade"===y?await async function(e,t,n){s()&&(n=0);const r=o("multistep",!1);if(!r)return e.style.display="none",e.inert=!0,t.style.display="block",void(t.inert=!1);const{gsap:a}=r;return new Promise(r=>{const o=a.timeline({onComplete:()=>{e.style.display="none",e.style.position="",e.style.opacity="",e.inert=!0,t.style.position="",t.style.opacity="",t.inert=!1,r()},defaults:{duration:n,ease:"power1.out"}});o.set(e,{position:"absolute",top:0,left:0,width:"100%"}),o.set(t,{display:"block",position:"relative",opacity:0}),o.to(e,{opacity:0}),o.to(t,{opacity:1},"<50%")})}(r.element,a.element,b):"clip"===y&&await async function(e,t,n,r){s()&&(n=0);const a=o("multistep",!1);if(!a)return e.style.display="none",e.inert=!0,t.style.display="block",void(t.inert=!1);const{gsap:i}=a,l="forward"===r?"inset(0% 100% 0% 0%)":"inset(0% 0% 0% 100%)",c="forward"===r?"inset(0% 0% 0% 100%)":"inset(0% 100% 0% 0%)";return new Promise(r=>{const o=i.timeline({onComplete:()=>{e.style.display="none",e.style.position="",e.style.clipPath="",e.inert=!0,t.style.position="",t.style.clipPath="",t.inert=!1,r()},defaults:{duration:n,ease:"power1.inOut"}});o.set(e,{position:"absolute",top:0,left:0,width:"100%",clipPath:"inset(0% 0% 0% 0%)"}),o.set(t,{display:"block",position:"relative",clipPath:c}),o.to(e,{clipPath:l}),o.to(t,{clipPath:"inset(0% 0% 0% 0%)"},"<40%")})}(r.element,a.element,b,i),q(),$(),function(){const e=u[d],t=`Step ${d+1} of ${u.length}: ${e.label}`;C.textContent=t,setTimeout(()=>{C.textContent=""},1e3)}(),function(e){const t=e.element.querySelector('input:not([type="hidden"]):not([disabled]), select:not([disabled]), textarea:not([disabled])');t&&t.focus()}(a),T(a),P(a),p=!1}C.className="sr-only",C.setAttribute("aria-live","polite"),C.setAttribute("aria-atomic","true"),C.style.cssText="position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden;",c.appendChild(C),n.liveRegions.push(C),E.forEach((n,r)=>{const o=n,s=v&&o.getAttribute(v)||`Step ${r+1}`,a=e(t,"next",o),i=e(t,"previous",o),l=e(t,"submit",o),c=a?.querySelector(f)||a,d=i?.querySelector(f)||i,p=l?.querySelector(f)||l;u.push({element:o,index:r,label:s,nextButton:c,previousButton:d,submitButton:p,isValid:!1}),o.setAttribute("role","group"),o.setAttribute("aria-label",s),0===r?(o.style.display="block",o.inert=!1,o.classList.add("step-active")):(o.style.display="none",o.inert=!0,o.classList.remove("step-active"))}),A&&(A.setAttribute("role","progressbar"),A.setAttribute("aria-valuemin","1"),A.setAttribute("aria-valuemax",String(u.length)),A.setAttribute("aria-valuenow","1"),A.setAttribute("aria-label","Form progress")),L&&(L.textContent=String(u.length)),u.forEach(e=>{e.nextButton&&r(e.nextButton,"click",e=>{e.preventDefault(),D(d+1)}),e.previousButton&&r(e.previousButton,"click",e=>{e.preventDefault(),D(d-1)});e.element.querySelectorAll('input:not([type="hidden"]), select, textarea').forEach(t=>{const n=()=>{T(e),P(e)};r(t,w,n),"blur"!==w&&r(t,"blur",n)}),r(e.element,"keydown",t=>{if("Enter"===t.key){const n=t.target;if("TEXTAREA"===n.tagName)return;if(e.submitButton&&n===e.submitButton)return;e.nextButton&&!e.nextButton.disabled&&(t.preventDefault(),D(d+1))}})}),r(c,"submit",e=>{let t=!0;if(u.forEach(e=>{T(e)||(t=!1)}),!t){e.preventDefault();const t=u.findIndex(e=>!e.isValid);t>=0&&D(t)}}),T(u[0]),P(u[0]),q(),$()}const u=a(t,"wrapper");return u.forEach(e=>{c(e)}),{result:`multistep initialized (${u.length} forms)`,destroy:()=>{n.handlers.forEach(({element:e,event:t,handler:n,options:r})=>{e.removeEventListener(t,n,r)}),n.handlers.length=0,n.liveRegions.forEach(e=>{e.remove()}),n.liveRegions.length=0}}}async function W(){const n=t.default.form,r={destroyFunctions:[]},o=i(n.persist,"field");if(document.querySelector(o))try{const e=z(n.persist);e?.destroy&&r.destroyFunctions.push(e.destroy)}catch(p){console.error("[form] Error initializing persist:",p)}const s=i(n.honeypot,"form-handler");if(document.querySelector(s))try{const t=function(t){const n={honeypotHandler:null},r=n=>{const r=n.target;if("FORM"!==r.tagName)return;const o=e(t,"form-handler",r);if(!o)return;const s="INPUT"===o.tagName?o:o.querySelector("input");return s&&s.value?(n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation(),!1):void 0};return n.honeypotHandler=r,document.addEventListener("submit",r,!0),{result:"honeypot initialized",destroy:()=>{n.honeypotHandler&&(document.removeEventListener("submit",n.honeypotHandler,!0),n.honeypotHandler=null)}}}(n.honeypot);t?.destroy&&r.destroyFunctions.push(t.destroy)}catch(p){console.error("[form] Error initializing honeypot:",p)}const l=i(n.range,"wrapper");if(document.querySelector(l))try{const e=M(n.range);e?.destroy&&r.destroyFunctions.push(e.destroy)}catch(p){console.error("[form] Error initializing range:",p)}const c=i(n.test,"wrapper");if(document.querySelector(c))try{const t=function(t){const n={handlers:[]},r=(e,t,r,o)=>{e.addEventListener(t,r,o),n.handlers.push({element:e,event:t,handler:r,options:o})},o=a(t,"wrapper");return o.forEach(n=>{const o=n.querySelector("form");if(!o)return void console.warn('[form-test] No <form> element found within data-hs-form-test="wrapper"',n);const s=e(t,"info",n),a=()=>{const e=new FormData(o),t={};for(const[n,r]of e.entries())t[n]=r;if(s){const e=document.createElement("pre");e.textContent=JSON.stringify(t,null,2),s.innerHTML="",s.appendChild(document.createTextNode("Test mode active - Live form data:")),s.appendChild(e)}};s&&(s.textContent="Test mode active, preventing native submissions",a()),r(o,"input",a),r(o,"change",a);const i=o.querySelector('button[type="submit"], input[type="submit"]')||o.querySelector("button:not([type])");i&&r(i,"click",()=>{console.log("[form-test] Submit button clicked"),requestAnimationFrame(()=>{o.checkValidity()||console.log("[form-test] Browser blocked submission - validation failed")})}),r(o,"submit",e=>{e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),console.log("[form-test] Submission prevented - displaying test results");const t=new FormData(o),n={};for(const[o,s]of t.entries())n[o]=s;const r=`✅ Form would submit successfully at ${(new Date).toLocaleTimeString()}`;if(s){const e=document.createElement("pre");e.textContent=JSON.stringify(n,null,2),s.innerHTML="",s.appendChild(document.createTextNode(r)),s.appendChild(e)}else console.log(r),console.log("Form data:",n);return!1},!0)}),{result:`test initialized on ${o.length} form${1!==o.length?"s":""}`,destroy:()=>{n.handlers.forEach(({element:e,event:t,handler:n,options:r})=>{e.removeEventListener(t,n,r)}),n.handlers.length=0}}}(n.test);t?.destroy&&r.destroyFunctions.push(t.destroy)}catch(p){console.error("[form] Error initializing test:",p)}const u=i(n.select,"wrapper");if(document.querySelector(u))try{const e=await O(n.select);e?.destroy&&r.destroyFunctions.push(e.destroy)}catch(p){console.error("[form] Error initializing select:",p)}const d=i(n.multistep,"wrapper");if(document.querySelector(d))try{const e=B(n.multistep);e?.destroy&&r.destroyFunctions.push(e.destroy)}catch(p){console.error("[form] Error initializing multistep:",p)}return{result:`form initialized (${r.destroyFunctions.length} modules active)`,destroy:()=>{r.destroyFunctions.forEach(e=>{try{e()}catch(p){console.error("[form] Error during cleanup:",p)}}),r.destroyFunctions.length=0}}}function R(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function V(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return R(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?R(e,t):void 0}}(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function X(e,t,n,r){var o,s,a={headers:{accept:"*/*"}};return t||(a.mode="no-cors"),n&&(a.credentials="include"),a.priority=r?"high":"low",window.fetch?fetch(e,a):(o=e,s=n,new Promise(function(e,t,n){(n=new XMLHttpRequest).open("GET",o,n.withCredentials=s),n.setRequestHeader("Accept","*/*"),n.onload=function(){200===n.status?e():t()},n.send()}))}var U,j=(U=document.createElement("link")).relList&&U.relList.supports&&U.relList.supports("prefetch")?function(e,t){return new Promise(function(n,r,o){(o=document.createElement("link")).rel="prefetch",o.href=e,t&&o.setAttribute("crossorigin","anonymous"),o.onload=n,o.onerror=r,document.head.appendChild(o)})}:X,G=window.requestIdleCallback||function(e){var t=Date.now();return setTimeout(function(){e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-t))}})},1)},Y=new Set,K=new Set,_=!1;function J(e,t){return Array.isArray(t)?t.some(function(t){return J(e,t)}):(t.test||t).call(t,e.href,e)}function Z(e){if(e){if(e.saveData)return new Error("Save-Data is enabled");if(/2g/.test(e.effectiveType))return new Error("network conditions are poor")}return!0}function Q(e){if(void 0===e&&(e={}),window.IntersectionObserver&&"isIntersecting"in IntersectionObserverEntry.prototype){var t=function(e){e=e||1;var t=[],n=0;function r(){n<e&&t.length>0&&(t.shift()(),n++)}return[function(e){t.push(e)>1||r()},function(){n--,r()}]}(e.throttle||1/0),n=t[0],r=t[1],o=e.limit||1/0,s=e.origins||[location.hostname],a=e.ignores||[],i=e.delay||0,l=[],c=e.timeoutFn||G,u="function"==typeof e.hrefFn&&e.hrefFn,d=e.prerender||!1;_=e.prerenderAndPrefetch||!1;var p=new IntersectionObserver(function(t){t.forEach(function(t){if(t.isIntersecting)l.push((t=t.target).href),a=function(){l.includes(t.href)&&(p.unobserve(t),(_||d)&&K.size<o?function(e,t){void 0===t&&(t="immediate");var n=Z(navigator.connection);if(n instanceof Error)return Promise.reject(new Error("Cannot prerender, "+n.message));if(!HTMLScriptElement.supports("speculationrules"))return ee(e,!0,!1,!1,"moderate"===t||"conservative"===t),Promise.reject(new Error("This browser does not support the speculation rules API. Falling back to prefetch."));for(var r,o=V([].concat(e));!(r=o()).done;)K.add(r.value);Y.size>0&&!_&&console.warn("[Warning] You are using both prefetching and prerendering on the same document");var s=function(e,t){var n=document.createElement("script");n.type="speculationrules",n.text='{"prerender":[{"source": "list",\n "urls": ["'+Array.from(e).join('","')+'"],\n "eagerness": "'+t+'"}]}';try{document.head.appendChild(n)}catch(r){return r}return!0}(K,t);return!0===s?Promise.resolve():Promise.reject(s)}(u?u(t):t.href,e.eagerness).catch(function(t){if(!e.onError)throw t;e.onError(t)}):Y.size<o&&!d&&n(function(){ee(u?u(t):t.href,e.priority,e.checkAccessControlAllowOrigin,e.checkAccessControlAllowCredentials,e.onlyOnMouseover).then(r).catch(function(t){r(),e.onError&&e.onError(t)})}))},(c=i)?setTimeout(a,c):a();else{var s=l.indexOf((t=t.target).href);s>-1&&l.splice(s)}var a,c})},{threshold:e.threshold||0});return c(function(){(e.el&&e.el.length&&e.el.length>0&&"A"===e.el[0].nodeName?e.el:(e.el||document).querySelectorAll("a")).forEach(function(e){s.length&&!s.includes(e.hostname)||J(e,a)||p.observe(e)})},{timeout:e.timeout||2e3}),function(){Y.clear(),p.disconnect()}}}function ee(e,t,n,r,o){var s=Z(navigator.connection);return s instanceof Error?Promise.reject(new Error("Cannot prefetch, "+s.message)):(K.size>0&&!_&&console.warn("[Warning] You are using both prefetching and prerendering on the same document"),Promise.all([].concat(e).map(function(e){return Y.has(e)?[]:(Y.add(e),function(e,t,n){var r=[].slice.call(arguments,3);if(!n)return e.apply(void 0,[t].concat(r));for(var o,s=Array.from(document.querySelectorAll("a")).filter(function(e){return e.href===t}),a=new Map,i=function(){var n=o.value,s=function(o){var l=setTimeout(function(){return n.removeEventListener("mouseenter",s),n.removeEventListener("mouseleave",i),e.apply(void 0,[t].concat(r))},200);a.set(n,l)},i=function(e){var t=a.get(n);t&&(clearTimeout(t),a.delete(n))};n.addEventListener("mouseenter",s),n.addEventListener("mouseleave",i)},l=V(s);!(o=l()).done;)i()}(t?X:j,new URL(e,location.href).toString(),o,n,r,t))})))}const te=l.apiName;function ne(t){const n={handlers:[]},r=(e,t,r,o)=>{e.addEventListener(t,r,o),n.handlers.push({element:e,event:t,handler:r,options:o})};const c=a(t,"wrapper");return c.forEach(function(n){const a=e(t,"list",n),c=e(t,"row",n);if(!!!a||!!!c)return;const u=t.attributes.properties?.animation,d=u&&n.getAttribute(u)||"instant",p=Array.from(a.children);if(0===p.length)return;const f=t.attributes.properties?.id,m=new Map;f&&p.forEach((e,t)=>{const n=e.getAttribute(f);n&&m.set(n,t)}),p.forEach((e,t)=>{0===t?(e.style.display="block",e.classList.add(l.classes.active)):(e.style.display="none",e.classList.remove(l.classes.active))});const h=[],g=c.firstElementChild?.cloneNode(!0);if(!g)return void console.warn(`[${te}] Lightbox row has no template child`);for(g.classList.remove(l.classes.active);c.firstChild;)c.removeChild(c.firstChild);const v=i(l.clickable,"button");p.forEach((e,t)=>{const n=g.cloneNode(!0),o=e.querySelector("img, video, [src]"),s=n.querySelector("img, video, [src]");if(o&&s){const e=o.getAttribute("src");e&&s.setAttribute("src",e)}0===t&&n.classList.add(l.classes.active);const a=n.querySelector(v)||n;r(a,"click",()=>w(t)),c.appendChild(n),h.push(n)});let y=0,b=!1;async function w(e){if(b||e===y)return;if(e<0||e>=p.length)return;b=!0;const t=p[y],n=p[e];h.forEach((t,n)=>{t.classList.toggle(l.classes.active,n===e)}),t.classList.remove(l.classes.active),n.classList.add(l.classes.active),"fade"===d?await async function(e,t,n){s()&&(n=0);const r=o("lightbox",!1);if(!r)return e.style.display="none",void(t.style.display="block");const{gsap:a}=r;return new Promise(r=>{const o=a.timeline({onComplete:()=>{e.style.display="none",e.style.position="",e.style.opacity="",t.style.position="",t.style.opacity="",r()},defaults:{duration:n,ease:"power1.out"}});o.set(e,{position:"absolute",top:0,left:0,width:"100%"}),o.set(t,{display:"block",position:"relative",opacity:0}),o.to(e,{opacity:0}),o.to(t,{opacity:1},"<50%")})}(t,n,.3):"clip"===d?await async function(e,t,n){s()&&(n=0);const r=o("lightbox",!1);if(!r)return e.style.display="none",void(t.style.display="block");const{gsap:a}=r;return new Promise(r=>{const o=a.timeline({onComplete:()=>{e.style.display="none",e.style.position="",e.style.clipPath="",t.style.position="",t.style.clipPath="",r()},defaults:{duration:n,ease:"power1.inOut"}});o.set(e,{position:"absolute",top:0,left:0,width:"100%",clipPath:"inset(0% 0% 0% 0%)"}),o.set(t,{display:"block",position:"relative",clipPath:"inset(0% 0% 100% 0%)"}),o.to(e,{clipPath:"inset(100% 0% 0% 0%)"}),o.to(t,{clipPath:"inset(0% 0% 0% 0%)"},"<40%")})}(t,n,.3):(t.style.display="none",n.style.display="block"),y=e,b=!1}const E=e(t,"previous",n),A=e(t,"next",n);if(E){const e=E.querySelector(v)||E;r(e,"click",()=>{w(0===y?p.length-1:y-1)})}if(A){const e=A.querySelector(v)||A;r(e,"click",()=>{w(y===p.length-1?0:y+1)})}const x=t.attributes.properties?.button;if(x&&m.size>0){r(document,"click",e=>{const t=e.target.closest(`[${x}]`);if(!t)return;const n=t.getAttribute(x);n&&m.has(n)&&w(m.get(n))})}}),{result:`lightbox initialized (${c.length} instances)`,destroy:()=>{n.handlers.forEach(({element:e,event:t,handler:n,options:r})=>{e.removeEventListener(t,n,r)}),n.handlers.length=0}}}const re=t._global.apiName;function oe(t){const n={handlers:[],observers:[],draggables:[]},r=(e,t,r,o)=>{e.addEventListener(t,r,o),n.handlers.push({element:e,event:t,handler:r,options:o})},c=o("slider",!1);if(!c)return{result:"slider skipped (no GSAP)",destroy:()=>{}};const{gsap:u,Draggable:d}=c;if(!h())return m("slider",["Draggable"],"error"),{result:"slider skipped (no Draggable)",destroy:()=>{}};const p=s();const f=a(t,"component");return f.forEach(function(o){const s=e(t,"element",o),c=e(t,"list",o);if(!c)return void console.warn(`[${re}] Slider component missing list:`,o);if(!s)return void console.warn(`[${re}] Slider component missing element:`,o);let f=Array.from(c.children);if(0===f.length)return;const m=f.length,h=`slider-${Math.random().toString(36).substring(2,9)}`;c.setAttribute("id",h),c.setAttribute("role","region"),c.setAttribute("aria-label","Slider content");const g=t.attributes?.properties||{},v="true"===s.getAttribute(g.free||"data-hs-slider-free"),y="false"!==s.getAttribute(g.follow||"data-hs-slider-follow"),b="true"===s.getAttribute(g.wheel||"data-hs-slider-wheel"),w="true"===s.getAttribute(g.toClicked||"data-hs-slider-to-clicked"),E="true"===s.getAttribute(g.infinite||"data-hs-slider-infinite"),A=p?0:parseFloat(s.getAttribute(g.speed||"data-hs-slider-speed")||"0.5"),x=a(t,"previous",o),k=a(t,"next",o),L=i(l.clickable,"button"),S=[],C=[];x.forEach(e=>{const t=e.querySelector(L);t&&S.push(t)}),k.forEach(e=>{const t=e.querySelector(L);t&&C.push(t)});const T=e(t,"dots",o);let P=null;T?.firstElementChild&&(P=T.firstElementChild.cloneNode(!0),P.classList.remove(l.classes.active));const q=e(t,"draggable-wrapper",o),$=e(t,"draggable-element",o);let D=0;if(E){q&&(q.style.display="none");const e=f[0].offsetWidth,t=s.offsetWidth,n=getComputedStyle(c),r=parseFloat(n.gap)||0,o=Math.max(1,Math.round((t+r)/(e+r)));D=o+1;for(let s=m-D;s<m;s++){const e=f[s<0?m+s:s].cloneNode(!0);e.setAttribute("data-clone","true"),c.insertBefore(e,c.firstChild)}for(let s=0;s<D;s++){const e=f[s].cloneNode(!0);e.setAttribute("data-clone","true"),c.appendChild(e)}f=Array.from(c.children)}const I={slidePositions:[],currentIndex:0,draggable:null};let M=!1;function F(){if(E)return m;const e=function(){if(0===f.length)return 1;const e=s.offsetWidth,t=f[0].offsetWidth,n=getComputedStyle(c),r=parseFloat(n.gap)||0;return t+r===0?1:Math.max(1,Math.round((e+r)/(t+r)))}();return Math.max(1,f.length-e+1)}function N(){I.slidePositions=[];const e=F(),t=getComputedStyle(c),n=parseFloat(t.gap)||0,r=O();for(let o=0;o<e;o++)if(o===e-1)I.slidePositions.push(r.minX);else{let e=0;for(let t=0;t<o;t++)e+=f[t].offsetWidth+n;I.slidePositions.push(-e)}}function O(){const e=s.offsetWidth,t=c.scrollWidth;return{minX:-Math.max(0,t-e),maxX:0}}function H(){const e=f[0]?.offsetWidth||0,t=getComputedStyle(c);return e+(parseFloat(t.gap)||0)}function z(){if(!E)return;M=!1;const e=u.getProperty(c,"x"),t=H(),n=D*t,r=-n,o=-(n+m*t-t);let s=e,a=!1;if(e>r){s=o+(e-r),a=!0}else if(e<o){s=r-(o-e),a=!0}a&&(s=Math.max(o,Math.min(r,s)),u.set(c,{x:s}),M=!0,I.draggable&&I.draggable.update(),B(s),V(),j(),R())}if(N(),E){const e=H(),t=-D*e;u.set(c,{x:t})}function B(e){const t=F();if(E){const n=H(),r=D*n,o=Math.abs(e)-r,s=Math.round(o/n);return void(I.currentIndex=(s%t+t)%t)}const n=O(),r=Math.abs(n.minX);if(0===r)return void(I.currentIndex=0);const o=Math.abs(e)/r;I.currentIndex=Math.min(t-1,Math.floor(o*t))}function W(e){if(v)return B(e),e;let t=I.slidePositions[0],n=Math.abs(e-t),r=0;return I.slidePositions.forEach((o,s)=>{const a=Math.abs(e-o);a<n&&(n=a,t=o,r=s)}),I.currentIndex=r,t}function R(){const e=F(),t=0===I.currentIndex,n=I.currentIndex>=e-1,r=v||E;S.forEach(e=>{e.disabled=!r&&t,e.setAttribute("aria-disabled",r?"false":String(t))}),C.forEach(e=>{e.disabled=!r&&n,e.setAttribute("aria-disabled",r?"false":String(n))})}function V(){const e=l.classes.active;f.forEach((t,n)=>{t.classList.toggle(e,n===I.currentIndex)})}let X=[],U=null;function j(){const e=l.classes.active;X.forEach((t,n)=>{t.classList.toggle(e,n===I.currentIndex),t.setAttribute("aria-current",n===I.currentIndex?"true":"false")})}function G(e,t=!0){u.killTweensOf(c);const n=F();if(E){const r=H();let o=e;e<0?o=n-1:e>=n&&(o=0);const s=-(D*r+o*r);if(e<0||e>=n){const t=u.getProperty(c,"x");if(e<0){const e=t-m*r;u.set(c,{x:e})}else{const e=t+m*r;u.set(c,{x:e})}I.draggable&&I.draggable.update()}return I.currentIndex=o,R(),V(),j(),void(t&&A>0?u.to(c,{x:s,duration:A,ease:"power2.out",onUpdate:()=>{I.draggable&&I.draggable.update(),Y()}}):(u.set(c,{x:s}),I.draggable&&I.draggable.update(),Y()))}const r=Math.max(0,Math.min(e,n-1)),o=I.slidePositions[r];void 0!==o&&(I.currentIndex=r,R(),V(),j(),t&&A>0?u.to(c,{x:o,duration:A,ease:"power2.out",onUpdate:()=>{I.draggable&&I.draggable.update(),Y()}}):(u.set(c,{x:o}),I.draggable&&I.draggable.update(),Y()))}function Y(){if(!q||!$)return;const e=O(),t=Math.abs(e.minX);if(0===t)return;const n=u.getProperty(c,"x"),r=Math.max(0,Math.min(1,Math.abs(n)/t)),o=q.offsetWidth,s=$.offsetWidth,a=Math.max(0,o-s);u.set($,{x:r*a})}if(d){const e=O(),t=d.create(c,{type:"x",bounds:E?void 0:{minX:e.minX,maxX:e.maxX},inertia:!0,edgeResistance:E?0:.65,dragResistance:y?0:.5,cursor:"auto",activeCursor:"auto",allowContextMenu:!0,snap:v||E?void 0:{x:W},onDrag:function(){const e=u.getProperty(c,"x");Y(),W(e),V(),j(),R()},onThrowUpdate:function(){if(z(),Y(),!M){W(u.getProperty(c,"x")),V(),j(),R()}},onThrowComplete:function(){z(),v||(R(),V(),j()),Y()},onDragEnd:function(){v&&Y()}});n.draggables.push(t),I.draggable=t[0]}function K(){if(!T||!P)return;T.innerHTML="",X=[];const e=l.classes.active,t=F();for(let n=0;n<t;n++){const t=P.cloneNode(!0);t.setAttribute("role","button"),t.setAttribute("tabindex","0"),t.setAttribute("aria-label",`Go to page ${n+1}`),t.setAttribute("aria-controls",h),n===I.currentIndex&&(t.classList.add(e),t.setAttribute("aria-current","true"));r(t,"click",()=>G(n));r(t,"keydown",e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),G(n))}),T.appendChild(t),X.push(t)}}if(K(),q&&$&&d){const e=()=>({minX:0,maxX:q.offsetWidth-$.offsetWidth}),t=d.create($,{type:"x",bounds:e(),allowContextMenu:!0,onDrag:function(){const t=e(),n=Math.max(0,Math.min(1,this.x/t.maxX)),r=O(),o=-n*Math.abs(r.minX);u.set(c,{x:o}),I.draggable&&I.draggable.update(),W(o),V(),j(),R()},onDragEnd:function(){if(!v){W(u.getProperty(c,"x")),G(I.currentIndex)}}});n.draggables.push(t),U=t[0]}if(S.forEach(e=>{e.setAttribute("aria-controls",h);r(e,"click",()=>G(I.currentIndex-1))}),C.forEach(e=>{e.setAttribute("aria-controls",h);r(e,"click",()=>G(I.currentIndex+1))}),b){let e=0,t=!1,n=null;r(s,"wheel",r=>{if(t)return;const o=r.deltaX;if(Math.abs(o)<1)return;e+=o,n&&clearTimeout(n),n=window.setTimeout(()=>{e=0},150);Math.abs(e)>=100&&(r.preventDefault(),t=!0,G(e>0?I.currentIndex+1:I.currentIndex-1),e=0,setTimeout(()=>{t=!1},1e3*A+50))},{passive:!1})}w&&f.forEach((e,t)=>{r(e,"click",()=>{t!==I.currentIndex&&G(t)})});let _=F(),J=null;const Z=new ResizeObserver(()=>{J&&clearTimeout(J),J=window.setTimeout(()=>{const e=F();e!==_&&(I.currentIndex>=e&&(I.currentIndex=e-1),K(),_=e),N();const t=O();if(I.draggable&&(I.draggable.applyBounds({minX:t.minX,maxX:t.maxX}),I.draggable.update()),v||G(I.currentIndex,!1),Y(),U&&q&&$){const e=q.offsetWidth,t=$.offsetWidth;U.applyBounds({minX:0,maxX:e-t}),U.update()}},150)});Z.observe(s.parentElement||s),n.observers.push(Z),R(),V(),Y()}),{result:`slider initialized (${f.length} instances)`,destroy:()=>{n.draggables.forEach(e=>{try{Array.isArray(e)?e.forEach(e=>e.kill&&e.kill()):e?.kill&&e.kill()}catch(t){}}),n.draggables.length=0,n.observers.forEach(e=>e.disconnect()),n.observers.length=0,n.handlers.forEach(({element:e,event:t,handler:n,options:r})=>{e.removeEventListener(t,n,r)}),n.handlers.length=0}}}const se=t._global.apiName;async function ae(){const e={destroyFunctions:[]},n={},r=t.default;try{const t=await w();t?.destroy&&e.destroyFunctions.push(t.destroy)}catch(p){console.error("[default] Error initializing transition:",p)}const a=[{name:"smooth-scroll",init:()=>E(r["smooth-scroll"])},{name:"navbar",init:()=>async function(e){const t={destroyFunctions:[]},n=await Promise.allSettled([x(e.dropdown),k(e.menu,e),L(e["arrow-navigation"],e)]);n.forEach(e=>{"fulfilled"===e.status&&e.value?.destroy&&t.destroyFunctions.push(e.value.destroy)});const r=n.filter(e=>"fulfilled"===e.status).length,o=n.length-r;return o>0&&console.warn(`[navbar] ${r}/${n.length} functions loaded successfully. ${o} failed but won't affect other functions.`),{result:"navbar initialized",destroy:()=>{t.destroyFunctions.forEach(e=>{try{e()}catch(p){console.error("[navbar] Error during cleanup:",p)}}),t.destroyFunctions.length=0}}}(r.navbar)},{name:"accordion",init:()=>S(r.accordion)},{name:"toc",init:()=>T()},{name:"pagination",init:()=>P(r.pagination)},{name:"comparison",init:()=>q(r.comparison)},{name:"tabs",init:()=>D(r.tabs)},{name:"modal",init:()=>I(r.modal)},{name:"form",init:()=>W()},{name:"link-prefetch",init:()=>async function(){const e=new Set,t=Q({el:document.body,limit:5,throttle:1e3,timeout:1e4,ignoreSlowConnection:!0,origins:[window.location.hostname],delay:0,priority:"low"}),n=new IntersectionObserver(t=>{t.forEach(t=>{if(t.isIntersecting){const n=t.target.href;if(n.includes("#")||e.has(n))return;ee([n],{priority:"low"}).then(()=>{e.add(n)}).catch(()=>{})}})},{rootMargin:"200px"});return document.querySelectorAll("a[href]").forEach(e=>{e instanceof HTMLAnchorElement&&e.hostname===window.location.hostname&&n.observe(e)}),document.body.addEventListener("mouseover",t=>{const n=t.target.closest("a[href]");if(n&&n instanceof HTMLAnchorElement){const t=n.href;n.hostname===window.location.hostname&&!e.has(t)&&ee([t],{priority:"low"}).then(()=>{e.add(t)}).catch(()=>{})}}),{result:"link-prefetch initialized",destroy:()=>{t&&"function"==typeof t&&t(),n.disconnect()}}}()},{name:"active-link",init:()=>async function(){const e=t._global.classes.active,n=t.default["active-link"],r={observers:[],handlers:[],scrollTimeout:null},o=i(n,"wrapper"),s=i(n,"trigger"),a=document.querySelectorAll('a[href^="#"], button[data-target^="#"]'),l=[];a.forEach(e=>{let t=e;const n=e.closest(o);if(n)t=n;else{const n=e.closest(s);n&&(t=n)}l.push({link:e,target:t})});const c=[];if(a.forEach(e=>{const t=e.getAttribute("href")||e.getAttribute("data-target");if(t&&"#"!==t){const e=document.querySelector(t);e&&c.push({element:e,hash:t})}}),0===c.length)return{result:"active-link: no sections found",destroy:()=>{}};let u=null;const d=()=>{const t=.75*window.innerHeight;let n=null;for(let e=c.length-1;e>=0;e--)if(c[e].element.getBoundingClientRect().top<=t){n=c[e].hash;break}if(n!==u&&(u=n,l.forEach(({target:t})=>t.classList.remove(e)),u)){const t=l.find(({link:e})=>e.getAttribute("href")===u||e.getAttribute("data-target")===u);t&&t.target.classList.add(e)}},p=new IntersectionObserver(()=>{d()},{rootMargin:"-75% 0px -25% 0px",threshold:0});c.forEach(({element:e})=>p.observe(e)),r.observers.push(p);const f=()=>{r.scrollTimeout&&clearTimeout(r.scrollTimeout),r.scrollTimeout=setTimeout(d,50)};return window.addEventListener("scroll",f),r.handlers.push({element:window,event:"scroll",handler:f}),d(),{result:`active-link initialized (${c.length} sections tracked)`,destroy:()=>{r.observers.forEach(e=>e.disconnect()),r.observers.length=0,r.handlers.forEach(({element:e,event:t,handler:n})=>{e.removeEventListener(t,n)}),r.handlers.length=0,r.scrollTimeout&&(clearTimeout(r.scrollTimeout),r.scrollTimeout=null),l.forEach(({target:t})=>t.classList.remove(e))}}}()},{name:"lightbox",init:()=>ne(r.lightbox)},{name:"slider",init:()=>oe(r.slider)},{name:"theme-animator",init:()=>async function(e){const t={handlers:[],tweens:[]},n=o("theme-animator",!0);if(!n)return{result:"theme-animator skipped - GSAP not available",destroy:()=>{}};const{gsap:r,ScrollTrigger:a}=n,i={prefix:e?.defaults?.prefix||"--_theme---",duration:e?.defaults?.duration||.5,ease:e?.defaults?.ease||"power2.inOut"},l={},c=new WeakMap,u=[];let d=0;const p=e?.attributes?.elements?.template?.primary||"data-hs-theme-template";function f(e,t){const n=/var\(\s*(--[\w-]+)\s*(?:,\s*([^)]+))?\)/g;let r,o=e,s=0;for(;null!==(r=n.exec(o))&&s<10;){const e=r[1],a=r[2],i=t.getPropertyValue(e).trim()||a||"";o=o.replace(r[0],i),n.lastIndex=0,s++}return o}function m(){const e=document.querySelectorAll(`[${p}]`);if(0===e.length)return;const t=i.prefix;e.forEach(e=>{const n=e.getAttribute(p);if(!n)return;const r=getComputedStyle(e),o={};for(let s=0;s<r.length;s++){const e=r[s];if(e.startsWith(t)){let t=r.getPropertyValue(e).trim();t&&(t=f(t,r),o[e]=t)}}l[n]=o})}function h(e){return"string"==typeof e?Array.from(document.querySelectorAll(e)):Array.isArray(e)?e:[e]}function v(e){return s()?0:e}function y(e){if(c.has(e))return c.get(e);const t=getComputedStyle(e),n={},r=i.prefix;for(let o=0;o<t.length;o++){const e=t[o];if(e.startsWith(r)){let r=t.getPropertyValue(e).trim();r&&(r=f(r,t),n[e]=r)}}return c.set(e,n),n}function b(e,n,o={}){if(!g())return console.warn(`[${se}] ScrollTrigger not available for scrub`),null;const s=h(e),a=l[n];if(!a)return console.warn(`[${se}] Theme template "${n}" not found`),null;const i=[],c="scrub-"+d++;return s.forEach(s=>{const l={...a,scrollTrigger:{trigger:o.trigger||s,start:o.start||"top bottom",end:o.end||"bottom center",scrub:o.scrub??!0,markers:o.markers||!1,pin:o.pin,onLeaveBack:o.onLeaveBack,...o}},d=r.to(s,l);i.push(d),t.tweens.push(d),u.push({id:c,tween:d,target:e,themeName:n,scrollConfig:o})}),1===i.length?i[0]:i}await async function(){return new Promise(e=>{const t=Array.from(document.querySelectorAll('link[rel="stylesheet"]'));if(0===t.length)return void e();let n=0;const r=()=>{n++,n>=t.length&&e()};t.forEach(e=>{e.sheet?r():(e.addEventListener("load",r),e.addEventListener("error",r))}),setTimeout(e,2e3)})}(),m();const w={templates:l,to:function(e,n,o={}){const s=h(e),a=l[n];if(!a)return console.warn(`[${se}] Theme template "${n}" not found`),null;s.forEach(e=>y(e));const c={duration:v(o.duration??i.duration),ease:o.ease??i.ease,...a,onComplete:o.onComplete,onUpdate:o.onUpdate},u=[];return s.forEach(e=>{const n=r.to(e,c);u.push(n),t.tweens.push(n)}),1===u.length?u[0]:u},revert:function(e,n={}){const o=h(e),s=v(n.duration??i.duration),a=n.ease??i.ease,l=[];return o.forEach(e=>{const o=c.get(e);if(!o)return void console.warn(`[${se}] No original state captured for element`);const i={duration:s,ease:a,...o,onComplete:n.onComplete,onUpdate:n.onUpdate},u=r.to(e,i);l.push(u),t.tweens.push(u)}),1===l.length?l[0]:l},scrub:b,timeline:function(e,n,o={}){const s=r.timeline(o);return n.forEach(({theme:t,duration:n,ease:r,position:o})=>{const a=l[t];if(a){const t=v(n??i.duration);s.to(e,{duration:t,ease:r??i.ease,...a},o)}}),t.tweens.push(s),s},getTemplates:function(){return Object.keys(l)},getTemplate:function(e){return l[e]||null},refresh:function(){const e=u.map(e=>({...e,progress:e.tween.scrollTrigger?.progress||0}));u.forEach(e=>{const t=e.tween.scrollTrigger;t&&t.kill(),e.tween.kill?.()}),u.length=0,Object.keys(l).forEach(e=>delete l[e]),m(),e.forEach(({target:e,themeName:t,scrollConfig:n,progress:r})=>{const o=b(e,t,n);if(o&&r>0){const e=(Array.isArray(o)?o[0]:o).scrollTrigger;e&&requestAnimationFrame(()=>{e.scroll(r*(e.end-e.start)+e.start)})}})},captureOriginal:y,killScrub:function(e){(e?u.filter(t=>(t.target,t.target===e)):[...u]).forEach(e=>{const t=e.tween.scrollTrigger;t&&t.kill(),e.tween.kill?.();const n=u.indexOf(e);n>-1&&u.splice(n,1)})}};return window[se]&&(window[se].themeAnimator=w),{result:`theme-animator initialized with ${Object.keys(l).length} templates`,destroy:()=>{t.tweens.forEach(e=>{e?.kill&&e.kill()}),t.tweens.length=0,t.handlers.forEach(({element:e,event:t,handler:n,options:r})=>{e.removeEventListener(t,n,r)}),t.handlers.length=0,window[se]?.themeAnimator&&delete window[se].themeAnimator}}}(r["theme-animator"])}],l=a.map(e=>e.init()),c=await Promise.allSettled(l);c.forEach((t,r)=>{const o=a[r];if("fulfilled"===t.status){const r=t.value?.destroy;r&&e.destroyFunctions.push(r),n[o.name]=((e,t,n)=>{let r=n;return{destroy:()=>r?.(),restart:async()=>{r?.();try{const e=await t();r=e?.destroy}catch(p){console.error(`[default] Error restarting ${e}:`,p)}}}})(o.name,o.init,r)}});const u=c.filter(e=>"fulfilled"===e.status).length,d=c.length-u;return d>0&&console.warn(`[default] ${u+1}/${c.length+1} modules loaded successfully. ${d} failed but won't affect other modules.`),{result:"default initialized",...n,destroy:()=>{e.destroyFunctions.forEach(e=>{try{e()}catch(p){console.error("[default] Error during cleanup:",p)}}),e.destroyFunctions.length=0}}}export{ae as init};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,d as r,j as t,n as s,g as a,r as i,t as n}from"./
|
|
1
|
+
import{p as e,d as r,j as t,n as s,g as a,r as i,t as n}from"./hsfxutilsCm-S93Uw.js";const o='[data-hs-marquee="wrapper"]',l="data-hs-marquee-direction",c="data-hs-marquee-duration",u="data-hs-marquee-scroll",g="data-hs-marquee-type",d=25,m=0;async function p(){if(e())return{result:"marquee skipped - prefers-reduced-motion enabled"};const p=r("marquee");if(!p)return{result:"marquee skipped - GSAP not loaded"};const{gsap:h,ScrollTrigger:f}=p;t("marquee",["ScrollTrigger"],"error"),f&&h.registerPlugin(f),s();const q=Array.from(document.querySelectorAll(o)),k={timelines:[],scrollTriggers:[],tickers:[]};return q.forEach(e=>{const r=e.getAttribute(l),t=Array.from(e.children);if(0===t.length)return void console.warn("[marquee] No children found in marquee wrapper:",e);const s=e.getAttribute(c),o=s?parseFloat(s):d,p=e.getAttribute(u),f=p?parseFloat(p):m,q=e.getAttribute(g);s||e.setAttribute(c,String(d)),p||e.setAttribute(u,String(m)),e.classList.add(a.classes.gsap);const A=h.timeline({repeat:-1});if(t.forEach(e=>{"left"===r?A.to(e,{xPercent:-100,duration:o,ease:"none"},0):"right"===r&&(h.set(e,{xPercent:-100}),A.to(e,{xPercent:0,duration:o,ease:"none"},0))}),k.timelines.push(A),f>0){const e=h.quickTo(A,"timeScale",{duration:.1,ease:"power1.out"});let r=!1;const t=()=>{r||(r=!0,requestAnimationFrame(()=>{const t=n(),s=i();let a=1;if("reverse"===q)if(1===s)a=1+t*f;else if(-1===s){const e=t*f;a=e>.5?-e:1}else a=1;else{a=1+t*f}e(a),r=!1}))};h.ticker.add(t),k.tickers.push({tickerFunc:t,gsap:h})}}),{result:`marquee initialized (${q.length} instances)`,destroy:()=>{k.timelines.forEach(e=>{e&&e.kill()}),k.scrollTriggers.forEach(e=>{e&&e.kill()}),k.tickers.forEach(({tickerFunc:e,gsap:r})=>{r.ticker.remove(e)}),q.forEach(e=>{e.classList.remove(a.classes.gsap)}),k.timelines.length=0,k.scrollTriggers.length=0,k.tickers.length=0}}}export{p as init};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{q as e,a as t,g as r,b as n,c as o}from"./hsfxutilsBiyhgSbR.js";function s(){return function(){const e=window.location.origin,t=e=>{const t=document.querySelector(`[data-hs-replace="${e}"]`);return t?.textContent?.trim()||""},r=t("company"),n=t("phone"),o=t("email"),s=t("city"),i=t("state"),a=t("zipcode"),c={"@context":"https://schema.org","@type":"LocalBusiness",name:r,url:e,telephone:n,email:o},l=document.querySelector('[data-hs-replace="business-logo"] img');l&&l.src&&(c.image=l.src);const u={"@type":"PostalAddress",addressLocality:s,addressRegion:i,postalCode:a,addressCountry:"US"},d=t("street-address");d&&(u.streetAddress=d),c.address=u;const m=t("business-latitude"),p=t("business-longitude");m&&p&&(c.geo={"@type":"GeoCoordinates",latitude:m,longitude:p});const h=["facebook","instagram","linkedin","pinterest","tiktok","x","youtube"].map(e=>(e=>{const t=document.querySelector(`[data-hs-replace="${e}"]`);return t?.href||""})(e)).filter(e=>e&&""!==e.trim()&&!e.includes("placeholder"));h.length>0&&(c.sameAs=h);const f=document.querySelector('[data-hs-schema="services"]');if(f){const e=f.querySelectorAll('[data-hs-schema-list="item"]'),t=Array.from(e).map(e=>e.textContent?.trim()).filter(e=>e&&""!==e);t.length>0&&(c.serviceType=t)}const y=document.querySelector('[data-hs-schema="areas"]');if(y){const e=y.querySelectorAll('[data-hs-schema-list="item"]'),t=Array.from(e).map(e=>({"@type":"City",name:e.textContent?.trim()||""})).filter(e=>e.name&&""!==e.name);t.length>0&&(c.areaServed=t)}const g=document.createElement("script");g.type="application/ld+json",g.text=JSON.stringify(c),document.head.appendChild(g);const b=document.querySelector('[data-hs-schema="breadcrumb"]')?.textContent?.trim()||"",A=window.location.pathname.split("/").filter(e=>""!==e);if(A.length>0){const t={"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:"Home",item:e}]},r=A[0],n=r.split("-").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ");t.itemListElement.push({"@type":"ListItem",position:2,name:n,item:e+"/"+r}),b&&t.itemListElement.push({"@type":"ListItem",position:3,name:b,item:window.location.href});const o=document.createElement("script");o.type="application/ld+json",o.text=JSON.stringify(t),document.head.appendChild(o)}if(document.querySelector('[data-hs-accordion-type="faq"]')){const e=[];if(document.querySelectorAll('[data-hs-accordion="list"]').forEach(t=>{t.querySelectorAll('[data-hs-accordion-type="faq"]').forEach(t=>{const r=t.querySelector('[data-hs-accordion="toggle"]'),n=t.querySelector('[data-hs-accordion="content"]');if(r&&n){const t=r.textContent?.trim(),o=n.innerHTML.trim();e.push({"@type":"Question",name:t,acceptedAnswer:{"@type":"Answer",text:o}})}})}),e.length>0){const t={"@context":"https://schema.org","@type":"FAQPage",mainEntity:e},r=document.createElement("script");r.type="application/ld+json",r.text=JSON.stringify(t),document.head.appendChild(r)}}const S=document.querySelector('[data-hs-schema-service="name"]'),x=document.querySelector('[data-hs-schema-service="description"]');if(S&&x){const e=S.textContent?.trim()||"",t=x.textContent?.trim()||"";if(e&&t){const r={"@context":"https://schema.org","@type":"Service",name:e,description:t},n=document.createElement("script");n.type="application/ld+json",n.text=JSON.stringify(r),document.head.appendChild(n)}}else(S||x)&&console.warn('[schema] Service page schema requires both "name" and "description" elements');const E=document.querySelector('[data-hs-schema-faq="question"]'),q=document.querySelector('[data-hs-schema-faq="answer"]'),C=document.querySelector('[data-hs-schema-faq="published"]'),w=document.querySelector('[data-hs-schema-faq="modified"]');if(E&&q&&C&&w){const e=E.textContent?.trim()||"",t=q.innerHTML.trim(),r=C.textContent?.trim()||"",n=w.textContent?.trim()||"";if(e&&t&&r&&n){const o={"@context":"https://schema.org","@type":"QAPage",mainEntity:{"@type":"Question",name:e,text:e,answerCount:1,datePublished:r,dateModified:n,acceptedAnswer:{"@type":"Answer",text:t}}},s=document.createElement("script");s.type="application/ld+json",s.text=JSON.stringify(o),document.head.appendChild(s)}}else if(E||q||C||w){const e=[];E||e.push("question"),q||e.push("answer"),C||e.push("published"),w||e.push("modified"),console.warn(`[schema] FAQ page schema missing required fields: ${e.join(", ")}`)}const v=document.querySelector('[data-hs-schema-blog="name"]'),$=document.querySelector('[data-hs-schema-blog="published"]'),N=document.querySelector('[data-hs-schema-blog="modified"]'),F=document.querySelector('[data-hs-schema-blog="summary"]'),L=document.querySelector('[data-hs-schema-blog="author-name"]'),j=document.querySelector('[data-hs-schema-blog="author-type"]');if(v&&$&&N&&F&&L&&j){const e=v.textContent?.trim()||"",r=$.textContent?.trim()||"",n=N.textContent?.trim()||"",o=F.textContent?.trim()||"",s=L.textContent?.trim()||"",i=j.textContent?.trim()||"Organization",a=document.querySelector('[data-hs-schema-blog="author-role"]'),c=document.querySelector('[data-hs-schema-blog="author-image"]'),l=a?.textContent?.trim()||"",u=c?.src||"",d=t("company"),m=document.querySelector('[data-hs-replace="business-logo"] img'),p=m?m.src:"";let h;"Person"===i?(h={"@type":"Person",name:s},l&&(h.jobTitle=l),u&&(h.image=u)):(h={"@type":"Organization",name:s},p&&(h.logo=p));const f={"@context":"https://schema.org","@type":"BlogPosting",headline:e,description:o,datePublished:r,dateModified:n,author:h,publisher:{"@type":"Organization",name:d||s,logo:{"@type":"ImageObject",url:p}},mainEntityOfPage:{"@type":"WebPage","@id":window.location.href}},y=document.createElement("script");y.type="application/ld+json",y.text=JSON.stringify(f),document.head.appendChild(y)}else if(v||$||N||F||L||j){const e=[];v||e.push("name"),$||e.push("published"),N||e.push("modified"),F||e.push("summary"),L||e.push("author-name"),j||e.push("author-type"),console.warn(`[schema] Blog page schema missing required fields: ${e.join(", ")}`)}}(),{result:"schema initialized",destroy:()=>{}}}function i(e,t,r){const n="{{sync.id}}",o=`${t}-${r}`;Array.from(e.attributes).forEach(t=>{t.value.includes(n)&&e.setAttribute(t.name,t.value.split(n).join(o))}),e.querySelectorAll("*").forEach(e=>{Array.from(e.attributes).forEach(t=>{t.value.includes(n)&&e.setAttribute(t.name,t.value.split(n).join(o))})})}function a(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,null);let n;for(;n=r.nextNode();)n.nodeValue?.trim()&&t.push(n);return t}function c(e){const t=[];return e.hasAttribute("href")&&t.push(e),t.push(...Array.from(e.querySelectorAll("[href]"))),t}function l(e){if(e.hasAttribute("src")){if(e.getAttribute("src"))return e}const t=e.querySelector("[src]");if(t){if(t.getAttribute("src"))return t}return null}function u(e,t,r,n){if(function(e,t){const r=t.attributes.properties.syncField;return null!==e.querySelector(`[${r}]`)}(t,r))return void function(e,t,r,n){const o=r.attributes.properties.syncField;t.querySelectorAll(`[${o}="sync-index"]`).forEach(e=>{const t=a(e);t.length>0?t[0].nodeValue=String(n+1):e.textContent=String(n+1)}),e.querySelectorAll(`[${o}]`).forEach(e=>{const r=e.getAttribute(o),n=t.querySelectorAll(`[${o}="${r}"]`);0!==n.length&&n.forEach(t=>{const r=l(e),n=l(t);if(r&&n){const e=r.getAttribute("src");e&&n.setAttribute("src",e)}else if(e.hasAttribute("href")&&t.hasAttribute("href")){const r=e.getAttribute("href");r&&t.setAttribute("href",r)}else{const r=a(e),n=r.length>0?r[0].nodeValue:e.textContent.trim();if(n){const e=a(t);e.length>0?e[0].nodeValue=n:t.textContent=n}}})})}(e,t,r,n);const o=a(e),s=o.length>0?o[0].nodeValue:"",i=c(e),u=i.length>0?i[0].getAttribute("href"):"";if(s){a(t).forEach(e=>{e.nodeValue=s})}if(u){c(t).forEach(e=>{e.setAttribute("href",u)})}}const d="hs-dupe-no-transition";let m=!1;async function p(t){!function(){if(m)return;const e=document.createElement("style");e.textContent=`\n .${d},\n .${d} * {\n transition: none !important;\n animation: none !important;\n }\n `,document.head.appendChild(e),m=!0}();const r={processedElements:[]};return e(t,"wrapper").forEach(e=>{const t=e.getAttribute("data-hs-dupe");if(!t||"child"!==t&&"self"!==t)return void console.warn('[dupe] Invalid mode. Use "child" or "self":',e);const n=e.getAttribute("data-hs-dupe-count");let o=n?parseInt(n,10):1;(isNaN(o)||o<1)&&(console.warn("[dupe] Invalid count, using default of 1:",e),o=1),o>20&&(console.warn(`[dupe] Count of ${o} exceeds maximum of 20. Capping at 20.`),o=20);const s={hidden:e.hasAttribute("data-hs-dupe-hidden"),noSelect:e.hasAttribute("data-hs-dupe-no-select")};"child"===t?function(e,t,r,n){const o=e.children[0];if(!o)return;const s=[];for(let i=0;i<t;i++){const t=o.cloneNode(!0);t.classList.add(d),h(t,r),e.appendChild(t),s.push(t),t.offsetHeight,requestAnimationFrame(()=>{t.classList.remove(d)})}n.processedElements.push({element:e,mode:"child",clones:s})}(e,o,s,r):"self"===t&&function(e,t,r,n){const o=e.parentNode;if(!o)return void console.warn("[dupe] Element has no parent, cannot duplicate self:",e);const s=[];let i=e;for(let a=0;a<t;a++){const t=e.cloneNode(!0);t.classList.add(d),t.removeAttribute("data-hs-dupe"),t.removeAttribute("data-hs-dupe-count"),t.removeAttribute("data-hs-dupe-hidden"),t.removeAttribute("data-hs-dupe-no-select"),h(t,r),i.nextSibling?o.insertBefore(t,i.nextSibling):o.appendChild(t),s.push(t),i=t,t.offsetHeight,requestAnimationFrame(()=>{t.classList.remove(d)})}n.processedElements.push({element:e,mode:"self",clones:s})}(e,o,s,r)}),{result:`dupe processed ${r.processedElements.length} elements`,destroy:()=>{}}}function h(e,t){if(t.hidden&&e.setAttribute("aria-hidden","true"),t.noSelect){const t=e;t.style.userSelect="none",t.style.webkitUserSelect="none",t.style.msUserSelect="none"}}async function f(){const a={destroyFunctions:[]},c=o.normalize;try{const d=s();d&&"destroy"in d&&"function"==typeof d.destroy&&a.destroyFunctions.push(d.destroy);const m=(l=o.normalize?.replace,function(){const e=new Map,t=n(l,"element");document.querySelectorAll(t).forEach(t=>{const r=t.cloneNode(!0),o=n(l,"hide");r.querySelectorAll(o).forEach(e=>{const t=l.attributes.elements.hide.primary.match(/data-hs-replace-hide/)[0],r=e.getAttribute(t);r&&r.split(" ").filter(e=>e.trim()).some(t=>e.classList.contains(t))&&e.remove()});const s=l.attributes.elements.element.primary.match(/data-hs-replace/)[0],i=t.getAttribute(s),a=r.textContent?.trim()||null,c=t.getAttribute("href");if(i&&(a||c)){const t={text:a,href:c};if(e.has(i)){const r=e.get(i);Array.isArray(r)?r.push(t):e.set(i,[r,t])}else e.set(i,t)}});const r="hsfx-form-persist";try{const t=localStorage.getItem(r);if(t){const n=JSON.parse(t),o=parseInt(n.timestamp,10);Date.now()-o>864e5?localStorage.removeItem(r):Object.entries(n).forEach(([t,r])=>{"timestamp"!==t&&"string"==typeof r&&e.set(`form.${t}`,{text:r,href:null})})}}catch{}const o=(new Date).getFullYear().toString(),s=["January","February","March","April","May","June","July","August","September","October","November","December"][(new Date).getMonth()];e.set("year",{text:o,href:null}),e.set("month",{text:s,href:null});const i=/\{\{[^}]+\}\}/,a=document.createTreeWalker(document.body,NodeFilter.SHOW_TEXT,{acceptNode:e=>{const t=e.textContent||"";return i.test(t)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}}),c=[];let u;for(;u=a.nextNode();)c.push(u);c.forEach(t=>{let r=t.textContent||"",n=!1;for(const[s,i]of e.entries()){const e=`{{${s}}}`;if(r.includes(e)){let t=null;t=Array.isArray(i)?i.map(e=>e.text||e.href).filter(Boolean).join(", "):i.text||i.href,t&&(r=r.replace(new RegExp(e,"g"),t),n=!0)}}const o=/\{\{[^}]+\}\}/g;o.test(r)&&(r=r.replace(o,""),n=!0),n&&(t.textContent=r)}),document.querySelectorAll("a[href]").forEach(t=>{let r=t.getAttribute("href")||"",n=!1;for(const[s,i]of e.entries()){const e=`{{${s}}}`;if(r.includes(e)){let t=null;if(Array.isArray(i)){const e=i[0];t=e.href||e.text}else{if(i.href){t=i.href,r=i.href,n=!0;break}i.text&&(t=i.text)}t&&!n&&(r=r.replace(new RegExp(e,"g"),t),n=!0)}}const o=/\{\{[^}]+\}\}/g;o.test(r)&&(r=r.replace(o,""),n=!0),n&&t.setAttribute("href",r)});const d=document.querySelector("[data-hs-replace-test]");if(d){const t={};for(const[n,o]of e.entries()){const e=`{{${n}}}`;if(Array.isArray(o)){const r=o.map(e=>e.text||e.href).filter(Boolean).join(", ");t[n]={placeholder:e,value:r,type:`Array (${o.length} items)`,items:o.map(e=>e.text||e.href||"(empty)")}}else{const r=o.text||o.href||"(empty)";t[n]={placeholder:e,value:r,...o.text&&{text:o.text},...o.href&&{href:o.href}}}}const r=document.createElement("pre");r.textContent=JSON.stringify(t,null,2),d.innerHTML="",d.appendChild(document.createTextNode(`Replace Module Debug (${e.size} replacements):`)),d.appendChild(r)}document.querySelector("[data-hs-form-persist-clear]")&&localStorage.removeItem(r)}(),{result:"replace initialized",destroy:()=>{}});m&&"destroy"in m&&"function"==typeof m.destroy&&a.destroyFunctions.push(m.destroy);const h=await async function(r){const n=e(r,"source"),o=new Map,s=new Map;n.forEach(e=>{const t=e.getAttribute(r.attributes.properties.syncId),n=e.getAttribute(r.attributes.properties.syncField);t&&o.set(t,e),n&&s.set(n,e)});const a=e(r,"target");let c=0,l=0;return a.forEach(n=>{const a=n.getAttribute(r.attributes.properties.syncId),d=n.getAttribute(r.attributes.properties.syncField),m=n.getAttribute(r.attributes.properties.syncValue);let p;if(d&&m){if(p=s.get(d),!p)return void l++}else{if(!a||""===a.trim())return void l++;if(p=o.get(a),!p)return void l++}const h=t(r,"item",n);if(!h){const e=d||a||"unknown";return void console.warn(`[sync] Target list "${e}" missing item template`)}const f="child"===h.getAttribute(r.attributes.properties.syncMode),y=t(r,"ignore",n);let g,b;if(m){const t=e(r,"item",p),n=Array.from(t).find(e=>e.getAttribute(r.attributes.properties.syncValue)===m);if(!n)return void console.warn(`[sync] No source item found with value "${m}" in field "${d}"`);g=[n]}else if(g=Array.from(e(r,"item",p)),0===g.length)return void console.warn(`[sync] Source list "${a}" has no items`);if(f){const e=h.firstElementChild;if(!e)return void console.warn(`[sync] Target list "${a}" has sync-mode="child" but item wrapper has no children`);b=e.cloneNode(!0)}else b=h.cloneNode(!0),b.removeAttribute(r.attributes.elements.item.primary.split("=")[0]);let A=!1;if(y){let e=y.nextElementSibling;for(;e;){if(e===h){A=!0;break}e=e.nextElementSibling}}if(f){for(;h.firstChild;)h.removeChild(h.firstChild);g.forEach((e,t)=>{const n=b.cloneNode(!0);u(e,n,r,t),a&&i(n,a,t),h.appendChild(n)}),h.removeAttribute(r.attributes.elements.item.primary.split("=")[0])}else{Array.from(n.children).forEach(e=>{e!==y&&e.remove()});const e=Array.from(g).map((e,t)=>{const n=b.cloneNode(!0);return u(e,n,r,t),a&&i(n,a,t),n});y?A?e.forEach(e=>{n.appendChild(e)}):e.forEach(e=>{n.insertBefore(e,y)}):e.forEach(e=>{n.appendChild(e)})}c++}),{result:`sync initialized (${c} synced, ${l} skipped)`,destroy:()=>{}}}(c.sync);h&&"destroy"in h&&"function"==typeof h.destroy&&a.destroyFunctions.push(h.destroy);const f=await p(c.dupe);f&&"destroy"in f&&"function"==typeof f.destroy&&a.destroyFunctions.push(f.destroy);const y=await async function(){const t={processedWrappers:[]};return e(r.clickable,"wrapper").forEach(e=>{const r=e.querySelector(":scope > button"),n=e.querySelector(":scope > a");if(!r||!n)return;const o=n.getAttribute("href");let s,i;o&&""!==o&&"#"!==o?(s=n,i=r):(s=r,i=n);const a="button"===s.getAttribute("data-hs-clickable");a||s.setAttribute("data-hs-clickable","button"),i.remove(),t.processedWrappers.push({wrapper:e,keptElement:s,wasLink:s===n,addedAttribute:!a})}),{result:`clickable processed ${t.processedWrappers.length} wrappers`,destroy:()=>{}}}();return y&&"destroy"in y&&"function"==typeof y.destroy&&a.destroyFunctions.push(y.destroy),{result:"normalize initialized",destroy:()=>{a.destroyFunctions.reverse().forEach(e=>{try{e()}catch(t){console.error("[normalize] Error during cleanup:",t)}}),a.destroyFunctions.length=0}}}catch(d){throw console.error("[normalize] Initialization failed:",d),a.destroyFunctions.reverse().forEach(e=>{try{e()}catch(t){console.error("[normalize] Error during error cleanup:",t)}}),d}var l}export{f as init};
|
|
1
|
+
import{q as e,a as t,g as r,b as n,c as o}from"./hsfxutilsCm-S93Uw.js";function s(){return function(){const e=window.location.origin,t=e=>{const t=document.querySelector(`[data-hs-replace="${e}"]`);return t?.textContent?.trim()||""},r=t("company"),n=t("phone"),o=t("email"),s=t("city"),i=t("state"),a=t("zipcode"),c={"@context":"https://schema.org","@type":"LocalBusiness",name:r,url:e,telephone:n,email:o},l=document.querySelector('[data-hs-replace="business-logo"] img');l&&l.src&&(c.image=l.src);const u={"@type":"PostalAddress",addressLocality:s,addressRegion:i,postalCode:a,addressCountry:"US"},d=t("street-address");d&&(u.streetAddress=d),c.address=u;const m=t("business-latitude"),p=t("business-longitude");m&&p&&(c.geo={"@type":"GeoCoordinates",latitude:m,longitude:p});const h=["facebook","instagram","linkedin","pinterest","tiktok","x","youtube"].map(e=>(e=>{const t=document.querySelector(`[data-hs-replace="${e}"]`);return t?.href||""})(e)).filter(e=>e&&""!==e.trim()&&!e.includes("placeholder"));h.length>0&&(c.sameAs=h);const f=document.querySelector('[data-hs-schema="services"]');if(f){const e=f.querySelectorAll('[data-hs-schema-list="item"]'),t=Array.from(e).map(e=>e.textContent?.trim()).filter(e=>e&&""!==e);t.length>0&&(c.serviceType=t)}const y=document.querySelector('[data-hs-schema="areas"]');if(y){const e=y.querySelectorAll('[data-hs-schema-list="item"]'),t=Array.from(e).map(e=>({"@type":"City",name:e.textContent?.trim()||""})).filter(e=>e.name&&""!==e.name);t.length>0&&(c.areaServed=t)}const g=document.createElement("script");g.type="application/ld+json",g.text=JSON.stringify(c),document.head.appendChild(g);const b=document.querySelector('[data-hs-schema="breadcrumb"]')?.textContent?.trim()||"",A=window.location.pathname.split("/").filter(e=>""!==e);if(A.length>0){const t={"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:"Home",item:e}]},r=A[0],n=r.split("-").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ");t.itemListElement.push({"@type":"ListItem",position:2,name:n,item:e+"/"+r}),b&&t.itemListElement.push({"@type":"ListItem",position:3,name:b,item:window.location.href});const o=document.createElement("script");o.type="application/ld+json",o.text=JSON.stringify(t),document.head.appendChild(o)}if(document.querySelector('[data-hs-accordion-type="faq"]')){const e=[];if(document.querySelectorAll('[data-hs-accordion="list"]').forEach(t=>{t.querySelectorAll('[data-hs-accordion-type="faq"]').forEach(t=>{const r=t.querySelector('[data-hs-accordion="toggle"]'),n=t.querySelector('[data-hs-accordion="content"]');if(r&&n){const t=r.textContent?.trim(),o=n.innerHTML.trim();e.push({"@type":"Question",name:t,acceptedAnswer:{"@type":"Answer",text:o}})}})}),e.length>0){const t={"@context":"https://schema.org","@type":"FAQPage",mainEntity:e},r=document.createElement("script");r.type="application/ld+json",r.text=JSON.stringify(t),document.head.appendChild(r)}}const S=document.querySelector('[data-hs-schema-service="name"]'),x=document.querySelector('[data-hs-schema-service="description"]');if(S&&x){const e=S.textContent?.trim()||"",t=x.textContent?.trim()||"";if(e&&t){const r={"@context":"https://schema.org","@type":"Service",name:e,description:t},n=document.createElement("script");n.type="application/ld+json",n.text=JSON.stringify(r),document.head.appendChild(n)}}else(S||x)&&console.warn('[schema] Service page schema requires both "name" and "description" elements');const E=document.querySelector('[data-hs-schema-faq="question"]'),q=document.querySelector('[data-hs-schema-faq="answer"]'),C=document.querySelector('[data-hs-schema-faq="published"]'),w=document.querySelector('[data-hs-schema-faq="modified"]');if(E&&q&&C&&w){const e=E.textContent?.trim()||"",t=q.innerHTML.trim(),r=C.textContent?.trim()||"",n=w.textContent?.trim()||"";if(e&&t&&r&&n){const o={"@context":"https://schema.org","@type":"QAPage",mainEntity:{"@type":"Question",name:e,text:e,answerCount:1,datePublished:r,dateModified:n,acceptedAnswer:{"@type":"Answer",text:t}}},s=document.createElement("script");s.type="application/ld+json",s.text=JSON.stringify(o),document.head.appendChild(s)}}else if(E||q||C||w){const e=[];E||e.push("question"),q||e.push("answer"),C||e.push("published"),w||e.push("modified"),console.warn(`[schema] FAQ page schema missing required fields: ${e.join(", ")}`)}const v=document.querySelector('[data-hs-schema-blog="name"]'),$=document.querySelector('[data-hs-schema-blog="published"]'),N=document.querySelector('[data-hs-schema-blog="modified"]'),F=document.querySelector('[data-hs-schema-blog="summary"]'),L=document.querySelector('[data-hs-schema-blog="author-name"]'),j=document.querySelector('[data-hs-schema-blog="author-type"]');if(v&&$&&N&&F&&L&&j){const e=v.textContent?.trim()||"",r=$.textContent?.trim()||"",n=N.textContent?.trim()||"",o=F.textContent?.trim()||"",s=L.textContent?.trim()||"",i=j.textContent?.trim()||"Organization",a=document.querySelector('[data-hs-schema-blog="author-role"]'),c=document.querySelector('[data-hs-schema-blog="author-image"]'),l=a?.textContent?.trim()||"",u=c?.src||"",d=t("company"),m=document.querySelector('[data-hs-replace="business-logo"] img'),p=m?m.src:"";let h;"Person"===i?(h={"@type":"Person",name:s},l&&(h.jobTitle=l),u&&(h.image=u)):(h={"@type":"Organization",name:s},p&&(h.logo=p));const f={"@context":"https://schema.org","@type":"BlogPosting",headline:e,description:o,datePublished:r,dateModified:n,author:h,publisher:{"@type":"Organization",name:d||s,logo:{"@type":"ImageObject",url:p}},mainEntityOfPage:{"@type":"WebPage","@id":window.location.href}},y=document.createElement("script");y.type="application/ld+json",y.text=JSON.stringify(f),document.head.appendChild(y)}else if(v||$||N||F||L||j){const e=[];v||e.push("name"),$||e.push("published"),N||e.push("modified"),F||e.push("summary"),L||e.push("author-name"),j||e.push("author-type"),console.warn(`[schema] Blog page schema missing required fields: ${e.join(", ")}`)}}(),{result:"schema initialized",destroy:()=>{}}}function i(e,t,r){const n="{{sync.id}}",o=`${t}-${r}`;Array.from(e.attributes).forEach(t=>{t.value.includes(n)&&e.setAttribute(t.name,t.value.split(n).join(o))}),e.querySelectorAll("*").forEach(e=>{Array.from(e.attributes).forEach(t=>{t.value.includes(n)&&e.setAttribute(t.name,t.value.split(n).join(o))})})}function a(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,null);let n;for(;n=r.nextNode();)n.nodeValue?.trim()&&t.push(n);return t}function c(e){const t=[];return e.hasAttribute("href")&&t.push(e),t.push(...Array.from(e.querySelectorAll("[href]"))),t}function l(e){if(e.hasAttribute("src")){if(e.getAttribute("src"))return e}const t=e.querySelector("[src]");if(t){if(t.getAttribute("src"))return t}return null}function u(e,t,r,n){if(function(e,t){const r=t.attributes.properties.syncField;return null!==e.querySelector(`[${r}]`)}(t,r))return void function(e,t,r,n){const o=r.attributes.properties.syncField;t.querySelectorAll(`[${o}="sync-index"]`).forEach(e=>{const t=a(e);t.length>0?t[0].nodeValue=String(n+1):e.textContent=String(n+1)}),e.querySelectorAll(`[${o}]`).forEach(e=>{const r=e.getAttribute(o),n=t.querySelectorAll(`[${o}="${r}"]`);0!==n.length&&n.forEach(t=>{const r=l(e),n=l(t);if(r&&n){const e=r.getAttribute("src");e&&n.setAttribute("src",e)}else if(e.hasAttribute("href")&&t.hasAttribute("href")){const r=e.getAttribute("href");r&&t.setAttribute("href",r)}else{const r=a(e),n=r.length>0?r[0].nodeValue:e.textContent.trim();if(n){const e=a(t);e.length>0?e[0].nodeValue=n:t.textContent=n}}})})}(e,t,r,n);const o=a(e),s=o.length>0?o[0].nodeValue:"",i=c(e),u=i.length>0?i[0].getAttribute("href"):"";if(s){a(t).forEach(e=>{e.nodeValue=s})}if(u){c(t).forEach(e=>{e.setAttribute("href",u)})}}const d="hs-dupe-no-transition";let m=!1;async function p(t){!function(){if(m)return;const e=document.createElement("style");e.textContent=`\n .${d},\n .${d} * {\n transition: none !important;\n animation: none !important;\n }\n `,document.head.appendChild(e),m=!0}();const r={processedElements:[]};return e(t,"wrapper").forEach(e=>{const t=e.getAttribute("data-hs-dupe");if(!t||"child"!==t&&"self"!==t)return void console.warn('[dupe] Invalid mode. Use "child" or "self":',e);const n=e.getAttribute("data-hs-dupe-count");let o=n?parseInt(n,10):1;(isNaN(o)||o<1)&&(console.warn("[dupe] Invalid count, using default of 1:",e),o=1),o>20&&(console.warn(`[dupe] Count of ${o} exceeds maximum of 20. Capping at 20.`),o=20);const s={hidden:e.hasAttribute("data-hs-dupe-hidden"),noSelect:e.hasAttribute("data-hs-dupe-no-select")};"child"===t?function(e,t,r,n){const o=e.children[0];if(!o)return;const s=[];for(let i=0;i<t;i++){const t=o.cloneNode(!0);t.classList.add(d),h(t,r),e.appendChild(t),s.push(t),t.offsetHeight,requestAnimationFrame(()=>{t.classList.remove(d)})}n.processedElements.push({element:e,mode:"child",clones:s})}(e,o,s,r):"self"===t&&function(e,t,r,n){const o=e.parentNode;if(!o)return void console.warn("[dupe] Element has no parent, cannot duplicate self:",e);const s=[];let i=e;for(let a=0;a<t;a++){const t=e.cloneNode(!0);t.classList.add(d),t.removeAttribute("data-hs-dupe"),t.removeAttribute("data-hs-dupe-count"),t.removeAttribute("data-hs-dupe-hidden"),t.removeAttribute("data-hs-dupe-no-select"),h(t,r),i.nextSibling?o.insertBefore(t,i.nextSibling):o.appendChild(t),s.push(t),i=t,t.offsetHeight,requestAnimationFrame(()=>{t.classList.remove(d)})}n.processedElements.push({element:e,mode:"self",clones:s})}(e,o,s,r)}),{result:`dupe processed ${r.processedElements.length} elements`,destroy:()=>{}}}function h(e,t){if(t.hidden&&e.setAttribute("aria-hidden","true"),t.noSelect){const t=e;t.style.userSelect="none",t.style.webkitUserSelect="none",t.style.msUserSelect="none"}}async function f(){const a={destroyFunctions:[]},c=o.normalize;try{const d=s();d&&"destroy"in d&&"function"==typeof d.destroy&&a.destroyFunctions.push(d.destroy);const m=(l=o.normalize?.replace,function(){const e=new Map,t=n(l,"element");document.querySelectorAll(t).forEach(t=>{const r=t.cloneNode(!0),o=n(l,"hide");r.querySelectorAll(o).forEach(e=>{const t=l.attributes.elements.hide.primary.match(/data-hs-replace-hide/)[0],r=e.getAttribute(t);r&&r.split(" ").filter(e=>e.trim()).some(t=>e.classList.contains(t))&&e.remove()});const s=l.attributes.elements.element.primary.match(/data-hs-replace/)[0],i=t.getAttribute(s),a=r.textContent?.trim()||null,c=t.getAttribute("href");if(i&&(a||c)){const t={text:a,href:c};if(e.has(i)){const r=e.get(i);Array.isArray(r)?r.push(t):e.set(i,[r,t])}else e.set(i,t)}});const r="hsfx-form-persist";try{const t=localStorage.getItem(r);if(t){const n=JSON.parse(t),o=parseInt(n.timestamp,10);Date.now()-o>864e5?localStorage.removeItem(r):Object.entries(n).forEach(([t,r])=>{"timestamp"!==t&&"string"==typeof r&&e.set(`form.${t}`,{text:r,href:null})})}}catch{}const o=(new Date).getFullYear().toString(),s=["January","February","March","April","May","June","July","August","September","October","November","December"][(new Date).getMonth()];e.set("year",{text:o,href:null}),e.set("month",{text:s,href:null});const i=/\{\{[^}]+\}\}/,a=document.createTreeWalker(document.body,NodeFilter.SHOW_TEXT,{acceptNode:e=>{const t=e.textContent||"";return i.test(t)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}}),c=[];let u;for(;u=a.nextNode();)c.push(u);c.forEach(t=>{let r=t.textContent||"",n=!1;for(const[s,i]of e.entries()){const e=`{{${s}}}`;if(r.includes(e)){let t=null;t=Array.isArray(i)?i.map(e=>e.text||e.href).filter(Boolean).join(", "):i.text||i.href,t&&(r=r.replace(new RegExp(e,"g"),t),n=!0)}}const o=/\{\{[^}]+\}\}/g;o.test(r)&&(r=r.replace(o,""),n=!0),n&&(t.textContent=r)}),document.querySelectorAll("a[href]").forEach(t=>{let r=t.getAttribute("href")||"",n=!1;for(const[s,i]of e.entries()){const e=`{{${s}}}`;if(r.includes(e)){let t=null;if(Array.isArray(i)){const e=i[0];t=e.href||e.text}else{if(i.href){t=i.href,r=i.href,n=!0;break}i.text&&(t=i.text)}t&&!n&&(r=r.replace(new RegExp(e,"g"),t),n=!0)}}const o=/\{\{[^}]+\}\}/g;o.test(r)&&(r=r.replace(o,""),n=!0),n&&t.setAttribute("href",r)});const d=document.querySelector("[data-hs-replace-test]");if(d){const t={};for(const[n,o]of e.entries()){const e=`{{${n}}}`;if(Array.isArray(o)){const r=o.map(e=>e.text||e.href).filter(Boolean).join(", ");t[n]={placeholder:e,value:r,type:`Array (${o.length} items)`,items:o.map(e=>e.text||e.href||"(empty)")}}else{const r=o.text||o.href||"(empty)";t[n]={placeholder:e,value:r,...o.text&&{text:o.text},...o.href&&{href:o.href}}}}const r=document.createElement("pre");r.textContent=JSON.stringify(t,null,2),d.innerHTML="",d.appendChild(document.createTextNode(`Replace Module Debug (${e.size} replacements):`)),d.appendChild(r)}document.querySelector("[data-hs-form-persist-clear]")&&localStorage.removeItem(r)}(),{result:"replace initialized",destroy:()=>{}});m&&"destroy"in m&&"function"==typeof m.destroy&&a.destroyFunctions.push(m.destroy);const h=await async function(r){const n=e(r,"source"),o=new Map,s=new Map;n.forEach(e=>{const t=e.getAttribute(r.attributes.properties.syncId),n=e.getAttribute(r.attributes.properties.syncField);t&&o.set(t,e),n&&s.set(n,e)});const a=e(r,"target");let c=0,l=0;return a.forEach(n=>{const a=n.getAttribute(r.attributes.properties.syncId),d=n.getAttribute(r.attributes.properties.syncField),m=n.getAttribute(r.attributes.properties.syncValue);let p;if(d&&m){if(p=s.get(d),!p)return void l++}else{if(!a||""===a.trim())return void l++;if(p=o.get(a),!p)return void l++}const h=t(r,"item",n);if(!h){const e=d||a||"unknown";return void console.warn(`[sync] Target list "${e}" missing item template`)}const f="child"===h.getAttribute(r.attributes.properties.syncMode),y=t(r,"ignore",n);let g,b;if(m){const t=e(r,"item",p),n=Array.from(t).find(e=>e.getAttribute(r.attributes.properties.syncValue)===m);if(!n)return void console.warn(`[sync] No source item found with value "${m}" in field "${d}"`);g=[n]}else if(g=Array.from(e(r,"item",p)),0===g.length)return void console.warn(`[sync] Source list "${a}" has no items`);if(f){const e=h.firstElementChild;if(!e)return void console.warn(`[sync] Target list "${a}" has sync-mode="child" but item wrapper has no children`);b=e.cloneNode(!0)}else b=h.cloneNode(!0),b.removeAttribute(r.attributes.elements.item.primary.split("=")[0]);let A=!1;if(y){let e=y.nextElementSibling;for(;e;){if(e===h){A=!0;break}e=e.nextElementSibling}}if(f){for(;h.firstChild;)h.removeChild(h.firstChild);g.forEach((e,t)=>{const n=b.cloneNode(!0);u(e,n,r,t),a&&i(n,a,t),h.appendChild(n)}),h.removeAttribute(r.attributes.elements.item.primary.split("=")[0])}else{Array.from(n.children).forEach(e=>{e!==y&&e.remove()});const e=Array.from(g).map((e,t)=>{const n=b.cloneNode(!0);return u(e,n,r,t),a&&i(n,a,t),n});y?A?e.forEach(e=>{n.appendChild(e)}):e.forEach(e=>{n.insertBefore(e,y)}):e.forEach(e=>{n.appendChild(e)})}c++}),{result:`sync initialized (${c} synced, ${l} skipped)`,destroy:()=>{}}}(c.sync);h&&"destroy"in h&&"function"==typeof h.destroy&&a.destroyFunctions.push(h.destroy);const f=await p(c.dupe);f&&"destroy"in f&&"function"==typeof f.destroy&&a.destroyFunctions.push(f.destroy);const y=await async function(){const t={processedWrappers:[]};return e(r.clickable,"wrapper").forEach(e=>{const r=e.querySelector(":scope > button"),n=e.querySelector(":scope > a");if(!r||!n)return;const o=n.getAttribute("href");let s,i;o&&""!==o&&"#"!==o?(s=n,i=r):(s=r,i=n);const a="button"===s.getAttribute("data-hs-clickable");a||s.setAttribute("data-hs-clickable","button"),i.remove(),t.processedWrappers.push({wrapper:e,keptElement:s,wasLink:s===n,addedAttribute:!a})}),{result:`clickable processed ${t.processedWrappers.length} wrappers`,destroy:()=>{}}}();return y&&"destroy"in y&&"function"==typeof y.destroy&&a.destroyFunctions.push(y.destroy),{result:"normalize initialized",destroy:()=>{a.destroyFunctions.reverse().forEach(e=>{try{e()}catch(t){console.error("[normalize] Error during cleanup:",t)}}),a.destroyFunctions.length=0}}}catch(d){throw console.error("[normalize] Initialization failed:",d),a.destroyFunctions.reverse().forEach(e=>{try{e()}catch(t){console.error("[normalize] Error during error cleanup:",t)}}),d}var l}export{f as init};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a={_global:{apiName:"hsfx",attributes:{height:"data-hs-height",heightValue:"element",heightDuration:"data-hs-height-duration",heightEase:"data-hs-height-ease",moduleType:"data-hs-module-type",module:"data-hs-module"},classes:{modalOpen:"hs-modal-open",overflowHidden:"u-overflow-hidden",displayContents:"u-display-contents",active:"is-active",gsap:"hs-gsap",loading:"hs-loading",loaded:"hs-loaded",ready:"hs-ready"},cssVars:{prefix:"--_hs---",state:{name:"state",values:{active:"1",inactive:"0"}},clip:{name:"clip"},scrollOffset:{name:"scroll-offset"}},clickable:{module:"global-clickable",attributes:{elements:{wrapper:{primary:"data-hs-clickable='wrapper'",aliases:[]},button:{primary:"data-hs-clickable='button'",aliases:[]}}}}},normalize:{sync:{module:"sync",attributes:{elements:{source:{primary:"data-hs-sync='source'",aliases:[]},target:{primary:"data-hs-sync='target'",aliases:[]},item:{primary:"data-hs-sync='item'",aliases:[]},ignore:{primary:"data-hs-sync='ignore'",aliases:[]}},properties:{syncId:"data-hs-sync-id",syncField:"data-hs-sync-field",syncMode:"data-hs-sync-mode",syncValue:"data-hs-sync-value"}}},clickable:{module:"clickable",attributes:{elements:{wrapper:{primary:"data-hs-clickable='wrapper'",aliases:[]}}},normalize:{module:"normalize",attributes:{elements:{wrapper:{primary:"data-hs-clickable='wrapper'",aliases:[]},button:{primary:"data-hs-clickable='button'",aliases:[]}}}}},dupe:{module:"dupe",attributes:{elements:{wrapper:{primary:"data-hs-dupe",aliases:[]}},properties:{count:"data-hs-dupe-count",hidden:"data-hs-dupe-hidden",noSelect:"data-hs-dupe-no-select"}},modes:{child:"Duplicates the first direct child element",self:"Duplicates the element itself as a sibling"},modifiers:{hidden:"Adds aria-hidden='true' to clones for accessibility",noSelect:"Adds user-select: none to clones to prevent text selection"},limits:{maxCount:20}},schema:{module:"schema",attributes:{elements:{breadcrumb:{primary:"data-hs-schema='breadcrumb'",aliases:[]},services:{primary:"data-hs-schema='services'",aliases:[]},areas:{primary:"data-hs-schema='areas'",aliases:[]},"list-item":{primary:"data-hs-schema-list='item'",aliases:[]},service:{primary:"data-hs-schema='service'",aliases:[]},"service-name":{primary:"data-hs-schema-service='name'",aliases:[]},"service-description":{primary:"data-hs-schema-service='description'",aliases:[]},"faq-page":{primary:"data-hs-schema='faq-page'",aliases:[]},"faq-question":{primary:"data-hs-schema-faq='question'",aliases:[]},"faq-answer":{primary:"data-hs-schema-faq='answer'",aliases:[]},"faq-published":{primary:"data-hs-schema-faq='published'",aliases:[]},"faq-modified":{primary:"data-hs-schema-faq='modified'",aliases:[]},blog:{primary:"data-hs-schema='blog'",aliases:[]},"blog-name":{primary:"data-hs-schema-blog='name'",aliases:[]},"blog-published":{primary:"data-hs-schema-blog='published'",aliases:[]},"blog-modified":{primary:"data-hs-schema-blog='modified'",aliases:[]},"blog-summary":{primary:"data-hs-schema-blog='summary'",aliases:[]},"blog-author-name":{primary:"data-hs-schema-blog='author-name'",aliases:[]},"blog-author-type":{primary:"data-hs-schema-blog='author-type'",aliases:[]},"blog-author-role":{primary:"data-hs-schema-blog='author-role'",aliases:[]},"blog-author-image":{primary:"data-hs-schema-blog='author-image'",aliases:[]}}}},replace:{module:"replace",attributes:{elements:{element:{primary:"data-hs-replace",aliases:[]},hide:{primary:"data-hs-replace-hide",aliases:[]}}}}},default:{transition:{module:"transition",attributes:{elements:{wrapper:{primary:"data-hs-transition='wrapper'",aliases:["data-hs-transition='element'"]},exitTrigger:{primary:"data-hs-transition-exit-trigger",aliases:[]},enterTrigger:{primary:"data-hs-transition-enter-trigger",aliases:[]},trigger:{primary:"data-hs-transition-trigger",aliases:[]},namespace:{primary:"data-hs-transition-namespace",aliases:[]},exitTime:{primary:"data-hs-transition-exit-time",aliases:["data-hs-exit-time"]},firstDelay:{primary:"data-hs-transition-first-delay",aliases:["data-hs-delay"]}}}},"smooth-scroll":{module:"smooth-scroll",attributes:{elements:{"offset-proxy":{primary:"data-hs-scroll-offset='proxy'",aliases:[]}}}},"active-link":{module:"active-link",attributes:{elements:{wrapper:{primary:"data-hs-active='wrapper'",aliases:[]},trigger:{primary:"data-trigger",aliases:[]}}}},accordion:{module:"accordion",attributes:{elements:{wrapper:{primary:"data-hs-accordion='wrapper'",aliases:[]},toggle:{primary:"data-hs-accordion='toggle'",aliases:[]},content:{primary:"data-hs-accordion='content'",aliases:[]},state:{primary:"data-hs-accordion-text='state'",aliases:[]}},properties:{default:"data-hs-accordion-default",open:"data-hs-accordion-open",closed:"data-hs-accordion-closed"}}},navbar:{module:"navbar",attributes:{elements:{wrapper:{primary:"data-hs-nav='wrapper'",aliases:[]},"skip-link":{primary:"data-hs-nav='skip-link'",aliases:[]}}},dropdown:{module:"dropdown",attributes:{elements:{wrapper:{primary:"data-hs-nav-dropdown='wrapper'",aliases:[]},list:{primary:"data-hs-nav-dropdown='list'",aliases:[]}},properties:{type:"data-hs-nav-dropdown-type"}},types:{hover:"Desktop behavior: hover + full keyboard navigation (ArrowDown/Up, Space, Enter, Escape)",click:"Mobile/accordion behavior: click only + simple keyboard (Space, Enter, Escape)"}},menu:{module:"menu",attributes:{elements:{wrapper:{primary:"data-hs-nav-menu='wrapper'",aliases:[]},button:{primary:"data-hs-nav-menu='button'",aliases:[]}},properties:{anchorClose:"data-hs-nav-menu-anchor-close"}}},"arrow-navigation":{module:"arrow-navigation"}},toc:{module:"toc",attributes:{elements:{content:{primary:"data-hs-toc='content'",aliases:[]},list:{primary:"data-hs-toc='list'",aliases:[]}}},"progress-bar":{module:"progress-bar",attributes:{elements:{wrapper:{primary:"data-hs-toc-progress='wrapper'",aliases:[]},element:{primary:"data-hs-toc-progress='element'",aliases:[]}}}}},pagination:{module:"pagination",attributes:{elements:{wrapper:{primary:"data-hs-pagination='wrapper'",aliases:[]},list:{primary:"data-hs-pagination='list'",aliases:[]},controls:{primary:"data-hs-pagination='controls'",aliases:[]},previous:{primary:"data-hs-pagination='previous'",aliases:[]},next:{primary:"data-hs-pagination='next'",aliases:[]},counter:{primary:"data-hs-pagination='counter'",aliases:[]},dots:{primary:"data-hs-pagination='dots'",aliases:[]}},properties:{show:"data-hs-pagination-show",showMobile:"data-hs-pagination-show-mobile"}}},comparison:{module:"comparison",attributes:{elements:{wrapper:{primary:"data-hs-comparison='wrapper'",aliases:[]},"template-list":{primary:"data-hs-comparison-template='list'",aliases:[]},"template-item":{primary:"data-hs-comparison-template='item'",aliases:[]},"template-name":{primary:"data-hs-comparison-template='name'",aliases:[]},"template-description":{primary:"data-hs-comparison-template='description'",aliases:[]},"template-before-image":{primary:"data-hs-comparison-template='before-image'",aliases:[]},"template-after-image":{primary:"data-hs-comparison-template='after-image'",aliases:[]},name:{primary:"data-hs-comparison='name'",aliases:[]},description:{primary:"data-hs-comparison='description'",aliases:[]},"image-wrapper":{primary:"data-hs-comparison='image-wrapper'",aliases:[]},"before-image":{primary:"data-hs-comparison-image='before'",aliases:[]},"after-image":{primary:"data-hs-comparison-image='after'",aliases:[]},slider:{primary:"data-hs-comparison='slider'",aliases:[]},pagination:{primary:"data-hs-comparison='pagination'",aliases:[]}},properties:{modeType:"data-hs-comparison-mode",navType:"data-hs-comparison-nav"}}},tabs:{module:"tabs",attributes:{elements:{wrapper:{primary:"data-hs-tab='wrapper'",aliases:[]},links:{primary:"data-hs-tab='links'",aliases:[]},list:{primary:"data-hs-tab='list'",aliases:[]}},properties:{autoplay:"data-hs-tab-autoplay",duration:"data-hs-tab-duration",hover:"data-hs-tab-hover",animation:"data-hs-tab-animation",animationDuration:"data-hs-tab-animation-duration",controls:"data-hs-tab-controls"}},cssVars:{progress:"progress"}},modal:{module:"modal",attributes:{elements:{wrapper:{primary:"data-hs-modal='wrapper'",aliases:[]},close:{primary:"data-hs-modal='close'",aliases:[]}},properties:{id:"data-hs-modal-id",open:"data-hs-modal-open"}}},lightbox:{module:"lightbox",attributes:{elements:{wrapper:{primary:"data-hs-lightbox='wrapper'",aliases:[]},list:{primary:"data-hs-lightbox='list'",aliases:[]},row:{primary:"data-hs-lightbox='row'",aliases:[]},previous:{primary:"data-hs-lightbox='previous'",aliases:[]},next:{primary:"data-hs-lightbox='next'",aliases:[]}},properties:{animation:"data-hs-lightbox-animation",id:"data-hs-lightbox-id",button:"data-hs-lightbox-button"}}},slider:{module:"slider",attributes:{elements:{component:{primary:"data-hs-slider='component'",aliases:[]},element:{primary:"data-hs-slider='element'",aliases:[]},list:{primary:"data-hs-slider='list'",aliases:[]},previous:{primary:"data-hs-slider='previous'",aliases:[]},next:{primary:"data-hs-slider='next'",aliases:[]},dots:{primary:"data-hs-slider='dots'",aliases:[]},"draggable-wrapper":{primary:"data-hs-slider='draggable-wrapper'",aliases:[]},"draggable-element":{primary:"data-hs-slider='draggable-element'",aliases:[]}},properties:{follow:"data-hs-slider-follow",free:"data-hs-slider-free",wheel:"data-hs-slider-wheel",toClicked:"data-hs-slider-to-clicked",speed:"data-hs-slider-speed",infinite:"data-hs-slider-infinite"}}},form:{persist:{module:"persist",attributes:{elements:{field:{primary:"data-hs-form-persist",aliases:[]}}}},honeypot:{module:"honeypot",attributes:{elements:{"form-handler":{primary:"data-hs-form='form-handler'",aliases:[]}}}},range:{module:"range",attributes:{elements:{wrapper:{primary:"data-hs-form-range='wrapper'",aliases:[]},output:{primary:"data-hs-form-range='output'",aliases:[]}}},cssVars:{progress:"progress"}},test:{module:"form-test",attributes:{elements:{wrapper:{primary:"data-hs-form-test='wrapper'",aliases:[]},info:{primary:"data-hs-form-test='info'",aliases:[]}}}},select:{module:"select",attributes:{elements:{wrapper:{primary:"data-hs-form-select='wrapper'",aliases:[]},list:{primary:"data-hs-form-select='list'",aliases:[]},button:{primary:"data-hs-form-select='button'",aliases:[]}}},states:{module:"select-states",attributes:{elements:{states:{primary:"data-hs-form-select='states'",aliases:[]}}}},"custom-select":{module:"select-custom",attributes:{elements:{wrapper:{primary:"data-hs-form-select='wrapper'",aliases:[]},list:{primary:"data-hs-form-select='list'",aliases:[]},button:{primary:"data-hs-form-select='button'",aliases:[]}}}}}},"theme-animator":{module:"theme-animator",attributes:{elements:{template:{primary:"data-hs-theme-template",aliases:[]}}},defaults:{prefix:"--_theme---",duration:.5,ease:"power2.inOut"}}},animations:{}};function e(a,e){const t=a.attributes?.elements?.[e];if(!t)return console.warn(`[attributeSelector] No config for element: ${e}`),"";return[`[${t.primary}]`,...(t.aliases||[]).map(a=>`[${a}]`)].join(", ")}function t(a,t,s=document){const r=e(a,t);return s.querySelectorAll(r)}function s(a,t,s=document){const r=e(a,t);return s.querySelector(r)}function r(){return document.documentElement.getAttributeNames().some(a=>a.startsWith("data-wf-"))}async function i(){return new Promise(a=>{const e=()=>{const t=document.documentElement,s=t.classList.contains("w-mod-ix3"),r=t.hasAttribute("data-wf-ix-ready");s||r?a():setTimeout(e,50)};e()})}let o=!1,l=0,n=0,d=!1;function m(){if(d||!u())return;const a=window.gsap;let e=window.scrollY,t=performance.now(),s=0,r=0;window.ScrollTrigger.create({onUpdate:()=>{const a=window.scrollY,r=performance.now(),i=a-e,o=r-t;i>0?n=1:i<0&&(n=-1),o>0&&(s=Math.abs(i)/o*1e3),e=a,t=r}}),a.ticker.add(()=>{r+=.08*(s-r),s*=.95,Math.abs(r)<.1&&(r=0),Math.abs(s)<.1&&(s=0),l=r}),d=!0}function p(){return l}function c(){return n}function h(){return void 0!==window.gsap}function u(){return void 0!==window.ScrollTrigger}function g(){return void 0!==window.Draggable}function y(a,e=!0){return h()?{gsap:window.gsap,ScrollTrigger:window.ScrollTrigger,Draggable:window.Draggable}:(e&&!o?(console.warn("[gsap] GSAP library not detected. Some animations will be skipped. Add GSAP to your project: https://greensock.com/docs/v3/Installation"),o=!0):a&&!o&&(console.warn(`[${a}] GSAP not available, module will use fallback behavior`),o=!0),null)}function b(a,e,t="warn"){const s=[];if(e.forEach(a=>{"ScrollTrigger"!==a||u()?"Draggable"!==a||g()||s.push("Draggable"):s.push("ScrollTrigger")}),0===s.length)return;const r=s.join(", "),i="error"===t?`[${a}] Missing required GSAP plugin(s): ${r}. Module will not work correctly. Add to your project: https://greensock.com/docs/v3/Installation`:`[${a}] Missing optional GSAP plugin(s): ${r}. Some features will be disabled. Add for full functionality: https://greensock.com/docs/v3/Installation`;"error"===t?console.error(i):console.warn(i)}function f(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}const w=Object.freeze(Object.defineProperty({__proto__:null,getGsap:y,getScrollDirection:c,getScrollVelocity:p,hasDraggable:g,hasGsap:h,hasScrollTrigger:u,initScrollAnimations:async function(){if(await i(),h()&&document.body.scrollHeight>window.innerHeight){const a=window.gsap,e=window.scrollY;a.set(window,{scrollTo:e+1}),a.set(window,{scrollTo:e})}},initScrollVelocityTracking:m,prefersReducedMotion:f,warnMissingDependencies:b},Symbol.toStringTag,{value:"Module"}));const v=new class{#a=new Map;async animate(e,t,s={}){const r=y("heightAnimator");if(!r)return;const{gsap:i}=r,o=a._global.attributes.height,l=a._global.attributes.heightValue,n=a._global.attributes.heightDuration,d=a._global.attributes.heightEase,m=e.hasAttribute?.(o)&&e.getAttribute(o)===l?e:e.querySelector?.(`[${o}="${l}"]`)||e,p=this.#a.get(m);p&&(p.kill(),this.#a.delete(m));let c=m.getAttribute(n),h=m.getAttribute(d);!c&&m.parentElement&&(c=m.parentElement.getAttribute(n)),!h&&m.parentElement&&(h=m.parentElement.getAttribute(d));let u=c?parseInt(c,10)/1e3:(s.duration||300)/1e3;f()&&(u=0);const g=h||s.ease||"power2.inOut",b=i.to(m,{height:t?"auto":0,duration:u,ease:g});this.#a.set(m,b);try{await b.then()}finally{this.#a.delete(m)}}setHeight(e,t){const s=y("heightAnimator");if(!s)return;const{gsap:r}=s,i=a._global.attributes.height,o=a._global.attributes.heightValue,l=e.hasAttribute?.(i)&&e.getAttribute(i)===o?e:e.querySelector?.(`[${i}="${o}"]`)||e;r.set(l,{height:t?"auto":0})}cancelAll(){this.#a.forEach(a=>a.kill()),this.#a.clear()}},x=v.animate.bind(v),k=v.setHeight.bind(v),A=a._global.apiName;let S=0;const E=[],M=[];let q=!0,_=null;function T(){if(!q)return null;if(_)return _;const a=window;return a.lenis&&"function"==typeof a.lenis.stop&&"function"==typeof a.lenis.start?(_=a.lenis,a.lenis):null}function D(){if(S++,1===S){const t=a._global.classes.modalOpen,s=a._global.classes.overflowHidden;document.body.classList.add(s,t);const r=T();if(r)try{r.stop()}catch(e){console.error("[modalManager] Error stopping Lenis:",e)}E.forEach(a=>{try{a()}catch(e){console.error("[modalManager] Error in open callback:",e)}})}}function $(){if(S--,0===S){const t=a._global.classes.modalOpen,s=a._global.classes.overflowHidden;document.body.classList.remove(s,t);const r=T();if(r)try{r.start()}catch(e){console.error("[modalManager] Error starting Lenis:",e)}M.forEach(a=>{try{a()}catch(e){console.error("[modalManager] Error in close callback:",e)}})}S<0&&(console.warn("[modalManager] Modal count went negative, resetting to 0"),S=0)}if("undefined"!=typeof window){const a=window;a[A]=a[A]||{},a[A].modal={open:D,close:$,getCount:function(){return S},isOpen:function(){return S>0},onOpen:function(a){return"function"!=typeof a?(console.warn("[modalManager] onModalOpen requires a function"),()=>{}):(E.push(a),()=>{const e=E.indexOf(a);e>-1&&E.splice(e,1)})},onClose:function(a){return"function"!=typeof a?(console.warn("[modalManager] onModalClose requires a function"),()=>{}):(M.push(a),()=>{const e=M.indexOf(a);e>-1&&M.splice(e,1)})},setLenisEnabled:function(a){q=a,a||(_=null)}}}const O=a._global.cssVars,V={state:O.prefix+O.state.name,clip:O.prefix+O.clip?.name};function j(a){const e=new Map;return{scan:async function(){const t=[],s=a.filter(a=>{const s=document.querySelector(a.selector);return s&&e.has(a.name)?(t.push({name:a.name,status:"already-loaded"}),!1):s}).map(a=>a.import().then(e=>({module:a,moduleExports:e,success:!0})).catch(e=>({module:a,error:e,success:!1}))),r=await Promise.allSettled(s);for(const a of r)if("fulfilled"===a.status&&a.value.success){const{module:s,moduleExports:r}=a.value;try{const{init:a}=r,i=void 0!==s.config?await a(s.config):await a();e.set(s.name,i),t.push({name:s.name,status:"loaded"})}catch(l){const a=l instanceof Error?l.message:String(l);console.error(`[orchestrator] Failed to initialize ${s.name}:`,l),t.push({name:s.name,status:"failed",error:a})}}else if("fulfilled"!==a.status||a.value.success)"rejected"===a.status&&console.error("[orchestrator] Unexpected error:",a.reason);else{const e=a.value,{module:s,error:r}=e,i=r instanceof Error?r.message:String(r);console.error(`[orchestrator] Failed to load ${s.name}:`,r),t.push({name:s.name,status:"failed",error:i})}const i=t.filter(a=>"loaded"===a.status),o=t.filter(a=>"failed"===a.status);return{results:t,loaded:i,failed:o}},destroy:function(){e.forEach((a,e)=>{try{a?.destroy&&a.destroy()}catch(t){console.error(`[orchestrator] Error destroying ${e}:`,t)}}),e.clear()}}}const P=a._global;export{s as a,e as b,a as c,y as d,x as e,$ as f,P as g,V as h,r as i,b as j,g as k,u as l,j as m,m as n,D as o,f as p,t as q,c as r,k as s,p as t,w as u,i as w};
|
|
1
|
+
const a={_global:{apiName:"hsfx",attributes:{height:"data-hs-height",heightValue:"element",heightDuration:"data-hs-height-duration",heightEase:"data-hs-height-ease",moduleType:"data-hs-module-type",module:"data-hs-module"},classes:{modalOpen:"hs-modal-open",overflowHidden:"u-overflow-hidden",displayContents:"u-display-contents",active:"is-active",gsap:"hs-gsap",loading:"hs-loading",loaded:"hs-loaded",ready:"hs-ready"},cssVars:{prefix:"--_hs---",state:{name:"state",values:{active:"1",inactive:"0"}},clip:{name:"clip"},scrollOffset:{name:"scroll-offset"}},clickable:{module:"global-clickable",attributes:{elements:{wrapper:{primary:"data-hs-clickable='wrapper'",aliases:[]},button:{primary:"data-hs-clickable='button'",aliases:[]}}}}},normalize:{sync:{module:"sync",attributes:{elements:{source:{primary:"data-hs-sync='source'",aliases:[]},target:{primary:"data-hs-sync='target'",aliases:[]},item:{primary:"data-hs-sync='item'",aliases:[]},ignore:{primary:"data-hs-sync='ignore'",aliases:[]}},properties:{syncId:"data-hs-sync-id",syncField:"data-hs-sync-field",syncMode:"data-hs-sync-mode",syncValue:"data-hs-sync-value"}}},clickable:{module:"clickable",attributes:{elements:{wrapper:{primary:"data-hs-clickable='wrapper'",aliases:[]}}},normalize:{module:"normalize",attributes:{elements:{wrapper:{primary:"data-hs-clickable='wrapper'",aliases:[]},button:{primary:"data-hs-clickable='button'",aliases:[]}}}}},dupe:{module:"dupe",attributes:{elements:{wrapper:{primary:"data-hs-dupe",aliases:[]}},properties:{count:"data-hs-dupe-count",hidden:"data-hs-dupe-hidden",noSelect:"data-hs-dupe-no-select"}},modes:{child:"Duplicates the first direct child element",self:"Duplicates the element itself as a sibling"},modifiers:{hidden:"Adds aria-hidden='true' to clones for accessibility",noSelect:"Adds user-select: none to clones to prevent text selection"},limits:{maxCount:20}},schema:{module:"schema",attributes:{elements:{breadcrumb:{primary:"data-hs-schema='breadcrumb'",aliases:[]},services:{primary:"data-hs-schema='services'",aliases:[]},areas:{primary:"data-hs-schema='areas'",aliases:[]},"list-item":{primary:"data-hs-schema-list='item'",aliases:[]},service:{primary:"data-hs-schema='service'",aliases:[]},"service-name":{primary:"data-hs-schema-service='name'",aliases:[]},"service-description":{primary:"data-hs-schema-service='description'",aliases:[]},"faq-page":{primary:"data-hs-schema='faq-page'",aliases:[]},"faq-question":{primary:"data-hs-schema-faq='question'",aliases:[]},"faq-answer":{primary:"data-hs-schema-faq='answer'",aliases:[]},"faq-published":{primary:"data-hs-schema-faq='published'",aliases:[]},"faq-modified":{primary:"data-hs-schema-faq='modified'",aliases:[]},blog:{primary:"data-hs-schema='blog'",aliases:[]},"blog-name":{primary:"data-hs-schema-blog='name'",aliases:[]},"blog-published":{primary:"data-hs-schema-blog='published'",aliases:[]},"blog-modified":{primary:"data-hs-schema-blog='modified'",aliases:[]},"blog-summary":{primary:"data-hs-schema-blog='summary'",aliases:[]},"blog-author-name":{primary:"data-hs-schema-blog='author-name'",aliases:[]},"blog-author-type":{primary:"data-hs-schema-blog='author-type'",aliases:[]},"blog-author-role":{primary:"data-hs-schema-blog='author-role'",aliases:[]},"blog-author-image":{primary:"data-hs-schema-blog='author-image'",aliases:[]}}}},replace:{module:"replace",attributes:{elements:{element:{primary:"data-hs-replace",aliases:[]},hide:{primary:"data-hs-replace-hide",aliases:[]}}}}},default:{transition:{module:"transition",attributes:{elements:{wrapper:{primary:"data-hs-transition='wrapper'",aliases:["data-hs-transition='element'"]},exitTrigger:{primary:"data-hs-transition-exit-trigger",aliases:[]},enterTrigger:{primary:"data-hs-transition-enter-trigger",aliases:[]},trigger:{primary:"data-hs-transition-trigger",aliases:[]},namespace:{primary:"data-hs-transition-namespace",aliases:[]},exitTime:{primary:"data-hs-transition-exit-time",aliases:["data-hs-exit-time"]},firstDelay:{primary:"data-hs-transition-first-delay",aliases:["data-hs-delay"]}}}},"smooth-scroll":{module:"smooth-scroll",attributes:{elements:{"offset-proxy":{primary:"data-hs-scroll-offset='proxy'",aliases:[]}}}},"active-link":{module:"active-link",attributes:{elements:{wrapper:{primary:"data-hs-active='wrapper'",aliases:[]},trigger:{primary:"data-trigger",aliases:[]}}}},accordion:{module:"accordion",attributes:{elements:{wrapper:{primary:"data-hs-accordion='wrapper'",aliases:[]},toggle:{primary:"data-hs-accordion='toggle'",aliases:[]},content:{primary:"data-hs-accordion='content'",aliases:[]},state:{primary:"data-hs-accordion-text='state'",aliases:[]}},properties:{default:"data-hs-accordion-default",open:"data-hs-accordion-open",closed:"data-hs-accordion-closed"}}},navbar:{module:"navbar",attributes:{elements:{wrapper:{primary:"data-hs-nav='wrapper'",aliases:[]},"skip-link":{primary:"data-hs-nav='skip-link'",aliases:[]}}},dropdown:{module:"dropdown",attributes:{elements:{wrapper:{primary:"data-hs-nav-dropdown='wrapper'",aliases:[]},list:{primary:"data-hs-nav-dropdown='list'",aliases:[]}},properties:{type:"data-hs-nav-dropdown-type"}},types:{hover:"Desktop behavior: hover + full keyboard navigation (ArrowDown/Up, Space, Enter, Escape)",click:"Mobile/accordion behavior: click only + simple keyboard (Space, Enter, Escape)"}},menu:{module:"menu",attributes:{elements:{wrapper:{primary:"data-hs-nav-menu='wrapper'",aliases:[]},button:{primary:"data-hs-nav-menu='button'",aliases:[]}},properties:{anchorClose:"data-hs-nav-menu-anchor-close"}}},"arrow-navigation":{module:"arrow-navigation"}},toc:{module:"toc",attributes:{elements:{content:{primary:"data-hs-toc='content'",aliases:[]},list:{primary:"data-hs-toc='list'",aliases:[]}}},"progress-bar":{module:"progress-bar",attributes:{elements:{wrapper:{primary:"data-hs-toc-progress='wrapper'",aliases:[]},element:{primary:"data-hs-toc-progress='element'",aliases:[]}}}}},pagination:{module:"pagination",attributes:{elements:{wrapper:{primary:"data-hs-pagination='wrapper'",aliases:[]},list:{primary:"data-hs-pagination='list'",aliases:[]},controls:{primary:"data-hs-pagination='controls'",aliases:[]},previous:{primary:"data-hs-pagination='previous'",aliases:[]},next:{primary:"data-hs-pagination='next'",aliases:[]},counter:{primary:"data-hs-pagination='counter'",aliases:[]},dots:{primary:"data-hs-pagination='dots'",aliases:[]}},properties:{show:"data-hs-pagination-show",showMobile:"data-hs-pagination-show-mobile"}}},comparison:{module:"comparison",attributes:{elements:{wrapper:{primary:"data-hs-comparison='wrapper'",aliases:[]},"template-list":{primary:"data-hs-comparison-template='list'",aliases:[]},"template-item":{primary:"data-hs-comparison-template='item'",aliases:[]},"template-name":{primary:"data-hs-comparison-template='name'",aliases:[]},"template-description":{primary:"data-hs-comparison-template='description'",aliases:[]},"template-before-image":{primary:"data-hs-comparison-template='before-image'",aliases:[]},"template-after-image":{primary:"data-hs-comparison-template='after-image'",aliases:[]},name:{primary:"data-hs-comparison='name'",aliases:[]},description:{primary:"data-hs-comparison='description'",aliases:[]},"image-wrapper":{primary:"data-hs-comparison='image-wrapper'",aliases:[]},"before-image":{primary:"data-hs-comparison-image='before'",aliases:[]},"after-image":{primary:"data-hs-comparison-image='after'",aliases:[]},slider:{primary:"data-hs-comparison='slider'",aliases:[]},pagination:{primary:"data-hs-comparison='pagination'",aliases:[]}},properties:{modeType:"data-hs-comparison-mode",navType:"data-hs-comparison-nav"}}},tabs:{module:"tabs",attributes:{elements:{wrapper:{primary:"data-hs-tab='wrapper'",aliases:[]},links:{primary:"data-hs-tab='links'",aliases:[]},list:{primary:"data-hs-tab='list'",aliases:[]}},properties:{autoplay:"data-hs-tab-autoplay",duration:"data-hs-tab-duration",hover:"data-hs-tab-hover",animation:"data-hs-tab-animation",animationDuration:"data-hs-tab-animation-duration",controls:"data-hs-tab-controls"}},cssVars:{progress:"progress"}},modal:{module:"modal",attributes:{elements:{wrapper:{primary:"data-hs-modal='wrapper'",aliases:[]},close:{primary:"data-hs-modal='close'",aliases:[]}},properties:{id:"data-hs-modal-id",open:"data-hs-modal-open"}}},lightbox:{module:"lightbox",attributes:{elements:{wrapper:{primary:"data-hs-lightbox='wrapper'",aliases:[]},list:{primary:"data-hs-lightbox='list'",aliases:[]},row:{primary:"data-hs-lightbox='row'",aliases:[]},previous:{primary:"data-hs-lightbox='previous'",aliases:[]},next:{primary:"data-hs-lightbox='next'",aliases:[]}},properties:{animation:"data-hs-lightbox-animation",id:"data-hs-lightbox-id",button:"data-hs-lightbox-button"}}},slider:{module:"slider",attributes:{elements:{component:{primary:"data-hs-slider='component'",aliases:[]},element:{primary:"data-hs-slider='element'",aliases:[]},list:{primary:"data-hs-slider='list'",aliases:[]},previous:{primary:"data-hs-slider='previous'",aliases:[]},next:{primary:"data-hs-slider='next'",aliases:[]},dots:{primary:"data-hs-slider='dots'",aliases:[]},"draggable-wrapper":{primary:"data-hs-slider='draggable-wrapper'",aliases:[]},"draggable-element":{primary:"data-hs-slider='draggable-element'",aliases:[]}},properties:{follow:"data-hs-slider-follow",free:"data-hs-slider-free",wheel:"data-hs-slider-wheel",toClicked:"data-hs-slider-to-clicked",speed:"data-hs-slider-speed",infinite:"data-hs-slider-infinite"}}},form:{persist:{module:"persist",attributes:{elements:{field:{primary:"data-hs-form-persist",aliases:[]}}}},honeypot:{module:"honeypot",attributes:{elements:{"form-handler":{primary:"data-hs-form='form-handler'",aliases:[]}}}},range:{module:"range",attributes:{elements:{wrapper:{primary:"data-hs-form-range='wrapper'",aliases:[]},output:{primary:"data-hs-form-range='output'",aliases:[]}}},cssVars:{progress:"progress"}},test:{module:"form-test",attributes:{elements:{wrapper:{primary:"data-hs-form-test='wrapper'",aliases:[]},info:{primary:"data-hs-form-test='info'",aliases:[]}}}},select:{module:"select",attributes:{elements:{wrapper:{primary:"data-hs-form-select='wrapper'",aliases:[]},list:{primary:"data-hs-form-select='list'",aliases:[]},button:{primary:"data-hs-form-select='button'",aliases:[]}}},states:{module:"select-states",attributes:{elements:{states:{primary:"data-hs-form-select='states'",aliases:[]}}}},"custom-select":{module:"select-custom",attributes:{elements:{wrapper:{primary:"data-hs-form-select='wrapper'",aliases:[]},list:{primary:"data-hs-form-select='list'",aliases:[]},button:{primary:"data-hs-form-select='button'",aliases:[]}}}}},multistep:{module:"multistep",attributes:{elements:{wrapper:{primary:"data-hs-form-multistep='wrapper'",aliases:[]},step:{primary:"data-hs-form-multistep='step'",aliases:[]},next:{primary:"data-hs-form-multistep='next'",aliases:[]},previous:{primary:"data-hs-form-multistep='previous'",aliases:[]},submit:{primary:"data-hs-form-multistep='submit'",aliases:[]},"progress-bar":{primary:"data-hs-form-multistep='progress-bar'",aliases:[]},"progress-fill":{primary:"data-hs-form-multistep='progress-fill'",aliases:[]},"step-current":{primary:"data-hs-form-multistep-text='current'",aliases:[]},"step-total":{primary:"data-hs-form-multistep-text='total'",aliases:[]},"step-label":{primary:"data-hs-form-multistep-text='label'",aliases:[]}},properties:{animation:"data-hs-form-multistep-animation",animationDuration:"data-hs-form-multistep-animation-duration",validateOn:"data-hs-form-multistep-validate",label:"data-hs-form-multistep-label"}},defaults:{animation:"fade",animationDuration:.3,validateOn:"input"}}},"theme-animator":{module:"theme-animator",attributes:{elements:{template:{primary:"data-hs-theme-template",aliases:[]}}},defaults:{prefix:"--_theme---",duration:.5,ease:"power2.inOut"}}},animations:{}};function e(a,e){const t=a.attributes?.elements?.[e];if(!t)return console.warn(`[attributeSelector] No config for element: ${e}`),"";return[`[${t.primary}]`,...(t.aliases||[]).map(a=>`[${a}]`)].join(", ")}function t(a,t,s=document){const r=e(a,t);return s.querySelectorAll(r)}function s(a,t,s=document){const r=e(a,t);return s.querySelector(r)}function r(){return document.documentElement.getAttributeNames().some(a=>a.startsWith("data-wf-"))}async function i(){return new Promise(a=>{const e=()=>{const t=document.documentElement,s=t.classList.contains("w-mod-ix3"),r=t.hasAttribute("data-wf-ix-ready");s||r?a():setTimeout(e,50)};e()})}let o=!1,l=0,n=0,m=!1;function d(){if(m||!h())return;const a=window.gsap;let e=window.scrollY,t=performance.now(),s=0,r=0;window.ScrollTrigger.create({onUpdate:()=>{const a=window.scrollY,r=performance.now(),i=a-e,o=r-t;i>0?n=1:i<0&&(n=-1),o>0&&(s=Math.abs(i)/o*1e3),e=a,t=r}}),a.ticker.add(()=>{r+=.08*(s-r),s*=.95,Math.abs(r)<.1&&(r=0),Math.abs(s)<.1&&(s=0),l=r}),m=!0}function p(){return l}function c(){return n}function u(){return void 0!==window.gsap}function h(){return void 0!==window.ScrollTrigger}function g(){return void 0!==window.Draggable}function y(a,e=!0){return u()?{gsap:window.gsap,ScrollTrigger:window.ScrollTrigger,Draggable:window.Draggable}:(e&&!o?(console.warn("[gsap] GSAP library not detected. Some animations will be skipped. Add GSAP to your project: https://greensock.com/docs/v3/Installation"),o=!0):a&&!o&&(console.warn(`[${a}] GSAP not available, module will use fallback behavior`),o=!0),null)}function b(a,e,t="warn"){const s=[];if(e.forEach(a=>{"ScrollTrigger"!==a||h()?"Draggable"!==a||g()||s.push("Draggable"):s.push("ScrollTrigger")}),0===s.length)return;const r=s.join(", "),i="error"===t?`[${a}] Missing required GSAP plugin(s): ${r}. Module will not work correctly. Add to your project: https://greensock.com/docs/v3/Installation`:`[${a}] Missing optional GSAP plugin(s): ${r}. Some features will be disabled. Add for full functionality: https://greensock.com/docs/v3/Installation`;"error"===t?console.error(i):console.warn(i)}function f(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}const w=Object.freeze(Object.defineProperty({__proto__:null,getGsap:y,getScrollDirection:c,getScrollVelocity:p,hasDraggable:g,hasGsap:u,hasScrollTrigger:h,initScrollAnimations:async function(){if(await i(),u()&&document.body.scrollHeight>window.innerHeight){const a=window.gsap,e=window.scrollY;a.set(window,{scrollTo:e+1}),a.set(window,{scrollTo:e})}},initScrollVelocityTracking:d,prefersReducedMotion:f,warnMissingDependencies:b},Symbol.toStringTag,{value:"Module"}));const v=new class{#a=new Map;async animate(e,t,s={}){const r=y("heightAnimator");if(!r)return;const{gsap:i}=r,o=a._global.attributes.height,l=a._global.attributes.heightValue,n=a._global.attributes.heightDuration,m=a._global.attributes.heightEase,d=e.hasAttribute?.(o)&&e.getAttribute(o)===l?e:e.querySelector?.(`[${o}="${l}"]`)||e,p=this.#a.get(d);p&&(p.kill(),this.#a.delete(d));let c=d.getAttribute(n),u=d.getAttribute(m);!c&&d.parentElement&&(c=d.parentElement.getAttribute(n)),!u&&d.parentElement&&(u=d.parentElement.getAttribute(m));let h=c?parseInt(c,10)/1e3:(s.duration||300)/1e3;f()&&(h=0);const g=u||s.ease||"power2.inOut",b=i.to(d,{height:t?"auto":0,duration:h,ease:g});this.#a.set(d,b);try{await b.then()}finally{this.#a.delete(d)}}setHeight(e,t){const s=y("heightAnimator");if(!s)return;const{gsap:r}=s,i=a._global.attributes.height,o=a._global.attributes.heightValue,l=e.hasAttribute?.(i)&&e.getAttribute(i)===o?e:e.querySelector?.(`[${i}="${o}"]`)||e;r.set(l,{height:t?"auto":0})}cancelAll(){this.#a.forEach(a=>a.kill()),this.#a.clear()}},x=v.animate.bind(v),k=v.setHeight.bind(v),A=a._global.apiName;let S=0;const E=[],M=[];let q=!0,_=null;function D(){if(!q)return null;if(_)return _;const a=window;return a.lenis&&"function"==typeof a.lenis.stop&&"function"==typeof a.lenis.start?(_=a.lenis,a.lenis):null}function T(){if(S++,1===S){const t=a._global.classes.modalOpen,s=a._global.classes.overflowHidden;document.body.classList.add(s,t);const r=D();if(r)try{r.stop()}catch(e){console.error("[modalManager] Error stopping Lenis:",e)}E.forEach(a=>{try{a()}catch(e){console.error("[modalManager] Error in open callback:",e)}})}}function O(){if(S--,0===S){const t=a._global.classes.modalOpen,s=a._global.classes.overflowHidden;document.body.classList.remove(s,t);const r=D();if(r)try{r.start()}catch(e){console.error("[modalManager] Error starting Lenis:",e)}M.forEach(a=>{try{a()}catch(e){console.error("[modalManager] Error in close callback:",e)}})}S<0&&(console.warn("[modalManager] Modal count went negative, resetting to 0"),S=0)}if("undefined"!=typeof window){const a=window;a[A]=a[A]||{},a[A].modal={open:T,close:O,getCount:function(){return S},isOpen:function(){return S>0},onOpen:function(a){return"function"!=typeof a?(console.warn("[modalManager] onModalOpen requires a function"),()=>{}):(E.push(a),()=>{const e=E.indexOf(a);e>-1&&E.splice(e,1)})},onClose:function(a){return"function"!=typeof a?(console.warn("[modalManager] onModalClose requires a function"),()=>{}):(M.push(a),()=>{const e=M.indexOf(a);e>-1&&M.splice(e,1)})},setLenisEnabled:function(a){q=a,a||(_=null)}}}const $=a._global.cssVars,V={state:$.prefix+$.state.name,clip:$.prefix+$.clip?.name};function j(a){const e=new Map;return{scan:async function(){const t=[],s=a.filter(a=>{const s=document.querySelector(a.selector);return s&&e.has(a.name)?(t.push({name:a.name,status:"already-loaded"}),!1):s}).map(a=>a.import().then(e=>({module:a,moduleExports:e,success:!0})).catch(e=>({module:a,error:e,success:!1}))),r=await Promise.allSettled(s);for(const a of r)if("fulfilled"===a.status&&a.value.success){const{module:s,moduleExports:r}=a.value;try{const{init:a}=r,i=void 0!==s.config?await a(s.config):await a();e.set(s.name,i),t.push({name:s.name,status:"loaded"})}catch(l){const a=l instanceof Error?l.message:String(l);console.error(`[orchestrator] Failed to initialize ${s.name}:`,l),t.push({name:s.name,status:"failed",error:a})}}else if("fulfilled"!==a.status||a.value.success)"rejected"===a.status&&console.error("[orchestrator] Unexpected error:",a.reason);else{const e=a.value,{module:s,error:r}=e,i=r instanceof Error?r.message:String(r);console.error(`[orchestrator] Failed to load ${s.name}:`,r),t.push({name:s.name,status:"failed",error:i})}const i=t.filter(a=>"loaded"===a.status),o=t.filter(a=>"failed"===a.status);return{results:t,loaded:i,failed:o}},destroy:function(){e.forEach((a,e)=>{try{a?.destroy&&a.destroy()}catch(t){console.error(`[orchestrator] Error destroying ${e}:`,t)}}),e.clear()}}}const P=a._global;export{s as a,e as b,a as c,y as d,x as e,O as f,P as g,V as h,r as i,b as j,g as k,h as l,j as m,d as n,T as o,f as p,t as q,c as r,k as s,p as t,w as u,i as w};
|
|
Binary file
|
|
Binary file
|
package/dist/main.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/
|
|
2
|
-
import{c as e}from"./assets/
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./assets/hsfxnormalizeWk_QT7bQ.js","./assets/hsfxutilsCm-S93Uw.js","./assets/hsfxdefaultmzleUy4_.js","./assets/hsfxanimationsB0vls1Xd.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{c as e}from"./assets/hsfxutilsCm-S93Uw.js";const t={},s=function(e,s,o){let r=Promise.resolve();if(s&&s.length>0){let e=function(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:"fulfilled",value:e}),e=>({status:"rejected",reason:e}))))};const a=document.getElementsByTagName("link"),n=document.querySelector("meta[property=csp-nonce]"),l=n?.nonce||n?.getAttribute("nonce");r=e(s.map(e=>{if(e=function(e,t){return new URL(e,t).href}(e,o),e in t)return;t[e]=!0;const s=e.endsWith(".css"),r=s?'[rel="stylesheet"]':"";if(o)for(let t=a.length-1;t>=0;t--){const o=a[t];if(o.href===e&&(!s||"stylesheet"===o.rel))return}else if(document.querySelector(`link[href="${e}"]${r}`))return;const n=document.createElement("link");return n.rel=s?"stylesheet":"modulepreload",s||(n.as="script"),n.crossOrigin="",n.href=e,l&&n.setAttribute("nonce",l),document.head.appendChild(n),s?new Promise((t,s)=>{n.addEventListener("load",t),n.addEventListener("error",()=>s(new Error(`Unable to preload CSS for ${e}`)))}):void 0}))}function a(e){const t=new Event("vite:preloadError",{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(const e of t||[])"rejected"===e.status&&a(e.reason);return e().catch(a)})},o=e._global.apiName;(async()=>{if(window[o]&&!Array.isArray(window[o])&&window[o].loaded)return;const t=Array.isArray(window[o])?window[o]:[],r={normalize:()=>s(()=>import("./assets/hsfxnormalizeWk_QT7bQ.js"),__vite__mapDeps([0,1]),import.meta.url),default:()=>s(()=>import("./assets/hsfxdefaultmzleUy4_.js"),__vite__mapDeps([2,1]),import.meta.url),animations:()=>s(()=>import("./assets/hsfxanimationsB0vls1Xd.js"),__vite__mapDeps([3,1]),import.meta.url)};let a=[...document.querySelectorAll(`script[type="module"][src="${import.meta.url}"]`)];0===a.length&&(a=[...document.querySelectorAll('script[type="module"][src*="@hsfx/attr"]')].filter(e=>{const t=e.src,s=import.meta.url,o=t.match(/@hsfx\/attr(@[\d.]+)?/)?.[0],r=s.match(/@hsfx\/attr(@[\d.]+)?/)?.[0];return o&&r&&o.split("@")[0]===r.split("@")[0]}));const n={isSPA:a.some(e=>"true"===e.getAttribute("data-hs-spa"))},l={normalize:{modules:["normalize"],parallel:!1},default:{modules:["default"],parallel:!0}},i=async e=>{const t=window[o];if(t.process.has(e))return t.modules[e]?.loading;t.process.add(e);const s=t.modules[e]||{};let a;t.modules[e]=s,s.loading=new Promise((e,t)=>{s.resolve=e,s.reject=t});try{const{init:o}=await r[e](),n=await o()||{};a=n.destroy;const l=n.result;return s.destroy=()=>{a?.(),t.process.delete(e)},s.restart=()=>{s.destroy?.(),t.load(e)},s.resolve?.(l),delete s.resolve,delete s.reject,l}catch(n){throw a?.(),s.reject?.(n),t.process.delete(e),n}},d=async e=>{const t=l[e];if(t.parallel){const e=t.modules.map(e=>i(e));await Promise.allSettled(e)}else for(const s of t.modules)await i(s)},c=async()=>{await Promise.allSettled([r.normalize(),r.default(),r.animations()]),await d("normalize");const e=d("default"),t=i("animations");await e,(()=>{const e=new CustomEvent(`${o}:dom-ready`);window.dispatchEvent(e)})();const{initScrollAnimations:a}=await s(async()=>{const{initScrollAnimations:e}=await import("./assets/hsfxutilsCm-S93Uw.js").then(e=>e.u);return{initScrollAnimations:e}},[],import.meta.url);Promise.all([t,a()]).catch(e=>{console.error(`[${o}] Phase 3 (animations + scroll trigger) failed:`,e)})},u=[];window[o]={scripts:a,settings:n,modules:{},process:new Set,load:i,loaded:!1,push(...e){for(const[t,s]of e)"function"==typeof s?this.modules[t]?.loading?.then(s):this.load(t)},destroy(){for(const e in this.modules)this.modules[e]?.destroy?.()},async reinitialize(){this.loaded=!1,this.destroy(),this.modules={},this.process=new Set,await this.scanForEmbedModules(),await c(),this.loaded=!0},async scanForEmbedModules(){document.querySelectorAll(".w-embed").forEach(e=>{e.querySelectorAll("script[data-hs-module]").forEach(e=>{const t=e.getAttribute("data-hs-module-type"),s=e.getAttribute("data-hs-module");if(t&&s){const e=`data-hs-${t}-${s}`;r[e]&&this.load(e)}})})},ready(e){"function"==typeof e&&(this.loaded?e():u.push(e))},status(e){return e?{loaded:!!this.modules[e],loading:this.process.has(e)}:{loaded:Object.keys(this.modules),loading:[...this.process],phases:l}}};(async()=>{window[o].push(...t),document.querySelectorAll("iframe").forEach(e=>{const t=e.src;t&&(e.src="",e.src=t)}),await c(),window[o].loaded=!0,document.documentElement.classList.add(e._global.classes.ready),u.forEach(e=>{try{e()}catch{}}),u.length=0})().catch(()=>{})})();export{s as _};
|
package/dist/main.js.br
CHANGED
|
Binary file
|
package/dist/main.js.gz
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/hsfxcounterCHBYPnnN.js","assets/hsfxutilsBiyhgSbR.js","assets/hsfxmarqueeBZW0uarL.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{_ as e}from"../main.js";import{m as t}from"./hsfxutilsBiyhgSbR.js";const r=[{name:"counter",selector:'[data-hs-anim="counter"]',import:()=>e(()=>import("./hsfxcounterCHBYPnnN.js"),__vite__mapDeps([0,1]))},{name:"marquee",selector:'[data-hs-marquee="wrapper"]',import:()=>e(()=>import("./hsfxmarqueeBZW0uarL.js"),__vite__mapDeps([2,1]))}],a=(()=>{const e=r.filter(e=>document.querySelector(e.selector)).map(e=>e.import().catch(t=>(console.error(`[animations] Failed to preload ${e.name}:`,t),null)));return Promise.allSettled(e)})();async function o(){await a;const e=t(r),{loaded:o}=await e.scan();return{result:`animations initialized (${o.length} active)`,rescan:e.scan,destroy:e.destroy}}export{o as init};
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e,c as t,i as n,w as r,d as o,p as s,q as a,b as i,g as l,s as c,e as u,o as d,f,h as p,j as m,k as h,l as g}from"./hsfxutilsBiyhgSbR.js";const v=t._global,y=t.default.transition,b=v.apiName;async function w(){const t=e(y,"wrapper");if(!t)return{result:"transition skipped - no wrapper found",destroy:()=>{}};const o="data-hs-transition-initialized";if(t.hasAttribute(o))return{result:"transition already initialized",destroy:()=>{}};t.setAttribute(o,"true");const s=window[b]?.settings?.isSPA||!1,a=new Map;let i=null,l=null;const c=(e,n=null,r=t)=>{const o=y.attributes.elements.trigger.primary.match(/data-[^=]+/)?.[0],s=y.attributes.elements.namespace.primary.match(/data-[^=]+/)?.[0];if(!o||!s)return null;const a=r.querySelectorAll(`[${o}="${e}"]`);if(a.length>0){if(n){const t=r.querySelector(`[${s}="${n}"]`);if(t){const n=t.querySelector(`[${o}="${e}"]`);if(n)return n}}const t=Array.from(a).find(e=>{let t=e.parentElement;for(;t&&t!==r;){if(t.hasAttribute(s))return!1;t=t.parentElement}return!0});if(t)return t}const i="exit"===e?y.attributes.elements.exitTrigger.primary.match(/data-[^=]+/)?.[0]:y.attributes.elements.enterTrigger.primary.match(/data-[^=]+/)?.[0];if(!i)return null;const l=r.querySelectorAll(`[${i}]`);if(l.length>0){if(n){const e=r.querySelector(`[${s}="${n}"]`);if(e){const t=e.querySelector(`[${i}]`);if(t)return t}}const e=Array.from(l).find(e=>{let t=e.parentElement;for(;t&&t!==r;){if(t.hasAttribute(s))return!1;t=t.parentElement}return!0});if(e)return e}return null},u=(e=null)=>new Promise(n=>{const r=c("exit",e);if(!r)return void n();const o=(()=>{const e=y.attributes.elements.exitTime.primary.match(/data-[^=]+/)?.[0];if(!e)return 0;const n=t.getAttribute(e);return n?1e3*parseFloat(n):0})();r.click(),setTimeout(()=>n(),o)}),d=(e=null)=>new Promise(n=>{const r=c("enter",e);if(!r)return void n();const o=!sessionStorage.getItem("transition-loaded"),s=(()=>{const e=y.attributes.elements.firstDelay.primary.match(/data-[^=]+/)?.[0];if(!e)return 0;const n=t.getAttribute(e);return n?1e3*parseFloat(n):0})(),a=()=>{r.click(),o&&sessionStorage.setItem("transition-loaded","true"),n()};o&&s>0?i=setTimeout(a,s):a()}),f=e=>{u(e?.detail?.namespace||null)},p=e=>{d(e?.detail?.namespace||null)};if(a.set(`${b}:transition-exit`,f),a.set(`${b}:transition-enter`,p),window.addEventListener(`${b}:transition-exit`,f),window.addEventListener(`${b}:transition-enter`,p),!s){const e=e=>{const t=e.target.closest("a[href]");if(t&&t.hostname===window.location.hostname&&t.getAttribute("href")&&-1===t.getAttribute("href").indexOf("#")&&"_blank"!==t.getAttribute("target")){e.preventDefault();const n=t.href;u().then(()=>{window.location.href=n})}};a.set("click",e),document.addEventListener("click",e);const t=e=>{e.persisted&&window.location.reload()};a.set("pageshow",t),window.addEventListener("pageshow",t)}const m=()=>{t&&(t.style.display="none")};if(a.set("resize",m),window.addEventListener("resize",m),!s){const e=async()=>{n()&&(l=setTimeout(()=>{t.classList.add(v.classes.loading)},2e3),await r(),l&&(clearTimeout(l),l=null),t.classList.remove(v.classes.loading),t.classList.add(v.classes.loaded)),d()};a.set(`${b}:dom-ready`,e),window.addEventListener(`${b}:dom-ready`,e,{once:!0})}return{result:"transition initialized",destroy:()=>{i&&clearTimeout(i),l&&clearTimeout(l),a.forEach((e,t)=>{if("click"===t||"pageshow"===t||"resize"===t){("click"===t?document:window).removeEventListener(t,e)}else window.removeEventListener(t,e)}),a.clear(),t.removeAttribute(o)}}}async function E(t){let n=null,r=null;function a(n){const r=n.target.closest('a[href^="#"]');if(!r)return;const a=r.getAttribute("href");if(!a||"#"===a)return;const i=a.substring(1),l=document.getElementById(i);if(l){n.preventDefault(),history.replaceState&&history.replaceState(null,null,`#${l.id}`);!function(e,t=0){if(!e)return;const n=o("smooth-scroll",!1);if(s()||!n){const n=e.getBoundingClientRect().top+window.scrollY-t;return window.scrollTo(0,n),e.setAttribute("tabindex","-1"),void e.focus({preventScroll:!0})}n.gsap.to(window,{duration:1,scrollTo:{y:e,offsetY:t},ease:"power2.out",onComplete:function(){e.setAttribute("tabindex","-1"),e.focus({preventScroll:!0})}})}(l,function(){const n=e(t,"offset-proxy");if(console.log("[smooth-scroll] Proxy element:",n),n&&n instanceof HTMLElement){const e=getComputedStyle(n).top,t=parseFloat(e)||0;return console.log("[smooth-scroll] Computed top:",e,"-> offset:",t),t}return console.log("[smooth-scroll] No proxy element found, using offset: 0"),0}())}}return"undefined"!=typeof $&&$(document).off("click.wf-scroll"),document.documentElement.style.scrollBehavior="auto",document.body.style.scrollBehavior="auto",n=a,r=e=>{"Enter"!==e.key&&" "!==e.key||a(e)},document.addEventListener("click",n),document.addEventListener("keydown",r),{result:"autoInit-smooth-scroll initialized",destroy:()=>{n&&(document.removeEventListener("click",n),n=null),r&&(document.removeEventListener("keydown",r),r=null),document.documentElement.style.scrollBehavior="",document.body.style.scrollBehavior=""}}}let A=null;function k(t){A=t;const n={observers:[],handlers:[]};return function(t,n){const r=a(A,"wrapper"),o=[];r.forEach(r=>{const s=i(l.clickable,"button"),a=r.querySelector(s),d=e(A,"list",r);if(!a||!d)return void console.warn("[dropdown] Dropdown wrapper missing required elements:",r);const f=r.getAttribute("data-hs-nav-dropdown-type")||"hover",p=r.querySelector('[data-hs-height="element"]'),m=p?p.parentElement:null,h=a.textContent?.trim()||"dropdown",g=h.toLowerCase().replace(/[^a-z0-9\s]/g,"").replace(/\s+/g,"-").replace(/^-+|-+$/g,"").substring(0,50);const v=`navbar-dropdown-${g}-toggle`,y=`navbar-dropdown-${g}-list`;a.id=v,a.setAttribute("aria-haspopup","menu"),a.setAttribute("aria-expanded","false"),a.setAttribute("aria-controls",y),d.id=y,d.setAttribute("role","menu"),d.inert=!0;const b=Array.from(d.querySelectorAll(s));b.forEach((e,t)=>{if(e.setAttribute("role","menuitem"),e.setAttribute("tabindex","-1"),0===t){const t=a.textContent?.trim()||"menu";e.getAttribute("aria-label")||e.setAttribute("aria-label",`${e.textContent?.trim()}, ${t} submenu`)}});let w=-1;function E(){return r.classList.contains(l.classes.active)}function k(){const e=E();"true"===a.getAttribute("aria-expanded")&&!e&&d.contains(document.activeElement)&&a.focus(),a.setAttribute("aria-expanded",e?"true":"false"),d.inert=!e,b.forEach(t=>{t.setAttribute("tabindex",e?"0":"-1")}),e||(w=-1),u(m,e,{duration:"hover"===f?200:300,ease:"power2.inOut"})}c(m,E()),k();const x=new MutationObserver(()=>{k()});if(x.observe(r,{attributes:!0,attributeFilter:["class"]}),t(x),"hover"===f){o.push(r);const e=()=>{r.classList.add("is-active")},t=()=>{r.classList.remove("is-active")};n(r,"mouseenter",e),n(r,"mouseleave",t);n(a,"keydown",e=>{"ArrowDown"===e.key?(e.preventDefault(),E()||(r.classList.add(l.classes.active),b.length>0&&setTimeout(()=>{w=0,b[0].focus()},100))):" "===e.key||"Enter"===e.key?(e.preventDefault(),E()?r.classList.remove(l.classes.active):(r.classList.add(l.classes.active),b.length>0&&setTimeout(()=>{w=0,b[0].focus()},100))):"ArrowUp"===e.key?(e.preventDefault(),E()||(r.classList.add(l.classes.active),b.length>0&&setTimeout(()=>{w=b.length-1,b[w].focus()},100))):"Escape"===e.key&&(e.preventDefault(),E()&&r.classList.remove(l.classes.active))});const s=e=>{E()&&r.contains(document.activeElement)&&("ArrowDown"===e.key?(e.preventDefault(),w<b.length-1&&(w++,b[w].focus())):"ArrowUp"===e.key?(e.preventDefault(),0===w?(r.classList.remove(l.classes.active),a.focus(),w=-1):w>0?(w--,b[w].focus()):(a.focus(),w=-1)):"Escape"===e.key&&(e.preventDefault(),r.classList.remove("is-active")))};n(r,"keydown",s)}else if("click"===f){n(a,"click",e=>{e.preventDefault(),r.classList.toggle(l.classes.active)});n(a,"keydown",e=>{" "===e.key||"Enter"===e.key?(e.preventDefault(),r.classList.toggle(l.classes.active)):"Escape"===e.key&&(e.preventDefault(),E()&&r.classList.remove(l.classes.active))})}});const s=e=>{o.forEach(t=>{t.classList.contains("is-active")&&!t.contains(e.target)&&t.classList.remove("is-active")})};o.length>0&&n(document.body,"focusin",s)}(e=>{n.observers.push(e)},(e,t,r,o)=>{e.addEventListener(t,r,o),n.handlers.push({element:e,event:t,handler:r,options:o})}),{result:"dropdown initialized",destroy:()=>{n.observers.forEach(e=>e.disconnect()),n.observers.length=0,n.handlers.forEach(({element:e,event:t,handler:n,options:r})=>{e.removeEventListener(t,n,r)}),n.handlers.length=0,A=null}}}function x(t,n){const r={observers:[],handlers:[],state:{focusTrapHandler:null}},o=e=>{r.observers.push(e)};return function(o,s){const p=a(t,"button"),m=e(t,"wrapper");if(!p.length||!m)return;const h=n?e(n,"wrapper"):null,g=`menu-${Date.now()}`;m.id=g,m.setAttribute("role","dialog"),m.setAttribute("aria-modal","true"),m.inert=!0;const v=m.querySelector('[data-hs-height="element"]'),y=v?v.parentElement:null;p.forEach(a=>{a.setAttribute("aria-expanded","false"),a.setAttribute("aria-controls",g),a.setAttribute("aria-label","Open navigation menu");let v=null,b=!1;function w(){return a.classList.contains(l.classes.active)}function E(){const t=w(),r="true"===a.getAttribute("aria-expanded");t&&!r?(d(),m.classList.add(l.classes.active),m.inert=!1,h&&h.classList.add("hs-menu-open"),p.forEach(e=>{e.setAttribute("aria-expanded","true"),e.setAttribute("aria-label","Close navigation menu")}),y&&u(y,!0,{duration:300,ease:"power2.inOut"}),v=function(){const t=n?e(n,"wrapper"):document.querySelector('[data-hs-nav="wrapper"]');if(!t)return;const r=e=>{if("Tab"===e.key){const n=i(l.clickable,"button"),r=Array.from(t.querySelectorAll(n)),o=t.querySelectorAll('input, select, textarea, [tabindex]:not([tabindex="-1"])'),s=[...r,...Array.from(o)],a=s[0],c=s[s.length-1];e.shiftKey?document.activeElement===a&&(e.preventDefault(),c.focus()):document.activeElement===c&&(e.preventDefault(),a.focus())}};return document.addEventListener("keydown",r),r}(),b&&(setTimeout(()=>{const e=i(l.clickable,"button"),t=Array.from(m.querySelectorAll(e));if("last"===b){const e=t[t.length-1];e&&e.focus()}else{const e=t[0];e&&e.focus()}},100),b=!1)):!t&&r&&(m.contains(document.activeElement)&&a.focus(),f(),m.classList.remove(l.classes.active),m.inert=!0,h&&h.classList.remove("hs-menu-open"),p.forEach(e=>{e.setAttribute("aria-expanded","false"),e.setAttribute("aria-label","Open navigation menu")}),y&&u(y,!1,{duration:300,ease:"power2.inOut"}),function(e){e&&document.removeEventListener("keydown",e)}(v),v=null)}y&&c(y,w()),E();const A=new MutationObserver(()=>{E()});A.observe(a,{attributes:!0,attributeFilter:["class"]}),o(A);s(a,"click",function(e){e.preventDefault(),a.classList.toggle("is-active")});s(a,"keydown",function(e){" "===e.key||"Enter"===e.key?(e.preventDefault(),b=!0,a.classList.toggle(l.classes.active)):"ArrowDown"===e.key?(e.preventDefault(),w()||(b=!0,a.classList.add(l.classes.active))):"ArrowUp"===e.key?(e.preventDefault(),w()||(b="last",a.classList.add(l.classes.active))):"Escape"===e.key&&(e.preventDefault(),w()&&a.classList.remove(l.classes.active))}),r.state.focusTrapHandler=v;const k=t.attributes?.properties?.anchorClose;if(k&&"true"===m.getAttribute(k)){s(m,"click",e=>{e.target.closest('a[href^="#"]')&&w()&&a.classList.remove(l.classes.active)})}})}(o,(e,t,n,o)=>{e.addEventListener(t,n,o),r.handlers.push({element:e,event:t,handler:n,options:o})}),function(n){const r=e(t,"wrapper");if(!r)return;let o=null;function s(){const e=window.getComputedStyle(r).getPropertyValue(p.state).trim();if(o===l.cssVars.state.values.active&&e===l.cssVars.state.values.inactive){const e=document.querySelector('[data-hs-nav-menu="button"]');e&&"true"===e.getAttribute("aria-expanded")&&e&&e.classList.remove("is-active")}o=e}const a=new ResizeObserver(s);a.observe(r),n(a),s()}(o),{result:"menu initialized",destroy:()=>{r.state.focusTrapHandler&&(document.removeEventListener("keydown",r.state.focusTrapHandler),r.state.focusTrapHandler=null),r.observers.forEach(e=>e.disconnect()),r.observers.length=0,r.handlers.forEach(({element:e,event:t,handler:n,options:r})=>{e.removeEventListener(t,n,r)}),r.handlers.length=0,document.body.classList.remove("u-overflow-hidden")}}}function L(t,n){const r={handlers:[]},o=(e,t,n,o)=>{e.addEventListener(t,n,o),r.handlers.push({element:e,event:t,handler:n,options:o})};return o(document,"keydown",t=>{if("ArrowLeft"!==t.key&&"ArrowRight"!==t.key)return;const r=n?e(n.menu,"wrapper"):document.querySelector('[data-hs-nav-menu="wrapper"]');if(r&&r.contains(document.activeElement))return;const o=n?e(n,"wrapper"):document.querySelector('[data-hs-nav="wrapper"]');if(!o||!o.contains(document.activeElement))return;const s=o.querySelector(`.${l.classes.active}[data-hs-nav-dropdown]`);if(s&&s.contains(document.activeElement))return;t.preventDefault();const a=i(l.clickable,"button"),c=Array.from(o.querySelectorAll(a)),u=Array.from(c).filter(e=>{if("-1"===e.getAttribute("tabindex"))return!1;if(e.closest('[role="menu"]'))return!1;const t=n?n.menu.attributes.elements.wrapper.primary.split("=")[0]:"data-hs-nav-menu";if(e.closest(`[${t}="wrapper"]`))return!1;const r=n?n.attributes.elements["skip-link"].primary.split("=")[0]:"data-hs-nav";if(e.closest(`[${r}="skip-link"]`))return!1;const s=window.getComputedStyle(e),a=e;if("none"===s.display||"hidden"===s.visibility||"0"===s.opacity||0===a.offsetWidth||0===a.offsetHeight)return!1;let i=e.parentElement;for(;i&&i!==o;){const e=window.getComputedStyle(i),t=i;if("none"===e.display||"hidden"===e.visibility||0===t.offsetWidth||0===t.offsetHeight)return!1;i=i.parentElement}return!0}),d=u.indexOf(document.activeElement);-1!==d&&("ArrowRight"===t.key?d<u.length-1&&u[d+1].focus():d>0&&u[d-1].focus())}),function(t){const r=n?e(n.menu,"wrapper"):document.querySelector('[data-hs-nav-menu="wrapper"]');if(!r)return;let o=-1;t(r,"keydown",t=>{const s=function(){const e=i(l.clickable,"button"),t=Array.from(r.querySelectorAll(e));return Array.from(t).filter(e=>{let t=e;for(;t&&t!==r;){if(t.inert)return!1;t=t.parentElement}return!0})}();if(0===s.length)return;const a=document.activeElement;if(o=s.indexOf(a),"ArrowDown"===t.key)t.preventDefault(),o<s.length-1&&(o+=1,s[o].focus());else if("ArrowUp"===t.key)t.preventDefault(),o>0&&(o-=1,s[o].focus());else if("ArrowRight"===t.key){if(t.preventDefault(),a&&"BUTTON"===a.tagName&&a.hasAttribute("aria-controls")){return void("true"===a.getAttribute("aria-expanded")||a.click())}}else if("ArrowLeft"===t.key){if(t.preventDefault(),a&&"BUTTON"===a.tagName&&a.hasAttribute("aria-controls")){return void("true"===a.getAttribute("aria-expanded")&&a.click())}}else if("Home"===t.key)t.preventDefault(),o=0,s[0].focus();else if("End"===t.key)t.preventDefault(),o=s.length-1,s[s.length-1].focus();else if(" "===t.key&&a&&"A"===a.tagName)t.preventDefault();else if("Escape"===t.key){const t=n?e(n.menu,"button"):document.querySelector('[data-hs-nav-menu="button"]');t&&(t.click(),t.focus())}})}(o),{result:"arrow-navigation initialized",destroy:()=>{r.handlers.forEach(({element:e,event:t,handler:n,options:r})=>{e.removeEventListener(t,n,r)}),r.handlers.length=0}}}async function S(e){const t={destroyFunctions:[]},n=await Promise.allSettled([k(e.dropdown),x(e.menu,e),L(e["arrow-navigation"],e)]);n.forEach(e=>{"fulfilled"===e.status&&e.value?.destroy&&t.destroyFunctions.push(e.value.destroy)});const r=n.filter(e=>"fulfilled"===e.status).length,o=n.length-r;return o>0&&console.warn(`[navbar] ${r}/${n.length} functions loaded successfully. ${o} failed but won't affect other functions.`),{result:"navbar initialized",destroy:()=>{t.destroyFunctions.forEach(e=>{try{e()}catch(t){console.error("[navbar] Error during cleanup:",t)}}),t.destroyFunctions.length=0}}}function T(t){const n={observers:[],handlers:[]};return function(n,r){const o=a(t,"wrapper");if(0===o.length)return 0;let s=0;o.forEach((o,a)=>{const d=e(t,"toggle",o),f=e(t,"content",o);if(!d||!f)return;s++;const p=`[${l.attributes.height}="${l.attributes.heightValue}"]`,m=o.querySelector(p),h=m?m.parentElement:f,g=`hs-accordion-btn-${a}`,v=`hs-accordion-content-${a}`,y=o.getAttribute(t.attributes.properties.open),b=o.getAttribute(t.attributes.properties.closed),w=y&&b;let E=[];if(w){const e=i(t,"state");E=Array.from(d.querySelectorAll(e))}function A(){return o.classList.contains(l.classes.active)}function k(){const e=A();if("true"===d.getAttribute("aria-expanded")&&!e&&f.contains(document.activeElement)){d.focus()}d.setAttribute("aria-expanded",e?"true":"false");var t;f.inert=!e,w&&E.length>0&&(t=e?y:b,w&&E.forEach(e=>{e.textContent=t})),u(h,e,{duration:300,ease:"power2.inOut"})}d.setAttribute("id",g),f.setAttribute("id",v),f.setAttribute("role","region"),f.setAttribute("aria-labelledby",g),d.setAttribute("aria-controls",v);const x=o.getAttribute(t.attributes.properties.default);x&&"open"===x.toLowerCase()&&o.classList.add(l.classes.active),c(h,A()),k();r(d,"click",e=>{e.preventDefault(),o.classList.toggle(l.classes.active)});const L=new MutationObserver(()=>{k()});L.observe(o,{attributes:!0,attributeFilter:["class"]}),n(L)})}(e=>n.observers.push(e),(e,t,r,o)=>{e.addEventListener(t,r,o),n.handlers.push({element:e,event:t,handler:r,options:o})}),{result:"accordion initialized",destroy:()=>{n.observers.forEach(e=>e.disconnect()),n.observers.length=0,n.handlers.forEach(({element:e,event:t,handler:n,options:r})=>{e.removeEventListener(t,n,r)}),n.handlers.length=0}}}function C(e){const n=t._global.classes.active,r={observers:[],handlers:[],scrollTimeout:null,headings:[]},o=a(e,"content"),s=a(e,"list");return o.forEach(e=>{const t=s[0];if(!t||0===t.children.length)return;const o=t.children[0].cloneNode(!0),a=o.querySelector("a");a&&a.classList.remove(n),t.innerHTML="";const i=e.querySelectorAll("h2");i.forEach(e=>{const t=e.textContent.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/(^-|-$)/g,"");e.id=t,r.headings.push(e)}),i.forEach((e,n)=>{const r=o.cloneNode(!0),s=r.querySelector("a"),a=e.id;s.href=`#${a}`;const i=document.createElement("strong");i.textContent=`${n+1}. `,s.innerHTML="",s.appendChild(i),s.appendChild(document.createTextNode(e.textContent)),t.appendChild(r)});const l=t.querySelectorAll("a");let c=null;const u=()=>{const e=.75*window.innerHeight;let t=null;for(let n=i.length-1;n>=0;n--){if(i[n].getBoundingClientRect().top<=e){t=i[n].id;break}}if(t!==c&&(c=t,l.forEach(e=>e.classList.remove(n)),c)){const e=Array.from(l).find(e=>e.getAttribute("href")===`#${c}`);e&&e.classList.add(n)}},d=new IntersectionObserver(()=>{u()},{rootMargin:"-75% 0px -25% 0px",threshold:0});i.forEach(e=>d.observe(e)),(e=>{r.observers.push(e)})(d);var f,p,m;f=window,p="scroll",m=()=>{r.scrollTimeout&&clearTimeout(r.scrollTimeout),r.scrollTimeout=setTimeout(u,50)},f.addEventListener(p,m),r.handlers.push({element:f,event:p,handler:m})}),{result:"toc initialized",destroy:()=>{r.headings.forEach(e=>{e.removeAttribute("id")}),r.headings.length=0,r.observers.forEach(e=>e.disconnect()),r.observers.length=0,r.handlers.forEach(({element:e,event:t,handler:n})=>{e.removeEventListener(t,n)}),r.handlers.length=0,r.scrollTimeout&&(clearTimeout(r.scrollTimeout),r.scrollTimeout=null)}}}async function P(){const n=t.default.toc,r={destroyFunctions:[]},l=i(n,"list");if(document.querySelector(l))try{const e=await C(n);e?.destroy&&r.destroyFunctions.push(e.destroy)}catch(u){console.error("[toc] Error initializing heading-links:",u)}const c=i(n["progress-bar"],"wrapper");if(document.querySelector(c))try{const t=await async function(t){const{progressConfig:n,tocConfig:r}=t;if(s())return{result:"progress-bar skipped - prefers-reduced-motion enabled"};const i=o("progress-bar");if(!i)return{result:"progress-bar skipped - GSAP not loaded"};const{gsap:l,ScrollTrigger:c}=i;if(!c)return console.warn("[progress-bar] GSAP ScrollTrigger plugin not loaded"),{result:"progress-bar skipped - ScrollTrigger not loaded"};l.registerPlugin(c);const u={scrollTriggers:[]},d=e(r,"content");if(!d)return{result:"progress-bar skipped - no content element found"};const f=a(n,"wrapper");return 0===f.length?{result:"progress-bar skipped - no wrapper elements found"}:(f.forEach(e=>{l.set(e,{display:"block"}),Array.from(e.querySelectorAll("*")).filter(e=>{const t=n.attributes.elements.element.primary,[r,o]=t.split("="),s=o?.replace(/['"]/g,"");return e.getAttribute(r)===s}).forEach(e=>{l.set(e,{width:"0%"}),l.to(e,{width:"100%",ease:"none",scrollTrigger:{trigger:d,start:"top bottom",end:"bottom 75%",scrub:!0,invalidateOnRefresh:!0,onUpdate:e=>{u.scrollTriggers.includes(e)||u.scrollTriggers.push(e)}}})})}),{result:`progress-bar initialized (${f.length} instances)`,destroy:()=>{u.scrollTriggers.forEach(e=>{e&&"object"==typeof e&&"kill"in e&&"function"==typeof e.kill&&e.kill()}),u.scrollTriggers.length=0}})}({progressConfig:n["progress-bar"],tocConfig:n});t?.destroy&&r.destroyFunctions.push(t.destroy)}catch(u){console.error("[toc] Error initializing progress-bar:",u)}return{result:`toc initialized (${r.destroyFunctions.length} modules active)`,destroy:()=>{r.destroyFunctions.forEach(e=>{try{e()}catch(u){console.error("[toc] Error during cleanup:",u)}}),r.destroyFunctions.length=0}}}function q(t){const n={observers:[],handlers:[],liveRegions:[]};try{a(t,"wrapper").forEach(r=>{try{const o=function(t,n,r){const o=e(r,"list",t);if(!o)return console.warn("[pagination] Missing required element: list"),null;const s=o.parentElement;if(!s)return null;const a={controls:e(r,"controls",t),counter:e(r,"counter",t),dotsWrap:e(r,"dots",t),nextButton:null,prevButton:null};if(!a.controls)return{initialized:!1};const c=e(r,"next",t),u=e(r,"previous",t),d=i(l.clickable,"button"),f=c?.querySelector(d)||c,m=u?.querySelector(d)||u;if(!f||!m)return console.warn("[pagination] Missing required navigation buttons"),null;a.nextButton=f,a.prevButton=m,a.nextButton.setAttribute("aria-label","Go to next page"),a.prevButton.setAttribute("aria-label","Go to previous page"),a.counter&&(a.counter.setAttribute("aria-live","polite"),a.counter.setAttribute("aria-label","Current page"));const h=parseInt(a.controls?.getAttribute(r.attributes.properties.show)||"6")||6,g=parseInt(a.controls?.getAttribute(r.attributes.properties.showMobile)||String(h))||h,v=()=>getComputedStyle(o).getPropertyValue(p.state).trim()===l.cssVars.state.values.active,y=Array.from(o.children),b=y.length;if(!b)return null;const w={totalPages:1,currentIndex:1,currentPage:1,isAnimating:!1,itemsPerPage:h,dotTemplates:{active:null,inactive:null}};let E=[];const A=document.createElement("div");A.className="sr-only",A.setAttribute("aria-live","assertive"),A.setAttribute("aria-atomic","true"),A.style.cssText="position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden;",t.appendChild(A),n.liveRegions.push(A);const k=()=>{a.counter&&(a.counter.textContent=`${w.currentPage} / ${w.totalPages}`)},x=()=>{A.textContent=`Page ${w.currentPage} of ${w.totalPages}`,setTimeout(()=>A.textContent="",1e3)},L=()=>{E.forEach((e,t)=>{const n=e;t===w.currentIndex?n.removeAttribute("inert"):n.setAttribute("inert","")})},S=()=>{const e=E[w.currentIndex];e&&void 0!==e.offsetHeight&&(s.style.height=e.offsetHeight+"px")},T=()=>{if(!a.dotsWrap)return;const e=Array.from(a.dotsWrap.children);if(!e.length)return;const t=e.find(e=>e.classList.contains("is-active")),r=e.find(e=>!e.classList.contains("is-active"));w.dotTemplates.active=t?t.cloneNode(!0):e[0].cloneNode(!0),w.dotTemplates.inactive=r?r.cloneNode(!0):e[0].cloneNode(!0),a.dotsWrap.innerHTML="",a.dotsWrap.setAttribute("role","group"),a.dotsWrap.setAttribute("aria-label","Page navigation");for(let o=1;o<=w.totalPages;o++){const e=(1===o?w.dotTemplates.active:w.dotTemplates.inactive).cloneNode(!0);e.setAttribute("role","button"),e.setAttribute("tabindex","0"),e.setAttribute("aria-label",`Go to page ${o}`),e.setAttribute("aria-current",1===o?"page":"false"),e.setAttribute("data-page",String(o)),1===o?e.classList.add("is-active"):e.classList.remove("is-active");const t=()=>M(o);e.addEventListener("click",t),n.handlers.push({element:e,event:"click",handler:t});const r=e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),M(o))};e.addEventListener("keydown",r),n.handlers.push({element:e,event:"keydown",handler:r}),a.dotsWrap.appendChild(e)}},C=()=>{if(!a.dotsWrap)return;Array.from(a.dotsWrap.children).forEach((e,t)=>{t+1===w.currentPage?(e.classList.add("is-active"),e.setAttribute("aria-current","page")):(e.classList.remove("is-active"),e.setAttribute("aria-current","false"))})},P=(e=null)=>{const t=v();if(w.itemsPerPage=e||(t?g:h),w.totalPages=Math.ceil(b/w.itemsPerPage),a.dotsWrap&&(n.handlers=n.handlers.filter(({element:e})=>!a.dotsWrap.contains(e))),Array.from(s.children).forEach(e=>{e!==o&&s.removeChild(e)}),o.innerHTML="",y.forEach(e=>o.appendChild(e)),w.totalPages<=1)return a.controls&&(a.controls.contains(document.activeElement)&&document.activeElement&&document.activeElement.blur(),a.controls.style.display="none",a.controls.setAttribute("aria-hidden","true")),a.dotsWrap&&(a.dotsWrap.style.display="none",a.dotsWrap.setAttribute("aria-hidden","true")),Object.assign(w,{totalPages:1,currentIndex:1,currentPage:1,isAnimating:!1}),s.style.cssText=`transform: translateX(0%); height: ${o.offsetHeight}px;`,E=[o],1;a.controls&&(a.controls.style.display="",a.controls.removeAttribute("aria-hidden")),a.dotsWrap&&(a.dotsWrap.style.display="",a.dotsWrap.removeAttribute("aria-hidden"));const r=Array.from({length:w.totalPages},(e,t)=>{const n=o.cloneNode(!1),r=t*w.itemsPerPage,s=Math.min(r+w.itemsPerPage,b);return y.slice(r,s).forEach(e=>n.appendChild(e.cloneNode(!0))),n});return s.insertBefore(r[r.length-1].cloneNode(!0),o),r.slice(1).forEach(e=>s.appendChild(e)),s.appendChild(r[0].cloneNode(!0)),o.innerHTML="",Array.from(r[0].children).forEach(e=>o.appendChild(e)),Object.assign(w,{currentIndex:1,currentPage:1,isAnimating:!1}),E=Array.from(s.children),s.style.transition="none",s.style.transform="translateX(-100%)",s.offsetHeight,s.style.transition="",k(),S(),L(),T(),w.totalPages};let q=v();const $=new ResizeObserver(()=>{if(w.isAnimating)return;const e=v();e!==q?(q=e,P()):S()});$.observe(s),n.observers.push($),P();const M=e=>{if(w.isAnimating||w.totalPages<=1||e===w.currentPage)return;w.isAnimating=!0,w.currentIndex=e,w.currentPage=e,k(),x(),S(),C(),v()&&a.controls&&setTimeout(()=>{const e=80,t=a.controls.getBoundingClientRect().bottom+window.pageYOffset-window.innerHeight+e;window.scrollTo({top:t,behavior:"smooth"})},50),s.style.transform=`translateX(${100*-w.currentIndex}%)`;let t=null;const n=()=>{clearTimeout(t),s.removeEventListener("transitionend",n),k(),x(),S(),L(),C(),w.isAnimating=!1};t=setTimeout(n,1e3),s.addEventListener("transitionend",n)},D=e=>{if(w.isAnimating||w.totalPages<=1)return;w.isAnimating=!0,w.currentIndex+=e,w.currentPage=w.currentIndex>w.totalPages?1:w.currentIndex<1?w.totalPages:w.currentIndex,k(),x(),S(),C(),v()&&a.controls&&setTimeout(()=>{const e=80,t=a.controls.getBoundingClientRect().bottom+window.pageYOffset-window.innerHeight+e;window.scrollTo({top:t,behavior:"smooth"})},50),s.style.transform=`translateX(${100*-w.currentIndex}%)`;let t=null;const n=()=>{clearTimeout(t),s.removeEventListener("transitionend",n),w.currentIndex>w.totalPages?(w.currentIndex=1,w.currentPage=1,s.style.transition="none",s.style.transform="translateX(-100%)",s.offsetHeight,s.style.transition=""):w.currentIndex<1&&(w.currentIndex=w.totalPages,w.currentPage=w.totalPages,s.style.transition="none",s.style.transform=`translateX(${100*-w.totalPages}%)`,s.offsetHeight,s.style.transition=""),k(),x(),S(),L(),C(),w.isAnimating=!1};t=setTimeout(n,1e3),s.addEventListener("transitionend",n)},I=()=>D(1),N=()=>D(-1);return a.nextButton.addEventListener("click",I),a.prevButton.addEventListener("click",N),n.handlers.push({element:a.nextButton,event:"click",handler:I},{element:a.prevButton,event:"click",handler:N}),{initialized:!0}}(r,n,t);o||console.warn("[pagination] Failed to initialize container",r)}catch(o){console.error("[pagination] Error initializing container:",o,r)}})}catch(r){console.error("[pagination] Critical error during initialization:",r)}return{result:"pagination initialized",destroy:()=>{try{n.liveRegions.forEach(e=>{try{e.parentNode&&e.parentNode.removeChild(e)}catch(r){console.error("[pagination] Error removing live region:",r)}}),n.liveRegions.length=0,n.observers.forEach(e=>{try{e.disconnect()}catch(r){console.error("[pagination] Error disconnecting observer:",r)}}),n.observers.length=0,n.handlers.forEach(({element:e,event:t,handler:n})=>{try{e.removeEventListener(t,n)}catch(r){console.error("[pagination] Error removing event listener:",r)}}),n.handlers.length=0}catch(r){console.error("[pagination] Critical error during cleanup:",r)}}}}async function M(t){const n=o("comparison");if(!n)return{result:"comparison skipped - GSAP not loaded"};const{gsap:r,Draggable:s}=n;m("comparison",["Draggable"],"error");const c=a(t,"wrapper"),u={draggables:[],handlers:[],observers:[]},d=i(t,"template-name"),f=i(t,"template-description"),h=i(t,"template-before-image"),g=i(t,"template-after-image");function v(e,t){e.style.setProperty(p.clip,`${t}%`)}function y(n,r){const o=n.templateItems[r];if(!o)return;const s=o.querySelector(d);n.nameElement&&s&&(n.nameElement.textContent=s.textContent);const a=o.querySelector(f);n.descElement&&a&&(n.descElement.textContent=a.textContent);const i=o.querySelector(h);n.beforeImage&&i&&(n.beforeImage.src=i.src,n.beforeImage.alt=i.alt||"");const c=o.querySelector(g);n.afterImage&&c&&(n.afterImage.src=c.src,n.afterImage.alt=c.alt||"",b(n)),n.currentIndex=r,function(n,r){const o=e(t,"pagination",n);if(!o)return;const s=l.classes.active;Array.from(o.children).forEach((e,t)=>{t===r?e.classList.add(s):e.classList.remove(s)})}(n.wrapper,r)}function b(e){const t=e.slider,n=e.wrapper;switch(e.mode){case"before":n.style.setProperty(p.clip,"100%"),t.style.display="none";break;case"after":n.style.setProperty(p.clip,"0%"),t.style.display="none";break;case"split":v(n,e.sliderPosition),t.style.display="flex"}}function w(e,t){const n=e.currentIndex+t,r=e.templateItems.length-1;let o;o=n>r?0:n<0?r:n,y(e,o)}return c.forEach(n=>{const o=e(t,"template-list",n);if(!o)return void console.warn("[comparison] No template list found in wrapper");const a=i(t,"template-item"),c=Array.from(o.querySelectorAll(a));if(0===c.length)return void console.warn("[comparison] No template items found");n.setAttribute("aria-live","polite"),n.setAttribute("aria-label","Before and after image comparison");const d=e(t,"image-wrapper",n),f=e(t,"slider",n),p=e(t,"before-image",n),m=e(t,"after-image",n),h=e(t,"name",n),g=e(t,"description",n);if(!d||!f||!m){const e=[];return d||e.push('image-wrapper (data-hs-comparison="image-wrapper")'),f||e.push('slider (data-hs-comparison="slider")'),m||e.push('after-image (data-hs-comparison-image="after")'),void console.warn(`[comparison] Missing required elements: ${e.join(", ")}`)}const E={wrapper:n,templateItems:c,currentIndex:0,mode:"split",sliderPosition:50,slider:f,beforeImage:p?.querySelector("img"),afterImage:m?.querySelector("img"),nameElement:h,descElement:g,draggable:null};if(y(E,0),v(n,50),s){const e=s.create(f,{type:"x",bounds:d,onDrag:function(){const e=d.getBoundingClientRect(),t=f.getBoundingClientRect().left-e.left,r=Math.max(0,Math.min(100,t/e.width*100));v(n,r),E.sliderPosition=r}});u.draggables.push(e),E.draggable=e[0];const t=new ResizeObserver(()=>{E.draggable&&E.draggable.update()});t.observe(d),u.observers=u.observers||[],u.observers.push(t);[E.beforeImage,E.afterImage].filter(Boolean).forEach(e=>{e instanceof HTMLImageElement&&!e.complete&&e.addEventListener("load",()=>{E.draggable&&E.draggable.update()},{once:!0})});const o=e=>{if("split"!==E.mode)return;const t=d.getBoundingClientRect(),o=e.clientX-t.left,s=Math.max(0,Math.min(100,o/t.width*100)),a=o-t.width/2;E.draggable&&(r.set(f,{x:a}),E.draggable.update()),v(n,s),E.sliderPosition=s};d.addEventListener("click",o),u.handlers.push({element:d,event:"click",handler:o})}n.querySelectorAll(`[${t.attributes.properties.modeType}]`).forEach(e=>{const n=e.getAttribute(t.attributes.properties.modeType),r=i(l.clickable,"button"),o=e.querySelector(r)||e;n===E.mode&&e.classList.add(l.classes.active);const s=e=>{e.preventDefault(),function(e,n){const r=e.wrapper.querySelectorAll(`[${t.attributes.properties.modeType}]`),o=l.classes.active;r.forEach(e=>{e.getAttribute(t.attributes.properties.modeType)===n?e.classList.add(o):e.classList.remove(o)}),e.mode=n,b(e)}(E,n)};o.addEventListener("click",s),u.handlers.push({element:o,event:"click",handler:s})}),function(e,n){const r=n.querySelector(`[${t.attributes.properties.navType}="previous"]`),o=n.querySelector(`[${t.attributes.properties.navType}="next"]`);if(r){const t=i(l.clickable,"button"),n=r.querySelector(t)||r;n.setAttribute("aria-label","Previous image");const o=t=>{t.preventDefault(),w(e,-1)};n.addEventListener("click",o),u.handlers.push({element:n,event:"click",handler:o})}if(o){const t=i(l.clickable,"button"),n=o.querySelector(t)||o;n.setAttribute("aria-label","Next image");const r=t=>{t.preventDefault(),w(e,1)};n.addEventListener("click",r),u.handlers.push({element:n,event:"click",handler:r})}}(E,n);const A=e(t,"pagination",n);A&&c.length>1&&function(e,t){const n=t.children[0];if(!n)return;const r=l.classes.active;t.innerHTML="",e.templateItems.forEach((o,s)=>{const a=n.cloneNode(!0);a.classList.remove(r),0===s&&a.classList.add(r);const i=()=>{y(e,s)};a.addEventListener("click",i),u.handlers.push({element:a,event:"click",handler:i}),t.appendChild(a)})}(E,A),function(e){const t=t=>{"ArrowLeft"===t.key||"ArrowUp"===t.key?(t.preventDefault(),w(e,-1)):"ArrowRight"!==t.key&&"ArrowDown"!==t.key||(t.preventDefault(),w(e,1))};e.wrapper.addEventListener("keydown",t),e.wrapper.setAttribute("tabindex","0"),u.handlers.push({element:e.wrapper,event:"keydown",handler:t})}(E)}),{result:`comparison initialized (${c.length} instances)`,destroy:()=>{u.draggables.forEach(e=>{e&&e[0]&&e[0].kill&&e[0].kill()}),u.handlers.forEach(({element:e,event:t,handler:n})=>{e.removeEventListener(t,n)}),u.observers.forEach(e=>e.disconnect()),u.draggables.length=0,u.handlers.length=0,u.observers.length=0}}}function D(t){const n={handlers:[],timers:[],animationFrames:[],observers:[]},r=(e,t,r,o)=>{e.addEventListener(t,r,o),n.handlers.push({element:e,event:t,handler:r,options:o})},c=e=>n.animationFrames.push(e),u=()=>`${l.cssVars.prefix}${t.cssVars?.progress||"progress"}`,d=(e,t)=>e.style.setProperty(u(),String(t));function f(a){const f=e(t,"links",a),p=e(t,"list",a);if(!f||!p)return;const m=Array.from(f.children),h=Array.from(p.children),g=i(l.clickable,"button"),v=m.map(e=>e.querySelector(g)).filter(e=>null!==e);if(0===v.length)return;const y=a.getAttribute(t.attributes.properties?.autoplay||"data-hs-tab-autoplay"),b=a.getAttribute(t.attributes.properties?.duration||"data-hs-tab-duration"),w=a.getAttribute(t.attributes.properties?.hover||"data-hs-tab-hover"),E=a.getAttribute(t.attributes.properties?.animation||"data-hs-tab-animation"),A=a.getAttribute(t.attributes.properties?.animationDuration||"data-hs-tab-animation-duration"),k="true"===y,x=b?parseFloat(b):6,L="pause"===w,S=E,T=A?parseFloat(A):.3,C=`${"hs-tab"}-${Math.random().toString(36).substring(2,9)}`;h.forEach((e,t)=>{const n=e.id||`${C}-panel-${t}`,r=`${C}-tab-${t}`;e.id=n,v[t]&&(v[t].id=r,v[t].setAttribute("aria-controls",n))});let P=0,q=null,$=null,M=null,D=!1,I=!1,N=!1;async function F(e,t=!1){if(I)return;if(e<0||e>=h.length)return;if(e===P&&!t)return;I=!0;const n=P;if(P=e,v.forEach((t,n)=>{t.setAttribute("aria-selected",n===e?"true":"false"),t.setAttribute("tabindex",n===e?"0":"-1")}),m.forEach((t,n)=>{t.classList.toggle(l.classes.active,n===e)}),k)if(D){const t=m[n]?parseFloat(getComputedStyle(m[n]).getPropertyValue(u())||"0"):0;m.forEach((n,r)=>d(n,r===e?t:0))}else H();const r=h[n],a=h[e];"fade"!==S||t?"clip"!==S||t?h.forEach((t,n)=>{n===e?("fade"===S||"clip"===S?(t.style.position="",t.style.display="block","fade"===S?t.style.opacity="1":t.style.clipPath=""):t.style.display="block",t.inert=!1,t.style.pointerEvents="",t.classList.add(l.classes.active)):("fade"===S||"clip"===S?(t.style.display="none","fade"===S?t.style.opacity="0":t.style.clipPath=""):t.style.display="none",t.inert=!0,t.style.pointerEvents="none",t.classList.remove(l.classes.active))}):await async function(e,t,n){s()&&(n=0);const r=o("tabs",!1);if(!r)return e.style.display="none",e.style.position="",e.style.clipPath="",e.inert=!0,e.style.pointerEvents="none",t.style.display="block",t.style.position="",t.style.clipPath="",t.inert=!1,void(t.style.pointerEvents="");const{gsap:a}=r;return new Promise(r=>{const o=a.timeline({onComplete:()=>{e.style.display="none",e.style.position="",e.style.clipPath="",e.inert=!0,e.style.pointerEvents="none",t.style.position="",t.style.clipPath="",t.inert=!1,t.style.pointerEvents="",r()},defaults:{duration:n,ease:"power1.inOut"}});o.set(e,{position:"absolute",top:0,left:0,width:"100%",clipPath:"inset(0% 0% 0% 0%)"}),o.set(t,{display:"block",position:"relative",clipPath:"inset(0% 0% 100% 0%)"}),o.to(e,{clipPath:"inset(100% 0% 0% 0%)"}),o.to(t,{clipPath:"inset(0% 0% 0% 0%)"},"<40%")})}(r,a,T):await async function(e,t,n){s()&&(n=0);const r=o("tabs",!1);if(!r)return e.style.display="none",e.style.position="",e.inert=!0,e.style.pointerEvents="none",t.style.display="block",t.style.position="",t.inert=!1,void(t.style.pointerEvents="");const{gsap:a}=r;return new Promise(r=>{const o=a.timeline({onComplete:()=>{e.style.display="none",e.style.position="",e.style.opacity="",e.inert=!0,e.style.pointerEvents="none",t.style.position="",t.style.opacity="",t.inert=!1,t.style.pointerEvents="",r()},defaults:{duration:n,ease:"power1.out"}});o.set(e,{position:"absolute",top:0,left:0,width:"100%"}),o.set(t,{display:"block",position:"relative",opacity:0}),o.to(e,{opacity:0}),o.to(t,{opacity:1},"<50%")})}(r,a,T),I=!1}function O(e){if(k){M||(M=e);const t=Math.min((e-M)/(1e3*x),1);m.forEach((e,n)=>d(e,n===P?t:0)),t<1&&!D&&($=requestAnimationFrame(O),$&&c($))}else m.forEach((e,t)=>d(e,t===P?1:0))}function H(){if(z(),!k)return O(0);if(D||!N)return;const e=m[P]?parseFloat(getComputedStyle(m[P]).getPropertyValue(u())||"0"):0,t=e*x*1e3,r=Math.max(0,1e3*x-t);M=null;const o=e,s=performance.now(),a=e=>{const t=Math.min(o+(e-s)/(1e3*x),1);m.forEach((e,n)=>d(e,n===P?t:0)),t<1&&!D&&($=requestAnimationFrame(a),$&&c($))};var i;$=requestAnimationFrame(a),$&&c($),q=window.setTimeout(()=>F((P+1)%h.length),r),i=q,n.timers.push(i)}function z(){null!==q&&(clearTimeout(q),q=null),null!==$&&(cancelAnimationFrame($),$=null),M=null}const W=()=>{D=!0,z()},B=()=>{D=!1,H()};v.forEach((e,t)=>{r(e,"click",e=>{e.preventDefault(),F(t)})});const R=e=>{const t=v.indexOf(e.target);if(-1===t)return;let n=t;switch(e.key){case"ArrowLeft":case"ArrowUp":e.preventDefault(),n=0===t?v.length-1:t-1;break;case"ArrowRight":case"ArrowDown":e.preventDefault(),n=t===v.length-1?0:t+1;break;case"Home":e.preventDefault(),n=0;break;case"End":e.preventDefault(),n=v.length-1;break;default:return}I||(F(n),v[n].focus())};v.forEach(e=>r(e,"keydown",R)),L&&k&&(r(a,"mouseenter",W),r(a,"mouseleave",B));let X=!1;r(document,"keydown",()=>X=!0),r(document,"mousedown",()=>X=!1),k&&(r(a,"focusin",()=>{X&&(W(),Y())}),r(a,"focusout",()=>{X&&D&&(B(),Y())}));const U=`[${t.attributes.properties?.controls||"data-hs-tab-controls"}]`,V=a.querySelectorAll(U);let j=null,G=null;V.forEach(e=>{const n=e.getAttribute(t.attributes.properties?.controls||"data-hs-tab-controls"),o=e.querySelector(g);if(o)if("previous"===n)o.setAttribute("aria-label","Previous tab"),r(o,"click",e=>{e.preventDefault(),F(0===P?h.length-1:P-1)});else if("next"===n)o.setAttribute("aria-label","Next tab"),r(o,"click",e=>{e.preventDefault(),F((P+1)%h.length)});else if("toggle"===n){if(!k)return void(e.style.display="none");j=e,G=o,G.setAttribute("aria-label",D?"Play":"Pause"),j.classList.toggle(l.classes.active,!D),r(o,"click",e=>{e.preventDefault(),D?B():W(),Y()})}});const Y=()=>{j&&G&&(j.classList.toggle(l.classes.active,!D),G.setAttribute("aria-label",D?"Play":"Pause"))};if(F(0,!0),k){const e=new IntersectionObserver(e=>{e.forEach(e=>{N=e.isIntersecting,e.isIntersecting&&!D?H():z()})},{threshold:.1});e.observe(a),K=e,n.observers.push(K)}var K}const p=a(t,"wrapper");return p.forEach(e=>{f(e)}),{result:`tabs initialized (${p.length} systems)`,destroy:()=>{n.timers.forEach(e=>clearTimeout(e)),n.timers.length=0,n.animationFrames.forEach(e=>cancelAnimationFrame(e)),n.animationFrames.length=0,n.observers.forEach(e=>e.disconnect()),n.observers.length=0,n.handlers.forEach(({element:e,event:t,handler:n,options:r})=>{e.removeEventListener(t,n,r)}),n.handlers.length=0}}}async function I(e){const t=l.classes.active,n={handlers:[],modals:[]},r=(e,t,r,o)=>{e.addEventListener(t,r,o),n.handlers.push({element:e,event:t,handler:r,options:o})},o=a(e,"wrapper");if(0===o.length)return{result:"modal: no modals found",destroy:()=>{}};o.forEach(e=>{const t=e.getAttribute("data-hs-modal-id");if(!t)return void console.warn("[modal] Wrapper missing data-hs-modal-id:",e);e.setAttribute("role","dialog"),e.setAttribute("aria-modal","true"),e.setAttribute("aria-hidden","true");const r=e.querySelector("h1, h2, h3, h4, h5, h6");r&&(r.id||(r.id=`modal-${t}-title`),e.setAttribute("aria-labelledby",r.id));const o=Array.from(e.querySelectorAll('[data-hs-modal="close"]'));o.forEach(e=>{e.setAttribute("aria-label","Close modal")});const s={wrapper:e,modalId:t,closeButtons:o,triggerButton:null,focusableElements:[]};n.modals.push(s)});const s=(e,r)=>{const o=n.modals.find(t=>t.modalId===e);if(!o)return void console.warn(`[modal] Modal with id "${e}" not found`);const{wrapper:s}=o;r&&(o.triggerButton=r),s.classList.add(t),s.setAttribute("aria-hidden","false"),d(),o.focusableElements=(e=>{const t=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(", ");return Array.from(e.querySelectorAll(t))})(s),o.closeButtons.length>0?o.closeButtons[0].focus():o.focusableElements.length>0&&o.focusableElements[0].focus()},i=e=>{const{wrapper:n,triggerButton:r}=e;c(n),n.classList.remove(t),n.setAttribute("aria-hidden","true"),f(),r&&(r.focus(),e.triggerButton=null),e.focusableElements=[]},c=e=>{e.querySelectorAll("video").forEach(e=>{e.pause(),e.currentTime=0});e.querySelectorAll("audio").forEach(e=>{e.pause(),e.currentTime=0});e.querySelectorAll("iframe").forEach(e=>{const t=e.src;e.src="",e.src=t})};document.querySelectorAll("[data-hs-modal-open]").forEach(e=>{const t=e.getAttribute("data-hs-modal-open");if(!t)return;e.setAttribute("aria-haspopup","dialog"),e.setAttribute("aria-controls",`modal-${t}`);r(e,"click",n=>{n.preventDefault(),s(t,e)})}),n.modals.forEach(e=>{e.closeButtons.forEach(t=>{r(t,"click",()=>{i(e)})});r(e.wrapper,"click",t=>{t.target===e.wrapper&&i(e)})});r(document,"keydown",e=>{if("Escape"===e.key){const e=n.modals.slice().reverse().find(e=>e.wrapper.classList.contains(t));e&&i(e)}});return r(document,"keydown",e=>{const r=n.modals.find(e=>e.wrapper.classList.contains(t));r&&((e,t)=>{if("Tab"!==e.key)return;const{focusableElements:n}=t;if(0===n.length)return;const r=n[0],o=n[n.length-1];e.shiftKey?document.activeElement===r&&(e.preventDefault(),o.focus()):document.activeElement===o&&(e.preventDefault(),r.focus())})(e,r)}),{result:`modal initialized (${n.modals.length} modals)`,destroy:()=>{n.handlers.forEach(({element:e,event:t,handler:n,options:r})=>{e.removeEventListener(t,n,r)}),n.handlers.length=0,n.modals.forEach(e=>{e.wrapper.classList.contains(t)&&(e.wrapper.classList.remove(t),e.wrapper.setAttribute("aria-hidden","true"),f())}),n.modals.length=0}}}function N(n){const r={handlers:[],domContentLoadedHandler:null},o=(e,t,n)=>{e.addEventListener(t,n),r.handlers.push({element:e,event:t,handler:n})};function s(){a(n,"wrapper").forEach(r=>{const s=r;s.dataset.hsFormRangeInit||(s.dataset.hsFormRangeInit="true",function(r,o){const s=r.querySelector("input[type='range']");if(!s)return void console.warn('[range] Missing <input type="range"> element in wrapper',r);const a=e(n,"output",r),i=()=>{const e=s.min?+s.min:0,o=s.max?+s.max:100,i=+s.value||e,l=(i-e)/(o-e);r.style.setProperty(`${t._global.cssVars.prefix}${n.cssVars?.progress||"progress"}`,String(l)),a&&(a.textContent=String(i))};o(s,"input",i),i()}(s,o))})}return"loading"===document.readyState?(r.domContentLoadedHandler=s,document.addEventListener("DOMContentLoaded",r.domContentLoadedHandler)):s(),{result:"range initialized",destroy:()=>{r.domContentLoadedHandler&&(document.removeEventListener("DOMContentLoaded",r.domContentLoadedHandler),r.domContentLoadedHandler=null),r.handlers.forEach(({element:e,event:t,handler:n})=>{e.removeEventListener(t,n)}),r.handlers.length=0;a(n,"wrapper").forEach(e=>{delete e.dataset.hsFormRangeInit})}}}const F=[{name:"Alabama",value:"AL"},{name:"Alaska",value:"AK"},{name:"Arizona",value:"AZ"},{name:"Arkansas",value:"AR"},{name:"California",value:"CA"},{name:"Colorado",value:"CO"},{name:"Connecticut",value:"CT"},{name:"Delaware",value:"DE"},{name:"Florida",value:"FL"},{name:"Georgia",value:"GA"},{name:"Hawaii",value:"HI"},{name:"Idaho",value:"ID"},{name:"Illinois",value:"IL"},{name:"Indiana",value:"IN"},{name:"Iowa",value:"IA"},{name:"Kansas",value:"KS"},{name:"Kentucky",value:"KY"},{name:"Louisiana",value:"LA"},{name:"Maine",value:"ME"},{name:"Maryland",value:"MD"},{name:"Massachusetts",value:"MA"},{name:"Michigan",value:"MI"},{name:"Minnesota",value:"MN"},{name:"Mississippi",value:"MS"},{name:"Missouri",value:"MO"},{name:"Montana",value:"MT"},{name:"Nebraska",value:"NE"},{name:"Nevada",value:"NV"},{name:"New Hampshire",value:"NH"},{name:"New Jersey",value:"NJ"},{name:"New Mexico",value:"NM"},{name:"New York",value:"NY"},{name:"North Carolina",value:"NC"},{name:"North Dakota",value:"ND"},{name:"Ohio",value:"OH"},{name:"Oklahoma",value:"OK"},{name:"Oregon",value:"OR"},{name:"Pennsylvania",value:"PA"},{name:"Rhode Island",value:"RI"},{name:"South Carolina",value:"SC"},{name:"South Dakota",value:"SD"},{name:"Tennessee",value:"TN"},{name:"Texas",value:"TX"},{name:"Utah",value:"UT"},{name:"Vermont",value:"VT"},{name:"Virginia",value:"VA"},{name:"Washington",value:"WA"},{name:"West Virginia",value:"WV"},{name:"Wisconsin",value:"WI"},{name:"Wyoming",value:"WY"}];function O(t){const n={observers:[],handlers:[],timeouts:[],domContentLoadedHandler:null},r=e=>n.observers.push(e),o=(e,t,r,o)=>{e.addEventListener(t,r,o),n.handlers.push({element:e,event:t,handler:r,options:o})},s=e=>n.timeouts.push(e);function i(){document.querySelectorAll("select > div").forEach(e=>{const t=e.parentElement;for(;e.firstChild;)t.appendChild(e.firstChild);e.remove()});a(t,"wrapper").forEach(a=>{!function(r,o,s,a){const i=r.querySelector("select");if(!i)return void console.warn("[select] Missing <select> element in custom select wrapper",r);i.setAttribute("aria-hidden","true"),i.setAttribute("tabindex","-1");const l=i.getAttribute("name")||"custom-select",p=e(t,"list",r),m=e(t,"button",r);if(!p||!m)return void console.warn("[select] Missing required elements (list or button) in custom select wrapper",r);function h(){i.disabled?(m.disabled=!0,m.setAttribute("aria-disabled","true")):(m.disabled=!1,m.removeAttribute("aria-disabled"))}h();const g=p.firstElementChild;if(!g)return void console.warn("[select] Missing option template in custom select list",r);const v=g.cloneNode(!0);g.remove();i.querySelectorAll("option").forEach((e,t)=>{const n=v.cloneNode(!0),r=n.querySelector("span");if(r&&(r.textContent=e.textContent),n.setAttribute("data-value",e.value),n.setAttribute("role","option"),n.setAttribute("id",`${l}-option-${t}`),n.setAttribute("tabindex","-1"),e.selected){n.setAttribute("aria-selected","true");const t=m.querySelector("span")||m;"SPAN"===t.tagName&&(t.textContent=e.textContent),e.value?m.classList.add("is-filled"):m.classList.remove("is-filled")}else n.setAttribute("aria-selected","false");p.appendChild(n)}),p.setAttribute("role","listbox"),p.setAttribute("id",`${l}-listbox`),p.setAttribute("tabindex","-1"),p.setAttribute("aria-hidden","true"),p.inert=!0,m.setAttribute("role","combobox"),m.setAttribute("aria-haspopup","listbox"),m.setAttribute("aria-controls",`${l}-listbox`),m.setAttribute("aria-expanded","false"),m.setAttribute("id",`${l}-button`);const y=r.querySelector("label")||document.querySelector(`label[for="${i.id}"]`);if(y){const e=y.id||`${l}-label`;y.id=e,i.id||(i.id=`${l}-select`),y.setAttribute("for",i.id),m.setAttribute("aria-labelledby",e)}const b=r.querySelector('[data-hs-height="element"]'),w=b||null;let E="",A=null;function k(){return r.classList.contains("is-active")}function x(){const e=k(),t="true"===m.getAttribute("aria-expanded");if(t&&!e&&p.contains(document.activeElement)&&m.focus(),m.setAttribute("aria-expanded",e?"true":"false"),p.setAttribute("aria-hidden",e?"false":"true"),p.inert=!e,e){p.querySelectorAll('[role="option"]').forEach(e=>{e.setAttribute("tabindex","0")}),t||d()}else{m.removeAttribute("aria-activedescendant");p.querySelectorAll('[role="option"]').forEach(e=>{e.setAttribute("tabindex","-1")}),t&&f()}w&&u(w,e,{duration:300,ease:"power2.inOut"})}w&&c(w,k());function L(e){const t=p.querySelectorAll('[role="option"]');e<0||e>=t.length||(t.forEach(e=>{e.classList.remove("focused"),e.setAttribute("tabindex","-1")}),t[e].classList.add("focused"),t[e].setAttribute("tabindex","0"),t[e].focus(),m.setAttribute("aria-activedescendant",t[e].id))}function S(e){if(1!==e.length)return!1;if(null!==A){clearTimeout(A);const e=n.timeouts.indexOf(A);e>-1&&n.timeouts.splice(e,1)}const t=Array.from(p.querySelectorAll('[role="option"]'));if(0===t.length)return!1;E+=e.toLowerCase();const o=t.findIndex(e=>e.classList.contains("focused"));if(1===E.length||E.split("").every(e=>e===E[0])){const e=E[0];let n=o+1;for(let o=0;o<t.length;o++){const s=(n+o)%t.length;if((t[s].querySelector("span")?.textContent||t[s].textContent).toLowerCase().startsWith(e))return L(s),k()||r.classList.add("is-active"),A=setTimeout(T,500),a(A),!0}}else{const e=t.findIndex(e=>(e.querySelector("span")?.textContent||e.textContent).toLowerCase().startsWith(E));if(-1!==e)return L(e),k()||r.classList.add("is-active"),A=setTimeout(T,500),a(A),!0}return A=setTimeout(T,500),a(A),!1}function T(){E="",A=null}function C(e){const t=e.getAttribute("data-value")||"",n=e.querySelector("span")?.textContent||e.textContent;i.value=t,i.dispatchEvent(new Event("change",{bubbles:!0}));const o=m.querySelector("span")||m;"SPAN"===o.tagName&&(o.textContent=n),t?m.classList.add("is-filled"):m.classList.remove("is-filled"),p.querySelectorAll('[role="option"]').forEach(e=>{e.setAttribute("aria-selected","false")}),e.setAttribute("aria-selected","true"),r.classList.remove("is-active")}x();const P=e=>{e.preventDefault(),r.classList.toggle("is-active")};o(m,"click",P);const q=e=>{switch(e.key){case"Enter":e.preventDefault();const t=m.closest("form");if(t){const e=t.querySelector('button[type="submit"], input[type="submit"]')||t.querySelector("button:not([type])");e&&e.click()}break;case" ":e.preventDefault(),r.classList.toggle("is-active");break;case"ArrowDown":e.preventDefault(),k()?L(0):(r.classList.add("is-active"),requestAnimationFrame(()=>{L(0)}));break;case"ArrowUp":if(e.preventDefault(),k()){L(p.querySelectorAll('[role="option"]').length-1)}else r.classList.add("is-active"),requestAnimationFrame(()=>{L(0)});break;case"Escape":k()&&(e.preventDefault(),r.classList.remove("is-active"));break;case"Home":e.preventDefault(),k()||r.classList.add("is-active"),L(0);break;case"End":e.preventDefault(),k()||r.classList.add("is-active");L(p.querySelectorAll('[role="option"]').length-1);break;default:S(e.key)&&e.preventDefault()}};o(m,"keydown",q);const $=e=>{const t=e.target.closest('[role="option"]');if(!t)return;const n=Array.from(p.querySelectorAll('[role="option"]')),o=n.indexOf(t);switch(e.key){case"ArrowDown":e.preventDefault(),o<n.length-1&&L(o+1);break;case"ArrowUp":e.preventDefault(),o>0&&L(o-1);break;case"Enter":e.preventDefault(),C(t);break;case"Escape":e.preventDefault(),r.classList.remove("is-active"),m.focus();break;case"Home":e.preventDefault(),L(0);break;case"End":e.preventDefault(),L(n.length-1);break;default:S(e.key)&&e.preventDefault()}};o(p,"keydown",$);o(p,"click",e=>{const t=e.target.closest('[role="option"]');t&&C(t)});const M=e=>{e.relatedTarget&&r.contains(e.relatedTarget)||!r.classList.contains("is-active")||r.classList.remove("is-active")};o(p,"focusout",M);const D=e=>{r.classList.contains("is-active")&&!r.contains(e.target)&&r.classList.remove("is-active")};o(document,"click",D);const I=new MutationObserver(()=>{x()});I.observe(r,{attributes:!0,attributeFilter:["class"]}),s(I);const N=new MutationObserver(()=>{h()});N.observe(i,{attributes:!0,attributeFilter:["disabled"]}),s(N);const F=()=>{const e=i.options[i.selectedIndex];if(e){const t=p.querySelectorAll('[role="option"]'),n=Array.from(t).find(t=>t.getAttribute("data-value")===e.value);if(n){const r=n.querySelector("span")?.textContent||n.textContent,o=m.querySelector("span")||m;"SPAN"===o.tagName&&(o.textContent=r),e.value?m.classList.add("is-filled"):m.classList.remove("is-filled"),t.forEach(e=>{e.setAttribute("aria-selected","false")}),n.setAttribute("aria-selected","true")}}};o(i,"change",F),o(i,"input",F);const O=i.closest("form");if(O){o(O,"reset",()=>{setTimeout(()=>{F()},0)})}}(a,o,r,s)})}return"loading"===document.readyState?(n.domContentLoadedHandler=i,document.addEventListener("DOMContentLoaded",n.domContentLoadedHandler)):i(),window.initCustomSelects=i,{result:"select initialized",destroy:()=>{n.domContentLoadedHandler&&(document.removeEventListener("DOMContentLoaded",n.domContentLoadedHandler),n.domContentLoadedHandler=null),n.observers.forEach(e=>e.disconnect()),n.observers.length=0,n.timeouts.forEach(e=>clearTimeout(e)),n.timeouts.length=0,n.handlers.forEach(({element:e,event:t,handler:n,options:r})=>{e.removeEventListener(t,n,r)}),n.handlers.length=0,window.initCustomSelects&&delete window.initCustomSelects}}}async function H(e){const t={destroyFunctions:[]};try{const n=function(e){const t=a(e,"states");return t.forEach(e=>{const t=e;if("SELECT"!==t.tagName)return void console.warn('[select-states] data-hs-form-select="states" must be on a <select> element',t);const n=t.querySelectorAll("option");if(1!==n.length)return void console.warn("[select-states] Select must have exactly 1 default template option (placeholder). Found:",n.length,t);const r=n[0];if(""!==r.value)return void console.warn("[select-states] Template option must have empty value for placeholder. Found value:",r.value,t);const o=r.textContent;t.innerHTML="";const s=document.createElement("option");s.value="",s.textContent=o,t.appendChild(s),F.forEach(e=>{const n=document.createElement("option");n.value=e.value,n.textContent=e.name,t.appendChild(n)})}),{result:`states initialized on ${t.length} select${1!==t.length?"s":""}`,destroy:()=>{}}}(e.states);n?.destroy&&t.destroyFunctions.push(n.destroy);const r=O(e["custom-select"]);return r?.destroy&&t.destroyFunctions.push(r.destroy),{result:"select initialized",destroy:()=>{t.destroyFunctions.forEach(e=>{try{e()}catch(t){console.error("[select] Error during cleanup:",t)}}),t.destroyFunctions.length=0}}}catch(n){throw console.error("[select] Initialization failed:",n),t.destroyFunctions.forEach(e=>{try{e()}catch(t){console.error("[select] Error during error cleanup:",t)}}),n}}const z="hsfx-form-persist";function W(e){const t={handlers:[],debounceTimers:new Map},n=i(e,"field"),r=document.querySelectorAll(n);if(0===r.length)return{result:"persist skipped - no fields found",destroy:()=>{}};const o=()=>{try{const e=localStorage.getItem(z);if(e){return JSON.parse(e)}}catch{}return{timestamp:Date.now().toString()}},s=e=>{e.timestamp=Date.now().toString(),localStorage.setItem(z,JSON.stringify(e))},a=e=>{if(e instanceof HTMLInputElement){if("checkbox"===e.type)return e.checked?"true":"false";if("radio"===e.type){const t=e.name;if(t){const e=document.querySelector(`input[type="radio"][name="${t}"]:checked`);return e?.value||""}return e.checked?e.value:""}return e.value}return e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement?e.value:""},l=e.attributes.elements.field.primary.match(/data-[^=]+/)?.[0];return l?(r.forEach(e=>{const n=e.getAttribute(l);if(!n)return;const r=()=>((e,n)=>{const r=t.debounceTimers.get(e);r&&clearTimeout(r);const i=setTimeout(()=>{const r=o(),i=a(e);r[n]=i,s(r),t.debounceTimers.delete(e)},300);t.debounceTimers.set(e,i)})(e,n),i=e instanceof HTMLSelectElement?"change":"input";e.addEventListener(i,r),t.handlers.push({element:e,event:i,handler:r}),"change"!==i&&(e.addEventListener("change",r),t.handlers.push({element:e,event:"change",handler:r}));const c=a(e);if(c){const e=o();e[n]=c,s(e)}}),{result:`persist initialized (${r.length} fields)`,destroy:()=>{t.debounceTimers.forEach(e=>clearTimeout(e)),t.debounceTimers.clear(),t.handlers.forEach(({element:e,event:t,handler:n})=>{e.removeEventListener(t,n)}),t.handlers.length=0}}):{result:"persist skipped - invalid config",destroy:()=>{}}}async function B(){const n=t.default.form,r={destroyFunctions:[]},o=i(n.persist,"field");if(document.querySelector(o))try{const e=W(n.persist);e?.destroy&&r.destroyFunctions.push(e.destroy)}catch(d){console.error("[form] Error initializing persist:",d)}const s=i(n.honeypot,"form-handler");if(document.querySelector(s))try{const t=function(t){const n={honeypotHandler:null},r=n=>{const r=n.target;if("FORM"!==r.tagName)return;const o=e(t,"form-handler",r);if(!o)return;const s="INPUT"===o.tagName?o:o.querySelector("input");return s&&s.value?(n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation(),!1):void 0};return n.honeypotHandler=r,document.addEventListener("submit",r,!0),{result:"honeypot initialized",destroy:()=>{n.honeypotHandler&&(document.removeEventListener("submit",n.honeypotHandler,!0),n.honeypotHandler=null)}}}(n.honeypot);t?.destroy&&r.destroyFunctions.push(t.destroy)}catch(d){console.error("[form] Error initializing honeypot:",d)}const l=i(n.range,"wrapper");if(document.querySelector(l))try{const e=N(n.range);e?.destroy&&r.destroyFunctions.push(e.destroy)}catch(d){console.error("[form] Error initializing range:",d)}const c=i(n.test,"wrapper");if(document.querySelector(c))try{const t=function(t){const n={handlers:[]},r=(e,t,r,o)=>{e.addEventListener(t,r,o),n.handlers.push({element:e,event:t,handler:r,options:o})},o=a(t,"wrapper");return o.forEach(n=>{const o=n.querySelector("form");if(!o)return void console.warn('[form-test] No <form> element found within data-hs-form-test="wrapper"',n);const s=e(t,"info",n),a=()=>{const e=new FormData(o),t={};for(const[n,r]of e.entries())t[n]=r;if(s){const e=document.createElement("pre");e.textContent=JSON.stringify(t,null,2),s.innerHTML="",s.appendChild(document.createTextNode("Test mode active - Live form data:")),s.appendChild(e)}};s&&(s.textContent="Test mode active, preventing native submissions",a()),r(o,"input",a),r(o,"change",a);const i=o.querySelector('button[type="submit"], input[type="submit"]')||o.querySelector("button:not([type])");i&&r(i,"click",()=>{console.log("[form-test] Submit button clicked"),requestAnimationFrame(()=>{o.checkValidity()||console.log("[form-test] Browser blocked submission - validation failed")})}),r(o,"submit",e=>{e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),console.log("[form-test] Submission prevented - displaying test results");const t=new FormData(o),n={};for(const[o,s]of t.entries())n[o]=s;const r=`✅ Form would submit successfully at ${(new Date).toLocaleTimeString()}`;if(s){const e=document.createElement("pre");e.textContent=JSON.stringify(n,null,2),s.innerHTML="",s.appendChild(document.createTextNode(r)),s.appendChild(e)}else console.log(r),console.log("Form data:",n);return!1},!0)}),{result:`test initialized on ${o.length} form${1!==o.length?"s":""}`,destroy:()=>{n.handlers.forEach(({element:e,event:t,handler:n,options:r})=>{e.removeEventListener(t,n,r)}),n.handlers.length=0}}}(n.test);t?.destroy&&r.destroyFunctions.push(t.destroy)}catch(d){console.error("[form] Error initializing test:",d)}const u=i(n.select,"wrapper");if(document.querySelector(u))try{const e=await H(n.select);e?.destroy&&r.destroyFunctions.push(e.destroy)}catch(d){console.error("[form] Error initializing select:",d)}return{result:`form initialized (${r.destroyFunctions.length} modules active)`,destroy:()=>{r.destroyFunctions.forEach(e=>{try{e()}catch(d){console.error("[form] Error during cleanup:",d)}}),r.destroyFunctions.length=0}}}function R(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function X(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return R(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?R(e,t):void 0}}(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function U(e,t,n,r){var o,s,a={headers:{accept:"*/*"}};return t||(a.mode="no-cors"),n&&(a.credentials="include"),a.priority=r?"high":"low",window.fetch?fetch(e,a):(o=e,s=n,new Promise(function(e,t,n){(n=new XMLHttpRequest).open("GET",o,n.withCredentials=s),n.setRequestHeader("Accept","*/*"),n.onload=function(){200===n.status?e():t()},n.send()}))}var V,j=(V=document.createElement("link")).relList&&V.relList.supports&&V.relList.supports("prefetch")?function(e,t){return new Promise(function(n,r,o){(o=document.createElement("link")).rel="prefetch",o.href=e,t&&o.setAttribute("crossorigin","anonymous"),o.onload=n,o.onerror=r,document.head.appendChild(o)})}:U,G=window.requestIdleCallback||function(e){var t=Date.now();return setTimeout(function(){e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-t))}})},1)},Y=new Set,K=new Set,_=!1;function J(e,t){return Array.isArray(t)?t.some(function(t){return J(e,t)}):(t.test||t).call(t,e.href,e)}function Z(e){if(e){if(e.saveData)return new Error("Save-Data is enabled");if(/2g/.test(e.effectiveType))return new Error("network conditions are poor")}return!0}function Q(e){if(void 0===e&&(e={}),window.IntersectionObserver&&"isIntersecting"in IntersectionObserverEntry.prototype){var t=function(e){e=e||1;var t=[],n=0;function r(){n<e&&t.length>0&&(t.shift()(),n++)}return[function(e){t.push(e)>1||r()},function(){n--,r()}]}(e.throttle||1/0),n=t[0],r=t[1],o=e.limit||1/0,s=e.origins||[location.hostname],a=e.ignores||[],i=e.delay||0,l=[],c=e.timeoutFn||G,u="function"==typeof e.hrefFn&&e.hrefFn,d=e.prerender||!1;_=e.prerenderAndPrefetch||!1;var f=new IntersectionObserver(function(t){t.forEach(function(t){if(t.isIntersecting)l.push((t=t.target).href),a=function(){l.includes(t.href)&&(f.unobserve(t),(_||d)&&K.size<o?function(e,t){void 0===t&&(t="immediate");var n=Z(navigator.connection);if(n instanceof Error)return Promise.reject(new Error("Cannot prerender, "+n.message));if(!HTMLScriptElement.supports("speculationrules"))return ee(e,!0,!1,!1,"moderate"===t||"conservative"===t),Promise.reject(new Error("This browser does not support the speculation rules API. Falling back to prefetch."));for(var r,o=X([].concat(e));!(r=o()).done;)K.add(r.value);Y.size>0&&!_&&console.warn("[Warning] You are using both prefetching and prerendering on the same document");var s=function(e,t){var n=document.createElement("script");n.type="speculationrules",n.text='{"prerender":[{"source": "list",\n "urls": ["'+Array.from(e).join('","')+'"],\n "eagerness": "'+t+'"}]}';try{document.head.appendChild(n)}catch(r){return r}return!0}(K,t);return!0===s?Promise.resolve():Promise.reject(s)}(u?u(t):t.href,e.eagerness).catch(function(t){if(!e.onError)throw t;e.onError(t)}):Y.size<o&&!d&&n(function(){ee(u?u(t):t.href,e.priority,e.checkAccessControlAllowOrigin,e.checkAccessControlAllowCredentials,e.onlyOnMouseover).then(r).catch(function(t){r(),e.onError&&e.onError(t)})}))},(c=i)?setTimeout(a,c):a();else{var s=l.indexOf((t=t.target).href);s>-1&&l.splice(s)}var a,c})},{threshold:e.threshold||0});return c(function(){(e.el&&e.el.length&&e.el.length>0&&"A"===e.el[0].nodeName?e.el:(e.el||document).querySelectorAll("a")).forEach(function(e){s.length&&!s.includes(e.hostname)||J(e,a)||f.observe(e)})},{timeout:e.timeout||2e3}),function(){Y.clear(),f.disconnect()}}}function ee(e,t,n,r,o){var s=Z(navigator.connection);return s instanceof Error?Promise.reject(new Error("Cannot prefetch, "+s.message)):(K.size>0&&!_&&console.warn("[Warning] You are using both prefetching and prerendering on the same document"),Promise.all([].concat(e).map(function(e){return Y.has(e)?[]:(Y.add(e),function(e,t,n){var r=[].slice.call(arguments,3);if(!n)return e.apply(void 0,[t].concat(r));for(var o,s=Array.from(document.querySelectorAll("a")).filter(function(e){return e.href===t}),a=new Map,i=function(){var n=o.value,s=function(o){var l=setTimeout(function(){return n.removeEventListener("mouseenter",s),n.removeEventListener("mouseleave",i),e.apply(void 0,[t].concat(r))},200);a.set(n,l)},i=function(e){var t=a.get(n);t&&(clearTimeout(t),a.delete(n))};n.addEventListener("mouseenter",s),n.addEventListener("mouseleave",i)},l=X(s);!(o=l()).done;)i()}(t?U:j,new URL(e,location.href).toString(),o,n,r,t))})))}async function te(){const e=new Set,t=Q({el:document.body,limit:5,throttle:1e3,timeout:1e4,ignoreSlowConnection:!0,origins:[window.location.hostname],delay:0,priority:"low"}),n=new IntersectionObserver(t=>{t.forEach(t=>{if(t.isIntersecting){const n=t.target.href;if(n.includes("#")||e.has(n))return;ee([n],{priority:"low"}).then(()=>{e.add(n)}).catch(()=>{})}})},{rootMargin:"200px"});return document.querySelectorAll("a[href]").forEach(e=>{e instanceof HTMLAnchorElement&&e.hostname===window.location.hostname&&n.observe(e)}),document.body.addEventListener("mouseover",t=>{const n=t.target.closest("a[href]");if(n&&n instanceof HTMLAnchorElement){const t=n.href;n.hostname===window.location.hostname&&!e.has(t)&&ee([t],{priority:"low"}).then(()=>{e.add(t)}).catch(()=>{})}}),{result:"link-prefetch initialized",destroy:()=>{t&&"function"==typeof t&&t(),n.disconnect()}}}async function ne(){const e=t._global.classes.active,n=t.default["active-link"],r={observers:[],handlers:[],scrollTimeout:null},o=i(n,"wrapper"),s=i(n,"trigger"),a=document.querySelectorAll('a[href^="#"], button[data-target^="#"]'),l=[];a.forEach(e=>{let t=e;const n=e.closest(o);if(n)t=n;else{const n=e.closest(s);n&&(t=n)}l.push({link:e,target:t})});const c=[];if(a.forEach(e=>{const t=e.getAttribute("href")||e.getAttribute("data-target");if(t&&"#"!==t){const e=document.querySelector(t);e&&c.push({element:e,hash:t})}}),0===c.length)return{result:"active-link: no sections found",destroy:()=>{}};let u=null;const d=()=>{const t=.75*window.innerHeight;let n=null;for(let e=c.length-1;e>=0;e--){if(c[e].element.getBoundingClientRect().top<=t){n=c[e].hash;break}}if(n!==u&&(u=n,l.forEach(({target:t})=>t.classList.remove(e)),u)){const t=l.find(({link:e})=>e.getAttribute("href")===u||e.getAttribute("data-target")===u);t&&t.target.classList.add(e)}},f=new IntersectionObserver(()=>{d()},{rootMargin:"-75% 0px -25% 0px",threshold:0});c.forEach(({element:e})=>f.observe(e)),r.observers.push(f);const p=()=>{r.scrollTimeout&&clearTimeout(r.scrollTimeout),r.scrollTimeout=setTimeout(d,50)};return window.addEventListener("scroll",p),r.handlers.push({element:window,event:"scroll",handler:p}),d(),{result:`active-link initialized (${c.length} sections tracked)`,destroy:()=>{r.observers.forEach(e=>e.disconnect()),r.observers.length=0,r.handlers.forEach(({element:e,event:t,handler:n})=>{e.removeEventListener(t,n)}),r.handlers.length=0,r.scrollTimeout&&(clearTimeout(r.scrollTimeout),r.scrollTimeout=null),l.forEach(({target:t})=>t.classList.remove(e))}}}const re=l.apiName;function oe(t){const n={handlers:[]},r=(e,t,r,o)=>{e.addEventListener(t,r,o),n.handlers.push({element:e,event:t,handler:r,options:o})};const c=a(t,"wrapper");return c.forEach(function(n){const a=e(t,"list",n),c=e(t,"row",n);if(!!!a||!!!c)return;const u=t.attributes.properties?.animation,d=u&&n.getAttribute(u)||"instant",f=Array.from(a.children);if(0===f.length)return;const p=t.attributes.properties?.id,m=new Map;p&&f.forEach((e,t)=>{const n=e.getAttribute(p);n&&m.set(n,t)}),f.forEach((e,t)=>{0===t?(e.style.display="block",e.classList.add(l.classes.active)):(e.style.display="none",e.classList.remove(l.classes.active))});const h=[],g=c.firstElementChild?.cloneNode(!0);if(!g)return void console.warn(`[${re}] Lightbox row has no template child`);for(g.classList.remove(l.classes.active);c.firstChild;)c.removeChild(c.firstChild);const v=i(l.clickable,"button");f.forEach((e,t)=>{const n=g.cloneNode(!0),o=e.querySelector("img, video, [src]"),s=n.querySelector("img, video, [src]");if(o&&s){const e=o.getAttribute("src");e&&s.setAttribute("src",e)}0===t&&n.classList.add(l.classes.active);const a=n.querySelector(v)||n;r(a,"click",()=>w(t)),c.appendChild(n),h.push(n)});let y=0,b=!1;async function w(e){if(b||e===y)return;if(e<0||e>=f.length)return;b=!0;const t=f[y],n=f[e];h.forEach((t,n)=>{t.classList.toggle(l.classes.active,n===e)}),t.classList.remove(l.classes.active),n.classList.add(l.classes.active),"fade"===d?await async function(e,t,n){s()&&(n=0);const r=o("lightbox",!1);if(!r)return e.style.display="none",void(t.style.display="block");const{gsap:a}=r;return new Promise(r=>{const o=a.timeline({onComplete:()=>{e.style.display="none",e.style.position="",e.style.opacity="",t.style.position="",t.style.opacity="",r()},defaults:{duration:n,ease:"power1.out"}});o.set(e,{position:"absolute",top:0,left:0,width:"100%"}),o.set(t,{display:"block",position:"relative",opacity:0}),o.to(e,{opacity:0}),o.to(t,{opacity:1},"<50%")})}(t,n,.3):"clip"===d?await async function(e,t,n){s()&&(n=0);const r=o("lightbox",!1);if(!r)return e.style.display="none",void(t.style.display="block");const{gsap:a}=r;return new Promise(r=>{const o=a.timeline({onComplete:()=>{e.style.display="none",e.style.position="",e.style.clipPath="",t.style.position="",t.style.clipPath="",r()},defaults:{duration:n,ease:"power1.inOut"}});o.set(e,{position:"absolute",top:0,left:0,width:"100%",clipPath:"inset(0% 0% 0% 0%)"}),o.set(t,{display:"block",position:"relative",clipPath:"inset(0% 0% 100% 0%)"}),o.to(e,{clipPath:"inset(100% 0% 0% 0%)"}),o.to(t,{clipPath:"inset(0% 0% 0% 0%)"},"<40%")})}(t,n,.3):(t.style.display="none",n.style.display="block"),y=e,b=!1}const E=e(t,"previous",n),A=e(t,"next",n);if(E){const e=E.querySelector(v)||E;r(e,"click",()=>{w(0===y?f.length-1:y-1)})}if(A){const e=A.querySelector(v)||A;r(e,"click",()=>{w(y===f.length-1?0:y+1)})}const k=t.attributes.properties?.button;if(k&&m.size>0){r(document,"click",e=>{const t=e.target.closest(`[${k}]`);if(!t)return;const n=t.getAttribute(k);n&&m.has(n)&&w(m.get(n))})}}),{result:`lightbox initialized (${c.length} instances)`,destroy:()=>{n.handlers.forEach(({element:e,event:t,handler:n,options:r})=>{e.removeEventListener(t,n,r)}),n.handlers.length=0}}}const se=t._global.apiName;function ae(t){const n={handlers:[],observers:[],draggables:[]},r=(e,t,r,o)=>{e.addEventListener(t,r,o),n.handlers.push({element:e,event:t,handler:r,options:o})},c=o("slider",!1);if(!c)return{result:"slider skipped (no GSAP)",destroy:()=>{}};const{gsap:u,Draggable:d}=c;if(!h())return m("slider",["Draggable"],"error"),{result:"slider skipped (no Draggable)",destroy:()=>{}};const f=s();const p=a(t,"component");return p.forEach(function(o){const s=e(t,"element",o),c=e(t,"list",o);if(!c)return void console.warn(`[${se}] Slider component missing list:`,o);if(!s)return void console.warn(`[${se}] Slider component missing element:`,o);let p=Array.from(c.children);if(0===p.length)return;const m=p.length,h=`slider-${Math.random().toString(36).substring(2,9)}`;c.setAttribute("id",h),c.setAttribute("role","region"),c.setAttribute("aria-label","Slider content");const g=t.attributes?.properties||{},v="true"===s.getAttribute(g.free||"data-hs-slider-free"),y="false"!==s.getAttribute(g.follow||"data-hs-slider-follow"),b="true"===s.getAttribute(g.wheel||"data-hs-slider-wheel"),w="true"===s.getAttribute(g.toClicked||"data-hs-slider-to-clicked"),E="true"===s.getAttribute(g.infinite||"data-hs-slider-infinite"),A=f?0:parseFloat(s.getAttribute(g.speed||"data-hs-slider-speed")||"0.5"),k=a(t,"previous",o),x=a(t,"next",o),L=i(l.clickable,"button"),S=[],T=[];k.forEach(e=>{const t=e.querySelector(L);t&&S.push(t)}),x.forEach(e=>{const t=e.querySelector(L);t&&T.push(t)});const C=e(t,"dots",o);let P=null;C?.firstElementChild&&(P=C.firstElementChild.cloneNode(!0),P.classList.remove(l.classes.active));const q=e(t,"draggable-wrapper",o),$=e(t,"draggable-element",o);let M=0;if(E){q&&(q.style.display="none");const e=p[0].offsetWidth,t=s.offsetWidth,n=getComputedStyle(c),r=parseFloat(n.gap)||0,o=Math.max(1,Math.round((t+r)/(e+r)));M=o+1;for(let s=m-M;s<m;s++){const e=p[s<0?m+s:s].cloneNode(!0);e.setAttribute("data-clone","true"),c.insertBefore(e,c.firstChild)}for(let s=0;s<M;s++){const e=p[s].cloneNode(!0);e.setAttribute("data-clone","true"),c.appendChild(e)}p=Array.from(c.children)}const D={slidePositions:[],currentIndex:0,draggable:null};let I=!1;function N(){if(E)return m;const e=function(){if(0===p.length)return 1;const e=s.offsetWidth,t=p[0].offsetWidth,n=getComputedStyle(c),r=parseFloat(n.gap)||0;return t+r===0?1:Math.max(1,Math.round((e+r)/(t+r)))}();return Math.max(1,p.length-e+1)}function F(){D.slidePositions=[];const e=N(),t=getComputedStyle(c),n=parseFloat(t.gap)||0,r=O();for(let o=0;o<e;o++)if(o===e-1)D.slidePositions.push(r.minX);else{let e=0;for(let t=0;t<o;t++)e+=p[t].offsetWidth+n;D.slidePositions.push(-e)}}function O(){const e=s.offsetWidth,t=c.scrollWidth;return{minX:-Math.max(0,t-e),maxX:0}}function H(){const e=p[0]?.offsetWidth||0,t=getComputedStyle(c);return e+(parseFloat(t.gap)||0)}function z(){if(!E)return;I=!1;const e=u.getProperty(c,"x"),t=H(),n=M*t,r=-n,o=-(n+m*t-t);let s=e,a=!1;if(e>r){s=o+(e-r),a=!0}else if(e<o){s=r-(o-e),a=!0}a&&(s=Math.max(o,Math.min(r,s)),u.set(c,{x:s}),I=!0,D.draggable&&D.draggable.update(),W(s),X(),j(),R())}if(F(),E){const e=H(),t=-M*e;u.set(c,{x:t})}function W(e){const t=N();if(E){const n=H(),r=M*n,o=Math.abs(e)-r,s=Math.round(o/n);return void(D.currentIndex=(s%t+t)%t)}const n=O(),r=Math.abs(n.minX);if(0===r)return void(D.currentIndex=0);const o=Math.abs(e)/r;D.currentIndex=Math.min(t-1,Math.floor(o*t))}function B(e){if(v)return W(e),e;let t=D.slidePositions[0],n=Math.abs(e-t),r=0;return D.slidePositions.forEach((o,s)=>{const a=Math.abs(e-o);a<n&&(n=a,t=o,r=s)}),D.currentIndex=r,t}function R(){const e=N(),t=0===D.currentIndex,n=D.currentIndex>=e-1,r=v||E;S.forEach(e=>{e.disabled=!r&&t,e.setAttribute("aria-disabled",r?"false":String(t))}),T.forEach(e=>{e.disabled=!r&&n,e.setAttribute("aria-disabled",r?"false":String(n))})}function X(){const e=l.classes.active;p.forEach((t,n)=>{t.classList.toggle(e,n===D.currentIndex)})}let U=[],V=null;function j(){const e=l.classes.active;U.forEach((t,n)=>{t.classList.toggle(e,n===D.currentIndex),t.setAttribute("aria-current",n===D.currentIndex?"true":"false")})}function G(e,t=!0){u.killTweensOf(c);const n=N();if(E){const r=H();let o=e;e<0?o=n-1:e>=n&&(o=0);const s=-(M*r+o*r);if(e<0||e>=n){const t=u.getProperty(c,"x");if(e<0){const e=t-m*r;u.set(c,{x:e})}else{const e=t+m*r;u.set(c,{x:e})}D.draggable&&D.draggable.update()}return D.currentIndex=o,R(),X(),j(),void(t&&A>0?u.to(c,{x:s,duration:A,ease:"power2.out",onUpdate:()=>{D.draggable&&D.draggable.update(),Y()}}):(u.set(c,{x:s}),D.draggable&&D.draggable.update(),Y()))}const r=Math.max(0,Math.min(e,n-1)),o=D.slidePositions[r];void 0!==o&&(D.currentIndex=r,R(),X(),j(),t&&A>0?u.to(c,{x:o,duration:A,ease:"power2.out",onUpdate:()=>{D.draggable&&D.draggable.update(),Y()}}):(u.set(c,{x:o}),D.draggable&&D.draggable.update(),Y()))}function Y(){if(!q||!$)return;const e=O(),t=Math.abs(e.minX);if(0===t)return;const n=u.getProperty(c,"x"),r=Math.max(0,Math.min(1,Math.abs(n)/t)),o=q.offsetWidth,s=$.offsetWidth,a=Math.max(0,o-s);u.set($,{x:r*a})}if(d){const e=O(),t=d.create(c,{type:"x",bounds:E?void 0:{minX:e.minX,maxX:e.maxX},inertia:!0,edgeResistance:E?0:.65,dragResistance:y?0:.5,cursor:"auto",activeCursor:"auto",allowContextMenu:!0,snap:v||E?void 0:{x:B},onDrag:function(){const e=u.getProperty(c,"x");Y(),B(e),X(),j(),R()},onThrowUpdate:function(){if(z(),Y(),!I){B(u.getProperty(c,"x")),X(),j(),R()}},onThrowComplete:function(){z(),v||(R(),X(),j()),Y()},onDragEnd:function(){v&&Y()}});n.draggables.push(t),D.draggable=t[0]}function K(){if(!C||!P)return;C.innerHTML="",U=[];const e=l.classes.active,t=N();for(let n=0;n<t;n++){const t=P.cloneNode(!0);t.setAttribute("role","button"),t.setAttribute("tabindex","0"),t.setAttribute("aria-label",`Go to page ${n+1}`),t.setAttribute("aria-controls",h),n===D.currentIndex&&(t.classList.add(e),t.setAttribute("aria-current","true"));r(t,"click",()=>G(n));r(t,"keydown",e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),G(n))}),C.appendChild(t),U.push(t)}}if(K(),q&&$&&d){const e=()=>({minX:0,maxX:q.offsetWidth-$.offsetWidth}),t=d.create($,{type:"x",bounds:e(),allowContextMenu:!0,onDrag:function(){const t=e(),n=Math.max(0,Math.min(1,this.x/t.maxX)),r=O(),o=-n*Math.abs(r.minX);u.set(c,{x:o}),D.draggable&&D.draggable.update(),B(o),X(),j(),R()},onDragEnd:function(){if(!v){B(u.getProperty(c,"x")),G(D.currentIndex)}}});n.draggables.push(t),V=t[0]}if(S.forEach(e=>{e.setAttribute("aria-controls",h);r(e,"click",()=>G(D.currentIndex-1))}),T.forEach(e=>{e.setAttribute("aria-controls",h);r(e,"click",()=>G(D.currentIndex+1))}),b){let e=0,t=!1,n=null;r(s,"wheel",r=>{if(t)return;const o=r.deltaX;if(Math.abs(o)<1)return;e+=o,n&&clearTimeout(n),n=window.setTimeout(()=>{e=0},150);Math.abs(e)>=100&&(r.preventDefault(),t=!0,G(e>0?D.currentIndex+1:D.currentIndex-1),e=0,setTimeout(()=>{t=!1},1e3*A+50))},{passive:!1})}w&&p.forEach((e,t)=>{r(e,"click",()=>{t!==D.currentIndex&&G(t)})});let _=N(),J=null;const Z=new ResizeObserver(()=>{J&&clearTimeout(J),J=window.setTimeout(()=>{const e=N();e!==_&&(D.currentIndex>=e&&(D.currentIndex=e-1),K(),_=e),F();const t=O();if(D.draggable&&(D.draggable.applyBounds({minX:t.minX,maxX:t.maxX}),D.draggable.update()),v||G(D.currentIndex,!1),Y(),V&&q&&$){const e=q.offsetWidth,t=$.offsetWidth;V.applyBounds({minX:0,maxX:e-t}),V.update()}},150)});Z.observe(s.parentElement||s),n.observers.push(Z),R(),X(),Y()}),{result:`slider initialized (${p.length} instances)`,destroy:()=>{n.draggables.forEach(e=>{try{Array.isArray(e)?e.forEach(e=>e.kill&&e.kill()):e?.kill&&e.kill()}catch(t){}}),n.draggables.length=0,n.observers.forEach(e=>e.disconnect()),n.observers.length=0,n.handlers.forEach(({element:e,event:t,handler:n,options:r})=>{e.removeEventListener(t,n,r)}),n.handlers.length=0}}}const ie=t._global.apiName;async function le(e){const t={handlers:[],tweens:[]},n=o("theme-animator",!0);if(!n)return{result:"theme-animator skipped - GSAP not available",destroy:()=>{}};const{gsap:r,ScrollTrigger:a}=n,i={prefix:e?.defaults?.prefix||"--_theme---",duration:e?.defaults?.duration||.5,ease:e?.defaults?.ease||"power2.inOut"},l={},c=new WeakMap,u=[];let d=0;const f=e?.attributes?.elements?.template?.primary||"data-hs-theme-template";function p(e,t){const n=/var\(\s*(--[\w-]+)\s*(?:,\s*([^)]+))?\)/g;let r,o=e,s=0;for(;null!==(r=n.exec(o))&&s<10;){const e=r[1],a=r[2],i=t.getPropertyValue(e).trim()||a||"";o=o.replace(r[0],i),n.lastIndex=0,s++}return o}function m(){const e=document.querySelectorAll(`[${f}]`);if(0===e.length)return;const t=i.prefix;e.forEach(e=>{const n=e.getAttribute(f);if(!n)return;const r=getComputedStyle(e),o={};for(let s=0;s<r.length;s++){const e=r[s];if(e.startsWith(t)){let t=r.getPropertyValue(e).trim();t&&(t=p(t,r),o[e]=t)}}l[n]=o})}function h(e){return"string"==typeof e?Array.from(document.querySelectorAll(e)):Array.isArray(e)?e:[e]}function v(e){return s()?0:e}function y(e){if(c.has(e))return c.get(e);const t=getComputedStyle(e),n={},r=i.prefix;for(let o=0;o<t.length;o++){const e=t[o];if(e.startsWith(r)){let r=t.getPropertyValue(e).trim();r&&(r=p(r,t),n[e]=r)}}return c.set(e,n),n}function b(e,n,o={}){if(!g())return console.warn(`[${ie}] ScrollTrigger not available for scrub`),null;const s=h(e),a=l[n];if(!a)return console.warn(`[${ie}] Theme template "${n}" not found`),null;const i=[],c="scrub-"+d++;return s.forEach(s=>{const l={...a,scrollTrigger:{trigger:o.trigger||s,start:o.start||"top bottom",end:o.end||"bottom center",scrub:o.scrub??!0,markers:o.markers||!1,pin:o.pin,onLeaveBack:o.onLeaveBack,...o}},d=r.to(s,l);i.push(d),t.tweens.push(d),u.push({id:c,tween:d,target:e,themeName:n,scrollConfig:o})}),1===i.length?i[0]:i}await async function(){return new Promise(e=>{const t=Array.from(document.querySelectorAll('link[rel="stylesheet"]'));if(0===t.length)return void e();let n=0;const r=()=>{n++,n>=t.length&&e()};t.forEach(e=>{e.sheet?r():(e.addEventListener("load",r),e.addEventListener("error",r))}),setTimeout(e,2e3)})}(),m();const w={templates:l,to:function(e,n,o={}){const s=h(e),a=l[n];if(!a)return console.warn(`[${ie}] Theme template "${n}" not found`),null;s.forEach(e=>y(e));const c={duration:v(o.duration??i.duration),ease:o.ease??i.ease,...a,onComplete:o.onComplete,onUpdate:o.onUpdate},u=[];return s.forEach(e=>{const n=r.to(e,c);u.push(n),t.tweens.push(n)}),1===u.length?u[0]:u},revert:function(e,n={}){const o=h(e),s=v(n.duration??i.duration),a=n.ease??i.ease,l=[];return o.forEach(e=>{const o=c.get(e);if(!o)return void console.warn(`[${ie}] No original state captured for element`);const i={duration:s,ease:a,...o,onComplete:n.onComplete,onUpdate:n.onUpdate},u=r.to(e,i);l.push(u),t.tweens.push(u)}),1===l.length?l[0]:l},scrub:b,timeline:function(e,n,o={}){const s=r.timeline(o);return n.forEach(({theme:t,duration:n,ease:r,position:o})=>{const a=l[t];if(a){const t=v(n??i.duration);s.to(e,{duration:t,ease:r??i.ease,...a},o)}}),t.tweens.push(s),s},getTemplates:function(){return Object.keys(l)},getTemplate:function(e){return l[e]||null},refresh:function(){const e=u.map(e=>({...e,progress:e.tween.scrollTrigger?.progress||0}));u.forEach(e=>{const t=e.tween.scrollTrigger;t&&t.kill(),e.tween.kill?.()}),u.length=0,Object.keys(l).forEach(e=>delete l[e]),m(),e.forEach(({target:e,themeName:t,scrollConfig:n,progress:r})=>{const o=b(e,t,n);if(o&&r>0){const e=(Array.isArray(o)?o[0]:o).scrollTrigger;e&&requestAnimationFrame(()=>{e.scroll(r*(e.end-e.start)+e.start)})}})},captureOriginal:y,killScrub:function(e){(e?u.filter(t=>(t.target,t.target===e)):[...u]).forEach(e=>{const t=e.tween.scrollTrigger;t&&t.kill(),e.tween.kill?.();const n=u.indexOf(e);n>-1&&u.splice(n,1)})}};return window[ie]&&(window[ie].themeAnimator=w),{result:`theme-animator initialized with ${Object.keys(l).length} templates`,destroy:()=>{t.tweens.forEach(e=>{e?.kill&&e.kill()}),t.tweens.length=0,t.handlers.forEach(({element:e,event:t,handler:n,options:r})=>{e.removeEventListener(t,n,r)}),t.handlers.length=0,window[ie]?.themeAnimator&&delete window[ie].themeAnimator}}}async function ce(){const e={destroyFunctions:[]},n=t.default;try{const t=await w();t?.destroy&&e.destroyFunctions.push(t.destroy)}catch(i){console.error("[default] Error initializing transition:",i)}const r=[E(n["smooth-scroll"]),S(n.navbar),T(n.accordion),P(),q(n.pagination),M(n.comparison),D(n.tabs),I(n.modal),B(),te(),ne(),oe(n.lightbox),ae(n.slider),le(n["theme-animator"])],o=await Promise.allSettled(r);o.forEach(t=>{"fulfilled"===t.status&&t.value?.destroy&&e.destroyFunctions.push(t.value.destroy)});const s=o.filter(e=>"fulfilled"===e.status).length,a=o.length-s;return a>0&&console.warn(`[default] ${s+1}/${o.length+1} modules loaded successfully. ${a} failed but won't affect other modules.`),{result:"default initialized",destroy:()=>{e.destroyFunctions.forEach(e=>{try{e()}catch(i){console.error("[default] Error during cleanup:",i)}}),e.destroyFunctions.length=0}}}export{ce as init};
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|