!function(){var e,t,n,o,i={9476:function(){Flatsome.behavior("back-to-top",{attach(e){const t=jQuery(".back-to-top",e);if(!t.length)return;let n=null;window.addEventListener("scroll",(()=>{var e;const o=jQuery(window).scrollTop();n=null!==(e=n)&&void 0!==e?e:jQuery(window).height(),t.toggleClass("active",o>=n)}),{passive:!0})}})},3387:function(){Flatsome.behavior("commons",{attach(e){jQuery("select.resizeselect").resizeselect(),jQuery("[data-parallax]",e).flatsomeParallax(),jQuery.fn.packery&&(jQuery("[data-packery-options], .has-packery",e).each((function(){let e=jQuery(this);e.packery({originLeft:!flatsomeVars.rtl}),setTimeout((function(){e.imagesLoaded((function(){e.packery("layout")}))}),100)})),jQuery(".banner-grid-wrapper").imagesLoaded((function(){jQuery(this.elements).removeClass("processing")}))),"objectFitPolyfill"in window&&window.objectFitPolyfill()},detach(e){}})},7439:function(){const e="ux-body-overlay--hover-active";Flatsome.behavior("nav-hover",{attach(t){!function(t){const n=jQuery(".ux-body-overlay",t);n.length&&(n.removeClass(e),jQuery([".nav-prompts-overlay li.menu-item",".nav-prompts-overlay .header-vertical-menu__opener"].join(", "),t).on({mouseenter:()=>n.addClass(e),mouseleave:()=>n.removeClass(e)}))}(t)}})},6910:function(){Flatsome.behavior("sidebar-tabs",{attach(e){jQuery(".sidebar-menu-tabs",e).each(((e,t)=>{const n=jQuery(t),o=n.find(".sidebar-menu-tabs__tab"),i=n.parent().find("ul.nav-sidebar");o.each(((e,t)=>{jQuery(t).on("click",(function(t){!function(e,t,n){t.each(((t,n)=>jQuery(n).toggleClass("active",t===e))),n.each(((t,n)=>jQuery(n).toggleClass("hidden",t===e)))}(e,o,i),t.preventDefault(),t.stopPropagation()}))}))}))}})},9880:function(){Flatsome.behavior("scroll-to",{attach(){const e=jQuery("span.scroll-to"),t=parseInt(flatsomeVars.sticky_height,10),n=jQuery("#wpadminbar");if(!e.length)return;let o=jQuery(".scroll-to-bullets");o.length?(o.children().lazyTooltipster("destroy"),o.empty()):(o=jQuery('<div class="scroll-to-bullets hide-for-medium"/>'),jQuery("body").append(o)),jQuery("li.scroll-to-link").remove(),e.each((function(e,t){const i=jQuery(t),r=i.data("link"),a=i.data("title"),s=`a[href*="${r||"<nolink>"}"]`;if(i.data("bullet")){const e=jQuery(`\n          <a href="${r}" data-title="${a}" title="${a}">\n          <strong></strong>\n          </a>\n        `);e.lazyTooltipster({position:"left",delay:50,contentAsHTML:!0,touchDevices:!1}),o.append(e)}const l=jQuery(`\n          <li class="scroll-to-link"><a data-animate="fadeIn" href="${r}" data-title="${a}" title="${a}">\n          ${a}\n          </a></li>\n        `);jQuery("li.nav-single-page").before(l),setTimeout((function(){jQuery(".scroll-to-link a").attr("data-animated","true")}),300),jQuery(s).off("click").on("click",(function(e){const t=jQuery(this).attr("href").split("#")[1];if(!t)return;let o=i.attr("data-offset");o&&n.length&&n.is(":visible")&&(o=Number(o)+Number(n.height())),setTimeout((()=>{jQuery.scrollTo(`a[name="${t}"]`,{...!isNaN(o)&&{offset:-o}})}),0),jQuery.fn.magnificPopup&&jQuery.magnificPopup.close(),e.preventDefault()}))}));let i=0;const r=()=>{clearTimeout(i),i=setTimeout((()=>{const n=e.get().map((e=>e.getBoundingClientRect().y));o.find("a").each(((e,o)=>{const i=n[e],r=n[e+1]||window.innerHeight,a=i<=t+100&&r>t+100;jQuery(o).toggleClass("active",a)}))}),100)};if(window.addEventListener("scroll",r,{passive:!0}),window.addEventListener("resize",r),r(),location.hash){const e=decodeURIComponent(location.hash.replace("#",""));let t=jQuery(`a[name="${e}"]`).closest(".scroll-to").attr("data-offset");t&&n.length&&n.is(":visible")&&(t=Number(t)+Number(n.height())),jQuery.scrollTo(`a[name="${e}"]`,{...!isNaN(t)&&{offset:-t}})}},detach(){jQuery("span.scroll-to").length&&setTimeout(this.attach,0)}})},5973:function(){function e(e,t,n){t.each(((t,n)=>{jQuery(n).toggleClass("active",t===e),jQuery(n).find("> a").attr("aria-selected",t===e?"true":"false").attr("tabindex",t===e?null:"-1")})),n.each(((t,n)=>jQuery(n).toggleClass("active",t===e))),jQuery.fn.packery&&jQuery("[data-packery-options]",n[e]).packery("layout")}Flatsome.behavior("tabs",{attach(t){const n=window.location.hash;let o=!1;jQuery(".tabbed-content",t).each((function(t,i){const r=jQuery(i),a=r.find("> .nav > li"),s=r.find("> .tab-panels > .panel"),l=r.find("> .nav").hasClass("active-on-hover"),c=r.find("> .nav").hasClass("nav-vertical");s.removeAttr("style"),a.each((function(t,i){const u=jQuery(i).find("a");u.on("click",(function(n){e(t,a,s),n.preventDefault(),n.stopPropagation()})),u.on("keydown",(e=>{let n;switch(e.key){case c?"ArrowDown":"ArrowRight":n=a.eq((t+1)%a.length);break;case c?"ArrowUp":"ArrowLeft":n=a.eq((t-1)%a.length);break;case"Home":n=a.first();break;case"End":n=a.last()}n&&(n.find("> a").trigger("focus"),e.stopPropagation(),e.preventDefault())})),l&&u.hoverIntent({sensitivity:3,interval:20,timeout:70,over(n){e(t,a,s)},out(){}}),!n.substring(1).length||decodeURIComponent(n.substring(1))!==u.attr("href")?.split("#")[1]&&n.substring(1)!==u.attr("href")?.split("#")[1]||(e(t,a,s),o||(o=!0,setTimeout((()=>{jQuery.scrollTo(r)}),500)))}))}))}})},7633:function(){Flatsome.behavior("toggle",{attach(e){function t(e){const t=jQuery(e.currentTarget).parent();t.toggleClass("active"),t.attr("aria-expanded","false"===t.attr("aria-expanded")?"true":"false"),e.preventDefault()}jQuery([".widget ul.children",".nav ul.children",".menu .sub-menu",".mobile-sidebar-levels-2 .nav ul.children > li > ul"].join(", "),e).each((function(){if(!jQuery(this).prev("button.toggle").length){const e=jQuery(this).parents(".nav-slide").length?"right":"down";jQuery(this).parent().addClass("has-child").attr("aria-expanded","false"),jQuery(this).before(`<button class="toggle" aria-label="${window.flatsomeVars.i18n.toggleButton}"><i class="icon-angle-${e}" aria-hidden="true"></i></button>`)}})),jQuery(".current-cat-parent",e).addClass("active").attr("aria-expanded","true").removeClass("current-cat-parent"),jQuery(".toggle",e).off("click.flatsome").on("click.flatsome",t);const n=jQuery("body").hasClass("mobile-submenu-toggle");jQuery(".sidebar-menu li.menu-item.has-child",e).each((function(){const e=jQuery(this),o=e.find("> a:first");"#"===o.attr("href")?o.off("click.flatsome").on("click.flatsome",(function(t){t.preventDefault(),e.toggleClass("active"),e.attr("aria-expanded","false"===e.attr("aria-expanded")?"true":"false")})):n&&o.next(".toggle").length&&o.on("click",t)}))}})},6808:function(){Flatsome.behavior("youtube",{attach(e){var t,n,o,i,r,a=jQuery(".ux-youtube",e);0!==a.length&&(window.onYouTubePlayerAPIReady=function(){a.each((function(){var e=jQuery(this),t=e.attr("id"),n=e.data("videoid"),o=e.data("loop"),i=e.data("audio");new YT.Player(t,{height:"100%",width:"100%",playerVars:{html5:1,autoplay:1,controls:0,rel:0,modestbranding:1,playsinline:1,showinfo:0,fs:0,loop:o,el:0,playlist:o?n:void 0},videoId:n,events:{onReady:function(e){0===i&&e.target.mute()}}})}))},n="script",o="youtube-jssdk",r=(t=document).getElementsByTagName(n)[0],t.getElementById(o)||((i=t.createElement(n)).id=o,i.src="https://www.youtube.com/player_api",r.parentNode.insertBefore(i,r)))}})},7345:function(e,t,n){n.g.Flatsome={behaviors:{},plugin(e,t,n){n=n||{},jQuery.fn[e]=function(o){if("string"==typeof arguments[0]){var i=null,r=arguments[0],a=Array.prototype.slice.call(arguments,1);return this.each((function(){if(!jQuery.data(this,"plugin_"+e)||"function"!=typeof jQuery.data(this,"plugin_"+e)[r])throw new Error("Method "+r+" does not exist on jQuery."+e);i=jQuery.data(this,"plugin_"+e)[r].apply(this,a)})),"destroy"===r&&this.each((function(){jQuery(this).removeData("plugin_"+e)})),void 0!==i?i:this}if("object"==typeof o||!o)return this.each((function(){jQuery.data(this,"plugin_"+e)||(o=jQuery.extend({},n,o),jQuery.data(this,"plugin_"+e,new t(this,o)))}))}},behavior(e,t){this.behaviors[e]=t},attach(e,t=e){if("string"==typeof e)return this.behaviors.hasOwnProperty(e)&&"function"==typeof this.behaviors[e].attach?this.behaviors[e].attach(t||document):null;for(let e in this.behaviors)"function"==typeof this.behaviors[e].attach&&this.behaviors[e].attach(t||document)},detach(e,t=e){if("string"==typeof e)return this.behaviors.hasOwnProperty(e)&&"function"==typeof this.behaviors[e].detach?this.behaviors[e].detach(t||document):null;for(let e in this.behaviors)"function"==typeof this.behaviors[e].detach&&this.behaviors[e].detach(t||document)}}},7727:function(){jQuery(".section .loading-spin, .banner .loading-spin, .page-loader").fadeOut(),jQuery("#top-link").on("click",(function(e){jQuery.scrollTo(0),e.preventDefault()})),jQuery(".scroll-for-more").on("click",(function(e){e.preventDefault();const t=jQuery(this),n=t.closest(".has-scroll-for-more");if(n.length){const e=n.next();e.length?jQuery.scrollTo(e):jQuery.scrollTo(t)}else jQuery.scrollTo(t)})),jQuery(".search-dropdown button").on("click",(function(e){jQuery(this).parent().find("input").trigger("focus"),e.preventDefault()})),jQuery(".current-cat").addClass("active"),jQuery("html").removeClass("loading-site"),setTimeout((function(){jQuery(".page-loader").remove()}),1e3),jQuery(".resize-select").resizeselect(),flatsomeVars.user.can_edit_pages&&jQuery(".block-edit-link").each((function(){const e=jQuery(this);let t=e.data("link");const n=e.data("backend"),o=e.data("title"),i=e.parents('[id^="menu-item-"]');if(i.length&&i.hasClass("menu-item-has-block")){const e=i.attr("id").match(/menu-item-(\d+)/);e&&e[1]&&(t+=`&menu_id=${e[1]}`)}jQuery(this).next().addClass("has-block").lazyTooltipster({distance:-15,repositionOnScroll:!0,interactive:!0,contentAsHTML:!0,content:o+'<br/><a class="button edit-block-button edit-block-button-builder" href="'+t+'">UX Builder</a><a class="button edit-block-button edit-block-button edit-block-button-backend" href="'+n+'">WP Editor</a>'}),jQuery(this).remove()})),document.addEventListener("uxb_app_ready",(()=>{const e=new URLSearchParams(window.top.location.search),t=parseInt(e.get("menu_id"));t&&setTimeout((()=>{const e=jQuery(`#menu-item-${t}`),n=e.parent().hasClass("ux-nav-vertical-menu");e.hasClass("menu-item-has-block has-dropdown")&&!e.hasClass("current-dropdown")&&(n&&jQuery(".header-vertical-menu__fly-out").addClass("header-vertical-menu__fly-out--open"),jQuery(`#menu-item-${t} a:first`).trigger("click"))}),1e3)})),jQuery("#hotspot").on("click",(function(e){e.preventDefault()})),jQuery(".wpcf7-form .wpcf7-submit").on("click",(function(e){jQuery(this).parent().parent().addClass("processing")})),jQuery(".wpcf7").on("wpcf7invalid wpcf7spam wpcf7mailsent wpcf7mailfailed",(function(e){jQuery(".processing").removeClass("processing")})),jQuery(document).ajaxComplete((function(e,t,n){jQuery(".processing").removeClass("processing")}))},9450:function(e,t,n){jQuery.fn.lazyTooltipster=function(e){return this.each(((t,o)=>{const i=jQuery(o);"string"==typeof e?jQuery.fn.tooltipster&&i.hasClass("tooltipstered")&&i.tooltipster(e):i.one("mouseenter",(t=>{!function(e,t){(jQuery.fn.tooltipster?Promise.resolve():n.e(635).then(n.t.bind(n,269,23))).then((()=>{e.hasClass("tooltipstered")||e.tooltipster({theme:"tooltipster-default",delay:10,animationDuration:300,...t}),e.tooltipster("show")}))}(i,e)}))}))}},8540:function(){Flatsome.plugin("resizeselect",(function(e,t){jQuery(e).on("change",(function(){var e=jQuery(this),t=e.find("option:selected").val(),n=e.find("option:selected").text(),o=jQuery('<span class="select-resize-ghost">').html(n);o.appendTo(e.parent());var i=o.width();o.remove(),e.width(i+7),t&&e.parent().parent().find("input.search-field").trigger("focus")})).trigger("change")}))},3404:function(e,t,n){var o,i;"undefined"!=typeof window&&window,void 0===(i="function"==typeof(o=function(){"use strict";function e(){}var t=e.prototype;return t.on=function(e,t){if(e&&t){var n=this._events=this._events||{},o=n[e]=n[e]||[];return-1==o.indexOf(t)&&o.push(t),this}},t.once=function(e,t){if(e&&t){this.on(e,t);var n=this._onceEvents=this._onceEvents||{};return(n[e]=n[e]||{})[t]=!0,this}},t.off=function(e,t){var n=this._events&&this._events[e];if(n&&n.length){var o=n.indexOf(t);return-1!=o&&n.splice(o,1),this}},t.emitEvent=function(e,t){var n=this._events&&this._events[e];if(n&&n.length){n=n.slice(0),t=t||[];for(var o=this._onceEvents&&this._onceEvents[e],i=0;i<n.length;i++){var r=n[i];o&&o[r]&&(this.off(e,r),delete o[r]),r.apply(this,t)}return this}},t.allOff=function(){delete this._events,delete this._onceEvents},e})?o.call(t,n,t,e):o)||(e.exports=i)},3959:function(){!function(){var e=window.MutationObserver||window.WebKitMutationObserver,t="ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch;if(void 0===document.documentElement.style["touch-action"]&&!document.documentElement.style["-ms-touch-action"]&&t&&e){window.Hammer=window.Hammer||{};var n=/touch-action[:][\s]*(none)[^;'"]*/,o=/touch-action[:][\s]*(manipulation)[^;'"]*/,i=/touch-action/,r=/(iP(ad|hone|od))/.test(navigator.userAgent)&&("indexedDB"in window||!!window.performance);window.Hammer.time={getTouchAction:function(e){return this.checkStyleString(e.getAttribute("style"))},checkStyleString:function(e){if(i.test(e))return n.test(e)?"none":!o.test(e)||"manipulation"},shouldHammer:function(e){var t=e.target.hasParent;return!(!t||r&&!(Date.now()-e.target.lastStart<125))&&t},touchHandler:function(e){var t=this.shouldHammer(e);if("none"===t)this.dropHammer(e);else if("manipulation"===t){var n=e.target.getBoundingClientRect();n.top===this.pos.top&&n.left===this.pos.left&&this.dropHammer(e)}this.scrolled=!1,delete e.target.lastStart,delete e.target.hasParent},dropHammer:function(e){"touchend"===e.type&&(e.target.focus(),setTimeout((function(){e.target.click()}),0)),e.preventDefault()},touchStart:function(e){this.pos=e.target.getBoundingClientRect(),e.target.hasParent=this.hasParent(e.target),r&&e.target.hasParent&&(e.target.lastStart=Date.now())},styleWatcher:function(e){e.forEach(this.styleUpdater,this)},styleUpdater:function(e){if(e.target.updateNext)e.target.updateNext=!1;else{var t=this.getTouchAction(e.target);t?"none"!==t&&(e.target.hadTouchNone=!1):!t&&(e.oldValue&&this.checkStyleString(e.oldValue)||e.target.hadTouchNone)&&(e.target.hadTouchNone=!0,e.target.updateNext=!1,e.target.setAttribute("style",e.target.getAttribute("style")+" touch-action: none;"))}},hasParent:function(e){for(var t,n=e;n&&n.parentNode;n=n.parentNode)if(t=this.getTouchAction(n))return t;return!1},installStartEvents:function(){document.addEventListener("touchstart",this.touchStart.bind(this)),document.addEventListener("mousedown",this.touchStart.bind(this))},installEndEvents:function(){document.addEventListener("touchend",this.touchHandler.bind(this),!0),document.addEventListener("mouseup",this.touchHandler.bind(this),!0)},installObserver:function(){this.observer=new e(this.styleWatcher.bind(this)).observe(document,{subtree:!0,attributes:!0,attributeOldValue:!0,attributeFilter:["style"]})},install:function(){this.installEndEvents(),this.installStartEvents(),this.installObserver()}},window.Hammer.time.install()}}()},8279:function(e,t,n){var o,i;!function(r,a){"use strict";o=[n(3404)],i=function(e){return function(e,t){var n=e.jQuery,o=e.console;function i(e,t){for(var n in t)e[n]=t[n];return e}var r=Array.prototype.slice;function a(e,t,s){if(!(this instanceof a))return new a(e,t,s);var l,c=e;"string"==typeof e&&(c=document.querySelectorAll(e)),c?(this.elements=(l=c,Array.isArray(l)?l:"object"==typeof l&&"number"==typeof l.length?r.call(l):[l]),this.options=i({},this.options),"function"==typeof t?s=t:i(this.options,t),s&&this.on("always",s),this.getImages(),n&&(this.jqDeferred=new n.Deferred),setTimeout(this.check.bind(this))):o.error("Bad element for imagesLoaded "+(c||e))}a.prototype=Object.create(t.prototype),a.prototype.options={},a.prototype.getImages=function(){this.images=[],this.elements.forEach(this.addElementImages,this)},a.prototype.addElementImages=function(e){"IMG"==e.nodeName&&this.addImage(e),!0===this.options.background&&this.addElementBackgroundImages(e);var t=e.nodeType;if(t&&s[t]){for(var n=e.querySelectorAll("img"),o=0;o<n.length;o++){var i=n[o];this.addImage(i)}if("string"==typeof this.options.background){var r=e.querySelectorAll(this.options.background);for(o=0;o<r.length;o++){var a=r[o];this.addElementBackgroundImages(a)}}}};var s={1:!0,9:!0,11:!0};function l(e){this.img=e}function c(e,t){this.url=e,this.element=t,this.img=new Image}return a.prototype.addElementBackgroundImages=function(e){var t=getComputedStyle(e);if(t)for(var n=/url\((['"])?(.*?)\1\)/gi,o=n.exec(t.backgroundImage);null!==o;){var i=o&&o[2];i&&this.addBackground(i,e),o=n.exec(t.backgroundImage)}},a.prototype.addImage=function(e){var t=new l(e);this.images.push(t)},a.prototype.addBackground=function(e,t){var n=new c(e,t);this.images.push(n)},a.prototype.check=function(){var e=this;function t(t,n,o){setTimeout((function(){e.progress(t,n,o)}))}this.progressedCount=0,this.hasAnyBroken=!1,this.images.length?this.images.forEach((function(e){e.once("progress",t),e.check()})):this.complete()},a.prototype.progress=function(e,t,n){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!e.isLoaded,this.emitEvent("progress",[this,e,t]),this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,e),this.progressedCount==this.images.length&&this.complete(),this.options.debug&&o&&o.log("progress: "+n,e,t)},a.prototype.complete=function(){var e=this.hasAnyBroken?"fail":"done";if(this.isComplete=!0,this.emitEvent(e,[this]),this.emitEvent("always",[this]),this.jqDeferred){var t=this.hasAnyBroken?"reject":"resolve";this.jqDeferred[t](this)}},l.prototype=Object.create(t.prototype),l.prototype.check=function(){this.getIsImageComplete()?this.confirm(0!==this.img.naturalWidth,"naturalWidth"):(this.proxyImage=new Image,this.proxyImage.addEventListener("load",this),this.proxyImage.addEventListener("error",this),this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.proxyImage.src=this.img.src)},l.prototype.getIsImageComplete=function(){return this.img.complete&&this.img.naturalWidth},l.prototype.confirm=function(e,t){this.isLoaded=e,this.emitEvent("progress",[this,this.img,t])},l.prototype.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},l.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},l.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},l.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this),this.proxyImage.removeEventListener("error",this),this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},c.prototype=Object.create(l.prototype),c.prototype.check=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.img.src=this.url,this.getIsImageComplete()&&(this.confirm(0!==this.img.naturalWidth,"naturalWidth"),this.unbindEvents())},c.prototype.unbindEvents=function(){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},c.prototype.confirm=function(e,t){this.isLoaded=e,this.emitEvent("progress",[this,this.element,t])},a.makeJQueryPlugin=function(t){(t=t||e.jQuery)&&((n=t).fn.imagesLoaded=function(e,t){return new a(this,e,t).jqDeferred.promise(n(this))})},a.makeJQueryPlugin(),a}(r,e)}.apply(t,o),void 0===i||(e.exports=i)}("undefined"!=typeof window?window:this)},7461:function(e,t,n){var o,i,r;!function(a){"use strict";i=[n(428)],void 0===(r="function"==typeof(o=function(e){var t=e.scrollTo=function(t,n,o){return e(window).scrollTo(t,n,o)};function n(t){return!t.nodeName||-1!==e.inArray(t.nodeName.toLowerCase(),["iframe","#document","html","body"])}function o(e){return"function"==typeof e}function i(t){return o(t)||e.isPlainObject(t)?t:{top:t,left:t}}return t.defaults={axis:"xy",duration:0,limit:!0},e.fn.scrollTo=function(r,a,s){"object"==typeof a&&(s=a,a=0),"function"==typeof s&&(s={onAfter:s}),"max"===r&&(r=9e9),s=e.extend({},t.defaults,s),a=a||s.duration;var l=s.queue&&s.axis.length>1;return l&&(a/=2),s.offset=i(s.offset),s.over=i(s.over),this.each((function(){if(null!==r){var c,u=n(this),d=u?this.contentWindow||window:this,h=e(d),f=r,p={};switch(typeof f){case"number":case"string":if(/^([+-]=?)?\d+(\.\d+)?(px|%)?$/.test(f)){f=i(f);break}f=u?e(f):e(f,d);case"object":if(0===f.length)return;(f.is||f.style)&&(c=(f=e(f)).offset())}var m=o(s.offset)&&s.offset(d,f)||s.offset;e.each(s.axis.split(""),(function(e,n){var o="x"===n?"Left":"Top",i=o.toLowerCase(),r="scroll"+o,a=h[r](),g=t.max(d,n);if(c)p[r]=c[i]+(u?0:a-h.offset()[i]),s.margin&&(p[r]-=parseInt(f.css("margin"+o),10)||0,p[r]-=parseInt(f.css("border"+o+"Width"),10)||0),p[r]+=m[i]||0,s.over[i]&&(p[r]+=f["x"===n?"width":"height"]()*s.over[i]);else{var v=f[i];p[r]=v.slice&&"%"===v.slice(-1)?parseFloat(v)/100*g:v}s.limit&&/^\d+$/.test(p[r])&&(p[r]=p[r]<=0?0:Math.min(p[r],g)),!e&&s.axis.length>1&&(a===p[r]?p={}:l&&(y(s.onAfterFirst),p={}))})),y(s.onAfter)}function y(t){var n=e.extend({},s,{queue:!0,duration:a,complete:t&&function(){t.call(d,f,s)}});h.animate(p,n)}}))},t.max=function(t,o){var i="x"===o?"Width":"Height",r="scroll"+i;if(!n(t))return t[r]-e(t)[i.toLowerCase()]();var a="client"+i,s=t.ownerDocument||t.document,l=s.documentElement,c=s.body;return Math.max(l[r],c[r])-Math.min(l[a],c[a])},e.Tween.propHooks.scrollLeft=e.Tween.propHooks.scrollTop={get:function(t){return e(t.elem)[t.prop]()},set:function(t){var n=this.get(t);if(t.options.interrupt&&t._last&&t._last!==n)return e(t.elem).stop();var o=Math.round(t.now);n!==o&&(e(t.elem)[t.prop](o),t._last=this.get(t))}},t})?o.apply(t,i):o)||(e.exports=r)}()},428:function(e){"use strict";e.exports=window.jQuery}},r={};function a(e){var t=r[e];if(void 0!==t)return t.exports;var n=r[e]={exports:{}};return i[e].call(n.exports,n,n.exports,a),n.exports}a.m=i,a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,{a:t}),t},t=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},a.t=function(n,o){if(1&o&&(n=this(n)),8&o)return n;if("object"==typeof n&&n){if(4&o&&n.__esModule)return n;if(16&o&&"function"==typeof n.then)return n}var i=Object.create(null);a.r(i);var r={};e=e||[null,t({}),t([]),t(t)];for(var s=2&o&&n;"object"==typeof s&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach((function(e){r[e]=function(){return n[e]}}));return r.default=function(){return n},a.d(i,r),i},a.d=function(e,t){for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.f={},a.e=function(e){return Promise.all(Object.keys(a.f).reduce((function(t,n){return a.f[n](e,t),t}),[]))},a.u=function(e){return"js/chunk."+{230:"popups",436:"slider",635:"tooltips",970:"lottie",987:"countup"}[e]+".js"},a.miniCssF=function(e){},a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n={},o="flatsome:",a.l=function(e,t,i,r){if(n[e])n[e].push(t);else{var s,l;if(void 0!==i)for(var c=document.getElementsByTagName("script"),u=0;u<c.length;u++){var d=c[u];if(d.getAttribute("src")==e||d.getAttribute("data-webpack")==o+i){s=d;break}}s||(l=!0,(s=document.createElement("script")).charset="utf-8",s.timeout=120,a.nc&&s.setAttribute("nonce",a.nc),s.setAttribute("data-webpack",o+i),s.src=e),n[e]=[t];var h=function(t,o){s.onerror=s.onload=null,clearTimeout(f);var i=n[e];if(delete n[e],s.parentNode&&s.parentNode.removeChild(s),i&&i.forEach((function(e){return e(o)})),t)return t(o)},f=setTimeout(h.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=h.bind(null,s.onerror),s.onload=h.bind(null,s.onload),l&&document.head.appendChild(s)}},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){const e=a.u;a.u=t=>{const n=e(t),o=globalThis.flatsomeVars?.theme.version;return n+(o?"?ver="+o:"")}}(),a.p=globalThis.flatsomeVars?.assets_url??"/",function(){var e={816:0};a.f.j=function(t,n){var o=a.o(e,t)?e[t]:void 0;if(0!==o)if(o)n.push(o[2]);else{var i=new Promise((function(n,i){o=e[t]=[n,i]}));n.push(o[2]=i);var r=a.p+a.u(t),s=new Error;a.l(r,(function(n){if(a.o(e,t)&&(0!==(o=e[t])&&(e[t]=void 0),o)){var i=n&&("load"===n.type?"missing":n.type),r=n&&n.target&&n.target.src;s.message="Loading chunk "+t+" failed.\n("+i+": "+r+")",s.name="ChunkLoadError",s.type=i,s.request=r,o[1](s)}}),"chunk-"+t,t)}};var t=function(t,n){var o,i,r=n[0],s=n[1],l=n[2],c=0;if(r.some((function(t){return 0!==e[t]}))){for(o in s)a.o(s,o)&&(a.m[o]=s[o]);l&&l(a)}for(t&&t(n);c<r.length;c++)i=r[c],a.o(e,i)&&e[i]&&e[i][0](),e[i]=0},n=self.flatsomeChunks=self.flatsomeChunks||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))}(),function(){"use strict";function e(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)e[o]=n[o]}return e}var t=function t(n,o){function i(t,i,r){if("undefined"!=typeof document){"number"==typeof(r=e({},o,r)).expires&&(r.expires=new Date(Date.now()+864e5*r.expires)),r.expires&&(r.expires=r.expires.toUTCString()),t=encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var s in r)r[s]&&(a+="; "+s,!0!==r[s]&&(a+="="+r[s].split(";")[0]));return document.cookie=t+"="+n.write(i,t)+a}}return Object.create({set:i,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var t=document.cookie?document.cookie.split("; "):[],o={},i=0;i<t.length;i++){var r=t[i].split("="),a=r.slice(1).join("=");try{var s=decodeURIComponent(r[0]);if(o[s]=n.read(a,s),e===s)break}catch(e){}}return e?o[e]:o}},remove:function(t,n){i(t,"",e({},n,{expires:-1}))},withAttributes:function(n){return t(this.converter,e({},this.attributes,n))},withConverter:function(n){return t(e({},this.converter,n),this.attributes)}},{attributes:{value:Object.freeze(o)},converter:{value:Object.freeze(n)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"}),n=a(8279),o=a.n(n);function i(){return/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent)}function r(){return"uxBuilder"===document.documentElement.getAttribute("ng-app")}a(3959),a(7461),a(7345);const s=document.body,l="body-scroll-lock--active",c=i();let u=0;function d(){if(!c)return;u=window.pageYOffset;const e=document.getElementById("wpadminbar"),t=u-(e?e.offsetHeight:0);s.style.overflow="hidden",s.style.position="fixed",s.style.top=`-${t}px`,s.style.width="100%",s.classList.add(l)}function h(){c&&(s.style.removeProperty("overflow"),s.style.removeProperty("position"),s.style.removeProperty("top"),s.style.removeProperty("width"),window.scrollTo(0,u),s.classList.remove(l))}function f(e,t={}){let n=0;const o=t=>{const o=window.scrollY;e(t,{direction:o>n?"down":"up",scrollY:o}),n=o};return window.addEventListener("scroll",o,{...t,passive:!0}),()=>{window.removeEventListener("scroll",o)}}let p,m,y,g=jQuery("#header"),v=g.find(".header-wrapper"),b=jQuery(".header-top",g),w=jQuery(".header-main",g),j=g.hasClass("has-sticky"),k=g.hasClass("sticky-hide-on-scroll");function Q(e,t="down",n=!1){void 0===m&&void 0===y&&(g.hasClass("sticky-shrink")?(m=b.hasClass("hide-for-sticky")?b.height():0,m+=w.hasClass("hide-for-sticky")?w.height():0,y=1+m):(m=v.height()+100,y=b.hasClass("hide-for-sticky")?b.height()+1:1)),k?"down"===t||e<y?e<y?C():(p=setTimeout(C,100),g.addClass("sticky-hide-on-scroll--active")):e>m&&(p=setTimeout((()=>x(n)),100),g.removeClass("sticky-hide-on-scroll--active")):e>m?x(n):e<y&&C()}function x(e=!1){if(v.hasClass("stuck"))return;const t=g.height();v.addClass("stuck"),v.toggleClass("ux-no-animation",e),g.height(t),jQuery(".has-transparent").removeClass("transparent"),jQuery(".toggle-nav-dark").removeClass("nav-dark"),jQuery(document).trigger("flatsome-header-sticky")}function C(){v.hasClass("stuck")&&(g.height(""),v.removeClass(["stuck","ux-no-animation"]),jQuery(".has-transparent").addClass("transparent"),jQuery(".toggle-nav-dark").addClass("nav-dark"),jQuery(document).trigger("flatsome-header-unsticky"))}j&&(document.addEventListener("DOMContentLoaded",(()=>{f(((e,{scrollY:t,direction:n})=>{p&&(clearTimeout(p),p=void 0),s.classList.contains(l)||Q(t,n)})),p=setTimeout((()=>{window.scrollY&&Q(window.scrollY)}),100)})),jQuery("body").on("experimental-flatsome-pjax-request-done",(()=>{g=jQuery("#header"),v=g.find(".header-wrapper"),b=jQuery(".header-top",g),w=jQuery(".header-main",g),j=g.hasClass("has-sticky"),k=g.hasClass("sticky-hide-on-scroll"),window.scrollY&&Q(window.scrollY,void 0,!0)})));const E=window.matchMedia("(prefers-reduced-motion: reduce)");let L=!1;function _(){L="undefined"==typeof UxBuilder&&E.matches}_(),E.addEventListener?.("change",_);const T=[];let A;function I(){T.length&&(cancelAnimationFrame(A),A=requestAnimationFrame((()=>{for(let e=0;e<T.length;e++)T[e].element.offsetParent?P(T[e]):T.splice(e,1)})))}function P(e){!function({element:e,type:t}){let n=M(e.dataset.parallax),o=S(e),i=(window.innerHeight-o.offsetHeight)*n;switch(t){case"backgroundImage":e.style.backgroundSize=n?"100% auto":null;break;case"backgroundElement":e.style.height=n?`${o.offsetHeight+i}px`:null}}(e),function({element:e,type:t}){let n=M(e.dataset.parallax||e.dataset.parallaxBackground),o=window.innerHeight,i=S(e),r=e.offsetHeight-i.offsetHeight,a=e.getBoundingClientRect(),s=i!==e?i.getBoundingClientRect():a,l=a.top+e.offsetHeight/2,c=o/2-l,u=o/2-(s.top+i.offsetHeight/2),d=l+D()<o/2?D():c,h=(Math.abs(c),Math.abs(d)/(o/2)),f=0;var p;if(!(s.top>o||s.top+i.offsetHeight<0))switch(t){case"backgroundImage":f=s.top*n,e.style.backgroundPosition=n?`50% ${f.toFixed(0)}px`:null,e.style.backgroundAttachment=n?"fixed":null;break;case"backgroundElement":f=u*n-r/2,e.style.transform=n?`translate3d(0, ${f.toFixed(2)}px, 0)`:null,e.style.backfaceVisibility=n?"hidden":null;break;case"element":f=d*n,e.style.transform=n?`translate3d(0, ${f.toFixed(2)}px, 0)`:null,e.style.backfaceVisibility=n?"hidden":null,void 0!==e.dataset.parallaxFade&&(e.style.opacity=n?(p=1-h,p*(2-p)).toFixed(2):null)}}(e)}function F(e){return void 0!==e.dataset.parallaxBackground?"backgroundElement":void 0!==e.dataset.parallaxElemenet?"element":""!==e.style.backgroundImage?"backgroundImage":"element"}function D(){return document.documentElement.scrollTop||document.body.scrollTop}function S(e){return function(e,t=null){for(;e&&!O(e).call(e,t);)e=e.parentElement;return e}(e,e.dataset.parallaxContainer||"[data-parallax-container]")||e}function O(e){return e.matches||e.webkitMatchesSelector||e.mozMatchesSelector||e.msMatchesSelector}function M(e){return e/10*-1/(2-Math.abs(e)/10)}function B(e,t={}){return new IntersectionObserver((function(t){for(let n=0;n<t.length;n++)e(t[n])}),{rootMargin:"0px",threshold:.1,...t})}function $(){return console.warn("Flatsome: Flickity is lazy loaded. Use 'lazyFlickity()' to instantiate and 'flatsome-flickity-ready' event to interact with Flickity instead."),this}function q(){return jQuery.fn.magnificPopup?Promise.resolve():a.e(230).then(a.t.bind(a,9650,23))}window.addEventListener("scroll",I,{passive:!0}),window.addEventListener("resize",I),new MutationObserver(I).observe(document.body,{childList:!0}),window.jQuery&&(window.jQuery.fn.flatsomeParallax=function(e){L||"destroy"!==e&&this.each(((e,t)=>function(e){e.classList.add("parallax-active"),!document.querySelector("body").classList.contains("parallax-mobile")&&i()||e.classList&&e.dataset&&(T.push({element:e,type:F(e)}),P(T[T.length-1]))}(t)))}),a(8540),jQuery.fn.flickity||($.isFlickityStub=!0,jQuery.fn.flickity=$),jQuery.fn.lazyFlickity=function(e){const t=B((n=>{if(n.isIntersecting){if(t.unobserve(n.target),!jQuery.fn.flickity||jQuery.fn.flickity===$)return a.e(436).then(a.t.bind(a,8026,23)).then((()=>{jQuery(n.target).flickity(e),jQuery(n.target).trigger("flatsome-flickity-ready")}));jQuery(n.target).flickity(e),jQuery(n.target).trigger("flatsome-flickity-ready")}}));return this.each(((n,o)=>{"string"==typeof e?jQuery.fn.flickity&&jQuery(o).flickity(e):t.observe(o)}))},jQuery.loadMagnificPopup=q,jQuery.fn.lazyMagnificPopup=function(e){const t=jQuery(this),n=e.delegate?t.find(e.delegate):t;return n.one("click",(o=>{o.preventDefault(),q().then((()=>{t.data("magnificPopup")||t.magnificPopup({allowHTMLInStatusIndicator:!0,allowHTMLInTemplate:!0,...e}),t.magnificPopup("open",n.index(o.currentTarget)||0)}))})),t},a(9450),a(7727);const z="flatsome-a11y",H="data-flatsome-role-button",R="data-flatsome-role-radiogroup",V=[{attribute:H,bindFunction:function(e){if(!e.hasAttribute("role")||"button"!==e.getAttribute("role"))return;const t=function(e){"Space"===e.code&&(e.preventDefault(),e.target.click()),"Enter"===e.code&&"A"!==e.target.tagName&&(e.preventDefault(),e.target.click())},n=function(e){"Space"===e.code&&e.preventDefault()};return e.addEventListener("keydown",t),e.addEventListener("keyup",n),e.setAttribute(H,"attached"),()=>{e.removeEventListener("keydown",t),e.removeEventListener("keyup",n),e.setAttribute(H,"")}}},{attribute:R,bindFunction:function(e){const t=Array.from(e.querySelectorAll('[role="radio"]'));if(!t.length)return;const n=function(e){if(!e.target.hasAttribute("role")||"radio"!==e.target.getAttribute("role"))return;const n=t.indexOf(e.target);let o=null;switch(e.key){case"ArrowRight":case"ArrowDown":o=(n+1)%t.length;break;case"ArrowLeft":case"ArrowUp":o=(n-1+t.length)%t.length;break;case" ":case"Enter":return e.preventDefault(),void e.target.click();default:return}e.preventDefault(),t[o].focus()};return e.addEventListener("keydown",n),e.setAttribute(R,"attached"),()=>{e.removeEventListener("keydown",n),e.setAttribute(R,"")}}}];function N(e){return{unattached:`[${e}]:not([${e}="attached"])`,attached:`[${e}="attached"]`}}Flatsome.behavior("a11y",{attach(e){V.forEach((t=>function(e,t){const n=N(t.attribute);jQuery(n.unattached,e).each(((e,n)=>{const o=t.bindFunction(n);o&&jQuery(n).data(z,o)}))}(e,t)))},detach(e){V.forEach((t=>function(e,t){const n=N(t.attribute);jQuery(n.attached,e).each(((e,t)=>{const n=jQuery(t).data(z);n&&n(),jQuery(t).removeData(z)}))}(e,t)))}});const U=B((e=>{if(e.intersectionRatio>0){U.unobserve(e.target);const t=jQuery(e.target);t.removeAttr("data-animate-transition"),t.removeAttr("data-animated"),window.requestAnimationFrame((()=>{t.attr("data-animate-transform","true"),window.requestAnimationFrame((()=>{t.attr("data-animate-transition","true"),setTimeout((()=>{t.attr("data-animated","true")}),300)}))}))}}));Flatsome.behavior("animate",{attach(e){jQuery("[data-animate]",e).each(((e,t)=>{const n=jQuery(t),o=n.data("animate");if(r()||0===o.length||L)return n.attr("data-animated","true");U.observe(t)}))},detach(e){jQuery("[data-animate]",e).each(((e,t)=>{jQuery(t).attr("data-animated","false"),U.unobserve(t)}))}}),a(3387);const W=B((e=>{if(e.intersectionRatio>0){W.unobserve(e.target);const t=jQuery(e.target);a.e(987).then(a.bind(a,3748)).then((({CountUp:e})=>{const n=parseInt(t.text());new e(t.get(0),n,{decimalPlaces:0,duration:4}).start(),t.addClass("active")}))}}));function Y(e){e.addClass("current-dropdown"),e.find(".nav-top-link").attr("aria-expanded",!0),function(e){const t=e,n=t.closest(".container").width(),o=t.closest("li.menu-item"),i=o.hasClass("menu-item-design-full-width"),r=o.hasClass("menu-item-design-container-width"),s=o.parent().hasClass("ux-nav-vertical-menu"),l=!i&&!r,c=a.g.flatsomeVars.rtl;if(l&&!s){if(n<750)return!1;var u=t.outerWidth(),d=t.offset(),h=Math.max(document.documentElement.clientWidth,window.innerWidth||0),f=d.left-(h-n)/2;c&&(f=jQuery(window).width()-(d.left+u)-(h-n)/2);var p=t.width(),m=n-(f+p),y=!1;f>m&&f<p&&(y=(f+m)/3),m<0&&(y=-m),y&&c?t.css("margin-right",-y):y&&t.css("margin-left",-y),p>n&&t.addClass("nav-dropdown-full")}if(r){t.css({inset:"0"});const e=t.closest(".container").get(0).getBoundingClientRect(),i=t.get(0).getBoundingClientRect();t.css({width:s?n-o.width():n,...!c&&{left:e.left-i.left+15},...c&&{right:15-(e.right-i.right)}})}if(i){t.css({inset:"0"});const e=document.body,n=e.getBoundingClientRect(),i=t.get(0).getBoundingClientRect(),r=e.clientWidth;t.css({...!c&&{width:s?r-o.get(0).getBoundingClientRect().right:r},...c&&{width:s?o.get(0).getBoundingClientRect().left:r},...!c&&{left:n.left-i.left},...c&&{right:-(n.right-i.right)}})}if((r||i)&&!s){let e=null;if(o.closest("#top-bar").length&&(e=document.querySelector("#top-bar")),o.closest("#masthead").length&&(e=document.querySelector("#masthead")),o.closest("#wide-nav").length&&(e=document.querySelector("#wide-nav")),null!==e){const n=e.getBoundingClientRect(),i=o.get(0).getBoundingClientRect();t.css({top:n.bottom-i.bottom+i.height})}}s&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent)&&t.css({minHeight:t.closest(".header-vertical-menu__fly-out").outerHeight()})}(e.find(".nav-dropdown"))}function X(e){e.removeClass("current-dropdown"),e.find(".nav-top-link").attr("aria-expanded",!1),e.find(".nav-dropdown").attr("style","")}function J(e){e.each(((e,t)=>{const n=jQuery(t);n.hasClass("current-dropdown")&&X(n)}))}function G(e,t){e.length&&e.addClass(`ux-body-overlay--${t}-active`)}function Z(e,t){e.length&&e.removeClass(`ux-body-overlay--${t}-active`)}Flatsome.behavior("count-up",{attach(e){jQuery("span.count-up",e).each(((e,t)=>{W.observe(t)}))}}),Flatsome.behavior("dropdown",{attach(e){const t=jQuery(".nav li.has-dropdown",e),n=r(),o=jQuery(".ux-body-overlay"),i="ontouchstart"in window;let a=!1,s=null;jQuery(".header-nav > li > a, .top-bar-nav > li > a",e).on("focus",(()=>{J(t)})),t.each((function(e,r){const l=jQuery(r),c=l.hasClass("nav-dropdown-toggle")&&!i;let u=!1,d=!1;l.on("touchstart click",(function(e){"touchstart"===e.type&&(u=!0),"click"===e.type&&u&&(u&&!d&&e.preventDefault(),d=!0)})),n||c?(a=!0,l.on("click","a:first",(function(e){if(e.preventDefault(),s=l,l.hasClass("current-dropdown"))return X(l),void Z(o,"click");J(t),Y(l),G(o,"click"),jQuery(document).trigger("flatsome-dropdown-opened",[l])}))):(l.on("keydown","a:first",(function(e){"Space"===e.code&&(e.preventDefault(),l.hasClass("current-dropdown")?(X(l),Z(o,"click")):(J(t),Y(l),G(o,"click"),jQuery(document).trigger("flatsome-dropdown-opened",[l])))})),l.hoverIntent({sensitivity:3,interval:20,timeout:70,over(e){J(t),Y(l),Z(o,"click"),jQuery(document).trigger("flatsome-dropdown-opened",[l])},out(){d=!1,u=!1,X(l)}}))})),!n&&a&&jQuery(document).on("click",(function(e){null===s||s===e.target||s.has(e.target).length||(X(s),Z(o,"click"))})),jQuery(document).on("flatsome-dropdown-opened",(function(e,t){t.hasClass("menu-item-has-block")&&jQuery.fn.packery&&t.find("[data-packery-options]").packery("layout")})),jQuery(document).on("flatsome-header-sticky",(function(){J(t),Z(o,"click")}))}}),Flatsome.behavior("instagram",{attach(e){const t=B((e=>{if(e.intersectionRatio>0){t.unobserve(e.target);const n=jQuery(e.target),o=n.data("flatsome-instagram"),i=e=>{jQuery("body").hasClass("admin-bar")&&n.before('<div class="container error"><p>Instagram error: '+e+"</p></div>"),console.error("Instagram error:",e)};if("string"!=typeof o)return i("Invalid data");jQuery.ajax({url:flatsomeVars.ajaxurl,data:{action:"flatsome_load_instagram",data:o},success(e){if(!e.success)return i(e.data);if("string"!=typeof e.data)return console.error("Invalid Instagram response:",e.data);const t=jQuery(e.data);Flatsome.detach(n),n.replaceWith(t),Flatsome.attach(t)},error(e){i(e)}})}}));jQuery("[data-flatsome-instagram]",e).each(((e,n)=>{t.observe(n)}))}});const K=[".jpg",".jpeg",".png",".webp",".avif"];let ee=null;Flatsome.behavior("lightbox-gallery",{attach(e){const t={delegate:"a",type:"image",closeBtnInside:flatsomeVars.lightbox.close_btn_inside,closeMarkup:flatsomeVars.lightbox.close_markup,tLoading:'<div class="loading-spin centered dark"></div>',removalDelay:300,gallery:{enabled:!0,navigateByImgClick:!0,arrowMarkup:'<button class="mfp-arrow mfp-arrow-%dir%" title="%title%"><i class="icon-angle-%dir%"></i></button>',preload:[0,1]},image:{tError:'<a href="%url%">The image #%curr%</a> could not be loaded.',verticalFit:!1},callbacks:{beforeOpen(){d()},beforeClose(){h()}}};jQuery((ee||(ee=[".lightbox a.lightbox-gallery"],K.forEach((e=>{ee.push(`.lightbox .gallery a[href*="${e}"]`)}))),ee).join(", "),e).not(".lightbox-multi-gallery a").parent().lazyMagnificPopup(t),jQuery(".lightbox .lightbox-multi-gallery",e).length&&jQuery(".lightbox-multi-gallery",e).each((function(){jQuery(this).lazyMagnificPopup(t)}))}});const te=[".jpg",".jpeg",".png",".webp",".avif"];let ne=null,oe=null;Flatsome.behavior("lightbox-image",{attach(e){const{selectors:t,exclusions:n}=function(){if(!ne){const e=['.lightbox *[id^="attachment"] a[href*="{ext}"]','.lightbox .wp-block-image a[href*="{ext}"]:not([target="_blank"])','.lightbox .entry-content a[href*="{ext}"]'],t=['.lightbox .gallery a[href*="{ext}"]','.lightbox .lightbox-multi-gallery a[href*="{ext}"]'];ne=[".lightbox a.image-lightbox"],oe=[".lightbox a.lightbox-gallery"],te.forEach((n=>{e.forEach((e=>{ne.push(e.replace("{ext}",n))})),t.forEach((e=>{oe.push(e.replace("{ext}",n))}))}))}return{selectors:ne,exclusions:oe}}();jQuery(t.join(", "),e).not(n.join(", ")).lazyMagnificPopup({type:"image",tLoading:'<div class="loading-spin centered dark"></div>',closeOnContentClick:!0,closeBtnInside:flatsomeVars.lightbox.close_btn_inside,closeMarkup:flatsomeVars.lightbox.close_markup,removalDelay:300,image:{verticalFit:!1},callbacks:{beforeOpen(){d()},beforeClose(){h()}}})}});const ie=["inert","hidden","disabled","readonly","required","checked","aria-disabled","aria-hidden"];function re(e,t){const n=e.jquery?e.get(0):e;Object.entries(t).forEach((([e,t])=>{const o=e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();!function(e,t,n){if("aria-expanded"===t){if(!0!==n&&"true"!==n)return;const t=e.hasAttribute("aria-expanded"),o="false"===e.getAttribute("aria-expanded");t&&o||console.warn("Flatsome: Trying to set aria-expanded to true but attribute is not initially false",e)}}(n,o,t),null==t||ie.includes(o)&&("false"===t||!1===t)?n.removeAttribute(o):o.startsWith("aria-")?n.setAttribute(o,"boolean"==typeof t?String(t):t):!0!==t?!1!==t?n.setAttribute(o,t):n.removeAttribute(o):n.setAttribute(o,"")}))}function ae(e){return!(!e||"string"!=typeof e)&&/^[a-zA-Z0-9_-]{10,12}$/.test(e)}function se(e){return!(!e||"string"!=typeof e)&&/^\d+$/.test(e)}Flatsome.behavior("lightboxes-link",{attach(e){jQuery(".lightbox-by-id",e).each((function(){const t=jQuery(this).attr("id");jQuery('a[href="#'+t+'"]',e).on("click",(e=>{e.preventDefault();const t=jQuery(e.currentTarget);q().then((()=>{let e=t.attr("href").substring(1),n=jQuery(`#${e}.lightbox-by-id`);if(e&&n.length>0){let e=n[0],o=jQuery.magnificPopup.open?300:0;o&&jQuery.magnificPopup.close(),setTimeout((function(){jQuery.magnificPopup.open({removalDelay:300,closeBtnInside:flatsomeVars.lightbox.close_btn_inside,closeMarkup:flatsomeVars.lightbox.close_markup,items:{src:e,type:"inline",tLoading:'<div class="loading-spin dark"></div>'},callbacks:{beforeOpen:function(){d(),re(t,{ariaExpanded:!0})},open:function(){if(Flatsome.attach(this.content),jQuery.fn.flickity&&jQuery("[data-flickity-options].flickity-enabled",this.content).each(((e,t)=>{jQuery(t).flickity("resize")})),jQuery.fn.packery){const e=jQuery("[data-packery-options]",this.content);e&&e.imagesLoaded((function(){e.packery("layout")}))}},beforeClose:function(){h(),re(t,{ariaExpanded:!1})}}})}),o)}}))}))}))}});const le=["vimeo.com/","youtube.com/","youtu.be/",".mp4",".webm"];let ce=null;Flatsome.behavior("lightbox-video",{attach(e){r()||jQuery((ce||(ce=["a.open-video"],le.forEach((e=>{ce.push(`a.button[href*="${e}"]:not([target="_blank"]):not(.open-video)`)}))),ce).join(", "),e).lazyMagnificPopup({type:"iframe",closeBtnInside:flatsomeVars.lightbox.close_btn_inside,mainClass:"my-mfp-video",closeMarkup:flatsomeVars.lightbox.close_markup,tLoading:'<div class="loading-spin centered dark"></div>',removalDelay:300,preloader:!0,callbacks:{elementParse:function(e){const t=function(e){if(!e||"string"!=typeof e)return null;const t=function(e){if(!e||"string"!=typeof e)return null;e=e.trim();const t=[/youtu\.be\/([^\/\?&]+)/,/youtube\.com\/watch\?v=([^\/\?&]+)/,/youtube\.com\/embed\/([^\/\?&]+)/,/youtube\.com\/v\/([^\/\?&]+)/,/youtube\.com\/shorts\/([^\/\?&]+)/];for(const n of t){const t=e.match(n);if(t){const e=t[1];if(ae(e))return e}}return null}(e);if(t)return{platform:"youtube",id:t,url:`https://www.youtube.com/watch?v=${t}`};const n=function(e){if(!e||"string"!=typeof e)return null;e=e.trim();const t=[/vimeo\.com\/([0-9]+)/,/player\.vimeo\.com\/video\/([0-9]+)/];for(const n of t){const t=e.match(n);if(t){const e=t[1];if(se(e))return e}}return null}(e);return n?{platform:"vimeo",id:n,url:`https://player.vimeo.com/video/${n}`}:null}(e.src);if(t)e.src=t.url;else if(/\.(mp4|webm)(\?.*)?$/i.test(e.src)){var n;const t=null!==(n=function(e){if(!e||"string"!=typeof e)return null;const t=e.split("?")[0].match(/\.([^.]+)$/i);return t?t[1].toLowerCase():null}(e.src))&&void 0!==n?n:"unknown";e.type="inline",e.src='<div class="ux-mfp-inline-content ux-mfp-inline-content--video"><video autoplay controls playsinline width="100%" height="auto" name="media"><source src="'+e.src+'" type="video/'+t+'"></video></div>'}},beforeOpen:function(){d()},open:function(){jQuery(".slider .is-selected .video").trigger("pause")},beforeClose:function(){h()},close:function(){jQuery(".slider .is-selected .video").trigger("play")}}})}}),Flatsome.behavior("lightboxes",{attach(e){jQuery("[data-open]",e).on("click",(e=>{e.preventDefault();const t=jQuery(e.currentTarget);q().then((()=>{var e=t.data("open"),n=t.data("color"),o=t.data("bg"),i=t.data("pos"),r=t.data("visible-after"),a=t.data("class"),s=t.attr("data-focus");t.offset(),t.addClass("current-lightbox-clicked"),"#product-sidebar"===e&&void 0===r&&(r=!jQuery(e).hasClass("mfp-hide")),jQuery.magnificPopup.open({items:{src:e,type:"inline",tLoading:'<div class="loading-spin dark"></div>'},removalDelay:300,closeBtnInside:flatsomeVars.lightbox.close_btn_inside,closeMarkup:flatsomeVars.lightbox.close_markup,focus:s,callbacks:{beforeOpen:function(){this.st.mainClass=`off-canvas ${n||""} off-canvas-${i}`,d(),re(t,{ariaExpanded:!0})},open:function(){jQuery("html").addClass("has-off-canvas"),jQuery("html").addClass("has-off-canvas-"+i),a&&jQuery(".mfp-content").addClass(a),o&&jQuery(".mfp-bg").addClass(o),jQuery(".mfp-content .resize-select").trigger("change"),jQuery.fn.packery&&jQuery("[data-packery-options], .has-packery").packery("layout"),jQuery(".equalize-box",this.content).length&&Flatsome.attach("equalize-box",this.content)},beforeClose:function(){jQuery("html").removeClass("has-off-canvas"),h(),re(t,{ariaExpanded:!1})},afterClose:function(){jQuery("html").removeClass("has-off-canvas-"+i),jQuery(".current-lightbox-clicked").removeClass("current-lightbox-clicked"),r&&jQuery(e).removeClass("mfp-hide")}}})}))}))}});class ue{constructor(e){this.element=e,this.observer=null,e&&this.handleVisibility()}handleVisibility(){this.observer=B((e=>{const t=e.target,n=e.isIntersecting;re(t,{ariaHidden:!n,inert:!n})})),this.element.querySelectorAll(".flickity-slider > *").forEach((e=>{this.observer.observe(e)}))}destroy(){this.observer&&(this.observer.disconnect(),this.observer=null)}}function de(e){re(e,{inert:!0})}Flatsome.behavior("slider",{attach(e){const t=jQuery(e).data("flickityOptions")?jQuery(e):jQuery("[data-flickity-options]",e);t.length&&t.each(((e,t)=>{const n=jQuery(t),o=n.data("flickity-options");if("undefined"!=typeof UxBuilder&&(o.draggable=!1),!0===o.watchCSS)return;let i=!1,r=!1,a=null;const s=e=>{try{i=t.contains(e.target),"number"!=typeof o.autoPlay||!o.pauseAutoPlayOnHover||i||r||n.flickity("playPlayer")}catch(e){}};n.on("flatsome-flickity-ready",(function(){n.find(".flickity-slider > :not(.is-selected) .video-bg").trigger("pause"),n.find(".is-selected .video-bg").trigger("play"),"requestAnimationFrame"in window&&(n.removeClass("flickity-enabled"),window.requestAnimationFrame((()=>{n.addClass("flickity-enabled")})));const e=n.data("flickity");if(e&&o.parallax){const t=n.find(".bg, .flickity-slider > .img img");n.addClass("slider-has-parallax"),n.on("scroll.flickity",(function(){e.slides.forEach((function(n,i){const r=t[i],a=-1*(n.target+e.x)/o.parallax;r&&(r.style.transform="translateX("+a+"px)")}))}))}a=new ue(t),document.addEventListener("touchstart",s,{passive:!0})})),L&&(o.friction=1,o.selectedAttraction=1,o.autoPlay=!1),n.lazyFlickity(o),n.imagesLoaded((function(){n.closest(".slider-wrapper").find(".loading-spin").fadeOut()})),n.on("dragStart.flickity",(function(){document.ontouchmove=e=>e.preventDefault(),n.addClass("is-dragging")})),n.on("dragEnd.flickity",(function(){document.ontouchmove=()=>!0,n.removeClass("is-dragging")})),n.on("destroy.flickity",(()=>{document.removeEventListener("touchstart",s),a&&(a.destroy(),a=null)})),n.on("change.flickity",(function(){i&&(r=!0),n.find(".flickity-slider > :not(.is-selected) .video-bg").trigger("pause"),n.find(".is-selected .video-bg").trigger("play")}))}))},detach(e){jQuery.fn.flickity&&!jQuery.fn.flickity.isFlickityStub&&(jQuery(e).data("flickityOptions")?jQuery(e).flickity("destroy"):jQuery("[data-flickity-options]",e).each((function(){jQuery(this).data("flickity")&&jQuery(this).flickity("destroy")})))}}),a(5973),a(7633),Flatsome.behavior("sidebar-slider",{attach(e){const t=jQuery("body").hasClass("mobile-submenu-toggle");jQuery(".mobile-sidebar-slide",e).each(((e,n)=>{const o=parseInt(jQuery(n).data("levels"),10)||1,i=jQuery(".sidebar-menu",n),r=jQuery(".nav-sidebar",n);jQuery(["> li > ul.children","> li > .sub-menu",o>1?"> li > ul.children > li > ul":null].filter(Boolean).join(", "),r).each(((e,n)=>{const o=jQuery(n),r=o.parent(),a=r.parents("ul:first"),s=jQuery(["> .toggle",'> a[href="#"]',t&&"> a"].filter(Boolean).join(","),r),l=r.find("> a").text().trim(),c=o.parents("ul").length,u=Boolean(window.flatsomeVars.rtl),d=jQuery(`\n            <li class="nav-slide-header pt-half pb-half">\n              <button class="toggle">\n                <i class="icon-angle-left"></i>\n                ${l||window.flatsomeVars.i18n.mainMenu}\n              </button>\n            </li>\n          `);o.prepend(d),de(o);let h=null;s.off("click").on("click",(e=>{r.attr("aria-expanded","true"),a.addClass("is-current-parent"),o.addClass("is-current-slide"),i.css("transform",`translateX(${u?"":"-"}${100*c}%)`),re(o,{inert:!1}),clearTimeout(h),e.preventDefault()})),d.find(".toggle").on("click",(()=>{i.css("transform",`translateX(${u?"":"-"}${100*(c-1)}%)`),de(o),h=setTimeout((()=>{o.removeClass("is-current-slide"),a.removeClass("is-current-parent")}),300),r.removeClass("active"),r.attr("aria-expanded","false")}))}))}))}}),a(6910),a(7439),a(9476),a(9880),Flatsome.behavior("accordion-title",{attach(e){const t=window.location.hash;let n=!1;jQuery(".accordion-title",e).each((function(){jQuery(this).off("click.flatsome").on("click.flatsome",(function(e){const t=L?0:200;jQuery(this).next().is(":hidden")?(jQuery(this).parent().parent().find(".accordion-title").attr("aria-expanded",!1).removeClass("active").next().slideUp(t),jQuery(this).attr("aria-expanded",!jQuery(this).hasClass("active")).toggleClass("active").next().slideDown(t,(function(){i()&&jQuery.scrollTo(jQuery(this).prev())})),window.requestAnimationFrame((()=>{!function(e,t=!1){e=e.jquery?e.get(0):e;const n=()=>{jQuery.fn.flickity&&jQuery("[data-flickity-options].flickity-enabled",e).each(((e,t)=>{const n=jQuery(t);n.data("flickity")&&n.flickity("resize")})),jQuery.fn.packery&&jQuery("[data-packery-options], .has-packery",e).each(((e,t)=>{const n=jQuery(t);n.data("packery")&&setTimeout((()=>{n.packery("layout")}),100)})),jQuery.fn.isotope&&jQuery(".row-isotope",e).each(((e,t)=>{const n=jQuery(t);n.data("isotope")&&setTimeout((()=>{n.isotope("layout")}),100)})),(e.querySelector(".equalize-box")||e.classList.contains("equalize-box"))&&jQuery(document).trigger("flatsome-equalize-box")};t?o()(e,n):n()}(jQuery(this).next())}))):jQuery(this).parent().parent().find(".accordion-title").attr("aria-expanded",!1).removeClass("active").next().slideUp(t),e.preventDefault()})),!t.substring(1).length||decodeURIComponent(t.substring(1))!==jQuery(this).attr("href")?.split("#")[1]&&t.substring(1)!==jQuery(this).attr("href")?.split("#")[1]||(jQuery(this).hasClass("active")||jQuery(this).trigger("click"),n||(n=!0,setTimeout((()=>{jQuery.scrollTo(jQuery(this).parent())}),500)))}))}}),Flatsome.behavior("tooltips",{attach(e){jQuery(".tooltip:not(.hotspot), .has-tooltip, .tip-top, li.chosen a",e).lazyTooltipster(),jQuery(".tooltip-as-html",e).lazyTooltipster({interactive:!0,contentAsHTML:!0}),i()?jQuery(".hotspot.tooltip:not(.quick-view)",e).lazyTooltipster({trigger:"click"}):jQuery(".hotspot.tooltip",e).lazyTooltipster()}});const he="flatsome-sticky-sidebar";function fe(e){const t=e.getBoundingClientRect();return new DOMRect(t.width,t.top+window.scrollY,0,t.height)}Flatsome.behavior("sticky-sidebar",{attach(e){jQuery('.is-sticky-column[data-sticky-mode="javascript"]',e).each(((e,t)=>{"ResizeObserver"in window&&t.offsetParent&&t.offsetParent!==document.body?jQuery(t).data(he,function(e){const{offsetParent:t}=e,n=parseInt(flatsomeVars.sticky_height,10)+30,o={passive:!0,capture:!1};if(!t||t===document.body)return;let{innerHeight:i}=window,r=null,a=null,s=0,l=null,c=null;const u=(t="down")=>{const o=window.scrollY+n-Math.round(r?.top),u=i+s-n-Math.round(a?.height),d=Math.max(Math.min(u,Math.round(r?.height-a?.height)),0);let h=null,f=null;!r||a?.height<i-n?f=n:"down"===t?o<=s?h=d:a?.height-o<=i&&(f=i-Math.round(a?.height),s=o):"up"===t&&(o<=u?(f=n,s=o+Math.round(a?.height)-i+n):h=d),h===l&&f===c||(e.style.top="number"==typeof f?`${f}px`:f,e.style.transform="number"==typeof h?`translateY(${h}px)`:h),c=f,l=h},d=function(e){if("ResizeObserver"in window)return new ResizeObserver((function(t){for(let n=0;n<t.length;n++)e(t[n])}))}((({target:n,contentRect:o})=>{if(n===t){const e=fe(t),{x:n,y:i,width:a,height:s}=o;r=new DOMRect(e.x+n,e.y+i,a,s)}else n===e&&(a=fe(e),u())})),h=f(((e,{direction:t})=>u(t)),o),p=()=>{i=window.innerHeight,u()};return d?.observe(t),d?.observe(e),window.addEventListener("resize",p,o),()=>{h(),d?.disconnect(),window.removeEventListener("resize",p)}}(t)):jQuery(t).removeAttr("data-sticky-mode")}))},detach(e){jQuery('.is-sticky-column[data-sticky-mode="javascript"]',e).each(((e,t)=>{jQuery(t).data(he)?.()}))}});const pe="header-vertical-menu__fly-out--open",me=jQuery(document);function ye(){return document.body.classList.contains("home")&&function(e){switch(e){case"0":case"false":case!1:return!1;case"1":case"true":case!0:return!0;default:return Boolean(e)}}(window.flatsomeVars?.options?.header_nav_vertical_fly_out_frontpage)&&!document.querySelector("#header .header-wrapper").classList.contains("stuck")}function ge(e){const t=e.querySelector(".header-vertical-menu__fly-out");if(t.classList.contains(pe))return;const n=e.querySelector(".header-vertical-menu__opener");t.classList.add(pe),re(n,{ariaExpanded:!0})}function ve(e){if(ye())return;const t=e.querySelector(".header-vertical-menu__fly-out");if(!t.classList.contains(pe))return;const n=e.querySelector(".header-vertical-menu__opener");t.classList.remove(pe),re(n,{ariaExpanded:!1})}Flatsome.behavior("vertical-menu",{attach(e){!function(e){const t=jQuery(".header-vertical-menu",e).get(0);t&&(t.addEventListener("click",(()=>{t.querySelector(".header-vertical-menu__fly-out").classList.contains(pe)?ve(t):ge(t)})),t.addEventListener("mouseenter",(()=>ge(t))),t.addEventListener("mouseleave",(()=>ve(t))),me.on("flatsome-header-sticky",(()=>{ve(t)})),me.on("flatsome-header-unsticky",(()=>{ye()&&ge(t)})))}(e)}}),a(6808),Flatsome.behavior("lottie",{attach(e){if(r())return;const t=jQuery(".ux-lottie__player",e);if(0===t.length)return;const n=B((e=>{e.isIntersecting&&(n.unobserve(e.target),function(e){const t=e,n=JSON.parse(t.dataset.params);let o=null,i=null,r=!1;function s(e){if(0===parseInt(e))return i.ip;if(100===parseInt(e))return i.op;const t=parseInt(i.ip),n=e*(parseInt(i.op)-t)/100+t;return Math.ceil(n)}Promise.all([a.e(970).then(a.bind(a,9371)),a.e(970).then(a.bind(a,1204))]).then((([,{create:e}])=>{t.load(n.src),t.addEventListener("ready",(()=>{o=t.getLottie(),i=o.animationData;const{autoplay:a,controls:l,direction:c,end:u,id:d,loop:h,mouseout:f,speed:p,start:m,trigger:y,scrollActionType:g,visibilityEnd:v,visibilityStart:b}=n;t.__controls=l,t.setLooping(h),t.setSpeed(parseFloat(p)),t.setDirection(c),"true"!==a&&"scroll"===y||o.playSegments([s(m),s(u)],!0),a||(t.pause(),"scroll"===y&&e({player:`#${d} .ux-lottie__player`,mode:"scroll",actions:[{visibility:[b/100,v/100],type:g,frames:[s(m),s(u)]}]}),"hover"===y&&(t.addEventListener("mouseenter",(()=>{"reverse"===f?(t.setDirection(c),t.play()):t.play()})),t.addEventListener("mouseleave",(()=>{"reverse"===f?(t.setDirection(-1===c?1:-1),t.play()):t.pause()}))),"click"===y&&t.addEventListener("click",(()=>{if(r)return t.pause(),void(r=!1);t.play(),r=!0})))}))}))}(e.target))}));t.each(((e,t)=>{n.observe(t)}))}}),L&&window.flatsomeVars.user.can_edit_pages&&("Prefer reduced motion is active on your OS","The prefers-reduced-motion media feature is used to detect if the user has requested the system minimize the amount of non-essential motion it uses. With this option enabled, slides & animations are reduced on the frontend.\nCheck your OS documentation on how to disable reduced motion.",console.groupCollapsed("%cFlatsome%c: Prefer reduced motion is active on your OS","color: #0693e3; font-weight: bold;","color: inherit;"),console.log("The prefers-reduced-motion media feature is used to detect if the user has requested the system minimize the amount of non-essential motion it uses. With this option enabled, slides & animations are reduced on the frontend.\nCheck your OS documentation on how to disable reduced motion."),console.groupEnd());let be=0;let we=0;const je="scrollBehavior"in document.documentElement.style,ke=window.getComputedStyle(document.documentElement)["scroll-behavior"];function Qe(){window.removeEventListener("keydown",Qe),window.removeEventListener("pointermove",Qe),window.removeEventListener("touchstart",Qe),function(){const e=jQuery("#header");if(!e.hasClass("has-sticky"))return;const t=e.clone();t.attr("id","header-clone").css("visibility","hidden");const n=t.find(".header-wrapper");n.addClass("stuck"),jQuery("body").append(t),be=Math.round(n.height()),t.remove(),window.flatsomeVars.stickyHeaderHeight=be,function(e,t=""){t&&document.documentElement.style.setProperty(e,t),window.getComputedStyle(document.documentElement).getPropertyValue(e)}("--flatsome--header--sticky-height",`${be}px`)}(),function(){const e=jQuery("#wpadminbar"),t=e.length&&e.is(":visible")?e.height():0;we=Math.round(window.flatsomeVars.stickyHeaderHeight+t),window.flatsomeVars.scrollPaddingTop=we,jQuery.extend(jQuery.easing,{fsEaseInOutExpo:function(e){return 0===e?0:1===e?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2}}),jQuery.extend(jQuery.scrollTo.defaults,{axis:"y",duration:L||je&&"smooth"===ke?0:1e3,offset:-we,easing:"fsEaseInOutExpo"})}()}document.addEventListener("DOMContentLoaded",(()=>{window.location.hash||window.scrollY>200?Qe():(window.addEventListener("keydown",Qe,{once:!0}),window.addEventListener("pointermove",Qe,{once:!0}),window.addEventListener("touchstart",Qe,{once:!0}))}));for(const e of["touchstart","touchmove"])jQuery.event.special[e]={setup(t,n,o){this.addEventListener&&this.addEventListener(e,o,{passive:!n.includes("noPreventDefault")})}};for(const e of["wheel","mousewheel"])jQuery.event.special[e]={setup(t,n,o){this.addEventListener&&this.addEventListener(e,o,{passive:!0})}};jQuery((()=>a.g.Flatsome.attach(document))),a.g.Flatsome.cookie=function(e,t,n){if(console.warn("Flatsome.cookie() is deprecated since 3.20.0 and will be removed in one of the future releases. Use Flatsome.Cookies.get() and Flatsome.Cookies.set() instead."),void 0===t){const t=("; "+window.document.cookie).split(`; ${e}=`);return 2===t.length?t.pop().split(";").shift():null}{!1===t&&(n=-1);let o="";if(n){const e=new Date;e.setTime(e.getTime()+24*n*60*60*1e3),o=`; expires=${e.toGMTString()}`}window.document.cookie=`${e}=${t}${o}; path=/`}},a.g.Flatsome.Cookies=t}()}();
;(function (){
function createObserver (handler){
return new IntersectionObserver(function (entries){
for (var i=0; i < entries.length; i++){
handler(entries[i])
}}, {
rootMargin: '0px',
threshold: 0.1
})
}
Flatsome.behavior('lazy-load-images', {
attach: function (context){
var observer=createObserver(function (entry){
if(entry.intersectionRatio > 0){
observer.unobserve(entry.target)
var $el=jQuery(entry.target)
var src=$el.data('src')
var srcset=$el.data('srcset')
if($el.hasClass('lazy-load-active')) return
else $el.addClass('lazy-load-active')
if(src) $el.attr('src', src)
if(srcset) $el.attr('srcset', srcset)
$el.imagesLoaded(function (){
$el.removeClass('lazy-load')
if(typeof objectFitImages!=='undefined'){
objectFitImages($el)
}})
}})
jQuery('.lazy-load', context).each(function (i, el){
observer.observe(el)
})
}})
Flatsome.behavior('lazy-load-sliders', {
attach: function (context){
var observer=createObserver(function (entry){
if(entry.intersectionRatio > 0){
observer.unobserve(entry.target)
var $el=jQuery(entry.target)
if($el.hasClass('slider-lazy-load-active')) return
else $el.addClass('slider-lazy-load-active')
$el.imagesLoaded(function (){
if($el.hasClass('flickity-enabled')){
$el.flickity('resize')
}})
}})
jQuery('.slider', context).each(function (i, el){
observer.observe(el)
})
}})
Flatsome.behavior('lazy-load-packery', {
attach: function (context){
var observer=createObserver(function (entry){
if(entry.intersectionRatio > 0){
observer.unobserve(entry.target)
var $el=jQuery(entry.target)
$el.imagesLoaded(function (){
jQuery('.has-packery').packery('layout')
})
}})
jQuery('.has-packery .lazy-load', context).each(function (i, el){
observer.observe(el)
})
}})
})();
jQuery.fn.nextInArray=function (element){
var nextId=0;
for (var i=0; i < this.length; i++){
if(this[i]==element){
nextId=i + 1;
break;
}}
if(nextId > this.length - 1) nextId=0;
return this[nextId];
};
jQuery.fn.clearForm=function (){
return this.each(function (){
var type=this.type,
tag=this.tagName.toLowerCase();
if(tag=='form') return jQuery(':input', this).clearForm();
if(type=='text'||type=='password'||tag=='textarea') this.value='';
else if(type=='checkbox'||type=='radio') this.checked=false;
else if(tag=='select') this.selectedIndex=-1;
});
};
jQuery.fn.tagName=function (){
return this.get(0).tagName;
};
jQuery.fn.exists=function (){
return jQuery(this).length > 0 ? true:false;
};
function isNumber(val){
return /^\d+/.test(val);
}
function pushDataToParam(data, pref){
pref=pref ? pref:'';
var res=[];
for (var key in data){
var name=pref&&pref!='' ? pref + '[' + key + ']':key;
if(typeof data[key]==='array'||typeof data[key]==='object'){
res=jQuery.merge(res, pushDataToParam(data[key], name));
}else{
res.push(name + '=' + data[key]);
}}
return res;
}
jQuery.fn.serializeAnythingPts=function (addData){
var toReturn=[];
var els=jQuery(this).find(':input').get();
jQuery.each(els, function (){
if(this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password/i.test(this.type))){
var val=jQuery(this).val();
toReturn.push(encodeURIComponent(this.name) + '=' + encodeURIComponent(val));
}});
if(typeof addData!='undefined'){
toReturn=jQuery.merge(toReturn, pushDataToParam(addData));
}
return toReturn.join('&').replace(/%20/g, '+');
};
jQuery.fn.serializeAssoc=function (){
var data=[];
jQuery.each(this.serializeArray(), function (key, obj){
var a=obj.name.match(/(.*?)\[(.*?)\]/);
if(a!==null){
var subName=a[1];
var subKey=a[2];
if(!data[subName]) data[subName]=[];
if(data[subName][subKey]){
if(jQuery.isArray(data[subName][subKey])){
data[subName][subKey].push(obj.value);
}else{
data[subName][subKey]=[];
data[subName][subKey].push(obj.value);
}}else{
data[subName][subKey]=obj.value;
}}else{
if(data[obj.name]){
if(jQuery.isArray(data[obj.name])){
data[obj.name].push(obj.value);
}else{
data[obj.name]=[];
data[obj.name].push(obj.value);
}}else{
data[obj.name]=obj.value;
}}
});
return data;
};
jQuery.fn.serializeObject=function (){
var obj={};
jQuery.each(this.serializeArray(), function (i, o){
var n=o.name,
v=o.value;
obj[n]=obj[n]===undefined ? v:jQuery.isArray(obj[n]) ? obj[n].concat(v):[obj[n], v];
});
return obj;
};
str_replace_all=function (str, token, newToken, ignoreCase){
var _token;
str +='';
var i=-1;
if(typeof token==='string'){
if(ignoreCase){
_token=token.toLowerCase();
while ((i=str.toLowerCase().indexOf(_token, i >=0 ? i + newToken.length:0))!==-1){
str=str.substring(0, i) + newToken + str.substring(i + token.length);
}}else{
return str.split(token).join(newToken);
}}
return str;
};
function str_replace(haystack, needle, replacement){
var temp=haystack.split(needle);
return temp.join(replacement);
}
function str_repeat(input, multiplier){
var buf='';
for (var i=0; i < multiplier; i++){
buf +=input;
}
return buf;
}
function str_split(f_string, f_split_length, f_backwards){
if(f_backwards==undefined){
f_backwards=false;
}
if(f_split_length > 0){
var result=new Array();
if(f_backwards){
var r=f_string.length % f_split_length;
if(r > 0){
result[result.length]=f_string.substring(0, r);
f_string=f_string.substring(r);
}}
while (f_string.length > f_split_length){
result[result.length]=f_string.substring(0, f_split_length);
f_string=f_string.substring(f_split_length);
}
result[result.length]=f_string;
return result;
}
return false;
}
function hexdec(hex_string){
hex_string=(hex_string + '').replace(/[^a-f0-9]/gi, '');
return parseInt(hex_string, 16);
}
function dechex(number){
if(number < 0){
number=0xffffffff + number + 1;
}
return parseInt(number, 10).toString(16);
}
function str_pad(input, pad_length, pad_string, pad_type){
var half='',
pad_to_go;
var str_pad_repeater=function (s, len){
var collect='',
i;
while (collect.length < len) collect +=s;
collect=collect.substr(0, len);
return collect;
};
if(pad_type!='STR_PAD_LEFT'&&pad_type!='STR_PAD_RIGHT'&&pad_type!='STR_PAD_BOTH'){
pad_type='STR_PAD_RIGHT';
}
if((pad_to_go=pad_length - input.length) > 0){
if(pad_type=='STR_PAD_LEFT'){
input=str_pad_repeater(pad_string, pad_to_go) + input;
}else if(pad_type=='STR_PAD_RIGHT'){
input=input + str_pad_repeater(pad_string, pad_to_go);
}else if(pad_type=='STR_PAD_BOTH'){
half=str_pad_repeater(pad_string, Math.ceil(pad_to_go / 2));
input=half + input + half;
input=input.substr(0, pad_length);
}}
return input;
}
function nameToClassId(name){
return str_replace(str_replace(name, ']', ''), '[', '');
}
function strpos(haystack, needle, offset){
var i=haystack.indexOf(needle, offset);
return i >=0 ? i:false;
}
function extend(Child, Parent){
var F=function (){};
F.prototype=Parent.prototype;
Child.prototype=new F();
Child.prototype.constructor=Child;
Child.superclass=Parent.prototype;
}
function toeRedirect(url, newWnd){
if(newWnd){
var win=window.open(url, '_blank');
win.focus();
}else{
document.location.href=url;
}}
function toeReload(url){
if(url) toeRedirect(url);
document.location.reload();
}
jQuery.fn.toeRebuildSelect=function (data, useIdAsValue, val){
if(jQuery(this).tagName()=='SELECT'&&typeof data=='object'){
if(jQuery(data).length > 0){
if(typeof val=='undefined') val=false;
if(jQuery(this).children('option').length){
jQuery(this).children('option').remove();
}
if(typeof useIdAsValue=='undefined') useIdAsValue=false;
var selected='';
for (var id in data){
selected='';
if(val&&((useIdAsValue&&id==val)||data[id]==val)) selected='selected';
jQuery(this).append('<option value="' + (useIdAsValue ? id:data[id]) + '" ' + selected + '>' + data[id] + '</option>');
}}
}};
function toeInArray(needle, haystack){
if(typeof haystack=='object'){
for (var k in haystack){
if(haystack[k]==needle) return k;
}}else if(typeof haystack=='array'){
return jQuery.inArray(needle, haystack);
}
return -1;
}
jQuery.fn.setReadonly=function (){
jQuery(this).addClass('toeReadonly').attr('readonly', 'readonly');
};
jQuery.fn.unsetReadonly=function (){
jQuery(this).removeClass('toeReadonly').removeAttr('readonly', 'readonly');
};
jQuery.fn.getClassId=function (pref, test){
var classId=jQuery(this).attr('class');
classId=classId.substr(strpos(classId, pref + '_'));
if(strpos(classId, ' ')) classId=classId.substr(0, strpos(classId, ' '));
classId=classId.split('_');
classId=classId[1];
return classId;
};
function toeTextIncDec(textFieldId, inc){
var value=parseInt(jQuery('#' + textFieldId).val());
if(isNaN(value)) value=0;
if(!(inc < 0&&value < 1)){
value +=inc;
}
jQuery('#' + textFieldId).val(value);
}
function toeStrFirstUp(str){
str +='';
var f=str.charAt(0).toUpperCase();
return f + str.substr(1);
}
function parseStr(str, array){
var strArr=String(str).replace(/^&/, '').replace(/&$/, '').split('&'),
sal=strArr.length,
i,
j,
ct,
p,
lastObj,
obj,
lastIter,
undef,
chr,
tmp,
key,
value,
postLeftBracketPos,
keys,
keysLen,
fixStr=function (str){
return decodeURIComponent(str.replace(/\+/g, '%20'));
};
if(!array){
array={};}
for (i=0; i < sal; i++){
tmp=strArr[i].split('=');
key=fixStr(tmp[0]);
value=tmp.length < 2 ? '':fixStr(tmp[1]);
while (key.charAt(0)===' '){
key=key.slice(1);
}
if(key.indexOf('\x00') > -1){
key=key.slice(0, key.indexOf('\x00'));
}
if(key&&key.charAt(0)!=='['){
keys=[];
postLeftBracketPos=0;
for (j=0; j < key.length; j++){
if(key.charAt(j)==='['&&!postLeftBracketPos){
postLeftBracketPos=j + 1;
}else if(key.charAt(j)===']'){
if(postLeftBracketPos){
if(!keys.length){
keys.push(key.slice(0, postLeftBracketPos - 1));
}
keys.push(key.substr(postLeftBracketPos, j - postLeftBracketPos));
postLeftBracketPos=0;
if(key.charAt(j + 1)!=='['){
break;
}}
}}
if(!keys.length){
keys=[key];
}
for (j=0; j < keys[0].length; j++){
chr=keys[0].charAt(j);
if(chr===' '||chr==='.'||chr==='['){
keys[0]=keys[0].substr(0, j) + '_' + keys[0].substr(j + 1);
}
if(chr==='['){
break;
}}
obj=array;
for (j=0, keysLen=keys.length; j < keysLen; j++){
key=keys[j].replace(/^['"]/, '').replace(/['"]$/, '');
lastIter=j!==keys.length - 1;
lastObj=obj;
if((key!==''&&key!==' ')||j===0){
if(obj[key]===undef){
obj[key]={};}
obj=obj[key];
}else{
ct=-1;
for (p in obj){
if(obj.hasOwnProperty(p)){
if(+p > ct&&p.match(/^\d+$/g)){
ct=+p;
}}
}
key=ct + 1;
}}
lastObj[key]=value;
}}
return array;
}
function toeListablePts(params){
this.params=jQuery.extend({}, params);
this.table=jQuery(this.params.table);
this.paging=jQuery(this.params.paging);
this.perPage=this.params.perPage;
this.list=this.params.list;
this.count=this.params.count;
this.page=this.params.page;
this.pagingCallback=this.params.pagingCallback;
var self=this;
this.draw=function (list, count){
this.table.find('tr').not('.ptsExample, .ptsTblHeader').remove();
var exampleRow=this.table.find('.ptsExample');
for (var i in list){
var newRow=exampleRow.clone();
for (var key in list[i]){
var element=newRow.find('.' + key);
if(element.length){
var valueTo=element.attr('valueTo');
if(valueTo){
var newValue=list[i][key];
var prevValue=element.attr(valueTo);
if(prevValue) newValue=prevValue + ' ' + newValue;
element.attr(valueTo, newValue);
} else element.html(list[i][key]);
}}
newRow.removeClass('ptsExample').show();
this.table.append(newRow);
}
if(this.paging){
this.paging.html('');
if(count&&count > list.length&&this.perPage){
for (var i=1; i <=Math.ceil(count / this.perPage); i++){
var newPageId=i - 1,
newElement=newPageId==this.page ? jQuery('<b/>'):jQuery('<a/>');
if(newPageId!=this.page){
newElement.attr('href', '#' + newPageId).click(function (){
if(self.pagingCallback&&typeof self.pagingCallback=='function'){
self.pagingCallback(parseInt(jQuery(this).attr('href').replace('#', '')));
return false;
}});
}
newElement.addClass('toePagingElement').html(i);
this.paging.append(newElement);
if(i % 20==0&&i) this.paging.append('<br />');
}}
}};
if(this.list) this.draw(this.list, this.count);
}
function setCookiePts(c_name, value, exdays){
var exdate=new Date();
exdate.setDate(exdate.getDate() + exdays);
var value_prepared='';
if(typeof value=='array'||typeof value=='object'){
value_prepared='_JSON:' + JSON.stringify(value);
}else{
value_prepared=value;
}
var c_value=escape(value_prepared) + (exdays==null ? '':'; expires=' + exdate.toUTCString()) + '; path=/';
document.cookie=c_name + '=' + c_value;
}
function getCookiePts(name){
var parts=document.cookie.split(name + '=');
if(parts.length==2){
var value=unescape(parts.pop().split(';').shift());
if(value.indexOf('_JSON:')===0){
value=JSON.parse(value.split('_JSON:').pop());
}
return value;
}
return null;
}
function delCookiePts(name){
document.cookie=name + '=; expires=Thu, 01 Jan 1970 00:00:01 GMT;';
}
function callUserFuncArray(cb, parameters){
var func;
if(typeof cb==='string'){
func=typeof this[cb]==='function' ? this[cb]:(func=new Function(null, 'return ' + cb)());
}else if(Object.prototype.toString.call(cb)==='[object Array]'){
func=typeof cb[0]=='string' ? eval(cb[0] + "['" + cb[1] + "']"):(func=cb[0][cb[1]]);
}else if(typeof cb==='function'){
func=cb;
}
if(typeof func!=='function'){
throw new Error(func + ' is not a valid function');
}
return typeof cb[0]==='string' ? func.apply(eval(cb[0]), parameters):typeof cb[0]!=='object' ? func.apply(null, parameters):func.apply(cb[0], parameters);
}
jQuery.fn.zoom=function (level, position){
position=position ? position:'center center';
var scaleCss=level==1 ? 'none':'scale(' + level + ')';
jQuery(this).data('zoom', level);
return jQuery(this).css({
'-moz-transform': scaleCss,
'-moz-transform-origin': position,
'-o-transform': scaleCss,
'-o-transform-origin': position,
'-webkit-transform': scaleCss,
'-webkit-transform-origin': position,
transform: scaleCss,
'transform-origin': position,
});
};
jQuery.fn.scrollWidth=function (){
var inner=document.createElement('p');
inner.style.width='100%';
inner.style.height='200px';
var outer=document.createElement('div');
outer.style.position='absolute';
outer.style.top='0px';
outer.style.left='0px';
outer.style.visibility='hidden';
outer.style.width='200px';
outer.style.height='150px';
outer.style.overflow='hidden';
outer.appendChild(inner);
document.body.appendChild(outer);
var w1=inner.offsetWidth;
outer.style.overflow='scroll';
var w2=inner.offsetWidth;
if(w1==w2) w2=outer.clientWidth;
document.body.removeChild(outer);
return w1 - w2;
};
function toeGetImgAttachId(img){
var classesStr=jQuery(img).attr('class'),
aid=0;
if(classesStr&&classesStr!=''){
var matches=classesStr.match(/wp-image-(\d+)/);
if(matches&&matches[1]){
aid=parseInt(matches[1]);
}}
return aid;
}
function toeGetHashParams(){
var hashArr=window.location.hash.split('#'),
res=[];
for (var i in hashArr){
if(hashArr[i]&&hashArr[i]!=''){
res.push(hashArr[i]);
}}
return res;
}
function traverseElement(el, regex, textReplacerFunc, to){
if(!/^(script|style)$/.test(el.tagName)){
var child=el.lastChild;
while (child){
if(child.nodeType==1){
traverseElement(child, regex, textReplacerFunc, to);
}else if(child.nodeType==3){
textReplacerFunc(child, regex, to);
}
child=child.previousSibling;
}}
}
function textReplacerFunc(textNode, regex, to){
textNode.data=textNode.data.replace(regex, to);
}
function replaceWords(html, words){
var container=document.createElement('div');
container.innerHTML=html;
for (var replace in words){
traverseElement(container, new RegExp(replace, 'g'), textReplacerFunc, words[replace]);
}
return container.innerHTML;
}
function toeSelectText(element){
var doc=document,
text=jQuery(element).get(0),
range,
selection;
if(doc.body.createTextRange){
range=doc.body.createTextRange();
range.moveToElementText(text);
range.select();
}else if(window.getSelection){
selection=window.getSelection();
range=doc.createRange();
range.selectNodeContents(text);
selection.removeAllRanges();
selection.addRange(range);
}}
jQuery.fn.animationDuration=function (seconds, isMili){
if(isMili){
seconds=parseFloat(seconds) / 1000;
}
var secondsStr=seconds + 's';
return jQuery(this).css({
'webkit-animation-duration': secondsStr,
'-moz-animation-duration': secondsStr,
'-o-animation-duration': secondsStr,
'animation-duration': secondsStr,
});
};
function ptsStrToMs(strDate){
var dateHours=strDate.split(' ');
if(dateHours.length==2){
strDate=dateHours[0] + ' ';
var hms=dateHours[1].split(':');
for (var i=0; i < 3; i++){
strDate +=hms[i] ? hms[i]:'00';
if(i < 2) strDate +=':';
}}
var date=new Date(str_replace(strDate, '-', '/')),
res=0;
if(date){
res=date.getTime();
}
return res;
}
function mtRand (min, max){
return Math.floor(Math.random() * (max - min + 1)) + min;
}
Date.prototype.format=function (e){
var t='';
var n=Date.replaceChars;
for (var r=0; r < e.length; r++){
var i=e.charAt(r);
if(r - 1 >=0&&e.charAt(r - 1)=='\\'){
t +=i;
}else if(n[i]){
t +=n[i].call(this);
}else if(i!='\\'){
t +=i;
}}
return t;
};
Date.replaceChars={
shortMonths: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Pts', 'Nov', 'Dec'],
longMonths: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'Ptsober', 'November', 'December'],
shortDays: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
longDays: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
d: function (){
return (this.getDate() < 10 ? '0':'') + this.getDate();
},
D: function (){
return Date.replaceChars.shortDays[this.getDay()];
},
j: function (){
return this.getDate();
},
l: function (){
return Date.replaceChars.longDays[this.getDay()];
},
N: function (){
return this.getDay() + 1;
},
S: function (){
return this.getDate() % 10==1&&this.getDate()!=11 ? 'st':this.getDate() % 10==2&&this.getDate()!=12 ? 'nd':this.getDate() % 10==3&&this.getDate()!=13 ? 'rd':'th';
},
w: function (){
return this.getDay();
},
z: function (){
var e=new Date(this.getFullYear(), 0, 1);
return Math.ceil((this - e) / 864e5);
},
W: function (){
var e=new Date(this.getFullYear(), 0, 1);
return Math.ceil(((this - e) / 864e5 + e.getDay() + 1) / 7);
},
F: function (){
return Date.replaceChars.longMonths[this.getMonth()];
},
m: function (){
return (this.getMonth() < 9 ? '0':'') + (this.getMonth() + 1);
},
M: function (){
return Date.replaceChars.shortMonths[this.getMonth()];
},
n: function (){
return this.getMonth() + 1;
},
t: function (){
var e=new Date();
return new Date(e.getFullYear(), e.getMonth(), 0).getDate();
},
L: function (){
var e=this.getFullYear();
return e % 400==0||(e % 100!=0&&e % 4==0);
},
o: function (){
var e=new Date(this.valueOf());
e.setDate(e.getDate() - ((this.getDay() + 6) % 7) + 3);
return e.getFullYear();
},
Y: function (){
return this.getFullYear();
},
y: function (){
return ('' + this.getFullYear()).substr(2);
},
a: function (){
return this.getHours() < 12 ? 'am':'pm';
},
A: function (){
return this.getHours() < 12 ? 'AM':'PM';
},
B: function (){
return Math.floor(((((this.getUTCHours() + 1) % 24) + this.getUTCMinutes() / 60 + this.getUTCSeconds() / 3600) * 1e3) / 24);
},
g: function (){
return this.getHours() % 12||12;
},
G: function (){
return this.getHours();
},
h: function (){
return ((this.getHours() % 12||12) < 10 ? '0':'') + (this.getHours() % 12||12);
},
H: function (){
return (this.getHours() < 10 ? '0':'') + this.getHours();
},
i: function (){
return (this.getMinutes() < 10 ? '0':'') + this.getMinutes();
},
s: function (){
return (this.getSeconds() < 10 ? '0':'') + this.getSeconds();
},
u: function (){
var e=this.getMilliseconds();
return (e < 10 ? '00':e < 100 ? '0':'') + e;
},
e: function (){
return 'Not Yet Supported';
},
I: function (){
var e=null;
for (var t=0; t < 12; ++t){
var n=new Date(this.getFullYear(), t, 1);
var r=n.getTimezoneOffset();
if(e===null) e=r;
else if(r < e){
e=r;
break;
}else if(r > e) break;
}
return (this.getTimezoneOffset()==e) | 0;
},
O: function (){
return (-this.getTimezoneOffset() < 0 ? '-':'+') + (Math.abs(this.getTimezoneOffset() / 60) < 10 ? '0':'') + Math.abs(this.getTimezoneOffset() / 60) + '00';
},
P: function (){
return (-this.getTimezoneOffset() < 0 ? '-':'+') + (Math.abs(this.getTimezoneOffset() / 60) < 10 ? '0':'') + Math.abs(this.getTimezoneOffset() / 60) + ':00';
},
T: function (){
var e=this.getMonth();
this.setMonth(0);
var t=this.toTimeString().replace(/^.+ \(?([^\)]+)\)?$/, '$1');
this.setMonth(e);
return t;
},
Z: function (){
return -this.getTimezoneOffset() * 60;
},
c: function (){
return this.format('Y-m-d\\TH:i:sP');
},
r: function (){
return this.toString();
},
U: function (){
return this.getTime() / 1e3;
},
};
function ptsCallWpMedia(params){
params=params||{};
if(typeof wp!=='undefined'&&wp.media&&wp.media.editor) wp.media.editor.open(params.id);
wp.media.editor.insert=function (html){
if(wp.media.editor._attachSent){
wp.media.editor._attachSent=false;
return;
}
if(html&&html!=''){
var imgUrl=jQuery(html).attr('src');
if(imgUrl){
params.clb({}, {}, imgUrl);
}}
};
wp.media.editor.send.attachment=function (opts, attach){
wp.media.editor._attachSent=true;
var imgUrl=opts.size&&attach.sizes[opts.size]&&attach.sizes[opts.size].url ? attach.sizes[opts.size].url:attach.url;
params.clb(opts, attach, imgUrl);
};
window.original_send_to_editor=window.send_to_editor;
window.send_to_editor=function (html){
};}
function ptsMceMoveToolbar(editor, clientX){
var panel=editor.theme.panel;
if(!panel) return;
var panelRect=panel.layoutRect(),
bodyElement=jQuery(editor.bodyElement),
bodyOffset=bodyElement.offset(),
newX=clientX - panelRect.w / 2,
newY=bodyOffset.top - 30;
if(newY <=150){
newY +=bodyElement.height() + 30;
}
if(newX < 0) newX=0;
panel.moveTo(newX, panelRect.y ? panelRect.y:newY);
panel._ptsOriginalTop=newY;
}
function getSelectionCoords(win){
win=win||window;
var doc=win.document;
var sel=doc.selection,
range,
rects,
rect;
var x=0,
y=0;
if(sel){
if(sel.type!='Control'){
range=sel.createRange();
range.collapse(true);
x=range.boundingLeft;
y=range.boundingTop;
}}else if(win.getSelection){
sel=win.getSelection();
if(sel.rangeCount){
range=sel.getRangeAt(0).cloneRange();
if(range.getClientRects){
range.collapse(true);
rects=range.getClientRects();
if(rects.length > 0){
rect=range.getClientRects()[0];
}
if(!rect){
return false;
}
x=rect.left;
y=rect.top;
}
if(x==0&&y==0){
var span=doc.createElement('span');
if(span.getClientRects){
span.appendChild(doc.createTextNode('\u200b'));
range.insertNode(span);
rect=span.getClientRects()[0];
x=rect.left;
y=rect.top;
var spanParent=span.parentNode;
spanParent.removeChild(span);
spanParent.normalize();
}}
}}
return { x: x, y: y };}
function get_class(obj){
if(obj instanceof Object&&!(obj instanceof Array)&&!(obj instanceof Function)&&obj.constructor){
var arr=obj.constructor.toString().match(/function\s*(\w+)/);
if(arr&&arr.length==2){
return arr[1];
}}
return false;
}
function serialize(mixed_val){
switch (typeof mixed_val){
case 'number':
if(isNaN(mixed_val)||!isFinite(mixed_val)){
return false;
}else{
return (Math.floor(mixed_val)==mixed_val ? 'i':'d') + ':' + mixed_val + ';';
}
case 'string':
return 's:' + mixed_val.length + ':"' + mixed_val + '";';
case 'boolean':
return 'b:' + (mixed_val ? '1':'0') + ';';
case 'object':
if(mixed_val==null){
return 'N;';
}else if(mixed_val instanceof Array){
var idxobj={ idx: -1 };
var map=[];
for (var i=0; i < mixed_val.length; i++){
idxobj.idx++;
var ser=serialize(mixed_val[i]);
if(ser){
map.push(serialize(idxobj.idx) + ser);
}}
return 'a:' + mixed_val.length + ':{' + map.join('') + '}';
}else{
var class_name=get_class(mixed_val);
if(class_name==undefined){
return false;
}
var props=new Array();
for (var prop in mixed_val){
var ser=serialize(mixed_val[prop]);
if(ser){
props.push(serialize(prop) + ser);
}}
return 'O:' + class_name.length + ':"' + class_name + '":' + props.length + ':{' + props.join('') + '}';
}
case 'undefined':
return 'N;';
}
return false;
}
function unserialize(inp){
var error=0,
errormsg='';
if(inp==''||inp.length < 2){
errormsg='input is too short';
return;
}
var val, kret, vret, cval;
var type=inp.charAt(0);
var cont=inp.substring(2);
var size=0,
divpos=0,
endcont=0,
rest='',
next='';
switch (type){
case 'N':
if(inp.charAt(1)!=';'){
errormsg='missing ; for null';
}
rest=cont;
break;
case 'b':
if(!/[01];/.test(cont.substring(0, 2))){
errormsg='value not 0 or 1, or missing ; for boolean';
}
val=cont.charAt(0)=='1';
rest=cont.substring(1);
break;
case 's':
val='';
divpos=cont.indexOf(':');
if(divpos==-1){
errormsg='missing:for string';
break;
}
size=parseInt(cont.substring(0, divpos));
if(size==0){
if(cont.length - divpos < 4){
errormsg='string is too short';
break;
}
rest=cont.substring(divpos + 4);
break;
}
if(cont.length - divpos - size < 4){
errormsg='string is too short';
break;
}
if(cont.substring(divpos + 2 + size, divpos + 4 + size)!='";'){
errormsg='string is too long, or missing ";';
}
val=cont.substring(divpos + 2, divpos + 2 + size);
rest=cont.substring(divpos + 4 + size);
break;
case 'i':
case 'd':
var dotfound=0;
for (var i=0; i < cont.length; i++){
cval=cont.charAt(i);
if(isNaN(parseInt(cval))&&!(type=='d'&&cval=='.'&&!dotfound++)){
endcont=i;
break;
}}
if(!endcont||cont.charAt(endcont)!=';'){
errormsg='missing or invalid value, or missing ; for int/float';
}
val=cont.substring(0, endcont);
val=type=='i' ? parseInt(val):parseFloat(val);
rest=cont.substring(endcont + 1);
break;
case 'a':
if(cont.length < 4){
errormsg='array is too short';
return;
}
divpos=cont.indexOf(':', 1);
if(divpos==-1){
errormsg='missing:for array';
return;
}
size=parseInt(cont.substring(1, divpos - 1));
cont=cont.substring(divpos + 2);
val=new Array();
if(cont.length < 1){
errormsg='array is too short';
return;
}
for (var i=0; i + 1 < size * 2; i +=2){
kret=unserialize(cont, 1);
if(error||kret[0]==undefined||kret[1]==''){
errormsg='missing or invalid key, or missing value for array';
return;
}
vret=unserialize(kret[1], 1);
if(error){
errormsg='invalid value for array';
return;
}
val[kret[0]]=vret[0];
cont=vret[1];
}
if(cont.charAt(0)!='}'){
errormsg='missing ending }, or too many values for array';
return;
}
rest=cont.substring(1);
break;
case 'O':
divpos=cont.indexOf(':');
if(divpos==-1){
errormsg='missing:for object';
return;
}
size=parseInt(cont.substring(0, divpos));
var objname=cont.substring(divpos + 2, divpos + 2 + size);
if(cont.substring(divpos + 2 + size, divpos + 4 + size)!='":'){
errormsg='object name is too long, or missing ":';
return;
}
var objprops=unserialize('a:' + cont.substring(divpos + 4 + size), 1);
if(error){
errormsg='invalid object properties';
return;
}
rest=objprops[1];
var objout='function ' + objname + '(){';
for (key in objprops[0]){
objout +='' + key + "=objprops[0]['" + key + "'];";
}
objout +='}val=new ' + objname + '();';
eval(objout);
break;
default:
errormsg='invalid input type';
}
return arguments.length==1 ? val:[val, rest];
}
function splitNode(node, start, end){
var parent=node.parentNode;
var doc=node.ownerDocument;
var leftRange=doc.createRange();
leftRange.setStart(parent, parentOffset);
leftRange.setEnd(node, offset);
var left=leftRange.extractContents();
parent.insertBefore(left, limit);
var doc=node.ownerDocument;
var leftRange=doc.createRange();
leftRange.setStart(node, start);
leftRange.setEnd(node, end);
var left=leftRange.extractContents();
}
function getNodeIndex(parent, node){
var index=parent.childNodes.length;
while (index--){
if(node===parent.childNodes[index]){
break;
}}
return index;
}
function ptsChangeElAttrs(scope){
this._scope=scope;
this._itemSubMenu=null;
this._element=null;
this._isChangedAttrText=false;
this._re={
attrName: /[A-Za-z0-9-_]*/,
attrVal: /[A-Za-z0-9-_\s]*/,
};
this._allowedAttrs=['id', 'style', 'class'];
this._initMenuItem();
this._initSubMenuItem();
this._getAttrToSubMenu();
}
ptsChangeElAttrs.prototype._initMenuItem=function (){
var self=this._scope,
$parent=self._$.find('.ptsElMenuMainPanel'),
$newEl=jQuery('#ptsAddHtmlAttribute');
$newEl=$newEl.clone().removeAttr('id').addClass('ptsElMenuBtn');
$parent.prepend('');
$parent.prepend($newEl);
};
ptsChangeElAttrs.prototype._initSubMenuItem=function (){
var self=this._scope,
$parent=self._$.find('.ptsElMenuContent'),
$newEl=jQuery('#ptsSubMenyAddHtmlAttr');
$newEl=$newEl.clone().removeAttr('id');
$parent.append($newEl);
this._itemSubMenu=$parent;
};
ptsChangeElAttrs.prototype._getAttrToSubMenu=function (){
var me=this,
self=me._scope,
$el=self._element._$.hasClass('ptsEl') ? self._element._$:self._element._$.find('.ptsEl').eq(0),
$parent=this._itemSubMenu,
$newEl=null,
allowedAttr=this._allowedAttrs;
me._element=$el;
var $attrNames={},
$attrs={};
$parent.find('.ptsElMenuSubPanel[data-sub-panel="add_attr"] .ptsElMenuSubPanelRow').remove();
$el.each(function (){
$attrNames=this.attributes;
$parent=$parent.find('.ptsElMenuSubPanel[data-sub-panel="add_attr"]');
for (var key in allowedAttr){
if(typeof allowedAttr[key]=='string'){
$attrs[allowedAttr[key]]=jQuery(this).attr(allowedAttr[key]);
$newEl=jQuery('#ptsRowAddHtmlAttr').clone().removeAttr('id');
$newEl.attr('data-id', allowedAttr[key]);
$newEl.find('span').text(allowedAttr[key]);
$newEl.find('input').val($attrs[allowedAttr[key]]);
$newEl.find('input').attr('name', allowedAttr[key]);
$parent.append($newEl);
}}
me._elAttributes=$attrs;
me._setEventChangeElVal();
me._setEventUpdateAttrs();
});
};
ptsChangeElAttrs.prototype._updateElAttrs=function (){
this._isChangedAttrText=true;
};
ptsChangeElAttrs.prototype._setEventChangeElVal=function (){
var me=this,
$parent=this._itemSubMenu;
function callBackFn(){
var thatAttr=jQuery(this).attr('name'),
thatVal=jQuery(this).val();
me._element.attr(thatAttr, thatVal);
me._updateElAttrs();
}
$parent.find('div[data-sub-panel="add_attr"] input:not(".ptsCpInpFlag")').unbind('keyup');
$parent.find('div[data-sub-panel="add_attr"] input:not(".ptsCpInpFlag")').on('keyup', callBackFn);
};
ptsChangeElAttrs.prototype._setEventUpdateAttrs=function (){
var me=this,
$parent=this._itemSubMenu;
function callBackFn(){
if(me._isChangedAttrText){
me._getAttrToSubMenu();
me._isChangedAttrText=false;
}}
$parent.find('input').unbind('blur');
$parent.find('input').on('blur', callBackFn);
};
!(function (t){
var i=t(window);
t.fn.visible=function (t, e, o){
if(!(this.length < 1)){
var r=this.length > 1 ? this.eq(0):this,
n=r.get(0),
f=i.width(),
h=i.height(),
o=o ? o:'both',
l=e===!0 ? n.offsetWidth * n.offsetHeight:!0;
if('function'==typeof n.getBoundingClientRect){
var g=n.getBoundingClientRect(),
u=g.top >=0&&g.top < h,
s=g.bottom > 0&&g.bottom <=h,
c=g.left >=0&&g.left < f,
a=g.right > 0&&g.right <=f,
v=t ? u||s:u&&s,
b=t ? c||a:c&&a;
if('both'===o) return l&&v && b;
if('vertical'===o) return l&&v;
if('horizontal'===o) return l&&b;
}else{
var d=i.scrollTop(),
p=d + h,
w=i.scrollLeft(),
m=w + f,
y=r.offset(),
z=y.top,
B=z + r.height(),
C=y.left,
R=C + r.width(),
j=t===!0 ? B:z,
q=t===!0 ? z:B,
H=t===!0 ? R:C,
L=t===!0 ? C:R;
if('both'===o) return !!l&&p >=q&&j >=d&&m >=L&&H >=w;
if('vertical'===o) return !!l&&p >=q&&j >=d;
if('horizontal'===o) return !!l&&m >=L&&H >=w;
}}
};})(jQuery);
(function (window){
window.htmlentities={
encode: function (str){
var buf=[];
for (var i=str.length - 1; i >=0; i--){
buf.unshift(['&#', str[i].charCodeAt(), ';'].join(''));
}
return buf.join('');
},
decode: function (str){
return str.replace(/&#(\d+);/g, function (match, dec){
return String.fromCharCode(dec);
});
},
};})(window);