!function(){"use strict";function e(e,n){let t=(null==n?void 0:n.runOnLoad)?void 0:document.documentElement.clientWidth,o=(null==n?void 0:n.runOnLoad)?void 0:window.innerHeight;const i=()=>{const i={runOnLoad:!1,runOnWidthChange:!0,runOnHeightChange:!1,...n},a=document.documentElement.clientWidth,r=window.innerHeight,s=o!==r;(t!==a&&i.runOnWidthChange||s&&i.runOnHeightChange)&&e(),t=a,o=r},a=function(e,n){let t;return(...o)=>{clearTimeout(t),t=setTimeout((()=>{e(...o)}),n)}}(i,100);window.addEventListener("resize",a),(null==n?void 0:n.runOnLoad)&&("loading"===document.readyState?window.addEventListener("DOMContentLoaded",i):i())}var n;const t="undefined"!=typeof window?null===(n=window.navigator)||void 0===n?void 0:n.userAgent:void 0;const o=!(!t||(i=t,!i.match(/AppleWebKit\//)||i.match(/Chrome\//)||i.match(/Chromium\//)));var i;!function(){const n=document.querySelectorAll("video");if(!n.length)return;(function(){if(document.querySelector("template#playPauseButton"))return;const e='\n
\n\n\n\n
\n'.trim(),n="\n .playPauseButton {\n cursor: pointer;\n position: absolute;\n top: calc(50% - 24px);\n left: calc(50% - 24px);\n width: 48px;\n height: 48px;\n border-radius: 100%;\n background: rgba(17,23,29,.4);\n transition: opacity 0.2s ease-out;\n color: white;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .loadingIndicator {\n width: 48px;\n height: 48px;\n position: absolute;\n }\n .loadingIndicator path {\n stroke-dasharray: 175;\n stroke-dashoffset: 350;\n animation: dash 5s linear forwards;\n animation-iteration-count: infinite;\n }\n @keyframes dash {\n to {\n stroke-dashoffset: 0;\n }\n }\n".trim(),t=document.createElement("template");t.id="playPauseButton",t.innerHTML=e,document.body.appendChild(t);const o=document.createElement("style");o.innerHTML=n,document.body.appendChild(o)})(),function(){if(document.querySelector("template#seekBar"))return;const e='\n
\n
\n
\n
\n
\n \n
\n
\n \n \n
\n
\n'.trim(),n="\n .videoSeek {\n position: absolute;\n bottom: 0;\n left: 0;\n width: 100%;\n padding: 0;\n box-sizing: border-box;\n background: linear-gradient(0, rgba(17,23,29,.4) 0%, transparent 100%);\n color: white;\n transition: opacity 0.2s ease-out;\n opacity: 0;\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n }\n\n .soundButton {\n flex-grow: 0;\n flex-shrink: 0;\n margin-right: 24px;\n cursor: pointer;\n }\n\n .soundOnSvg,\n .soundMutedSvg {\n color: white;\n }\n\n .soundMutedSvg {\n display: none;\n }\n\n .videoSeekBarContainer {\n position: relative;\n flex-grow: 1;\n }\n\n .videoSeekBar {\n position: absolute;\n top: calc(50% - 2px);\n left: 22px;\n right: 22px;\n height: 4px;\n background: rgba(255, 255, 255, 0.4);\n border-radius: 4px;\n }\n\n .videoSeekBarCurrent {\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n background: white;\n border-radius: 4px;\n }\n\n .videoSeekInput {\n position: relative;\n display: block;\n box-sizing: border-box;\n margin: 0;\n width: 100%;\n height: 100%;\n padding: 16px 8px;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n background: none;\n direction: ltr;\n }\n\n .videoSeekInput:hover {\n cursor: pointer;\n }\n\n .videoSeekInput:active {\n cursor: grabbing;\n }\n\n /* chrome, safari */\n .videoSeekInput::-webkit-slider-thumb {\n -webkit-appearance: none;\n appearance: none;\n box-sizing: border-box;\n width: 40px;\n height: 40px;\n border: 14px solid transparent;\n border-radius: 100%;\n background-clip: content-box;\n background-color: white;\n filter: drop-shadow(0 0 1px black);\n opacity: 1;\n }\n\n .videoSeekInput:active::-webkit-slider-thumb {\n transform: scale(1.25);\n }\n\n /* firefox */\n .videoSeekInput::-moz-focus-outer {\n border: none;\n }\n\n .videoSeekInput::-moz-range-thumb {\n -moz-appearance: none;\n appearance: none;\n box-sizing: border-box;\n width: 40px;\n height: 40px;\n border: 14px solid transparent;\n border-radius: 100%;\n background-clip: content-box;\n background-color: white;\n filter: drop-shadow(0 0 1px black);\n opacity: 1;\n }\n\n .videoSeekInput:active::-moz-range-thumb {\n transform: scale(1.25);\n }\n".trim(),t=document.createElement("template");t.id="seekBar",t.innerHTML=e,document.body.appendChild(t);const o=document.createElement("style");o.innerHTML=n,document.body.appendChild(o)}();const t=[],i=new IntersectionObserver((e=>{e.forEach((e=>{if(!e.isIntersecting)return;const n=e.target;i.unobserve(n),n.play()}))}));n.forEach((e=>{if(function(e){var n;if(e.getAttribute("src"))return;const t=e.getAttribute("data-srcset");if(!t)return;const o=t.split(", ").map((e=>e.split(" "))).map((([e,n])=>({url:e,width:n}))),i=(e.getAttribute("data-sizes")||"").split(", ").map((e=>{const n=e.lastIndexOf(" ");return{media:e.substring(0,n),width:e.substring(n,e.length)}}));let a;for(const e of i)if(window.matchMedia(e.media).matches){a=parseFloat(e.width.replace("vw",""))/100*document.documentElement.clientWidth*window.devicePixelRatio;break}if(a)for(const n of o){if(parseFloat(n.width.replace("w",""))>=a)return void e.setAttribute("src",n.url)}e.setAttribute("src",null===(n=o[o.length-1])||void 0===n?void 0:n.url)}(e),!e.controls&&!e.dataset.trimStartUs&&!e.dataset.trimEndUs)return;const n={},{maybeResetVideoProgress:a,videoStart:r}=function(e,n){const t=e.dataset.trimStartUs,i=e.dataset.trimEndUs,a=null!=t?parseFloat(t)/1e6:0;let r=null!=i?parseFloat(i)/1e6:void 0;e.loop&&a>0&&(e.dataset.loop="true",e.loop=!1);e.addEventListener("timeupdate",(()=>{const n=e.currentTime;let t;null!=r&&n>=r-(o?.25:0)?e.loop||e.dataset.loop?(t=a,e.play()):e.pause():n{var t;isNaN(e.duration)||(null==r&&(r=e.duration),null===(t=n.updateDuration)||void 0===t||t.call(n,a,r))};e.addEventListener("durationchange",s),e.addEventListener("loadedmetadata",s),s();return{maybeResetVideoProgress:()=>{null!=r&&e.currentTime>=r&&(e.currentTime=a)},videoStart:a}}(e,n);if(e.autoplay&&(e.autoplay=!1,e.paused||e.pause(),i.observe(e)),function(e,n){e.currentTime=n;const t=n>0?n:.01;e.src=`${e.src}#t=${t}`,o&&n>0&&(e.style.opacity="0",e.addEventListener("seeked",(()=>{e.style.opacity="1"}),{once:!0}))}(e,r),!e.controls)return;let s=e;for(;null!=s&&null!=s.parentElement&&(s=s.parentElement,"100%"!==s.style.width||"100%"!==s.style.height||"svg"===s.tagName.toLowerCase()););s.parentElement&&"section"===s.parentElement.tagName.toLowerCase()&&(s=s.parentElement);const{onResizeCallback:l}=function(e,n,t,o,i){"relative"!==e.style.position&&"absolute"!==e.style.position&&(e.style.position="relative");const a=document.createElement("div");e.appendChild(a),a.style.position="absolute",a.style.top=n.getAttribute("data-controls-top")||"0%",a.style.left=n.getAttribute("data-controls-left")||"0%",a.style.width=n.getAttribute("data-controls-width")||"100%",a.style.height=n.getAttribute("data-controls-height")||"100%",n.controls=!1;const{seekBar:r,updateDuration:s}=function(e){const n=document.querySelector("template#seekBar");if(null==n)throw new Error("template does not exist");const t=n.content.firstChild.cloneNode(!0);t.addEventListener("click",(n=>{n.stopPropagation(),"none"===e.preload&&(e.preload="metadata")}));const o=t.querySelector("input");let i=0,a=100;const r=(e,n)=>{i=e,a=n,o.min=e.toString(),o.max=n.toString()};r(i,a),o.addEventListener("input",(n=>{const t=parseFloat(n.target.value);e.currentTime=t})),e.addEventListener("loadedmetadata",(()=>{o.removeAttribute("disabled")}),{once:!0});const s=t.querySelector(".videoSeekBarCurrent");return e.addEventListener("timeupdate",(()=>{o.value=e.currentTime.toString();const n=a-i,t=Math.min((e.currentTime-i)/n*100,100);s.style.width=`${t}%`})),{seekBar:t,updateDuration:r}}(n);i.updateDuration=s,a.appendChild(r),function(e,n){const t=n.querySelector(".soundButton"),o=t.querySelector(".soundOnSvg"),i=t.querySelector(".soundMutedSvg");function a(){const n=e.muted||0===e.volume;o.style.display=n?"none":"block",i.style.display=n?"block":"none"}e.addEventListener("volumechange",a),a(),t.addEventListener("click",(()=>{e.muted?e.muted=!1:e.volume=e.volume>0?0:1}))}(n,r);const{playButton:l,playPause:d}=function(e,n){let t=!1;const o=document.querySelector("template#playPauseButton");if(null==o)throw new Error("template does not exist");const i=o.content.firstChild.cloneNode(!0),a=async o=>{if(t)return;t=!0,o.stopPropagation();const a=i.parentElement.querySelector(".loadingIndicator");try{e.paused?(n(),e.muted&&(e.muted=!1),a.style.display="block",await e.play()):e.pause()}finally{t=!1,a.style.display="none"}};return i.addEventListener("click",a),{playButton:i,playPause:a}}(n,t);a.appendChild(l);const c=l.querySelector(".pauseSvg"),u=l.querySelector(".playSvg"),p=()=>{l.style.opacity="0",c.style.display="block",u.style.display="none"},v=()=>{l.style.opacity="1",c.style.display="none",u.style.display="block"};n.addEventListener("play",p),n.addEventListener("pause",v),n.paused?v():p();const h=()=>{n.paused||(l.style.opacity="1"),r.style.opacity="1"},m=()=>{n.paused||(l.style.opacity="0"),r.style.opacity="0"};a.addEventListener("mouseenter",h),a.addEventListener("mouseover",h),a.addEventListener("mousemove",h),a.addEventListener("mouseleave",m),a.addEventListener("mouseout",m),a.addEventListener("click",d);return{onResizeCallback:()=>{const e=a.clientWidth>50&&a.clientHeight>50,n=a.clientWidth>125&&a.clientHeight>100;l.style.visibility=e?"visible":"hidden",r.style.visibility=n?"visible":"hidden"},videoStart:o}}(s,e,a,r,n);t.push(l)})),e((()=>t.forEach((e=>e()))),{runOnLoad:!0})}()}();