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);
void 0===TCB_Front.js_modules["lead-generation"]&&TCB_Front.setModuleLoadedStatus("lead-generation",!1),((t,e)=>{if(e.isModuleLoaded("lead-generation"))return;t(window).on("tcb_after_dom_ready",()=>{const r=t(e.Utils.isEditorPage()?"#tve_editor":"body");a.initRadioInputs(r),a.initCheckboxInputs(r),e.Utils.isEditorPage()||(t(".thrv_lead_generation").tve_front_lead_generation(),a.initRecaptcha(),a.initTurnstile(),a.initCustomSpamPreventor())});const a={initRadioInputs(e){t('[data-default="1"]').closest(".tve_lg_radio_wrapper").addClass("tve-state-expanded"),e.off("change.inputradio").on("change.inputradio",".tve_lg_radio_wrapper input",function(){const e=t(this).closest(".tve_lg_radio_wrapper");e.siblings(".tve-state-expanded").removeClass("tve-state-expanded"),e.addClass("tve-state-expanded")})},initCheckboxInputs(e){e.off("change.inputcheckbox").on("change.inputcheckbox",".tve_lg_checkbox_wrapper input",function(){const e=t(this);e.closest(".tve_lg_checkbox_wrapper").toggleClass("tve-state-expanded",e.prop("checked"))})},initCustomSpamPreventor(){const e=t(".tve-thrive-sp-container");let a=500;e.filter(":not(.tve-sp-rendered)").each(function(){document.getElementById(this.id)&&(this.id=this.id+"-"+ ++a,t(this).addClass("tve-sp-rendered"))})},initTurnstile(){const e=t(".tve-turnstile-container");if(e.length&&0!==tve_dash_front.turnstile.length){let a=!1;window.tve_turnstile_api_loaded||(t.ajax({url:"https://challenges.cloudflare.com/turnstile/v0/api.js",dataType:"script",cache:!0}),a=!0,window.tve_turnstile_api_loaded=!0),a||function a(){"undefined"!=typeof turnstile&&turnstile.render?function(){let a=100;e.filter(":not(.tve-turnstile-rendered)").each(function(){if(document.getElementById(this.id)){this.id=this.id+"-"+ ++a;const e=t(this),r=window.innerWidth<400?"compact":e.attr("data-size");e.addClass("tve-turnstile-rendered");const n=this.id;e.data("turnstile-rendered")||tve_dash_front.turnstile.connection||(e.data("turnstile-rendered",!0),turnstile.render("#"+n,{sitekey:tve_dash_front.turnstile.site_key||e.attr("data-site-key"),theme:e.attr("data-theme"),type:e.attr("data-type"),appearance:"execute",size:r}))}})}():setTimeout(a,50)}()}},initRecaptcha(){const e=t(".tve-captcha-container");if(e.length&&0!==tve_dash_front.recaptcha.length){function a(){"undefined"!=typeof grecaptcha&&grecaptcha.render?function(){let a=100;e.filter(":not(.tve-recapcha-rendered)").each(function(){if(document.getElementById(this.id)){this.id=this.id+"-"+ ++a;const e=t(this),r=window.innerWidth<400?"compact":e.attr("data-size");e.addClass("tve-recaptcha-rendered"),e.data("grecaptcha-render")||tve_dash_front.recaptcha.connection&&(!tve_dash_front.recaptcha.connection||"v3"===tve_dash_front.recaptcha.connection.version)||(e.data("grecaptcha-render",!0),grecaptcha.render(this.id,{sitekey:tve_dash_front.recaptcha.site_key||e.attr("data-site-key"),theme:e.attr("data-theme"),type:e.attr("data-type"),size:r}))}})}():setTimeout(a,50)}let r=!1;const n=tve_dash_front.recaptcha.connection&&"v3"===tve_dash_front.recaptcha.connection.version&&!tve_dash_front.recaptcha.connection.browsing_history?tve_dash_front.recaptcha.site_key:"explicit";window.tve_gapi_loaded||(t.getScript("https://www.google.com/recaptcha/api.js?render="+n,a),r=!0,window.tve_gapi_loaded=!0),r||a()}},hasFileUpload:()=>e.isModuleLoaded("file-upload")};t.fn.tve_front_lead_generation=function(r={}){return window.TCB_PAGE_INDEX=window.TCB_PAGE_INDEX||1,this.each((n,i)=>{const o=t(i);let s=o.find("form");const d=s.find(".tve-f-a-hidden").val();if(0===s.length&&(o.find(".thrv_lead_generation_container").wrapInner('<form method="post"></form>'),s=o.find("form")),s.find(".tve_lg_textarea.tve-lg-show-counter textarea").off("input.textarea").on("input.textarea",function(){const e=t(this),a=e.val().length,r=Number(e.attr("maxlength")),n=Number(e.attr("data-min")),i=e.next().find(".tve-fill-text-dynamic");i.text(r?`${a} of ${r}`:a),i.toggleClass("tve-counter-error",!!(a&&n&&a<n))}),s.find('input[type="checkbox"],input[type="radio"]').each(function(){if(!this.id)return!0;t("#"+this.id).not(this).length&&(this.id=this.id+"-"+window.TCB_PAGE_INDEX++,t(this).next("label").attr("for",this.id))}),void 0!==d&&"#"===s.attr("action")&&s.attr("action",d),o.data("tve_lg_done"))return this;if(o.data("tve_lg_done",!0),void 0!==window.SegMet&&SegMet&&-1!==s[0].action.indexOf("infusionsoft")&&!s.data("tve-segmet-submit")){s.data("tve-segmet-submit",1);const t=s[0].submit;s[0].submit=function(){return s.data("tve-segmet-submitted")?t.call(s[0]):(s.data("tve-segmet-submitted",1),s.submit())}}const l={errClass:"tve-lg-error",errClassMultiple:"tve-lg-error-multiple",init(){this.container=s.closest(".thrv_lead_generation").find("#tve-lg-error-container"),this.container.length||(this.container=t('<div id="tve-lg-error-container"></div>').prependTo(s.parent()),this.container.on("click",".tve-lg-err-close",t.proxy(this.close,this))),this.container.empty().hide(),this.clear()},close(){this.container.fadeOut(200);let t=s.find("."+this.errClass);return t.length||(t=s.find("input,select,textarea")),t.first().trigger("focus"),!1},clear(){s.find("input,select,textarea").removeClass(this.errClass),s.find('[class^="tve_lg_"]').removeClass(this.errClassMultiple+" "+this.errClass),"function"==typeof r.clearErrors&&r.clearErrors.apply(this,arguments)},markApiError(e,a=t(),n=""){return"function"==typeof r.renderError?r.renderError(a,e,n):this.container.append('<div class="tve-lg-err-item tve-lg-ext-err">'+e+"</div>"),this},_markError(t,e,a){if("function"==typeof r.renderError)return r.renderError.call(this,t,e,a);if(t){const e=t.parent();e.removeClass("tcb-permanently-hidden"),e.closest("form").find(`[data-label-for="${e.attr("data-label")}"]`).removeClass("tcb-permanently-hidden"),t.addClass(this.errClass);let r=t.attr("data-field")?t.attr("data-field").replace("mapping_",""):t.attr("type");"gdpr"===r&&(r="checkbox"),["radio","checkbox"].includes(r)?t.closest(".tve_lg_"+r).addClass(this.errClassMultiple):"select"===r?t.closest(".tve_lg_dropdown").addClass(this.errClass):"country"===r?"no-country"===a&&t.closest(".tve_lg_country").addClass(this.errClass):"state"===r&&"no-state"===a&&t.closest(".tve_lg_state").addClass(this.errClass)}"required"===a&&this.container.find(".tve-lg-required").length||this.container.append('<div class="tve-lg-err-item tve-lg-'+a+'">'+e+"</div>")},show(){if("function"==typeof r.renderError)return;this.container.append('<a href="javascript:void(0)" class="tve-lg-err-close" title="Close"><span class="thrv-icon thrv-svg-icon">'+e.icons.get("cross")+"</span></a>");const t=this;setTimeout(function(){const e=s.offset(),a=parseInt(s.css("margin-top"));let r=-10-t.container.outerHeight(!0)-(isNaN(a)?0:a);s.parents(".thrv-ribbon").length?"bottom"===s.parents(".tve-leads-ribbon").attr("data-position")?r+=7:r=e.top+s.outerHeight():t.container.outerHeight(!0)>e.top&&(r=e.top+s.outerHeight()),t.container.css({top:r+"px",width:s.outerWidth()}).fadeIn(200)},50)},required(e,a){let r,n="required";const i=e.attr("type");if("hidden"===i)r=!0;else if("radio"===i)r=t('input[name="'+e.attr("name")+'"]').is(":checked");else if("checkbox"===i)r=t('input[name="'+e.attr("name")+'"]').is(":checked");else if(e.is("textarea[data-min]")){const i=t.trim(e.val()).length;r=i>=e.attr("data-min"),!r&&i&&(n="min-chars",a=tve_frontend_options.translations.min_chars.replace("%s",e.attr("data-min")))}else{const a=e.attr("value")?e.attr("value"):e.val();r=t.trim(a).length>0}return r||this._markError(e,a,n),r},validNumber(t){const e=parseFloat(t.attr("max")),a=parseFloat(t.attr("min")),r=parseFloat(t.val()),n=this.getErrors(o);let i=!0,s=n.min_value,d=n.max_value;if(void 0===s&&(s="The number field should be at least {min_value}"),void 0===d&&(d="The number field should be at most {max_value}"),!isNaN(a)&&!isNaN(r)&&r<a){i=!1;const e=s.replace(/{min_value}/g,a);this._markError(t,e,"min_value")}if(!isNaN(e)&&!isNaN(r)&&r>e){i=!1;const a=d.replace(/{max_value}/g,e);this._markError(t,a,"max_value")}return i},validCountry(e){if(!parseInt(e.attr("data-required")))return!0;let a=!0,r="",n="";const i=e.attr("value")?e.attr("value"):e.val();return a=t.trim(i).length>0,a||(r="Country field is required!",n="no-country",this._markError(e,r,n)),a},validState(e){if(!parseInt(e.attr("data-required")))return!0;let a=!0,r="",n="";const i=e.attr("value")?e.attr("value"):e.val();return a=t.trim(i).length>0,a||(r="State field is required!",n="no-state",this._markError(e,r,n)),a},password(t,e){let a=!0;return t.val()||1!==t.data("required")||(a=!1),!!a||(this._markError(t,e,"password"),!1)},mismatch(t,e){let a=!0;return t.password&&t.password.val()!==t.confirm_password.val()&&(a=!1),!!a||(this._markError(t.confirm_password,e,"passwordmismatch"),!1)},email(t,e){return!(t.val()&&!/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(t.val())&&(this._markError(t,e,"email"),1))},getErrors(t){try{return JSON.parse(t.find(".tve-lg-err-msg").val())}catch(t){return{file_extension:"Sorry, {fileextension} files are not allowed",file_size:"{file} exceeds the maximum file size of {filelimit}",required:"Please fill in all of the required fields",phone:"The phone number is not valid",email:"The email address is not valid",max_value:"The number field should be at most {max_value}",min_value:"The number field should be at least {min_value}"}}}};let c;a.hasFileUpload()&&(c=new e.FileUpload(o));const u=function(a,r){const n=t.extend({success:"Sign up successful",error:"Error!"},r),i=s.find("#_form_type").val(),o=s.find("input[name=name]").val()?s.find("input[name=name]").val():"",d=s.find("input[name=email]").val();if(a){s.parents(".tl-style").first().find(".tve_p_lb_close").trigger("click");const a=t.Event("leads_messages.tcb");s.trigger(a),"lead_generation"===i&&(s.find("input").val(""),s.parents(".tve_p_lb_content").find(".tve_p_lb_close").trigger("click")),n.success=n.success.replace("[lead_email]",d),n.success=n.success.replace("[lead_name]",o),e.notificationElement.toggle(n.success,"success","")}else{const t=s.parent(),a=t.parent(),r=a.find(".tve-error-wrapper"),i=s.find("#_error_message_option").val();if(1===parseInt(i))t.hide(),0===r.length?(a.append('<div class="tve-error-wrapper"><div class="tve-error-content"></div><button class="tve-close-error-message">Retry</button></div>'),n.error=n.error.replace("[lead_email]",d),n.error=n.error.replace("[lead_name]",o),a.find(".tve-error-content").append(n.error)):a.find(".tve-error-wrapper").show();else{if(_())return;e.notificationElement.toggle(n.success,"success",""),h(),p()}}s.tve_form_loading(!0)},f=function(t){return t&&t.length>0?t+",":""};function p(){s.find(".tve-state-expanded").removeClass("tve-state-expanded"),s.find(".tve_lg_dropdown:not(.tve_lg_country):not(.tve_lg_state)").each(function(){const e=t(this),a=e.attr("data-show-placeholder"),r=e.find('[data-default="1"]'),n=r.length?r:e.find(".tve-lg-dropdown-option,.tve-dynamic-dropdown-option").first(),i=e.find("input");a?(e.find(".tve-lg-dropdown-trigger .tve-disabled-text-inner").html(i.attr("data-placeholder")),i.removeAttr("value")):(e.find(".tve-lg-dropdown-trigger .tve-disabled-text-inner").html(n.text()),i.attr("value",n.attr("data-value")))}),s.find(".tve_lg_country").each(function(){const e=t(this),a=e.find("input:not(.tve-lg-dropdown-input)"),r=a.attr("default-value"),n=e.find(".tve-lg-dropdown-trigger"),i="include"===e.attr("data-display-type"),o=1===JSON.parse(e.attr("data-display-list")).length;if(n.find(".tve-disabled-text-inner").text("Select Country"),a[0].setAttribute("value",""),r)a[0].setAttribute("value",r),n.find(".tve-disabled-text-inner").text(r);else if(i&&o){const t=JSON.parse(e.attr("data-display-list"))[0];a[0].setAttribute("value",null==t?void 0:t.name),n.find(".tve-disabled-text-inner").text(null==t?void 0:t.name)}window.setTimeout(function(){a.trigger("input.tve")},0)}),s.find(".tve_lg_state").each(function(){const e=t(this),a=e.find("input:not(.tve-lg-dropdown-input)"),r=a.attr("default-value"),n=e.find(".tve-lg-dropdown-trigger");n.find(".tve-disabled-text-inner").text(a.attr("data-placeholder")),""!==r?(a.val(r),n.find(".tve-disabled-text-inner").text(r)):a.attr("value","")}),s.find(".tve_lg_date").each(function(){const e=t(this),a=e.find(".lg-date-picker");try{const t=e.data("date-configs"),r=Number(a.attr("data-is-limit-days")),n=Number(a.attr("data-is-limit-hours"));if(r){const e=JSON.parse(a.attr("data-limit-days")),{disable:r,locale:n}={disable:[function(t){return!e.includes(t.getDay())}],locale:{firstDayOfWeek:1}};t.disable=r,t.locale=n}if(n){const e=a.attr("data-start-hour"),r=a.attr("data-start-minute"),n=a.attr("data-start-meridiem");e&&(t.defaultHour="PM"===n?Number(e)+12:e),r&&(t.defaultMinute=r)}a.flatpickr(t)}catch(t){}}),s[0].reset(),s.find("textarea").trigger("input"),s.find('input[type="radio"][data-default="1"], input[type="checkbox"][data-default="1"] ').attr("checked","checked").closest(".tve_lg_radio_wrapper, .tve_lg_checkbox_wrapper").addClass("tve-state-expanded"),e.smartComplete.handleSmartComplete(s)}function _(a=!1,r="",n="",i=null){const o=s.find("#_error_message_option").val(),d=s.find("#_autofill").val(),l=s.find("#_submit_option").val(),c=d?s.find("input").not("input[type=hidden],input[type=password]").serializeArray():"",u=s.find("#_back_url_target").val();let f=!1;if(!l||"reload"===l&&(a||1!==o))f=!0,location.reload();else if("redirect"===l){let t=s.find("#_back_url").val();t=e.Utils.addHttp(t),d&&c&&!e.Utils.isExternal(t)&&e.setCookie("account_create_fields",JSON.stringify(c),{path:"/"}),"1"===s.find("#_sendParams").val()&&(t=e.Utils.appendFormParamsToURL(t,s));const r="_blank"===u;if(!t||!e.isValidUrl(t)||!a&&1===o)return i&&!i.closed&&i.close(),f;if(r)return f=!0,f;i&&!i.closed&&i.close(),location.href=t,f=!0}else if("state"===l&&a){const e=TL_Front.parent_state,a=s.find(".tve-switch-state-trigger"),r=-1!==a.attr("data-tcb-events").indexOf("tl_state_lightbox"),n=s.parents(".tve_post_lightbox").length>0;if(a.trigger("click"),s.tve_form_loading(!0),r)if(n)e&&(TL_Front.close_form(e),delete TL_Front.parent_state);else{const e=t.Event("leads_messages.tcb");e.lightbox_state=!0,s.trigger(e)}TL_Front.parent_state&&(s.parents(".tl-style").first().find(".tve_p_lb_close").trigger("click"),delete TL_Front.parent_state),f=!0}else"klicktipp-redirect"===l&&a?r&&e.isValidUrl(r)&&(location.href=r,f=!0):"page"===l&&a&&n&&e.isValidUrl(n)&&(location.href=n,f=!0);return f}function h(){t(".tve_p_lb_background.tve_lb_open .tve_p_lb_close").trigger("click")}!function(){const t=s.find("#_submit_option").val(),e=s.find("#_back_url_target").val();if("redirect"===t&&"_blank"===e)return;const a=o.data("form-target");a&&a.length&&o.find("form").attr("target",a)}(),function(){const a=e.queryString.get("affiliate");if(a){const e=t("<input/>");e.attr("type","hidden").attr("name","tve_affiliate").val(a),s.append(e)}}(),o.find(".tve-lg-err-msg").length&&function(){s.find(".tve_submit_container .thrv_icon").on("click",function(){s.submit()}),s.find(".tve-form-button .tve-form-button-submit").on("click",e=>(e.preventDefault(),e.stopPropagation(),s.submit(),0===s.find(".tve-lg-error").length&&s.find(".tve_lg_date").each(function(){t(this).find(".lg-date-picker").flatpickr().clear()}),!1));const n=l.getErrors(o),i=function(i,d,v){if(s.data("tve-force-submit"))return!0;const g=s.find(".consent-config");g.length&&!g.attr("value")&&"none"!==s.find(".tcb-lg-consent").css("display")&&s.find('[name="user_consent"]').attr("data-required",1);let m=!0;const b=t(d),y={};l.init(),b.find("input, select, textarea").each(function(){const e=t(this),a=e.data("validation"),r=parseInt(this.dataset.required);"password"===e.attr("type")&&(y[e.attr("name")]=e),"number"===e.attr("type")&&(l.validNumber(e)||(m=!1)),"country"===e.attr("data-field")&&(l.validCountry(e)||(m=!1)),"state"===e.attr("data-field")&&(l.validState(e)||(m=!1)),1===r&&(l.required(e,n.required)||(m=!1)),void 0!==a&&"none"!==a&&l[a]&&(l[a](e,n[a])||(m=!1))});const w=b.find('textarea[name="g-recaptcha-response"]');if(w.length>0&&(w.first().val()||(l.markApiError("Please validate captcha form",b.find(".tve-captcha-container"),"captcha"),setTimeout(function(){t("#tve-lg-error-container").fadeOut("slow")},5e3),m=!1)),2===Object.keys(y).length&&(l.mismatch(y,n.passwordmismatch)||(m=!1)),a.hasFileUpload()&&c){const t=c.isValid();!0!==t&&(m=!1,l.markApiError(t,c.$el,"upload"))}if(!m)return l.show(),s.find("."+l.errClass).first().trigger("focus"),!1;let x=null;const k=s.find("#_submit_option").val(),C=s.find("#_back_url_target").val(),E=s.find("#_back_url").val();if("redirect"===k&&"_blank"===C&&E){s.attr("target")&&s.removeAttr("target");let t=e.Utils.addHttp(E);"1"===s.find("#_sendParams").val()&&(t=e.Utils.appendFormParamsToURL(t,s));const a=e.Utils.isExternal(t)?"noopener,noreferrer":"noopener";x=window.open(t,"_blank",a)}"function"==typeof r.showFormLoader?r.showFormLoader():s.tve_form_loading();const T=s.parents(".thrv_lead_generation").attr("data-connection");if(["api","webhook"].includes(T)||s.parents(".tcb-registration-form").length){const d=s.find("#_autofill").val()?s.find("input").not("input[type=hidden],input[type=password]").serializeArray():"";if(o.attr("data-settings-id")||function(){const t=function(){let t="";return"true"===s.find(".tve_lg_radio").attr("data-answer-tag")?s.find(".tve_lg_radio input[type=radio]").each((e,a)=>{if(a.checked)if(a.attributes["data-custom-tag"]){const e=a.attributes["data-custom-tag"].value;t=t.length>0?t+","+e:e}else{const e=a.value;t=t.length>0?t+","+e:e}}):s.find(".tve_lg_radio input[type=radio]").each((e,a)=>{a.checked&&a.attributes["data-custom-tag"]&&(t=a.attributes["data-custom-tag"].value)}),t}(),e=function(){let t="";return"true"===s.find(".tve_lg_checkbox:not(.tcb-lg-consent)").attr("data-answer-tag")?s.find(".tve_lg_checkbox input[type=checkbox]").each((e,a)=>{if(a.checked)if(a.attributes["data-custom-tag"]){const e=a.attributes["data-custom-tag"].value;t=t.length>0?t+","+e:e}else{const e=a.value;t=t.length>0?t+","+e:e}}):s.find(".tve_lg_checkbox input[type=checkbox]").each((e,a)=>{if(a.checked&&a.attributes["data-custom-tag"]){const e=a.attributes["data-custom-tag"].value;t=t.length>0?t+","+e:e}}),t}(),a=function(){let t="";const e=s.find(".tve_lg_dropdown"),a=e.find(".tve-lg-dropdown-option.tve-state-active");return t="true"===e.attr("data-answer-tag")?a.attr("data-custom-tag")?a.length>0?a.attr("data-custom-tag"):"":a.length>0?a.attr("data-value"):"":a.length>0?a.attr("data-custom-tag"):"",t}(),r=f(t)+f(e)+f(a);var n;r.length&&(n=r,tve_frontend_options.lead_generation_custom_tag_apis.forEach(t=>{const e=s.find(`input[type=hidden]#${t}_tags`);let a=e.length>0?e.attr("value"):"";e.length&&(0===a.length&&","===n.slice(-1)&&(n=n.slice(0,-1)),a=n.replace(/['"`\\]/g,"")+a,e.attr("value",a))}))}(),"function"==typeof r.submitHandler){const t={autofillValues:d,token:v};return a.hasFileUpload()&&c&&(t.uploader=c),r.submitHandler.call(null,i,t)}const g={};t.each(s.serializeArray(),function(t,e){g[e.name]=e.value});let m=s.serialize()+"&action=tve_api_form_submit&url="+encodeURIComponent(location.href);const b=s.find("#_submit_option").val();m+="&_tcb_id="+(o.attr("data-settings-id")||"")+"&tcb_token="+(10*Date.now()).toString(32),s.find(".tve_lg_radio_wrapper input,.tve_lg_checkbox_wrapper input").each((t,e)=>{!e.name||g[e.name]||m.includes(e.name)||(g[e.name]="",m+=`&${e.name}=`)});const y=t.Event("form_conversion.tcb");s.trigger(y),y.post_data&&(m+="&"+t.param(y.post_data));const w=s.closest(".tar-main-content[data-post-id]"),k=w.length?w.attr("data-post-id"):tve_frontend_options.post_id,C=s.closest(".thrive-quiz-builder-shortcode").length>0;return k&&(m+=`&post_id=${k}`),m+=`&frontend_post_id=${tve_frontend_options.post_id}`,v&&(m+="&g-recaptcha-response="+v),a.hasFileUpload()&&c&&(m=c.appendExtraData(m)),t.ajax({type:"post",xhrFields:{withCredentials:!0},url:tve_frontend_options.ajaxurl,dataType:"json",data:m}).fail(function(){l.markApiError("An error occurred while submitting your data. Please try again").show(),s.tve_form_loading(!0)}).done(function(r){a.hasFileUpload()&&c&&c.clear(),s.find('input[type="password"]').trigger("keyup");let d="";try{var f=r.form_messages||{},v="";if(r.redirect&&(v=r.redirect,delete r.redirect),delete r.form_messages,r.variation&&delete r.variation,r.back_url){var m=r.back_url;delete r.back_url}var y=Object.keys(r).length>0&&!r.error;if("object"==typeof r.error_message&&r.error_message.length){const t=r.error_message;let a="";t.forEach(t=>{"string"==typeof t&&t.length&&(t=t.trim(),l.markApiError(t).show(),a+=t+"\n")}),s.tve_form_loading(!0),a.length&&(d=a,e.toast(a,!0))}if(r.error){if(r.error_code){const e=r.error_code,a=t.Event("lead_conversion_error_code.tcb",{form_data:g,$form:s,$leadGeneration:o,errorCode:e});if(s.trigger(a),"no_connection"===e&&C){const e=t.Event("skip_next_step.tcb",{$form:s,$leadGeneration:o});return s.trigger(e),i.preventDefault(),!1}}if("captcha"===r.field){const t=n.recaptcha||r.error;l.markApiError(t).show(),s.tve_form_loading(!0)}else u(y,f);return i.preventDefault(),!1}if(d.length)return s.tve_form_loading(!0),i.preventDefault(),!1}catch(t){console.log(t)}const w=t.Event("lead_conversion_success.tcb",{form_data:g,$form:s,$leadGeneration:o});return s.trigger(w),w.content_unlocked&&"message"!==b&&"state"!==b?(i.preventDefault(),!1):(h(),_(y,v,void 0!==m?m:"",x)?(s.tve_form_loading(!0),void p()):(p(),0===d.length&&u(y,f),!0))}).always(()=>{"undefined"!=typeof grecaptcha&&"function"==typeof grecaptcha.reset&&(!tve_dash_front.recaptcha.connection||tve_dash_front.recaptcha.connection&&"v3"!==tve_dash_front.recaptcha.connection.version)&&grecaptcha.reset(),"undefined"!=typeof turnstile&&"function"==typeof turnstile.reset&&turnstile.reset()}),i.stopPropagation(),!1}const N=t.Event("should_submit_form.tcb");if(s.trigger(N),"1"!==s.find("input#_asset_option").val()&&!N.flag_need_data)return!0;let F=s.serialize()+"&action=tve_custom_form_submit&email="+function(t){if(t.find('[data-validation="email"]').length)return t.find('[data-validation="email"]').val();let e="";return t.find("input").each(function(){if(this.name&&this.name.match(/email/i))return e=this.value,!1}),e}(s)+"&name="+function(e){let a=!1;return e.find("input").each(function(){const e=t(this),r=e.attr("placeholder"),n=e.attr("name");if(r&&-1!==r.toLowerCase().indexOf("name")||n&&-1!==n.toLowerCase().indexOf("name"))return a=e,!1}),!1!==a?a.val():""}(s);const A=t.Event("form_conversion.tcb");return s.trigger(A),A.post_data&&(F+="&"+t.param(A.post_data)),tve_frontend_options.post_id&&(F+="&post_id="+tve_frontend_options.post_id),t.ajax({type:"post",xhrFields:{withCredentials:!0},url:tve_frontend_options.ajaxurl,data:F}).always(function(){s.find("input,select,textarea").removeAttr("disabled"),s.find(".tve-form-button").removeClass("tar-disabled"),s.data("tve-force-submit",!0).submit()}),!1};s.on("submit",function(e){const a=this;return t(this).find(".tve-captcha-container").length&&tve_dash_front.recaptcha.connection&&"v3"===tve_dash_front.recaptcha.connection.version?(grecaptcha.ready(function(){grecaptcha.execute(tve_dash_front.recaptcha.site_key,{action:"submit"}).then(function(t){i(e,a,t)})}),!1):i(e,a)})}()})},e.setModuleLoadedStatus("lead-generation",!0)})(ThriveGlobal.$j,TCB_Front);
(()=>{var t={65910:(t,e,o)=>{const i=o(77129);var n,r;n=ThriveGlobal.$j,r=TCB_Front,n.fn.tcbToggle=function(t){return this.each(function(){const e=n(this),o=e.closest(".thrv_toggle_title"),s=e.closest(".thrv_toggle"),a=o.next(),c=s.attr("data-animation-speed"),l=s.attr("data-animation"),g=e.hasClass("tve-state-expanded");void 0===t&&(t=g?"hide":"show");const d=i.getAnimationFunctions(l),h=s.data("tcbToggleInit");e.toggleClass("tve-state-expanded","show"===t),r.$window.trigger(`tve-toggle-${t}`,a),d[t](a,c).promise().done(()=>{h&&e.hasClass("tve-state-expanded")&&!TCB_Front.isInViewport(e)&&n("html, body").scrollTop(e.offset().top),TCB_Front.Utils.handleContent(a,"show"===t),r.$window.trigger("resize")})})}},77129:t=>{ThriveGlobal.$j,TCB_Front,t.exports=class{static getAnimationFunctions(t,e){let o,i;switch(t){case"appear":o=function(t){return t.children(".tve-cb").removeAttr("style"),t.show()},i=function(t){return t.hide()};break;case"fade":o=function(t,e){return t.removeAttr("style").fadeIn(e)},i=function(t,e){return t.fadeOut(e)};break;case"slide-up":o=function(t){return t.children(".tve-cb").removeAttr("style").css({bottom:"100%",opacity:"0"}).animate({bottom:"0",opacity:"1"}).show(),t.show()},i=function(t){return t.children(".tve-cb").css({bottom:"0",opacity:"1"}).animate({bottom:"100%",opacity:"0"}).hide(),t.hide()};break;case"slide-down":o=function(t){return t.children(".tve-cb").removeAttr("style").css({top:"100%",opacity:"0"}).animate({top:"0",opacity:"1"}).show(),t.show()},i=function(t){return t.children(".tve-cb").css({top:"0",opacity:"1"}).animate({top:"100%",opacity:"0"}).hide(),t.hide()};break;case"slide":o=function(t,e){return t.removeAttr("style").slideDown(e)},i=function(t,e){return t.slideUp(e)};break;case"slide-right":o=function(t){return t.children(".tve-cb").removeAttr("style").css({opacity:"0",left:"100%"}).animate({left:"0",opacity:"1"}).show(),t.show()},i=function(t){return t.children(".tve-cb").css({opacity:"1",left:"0"}).animate({left:"100%",opacity:"0"}).hide(),t.hide()};break;case"slide-left":o=function(t){return t.children(".tve-cb").removeAttr("style").css({opacity:"0",right:"100%"}).animate({right:"0",opacity:"1"}).show(),t.show()},i=function(t){return t.children(".tve-cb").css({opacity:"1",right:"100%"}).animate({right:"0",opacity:"0"}).hide(),t.hide()};break;case"smooth-resize":o=function(t){const o=t.children(),i=t.data("contentHeight")||t.height();return o.css({height:e}).animate({height:i},500).promise().done(()=>{o.css("height","100%")}),t.show()},i=function(t){return t.data("contentHeight",t.height()),t.hide()};break;case"swing-up":o=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()},i=function(t){return t.hide()};break;case"slide-fade":o=function(t,e){return t.animate({opacity:"toggle",height:"toggle"},e)},i=function(t,e){return t.animate({opacity:"hide",height:"hide"},e)};break;default:o=function(t){return t.show()},i=function(t){return t.hide()}}return{show:o,hide:i}}}}},e={};function o(i){var n=e[i];if(void 0!==n)return n.exports;var r=e[i]={exports:{}};return t[i](r,r.exports,o),r.exports}void 0===TCB_Front.js_modules.toggle&&TCB_Front.setModuleLoadedStatus("toggle",!1),(t=>{if(TCB_Front.isModuleLoaded("toggle"))return;o(65910);const e={init(){const o=t(TCB_Front.Utils.isEditorPage()?"#tve_editor":"body");if(e.initOnClick(o),e.initToggleCompat(o),t(".thrv_toggle_shortcode").each((e,o)=>{TCB_Front.$window.trigger("tve_after_content_toggle",[t(o)])}),t(".thrv_toggle").each((e,o)=>{const i=t(o);if(!i.data("tcbToggleInit")){let t=i.find(".thrv_toggle_item.tve-default-state-expanded");i.hasClass("tve-toggle-auto-collapse")&&(t=t.first()),t.find("> .tve_faqI > .thrv_toggle_title").tcbToggle("show"),i.data("tcbToggleInit",1)}}),!TCB_Front.Utils.isEditorPage()&&location.hash)try{const e=t(location.hash);e.closest(".thrv_toggle").length&&!e.hasClass("tve-state-expanded")&&e.trigger("click")}catch(t){}},initOnClick(e){e.off("click.tvetoggleelemold").on("click.tvetoggleelemold",".thrv_toggle_shortcode .tve_faqB",function(){const e=t(this).closest(".tve_faq"),o=t(this),i=t(o).siblings(".tve_faqC");i.is(":visible")?(TCB_Front.$window.trigger("tve_after_content_toggle",[i,!1]),t(window).trigger("tcb_toggle_close",i),i.slideUp("fast",function(){i.trigger("lbresize")}),e.removeClass("tve_oFaq"),e.find(".tve_toggle").first().removeClass("tve_toggle_open"),e.find("h4").first().removeClass("tve_toggle_open_text")):(i.slideDown("fast",function(){i.trigger("lbresize")}),t(window).trigger("tcb_toggle_open",i),TCB_Front.$window.trigger("tve_after_content_toggle",[i]),e.addClass("tve_oFaq"),e.find(".tve_toggle").first().addClass("tve_toggle_open"),e.find("h4").first().addClass("tve_toggle_open_text"))})},initToggleCompat(e){e.off("click.tvetoggleelem").on("click.tvetoggleelem",".thrv_toggle:not(.toggle-edit-mode) .thrv_toggle_title",function(){const e=t(this),o=e.closest(".thrv_toggle");!e.hasClass("tve-state-expanded")&&o.hasClass("tve-toggle-auto-collapse")&&o.find(".thrv_toggle_title").tcbToggle("hide"),e.tcbToggle()})}};t(window).on("tcb_after_dom_ready",()=>e.init()),TCB_Front.setModuleLoadedStatus("toggle",!0)})(ThriveGlobal.$j)})();
(()=>{var t={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)},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()}}},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}},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)},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}},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}},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}},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}}},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)})();
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);
(()=>{if(window.TVE_Dash=window.TVE_Dash||{},!e||!e.$j){var a=window.$,e={$j:jQuery.noConflict()};a&&(window.$=a)}!function(a){TVE_Dash.ajax_sent=!1;var t={},s={};TVE_Dash.add_load_item=function(e,n,o){var r;if("function"!=typeof o&&(o=a.noop),TVE_Dash.ajax_sent){var i={},_={};return i[e]=n,_[e]=o,this.send_ajax(i,_),!0}return n?(t[e]&&"function"==typeof(null===(r=console)||void 0===r?void 0:r.warn)&&console.warn(e+" ajax action already defined"),t[e]=n,s[e]=o,!0):(console.error&&console.error("missing ajax data"),!1)},TVE_Dash.ajax_load_css=function(e){a.each(e,function(e,t){a("link#"+(e+="-css")).length||a('<link rel="stylesheet" id="'+e+'" type="text/css" href="'+t+'"/>').appendTo("head")})},TVE_Dash.ajax_load_js=function(e){var t=document.body;a.each(e,function(s,n){if(-1!==s.indexOf("_before"))return!0;var o=document.createElement("script");e[s+"_before"]&&a('<script type="text/javascript">'+e[s+"_before"]+"<\/script>").after(t.lastChild),s&&(o.id=s+"-script"),o.src=n,t.appendChild(o)})},TVE_Dash.send_ajax=function(t,s){a.ajax({url:tve_dash_front.ajaxurl,xhrFields:{withCredentials:!0},data:{post_id:tve_dash_front.post_id,action:"tve_dash_front_ajax",tve_dash_data:t},dataType:"json",type:"post"}).done(function(t){t&&a.isPlainObject(t)&&(t.__resources&&(t.__resources.css&&TVE_Dash.ajax_load_css(t.__resources.css),t.__resources.js&&TVE_Dash.ajax_load_js(t.__resources.js),delete t.__resources),a.each(t,function(a,e){if("function"!=typeof s[a])return!0;s[a].call(null,e,t)}),e.$j(window).trigger("tve_after_ajax_load"))})},TVE_Dash.forceImageLoad=function(a){Array.prototype.forEach.call(a.getElementsByTagName("img"),a=>{a.getAttribute("src").includes("data:image")&&a.setAttribute("src",a.getAttribute("data-opt-src")||a.getAttribute("data-src"))})},a(function(){window.TVE_Dash=window.TVE_Dash||TVE_Dash,setTimeout(function(){var e=new a.Event("tve-dash.load");return a(document).trigger(e),!a.isEmptyObject(t)&&!(!tve_dash_front.force_ajax_send&&tve_dash_front.is_crawler)&&(TVE_Dash.send_ajax(t,s),void(TVE_Dash.ajax_sent=!0))})})}(e.$j)})();
(()=>{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)})();
(()=>{var e={74208:e=>{void 0===TCB_Front.js_modules.menu&&TCB_Front.setModuleLoadedStatus("menu",!1),function(t,n){if(TCB_Front.isModuleLoaded("menu"))return;const o=e=>["auto","scroll","hidden"].includes(e.css("overflow"));let i;function s(e){return t(e).closest(".thrv_widget_menu")}const a={init(){tve_frontend_options.is_editor_page||a.frontendInit(),a.customMenuSwitchIcon(),i||(i=a.customMenuSwitchIcon.bind(this,!1),n.addResizeCallback(i)),a.zIndexOrder(),t(".thrv_widget_menu").each((e,t)=>{a.addMutationListener(t)}),a.handleHiddenItems()},handleHiddenItems(){t(".thrv_widget_menu ul").each((e,n)=>{const o=t(n),i=o.closest("li").find("> a .tve-item-dropdown-trigger"),s=this.hasVisibleItems(o);s||n.style.setProperty("display","none","important"),i.toggle(s)})},hasVisibleItems(e){let t=!1;return e.find("> li").each((e,n)=>{getComputedStyle(n).getPropertyValue("display").includes("none")||(t=!0)}),t},zIndexOrder(){const e=t("ul.tve_w_menu");n.highestZIndex=e.length+6;let o=n.highestZIndex;e.each(function(){this.style.zIndex=o+5;const e=t(this),n=e.closest("#content");e.find("ul").css("z-index",o+6).parent().addClass("menu-item-has-children"),e.parentsUntil("body,#wrapper,#tve_editor").each(function(){const e=t(this);let n=parseInt(e.css("z-index"));isNaN(n)&&(n=0),n=800===n?o+7:Math.max(n,o+7),"static"!==e.css("position")&&(this.style.setProperty("z-index",n,"important"),this.classList.add("tcb-mp"))}),n.length&&"static"!==n.css("position")&&n.css("z-index",o+7).addClass("tcb-mp"),o--})},frontendInit(e){const i=this;function s(e,o){const i=e.attr("href"),s=e[0]?e[0].hash:"",a=e.attr("target");if(s){let o;try{o=t(s)}catch(e){}o&&o.length&&n.jumpScrollTo(o,e[0])}a||o.ctrlKey||o.metaKey?window.open(i,a||"_blank"):location.href=i}(e=e||n.$document).off("click.menu-disable-links").on("click.menu-disable-links",".tve-active-disabled .tve_w_menu .tve-state-active",function(e){const n=t(this).closest("li");if(!a.isHamburger(this)||!n.hasClass("menu-item-has-children"))return e.tvePreventNavigation=!0,!1}),e.off("menu_item_anchor_clicked").on("menu_item_anchor_clicked",".tve_w_menu li",function(){const e=t(this);a.isHamburger(e)&&requestAnimationFrame(()=>{a.toggleState(e,!1)})}),e.off("click.menu_item_click").on("click.menu_item_click",".tve_w_menu li:not(.tve-regular .tcb-mega-drop li)",function(e){if(e.tvePreventNavigation)return!0;if(e.stopPropagation(),t(e.target).closest(".tve-regular .tcb-mega-drop").length)return!0;const n=t(this),r=n.children("a").first(),l=r[0],c=!!n.find("ul").length,d=t(e.target).closest(".tve-item-dropdown-trigger").length||t(e.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)&&c){if(!d&&n.hasClass("expand-children")&&function(e){const t=e.attr("href");return t&&"#"!==t&&0!==t.indexOf("javascript:")}(r))return r.hasClass("tve-jump-scroll")?r.trigger("click"):s(r,e),!1;n.toggleClass("expand-children");const t=n.find("ul").first(),a=n.hasClass("expand-children");i.hasVisibleItems(t)&&t[a?"slideDown":"slideUp"](100);const l=t.closest(".section-content,.tve-cb");if(o(l)){let e={top:"",left:"",width:""};if(a){const{top:n,left:o,width:i}=t[0].getBoundingClientRect();e={top:n,left:o,width:i},t.data("fixed-position",{top:n,scrollTop:l.scrollTop()})}t.toggleClass("fixed-menu-item",a).css(e)}return!1}if(c&&d)return!1;const m=n.children(".tve_et_click");return m.length>0?(m.trigger("click"),!0):!!r.attr("href")&&(r.hasClass("tve-jump-scroll")?(r.trigger("click"),!0):(s(r,e),void(a.isHamburger(n)&&l.pathname===window.location.pathname&&l.host===window.location.host&&l.protocol===window.location.protocol&&requestAnimationFrame(()=>{a.toggleState(n,!1)}))))}),e.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(e){e.preventDefault()}),e.off("click.custom_menu").on("click.custom_menu",".tve-m-trigger",function(){return a.toggleState(this),!1}),e.off("mousedown.close_menu").on("mousedown.close_menu",e=>{t(e.target).closest(".thrv_widget_menu").length||a.closeAll()}),n.addResizeCallback(a.customMenuResponsive),n.addResizeCallback(a.mobileResponsiveToggle),a.customMenuResponsive(),a.refreshActiveStates(e),TCB_Front.$window.off("hashchange.tcb").on("hashchange.tcb",a.refreshActiveStates.bind(a,TCB_Front.$body)),a.positionLogo(e),a.mobileResponsiveToggle(),e.find(".section-content,.tve-cb").each((e,n)=>{const i=t(n);o(i)&&i.off("scroll.menu").on("scroll.menu",e=>{i.find(".fixed-menu-item").each((n,o)=>{const i=t(o),s=i.data("fixed-position"),a=parseInt(s.top)+(s.scrollTop-e.currentTarget.scrollTop);i.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((e,t)=>{const n=t.getAttribute("data-toggle-dir");n&&(t.classList.remove("vmd-toggle"),t.classList.add(n))})},refreshActiveStates(e=TCB_Front.$body){e.find(".tve-custom-menu-type li > a").each(function(){if(!this.getAttribute("href")||"#"===this.getAttribute("href")||0===this.getAttribute("href").indexOf("javascript"))return;const e=t(this),n=location.protocol===this.protocol&&location.hostname===this.hostname&&location.pathname===this.pathname&&location.hash===this.hash;e.toggleClass("tve-state-active",n),e.parent().toggleClass("tve-state-active",n)})},customMenuResponsive(){t(".tve-m-trigger:visible").length?t(".tve-m-trigger").each(function(){const e=t(this).parent().find("> ul");if(!e.data("tve-colors-added")&&e.find("ul a").attr("data-tve-custom-colour")){const n=e.find("ul a").attr("data-tve-custom-colour");e.find("> li > a").each(function(){const e=t(this);e.attr("data-tve-custom-colour")&&(e.attr("data-o-color",e.attr("data-tve-custom-colour")),e.attr("data-tve-custom-colour",n))})}e.data("tve-colors-added",!0)}):(t(".tve-m-expanded").removeClass("tve-m-expanded"),t(".tve-m-trigger").each(function(){const e=t(this).parent().find("> ul");if(!e.data("tve-colors-added")&&e.find("> li > a").attr("data-o-color")){const t=e.find("> li > a"),n=t.attr("data-o-color");t.attr("data-tve-custom-colour",n).removeAttr("data-o-color")}e.data("tve-colors-added",!1)}))},customMenuSwitchIcon(e=!0){const o=n.getDisplayType();t(".thrv_widget_menu").each(function(){const n=t(this),i=n.attr("data-tve-allhoriz");let s=n.attr("data-tve-switch-icon"),r=!1;const l=n.data("tve-frontend-init");n.data("tve-frontend-init",!0),s||i||(s="tablet,mobile");const c=s.split(","),d=n.hasClass("tve-regular")||!l&&!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"),e&&n.find("ul:not(.tcb-masonry.masonry)").removeAttr("style"),c.includes(o)?n.addClass(`tve-custom-menu-switch-icon-${o}`):r=!0,n.toggleClass("tve-regular",r),n.toggleClass("tve-dropdown",!r),n.find("li.menu-item").toggleClass("tcb-menu-img-hamburger",!r),l&&r&&d)return void a.ensureOnScreenDropdown(n);n.toggleClass("tve-regular",r),n.toggleClass("tve-dropdown",!r);const u=n.find(":not(.tve-ham-wrap) > ul.tve_w_menu, .tve-ham-wrap");if(r)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 e=t(this);e.data("masonry")&&e.masonry("destroy")}),!n.data("calc-dimensions")){n.find(".sub-menu").slideDown(0).slideUp(0).removeAttr("style"),n.data("calc-dimensions",!0);const e=u.attr("style","height: auto !important;max-height:none !important").outerHeight();u.removeAttr("style"),n.data("calc-height",e)}e?a.toggleState(n,!1):a.reposition(n)}a.ensureOnScreenDropdown(n)})},isHamburger(e){const t=s(e);return t.length>0&&t.attr("class").includes("tve-custom-menu-switch-icon-")},isVertical(e){const t=s(e);return t.length>0&&t.find(".tve_vertical").length>0},toggleState(e,t,o=100){const i=s(e),r=i.find("ul").first();let l=i.find(".tve-ham-wrap");0===l.length&&(l=r);const c=l.hasClass("tve-m-expanded");let d=!c;if(!this.hasVisibleItems(r))return i;if(void 0!==t&&(d=t),d===c)return i;if(i.hasClass("tve-mobile-side-fullscreen")&&n.$body.toggleClass("tve-fullscreen-menu",d),i.find(".tve-m-trigger").toggleClass("tve-triggered-icon",t),d?i.parents(".tcb-mp").addBack().css("z-index",800):setTimeout(()=>{a.zIndexOrder()},100),!i.hasClass("tve-mobile-dropdown")){if(d&&tve_frontend_options.is_editor_page){const e=i.find(".tve-m-trigger");e.hasClass("close-offscreen-icon-available")||e.append(e.find(".tcb-icon-close").clone().removeClass("tcb-icon-close").addClass("tcb-icon-close-offscreen")).addClass("close-offscreen-icon-available ")}return l.toggleClass("tve-m-expanded",t).removeAttr("style"),i}if(d){l.css("display","flex");const e=this.getMenuPositionalParent(i),t=parseInt(i.data("calc-height")||"500")+"px",n=e.outerWidth(),s=this.getMenuDropdownPosition(i,l,n);l.attr("style",`visibility: visible;display: flex;margin-left: 0 !important;${s}width:${n}px !important;max-height:${t}px`),l.addClass("tve-m-expanded"),setTimeout(()=>{l.css("max-height","none")},o)}else i.data("calc-height",l.outerHeight()),l.stop().slideUp(o,()=>{l.removeClass("tve-m-expanded").removeAttr("style"),l.css("visibility","hidden")});return i},getMenuDropdownPosition(e,t,o){const i=n.getDisplayType();let s=n.getMediaAttr(e,"data-dropdown-position",i);const a=e.find(".tve-m-trigger .tcb-icon-close"),r=a.offset(),l=e.offset();let c="";switch(t.is("ul")&&(t=this.getMenuPositionalParent(e),s="full"),"mobile"===i&&(s="full"),s){case"left":c=`right: ${parseInt(l.left+e.outerWidth()-r.left-a.outerWidth())}px;left: unset;`;break;case"right":c=`left: ${parseInt(r.left-l.left)}px;right:unset;`;break;case"full":c=`left:${this.getMenuPositionalParent(e).offset().left-l.left}px;`;break;default:if(void 0!==s&&1===parseInt(e.attr("data-offscreen-width-setup"))){let e=t.css("max-width");(e.includes("%")||"none"===e)&&(e=t.outerWidth()),o=Math.min(o,parseInt(e))}c=`left: ${parseInt(r.left-l.left-o/2+a.outerWidth()/2)}px;right:unset;`}return c},getMenuPositionalParent:e=>e.closest(".tve-page-section-in, #tve_editor, #wrapper, .section-content"),reposition(e){const t=s(e),n=t.find(".tve-m-expanded").first(),o=n.length>0;if(t.find(".tve-m-trigger").toggleClass("tve-triggered-icon",o&&t.attr("class").includes("tve-mobile-")),o&&t.hasClass("tve-mobile-dropdown")){const e=this.getMenuPositionalParent(t),o=parseInt(t.data("calc-height")||"500")+"px",i=e.outerWidth(),s=this.getMenuDropdownPosition(t,n,i);let a=n.css("display");"none"===a&&(a="flex"),n.attr("style",`visibility: visible;margin-left: 0 !important;${s}width:${i}px !important;max-height:${o}px;display:${a}`),setTimeout(()=>{n.css("max-height","none")},100)}return t},closeAll(){t(".thrv_widget_menu").each((e,t)=>{a.toggleState(t,!1)})},positionLogo(e){(e||n.$body).find(".tcb-menu-logo-wrap").each((e,n)=>{const o=t(n),i=o.siblings(),s=Math.floor(i.length/2);i.eq(s).before(o)})},ensureLogoSplit(e){const t=s(e);t.hasClass("tcb-logo-split")&&(a.isHamburger(t)?a.ensureHamburgerLogoSplit(e):a.ensureRegularLogoSplit(e))},ensureHamburgerLogoSplit(e,n=s(e).find("li.tcb-menu-logo-wrap")){const o=s(e);if(n.children().length){o.find(".tcb-hamburger-logo").remove();const e=t('<div class="tcb-hamburger-logo"></div>');e.append(n.children()),o.find(".thrive-shortcode-html").prepend(e)}},ensureRegularLogoSplit(e){const t=s(e),n=t.find(".tcb-hamburger-logo .tcb-logo"),o=t.find("li.tcb-menu-logo-wrap");n.length&&o.length&&o.empty().append(n),a.handleLogoOverflow(t)},handleLogoOverflow(e){const t=e.find("li.tcb-menu-logo-wrap");if(t.length)if(a.menuOverflows(e)){const e=t.outerHeight(!0),n=t.outerWidth();t.closest(".thrive-shortcode-html").css("padding-top",e+"px"),t.css({top:`-${e}px`,left:`calc(50% - ${Math.round(n/2)}px)`,position:"absolute"})}else t.removeAttr("style"),t.closest(".thrive-shortcode-html").css("padding-top","");else e.find(".thrive-shortcode-html").css("padding-top","")},menuOverflows(e){let n=0;return e.find(".tve_w_menu > li").each(function(){n+=t(this).outerWidth(!0)}),n>e.parent().width()-5},addMutationListener(e){const t=s(e);let o;const i=()=>{cancelAnimationFrame(o),o=requestAnimationFrame(a.handleLogoOverflow.bind(this,t))};if(window.ResizeObserver){const e=t.find("ul.tve_w_menu")[0];if(!e)return;const o=new ResizeObserver(i);if(!t.data("resize-observer")){o.observe(e),t.data("resize-observer",o);const n=new MutationObserver(e=>{Array.from(e).forEach(e=>{e.target.classList.contains("tcb-menu-logo-wrap")||"UL"===e.target.tagName&&"childList"===e.type&&e.addedNodes.length&&Array.from(e.addedNodes).forEach(e=>n.observe(e,{attributes:!0}))}),t.hasClass("tve-regular")&&i()});t.find(".tve_w_menu > li:not(.tcb-menu-logo-wrap)").each((e,t)=>{n.observe(t,{attributes:!0})})}const s=t.find("li.tcb-menu-logo-wrap");if(s.length&&!s.data("resize-observer")&&(s.data("resize-observer",o),o.observe(s[0])),t.hasClass("tcb-mega-std")&&!t.data("mega-resize-observer")){let e;const o=new ResizeObserver(()=>{cancelAnimationFrame(e),e=requestAnimationFrame(a.handleMegaMenuPosition.bind(this,t))});t.find(".tcb-mega-drop").each((e,t)=>{n.inlineCssVariable(t,"top","var(--mega-menu-top,100%)")}),o.observe(t[0]),t.data("mega-resize-observer",o)}}},handleMegaMenuPosition(e){const t=e.find(".tve_w_menu");if(t.length){const o=e[0].getBoundingClientRect().bottom,i=getComputedStyle(t[0]),s=parseInt(i.getPropertyValue("border-bottom-width"));e.find(".menu-item.menu-item-has-children.lvl-0").each((e,t)=>{const i=t.getBoundingClientRect().bottom,a=o-i-s;a>0?n.inlineCssVariable(t,"--mega-menu-top",`calc(100% - ${a}px)`):n.inlineCssVariable(t,"--mega-menu-top","")})}},ensureOnScreenDropdown(e){const o=s(e),i=o.hasClass("tve-regular"),a=o.hasClass("tve-vertical-menu"),r=o.offset().left+o.outerWidth();o.find("li:last-child > ul").each((e,n)=>{const o=t(n),s=o.offset().left+o.outerWidth();Math.ceil(s-r)>=0&&i&&s<o.outerWidth()?o.css({left:"auto",right:"0px"}):o.css({left:"",right:""})}),i||a?o.find(".tve_w_menu > li li").each((e,t)=>{let o;a&&(o=t.parentNode.closest("li"),o&&o.classList.add("expand-children"));const s=t.getBoundingClientRect();let r=parseFloat(t.getAttribute("data-init-width"));if(r||(r=s.width,t.setAttribute("data-init-width",r)),r+s.left>document.body.offsetWidth){const e=document.body.offsetWidth-s.left,o=r-e;i&&r>e&&n.inlineCssVariable(t.parentNode,{left:`calc(100% - ${o}px)`})}else n.inlineCssVariable(t,{"max-width":"","min-width":""});o&&o.classList.remove("expand-children")}):o.find(".tve_w_menu > li li").each((e,t)=>{n.inlineCssVariable(t,{"max-width":"","min-width":""})})}};t(window).on("tcb_after_dom_ready",()=>a.init()),window.addEventListener("load",()=>a.init()),window.TCB_Front.menu=a,e.exports=a,TCB_Front.setModuleLoadedStatus("menu",!0)}(ThriveGlobal.$j,TCB_Front)}},t={};!function n(o){var i=t[o];if(void 0!==i)return i.exports;var s=t[o]={exports:{}};return e[o](s,s.exports,n),s.exports}(74208)})();
(()=>{var o;o=jQuery,window.BorlabsCookie=function(){"use strict";var e,t,n="#BorlabsCookieBox input[type='checkbox']",i="#BorlabsCookieBox",a="#BorlabsCookieBoxWrap",s="#BorlabsCookieBox input[type='checkbox'][name='cookieGroup[]']",c="._brlbs-btn-switch-status",r="data-borlabs-cookie-uid",l="data-borlabs-cookie-consent-history",d=".BorlabsCookie",u={},b={},h={},k={},p={scriptBlockerId:{},jsHandle:{}},f=!1,v={consents:{},expires:null,uid:"anonymous",version:null},g="borlabs-cookie",m={consentSaved:null,codeUnblocked:null,codeUnblockedAfterConsent:null},x=null,C=!1,y=null;function B(o,e){if(e){var t=e.querySelectorAll('a[href]:not([disabled]), button:not([disabled]), textarea:not([disabled]), input[type="text"]:not([disabled]), input[type="radio"]:not([disabled]), input[type="checkbox"]:not([disabled]), select:not([disabled])'),n=Array.from(t).filter((function(o){return 0!==o.offsetHeight})),i=n[0],a=n[n.length-1];("Tab"===o.key||9===o.keyCode)&&(o.shiftKey?document.activeElement===i&&(o.preventDefault(),a.focus()):document.activeElement===a&&(o.preventDefault(),i.focus()))}}function w(o){o.addEventListener("keydown",(function(e){return B(e,o)}),!0)}function O(o){o.removeEventListener("keydown",(function(e){return B(e,o)}),!0)}function L(){o(i).attr("aria-modal",!1)}var S,_=function(t){o(i).attr("aria-modal",!0),o("body").addClass("borlabs-position-fix"),w(document.querySelector(".cookie-box")),void 0===t&&(t=!1);var a=o(s),c=null;Object.keys(v.consents).length?(o("[data-borlabs-cookie-group]").each((function(){-1===Object.keys(v.consents).indexOf(this.dataset.borlabsCookieGroup)&&o(this).addClass("borlabs-hide")})),a.length&&"1"===e.boxLayoutAdvanced&&a.each((function(){c=this.value,"string"==typeof this.dataset.borlabsCookieCheckbox&&("object"==typeof v.consents[c]?o(this).prop("checked",!0):o(this).prop("checked",!1))}))):a.length&&a.each((function(){c=this.value,"1"===e.boxLayoutAdvanced&&"1"===e.ignorePreSelectStatus&&!1===f&&"essential"!==c&&(o(this).prop("checked",!1),o(n+"[name='cookies["+c+"][]']").prop("checked",!1).trigger("change"))})),e.blockContent?(o("#BorlabsCookieBox > div").addClass("_brlbs-block-content"),e.animation?(o("#BorlabsCookieBox > div").addClass("_brlbs-bg-animation"),setTimeout((function(){o("#BorlabsCookieBox > div").addClass("_brlbs-bg-dark")}),25)):o("#BorlabsCookieBox > div").addClass("_brlbs-bg-dark")):o("._brlbs-"+e.boxLayout+"-wrap").addClass("_brlbs-position-fixed"),o("#BorlabsCookieBox > div").css("display",""),o("#BorlabsCookieBox > div").addClass("show-cookie-box"),e.animation&&o("#BorlabsCookieBox ._brlbs-"+e.boxLayout).addClass("_brlbs-animated "+e.animationIn+(t&&e.animationDelay?" delay-1s":""));const r=o("#BorlabsCookieBox > div")[0];return r.offsetWidth,r.offsetHeight,o("#CookieBoxSaveButton")[0].focus({preventScroll:!0}),y=o("._brlbs-"+e.boxLayout+"-wrap")[0].offsetWidth+"px",!0},j=function(){return L(),O(document.querySelector(".cookie-box")),e.animation&&(o("#BorlabsCookieBox ._brlbs-"+e.boxLayout).removeClass("delay-1s "),o("#BorlabsCookieBox ._brlbs-"+e.boxLayout).removeClass(e.animationIn),o("#BorlabsCookieBox ._brlbs-"+e.boxLayout).addClass(e.animationOut)),o("#BorlabsCookieBox > div").addClass("borlabs-hide"),e.blockContent?o("#BorlabsCookieBox > div").removeClass("_brlbs-bg-dark"):o("._brlbs-"+e.boxLayout+"-wrap").addClass("_brlbs-position-fixed"),setTimeout((function(){o("._brlbs-"+e.boxLayout+"-wrap").removeAttr("style"),o("._brlbs-"+e.boxLayout+" .cookie-box .container").removeAttr("style"),o("._brlbs-"+e.boxLayout+" .cookie-preference .container").removeAttr("style"),e.animation&&(o("._brlbs-"+e.boxLayout).removeClass("_brlbs-animated"),o("._brlbs-"+e.boxLayout).removeClass("delay-1s"),o("._brlbs-"+e.boxLayout).removeClass(e.animationIn),o("._brlbs-"+e.boxLayout).removeClass(e.animationOut)),o("#BorlabsCookieBox > div").removeClass("show-cookie-box"),e.blockContent&&o("#BorlabsCookieBox > div").removeClass("_brlbs-block-content")}),e.animation?1e3:0),o("body").removeClass("borlabs-position-fix"),!0},D=function(){O(document.querySelector(".cookie-box")),w(document.querySelector(".cookie-preference"));var t=o(s),i=null;t.length&&t.each((function(){i=this.value,Object.keys(v.consents).length?!1===f&&(void 0!==v.consents[i]?(o(this).prop("checked",!0),o(this).trigger("change"),o(n+"[name='cookies["+i+"][]']").each((function(){-1!==v.consents[i].indexOf(this.value)?o(this).prop("checked",!0):o(this).prop("checked",!1),o(this).trigger("change")}))):(o(this).prop("checked",!1),o(this).trigger("change"),o(n+"[name='cookies["+i+"][]']").prop("checked",!1).trigger("change"))):("1"===e.ignorePreSelectStatus&&!1===f&&(o(this).prop("checked",!1),o("#BorlabsCookieBox [data-borlabs-cookie-group='"+this.value+"']").addClass("borlabs-hide")),o(this).trigger("change"),o(n+"[name='cookies["+i+"][]']").each((function(){"1"===e.ignorePreSelectStatus&&!1===f&&o(this).prop("checked",!1),o(this).trigger("change")})))})),o("._brlbs-"+e.boxLayout+" .cookie-box .container").animate({height:0,opacity:0},(function(){o("._brlbs-"+e.boxLayout+" .cookie-box").attr("aria-hidden",!0),o("._brlbs-"+e.boxLayout+" .cookie-preference").attr("aria-hidden",!1),o("#CookiePrefSave")[0].focus({preventScroll:!0}),o("._brlbs-"+e.boxLayout+"-wrap").animate({width:"100vw",maxWidth:"box"===e.boxLayout?"768px":"100%"},"box"===e.boxLayout?400:0,(function(){var t=o("._brlbs-"+e.boxLayout+" .cookie-preference .container")[0].scrollHeight;o("._brlbs-"+e.boxLayout+" .cookie-preference .container").animate({height:"80vh",maxHeight:t,opacity:1})}))}))},I=function(){O(document.querySelector(".cookie-preference")),o("._brlbs-"+e.boxLayout+" .cookie-preference .container").animate({height:0,opacity:0},(function(){o("._brlbs-"+e.boxLayout+" .cookie-box").attr("aria-hidden",!1),o("._brlbs-"+e.boxLayout+" .cookie-preference").attr("aria-hidden",!0),o("._brlbs-"+e.boxLayout+"-wrap").animate({maxWidth:"box"===e.boxLayout?y:"100%"},"box"===e.boxLayout?400:0,(function(){var t=o("._brlbs-"+e.boxLayout+" .cookie-box .container")[0].scrollHeight+"px";o("._brlbs-"+e.boxLayout+" .cookie-box .container").animate({height:t,opacity:1})})),o("#CookieBoxSaveButton")[0].focus()}))},T=function(t){return void 0!==t&&t.preventDefault(),o("._brlbs-"+e.boxLayout+" .cookie-preference .container a["+"data-cookie-back]").css("display","none"),o("._brlbs-"+e.boxLayout+" .cookie-preference .container a["+"data-cookie-back] + span._brlbs-separator").css("display","none"),o("._brlbs-"+e.boxLayout+" .cookie-box .container").css("height",0),o("._brlbs-"+e.boxLayout+" .cookie-box .container").css("opacity",0),o("._brlbs-"+e.boxLayout+"-wrap").css({width:"100vw",maxWidth:"box"===e.boxLayout?"768px":"100%"}),_(!1),setTimeout((function(){D()}),500),!0},E=function(){o("[data-cookie-accordion]").on("click","[data-cookie-accordion-target]",(function(e){e.preventDefault();var t=o(this).closest("[data-cookie-accordion]");t.find("[data-cookie-accordion-parent]:visible").length&&(t.find("[data-cookie-accordion-status='hide']").addClass("borlabs-hide"),t.find("[data-cookie-accordion-status='show']").removeClass("borlabs-hide"),t.find("[data-cookie-accordion-parent]:visible").slideUp()),t.find("[data-cookie-accordion-parent='"+this.dataset.cookieAccordionTarget+"']:hidden").length&&(o(this).children("[data-cookie-accordion-status='show']").addClass("borlabs-hide"),o(this).children("[data-cookie-accordion-status='hide']").removeClass("borlabs-hide"),t.find("[data-cookie-accordion-parent='"+this.dataset.cookieAccordionTarget+"']").slideDown())}))},A=function(){var e=o(s),t=null;e.length&&e.each((function(){t=this.value,o(this).prop("checked",!0),o(this).trigger("change"),o(n+"[name='cookies["+t+"][]']").each((function(){o(this).prop("checked",!0),o(this).trigger("change")}))})),N(),j()},U=function(){o(document).on("click",s,(function(){f=!0,this.checked?(o(n+"[name='cookies["+this.value+"][]']").prop("checked",!0).trigger("change"),o(s+"[value='"+this.value+"']").prop("checked",!0),o("#BorlabsCookieBox [data-borlabs-cookie-group='"+this.value+"']").length&&o("#BorlabsCookieBox [data-borlabs-cookie-group='"+this.value+"']").removeClass("borlabs-hide")):(o(n+"[name='cookies["+this.value+"][]']").prop("checked",!1).trigger("change"),o(s+"[value='"+this.value+"']").prop("checked",!1),o("#BorlabsCookieBox [data-borlabs-cookie-group='"+this.value+"']").length&&o("#BorlabsCookieBox [data-borlabs-cookie-group='"+this.value+"']").addClass("borlabs-hide"))}))},P=function(){o(document).on("click",n+"[name^='cookies']",(function(){f=!0,this.checked&&(o(s+"[value='"+this.dataset.cookieGroup+"']").prop("checked",!0).trigger("change"),o("#BorlabsCookieBox [data-borlabs-cookie-group='"+this.dataset.cookieGroup+"']").length&&o("#BorlabsCookieBox [data-borlabs-cookie-group='"+this.dataset.cookieGroup+"']").removeClass("borlabs-hide"))}))},H=function(){!0===this.checked?(o(this).parent().parent().children(c).children().last().css("display","none"),o(this).parent().parent().children(c).children().first().css("display","inline-block")):(o(this).parent().parent().children(c).children().first().css("display","none"),o(this).parent().parent().children(c).children().last().css("display","inline-block"))},N=function(){var t={essential:e.cookies.essential},i=o(s+":checked"),a=o(n+"[name^='cookies']:checked");if(i.length&&(i.each((function(){this.value.length&&new RegExp(/^[a-z-_]{3,}$/).test(this.value)&&"essential"!==this.value&&(t[this.value]=[])})),a.length&&a.each((function(){this.value.length&&"string"==typeof this.dataset.cookieGroup&&new RegExp(/^[a-z-_]{3,}$/).test(this.value)&&new RegExp(/^[a-z-_]{3,}$/).test(this.dataset.cookieGroup)&&t[this.dataset.cookieGroup].push(this.value)}))),Object.keys(v.consents).length)for(var c in v.consents)if(void 0!==t[c])for(var r in v.consents[c])-1===t[c].indexOf(v.consents[c][r])&&K(v.consents[c][r]);else if(void 0!==u[c])for(var l in u[c])K(l);if(Object.keys(v.consents).length)for(var c in v.consents)if(void 0!==t[c])for(var r in v.consents[c])-1===t[c].indexOf(v.consents[c][r])&&Q(c,v.consents[c][r]);else if(void 0!==u[c])for(var l in u[c])Q(c,l);J(t,!1),"1"!==e.reloadAfterConsent&&(V(),F(),Y(),document.dispatchEvent(m.codeUnblockedAfterConsent),document.dispatchEvent(m.codeUnblocked))},R=function(){var o=!1;return"string"==typeof v.version&&(v.version===e.cookieVersion?o=!0:v.consents={}),o},G=function(){if(document.cookie.length)for(var o=document.cookie.split(";"),t=0;t<o.length;t++)try{o[t]=decodeURIComponent(o[t]);var n=o[t].split("="),i=void 0!==n[0]?n[0].trim():"",a=void 0!==n[1]?n[1].trim():"";if(i===g){var s=JSON.parse(decodeURIComponent(a));void 0!==s.domainPath?s.domainPath===e.cookieDomain+e.cookiePath&&(v=s):v=s}}catch(e){console.log("The cookie is spoiled:"),console.dir(o[t]),console.dir(e)}return v},J=function(o,t){var n={},i="",a=[],s=e.cookieLifetime;if(1===Object.keys(o).length&&void 0!==e.cookieLifetimeEssentialOnly&&(s=e.cookieLifetimeEssentialOnly),!1===t||!1===R()){var c=new Date;c.setTime(c.getTime()+24*parseInt(s)*60*60*1e3),i=c.toUTCString()}else i=v.expires;n.consents=o,n.domainPath=e.cookieDomain+e.cookiePath,n.expires=i,n.uid=v.uid,n.version=e.cookieVersion,void 0===n.consents.essential&&(n.consents.essential=e.cookies.essential);var r=!0;1===Object.keys(o).length?(n.uid="anonymous",("anonymous"!==v.uid||1===Object.keys(v.consents).length)&&(r=!1)):"anonymous"===v.uid?(n.uid=$(),1===Object.keys(v.consents).length&&(r=!1)):"anonymous"!==v.uid&&(r=!1),a.push(g+"="+encodeURIComponent(JSON.stringify(n))),""!==e.cookieDomain&&""===e.automaticCookieDomainAndPath&&a.push("domain="+e.cookieDomain),a.push("path="+e.cookiePath),a.push("expires="+i),a.push("SameSite="+e.cookieSameSite),e.cookieSecure&&a.push("secure"),document.cookie=a.join(";"),G(),no(r),ao(r),document.dispatchEvent(m.consentSaved)},M=function(o,t,n){var i,a="",s=[],c="",r=new Date;return null==t||!1===t?""!==e.cookieDomain&&""===e.automaticCookieDomainAndPath&&(a=e.cookieDomain):a=t,void 0===n&&(n=!1),i=function(o,e){var t={name:"",value:""};if(void 0===e&&(e=!1),e&&(o=o.replace("*","")),document.cookie.length)for(var n=document.cookie.split(";"),i=0;i<n.length;i++)try{n[i]=decodeURIComponent(n[i]);var a=n[i].split("="),s=void 0!==a[0]?a[0].trim():"",c=void 0!==a[1]?a[1].trim():"";e?-1!==s.indexOf(o)&&(t.name=s,t.value=c):s===o&&(t.name=s,t.value=c)}catch(o){console.log("The cookie is spoiled:"),console.dir(n[i]),console.dir(o)}return t}(o,n),i.name.length&&(s.push(i.name+"="),""!==a&&s.push("domain="+a),s.push("path="+e.cookiePath),r.setTime(r.getTime()-864e5),c=r.toUTCString(),s.push("expires="+c),document.cookie=s.join(";")),!0},z=function(o,e){return function(o,e){"string"==typeof o&&o.length&&new RegExp(/^[a-z-_]{3,}$/).test(o)&&(void 0===v.consents[o]&&(v.consents[o]=[]),"string"==typeof e&&new RegExp(/^[a-z-_]{3,}$/).test(e)&&-1===v.consents[o].indexOf(e)&&v.consents[o].push(e)),J(v.consents,!0)}(o,e),!0},W=function(o,e){return function(o,e){if("string"==typeof o&&o.length&&new RegExp(/^[a-z-_]{3,}$/).test(o)){var t=!0;"string"==typeof e&&new RegExp(/^[a-z-_]{3,}$/).test(e)&&void 0!==v.consents[o]&&-1!==v.consents[o].indexOf(e)&&(v.consents[o].splice(v.consents[o].indexOf(e),1),t=!1),!0===t&&void 0!==v.consents[o]&&delete v.consents[o]}Object.keys(v.consents).length&&J(v.consents,!0)}(o,e),K(e),Q(o,e),!0},q=function(o){var e=!1;for(var t in v.consents)-1!==v.consents[t].indexOf(o)&&(e=!0);return e},$=function(){function o(){var o="";if("object"==typeof window.crypto){var e=0,t=new Uint32Array(4);for(window.crypto.getRandomValues(t);e<4;e++)o+="abcdefhgihjklmnopqrstuvwxyz0123456789"[t[e]%37]}else o=Math.floor(65536*(1+Math.random())).toString(16).substring(1);return o}return o()+o()+"-"+o()+o()+"-"+o()+o()+"-"+o()+o()},V=function(){for(var e in v.consents)for(var n in v.consents[e]){var i=v.consents[e][n];void 0!==u[e]&&void 0!==u[e][i]&&(void 0!==t[e]&&void 0!==t[e][i]&&(o("body").append(to(t[e][i])),delete t[e][i]),void 0!==u[e][i].optInJS&&(o("body").append(to(u[e][i].optInJS)),u[e][i].optInJS=""))}},F=function(){o("[data-borlabs-cookie-type='cookie-group']").each((function(){if(void 0!==v.consents[this.dataset.borlabsCookieId]){var t;t="javascript"===e.cookieBoxIntegration?to(this.firstChild.innerHTML):to(this.innerHTML),o(this).prev().length?o(this).prev().after(t):o(this).parent().prepend(t),this.parentNode.removeChild(this)}}))},Y=function(){o("[data-borlabs-cookie-type='cookie']").each((function(){for(var t in v.consents)if(-1!==v.consents[t].indexOf(this.dataset.borlabsCookieId)){var n;n="javascript"===e.cookieBoxIntegration?to(this.firstChild.innerHTML):to(this.innerHTML),o(this).prev().length?o(this).prev().after(n):o(this).parent().prepend(n),this.parentNode.removeChild(this)}}))},K=function(o){null===x&&(x=[],C=!0),x.push(o)},Q=function(e,t){if(void 0!==u[e]&&void 0!==u[e][t]&&void 0!==u[e][t].optOutJS){var n=to(u[e][t].optOutJS);void 0!==u[e][t].settings.asyncOptOutCode&&"1"===u[e][t].settings.asyncOptOutCode||(n+="<script>window.BorlabsCookie.optOutDone('"+t+"')<\/script>"),o("body").append(n),u[e][t].optOutJS=""}},X=function(t){t.preventDefault();var n,i,a=o(this).parents(".BorlabsCookie"),s=!1;if(n=a.find("[data-borlabs-cookie-type='content-blocker']")[0].dataset.borlabsCookieId,void 0!==b[n]&&void 0!==b[n].settings.unblockAll&&"1"===b[n].settings.unblockAll&&(s=!0),(i=a.find("input[type='checkbox'][name='unblockAll']")).length&&(s=!!i[0].checked),s)for(var c in o("[data-borlabs-cookie-type='content-blocker'][data-borlabs-cookie-id='"+n+"']").each((function(){Z(o(this).parents(".BorlabsCookie"))})),e.cookies)-1!==e.cookies[c].indexOf(n)&&z(c,n);else Z(a)},Z=function(o){var t=o.find("[data-borlabs-cookie-type='content-blocker']"),n="";if(t.length){var i;n=t[0].dataset.borlabsCookieId,void 0!==b[n].settings.executeGlobalCodeBeforeUnblocking&&"1"===b[n].settings.executeGlobalCodeBeforeUnblocking&&void 0===h[n]&&(b[n].global(b[n]),h[n]=!0),i="javascript"===e.cookieBoxIntegration?to(t[0].firstChild.innerHTML):to(t[0].innerHTML);var a=setInterval((function(){var e=!0;void 0!==k[n]&&(void 0!==k[n].scriptBlockerId&&Object.entries(k[n].scriptBlockerId).forEach((o=>{var t=o[0];!0!==eo(k[n].scriptBlockerId[t],"scriptBlockerId")&&(e=!1)})),void 0!==k[n].jsHandle&&Object.entries(k[n].jsHandle).forEach((o=>{var t=o[0];!0!==eo(k[n].jsHandle[t],"jsHandle")&&(e=!1)}))),!0===e&&(clearInterval(a),o.prev().length?o.prev().after(i):o.parent().prepend(i),void 0!==b[n].settings.executeGlobalCodeBeforeUnblocking&&"0"!==b[n].settings.executeGlobalCodeBeforeUnblocking||void 0===h[n]&&(b[n].global(b[n]),h[n]=!0),b[n].init(o.prev()[0],b[n]),o[0].parentNode.removeChild(o[0]))}),50)}},oo=function(e,t,n){var i=o(e)[0];if(void 0!==i){var a=document.createElement("script");for(var s of i.attributes)-1===s.name.indexOf("borlabs")&&-1===s.name.indexOf("type")&&a.setAttribute(s.name,s.value);"string"==typeof i.dataset.borlabsScriptBlockerSrc?(a.src=i.dataset.borlabsScriptBlockerSrc,a.onload=function(){p[n][t]--,oo(e,t,n)},i.parentNode.insertBefore(a,i),i.parentNode.removeChild(i)):(a.type="text/javascript",a.innerHTML=i.innerHTML,i.parentNode.insertBefore(a,i),i.parentNode.removeChild(i),p[n][t]--,oo(e,t,n))}return!0},eo=function(o,e){var t=!1;return void 0!==p[e][o]&&0===p[e][o]&&(t=!0),t},to=function(o){return decodeURIComponent(Array.prototype.map.call(window.atob(o),(function(o){return"%"+("00"+o.charCodeAt(0).toString(16)).slice(-2)})).join(""))},no=function(t){!1===/bot|googlebot|crawler|spider|robot|crawling|lighthouse/i.test(navigator.userAgent.toLowerCase())&&o.ajax(e.ajaxURL,{type:"POST",data:{action:"borlabs_cookie_handler",type:"log",language:e.language,cookieData:v,essentialStatistic:t}}).done((function(){e.reloadAfterConsent&&Object.keys(v.consents).length>0&&location.reload(!0),C&&bo()}))},io=function(){o.ajax(e.ajaxURL,{type:"POST",data:{action:"borlabs_cookie_handler",type:"consent_history",language:e.language,uid:v.uid}}).done((function(e){(e=o.parseJSON(e)).length&&o.each(e,(function(e,t){o("["+l+"] table").append("<tr><td>"+t.stamp+"</td><td>"+t.version+"</td><td>"+t.consent+"</td></tr>")}))}))},ao=function(t){e.crossDomainCookie.length&&Object.entries(e.crossDomainCookie).forEach((n=>{var i=e.crossDomainCookie[n[0]];o("body").append('<iframe class="borlabs-hide" src="'+i+"?__borlabsCookieCall=cDC&cookieLang="+e.language+"&cookieData="+encodeURIComponent(JSON.stringify(v))+"&essentialStatistic="+(t?1:0)+'"></iframe>')}))},so=function(){o(".BorlabsCookie [name^='borlabsCookie']").each((function(){q(this.value)?this.checked=!0:this.checked=!1,o(this).trigger("change")})),o(document).on("change",".BorlabsCookie [name^='borlabsCookie']",(function(){this.checked?z(this.dataset.cookieGroup,this.value):W(this.dataset.cookieGroup,this.value)}))},co=window.scrollY||document.documentElement.scrollTop,ro=null,lo=null,uo=document.getElementById("BorlabsCookieBoxWidget");uo&&window.addEventListener("scroll",(function(){(S=window.scrollY||document.documentElement.scrollTop)>co?ro="up":S<co&&(ro="down"),ro!==lo&&("up"===ro?(uo.classList.add("_brlbs-hide-mobile"),lo=ro):"down"===ro&&(uo.classList.remove("_brlbs-hide-mobile"),lo=ro)),co=S}));var bo=function(){C=!1,0===x.length&&(x=null,e.reloadAfterOptOut&&window.location.reload())};return{addConsent:z,allocateScriptBlockerToContentBlocker:function(o,e,t){"scriptBlockerId"!==t&&"jsHandle"!==t||(void 0===k[o]&&(k[o]={scriptBlockerId:[],jsHandle:[]}),-1===k[o][t].indexOf(e)&&k[o][t].push(e))},callWhenLoaded:function(o,e){var t=function(){!0===window.hasOwnProperty(o)?e(e):window.setTimeout(t,1e3)};t()},checkCookieConsent:q,checkCookieGroupConsent:function(o){var e=!1;return void 0!==v.consents[o]&&(e=!0),e},deleteCookie:M,getCookie:G,hideCookieBox:j,init:function(n,i,c,h){return"about:blank"!==window.location.href&&(e=o.extend({ajaxURL:"",language:"en",animation:"1",animationDelay:"",animationIn:"fadeIn",animationOut:"fadeOut",blockContent:"",boxLayout:"box",boxLayoutAdvanced:"0",automaticCookieDomainAndPath:"",cookieDomain:"",cookiePath:"",cookieSameSite:"Lax",cookieSecure:!0,cookieLifetime:"365",crossDomainCookie:[],cookieBeforeConsent:"",cookiesForBots:"1",cookieVersion:"1",hideCookieBoxOnPages:[],respectDoNotTrack:"",reloadAfterConsent:"",reloadAfterOptOut:"1",showCookieBox:"1",cookieBoxIntegration:"javascript",ignorePreSelectStatus:"1",cookies:[]},n),t=h,u=i,b=c,m.consentSaved=document.createEvent("Event"),m.consentSaved.initEvent("borlabs-cookie-consent-saved",!0,!0),m.codeUnblocked=document.createEvent("Event"),m.codeUnblocked.initEvent("borlabs-cookie-code-unblocked",!0,!0),m.codeUnblockedAfterConsent=document.createEvent("Event"),m.codeUnblockedAfterConsent.initEvent("borlabs-cookie-code-unblocked-after-consent",!0,!0),G(),function(){if(Object.keys(u).length)for(var o in u)if(Object.keys(u[o]).length)for(var e in u[o])if(void 0!==u[o][e].settings&&void 0!==u[o][e].settings.blockCookiesBeforeConsent&&"1"===u[o][e].settings.blockCookiesBeforeConsent&&void 0!==u[o][e].cookieNameList&&!1===q(e))for(var t in u[o][e].cookieNameList)M(t,null,-1!==t.indexOf("*")),M(t,"",-1!==t.indexOf("*"))}(),e.cookieBeforeConsent&&(null!==v.uid&&"anonymous"!==v.uid||(v.uid=$()),"function"==typeof Object&&(void 0===Object.entries&&(Object.entries=function(o){for(var e=Object.keys(o),t=e.length,n=new Array(t);t--;)n[t]=[e[t],o[e[t]]];return n}),0===Object.entries(v.consents).length&&null===v.expires&&(function(){var o={},t=[],n=e.cookieLifetimeEssentialOnly,i=new Date;i.setTime(i.getTime()+24*parseInt(n)*60*60*1e3);var a=i.toUTCString();o.consents={},o.domainPath=e.cookieDomain+e.cookiePath,o.expires=a,o.uid=v.uid,o.version=null,t.push(g+"="+encodeURIComponent(JSON.stringify(o))),""!==e.cookieDomain&&""===e.automaticCookieDomainAndPath&&t.push("domain="+e.cookieDomain),t.push("path="+e.cookiePath),t.push("expires="+a),t.push("SameSite="+e.cookieSameSite),e.cookieSecure&&t.push("secure"),document.cookie=t.join(";"),G()}(),no(!0)))),o(a).length&&"SCRIPT"===o(a)[0].tagName&&o(a).after(o(a).html()),o(document).on("click","[data-cookie-accept]",(function(o){o.preventDefault(),N(),j()})),o(document).on("click","[data-cookie-accept-all]",(function(o){o.preventDefault(),A()})),o(document).on("click","[data-cookie-back]",(function(o){o.preventDefault(),I()})),o(document).on("click","[data-cookie-individual]",(function(o){o.preventDefault(),D()})),o(document).on("click","[data-cookie-refuse]",(function(e){e.preventDefault();var t=[];o(s+":checked").each((function(){-1===t.indexOf(this.value)&&(o(this).trigger("click"),t.push(this.value))})),N(),j()})),E(),U(),P(),!0===R()?(V(),F(),Y(),document.dispatchEvent(m.codeUnblocked),L()):e.showCookieBox?0===e.hideCookieBoxOnPages.length||-1===e.hideCookieBoxOnPages.indexOf(window.location.protocol+"//"+window.location.host+window.location.pathname)?e.cookiesForBots&&/bot|googlebot|crawler|spider|robot|crawling|lighthouse/i.test(navigator.userAgent.toLowerCase())?(J(e.cookies,!1),V(),F(),Y(),L(),document.dispatchEvent(m.codeUnblocked)):e.respectDoNotTrack&&void 0!==navigator.doNotTrack&&"1"===navigator.doNotTrack?(J({essential:e.cookies.essential},!1),V(),F(),Y(),L(),document.dispatchEvent(m.codeUnblocked)):_(!0):(V(),F(),Y(),L(),document.dispatchEvent(m.codeUnblocked)):L(),o(document).on("click","[data-borlabs-cookie-unblock]",X),o(document).on("click","[data-borlabs-cookie-preference]",T),o(document).on("click",".borlabs-cookie-preference",T),o(document).on("change","[data-borlabs-cookie-switch]",H),o(document).on("keydown",(function(e){9===e.keyCode&&o(d).addClass("_brlbs-keyboard")})),o(document).on("mousedown",(function(e){o(d).is(":visible")&&o(d).removeClass("_brlbs-keyboard")})),o("body").on("focus",".BorlabsCookie._brlbs-keyboard input[type='checkbox']",(function(e){var t=o(e.currentTarget).closest("label");t&&o(t).addClass("_brlbs-focused")})),o(d).on("blur","input[type='checkbox']",(function(e){var t=o(e.currentTarget).closest("label");t&&o(t).removeClass("_brlbs-focused")})),o("["+l+"]").length&&io(),so(),o("["+r+"]").length&&o("["+r+"]").each((function(){o(this).html(v.uid)})),!0)},initConsentHistoryTable:io,initSwitchConsentButtonStatus:so,openCookiePreference:T,removeConsent:W,showCookieBox:_,unblockContentId:function(e){o("[data-borlabs-cookie-type='content-blocker'][data-borlabs-cookie-id='"+e+"']").each((function(){Z(o(this).parents(".BorlabsCookie"))}))},unblockScriptBlockerId:function(e){var t="[data-borlabs-script-blocker-id='"+e+"']";return o(t).length&&(p.scriptBlockerId[e]=o(t).length,oo(t,e,"scriptBlockerId")),!0},unblockScriptBlockerJSHandle:function(e){var t="[data-borlabs-script-blocker-js-handle='"+e+"']";return o(t).length&&(p.jsHandle[e]=o(t).length,oo(t,e,"jsHandle")),!0},optOutDone:function(o){null!==x?x.length!==(x=x.filter((function(e,t,n){return e!==o}))).length?0!==x.length||C||(x=null,e.reloadAfterOptOut&&window.location.reload()):console.log('No opt out found for cookie "'+o+'"'):console.log("No opt out has been initialized")}}}()})();