@atmtfy/video-background
Version:
Automatic background video from various sources (Youtube, MP4, vimeo) with autoplay across devices. No JS dependencies.
2 lines • 64.2 kB
JavaScript
/*! For license information please see bundle.js.LICENSE.txt */
(()=>{var e={279:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(640),i=n.n(r),o=n(144),s=n.n(o)()(i());s.push([e.id,':root{--vbg-theme: white;--vbg-bg: black;--vbg-overlay-opacity: 0.5;--vbg-transition-speed: 0.5s;--vbg-preloader-size: 32px;--vbg-icon-size: 34px;--vbg-icon-size-small: 28px;--vbg-icon-spacing-modifier: 0.1;--vbg-icon-space-around: 20px;--vbg-icon-space-around-small: 12px}video-background{width:100%;height:100%;display:block;box-sizing:border-box;position:absolute;z-index:0;top:0;left:0;background:var(--vbg-bg);margin:0;padding:0;overflow:hidden;color:#fff}video-background[status=loading]::after,video-background[status=waiting]::after{content:"";border-radius:50%;position:absolute;top:50%;left:50%;width:var(--vbg-preloader-size, 32px);height:var(--vbg-preloader-size, 32px);margin:calc(0px - var(--vbg-preloader-size)*.5) 0 0 calc(0px - var(--vbg-preloader-size)*.5);border:4px solid var(--vbg-theme);border-top-color:transparent;z-index:2;animation:loader-spin 1s infinite ease}video-background[status=loading] iframe,video-background[status=waiting] iframe{opacity:0}video-background iframe{position:absolute;top:0;left:0;z-index:4;width:100%;height:100%;pointer-events:none}video-background picture,video-background img{position:absolute;top:0;left:0;width:100%;height:100%}video-background img{object-fit:cover}.vbg__controls{z-index:6}.vbg__video,.vbg__poster,.vbg__overlay{position:absolute;width:100%;height:100%;top:0;left:0;display:block;object-fit:cover;object-position:50% 50%;transition:opacity var(--vbg-transition-speed) ease}.vbg__video{z-index:4}.vbg__poster{z-index:3}.vbg__overlay{z-index:5;pointer-events:none;background-color:var(--vbg-bg);opacity:var(--vbg-overlay-opacity)}.vbg--loading{opacity:0}.vbg__icons{position:absolute;z-index:10;bottom:0;left:0;padding:var(--vbg-icon-space-around);width:auto;height:auto;max-width:40%}@media(max-width: 720px){.vbg__icons{padding:var(--vbg-icon-space-around-small)}}.vbg__icon{background:transparent;appearance:none;border:none;--size: var(--vbg-icon-size, 24px);position:relative;width:var(--size);padding:calc(var(--vbg-icon-spacing-modifier)*var(--size));margin:calc(var(--vbg-icon-spacing-modifier)*var(--size));transition:opacity 150ms ease,transform 150ms ease;opacity:.5}.vbg__icon:hover{opacity:.8;transform:scale(1.1)}@media(max-width: 720px){.vbg__icon{--size: var(var(--vbg-icon-size-small), 20px) }}.vbg__icon svg{color:var(--vbg-icon-color, white);width:100%}.vbg__icon path,.vbg__icon rect{fill:currentColor !important}@keyframes loader-spin{100%{transform:rotate(360deg)}}',""]);const a=s},144:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,i,o){"string"==typeof e&&(e=[[null,e,void 0]]);var s={};if(r)for(var a=0;a<this.length;a++){var u=this[a][0];null!=u&&(s[u]=!0)}for(var l=0;l<e.length;l++){var c=[].concat(e[l]);r&&s[c[0]]||(void 0!==o&&(void 0===c[5]||(c[1]="@layer".concat(c[5].length>0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=o),n&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=n):c[2]=n),i&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=i):c[4]="".concat(i)),t.push(c))}},t}},640:e=>{"use strict";e.exports=function(e){return e[1]}},185:(e,t,n)=>{function r(){var e;try{e=t.storage.debug}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e}(t=e.exports=n(991)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},t.formatArgs=function(e){var n=this.useColors;if(e[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+e[0]+(n?"%c ":" ")+"+"+t.humanize(this.diff),!n)return;var r="color: "+this.color;e.splice(1,0,r,"color: inherit");var i=0,o=0;e[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(i++,"%c"===e&&(o=i))})),e.splice(o,0,r)},t.save=function(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}},t.load=r,t.useColors=function(){if("undefined"!=typeof window&&window.process&&"renderer"===window.process.type)return!0;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(r())},991:(e,t,n)=>{var r;function i(e){function n(){if(n.enabled){var e=n,i=+new Date,o=i-(r||i);e.diff=o,e.prev=r,e.curr=i,r=i;for(var s=new Array(arguments.length),a=0;a<s.length;a++)s[a]=arguments[a];s[0]=t.coerce(s[0]),"string"!=typeof s[0]&&s.unshift("%O");var u=0;s[0]=s[0].replace(/%([a-zA-Z%])/g,(function(n,r){if("%%"===n)return n;u++;var i=t.formatters[r];if("function"==typeof i){var o=s[u];n=i.call(e,o),s.splice(u,1),u--}return n})),t.formatArgs.call(e,s);var l=n.log||t.log||console.log.bind(console);l.apply(e,s)}}return n.namespace=e,n.enabled=t.enabled(e),n.useColors=t.useColors(),n.color=function(e){var n,r=0;for(n in e)r=(r<<5)-r+e.charCodeAt(n),r|=0;return t.colors[Math.abs(r)%t.colors.length]}(e),"function"==typeof t.init&&t.init(n),n}(t=e.exports=i.debug=i.default=i).coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){t.enable("")},t.enable=function(e){t.save(e),t.names=[],t.skips=[];for(var n=("string"==typeof e?e:"").split(/[\s,]+/),r=n.length,i=0;i<r;i++)n[i]&&("-"===(e=n[i].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){var n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(65),t.names=[],t.skips=[],t.formatters={}},499:e=>{function t(e,t){e.onload=function(){this.onerror=this.onload=null,t(null,e)},e.onerror=function(){this.onerror=this.onload=null,t(new Error("Failed to load "+this.src),e)}}function n(e,t){e.onreadystatechange=function(){"complete"!=this.readyState&&"loaded"!=this.readyState||(this.onreadystatechange=null,t(null,e))}}e.exports=function(e,r,i){var o=document.head||document.getElementsByTagName("head")[0],s=document.createElement("script");"function"==typeof r&&(i=r,r={}),r=r||{},i=i||function(){},s.type=r.type||"text/javascript",s.charset=r.charset||"utf8",s.async=!("async"in r)||!!r.async,s.src=e,r.attrs&&function(e,t){for(var n in t)e.setAttribute(n,t[n])}(s,r.attrs),r.text&&(s.text=""+r.text),("onload"in s?t:n)(s,i),s.onload||t(s,i),o.appendChild(s)}},65:e=>{var t=1e3,n=60*t,r=60*n,i=24*r,o=365.25*i;function s(e,t,n){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+n:Math.ceil(e/t)+" "+n+"s"}e.exports=function(e,a){a=a||{};var u,l=typeof e;if("string"===l&&e.length>0)return function(e){if((e=String(e)).length>100)return;var s=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(!s)return;var a=parseFloat(s[1]);switch((s[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return a*o;case"days":case"day":case"d":return a*i;case"hours":case"hour":case"hrs":case"hr":case"h":return a*r;case"minutes":case"minute":case"mins":case"min":case"m":return a*n;case"seconds":case"second":case"secs":case"sec":case"s":return a*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}(e);if("number"===l&&!1===isNaN(e))return a.long?s(u=e,i,"day")||s(u,r,"hour")||s(u,n,"minute")||s(u,t,"second")||u+" ms":function(e){if(e>=i)return Math.round(e/i)+"d";if(e>=r)return Math.round(e/r)+"h";if(e>=n)return Math.round(e/n)+"m";if(e>=t)return Math.round(e/t)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},878:(e,t)=>{"use strict";var n=Object.prototype.hasOwnProperty;function r(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(e){return null}}function i(e){try{return encodeURIComponent(e)}catch(e){return null}}t.stringify=function(e,t){t=t||"";var r,o,s=[];for(o in"string"!=typeof t&&(t="?"),e)if(n.call(e,o)){if((r=e[o])||null!=r&&!isNaN(r)||(r=""),o=i(o),r=i(r),null===o||null===r)continue;s.push(o+"="+r)}return s.length?t+s.join("&"):""},t.parse=function(e){for(var t,n=/([^=?#&]+)=?([^&]*)/g,i={};t=n.exec(e);){var o=r(t[1]),s=r(t[2]);null===o||null===s||o in i||(i[o]=s)}return i}},384:e=>{"use strict";e.exports=function(e,t){if(t=t.split(":")[0],!(e=+e))return!1;switch(t){case"http":case"ws":return 80!==e;case"https":case"wss":return 443!==e;case"ftp":return 21!==e;case"gopher":return 70!==e;case"file":return!1}return 0!==e}},241:e=>{"use strict";var t;t=function(){var e={},t={};return e.on=function(e,n){var r={name:e,handler:n};return t[e]=t[e]||[],t[e].unshift(r),r},e.off=function(e){var n=t[e.name].indexOf(e);-1!==n&&t[e.name].splice(n,1)},e.trigger=function(e,n){var r,i=t[e];if(i)for(r=i.length;r--;)i[r].handler(n)},e},e.exports=t},769:e=>{"use strict";var t=[];function n(e){for(var n=-1,r=0;r<t.length;r++)if(t[r].identifier===e){n=r;break}return n}function r(e,r){for(var o={},s=[],a=0;a<e.length;a++){var u=e[a],l=r.base?u[0]+r.base:u[0],c=o[l]||0,h="".concat(l," ").concat(c);o[l]=c+1;var d=n(h),p={css:u[1],media:u[2],sourceMap:u[3],supports:u[4],layer:u[5]};if(-1!==d)t[d].references++,t[d].updater(p);else{var f=i(p,r);r.byIndex=a,t.splice(a,0,{identifier:h,updater:f,references:1})}s.push(h)}return s}function i(e,t){var n=t.domAPI(t);n.update(e);return function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,i){var o=r(e=e||[],i=i||{});return function(e){e=e||[];for(var s=0;s<o.length;s++){var a=n(o[s]);t[a].references--}for(var u=r(e,i),l=0;l<o.length;l++){var c=n(o[l]);0===t[c].references&&(t[c].updater(),t.splice(c,1))}o=u}}},834:e=>{"use strict";var t={};e.exports=function(e,n){var r=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},128:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},701:(e,t,n)=>{"use strict";e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},471:e=>{"use strict";e.exports=function(e){var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var i=void 0!==n.layer;i&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,i&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var o=n.sourceMap;o&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),t.styleTagTransform(r,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},493:e=>{"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},2:e=>{e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title></title><path d="M18.41,12l1.3-1.29a1,1,0,0,0-1.42-1.42L17,10.59l-1.29-1.3a1,1,0,0,0-1.42,1.42L15.59,12l-1.3,1.29a1,1,0,0,0,0,1.42,1,1,0,0,0,1.42,0L17,13.41l1.29,1.3a1,1,0,0,0,1.42,0,1,1,0,0,0,0-1.42Z" fill="#464646"></path><path d="M13.23,15.77a2.52,2.52,0,0,1,0-3.54l.23-.23-.23-.23a2.49,2.49,0,0,1,2.77-4V5a1,1,0,0,0-.53-.88,1,1,0,0,0-1,0L8.7,8H6a2,2,0,0,0-2,2v4a2,2,0,0,0,2,2H8.7l5.75,3.83A1,1,0,0,0,16,19V16.27A2.58,2.58,0,0,1,13.23,15.77Z" fill="currentColor"></path></svg>'},383:e=>{e.exports='<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 24 24" style="enable-background:new 0 0 24 24;" xml:space="preserve"><g><rect x="14.6" y="4.8" class="st0" width="3.7" height="14.3" fill="currentColor"></rect></g><g><rect x="5.7" y="4.8" class="st0" width="3.7" height="14.3" fill="currentColor"></rect></g></svg>'},533:e=>{e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title></title><path d="M19,12a1,1,0,0,1-.55.89l-10,5A1,1,0,0,1,8,18a1,1,0,0,1-.53-.15A1,1,0,0,1,7,17V7a1,1,0,0,1,1.45-.89l10,5A1,1,0,0,1,19,12Z" fill="currentColor"></path></svg>'},291:e=>{e.exports='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M14,5V19a1,1,0,0,1-.53.88,1,1,0,0,1-1-.05L6.7,16H4a2,2,0,0,1-2-2V10A2,2,0,0,1,4,8H6.7l5.75-3.83a1,1,0,0,1,1,0A1,1,0,0,1,14,5Z" fill="currentColor"></path><rect fill="currentColor" height="6" width="2" x="16" y="9"></rect><rect fill="currentColor" height="14" width="2" x="20" y="5"></rect></svg>'},296:(e,t,n)=>{"use strict";var r=n(384),i=n(878),o=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,s=/[\n\r\t]/g,a=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,u=/:\d+$/,l=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,c=/^[a-zA-Z]:/;function h(e){return(e||"").toString().replace(o,"")}var d=[["#","hash"],["?","query"],function(e,t){return g(t.protocol)?e.replace(/\\/g,"/"):e},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],p={hash:1,query:1};function f(e){var t,r=("undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{}).location||{},i={},o=typeof(e=e||r);if("blob:"===e.protocol)i=new y(unescape(e.pathname),{});else if("string"===o)for(t in i=new y(e,{}),p)delete i[t];else if("object"===o){for(t in e)t in p||(i[t]=e[t]);void 0===i.slashes&&(i.slashes=a.test(e.href))}return i}function g(e){return"file:"===e||"ftp:"===e||"http:"===e||"https:"===e||"ws:"===e||"wss:"===e}function m(e,t){e=(e=h(e)).replace(s,""),t=t||{};var n,r=l.exec(e),i=r[1]?r[1].toLowerCase():"",o=!!r[2],a=!!r[3],u=0;return o?a?(n=r[2]+r[3]+r[4],u=r[2].length+r[3].length):(n=r[2]+r[4],u=r[2].length):a?(n=r[3]+r[4],u=r[3].length):n=r[4],"file:"===i?u>=2&&(n=n.slice(2)):g(i)?n=r[4]:i?o&&(n=n.slice(2)):u>=2&&g(t.protocol)&&(n=r[4]),{protocol:i,slashes:o||g(i),slashesCount:u,rest:n}}function y(e,t,n){if(e=(e=h(e)).replace(s,""),!(this instanceof y))return new y(e,t,n);var o,a,u,l,p,v,b=d.slice(),w=typeof t,k=this,E=0;for("object"!==w&&"string"!==w&&(n=t,t=null),n&&"function"!=typeof n&&(n=i.parse),o=!(a=m(e||"",t=f(t))).protocol&&!a.slashes,k.slashes=a.slashes||o&&t.slashes,k.protocol=a.protocol||t.protocol||"",e=a.rest,("file:"===a.protocol&&(2!==a.slashesCount||c.test(e))||!a.slashes&&(a.protocol||a.slashesCount<2||!g(k.protocol)))&&(b[3]=[/(.*)/,"pathname"]);E<b.length;E++)"function"!=typeof(l=b[E])?(u=l[0],v=l[1],u!=u?k[v]=e:"string"==typeof u?~(p="@"===u?e.lastIndexOf(u):e.indexOf(u))&&("number"==typeof l[2]?(k[v]=e.slice(0,p),e=e.slice(p+l[2])):(k[v]=e.slice(p),e=e.slice(0,p))):(p=u.exec(e))&&(k[v]=p[1],e=e.slice(0,p.index)),k[v]=k[v]||o&&l[3]&&t[v]||"",l[4]&&(k[v]=k[v].toLowerCase())):e=l(e,k);n&&(k.query=n(k.query)),o&&t.slashes&&"/"!==k.pathname.charAt(0)&&(""!==k.pathname||""!==t.pathname)&&(k.pathname=function(e,t){if(""===e)return t;for(var n=(t||"/").split("/").slice(0,-1).concat(e.split("/")),r=n.length,i=n[r-1],o=!1,s=0;r--;)"."===n[r]?n.splice(r,1):".."===n[r]?(n.splice(r,1),s++):s&&(0===r&&(o=!0),n.splice(r,1),s--);return o&&n.unshift(""),"."!==i&&".."!==i||n.push(""),n.join("/")}(k.pathname,t.pathname)),"/"!==k.pathname.charAt(0)&&g(k.protocol)&&(k.pathname="/"+k.pathname),r(k.port,k.protocol)||(k.host=k.hostname,k.port=""),k.username=k.password="",k.auth&&(~(p=k.auth.indexOf(":"))?(k.username=k.auth.slice(0,p),k.username=encodeURIComponent(decodeURIComponent(k.username)),k.password=k.auth.slice(p+1),k.password=encodeURIComponent(decodeURIComponent(k.password))):k.username=encodeURIComponent(decodeURIComponent(k.auth)),k.auth=k.password?k.username+":"+k.password:k.username),k.origin="file:"!==k.protocol&&g(k.protocol)&&k.host?k.protocol+"//"+k.host:"null",k.href=k.toString()}y.prototype={set:function(e,t,n){var o=this;switch(e){case"query":"string"==typeof t&&t.length&&(t=(n||i.parse)(t)),o[e]=t;break;case"port":o[e]=t,r(t,o.protocol)?t&&(o.host=o.hostname+":"+t):(o.host=o.hostname,o[e]="");break;case"hostname":o[e]=t,o.port&&(t+=":"+o.port),o.host=t;break;case"host":o[e]=t,u.test(t)?(t=t.split(":"),o.port=t.pop(),o.hostname=t.join(":")):(o.hostname=t,o.port="");break;case"protocol":o.protocol=t.toLowerCase(),o.slashes=!n;break;case"pathname":case"hash":if(t){var s="pathname"===e?"/":"#";o[e]=t.charAt(0)!==s?s+t:t}else o[e]=t;break;case"username":case"password":o[e]=encodeURIComponent(t);break;case"auth":var a=t.indexOf(":");~a?(o.username=t.slice(0,a),o.username=encodeURIComponent(decodeURIComponent(o.username)),o.password=t.slice(a+1),o.password=encodeURIComponent(decodeURIComponent(o.password))):o.username=encodeURIComponent(decodeURIComponent(t))}for(var l=0;l<d.length;l++){var c=d[l];c[4]&&(o[c[1]]=o[c[1]].toLowerCase())}return o.auth=o.password?o.username+":"+o.password:o.username,o.origin="file:"!==o.protocol&&g(o.protocol)&&o.host?o.protocol+"//"+o.host:"null",o.href=o.toString(),o},toString:function(e){e&&"function"==typeof e||(e=i.stringify);var t,n=this,r=n.host,o=n.protocol;o&&":"!==o.charAt(o.length-1)&&(o+=":");var s=o+(n.protocol&&n.slashes||g(n.protocol)?"//":"");return n.username?(s+=n.username,n.password&&(s+=":"+n.password),s+="@"):n.password?(s+=":"+n.password,s+="@"):"file:"!==n.protocol&&g(n.protocol)&&!r&&"/"!==n.pathname&&(s+="@"),(":"===r[r.length-1]||u.test(n.hostname)&&!n.port)&&(r+=":"),s+=r+n.pathname,(t="object"==typeof n.query?e(n.query):n.query)&&(s+="?"!==t.charAt(0)?"?"+t:t),n.hash&&(s+=n.hash),s}},y.extractProtocol=m,y.location=f,y.trimLeft=h,y.qs=i,e.exports=y},644:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(0),o=(r=i)&&r.__esModule?r:{default:r};t.default={pauseVideo:{acceptableStates:[o.default.ENDED,o.default.PAUSED],stateChangeRequired:!1},playVideo:{acceptableStates:[o.default.ENDED,o.default.PLAYING],stateChangeRequired:!1},seekTo:{acceptableStates:[o.default.ENDED,o.default.PLAYING,o.default.PAUSED],stateChangeRequired:!0,timeout:3e3}},e.exports=t.default},868:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a(n(185)),i=a(n(78)),o=a(n(552)),s=a(n(644));function a(e){return e&&e.__esModule?e:{default:e}}var u=(0,r.default)("youtube-player"),l={proxyEvents:function(e){var t={},n=function(n){var r="on"+n.slice(0,1).toUpperCase()+n.slice(1);t[r]=function(t){u('event "%s"',r,t),e.trigger(n,t)}},r=!0,i=!1,s=void 0;try{for(var a,l=o.default[Symbol.iterator]();!(r=(a=l.next()).done);r=!0){n(a.value)}}catch(e){i=!0,s=e}finally{try{!r&&l.return&&l.return()}finally{if(i)throw s}}return t},promisifyPlayer:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n={},r=function(r){t&&s.default[r]?n[r]=function(){for(var t=arguments.length,n=Array(t),i=0;i<t;i++)n[i]=arguments[i];return e.then((function(e){var t=s.default[r],i=e.getPlayerState(),o=e[r].apply(e,n);return t.stateChangeRequired||Array.isArray(t.acceptableStates)&&-1===t.acceptableStates.indexOf(i)?new Promise((function(n){e.addEventListener("onStateChange",(function r(){var i=e.getPlayerState(),o=void 0;"number"==typeof t.timeout&&(o=setTimeout((function(){e.removeEventListener("onStateChange",r),n()}),t.timeout)),Array.isArray(t.acceptableStates)&&-1!==t.acceptableStates.indexOf(i)&&(e.removeEventListener("onStateChange",r),clearTimeout(o),n())}))})).then((function(){return o})):o}))}:n[r]=function(){for(var t=arguments.length,n=Array(t),i=0;i<t;i++)n[i]=arguments[i];return e.then((function(e){return e[r].apply(e,n)}))}},o=!0,a=!1,u=void 0;try{for(var l,c=i.default[Symbol.iterator]();!(o=(l=c.next()).done);o=!0){var h=l.value;r(h)}}catch(e){a=!0,u=e}finally{try{!o&&c.return&&c.return()}finally{if(a)throw u}}return n}};t.default=l,e.exports=t.default},0:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={BUFFERING:3,ENDED:0,PAUSED:2,PLAYING:1,UNSTARTED:-1,VIDEO_CUED:5},e.exports=t.default},552:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=["ready","stateChange","playbackQualityChange","playbackRateChange","error","apiChange","volumeChange"],e.exports=t.default},78:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=["cueVideoById","loadVideoById","cueVideoByUrl","loadVideoByUrl","playVideo","pauseVideo","stopVideo","getVideoLoadedFraction","cuePlaylist","loadPlaylist","nextVideo","previousVideo","playVideoAt","setShuffle","setLoop","getPlaylist","getPlaylistIndex","setOption","mute","unMute","isMuted","setVolume","getVolume","seekTo","getPlayerState","getPlaybackRate","setPlaybackRate","getAvailablePlaybackRates","getPlaybackQuality","setPlaybackQuality","getAvailableQualityLevels","getCurrentTime","getDuration","removeEventListener","getVideoUrl","getVideoEmbedCode","getOptions","getOption","addEventListener","destroy","setSize","getIframe"],e.exports=t.default},905:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=a(n(241)),o=a(n(425)),s=a(n(868));function a(e){return e&&e.__esModule?e:{default:e}}var u=void 0;t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=(0,i.default)();if(u||(u=(0,o.default)(a)),t.events)throw new Error("Event handlers cannot be overwritten.");if("string"==typeof e&&!document.getElementById(e))throw new Error('Element "'+e+'" does not exist.');t.events=s.default.proxyEvents(a);var l=new Promise((function(n){"object"===(void 0===e?"undefined":r(e))&&e.playVideo instanceof Function?n(e):u.then((function(r){var i=new r.Player(e,t);return a.on("ready",(function(){n(i)})),null}))})),c=s.default.promisifyPlayer(l,n);return c.on=a.on,c.off=a.off,c},e.exports=t.default},425:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(499),o=(r=i)&&r.__esModule?r:{default:r};t.default=function(e){return new Promise((function(t){if(window.YT&&window.YT.Player&&window.YT.Player instanceof Function)t(window.YT);else{var n="http:"===window.location.protocol?"http:":"https:";(0,o.default)(n+"//www.youtube.com/iframe_api",(function(t){t&&e.trigger("error",t)}));var r=window.onYouTubeIframeAPIReady;window.onYouTubeIframeAPIReady=function(){r&&r(),t(window.YT)}}}))},e.exports=t.default}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={id:r,exports:{}};return e[r](o,o.exports,n),o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";const e=/^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#\&\?]*).*/,t=/^.*(vimeo\.com\/)(channels\/[a-zA-Z0-9]*\/)?([0-9]{7,}(#t\=.*s)?)/,r={youtube:{parsePath:"query.t",timeRegex:/[hms]/,idRegex:e},vimeo:{parsePath:null,timeRegex:/[#t=s]/,idRegex:t}};function i(e,t=!1){const n=function(e){if(null==e)return"error";const t=new RegExp(/^(?:https?:)?(?:\/\/)?(?:youtu\.be\/|(?:www\.|m\.)?youtube\.com\/(?:watch|v|embed)(?:\.php)?(?:\?.*v=|\/))([a-zA-Z0-9\_-]{7,15})(?:[\?&][a-zA-Z0-9\_-]+=[a-zA-Z0-9\_-]+)*$/),n=new RegExp(/\/\/(?:www\.)?vimeo.com\/([0-9a-z\-_]+)/i),r=new RegExp(/.*?\/.*(webm|mp4|ogg|ogm).*?/i);return t.test(e)?"youtube":n.test(e)?"vimeo":r.test(e)?"local":"error"}(e);let r={url:e,type:n};if("local"==n){const n=o(e);if(n)return{...r,maxWidth:t,fileType:n}}return r}function o(e){return e.includes(".mp4")?"mp4":e.includes(".webm")?"webm":e.includes(".ogg")?"ogg":e.includes(".ogm")?"ogm":"mp4"}n(296);function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var u=void 0!==n.g&&"[object global]"==={}.toString.call(n.g);function l(e,t){return 0===e.indexOf(t.toLowerCase())?e:"".concat(t.toLowerCase()).concat(e.substr(0,1).toUpperCase()).concat(e.substr(1))}function c(e){return Boolean(e&&1===e.nodeType&&"nodeName"in e&&e.ownerDocument&&e.ownerDocument.defaultView)}function h(e){return!isNaN(parseFloat(e))&&isFinite(e)&&Math.floor(e)==e}function d(e){return/^(https?:)?\/\/((player|www)\.)?vimeo\.com(?=$|\/)/.test(e)}function p(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.id,n=e.url,r=t||n;if(!r)throw new Error("An id or url must be passed, either in an options object or as a data-vimeo-id or data-vimeo-url attribute.");if(h(r))return"https://vimeo.com/".concat(r);if(d(r))return r.replace("http:","https:");if(t)throw new TypeError("“".concat(t,"” is not a valid video id."));throw new TypeError("“".concat(r,"” is not a vimeo.com url."))}var f=void 0!==Array.prototype.indexOf,g="undefined"!=typeof window&&void 0!==window.postMessage;if(!(u||f&&g))throw new Error("Sorry, the Vimeo Player API is not available in this browser.");var m="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{};!function(e){if(!e.WeakMap){var t=Object.prototype.hasOwnProperty,n=function(e,t,n){Object.defineProperty?Object.defineProperty(e,t,{configurable:!0,writable:!0,value:n}):e[t]=n};e.WeakMap=function(){function e(){if(void 0===this)throw new TypeError("Constructor WeakMap requires 'new'");if(n(this,"_id",o("_WeakMap")),arguments.length>0)throw new TypeError("WeakMap iterable is not supported")}function i(e,n){if(!r(e)||!t.call(e,"_id"))throw new TypeError(n+" method called on incompatible receiver "+typeof e)}function o(e){return e+"_"+s()+"."+s()}function s(){return Math.random().toString().substring(2)}return n(e.prototype,"delete",(function(e){if(i(this,"delete"),!r(e))return!1;var t=e[this._id];return!(!t||t[0]!==e)&&(delete e[this._id],!0)})),n(e.prototype,"get",(function(e){if(i(this,"get"),r(e)){var t=e[this._id];return t&&t[0]===e?t[1]:void 0}})),n(e.prototype,"has",(function(e){if(i(this,"has"),!r(e))return!1;var t=e[this._id];return!(!t||t[0]!==e)})),n(e.prototype,"set",(function(e,t){if(i(this,"set"),!r(e))throw new TypeError("Invalid value used as weak map key");var o=e[this._id];return o&&o[0]===e?(o[1]=t,this):(n(e,this._id,[e,t]),this)})),n(e,"_polyfill",!0),e}()}function r(e){return Object(e)===e}}("undefined"!=typeof self?self:"undefined"!=typeof window?window:m);var y,v,b=(y=function(e){var t,n,r;r=function(){var e,t,n,r=Object.prototype.toString,i="undefined"!=typeof setImmediate?function(e){return setImmediate(e)}:setTimeout;try{Object.defineProperty({},"x",{}),e=function(e,t,n,r){return Object.defineProperty(e,t,{value:n,writable:!0,configurable:!1!==r})}}catch(t){e=function(e,t,n){return e[t]=n,e}}function o(e,r){n.add(e,r),t||(t=i(n.drain))}function s(e){var t,n=typeof e;return null==e||"object"!=n&&"function"!=n||(t=e.then),"function"==typeof t&&t}function a(){for(var e=0;e<this.chain.length;e++)u(this,1===this.state?this.chain[e].success:this.chain[e].failure,this.chain[e]);this.chain.length=0}function u(e,t,n){var r,i;try{!1===t?n.reject(e.msg):(r=!0===t?e.msg:t.call(void 0,e.msg))===n.promise?n.reject(TypeError("Promise-chain cycle")):(i=s(r))?i.call(r,n.resolve,n.reject):n.resolve(r)}catch(e){n.reject(e)}}function l(e){var t,n=this;if(!n.triggered){n.triggered=!0,n.def&&(n=n.def);try{(t=s(e))?o((function(){var r=new d(n);try{t.call(e,(function(){l.apply(r,arguments)}),(function(){c.apply(r,arguments)}))}catch(e){c.call(r,e)}})):(n.msg=e,n.state=1,n.chain.length>0&&o(a,n))}catch(e){c.call(new d(n),e)}}}function c(e){var t=this;t.triggered||(t.triggered=!0,t.def&&(t=t.def),t.msg=e,t.state=2,t.chain.length>0&&o(a,t))}function h(e,t,n,r){for(var i=0;i<t.length;i++)!function(i){e.resolve(t[i]).then((function(e){n(i,e)}),r)}(i)}function d(e){this.def=e,this.triggered=!1}function p(e){this.promise=e,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}function f(e){if("function"!=typeof e)throw TypeError("Not a function");if(0!==this.__NPO__)throw TypeError("Not a promise");this.__NPO__=1;var t=new p(this);this.then=function(e,n){var r={success:"function"!=typeof e||e,failure:"function"==typeof n&&n};return r.promise=new this.constructor((function(e,t){if("function"!=typeof e||"function"!=typeof t)throw TypeError("Not a function");r.resolve=e,r.reject=t})),t.chain.push(r),0!==t.state&&o(a,t),r.promise},this.catch=function(e){return this.then(void 0,e)};try{e.call(void 0,(function(e){l.call(t,e)}),(function(e){c.call(t,e)}))}catch(e){c.call(t,e)}}n=function(){var e,n,r;function i(e,t){this.fn=e,this.self=t,this.next=void 0}return{add:function(t,o){r=new i(t,o),n?n.next=r:e=r,n=r,r=void 0},drain:function(){var r=e;for(e=n=t=void 0;r;)r.fn.call(r.self),r=r.next}}}();var g=e({},"constructor",f,!1);return f.prototype=g,e(g,"__NPO__",0,!1),e(f,"resolve",(function(e){return e&&"object"==typeof e&&1===e.__NPO__?e:new this((function(t,n){if("function"!=typeof t||"function"!=typeof n)throw TypeError("Not a function");t(e)}))})),e(f,"reject",(function(e){return new this((function(t,n){if("function"!=typeof t||"function"!=typeof n)throw TypeError("Not a function");n(e)}))})),e(f,"all",(function(e){var t=this;return"[object Array]"!=r.call(e)?t.reject(TypeError("Not an array")):0===e.length?t.resolve([]):new t((function(n,r){if("function"!=typeof n||"function"!=typeof r)throw TypeError("Not a function");var i=e.length,o=Array(i),s=0;h(t,e,(function(e,t){o[e]=t,++s===i&&n(o)}),r)}))})),e(f,"race",(function(e){var t=this;return"[object Array]"!=r.call(e)?t.reject(TypeError("Not an array")):new t((function(n,r){if("function"!=typeof n||"function"!=typeof r)throw TypeError("Not a function");h(t,e,(function(e,t){n(t)}),r)}))})),f},(n=m)[t="Promise"]=n[t]||r(),e.exports&&(e.exports=n[t])},y(v={exports:{}},v.exports),v.exports),w=new WeakMap;function k(e,t,n){var r=w.get(e.element)||{};t in r||(r[t]=[]),r[t].push(n),w.set(e.element,r)}function E(e,t){return(w.get(e.element)||{})[t]||[]}function x(e,t,n){var r=w.get(e.element)||{};if(!r[t])return!0;if(!n)return r[t]=[],w.set(e.element,r),!0;var i=r[t].indexOf(n);return-1!==i&&r[t].splice(i,1),w.set(e.element,r),r[t]&&0===r[t].length}function P(e,t){var n=w.get(e);w.set(t,n),w.delete(e)}var C=["autopause","autoplay","background","byline","color","controls","dnt","height","id","interactiveparams","keyboard","loop","maxheight","maxwidth","muted","playsinline","portrait","responsive","speed","texttrack","title","transparent","url","width"];function A(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return C.reduce((function(t,n){var r=e.getAttribute("data-vimeo-".concat(n));return(r||""===r)&&(t[n]=""===r?1:r),t}),t)}function _(e,t){var n=e.html;if(!t)throw new TypeError("An element must be provided");if(null!==t.getAttribute("data-vimeo-initialized"))return t.querySelector("iframe");var r=document.createElement("div");return r.innerHTML=n,t.appendChild(r.firstChild),t.setAttribute("data-vimeo-initialized","true"),t.querySelector("iframe")}function T(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return new Promise((function(r,i){if(!d(e))throw new TypeError("“".concat(e,"” is not a vimeo.com url."));var o="https://vimeo.com/api/oembed.json?url=".concat(encodeURIComponent(e));for(var s in t)t.hasOwnProperty(s)&&(o+="&".concat(s,"=").concat(encodeURIComponent(t[s])));var a="XDomainRequest"in window?new XDomainRequest:new XMLHttpRequest;a.open("GET",o,!0),a.onload=function(){if(404!==a.status)if(403!==a.status)try{var t=JSON.parse(a.responseText);if(403===t.domain_status_code)return _(t,n),void i(new Error("“".concat(e,"” is not embeddable.")));r(t)}catch(e){i(e)}else i(new Error("“".concat(e,"” is not embeddable.")));else i(new Error("“".concat(e,"” was not found.")))},a.onerror=function(){var e=a.status?" (".concat(a.status,")"):"";i(new Error("There was an error fetching the embed code from Vimeo".concat(e,".")))},a.send()}))}function S(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){return console.warn(e),{}}return e}function M(e,t,n){if(e.element.contentWindow&&e.element.contentWindow.postMessage){var r={method:t};void 0!==n&&(r.value=n);var i=parseFloat(navigator.userAgent.toLowerCase().replace(/^.*msie (\d+).*$/,"$1"));i>=8&&i<10&&(r=JSON.stringify(r)),e.element.contentWindow.postMessage(r,e.origin)}}function L(e,t){var n,r=[];if((t=S(t)).event){if("error"===t.event)E(e,t.data.method).forEach((function(n){var r=new Error(t.data.message);r.name=t.data.name,n.reject(r),x(e,t.data.method,n)}));r=E(e,"event:".concat(t.event)),n=t.data}else if(t.method){var i=function(e,t){var n=E(e,t);if(n.length<1)return!1;var r=n.shift();return x(e,t,r),r}(e,t.method);i&&(r.push(i),n=t.value)}r.forEach((function(t){try{if("function"==typeof t)return void t.call(e,n);t.resolve(n)}catch(e){}}))}var R=new WeakMap,I=new WeakMap,N={},z=function(){function e(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(s(this,e),window.jQuery&&t instanceof jQuery&&(t.length>1&&window.console&&console.warn&&console.warn("A jQuery object with multiple elements was passed, using the first element."),t=t[0]),"undefined"!=typeof document&&"string"==typeof t&&(t=document.getElementById(t)),!c(t))throw new TypeError("You must pass either a valid element or a valid id.");if("IFRAME"!==t.nodeName){var i=t.querySelector("iframe");i&&(t=i)}if("IFRAME"===t.nodeName&&!d(t.getAttribute("src")||""))throw new Error("The player element passed isn’t a Vimeo embed.");if(R.has(t))return R.get(t);this._window=t.ownerDocument.defaultView,this.element=t,this.origin="*";var o=new b((function(e,i){if(n._onMessage=function(t){if(d(t.origin)&&n.element.contentWindow===t.source){"*"===n.origin&&(n.origin=t.origin);var r=S(t.data);if(r&&"error"===r.event&&r.data&&"ready"===r.data.method){var o=new Error(r.data.message);return o.name=r.data.name,void i(o)}var s=r&&"ready"===r.event,a=r&&"ping"===r.method;if(s||a)return n.element.setAttribute("data-ready","true"),void e();L(n,r)}},n._window.addEventListener("message",n._onMessage),"IFRAME"!==n.element.nodeName){var o=A(t,r);T(p(o),o,t).then((function(e){var r=_(e,t);return n.element=r,n._originalElement=t,P(t,r),R.set(n.element,n),e})).catch(i)}}));if(I.set(this,o),R.set(this.element,this),"IFRAME"===this.element.nodeName&&M(this,"ping"),N.isEnabled){var a=function(){return N.exit()};this.fullscreenchangeHandler=function(){N.isFullscreen?k(n,"event:exitFullscreen",a):x(n,"event:exitFullscreen",a),n.ready().then((function(){M(n,"fullscreenchange",N.isFullscreen)}))},N.on("fullscreenchange",this.fullscreenchangeHandler)}return this}var t,n,r;return t=e,n=[{key:"callMethod",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new b((function(r,i){return t.ready().then((function(){k(t,e,{resolve:r,reject:i}),M(t,e,n)})).catch(i)}))}},{key:"get",value:function(e){var t=this;return new b((function(n,r){return e=l(e,"get"),t.ready().then((function(){k(t,e,{resolve:n,reject:r}),M(t,e)})).catch(r)}))}},{key:"set",value:function(e,t){var n=this;return new b((function(r,i){if(e=l(e,"set"),null==t)throw new TypeError("There must be a value to set.");return n.ready().then((function(){k(n,e,{resolve:r,reject:i}),M(n,e,t)})).catch(i)}))}},{key:"on",value:function(e,t){if(!e)throw new TypeError("You must pass an event name.");if(!t)throw new TypeError("You must pass a callback function.");if("function"!=typeof t)throw new TypeError("The callback must be a function.");0===E(this,"event:".concat(e)).length&&this.callMethod("addEventListener",e).catch((function(){})),k(this,"event:".concat(e),t)}},{key:"off",value:function(e,t){if(!e)throw new TypeError("You must pass an event name.");if(t&&"function"!=typeof t)throw new TypeError("The callback must be a function.");x(this,"event:".concat(e),t)&&this.callMethod("removeEventListener",e).catch((function(e){}))}},{key:"loadVideo",value:function(e){return this.callMethod("loadVideo",e)}},{key:"ready",value:function(){var e=I.get(this)||new b((function(e,t){t(new Error("Unknown player. Probably unloaded."))}));return b.resolve(e)}},{key:"addCuePoint",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.callMethod("addCuePoint",{time:e,data:t})}},{key:"removeCuePoint",value:function(e){return this.callMethod("removeCuePoint",e)}},{key:"enableTextTrack",value:function(e,t){if(!e)throw new TypeError("You must pass a language.");return this.callMethod("enableTextTrack",{language:e,kind:t})}},{key:"disableTextTrack",value:function(){return this.callMethod("disableTextTrack")}},{key:"pause",value:function(){return this.callMethod("pause")}},{key:"play",value:function(){return this.callMethod("play")}},{key:"requestFullscreen",value:function(){return N.isEnabled?N.request(this.element):this.callMethod("requestFullscreen")}},{key:"exitFullscreen",value:function(){return N.isEnabled?N.exit():this.callMethod("exitFullscreen")}},{key:"getFullscreen",value:function(){return N.isEnabled?b.resolve(N.isFullscreen):this.get("fullscreen")}},{key:"requestPictureInPicture",value:function(){return this.callMethod("requestPictureInPicture")}},{key:"exitPictureInPicture",value:function(){return this.callMethod("exitPictureInPicture")}},{key:"getPictureInPicture",value:function(){return this.get("pictureInPicture")}},{key:"unload",value:function(){return this.callMethod("unload")}},{key:"destroy",value:function(){var e=this;return new b((function(t){if(I.delete(e),R.delete(e.element),e._originalElement&&(R.delete(e._originalElement),e._originalElement.removeAttribute("data-vimeo-initialized")),e.element&&"IFRAME"===e.element.nodeName&&e.element.parentNode&&(e.element.parentNode.parentNode&&e._originalElement&&e._originalElement!==e.element.parentNode?e.element.parentNode.parentNode.removeChild(e.element.parentNode):e.element.parentNode.removeChild(e.element)),e.element&&"DIV"===e.element.nodeName&&e.element.parentNode){e.element.removeAttribute("data-vimeo-initialized");var n=e.element.querySelector("iframe");n&&n.parentNode&&(n.parentNode.parentNode&&e._originalElement&&e._originalElement!==n.parentNode?n.parentNode.parentNode.removeChild(n.parentNode):n.parentNode.removeChild(n))}e._window.removeEventListener("message",e._onMessage),N.isEnabled&&N.off("fullscreenchange",e.fullscreenchangeHandler),t()}))}},{key:"getAutopause",value:function(){return this.get("autopause")}},{key:"setAutopause",value:function(e){return this.set("autopause",e)}},{key:"getBuffered",value:function(){return this.get("buffered")}},{key:"getCameraProps",value:function(){return this.get("cameraProps")}},{key:"setCameraProps",value:function(e){return this.set("cameraProps",e)}},{key:"getChapters",value:function(){return this.get("chapters")}},{key:"getCurrentChapter",value:function(){return this.get("currentChapter")}},{key:"getColor",value:function(){return this.get("color")}},{key:"setColor",value:function(e){return this.set("color",e)}},{key:"getCuePoints",value:function(){return this.get("cuePoints")}},{key:"getCurrentTime",value:function(){return this.get("currentTime")}},{key:"setCurrentTime",value:function(e){return this.set("currentTime",e)}},{key:"getDuration",value:function(){return this.get("duration")}},{key:"getEnded",value:function(){return this.get("ended")}},{key:"getLoop",value:function(){return this.get("loop")}},{key:"setLoop",value:function(e){return this.set("loop",e)}},{key:"setMuted",value:function(e){return this.set("muted",e)}},{key:"getMuted",value:function(){return this.get("muted")}},{key:"getPaused",value:function(){return this.get("paused")}},{key:"getPlaybackRate",value:function(){return this.get("playbackRate")}},{key:"setPlaybackRate",value:function(e){return this.set("playbackRate",e)}},{key:"getPlayed",value:function(){return this.get("played")}},{key:"getQualities",value:function(){return this.get("qualities")}},{key:"getQuality",value:function(){return this.get("quality")}},{key:"setQuality",value:function(e){return this.set("quality",e)}},{key:"getSeekable",value:function(){return this.get("seekable")}},{key:"getSeeking",value:function(){return this.get("seeking")}},{key:"getTextTracks",value:function(){return this.get("textTracks")}},{key:"getVideoEmbedCode",value:function(){return this.get("videoEmbedCode")}},{key:"getVideoId",value:function(){return this.get("videoId")}},{key:"getVideoTitle",value:function(){return this.get("videoTitle")}},{key:"getVideoWidth",value:function(){return this.get("videoWidth")}},{key:"getVideoHeight",value:function(){return this.get("videoHeight")}},{key:"getVideoUrl",value:function(){return this.get("videoUrl")}},{key:"getVolume",value:function(){return this.get("volume")}},{key:"setVolume",value:function(e){return this.set("volume",e)}}],n&&a(t.prototype,n),r&&a(t,r),e}();u||(N=function(){var e=function(){for(var e,t=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],n=0,r=t.length,i={};n<r;n++)if((e=t[n])&&e[1]in document){for(n=0;n<e.length;n++)i[t[0][n]]=e[n];return i}return!1}(),t={fullscreenchange:e.fullscreenchange,fullscreenerror:e.fullscreenerror},n={request:function(t){return new Promise((function(r,i){var o=function e(){n.off("fullscreenchange",e),r()};n.on("fullscreenchange",o);var s=(t=t||document.documentElement)[e.requestFullscreen]();s instanceof Promise&&s.then(o).catch(i)}))},exit:function(){return new Promise((function(t,r){if(n.isFullscreen){var i=function e(){n.off("fullscreenchange",e),t()};n.on("fullscreenchange",i);var o=document[e.exitFullscreen]();o instanceof Promise&&o.then(i).catch(r)}else t()}))},on:function(e,n){var r=t[e];r&&document.addEventListener(r,n)},off:function(e,n){var r=t[e];r&&document.removeEventListener(r,n)}};return Object.defineProperties(n,{isFullscreen:{get:function(){return Boolean(document[e.fullscreenElement])}},element:{enumerable:!0,get:function(){return document[e.fullscreenElement]}},isEnabled:{enumerable:!0,get:function(){return Boolean(document[e.fullscreenEnabled])}}}),n}(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,t=[].slice.call(e.querySelectorAll("[data-vimeo-id], [data-vimeo-url]")),n=function(e){"console"in window&&console.error&&console.error("There was an error creating an embed: ".concat(e))};t.forEach((function(e){try{if(null!==e.getAttribute("data-vimeo-defer"))return;var t=A(e);T(p(t),t,e).then((function(t){return _(t,e)})).catch(n)}catch(e){n(e)}}))}(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;if(!window.VimeoPlayerResizeEmbeds_){window.VimeoPlayerResizeEmbeds_=!0;var t=function(t){if(d(t.origin)&&t.data&&"spacechange"===t.data.event)for(var n=e.querySelectorAll("iframe"),r=0;r<n.length;r++)if(n[r].contentWindow===t.source){n[r].parentElement.style.paddingBottom="".concat(t.data.data[0].bottom,"px");break}};window.addEventListener("message",t)}}());const V=z;var j=n(2),O=n.n(j),F=n(291),U=n.n(F),q=n(383),W=n.n(q),D=n(533),H=n.n(D);const B={can:{unmute:!0,pause:!1},wrapper:document.body,onMuteUnmute:!1,onPausePlay:!1,initialState:{muted:!0,paused:!1}};class Z{constructor(e){this.config=Object.assign(B,e),this.parent=this.config.wrapper,this.state=this.config.initialState||{muted:!0,paused:!1},this.toggleMute=this.config.onMuteUnmute,this.togglePause=this.config.onPausePlay,this.wrapper=document.createElement("div"),this.init()}setupWrapper(){this.wrapper.classList.add("vbg__icons"),this.config.can?.unmute&&(this.muteUnmute=document.createElement("button"),this.muteUnmute.classList.add("icon-button","vbg__icon"),this.muteUnmute.addEventListener("click",this.handleMuteUnmuteClick.bind(this)),this.wrapper.append(this.muteUnmute)),this.config.can?.pause&&(this.pausePlay=document.createElement("button"),this.pausePlay.classList.add("icon-button","vbg__icon"),this.pausePlay.addEventListener("click",this.handlePausePlay.bind(this)),this.wrapper.append(this.pausePlay)),this.parent.append(this.wrapper)}init(){this.setupWrapper(),this.handleStateChange()}updateState(e,t){return this.state[e]=t,this.handleStateChange()}handleStateChange(){this.config.can?.unmute&&this.muteUnmute&&this.syncMuteState(),this.config.can?.pause&&this.pausePlay&&this.syncPauseState()}syncMuteState(){this.muteUnmute?this.state.muted?(this.muteUnmute.setAttribute("aria-label","Unmute Video"),this.muteUnmute.innerHTML=O()):(this.muteUnmute.setAttribute("aria-label","Mute Video"),this.muteUnmute.innerHTML=U()):console.error("Sometthing went wrong: Trying to sync mute button before button exists")}syncPauseState(){this.pausePlay?this.state.paused?(this.pausePlay.setAttribute("aria-label","Play Video"),this.pausePlay.innerHTML=H()):(this.pausePlay.setAttribute("aria-label","Pause Video"),this.pausePlay.innerHTML=W()):console.error("Sometthing went wrong: Trying to sync mute button before button exists")}handleMuteUnmuteClick(){this.state.muted=!this.state.muted,this.toggleMute&&this.toggleMute(),this.syncMuteState()}handlePausePlay(){this.state.paused=!this.state.paused,this.togglePause&&this.togglePause(),this.syncPauseState()}}class Y{constructor(e=!1){this.level=e||!1}log(e,t=!1){(t&&this.level||"verbose"==this.level)&&console.log(e)}}const $={ready:!1,error:!1,paused:!0,playing:!1,started:!1,muted:!0,apiReady:!1,intersecting:!1},Q={aspectRatio:.5625,muted:!0,poster:!1,autoplay:!0},J={loop:!0,zoom:1.3,can:{unmute:!1,pause:!1},startTime:0,fillMode:"fill",threshold:.2};class G{constructor(e){if(this.status=$,this.props=Q,this.type="local",this.passedConfig=e,this.callbacks={ready:[{fn:this.playCheck.bind(this)}],intersecting:[{fn:this.playCheck.bind(this)}]},this.config=this.mergeConfig(e),this.logger=this.config.parent.logger,this.parent=this.config.parent,this.parseParams(),!this.hasRequiredParams(this.config))throw this.status.error=!0,new Error("No parent passed, cannot create player");this.init()}parseParams(){this.parent.hasAttribute("zoom")&&(this.config.zoom=parseFloat(this.parent.getAttribute("zoom"))),this.parent.hasAttribute("can-unmute")&&(this.config.can.pause="false"!=this.parent.getAttribute("can-unmute")),this.parent.hasAttribute("loop")&&(this.config.can.pause="false"!=this.parent.getAttribute("loop")),this.parent.hasAttribute("can-pause")&&(this.config.can.pause="false"!=this.parent.getAttribute("can-pause")),this.parent.hasAttribute("fill-mode")&&(this.config.fillMode="fit"==this.parent.getAttribute("fill-mode")?"fit":"fill"),this.parent.hasAttribute("start")&&(this.config.startTime=parseInt(this.parent.getAttribute("start")))}hasRequiredParams(e){return null==e.parent?(console.log("Cannot initialize player: No parent provided to Player via constructor"),!1):null!=e.source||(console.log("Cannot initialize player: No source provided to Player via constructor"),!1)}build(){}unbuild(){}init(){window.addEventListener("resize",this.resize.bind(this)),this.buildIntersectionObserver()}destroy(){this.unbuild(),this.removeIntersectionObserver(),window.removeEventListener("resize",this.resize.bind(this))}mergeConfig(e){return Object.assign(J,e)}do(e){const t=this.callbacks[e];"object"==typeof t&&t.forEach((e=>e.fn()))}on(e,t,n){const r="object"==typeof this.callbacks[e];if(r&&n){this.callbacks[e].find((e=>e.key==n))||this.callbacks[e].push({fn:t,key:n})}else r?this.callbacks[e].push({fn:t}):this.callbacks[e]=[{fn:t}]}playCheck(){const{ready:e,intersecting:t}=this.status;e&&(t?this.play():this.pause())}async pause(){return!0}async play(){return!0}async mute(){}async unmute(){}resize(){if("local"!=this.type){let e=null;if(e=this.wrapper?this.wrapper.querySelector("iframe"):this.iframe,!e)return void console.log("No iframe found.");if(e.remo