(()=>{var e={69158(e){void 0===TCB_Front.js_modules["search-form"]&&TCB_Front.setModuleLoadedStatus("search-form",!1),((t,i)=>{if(TCB_Front.isModuleLoaded("search-form"))return;const s=".thrv-search-form",a=e=>{try{new n(t(e),!!TCB_Front.Utils.isEditorPage())}catch(e){}};window.addEventListener("load",()=>{i.$body.find(s).each((e,t)=>{a(t)})}),t(window).on("tcb_after_dom_ready",()=>{t(s).each((e,t)=>{a(t)})});class n{constructor(e,t=!0){e.is(s)&&!e.hasClass("thrv-sticky-search")&&(e.data("tcb.search")&&!t||(this.$element=e,this.$form=e.find("form"),this.$input=e.find(".thrv-sf-input"),this.$submit=e.find(".thrv-sf-submit"),this.$submitButton=this.$submit.find("button"),this.isEditor=t,this.$input.removeClass("thrv-sf-input-hide"),this.onResize(),this.isEditor?this.$form.off("submit").on("submit",()=>!1):this.bindEvents(),this.$element.attr("id")&&this.$element.attr("data-selector",`${s}#${this.$element.attr("id")}`),e.data("tcb.search",this)))}onResize(){this.readData(),this.closeAnimation(),this.$input.toggle(!["expand","overlay"].includes(this.currentDisplay)),this.isEditor&&this.isElementEditable()&&this.$element.attr("data-editor-preview")&&this.startAnimation()}readData(){this.currentDisplay=i.getMediaAttr(this.$element,"data-display"),this.currentPosition=i.getMediaAttr(this.$element,"data-position"),this.wrapperSize=this.$element.outerWidth(),this.submitImage=i.inlineCssVariable(this.$submitButton,"background-image"),this.submitColor=i.inlineCssVariable(this.$submitButton,"background-color")}startAnimation(){switch(this.currentDisplay||i.getMediaAttr(this.$element,"data-display")){case"expand":this.showExpand ();break;case"overlay":this.showOverlay();break;case"tooltip-click":case"tooltip-hover":this.showTooltip();break;default:clearTimeout(this.hideExpandTimeout),this.$input.show(),i.inlineCssVariable(this.$element,"--tve-applied-max-width","")}}closeAnimation(e=!1){switch(this.currentDisplay||i.getMediaAttr(this.$element,"data-display")){case"expand":this.hideExpand (e);break;case"overlay":this.hideOverlay();break;case"tooltip-click":case"tooltip-hover":this.hideTooltip();break;default:i.inlineCssVariable(this.$element,"--tve-applied-max-width",""),i.inlineCssVariable(this.$input,{transition:"",transform:"",display:"block"})}}bindEvents(){const e=this.onResize.bind(this);i.addResizeCallback(e),this.$submit.off("click.search").on("click.search",()=>{if(this.isEditor)return!1;switch(this.currentDisplay){case"expand":if(this.isInputHidden())return this.showExpand (),!1;break;case"overlay":return this.showOverlay(),!1;case"tooltip-click":if(this.isInputHidden())return this.showTooltip(),!1}}),i.$body.on("click.search",e=>{const i=t(e.target);if(i.length&&this.isOpened)switch(this.currentDisplay){case"expand":this.isInsideElement(this.$element,i)||this.hideExpand ();break;case"overlay":this.$element.data("$$clone")&&!this.isInsideElement(this.$element.data("$$clone"),i)&&this.hideOverlay();break;case"tooltip-click":case"tooltip-hover":this.isInsideElement(this.$element,i)||this.hideTooltip()}}),"overlay"!==this.currentDisplay&&this.bindMouseEvents()}bindMouseEvents(){const e=()=>{this.hideInputTimeout=setTimeout(()=>{"expand"===this.currentDisplay?this.hideExpand ():this.hideTooltip()},5e3)};this.$submit.off("mouseenter.search").on("mouseenter.search",()=>{this.isHoverTooltip()&&this.showTooltip(),clearTimeout(this.hideInputTimeout)}),this.$input.off("mouseenter.search_input").on("mouseenter.search_input",()=>{clearTimeout(this.hideInputTimeout)}),this.$submit.off("mouseleave.search").on("mouseleave.search",e),this.$input.off("mouseleave.search_input").on("mouseleave.search_input",e)}isHoverTooltip(){return"desktop"===i.getDisplayType()&&"tooltip-hover"===this.$element.attr("data-display-d")}bindCloseSticky(){!this.isEditor&&this.$element.data("$$clone")&&this.$element.data("$$clone").jquery&&this.$element.data("$$clone").find(".tcb-sf-close-icon").off("click.close_search").on("click.close_search",()=>{this.hideOverlay()})}toggleOverlay(e=!0){this[(e?"show":"hide")+"Overlay"]()}toggleTooltip(e=!0){this[(e?"show":"hide")+"Tooltip"]()}toggleExpand (e=!0){this[(e?"show":"hide")+"Expand"]()}showOverlay(){if(!this.$element.data("$$clone")){const e=this.$element.attr("id").replace("tve-sf-","tve-sf-overlay-"),s=this.$element.clone(),a=t(`<div id="${e}" data-selector=".tve-sf-overlay-container#${e}" class="thrv_wrapper tve-sf-overlay-container tve_no_icons tve_no_drag"><div class="tve-content-box-background" data-selector="#${e} .tve-content-box-background"></div><div class="tve-cb" data-selector="#${e} .tve-cb"></div></div>`),n=a.find(".tve-cb");this.$element.hasClass("overlay-icon")?a.prepend(`<div class="thrv_wrapper tcb-sf-close-icon thrv_icon tve_no_drag tve_no_icons tcb-icon-inherit-style tcb-icon-display" data-selector="#${e} .tcb-sf-close-icon"></svg>${i.icons.get("cross").replace("tcb-cross","tcb-icon tcb-cross")}</div>`):s.prepend(`<div class="thrv_wrapper tcb-sf-close-icon thrv_icon tve_no_drag tve_no_icons tcb-icon-inherit-style tcb-icon-display" data-selector=".thrv-search-form#${this.$element.attr("id")} .tcb-sf-close-icon"></svg>${i.icons.get("cross").replace("tcb-cross","tcb-icon tcb-cross")}</div>`),s.addClass("thrv-sticky-search tve_no_icons"),n.append(s),this.$element.closest(i.identifiers.pageStickyParent).append(a),this.$element.data("$$clone",s),this.$element.data("$$overlayWrapper",a),a.data("$$parent",this.$element),s.data("$$parent",this.$element),s.attr("id",this.$element.attr("id")),s.find(".thrv-sf-input").show(),this.bindCloseSticky()}this.$element.hasClass("tcb-compact-edit-mode")&&this.$element.data("$$clone")&&this.$element.data("$$clone").find(".tve-prevent-content-edit").removeClass("tve-prevent-content-edit"),this.zIndexOrder(),i.$body.addClass("tcb-body-search-overlay"),this.$element.data("$$clone").removeClass("tcb-permanently-hidden canvas-mode tcb-compact-element"),this.$element.data("$$overlayWrapper").removeClass("tcb-permanently-hidden canvas-mode tcb-compact-element").css({top:"-500px",opacity:"0"}).animate({top:TCB_Front.bodyOffsetTop(),opacity:"1"}),this.isOpened=!0,t(window).trigger("tcb_search_overlay_show",[this.$element])}hideOverlay(){i.$body.removeClass("tcb-body-search-overlay"),this.$element.data("$$overlayWrapper")?this.isEditor?(this.$element.data("$$overlayWrapper").remove(),this.$element.removeData("$$overlayWrapper"),this.$element.removeData("$$clone")):this.$element.data("$$overlayWrapper").css({top:TCB_Front.bodyOffsetTop(),opacity:"1"}).animate({top:"-1000px",opacity:"0"},{done:()=>{this.zIndexOrder(!1),this.$element.data("$$overlayWrapper").addClass("tcb-permanently-hidden")}}):this.zIndexOrder(!1),i.isModuleLoaded("menu")&&i.menu.zIndexOrder(),this.isOpened=!1}zIndexOrder(e=!0){("overlay"===this.currentDisplay?this.$element.parentsUntil("body,#wrapper"):this.$element).each(function(){const i=t(this);e?"static"===i.css("position")||i.hasClass("thrv_header")||i.css("z-index",101).addClass("tcb-sfp"):i.css("z-index","").removeClass("tcb-sfp")})}showExpand (){let e=parseFloat(i.inlineCssVariable(this.$element,"--tve-applied-max-width"));e="left"===this.currentPosition?Math.min(parseInt(this.$element.offset().left),e):Math.min(parseInt(i.$window.width()-(this.$element.offset().left+this.$element.outerWidth())),e),i.inlineCssVariable(this.$element,"--tve-applied-max-width",`${e}px`,"important"),i.inlineCssVariable(this.$input,{top:this.$element.css("padding-top"),transform:"none",transition:"width 0.5s",["left"===this.currentPosition?"right":"left"]:"100%",[this.currentPosition]:"auto"}),this.$input.show().addClass("tcb-sf-expand"),this.zIndexOrder(),clearTimeout(this.hideExpandTimeout),this.isOpened=!0}hideExpand (e=!1){const t=()=>{i.inlineCssVariable(this.$element,"--tve-applied-max-width",""),i.inlineCssVariable(this.$input,{top:"",transition:"",left:"",right:"",transform:""}),this.$input.hide()};this.$input.removeClass("tcb-sf-expand"),e?t():this.hideExpandTimeout=setTimeout(t,350),this.zIndexOrder(!1),this.isOpened=!1}showTooltip(){i.inlineCssVariable(this.$element,"--tve-applied-max-width","");let e=parseFloat(i.inlineCssVariable(this.$element,"--tve-applied-max-width"));const t=this.$element.outerWidth();e="left"===this.currentPosition?Math.min(parseInt(this.$element.offset().left+t),e):Math.min(parseInt(i.$window.width()-this.$element.offset().left),e),i.inlineCssVariable(this.$element,"--tve-applied-max-width",`${e}px`,"important"),this.$element.addClass("tcb-sf-show-tooltip"),i.inlineCssVariable(this.$input,{"--tcb-sf-bg-img":this.submitImage,"--tcb-sf-bg-color":this.submitColor,display:"",[this.currentPosition]:"auto",["left"===this.currentPosition?"right":"left"]:"0","--tve-sf-after-left":"left"===this.currentPosition?"auto":this.wrapperSize/2-10+"px","--tve-sf-after-right":"right"===this.currentPosition?"auto":this.wrapperSize/2-10+"px"}),this.zIndexOrder(),this.isOpened=!0}hideTooltip(){i.inlineCssVariable(this.$element,"--tve-applied-max-width",""),i.inlineCssVariable(this.$input,{left:"",right:""}),this.$element.removeClass("tcb-sf-show-tooltip"),this.zIndexOrder(!1),this.isOpened=!1}isInputHidden(){return"none"===this.$input.css("display")||!this.$input.outerHeight()||!this.$input.outerWidth()}isInsideElement(e,t){return e.is(t)||e.find(t).length}isElementEditable(){let e=!1;try{TVE&&TVE.CONST&&TVE.Editor_Page&&(TVE.CONST.theme&&TVE.CONST.theme.is_theme_template&&0!==this.$element.closest(".tcb-post-content").length||(e=!!TVE.Editor_Page.selection_manager.isElementEditable(this.$element)&&(this.$element.closest(".tve-ham-wrap.tcb-compact-edit-mode").length||!this.$element.closest(".tve-ham-wrap").length)))}catch(e){}return e}}window.TCB_Front.TARSearch=n,e.exports=n,TCB_Front.setModuleLoadedStatus("search-form",!0)})(ThriveGlobal.$j,TCB_Front)}},t={};!function i(s){var a=t[s];if(void 0!==a)return a.exports;var n=t[s]={exports:{}};return e[s](n,n.exports,i),n.exports}(69158)})();
void 0===TCB_Front.js_modules.divider&&TCB_Front.setModuleLoadedStatus("divider",!1),((t,d)=>{if(TCB_Front.isModuleLoaded("divider"))return;const e={init(){d.addResizeCallback(e.customDividerStyle),e.customDividerStyle()},customDividerStyle(){t(".thrv-divider").each(function(){const i=t(this),s=i.find("hr");TCB_Front.Utils.windowWidth()>1023?e.removeOldClass(s).addClass(d.getMediaAttr(i,"data-style","desktop")):TCB_Front.Utils.windowWidth()>767?e.removeOldClass(s).addClass(d.getMediaAttr(i,"data-style","tablet")):e.removeOldClass(s).addClass(d.getMediaAttr(i,"data-style","mobile"))})},removeOldClass:t=>(t.removeClass(function(t,d){return(d.match(/(^|\s)tve_sep-\S+/g)||[]).join(" ")}),t)};t(window).on("tcb_after_dom_ready",()=>e.init()),window.addEventListener("load",()=>e.init()),TCB_Front.setModuleLoadedStatus("divider",!0)})(ThriveGlobal.$j,TCB_Front);
(()=>{function t(t,e){var s=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),s.push.apply(s,a)}return s}function e(e){for(var a=1;a<arguments.length;a++){var i=null!=arguments[a]?arguments[a]:{};a%2?t(Object(i),!0).forEach(function(t){s(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):t(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}function s(t,e,s){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var s=e.call(t,"string");if("object"!=typeof s)return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}void 0===TCB_Front.js_modules.pagination&&TCB_Front.setModuleLoadedStatus("pagination",!1),function(t){if(TCB_Front.isModuleLoaded("pagination"))return;const s="tcb-pagination-number",a="tcb-pagination-current",i="tcb-pagination-dots",r="tcb-pagination-link",n="tcb-pagination-button",o="tcb-permanently-hidden";class l{constructor(e,s){this.type=e,this.list=s,this.$element=t(`.tcb-pagination[data-list="${this.list.identifier}"]`)}static factory(t,s){let a,i={load_more:g,numeric:c};const r=ThriveGlobal.$j.Event("tcb_pagination_extra_classes.tcb");return s.$element.trigger(r),r.paginationClasses&&(i=e(e({},i),r.paginationClasses)),void 0===i[t]?console.warn("A pagination class for this type does not exist!"):a=i[t],new a(t,s)}addLoadListeners(){console.warn("Overwrite this function!")}load(){console.warn("Overwrite this function!")}render(){console.warn("Overwrite this function!")}isLoading(){return this.list.isLoading()}enableLoading(t=""){this.list.enableLoading(t)}disableLoading(){this.list.disableLoading()}getTotalPostCount(){let t=0;return t+=Number(this.list.listArgs.attr.total_post_count)||0,t+=Number(this.list.listArgs.attr.total_sticky_count)||0,t}}class c extends l{constructor(t,e){super(t,e);const s=this.list.listArgs;this.firstPage=1,this.postsPerPage=Math.max(parseInt(s.query?s.query.posts_per_page:s.attr.posts_per_page),1),this.lastPage=Math.ceil(this.getTotalPostCount()/this.postsPerPage),this.currentPage=parseInt(s.query?s.query.paged:s.attr.paged),this.pagesAroundCurrent=parseInt(s.attr.pages_near_current),this.totalPages=this.lastPage,this.buttons={},this.$element.attr("data-ct")||this.$element.attr({"data-ct":"pagination-123","data-ct-name":"Default"}),["first","last","prev","next"].forEach(t=>{const e=this.$element.find(`.${n}.tcb-pagination-${t}`);switch(t){case"first":case"last":e.attr("data-page",this[`${t}Page`])}e.find('a[href="#"]').each((t,e)=>e.setAttribute("href","javascript:void(0)")),this.buttons["$"+t]=e}),this.$pageNumberContainer=this.$element.find(".tcb-pagination-numbers-wrapper"),this.$label=this.$element.find(".tcb-pagination-label")}static renderPageNumber(e,n=""){const o=[s,"thrv_wrapper"];let l,c={};switch(n){case"current":o.push(a),l=`.${a}`;break;case"dots":o.push(i),l=`.${i}`,e="...";break;case"link":o.push(r),l=`.${r}`,c={"data-page":e},e=`<a href="javascript:void(0)">${e}</a>`}return c["data-selector"]=l,t(`<p>${e}</p>`).addClass(o.join(" ")).attr(c)}addLoadListeners(){this.$element.on("click",`.${n}`,e=>{const s=t(e.target).closest(`.${n}`);this.load(s.attr("data-page"))}),this.$element.on("click",`.${s}:not(.${a}, .${i})`,t=>this.load(t.currentTarget.dataset.page)),t("body").off("tcb_post_list_filter_change").on("tcb_post_list_filter_change",()=>{this.$element.trigger("tcb_after_numeric_pagination_render",this)})}load(t){if(t&&!this.isLoading()){this.enableLoading(),this.currentPage=parseInt(t);const e=this.list.listArgs;void 0===e.query?e.attr.paged=this.currentPage:e.query.paged=this.currentPage,this.list.getItems(t=>{this.list.insertItems(t,!0),this.render(),this.disableLoading()},e)}}render(){this.lastPage=Math.ceil(this.getTotalPostCount()/this.postsPerPage),this.renderButtons(),this.renderLabel(),this.renderPageNumbers(),this.$element.trigger("tcb_after_numeric_pagination_render",this),this.$element.removeClass(o)}renderButtons(){this.buttons.$prev.attr("data-page",this.currentPage-1),this.buttons.$next.attr("data-page",this.currentPage+1);const t=1===parseInt(tve_frontend_options.is_editor_page);[this.buttons.$first,this.buttons.$prev].forEach(e=>{e.hasClass(o)||e.toggleClass("tcb-disabled-pagination-button",!t&&this.currentPage<=this.firstPage)}),[this.buttons.$last,this.buttons.$next].forEach(e=>{e.hasClass(o)||e.toggleClass("tcb-disabled-pagination-button",!t&&this.currentPage>=this.lastPage)})}renderLabel(){this.$label.find(".thrive-shortcode-content").each((t,e)=>{const s=e.dataset.shortcode;e.innerText=` ${this.getLabelValue(s)} `})}getLabelValue(t){let e;switch(t){case"tcb_pagination_current_page":e=this.currentPage;break;case"tcb_pagination_total_pages":e=this.lastPage;break;case"tcb_pagination_current_posts":e=(this.currentPage-1)*this.postsPerPage+1+"-"+this.currentPage*this.postsPerPage;break;case"tcb_pagination_total_posts":e=this.totalPages*this.postsPerPage;break;default:e=""}return e}renderPageNumbers(){this.$pageNumberContainer.empty();let t=!0;for(let e=1;e<=this.lastPage;e++){let s;if(e===this.currentPage)s="current";else if(1===e||e>=this.currentPage-this.pagesAroundCurrent&&e<=this.currentPage+this.pagesAroundCurrent||e===this.totalPages)s="link",t=!0;else{if(s="dots",!t)continue;t=!1}this.$pageNumberContainer.append(c.renderPageNumber(e,s))}}}class g extends l{constructor(t,e){super(t,e),this.$button=this.$element.find(".tcb-pagination-load-more-button")}addLoadListeners(){this.$button.on("click",this.load.bind(this))}load(){if(!this.isLoading()){this.enableLoading("load-bot");const t=this.list.listArgs;if(void 0===t.query?t.attr.paged+=1:t.query.paged+=1,t.query&&"rand"===t.query.orderby){const e=[];this.list.$element.find("article").each((t,s)=>{e.push(parseInt(s.getAttribute("data-id")))}),t.query.post__not_in=e,t.query.paged=1}this.list.getItems(t=>{this.list.insertItems(t),this.render(),this.disableLoading()},t)}}render(){const t=this.list.listArgs,e=1===parseInt(tve_frontend_options.is_editor_page);let s;s=t.query?t.query.paged*t.query.posts_per_page:t.attr.paged*t.attr.posts_per_page,this.$element.toggle(e||s<this.getTotalPostCount()),this.$element.find(".tcb-pagination-load-more-link").attr("href","javascript:void(0)"),this.$element.removeClass(o)}}window.TCB_Front.Pagination=l,TCB_Front.setModuleLoadedStatus("pagination",!0)}(ThriveGlobal.$j)})();
void 0===TCB_Front.js_modules["post-list"]&&TCB_Front.setModuleLoadedStatus("post-list",!1),(t=>{if(!TCB_Front.isModuleLoaded("post-list")){t(window).on("tcb_after_dom_ready",()=>{t(".tcb-post-list").each((i,s)=>{new e(t(s)).renderPagination()})});class e{constructor(e){this.$element=e,this.content="",this.listArgs={};let i=this.getAttr("data-css");const s=t.Event("tcb_post_list_identifier.tcb");if(this.$element.trigger(s),s.identifier&&(i=s.identifier),this.identifier=i,this.listIdentifier="article",tve_frontend_options.is_editor_page?this.editorInit():this.frontendInit(),this.isCarousel()){this.isEditor=tve_frontend_options.is_editor_page;const t=this.$element.find(".tcb-carousel-container");t.attr("data-carousel-settings",decodeURI(t.attr("data-carousel-settings"))),this.carousel=new TCB_Front.Carousel(this),this.carousel.initCarousel()}}getPaginationInstance(){if(this.listArgs&&this.listArgs.attr){const t=this.listArgs.attr["pagination-type"];if(t.length&&"none"!==t&&void 0!==TCB_Front.Pagination)return TCB_Front.Pagination.factory(t,this)}}renderPagination(){this.pagination=this.getPaginationInstance(),this.pagination&&(tve_frontend_options.is_editor_page||this.pagination.addLoadListeners(),this.pagination.render())}editorInit(){this.listArgs={attr:{"pagination-type":this.getAttr("data-pagination-type"),total_post_count:this.getAttr("data-total_post_count")?this.getAttr("data-total_post_count"):100,pages_near_current:this.getAttr("data-pages_near_current")?this.getAttr("data-pages_near_current"):2},query:{posts_per_page:this.getAttr("data-posts_per_page")?this.getAttr("data-posts_per_page"):6,paged:1}}}frontendInit(){"undefined"==typeof tcb_post_lists?console.warn("Error initializing the post list parameters"):(this.listArgs=tcb_post_lists.find(t=>this.$element.is(t.identifier)),this.listArgs&&(this.listArgs.query&&void 0!==this.listArgs.query.offset&&delete this.listArgs.query.offset,this.listArgs.attr.queried_object=0,this.listArgs.query.queried_object=tve_frontend_options.queried_object,this.content=t('.tcb-post-list-template[data-identifier="'+this.listArgs.template+'"]').html()))}getAttr(t){return this.$element.attr(t)}getItems(t,e=this.listArgs){TCB_Front.Utils.restAjax({route:tve_frontend_options.routes.posts+"/html",data:{content:this.content,args:e}}).done(e=>{"function"==typeof t&&t(e),this.initItems(),TCB_Front.event_triggers(this.$element)}).fail(()=>{console.warn("There was an error and the content could not be loaded.")})}insertItems(e,i=!1){if(e.count&&e.posts){const s=this.$element.clone().empty();for(const t in e.posts)e.posts.hasOwnProperty(t)&&s.append(e.posts[t]);i?(this.$element.replaceWith(s),this.identifier.includes("tve-u-")?this.$element=t(`.tcb-post-list[data-css=${this.identifier}]`):this.$element=t(this.identifier),t(window).trigger("tcb_post_list_after_item_insert")):this.isCarousel()&&this.carousel?(this.$element.find(".slick-track").append(s.html()),this.carousel.initCarousel(!0)):(this.$element.append(s.html()),this.masonryRedo()),e.total_post_count&&(this.listArgs.attr.total_post_count=e.total_post_count)}}isLoading(){return this.$element.data("loading")}enableLoading(t=""){this.$element.addClass("tve-loading"+(t.length?" "+t:"")),this.$element.data("loading",!0)}disableLoading(){setTimeout(()=>this.$element.removeClass("tve-loading load-bot"),100),this.$element.data("loading",!1)}masonryRedo(t=this.$element){if(t.length&&t.data("masonry")){const e=t.find(`${this.listIdentifier}:not(.masonry-brick)`);t.masonry("appended",e),t.masonry("layout")}}initItems(){(this.$element.find(".tcb-custom-field-source.thrv-rating").length||this.$element.find("[data-shortcode-id*='acf_']").length)&&TCB_Front.dynamicElements.init()}isCarousel(){return"carousel"===this.$element.attr("data-type")}}window.TCB_Front.PostList=e,TCB_Front.setModuleLoadedStatus("post-list",!0)}})(ThriveGlobal.$j);
void 0===TCB_Front.js_modules["post-grid-compat"]&&TCB_Front.setModuleLoadedStatus("post-grid-compat",!1),(t=>{if(TCB_Front.isModuleLoaded("post-grid-compat"))return;window.addEventListener("load",function(){o.postGridLayout()});const o={postGridLayout(){try{t(".tve_post_grid_masonry,.tcb-post-list.masonry").each(function(){const o=this.dataset.masonry?JSON.parse(this.dataset.masonry):{},s=TCB_Front.getDisplayType()[0];void 0!==o[`gutter-${s}`]&&(o.gutter=parseInt(o[`gutter-${s}`])),t(this).masonry(o).css("opacity",1)})}catch(t){console.log(t)}const o=t(".tve_post_grid_grid");o.length<=0||o.find(".tve_pg_row").each(function(){let o=0;const s=t(this).css("height","");s.find(".tve_post").each(function(){const s=t(this),e=s.outerHeight();e>o&&(o=e),s.css("height","100%")}),s.css("height",o-1+"px")})}};t(window).on("tcb_after_dom_ready",()=>{o.postGridLayout(),TCB_Front.Utils.isEditorPage()||TCB_Front.addResizeCallback(o.postGridLayout)}).on("tcb_toggle_open",()=>o.postGridLayout()).on("tl_form_opened",()=>o.postGridLayout()).on("tcb_on_content_show",()=>o.postGridLayout()).on("tcb_before_lightbox_reposition",()=>o.postGridLayout()).on("tcb_post_list_after_item_insert",()=>o.postGridLayout()).on("tcb_off_screen_sidebar_toggle",()=>o.postGridLayout()),window.TCB_Front.postGridLayout=o.postGridLayout,TCB_Front.setModuleLoadedStatus("post-grid-compat",!0)})(ThriveGlobal.$j);
void 0===TCB_Front.js_modules.dropdown&&TCB_Front.setModuleLoadedStatus("dropdown",!1),(t=>{if(TCB_Front.isModuleLoaded("dropdown"))return;const e=".tve_lg_dropdown, .tcb-form-dropdown, .tve-dynamic-dropdown";t(window).on("tcb_after_dom_ready",()=>{if(!TCB_Front.Utils.isEditorPage()){const e=t(TCB_Front.Utils.isEditorPage()?"#tve_editor":"body");TCB_Front.Utils.initDropdown(e)}}),TCB_Front.Utils.initDropdown=o=>{t(".tve_lg_dropdown .tve-lg-dropdown-trigger, .tcb-form-dropdown .tve-lg-dropdown-trigger, .tve-dynamic-dropdown .tve-lg-dropdown-trigger").each(function(){t(this).attr("tabindex",-1).removeAttr("href").siblings("input").attr("style","position: absolute; opacity: 0;").attr("autocomplete","off")});let n="";const d=function(){n="",t(".tve-lg-dropdown-search").length&&t(".tve-lg-dropdown-search").val(""),t(".tve-lg-dropdown-option.tve-state-hover,.tve-dynamic-dropdown-option.tve-state-hover").removeClass("tve-state-hover")},r=function(t,e){e.find(".tve-lg-dropdown-trigger").find(".tve-disabled-text-inner").html(t.text()),e.find("input").attr("value",t.attr("data-value")).val(t.attr("data-value")),e.find(".tve-state-active").removeClass("tve-state-active tve-state-hover"),t.addClass("tve-state-active tve-state-hover"),e.find(".tve-lg-dropdown-list").animate({scrollTop:t.prevAll().length*t.outerHeight()},100),e.find("input").trigger("change"),e.trigger("tcb.dropdown_value_changed")};o.off("mousedown.dropdownclick").on("mousedown.dropdownclick",e,function(o){const n=t(o.currentTarget).next();if(n.hasClass("tve-lg-dropdown-message-after")&&n.remove(),o.currentTarget.classList.contains("tve-lg-field-disabled")){if(o.currentTarget.dataset.tveMessages){const e=JSON.parse(o.currentTarget.dataset.tveMessages);if(e.disabledReasonMessage){const n=document.createElement("div");n.classList.add("tve-lg-dropdown-message-after"),n.innerHTML=e.disabledReasonMessage,t(n).insertAfter(o.currentTarget)}}return}if(o.target.classList.contains("tve-lg-dropdown-input"))return;const d=t(this).closest(e),r=d.find(".tve-lg-dropdown-search");if(d.toggleClass("tve-state-expanded"),d.hasClass("tve-state-expanded")&&(r.length>0?r.find("input").trigger("focus"):d.find("input").trigger("focus")),o.target.classList.contains("tve-lg-dropdown-list")||o.target.closest(".tve-lg-dropdown-search"))return d.find(".tve-lg-dropdown-search input").trigger("focus"),!1;d.find(".tve-lg-dropdown-search").toggleClass("tve_display"),r.length&&d.find(".tve-lg-dropdown-search input").val(""),o.stopPropagation(),o.preventDefault()}).off("blur.dropdownblur").on("blur.dropdownblur",".tve_lg_dropdown input, .tcb-form-dropdown input, .tve-dynamic-dropdown input",function(o){o.stopPropagation(),o.preventDefault(),d(),this.closest(e).classList.remove("tve-state-expanded"),t(this).closest(e).find(".tve-lg-dropdown-search").removeClass("tve_display")}).off("keydown.dropdownkeypress").on("keydown.dropdownkeypress",".tve_lg_dropdown input, .tcb-form-dropdown input, .tve-dynamic-dropdown input",function(t){if(13===t.keyCode)return t.preventDefault(),!1}).off("keyup.dropdownkeypress").on("keyup.dropdownkeypress",".tve_lg_dropdown input, .tcb-form-dropdown input, .tve-dynamic-dropdown input",function(o){const s=t(this).closest(e),a=s.find(".tve-state-active"),i=s.find(".tve-lg-dropdown-search");switch(0===i.length&&9!==o.keyCode&&(o.stopPropagation(),o.preventDefault()),o.keyCode){case 13:s.toggleClass("tve-state-expanded"),i.length&&i.toggleClass("tve_display"),d();break;case 38:0===a.length?r(s.find(".tve-lg-dropdown-option,.tve-dynamic-dropdown-option").last(),s):a.prev().length&&r(a.prev(),s);break;case 40:0===a.length?r(s.find(".tve-lg-dropdown-option,.tve-dynamic-dropdown-option").first(),s):a.next().length&&r(a.next(),s);break;default:if(0===i.length?n+=String.fromCharCode(o.keyCode).toLowerCase():n=s.find(".tve-lg-dropdown-input").val().toLowerCase(),t(".tve-lg-dropdown-option.tve-state-hover,.tve-dynamic-dropdown-option.tve-state-hover").removeClass("tve-state-hover"),""===n)s.find(".tve-lg-dropdown-list").animate({scrollTop:0},300);else{const e=".tve-lg-dropdown-option, .tve-dynamic-dropdown-option",o=t(".tve-lg-dropdown-list"),d=t=>{o.animate({scrollTop:t.prevAll().length*t.outerHeight()},100),t.addClass("tve-state-hover")},r=s.find(e).filter(function(){return this.dataset.value.toLowerCase().startsWith(n)}).first(),a=r.length?t():s.find(e).filter(function(){return this.dataset.value.toLowerCase().includes(n)}).first();r.length?d(r):a.length&&d(a)}}}),o.off("mousedown.dropdownoptionclick").on("mousedown.dropdownoptionclick",".tve-lg-dropdown-option,.tve-dynamic-dropdown-option",function(o){o.stopPropagation(),o.preventDefault();const n=t(this),d=n.closest(e);r(n,d),d.removeClass("tve-state-expanded"),this.dataset.customOption&&d.find("input").trigger("changevalue.tveDropdown",this)})},TCB_Front.setModuleLoadedStatus("dropdown",!0)})(ThriveGlobal.$j);
(()=>{var t={74208(t){void 0===TCB_Front.js_modules.menu&&TCB_Front.setModuleLoadedStatus("menu",!1),function(e,n){if(TCB_Front.isModuleLoaded("menu"))return;const i=t=>["auto","scroll","hidden"].includes(t.css("overflow"));let o;function s(t){return e(t).closest(".thrv_widget_menu")}const a={init(){tve_frontend_options.is_editor_page||a.frontendInit(),a.customMenuSwitchIcon(),o||(o=a.customMenuSwitchIcon.bind(this,!1),n.addResizeCallback(o)),a.zIndexOrder(),e(".thrv_widget_menu").each((t,e)=>{a.addMutationListener(e)}),a.handleHiddenItems()},handleHiddenItems(){e(".thrv_widget_menu ul").each((t,n)=>{const i=e(n),o=i.closest("li").find("> a .tve-item-dropdown-trigger"),s=this.hasVisibleItems(i);s||n.style.setProperty("display","none","important"),o.toggle(s)})},hasVisibleItems(t){let e=!1;return t.find("> li").each((t,n)=>{getComputedStyle(n).getPropertyValue("display").includes("none")||(e=!0)}),e},zIndexOrder(){const t=e("ul.tve_w_menu");n.highestZIndex=t.length+6;let i=n.highestZIndex;t.each(function(){this.style.zIndex=i+5;const t=e(this),n=t.closest("#content");t.find("ul").css("z-index",i+6).parent().addClass("menu-item-has-children"),t.parentsUntil("body,#wrapper,#tve_editor").each(function(){const t=e(this);let n=parseInt(t.css("z-index"));isNaN(n)&&(n=0),n=800===n?i+7:Math.max(n,i+7),"static"!==t.css("position")&&(this.style.setProperty("z-index",n,"important"),this.classList.add("tcb-mp"))}),n.length&&"static"!==n.css("position")&&n.css("z-index",i+7).addClass("tcb-mp"),i--})},frontendInit(t){const o=this;function s(t,i){const o=t.attr("href"),s=t[0]?t[0].hash:"",a=t.attr("target");if(s){let i;try{i=e(s)}catch(t){}i&&i.length&&n.jumpScrollTo(i,t[0])}a||i.ctrlKey||i.metaKey?window.open(o,a||"_blank"):location.href=o}(t=t||n.$document).off("click.menu-disable-links").on("click.menu-disable-links",".tve-active-disabled .tve_w_menu .tve-state-active",function(t){const n=e(this).closest("li");if(!a.isHamburger(this)||!n.hasClass("menu-item-has-children"))return t.tvePreventNavigation=!0,!1}),t.off("menu_item_anchor_clicked").on("menu_item_anchor_clicked",".tve_w_menu li",function(){const t=e(this);a.isHamburger(t)&&requestAnimationFrame(()=>{a.toggleState(t,!1)})}),t.off("click.menu_item_click").on("click.menu_item_click",".tve_w_menu li:not(.tve-regular .tcb-mega-drop li)",function(t){if(t.tvePreventNavigation)return!0;if(t.stopPropagation(),e(t.target).closest(".tve-regular .tcb-mega-drop").length)return!0;const n=e(this),l=n.children("a").first(),r=l[0],d=!!n.find("ul").length,c=e(t.target).closest(".tve-item-dropdown-trigger").length||e(t.clickedTarget).closest(".tve-item-dropdown-trigger").length,u=n.closest(".thrv_widget_menu").attr("class").includes("tve-custom-menu-switch-icon-"),h=n.closest(".tve_w_menu").hasClass("tve_vertical");if((u||h)&&d){if(!c&&n.hasClass("expand-children")&&function(t){const e=t.attr("href");return e&&"#"!==e&&0!==e.indexOf("javascript:")}(l))return l.hasClass("tve-jump-scroll")?l.trigger("click"):s(l,t),!1;n.toggleClass("expand-children");const e=n.find("ul").first(),a=n.hasClass("expand-children");o.hasVisibleItems(e)&&e[a?"slideDown":"slideUp"](100);const r=e.closest(".section-content,.tve-cb");if(i(r)){let t={top:"",left:"",width:""};if(a){const{top:n,left:i,width:o}=e[0].getBoundingClientRect();t={top:n,left:i,width:o},e.data("fixed-position",{top:n,scrollTop:r.scrollTop()})}e.toggleClass("fixed-menu-item",a).css(t)}return!1}if(d&&c)return!1;const m=n.children(".tve_et_click");return m.length>0?(m.trigger("click"),!0):!!l.attr("href")&&(l.hasClass("tve-jump-scroll")?(l.trigger("click"),!0):(s(l,t),void(a.isHamburger(n)&&r.pathname===window.location.pathname&&r.host===window.location.host&&r.protocol===window.location.protocol&&requestAnimationFrame(()=>{a.toggleState(n,!1)}))))}),t.off("click.prevent_navigation").on("click.prevent_navigation",".tve_w_menu li a:not(.thrv_text_element a):not(.tve-regular .tcb-mega-drop a)",function(t){t.preventDefault()}),t.off("click.custom_menu").on("click.custom_menu",".tve-m-trigger",function(){return a.toggleState(this),!1}),t.off("mousedown.close_menu").on("mousedown.close_menu",t=>{e(t.target).closest(".thrv_widget_menu").length||a.closeAll()}),n.addResizeCallback(a.customMenuResponsive),n.addResizeCallback(a.mobileResponsiveToggle),a.customMenuResponsive(),a.refreshActiveStates(t),TCB_Front.$window.off("hashchange.tcb").on("hashchange.tcb",a.refreshActiveStates.bind(a,TCB_Front.$body)),a.positionLogo(t),a.mobileResponsiveToggle(),t.find(".section-content,.tve-cb").each((t,n)=>{const o=e(n);i(o)&&o.off("scroll.menu").on("scroll.menu",t=>{o.find(".fixed-menu-item").each((n,i)=>{const o=e(i),s=o.data("fixed-position"),a=parseInt(s.top)+(s.scrollTop-t.currentTarget.scrollTop);o.css("top",`${a}px`)})})})},mobileResponsiveToggle(){"mobile"===n.getDisplayType()?(n.$body.find(".vmd-right").attr("data-toggle-dir","vmd-right").removeClass("vmd-right").addClass("vmd-toggle"),n.$body.find(".vmd-left").attr("data-toggle-dir","vmd-left").removeClass("vmd-left").addClass("vmd-toggle")):n.$body.find(".vmd-toggle").each((t,e)=>{const n=e.getAttribute("data-toggle-dir");n&&(e.classList.remove("vmd-toggle"),e.classList.add(n))})},refreshActiveStates(t=TCB_Front.$body){t.find(".tve-custom-menu-type li > a").each(function(){if(!this.getAttribute("href")||"#"===this.getAttribute("href")||0===this.getAttribute("href").indexOf("javascript"))return;const t=e(this),n=location.protocol===this.protocol&&location.hostname===this.hostname&&location.pathname===this.pathname&&location.hash===this.hash;t.toggleClass("tve-state-active",n),t.parent().toggleClass("tve-state-active",n)})},customMenuResponsive(){e(".tve-m-trigger:visible").length?e(".tve-m-trigger").each(function(){const t=e(this).parent().find("> ul");if(!t.data("tve-colors-added")&&t.find("ul a").attr("data-tve-custom-colour")){const n=t.find("ul a").attr("data-tve-custom-colour");t.find("> li > a").each(function(){const t=e(this);t.attr("data-tve-custom-colour")&&(t.attr("data-o-color",t.attr("data-tve-custom-colour")),t.attr("data-tve-custom-colour",n))})}t.data("tve-colors-added",!0)}):(e(".tve-m-expanded").removeClass("tve-m-expanded"),e(".tve-m-trigger").each(function(){const t=e(this).parent().find("> ul");if(!t.data("tve-colors-added")&&t.find("> li > a").attr("data-o-color")){const e=t.find("> li > a"),n=e.attr("data-o-color");e.attr("data-tve-custom-colour",n).removeAttr("data-o-color")}t.data("tve-colors-added",!1)}))},customMenuSwitchIcon(t=!0){const i=n.getDisplayType();e(".thrv_widget_menu").each(function(){const n=e(this),o=n.attr("data-tve-allhoriz");let s=n.attr("data-tve-switch-icon"),l=!1;const r=n.data("tve-frontend-init");n.data("tve-frontend-init",!0),s||o||(s="tablet,mobile");const d=s.split(","),c=n.hasClass("tve-regular")||!r&&!n.find(".tve-m-trigger").is(":visible");if(n.removeClass("tve-custom-menu-switch-icon-desktop tve-custom-menu-switch-icon-tablet tve-custom-menu-switch-icon-mobile"),t&&n.find("ul:not(.tcb-masonry.masonry)").removeAttr("style"),d.includes(i)?n.addClass(`tve-custom-menu-switch-icon-${i}`):l=!0,n.toggleClass("tve-regular",l),n.toggleClass("tve-dropdown",!l),n.find("li.menu-item").toggleClass("tcb-menu-img-hamburger",!l),r&&l&&c)return void a.ensureOnScreenDropdown(n);n.toggleClass("tve-regular",l),n.toggleClass("tve-dropdown",!l);const u=n.find(":not(.tve-ham-wrap) > ul.tve_w_menu, .tve-ham-wrap");if(l)a.ensureRegularLogoSplit(n),n.find("ul").removeAttr("style"),n.find("li").removeClass("expand-children"),n.find(".tve-m-expanded").removeClass("tve-m-expanded"),u.removeAttr("style"),setTimeout(()=>n.find(".tcb-masonry").masonry(),1e3);else{if(a.ensureHamburgerLogoSplit(n),n.find(".tcb-masonry").each(function(){const t=e(this);t.data("masonry")&&t.masonry("destroy")}),!n.data("calc-dimensions")){n.find(".sub-menu").slideDown(0).slideUp(0).removeAttr("style"),n.data("calc-dimensions",!0);const t=u.attr("style","height: auto !important;max-height:none !important").outerHeight();u.removeAttr("style"),n.data("calc-height",t)}t?a.toggleState(n,!1):a.reposition(n)}a.ensureOnScreenDropdown(n)})},isHamburger(t){const e=s(t);return e.length>0&&e.attr("class").includes("tve-custom-menu-switch-icon-")},isVertical(t){const e=s(t);return e.length>0&&e.find(".tve_vertical").length>0},toggleState(t,e,i=100){const o=s(t),l=o.find("ul").first();let r=o.find(".tve-ham-wrap");0===r.length&&(r=l);const d=r.hasClass("tve-m-expanded");let c=!d;if(!this.hasVisibleItems(l))return o;if(void 0!==e&&(c=e),c===d)return o;if(o.hasClass("tve-mobile-side-fullscreen")&&n.$body.toggleClass("tve-fullscreen-menu",c),o.find(".tve-m-trigger").toggleClass("tve-triggered-icon",e),c?o.parents(".tcb-mp").addBack().css("z-index",800):setTimeout(()=>{a.zIndexOrder()},100),!o.hasClass("tve-mobile-dropdown")){if(c&&tve_frontend_options.is_editor_page){const t=o.find(".tve-m-trigger");t.hasClass("close-offscreen-icon-available")||t.append(t.find(".tcb-icon-close").clone().removeClass("tcb-icon-close").addClass("tcb-icon-close-offscreen")).addClass("close-offscreen-icon-available ")}return r.toggleClass("tve-m-expanded",e).removeAttr("style"),o}if(c){r.css("display","flex");const t=this.getMenuPositionalParent(o),e=parseInt(o.data("calc-height")||"500")+"px",s=n.getDisplayType(),a=n.getMediaAttr(o,"data-dropdown-position",s),l="full"===a?window.innerWidth||document.documentElement.clientWidth:t.outerWidth(),d=this.getMenuDropdownPosition(o,r,l);r.attr("style",`visibility: visible;display: flex;margin-left: 0 !important;${d}width:${l}px !important;max-height:${e}px`),r.addClass("tve-m-expanded");const c=o.hasClass("tve-mobile-dropdown");"tablet"===s&&c&&["full","left","right","center"].includes(a)&&requestAnimationFrame(()=>{const t=r.outerWidth(),e=this.calculateViewportBasedPosition(a,t,l,o);r.css("left",`${e}px`)}),setTimeout(()=>{r.css("max-height","none")},i)}else o.data("calc-height",r.outerHeight()),r.stop().slideUp(i,()=>{r.removeClass("tve-m-expanded").removeAttr("style"),r.css("visibility","hidden")});return o},calculateViewportBasedPosition(t,e,n,i){const o=i.offset(),s=window.innerWidth||document.documentElement.clientWidth;let a;if("left"===t)a=-o.left;else if("right"===t)a=s-o.left-e;else if("full"===t&&e>=n)a=-o.left;else{const t=e/2;a=s/2-o.left-t}return a},getEffectiveMenuWidth(t,e){let n=e;const i=t.find(".tve_w_menu").first(),o=i.length>0?i:t;let s=o.css("max-width");if((!s||"none"===s)&&window.getComputedStyle&&o[0]){const t=window.getComputedStyle(o[0]).getPropertyValue("--tve-set-max-width");t&&(s=t.trim())}if(s&&"none"!==s){const t=parseFloat(s);!isNaN(t)&&t<e&&(n=t)}return n},getMenuDropdownPosition(t,e,i){const o=n.getDisplayType();let s=n.getMediaAttr(t,"data-dropdown-position",o);const a=t.find(".tve-m-trigger .tcb-icon-close"),l=a.offset(),r=t.offset();let d="";const c=t.hasClass("tve-mobile-dropdown");switch(e.is("ul")&&(e=this.getMenuPositionalParent(t),s="full"),"mobile"===o&&(s="full"),s){case"left":d="tablet"===o&&c?`left:${-r.left}px;right:unset;`:`right: ${parseInt(r.left+t.outerWidth()-l.left-a.outerWidth())}px;left: unset;`;break;case"right":if("tablet"===o&&c){const t=i;d=`left:${(window.innerWidth||document.documentElement.clientWidth)-r.left-t}px;right:unset;`}else d=`left: ${parseInt(l.left-r.left)}px;right:unset;`;break;case"full":if("tablet"===o&&c){const t=window.innerWidth||document.documentElement.clientWidth,n=this.getEffectiveMenuWidth(e,i);if(n>=i)d=`left:${-r.left}px;`;else{const e=n/2;d=`left:${t/2-r.left-e}px;`}}else d=`left:${this.getMenuPositionalParent(t).offset().left-r.left}px;`;break;default:if("tablet"===o&&c){const t=(window.innerWidth||document.documentElement.clientWidth)/2,n=this.getEffectiveMenuWidth(e,i)/2;d=`left:${t-r.left-n}px;`}else{if(void 0!==s&&1===parseInt(t.attr("data-offscreen-width-setup"))){let t=e.css("max-width");(t.includes("%")||"none"===t)&&(t=e.outerWidth()),i=Math.min(i,parseInt(t))}d=`left: ${parseInt(l.left-r.left-i/2+a.outerWidth()/2)}px;right:unset;`}}return d},getMenuPositionalParent:t=>t.closest(".tve-page-section-in, #tve_editor, #wrapper, .section-content"),reposition(t){const e=s(t),i=e.find(".tve-m-expanded").first(),o=i.length>0;if(e.find(".tve-m-trigger").toggleClass("tve-triggered-icon",o&&e.attr("class").includes("tve-mobile-")),o&&e.hasClass("tve-mobile-dropdown")){const t=this.getMenuPositionalParent(e),o=parseInt(e.data("calc-height")||"500")+"px",s=n.getDisplayType(),a=n.getMediaAttr(e,"data-dropdown-position",s),l="full"===a?window.innerWidth||document.documentElement.clientWidth:t.outerWidth(),r=this.getMenuDropdownPosition(e,i,l);let d=i.css("display");"none"===d&&(d="flex"),i.attr("style",`visibility: visible;margin-left: 0 !important;${r}width:${l}px !important;max-height:${o}px;display:${d}`);const c=e.hasClass("tve-mobile-dropdown");"tablet"===s&&c&&["full","left","right","center"].includes(a)&&requestAnimationFrame(()=>{const t=i.outerWidth(),n=this.calculateViewportBasedPosition(a,t,l,e);i.css("left",`${n}px`)}),setTimeout(()=>{i.css("max-height","none")},100)}return e},closeAll(){e(".thrv_widget_menu").each((t,e)=>{a.toggleState(e,!1)})},positionLogo(t){(t||n.$body).find(".tcb-menu-logo-wrap").each((t,n)=>{const i=e(n),o=i.siblings(),s=Math.floor(o.length/2);o.eq(s).before(i)})},ensureLogoSplit(t){const e=s(t);e.hasClass("tcb-logo-split")&&(a.isHamburger(e)?a.ensureHamburgerLogoSplit(t):a.ensureRegularLogoSplit(t))},ensureHamburgerLogoSplit(t,n=s(t).find("li.tcb-menu-logo-wrap")){const i=s(t);if(n.children().length){i.find(".tcb-hamburger-logo").remove();const t=e('<div class="tcb-hamburger-logo"></div>');t.append(n.children()),i.find(".thrive-shortcode-html").prepend(t)}},ensureRegularLogoSplit(t){const e=s(t),n=e.find(".tcb-hamburger-logo .tcb-logo"),i=e.find("li.tcb-menu-logo-wrap");n.length&&i.length&&i.empty().append(n),a.handleLogoOverflow(e)},handleLogoOverflow(t){const e=t.find("li.tcb-menu-logo-wrap");if(e.length)if(a.menuOverflows(t)){const t=e.outerHeight(!0),n=e.outerWidth();e.closest(".thrive-shortcode-html").css("padding-top",t+"px"),e.css({top:`-${t}px`,left:`calc(50% - ${Math.round(n/2)}px)`,position:"absolute"})}else e.removeAttr("style"),e.closest(".thrive-shortcode-html").css("padding-top","");else t.find(".thrive-shortcode-html").css("padding-top","")},menuOverflows(t){let n=0;return t.find(".tve_w_menu > li").each(function(){n+=e(this).outerWidth(!0)}),n>t.parent().width()-5},addMutationListener(t){const e=s(t);let i;const o=()=>{cancelAnimationFrame(i),i=requestAnimationFrame(a.handleLogoOverflow.bind(this,e))};if(window.ResizeObserver){const t=e.find("ul.tve_w_menu")[0];if(!t)return;const i=new ResizeObserver(o);if(!e.data("resize-observer")){i.observe(t),e.data("resize-observer",i);const n=new MutationObserver(t=>{Array.from(t).forEach(t=>{t.target.classList.contains("tcb-menu-logo-wrap")||"UL"===t.target.tagName&&"childList"===t.type&&t.addedNodes.length&&Array.from(t.addedNodes).forEach(t=>n.observe(t,{attributes:!0}))}),e.hasClass("tve-regular")&&o()});e.find(".tve_w_menu > li:not(.tcb-menu-logo-wrap)").each((t,e)=>{n.observe(e,{attributes:!0})})}const s=e.find("li.tcb-menu-logo-wrap");if(s.length&&!s.data("resize-observer")&&(s.data("resize-observer",i),i.observe(s[0])),e.hasClass("tcb-mega-std")&&!e.data("mega-resize-observer")){let t;const i=new ResizeObserver(()=>{cancelAnimationFrame(t),t=requestAnimationFrame(a.handleMegaMenuPosition.bind(this,e))});e.find(".tcb-mega-drop").each((t,e)=>{n.inlineCssVariable(e,"top","var(--mega-menu-top,100%)")}),i.observe(e[0]),e.data("mega-resize-observer",i)}}},handleMegaMenuPosition(t){const e=t.find(".tve_w_menu");if(e.length){const i=t[0].getBoundingClientRect().bottom,o=getComputedStyle(e[0]),s=parseInt(o.getPropertyValue("border-bottom-width"));t.find(".menu-item.menu-item-has-children.lvl-0").each((t,e)=>{const o=e.getBoundingClientRect().bottom,a=i-o-s;a>0?n.inlineCssVariable(e,"--mega-menu-top",`calc(100% - ${a}px)`):n.inlineCssVariable(e,"--mega-menu-top","")})}},ensureOnScreenDropdown(t){const i=s(t),o=i.hasClass("tve-regular"),a=i.hasClass("tve-vertical-menu"),l=i.offset().left+i.outerWidth();i.find("li:last-child > ul").each((t,n)=>{const i=e(n),s=i.offset().left+i.outerWidth();Math.ceil(s-l)>=0&&o&&s<i.outerWidth()?i.css({left:"auto",right:"0px"}):i.css({left:"",right:""})}),o||a?i.find(".tve_w_menu > li li").each((t,e)=>{let i;a&&(i=e.parentNode.closest("li"),i&&i.classList.add("expand-children"));const s=e.getBoundingClientRect();let l=parseFloat(e.getAttribute("data-init-width"));if(l||(l=s.width,e.setAttribute("data-init-width",l)),l+s.left>document.body.offsetWidth){const t=document.body.offsetWidth-s.left,i=l-t;o&&l>t&&n.inlineCssVariable(e.parentNode,{left:`calc(100% - ${i}px)`})}else n.inlineCssVariable(e,{"max-width":"","min-width":""});i&&i.classList.remove("expand-children")}):i.find(".tve_w_menu > li li").each((t,e)=>{n.inlineCssVariable(e,{"max-width":"","min-width":""})})}};e(window).on("tcb_after_dom_ready",()=>a.init()),window.addEventListener("load",()=>a.init()),window.TCB_Front.menu=a,t.exports=a,TCB_Front.setModuleLoadedStatus("menu",!0)}(ThriveGlobal.$j,TCB_Front)}},e={};!function n(i){var o=e[i];if(void 0!==o)return o.exports;var s=e[i]={exports:{}};return t[i](s,s.exports,n),s.exports}(74208)})();
(()=>{var t={72484(t,e,o){((e,n)=>{const s=o(21715),a=o(44281),i={init:()=>{TCB_Front.Utils.isEditorPage()||(e(".thrv_social.thrv_social_custom").each((t,o)=>i.initUI(e(o))),i.initButtons(),e("body").on("click",".thrv_social_custom:not(.thrv_social_follow):not(.thrv_author_follow) .tve_s_item",function(){const t=e(this),o=t.attr("data-s");a[o]&&a[o](t)}),e(".thrv_social_follow").each((t,o)=>{let n=!0;e(o).find(".tve_s_item").each((t,o)=>{const s=e(o);s.find("a").attr("href")?n=!1:s.hide()}),n&&o.style.setProperty("display","none","important")})),s.initShareCounts()},initUI:t=>{const e=n.Utils.jsonParse(t,"data-device-config"),o=n.getDisplayType();if(e[o]){const n=e[o],s=n.button_type||"tve_social_itb",a=1===parseInt(n.isFullWidth),i=n.showCount,r=1===parseInt(n.isVertical),c=t.find(".tve_social_items").attr("class").replace(/(tve_social_items|tve_social_custom)/g,"").match(/(\s+)?tve_social_([a-z]{2,3})/),d=c?"tve_social_"+c[2]:"tve_social_itb";d!==s&&t.find(".tve_social_items").removeClass(d).addClass(s),a&&t.toggleClass("tcb-social-full-width",a),0===parseInt(i)&&t.find(".tve_s_share_count").remove(),n.isVertical&&t.toggleClass("tcb-social-vertical",r)}},initButtons:()=>{window.FB&&setTimeout(function(){e(".thrv_social_default .tve_s_fb_share, .thrv_social_default .tve_s_fb_like").each(function(){FB.XFBML.parse(this)})},200)}};window.TCB_Front.onSocialCustomClick=a,t.exports=i})(ThriveGlobal.$j,TCB_Front)},44281(t){const e={wnd(t,e,o){const n=void 0!==window.screenLeft?window.screenLeft:screen.left,s=void 0!==window.screenTop?window.screenTop:screen.top;let a,i;a=window.innerWidth?window.innerWidth:document.documentElement.clientWidth?document.documentElement.clientWidth:screen.width,i=window.innerHeight?window.innerHeight:document.documentElement.clientHeight?document.documentElement.clientHeight:screen.height;const r=a/2-e/2+n,c=i/2-o/2+s,d=window.open(t,"Thrive Share","scrollbars=yes,resizable=yes,toolbar=no,menubar=no,scrollbars=no,location=no,directories=no,width="+e+", height="+o+", top="+c+", left="+r);return window.focus&&d.focus(),d},fb_share(t){const o=t.data();if(o.href||(o.href=location.href),o.type&&"feed"!==o.type)e.wnd("https://www.facebook.com/sharer/sharer.php?u="+encodeURIComponent(o.href),650,500);else{let t="";o.name&&(t+="&title="+encodeURIComponent(o.name)),o.description&&(t+="&description="+encodeURIComponent(o.description)),o.href&&(t+="&u="+encodeURIComponent(o.href)),o.caption&&(t+="&caption="+encodeURIComponent(o.caption)),o.image&&(t+="&picture="+encodeURIComponent(o.image)),t="?"+t.substr(1),e.wnd("https://www.facebook.com/sharer.php"+t,650,500)}return!1},t_share(t){const o=t.data();o.href||(o.href=location.href),e.wnd("https://twitter.com/intent/tweet?url="+encodeURIComponent(o.href)+(o.tweet?"&text="+encodeURIComponent(o.tweet):"")+(o.via?"&via="+o.via:""),550,450)},x_share(t){const o=t.data();o.href||(o.href=location.href),e.wnd("https://x.com/intent/tweet?url="+encodeURIComponent(o.href)+(o.post?"&text="+encodeURIComponent(o.post):"")+(o.via?"&via="+o.via:""),550,450)},in_share(t){const o=t.data();o.href||(o.href=location.href),e.wnd("https://www.linkedin.com/shareArticle?mini=true&url="+encodeURIComponent(o.href),550,400)},pin_share(t){const o=t.data();o.href||(o.href=location.href),e.wnd("https://pinterest.com/pin/create/button/?url="+encodeURIComponent(o.href)+(o.media?"&media="+encodeURIComponent(o.media):"")+(o.description?"&description="+encodeURIComponent(o.description):""),600,600)},xing_share(t){const o=t.data();o.href||(o.href=location.href),e.wnd("https://www.xing.com/spi/shares/new?url="+encodeURIComponent(o.href),600,500)},bluesky_share(t){const o=t.data();o.href||(o.href=location.href),e.wnd("https://bsky.app/intent/compose?text="+(o.post?encodeURIComponent(o.post)+" ":"")+encodeURIComponent(o.href)+(o.via?"&via="+o.via:""),550,450)}};t.exports=e},21715(t){(e=>{const o={initShareCounts:()=>{!window.TVE_Dash||TVE_Dash.ajax_sent?o.getShareCounts():TCB_Front.$document.on("tve-dash.load",function(){const t=o.getShareCounts(e("body"),{},!0);t&&TVE_Dash.add_load_item("tcb_social",t[0],t[1])})},getShareCounts:(t,o,n)=>{const s=(t=t||e("body")).find(".tve_social_items.tve_social_custom");if(!s.length)return;const a={action:"tve_social_count",for:[]};if(void 0!==o?e.each(o,function(t,e){a[t]=e}):"undefined"!=typeof tve_path_params&&tve_path_params.post_id&&(a.post_id=tve_path_params.post_id),s.each(function(t){const o=e(this),n={};if(o.data("tve-social-counts")||!o.hasClass("tve_social_cb")&&"1"!==o.parent().attr("data-counts"))return void o.data("tve-social-counts",1);o.data("tve-social-counts",1);const s=o.prev(".tve_s_share_count"),i=o.children(".tve_s_item").each(function(){const t=e(this).addClass("tve_count_loading");n[t.attr("data-s")]=t.attr("data-href")});if(n.hasOwnProperty("x_share")&&1===i.length)return i.removeClass("tve_count_loading"),s.remove(),void o.parent().removeAttr("data-counts");a.for[t]=n}),!a.for.length)return null;TCB_Front.total_share_counts={};const i=function(t){t&&t.counts&&t.totals&&s.each(function(o){const n=e(this),s=n.prev(".tve_s_share_count"),a=n.children(".tve_s_item");e.each(t.counts[o],function(t,e){a.filter(".tve_s_"+t).find(".tve_s_count").html(e.formatted)}),a.removeClass("tve_count_loading");let i=s.length?window.getComputedStyle(s[0]).display:"flex";if(t.totals&&t.totals[o]&&"1"===n.parent().attr("data-counts")){let e=parseInt(n.parent().attr("data-minShares"));e=isNaN(e)?0:e,s.find(".tve_s_cnt").html(t.totals[o].formatted),parseInt(tve_frontend_options.is_editor_page)||(i=e<t.totals[o].value?"flex"===i?"flex":"inline-block":"none",s.css("cssText",`display: ${i} !important;`))}t.totals&&t.totals[o]&&(TCB_Front.total_share_counts[a.attr("data-href")]=t.totals[o])})};if(void 0!==n&&n)return[a,i];e.ajax({type:"post",xhrFields:{withCredentials:!0},url:tve_frontend_options.ajaxurl,data:a,dataType:"json"}).done(i)}};window.TCB_Front.getShareCounts=o.getShareCounts,t.exports=o})(ThriveGlobal.$j)}},e={};function o(n){var s=e[n];if(void 0!==s)return s.exports;var a=e[n]={exports:{}};return t[n](a,a.exports,o),a.exports}void 0===TCB_Front.js_modules["social-share"]&&TCB_Front.setModuleLoadedStatus("social-share",!1),(t=>{if(TCB_Front.isModuleLoaded("social-share"))return;const e=o(72484);t(window).on("tcb_after_dom_ready",()=>e.init()),TCB_Front.setModuleLoadedStatus("social-share",!0)})(ThriveGlobal.$j)})();
(()=>{var t={65017(t){!function(e){const i={};let a,o=!1;function n(t,e){const i=e?t.parents(".safari-ios-decoration-fix"):t.parents(".safari-ios-decoration-fix-none");t.toggleClass("tcb-no-perspective",e),i.toggleClass("safari-ios-decoration-fix",!e).toggleClass("safari-ios-decoration-fix-none",e)}function r(t,e){const i=t.parents(".tve_ea_thrive_animation");i.length&&i.toggleClass("tcb-no-transform",e)}i.init=function(){a=i.videoScrolled.bind(this),document.addEventListener("scroll",a),e(".tcb-float-close-button").each((t,e)=>{e.addEventListener("click",i.closeFloatVideo.bind(this,e),!1)})},i.destroyFloating=function(){document.removeEventListener("scroll",a),e(".tcb-float-close-button").each((t,e)=>{e.removeEventListener("click",i.closeFloatVideo.bind(this,e))})},i.closeFloatVideo=function(t){e(t).parent(".tcb-video-float-container").addClass("tcb-float-closed"),i.videoScrolled()},i.videoScrolled=function(){e('.thrv_responsive_video[data-float="true"] .tcb-video-float-container iframe, .thrv_responsive_video[data-float="true"] .tcb-video-float-container video, .thrv_responsive_video[data-float="true"] .tcb-video-float-container .tve_responsive_video-no_video').each((t,i)=>{const a=e(i),s=a.parents(".tcb-video-float-container"),c=a.parents(".thrv_responsive_video"),d=c.attr("data-float-position"),l=c.find(".video_overlay_image").attr("style")||"";let u=TCB_Front.getDisplayType()[0],p=parseInt(e("#wpadminbar").height());if(s.hasClass("tcb-float-closed")||!function(t){if(t.parents(".tcb-post-list").length)return!1;const e="true"===t.attr("data-float"),i=t.attr("data-float-visibility");if(e&&!i)return!0;const a=TCB_Front.getDisplayType();return-1===i.indexOf(a)}(c)||TCB_Front.isInViewport(a.parents(".thrv_responsive_video"),parseInt(a.width))){if(s.removeClass(d).css({width:"",height:"","margin-top":""}).parents(".tcb-col,.thrv-content-box,.thrv-page-section,#content,.theme-section").css("z-index",""),c.find(".video_overlay_image").removeClass(d).css({cssText:l,height:"",width:""}),!o){const t=c.position().left,e={left:t,right:t+c.width()};d.includes("top")||d.includes("keep")?(e.top=-parseInt(c.attr(`data-float-width-${u}`)),s.css(e)):d.includes("bottom")&&(e.bottom=parseInt(TCB_Front.Utils.windowWidth()),s.css(e)),c.find(".video_overlay_image").css({top:"",left:"",bottom:"",right:"","margin-top":""}),o=!0}n(c,!1),r(c,!1)}else{void 0===c.attr(`data-float-width-${u}`)&&("m"===u&&(c.attr("data-float-width-m",TCB_Front.$window.width()+"px;"),c.attr("data-float-padding1-m",0),c.attr("data-float-padding2-m",0),p=0),"t"===u&&(u="d"));const t="height: "+function(t){const e=parseFloat(t.height()/t.width()).toFixed(2),i=TCB_Front.getDisplayType()[0],a=t.attr(`data-float-width-${i}`)||t.attr("data-float-width-d"),o=parseInt(a)*e;return a.includes("px")?o+"px":o*TCB_Front.$body.width()/100+"px"}(c)+" !important;",e="width: "+c.attr(`data-float-width-${u}`)+" !important;";let i="";if(d.includes("keep-original")){const t=c.attr(`data-float-padding1-${u}`);TCB_Front.Utils.hasAdminBar()&&p&&(i+=`margin-top: ${p}px;`),i+=`top: ${t} !important; `}else d.split("-").forEach((t,e)=>{const a=c.attr(`data-float-padding${e+1}-${u}`);TCB_Front.Utils.hasAdminBar()&&t.includes("top")&&p&&(i+=`margin-top: ${p}px;`),i+=`${t}: ${a} !important; `});d&&(s.addClass(d).css({cssText:e+t+i}).parents(".tcb-col,.thrv-content-box,.thrv-page-section,#content,.theme-section").css("z-index",(TCB_Front.highestZIndex||0)+10),a.css("height",""),c.find("video").length&&function(t){t.find("video").css({"object-fit":"cover",height:"100%"})}(c),c.find(".video_overlay_image").addClass(d).css({cssText:l+e+t+"z-index:100000 !important; top:inherit; left:inherit; bottom:inherit; right: inherit; margin-top: inherit;"}),n(c,!0),r(s,!0),o=!1)}})},i.restoreFloatingVideos=function(){e(".thrv_responsive_video").each((t,i)=>{const a=e(i),o=a.find(".tcb-video-float-container"),n=a.attr("data-float-position"),r=a.find(".video_overlay_image").attr("style")||"";o.removeClass(n).css({width:"",height:""}),a.find(".video_overlay_image").removeClass(n).css({cssText:r,height:"",width:"",top:"",left:"",bottom:"",right:"","margin-top":""})})},t.exports=i}(ThriveGlobal.$j)},93890(t,e,i){t.exports=(t,e)=>{const a='.tcb-video-cover:not([data-preload="1"]) .tcb-video-cover-image',o=i(82368)(t,e),n=i(23814),r=[];class s{static initVideoLazyLoad(e){const i=e.find(".thrv_responsive_video.tcb-lazy-load");0!==i.length&&(TCB_Front.add_scroll_callback(e=>{e>0&&i.each((e,i)=>{const o=t(i);if(s.hasVideoCover(o)){const t=o.find(a);t.length>0&&s.lazyLoadThumbnail(t)}else s.lazyLoadVideo(o,"external"===i.dataset.type)})}),i.each((e,i)=>{const a=t(i);a.off("click").on("pointerover",()=>s.preconnectAssets(a)).on("click",()=>s.lazyLoadVideo(a,"external"===i.dataset.type,!0))}))}static preventIframeLoad(e,i,a){const o=t(i).closest(".thrv_responsive_video");return a&&!TCB_Front.Utils.isEditorPage()&&s.shouldLazyLoad(o)&&(e=!0),e}static shouldLazyLoad(t){return t.hasClass("tcb-lazy-load")&&(s.hasVideoCover(t)||!TCB_Front.isInViewport(t,-150)||s.isInsideScreenFiller(t))}static isInsideScreenFiller(t){return"hidden"===t.closest(".tve-leads-screen-filler").css("visibility")}static hasVideoCover(t){return t.find(".video_overlay_image, .tcb-video-cover").length>0}static lazyLoadVideo(e,i=!1,a=!1){const o=e.find(i?"source":"iframe"),n=o.attr("src");if(o.hasClass("tcb-video-lazy-loaded")||n&&n.length>0||!e.is(":visible")||s.isInsideScreenFiller(o)||!TCB_Front.isInViewport(e,-150)&&!a)return;o.hasClass("vooplayer")&&!TCB_Front.vooplayerScriptsLoaded&&(t.getScript("https://s3.spotlightr.com/assets/vooplayer.js"),TCB_Front.vooplayerScriptsLoaded=1);let r=o.attr("data-src");r&&"null"!==r&&(r=TCB_Front.Hooks.applyFilters("tcb.video.lazy_load.src",r,e),o.attr("src",r),i&&o.closest("video")[0].load()),o.removeAttr("data-src").addClass("tcb-dr-done tcb-video-lazy-loaded"),a&&TCB_Front.onVideoClick(e)}static lazyLoadThumbnails(e){e.find(a).each((e,i)=>{const a=t(i);a.closest(".tcb-lazy-load").length>0&&s.lazyLoadThumbnail(a)})}static lazyLoadThumbnail(t){if(!TCB_Front.Utils.isEditorPage()&&(t.hasClass("tcb-src-loaded")||!t.is(":visible")||!TCB_Front.isInViewport(t.closest(".thrv_responsive_video"),-250)))return;const e=t.attr("data-src");e&&"null"!==e&&t.attr("src",e),t.removeAttr("data-src"),TCB_Front.Utils.isEditorPage()||t.addClass("tcb-src-loaded")}static preconnectAssets(t){const e=t.attr("data-type");if(r.includes(e))return;let i=[];switch(e){case"youtube":i=o.getAssetsToPreconnect();break;case"vimeo":i=s.getVimeoAssetsToPreconnect();break;case"wistia":i=s.getWistiaAssetsToPreconnect();break;case"external":const e=t.find("source").attr("data-src");void 0!==e&&(i=[new URL(e).origin]);break;case"vooplayer":i=n.getAssetsToPreconnect()}i.forEach(t=>s.addPreconnectLink(t)),r.push(e)}static addPreconnectLink(t){const e=document.createElement("link");e.rel="preconnect",e.href=t,document.head.append(e)}static getVimeoAssetsToPreconnect(){return["https://f.vimeocdn.com","https://player.vimeo.com","https://i.vimeocdn.com"]}static getWistiaAssetsToPreconnect(){return["https://fast.wistia.net"]}}return s}},49814(t,e,i){t.exports=(t,e)=>{const a=i(42166),o=i(82368)(t,e),n=i(23814),r=i(70025)(t,e),s=i(93890)(t,e);class c{static get identifier(){return".thrv_responsive_video"}static init(){c.initHooks()}static initHooks(){t(e).on("tcb_after_dom_ready",()=>c.onDomReady()).on("tcb_after_lightbox_open",(e,i)=>{t(i).find(`${c.identifier}:not([data-type="dynamic"])`).each((e,i)=>c.autoplayVideo(t(i)))}).on("tcb_before_lightbox_close",(e,i)=>c.pauseVideos(t(i))).on("tcb_on_content_hide",(e,i)=>c.pauseVideos(t(i))).on("tve-content-revealed",(e,i)=>c.maybeAutoplayVideo(t(i))).on("tcb_toggle_open",(e,i)=>c.maybeAutoplayVideo(t(i))).on("tcb_toggle_close",(e,i)=>c.pauseVideos(t(i))).on("tcb_on_content_show",(e,i)=>c.maybeAutoplayVideo(t(i))).on("tve_after_content_toggle",(t,e,i)=>{i&&s.lazyLoadThumbnails(e)}),TCB_Front.Hooks.addFilter("tcb.is_iframe_load_prevented",s.preventIframeLoad)}static onDomReady(){const e=t("body");c.pauseVideos(t(".tve_p_lb_content")),c.pauseVideos(t(`${c.identifier}:hidden`)),o.onDomReady(),TCB_Front.Utils.isEditorPage()||(r.init(),c.maybeAutoplayVideo(e),c.initOnClickEvent(),s.initVideoLazyLoad(e)),n.onDOMReady(),t(".tcb-video-background-el").each((t,e)=>e.parentNode.classList.add("tcb-video-background-parent"))}static initOnClickEvent(){t(c.identifier).off("click.thumbnail").on("click.thumbnail",e=>c.onClick(t(e.currentTarget),e)),TCB_Front.$document.off("click.tcb-video-delegate").on("click.tcb-video-delegate",`${c.identifier}, ${c.identifier} *`,e=>{if(e.tcbVideoHandled)return;const i=t(e.target).closest(c.identifier);i.length&&(e.tcbVideoHandled=!0,c.onClick(i,e))})}static onClick(t,e){const i=t.find(c.overlaySelector),n=t.find(".tcb-video-float-container.tcb-float-closed").length>0,r=i.length>0&&i.is(":visible");let s=c.detectProvider(t);if(TCB_Front.Hooks.doAction("tcb.video.before_autoplay",t,s),a.isCustomProvider(s)){if(!r)return;if(n)return void(i.length>0&&i.fadeOut());switch(s){case"youtube":o.play(t);break;case"vimeo":a.playIframeVideo(t,i,c.vimeoAutoplayString);break;case"wistia":t.find("iframe").length>0?a.playIframeVideo(t,i,c.wistiaAutoplayString):c.playWistiaScriptEmbed(t);break;case"bunnynet":a.playIframeVideo(t,i,`${c.bunnynetAutoplayString}&${c.bunnynetMutedString}`)}const e=t.find('[data-reporting-enabled="1"]');e.length>0&&TCB_Front.Hooks.doAction("tcb.video.init_reporting",e)}else a.isSelfHosted(s)&&c.toggleHtmlVideoPlay(t,e);i.length>0&&i.fadeOut()}static toggleHtmlVideoPlay(e,i){if((e.find(".tcb-video-cover:visible").length>0||!TCB_Front.browser.safari)&&(void 0===i||0===t(i.target).closest(".tcb-float-close-button").length)){const a=e.find("video").get(0);function o(t){setTimeout(function(){a[t]()})}o(a.paused?"play":"pause")}}static maybeAutoplayVideo(e){let i;i=void 0===e?t(`${c.identifier}:not([data-type="dynamic"])`):e.find(`${c.identifier}:not([data-type="dynamic"])`),i.each((e,i)=>{const a=t(i);0===a.parents(".tve_p_lb_content").length&&c.autoplayVideo(a)})}static autoplayVideo(t){if(1!==parseInt(t.attr("data-autoplay")))return;const e=t.attr("data-type");let i="";switch(e){case"youtube":i=`&${o.autoplayString}&${o.mutedString}`;break;case"vimeo":i=`&${c.vimeoAutoplayString}&${c.vimeoMutedString}`;break;case"wistia":i=`&${c.wistiaAutoplayString}&${c.wistiaMutedString}`;break;case"bunnynet":i=`&${c.bunnynetAutoplayString}&${c.bunnynetMutedString}`}if(a.isCustomProvider(e)){const e=t.find("iframe");let a=e.attr("src")||e.attr("data-src");a&&0!==a.length&&-1===a.indexOf(i)&&(a.includes("?")?"?"===a.slice(-1)&&(i=i.substring(1)):i=`?${i.substring(1)}`,a+=i,e.attr({src:a,"data-src":a}))}else if(a.isSelfHosted(e)){const e=t.find("video").get(0);e&&(e.muted=!0,e.paused&&e.play())}}static pauseVideos(t){t.find("video").each((t,e)=>e.pause()),c.pauseProviderIframes(t)}static pauseProviderIframes(t){t.find("iframe").each((t,e)=>{try{const t=(e.getAttribute("src")||"").toLowerCase();(t.includes("youtube.com/embed")||t.includes("youtu.be"))&&e.contentWindow&&e.contentWindow.postMessage(JSON.stringify({event:"command",func:"pauseVideo",args:""}),"*")}catch(t){}}),t.find("iframe").each((t,e)=>{try{(e.getAttribute("src")||"").toLowerCase().includes("vimeo.com")&&e.contentWindow&&e.contentWindow.postMessage('{"method":"pause"}',"*")}catch(t){}}),t.find('.wistia_embed,[class*="wistia_async_"]').each((t,i)=>{try{const t=i.getAttribute("class")||"";let a=null;const o=t.match(/wistia_async_([a-zA-Z0-9]+)/);if(o&&(a=o[1]),!a){const t=(i.getAttribute("data-url")||"").match(/\/iframe\/([a-zA-Z0-9]+)/);t&&(a=t[1])}if(!a)return;if(e.Wistia&&"function"==typeof e.Wistia.api){let t;try{t=e.Wistia.api(a)}catch(t){}if(!t){const a=i.getAttribute("id");if(a)try{t=e.Wistia.api(a)}catch(t){}}if(t&&"function"==typeof t.pause){try{t.pause()}catch(t){}return}}e._wq=e._wq||[],e._wq.push({id:a,onReady:function(t){try{t.pause()}catch(t){}}})}catch(t){}});try{t.find(".wistia_embed video").each((t,e)=>{try{e.pause()}catch(t){}})}catch(t){}}static get vimeoAutoplayString(){return"autoplay=1"}static get vimeoMutedString(){return"muted=1"}static get wistiaAutoplayString(){return"autoPlay=true"}static get wistiaMutedString(){return"muted=true"}static get bunnynetAutoplayString(){return"autoplay=true"}static get bunnynetMutedString(){return"muted=false"}static get overlaySelector(){return".video_overlay_image, .tcb-video-cover"}static detectProvider(t){let e=t.find(".tcb-responsive-video").attr("data-provider")||t.attr("data-type");if(e&&"dynamic"!==e)return e;const i=(t.find("iframe").attr("src")||t.find("source").attr("src")||"").toLowerCase();return i.includes("youtube")||i.includes("youtu.be")?"youtube":i.includes("vimeo")?"vimeo":i.includes("wistia")?"wistia":i.includes("bunnycdn")||i.includes("mediadelivery")?"bunnynet":t.find('.wistia_embed,[class*="wistia_async_"]').length>0?"wistia":e}static playWistiaScriptEmbed(t){const i=t.find('.wistia_embed,[class*="wistia_async_"]').first();if(0!==i.length){e._wq=e._wq||[];try{const a=i.attr("class")||"";let o=null;const n=a.match(/wistia_async_([a-zA-Z0-9]+)/);if(n&&(o=n[1]),!o){const e=(i.attr("data-url")||t.attr("data-url")||"").match(/\/iframe\/([a-zA-Z0-9]+)/);e&&(o=e[1])}if(o&&e.Wistia&&"function"==typeof e.Wistia.api){let t;try{t=e.Wistia.api(o)}catch(t){}if(!t){const a=i.attr("id");if(a)try{t=e.Wistia.api(a)}catch(t){}}if(t){try{"function"==typeof t.unmute?t.unmute():"function"==typeof t.volume&&t.volume(1)}catch(t){}try{t.play()}catch(t){}return}}o&&e._wq.push({id:o,onReady:function(t){try{"function"==typeof t.unmute?t.unmute():"function"==typeof t.volume&&t.volume(1)}catch(t){}try{t.play()}catch(t){}}})}catch(t){}}}}return window.TCB_Front.playBackgroundYoutube=o.playBackgroundVideos,window.TCB_Front.refreshBackgroundYoutube=o.refreshBackgroundVideos,window.TCB_Front.onVideoClick=c.onClick,window.TCB_Front.changeAutoplayVideo=c.maybeAutoplayVideo,window.TCB_Front.makeAutoplayVideo=c.autoplayVideo,window.TCB_Front.Video=c,window.TCB_Front.floating=i(65017),c}},70025(t,e,i){t.exports=(t,e)=>{const a=i(82368)(t,e);let o=null;class n{static init(){t('div[data-reporting-enabled="1"], iframe[data-reporting-enabled="1"]').each((e,i)=>n.initVideo(t(i))),TCB_Front.Hooks.addAction("tcb.video.init_reporting",t=>n.initVideo(t))}static initVideo(t){if(t.data("tcb-video-initialized"))return;t.data("tcb-video-initialized",1);const e=t.attr("data-type");let i,r=0,s=0,c=["custom","external"].includes(e)?t.find("source").attr("src"):t.attr("data-url"),d=null;c=c.replace("#t=0.1","");const l=()=>{const t="function"==typeof d?d():r+5,e=t=>{const e=Math.max(Number(t)||0,r);n.saveRange(r,e,c),r=e};t&&"function"==typeof t.then?t.then(e).catch(()=>{const t=r+5;n.saveRange(r,t,c),r=t}):e(t)},u={setCurrentTimeGetter:t=>{d=t},onPlay:t=>{s||(s=1,n.triggerVideoStart(c)),r=t,clearInterval(i),i=setInterval(l,5e3)},onPause:t=>{clearInterval(i),t>r&&n.saveRange(r,t,c)},onEnd:t=>{n.saveRange(r,t,c),clearInterval(i),TCB_Front.Hooks.doAction("tcb.video.on_end",o)},onBuffer:t=>{r=t,clearInterval(i),i=setInterval(l,5e3)}};switch(e){case"youtube":a.initReportingEvents(t,u);break;case"vimeo":n.initVimeoEvents(t,u);break;case"wistia":n.initWistiaEvents(t,u);break;case"custom":case"external":n.initHtmlEvents(t,u)}}static initVimeoEvents(i,a){if(void 0===e.Vimeo)return void t.getScript("https://player.vimeo.com/api/player.js",()=>n.initVimeoEvents(i,a));const o=0===i.find("iframe").length?i:i.find("iframe"),r=new e.Vimeo.Player(o);a.setCurrentTimeGetter(()=>r.getCurrentTime()),r.on("play",()=>r.getCurrentTime().then(a.onPlay)),r.on("pause",()=>r.getCurrentTime().then(a.onPause)),r.on("ended",()=>r.getCurrentTime().then(a.onEnd)),r.on("seeking",()=>r.getCurrentTime().then(a.onBuffer))}static initWistiaEvents(i,a){const o=i.find("iframe");let r=o.attr("data-code");if(0!==o.length)o.addClass("wistia_embed");else{const t=i.attr("data-url");r=t.substring(t.lastIndexOf("/")+1)}void 0!==e._wq?e._wq.push({id:r,onReady(t){a.setCurrentTimeGetter(()=>t.time()),t.bind("play",()=>a.onPlay(t.time())).bind("pause",()=>a.onPause(t.time())).bind("end",()=>a.onEnd(t.time())).bind("seek",()=>a.onBuffer(t.time()))}}):t.getScript("//fast.wistia.com/assets/external/E-v1.js",()=>n.initWistiaEvents(i,a))}static initHtmlEvents(t,e){const i=t.find("video"),a=()=>i[0].currentTime;e.setCurrentTimeGetter(a),i.on("play",()=>e.onPlay(a())).on("pause",()=>e.onPause(a())).on("ended",()=>e.onEnd(a()))}static triggerVideoStart(t){TCB_Front.Utils.restAjax({route:tve_frontend_options.routes.video_reporting+"/video_started",data:{video_url:t,user_id:tve_frontend_options.current_user.id,post_id:tve_frontend_options.post_id}})}static saveRange(t,e,i){var a;TCB_Front.Utils.restAjax({route:tve_frontend_options.routes.video_reporting+"/save_range",data:{video_url:i,user_id:null!==(a=tve_frontend_options.current_user.id)&&void 0!==a?a:0,post_id:tve_frontend_options.post_id,range_start:Math.round(t),range_end:Math.round(e)}}).done(t=>{o=t,TCB_Front.Hooks.doAction("tcb.video.after_save_range",t)})}}return n}},42166(t){const e=["youtube","vimeo","wistia","bunnynet"],i=["self","external","custom"];t.exports=class{static isCustomProvider(t){return e.includes(t)}static isSelfHosted(t){return i.includes(t)}static playIframeVideo(t,e,i){const a=t.find("iframe"),o=a.parent(),n=document.createElement("iframe"),r=TCB_Front.Utils.getAttr(a);a.remove(),r.allow?r.allow.toLowerCase().includes("autoplay")||(r.allow=`${r.allow}; autoplay`):r.allow="autoplay";let s=r.src||r["data-src"]||"";const c=i.split("=")[0];if(s){const t=new RegExp(`([?&])${c}=([^&#]*)`,"i");s=s.replace(t,(t,e)=>"?"===e&&s.substring(s.indexOf(t)+t.length).startsWith("&")?"?":""),s=s.replace(/\?&/,"?").replace(/[?&]$/,"")}const d=s.includes("?")?"&":"?",l=`${s}${s?d:""}${i}`;r.src=l,r["data-src"]=l;for(const t in r)try{n.setAttribute(t,r[t])}catch(e){console.warn(`${t} is an invalid attribute name`)}let u=!1;if(o.length)try{o.append(n),u=!0}catch(t){}if(!u)try{e.replaceWith(n),u=!0}catch(t){}if(u||t.find(".tve_responsive_video_container,.tcb-video-float-container").first().append(n),e.length)try{e.remove()}catch(t){}n.focus()}}},23814(t){(e=>{class i{static onDOMReady(){document.addEventListener("vooPlayerReady",i.playBackgroundVoo,!1),document.addEventListener("vooPlayerReady",i.changeVooOnPlay,!1),TCB_Front.Utils.isEditorPage()?e(".tcb-video-background-el iframe.tcb-voo-bg").each(function(){const t=TVE.inner_$(this),e=t.attr("src");t.attr("src",e)}):(e('.thrv_responsive_video[data-type="vooplayer"]').each((t,i)=>{const a=e(i),o=a.outerHeight(),n=a.find(".tcb-video-cover,.video_overlay_image"),r=a.find("iframe");n.length>0&&r.length>0&&(a.find(".video-skin-player").css("z-index","-1"),r.before(n.css({height:r.height(),"max-height":o})),r.css("max-height",o))}),TCB_Front.floating.init()),TCB_Front.Hooks.addAction("tcb.video.before_autoplay",(t,e)=>{"vooplayer"===e&&t.find(".video-skin-player").css("z-index","")})}static playBackgroundVoo(){e("iframe.tcb-voo-bg").each((t,e)=>{const i=()=>{vooAPI(e.dataset.playerid,"onEnded",null,i),vooAPI(e.dataset.playerid,"play"),vooAPI(e.dataset.playerid,"volume",[0])};i()})}static changeVooOnPlay(t=TCB_Front.$body){t&&t.jquery||(t=TCB_Front.$body),t.find("iframe.video-player-container").each((t,i)=>{const a=()=>{e(i).css("pointer-events",""),e(i).parent().find("#theImg").remove()};i.src?a():vooAPI(i.dataset.playerid,"onPlay",null,()=>{a()})})}static getAssetsToPreconnect(){return["https://s3.spotlightr.com"]}}t.exports=i,window.TCB_Front.changeVooOnPlay=i.changeVooOnPlay})(ThriveGlobal.$j)},65465(t){t.exports=(t,e)=>{class i{static initialize(t){e.onYouTubeIframeAPIReady=()=>{TCB_Front.youtubeApiFetched=1,t()},i.fetchIframeApi()}static isApiInitialized(){return 1===TCB_Front.youtubeApiFetched||void 0!==e.YT&&void 0!==e.YT.Player}static fetchIframeApi(){t.ajax({url:"https://www.youtube.com/iframe_api",type:"get",crossDomain:!0,cache:!0,dataType:"script"})}static getDefaultPlayerParameters(t,e=!1){const i={autoplay:1,cc_load_policy:0,controls:0,disablekb:1,fs:0,iv_load_policy:0,modestbranding:1,playsinline:1,rel:0,showinfo:0,playlist:t};return e&&(i.loop=1,i.listType="playlist"),i}static isPlaylist(t){return t&&34===t.length}static getAssetsToPreconnect(){return["https://www.youtube.com","https://www.google.com","https://googleads.g.doubleclick.net","https://static.doubleclick.net","https://www.gstatic.com"]}}return i}},69997(t,e,i){t.exports=(t,e)=>{const a=i(65465)(t,e),o=".tcb-yt-bg";class n{static resetVideo(t){const e=t.find(o);if(e.length>0){const t=e.closest(".tcb-video-background-el"),i=TVE.Components.background.controls.video.video_settings.get_embed_code("background");t.html(i),n.play(t.find(o))}}static play(e=t(`div${o}:visible`)){e.length&&(a.isApiInitialized()?e.each((e,i)=>{const o=i.getAttribute("data-yt-id");let n;n=a.isPlaylist(o)?new YT.Player(i.id,{playerVars:a.getDefaultPlayerParameters(o,!0),events:{onReady:t=>t.target.mute(),onStateChange:t=>t.target.mute()}}):new YT.Player(i.id,{videoId:o,playerVars:a.getDefaultPlayerParameters(o),events:{onReady:t=>{t.target.mute(),t.target.playVideo()},onStateChange:t=>{t.target&&t.target.mute&&t.target.mute(),t.data===(YT.PlayerState.ENDED||0)&&t.target.playVideo()}}}),TCB_Front.latestYoutubeBackgroundPlayerInstance=n,t(n.getIframe()).data("tcb-yt-player",n)}):a.initialize(()=>n.play(e)))}static refreshVideos(){e.YT&&e.YT.Player&&t(`iframe${o}`).each((e,i)=>{const a=t(i);a.data("tcb-yt-player")||n.play(a)})}}return n}},82368(t,e,i){t.exports=(t,e)=>{const a=i(69997)(t,e),o=i(65465)(t,e);class n{static onDomReady(){n.initHooks(),n.playBackgroundVideos()}static initHooks(){TCB_Front.Utils.isEditorPage()?(TVE.add_action("tcb.element.duplicate",(t,e)=>a.resetVideo(e)),["sync","activate","create_display"].forEach(t=>TVE.add_action(`tve.conditional_display.${t}`,t=>a.resetVideo(t)))):(TCB_Front.Hooks.addFilter("tcb.video.lazy_load.src",(t,e)=>(t.includes("&enablejsapi=1")||"youtube"!==e.attr("data-type")||(t+="&enablejsapi=1"),t)),TCB_Front.Hooks.addAction("tcb.video.before_autoplay",(e,i)=>{if("youtube"!==i)return;const a=e.find("iframe")[0];t.each(a.attributes,(t,e)=>{let i=!1;e&&e.name.includes("data-gtm-yt-inspected")&&(a.removeAttribute(e.name),i=!0),i&&a.removeAttribute("id")})}))}static play(e){if(!o.isApiInitialized())return void o.initialize(()=>n.play(e));const i=e.find("iframe"),a=t("<div>"),r=TCB_Front.Utils.getAttr(i),s=new URL(TCB_Front.Utils.addHttp(i.attr("src"))),c=i.attr("data-code")?i.attr("data-code"):s.pathname.replace("/embed/",""),d=Object.fromEntries(s.searchParams.entries());d.autoplay=1,i.remove(),e.find(".video_overlay_image, .tcb-video-cover").replaceWith(a),1===parseInt(e.attr("data-reporting-enabled"))&&TCB_Front.Hooks.doAction("tcb.video.init_reporting",e),TCB_Front.latestYoutubePlayerInstance=n.initYoutubePlayer(a,c,d),delete r.src;const l=e.find("iframe")[0];for(const t in r)try{l.setAttribute(t,r[t])}catch(e){console.warn(`${t} is an invalid attribute name`)}}static initYoutubePlayer(t,e,i){return new YT.Player(t[0],{videoId:e,playerVars:i,width:"100%",events:{onReady:t=>t.target.playVideo(),onError:t=>console.warn(t)}})}static initReportingEvents(t,e){if(!o.isApiInitialized())return void o.initialize(()=>n.initReportingEvents(t,e));let i=t.find("iframe")[0];if(0===t.find("iframe").length){const e=t.attr("src")+"&enablejsapi=1";t.attr("src",e),i=t[0]}new YT.Player(i,{events:{onStateChange:t=>{var i,a;const o=t.data,n=(null==t||null===(i=t.target)||void 0===i||null===(a=i.playerInfo)||void 0===a?void 0:a.currentTime)||0;switch(e&&"function"==typeof e.setCurrentTimeGetter&&t&&t.target&&"function"==typeof t.target.getCurrentTime&&e.setCurrentTimeGetter(()=>t.target.getCurrentTime()),o){case YT.PlayerState.PLAYING:e.onPlay(n);break;case YT.PlayerState.PAUSED:e.onPause(n);break;case YT.PlayerState.ENDED:e.onEnd(n);break;case YT.PlayerState.BUFFERING:e.onBuffer(n)}}}})}static playBackgroundVideos(t){a.play(t)}static refreshBackgroundVideos(){a.refreshVideos()}static getAssetsToPreconnect(){return o.getAssetsToPreconnect()}static get autoplayString(){return"autoplay=1"}static get mutedString(){return"mute=1"}}return window.TCB_Front.Youtube=n,n}}},e={};function i(a){var o=e[a];if(void 0!==o)return o.exports;var n=e[a]={exports:{}};return t[a](n,n.exports,i),n.exports}void 0===TCB_Front.js_modules.video&&TCB_Front.setModuleLoadedStatus("video",!1),(t=>{if(TCB_Front.isModuleLoaded("video"))return;const e=i(49814)(t,window);e.init(),window.TCB_Front.video=e,TCB_Front.setModuleLoadedStatus("video",!0)})(ThriveGlobal.$j)})();