(()=>{var t={33614(t,e,n){(t=>{const e=n(77129);t.fn.tocToggle=function(n="show"){const o=t(this),i=o.closest(".tve-toc"),a=o.siblings(".tve-toc-content"),s=i.attr("data-animation-speed"),r=i.attr("data-animation"),c=e.getAnimationFunctions(r);o.toggleClass("tve-state-expanded","show"!==n),c[n](a,s),i.toggleClass("tve-toc-collapsed","show"!==n)}})(ThriveGlobal.$j)},77129(t){ThriveGlobal.$j,TCB_Front,t.exports=class{static getAnimationFunctions(t,e){let n,o;switch(t){case"appear":n=function(t){return t.children(".tve-cb").removeAttr("style"),t.show()},o=function(t){return t.hide()};break;case"fade":n=function(t,e){return t.removeAttr("style").fadeIn(e)},o=function(t,e){return t.fadeOut(e)};break;case"slide-up":n=function(t){return t.children(".tve-cb").removeAttr("style").css({bottom:"100%",opacity:"0"}).animate({bottom:"0",opacity:"1"}).show(),t.show()},o=function(t){return t.children(".tve-cb").css({bottom:"0",opacity:"1"}).animate({bottom:"100%",opacity:"0"}).hide(),t.hide()};break;case"slide-down":n=function(t){return t.children(".tve-cb").removeAttr("style").css({top:"100%",opacity:"0"}).animate({top:"0",opacity:"1"}).show(),t.show()},o=function(t){return t.children(".tve-cb").css({top:"0",opacity:"1"}).animate({top:"100%",opacity:"0"}).hide(),t.hide()};break;case"slide":n=function(t,e){return t.removeAttr("style").slideDown(e)},o=function(t,e){return t.slideUp(e)};break;case"slide-right":n=function(t){return t.children(".tve-cb").removeAttr("style").css({opacity:"0",left:"100%"}).animate({left:"0",opacity:"1"}).show(),t.show()},o=function(t){return t.children(".tve-cb").css({opacity:"1",left:"0"}).animate({left:"100%",opacity:"0"}).hide(),t.hide()};break;case"slide-left":n=function(t){return t.children(".tve-cb").removeAttr("style").css({opacity:"0",right:"100%"}).animate({right:"0",opacity:"1"}).show(),t.show()},o=function(t){return t.children(".tve-cb").css({opacity:"1",right:"100%"}).animate({right:"0",opacity:"0"}).hide(),t.hide()};break;case"smooth-resize":n=function(t){const n=t.children(),o=t.data("contentHeight")||t.height();return n.css({height:e}).animate({height:o},500).promise().done(()=>{n.css("height","100%")}),t.show()},o=function(t){return t.data("contentHeight",t.height()),t.hide()};break;case"swing-up":n=function(t){return t.css({transform:"rotateX(-20deg)",opacity:0}).animate({transform:"rotateX(0)",opacity:1},300).promise().done(()=>{t.css({transform:"rotateX(0)",opacity:1})}),t.show()},o=function(t){return t.hide()};break;case"slide-fade":n=function(t,e){return t.animate({opacity:"toggle",height:"toggle"},e)},o=function(t,e){return t.animate({opacity:"hide",height:"hide"},e)};break;default:n=function(t){return t.show()},o=function(t){return t.hide()}}return{show:n,hide:o}}}}},e={};function n(o){var i=e[o];if(void 0!==i)return i.exports;var a=e[o]={exports:{}};return t[o](a,a.exports,n),a.exports}function o(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,o)}return n}function i(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?o(Object(n),!0).forEach(function(e){a(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function a(t,e,n){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 n=e.call(t,"string");if("object"!=typeof n)return n;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:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}void 0===TCB_Front.js_modules.toc&&TCB_Front.setModuleLoadedStatus("toc",!1),function(t,e){if(TCB_Front.isModuleLoaded("toc"))return;n(33614),window.addEventListener("load",()=>{o.initToc(e.$body,!!tve_frontend_options.is_editor_page)}),t(window).on("tcb_after_dom_ready",()=>{o.initToc(e.$body,!!tve_frontend_options.is_editor_page),t(".tve-toc-expandable").each((n,o)=>{const i=t(o),a=e.getMediaAttr(i,"data-state-default");i.data("tcbTocDone")||(i.find(".tve-toc-title").tocToggle("expanded"===a?"show":"hide"),i.data("tcbTocDone",!0))}),function(){const n=t(TCB_Front.Utils.isEditorPage()?"#tve_editor":"body");n.off("click.tvetoc").on("click.tvetoc",".tve-toc-expandable .tve-toc-title, .tve-toc-expandable .tve-toc-title *",function(n){const o=t(this).closest(".tve-toc-title");TCB_Front.Utils.isEditorPage()&&!o.hasClass("tve-prevent-content-edit")||(o.tocToggle(o.hasClass("tve-state-expanded")?"show":"hide"),n.preventDefault(),n.stopPropagation(),l(e.$body))}),n.on("click",".thrv_contents_table a, .tve-toc-content a",function(n){try{const o=this.getAttribute("href")||this.getAttribute("data-target"),i=t(o);if(i.length){if(n.preventDefault(),history&&history.pushState&&o&&"#"===o.charAt(0)){let t=location.href;t.indexOf("#")>-1&&(t=t.substring(0,t.lastIndexOf("#"))),history.pushState({},document.title,t+o)}return e.jumpScrollTo(i,this),!1}}catch(t){console.warn("ToC exception",t)}})}()});const o={};let a=!1,s=t(),r=!1,c=(new Date).getTime();function l(e){const n=t(".thrv_header.tve-scroll-sticky").outerHeight()||0,o=t("#wpadminbar").outerHeight()||0;e.find(".tve-toc.tve-elem-scroll").each((e,i)=>{const a=t(i),r={};a.is(".tve-toc-dynamic:not(.tve-rendered)")||(a.find(".tve-toc-heading .tve-jump-scroll").each((e,i)=>{const a=i.getAttribute("href")||i.getAttribute("data-target"),s=t(`${a}`);if(!s.length)return;const c=Math.max(0,s.offset().top-o-n);t(i).attr("data-targetOffset",c),r[c]?r[c].push(`[href="${a}"]`):r[c]=[`[href="${a}"]`]}),a.data("headers",r),s=s.add(a))})}function d(e){const n=t("#wpadminbar").outerHeight()||0;s.each((o,i)=>{const a=t(i),s=i.dataset.highlight,r=a.data("headers");Object.keys(r).sort((t,e)=>t-e).forEach(t=>{const o=a.find(r[t].join(",")).parent();"heading"===s?e+n>=t?(a.find(".tve-toc-heading.tve-state-expanded").removeClass("tve-state-expanded"),o.addClass("tve-state-expanded")):o.removeClass("tve-state-expanded"):"section"===s?e+n>=t?(a.find(".tve-toc-heading.tve-state-expanded").removeClass("tve-state-expanded"),o.is(".tve-toc-heading-level0")||(o.prevUntil(".tve-toc-heading-level0").addClass("tve-state-expanded"),o.prevAll(".tve-toc-heading-level0").first().addClass("tve-state-expanded")),o.addClass("tve-state-expanded")):o.removeClass("tve-state-expanded"):o.toggleClass("tve-state-expanded",e+n>=t)})})}t.fn.tableOfContents=function(n={}){const o={target:"#tve_editor.tar-main-content",columns:1,headers:"h1,h2,h3",distribute:"",itemCallback:jQuery.noop,hideEmpty:!0,numbering:"none",emptyText:window.tve_frontend_options&&tve_frontend_options.translations?tve_frontend_options.translations.no_headings:"No headings found",itemsFilter:t=>t};let s=!1,r=!1,l={level0:0,level1:0,level2:0};return this.each(function(){const d=t(this);if(!d.is(".thrv_contents_table,.tve-toc"))return;const h=d.closest(".thrv_gutenberg_block,.thrv_symbol");if(r=d.hasClass("thrv_contents_table"),s=d.hasClass("tve-disable-scroll-animation"),a&&!d.attr("data-id")){const t=TVE.CSS_Rule_Cache.generate_id("",36);d.attr("data-id",t),d.find(".toc-icons symbol").each(function(){this.setAttribute("id",`${this.getAttribute("id").match(/toc-bullet-\d+/)[0]}-${t}`)})}r||(l={level0:0,level1:0,level2:0},["headingStyle","bulletStyle","numberStyle","numberSuffix"].forEach(t=>{n[t]={};try{n[t]=JSON.parse(this.dataset[t])}catch(t){}}));const v=d.find(".tve_ct_content").empty(),u=i(i(i({},o),this.dataset),n);u.distribute=1===parseInt(u.distribute)||"true"===u.distribute||!0===u.distribute,u.columns=Number(e.getMediaAttr(d,"data-columns")||1);let f,p=t(u.target);if(p.length||(p=h.length?h.parent():t("#tve_editor")),f=p.find(u.headers),f=u.itemsFilter(f),a&&d.hasClass("tve-dynamic-toc")||(f=f.filter(":visible")),f=f.filter(':not([data-hide="true"], .tve-toc *, .thrv-login-element *)'),!f.length)return void(u.hideEmpty&&!e.queryString.get("tve_block_preview")?d.hide():v.html(`<div class="tve-empty-toc">${u.emptyText}</div>`));const m=u.headers.split(",").map(t=>t.toUpperCase());let b=m.shift();for(;b&&m.length&&0===f.filter(b).length;)b=m.shift();let g=f.length/u.columns;u.distribute||(g=f.filter(b).length/u.columns);const y=new Array(u.columns).fill("",0,u.columns);let _=0,$=-1;f.each(function(){const e=t(this),n=e.attr("data-alt-text")||e.text();(u.distribute||this.tagName===b)&&$++,$>=(1+_)*g&&_++;const o=this.id&&p.find(`[id="${this.id}"]`).length>1,i=e.closest(".tve-content-list,.tvo-testimonials-display ").length>0,h=o||i&&!a&&!this.classList.contains("tve-id-regenerated"),v=this.id&&!h?this.id:this.id="t-"+c++,f=u.headers.split(",").indexOf(this.tagName.toLowerCase()),m=((t,e,n,o,i,a)=>{let c;if(r)c=`<div class="tve_ct_level${n}"><a href="#${e}" rel="nofollow">${o}</a></div>`;else{let r="",d="",h="";const v=t.numbering.includes("bullet"),u=t.numbering.includes("advance");if("none"!==t.numbering){if(v)(0===n||u)&&(h=`toc-bullet-${n}`);else if(0===n||u){l[`level${n}`]+=1,l[`level${n+1}`]=0;for(let t=0;t<n+1;t++)r+=`${l[`level${t}`]}${t===n?"":"."}`}if(v&&h){const o=a.attr("data-id");o&&(h+=`-${o}`),d=`<div class="thrv_wrapper tve-toc-bullet tve-toc-bullet${n} tve_no_icons ${s?"":"tve-jump-scroll"}" data-target="#${e}" ${s?"":'jump-animation="smooth"'} data-icon-target="${h}" data-element-name="Icon Level ${n+1}" data-css="${t.bulletStyle[n]||""}"><svg class="tcb-icon"><use href="#${h}"/></svg></div>`}else r&&(d=`<div class="thrv_wrapper tve-toc-number tve-toc-number${n} tve_no_icons ${s?"":"tve-jump-scroll"}" data-target="#${e}" ${s?"":'jump-animation="smooth"'} data-element-name="Number Level ${n+1}" data-level="${n}" data-css="${t.numberStyle[n]||""}"><span class="tve-toc-disabled">${r}${t.numberSuffix[n]||""}</span></div>`)}c=`<div class="thrv_wrapper tve-toc-heading tve-toc-heading-level${n} tve_no_icons" data-tag="${i}" data-css="${t.headingStyle[n]||""}" data-element-name="Heading Level ${n+1}">${d}<a href="#${e}" class="tve-toc-anchor ${s?"":"tve-jump-scroll"}" ${s?"":'jump-animation="smooth"'}>${o}</a></div>`}return c})(u,v,f,n,this.tagName,d);h&&i&&!a&&this.classList.add("tve-id-regenerated"),u.itemCallback(e,f,u),y[_]+=m});let w="";if(!r){const t=d.children(".tve-toc-divider");w=t.length?t.html():'<div class="thrv_wrapper thrv-divider tve-vert-divider" data-style="tve_sep-1" data-color-d="rgb(217, 217, 217)" data-thickness-d="1"><hr class="tve_sep tve_sep-1" style=""></div>'}v.html(y.map(t=>`<div class="ct_column">${t}</div>${w}`).join("")),!a&&d.hasClass("tve-dynamic-toc")&&d.addClass("tve-rendered")})},o.initToc=(n=e.$body,o=!1)=>{a=o,a||(n.length||(n=t("body")),r||(function(t){parseInt(tve_frontend_options.is_single)&&t.find(".tve-toc:not(.tve-dynamic-toc), .thrv_symbol .tve-toc.tve-dynamic-toc").tableOfContents()}(n),setTimeout(function(){l(n)},50),r=!0),e.add_scroll_callback(d),e.$body.off(".tcb-jumplink-done").on("tcb-jumplink-done",(e,n,o)=>{(o.classList.contains("tve-toc-anchor")||o.classList.contains("tve-toc-number")||o.classList.contains("tve-toc-bullet"))&&setTimeout(()=>{d(t(o).data("targetOffset"))},500)}))},window.TCB_Front.toc=o,TCB_Front.setModuleLoadedStatus("toc",!0)}(ThriveGlobal.$j,TCB_Front)})();