1import{a as mn}from"../../js/chunk-WSI4CI7G.mjs";function C(n,t){if(!{}.hasOwnProperty.call(n,t))throw new TypeError("attempted to use private field on non-instance");return n}var gn=0;function te(n){return"__private_"+gn+++"_"+n}var Lt="default",T=te("listeners"),J=te("context"),_t=te("addEventListeners"),k=class{constructor(t,e=!1){Object.defineProperty(this,_t,{value:_n}),Object.defineProperty(this,T,{writable:!0,value:new Map}),Object.defineProperty(this,J,{writable:!0,value:null}),this.strict=!1,C(this,J)[J]=t||this,this.strict=e}on(t,e){return C(this,_t)[_t](t,e,!1),this}one(t,e){return C(this,_t)[_t](t,e,!0),this}off(t,e){return(Array.isArray(t)?t:t.split(" ")).forEach(o=>{let[r,...s]=o.includes(".")?o.split("."):[o,Lt],a=s.join(".")||Lt;(r?[C(this,T)[T].get(r)]:[...C(this,T)[T].values()]).filter(Boolean).forEach(u=>{Array.from(u.entries()).forEach(([c,p])=>{(!e||e===c)&&p.namespace===a&&u.delete(c)}),u.size===0&&C(this,T)[T].delete(r)})}),this}clear(){return C(this,T)[T].clear(),this}async trigger(t,...e){let[i,...o]=t.split("."),r=o.join("."),s=C(this,T)[T].get(i),a=C(this,T)[T].get("*"),l=[];return s&&s.forEach((u,c)=>{(!r||u.namespace.startsWith(r))&&(l.push(Promise.resolve(c.call(C(this,J)[J],...e))),u.once&&s.delete(c))}),a&&a.forEach((u,c)=>
1{l.push(Promise.resolve(c.call(C(this,J)[J],t,...e)))}),this.strict&&l.length===0&&console.warn(`No listeners for event: ${t}`),Promise.all(l)}async emit(t,...e){return this.trigger(t,...e)}};function _n(n,t,e){(Array.isArray(n)?n:n.split(" ")).forEach(o=>{let[r,...s]=o.includes(".")?o.split("."):[o,Lt],a=s.join(".")||Lt;C(this,T)[T].has(r)||C(this,T)[T].set(r,new Map),C(this,T)[T].get(r).set(t,{once:e,namespace:a})})}var ee=class extends k{constructor(){super(),this.init()}init(){let t=window.parent!==window;if(t){let e=()=>{this.message("LOCATION_CHANGE",{title:document.title,location:window.location.toString()})};window.addEventListener("hashchange",e),window.addEventListener("popstate",e),window.addEventListener("load",e),document.addEventListener("DOMContentLoaded",()=>{this.message("DOM_CONTENT_LOADED"),e()})}flexbe_cli.is_admin||window.addEventListener("keydown",e=>{let i="app.flexbe.com",o=e.metaKey||e.ctrlKey,r=e.shiftKey;(["F2"].includes(e.key)||["/","\\"].includes(e.key)&&o&&r)&&(t?this.message("CLOSE_FRAME"):window.location.href=`https://${i}/project/${flexbe_cli.group_id}/editor/${flexbe_cli.p_id}/`)})}message(t,e={}){window.parent!==window&&window.parent.postMessage({message:t,payload:e},"*"),this.trigger(t,e)}},A=new ee;var ur=Object.freeze({value:"auto",title:"AUTO",auto:!0,selectValue:"auto"}),dr=Object.freeze({value:"fill",title:"FILL",fill:!0,selectValue:"fill",tip:typeof tr=="function"&&tr("editor::units::fill_tip")}),fr=Object.freeze({value:"px",title:"PX",step:1,altStep:5}),pr=Object.freeze({value:"pt",title:"PT",step:1,altStep:.1}),hr=Object.freeze({value:"em",title:"EM",step:.1,altStep:.01}),mr=Object.freeze({value:"rem",title:"REM",step:.1,altStep:.01}),gr=Object.freeze({value:"vh",title:"VH",step:1,altStep:.1,tip:typeof tr=="function"&&tr("editor::units::vh_tip")}),_r=Object.freeze({value:"vw",title:"VW",step:1,altStep:.1,tip:typeof tr=="function"&&tr("editor::units::vw_tip")}),vr=Object.freeze({value:"cqw",title:"CQW",step:1,altStep:.1}),br=Object.freeze({value:"cqw",title:"CQH",step:1,altStep:.1}),yr=Object.freeze({value:"ch",title:"CH",step:1,altStep:5,tip:typeof tr=="function"&&tr("editor::units::ch_tip")}),wr=Object.freeze({value:"%",title:"%",step:1,altStep:.1});function ai(n){return!n||typeof n!="object"?!1:n.nodeType!=null}function vt(n){if(!n)return;let t=ai(n)?[n]:Array.from(n),e=t.filter(o=>!o.hasAttribute("data-cloned")&&!o.closest("[data-cloned]")),i=(e.length?e:t)[0];!i||typeof i.dispatchEvent!="function"||i.dispatchEvent(new Event("bringIntoView",{bubbles:!0,cancelable:!0}))}var Pr=String.fromCharCode;function li(n,t="default"){let[e,i]=n.split("#"),[o,r]=e.split("?"),s=o.endsWith("/"),a=o;return/\.[0-9a-z]+$/i.test(o)||o.startsWith("/files/")||o.startsWith("/img/")||!o.startsWith("./")&&!o.startsWith("/")?n:(t==="enabled"&&!s&&a&&(a=`${a}/`),t==="disabled"&&s&&o!=="/"&&(a=a.replace(/\/$/,"")),`${a}${r?`?${r}`:""}${i?`#${i}`:""}`)}var bn=150,ui=2160,ci={avif:null,webp:null};function yn(){var n;let t=typeof flexbe_cli=="object"&&((n=flexbe_cli.vars)==null?void 0:n.site.images)||{};return{lazy:!0,lazy_priority:!1,avif:!1,webp:!1,avif_support:ci.avif||t.avif_support,webp_support:ci.webp||t.webp_support,slow_network:!1,maxSize:ui,minSize:bn,quality_map:{jpg:70,webp:70,avif:55}}}async function ie(n){try{let t=new Image;return"decode"in t?(t.src=n,await t.decode(),!0):await new Promise(e=>{let i=t;i.onload=()=>e(!0),i.onerror=()=>e(!1),i.src=n})}catch{return!1}}function ne(n){if(typeof n!="string")return n;n=n.replace(/(\/img\/[\d_q]+)\/[\w-]+(\.\w{3,4})/i,"$1$2");let[,t,e,i,o]=n.match(/\/img\/(\d+)_?(\d+)?_?q?(\d+)?\.(\w{3,4})/i)||[],r=+t,s=`${t}.${o}`,a=e?+e:0,l=i?+i:null;return{id:r,ext:o,name:s,size:a,quality:l}}function wn(n,t){let e=t.avif_support,i=t.webp_support,o=t.avif,r=t.webp,s=n.ext;return e&&o?s="avif":i&&r?s="webp":n.ext==="webp"&&(i?s="webp":s=n.transparent?"png":"jpg"),s}function xn(n,t=null,e=null){var i,o;e={...yn(),...e};let{id:r,ext:s}=n;if(!r)return"";let a=e.maxSize||ui;!t&&n.ext==="webp"&&!e.webp_support&&(t=Math.min(n.width||a,a));let l=(i=n.animated)!=null?i:s==="gif",u=`/img/${r}.${s}`;if(!t||l||s==="svg")return u;let p=wn(n,e),f=e.slow_network&&En(),h=(o=e.quality_map)!=null?o:{jpg:70,webp:70,avif:55};switch(f&&(h={jpg:50,webp:50,avif:45}),p){case"png":return`/img/${r}_${t}.png`;case"avif":case"webp":case"jpg":return`/img/${r}_${t}_q${h[p]}.${p}`;case"gif":break;default:return u}}function An(n){let t=String(n).match(/\.(jpg|jpeg|png|gif|svg|bmp|webp)$/i);return t!=null&&t[1]?t[1]:""}function $n(n){return n!=="transparent"?n:"#000000"}function oe(n){if(typeof n=="string"&&(n=ne(n)),!n||typeof n!="object")return{};let t=n.img_ext||n.ext,e=n.img_id||n.id,i=n.img_name||n.name;(!t||t==="false")&&(t=i?An(i):"jpg");let o=n.img_border||n.border,r=$n(n.img_average||n.average),s=n.img_preview||n.preview||"",a=n.img_width||n.width||0,l=n.img_height||n.height||0,c=+(+n.img_proportion||+n.proportion||0).toFixed(2),p=n.img_animated||n.animated||t==="gif",f=n.img_transparent||n.transparent||0;return{id:e,ext:t,average:r,preview:s,width:a,height:l,proportion:c,border:o,animated:p,transparent:f}}function di(n,t=0,e){let i=oe(n),o=t==="%optimalWidth%"?t:Math.round(t)||parseInt(t,10)||null;return xn(i,o,e)}function En(){var n;return typeof navigator>"u"?!1:(((n=navigator.connection)==null?void 0:n.effectiveType)||"4g")!=="4g"}function bt(n,t){if(!{}.hasOwnProperty.call(n,t))throw new TypeError("attempted to use private field on non-instance");return n}var Sn=0;function ae(n){return"__private_"+Sn+++"_"+n}var In=767,re=ae("checkSupports"),yt=ae("deviceInfo"),wt=ae("applyClasses"),se=class{constructor(){Object.defineProperty(this,wt,{value:kn}),Object.defineProperty(this,yt,{value:On}),Object.defineProperty(this,re,{value:Tn}),this.is_screen_mobile=void 0,this.is_screen_desktop=void 0,this.is_touch=void 0,this.is_pointer=void 0,this.is_tablet=void 0,this.is_mobile=void 0,this.is_desktop=void 0,this.is_chrome=void 0,this.is_safari=void 0,this.is_firefox=void 0,this.is_OSX=void 0,this.is_android=void 0,this.is_ios=void 0,this.is_preview=void 0,this.is_bot=void 0,this.is_instagram=void 0,this.device_type=void 0}init(){bt(this,yt)[yt](),bt(this,wt)[wt](),bt(this,re)[re](),$(window).on("resize.deviceInfo",()=>{bt(this,yt)[yt]()}),$(window).on("resized.deviceInfo",()=>{bt(this,wt)[wt]()}),flexbe_cli.events.on("hideShowUI",t=>{this.is_preview=["preview","generation"].includes(t),$(document.body).removeClass("mode--editor mode--preview mode--generation").addClass(`mode--${t}`)})}matchScreen(t,e){let i=["screen"];return t!=null&&i.push(`(min-width: ${t}px)`),e!=null&&i.push(`(max-width: ${e}
1px)`),window.matchMedia(i.join(" and ")).matches}};async function Tn(){let n=flexbe_cli.vars.site.images||{},[t,e]=await Promise.all([n.webp_support||ie("data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA"),n.avif_support||ie("data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=")]);n.webp_support=t,n.avif_support=e}function On(){var n;let t=navigator.userAgent.toLowerCase();this.is_screen_mobile=this.matchScreen(0,In),this.is_screen_desktop=!this.is_screen_mobile,this.is_touch="ontouchstart"in window||navigator.maxTouchPoints>0||window.matchMedia("(any-pointer: coarse)").matches,this.is_pointer=!this.is_touch||window.matchMedia("(pointer: fine)").matches,this.is_tablet=/ipad|xoom|kindle|playbook|tablet/i.test(t),this.is_mobile=!this.is_tablet&&t.indexOf("mobile")!==-1,this.is_desktop=!this.is_mobile&&!this.is_tablet,this.is_chrome=/(chromium|chrome)\/(\d+)/.test(t),this.is_safari=t.indexOf("safari")!==-1&&((n=t.match(/version\/(\d+)/))==null?void 0:n[1]),this.is_firefox=t.indexOf("firefox")!==-1,this.is_OSX=/ipad|iphone|ipod|macintosh/gi.test(t),this.is_android=t.indexOf("android")!==-1,this.is_ios=this.is_OSX&&this.is_touch&&!this.is_desktop,this.is_preview=/is-view|mode--preview|mode--generation/.test(document.body.className),this.is_instagram=/instagram/i.test(t),this.is_mobile&&this.is_touch?this.device_type="mobile":this.is_tablet&&this.is_touch?this.device_type="tablet":this.device_type="desktop"}function kn(){let n=$(document.body);n.toggleClass("is-mobile",this.is_mobile),n.toggleClass("is-tablet",this.is_tablet),n.toggleClass("is-desktop",this.is_desktop),n.toggleClass("is-pointer",this.is_pointer),n.toggleClass("is-touch",this.is_touch),n.toggleClass("is-ios",!!this.is_ios),n.toggleClass("is-android",this.is_android),n.toggleClass("is-osx",this.is_OSX&&this.is_desktop),n.toggleClass("is-safari",!!this.is_safari),this.is_safari&&n.addClass(`is-safari-${this.is_safari}`),n.toggleClass("is-firefox",this.is_firefox),n.toggleClass("is-chrome",this.is_chrome),n.toggleClass("is-instagram",this.is_instagram)}var W=new se;function U(n,t){if(!{}.hasOwnProperty.call(n,t))throw new TypeError("attempted to use private field on non-instance");return n}var Pn=0;function rt(n){return"__private_"+Pn+++"_"+n}var Cn=767,Mn=1200,fi;function le(n){let t={desktop:"auto",mobile:"auto"};if(!n)return t;for(let e of n.split("|")){let[i,o]=e.split(":");i!=="desktop"&&i!=="mobile"||(t[i]=o==="auto"?"auto":Number(o))}return t}function pi(n,t,e){return Math.max(t,Math.min(n,e))}function hi(n,t){let e=Math.min(n,t);return flexbe_cli.vars.page.responsive&&e<=Cn?"mobile":"desktop"}function Nn(n,t,e,i){let o=typeof t.desktop=="number"?t.desktop:Mn,r=e.desktop;if(r==="auto")return pi(n/o,0,1);if(typeof r!="number")return 1;let s=n/r,a=n/Math.max(n,o),l=i.desktop,u=l==="auto"?1/0:l/r;return pi(s,a,u)}var ce=rt("getAccurateViewportInfo"),Q=rt("applySizeVariables"),ue=rt("applySizeVariablesOnResize"),de=rt("watchContainerSize"),fe=rt("simulateWindowResized"),pe=rt("simulateDocumentResize"),he=class{constructor(){Object.defineProperty(this,pe,{value:Vn}),Object.defineProperty(this,fe,{value:zn}),Object.defineProperty(this,de,{value:Ln}),Object.defineProperty(this,ue,{value:Fn}),Object.defineProperty(this,Q,{value:Dn}),Object.defineProperty(this,ce,{value:Rn}),this.containerWidth=null,this.oldWidth=null,this.oldHeight=null,this.lockedMode=!1,this.responsiveMode=null,this.clientWidth=null,this.clientHeight=null,this.lockedViewport=!1,this.viewportWidth=null,this.viewportHeight=null,this.proportion=null,this.scrollbarWidth=null,this.documentHeight=null,this.zoom=null}init(){U(this,fe)[fe](),U(this,pe)[pe](),this.updateSizes({triggerResize:!1}),U(this,de)[de](),U(this,ue)[ue]()}trigger(t,e=window){e.dispatchEvent(new CustomEvent(t))}updateSizes({width:t,height:e,proportion:i=null,triggerResize:o=!0,lockViewport:r}={}){let s=document.documentElement,{clientWidth:a,clientHeight:l,scrollbarWidth:u}=U(this,ce)[ce]();this.oldWidth=this.clientWidth,this.oldHeight=this.clientHeight,this.clientWidth=a,this.clientHeight=l;
1let c=le(s.getAttribute("data-min-viewport")),p=le(s.getAttribute("data-base-viewport")),f=le(s.getAttribute("data-max-viewport")),d=hi(a,t??a)==="mobile"||flexbe_cli.is_admin?1:Nn(a,c,p,f),m=Math.round(a/d),g=Math.round(l/d),b=t??(this.lockedViewport?this.viewportWidth:m),_=e??(this.lockedViewport?this.viewportHeight:g);b=Math.min(b,m),_=Math.min(_,g),this.lockedMode||(this.responsiveMode=hi(a,b)),this.viewportWidth=b,this.viewportHeight=_,this.zoom=d,this.scrollbarWidth||(this.scrollbarWidth=u),i!=null&&(this.proportion=i),r!=null&&(this.lockedViewport=r),U(this,Q)[Q](),o&&(this.trigger("resize"),this.trigger("resized"))}lockMode(t){this.lockedMode=t}};function Rn(){let t=document.documentElement.getBoundingClientRect(),e=window.innerWidth,i=window.innerHeight,o=Math.round(t.width),r=i,s=e-o;return{clientWidth:o,clientHeight:r,viewportWidth:e,viewportHeight:i,scrollbarWidth:s}}function Dn(){var n,t;let e=$(document.documentElement),i=this.responsiveMode==="mobile",o=(n=this.zoom)!=null?n:1;document.body.classList.toggle("adaptive-mobile",i),document.body.classList.toggle("adaptive-desktop",!i),e.css("--zoom",String(o)),window.zoom=o,e.css("--100vw",`${this.viewportWidth}px`),e.css("--100vh",`${this.viewportHeight}px`),e.css("--scrollbarWidth",`${(t=this.scrollbarWidth)!=null?t:0}px`),e.css("--cover",this.proportion?`${Math.round(this.viewportWidth/this.proportion)}px`:"")}function Fn(){W.is_ios&&setTimeout(()=>U(this,Q)[Q](),150),$(window).on("resized.setVars",()=>U(this,Q)[Q]())}function Ln(){let n=()=>{let t=document.createElement("div");t.classList.add("container"),requestAnimationFrame(()=>{document.body.appendChild(t),this.containerWidth=t.offsetWidth,document.body.removeChild(t)})};n(),$(window).on("resized.setContainer",()=>n())}function zn(){let t,e=this.oldWidth,i=this.oldHeight;$(window).on("resize orientationchange",o=>{o.originalEvent&&(this.updateSizes({triggerResize:!1}),clearTimeout(t),t=setTimeout(()=>{this.oldWidth=e,this.oldHeight=i,e=this.clientWidth,i=this.clientHeight,requestAnimationFrame(()=>{this.trigger("resized")})},80))})}function Vn(){requestAnimationFrame(()=>{this.documentHeight=document.body.offsetHeight});let n=flexbe_cli.is_admin?200:80,t=(e=0)=>{let i=document.body.offsetHeight;Math.abs(i-this.documentHeight)>=5&&(this.documentHeight=i,this.trigger("documentresize",document),clearTimeout(fi),fi=setTimeout(()=>{this.trigger("documentresized",document)},e))};if(typeof ResizeObserver=="function"){let e=!0;new ResizeObserver(()=>{if(e){e=!1;return}t(n)}).observe(document.querySelector("body"))}else setInterval(()=>{t(0)},n)}var Z=new he;var zt={};function Bn(n,t){let e=document.createElement("link");return new Promise((i,o)=>{let r=!1,s,a=(l=!0)=>{r||(r=!0,clearTimeout(s),l==="timeout"?o(new Error("timeout")):i(l))};e.onerror=a.bind(null,!1),e.onload=a.bind(null,!0),s=setTimeout(a.bind(null,"timeout"),t),e.rel="stylesheet",e.href=n,document.body.appendChild(e)})}function qn(n,t){let e=document.createElement("script");return new Promise((i,o)=>{let r=!1,s,a=(l=!0)=>{r||(r=!0,clearTimeout(s),l==="timeout"?o(new Error("timeout")):i(l))};e.onload=a.bind(null,!0),e.onerror=a.bind(null,!1),s=setTimeout(a.bind(null,"timeout"),t),e.async=!0,e.src=n,document.body.appendChild(e)})}function mi(n,t=15e3){return!n||n.length===0?Promise.resolve(!1):Array.isArray(n)?Promise.all(n.map(e=>mi(e,t))).then(e=>e.every(Boolean)):zt[n]?Promise.resolve(zt[n]):(zt[n]=/\.css(\?.*)?$/.test(n)?Bn(n,t):qn(n,t),zt[n])}function G(n,t,e=15e3){let i=mi(n,e);return typeof t=="function"&&i.then(()=>t(!0)).catch(()=>t(!1)),i}var st={anchorToCenter:!0,inScroll:!1,skip:!1,locked:!1,_latest:null,_$inScrollElement:null,get latest(){var n;return(n=this._latest)!=null?n:0},init(){window.history.scrollRestoration&&(window.history.scrollRestoration="auto"),requestAnimationFrame(()=>{this._latest=window.scrollY}),document.addEventListener("wheel",()=>{this._$inScrollElement&&(this._$inScrollElement.stop(),this._$inScrollElement=null)},{passive:!0}),document.addEventListener("scroll",()=>{this.inScroll=!0,this._latest=window.scrollY},{passive:!0}),document.addEventListener("scrollend",()=>{this.inScroll=!1},{passive:!0}),this.scrollImprovement.init(),flexbe_cli.vars.site.smoothingScroll&&this.scrollSmoothing.init(
1)},scrollImprovement:{scrollTimer:0,init(){this.createStopScrollEvent()},createStopScrollEvent(){let n=st.latest;document.addEventListener("scroll",()=>{let t=n>st.latest?"up":"down",e=Math.max(st.latest-n,n-st.latest);clearTimeout(this.scrollTimer),this.scrollTimer=setTimeout(()=>{n=st.latest,document.dispatchEvent(new CustomEvent("scrollend",{detail:{direction:t,distance:e}}))},200)},{passive:!0})}},scrollSmoothing:{duration:1.2,lenisInstance:null,instances:[],async loadLib(){return new Promise(n=>{G("/_s/lib/lenis/lenis.min.js",()=>n(!0))})},async init(){if(flexbe_cli.is_admin)return;let n=".container-list";if(await this.loadLib(),!window.Lenis)return;let t=document.querySelector(n);if(!t)return;this.instances.push(new window.Lenis({duration:this.duration,eventsTarget:t}));let e=i=>{this.instances.forEach(o=>{o.raf(i)}),requestAnimationFrame(e)};requestAnimationFrame(e),$(document).on("bringIntoView.scroll-smoothing",()=>{this.instances.forEach(i=>{i.stop(),i.start()})})},destroy(){$(document).off(".scroll-smoothing"),this.instances.forEach(n=>{n.destroy()}),this.instances=[]}},lock(){this.locked=!0;let n=document.scrollingElement;n.style.overflow="hidden",n.style.paddingRight="var(--scrollbarWidth)",n.style.minHeight="100vh",W.is_ios&&(document.body.style.height="100vh")},unlock(){this.locked=!1;let n=document.scrollingElement;n.style.overflow="",n.style.paddingRight="",n.style.height="",n.style.minHeight=""},to(n){document.scrollingElement.scrollTo(0,n)},toElement(n,t={}){var e,i;let o=$(n),r=o[0];if(!r)return!1;t.animation==null&&(t.animation=!0),t.centered==null&&(t.centered=this.anchorToCenter),t.force==null&&(t.force=!0);let s=0,a=0,l,u=(e=document.scrollingElement)!=null?e:document.documentElement,c=flexbe_cli.helpers.scrollParent(r,"y");(!c||$(c).is(".b_block, .container-list")||c===document.body||c===document.documentElement)&&(c=u);let p=t.padding||0,h=c===u?flexbe_cli.resize.viewportHeight:c.offsetHeight,d,m;if(o.closest(".markdown-markup").length){var g;let S=o.closest(".markdown-markup");if(d=((g=o.offset())==null?void 0:g.top)||0,m=r.offsetHeight,r.hasAttribute("data-id")){let N=r.getAttribute("data-id"),ot=S.find(`[data-id="${N}"]`).not(r)[0];if(ot){var b;d=((b=$(ot).offset())==null?void 0:b.top)||0,m=ot.offsetHeight}}t.centered=!1}else{var _;d=((_=o.offset())==null?void 0:_.top)||0,m=r.offsetHeight}let w=$(c);if(W.is_mobile)l=w.find(".menu-fixed > .nav-header");else if(flexbe_cli.theme_id===4){var I;a=((I=flexbe_cli.fixed)==null?void 0:I.getAllFixedHeight(d))||0}else l=w.find('.floating[data-floating="true"]');(i=l)!=null&&i.length&&(a+=l[0].offsetHeight-2);let O=Math.max(0,h-a-m);if(m>=h&&(t.centered=!1),t.centered?s=d-Math.max(0,O/2)-a:(s=d-p-a,o.closest(".markdown-markup").length&&(s-=20)),t.offset&&(s+=t.offset),!t.force){let S=c.offsetTop,y=r.getBoundingClientRect(),N=Math.max(y.top,S);if(Math.min(y.bottom,S+h)-N>=m/2)return typeof t.complete=="function"&&t.complete(),!1}this._$inScrollElement=w,$(document).off("documentresize.scrollTo").on("documentresize.scrollTo",()=>{this.toElement(r,t)});let E=!1;w.stop(),w.animate({scrollTop:s},{delay:t.delay||0,duration:t.duration?t.duration:t.animation?450:0,easing:t.animation?"swing":"linear",always:(...S)=>{E||(E=!0,this._$inScrollElement=!1,$(document).off("documentresize.scrollTo"),typeof t.complete=="function"&&t.complete(...S))}})}},B=st;function me(n){let t=n.filter((e,i)=>!i.hasAttribute("data-cloned")&&!i.closest("[data-cloned]"));return t.length?t:n}function ge(n){let t=i=>{let o=me($(`._anchor[name="${i}" i], [id="${i}"]`)),r=me(o.length?o.closest("[data-id]"):$(`[data-id="${i}" i]`));if(!o.length&&!r.length){let s=me($(`[data-tab-uid="${i}" i]`)).first();s.length&&(r=s)}return{$anchor:o,$entity:r}},e=t(n);if(!e.$anchor.length&&!e.$entity.length){let i=n.match(/^tab(.+)$/i);i!=null&&i[1]&&(e=t(i[1]))}return e}function gi(n,t=!1){if(n=n?li(n,flexbe_cli.vars.site.trailingSlash):null,flexbe_cli.is_admin){n?A.message("LEAVE_PAGE",{href:n,blank:t}):A.message("WRONG_LINK",{type:"link",href:n});return}if(!n){console.warn("Empty link");return}window.parent!==window&&n.includes("http")&&(t=!0),t?window.open(n,"_blank").focus():window.location.href=n}
1function Vt(n="",t){if(typeof n!="string")return!1;if(/#{1,2}.+/.test(n)){flexbe_cli.theme_id===4&&$('nav[data-opened="true"]').length&&A.trigger("ui_mobilemenu_close",{}),flexbe_cli.theme_id!==4&&$(".mobile-menu.show").length&&$(".mobile-menu").removeClass("show").trigger("close"),n=n.replace(/^\.\/#{2}/,"#").trim();let e=n.trim().split("#"),i=decodeURIComponent(e[e.length-1]);if(!(e[0]===""||e[0]==="./"||e[0]===new URL(document.baseURI).pathname))return gi(n),!0;let{$anchor:r,$entity:s}=ge(i),a=s;a.is(".element-item--free")&&(a=a.find(".element-content"));let l=a.closest(".b_block").filter(":visible"),u=a.closest(".m_modal");if((r.length||a.length)&&vt(r.length?r:a),i==="cart")A.trigger("ui_modal_close",{}),A.trigger("ui_cart_open",{});else if(l.length)A.trigger("ui_cart_close",{}),A.trigger("ui_modal_close",{}),setTimeout(()=>{let c=l;if(a&&!l.is(a)){let p=l[0].getBoundingClientRect(),f=a[0].getBoundingClientRect(),h=f.top-p.top>Z.viewportHeight-100,d=f.top<p.top||f.bottom>p.bottom;(h||d)&&(c=a)}c.is(":visible")&&B.toElement(c,{force:!i.startsWith("tab")})},30),window.history.replaceState(null,null,`#${i}`);else if(u.length){let c=u.attr("data-id"),p=u.attr("data-page-id");A.trigger("ui_cart_close",{}),A.trigger("ui_modal_open",{id:c,pageId:p})}else window.location.hash=`#${i}`,flexbe_cli.is_admin&&A.message("WRONG_LINK",{type:"anchor",href:`#${i}`})}else return gi(n,t),!0}function _i(n=document){$(n).find("[data-product]").each((e,i)=>{let o=$(i),r=o.data("product");o.removeAttr("data-product"),(r==null||typeof r=="object"&&!Object.keys(r).length)&&(r=null),r!==null?o.data("product",r):o.removeData("product")})}function _e(){if(flexbe_cli.lockPopstate)return;let n=window.location.hash;if(!n&&window.parent)try{n=window.parent.location.hash}catch{}flexbe_cli.lockPopstate=!0,/^#/.test(n)?Vt(n):flexbe_cli.modal.opened.size&&A.trigger("ui_modal_close"),flexbe_cli.lockPopstate=!1}function ve(n=()=>{},t=()=>{}){let e=!1;["complete","loaded"].includes(document.readyState)?i():document.addEventListener("DOMContentLoaded",()=>i());function i(){if(!e){if(typeof $>"u"||!$.debounce){setTimeout(i,10);return}e=!0,n(),requestAnimationFrame(async()=>{$("body").removeClass("noanimate").addClass("DOMContentLoaded"),await t(),flexbe_cli.vars.globals.isService||(_e(),setTimeout(()=>_e(),1e3),window.addEventListener("popstate",_e)),flexbe_cli.isInited=!0})}}}var be={};mn(be,{get:()=>jn,set:()=>Hn});function jn(n){let t=document.cookie.match(new RegExp(`(?:^|; )${n.replace(/([$()*+./?[\\\]^{|}])/g,"\\$1")}=([^;]*)`));return t?decodeURIComponent(t[1]):void 0}function Hn(n,t,e={}){let i=e.expires;if(typeof i=="number"){let s=new Date;s.setTime(s.getTime()+i*1e3),i=s,e.expires=s}else i instanceof Date&&(e.expires=i.toUTCString());t=encodeURIComponent(t);let o=`${n}=${t}`;Object.keys(e).forEach(s=>{o+=`; ${s}`;let a=e[s];a!==!0&&(o+=`=${a}`)}),document.cookie=o}function Bt(n){var t;if(!((t=n)!=null&&t.offsetParent))return null;let e=0,i=0;for(;n;){if($.css(n,"position")==="fixed"){e+=window.scrollY,i+=window.scrollX;break}e+=n.offsetTop-n.scrollTop,i+=n.offsetLeft-n.scrollLeft,n=n.offsetParent}return{top:Math.round(e),left:Math.round(i)}}function vi(n,t=[]){return n.parentNode==null?t:vi(n.parentNode,[...t,n])}function Wn(n){let t=/(auto|scroll)/,e=getComputedStyle(n,null);return["overflow","overflow-y","overflow-x"].some(i=>t.test(e.getPropertyValue(i)))}function bi(n){if(!(n!=null&&n.parentNode))return;let t=n.ownerDocument||document,e=vi(n.parentNode,[]);for(let i=0;i<e.length;i++)if(Wn(e[i]))return e[i];return t.scrollingElement||t.documentElement}function R(n="",t={}){return new Promise((e,i)=>{$.ajax({url:n,type:t.type||t.method||"POST",dataType:"json",...t}).done(o=>{e(o)}).fail(o=>{let r=o.responseJSON,s=r?new Error(r.message):o;s.status=o.status,s.data=r,i(s)})})}function ye(n,t={}){t={onSuccess:()=>{},onComplete:()=>{},onError:()=>{},onProgress:()=>{},...t};let e=new FormData;e.append("file",n);let i=$.ajax({url:"/mod/file/lead/upload/",type:t.type||t.method||"POST",dataType:"json",processData:!1,contentType:!1,data:e,success:(o,r)=>{t.onSuccess(o,r)},error:(o,r)=>{t.onError(o,r)},complete:(o,r)=>{t.onComplete(o,r)},xhr:()=>{let o=new window.XMLHttpRequest;return o.upload.addEventListener("progress",r=>t.onProgress(i,r)),o},...t});return i}function yi(n){return String(n).split("").reduce((e,i)=>(e=(e<<5)-e+i.charCodeAt(0),e&e),0).toString(16)}var wi={fetch:R,upload:ye,scrollParent:bi,getElOffset:Bt,gotoLink:Vt,bringIntoView:vt,findHashTarget:ge,getImageUrl:di,hashCode:yi,cookie
1:be};var Un=[".layout-type-header",".layout-type-tabs",".layout-type-column",".layout-type-cards",".flexbe-cards-container.mode-slider",".content-zone--vertical.bg-element",".content-zone--vertical:not(.bg-element) .element-item--static",".flexbe-card:not(.swiper-slide)",".quiz-progress",".step-title",".quiz-fields"].join(","),Gn=[".free-area .element-item"].join(","),qt={startTransitions(n){let t=$(n);if(flexbe_cli.is_admin){t.addClass("was-view"),t.removeClass("wait-animation");return}let e=t.find(Gn),i=t.find(Un);i=i.filter((a,l)=>$(l).find(i).length===0);let o=200,r=Math.min(80,1e3/i.length),s=1e3+i.length*r;i.css("--transitionDelay",a=>`${a*r}ms`),i.addClass("transition-target"),e.addClass("transition-target"),setTimeout(()=>{t.addClass("was-view")},o),setTimeout(()=>{this.stopTransition(t,i)},o+s)},stopTransition(n,t){let e=$(n),i=$(t);i.length||(i=e.find(t),i=i.filter((o,r)=>$(r).find(i).length===0)),e.removeClass("wait-animation"),i.removeClass("transition-target"),i.css("--transitionDelay",""),e.trigger("flexbe-transition-end")}};function q(n,t){if(!{}.hasOwnProperty.call(n,t))throw new TypeError("attempted to use private field on non-instance");return n}var Yn=0;function xt(n){return"__private_"+Yn+++"_"+n}var et=xt("lskey"),tt=xt("query"),we=xt("session"),xe=xt("saveSession"),Ae=xt("saveReferrer"),$e=class{constructor(){Object.defineProperty(this,Ae,{value:Qn}),Object.defineProperty(this,xe,{value:Jn}),Object.defineProperty(this,we,{get:Kn,set:void 0}),Object.defineProperty(this,tt,{get:Xn,set:void 0}),Object.defineProperty(this,et,{writable:!0,value:"client_utm"}),Object.keys(q(this,tt)[tt]).length&&q(this,xe)[xe](),this.referrer||q(this,Ae)[Ae]()}get referrer(){try{return sessionStorage.getItem("referrer")}catch(t){return console.error(t),null}}get data(){return{...q(this,we)[we],...q(this,tt)[tt]}}getUtm(){return this.data}toString(){return new URLSearchParams(this.data).toString()}};function Xn(){let n=[...new URL(window.location.toString()).searchParams].filter(([t])=>/utm_/.test(t));return{...Object.fromEntries(n)}}function Kn(){try{return JSON.parse(localStorage.getItem(q(this,et)[et])||"null")}catch(n){return console.error(n),null}}function Jn(){if(!flexbe_cli.is_admin)try{let n=q(this,tt)[tt];Object.keys(n).length?localStorage.setItem(q(this,et)[et],JSON.stringify(n)):localStorage.removeItem(q(this,et)[et])}catch{}}function Qn(){try{sessionStorage.setItem("referrer",document.referrer)}catch(n){console.error(n)}}var at=new $e;var jt=class{constructor(){this.process={}}init(){flexbe_cli.is_admin||!document.querySelectorAll("[data-abtest-variant]").length||flexbe_cli.block.$blocks.on("screen",t=>{let e=t.currentTarget._core,i=t.detail||{};!i.state||!i.first||!(e!=null&&e.abtestVariant)||this.fixView(e.abtestId,e.abtestVariant)})}setCookie(t){flexbe_cli.helpers.cookie.set("f_ab",JSON.stringify(t),{expires:10080*60,path:"/",domain:document.location.hostname})}getCookie(){let t=flexbe_cli.helpers.cookie.get("f_ab");if(t)try{t=JSON.parse(decodeURIComponent(t))}catch(e){console.warn("Can`t parse abtest cookie",e)}return t||(t={view:{},lead:[]}),t}async fixView(t,e){if(t==null||e==null||e!=="a"&&e!=="b")return;if(this.getCookie().view[t]==null&&!this.process[t]){this.process[t]=!0;try{await R("/mod/stat/abtest/",{data:{testId:t,variant:e,s_id:flexbe_cli.s_id,p_id:flexbe_cli.p_id}});let o=this.getCookie();o.view[t]=e,this.setCookie(o)}catch(o){console.error("Can't fix abtest",o)}this.process[t]=!1}}};var Ee="f_purchase_",Zn="f_paid_analytics_",Se="f_pay_hash_";function Ie(n){try{return localStorage.getItem(n)}catch{return null}}function Te(n,t){try{localStorage.setItem(n,t)}catch{}}function Y(n){return n!=null&&n!==""}function to(n){var t,e,i;let o=n.optionsInfo,r=Array.isArray(o)?o.map(l=>l.name).filter(Boolean).join(", "):"",s=Array.isArray(n.categories)?n.categories.map(l=>String(l)).filter(Boolean):[],a={id:String((t=n.id)!=null?t:""),name:String(n.name||n.title||""),price:Number((e=n.price)!=null?e:n.orderPrice)||0,quantity:Number((i=n.count)!=null?i:n.quantity)||1};return r&&(a.variant=r),n.brand&&(a.brand=String(n.brand)),s.length?(a.categories=s,a.category=s.join(" / ")):n.category&&(a.category=String(n.category)),n.list&&(a.list=String(n.list)),n.listId&&(a.listId=String(n.listId)),n.position!=null&&(a.position=Number(n.position)||0),a}function L(n,t={}){let e=n.map(o=>to(o)),i={currency:flexbe_cli.vars.site.currencyData.code,value:e.reduce((o,r)=>o+r.price*r.quantity,0),items:e};return Y(t.transactionId)&&(i.transactionId=String(t.transactionId)),Y(t.paymentType)&&(i.paymentType=String(t.paymentType)),Y(t.shippingTier)&&(i.shippingTier=String(t.shippingTier)),Y(t.itemListName)&&(i.itemListName=String(t.itemListName)),Y(t.itemListId)&&(i.itemListId=String(t.itemListId)),Y(t.coupon)&&(i.coupon=String(t.coupon)),typeof t.shipping=="number"&&(i.shipping=t.shipping),typeof t.value=="number"&&(i.value=t.value),i}function eo(n){try{let t=JSON.parse(n||"[]");if(Array.isArray(t))return{items:t};
1if(t&&Array.isArray(t.items))return{items:t.items,...Y(t.coupon)?{coupon:String(t.coupon)}:{},...t.shipping!=null&&t.shipping!==""?{shipping:Number(t.shipping)||0}:{},...t.value!=null&&t.value!==""?{value:Number(t.value)||0}:{}}}catch{}return{items:[]}}function io(n,t={}){let e={items:n};return Y(t.coupon)&&(e.coupon=String(t.coupon)),typeof t.shipping=="number"&&(e.shipping=t.shipping),typeof t.value=="number"&&(e.value=t.value),JSON.stringify(e)}var Ht=class{constructor(t){this.queue=[],this.listeners=[],this.beginCheckoutSent=new Set,this.addPaymentInfoSent=new Set,this.addShippingInfoSent=new Set,this.viewItemListSent=new Set,this.goals=t}subscribe(t){this.listeners.push(t);for(let e of this.queue)t(e)}add(t){this.emit({name:"add",params:L([t])})}remove(t){this.emit({name:"remove",params:L([t])})}beginCheckout(t,e){let i=e==null?"":String(e);if(!i||!(t!=null&&t.length)||this.beginCheckoutSent.has(i))return;let o=this.readPurchaseSnapshot(i);this.beginCheckoutSent.add(i),this.emit({name:"begin_checkout",params:L(t,{transactionId:i,coupon:o.coupon})})}addPaymentInfo({payId:t,paymentType:e,items:i}){let o=t==null?"":String(t),r=e==null?"":String(e);if(!o||!r||this.addPaymentInfoSent.has(o))return;let s=this.readPurchaseSnapshot(o),a=i!=null&&i.length?i:s.items;this.addPaymentInfoSent.add(o),this.emit({name:"add_payment_info",params:L(a,{transactionId:o,paymentType:r,coupon:s.coupon})})}addShippingInfo({payId:t,items:e,shippingTier:i}){let o=t==null?"":String(t);if(!o||this.addShippingInfoSent.has(o))return;let r=this.readPurchaseSnapshot(o),s=e!=null&&e.length?e:r.items;s.length&&(this.addShippingInfoSent.add(o),this.emit({name:"add_shipping_info",params:L(s,{transactionId:o,shippingTier:i,coupon:r.coupon})}))}viewItem(t){t&&this.emit({name:"view_item",params:L([t],{itemListName:t.list,itemListId:t.listId})})}viewCart(t){t!=null&&t.length&&this.emit({name:"view_cart",params:L(t)})}viewItemList(t,e="",i=""){if(!(t!=null&&t.length))return;let o=`${e}:${t.map(r=>r.id).join(",")}`;this.viewItemListSent.has(o)||(this.viewItemListSent.add(o),this.emit({name:"view_item_list",params:L(t,{itemListName:e,itemListId:i})}))}selectItem(t,e=""){t&&this.emit({name:"select_item",params:L([t],{itemListName:e||t.list,itemListId:t.listId})})}purchase(t,e,i={}){!e||!t||t.length===0||this.emit({name:"purchase",params:L(t,{transactionId:e,coupon:i.coupon,shipping:i.shipping,value:i.value})})}savePayHash(t,e){!t||!e||Te(`${Se}${t}`,String(e))}getPayHash(t){return t&&Ie(`${Se}${t}`)||""}savePurchaseSnapshot(t,e,i,o={}){i&&this.savePayHash(t,i),!(!t||!(e!=null&&e.length))&&(Te(`${Ee}${t}`,io(e,o)),this.beginCheckout(e,t))}getPurchaseSnapshot(t){return this.readPurchaseSnapshot(t).items}readPurchaseSnapshot(t){return t?eo(Ie(`${Ee}${t}`)):{items:[]}}sendPaidConversion({payId:t,items:e}){let i=`${Zn}${t}`;if(!t||Ie(i))return;let o=this.readPurchaseSnapshot(t),r=e!=null&&e.length?e:o.items;r.length&&this.purchase(r,t,o),this.goals.reachGoal("pay_done"),Te(i,"1");try{localStorage.removeItem(`${Ee}${t}`),localStorage.removeItem(`${Se}${t}`)}catch{}}confirmPaidFromServer({payId:t,hash:e}){if(!t)return;let i=e||this.getPayHash(t);if(e&&this.savePayHash(t,e),!i)return;let o=20,r=1500,s=0,a=async()=>{try{var l;let u=await R("/mod/pay/ajax/",{type:"GET",data:{act:"payData",pay_id:t,hash:i}});if(u.error&&u.status===3)return;if(+((l=u.pay)==null?void 0:l.pay_status)==2){let c=u.pay,p=Array.isArray(c.products)&&c.products.length?c.products:this.getPurchaseSnapshot(c.pay_id);this.sendPaidConversion({payId:c.pay_id,items:p});return}}catch{}s+=1,s<o&&setTimeout(()=>{a()},r)};a()}emit(t){this.queue.push(t);for(let e of this.listeners)e(t)}};var no={quiz:"quiz_start",modal:"modal_open",modal_form:"form_open",modal_done:"done_open",modal_product:"product_show",order_done:"order_done",pay_done:"pay_done",cart:"add_to_cart",link:"link_open",file:"file_download",close:"modal_close",app_link:"app_link_open",click:"click",video_start:"video_start",video_progress:"video_progress",video_complete:"video_complete"},Wt=class{constructor(){this.queue=[],this.listeners=[]}getGoal(t,e){return t==="modal"&&(t=this.resolveModalAction(e)),no[t]||!1}resolveModalAction(t){let{modal:e}=flexbe_cli.modal.find(t)||{modal:null},i=e?.getAttribute("data-m-id")||"",o=`${t||""} ${i}`.toLowerCase();return/done/.test(o)?"modal_done":i==="QUIZ"||/quiz/.test(o)?"quiz":i==="OPTIONS"||/product/.test(o)?"modal_product":/form/.test(o)||e!=null&&e.querySelector('[data-component="form"], form')?"modal_form":e!=null&&e.querySelector("[data-product-item], [data-product-id], .product-options-modal-content")?"modal_product":"modal"}reachGoal(t,e={}){var i;if(flexbe_cli.is_admin||!t)return;let{formData:o,...r}=e,s={goalAction:r.goalAction||"send",goalValue:(i=r.goalValue)!=null?i:""};Object.assign(s,Object.fromEntries(Object.entries(r).filter(([,l])=>l!==void 0&&l!=="")));let a={name:t,params:s};this.queue.push(a);for(let l of this.listeners)l(a);A.trigger("reach_goal",a)}reachGoals(t={},e={}){if(flexbe_cli.is_admin||flexbe_cli.vars.globals.isService||flexbe_cli.vars.globals.isBot||!flexbe_cli.p_id)return;let i=`${t.goal||""}`.trim(),o=`${t.mainGoal||""}
1`.trim(),r=`${t.htmlGoal||""}`.trim();if(o&&this.reachGoal(o,e),i)try{this.reachGoal(i,e)}catch(s){console.warn("reachGoals [goal]: ",s.message)}if(r)try{let s=r.replace(/{{\s*goalAction\s*}}/g,e.goalAction||"").replace(/{{\s*goalValue\s*}}/g,e.goalValue||"").replace(/(["']?){{\s*goalParams\s*}}\1/g,JSON.stringify(e.goalParams||{})),a=$("<div></div>").append(s).find("script");a.length&&(s=a.html()),(async u=>{let c=Object.getPrototypeOf(async()=>{}).constructor;await new c("{ goalAction, goalValue, goalParams, formData }",`{ 2 ${s} 3}`)(u)})(e).catch(u=>{console.error("Error executing action code:",u)})}catch(s){console.warn("reachGoals [htmlGoal]: ",s.message)}}subscribe(t){this.listeners.push(t);for(let e of this.queue)t(e)}};var Ut=class{constructor(t){this.inited=!1,this.stat=t}init(){this.inited||(this.inited=!0,A.on("quiz_event.stat",(t={})=>{let e=t.payload||{};if(!["step","submit"].includes(t.event)||t.event==="step"&&!e.toNext)return;let i=t.quiz,o=i.$area.attr("data-page-id"),r=t.answerGoals,s=t.resultGoals,a=t.resultGoalsData,u=i.core.id,c=e.fromAnswers||[],p=e.toId,f=e.sessionId,h=e.fromId,d=c.reduce((O,E)=>O.concat((E.variants||[]).map(S=>S.id)),[]);if(this.fixAnswer({sessionId:f,sectionId:u,answerStep:h,answerVariants:d,viewStep:p,pId:o}),r){let O="answer";c.forEach(E=>{var S;
3if((S=E.variants)!=null&&S.length)E.variants.forEach(y=>{let N=y.value;this.stat.goals.reachGoals(r,{goalAction:O,goalValue:N})});else{let y=E.value||"";["email","phone","name"].includes(E.type)&&(y=""),this.stat.goals.reachGoals(r,{goalAction:O,goalValue:y})}})}if(s){var m,g,b,_,w,I;let O=((m=i.products)==null?void 0:m.reduce((S,y)=>S+(Number(y.price)||0)*(Number(y.count)||1),0))||0,E=(g=i.$component)==null?void 0:g.find('.form-submit .component-button, [data-quiz-action="result"]').first();this.stat.goals.reachGoals(s,{...a,form_id:String(i.id||((b=i.core)==null?void 0:b.id)||""),form_name:((_=i.$form)==null||_.attr==null?void 0:_.attr("name"))||"",form_destination:((w=i.$form)==null||w.attr==null?void 0:w.attr("action"))||"",form_submit_text:(E==null||E.text==null||(I=E.text())==null?void 0:I.trim())||"",...O?{currency:flexbe_cli.vars.site.currencyData.code,value:O}:{}})}}))}fixAnswer({sectionId:t,sessionId:e,answerStep:i,viewStep:o,answerVariants:r,pId:s}){let{stat:a}=this,l;if(o&&i?l="/mod/quiz/stat/save/composite/":i?l="/mod/quiz/stat/save/answer/":o&&(l="/mod/quiz/stat/save/view/"),!l)return;this.stat.u_id?u():A.one("user_created",()=>{u()});async function u(){return R(l,{data:{s_id:flexbe_cli.s_id,group_id:flexbe_cli.group_id,f_uid:a.u_id,page_id:s||flexbe_cli.p_id,session_id:e,section_id:t,answer_step:i,answer_variants:r,view_step:o}})}}};var Oe=class{constructor(){this.goals=new Wt,this.ecommerce=new Ht(this.goals),this.AB=new jt,this.QUIZ=new Ut(this)}get u_id(){return localStorage.getItem("f_uid")||0}set u_id(t){try{localStorage.setItem("f_uid",String(t))}catch{}}init(){if(flexbe_cli.is_admin||flexbe_cli.vars.globals.isService||flexbe_cli.vars.globals.isBot||!flexbe_cli.p_id)return;let t=flexbe_cli.vars.site.delayCounters||0;setTimeout(()=>{let e=flexbe_cli.helpers.cookie.get("f_uid")||this.u_id;e?(this.u_id=e,this.visitUser()):this.createUser()},t),this.AB.init(),this.QUIZ.init()}getGoal(t,e){return this.goals.getGoal(t,e)}reachGoal(t,e={}){return this.goals.reachGoal(t,e)}reachGoals(t={},e={}){return this.goals.reachGoals(t,e)}async createUser(){try{let t={...at.data};at.referrer&&(t.referrer=at.referrer);let e=await R("/mod/stat/",{data:{s_id:flexbe_cli.s_id,group_id:flexbe_cli.group_id,p_id:flexbe_cli.p_id,utm_data:t,device:{type:flexbe_cli.run.device_type,width:flexbe_cli.resize.viewportWidth,height:flexbe_cli.resize.viewportHeight,dpi:window.devicePixelRatio,browser:navigator.userAgent}}});this.u_id=e.u_id,flexbe_cli.helpers.cookie.set("f_uid",e.u_id,{Path:"/"}),A.trigger("user_created")}catch(t){console.warn("Cookie visit not created",t)}}async visitUser(){try{let t=await R("/mod/stat/visit/",{data:{s_id:flexbe_cli.s_id,group_id:flexbe_cli.group_id,p_id:flexbe_cli.p_id,u_id:this.u_id}});t.v_id||console.warn("Visit was not registered",t)}catch(t){console.error("Visit was not registered",t)}}},ke=new Oe;var Gt="||||",xi=()=>0,oo=n=>{if(n<3)return n;let t=n%100;return t>=3&&t<=10?3:t>=11?4:5},ro=n=>{let t=n%10,e=n%100;return t===1&&e!==11?0:t>=2&&t<=4&&!(e>=12&&e<=14)?1:2},so=n=>{let t=n%10,e=n%100;return t===0||e>=11&&e<=19?0:t===1&&e!==11?1:2},ao=n=>n>=0&&n<=1?0:1,lo=n=>n>=2?1:0,co=n=>n!==1?1:0,uo=n=>n%10===1&&n%100!==11?0:n%10>=2&&n%10<=9&&(n%100<11||n%100>19)?1:2,fo=n=>n===1?0:n>=2&&n<=4?1:2,po=n=>{if(n===1)return 0;let t=n%10;return t>=2&&t<=4&&(n%100<10||n%100>=20)?1:2},ho=n=>n%10!==1||n%100===11?1:0,mo=n=>{let t=n%100;return t===1?0:t===2?1:t===3||t===4?2:3},go=n=>{if(n===1)return 0;let t=n%100;return n===0||t>=2&&t<=19?1:2}
3,_o=new Map([[["ar"],oo],[["ru","uk","bs","bs","sr","hr","be"],ro],[["fa","da","de","en","es","fi","el","he","hi","hu","hu","it","nl","no","pt","sv","tr","ka","kk","uz","af","ky","sq","az","et","sw","mn","tg","so"],co],[["fr","tl","hy","pt-br"],lo],[["lt"],uo],[["lv"],so],[["cs","sk"],fo],[["pl"],po],[["is","mk"],ho],[["sl"],mo],[["ro"],go],[["hi","zu","bn"],ao],[["id","ja","ko","lo","ms","th","zh","vi"],xi]]),vo=[..._o].reduce((n,[t,e])=>(t.forEach(i=>{n[i]=e}),n),{});function Ai(n,t){return(vo[n]||xi)(t)}var At=class{constructor(t){this.locale=void 0,this.phrases={},this.keyDelimiter="::",this.interpolateRegexp=/%([^%]*)%/g,this.warn=void 0,this.locale=t.locale||"en",this.warn=t.warn||console.warn.bind(console),this.extend(t.phrases||{})}extend(t,e){Object.entries(t).forEach(([i,o])=>{if(typeof e=="string"&&(i=`${e}${this.keyDelimiter}${i}`),typeof o=="object")this.extend(o,i);else if(o.startsWith("{")&&o.endsWith("}"))try{let r=JSON.parse(o);this.phrases[i]=["zero","one","two","few","many","other"].map(s=>r[s]).filter(s=>typeof s=="string").join(Gt)}catch{this.phrases[i]=o}else this.phrases[i]=o})}tr(t,e={}){if(t==null)return"";typeof e=="number"?e={count:e}:e.count??(e.count=1);let i="";return this.phrases[t]?i=String(this.phrases[t]):(i=String(t??""),this.warn(`Missing translation for key: ${t}`)),i.includes(Gt)&&(i=this.pluralize(i,e.count)),i.includes("%")?this.interpolate(i,e):i}pluralize(t,e){let i=Ai(this.locale,e),o=t.split(Gt);return o.at(i)||o.at(-1)}interpolate(t,e={}){return String(t).replace(this.interpolateRegexp,(i,o)=>{var r;return(r=e[o])!=null?r:i})}};var $i=At;var Ei=(n,t=2,e=",",i=".")=>{let o,r;Number.isNaN(t=Math.abs(t))&&(t=2),o=`${parseInt(n=(+n||0).toFixed(t),10)}`,(r=o.length)>3?r%=3:r=0;let s=r?o.substr(0,r)+i:"",a=o.substr(r).replace(/(\d{3})(?=\d)/g,`$1${i}`),l=t?e+Math.abs(Number(n)-Number(o)).toFixed(t).replace(/-/,"0").slice(2):"";return s+a+l},Si={dateFormat:{dateLiteral:"/",dateMask:"DD/MM/YYYY",firstDay:1,dateTimeLiteral
3:", ",hour12:!1,timeLiteral:":",timeMask:"HH:MM"},translation:{},_p:null,tr(n,t){return this._p||(this._p=new $i({locale:flexbe_cli.vars.page.language,phrases:this.translation})),this._p.tr(n,t)},parseMoney(n,t=2){let e=String(n).replace(/,/g,".").replace(/ /g,"").replace(/(?!^)-/g,"").replace(/^\./g,"0."),i=e.replace(/[^\d.]/g,""),o=((i.match(new RegExp(`\\.\\d{1,${t}}$`))||[])[0]||"").replace(/\D/g,""),r=i.replace(new RegExp(`\\.${o}$`),""),s=parseInt(r.replace(/[^\d-]/g,""),10)||0;parseInt(o,10)||(o="");let a=parseFloat(o?`${s}.${o}`:String(s));return/^-/.test(e)?-a:a},formatMoney(n,{currencyFormat:t=flexbe_cli.vars.site.currencyFormat,currencyData:e=flexbe_cli.vars.site.currencyData,freeLabel:i=!1,useNonBreakingSpace:o=!1}={}){if(n=parseFloat(n),!n&&i)return Si.tr("cart::free_price");let r=t.str,s=t.d,a=Math.abs(n)>=1e4?t.t:"",l=t.d_force||parseInt(String(n),10)!==n?e.decimals:0,u=Ei(Math.abs(n),l,s,a),c=u;return r&&(c=r.replace(":value",u).replace(":symbol",e.symbol),o&&(c=c.replace(/\s/g," "))),n<0&&(c=`-${c}`),c.trim()},formatNumber(n,t,e=this.currencyFormat){let i=e.d,o=Math.abs(n)>=1e4?e.t:"";return t=t??(e.d_force||parseInt(n,10)!==n?this.currencyData.decimals:0),Ei(n,t,i,o)},animateNumber({target:n,from:t,to:e,asMoney:i,freeLabel:o=!0,duration:r,easing:s}){if(!n)return!1;let a=$(n);t==null&&(t=this.parseMoney(a.text())||"");let l=Math.abs(t-e);if(t===e)return;if(n._animation&&(n._animation.pause(),n._animation.reset()),i&&(!e||!t)||l<3||typeof anime!="function")a.text(i?this.formatMoney(e,{freeLabel:o}):e);else{let c={value:t};r==null&&(r=Math.max(150,Math.min(l*.3,650))),s==null&&(s="linear"),n._animation=anime({targets:c,value:e,duration:r,easing:s,update:()=>{let p=Math.floor(c.value),f=i?this.formatMoney(p,{freeLabel:o}):p;a.text(f)},complete:()=>{let p=i?this.formatMoney(e,{freeLabel:o}):e;a.text(p)}})}},...flexbe_cli.locale},z=Si;var bo=".js-hover",Ii="hover",Pe={init(){this.adaptiveHoverInit(),this.initIosHacks(),this.initFontsHacks()},adaptiveHoverInit(){let n="touchstart.adaptive_hover_in";flexbe_cli.run.is_desktop&&(n=`${n} mouseenter.adaptive_hover_in`),$(document).on(n,bo,t);function t(e){if(globalThis.accessabilityEnabled)return;let i=$(e.currentTarget),o=`adaptive_hover_out_${Math.floor(Math.random()*1e6)}`;i.addClass(Ii),flexbe_cli.run.is_desktop&&i.one(`mouseleave.${o}`,r),$(document).one(`touchend.${o}`,r);function r(){i.off(`.${o}`),$(document).off(`.${o}`),i.removeClass(Ii)}}},initIosHacks(n="body"){flexbe_cli.run.is_ios&&($("> *",n).off("click.iosHacks").on("click.iosHacks",()=>!0),$("a, [data-action-target]",n).off("click.iosHacks").on("click.iosHacks",()=>!0))},initFontsHacks(){if(!flexbe_cli.run.is_android)return;let n=getComputedStyle(document.documentElement),t=parseFloat(n.getPropertyValue("--1rem")),e=parseFloat(n.getPropertyValue("font-size")),i=t/e;i!==1&&!Number.isNaN(t)&&!Number.isNaN(i)&&document.documentElement.style.setProperty("--1rem",`${t*i}px`)}};var Ti={content:"",contentAsHTML:!0,theme:"dark",animation:"fall",animationDuration:[250,180],delay:[180,100],position:"top",autoClose:!0,hideOnClick:!1,interactive:!1,distance:3,maxWidth:350,IEmin:12,trigger:"custom",triggerOpen:{click:!1,touchstart:!1,mouseenter:!0},triggerClose:{click:!1,originClick:!1,mouseleave:!0,touchleave:!0}},yo=async()=>{let n=flexbe_cli.vars,t=n.page.themeId,e=n.globals.versionId,i=async()=>{await G(["/_s/lib/jquery/tooltipster/tooltipster.patched.min.js",`/_s/build/theme/${t}/_tooltipster.css?${e}`])};if(document.readyState==="complete"){await i();return}return new Promise(o=>window.addEventListener("load",async()=>{await i(),o()},{once:!0}))},Oi={async init(n,t={}){var e,i;if(!n)return!1;await yo();let o,r=$(n),s=r[0],a={...Ti,...t,content:(e=(i=t.content)!=null?i:r.attr("data-tip"))!=null?e:s.innerHTML};a.theme=`tooltipster-${(r.attr("data-theme")||a.theme||Ti.theme).replace("tooltipster-","")}`,a.maxWidth=parseInt(r.attr("data-width")||"",10)||a.maxWidth,a.position=r.attr("data-tip-position")||a.position;let l=a.content||"";if(!$.fn.tooltipster)return console.warn("Tooltipster is not loaded"),!1;try{o=r.tooltipster("instance")}catch{}if(!(!o&&!l)){if(o)clearTimeout(o._contentTmt),l&&l!==o.content()?(o.content(l),o.enable()):l||this.destroy(n);else{if(s.tooltipstered=!0,r.tooltipster(a),o=r.tooltipster("instance"),!o)return;o.on("created",()=>{r.attr("data-tooltipstered","true"),o._$tooltip.addClass("editor-ui")}),o.on("destroy",()=>{s.tooltipstered=!1,r.removeAttr("data-tooltipstered")}),o.on("ready",()=>{o.reposition()})}return t.show&&o.open(),o}},destroy(n){if(!n)return!1;let t,e=$(n),i=e[0];try{t=e.tooltipster("instance")}catch{}
3t&&(t.destroy(),i.tooltipstered=!1,e.removeAttr("data-tooltipstered"))}};var ki=!1,Ce="f_cookies_allowed",Me=class{constructor(){this.cookieApplied=!1,this.observer=null,this.params={show:0,consent_mode:"click",use_custom_warning_text:0,custom_warning_text:"",policy_uri:"",style:"right_bottom",show_decline_button:1,decline_button_text:"",button_text:"",link_text:"",use_policy:0}}init(){setTimeout(()=>requestAnimationFrame(()=>{this.params={...this.params,...flexbe_cli.vars.site.cookiesWarning||{}},!(flexbe_cli.is_admin||flexbe_cli.vars.globals.isService||flexbe_cli.theme_id===99||!this.params.show||localStorage.getItem(Ce)||ki)&&this.createNotify()}),1e3)}createNotify(){let t=this.params,e=$("body"),i=Z.viewportHeight/2,o="/\\r\\n|\\r|\\n/g",r=flexbe_cli.scroll.latest,s=0;ki=!0,+t.use_custom_warning_text&&t.custom_warning_text?this.content=t.custom_warning_text.replace(o,"<br />"):this.content=flexbe_cli.locale.tr(t.style==="center_compact"?"cookies::compact_text":"cookies::long_text");let a=t.button_text&&t.use_custom_warning_text?t.button_text.replace(o,"<br />"):flexbe_cli.locale.tr("cookies::button"),l=t.decline_button_text&&t.use_custom_warning_text?t.decline_button_text.replace(o,"<br />"):flexbe_cli.locale.tr("cookies::button_decline"),u=t.link_text?t.link_text.replace(o,"<br />"):flexbe_cli.locale.tr("cookies::button_link"),c=t.policy_uri?t.policy_uri.replace(o,"<br />"):"/legal/cookie-policy/",p=+t.use_policy?"show":"",f=t.consent_mode==="click"||t.style!=="center_compact",h=+t.show_decline_button&&t.consent_mode==="click",d=t.style==="center_long"?"is-dark":"is-light",m=h?` 4 <div class="cookies-button decline scrollable show"> 5 ${l} 6 </div> 7 `:"",g=f?` 8 <div class="cookies-button primary scrollable show"> 9 ${a} 10 </div> 11 `:"",b=t.style==="popup"?'<div class="cookies-overlay"></div>':"",_=t.consent_mode!=="click"&&["popup","right_bottom","center_compact"].includes(t.style)?` 12 <div class="cookies-close"> 13 <svg width="14" height="14" viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg"> 14 <path d="M7 6L13 0L14 1L8 7L14 13L13 14L7 8L1 14L0 13L6 7L0 1L1 0L7 6Z"/> 15 </svg> 16 </div> 17 `:"",w=$(` 18 <div class="cookies-wrap style--${t.style} ${d}"> 19 ${b} 20 <div class="cookies-container"> 21 <div class="cookies-content scrollable"> 22 <span> 23 ${this.content} 24 <a href="${c}" target="_blank" class="cookies-button-more ${p}"> 25 ${u} 26 </a> 27 </span> 28 </div> 29 ${h||f?` 30 <div class="cookies-button-container"> 31 ${m} 32 ${g} 33 </div> 34 `:""} 35 ${_} 36 </div> 37 </div> 38 `);e.find(".cookies-wrap").remove(),e.append(w),this.setupBodyObserver(e,w),t.style==="popup"&&flexbe_cli.scroll.lock();let I=()=>{let y=$(".cookies-wrap");y.removeClass("show"),e.removeClass("cookies-warning--show"),t.style==="popup"&&flexbe_cli.scroll.unlock(),this.observer&&(this.observer.disconnect(),this.observer=null),setTimeout(()=>{y.remove()},1e3)},O=()=>{localStorage.setItem(Ce,"declined")},E=()=>{this.cookieApplied||(this.cookieApplied=!0,typeof window.applyCookies=="function"&&window.applyCookies(),localStorage.setItem(Ce,"allowed"),document.removeEventListener("scroll",S),$(document).off("click.cookies"))},S=()=>{let y=Math.max(flexbe_cli.scroll.latest-r,r-flexbe_cli.scroll.latest);clearTimeout(this.scrollTimer),this.scrollTimer=setTimeout(()=>{r=flexbe_cli.scroll.latest,s+=y,s>=i&&E()},200)};t.consent_mode==="open"?E():t.consent_mode==="interaction"&&setTimeout(()=>{document.addEventListener("scroll",S,{passive:!0})},500),w.outerWidth(),w.addClass("show"),e.addClass("cookies-warning--show"),w.on("click.cookies",".cookies-button.primary, .cookies-close",()=>{I(),E()}),w.on("click.cookies",".cookies-button.decline",()=>{O(),I()}),t.consent_mode==="interaction"&&$(document).on("click.cookies","a, [data-component]",()=>E())}setupBodyObserver(t,e){this.observer=new MutationObserver(i=>
38{i.forEach(o=>{o.type==="childList"&&e.length&&e[0]!==t.children().last()[0]&&t.append(e)})}),this.observer.observe(t[0],{childList:!0})}},Pi=new Me;var Ci=!1,lt,Mi=n=>{if(!lt.size){Ci=!1;return}requestAnimationFrame(Mi),lt.forEach((t,e)=>{if(t.last>=n)return;let i=typeof t.fps=="function"?t.fps():t.fps;(!isFinite(i)||!i||n-t.last>=1e3/i)&&(t.last=n,e(n))})};function Ni(n,t=0){return lt||(lt=new Map),lt.set(n,{last:0,fps:t}),Ci||requestAnimationFrame(Mi),()=>{lt.delete(n)}}var Ne=null,Re=null,Ri=!0,wo=100,xo=200,Ao=150,it="position-fixed",$o="position-sticky",De={locked:!1,map:[],createMap(){return $('[data-is="block"][data-fixed="true"]').toArray().map((t,e)=>{let i=$(t),o=i.attr("data-fixed-wrapper")||"self",r=i.attr("data-fixed-ignore-adaptive"),s=o==="self"?i:i.find(o),a=i.find(".fixed-area").eq(0);if(!a.length||!s.length)return null;let l=!!i.data("fixed-animation"),u=!!i.data("sticky"),c=a.closest("[data-static-contrast]").attr("data-static-contrast")||a.closest("[data-contrast]").attr("data-contrast"),p=a.closest("[data-fixed-contrast]").attr("data-fixed-contrast")||c,f=Math.round(s.outerHeight()),{top:h}=Bt(s[0])||{},d=h+f,m=f;return l&&(a.hasClass(it)?m=Math.round(a.outerHeight()):(a.addClass(it),m=Math.round(a.outerHeight()),a.removeClass(it))),{index:e,$block:i,$wrap:s,$fixed:a,top:h,bottom:d,height:f,heightFixed:m,contrastStatic:c,contrastFixed:p,isSticky:u,ignoreAdaptive:r,hasFixedAnimation:l,isFixed:!1,isReplaced:!1}}).filter(t=>{if(!t)return!1;let e=flexbe_cli.resize.responsiveMode,i=t.$block.attr("data-hidden");return!(e===i||e==="mobile"&&t.ignoreAdaptive)})},modifyMap(n,t){let e=0,i=0;return n.forEach((o,r)=>{let s=r&&n[r-1],a=Math.max(0,(s?.bottom||0)-o.top),l=t+e-a;o.isFixed=o.hasFixedAnimation?l>o.bottom+wo:l>o.top,o.fixOffset=e-a,o.isSticky&&o.isFixed&&(e+=o.heightFixed-a),o.isFixed&&(i+=o.heightFixed),o.replaceOffset=0,s&&!s.isSticky&&t+s.fixOffset+s.heightFixed>o.top&&(s.replaceOffset=Math.min(s.fixOffset+s.heightFixed,t+s.fixOffset+s.heightFixed-o.top))}),{allFixedHeight:i}},applyMap(n,t){let e=!n.applied&&!Ri;n.forEach(i=>{let o=i.$fixed[0].isFixed,r=i.isFixed,s=i.isSticky;if(flexbe_cli.run.is_preview||(r=!1,s=!1),o!==r||e)if(i.$fixed[0].isFixed=r,i.$fixed.toggleClass($o,r&&s),i.contrastStatic&&i.contrastStatic!==i.contrastFixed&&i.$fixed.attr("data-contrast",r?i.contrastFixed:i.contrastStatic),i.hasFixedAnimation)if(clearTimeout(i._fixedAnimationBouncer),r)i.$wrap.css("height",`${i.height}px`),i.$fixed.removeClass("fade-out"),!i.replaceOffset&&!i.$fixed.hasClass(it)&&(i.$fixed.addClass(`${it} fade-in`),i._fixedAnimationBouncer=setTimeout(()=>{i.$fixed.removeClass("fade-in")},xo));else{let a=t>i.height;i.$fixed.removeClass("fade-in"),!i.replaceOffset&&n.applied&&a&&i.$fixed.addClass("fade-out"),i._fixedAnimationBouncer=setTimeout(()=>{i.$wrap.css("height",""),i.$fixed.removeClass(`${it} fade-out`)},a?Ao:0)}else i.$wrap.css("height",r?`${i.height}px`:""),i.$fixed.toggleClass(it,r);if(r?(i.$fixed[0].style.setProperty("top",`${i.fixOffset}px`,"important"),i.$fixed[0].style.setProperty("transform",i.replaceOffset?`translateY(-${i.replaceOffset}px)`:"none","important")):(i.$fixed[0].style.removeProperty("top"),i.$fixed[0].style.removeProperty("transform")),o!==r){let a=i.$block[0]._core;a&&typeof a.updateTween=="function"&&a.updateTween({fixed:r})}}),Ri=!1,n.applied=!0,this.map=n},getAllFixedHeight(n){let{allFixedHeight:t}=this.modifyMap([...this.map||[]],n);return t},initFixed(){let n=this.createMap();Re=null,Ne&&Ne(),n.length&&(Ne=Ni(()=>{if(this.locked)return;let t=window.scrollY;Re!==t&&(Re=t,this.modifyMap(n,t),this.applyMap(n,t))},n.length>1?90:30))},init(){new ResizeObserver(()=>{this.initFixed()}).observe(document.body)},lock(){this.locked=!0},unlock(){this.locked=!1}};function P(n,t){if(!{}.hasOwnProperty.call(n,t))throw new TypeError("attempted to use private field on non-instance");return n}var Eo=0;function So(n){return"__private_"+Eo+++"_"+n}var v=So("instance"),Fe=class{static create(t){return new this(t)}constructor(t){if(Object.defineProperty(this,v,{writable:!0,value:null}),this.form=null,this.field=null,this.form=t.closest(".component-form"),this.field=t,!this.form)throw new Error("Form element not found in core area");let e=flexbe_cli.components.initComponent(this.form,"init");if(!e)throw new Error("Failed to initialize form component");P(this,v)[v]=e}ensureInited(){if(!P(this,v)[v].formInited)throw new Error("Form instance is not initialized")}get fields(){return P(this,v)[v].$listField.toArray()}get button(){var t;let e=(t=P(this,v)[v].$button)==null?void 0:t[0];return e instanceof HTMLButtonElement?e:null}get isSubmitDisabled(){return P(this,v)[v].submitDisabled}setFields(t){P(this,v)[v].addFields(t,"user")}resetFields(){P(this,v)[v].resetFields("user")}resetErrors(){P(this,v)[v].removeFieldsErrors()}resetForm(){P(this,v)[v].resetForm()}validateForm(){return P(this,v)[v].validateForm()}disableSubmit(t){P(this,v)[v].disableSubmit(t)}enableSubmit(){P(this,v)[v].enableSubmit()}submit(){this.ensureInited(),P(this,v)[v].$form.trigger("submit")}on(t,e){return P(this,v)[v].on(t,e),this}one(t,e){return P(this,v)[v].one(t,e),this}off(t,e){return P(this,v)[v].off(t,e),this}},Di=Fe;var Le=class{constructor(t,e={}){this.components=null,this.inited=!1,this.updated=!1,this.loaded=!1,this.ready=!1,this.isPure=!1,this.isVisible=null,this.inScreen=!1,this.inBeside=!1,this.inView=!1,this.inFocus=!1,this.wasVisible=null,this.wasScreen=!1,this.wasBeside=!1,this.wasView=!1,this.wasFocus=!1,this.$area=void 0,this.area=void 0,this.$content=void 0,this.content=void 0,this.$root=void 0,this.root=void 0,this.is=void 0,this.id=void 0,this.template_id=void 0,this.tween=void 0,this.type=void 0;let i=$(t),o=i.attr("data-is"),r=i.attr("data-id"),s=o==="zone"?"e":o[0],a=i.attr(`data-${s}-id`);this.$area=i,this.area=i[0],this.$content=i,this.content=this.$content[0],this.$root=i,this.root=i[0],this.is=o,this.id=r,this.template_id=a,this.tween={},this.type=JSON.parse(i.attr(`${s}-type`)||"[]"),Object.keys(e).forEach(l=>{let u=Object.getOwnPropertyDescriptor(e,l);if("value"in u){let c=e[l];typeof c=="object"?this[l]=$.extend(!0,Array.isArray(c)?[]:{},c):this[l]=c}else Object.defineProperty(this,l,u)}),["_onVisible","_onBeside","_onFocus","_onScreen","_onView","_onResize","_onOpen","_onClose","_sendEvent"].forEach(l=>{this[l]=this[l].bind(this)})}onInit(t){}onUpdate(t){}onLoad(t){}onDestroy(t){}onVisible(t){}onBeside(t){}onFocus(t){}onScreen(t){}onView(t){}onResize(t){}onOpen(t){}onClose(t){}onMsg(t,e){}init(t="init",e={}){this.components=(this.components||[]).filter(i=>i&&typeof i=="function"),t==="init"?this._onInit(e):t==="update"&&this._onUpdate(e),this._inheritEvents(),(t==="init"||t==="update"&&e.templateRendered)&&this._onLoad(e)}_inheritEvents(){"onHideShowUI"in this&&(flexbe_cli.events.off(`hide
38ShowUI.core_${this.id}`),flexbe_cli.events.on(`hideShowUI.core_${this.id}`,t=>{var e;return(e=this.onHideShowUI)==null?void 0:e.call(this,t)}))}_sendEvent(t,e){let i=new CustomEvent(t,{detail:e});this.area.dispatchEvent(i)}_onInit(t){this.inited=!0,this.onInit(t),this._sendEvent("init",t),requestAnimationFrame(()=>this.updateTween())}_onUpdate(t){this.inited=!0,this.onUpdate(t),this._sendEvent("update",t),this.updateTween({force:!0})}_onLoad(t){this.loaded=!0,this.onLoad(t),this._sendEvent("load",t)}_onResize(t={}){this.isVisible&&(this.onResize(t),this._sendEvent("resize",t))}_onDestroy(t){this.$area.off(".inherit"),this.onDestroy(t),this._sendEvent("destroy",t)}_onMsg(t,e){this.onMsg(t,e)}_onVisible({state:t,force:e}){if(this.isVisible==null){this.isVisible=t,this.wasVisible=t;return}if(this.isVisible===t&&!e)return;let i=t?!this.wasVisible:void 0,o=i==null?{state:t}:{state:t,first:i};this.isVisible=t,this.onVisible(o),this._sendEvent("visible",o),t&&(this.wasVisible=!0)}_onFocus({state:t,force:e}){if(this.isVisible||(t=!1),this.inFocus===t&&!e)return;let i=t?!this.wasFocus:void 0,o=i==null?{state:t}:{state:t,first:i};this.inFocus=t,this.onFocus(o),this._sendEvent("focused",o),t&&(this.wasFocus=!0)}_onScreen({state:t,force:e}){if(this.isVisible||(t=!1),this.inScreen===t&&!e)return;let i=t?!this.wasScreen:void 0,o=i==null?{state:t}:{state:t,first:i};this.inScreen=t,this.onScreen(o),this._sendEvent("screen",o),t&&(this.wasScreen=!0)}_onView({state:t,force:e}){if(this.isVisible||(t=!1),this.inView===t&&!e)return;let i=t?!this.wasView:void 0,o=i==null?{state:t}:{state:t,first:i};this.inView=t,this.is==="block"&&i&&requestAnimationFrame(()=>{qt.startTransitions(this.$area)}),this.onView(o),this._sendEvent("view",o),t&&(this.wasView=!0)}_onBeside({state:t,force:e}){if(this.isVisible||(t=!1),this.inBeside===t&&!e)return;let i=t?!this.wasBeside:void 0,o=i==null?{state:t}:{state:t,first:i};this.inBeside=t,this.onBeside(o),this._sendEvent("beside",o),t&&(this.wasBeside=!0)}updateTween(t={}){}_onOpen(t){this.updateTween(),this.onOpen(t),this._sendEvent("open",t)}_onClose(t){this.updateTween(),this.onClose(),this._sendEvent("close",t)}},X=Le;var ze=class extends X{constructor(t,e){super(t,e),this.is="block",this.$block=this.$area,this.$content=this.$area.find("> .container-fluid").addBack().last(),this.content=this.$content[0],this.abtestVariant=this.$area.attr("data-abtest-variant"),this.abtestId=this.abtestVariant&&this.$area.attr("data-abtest-id")}_onUpdate(t){this.$content=this.$area.find("> .container-fluid").addBack().last(),this.content=this.$content[0],super._onUpdate(t)}updateTween({force:t=!1,fixed:e=!1}={}){if(!this.inited)return!1;let i=this.area,o=0,r=i.offsetWidth,s=i.offsetHeight;for(;i;)o+=i.offsetTop,i=i.offsetParent;let a=o+s,l=!!(r||s),u=this.tween.width==null&&this.tween.height==null,c=t||r!==this.tween.width||s!==this.tween.height,p=_(),f=w(),h=I();this.tween.start=o,this.tween.end=a,this.tween.width=r,this.tween.height=s,this.tween.position=p,this.tween.positionAbs=f,this.tween.positionCenter=h;let d=l&&h>0&&h<1,m=d||E(),g=m||O(),b=g||S();return this._onVisible({state:l}),!u&&c&&this._onResize({force:t}),this._onBeside({force:t,state:b}),this._onScreen({force:t,state:g}),this._onView({force:t,state:m}),this._onFocus({force:t,state:d}),this._sendEvent("tween",{tween:this.tween,force:t}),c;function _(){return 1/(s||1)*(flexbe_cli.scroll.latest-o)}function w(){let y=o-flexbe_cli.resize.viewportHeight;return 1/(a-y)*(flexbe_cli.scroll.latest-y)}function I(){let y=s||1,N=flexbe_cli.scroll.latest+flexbe_cli.resize.viewportHeight/2,ot=o+y/2;return(N-ot+y/2)/y}function O(){return e?!0:f>=0&&f<=1}function E(){if(e)return!0;let y=Math.min(s/3,flexbe_cli.resize.viewportHeight/4);return flexbe_cli.scroll.latest+flexbe_cli.resize.viewportHeight>=o+y&&flexbe_cli.scroll.latest<=a-y}function S(){if(e)return!0;let y=Math.max(s/2,flexbe_cli.resize.viewportHeight/3);return flexbe_cli.scroll.latest+flexbe_cli.resize.viewportHeight>o-y&&flexbe_cli.scroll.latest<a+y}}},Fi=ze;var Ve=class extends X{constructor(t,e){super(t,e),this.is="element";let i=this.$area.closest("[data-cloned]");this.isClone=i.attr("data-cloned")||!1,this.$content=this.$area.find(">
38 .element-content").addBack().last(),this.content=this.$content[0],this.$root=this.$area.closest(".b_block, .m_modal, .w_widget"),this.root=this.$root[0];let o=flexbe_cli.entity.closestEntity(this.area.parentNode);o?(this.$parent=o.$area,this.parent=o.area):(this.$parent=this.$area.parents("[data-is]").eq(0),this.parent=this.$parent[0],console.warn("Parent core instance not created for element",this.area))}_onUpdate(t){this.$area.off(`.inherit.${this.id}`),this.$content=this.$area.find("> .element-content").addBack().last(),this.content=this.$content[0],super._onUpdate(t)}_onDestroy(t){super._onDestroy(t),this.$area.off(".inherit"),this.$parent.off(`.inherit.${this.id}`)}_inheritEvents(){super._inheritEvents();let t=`.inherit.${this.id}.${this.isClone?`clone${Number(this.isClone)}`:"original"}`;this.$parent.off(t),this.$parent.on(`tween${t}`,e=>{this.updateTween(e.detail||{})}),["visible"].forEach(e=>{this.$parent.on(`${e}${t}`,()=>{this.updateTween({})})}),["_onOpen","_onClose","_onDestroy"].forEach(e=>{let i=`${e.replace("_on","").toLowerCase()}${t}`;this.$parent.on(i,(o,...r)=>{!r.length&&o.detail&&(r[0]=o.detail),this[e](...r)})})}updateTween({force:t}={}){let e=this.content||this.area,i=this.parent&&this.parent._core,o=this.root&&this.root._core;if(!i||!this.inited)return;let r=this.tween.width==null&&this.tween.height==null,s=i.isVisible,a=i.inBeside,l=a,u=l,c=l,p=!1;if(!(r&&i.isVisible&&!a)){if(s&&a){let f=e.offsetWidth,h=e.offsetHeight,d=flexbe_cli.resize.viewportHeight;if(s=!!(f||h),p=t||f!==this.tween.width||h!==this.tween.height,this.tween.width=f,this.tween.height=h,s&&o&&o.is==="block"){let{top:m,bottom:g}=e.getBoundingClientRect();a=g>-(d/3)&&m<d+d/3,l=a&&l&&g>0&&m<d,c=l&&c&&m<=d/2&&m+h>=d/2;let b=Math.min(h/3,flexbe_cli.resize.viewportHeight/4);u=c||l&&u&&m+b>0&&g-b<d}}this.isVisible!==s&&this._onVisible({force:t,state:s}),!r&&p&&this._onResize({force:t}),this._onBeside({force:t,state:a}),this._onScreen({force:t,state:l}),this._onView({force:t,state:u}),this._onFocus({force:t,state:c}),this._sendEvent("tween",{tween:this.tween,force:t})}}},Be=Ve;var Io=()=>{if(flexbe_cli.is_admin){var n;if((((n=window.parent.flexbe)==null||(n=n.modal)==null?void 0:n.visible)||[]).length)return!1}return!0},F={opened:new Map,$list:$(".modal-list"),init(){let n=new URLSearchParams(location.search).get("m_id");if(flexbe_cli.vars.globals.isScreenshot&&n)return this.$list.addClass("noanimate"),this.open({id:n}),!1;this.dispatchEvents()},dispatchEvents(){let n=$("body");n.on("bringIntoView.core-modal",".m_modal",r=>{let s=r.currentTarget,a=s.dataset.id,l=s.dataset.pageId;a&&this.open({id:a,pageId:l})}),flexbe_cli.events.on("ui_modal_open.core_modal",r=>{this.open(r)}),flexbe_cli.events.on("ui_modal_close.core_modal",r=>{this.close(r)}),n.on("click.modal-close",".m_modal .close",r=>{r.preventDefault();let a=$(r.currentTarget).closest(".m_modal.show").attr("data-id");a&&this.close({id:a})});let t,e,i=null,o={x:0,y:0};n.off(".modal-close-overlay"),n.on("click.modal-close-clickout",".container-list",r=>{!flexbe_cli.run.is_preview||!this.opened.size||(r.preventDefault(),r.stopPropagation(),this.opened.forEach((s,a)=>{var l;let u=this.find(a);u!=null&&(l=u.modal)!=null&&l.hasAttribute("data-clickout")&&this.close({id:u.modal.id})}))}),n.on("pointerdown.modal-close-overlay pointerup.modal-close-overlay","[data-overlay]",r=>{if(!(!flexbe_cli.run.is_preview||!this.opened.size))if(r.type==="pointerdown"){let s=document.body.getBoundingClientRect(),a=r.target;i=r.target===r.currentTarget||$(a).is(".modal-data")?a:null,o={x:r.pageX,y:r.pageY},t=a.clientWidth<=r.pageX,e=s.left>o.x||s.right<o.x}else i===r.target&&!t&&!e&&Math.sqrt((r.pageX-o.x)**2+(r.pageY-o.y)**2)<10&&setTimeout(()=>{let s=$(i).closest(".m_modal").attr("data-id");s&&this.close({id:s})},50)}),$(window).off(".modal-close-esc").on("keyup.modal-close-esc",r=>{if(flexbe_cli.run.is_preview&&r.which===27&&Io()&&this.opened.size){let s=[...this.opened.keys()].at(-1);s&&this.close({id:s})}})},find(n,t){var e;if(!((e=this.$list)!=null&&e.length))return null;let i=this.$list.find(`[data-id="${n}"]`),o=this.$list.find(`._anchor[name="${n}"]`).closest(".m_modal"),r=i.length?i:o;if(r.length>1&&t){let l=r.filter((u,c)=>$(c).attr("data-page-id")===t);l.length&&(r=l)}let s=r.toArray(),a=s[0];
38return a?{modals:s,modal:a}:null},open({id:n,pageId:t,data:e={},options:i={}}){if(!n)return!1;let o=this.find(n,t);if(!o)return console.warn("Modal not found",n),!1;let{modal:r}=o,s=ct.bind(r);if(!s)return console.warn("Modal without core object,",`id: ${n},`,"modal: ",r),!1;let a=[...this.opened.keys()].at(-1);return!i.rise&&a&&a!==n&&this.close({id:a,openId:n}),this.opened.has(n)||(this.opened.set(n,{fromId:a,data:e,options:i}),s.open({fromId:a,data:e,options:i})),s.$area.css("zIndex",this.opened.size),!0},close({id:n,openId:t}={}){if(!n){this.opened.forEach((o,r)=>{r!==t&&this.close({id:r,openId:t})});return}if(!this.opened.has(n))return!1;this.opened.delete(n);let e=this.find(n);if(!e)return;let{modals:i}=e;return i.forEach(o=>{let r=ct.bind(o);if(!r)return console.warn("Modal doesnt have core object"),!1;r.close({openId:t}),r.$area.css("zIndex","")}),!0}};var Li=(n,t=0)=>(...e)=>new Promise(i=>{setTimeout(()=>i(n(...e)),t)}),ut=(n,t=0)=>flexbe_cli.is_admin?n:Li(n,t),M=(n,t=0,...e)=>Li(n,t)(...e),dt=(n,t=0,...e)=>ut(n,t)(...e),$t=(n,t=1)=>Array.from({length:Math.ceil(n.length/t)},(e,i)=>n.slice(i*t,i*t+t));var qe=class extends X{constructor(t,e){super(t,e),this.is="modal",this.isOpen=!1,this.$modal=this.$area}_onInit(t){super._onInit(t),flexbe_cli.is_admin&&F.opened.has(this.id)&&this.open(F.opened.get(this.id))}open({fromId:t,data:e,options:i={}}={}){var o,r;if(this.isOpen)return;clearTimeout(this._openCloseAnimation),this.lastOptions=i,this.lastScroll=B.latest;let s=this.$area.find(".modal-data > ._anchor").attr("name")||this.id;(i.hash||i.hash==null)&&(flexbe_cli.lockPopstate=!0,window.history.pushState(null,null,`#${s}`),flexbe_cli.lockPopstate=!1),F.$list.addClass("show"),this.$area.removeClass("hide animation-backwards noanimate"),this.$area.addClass("show"),flexbe_cli.run.is_preview&&this.$area.addClass("animation-forwards"),$("body").addClass("is-modal-open"),$('[data-w-id="CART"].show, .w_widget.show').length&&F.$list.addClass("rise");let a=this.$modal.find(".component-button").eq(0),l=(o=(r=a.offset())==null?void 0:r.top)!=null?o:0;!flexbe_cli.run.is_screen_mobile&&flexbe_cli.run.is_preview&&flexbe_cli.resize.viewportHeight>l+100&&a.focus(),this._openCloseAnimation=setTimeout(()=>{this.isOpen=!0,this.$area.hasClass("pointerless")||B.lock(),F.$list.addClass("overlay"),this._onOpen({data:e}),this._onBeside({state:!0}),this._onScreen({state:!0}),this._onView({state:!0}),this._onFocus({state:!0}),typeof i.onOpen=="function"&&i.onOpen(),A.trigger("modal_opened",{id:this.id,fromId:t,data:e,options:i}),this._openCloseAnimation=null},16)}close({openId:t}={}){if(!this.isOpen)return;clearTimeout(this._openCloseAnimation);let e=this.lastOptions,i=!t&&!this.$area.siblings(".show").length;this.isOpen=!1,this.lastOptions={},(e.hash||e.hash==null)&&i&&/^#{1,2}/.test(window.location.hash)&&(flexbe_cli.lockPopstate=!0,window.history.replaceState(null,null,window.location.pathname),flexbe_cli.lockPopstate=!1),this.$area.removeClass("animation-forwards").addClass("noanimate");let o=parseInt(this.$area.css("--animationDuration"),10)||450;this.$area.removeClass("show noanimate"),flexbe_cli.run.is_preview&&this.$area.addClass("animation-backwards"),this._onClose(),this._onBeside({state:!1}),this._onScreen({state:!1}),this._onView({state:!1}),this._onFocus({state:!1}),typeof e.onClose=="function"&&e.onClose(this),A.trigger("modal_closed",{id:this.id,openId:t}),this._openCloseAnimation=setTimeout(()=>{this.$area.removeClass("show hide animation-backwards"),F.opened.size||(F.$list.removeClass("show rise overlay fade-out"),this.$area.hasClass("pointerless")||B.unlock(),$("body").removeClass("is-modal-open")),flexbe_cli.run.is_screen_mobile&&window.scrollTo(0,this.lastScroll),this._openCloseAnimation=null},flexbe_cli.is_admin?0:o)}updateTween({force:t}={}){if(!this.inited)return!1;let e=this.area,i=e.offsetWidth,o=e.offsetHeight,r=this.tween.width==null&&this.tween.height==null,s=t||i!==this.tween.width||o!==this.tween.height,a=this.isOpen;return this.tween.width=i,this.tween.height=o,this._onVisible({force:t,state:a}),dt(()=>{!r&&s&&this._onResize({force:t}),this._onBeside({force:t,state:a}),this._onScreen({force:t,state:a}),this._onView({force:t,state:a}),this._onFocus({force:t,state:a})}),dt(this._sendEvent,0,"tween",{tween:this.tween,force:t}),s}},zi=qe;function j(n,t){if(!{}.hasOwnProperty.call(n,t))throw new TypeError("attempted to use private field on non-instance");return n}var To=0;function je(n){return"__private_"+To+++"_"+n}var Oo=["id","is","area","content","isVisible","inBeside","inView","inFocus","inScreen","wasBeside","wasFocus","wasScreen","wasView","wasVisible"],ko={beside:"beside",screen:"screen",view:"view",focus:"focused",visible:"visible",resize:"resize",open:"open",close:"close"};function Vi(n){return n.split(" ").map(t=>{let[e,...i]=t.split(".");return[ko[e]||e,...i,"publicApi"].join(".")}).join(" ")}var H=je("instances"),nt=je("core"),Et=je("callbacks"),ft=class n{static create(t){return j(n,H)[H][t.id]&&j(n,H)[H][t.id].destroy(),j(n,H)[H][t.id]=new n(t),j(n,H)[H][t.id]}get size(){return{width:j(this,nt)[nt].tween.width,height:j(this,nt)[nt].tween.height}}constructor(t){Object.defineProperty(this,nt,{writable:!0,value:void 0}),Object.defineProperty(this,Et,{writable:!0,value:new Map}),j(this,nt)[nt]=t;let e=Oo.reduce((i,o)=>{let r={...i};return r[o]={enumerable:!0,get(){return t[o]}},r},{});Object.defineProperties(this,e)}trigger(t,e){if(!t||typeof t!="string")return this;let i=new CustomEvent(t,{detail:e});return this.area.dispatchEvent(i),this}on(t,e){if(!t||typeof t!="string"||typeof e!="function")return this;let i=Vi(t),o=r=>e.call(this,r.detail||r.originalEvent,r.originalEvent||r);return $(this.area).on(`${i}`,o),j(this,Et)[Et].set(e,o),this}off(t,e){let i=Vi(t);return typeof e=="function"?$(this.area).off(i,j(this,Et)[Et].get(e)):$(this.area).off(i),this}destroy(){$(this.area).off(".publicApi")}};Object.defineProperty(ft,H,{writable:!0,value:{}});var He=class extends X{constructor(t,e){super(t,e),this.is="widget",this.$widget=this.$area}updateTween({force:t}={}){if(!this.inited)return!1;let e=this.area,i=e.offsetWidth,o=e.offsetHeight,r;this.isOpen!=null?r=!!this.isOpen:r=!!(i||o);let s=this.tween.width==null&&this.tween.height==null,a=!!t||i!==this.tween.width||o!==this.tween.height;
38return a&&(this.tween.width=i,this.tween.height=o),this._onVisible({force:t,state:r}),dt(()=>{!s&&a&&this._onResize({force:t}),this._onBeside({force:t,state:r}),this._onScreen({force:t,state:r}),this._onView({force:t,state:r}),this._onFocus({force:t,state:r})}),dt(this._sendEvent,0,"tween",{tween:this.tween,force:t}),a}},Bi=He;var Ue=new WeakMap,We=new WeakMap;function qi(n,t,e){Ue.set(n,setTimeout(()=>{Ue.delete(n),e&&e()},t))}function pt(n,t,e=80){let i=typeof n=="object"?n:document.querySelector(`[data-id="${n}"]`),o=i?._core;if(o){if(Ue.get(o)){We.set(o,!0);return}o.updateTween({force:t}),qi(o,e,()=>{We.get(o)&&(We.set(o,!1),o.updateTween({force:t}),qi(o,e))})}}var ji={block:Fi,modal:zi,widget:Bi,element:Be,zone:Be},Hi={block:"data-b-id",modal:"data-m-id",widget:"data-w-id",zone:"data-e-id",element:"data-e-id",default:"data-t-id"},Po=["beside","screen","focus","visible"],Wi=new Map,Ui=new WeakMap;function Gi(n){let t="[data-is]",e=$(n);return[...e.filter(t).toArray(),...e.find(t).toArray()]}function Co(n){return n._core}var ct={async init(){this._dispatchEvents(),await Promise.all([this.initArea($(".w_widget")),this.initArea(flexbe_cli.block.$list)]),await this.initArea(flexbe_cli.modal.$list)},async initArea(n,t={}){_i(n);let e=Gi(n),i=await Promise.all($t(e,200).map(ut(r=>r.map(s=>this.bind(s,t))))),o=(await Promise.all(i.flat())).filter(Boolean);return await Promise.all(o.map(async r=>r.loaded||new Promise(s=>r.area.addEventListener("load",s,{once:!0})))),flexbe_cli.components.initInArea(n,t.templateRendered?"update":"init"),o},destroyArea(n,t={}){Gi(n).forEach(i=>{let o=i._core;o&&(o._onDestroy(t),delete i._core)}),flexbe_cli.components.destroyInArea(n)},setClientJs(n,t,e){var i;Wi.set(`${n}:${t}`,e),(i=e.components)==null||i.forEach(o=>{flexbe_cli.components.registerComponent(o)})},getClientJs(n,t){return n==="zone"&&(n="element"),Wi.get(`${n}:${t}`)},bind(n,t={},e=!1){var i;if(!(n!=null&&n.getAttribute))return null;let o=n.getAttribute("data-is");o=o==="zone"?"element":o;let r=n.getAttribute(Hi[o]||Hi.default);if(!r||!(o in ji))return null;let s=!((i=n._core)!=null&&i.inited),a=!s&&(t.templateRendered||t.styleRendered),l=this.getClientJs(o,r)||{};if(l.isPure&&!e&&!n._core)return null;let u=Co(n)||new ji[o](n,l);return n._core=u,u&&(s||a)&&u.init(a?"update":"init",t),u},closestEntity(n,t=!1){let e;for(;n&&!e;){var i;if(n=(i=n)==null?void 0:i.closest("[data-id]"),!n||(e=this.bind(n,{},t),e))break;n=n.parentNode}return e},_dispatchEvents(){if(flexbe_cli.events.off(".core_entity"),flexbe_cli.events.on("forceUpdateTween.core_entity",(n,t)=>{pt(n,t)}),flexbe_cli.is_admin){let n=t=>document.querySelector(`[data-id="${t}"]`);flexbe_cli.events.on("layout_change.core_entity",t=>{t.action==="remove"&&this.destroyArea(n(t.id),t)}),flexbe_cli.events.on("entity_render:template:before.core_entity",async(t={})=>{let e=n(t.id);e&&this.destroyArea(e,t)}),flexbe_cli.events.on("entity_render:template.core_entity",async t=>{let e=n(t.id);e&&await this.initArea(e,t)}),flexbe_cli.events.on("client_msg.core_entity",t=>{if(!(t!=null&&t.id)||!t.is)return;let e=n(t.id);e!=null&&e._core&&e._core._onMsg(t.msg,t.data)})}},createPublicAPI(n){let t,e=()=>(t||(t=document.querySelector(`[data-id="${n}"]`)),t),i=a=>{let l=this.closestEntity(a,!0);if(!l)return null;let u=Ui.get(l);return u?u.destroy():(u=ft.create(l),Ui.set(l,u)),u},r={require:G,subscribe:(a,l,u)=>{let c=e();Po.includes(a)&&i(c);let p=new AbortController,f=()=>p.abort(),h=d=>{var m;if(!d.currentTarget.contains(d.target))return;d.stopPropagation();let g=(m=d.detail.state)==null||m?"in":"out";(!u.state||u.state==="all"||u.state===g)&&(l(d),u.once&&f())};return c.addEventListener(a,h,{signal:p.signal}),f},sectionApi:null,modalApi:null,widgetApi:null,elementApi:null,formApi:null,isEditor:flexbe_cli.is_admin,isView:!flexbe_cli.is_admin},s={get:(a,l,u)=>{let c=e();return l==="elementApi"?i(c.closest(".element-item")):l==="sectionApi"?i(c.closest(".b_block")):l==="modalApi"?i(c.closest(".m_modal")):l==="widgetApi"?i(c.closest(".w_widget")):l==="formApi"?Di.create(c):Reflect.get(a,l,u)}};return new Proxy(r,s)}};var Ge={$list:$(".container-list").eq(0),$blocks:$(".b_block"),init(){this.dispatchEvents()},dispatchEvents(){let n=()=>{this.$blocks.each((t,e)=>pt(e,!1))};$(window).on("resized.flexbe_block",$.debounce(()=>n(),20)),$(document).on("documentresized.flexbe_block",$.debounce(()=>n(),20)),window.addEventListener("scroll",$.throttle(()=>{this.$blocks.each((t,e)=>pt(e,!1))},96),{passive:!0}),flexbe_cli.is_admin&&flexbe_cli.events.off("layout_change.flexbe_block").on("layout_change.flexbe_block",t=>{!t||!["layout","block"].includes(t.is)||(this.$blocks=$(".b_block"),this.$blocks.each((e,i)=>pt(i,!1)))})}};var Ye=n=>typeof n=="string"?new Date(n.slice(0,19).replace("T"," ")):n,Yt=({date:n,timezone:t,format:e="date"})=>
38{if(!n||!t)return null;let i=new Date(Ye(n)),o=new Date,r=new Date(o.toLocaleString("en-US",{timeZone:t}));o.setMilliseconds(0),r.setMilliseconds(0);let s=o.getTime()-r.getTime(),a=i.getTime()-s;return e==="milliseconds"?a:new Date(a)};var Yi=(n,t,e)=>!Array.isArray(t)||!Array.isArray(e)||t.length!==e.length?!1:t.every((i,o)=>n?e.includes(i):e[o]===i);var Ya=Yi.bind(null,!0),Xa=Yi.bind(null,!1);var Ro={click:globalThis.MouseEvent,auxclick:globalThis.MouseEvent,dblclick:globalThis.MouseEvent,mousedown:globalThis.MouseEvent,mouseup:globalThis.MouseEvent,mouseover:globalThis.MouseEvent,mousemove:globalThis.MouseEvent,mouseout:globalThis.MouseEvent,mouseenter:globalThis.MouseEvent,mouseleave:globalThis.MouseEvent,contextmenu:globalThis.MouseEvent,keydown:globalThis.KeyboardEvent,keyup:globalThis.KeyboardEvent,keypress:globalThis.KeyboardEvent,focus:globalThis.FocusEvent,blur:globalThis.FocusEvent,focusin:globalThis.FocusEvent,focusout:globalThis.FocusEvent,input:globalThis.InputEvent,change:globalThis.Event,submit:globalThis.Event,reset:globalThis.Event,touchstart:typeof globalThis.TouchEvent=="function"?globalThis.TouchEvent:globalThis.Event,touchmove:typeof globalThis.TouchEvent=="function"?globalThis.TouchEvent:globalThis.Event,touchend:typeof globalThis.TouchEvent=="function"?globalThis.TouchEvent:globalThis.Event,touchcancel:typeof globalThis.TouchEvent=="function"?globalThis.TouchEvent:globalThis.Event,scroll:globalThis.UIEvent,resize:globalThis.UIEvent,select:globalThis.UIEvent,wheel:globalThis.WheelEvent,drag:globalThis.DragEvent,dragstart:globalThis.DragEvent,dragend:globalThis.DragEvent,dragenter:globalThis.DragEvent,dragover:globalThis.DragEvent,dragleave:globalThis.DragEvent,drop:globalThis.DragEvent,copy:globalThis.ClipboardEvent,cut:globalThis.ClipboardEvent,paste:globalThis.ClipboardEvent,custom:globalThis.CustomEvent};function Do(n,t,e){var i;let o=(i=Ro[t])!=null?i:Event,r=new o(String(t),e);return[n.dispatchEvent(r),r]}function Xe(n,t={}){return n?Do(n,t.type||"click",{bubbles:t.bubbles,cancelable:t.cancelable,composed:t.composed,screenX:t.screenX,screenY:t.screenY,clientX:t.clientX,clientY:t.clientY,ctrlKey:t.ctrlKey,shiftKey:t.shiftKey,altKey:t.altKey,metaKey:t.metaKey,button:t.button,buttons:t.buttons,relatedTarget:t.relatedTarget}):!1}var Fo=n=>crypto.getRandomValues(new Uint8Array(n)),Lo=(n,t,e)=>{let i=256-256%n.length;if(i===256){let r=n.length-1;return(s=t)=>{if(!s)return"";let a="";for(;;){let l=e(s),u=s;for(;u--;)if(a+=n[l[u]&r],a.length>=s)return a}}}let o=Math.ceil(1.6*256*t/i);return(r=t)=>{if(!r)return"";let s="";for(;;){let a=e(o),l=o;for(;l--;)if(a[l]<i&&(s+=n[a[l]%n.length],s.length>=r))return s}}},Xi=(n,t=21)=>Lo(n,t|0,Fo);var zo="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",nl=Xi(zo,8),ol=typeof crypto<"u"&&typeof crypto.getRandomValues=="function"?()=>crypto.getRandomValues(new Uint8Array(1))[0]&15:()=>Math.floor(Math.random()*16);var Ke=(n=>{if(typeof process<"u"&&(n=process.env)!=null&&n.LOG_LEVEL){let t=process.env.LOG_LEVEL.toLowerCase();if(["debug","info","warn","error"].includes(t))return t}return"error"})();function Vo(n){let t=`[${n}]`;return{debug:(...e)=>{["debug"].includes(Ke)&&console.debug(t,...e)},info:(...e)=>{["debug","info"].includes(Ke)&&console.info(t,...e)},warn:(...e)=>{["debug","info","warn"].includes(Ke)&&console.warn(t,...e)},error:(...e)=>{console.error(t,...e)}}}var al=Vo("App");function Ji(n,t=!1){let e=$(n),i=t?{}:e.data("product");if(i===!1)return!1;if(i||(i=$(n).closest("[data-product-item]").find("[data-product-action]").data("product")),(i==null||typeof i!="object"||Array.isArray(i))&&(i={img:e.attr("data-product-image"),title:e.attr("data-product-name"),price:e.attr("data-product-price"),count:e.attr("data-product-count"),productId:e.attr("data-product-id"),variantId:e.attr("data-variant-id")}),typeof i=="object"&&!i.strict){let r;if(flexbe_cli.theme_id===4?(r=e.closest(".content-zone, .flexbe-card, .flexbe-column, .modal-content"),r.length||(r=e.parents("[data-item-id]").last())):r=e.closest("[data-item-id], .modal-data").eq(0),i={...i},i.count||(i.count=1),t||!i.img){let s=a=>{let l=a.find("[data-img-id]").eq(0),u=l.attr("data-img-id"),c=l.attr("data-img-ext"),p=c?null:l.attr("data-img-name");return u?{id:u,ext:c,name:p}:null};i.img=s(r)||s(r.closest(".flexbe-row"))}if(t||!i.title){var o;let s=r.find(".name, .title, .item-title, .text_title, .element-text--title, .text-style-h1, .text-style-h2, .text-style-h3, .text-style-h4, .text-style-title, .text-style-subtitle").not(".text-rotator").eq(0);s.length||(s=r.find('[class*="font-family-"]').eq(0)),i.title=((o=s[0])==null?void 0:o.innerText.trim())||""}if(t||!i.price&&i.price!==0){let s=a=>{let l=a.clone();flexbe_cli.is_admin&&l.find('[class*="editor-"]').remove(),l.find(".text-rotator").remove(),l.find(".component-image").remove(),l.find("del, s, str
38ike").remove();let u=String(l[0]&&l[0].innerText||"").replace(/\n/g,"<br>").replace(/\.$/,"").replace(/\u00a0/g," "),c=u.match(/(?:\d?\D{0,2} ?)?[1-9](?:[ ,.]?\d{0,3}){2}(?:[,.]\d{1,2})?(?: ?\D)?/g)||[];return u=c.find(p=>p.includes(flexbe_cli.vars.site.currencyData.symbol))||c[0]||"",u=(u.match(/([\d\s]+[ ,.]\d+|[\d\s]+)/g)||[])[0],u?(u=z.parseMoney(u),u):null};i.price=s(e.closest(".element-item").find(".price, .item-price, .main-price, .element-text--price").eq(0))||s(e)||s(r.find(".price, .item-price, .main-price, .element-text--price").eq(0))||s(r)}}if(!i.id)if(i.productId){let r=flexbe_cli.ecommerce.productsStore.getProduct(i.productId);if(r){let a=r.currentVariant(i.variantId||"default").getCartData("image");i.id=`product_${i.productId}:${i.variantId||"default"}`,a.img=oe(a.img[0]),i={...i,...a}}else i={}}else{let r=flexbe_cli.p_id,s=e.parents("[data-id], [data-item-id], [data-multivar]").toArray().map(l=>{let u=l.getAttribute("data-id")||l.getAttribute("data-item-id")||"",c=l.getAttribute("data-multivar")||"";return u+c}).join(":"),a=flexbe_cli.helpers.hashCode(i.title+i.price);i.id=`${r}_${s||0}:${a}`}return{type:i.productId?"product":"custom",...i}}var Ki=n=>typeof n=="string"?new Date(n.slice(0,19).replace("T"," ")):n,Je=({dateFrom:n,dateTo:t,timezone:e=(i=>(i=flexbe)==null||(i=i.vars)==null||(i=i.project)==null?void 0:i.timezone)()})=>{let i=Yt({date:new Date,timezone:e,format:"milliseconds"}),o=new Date(Ki(n)).getTime(),r=new Date(Ki(t)).getTime();return!(n&&o>i||t&&r<i)};function Bo(n){return n.type==="custom"||n.quantity===1/0||n.quantity===-1}function Qi(n){return Bo(n)?1/0:n.quantity}var D=[],St=class extends k{constructor(){super(),this.initList()}dispatch(t,...e){let i=this[t];if(typeof i!="function")throw new Error(`Cart dispatch: action '${t}' doesnt exist`);let o=i.apply(this,e);return this.trigger("dispatch",{name:t,args:e,result:o}),o}initList(){let t=[];if(flexbe_cli.is_admin){let e=flexbe_cli.vars.page.language==="ru",i=flexbe_cli.vars.site.currencyData.code==="RUB";t=[{id:"default1",count:1,protect:!0,img:{unq_id:"default1",id:1000000945,ext:"jpg"},vendorCode:e?"\u0410\u0440\u0442\u0438\u043A\u0443\u043B: 1234":"SKU: 1234",title:e?"\u041F\u0440\u0438\u043C\u0435\u0440 \u0442\u043E\u0432\u0430\u0440\u0430":"Example Item",price:i?750:10},{id:"default2",count:2,protect:!0,vendorCode:e?"\u0410\u0440\u0442\u0438\u043A\u0443\u043B: 1234":"SKU: 1234",img:{unq_id:"default2",id:1000000948,ext:"jpg"},title:e?"\u0414\u0440\u0443\u0433\u043E\u0439 \u0442\u043E\u0432\u0430\u0440":"Another Item",price:i?2550:25}]}else try{t=JSON.parse(localStorage.getItem("f_cart"))||[],t=t.filter(e=>e&&+e.count)}catch(e){console.error(e)}this.dispatch("updateList",t)}getList(){return D}getItem(t){return D.find(e=>e.id===t)}getCount(){return D.reduce((t,e)=>t+e.count,0)}getTotal(){return D.reduce((t,e)=>(e.count&&e.price&&(t+=parseInt(String(e.count),10)*parseFloat(String(e.price))),t),0)}updateList(t){if(!Array.isArray(t))return null;if(t=t.map(e=>{var i;let o=this.getItem(e.id);if(typeof e.img=="string"){let s=ne(e.img);e.img=s&&{id:s.id,ext:s.ext}}else(i=e.img)!=null&&i.img_id&&(e.img={id:e.img.img_id,ext:e.img.img_ext,unq_id:String(e.img.unq_id||e.img.id)});if(e.img=e.img||null,e.type=e.type||"custom",e.price=e.price==null?null:parseFloat(e.price),o&&e.orderPrice==null){var r;e.orderPrice=(r=o.orderPrice)!=null?r:o.price}else e.orderPrice==null&&(e.orderPrice=e.price);return e.quantity=Qi(e),e.count=Math.round(+e.count)||0,e}),flexbe_cli.run.is_preview)try{localStorage.setItem("f_cart",JSON.stringify(t))}catch{}return D=t,D}purchase(){this.resetList()}resetList(){let t=[...D].filter(e=>e.protect);this.updateList(t)}addItem(t){if(!t.id)throw new Error("Cart add item: product ID is not defined");let e=[...D],i=parseFloat(t.count)||1,o={...t,count:i},r=this.getItem(o.id);if(r){let s=e.indexOf(r);o.count+=r.count,e.splice(s,1,o)}else e.push(o);return this.updateList(e),flexbe_cli.stat.ecommerce.add({...o,count:i}),e}removeItem(t){let e=this.getItem(t),i=[...D];return!e||e.protect?D:(i.splice(i.indexOf(e),1),flexbe_cli.stat.ecommerce.remove(e),this.updateList(i))}updateCount({id:t,count:e}){let i=this.getItem(t);if(!i)return null;let o=+i.count||0;e==="+"?i.count+=1:e==="-"&&i.count>
380?i.count-=1:i.count=e===""?1:e,Number.isNaN(+i.count)&&(i.count=o),this.updateList(D);let r=i.count-o;return r>0?flexbe_cli.stat.ecommerce.add({...i,count:r}):r<0&&flexbe_cli.stat.ecommerce.remove({...i,count:-r}),i}normalizeListItems(t=D,e={price:!0,count:!1,unavailable:!1,banPriceless:!1}){let i=t.map(o=>{let r={...o};return e.price&&(r.orderPrice=o.price),e.count&&!K.settings.allowPreorder&&(r.count=Math.min(o.count,o.quantity)),r});return e.unavailable&&(i=i.filter(o=>!o.hidden&&o.count)),e.banPriceless&&(i=i.filter(o=>!o.price===null)),this.updateList(i),i}};var Qe=[{id:25280736,unq_id:"25280736",ext:"png",animated:!1,average:"#EEEEEE",border:"#EEEEEE",preview:"UklGRjQAAABXRUJQVlA4ICgAAADQAgCdASoeABYAPyWKvFeuKSWjqAgBwCSJaQAAPaOgAP7t6e+boAAA",proportion:71,transparent:0,original_resolution:1,width:700,height:500}],It=class extends k{constructor(t,e){super(),this.variant=void 0,this.parent=void 0,this.variant=t,this.parent=e}get id(){return this.variant.id}get article(){var t;return(t=this.variant.vendor_code)!=null?t:""}get name(){var t;return((t=this.variant.name)!=null?t:[]).join(" - ")}get images(){var t;return(t=this.variant.images)!=null?t:[]}get oldPrice(){var t;return(t=this.variant.price_old)!=null?t:!1}get hasOldPrice(){return!!(this.parent.isOldPrice&&this.oldPrice)}get visible(){var t;return(t=this.variant.visible)!=null?t:!1}get optionValues(){return this.variant.option_values}get optionsInfo(){return this.variant.optionsInfo}get quantity(){var t;return(t=this.variant.quantity)!=null?t:0}get price(){var t;return(t=this.variant.price)!=null?t:null}get defaultImageId(){var t;return(t=this.variant.default_image_id)!=null?t:0}isDefault(){return!!(this.variant.is_default&&this.variant.visible)}getPrice(t){return typeof t=="string"?flexbe_cli.vars.site.currencyFormat.str.replace(":value",t).replace(":symbol",flexbe_cli.vars.site.currencyData.symbol):t==null?!flexbe_cli.ecommerce.settings.noPriceLabel&&flexbe_cli.is_admin?flexbe_cli.vars.site.language==="ru"?"\u0446\u0435\u043D\u0430 \u0441\u043A\u0440\u044B\u0442\u0430":"price hidden":flexbe_cli.ecommerce.settings.noPriceLabel:flexbe_cli.locale.formatMoney(t,{freeLabel:flexbe_cli.ecommerce.settings.zeroPrice})}getImages(t){if(this.parent.displayImage==="variant"&&this.parent.options.length){let e=this.variant.images;return e.length?e:Qe}if(this.parent.displayImage==="product"||!this.parent.options.length){let e=this.parent.images;return t==="image"&&e.length>1?[e.find(i=>i.unq_id===this.defaultImageId)||e[0]]:e.length?e:Qe}return Qe}getCartData(t){return{price:this.variant.price,title:this.parent.title,productId:this.parent.id,variantId:this.variant.id,vendorCode:this.variant.vendor_code,quantity:this.variant.quantity,img:this.getImages(t),optionsInfo:this.variant.optionsInfo,count:1,strict:1,...this.parent.categoryNames.length?{category:this.parent.category,categories:this.parent.categoryNames}:{}}}availableInfo(){let{inStockStatus:t,outOfStockStatus:e}=flexbe_cli.ecommerce.settings,i=this.quantity!==0;if(flexbe_cli.is_admin&&(t=t==="none"?"in_stock":t,e=e==="none"?"out_of_stock":e),this.parent.allVariantsDisabled)return{text:"Not available",class:"not-available"};if(this.quantity==="dummy")return{text:flexbe_cli.vars.site.language==="ru"?"\u041D\u0430\u043B\u0438\u0447\u0438\u0435 \u0442\u043E\u0432\u0430\u0440\u0430":"Availability",class:"in-stock in_stock"};if(i&&t!=="none")return{text:this.quantity===-1||t==="in_stock"?flexbe_cli.locale.tr("cart::quantity_status::in_stock"):flexbe_cli.locale.tr("cart::quantity_status::items_in_stock",{count:this.quantity}),class:"in-stock in_stock"};if(!i){if(e==="in_stock"&&t!=="none")return{text:flexbe_cli.locale.tr("cart::quantity_status::in_stock"),class:"in-stock in_stock"};if(e==="out_of_stock")return{text:flexbe_cli.locale.tr("cart::quantity_status::out_of_stock"),class:"not-available"};if(e==="preorder")return{text:flexbe_cli.locale.tr("cart::quantity_status::preorder"),class:"preorder"}}return{text:null,class:"hide"}}allowOrder(){let{allowPreorder:t,allowPriceless:e}=flexbe_cli.ecommerce.settings,i=flexbe_cli.locale.tr("ecommerce::option::disabled");return!this.quantity&&!t?{allow:!1,reason:flexbe_cli.locale.tr("ecommerce::option::locked")}:this.parent.allVariantsDisabled?{allow:!1,reason:i}:this.price==null&&!e?{allow:!1,reason:i}:{allow:!0}}};var Zi=(n,t)=>{if(!n.visible)return{exceptionClass:"disabled",tipText:t.needTipsOptions?flexbe_cli.locale.tr("ecommerce::option::disabled"):""};if(!n.quantity){let e=flexbe_cli.ecommerce.settings.outOfStockStatus,i=t.needAvailableOptions?flexbe_cli.locale.tr("cart::quantity_status::in_stock"):"",o=flexbe_cli.ecommerce.settings.allowPreorder,r=o?"":"locked",s=t.needTipsOptions?flexbe_cli.locale.tr("ecommerce::option::locked"):"";return o&&t.needTipsOptions&&(s=e==="in_stock"?i:flexbe_cli.locale.tr("cart::quantity_status::preorder")),o&&e==="none"&&(s=""),{exceptionClass:r,t
38ipText:s}}return t.inStock!=="none"?t.inStock==="items_in_stock"&&n.quantity!==-1?{exceptionClass:"",tipText:t.needAvailableOptions&&t.needTipsOptions?flexbe_cli.locale.tr("cart::quantity_status::items_in_stock",{count:n.quantity}):""}:{exceptionClass:"",tipText:t.needAvailableOptions&&t.needTipsOptions?flexbe_cli.locale.tr("cart::quantity_status::in_stock"):""}:{exceptionClass:"",tipText:""}},qo=(n,t)=>{let e=!1;return n.length!==t.length?!1:(e=n.every(i=>t.some(o=>i.option_id===o.option_id&&i.value_id===o.value_id)),e)},jo=({product:n,currentOptions:t,optionsStyle:e})=>{var i,o;let r=(i=e.show_available)!=null?i:!0,s=(o=e.show_in_stock_statuses)!=null?o:!0,a=flexbe_cli.ecommerce.settings.inStockStatus,l=[];return t.length===1?l=n.variants.reduce((u,c)=>[...u,{optionId:`${c.option_values[0].option_id}_${c.option_values[0].value_id}`,...Zi(c,{needTipsOptions:r,needAvailableOptions:s,inStock:a})}],[]):n.variants.forEach(u=>{for(let c=0;c<t.length;c++){let p=t.filter((h,d)=>c!==d),f=u.option_values.filter((h,d)=>c!==d);JSON.stringify(p)===JSON.stringify(f)&&l.push({optionId:`${u.option_values[c].option_id}_${u.option_values[c].value_id}`,...Zi(u,{needTipsOptions:r,needAvailableOptions:s,inStock:a})})}}),l},Ho=n=>n.find(t=>t.isDefault())||n.find(t=>t.visible)||n[0],ht=class extends k{constructor(t){super(),this.product=void 0,this.variantItems=void 0,this.activeVariant=void 0,this.activeOptions=void 0,this.oldPayload=void 0,this.hasOptionsElement=void 0,this.product=t,this.variantItems=t.variants.map(e=>new It(e,this)),this.init()}get id(){return this.product.id}get settings(){var t;return(t=this.product.settings)!=null?t:{}}get link(){if(this.settings.use_custom_uri){var t;return(t=this.settings.uri)!=null?t:""}return""}get variants(){return this.variantItems}get title(){var t;return(t=this.product.name)!=null?t:""}get categoryNames(){var t;return((t=this.product.categories)!=null?t:[]).map(e=>e.name).filter(Boolean)}get category(){return this.categoryNames.join(" / ")}get description(){var t;return(t=this.product.description)!=null?t:""}get options(){var t;return(t=this.product.options)!=null?t:[]}get hasVariants(){return this.variants.length>1}get allVariantsDisabled(){return!this.variants.filter(t=>t.visible).length}get displayImage(){var t;return(t=this.product.displayImage)!=null?t:"product"}get images(){var t;return(t=this.product.images)!=null?t:[]}get isOldPrice(){var t;return(t=this.product.usePriceOld)!=null?t:!1}get hasOptions(){return!!this.product.options.length}get visible(){return!!this.product.visible}init(){let t=Ho(this.variantItems),e=t.optionValues;this.setOption(e),this.setVariant(t)}getAction(t){return this.hasVariants&&!t&&!this.hasOptionsElement?"modal":"cart"}getVariant(t){var e;return(e=this.variantItems.filter(i=>String(i.id)===String(t))[0])!=null?e:this.variantItems[0]}currentVariant(t){return t==="default"?this.activeVariant:this.getVariant(t)}currentOptions(t){return t&&t!=="default"?this.getVariant(t).optionValues:this.activeOptions}selectOption(t){let[e,i]=t.split("_"),o=this.currentOptions().map(s=>String(s.option_id)===String(e)?{option_id:+e,value_id:+i}:s),r=this.variantItems.find(s=>qo(s.optionValues,o));this.setOption(o),this.setVariant(r),t!==this.oldPayload&&(flexbe_cli.events.trigger(`update_${this.product.id}`,this),this.oldPayload=t)}setOption(t){this.activeOptions=t}setVariant(t){this.activeVariant=t}setOptionElement(){this.hasOptionsElement||(this.hasOptionsElement=!0,flexbe_cli.events.trigger(`update_${this.product.id}`,this))}combinationOptionsList(t){return jo({product:this.product,currentOptions:this.activeOptions,optionsStyle:t})}};var Tt=class extends k{constructor(){super(),this.products=void 0,this.products=new Map,this.init()}init(){let t=document.getElementById("flexbe-products-store");if(t){try{let e=JSON.parse(t.textContent.replaceAll(""",'"').replaceAll("'","'").replaceAll("<","<").replaceAll(">",">").replaceAll("&","&"));this.addToStore(e)}catch{}t.parentNode.removeChild(t)}}addToStore(t){t.forEach(e=>{(e.visible||flexbe_cli.is_admin)&&this.products.set(String(e.id),new ht(e))})}getProducts(t){return t.map(e=>
38this.products.get(String(e))).filter(Boolean)}getProduct(t){return this.products.get(String(t))}getDummyProduct(){let t=flexbe_cli.vars.site.language==="ru";return new ht({id:0,name:t?"\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u0442\u043E\u0432\u0430\u0440\u0430":"Product name",description:t?"\u041E\u043F\u0438\u0441\u0430\u043D\u0438\u0435 \u0442\u043E\u0432\u0430\u0440\u0430 \u0434\u043E\u043B\u0436\u043D\u043E \u043E\u0442\u0440\u0430\u0436\u0430\u0442\u044C \u043E\u0441\u043D\u043E\u0432\u043D\u044B\u0435 \u0441\u0432\u043E\u0439\u0441\u0442\u0432\u0430 \u0438 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u044B, \u0432\u0430\u0436\u043D\u044B\u0435 \u043F\u0440\u0438 \u043F\u043E\u043A\u0443\u043F\u043A\u0435.":"The product description should convey the key features and qualities that help customers make a purchasing decision.",images:t?[{id:39821031,ext:"jpg",animated:!1,average:"#EEEEEE",border:"#EEEEEE",height:2480,preview:"UklGRkYAAABXRUJQVlA4IDoAAAAQBACdASoeACMAPxV8r1GxKKQitVv4AiAiiWkAAHdYxpA7nUpHNdVoAAD+7mmMq9LCAW+j7lgJyYAA",proportion:114.81,transparent:0,width:2160}]:[{animated:!1,average:"#EEEEEE",border:"#EEEEEE",ext:"jpg",height:1080,id:39909534,preview:"UklGRkwAAABXRUJQVlA4IEAAAADwAwCdASoeAB4APyVyyWSuJKkpFAHAJIlpAAA9ZIprB9gU3U+hJ/oAAP7tQ+5GIEcJuzeAREpLgMJmahfgAAAA",proportion:100,transparent:0,width:1080}],variants:[{id:6468,name:t?["\u0412\u0430\u0440\u0438\u0430\u043D\u0442 1"]:["Variant 1"],option_values:[{option_id:893,value_id:2338}],vendor_code:t?"\u0417\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0430\u0440\u0442\u0438\u043A\u0443\u043B\u0430":"SKU number",quantity:"dummy",price:t?"\u0426\u0435\u043D\u0430":"Price",price_old:t?"\u0421\u0442\u0430\u0440\u0430\u044F \u0446\u0435\u043D\u0430":"Old price",images:[],default_image_id:null,visible:1,is_default:1},{id:6480,name:t?["\u0412\u0430\u0440\u0438\u0430\u043D\u0442 2"]:["Variant 2"],option_values:[{option_id:893,value_id:2339}],vendor_code:t?"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0430\u0440\u0442\u0438\u043A\u0443\u043B\u0430":"SKU number",quantity:"dummy",price:t?"\u0426\u0435\u043D\u0430":"Price",price_old:t?"\u0421\u0442\u0430\u0440\u0430\u044F \u0446\u0435\u043D\u0430":"Old price",images:[],default_image_id:null,visible:1,is_default:0},{id:6481,name:t?["\u0412\u0430\u0440\u0438\u0430\u043D\u0442 3"]:["Variant 3"],option_values:[{option_id:893,value_id:2340}],vendor_code:t?"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0430\u0440\u0442\u0438\u043A\u0443\u043B\u0430":"SKU number",quantity:"dummy",price:t?"\u0426\u0435\u043D\u0430":"Price",price_old:t?"\u0421\u0442\u0430\u0440\u0430\u044F \u0446\u0435\u043D\u0430":"Old price",images:[],default_image_id:null,visible:1,is_default:0}],options:[{id:893,name:t?"\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u043E\u043F\u0446\u0438\u0438":"Option name",sort_index:0,values:[{id:2338,name:t?"\u0412\u0430\u0440\u0438\u0430\u043D\u0442 1":"Variant 1",data:{color:"#ffffff",contrast:"dark",contrastFixed:"dark"}},{id:2339,name:t?"\u0412\u0430\u0440\u0438\u0430\u043D\u0442 2":"Variant 2",data:{color:"#000000",contrast:"light",contrastFixed:"light"}},{id:2340,name:t?"\u0412\u0430\u0440\u0438\u0430\u043D\u0442 3":"Variant 3",data:{color:"#7666F6",contrast:"dark",contrastFixed:"dark"}}],data:{type:"color",widget_type:"radio"}}],visible:!0,usePriceOld:!0,displayImage:"product",available:!0})}async loadProducts({showType:t,productIds:e,categoryIds:i,limit:o,onlyVisible:r,hideOutOfStock:s}){let a={project_id:flexbe_cli.vars.site.id,productIds:t==="select_products"?e:void 0,categoryIds:t==="select_category"?i:void 0,showType:t,limit:o,onlyVisible:r??!0,hideOutOfStock:s??flexbe_cli.vars.site.ecommerce.hideOutOfStock},{products:l,categories:u}=await new Promise((c,p)=>{let f=d=>{c(d)},h=d=>{p(d)};return $.ajax({url:"/api/ecommerce/data/",type:"GET",dataType:"json",data:a}).done(f).fail(h)});return this.addToStore(l),{categories:u,products:l}}};var x=(function(n){return n.PROMOTION_DOES_NOT_EXIST="PROMOTION_DOES_NOT_EXIST",n.PROMOTION_NOT_ACTIVE="PROMOTION_NOT_ACTIVE",n.PROMOTION_REMOVED="PROMOTION_REMOVED",n.PROMOTION_DOES_NOT_WORK="PROMOTION_DOES_NOT_WORK",n.PROMOTION_IS_OVER="PROMOTION_IS_OVER",n.PROMOTION_NUMBER_USES_ENDED="PROMOTION_NUMBER_USES_ENDED",n.PROMOTION_INCOMPATIBLE_WITH_SHIPPING="PROMOTION_INCOMPATIBLE_WITH_SHIPPING",n.PROMOTION_INSUFFICIENT_AMOUNT="PROMOTION_INSUFFICIENT_AMOUNT",n.PROMOTION_MIN_AMOUNT_NOT_REACHED="PROMOTION_MIN_AMOUNT_NOT_REACHED",n.PROMOTION_CANNOT_BE_APPLIED="PROMOTION_CANNOT_BE_APPLIED",n})({}),Ot="default_error";function Xt(n){var t;if(!n||typeof n!="object")return null;let e=(t=n.shipping_restriction)!=null?t:n.shippingRestriction;return!e||typeof e!="object"||Array.isArray(e)?null:e}function Wo(n){return n?.enabled===!0}function Kt(n,t){if(!Wo(n))return!0;
38if(!t)return!1;let e=n[t.type];return e?e.all===!0?!0:Array.isArray(e.ids)&&e.ids.some(i=>String(i)===String(t.id)):!1}var wc={[x.PROMOTION_DOES_NOT_EXIST]:"notfound_error",[x.PROMOTION_NOT_ACTIVE]:Ot,[x.PROMOTION_REMOVED]:Ot,[x.PROMOTION_DOES_NOT_WORK]:"not_started_error",[x.PROMOTION_IS_OVER]:"timeout_error",[x.PROMOTION_NUMBER_USES_ENDED]:"uses_ended_error",[x.PROMOTION_INCOMPATIBLE_WITH_SHIPPING]:"shipping_error",[x.PROMOTION_INSUFFICIENT_AMOUNT]:"insufficient_amount_error",[x.PROMOTION_MIN_AMOUNT_NOT_REACHED]:"amount_error",[x.PROMOTION_CANNOT_BE_APPLIED]:"cannot_be_applied_error"},Ze=new Set([x.PROMOTION_MIN_AMOUNT_NOT_REACHED,x.PROMOTION_INCOMPATIBLE_WITH_SHIPPING,x.PROMOTION_INSUFFICIENT_AMOUNT,x.PROMOTION_DOES_NOT_WORK,x.PROMOTION_CANNOT_BE_APPLIED]);function en(n,t){var e,i,o,r,s,a,l,u,c,p,f;if(!n)return x.PROMOTION_DOES_NOT_EXIST;let h=((e=t.now)!=null?e:new Date).getTime(),d=n.active;if(d===!1||d===0)return x.PROMOTION_NOT_ACTIVE;if((i=n.deletedAt)!=null?i:n.deleted_at)return x.PROMOTION_REMOVED;let m=tn((o=n.dateTo)!=null?o:n.date_to);if(m!==null&&h>m)return x.PROMOTION_IS_OVER;let g=(r=n.availableCount)!=null?r:n.available_count;if(g!=null&&Number(g)===0)return x.PROMOTION_NUMBER_USES_ENDED;if(!Kt(Xt(n),(s=t.shippingMethod)!=null?s:null))return x.PROMOTION_INCOMPATIBLE_WITH_SHIPPING;let b=tn((a=n.dateFrom)!=null?a:n.date_from);if(b!==null&&b>h)return x.PROMOTION_DOES_NOT_WORK;let _=Number((l=(u=n.activeFrom)!=null?u:n.active_from)!=null?l:0);if(_>0&&t.itemsTotal<_)return x.PROMOTION_MIN_AMOUNT_NOT_REACHED;let w=(c=n.discountType)!=null?c:n.discount_type,I=Number((p=(f=n.discountAmount)!=null?f:n.discount_amount)!=null?p:0);return(w==="percent"?Math.round(t.itemsTotal*I)/100:I)>t.itemsTotal?x.PROMOTION_INSUFFICIENT_AMOUNT:null}function tn(n){if(n==null||n==="")return null;let t=Ye(n).getTime();return Number.isNaN(t)?null:t}var kt=class extends k{get hasPromotionChanges(){var t,e;return!!((t=this.promotionsChanges)!=null&&t.discount)||!!((e=this.promotionsChanges)!=null&&e.promocode)}get groupId(){return typeof flexbe_cli=="object"?flexbe_cli.group_id:null}get timezone(){return typeof flexbe_cli=="object"?flexbe_cli.vars.site.timezone:null}constructor(t){super(),this.options=void 0,this.discounts=void 0,this.promocode=void 0,this.activeDiscount=void 0,this.nearestDiscount=void 0,this.appliedPromocode=void 0,this.promotionsChanges=void 0,this.getTotal=void 0,this.getTotalIncludingPromotions=void 0,this.options=t,this.appliedPromocode=null,this.activeDiscount=null,this.nearestDiscount=null,this.promotionsChanges={},this.getTotal=()=>(t.getTotal==null?void 0:t.getTotal())||0,this.getTotalIncludingPromotions=()=>{var e,i;let o=this.getTotal(),r=((e=this.activeDiscount)==null?void 0:e.discountValue)||0,s=(i=this.appliedPromocode)!=null&&i.isActive&&this.appliedPromocode.discountValue||0;return o-r-s},flexbe_cli.is_admin||this.init(t)}async init(t){var e;this.bindEvents(),this.updateDiscountList(this.toDiscountItems((e=flexbe_cli.vars.site.discounts)!=null?e:[]),{updateChanges:!1}),t.needUpdateWithLS&&await this.updateFromLocalStorage(),this.updateActiveDiscount(!1),this.updateNearestDiscount()}async dispatch(t,...e){let i=this[t];if(typeof i!="function")throw new Error(`Promotion dispatch: action '${t}' doesnt exist`);let o=await i.apply(this,e);await this.trigger("dispatch",{name:t,args:e,result:o})}bindEvents(){var t;this.on("dispatch.promotion-store",({name:e})=>{["applyPromocode","removePromocode"].includes(e)&&(this.updateActiveDiscount(),this.updateNearestDiscount())}),(t=flexbe_cli.ecommerce)==null||(t=t.shippingStore)==null||t.on("dispatch.promotion-store",({name:e})=>{["selectMethod","selectType"].includes(e)&&this.dispatch("updatePromotionsForShipping")})}updatePromotionsForShipping(){this.updateActiveDiscount(),this.updateNearestDiscount()}updateActiveDiscount(t=!1){var e;if(!this.discounts.length||this.isPromocodeBlockingDiscount()){this.activeDiscount=null;return}let i=this.getBestDiscountForMethod(this.getCurrentShippingMethod()),o=this.activeDiscount,r=i?this.getDiscountData(i.id):null;t&&i?.discountValue!==((e=this.activeDiscount)==null?void 0:e.discountValue)&&(this.promotionsChanges.discount={oldData:o,newData:r}),this.activeDiscount=r}updateNearestDiscount(){var t;let e=this.getTotal(),i=this.getTotalIncludingPromotions();if(!this.discounts.length||this.isPromocodeBlockingDiscount()||i<=0){this.nearestDiscount=null;return}let o=this.getDiscountsForMethod(this.getCurrentShippingMethod()),r=(t=o.filter(s=>s.active_from>e).filter(s=>{if(this.activeDiscount){if(s.discount_type==="percent"){let a=s.active_from*s.discount_amount;return this.activeDiscount.discount_type==="percent"?a>s.active_from*this.activeDiscount.discount_amount:a>this.activeDiscount.discount_amount}return+s.discount_amount>this.activeDiscount.discountValue}return!0}).sort((s,a)=>s.discountValue-a.discountValue).sort((s,a)=>s.active_from-a.active_from)[0])==null?void 0:t.active_from;if(r){let s=o.filter(a=>a.active_from===r).filter(a=>{var l;return!this.activeDiscount||a.discountValue>((l=this.activeDiscount)==null?void 0:l.discountValue)}).sort((a,l)=>l.discountValue-a.discountValue)[0]||{};this.nearestDiscount=s?this.getDiscountData(s.id):null}else this.nearestDiscount=null}updateAppliedPromocode(){var t;if(!this.appliedPromocode)return;let e=((t=this.promotionsChanges)==null||(t=t.promocode)==null?void 0:t.oldData)||this.appliedPromocode,i=this.getPromocodeData();if(e&&i){if(e.discountValue!==i?.discountValue||e.delivery_free!==i?.delivery_free){var o;this.promotionsChanges.promocode={oldData:((o=this.promotionsChanges)==null||(o=o.promocode)==null?void 0:o.oldData)||this.appliedPromocode,newData:i,code:this.appliedPromocode.code}}else this.acceptPromotionChanges({promocode:!0});this.appliedPromocode=this.promocode}}async applyPromocode(t){let e;try{e=await this.loadDataPromocode(t)}catch(o){let r=new Error,s=o?.status;throw r.name=s===404?x.PROMOTION_DOES_NOT_EXIST:Ot,r}this.updatePromocode(e,{updatePromotions:!1});let i=this.resolvePromocodeRejectReason(this.promocode);if(i&&!Ze.has(i)){let o=new Error(i);throw o.name=i,o}if(this.appliedPromocode=e,this.options.needUpdateWithLS)try{localStorage.setItem("f_applied_promocode",JSON.stringify({code:t,id:this.promocode.id}
38))}catch{}}removePromocode(){this.appliedPromocode=null,this.acceptPromotionChanges({promocode:!0});try{localStorage.removeItem("f_applied_promocode")}catch{}}acceptPromotionChanges({promocode:t,discount:e}={}){t||e?(t&&delete this.promotionsChanges.promocode,e&&delete this.promotionsChanges.discount):this.promotionsChanges={}}async updateFromLocalStorage(){let t=JSON.parse(localStorage.getItem("f_applied_promocode"));if(t!=null&&t.id&&t.code){let e;try{e=await this.loadDataPromocode(t.code)}catch{this.removePromocode();return}this.updatePromocode(e,{updatePromotions:!1});let i=this.resolvePromocodeRejectReason(this.promocode);if(i&&!Ze.has(i)){this.removePromocode();return}this.appliedPromocode=this.promocode}}getBestDiscountForMethod(t){let e=this.getTotal()||0;return this.getDiscountsForMethod(t).filter(i=>e>=i.active_from&&e-i.discountValue>=0).sort((i,o)=>o.discountValue-i.discountValue)[0]||null}getDiscountsForMethod(t){return(this.discounts||[]).filter(e=>e.isAvailableByTime&&Kt(Xt(e),t))}isPromocodeBlockingDiscount(){var t;return!!((t=this.appliedPromocode)!=null&&t.isActive)&&!this.appliedPromocode.usage_with_any_discount}getCurrentShippingMethod(){var t;let e=(t=flexbe_cli.ecommerce)==null||(t=t.shippingStore)==null?void 0:t.getActive();return!(e!=null&&e.id)||e.type!=="delivery"&&e.type!=="pickup"?null:{id:String(e.id),type:e.type}}resolvePromocodeRejectReason(t){let e=new Date;if(this.timezone){let i=Yt({date:e,timezone:this.timezone,format:"milliseconds"});typeof i=="number"&&(e=new Date(i))}return en(t,{itemsTotal:this.getTotal()||0,shippingMethod:this.getCurrentShippingMethod(),now:e})}getDiscountData(t){return this.discounts.find(e=>e.id===t)}getPromocodeData(){return this.promocode}async loadPromotionList(t){return new Promise((e,i)=>{let o=s=>{e(s)},r=s=>{i(s)};return $.ajax({url:"/api/promotions/get_list/",type:"GET",dataType:"json",data:{project_id:flexbe_cli.vars.site.id,promotionType:t}}).done(o).fail(r)})}async loadDataPromocode(t){return new Promise((e,i)=>{let o=s=>{e(s)},r=s=>{i(s)};return $.ajax({url:"/api/promotions/get_promocode/",type:"GET",dataType:"json",data:{project_id:flexbe_cli.vars.site.id,promoCode:t}}).done(o).fail(r)})}updatePromocode(t,{updatePromotions:e=!0}={}){t&&typeof t=="object"&&Object.defineProperties(t,{isAvailableByTime:{get:()=>{let{date_from:i,date_to:o}=t;return Je({dateFrom:i,dateTo:o,timezone:this.timezone})}},discountValue:{get:()=>{let i=this.getTotal();return t?.discount_type==="percent"?Math.round(i*t.discount_amount)/100:+t.discount_amount}},rejectReason:{get:()=>this.resolvePromocodeRejectReason(t)},isActive:{get:()=>t.rejectReason===null},hasFreeDelivery:{get:()=>t?.delivery_free||t?.discount_type==="delivery"}}),this.promocode=t,e&&this.updateAppliedPromocode()}toDiscountItems(t){return t.map(e=>{var i,o;return{...e,type:"discount",discount_type:e.discountType,discount_amount:Number(e.discountAmount),date_from:(i=e.dateFrom)!=null?i:"",date_to:(o=e.dateTo)!=null?o:"",active_from:Number(e.activeFrom),note:"",shipping_restriction:e.shippingRestriction,isAvailableByTime:!1,discountValue:0}})}updateDiscountList(t,{updateChanges:e=!0,updatePromotions:i=!0}={}){t.forEach(o=>{Object.defineProperties(o,{isAvailableByTime:{get:()=>{let{date_from:r,date_to:s}=o;return Je({dateFrom:r,dateTo:s,timezone:this.timezone})}},discountValue:{get:()=>{let r=this.getTotal();return o?.discount_type==="percent"?Math.round(r*o.discount_amount)/100:+o.discount_amount}}})}),this.discounts=t,i&&(this.updateActiveDiscount(e),this.updateNearestDiscount())}async loadDiscountList({updateChanges:t=!0,updatePromotions:e=!0}={}){let i;try{i=await this.loadPromotionList("discount")}catch{return}await this.dispatch("updateDiscountList",i,{updateChanges:t,updatePromotions:e})}};var Pt=class extends k{get methods(){return Object.values(this.lists).flat()}get enabled(){return this.methods.length>0}constructor(){super(),this.activeType=void 0,this.activeAddress={country:"",addressLine1:"",addressLine2:"",city:"",region:"",zipCode:""},this.lists={delivery:[],pickup:[]},this.activeMethod=void 0,this.ecommerceSetting=void 0,this.lists={delivery:(flexbe_cli.vars.site.delivery||[]).filter(t=>t.enabled),pickup:(flexbe_cli.vars.site.pickups||[]).filter(t=>t.enabled)},this.ecommerceSetting=K.settings,this.dispatch("selectType",localStorage.getItem("shipping:lastType")||"delivery")}async dispatch(t,...e){let i=this[t];if(typeof i!="function")throw new Error(`Shipping dispatch: action '${t}' doesnt exist`);let o=i.apply(this,e);this.trigger("dispatch",{name:t,args:e,result:o})}getList(t=this.activeType){return this.lists[t]||[]}getActive(){let t=this.activeMethod;if(!t)return null;let e=this.getShippingType(t),i={id:t.id,type:this.getShippingType(t),title:t.title,de
38sc:t.desc,price:this.getPrice(t.id),fieldIds:t.fields.map(o=>o.id),address:null};return e==="pickup"?i.address=t.address:t.deliveryAddressEnabled&&(i.address=this.activeAddress),i}getMethod(t){return this.methods.find(e=>e.id.toString()===t)}getShippingType(t){if(!t)return null;let e=typeof t=="string"?t:t.id;for(let[i,o]of Object.entries(this.lists))if(o.some(r=>r.id.toString()===e.toString()))return i;return null}setAddress(t){this.activeAddress={...this.activeAddress,...t}}syncFromLS(){let t=`shipping:lastMethod:${this.activeType}`,e=localStorage.getItem(t);this.getMethod(e)||localStorage.removeItem(t),this.dispatch("selectMethod",e)}selectType(t){var e;t=(e=this.lists[t])!=null&&e.length?t:Object.keys(this.lists).find(i=>this.lists[i].length),t&&(this.activeType=t,localStorage.setItem("shipping:lastType",this.activeType),this.syncFromLS())}selectMethod(t){if(this.activeMethod=this.getMethod(t)||this.getList()[0],this.activeMethod){let e=this.getShippingType(this.activeMethod);localStorage.setItem(`shipping:lastMethod:${e}`,this.activeMethod.id),this.activeType!==e&&this.dispatch("selectType",e)}return this.activeMethod}getPrice(t){let e=t?this.getMethod(t):this.activeMethod,i=+this.ecommerceSetting.minTotalOrder,o=0,r="\u23E4",s=0,a="",l=0,u="",c=0,p="",f=0,h="",d=!1,m;if(e){let g=K.cartStore.getTotal();e.prices.filter(_=>_.from!=="").forEach((_,w)=>{e.useMinTotal&&!w&&+_.from&&(o=+_.price,+_.from>i&&(c=+_.from)),(g>=+_.from||!w)&&(o=+_.price)});let b=e.prices.find(_=>_.price===0);d=!!e.useNotFixTotal,m=d&&(!b||b.from===""),b&&(s=+b.from||0,l=Math.max(0,s-g),a=z.formatMoney(s),u=z.formatMoney(l)),c&&(f=Math.max(0,c-g),p=z.formatMoney(c),h=z.formatMoney(f))}return(!d||s&&l<=0)&&(d=!1,r=z.formatMoney(o,{freeLabel:!0})),{current:o,currentFormatted:r,freeFrom:s,freeFromFormatted:a,untilFree:l,untilFreeFormatted:u,minTotal:c,minTotalFormatted:p,untilMinTotal:f,untilMinTotalFormatted:h,notFixedPrice:d,notHasFree:m}}};var ti=class{constructor(){this.cartStore=null,this.shippingStore=null,this.promotionStore=null,this.productsStore=null,this.getProductInfo=Ji}get settings(){return flexbe_cli.vars.site.ecommerce}init({enableDelivery:t=!1,enablePromotions:e=!1,enableProducts:i=!1}){this.cartStore=new St,t&&(this.shippingStore=new Pt),e&&(this.promotionStore=new kt({getTotal:this.cartStore.getTotal,needUpdateWithLS:!flexbe_cli.is_admin})),i&&(this.productsStore=new Tt)}},K=new ti;var Ct=class{static create(){return new this}constructor(){this.Interactivity=void 0,this.animationsData=[],this.interactionInstances=[],this.responsiveMode=flexbe_cli.resize.responsiveMode,this.observableLoopSliderElements=[],this.observableTabs=[],this.slidersEventsMap=new Map,this.init()}
38async init(){this.findAnimations(),this.animationsData.length&&await this.createAnimations(),this.bindEvents()}bindEvents(){window.addEventListener("resized",()=>{let t=flexbe_cli.resize.responsiveMode;t!==this.responsiveMode&&(this.responsiveMode=t,this.updateAnimations())}),flexbe_cli.is_admin&&flexbe_cli.events.off("hideShowUI.global-animation-component").on("hideShowUI.global-animation-component",t=>{t==="preview"?(this.findAnimations(),this.createAnimations()):this.destroyAnimations()})}isSliderActiveForCurrentMode(t){let e=t.getAttribute("data-slider-responsive-mode");return!e||e==="all"?!0:e===this.responsiveMode}findAnimations(){this.animationsData=[],$("[data-flexbe-animations]").each((t,e)=>{let i=JSON.parse(e.getAttribute("data-flexbe-animations"));i.forEach(o=>{o.element=e}),i!=null&&i.length&&this.animationsData.push(...i),e.animationsOptions=i,e.removeAttribute("data-flexbe-animations")})}async require(){this.Interactivity||(this.Interactivity=(await import("../../js/chunk-4GIV36OT.mjs")).default)}async createAnimation(t){var e;let i=t==null||(e=t.responsive)==null?void 0:e[this.responsiveMode];if(i)if(i.enabled){var o;let r=(t==null||(o=t.responsive)==null?void 0:o[i.inherit])||i,s=t.element.closest(".swiper-slide"),a=t.element.closest(".wait-animation"),l=t.element.parentNode.closest(".has-animation"),u=t.element.closest(".animation--slide_up"),c=r.interactionType==="scroll"&&r.interactionSettings.fixed;u&&c&&flexbe_cli.transitions.stopTransition(a);let f=await this.Interactivity.create({id:t.id,element:t.element,allowNativePositionFixed:!s&&!l,normalizeIntersectionState:(h,d)=>{if(d.interactionType==="screen"){let b=d.interactionSettings.triggerElements[0],_=b.closest(".swiper-slide"),w=b.closest(".tab-content");if(_||w){let I=!0;if(w&&(I=I&&w.classList.contains("active")),_){var m,g;let O=_.closest(".swiper");if(!this.isSliderActiveForCurrentMode(O))return h;let E=_.getAttribute("data-item-id"),S=(m=O==null||(g=O.swiper)==null?void 0:g.slides)!=null?m:[],y=[_,...S.filter(N=>N.getAttribute("data-item-id")===E)];I=I&&y.some(N=>N.classList.contains("swiper-slide-visible"))}return I&&h==="in"?"in":"out"}}return h},...r,normalizeOptions:h=>({...h,steps:h.steps.map(d=>{let m={...d};return d.animationParams.skewEnabled||(delete m.animationParams.skewX,delete m.animationParams.skewY),d.animationParams.clipPathEnabled||delete m.animationParams.clipPath,m})})});f.setProgress(0,!1),this.interactionInstances.push(f),this.walkTriggerElements({interaction:f}),$(a).off("flexbe-transition-end").one("flexbe-transition-end",async()=>{f.updateOffsetBound()})}else this.Interactivity.removeAnimationStyles(t.element)}async createAnimations(){flexbe_cli.run.is_preview&&(await this.require(),this.animationsData.forEach(async t=>this.createAnimation(t)))}walkTriggerElements({interaction:t}){t.interactionSettings.triggerElements.forEach(e=>{let i=e.closest(".swiper"),o=e.closest(".tab-content");i&&this.isSliderActiveForCurrentMode(i)&&(i.swiper?this.sliderNormalizationsInit({swiper:i.swiper,triggerElement:e,interaction:t}):i.addEventListener("swiper:init",()=>{setTimeout(()=>{this.isSliderActiveForCurrentMode(i)&&this.sliderNormalizationsInit({swiper:i.swiper,triggerElement:e,interaction:t})},50)})),o&&this.tabNormalizationsInit({tabEl:o,interaction:t})})}bindSliderEvents(t,e){this.slidersEventsMap.get(t)||this.slidersEventsMap.set(t,{});let i=this.slidersEventsMap.get(t);Object.entries(e).forEach(([o,r])=>{i[o]||(i[o]=[],t.on(o,s=>{i[o].forEach(l=>l(s))})),i[o].push(r)})}sliderNormalizationsInit({swiper:t,triggerElement:e,interaction:i}){if(!t||!i)return;let o=e.classList.contains("swiper-slide"),r=e.closest(".swiper-slide");if(i.interactionType==="screen"&&r&&(this.bindSliderEvents(t,{slideChange:()=>{requestAnimationFrame(()=>{this.Interactivity.checkIntersection(i)})}}),this.Interactivity.checkIntersection(i)),o&&(i.updateStyles(),this.bindSliderEvents(t,{setTranslate:()=>{requestAnimationFrame(()=>{i.updateStyles()})},update:()=>i.updateStyles()})),t.params.loop){if(this.observableLoopSliderElements.includes(t.el))return;this.observableLoopSliderElements.push(t.el);let s=Array.from(t.slides||[]);s.filter(l=>
38l.classList.contains("swiper-slide-duplicate")).forEach(l=>{let u=l.getAttribute("data-item-id"),c=s.find(f=>f.getAttribute("data-item-id")===u&&!f.hasAttribute("data-cloned")),p=Array.from(l.querySelectorAll(".has-animation"));c.animationsOptions&&this.createAnimation({...c.animationsOptions[0],element:l}),p.forEach(f=>{var h;let d=f.getAttribute("data-id")||((h=f.closest("[data-id]"))==null?void 0:h.getAttribute("data-id")),m=c.querySelector(`[data-id="${d}"].has-animation, [data-id="${d}"] .has-animation`);m!=null&&m.animationsOptions&&this.createAnimation({...m.animationsOptions[0],element:f})})})}}tabNormalizationsInit({tabEl:t,interaction:e}){this.observableTabs.includes(t)||(this.observableTabs.push(t),t.addEventListener("element-become-visible",()=>this.Interactivity.checkIntersection(e)),t.addEventListener("element-become-hidden",()=>this.Interactivity.checkIntersection(e)))}async updateAnimations(){flexbe_cli.run.is_preview&&(this.destroyAnimations(),await this.createAnimations())}destroyAnimations(){this.interactionInstances.forEach(t=>{var e;return(e=this.Interactivity)==null?void 0:e.remove(t)}),this.interactionInstances=[]}};var Uo=".autowidth-desktop:not(.autoheight-desktop) > .element-content, .autowidth-mobile:not(.autoheight-mobile) > .element-content",nn="--elementHeightPx",mt=class n{static create(){return new this}constructor(){flexbe_cli.is_admin&&flexbe_cli.events.off("entity_render:template.autoWidth").on("entity_render:template.autoWidth",e=>{if(!e||!e.id)return;let i=document.querySelector(`[data-id="${e.id}"]`);this.observeInArea(i)});let t=e=>{let i=e._core;if(i&&i.inScreen)this.observeInArea(i.area);else{let o=new AbortController;e.addEventListener("screen",r=>{let s=r.detail||{};s.state&&s.first&&(this.observeInArea(r.target),o.abort())},{signal:o.signal})}};M(()=>document.querySelectorAll(".b_block").forEach(e=>t(e))),M(()=>document.querySelectorAll(".m_modal").forEach(e=>t(e))),M(()=>document.querySelectorAll(".w_widget").forEach(e=>t(e)))}observeInArea(t=document){let e=t?.querySelectorAll(Uo)||[];Array.from(e).forEach(i=>n.observer.observe(i))}};mt.observer=new ResizeObserver(n=>{n.forEach(({target:t,contentRect:e})=>{let i=t&&t.offsetParent;if(!i)return;let o=getComputedStyle(i),r=`${e.height}px`;o.getPropertyValue(nn)!==r&&requestAnimationFrame(()=>{i.style.setProperty(nn,r)})})});var sn,Go=150,Yo=2160,Xo=Math.min(2,window.devicePixelRatio),V=class{static create(){return new this}constructor(){var t;let e=(t=flexbe_cli.vars)==null||(t=t.site)==null?void 0:t.images;this.imageOptions={lazy:!0,lazy_priority:!1,avif:!1,webp:!1,...e},this.loadInArea(document,"inline"),this.initLazyLoading(),this.initLazyPriority()}initLazyLoading(){flexbe_cli.is_admin&&flexbe_cli.events.off("entity_render:template.lazyLoading").on("entity_render:template.lazyLoading",e=>{if(!(e!=null&&e.id))return;if(e.is==="layout"||e.id==="page"){this.loadInArea(document,"inline"),this.loadInArea(document,"lazy");return}let i=document.querySelector(`[data-id="${e.id}"]`);i&&(this.loadInArea(i,"inline"),this.loadInArea(i,"lazy"))});let t=e=>{let i=e._core;if(i!=null&&i.inScreen)this.loadInArea(i.area,"lazy");else{let o=new AbortController;e.addEventListener("screen",r=>{let s=r.detail||{};s.state&&s.first&&(this.loadInArea(r.target,"lazy"),o.abort())},{signal:o.signal})}};M(()=>document.querySelectorAll(".b_block").forEach(e=>t(e))),M(()=>document.querySelectorAll(".m_modal").forEach(e=>t(e))),M(()=>document.querySelectorAll(".w_widget").forEach(e=>t(e)))}initLazyPriority(){this.imageOptions.lazy&&this.imageOptions.lazy_priority&&$(window).one("load.lazyPriority",()=>{let e=[".component-bg",'.bg-fill[data-type="image"]',".component-image",".component-icon"].join(",");this.loadInArea(document,"lazy"),Array.from(document.querySelectorAll(e)).forEac
38h(i=>i.dispatchEvent(new CustomEvent("setImage",{detail:{reason:"lazyPriority"}})))})}loadInArea(t=document,e="inline"){if(!t)return;let i=Array.from(t.querySelectorAll(`[data-${e}-src], [data-${e}-bg], [data-${e}-href]`));Ko(i)}};sn=V;V.observer=new ResizeObserver(n=>{n.filter(e=>e.contentRect.width||e.contentRect.height).forEach(e=>{an(e.target),sn.observer.unobserve(e.target)})});function Ko(n){n.length&&n.forEach(t=>{if(t.tagName==="LINK"||t.tagName==="SCRIPT"){an(t);return}if(t.tagName==="svg"||t.tagName==="use"){var e;t=(e=t.closest("svg"))==null?void 0:e.parentElement}V.observer.observe(t)})}function an(n){let t=n.dataset.inlineSrc||n.dataset.lazySrc,e=n.dataset.inlineBg||n.dataset.lazyBg,i=n.dataset.inlineHref||n.dataset.lazyHref,o=t||e||i,r=n.tagName==="svg"?[n]:[...n.children].filter(d=>d.tagName==="svg");if(r.length){let d=r[0].querySelector("use"),m=d&&(d.dataset.inlineHref||d.dataset.lazyHref);return m&&rn(d,m),!0}if(n.tagName==="LINK")return rn(n,o),!0;if(n.tagName==="SCRIPT")return ei(n,o),!0;if(!o)return!0;if(!/%optimalWidth%/gi.test(o))return e?on(n,o):ei(n,o),V.observer.unobserve(n),!0;let s=n.parentElement,a=s.dataset.imgAttachment==="fixed",l=Number(n.dataset.imgProportion)||100,u=a?window.innerWidth:s.offsetWidth,c=a?window.innerHeight:s.offsetHeight;if(!u&&!c)return!1;let p=l/100,f=t?p:c/u,h;return f<=p?h=u:h=c/p,h=Math.max(Go,Math.min(h*Xo,Yo)),h=Math.round(h),e?on(n,o.replace(/%optimalWidth%/gi,`${h}`)):ei(n,o.replace(/%optimalWidth%/gi,`${h}`)),V.observer.unobserve(n),!0}function on(n,t){let e=getComputedStyle(n).getPropertyValue("background-image");n.style.backgroundImage=[`url(${t})`,e].filter(o=>o).join(","),["data-inline-bg","data-lazy-bg"].forEach(o=>n.removeAttribute(o));let i=n.parentElement.querySelector("& > img");i&&i.setAttribute("src",t)}function ei(n,t){n.src!==t&&n.setAttribute("src",t),["data-inline-src","data-lazy-src"].forEach(e=>n.removeAttribute(e))}function rn(n,t){n.setAttribute("href",t),["data-inline-href","data-lazy-href"].forEach(e=>n.removeAttribute(e))}var ln,ii={x:0,y:0},cn=".lightbox-container, .b_block, .m_modal, .w_widget",Mt="[data-lightbox]",Nt=class{static create(){return new this}constructor(){var t;this.loaded=!1,this.opened=!1,this.$lg=void 0,this.bindEvents(),(t=window.history.state)!=null&&t.lg&&this.openGallery(window.history.state.lg)}require(t){if(this.loaded){typeof t=="function"&&t();return}flexbe_cli.require(["/_s/lib/jquery/lightGallery/css/lightgallery.min.css","/_s/lib/jquery/lightGallery/js/lightgallery.min.js"],()=>{this.loaded=!0,typeof t=="function"&&t()})}bindEvents(){$(window).one("load.lightbox",()=>{$(Mt).length&&this.require()}),$(document).on("click.lightbox",Mt,t=>{t.preventDefault(),t.stopPropagation()}),$(document).on("pointerdown.lightbox",Mt,t=>{var e,i;flexbe_cli.run.is_preview&&(t.preventDefault(),t.stopPropagation(),ln=t.target,ii={x:(e=t.clientX)!=null?e:t.touches[0].clientX,y:(i=t.clientY)!=null?i:t.touches[0].clientY})}),$(document).on("pointerup.lightbox",Mt,t=>{var e,i;let o=ln===t.target,r={x:(e=t.clientX)!=null?e:t.changedTouches[0].clientX,y:(i=t.clientY)!=null?i:t.changedTouches[0].clientY},s=Math.sqrt((ii.x-r.x)**2+(ii.y-r.y)**2)<5;if(!o||!s||t.button!==0)return;let a=$(t.currentTarget),l=a.closest(cn),u=a.attr("data-lightbox"),c=a.closest("[data-loop]").attr("data-loop")==="1",f=l.find(Mt).filter((d,m)=>{let g=$(m).closest(cn),b=g.is(l),_=g.closest(".swiper-slide-duplicate").length;return b&&!_}).toArray().map(d=>{let m,g=$(d),b=g.attr("data-lightbox")||g.attr("src")||g.attr("href"),_=g.attr("data-sub-html");return _?m=g.find(_).html():m=g.attr("alt")||g.find("img").attr("alt")||"",!g.is(":visible")||c&&g.closest("[data-cloned]").length?null:{src:b,subHtml:m}}).filter(d=>d?.src),h=f.findIndex(d=>d.src===u)||0;this.openGallery({index:h,dynamicEl:f,enableSlide:f.length>1,loop:c})}),$(window).on("popstate.lightbox",()=>{let t=window.history.state||{};t.lg?this.openGallery(t.lg):this.closeGallery()})}openGallery(t={}){if(t.dynamicEl.length===0||this.opened)return;this.opened=!0,this.$lg=$("<div/>");let e=this.$lg,i={index:0,dynamicEl:[],dynamic:!0,subHtmlSelectorRelative:!0,getCaptionFromTitleOrAlt:!0,slideEndAnimation:!1,swipeThreshold:30,counter:!0,closable:!0,download:!1,easing:"ease-out",hideBarsDelay:1e3,zoomIcons:!1,actualSize:!1,enableSlide:!0,loop:!0,...t};i.index<=0&&(i.index=0),e.on("onBeforeOpen.lg",()=>{this.opened=!0,un(i)}),e.on("onBeforeSlide.lg",(o,r,s)=>{r!==s&&un({...i,index:s})}),e.on("onBeforeClose.lg",()=>{var o;(o=window.history.state)!=null&&o.lg&&(flexbe_cli.lockPopstate=!0,window.history.back(),setTimeout(()=>{flexbe_cli.lockPopstate=!1},20)),this.opened=!1}),this.require(()=>e.lightGallery(i))}closeGallery(){var t;this.opened=!1;let e=(t=this.$lg)==null?void 0:t.data("lightGallery");e&&e.destroy()}};function un(n){let t=window.history.state||{};flexbe_cli.lockPopstate=!0,t.lg?window.history.replaceState({lg:n},null,"#image-popup"):window.history.pushState({lg:n},null,"#image-popup"),flexbe_cli.lockPopstate=!1}var Jo=["product-page","pages","modal","modalOptions"],ni=document,Rt="a[href], [data-action]",Jt="[data-action-target]",Qt,dn,Dt=class n{static create(){return Qt||(Qt=new n,Qt)}constructor(){this.bindEvents()}bindEvents(){let t=e=>!!e.target.closest('[data-prevent-action], [data-flexbe-events="off"]');$(ni).off("mousedown.component-links-fake",Jt).on("mousedown.component-links-fake",Jt,e=>e.which===2||e.button===1?(e.preventDefault(),!1):!0),$(ni).off("click.component-links-fake auxclick.component-links-fake").on("click.component-links-fake auxclick.component-links-fake",Jt,e=>{let i=e.originalEvent;return!i||!i.isTrusted||e.target.closest(Rt)||t(e)?!0:(e.stopPropagation(),e.stopImmediatePropagation(),Xe($(e.currentTarget).children(Rt).get(0),i),!1)}),$(ni).off("click.component-links auxclick.component-links",Rt).on("click.component-links auxclick.component-links",Rt,e=>{let i=e.currentTarget,o=$(i);if(t(e))return!0;
38if(!flexbe_cli.run.is_preview&&!i.closest(".editor-focus, .b_block--global, .component-menu-dropdown"))return e.preventDefault(),!0;let r=o.closest("[data-action]").data("action")||(i.tagName==="A"?"link":"none");if(this.reachGoals(e),["link","app_link","phone","mail","anchor"].includes(r))return this.actionLink(e);if(r==="file")return this.actionFile();if(r==="button")return this.actionButton(e);if(r==="modalOptions")return this.openProductOptions(e);if(r.startsWith("modal"))return this.actionModal(e);if(r==="cart")return this.actionCart(e);if(r==="quiz")return this.actionQuiz(e);if(r==="close")return this.actionClose(e);if(r==="code")return this.actionCode(e);if(r==="popup")return e.preventDefault(),!1;r==="a11y"&&flexbe_cli.events.trigger("ui_mobilemenu_close"),r==="copy"&&this.actionCopy(e)})}openProductOptions(t){t.preventDefault(),t.stopPropagation();let e=t.currentTarget.dataset.productId;if(!e||!flexbe_cli.run.is_preview)return;let[i]=flexbe_cli.ecommerce.productsStore.getProducts([e]);i&&setTimeout(()=>{flexbe_cli.events.trigger("ui_modal_open",{id:"product-options",data:{product:i},options:{hash:!1,rise:!0}})},100)}actionCode(t){if(!flexbe_cli.run.is_preview)return;let e=t.currentTarget,i=async function(){}.constructor;return new i("event",e.getAttribute("data-code")||"")(t.originalEvent)}actionFile(){return!0}actionLink(t){let e=t.currentTarget,o=e.hasAttribute("href")?e.getAttribute("href"):"",r=t.button===2||t.which===3,s=t.button===1||t.which===2,a=t.metaKey||t.ctrlKey||s||e.getAttribute("target")==="_blank"||!1,l=e.hasAttribute("download"),u=flexbe_cli.is_admin;r||l||a&&!s&&!u||(t.preventDefault(),clearTimeout(dn),dn=setTimeout(()=>{flexbe_cli.helpers.gotoLink(o,a)},15))}actionCopy(t){let e=t.currentTarget,i=e.getAttribute("href");i&&(i=new URL(i,location.href).toString());let o=e.getAttribute("data-copy")||i||e.textContent;if(e.closest(".markdown-code-wrapper")){var r;o=(r=e.closest(".markdown-code-wrapper").querySelector("code"))==null?void 0:r.textContent}if(o)try{navigator.clipboard.writeText(o),e.classList.add("copied"),setTimeout(()=>e.classList.remove("copied"),600)}catch(s){console.error("Failed to copy anchor link:",s)}}actionButton(t){t.stopPropagation();let i=$(t.currentTarget).closest(".content-zone, [data-item-id]").first().find(".component-button").not(".form-button").find(Rt);i[0]&&Xe(i[0],t)}actionModal(t){let e=$(t.currentTarget),i=this.getProductInfo(e[0]),o=e.attr("data-modal-id"),r=e.closest("[data-page-id]").attr("data-page-id");/^(form|done)$/.test(o)&&!flexbe_cli.modal.find(o,r)&&(o=`${e.closest("[data-id]").attr("data-id").split("_")[0]}_${o}`),flexbe_cli.events.trigger("ui_mobilemenu_close"),flexbe_cli.events.trigger("ui_modal_open",{id:o,pageId:r,data:{items:i?[i]:[]}})}actionCart(t){let e=$(t.currentTarget),i=e.closest(".m_modal").length,o=e.closest(".disabled").length,r=this.getProductInfo(e[0]),s=!1,a=e.closest(Jt);a.length||(a=e),!(!r||o)&&(s=a.is("button"),s&&(a.append(` 39 <svg class="in-cart-icon" viewBox="0 0 18 14" width="18" height="18"> 40 <path d="M 2.205 5.77223L 0 7.92347L 6.3 14L 18 2.15124L 15.795 0L 6.3 9.74699L 2.205 5.77223Z"/> 41 </svg> 42 `),requestAnimationFrame(()=>{a.addClass("animate-add-to-cart")})),setTimeout(()=>{i&&(flexbe_cli.events.trigger("ui_modal_close"),flexbe_cli.ecommerce.cartStore.dispatch("addItem",r)),s&&requestAnimationFrame(()=>{a.removeClass("animate-add-to-cart"),a.find(".in-cart-icon").remove()})},i?450:1600),i||flexbe_cli.ecommerce.cartStore.dispatch("addItem",r))}actionQuiz(t){let e=$(t.currentTarget).closest("[data-id]").attr("data-id");flexbe_cli.events.trigger("quiz_command",{command:"start",id:e})}actionClose(t){t.preventDefault(),flexbe_cli.events.trigger("ui_modal_close")}reachGoals(t){var e;let i=$(t.currentTarget),o=t.currentTarget,r=i.attr("data-action"),s=i.attr("href")||"",a=r==="modal"?i.attr("data-modal-id"):s,l=r==="quiz"?!1:flexbe_cli.stat.goals.getGoal(r,a),u=i.attr("data-goal"),c=i.attr("data-html-goal"),p={link_url:s,link_id:o.id,link_classes:o.getAttribute("class")||"",link_text:((e=o.textContent)==null?void 0:e.trim())||""};
42if(r==="file"){let f=o.getAttribute("download")||"";try{f=f||decodeURIComponent(new URL(s,location.href).pathname.split("/").pop()||"")}catch{}p.file_name=f,p.file_extension=f.includes(".")?f.split(".").pop():""}flexbe_cli.stat.goals.reachGoals({mainGoal:l,goal:u,htmlGoal:c},p),this.reachEnhancedClick(r,s,p),this.reachProductViews(o,r)}reachEnhancedClick(t,e,i){if(!(!["link","app_link"].includes(t)||!e||e.startsWith("#")||e.startsWith("mailto:")||e.startsWith("tel:")))try{let o=new URL(e,location.href);if(o.origin===location.origin)return;flexbe_cli.stat.goals.reachGoal("click",{...i,outbound:!0,link_domain:o.hostname})}catch{}}reachProductViews(t,e){if(!Jo.includes(e))return;let i=this.getProductInfo(t);if(!i)return;let o=t.closest("[data-item-list-name]"),r=i;if(o){let s=o.getAttribute("data-item-list-name")||"",a=o.getAttribute("data-item-list-id")||"",l=t.closest("[data-product-item]"),u=[...o.querySelectorAll(":scope > [data-product-item]")],c=l?u.indexOf(l):-1;r={...i,...s?{list:s}:{},...a?{listId:a}:{},...c>=0?{position:c+1}:{}}}flexbe_cli.stat.ecommerce.selectItem(r),(e==="modal"||e==="modalOptions")&&flexbe_cli.stat.ecommerce.viewItem(r)}getProductInfo(t){var e;let i=flexbe_cli.ecommerce.getProductInfo(t)||{};return(!((e=i)!=null&&e.title)||i.title==="-"||i.price==null&&!flexbe_cli.ecommerce.settings.allowPriceless)&&(i=null),i}};var Zt,Ft=class n{static create(){return Zt||(Zt=new n,Zt)}constructor(){this.bindEvents()}bindEvents(){let t=(e,i)=>{var o;let s=(o=$(e).find(".swiper")[0])==null?void 0:o.swiper;if(s){if(i==="prev")s.slidePrev();else if(i==="next")s.slideNext();else if(i.includes("slide")){let a=+i.match(/\d+$/)[0];s.slideTo(a-1)}}};$("body").on("click",'a[href^="#prev"], a[href^="#next"], a[href^="#slide"]',e=>{let i=String(e.currentTarget.href).match(".*#(.*)")[1],[o,r]=i.split(":"),s;r?s=$(`[data-id="${r}"]`)[0]:s=$(e.currentTarget).parents("[data-id]").toArray().find(l=>l.querySelector(".swiper")),s&&(flexbe_cli.scroll.toElement(s,{complete:()=>{t(s,o)}}),e.preventDefault(),e.stopPropagation())})}};var fn=new Map,gt=new Map,pn={},oi=n=>{let t=$(n),e=t.find("[data-component]").toArray();return t.each((i,o)=>{$(o).is("[data-component]")&&e.unshift(o)}),e},hn=(n,t)=>{gt.has(n)||gt.set(n,t),n.componentInstance=t},Qo=n=>{n.componentInstance=null,gt.delete(n)},Zo={registerComponent(n){fn.set(n.is,n)},getComponentClass(n){return fn.get(n)},getInstances(n){return oi(n).map(t=>gt.get(t)).filter(Boolean)},getGlobalInstance(n){return pn[n]},setGlobalInstance(n,t){pn[n]=t},init(){this.setGlobalInstance("autoWidth",mt.create()),this.setGlobalInstance("lazyLoading",V.create()),this.setGlobalInstance("links",Dt.create()),this.setGlobalInstance("lightbox",Nt.create()),this.setGlobalInstance("sliderControl",Ft.create()),this.setGlobalInstance("animation",Ct.create()),flexbe_cli.events.off(".core_components").on("hideShowUI.core_components",n=>{Array.from(gt.values()).forEach(t=>t._onHideShowUI(n))}),$(window).off(".core_components").on("resized.core_components",()=>{Array.from(gt.values()).forEach(n=>n._onWindowResize())})},initInArea(n,t){$t(oi(n),10).forEach(ut(i=>i.forEach(o=>this.initComponent(o,t))))},destroyInArea(n){$t(oi(n),10).forEach(ut(e=>e.forEach(i=>this.destroyComponent(i))))},initComponent(n,t="init",e){if(!(n!=null&&n.isConnected))return null;let i=n.componentInstance;if(i)if(t==="update")i.destroy();else return hn(n,i),i;e=e||flexbe_cli.entity.closestEntity(n);let o=String(n.getAttribute("data-component")).trim(),r=this.getComponentClass(o);return r?(typeof r=="function"&&(i=new r({component:n,core:e||flexbe_cli.entity.closestEntity(n),reason:t}),i._onInit(),hn(n,i)),i):null},destroyComponent(n){let t=n.componentInstance;t&&t.destroy(),Qo(n)}},ri=Zo;flexbe_cli.helpers=wi;flexbe_cli.run=W;flexbe_cli.utm=at;flexbe_cli.stat=ke;flexbe_cli.events=A;flexbe_cli.locale=z;flexbe_cli.adaptive=Pe;flexbe_cli.scroll=B;flexbe_cli.resize=Z;flexbe_cli.tip=Oi;flexbe_cli.transitions=qt;flexbe_cli.require=G;flexbe_cli.fixed=De;flexbe_cli.entity=ct;flexbe_cli.block=Ge;flexbe_cli.modal=F;flexbe_cli.ecommerce=K;flexbe_cli.components=ri;ve(()=>{W.init(),B.init(),Z.init(),Pe.init()},()=>{ri.init(),M(()=>ke.init()),M(()=>K.init({enableDelivery:!0,enablePromotions:!0,enableProducts:!0})),M(()=>{ct.init(),Ge.init(),F.init()}),M(()=>Pi.init()),M(()=>De.init(),200)});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.