@andreyshpigunov/x 0.5.16 → 0.5.17
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/assets/js/app.js +1 -1
- package/dist/x.js +1 -1
- package/index.html +1 -1
- package/package.json +1 -1
- package/src/components/x/typograf.js +209 -0
- package/src/js/x.js +3 -0
package/assets/js/app.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function $parcel$export(e,t,i,s){Object.defineProperty(e,t,{get:i,set:s,enumerable:!0,configurable:!0})}var $parcel$global="u">typeof globalThis?globalThis:"u">typeof self?self:"u">typeof window?window:"u">typeof global?global:{},$parcel$modules={},$parcel$inits={},parcelRequire=$parcel$global.parcelRequirec3c2;null==parcelRequire&&((parcelRequire=function(e){if(e in $parcel$modules)return $parcel$modules[e].exports;if(e in $parcel$inits){var t=$parcel$inits[e];delete $parcel$inits[e];var i={id:e,exports:{}};return $parcel$modules[e]=i,t.call(i.exports,i,i.exports),i.exports}var s=Error("Cannot find module '"+e+"'");throw s.code="MODULE_NOT_FOUND",s}).register=function(e,t){$parcel$inits[e]=t},$parcel$global.parcelRequirec3c2=parcelRequire);var parcelRegister=parcelRequire.register;parcelRegister("ehsFN",function(module,exports){$parcel$export(module.exports,"lib",function(){return lib});let HAS_DOM=()=>"u">typeof document&&"u">typeof window;class Lib{constructor(){this.loadedScripts=new Set,HAS_DOM()&&this._elementRender()}_elementRender(){HAS_DOM()&&document.addEventListener("DOMContentLoaded",()=>{let elements=this.qsa("[x-render]");for(let i=0;i<elements.length;i++){let item=elements[i];try{let expression=item.getAttribute("x-render");if(expression){let value=eval(expression);this.render(item,value)}}catch(_){}}},{once:!0})}_escapeHtml(e){if(null==e)return"";let t=String(e);if(HAS_DOM()){let e=document.createElement("div");return e.textContent=t,e.innerHTML}return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}id(e){return HAS_DOM()?document.getElementById(e):null}qs(e,t=document){return e?HAS_DOM()?"string"==typeof e?t.querySelector(e):e instanceof Node?e:e instanceof NodeList?e.length?e[0]:null:Array.isArray(e)&&e.length?e[0]instanceof Node?e[0]:t.querySelector(e[0]):e===window?e:null:e instanceof Node?e:null:null}qsa(e,t=document){if(!e)return[];if(!HAS_DOM())return e instanceof Node?[e]:[];if("string"==typeof e)return Array.from(t.querySelectorAll(e));if(e instanceof NodeList)return Array.from(e);if(e instanceof Node)return[e];if(Array.isArray(e)&&e.length){let i=[];for(let s=0;s<e.length;s++){let n=e[s];n instanceof Node?i.push(n):n instanceof NodeList?i.push(...n):i.push(...t.querySelectorAll(n))}return i.flat()}return e===window?[e]:[]}async hide(e){await this.addClass(e,"hidden")}async show(e){await this.removeClass(e,"hidden")}async toggle(e){await this.toggleClass(e,"hidden")}async switch(e,t){t?await this.removeClass(e,"hidden"):await this.addClass(e,"hidden")}async addClass(e,t,i=0){let s=this.qsa(e),n=s.length;if(n){if(i>0){let e=t.replace(/_.*/,"")+"_ready";for(let t=0;t<n;t++)s[t].classList.add(e);await new Promise(e=>setTimeout(e,i))}for(let e=0;e<n;e++)s[e].classList.add(t)}}async removeClass(e,t,i=0){let s=this.qsa(e),n=s.length;if(n){for(let e=0;e<n;e++)s[e].classList.remove(t);if(i>0){await new Promise(e=>setTimeout(e,i));let e=t.replace(/_.*/,"")+"_ready";for(let t=0;t<n;t++)s[t].classList.remove(e)}}}async toggleClass(e,t,i=0){let s=this.qsa(e),n=s.length;for(let e=0;e<n;e++){let n=s[e];n.classList.contains(t)?await this.removeClass(n,t,i):await this.addClass(n,t,i)}}async switchClass(e,t,i,s=0){i?await this.addClass(e,t,s):await this.removeClass(e,t,s)}reload(){"u">typeof window&&location.reload()}reloadWithHash(e){"u">typeof window&&(location.hash=e,this.reload())}redirectTo(e){"u">typeof window&&(location.href=e)}updateURL(e,t){"u">typeof window&&(history.pushState?history.pushState(null,t,e):location.href=e)}random(e,t){return Math.floor(Math.random()*(t-e+1))+e}price(e){return parseFloat(e).toFixed(2).replace(/\d(?=(\d{3})+\.)/g,"$& ").replace(".00","")}number(e){let t=(e+"").split(".");return t[0]=t[0].replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1 "),t.join(".")}numberDecline(e,t,i,s){if(e>10&&1===Math.floor(e%100/10))return s;switch(e%10){case 1:return t;case 2:case 3:case 4:return i;default:return s}}isEmail(e){return"string"==typeof e&&/^[^\s@]+@[^\s@]+\.[^\s@]{2,}$/.test(e.trim())}isValidJSON(e){if("string"!=typeof e)return!1;try{return JSON.parse(e),!0}catch{return!1}}isInteger(e){return Number.isInteger(Number(e))}isDouble(e){let t=Number(e);return!isNaN(t)&&"number"==typeof t}makeId(){return"id"+this.random(1e5,999999)}makePassword(e=8,t){e<1&&(e=8);let i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#^$%^&*()-+:,.;_",s="";for(let t=0;t<e;t++)s+=i[Math.floor(Math.random()*i.length)];if(t){let e=this.qs(t);e&&"value"in e&&(e.value=s);return}return s}loadScript(e,t,i="async"){if(HAS_DOM()&&e&&"function"==typeof t){try{if("string"==typeof e&&e.startsWith("http")){let t=new URL(e,window.location.href);if("http:"!==t.protocol&&"https:"!==t.protocol)return}}catch(t){if(!e.startsWith("/")&&!e.startsWith("./")&&!e.startsWith("../"))return}if(this.loadedScripts.has(e))return void t();try{let s=document.createElement("script");s.onload=t,s.onerror=()=>this.loadedScripts.delete(e),s.src=e,i&&s.setAttribute(i,""),s.crossOrigin="anonymous",document.body.appendChild(s),this.loadedScripts.add(e)}catch(e){}}}deferred(e,t=1e4){let i;if("u"<typeof window)return;let s=["scroll","resize","click","keydown","mousemove","touchmove"],n=()=>{for(let e=0;e<s.length;e++)window.removeEventListener(s[e],n,{once:!0});"complete"===document.readyState?e():window.addEventListener("load",e,{once:!0}),clearTimeout(i)};i=setTimeout(n,t);for(let e=0;e<s.length;e++)window.addEventListener(s[e],n,{once:!0})}deffered(e,t=1e4){return this.deferred(e,t)}throttle(e,t,i={}){return this._throttle(e,t,i)}debounce(e,t,i={}){return this._debounce(e,t,i)}onAppear(e,t,i=null,s={}){if(!HAS_DOM()||"function"!=typeof t||!("IntersectionObserver"in window))return;let n=this.qsa(e),r=n.length;if(!r)return;let o=new IntersectionObserver((e,s)=>{for(let n=0;n<e.length;n++){let r=e[n];r.isIntersecting?(t(r.target),i||s.unobserve(r.target)):i&&i(r.target)}},{root:null,rootMargin:"200px",threshold:.1,...s});for(let e=0;e<r;e++)o.observe(n[e])}alertErrors(e){e&&("string"==typeof e?alert(e):alert(Object.values(e).join("\n")))}printErrors(e){return e?"string"==typeof e?`<div>${this._escapeHtml(e)}</div>`:Object.entries(e).map(([e,t])=>{let i=this._escapeHtml(String(e)),s=this._escapeHtml(String(t));return`<div class="error_${i}">${s}</div>`}).join("\n"):""}async render(e,t,i=null,s=!1){if(!e)return;let n=this.qsa(e),r=n.length;if(r)try{let e="function"==typeof t?await t():t,o=String(e||"");for(let e=0;e<r;e++){let t=n[e];if(s)if(null==i)t.textContent=o;else{let e=document.createTextNode(o);"beforebegin"===i?t.parentNode?.insertBefore(e,t):"afterbegin"===i?t.insertBefore(e,t.firstChild):"beforeend"===i?t.appendChild(e):"afterend"===i&&t.parentNode?.insertBefore(e,t.nextSibling)}else null==i?t.innerHTML=o:t.insertAdjacentHTML(i,o)}}catch(e){}}transitionsOn(e=0){HAS_DOM()&&setTimeout(()=>document.documentElement.classList.remove("noTransitions"),e)}transitionsOff(){HAS_DOM()&&document.documentElement.classList.add("noTransitions")}async sleep(e){return new Promise(t=>setTimeout(t,e))}_throttle(e,t,i={}){let s=null,n=null,r=null,o=0,{leading:l=!0,trailing:a=!0}=i,d=t=>{o=t,e.apply(r,n),n=r=null},c=function(...e){let i=Date.now();o||l||(o=i),n=e,r=this;let c=t-(i-o);c<=0||c>t?(s&&clearTimeout(s),s=null,d(i)):!s&&a&&(s=setTimeout(()=>{s=null,a&&n&&d(Date.now())},c))};return c.cancel=()=>{s&&clearTimeout(s),s=n=r=null,o=0},c}_debounce(e,t,i={}){let s=null,n=null,r=null,{leading:o=!1,trailing:l=!0}=i,a=()=>{e.apply(r,n),n=r=null},d=function(...e){n=e,r=this,s&&clearTimeout(s),o&&!s&&a(),s=setTimeout(()=>{s=null,l&&n&&a()},t)};return d.cancel=()=>{s&&clearTimeout(s),s=n=r=null},d}}let lib=new Lib});var $ehsFN=parcelRequire("ehsFN");class $fb3cb004b28f41eb$var$Modal{constructor(){this.modalLevel=0,this.lockCount=0,this.html=null,this._initialized=!1,this._clickHandler=null,this._keydownHandler=null}init(){"u">typeof document&&"u">typeof window&&(this._initialized&&this.destroy(),this.html=$ehsFN.lib.qs("html"),this._renderModalContents(),this._setupModalLinks(),this._setupGlobalListeners(),this._initialized=!0)}destroy(){"u">typeof document&&(this._clickHandler&&(document.removeEventListener("click",this._clickHandler),this._clickHandler=null),this._keydownHandler&&(document.removeEventListener("keydown",this._keydownHandler),this._keydownHandler=null),this.modalLevel=0,this.lockCount=0,this.html=null,this._initialized=!1)}_isValidId(e){return"string"==typeof e&&!!e&&/^[a-zA-Z0-9_-]+$/.test(e)}_escapeHtml(e){if(null==e)return"";let t=String(e);if("u">typeof document){let e=document.createElement("div");return e.textContent=t,e.innerHTML}return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}_renderModalContents(){let e=$ehsFN.lib.qsa("[x-modal]"),t=$ehsFN.lib.qs(".modal-here")||$ehsFN.lib.qs("body");if(t)for(let i=0;i<e.length;i++){let s=e[i],n=s.getAttribute("x-modal");if(!n||!this._isValidId(n)||$ehsFN.lib.qs("#"+n))continue;let r=s.getAttribute("class")||"",o=(s.getAttribute("data-window-class")||"").replace(/\s+/g," ").trim(),l=this._escapeHtml(o),a=s.innerHTML,d=document.createElement("div");d.id=n,d.className="modal "+r,d.innerHTML='<div class="modal-overlay"></div><div class="modal-outer"><div class="modal-inner"><div class="modal-window '+l+'">'+a+'<div class="modal-rail"><a role="button" class="modal-close"></a></div></div></div></div>',t.appendChild(d),s.remove()}}_setupModalLinks(){let e=$ehsFN.lib.qsa("[x-modal-open]");for(let t=0;t<e.length;t++){let i=e[t],s=i.getAttribute("x-modal-open");if(s&&this._isValidId(s)&&(i.addEventListener("click",e=>{e.preventDefault(),this.show(s)}),window.location.hash==="#"+s)){let e=$ehsFN.lib.qs("#"+s);e&&e.classList.contains("modal_hash")&&this.show(s)}}}_setupGlobalListeners(){this._clickHandler=e=>{if(!$ehsFN.lib.qs(".modal_active"))return;let t=e.target,i=t.classList&&t.classList.contains("modal-close"),s=!t.closest||!t.closest(".modal-window");if(!i&&!s)return;e.preventDefault();let n=t.closest(".modal"),r=n?n.getAttribute("id"):null;r&&this._isValidId(r)&&this.hide(r)},this._keydownHandler=e=>{if("Escape"!==e.key)return;let t=$ehsFN.lib.qsa(".modal_active"),i=t.length;if(!i)return;let s=t[i-1].getAttribute("id");s&&this._isValidId(s)&&(e.preventDefault(),this.hide(s))},document.addEventListener("click",this._clickHandler),document.addEventListener("keydown",this._keydownHandler)}async show(e){if("u"<typeof document||!e||"string"!=typeof e||!this._isValidId(e)||this.lockCount>0)return;if(this.isActive(e))return void await this.hide(e);let t=$ehsFN.lib.qs("#"+e);if(t){t.classList.contains("modal_uniq")&&await this.hideAll(),this.lockCount++;try{await $ehsFN.lib.addClass(t,"modal_ready"),await $ehsFN.lib.sleep(10),t.dispatchEvent(new CustomEvent("modal:ready")),t.classList.contains("modal_hash")&&history.replaceState(null,"","#"+e),this.html&&($ehsFN.lib.addClass(this.html,"modal_active"),$ehsFN.lib.addClass(this.html,e+"_active")),$ehsFN.lib.addClass("[x-modal-open="+e+"]","active"),this.modalLevel++,$ehsFN.lib.addClass(t,"modal_z"+this.modalLevel),await $ehsFN.lib.addClass(t,"modal_active");let i=$ehsFN.lib.qs(".modal-outer",t);i&&i.scrollTo(0,1),await $ehsFN.lib.sleep(200),t.dispatchEvent(new CustomEvent("modal:open"))}catch(e){}finally{this.lockCount--}}}async hide(e){if("u"<typeof document||!e||"string"!=typeof e||!this._isValidId(e)||this.lockCount>0)return;let t=$ehsFN.lib.qs("#"+e);if(t){this.lockCount++;try{t.classList.contains("modal_hash")&&window.location.hash==="#"+e&&history.replaceState(null,document.title,window.location.pathname+window.location.search),$ehsFN.lib.removeClass("[x-modal-open="+e+"]","active"),await $ehsFN.lib.removeClass(t,"modal_active",200),$ehsFN.lib.removeClass(t,"modal_z"+this.modalLevel),t.dispatchEvent(new CustomEvent("modal:close")),this.html&&$ehsFN.lib.removeClass(this.html,e+"_active"),this.modalLevel--,0===this.modalLevel&&this.html&&$ehsFN.lib.removeClass(this.html,"modal_active")}catch(e){}finally{this.lockCount--}}}async hideAll(){if("u"<typeof document)return;let e=$ehsFN.lib.qsa(".modal_active");for(let t=0;t<e.length;t++){let i=e[t].getAttribute("id");i&&await this.hide(i)}}isActive(e){if("u"<typeof document||!e||"string"!=typeof e||!this._isValidId(e))return!1;let t=$ehsFN.lib.qs("#"+e);return!!t&&t.classList.contains("modal_active")}}let $fb3cb004b28f41eb$export$96e4b36520c26a2c=new $fb3cb004b28f41eb$var$Modal;var $ehsFN=parcelRequire("ehsFN");class $014037f76a5c216c$var$Animate{constructor(){this._ticking=!1,this._animations=[],this._scroll=this._scroll.bind(this),this._scrollHandler=this._scrollHandler.bind(this),this._initialized=!1,this._parents=new Set,this._elements=null}init(){"u"<typeof window||(this._cleanup(),this._elements=$ehsFN.lib.qsa("[x-animate]"),!this._elements?.length||(this._parseElementsAnimations(),this._animations.length&&(this._setupListeners(),this._initialized=!0)))}_cleanup(){!this._initialized||"u">typeof window&&(this._parents.forEach(e=>{e.removeEventListener("scroll",this._scrollHandler)}),window.removeEventListener("resize",this._scrollHandler),this._ticking=!1,this._animations=[],this._parents=new Set,this._elements=null,this._initialized=!1)}destroy(){"u">typeof window&&this._cleanup()}_parseElementsAnimations(){for(let e of(this._animations=[],this._elements))try{let t=JSON.parse(e.getAttribute("x-animate"));this._animations.push({element:e,trigger:$ehsFN.lib.qs(t.trigger)||e,parent:$ehsFN.lib.qs(t.parent)||window,start:t.start,end:t.end||!1,class:t.class,classRemove:!1!==t.classRemove,functionName:t.functionName,fn:null,lockedIn:!1,lockedOut:!1,log:t.log||!1})}catch(t){console.error("Invalid JSON in x-animate attribute:",e,t)}}_setupListeners(){for(let e of this._animations)this._parents.has(e.parent)||(this._parents.add(e.parent),e.parent.addEventListener("scroll",this._scrollHandler));window.addEventListener("resize",this._scrollHandler);let e=()=>requestAnimationFrame(()=>this._scroll());"complete"===document.readyState?e():window.addEventListener("load",e,{once:!0})}_scrollHandler(){this._ticking||(this._ticking=!0,window.requestAnimationFrame(()=>{this._scroll(),this._ticking=!1}))}_scroll(){for(let e=0;e<this._animations.length;e++){let t=this._animations[e];if(!t.element.isConnected||!t.trigger.isConnected)continue;!t.fn&&t.functionName&&"function"==typeof window[t.functionName]&&(t.fn=window[t.functionName]);let i=t.trigger.getBoundingClientRect(),s=t.parent,n=s===window?0:s.getBoundingClientRect().top,r=i.top-n,o=this._2px(t.start,s),l=this._2px(t.end,s),a=!isNaN(o),d=!isNaN(l),c=t.fn;t.log&&console.log(r,o,l,t),a&&d?(t.duration=o-l,r<=o&&r>=l?(t.lockedOut=!1,t.class&&!t.element.classList.contains(t.class)&&t.element.classList.add(t.class),c&&(t.progress=((o-r)/t.duration).toFixed(4),c(t))):(t.class&&t.classRemove&&t.element.classList.contains(t.class)&&t.element.classList.remove(t.class),!t.lockedOut&&c&&(r>=o?(t.progress=0,c(t),t.lockedOut=!0):r<=l&&(t.progress=1,c(t),t.lockedOut=!0)))):a&&(r<=o?(t.lockedOut=!1,t.class&&!t.element.classList.contains(t.class)&&t.element.classList.add(t.class),!t.lockedIn&&c&&(t.progress=1,c(t),t.lockedIn=!0)):(t.lockedIn=!1,t.class&&t.classRemove&&t.element.classList.contains(t.class)&&t.element.classList.remove(t.class),!t.lockedOut&&c&&r>=o&&(t.progress=0,c(t),t.lockedOut=!0)))}}_2px(e,t=window){if("number"==typeof e)return e;if("string"!=typeof e)return NaN;let i=parseFloat(e);return/[%vh]/.test(e)?(e.includes("vh")||t===window?document.documentElement.clientHeight:t.clientHeight)*i/100:i}}let $014037f76a5c216c$export$e3607ec2d7a891c4=new $014037f76a5c216c$var$Animate;var $ehsFN=parcelRequire("ehsFN");class $eb3d55ecca7ee7d2$var$Appear{constructor(){this._targets=[],this._observer=null,this._options={appearedClass:"appeared",visibleClass:"visible",once:!1,root:null,rootMargin:"0px",threshold:0},this._observerCallback=this._observerCallback.bind(this)}init(e={}){if("u"<typeof window||!("IntersectionObserver"in window)||(this._options={...this._options,...e},this._observer&&(this._observer.disconnect(),this._observer=null),this._targets=$ehsFN.lib.qsa("[x-appear]"),!this._targets.length))return;let{root:t,rootMargin:i,threshold:s}=this._options;this._observer=new IntersectionObserver(this._observerCallback,{root:t||null,rootMargin:i,threshold:s});for(let e=0;e<this._targets.length;e++)this._observer.observe(this._targets[e])}destroy(){"u">typeof window&&(this._observer&&(this._observer.disconnect(),this._observer=null),this._targets=[])}_observerCallback(e){let{appearedClass:t,visibleClass:i,once:s}=this._options,n=this._observer;for(let r=0;r<e.length;r++){let o=e[r],l=o.target;o.isIntersecting?(t&&!l.classList.contains(t)&&(l.classList.add(t),s&&n&&n.unobserve(l)),i&&!l.classList.contains(i)&&(l.classList.add(i),l.dispatchEvent(new CustomEvent("visible",{detail:{appeared:!0}})))):i&&l.classList.contains(i)&&(l.classList.remove(i),l.dispatchEvent(new CustomEvent("invisible",{detail:{appeared:!0}})))}}}let $eb3d55ecca7ee7d2$export$fb1b4b0e602f43f1=new $eb3d55ecca7ee7d2$var$Appear;var $ehsFN=parcelRequire("ehsFN");class $45256965eb1aa1f4$var$Lazyload{constructor(){this._observer=null,this._options={root:null,rootMargin:"200px",threshold:.1}}init(){if("u"<typeof window||"u"<typeof document||!("IntersectionObserver"in window))return;this._observer||(this._observer=new IntersectionObserver(this._callback.bind(this),this._options));let e=$ehsFN.lib.qsa("[x-lazyload]");for(let t=0;t<e.length;t++){let i=e[t];i.classList.contains("loaded")||this._observer.observe(i)}}destroy(){"u">typeof window&&this._observer&&(this._observer.disconnect(),this._observer=null)}_callback(e){for(let t=0;t<e.length;t++){let i=e[t];i.isIntersecting&&i.target&&this._loadImage(i.target)}}_fetchImage(e,t){return new Promise((i,s)=>{if(!e&&!t)return void s(Error("lazyload: no src or srcset"));let n=new Image;n.onload=i,n.onerror=()=>s(Error("lazyload: load failed")),t&&(n.srcset=t),e&&(n.src=e)})}_loadImage(e){if(!e||"IMG"!==e.nodeName)return;let t=e.getAttribute("data-src"),i=e.getAttribute("data-srcset");if(!t&&!i){this._observer&&this._observer.unobserve(e);return}let s=this._observer;this._fetchImage(t||null,i||null).then(()=>{i&&(e.srcset=i,e.removeAttribute("data-srcset")),t&&(e.src=t,e.removeAttribute("data-src")),e.classList.add("loaded"),s&&s.unobserve(e)}).catch(()=>{s&&s.unobserve(e)})}}let $45256965eb1aa1f4$export$c3e8f8508bab224b=new $45256965eb1aa1f4$var$Lazyload;var $ehsFN=parcelRequire("ehsFN");class $c188f7d5f390f2f6$var$Loadmore{constructor(){this.items={},this.locked=!1,this.observer=null,this._initialized=!1}init(){if("u"<typeof window||"u"<typeof document)return;this._initialized&&this.destroy();let e=$ehsFN.lib.qsa("[x-loadmore]"),t=e.length;if(!t)return;let i=/^[a-zA-Z_$][a-zA-Z0-9_$.]*$/,s=async(e,t)=>{for(let s=0;s<e.length;s++){let n=e[s];if(n.isIntersecting&&!this.locked){this.locked=!0;try{let e,s=n.target;if(!s)continue;let r=s.getAttribute("x-loadmore");if(!r)continue;try{e=JSON.parse(r)}catch(e){continue}let o=e&&e.functionName;if("string"!=typeof o||!i.test(o))continue;let l=window[o];if("function"!=typeof l)continue;let a=s.id,d=a?this.items[a]:null;if(!d)continue;let c=d.page||1,h=await l(c);!0===h?d.page=c+1:!1===h&&t.unobserve(s)}catch(e){}finally{this.locked=!1}}}};if("IntersectionObserver"in window){this.observer=new IntersectionObserver(s,{rootMargin:"0px 0px 400px 0px",threshold:0});for(let i=0;i<t;i++){let t=e[i],s=$ehsFN.lib.makeId();s&&(t.setAttribute("id",s),this.items[s]={el:t,page:1},this.observer.observe(t))}this._initialized=!0}}destroy(){"u">typeof window&&(this.observer&&(this.observer.disconnect(),this.observer=null),this.items={},this.locked=!1,this._initialized=!1)}reset(e){if("u"<typeof document)return;let t=$ehsFN.lib.qs(e);if(!t||!t.id)return;let i=this.items[t.id];i&&(i.page=1)}}let $c188f7d5f390f2f6$export$6456520619f548d5=new $c188f7d5f390f2f6$var$Loadmore;var $ehsFN=parcelRequire("ehsFN");class $8f6aab8d3dab3eed$var$Sheets{constructor(){this._handlers=new Map,this._initialized=!1}_dispatchEvent(e,t,i={}){let s=new CustomEvent(`sheets:${t}`,{detail:i,bubbles:!0,cancelable:!1});e.dispatchEvent(s)}_isValidSheetValue(e){return"string"==typeof e&&!!e&&/^[a-zA-Z0-9_-]+$/.test(e)}init(){this._initialized&&this.destroy();let e=$ehsFN.lib.qsa("[x-sheets]");if(e.length){for(let t of e){if(!t)continue;for(let e of $ehsFN.lib.qsa("[x-sheet-open]:not([x-sheet-open] [x-sheet-open])",t)){if(!e)continue;let t=e.getAttribute("x-sheet-open");if(!t){console.warn("sheets.init: Tab has x-sheet-open attribute but no value",e);continue}if(!this._isValidSheetValue(t)){console.error("sheets.init: Invalid sheet value (security check failed):",t);continue}let i=e=>{e.preventDefault(),this.show(t)};e.addEventListener("click",i),this._handlers.set(e,i)}let e=$ehsFN.lib.qs("[x-sheet-open].active",t);if(e){let t=e.getAttribute("x-sheet-open");t&&this._isValidSheetValue(t)&&this.show(t)}this._dispatchEvent(t,"ready",{container:t,timestamp:Date.now(),initialized:!0})}this._initialized=!0}}destroy(){let e=new Set;for(let[t]of this._handlers.entries()){let i=t.closest("[x-sheets]");i&&e.add(i)}for(let[e,t]of this._handlers.entries())e.removeEventListener("click",t);for(let t of(this._handlers.clear(),this._initialized=!1,e))this._dispatchEvent(t,"destroy",{container:t,timestamp:Date.now(),wasInitialized:!0})}show(e,t={silent:!1,source:"api"}){if(!e||"string"!=typeof e)return void console.error("sheets.show: Sheet value is required and must be a string");if(!this._isValidSheetValue(e))return void console.error("sheets.show: Invalid sheet value (security check failed):",e);let i=CSS.escape(e),s=$ehsFN.lib.qs(`[x-sheet="${i}"]`);if(!s)return void console.warn("sheets.show: Target content not found:",e);let n=s.closest("[x-sheets]");if(!n)return void console.warn("sheets.show: Sheets container not found for:",e);let r=$ehsFN.lib.qs(`[x-sheet-open="${i}"]`,n);if(!r)return void console.warn("sheets.show: Tab not found:",e);if(r.classList.contains("active")&&s.classList.contains("active")){t.silent||this._dispatchEvent(n,"selected",{sheet:e,tab:r,content:s,container:n,previousSheet:e,previousTab:r,previousContent:s,wasActive:!0,source:t.source||"api",timestamp:Date.now()});return}let o=$ehsFN.lib.qs("[x-sheet-open].active",n),l=$ehsFN.lib.qs("[x-sheet].active",n),a=o?o.getAttribute("x-sheet-open"):null,d=$ehsFN.lib.qsa("[x-sheet-open]",n),c=$ehsFN.lib.qsa("[x-sheet]",n);for(let e of d)e&&e.classList.contains("active")&&e.classList.remove("active");for(let e of c)e&&e.classList.contains("active")&&e.classList.remove("active");r.classList.add("active"),s.classList.add("active"),t.silent||this._dispatchEvent(n,"selected",{sheet:e,tab:r,content:s,container:n,previousSheet:a,previousTab:o,previousContent:l,wasActive:!1,source:t.source||"api",timestamp:Date.now()})}}let $8f6aab8d3dab3eed$export$d1f2fc3a3d47c5af=new $8f6aab8d3dab3eed$var$Sheets;var $ehsFN=parcelRequire("ehsFN");class $3134c8ebb2c91188$var$Dropdown{constructor(){this._handlers=new Map,this._menus=new Map,this._parentToMenu=new Map,this._initialized=!1,this._globalClickHandler=null}init(){if(!("u"<typeof document)){for(let e of(this._initialized&&this._cleanup(),this._attachGlobalListeners(),$ehsFN.lib.qsa("[x-dropdown]"))){let t=e.parentElement;if(!t)continue;let i=$ehsFN.lib.qs("[x-dropdown-open]",t);i&&(this._setupAccessibility(t,i,e),this._bindTrigger(t,i),this._bindMenuKeys(e,i,t),this._menus.set(e,{parent:t,trigger:i}),this._parentToMenu.set(t,e),t.dispatchEvent(new CustomEvent("dropdown:ready")))}this._initialized=!0}}_setupAccessibility(e,t,i){e.classList.add("dropdown"),t.setAttribute("aria-expanded","false"),i.id||(i.id=$ehsFN.lib.makeId()),t.setAttribute("aria-controls",i.id),i.setAttribute("role","menu"),i.setAttribute("tabindex","-1");let s=i.querySelectorAll("li > a");for(let e=0;e<s.length;e++){let t=s[e];t.setAttribute("role","menuitem"),t.setAttribute("tabindex","-1")}}_bindTrigger(e,t){let i=$ehsFN.lib.throttle(()=>this._toggleDropdown(e,t),400),s=t.tagName,n="INPUT"===s||"TEXTAREA"===s,r=null,o=e=>{n||(e.stopPropagation(),i())},l=s=>{let{key:r}=s;if(" "!==r||!n){if(!n&&("Enter"===r||" "===r)){s.preventDefault(),i();return}if("ArrowDown"===r){s.preventDefault(),n||(this._open(e,t),this._focusFirstItem(e));return}"ArrowUp"===r&&(s.preventDefault(),n||(this._open(e,t),this._focusLastItem(e)))}},a=()=>{n?(r&&clearTimeout(r),this.closeAllDropdowns(),this._open(e,t)):t.classList.add("hover")},d=()=>{n?r=setTimeout(()=>this._close(e),200):t.classList.remove("hover")};this._handlers.set(t,{clickListener:o,keyListener:l,focusListener:a,blurListener:d,blurTimeout:r}),t.addEventListener("click",o),t.addEventListener("keydown",l),t.addEventListener("focus",a),t.addEventListener("blur",d)}_bindMenuKeys(e,t,i){let s=s=>{let n=e.querySelectorAll('[role="menuitem"]:not([disabled])'),r=n.length;if(!r)return;let o=-1,l=document.activeElement;for(let e=0;e<r;e++)if(n[e]===l){o=e;break}let a=s.key;if("ArrowDown"===a){s.preventDefault(),n[(o+1)%r].focus();return}if("ArrowUp"===a){s.preventDefault(),n[(o-1+r)%r].focus();return}if("Home"===a){s.preventDefault(),n[0].focus();return}if("End"===a){s.preventDefault(),n[r-1].focus();return}"Escape"===a&&(s.preventDefault(),this._close(i),t.focus())},n=e=>{e.target.matches('[role="menuitem"]')&&e.target.classList.add("hover")},r=e=>{e.target.matches('[role="menuitem"]')&&e.target.classList.remove("hover")};this._handlers.set(e,{keyListener:s,focusListener:n,blurListener:r}),e.addEventListener("keydown",s),e.addEventListener("focusin",n),e.addEventListener("focusout",r)}_cleanup(){this.closeAllDropdowns(),this._handlers.forEach((e,t)=>{e.clickListener&&t.removeEventListener("click",e.clickListener),e.keyListener&&t.removeEventListener("keydown",e.keyListener),e.focusListener&&(t.removeEventListener("focus",e.focusListener),t.removeEventListener("focusin",e.focusListener)),e.blurListener&&(t.removeEventListener("blur",e.blurListener),t.removeEventListener("focusout",e.blurListener)),e.blurTimeout&&clearTimeout(e.blurTimeout)}),this._handlers.clear(),this._menus.clear(),this._parentToMenu.clear(),$3134c8ebb2c91188$var$Dropdown._globalListenersAttached&&this._globalClickHandler&&(document.removeEventListener("click",this._globalClickHandler),$3134c8ebb2c91188$var$Dropdown._globalListenersAttached=!1)}_toggleDropdown(e,t){let i=e.classList.contains("dropdown_open");this.closeAllDropdowns(),i||this._open(e,t)}async _open(e,t){let i=this._parentToMenu.get(e);i&&(this._fireEvent(e,"beforeshow"),this._adjustPosition(e,i),$ehsFN.lib.addClass(t,"active"),$ehsFN.lib.addClass(e,"dropdown_open",20),t.setAttribute("aria-expanded","true"),this._fireEvent(e,"aftershow"))}_adjustPosition(e,t){e.classList.add("dropdown_ready");let i=t.getBoundingClientRect();e.classList.remove("dropdown_ready");let s=window.innerWidth,n=document.documentElement.scrollHeight;e.classList.remove("dropdown_right","dropdown_bottom"),i.right>s&&e.classList.add("dropdown_right"),window.scrollY+i.bottom>n&&e.classList.add("dropdown_bottom")}_focusFirstItem(e){let t=this._parentToMenu.get(e);if(!t)return;let i=t.querySelector('[role="menuitem"]:not([disabled])');i&&i.focus()}_focusLastItem(e){let t=this._parentToMenu.get(e);if(!t)return;let i=t.querySelectorAll('[role="menuitem"]:not([disabled])');i.length&&i[i.length-1].focus()}closeAllDropdowns(){if(document.querySelector(".dropdown_open"))for(let e of $ehsFN.lib.qsa(".dropdown_open"))this._close(e)}async _close(e){if(e._dropdownClosing)return;e._dropdownClosing=!0,this._fireEvent(e,"beforehide");let t=$ehsFN.lib.qs("[x-dropdown-open]",e);t&&($ehsFN.lib.removeClass(t,"active"),t.setAttribute("aria-expanded","false")),await $ehsFN.lib.removeClass(e,"dropdown_open",200),e.classList.remove("dropdown_right","dropdown_bottom"),this._fireEvent(e,"afterhide"),setTimeout(()=>{e._dropdownClosing=!1},100)}_fireEvent(e,t){e.dispatchEvent(new CustomEvent(`dropdown:${t}`))}_attachGlobalListeners(){$3134c8ebb2c91188$var$Dropdown._globalListenersAttached||(this._globalClickHandler=e=>{e.target.closest("[x-dropdown-open]")||e.target.closest("[x-dropdown] .dropdown_stay")||document.querySelector(".dropdown_open")&&this.closeAllDropdowns()},document.addEventListener("click",this._globalClickHandler),$3134c8ebb2c91188$var$Dropdown._globalListenersAttached=!0)}destroy(){"u">typeof document&&this._initialized&&(this._cleanup(),this._initialized=!1)}}$3134c8ebb2c91188$var$Dropdown._globalListenersAttached=!1;let $3134c8ebb2c91188$export$81207e5cc4186890=new $3134c8ebb2c91188$var$Dropdown;var $ehsFN=parcelRequire("ehsFN");class $fa742adec1b07386$var$Autocomplete{emptyStateHtml='<li><span class="op4">Ничего не найдено</span></li>';defaultStateHtml='<li><span class="op4">Начните печатать</span></li>';loadingStateHtml='<li><span class="op4">Загрузка...</span></li>';constructor(){this._clicked=!1,this._currentLoadId=0,this._loadData=this._loadData.bind(this),this._keyHandler=this._keyHandler.bind(this),this._clickHandler=this._clickHandler.bind(this),this._hideHandler=this._hideHandler.bind(this)}init(e,t={}){"u"<typeof window||!e||"string"!=typeof e||(this.emptyStateHtml=t.emptyStateHtml??this.emptyStateHtml,this.defaultStateHtml=t.defaultStateHtml??this.defaultStateHtml,this.loadingStateHtml=t.loadingStateHtml??this.loadingStateHtml,this.dropdown=$ehsFN.lib.id(e),!this.dropdown||(this.field=$ehsFN.lib.qs("[x-dropdown-open]",this.dropdown),this.list=$ehsFN.lib.qs("[x-dropdown]",this.dropdown),this.field&&this.list&&(this.data=t.data??null,this.loadData=t.loadData??null,this.mapData=t.mapData??null,this.renderItem=t.renderItem??null,this.onSelect=t.onSelect??null,this.resetFunc=t.resetFunc??null,this.debouncedLoadData=$ehsFN.lib.debounce(this._loadData,400),this.field.value.trim()?this._defaultState():this._reset(),this.field.addEventListener("focus",this.debouncedLoadData),this.field.addEventListener("input",this.debouncedLoadData),this.field.addEventListener("keydown",this._keyHandler),this.list.addEventListener("click",this._clickHandler),this.dropdown.addEventListener("dropdown:afterhide",this._hideHandler))))}destroy(){"u"<typeof window||this.field&&this.list&&this.dropdown&&(this._reset(),this.field.removeEventListener("focus",this.debouncedLoadData),this.field.removeEventListener("input",this.debouncedLoadData),this.field.removeEventListener("keydown",this._keyHandler),this.list.removeEventListener("click",this._clickHandler),this.dropdown.removeEventListener("dropdown:afterhide",this._hideHandler))}_keyHandler(e){"Enter"===e.key&&(e.preventDefault(),this.field?.blur())}_clickHandler(e){if(this._clicked)return;this._clicked=!0;let t=e.target.closest("[data-item]");if(!t||!this.onSelect)return void setTimeout(()=>{this._clicked=!1},0);try{let e=JSON.parse(t.dataset.item);this.onSelect(e)}catch(e){console.error("Autocomplete: error parsing data-item JSON",e)}setTimeout(()=>{this._clicked=!1},0)}_hideHandler(){if(this._clicked){this._clicked=!1;return}this.data?.length&&this.onSelect?(this._loadingState(),this.onSelect(this.data[0])):this._reset()}_loadingState(){$ehsFN.lib.render(this.list,this.loadingStateHtml)}_emptyState(){$ehsFN.lib.render(this.list,this.emptyStateHtml)}_defaultState(){$ehsFN.lib.render(this.list,this.defaultStateHtml)}_reset(){this.resetFunc&&this.resetFunc(),this.data=null,this._defaultState()}async _loadData(){if(!this.field||!this.field.value.trim())return void this._reset();if(!this.loadData)return void this._defaultState();this._loadingState();let e=Date.now();this._currentLoadId=e;try{let t=await this.loadData(this);if(e!==this._currentLoadId)return;this.data=this.mapData?this.mapData(t):t,this.render()}catch(t){e===this._currentLoadId&&this._reset(),console.error("Autocomplete: load error",t)}}render(){if(!this.data)return void this._reset();if(!this.data.length)return void this._emptyState();if(!this.renderItem)return void this._defaultState();let e=this.data.map(this.renderItem).join("");$ehsFN.lib.render(this.list,e)}}let $fa742adec1b07386$export$485ded5f26ebe08d=new $fa742adec1b07386$var$Autocomplete;var $ehsFN=parcelRequire("ehsFN");class $ef55f167e58e504d$var$Scroll{constructor(){this.parent=window,this.offset=0,this.classActive="active",this.hash=!1,this.to=this.scrollTo,this._linksHash={},this._scrollHandlers=new Map,this._initialized=!1}_isValidSelector(e){return!("string"!=typeof e||!e||/<script|javascript:/i.test(e))&&/^[#.a-zA-Z0-9_\-\[\]="':\s>+~,()]+$/.test(e)}init(){this._initialized&&this.destroy();let e=$ehsFN.lib.qsa("[x-scrollto]");if(e.length){for(let t of(this._linksHash={},e))if(t)try{let e=t.getAttribute("x-scrollto");if(!e){console.warn("scroll.init: Link has x-scrollto attribute but no value",t);continue}let i={};if($ehsFN.lib.isValidJSON(e)){let s=JSON.parse(e);if(!s||"object"!=typeof s){console.error("scroll.init: Invalid JSON object:",s);continue}let n=s.target;if(!n){console.error("scroll.init: Target required in JSON:",s);continue}if("string"!=typeof n||!this._isValidSelector(n)){console.error("scroll.init: Invalid or unsafe selector:",n);continue}let r=$ehsFN.lib.qs(n);if(!r){console.error("scroll.init: Target element not found:",n);continue}i.link=t,i.target=r,i.offset="number"==typeof s.offset?s.offset:this.offset,i.classActive=s.classActive||this.classActive,i.hash=s.hash??this.hash,s.parent?"string"==typeof s.parent?this._isValidSelector(s.parent)?i.parent=$ehsFN.lib.qs(s.parent)||this.parent:(console.error("scroll.init: Invalid parent selector:",s.parent),i.parent=this.parent):s.parent instanceof HTMLElement||s.parent===window?i.parent=s.parent:i.parent=this.parent:i.parent=this.parent}else{if(!this._isValidSelector(e)){console.error("scroll.init: Invalid or unsafe selector:",e);continue}let s=$ehsFN.lib.qs(e);if(!s){console.error("scroll.init: Target not found:",e);continue}i.link=t,i.parent=this.parent,i.target=s,i.offset=this.offset,i.classActive=this.classActive,i.hash=this.hash}if(i.link&&i.target){let e=$ehsFN.lib.makeId();if(!e){console.error("scroll.init: Failed to generate ID");continue}this._linksHash[e]=i,t.addEventListener("click",e=>{e.preventDefault(),this.scrollTo({parent:i.parent,target:i.target,offset:i.offset,classActive:i.classActive,hash:i.hash})})}}catch(e){console.error("scroll.init: Error processing link",t,e)}Object.keys(this._linksHash).length&&this._setupScrollObservers(),this._initialized=!0}}destroy(){for(let[e,t]of this._scrollHandlers.entries())e.removeEventListener("scroll",t);this._scrollHandlers.clear(),this._linksHash={},this._initialized=!1}_isValidId(e){return"string"==typeof e&&!!e&&/^[a-zA-Z0-9_-]+$/.test(e)}async scrollTo(e){return new Promise(t=>{let i,s,n,r,o,l,a,d;if(!e){console.error("scroll.scrollTo: Parameters required"),t();return}if(e instanceof HTMLElement)i=e,s=this.parent,n=this.offset,r=this.hash;else if("string"==typeof e){if(!this._isValidSelector(e)){console.error("scroll.scrollTo: Invalid or unsafe selector:",e),t();return}i=$ehsFN.lib.qs(e),s=this.parent,n=this.offset,r=this.hash}else if("object"==typeof e){if(e.target instanceof HTMLElement)i=e.target;else if("string"==typeof e.target){if(!this._isValidSelector(e.target)){console.error("scroll.scrollTo: Invalid or unsafe target selector:",e.target),t();return}i=$ehsFN.lib.qs(e.target)}else{console.error("scroll.scrollTo: Invalid target parameter:",e.target),t();return}e.parent===window||e.parent instanceof HTMLElement?s=e.parent:"string"==typeof e.parent?this._isValidSelector(e.parent)?s=$ehsFN.lib.qs(e.parent)||this.parent:(console.error("scroll.scrollTo: Invalid or unsafe parent selector:",e.parent),s=this.parent):s=this.parent,n="number"==typeof e.offset?e.offset:this.offset,r=e.hash??this.hash}else{console.error("scroll.scrollTo: Invalid parameters:",e),t();return}if(!i){console.error("scroll.scrollTo: Target not found:",e),t();return}if(!s){console.error("scroll.scrollTo: Parent not found"),t();return}try{s===window?d=(o=(l=window.pageYOffset||window.scrollY)+i.getBoundingClientRect().top)-l-n:(l=s.scrollTop,a=s.getBoundingClientRect().top,d=(o=l+i.getBoundingClientRect().top-a)-l-n),s.scrollTo({top:Math.max(0,l+d),left:0,behavior:"smooth"}),setTimeout(t,400),r&&i.id?this._isValidId(i.id)?$ehsFN.lib.updateURL("#"+i.id):console.warn("scroll.scrollTo: Invalid target ID for hash:",i.id):r&&history.replaceState({},document.title,window.location.href.split("#")[0])}catch(e){console.error("scroll.scrollTo: Error during scroll",e),t()}})}_setupScrollObservers(){let e=new Set;for(let t in this._linksHash)e.add(this._linksHash[t].parent);for(let t of e){let e=t===window?window:$ehsFN.lib.qs(t);if(!e)continue;let i=()=>{this._scrollObserve()};e.addEventListener("scroll",i,{passive:!0}),this._scrollHandlers.set(e,i)}this._scrollObserve()}_scrollObserve(){let e=document.documentElement.clientHeight/4;for(let t in this._linksHash){if(!this._linksHash.hasOwnProperty(t))continue;let i=this._linksHash[t];if(i&&i.target&&i.link)try{let t=i.target.getBoundingClientRect(),s=t.top<=e&&t.bottom>e;null!=i.classActive&&(s?(i.link.classList.contains(i.classActive)||i.link.classList.add(i.classActive),i.target.classList.contains(i.classActive)||i.target.classList.add(i.classActive)):(i.link.classList.contains(i.classActive)&&i.link.classList.remove(i.classActive),i.target.classList.contains(i.classActive)&&i.target.classList.remove(i.classActive)))}catch(e){console.error("scroll._scrollObserve: Error observing item",t,e)}}}}let $ef55f167e58e504d$export$209876d7b1ac8f3=new $ef55f167e58e504d$var$Scroll;var $ehsFN=parcelRequire("ehsFN");class $10665505e2eb0736$export$70dd375dd4457bf8{constructor(){this._initialized=!1,this._boundEnter=this._handleEnter.bind(this),this._boundLeave=this._handleLeave.bind(this)}init(){"u">typeof document&&!this._initialized&&(this._initialized=!0,document.addEventListener("mouseenter",this._boundEnter,!0),document.addEventListener("mouseleave",this._boundLeave,!0))}destroy(){"u">typeof document&&this._initialized&&(document.removeEventListener("mouseenter",this._boundEnter,!0),document.removeEventListener("mouseleave",this._boundLeave,!0),this._initialized=!1)}_handleEnter(e){this._syncHover(e,!0)}_handleLeave(e){this._syncHover(e,!1)}_syncHover(e,t){let i=e?.target;if(!i||"function"!=typeof i.closest)return;let s=i.closest("[x-hover]");if(!s)return;let n=s.getAttribute("href");if(null!=n&&""!==n.trim()&&"u">typeof CSS&&"function"==typeof CSS.escape)try{let e=CSS.escape(n),i=$ehsFN.lib.qsa(`[x-hover][href="${e}"]`);for(let e=0;e<i.length;e++)i[e].classList.toggle("hover",t)}catch(e){}}}let $10665505e2eb0736$export$3f60957f5dbf3876=new $10665505e2eb0736$export$70dd375dd4457bf8;var $ehsFN=parcelRequire("ehsFN");let $69dd4358dca59ad6$var$CLASSES_TO_REMOVE=["js","windows","macos","ios","android","linux","unknown","chrome","firefox","safari","opera","edge","iphone","ipad","mac","computer","mobile","desktop","touch"],$69dd4358dca59ad6$var$SIZE_FLAGS={xs:{xs:!0,s:!1,m:!1,l:!1,xl:!1},s:{xs:!1,s:!0,m:!1,l:!1,xl:!1},m:{xs:!1,s:!1,m:!0,l:!1,xl:!1},l:{xs:!1,s:!1,m:!1,l:!0,xl:!1},xl:{xs:!1,s:!1,m:!1,l:!1,xl:!0}};class $69dd4358dca59ad6$export$8215d14a63d9fb10{constructor(){if(this.js=!0,this.os="unknown",this.browser="unknown",this.device=null,this.mobile=!1,this.touch=!1,this.width=0,this.height=0,this.breakpoint="xs",this.size=$69dd4358dca59ad6$var$SIZE_FLAGS.xs,this._html=null,this._onResize=this._onResize.bind(this),this._debouncedResize=$ehsFN.lib.debounce(this._onResize,200),this._initialized=!1,"u"<typeof window)return;this.width=window.innerWidth,this.height=window.innerHeight,this.breakpoint=this._getBreakpointName(this.width),this.size=$69dd4358dca59ad6$var$SIZE_FLAGS[this.breakpoint]||$69dd4358dca59ad6$var$SIZE_FLAGS.xs,this._html=document.documentElement}init(){"u">typeof window&&(this._initialized&&this._cleanup(),this._html=document.documentElement,this._detect(),this._applyHtmlClasses(),window.addEventListener("resize",this._debouncedResize),this._initialized=!0)}destroy(){"u">typeof window&&this._cleanup()}_cleanup(){window.removeEventListener("resize",this._debouncedResize),this._html&&this._html.classList.remove(...$69dd4358dca59ad6$var$CLASSES_TO_REMOVE),this._initialized=!1}_getBreakpointName(e){return e>=1280?"xl":e>=1024?"l":e>=768?"m":e>=640?"s":"xs"}_getSizeFlags(e){return $69dd4358dca59ad6$var$SIZE_FLAGS[e]||$69dd4358dca59ad6$var$SIZE_FLAGS.xs}_onResize(){let e=window.innerWidth,t=window.innerHeight,i=this.breakpoint,s=this._getBreakpointName(e);this.width=e,this.height=t,this.breakpoint=s,this.size=$69dd4358dca59ad6$var$SIZE_FLAGS[s]||$69dd4358dca59ad6$var$SIZE_FLAGS.xs,i!==s&&window.dispatchEvent(new CustomEvent("breakpointchange",{detail:{prev:i,current:s,width:e,height:t}}))}_detect(){let e=window.navigator.userAgent.toLowerCase();this.mobile=/mobile/.test(e),e.includes("win")?this.os="windows":e.includes("iphone")||e.includes("ipad")||e.includes("ipod")?this.os="ios":e.includes("android")?this.os="android":e.includes("mac")?this.os="macos":e.includes("linux")?this.os="linux":this.os="unknown",/edg\//.test(e)?this.browser="edge":/opr\//.test(e)||/opera/.test(e)?this.browser="opera":/firefox/.test(e)?this.browser="firefox":/chrome/.test(e)?this.browser="chrome":/safari/.test(e)?this.browser="safari":this.browser="unknown",e.includes("ipad")?this.device="ipad":e.includes("iphone")?this.device="iphone":e.includes("android")?this.device="android":e.includes("mac")?this.device="mac":this.device="computer",this.touch=window.matchMedia?.("(pointer: coarse)").matches??!1}_applyHtmlClasses(){if(!this._html)return;let e=["js",this.os,this.browser,this.device,this.mobile?"mobile":"desktop",this.touch?"touch":null].filter(Boolean);this._html.classList.add(...e)}}let $69dd4358dca59ad6$export$91cea577896d70d9=new $69dd4358dca59ad6$export$8215d14a63d9fb10;var $ehsFN=parcelRequire("ehsFN"),$ehsFN=parcelRequire("ehsFN");class $fb9ec3799c0f5369$var$Form{constructor(){this._updateElements=new Set,this._updateHandlers=new Map,this.listen=Object.freeze({update:this._updateElements})}getEventType(e){if(!e)throw Error("getEventType: Element is required");if(e.isContentEditable)return"input";let t=e.tagName?.toLowerCase();if(!t)throw Error("getEventType: Element has no tagName");if("input"===t||"textarea"===t)return"input";if("select"===t)return"change";throw Error(`getEventType: Unsupported element <${t}>`)}_eventType(e){if(!e)return"";if(e.isContentEditable)return"input";let t=e.tagName?.toLowerCase();return"input"===t||"textarea"===t?"input":"select"===t?"change":""}setChecked(e,t=!1){if("u"<typeof document||!e)return;let i=$ehsFN.lib.qsa(e);for(let e=0;e<i.length;e++){let s=i[e],n=s.type;("checkbox"===n||"radio"===n)&&s.checked!==t&&(s.checked=t,s.dispatchEvent(new Event("input",{bubbles:!0})))}}setValue(e,t){if("u"<typeof document||!e)return;let i=$ehsFN.lib.qsa(e),s=String(t);for(let e=0;e<i.length;e++){let n=i[e],r="";try{if(n.isContentEditable)n.innerText=s,r="input";else{let e=n.tagName?.toLowerCase();if(!e)continue;let i=n.type;if("input"===e)"checkbox"===i||"radio"===i?n.checked=!!t:n.value=s,r="input";else{if("textarea"!==e&&"select"!==e)continue;n.value=s,r="select"===e?"change":"input"}}r&&n.dispatchEvent(new Event(r,{bubbles:!0}))}catch(e){"u">typeof console&&console.error&&console.error("setValue",n,e)}}}onUpdate(e,t){if("u"<typeof document||!e||"function"!=typeof t)return;let i=$ehsFN.lib.qsa(e);for(let e=0;e<i.length;e++){let s=i[e];if(this._updateHandlers.has(s))continue;let n=this._eventType(s);if(!n)continue;let r=()=>t(s);s.addEventListener(n,r),this._updateHandlers.set(s,{eventType:n,handler:r}),this._updateElements.add(s)}}offUpdate(e){if("u"<typeof document||!e)return;let t=$ehsFN.lib.qsa(e);for(let e=0;e<t.length;e++){let i=t[e],s=this._updateHandlers.get(i);s&&(i.removeEventListener(s.eventType,s.handler),this._updateHandlers.delete(i),this._updateElements.delete(i))}}update(e){if("u"<typeof document||!e)return;let t=$ehsFN.lib.qsa(e);for(let e=0;e<t.length;e++){let i=t[e],s=this._eventType(i);s&&i.dispatchEvent(new Event(s,{bubbles:!0}))}}destroy(){"u">typeof document&&(this._updateHandlers.forEach((e,t)=>{t.removeEventListener(e.eventType,e.handler)}),this._updateHandlers.clear(),this._updateElements.clear())}}let $fb9ec3799c0f5369$export$6210fa4921d2a466=new $fb9ec3799c0f5369$var$Form;var $ehsFN=parcelRequire("ehsFN");class $a1e3f49e5a065fbf$var$Sticky{constructor(){this.activeClass="sticky_on",this.rootMargin="-1px 0px 0px 0px",this._observer=null,this._initialized=!1,this._initObserver()}_initObserver(){"IntersectionObserver"in window?this._observer=new IntersectionObserver(e=>{for(let t of e)t&&t.target&&this._handleEntry(t)},{threshold:1,rootMargin:this.rootMargin}):console.warn("sticky: IntersectionObserver is not supported")}_handleEntry(e){if(!e||!e.target)return;let t=e.target;if(!(t instanceof HTMLElement))return;let i=e.intersectionRatio<1;i!==t.classList.contains(this.activeClass)&&(i?(t.classList.add(this.activeClass),t.dispatchEvent(new CustomEvent("sticky:on",{bubbles:!0}))):(t.classList.remove(this.activeClass),t.dispatchEvent(new CustomEvent("sticky:off",{bubbles:!0}))))}init(){if(!this._observer)return void console.warn("sticky.init: IntersectionObserver is not available");for(let e of(this._initialized&&this.reset(),$ehsFN.lib.qsa(".sticky")))if(e&&e instanceof HTMLElement&&!e.dataset.stickyObserved)try{this._observer.observe(e),e.dataset.stickyObserved="true"}catch(t){console.error("sticky.init: Error observing element",e,t)}this._initialized=!0}reset(){if(this._observer){for(let e of $ehsFN.lib.qsa(".sticky"))if(e&&e instanceof HTMLElement&&e.dataset.stickyObserved)try{document.body.contains(e)&&this._observer.unobserve(e),delete e.dataset.stickyObserved}catch(t){console.error("sticky.reset: Error unobserving element",e,t),delete e.dataset.stickyObserved}}}destroy(){this._observer&&(this._observer.disconnect(),this._observer=null),this._initialized=!1}}let $a1e3f49e5a065fbf$export$4bd4b47501432316=new $a1e3f49e5a065fbf$var$Sticky;var $ehsFN=parcelRequire("ehsFN");class $a4da403316380ec6$export$472062a354075cee{constructor(){this.sliders=[],this.instances=new Map,this.io=null,this.mo=null}init(){(this.observeSliders(),"MutationObserver"in window)?(this.mo=new MutationObserver(e=>{for(let t of e)for(let e of t.addedNodes)if(1===e.nodeType&&e instanceof HTMLElement){e.hasAttribute("x-slider")&&this.io&&this.io.observe(e);let t=e.querySelectorAll?.("[x-slider]");if(t&&this.io)for(let e of t)e&&!this.instances.has(e)&&this.io.observe(e)}}),this.mo.observe(document.body,{childList:!0,subtree:!0})):console.warn("slider: MutationObserver is not supported")}destroy(){this.instances.forEach((e,t)=>{let i=e.listenerTarget||e.wrapper||t;e.touch?(i.removeEventListener("touchstart",e.events.touchstart,!0),i.removeEventListener("touchmove",e.events.touchmove,!0),i.removeEventListener("touchend",e.events.touchend,!0),i.removeEventListener("touchcancel",e.events.touchcancel,!0)):(t.removeEventListener("mousemove",e.events.mousemove),e.events.mouseout&&t.removeEventListener("mouseleave",e.events.mouseout),e.events.mouseenter&&t.removeEventListener("mouseenter",e.events.mouseenter),e.events.resize&&(window.removeEventListener("resize",e.events.resize),window.removeEventListener("orientationchange",e.events.resize)))}),this.io&&this.io.disconnect(),this.mo&&this.mo.disconnect(),this.instances.clear()}observeSliders(){if(!("IntersectionObserver"in window))return void console.warn("slider: IntersectionObserver is not supported");for(let e of(this.sliders=document.querySelectorAll("[x-slider]"),this.io=new IntersectionObserver(e=>{for(let t of e)t.isIntersecting&&t.target&&!this.instances.has(t.target)&&this.initSlider(t.target)},{rootMargin:"60px 0px 60px 0px",threshold:0}),this.sliders))e&&this.io.observe(e)}_validateConfig(e){let t={gap:0,rubber:!0,resetOnMouseout:!0,touch:!0};if(!e||"object"!=typeof e)return t;if("gap"in e){let i=Number(e.gap);t.gap=isNaN(i)||i<0?0:i}return"rubber"in e&&(t.rubber=!!e.rubber),"resetOnMouseout"in e&&(t.resetOnMouseout=!!e.resetOnMouseout),"touch"in e&&(t.touch=!!e.touch),t}initSlider(e){if(!e||!(e instanceof HTMLElement))return void console.error("slider.initSlider: Invalid element");let t=[...e.children].map(e=>e.cloneNode(!0));if(!t.length)return void console.warn("slider.initSlider: No slides found",e);e.classList.add("slider"),e.style.overflow="hidden",e.style.overscrollBehavior="contain";let i=0,s=!0,n=!0,r=!0;try{let t=e.getAttribute("x-slider");if(t)if($ehsFN.lib.isValidJSON(t)){let e=JSON.parse(t),o=this._validateConfig(e);i=o.gap,s=o.rubber,n=o.resetOnMouseout,r=o.touch}else console.warn("slider.initSlider: Invalid JSON in x-slider attribute:",t)}catch(e){console.warn("slider.initSlider: Error parsing x-slider JSON",e)}let o=document.createElement("div");o.className="slider-wrapper",o.style.gap=i+"px",e.innerHTML="";for(let e=0;e<t.length;e++){let i=t[e];if(!i)continue;i.classList.add("slider-item");let s=i.querySelector("img");s&&0===e&&(s.dataset.srcset&&(s.srcset=s.dataset.srcset,s.removeAttribute("data-srcset")),s.dataset.src&&(s.src=s.dataset.src,s.removeAttribute("data-src")),s.setAttribute("loading","eager")),o.appendChild(i)}e.appendChild(o);let l="ontouchstart"in window,a=[];if(t.length>1&&(!l||r)){let i=document.createElement("div");i.className="slider-indicators";for(let e=0;e<t.length;e++){let t=document.createElement("span");0===e&&t.classList.add("active"),i.appendChild(t)}e.appendChild(i),a=[...i.querySelectorAll("span")]}let d=t;if(l&&r?e.classList.add("slider_touch"):e.classList.remove("slider_touch"),l&&!r)return void d[0].classList.add("active");let c=0,h=/iP(ad|hone|od)/.test(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document,u=()=>d[0].offsetWidth+i,p=(e,t=!1)=>{let i=Math.max(0,Math.min(e,d.length-1)),s=u();if(c=i,o.style.transition=t?"none":"transform 0.25s",o.style.transform=`translateX(${-c*s}px)`,a.length)for(let e=0;e<a.length;e++){let t=a[e];t&&t.classList.toggle("active",e===c)}t||o.addEventListener("transitionend",()=>{o.style.transition="none",h&&(o.style.pointerEvents="none",requestAnimationFrame(()=>{o.offsetWidth,o.style.pointerEvents="auto"}))},{once:!0})};p(0,!0);let f={},m=!1,v=null,_=()=>{if(!m){m=!0;for(let t=0;t<d.length;t++){let i=d[t];if(!i)continue;let s=i.querySelector("img");s&&0!==t&&(s.dataset.srcset&&(s.srcset=s.dataset.srcset,s.removeAttribute("data-srcset")),s.dataset.src&&(s.src=s.dataset.src,s.removeAttribute("data-src")),l||s.complete&&0!==s.naturalWidth||s.addEventListener("load",()=>{if(null!=v){let i=e.getBoundingClientRect(),s=e.offsetWidth;s>0&&Math.floor((v-i.left)/s*d.length)===t&&p(t,!0)}},{once:!0}))}}};if(d.length>1)if(l){let t=0,i=0,n=!1,r=null,l=(e,t)=>[...e].find(e=>e.identifier===t)||null,a=()=>{_(),e.removeEventListener("touchstart",a)};e.addEventListener("touchstart",a,{passive:!1,capture:!0}),f.touchstart=e=>{let s=e.changedTouches[0];r=s.identifier,t=s.clientX,i=s.clientY,n=!0,o.style.transition="none"},f.touchmove=e=>{if(!n||null==r)return;let a=l(e.touches,r);if(!a)return;let h=a.clientX-t;if(Math.abs(a.clientY-i)>Math.abs(h))return;e.cancelable&&e.preventDefault();let p=u(),f=h;0===c&&h>0&&(f=s?.15*h:0),c===d.length-1&&h<0&&(f=s?.15*h:0),o.style.transform=`translateX(${-c*p+f}px)`},f.touchend=e=>{if(!n)return;n=!1;let s=l(e.changedTouches,r)||e.changedTouches[0];r=null;let o=s.clientX-t,a=s.clientY-i,h=.1*u();Math.abs(a)>Math.abs(o)||0===c&&o>0||c===d.length-1&&o<0?p(c):o>h&&c>0?p(c-1):o<-h&&c<d.length-1?p(c+1):p(c)},f.touchcancel=()=>{n=!1,r=null,p(c)},e.addEventListener("touchstart",f.touchstart,{passive:!1,capture:!0}),e.addEventListener("touchmove",f.touchmove,{passive:!1,capture:!0}),e.addEventListener("touchend",f.touchend,{capture:!0}),e.addEventListener("touchcancel",f.touchcancel,{capture:!0})}else{let t=i=>{v=i.clientX,_(),e.removeEventListener("mouseenter",t)};e.addEventListener("mouseenter",t),f.mousemove=t=>{v=t.clientX;let i=e.getBoundingClientRect(),s=e.offsetWidth;if(s<=0)return;let n=t.clientX-i.left;n<0?n=0:n>=s&&(n=s-1e-7);let r=Math.floor(n/s*d.length),o=d[r].querySelector("img");r!==c&&(!o||o.complete||o.naturalWidth>0)&&p(r,!0)},e.addEventListener("mousemove",f.mousemove),e.addEventListener("mouseenter",e=>f.mousemove(e)),n&&(f.mouseout=()=>p(0,!0),e.addEventListener("mouseleave",f.mouseout))}let b=()=>{let e=u();o.style.transition="none",o.style.transform=`translateX(${-c*e}px)`};window.addEventListener("resize",b),window.addEventListener("orientationchange",b),f.resize=b,this.instances.set(e,{wrapper:o,slides:d,events:f,touch:l,listenerTarget:e})}}let $a4da403316380ec6$export$b38bf4f33e9e4c25=new $a4da403316380ec6$export$472062a354075cee;class $e5904712fb6120b1$var$X{constructor(){this.modal=$fb3cb004b28f41eb$export$96e4b36520c26a2c,this.animate=$014037f76a5c216c$export$e3607ec2d7a891c4,this.appear=$eb3d55ecca7ee7d2$export$fb1b4b0e602f43f1,this.lazyload=$45256965eb1aa1f4$export$c3e8f8508bab224b,this.loadmore=$c188f7d5f390f2f6$export$6456520619f548d5,this.sheets=$8f6aab8d3dab3eed$export$d1f2fc3a3d47c5af,this.dropdown=$3134c8ebb2c91188$export$81207e5cc4186890,this.autocomplete=$fa742adec1b07386$export$485ded5f26ebe08d,this.scroll=$ef55f167e58e504d$export$209876d7b1ac8f3,this.hover=$10665505e2eb0736$export$3f60957f5dbf3876,this.device=$69dd4358dca59ad6$export$91cea577896d70d9,this.lib=$ehsFN.lib,this.render=$ehsFN.lib.render.bind($ehsFN.lib),this.form=$fb9ec3799c0f5369$export$6210fa4921d2a466,this.sticky=$a1e3f49e5a065fbf$export$4bd4b47501432316,this.slider=$a4da403316380ec6$export$b38bf4f33e9e4c25,this.initialized=!1}init(){this.initialized||(this.device.init(),this.modal.init(),this.animate.init(),this.appear.init(),this.lazyload.init(),this.loadmore.init(),this.sheets.init(),this.dropdown.init(),this.scroll.init(),this.sticky.init(),this.slider.init(),$10665505e2eb0736$export$3f60957f5dbf3876.init(),this.initialized=!0)}}let $e5904712fb6120b1$var$x=new $e5904712fb6120b1$var$X;window.x=$e5904712fb6120b1$var$x,window.x.id=$e5904712fb6120b1$var$x.lib.id,window.x.qs=$e5904712fb6120b1$var$x.lib.qs,window.x.qsa=$e5904712fb6120b1$var$x.lib.qsa,x.init(),window.element1=e=>{let t=-360*e.progress;e.element.style.transform="rotate("+t+"deg)"},window.element2=e=>{let t=180*e.progress;e.element.style.transform="rotate("+t+"deg)"},window.element3=e=>{let t=120*e.progress;e.element.style.transform="rotate("+t+"deg)"},window.headerAnimation=e=>{let t=x.device.size.xs||x.device.size.s?100:120,i=x.qs(".header"),s=x.qs(".header-logo img"),n=t-e.progress*t/2,r=1-.5*e.progress;i.style.height=n+"px",s.style.transform="scale("+r+")",x.lib.switchClass(i,"header_compact",1==e.progress)},window.onload=()=>{x.lib.transitionsOn()};
|
|
1
|
+
function $parcel$export(e,t,s,i){Object.defineProperty(e,t,{get:s,set:i,enumerable:!0,configurable:!0})}var $parcel$global="u">typeof globalThis?globalThis:"u">typeof self?self:"u">typeof window?window:"u">typeof global?global:{},$parcel$modules={},$parcel$inits={},parcelRequire=$parcel$global.parcelRequirec3c2;null==parcelRequire&&((parcelRequire=function(e){if(e in $parcel$modules)return $parcel$modules[e].exports;if(e in $parcel$inits){var t=$parcel$inits[e];delete $parcel$inits[e];var s={id:e,exports:{}};return $parcel$modules[e]=s,t.call(s.exports,s,s.exports),s.exports}var i=Error("Cannot find module '"+e+"'");throw i.code="MODULE_NOT_FOUND",i}).register=function(e,t){$parcel$inits[e]=t},$parcel$global.parcelRequirec3c2=parcelRequire);var parcelRegister=parcelRequire.register;parcelRegister("ehsFN",function(module,exports){$parcel$export(module.exports,"lib",function(){return lib});let HAS_DOM=()=>"u">typeof document&&"u">typeof window;class Lib{constructor(){this.loadedScripts=new Set,HAS_DOM()&&this._elementRender()}_elementRender(){HAS_DOM()&&document.addEventListener("DOMContentLoaded",()=>{let elements=this.qsa("[x-render]");for(let i=0;i<elements.length;i++){let item=elements[i];try{let expression=item.getAttribute("x-render");if(expression){let value=eval(expression);this.render(item,value)}}catch(_){}}},{once:!0})}_escapeHtml(e){if(null==e)return"";let t=String(e);if(HAS_DOM()){let e=document.createElement("div");return e.textContent=t,e.innerHTML}return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}id(e){return HAS_DOM()?document.getElementById(e):null}qs(e,t=document){return e?HAS_DOM()?"string"==typeof e?t.querySelector(e):e instanceof Node?e:e instanceof NodeList?e.length?e[0]:null:Array.isArray(e)&&e.length?e[0]instanceof Node?e[0]:t.querySelector(e[0]):e===window?e:null:e instanceof Node?e:null:null}qsa(e,t=document){if(!e)return[];if(!HAS_DOM())return e instanceof Node?[e]:[];if("string"==typeof e)return Array.from(t.querySelectorAll(e));if(e instanceof NodeList)return Array.from(e);if(e instanceof Node)return[e];if(Array.isArray(e)&&e.length){let s=[];for(let i=0;i<e.length;i++){let n=e[i];n instanceof Node?s.push(n):n instanceof NodeList?s.push(...n):s.push(...t.querySelectorAll(n))}return s.flat()}return e===window?[e]:[]}async hide(e){await this.addClass(e,"hidden")}async show(e){await this.removeClass(e,"hidden")}async toggle(e){await this.toggleClass(e,"hidden")}async switch(e,t){t?await this.removeClass(e,"hidden"):await this.addClass(e,"hidden")}async addClass(e,t,s=0){let i=this.qsa(e),n=i.length;if(n){if(s>0){let e=t.replace(/_.*/,"")+"_ready";for(let t=0;t<n;t++)i[t].classList.add(e);await new Promise(e=>setTimeout(e,s))}for(let e=0;e<n;e++)i[e].classList.add(t)}}async removeClass(e,t,s=0){let i=this.qsa(e),n=i.length;if(n){for(let e=0;e<n;e++)i[e].classList.remove(t);if(s>0){await new Promise(e=>setTimeout(e,s));let e=t.replace(/_.*/,"")+"_ready";for(let t=0;t<n;t++)i[t].classList.remove(e)}}}async toggleClass(e,t,s=0){let i=this.qsa(e),n=i.length;for(let e=0;e<n;e++){let n=i[e];n.classList.contains(t)?await this.removeClass(n,t,s):await this.addClass(n,t,s)}}async switchClass(e,t,s,i=0){s?await this.addClass(e,t,i):await this.removeClass(e,t,i)}reload(){"u">typeof window&&location.reload()}reloadWithHash(e){"u">typeof window&&(location.hash=e,this.reload())}redirectTo(e){"u">typeof window&&(location.href=e)}updateURL(e,t){"u">typeof window&&(history.pushState?history.pushState(null,t,e):location.href=e)}random(e,t){return Math.floor(Math.random()*(t-e+1))+e}price(e){return parseFloat(e).toFixed(2).replace(/\d(?=(\d{3})+\.)/g,"$& ").replace(".00","")}number(e){let t=(e+"").split(".");return t[0]=t[0].replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1 "),t.join(".")}numberDecline(e,t,s,i){if(e>10&&1===Math.floor(e%100/10))return i;switch(e%10){case 1:return t;case 2:case 3:case 4:return s;default:return i}}isEmail(e){return"string"==typeof e&&/^[^\s@]+@[^\s@]+\.[^\s@]{2,}$/.test(e.trim())}isValidJSON(e){if("string"!=typeof e)return!1;try{return JSON.parse(e),!0}catch{return!1}}isInteger(e){return Number.isInteger(Number(e))}isDouble(e){let t=Number(e);return!isNaN(t)&&"number"==typeof t}makeId(){return"id"+this.random(1e5,999999)}makePassword(e=8,t){e<1&&(e=8);let s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#^$%^&*()-+:,.;_",i="";for(let t=0;t<e;t++)i+=s[Math.floor(Math.random()*s.length)];if(t){let e=this.qs(t);e&&"value"in e&&(e.value=i);return}return i}loadScript(e,t,s="async"){if(HAS_DOM()&&e&&"function"==typeof t){try{if("string"==typeof e&&e.startsWith("http")){let t=new URL(e,window.location.href);if("http:"!==t.protocol&&"https:"!==t.protocol)return}}catch(t){if(!e.startsWith("/")&&!e.startsWith("./")&&!e.startsWith("../"))return}if(this.loadedScripts.has(e))return void t();try{let i=document.createElement("script");i.onload=t,i.onerror=()=>this.loadedScripts.delete(e),i.src=e,s&&i.setAttribute(s,""),i.crossOrigin="anonymous",document.body.appendChild(i),this.loadedScripts.add(e)}catch(e){}}}deferred(e,t=1e4){let s;if("u"<typeof window)return;let i=["scroll","resize","click","keydown","mousemove","touchmove"],n=()=>{for(let e=0;e<i.length;e++)window.removeEventListener(i[e],n,{once:!0});"complete"===document.readyState?e():window.addEventListener("load",e,{once:!0}),clearTimeout(s)};s=setTimeout(n,t);for(let e=0;e<i.length;e++)window.addEventListener(i[e],n,{once:!0})}deffered(e,t=1e4){return this.deferred(e,t)}throttle(e,t,s={}){return this._throttle(e,t,s)}debounce(e,t,s={}){return this._debounce(e,t,s)}onAppear(e,t,s=null,i={}){if(!HAS_DOM()||"function"!=typeof t||!("IntersectionObserver"in window))return;let n=this.qsa(e),r=n.length;if(!r)return;let o=new IntersectionObserver((e,i)=>{for(let n=0;n<e.length;n++){let r=e[n];r.isIntersecting?(t(r.target),s||i.unobserve(r.target)):s&&s(r.target)}},{root:null,rootMargin:"200px",threshold:.1,...i});for(let e=0;e<r;e++)o.observe(n[e])}alertErrors(e){e&&("string"==typeof e?alert(e):alert(Object.values(e).join("\n")))}printErrors(e){return e?"string"==typeof e?`<div>${this._escapeHtml(e)}</div>`:Object.entries(e).map(([e,t])=>{let s=this._escapeHtml(String(e)),i=this._escapeHtml(String(t));return`<div class="error_${s}">${i}</div>`}).join("\n"):""}async render(e,t,s=null,i=!1){if(!e)return;let n=this.qsa(e),r=n.length;if(r)try{let e="function"==typeof t?await t():t,o=String(e||"");for(let e=0;e<r;e++){let t=n[e];if(i)if(null==s)t.textContent=o;else{let e=document.createTextNode(o);"beforebegin"===s?t.parentNode?.insertBefore(e,t):"afterbegin"===s?t.insertBefore(e,t.firstChild):"beforeend"===s?t.appendChild(e):"afterend"===s&&t.parentNode?.insertBefore(e,t.nextSibling)}else null==s?t.innerHTML=o:t.insertAdjacentHTML(s,o)}}catch(e){}}transitionsOn(e=0){HAS_DOM()&&setTimeout(()=>document.documentElement.classList.remove("noTransitions"),e)}transitionsOff(){HAS_DOM()&&document.documentElement.classList.add("noTransitions")}async sleep(e){return new Promise(t=>setTimeout(t,e))}_throttle(e,t,s={}){let i=null,n=null,r=null,o=0,{leading:l=!0,trailing:a=!0}=s,d=t=>{o=t,e.apply(r,n),n=r=null},c=function(...e){let s=Date.now();o||l||(o=s),n=e,r=this;let c=t-(s-o);c<=0||c>t?(i&&clearTimeout(i),i=null,d(s)):!i&&a&&(i=setTimeout(()=>{i=null,a&&n&&d(Date.now())},c))};return c.cancel=()=>{i&&clearTimeout(i),i=n=r=null,o=0},c}_debounce(e,t,s={}){let i=null,n=null,r=null,{leading:o=!1,trailing:l=!0}=s,a=()=>{e.apply(r,n),n=r=null},d=function(...e){n=e,r=this,i&&clearTimeout(i),o&&!i&&a(),i=setTimeout(()=>{i=null,l&&n&&a()},t)};return d.cancel=()=>{i&&clearTimeout(i),i=n=r=null},d}}let lib=new Lib});var $ehsFN=parcelRequire("ehsFN");class $fb3cb004b28f41eb$var$Modal{constructor(){this.modalLevel=0,this.lockCount=0,this.html=null,this._initialized=!1,this._clickHandler=null,this._keydownHandler=null}init(){"u">typeof document&&"u">typeof window&&(this._initialized&&this.destroy(),this.html=$ehsFN.lib.qs("html"),this._renderModalContents(),this._setupModalLinks(),this._setupGlobalListeners(),this._initialized=!0)}destroy(){"u">typeof document&&(this._clickHandler&&(document.removeEventListener("click",this._clickHandler),this._clickHandler=null),this._keydownHandler&&(document.removeEventListener("keydown",this._keydownHandler),this._keydownHandler=null),this.modalLevel=0,this.lockCount=0,this.html=null,this._initialized=!1)}_isValidId(e){return"string"==typeof e&&!!e&&/^[a-zA-Z0-9_-]+$/.test(e)}_escapeHtml(e){if(null==e)return"";let t=String(e);if("u">typeof document){let e=document.createElement("div");return e.textContent=t,e.innerHTML}return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}_renderModalContents(){let e=$ehsFN.lib.qsa("[x-modal]"),t=$ehsFN.lib.qs(".modal-here")||$ehsFN.lib.qs("body");if(t)for(let s=0;s<e.length;s++){let i=e[s],n=i.getAttribute("x-modal");if(!n||!this._isValidId(n)||$ehsFN.lib.qs("#"+n))continue;let r=i.getAttribute("class")||"",o=(i.getAttribute("data-window-class")||"").replace(/\s+/g," ").trim(),l=this._escapeHtml(o),a=i.innerHTML,d=document.createElement("div");d.id=n,d.className="modal "+r,d.innerHTML='<div class="modal-overlay"></div><div class="modal-outer"><div class="modal-inner"><div class="modal-window '+l+'">'+a+'<div class="modal-rail"><a role="button" class="modal-close"></a></div></div></div></div>',t.appendChild(d),i.remove()}}_setupModalLinks(){let e=$ehsFN.lib.qsa("[x-modal-open]");for(let t=0;t<e.length;t++){let s=e[t],i=s.getAttribute("x-modal-open");if(i&&this._isValidId(i)&&(s.addEventListener("click",e=>{e.preventDefault(),this.show(i)}),window.location.hash==="#"+i)){let e=$ehsFN.lib.qs("#"+i);e&&e.classList.contains("modal_hash")&&this.show(i)}}}_setupGlobalListeners(){this._clickHandler=e=>{if(!$ehsFN.lib.qs(".modal_active"))return;let t=e.target,s=t.classList&&t.classList.contains("modal-close"),i=!t.closest||!t.closest(".modal-window");if(!s&&!i)return;e.preventDefault();let n=t.closest(".modal"),r=n?n.getAttribute("id"):null;r&&this._isValidId(r)&&this.hide(r)},this._keydownHandler=e=>{if("Escape"!==e.key)return;let t=$ehsFN.lib.qsa(".modal_active"),s=t.length;if(!s)return;let i=t[s-1].getAttribute("id");i&&this._isValidId(i)&&(e.preventDefault(),this.hide(i))},document.addEventListener("click",this._clickHandler),document.addEventListener("keydown",this._keydownHandler)}async show(e){if("u"<typeof document||!e||"string"!=typeof e||!this._isValidId(e)||this.lockCount>0)return;if(this.isActive(e))return void await this.hide(e);let t=$ehsFN.lib.qs("#"+e);if(t){t.classList.contains("modal_uniq")&&await this.hideAll(),this.lockCount++;try{await $ehsFN.lib.addClass(t,"modal_ready"),await $ehsFN.lib.sleep(10),t.dispatchEvent(new CustomEvent("modal:ready")),t.classList.contains("modal_hash")&&history.replaceState(null,"","#"+e),this.html&&($ehsFN.lib.addClass(this.html,"modal_active"),$ehsFN.lib.addClass(this.html,e+"_active")),$ehsFN.lib.addClass("[x-modal-open="+e+"]","active"),this.modalLevel++,$ehsFN.lib.addClass(t,"modal_z"+this.modalLevel),await $ehsFN.lib.addClass(t,"modal_active");let s=$ehsFN.lib.qs(".modal-outer",t);s&&s.scrollTo(0,1),await $ehsFN.lib.sleep(200),t.dispatchEvent(new CustomEvent("modal:open"))}catch(e){}finally{this.lockCount--}}}async hide(e){if("u"<typeof document||!e||"string"!=typeof e||!this._isValidId(e)||this.lockCount>0)return;let t=$ehsFN.lib.qs("#"+e);if(t){this.lockCount++;try{t.classList.contains("modal_hash")&&window.location.hash==="#"+e&&history.replaceState(null,document.title,window.location.pathname+window.location.search),$ehsFN.lib.removeClass("[x-modal-open="+e+"]","active"),await $ehsFN.lib.removeClass(t,"modal_active",200),$ehsFN.lib.removeClass(t,"modal_z"+this.modalLevel),t.dispatchEvent(new CustomEvent("modal:close")),this.html&&$ehsFN.lib.removeClass(this.html,e+"_active"),this.modalLevel--,0===this.modalLevel&&this.html&&$ehsFN.lib.removeClass(this.html,"modal_active")}catch(e){}finally{this.lockCount--}}}async hideAll(){if("u"<typeof document)return;let e=$ehsFN.lib.qsa(".modal_active");for(let t=0;t<e.length;t++){let s=e[t].getAttribute("id");s&&await this.hide(s)}}isActive(e){if("u"<typeof document||!e||"string"!=typeof e||!this._isValidId(e))return!1;let t=$ehsFN.lib.qs("#"+e);return!!t&&t.classList.contains("modal_active")}}let $fb3cb004b28f41eb$export$96e4b36520c26a2c=new $fb3cb004b28f41eb$var$Modal;var $ehsFN=parcelRequire("ehsFN");class $014037f76a5c216c$var$Animate{constructor(){this._ticking=!1,this._animations=[],this._scroll=this._scroll.bind(this),this._scrollHandler=this._scrollHandler.bind(this),this._initialized=!1,this._parents=new Set,this._elements=null}init(){"u"<typeof window||(this._cleanup(),this._elements=$ehsFN.lib.qsa("[x-animate]"),!this._elements?.length||(this._parseElementsAnimations(),this._animations.length&&(this._setupListeners(),this._initialized=!0)))}_cleanup(){!this._initialized||"u">typeof window&&(this._parents.forEach(e=>{e.removeEventListener("scroll",this._scrollHandler)}),window.removeEventListener("resize",this._scrollHandler),this._ticking=!1,this._animations=[],this._parents=new Set,this._elements=null,this._initialized=!1)}destroy(){"u">typeof window&&this._cleanup()}_parseElementsAnimations(){for(let e of(this._animations=[],this._elements))try{let t=JSON.parse(e.getAttribute("x-animate"));this._animations.push({element:e,trigger:$ehsFN.lib.qs(t.trigger)||e,parent:$ehsFN.lib.qs(t.parent)||window,start:t.start,end:t.end||!1,class:t.class,classRemove:!1!==t.classRemove,functionName:t.functionName,fn:null,lockedIn:!1,lockedOut:!1,log:t.log||!1})}catch(t){console.error("Invalid JSON in x-animate attribute:",e,t)}}_setupListeners(){for(let e of this._animations)this._parents.has(e.parent)||(this._parents.add(e.parent),e.parent.addEventListener("scroll",this._scrollHandler));window.addEventListener("resize",this._scrollHandler);let e=()=>requestAnimationFrame(()=>this._scroll());"complete"===document.readyState?e():window.addEventListener("load",e,{once:!0})}_scrollHandler(){this._ticking||(this._ticking=!0,window.requestAnimationFrame(()=>{this._scroll(),this._ticking=!1}))}_scroll(){for(let e=0;e<this._animations.length;e++){let t=this._animations[e];if(!t.element.isConnected||!t.trigger.isConnected)continue;!t.fn&&t.functionName&&"function"==typeof window[t.functionName]&&(t.fn=window[t.functionName]);let s=t.trigger.getBoundingClientRect(),i=t.parent,n=i===window?0:i.getBoundingClientRect().top,r=s.top-n,o=this._2px(t.start,i),l=this._2px(t.end,i),a=!isNaN(o),d=!isNaN(l),c=t.fn;t.log&&console.log(r,o,l,t),a&&d?(t.duration=o-l,r<=o&&r>=l?(t.lockedOut=!1,t.class&&!t.element.classList.contains(t.class)&&t.element.classList.add(t.class),c&&(t.progress=((o-r)/t.duration).toFixed(4),c(t))):(t.class&&t.classRemove&&t.element.classList.contains(t.class)&&t.element.classList.remove(t.class),!t.lockedOut&&c&&(r>=o?(t.progress=0,c(t),t.lockedOut=!0):r<=l&&(t.progress=1,c(t),t.lockedOut=!0)))):a&&(r<=o?(t.lockedOut=!1,t.class&&!t.element.classList.contains(t.class)&&t.element.classList.add(t.class),!t.lockedIn&&c&&(t.progress=1,c(t),t.lockedIn=!0)):(t.lockedIn=!1,t.class&&t.classRemove&&t.element.classList.contains(t.class)&&t.element.classList.remove(t.class),!t.lockedOut&&c&&r>=o&&(t.progress=0,c(t),t.lockedOut=!0)))}}_2px(e,t=window){if("number"==typeof e)return e;if("string"!=typeof e)return NaN;let s=parseFloat(e);return/[%vh]/.test(e)?(e.includes("vh")||t===window?document.documentElement.clientHeight:t.clientHeight)*s/100:s}}let $014037f76a5c216c$export$e3607ec2d7a891c4=new $014037f76a5c216c$var$Animate;var $ehsFN=parcelRequire("ehsFN");class $eb3d55ecca7ee7d2$var$Appear{constructor(){this._targets=[],this._observer=null,this._options={appearedClass:"appeared",visibleClass:"visible",once:!1,root:null,rootMargin:"0px",threshold:0},this._observerCallback=this._observerCallback.bind(this)}init(e={}){if("u"<typeof window||!("IntersectionObserver"in window)||(this._options={...this._options,...e},this._observer&&(this._observer.disconnect(),this._observer=null),this._targets=$ehsFN.lib.qsa("[x-appear]"),!this._targets.length))return;let{root:t,rootMargin:s,threshold:i}=this._options;this._observer=new IntersectionObserver(this._observerCallback,{root:t||null,rootMargin:s,threshold:i});for(let e=0;e<this._targets.length;e++)this._observer.observe(this._targets[e])}destroy(){"u">typeof window&&(this._observer&&(this._observer.disconnect(),this._observer=null),this._targets=[])}_observerCallback(e){let{appearedClass:t,visibleClass:s,once:i}=this._options,n=this._observer;for(let r=0;r<e.length;r++){let o=e[r],l=o.target;o.isIntersecting?(t&&!l.classList.contains(t)&&(l.classList.add(t),i&&n&&n.unobserve(l)),s&&!l.classList.contains(s)&&(l.classList.add(s),l.dispatchEvent(new CustomEvent("visible",{detail:{appeared:!0}})))):s&&l.classList.contains(s)&&(l.classList.remove(s),l.dispatchEvent(new CustomEvent("invisible",{detail:{appeared:!0}})))}}}let $eb3d55ecca7ee7d2$export$fb1b4b0e602f43f1=new $eb3d55ecca7ee7d2$var$Appear;var $ehsFN=parcelRequire("ehsFN");class $45256965eb1aa1f4$var$Lazyload{constructor(){this._observer=null,this._options={root:null,rootMargin:"200px",threshold:.1}}init(){if("u"<typeof window||"u"<typeof document||!("IntersectionObserver"in window))return;this._observer||(this._observer=new IntersectionObserver(this._callback.bind(this),this._options));let e=$ehsFN.lib.qsa("[x-lazyload]");for(let t=0;t<e.length;t++){let s=e[t];s.classList.contains("loaded")||this._observer.observe(s)}}destroy(){"u">typeof window&&this._observer&&(this._observer.disconnect(),this._observer=null)}_callback(e){for(let t=0;t<e.length;t++){let s=e[t];s.isIntersecting&&s.target&&this._loadImage(s.target)}}_fetchImage(e,t){return new Promise((s,i)=>{if(!e&&!t)return void i(Error("lazyload: no src or srcset"));let n=new Image;n.onload=s,n.onerror=()=>i(Error("lazyload: load failed")),t&&(n.srcset=t),e&&(n.src=e)})}_loadImage(e){if(!e||"IMG"!==e.nodeName)return;let t=e.getAttribute("data-src"),s=e.getAttribute("data-srcset");if(!t&&!s){this._observer&&this._observer.unobserve(e);return}let i=this._observer;this._fetchImage(t||null,s||null).then(()=>{s&&(e.srcset=s,e.removeAttribute("data-srcset")),t&&(e.src=t,e.removeAttribute("data-src")),e.classList.add("loaded"),i&&i.unobserve(e)}).catch(()=>{i&&i.unobserve(e)})}}let $45256965eb1aa1f4$export$c3e8f8508bab224b=new $45256965eb1aa1f4$var$Lazyload;var $ehsFN=parcelRequire("ehsFN");class $c188f7d5f390f2f6$var$Loadmore{constructor(){this.items={},this.locked=!1,this.observer=null,this._initialized=!1}init(){if("u"<typeof window||"u"<typeof document)return;this._initialized&&this.destroy();let e=$ehsFN.lib.qsa("[x-loadmore]"),t=e.length;if(!t)return;let s=/^[a-zA-Z_$][a-zA-Z0-9_$.]*$/,i=async(e,t)=>{for(let i=0;i<e.length;i++){let n=e[i];if(n.isIntersecting&&!this.locked){this.locked=!0;try{let e,i=n.target;if(!i)continue;let r=i.getAttribute("x-loadmore");if(!r)continue;try{e=JSON.parse(r)}catch(e){continue}let o=e&&e.functionName;if("string"!=typeof o||!s.test(o))continue;let l=window[o];if("function"!=typeof l)continue;let a=i.id,d=a?this.items[a]:null;if(!d)continue;let c=d.page||1,h=await l(c);!0===h?d.page=c+1:!1===h&&t.unobserve(i)}catch(e){}finally{this.locked=!1}}}};if("IntersectionObserver"in window){this.observer=new IntersectionObserver(i,{rootMargin:"0px 0px 400px 0px",threshold:0});for(let s=0;s<t;s++){let t=e[s],i=$ehsFN.lib.makeId();i&&(t.setAttribute("id",i),this.items[i]={el:t,page:1},this.observer.observe(t))}this._initialized=!0}}destroy(){"u">typeof window&&(this.observer&&(this.observer.disconnect(),this.observer=null),this.items={},this.locked=!1,this._initialized=!1)}reset(e){if("u"<typeof document)return;let t=$ehsFN.lib.qs(e);if(!t||!t.id)return;let s=this.items[t.id];s&&(s.page=1)}}let $c188f7d5f390f2f6$export$6456520619f548d5=new $c188f7d5f390f2f6$var$Loadmore;var $ehsFN=parcelRequire("ehsFN");class $8f6aab8d3dab3eed$var$Sheets{constructor(){this._handlers=new Map,this._initialized=!1}_dispatchEvent(e,t,s={}){let i=new CustomEvent(`sheets:${t}`,{detail:s,bubbles:!0,cancelable:!1});e.dispatchEvent(i)}_isValidSheetValue(e){return"string"==typeof e&&!!e&&/^[a-zA-Z0-9_-]+$/.test(e)}init(){this._initialized&&this.destroy();let e=$ehsFN.lib.qsa("[x-sheets]");if(e.length){for(let t of e){if(!t)continue;for(let e of $ehsFN.lib.qsa("[x-sheet-open]:not([x-sheet-open] [x-sheet-open])",t)){if(!e)continue;let t=e.getAttribute("x-sheet-open");if(!t){console.warn("sheets.init: Tab has x-sheet-open attribute but no value",e);continue}if(!this._isValidSheetValue(t)){console.error("sheets.init: Invalid sheet value (security check failed):",t);continue}let s=e=>{e.preventDefault(),this.show(t)};e.addEventListener("click",s),this._handlers.set(e,s)}let e=$ehsFN.lib.qs("[x-sheet-open].active",t);if(e){let t=e.getAttribute("x-sheet-open");t&&this._isValidSheetValue(t)&&this.show(t)}this._dispatchEvent(t,"ready",{container:t,timestamp:Date.now(),initialized:!0})}this._initialized=!0}}destroy(){let e=new Set;for(let[t]of this._handlers.entries()){let s=t.closest("[x-sheets]");s&&e.add(s)}for(let[e,t]of this._handlers.entries())e.removeEventListener("click",t);for(let t of(this._handlers.clear(),this._initialized=!1,e))this._dispatchEvent(t,"destroy",{container:t,timestamp:Date.now(),wasInitialized:!0})}show(e,t={silent:!1,source:"api"}){if(!e||"string"!=typeof e)return void console.error("sheets.show: Sheet value is required and must be a string");if(!this._isValidSheetValue(e))return void console.error("sheets.show: Invalid sheet value (security check failed):",e);let s=CSS.escape(e),i=$ehsFN.lib.qs(`[x-sheet="${s}"]`);if(!i)return void console.warn("sheets.show: Target content not found:",e);let n=i.closest("[x-sheets]");if(!n)return void console.warn("sheets.show: Sheets container not found for:",e);let r=$ehsFN.lib.qs(`[x-sheet-open="${s}"]`,n);if(!r)return void console.warn("sheets.show: Tab not found:",e);if(r.classList.contains("active")&&i.classList.contains("active")){t.silent||this._dispatchEvent(n,"selected",{sheet:e,tab:r,content:i,container:n,previousSheet:e,previousTab:r,previousContent:i,wasActive:!0,source:t.source||"api",timestamp:Date.now()});return}let o=$ehsFN.lib.qs("[x-sheet-open].active",n),l=$ehsFN.lib.qs("[x-sheet].active",n),a=o?o.getAttribute("x-sheet-open"):null,d=$ehsFN.lib.qsa("[x-sheet-open]",n),c=$ehsFN.lib.qsa("[x-sheet]",n);for(let e of d)e&&e.classList.contains("active")&&e.classList.remove("active");for(let e of c)e&&e.classList.contains("active")&&e.classList.remove("active");r.classList.add("active"),i.classList.add("active"),t.silent||this._dispatchEvent(n,"selected",{sheet:e,tab:r,content:i,container:n,previousSheet:a,previousTab:o,previousContent:l,wasActive:!1,source:t.source||"api",timestamp:Date.now()})}}let $8f6aab8d3dab3eed$export$d1f2fc3a3d47c5af=new $8f6aab8d3dab3eed$var$Sheets;var $ehsFN=parcelRequire("ehsFN");class $3134c8ebb2c91188$var$Dropdown{constructor(){this._handlers=new Map,this._menus=new Map,this._parentToMenu=new Map,this._initialized=!1,this._globalClickHandler=null}init(){if(!("u"<typeof document)){for(let e of(this._initialized&&this._cleanup(),this._attachGlobalListeners(),$ehsFN.lib.qsa("[x-dropdown]"))){let t=e.parentElement;if(!t)continue;let s=$ehsFN.lib.qs("[x-dropdown-open]",t);s&&(this._setupAccessibility(t,s,e),this._bindTrigger(t,s),this._bindMenuKeys(e,s,t),this._menus.set(e,{parent:t,trigger:s}),this._parentToMenu.set(t,e),t.dispatchEvent(new CustomEvent("dropdown:ready")))}this._initialized=!0}}_setupAccessibility(e,t,s){e.classList.add("dropdown"),t.setAttribute("aria-expanded","false"),s.id||(s.id=$ehsFN.lib.makeId()),t.setAttribute("aria-controls",s.id),s.setAttribute("role","menu"),s.setAttribute("tabindex","-1");let i=s.querySelectorAll("li > a");for(let e=0;e<i.length;e++){let t=i[e];t.setAttribute("role","menuitem"),t.setAttribute("tabindex","-1")}}_bindTrigger(e,t){let s=$ehsFN.lib.throttle(()=>this._toggleDropdown(e,t),400),i=t.tagName,n="INPUT"===i||"TEXTAREA"===i,r=null,o=e=>{n||(e.stopPropagation(),s())},l=i=>{let{key:r}=i;if(" "!==r||!n){if(!n&&("Enter"===r||" "===r)){i.preventDefault(),s();return}if("ArrowDown"===r){i.preventDefault(),n||(this._open(e,t),this._focusFirstItem(e));return}"ArrowUp"===r&&(i.preventDefault(),n||(this._open(e,t),this._focusLastItem(e)))}},a=()=>{n?(r&&clearTimeout(r),this.closeAllDropdowns(),this._open(e,t)):t.classList.add("hover")},d=()=>{n?r=setTimeout(()=>this._close(e),200):t.classList.remove("hover")};this._handlers.set(t,{clickListener:o,keyListener:l,focusListener:a,blurListener:d,blurTimeout:r}),t.addEventListener("click",o),t.addEventListener("keydown",l),t.addEventListener("focus",a),t.addEventListener("blur",d)}_bindMenuKeys(e,t,s){let i=i=>{let n=e.querySelectorAll('[role="menuitem"]:not([disabled])'),r=n.length;if(!r)return;let o=-1,l=document.activeElement;for(let e=0;e<r;e++)if(n[e]===l){o=e;break}let a=i.key;if("ArrowDown"===a){i.preventDefault(),n[(o+1)%r].focus();return}if("ArrowUp"===a){i.preventDefault(),n[(o-1+r)%r].focus();return}if("Home"===a){i.preventDefault(),n[0].focus();return}if("End"===a){i.preventDefault(),n[r-1].focus();return}"Escape"===a&&(i.preventDefault(),this._close(s),t.focus())},n=e=>{e.target.matches('[role="menuitem"]')&&e.target.classList.add("hover")},r=e=>{e.target.matches('[role="menuitem"]')&&e.target.classList.remove("hover")};this._handlers.set(e,{keyListener:i,focusListener:n,blurListener:r}),e.addEventListener("keydown",i),e.addEventListener("focusin",n),e.addEventListener("focusout",r)}_cleanup(){this.closeAllDropdowns(),this._handlers.forEach((e,t)=>{e.clickListener&&t.removeEventListener("click",e.clickListener),e.keyListener&&t.removeEventListener("keydown",e.keyListener),e.focusListener&&(t.removeEventListener("focus",e.focusListener),t.removeEventListener("focusin",e.focusListener)),e.blurListener&&(t.removeEventListener("blur",e.blurListener),t.removeEventListener("focusout",e.blurListener)),e.blurTimeout&&clearTimeout(e.blurTimeout)}),this._handlers.clear(),this._menus.clear(),this._parentToMenu.clear(),$3134c8ebb2c91188$var$Dropdown._globalListenersAttached&&this._globalClickHandler&&(document.removeEventListener("click",this._globalClickHandler),$3134c8ebb2c91188$var$Dropdown._globalListenersAttached=!1)}_toggleDropdown(e,t){let s=e.classList.contains("dropdown_open");this.closeAllDropdowns(),s||this._open(e,t)}async _open(e,t){let s=this._parentToMenu.get(e);s&&(this._fireEvent(e,"beforeshow"),this._adjustPosition(e,s),$ehsFN.lib.addClass(t,"active"),$ehsFN.lib.addClass(e,"dropdown_open",20),t.setAttribute("aria-expanded","true"),this._fireEvent(e,"aftershow"))}_adjustPosition(e,t){e.classList.add("dropdown_ready");let s=t.getBoundingClientRect();e.classList.remove("dropdown_ready");let i=window.innerWidth,n=document.documentElement.scrollHeight;e.classList.remove("dropdown_right","dropdown_bottom"),s.right>i&&e.classList.add("dropdown_right"),window.scrollY+s.bottom>n&&e.classList.add("dropdown_bottom")}_focusFirstItem(e){let t=this._parentToMenu.get(e);if(!t)return;let s=t.querySelector('[role="menuitem"]:not([disabled])');s&&s.focus()}_focusLastItem(e){let t=this._parentToMenu.get(e);if(!t)return;let s=t.querySelectorAll('[role="menuitem"]:not([disabled])');s.length&&s[s.length-1].focus()}closeAllDropdowns(){if(document.querySelector(".dropdown_open"))for(let e of $ehsFN.lib.qsa(".dropdown_open"))this._close(e)}async _close(e){if(e._dropdownClosing)return;e._dropdownClosing=!0,this._fireEvent(e,"beforehide");let t=$ehsFN.lib.qs("[x-dropdown-open]",e);t&&($ehsFN.lib.removeClass(t,"active"),t.setAttribute("aria-expanded","false")),await $ehsFN.lib.removeClass(e,"dropdown_open",200),e.classList.remove("dropdown_right","dropdown_bottom"),this._fireEvent(e,"afterhide"),setTimeout(()=>{e._dropdownClosing=!1},100)}_fireEvent(e,t){e.dispatchEvent(new CustomEvent(`dropdown:${t}`))}_attachGlobalListeners(){$3134c8ebb2c91188$var$Dropdown._globalListenersAttached||(this._globalClickHandler=e=>{e.target.closest("[x-dropdown-open]")||e.target.closest("[x-dropdown] .dropdown_stay")||document.querySelector(".dropdown_open")&&this.closeAllDropdowns()},document.addEventListener("click",this._globalClickHandler),$3134c8ebb2c91188$var$Dropdown._globalListenersAttached=!0)}destroy(){"u">typeof document&&this._initialized&&(this._cleanup(),this._initialized=!1)}}$3134c8ebb2c91188$var$Dropdown._globalListenersAttached=!1;let $3134c8ebb2c91188$export$81207e5cc4186890=new $3134c8ebb2c91188$var$Dropdown;var $ehsFN=parcelRequire("ehsFN");class $fa742adec1b07386$var$Autocomplete{emptyStateHtml='<li><span class="op4">Ничего не найдено</span></li>';defaultStateHtml='<li><span class="op4">Начните печатать</span></li>';loadingStateHtml='<li><span class="op4">Загрузка...</span></li>';constructor(){this._clicked=!1,this._currentLoadId=0,this._loadData=this._loadData.bind(this),this._keyHandler=this._keyHandler.bind(this),this._clickHandler=this._clickHandler.bind(this),this._hideHandler=this._hideHandler.bind(this)}init(e,t={}){"u"<typeof window||!e||"string"!=typeof e||(this.emptyStateHtml=t.emptyStateHtml??this.emptyStateHtml,this.defaultStateHtml=t.defaultStateHtml??this.defaultStateHtml,this.loadingStateHtml=t.loadingStateHtml??this.loadingStateHtml,this.dropdown=$ehsFN.lib.id(e),!this.dropdown||(this.field=$ehsFN.lib.qs("[x-dropdown-open]",this.dropdown),this.list=$ehsFN.lib.qs("[x-dropdown]",this.dropdown),this.field&&this.list&&(this.data=t.data??null,this.loadData=t.loadData??null,this.mapData=t.mapData??null,this.renderItem=t.renderItem??null,this.onSelect=t.onSelect??null,this.resetFunc=t.resetFunc??null,this.debouncedLoadData=$ehsFN.lib.debounce(this._loadData,400),this.field.value.trim()?this._defaultState():this._reset(),this.field.addEventListener("focus",this.debouncedLoadData),this.field.addEventListener("input",this.debouncedLoadData),this.field.addEventListener("keydown",this._keyHandler),this.list.addEventListener("click",this._clickHandler),this.dropdown.addEventListener("dropdown:afterhide",this._hideHandler))))}destroy(){"u"<typeof window||this.field&&this.list&&this.dropdown&&(this._reset(),this.field.removeEventListener("focus",this.debouncedLoadData),this.field.removeEventListener("input",this.debouncedLoadData),this.field.removeEventListener("keydown",this._keyHandler),this.list.removeEventListener("click",this._clickHandler),this.dropdown.removeEventListener("dropdown:afterhide",this._hideHandler))}_keyHandler(e){"Enter"===e.key&&(e.preventDefault(),this.field?.blur())}_clickHandler(e){if(this._clicked)return;this._clicked=!0;let t=e.target.closest("[data-item]");if(!t||!this.onSelect)return void setTimeout(()=>{this._clicked=!1},0);try{let e=JSON.parse(t.dataset.item);this.onSelect(e)}catch(e){console.error("Autocomplete: error parsing data-item JSON",e)}setTimeout(()=>{this._clicked=!1},0)}_hideHandler(){if(this._clicked){this._clicked=!1;return}this.data?.length&&this.onSelect?(this._loadingState(),this.onSelect(this.data[0])):this._reset()}_loadingState(){$ehsFN.lib.render(this.list,this.loadingStateHtml)}_emptyState(){$ehsFN.lib.render(this.list,this.emptyStateHtml)}_defaultState(){$ehsFN.lib.render(this.list,this.defaultStateHtml)}_reset(){this.resetFunc&&this.resetFunc(),this.data=null,this._defaultState()}async _loadData(){if(!this.field||!this.field.value.trim())return void this._reset();if(!this.loadData)return void this._defaultState();this._loadingState();let e=Date.now();this._currentLoadId=e;try{let t=await this.loadData(this);if(e!==this._currentLoadId)return;this.data=this.mapData?this.mapData(t):t,this.render()}catch(t){e===this._currentLoadId&&this._reset(),console.error("Autocomplete: load error",t)}}render(){if(!this.data)return void this._reset();if(!this.data.length)return void this._emptyState();if(!this.renderItem)return void this._defaultState();let e=this.data.map(this.renderItem).join("");$ehsFN.lib.render(this.list,e)}}let $fa742adec1b07386$export$485ded5f26ebe08d=new $fa742adec1b07386$var$Autocomplete;var $ehsFN=parcelRequire("ehsFN");class $ef55f167e58e504d$var$Scroll{constructor(){this.parent=window,this.offset=0,this.classActive="active",this.hash=!1,this.to=this.scrollTo,this._linksHash={},this._scrollHandlers=new Map,this._initialized=!1}_isValidSelector(e){return!("string"!=typeof e||!e||/<script|javascript:/i.test(e))&&/^[#.a-zA-Z0-9_\-\[\]="':\s>+~,()]+$/.test(e)}init(){this._initialized&&this.destroy();let e=$ehsFN.lib.qsa("[x-scrollto]");if(e.length){for(let t of(this._linksHash={},e))if(t)try{let e=t.getAttribute("x-scrollto");if(!e){console.warn("scroll.init: Link has x-scrollto attribute but no value",t);continue}let s={};if($ehsFN.lib.isValidJSON(e)){let i=JSON.parse(e);if(!i||"object"!=typeof i){console.error("scroll.init: Invalid JSON object:",i);continue}let n=i.target;if(!n){console.error("scroll.init: Target required in JSON:",i);continue}if("string"!=typeof n||!this._isValidSelector(n)){console.error("scroll.init: Invalid or unsafe selector:",n);continue}let r=$ehsFN.lib.qs(n);if(!r){console.error("scroll.init: Target element not found:",n);continue}s.link=t,s.target=r,s.offset="number"==typeof i.offset?i.offset:this.offset,s.classActive=i.classActive||this.classActive,s.hash=i.hash??this.hash,i.parent?"string"==typeof i.parent?this._isValidSelector(i.parent)?s.parent=$ehsFN.lib.qs(i.parent)||this.parent:(console.error("scroll.init: Invalid parent selector:",i.parent),s.parent=this.parent):i.parent instanceof HTMLElement||i.parent===window?s.parent=i.parent:s.parent=this.parent:s.parent=this.parent}else{if(!this._isValidSelector(e)){console.error("scroll.init: Invalid or unsafe selector:",e);continue}let i=$ehsFN.lib.qs(e);if(!i){console.error("scroll.init: Target not found:",e);continue}s.link=t,s.parent=this.parent,s.target=i,s.offset=this.offset,s.classActive=this.classActive,s.hash=this.hash}if(s.link&&s.target){let e=$ehsFN.lib.makeId();if(!e){console.error("scroll.init: Failed to generate ID");continue}this._linksHash[e]=s,t.addEventListener("click",e=>{e.preventDefault(),this.scrollTo({parent:s.parent,target:s.target,offset:s.offset,classActive:s.classActive,hash:s.hash})})}}catch(e){console.error("scroll.init: Error processing link",t,e)}Object.keys(this._linksHash).length&&this._setupScrollObservers(),this._initialized=!0}}destroy(){for(let[e,t]of this._scrollHandlers.entries())e.removeEventListener("scroll",t);this._scrollHandlers.clear(),this._linksHash={},this._initialized=!1}_isValidId(e){return"string"==typeof e&&!!e&&/^[a-zA-Z0-9_-]+$/.test(e)}async scrollTo(e){return new Promise(t=>{let s,i,n,r,o,l,a,d;if(!e){console.error("scroll.scrollTo: Parameters required"),t();return}if(e instanceof HTMLElement)s=e,i=this.parent,n=this.offset,r=this.hash;else if("string"==typeof e){if(!this._isValidSelector(e)){console.error("scroll.scrollTo: Invalid or unsafe selector:",e),t();return}s=$ehsFN.lib.qs(e),i=this.parent,n=this.offset,r=this.hash}else if("object"==typeof e){if(e.target instanceof HTMLElement)s=e.target;else if("string"==typeof e.target){if(!this._isValidSelector(e.target)){console.error("scroll.scrollTo: Invalid or unsafe target selector:",e.target),t();return}s=$ehsFN.lib.qs(e.target)}else{console.error("scroll.scrollTo: Invalid target parameter:",e.target),t();return}e.parent===window||e.parent instanceof HTMLElement?i=e.parent:"string"==typeof e.parent?this._isValidSelector(e.parent)?i=$ehsFN.lib.qs(e.parent)||this.parent:(console.error("scroll.scrollTo: Invalid or unsafe parent selector:",e.parent),i=this.parent):i=this.parent,n="number"==typeof e.offset?e.offset:this.offset,r=e.hash??this.hash}else{console.error("scroll.scrollTo: Invalid parameters:",e),t();return}if(!s){console.error("scroll.scrollTo: Target not found:",e),t();return}if(!i){console.error("scroll.scrollTo: Parent not found"),t();return}try{i===window?d=(o=(l=window.pageYOffset||window.scrollY)+s.getBoundingClientRect().top)-l-n:(l=i.scrollTop,a=i.getBoundingClientRect().top,d=(o=l+s.getBoundingClientRect().top-a)-l-n),i.scrollTo({top:Math.max(0,l+d),left:0,behavior:"smooth"}),setTimeout(t,400),r&&s.id?this._isValidId(s.id)?$ehsFN.lib.updateURL("#"+s.id):console.warn("scroll.scrollTo: Invalid target ID for hash:",s.id):r&&history.replaceState({},document.title,window.location.href.split("#")[0])}catch(e){console.error("scroll.scrollTo: Error during scroll",e),t()}})}_setupScrollObservers(){let e=new Set;for(let t in this._linksHash)e.add(this._linksHash[t].parent);for(let t of e){let e=t===window?window:$ehsFN.lib.qs(t);if(!e)continue;let s=()=>{this._scrollObserve()};e.addEventListener("scroll",s,{passive:!0}),this._scrollHandlers.set(e,s)}this._scrollObserve()}_scrollObserve(){let e=document.documentElement.clientHeight/4;for(let t in this._linksHash){if(!this._linksHash.hasOwnProperty(t))continue;let s=this._linksHash[t];if(s&&s.target&&s.link)try{let t=s.target.getBoundingClientRect(),i=t.top<=e&&t.bottom>e;null!=s.classActive&&(i?(s.link.classList.contains(s.classActive)||s.link.classList.add(s.classActive),s.target.classList.contains(s.classActive)||s.target.classList.add(s.classActive)):(s.link.classList.contains(s.classActive)&&s.link.classList.remove(s.classActive),s.target.classList.contains(s.classActive)&&s.target.classList.remove(s.classActive)))}catch(e){console.error("scroll._scrollObserve: Error observing item",t,e)}}}}let $ef55f167e58e504d$export$209876d7b1ac8f3=new $ef55f167e58e504d$var$Scroll;var $ehsFN=parcelRequire("ehsFN");class $10665505e2eb0736$export$70dd375dd4457bf8{constructor(){this._initialized=!1,this._boundEnter=this._handleEnter.bind(this),this._boundLeave=this._handleLeave.bind(this)}init(){"u">typeof document&&!this._initialized&&(this._initialized=!0,document.addEventListener("mouseenter",this._boundEnter,!0),document.addEventListener("mouseleave",this._boundLeave,!0))}destroy(){"u">typeof document&&this._initialized&&(document.removeEventListener("mouseenter",this._boundEnter,!0),document.removeEventListener("mouseleave",this._boundLeave,!0),this._initialized=!1)}_handleEnter(e){this._syncHover(e,!0)}_handleLeave(e){this._syncHover(e,!1)}_syncHover(e,t){let s=e?.target;if(!s||"function"!=typeof s.closest)return;let i=s.closest("[x-hover]");if(!i)return;let n=i.getAttribute("href");if(null!=n&&""!==n.trim()&&"u">typeof CSS&&"function"==typeof CSS.escape)try{let e=CSS.escape(n),s=$ehsFN.lib.qsa(`[x-hover][href="${e}"]`);for(let e=0;e<s.length;e++)s[e].classList.toggle("hover",t)}catch(e){}}}let $10665505e2eb0736$export$3f60957f5dbf3876=new $10665505e2eb0736$export$70dd375dd4457bf8;var $ehsFN=parcelRequire("ehsFN");let $69dd4358dca59ad6$var$CLASSES_TO_REMOVE=["js","windows","macos","ios","android","linux","unknown","chrome","firefox","safari","opera","edge","iphone","ipad","mac","computer","mobile","desktop","touch"],$69dd4358dca59ad6$var$SIZE_FLAGS={xs:{xs:!0,s:!1,m:!1,l:!1,xl:!1},s:{xs:!1,s:!0,m:!1,l:!1,xl:!1},m:{xs:!1,s:!1,m:!0,l:!1,xl:!1},l:{xs:!1,s:!1,m:!1,l:!0,xl:!1},xl:{xs:!1,s:!1,m:!1,l:!1,xl:!0}};class $69dd4358dca59ad6$export$8215d14a63d9fb10{constructor(){if(this.js=!0,this.os="unknown",this.browser="unknown",this.device=null,this.mobile=!1,this.touch=!1,this.width=0,this.height=0,this.breakpoint="xs",this.size=$69dd4358dca59ad6$var$SIZE_FLAGS.xs,this._html=null,this._onResize=this._onResize.bind(this),this._debouncedResize=$ehsFN.lib.debounce(this._onResize,200),this._initialized=!1,"u"<typeof window)return;this.width=window.innerWidth,this.height=window.innerHeight,this.breakpoint=this._getBreakpointName(this.width),this.size=$69dd4358dca59ad6$var$SIZE_FLAGS[this.breakpoint]||$69dd4358dca59ad6$var$SIZE_FLAGS.xs,this._html=document.documentElement}init(){"u">typeof window&&(this._initialized&&this._cleanup(),this._html=document.documentElement,this._detect(),this._applyHtmlClasses(),window.addEventListener("resize",this._debouncedResize),this._initialized=!0)}destroy(){"u">typeof window&&this._cleanup()}_cleanup(){window.removeEventListener("resize",this._debouncedResize),this._html&&this._html.classList.remove(...$69dd4358dca59ad6$var$CLASSES_TO_REMOVE),this._initialized=!1}_getBreakpointName(e){return e>=1280?"xl":e>=1024?"l":e>=768?"m":e>=640?"s":"xs"}_getSizeFlags(e){return $69dd4358dca59ad6$var$SIZE_FLAGS[e]||$69dd4358dca59ad6$var$SIZE_FLAGS.xs}_onResize(){let e=window.innerWidth,t=window.innerHeight,s=this.breakpoint,i=this._getBreakpointName(e);this.width=e,this.height=t,this.breakpoint=i,this.size=$69dd4358dca59ad6$var$SIZE_FLAGS[i]||$69dd4358dca59ad6$var$SIZE_FLAGS.xs,s!==i&&window.dispatchEvent(new CustomEvent("breakpointchange",{detail:{prev:s,current:i,width:e,height:t}}))}_detect(){let e=window.navigator.userAgent.toLowerCase();this.mobile=/mobile/.test(e),e.includes("win")?this.os="windows":e.includes("iphone")||e.includes("ipad")||e.includes("ipod")?this.os="ios":e.includes("android")?this.os="android":e.includes("mac")?this.os="macos":e.includes("linux")?this.os="linux":this.os="unknown",/edg\//.test(e)?this.browser="edge":/opr\//.test(e)||/opera/.test(e)?this.browser="opera":/firefox/.test(e)?this.browser="firefox":/chrome/.test(e)?this.browser="chrome":/safari/.test(e)?this.browser="safari":this.browser="unknown",e.includes("ipad")?this.device="ipad":e.includes("iphone")?this.device="iphone":e.includes("android")?this.device="android":e.includes("mac")?this.device="mac":this.device="computer",this.touch=window.matchMedia?.("(pointer: coarse)").matches??!1}_applyHtmlClasses(){if(!this._html)return;let e=["js",this.os,this.browser,this.device,this.mobile?"mobile":"desktop",this.touch?"touch":null].filter(Boolean);this._html.classList.add(...e)}}let $69dd4358dca59ad6$export$91cea577896d70d9=new $69dd4358dca59ad6$export$8215d14a63d9fb10;var $ehsFN=parcelRequire("ehsFN"),$ehsFN=parcelRequire("ehsFN");class $fb9ec3799c0f5369$var$Form{constructor(){this._updateElements=new Set,this._updateHandlers=new Map,this.listen=Object.freeze({update:this._updateElements})}getEventType(e){if(!e)throw Error("getEventType: Element is required");if(e.isContentEditable)return"input";let t=e.tagName?.toLowerCase();if(!t)throw Error("getEventType: Element has no tagName");if("input"===t||"textarea"===t)return"input";if("select"===t)return"change";throw Error(`getEventType: Unsupported element <${t}>`)}_eventType(e){if(!e)return"";if(e.isContentEditable)return"input";let t=e.tagName?.toLowerCase();return"input"===t||"textarea"===t?"input":"select"===t?"change":""}setChecked(e,t=!1){if("u"<typeof document||!e)return;let s=$ehsFN.lib.qsa(e);for(let e=0;e<s.length;e++){let i=s[e],n=i.type;("checkbox"===n||"radio"===n)&&i.checked!==t&&(i.checked=t,i.dispatchEvent(new Event("input",{bubbles:!0})))}}setValue(e,t){if("u"<typeof document||!e)return;let s=$ehsFN.lib.qsa(e),i=String(t);for(let e=0;e<s.length;e++){let n=s[e],r="";try{if(n.isContentEditable)n.innerText=i,r="input";else{let e=n.tagName?.toLowerCase();if(!e)continue;let s=n.type;if("input"===e)"checkbox"===s||"radio"===s?n.checked=!!t:n.value=i,r="input";else{if("textarea"!==e&&"select"!==e)continue;n.value=i,r="select"===e?"change":"input"}}r&&n.dispatchEvent(new Event(r,{bubbles:!0}))}catch(e){"u">typeof console&&console.error&&console.error("setValue",n,e)}}}onUpdate(e,t){if("u"<typeof document||!e||"function"!=typeof t)return;let s=$ehsFN.lib.qsa(e);for(let e=0;e<s.length;e++){let i=s[e];if(this._updateHandlers.has(i))continue;let n=this._eventType(i);if(!n)continue;let r=()=>t(i);i.addEventListener(n,r),this._updateHandlers.set(i,{eventType:n,handler:r}),this._updateElements.add(i)}}offUpdate(e){if("u"<typeof document||!e)return;let t=$ehsFN.lib.qsa(e);for(let e=0;e<t.length;e++){let s=t[e],i=this._updateHandlers.get(s);i&&(s.removeEventListener(i.eventType,i.handler),this._updateHandlers.delete(s),this._updateElements.delete(s))}}update(e){if("u"<typeof document||!e)return;let t=$ehsFN.lib.qsa(e);for(let e=0;e<t.length;e++){let s=t[e],i=this._eventType(s);i&&s.dispatchEvent(new Event(i,{bubbles:!0}))}}destroy(){"u">typeof document&&(this._updateHandlers.forEach((e,t)=>{t.removeEventListener(e.eventType,e.handler)}),this._updateHandlers.clear(),this._updateElements.clear())}}let $fb9ec3799c0f5369$export$6210fa4921d2a466=new $fb9ec3799c0f5369$var$Form;var $ehsFN=parcelRequire("ehsFN");class $a1e3f49e5a065fbf$var$Sticky{constructor(){this.activeClass="sticky_on",this.rootMargin="-1px 0px 0px 0px",this._observer=null,this._initialized=!1,this._initObserver()}_initObserver(){"IntersectionObserver"in window?this._observer=new IntersectionObserver(e=>{for(let t of e)t&&t.target&&this._handleEntry(t)},{threshold:1,rootMargin:this.rootMargin}):console.warn("sticky: IntersectionObserver is not supported")}_handleEntry(e){if(!e||!e.target)return;let t=e.target;if(!(t instanceof HTMLElement))return;let s=e.intersectionRatio<1;s!==t.classList.contains(this.activeClass)&&(s?(t.classList.add(this.activeClass),t.dispatchEvent(new CustomEvent("sticky:on",{bubbles:!0}))):(t.classList.remove(this.activeClass),t.dispatchEvent(new CustomEvent("sticky:off",{bubbles:!0}))))}init(){if(!this._observer)return void console.warn("sticky.init: IntersectionObserver is not available");for(let e of(this._initialized&&this.reset(),$ehsFN.lib.qsa(".sticky")))if(e&&e instanceof HTMLElement&&!e.dataset.stickyObserved)try{this._observer.observe(e),e.dataset.stickyObserved="true"}catch(t){console.error("sticky.init: Error observing element",e,t)}this._initialized=!0}reset(){if(this._observer){for(let e of $ehsFN.lib.qsa(".sticky"))if(e&&e instanceof HTMLElement&&e.dataset.stickyObserved)try{document.body.contains(e)&&this._observer.unobserve(e),delete e.dataset.stickyObserved}catch(t){console.error("sticky.reset: Error unobserving element",e,t),delete e.dataset.stickyObserved}}}destroy(){this._observer&&(this._observer.disconnect(),this._observer=null),this._initialized=!1}}let $a1e3f49e5a065fbf$export$4bd4b47501432316=new $a1e3f49e5a065fbf$var$Sticky;var $ehsFN=parcelRequire("ehsFN");class $a4da403316380ec6$export$472062a354075cee{constructor(){this.sliders=[],this.instances=new Map,this.io=null,this.mo=null}init(){(this.observeSliders(),"MutationObserver"in window)?(this.mo=new MutationObserver(e=>{for(let t of e)for(let e of t.addedNodes)if(1===e.nodeType&&e instanceof HTMLElement){e.hasAttribute("x-slider")&&this.io&&this.io.observe(e);let t=e.querySelectorAll?.("[x-slider]");if(t&&this.io)for(let e of t)e&&!this.instances.has(e)&&this.io.observe(e)}}),this.mo.observe(document.body,{childList:!0,subtree:!0})):console.warn("slider: MutationObserver is not supported")}destroy(){this.instances.forEach((e,t)=>{let s=e.listenerTarget||e.wrapper||t;e.touch?(s.removeEventListener("touchstart",e.events.touchstart,!0),s.removeEventListener("touchmove",e.events.touchmove,!0),s.removeEventListener("touchend",e.events.touchend,!0),s.removeEventListener("touchcancel",e.events.touchcancel,!0)):(t.removeEventListener("mousemove",e.events.mousemove),e.events.mouseout&&t.removeEventListener("mouseleave",e.events.mouseout),e.events.mouseenter&&t.removeEventListener("mouseenter",e.events.mouseenter),e.events.resize&&(window.removeEventListener("resize",e.events.resize),window.removeEventListener("orientationchange",e.events.resize)))}),this.io&&this.io.disconnect(),this.mo&&this.mo.disconnect(),this.instances.clear()}observeSliders(){if(!("IntersectionObserver"in window))return void console.warn("slider: IntersectionObserver is not supported");for(let e of(this.sliders=document.querySelectorAll("[x-slider]"),this.io=new IntersectionObserver(e=>{for(let t of e)t.isIntersecting&&t.target&&!this.instances.has(t.target)&&this.initSlider(t.target)},{rootMargin:"60px 0px 60px 0px",threshold:0}),this.sliders))e&&this.io.observe(e)}_validateConfig(e){let t={gap:0,rubber:!0,resetOnMouseout:!0,touch:!0};if(!e||"object"!=typeof e)return t;if("gap"in e){let s=Number(e.gap);t.gap=isNaN(s)||s<0?0:s}return"rubber"in e&&(t.rubber=!!e.rubber),"resetOnMouseout"in e&&(t.resetOnMouseout=!!e.resetOnMouseout),"touch"in e&&(t.touch=!!e.touch),t}initSlider(e){if(!e||!(e instanceof HTMLElement))return void console.error("slider.initSlider: Invalid element");let t=[...e.children].map(e=>e.cloneNode(!0));if(!t.length)return void console.warn("slider.initSlider: No slides found",e);e.classList.add("slider"),e.style.overflow="hidden",e.style.overscrollBehavior="contain";let s=0,i=!0,n=!0,r=!0;try{let t=e.getAttribute("x-slider");if(t)if($ehsFN.lib.isValidJSON(t)){let e=JSON.parse(t),o=this._validateConfig(e);s=o.gap,i=o.rubber,n=o.resetOnMouseout,r=o.touch}else console.warn("slider.initSlider: Invalid JSON in x-slider attribute:",t)}catch(e){console.warn("slider.initSlider: Error parsing x-slider JSON",e)}let o=document.createElement("div");o.className="slider-wrapper",o.style.gap=s+"px",e.innerHTML="";for(let e=0;e<t.length;e++){let s=t[e];if(!s)continue;s.classList.add("slider-item");let i=s.querySelector("img");i&&0===e&&(i.dataset.srcset&&(i.srcset=i.dataset.srcset,i.removeAttribute("data-srcset")),i.dataset.src&&(i.src=i.dataset.src,i.removeAttribute("data-src")),i.setAttribute("loading","eager")),o.appendChild(s)}e.appendChild(o);let l="ontouchstart"in window,a=[];if(t.length>1&&(!l||r)){let s=document.createElement("div");s.className="slider-indicators";for(let e=0;e<t.length;e++){let t=document.createElement("span");0===e&&t.classList.add("active"),s.appendChild(t)}e.appendChild(s),a=[...s.querySelectorAll("span")]}let d=t;if(l&&r?e.classList.add("slider_touch"):e.classList.remove("slider_touch"),l&&!r)return void d[0].classList.add("active");let c=0,h=/iP(ad|hone|od)/.test(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document,u=()=>d[0].offsetWidth+s,p=(e,t=!1)=>{let s=Math.max(0,Math.min(e,d.length-1)),i=u();if(c=s,o.style.transition=t?"none":"transform 0.25s",o.style.transform=`translateX(${-c*i}px)`,a.length)for(let e=0;e<a.length;e++){let t=a[e];t&&t.classList.toggle("active",e===c)}t||o.addEventListener("transitionend",()=>{o.style.transition="none",h&&(o.style.pointerEvents="none",requestAnimationFrame(()=>{o.offsetWidth,o.style.pointerEvents="auto"}))},{once:!0})};p(0,!0);let f={},m=!1,v=null,_=()=>{if(!m){m=!0;for(let t=0;t<d.length;t++){let s=d[t];if(!s)continue;let i=s.querySelector("img");i&&0!==t&&(i.dataset.srcset&&(i.srcset=i.dataset.srcset,i.removeAttribute("data-srcset")),i.dataset.src&&(i.src=i.dataset.src,i.removeAttribute("data-src")),l||i.complete&&0!==i.naturalWidth||i.addEventListener("load",()=>{if(null!=v){let s=e.getBoundingClientRect(),i=e.offsetWidth;i>0&&Math.floor((v-s.left)/i*d.length)===t&&p(t,!0)}},{once:!0}))}}};if(d.length>1)if(l){let t=0,s=0,n=!1,r=null,l=(e,t)=>[...e].find(e=>e.identifier===t)||null,a=()=>{_(),e.removeEventListener("touchstart",a)};e.addEventListener("touchstart",a,{passive:!1,capture:!0}),f.touchstart=e=>{let i=e.changedTouches[0];r=i.identifier,t=i.clientX,s=i.clientY,n=!0,o.style.transition="none"},f.touchmove=e=>{if(!n||null==r)return;let a=l(e.touches,r);if(!a)return;let h=a.clientX-t;if(Math.abs(a.clientY-s)>Math.abs(h))return;e.cancelable&&e.preventDefault();let p=u(),f=h;0===c&&h>0&&(f=i?.15*h:0),c===d.length-1&&h<0&&(f=i?.15*h:0),o.style.transform=`translateX(${-c*p+f}px)`},f.touchend=e=>{if(!n)return;n=!1;let i=l(e.changedTouches,r)||e.changedTouches[0];r=null;let o=i.clientX-t,a=i.clientY-s,h=.1*u();Math.abs(a)>Math.abs(o)||0===c&&o>0||c===d.length-1&&o<0?p(c):o>h&&c>0?p(c-1):o<-h&&c<d.length-1?p(c+1):p(c)},f.touchcancel=()=>{n=!1,r=null,p(c)},e.addEventListener("touchstart",f.touchstart,{passive:!1,capture:!0}),e.addEventListener("touchmove",f.touchmove,{passive:!1,capture:!0}),e.addEventListener("touchend",f.touchend,{capture:!0}),e.addEventListener("touchcancel",f.touchcancel,{capture:!0})}else{let t=s=>{v=s.clientX,_(),e.removeEventListener("mouseenter",t)};e.addEventListener("mouseenter",t),f.mousemove=t=>{v=t.clientX;let s=e.getBoundingClientRect(),i=e.offsetWidth;if(i<=0)return;let n=t.clientX-s.left;n<0?n=0:n>=i&&(n=i-1e-7);let r=Math.floor(n/i*d.length),o=d[r].querySelector("img");r!==c&&(!o||o.complete||o.naturalWidth>0)&&p(r,!0)},e.addEventListener("mousemove",f.mousemove),e.addEventListener("mouseenter",e=>f.mousemove(e)),n&&(f.mouseout=()=>p(0,!0),e.addEventListener("mouseleave",f.mouseout))}let b=()=>{let e=u();o.style.transition="none",o.style.transform=`translateX(${-c*e}px)`};window.addEventListener("resize",b),window.addEventListener("orientationchange",b),f.resize=b,this.instances.set(e,{wrapper:o,slides:d,events:f,touch:l,listenerTarget:e})}}let $a4da403316380ec6$export$b38bf4f33e9e4c25=new $a4da403316380ec6$export$472062a354075cee;class $51d4db7ad7265979$var$Typograf{#e=["code","pre","script","style"];#t={"1/2":"½","1/3":"⅓","1/4":"¼","1/5":"⅕","1/6":"⅙","1/7":"⅐","1/8":"⅛","1/9":"⅑","1/10":"⅒","2/3":"⅔","2/5":"⅖","3/4":"¾","3/5":"⅗","3/8":"⅜","4/5":"⅘","5/6":"⅚","5/8":"⅝","7/8":"⅞"};#s={0:"⁰",1:"¹",2:"²",3:"³",4:"⁴",5:"⁵",6:"⁶",7:"⁷",8:"⁸",9:"⁹","+":"⁺","-":"⁻","=":"⁼","(":"⁽",")":"⁾",o:"°",о:"°"};#i(e){let t=e;return(t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace(/\.{3}/g,"…")).replace(/\(c\)|\(с\)/gi,"©").replace(/\(r\)/gi,"®").replace(/\(tm\)/gi,"™").replace(/\(р\)/gi,"₽")).replace(/\b([0-9]+\/(?:[0-9]+|10))\b/g,e=>this.#t[e]||e)).replace(/(\S)\^([0-9+\-=\(\)oо])/g,(e,t,s)=>t+(this.#s[s]||s))).replace(/(?<=\d)-(?=\d)/g,"−")).replace(/(^|\s)-(\s)/g,"$1—$2").replace(/\s+—/g," —")).replace(/(^|\s)(г|ул|д|стр|кв|пл|пер|пр|ш|мкр)\s+(?=\S)/gi,"$1$2 ")).replace(/(^|[ \t])([A-Za-zА-Яа-яЁё0-9]{1,3})[ \t]+(?=\S)/g,"$1$2 ")).replace(/\s+(же?|л[иь]|бы?)(?=[\s.,!?;:])/gi," $1")).replace(/"(?=\S)/g,"«").replace(/(?<=\S)"/g,"»")}process(e){let t=[],s=/(<\/?([a-z0-9]+)[^>]*>)|([^<]+)/gi;return e.replace(s,(e,s,i,n)=>{if(s){let e=i?i.toLowerCase():"";return this.#e.includes(e)&&(s.startsWith("</")?t.pop():s.endsWith("/>")||t.push(e)),s}return t.length>0?n:this.#i(n)})}live(e=".typograf",t=".typograf-live",s=document){s.querySelectorAll(e).forEach(e=>{e.isContentEditable?e.innerHTML=this.process(e.innerHTML):e.textContent=this.process(e.textContent)}),s.addEventListener("input",e=>{let s=e.target;if(s.matches(t)&&!s.disabled&&!s.readOnly){if("TEXTAREA"===s.tagName||"INPUT"===s.tagName&&"text"===s.type){let e=s.selectionStart,t=s.selectionEnd,i=this.process(s.value);i!==s.value&&(s.value=i,s.setSelectionRange(e,t))}else if(s.isContentEditable){let e=window.getSelection(),t=e.rangeCount>0?e.getRangeAt(0).cloneRange():null,i=this.process(s.innerHTML);i!==s.innerHTML&&(s.innerHTML=i,t&&this.#n(s,t))}}})}#n(e,t){let s=window.getSelection();s.removeAllRanges();let i=document.createRange(),n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,null),r,o=0,l=null,a=null,d=t.startOffset,c=t.endOffset,h=!1;for(;r=n.nextNode();){if(!h&&o+r.length>=d&&(l=r,d-=o,h=!0),o+r.length>=c){a=r,c-=o;break}o+=r.length}l&&a?(i.setStart(l,Math.max(0,d)),i.setEnd(a,Math.max(0,c))):(i.selectNodeContents(e),i.collapse(!1)),s.addRange(i)}}let $51d4db7ad7265979$export$e217ae22b037a1a9=new $51d4db7ad7265979$var$Typograf;class $e5904712fb6120b1$var$X{constructor(){this.modal=$fb3cb004b28f41eb$export$96e4b36520c26a2c,this.animate=$014037f76a5c216c$export$e3607ec2d7a891c4,this.appear=$eb3d55ecca7ee7d2$export$fb1b4b0e602f43f1,this.lazyload=$45256965eb1aa1f4$export$c3e8f8508bab224b,this.loadmore=$c188f7d5f390f2f6$export$6456520619f548d5,this.sheets=$8f6aab8d3dab3eed$export$d1f2fc3a3d47c5af,this.dropdown=$3134c8ebb2c91188$export$81207e5cc4186890,this.autocomplete=$fa742adec1b07386$export$485ded5f26ebe08d,this.scroll=$ef55f167e58e504d$export$209876d7b1ac8f3,this.hover=$10665505e2eb0736$export$3f60957f5dbf3876,this.device=$69dd4358dca59ad6$export$91cea577896d70d9,this.lib=$ehsFN.lib,this.render=$ehsFN.lib.render.bind($ehsFN.lib),this.form=$fb9ec3799c0f5369$export$6210fa4921d2a466,this.sticky=$a1e3f49e5a065fbf$export$4bd4b47501432316,this.slider=$a4da403316380ec6$export$b38bf4f33e9e4c25,this.typograf=$51d4db7ad7265979$export$e217ae22b037a1a9,this.initialized=!1}init(){this.initialized||(this.device.init(),this.modal.init(),this.animate.init(),this.appear.init(),this.lazyload.init(),this.loadmore.init(),this.sheets.init(),this.dropdown.init(),this.scroll.init(),this.sticky.init(),this.slider.init(),this.typograf.init(),$10665505e2eb0736$export$3f60957f5dbf3876.init(),this.initialized=!0)}}let $e5904712fb6120b1$var$x=new $e5904712fb6120b1$var$X;window.x=$e5904712fb6120b1$var$x,window.x.id=$e5904712fb6120b1$var$x.lib.id,window.x.qs=$e5904712fb6120b1$var$x.lib.qs,window.x.qsa=$e5904712fb6120b1$var$x.lib.qsa,x.init(),window.element1=e=>{let t=-360*e.progress;e.element.style.transform="rotate("+t+"deg)"},window.element2=e=>{let t=180*e.progress;e.element.style.transform="rotate("+t+"deg)"},window.element3=e=>{let t=120*e.progress;e.element.style.transform="rotate("+t+"deg)"},window.headerAnimation=e=>{let t=x.device.size.xs||x.device.size.s?100:120,s=x.qs(".header"),i=x.qs(".header-logo img"),n=t-e.progress*t/2,r=1-.5*e.progress;s.style.height=n+"px",i.style.transform="scale("+r+")",x.lib.switchClass(s,"header_compact",1==e.progress)},window.onload=()=>{x.lib.transitionsOn()};
|
package/dist/x.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function $parcel$export(e,t,i,s){Object.defineProperty(e,t,{get:i,set:s,enumerable:!0,configurable:!0})}var $parcel$global="u">typeof globalThis?globalThis:"u">typeof self?self:"u">typeof window?window:"u">typeof global?global:{},$parcel$modules={},$parcel$inits={},parcelRequire=$parcel$global.parcelRequirec3c2;null==parcelRequire&&((parcelRequire=function(e){if(e in $parcel$modules)return $parcel$modules[e].exports;if(e in $parcel$inits){var t=$parcel$inits[e];delete $parcel$inits[e];var i={id:e,exports:{}};return $parcel$modules[e]=i,t.call(i.exports,i,i.exports),i.exports}var s=Error("Cannot find module '"+e+"'");throw s.code="MODULE_NOT_FOUND",s}).register=function(e,t){$parcel$inits[e]=t},$parcel$global.parcelRequirec3c2=parcelRequire);var parcelRegister=parcelRequire.register;parcelRegister("ehsFN",function(module,exports){$parcel$export(module.exports,"lib",function(){return lib});let HAS_DOM=()=>"u">typeof document&&"u">typeof window;class Lib{constructor(){this.loadedScripts=new Set,HAS_DOM()&&this._elementRender()}_elementRender(){HAS_DOM()&&document.addEventListener("DOMContentLoaded",()=>{let elements=this.qsa("[x-render]");for(let i=0;i<elements.length;i++){let item=elements[i];try{let expression=item.getAttribute("x-render");if(expression){let value=eval(expression);this.render(item,value)}}catch(_){}}},{once:!0})}_escapeHtml(e){if(null==e)return"";let t=String(e);if(HAS_DOM()){let e=document.createElement("div");return e.textContent=t,e.innerHTML}return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}id(e){return HAS_DOM()?document.getElementById(e):null}qs(e,t=document){return e?HAS_DOM()?"string"==typeof e?t.querySelector(e):e instanceof Node?e:e instanceof NodeList?e.length?e[0]:null:Array.isArray(e)&&e.length?e[0]instanceof Node?e[0]:t.querySelector(e[0]):e===window?e:null:e instanceof Node?e:null:null}qsa(e,t=document){if(!e)return[];if(!HAS_DOM())return e instanceof Node?[e]:[];if("string"==typeof e)return Array.from(t.querySelectorAll(e));if(e instanceof NodeList)return Array.from(e);if(e instanceof Node)return[e];if(Array.isArray(e)&&e.length){let i=[];for(let s=0;s<e.length;s++){let n=e[s];n instanceof Node?i.push(n):n instanceof NodeList?i.push(...n):i.push(...t.querySelectorAll(n))}return i.flat()}return e===window?[e]:[]}async hide(e){await this.addClass(e,"hidden")}async show(e){await this.removeClass(e,"hidden")}async toggle(e){await this.toggleClass(e,"hidden")}async switch(e,t){t?await this.removeClass(e,"hidden"):await this.addClass(e,"hidden")}async addClass(e,t,i=0){let s=this.qsa(e),n=s.length;if(n){if(i>0){let e=t.replace(/_.*/,"")+"_ready";for(let t=0;t<n;t++)s[t].classList.add(e);await new Promise(e=>setTimeout(e,i))}for(let e=0;e<n;e++)s[e].classList.add(t)}}async removeClass(e,t,i=0){let s=this.qsa(e),n=s.length;if(n){for(let e=0;e<n;e++)s[e].classList.remove(t);if(i>0){await new Promise(e=>setTimeout(e,i));let e=t.replace(/_.*/,"")+"_ready";for(let t=0;t<n;t++)s[t].classList.remove(e)}}}async toggleClass(e,t,i=0){let s=this.qsa(e),n=s.length;for(let e=0;e<n;e++){let n=s[e];n.classList.contains(t)?await this.removeClass(n,t,i):await this.addClass(n,t,i)}}async switchClass(e,t,i,s=0){i?await this.addClass(e,t,s):await this.removeClass(e,t,s)}reload(){"u">typeof window&&location.reload()}reloadWithHash(e){"u">typeof window&&(location.hash=e,this.reload())}redirectTo(e){"u">typeof window&&(location.href=e)}updateURL(e,t){"u">typeof window&&(history.pushState?history.pushState(null,t,e):location.href=e)}random(e,t){return Math.floor(Math.random()*(t-e+1))+e}price(e){return parseFloat(e).toFixed(2).replace(/\d(?=(\d{3})+\.)/g,"$& ").replace(".00","")}number(e){let t=(e+"").split(".");return t[0]=t[0].replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1 "),t.join(".")}numberDecline(e,t,i,s){if(e>10&&1===Math.floor(e%100/10))return s;switch(e%10){case 1:return t;case 2:case 3:case 4:return i;default:return s}}isEmail(e){return"string"==typeof e&&/^[^\s@]+@[^\s@]+\.[^\s@]{2,}$/.test(e.trim())}isValidJSON(e){if("string"!=typeof e)return!1;try{return JSON.parse(e),!0}catch{return!1}}isInteger(e){return Number.isInteger(Number(e))}isDouble(e){let t=Number(e);return!isNaN(t)&&"number"==typeof t}makeId(){return"id"+this.random(1e5,999999)}makePassword(e=8,t){e<1&&(e=8);let i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#^$%^&*()-+:,.;_",s="";for(let t=0;t<e;t++)s+=i[Math.floor(Math.random()*i.length)];if(t){let e=this.qs(t);e&&"value"in e&&(e.value=s);return}return s}loadScript(e,t,i="async"){if(HAS_DOM()&&e&&"function"==typeof t){try{if("string"==typeof e&&e.startsWith("http")){let t=new URL(e,window.location.href);if("http:"!==t.protocol&&"https:"!==t.protocol)return}}catch(t){if(!e.startsWith("/")&&!e.startsWith("./")&&!e.startsWith("../"))return}if(this.loadedScripts.has(e))return void t();try{let s=document.createElement("script");s.onload=t,s.onerror=()=>this.loadedScripts.delete(e),s.src=e,i&&s.setAttribute(i,""),s.crossOrigin="anonymous",document.body.appendChild(s),this.loadedScripts.add(e)}catch(e){}}}deferred(e,t=1e4){let i;if("u"<typeof window)return;let s=["scroll","resize","click","keydown","mousemove","touchmove"],n=()=>{for(let e=0;e<s.length;e++)window.removeEventListener(s[e],n,{once:!0});"complete"===document.readyState?e():window.addEventListener("load",e,{once:!0}),clearTimeout(i)};i=setTimeout(n,t);for(let e=0;e<s.length;e++)window.addEventListener(s[e],n,{once:!0})}deffered(e,t=1e4){return this.deferred(e,t)}throttle(e,t,i={}){return this._throttle(e,t,i)}debounce(e,t,i={}){return this._debounce(e,t,i)}onAppear(e,t,i=null,s={}){if(!HAS_DOM()||"function"!=typeof t||!("IntersectionObserver"in window))return;let n=this.qsa(e),r=n.length;if(!r)return;let o=new IntersectionObserver((e,s)=>{for(let n=0;n<e.length;n++){let r=e[n];r.isIntersecting?(t(r.target),i||s.unobserve(r.target)):i&&i(r.target)}},{root:null,rootMargin:"200px",threshold:.1,...s});for(let e=0;e<r;e++)o.observe(n[e])}alertErrors(e){e&&("string"==typeof e?alert(e):alert(Object.values(e).join("\n")))}printErrors(e){return e?"string"==typeof e?`<div>${this._escapeHtml(e)}</div>`:Object.entries(e).map(([e,t])=>{let i=this._escapeHtml(String(e)),s=this._escapeHtml(String(t));return`<div class="error_${i}">${s}</div>`}).join("\n"):""}async render(e,t,i=null,s=!1){if(!e)return;let n=this.qsa(e),r=n.length;if(r)try{let e="function"==typeof t?await t():t,o=String(e||"");for(let e=0;e<r;e++){let t=n[e];if(s)if(null==i)t.textContent=o;else{let e=document.createTextNode(o);"beforebegin"===i?t.parentNode?.insertBefore(e,t):"afterbegin"===i?t.insertBefore(e,t.firstChild):"beforeend"===i?t.appendChild(e):"afterend"===i&&t.parentNode?.insertBefore(e,t.nextSibling)}else null==i?t.innerHTML=o:t.insertAdjacentHTML(i,o)}}catch(e){}}transitionsOn(e=0){HAS_DOM()&&setTimeout(()=>document.documentElement.classList.remove("noTransitions"),e)}transitionsOff(){HAS_DOM()&&document.documentElement.classList.add("noTransitions")}async sleep(e){return new Promise(t=>setTimeout(t,e))}_throttle(e,t,i={}){let s=null,n=null,r=null,o=0,{leading:l=!0,trailing:a=!0}=i,d=t=>{o=t,e.apply(r,n),n=r=null},c=function(...e){let i=Date.now();o||l||(o=i),n=e,r=this;let c=t-(i-o);c<=0||c>t?(s&&clearTimeout(s),s=null,d(i)):!s&&a&&(s=setTimeout(()=>{s=null,a&&n&&d(Date.now())},c))};return c.cancel=()=>{s&&clearTimeout(s),s=n=r=null,o=0},c}_debounce(e,t,i={}){let s=null,n=null,r=null,{leading:o=!1,trailing:l=!0}=i,a=()=>{e.apply(r,n),n=r=null},d=function(...e){n=e,r=this,s&&clearTimeout(s),o&&!s&&a(),s=setTimeout(()=>{s=null,l&&n&&a()},t)};return d.cancel=()=>{s&&clearTimeout(s),s=n=r=null},d}}let lib=new Lib});var $ehsFN=parcelRequire("ehsFN");class $fb3cb004b28f41eb$var$Modal{constructor(){this.modalLevel=0,this.lockCount=0,this.html=null,this._initialized=!1,this._clickHandler=null,this._keydownHandler=null}init(){"u">typeof document&&"u">typeof window&&(this._initialized&&this.destroy(),this.html=$ehsFN.lib.qs("html"),this._renderModalContents(),this._setupModalLinks(),this._setupGlobalListeners(),this._initialized=!0)}destroy(){"u">typeof document&&(this._clickHandler&&(document.removeEventListener("click",this._clickHandler),this._clickHandler=null),this._keydownHandler&&(document.removeEventListener("keydown",this._keydownHandler),this._keydownHandler=null),this.modalLevel=0,this.lockCount=0,this.html=null,this._initialized=!1)}_isValidId(e){return"string"==typeof e&&!!e&&/^[a-zA-Z0-9_-]+$/.test(e)}_escapeHtml(e){if(null==e)return"";let t=String(e);if("u">typeof document){let e=document.createElement("div");return e.textContent=t,e.innerHTML}return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}_renderModalContents(){let e=$ehsFN.lib.qsa("[x-modal]"),t=$ehsFN.lib.qs(".modal-here")||$ehsFN.lib.qs("body");if(t)for(let i=0;i<e.length;i++){let s=e[i],n=s.getAttribute("x-modal");if(!n||!this._isValidId(n)||$ehsFN.lib.qs("#"+n))continue;let r=s.getAttribute("class")||"",o=(s.getAttribute("data-window-class")||"").replace(/\s+/g," ").trim(),l=this._escapeHtml(o),a=s.innerHTML,d=document.createElement("div");d.id=n,d.className="modal "+r,d.innerHTML='<div class="modal-overlay"></div><div class="modal-outer"><div class="modal-inner"><div class="modal-window '+l+'">'+a+'<div class="modal-rail"><a role="button" class="modal-close"></a></div></div></div></div>',t.appendChild(d),s.remove()}}_setupModalLinks(){let e=$ehsFN.lib.qsa("[x-modal-open]");for(let t=0;t<e.length;t++){let i=e[t],s=i.getAttribute("x-modal-open");if(s&&this._isValidId(s)&&(i.addEventListener("click",e=>{e.preventDefault(),this.show(s)}),window.location.hash==="#"+s)){let e=$ehsFN.lib.qs("#"+s);e&&e.classList.contains("modal_hash")&&this.show(s)}}}_setupGlobalListeners(){this._clickHandler=e=>{if(!$ehsFN.lib.qs(".modal_active"))return;let t=e.target,i=t.classList&&t.classList.contains("modal-close"),s=!t.closest||!t.closest(".modal-window");if(!i&&!s)return;e.preventDefault();let n=t.closest(".modal"),r=n?n.getAttribute("id"):null;r&&this._isValidId(r)&&this.hide(r)},this._keydownHandler=e=>{if("Escape"!==e.key)return;let t=$ehsFN.lib.qsa(".modal_active"),i=t.length;if(!i)return;let s=t[i-1].getAttribute("id");s&&this._isValidId(s)&&(e.preventDefault(),this.hide(s))},document.addEventListener("click",this._clickHandler),document.addEventListener("keydown",this._keydownHandler)}async show(e){if("u"<typeof document||!e||"string"!=typeof e||!this._isValidId(e)||this.lockCount>0)return;if(this.isActive(e))return void await this.hide(e);let t=$ehsFN.lib.qs("#"+e);if(t){t.classList.contains("modal_uniq")&&await this.hideAll(),this.lockCount++;try{await $ehsFN.lib.addClass(t,"modal_ready"),await $ehsFN.lib.sleep(10),t.dispatchEvent(new CustomEvent("modal:ready")),t.classList.contains("modal_hash")&&history.replaceState(null,"","#"+e),this.html&&($ehsFN.lib.addClass(this.html,"modal_active"),$ehsFN.lib.addClass(this.html,e+"_active")),$ehsFN.lib.addClass("[x-modal-open="+e+"]","active"),this.modalLevel++,$ehsFN.lib.addClass(t,"modal_z"+this.modalLevel),await $ehsFN.lib.addClass(t,"modal_active");let i=$ehsFN.lib.qs(".modal-outer",t);i&&i.scrollTo(0,1),await $ehsFN.lib.sleep(200),t.dispatchEvent(new CustomEvent("modal:open"))}catch(e){}finally{this.lockCount--}}}async hide(e){if("u"<typeof document||!e||"string"!=typeof e||!this._isValidId(e)||this.lockCount>0)return;let t=$ehsFN.lib.qs("#"+e);if(t){this.lockCount++;try{t.classList.contains("modal_hash")&&window.location.hash==="#"+e&&history.replaceState(null,document.title,window.location.pathname+window.location.search),$ehsFN.lib.removeClass("[x-modal-open="+e+"]","active"),await $ehsFN.lib.removeClass(t,"modal_active",200),$ehsFN.lib.removeClass(t,"modal_z"+this.modalLevel),t.dispatchEvent(new CustomEvent("modal:close")),this.html&&$ehsFN.lib.removeClass(this.html,e+"_active"),this.modalLevel--,0===this.modalLevel&&this.html&&$ehsFN.lib.removeClass(this.html,"modal_active")}catch(e){}finally{this.lockCount--}}}async hideAll(){if("u"<typeof document)return;let e=$ehsFN.lib.qsa(".modal_active");for(let t=0;t<e.length;t++){let i=e[t].getAttribute("id");i&&await this.hide(i)}}isActive(e){if("u"<typeof document||!e||"string"!=typeof e||!this._isValidId(e))return!1;let t=$ehsFN.lib.qs("#"+e);return!!t&&t.classList.contains("modal_active")}}let $fb3cb004b28f41eb$export$96e4b36520c26a2c=new $fb3cb004b28f41eb$var$Modal;var $ehsFN=parcelRequire("ehsFN");class $014037f76a5c216c$var$Animate{constructor(){this._ticking=!1,this._animations=[],this._scroll=this._scroll.bind(this),this._scrollHandler=this._scrollHandler.bind(this),this._initialized=!1,this._parents=new Set,this._elements=null}init(){"u"<typeof window||(this._cleanup(),this._elements=$ehsFN.lib.qsa("[x-animate]"),!this._elements?.length||(this._parseElementsAnimations(),this._animations.length&&(this._setupListeners(),this._initialized=!0)))}_cleanup(){!this._initialized||"u">typeof window&&(this._parents.forEach(e=>{e.removeEventListener("scroll",this._scrollHandler)}),window.removeEventListener("resize",this._scrollHandler),this._ticking=!1,this._animations=[],this._parents=new Set,this._elements=null,this._initialized=!1)}destroy(){"u">typeof window&&this._cleanup()}_parseElementsAnimations(){for(let e of(this._animations=[],this._elements))try{let t=JSON.parse(e.getAttribute("x-animate"));this._animations.push({element:e,trigger:$ehsFN.lib.qs(t.trigger)||e,parent:$ehsFN.lib.qs(t.parent)||window,start:t.start,end:t.end||!1,class:t.class,classRemove:!1!==t.classRemove,functionName:t.functionName,fn:null,lockedIn:!1,lockedOut:!1,log:t.log||!1})}catch(t){console.error("Invalid JSON in x-animate attribute:",e,t)}}_setupListeners(){for(let e of this._animations)this._parents.has(e.parent)||(this._parents.add(e.parent),e.parent.addEventListener("scroll",this._scrollHandler));window.addEventListener("resize",this._scrollHandler);let e=()=>requestAnimationFrame(()=>this._scroll());"complete"===document.readyState?e():window.addEventListener("load",e,{once:!0})}_scrollHandler(){this._ticking||(this._ticking=!0,window.requestAnimationFrame(()=>{this._scroll(),this._ticking=!1}))}_scroll(){for(let e=0;e<this._animations.length;e++){let t=this._animations[e];if(!t.element.isConnected||!t.trigger.isConnected)continue;!t.fn&&t.functionName&&"function"==typeof window[t.functionName]&&(t.fn=window[t.functionName]);let i=t.trigger.getBoundingClientRect(),s=t.parent,n=s===window?0:s.getBoundingClientRect().top,r=i.top-n,o=this._2px(t.start,s),l=this._2px(t.end,s),a=!isNaN(o),d=!isNaN(l),c=t.fn;t.log&&console.log(r,o,l,t),a&&d?(t.duration=o-l,r<=o&&r>=l?(t.lockedOut=!1,t.class&&!t.element.classList.contains(t.class)&&t.element.classList.add(t.class),c&&(t.progress=((o-r)/t.duration).toFixed(4),c(t))):(t.class&&t.classRemove&&t.element.classList.contains(t.class)&&t.element.classList.remove(t.class),!t.lockedOut&&c&&(r>=o?(t.progress=0,c(t),t.lockedOut=!0):r<=l&&(t.progress=1,c(t),t.lockedOut=!0)))):a&&(r<=o?(t.lockedOut=!1,t.class&&!t.element.classList.contains(t.class)&&t.element.classList.add(t.class),!t.lockedIn&&c&&(t.progress=1,c(t),t.lockedIn=!0)):(t.lockedIn=!1,t.class&&t.classRemove&&t.element.classList.contains(t.class)&&t.element.classList.remove(t.class),!t.lockedOut&&c&&r>=o&&(t.progress=0,c(t),t.lockedOut=!0)))}}_2px(e,t=window){if("number"==typeof e)return e;if("string"!=typeof e)return NaN;let i=parseFloat(e);return/[%vh]/.test(e)?(e.includes("vh")||t===window?document.documentElement.clientHeight:t.clientHeight)*i/100:i}}let $014037f76a5c216c$export$e3607ec2d7a891c4=new $014037f76a5c216c$var$Animate;var $ehsFN=parcelRequire("ehsFN");class $eb3d55ecca7ee7d2$var$Appear{constructor(){this._targets=[],this._observer=null,this._options={appearedClass:"appeared",visibleClass:"visible",once:!1,root:null,rootMargin:"0px",threshold:0},this._observerCallback=this._observerCallback.bind(this)}init(e={}){if("u"<typeof window||!("IntersectionObserver"in window)||(this._options={...this._options,...e},this._observer&&(this._observer.disconnect(),this._observer=null),this._targets=$ehsFN.lib.qsa("[x-appear]"),!this._targets.length))return;let{root:t,rootMargin:i,threshold:s}=this._options;this._observer=new IntersectionObserver(this._observerCallback,{root:t||null,rootMargin:i,threshold:s});for(let e=0;e<this._targets.length;e++)this._observer.observe(this._targets[e])}destroy(){"u">typeof window&&(this._observer&&(this._observer.disconnect(),this._observer=null),this._targets=[])}_observerCallback(e){let{appearedClass:t,visibleClass:i,once:s}=this._options,n=this._observer;for(let r=0;r<e.length;r++){let o=e[r],l=o.target;o.isIntersecting?(t&&!l.classList.contains(t)&&(l.classList.add(t),s&&n&&n.unobserve(l)),i&&!l.classList.contains(i)&&(l.classList.add(i),l.dispatchEvent(new CustomEvent("visible",{detail:{appeared:!0}})))):i&&l.classList.contains(i)&&(l.classList.remove(i),l.dispatchEvent(new CustomEvent("invisible",{detail:{appeared:!0}})))}}}let $eb3d55ecca7ee7d2$export$fb1b4b0e602f43f1=new $eb3d55ecca7ee7d2$var$Appear;var $ehsFN=parcelRequire("ehsFN");class $45256965eb1aa1f4$var$Lazyload{constructor(){this._observer=null,this._options={root:null,rootMargin:"200px",threshold:.1}}init(){if("u"<typeof window||"u"<typeof document||!("IntersectionObserver"in window))return;this._observer||(this._observer=new IntersectionObserver(this._callback.bind(this),this._options));let e=$ehsFN.lib.qsa("[x-lazyload]");for(let t=0;t<e.length;t++){let i=e[t];i.classList.contains("loaded")||this._observer.observe(i)}}destroy(){"u">typeof window&&this._observer&&(this._observer.disconnect(),this._observer=null)}_callback(e){for(let t=0;t<e.length;t++){let i=e[t];i.isIntersecting&&i.target&&this._loadImage(i.target)}}_fetchImage(e,t){return new Promise((i,s)=>{if(!e&&!t)return void s(Error("lazyload: no src or srcset"));let n=new Image;n.onload=i,n.onerror=()=>s(Error("lazyload: load failed")),t&&(n.srcset=t),e&&(n.src=e)})}_loadImage(e){if(!e||"IMG"!==e.nodeName)return;let t=e.getAttribute("data-src"),i=e.getAttribute("data-srcset");if(!t&&!i){this._observer&&this._observer.unobserve(e);return}let s=this._observer;this._fetchImage(t||null,i||null).then(()=>{i&&(e.srcset=i,e.removeAttribute("data-srcset")),t&&(e.src=t,e.removeAttribute("data-src")),e.classList.add("loaded"),s&&s.unobserve(e)}).catch(()=>{s&&s.unobserve(e)})}}let $45256965eb1aa1f4$export$c3e8f8508bab224b=new $45256965eb1aa1f4$var$Lazyload;var $ehsFN=parcelRequire("ehsFN");class $c188f7d5f390f2f6$var$Loadmore{constructor(){this.items={},this.locked=!1,this.observer=null,this._initialized=!1}init(){if("u"<typeof window||"u"<typeof document)return;this._initialized&&this.destroy();let e=$ehsFN.lib.qsa("[x-loadmore]"),t=e.length;if(!t)return;let i=/^[a-zA-Z_$][a-zA-Z0-9_$.]*$/,s=async(e,t)=>{for(let s=0;s<e.length;s++){let n=e[s];if(n.isIntersecting&&!this.locked){this.locked=!0;try{let e,s=n.target;if(!s)continue;let r=s.getAttribute("x-loadmore");if(!r)continue;try{e=JSON.parse(r)}catch(e){continue}let o=e&&e.functionName;if("string"!=typeof o||!i.test(o))continue;let l=window[o];if("function"!=typeof l)continue;let a=s.id,d=a?this.items[a]:null;if(!d)continue;let c=d.page||1,h=await l(c);!0===h?d.page=c+1:!1===h&&t.unobserve(s)}catch(e){}finally{this.locked=!1}}}};if("IntersectionObserver"in window){this.observer=new IntersectionObserver(s,{rootMargin:"0px 0px 400px 0px",threshold:0});for(let i=0;i<t;i++){let t=e[i],s=$ehsFN.lib.makeId();s&&(t.setAttribute("id",s),this.items[s]={el:t,page:1},this.observer.observe(t))}this._initialized=!0}}destroy(){"u">typeof window&&(this.observer&&(this.observer.disconnect(),this.observer=null),this.items={},this.locked=!1,this._initialized=!1)}reset(e){if("u"<typeof document)return;let t=$ehsFN.lib.qs(e);if(!t||!t.id)return;let i=this.items[t.id];i&&(i.page=1)}}let $c188f7d5f390f2f6$export$6456520619f548d5=new $c188f7d5f390f2f6$var$Loadmore;var $ehsFN=parcelRequire("ehsFN");class $8f6aab8d3dab3eed$var$Sheets{constructor(){this._handlers=new Map,this._initialized=!1}_dispatchEvent(e,t,i={}){let s=new CustomEvent(`sheets:${t}`,{detail:i,bubbles:!0,cancelable:!1});e.dispatchEvent(s)}_isValidSheetValue(e){return"string"==typeof e&&!!e&&/^[a-zA-Z0-9_-]+$/.test(e)}init(){this._initialized&&this.destroy();let e=$ehsFN.lib.qsa("[x-sheets]");if(e.length){for(let t of e){if(!t)continue;for(let e of $ehsFN.lib.qsa("[x-sheet-open]:not([x-sheet-open] [x-sheet-open])",t)){if(!e)continue;let t=e.getAttribute("x-sheet-open");if(!t){console.warn("sheets.init: Tab has x-sheet-open attribute but no value",e);continue}if(!this._isValidSheetValue(t)){console.error("sheets.init: Invalid sheet value (security check failed):",t);continue}let i=e=>{e.preventDefault(),this.show(t)};e.addEventListener("click",i),this._handlers.set(e,i)}let e=$ehsFN.lib.qs("[x-sheet-open].active",t);if(e){let t=e.getAttribute("x-sheet-open");t&&this._isValidSheetValue(t)&&this.show(t)}this._dispatchEvent(t,"ready",{container:t,timestamp:Date.now(),initialized:!0})}this._initialized=!0}}destroy(){let e=new Set;for(let[t]of this._handlers.entries()){let i=t.closest("[x-sheets]");i&&e.add(i)}for(let[e,t]of this._handlers.entries())e.removeEventListener("click",t);for(let t of(this._handlers.clear(),this._initialized=!1,e))this._dispatchEvent(t,"destroy",{container:t,timestamp:Date.now(),wasInitialized:!0})}show(e,t={silent:!1,source:"api"}){if(!e||"string"!=typeof e)return void console.error("sheets.show: Sheet value is required and must be a string");if(!this._isValidSheetValue(e))return void console.error("sheets.show: Invalid sheet value (security check failed):",e);let i=CSS.escape(e),s=$ehsFN.lib.qs(`[x-sheet="${i}"]`);if(!s)return void console.warn("sheets.show: Target content not found:",e);let n=s.closest("[x-sheets]");if(!n)return void console.warn("sheets.show: Sheets container not found for:",e);let r=$ehsFN.lib.qs(`[x-sheet-open="${i}"]`,n);if(!r)return void console.warn("sheets.show: Tab not found:",e);if(r.classList.contains("active")&&s.classList.contains("active")){t.silent||this._dispatchEvent(n,"selected",{sheet:e,tab:r,content:s,container:n,previousSheet:e,previousTab:r,previousContent:s,wasActive:!0,source:t.source||"api",timestamp:Date.now()});return}let o=$ehsFN.lib.qs("[x-sheet-open].active",n),l=$ehsFN.lib.qs("[x-sheet].active",n),a=o?o.getAttribute("x-sheet-open"):null,d=$ehsFN.lib.qsa("[x-sheet-open]",n),c=$ehsFN.lib.qsa("[x-sheet]",n);for(let e of d)e&&e.classList.contains("active")&&e.classList.remove("active");for(let e of c)e&&e.classList.contains("active")&&e.classList.remove("active");r.classList.add("active"),s.classList.add("active"),t.silent||this._dispatchEvent(n,"selected",{sheet:e,tab:r,content:s,container:n,previousSheet:a,previousTab:o,previousContent:l,wasActive:!1,source:t.source||"api",timestamp:Date.now()})}}let $8f6aab8d3dab3eed$export$d1f2fc3a3d47c5af=new $8f6aab8d3dab3eed$var$Sheets;var $ehsFN=parcelRequire("ehsFN");class $3134c8ebb2c91188$var$Dropdown{constructor(){this._handlers=new Map,this._menus=new Map,this._parentToMenu=new Map,this._initialized=!1,this._globalClickHandler=null}init(){if(!("u"<typeof document)){for(let e of(this._initialized&&this._cleanup(),this._attachGlobalListeners(),$ehsFN.lib.qsa("[x-dropdown]"))){let t=e.parentElement;if(!t)continue;let i=$ehsFN.lib.qs("[x-dropdown-open]",t);i&&(this._setupAccessibility(t,i,e),this._bindTrigger(t,i),this._bindMenuKeys(e,i,t),this._menus.set(e,{parent:t,trigger:i}),this._parentToMenu.set(t,e),t.dispatchEvent(new CustomEvent("dropdown:ready")))}this._initialized=!0}}_setupAccessibility(e,t,i){e.classList.add("dropdown"),t.setAttribute("aria-expanded","false"),i.id||(i.id=$ehsFN.lib.makeId()),t.setAttribute("aria-controls",i.id),i.setAttribute("role","menu"),i.setAttribute("tabindex","-1");let s=i.querySelectorAll("li > a");for(let e=0;e<s.length;e++){let t=s[e];t.setAttribute("role","menuitem"),t.setAttribute("tabindex","-1")}}_bindTrigger(e,t){let i=$ehsFN.lib.throttle(()=>this._toggleDropdown(e,t),400),s=t.tagName,n="INPUT"===s||"TEXTAREA"===s,r=null,o=e=>{n||(e.stopPropagation(),i())},l=s=>{let{key:r}=s;if(" "!==r||!n){if(!n&&("Enter"===r||" "===r)){s.preventDefault(),i();return}if("ArrowDown"===r){s.preventDefault(),n||(this._open(e,t),this._focusFirstItem(e));return}"ArrowUp"===r&&(s.preventDefault(),n||(this._open(e,t),this._focusLastItem(e)))}},a=()=>{n?(r&&clearTimeout(r),this.closeAllDropdowns(),this._open(e,t)):t.classList.add("hover")},d=()=>{n?r=setTimeout(()=>this._close(e),200):t.classList.remove("hover")};this._handlers.set(t,{clickListener:o,keyListener:l,focusListener:a,blurListener:d,blurTimeout:r}),t.addEventListener("click",o),t.addEventListener("keydown",l),t.addEventListener("focus",a),t.addEventListener("blur",d)}_bindMenuKeys(e,t,i){let s=s=>{let n=e.querySelectorAll('[role="menuitem"]:not([disabled])'),r=n.length;if(!r)return;let o=-1,l=document.activeElement;for(let e=0;e<r;e++)if(n[e]===l){o=e;break}let a=s.key;if("ArrowDown"===a){s.preventDefault(),n[(o+1)%r].focus();return}if("ArrowUp"===a){s.preventDefault(),n[(o-1+r)%r].focus();return}if("Home"===a){s.preventDefault(),n[0].focus();return}if("End"===a){s.preventDefault(),n[r-1].focus();return}"Escape"===a&&(s.preventDefault(),this._close(i),t.focus())},n=e=>{e.target.matches('[role="menuitem"]')&&e.target.classList.add("hover")},r=e=>{e.target.matches('[role="menuitem"]')&&e.target.classList.remove("hover")};this._handlers.set(e,{keyListener:s,focusListener:n,blurListener:r}),e.addEventListener("keydown",s),e.addEventListener("focusin",n),e.addEventListener("focusout",r)}_cleanup(){this.closeAllDropdowns(),this._handlers.forEach((e,t)=>{e.clickListener&&t.removeEventListener("click",e.clickListener),e.keyListener&&t.removeEventListener("keydown",e.keyListener),e.focusListener&&(t.removeEventListener("focus",e.focusListener),t.removeEventListener("focusin",e.focusListener)),e.blurListener&&(t.removeEventListener("blur",e.blurListener),t.removeEventListener("focusout",e.blurListener)),e.blurTimeout&&clearTimeout(e.blurTimeout)}),this._handlers.clear(),this._menus.clear(),this._parentToMenu.clear(),$3134c8ebb2c91188$var$Dropdown._globalListenersAttached&&this._globalClickHandler&&(document.removeEventListener("click",this._globalClickHandler),$3134c8ebb2c91188$var$Dropdown._globalListenersAttached=!1)}_toggleDropdown(e,t){let i=e.classList.contains("dropdown_open");this.closeAllDropdowns(),i||this._open(e,t)}async _open(e,t){let i=this._parentToMenu.get(e);i&&(this._fireEvent(e,"beforeshow"),this._adjustPosition(e,i),$ehsFN.lib.addClass(t,"active"),$ehsFN.lib.addClass(e,"dropdown_open",20),t.setAttribute("aria-expanded","true"),this._fireEvent(e,"aftershow"))}_adjustPosition(e,t){e.classList.add("dropdown_ready");let i=t.getBoundingClientRect();e.classList.remove("dropdown_ready");let s=window.innerWidth,n=document.documentElement.scrollHeight;e.classList.remove("dropdown_right","dropdown_bottom"),i.right>s&&e.classList.add("dropdown_right"),window.scrollY+i.bottom>n&&e.classList.add("dropdown_bottom")}_focusFirstItem(e){let t=this._parentToMenu.get(e);if(!t)return;let i=t.querySelector('[role="menuitem"]:not([disabled])');i&&i.focus()}_focusLastItem(e){let t=this._parentToMenu.get(e);if(!t)return;let i=t.querySelectorAll('[role="menuitem"]:not([disabled])');i.length&&i[i.length-1].focus()}closeAllDropdowns(){if(document.querySelector(".dropdown_open"))for(let e of $ehsFN.lib.qsa(".dropdown_open"))this._close(e)}async _close(e){if(e._dropdownClosing)return;e._dropdownClosing=!0,this._fireEvent(e,"beforehide");let t=$ehsFN.lib.qs("[x-dropdown-open]",e);t&&($ehsFN.lib.removeClass(t,"active"),t.setAttribute("aria-expanded","false")),await $ehsFN.lib.removeClass(e,"dropdown_open",200),e.classList.remove("dropdown_right","dropdown_bottom"),this._fireEvent(e,"afterhide"),setTimeout(()=>{e._dropdownClosing=!1},100)}_fireEvent(e,t){e.dispatchEvent(new CustomEvent(`dropdown:${t}`))}_attachGlobalListeners(){$3134c8ebb2c91188$var$Dropdown._globalListenersAttached||(this._globalClickHandler=e=>{e.target.closest("[x-dropdown-open]")||e.target.closest("[x-dropdown] .dropdown_stay")||document.querySelector(".dropdown_open")&&this.closeAllDropdowns()},document.addEventListener("click",this._globalClickHandler),$3134c8ebb2c91188$var$Dropdown._globalListenersAttached=!0)}destroy(){"u">typeof document&&this._initialized&&(this._cleanup(),this._initialized=!1)}}$3134c8ebb2c91188$var$Dropdown._globalListenersAttached=!1;let $3134c8ebb2c91188$export$81207e5cc4186890=new $3134c8ebb2c91188$var$Dropdown;var $ehsFN=parcelRequire("ehsFN");class $fa742adec1b07386$var$Autocomplete{emptyStateHtml='<li><span class="op4">Ничего не найдено</span></li>';defaultStateHtml='<li><span class="op4">Начните печатать</span></li>';loadingStateHtml='<li><span class="op4">Загрузка...</span></li>';constructor(){this._clicked=!1,this._currentLoadId=0,this._loadData=this._loadData.bind(this),this._keyHandler=this._keyHandler.bind(this),this._clickHandler=this._clickHandler.bind(this),this._hideHandler=this._hideHandler.bind(this)}init(e,t={}){"u"<typeof window||!e||"string"!=typeof e||(this.emptyStateHtml=t.emptyStateHtml??this.emptyStateHtml,this.defaultStateHtml=t.defaultStateHtml??this.defaultStateHtml,this.loadingStateHtml=t.loadingStateHtml??this.loadingStateHtml,this.dropdown=$ehsFN.lib.id(e),!this.dropdown||(this.field=$ehsFN.lib.qs("[x-dropdown-open]",this.dropdown),this.list=$ehsFN.lib.qs("[x-dropdown]",this.dropdown),this.field&&this.list&&(this.data=t.data??null,this.loadData=t.loadData??null,this.mapData=t.mapData??null,this.renderItem=t.renderItem??null,this.onSelect=t.onSelect??null,this.resetFunc=t.resetFunc??null,this.debouncedLoadData=$ehsFN.lib.debounce(this._loadData,400),this.field.value.trim()?this._defaultState():this._reset(),this.field.addEventListener("focus",this.debouncedLoadData),this.field.addEventListener("input",this.debouncedLoadData),this.field.addEventListener("keydown",this._keyHandler),this.list.addEventListener("click",this._clickHandler),this.dropdown.addEventListener("dropdown:afterhide",this._hideHandler))))}destroy(){"u"<typeof window||this.field&&this.list&&this.dropdown&&(this._reset(),this.field.removeEventListener("focus",this.debouncedLoadData),this.field.removeEventListener("input",this.debouncedLoadData),this.field.removeEventListener("keydown",this._keyHandler),this.list.removeEventListener("click",this._clickHandler),this.dropdown.removeEventListener("dropdown:afterhide",this._hideHandler))}_keyHandler(e){"Enter"===e.key&&(e.preventDefault(),this.field?.blur())}_clickHandler(e){if(this._clicked)return;this._clicked=!0;let t=e.target.closest("[data-item]");if(!t||!this.onSelect)return void setTimeout(()=>{this._clicked=!1},0);try{let e=JSON.parse(t.dataset.item);this.onSelect(e)}catch(e){console.error("Autocomplete: error parsing data-item JSON",e)}setTimeout(()=>{this._clicked=!1},0)}_hideHandler(){if(this._clicked){this._clicked=!1;return}this.data?.length&&this.onSelect?(this._loadingState(),this.onSelect(this.data[0])):this._reset()}_loadingState(){$ehsFN.lib.render(this.list,this.loadingStateHtml)}_emptyState(){$ehsFN.lib.render(this.list,this.emptyStateHtml)}_defaultState(){$ehsFN.lib.render(this.list,this.defaultStateHtml)}_reset(){this.resetFunc&&this.resetFunc(),this.data=null,this._defaultState()}async _loadData(){if(!this.field||!this.field.value.trim())return void this._reset();if(!this.loadData)return void this._defaultState();this._loadingState();let e=Date.now();this._currentLoadId=e;try{let t=await this.loadData(this);if(e!==this._currentLoadId)return;this.data=this.mapData?this.mapData(t):t,this.render()}catch(t){e===this._currentLoadId&&this._reset(),console.error("Autocomplete: load error",t)}}render(){if(!this.data)return void this._reset();if(!this.data.length)return void this._emptyState();if(!this.renderItem)return void this._defaultState();let e=this.data.map(this.renderItem).join("");$ehsFN.lib.render(this.list,e)}}let $fa742adec1b07386$export$485ded5f26ebe08d=new $fa742adec1b07386$var$Autocomplete;var $ehsFN=parcelRequire("ehsFN");class $ef55f167e58e504d$var$Scroll{constructor(){this.parent=window,this.offset=0,this.classActive="active",this.hash=!1,this.to=this.scrollTo,this._linksHash={},this._scrollHandlers=new Map,this._initialized=!1}_isValidSelector(e){return!("string"!=typeof e||!e||/<script|javascript:/i.test(e))&&/^[#.a-zA-Z0-9_\-\[\]="':\s>+~,()]+$/.test(e)}init(){this._initialized&&this.destroy();let e=$ehsFN.lib.qsa("[x-scrollto]");if(e.length){for(let t of(this._linksHash={},e))if(t)try{let e=t.getAttribute("x-scrollto");if(!e){console.warn("scroll.init: Link has x-scrollto attribute but no value",t);continue}let i={};if($ehsFN.lib.isValidJSON(e)){let s=JSON.parse(e);if(!s||"object"!=typeof s){console.error("scroll.init: Invalid JSON object:",s);continue}let n=s.target;if(!n){console.error("scroll.init: Target required in JSON:",s);continue}if("string"!=typeof n||!this._isValidSelector(n)){console.error("scroll.init: Invalid or unsafe selector:",n);continue}let r=$ehsFN.lib.qs(n);if(!r){console.error("scroll.init: Target element not found:",n);continue}i.link=t,i.target=r,i.offset="number"==typeof s.offset?s.offset:this.offset,i.classActive=s.classActive||this.classActive,i.hash=s.hash??this.hash,s.parent?"string"==typeof s.parent?this._isValidSelector(s.parent)?i.parent=$ehsFN.lib.qs(s.parent)||this.parent:(console.error("scroll.init: Invalid parent selector:",s.parent),i.parent=this.parent):s.parent instanceof HTMLElement||s.parent===window?i.parent=s.parent:i.parent=this.parent:i.parent=this.parent}else{if(!this._isValidSelector(e)){console.error("scroll.init: Invalid or unsafe selector:",e);continue}let s=$ehsFN.lib.qs(e);if(!s){console.error("scroll.init: Target not found:",e);continue}i.link=t,i.parent=this.parent,i.target=s,i.offset=this.offset,i.classActive=this.classActive,i.hash=this.hash}if(i.link&&i.target){let e=$ehsFN.lib.makeId();if(!e){console.error("scroll.init: Failed to generate ID");continue}this._linksHash[e]=i,t.addEventListener("click",e=>{e.preventDefault(),this.scrollTo({parent:i.parent,target:i.target,offset:i.offset,classActive:i.classActive,hash:i.hash})})}}catch(e){console.error("scroll.init: Error processing link",t,e)}Object.keys(this._linksHash).length&&this._setupScrollObservers(),this._initialized=!0}}destroy(){for(let[e,t]of this._scrollHandlers.entries())e.removeEventListener("scroll",t);this._scrollHandlers.clear(),this._linksHash={},this._initialized=!1}_isValidId(e){return"string"==typeof e&&!!e&&/^[a-zA-Z0-9_-]+$/.test(e)}async scrollTo(e){return new Promise(t=>{let i,s,n,r,o,l,a,d;if(!e){console.error("scroll.scrollTo: Parameters required"),t();return}if(e instanceof HTMLElement)i=e,s=this.parent,n=this.offset,r=this.hash;else if("string"==typeof e){if(!this._isValidSelector(e)){console.error("scroll.scrollTo: Invalid or unsafe selector:",e),t();return}i=$ehsFN.lib.qs(e),s=this.parent,n=this.offset,r=this.hash}else if("object"==typeof e){if(e.target instanceof HTMLElement)i=e.target;else if("string"==typeof e.target){if(!this._isValidSelector(e.target)){console.error("scroll.scrollTo: Invalid or unsafe target selector:",e.target),t();return}i=$ehsFN.lib.qs(e.target)}else{console.error("scroll.scrollTo: Invalid target parameter:",e.target),t();return}e.parent===window||e.parent instanceof HTMLElement?s=e.parent:"string"==typeof e.parent?this._isValidSelector(e.parent)?s=$ehsFN.lib.qs(e.parent)||this.parent:(console.error("scroll.scrollTo: Invalid or unsafe parent selector:",e.parent),s=this.parent):s=this.parent,n="number"==typeof e.offset?e.offset:this.offset,r=e.hash??this.hash}else{console.error("scroll.scrollTo: Invalid parameters:",e),t();return}if(!i){console.error("scroll.scrollTo: Target not found:",e),t();return}if(!s){console.error("scroll.scrollTo: Parent not found"),t();return}try{s===window?d=(o=(l=window.pageYOffset||window.scrollY)+i.getBoundingClientRect().top)-l-n:(l=s.scrollTop,a=s.getBoundingClientRect().top,d=(o=l+i.getBoundingClientRect().top-a)-l-n),s.scrollTo({top:Math.max(0,l+d),left:0,behavior:"smooth"}),setTimeout(t,400),r&&i.id?this._isValidId(i.id)?$ehsFN.lib.updateURL("#"+i.id):console.warn("scroll.scrollTo: Invalid target ID for hash:",i.id):r&&history.replaceState({},document.title,window.location.href.split("#")[0])}catch(e){console.error("scroll.scrollTo: Error during scroll",e),t()}})}_setupScrollObservers(){let e=new Set;for(let t in this._linksHash)e.add(this._linksHash[t].parent);for(let t of e){let e=t===window?window:$ehsFN.lib.qs(t);if(!e)continue;let i=()=>{this._scrollObserve()};e.addEventListener("scroll",i,{passive:!0}),this._scrollHandlers.set(e,i)}this._scrollObserve()}_scrollObserve(){let e=document.documentElement.clientHeight/4;for(let t in this._linksHash){if(!this._linksHash.hasOwnProperty(t))continue;let i=this._linksHash[t];if(i&&i.target&&i.link)try{let t=i.target.getBoundingClientRect(),s=t.top<=e&&t.bottom>e;null!=i.classActive&&(s?(i.link.classList.contains(i.classActive)||i.link.classList.add(i.classActive),i.target.classList.contains(i.classActive)||i.target.classList.add(i.classActive)):(i.link.classList.contains(i.classActive)&&i.link.classList.remove(i.classActive),i.target.classList.contains(i.classActive)&&i.target.classList.remove(i.classActive)))}catch(e){console.error("scroll._scrollObserve: Error observing item",t,e)}}}}let $ef55f167e58e504d$export$209876d7b1ac8f3=new $ef55f167e58e504d$var$Scroll;var $ehsFN=parcelRequire("ehsFN");class $10665505e2eb0736$export$70dd375dd4457bf8{constructor(){this._initialized=!1,this._boundEnter=this._handleEnter.bind(this),this._boundLeave=this._handleLeave.bind(this)}init(){"u">typeof document&&!this._initialized&&(this._initialized=!0,document.addEventListener("mouseenter",this._boundEnter,!0),document.addEventListener("mouseleave",this._boundLeave,!0))}destroy(){"u">typeof document&&this._initialized&&(document.removeEventListener("mouseenter",this._boundEnter,!0),document.removeEventListener("mouseleave",this._boundLeave,!0),this._initialized=!1)}_handleEnter(e){this._syncHover(e,!0)}_handleLeave(e){this._syncHover(e,!1)}_syncHover(e,t){let i=e?.target;if(!i||"function"!=typeof i.closest)return;let s=i.closest("[x-hover]");if(!s)return;let n=s.getAttribute("href");if(null!=n&&""!==n.trim()&&"u">typeof CSS&&"function"==typeof CSS.escape)try{let e=CSS.escape(n),i=$ehsFN.lib.qsa(`[x-hover][href="${e}"]`);for(let e=0;e<i.length;e++)i[e].classList.toggle("hover",t)}catch(e){}}}let $10665505e2eb0736$export$3f60957f5dbf3876=new $10665505e2eb0736$export$70dd375dd4457bf8;var $ehsFN=parcelRequire("ehsFN");let $69dd4358dca59ad6$var$CLASSES_TO_REMOVE=["js","windows","macos","ios","android","linux","unknown","chrome","firefox","safari","opera","edge","iphone","ipad","mac","computer","mobile","desktop","touch"],$69dd4358dca59ad6$var$SIZE_FLAGS={xs:{xs:!0,s:!1,m:!1,l:!1,xl:!1},s:{xs:!1,s:!0,m:!1,l:!1,xl:!1},m:{xs:!1,s:!1,m:!0,l:!1,xl:!1},l:{xs:!1,s:!1,m:!1,l:!0,xl:!1},xl:{xs:!1,s:!1,m:!1,l:!1,xl:!0}};class $69dd4358dca59ad6$export$8215d14a63d9fb10{constructor(){if(this.js=!0,this.os="unknown",this.browser="unknown",this.device=null,this.mobile=!1,this.touch=!1,this.width=0,this.height=0,this.breakpoint="xs",this.size=$69dd4358dca59ad6$var$SIZE_FLAGS.xs,this._html=null,this._onResize=this._onResize.bind(this),this._debouncedResize=$ehsFN.lib.debounce(this._onResize,200),this._initialized=!1,"u"<typeof window)return;this.width=window.innerWidth,this.height=window.innerHeight,this.breakpoint=this._getBreakpointName(this.width),this.size=$69dd4358dca59ad6$var$SIZE_FLAGS[this.breakpoint]||$69dd4358dca59ad6$var$SIZE_FLAGS.xs,this._html=document.documentElement}init(){"u">typeof window&&(this._initialized&&this._cleanup(),this._html=document.documentElement,this._detect(),this._applyHtmlClasses(),window.addEventListener("resize",this._debouncedResize),this._initialized=!0)}destroy(){"u">typeof window&&this._cleanup()}_cleanup(){window.removeEventListener("resize",this._debouncedResize),this._html&&this._html.classList.remove(...$69dd4358dca59ad6$var$CLASSES_TO_REMOVE),this._initialized=!1}_getBreakpointName(e){return e>=1280?"xl":e>=1024?"l":e>=768?"m":e>=640?"s":"xs"}_getSizeFlags(e){return $69dd4358dca59ad6$var$SIZE_FLAGS[e]||$69dd4358dca59ad6$var$SIZE_FLAGS.xs}_onResize(){let e=window.innerWidth,t=window.innerHeight,i=this.breakpoint,s=this._getBreakpointName(e);this.width=e,this.height=t,this.breakpoint=s,this.size=$69dd4358dca59ad6$var$SIZE_FLAGS[s]||$69dd4358dca59ad6$var$SIZE_FLAGS.xs,i!==s&&window.dispatchEvent(new CustomEvent("breakpointchange",{detail:{prev:i,current:s,width:e,height:t}}))}_detect(){let e=window.navigator.userAgent.toLowerCase();this.mobile=/mobile/.test(e),e.includes("win")?this.os="windows":e.includes("iphone")||e.includes("ipad")||e.includes("ipod")?this.os="ios":e.includes("android")?this.os="android":e.includes("mac")?this.os="macos":e.includes("linux")?this.os="linux":this.os="unknown",/edg\//.test(e)?this.browser="edge":/opr\//.test(e)||/opera/.test(e)?this.browser="opera":/firefox/.test(e)?this.browser="firefox":/chrome/.test(e)?this.browser="chrome":/safari/.test(e)?this.browser="safari":this.browser="unknown",e.includes("ipad")?this.device="ipad":e.includes("iphone")?this.device="iphone":e.includes("android")?this.device="android":e.includes("mac")?this.device="mac":this.device="computer",this.touch=window.matchMedia?.("(pointer: coarse)").matches??!1}_applyHtmlClasses(){if(!this._html)return;let e=["js",this.os,this.browser,this.device,this.mobile?"mobile":"desktop",this.touch?"touch":null].filter(Boolean);this._html.classList.add(...e)}}let $69dd4358dca59ad6$export$91cea577896d70d9=new $69dd4358dca59ad6$export$8215d14a63d9fb10;var $ehsFN=parcelRequire("ehsFN"),$ehsFN=parcelRequire("ehsFN");class $fb9ec3799c0f5369$var$Form{constructor(){this._updateElements=new Set,this._updateHandlers=new Map,this.listen=Object.freeze({update:this._updateElements})}getEventType(e){if(!e)throw Error("getEventType: Element is required");if(e.isContentEditable)return"input";let t=e.tagName?.toLowerCase();if(!t)throw Error("getEventType: Element has no tagName");if("input"===t||"textarea"===t)return"input";if("select"===t)return"change";throw Error(`getEventType: Unsupported element <${t}>`)}_eventType(e){if(!e)return"";if(e.isContentEditable)return"input";let t=e.tagName?.toLowerCase();return"input"===t||"textarea"===t?"input":"select"===t?"change":""}setChecked(e,t=!1){if("u"<typeof document||!e)return;let i=$ehsFN.lib.qsa(e);for(let e=0;e<i.length;e++){let s=i[e],n=s.type;("checkbox"===n||"radio"===n)&&s.checked!==t&&(s.checked=t,s.dispatchEvent(new Event("input",{bubbles:!0})))}}setValue(e,t){if("u"<typeof document||!e)return;let i=$ehsFN.lib.qsa(e),s=String(t);for(let e=0;e<i.length;e++){let n=i[e],r="";try{if(n.isContentEditable)n.innerText=s,r="input";else{let e=n.tagName?.toLowerCase();if(!e)continue;let i=n.type;if("input"===e)"checkbox"===i||"radio"===i?n.checked=!!t:n.value=s,r="input";else{if("textarea"!==e&&"select"!==e)continue;n.value=s,r="select"===e?"change":"input"}}r&&n.dispatchEvent(new Event(r,{bubbles:!0}))}catch(e){"u">typeof console&&console.error&&console.error("setValue",n,e)}}}onUpdate(e,t){if("u"<typeof document||!e||"function"!=typeof t)return;let i=$ehsFN.lib.qsa(e);for(let e=0;e<i.length;e++){let s=i[e];if(this._updateHandlers.has(s))continue;let n=this._eventType(s);if(!n)continue;let r=()=>t(s);s.addEventListener(n,r),this._updateHandlers.set(s,{eventType:n,handler:r}),this._updateElements.add(s)}}offUpdate(e){if("u"<typeof document||!e)return;let t=$ehsFN.lib.qsa(e);for(let e=0;e<t.length;e++){let i=t[e],s=this._updateHandlers.get(i);s&&(i.removeEventListener(s.eventType,s.handler),this._updateHandlers.delete(i),this._updateElements.delete(i))}}update(e){if("u"<typeof document||!e)return;let t=$ehsFN.lib.qsa(e);for(let e=0;e<t.length;e++){let i=t[e],s=this._eventType(i);s&&i.dispatchEvent(new Event(s,{bubbles:!0}))}}destroy(){"u">typeof document&&(this._updateHandlers.forEach((e,t)=>{t.removeEventListener(e.eventType,e.handler)}),this._updateHandlers.clear(),this._updateElements.clear())}}let $fb9ec3799c0f5369$export$6210fa4921d2a466=new $fb9ec3799c0f5369$var$Form;var $ehsFN=parcelRequire("ehsFN");class $a1e3f49e5a065fbf$var$Sticky{constructor(){this.activeClass="sticky_on",this.rootMargin="-1px 0px 0px 0px",this._observer=null,this._initialized=!1,this._initObserver()}_initObserver(){"IntersectionObserver"in window?this._observer=new IntersectionObserver(e=>{for(let t of e)t&&t.target&&this._handleEntry(t)},{threshold:1,rootMargin:this.rootMargin}):console.warn("sticky: IntersectionObserver is not supported")}_handleEntry(e){if(!e||!e.target)return;let t=e.target;if(!(t instanceof HTMLElement))return;let i=e.intersectionRatio<1;i!==t.classList.contains(this.activeClass)&&(i?(t.classList.add(this.activeClass),t.dispatchEvent(new CustomEvent("sticky:on",{bubbles:!0}))):(t.classList.remove(this.activeClass),t.dispatchEvent(new CustomEvent("sticky:off",{bubbles:!0}))))}init(){if(!this._observer)return void console.warn("sticky.init: IntersectionObserver is not available");for(let e of(this._initialized&&this.reset(),$ehsFN.lib.qsa(".sticky")))if(e&&e instanceof HTMLElement&&!e.dataset.stickyObserved)try{this._observer.observe(e),e.dataset.stickyObserved="true"}catch(t){console.error("sticky.init: Error observing element",e,t)}this._initialized=!0}reset(){if(this._observer){for(let e of $ehsFN.lib.qsa(".sticky"))if(e&&e instanceof HTMLElement&&e.dataset.stickyObserved)try{document.body.contains(e)&&this._observer.unobserve(e),delete e.dataset.stickyObserved}catch(t){console.error("sticky.reset: Error unobserving element",e,t),delete e.dataset.stickyObserved}}}destroy(){this._observer&&(this._observer.disconnect(),this._observer=null),this._initialized=!1}}let $a1e3f49e5a065fbf$export$4bd4b47501432316=new $a1e3f49e5a065fbf$var$Sticky;var $ehsFN=parcelRequire("ehsFN");class $a4da403316380ec6$export$472062a354075cee{constructor(){this.sliders=[],this.instances=new Map,this.io=null,this.mo=null}init(){(this.observeSliders(),"MutationObserver"in window)?(this.mo=new MutationObserver(e=>{for(let t of e)for(let e of t.addedNodes)if(1===e.nodeType&&e instanceof HTMLElement){e.hasAttribute("x-slider")&&this.io&&this.io.observe(e);let t=e.querySelectorAll?.("[x-slider]");if(t&&this.io)for(let e of t)e&&!this.instances.has(e)&&this.io.observe(e)}}),this.mo.observe(document.body,{childList:!0,subtree:!0})):console.warn("slider: MutationObserver is not supported")}destroy(){this.instances.forEach((e,t)=>{let i=e.listenerTarget||e.wrapper||t;e.touch?(i.removeEventListener("touchstart",e.events.touchstart,!0),i.removeEventListener("touchmove",e.events.touchmove,!0),i.removeEventListener("touchend",e.events.touchend,!0),i.removeEventListener("touchcancel",e.events.touchcancel,!0)):(t.removeEventListener("mousemove",e.events.mousemove),e.events.mouseout&&t.removeEventListener("mouseleave",e.events.mouseout),e.events.mouseenter&&t.removeEventListener("mouseenter",e.events.mouseenter),e.events.resize&&(window.removeEventListener("resize",e.events.resize),window.removeEventListener("orientationchange",e.events.resize)))}),this.io&&this.io.disconnect(),this.mo&&this.mo.disconnect(),this.instances.clear()}observeSliders(){if(!("IntersectionObserver"in window))return void console.warn("slider: IntersectionObserver is not supported");for(let e of(this.sliders=document.querySelectorAll("[x-slider]"),this.io=new IntersectionObserver(e=>{for(let t of e)t.isIntersecting&&t.target&&!this.instances.has(t.target)&&this.initSlider(t.target)},{rootMargin:"60px 0px 60px 0px",threshold:0}),this.sliders))e&&this.io.observe(e)}_validateConfig(e){let t={gap:0,rubber:!0,resetOnMouseout:!0,touch:!0};if(!e||"object"!=typeof e)return t;if("gap"in e){let i=Number(e.gap);t.gap=isNaN(i)||i<0?0:i}return"rubber"in e&&(t.rubber=!!e.rubber),"resetOnMouseout"in e&&(t.resetOnMouseout=!!e.resetOnMouseout),"touch"in e&&(t.touch=!!e.touch),t}initSlider(e){if(!e||!(e instanceof HTMLElement))return void console.error("slider.initSlider: Invalid element");let t=[...e.children].map(e=>e.cloneNode(!0));if(!t.length)return void console.warn("slider.initSlider: No slides found",e);e.classList.add("slider"),e.style.overflow="hidden",e.style.overscrollBehavior="contain";let i=0,s=!0,n=!0,r=!0;try{let t=e.getAttribute("x-slider");if(t)if($ehsFN.lib.isValidJSON(t)){let e=JSON.parse(t),o=this._validateConfig(e);i=o.gap,s=o.rubber,n=o.resetOnMouseout,r=o.touch}else console.warn("slider.initSlider: Invalid JSON in x-slider attribute:",t)}catch(e){console.warn("slider.initSlider: Error parsing x-slider JSON",e)}let o=document.createElement("div");o.className="slider-wrapper",o.style.gap=i+"px",e.innerHTML="";for(let e=0;e<t.length;e++){let i=t[e];if(!i)continue;i.classList.add("slider-item");let s=i.querySelector("img");s&&0===e&&(s.dataset.srcset&&(s.srcset=s.dataset.srcset,s.removeAttribute("data-srcset")),s.dataset.src&&(s.src=s.dataset.src,s.removeAttribute("data-src")),s.setAttribute("loading","eager")),o.appendChild(i)}e.appendChild(o);let l="ontouchstart"in window,a=[];if(t.length>1&&(!l||r)){let i=document.createElement("div");i.className="slider-indicators";for(let e=0;e<t.length;e++){let t=document.createElement("span");0===e&&t.classList.add("active"),i.appendChild(t)}e.appendChild(i),a=[...i.querySelectorAll("span")]}let d=t;if(l&&r?e.classList.add("slider_touch"):e.classList.remove("slider_touch"),l&&!r)return void d[0].classList.add("active");let c=0,h=/iP(ad|hone|od)/.test(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document,u=()=>d[0].offsetWidth+i,p=(e,t=!1)=>{let i=Math.max(0,Math.min(e,d.length-1)),s=u();if(c=i,o.style.transition=t?"none":"transform 0.25s",o.style.transform=`translateX(${-c*s}px)`,a.length)for(let e=0;e<a.length;e++){let t=a[e];t&&t.classList.toggle("active",e===c)}t||o.addEventListener("transitionend",()=>{o.style.transition="none",h&&(o.style.pointerEvents="none",requestAnimationFrame(()=>{o.offsetWidth,o.style.pointerEvents="auto"}))},{once:!0})};p(0,!0);let f={},m=!1,v=null,_=()=>{if(!m){m=!0;for(let t=0;t<d.length;t++){let i=d[t];if(!i)continue;let s=i.querySelector("img");s&&0!==t&&(s.dataset.srcset&&(s.srcset=s.dataset.srcset,s.removeAttribute("data-srcset")),s.dataset.src&&(s.src=s.dataset.src,s.removeAttribute("data-src")),l||s.complete&&0!==s.naturalWidth||s.addEventListener("load",()=>{if(null!=v){let i=e.getBoundingClientRect(),s=e.offsetWidth;s>0&&Math.floor((v-i.left)/s*d.length)===t&&p(t,!0)}},{once:!0}))}}};if(d.length>1)if(l){let t=0,i=0,n=!1,r=null,l=(e,t)=>[...e].find(e=>e.identifier===t)||null,a=()=>{_(),e.removeEventListener("touchstart",a)};e.addEventListener("touchstart",a,{passive:!1,capture:!0}),f.touchstart=e=>{let s=e.changedTouches[0];r=s.identifier,t=s.clientX,i=s.clientY,n=!0,o.style.transition="none"},f.touchmove=e=>{if(!n||null==r)return;let a=l(e.touches,r);if(!a)return;let h=a.clientX-t;if(Math.abs(a.clientY-i)>Math.abs(h))return;e.cancelable&&e.preventDefault();let p=u(),f=h;0===c&&h>0&&(f=s?.15*h:0),c===d.length-1&&h<0&&(f=s?.15*h:0),o.style.transform=`translateX(${-c*p+f}px)`},f.touchend=e=>{if(!n)return;n=!1;let s=l(e.changedTouches,r)||e.changedTouches[0];r=null;let o=s.clientX-t,a=s.clientY-i,h=.1*u();Math.abs(a)>Math.abs(o)||0===c&&o>0||c===d.length-1&&o<0?p(c):o>h&&c>0?p(c-1):o<-h&&c<d.length-1?p(c+1):p(c)},f.touchcancel=()=>{n=!1,r=null,p(c)},e.addEventListener("touchstart",f.touchstart,{passive:!1,capture:!0}),e.addEventListener("touchmove",f.touchmove,{passive:!1,capture:!0}),e.addEventListener("touchend",f.touchend,{capture:!0}),e.addEventListener("touchcancel",f.touchcancel,{capture:!0})}else{let t=i=>{v=i.clientX,_(),e.removeEventListener("mouseenter",t)};e.addEventListener("mouseenter",t),f.mousemove=t=>{v=t.clientX;let i=e.getBoundingClientRect(),s=e.offsetWidth;if(s<=0)return;let n=t.clientX-i.left;n<0?n=0:n>=s&&(n=s-1e-7);let r=Math.floor(n/s*d.length),o=d[r].querySelector("img");r!==c&&(!o||o.complete||o.naturalWidth>0)&&p(r,!0)},e.addEventListener("mousemove",f.mousemove),e.addEventListener("mouseenter",e=>f.mousemove(e)),n&&(f.mouseout=()=>p(0,!0),e.addEventListener("mouseleave",f.mouseout))}let b=()=>{let e=u();o.style.transition="none",o.style.transform=`translateX(${-c*e}px)`};window.addEventListener("resize",b),window.addEventListener("orientationchange",b),f.resize=b,this.instances.set(e,{wrapper:o,slides:d,events:f,touch:l,listenerTarget:e})}}let $a4da403316380ec6$export$b38bf4f33e9e4c25=new $a4da403316380ec6$export$472062a354075cee;class $e5904712fb6120b1$var$X{constructor(){this.modal=$fb3cb004b28f41eb$export$96e4b36520c26a2c,this.animate=$014037f76a5c216c$export$e3607ec2d7a891c4,this.appear=$eb3d55ecca7ee7d2$export$fb1b4b0e602f43f1,this.lazyload=$45256965eb1aa1f4$export$c3e8f8508bab224b,this.loadmore=$c188f7d5f390f2f6$export$6456520619f548d5,this.sheets=$8f6aab8d3dab3eed$export$d1f2fc3a3d47c5af,this.dropdown=$3134c8ebb2c91188$export$81207e5cc4186890,this.autocomplete=$fa742adec1b07386$export$485ded5f26ebe08d,this.scroll=$ef55f167e58e504d$export$209876d7b1ac8f3,this.hover=$10665505e2eb0736$export$3f60957f5dbf3876,this.device=$69dd4358dca59ad6$export$91cea577896d70d9,this.lib=$ehsFN.lib,this.render=$ehsFN.lib.render.bind($ehsFN.lib),this.form=$fb9ec3799c0f5369$export$6210fa4921d2a466,this.sticky=$a1e3f49e5a065fbf$export$4bd4b47501432316,this.slider=$a4da403316380ec6$export$b38bf4f33e9e4c25,this.initialized=!1}init(){this.initialized||(this.device.init(),this.modal.init(),this.animate.init(),this.appear.init(),this.lazyload.init(),this.loadmore.init(),this.sheets.init(),this.dropdown.init(),this.scroll.init(),this.sticky.init(),this.slider.init(),$10665505e2eb0736$export$3f60957f5dbf3876.init(),this.initialized=!0)}}let $e5904712fb6120b1$var$x=new $e5904712fb6120b1$var$X;window.x=$e5904712fb6120b1$var$x,window.x.id=$e5904712fb6120b1$var$x.lib.id,window.x.qs=$e5904712fb6120b1$var$x.lib.qs,window.x.qsa=$e5904712fb6120b1$var$x.lib.qsa;
|
|
1
|
+
function $parcel$export(e,t,i,s){Object.defineProperty(e,t,{get:i,set:s,enumerable:!0,configurable:!0})}var $parcel$global="u">typeof globalThis?globalThis:"u">typeof self?self:"u">typeof window?window:"u">typeof global?global:{},$parcel$modules={},$parcel$inits={},parcelRequire=$parcel$global.parcelRequirec3c2;null==parcelRequire&&((parcelRequire=function(e){if(e in $parcel$modules)return $parcel$modules[e].exports;if(e in $parcel$inits){var t=$parcel$inits[e];delete $parcel$inits[e];var i={id:e,exports:{}};return $parcel$modules[e]=i,t.call(i.exports,i,i.exports),i.exports}var s=Error("Cannot find module '"+e+"'");throw s.code="MODULE_NOT_FOUND",s}).register=function(e,t){$parcel$inits[e]=t},$parcel$global.parcelRequirec3c2=parcelRequire);var parcelRegister=parcelRequire.register;parcelRegister("ehsFN",function(module,exports){$parcel$export(module.exports,"lib",function(){return lib});let HAS_DOM=()=>"u">typeof document&&"u">typeof window;class Lib{constructor(){this.loadedScripts=new Set,HAS_DOM()&&this._elementRender()}_elementRender(){HAS_DOM()&&document.addEventListener("DOMContentLoaded",()=>{let elements=this.qsa("[x-render]");for(let i=0;i<elements.length;i++){let item=elements[i];try{let expression=item.getAttribute("x-render");if(expression){let value=eval(expression);this.render(item,value)}}catch(_){}}},{once:!0})}_escapeHtml(e){if(null==e)return"";let t=String(e);if(HAS_DOM()){let e=document.createElement("div");return e.textContent=t,e.innerHTML}return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}id(e){return HAS_DOM()?document.getElementById(e):null}qs(e,t=document){return e?HAS_DOM()?"string"==typeof e?t.querySelector(e):e instanceof Node?e:e instanceof NodeList?e.length?e[0]:null:Array.isArray(e)&&e.length?e[0]instanceof Node?e[0]:t.querySelector(e[0]):e===window?e:null:e instanceof Node?e:null:null}qsa(e,t=document){if(!e)return[];if(!HAS_DOM())return e instanceof Node?[e]:[];if("string"==typeof e)return Array.from(t.querySelectorAll(e));if(e instanceof NodeList)return Array.from(e);if(e instanceof Node)return[e];if(Array.isArray(e)&&e.length){let i=[];for(let s=0;s<e.length;s++){let n=e[s];n instanceof Node?i.push(n):n instanceof NodeList?i.push(...n):i.push(...t.querySelectorAll(n))}return i.flat()}return e===window?[e]:[]}async hide(e){await this.addClass(e,"hidden")}async show(e){await this.removeClass(e,"hidden")}async toggle(e){await this.toggleClass(e,"hidden")}async switch(e,t){t?await this.removeClass(e,"hidden"):await this.addClass(e,"hidden")}async addClass(e,t,i=0){let s=this.qsa(e),n=s.length;if(n){if(i>0){let e=t.replace(/_.*/,"")+"_ready";for(let t=0;t<n;t++)s[t].classList.add(e);await new Promise(e=>setTimeout(e,i))}for(let e=0;e<n;e++)s[e].classList.add(t)}}async removeClass(e,t,i=0){let s=this.qsa(e),n=s.length;if(n){for(let e=0;e<n;e++)s[e].classList.remove(t);if(i>0){await new Promise(e=>setTimeout(e,i));let e=t.replace(/_.*/,"")+"_ready";for(let t=0;t<n;t++)s[t].classList.remove(e)}}}async toggleClass(e,t,i=0){let s=this.qsa(e),n=s.length;for(let e=0;e<n;e++){let n=s[e];n.classList.contains(t)?await this.removeClass(n,t,i):await this.addClass(n,t,i)}}async switchClass(e,t,i,s=0){i?await this.addClass(e,t,s):await this.removeClass(e,t,s)}reload(){"u">typeof window&&location.reload()}reloadWithHash(e){"u">typeof window&&(location.hash=e,this.reload())}redirectTo(e){"u">typeof window&&(location.href=e)}updateURL(e,t){"u">typeof window&&(history.pushState?history.pushState(null,t,e):location.href=e)}random(e,t){return Math.floor(Math.random()*(t-e+1))+e}price(e){return parseFloat(e).toFixed(2).replace(/\d(?=(\d{3})+\.)/g,"$& ").replace(".00","")}number(e){let t=(e+"").split(".");return t[0]=t[0].replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1 "),t.join(".")}numberDecline(e,t,i,s){if(e>10&&1===Math.floor(e%100/10))return s;switch(e%10){case 1:return t;case 2:case 3:case 4:return i;default:return s}}isEmail(e){return"string"==typeof e&&/^[^\s@]+@[^\s@]+\.[^\s@]{2,}$/.test(e.trim())}isValidJSON(e){if("string"!=typeof e)return!1;try{return JSON.parse(e),!0}catch{return!1}}isInteger(e){return Number.isInteger(Number(e))}isDouble(e){let t=Number(e);return!isNaN(t)&&"number"==typeof t}makeId(){return"id"+this.random(1e5,999999)}makePassword(e=8,t){e<1&&(e=8);let i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#^$%^&*()-+:,.;_",s="";for(let t=0;t<e;t++)s+=i[Math.floor(Math.random()*i.length)];if(t){let e=this.qs(t);e&&"value"in e&&(e.value=s);return}return s}loadScript(e,t,i="async"){if(HAS_DOM()&&e&&"function"==typeof t){try{if("string"==typeof e&&e.startsWith("http")){let t=new URL(e,window.location.href);if("http:"!==t.protocol&&"https:"!==t.protocol)return}}catch(t){if(!e.startsWith("/")&&!e.startsWith("./")&&!e.startsWith("../"))return}if(this.loadedScripts.has(e))return void t();try{let s=document.createElement("script");s.onload=t,s.onerror=()=>this.loadedScripts.delete(e),s.src=e,i&&s.setAttribute(i,""),s.crossOrigin="anonymous",document.body.appendChild(s),this.loadedScripts.add(e)}catch(e){}}}deferred(e,t=1e4){let i;if("u"<typeof window)return;let s=["scroll","resize","click","keydown","mousemove","touchmove"],n=()=>{for(let e=0;e<s.length;e++)window.removeEventListener(s[e],n,{once:!0});"complete"===document.readyState?e():window.addEventListener("load",e,{once:!0}),clearTimeout(i)};i=setTimeout(n,t);for(let e=0;e<s.length;e++)window.addEventListener(s[e],n,{once:!0})}deffered(e,t=1e4){return this.deferred(e,t)}throttle(e,t,i={}){return this._throttle(e,t,i)}debounce(e,t,i={}){return this._debounce(e,t,i)}onAppear(e,t,i=null,s={}){if(!HAS_DOM()||"function"!=typeof t||!("IntersectionObserver"in window))return;let n=this.qsa(e),r=n.length;if(!r)return;let o=new IntersectionObserver((e,s)=>{for(let n=0;n<e.length;n++){let r=e[n];r.isIntersecting?(t(r.target),i||s.unobserve(r.target)):i&&i(r.target)}},{root:null,rootMargin:"200px",threshold:.1,...s});for(let e=0;e<r;e++)o.observe(n[e])}alertErrors(e){e&&("string"==typeof e?alert(e):alert(Object.values(e).join("\n")))}printErrors(e){return e?"string"==typeof e?`<div>${this._escapeHtml(e)}</div>`:Object.entries(e).map(([e,t])=>{let i=this._escapeHtml(String(e)),s=this._escapeHtml(String(t));return`<div class="error_${i}">${s}</div>`}).join("\n"):""}async render(e,t,i=null,s=!1){if(!e)return;let n=this.qsa(e),r=n.length;if(r)try{let e="function"==typeof t?await t():t,o=String(e||"");for(let e=0;e<r;e++){let t=n[e];if(s)if(null==i)t.textContent=o;else{let e=document.createTextNode(o);"beforebegin"===i?t.parentNode?.insertBefore(e,t):"afterbegin"===i?t.insertBefore(e,t.firstChild):"beforeend"===i?t.appendChild(e):"afterend"===i&&t.parentNode?.insertBefore(e,t.nextSibling)}else null==i?t.innerHTML=o:t.insertAdjacentHTML(i,o)}}catch(e){}}transitionsOn(e=0){HAS_DOM()&&setTimeout(()=>document.documentElement.classList.remove("noTransitions"),e)}transitionsOff(){HAS_DOM()&&document.documentElement.classList.add("noTransitions")}async sleep(e){return new Promise(t=>setTimeout(t,e))}_throttle(e,t,i={}){let s=null,n=null,r=null,o=0,{leading:l=!0,trailing:a=!0}=i,d=t=>{o=t,e.apply(r,n),n=r=null},c=function(...e){let i=Date.now();o||l||(o=i),n=e,r=this;let c=t-(i-o);c<=0||c>t?(s&&clearTimeout(s),s=null,d(i)):!s&&a&&(s=setTimeout(()=>{s=null,a&&n&&d(Date.now())},c))};return c.cancel=()=>{s&&clearTimeout(s),s=n=r=null,o=0},c}_debounce(e,t,i={}){let s=null,n=null,r=null,{leading:o=!1,trailing:l=!0}=i,a=()=>{e.apply(r,n),n=r=null},d=function(...e){n=e,r=this,s&&clearTimeout(s),o&&!s&&a(),s=setTimeout(()=>{s=null,l&&n&&a()},t)};return d.cancel=()=>{s&&clearTimeout(s),s=n=r=null},d}}let lib=new Lib});var $ehsFN=parcelRequire("ehsFN");class $fb3cb004b28f41eb$var$Modal{constructor(){this.modalLevel=0,this.lockCount=0,this.html=null,this._initialized=!1,this._clickHandler=null,this._keydownHandler=null}init(){"u">typeof document&&"u">typeof window&&(this._initialized&&this.destroy(),this.html=$ehsFN.lib.qs("html"),this._renderModalContents(),this._setupModalLinks(),this._setupGlobalListeners(),this._initialized=!0)}destroy(){"u">typeof document&&(this._clickHandler&&(document.removeEventListener("click",this._clickHandler),this._clickHandler=null),this._keydownHandler&&(document.removeEventListener("keydown",this._keydownHandler),this._keydownHandler=null),this.modalLevel=0,this.lockCount=0,this.html=null,this._initialized=!1)}_isValidId(e){return"string"==typeof e&&!!e&&/^[a-zA-Z0-9_-]+$/.test(e)}_escapeHtml(e){if(null==e)return"";let t=String(e);if("u">typeof document){let e=document.createElement("div");return e.textContent=t,e.innerHTML}return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}_renderModalContents(){let e=$ehsFN.lib.qsa("[x-modal]"),t=$ehsFN.lib.qs(".modal-here")||$ehsFN.lib.qs("body");if(t)for(let i=0;i<e.length;i++){let s=e[i],n=s.getAttribute("x-modal");if(!n||!this._isValidId(n)||$ehsFN.lib.qs("#"+n))continue;let r=s.getAttribute("class")||"",o=(s.getAttribute("data-window-class")||"").replace(/\s+/g," ").trim(),l=this._escapeHtml(o),a=s.innerHTML,d=document.createElement("div");d.id=n,d.className="modal "+r,d.innerHTML='<div class="modal-overlay"></div><div class="modal-outer"><div class="modal-inner"><div class="modal-window '+l+'">'+a+'<div class="modal-rail"><a role="button" class="modal-close"></a></div></div></div></div>',t.appendChild(d),s.remove()}}_setupModalLinks(){let e=$ehsFN.lib.qsa("[x-modal-open]");for(let t=0;t<e.length;t++){let i=e[t],s=i.getAttribute("x-modal-open");if(s&&this._isValidId(s)&&(i.addEventListener("click",e=>{e.preventDefault(),this.show(s)}),window.location.hash==="#"+s)){let e=$ehsFN.lib.qs("#"+s);e&&e.classList.contains("modal_hash")&&this.show(s)}}}_setupGlobalListeners(){this._clickHandler=e=>{if(!$ehsFN.lib.qs(".modal_active"))return;let t=e.target,i=t.classList&&t.classList.contains("modal-close"),s=!t.closest||!t.closest(".modal-window");if(!i&&!s)return;e.preventDefault();let n=t.closest(".modal"),r=n?n.getAttribute("id"):null;r&&this._isValidId(r)&&this.hide(r)},this._keydownHandler=e=>{if("Escape"!==e.key)return;let t=$ehsFN.lib.qsa(".modal_active"),i=t.length;if(!i)return;let s=t[i-1].getAttribute("id");s&&this._isValidId(s)&&(e.preventDefault(),this.hide(s))},document.addEventListener("click",this._clickHandler),document.addEventListener("keydown",this._keydownHandler)}async show(e){if("u"<typeof document||!e||"string"!=typeof e||!this._isValidId(e)||this.lockCount>0)return;if(this.isActive(e))return void await this.hide(e);let t=$ehsFN.lib.qs("#"+e);if(t){t.classList.contains("modal_uniq")&&await this.hideAll(),this.lockCount++;try{await $ehsFN.lib.addClass(t,"modal_ready"),await $ehsFN.lib.sleep(10),t.dispatchEvent(new CustomEvent("modal:ready")),t.classList.contains("modal_hash")&&history.replaceState(null,"","#"+e),this.html&&($ehsFN.lib.addClass(this.html,"modal_active"),$ehsFN.lib.addClass(this.html,e+"_active")),$ehsFN.lib.addClass("[x-modal-open="+e+"]","active"),this.modalLevel++,$ehsFN.lib.addClass(t,"modal_z"+this.modalLevel),await $ehsFN.lib.addClass(t,"modal_active");let i=$ehsFN.lib.qs(".modal-outer",t);i&&i.scrollTo(0,1),await $ehsFN.lib.sleep(200),t.dispatchEvent(new CustomEvent("modal:open"))}catch(e){}finally{this.lockCount--}}}async hide(e){if("u"<typeof document||!e||"string"!=typeof e||!this._isValidId(e)||this.lockCount>0)return;let t=$ehsFN.lib.qs("#"+e);if(t){this.lockCount++;try{t.classList.contains("modal_hash")&&window.location.hash==="#"+e&&history.replaceState(null,document.title,window.location.pathname+window.location.search),$ehsFN.lib.removeClass("[x-modal-open="+e+"]","active"),await $ehsFN.lib.removeClass(t,"modal_active",200),$ehsFN.lib.removeClass(t,"modal_z"+this.modalLevel),t.dispatchEvent(new CustomEvent("modal:close")),this.html&&$ehsFN.lib.removeClass(this.html,e+"_active"),this.modalLevel--,0===this.modalLevel&&this.html&&$ehsFN.lib.removeClass(this.html,"modal_active")}catch(e){}finally{this.lockCount--}}}async hideAll(){if("u"<typeof document)return;let e=$ehsFN.lib.qsa(".modal_active");for(let t=0;t<e.length;t++){let i=e[t].getAttribute("id");i&&await this.hide(i)}}isActive(e){if("u"<typeof document||!e||"string"!=typeof e||!this._isValidId(e))return!1;let t=$ehsFN.lib.qs("#"+e);return!!t&&t.classList.contains("modal_active")}}let $fb3cb004b28f41eb$export$96e4b36520c26a2c=new $fb3cb004b28f41eb$var$Modal;var $ehsFN=parcelRequire("ehsFN");class $014037f76a5c216c$var$Animate{constructor(){this._ticking=!1,this._animations=[],this._scroll=this._scroll.bind(this),this._scrollHandler=this._scrollHandler.bind(this),this._initialized=!1,this._parents=new Set,this._elements=null}init(){"u"<typeof window||(this._cleanup(),this._elements=$ehsFN.lib.qsa("[x-animate]"),!this._elements?.length||(this._parseElementsAnimations(),this._animations.length&&(this._setupListeners(),this._initialized=!0)))}_cleanup(){!this._initialized||"u">typeof window&&(this._parents.forEach(e=>{e.removeEventListener("scroll",this._scrollHandler)}),window.removeEventListener("resize",this._scrollHandler),this._ticking=!1,this._animations=[],this._parents=new Set,this._elements=null,this._initialized=!1)}destroy(){"u">typeof window&&this._cleanup()}_parseElementsAnimations(){for(let e of(this._animations=[],this._elements))try{let t=JSON.parse(e.getAttribute("x-animate"));this._animations.push({element:e,trigger:$ehsFN.lib.qs(t.trigger)||e,parent:$ehsFN.lib.qs(t.parent)||window,start:t.start,end:t.end||!1,class:t.class,classRemove:!1!==t.classRemove,functionName:t.functionName,fn:null,lockedIn:!1,lockedOut:!1,log:t.log||!1})}catch(t){console.error("Invalid JSON in x-animate attribute:",e,t)}}_setupListeners(){for(let e of this._animations)this._parents.has(e.parent)||(this._parents.add(e.parent),e.parent.addEventListener("scroll",this._scrollHandler));window.addEventListener("resize",this._scrollHandler);let e=()=>requestAnimationFrame(()=>this._scroll());"complete"===document.readyState?e():window.addEventListener("load",e,{once:!0})}_scrollHandler(){this._ticking||(this._ticking=!0,window.requestAnimationFrame(()=>{this._scroll(),this._ticking=!1}))}_scroll(){for(let e=0;e<this._animations.length;e++){let t=this._animations[e];if(!t.element.isConnected||!t.trigger.isConnected)continue;!t.fn&&t.functionName&&"function"==typeof window[t.functionName]&&(t.fn=window[t.functionName]);let i=t.trigger.getBoundingClientRect(),s=t.parent,n=s===window?0:s.getBoundingClientRect().top,r=i.top-n,o=this._2px(t.start,s),l=this._2px(t.end,s),a=!isNaN(o),d=!isNaN(l),c=t.fn;t.log&&console.log(r,o,l,t),a&&d?(t.duration=o-l,r<=o&&r>=l?(t.lockedOut=!1,t.class&&!t.element.classList.contains(t.class)&&t.element.classList.add(t.class),c&&(t.progress=((o-r)/t.duration).toFixed(4),c(t))):(t.class&&t.classRemove&&t.element.classList.contains(t.class)&&t.element.classList.remove(t.class),!t.lockedOut&&c&&(r>=o?(t.progress=0,c(t),t.lockedOut=!0):r<=l&&(t.progress=1,c(t),t.lockedOut=!0)))):a&&(r<=o?(t.lockedOut=!1,t.class&&!t.element.classList.contains(t.class)&&t.element.classList.add(t.class),!t.lockedIn&&c&&(t.progress=1,c(t),t.lockedIn=!0)):(t.lockedIn=!1,t.class&&t.classRemove&&t.element.classList.contains(t.class)&&t.element.classList.remove(t.class),!t.lockedOut&&c&&r>=o&&(t.progress=0,c(t),t.lockedOut=!0)))}}_2px(e,t=window){if("number"==typeof e)return e;if("string"!=typeof e)return NaN;let i=parseFloat(e);return/[%vh]/.test(e)?(e.includes("vh")||t===window?document.documentElement.clientHeight:t.clientHeight)*i/100:i}}let $014037f76a5c216c$export$e3607ec2d7a891c4=new $014037f76a5c216c$var$Animate;var $ehsFN=parcelRequire("ehsFN");class $eb3d55ecca7ee7d2$var$Appear{constructor(){this._targets=[],this._observer=null,this._options={appearedClass:"appeared",visibleClass:"visible",once:!1,root:null,rootMargin:"0px",threshold:0},this._observerCallback=this._observerCallback.bind(this)}init(e={}){if("u"<typeof window||!("IntersectionObserver"in window)||(this._options={...this._options,...e},this._observer&&(this._observer.disconnect(),this._observer=null),this._targets=$ehsFN.lib.qsa("[x-appear]"),!this._targets.length))return;let{root:t,rootMargin:i,threshold:s}=this._options;this._observer=new IntersectionObserver(this._observerCallback,{root:t||null,rootMargin:i,threshold:s});for(let e=0;e<this._targets.length;e++)this._observer.observe(this._targets[e])}destroy(){"u">typeof window&&(this._observer&&(this._observer.disconnect(),this._observer=null),this._targets=[])}_observerCallback(e){let{appearedClass:t,visibleClass:i,once:s}=this._options,n=this._observer;for(let r=0;r<e.length;r++){let o=e[r],l=o.target;o.isIntersecting?(t&&!l.classList.contains(t)&&(l.classList.add(t),s&&n&&n.unobserve(l)),i&&!l.classList.contains(i)&&(l.classList.add(i),l.dispatchEvent(new CustomEvent("visible",{detail:{appeared:!0}})))):i&&l.classList.contains(i)&&(l.classList.remove(i),l.dispatchEvent(new CustomEvent("invisible",{detail:{appeared:!0}})))}}}let $eb3d55ecca7ee7d2$export$fb1b4b0e602f43f1=new $eb3d55ecca7ee7d2$var$Appear;var $ehsFN=parcelRequire("ehsFN");class $45256965eb1aa1f4$var$Lazyload{constructor(){this._observer=null,this._options={root:null,rootMargin:"200px",threshold:.1}}init(){if("u"<typeof window||"u"<typeof document||!("IntersectionObserver"in window))return;this._observer||(this._observer=new IntersectionObserver(this._callback.bind(this),this._options));let e=$ehsFN.lib.qsa("[x-lazyload]");for(let t=0;t<e.length;t++){let i=e[t];i.classList.contains("loaded")||this._observer.observe(i)}}destroy(){"u">typeof window&&this._observer&&(this._observer.disconnect(),this._observer=null)}_callback(e){for(let t=0;t<e.length;t++){let i=e[t];i.isIntersecting&&i.target&&this._loadImage(i.target)}}_fetchImage(e,t){return new Promise((i,s)=>{if(!e&&!t)return void s(Error("lazyload: no src or srcset"));let n=new Image;n.onload=i,n.onerror=()=>s(Error("lazyload: load failed")),t&&(n.srcset=t),e&&(n.src=e)})}_loadImage(e){if(!e||"IMG"!==e.nodeName)return;let t=e.getAttribute("data-src"),i=e.getAttribute("data-srcset");if(!t&&!i){this._observer&&this._observer.unobserve(e);return}let s=this._observer;this._fetchImage(t||null,i||null).then(()=>{i&&(e.srcset=i,e.removeAttribute("data-srcset")),t&&(e.src=t,e.removeAttribute("data-src")),e.classList.add("loaded"),s&&s.unobserve(e)}).catch(()=>{s&&s.unobserve(e)})}}let $45256965eb1aa1f4$export$c3e8f8508bab224b=new $45256965eb1aa1f4$var$Lazyload;var $ehsFN=parcelRequire("ehsFN");class $c188f7d5f390f2f6$var$Loadmore{constructor(){this.items={},this.locked=!1,this.observer=null,this._initialized=!1}init(){if("u"<typeof window||"u"<typeof document)return;this._initialized&&this.destroy();let e=$ehsFN.lib.qsa("[x-loadmore]"),t=e.length;if(!t)return;let i=/^[a-zA-Z_$][a-zA-Z0-9_$.]*$/,s=async(e,t)=>{for(let s=0;s<e.length;s++){let n=e[s];if(n.isIntersecting&&!this.locked){this.locked=!0;try{let e,s=n.target;if(!s)continue;let r=s.getAttribute("x-loadmore");if(!r)continue;try{e=JSON.parse(r)}catch(e){continue}let o=e&&e.functionName;if("string"!=typeof o||!i.test(o))continue;let l=window[o];if("function"!=typeof l)continue;let a=s.id,d=a?this.items[a]:null;if(!d)continue;let c=d.page||1,h=await l(c);!0===h?d.page=c+1:!1===h&&t.unobserve(s)}catch(e){}finally{this.locked=!1}}}};if("IntersectionObserver"in window){this.observer=new IntersectionObserver(s,{rootMargin:"0px 0px 400px 0px",threshold:0});for(let i=0;i<t;i++){let t=e[i],s=$ehsFN.lib.makeId();s&&(t.setAttribute("id",s),this.items[s]={el:t,page:1},this.observer.observe(t))}this._initialized=!0}}destroy(){"u">typeof window&&(this.observer&&(this.observer.disconnect(),this.observer=null),this.items={},this.locked=!1,this._initialized=!1)}reset(e){if("u"<typeof document)return;let t=$ehsFN.lib.qs(e);if(!t||!t.id)return;let i=this.items[t.id];i&&(i.page=1)}}let $c188f7d5f390f2f6$export$6456520619f548d5=new $c188f7d5f390f2f6$var$Loadmore;var $ehsFN=parcelRequire("ehsFN");class $8f6aab8d3dab3eed$var$Sheets{constructor(){this._handlers=new Map,this._initialized=!1}_dispatchEvent(e,t,i={}){let s=new CustomEvent(`sheets:${t}`,{detail:i,bubbles:!0,cancelable:!1});e.dispatchEvent(s)}_isValidSheetValue(e){return"string"==typeof e&&!!e&&/^[a-zA-Z0-9_-]+$/.test(e)}init(){this._initialized&&this.destroy();let e=$ehsFN.lib.qsa("[x-sheets]");if(e.length){for(let t of e){if(!t)continue;for(let e of $ehsFN.lib.qsa("[x-sheet-open]:not([x-sheet-open] [x-sheet-open])",t)){if(!e)continue;let t=e.getAttribute("x-sheet-open");if(!t){console.warn("sheets.init: Tab has x-sheet-open attribute but no value",e);continue}if(!this._isValidSheetValue(t)){console.error("sheets.init: Invalid sheet value (security check failed):",t);continue}let i=e=>{e.preventDefault(),this.show(t)};e.addEventListener("click",i),this._handlers.set(e,i)}let e=$ehsFN.lib.qs("[x-sheet-open].active",t);if(e){let t=e.getAttribute("x-sheet-open");t&&this._isValidSheetValue(t)&&this.show(t)}this._dispatchEvent(t,"ready",{container:t,timestamp:Date.now(),initialized:!0})}this._initialized=!0}}destroy(){let e=new Set;for(let[t]of this._handlers.entries()){let i=t.closest("[x-sheets]");i&&e.add(i)}for(let[e,t]of this._handlers.entries())e.removeEventListener("click",t);for(let t of(this._handlers.clear(),this._initialized=!1,e))this._dispatchEvent(t,"destroy",{container:t,timestamp:Date.now(),wasInitialized:!0})}show(e,t={silent:!1,source:"api"}){if(!e||"string"!=typeof e)return void console.error("sheets.show: Sheet value is required and must be a string");if(!this._isValidSheetValue(e))return void console.error("sheets.show: Invalid sheet value (security check failed):",e);let i=CSS.escape(e),s=$ehsFN.lib.qs(`[x-sheet="${i}"]`);if(!s)return void console.warn("sheets.show: Target content not found:",e);let n=s.closest("[x-sheets]");if(!n)return void console.warn("sheets.show: Sheets container not found for:",e);let r=$ehsFN.lib.qs(`[x-sheet-open="${i}"]`,n);if(!r)return void console.warn("sheets.show: Tab not found:",e);if(r.classList.contains("active")&&s.classList.contains("active")){t.silent||this._dispatchEvent(n,"selected",{sheet:e,tab:r,content:s,container:n,previousSheet:e,previousTab:r,previousContent:s,wasActive:!0,source:t.source||"api",timestamp:Date.now()});return}let o=$ehsFN.lib.qs("[x-sheet-open].active",n),l=$ehsFN.lib.qs("[x-sheet].active",n),a=o?o.getAttribute("x-sheet-open"):null,d=$ehsFN.lib.qsa("[x-sheet-open]",n),c=$ehsFN.lib.qsa("[x-sheet]",n);for(let e of d)e&&e.classList.contains("active")&&e.classList.remove("active");for(let e of c)e&&e.classList.contains("active")&&e.classList.remove("active");r.classList.add("active"),s.classList.add("active"),t.silent||this._dispatchEvent(n,"selected",{sheet:e,tab:r,content:s,container:n,previousSheet:a,previousTab:o,previousContent:l,wasActive:!1,source:t.source||"api",timestamp:Date.now()})}}let $8f6aab8d3dab3eed$export$d1f2fc3a3d47c5af=new $8f6aab8d3dab3eed$var$Sheets;var $ehsFN=parcelRequire("ehsFN");class $3134c8ebb2c91188$var$Dropdown{constructor(){this._handlers=new Map,this._menus=new Map,this._parentToMenu=new Map,this._initialized=!1,this._globalClickHandler=null}init(){if(!("u"<typeof document)){for(let e of(this._initialized&&this._cleanup(),this._attachGlobalListeners(),$ehsFN.lib.qsa("[x-dropdown]"))){let t=e.parentElement;if(!t)continue;let i=$ehsFN.lib.qs("[x-dropdown-open]",t);i&&(this._setupAccessibility(t,i,e),this._bindTrigger(t,i),this._bindMenuKeys(e,i,t),this._menus.set(e,{parent:t,trigger:i}),this._parentToMenu.set(t,e),t.dispatchEvent(new CustomEvent("dropdown:ready")))}this._initialized=!0}}_setupAccessibility(e,t,i){e.classList.add("dropdown"),t.setAttribute("aria-expanded","false"),i.id||(i.id=$ehsFN.lib.makeId()),t.setAttribute("aria-controls",i.id),i.setAttribute("role","menu"),i.setAttribute("tabindex","-1");let s=i.querySelectorAll("li > a");for(let e=0;e<s.length;e++){let t=s[e];t.setAttribute("role","menuitem"),t.setAttribute("tabindex","-1")}}_bindTrigger(e,t){let i=$ehsFN.lib.throttle(()=>this._toggleDropdown(e,t),400),s=t.tagName,n="INPUT"===s||"TEXTAREA"===s,r=null,o=e=>{n||(e.stopPropagation(),i())},l=s=>{let{key:r}=s;if(" "!==r||!n){if(!n&&("Enter"===r||" "===r)){s.preventDefault(),i();return}if("ArrowDown"===r){s.preventDefault(),n||(this._open(e,t),this._focusFirstItem(e));return}"ArrowUp"===r&&(s.preventDefault(),n||(this._open(e,t),this._focusLastItem(e)))}},a=()=>{n?(r&&clearTimeout(r),this.closeAllDropdowns(),this._open(e,t)):t.classList.add("hover")},d=()=>{n?r=setTimeout(()=>this._close(e),200):t.classList.remove("hover")};this._handlers.set(t,{clickListener:o,keyListener:l,focusListener:a,blurListener:d,blurTimeout:r}),t.addEventListener("click",o),t.addEventListener("keydown",l),t.addEventListener("focus",a),t.addEventListener("blur",d)}_bindMenuKeys(e,t,i){let s=s=>{let n=e.querySelectorAll('[role="menuitem"]:not([disabled])'),r=n.length;if(!r)return;let o=-1,l=document.activeElement;for(let e=0;e<r;e++)if(n[e]===l){o=e;break}let a=s.key;if("ArrowDown"===a){s.preventDefault(),n[(o+1)%r].focus();return}if("ArrowUp"===a){s.preventDefault(),n[(o-1+r)%r].focus();return}if("Home"===a){s.preventDefault(),n[0].focus();return}if("End"===a){s.preventDefault(),n[r-1].focus();return}"Escape"===a&&(s.preventDefault(),this._close(i),t.focus())},n=e=>{e.target.matches('[role="menuitem"]')&&e.target.classList.add("hover")},r=e=>{e.target.matches('[role="menuitem"]')&&e.target.classList.remove("hover")};this._handlers.set(e,{keyListener:s,focusListener:n,blurListener:r}),e.addEventListener("keydown",s),e.addEventListener("focusin",n),e.addEventListener("focusout",r)}_cleanup(){this.closeAllDropdowns(),this._handlers.forEach((e,t)=>{e.clickListener&&t.removeEventListener("click",e.clickListener),e.keyListener&&t.removeEventListener("keydown",e.keyListener),e.focusListener&&(t.removeEventListener("focus",e.focusListener),t.removeEventListener("focusin",e.focusListener)),e.blurListener&&(t.removeEventListener("blur",e.blurListener),t.removeEventListener("focusout",e.blurListener)),e.blurTimeout&&clearTimeout(e.blurTimeout)}),this._handlers.clear(),this._menus.clear(),this._parentToMenu.clear(),$3134c8ebb2c91188$var$Dropdown._globalListenersAttached&&this._globalClickHandler&&(document.removeEventListener("click",this._globalClickHandler),$3134c8ebb2c91188$var$Dropdown._globalListenersAttached=!1)}_toggleDropdown(e,t){let i=e.classList.contains("dropdown_open");this.closeAllDropdowns(),i||this._open(e,t)}async _open(e,t){let i=this._parentToMenu.get(e);i&&(this._fireEvent(e,"beforeshow"),this._adjustPosition(e,i),$ehsFN.lib.addClass(t,"active"),$ehsFN.lib.addClass(e,"dropdown_open",20),t.setAttribute("aria-expanded","true"),this._fireEvent(e,"aftershow"))}_adjustPosition(e,t){e.classList.add("dropdown_ready");let i=t.getBoundingClientRect();e.classList.remove("dropdown_ready");let s=window.innerWidth,n=document.documentElement.scrollHeight;e.classList.remove("dropdown_right","dropdown_bottom"),i.right>s&&e.classList.add("dropdown_right"),window.scrollY+i.bottom>n&&e.classList.add("dropdown_bottom")}_focusFirstItem(e){let t=this._parentToMenu.get(e);if(!t)return;let i=t.querySelector('[role="menuitem"]:not([disabled])');i&&i.focus()}_focusLastItem(e){let t=this._parentToMenu.get(e);if(!t)return;let i=t.querySelectorAll('[role="menuitem"]:not([disabled])');i.length&&i[i.length-1].focus()}closeAllDropdowns(){if(document.querySelector(".dropdown_open"))for(let e of $ehsFN.lib.qsa(".dropdown_open"))this._close(e)}async _close(e){if(e._dropdownClosing)return;e._dropdownClosing=!0,this._fireEvent(e,"beforehide");let t=$ehsFN.lib.qs("[x-dropdown-open]",e);t&&($ehsFN.lib.removeClass(t,"active"),t.setAttribute("aria-expanded","false")),await $ehsFN.lib.removeClass(e,"dropdown_open",200),e.classList.remove("dropdown_right","dropdown_bottom"),this._fireEvent(e,"afterhide"),setTimeout(()=>{e._dropdownClosing=!1},100)}_fireEvent(e,t){e.dispatchEvent(new CustomEvent(`dropdown:${t}`))}_attachGlobalListeners(){$3134c8ebb2c91188$var$Dropdown._globalListenersAttached||(this._globalClickHandler=e=>{e.target.closest("[x-dropdown-open]")||e.target.closest("[x-dropdown] .dropdown_stay")||document.querySelector(".dropdown_open")&&this.closeAllDropdowns()},document.addEventListener("click",this._globalClickHandler),$3134c8ebb2c91188$var$Dropdown._globalListenersAttached=!0)}destroy(){"u">typeof document&&this._initialized&&(this._cleanup(),this._initialized=!1)}}$3134c8ebb2c91188$var$Dropdown._globalListenersAttached=!1;let $3134c8ebb2c91188$export$81207e5cc4186890=new $3134c8ebb2c91188$var$Dropdown;var $ehsFN=parcelRequire("ehsFN");class $fa742adec1b07386$var$Autocomplete{emptyStateHtml='<li><span class="op4">Ничего не найдено</span></li>';defaultStateHtml='<li><span class="op4">Начните печатать</span></li>';loadingStateHtml='<li><span class="op4">Загрузка...</span></li>';constructor(){this._clicked=!1,this._currentLoadId=0,this._loadData=this._loadData.bind(this),this._keyHandler=this._keyHandler.bind(this),this._clickHandler=this._clickHandler.bind(this),this._hideHandler=this._hideHandler.bind(this)}init(e,t={}){"u"<typeof window||!e||"string"!=typeof e||(this.emptyStateHtml=t.emptyStateHtml??this.emptyStateHtml,this.defaultStateHtml=t.defaultStateHtml??this.defaultStateHtml,this.loadingStateHtml=t.loadingStateHtml??this.loadingStateHtml,this.dropdown=$ehsFN.lib.id(e),!this.dropdown||(this.field=$ehsFN.lib.qs("[x-dropdown-open]",this.dropdown),this.list=$ehsFN.lib.qs("[x-dropdown]",this.dropdown),this.field&&this.list&&(this.data=t.data??null,this.loadData=t.loadData??null,this.mapData=t.mapData??null,this.renderItem=t.renderItem??null,this.onSelect=t.onSelect??null,this.resetFunc=t.resetFunc??null,this.debouncedLoadData=$ehsFN.lib.debounce(this._loadData,400),this.field.value.trim()?this._defaultState():this._reset(),this.field.addEventListener("focus",this.debouncedLoadData),this.field.addEventListener("input",this.debouncedLoadData),this.field.addEventListener("keydown",this._keyHandler),this.list.addEventListener("click",this._clickHandler),this.dropdown.addEventListener("dropdown:afterhide",this._hideHandler))))}destroy(){"u"<typeof window||this.field&&this.list&&this.dropdown&&(this._reset(),this.field.removeEventListener("focus",this.debouncedLoadData),this.field.removeEventListener("input",this.debouncedLoadData),this.field.removeEventListener("keydown",this._keyHandler),this.list.removeEventListener("click",this._clickHandler),this.dropdown.removeEventListener("dropdown:afterhide",this._hideHandler))}_keyHandler(e){"Enter"===e.key&&(e.preventDefault(),this.field?.blur())}_clickHandler(e){if(this._clicked)return;this._clicked=!0;let t=e.target.closest("[data-item]");if(!t||!this.onSelect)return void setTimeout(()=>{this._clicked=!1},0);try{let e=JSON.parse(t.dataset.item);this.onSelect(e)}catch(e){console.error("Autocomplete: error parsing data-item JSON",e)}setTimeout(()=>{this._clicked=!1},0)}_hideHandler(){if(this._clicked){this._clicked=!1;return}this.data?.length&&this.onSelect?(this._loadingState(),this.onSelect(this.data[0])):this._reset()}_loadingState(){$ehsFN.lib.render(this.list,this.loadingStateHtml)}_emptyState(){$ehsFN.lib.render(this.list,this.emptyStateHtml)}_defaultState(){$ehsFN.lib.render(this.list,this.defaultStateHtml)}_reset(){this.resetFunc&&this.resetFunc(),this.data=null,this._defaultState()}async _loadData(){if(!this.field||!this.field.value.trim())return void this._reset();if(!this.loadData)return void this._defaultState();this._loadingState();let e=Date.now();this._currentLoadId=e;try{let t=await this.loadData(this);if(e!==this._currentLoadId)return;this.data=this.mapData?this.mapData(t):t,this.render()}catch(t){e===this._currentLoadId&&this._reset(),console.error("Autocomplete: load error",t)}}render(){if(!this.data)return void this._reset();if(!this.data.length)return void this._emptyState();if(!this.renderItem)return void this._defaultState();let e=this.data.map(this.renderItem).join("");$ehsFN.lib.render(this.list,e)}}let $fa742adec1b07386$export$485ded5f26ebe08d=new $fa742adec1b07386$var$Autocomplete;var $ehsFN=parcelRequire("ehsFN");class $ef55f167e58e504d$var$Scroll{constructor(){this.parent=window,this.offset=0,this.classActive="active",this.hash=!1,this.to=this.scrollTo,this._linksHash={},this._scrollHandlers=new Map,this._initialized=!1}_isValidSelector(e){return!("string"!=typeof e||!e||/<script|javascript:/i.test(e))&&/^[#.a-zA-Z0-9_\-\[\]="':\s>+~,()]+$/.test(e)}init(){this._initialized&&this.destroy();let e=$ehsFN.lib.qsa("[x-scrollto]");if(e.length){for(let t of(this._linksHash={},e))if(t)try{let e=t.getAttribute("x-scrollto");if(!e){console.warn("scroll.init: Link has x-scrollto attribute but no value",t);continue}let i={};if($ehsFN.lib.isValidJSON(e)){let s=JSON.parse(e);if(!s||"object"!=typeof s){console.error("scroll.init: Invalid JSON object:",s);continue}let n=s.target;if(!n){console.error("scroll.init: Target required in JSON:",s);continue}if("string"!=typeof n||!this._isValidSelector(n)){console.error("scroll.init: Invalid or unsafe selector:",n);continue}let r=$ehsFN.lib.qs(n);if(!r){console.error("scroll.init: Target element not found:",n);continue}i.link=t,i.target=r,i.offset="number"==typeof s.offset?s.offset:this.offset,i.classActive=s.classActive||this.classActive,i.hash=s.hash??this.hash,s.parent?"string"==typeof s.parent?this._isValidSelector(s.parent)?i.parent=$ehsFN.lib.qs(s.parent)||this.parent:(console.error("scroll.init: Invalid parent selector:",s.parent),i.parent=this.parent):s.parent instanceof HTMLElement||s.parent===window?i.parent=s.parent:i.parent=this.parent:i.parent=this.parent}else{if(!this._isValidSelector(e)){console.error("scroll.init: Invalid or unsafe selector:",e);continue}let s=$ehsFN.lib.qs(e);if(!s){console.error("scroll.init: Target not found:",e);continue}i.link=t,i.parent=this.parent,i.target=s,i.offset=this.offset,i.classActive=this.classActive,i.hash=this.hash}if(i.link&&i.target){let e=$ehsFN.lib.makeId();if(!e){console.error("scroll.init: Failed to generate ID");continue}this._linksHash[e]=i,t.addEventListener("click",e=>{e.preventDefault(),this.scrollTo({parent:i.parent,target:i.target,offset:i.offset,classActive:i.classActive,hash:i.hash})})}}catch(e){console.error("scroll.init: Error processing link",t,e)}Object.keys(this._linksHash).length&&this._setupScrollObservers(),this._initialized=!0}}destroy(){for(let[e,t]of this._scrollHandlers.entries())e.removeEventListener("scroll",t);this._scrollHandlers.clear(),this._linksHash={},this._initialized=!1}_isValidId(e){return"string"==typeof e&&!!e&&/^[a-zA-Z0-9_-]+$/.test(e)}async scrollTo(e){return new Promise(t=>{let i,s,n,r,o,l,a,d;if(!e){console.error("scroll.scrollTo: Parameters required"),t();return}if(e instanceof HTMLElement)i=e,s=this.parent,n=this.offset,r=this.hash;else if("string"==typeof e){if(!this._isValidSelector(e)){console.error("scroll.scrollTo: Invalid or unsafe selector:",e),t();return}i=$ehsFN.lib.qs(e),s=this.parent,n=this.offset,r=this.hash}else if("object"==typeof e){if(e.target instanceof HTMLElement)i=e.target;else if("string"==typeof e.target){if(!this._isValidSelector(e.target)){console.error("scroll.scrollTo: Invalid or unsafe target selector:",e.target),t();return}i=$ehsFN.lib.qs(e.target)}else{console.error("scroll.scrollTo: Invalid target parameter:",e.target),t();return}e.parent===window||e.parent instanceof HTMLElement?s=e.parent:"string"==typeof e.parent?this._isValidSelector(e.parent)?s=$ehsFN.lib.qs(e.parent)||this.parent:(console.error("scroll.scrollTo: Invalid or unsafe parent selector:",e.parent),s=this.parent):s=this.parent,n="number"==typeof e.offset?e.offset:this.offset,r=e.hash??this.hash}else{console.error("scroll.scrollTo: Invalid parameters:",e),t();return}if(!i){console.error("scroll.scrollTo: Target not found:",e),t();return}if(!s){console.error("scroll.scrollTo: Parent not found"),t();return}try{s===window?d=(o=(l=window.pageYOffset||window.scrollY)+i.getBoundingClientRect().top)-l-n:(l=s.scrollTop,a=s.getBoundingClientRect().top,d=(o=l+i.getBoundingClientRect().top-a)-l-n),s.scrollTo({top:Math.max(0,l+d),left:0,behavior:"smooth"}),setTimeout(t,400),r&&i.id?this._isValidId(i.id)?$ehsFN.lib.updateURL("#"+i.id):console.warn("scroll.scrollTo: Invalid target ID for hash:",i.id):r&&history.replaceState({},document.title,window.location.href.split("#")[0])}catch(e){console.error("scroll.scrollTo: Error during scroll",e),t()}})}_setupScrollObservers(){let e=new Set;for(let t in this._linksHash)e.add(this._linksHash[t].parent);for(let t of e){let e=t===window?window:$ehsFN.lib.qs(t);if(!e)continue;let i=()=>{this._scrollObserve()};e.addEventListener("scroll",i,{passive:!0}),this._scrollHandlers.set(e,i)}this._scrollObserve()}_scrollObserve(){let e=document.documentElement.clientHeight/4;for(let t in this._linksHash){if(!this._linksHash.hasOwnProperty(t))continue;let i=this._linksHash[t];if(i&&i.target&&i.link)try{let t=i.target.getBoundingClientRect(),s=t.top<=e&&t.bottom>e;null!=i.classActive&&(s?(i.link.classList.contains(i.classActive)||i.link.classList.add(i.classActive),i.target.classList.contains(i.classActive)||i.target.classList.add(i.classActive)):(i.link.classList.contains(i.classActive)&&i.link.classList.remove(i.classActive),i.target.classList.contains(i.classActive)&&i.target.classList.remove(i.classActive)))}catch(e){console.error("scroll._scrollObserve: Error observing item",t,e)}}}}let $ef55f167e58e504d$export$209876d7b1ac8f3=new $ef55f167e58e504d$var$Scroll;var $ehsFN=parcelRequire("ehsFN");class $10665505e2eb0736$export$70dd375dd4457bf8{constructor(){this._initialized=!1,this._boundEnter=this._handleEnter.bind(this),this._boundLeave=this._handleLeave.bind(this)}init(){"u">typeof document&&!this._initialized&&(this._initialized=!0,document.addEventListener("mouseenter",this._boundEnter,!0),document.addEventListener("mouseleave",this._boundLeave,!0))}destroy(){"u">typeof document&&this._initialized&&(document.removeEventListener("mouseenter",this._boundEnter,!0),document.removeEventListener("mouseleave",this._boundLeave,!0),this._initialized=!1)}_handleEnter(e){this._syncHover(e,!0)}_handleLeave(e){this._syncHover(e,!1)}_syncHover(e,t){let i=e?.target;if(!i||"function"!=typeof i.closest)return;let s=i.closest("[x-hover]");if(!s)return;let n=s.getAttribute("href");if(null!=n&&""!==n.trim()&&"u">typeof CSS&&"function"==typeof CSS.escape)try{let e=CSS.escape(n),i=$ehsFN.lib.qsa(`[x-hover][href="${e}"]`);for(let e=0;e<i.length;e++)i[e].classList.toggle("hover",t)}catch(e){}}}let $10665505e2eb0736$export$3f60957f5dbf3876=new $10665505e2eb0736$export$70dd375dd4457bf8;var $ehsFN=parcelRequire("ehsFN");let $69dd4358dca59ad6$var$CLASSES_TO_REMOVE=["js","windows","macos","ios","android","linux","unknown","chrome","firefox","safari","opera","edge","iphone","ipad","mac","computer","mobile","desktop","touch"],$69dd4358dca59ad6$var$SIZE_FLAGS={xs:{xs:!0,s:!1,m:!1,l:!1,xl:!1},s:{xs:!1,s:!0,m:!1,l:!1,xl:!1},m:{xs:!1,s:!1,m:!0,l:!1,xl:!1},l:{xs:!1,s:!1,m:!1,l:!0,xl:!1},xl:{xs:!1,s:!1,m:!1,l:!1,xl:!0}};class $69dd4358dca59ad6$export$8215d14a63d9fb10{constructor(){if(this.js=!0,this.os="unknown",this.browser="unknown",this.device=null,this.mobile=!1,this.touch=!1,this.width=0,this.height=0,this.breakpoint="xs",this.size=$69dd4358dca59ad6$var$SIZE_FLAGS.xs,this._html=null,this._onResize=this._onResize.bind(this),this._debouncedResize=$ehsFN.lib.debounce(this._onResize,200),this._initialized=!1,"u"<typeof window)return;this.width=window.innerWidth,this.height=window.innerHeight,this.breakpoint=this._getBreakpointName(this.width),this.size=$69dd4358dca59ad6$var$SIZE_FLAGS[this.breakpoint]||$69dd4358dca59ad6$var$SIZE_FLAGS.xs,this._html=document.documentElement}init(){"u">typeof window&&(this._initialized&&this._cleanup(),this._html=document.documentElement,this._detect(),this._applyHtmlClasses(),window.addEventListener("resize",this._debouncedResize),this._initialized=!0)}destroy(){"u">typeof window&&this._cleanup()}_cleanup(){window.removeEventListener("resize",this._debouncedResize),this._html&&this._html.classList.remove(...$69dd4358dca59ad6$var$CLASSES_TO_REMOVE),this._initialized=!1}_getBreakpointName(e){return e>=1280?"xl":e>=1024?"l":e>=768?"m":e>=640?"s":"xs"}_getSizeFlags(e){return $69dd4358dca59ad6$var$SIZE_FLAGS[e]||$69dd4358dca59ad6$var$SIZE_FLAGS.xs}_onResize(){let e=window.innerWidth,t=window.innerHeight,i=this.breakpoint,s=this._getBreakpointName(e);this.width=e,this.height=t,this.breakpoint=s,this.size=$69dd4358dca59ad6$var$SIZE_FLAGS[s]||$69dd4358dca59ad6$var$SIZE_FLAGS.xs,i!==s&&window.dispatchEvent(new CustomEvent("breakpointchange",{detail:{prev:i,current:s,width:e,height:t}}))}_detect(){let e=window.navigator.userAgent.toLowerCase();this.mobile=/mobile/.test(e),e.includes("win")?this.os="windows":e.includes("iphone")||e.includes("ipad")||e.includes("ipod")?this.os="ios":e.includes("android")?this.os="android":e.includes("mac")?this.os="macos":e.includes("linux")?this.os="linux":this.os="unknown",/edg\//.test(e)?this.browser="edge":/opr\//.test(e)||/opera/.test(e)?this.browser="opera":/firefox/.test(e)?this.browser="firefox":/chrome/.test(e)?this.browser="chrome":/safari/.test(e)?this.browser="safari":this.browser="unknown",e.includes("ipad")?this.device="ipad":e.includes("iphone")?this.device="iphone":e.includes("android")?this.device="android":e.includes("mac")?this.device="mac":this.device="computer",this.touch=window.matchMedia?.("(pointer: coarse)").matches??!1}_applyHtmlClasses(){if(!this._html)return;let e=["js",this.os,this.browser,this.device,this.mobile?"mobile":"desktop",this.touch?"touch":null].filter(Boolean);this._html.classList.add(...e)}}let $69dd4358dca59ad6$export$91cea577896d70d9=new $69dd4358dca59ad6$export$8215d14a63d9fb10;var $ehsFN=parcelRequire("ehsFN"),$ehsFN=parcelRequire("ehsFN");class $fb9ec3799c0f5369$var$Form{constructor(){this._updateElements=new Set,this._updateHandlers=new Map,this.listen=Object.freeze({update:this._updateElements})}getEventType(e){if(!e)throw Error("getEventType: Element is required");if(e.isContentEditable)return"input";let t=e.tagName?.toLowerCase();if(!t)throw Error("getEventType: Element has no tagName");if("input"===t||"textarea"===t)return"input";if("select"===t)return"change";throw Error(`getEventType: Unsupported element <${t}>`)}_eventType(e){if(!e)return"";if(e.isContentEditable)return"input";let t=e.tagName?.toLowerCase();return"input"===t||"textarea"===t?"input":"select"===t?"change":""}setChecked(e,t=!1){if("u"<typeof document||!e)return;let i=$ehsFN.lib.qsa(e);for(let e=0;e<i.length;e++){let s=i[e],n=s.type;("checkbox"===n||"radio"===n)&&s.checked!==t&&(s.checked=t,s.dispatchEvent(new Event("input",{bubbles:!0})))}}setValue(e,t){if("u"<typeof document||!e)return;let i=$ehsFN.lib.qsa(e),s=String(t);for(let e=0;e<i.length;e++){let n=i[e],r="";try{if(n.isContentEditable)n.innerText=s,r="input";else{let e=n.tagName?.toLowerCase();if(!e)continue;let i=n.type;if("input"===e)"checkbox"===i||"radio"===i?n.checked=!!t:n.value=s,r="input";else{if("textarea"!==e&&"select"!==e)continue;n.value=s,r="select"===e?"change":"input"}}r&&n.dispatchEvent(new Event(r,{bubbles:!0}))}catch(e){"u">typeof console&&console.error&&console.error("setValue",n,e)}}}onUpdate(e,t){if("u"<typeof document||!e||"function"!=typeof t)return;let i=$ehsFN.lib.qsa(e);for(let e=0;e<i.length;e++){let s=i[e];if(this._updateHandlers.has(s))continue;let n=this._eventType(s);if(!n)continue;let r=()=>t(s);s.addEventListener(n,r),this._updateHandlers.set(s,{eventType:n,handler:r}),this._updateElements.add(s)}}offUpdate(e){if("u"<typeof document||!e)return;let t=$ehsFN.lib.qsa(e);for(let e=0;e<t.length;e++){let i=t[e],s=this._updateHandlers.get(i);s&&(i.removeEventListener(s.eventType,s.handler),this._updateHandlers.delete(i),this._updateElements.delete(i))}}update(e){if("u"<typeof document||!e)return;let t=$ehsFN.lib.qsa(e);for(let e=0;e<t.length;e++){let i=t[e],s=this._eventType(i);s&&i.dispatchEvent(new Event(s,{bubbles:!0}))}}destroy(){"u">typeof document&&(this._updateHandlers.forEach((e,t)=>{t.removeEventListener(e.eventType,e.handler)}),this._updateHandlers.clear(),this._updateElements.clear())}}let $fb9ec3799c0f5369$export$6210fa4921d2a466=new $fb9ec3799c0f5369$var$Form;var $ehsFN=parcelRequire("ehsFN");class $a1e3f49e5a065fbf$var$Sticky{constructor(){this.activeClass="sticky_on",this.rootMargin="-1px 0px 0px 0px",this._observer=null,this._initialized=!1,this._initObserver()}_initObserver(){"IntersectionObserver"in window?this._observer=new IntersectionObserver(e=>{for(let t of e)t&&t.target&&this._handleEntry(t)},{threshold:1,rootMargin:this.rootMargin}):console.warn("sticky: IntersectionObserver is not supported")}_handleEntry(e){if(!e||!e.target)return;let t=e.target;if(!(t instanceof HTMLElement))return;let i=e.intersectionRatio<1;i!==t.classList.contains(this.activeClass)&&(i?(t.classList.add(this.activeClass),t.dispatchEvent(new CustomEvent("sticky:on",{bubbles:!0}))):(t.classList.remove(this.activeClass),t.dispatchEvent(new CustomEvent("sticky:off",{bubbles:!0}))))}init(){if(!this._observer)return void console.warn("sticky.init: IntersectionObserver is not available");for(let e of(this._initialized&&this.reset(),$ehsFN.lib.qsa(".sticky")))if(e&&e instanceof HTMLElement&&!e.dataset.stickyObserved)try{this._observer.observe(e),e.dataset.stickyObserved="true"}catch(t){console.error("sticky.init: Error observing element",e,t)}this._initialized=!0}reset(){if(this._observer){for(let e of $ehsFN.lib.qsa(".sticky"))if(e&&e instanceof HTMLElement&&e.dataset.stickyObserved)try{document.body.contains(e)&&this._observer.unobserve(e),delete e.dataset.stickyObserved}catch(t){console.error("sticky.reset: Error unobserving element",e,t),delete e.dataset.stickyObserved}}}destroy(){this._observer&&(this._observer.disconnect(),this._observer=null),this._initialized=!1}}let $a1e3f49e5a065fbf$export$4bd4b47501432316=new $a1e3f49e5a065fbf$var$Sticky;var $ehsFN=parcelRequire("ehsFN");class $a4da403316380ec6$export$472062a354075cee{constructor(){this.sliders=[],this.instances=new Map,this.io=null,this.mo=null}init(){(this.observeSliders(),"MutationObserver"in window)?(this.mo=new MutationObserver(e=>{for(let t of e)for(let e of t.addedNodes)if(1===e.nodeType&&e instanceof HTMLElement){e.hasAttribute("x-slider")&&this.io&&this.io.observe(e);let t=e.querySelectorAll?.("[x-slider]");if(t&&this.io)for(let e of t)e&&!this.instances.has(e)&&this.io.observe(e)}}),this.mo.observe(document.body,{childList:!0,subtree:!0})):console.warn("slider: MutationObserver is not supported")}destroy(){this.instances.forEach((e,t)=>{let i=e.listenerTarget||e.wrapper||t;e.touch?(i.removeEventListener("touchstart",e.events.touchstart,!0),i.removeEventListener("touchmove",e.events.touchmove,!0),i.removeEventListener("touchend",e.events.touchend,!0),i.removeEventListener("touchcancel",e.events.touchcancel,!0)):(t.removeEventListener("mousemove",e.events.mousemove),e.events.mouseout&&t.removeEventListener("mouseleave",e.events.mouseout),e.events.mouseenter&&t.removeEventListener("mouseenter",e.events.mouseenter),e.events.resize&&(window.removeEventListener("resize",e.events.resize),window.removeEventListener("orientationchange",e.events.resize)))}),this.io&&this.io.disconnect(),this.mo&&this.mo.disconnect(),this.instances.clear()}observeSliders(){if(!("IntersectionObserver"in window))return void console.warn("slider: IntersectionObserver is not supported");for(let e of(this.sliders=document.querySelectorAll("[x-slider]"),this.io=new IntersectionObserver(e=>{for(let t of e)t.isIntersecting&&t.target&&!this.instances.has(t.target)&&this.initSlider(t.target)},{rootMargin:"60px 0px 60px 0px",threshold:0}),this.sliders))e&&this.io.observe(e)}_validateConfig(e){let t={gap:0,rubber:!0,resetOnMouseout:!0,touch:!0};if(!e||"object"!=typeof e)return t;if("gap"in e){let i=Number(e.gap);t.gap=isNaN(i)||i<0?0:i}return"rubber"in e&&(t.rubber=!!e.rubber),"resetOnMouseout"in e&&(t.resetOnMouseout=!!e.resetOnMouseout),"touch"in e&&(t.touch=!!e.touch),t}initSlider(e){if(!e||!(e instanceof HTMLElement))return void console.error("slider.initSlider: Invalid element");let t=[...e.children].map(e=>e.cloneNode(!0));if(!t.length)return void console.warn("slider.initSlider: No slides found",e);e.classList.add("slider"),e.style.overflow="hidden",e.style.overscrollBehavior="contain";let i=0,s=!0,n=!0,r=!0;try{let t=e.getAttribute("x-slider");if(t)if($ehsFN.lib.isValidJSON(t)){let e=JSON.parse(t),o=this._validateConfig(e);i=o.gap,s=o.rubber,n=o.resetOnMouseout,r=o.touch}else console.warn("slider.initSlider: Invalid JSON in x-slider attribute:",t)}catch(e){console.warn("slider.initSlider: Error parsing x-slider JSON",e)}let o=document.createElement("div");o.className="slider-wrapper",o.style.gap=i+"px",e.innerHTML="";for(let e=0;e<t.length;e++){let i=t[e];if(!i)continue;i.classList.add("slider-item");let s=i.querySelector("img");s&&0===e&&(s.dataset.srcset&&(s.srcset=s.dataset.srcset,s.removeAttribute("data-srcset")),s.dataset.src&&(s.src=s.dataset.src,s.removeAttribute("data-src")),s.setAttribute("loading","eager")),o.appendChild(i)}e.appendChild(o);let l="ontouchstart"in window,a=[];if(t.length>1&&(!l||r)){let i=document.createElement("div");i.className="slider-indicators";for(let e=0;e<t.length;e++){let t=document.createElement("span");0===e&&t.classList.add("active"),i.appendChild(t)}e.appendChild(i),a=[...i.querySelectorAll("span")]}let d=t;if(l&&r?e.classList.add("slider_touch"):e.classList.remove("slider_touch"),l&&!r)return void d[0].classList.add("active");let c=0,h=/iP(ad|hone|od)/.test(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document,u=()=>d[0].offsetWidth+i,p=(e,t=!1)=>{let i=Math.max(0,Math.min(e,d.length-1)),s=u();if(c=i,o.style.transition=t?"none":"transform 0.25s",o.style.transform=`translateX(${-c*s}px)`,a.length)for(let e=0;e<a.length;e++){let t=a[e];t&&t.classList.toggle("active",e===c)}t||o.addEventListener("transitionend",()=>{o.style.transition="none",h&&(o.style.pointerEvents="none",requestAnimationFrame(()=>{o.offsetWidth,o.style.pointerEvents="auto"}))},{once:!0})};p(0,!0);let f={},m=!1,v=null,_=()=>{if(!m){m=!0;for(let t=0;t<d.length;t++){let i=d[t];if(!i)continue;let s=i.querySelector("img");s&&0!==t&&(s.dataset.srcset&&(s.srcset=s.dataset.srcset,s.removeAttribute("data-srcset")),s.dataset.src&&(s.src=s.dataset.src,s.removeAttribute("data-src")),l||s.complete&&0!==s.naturalWidth||s.addEventListener("load",()=>{if(null!=v){let i=e.getBoundingClientRect(),s=e.offsetWidth;s>0&&Math.floor((v-i.left)/s*d.length)===t&&p(t,!0)}},{once:!0}))}}};if(d.length>1)if(l){let t=0,i=0,n=!1,r=null,l=(e,t)=>[...e].find(e=>e.identifier===t)||null,a=()=>{_(),e.removeEventListener("touchstart",a)};e.addEventListener("touchstart",a,{passive:!1,capture:!0}),f.touchstart=e=>{let s=e.changedTouches[0];r=s.identifier,t=s.clientX,i=s.clientY,n=!0,o.style.transition="none"},f.touchmove=e=>{if(!n||null==r)return;let a=l(e.touches,r);if(!a)return;let h=a.clientX-t;if(Math.abs(a.clientY-i)>Math.abs(h))return;e.cancelable&&e.preventDefault();let p=u(),f=h;0===c&&h>0&&(f=s?.15*h:0),c===d.length-1&&h<0&&(f=s?.15*h:0),o.style.transform=`translateX(${-c*p+f}px)`},f.touchend=e=>{if(!n)return;n=!1;let s=l(e.changedTouches,r)||e.changedTouches[0];r=null;let o=s.clientX-t,a=s.clientY-i,h=.1*u();Math.abs(a)>Math.abs(o)||0===c&&o>0||c===d.length-1&&o<0?p(c):o>h&&c>0?p(c-1):o<-h&&c<d.length-1?p(c+1):p(c)},f.touchcancel=()=>{n=!1,r=null,p(c)},e.addEventListener("touchstart",f.touchstart,{passive:!1,capture:!0}),e.addEventListener("touchmove",f.touchmove,{passive:!1,capture:!0}),e.addEventListener("touchend",f.touchend,{capture:!0}),e.addEventListener("touchcancel",f.touchcancel,{capture:!0})}else{let t=i=>{v=i.clientX,_(),e.removeEventListener("mouseenter",t)};e.addEventListener("mouseenter",t),f.mousemove=t=>{v=t.clientX;let i=e.getBoundingClientRect(),s=e.offsetWidth;if(s<=0)return;let n=t.clientX-i.left;n<0?n=0:n>=s&&(n=s-1e-7);let r=Math.floor(n/s*d.length),o=d[r].querySelector("img");r!==c&&(!o||o.complete||o.naturalWidth>0)&&p(r,!0)},e.addEventListener("mousemove",f.mousemove),e.addEventListener("mouseenter",e=>f.mousemove(e)),n&&(f.mouseout=()=>p(0,!0),e.addEventListener("mouseleave",f.mouseout))}let b=()=>{let e=u();o.style.transition="none",o.style.transform=`translateX(${-c*e}px)`};window.addEventListener("resize",b),window.addEventListener("orientationchange",b),f.resize=b,this.instances.set(e,{wrapper:o,slides:d,events:f,touch:l,listenerTarget:e})}}let $a4da403316380ec6$export$b38bf4f33e9e4c25=new $a4da403316380ec6$export$472062a354075cee;class $51d4db7ad7265979$var$Typograf{#e=["code","pre","script","style"];#t={"1/2":"½","1/3":"⅓","1/4":"¼","1/5":"⅕","1/6":"⅙","1/7":"⅐","1/8":"⅛","1/9":"⅑","1/10":"⅒","2/3":"⅔","2/5":"⅖","3/4":"¾","3/5":"⅗","3/8":"⅜","4/5":"⅘","5/6":"⅚","5/8":"⅝","7/8":"⅞"};#i={0:"⁰",1:"¹",2:"²",3:"³",4:"⁴",5:"⁵",6:"⁶",7:"⁷",8:"⁸",9:"⁹","+":"⁺","-":"⁻","=":"⁼","(":"⁽",")":"⁾",o:"°",о:"°"};#s(e){let t=e;return(t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace(/\.{3}/g,"…")).replace(/\(c\)|\(с\)/gi,"©").replace(/\(r\)/gi,"®").replace(/\(tm\)/gi,"™").replace(/\(р\)/gi,"₽")).replace(/\b([0-9]+\/(?:[0-9]+|10))\b/g,e=>this.#t[e]||e)).replace(/(\S)\^([0-9+\-=\(\)oо])/g,(e,t,i)=>t+(this.#i[i]||i))).replace(/(?<=\d)-(?=\d)/g,"−")).replace(/(^|\s)-(\s)/g,"$1—$2").replace(/\s+—/g," —")).replace(/(^|\s)(г|ул|д|стр|кв|пл|пер|пр|ш|мкр)\s+(?=\S)/gi,"$1$2 ")).replace(/(^|[ \t])([A-Za-zА-Яа-яЁё0-9]{1,3})[ \t]+(?=\S)/g,"$1$2 ")).replace(/\s+(же?|л[иь]|бы?)(?=[\s.,!?;:])/gi," $1")).replace(/"(?=\S)/g,"«").replace(/(?<=\S)"/g,"»")}process(e){let t=[],i=/(<\/?([a-z0-9]+)[^>]*>)|([^<]+)/gi;return e.replace(i,(e,i,s,n)=>{if(i){let e=s?s.toLowerCase():"";return this.#e.includes(e)&&(i.startsWith("</")?t.pop():i.endsWith("/>")||t.push(e)),i}return t.length>0?n:this.#s(n)})}live(e=".typograf",t=".typograf-live",i=document){i.querySelectorAll(e).forEach(e=>{e.isContentEditable?e.innerHTML=this.process(e.innerHTML):e.textContent=this.process(e.textContent)}),i.addEventListener("input",e=>{let i=e.target;if(i.matches(t)&&!i.disabled&&!i.readOnly){if("TEXTAREA"===i.tagName||"INPUT"===i.tagName&&"text"===i.type){let e=i.selectionStart,t=i.selectionEnd,s=this.process(i.value);s!==i.value&&(i.value=s,i.setSelectionRange(e,t))}else if(i.isContentEditable){let e=window.getSelection(),t=e.rangeCount>0?e.getRangeAt(0).cloneRange():null,s=this.process(i.innerHTML);s!==i.innerHTML&&(i.innerHTML=s,t&&this.#n(i,t))}}})}#n(e,t){let i=window.getSelection();i.removeAllRanges();let s=document.createRange(),n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,null),r,o=0,l=null,a=null,d=t.startOffset,c=t.endOffset,h=!1;for(;r=n.nextNode();){if(!h&&o+r.length>=d&&(l=r,d-=o,h=!0),o+r.length>=c){a=r,c-=o;break}o+=r.length}l&&a?(s.setStart(l,Math.max(0,d)),s.setEnd(a,Math.max(0,c))):(s.selectNodeContents(e),s.collapse(!1)),i.addRange(s)}}let $51d4db7ad7265979$export$e217ae22b037a1a9=new $51d4db7ad7265979$var$Typograf;class $e5904712fb6120b1$var$X{constructor(){this.modal=$fb3cb004b28f41eb$export$96e4b36520c26a2c,this.animate=$014037f76a5c216c$export$e3607ec2d7a891c4,this.appear=$eb3d55ecca7ee7d2$export$fb1b4b0e602f43f1,this.lazyload=$45256965eb1aa1f4$export$c3e8f8508bab224b,this.loadmore=$c188f7d5f390f2f6$export$6456520619f548d5,this.sheets=$8f6aab8d3dab3eed$export$d1f2fc3a3d47c5af,this.dropdown=$3134c8ebb2c91188$export$81207e5cc4186890,this.autocomplete=$fa742adec1b07386$export$485ded5f26ebe08d,this.scroll=$ef55f167e58e504d$export$209876d7b1ac8f3,this.hover=$10665505e2eb0736$export$3f60957f5dbf3876,this.device=$69dd4358dca59ad6$export$91cea577896d70d9,this.lib=$ehsFN.lib,this.render=$ehsFN.lib.render.bind($ehsFN.lib),this.form=$fb9ec3799c0f5369$export$6210fa4921d2a466,this.sticky=$a1e3f49e5a065fbf$export$4bd4b47501432316,this.slider=$a4da403316380ec6$export$b38bf4f33e9e4c25,this.typograf=$51d4db7ad7265979$export$e217ae22b037a1a9,this.initialized=!1}init(){this.initialized||(this.device.init(),this.modal.init(),this.animate.init(),this.appear.init(),this.lazyload.init(),this.loadmore.init(),this.sheets.init(),this.dropdown.init(),this.scroll.init(),this.sticky.init(),this.slider.init(),this.typograf.init(),$10665505e2eb0736$export$3f60957f5dbf3876.init(),this.initialized=!0)}}let $e5904712fb6120b1$var$x=new $e5904712fb6120b1$var$X;window.x=$e5904712fb6120b1$var$x,window.x.id=$e5904712fb6120b1$var$x.lib.id,window.x.qs=$e5904712fb6120b1$var$x.lib.qs,window.x.qsa=$e5904712fb6120b1$var$x.lib.qsa;
|
package/index.html
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"functionName": "headerAnimation"
|
|
20
20
|
}'>
|
|
21
21
|
<header class="header flex aic sticky t0 px5 m:px6 l:px8 unselectable">
|
|
22
|
-
<div class="header-version nowrap">0.5.
|
|
22
|
+
<div class="header-version nowrap">0.5.17</div>
|
|
23
23
|
<div class="header-logo mxa">
|
|
24
24
|
<a role="button" x-scrollto="#top">
|
|
25
25
|
<img src="assets/img/logo.png" alt="x" />
|
package/package.json
CHANGED
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
//
|
|
2
|
+
// typograf.js
|
|
3
|
+
// Типограф
|
|
4
|
+
//
|
|
5
|
+
// Created by Andrey Shpigunov at 24.04.2026
|
|
6
|
+
// All right reserved.
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class Typograf {
|
|
11
|
+
#skipTags = ['code', 'pre', 'script', 'style'];
|
|
12
|
+
|
|
13
|
+
#decimal = {
|
|
14
|
+
'1/2': '½',
|
|
15
|
+
'1/3': '⅓',
|
|
16
|
+
'1/4': '¼',
|
|
17
|
+
'1/5': '⅕',
|
|
18
|
+
'1/6': '⅙',
|
|
19
|
+
'1/7': '⅐',
|
|
20
|
+
'1/8': '⅛',
|
|
21
|
+
'1/9': '⅑',
|
|
22
|
+
'1/10': '⅒',
|
|
23
|
+
'2/3': '⅔',
|
|
24
|
+
'2/5': '⅖',
|
|
25
|
+
'3/4': '¾',
|
|
26
|
+
'3/5': '⅗',
|
|
27
|
+
'3/8': '⅜',
|
|
28
|
+
'4/5': '⅘',
|
|
29
|
+
'5/6': '⅚',
|
|
30
|
+
'5/8': '⅝',
|
|
31
|
+
'7/8': '⅞'
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
#superscript = {
|
|
35
|
+
'0': '⁰',
|
|
36
|
+
'1': '¹',
|
|
37
|
+
'2': '²',
|
|
38
|
+
'3': '³',
|
|
39
|
+
'4': '⁴',
|
|
40
|
+
'5': '⁵',
|
|
41
|
+
'6': '⁶',
|
|
42
|
+
'7': '⁷',
|
|
43
|
+
'8': '⁸',
|
|
44
|
+
'9': '⁹',
|
|
45
|
+
'+': '⁺',
|
|
46
|
+
'-': '⁻',
|
|
47
|
+
'=': '⁼',
|
|
48
|
+
'(': '⁽',
|
|
49
|
+
')': '⁾',
|
|
50
|
+
'o': '°',
|
|
51
|
+
'о': '°'
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
#processText(text) {
|
|
55
|
+
let t = text;
|
|
56
|
+
|
|
57
|
+
// Ellipsis
|
|
58
|
+
t = t.replace(/\.{3}/g, '…');
|
|
59
|
+
|
|
60
|
+
// Special symbols
|
|
61
|
+
t = t.replace(/\(c\)|\(с\)/gi, '©')
|
|
62
|
+
.replace(/\(r\)/gi, '®')
|
|
63
|
+
.replace(/\(tm\)/gi, '™')
|
|
64
|
+
.replace(/\(р\)/gi, '₽');
|
|
65
|
+
|
|
66
|
+
// Fractions
|
|
67
|
+
t = t.replace(/\b([0-9]+\/(?:[0-9]+|10))\b/g, (m) => this.#decimal[m] || m);
|
|
68
|
+
|
|
69
|
+
// Superscripts
|
|
70
|
+
t = t.replace(/(\S)\^([0-9+\-=\(\)oо])/g, (m, base, exp) => base + (this.#superscript[exp] || exp));
|
|
71
|
+
|
|
72
|
+
// Minus in numbers
|
|
73
|
+
t = t.replace(/(?<=\d)-(?=\d)/g, '−');
|
|
74
|
+
|
|
75
|
+
// Em dash with NBSP
|
|
76
|
+
t = t.replace(/(^|\s)-(\s)/g, '$1—$2')
|
|
77
|
+
.replace(/\s+—/g, '\u00A0—');
|
|
78
|
+
|
|
79
|
+
// NBSP for addresses
|
|
80
|
+
t = t.replace(
|
|
81
|
+
/(^|\s)(г|ул|д|стр|кв|пл|пер|пр|ш|мкр)\s+(?=\S)/gi,
|
|
82
|
+
'$1$2\u00A0'
|
|
83
|
+
);
|
|
84
|
+
|
|
85
|
+
// NBSP after ANY short word (1–3 chars)
|
|
86
|
+
t = t.replace(/(^|[ \t])([A-Za-zА-Яа-яЁё0-9]{1,3})[ \t]+(?=\S)/g, '$1$2\u00A0');
|
|
87
|
+
|
|
88
|
+
// NBSP before particles
|
|
89
|
+
t = t.replace(/\s+(же?|л[иь]|бы?)(?=[\s.,!?;:])/gi, '\u00A0$1');
|
|
90
|
+
|
|
91
|
+
// Quotes
|
|
92
|
+
t = t.replace(/"(?=\S)/g, '«')
|
|
93
|
+
.replace(/(?<=\S)"/g, '»');
|
|
94
|
+
|
|
95
|
+
return t;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
process(html) {
|
|
99
|
+
const skipStack = [];
|
|
100
|
+
const tagRegex = /(<\/?([a-z0-9]+)[^>]*>)|([^<]+)/gi;
|
|
101
|
+
|
|
102
|
+
return html.replace(tagRegex, (match, tag, tagName, text) => {
|
|
103
|
+
if (tag) {
|
|
104
|
+
const lowerTag = tagName ? tagName.toLowerCase() : '';
|
|
105
|
+
if (this.#skipTags.includes(lowerTag)) {
|
|
106
|
+
if (tag.startsWith('</')) {
|
|
107
|
+
skipStack.pop();
|
|
108
|
+
} else if (!tag.endsWith('/>')) {
|
|
109
|
+
skipStack.push(lowerTag);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
return tag;
|
|
113
|
+
} else {
|
|
114
|
+
if (skipStack.length > 0) return text;
|
|
115
|
+
return this.#processText(text);
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Универсальный режим:
|
|
122
|
+
* 1. Обрабатывает статичный текст (например .typograf)
|
|
123
|
+
* 2. Навешивается на поля для live-обработки (например .typograf-live)
|
|
124
|
+
*/
|
|
125
|
+
live(staticSelector = '.typograf', interactiveSelector = '.typograf-live', root = document) {
|
|
126
|
+
// 1. Статическая обработка
|
|
127
|
+
root.querySelectorAll(staticSelector).forEach(el => {
|
|
128
|
+
if (el.isContentEditable) {
|
|
129
|
+
el.innerHTML = this.process(el.innerHTML);
|
|
130
|
+
} else {
|
|
131
|
+
el.textContent = this.process(el.textContent);
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
// 2. Live-обработка полей
|
|
136
|
+
root.addEventListener('input', e => {
|
|
137
|
+
const el = e.target;
|
|
138
|
+
if (!el.matches(interactiveSelector)) return;
|
|
139
|
+
if (el.disabled || el.readOnly) return;
|
|
140
|
+
|
|
141
|
+
// INPUT / TEXTAREA
|
|
142
|
+
if (el.tagName === 'TEXTAREA' || (el.tagName === 'INPUT' && el.type === 'text')) {
|
|
143
|
+
const start = el.selectionStart;
|
|
144
|
+
const end = el.selectionEnd;
|
|
145
|
+
const newValue = this.process(el.value);
|
|
146
|
+
if (newValue !== el.value) {
|
|
147
|
+
el.value = newValue;
|
|
148
|
+
el.setSelectionRange(start, end);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
// CONTENTEDITABLE
|
|
152
|
+
else if (el.isContentEditable) {
|
|
153
|
+
const sel = window.getSelection();
|
|
154
|
+
const range = sel.rangeCount > 0 ? sel.getRangeAt(0).cloneRange() : null;
|
|
155
|
+
const newHTML = this.process(el.innerHTML);
|
|
156
|
+
if (newHTML !== el.innerHTML) {
|
|
157
|
+
el.innerHTML = newHTML;
|
|
158
|
+
if (range) this.#restoreCaret(el, range);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
#restoreCaret(el, oldRange) {
|
|
165
|
+
const sel = window.getSelection();
|
|
166
|
+
sel.removeAllRanges();
|
|
167
|
+
|
|
168
|
+
const range = document.createRange();
|
|
169
|
+
|
|
170
|
+
// Ищем соответствующие позиции в новом DOM
|
|
171
|
+
const walker = document.createTreeWalker(el, NodeFilter.SHOW_TEXT, null);
|
|
172
|
+
let currentNode, charCount = 0,
|
|
173
|
+
startNode = null,
|
|
174
|
+
endNode = null;
|
|
175
|
+
let startOffset = oldRange.startOffset,
|
|
176
|
+
endOffset = oldRange.endOffset;
|
|
177
|
+
let foundStart = false;
|
|
178
|
+
|
|
179
|
+
while ((currentNode = walker.nextNode())) {
|
|
180
|
+
if (!foundStart && charCount + currentNode.length >= startOffset) {
|
|
181
|
+
startNode = currentNode;
|
|
182
|
+
startOffset = startOffset - charCount;
|
|
183
|
+
foundStart = true;
|
|
184
|
+
}
|
|
185
|
+
if (charCount + currentNode.length >= endOffset) {
|
|
186
|
+
endNode = currentNode;
|
|
187
|
+
endOffset = endOffset - charCount;
|
|
188
|
+
break;
|
|
189
|
+
}
|
|
190
|
+
charCount += currentNode.length;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
if (startNode && endNode) {
|
|
194
|
+
range.setStart(startNode, Math.max(0, startOffset));
|
|
195
|
+
range.setEnd(endNode, Math.max(0, endOffset));
|
|
196
|
+
} else {
|
|
197
|
+
range.selectNodeContents(el);
|
|
198
|
+
range.collapse(false);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
sel.addRange(range);
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* Singleton export of Typograf.
|
|
207
|
+
* @type {Sticky}
|
|
208
|
+
*/
|
|
209
|
+
export const typograf = new Typograf();
|
package/src/js/x.js
CHANGED
|
@@ -22,6 +22,7 @@ import { lib } from "../components/x/lib";
|
|
|
22
22
|
import { form } from "../components/x/form";
|
|
23
23
|
import { sticky } from "../components/x/sticky";
|
|
24
24
|
import { slider } from "../components/x/slider";
|
|
25
|
+
import { typograf } from "../components/x/typograf";
|
|
25
26
|
|
|
26
27
|
|
|
27
28
|
class X {
|
|
@@ -42,6 +43,7 @@ class X {
|
|
|
42
43
|
this.form = form;
|
|
43
44
|
this.sticky = sticky;
|
|
44
45
|
this.slider = slider;
|
|
46
|
+
this.typograf = typograf;
|
|
45
47
|
|
|
46
48
|
this.initialized = false;
|
|
47
49
|
}
|
|
@@ -59,6 +61,7 @@ class X {
|
|
|
59
61
|
this.scroll.init();
|
|
60
62
|
this.sticky.init();
|
|
61
63
|
this.slider.init();
|
|
64
|
+
this.typograf.init();
|
|
62
65
|
hover.init();
|
|
63
66
|
|
|
64
67
|
this.initialized = true;
|