!function(){"use strict";var e={19567:function(e){e.exports=window.jQuery},80967:function(e){e.exports=window.divi.scriptLibrary}},t={};function i(o){var n=t[o];if(void 0!==n)return n.exports;var r=t[o]={exports:{}};return e[o](r,r.exports,i),r.exports}i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,{a:t}),t},i.d=function(e,t){for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};!function(){i.r(o),i.d(o,{adjustBackgroundVideoMargin:function(){return e},backgroundVideoInit:function(){return s},backgroundVideoOnHover:function(){return c},backgroundVideoWaypoints:function(){return u},centerBackgroundVideo:function(){return r},resizeBackgroundVideo:function(){return a}});const e=e=>{if(void 0===e||!e.length)return;const t=0-e.width()/2;e.css("margin-left",`${t}px`)};var t=i(19567),n=i.n(t);const r=t=>{void 0!==t&&t.length&&t.each(((i,o)=>{const r=n()(o);if(e(r),r.closest("#et-fb-app").length>0&&setTimeout((()=>{e(r)}),0),void 0!==t&&t.closest(".et_pb_slider").length&&!t.closest(".et_pb_first_video").length)return!1}))};var d=i(80967);const a=e=>{if(void 0===e||!e.length)return;const t=e.closest(".et-pb-background-video");t.length&&t.each(((t,i)=>{const o=n()(i);o.closest("#et-fb-app").length&&(o.removeAttr("data-ratio"),o.find("video").removeAttr("style"));const r=o.find("video"),a=(e?.prop("videoWidth")||r.width())/(e?.prop("videoHeight")||r.height()),s=o.find(".mejs-video, video, object").css("margin","0px"),c=o.closest(".et-pb-has-background-video").length?o.closest(".et-pb-has-background-video"):o.closest(".et_pb_slides"),u=c.innerWidth(),l=c.innerHeight();let p,v;void 0!==o.attr("data-ratio")||Number.isNaN(a)||o.attr("data-ratio",a),u/l<a?(p=l*a,v=l):(p=u,v=u/a),s.width(p).height(v),d.isBuilder&&setTimeout((()=>{s.width(p).height(v)}),0)}))},s=e=>{void 0!==e&&e.length&&"mediaelementplayer"in n().fn&&"function"==typeof n().fn.mediaelementplayer&&e.mediaelementplayer({pauseOtherPlayers:!1,success(e,t){const i=n()(t);e.addEventListener("loadeddata",(()=>{a(i),r(i.closest(".mejs-video"))}),!1),e.addEventListener("canplay",(()=>{i.closest(".et_pb_preload").removeClass("et_pb_preload")}),!1)}})},c=e=>{if(void 0===e||!e.length)return;const t=e.closest(".et-pb-background-video__hover");t.length&&t.each(((e,t)=>{const i=n()(t),o=i.closest(".et-pb-has-background-video__hover");let r=!1;o.on("mouseover",(()=>{r||(i.find(".mejs-video video").trigger("play"),r=!0)})),o.on("mouseleave",(()=>{r=!1}))}))},u=(e,t)=>{if(void 0===e||!e.length||!n().fn.waypoint)return;const i=e.closest(".et-pb-background-video");if(!i.length)return;let o=!1,r=!0;t.onplaying=()=>{o=!0,r=!1},t.onpause=()=>{o=!1,r=!0},(0,d.waypointExtended)(i,{offset:"100%",handler(n){const d=i.hasClass("et-pb-background-video--play-outside-viewport");e.is(":visible")&&"down"===n?t.paused&&!o&&t.play():e.is(":visible")&&"up"===n&&(t.paused||r||d||t.pause())}},2),(0,d.waypointExtended)(i,{offset(){const e=this.element.clientHeight;let t=Math.ceil(window.innerHeight/2);return e>t&&(t=e),-1*t},handler(n){const d=i.hasClass("et-pb-background-video--play-outside-viewport");e.is(":visible")&&"up"===n?t.paused&&!o&&t.play():e.is(":visible")&&"down"===n&&(t.paused||r||d||t.pause())}},2)};"et_pb_video_section_init"in window||Object.defineProperty(window,"et_pb_video_section_init",{value:s,writable:!1}),"et_pb_video_background_init"in window||Object.defineProperty(window,"et_pb_video_background_init",{value:u,writable:!1}),"et_pb_resize_section_video_bg"in window||Object.defineProperty(window,"et_pb_resize_section_video_bg",{value:a,writable:!1}),"et_pb_adjust_video_margin"in window||Object.defineProperty(window,"et_pb_adjust_video_margin",{value:e,writable:!1}),"et_pb_center_video"in window||Object.defineProperty(window,"et_pb_center_video",{value:r,writable:!1}),"et_pb_background_video_on_hover"in window||Object.defineProperty(window,"et_pb_background_video_on_hover",{value:c,writable:!1})}(),((window.divi=window.divi||{}).module=window.divi.module||{}).moduleScriptBackgroundVideo=o}();