(()=>{var t={65017(t){!function(e){const i={};let a,o=!1;function n(t,e){const i=e?t.parents(".safari-ios-decoration-fix"):t.parents(".safari-ios-decoration-fix-none");t.toggleClass("tcb-no-perspective",e),i.toggleClass("safari-ios-decoration-fix",!e).toggleClass("safari-ios-decoration-fix-none",e)}function r(t,e){const i=t.parents(".tve_ea_thrive_animation");i.length&&i.toggleClass("tcb-no-transform",e)}i.init=function(){a=i.videoScrolled.bind(this),document.addEventListener("scroll",a),e(".tcb-float-close-button").each((t,e)=>{e.addEventListener("click",i.closeFloatVideo.bind(this,e),!1)})},i.destroyFloating=function(){document.removeEventListener("scroll",a),e(".tcb-float-close-button").each((t,e)=>{e.removeEventListener("click",i.closeFloatVideo.bind(this,e))})},i.closeFloatVideo=function(t){e(t).parent(".tcb-video-float-container").addClass("tcb-float-closed"),i.videoScrolled()},i.videoScrolled=function(){e('.thrv_responsive_video[data-float="true"] .tcb-video-float-container iframe, .thrv_responsive_video[data-float="true"] .tcb-video-float-container video, .thrv_responsive_video[data-float="true"] .tcb-video-float-container .tve_responsive_video-no_video').each((t,i)=>{const a=e(i),s=a.parents(".tcb-video-float-container"),c=a.parents(".thrv_responsive_video"),d=c.attr("data-float-position"),l=c.find(".video_overlay_image").attr("style")||"";let u=TCB_Front.getDisplayType()[0],p=parseInt(e("#wpadminbar").height());if(s.hasClass("tcb-float-closed")||!function(t){if(t.parents(".tcb-post-list").length)return!1;const e="true"===t.attr("data-float"),i=t.attr("data-float-visibility");if(e&&!i)return!0;const a=TCB_Front.getDisplayType();return-1===i.indexOf(a)}(c)||TCB_Front.isInViewport(a.parents(".thrv_responsive_video"),parseInt(a.width))){if(s.removeClass(d).css({width:"",height:"","margin-top":""}).parents(".tcb-col,.thrv-content-box,.thrv-page-section,#content,.theme-section").css("z-index",""),c.find(".video_overlay_image").removeClass(d).css({cssText:l,height:"",width:""}),!o){const t=c.position().left,e={left:t,right:t+c.width()};d.includes("top")||d.includes("keep")?(e.top=-parseInt(c.attr(`data-float-width-${u}`)),s.css(e)):d.includes("bottom")&&(e.bottom=parseInt(TCB_Front.Utils.windowWidth()),s.css(e)),c.find(".video_overlay_image").css({top:"",left:"",bottom:"",right:"","margin-top":""}),o=!0}n(c,!1),r(c,!1)}else{void 0===c.attr(`data-float-width-${u}`)&&("m"===u&&(c.attr("data-float-width-m",TCB_Front.$window.width()+"px;"),c.attr("data-float-padding1-m",0),c.attr("data-float-padding2-m",0),p=0),"t"===u&&(u="d"));const t="height: "+function(t){const e=parseFloat(t.height()/t.width()).toFixed(2),i=TCB_Front.getDisplayType()[0],a=t.attr(`data-float-width-${i}`)||t.attr("data-float-width-d"),o=parseInt(a)*e;return a.includes("px")?o+"px":o*TCB_Front.$body.width()/100+"px"}(c)+" !important;",e="width: "+c.attr(`data-float-width-${u}`)+" !important;";let i="";if(d.includes("keep-original")){const t=c.attr(`data-float-padding1-${u}`);TCB_Front.Utils.hasAdminBar()&&p&&(i+=`margin-top: ${p}px;`),i+=`top: ${t} !important; `}else d.split("-").forEach((t,e)=>{const a=c.attr(`data-float-padding${e+1}-${u}`);TCB_Front.Utils.hasAdminBar()&&t.includes("top")&&p&&(i+=`margin-top: ${p}px;`),i+=`${t}: ${a} !important; `});d&&(s.addClass(d).css({cssText:e+t+i}).parents(".tcb-col,.thrv-content-box,.thrv-page-section,#content,.theme-section").css("z-index",(TCB_Front.highestZIndex||0)+10),a.css("height",""),c.find("video").length&&function(t){t.find("video").css({"object-fit":"cover",height:"100%"})}(c),c.find(".video_overlay_image").addClass(d).css({cssText:l+e+t+"z-index:100000 !important; top:inherit; left:inherit; bottom:inherit; right: inherit; margin-top: inherit;"}),n(c,!0),r(s,!0),o=!1)}})},i.restoreFloatingVideos=function(){e(".thrv_responsive_video").each((t,i)=>{const a=e(i),o=a.find(".tcb-video-float-container"),n=a.attr("data-float-position"),r=a.find(".video_overlay_image").attr("style")||"";o.removeClass(n).css({width:"",height:""}),a.find(".video_overlay_image").removeClass(n).css({cssText:r,height:"",width:"",top:"",left:"",bottom:"",right:"","margin-top":""})})},t.exports=i}(ThriveGlobal.$j)},93890(t,e,i){t.exports=(t,e)=>{const a='.tcb-video-cover:not([data-preload="1"]) .tcb-video-cover-image',o=i(82368)(t,e),n=i(23814),r=[];class s{static initVideoLazyLoad(e){const i=e.find(".thrv_responsive_video.tcb-lazy-load");0!==i.length&&(TCB_Front.add_scroll_callback(e=>{e>0&&i.each((e,i)=>{const o=t(i);if(s.hasVideoCover(o)){const t=o.find(a);t.length>0&&s.lazyLoadThumbnail(t)}else s.lazyLoadVideo(o,"external"===i.dataset.type)})}),i.each((e,i)=>{const a=t(i);a.off("click").on("pointerover",()=>s.preconnectAssets(a)).on("click",()=>s.lazyLoadVideo(a,"external"===i.dataset.type,!0))}))}static preventIframeLoad(e,i,a){const o=t(i).closest(".thrv_responsive_video");return a&&!TCB_Front.Utils.isEditorPage()&&s.shouldLazyLoad(o)&&(e=!0),e}static shouldLazyLoad(t){return t.hasClass("tcb-lazy-load")&&(s.hasVideoCover(t)||!TCB_Front.isInViewport(t,-150)||s.isInsideScreenFiller(t))}static isInsideScreenFiller(t){return"hidden"===t.closest(".tve-leads-screen-filler").css("visibility")}static hasVideoCover(t){return t.find(".video_overlay_image, .tcb-video-cover").length>0}static lazyLoadVideo(e,i=!1,a=!1){const o=e.find(i?"source":"iframe"),n=o.attr("src");if(o.hasClass("tcb-video-lazy-loaded")||n&&n.length>0||!e.is(":visible")||s.isInsideScreenFiller(o)||!TCB_Front.isInViewport(e,-150)&&!a)return;o.hasClass("vooplayer")&&!TCB_Front.vooplayerScriptsLoaded&&(t.getScript("https://s3.spotlightr.com/assets/vooplayer.js"),TCB_Front.vooplayerScriptsLoaded=1);let r=o.attr("data-src");r&&"null"!==r&&(r=TCB_Front.Hooks.applyFilters("tcb.video.lazy_load.src",r,e),o.attr("src",r),i&&o.closest("video")[0].load()),o.removeAttr("data-src").addClass("tcb-dr-done tcb-video-lazy-loaded"),a&&TCB_Front.onVideoClick(e)}static lazyLoadThumbnails(e){e.find(a).each((e,i)=>{const a=t(i);a.closest(".tcb-lazy-load").length>0&&s.lazyLoadThumbnail(a)})}static lazyLoadThumbnail(t){if(!TCB_Front.Utils.isEditorPage()&&(t.hasClass("tcb-src-loaded")||!t.is(":visible")||!TCB_Front.isInViewport(t.closest(".thrv_responsive_video"),-250)))return;const e=t.attr("data-src");e&&"null"!==e&&t.attr("src",e),t.removeAttr("data-src"),TCB_Front.Utils.isEditorPage()||t.addClass("tcb-src-loaded")}static preconnectAssets(t){const e=t.attr("data-type");if(r.includes(e))return;let i=[];switch(e){case"youtube":i=o.getAssetsToPreconnect();break;case"vimeo":i=s.getVimeoAssetsToPreconnect();break;case"wistia":i=s.getWistiaAssetsToPreconnect();break;case"external":const e=t.find("source").attr("data-src");void 0!==e&&(i=[new URL(e).origin]);break;case"vooplayer":i=n.getAssetsToPreconnect()}i.forEach(t=>s.addPreconnectLink(t)),r.push(e)}static addPreconnectLink(t){const e=document.createElement("link");e.rel="preconnect",e.href=t,document.head.append(e)}static getVimeoAssetsToPreconnect(){return["https://f.vimeocdn.com","https://player.vimeo.com","https://i.vimeocdn.com"]}static getWistiaAssetsToPreconnect(){return["https://fast.wistia.net"]}}return s}},49814(t,e,i){t.exports=(t,e)=>{const a=i(42166),o=i(82368)(t,e),n=i(23814),r=i(70025)(t,e),s=i(93890)(t,e);class c{static get identifier(){return".thrv_responsive_video"}static init(){c.initHooks()}static initHooks(){t(e).on("tcb_after_dom_ready",()=>c.onDomReady()).on("tcb_after_lightbox_open",(e,i)=>{t(i).find(`${c.identifier}:not([data-type="dynamic"])`).each((e,i)=>c.autoplayVideo(t(i)))}).on("tcb_before_lightbox_close",(e,i)=>c.pauseVideos(t(i))).on("tcb_on_content_hide",(e,i)=>c.pauseVideos(t(i))).on("tve-content-revealed",(e,i)=>c.maybeAutoplayVideo(t(i))).on("tcb_toggle_open",(e,i)=>c.maybeAutoplayVideo(t(i))).on("tcb_toggle_close",(e,i)=>c.pauseVideos(t(i))).on("tcb_on_content_show",(e,i)=>c.maybeAutoplayVideo(t(i))).on("tve_after_content_toggle",(t,e,i)=>{i&&s.lazyLoadThumbnails(e)}),TCB_Front.Hooks.addFilter("tcb.is_iframe_load_prevented",s.preventIframeLoad)}static onDomReady(){const e=t("body");c.pauseVideos(t(".tve_p_lb_content")),c.pauseVideos(t(`${c.identifier}:hidden`)),o.onDomReady(),TCB_Front.Utils.isEditorPage()||(r.init(),c.maybeAutoplayVideo(e),c.initOnClickEvent(),s.initVideoLazyLoad(e)),n.onDOMReady(),t(".tcb-video-background-el").each((t,e)=>e.parentNode.classList.add("tcb-video-background-parent"))}static initOnClickEvent(){t(c.identifier).off("click.thumbnail").on("click.thumbnail",e=>c.onClick(t(e.currentTarget),e)),TCB_Front.$document.off("click.tcb-video-delegate").on("click.tcb-video-delegate",`${c.identifier}, ${c.identifier} *`,e=>{if(e.tcbVideoHandled)return;const i=t(e.target).closest(c.identifier);i.length&&(e.tcbVideoHandled=!0,c.onClick(i,e))})}static onClick(t,e){const i=t.find(c.overlaySelector),n=t.find(".tcb-video-float-container.tcb-float-closed").length>0,r=i.length>0&&i.is(":visible");let s=c.detectProvider(t);if(TCB_Front.Hooks.doAction("tcb.video.before_autoplay",t,s),a.isCustomProvider(s)){if(!r)return;if(n)return void(i.length>0&&i.fadeOut());switch(s){case"youtube":o.play(t);break;case"vimeo":a.playIframeVideo(t,i,c.vimeoAutoplayString);break;case"wistia":t.find("iframe").length>0?a.playIframeVideo(t,i,c.wistiaAutoplayString):c.playWistiaScriptEmbed(t);break;case"bunnynet":a.playIframeVideo(t,i,`${c.bunnynetAutoplayString}&${c.bunnynetMutedString}`)}const e=t.find('[data-reporting-enabled="1"]');e.length>0&&TCB_Front.Hooks.doAction("tcb.video.init_reporting",e)}else a.isSelfHosted(s)&&c.toggleHtmlVideoPlay(t,e);i.length>0&&i.fadeOut()}static toggleHtmlVideoPlay(e,i){if((e.find(".tcb-video-cover:visible").length>0||!TCB_Front.browser.safari)&&(void 0===i||0===t(i.target).closest(".tcb-float-close-button").length)){const a=e.find("video").get(0);function o(t){setTimeout(function(){a[t]()})}o(a.paused?"play":"pause")}}static maybeAutoplayVideo(e){let i;i=void 0===e?t(`${c.identifier}:not([data-type="dynamic"])`):e.find(`${c.identifier}:not([data-type="dynamic"])`),i.each((e,i)=>{const a=t(i);0===a.parents(".tve_p_lb_content").length&&c.autoplayVideo(a)})}static autoplayVideo(t){if(1!==parseInt(t.attr("data-autoplay")))return;const e=t.attr("data-type");let i="";switch(e){case"youtube":i=`&${o.autoplayString}&${o.mutedString}`;break;case"vimeo":i=`&${c.vimeoAutoplayString}&${c.vimeoMutedString}`;break;case"wistia":i=`&${c.wistiaAutoplayString}&${c.wistiaMutedString}`;break;case"bunnynet":i=`&${c.bunnynetAutoplayString}&${c.bunnynetMutedString}`}if(a.isCustomProvider(e)){const e=t.find("iframe");let a=e.attr("src")||e.attr("data-src");a&&0!==a.length&&-1===a.indexOf(i)&&(a.includes("?")?"?"===a.slice(-1)&&(i=i.substring(1)):i=`?${i.substring(1)}`,a+=i,e.attr({src:a,"data-src":a}))}else if(a.isSelfHosted(e)){const e=t.find("video").get(0);e&&(e.muted=!0,e.paused&&e.play())}}static pauseVideos(t){t.find("video").each((t,e)=>e.pause()),c.pauseProviderIframes(t)}static pauseProviderIframes(t){t.find("iframe").each((t,e)=>{try{const t=(e.getAttribute("src")||"").toLowerCase();(t.includes("youtube.com/embed")||t.includes("youtu.be"))&&e.contentWindow&&e.contentWindow.postMessage(JSON.stringify({event:"command",func:"pauseVideo",args:""}),"*")}catch(t){}}),t.find("iframe").each((t,e)=>{try{(e.getAttribute("src")||"").toLowerCase().includes("vimeo.com")&&e.contentWindow&&e.contentWindow.postMessage('{"method":"pause"}',"*")}catch(t){}}),t.find('.wistia_embed,[class*="wistia_async_"]').each((t,i)=>{try{const t=i.getAttribute("class")||"";let a=null;const o=t.match(/wistia_async_([a-zA-Z0-9]+)/);if(o&&(a=o[1]),!a){const t=(i.getAttribute("data-url")||"").match(/\/iframe\/([a-zA-Z0-9]+)/);t&&(a=t[1])}if(!a)return;if(e.Wistia&&"function"==typeof e.Wistia.api){let t;try{t=e.Wistia.api(a)}catch(t){}if(!t){const a=i.getAttribute("id");if(a)try{t=e.Wistia.api(a)}catch(t){}}if(t&&"function"==typeof t.pause){try{t.pause()}catch(t){}return}}e._wq=e._wq||[],e._wq.push({id:a,onReady:function(t){try{t.pause()}catch(t){}}})}catch(t){}});try{t.find(".wistia_embed video").each((t,e)=>{try{e.pause()}catch(t){}})}catch(t){}}static get vimeoAutoplayString(){return"autoplay=1"}static get vimeoMutedString(){return"muted=1"}static get wistiaAutoplayString(){return"autoPlay=true"}static get wistiaMutedString(){return"muted=true"}static get bunnynetAutoplayString(){return"autoplay=true"}static get bunnynetMutedString(){return"muted=false"}static get overlaySelector(){return".video_overlay_image, .tcb-video-cover"}static detectProvider(t){let e=t.find(".tcb-responsive-video").attr("data-provider")||t.attr("data-type");if(e&&"dynamic"!==e)return e;const i=(t.find("iframe").attr("src")||t.find("source").attr("src")||"").toLowerCase();return i.includes("youtube")||i.includes("youtu.be")?"youtube":i.includes("vimeo")?"vimeo":i.includes("wistia")?"wistia":i.includes("bunnycdn")||i.includes("mediadelivery")?"bunnynet":t.find('.wistia_embed,[class*="wistia_async_"]').length>0?"wistia":e}static playWistiaScriptEmbed(t){const i=t.find('.wistia_embed,[class*="wistia_async_"]').first();if(0!==i.length){e._wq=e._wq||[];try{const a=i.attr("class")||"";let o=null;const n=a.match(/wistia_async_([a-zA-Z0-9]+)/);if(n&&(o=n[1]),!o){const e=(i.attr("data-url")||t.attr("data-url")||"").match(/\/iframe\/([a-zA-Z0-9]+)/);e&&(o=e[1])}if(o&&e.Wistia&&"function"==typeof e.Wistia.api){let t;try{t=e.Wistia.api(o)}catch(t){}if(!t){const a=i.attr("id");if(a)try{t=e.Wistia.api(a)}catch(t){}}if(t){try{"function"==typeof t.unmute?t.unmute():"function"==typeof t.volume&&t.volume(1)}catch(t){}try{t.play()}catch(t){}return}}o&&e._wq.push({id:o,onReady:function(t){try{"function"==typeof t.unmute?t.unmute():"function"==typeof t.volume&&t.volume(1)}catch(t){}try{t.play()}catch(t){}}})}catch(t){}}}}return window.TCB_Front.playBackgroundYoutube=o.playBackgroundVideos,window.TCB_Front.refreshBackgroundYoutube=o.refreshBackgroundVideos,window.TCB_Front.onVideoClick=c.onClick,window.TCB_Front.changeAutoplayVideo=c.maybeAutoplayVideo,window.TCB_Front.makeAutoplayVideo=c.autoplayVideo,window.TCB_Front.Video=c,window.TCB_Front.floating=i(65017),c}},70025(t,e,i){t.exports=(t,e)=>{const a=i(82368)(t,e);let o=null;class n{static init(){t('div[data-reporting-enabled="1"], iframe[data-reporting-enabled="1"]').each((e,i)=>n.initVideo(t(i))),TCB_Front.Hooks.addAction("tcb.video.init_reporting",t=>n.initVideo(t))}static initVideo(t){if(t.data("tcb-video-initialized"))return;t.data("tcb-video-initialized",1);const e=t.attr("data-type");let i,r=0,s=0,c=["custom","external"].includes(e)?t.find("source").attr("src"):t.attr("data-url"),d=null;c=c.replace("#t=0.1","");const l=()=>{const t="function"==typeof d?d():r+5,e=t=>{const e=Math.max(Number(t)||0,r);n.saveRange(r,e,c),r=e};t&&"function"==typeof t.then?t.then(e).catch(()=>{const t=r+5;n.saveRange(r,t,c),r=t}):e(t)},u={setCurrentTimeGetter:t=>{d=t},onPlay:t=>{s||(s=1,n.triggerVideoStart(c)),r=t,clearInterval(i),i=setInterval(l,5e3)},onPause:t=>{clearInterval(i),t>r&&n.saveRange(r,t,c)},onEnd:t=>{n.saveRange(r,t,c),clearInterval(i),TCB_Front.Hooks.doAction("tcb.video.on_end",o)},onBuffer:t=>{r=t,clearInterval(i),i=setInterval(l,5e3)}};switch(e){case"youtube":a.initReportingEvents(t,u);break;case"vimeo":n.initVimeoEvents(t,u);break;case"wistia":n.initWistiaEvents(t,u);break;case"custom":case"external":n.initHtmlEvents(t,u)}}static initVimeoEvents(i,a){if(void 0===e.Vimeo)return void t.getScript("https://player.vimeo.com/api/player.js",()=>n.initVimeoEvents(i,a));const o=0===i.find("iframe").length?i:i.find("iframe"),r=new e.Vimeo.Player(o);a.setCurrentTimeGetter(()=>r.getCurrentTime()),r.on("play",()=>r.getCurrentTime().then(a.onPlay)),r.on("pause",()=>r.getCurrentTime().then(a.onPause)),r.on("ended",()=>r.getCurrentTime().then(a.onEnd)),r.on("seeking",()=>r.getCurrentTime().then(a.onBuffer))}static initWistiaEvents(i,a){const o=i.find("iframe");let r=o.attr("data-code");if(0!==o.length)o.addClass("wistia_embed");else{const t=i.attr("data-url");r=t.substring(t.lastIndexOf("/")+1)}void 0!==e._wq?e._wq.push({id:r,onReady(t){a.setCurrentTimeGetter(()=>t.time()),t.bind("play",()=>a.onPlay(t.time())).bind("pause",()=>a.onPause(t.time())).bind("end",()=>a.onEnd(t.time())).bind("seek",()=>a.onBuffer(t.time()))}}):t.getScript("//fast.wistia.com/assets/external/E-v1.js",()=>n.initWistiaEvents(i,a))}static initHtmlEvents(t,e){const i=t.find("video"),a=()=>i[0].currentTime;e.setCurrentTimeGetter(a),i.on("play",()=>e.onPlay(a())).on("pause",()=>e.onPause(a())).on("ended",()=>e.onEnd(a()))}static triggerVideoStart(t){TCB_Front.Utils.restAjax({route:tve_frontend_options.routes.video_reporting+"/video_started",data:{video_url:t,user_id:tve_frontend_options.current_user.id,post_id:tve_frontend_options.post_id}})}static saveRange(t,e,i){var a;TCB_Front.Utils.restAjax({route:tve_frontend_options.routes.video_reporting+"/save_range",data:{video_url:i,user_id:null!==(a=tve_frontend_options.current_user.id)&&void 0!==a?a:0,post_id:tve_frontend_options.post_id,range_start:Math.round(t),range_end:Math.round(e)}}).done(t=>{o=t,TCB_Front.Hooks.doAction("tcb.video.after_save_range",t)})}}return n}},42166(t){const e=["youtube","vimeo","wistia","bunnynet"],i=["self","external","custom"];t.exports=class{static isCustomProvider(t){return e.includes(t)}static isSelfHosted(t){return i.includes(t)}static playIframeVideo(t,e,i){const a=t.find("iframe"),o=a.parent(),n=document.createElement("iframe"),r=TCB_Front.Utils.getAttr(a);a.remove(),r.allow?r.allow.toLowerCase().includes("autoplay")||(r.allow=`${r.allow}; autoplay`):r.allow="autoplay";let s=r.src||r["data-src"]||"";const c=i.split("=")[0];if(s){const t=new RegExp(`([?&])${c}=([^&#]*)`,"i");s=s.replace(t,(t,e)=>"?"===e&&s.substring(s.indexOf(t)+t.length).startsWith("&")?"?":""),s=s.replace(/\?&/,"?").replace(/[?&]$/,"")}const d=s.includes("?")?"&":"?",l=`${s}${s?d:""}${i}`;r.src=l,r["data-src"]=l;for(const t in r)try{n.setAttribute(t,r[t])}catch(e){console.warn(`${t} is an invalid attribute name`)}let u=!1;if(o.length)try{o.append(n),u=!0}catch(t){}if(!u)try{e.replaceWith(n),u=!0}catch(t){}if(u||t.find(".tve_responsive_video_container,.tcb-video-float-container").first().append(n),e.length)try{e.remove()}catch(t){}n.focus()}}},23814(t){(e=>{class i{static onDOMReady(){document.addEventListener("vooPlayerReady",i.playBackgroundVoo,!1),document.addEventListener("vooPlayerReady",i.changeVooOnPlay,!1),TCB_Front.Utils.isEditorPage()?e(".tcb-video-background-el iframe.tcb-voo-bg").each(function(){const t=TVE.inner_$(this),e=t.attr("src");t.attr("src",e)}):(e('.thrv_responsive_video[data-type="vooplayer"]').each((t,i)=>{const a=e(i),o=a.outerHeight(),n=a.find(".tcb-video-cover,.video_overlay_image"),r=a.find("iframe");n.length>0&&r.length>0&&(a.find(".video-skin-player").css("z-index","-1"),r.before(n.css({height:r.height(),"max-height":o})),r.css("max-height",o))}),TCB_Front.floating.init()),TCB_Front.Hooks.addAction("tcb.video.before_autoplay",(t,e)=>{"vooplayer"===e&&t.find(".video-skin-player").css("z-index","")})}static playBackgroundVoo(){e("iframe.tcb-voo-bg").each((t,e)=>{const i=()=>{vooAPI(e.dataset.playerid,"onEnded",null,i),vooAPI(e.dataset.playerid,"play"),vooAPI(e.dataset.playerid,"volume",[0])};i()})}static changeVooOnPlay(t=TCB_Front.$body){t&&t.jquery||(t=TCB_Front.$body),t.find("iframe.video-player-container").each((t,i)=>{const a=()=>{e(i).css("pointer-events",""),e(i).parent().find("#theImg").remove()};i.src?a():vooAPI(i.dataset.playerid,"onPlay",null,()=>{a()})})}static getAssetsToPreconnect(){return["https://s3.spotlightr.com"]}}t.exports=i,window.TCB_Front.changeVooOnPlay=i.changeVooOnPlay})(ThriveGlobal.$j)},65465(t){t.exports=(t,e)=>{class i{static initialize(t){e.onYouTubeIframeAPIReady=()=>{TCB_Front.youtubeApiFetched=1,t()},i.fetchIframeApi()}static isApiInitialized(){return 1===TCB_Front.youtubeApiFetched||void 0!==e.YT&&void 0!==e.YT.Player}static fetchIframeApi(){t.ajax({url:"https://www.youtube.com/iframe_api",type:"get",crossDomain:!0,cache:!0,dataType:"script"})}static getDefaultPlayerParameters(t,e=!1){const i={autoplay:1,cc_load_policy:0,controls:0,disablekb:1,fs:0,iv_load_policy:0,modestbranding:1,playsinline:1,rel:0,showinfo:0,playlist:t};return e&&(i.loop=1,i.listType="playlist"),i}static isPlaylist(t){return t&&34===t.length}static getAssetsToPreconnect(){return["https://www.youtube.com","https://www.google.com","https://googleads.g.doubleclick.net","https://static.doubleclick.net","https://www.gstatic.com"]}}return i}},69997(t,e,i){t.exports=(t,e)=>{const a=i(65465)(t,e),o=".tcb-yt-bg";class n{static resetVideo(t){const e=t.find(o);if(e.length>0){const t=e.closest(".tcb-video-background-el"),i=TVE.Components.background.controls.video.video_settings.get_embed_code("background");t.html(i),n.play(t.find(o))}}static play(e=t(`div${o}:visible`)){e.length&&(a.isApiInitialized()?e.each((e,i)=>{const o=i.getAttribute("data-yt-id");let n;n=a.isPlaylist(o)?new YT.Player(i.id,{playerVars:a.getDefaultPlayerParameters(o,!0),events:{onReady:t=>t.target.mute(),onStateChange:t=>t.target.mute()}}):new YT.Player(i.id,{videoId:o,playerVars:a.getDefaultPlayerParameters(o),events:{onReady:t=>{t.target.mute(),t.target.playVideo()},onStateChange:t=>{t.target&&t.target.mute&&t.target.mute(),t.data===(YT.PlayerState.ENDED||0)&&t.target.playVideo()}}}),TCB_Front.latestYoutubeBackgroundPlayerInstance=n,t(n.getIframe()).data("tcb-yt-player",n)}):a.initialize(()=>n.play(e)))}static refreshVideos(){e.YT&&e.YT.Player&&t(`iframe${o}`).each((e,i)=>{const a=t(i);a.data("tcb-yt-player")||n.play(a)})}}return n}},82368(t,e,i){t.exports=(t,e)=>{const a=i(69997)(t,e),o=i(65465)(t,e);class n{static onDomReady(){n.initHooks(),n.playBackgroundVideos()}static initHooks(){TCB_Front.Utils.isEditorPage()?(TVE.add_action("tcb.element.duplicate",(t,e)=>a.resetVideo(e)),["sync","activate","create_display"].forEach(t=>TVE.add_action(`tve.conditional_display.${t}`,t=>a.resetVideo(t)))):(TCB_Front.Hooks.addFilter("tcb.video.lazy_load.src",(t,e)=>(t.includes("&enablejsapi=1")||"youtube"!==e.attr("data-type")||(t+="&enablejsapi=1"),t)),TCB_Front.Hooks.addAction("tcb.video.before_autoplay",(e,i)=>{if("youtube"!==i)return;const a=e.find("iframe")[0];t.each(a.attributes,(t,e)=>{let i=!1;e&&e.name.includes("data-gtm-yt-inspected")&&(a.removeAttribute(e.name),i=!0),i&&a.removeAttribute("id")})}))}static play(e){if(!o.isApiInitialized())return void o.initialize(()=>n.play(e));const i=e.find("iframe"),a=t("<div>"),r=TCB_Front.Utils.getAttr(i),s=new URL(TCB_Front.Utils.addHttp(i.attr("src"))),c=i.attr("data-code")?i.attr("data-code"):s.pathname.replace("/embed/",""),d=Object.fromEntries(s.searchParams.entries());d.autoplay=1,i.remove(),e.find(".video_overlay_image, .tcb-video-cover").replaceWith(a),1===parseInt(e.attr("data-reporting-enabled"))&&TCB_Front.Hooks.doAction("tcb.video.init_reporting",e),TCB_Front.latestYoutubePlayerInstance=n.initYoutubePlayer(a,c,d),delete r.src;const l=e.find("iframe")[0];for(const t in r)try{l.setAttribute(t,r[t])}catch(e){console.warn(`${t} is an invalid attribute name`)}}static initYoutubePlayer(t,e,i){return new YT.Player(t[0],{videoId:e,playerVars:i,width:"100%",events:{onReady:t=>t.target.playVideo(),onError:t=>console.warn(t)}})}static initReportingEvents(t,e){if(!o.isApiInitialized())return void o.initialize(()=>n.initReportingEvents(t,e));let i=t.find("iframe")[0];if(0===t.find("iframe").length){const e=t.attr("src")+"&enablejsapi=1";t.attr("src",e),i=t[0]}new YT.Player(i,{events:{onStateChange:t=>{var i,a;const o=t.data,n=(null==t||null===(i=t.target)||void 0===i||null===(a=i.playerInfo)||void 0===a?void 0:a.currentTime)||0;switch(e&&"function"==typeof e.setCurrentTimeGetter&&t&&t.target&&"function"==typeof t.target.getCurrentTime&&e.setCurrentTimeGetter(()=>t.target.getCurrentTime()),o){case YT.PlayerState.PLAYING:e.onPlay(n);break;case YT.PlayerState.PAUSED:e.onPause(n);break;case YT.PlayerState.ENDED:e.onEnd(n);break;case YT.PlayerState.BUFFERING:e.onBuffer(n)}}}})}static playBackgroundVideos(t){a.play(t)}static refreshBackgroundVideos(){a.refreshVideos()}static getAssetsToPreconnect(){return o.getAssetsToPreconnect()}static get autoplayString(){return"autoplay=1"}static get mutedString(){return"mute=1"}}return window.TCB_Front.Youtube=n,n}}},e={};function i(a){var o=e[a];if(void 0!==o)return o.exports;var n=e[a]={exports:{}};return t[a](n,n.exports,i),n.exports}void 0===TCB_Front.js_modules.video&&TCB_Front.setModuleLoadedStatus("video",!1),(t=>{if(TCB_Front.isModuleLoaded("video"))return;const e=i(49814)(t,window);e.init(),window.TCB_Front.video=e,TCB_Front.setModuleLoadedStatus("video",!0)})(ThriveGlobal.$j)})();