!function(n,t){typeof module!="undefined"&&module.exports?module.exports.browser=t():typeof define=="function"&&define.amd?define(t):this[n]=t()}("bowser",function(){function t(t){function r(n){var i=t.match(n);return i&&i.length>1&&i[1]||""}var e=r(/(ipod|iphone|ipad)/i).toLowerCase(),l=/like android/i.test(t),o=!l&&/android/i.test(t),f=r(/version\/(\d+(\.\d+)?)/i),h=/tablet/i.test(t),c=!h&&/[^-]mobi/i.test(t),i,u,s;return/opera|opr/i.test(t)?i={name:"Opera",opera:n,version:f||r(/(?:opera|opr)[\s\/](\d+(\.\d+)?)/i)}:/windows phone/i.test(t)?i={name:"Windows Phone",windowsphone:n,msie:n,version:r(/iemobile\/(\d+(\.\d+)?)/i)}:/msie|trident/i.test(t)?i={name:"Internet Explorer",msie:n,version:r(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:/chrome|crios|crmo/i.test(t)?i={name:"Chrome",chrome:n,version:r(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:e?(i={name:e=="iphone"?"iPhone":e=="ipad"?"iPad":"iPod"},f&&(i.version=f)):/sailfish/i.test(t)?i={name:"Sailfish",sailfish:n,version:r(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(t)?i={name:"SeaMonkey",seamonkey:n,version:r(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel/i.test(t)?(i={name:"Firefox",firefox:n,version:r(/(?:firefox|iceweasel)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(t)&&(i.firefoxos=n)):/silk/i.test(t)?i={name:"Amazon Silk",silk:n,version:r(/silk\/(\d+(\.\d+)?)/i)}:o?i={name:"Android",version:f}:/phantom/i.test(t)?i={name:"PhantomJS",phantom:n,version:r(/phantomjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(t)||/rim\stablet/i.test(t)?i={name:"BlackBerry",blackberry:n,version:f||r(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:/(web|hpw)os/i.test(t)?(i={name:"WebOS",webos:n,version:f||r(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(t)&&(i.touchpad=n)):i=/bada/i.test(t)?{name:"Bada",bada:n,version:r(/dolfin\/(\d+(\.\d+)?)/i)}:/tizen/i.test(t)?{name:"Tizen",tizen:n,version:r(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||f}:/safari/i.test(t)?{name:"Safari",safari:n,version:f}:{},/(apple)?webkit/i.test(t)?(i.name=i.name||"Webkit",i.webkit=n,!i.version&&f&&(i.version=f)):!i.opera&&/gecko\//i.test(t)&&(i.name=i.name||"Gecko",i.gecko=n,i.version=i.version||r(/gecko\/(\d+(\.\d+)?)/i)),o||i.silk?i.android=n:e&&(i[e]=n,i.ios=n),u="",e?(u=r(/os (\d+([_\s]\d+)*) like mac os x/i),u=u.replace(/[_\s]/g,".")):o?u=r(/android[ \/-](\d+(\.\d+)*)/i):i.windowsphone?u=r(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):i.webos?u=r(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):i.blackberry?u=r(/rim\stablet\sos\s(\d+(\.\d+)*)/i):i.bada?u=r(/bada\/(\d+(\.\d+)*)/i):i.tizen&&(u=r(/tizen[\/\s](\d+(\.\d+)*)/i)),u&&(i.osversion=u),s=u.split(".")[0],h||e=="ipad"||o&&(s==3||s==4&&!c)||i.silk?i.tablet=n:(c||e=="iphone"||e=="ipod"||o||i.blackberry||i.webos||i.bada)&&(i.mobile=n),i.msie&&i.version>=10||i.chrome&&i.version>=20||i.firefox&&i.version>=20||i.safari&&i.version>=6||i.opera&&i.version>=10||i.ios&&i.osversion&&i.osversion.split(".")[0]>=6||i.blackberry&&i.version>=10.1?i.a=n:i.msie&&i.version<10||i.chrome&&i.version<20||i.firefox&&i.version<20||i.safari&&i.version<6||i.opera&&i.version<10||i.ios&&i.osversion&&i.osversion.split(".")[0]<6?i.c=n:i.x=n,i}var n=!0,i=t(typeof navigator!="undefined"?navigator.userAgent:"");return i._detect=t,i});!function(n,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Cleave=t():n.Cleave=t()}(this,function(){return function(n){function t(r){if(i[r])return i[r].exports;var u=i[r]={exports:{},id:r,loaded:!1};return n[r].call(u.exports,u,u.exports,t),u.loaded=!0,u.exports}var i={};return t.m=n,t.c=i,t.p="",t(0)}([function(n,t,i){(function(t){"use strict";var r=function(n,t){var i=this;if(i.element="string"==typeof n?document.querySelector(n):"undefined"!=typeof n.length&&n.length>0?n[0]:n,!i.element)throw new Error("[cleave.js] Please check the element");t.initValue=i.element.value;i.properties=r.DefaultProperties.assign({},t);i.init()};r.prototype={init:function(){var n=this,t=n.properties;return t.numeral||t.phone||t.creditCard||t.time||t.date||0!==t.blocksLength||t.prefix?(t.maxLength=r.Util.getMaxLength(t.blocks),n.isAndroid=r.Util.isAndroid(),n.lastInputValue="",n.onChangeListener=n.onChange.bind(n),n.onKeyDownListener=n.onKeyDown.bind(n),n.onFocusListener=n.onFocus.bind(n),n.onCutListener=n.onCut.bind(n),n.onCopyListener=n.onCopy.bind(n),n.element.addEventListener("input",n.onChangeListener),n.element.addEventListener("keydown",n.onKeyDownListener),n.element.addEventListener("focus",n.onFocusListener),n.element.addEventListener("cut",n.onCutListener),n.element.addEventListener("copy",n.onCopyListener),n.initPhoneFormatter(),n.initDateFormatter(),n.initTimeFormatter(),n.initNumeralFormatter(),void((t.initValue||t.prefix&&!t.noImmediatePrefix)&&n.onInput(t.initValue))):void n.onInput(t.initValue)},initNumeralFormatter:function(){var t=this,n=t.properties;n.numeral&&(n.numeralFormatter=new r.NumeralFormatter(n.numeralDecimalMark,n.numeralIntegerScale,n.numeralDecimalScale,n.numeralThousandsGroupStyle,n.numeralPositiveOnly,n.stripLeadingZeroes,n.delimiter))},initTimeFormatter:function(){var t=this,n=t.properties;n.time&&(n.timeFormatter=new r.TimeFormatter(n.timePattern,n.timeFormat),n.blocks=n.timeFormatter.getBlocks(),n.blocksLength=n.blocks.length,n.maxLength=r.Util.getMaxLength(n.blocks))},initDateFormatter:function(){var t=this,n=t.properties;n.date&&(n.dateFormatter=new r.DateFormatter(n.datePattern),n.blocks=n.dateFormatter.getBlocks(),n.blocksLength=n.blocks.length,n.maxLength=r.Util.getMaxLength(n.blocks))},initPhoneFormatter:function(){var t=this,n=t.properties;if(n.phone)try{n.phoneFormatter=new r.PhoneFormatter(new n.root.Cleave.AsYouTypeFormatter(n.phoneRegionCode),n.delimiter)}catch(i){throw new Error("[cleave.js] Please include phone-type-formatter.{country}.js lib");}},onKeyDown:function(n){var t=this,i=t.properties,u=n.which||n.keyCode,o=r.Util,f=t.element.value,e;t.hasBackspaceSupport=t.hasBackspaceSupport||8===u;!t.hasBackspaceSupport&&o.isAndroidBackspaceKeydown(t.lastInputValue,f)&&(u=8);t.lastInputValue=f;e=o.getPostDelimiter(f,i.delimiter,i.delimiters);i.postDelimiterBackspace=8===u&&e?e:!1},onChange:function(){this.onInput(this.element.value)},onFocus:function(){var t=this,n=t.properties;r.Util.fixPrefixCursor(t.element,n.prefix,n.delimiter,n.delimiters)},onCut:function(n){this.copyClipboardData(n);this.onInput("")},onCopy:function(n){this.copyClipboardData(n)},copyClipboardData:function(n){var i=this,t=i.properties,e=r.Util,u=i.element.value,f=t.copyDelimiter?u:e.stripDelimiters(u,t.delimiter,t.delimiters);try{n.clipboardData?n.clipboardData.setData("Text",f):window.clipboardData.setData("Text",f);n.preventDefault()}catch(o){}},onInput:function(n){var u=this,t=u.properties,i=r.Util,f=i.getPostDelimiter(n,t.delimiter,t.delimiters);return t.numeral||!t.postDelimiterBackspace||f||(n=i.headStr(n,n.length-t.postDelimiterBackspace.length)),t.phone?(t.result=!t.prefix||t.noImmediatePrefix&&!n.length?t.phoneFormatter.format(n):t.prefix+t.phoneFormatter.format(n).slice(t.prefix.length),void u.updateValueState()):t.numeral?(t.result=!t.prefix||t.noImmediatePrefix&&!n.length?t.numeralFormatter.format(n):t.prefix+t.numeralFormatter.format(n),void u.updateValueState()):(t.date&&(n=t.dateFormatter.getValidatedDate(n)),t.time&&(n=t.timeFormatter.getValidatedTime(n)),n=i.stripDelimiters(n,t.delimiter,t.delimiters),n=i.getPrefixStrippedValue(n,t.prefix,t.prefixLength,t.result),n=t.numericOnly?i.strip(n,/[^\d]/g):n,n=t.uppercase?n.toUpperCase():n,n=t.lowercase?n.toLowerCase():n,!t.prefix||t.noImmediatePrefix&&!n.length||(n=t.prefix+n,0!==t.blocksLength)?(t.creditCard&&u.updateCreditCardPropsByValue(n),n=i.headStr(n,t.maxLength),t.result=i.getFormattedValue(n,t.blocks,t.blocksLength,t.delimiter,t.delimiters,t.delimiterLazyShow),void u.updateValueState()):(t.result=n,void u.updateValueState()))},updateCreditCardPropsByValue:function(n){var i,f=this,t=f.properties,u=r.Util;u.headStr(t.result,4)!==u.headStr(n,4)&&(i=r.CreditCardDetector.getInfo(n,t.creditCardStrictMode),t.blocks=i.blocks,t.blocksLength=t.blocks.length,t.maxLength=u.getMaxLength(t.blocks),t.creditCardType!==i.type&&(t.creditCardType=i.type,t.onCreditCardTypeChanged.call(f,t.creditCardType)))},updateValueState:function(){var n=this,u=r.Util,t=n.properties;if(n.element){var i=n.element.selectionEnd,e=n.element.value,f=t.result;if(i=u.getNextCursorPosition(i,e,f,t.delimiter,t.delimiters),n.isAndroid)return void window.setTimeout(function(){n.element.value=f;u.setSelection(n.element,i,t.document,!1);n.callOnValueChanged()},1);n.element.value=f;u.setSelection(n.element,i,t.document,!1);n.callOnValueChanged()}},callOnValueChanged:function(){var n=this,t=n.properties;t.onValueChanged.call(n,{target:{value:t.result,rawValue:n.getRawValue()}})},setPhoneRegionCode:function(n){var t=this,i=t.properties;i.phoneRegionCode=n;t.initPhoneFormatter();t.onChange()},setRawValue:function(n){var t=this,i=t.properties;n=void 0!==n&&null!==n?n.toString():"";i.numeral&&(n=n.replace(".",i.numeralDecimalMark));i.postDelimiterBackspace=!1;t.element.value=n;t.onInput(n)},getRawValue:function(){var i=this,n=i.properties,u=r.Util,t=i.element.value;return n.rawValueTrimPrefix&&(t=u.getPrefixStrippedValue(t,n.prefix,n.prefixLength,n.result)),t=n.numeral?n.numeralFormatter.getRawValue(t):u.stripDelimiters(t,n.delimiter,n.delimiters)},getISOFormatDate:function(){var t=this,n=t.properties;return n.date?n.dateFormatter.getISOFormatDate():""},getISOFormatTime:function(){var t=this,n=t.properties;return n.time?n.timeFormatter.getISOFormatTime():""},getFormattedValue:function(){return this.element.value},destroy:function(){var n=this;n.element.removeEventListener("input",n.onChangeListener);n.element.removeEventListener("keydown",n.onKeyDownListener);n.element.removeEventListener("focus",n.onFocusListener);n.element.removeEventListener("cut",n.onCutListener);n.element.removeEventListener("copy",n.onCopyListener)},toString:function(){return"[Cleave Object]"}};r.NumeralFormatter=i(1);r.DateFormatter=i(2);r.TimeFormatter=i(3);r.PhoneFormatter=i(4);r.CreditCardDetector=i(5);r.Util=i(6);r.DefaultProperties=i(7);("object"==typeof t&&t?t:window).Cleave=r;n.exports=r}).call(t,function(){return this}())},function(n){"use strict";var t=function(n,i,r,u,f,e,o){var s=this;s.numeralDecimalMark=n||".";s.numeralIntegerScale=i>0?i:0;s.numeralDecimalScale=r>=0?r:2;s.numeralThousandsGroupStyle=u||t.groupStyle.thousand;s.numeralPositiveOnly=!!f;s.stripLeadingZeroes=e!==!1;s.delimiter=o||""===o?o:",";s.delimiterRE=o?new RegExp("\\"+o,"g"):""};t.groupStyle={thousand:"thousand",lakh:"lakh",wan:"wan",none:"none"};t.prototype={getRawValue:function(n){return n.replace(this.delimiterRE,"").replace(this.numeralDecimalMark,".")},format:function(n){var u,r,i=this,f="";switch(n=n.replace(/[A-Za-z]/g,"").replace(i.numeralDecimalMark,"M").replace(/[^\dM-]/g,"").replace(/^\-/,"N").replace(/\-/g,"").replace("N",i.numeralPositiveOnly?"":"-").replace("M",i.numeralDecimalMark),i.stripLeadingZeroes&&(n=n.replace(/^(-)?0+(?=\d)/,"$1")),r=n,n.indexOf(i.numeralDecimalMark)>=0&&(u=n.split(i.numeralDecimalMark),r=u[0],f=i.numeralDecimalMark+u[1].slice(0,i.numeralDecimalScale)),i.numeralIntegerScale>0&&(r=r.slice(0,i.numeralIntegerScale+("-"===n.slice(0,1)?1:0))),i.numeralThousandsGroupStyle){case t.groupStyle.lakh:r=r.replace(/(\d)(?=(\d\d)+\d$)/g,"$1"+i.delimiter);break;case t.groupStyle.wan:r=r.replace(/(\d)(?=(\d{4})+$)/g,"$1"+i.delimiter);break;case t.groupStyle.thousand:r=r.replace(/(\d)(?=(\d{3})+$)/g,"$1"+i.delimiter)}return r.toString()+(i.numeralDecimalScale>0?f.toString():"")}};n.exports=t},function(n){"use strict";var t=function(n){var t=this;t.date=[];t.blocks=[];t.datePattern=n;t.initBlocks()};t.prototype={initBlocks:function(){var n=this;n.datePattern.forEach(function(t){"Y"===t?n.blocks.push(4):n.blocks.push(2)})},getISOFormatDate:function(){var t=this,n=t.date;return n[2]?n[2]+"-"+t.addLeadingZero(n[1])+"-"+t.addLeadingZero(n[0]):""},getBlocks:function(){return this.blocks},getValidatedDate:function(n){var t=this,i="";return n=n.replace(/[^\d]/g,""),t.blocks.forEach(function(r,u){if(n.length>0){var f=n.slice(0,r),e=f.slice(0,1),o=n.slice(r);switch(t.datePattern[u]){case"d":"00"===f?f="01":parseInt(e,10)>3?f="0"+e:parseInt(f,10)>31&&(f="31");break;case"m":"00"===f?f="01":parseInt(e,10)>1?f="0"+e:parseInt(f,10)>12&&(f="12")}i+=f;n=o}}),this.getFixedDateString(i)},getFixedDateString:function(n){var o,s,a,u=this,f=u.datePattern,t=[],h=0,c=0,l=0,i=0,r=0,e=0,v=!1;return 4===n.length&&"y"!==f[0].toLowerCase()&&"y"!==f[1].toLowerCase()&&(i="d"===f[0]?0:2,r=2-i,o=parseInt(n.slice(i,i+2),10),s=parseInt(n.slice(r,r+2),10),t=this.getFixedDate(o,s,0)),8===n.length&&(f.forEach(function(n,t){switch(n){case"d":h=t;break;case"m":c=t;break;default:l=t}}),e=2*l,i=h<=l?2*h:2*h+2,r=c<=l?2*c:2*c+2,o=parseInt(n.slice(i,i+2),10),s=parseInt(n.slice(r,r+2),10),a=parseInt(n.slice(e,e+4),10),v=4===n.slice(e,e+4).length,t=this.getFixedDate(o,s,a)),u.date=t,0===t.length?n:f.reduce(function(n,i){switch(i){case"d":return n+u.addLeadingZero(t[0]);case"m":return n+u.addLeadingZero(t[1]);default:return n+(v?u.addLeadingZeroForYear(t[2]):"")}},"")},getFixedDate:function(n,t,i){return n=Math.min(n,31),t=Math.min(t,12),i=parseInt(i||0,10),(t<7&&t%2==0||t>8&&t%2==1)&&(n=Math.min(n,2===t?this.isLeapYear(i)?29:28:30)),[n,t,i]},isLeapYear:function(n){return n%4==0&&n%100!=0||n%400==0},addLeadingZero:function(n){return(n<10?"0":"")+n},addLeadingZeroForYear:function(n){return(n<10?"000":n<100?"00":n<1e3?"0":"")+n}};n.exports=t},function(n){"use strict";var t=function(n,t){var i=this;i.time=[];i.blocks=[];i.timePattern=n;i.timeFormat=t;i.initBlocks()};t.prototype={initBlocks:function(){var n=this;n.timePattern.forEach(function(){n.blocks.push(2)})},getISOFormatTime:function(){var n=this,t=n.time;return t[2]?n.addLeadingZero(t[0])+":"+n.addLeadingZero(t[1])+":"+n.addLeadingZero(t[2]):""},getBlocks:function(){return this.blocks},getTimeFormatOptions:function(){var n=this;return"12"===String(n.timeFormat)?{maxHourFirstDigit:1,maxHours:12,maxMinutesFirstDigit:5,maxMinutes:60}:{maxHourFirstDigit:2,maxHours:23,maxMinutesFirstDigit:5,maxMinutes:60}},getValidatedTime:function(n){var i=this,r="",t;return n=n.replace(/[^\d]/g,""),t=i.getTimeFormatOptions(),i.blocks.forEach(function(u,f){if(n.length>0){var e=n.slice(0,u),o=e.slice(0,1),s=n.slice(u);switch(i.timePattern[f]){case"h":parseInt(o,10)>t.maxHourFirstDigit?e="0"+o:parseInt(e,10)>t.maxHours&&(e=t.maxHours+"");break;case"m":case"s":parseInt(o,10)>t.maxMinutesFirstDigit?e="0"+o:parseInt(e,10)>t.maxMinutes&&(e=t.maxMinutes+"")}r+=e;n=s}}),this.getFixedTimeString(r)},getFixedTimeString:function(n){var f,e,o,i=this,c=i.timePattern,t=[],a=0,s=0,h=0,l=0,r=0,u=0;return 6===n.length&&(c.forEach(function(n,t){switch(n){case"s":a=2*t;break;case"m":s=2*t;break;case"h":h=2*t}}),u=h,r=s,l=a,f=parseInt(n.slice(l,l+2),10),e=parseInt(n.slice(r,r+2),10),o=parseInt(n.slice(u,u+2),10),t=this.getFixedTime(o,e,f)),4===n.length&&i.timePattern.indexOf("s")<0&&(c.forEach(function(n,t){switch(n){case"m":s=2*t;break;case"h":h=2*t}}),u=h,r=s,f=0,e=parseInt(n.slice(r,r+2),10),o=parseInt(n.slice(u,u+2),10),t=this.getFixedTime(o,e,f)),i.time=t,0===t.length?n:c.reduce(function(n,r){switch(r){case"s":return n+i.addLeadingZero(t[2]);case"m":return n+i.addLeadingZero(t[1]);case"h":return n+i.addLeadingZero(t[0])}},"")},getFixedTime:function(n,t,i){return i=Math.min(parseInt(i||0,10),60),t=Math.min(t,60),n=Math.min(n,60),[n,t,i]},addLeadingZero:function(n){return(n<10?"0":"")+n}};n.exports=t},function(n){"use strict";var t=function(n,t){var i=this;i.delimiter=t||""===t?t:" ";i.delimiterRE=t?new RegExp("\\"+t,"g"):"";i.formatter=n};t.prototype={setFormatter:function(n){this.formatter=n},format:function(n){var i=this;i.formatter.clear();n=n.replace(/[^\d+]/g,"");n=n.replace(/^\+/,"B").replace(/\+/g,"").replace("B","+");n=n.replace(i.delimiterRE,"");for(var r,t="",f=!1,u=0,e=n.length;u<e;u++)r=i.formatter.inputDigit(n.charAt(u)),/[\s()-]/g.test(r)?(t=r,f=!0):f||(t=r);return t=t.replace(/[()]/g,""),t=t.replace(/[\s-]/g,i.delimiter)}};n.exports=t},function(n){"use strict";var t={blocks:{uatp:[4,5,6],amex:[4,6,5],diners:[4,6,4],discover:[4,4,4,4],mastercard:[4,4,4,4],dankort:[4,4,4,4],instapayment:[4,4,4,4],jcb15:[4,6,5],jcb:[4,4,4,4],maestro:[4,4,4,4],visa:[4,4,4,4],mir:[4,4,4,4],unionPay:[4,4,4,4],general:[4,4,4,4],generalStrict:[4,4,4,7]},re:{uatp:/^(?!1800)1\d{0,14}/,amex:/^3[47]\d{0,13}/,discover:/^(?:6011|65\d{0,2}|64[4-9]\d?)\d{0,12}/,diners:/^3(?:0([0-5]|9)|[689]\d?)\d{0,11}/,mastercard:/^(5[1-5]\d{0,2}|22[2-9]\d{0,1}|2[3-7]\d{0,2})\d{0,12}/,dankort:/^(5019|4175|4571)\d{0,12}/,instapayment:/^63[7-9]\d{0,13}/,jcb15:/^(?:2131|1800)\d{0,11}/,jcb:/^(?:35\d{0,2})\d{0,12}/,maestro:/^(?:5[0678]\d{0,2}|6304|67\d{0,2})\d{0,12}/,mir:/^220[0-4]\d{0,12}/,visa:/^4\d{0,15}/,unionPay:/^62\d{0,14}/},getInfo:function(n,i){var r=t.blocks,f=t.re,u,e;i=!!i;for(u in f)if(f[u].test(n))return e=i?r.generalStrict:r[u],{type:u,blocks:e};return{type:"unknown",blocks:i?r.generalStrict:r.general}}};n.exports=t},function(n){"use strict";var t={noop:function(){},strip:function(n,t){return n.replace(t,"")},getPostDelimiter:function(n,t,i){if(0===i.length)return n.slice(-t.length)===t?t:"";var r="";return i.forEach(function(t){n.slice(-t.length)===t&&(r=t)}),r},getDelimiterREByDelimiter:function(n){return new RegExp(n.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1"),"g")},getNextCursorPosition:function(n,t,i,r,u){return t.length===n?i.length:n+this.getPositionOffset(n,t,i,r,u)},getPositionOffset:function(n,t,i,r,u){var e,o,f;return e=this.stripDelimiters(t.slice(0,n),r,u),o=this.stripDelimiters(i.slice(0,n),r,u),f=e.length-o.length,0!==f?f/Math.abs(f):0},stripDelimiters:function(n,t,i){var r=this,u;return 0===i.length?(u=t?r.getDelimiterREByDelimiter(t):"",n.replace(u,"")):(i.forEach(function(t){t.split("").forEach(function(t){n=n.replace(r.getDelimiterREByDelimiter(t),"")})}),n)},headStr:function(n,t){return n.slice(0,t)},getMaxLength:function(n){return n.reduce(function(n,t){return n+t},0)},getPrefixStrippedValue:function(n,t,i,r){if(n.slice(0,i)!==t)if(n.length<r.length)n=n.length>i?r:t;else{var u=this.getFirstDiffIndex(t,n.slice(0,i));n=t+n.slice(u,u+1)+n.slice(i+1)}return n.slice(i)},getFirstDiffIndex:function(n,t){for(var i=0;n.charAt(i)===t.charAt(i);)if(""===n.charAt(i++))return-1;return i},getFormattedValue:function(n,t,i,r,u,f){var o,e="",s=u.length>0;return 0===i?n:(t.forEach(function(t,h){if(n.length>0){var c=n.slice(0,t),l=n.slice(t);o=s?u[f?h-1:h]||o:r;f?(h>0&&(e+=o),e+=c):(e+=c,c.length===t&&h<i-1&&(e+=o));n=l}}),e)},fixPrefixCursor:function(n,t,i,r){var u,e,f;n&&(u=n.value,e=i||r[0]||" ",!n.setSelectionRange||!t||t.length+e.length<u.length||(f=2*u.length,setTimeout(function(){n.setSelectionRange(f,f)},1)))},setSelection:function(n,t,i){if(n===this.getActiveElement(i)&&!(n&&n.value.length<=t))if(n.createTextRange){var r=n.createTextRange();r.move("character",t);r.select()}else try{n.setSelectionRange(t,t)}catch(u){console.warn("The input element type does not support selection")}},getActiveElement:function(n){var t=n.activeElement;return t&&t.shadowRoot?this.getActiveElement(t.shadowRoot):t},isAndroid:function(){return navigator&&/android/i.test(navigator.userAgent)},isAndroidBackspaceKeydown:function(n,t){return!!(this.isAndroid()&&n&&t)&&t===n.slice(0,-1)}};n.exports=t},function(n,t){(function(t){"use strict";var i={assign:function(n,i){return n=n||{},i=i||{},n.creditCard=!!i.creditCard,n.creditCardStrictMode=!!i.creditCardStrictMode,n.creditCardType="",n.onCreditCardTypeChanged=i.onCreditCardTypeChanged||function(){},n.phone=!!i.phone,n.phoneRegionCode=i.phoneRegionCode||"AU",n.phoneFormatter={},n.time=!!i.time,n.timePattern=i.timePattern||["h","m","s"],n.timeFormat=i.timeFormat||"24",n.timeFormatter={},n.date=!!i.date,n.datePattern=i.datePattern||["d","m","Y"],n.dateFormatter={},n.numeral=!!i.numeral,n.numeralIntegerScale=i.numeralIntegerScale>0?i.numeralIntegerScale:0,n.numeralDecimalScale=i.numeralDecimalScale>=0?i.numeralDecimalScale:2,n.numeralDecimalMark=i.numeralDecimalMark||".",n.numeralThousandsGroupStyle=i.numeralThousandsGroupStyle||"thousand",n.numeralPositiveOnly=!!i.numeralPositiveOnly,n.stripLeadingZeroes=i.stripLeadingZeroes!==!1,n.numericOnly=n.creditCard||n.date||!!i.numericOnly,n.uppercase=!!i.uppercase,n.lowercase=!!i.lowercase,n.prefix=n.creditCard||n.date?"":i.prefix||"",n.noImmediatePrefix=!!i.noImmediatePrefix,n.prefixLength=n.prefix.length,n.rawValueTrimPrefix=!!i.rawValueTrimPrefix,n.copyDelimiter=!!i.copyDelimiter,n.initValue=void 0!==i.initValue&&null!==i.initValue?i.initValue.toString():"",n.delimiter=i.delimiter||""===i.delimiter?i.delimiter:i.date?"/":i.time?":":i.numeral?",":(i.phone," "),n.delimiterLength=n.delimiter.length,n.delimiterLazyShow=!!i.delimiterLazyShow,n.delimiters=i.delimiters||[],n.blocks=i.blocks||[],n.blocksLength=n.blocks.length,n.root="object"==typeof t&&t?t:window,n.document=i.document||n.root.document,n.maxLength=0,n.backspace=!1,n.result="",n.onValueChanged=i.onValueChanged||function(){},n}};n.exports=i}).call(t,function(){return this}())}])});!function(){function w(n,t){var r=n.split("."),i=si,u;for((r[0]in i)||!i.execScript||i.execScript("var "+r[0]);r.length&&(u=r.shift());)r.length||void 0===t?i=i[u]?i[u]:i[u]={}:i[u]=t}function c(n,t){function i(){}i.prototype=t.prototype;n.M=t.prototype;n.prototype=new i;n.prototype.constructor=n;n.N=function(n,i){for(var u=Array(arguments.length-2),r=2;r<arguments.length;r++)u[r-2]=arguments[r];return t.prototype[i].apply(n,u)}}function i(n){null!=n&&this.a.apply(this,arguments)}function t(n){n.b=""}function ti(n,t){n.sort(t||ii)}function ii(n,t){return n>t?1:n<t?-1:0}function ri(n){var t,i=[],r=0;for(t in n)i[r++]=n[t];return i}function ui(n,t){var i,r;for(this.b=n,this.a={},i=0;i<t.length;i++)r=t[i],this.a[r.b]=r}function fi(n){return n=ri(n.a),ti(n,function(n,t){return n.b-t.b}),n}function ei(n,t){switch(this.b=n,this.g=!!t.v,this.a=t.c,this.i=t.type,this.h=!1,this.a){case li:case ai:case vi:case yi:case pi:case ci:case hi:this.h=!0}this.f=t.defaultValue}function u(){this.a={};this.f=this.j().a;this.b=this.g=null}function st(n,t){for(var r,u,i,f,c=fi(n.j()),o=0;o<c.length;o++)if(i=c[o],r=i.b,null!=t.a[r])if(n.b&&delete n.b[i.b],u=11==i.a||10==i.a,i.g)for(i=s(t,r)||[],f=0;f<i.length;f++){var e=n,h=r,l=u?i[f].clone():i[f];e.a[h]||(e.a[h]=[]);e.a[h].push(l);e.b&&delete e.b[h]}else i=s(t,r),u?(u=s(n,r))?st(u,i):v(n,r,i.clone()):v(n,r,i)}function s(n,t){var i=n.a[t],f,u,e,r;if(null==i)return null;if(n.g){if(!(t in n.b)){if(f=n.g,u=n.f[t],null!=i)if(u.g){for(e=[],r=0;r<i.length;r++)e[r]=f.b(u,i[r]);i=e}else i=f.b(u,i);return n.b[t]=i}return n.b[t]}return i}function r(n,t,i){var r=s(n,t);return n.f[t].g?r[i||0]:r}function f(n,t){var i,u;if(null!=n.a[t])i=r(n,t,void 0);else n:{if(i=n.f[t],void 0===i.f)if(u=i.i,u===Boolean)i.f=!1;else if(u===Number)i.f=0;else{if(u!==String){i=new u;break n}i.f=i.h?"0":""}i=i.f}return i}function b(n,t){return n.f[t].g?null!=n.a[t]?n.a[t].length:0:null!=n.a[t]?1:0}function v(n,t,i){n.a[t]=i;n.b&&(n.b[t]=i)}function k(n,t){var i,r=[];for(i in t)0!=i&&r.push(new ei(i,t[i]));return new ui(n,r)}function e(){u.call(this)}function n(){u.call(this)}function o(){u.call(this)}function y(){}function d(){}function l(){}function h(){this.a={}}function ht(n){return 0==n.length||di.test(n)}function g(n,t){if(null==t)return null;t=t.toUpperCase();var i=n.a[t];if(null==i){if(i=ot[t],null==i)return null;i=(new l).a(o.j(),i);n.a[t]=i}return i}function ct(n){return n=et[n],null==n?"ZZ":n[0]}function a(n){this.H=RegExp(" ");this.C="";this.m=new i;this.w="";this.i=new i;this.u=new i;this.l=!0;this.A=this.o=this.F=!1;this.G=h.b();this.s=0;this.b=new i;this.B=!1;this.h="";this.a=new i;this.f=[];this.D=n;this.J=this.g=nt(this,this.D)}function nt(n,t){var i;if(null!=t&&isNaN(t)&&t.toUpperCase()in ot){if(i=g(n.G,t),null==i)throw Error("Invalid region code: "+t);i=f(i,10)}else i=0;return i=g(n.G,ct(i)),null!=i?i:gt}function lt(n){for(var h,c,i,u,e,o,l,a=n.f.length,s=0;s<a;++s){if(h=n.f[s],c=f(h,1),n.w==c)return!1;if(i=n,o=h,u=f(o,1),-1!=u.indexOf("|")?i=!1:(u=u.replace(gi,"\\d"),u=u.replace(nr,"\\d"),t(i.m),e=i,o=f(o,2),l="999999999999999".match(u)[0],l.length<e.a.b.length?e="":(e=l.replace(new RegExp(u,"g"),o),e=e.replace(RegExp("9","g")," ")),0<e.length?(i.m.a(e),i=!0):i=!1),i)return n.w=c,n.B=ni.test(r(h,4)),n.s=0,!0}return n.l=!1}function at(n,t){for(var i,f=[],e=t.length-3,o=n.f.length,u=0;u<o;++u)i=n.f[u],0==b(i,3)?f.push(n.f[u]):(i=r(i,3,Math.min(e,b(i,3)-1)),0==t.search(i)&&f.push(n.f[u]));n.f=f}function oi(n,i){var u,r;if(n.i.a(i),r=i,ki.test(r)||1==n.i.b.length&&bi.test(r)?(r=i,"+"==r?(u=r,n.u.a(r)):(u=wi[r],n.u.a(u),n.a.a(u)),i=u):(n.l=!1,n.F=!0),!n.l){if(!n.F)if(bt(n)){if(kt(n))return vt(n)}else if(0<n.h.length&&(r=n.a.toString(),t(n.a),n.a.a(n.h),n.a.a(r),r=n.b.toString(),u=r.lastIndexOf(n.h),t(n.b),n.b.a(r.substring(0,u))),n.h!=wt(n))return n.b.a(" "),vt(n);return n.i.toString()}switch(n.u.b.length){case 0:case 1:case 2:return n.i.toString();case 3:if(!bt(n))return n.h=wt(n),tt(n);n.A=!0;default:return n.A?(kt(n)&&(n.A=!1),n.b.toString()+n.a.toString()):0<n.f.length?(r=dt(n,i),u=yt(n),0<u.length?u:(at(n,n.a.toString()),lt(n)?pt(n):n.l?p(n,r):n.i.toString())):tt(n)}}function vt(n){return n.l=!0,n.A=!1,n.f=[],n.s=0,t(n.m),n.w="",tt(n)}function yt(n){for(var i,e,t=n.a.toString(),o=n.f.length,u=0;u<o;++u)if(i=n.f[u],e=f(i,1),new RegExp("^(?:"+e+")$").test(t))return n.B=ni.test(r(i,4)),t=t.replace(new RegExp(e,"g"),r(i,2)),p(n,t);return""}function p(n,t){var i=n.b.b.length;return n.B&&0<i&&" "!=n.b.toString().charAt(i-1)?n.b+" "+t:n.b+t}function tt(n){var i=n.a.toString(),t;if(3<=i.length){for(var e=n.o&&0==n.h.length&&0<b(n.g,20)?s(n.g,20)||[]:s(n.g,19)||[],o=e.length,u=0;u<o;++u)t=e[u],0<n.h.length&&ht(f(t,4))&&!r(t,6)&&null==t.a[5]||(0!=n.h.length||n.o||ht(f(t,4))||r(t,6))&&tr.test(f(t,2))&&n.f.push(t);return at(n,i),i=yt(n),0<i.length?i:lt(n)?pt(n):n.i.toString()}return p(n,i)}function pt(n){var r=n.a.toString(),u=r.length,i,t;if(0<u){for(i="",t=0;t<u;t++)i=dt(n,r.charAt(t));return n.l?p(n,i):n.i.toString()}return n.b.toString()}function wt(n){var i,f=n.a.toString(),u=0;return 1!=r(n.g,10)?i=!1:(i=n.a.toString(),i="1"==i.charAt(0)&&"0"!=i.charAt(1)&&"1"!=i.charAt(1)),i?(u=1,n.b.a("1").a(" "),n.o=!0):null!=n.g.a[15]&&(i=new RegExp("^(?:"+r(n.g,15)+")"),i=f.match(i),null!=i&&null!=i[0]&&0<i[0].length&&(n.o=!0,u=i[0].length,n.b.a(f.substring(0,u)))),t(n.a),n.a.a(f.substring(u)),f.substring(0,u)}function bt(n){var u=n.u.toString(),i=new RegExp("^(?:\\+|"+r(n.g,11)+")"),i=u.match(i);return null!=i&&null!=i[0]&&0<i[0].length&&(n.o=!0,i=i[0].length,t(n.a),n.a.a(u.substring(i)),t(n.b),n.b.a(u.substring(0,i)),"+"!=u.charAt(0)&&n.b.a(" "),!0)}function kt(n){var r,u,e,o,f;if(0==n.a.b.length)return!1;u=new i;n:{if(r=n.a.toString(),0!=r.length&&"0"!=r.charAt(0))for(o=r.length,f=1;3>=f&&f<=o;++f)if(e=parseInt(r.substring(0,f),10),e in et){u.a(r.substring(f));r=e;break n}r=0}return 0!=r&&(t(n.a),n.a.a(u.toString()),u=ct(r),"001"==u?n.g=g(n.G,""+r):u!=n.D&&(n.g=nt(n,u)),n.b.a(""+r).a(" "),n.h="",!0)}function dt(n,i){var r=n.m.toString(),u;return 0<=r.substring(n.s).search(n.H)?(u=r.search(n.H),r=r.replace(n.H,i),t(n.m),n.m.a(r),n.s=u,r.substring(0,n.s+1)):(1==n.f.length&&(n.l=!1),n.w="",n.i.toString())}var si=this,it,rt,ut,ft,et,ot;i.prototype.b="";i.prototype.set=function(n){this.b=""+n};i.prototype.a=function(n,t){if(this.b+=String(n),null!=t)for(var i=1;i<arguments.length;i++)this.b+=arguments[i];return this};i.prototype.toString=function(){return this.b};var hi=1,ci=2,li=3,ai=4,vi=6,yi=16,pi=18;u.prototype.set=function(n,t){v(this,n.b,t)};u.prototype.clone=function(){var n=new this.constructor;return n!=this&&(n.a={},n.b&&(n.b={}),st(n,this)),n};c(e,u);it=null;c(n,u);rt=null;c(o,u);ut=null;e.prototype.j=function(){var n=it;return n||(it=n=k(e,{0:{name:"NumberFormat",I:"i18n.phonenumbers.NumberFormat"},1:{name:"pattern",required:!0,c:9,type:String},2:{name:"format",required:!0,c:9,type:String},3:{name:"leading_digits_pattern",v:!0,c:9,type:String},4:{name:"national_prefix_formatting_rule",c:9,type:String},6:{name:"national_prefix_optional_when_formatting",c:8,defaultValue:!1,type:Boolean},5:{name:"domestic_carrier_code_formatting_rule",c:9,type:String}})),n};e.j=e.prototype.j;n.prototype.j=function(){var t=rt;return t||(rt=t=k(n,{0:{name:"PhoneNumberDesc",I:"i18n.phonenumbers.PhoneNumberDesc"},2:{name:"national_number_pattern",c:9,type:String},9:{name:"possible_length",v:!0,c:5,type:Number},10:{name:"possible_length_local_only",v:!0,c:5,type:Number},6:{name:"example_number",c:9,type:String}})),t};n.j=n.prototype.j;o.prototype.j=function(){var t=ut;return t||(ut=t=k(o,{0:{name:"PhoneMetadata",I:"i18n.phonenumbers.PhoneMetadata"},1:{name:"general_desc",c:11,type:n},2:{name:"fixed_line",c:11,type:n},3:{name:"mobile",c:11,type:n},4:{name:"toll_free",c:11,type:n},5:{name:"premium_rate",c:11,type:n},6:{name:"shared_cost",c:11,type:n},7:{name:"personal_number",c:11,type:n},8:{name:"voip",c:11,type:n},21:{name:"pager",c:11,type:n},25:{name:"uan",c:11,type:n},27:{name:"emergency",c:11,type:n},28:{name:"voicemail",c:11,type:n},29:{name:"short_code",c:11,type:n},30:{name:"standard_rate",c:11,type:n},31:{name:"carrier_specific",c:11,type:n},33:{name:"sms_services",c:11,type:n},24:{name:"no_international_dialling",c:11,type:n},9:{name:"id",required:!0,c:9,type:String},10:{name:"country_code",c:5,type:Number},11:{name:"international_prefix",c:9,type:String},17:{name:"preferred_international_prefix",c:9,type:String},12:{name:"national_prefix",c:9,type:String},13:{name:"preferred_extn_prefix",c:9,type:String},15:{name:"national_prefix_for_parsing",c:9,type:String},16:{name:"national_prefix_transform_rule",c:9,type:String},18:{name:"same_mobile_and_fixed_line_pattern",c:8,defaultValue:!1,type:Boolean},19:{name:"number_format",v:!0,c:11,type:e},20:{name:"intl_number_format",v:!0,c:11,type:e},22:{name:"main_country_for_code",c:8,defaultValue:!1,type:Boolean},23:{name:"leading_digits",c:9,type:String},26:{name:"leading_zero_possible",c:8,defaultValue:!1,type:Boolean}})),t};o.j=o.prototype.j;y.prototype.a=function(n){throw new n.b,Error("Unimplemented");};y.prototype.b=function(n,t){if(11==n.a||10==n.a)return t instanceof u?t:this.a(n.i.prototype.j(),t);if(14==n.a){if("string"==typeof t&&ft.test(t)){var i=Number(t);if(0<i)return i}return t}if(!n.h)return t;if(i=n.i,i===String){if("number"==typeof t)return String(t)}else if(i===Number&&"string"==typeof t&&("Infinity"===t||"-Infinity"===t||"NaN"===t||ft.test(t)))return Number(t);return t};ft=/^-?[0-9]+$/;c(d,y);d.prototype.a=function(n,t){var i=new n.b;return i.g=this,i.a=t,i.b={},i};c(l,d);l.prototype.b=function(n,t){return 8==n.a?!!t:y.prototype.b.apply(this,arguments)};l.prototype.a=function(n,t){return l.M.a.call(this,n,t)};et={1:"US AG AI AS BB BM BS CA DM DO GD GU JM KN KY LC MP MS PR SX TC TT VC VG VI".split(" ")};ot={AG:[null,[null,null,"(?:268|[58]\\d\\d|900)\\d{7}",null,null,null,null,null,null,[10],[7]],[null,null,"268(?:4(?:6[0-38]|84)|56[0-2])\\d{4}",null,null,null,"2684601234",null,null,null,[7]],[null,null,"268(?:464|7(?:1[3-9]|2\\d|3[246]|64|[78][0-689]))\\d{4}",null,null,null,"2684641234",null,null,null,[7]],[null,null,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",null,null,null,"8002123456"],[null,null,"900[2-9]\\d{6}",null,null,null,"9002123456"],[null,null,null,null,null,null,null,null,null,[-1]],[null,null,"5(?:00|2[12]|33|44|66|77|88)[2-9]\\d{6}",null,null,null,"5002345678"],[null,null,"26848[01]\\d{4}",null,null,null,"2684801234",null,null,null,[7]],"AG",1,"011","1",null,null,"1",null,null,null,null,null,[null,null,"26840[69]\\d{4}",null,null,null,"2684061234",null,null,null,[7]],null,"268",[null,null,null,null,null,null,null,null,null,[-1]],[null,null,null,null,null,null,null,null,null,[-1]],null,null,[null,null,null,null,null,null,null,null,null,[-1]]],AI:[null,[null,null,"(?:264|[58]\\d\\d|900)\\d{7}",null,null,null,null,null,null,[10],[7]],[null,null,"2644(?:6[12]|9[78])\\d{4}",null,null,null,"2644612345",null,null,null,[7]],[null,null,"264(?:235|476|5(?:3[6-9]|8[1-4])|7(?:29|72))\\d{4}",null,null,null,"2642351234",null,null,null,[7]],[null,null,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",null,null,null,"8002123456"],[null,null,"900[2-9]\\d{6}",null,null,null,"9002123456"],[null,null,null,null,null,null,null,null,null,[-1]],[null,null,"5(?:00|2[12]|33|44|66|77|88)[2-9]\\d{6}",null,null,null,"5002345678"],[null,null,null,null,null,null,null,null,null,[-1]],"AI",1,"011","1",null,null,"1",null,null,null,null,null,[null,null,null,null,null,null,null,null,null,[-1]],null,"264",[null,null,null,null,null,null,null,null,null,[-1]],[null,null,null,null,null,null,null,null,null,[-1]],null,null,[null,null,null,null,null,null,null,null,null,[-1]]],AS:[null,[null,null,"(?:[58]\\d\\d|684|900)\\d{7}",null,null,null,null,null,null,[10],[7]],[null,null,"6846(?:22|33|44|55|77|88|9[19])\\d{4}",null,null,null,"6846221234",null,null,null,[7]],[null,null,"684(?:2(?:5[2468]|72)|7(?:3[13]|70))\\d{4}",null,null,null,"6847331234",null,null,null,[7]],[null,null,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",null,null,null,"8002123456"],[null,null,"900[2-9]\\d{6}",null,null,null,"9002123456"],[null,null,null,null,null,null,null,null,null,[-1]],[null,null,"5(?:00|2[12]|33|44|66|77|88)[2-9]\\d{6}",null,null,null,"5002345678"],[null,null,null,null,null,null,null,null,null,[-1]],"AS",1,"011","1",null,null,"1",null,null,null,null,null,[null,null,null,null,null,null,null,null,null,[-1]],null,"684",[null,null,null,null,null,null,null,null,null,[-1]],[null,null,null,null,null,null,null,null,null,[-1]],null,null,[null,null,null,null,null,null,null,null,null,[-1]]],BB:[null,[null,null,"(?:246|[58]\\d\\d|900)\\d{7}",null,null,null,null,null,null,[10],[7]],[null,null,"246(?:2(?:2[78]|7[0-4])|4(?:1[024-6]|2\\d|3[2-9])|5(?:20|[34]\\d|54|7[1-3])|6(?:2\\d|38)|7[35]7|9(?:1[89]|63))\\d{4}",null,null,null,"2464123456",null,null,null,[7]],[null,null,"246(?:2(?:[356]\\d|4[0-57-9]|8[0-79])|45\\d|69[5-7]|8(?:[2-5]\\d|83))\\d{4}",null,null,null,"2462501234",null,null,null,[7]],[null,null,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",null,null,null,"8002123456"],[null,null,"(?:246976|900[2-9]\\d\\d)\\d{4}",null,null,null,"9002123456",null,null,null,[7]],[null,null,null,null,null,null,null,null,null,[-1]],[null,null,"5(?:00|2[12]|33|44|66|77|88)[2-9]\\d{6}",null,null,null,"5002345678"],[null,null,"24631\\d{5}",null,null,null,"2463101234",null,null,null,[7]],"BB",1,"011","1",null,null,"1",null,null,null,null,null,[null,null,null,null,null,null,null,null,null,[-1]],null,"246",[null,null,null,null,null,null,null,null,null,[-1]],[null,null,"246(?:292|367|4(?:1[7-9]|3[01]|44|67)|7(?:36|53))\\d{4}",null,null,null,"2464301234",null,null,null,[7]],null,null,[null,null,null,null,null,null,null,null,null,[-1]]],BM:[null,[null,null,"(?:441|[58]\\d\\d|900)\\d{7}",null,null,null,null,null,null,[10],[7]],[null,null,"441(?:2(?:02|23|[3479]\\d|61)|[46]\\d\\d|5(?:4\\d|60|89)|824)\\d{4}",null,null,null,"4412345678",null,null,null,[7]],[null,null,"441(?:[37]\\d|5[0-39])\\d{5}",null,null,null,"4413701234",null,null,null,[7]],[null,null,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",null,null,null,"8002123456"],[null,null,"900[2-9]\\d{6}",null,null,null,"9002123456"],[null,null,null,null,null,null,null,null,null,[-1]],[null,null,"5(?:00|2[12]|33|44|66|77|88)[2-9]\\d{6}",null,null,null,"5002345678"],[null,null,null,null,null,null,null,null,null,[-1]],"BM",1,"011","1",null,null,"1",null,null,null,null,null,[null,null,null,null,null,null,null,null,null,[-1]],null,"441",[null,null,null,null,null,null,null,null,null,[-1]],[null,null,null,null,null,null,null,null,null,[-1]],null,null,[null,null,null,null,null,null,null,null,null,[-1]]],BS:[null,[null,null,"(?:242|[58]\\d\\d|900)\\d{7}",null,null,null,null,null,null,[10],[7]],[null,null,"242(?:3(?:02|[236][1-9]|4[0-24-9]|5[0-68]|7[347]|8[0-4]|9[2-467])|461|502|6(?:0[1-4]|12|2[013]|[45]0|7[67]|8[78]|9[89])|7(?:02|88))\\d{4}",null,null,null,"2423456789",null,null,null,[7]],[null,null,"242(?:3(?:5[79]|7[56]|95)|4(?:[23][1-9]|4[1-35-9]|5[1-8]|6[2-8]|7\\d|81)|5(?:2[45]|3[35]|44|5[1-46-9]|65|77)|6[34]6|7(?:27|38)|8(?:0[1-9]|1[02-9]|2\\d|[89]9))\\d{4}",null,null,null,"2423591234",null,null,null,[7]],[null,null,"(?:242300|8(?:00|33|44|55|66|77|88)[2-9]\\d\\d)\\d{4}",null,null,null,"8002123456",null,null,null,[7]],[null,null,"900[2-9]\\d{6}",null,null,null,"9002123456"],[null,null,null,null,null,null,null,null,null,[-1]],[null,null,"5(?:00|2[12]|33|44|66|77|88)[2-9]\\d{6}",null,null,null,"5002345678"],[null,null,null,null,null,null,null,null,null,[-1]],"BS",1,"011","1",null,null,"1",null,null,null,null,null,[null,null,null,null,null,null,null,null,null,[-1]],null,"242",[null,null,null,null,null,null,null,null,null,[-1]],[null,null,"242225[0-46-9]\\d{3}",null,null,null,"2422250123"],null,null,[null,null,null,null,null,null,null,null,null,[-1]]],CA:[null,[null,null,"(?:[2-8]\\d|90)\\d{8}",null,null,null,null,null,null,[10],[7]],[null,null,"(?:2(?:04|[23]6|[48]9|50)|3(?:06|43|65)|4(?:03|1[68]|3[178]|50)|5(?:06|1[49]|48|79|8[17])|6(?:04|13|39|47)|7(?:0[59]|78|8[02])|8(?:[06]7|19|25|73)|90[25])[2-9]\\d{6}",null,null,null,"5062345678",null,null,null,[7]],[null,null,"(?:2(?:04|[23]6|[48]9|50)|3(?:06|43|65)|4(?:03|1[68]|3[178]|50)|5(?:06|1[49]|48|79|8[17])|6(?:04|13|39|47)|7(?:0[59]|78|8[02])|8(?:[06]7|19|25|73)|90[25])[2-9]\\d{6}",null,null,null,"5062345678",null,null,null,[7]],[null,null,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",null,null,null,"8002123456"],[null,null,"900[2-9]\\d{6}",null,null,null,"9002123456"],[null,null,null,null,null,null,null,null,null,[-1]],[null,null,"(?:5(?:00|2[12]|33|44|66|77|88)|622)[2-9]\\d{6}",null,null,null,"5002345678"],[null,null,"600[2-9]\\d{6}",null,null,null,"6002012345"],"CA",1,"011","1",null,null,"1",null,null,1,null,null,[null,null,null,null,null,null,null,null,null,[-1]],null,null,[null,null,null,null,null,null,null,null,null,[-1]],[null,null,null,null,null,null,null,null,null,[-1]],null,null,[null,null,null,null,null,null,null,null,null,[-1]]],DM:[null,[null,null,"(?:[58]\\d\\d|767|900)\\d{7}",null,null,null,null,null,null,[10],[7]],[null,null,"767(?:2(?:55|66)|4(?:2[01]|4[0-25-9])|50[0-4]|70[1-3])\\d{4}",null,null,null,"7674201234",null,null,null,[7]],[null,null,"767(?:2(?:[2-4689]5|7[5-7])|31[5-7]|61[1-7])\\d{4}",null,null,null,"7672251234",null,null,null,[7]],[null,null,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",null,null,null,"8002123456"],[null,null,"900[2-9]\\d{6}",null,null,null,"9002123456"],[null,null,null,null,null,null,null,null,null,[-1]],[null,null,"5(?:00|2[12]|33|44|66|77|88)[2-9]\\d{6}",null,null,null,"5002345678"],[null,null,null,null,null,null,null,null,null,[-1]],"DM",1,"011","1",null,null,"1",null,null,null,null,null,[null,null,null,null,null,null,null,null,null,[-1]],null,"767",[null,null,null,null,null,null,null,null,null,[-1]],[null,null,null,null,null,null,null,null,null,[-1]],null,null,[null,null,null,null,null,null,null,null,null,[-1]]],DO:[null,[null,null,"(?:[58]\\d\\d|900)\\d{7}",null,null,null,null,null,null,[10],[7]],[null,null,"8(?:[04]9[2-9]\\d\\d|29(?:2(?:[0-59]\\d|6[04-9]|7[0-27]|8[0237-9])|3(?:[0-35-9]\\d|4[7-9])|[45]\\d\\d|6(?:[0-27-9]\\d|[3-5][1-9]|6[0135-8])|7(?:0[013-9]|[1-37]\\d|4[1-35689]|5[1-4689]|6[1-57-9]|8[1-79]|9[1-8])|8(?:0[146-9]|1[0-48]|[248]\\d|3[1-79]|5[01589]|6[013-68]|7[124-8]|9[0-8])|9(?:[0-24]\\d|3[02-46-9]|5[0-79]|60|7[0169]|8[57-9]|9[02-9])))\\d{4}",null,null,null,"8092345678",null,null,null,[7]],[null,null,"8[024]9[2-9]\\d{6}",null,null,null,"8092345678",null,null,null,[7]],[null,null,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",null,null,null,"8002123456"],[null,null,"900[2-9]\\d{6}",null,null,null,"9002123456"],[null,null,null,null,null,null,null,null,null,[-1]],[null,null,"5(?:00|2[12]|33|44|66|77|88)[2-9]\\d{6}",null,null,null,"5002345678"],[null,null,null,null,null,null,null,null,null,[-1]],"DO",1,"011","1",null,null,"1",null,null,null,null,null,[null,null,null,null,null,null,null,null,null,[-1]],null,"8[024]9",[null,null,null,null,null,null,null,null,null,[-1]],[null,null,null,null,null,null,null,null,null,[-1]],null,null,[null,null,null,null,null,null,null,null,null,[-1]]],GD:[null,[null,null,"(?:473|[58]\\d\\d|900)\\d{7}",null,null,null,null,null,null,[10],[7]],[null,null,"473(?:2(?:3[0-2]|69)|3(?:2[89]|86)|4(?:[06]8|3[5-9]|4[0-49]|5[5-79]|73|90)|63[68]|7(?:58|84)|800|938)\\d{4}",null,null,null,"4732691234",null,null,null,[7]],[null,null,"473(?:4(?:0[2-79]|1[04-9]|2[0-5]|58)|5(?:2[01]|3[3-8])|901)\\d{4}",null,null,null,"4734031234",null,null,null,[7]],[null,null,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",null,null,null,"8002123456"],[null,null,"900[2-9]\\d{6}",null,null,null,"9002123456"],[null,null,null,null,null,null,null,null,null,[-1]],[null,null,"5(?:00|2[12]|33|44|66|77|88)[2-9]\\d{6}",null,null,null,"5002345678"],[null,null,null,null,null,null,null,null,null,[-1]],"GD",1,"011","1",null,null,"1",null,null,null,null,null,[null,null,null,null,null,null,null,null,null,[-1]],null,"473",[null,null,null,null,null,null,null,null,null,[-1]],[null,null,null,null,null,null,null,null,null,[-1]],null,null,[null,null,null,null,null,null,null,null,null,[-1]]],GU:[null,[null,null,"(?:[58]\\d\\d|671|900)\\d{7}",null,null,null,null,null,null,[10],[7]],[null,null,"671(?:3(?:00|3[39]|4[349]|55|6[26])|4(?:00|56|7[1-9]|8[0236-9])|5(?:55|6[2-5]|88)|6(?:3[2-578]|4[24-9]|5[34]|78|8[235-9])|7(?:[0479]7|2[0167]|3[45]|8[7-9])|8(?:[2-57-9]8|6[48])|9(?:2[29]|6[79]|7[1279]|8[7-9]|9[78]))\\d{4}",null,null,null,"6713001234",null,null,null,[7]],[null,null,"671(?:3(?:00|3[39]|4[349]|55|6[26])|4(?:00|56|7[1-9]|8[0236-9])|5(?:55|6[2-5]|88)|6(?:3[2-578]|4[24-9]|5[34]|78|8[235-9])|7(?:[0479]7|2[0167]|3[45]|8[7-9])|8(?:[2-57-9]8|6[48])|9(?:2[29]|6[79]|7[1279]|8[7-9]|9[78]))\\d{4}",null,null,null,"6713001234",null,null,null,[7]],[null,null,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",null,null,null,"8002123456"],[null,null,"900[2-9]\\d{6}",null,null,null,"9002123456"],[null,null,null,null,null,null,null,null,null,[-1]],[null,null,"5(?:00|2[12]|33|44|66|77|88)[2-9]\\d{6}",null,null,null,"5002345678"],[null,null,null,null,null,null,null,null,null,[-1]],"GU",1,"011","1",null,null,"1",null,null,1,null,null,[null,null,null,null,null,null,null,null,null,[-1]],null,"671",[null,null,null,null,null,null,null,null,null,[-1]],[null,null,null,null,null,null,null,null,null,[-1]],null,null,[null,null,null,null,null,null,null,null,null,[-1]]],JM:[null,[null,null,"(?:[58]\\d\\d|658|900)\\d{7}",null,null,null,null,null,null,[10],[7]],[null,null,"(?:658[2-9]\\d\\d|876(?:5(?:0[12]|1[0-468]|2[35]|63)|6(?:0[1-3579]|1[0237-9]|[23]\\d|40|5[06]|6[2-589]|7[05]|8[04]|9[4-9])|7(?:0[2-689]|[1-6]\\d|8[056]|9[45])|9(?:0[1-8]|1[02378]|[2-8]\\d|9[2-468])))\\d{4}",null,null,null,"8765230123",null,null,null,[7]],[null,null,"876(?:(?:2[14-9]|[348]\\d)\\d|5(?:0[3-9]|[2-57-9]\\d|6[0-24-9])|7(?:0[07]|7\\d|8[1-47-9]|9[0-36-9])|9(?:[01]9|9[0579]))\\d{4}",null,null,null,"8762101234",null,null,null,[7]],[null,null,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",null,null,null,"8002123456"],[null,null,"900[2-9]\\d{6}",null,null,null,"9002123456"],[null,null,null,null,null,null,null,null,null,[-1]],[null,null,"5(?:00|2[12]|33|44|66|77|88)[2-9]\\d{6}",null,null,null,"5002345678"],[null,null,null,null,null,null,null,null,null,[-1]],"JM",1,"011","1",null,null,"1",null,null,null,null,null,[null,null,null,null,null,null,null,null,null,[-1]],null,"658|876",[null,null,null,null,null,null,null,null,null,[-1]],[null,null,null,null,null,null,null,null,null,[-1]],null,null,[null,null,null,null,null,null,null,null,null,[-1]]],KN:[null,[null,null,"(?:[58]\\d\\d|900)\\d{7}",null,null,null,null,null,null,[10],[7]],[null,null,"869(?:2(?:29|36)|302|4(?:6[015-9]|70))\\d{4}",null,null,null,"8692361234",null,null,null,[7]],[null,null,"869(?:5(?:5[6-8]|6[5-7])|66\\d|76[02-7])\\d{4}",null,null,null,"8697652917",null,null,null,[7]],[null,null,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",null,null,null,"8002123456"],[null,null,"900[2-9]\\d{6}",null,null,null,"9002123456"],[null,null,null,null,null,null,null,null,null,[-1]],[null,null,"5(?:00|2[12]|33|44|66|77|88)[2-9]\\d{6}",null,null,null,"5002345678"],[null,null,null,null,null,null,null,null,null,[-1]],"KN",1,"011","1",null,null,"1",null,null,null,null,null,[null,null,null,null,null,null,null,null,null,[-1]],null,"869",[null,null,null,null,null,null,null,null,null,[-1]],[null,null,null,null,null,null,null,null,null,[-1]],null,null,[null,null,null,null,null,null,null,null,null,[-1]]],KY:[null,[null,null,"(?:345|[58]\\d\\d|900)\\d{7}",null,null,null,null,null,null,[10],[7]],[null,null,"345(?:2(?:22|44)|444|6(?:23|38|40)|7(?:4[35-79]|6[6-9]|77)|8(?:00|1[45]|25|[48]8)|9(?:14|4[035-9]))\\d{4}",null,null,null,"3452221234",null,null,null,[7]],[null,null,"345(?:32[1-9]|5(?:1[67]|2[5-79]|4[6-9]|50|76)|649|9(?:1[67]|2[2-9]|3[689]))\\d{4}",null,null,null,"3453231234",null,null,null,[7]],[null,null,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",null,null,null,"8002345678"],[null,null,"(?:345976|900[2-9]\\d\\d)\\d{4}",null,null,null,"9002345678"],[null,null,null,null,null,null,null,null,null,[-1]],[null,null,"5(?:00|2[12]|33|44|66|77|88)[2-9]\\d{6}",null,null,null,"5002345678"],[null,null,null,null,null,null,null,null,null,[-1]],"KY",1,"011","1",null,null,"1",null,null,null,null,null,[null,null,"345849\\d{4}",null,null,null,"3458491234"],null,"345",[null,null,null,null,null,null,null,null,null,[-1]],[null,null,null,null,null,null,null,null,null,[-1]],null,null,[null,null,null,null,null,null,null,null,null,[-1]]],LC:[null,[null,null,"(?:[58]\\d\\d|758|900)\\d{7}",null,null,null,null,null,null,[10],[7]],[null,null,"758(?:4(?:30|5\\d|6[2-9]|8[0-2])|57[0-2]|638)\\d{4}",null,null,null,"7584305678",null,null,null,[7]],[null,null,"758(?:28[4-7]|384|4(?:6[01]|8[4-9])|5(?:1[89]|20|84)|7(?:1[2-9]|2\\d|3[01]))\\d{4}",null,null,null,"7582845678",null,null,null,[7]],[null,null,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",null,null,null,"8002123456"],[null,null,"900[2-9]\\d{6}",null,null,null,"9002123456"],[null,null,null,null,null,null,null,null,null,[-1]],[null,null,"5(?:00|2[12]|33|44|66|77|88)[2-9]\\d{6}",null,null,null,"5002345678"],[null,null,null,null,null,null,null,null,null,[-1]],"LC",1,"011","1",null,null,"1",null,null,null,null,null,[null,null,null,null,null,null,null,null,null,[-1]],null,"758",[null,null,null,null,null,null,null,null,null,[-1]],[null,null,null,null,null,null,null,null,null,[-1]],null,null,[null,null,null,null,null,null,null,null,null,[-1]]],MP:[null,[null,null,"(?:[58]\\d\\d|(?:67|90)0)\\d{7}",null,null,null,null,null,null,[10],[7]],[null,null,"670(?:2(?:3[3-7]|56|8[5-8])|32[1-38]|4(?:33|8[348])|5(?:32|55|88)|6(?:64|70|82)|78[3589]|8[3-9]8|989)\\d{4}",null,null,null,"6702345678",null,null,null,[7]],[null,null,"670(?:2(?:3[3-7]|56|8[5-8])|32[1-38]|4(?:33|8[348])|5(?:32|55|88)|6(?:64|70|82)|78[3589]|8[3-9]8|989)\\d{4}",null,null,null,"6702345678",null,null,null,[7]],[null,null,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",null,null,null,"8002123456"],[null,null,"900[2-9]\\d{6}",null,null,null,"9002123456"],[null,null,null,null,null,null,null,null,null,[-1]],[null,null,"5(?:00|2[12]|33|44|66|77|88)[2-9]\\d{6}",null,null,null,"5002345678"],[null,null,null,null,null,null,null,null,null,[-1]],"MP",1,"011","1",null,null,"1",null,null,1,null,null,[null,null,null,null,null,null,null,null,null,[-1]],null,"670",[null,null,null,null,null,null,null,null,null,[-1]],[null,null,null,null,null,null,null,null,null,[-1]],null,null,[null,null,null,null,null,null,null,null,null,[-1]]],MS:[null,[null,null,"(?:(?:[58]\\d\\d|900)\\d\\d|66449)\\d{5}",null,null,null,null,null,null,[10],[7]],[null,null,"664491\\d{4}",null,null,null,"6644912345",null,null,null,[7]],[null,null,"66449[2-6]\\d{4}",null,null,null,"6644923456",null,null,null,[7]],[null,null,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",null,null,null,"8002123456"],[null,null,"900[2-9]\\d{6}",null,null,null,"9002123456"],[null,null,null,null,null,null,null,null,null,[-1]],[null,null,"5(?:00|2[12]|33|44|66|77|88)[2-9]\\d{6}",null,null,null,"5002345678"],[null,null,null,null,null,null,null,null,null,[-1]],"MS",1,"011","1",null,null,"1",null,null,null,null,null,[null,null,null,null,null,null,null,null,null,[-1]],null,"664",[null,null,null,null,null,null,null,null,null,[-1]],[null,null,null,null,null,null,null,null,null,[-1]],null,null,[null,null,null,null,null,null,null,null,null,[-1]]],PR:[null,[null,null,"(?:[589]\\d\\d|787)\\d{7}",null,null,null,null,null,null,[10],[7]],[null,null,"(?:787|939)[2-9]\\d{6}",null,null,null,"7872345678",null,null,null,[7]],[null,null,"(?:787|939)[2-9]\\d{6}",null,null,null,"7872345678",null,null,null,[7]],[null,null,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",null,null,null,"8002345678"],[null,null,"900[2-9]\\d{6}",null,null,null,"9002345678"],[null,null,null,null,null,null,null,null,null,[-1]],[null,null,"5(?:00|2[12]|33|44|66|77|88)[2-9]\\d{6}",null,null,null,"5002345678"],[null,null,null,null,null,null,null,null,null,[-1]],"PR",1,"011","1",null,null,"1",null,null,1,null,null,[null,null,null,null,null,null,null,null,null,[-1]],null,"787|939",[null,null,null,null,null,null,null,null,null,[-1]],[null,null,null,null,null,null,null,null,null,[-1]],null,null,[null,null,null,null,null,null,null,null,null,[-1]]],SX:[null,[null,null,"(?:(?:[58]\\d\\d|900)\\d|7215)\\d{6}",null,null,null,null,null,null,[10],[7]],[null,null,"7215(?:4[2-8]|8[239]|9[056])\\d{4}",null,null,null,"7215425678",null,null,null,[7]],[null,null,"7215(?:1[02]|2\\d|5[034679]|8[014-8])\\d{4}",null,null,null,"7215205678",null,null,null,[7]],[null,null,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",null,null,null,"8002123456"],[null,null,"900[2-9]\\d{6}",null,null,null,"9002123456"],[null,null,null,null,null,null,null,null,null,[-1]],[null,null,"5(?:00|2[12]|33|44|66|77|88)[2-9]\\d{6}",null,null,null,"5002345678"],[null,null,null,null,null,null,null,null,null,[-1]],"SX",1,"011","1",null,null,"1",null,null,null,null,null,[null,null,null,null,null,null,null,null,null,[-1]],null,"721",[null,null,null,null,null,null,null,null,null,[-1]],[null,null,null,null,null,null,null,null,null,[-1]],null,null,[null,null,null,null,null,null,null,null,null,[-1]]],TC:[null,[null,null,"(?:[58]\\d\\d|649|900)\\d{7}",null,null,null,null,null,null,[10],[7]],[null,null,"649(?:712|9(?:4\\d|50))\\d{4}",null,null,null,"6497121234",null,null,null,[7]],[null,null,"649(?:2(?:3[129]|4[1-7])|3(?:3[1-389]|4[1-8])|4[34][1-3])\\d{4}",null,null,null,"6492311234",null,null,null,[7]],[null,null,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",null,null,null,"8002345678"],[null,null,"900[2-9]\\d{6}",null,null,null,"9002345678"],[null,null,null,null,null,null,null,null,null,[-1]],[null,null,"5(?:00|2[12]|33|44|66|77|88)[2-9]\\d{6}",null,null,null,"5002345678"],[null,null,"64971[01]\\d{4}",null,null,null,"6497101234",null,null,null,[7]],"TC",1,"011","1",null,null,"1",null,null,null,null,null,[null,null,null,null,null,null,null,null,null,[-1]],null,"649",[null,null,null,null,null,null,null,null,null,[-1]],[null,null,null,null,null,null,null,null,null,[-1]],null,null,[null,null,null,null,null,null,null,null,null,[-1]]],TT:[null,[null,null,"(?:[58]\\d\\d|900)\\d{7}",null,null,null,null,null,null,[10],[7]],[null,null,"868(?:2(?:01|[23]\\d)|6(?:0[7-9]|1[02-8]|2[1-9]|[3-69]\\d|7[0-79])|82[124])\\d{4}",null,null,null,"8682211234",null,null,null,[7]],[null,null,"868(?:2(?:6[6-9]|[7-9]\\d)|[37](?:0[1-9]|1[02-9]|[2-9]\\d)|4[6-9]\\d|6(?:20|78|8\\d))\\d{4}",null,null,null,"8682911234",null,null,null,[7]],[null,null,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",null,null,null,"8002345678"],[null,null,"900[2-9]\\d{6}",null,null,null,"9002345678"],[null,null,null,null,null,null,null,null,null,[-1]],[null,null,"5(?:00|2[12]|33|44|66|77|88)[2-9]\\d{6}",null,null,null,"5002345678"],[null,null,null,null,null,null,null,null,null,[-1]],"TT",1,"011","1",null,null,"1",null,null,null,null,null,[null,null,null,null,null,null,null,null,null,[-1]],null,"868",[null,null,null,null,null,null,null,null,null,[-1]],[null,null,null,null,null,null,null,null,null,[-1]],null,null,[null,null,"868619\\d{4}",null,null,null,"8686191234",null,null,null,[7]]],US:[null,[null,null,"[2-9]\\d{9}",null,null,null,null,null,null,[10],[7]],[null,null,"(?:2(?:0[1-35-9]|1[02-9]|2[03-589]|3[149]|4[08]|5[1-46]|6[0279]|7[0269]|8[13])|3(?:0[1-57-9]|1[02-9]|2[0135]|3[0-24679]|4[67]|5[12]|6[014]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[0235]|58|6[39]|7[0589]|8[04])|5(?:0[1-57-9]|1[0235-8]|20|3[0149]|4[01]|5[19]|6[1-47]|7[013-5]|8[056])|6(?:0[1-35-9]|1[024-9]|2[03689]|[34][016]|5[017]|6[0-279]|78|8[0-2])|7(?:0[1-46-8]|1[2-9]|2[04-7]|3[1247]|4[037]|5[47]|6[02359]|7[02-59]|8[156])|8(?:0[1-68]|1[02-8]|2[08]|3[0-28]|4[3578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[0179]|5[12469]|7[0-389]|8[04-69]))[2-9]\\d{6}",null,null,null,"2015550123",null,null,null,[7]],[null,null,"(?:2(?:0[1-35-9]|1[02-9]|2[03-589]|3[149]|4[08]|5[1-46]|6[0279]|7[0269]|8[13])|3(?:0[1-57-9]|1[02-9]|2[0135]|3[0-24679]|4[67]|5[12]|6[014]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[0235]|58|6[39]|7[0589]|8[04])|5(?:0[1-57-9]|1[0235-8]|20|3[0149]|4[01]|5[19]|6[1-47]|7[013-5]|8[056])|6(?:0[1-35-9]|1[024-9]|2[03689]|[34][016]|5[017]|6[0-279]|78|8[0-2])|7(?:0[1-46-8]|1[2-9]|2[04-7]|3[1247]|4[037]|5[47]|6[02359]|7[02-59]|8[156])|8(?:0[1-68]|1[02-8]|2[08]|3[0-28]|4[3578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[0179]|5[12469]|7[0-389]|8[04-69]))[2-9]\\d{6}",null,null,null,"2015550123",null,null,null,[7]],[null,null,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",null,null,null,"8002345678"],[null,null,"900[2-9]\\d{6}",null,null,null,"9002345678"],[null,null,null,null,null,null,null,null,null,[-1]],[null,null,"5(?:00|2[12]|33|44|66|77|88)[2-9]\\d{6}",null,null,null,"5002345678"],[null,null,null,null,null,null,null,null,null,[-1]],"US",1,"011","1",null,null,"1",null,null,1,[[null,"(\\d{3})(\\d{4})","$1-$2",["[2-9]"]],[null,"(\\d{3})(\\d{3})(\\d{4})","($1) $2-$3",["[2-9]"],null,null,1]],[[null,"(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[2-9]"]]],[null,null,null,null,null,null,null,null,null,[-1]],1,null,[null,null,null,null,null,null,null,null,null,[-1]],[null,null,"710[2-9]\\d{6}",null,null,null,"7102123456"],null,null,[null,null,null,null,null,null,null,null,null,[-1]]],VC:[null,[null,null,"(?:[58]\\d\\d|784|900)\\d{7}",null,null,null,null,null,null,[10],[7]],[null,null,"784(?:266|3(?:6[6-9]|7\\d|8[0-24-6])|4(?:38|5[0-36-8]|8[0-8])|5(?:55|7[0-2]|93)|638|784)\\d{4}",null,null,null,"7842661234",null,null,null,[7]],[null,null,"784(?:4(?:3[0-5]|5[45]|89|9[0-8])|5(?:2[6-9]|3[0-4]))\\d{4}",null,null,null,"7844301234",null,null,null,[7]],[null,null,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",null,null,null,"8002345678"],[null,null,"900[2-9]\\d{6}",null,null,null,"9002345678"],[null,null,null,null,null,null,null,null,null,[-1]],[null,null,"5(?:00|2[12]|33|44|66|77|88)[2-9]\\d{6}",null,null,null,"5002345678"],[null,null,null,null,null,null,null,null,null,[-1]],"VC",1,"011","1",null,null,"1",null,null,null,null,null,[null,null,null,null,null,null,null,null,null,[-1]],null,"784",[null,null,null,null,null,null,null,null,null,[-1]],[null,null,null,null,null,null,null,null,null,[-1]],null,null,[null,null,null,null,null,null,null,null,null,[-1]]],VG:[null,[null,null,"(?:284|[58]\\d\\d|900)\\d{7}",null,null,null,null,null,null,[10],[7]],[null,null,"284(?:(?:229|774|8(?:52|6[459]))\\d|4(?:22\\d|9(?:[45]\\d|6[0-5])))\\d{3}",null,null,null,"2842291234",null,null,null,[7]],[null,null,"284(?:(?:3(?:0[0-3]|4[0-7]|68|9[34])|54[0-57])\\d|4(?:(?:4[0-6]|68)\\d|9(?:6[6-9]|9\\d)))\\d{3}",null,null,null,"2843001234",null,null,null,[7]],[null,null,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",null,null,null,"8002345678"],[null,null,"900[2-9]\\d{6}",null,null,null,"9002345678"],[null,null,null,null,null,null,null,null,null,[-1]],[null,null,"5(?:00|2[12]|33|44|66|77|88)[2-9]\\d{6}",null,null,null,"5002345678"],[null,null,null,null,null,null,null,null,null,[-1]],"VG",1,"011","1",null,null,"1",null,null,null,null,null,[null,null,null,null,null,null,null,null,null,[-1]],null,"284",[null,null,null,null,null,null,null,null,null,[-1]],[null,null,null,null,null,null,null,null,null,[-1]],null,null,[null,null,null,null,null,null,null,null,null,[-1]]],VI:[null,[null,null,"(?:(?:34|90)0|[58]\\d\\d)\\d{7}",null,null,null,null,null,null,[10],[7]],[null,null,"340(?:2(?:01|2[06-8]|44|77)|3(?:32|44)|4(?:22|7[34])|5(?:1[34]|55)|6(?:26|4[23]|77|9[023])|7(?:1[2-57-9]|27|7\\d)|884|998)\\d{4}",null,null,null,"3406421234",null,null,null,[7]],[null,null,"340(?:2(?:01|2[06-8]|44|77)|3(?:32|44)|4(?:22|7[34])|5(?:1[34]|55)|6(?:26|4[23]|77|9[023])|7(?:1[2-57-9]|27|7\\d)|884|998)\\d{4}",null,null,null,"3406421234",null,null,null,[7]],[null,null,"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",null,null,null,"8002345678"],[null,null,"900[2-9]\\d{6}",null,null,null,"9002345678"],[null,null,null,null,null,null,null,null,null,[-1]],[null,null,"5(?:00|2[12]|33|44|66|77|88)[2-9]\\d{6}",null,null,null,"5002345678"],[null,null,null,null,null,null,null,null,null,[-1]],"VI",1,"011","1",null,null,"1",null,null,1,null,null,[null,null,null,null,null,null,null,null,null,[-1]],null,"340",[null,null,null,null,null,null,null,null,null,[-1]],[null,null,null,null,null,null,null,null,null,[-1]],null,null,[null,null,null,null,null,null,null,null,null,[-1]]]};h.b=function(){return h.a?h.a:h.a=new h};var wi={0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9","０":"0","１":"1","２":"2","３":"3","４":"4","５":"5","６":"6","７":"7","８":"8","９":"9","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9"},bi=RegExp("[+＋]+"),ki=RegExp("([0-9０-９٠-٩۰-۹])"),di=/^\(?\$1\)?$/,gt=new o;v(gt,11,"NA");var gi=/\[([^\[\]])*\]/g,nr=/\d(?=[^,}][^,}])/g,tr=RegExp("^[-x‐-―−ー－-／  ­​⁠　()（）［］.\\[\\]/~⁓∼～]*(\\$\\d[-x‐-―−ー－-／  ­​⁠　()（）［］.\\[\\]/~⁓∼～]*)+$"),ni=/[- ]/;a.prototype.K=function(){this.C="";t(this.i);t(this.u);t(this.m);this.s=0;this.w="";t(this.b);this.h="";t(this.a);this.l=!0;this.A=this.o=this.F=!1;this.f=[];this.B=!1;this.g!=this.J&&(this.g=nt(this,this.D))};a.prototype.L=function(n){return this.C=oi(this,n)};w("Cleave.AsYouTypeFormatter",a);w("Cleave.AsYouTypeFormatter.prototype.inputDigit",a.prototype.L);w("Cleave.AsYouTypeFormatter.prototype.clear",a.prototype.K)}.call("object"==typeof global&&global?global:window),function(n,t){typeof define=="function"&&define.amd?define([],t):typeof exports=="object"?module.exports=t():n.FontLoader=t()}(window,function(){function n(n,t,i){this.delegate=t;this.timeout=typeof i!="undefined"?i:3e3;this._fontFamiliesArray=n.slice(0);this._testContainer=null;this._adobeBlankSizeWatcher=null;this._timeoutId=null;this._intervalId=null;this._intervalDelay=50;this._numberOfLoadedFonts=0;this._numberOfFontFamilies=this._fontFamiliesArray.length;this._fontsMap={};this._finished=!1}function i(n,t){this.width=n;this.height=t}function t(n,i){this._element=n;this._delegate=i.delegate;this._size=null;this._continuous=!!i.continuous;this._direction=i.direction?i.direction:t.directions.both;this._dimension=i.dimension?i.dimension:t.dimensions.both;this._sizeIncreaseWatcherContentElm=null;this._sizeDecreaseWatcherElm=null;this._sizeIncreaseWatcherElm=null;this._state=t.states.initialized;this._scrollAmount=2;this._generateScrollWatchers(i.size);this._appendScrollWatchersToElement(i.container)}var r=/MSIE/i.test(navigator.userAgent),u=null,e,f;return r&&(e=new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})"),f=e.exec(navigator.userAgent),f!==null&&(u=parseFloat(f[1]))),n.testDiv=null,n.useAdobeBlank=!r||u>=11,n.useResizeEvent=r&&u<11&&typeof document.attachEvent!="undefined",n.useIntervalChecking=window.opera||r&&u<11&&!n.useResizeEvent,n.referenceText=" !\"\\#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~",n.referenceFontFamilies=n.useAdobeBlank?["AdobeBlank"]:["serif","cursive"],n.referenceFontFamiliesSizes=[],n.adobeBlankFontFaceRule="@font-face{ font-family:AdobeBlank; src:url('data:font/opentype;base64,T1RUTwAKAIAAAwAgQ0ZGIM6ZbkwAAEPEAAAZM0RTSUcAAAABAABtAAAAAAhPUy8yAR6vMwAAARAAAABgY21hcDqI98oAACjEAAAa4GhlYWT+BQILAAAArAAAADZoaGVhCCID7wAAAOQAAAAkaG10eAPoAHwAAFz4AAAQBm1heHAIAVAAAAABCAAAAAZuYW1lD/tWxwAAAXAAACdScG9zdP+4ADIAAEOkAAAAIAABAAAAAQj1Snw1O18PPPUAAwPoAAAAAM2C2p8AAAAAzYLanwB8/4gDbANwAAAAAwACAAAAAAAAAAEAAANw/4gAyAPoAHwAfANsAAEAAAAAAAAAAAAAAAAAAAACAABQAAgBAAAABAAAAZAABQAAAooCWAAAAEsCigJYAAABXgAyANwAAAAAAAAAAAAAAAD3/67/+9///w/gAD8AAAAAQURCRQHAAAD//wNw/4gAyANwAHhgLwH/AAAAAAAAAAAAAAAgAAAAAAARANIAAQAAAAAAAQALAAAAAQAAAAAAAgAHAAsAAQAAAAAAAwAbABIAAQAAAAAABAALAAAAAQAAAAAABQA5AC0AAQAAAAAABgAKAGYAAwABBAkAAABuAHAAAwABBAkAAQAWAN4AAwABBAkAAgAOAPQAAwABBAkAAwA2AQIAAwABBAkABAAWAN4AAwABBAkABQByATgAAwABBAkABgAUAaoAAwABBAkACAA0Ab4AAwABBAkACwA0AfIAAwABBAkADSQSAiYAAwABBAkADgBIJjhBZG9iZSBCbGFua1JlZ3VsYXIxLjAzNTtBREJFO0Fkb2JlQmxhbms7QURPQkVWZXJzaW9uIDEuMDM1O1BTIDEuMDAzO2hvdGNvbnYgMS4wLjcwO21ha2VvdGYubGliMi41LjU5MDBBZG9iZUJsYW5rAKkAIAAyADAAMQAzACAAQQBkAG8AYgBlACAAUwB5AHMAdABlAG0AcwAgAEkAbgBjAG8AcgBwAG8AcgBhAHQAZQBkAC4AIABBAGwAbAAgAFIAaQBnAGgAdABzACAAUgBlAHMAZQByAHYAZQBkAC4AQQBkAG8AYgBlACAAQgBsAGEAbgBrAFIAZQBnAHUAbABhAHIAMQAuADAAMwA1ADsAQQBEAEIARQA7AEEAZABvAGIAZQBCAGwAYQBuAGsAOwBBAEQATwBCAEUAVgBlAHIAcwBpAG8AbgAgADEALgAwADMANQA7AFAAUwAgADEALgAwADAAMwA7AGgAbwB0AGMAbwBuAHYAIAAxAC4AMAAuADcAMAA7AG0AYQBrAGUAbwB0AGYALgBsAGkAYgAyAC4ANQAuADUAOQAwADAAQQBkAG8AYgBlAEIAbABhAG4AawBBAGQAbwBiAGUAIABTAHkAcwB0AGUAbQBzACAASQBuAGMAbwByAHAAbwByAGEAdABlAGQAaAB0AHQAcAA6AC8ALwB3AHcAdwAuAGEAZABvAGIAZQAuAGMAbwBtAC8AdAB5AHAAZQAvAEEAZABvAGIAZQAgAEIAbABhAG4AawAgAGkAcwAgAHIAZQBsAGUAYQBzAGUAZAAgAHUAbgBkAGUAcgAgAHQAaABlACAAUwBJAEwAIABPAHAAZQBuACAARgBvAG4AdAAgAEwAaQBjAGUAbgBzAGUAIAAtACAAcABsAGUAYQBzAGUAIAByAGUAYQBkACAAaQB0ACAAYwBhAHIAZQBmAHUAbABsAHkAIABhAG4AZAAgAGQAbwAgAG4AbwB0ACAAZABvAHcAbgBsAG8AYQBkACAAdABoAGUAIABmAG8AbgB0AHMAIAB1AG4AbABlAHMAcwAgAHkAbwB1ACAAYQBnAHIAZQBlACAAdABvACAAdABoAGUAIAB0AGgAZQAgAHQAZQByAG0AcwAgAG8AZgAgAHQAaABlACAAbABpAGMAZQBuAHMAZQA6AA0ACgANAAoAQwBvAHAAeQByAGkAZwBoAHQAIACpACAAMgAwADEAMwAgAEEAZABvAGIAZQAgAFMAeQBzAHQAZQBtAHMAIABJAG4AYwBvAHIAcABvAHIAYQB0AGUAZAAgACgAaAB0AHQAcAA6AC8ALwB3AHcAdwAuAGEAZABvAGIAZQAuAGMAbwBtAC8AKQAsACAAdwBpAHQAaAAgAFIAZQBzAGUAcgB2AGUAZAAgAEYAbwBuAHQAIABOAGEAbQBlACAAQQBkAG8AYgBlACAAQgBsAGEAbgBrAA0ACgANAAoAVABoAGkAcwAgAEYAbwBuAHQAIABTAG8AZgB0AHcAYQByAGUAIABpAHMAIABsAGkAYwBlAG4AcwBlAGQAIAB1AG4AZABlAHIAIAB0AGgAZQAgAFMASQBMACAATwBwAGUAbgAgAEYAbwBuAHQAIABMAGkAYwBlAG4AcwBlACwAIABWAGUAcgBzAGkAbwBuACAAMQAuADEALgANAAoADQAKAFQAaABpAHMAIABsAGkAYwBlAG4AcwBlACAAaQBzACAAYwBvAHAAaQBlAGQAIABiAGUAbABvAHcALAAgAGEAbgBkACAAaQBzACAAYQBsAHMAbwAgAGEAdgBhAGkAbABhAGIAbABlACAAdwBpAHQAaAAgAGEAIABGAEEAUQAgAGEAdAA6ACAAaAB0AHQAcAA6AC8ALwBzAGMAcgBpAHAAdABzAC4AcwBpAGwALgBvAHIAZwAvAE8ARgBMAA0ACgANAAoALQAtAC0ALQAtAC0ALQAtAC0ALQAtAC0ALQAtAC0ALQAtAC0ALQAtAC0ALQAtAC0ALQAtAC0ALQAtAC0ALQAtAC0ALQAtAC0ALQAtAC0ALQAtAC0ALQAtAC0ALQAtAC0ALQAtAC0ALQAtAC0ALQAtAC0ALQAtAA0ACgBTAEkATAAgAE8AUABFAE4AIABGAE8ATgBUACAATABJAEMARQBOAFMARQAgAFYAZQByAHMAaQBvAG4AIAAxAC4AMQAgAC0AIAAyADYAIABGAGUAYgByAHUAYQByAHkAIAAyADAAMAA3AA0ACgAtAC0ALQAtAC0ALQAtAC0ALQAtAC0ALQAtAC0ALQAtAC0ALQAtAC0ALQAtAC0ALQAtAC0ALQAtAC0ALQAtAC0ALQAtAC0ALQAtAC0ALQAtAC0ALQAtAC0ALQAtAC0ALQAtAC0ALQAtAC0ALQAtAC0ALQAtAC0ADQAKAA0ACgBQAFIARQBBAE0AQgBMAEUADQAKAFQAaABlACAAZwBvAGEAbABzACAAbwBmACAAdABoAGUAIABPAHAAZQBuACAARgBvAG4AdAAgAEwAaQBjAGUAbgBzAGUAIAAoAE8ARgBMACkAIABhAHIAZQAgAHQAbwAgAHMAdABpAG0AdQBsAGEAdABlACAAdwBvAHIAbABkAHcAaQBkAGUAIABkAGUAdgBlAGwAbwBwAG0AZQBuAHQAIABvAGYAIABjAG8AbABsAGEAYgBvAHIAYQB0AGkAdgBlACAAZgBvAG4AdAAgAHAAcgBvAGoAZQBjAHQAcwAsACAAdABvACAAcwB1AHAAcABvAHIAdAAgAHQAaABlACAAZgBvAG4AdAAgAGMAcgBlAGEAdABpAG8AbgAgAGUAZgBmAG8AcgB0AHMAIABvAGYAIABhAGMAYQBkAGUAbQBpAGMAIABhAG4AZAAgAGwAaQBuAGcAdQBpAHMAdABpAGMAIABjAG8AbQBtAHUAbgBpAHQAaQBlAHMALAAgAGEAbgBkACAAdABvACAAcAByAG8AdgBpAGQAZQAgAGEAIABmAHIAZQBlACAAYQBuAGQAIABvAHAAZQBuACAAZgByAGEAbQBlAHcAbwByAGsAIABpAG4AIAB3AGgAaQBjAGgAIABmAG8AbgB0AHMAIABtAGEAeQAgAGIAZQAgAHMAaABhAHIAZQBkACAAYQBuAGQAIABpAG0AcAByAG8AdgBlAGQAIABpAG4AIABwAGEAcgB0AG4AZQByAHMAaABpAHAAIAB3AGkAdABoACAAbwB0AGgAZQByAHMALgANAAoADQAKAFQAaABlACAATwBGAEwAIABhAGwAbABvAHcAcwAgAHQAaABlACAAbABpAGMAZQBuAHMAZQBkACAAZgBvAG4AdABzACAAdABvACAAYgBlACAAdQBzAGUAZAAsACAAcwB0AHUAZABpAGUAZAAsACAAbQBvAGQAaQBmAGkAZQBkACAAYQBuAGQAIAByAGUAZABpAHMAdAByAGkAYgB1AHQAZQBkACAAZgByAGUAZQBsAHkAIABhAHMAIABsAG8AbgBnACAAYQBzACAAdABoAGUAeQAgAGEAcgBlACAAbgBvAHQAIABzAG8AbABkACAAYgB5ACAAdABoAGUAbQBzAGUAbAB2AGUAcwAuACAAVABoAGUAIABmAG8AbgB0AHMALAAgAGkAbgBjAGwAdQBkAGkAbgBnACAAYQBuAHkAIABkAGUAcgBpAHYAYQB0AGkAdgBlACAAdwBvAHIAawBzACwAIABjAGEAbgAgAGIAZQAgAGIAdQBuAGQAbABlAGQALAAgAGUAbQBiAGUAZABkAGUAZAAsACAAcgBlAGQAaQBzAHQAcgBpAGIAdQB0AGUAZAAgAGEAbgBkAC8AbwByACAAcwBvAGwAZAAgAHcAaQB0AGgAIABhAG4AeQAgAHMAbwBmAHQAdwBhAHIAZQAgAHAAcgBvAHYAaQBkAGUAZAAgAHQAaABhAHQAIABhAG4AeQAgAHIAZQBzAGUAcgB2AGUAZAAgAG4AYQBtAGUAcwAgAGEAcgBlACAAbgBvAHQAIAB1AHMAZQBkACAAYgB5ACAAZABlAHIAaQB2AGEAdABpAHYAZQAgAHcAbwByAGsAcwAuACAAVABoAGUAIABmAG8AbgB0AHMAIABhAG4AZAAgAGQAZQByAGkAdgBhAHQAaQB2AGUAcwAsACAAaABvAHcAZQB2AGUAcgAsACAAYwBhAG4AbgBvAHQAIABiAGUAIAByAGUAbABlAGEAcwBlAGQAIAB1AG4AZABlAHIAIABhAG4AeQAgAG8AdABoAGUAcgAgAHQAeQBwAGUAIABvAGYAIABsAGkAYwBlAG4AcwBlAC4AIABUAGgAZQAgAHIAZQBxAHUAaQByAGUAbQBlAG4AdAAgAGYAbwByACAAZgBvAG4AdABzACAAdABvACAAcgBlAG0AYQBpAG4AIAB1AG4AZABlAHIAIAB0AGgAaQBzACAAbABpAGMAZQBuAHMAZQAgAGQAbwBlAHMAIABuAG8AdAAgAGEAcABwAGwAeQAgAHQAbwAgAGEAbgB5ACAAZABvAGMAdQBtAGUAbgB0ACAAYwByAGUAYQB0AGUAZAAgAHUAcwBpAG4AZwAgAHQAaABlACAAZgBvAG4AdABzACAAbwByACAAdABoAGUAaQByACAAZABlAHIAaQB2AGEAdABpAHYAZQBzAC4ADQAKAA0ACgBEAEUARgBJAE4ASQBUAEkATwBOAFMADQAKACIARgBvAG4AdAAgAFMAbwBmAHQAdwBhAHIAZQAiACAAcgBlAGYAZQByAHMAIAB0AG8AIAB0AGgAZQAgAHMAZQB0ACAAbwBmACAAZgBpAGwAZQBzACAAcgBlAGwAZQBhAHMAZQBkACAAYgB5ACAAdABoAGUAIABDAG8AcAB5AHIAaQBnAGgAdAAgAEgAbwBsAGQAZQByACgAcwApACAAdQBuAGQAZQByACAAdABoAGkAcwAgAGwAaQBjAGUAbgBzAGUAIABhAG4AZAAgAGMAbABlAGEAcgBsAHkAIABtAGEAcgBrAGUAZAAgAGEAcwAgAHMAdQBjAGgALgAgAFQAaABpAHMAIABtAGEAeQAgAGkAbgBjAGwAdQBkAGUAIABzAG8AdQByAGMAZQAgAGYAaQBsAGUAcwAsACAAYgB1AGkAbABkACAAcwBjAHIAaQBwAHQAcwAgAGEAbgBkACAAZABvAGMAdQBtAGUAbgB0AGEAdABpAG8AbgAuAA0ACgANAAoAIgBSAGUAcwBlAHIAdgBlAGQAIABGAG8AbgB0ACAATgBhAG0AZQAiACAAcgBlAGYAZQByAHMAIAB0AG8AIABhAG4AeQAgAG4AYQBtAGUAcwAgAHMAcABlAGMAaQBmAGkAZQBkACAAYQBzACAAcwB1AGMAaAAgAGEAZgB0AGUAcgAgAHQAaABlACAAYwBvAHAAeQByAGkAZwBoAHQAIABzAHQAYQB0AGUAbQBlAG4AdAAoAHMAKQAuAA0ACgANAAoAIgBPAHIAaQBnAGkAbgBhAGwAIABWAGUAcgBzAGkAbwBuACIAIAByAGUAZgBlAHIAcwAgAHQAbwAgAHQAaABlACAAYwBvAGwAbABlAGMAdABpAG8AbgAgAG8AZgAgAEYAbwBuAHQAIABTAG8AZgB0AHcAYQByAGUAIABjAG8AbQBwAG8AbgBlAG4AdABzACAAYQBzACAAZABpAHMAdAByAGkAYgB1AHQAZQBkACAAYgB5ACAAdABoAGUAIABDAG8AcAB5AHIAaQBnAGgAdAAgAEgAbwBsAGQAZQByACgAcwApAC4ADQAKAA0ACgAiAE0AbwBkAGkAZgBpAGUAZAAgAFYAZQByAHMAaQBvAG4AIgAgAHIAZQBmAGUAcgBzACAAdABvACAAYQBuAHkAIABkAGUAcgBpAHYAYQB0AGkAdgBlACAAbQBhAGQAZQAgAGIAeQAgAGEAZABkAGkAbgBnACAAdABvACwAIABkAGUAbABlAHQAaQBuAGcALAAgAG8AcgAgAHMAdQBiAHMAdABpAHQAdQB0AGkAbgBnACAALQAtACAAaQBuACAAcABhAHIAdAAgAG8AcgAgAGkAbgAgAHcAaABvAGwAZQAgAC0ALQAgAGEAbgB5ACAAbwBmACAAdABoAGUAIABjAG8AbQBwAG8AbgBlAG4AdABzACAAbwBmACAAdABoAGUAIABPAHIAaQBnAGkAbgBhAGwAIABWAGUAcgBzAGkAbwBuACwAIABiAHkAIABjAGgAYQBuAGcAaQBuAGcAIABmAG8AcgBtAGEAdABzACAAbwByACAAYgB5ACAAcABvAHIAdABpAG4AZwAgAHQAaABlACAARgBvAG4AdAAgAFMAbwBmAHQAdwBhAHIAZQAgAHQAbwAgAGEAIABuAGUAdwAgAGUAbgB2AGkAcgBvAG4AbQBlAG4AdAAuAA0ACgANAAoAIgBBAHUAdABoAG8AcgAiACAAcgBlAGYAZQByAHMAIAB0AG8AIABhAG4AeQAgAGQAZQBzAGkAZwBuAGUAcgAsACAAZQBuAGcAaQBuAGUAZQByACwAIABwAHIAbwBnAHIAYQBtAG0AZQByACwAIAB0AGUAYwBoAG4AaQBjAGEAbAAgAHcAcgBpAHQAZQByACAAbwByACAAbwB0AGgAZQByACAAcABlAHIAcwBvAG4AIAB3AGgAbwAgAGMAbwBuAHQAcgBpAGIAdQB0AGUAZAAgAHQAbwAgAHQAaABlACAARgBvAG4AdAAgAFMAbwBmAHQAdwBhAHIAZQAuAA0ACgANAAoAUABFAFIATQBJAFMAUwBJAE8ATgAgACYAIABDAE8ATgBEAEkAVABJAE8ATgBTAA0ACgBQAGUAcgBtAGkAcwBzAGkAbwBuACAAaQBzACAAaABlAHIAZQBiAHkAIABnAHIAYQBuAHQAZQBkACwAIABmAHIAZQBlACAAbwBmACAAYwBoAGEAcgBnAGUALAAgAHQAbwAgAGEAbgB5ACAAcABlAHIAcwBvAG4AIABvAGIAdABhAGkAbgBpAG4AZwAgAGEAIABjAG8AcAB5ACAAbwBmACAAdABoAGUAIABGAG8AbgB0ACAAUwBvAGYAdAB3AGEAcgBlACwAIAB0AG8AIAB1AHMAZQAsACAAcwB0AHUAZAB5ACwAIABjAG8AcAB5ACwAIABtAGUAcgBnAGUALAAgAGUAbQBiAGUAZAAsACAAbQBvAGQAaQBmAHkALAAgAHIAZQBkAGkAcwB0AHIAaQBiAHUAdABlACwAIABhAG4AZAAgAHMAZQBsAGwAIABtAG8AZABpAGYAaQBlAGQAIABhAG4AZAAgAHUAbgBtAG8AZABpAGYAaQBlAGQAIABjAG8AcABpAGUAcwAgAG8AZgAgAHQAaABlACAARgBvAG4AdAAgAFMAbwBmAHQAdwBhAHIAZQAsACAAcwB1AGIAagBlAGMAdAAgAHQAbwAgAHQAaABlACAAZgBvAGwAbABvAHcAaQBuAGcAIABjAG8AbgBkAGkAdABpAG8AbgBzADoADQAKAA0ACgAxACkAIABOAGUAaQB0AGgAZQByACAAdABoAGUAIABGAG8AbgB0ACAAUwBvAGYAdAB3AGEAcgBlACAAbgBvAHIAIABhAG4AeQAgAG8AZgAgAGkAdABzACAAaQBuAGQAaQB2AGkAZAB1AGEAbAAgAGMAbwBtAHAAbwBuAGUAbgB0AHMALAAgAGkAbgAgAE8AcgBpAGcAaQBuAGEAbAAgAG8AcgAgAE0AbwBkAGkAZgBpAGUAZAAgAFYAZQByAHMAaQBvAG4AcwAsACAAbQBhAHkAIABiAGUAIABzAG8AbABkACAAYgB5ACAAaQB0AHMAZQBsAGYALgANAAoADQAKADIAKQAgAE8AcgBpAGcAaQBuAGEAbAAgAG8AcgAgAE0AbwBkAGkAZgBpAGUAZAAgAFYAZQByAHMAaQBvAG4AcwAgAG8AZgAgAHQAaABlACAARgBvAG4AdAAgAFMAbwBmAHQAdwBhAHIAZQAgAG0AYQB5ACAAYgBlACAAYgB1AG4AZABsAGUAZAAsACAAcgBlAGQAaQBzAHQAcgBpAGIAdQB0AGUAZAAgAGEAbgBkAC8AbwByACAAcwBvAGwAZAAgAHcAaQB0AGgAIABhAG4AeQAgAHMAbwBmAHQAdwBhAHIAZQAsACAAcAByAG8AdgBpAGQAZQBkACAAdABoAGEAdAAgAGUAYQBjAGgAIABjAG8AcAB5ACAAYwBvAG4AdABhAGkAbgBzACAAdABoAGUAIABhAGIAbwB2AGUAIABjAG8AcAB5AHIAaQBnAGgAdAAgAG4AbwB0AGkAYwBlACAAYQBuAGQAIAB0AGgAaQBzACAAbABpAGMAZQBuAHMAZQAuACAAVABoAGUAcwBlACAAYwBhAG4AIABiAGUAIABpAG4AYwBsAHUAZABlAGQAIABlAGkAdABoAGUAcgAgAGEAcwAgAHMAdABhAG4AZAAtAGEAbABvAG4AZQAgAHQAZQB4AHQAIABmAGkAbABlAHMALAAgAGgAdQBtAGEAbgAtAHIAZQBhAGQAYQBiAGwAZQAgAGgAZQBhAGQAZQByAHMAIABvAHIAIABpAG4AIAB0AGgAZQAgAGEAcABwAHIAbwBwAHIAaQBhAHQAZQAgAG0AYQBjAGgAaQBuAGUALQByAGUAYQBkAGEAYgBsAGUAIABtAGUAdABhAGQAYQB0AGEAIABmAGkAZQBsAGQAcwAgAHcAaQB0AGgAaQBuACAAdABlAHgAdAAgAG8AcgAgAGIAaQBuAGEAcgB5ACAAZgBpAGwAZQBzACAAYQBzACAAbABvAG4AZwAgAGEAcwAgAHQAaABvAHMAZQAgAGYAaQBlAGwAZABzACAAYwBhAG4AIABiAGUAIABlAGEAcwBpAGwAeQAgAHYAaQBlAHcAZQBkACAAYgB5ACAAdABoAGUAIAB1AHMAZQByAC4ADQAKAA0ACgAzACkAIABOAG8AIABNAG8AZABpAGYAaQBlAGQAIABWAGUAcgBzAGkAbwBuACAAbwBmACAAdABoAGUAIABGAG8AbgB0ACAAUwBvAGYAdAB3AGEAcgBlACAAbQBhAHkAIAB1AHMAZQAgAHQAaABlACAAUgBlAHMAZQByAHYAZQBkACAARgBvAG4AdAAgAE4AYQBtAGUAKABzACkAIAB1AG4AbABlAHMAcwAgAGUAeABwAGwAaQBjAGkAdAAgAHcAcgBpAHQAdABlAG4AIABwAGUAcgBtAGkAcwBzAGkAbwBuACAAaQBzACAAZwByAGEAbgB0AGUAZAAgAGIAeQAgAHQAaABlACAAYwBvAHIAcgBlAHMAcABvAG4AZABpAG4AZwAgAEMAbwBwAHkAcgBpAGcAaAB0ACAASABvAGwAZABlAHIALgAgAFQAaABpAHMAIAByAGUAcwB0AHIAaQBjAHQAaQBvAG4AIABvAG4AbAB5ACAAYQBwAHAAbABpAGUAcwAgAHQAbwAgAHQAaABlACAAcAByAGkAbQBhAHIAeQAgAGYAbwBuAHQAIABuAGEAbQBlACAAYQBzACAAcAByAGUAcwBlAG4AdABlAGQAIAB0AG8AIAB0AGgAZQAgAHUAcwBlAHIAcwAuAA0ACgANAAoANAApACAAVABoAGUAIABuAGEAbQBlACgAcwApACAAbwBmACAAdABoAGUAIABDAG8AcAB5AHIAaQBnAGgAdAAgAEgAbwBsAGQAZQByACgAcwApACAAbwByACAAdABoAGUAIABBAHUAdABoAG8AcgAoAHMAKQAgAG8AZgAgAHQAaABlACAARgBvAG4AdAAgAFMAbwBmAHQAdwBhAHIAZQAgAHMAaABhAGwAbAAgAG4AbwB0ACAAYgBlACAAdQBzAGUAZAAgAHQAbwAgAHAAcgBvAG0AbwB0AGUALAAgAGUAbgBkAG8AcgBzAGUAIABvAHIAIABhAGQAdgBlAHIAdABpAHMAZQAgAGEAbgB5ACAATQBvAGQAaQBmAGkAZQBkACAAVgBlAHIAcwBpAG8AbgAsACAAZQB4AGMAZQBwAHQAIAB0AG8AIABhAGMAawBuAG8AdwBsAGUAZABnAGUAIAB0AGgAZQAgAGMAbwBuAHQAcgBpAGIAdQB0AGkAbwBuACgAcwApACAAbwBmACAAdABoAGUAIABDAG8AcAB5AHIAaQBnAGgAdAAgAEgAbwBsAGQAZQByACgAcwApACAAYQBuAGQAIAB0AGgAZQAgAEEAdQB0AGgAbwByACgAcwApACAAbwByACAAdwBpAHQAaAAgAHQAaABlAGkAcgAgAGUAeABwAGwAaQBjAGkAdAAgAHcAcgBpAHQAdABlAG4AIABwAGUAcgBtAGkAcwBzAGkAbwBuAC4ADQAKAA0ACgA1ACkAIABUAGgAZQAgAEYAbwBuAHQAIABTAG8AZgB0AHcAYQByAGUALAAgAG0AbwBkAGkAZgBpAGUAZAAgAG8AcgAgAHUAbgBtAG8AZABpAGYAaQBlAGQALAAgAGkAbgAgAHAAYQByAHQAIABvAHIAIABpAG4AIAB3AGgAbwBsAGUALAAgAG0AdQBzAHQAIABiAGUAIABkAGkAcwB0AHIAaQBiAHUAdABlAGQAIABlAG4AdABpAHIAZQBsAHkAIAB1AG4AZABlAHIAIAB0AGgAaQBzACAAbABpAGMAZQBuAHMAZQAsACAAYQBuAGQAIABtAHUAcwB0ACAAbgBvAHQAIABiAGUAIABkAGkAcwB0AHIAaQBiAHUAdABlAGQAIAB1AG4AZABlAHIAIABhAG4AeQAgAG8AdABoAGUAcgAgAGwAaQBjAGUAbgBzAGUALgAgAFQAaABlACAAcgBlAHEAdQBpAHIAZQBtAGUAbgB0ACAAZgBvAHIAIABmAG8AbgB0AHMAIAB0AG8AIAByAGUAbQBhAGkAbgAgAHUAbgBkAGUAcgAgAHQAaABpAHMAIABsAGkAYwBlAG4AcwBlACAAZABvAGUAcwAgAG4AbwB0ACAAYQBwAHAAbAB5ACAAdABvACAAYQBuAHkAIABkAG8AYwB1AG0AZQBuAHQAIABjAHIAZQBhAHQAZQBkACAAdQBzAGkAbgBnACAAdABoAGUAIABGAG8AbgB0ACAAUwBvAGYAdAB3AGEAcgBlAC4ADQAKAA0ACgBUAEUAUgBNAEkATgBBAFQASQBPAE4ADQAKAFQAaABpAHMAIABsAGkAYwBlAG4AcwBlACAAYgBlAGMAbwBtAGUAcwAgAG4AdQBsAGwAIABhAG4AZAAgAHYAbwBpAGQAIABpAGYAIABhAG4AeQAgAG8AZgAgAHQAaABlACAAYQBiAG8AdgBlACAAYwBvAG4AZABpAHQAaQBvAG4AcwAgAGEAcgBlACAAbgBvAHQAIABtAGUAdAAuAA0ACgANAAoARABJAFMAQwBMAEEASQBNAEUAUgANAAoAVABIAEUAIABGAE8ATgBUACAAUwBPAEYAVABXAEEAUgBFACAASQBTACAAUABSAE8AVgBJAEQARQBEACAAIgBBAFMAIABJAFMAIgAsACAAVwBJAFQASABPAFUAVAAgAFcAQQBSAFIAQQBOAFQAWQAgAE8ARgAgAEEATgBZACAASwBJAE4ARAAsACAARQBYAFAAUgBFAFMAUwAgAE8AUgAgAEkATQBQAEwASQBFAEQALAAgAEkATgBDAEwAVQBEAEkATgBHACAAQgBVAFQAIABOAE8AVAAgAEwASQBNAEkAVABFAEQAIABUAE8AIABBAE4AWQAgAFcAQQBSAFIAQQBOAFQASQBFAFMAIABPAEYAIABNAEUAUgBDAEgAQQBOAFQAQQBCAEkATABJAFQAWQAsACAARgBJAFQATgBFAFMAUwAgAEYATwBSACAAQQAgAFAAQQBSAFQASQBDAFUATABBAFIAIABQAFUAUgBQAE8AUwBFACAAQQBOAEQAIABOAE8ATgBJAE4ARgBSAEkATgBHAEUATQBFAE4AVAAgAE8ARgAgAEMATwBQAFkAUgBJAEcASABUACwAIABQAEEAVABFAE4AVAAsACAAVABSAEEARABFAE0AQQBSAEsALAAgAE8AUgAgAE8AVABIAEUAUgAgAFIASQBHAEgAVAAuACAASQBOACAATgBPACAARQBWAEUATgBUACAAUwBIAEEATABMACAAVABIAEUAIABDAE8AUABZAFIASQBHAEgAVAAgAEgATwBMAEQARQBSACAAQgBFACAATABJAEEAQgBMAEUAIABGAE8AUgAgAEEATgBZACAAQwBMAEEASQBNACwAIABEAEEATQBBAEcARQBTACAATwBSACAATwBUAEgARQBSACAATABJAEEAQgBJAEwASQBUAFkALAAgAEkATgBDAEwAVQBEAEkATgBHACAAQQBOAFkAIABHAEUATgBFAFIAQQBMACwAIABTAFAARQBDAEkAQQBMACwAIABJAE4ARABJAFIARQBDAFQALAAgAEkATgBDAEkARABFAE4AVABBAEwALAAgAE8AUgAgAEMATwBOAFMARQBRAFUARQBOAFQASQBBAEwAIABEAEEATQBBAEcARQBTACwAIABXAEgARQBUAEgARQBSACAASQBOACAAQQBOACAAQQBDAFQASQBPAE4AIABPAEYAIABDAE8ATgBUAFIAQQBDAFQALAAgAFQATwBSAFQAIABPAFIAIABPAFQASABFAFIAVwBJAFMARQAsACAAQQBSAEkAUwBJAE4ARwAgAEYAUgBPAE0ALAAgAE8AVQBUACAATwBGACAAVABIAEUAIABVAFMARQAgAE8AUgAgAEkATgBBAEIASQBMAEkAVABZACAAVABPACAAVQBTAEUAIABUAEgARQAgAEYATwBOAFQAIABTAE8ARgBUAFcAQQBSAEUAIABPAFIAIABGAFIATwBNACAATwBUAEgARQBSACAARABFAEEATABJAE4ARwBTACAASQBOACAAVABIAEUAIABGAE8ATgBUACAAUwBPAEYAVABXAEEAUgBFAC4ADQAKAGgAdAB0AHAAOgAvAC8AdwB3AHcALgBhAGQAbwBiAGUALgBjAG8AbQAvAHQAeQBwAGUALwBsAGUAZwBhAGwALgBoAHQAbQBsAAAAAAAFAAAAAwAAADgAAAAEAAABUAABAAAAAAAsAAMAAQAAADgAAwAKAAABUAAGAAwAAAAAAAEAAAAEARgAAABCAEAABQACB/8P/xf/H/8n/y//N/8//0f/T/9X/1//Z/9v/3f/f/+H/4//l/+f/6f/r/+3/7//x//P/9f/5//v//f//c///f//AAAAAAgAEAAYACAAKAAwADgAQABIAFAAWABgAGgAcAB4AIAAiACQAJgAoACoALAAuADAAMgA0ADgAOgA8AD4AP3w//8AAfgB8AHoAeAB2AHQAcgBwAG4AbABqAGgAZgBkAGIAYABeAFwAWgBYAFYAVABSAFAATgBMAEgARgBEAEIAQgBAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAZkAAAAAAAAAIgAAAAAAAAB/8AAAABAAAIAAAAD/8AAAABAAAQAAAAF/8AAAABAAAYAAAAH/8AAAABAAAgAAAAJ/8AAAABAAAoAAAAL/8AAAABAAAwAAAAN/8AAAABAAA4AAAAP/8AAAABAABAAAAAR/8AAAABAABIAAAAT/8AAAABAABQAAAAV/8AAAABAABYAAAAX/8AAAABAABgAAAAZ/8AAAABAABoAAAAb/8AAAABAABwAAAAd/8AAAABAAB4AAAAf/8AAAABAACAAAAAh/8AAAABAACIAAAAj/8AAAABAACQAAAAl/8AAAABAACYAAAAn/8AAAABAACgAAAAp/8AAAABAACoAAAAr/8AAAABAACwAAAAt/8AAAABAAC4AAAAv/8AAAABAADAAAAAx/8AAAABAADIAAAAz/8AAAABAADQAAAA1/8AAAABAADgAAAA5/8AAAABAADoAAAA7/8AAAABAADwAAAA9/8AAAABAAD4AAAA/c8AAAABAAD98AAA//0AAAXxAAEAAAABB/8AAAABAAEIAAABD/8AAAABAAEQAAABF/8AAAABAAEYAAABH/8AAAABAAEgAAABJ/8AAAABAAEoAAABL/8AAAABAAEwAAABN/8AAAABAAE4AAABP/8AAAABAAFAAAABR/8AAAABAAFIAAABT/8AAAABAAFQAAABV/8AAAABAAFYAAABX/8AAAABAAFgAAABZ/8AAAABAAFoAAABb/8AAAABAAFwAAABd/8AAAABAAF4AAABf/8AAAABAAGAAAABh/8AAAABAAGIAAABj/8AAAABAAGQAAABl/8AAAABAAGYAAABn/8AAAABAAGgAAABp/8AAAABAAGoAAABr/8AAAABAAGwAAABt/8AAAABAAG4AAABv/8AAAABAAHAAAABx/8AAAABAAHIAAABz/8AAAABAAHQAAAB1/8AAAABAAHYAAAB3/8AAAABAAHgAAAB5/8AAAABAAHoAAAB7/8AAAABAAHwAAAB9/8AAAABAAH4AAAB//0AAAABAAIAAAACB/8AAAABAAIIAAACD/8AAAABAAIQAAACF/8AAAABAAIYAAACH/8AAAABAAIgAAACJ/8AAAABAAIoAAACL/8AAAABAAIwAAACN/8AAAABAAI4AAACP/8AAAABAAJAAAACR/8AAAABAAJIAAACT/8AAAABAAJQAAACV/8AAAABAAJYAAACX/8AAAABAAJgAAACZ/8AAAABAAJoAAACb/8AAAABAAJwAAACd/8AAAABAAJ4AAACf/8AAAABAAKAAAACh/8AAAABAAKIAAACj/8AAAABAAKQAAACl/8AAAABAAKYAAACn/8AAAABAAKgAAACp/8AAAABAAKoAAACr/8AAAABAAKwAAACt/8AAAABAAK4AAACv/8AAAABAALAAAACx/8AAAABAALIAAACz/8AAAABAALQAAAC1/8AAAABAALYAAAC3/8AAAABAALgAAAC5/8AAAABAALoAAAC7/8AAAABAALwAAAC9/8AAAABAAL4AAAC//0AAAABAAMAAAADB/8AAAABAAMIAAADD/8AAAABAAMQAAADF/8AAAABAAMYAAADH/8AAAABAAMgAAADJ/8AAAABAAMoAAADL/8AAAABAAMwAAADN/8AAAABAAM4AAADP/8AAAABAANAAAADR/8AAAABAANIAAADT/8AAAABAANQAAADV/8AAAABAANYAAADX/8AAAABAANgAAADZ/8AAAABAANoAAADb/8AAAABAANwAAADd/8AAAABAAN4AAADf/8AAAABAAOAAAADh/8AAAABAAOIAAADj/8AAAABAAOQAAADl/8AAAABAAOYAAADn/8AAAABAAOgAAADp/8AAAABAAOoAAADr/8AAAABAAOwAAADt/8AAAABAAO4AAADv/8AAAABAAPAAAADx/8AAAABAAPIAAADz/8AAAABAAPQAAAD1/8AAAABAAPYAAAD3/8AAAABAAPgAAAD5/8AAAABAAPoAAAD7/8AAAABAAPwAAAD9/8AAAABAAP4AAAD//0AAAABAAQAAAAEB/8AAAABAAQIAAAED/8AAAABAAQQAAAEF/8AAAABAAQYAAAEH/8AAAABAAQgAAAEJ/8AAAABAAQoAAAEL/8AAAABAAQwAAAEN/8AAAABAAQ4AAAEP/8AAAABAARAAAAER/8AAAABAARIAAAET/8AAAABAARQAAAEV/8AAAABAARYAAAEX/8AAAABAARgAAAEZ/8AAAABAARoAAAEb/8AAAABAARwAAAEd/8AAAABAAR4AAAEf/8AAAABAASAAAAEh/8AAAABAASIAAAEj/8AAAABAASQAAAEl/8AAAABAASYAAAEn/8AAAABAASgAAAEp/8AAAABAASoAAAEr/8AAAABAASwAAAEt/8AAAABAAS4AAAEv/8AAAABAATAAAAEx/8AAAABAATIAAAEz/8AAAABAATQAAAE1/8AAAABAATYAAAE3/8AAAABAATgAAAE5/8AAAABAAToAAAE7/8AAAABAATwAAAE9/8AAAABAAT4AAAE//0AAAABAAUAAAAFB/8AAAABAAUIAAAFD/8AAAABAAUQAAAFF/8AAAABAAUYAAAFH/8AAAABAAUgAAAFJ/8AAAABAAUoAAAFL/8AAAABAAUwAAAFN/8AAAABAAU4AAAFP/8AAAABAAVAAAAFR/8AAAABAAVIAAAFT/8AAAABAAVQAAAFV/8AAAABAAVYAAAFX/8AAAABAAVgAAAFZ/8AAAABAAVoAAAFb/8AAAABAAVwAAAFd/8AAAABAAV4AAAFf/8AAAABAAWAAAAFh/8AAAABAAWIAAAFj/8AAAABAAWQAAAFl/8AAAABAAWYAAAFn/8AAAABAAWgAAAFp/8AAAABAAWoAAAFr/8AAAABAAWwAAAFt/8AAAABAAW4AAAFv/8AAAABAAXAAAAFx/8AAAABAAXIAAAFz/8AAAABAAXQAAAF1/8AAAABAAXYAAAF3/8AAAABAAXgAAAF5/8AAAABAAXoAAAF7/8AAAABAAXwAAAF9/8AAAABAAX4AAAF//0AAAABAAYAAAAGB/8AAAABAAYIAAAGD/8AAAABAAYQAAAGF/8AAAABAAYYAAAGH/8AAAABAAYgAAAGJ/8AAAABAAYoAAAGL/8AAAABAAYwAAAGN/8AAAABAAY4AAAGP/8AAAABAAZAAAAGR/8AAAABAAZIAAAGT/8AAAABAAZQAAAGV/8AAAABAAZYAAAGX/8AAAABAAZgAAAGZ/8AAAABAAZoAAAGb/8AAAABAAZwAAAGd/8AAAABAAZ4AAAGf/8AAAABAAaAAAAGh/8AAAABAAaIAAAGj/8AAAABAAaQAAAGl/8AAAABAAaYAAAGn/8AAAABAAagAAAGp/8AAAABAAaoAAAGr/8AAAABAAawAAAGt/8AAAABAAa4AAAGv/8AAAABAAbAAAAGx/8AAAABAAbIAAAGz/8AAAABAAbQAAAG1/8AAAABAAbYAAAG3/8AAAABAAbgAAAG5/8AAAABAAboAAAG7/8AAAABAAbwAAAG9/8AAAABAAb4AAAG//0AAAABAAcAAAAHB/8AAAABAAcIAAAHD/8AAAABAAcQAAAHF/8AAAABAAcYAAAHH/8AAAABAAcgAAAHJ/8AAAABAAcoAAAHL/8AAAABAAcwAAAHN/8AAAABAAc4AAAHP/8AAAABAAdAAAAHR/8AAAABAAdIAAAHT/8AAAABAAdQAAAHV/8AAAABAAdYAAAHX/8AAAABAAdgAAAHZ/8AAAABAAdoAAAHb/8AAAABAAdwAAAHd/8AAAABAAd4AAAHf/8AAAABAAeAAAAHh/8AAAABAAeIAAAHj/8AAAABAAeQAAAHl/8AAAABAAeYAAAHn/8AAAABAAegAAAHp/8AAAABAAeoAAAHr/8AAAABAAewAAAHt/8AAAABAAe4AAAHv/8AAAABAAfAAAAHx/8AAAABAAfIAAAHz/8AAAABAAfQAAAH1/8AAAABAAfYAAAH3/8AAAABAAfgAAAH5/8AAAABAAfoAAAH7/8AAAABAAfwAAAH9/8AAAABAAf4AAAH//0AAAABAAgAAAAIB/8AAAABAAgIAAAID/8AAAABAAgQAAAIF/8AAAABAAgYAAAIH/8AAAABAAggAAAIJ/8AAAABAAgoAAAIL/8AAAABAAgwAAAIN/8AAAABAAg4AAAIP/8AAAABAAhAAAAIR/8AAAABAAhIAAAIT/8AAAABAAhQAAAIV/8AAAABAAhYAAAIX/8AAAABAAhgAAAIZ/8AAAABAAhoAAAIb/8AAAABAAhwAAAId/8AAAABAAh4AAAIf/8AAAABAAiAAAAIh/8AAAABAAiIAAAIj/8AAAABAAiQAAAIl/8AAAABAAiYAAAIn/8AAAABAAigAAAIp/8AAAABAAioAAAIr/8AAAABAAiwAAAIt/8AAAABAAi4AAAIv/8AAAABAAjAAAAIx/8AAAABAAjIAAAIz/8AAAABAAjQAAAI1/8AAAABAAjYAAAI3/8AAAABAAjgAAAI5/8AAAABAAjoAAAI7/8AAAABAAjwAAAI9/8AAAABAAj4AAAI//0AAAABAAkAAAAJB/8AAAABAAkIAAAJD/8AAAABAAkQAAAJF/8AAAABAAkYAAAJH/8AAAABAAkgAAAJJ/8AAAABAAkoAAAJL/8AAAABAAkwAAAJN/8AAAABAAk4AAAJP/8AAAABAAlAAAAJR/8AAAABAAlIAAAJT/8AAAABAAlQAAAJV/8AAAABAAlYAAAJX/8AAAABAAlgAAAJZ/8AAAABAAloAAAJb/8AAAABAAlwAAAJd/8AAAABAAl4AAAJf/8AAAABAAmAAAAJh/8AAAABAAmIAAAJj/8AAAABAAmQAAAJl/8AAAABAAmYAAAJn/8AAAABAAmgAAAJp/8AAAABAAmoAAAJr/8AAAABAAmwAAAJt/8AAAABAAm4AAAJv/8AAAABAAnAAAAJx/8AAAABAAnIAAAJz/8AAAABAAnQAAAJ1/8AAAABAAnYAAAJ3/8AAAABAAngAAAJ5/8AAAABAAnoAAAJ7/8AAAABAAnwAAAJ9/8AAAABAAn4AAAJ//0AAAABAAoAAAAKB/8AAAABAAoIAAAKD/8AAAABAAoQAAAKF/8AAAABAAoYAAAKH/8AAAABAAogAAAKJ/8AAAABAAooAAAKL/8AAAABAAowAAAKN/8AAAABAAo4AAAKP/8AAAABAApAAAAKR/8AAAABAApIAAAKT/8AAAABAApQAAAKV/8AAAABAApYAAAKX/8AAAABAApgAAAKZ/8AAAABAApoAAAKb/8AAAABAApwAAAKd/8AAAABAAp4AAAKf/8AAAABAAqAAAAKh/8AAAABAAqIAAAKj/8AAAABAAqQAAAKl/8AAAABAAqYAAAKn/8AAAABAAqgAAAKp/8AAAABAAqoAAAKr/8AAAABAAqwAAAKt/8AAAABAAq4AAAKv/8AAAABAArAAAAKx/8AAAABAArIAAAKz/8AAAABAArQAAAK1/8AAAABAArYAAAK3/8AAAABAArgAAAK5/8AAAABAAroAAAK7/8AAAABAArwAAAK9/8AAAABAAr4AAAK//0AAAABAAsAAAALB/8AAAABAAsIAAALD/8AAAABAAsQAAALF/8AAAABAAsYAAALH/8AAAABAAsgAAALJ/8AAAABAAsoAAALL/8AAAABAAswAAALN/8AAAABAAs4AAALP/8AAAABAAtAAAALR/8AAAABAAtIAAALT/8AAAABAAtQAAALV/8AAAABAAtYAAALX/8AAAABAAtgAAALZ/8AAAABAAtoAAALb/8AAAABAAtwAAALd/8AAAABAAt4AAALf/8AAAABAAuAAAALh/8AAAABAAuIAAALj/8AAAABAAuQAAALl/8AAAABAAuYAAALn/8AAAABAAugAAALp/8AAAABAAuoAAALr/8AAAABAAuwAAALt/8AAAABAAu4AAALv/8AAAABAAvAAAALx/8AAAABAAvIAAALz/8AAAABAAvQAAAL1/8AAAABAAvYAAAL3/8AAAABAAvgAAAL5/8AAAABAAvoAAAL7/8AAAABAAvwAAAL9/8AAAABAAv4AAAL//0AAAABAAwAAAAMB/8AAAABAAwIAAAMD/8AAAABAAwQAAAMF/8AAAABAAwYAAAMH/8AAAABAAwgAAAMJ/8AAAABAAwoAAAML/8AAAABAAwwAAAMN/8AAAABAAw4AAAMP/8AAAABAAxAAAAMR/8AAAABAAxIAAAMT/8AAAABAAxQAAAMV/8AAAABAAxYAAAMX/8AAAABAAxgAAAMZ/8AAAABAAxoAAAMb/8AAAABAAxwAAAMd/8AAAABAAx4AAAMf/8AAAABAAyAAAAMh/8AAAABAAyIAAAMj/8AAAABAAyQAAAMl/8AAAABAAyYAAAMn/8AAAABAAygAAAMp/8AAAABAAyoAAAMr/8AAAABAAywAAAMt/8AAAABAAy4AAAMv/8AAAABAAzAAAAMx/8AAAABAAzIAAAMz/8AAAABAAzQAAAM1/8AAAABAAzYAAAM3/8AAAABAAzgAAAM5/8AAAABAAzoAAAM7/8AAAABAAzwAAAM9/8AAAABAAz4AAAM//0AAAABAA0AAAANB/8AAAABAA0IAAAND/8AAAABAA0QAAANF/8AAAABAA0YAAANH/8AAAABAA0gAAANJ/8AAAABAA0oAAANL/8AAAABAA0wAAANN/8AAAABAA04AAANP/8AAAABAA1AAAANR/8AAAABAA1IAAANT/8AAAABAA1QAAANV/8AAAABAA1YAAANX/8AAAABAA1gAAANZ/8AAAABAA1oAAANb/8AAAABAA1wAAANd/8AAAABAA14AAANf/8AAAABAA2AAAANh/8AAAABAA2IAAANj/8AAAABAA2QAAANl/8AAAABAA2YAAANn/8AAAABAA2gAAANp/8AAAABAA2oAAANr/8AAAABAA2wAAANt/8AAAABAA24AAANv/8AAAABAA3AAAANx/8AAAABAA3IAAANz/8AAAABAA3QAAAN1/8AAAABAA3YAAAN3/8AAAABAA3gAAAN5/8AAAABAA3oAAAN7/8AAAABAA3wAAAN9/8AAAABAA34AAAN//0AAAABAA4AAAAOB/8AAAABAA4IAAAOD/8AAAABAA4QAAAOF/8AAAABAA4YAAAOH/8AAAABAA4gAAAOJ/8AAAABAA4oAAAOL/8AAAABAA4wAAAON/8AAAABAA44AAAOP/8AAAABAA5AAAAOR/8AAAABAA5IAAAOT/8AAAABAA5QAAAOV/8AAAABAA5YAAAOX/8AAAABAA5gAAAOZ/8AAAABAA5oAAAOb/8AAAABAA5wAAAOd/8AAAABAA54AAAOf/8AAAABAA6AAAAOh/8AAAABAA6IAAAOj/8AAAABAA6QAAAOl/8AAAABAA6YAAAOn/8AAAABAA6gAAAOp/8AAAABAA6oAAAOr/8AAAABAA6wAAAOt/8AAAABAA64AAAOv/8AAAABAA7AAAAOx/8AAAABAA7IAAAOz/8AAAABAA7QAAAO1/8AAAABAA7YAAAO3/8AAAABAA7gAAAO5/8AAAABAA7oAAAO7/8AAAABAA7wAAAO9/8AAAABAA74AAAO//0AAAABAA8AAAAPB/8AAAABAA8IAAAPD/8AAAABAA8QAAAPF/8AAAABAA8YAAAPH/8AAAABAA8gAAAPJ/8AAAABAA8oAAAPL/8AAAABAA8wAAAPN/8AAAABAA84AAAPP/8AAAABAA9AAAAPR/8AAAABAA9IAAAPT/8AAAABAA9QAAAPV/8AAAABAA9YAAAPX/8AAAABAA9gAAAPZ/8AAAABAA9oAAAPb/8AAAABAA9wAAAPd/8AAAABAA94AAAPf/8AAAABAA+AAAAPh/8AAAABAA+IAAAPj/8AAAABAA+QAAAPl/8AAAABAA+YAAAPn/8AAAABAA+gAAAPp/8AAAABAA+oAAAPr/8AAAABAA+wAAAPt/8AAAABAA+4AAAPv/8AAAABAA/AAAAPx/8AAAABAA/IAAAPz/8AAAABAA/QAAAP1/8AAAABAA/YAAAP3/8AAAABAA/gAAAP5/8AAAABAA/oAAAP7/8AAAABAA/wAAAP9/8AAAABAA/4AAAP//0AAAABABAAAAAQB/8AAAABABAIAAAQD/8AAAABABAQAAAQF/8AAAABABAYAAAQH/8AAAABABAgAAAQJ/8AAAABABAoAAAQL/8AAAABABAwAAAQN/8AAAABABA4AAAQP/8AAAABABBAAAAQR/8AAAABABBIAAAQT/8AAAABABBQAAAQV/8AAAABABBYAAAQX/8AAAABABBgAAAQZ/8AAAABABBoAAAQb/8AAAABABBwAAAQd/8AAAABABB4AAAQf/8AAAABABCAAAAQh/8AAAABABCIAAAQj/8AAAABABCQAAAQl/8AAAABABCYAAAQn/8AAAABABCgAAAQp/8AAAABABCoAAAQr/8AAAABABCwAAAQt/8AAAABABC4AAAQv/8AAAABABDAAAAQx/8AAAABABDIAAAQz/8AAAABABDQAAAQ1/8AAAABABDYAAAQ3/8AAAABABDgAAAQ5/8AAAABABDoAAAQ7/8AAAABABDwAAAQ9/8AAAABABD4AAAQ//0AAAABAAMAAAAAAAD/tQAyAAAAAAAAAAAAAAAAAAAAAAAAAAABAAQCAAEBAQtBZG9iZUJsYW5rAAEBATD4G/gciwwe+B0B+B4Ci/sM+gD6BAUeGgA/DB8cCAEMIvdMD/dZEfdRDCUcGRYMJAAFAQEGDk1YZ0Fkb2JlSWRlbnRpdHlDb3B5cmlnaHQgMjAxMyBBZG9iZSBTeXN0ZW1zIEluY29ycG9yYXRlZC4gQWxsIFJpZ2h0cyBSZXNlcnZlZC5BZG9iZSBCbGFua0Fkb2JlQmxhbmstMjA0OQAAAgABB/8DAAEAAAAIAQgBAgABAEsATABNAE4ATwBQAFEAUgBTAFQAVQBWAFcAWABZAFoAWwBcAF0AXgBfAGAAYQBiAGMAZABlAGYAZwBoAGkAagBrAGwAbQBuAG8AcABxAHIAcwB0AHUAdgB3AHgAeQB6AHsAfAB9AH4AfwCAAIEAggCDAIQAhQCGAIcAiACJAIoAiwCMAI0AjgCPAJAAkQCSAJMAlACVAJYAlwCYAJkAmgCbAJwAnQCeAJ8AoAChAKIAowCkAKUApgCnAKgAqQCqAKsArACtAK4ArwCwALEAsgCzALQAtQC2ALcAuAC5ALoAuwC8AL0AvgC/AMAAwQDCAMMAxADFAMYAxwDIAMkAygDLAMwAzQDOAM8A0ADRANIA0wDUANUA1gDXANgA2QDaANsA3ADdAN4A3wDgAOEA4gDjAOQA5QDmAOcA6ADpAOoA6wDsAO0A7gDvAPAA8QDyAPMA9AD1APYA9wD4APkA+gD7APwA/QD+AP8BAAEBAQIBAwEEAQUBBgEHAQgBCQEKAQsBDAENAQ4BDwEQAREBEgETARQBFQEWARcBGAEZARoBGwEcAR0BHgEfASABIQEiASMBJAElASYBJwEoASkBKgErASwBLQEuAS8BMAExATIBMwE0ATUBNgE3ATgBOQE6ATsBPAE9AT4BPwFAAUEBQgFDAUQBRQFGAUcBSAFJAUoBSwFMAU0BTgFPAVABUQFSAVMBVAFVAVYBVwFYAVkBWgFbAVwBXQFeAV8BYAFhAWIBYwFkAWUBZgFnAWgBaQFqAWsBbAFtAW4BbwFwAXEBcgFzAXQBdQF2AXcBeAF5AXoBewF8AX0BfgF/AYABgQGCAYMBhAGFAYYBhwGIAYkBigGLAYwBjQGOAY8BkAGRAZIBkwGUAZUBlgGXAZgBmQGaAZsBnAGdAZ4BnwGgAaEBogGjAaQBpQGmAacBqAGpAaoBqwGsAa0BrgGvAbABsQGyAbMBtAG1AbYBtwG4AbkBugG7AbwBvQG+Ab8BwAHBAcIBwwHEAcUBxgHHAcgByQHKAcsBzAHNAc4BzwHQAdEB0gHTAdQB1QHWAdcB2AHZAdoB2wHcAd0B3gHfAeAB4QHiAeMB5AHlAeYB5wHoAekB6gHrAewB7QHuAe8B8AHxAfIB8wH0AfUB9gH3AfgB+QH6AfsB/AH9Af4B/wIAAgECAgIDAgQCBQIGAgcCCAIJAgoCCwIMAg0CDgIPAhACEQISAhMCFAIVAhYCFwIYAhkCGgIbAhwCHQIeAh8CIAIhAiICIwIkAiUCJgInAigCKQIqAisCLAItAi4CLwIwAjECMgIzAjQCNQI2AjcCOAI5AjoCOwI8Aj0CPgI/AkACQQJCAkMCRAJFAkYCRwJIAkkCSgJLAkwCTQJOAk8CUAJRAlICUwJUAlUCVgJXAlgCWQJaAlsCXAJdAl4CXwJgAmECYgJjAmQCZQJmAmcCaAJpAmoCawJsAm0CbgJvAnACcQJyAnMCdAJ1AnYCdwJ4AnkCegJ7AnwCfQJ+An8CgAKBAoICgwKEAoUChgKHAogCiQKKAosCjAKNAo4CjwKQApECkgKTApQClQKWApcCmAKZApoCmwKcAp0CngKfAqACoQKiAqMCpAKlAqYCpwKoAqkCqgKrAqwCrQKuAq8CsAKxArICswK0ArUCtgK3ArgCuQK6ArsCvAK9Ar4CvwLAAsECwgLDAsQCxQLGAscCyALJAsoCywLMAs0CzgLPAtAC0QLSAtMC1ALVAtYC1wLYAtkC2gLbAtwC3QLeAt8C4ALhAuIC4wLkAuUC5gLnAugC6QLqAusC7ALtAu4C7wLwAvEC8gLzAvQC9QL2AvcC+AL5AvoC+wL8Av0C/gL/AwADAQMCAwMDBAMFAwYDBwMIAwkDCgMLAwwDDQMOAw8DEAMRAxIDEwMUAxUDFgMXAxgDGQMaAxsDHAMdAx4DHwMgAyEDIgMjAyQDJQMmAycDKAMpAyoDKwMsAy0DLgMvAzADMQMyAzMDNAM1AzYDNwM4AzkDOgM7AzwDPQM+Az8DQANBA0IDQwNEA0UDRgNHA0gDSQNKA0sDTANNA04DTwNQA1EDUgNTA1QDVQNWA1cDWANZA1oDWwNcA10DXgNfA2ADYQNiA2MDZANlA2YDZwNoA2kDagNrA2wDbQNuA28DcANxA3IDcwN0A3UDdgN3A3gDeQN6A3sDfAN9A34DfwOAA4EDggODA4QDhQOGA4cDiAOJA4oDiwOMA40DjgOPA5ADkQOSA5MDlAOVA5YDlwOYA5kDmgObA5wDnQOeA58DoAOhA6IDowOkA6UDpgOnA6gDqQOqA6sDrAOtA64DrwOwA7EDsgOzA7QDtQO2A7cDuAO5A7oDuwO8A70DvgO/A8ADwQPCA8MDxAPFA8YDxwPIA8kDygPLA8wDzQPOA88D0APRA9ID0wPUA9UD1gPXA9gD2QPaA9sD3APdA94D3wPgA+ED4gPjA+QD5QPmA+cD6APpA+oD6wPsA+0D7gPvA/AD8QPyA/MD9AP1A/YD9wP4A/kD+gP7A/wD/QP+A/8EAAQBBAIEAwQEBAUEBgQHBAgECQQKBAsEDAQNBA4EDwQQBBEEEgQTBBQEFQQWBBcEGAQZBBoEGwQcBB0EHgQfBCAEIQQiBCMEJAQlBCYEJwQoBCkEKgQrBCwELQQuBC8EMAQxBDIEMwQ0BDUENgQ3BDgEOQQ6BDsEPAQ9BD4EPwRABEEEQgRDBEQERQRGBEcESARJBEoESwRMBE0ETgRPBFAEUQRSBFMEVARVBFYEVwRYBFkEWgRbBFwEXQReBF8EYARhBGIEYwRkBGUEZgRnBGgEaQRqBGsEbARtBG4EbwRwBHEEcgRzBHQEdQR2BHcEeAR5BHoEewR8BH0EfgR/BIAEgQSCBIMEhASFBIYEhwSIBIkEigSLBIwEjQSOBI8EkASRBJIEkwSUBJUElgSXBJgEmQSaBJsEnASdBJ4EnwSgBKEEogSjBKQEpQSmBKcEqASpBKoEqwSsBK0ErgSvBLAEsQSyBLMEtAS1BLYEtwS4BLkEugS7BLwEvQS+BL8EwATBBMIEwwTEBMUExgTHBMgEyQTKBMsEzATNBM4EzwTQBNEE0gTTBNQE1QTWBNcE2ATZBNoE2wTcBN0E3gTfBOAE4QTiBOME5ATlBOYE5wToBOkE6gTrBOwE7QTuBO8E8ATxBPIE8wT0BPUE9gT3BPgE+QT6BPsE/AT9BP4E/wUABQEFAgUDBQQFBQUGBQcFCAUJBQoFCwUMBQ0FDgUPBRAFEQUSBRMFFAUVBRYFFwUYBRkFGgUbBRwFHQUeBR8FIAUhBSIFIwUkBSUFJgUnBSgFKQUqBSsFLAUtBS4FLwUwBTEFMgUzBTQFNQU2BTcFOAU5BToFOwU8BT0FPgU/BUAFQQVCBUMFRAVFBUYFRwVIBUkFSgVLBUwFTQVOBU8FUAVRBVIFUwVUBVUFVgVXBVgFWQVaBVsFXAVdBV4FXwVgBWEFYgVjBWQFZQVmBWcFaAVpBWoFawVsBW0FbgVvBXAFcQVyBXMFdAV1BXYFdwV4BXkFegV7BXwFfQV+BX8FgAWBBYIFgwWEBYUFhgWHBYgFiQWKBYsFjAWNBY4FjwWQBZEFkgWTBZQFlQWWBZcFmAWZBZoFmwWcBZ0FngWfBaAFoQWiBaMFpAWlBaYFpwWoBakFqgWrBawFrQWuBa8FsAWxBbIFswW0BbUFtgW3BbgFuQW6BbsFvAW9Bb4FvwXABcEFwgXDBcQFxQXGBccFyAXJBcoFywXMBc0FzgXPBdAF0QXSBdMF1AXVBdYF1wXYBdkF2gXbBdwF3QXeBd8F4AXhBeIF4wXkBeUF5gXnBegF6QXqBesF7AXtBe4F7wXwBfEF8gXzBfQF9QX2BfcF+AX5BfoF+wX8Bf0F/gX/BgAGAQYCBgMGBAYFBgYGBwYIBgkGCgYLBgwGDQYOBg8GEAYRBhIGEwYUBhUGFgYXBhgGGQYaBhsGHAYdBh4GHwYgBiEGIgYjBiQGJQYmBicGKAYpBioGKwYsBi0GLgYvBjAGMQYyBjMGNAY1BjYGNwY4BjkGOgY7BjwGPQY+Bj8GQAZBBkIGQwZEBkUGRgZHBkgGSQZKBksGTAZNBk4GTwZQBlEGUgZTBlQGVQZWBlcGWAZZBloGWwZcBl0GXgZfBmAGYQZiBmMGZAZlBmYGZwZoBmkGagZrBmwGbQZuBm8GcAZxBnIGcwZ0BnUGdgZ3BngGeQZ6BnsGfAZ9Bn4GfwaABoEGggaDBoQGhQaGBocGiAaJBooGiwaMBo0GjgaPBpAGkQaSBpMGlAaVBpYGlwaYBpkGmgabBpwGnQaeBp8GoAahBqIGowakBqUGpganBqgGqQaqBqsGrAatBq4GrwawBrEGsgazBrQGtQa2BrcGuAa5BroGuwa8Br0Gvga/BsAGwQbCBsMGxAbFBsYGxwbIBskGygbLBswGzQbOBs8G0AbRBtIG0wbUBtUG1gbXBtgG2QbaBtsG3AbdBt4G3wbgBuEG4gbjBuQG5QbmBucG6AbpBuoG6wbsBu0G7gbvBvAG8QbyBvMG9Ab1BvYG9wb4BvkG+gb7BvwG/Qb+Bv8HAAcBBwIHAwcEBwUHBgcHBwgHCQcKBwsHDAcNBw4HDwcQBxEHEgcTBxQHFQcWBxcHGAcZBxoHGwccBx0HHgcfByAHIQciByMHJAclByYHJwcoBykHKgcrBywHLQcuBy8HMAcxBzIHMwc0BzUHNgc3BzgHOQc6BzsHPAc9Bz4HPwdAB0EHQgdDB0QHRQdGB0cHSAdJB0oHSwdMB00HTgdPB1AHUQdSB1MHVAdVB1YHVwdYB1kHWgdbB1wHXQdeB18HYAdhB2IHYwdkB2UHZgdnB2gHaQdqB2sHbAdtB24HbwdwB3EHcgdzB3QHdQd2B3cHeAd5B3oHewd8B30Hfgd/B4AHgQeCB4MHhAeFB4YHhweIB4kHigeLB4wHjQeOB48HkAeRB5IHkweUB5UHlgeXB5gHmQeaB5sHnAedB54HnwegB6EHogejB6QHpQemB6cHqAepB6oHqwesB60HrgevB7AHsQeyB7MHtAe1B7YHtwe4B7kHuge7B7wHvQe+B78HwAfBB8IHwwfEB8UHxgfHB8gHyQfKB8sHzAfNB84HzwfQB9EH0gfTB9QH1QfWB9cH2AfZB9oH2wfcB90H3gffB+AH4QfiB+MH5AflB+YH5wfoB+kH6gfrB+wH7QfuB+8H8AfxB/IH8wf0B/UH9gf3B/gH+Qf6B/sH/Af9B/4H/wgACAEIAggDCAQIBQgGCAcICAgJCAoICwgMCA0IDggPCBAIEQgSCBMIFAgVCBYIFwgYCBkIGggbCBwIHQgeCB8IIAghCCIIIwgkCCUIJggnCCgIKQgqCCsILAgtCC4ILwgwCDEIMggzCDQINQg2CDcIOAg5CDoIOwg8CD0IPgg/CEAIQQhCCEMIRAhFCEYIRwhICEkISghLIPsMt/oktwH3ELf5LLcD9xD6BBX+fPmE+nwH/Vj+JxX50gf3xfwzBaawFfvF+DcF+PYGpmIV/dIH+8X4MwVwZhX3xfw3Bfz2Bg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODgABAQEK+B8MJpocGSQS+46LHAVGiwa9Cr0L+ucVAAPoAHwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAA') format('truetype'); }",n.prototype={constructor:n,loadFonts:function(){var t=this;if(this._numberOfFontFamilies===0){this._finish();return}this.timeout!==null&&(this._timeoutId=window.setTimeout(function(){t._finish()},this.timeout));this._testContainer=document.createElement("div");this._testContainer.style.cssText="position:absolute; left:-10000px; top:-10000px; white-space:nowrap; font-size:20px; line-height:20px; visibility:hidden;";n.testDiv===null?this._runOnce():this._loadFonts()},_runOnce:function(){var s=this,r,f,e,u,o="serif";if(n.testDiv=document.createElement("div"),n.testDiv.style.position="absolute",n.testDiv.appendChild(document.createTextNode(n.referenceText)),n.useAdobeBlank)e=document.createElement("style"),e.setAttribute("type","text/css"),e.appendChild(document.createTextNode(n.adobeBlankFontFaceRule)),document.getElementsByTagName("head")[0].appendChild(e),u=n.testDiv.cloneNode(!0),this._testContainer.appendChild(u),document.body.appendChild(this._testContainer),u.style.fontFamily=o,n.useIntervalChecking?(this._testContainer.appendChild(u),this._intervalId=window.setInterval(function(){s._checkAdobeBlankSize()},this._intervalDelay),this._checkAdobeBlankSize()):(this._adobeBlankSizeWatcher=new t(u,{container:this._testContainer,delegate:this,continuous:!0,direction:t.directions.decrease,dimension:t.dimensions.horizontal}),this._adobeBlankSizeWatcher.prepareForWatch(),this._adobeBlankSizeWatcher.beginWatching()),u.style.fontFamily=n.referenceFontFamilies[0]+", "+o;else{for(r=n.testDiv.cloneNode(!0),this._testContainer.appendChild(r),document.body.appendChild(this._testContainer),f=0;f<n.referenceFontFamilies.length;f++)r.style.fontFamily=n.referenceFontFamilies[f],n.referenceFontFamiliesSizes.push(new i(r.offsetWidth,r.offsetHeight));this._testContainer.parentNode.removeChild(this._testContainer);r.parentNode.removeChild(r);this._loadFonts()}},_checkAdobeBlankSize:function(){var n=this._testContainer.firstChild;this._adobeBlankLoaded(n)},_adobeBlankLoaded:function(t){t.offsetWidth===0&&(n.referenceFontFamiliesSizes.push(new i(t.offsetWidth,t.offsetHeight)),this._adobeBlankSizeWatcher!==null?(this._adobeBlankSizeWatcher.endWatching(),this._adobeBlankSizeWatcher.removeScrollWatchers(),this._adobeBlankSizeWatcher=null):(window.clearInterval(this._intervalId),t.parentNode.removeChild(t)),this._testContainer.parentNode.removeChild(this._testContainer),this._loadFonts())},_loadFonts:function(){for(var r,i,f,e=[],o=this,u=0;u<this._numberOfFontFamilies;u++)if(this._fontsMap[this._fontFamiliesArray[u]]=!0,n.useResizeEvent)for(r=0;r<n.referenceFontFamilies.length;r++)i=n.testDiv.cloneNode(!0),i.setAttribute("data-font-family",this._fontFamiliesArray[u]),i.setAttribute("data-ref-font-family-index",String(r)),i.style.fontFamily=n.referenceFontFamilies[r],this._testContainer.appendChild(i);else if(n.useIntervalChecking)for(r=0;r<n.referenceFontFamilies.length;r++)i=n.testDiv.cloneNode(!0),i.setAttribute("data-font-family",this._fontFamiliesArray[u]),i.setAttribute("data-ref-font-family-index",String(r)),i.style.fontFamily="'"+this._fontFamiliesArray[u]+"', "+n.referenceFontFamilies[r],this._testContainer.appendChild(i);else for(r=0;r<n.referenceFontFamilies.length;r++)i=n.testDiv.cloneNode(!0),i.setAttribute("data-font-family",this._fontFamiliesArray[u]),i.setAttribute("data-ref-font-family-index",String(r)),i.style.fontFamily=n.referenceFontFamilies[r],f=new t(i,{container:this._testContainer,delegate:this,size:n.referenceFontFamiliesSizes[r],direction:t.directions.increase,dimension:t.dimensions.horizontal}),e.push(f);if(document.body.appendChild(this._testContainer),n.useResizeEvent){for(r=0;r<this._testContainer.childNodes.length;r++)i=this._testContainer.childNodes[r],i.attachEvent("onresize",function(n,t){return function(){n._elementSizeChanged(t)}}(this,i));window.setTimeout(function(){for(r=0;r<o._testContainer.childNodes.length;r++)i=o._testContainer.childNodes[r],i.style.fontFamily="'"+i.getAttribute("data-font-family")+"', "+n.referenceFontFamilies[i.getAttribute("data-ref-font-family-index")]},0)}else if(n.useIntervalChecking)this._intervalId=window.setInterval(function(){o._checkSizes()},this._intervalDelay),this._checkSizes();else{for(u=0;u<this._numberOfFontFamilies*n.referenceFontFamilies.length;u++)f=e[u],f.prepareForWatch();for(u=0;u<this._numberOfFontFamilies*n.referenceFontFamilies.length;u++)f=e[u],f.beginWatching(),i=f.getWatchedElement(),i.style.fontFamily="'"+i.getAttribute("data-font-family")+"', "+n.referenceFontFamilies[i.getAttribute("data-ref-font-family-index")]}},_checkSizes:function(){for(var t,u,f,r=this._testContainer.childNodes.length-1;r>=0;r--)t=this._testContainer.childNodes[r],u=new i(t.offsetWidth,t.offsetHeight),f=n.referenceFontFamiliesSizes[t.getAttribute("data-ref-font-family-index")],f.isEqual(u)||(t.parentNode.removeChild(t),this._elementSizeChanged(t))},_elementSizeChanged:function(n){var t=n.getAttribute("data-font-family");this._finished||typeof this._fontsMap[t]!="undefined"&&(this._numberOfLoadedFonts++,delete this._fontsMap[t],this.delegate&&typeof this.delegate.fontLoaded=="function"&&this.delegate.fontLoaded(t),this._numberOfLoadedFonts===this._numberOfFontFamilies&&this._finish())},_finish:function(){var n,t,i=[];if(!this._finished){if(this._finished=!0,this._adobeBlankSizeWatcher!==null&&(this._adobeBlankSizeWatcher=null),this._testContainer!==null&&this._testContainer.parentNode.removeChild(this._testContainer),this._timeoutId!==null&&window.clearTimeout(this._timeoutId),this._intervalId!==null&&window.clearInterval(this._intervalId),this._numberOfLoadedFonts<this._numberOfFontFamilies){for(t in this._fontsMap)this._fontsMap.hasOwnProperty(t)&&i.push(t);n={message:"Not all fonts were loaded",notLoadedFontFamilies:i}}else n=null;this.delegate&&typeof this.delegate.fontsLoaded=="function"&&this.delegate.fontsLoaded(n)}},sizeWatcherChangedSize:function(n){var t=n.getWatchedElement();n===this._adobeBlankSizeWatcher?this._adobeBlankLoaded(t):this._elementSizeChanged(t)}},i.prototype.isEqual=function(n){return this.width===n.width&&this.height===n.height},t.states={initialized:0,generatedScrollWatchers:1,appendedScrollWatchers:2,preparedScrollWatchers:3,watchingForSizeChange:4},t.directions={decrease:1,increase:2,both:3},t.dimensions={horizontal:1,vertical:2,both:3},t.prototype={constructor:t,getWatchedElement:function(){return this._element},setSize:function(n){this._size=n;this._direction&t.directions.increase&&(this._sizeIncreaseWatcherContentElm.style.cssText="width: "+(n.width+this._scrollAmount)+"px; height: "+(n.height+this._scrollAmount)+"px;");this._direction&t.directions.decrease&&(this._sizeDecreaseWatcherElm.style.cssText="position:absolute; left: 0px; top: 0px; overflow: hidden; width: "+(n.width-this._scrollAmount)+"px; height: "+(n.height-this._scrollAmount)+"px;")},_generateScrollWatchers:function(n){this._element.style.position="absolute";this._direction&t.directions.increase&&(this._sizeIncreaseWatcherContentElm=document.createElement("div"),this._sizeIncreaseWatcherElm=document.createElement("div"),this._sizeIncreaseWatcherElm.style.cssText="position: absolute; left: 0; top: 0; width: 100%; height: 100%; overflow: hidden;",this._sizeIncreaseWatcherElm.appendChild(this._sizeIncreaseWatcherContentElm),this._element.appendChild(this._sizeIncreaseWatcherElm));this._direction&t.directions.decrease&&(this._sizeDecreaseWatcherElm=document.createElement("div"),this._sizeDecreaseWatcherElm.appendChild(this._element));n&&this.setSize(n);this._state=t.states.generatedScrollWatchers},_appendScrollWatchersToElement:function(n){if(this._state!==t.states.generatedScrollWatchers)throw new Error("SizeWatcher._appendScrollWatchersToElement() was invoked before SizeWatcher._generateScrollWatchers()");this._direction&t.directions.decrease?n.appendChild(this._sizeDecreaseWatcherElm):n.appendChild(this._element);this._state=t.states.appendedScrollWatchers},removeScrollWatchers:function(){this._direction&t.directions.decrease?this._sizeDecreaseWatcherElm.parentNode&&this._sizeDecreaseWatcherElm.parentNode.removeChild(this._sizeDecreaseWatcherElm):this._element.parentNode&&this._element.parentNode.removeChild(this._element)},prepareForWatch:function(){var n,r=!0,u=!0;if(this._state!==t.states.appendedScrollWatchers)throw new Error("SizeWatcher.prepareForWatch() invoked before SizeWatcher._appendScrollWatchersToElement()");if(this._size===null&&this.setSize(new i(this._element.offsetWidth,this._element.offsetHeight)),this._direction&t.directions.decrease&&(r=this._scrollElementToBottomRight(this._sizeDecreaseWatcherElm)),this._direction&t.directions.increase&&(u=this._scrollElementToBottomRight(this._sizeIncreaseWatcherElm)),!r||!u){for(n=this._element.parentNode;n!==window.document&&n!==null;)n=n.parentNode;if(n===null)throw new Error("Can't set scroll position of scroll watchers. SizeWatcher is not in the DOM tree.");else console&&typeof console.warn=="function"&&console.warn("SizeWatcher can't set scroll position of scroll watchers.")}this._state=t.states.preparedScrollWatchers},_scrollElementToBottomRight:function(n){var i=!0;return this._dimension&t.dimensions.vertical&&(n.scrollTop=this._scrollAmount,i=i&&n.scrollTop>0),this._dimension&t.dimensions.horizontal&&(n.scrollLeft=this._scrollAmount,i=i&&n.scrollLeft>0),i},beginWatching:function(){if(this._state!==t.states.preparedScrollWatchers)throw new Error("SizeWatcher.beginWatching() invoked before SizeWatcher.prepareForWatch()");this._direction&t.directions.decrease&&this._sizeDecreaseWatcherElm.addEventListener("scroll",this,!1);this._direction&t.directions.increase&&this._sizeIncreaseWatcherElm.addEventListener("scroll",this,!1);this._state=t.states.watchingForSizeChange},endWatching:function(){if(this._state!==t.states.watchingForSizeChange)throw new Error("SizeWatcher.endWatching() invoked before SizeWatcher.beginWatching()");this._direction&t.directions.decrease&&this._sizeDecreaseWatcherElm.removeEventListener("scroll",this,!1);this._direction&t.directions.increase&&this._sizeIncreaseWatcherElm.removeEventListener("scroll",this,!1);this._state=t.states.appendedScrollWatchers},handleEvent:function(){var n,r;this._state===t.states.watchingForSizeChange&&((n=new i(this._element.offsetWidth,this._element.offsetHeight),r=this._size,r.isEqual(n))||this._delegate&&typeof this._delegate.sizeWatcherChangedSize=="function"&&(this._delegate.sizeWatcherChangedSize(this),this._state!==t.states.watchingForSizeChange)||(this._continuous?(this.setSize(n),this._state=t.states.appendedScrollWatchers,this.prepareForWatch(),this._state=t.states.watchingForSizeChange):this.endWatching()))}},n}),function(n,t){typeof define=="function"&&define.amd?define("jquery-bridget/jquery-bridget",["jquery"],function(i){return t(n,i)}):typeof module=="object"&&module.exports?module.exports=t(n,require("jquery")):n.jQueryBridget=t(n,n.jQuery)}(window,function(n,t){"use strict";function u(i,u,o){function s(n,t,u){var f,e="$()."+i+'("'+t+'")';return n.each(function(n,s){var h=o.data(s,i),c,l;if(!h){r(i+" not initialized. Cannot call methods, i.e. "+e);return}if(c=h[t],!c||t.charAt(0)=="_"){r(e+" is not a valid method");return}l=c.apply(h,u);f=f===undefined?l:f}),f!==undefined?f:n}function h(n,t){n.each(function(n,r){var f=o.data(r,i);f?(f.option(t),f._init()):(f=new u(r,t),o.data(r,i,f))})}(o=o||t||n.jQuery,o)&&(u.prototype.option||(u.prototype.option=function(n){o.isPlainObject(n)&&(this.options=o.extend(!0,this.options,n))}),o.fn[i]=function(n){if(typeof n=="string"){var t=e.call(arguments,1);return s(this,n,t)}return h(this,n),this},f(o))}function f(n){!n||n&&n.bridget||(n.bridget=u)}var e=Array.prototype.slice,i=n.console,r=typeof i=="undefined"?function(){}:function(n){i.error(n)};return f(t||n.jQuery),u}),function(n,t){typeof define=="function"&&define.amd?define("ev-emitter/ev-emitter",t):typeof module=="object"&&module.exports?module.exports=t():n.EvEmitter=t()}(typeof window!="undefined"?window:this,function(){function t(){}var n=t.prototype;return n.on=function(n,t){if(n&&t){var i=this._events=this._events||{},r=i[n]=i[n]||[];return r.indexOf(t)==-1&&r.push(t),this}},n.once=function(n,t){if(n&&t){this.on(n,t);var i=this._onceEvents=this._onceEvents||{},r=i[n]=i[n]||{};return r[t]=!0,this}},n.off=function(n,t){var i=this._events&&this._events[n],r;if(i&&i.length)return r=i.indexOf(t),r!=-1&&i.splice(r,1),this},n.emitEvent=function(n,t){var i=this._events&&this._events[n],u,f,r,e;if(i&&i.length){for(i=i.slice(0),t=t||[],u=this._onceEvents&&this._onceEvents[n],f=0;f<i.length;f++)r=i[f],e=u&&u[r],e&&(this.off(n,r),delete u[r]),r.apply(this,t);return this}},n.allOff=function(){delete this._events;delete this._onceEvents},t}),function(n,t){typeof define=="function"&&define.amd?define("get-size/get-size",t):typeof module=="object"&&module.exports?module.exports=t():n.getSize=t()}(window,function(){"use strict";function n(n){var t=parseFloat(n),i=n.indexOf("%")==-1&&!isNaN(t);return i&&t}function o(){}function h(){for(var i={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},u,n=0;n<r;n++)u=t[n],i[u]=0;return i}function u(n){var t=getComputedStyle(n);return t||s("Style returned "+t+". Are you running this code in a hidden iframe on Firefox? See https://bit.ly/getsizebug1"),t}function c(){var t,r,o;f||(f=!0,t=document.createElement("div"),t.style.width="200px",t.style.padding="1px 2px 3px 4px",t.style.borderStyle="solid",t.style.borderWidth="1px 2px 3px 4px",t.style.boxSizing="border-box",r=document.body||document.documentElement,r.appendChild(t),o=u(t),i=Math.round(n(o.width))==200,e.isBoxSizeOuter=i,r.removeChild(t))}function e(f){var o,e,a,s,l;if(c(),typeof f=="string"&&(f=document.querySelector(f)),f&&typeof f=="object"&&f.nodeType){if(o=u(f),o.display=="none")return h();for(e={},e.width=f.offsetWidth,e.height=f.offsetHeight,a=e.isBorderBox=o.boxSizing=="border-box",s=0;s<r;s++){var v=t[s],nt=o[v],y=parseFloat(nt);e[v]=isNaN(y)?0:y}var p=e.paddingLeft+e.paddingRight,w=e.paddingTop+e.paddingBottom,tt=e.marginLeft+e.marginRight,it=e.marginTop+e.marginBottom,b=e.borderLeftWidth+e.borderRightWidth,k=e.borderTopWidth+e.borderBottomWidth,d=a&&i,g=n(o.width);return g!==!1&&(e.width=g+(d?0:p+b)),l=n(o.height),l!==!1&&(e.height=l+(d?0:w+k)),e.innerWidth=e.width-(p+b),e.innerHeight=e.height-(w+k),e.outerWidth=e.width+tt,e.outerHeight=e.height+it,e}}var s=typeof console=="undefined"?o:function(n){console.error(n)},t=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],r=t.length,f=!1,i;return e}),function(n,t){"use strict";typeof define=="function"&&define.amd?define("desandro-matches-selector/matches-selector",t):typeof module=="object"&&module.exports?module.exports=t():n.matchesSelector=t()}(window,function(){"use strict";var n=function(){var t=window.Element.prototype,i,n,u,r;if(t.matches)return"matches";if(t.matchesSelector)return"matchesSelector";for(i=["webkit","moz","ms","o"],n=0;n<i.length;n++)if(u=i[n],r=u+"MatchesSelector",t[r])return r}();return function(t,i){return t[n](i)}}),function(n,t){typeof define=="function"&&define.amd?define("fizzy-ui-utils/utils",["desandro-matches-selector/matches-selector"],function(i){return t(n,i)}):typeof module=="object"&&module.exports?module.exports=t(n,require("desandro-matches-selector")):n.fizzyUIUtils=t(n,n.matchesSelector)}(window,function(n,t){var i={},u,r;return i.extend=function(n,t){for(var i in t)n[i]=t[i];return n},i.modulo=function(n,t){return(n%t+t)%t},u=Array.prototype.slice,i.makeArray=function(n){if(Array.isArray(n))return n;if(n===null||n===undefined)return[];var t=typeof n=="object"&&typeof n.length=="number";return t?u.call(n):[n]},i.removeFrom=function(n,t){var i=n.indexOf(t);i!=-1&&n.splice(i,1)},i.getParent=function(n,i){while(n.parentNode&&n!=document.body)if(n=n.parentNode,t(n,i))return n},i.getQueryElement=function(n){return typeof n=="string"?document.querySelector(n):n},i.handleEvent=function(n){var t="on"+n.type;this[t]&&this[t](n)},i.filterFindElements=function(n,r){n=i.makeArray(n);var u=[];return n.forEach(function(n){var f,i;if(n instanceof HTMLElement){if(!r){u.push(n);return}for(t(n,r)&&u.push(n),f=n.querySelectorAll(r),i=0;i<f.length;i++)u.push(f[i])}}),u},i.debounceMethod=function(n,t,i){i=i||100;var u=n.prototype[t],r=t+"Timeout";n.prototype[t]=function(){var f=this[r],t,n;clearTimeout(f);t=arguments;n=this;this[r]=setTimeout(function(){u.apply(n,t);delete n[r]},i)}},i.docReady=function(n){var t=document.readyState;t=="complete"||t=="interactive"?setTimeout(n):document.addEventListener("DOMContentLoaded",n)},i.toDashed=function(n){return n.replace(/(.)([A-Z])/g,function(n,t,i){return t+"-"+i}).toLowerCase()},r=n.console,i.htmlInit=function(t,u){i.docReady(function(){var e=i.toDashed(u),f="data-"+e,s=document.querySelectorAll("["+f+"]"),h=document.querySelectorAll(".js-"+e),c=i.makeArray(s).concat(i.makeArray(h)),l=f+"-options",o=n.jQuery;c.forEach(function(n){var i=n.getAttribute(f)||n.getAttribute(l),e,s;try{e=i&&JSON.parse(i)}catch(h){r&&r.error("Error parsing "+f+" on "+n.className+": "+h);return}s=new t(n,e);o&&o.data(n,u,s)})})},i}),function(n,t){typeof define=="function"&&define.amd?define("flickity/js/cell",["get-size/get-size"],function(i){return t(n,i)}):typeof module=="object"&&module.exports?module.exports=t(n,require("get-size")):(n.Flickity=n.Flickity||{},n.Flickity.Cell=t(n,n.getSize))}(window,function(n,t){function r(n,t){this.element=n;this.parent=t;this.create()}var i=r.prototype;return i.create=function(){this.element.style.position="absolute";this.element.setAttribute("aria-hidden","true");this.x=0;this.shift=0},i.destroy=function(){this.unselect();this.element.style.position="";var n=this.parent.originSide;this.element.style[n]=""},i.getSize=function(){this.size=t(this.element)},i.setPosition=function(n){this.x=n;this.updateTarget();this.renderPosition(n)},i.updateTarget=i.setDefaultTarget=function(){var n=this.parent.originSide=="left"?"marginLeft":"marginRight";this.target=this.x+this.size[n]+this.size.width*this.parent.cellAlign},i.renderPosition=function(n){var t=this.parent.originSide;this.element.style[t]=this.parent.getPositionValue(n)},i.select=function(){this.element.classList.add("is-selected");this.element.removeAttribute("aria-hidden")},i.unselect=function(){this.element.classList.remove("is-selected");this.element.setAttribute("aria-hidden","true")},i.wrapShift=function(n){this.shift=n;this.renderPosition(this.x+this.parent.slideableWidth*n)},i.remove=function(){this.element.parentNode.removeChild(this.element)},r}),function(n,t){typeof define=="function"&&define.amd?define("flickity/js/slide",t):typeof module=="object"&&module.exports?module.exports=t():(n.Flickity=n.Flickity||{},n.Flickity.Slide=t())}(window,function(){"use strict";function t(n){this.parent=n;this.isOriginLeft=n.originSide=="left";this.cells=[];this.outerWidth=0;this.height=0}var n=t.prototype;return n.addCell=function(n){if(this.cells.push(n),this.outerWidth+=n.size.outerWidth,this.height=Math.max(n.size.outerHeight,this.height),this.cells.length==1){this.x=n.x;var t=this.isOriginLeft?"marginLeft":"marginRight";this.firstMargin=n.size[t]}},n.updateTarget=function(){var t=this.isOriginLeft?"marginRight":"marginLeft",n=this.getLastCell(),i=n?n.size[t]:0,r=this.outerWidth-(this.firstMargin+i);this.target=this.x+this.firstMargin+r*this.parent.cellAlign},n.getLastCell=function(){return this.cells[this.cells.length-1]},n.select=function(){this.cells.forEach(function(n){n.select()})},n.unselect=function(){this.cells.forEach(function(n){n.unselect()})},n.getCellElements=function(){return this.cells.map(function(n){return n.element})},t}),function(n,t){typeof define=="function"&&define.amd?define("flickity/js/animate",["fizzy-ui-utils/utils"],function(i){return t(n,i)}):typeof module=="object"&&module.exports?module.exports=t(n,require("fizzy-ui-utils")):(n.Flickity=n.Flickity||{},n.Flickity.animatePrototype=t(n,n.fizzyUIUtils))}(window,function(n,t){var i={};return i.startAnimation=function(){this.isAnimating||(this.isAnimating=!0,this.restingFrames=0,this.animate())},i.animate=function(){var n,t;this.applyDragForce();this.applySelectedAttraction();n=this.x;this.integratePhysics();this.positionSlider();this.settle(n);this.isAnimating&&(t=this,requestAnimationFrame(function(){t.animate()}))},i.positionSlider=function(){var n=this.x;this.options.wrapAround&&this.cells.length>1&&(n=t.modulo(n,this.slideableWidth),n=n-this.slideableWidth,this.shiftWrapCells(n));this.setTranslateX(n,this.isAnimating);this.dispatchScrollEvent()},i.setTranslateX=function(n,t){n+=this.cursorPosition;n=this.options.rightToLeft?-n:n;var i=this.getPositionValue(n);this.slider.style.transform=t?"translate3d("+i+",0,0)":"translateX("+i+")"},i.dispatchScrollEvent=function(){var t=this.slides[0],n,i;t&&(n=-this.x-t.target,i=n/this.slidesWidth,this.dispatchEvent("scroll",null,[i,n]))},i.positionSliderAtSelected=function(){this.cells.length&&(this.x=-this.selectedSlide.target,this.velocity=0,this.positionSlider())},i.getPositionValue=function(n){return this.options.percentPosition?Math.round(n/this.size.innerWidth*1e4)*.01+"%":Math.round(n)+"px"},i.settle=function(n){this.isPointerDown||Math.round(this.x*100)!=Math.round(n*100)||this.restingFrames++;this.restingFrames>2&&(this.isAnimating=!1,delete this.isFreeScrolling,this.positionSlider(),this.dispatchEvent("settle",null,[this.selectedIndex]))},i.shiftWrapCells=function(n){var i=this.cursorPosition+n,t;this._shiftCells(this.beforeShiftCells,i,-1);t=this.size.innerWidth-(n+this.slideableWidth+this.cursorPosition);this._shiftCells(this.afterShiftCells,t,1)},i._shiftCells=function(n,t,i){for(var u,f,r=0;r<n.length;r++)u=n[r],f=t>0?i:0,u.wrapShift(f),t-=u.size.outerWidth},i._unshiftCells=function(n){if(n&&n.length)for(var t=0;t<n.length;t++)n[t].wrapShift(0)},i.integratePhysics=function(){this.x+=this.velocity;this.velocity*=this.getFrictionFactor()},i.applyForce=function(n){this.velocity+=n},i.getFrictionFactor=function(){return 1-this.options[this.isFreeScrolling?"freeScrollFriction":"friction"]},i.getRestingPosition=function(){return this.x+this.velocity/(1-this.getFrictionFactor())},i.applyDragForce=function(){if(this.isDraggable&&this.isPointerDown){var n=this.dragX-this.x,t=n-this.velocity;this.applyForce(t)}},i.applySelectedAttraction=function(){var i=this.isDraggable&&this.isPointerDown,n,t;i||this.isFreeScrolling||!this.slides.length||(n=this.selectedSlide.target*-1-this.x,t=n*this.options.selectedAttraction,this.applyForce(t))},i}),function(n,t){if(typeof define=="function"&&define.amd)define("flickity/js/flickity",["ev-emitter/ev-emitter","get-size/get-size","fizzy-ui-utils/utils","./cell","./slide","./animate"],function(i,r,u,f,e,o){return t(n,i,r,u,f,e,o)});else if(typeof module=="object"&&module.exports)module.exports=t(n,require("ev-emitter"),require("get-size"),require("fizzy-ui-utils"),require("./cell"),require("./slide"),require("./animate"));else{var i=n.Flickity;n.Flickity=t(n,n.EvEmitter,n.getSize,n.fizzyUIUtils,i.Cell,i.Slide,i.animatePrototype)}}(window,function(n,t,i,r,u,f,e){function a(n,t){for(n=r.makeArray(n);n.length;)t.appendChild(n.shift())}function s(n,t){var i=r.getQueryElement(n),u;if(!i){l&&l.error("Bad element for Flickity: "+(i||n));return}if(this.element=i,this.element.flickityGUID)return u=c[this.element.flickityGUID],u.option(t),u;h&&(this.$element=h(this.element));this.options=r.extend({},this.constructor.defaults);this.option(t);this._create()}var h=n.jQuery,y=n.getComputedStyle,l=n.console,p=0,c={},o,v;return s.defaults={accessibility:!0,cellAlign:"center",freeScrollFriction:.075,friction:.28,namespaceJQueryEvents:!0,percentPosition:!0,resize:!0,selectedAttraction:.025,setGallerySize:!0},s.createMethods=[],o=s.prototype,r.extend(o,t.prototype),o._create=function(){var i=this.guid=++p,t,r;this.element.flickityGUID=i;c[i]=this;this.selectedIndex=0;this.restingFrames=0;this.x=0;this.velocity=0;this.originSide=this.options.rightToLeft?"right":"left";this.viewport=document.createElement("div");this.viewport.className="flickity-viewport";this._createSlider();(this.options.resize||this.options.watchCSS)&&n.addEventListener("resize",this);for(t in this.options.on){r=this.options.on[t];this.on(t,r)}s.createMethods.forEach(function(n){this[n]()},this);this.options.watchCSS?this.watchCSS():this.activate()},o.option=function(n){r.extend(this.options,n)},o.activate=function(){if(!this.isActive){this.isActive=!0;this.element.classList.add("flickity-enabled");this.options.rightToLeft&&this.element.classList.add("flickity-rtl");this.getSize();var n=this._filterFindCellElements(this.element.children);a(n,this.slider);this.viewport.appendChild(this.slider);this.element.appendChild(this.viewport);this.reloadCells();this.options.accessibility&&(this.element.tabIndex=0,this.element.addEventListener("keydown",this));this.emitEvent("activate");this.selectInitialIndex();this.isInitActivated=!0;this.dispatchEvent("ready")}},o._createSlider=function(){var n=document.createElement("div");n.className="flickity-slider";n.style[this.originSide]=0;this.slider=n},o._filterFindCellElements=function(n){return r.filterFindElements(n,this.options.cellSelector)},o.reloadCells=function(){this.cells=this._makeCells(this.slider.children);this.positionCells();this._getWrapShiftCells();this.setGallerySize()},o._makeCells=function(n){var t=this._filterFindCellElements(n);return t.map(function(n){return new u(n,this)},this)},o.getLastCell=function(){return this.cells[this.cells.length-1]},o.getLastSlide=function(){return this.slides[this.slides.length-1]},o.positionCells=function(){this._sizeCells(this.cells);this._positionCells(0)},o._positionCells=function(n){var t,u,f,i,r;for(n=n||0,this.maxCellHeight=n?this.maxCellHeight||0:0,t=0,n>0&&(u=this.cells[n-1],t=u.x+u.size.outerWidth),f=this.cells.length,i=n;i<f;i++)r=this.cells[i],r.setPosition(t),t+=r.size.outerWidth,this.maxCellHeight=Math.max(r.size.outerHeight,this.maxCellHeight);this.slideableWidth=t;this.updateSlides();this._containSlides();this.slidesWidth=f?this.getLastSlide().target-this.slides[0].target:0},o._sizeCells=function(n){n.forEach(function(n){n.getSize()})},o.updateSlides=function(){var n;if(this.slides=[],this.cells.length){n=new f(this);this.slides.push(n);var t=this.originSide=="left",i=t?"marginRight":"marginLeft",r=this._getCanCellFit();this.cells.forEach(function(t,u){if(!n.cells.length){n.addCell(t);return}var e=n.outerWidth-n.firstMargin+(t.size.outerWidth-t.size[i]);r.call(this,u,e)?n.addCell(t):(n.updateTarget(),n=new f(this),this.slides.push(n),n.addCell(t))},this);n.updateTarget();this.updateSelectedSlide()}},o._getCanCellFit=function(){var n=this.options.groupCells,i,t,r;if(n){if(typeof n=="number")return i=parseInt(n,10),function(n){return n%i!=0}}else return function(){return!1};return t=typeof n=="string"&&n.match(/^(\d+)%$/),r=t?parseInt(t[1],10)/100:1,function(n,t){return t<=(this.size.innerWidth+1)*r}},o._init=o.reposition=function(){this.positionCells();this.positionSliderAtSelected()},o.getSize=function(){this.size=i(this.element);this.setCellAlign();this.cursorPosition=this.size.innerWidth*this.cellAlign},v={center:{left:.5,right:.5},left:{left:0,right:1},right:{right:0,left:1}},o.setCellAlign=function(){var n=v[this.options.cellAlign];this.cellAlign=n?n[this.originSide]:this.options.cellAlign},o.setGallerySize=function(){if(this.options.setGallerySize){var n=this.options.adaptiveHeight&&this.selectedSlide?this.selectedSlide.height:this.maxCellHeight;this.viewport.style.height=n+"px"}},o._getWrapShiftCells=function(){if(this.options.wrapAround){this._unshiftCells(this.beforeShiftCells);this._unshiftCells(this.afterShiftCells);var n=this.cursorPosition,t=this.cells.length-1;this.beforeShiftCells=this._getGapCells(n,t,-1);n=this.size.innerWidth-this.cursorPosition;this.afterShiftCells=this._getGapCells(n,0,1)}},o._getGapCells=function(n,t,i){for(var u=[],r;n>0;){if(r=this.cells[t],!r)break;u.push(r);t+=i;n-=r.size.outerWidth}return u},o._containSlides=function(){if(this.options.contain&&!this.options.wrapAround&&this.cells.length){var t=this.options.rightToLeft,i=t?"marginRight":"marginLeft",r=t?"marginLeft":"marginRight",n=this.slideableWidth-this.getLastCell().size[r],u=n<this.size.innerWidth,f=this.cursorPosition+this.cells[0].size[i],e=n-this.size.innerWidth*(1-this.cellAlign);this.slides.forEach(function(t){u?t.target=n*this.cellAlign:(t.target=Math.max(t.target,f),t.target=Math.min(t.target,e))},this)}},o.dispatchEvent=function(n,t,i){var f=t?[t].concat(i):i,r,u;this.emitEvent(n,f);h&&this.$element&&(n+=this.options.namespaceJQueryEvents?".flickity":"",r=n,t&&(u=h.Event(t),u.type=n,r=u),this.$element.trigger(r,i))},o.select=function(n,t,i){if(this.isActive&&(n=parseInt(n,10),this._wrapSelect(n),(this.options.wrapAround||t)&&(n=r.modulo(n,this.slides.length)),this.slides[n])){var u=this.selectedIndex;this.selectedIndex=n;this.updateSelectedSlide();i?this.positionSliderAtSelected():this.startAnimation();this.options.adaptiveHeight&&this.setGallerySize();this.dispatchEvent("select",null,[n]);n!=u&&this.dispatchEvent("change",null,[n]);this.dispatchEvent("cellSelect")}},o._wrapSelect=function(n){var t=this.slides.length,f=this.options.wrapAround&&t>1;if(!f)return n;var i=r.modulo(n,t),u=Math.abs(i-this.selectedIndex),e=Math.abs(i+t-this.selectedIndex),o=Math.abs(i-t-this.selectedIndex);!this.isDragSelect&&e<u?n+=t:!this.isDragSelect&&o<u&&(n-=t);n<0?this.x-=this.slideableWidth:n>=t&&(this.x+=this.slideableWidth)},o.previous=function(n,t){this.select(this.selectedIndex-1,n,t)},o.next=function(n,t){this.select(this.selectedIndex+1,n,t)},o.updateSelectedSlide=function(){var n=this.slides[this.selectedIndex];n&&(this.unselectSelectedSlide(),this.selectedSlide=n,n.select(),this.selectedCells=n.cells,this.selectedElements=n.getCellElements(),this.selectedCell=n.cells[0],this.selectedElement=this.selectedElements[0])},o.unselectSelectedSlide=function(){this.selectedSlide&&this.selectedSlide.unselect()},o.selectInitialIndex=function(){var n=this.options.initialIndex,i,t;if(this.isInitActivated){this.select(this.selectedIndex,!1,!0);return}if(n&&typeof n=="string"&&(i=this.queryCell(n),i)){this.selectCell(n,!1,!0);return}t=0;n&&this.slides[n]&&(t=n);this.select(t,!1,!0)},o.selectCell=function(n,t,i){var r=this.queryCell(n),u;r&&(u=this.getCellSlideIndex(r),this.select(u,t,i))},o.getCellSlideIndex=function(n){for(var i,r,t=0;t<this.slides.length;t++)if(i=this.slides[t],r=i.cells.indexOf(n),r!=-1)return t},o.getCell=function(n){for(var i,t=0;t<this.cells.length;t++)if(i=this.cells[t],i.element==n)return i},o.getCells=function(n){n=r.makeArray(n);var t=[];return n.forEach(function(n){var i=this.getCell(n);i&&t.push(i)},this),t},o.getCellElements=function(){return this.cells.map(function(n){return n.element})},o.getParentCell=function(n){var t=this.getCell(n);return t?t:(n=r.getParent(n,".flickity-slider > *"),this.getCell(n))},o.getAdjacentCellElements=function(n,t){var f,u,i,o,e;if(!n)return this.selectedSlide.getCellElements();if(t=t===undefined?this.selectedIndex:t,f=this.slides.length,1+n*2>=f)return this.getCellElements();for(u=[],i=t-n;i<=t+n;i++)o=this.options.wrapAround?r.modulo(i,f):i,e=this.slides[o],e&&(u=u.concat(e.getCellElements()));return u},o.queryCell=function(n){if(typeof n=="number")return this.cells[n];if(typeof n=="string"){if(n.match(/^[#\.]?[\d\/]/))return;n=this.element.querySelector(n)}return this.getCell(n)},o.uiChange=function(){this.emitEvent("uiChange")},o.childUIPointerDown=function(n){n.type!="touchstart"&&n.preventDefault();this.focus()},o.onresize=function(){this.watchCSS();this.resize()},r.debounceMethod(s,"onresize",150),o.resize=function(){if(this.isActive){this.getSize();this.options.wrapAround&&(this.x=r.modulo(this.x,this.slideableWidth));this.positionCells();this._getWrapShiftCells();this.setGallerySize();this.emitEvent("resize");var n=this.selectedElements&&this.selectedElements[0];this.selectCell(n,!1,!0)}},o.watchCSS=function(){var t=this.options.watchCSS,n;t&&(n=y(this.element,":after").content,n.indexOf("flickity")!=-1?this.activate():this.deactivate())},o.onkeydown=function(n){var i=document.activeElement&&document.activeElement!=this.element,t;this.options.accessibility&&!i&&(t=s.keyboardHandlers[n.keyCode],t&&t.call(this))},s.keyboardHandlers={37:function(){var n=this.options.rightToLeft?"next":"previous";this.uiChange();this[n]()},39:function(){var n=this.options.rightToLeft?"previous":"next";this.uiChange();this[n]()}},o.focus=function(){var t=n.pageYOffset;this.element.focus({preventScroll:!0});n.pageYOffset!=t&&n.scrollTo(n.pageXOffset,t)},o.deactivate=function(){this.isActive&&(this.element.classList.remove("flickity-enabled"),this.element.classList.remove("flickity-rtl"),this.unselectSelectedSlide(),this.cells.forEach(function(n){n.destroy()}),this.element.removeChild(this.viewport),a(this.slider.children,this.element),this.options.accessibility&&(this.element.removeAttribute("tabIndex"),this.element.removeEventListener("keydown",this)),this.isActive=!1,this.emitEvent("deactivate"))},o.destroy=function(){this.deactivate();n.removeEventListener("resize",this);this.allOff();this.emitEvent("destroy");h&&this.$element&&h.removeData(this.element,"flickity");delete this.element.flickityGUID;delete c[this.guid]},r.extend(o,e),s.data=function(n){n=r.getQueryElement(n);var t=n&&n.flickityGUID;return t&&c[t]},r.htmlInit(s,"flickity"),h&&h.bridget&&h.bridget("flickity",s),s.setJQuery=function(n){h=n},s.Cell=u,s.Slide=f,s}),function(n,t){typeof define=="function"&&define.amd?define("unipointer/unipointer",["ev-emitter/ev-emitter"],function(i){return t(n,i)}):typeof module=="object"&&module.exports?module.exports=t(n,require("ev-emitter")):n.Unipointer=t(n,n.EvEmitter)}(window,function(n,t){function f(){}function r(){}var i=r.prototype=Object.create(t.prototype),u;return i.bindStartEvent=function(n){this._bindStartEvent(n,!0)},i.unbindStartEvent=function(n){this._bindStartEvent(n,!1)},i._bindStartEvent=function(t,i){i=i===undefined?!0:i;var u=i?"addEventListener":"removeEventListener",r="mousedown";n.PointerEvent?r="pointerdown":"ontouchstart"in n&&(r="touchstart");t[u](r,this)},i.handleEvent=function(n){var t="on"+n.type;this[t]&&this[t](n)},i.getTouch=function(n){for(var i,t=0;t<n.length;t++)if(i=n[t],i.identifier==this.pointerIdentifier)return i},i.onmousedown=function(n){var t=n.button;t&&t!==0&&t!==1||this._pointerDown(n,n)},i.ontouchstart=function(n){this._pointerDown(n,n.changedTouches[0])},i.onpointerdown=function(n){this._pointerDown(n,n)},i._pointerDown=function(n,t){n.button||this.isPointerDown||(this.isPointerDown=!0,this.pointerIdentifier=t.pointerId!==undefined?t.pointerId:t.identifier,this.pointerDown(n,t))},i.pointerDown=function(n,t){this._bindPostStartEvents(n);this.emitEvent("pointerDown",[n,t])},u={mousedown:["mousemove","mouseup"],touchstart:["touchmove","touchend","touchcancel"],pointerdown:["pointermove","pointerup","pointercancel"]},i._bindPostStartEvents=function(t){if(t){var i=u[t.type];i.forEach(function(t){n.addEventListener(t,this)},this);this._boundPointerEvents=i}},i._unbindPostStartEvents=function(){this._boundPointerEvents&&(this._boundPointerEvents.forEach(function(t){n.removeEventListener(t,this)},this),delete this._boundPointerEvents)},i.onmousemove=function(n){this._pointerMove(n,n)},i.onpointermove=function(n){n.pointerId==this.pointerIdentifier&&this._pointerMove(n,n)},i.ontouchmove=function(n){var t=this.getTouch(n.changedTouches);t&&this._pointerMove(n,t)},i._pointerMove=function(n,t){this.pointerMove(n,t)},i.pointerMove=function(n,t){this.emitEvent("pointerMove",[n,t])},i.onmouseup=function(n){this._pointerUp(n,n)},i.onpointerup=function(n){n.pointerId==this.pointerIdentifier&&this._pointerUp(n,n)},i.ontouchend=function(n){var t=this.getTouch(n.changedTouches);t&&this._pointerUp(n,t)},i._pointerUp=function(n,t){this._pointerDone();this.pointerUp(n,t)},i.pointerUp=function(n,t){this.emitEvent("pointerUp",[n,t])},i._pointerDone=function(){this._pointerReset();this._unbindPostStartEvents();this.pointerDone()},i._pointerReset=function(){this.isPointerDown=!1;delete this.pointerIdentifier},i.pointerDone=f,i.onpointercancel=function(n){n.pointerId==this.pointerIdentifier&&this._pointerCancel(n,n)},i.ontouchcancel=function(n){var t=this.getTouch(n.changedTouches);t&&this._pointerCancel(n,t)},i._pointerCancel=function(n,t){this._pointerDone();this.pointerCancel(n,t)},i.pointerCancel=function(n,t){this.emitEvent("pointerCancel",[n,t])},r.getPointerPoint=function(n){return{x:n.pageX,y:n.pageY}},r}),function(n,t){typeof define=="function"&&define.amd?define("unidragger/unidragger",["unipointer/unipointer"],function(i){return t(n,i)}):typeof module=="object"&&module.exports?module.exports=t(n,require("unipointer")):n.Unidragger=t(n,n.Unipointer)}(window,function(n,t){function r(){}var i=r.prototype=Object.create(t.prototype),u,f;return i.bindHandles=function(){this._bindHandles(!0)},i.unbindHandles=function(){this._bindHandles(!1)},i._bindHandles=function(t){var u,f,i,r;for(t=t===undefined?!0:t,u=t?"addEventListener":"removeEventListener",f=t?this._touchActionValue:"",i=0;i<this.handles.length;i++)r=this.handles[i],this._bindStartEvent(r,t),r[u]("click",this),n.PointerEvent&&(r.style.touchAction=f)},i._touchActionValue="none",i.pointerDown=function(n,t){var i=this.okayPointerDown(n);i&&(this.pointerDownPointer=t,n.preventDefault(),this.pointerDownBlur(),this._bindPostStartEvents(n),this.emitEvent("pointerDown",[n,t]))},u={TEXTAREA:!0,INPUT:!0,SELECT:!0,OPTION:!0},f={radio:!0,checkbox:!0,button:!0,submit:!0,image:!0,file:!0},i.okayPointerDown=function(n){var i=u[n.target.nodeName],r=f[n.target.type],t=!i||r;return t||this._pointerReset(),t},i.pointerDownBlur=function(){var n=document.activeElement,t=n&&n.blur&&n!=document.body;t&&n.blur()},i.pointerMove=function(n,t){var i=this._dragPointerMove(n,t);this.emitEvent("pointerMove",[n,t,i]);this._dragMove(n,t,i)},i._dragPointerMove=function(n,t){var i={x:t.pageX-this.pointerDownPointer.pageX,y:t.pageY-this.pointerDownPointer.pageY};return!this.isDragging&&this.hasDragStarted(i)&&this._dragStart(n,t),i},i.hasDragStarted=function(n){return Math.abs(n.x)>3||Math.abs(n.y)>3},i.pointerUp=function(n,t){this.emitEvent("pointerUp",[n,t]);this._dragPointerUp(n,t)},i._dragPointerUp=function(n,t){this.isDragging?this._dragEnd(n,t):this._staticClick(n,t)},i._dragStart=function(n,t){this.isDragging=!0;this.isPreventingClicks=!0;this.dragStart(n,t)},i.dragStart=function(n,t){this.emitEvent("dragStart",[n,t])},i._dragMove=function(n,t,i){this.isDragging&&this.dragMove(n,t,i)},i.dragMove=function(n,t,i){n.preventDefault();this.emitEvent("dragMove",[n,t,i])},i._dragEnd=function(n,t){this.isDragging=!1;setTimeout(function(){delete this.isPreventingClicks}.bind(this));this.dragEnd(n,t)},i.dragEnd=function(n,t){this.emitEvent("dragEnd",[n,t])},i.onclick=function(n){this.isPreventingClicks&&n.preventDefault()},i._staticClick=function(n,t){this.isIgnoringMouseUp&&n.type=="mouseup"||(this.staticClick(n,t),n.type!="mouseup"&&(this.isIgnoringMouseUp=!0,setTimeout(function(){delete this.isIgnoringMouseUp}.bind(this),400)))},i.staticClick=function(n,t){this.emitEvent("staticClick",[n,t])},r.getPointerPoint=t.getPointerPoint,r}),function(n,t){typeof define=="function"&&define.amd?define("flickity/js/drag",["./flickity","unidragger/unidragger","fizzy-ui-utils/utils"],function(i,r,u){return t(n,i,r,u)}):typeof module=="object"&&module.exports?module.exports=t(n,require("./flickity"),require("unidragger"),require("fizzy-ui-utils")):n.Flickity=t(n,n.Flickity,n.Unidragger,n.fizzyUIUtils)}(window,function(n,t,i,r){function s(){return{x:n.pageXOffset,y:n.pageYOffset}}var u,o,f,e;return r.extend(t.defaults,{draggable:">1",dragThreshold:3}),t.createMethods.push("_createDrag"),u=t.prototype,r.extend(u,i.prototype),u._touchActionValue="pan-y",o="createTouch"in document,f=!1,u._createDrag=function(){this.on("activate",this.onActivateDrag);this.on("uiChange",this._uiChangeDrag);this.on("deactivate",this.onDeactivateDrag);this.on("cellChange",this.updateDraggable);o&&!f&&(n.addEventListener("touchmove",function(){}),f=!0)},u.onActivateDrag=function(){this.handles=[this.viewport];this.bindHandles();this.updateDraggable()},u.onDeactivateDrag=function(){this.unbindHandles();this.element.classList.remove("is-draggable")},u.updateDraggable=function(){this.isDraggable=this.options.draggable==">1"?this.slides.length>1:this.options.draggable;this.isDraggable?this.element.classList.add("is-draggable"):this.element.classList.remove("is-draggable")},u.bindDrag=function(){this.options.draggable=!0;this.updateDraggable()},u.unbindDrag=function(){this.options.draggable=!1;this.updateDraggable()},u._uiChangeDrag=function(){delete this.isFreeScrolling},u.pointerDown=function(t,i){if(!this.isDraggable){this._pointerDownDefault(t,i);return}var r=this.okayPointerDown(t);r&&(this._pointerDownPreventDefault(t),this.pointerDownFocus(t),document.activeElement!=this.element&&this.pointerDownBlur(),this.dragX=this.x,this.viewport.classList.add("is-pointer-down"),this.pointerDownScroll=s(),n.addEventListener("scroll",this),this._pointerDownDefault(t,i))},u._pointerDownDefault=function(n,t){this.pointerDownPointer={pageX:t.pageX,pageY:t.pageY};this._bindPostStartEvents(n);this.dispatchEvent("pointerDown",n,[t])},e={INPUT:!0,TEXTAREA:!0,SELECT:!0},u.pointerDownFocus=function(n){var t=e[n.target.nodeName];t||this.focus()},u._pointerDownPreventDefault=function(n){var t=n.type=="touchstart",i=n.pointerType=="touch",r=e[n.target.nodeName];t||i||r||n.preventDefault()},u.hasDragStarted=function(n){return Math.abs(n.x)>this.options.dragThreshold},u.pointerUp=function(n,t){delete this.isTouchScrolling;this.viewport.classList.remove("is-pointer-down");this.dispatchEvent("pointerUp",n,[t]);this._dragPointerUp(n,t)},u.pointerDone=function(){n.removeEventListener("scroll",this);delete this.pointerDownScroll},u.dragStart=function(t,i){this.isDraggable&&(this.dragStartPosition=this.x,this.startAnimation(),n.removeEventListener("scroll",this),this.dispatchEvent("dragStart",t,[i]))},u.pointerMove=function(n,t){var i=this._dragPointerMove(n,t);this.dispatchEvent("pointerMove",n,[t,i]);this._dragMove(n,t,i)},u.dragMove=function(n,t,i){var e,r,u,f;this.isDraggable&&(n.preventDefault(),this.previousDragX=this.dragX,e=this.options.rightToLeft?-1:1,this.options.wrapAround&&(i.x=i.x%this.slideableWidth),r=this.dragStartPosition+i.x*e,!this.options.wrapAround&&this.slides.length&&(u=Math.max(-this.slides[0].target,this.dragStartPosition),r=r>u?(r+u)*.5:r,f=Math.min(-this.getLastSlide().target,this.dragStartPosition),r=r<f?(r+f)*.5:r),this.dragX=r,this.dragMoveTime=new Date,this.dispatchEvent("dragMove",n,[t,i]))},u.dragEnd=function(n,t){var i,r;this.isDraggable&&(this.options.freeScroll&&(this.isFreeScrolling=!0),i=this.dragEndRestingSelect(),this.options.freeScroll&&!this.options.wrapAround?(r=this.getRestingPosition(),this.isFreeScrolling=-r>this.slides[0].target&&-r<this.getLastSlide().target):this.options.freeScroll||i!=this.selectedIndex||(i+=this.dragEndBoostSelect()),delete this.previousDragX,this.isDragSelect=this.options.wrapAround,this.select(i),delete this.isDragSelect,this.dispatchEvent("dragEnd",n,[t]))},u.dragEndRestingSelect=function(){var n=this.getRestingPosition(),t=Math.abs(this.getSlideDistance(-n,this.selectedIndex)),i=this._getClosestResting(n,t,1),r=this._getClosestResting(n,t,-1);return i.distance<r.distance?i.index:r.index},u._getClosestResting=function(n,t,i){for(var r=this.selectedIndex,u=Infinity,f=this.options.contain&&!this.options.wrapAround?function(n,t){return n<=t}:function(n,t){return n<t};f(t,u);){if(r+=i,u=t,t=this.getSlideDistance(-n,r),t===null)break;t=Math.abs(t)}return{distance:u,index:r-i}},u.getSlideDistance=function(n,t){var i=this.slides.length,u=this.options.wrapAround&&i>1,o=u?r.modulo(t,i):t,f=this.slides[o],e;return f?(e=u?this.slideableWidth*Math.floor(t/i):0,n-(f.target+e)):null},u.dragEndBoostSelect=function(){if(this.previousDragX===undefined||!this.dragMoveTime||new Date-this.dragMoveTime>100)return 0;var n=this.getSlideDistance(-this.dragX,this.selectedIndex),t=this.previousDragX-this.dragX;return n>0&&t>0?1:n<0&&t<0?-1:0},u.staticClick=function(n,t){var i=this.getParentCell(n.target),r=i&&i.element,u=i&&this.cells.indexOf(i);this.dispatchEvent("staticClick",n,[t,r,u])},u.onscroll=function(){var n=s(),t=this.pointerDownScroll.x-n.x,i=this.pointerDownScroll.y-n.y;(Math.abs(t)>3||Math.abs(i)>3)&&this._pointerDone()},t}),function(n,t){typeof define=="function"&&define.amd?define("flickity/js/prev-next-button",["./flickity","unipointer/unipointer","fizzy-ui-utils/utils"],function(i,r,u){return t(n,i,r,u)}):typeof module=="object"&&module.exports?module.exports=t(n,require("./flickity"),require("unipointer"),require("fizzy-ui-utils")):t(n,n.Flickity,n.Unipointer,n.fizzyUIUtils)}(window,function(n,t,i,r){"use strict";function u(n,t){this.direction=n;this.parent=t;this._create()}function o(n){return typeof n=="string"?n:"M "+n.x0+",50 L "+n.x1+","+(n.y1+50)+" L "+n.x2+","+(n.y2+50)+" L "+n.x3+",50  L "+n.x2+","+(50-n.y2)+" L "+n.x1+","+(50-n.y1)+" Z"}var e="http://www.w3.org/2000/svg",f;return u.prototype=Object.create(i.prototype),u.prototype._create=function(){var t,n,i;this.isEnabled=!0;this.isPrevious=this.direction==-1;t=this.parent.options.rightToLeft?1:-1;this.isLeft=this.direction==t;n=this.element=document.createElement("button");n.className="flickity-button flickity-prev-next-button";n.className+=this.isPrevious?" previous":" next";n.setAttribute("type","button");this.disable();n.setAttribute("aria-label",this.isPrevious?"Previous":"Next");i=this.createSVG();n.appendChild(i);this.parent.on("select",this.update.bind(this));this.on("pointerDown",this.parent.childUIPointerDown.bind(this.parent))},u.prototype.activate=function(){this.bindStartEvent(this.element);this.element.addEventListener("click",this);this.parent.element.appendChild(this.element)},u.prototype.deactivate=function(){this.parent.element.removeChild(this.element);this.unbindStartEvent(this.element);this.element.removeEventListener("click",this)},u.prototype.createSVG=function(){var t=document.createElementNS(e,"svg"),n,i;return t.setAttribute("class","flickity-button-icon"),t.setAttribute("viewBox","0 0 100 100"),n=document.createElementNS(e,"path"),i=o(this.parent.options.arrowShape),n.setAttribute("d",i),n.setAttribute("class","arrow"),this.isLeft||n.setAttribute("transform","translate(100, 100) rotate(180) "),t.appendChild(n),t},u.prototype.handleEvent=r.handleEvent,u.prototype.onclick=function(){if(this.isEnabled){this.parent.uiChange();var n=this.isPrevious?"previous":"next";this.parent[n]()}},u.prototype.enable=function(){this.isEnabled||(this.element.disabled=!1,this.isEnabled=!0)},u.prototype.disable=function(){this.isEnabled&&(this.element.disabled=!0,this.isEnabled=!1)},u.prototype.update=function(){var n=this.parent.slides;if(this.parent.options.wrapAround&&n.length>1){this.enable();return}var t=n.length?n.length-1:0,i=this.isPrevious?0:t,r=this.parent.selectedIndex==i?"disable":"enable";this[r]()},u.prototype.destroy=function(){this.deactivate();this.allOff()},r.extend(t.defaults,{prevNextButtons:!0,arrowShape:{x0:10,x1:60,y1:50,x2:70,y2:40,x3:30}}),t.createMethods.push("_createPrevNextButtons"),f=t.prototype,f._createPrevNextButtons=function(){if(this.options.prevNextButtons){this.prevButton=new u(-1,this);this.nextButton=new u(1,this);this.on("activate",this.activatePrevNextButtons)}},f.activatePrevNextButtons=function(){this.prevButton.activate();this.nextButton.activate();this.on("deactivate",this.deactivatePrevNextButtons)},f.deactivatePrevNextButtons=function(){this.prevButton.deactivate();this.nextButton.deactivate();this.off("deactivate",this.deactivatePrevNextButtons)},t.PrevNextButton=u,t}),function(n,t){typeof define=="function"&&define.amd?define("flickity/js/page-dots",["./flickity","unipointer/unipointer","fizzy-ui-utils/utils"],function(i,r,u){return t(n,i,r,u)}):typeof module=="object"&&module.exports?module.exports=t(n,require("./flickity"),require("unipointer"),require("fizzy-ui-utils")):t(n,n.Flickity,n.Unipointer,n.fizzyUIUtils)}(window,function(n,t,i,r){function u(n){this.parent=n;this._create()}u.prototype=Object.create(i.prototype);u.prototype._create=function(){this.holder=document.createElement("ol");this.holder.className="flickity-page-dots";this.dots=[];this.handleClick=this.onClick.bind(this);this.on("pointerDown",this.parent.childUIPointerDown.bind(this.parent))};u.prototype.activate=function(){this.setDots();this.holder.addEventListener("click",this.handleClick);this.bindStartEvent(this.holder);this.parent.element.appendChild(this.holder)};u.prototype.deactivate=function(){this.holder.removeEventListener("click",this.handleClick);this.unbindStartEvent(this.holder);this.parent.element.removeChild(this.holder)};u.prototype.setDots=function(){var n=this.parent.slides.length-this.dots.length;n>0?this.addDots(n):n<0&&this.removeDots(-n)};u.prototype.addDots=function(n){for(var r=document.createDocumentFragment(),u=[],f=this.dots.length,e=f+n,t,i=f;i<e;i++)t=document.createElement("li"),t.className="dot",t.setAttribute("aria-label","Page dot "+(i+1)),r.appendChild(t),u.push(t);this.holder.appendChild(r);this.dots=this.dots.concat(u)};u.prototype.removeDots=function(n){var t=this.dots.splice(this.dots.length-n,n);t.forEach(function(n){this.holder.removeChild(n)},this)};u.prototype.updateSelected=function(){(this.selectedDot&&(this.selectedDot.className="dot",this.selectedDot.removeAttribute("aria-current")),this.dots.length)&&(this.selectedDot=this.dots[this.parent.selectedIndex],this.selectedDot.className="dot is-selected",this.selectedDot.setAttribute("aria-current","step"))};u.prototype.onTap=u.prototype.onClick=function(n){var t=n.target,i;t.nodeName=="LI"&&(this.parent.uiChange(),i=this.dots.indexOf(t),this.parent.select(i))};u.prototype.destroy=function(){this.deactivate();this.allOff()};t.PageDots=u;r.extend(t.defaults,{pageDots:!0});t.createMethods.push("_createPageDots");var f=t.prototype;return f._createPageDots=function(){if(this.options.pageDots){this.pageDots=new u(this);this.on("activate",this.activatePageDots);this.on("select",this.updateSelectedPageDots);this.on("cellChange",this.updatePageDots);this.on("resize",this.updatePageDots);this.on("deactivate",this.deactivatePageDots)}},f.activatePageDots=function(){this.pageDots.activate()},f.updateSelectedPageDots=function(){this.pageDots.updateSelected()},f.updatePageDots=function(){this.pageDots.setDots()},f.deactivatePageDots=function(){this.pageDots.deactivate()},t.PageDots=u,t}),function(n,t){typeof define=="function"&&define.amd?define("flickity/js/player",["ev-emitter/ev-emitter","fizzy-ui-utils/utils","./flickity"],function(n,i,r){return t(n,i,r)}):typeof module=="object"&&module.exports?module.exports=t(require("ev-emitter"),require("fizzy-ui-utils"),require("./flickity")):t(n.EvEmitter,n.fizzyUIUtils,n.Flickity)}(window,function(n,t,i){function r(n){this.parent=n;this.state="stopped";this.onVisibilityChange=this.visibilityChange.bind(this);this.onVisibilityPlay=this.visibilityPlay.bind(this)}r.prototype=Object.create(n.prototype);r.prototype.play=function(){if(this.state!="playing"){var n=document.hidden;if(n){document.addEventListener("visibilitychange",this.onVisibilityPlay);return}this.state="playing";document.addEventListener("visibilitychange",this.onVisibilityChange);this.tick()}};r.prototype.tick=function(){var n,t;this.state=="playing"&&(n=this.parent.options.autoPlay,n=typeof n=="number"?n:3e3,t=this,this.clear(),this.timeout=setTimeout(function(){t.parent.next(!0);t.tick()},n))};r.prototype.stop=function(){this.state="stopped";this.clear();document.removeEventListener("visibilitychange",this.onVisibilityChange)};r.prototype.clear=function(){clearTimeout(this.timeout)};r.prototype.pause=function(){this.state=="playing"&&(this.state="paused",this.clear())};r.prototype.unpause=function(){this.state=="paused"&&this.play()};r.prototype.visibilityChange=function(){var n=document.hidden;this[n?"pause":"unpause"]()};r.prototype.visibilityPlay=function(){this.play();document.removeEventListener("visibilitychange",this.onVisibilityPlay)};t.extend(i.defaults,{pauseAutoPlayOnHover:!0});i.createMethods.push("_createPlayer");var u=i.prototype;return u._createPlayer=function(){this.player=new r(this);this.on("activate",this.activatePlayer);this.on("uiChange",this.stopPlayer);this.on("pointerDown",this.stopPlayer);this.on("deactivate",this.deactivatePlayer)},u.activatePlayer=function(){this.options.autoPlay&&(this.player.play(),this.element.addEventListener("mouseenter",this))},u.playPlayer=function(){this.player.play()},u.stopPlayer=function(){this.player.stop()},u.pausePlayer=function(){this.player.pause()},u.unpausePlayer=function(){this.player.unpause()},u.deactivatePlayer=function(){this.player.stop();this.element.removeEventListener("mouseenter",this)},u.onmouseenter=function(){this.options.pauseAutoPlayOnHover&&(this.player.pause(),this.element.addEventListener("mouseleave",this))},u.onmouseleave=function(){this.player.unpause();this.element.removeEventListener("mouseleave",this)},i.Player=r,i}),function(n,t){typeof define=="function"&&define.amd?define("flickity/js/add-remove-cell",["./flickity","fizzy-ui-utils/utils"],function(i,r){return t(n,i,r)}):typeof module=="object"&&module.exports?module.exports=t(n,require("./flickity"),require("fizzy-ui-utils")):t(n,n.Flickity,n.fizzyUIUtils)}(window,function(n,t,i){function u(n){var t=document.createDocumentFragment();return n.forEach(function(n){t.appendChild(n.element)}),t}var r=t.prototype;return r.insert=function(n,t){var i=this._makeCells(n),r,f,e,o,s;i&&i.length&&(r=this.cells.length,t=t===undefined?r:t,f=u(i),e=t==r,e?this.slider.appendChild(f):(o=this.cells[t].element,this.slider.insertBefore(f,o)),t===0?this.cells=i.concat(this.cells):e?this.cells=this.cells.concat(i):(s=this.cells.splice(t,r-t),this.cells=this.cells.concat(i).concat(s)),this._sizeCells(i),this.cellChange(t,!0))},r.append=function(n){this.insert(n,this.cells.length)},r.prepend=function(n){this.insert(n,0)},r.remove=function(n){var r=this.getCells(n),t;r&&r.length&&(t=this.cells.length-1,r.forEach(function(n){n.remove();var r=this.cells.indexOf(n);t=Math.min(r,t);i.removeFrom(this.cells,n)},this),this.cellChange(t,!0))},r.cellSizeChange=function(n){var t=this.getCell(n),i;t&&(t.getSize(),i=this.cells.indexOf(t),this.cellChange(i))},r.cellChange=function(n,t){var r=this.selectedElement,i;this._positionCells(n);this._getWrapShiftCells();this.setGallerySize();i=this.getCell(r);i&&(this.selectedIndex=this.getCellSlideIndex(i));this.selectedIndex=Math.min(this.slides.length-1,this.selectedIndex);this.emitEvent("cellChange",[n]);this.select(this.selectedIndex);t&&this.positionSliderAtSelected()},t}),function(n,t){typeof define=="function"&&define.amd?define("flickity/js/lazyload",["./flickity","fizzy-ui-utils/utils"],function(i,r){return t(n,i,r)}):typeof module=="object"&&module.exports?module.exports=t(n,require("./flickity"),require("fizzy-ui-utils")):t(n,n.Flickity,n.fizzyUIUtils)}(window,function(n,t,i){"use strict";function f(n){var t,r;if(n.nodeName=="IMG"){var u=n.getAttribute("data-flickity-lazyload"),f=n.getAttribute("data-flickity-lazyload-src"),e=n.getAttribute("data-flickity-lazyload-srcset");if(u||f||e)return[n]}return t="img[data-flickity-lazyload], img[data-flickity-lazyload-src], img[data-flickity-lazyload-srcset]",r=n.querySelectorAll(t),i.makeArray(r)}function r(n,t){this.img=n;this.flickity=t;this.load()}t.createMethods.push("_createLazyload");var u=t.prototype;return u._createLazyload=function(){this.on("select",this.lazyLoad)},u.lazyLoad=function(){var n=this.options.lazyLoad;if(n){var i=typeof n=="number"?n:0,u=this.getAdjacentCellElements(i),t=[];u.forEach(function(n){var i=f(n);t=t.concat(i)});t.forEach(function(n){new r(n,this)},this)}},r.prototype.handleEvent=i.handleEvent,r.prototype.load=function(){this.img.addEventListener("load",this);this.img.addEventListener("error",this);var t=this.img.getAttribute("data-flickity-lazyload")||this.img.getAttribute("data-flickity-lazyload-src"),n=this.img.getAttribute("data-flickity-lazyload-srcset");this.img.src=t;n&&this.img.setAttribute("srcset",n);this.img.removeAttribute("data-flickity-lazyload");this.img.removeAttribute("data-flickity-lazyload-src");this.img.removeAttribute("data-flickity-lazyload-srcset")},r.prototype.onload=function(n){this.complete(n,"flickity-lazyloaded")},r.prototype.onerror=function(n){this.complete(n,"flickity-lazyerror")},r.prototype.complete=function(n,t){this.img.removeEventListener("load",this);this.img.removeEventListener("error",this);var i=this.flickity.getParentCell(this.img),r=i&&i.element;this.flickity.cellSizeChange(r);this.img.classList.add(t);this.flickity.dispatchEvent("lazyLoad",n,r)},t.LazyLoader=r,t}),function(n,t){typeof define=="function"&&define.amd?define("flickity/js/index",["./flickity","./drag","./prev-next-button","./page-dots","./player","./add-remove-cell","./lazyload"],t):typeof module=="object"&&module.exports&&(module.exports=t(require("./flickity"),require("./drag"),require("./prev-next-button"),require("./page-dots"),require("./player"),require("./add-remove-cell"),require("./lazyload")))}(window,function(n){return n}),function(n,t){typeof define=="function"&&define.amd?define("flickity-as-nav-for/as-nav-for",["flickity/js/index","fizzy-ui-utils/utils"],t):typeof module=="object"&&module.exports?module.exports=t(require("flickity"),require("fizzy-ui-utils")):n.Flickity=t(n.Flickity,n.fizzyUIUtils)}(window,function(n,t){function r(n,t,i){return(t-n)*i+n}n.createMethods.push("_createAsNavFor");var i=n.prototype;return i._createAsNavFor=function(){var n,t;this.on("activate",this.activateAsNavFor);this.on("deactivate",this.deactivateAsNavFor);this.on("destroy",this.destroyAsNavFor);(n=this.options.asNavFor,n)&&(t=this,setTimeout(function(){t.setNavCompanion(n)}))},i.setNavCompanion=function(i){var r,u;if(i=t.getQueryElement(i),r=n.data(i),r&&r!=this){this.navCompanion=r;u=this;this.onNavCompanionSelect=function(){u.navCompanionSelect()};r.on("select",this.onNavCompanionSelect);this.on("staticClick",this.onNavStaticClick);this.navCompanionSelect(!0)}},i.navCompanionSelect=function(n){var f;if(this.navCompanion){var e=this.navCompanion.selectedCells[0],t=this.navCompanion.cells.indexOf(e),i=t+this.navCompanion.selectedCells.length-1,u=Math.floor(r(t,i,this.navCompanion.cellAlign));(this.selectCell(u,!1,n),this.removeNavSelectedElements(),u>=this.cells.length)||(f=this.cells.slice(t,i+1),this.navSelectedElements=f.map(function(n){return n.element}),this.changeNavSelectedClass("add"))}},i.changeNavSelectedClass=function(n){this.navSelectedElements.forEach(function(t){t.classList[n]("is-nav-selected")})},i.activateAsNavFor=function(){this.navCompanionSelect(!0)},i.removeNavSelectedElements=function(){this.navSelectedElements&&(this.changeNavSelectedClass("remove"),delete this.navSelectedElements)},i.onNavStaticClick=function(n,t,i,r){typeof r=="number"&&this.navCompanion.selectCell(r)},i.deactivateAsNavFor=function(){this.removeNavSelectedElements()},i.destroyAsNavFor=function(){this.navCompanion&&(this.navCompanion.off("select",this.onNavCompanionSelect),this.off("staticClick",this.onNavStaticClick),delete this.navCompanion)},n}),function(n,t){"use strict";typeof define=="function"&&define.amd?define("imagesloaded/imagesloaded",["ev-emitter/ev-emitter"],function(i){return t(n,i)}):typeof module=="object"&&module.exports?module.exports=t(n,require("ev-emitter")):n.imagesLoaded=t(n,n.EvEmitter)}(typeof window!="undefined"?window:this,function(n,t){function o(n,t){for(var i in t)n[i]=t[i];return n}function c(n){if(Array.isArray(n))return n;var t=typeof n=="object"&&typeof n.length=="number";return t?h.call(n):[n]}function i(n,t,r){if(!(this instanceof i))return new i(n,t,r);var f=n;if(typeof n=="string"&&(f=document.querySelectorAll(n)),!f){e.error("Bad element for imagesLoaded "+(f||n));return}if(this.elements=c(f),this.options=o({},this.options),typeof t=="function"?r=t:o(this.options,t),r)this.on("always",r);this.getImages();u&&(this.jqDeferred=new u.Deferred);setTimeout(this.check.bind(this))}function r(n){this.img=n}function f(n,t){this.url=n;this.element=t;this.img=new Image}var u=n.jQuery,e=n.console,h=Array.prototype.slice,s;return i.prototype=Object.create(t.prototype),i.prototype.options={},i.prototype.getImages=function(){this.images=[];this.elements.forEach(this.addElementImages,this)},i.prototype.addElementImages=function(n){var i,r,t,f,u,e;if(n.nodeName=="IMG"&&this.addImage(n),this.options.background===!0&&this.addElementBackgroundImages(n),i=n.nodeType,i&&s[i]){for(r=n.querySelectorAll("img"),t=0;t<r.length;t++)f=r[t],this.addImage(f);if(typeof this.options.background=="string")for(u=n.querySelectorAll(this.options.background),t=0;t<u.length;t++)e=u[t],this.addElementBackgroundImages(e)}},s={1:!0,9:!0,11:!0},i.prototype.addElementBackgroundImages=function(n){var i=getComputedStyle(n),r,t,u;if(i)for(r=/url\((['"])?(.*?)\1\)/gi,t=r.exec(i.backgroundImage);t!==null;)u=t&&t[2],u&&this.addBackground(u,n),t=r.exec(i.backgroundImage)},i.prototype.addImage=function(n){var t=new r(n);this.images.push(t)},i.prototype.addBackground=function(n,t){var i=new f(n,t);this.images.push(i)},i.prototype.check=function(){function t(t,i,r){setTimeout(function(){n.progress(t,i,r)})}var n=this;if(this.progressedCount=0,this.hasAnyBroken=!1,!this.images.length){this.complete();return}this.images.forEach(function(n){n.once("progress",t);n.check()})},i.prototype.progress=function(n,t,i){this.progressedCount++;this.hasAnyBroken=this.hasAnyBroken||!n.isLoaded;this.emitEvent("progress",[this,n,t]);this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,n);this.progressedCount==this.images.length&&this.complete();this.options.debug&&e&&e.log("progress: "+i,n,t)},i.prototype.complete=function(){var t=this.hasAnyBroken?"fail":"done",n;this.isComplete=!0;this.emitEvent(t,[this]);this.emitEvent("always",[this]);this.jqDeferred&&(n=this.hasAnyBroken?"reject":"resolve",this.jqDeferred[n](this))},r.prototype=Object.create(t.prototype),r.prototype.check=function(){var n=this.getIsImageComplete();if(n){this.confirm(this.img.naturalWidth!==0,"naturalWidth");return}this.proxyImage=new Image;this.proxyImage.addEventListener("load",this);this.proxyImage.addEventListener("error",this);this.img.addEventListener("load",this);this.img.addEventListener("error",this);this.proxyImage.src=this.img.src},r.prototype.getIsImageComplete=function(){return this.img.complete&&this.img.naturalWidth},r.prototype.confirm=function(n,t){this.isLoaded=n;this.emitEvent("progress",[this,this.img,t])},r.prototype.handleEvent=function(n){var t="on"+n.type;this[t]&&this[t](n)},r.prototype.onload=function(){this.confirm(!0,"onload");this.unbindEvents()},r.prototype.onerror=function(){this.confirm(!1,"onerror");this.unbindEvents()},r.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this);this.proxyImage.removeEventListener("error",this);this.img.removeEventListener("load",this);this.img.removeEventListener("error",this)},f.prototype=Object.create(r.prototype),f.prototype.check=function(){this.img.addEventListener("load",this);this.img.addEventListener("error",this);this.img.src=this.url;var n=this.getIsImageComplete();n&&(this.confirm(this.img.naturalWidth!==0,"naturalWidth"),this.unbindEvents())},f.prototype.unbindEvents=function(){this.img.removeEventListener("load",this);this.img.removeEventListener("error",this)},f.prototype.confirm=function(n,t){this.isLoaded=n;this.emitEvent("progress",[this,this.element,t])},i.makeJQueryPlugin=function(t){(t=t||n.jQuery,t)&&(u=t,u.fn.imagesLoaded=function(n,t){var r=new i(this,n,t);return r.jqDeferred.promise(u(this))})},i.makeJQueryPlugin(),i}),function(n,t){typeof define=="function"&&define.amd?define(["flickity/js/index","imagesloaded/imagesloaded"],function(i,r){return t(n,i,r)}):typeof module=="object"&&module.exports?module.exports=t(n,require("flickity"),require("imagesloaded")):n.Flickity=t(n,n.Flickity,n.imagesLoaded)}(window,function(n,t,i){"use strict";var r,u;return t.createMethods.push("_createImagesLoaded"),r=t.prototype,r._createImagesLoaded=function(){this.on("activate",this.imagesLoaded)},r.imagesLoaded=function(){function t(t,i){var r=n.getParentCell(i.img);n.cellSizeChange(r&&r.element);n.options.freeScroll||n.positionSliderAtSelected()}if(this.options.imagesLoaded){var n=this;i(this.slider).on("progress",t)}},t.prototype._createResizeClass=function(){this.element.classList.add("flickity-resize")},t.createMethods.push("_createResizeClass"),u=t.prototype.resize,t.prototype.resize=function(){this.element.classList.remove("flickity-resize");u.call(this);this.element.classList.add("flickity-resize")},t}),function(n,t){typeof exports=="object"&&typeof module!="undefined"?module.exports=t(require("global/window"),require("global/document")):typeof define=="function"&&define.amd?define(["global/window","global/document"],t):(n=n||self,n.videojs=t(n.window,n.document))}(this,function(n,t){"use strict";function cy(n){var i="info",r,t=function(){for(var t=arguments.length,u=new Array(t),n=0;n<t;n++)u[n]=arguments[n];r("log",i,u)};return r=fit(n,t),t.createLogger=function(t){return cy(n+": "+t)},t.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:i},t.level=function(n){if(typeof n=="string"){if(!t.levels.hasOwnProperty(n))throw new Error('"'+n+'" in not a valid log level');i=n}return i},t.history=function(){return ct?[].concat(ct):[]},t.history.filter=function(n){return(ct||[]).filter(function(t){return new RegExp(".*"+n+".*").test(t[0])})},t.history.clear=function(){ct&&(ct.length=0)},t.history.disable=function(){ct!==null&&(ct.length=0,ct=null)},t.history.enable=function(){ct===null&&(ct=[])},t.error=function(){for(var t=arguments.length,u=new Array(t),n=0;n<t;n++)u[n]=arguments[n];return r("error",i,u)},t.warn=function(){for(var t=arguments.length,u=new Array(t),n=0;n<t;n++)u[n]=arguments[n];return r("warn",i,u)},t.debug=function(){for(var t=arguments.length,u=new Array(t),n=0;n<t;n++)u[n]=arguments[n];return r("debug",i,u)},t}function dr(n,t){return t={exports:{}},n(t,t.exports),t.exports}function gr(n,t){ly(n).forEach(function(i){return t(n[i],i)})}function oit(n,t,i){return i===void 0&&(i=0),ly(n).reduce(function(i,r){return t(i,n[r],r)},i)}function y(n){for(var i=arguments.length,r=new Array(i>1?i-1:0),t=1;t<i;t++)r[t-1]=arguments[t];return Object.assign?ve.apply(void 0,[n].concat(r)):(r.forEach(function(t){t&&gr(t,function(t,i){n[i]=t})}),n)}function wi(n){return!!n&&typeof n=="object"}function ff(n){return wi(n)&&eit.call(n)==="[object Object]"&&n.constructor===Object}function ye(t,i){if(!t||!i)return"";if(typeof n.getComputedStyle=="function"){var r=n.getComputedStyle(t);return r?r.getPropertyValue(i)||r[i]:""}return""}function ay(n){return typeof n=="string"&&Boolean(n.trim())}function vy(n){if(n.indexOf(" ")>=0)throw new Error("class has illegal whitespace characters");}function sit(n){return new RegExp("(^|\\s)"+n+"($|\\s)")}function nu(){return t===n.document}function ef(n){return wi(n)&&n.nodeType===1}function yy(){try{return n.parent!==n.self}catch(t){return!0}}function py(n){return function(i,r){if(!ay(i))return t[n](null);ay(r)&&(r=t.querySelector(r));var u=ef(r)?r:t;return u[n]&&u[n](i)}}function w(n,i,r,u){n===void 0&&(n="div");i===void 0&&(i={});r===void 0&&(r={});var f=t.createElement(n);return Object.getOwnPropertyNames(i).forEach(function(n){var t=i[n];n.indexOf("aria-")!==-1||n==="role"||n==="type"?(h.warn("Setting attributes in the second argument of createEl()\nhas been deprecated. Use the third argument instead.\n"+("createEl(type, properties, attributes). Attempting to set "+n+" to "+t+".")),f.setAttribute(n,t)):n==="textContent"?tu(f,t):f[n]!==t&&(f[n]=t)}),Object.getOwnPropertyNames(r).forEach(function(n){f.setAttribute(n,r[n])}),u&&wh(f,u),f}function tu(n,t){return typeof n.textContent=="undefined"?n.innerText=t:n.textContent=t,n}function vh(n,t){t.firstChild?t.insertBefore(n,t.firstChild):t.appendChild(n)}function ir(n,t){return(vy(t),n.classList)?n.classList.contains(t):sit(t).test(n.className)}function si(n,t){return n.classList?n.classList.add(t):ir(n,t)||(n.className=(n.className+" "+t).trim()),n}function of(n,t){return n.classList?n.classList.remove(t):(vy(t),n.className=n.className.split(/\s+/).filter(function(n){return n!==t}).join(" ")),n}function wy(n,t,i){var r=ir(n,t);if(typeof i=="function"&&(i=i(n,t)),typeof i!="boolean"&&(i=!r),i!==r)return i?si(n,t):of(n,t),n}function by(n,t){Object.getOwnPropertyNames(t).forEach(function(i){var r=t[i];r===null||typeof r=="undefined"||r===!1?n.removeAttribute(i):n.setAttribute(i,r===!0?"":r)})}function hi(n){var f={},i,t,r,u;if(n&&n.attributes&&n.attributes.length>0)for(i=n.attributes,t=i.length-1;t>=0;t--)r=i[t].name,u=i[t].value,(typeof n[r]=="boolean"||",autoplay,controls,playsinline,loop,muted,default,defaultMuted,".indexOf(","+r+",")!==-1)&&(u=u!==null?!0:!1),f[r]=u;return f}function ky(n,t){return n.getAttribute(t)}function sf(n,t,i){n.setAttribute(t,i)}function pe(n,t){n.removeAttribute(t)}function dy(){t.body.focus();t.onselectstart=function(){return!1}}function gy(){t.onselectstart=function(){return!0}}function hf(n){if(n&&n.getBoundingClientRect&&n.parentNode){var i=n.getBoundingClientRect(),t={};return["bottom","height","left","right","top","width"].forEach(function(n){i[n]!==undefined&&(t[n]=i[n])}),t.height||(t.height=parseFloat(ye(n,"height"))),t.width||(t.width=parseFloat(ye(n,"width"))),t}}function np(i){var r;if(i.getBoundingClientRect&&i.parentNode&&(r=i.getBoundingClientRect()),!r)return{left:0,top:0};var f=t.documentElement,u=t.body,e=f.clientLeft||u.clientLeft||0,o=n.pageXOffset||u.scrollLeft,s=r.left+o-e,h=f.clientTop||u.clientTop||0,c=n.pageYOffset||u.scrollTop,l=r.top+c-h;return{left:Math.round(s),top:Math.round(l)}}function yh(n,t){var i={},r=np(n),o=n.offsetWidth,u=n.offsetHeight,s=r.top,h=r.left,f=t.pageY,e=t.pageX;return t.changedTouches&&(e=t.changedTouches[0].pageX,f=t.changedTouches[0].pageY),i.y=Math.max(0,Math.min(1,(s-f+u)/u)),i.x=Math.max(0,Math.min(1,(e-h)/o)),i}function tp(n){return wi(n)&&n.nodeType===3}function ph(n){while(n.firstChild)n.removeChild(n.firstChild);return n}function ip(n){return typeof n=="function"&&(n=n()),(Array.isArray(n)?n:[n]).map(function(n){return(typeof n=="function"&&(n=n()),ef(n)||tp(n))?n:typeof n=="string"&&/\S/.test(n)?t.createTextNode(n):void 0}).filter(function(n){return n})}function wh(n,t){return ip(t).forEach(function(t){return n.appendChild(t)}),n}function rp(n,t){return wh(ph(n),t)}function iu(n){return n.button===undefined&&n.buttons===undefined?!0:n.button===0&&n.buttons===undefined?!0:n.type==="mouseup"&&n.button===0&&n.buttons===0?!0:n.button!==0||n.buttons!==1?!1:!0}function kh(t,i){i&&(bh=i);n.setTimeout(hit,t)}function dh(){ep=!0;n.removeEventListener("load",dh)}function ki(){return cit++}function cp(n,t){if(tt.has(n)){var i=tt.get(n);i.handlers[t].length===0&&(delete i.handlers[t],n.removeEventListener?n.removeEventListener(t,i.dispatcher,!1):n.detachEvent&&n.detachEvent("on"+t,i.dispatcher));Object.getOwnPropertyNames(i.handlers).length<=0&&(delete i.handlers,delete i.dispatcher,delete i.disabled);Object.getOwnPropertyNames(i).length===0&&tt["delete"](n)}}function gh(n,t,i,r){i.forEach(function(i){n(t,i,r)})}function we(i){function o(){return!0}function s(){return!1}var r,u,f,e;if(i.fixed_)return i;if(!i||!i.isPropagationStopped){r=i||n.event;i={};for(u in r)u!=="layerX"&&u!=="layerY"&&u!=="keyLocation"&&u!=="webkitMovementX"&&u!=="webkitMovementY"&&(u==="returnValue"&&r.preventDefault||(i[u]=r[u]));i.target||(i.target=i.srcElement||t);i.relatedTarget||(i.relatedTarget=i.fromElement===i.target?i.toElement:i.fromElement);i.preventDefault=function(){r.preventDefault&&r.preventDefault();i.returnValue=!1;r.returnValue=!1;i.defaultPrevented=!0};i.defaultPrevented=!1;i.stopPropagation=function(){r.stopPropagation&&r.stopPropagation();i.cancelBubble=!0;r.cancelBubble=!0;i.isPropagationStopped=o};i.isPropagationStopped=s;i.stopImmediatePropagation=function(){r.stopImmediatePropagation&&r.stopImmediatePropagation();i.isImmediatePropagationStopped=o;i.stopPropagation()};i.isImmediatePropagationStopped=s;i.clientX!==null&&i.clientX!==undefined&&(f=t.documentElement,e=t.body,i.pageX=i.clientX+(f&&f.scrollLeft||e&&e.scrollLeft||0)-(f&&f.clientLeft||e&&e.clientLeft||0),i.pageY=i.clientY+(f&&f.scrollTop||e&&e.scrollTop||0)-(f&&f.clientTop||e&&e.clientTop||0));i.which=i.charCode||i.keyCode;i.button!==null&&i.button!==undefined&&(i.button=i.button&1?0:i.button&4?1:i.button&2?2:0)}return i.fixed_=!0,i}function yt(n,t,i){var r,u;if(Array.isArray(t))return gh(yt,n,t,i);tt.has(n)||tt.set(n,{});r=tt.get(n);r.handlers||(r.handlers={});r.handlers[t]||(r.handlers[t]=[]);i.guid||(i.guid=ki());r.handlers[t].push(i);r.dispatcher||(r.disabled=!1,r.dispatcher=function(t,i){var f,e,u,o;if(!r.disabled&&(t=we(t),f=r.handlers[t.type],f))for(e=f.slice(0),u=0,o=e.length;u<o;u++)if(t.isImmediatePropagationStopped())break;else try{e[u].call(n,t,i)}catch(s){h.error(s)}});r.handlers[t].length===1&&(n.addEventListener?(u=!1,lp()&&ap.indexOf(t)>-1&&(u={passive:!0}),n.addEventListener(t,r.dispatcher,u)):n.attachEvent&&n.attachEvent("on"+t,r.dispatcher))}function it(n,t,i){var r,e,o,u,f;if(tt.has(n)&&(r=tt.get(n),r.handlers)){if(Array.isArray(t))return gh(it,n,t,i);if(e=function(n,t){r.handlers[t]=[];cp(n,t)},t===undefined){for(o in r.handlers)Object.prototype.hasOwnProperty.call(r.handlers||{},o)&&e(n,o);return}if(u=r.handlers[t],u){if(!i){e(n,t);return}if(i.guid)for(f=0;f<u.length;f++)u[f].guid===i.guid&&u.splice(f--,1);cp(n,t)}}}function ru(n,t,i){var f=tt.has(n)?tt.get(n):{},r=n.parentNode||n.ownerDocument,u;return typeof t=="string"?t={type:t,target:n}:t.target||(t.target=n),t=we(t),f.dispatcher&&f.dispatcher.call(n,t,i),r&&!t.isPropagationStopped()&&t.bubbles===!0?ru.call(null,r,t,i):!r&&!t.defaultPrevented&&t.target&&t.target[t.type]&&(tt.has(t.target)||tt.set(t.target,{}),u=tt.get(t.target),t.target[t.type]&&(u.disabled=!0,typeof t.target[t.type]=="function"&&t.target[t.type](),u.disabled=!1)),!t.defaultPrevented}function ke(n,t,i){if(Array.isArray(t))return gh(ke,n,t,i);var r=function r(){it(n,t,r);i.apply(this,arguments)};r.guid=i.guid=i.guid||ki();yt(n,t,r)}function vp(n,t,i){var r=function r(){it(n,t,r);i.apply(this,arguments)};r.guid=i.guid=i.guid||ki();yt(n,t,r)}function ic(t,i){i===void 0&&(i={});var u=i,r=u.eventBusKey;if(r){if(!t[r].nodeName)throw new Error('The eventBusKey "'+r+'" does not refer to an element.');t.eventBusEl_=t[r]}else t.eventBusEl_=w("span",{className:"vjs-event-bus"});y(t,yit);t.eventedCallbacks&&t.eventedCallbacks.forEach(function(n){n()});t.on("dispose",function(){t.off();n.setTimeout(function(){t.eventBusEl_=null},0)});return t}function kp(n,t){if(y(n,bp),n.state=y({},n.state,t),typeof n.handleStateChanged=="function"&&ur(n))n.on("statechanged",n.handleStateChanged);return n}function v(){for(var n={},i=arguments.length,r=new Array(i),t=0;t<i;t++)r[t]=arguments[t];return r.forEach(function(t){t&&gr(t,function(t,i){if(!ff(t)){n[i]=t;return}ff(n[i])||(n[i]={});n[i]=v(n[i],t)})}),n}function wit(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function bit(n,t){n.prototype=Object.create(t.prototype);n.prototype.constructor=n;n.__proto__=t}function nrt(n,t,i){if(typeof t!="number"||t<0||t>i)throw new Error("Failed to execute '"+n+"' on 'TimeRanges': The index provided ("+t+") is non-numeric or out of bounds (0-"+i+").");}function uw(n,t,i,r){return nrt(n,r,i.length-1),i[r][t]}function sc(n){return n===undefined||n.length===0?{length:0,start:function(){throw new Error("This TimeRanges object is empty");},end:function(){throw new Error("This TimeRanges object is empty");}}:{length:n.length,start:uw.bind(null,"start",0,n),end:uw.bind(null,"end",1,n)}}function er(n,t){return Array.isArray(n)?sc(n):n===undefined||t===undefined?sc():sc([[n,t]])}function fw(n,t){var u=0,f,r,i;if(!t)return 0;for(n&&n.length||(n=er(0,0)),i=0;i<n.length;i++)f=n.start(i),r=n.end(i),r>t&&(r=t),u+=r-f;return u/t}function ut(n){if(n instanceof ut)return n;typeof n=="number"?this.code=n:typeof n=="string"?this.message=n:wi(n)&&(typeof n.code=="number"&&(this.code=n.code),y(this,n));this.message||(this.message=ut.defaultMessages[this.code]||"")}function trt(n,t){var i,r=null;try{i=JSON.parse(n,t)}catch(u){r=u}return[r,i]}function yf(n){return n!==undefined&&n!==null&&typeof n.then=="function"}function fu(n){yf(n)&&n.then(null,function(){})}function vrt(n){var t=art.call(n);return t==="[object Function]"||typeof n=="function"&&t!=="[object RegExp]"||typeof window!="undefined"&&(n===window.setTimeout||n===window.alert||n===window.confirm||n===window.prompt)}function wrt(n,t){for(var i=0;i<n.length;i++)t(n[i])}function brt(n){for(var t in n)if(n.hasOwnProperty(t))return!1;return!0}function yw(n,t,i){var r=n;return lrt(t)?(i=t,typeof n=="string"&&(r={uri:n})):r=ve({},t,{uri:n}),r.callback=i,r}function ai(n,t,i){return t=yw(n,t,i),pw(t)}function pw(n){function w(){t.readyState===4&&setTimeout(v,0)}function b(){var n=undefined;if(n=t.response?t.response:t.responseText||krt(t),y)try{n=JSON.parse(n)}catch(i){}return n}function s(n){return clearTimeout(a),n instanceof Error||(n=new Error(""+(n||"Unknown XMLHttpRequest Error"))),n.statusCode=0,o(n,p)}function v(){var u,i,e;if(!f)return clearTimeout(a),u=n.useXDR&&t.status===undefined?200:t.status===1223?204:t.status,i=p,e=null,u!==0?(i={body:b(),statusCode:u,method:r,headers:{},url:h,rawRequest:t},t.getAllResponseHeaders&&(i.headers=yrt(t.getAllResponseHeaders()))):e=new Error("Internal XMLHttpRequest Error"),o(e,i,i.body)}var e,o,t;if(typeof n.callback=="undefined")throw new Error("callback argument missing");e=!1;o=function(t,i,r){e||(e=!0,n.callback(t,i,r))};t=n.xhr||null;t||(t=n.cors||n.useXDR?new ai.XDomainRequest:new ai.XMLHttpRequest);var u,f,h=t.url=n.uri||n.url,r=t.method=n.method||"GET",c=n.body||n.data,i=t.headers=n.headers||{},l=!!n.sync,y=!1,a,p={body:undefined,headers:{},statusCode:0,method:r,url:h,rawRequest:t};if("json"in n&&n.json!==!1&&(y=!0,i.accept||i.Accept||(i.Accept="application/json"),r!=="GET"&&r!=="HEAD"&&(i["content-type"]||i["Content-Type"]||(i["Content-Type"]="application/json"),c=JSON.stringify(n.json===!0?c:n.json))),t.onreadystatechange=w,t.onload=v,t.onerror=s,t.onprogress=function(){},t.onabort=function(){f=!0},t.ontimeout=s,t.open(r,h,!l,n.username,n.password),l||(t.withCredentials=!!n.withCredentials),!l&&n.timeout>0&&(a=setTimeout(function(){if(!f){f=!0;t.abort("timeout");var n=new Error("XMLHttpRequest timeout");n.code="ETIMEDOUT";s(n)}},n.timeout)),t.setRequestHeader)for(u in i)i.hasOwnProperty(u)&&t.setRequestHeader(u,i[u]);else if(n.headers&&!brt(n.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in n&&(t.responseType=n.responseType),"beforeSend"in n&&typeof n.beforeSend=="function"&&n.beforeSend(t),t.send(c||null),t}function krt(n){try{if(n.responseType==="document")return n.responseXML;var t=n.responseXML&&n.responseXML.documentElement.nodeName==="parsererror";if(n.responseType===""&&!t)return n.responseXML}catch(i){}return null}function drt(){}function wt(n,t){this.name="ParsingError";this.code=n.code;this.message=t||n.message}function kc(n){function i(n,t,i,r){return(n|0)*3600+(t|0)*60+(i|0)+(r|0)/1e3}var t=n.match(/^(\d+):(\d{1,2})(:\d{1,2})?\.(\d{3})/);return t?t[3]?i(t[1],t[2],t[3].replace(":",""),t[4]):t[1]>59?i(t[1],t[2],0,t[4]):i(0,t[1],t[2],t[4]):null}function wf(){this.values=ro(null)}function bf(n,t,i,r){var f=r?n.split(r):[n],e,u,o,s;for(e in f)typeof f[e]=="string"&&(u=f[e].split(i),u.length===2)&&(o=u[0],s=u[1],t(o,s))}function grt(n,t,i){function f(){var t=kc(n);if(t===null)throw new wt(wt.Errors.BadTimeStamp,"Malformed timestamp: "+u);return n=n.replace(/^[^\sa-zA-Z-]+/,""),t}function e(n,t){var r=new wf;bf(n,function(n,t){var f,u,e;switch(n){case"region":for(f=i.length-1;f>=0;f--)if(i[f].id===t){r.set(n,i[f].region);break}break;case"vertical":r.alt(n,t,["rl","lr"]);break;case"line":u=t.split(",");e=u[0];r.integer(n,e);r.percent(n,e)?r.set("snapToLines",!1):null;r.alt(n,e,["auto"]);u.length===2&&r.alt("lineAlign",u[1],["start","center","end"]);break;case"position":u=t.split(",");r.percent(n,u[0]);u.length===2&&r.alt("positionAlign",u[1],["start","center","end"]);break;case"size":r.percent(n,t);break;case"align":r.alt(n,t,["start","center","end","left","right"])}},/:/,/\s/);t.region=r.get("region",null);t.vertical=r.get("vertical","");try{t.line=r.get("line","auto")}catch(u){}t.lineAlign=r.get("lineAlign","start");t.snapToLines=r.get("snapToLines",!0);t.size=r.get("size",100);try{t.align=r.get("align","center")}catch(u){t.align=r.get("align","middle")}try{t.position=r.get("position","auto")}catch(u){t.position=r.get("position",{start:0,left:0,center:50,middle:50,end:100,right:100},t.align)}t.positionAlign=r.get("positionAlign",{start:"start",left:"start",center:"center",middle:"center",end:"end",right:"end"},t.align)}function r(){n=n.replace(/^\s+/,"")}var u=n;if(r(),t.startTime=f(),r(),n.substr(0,3)!=="-->")throw new wt(wt.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '-->'): "+u);n=n.substr(3);r();t.endTime=f();r();e(n,t)}function rb(n,t){function c(){function i(n){return t=t.substr(n.length),n}if(!t)return null;var n=t.match(/^([^<]*)(<[^>]*>?)?/);return i(n[1]?n[1]:n[2])}function l(n){return dc.innerHTML=n,n=dc.textContent,dc.textContent="",n}function a(n,t){return!ib[t.localName]||ib[t.localName]===n.localName}function v(t,i){var f=nut[t],r,u;return f?(r=n.document.createElement(f),u=tut[t],u&&i&&(r[u]=i.trim()),r):null}for(var h=n.document.createElement("div"),u=h,r,e=[],o,i,f,s;(r=c())!==null;){if(r[0]==="<"){if(r[1]==="/"){e.length&&e[e.length-1]===r.substr(2).replace(">","")&&(e.pop(),u=u.parentNode);continue}if(o=kc(r.substr(1,r.length-2)),o){i=n.document.createProcessingInstruction("timestamp",o);u.appendChild(i);continue}if(f=r.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/),!f)continue;if(i=v(f[1],f[3]),!i)continue;if(!a(u,i))continue;f[2]&&(s=f[2].split("."),s.forEach(function(n){var t=/^bg_/.test(n),r=t?n.slice(3):n,u,f;tb.hasOwnProperty(r)&&(u=t?"background-color":"color",f=tb[r],i.style[u]=f)}),i.className=s.join(" "));e.push(f[1]);u.appendChild(i);u=i;continue}u.appendChild(n.document.createTextNode(l(r)))}return h}function iut(n){for(var i,t=0;t<gc.length;t++)if(i=gc[t],n>=i[0]&&n<=i[1])return!0;return!1}function rut(n){function e(n,t){for(var i=t.childNodes.length-1;i>=0;i--)n.push(t.childNodes[i])}function r(n){var t,i,u;return!n||!n.length?null:(t=n.pop(),i=t.textContent||t.innerText,i)?(u=i.match(/^.*(\n|\r)/),u)?(n.length=0,u[0]):i:t.tagName==="ruby"?r(n):t.childNodes?(e(n,t),r(n)):void 0}var u=[],i="",f,t;if(!n||!n.childNodes)return"ltr";for(e(u,n);i=r(u);)for(t=0;t<i.length;t++)if(f=i.charCodeAt(t),iut(f))return"rtl";return"ltr"}function uut(n){var t;if(typeof n.line=="number"&&(n.snapToLines||n.line>=0&&n.line<=100))return n.line;if(!n.track||!n.track.textTrackList||!n.track.textTrackList.mediaElement)return-1;var r=n.track,i=r.textTrackList,u=0;for(t=0;t<i.length&&i[t]!==r;t++)i[t].mode==="showing"&&u++;return++u*-1}function uo(){}function fo(n,t,i){var u,r;uo.call(this);this.cue=t;this.cueDiv=rb(n,t.text);u={color:"rgba(255, 255, 255, 1)",backgroundColor:"rgba(0, 0, 0, 0.8)",position:"relative",left:0,right:0,top:0,bottom:0,display:"inline",writingMode:t.vertical===""?"horizontal-tb":t.vertical==="lr"?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext"};this.applyStyles(u,this.cueDiv);this.div=n.document.createElement("div");u={direction:rut(this.cueDiv),writingMode:t.vertical===""?"horizontal-tb":t.vertical==="lr"?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext",textAlign:t.align==="middle"?"center":t.align,font:i.font,whiteSpace:"pre-line",position:"absolute"};this.applyStyles(u);this.div.appendChild(this.cueDiv);r=0;switch(t.positionAlign){case"start":r=t.position;break;case"center":r=t.position-t.size/2;break;case"end":r=t.position-t.size}t.vertical===""?this.applyStyles({left:this.formatStyle(r,"%"),width:this.formatStyle(t.size,"%")}):this.applyStyles({top:this.formatStyle(r,"%"),height:this.formatStyle(t.size,"%")});this.move=function(n){this.applyStyles({top:this.formatStyle(n.top,"px"),bottom:this.formatStyle(n.bottom,"px"),left:this.formatStyle(n.left,"px"),right:this.formatStyle(n.right,"px"),height:this.formatStyle(n.height,"px"),width:this.formatStyle(n.width,"px")})}}function ft(n){var i,r,f,u,t;n.div&&(r=n.div.offsetHeight,f=n.div.offsetWidth,u=n.div.offsetTop,t=(t=n.div.childNodes)&&(t=t[0])&&t.getClientRects&&t.getClientRects(),n=n.div.getBoundingClientRect(),i=t?Math.max(t[0]&&t[0].height||0,n.height/t.length):0);this.left=n.left;this.right=n.right;this.top=n.top||u;this.height=n.height||r;this.bottom=n.bottom||u+(n.height||r);this.width=n.width||f;this.lineHeight=i!==undefined?i:n.lineHeight}function fut(n,t,i,r){function y(n,t){for(var e,o=new ft(n),s=1,f,u=0;u<t.length;u++){while(n.overlapsOppositeAxis(i,t[u])||n.within(i)&&n.overlapsAny(r))n.move(t[u]);if(n.within(i))return n;f=n.intersectPercentage(i);s>f&&(e=new ft(n),s=f);n=new ft(o)}return e||o}var o=new ft(t),e=t.cue,f=uut(e),u=[],h,l,v;if(e.snapToLines){switch(e.vertical){case"":u=["+y","-y"];h="height";break;case"rl":u=["+x","-x"];h="width";break;case"lr":u=["-x","+x"];h="width"}var c=o.lineHeight,s=c*Math.round(f),a=i[h]+c,p=u[0];Math.abs(s)>a&&(s=(s<0?-1:1)*Math.ceil(a/c)*c);f<0&&(s+=e.vertical===""?i.height:i.width,u=u.reverse());o.move(p,s)}else{l=o.lineHeight/i.height*100;switch(e.lineAlign){case"center":f-=l/2;break;case"end":f-=l}switch(e.vertical){case"":t.applyStyles({top:t.formatStyle(f,"%")});break;case"rl":t.applyStyles({left:t.formatStyle(f,"%")});break;case"lr":t.applyStyles({right:t.formatStyle(f,"%")})}u=["+y","-x","+x","-y"];o=new ft(t)}v=y(o,u);t.move(v.toCSSCompatValues(i))}function hu(){}function vut(n){if(typeof n!="string")return!1;var t=lut[n.toLowerCase()];return t?n.toLowerCase():!1}function nl(n){if(typeof n!="string")return!1;var t=aut[n.toLowerCase()];return t?n.toLowerCase():!1}function ub(n,t,i){this.hasBeenReset=!1;var r="",u=!1,f=n,e=t,o=i,s=null,h="",c=!0,l="auto",a="start",v="auto",y="auto",p=100,w="center";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return r},set:function(n){r=""+n}},pauseOnExit:{enumerable:!0,get:function(){return u},set:function(n){u=!!n}},startTime:{enumerable:!0,get:function(){return f},set:function(n){if(typeof n!="number")throw new TypeError("Start time must be set to a number.");f=n;this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return e},set:function(n){if(typeof n!="number")throw new TypeError("End time must be set to a number.");e=n;this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return o},set:function(n){o=""+n;this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return s},set:function(n){s=n;this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return h},set:function(n){var t=vut(n);if(t===!1)throw new SyntaxError("Vertical: an invalid or illegal direction string was specified.");h=t;this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return c},set:function(n){c=!!n;this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return l},set:function(n){if(typeof n!="number"&&n!==cut)throw new SyntaxError("Line: an invalid number or illegal string was specified.");l=n;this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return a},set:function(n){var t=nl(n);t?(a=t,this.hasBeenReset=!0):console.warn("lineAlign: an invalid or illegal string was specified.")}},position:{enumerable:!0,get:function(){return v},set:function(n){if(n<0||n>100)throw new Error("Position must be between 0 and 100.");v=n;this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return y},set:function(n){var t=nl(n);t?(y=t,this.hasBeenReset=!0):console.warn("positionAlign: an invalid or illegal string was specified.")}},size:{enumerable:!0,get:function(){return p},set:function(n){if(n<0||n>100)throw new Error("Size must be between 0 and 100.");p=n;this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return w},set:function(n){var t=nl(n);if(!t)throw new SyntaxError("align: an invalid or illegal alignment string was specified.");w=t;this.hasBeenReset=!0}}});this.displayState=undefined}function yut(n){if(typeof n!="string")return!1;var t=eb[n.toLowerCase()];return t?n.toLowerCase():!1}function kf(n){return typeof n=="number"&&n>=0&&n<=100}function put(){var n=100,t=3,i=0,r=100,u=0,f=100,e="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return n},set:function(t){if(!kf(t))throw new Error("Width must be between 0 and 100.");n=t}},lines:{enumerable:!0,get:function(){return t},set:function(n){if(typeof n!="number")throw new TypeError("Lines must be set to a number.");t=n}},regionAnchorY:{enumerable:!0,get:function(){return r},set:function(n){if(!kf(n))throw new Error("RegionAnchorX must be between 0 and 100.");r=n}},regionAnchorX:{enumerable:!0,get:function(){return i},set:function(n){if(!kf(n))throw new Error("RegionAnchorY must be between 0 and 100.");i=n}},viewportAnchorY:{enumerable:!0,get:function(){return f},set:function(n){if(!kf(n))throw new Error("ViewportAnchorY must be between 0 and 100.");f=n}},viewportAnchorX:{enumerable:!0,get:function(){return u},set:function(n){if(!kf(n))throw new Error("ViewportAnchorX must be between 0 and 100.");u=n}},scroll:{enumerable:!0,get:function(){return e},set:function(n){var t=yut(n);t===!1?console.warn("Scroll: an invalid or illegal string was specified."):e=t}}})}function but(n,t,i,r,u){var e,f;return u===void 0&&(u={}),e=n.textTracks(),u.kind=t,i&&(u.label=i),r&&(u.language=r),u.tech=n,f=new rt.text.TrackClass(u),e.addTrack(f),f}function kut(n,t){hr[n]=hr[n]||[];hr[n].push(t)}function dut(n,t,i){n.setTimeout(function(){return cr(t,hr[t.type],i,n)},1)}function gut(n,t){n.forEach(function(n){return n.setTech&&n.setTech(t)})}function ob(n,t,i){return n.reduceRight(il(i),t[i]())}function nft(n,t,i,r){return t[i](n.reduce(il(i),r))}function sb(n,t,i,r){r===void 0&&(r=null);var o="call"+b(i),u=n.reduce(il(o),r),f=u===eo,e=f?null:t[i](u);return rft(n,i,e,f),e}function il(n){return function(t,i){return t===eo?eo:i[n]?i[n](t):t}}function rft(n,t,i,r){for(var f,u=n.length-1;u>=0;u--)f=n[u],f[t]&&f[t](r,i)}function uft(n){tl[n.id()]=null}function fft(n,t){var r=tl[n.id()],i=null,u;if(r===undefined||r===null)return i=t(n),tl[n.id()]=[[t,i]],i;for(u=0;u<r.length;u++){var f=r[u],e=f[0],o=f[1];e===t&&(i=o)}return i===null&&(i=t(n),r.push([t,i])),i}function cr(n,t,i,r,u,f){var o;n===void 0&&(n={});t===void 0&&(t=[]);u===void 0&&(u=[]);f===void 0&&(f=!1);var h=t,s=h[0],e=h.slice(1);if(typeof s=="string")cr(n,hr[s],i,r,u,f);else if(s){if(o=fft(r,s),!o.setSource)return u.push(o),cr(n,e,i,r,u,f);o.setSource(y({},n),function(t,s){if(t)return cr(n,e,i,r,u,f);u.push(o);cr(s,n.type===s.type?e:hr[s.type],i,r,u,f)})}else e.length?cr(n,e,i,r,u,f):f?i(n,u):cr(n,hr["*"],i,r,u,!0)}function lb(n){if(!n.type){var t=oo(n.src);t&&(n.type=t)}return n}function rl(n,t){var i;if(n.length===4)i=n[1]+n[1]+n[2]+n[2]+n[3]+n[3];else if(n.length===7)i=n.slice(1);else throw new Error("Invalid color code provided, "+n+"; must be formatted as e.g. #f0e or #f604e2.");return"rgba("+parseInt(i.slice(0,2),16)+","+parseInt(i.slice(2,4),16)+","+parseInt(i.slice(4,6),16)+","+t+")"}function ul(n,t,i){try{n.style[t]=i}catch(r){return}}function hft(n){so=n}function cft(){so=ol}function cu(n,t){return t===void 0&&(t=n),so(n,t)}function wk(n,t){return t&&(n=t(n)),n&&n!=="none"?n:void 0}function lft(n,t){var i=n.options[n.options.selectedIndex].value;return wk(i,t)}function aft(n,t,i){if(t)for(var r=0;r<n.options.length;r++)if(wk(n.options[r].value,i)===t){n.selectedIndex=r;break}}function gft(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}});t&&ud(n,t)}function i(n,t,u){var e=i.getPlayer(n),f,o;if(e)return t&&h.warn('Player "'+n+'" is already initialised. Options will not be applied.'),u&&e.ready(u),e;if(f=typeof n=="string"?bi("#"+od(n)):n,!ef(f))throw new TypeError("The element or ID supplied is not valid. (videojs)");return f.ownerDocument.defaultView&&f.ownerDocument.body.contains(f)||h.warn("The element supplied is not included in the DOM"),t=t||{},i.hooks("beforesetup").forEach(function(n){var i=n(f,v(t));if(!wi(i)||Array.isArray(i)){h.error("please return an object in beforesetup hooks");return}t=v(t,i)}),o=r.getComponent("Player"),e=new o(f,t,u),i.hooks("setup").forEach(function(n){return n(e)}),e}function aa(){return aa=Object.assign||function(n){for(var i,r,t=1;t<arguments.length;t++){i=arguments[t];for(r in i)Object.prototype.hasOwnProperty.call(i,r)&&(n[r]=i[r])}return n},aa.apply(this,arguments)}function va(n,t){n.prototype=Object.create(t.prototype);n.prototype.constructor=n;n.__proto__=t}function iet(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function eet(t){for(var r=n.atob(t||""),u=new Uint8Array(r.length),i=0;i<r.length;i++)u[i]=r.charCodeAt(i);return u}function cet(n,t){return t={exports:{}},n(t,t.exports),t.exports}function lot(t){for(var r=n.atob(t),u=new Uint8Array(r.length),i=0;i<r.length;i++)u[i]=r.charCodeAt(i);return u}function fct(n){return n.subarray(0,n.byteLength-n[n.byteLength-1])}function gn(n,t){return function(i){var u=this,e,f,r;if(t){if(tf&&!i)return e=t.toString().replace(/^function.+?{/,"").slice(0,-1),f=ntt(e),this[yv]=new tf(f),hat(this[yv],f),this[yv];r={postMessage:function(n){u.onmessage&&setTimeout(function(){u.onmessage({data:n,target:r})})}};t.call(r);this.postMessage=function(n){setTimeout(function(){r.onmessage({data:n,target:u})})};this.isThisThread=!0}else return new tf(n)}}function ntt(n){try{return nf.createObjectURL(new Blob([n],{type:oat}))}catch(i){var t=new sat;return t.append(n),nf.createObjectURL(t.getBlob(type))}}function hat(n,t){if(n&&t){var i=n.terminate;n.objURL=t;n.terminate=function(){n.objURL&&nf.revokeObjectURL(n.objURL);i.call(n)}}}function uf(){}var h,ah,hp,tt,be,lp,ap,cf,bp,r,o,af,vf,or,ow,sr,hw,pt,su,rt,ro,gc,fb,eb,a,ab,gf,vb,pb,wb,dt,fl,bb,el,ol,so,lr,ho,co,kb,lo,db,sl,ao,vo,yo,gb,nk,po,hl,ll,al,vl,ik,rk,bo,yl,uk,pl,wl,ko,go,ns,fk,lu,au,bl,ar,kl,ts,is,rs,us,fs,dl,es,gl,na,os,ta,ia,ek,ne,ra,bk,kk,dk,gk,ss,rd,k,vu,te,ys,la,bs,at,hh,pv,wv,ty,ht;n=n&&n.hasOwnProperty("default")?n["default"]:n;t=t&&t.hasOwnProperty("default")?t["default"]:t;var hy="7.7.5",ct=[],fit=function(t,i){return function(r,u,f){var s=i.levels[u],h=new RegExp("^("+s+")$"),o,e;(r!=="log"&&f.unshift(r.toUpperCase()+":"),f.unshift(t+":"),ct&&(ct.push([].concat(f)),o=ct.length-1e3,ct.splice(0,o>0?o:0)),n.console)&&(e=n.console[r],e||r!=="debug"||(e=n.console.info||n.console.log),e&&s&&h.test(r))&&e[Array.isArray(f)?"apply":"call"](n.console,f)}};h=cy("VIDEOJS");ah=h.createLogger;var ve=dr(function(n){function t(){return n.exports=t=Object.assign||function(n){for(var i,r,t=1;t<arguments.length;t++){i=arguments[t];for(r in i)Object.prototype.hasOwnProperty.call(i,r)&&(n[r]=i[r])}return n},t.apply(this,arguments)}n.exports=t}),eit=Object.prototype.toString,ly=function(n){return wi(n)?Object.keys(n):[]};var bi=py("querySelector"),up=py("querySelectorAll"),fp=Object.freeze({isReal:nu,isEl:ef,isInFrame:yy,createEl:w,textContent:tu,prependTo:vh,hasClass:ir,addClass:si,removeClass:of,toggleClass:wy,setAttributes:by,getAttributes:hi,getAttribute:ky,setAttribute:sf,removeAttribute:pe,blockTextSelection:dy,unblockTextSelection:gy,getBoundingClientRect:hf,findPosition:np,getPointerPosition:yh,isTextNode:tp,emptyEl:ph,normalizeContent:ip,appendContent:wh,insertContent:rp,isSingleLeftClick:iu,$:bi,$$:up}),ep=!1,bh,hit=function(){var r,u,n,f;if(nu()&&bh.options.autoSetup!==!1){var e=Array.prototype.slice.call(t.getElementsByTagName("video")),o=Array.prototype.slice.call(t.getElementsByTagName("audio")),s=Array.prototype.slice.call(t.getElementsByTagName("video-js")),i=e.concat(o,s);if(i&&i.length>0)for(r=0,u=i.length;r<u;r++)if(n=i[r],n&&n.getAttribute)n.player===undefined&&(f=n.getAttribute("data-setup"),f!==null&&bh(n));else{kh(1);break}else ep||kh(1)}};nu()&&(t.readyState==="complete"?dh():n.addEventListener("load",dh));var op=function(n){var i=t.createElement("style");return i.className=n,i},sp=function(n,t){n.styleSheet?n.styleSheet.cssText=t:n.textContent=t},cit=3;n.WeakMap||(hp=function(){function i(){this.vdata="vdata"+Math.floor(n.performance&&n.performance.now()||Date.now());this.data={}}var t=i.prototype;return t.set=function(n,t){var i=n[this.vdata]||ki();return n[this.vdata]||(n[this.vdata]=i),this.data[i]=t,this},t.get=function(n){var t=n[this.vdata];return t?this.data[t]:(h("We have no data for this element",n),undefined)},t.has=function(n){var t=n[this.vdata];return t in this.data},t["delete"]=function(n){var t=n[this.vdata];t&&(delete this.data[t],delete n[this.vdata])},i}());tt=n.WeakMap?new WeakMap:new hp;lp=function(){if(typeof be!="boolean"){be=!1;try{var t=Object.defineProperty({},"passive",{get:function(){be=!0}});n.addEventListener("test",null,t);n.removeEventListener("test",null,t)}catch(r){}}return be};ap=["touchstart","touchmove"];var lit=Object.freeze({fixEvent:we,on:yt,off:it,trigger:ru,one:ke,any:vp}),ci=30,s=function(n,t,i){t.guid||(t.guid=ki());var r=t.bind(n);return r.guid=i?i+"_"+t.guid:t.guid,r},rr=function(t,i){var r=n.performance.now();return function(){var u=n.performance.now();u-r>=i&&(t.apply(void 0,arguments),r=u)}},ait=function(t,i,r,u){u===void 0&&(u=n);var f,o=function(){u.clearTimeout(f);f=null},e=function(){var n=this,e=arguments,o=function(){f=null;o=null;r||t.apply(n,e)};!f&&r&&t.apply(n,e);u.clearTimeout(f);f=u.setTimeout(o,i)};return e.cancel=o,e},d=function(){};d.prototype.allowedEvents_={};d.prototype.on=function(n,t){var i=this.addEventListener;this.addEventListener=function(){};yt(this,n,t);this.addEventListener=i};d.prototype.addEventListener=d.prototype.on;d.prototype.off=function(n,t){it(this,n,t)};d.prototype.removeEventListener=d.prototype.off;d.prototype.one=function(n,t){var i=this.addEventListener;this.addEventListener=function(){};ke(this,n,t);this.addEventListener=i};d.prototype.any=function(n,t){var i=this.addEventListener;this.addEventListener=function(){};vp(this,n,t);this.addEventListener=i};d.prototype.trigger=function(n){var t=n.type||n;typeof n=="string"&&(n={type:t});n=we(n);this.allowedEvents_[t]&&this["on"+t]&&this["on"+t](n);ru(this,n)};d.prototype.dispatchEvent=d.prototype.trigger;d.prototype.queueTrigger=function(t){var u=this,r,i,f,e;cf||(cf=new Map);r=t.type||t;i=cf.get(this);i||(i=new Map,cf.set(this,i));f=i.get(r);i["delete"](r);n.clearTimeout(f);e=n.setTimeout(function(){i.size===0&&(i=null,cf["delete"](u));u.trigger(t)},0);i.set(r,e)};var ur=function(n){return n instanceof d||!!n.eventBusEl_&&["on","one","off","trigger"].every(function(t){return typeof n[t]=="function"})},vit=function(n,t){ur(n)?t():(n.eventedCallbacks||(n.eventedCallbacks=[]),n.eventedCallbacks.push(t))},yp=function(n){return typeof n=="string"&&/\S/.test(n)||Array.isArray(n)&&!!n.length},nc=function(n){if(!n.nodeName&&!ur(n))throw new Error("Invalid target; must be a DOM node or evented object.");},pp=function(n){if(!yp(n))throw new Error("Invalid event type; must be a non-empty string or array.");},wp=function(n){if(typeof n!="function")throw new Error("Invalid listener; must be a function.");},tc=function(n,t){var f=t.length<3||t[0]===n||t[0]===n.eventBusEl_,r,u,i;return f?(r=n.eventBusEl_,t.length>=3&&t.shift(),u=t[0],i=t[1]):(r=t[0],u=t[1],i=t[2]),nc(r),pp(u),wp(i),i=s(n,i),{isTargetingSelf:f,target:r,type:u,listener:i}},fr=function(n,t,i,r){nc(n);n.nodeName?lit[t](n,i,r):n[t](i,r)},yit={on:function(){for(var e=this,r,f,o=arguments.length,s=new Array(o),n=0;n<o;n++)s[n]=arguments[n];var t=tc(this,s),c=t.isTargetingSelf,u=t.target,h=t.type,i=t.listener;fr(u,"on",h,i);c||(r=function(){return e.off(u,h,i)},r.guid=i.guid,f=function(){return e.off("dispose",r)},f.guid=i.guid,fr(this,"on","dispose",r),fr(u,"on","dispose",f))},one:function(){for(var s=this,i,e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];var t=tc(this,o),h=t.isTargetingSelf,r=t.target,u=t.type,f=t.listener;h?fr(r,"one",u,f):(i=function i(){s.off(r,u,i);for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];f.apply(null,e)},i.guid=f.guid,fr(r,"one",u,i))},any:function(){for(var s=this,i,e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];var t=tc(this,o),h=t.isTargetingSelf,r=t.target,u=t.type,f=t.listener;h?fr(r,"any",u,f):(i=function i(){s.off(r,u,i);for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];f.apply(null,e)},i.guid=f.guid,fr(r,"any",u,i))},off:function(n,t,i){if(!n||yp(n))it(this.eventBusEl_,n,t);else{var r=n,u=t;nc(r);pp(u);wp(i);i=s(this,i);this.off("dispose",i);r.nodeName?(it(r,u,i),it(r,"dispose",i)):ur(r)&&(r.off(u,i),r.off("dispose",i))}},trigger:function(n,t){return ru(this.eventBusEl_,n,t)}};bp={state:{},setState:function(n){var i=this,t;return typeof n=="function"&&(n=n()),gr(n,function(n,r){i.state[r]!==n&&(t=t||{},t[r]={from:i.state[r],to:n});i.state[r]=n}),t&&ur(this)&&this.trigger({changes:t,type:"statechanged"}),t}};var de=function(n){return typeof n!="string"?n:n.replace(/./,function(n){return n.toLowerCase()})},b=function(n){return typeof n!="string"?n:n.replace(/./,function(n){return n.toUpperCase()})},pit=function(n,t){return b(n)===b(t)};r=function(){function i(t,i,r){var f,u;this.player_=!t&&this.play?t=this:t;this.isDisposed_=!1;this.parentComponent_=null;this.options_=v({},this.options_);i=this.options_=v(this.options_,i);this.id_=i.id||i.el&&i.el.id;this.id_||(f=t&&t.id&&t.id()||"no_player",this.id_=f+"_component_"+ki());this.name_=i.name||null;i.el?this.el_=i.el:i.createEl!==!1&&(this.el_=this.createEl());i.evented!==!1&&ic(this,{eventBusKey:this.el_?"el_":null});kp(this,this.constructor.defaultState);this.children_=[];this.childIndex_={};this.childNameIndex_={};n.Set||(u=function(){function t(){this.set_={}}var n=t.prototype;return n.has=function(n){return n in this.set_},n["delete"]=function(n){var t=this.has(n);return delete this.set_[n],t},n.add=function(n){return this.set_[n]=1,this},n.forEach=function(n,t){for(var i in this.set_)n.call(t,i,i,this)},t}());this.setTimeoutIds_=n.Set?new Set:new u;this.setIntervalIds_=n.Set?new Set:new u;this.rafIds_=n.Set?new Set:new u;this.clearingTimersOnDispose_=!1;i.initChildren!==!1&&this.initChildren();this.ready(r);i.reportTouchActivity!==!1&&this.enableTouchActivity()}var t=i.prototype;return t.dispose=function(){if(!this.isDisposed_){if(this.trigger({type:"dispose",bubbles:!1}),this.isDisposed_=!0,this.children_)for(var n=this.children_.length-1;n>=0;n--)this.children_[n].dispose&&this.children_[n].dispose();this.children_=null;this.childIndex_=null;this.childNameIndex_=null;this.parentComponent_=null;this.el_&&(this.el_.parentNode&&this.el_.parentNode.removeChild(this.el_),tt.has(this.el_)&&tt["delete"](this.el_),this.el_=null);this.player_=null}},t.isDisposed=function(){return Boolean(this.isDisposed_)},t.player=function(){return this.player_},t.options=function(n){return n?(this.options_=v(this.options_,n),this.options_):this.options_},t.el=function(){return this.el_},t.createEl=function(n,t,i){return w(n,t,i)},t.localize=function(n,t,i){i===void 0&&(i=n);var f=this.player_.language&&this.player_.language(),u=this.player_.languages&&this.player_.languages(),e=u&&u[f],s=f&&f.split("-")[0],o=u&&u[s],r=i;return e&&e[n]?r=e[n]:o&&o[n]&&(r=o[n]),t&&(r=r.replace(/\{(\d+)\}/g,function(n,i){var r=t[i-1],u=r;return typeof r=="undefined"&&(u=n),u})),r},t.contentEl=function(){return this.contentEl_||this.el_},t.id=function(){return this.id_},t.name=function(){return this.name_},t.children=function(){return this.children_},t.getChildById=function(n){return this.childIndex_[n]},t.getChild=function(n){if(n)return this.childNameIndex_[n]},t.addChild=function(n,t,r){var u,f,o,e,s;if(t===void 0&&(t={}),r===void 0&&(r=this.children_.length),typeof n=="string"){if(f=b(n),o=t.componentClass||f,t.name=f,e=i.getComponent(o),!e)throw new Error("Component "+o+" does not exist");if(typeof e!="function")return null;u=new e(this.player_||this,t)}else u=n;return u.parentComponent_&&u.parentComponent_.removeChild(u),this.children_.splice(r,0,u),u.parentComponent_=this,typeof u.id=="function"&&(this.childIndex_[u.id()]=u),f=f||u.name&&b(u.name()),f&&(this.childNameIndex_[f]=u,this.childNameIndex_[de(f)]=u),typeof u.el=="function"&&u.el()&&(s=null,this.children_[r+1]&&this.children_[r+1].el_&&(s=this.children_[r+1].el_),this.contentEl().insertBefore(u.el(),s)),u},t.removeChild=function(n){var i,t,r;if(typeof n=="string"&&(n=this.getChild(n)),n&&this.children_){for(i=!1,t=this.children_.length-1;t>=0;t--)if(this.children_[t]===n){i=!0;this.children_.splice(t,1);break}i&&(n.parentComponent_=null,this.childIndex_[n.id()]=null,this.childNameIndex_[b(n.name())]=null,this.childNameIndex_[de(n.name())]=null,r=n.el(),r&&r.parentNode===this.contentEl()&&this.contentEl().removeChild(n.el()))}},t.initChildren=function(){var t=this,n=this.options_.children;if(n){var u=this.options_,f=function(n){var r=n.name,i=n.opts,f;(u[r]!==undefined&&(i=u[r]),i!==!1)&&(i===!0&&(i={}),i.playerOptions=t.options_.playerOptions,f=t.addChild(r,i),f&&(t[r]=f))},r,e=i.getComponent("Tech");r=Array.isArray(n)?n:Object.keys(n);r.concat(Object.keys(this.options_).filter(function(n){return!r.some(function(t){return typeof t=="string"?n===t:n===t.name})})).map(function(i){var r,u;return typeof i=="string"?(r=i,u=n[r]||t.options_[r]||{}):(r=i.name,u=i),{name:r,opts:u}}).filter(function(n){var t=i.getComponent(n.opts.componentClass||b(n.name));return t&&!e.isTech(t)}).forEach(f)}},t.buildCSSClass=function(){return""},t.ready=function(n,t){if(t===void 0&&(t=!1),n){if(!this.isReady_){this.readyQueue_=this.readyQueue_||[];this.readyQueue_.push(n);return}t?n.call(this):this.setTimeout(n,1)}},t.triggerReady=function(){this.isReady_=!0;this.setTimeout(function(){var n=this.readyQueue_;this.readyQueue_=[];n&&n.length>0&&n.forEach(function(n){n.call(this)},this);this.trigger("ready")},1)},t.$=function(n,t){return bi(n,t||this.contentEl())},t.$$=function(n,t){return up(n,t||this.contentEl())},t.hasClass=function(n){return ir(this.el_,n)},t.addClass=function(n){si(this.el_,n)},t.removeClass=function(n){of(this.el_,n)},t.toggleClass=function(n,t){wy(this.el_,n,t)},t.show=function(){this.removeClass("vjs-hidden")},t.hide=function(){this.addClass("vjs-hidden")},t.lockShowing=function(){this.addClass("vjs-lock-showing")},t.unlockShowing=function(){this.removeClass("vjs-lock-showing")},t.getAttribute=function(n){return ky(this.el_,n)},t.setAttribute=function(n,t){sf(this.el_,n,t)},t.removeAttribute=function(n){pe(this.el_,n)},t.width=function(n,t){return this.dimension("width",n,t)},t.height=function(n,t){return this.dimension("height",n,t)},t.dimensions=function(n,t){this.width(n,!0);this.height(t)},t.dimension=function(n,t,i){if(t!==undefined){(t===null||t!==t)&&(t=0);this.el_.style[n]=(""+t).indexOf("%")!==-1||(""+t).indexOf("px")!==-1?t:t==="auto"?"":t+"px";i||this.trigger("componentresize");return}if(!this.el_)return 0;var r=this.el_.style[n],u=r.indexOf("px");return u!==-1?parseInt(r.slice(0,u),10):parseInt(this.el_["offset"+b(n)],10)},t.currentDimension=function(n){var t=0,i;if(n!=="width"&&n!=="height")throw new Error("currentDimension only accepts width or height value");return t=ye(this.el_,n),t=parseFloat(t),(t===0||isNaN(t))&&(i="offset"+b(n),t=this.el_[i]),t},t.currentDimensions=function(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}},t.currentWidth=function(){return this.currentDimension("width")},t.currentHeight=function(){return this.currentDimension("height")},t.focus=function(){this.el_.focus()},t.blur=function(){this.el_.blur()},t.handleKeyDown=function(n){this.player_&&(n.stopPropagation(),this.player_.handleKeyDown(n))},t.handleKeyPress=function(n){this.handleKeyDown(n)},t.emitTapEvents=function(){var u=0,t=null,f=10,e=200,i,r;this.on("touchstart",function(r){r.touches.length===1&&(t={pageX:r.touches[0].pageX,pageY:r.touches[0].pageY},u=n.performance.now(),i=!0)});this.on("touchmove",function(n){if(n.touches.length>1)i=!1;else if(t){var r=n.touches[0].pageX-t.pageX,u=n.touches[0].pageY-t.pageY,e=Math.sqrt(r*r+u*u);e>f&&(i=!1)}});r=function(){i=!1};this.on("touchleave",r);this.on("touchcancel",r);this.on("touchend",function(r){if(t=null,i===!0){var f=n.performance.now()-u;f<e&&(r.preventDefault(),this.trigger("tap"))}})},t.enableTouchActivity=function(){var n,t,i;if(this.player()&&this.player().reportUserActivity){n=s(this.player(),this.player().reportUserActivity);this.on("touchstart",function(){n();this.clearInterval(t);t=this.setInterval(n,250)});i=function(){n();this.clearInterval(t)};this.on("touchmove",n);this.on("touchend",i);this.on("touchcancel",i)}},t.setTimeout=function(t,i){var u=this,r;return t=s(this,t),this.clearTimersOnDispose_(),r=n.setTimeout(function(){u.setTimeoutIds_.has(r)&&u.setTimeoutIds_["delete"](r);t()},i),this.setTimeoutIds_.add(r),r},t.clearTimeout=function(t){return this.setTimeoutIds_.has(t)&&(this.setTimeoutIds_["delete"](t),n.clearTimeout(t)),t},t.setInterval=function(t,i){t=s(this,t);this.clearTimersOnDispose_();var r=n.setInterval(t,i);return this.setIntervalIds_.add(r),r},t.clearInterval=function(t){return this.setIntervalIds_.has(t)&&(this.setIntervalIds_["delete"](t),n.clearInterval(t)),t},t.requestAnimationFrame=function(t){var r=this,i;return this.supportsRaf_?(this.clearTimersOnDispose_(),t=s(this,t),i=n.requestAnimationFrame(function(){r.rafIds_.has(i)&&r.rafIds_["delete"](i);t()}),this.rafIds_.add(i),i):this.setTimeout(t,1e3/60)},t.cancelAnimationFrame=function(t){return this.supportsRaf_?(this.rafIds_.has(t)&&(this.rafIds_["delete"](t),n.cancelAnimationFrame(t)),t):this.clearTimeout(t)},t.clearTimersOnDispose_=function(){var n=this;if(!this.clearingTimersOnDispose_){this.clearingTimersOnDispose_=!0;this.one("dispose",function(){[["rafIds_","cancelAnimationFrame"],["setTimeoutIds_","clearTimeout"],["setIntervalIds_","clearInterval"]].forEach(function(t){var i=t[0],r=t[1];n[i].forEach(n[r],n)});n.clearingTimersOnDispose_=!1})}},i.registerComponent=function(n,t){var s,r,u,f;if(typeof n!="string"||!n)throw new Error('Illegal component name, "'+n+'"; must be a non-empty string.');var e=i.getComponent("Tech"),o=e&&e.isTech(t),h=i===t||i.prototype.isPrototypeOf(t.prototype);if(o||!h){s=o?"techs must be registered using Tech.registerTech()":"must be a Component subclass";throw new Error('Illegal component, "'+n+'"; '+s+".");}if(n=b(n),i.components_||(i.components_={}),r=i.getComponent("Player"),n==="Player"&&r&&r.players&&(u=r.players,f=Object.keys(u),u&&f.length>0&&f.map(function(n){return u[n]}).every(Boolean)))throw new Error("Can not register Player component after player has been created.");return i.components_[n]=t,i.components_[de(n)]=t,t},i.getComponent=function(n){if(n&&i.components_)return i.components_[n]},i}();r.prototype.supportsRaf_=typeof n.requestAnimationFrame=="function"&&typeof n.cancelAnimationFrame=="function";r.registerComponent("Component",r);o=wit;var u=bit,g=n.navigator&&n.navigator.userAgent||"",dp=/AppleWebKit\/([\d.]+)/i.exec(g),kit=dp?parseFloat(dp.pop()):null,gp=/iPod/i.test(g),dit=function(){var n=g.match(/OS (\d+)_/i);return n&&n[1]?n[1]:null}(),di=/Android/i.test(g),rc=function(){var n=g.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i),t,i;return n?(t=n[1]&&parseFloat(n[1]),i=n[2]&&parseFloat(n[2]),t&&i)?parseFloat(n[1]+"."+n[2]):t?t:null:null}(),nw=di&&rc<5&&kit<537,tw=/Firefox/i.test(g),ge=/Edge/i.test(g),li=!ge&&(/Chrome/i.test(g)||/CriOS/i.test(g)),iw=function(){var n=g.match(/(Chrome|CriOS)\/(\d+)/);return n&&n[2]?parseFloat(n[2]):null}(),no=function(){var t=/MSIE\s(\d+)\.\d/.exec(g),n=t&&parseFloat(t[1]);return!n&&/Trident\/7.0/i.test(g)&&/rv:11.0/.test(g)&&(n=11),n}(),uc=/Safari/i.test(g)&&!li&&!di&&!ge,rw=/Windows/i.test(g),uu=nu()&&("ontouchstart"in n||n.navigator.maxTouchPoints||n.DocumentTouch&&n.document instanceof n.DocumentTouch),fc=/iPad/i.test(g)||uc&&uu&&!/iPhone/i.test(g),ec=/iPhone/i.test(g)&&!fc,ri=ec||fc||gp,oc=(uc||ri)&&!li,git=Object.freeze({IS_IPOD:gp,IOS_VERSION:dit,IS_ANDROID:di,ANDROID_VERSION:rc,IS_NATIVE_ANDROID:nw,IS_FIREFOX:tw,IS_EDGE:ge,IS_CHROME:li,CHROME_VERSION:iw,IE_VERSION:no,IS_SAFARI:uc,IS_WINDOWS:rw,TOUCH_ENABLED:uu,IS_IPAD:fc,IS_IPHONE:ec,IS_IOS:ri,IS_ANY_SAFARI:oc});var hc={prefixed:!0},to=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror","fullscreen"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror","-webkit-full-screen"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror","-moz-full-screen"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError","-ms-fullscreen"]],ew=to[0],lf;for(af=0;af<to.length;af++)if(to[af][1]in t){lf=to[af];break}if(lf){for(vf=0;vf<lf.length;vf++)hc[ew[vf]]=lf[vf];hc.prefixed=lf[0]!==ew[0]}for(ut.prototype.code=0,ut.prototype.message="",ut.prototype.status=null,ut.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],ut.defaultMessages={1:"You aborted the media playback",2:"A network error caused the media download to fail part-way.",3:"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.",4:"The media could not be loaded, either because the server or network failed or because the format is not supported.",5:"The media is encrypted and we do not have the keys to decrypt it."},or=0;or<ut.errorTypes.length;or++)ut[ut.errorTypes[or]]=or,ut.prototype[ut.errorTypes[or]]=or;ow=trt;var cc=function(n){return["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce(function(t,i){return n[i]&&(t[i]=n[i]),t},{cues:n.cues&&Array.prototype.map.call(n.cues,function(n){return{startTime:n.startTime,endTime:n.endTime,text:n.text,id:n.id}})})},irt=function(n){var t=n.$$("track"),i=Array.prototype.map.call(t,function(n){return n.track}),r=Array.prototype.map.call(t,function(n){var t=cc(n.track);return n.src&&(t.src=n.src),t});return r.concat(Array.prototype.filter.call(n.textTracks(),function(n){return i.indexOf(n)===-1}).map(cc))},rrt=function(n,t){return n.forEach(function(n){var i=t.addRemoteTextTrack(n).track;!n.src&&n.cues&&n.cues.forEach(function(n){return i.addCue(n)})}),t.textTracks()},sw={textTracksToJson:irt,jsonToTextTracks:rrt,trackToJson_:cc},e=dr(function(n,t){function o(n){var e,i,t;return(n&&"object"==typeof n&&(e=n.which||n.keyCode||n.charCode,e&&(n=e)),"number"==typeof n)?f[n]:(i=String(n),t=r[i.toLowerCase()],t)?t:(t=u[i.toLowerCase()],t)?t:i.length===1?i.charCodeAt(0):undefined}var r,u,i,f,e;for(o.isEventKey=function(n,t){var f,i;if(n&&"object"==typeof n){if(f=n.which||n.keyCode||n.charCode,f===null||f===undefined)return!1;if(typeof t=="string"){if((i=r[t.toLowerCase()],i)||(i=u[t.toLowerCase()],i))return i===f}else if(typeof t=="number")return t===f;return!1}},t=n.exports=o,r=t.code=t.codes={backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,"pause/break":19,"caps lock":20,esc:27,space:32,"page up":33,"page down":34,end:35,home:36,left:37,up:38,right:39,down:40,insert:45,"delete":46,command:91,"left command":91,"right command":93,"numpad *":106,"numpad +":107,"numpad -":109,"numpad .":110,"numpad /":111,"num lock":144,"scroll lock":145,"my computer":182,"my calculator":183,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},u=t.aliases={windows:91,"⇧":16,"⌥":18,"⌃":17,"⌘":91,ctl:17,control:17,option:18,pause:19,"break":19,caps:20,"return":13,escape:27,spc:32,spacebar:32,pgup:33,pgdn:34,ins:45,del:46,cmd:91},i=97;i<123;i++)r[String.fromCharCode(i)]=i-32;for(i=48;i<58;i++)r[i-48]=i;for(i=1;i<13;i++)r["f"+i]=i+111;for(i=0;i<10;i++)r["numpad "+i]=i+96;f=t.names=t.title={};for(i in r)f[r[i]]=i;for(e in u)r[e]=u[e]}),ypt=e.code,ppt=e.codes,wpt=e.aliases,bpt=e.names,kpt=e.title,lc="vjs-modal-dialog",eu=function(i){function f(n,t){var r;return r=i.call(this,n,t)||this,r.opened_=r.hasBeenOpened_=r.hasBeenFilled_=!1,r.closeable(!r.options_.uncloseable),r.content(r.options_.content),r.contentEl_=w("div",{className:lc+"-content"},{role:"document"}),r.descEl_=w("p",{className:lc+"-description vjs-control-text",id:r.el().getAttribute("aria-describedby")}),tu(r.descEl_,r.description()),r.el_.appendChild(r.descEl_),r.el_.appendChild(r.contentEl_),r}u(f,i);var r=f.prototype;return r.createEl=function(){return i.prototype.createEl.call(this,"div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-describedby":this.id()+"_description","aria-hidden":"true","aria-label":this.label(),role:"dialog"})},r.dispose=function(){this.contentEl_=null;this.descEl_=null;this.previouslyActiveEl_=null;i.prototype.dispose.call(this)},r.buildCSSClass=function(){return lc+" vjs-hidden "+i.prototype.buildCSSClass.call(this)},r.label=function(){return this.localize(this.options_.label||"Modal Window")},r.description=function(){var n=this.options_.description||this.localize("This is a modal window.");return this.closeable()&&(n+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")),n},r.open=function(){if(!this.opened_){var n=this.player();this.trigger("beforemodalopen");this.opened_=!0;!this.options_.fillAlways&&(this.hasBeenOpened_||this.hasBeenFilled_)||this.fill();this.wasPlaying_=!n.paused();this.options_.pauseOnOpen&&this.wasPlaying_&&n.pause();this.on("keydown",this.handleKeyDown);this.hadControls_=n.controls();n.controls(!1);this.show();this.conditionalFocus_();this.el().setAttribute("aria-hidden","false");this.trigger("modalopen");this.hasBeenOpened_=!0}},r.opened=function(n){return typeof n=="boolean"&&this[n?"open":"close"](),this.opened_},r.close=function(){if(this.opened_){var n=this.player();this.trigger("beforemodalclose");this.opened_=!1;this.wasPlaying_&&this.options_.pauseOnOpen&&n.play();this.off("keydown",this.handleKeyDown);this.hadControls_&&n.controls(!0);this.hide();this.el().setAttribute("aria-hidden","true");this.trigger("modalclose");this.conditionalBlur_();this.options_.temporary&&this.dispose()}},r.closeable=function(n){var i,t,r;if(typeof n=="boolean"){if(i=this.closeable_=!!n,t=this.getChild("closeButton"),i&&!t){r=this.contentEl_;this.contentEl_=this.el_;t=this.addChild("closeButton",{controlText:"Close Modal Dialog"});this.contentEl_=r;this.on(t,"close",this.close)}!i&&t&&(this.off(t,"close",this.close),this.removeChild(t),t.dispose())}return this.closeable_},r.fill=function(){this.fillWith(this.content())},r.fillWith=function(n){var t=this.contentEl(),i=t.parentNode,u=t.nextSibling,r;this.trigger("beforemodalfill");this.hasBeenFilled_=!0;i.removeChild(t);this.empty();rp(t,n);this.trigger("modalfill");u?i.insertBefore(t,u):i.appendChild(t);r=this.getChild("closeButton");r&&i.appendChild(r.el_)},r.empty=function(){this.trigger("beforemodalempty");ph(this.contentEl());this.trigger("modalempty")},r.content=function(n){return typeof n!="undefined"&&(this.content_=n),this.content_},r.conditionalFocus_=function(){var n=t.activeElement,i=this.player_.el_;this.previouslyActiveEl_=null;(i.contains(n)||i===n)&&(this.previouslyActiveEl_=n,this.focus())},r.conditionalBlur_=function(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null)},r.handleKeyDown=function(n){var i,f,u,r;if(n.stopPropagation(),e.isEventKey(n,"Escape")&&this.closeable()){n.preventDefault();this.close();return}if(e.isEventKey(n,"Tab")){for(i=this.focusableEls_(),f=this.el_.querySelector(":focus"),r=0;r<i.length;r++)if(f===i[r]){u=r;break}t.activeElement===this.el_&&(u=0);n.shiftKey&&u===0?(i[i.length-1].focus(),n.preventDefault()):n.shiftKey||u!==i.length-1||(i[0].focus(),n.preventDefault())}},r.focusableEls_=function(){var t=this.el_.querySelectorAll("*");return Array.prototype.filter.call(t,function(t){return(t instanceof n.HTMLAnchorElement||t instanceof n.HTMLAreaElement)&&t.hasAttribute("href")||(t instanceof n.HTMLInputElement||t instanceof n.HTMLSelectElement||t instanceof n.HTMLTextAreaElement||t instanceof n.HTMLButtonElement)&&!t.hasAttribute("disabled")||t instanceof n.HTMLIFrameElement||t instanceof n.HTMLObjectElement||t instanceof n.HTMLEmbedElement||t.hasAttribute("tabindex")&&t.getAttribute("tabindex")!==-1||t.hasAttribute("contenteditable")})},f}(r);eu.prototype.options_={pauseOnOpen:!0,temporary:!0};r.registerComponent("ModalDialog",eu);sr=function(n){function t(t){var i,r;for(t===void 0&&(t=[]),i=n.call(this)||this,i.tracks_=[],Object.defineProperty(o(i),"length",{get:function(){return this.tracks_.length}}),r=0;r<t.length;r++)i.addTrack(t[r]);return i}u(t,n);var i=t.prototype;return i.addTrack=function(n){var t=this.tracks_.length;""+t in this||Object.defineProperty(this,t,{get:function(){return this.tracks_[t]}});this.tracks_.indexOf(n)===-1&&(this.tracks_.push(n),this.trigger({track:n,type:"addtrack",target:this}))},i.removeTrack=function(n){for(var i,t=0,r=this.length;t<r;t++)if(this[t]===n){i=this[t];i.off&&i.off();this.tracks_.splice(t,1);break}i&&this.trigger({track:i,type:"removetrack",target:this})},i.getTrackById=function(n){for(var r=null,i,t=0,u=this.length;t<u;t++)if(i=this[t],i.id===n){r=i;break}return r},t}(d);sr.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack"};for(hw in sr.prototype.allowedEvents_)sr.prototype["on"+hw]=null;var ac=function(n,t){for(var i=0;i<n.length;i++)Object.keys(n[i]).length&&t.id!==n[i].id&&(n[i].enabled=!1)},urt=function(n){function t(t){var r,i;for(t===void 0&&(t=[]),i=t.length-1;i>=0;i--)if(t[i].enabled){ac(t,t[i]);break}return r=n.call(this,t)||this,r.changing_=!1,r}u(t,n);var i=t.prototype;return i.addTrack=function(t){var i=this;(t.enabled&&ac(this,t),n.prototype.addTrack.call(this,t),t.addEventListener)&&(t.enabledChange_=function(){i.changing_||(i.changing_=!0,ac(i,t),i.changing_=!1,i.trigger("change"))},t.addEventListener("enabledchange",t.enabledChange_))},i.removeTrack=function(t){n.prototype.removeTrack.call(this,t);t.removeEventListener&&t.enabledChange_&&(t.removeEventListener("enabledchange",t.enabledChange_),t.enabledChange_=null)},t}(sr),vc=function(n,t){for(var i=0;i<n.length;i++)Object.keys(n[i]).length&&t.id!==n[i].id&&(n[i].selected=!1)},frt=function(n){function t(t){var r,i;for(t===void 0&&(t=[]),i=t.length-1;i>=0;i--)if(t[i].selected){vc(t,t[i]);break}return r=n.call(this,t)||this,r.changing_=!1,Object.defineProperty(o(r),"selectedIndex",{get:function(){for(var n=0;n<this.length;n++)if(this[n].selected)return n;return-1},set:function(){}}),r}u(t,n);var i=t.prototype;return i.addTrack=function(t){var i=this;(t.selected&&vc(this,t),n.prototype.addTrack.call(this,t),t.addEventListener)&&(t.selectedChange_=function(){i.changing_||(i.changing_=!0,vc(i,t),i.changing_=!1,i.trigger("change"))},t.addEventListener("selectedchange",t.selectedChange_))},i.removeTrack=function(t){n.prototype.removeTrack.call(this,t);t.removeEventListener&&t.selectedChange_&&(t.removeEventListener("selectedchange",t.selectedChange_),t.selectedChange_=null)},t}(sr),cw=function(n){function t(){return n.apply(this,arguments)||this}u(t,n);var i=t.prototype;return i.addTrack=function(t){var i=this,r;n.prototype.addTrack.call(this,t);this.queueChange_||(this.queueChange_=function(){return i.queueTrigger("change")});this.triggerSelectedlanguagechange||(this.triggerSelectedlanguagechange_=function(){return i.trigger("selectedlanguagechange")});t.addEventListener("modechange",this.queueChange_);r=["metadata","chapters"];r.indexOf(t.kind)===-1&&t.addEventListener("modechange",this.triggerSelectedlanguagechange_)},i.removeTrack=function(t){n.prototype.removeTrack.call(this,t);t.removeEventListener&&(this.queueChange_&&t.removeEventListener("modechange",this.queueChange_),this.selectedlanguagechange_&&t.removeEventListener("modechange",this.triggerSelectedlanguagechange_))},t}(sr),ert=function(){function t(n){n===void 0&&(n=[]);this.trackElements_=[];Object.defineProperty(this,"length",{get:function(){return this.trackElements_.length}});for(var t=0,i=n.length;t<i;t++)this.addTrackElement_(n[t])}var n=t.prototype;return n.addTrackElement_=function(n){var t=this.trackElements_.length;""+t in this||Object.defineProperty(this,t,{get:function(){return this.trackElements_[t]}});this.trackElements_.indexOf(n)===-1&&this.trackElements_.push(n)},n.getTrackElementByTrack_=function(n){for(var i,t=0,r=this.trackElements_.length;t<r;t++)if(n===this.trackElements_[t].track){i=this.trackElements_[t];break}return i},n.removeTrackElement_=function(n){for(var t=0,i=this.trackElements_.length;t<i;t++)if(n===this.trackElements_[t]){this.trackElements_[t].track&&typeof this.trackElements_[t].track.off=="function"&&this.trackElements_[t].track.off();typeof this.trackElements_[t].off=="function"&&this.trackElements_[t].off();this.trackElements_.splice(t,1);break}},t}(),lw=function(){function n(t){n.prototype.setCues_.call(this,t);Object.defineProperty(this,"length",{get:function(){return this.length_}})}var t=n.prototype;return t.setCues_=function(n){var i=this.length||0,t=0,r=n.length,u;if(this.cues_=n,this.length_=n.length,u=function(n){""+n in this||Object.defineProperty(this,""+n,{get:function(){return this.cues_[n]}})},i<r)for(t=i;t<r;t++)u.call(this,t)},t.getCueById=function(n){for(var r=null,i,t=0,u=this.length;t<u;t++)if(i=this[t],i.id===n){r=i;break}return r},n}(),ort={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},srt={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},hrt={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},aw={disabled:"disabled",hidden:"hidden",showing:"showing"},yc=function(n){function t(t){var i,r,u,f;t===void 0&&(t={});i=n.call(this)||this;r={id:t.id||"vjs_track_"+ki(),kind:t.kind||"",label:t.label||"",language:t.language||""};u=function(n){Object.defineProperty(o(i),n,{get:function(){return r[n]},set:function(){}})};for(f in r)u(f);return i}return u(t,n),t}(d),pc=function(i){var o=["protocol","hostname","port","pathname","search","hash","host"],f=t.createElement("a"),s,u,r,e;for(f.href=i,s=f.host===""&&f.protocol!=="file:",s&&(u=t.createElement("div"),u.innerHTML='<a href="'+i+'"><\/a>',f=u.firstChild,u.setAttribute("style","display:none; position:absolute;"),t.body.appendChild(u)),r={},e=0;e<o.length;e++)r[o[e]]=f[o[e]];return r.protocol==="http:"&&(r.host=r.host.replace(/:80$/,"")),r.protocol==="https:"&&(r.host=r.host.replace(/:443$/,"")),r.protocol||(r.protocol=n.location.protocol),s&&t.body.removeChild(u),r},vw=function(n){if(!n.match(/^https?:\/\//)){var i=t.createElement("div");i.innerHTML='<a href="'+n+'">x<\/a>';n=i.firstChild.href}return n},wc=function(n){if(typeof n=="string"){var t=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/.exec(n);if(t)return t.pop().toLowerCase()}return""},io=function(t,i){i===void 0&&(i=n.location);var r=pc(t),u=r.protocol===":"?i.protocol:r.protocol;return u+r.host!==i.protocol+i.host},crt=Object.freeze({parseUrl:pc,getAbsoluteURL:vw,getFileExtension:wc,isCrossOrigin:io}),lrt=vrt,art=Object.prototype.toString;var yrt=function(n){var t={};return n?(n.trim().split("\n").forEach(function(n){var u=n.indexOf(":"),i=n.slice(0,u).trim().toLowerCase(),r=n.slice(u+1).trim();typeof t[i]=="undefined"?t[i]=r:Array.isArray(t[i])?t[i].push(r):t[i]=[t[i],r]}),t):t},bc=ai,prt=ai;ai.XMLHttpRequest=n.XMLHttpRequest||drt;ai.XDomainRequest="withCredentials"in new ai.XMLHttpRequest?ai.XMLHttpRequest:n.XDomainRequest;wrt(["get","put","post","patch","head","delete"],function(n){ai[n==="delete"?"del":n]=function(t,i,r){return i=yw(t,i,r),i.method=n.toUpperCase(),pw(i)}});bc["default"]=prt;var ww=function(t,i){var r=new n.WebVTT.Parser(n,n.vttjs,n.WebVTT.StringDecoder()),u=[];r.oncue=function(n){i.addCue(n)};r.onparsingerror=function(n){u.push(n)};r.onflush=function(){i.trigger({type:"loadeddata",target:i})};r.parse(t);u.length>0&&(n.console&&n.console.groupCollapsed&&n.console.groupCollapsed("Text Track parsing errors for "+i.src),u.forEach(function(n){return h.error(n)}),n.console&&n.console.groupEnd&&n.console.groupEnd());r.flush()},bw=function(t,i){var r={uri:t},u=io(t);u&&(r.cors=u);bc(r,s(this,function(t,r,u){if(t)return h.error(t,r);i.loaded_=!0;typeof n.WebVTT!="function"?i.tech_&&i.tech_.any(["vttjsloaded","vttjserror"],function(n){if(n.type==="vttjserror"){h.error("vttjs failed to load, stopping trying to process "+i.src);return}return ww(u,i)}):ww(u,i)}))},pf=function(t){function i(n){var i;if(n===void 0&&(n={}),!n.tech)throw new Error("A tech was not provided.");var r=v(n,{kind:hrt[n.kind]||"subtitles",language:n.language||n.srclang||""}),u=aw[r.mode]||"disabled",c=r["default"];(r.kind==="metadata"||r.kind==="chapters")&&(u="hidden");i=t.call(this,r)||this;i.tech_=r.tech;i.cues_=[];i.activeCues_=[];i.preload_=i.tech_.preloadTextTracks!==!1;var l=new lw(i.cues_),e=new lw(i.activeCues_),f=!1,h=s(o(i),function(){this.activeCues=this.activeCues;f&&(this.trigger("cuechange"),f=!1)});return u!=="disabled"&&i.tech_.ready(function(){i.tech_.on("timeupdate",h)},!0),Object.defineProperties(o(i),{"default":{get:function(){return c},set:function(){}},mode:{get:function(){return u},set:function(n){var t=this;aw[n]&&(u=n,this.preload_||u==="disabled"||this.cues.length!==0||bw(this.src,this),u!=="disabled"?this.tech_.ready(function(){t.tech_.on("timeupdate",h)},!0):this.tech_.off("timeupdate",h),this.trigger("modechange"))}},cues:{get:function(){return this.loaded_?l:null},set:function(){}},activeCues:{get:function(){var i,t,r,o,n,u;if(!this.loaded_)return null;if(this.cues.length===0)return e;for(i=this.tech_.currentTime(),t=[],r=0,o=this.cues.length;r<o;r++)n=this.cues[r],n.startTime<=i&&n.endTime>=i?t.push(n):n.startTime===n.endTime&&n.startTime<=i&&n.startTime+.5>=i&&t.push(n);if(f=!1,t.length!==this.activeCues_.length)f=!0;else for(u=0;u<t.length;u++)this.activeCues_.indexOf(t[u])===-1&&(f=!0);return this.activeCues_=t,e.setCues_(this.activeCues_),e},set:function(){}}}),r.src?(i.src=r.src,i.preload_||(i.loaded_=!0),(i.preload_||c||r.kind!=="subtitles"&&r.kind!=="captions")&&bw(i.src,o(i))):i.loaded_=!0,i}u(i,t);var r=i.prototype;return r.addCue=function(t){var i=t,u,f,r;if(n.vttjs&&!(t instanceof n.vttjs.VTTCue)){i=new n.vttjs.VTTCue(t.startTime,t.endTime,t.text);for(u in t)u in i||(i[u]=t[u]);i.id=t.id;i.originalCue_=t}for(f=this.tech_.textTracks(),r=0;r<f.length;r++)f[r]!==this&&f[r].removeCue(i);this.cues_.push(i);this.cues.setCues_(this.cues_)},r.removeCue=function(n){for(var i=this.cues_.length,t;i--;)if(t=this.cues_[i],t===n||t.originalCue_&&t.originalCue_===n){this.cues_.splice(i,1);this.cues.setCues_(this.cues_);break}},i}(yc);pf.prototype.allowedEvents_={cuechange:"cuechange"};var kw=function(n){function t(t){var i,r,u;return t===void 0&&(t={}),r=v(t,{kind:srt[t.kind]||""}),i=n.call(this,r)||this,u=!1,Object.defineProperty(o(i),"enabled",{get:function(){return u},set:function(n){typeof n=="boolean"&&n!==u&&(u=n,this.trigger("enabledchange"))}}),r.enabled&&(i.enabled=r.enabled),i.loaded_=!0,i}return u(t,n),t}(yc),dw=function(n){function t(t){var i,r,u;return t===void 0&&(t={}),r=v(t,{kind:ort[t.kind]||""}),i=n.call(this,r)||this,u=!1,Object.defineProperty(o(i),"selected",{get:function(){return u},set:function(n){typeof n=="boolean"&&n!==u&&(u=n,this.trigger("selectedchange"))}}),r.selected&&(i.selected=r.selected),i}return u(t,n),t}(yc),gw=0,nb=2,ou=function(n){function t(t){var i,u,r;return t===void 0&&(t={}),i=n.call(this)||this,r=new pf(t),i.kind=r.kind,i.src=r.src,i.srclang=r.language,i.label=r.label,i["default"]=r["default"],Object.defineProperties(o(i),{readyState:{get:function(){return u}},track:{get:function(){return r}}}),u=gw,r.addEventListener("loadeddata",function(){u=nb;i.trigger({type:"load",target:o(i)})}),i}return u(t,n),t}(d);ou.prototype.allowedEvents_={load:"load"};ou.NONE=gw;ou.LOADING=1;ou.LOADED=nb;ou.ERROR=3;pt={audio:{ListClass:urt,TrackClass:kw,capitalName:"Audio"},video:{ListClass:frt,TrackClass:dw,capitalName:"Video"},text:{ListClass:cw,TrackClass:pf,capitalName:"Text"}};Object.keys(pt).forEach(function(n){pt[n].getterName=n+"Tracks";pt[n].privateName=n+"Tracks_"});su={remoteText:{ListClass:cw,TrackClass:pf,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:ert,TrackClass:ou,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}};rt=ve({},pt,su);su.names=Object.keys(su);pt.names=Object.keys(pt);rt.names=[].concat(su.names).concat(pt.names);ro=Object.create||function(){function n(){}return function(t){if(arguments.length!==1)throw new Error("Object.create shim only accepts one parameter.");return n.prototype=t,new n}}();wt.prototype=ro(Error.prototype);wt.prototype.constructor=wt;wt.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}};wf.prototype={set:function(n,t){this.get(n)||t===""||(this.values[n]=t)},get:function(n,t,i){return i?this.has(n)?this.values[n]:t[i]:this.has(n)?this.values[n]:t},has:function(n){return n in this.values},alt:function(n,t,i){for(var r=0;r<i.length;++r)if(t===i[r]){this.set(n,t);break}},integer:function(n,t){/^-?\d+$/.test(t)&&this.set(n,parseInt(t,10))},percent:function(n,t){var i;return(i=t.match(/^([\d]{1,3})(\.[\d]*)?%$/))&&(t=parseFloat(t),t>=0&&t<=100)?(this.set(n,t),!0):!1}};var dc=t.createElement("textarea"),nut={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},tb={white:"rgba(255,255,255,1)",lime:"rgba(0,255,0,1)",cyan:"rgba(0,255,255,1)",red:"rgba(255,0,0,1)",yellow:"rgba(255,255,0,1)",magenta:"rgba(255,0,255,1)",blue:"rgba(0,0,255,1)",black:"rgba(0,0,0,1)"},tut={v:"title",lang:"lang"},ib={rt:"ruby"};gc=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];uo.prototype.applyStyles=function(n,t){t=t||this.div;for(var i in n)n.hasOwnProperty(i)&&(t.style[i]=n[i])};uo.prototype.formatStyle=function(n,t){return n===0?0:n+t};fo.prototype=ro(uo.prototype);fo.prototype.constructor=fo;ft.prototype.move=function(n,t){t=t!==undefined?t:this.lineHeight;switch(n){case"+x":this.left+=t;this.right+=t;break;case"-x":this.left-=t;this.right-=t;break;case"+y":this.top+=t;this.bottom+=t;break;case"-y":this.top-=t;this.bottom-=t}};ft.prototype.overlaps=function(n){return this.left<n.right&&this.right>n.left&&this.top<n.bottom&&this.bottom>n.top};ft.prototype.overlapsAny=function(n){for(var t=0;t<n.length;t++)if(this.overlaps(n[t]))return!0;return!1};ft.prototype.within=function(n){return this.top>=n.top&&this.bottom<=n.bottom&&this.left>=n.left&&this.right<=n.right};ft.prototype.overlapsOppositeAxis=function(n,t){switch(t){case"+x":return this.left<n.left;case"-x":return this.right>n.right;case"+y":return this.top<n.top;case"-y":return this.bottom>n.bottom}};ft.prototype.intersectPercentage=function(n){var t=Math.max(0,Math.min(this.right,n.right)-Math.max(this.left,n.left)),i=Math.max(0,Math.min(this.bottom,n.bottom)-Math.max(this.top,n.top)),r=t*i;return r/(this.height*this.width)};ft.prototype.toCSSCompatValues=function(n){return{top:this.top-n.top,bottom:n.bottom-this.bottom,left:this.left-n.left,right:n.right-this.right,height:this.height,width:this.width}};ft.getSimpleBoxPosition=function(n){var t=n.div?n.div.offsetHeight:n.tagName?n.offsetHeight:0,r=n.div?n.div.offsetWidth:n.tagName?n.offsetWidth:0,i=n.div?n.div.offsetTop:n.tagName?n.offsetTop:0;return n=n.div?n.div.getBoundingClientRect():n.tagName?n.getBoundingClientRect():n,{left:n.left,right:n.right,top:n.top||i,height:n.height||t,bottom:n.bottom||i+(n.height||t),width:n.width||r}};hu.StringDecoder=function(){return{decode:function(n){if(!n)return"";if(typeof n!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(n))}}};hu.convertCueToDOMTree=function(n,t){return!n||!t?null:rb(n,t)};var eut=.05,out="sans-serif",sut="1.5%";hu.processCues=function(n,t,i){function o(n){for(var t=0;t<n.length;t++)if(n[t].hasBeenReset||!n[t].displayState)return!0;return!1}var r,u;if(!n||!t||!i)return null;while(i.firstChild)i.removeChild(i.firstChild);if(r=n.document.createElement("div"),r.style.position="absolute",r.style.left="0",r.style.right="0",r.style.top="0",r.style.bottom="0",r.style.margin=sut,i.appendChild(r),!o(t)){for(u=0;u<t.length;u++)r.appendChild(t[u].displayState);return}var f=[],e=ft.getSimpleBoxPosition(r),s=Math.round(e.height*eut*100)/100,h={font:s+"px "+out};(function(){for(var i,o,u=0;u<t.length;u++)o=t[u],i=new fo(n,o,h),r.appendChild(i.div),fut(n,i,e,f),o.displayState=i.div,f.push(ft.getSimpleBoxPosition(i))})()};hu.Parser=function(n,t,i){i||(i=t,t={});t||(t={});this.window=n;this.vttjs=t;this.state="INITIAL";this.buffer="";this.decoder=i||new TextDecoder("utf8");this.regionList=[]};hu.Parser.prototype={reportOrThrowError:function(n){if(n instanceof wt)this.onparsingerror&&this.onparsingerror(n);else throw n;},parse:function(n){function f(){for(var i=t.buffer,n=0,r;n<i.length&&i[n]!=="\r"&&i[n]!=="\n";)++n;return r=i.substr(0,n),i[n]==="\r"&&++n,i[n]==="\n"&&++n,t.buffer=i.substr(n),r}function s(n){var i=new wf,r;bf(n,function(n,t){var u,r;switch(n){case"id":i.set(n,t);break;case"width":i.percent(n,t);break;case"lines":i.integer(n,t);break;case"regionanchor":case"viewportanchor":if(u=t.split(","),u.length!==2)break;if(r=new wf,r.percent("x",u[0]),r.percent("y",u[1]),!r.has("x")||!r.has("y"))break;i.set(n+"X",r.get("x"));i.set(n+"Y",r.get("y"));break;case"scroll":i.alt(n,t,["up"])}},/=/,/\s/);i.has("id")&&(r=new(t.vttjs.VTTRegion||t.window.VTTRegion),r.width=i.get("width",100),r.lines=i.get("lines",3),r.regionAnchorX=i.get("regionanchorX",0),r.regionAnchorY=i.get("regionanchorY",100),r.viewportAnchorX=i.get("viewportanchorX",0),r.viewportAnchorY=i.get("viewportanchorY",100),r.scroll=i.get("scroll",""),t.onregion&&t.onregion(r),t.regionList.push({id:i.get("id"),region:r}))}function h(n){var i=new wf;bf(n,function(n,t){switch(n){case"MPEGT":i.integer(n+"S",t);break;case"LOCA":i.set(n+"L",kc(t))}},/[^\d]:/,/,/);t.ontimestampmap&&t.ontimestampmap({MPEGTS:i.get("MPEGTS"),LOCAL:i.get("LOCAL")})}function c(n){n.match(/X-TIMESTAMP-MAP/)?bf(n,function(n,t){switch(n){case"X-TIMESTAMP-MAP":h(t)}},/=/):bf(n,function(n,t){switch(n){case"Region":s(t)}},/:/)}var t=this,i,u,r,o;n&&(t.buffer+=t.decoder.decode(n,{stream:!0}));try{if(t.state==="INITIAL"){if(!/\r\n|\n/.test(t.buffer))return this;if(i=f(),u=i.match(/^WEBVTT([ \t].*)?$/),!u||!u[0])throw new wt(wt.Errors.BadSignature);t.state="HEADER"}for(r=!1;t.buffer;){if(!/\r\n|\n/.test(t.buffer))return this;r?r=!1:i=f();switch(t.state){case"HEADER":/:/.test(i)?c(i):i||(t.state="ID");continue;case"NOTE":i||(t.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(i)){t.state="NOTE";break}if(!i)continue;t.cue=new(t.vttjs.VTTCue||t.window.VTTCue)(0,0,"");try{t.cue.align="center"}catch(e){t.cue.align="middle"}if(t.state="CUE",i.indexOf("-->")===-1){t.cue.id=i;continue}case"CUE":try{grt(i,t.cue,t.regionList)}catch(e){t.reportOrThrowError(e);t.cue=null;t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":if(o=i.indexOf("-->")!==-1,!i||o&&(r=!0)){t.oncue&&t.oncue(t.cue);t.cue=null;t.state="ID";continue}t.cue.text&&(t.cue.text+="\n");t.cue.text+=i.replace(/\u2028/g,"\n").replace(/u2029/g,"\n");continue;case"BADCUE":i||(t.state="ID");continue}}}catch(e){if(t.reportOrThrowError(e),t.state==="CUETEXT"&&t.cue&&t.oncue)t.oncue(t.cue);t.cue=null;t.state=t.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},flush:function(){var n=this;try{if(n.buffer+=n.decoder.decode(),(n.cue||n.state==="HEADER")&&(n.buffer+="\n\n",n.parse()),n.state==="INITIAL")throw new wt(wt.Errors.BadSignature);}catch(t){n.reportOrThrowError(t)}return n.onflush&&n.onflush(),this}};var hut=hu,cut="auto",lut={"":1,lr:1,rl:1},aut={start:1,center:1,end:1,left:1,right:1,auto:1,"line-left":1,"line-right":1};ub.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)};fb=ub;eb={"":!0,up:!0};var wut=put,df=dr(function(t){var i=t.exports={WebVTT:hut,VTTCue:fb,VTTRegion:wut};n.vttjs=i;n.WebVTT=i.WebVTT;var r=i.VTTCue,u=i.VTTRegion,f=n.VTTCue,e=n.VTTRegion;i.shim=function(){n.VTTCue=r;n.VTTRegion=u};i.restore=function(){n.VTTCue=f;n.VTTRegion=e};n.VTTCue||i.shim()}),uwt=df.WebVTT,fwt=df.VTTCue,ewt=df.VTTRegion;a=function(i){function f(n,t){var r;n===void 0&&(n={});t===void 0&&(t=function(){});n.reportTouchActivity=!1;r=i.call(this,null,n,t)||this;r.hasStarted_=!1;r.on("playing",function(){this.hasStarted_=!0});r.on("loadstart",function(){this.hasStarted_=!1});return rt.names.forEach(function(t){var i=rt[t];n&&n[i.getterName]&&(r[i.privateName]=n[i.getterName])}),r.featuresProgressEvents||r.manualProgressOn(),r.featuresTimeupdateEvents||r.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach(function(t){n["native"+t+"Tracks"]===!1&&(r["featuresNative"+t+"Tracks"]=!1)}),n.nativeCaptions===!1||n.nativeTextTracks===!1?r.featuresNativeTextTracks=!1:(n.nativeCaptions===!0||n.nativeTextTracks===!0)&&(r.featuresNativeTextTracks=!0),r.featuresNativeTextTracks||r.emulateTextTracks(),r.preloadTextTracks=n.preloadTextTracks!==!1,r.autoRemoteTextTracks_=new rt.text.ListClass,r.initTrackListeners(),n.nativeControlsForTouch||r.emitTapEvents(),r.constructor&&(r.name_=r.constructor.name||"Unknown Tech"),r}u(f,i);var r=f.prototype;return r.triggerSourceset=function(n){var t=this;if(!this.isReady_)this.one("ready",function(){return t.setTimeout(function(){return t.triggerSourceset(n)},1)});this.trigger({src:n,type:"sourceset"})},r.manualProgressOn=function(){this.on("durationchange",this.onDurationChange);this.manualProgress=!0;this.one("ready",this.trackProgress)},r.manualProgressOff=function(){this.manualProgress=!1;this.stopTrackingProgress();this.off("durationchange",this.onDurationChange)},r.trackProgress=function(){this.stopTrackingProgress();this.progressInterval=this.setInterval(s(this,function(){var n=this.bufferedPercent();this.bufferedPercent_!==n&&this.trigger("progress");this.bufferedPercent_=n;n===1&&this.stopTrackingProgress()}),500)},r.onDurationChange=function(){this.duration_=this.duration()},r.buffered=function(){return er(0,0)},r.bufferedPercent=function(){return fw(this.buffered(),this.duration_)},r.stopTrackingProgress=function(){this.clearInterval(this.progressInterval)},r.manualTimeUpdatesOn=function(){this.manualTimeUpdates=!0;this.on("play",this.trackCurrentTime);this.on("pause",this.stopTrackingCurrentTime)},r.manualTimeUpdatesOff=function(){this.manualTimeUpdates=!1;this.stopTrackingCurrentTime();this.off("play",this.trackCurrentTime);this.off("pause",this.stopTrackingCurrentTime)},r.trackCurrentTime=function(){this.currentTimeInterval&&this.stopTrackingCurrentTime();this.currentTimeInterval=this.setInterval(function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},250)},r.stopTrackingCurrentTime=function(){this.clearInterval(this.currentTimeInterval);this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},r.dispose=function(){this.clearTracks(pt.names);this.manualProgress&&this.manualProgressOff();this.manualTimeUpdates&&this.manualTimeUpdatesOff();i.prototype.dispose.call(this)},r.clearTracks=function(n){var t=this;n=[].concat(n);n.forEach(function(n){for(var i=t[n+"Tracks"]()||[],u=i.length,r;u--;)r=i[u],n==="text"&&t.removeRemoteTextTrack(r),i.removeTrack(r)})},r.cleanupAutoTextTracks=function(){for(var n=this.autoRemoteTextTracks_||[],t=n.length,i;t--;)i=n[t],this.removeRemoteTextTrack(i)},r.reset=function(){},r.error=function(n){return n!==undefined&&(this.error_=new ut(n),this.trigger("error")),this.error_},r.played=function(){return this.hasStarted_?er(0,0):er()},r.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},r.initTrackListeners=function(){var n=this;pt.names.forEach(function(t){var u=pt[t],i=function(){n.trigger(t+"trackchange")},r=n[u.getterName]();r.addEventListener("removetrack",i);r.addEventListener("addtrack",i);n.on("dispose",function(){r.removeEventListener("removetrack",i);r.removeEventListener("addtrack",i)})})},r.addWebVttScript_=function(){var r=this,i;if(!n.WebVTT)if(t.body.contains(this.el())){if(!this.options_["vtt.js"]&&ff(df)&&Object.keys(df).length>0){this.trigger("vttjsloaded");return}i=t.createElement("script");i.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js";i.onload=function(){r.trigger("vttjsloaded")};i.onerror=function(){r.trigger("vttjserror")};this.on("dispose",function(){i.onload=null;i.onerror=null});n.WebVTT=!0;this.el().parentNode.appendChild(i)}else this.ready(this.addWebVttScript_)},r.emulateTextTracks=function(){var e=this,n=this.textTracks(),r=this.remoteTextTracks(),u=function(t){return n.addTrack(t.track)},f=function(t){return n.removeTrack(t.track)},i,t;r.on("addtrack",u);r.on("removetrack",f);this.addWebVttScript_();i=function(){return e.trigger("texttrackchange")};t=function(){var t,r;for(i(),t=0;t<n.length;t++)r=n[t],r.removeEventListener("cuechange",i),r.mode==="showing"&&r.addEventListener("cuechange",i)};t();n.addEventListener("change",t);n.addEventListener("addtrack",t);n.addEventListener("removetrack",t);this.on("dispose",function(){var e,o;for(r.off("addtrack",u),r.off("removetrack",f),n.removeEventListener("change",t),n.removeEventListener("addtrack",t),n.removeEventListener("removetrack",t),e=0;e<n.length;e++)o=n[e],o.removeEventListener("cuechange",i)})},r.addTextTrack=function(n,t,i){if(!n)throw new Error("TextTrack kind is required but was not provided");return but(this,n,t,i)},r.createRemoteTextTrack=function(n){var t=v(n,{tech:this});return new su.remoteTextEl.TrackClass(t)},r.addRemoteTextTrack=function(n,t){var r=this,i;return n===void 0&&(n={}),i=this.createRemoteTextTrack(n),t!==!0&&t!==!1&&(h.warn('Calling addRemoteTextTrack without explicitly setting the "manualCleanup" parameter to `true` is deprecated and default to `false` in future version of video.js'),t=!0),this.remoteTextTrackEls().addTrackElement_(i),this.remoteTextTracks().addTrack(i.track),t!==!0&&this.ready(function(){return r.autoRemoteTextTracks_.addTrack(i.track)}),i},r.removeRemoteTextTrack=function(n){var t=this.remoteTextTrackEls().getTrackElementByTrack_(n);this.remoteTextTrackEls().removeTrackElement_(t);this.remoteTextTracks().removeTrack(n);this.autoRemoteTextTracks_.removeTrack(n)},r.getVideoPlaybackQuality=function(){return{}},r.requestPictureInPicture=function(){var t=this.options_.Promise||n.Promise;if(t)return t.reject()},r.setPoster=function(){},r.playsinline=function(){},r.setPlaysinline=function(){},r.overrideNativeAudioTracks=function(){},r.overrideNativeVideoTracks=function(){},r.canPlayType=function(){return""},f.canPlayType=function(){return""},f.canPlaySource=function(n){return f.canPlayType(n.type)},f.isTech=function(n){return n.prototype instanceof f||n instanceof f||n===f},f.registerTech=function(n,t){if(f.techs_||(f.techs_={}),!f.isTech(t))throw new Error("Tech "+n+" must be a Tech");if(!f.canPlayType)throw new Error("Techs must have a static canPlayType method on them");if(!f.canPlaySource)throw new Error("Techs must have a static canPlaySource method on them");return n=b(n),f.techs_[n]=t,f.techs_[de(n)]=t,n!=="Tech"&&f.defaultTechOrder_.push(n),t},f.getTech=function(t){if(t)return f.techs_&&f.techs_[t]?f.techs_[t]:(t=b(t),n&&n.videojs&&n.videojs[t]?(h.warn("The "+t+" tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)"),n.videojs[t]):void 0)},f}(r);rt.names.forEach(function(n){var t=rt[n];a.prototype[t.getterName]=function(){return this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName]}});a.prototype.featuresVolumeControl=!0;a.prototype.featuresMuteControl=!0;a.prototype.featuresFullscreenResize=!1;a.prototype.featuresPlaybackRate=!1;a.prototype.featuresProgressEvents=!1;a.prototype.featuresSourceset=!1;a.prototype.featuresTimeupdateEvents=!1;a.prototype.featuresNativeTextTracks=!1;a.withSourceHandlers=function(n){n.registerSourceHandler=function(t,i){var r=n.sourceHandlers;r||(r=n.sourceHandlers=[]);i===undefined&&(i=r.length);r.splice(i,0,t)};n.canPlayType=function(t){for(var u=n.sourceHandlers||[],r,i=0;i<u.length;i++)if(r=u[i].canPlayType(t),r)return r;return""};n.selectSourceHandler=function(t,i){for(var u=n.sourceHandlers||[],f,r=0;r<u.length;r++)if(f=u[r].canHandleSource(t,i),f)return u[r];return null};n.canPlaySource=function(t,i){var r=n.selectSourceHandler(t,i);return r?r.canHandleSource(t,i):""};["seekable","seeking","duration"].forEach(function(n){var t=this[n];typeof t=="function"&&(this[n]=function(){return this.sourceHandler_&&this.sourceHandler_[n]?this.sourceHandler_[n].apply(this.sourceHandler_,arguments):t.apply(this,arguments)})},n.prototype);n.prototype.setSource=function(t){var i=n.selectSourceHandler(t,this.options_);i||(n.nativeSourceHandler?i=n.nativeSourceHandler:h.error("No source handler found for the current source."));this.disposeSourceHandler();this.off("dispose",this.disposeSourceHandler);i!==n.nativeSourceHandler&&(this.currentSource_=t);this.sourceHandler_=i.handleSource(t,this,this.options_);this.one("dispose",this.disposeSourceHandler)};n.prototype.disposeSourceHandler=function(){this.currentSource_&&(this.clearTracks(["audio","video"]),this.currentSource_=null);this.cleanupAutoTextTracks();this.sourceHandler_&&(this.sourceHandler_.dispose&&this.sourceHandler_.dispose(),this.sourceHandler_=null)}};r.registerComponent("Tech",a);a.registerTech("Tech",a);a.defaultTechOrder_=[];var hr={},tl={},eo={};var tft={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1},ift={setCurrentTime:1,setMuted:1,setVolume:1},hb={play:1,pause:1};var eft={opus:"video/ogg",ogv:"video/ogg",mp4:"video/mp4",mov:"video/mp4",m4v:"video/mp4",mkv:"video/x-matroska",m4a:"audio/mp4",mp3:"audio/mpeg",aac:"audio/aac",oga:"audio/ogg",m3u8:"application/x-mpegURL",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",png:"image/png",svg:"image/svg+xml",webp:"image/webp"},oo=function(n){n===void 0&&(n="");var t=wc(n),i=eft[t.toLowerCase()];return i||""},oft=function(n,t){var u,f,r,i;if(!t)return"";if(n.cache_.source.src===t&&n.cache_.source.type)return n.cache_.source.type;if(u=n.cache_.sources.filter(function(n){return n.src===t}),u.length)return u[0].type;for(f=n.$$("source"),r=0;r<f.length;r++)if(i=f[r],i.type&&i.src&&i.src===t)return i.type;return oo(t)},cb=function cb(n){if(Array.isArray(n)){var t=[];n.forEach(function(n){n=cb(n);Array.isArray(n)?t=t.concat(n):wi(n)&&t.push(n)});n=t}else n=typeof n=="string"&&n.trim()?[lb({src:n})]:wi(n)&&typeof n.src=="string"&&n.src&&n.src.trim()?[lb(n)]:[];return n};ab=function(n){function t(t,i,u){var h,c=v({createEl:!1},i),e,s,f,o;if(h=n.call(this,t,c,u)||this,i.playerOptions.sources&&i.playerOptions.sources.length!==0)t.src(i.playerOptions.sources);else for(e=0,s=i.playerOptions.techOrder;e<s.length;e++)if(f=b(s[e]),o=a.getTech(f),f||(o=r.getComponent(f)),o&&o.isSupported()){t.loadTech_(f);break}return h}return u(t,n),t}(r);r.registerComponent("MediaLoader",ab);gf=function(n){function i(t,i){var r;return r=n.call(this,t,i)||this,r.emitTapEvents(),r.enable(),r}u(i,n);var t=i.prototype;return t.createEl=function(t,i,r){t===void 0&&(t="div");i===void 0&&(i={});r===void 0&&(r={});i=y({innerHTML:'<span aria-hidden="true" class="vjs-icon-placeholder"><\/span>',className:this.buildCSSClass(),tabIndex:0},i);t==="button"&&h.error("Creating a ClickableComponent with an HTML element of "+t+" is not supported; use a Button instead.");r=y({role:"button"},r);this.tabIndex_=i.tabIndex;var u=n.prototype.createEl.call(this,t,i,r);return this.createControlTextEl(u),u},t.dispose=function(){this.controlTextEl_=null;n.prototype.dispose.call(this)},t.createControlTextEl=function(n){return this.controlTextEl_=w("span",{className:"vjs-control-text"},{"aria-live":"polite"}),n&&n.appendChild(this.controlTextEl_),this.controlText(this.controlText_,n),this.controlTextEl_},t.controlText=function(n,t){if(t===void 0&&(t=this.el()),n===undefined)return this.controlText_||"Need Text";var i=this.localize(n);this.controlText_=n;tu(this.controlTextEl_,i);this.nonIconControl||t.setAttribute("title",i)},t.buildCSSClass=function(){return"vjs-control vjs-button "+n.prototype.buildCSSClass.call(this)},t.enable=function(){if(!this.enabled_){this.enabled_=!0;this.removeClass("vjs-disabled");this.el_.setAttribute("aria-disabled","false");typeof this.tabIndex_!="undefined"&&this.el_.setAttribute("tabIndex",this.tabIndex_);this.on(["tap","click"],this.handleClick);this.on("keydown",this.handleKeyDown)}},t.disable=function(){this.enabled_=!1;this.addClass("vjs-disabled");this.el_.setAttribute("aria-disabled","true");typeof this.tabIndex_!="undefined"&&this.el_.removeAttribute("tabIndex");this.off("mouseover",this.handleMouseOver);this.off("mouseout",this.handleMouseOut);this.off(["tap","click"],this.handleClick);this.off("keydown",this.handleKeyDown)},t.handleClick=function(){this.options_.clickHandler&&this.options_.clickHandler.call(this,arguments)},t.handleKeyDown=function(t){e.isEventKey(t,"Space")||e.isEventKey(t,"Enter")?(t.preventDefault(),t.stopPropagation(),this.trigger("click")):n.prototype.handleKeyDown.call(this,t)},i}(r);r.registerComponent("ClickableComponent",gf);vb=function(n){function i(t,i){var r;r=n.call(this,t,i)||this;r.update();t.on("posterchange",s(o(r),r.update));return r}u(i,n);var t=i.prototype;return t.dispose=function(){this.player().off("posterchange",this.update);n.prototype.dispose.call(this)},t.createEl=function(){return w("div",{className:"vjs-poster",tabIndex:-1})},t.update=function(){var n=this.player().poster();this.setSrc(n);n?this.show():this.hide()},t.setSrc=function(n){var t="";n&&(t='url("'+n+'")');this.el_.style.backgroundImage=t},t.handleClick=function(){this.player_.controls()&&(this.player_.tech(!0)&&this.player_.tech(!0).focus(),this.player_.paused()?fu(this.player_.play()):this.player_.pause())},i}(gf);r.registerComponent("PosterImage",vb);var kt="#222",yb="#ccc",sft={monospace:"monospace",sansSerif:"sans-serif",serif:"serif",monospaceSansSerif:'"Andale Mono", "Lucida Console", monospace',monospaceSerif:'"Courier New", monospace',proportionalSansSerif:"sans-serif",proportionalSerif:"serif",casual:'"Comic Sans MS", Impact, fantasy',script:'"Monotype Corsiva", cursive',smallcaps:'"Andale Mono", "Lucida Console", monospace, sans-serif'};pb=function(t){function r(i,r,u){var f,e;f=t.call(this,i,r,u)||this;e=s(o(f),f.updateDisplay);i.on("loadstart",s(o(f),f.toggleDisplay));i.on("texttrackchange",e);i.on("loadedmetadata",s(o(f),f.preselectTrack));return i.ready(s(o(f),function(){var r,t;if(i.tech_&&i.tech_.featuresNativeTextTracks){this.hide();return}i.on("fullscreenchange",e);i.on("playerresize",e);n.addEventListener("orientationchange",e);i.on("dispose",function(){return n.removeEventListener("orientationchange",e)});for(r=this.options_.playerOptions.tracks||[],t=0;t<r.length;t++)this.player_.addRemoteTextTrack(r[t],!0);this.preselectTrack()})),f}u(r,t);var i=r.prototype;return i.preselectTrack=function(){for(var e={captions:1,subtitles:1},o=this.player_.textTracks(),t=this.player_.cache_.selectedLanguage,r,u,i,n,f=0;f<o.length;f++)n=o[f],t&&t.enabled&&t.language&&t.language===n.language&&n.kind in e?n.kind===t.kind?i=n:i||(i=n):t&&!t.enabled?(i=null,r=null,u=null):n["default"]&&(n.kind!=="descriptions"||r?n.kind in e&&!u&&(u=n):r=n);i?i.mode="showing":u?u.mode="showing":r&&(r.mode="showing")},i.toggleDisplay=function(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()},i.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-text-track-display"},{"aria-live":"off","aria-atomic":"true"})},i.clearDisplay=function(){typeof n.WebVTT=="function"&&n.WebVTT.processCues(n,[],this.el_)},i.updateDisplay=function(){var t=this.player_.textTracks(),s=this.options_.allowMultipleShowingTracks,r,i,u,n;if(this.clearDisplay(),s){for(r=[],i=0;i<t.length;++i)(u=t[i],u.mode==="showing")&&r.push(u);this.updateForTrack(r);return}for(var f=null,e=null,o=t.length;o--;)n=t[o],n.mode==="showing"&&(n.kind==="descriptions"?f=n:e=n);e?(this.getAttribute("aria-live")!=="off"&&this.setAttribute("aria-live","off"),this.updateForTrack(e)):f&&(this.getAttribute("aria-live")!=="assertive"&&this.setAttribute("aria-live","assertive"),this.updateForTrack(f))},i.updateDisplayState=function(t){for(var i=this.player_.textTrackSettings.getValues(),f=t.activeCues,e=f.length,u,r,o;e--;)(u=f[e],u)&&(r=u.displayState,i.color&&(r.firstChild.style.color=i.color),i.textOpacity&&ul(r.firstChild,"color",rl(i.color||"#fff",i.textOpacity)),i.backgroundColor&&(r.firstChild.style.backgroundColor=i.backgroundColor),i.backgroundOpacity&&ul(r.firstChild,"backgroundColor",rl(i.backgroundColor||"#000",i.backgroundOpacity)),i.windowColor&&(i.windowOpacity?ul(r,"backgroundColor",rl(i.windowColor,i.windowOpacity)):r.style.backgroundColor=i.windowColor),i.edgeStyle&&(i.edgeStyle==="dropshadow"?r.firstChild.style.textShadow="2px 2px 3px "+kt+", 2px 2px 4px "+kt+", 2px 2px 5px "+kt:i.edgeStyle==="raised"?r.firstChild.style.textShadow="1px 1px "+kt+", 2px 2px "+kt+", 3px 3px "+kt:i.edgeStyle==="depressed"?r.firstChild.style.textShadow="1px 1px "+yb+", 0 1px "+yb+", -1px -1px "+kt+", 0 -1px "+kt:i.edgeStyle==="uniform"&&(r.firstChild.style.textShadow="0 0 4px "+kt+", 0 0 4px "+kt+", 0 0 4px "+kt+", 0 0 4px "+kt)),i.fontPercent&&i.fontPercent!==1&&(o=n.parseFloat(r.style.fontSize),r.style.fontSize=o*i.fontPercent+"px",r.style.height="auto",r.style.top="auto",r.style.bottom="2px"),i.fontFamily&&i.fontFamily!=="default"&&(i.fontFamily==="small-caps"?r.firstChild.style.fontVariant="small-caps":r.firstChild.style.fontFamily=sft[i.fontFamily]))},i.updateForTrack=function(t){var o,u,s,f,r,i,e,h;if(Array.isArray(t)||(t=[t]),typeof n.WebVTT=="function"&&!t.every(function(n){return!n.activeCues})){for(o=[],u=0;u<t.length;++u)for(s=t[u],f=0;f<s.activeCues.length;++f)o.push(s.activeCues[f]);for(n.WebVTT.processCues(n,o,this.el_),r=0;r<t.length;++r){for(i=t[r],e=0;e<i.activeCues.length;++e)h=i.activeCues[e].displayState,si(h,"vjs-text-track-cue"),si(h,"vjs-text-track-cue-"+(i.language?i.language:r));this.player_.textTrackSettings&&this.updateDisplayState(i)}}},r}(r);r.registerComponent("TextTrackDisplay",pb);wb=function(n){function t(){return n.apply(this,arguments)||this}u(t,n);var i=t.prototype;return i.createEl=function(){var i=this.player_.isAudio(),r=this.localize(i?"Audio Player":"Video Player"),u=w("span",{className:"vjs-control-text",innerHTML:this.localize("{1} is loading.",[r])}),t=n.prototype.createEl.call(this,"div",{className:"vjs-loading-spinner",dir:"ltr"});return t.appendChild(u),t},t}(r);r.registerComponent("LoadingSpinner",wb);dt=function(n){function i(){return n.apply(this,arguments)||this}u(i,n);var t=i.prototype;return t.createEl=function(n,t,i){t===void 0&&(t={});i===void 0&&(i={});n="button";t=y({innerHTML:'<span aria-hidden="true" class="vjs-icon-placeholder"><\/span>',className:this.buildCSSClass()},t);i=y({type:"button"},i);var u=r.prototype.createEl.call(this,n,t,i);return this.createControlTextEl(u),u},t.addChild=function(n,t){t===void 0&&(t={});var i=this.constructor.name;return h.warn("Adding an actionable (user controllable) child to a Button ("+i+") is not supported; use a ClickableComponent instead."),r.prototype.addChild.call(this,n,t)},t.enable=function(){n.prototype.enable.call(this);this.el_.removeAttribute("disabled")},t.disable=function(){n.prototype.disable.call(this);this.el_.setAttribute("disabled","disabled")},t.handleKeyDown=function(t){if(e.isEventKey(t,"Space")||e.isEventKey(t,"Enter")){t.stopPropagation();return}n.prototype.handleKeyDown.call(this,t)},i}(gf);r.registerComponent("Button",dt);fl=function(n){function i(t,i){var r;r=n.call(this,t,i)||this;r.mouseused_=!1;r.on("mousedown",r.handleMouseDown);return r}u(i,n);var t=i.prototype;return t.buildCSSClass=function(){return"vjs-big-play-button"},t.handleClick=function(n){var t=this.player_.play(),f,i,r,u;if(this.mouseused_&&n.clientX&&n.clientY){f=this.player_.usingPlugin("eme")&&this.player_.eme.sessions&&this.player_.eme.sessions.length>0;fu(t);!this.player_.tech(!0)||(no||ge)&&f||this.player_.tech(!0).focus();return}if(i=this.player_.getChild("controlBar"),r=i&&i.getChild("playToggle"),!r){this.player_.tech(!0).focus();return}u=function(){return r.focus()};yf(t)?t.then(u,function(){}):this.setTimeout(u,1)},t.handleKeyDown=function(t){this.mouseused_=!1;n.prototype.handleKeyDown.call(this,t)},t.handleMouseDown=function(){this.mouseused_=!0},i}(dt);fl.prototype.controlText_="Play Video";r.registerComponent("BigPlayButton",fl);bb=function(n){function t(t,i){var r;return r=n.call(this,t,i)||this,r.controlText(i&&i.controlText||r.localize("Close")),r}u(t,n);var i=t.prototype;return i.buildCSSClass=function(){return"vjs-close-button "+n.prototype.buildCSSClass.call(this)},i.handleClick=function(){this.trigger({type:"close",bubbles:!1})},i.handleKeyDown=function(t){e.isEventKey(t,"Esc")?(t.preventDefault(),t.stopPropagation(),this.trigger("click")):n.prototype.handleKeyDown.call(this,t)},t}(dt);r.registerComponent("CloseButton",bb);el=function(n){function i(t,i){var r;i===void 0&&(i={});r=n.call(this,t,i)||this;i.replay=i.replay===undefined||i.replay;r.on(t,"play",r.handlePlay);r.on(t,"pause",r.handlePause);if(i.replay)r.on(t,"ended",r.handleEnded);return r}u(i,n);var t=i.prototype;return t.buildCSSClass=function(){return"vjs-play-control "+n.prototype.buildCSSClass.call(this)},t.handleClick=function(){this.player_.paused()?this.player_.play():this.player_.pause()},t.handleSeeked=function(n){this.removeClass("vjs-ended");this.player_.paused()?this.handlePause(n):this.handlePlay(n)},t.handlePlay=function(){this.removeClass("vjs-ended");this.removeClass("vjs-paused");this.addClass("vjs-playing");this.controlText("Pause")},t.handlePause=function(){this.removeClass("vjs-playing");this.addClass("vjs-paused");this.controlText("Play")},t.handleEnded=function(){this.removeClass("vjs-playing");this.addClass("vjs-ended");this.controlText("Replay");this.one(this.player_,"seeked",this.handleSeeked)},i}(dt);el.prototype.controlText_="Play";r.registerComponent("PlayToggle",el);ol=function(n,t){n=n<0?0:n;var i=Math.floor(n%60),r=Math.floor(n/60%60),u=Math.floor(n/3600),f=Math.floor(t/60%60),e=Math.floor(t/3600);return(isNaN(n)||n===Infinity)&&(u=r=i="-"),u=u>0||e>0?u+":":"",r=((u||f>=10)&&r<10?"0"+r:r)+":",i=i<10?"0"+i:i,u+r+i};so=ol;lr=function(n){function r(t,i){var r=n.call(this,t,i)||this;r.on(t,["timeupdate","ended"],r.updateContent);return r.updateTextNode_(),r}u(r,n);var i=r.prototype;return i.createEl=function(){var t=this.buildCSSClass(),i=n.prototype.createEl.call(this,"div",{className:t+" vjs-time-control vjs-control",innerHTML:'<span class="vjs-control-text" role="presentation">'+this.localize(this.labelText_)+" <\/span>"});return this.contentEl_=w("span",{className:t+"-display"},{"aria-live":"off",role:"presentation"}),i.appendChild(this.contentEl_),i},i.dispose=function(){this.contentEl_=null;this.textNode_=null;n.prototype.dispose.call(this)},i.updateTextNode_=function(n){var i=this;(n===void 0&&(n=0),n=cu(n),this.formattedTime_!==n)&&(this.formattedTime_=n,this.requestAnimationFrame(function(){if(i.contentEl_){var n=i.textNode_;(i.textNode_=t.createTextNode(i.formattedTime_),i.textNode_)&&(n?i.contentEl_.replaceChild(i.textNode_,n):i.contentEl_.appendChild(i.textNode_))}}))},i.updateContent=function(){},r}(r);lr.prototype.labelText_="Time";lr.prototype.controlText_="Time";r.registerComponent("TimeDisplay",lr);ho=function(n){function t(){return n.apply(this,arguments)||this}u(t,n);var i=t.prototype;return i.buildCSSClass=function(){return"vjs-current-time"},i.updateContent=function(){var n;n=this.player_.ended()?this.player_.duration():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();this.updateTextNode_(n)},t}(lr);ho.prototype.labelText_="Current Time";ho.prototype.controlText_="Current Time";r.registerComponent("CurrentTimeDisplay",ho);co=function(n){function t(t,i){var r=n.call(this,t,i)||this;r.on(t,"durationchange",r.updateContent);r.on(t,"loadstart",r.updateContent);r.on(t,"loadedmetadata",r.updateContent);return r}u(t,n);var i=t.prototype;return i.buildCSSClass=function(){return"vjs-duration"},i.updateContent=function(){var n=this.player_.duration();this.updateTextNode_(n)},t}(lr);co.prototype.labelText_="Duration";co.prototype.controlText_="Duration";r.registerComponent("DurationDisplay",co);kb=function(n){function t(){return n.apply(this,arguments)||this}u(t,n);var i=t.prototype;return i.createEl=function(){return n.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider",innerHTML:"<div><span>/<\/span><\/div>"},{"aria-hidden":!0})},t}(r);r.registerComponent("TimeDivider",kb);lo=function(n){function t(t,i){var r=n.call(this,t,i)||this;r.on(t,"durationchange",r.updateContent);return r}u(t,n);var i=t.prototype;return i.buildCSSClass=function(){return"vjs-remaining-time"},i.createEl=function(){var t=n.prototype.createEl.call(this);return t.insertBefore(w("span",{},{"aria-hidden":!0},"-"),this.contentEl_),t},i.updateContent=function(){if(typeof this.player_.duration()=="number"){var n;n=this.player_.ended()?0:this.player_.remainingTimeDisplay?this.player_.remainingTimeDisplay():this.player_.remainingTime();this.updateTextNode_(n)}},t}(lr);lo.prototype.labelText_="Remaining Time";lo.prototype.controlText_="Remaining Time";r.registerComponent("RemainingTimeDisplay",lo);db=function(n){function t(t,i){var r;r=n.call(this,t,i)||this;r.updateShowing();r.on(r.player(),"durationchange",r.updateShowing);return r}u(t,n);var i=t.prototype;return i.createEl=function(){var t=n.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});return this.contentEl_=w("div",{className:"vjs-live-display",innerHTML:'<span class="vjs-control-text">'+this.localize("Stream Type")+" <\/span>"+this.localize("LIVE")},{"aria-live":"off"}),t.appendChild(this.contentEl_),t},i.dispose=function(){this.contentEl_=null;n.prototype.dispose.call(this)},i.updateShowing=function(){this.player().duration()===Infinity?this.show():this.hide()},t}(r);r.registerComponent("LiveDisplay",db);sl=function(n){function i(t,i){var r;if(r=n.call(this,t,i)||this,r.updateLiveEdgeStatus(),r.player_.liveTracker)r.on(r.player_.liveTracker,"liveedgechange",r.updateLiveEdgeStatus);return r}u(i,n);var t=i.prototype;return t.createEl=function(){var t=n.prototype.createEl.call(this,"button",{className:"vjs-seek-to-live-control vjs-control"});return this.textEl_=w("span",{className:"vjs-seek-to-live-text",innerHTML:this.localize("LIVE")},{"aria-hidden":"true"}),t.appendChild(this.textEl_),t},t.updateLiveEdgeStatus=function(){!this.player_.liveTracker||this.player_.liveTracker.atLiveEdge()?(this.setAttribute("aria-disabled",!0),this.addClass("vjs-at-live-edge"),this.controlText("Seek to live, currently playing live")):(this.setAttribute("aria-disabled",!1),this.removeClass("vjs-at-live-edge"),this.controlText("Seek to live, currently behind live"))},t.handleClick=function(){this.player_.liveTracker.seekToLiveEdge()},t.dispose=function(){this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatus);this.textEl_=null;n.prototype.dispose.call(this)},i}(dt);sl.prototype.controlText_="Seek to live, currently playing live";r.registerComponent("SeekToLive",sl);ao=function(n,t,i){return n=Number(n),Math.min(i,Math.max(t,isNaN(n)?t:n))};vo=function(n){function i(t,i){var r;return r=n.call(this,t,i)||this,r.bar=r.getChild(r.options_.barName),r.vertical(!!r.options_.vertical),r.enable(),r}u(i,n);var t=i.prototype;return t.enabled=function(){return this.enabled_},t.enable=function(){if(!this.enabled()){this.on("mousedown",this.handleMouseDown);this.on("touchstart",this.handleMouseDown);this.on("keydown",this.handleKeyDown);this.on("click",this.handleClick);this.on(this.player_,"controlsvisible",this.update);if(this.playerEvent)this.on(this.player_,this.playerEvent,this.update);this.removeClass("disabled");this.setAttribute("tabindex",0);this.enabled_=!0}},t.disable=function(){if(this.enabled()){var n=this.bar.el_.ownerDocument;this.off("mousedown",this.handleMouseDown);this.off("touchstart",this.handleMouseDown);this.off("keydown",this.handleKeyDown);this.off("click",this.handleClick);this.off(this.player_,"controlsvisible",this.update);this.off(n,"mousemove",this.handleMouseMove);this.off(n,"mouseup",this.handleMouseUp);this.off(n,"touchmove",this.handleMouseMove);this.off(n,"touchend",this.handleMouseUp);this.removeAttribute("tabindex");this.addClass("disabled");this.playerEvent&&this.off(this.player_,this.playerEvent,this.update);this.enabled_=!1}},t.createEl=function(t,i,r){return i===void 0&&(i={}),r===void 0&&(r={}),i.className=i.className+" vjs-slider",i=y({tabIndex:0},i),r=y({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},r),n.prototype.createEl.call(this,t,i,r)},t.handleMouseDown=function(n){var t=this.bar.el_.ownerDocument;n.type==="mousedown"&&n.preventDefault();n.type!=="touchstart"||li||n.preventDefault();dy();this.addClass("vjs-sliding");this.trigger("slideractive");this.on(t,"mousemove",this.handleMouseMove);this.on(t,"mouseup",this.handleMouseUp);this.on(t,"touchmove",this.handleMouseMove);this.on(t,"touchend",this.handleMouseUp);this.handleMouseMove(n)},t.handleMouseMove=function(){},t.handleMouseUp=function(){var n=this.bar.el_.ownerDocument;gy();this.removeClass("vjs-sliding");this.trigger("sliderinactive");this.off(n,"mousemove",this.handleMouseMove);this.off(n,"mouseup",this.handleMouseUp);this.off(n,"touchmove",this.handleMouseMove);this.off(n,"touchend",this.handleMouseUp);this.update()},t.update=function(){var t=this,n;if(this.el_&&this.bar)return(n=this.getProgress(),n===this.progress_)?n:(this.progress_=n,this.requestAnimationFrame(function(){var i=t.vertical()?"height":"width";t.bar.el().style[i]=(n*100).toFixed(2)+"%"}),n)},t.getProgress=function(){return Number(ao(this.getPercent(),0,1).toFixed(4))},t.calculateDistance=function(n){var t=yh(this.el_,n);return this.vertical()?t.y:t.x},t.handleKeyDown=function(t){e.isEventKey(t,"Left")||e.isEventKey(t,"Down")?(t.preventDefault(),t.stopPropagation(),this.stepBack()):e.isEventKey(t,"Right")||e.isEventKey(t,"Up")?(t.preventDefault(),t.stopPropagation(),this.stepForward()):n.prototype.handleKeyDown.call(this,t)},t.handleClick=function(n){n.stopPropagation();n.preventDefault()},t.vertical=function(n){if(n===undefined)return this.vertical_||!1;this.vertical_=!!n;this.vertical_?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal")},i}(r);r.registerComponent("Slider",vo);yo=function(n,t){return ao(n/t*100,0,100).toFixed(2)+"%"};gb=function(n){function i(t,i){var r;r=n.call(this,t,i)||this;r.partEls_=[];r.on(t,"progress",r.update);return r}u(i,n);var r=i.prototype;return r.createEl=function(){var r=n.prototype.createEl.call(this,"div",{className:"vjs-load-progress"}),i=w("span",{className:"vjs-control-text"}),u=w("span",{textContent:this.localize("Loaded")}),f=t.createTextNode(": ");return this.percentageEl_=w("span",{className:"vjs-control-text-loaded-percentage",textContent:"0%"}),r.appendChild(i),i.appendChild(u),i.appendChild(f),i.appendChild(this.percentageEl_),r},r.dispose=function(){this.partEls_=null;this.percentageEl_=null;n.prototype.dispose.call(this)},r.update=function(){var n=this;this.requestAnimationFrame(function(){var s=n.player_.liveTracker,r=n.player_.buffered(),l=s&&s.isLive()?s.seekableEnd():n.player_.duration(),h=n.player_.bufferedEnd(),u=n.partEls_,f=yo(h,l),i,o;for(n.percent_!==f&&(n.el_.style.width=f,tu(n.percentageEl_,f),n.percent_=f),i=0;i<r.length;i++){var e=r.start(i),c=r.end(i),t=u[i];(t||(t=n.el_.appendChild(w()),u[i]=t),t.dataset.start!==e||t.dataset.end!==c)&&(t.dataset.start=e,t.dataset.end=c,t.style.left=yo(e,h),t.style.width=yo(c-e,h))}for(o=u.length;o>r.length;o--)n.el_.removeChild(u[o-1]);u.length=r.length})},i}(r);r.registerComponent("LoadProgressBar",gb);nk=function(n){function i(t,i){var r;return r=n.call(this,t,i)||this,r.update=rr(s(o(r),r.update),ci),r}u(i,n);var t=i.prototype;return t.createEl=function(){return n.prototype.createEl.call(this,"div",{className:"vjs-time-tooltip"},{"aria-hidden":"true"})},t.update=function(n,t,i){var u=hf(this.el_),f=hf(this.player_.el()),e=n.width*t;if(f&&u){var o=n.left-f.left+e,s=n.width-e+(f.right-n.right),r=u.width/2;o<r?r+=r-o:s<r&&(r=s);r<0?r=0:r>u.width&&(r=u.width);this.el_.style.right="-"+r+"px";this.write(i)}},t.write=function(n){tu(this.el_,n)},t.updateTime=function(n,t,i,r){var u=this;this.rafId_&&this.cancelAnimationFrame(this.rafId_);this.rafId_=this.requestAnimationFrame(function(){var e,s=u.player_.duration(),f,o;u.player_.liveTracker&&u.player_.liveTracker.isLive()?(f=u.player_.liveTracker.liveWindow(),o=f-t*f,e=(o<1?"":"-")+cu(o,f)):e=cu(i,s);u.update(n,t,e);r&&r()})},i}(r);r.registerComponent("TimeTooltip",nk);po=function(n){function t(t,i){var r;return r=n.call(this,t,i)||this,r.update=rr(s(o(r),r.update),ci),r}u(t,n);var i=t.prototype;return i.createEl=function(){return n.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar"},{"aria-hidden":"true"})},i.update=function(n,t){var i=this.getChild("timeTooltip"),r;i&&(r=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),i.updateTime(n,t,r))},t}(r);po.prototype.options_={children:[]};ri||di||po.prototype.options_.children.push("timeTooltip");r.registerComponent("PlayProgressBar",po);hl=function(n){function t(t,i){var r;return r=n.call(this,t,i)||this,r.update=rr(s(o(r),r.update),ci),r}u(t,n);var i=t.prototype;return i.createEl=function(){return n.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},i.update=function(n,t){var i=this,r=t*this.player_.duration();this.getChild("timeTooltip").updateTime(n,t,r,function(){i.el_.style.left=n.width*t+"px"})},t}(r);hl.prototype.options_={children:["timeTooltip"]};r.registerComponent("MouseTimeDisplay",hl);var wo=5,tk=12,cl=function(n){function r(t,i){var r;return r=n.call(this,t,i)||this,r.setEventHandlers_(),r}u(r,n);var i=r.prototype;return i.setEventHandlers_=function(){this.update_=s(this,this.update);this.update=rr(this.update_,ci);this.on(this.player_,["ended","durationchange","timeupdate"],this.update);if(this.player_.liveTracker)this.on(this.player_.liveTracker,"liveedgechange",this.update);this.updateInterval=null;this.on(this.player_,["playing"],this.enableInterval_);this.on(this.player_,["ended","pause","waiting"],this.disableInterval_);if("hidden"in t&&"visibilityState"in t)this.on(t,"visibilitychange",this.toggleVisibility_)},i.toggleVisibility_=function(n){t.hidden?this.disableInterval_(n):(this.enableInterval_(),this.update())},i.enableInterval_=function(){this.updateInterval||(this.updateInterval=this.setInterval(this.update,ci))},i.disableInterval_=function(n){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&n.type!=="ended"||this.updateInterval&&(this.clearInterval(this.updateInterval),this.updateInterval=null)},i.createEl=function(){return n.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})},i.update=function(){var t=this,i=n.prototype.update.call(this);return this.requestAnimationFrame(function(){var r=t.player_.ended()?t.player_.duration():t.getCurrentTime_(),u=t.player_.liveTracker,n=t.player_.duration();u&&u.isLive()&&(n=t.player_.liveTracker.liveCurrentTime());t.percent_!==i&&(t.el_.setAttribute("aria-valuenow",(i*100).toFixed(2)),t.percent_=i);(t.currentTime_!==r||t.duration_!==n)&&(t.el_.setAttribute("aria-valuetext",t.localize("progress bar timing: currentTime={1} duration={2}",[cu(r,n),cu(n,n)],"{1} of {2}")),t.currentTime_=r,t.duration_=n);t.bar&&t.bar.update(hf(t.el()),t.getProgress())}),i},i.getCurrentTime_=function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()},i.getPercent=function(){var i=this.getCurrentTime_(),t,n=this.player_.liveTracker;return n&&n.isLive()?(t=(i-n.seekableStart())/n.liveWindow(),n.atLiveEdge()&&(t=1)):t=i/this.player_.duration(),t},i.handleMouseDown=function(t){iu(t)&&(t.stopPropagation(),this.player_.scrubbing(!0),this.videoWasPlaying=!this.player_.paused(),this.player_.pause(),n.prototype.handleMouseDown.call(this,t))},i.handleMouseMove=function(n){var t,u,i,r,f;if(iu(n)){if(u=this.calculateDistance(n),i=this.player_.liveTracker,i&&i.isLive()){if(r=i.seekableStart(),f=i.liveCurrentTime(),t=r+u*i.liveWindow(),t>=f&&(t=f),t<=r&&(t=r+.1),t===Infinity)return}else t=u*this.player_.duration(),t===this.player_.duration()&&(t=t-.1);this.player_.currentTime(t)}},i.enable=function(){n.prototype.enable.call(this);var t=this.getChild("mouseTimeDisplay");t&&t.show()},i.disable=function(){n.prototype.disable.call(this);var t=this.getChild("mouseTimeDisplay");t&&t.hide()},i.handleMouseUp=function(t){n.prototype.handleMouseUp.call(this,t);t&&t.stopPropagation();this.player_.scrubbing(!1);this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0});this.videoWasPlaying?fu(this.player_.play()):this.update_()},i.stepForward=function(){this.player_.currentTime(this.player_.currentTime()+wo)},i.stepBack=function(){this.player_.currentTime(this.player_.currentTime()-wo)},i.handleAction=function(){this.player_.paused()?this.player_.play():this.player_.pause()},i.handleKeyDown=function(t){if(e.isEventKey(t,"Space")||e.isEventKey(t,"Enter"))t.preventDefault(),t.stopPropagation(),this.handleAction(t);else if(e.isEventKey(t,"Home"))t.preventDefault(),t.stopPropagation(),this.player_.currentTime(0);else if(e.isEventKey(t,"End"))t.preventDefault(),t.stopPropagation(),this.player_.currentTime(this.player_.duration());else if(/^[0-9]$/.test(e(t))){t.preventDefault();t.stopPropagation();var i=(e.codes[e(t)]-e.codes["0"])/10;this.player_.currentTime(this.player_.duration()*i)}else e.isEventKey(t,"PgDn")?(t.preventDefault(),t.stopPropagation(),this.player_.currentTime(this.player_.currentTime()-wo*tk)):e.isEventKey(t,"PgUp")?(t.preventDefault(),t.stopPropagation(),this.player_.currentTime(this.player_.currentTime()+wo*tk)):n.prototype.handleKeyDown.call(this,t)},r}(vo);cl.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"};ri||di||cl.prototype.options_.children.splice(1,0,"mouseTimeDisplay");r.registerComponent("SeekBar",cl);ll=function(n){function i(t,i){var r;return r=n.call(this,t,i)||this,r.handleMouseMove=rr(s(o(r),r.handleMouseMove),ci),r.throttledHandleMouseSeek=rr(s(o(r),r.handleMouseSeek),ci),r.enable(),r}u(i,n);var t=i.prototype;return t.createEl=function(){return n.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},t.handleMouseMove=function(n){var t=this.getChild("seekBar"),i,r;if(t&&(i=t.getChild("playProgressBar"),r=t.getChild("mouseTimeDisplay"),i||r)){var f=t.el(),e=hf(f),u=yh(f,n).x;u=ao(0,1,u);r&&r.update(e,u);i&&i.update(e,t.getProgress())}},t.handleMouseSeek=function(n){var t=this.getChild("seekBar");t&&t.handleMouseMove(n)},t.enabled=function(){return this.enabled_},t.disable=function(){(this.children().forEach(function(n){return n.disable&&n.disable()}),this.enabled())&&(this.off(["mousedown","touchstart"],this.handleMouseDown),this.off(this.el_,"mousemove",this.handleMouseMove),this.handleMouseUp(),this.addClass("disabled"),this.enabled_=!1)},t.enable=function(){if(this.children().forEach(function(n){return n.enable&&n.enable()}),!this.enabled()){this.on(["mousedown","touchstart"],this.handleMouseDown);this.on(this.el_,"mousemove",this.handleMouseMove);this.removeClass("disabled");this.enabled_=!0}},t.handleMouseDown=function(n){var t=this.el_.ownerDocument,i=this.getChild("seekBar");i&&i.handleMouseDown(n);this.on(t,"mousemove",this.throttledHandleMouseSeek);this.on(t,"touchmove",this.throttledHandleMouseSeek);this.on(t,"mouseup",this.handleMouseUp);this.on(t,"touchend",this.handleMouseUp)},t.handleMouseUp=function(n){var t=this.el_.ownerDocument,i=this.getChild("seekBar");i&&i.handleMouseUp(n);this.off(t,"mousemove",this.throttledHandleMouseSeek);this.off(t,"touchmove",this.throttledHandleMouseSeek);this.off(t,"mouseup",this.handleMouseUp);this.off(t,"touchend",this.handleMouseUp)},i}(r);ll.prototype.options_={children:["seekBar"]};r.registerComponent("ProgressControl",ll);al=function(n){function i(i,r){var u=n.call(this,i,r)||this;u.on(i,["enterpictureinpicture","leavepictureinpicture"],u.handlePictureInPictureChange);return t.pictureInPictureEnabled||u.disable(),u}u(i,n);var r=i.prototype;return r.buildCSSClass=function(){return"vjs-picture-in-picture-control "+n.prototype.buildCSSClass.call(this)},r.handlePictureInPictureChange=function(){this.player_.isInPictureInPicture()?this.controlText("Exit Picture-in-Picture"):this.controlText("Picture-in-Picture")},r.handleClick=function(){this.player_.isInPictureInPicture()?this.player_.exitPictureInPicture():this.player_.requestPictureInPicture()},i}(dt);al.prototype.controlText_="Picture-in-Picture";r.registerComponent("PictureInPictureToggle",al);vl=function(n){function i(i,r){var u=n.call(this,i,r)||this;u.on(i,"fullscreenchange",u.handleFullscreenChange);return t[i.fsApi_.fullscreenEnabled]===!1&&u.disable(),u}u(i,n);var r=i.prototype;return r.buildCSSClass=function(){return"vjs-fullscreen-control "+n.prototype.buildCSSClass.call(this)},r.handleFullscreenChange=function(){this.player_.isFullscreen()?this.controlText("Non-Fullscreen"):this.controlText("Fullscreen")},r.handleClick=function(){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()},i}(dt);vl.prototype.controlText_="Fullscreen";r.registerComponent("FullscreenToggle",vl);ik=function(n,t){t.tech_&&!t.tech_.featuresVolumeControl&&n.addClass("vjs-hidden");n.on(t,"loadstart",function(){t.tech_.featuresVolumeControl?n.removeClass("vjs-hidden"):n.addClass("vjs-hidden")})};rk=function(n){function t(){return n.apply(this,arguments)||this}u(t,n);var i=t.prototype;return i.createEl=function(){return n.prototype.createEl.call(this,"div",{className:"vjs-volume-level",innerHTML:'<span class="vjs-control-text"><\/span>'})},t}(r);r.registerComponent("VolumeLevel",rk);bo=function(n){function i(t,i){var r=n.call(this,t,i)||this;r.on("slideractive",r.updateLastVolume_);r.on(t,"volumechange",r.updateARIAAttributes);return t.ready(function(){return r.updateARIAAttributes()}),r}u(i,n);var t=i.prototype;return t.createEl=function(){return n.prototype.createEl.call(this,"div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})},t.handleMouseDown=function(t){iu(t)&&n.prototype.handleMouseDown.call(this,t)},t.handleMouseMove=function(n){iu(n)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(n)))},t.checkMuted=function(){this.player_.muted()&&this.player_.muted(!1)},t.getPercent=function(){return this.player_.muted()?0:this.player_.volume()},t.stepForward=function(){this.checkMuted();this.player_.volume(this.player_.volume()+.1)},t.stepBack=function(){this.checkMuted();this.player_.volume(this.player_.volume()-.1)},t.updateARIAAttributes=function(){var n=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",n);this.el_.setAttribute("aria-valuetext",n+"%")},t.volumeAsPercentage_=function(){return Math.round(this.player_.volume()*100)},t.updateLastVolume_=function(){var n=this,t=this.player_.volume();this.one("sliderinactive",function(){n.player_.volume()===0&&n.player_.lastVolume_(t)})},i}(vo);bo.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"};bo.prototype.playerEvent="volumechange";r.registerComponent("VolumeBar",bo);yl=function(n){function i(t,i){var r;i===void 0&&(i={});i.vertical=i.vertical||!1;(typeof i.volumeBar=="undefined"||ff(i.volumeBar))&&(i.volumeBar=i.volumeBar||{},i.volumeBar.vertical=i.vertical);r=n.call(this,t,i)||this;ik(o(r),t);r.throttledHandleMouseMove=rr(s(o(r),r.handleMouseMove),ci);r.on("mousedown",r.handleMouseDown);r.on("touchstart",r.handleMouseDown);r.on(r.volumeBar,["focus","slideractive"],function(){r.volumeBar.addClass("vjs-slider-active");r.addClass("vjs-slider-active");r.trigger("slideractive")});r.on(r.volumeBar,["blur","sliderinactive"],function(){r.volumeBar.removeClass("vjs-slider-active");r.removeClass("vjs-slider-active");r.trigger("sliderinactive")});return r}u(i,n);var t=i.prototype;return t.createEl=function(){var t="vjs-volume-horizontal";return this.options_.vertical&&(t="vjs-volume-vertical"),n.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control "+t})},t.handleMouseDown=function(){var n=this.el_.ownerDocument;this.on(n,"mousemove",this.throttledHandleMouseMove);this.on(n,"touchmove",this.throttledHandleMouseMove);this.on(n,"mouseup",this.handleMouseUp);this.on(n,"touchend",this.handleMouseUp)},t.handleMouseUp=function(){var n=this.el_.ownerDocument;this.off(n,"mousemove",this.throttledHandleMouseMove);this.off(n,"touchmove",this.throttledHandleMouseMove);this.off(n,"mouseup",this.handleMouseUp);this.off(n,"touchend",this.handleMouseUp)},t.handleMouseMove=function(n){this.volumeBar.handleMouseMove(n)},i}(r);yl.prototype.options_={children:["volumeBar"]};r.registerComponent("VolumeControl",yl);uk=function(n,t){t.tech_&&!t.tech_.featuresMuteControl&&n.addClass("vjs-hidden");n.on(t,"loadstart",function(){t.tech_.featuresMuteControl?n.removeClass("vjs-hidden"):n.addClass("vjs-hidden")})};pl=function(n){function i(t,i){var r;r=n.call(this,t,i)||this;uk(o(r),t);r.on(t,["loadstart","volumechange"],r.update);return r}u(i,n);var t=i.prototype;return t.buildCSSClass=function(){return"vjs-mute-control "+n.prototype.buildCSSClass.call(this)},t.handleClick=function(){var i=this.player_.volume(),n=this.player_.lastVolume_(),t;i===0?(t=n<.1?.1:n,this.player_.volume(t),this.player_.muted(!1)):this.player_.muted(this.player_.muted()?!1:!0)},t.update=function(){this.updateIcon_();this.updateControlText_()},t.updateIcon_=function(){var i=this.player_.volume(),n=3,t;for(ri&&this.player_.tech_&&this.player_.tech_.el_&&this.player_.muted(this.player_.tech_.el_.muted),i===0||this.player_.muted()?n=0:i<.33?n=1:i<.67&&(n=2),t=0;t<4;t++)of(this.el_,"vjs-vol-"+t);si(this.el_,"vjs-vol-"+n)},t.updateControlText_=function(){var t=this.player_.muted()||this.player_.volume()===0,n=t?"Unmute":"Mute";this.controlText()!==n&&this.controlText(n)},i}(dt);pl.prototype.controlText_="Mute";r.registerComponent("MuteToggle",pl);wl=function(n){function r(t,i){var r;i===void 0&&(i={});i.inline=typeof i.inline!="undefined"?i.inline:!0;(typeof i.volumeControl=="undefined"||ff(i.volumeControl))&&(i.volumeControl=i.volumeControl||{},i.volumeControl.vertical=!i.inline);r=n.call(this,t,i)||this;r.on(t,["loadstart"],r.volumePanelState_);r.on(r.muteToggle,"keyup",r.handleKeyPress);r.on(r.volumeControl,"keyup",r.handleVolumeControlKeyUp);r.on("keydown",r.handleKeyPress);r.on("mouseover",r.handleMouseOver);r.on("mouseout",r.handleMouseOut);r.on(r.volumeControl,["slideractive"],r.sliderActive_);r.on(r.volumeControl,["sliderinactive"],r.sliderInactive_);return r}u(r,n);var i=r.prototype;return i.sliderActive_=function(){this.addClass("vjs-slider-active")},i.sliderInactive_=function(){this.removeClass("vjs-slider-active")},i.volumePanelState_=function(){this.volumeControl.hasClass("vjs-hidden")&&this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-hidden");this.volumeControl.hasClass("vjs-hidden")&&!this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-mute-toggle-only")},i.createEl=function(){var t="vjs-volume-panel-horizontal";return this.options_.inline||(t="vjs-volume-panel-vertical"),n.prototype.createEl.call(this,"div",{className:"vjs-volume-panel vjs-control "+t})},i.dispose=function(){this.handleMouseOut();n.prototype.dispose.call(this)},i.handleVolumeControlKeyUp=function(n){e.isEventKey(n,"Esc")&&this.muteToggle.focus()},i.handleMouseOver=function(){this.addClass("vjs-hover");yt(t,"keyup",s(this,this.handleKeyPress))},i.handleMouseOut=function(){this.removeClass("vjs-hover");it(t,"keyup",s(this,this.handleKeyPress))},i.handleKeyPress=function(n){e.isEventKey(n,"Esc")&&this.handleMouseOut()},r}(r);wl.prototype.options_={children:["muteToggle","volumeControl"]};r.registerComponent("VolumePanel",wl);ko=function(n){function f(t,i){var r;r=n.call(this,t,i)||this;i&&(r.menuButton_=i.menuButton);r.focusedChild_=-1;r.on("keydown",r.handleKeyDown);return r.boundHandleBlur_=s(o(r),r.handleBlur),r.boundHandleTapClick_=s(o(r),r.handleTapClick),r}u(f,n);var i=f.prototype;return i.addEventListenerForItem=function(n){if(n instanceof r){this.on(n,"blur",this.boundHandleBlur_);this.on(n,["tap","click"],this.boundHandleTapClick_)}},i.removeEventListenerForItem=function(n){n instanceof r&&(this.off(n,"blur",this.boundHandleBlur_),this.off(n,["tap","click"],this.boundHandleTapClick_))},i.removeChild=function(t){typeof t=="string"&&(t=this.getChild(t));this.removeEventListenerForItem(t);n.prototype.removeChild.call(this,t)},i.addItem=function(n){var t=this.addChild(n);t&&this.addEventListenerForItem(t)},i.createEl=function(){var i=this.options_.contentElType||"ul",t;return this.contentEl_=w(i,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu"),t=n.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"}),t.appendChild(this.contentEl_),yt(t,"click",function(n){n.preventDefault();n.stopImmediatePropagation()}),t},i.dispose=function(){this.contentEl_=null;this.boundHandleBlur_=null;this.boundHandleTapClick_=null;n.prototype.dispose.call(this)},i.handleBlur=function(n){var r=n.relatedTarget||t.activeElement,i;this.children().some(function(n){return n.el()===r})||(i=this.menuButton_,i&&i.buttonPressed_&&r!==i.el().firstChild&&i.unpressButton())},i.handleTapClick=function(n){var t,i;if(this.menuButton_){if(this.menuButton_.unpressButton(),t=this.children(),!Array.isArray(t))return;if(i=t.filter(function(t){return t.el()===n.target})[0],!i)return;i.name()!=="CaptionSettingsMenuItem"&&this.menuButton_.focus()}},i.handleKeyDown=function(n){e.isEventKey(n,"Left")||e.isEventKey(n,"Down")?(n.preventDefault(),n.stopPropagation(),this.stepForward()):(e.isEventKey(n,"Right")||e.isEventKey(n,"Up"))&&(n.preventDefault(),n.stopPropagation(),this.stepBack())},i.stepForward=function(){var n=0;this.focusedChild_!==undefined&&(n=this.focusedChild_+1);this.focus(n)},i.stepBack=function(){var n=0;this.focusedChild_!==undefined&&(n=this.focusedChild_-1);this.focus(n)},i.focus=function(n){n===void 0&&(n=0);var t=this.children().slice(),i=t.length&&t[0].className&&/vjs-menu-title/.test(t[0].className);i&&t.shift();t.length>0&&(n<0?n=0:n>=t.length&&(n=t.length-1),this.focusedChild_=n,t[n].el_.focus())},f}(r);r.registerComponent("Menu",ko);go=function(n){function f(i,r){var u,f;r===void 0&&(r={});u=n.call(this,i,r)||this;u.menuButton_=new dt(i,r);u.menuButton_.controlText(u.controlText_);u.menuButton_.el_.setAttribute("aria-haspopup","true");f=dt.prototype.buildCSSClass();u.menuButton_.el_.className=u.buildCSSClass()+" "+f;u.menuButton_.removeClass("vjs-control");u.addChild(u.menuButton_);u.update();u.enabled_=!0;u.on(u.menuButton_,"tap",u.handleClick);u.on(u.menuButton_,"click",u.handleClick);u.on(u.menuButton_,"keydown",u.handleKeyDown);u.on(u.menuButton_,"mouseenter",function(){u.addClass("vjs-hover");u.menu.show();yt(t,"keyup",s(o(u),u.handleMenuKeyUp))});u.on("mouseleave",u.handleMouseLeave);u.on("keydown",u.handleSubmenuKeyDown);return u}u(f,n);var i=f.prototype;return i.update=function(){var n=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu));this.menu=n;this.addChild(n);this.buttonPressed_=!1;this.menuButton_.el_.setAttribute("aria-expanded","false");this.items&&this.items.length<=this.hideThreshold_?this.hide():this.show()},i.createMenu=function(){var t=new ko(this.player_,{menuButton:this}),i,u,n;if(this.hideThreshold_=0,this.options_.title&&(i=w("li",{className:"vjs-menu-title",innerHTML:b(this.options_.title),tabIndex:-1}),this.hideThreshold_+=1,u=new r(this.player_,{el:i}),t.addItem(u)),this.items=this.createItems(),this.items)for(n=0;n<this.items.length;n++)t.addItem(this.items[n]);return t},i.createItems=function(){},i.createEl=function(){return n.prototype.createEl.call(this,"div",{className:this.buildWrapperCSSClass()},{})},i.buildWrapperCSSClass=function(){var t="vjs-menu-button",i;return t+=this.options_.inline===!0?"-inline":"-popup",i=dt.prototype.buildCSSClass(),"vjs-menu-button "+t+" "+i+" "+n.prototype.buildCSSClass.call(this)},i.buildCSSClass=function(){var t="vjs-menu-button";return t+=this.options_.inline===!0?"-inline":"-popup","vjs-menu-button "+t+" "+n.prototype.buildCSSClass.call(this)},i.controlText=function(n,t){return t===void 0&&(t=this.menuButton_.el()),this.menuButton_.controlText(n,t)},i.dispose=function(){this.handleMouseLeave();n.prototype.dispose.call(this)},i.handleClick=function(){this.buttonPressed_?this.unpressButton():this.pressButton()},i.handleMouseLeave=function(){this.removeClass("vjs-hover");it(t,"keyup",s(this,this.handleMenuKeyUp))},i.focus=function(){this.menuButton_.focus()},i.blur=function(){this.menuButton_.blur()},i.handleKeyDown=function(n){e.isEventKey(n,"Esc")||e.isEventKey(n,"Tab")?(this.buttonPressed_&&this.unpressButton(),e.isEventKey(n,"Tab")||(n.preventDefault(),this.menuButton_.focus())):(e.isEventKey(n,"Up")||e.isEventKey(n,"Down"))&&(this.buttonPressed_||(n.preventDefault(),this.pressButton()))},i.handleMenuKeyUp=function(n){(e.isEventKey(n,"Esc")||e.isEventKey(n,"Tab"))&&this.removeClass("vjs-hover")},i.handleSubmenuKeyPress=function(n){this.handleSubmenuKeyDown(n)},i.handleSubmenuKeyDown=function(n){(e.isEventKey(n,"Esc")||e.isEventKey(n,"Tab"))&&(this.buttonPressed_&&this.unpressButton(),e.isEventKey(n,"Tab")||(n.preventDefault(),this.menuButton_.focus()))},i.pressButton=function(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.show(),this.menu.lockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","true"),ri&&yy())return;this.menu.focus()}},i.unpressButton=function(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menu.hide(),this.menuButton_.el_.setAttribute("aria-expanded","false"))},i.disable=function(){this.unpressButton();this.enabled_=!1;this.addClass("vjs-disabled");this.menuButton_.disable()},i.enable=function(){this.enabled_=!0;this.removeClass("vjs-disabled");this.menuButton_.enable()},f}(r);r.registerComponent("MenuButton",go);ns=function(n){function t(t,i){var r,f=i.tracks,u;if(r=n.call(this,t,i)||this,r.items.length<=1&&r.hide(),!f)return o(r);u=s(o(r),r.update);f.addEventListener("removetrack",u);f.addEventListener("addtrack",u);r.player_.on("ready",u);r.player_.on("dispose",function(){f.removeEventListener("removetrack",u);f.removeEventListener("addtrack",u)});return r}return u(t,n),t}(go);r.registerComponent("TrackButton",ns);fk=["Tab","Esc","Up","Down","Right","Left"];lu=function(n){function i(t,i){var r;return r=n.call(this,t,i)||this,r.selectable=i.selectable,r.isSelected_=i.selected||!1,r.multiSelectable=i.multiSelectable,r.selected(r.isSelected_),r.selectable?r.multiSelectable?r.el_.setAttribute("role","menuitemcheckbox"):r.el_.setAttribute("role","menuitemradio"):r.el_.setAttribute("role","menuitem"),r}u(i,n);var t=i.prototype;return t.createEl=function(t,i,r){return this.nonIconControl=!0,n.prototype.createEl.call(this,"li",y({className:"vjs-menu-item",innerHTML:'<span class="vjs-menu-item-text">'+this.localize(this.options_.label)+"<\/span>",tabIndex:-1},i),r)},t.handleKeyDown=function(t){fk.some(function(n){return e.isEventKey(t,n)})||n.prototype.handleKeyDown.call(this,t)},t.handleClick=function(){this.selected(!0)},t.selected=function(n){this.selectable&&(n?(this.addClass("vjs-selected"),this.el_.setAttribute("aria-checked","true"),this.controlText(", selected"),this.isSelected_=!0):(this.removeClass("vjs-selected"),this.el_.setAttribute("aria-checked","false"),this.controlText(""),this.isSelected_=!1))},i}(gf);r.registerComponent("MenuItem",lu);au=function(i){function f(r,u){var f,c=u.track,e=r.textTracks(),s,l,h;u.label=c.label||c.language||"Unknown";u.selected=c.mode==="showing";f=i.call(this,r,u)||this;f.track=c;f.kinds=(u.kinds||[u.kind||f.track.kind]).filter(Boolean);s=function(){for(var t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];f.handleTracksChange.apply(o(f),i)};l=function(){for(var t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];f.handleSelectedLanguageChange.apply(o(f),i)};r.on(["loadstart","texttrackchange"],s);e.addEventListener("change",s);e.addEventListener("selectedlanguagechange",l);f.on("dispose",function(){r.off(["loadstart","texttrackchange"],s);e.removeEventListener("change",s);e.removeEventListener("selectedlanguagechange",l)});if(e.onchange===undefined)f.on(["tap","click"],function(){if(typeof n.Event!="object")try{h=new n.Event("change")}catch(i){}h||(h=t.createEvent("Event"),h.initEvent("change",!0,!0));e.dispatchEvent(h)});return f.handleTracksChange(),f}u(f,i);var r=f.prototype;return r.handleClick=function(n){var f=this.track,u=this.player_.textTracks(),r,t;if(i.prototype.handleClick.call(this,n),u)for(r=0;r<u.length;r++)(t=u[r],this.kinds.indexOf(t.kind)!==-1)&&(t===f?t.mode!=="showing"&&(t.mode="showing"):t.mode!=="disabled"&&(t.mode="disabled"))},r.handleTracksChange=function(){var n=this.track.mode==="showing";n!==this.isSelected_&&this.selected(n)},r.handleSelectedLanguageChange=function(){if(this.track.mode==="showing"){var n=this.player_.cache_.selectedLanguage;if(n&&n.enabled&&n.language===this.track.language&&n.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}},r.dispose=function(){this.track=null;i.prototype.dispose.call(this)},f}(lu);r.registerComponent("TextTrackMenuItem",au);bl=function(n){function t(t,i){return i.track={player:t,kind:i.kind,kinds:i.kinds,"default":!1,mode:"disabled"},i.kinds||(i.kinds=[i.kind]),i.track.label=i.label?i.label:i.kinds.join(" and ")+" off",i.selectable=!0,i.multiSelectable=!1,n.call(this,t,i)||this}u(t,n);var i=t.prototype;return i.handleTracksChange=function(){for(var r=this.player().textTracks(),t=!0,i,n=0,u=r.length;n<u;n++)if(i=r[n],this.options_.kinds.indexOf(i.kind)>-1&&i.mode==="showing"){t=!1;break}t!==this.isSelected_&&this.selected(t)},i.handleSelectedLanguageChange=function(){for(var i=this.player().textTracks(),r=!0,t,n=0,u=i.length;n<u;n++)if(t=i[n],["captions","descriptions","subtitles"].indexOf(t.kind)>-1&&t.mode==="showing"){r=!1;break}r&&(this.player_.cache_.selectedLanguage={enabled:!1})},t}(au);r.registerComponent("OffTextTrackMenuItem",bl);ar=function(n){function t(t,i){return i===void 0&&(i={}),i.tracks=t.textTracks(),n.call(this,t,i)||this}u(t,n);var i=t.prototype;return i.createItems=function(n,t){var e,u,i,r,f;for(n===void 0&&(n=[]),t===void 0&&(t=au),this.label_&&(e=this.label_+" off"),n.push(new bl(this.player_,{kinds:this.kinds_,kind:this.kind_,label:e})),this.hideThreshold_+=1,u=this.player_.textTracks(),Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]),i=0;i<u.length;i++)r=u[i],this.kinds_.indexOf(r.kind)>-1&&(f=new t(this.player_,{track:r,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1}),f.addClass("vjs-"+r.kind+"-menu-item"),n.push(f));return n},t}(ns);r.registerComponent("TextTrackButton",ar);kl=function(n){function t(t,i){var r,f=i.track,u=i.cue,e=t.currentTime();return i.selectable=!0,i.multiSelectable=!1,i.label=u.text,i.selected=u.startTime<=e&&e<u.endTime,r=n.call(this,t,i)||this,r.track=f,r.cue=u,f.addEventListener("cuechange",s(o(r),r.update)),r}u(t,n);var i=t.prototype;return i.handleClick=function(){n.prototype.handleClick.call(this);this.player_.currentTime(this.cue.startTime);this.update(this.cue.startTime)},i.update=function(){var n=this.cue,t=this.player_.currentTime();this.selected(n.startTime<=t&&t<n.endTime)},t}(lu);r.registerComponent("ChaptersTrackMenuItem",kl);ts=function(n){function i(t,i,r){return n.call(this,t,i,r)||this}u(i,n);var t=i.prototype;return t.buildCSSClass=function(){return"vjs-chapters-button "+n.prototype.buildCSSClass.call(this)},t.buildWrapperCSSClass=function(){return"vjs-chapters-button "+n.prototype.buildWrapperCSSClass.call(this)},t.update=function(t){(!this.track_||t&&(t.type==="addtrack"||t.type==="removetrack"))&&this.setTrack(this.findChaptersTrack());n.prototype.update.call(this)},t.setTrack=function(n){var t,i;this.track_!==n&&(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_&&(t=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_),t&&t.removeEventListener("load",this.updateHandler_),this.track_=null),this.track_=n,this.track_&&(this.track_.mode="hidden",i=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_),i&&i.addEventListener("load",this.updateHandler_)))},t.findChaptersTrack=function(){for(var i=this.player_.textTracks()||[],t,n=i.length-1;n>=0;n--)if(t=i[n],t.kind===this.kind_)return t},t.getMenuCaption=function(){return this.track_&&this.track_.label?this.track_.label:this.localize(b(this.kind_))},t.createMenu=function(){return this.options_.title=this.getMenuCaption(),n.prototype.createMenu.call(this)},t.createItems=function(){var i=[],n,t,r,u,f;if(!this.track_||(n=this.track_.cues,!n))return i;for(t=0,r=n.length;t<r;t++)u=n[t],f=new kl(this.player_,{track:this.track_,cue:u}),i.push(f);return i},i}(ar);ts.prototype.kind_="chapters";ts.prototype.controlText_="Chapters";r.registerComponent("ChaptersButton",ts);is=function(n){function t(t,i,r){var u,f,e;u=n.call(this,t,i,r)||this;f=t.textTracks();e=s(o(u),u.handleTracksChange);f.addEventListener("change",e);u.on("dispose",function(){f.removeEventListener("change",e)});return u}u(t,n);var i=t.prototype;return i.handleTracksChange=function(){for(var i=this.player().textTracks(),r=!1,t,n=0,u=i.length;n<u;n++)if(t=i[n],t.kind!==this.kind_&&t.mode==="showing"){r=!0;break}r?this.disable():this.enable()},i.buildCSSClass=function(){return"vjs-descriptions-button "+n.prototype.buildCSSClass.call(this)},i.buildWrapperCSSClass=function(){return"vjs-descriptions-button "+n.prototype.buildWrapperCSSClass.call(this)},t}(ar);is.prototype.kind_="descriptions";is.prototype.controlText_="Descriptions";r.registerComponent("DescriptionsButton",is);rs=function(n){function t(t,i,r){return n.call(this,t,i,r)||this}u(t,n);var i=t.prototype;return i.buildCSSClass=function(){return"vjs-subtitles-button "+n.prototype.buildCSSClass.call(this)},i.buildWrapperCSSClass=function(){return"vjs-subtitles-button "+n.prototype.buildWrapperCSSClass.call(this)},t}(ar);rs.prototype.kind_="subtitles";rs.prototype.controlText_="Subtitles";r.registerComponent("SubtitlesButton",rs);us=function(n){function t(t,i){var r;return i.track={player:t,kind:i.kind,label:i.kind+" settings",selectable:!1,"default":!1,mode:"disabled"},i.selectable=!1,i.name="CaptionSettingsMenuItem",r=n.call(this,t,i)||this,r.addClass("vjs-texttrack-settings"),r.controlText(", opens "+i.kind+" settings dialog"),r}u(t,n);var i=t.prototype;return i.handleClick=function(){this.player().getChild("textTrackSettings").open()},t}(au);r.registerComponent("CaptionSettingsMenuItem",us);fs=function(n){function t(t,i,r){return n.call(this,t,i,r)||this}u(t,n);var i=t.prototype;return i.buildCSSClass=function(){return"vjs-captions-button "+n.prototype.buildCSSClass.call(this)},i.buildWrapperCSSClass=function(){return"vjs-captions-button "+n.prototype.buildWrapperCSSClass.call(this)},i.createItems=function(){var t=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(t.push(new us(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),n.prototype.createItems.call(this,t)},t}(ar);fs.prototype.kind_="captions";fs.prototype.controlText_="Captions";r.registerComponent("CaptionsButton",fs);dl=function(n){function t(){return n.apply(this,arguments)||this}u(t,n);var i=t.prototype;return i.createEl=function(t,i,r){var u='<span class="vjs-menu-item-text">'+this.localize(this.options_.label);return this.options_.track.kind==="captions"&&(u+='\n        <span aria-hidden="true" class="vjs-icon-placeholder"><\/span>\n        <span class="vjs-control-text"> '+this.localize("Captions")+"<\/span>\n      "),u+="<\/span>",n.prototype.createEl.call(this,t,y({innerHTML:u},i),r)},t}(au);r.registerComponent("SubsCapsMenuItem",dl);es=function(n){function t(t,i){var r;return i===void 0&&(i={}),r=n.call(this,t,i)||this,r.label_="subtitles",["en","en-us","en-ca","fr-ca"].indexOf(r.player_.language_)>-1&&(r.label_="captions"),r.menuButton_.controlText(b(r.label_)),r}u(t,n);var i=t.prototype;return i.buildCSSClass=function(){return"vjs-subs-caps-button "+n.prototype.buildCSSClass.call(this)},i.buildWrapperCSSClass=function(){return"vjs-subs-caps-button "+n.prototype.buildWrapperCSSClass.call(this)},i.createItems=function(){var t=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(t.push(new us(this.player_,{kind:this.label_})),this.hideThreshold_+=1),n.prototype.createItems.call(this,t,dl)},t}(ar);es.prototype.kinds_=["captions","subtitles"];es.prototype.controlText_="Subtitles";r.registerComponent("SubsCapsButton",es);gl=function(n){function t(t,i){var r,u=i.track,e=t.audioTracks(),f;i.label=u.label||u.language||"Unknown";i.selected=u.enabled;r=n.call(this,t,i)||this;r.track=u;r.addClass("vjs-"+u.kind+"-menu-item");f=function(){for(var t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];r.handleTracksChange.apply(o(r),i)};e.addEventListener("change",f);r.on("dispose",function(){e.removeEventListener("change",f)});return r}u(t,n);var i=t.prototype;return i.createEl=function(t,i,r){var u='<span class="vjs-menu-item-text">'+this.localize(this.options_.label);return this.options_.track.kind==="main-desc"&&(u+='\n        <span aria-hidden="true" class="vjs-icon-placeholder"><\/span>\n        <span class="vjs-control-text"> '+this.localize("Descriptions")+"<\/span>\n      "),u+="<\/span>",n.prototype.createEl.call(this,t,y({innerHTML:u},i),r)},i.handleClick=function(t){var u=this.player_.audioTracks(),i,r;for(n.prototype.handleClick.call(this,t),i=0;i<u.length;i++)r=u[i],r.enabled=r===this.track},i.handleTracksChange=function(){this.selected(this.track.enabled)},t}(lu);r.registerComponent("AudioTrackMenuItem",gl);na=function(n){function t(t,i){return i===void 0&&(i={}),i.tracks=t.audioTracks(),n.call(this,t,i)||this}u(t,n);var i=t.prototype;return i.buildCSSClass=function(){return"vjs-audio-button "+n.prototype.buildCSSClass.call(this)},i.buildWrapperCSSClass=function(){return"vjs-audio-button "+n.prototype.buildWrapperCSSClass.call(this)},i.createItems=function(n){var i,t,r;for(n===void 0&&(n=[]),this.hideThreshold_=1,i=this.player_.audioTracks(),t=0;t<i.length;t++)r=i[t],n.push(new gl(this.player_,{track:r,selectable:!0,multiSelectable:!1}));return n},t}(ns);na.prototype.controlText_="Audio Track";r.registerComponent("AudioTrackButton",na);os=function(n){function t(t,i){var r,u=i.rate,f=parseFloat(u,10);i.label=u;i.selected=f===1;i.selectable=!0;i.multiSelectable=!1;r=n.call(this,t,i)||this;r.label=u;r.rate=f;r.on(t,"ratechange",r.update);return r}u(t,n);var i=t.prototype;return i.handleClick=function(){n.prototype.handleClick.call(this);this.player().playbackRate(this.rate)},i.update=function(){this.selected(this.player().playbackRate()===this.rate)},t}(lu);os.prototype.contentElType="button";r.registerComponent("PlaybackRateMenuItem",os);ta=function(n){function i(t,i){var r;r=n.call(this,t,i)||this;r.updateVisibility();r.updateLabel();r.on(t,"loadstart",r.updateVisibility);r.on(t,"ratechange",r.updateLabel);return r}u(i,n);var t=i.prototype;return t.createEl=function(){var t=n.prototype.createEl.call(this);return this.labelEl_=w("div",{className:"vjs-playback-rate-value",innerHTML:"1x"}),t.appendChild(this.labelEl_),t},t.dispose=function(){this.labelEl_=null;n.prototype.dispose.call(this)},t.buildCSSClass=function(){return"vjs-playback-rate "+n.prototype.buildCSSClass.call(this)},t.buildWrapperCSSClass=function(){return"vjs-playback-rate "+n.prototype.buildWrapperCSSClass.call(this)},t.createMenu=function(){var i=new ko(this.player()),t=this.playbackRates(),n;if(t)for(n=t.length-1;n>=0;n--)i.addChild(new os(this.player(),{rate:t[n]+"x"}));return i},t.updateARIAAttributes=function(){this.el().setAttribute("aria-valuenow",this.player().playbackRate())},t.handleClick=function(){for(var r=this.player().playbackRate(),t=this.playbackRates(),i=t[0],n=0;n<t.length;n++)if(t[n]>r){i=t[n];break}this.player().playbackRate(i)},t.playbackRates=function(){return this.options_.playbackRates||this.options_.playerOptions&&this.options_.playerOptions.playbackRates},t.playbackRateSupported=function(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0},t.updateVisibility=function(){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")},t.updateLabel=function(){this.playbackRateSupported()&&(this.labelEl_.innerHTML=this.player().playbackRate()+"x")},i}(go);ta.prototype.controlText_="Playback Rate";r.registerComponent("PlaybackRateMenuButton",ta);ia=function(n){function t(){return n.apply(this,arguments)||this}u(t,n);var i=t.prototype;return i.buildCSSClass=function(){return"vjs-spacer "+n.prototype.buildCSSClass.call(this)},i.createEl=function(){return n.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},t}(r);r.registerComponent("Spacer",ia);ek=function(n){function t(){return n.apply(this,arguments)||this}u(t,n);var i=t.prototype;return i.buildCSSClass=function(){return"vjs-custom-control-spacer "+n.prototype.buildCSSClass.call(this)},i.createEl=function(){var t=n.prototype.createEl.call(this,{className:this.buildCSSClass()});return t.innerHTML=" ",t},t}(ia);r.registerComponent("CustomControlSpacer",ek);ne=function(n){function t(){return n.apply(this,arguments)||this}u(t,n);var i=t.prototype;return i.createEl=function(){return n.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"})},t}(r);ne.prototype.options_={children:["playToggle","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","seekToLive","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","fullscreenToggle"]};"exitPictureInPicture"in t&&ne.prototype.options_.children.splice(ne.prototype.options_.children.length-1,0,"pictureInPictureToggle");r.registerComponent("ControlBar",ne);ra=function(n){function t(t,i){var r=n.call(this,t,i)||this;r.on(t,"error",r.open);return r}u(t,n);var i=t.prototype;return i.buildCSSClass=function(){return"vjs-error-display "+n.prototype.buildCSSClass.call(this)},i.content=function(){var n=this.player().error();return n?this.localize(n.message):""},t}(eu);ra.prototype.options_=ve({},eu.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0});r.registerComponent("ErrorDisplay",ra);var ua="vjs-text-track-settings",ok=["#000","Black"],sk=["#00F","Blue"],hk=["#0FF","Cyan"],ck=["#0F0","Green"],lk=["#F0F","Magenta"],ak=["#F00","Red"],vk=["#FFF","White"],yk=["#FF0","Yellow"],fa=["1","Opaque"],ea=["0.5","Semi-Transparent"],pk=["0","Transparent"],vr={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[ok,vk,ak,ck,sk,yk,lk,hk]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[fa,ea,pk]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[vk,ok,ak,ck,sk,yk,lk,hk]},edgeStyle:{selector:".vjs-edge-style > select",id:"%s",label:"Text Edge Style",options:[["none","None"],["raised","Raised"],["depressed","Depressed"],["uniform","Uniform"],["dropshadow","Dropshadow"]]},fontFamily:{selector:".vjs-font-family > select",id:"captions-font-family-%s",label:"Font Family",options:[["proportionalSansSerif","Proportional Sans-Serif"],["monospaceSansSerif","Monospace Sans-Serif"],["proportionalSerif","Proportional Serif"],["monospaceSerif","Monospace Serif"],["casual","Casual"],["script","Script"],["small-caps","Small Caps"]]},fontPercent:{selector:".vjs-font-percent > select",id:"captions-font-size-%s",label:"Font Size",options:[["0.50","50%"],["0.75","75%"],["1.00","100%"],["1.25","125%"],["1.50","150%"],["1.75","175%"],["2.00","200%"],["3.00","300%"],["4.00","400%"]],"default":2,parser:function(n){return n==="1.00"?null:Number(n)}},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Transparency",options:[fa,ea]},windowColor:{selector:".vjs-window-color > select",id:"captions-window-color-%s",label:"Color"},windowOpacity:{selector:".vjs-window-opacity > select",id:"captions-window-opacity-%s",label:"Transparency",options:[pk,ea,fa]}};vr.windowColor.options=vr.backgroundColor.options;bk=function(t){function r(n,i){var r;i.temporary=!1;r=t.call(this,n,i)||this;r.updateDisplay=s(o(r),r.updateDisplay);r.fill();r.hasBeenOpened_=r.hasBeenFilled_=!0;r.endDialog=w("p",{className:"vjs-control-text",textContent:r.localize("End of dialog window.")});r.el().appendChild(r.endDialog);r.setDefaults();i.persistTextTrackSettings===undefined&&(r.options_.persistTextTrackSettings=r.options_.playerOptions.persistTextTrackSettings);r.on(r.$(".vjs-done-button"),"click",function(){r.saveSettings();r.close()});r.on(r.$(".vjs-default-button"),"click",function(){r.setDefaults();r.updateDisplay()});return gr(vr,function(n){r.on(r.$(n.selector),"change",r.updateDisplay)}),r.options_.persistTextTrackSettings&&r.restoreSettings(),r}u(r,t);var i=r.prototype;return i.dispose=function(){this.endDialog=null;t.prototype.dispose.call(this)},i.createElSelect_=function(n,t,i){var e=this;t===void 0&&(t="");i===void 0&&(i="label");var r=vr[n],u=r.id.replace("%s",this.id_),f=[t,u].join(" ").trim();return["<"+i+' id="'+u+'" class="'+(i==="label"?"vjs-label":"")+'">',this.localize(r.label),"<\/"+i+">",'<select aria-labelledby="'+f+'">'].concat(r.options.map(function(n){var t=u+"-"+n[1].replace(/\W+/g,"");return['<option id="'+t+'" value="'+n[0]+'" ','aria-labelledby="'+f+" "+t+'">',e.localize(n[1]),"<\/option>"].join("")})).concat("<\/select>").join("")},i.createElFgColor_=function(){var n="captions-text-legend-"+this.id_;return['<fieldset class="vjs-fg-color vjs-track-setting">','<legend id="'+n+'">',this.localize("Text"),"<\/legend>",this.createElSelect_("color",n),'<span class="vjs-text-opacity vjs-opacity">',this.createElSelect_("textOpacity",n),"<\/span>","<\/fieldset>"].join("")},i.createElBgColor_=function(){var n="captions-background-"+this.id_;return['<fieldset class="vjs-bg-color vjs-track-setting">','<legend id="'+n+'">',this.localize("Background"),"<\/legend>",this.createElSelect_("backgroundColor",n),'<span class="vjs-bg-opacity vjs-opacity">',this.createElSelect_("backgroundOpacity",n),"<\/span>","<\/fieldset>"].join("")},i.createElWinColor_=function(){var n="captions-window-"+this.id_;return['<fieldset class="vjs-window-color vjs-track-setting">','<legend id="'+n+'">',this.localize("Window"),"<\/legend>",this.createElSelect_("windowColor",n),'<span class="vjs-window-opacity vjs-opacity">',this.createElSelect_("windowOpacity",n),"<\/span>","<\/fieldset>"].join("")},i.createElColors_=function(){return w("div",{className:"vjs-track-settings-colors",innerHTML:[this.createElFgColor_(),this.createElBgColor_(),this.createElWinColor_()].join("")})},i.createElFont_=function(){return w("div",{className:"vjs-track-settings-font",innerHTML:['<fieldset class="vjs-font-percent vjs-track-setting">',this.createElSelect_("fontPercent","","legend"),"<\/fieldset>",'<fieldset class="vjs-edge-style vjs-track-setting">',this.createElSelect_("edgeStyle","","legend"),"<\/fieldset>",'<fieldset class="vjs-font-family vjs-track-setting">',this.createElSelect_("fontFamily","","legend"),"<\/fieldset>"].join("")})},i.createElControls_=function(){var n=this.localize("restore all settings to the default values");return w("div",{className:"vjs-track-settings-controls",innerHTML:['<button type="button" class="vjs-default-button" title="'+n+'">',this.localize("Reset"),'<span class="vjs-control-text"> '+n+"<\/span>","<\/button>",'<button type="button" class="vjs-done-button">'+this.localize("Done")+"<\/button>"].join("")})},i.content=function(){return[this.createElColors_(),this.createElFont_(),this.createElControls_()]},i.label=function(){return this.localize("Caption Settings Dialog")},i.description=function(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")},i.buildCSSClass=function(){return t.prototype.buildCSSClass.call(this)+" vjs-text-track-settings"},i.getValues=function(){var n=this;return oit(vr,function(t,i,r){var u=lft(n.$(i.selector),i.parser);return u!==undefined&&(t[r]=u),t},{})},i.setValues=function(n){var t=this;gr(vr,function(i,r){aft(t.$(i.selector),n[r],i.parser)})},i.setDefaults=function(){var n=this;gr(vr,function(t){var i=t.hasOwnProperty("default")?t["default"]:0;n.$(t.selector).selectedIndex=i})},i.restoreSettings=function(){var t;try{t=JSON.parse(n.localStorage.getItem(ua))}catch(i){h.warn(i)}t&&this.setValues(t)},i.saveSettings=function(){if(this.options_.persistTextTrackSettings){var t=this.getValues();try{Object.keys(t).length?n.localStorage.setItem(ua,JSON.stringify(t)):n.localStorage.removeItem(ua)}catch(i){h.warn(i)}}},i.updateDisplay=function(){var n=this.player_.getChild("textTrackDisplay");n&&n.updateDisplay()},i.conditionalBlur_=function(){this.previouslyActiveEl_=null;var n=this.player_.controlBar,t=n&&n.subsCapsButton,i=n&&n.captionsButton;t?t.focus():i&&i.focus()},r}(eu);r.registerComponent("TextTrackSettings",bk);kk=function(t){function i(i,r){var u,f=r.ResizeObserver||n.ResizeObserver,e;if(r.ResizeObserver===null&&(f=!1),e=v({createEl:!f,reportTouchActivity:!1},r),u=t.call(this,i,e)||this,u.ResizeObserver=r.ResizeObserver||n.ResizeObserver,u.loadListener_=null,u.resizeObserver_=null,u.debouncedHandler_=ait(function(){u.resizeHandler()},100,!1,o(u)),f)u.resizeObserver_=new u.ResizeObserver(u.debouncedHandler_),u.resizeObserver_.observe(i.el());else{u.loadListener_=function(){if(u.el_&&u.el_.contentWindow){var t=u.debouncedHandler_,n=u.unloadListener_=function(){it(this,"resize",t);it(this,"unload",n);n=null};yt(u.el_.contentWindow,"unload",n);yt(u.el_.contentWindow,"resize",t)}};u.one("load",u.loadListener_)}return u}u(i,t);var r=i.prototype;return r.createEl=function(){return t.prototype.createEl.call(this,"iframe",{className:"vjs-resize-manager",tabIndex:-1},{"aria-hidden":"true"})},r.resizeHandler=function(){this.player_&&this.player_.trigger&&this.player_.trigger("playerresize")},r.dispose=function(){this.debouncedHandler_&&this.debouncedHandler_.cancel();this.resizeObserver_&&(this.player_.el()&&this.resizeObserver_.unobserve(this.player_.el()),this.resizeObserver_.disconnect());this.loadListener_&&this.off("load",this.loadListener_);this.el_&&this.el_.contentWindow&&this.unloadListener_&&this.unloadListener_.call(this.el_.contentWindow);this.ResizeObserver=null;this.resizeObserver=null;this.debouncedHandler_=null;this.loadListener_=null;t.prototype.dispose.call(this)},i}(r);r.registerComponent("ResizeManager",kk);dk=function(n){var t=Math.floor(n.length/2),i=[].concat(n).sort(function(n,t){return n-t});return n.length%2!=0?i[t]:(i[t-1]+i[t])/2};gk=function(n){function r(i,r){var u,f=v({createEl:!1},r);u=n.call(this,i,f)||this;u.reset_();u.on(u.player_,"durationchange",u.handleDurationchange);if(no&&"hidden"in t&&"visibilityState"in t)u.on(t,"visibilitychange",u.handleVisibilityChange);return u}u(r,n);var i=r.prototype;return i.handleVisibilityChange=function(){this.player_.duration()===Infinity&&(t.hidden?this.stopTracking():this.startTracking())},i.isBehind_=function(){if(!this.timeupdateSeen_)return!1;var n=this.liveCurrentTime(),t=this.player_.currentTime(),i=this.seekableIncrement_*2+.07;return n!==Infinity&&n-i>=t},i.trackLive_=function(){var t,n;(this.pastSeekEnd_=this.pastSeekEnd_,t=this.player_.seekable(),t&&t.length)&&(n=this.seekableEnd(),n!==this.lastSeekEnd_&&(this.lastSeekEnd_&&(this.seekableIncrementList_=this.seekableIncrementList_.slice(-11),this.seekableIncrementList_.push(Math.abs(n-this.lastSeekEnd_)),this.seekableIncrementList_.length>3&&(this.seekableIncrement_=dk(this.seekableIncrementList_))),this.pastSeekEnd_=0,this.lastSeekEnd_=n,this.trigger("seekableendchange")),this.pastSeekEnd_=this.pastSeekEnd()>this.seekableIncrement_*1.5?0:this.pastSeekEnd()+.03,this.isBehind_()!==this.behindLiveEdge()&&(this.behindLiveEdge_=this.isBehind_(),this.trigger("liveedgechange")))},i.handleDurationchange=function(){this.player_.duration()===Infinity?this.startTracking():this.stopTracking()},i.startTracking=function(){var n=this;if(!this.isTracking()){this.timeupdateSeen_||(this.timeupdateSeen_=this.player_.hasStarted());this.trackingInterval_=this.setInterval(this.trackLive_,ci);this.trackLive_();this.on(this.player_,"play",this.trackLive_);this.on(this.player_,"pause",this.trackLive_);if(!this.timeupdateSeen_){this.one(this.player_,"play",this.handlePlay);this.handleTimeupdate=function(){n.timeupdateSeen_=!0;n.handleTimeupdate=null};this.one(this.player_,"timeupdate",this.handleTimeupdate)}}},i.handlePlay=function(){this.one(this.player_,"timeupdate",this.seekToLiveEdge)},i.reset_=function(){this.pastSeekEnd_=0;this.lastSeekEnd_=null;this.behindLiveEdge_=null;this.timeupdateSeen_=!1;this.clearInterval(this.trackingInterval_);this.trackingInterval_=null;this.seekableIncrement_=12;this.seekableIncrementList_=[];this.off(this.player_,"play",this.trackLive_);this.off(this.player_,"pause",this.trackLive_);this.off(this.player_,"play",this.handlePlay);this.off(this.player_,"timeupdate",this.seekToLiveEdge);this.handleTimeupdate&&(this.off(this.player_,"timeupdate",this.handleTimeupdate),this.handleTimeupdate=null)},i.stopTracking=function(){this.isTracking()&&this.reset_()},i.seekableEnd=function(){for(var t=this.player_.seekable(),n=[],i=t?t.length:0;i--;)n.push(t.end(i));return n.length?n.sort()[n.length-1]:Infinity},i.seekableStart=function(){for(var n=this.player_.seekable(),t=[],i=n?n.length:0;i--;)t.push(n.start(i));return t.length?t.sort()[0]:0},i.liveWindow=function(){var n=this.liveCurrentTime();return n===Infinity?Infinity:n-this.seekableStart()},i.isLive=function(){return this.isTracking()},i.atLiveEdge=function(){return!this.behindLiveEdge()},i.liveCurrentTime=function(){return this.pastSeekEnd()+this.seekableEnd()},i.pastSeekEnd=function(){return this.pastSeekEnd_},i.behindLiveEdge=function(){return this.behindLiveEdge_},i.isTracking=function(){return typeof this.trackingInterval_=="number"},i.seekToLiveEdge=function(){this.atLiveEdge()||(this.player_.currentTime(this.liveCurrentTime()),this.player_.paused()&&this.player_.play())},i.dispose=function(){this.stopTracking();n.prototype.dispose.call(this)},r}(r);r.registerComponent("LiveTracker",gk);var oa=function(n){var f=n.el(),i,r;if(f.hasAttribute("src"))return n.triggerSourceset(f.src),!0;var u=n.$$("source"),t=[],e="";if(!u.length)return!1;for(i=0;i<u.length;i++)r=u[i].src,r&&t.indexOf(r)===-1&&t.push(r);return t.length?(t.length===1&&(e=t[0]),n.triggerSourceset(e),!0):!1},vft=Object.defineProperty({},"innerHTML",{get:function(){return this.cloneNode(!0).innerHTML},set:function(i){var r=t.createElement(this.nodeName.toLowerCase()),u;for(r.innerHTML=i,u=t.createDocumentFragment();r.childNodes.length;)u.appendChild(r.childNodes[0]);return this.innerText="",n.Element.prototype.appendChild.call(this,u),this.innerHTML}}),nd=function(n,t){for(var i={},r=0;r<n.length;r++)if(i=Object.getOwnPropertyDescriptor(n[r],t),i&&i.set&&i.get)break;return i.enumerable=!0,i.configurable=!0,i},yft=function(t){return nd([t.el(),n.HTMLMediaElement.prototype,n.Element.prototype,vft],"innerHTML")},td=function(n){var t=n.el();if(!t.resetSourceWatch_){var i={},r=yft(n),u=function(i){return function(){for(var e,u=arguments.length,f=new Array(u),r=0;r<u;r++)f[r]=arguments[r];return e=i.apply(t,f),oa(n),e}};["append","appendChild","insertAdjacentHTML"].forEach(function(n){t[n]&&(i[n]=t[n],t[n]=u(i[n]))});Object.defineProperty(t,"innerHTML",v(r,{set:u(r.set)}));t.resetSourceWatch_=function(){t.resetSourceWatch_=null;Object.keys(i).forEach(function(n){t[n]=i[n]});Object.defineProperty(t,"innerHTML",r)};n.one("sourceset",t.resetSourceWatch_)}},pft=Object.defineProperty({},"src",{get:function(){return this.hasAttribute("src")?vw(n.Element.prototype.getAttribute.call(this,"src")):""},set:function(t){return n.Element.prototype.setAttribute.call(this,"src",t),t}}),wft=function(t){return nd([t.el(),n.HTMLMediaElement.prototype,pft],"src")},bft=function(n){var t;if(n.featuresSourceset&&(t=n.el(),!t.resetSourceset_)){var i=wft(n),r=t.setAttribute,u=t.load;Object.defineProperty(t,"src",v(i,{set:function(r){var u=i.set.call(t,r);return n.triggerSourceset(t.src),u}}));t.setAttribute=function(i,u){var f=r.call(t,i,u);return/src/i.test(i)&&n.triggerSourceset(t.src),f};t.load=function(){var i=u.call(t);return oa(n)||(n.triggerSourceset(""),td(n)),i};t.currentSrc?n.triggerSourceset(t.currentSrc):oa(n)||td(n);t.resetSourceset_=function(){t.resetSourceset_=null;t.load=u;t.setAttribute=r;Object.defineProperty(t,"src",i);t.resetSourceWatch_&&t.resetSourceWatch_()}}},sa=function(n,t,i,r){r===void 0&&(r=!0);var u=function(i){return Object.defineProperty(n,t,{value:i,enumerable:!0,writable:!0})},f={configurable:!0,enumerable:!0,get:function(){var n=i();return u(n),n}};return r&&(f.set=u),Object.defineProperty(n,t,f)},f=function(i){function f(n,t){var r,f,e,u,a,o;if(r=i.call(this,n,t)||this,f=n.source,e=!1,f&&(r.el_.currentSrc!==f.src||n.tag&&n.tag.initNetworkState_===3)?r.setSource(f):r.handleLateInit_(r.el_),n.enableSourceset&&r.setupSourcesetHandling_(),r.el_.hasChildNodes()){for(var c=r.el_.childNodes,l=c.length,s=[];l--;)u=c[l],a=u.nodeName.toLowerCase(),a==="track"&&(r.featuresNativeTextTracks?(r.remoteTextTrackEls().addTrackElement_(u),r.remoteTextTracks().addTrack(u.track),r.textTracks().addTrack(u.track),e||r.el_.hasAttribute("crossorigin")||!io(u.src)||(e=!0)):s.push(u));for(o=0;o<s.length;o++)r.el_.removeChild(s[o])}return r.proxyNativeTracks_(),r.featuresNativeTextTracks&&e&&h.warn("Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\nThis may prevent text tracks from loading."),r.restoreMetadataTracksInIOSNativePlayer_(),(uu||ec||nw)&&n.nativeControlsForTouch===!0&&r.setControls(!0),r.proxyWebkitFullscreen_(),r.triggerReady(),r}u(f,i);var r=f.prototype;return r.dispose=function(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_();f.disposeMediaElement(this.el_);this.options_=null;i.prototype.dispose.call(this)},r.setupSourcesetHandling_=function(){bft(this)},r.restoreMetadataTracksInIOSNativePlayer_=function(){var n=this.textTracks(),r,t=function(){var t,i;for(r=[],t=0;t<n.length;t++)i=n[t],i.kind==="metadata"&&r.push({track:i,storedMode:i.mode})},i;t();n.addEventListener("change",t);this.on("dispose",function(){return n.removeEventListener("change",t)});i=function i(){for(var t,u=0;u<r.length;u++)t=r[u],t.track.mode==="disabled"&&t.track.mode!==t.storedMode&&(t.track.mode=t.storedMode);n.removeEventListener("change",i)};this.on("webkitbeginfullscreen",function(){n.removeEventListener("change",t);n.removeEventListener("change",i);n.addEventListener("change",i)});this.on("webkitendfullscreen",function(){n.removeEventListener("change",t);n.addEventListener("change",t);n.removeEventListener("change",i)})},r.overrideNative_=function(n,t){var r=this,i;t===this["featuresNative"+n+"Tracks"]&&(i=n.toLowerCase(),this[i+"TracksListeners_"]&&Object.keys(this[i+"TracksListeners_"]).forEach(function(n){var t=r.el()[i+"Tracks"];t.removeEventListener(n,r[i+"TracksListeners_"][n])}),this["featuresNative"+n+"Tracks"]=!t,this[i+"TracksListeners_"]=null,this.proxyNativeTracksForType_(i))},r.overrideNativeAudioTracks=function(n){this.overrideNative_("Audio",n)},r.overrideNativeVideoTracks=function(n){this.overrideNative_("Video",n)},r.proxyNativeTracksForType_=function(n){var e=this,r=pt[n],i=this.el()[r.getterName],t=this[r.getterName](),u,f;if(this["featuresNative"+r.capitalName+"Tracks"]&&i&&i.addEventListener){u={change:function(){t.trigger({type:"change",target:t,currentTarget:t,srcElement:t})},addtrack:function(n){t.addTrack(n.track)},removetrack:function(n){t.removeTrack(n.track)}};f=function(){for(var u=[],f,r,n=0;n<t.length;n++){for(f=!1,r=0;r<i.length;r++)if(i[r]===t[n]){f=!0;break}f||u.push(t[n])}while(u.length)t.removeTrack(u.shift())};this[r.getterName+"Listeners_"]=u;Object.keys(u).forEach(function(n){var t=u[n];i.addEventListener(n,t);e.on("dispose",function(){return i.removeEventListener(n,t)})});this.on("loadstart",f);this.on("dispose",function(){return e.off("loadstart",f)})}},r.proxyNativeTracks_=function(){var n=this;pt.names.forEach(function(t){n.proxyNativeTracksForType_(t)})},r.createEl=function(){var n=this.options_.tag,e,h,o,s,r,i,u;for(n&&(this.options_.playerElIngest||this.movingMediaElementInDOM)||(n?(e=n.cloneNode(!0),n.parentNode&&n.parentNode.insertBefore(e,n),f.disposeMediaElement(n),n=e):(n=t.createElement("video"),h=this.options_.tag&&hi(this.options_.tag),o=v({},h),uu&&this.options_.nativeControlsForTouch===!0||delete o.controls,by(n,y(o,{id:this.options_.techId,"class":"vjs-tech"}))),n.playerId=this.options_.playerId),typeof this.options_.preload!="undefined"&&sf(n,"preload",this.options_.preload),s=["loop","muted","playsinline","autoplay"],r=0;r<s.length;r++)i=s[r],u=this.options_[i],typeof u!="undefined"&&(u?sf(n,i,i):pe(n,i),n[i]=u);return n},r.handleLateInit_=function(n){var i,r,u,t;if(n.networkState!==0&&n.networkState!==3){if(n.readyState===0){i=!1;r=function(){i=!0};this.on("loadstart",r);u=function(){i||this.trigger("loadstart")};this.on("loadedmetadata",u);this.ready(function(){this.off("loadstart",r);this.off("loadedmetadata",u);i||this.trigger("loadstart")});return}t=["loadstart"];t.push("loadedmetadata");n.readyState>=2&&t.push("loadeddata");n.readyState>=3&&t.push("canplay");n.readyState>=4&&t.push("canplaythrough");this.ready(function(){t.forEach(function(n){this.trigger(n)},this)})}},r.setCurrentTime=function(n){try{this.el_.currentTime=n}catch(t){h(t,"Video is not ready. (Video.js)")}},r.duration=function(){var n=this,t;if(this.el_.duration===Infinity&&di&&li&&this.el_.currentTime===0){t=function t(){n.el_.currentTime>0&&(n.el_.duration===Infinity&&n.trigger("durationchange"),n.off("timeupdate",t))};this.on("timeupdate",t);return NaN}return this.el_.duration||NaN},r.width=function(){return this.el_.offsetWidth},r.height=function(){return this.el_.offsetHeight},r.proxyWebkitFullscreen_=function(){var i=this,n,t;if("webkitDisplayingFullscreen"in this.el_){n=function(){this.trigger("fullscreenchange",{isFullscreen:!1})};t=function(){if("webkitPresentationMode"in this.el_&&this.el_.webkitPresentationMode!=="picture-in-picture"){this.one("webkitendfullscreen",n);this.trigger("fullscreenchange",{isFullscreen:!0})}};this.on("webkitbeginfullscreen",t);this.on("dispose",function(){i.off("webkitbeginfullscreen",t);i.off("webkitendfullscreen",n)})}},r.supportsFullScreen=function(){if(typeof this.el_.webkitEnterFullScreen=="function"){var t=n.navigator&&n.navigator.userAgent||"";if(/Android/.test(t)||!/Chrome|Mac OS X 10.5/.test(t))return!0}return!1},r.enterFullScreen=function(){var n=this.el_;n.paused&&n.networkState<=n.HAVE_METADATA?(this.el_.play(),this.setTimeout(function(){n.pause();n.webkitEnterFullScreen()},0)):n.webkitEnterFullScreen()},r.exitFullScreen=function(){this.el_.webkitExitFullScreen()},r.requestPictureInPicture=function(){return this.el_.requestPictureInPicture()},r.src=function(n){if(n===undefined)return this.el_.src;this.setSrc(n)},r.reset=function(){f.resetMediaElement(this.el_)},r.currentSrc=function(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc},r.setControls=function(n){this.el_.controls=!!n},r.addTextTrack=function(n,t,r){return this.featuresNativeTextTracks?this.el_.addTextTrack(n,t,r):i.prototype.addTextTrack.call(this,n,t,r)},r.createRemoteTextTrack=function(n){if(!this.featuresNativeTextTracks)return i.prototype.createRemoteTextTrack.call(this,n);var r=t.createElement("track");return n.kind&&(r.kind=n.kind),n.label&&(r.label=n.label),(n.language||n.srclang)&&(r.srclang=n.language||n.srclang),n["default"]&&(r["default"]=n["default"]),n.id&&(r.id=n.id),n.src&&(r.src=n.src),r},r.addRemoteTextTrack=function(n,t){var r=i.prototype.addRemoteTextTrack.call(this,n,t);return this.featuresNativeTextTracks&&this.el().appendChild(r),r},r.removeRemoteTextTrack=function(n){if(i.prototype.removeRemoteTextTrack.call(this,n),this.featuresNativeTextTracks)for(var t=this.$$("track"),r=t.length;r--;)(n===t[r]||n===t[r].track)&&this.el().removeChild(t[r])},r.getVideoPlaybackQuality=function(){if(typeof this.el().getVideoPlaybackQuality=="function")return this.el().getVideoPlaybackQuality();var t={};return typeof this.el().webkitDroppedFrameCount!="undefined"&&typeof this.el().webkitDecodedFrameCount!="undefined"&&(t.droppedVideoFrames=this.el().webkitDroppedFrameCount,t.totalVideoFrames=this.el().webkitDecodedFrameCount),n.performance&&typeof n.performance.now=="function"?t.creationTime=n.performance.now():n.performance&&n.performance.timing&&typeof n.performance.timing.navigationStart=="number"&&(t.creationTime=n.Date.now()-n.performance.timing.navigationStart),t},f}(a);sa(f,"TEST_VID",function(){if(nu()){var i=t.createElement("video"),n=t.createElement("track");return n.kind="captions",n.srclang="en",n.label="English",i.appendChild(n),i}});f.isSupported=function(){try{f.TEST_VID.volume=.5}catch(n){return!1}return!!(f.TEST_VID&&f.TEST_VID.canPlayType)};f.canPlayType=function(n){return f.TEST_VID.canPlayType(n)};f.canPlaySource=function(n){return f.canPlayType(n.type)};f.canControlVolume=function(){try{var n=f.TEST_VID.volume;return f.TEST_VID.volume=n/2+.1,n!==f.TEST_VID.volume}catch(t){return!1}};f.canMuteVolume=function(){try{var n=f.TEST_VID.muted;return f.TEST_VID.muted=!n,f.TEST_VID.muted?sf(f.TEST_VID,"muted","muted"):pe(f.TEST_VID,"muted","muted"),n!==f.TEST_VID.muted}catch(t){return!1}};f.canControlPlaybackRate=function(){if(di&&li&&iw<58)return!1;try{var n=f.TEST_VID.playbackRate;return f.TEST_VID.playbackRate=n/2+.1,n!==f.TEST_VID.playbackRate}catch(t){return!1}};f.canOverrideAttributes=function(){try{var n=function(){};Object.defineProperty(t.createElement("video"),"src",{get:n,set:n});Object.defineProperty(t.createElement("audio"),"src",{get:n,set:n});Object.defineProperty(t.createElement("video"),"innerHTML",{get:n,set:n});Object.defineProperty(t.createElement("audio"),"innerHTML",{get:n,set:n})}catch(i){return!1}return!0};f.supportsNativeTextTracks=function(){return oc||ri&&li};f.supportsNativeVideoTracks=function(){return!!(f.TEST_VID&&f.TEST_VID.videoTracks)};f.supportsNativeAudioTracks=function(){return!!(f.TEST_VID&&f.TEST_VID.audioTracks)};f.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","resize","volumechange"];[["featuresVolumeControl","canControlVolume"],["featuresMuteControl","canMuteVolume"],["featuresPlaybackRate","canControlPlaybackRate"],["featuresSourceset","canOverrideAttributes"],["featuresNativeTextTracks","supportsNativeTextTracks"],["featuresNativeVideoTracks","supportsNativeVideoTracks"],["featuresNativeAudioTracks","supportsNativeAudioTracks"]].forEach(function(n){var t=n[0],i=n[1];sa(f.prototype,t,function(){return f[i]()},!0)});f.prototype.movingMediaElementInDOM=!ri;f.prototype.featuresFullscreenResize=!0;f.prototype.featuresProgressEvents=!0;f.prototype.featuresTimeupdateEvents=!0;f.patchCanPlayType=function(){rc>=4&&!tw&&!li&&(ss=f.TEST_VID&&f.TEST_VID.constructor.prototype.canPlayType,f.TEST_VID.constructor.prototype.canPlayType=function(n){return n&&/^application\/(?:x-|vnd\.apple\.)mpegurl/i.test(n)?"maybe":ss.call(this,n)})};f.unpatchCanPlayType=function(){var n=f.TEST_VID.constructor.prototype.canPlayType;return ss&&(f.TEST_VID.constructor.prototype.canPlayType=ss),n};f.patchCanPlayType();f.disposeMediaElement=function(n){if(n){for(n.parentNode&&n.parentNode.removeChild(n);n.hasChildNodes();)n.removeChild(n.firstChild);n.removeAttribute("src");typeof n.load=="function"&&function(){try{n.load()}catch(t){}}()}};f.resetMediaElement=function(n){if(n){for(var t=n.querySelectorAll("source"),i=t.length;i--;)n.removeChild(t[i]);n.removeAttribute("src");typeof n.load=="function"&&function(){try{n.load()}catch(t){}}()}};["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach(function(n){f.prototype[n]=function(){return this.el_[n]||this.el_.hasAttribute(n)}});["muted","defaultMuted","autoplay","loop","playsinline"].forEach(function(n){f.prototype["set"+b(n)]=function(t){this.el_[n]=t;t?this.el_.setAttribute(n,n):this.el_.removeAttribute(n)}});["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","defaultPlaybackRate","played","networkState","readyState","videoWidth","videoHeight"].forEach(function(n){f.prototype[n]=function(){return this.el_[n]}});["volume","src","poster","preload","playbackRate","defaultPlaybackRate"].forEach(function(n){f.prototype["set"+b(n)]=function(t){this.el_[n]=t}});["pause","load","play"].forEach(function(n){f.prototype[n]=function(){return this.el_[n]()}});a.withSourceHandlers(f);f.nativeSourceHandler={};f.nativeSourceHandler.canPlayType=function(n){try{return f.TEST_VID.canPlayType(n)}catch(t){return""}};f.nativeSourceHandler.canHandleSource=function(n){if(n.type)return f.nativeSourceHandler.canPlayType(n.type);if(n.src){var t=wc(n.src);return f.nativeSourceHandler.canPlayType("video/"+t)}return""};f.nativeSourceHandler.handleSource=function(n,t){t.setSrc(n.src)};f.nativeSourceHandler.dispose=function(){};f.registerSourceHandler(f.nativeSourceHandler);a.registerTech("Html5",f);var id=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"],ha={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},ca=["tiny","xsmall","small","medium","large","xlarge","huge"],hs={};ca.forEach(function(n){var t=n.charAt(0)==="x"?"x-"+n.substring(1):n;hs[n]="vjs-layout-"+t});rd={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:Infinity};k=function(i){function c(n,r,u){var f,h,e,l,a,p;if(n.id=n.id||r.id||"vjs_video_"+ki(),r=y(c.getTagSettings(n),r),r.initChildren=!1,r.createEl=!1,r.evented=!1,r.reportTouchActivity=!1,!r.language)if(typeof n.closest=="function")h=n.closest("[lang]"),h&&h.getAttribute&&(r.language=h.getAttribute("lang"));else for(e=n;e&&e.nodeType===1;){if(hi(e).hasOwnProperty("lang")){r.language=e.getAttribute("lang");break}e=e.parentNode}if(f=i.call(this,null,r,u)||this,f.boundDocumentFullscreenChange_=s(o(f),f.documentFullscreenChange_),f.boundFullWindowOnEscKey_=s(o(f),f.fullWindowOnEscKey),f.isFullscreen_=!1,f.log=ah(f.id_),f.fsApi_=hc,f.isPosterFromTech_=!1,f.queuedCallbacks_=[],f.isReady_=!1,f.hasStarted_=!1,f.userActive_=!1,!f.options_||!f.options_.techOrder||!f.options_.techOrder.length)throw new Error("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");if(f.tag=n,f.tagAttributes=n&&hi(n),f.language(f.options_.language),r.languages?(l={},Object.getOwnPropertyNames(r.languages).forEach(function(n){l[n.toLowerCase()]=r.languages[n]}),f.languages_=l):f.languages_=c.prototype.options_.languages,f.resetCache_(),f.poster_=r.poster||"",f.controls_=!!r.controls,n.controls=!1,n.removeAttribute("controls"),f.changingSrc_=!1,f.playCallbacks_=[],f.playTerminatedQueue_=[],n.hasAttribute("autoplay")?f.autoplay(!0):f.autoplay(f.options_.autoplay),r.plugins&&Object.keys(r.plugins).forEach(function(n){if(typeof f[n]!="function")throw new Error('plugin "'+n+'" does not exist');}),f.scrubbing_=!1,f.el_=f.createEl(),ic(o(f),{eventBusKey:"el_"}),f.fsApi_.requestFullscreen){yt(t,f.fsApi_.fullscreenchange,f.boundDocumentFullscreenChange_);f.on(f.fsApi_.fullscreenchange,f.boundDocumentFullscreenChange_)}if(f.fluid_)f.on("playerreset",f.updateStyleEl_);a=v(f.options_);r.plugins&&Object.keys(r.plugins).forEach(function(n){f[n](r.plugins[n])});f.options_.playerOptions=a;f.middleware_=[];f.initChildren();f.isAudio(n.nodeName.toLowerCase()==="audio");f.controls()?f.addClass("vjs-controls-enabled"):f.addClass("vjs-controls-disabled");f.el_.setAttribute("role","region");f.isAudio()?f.el_.setAttribute("aria-label",f.localize("Audio Player")):f.el_.setAttribute("aria-label",f.localize("Video Player"));f.isAudio()&&f.addClass("vjs-audio");f.flexNotSupported_()&&f.addClass("vjs-no-flex");uu&&f.addClass("vjs-touch-enabled");ri||f.addClass("vjs-workinghover");c.players[f.id_]=o(f);p=hy.split(".")[0];f.addClass("vjs-v"+p);f.userActive(!0);f.reportUserActivity();f.one("play",f.listenForUserActivity_);f.on("stageclick",f.handleStageClick_);f.on("keydown",f.handleKeyDown);return f.breakpoints(f.options_.breakpoints),f.responsive(f.options_.responsive),f}u(c,i);var f=c.prototype;return f.dispose=function(){var n=this;this.trigger("dispose");this.off("dispose");it(t,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_);it(t,"keydown",this.boundFullWindowOnEscKey_);this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null);c.players[this.id_]=null;this.tag&&this.tag.player&&(this.tag.player=null);this.el_&&this.el_.player&&(this.el_.player=null);this.tech_&&(this.tech_.dispose(),this.isPosterFromTech_=!1,this.poster_="");this.playerElIngest_&&(this.playerElIngest_=null);this.tag&&(this.tag=null);uft(this);rt.names.forEach(function(t){var r=rt[t],i=n[r.getterName]();i&&i.off&&i.off()});i.prototype.dispose.call(this)},f.createEl=function(){var r=this.tag,u,s=this.playerElIngest_=r.parentNode&&r.parentNode.hasAttribute&&r.parentNode.hasAttribute("data-vjs-player"),e=this.tag.tagName.toLowerCase()==="video-js",f,h,c,l,o,a;if(s?u=this.el_=r.parentNode:e||(u=this.el_=i.prototype.createEl.call(this,"div")),f=hi(r),e){for(u=this.el_=r,r=this.tag=t.createElement("video");u.children.length;)r.appendChild(u.firstChild);ir(u,"video-js")||si(u,"video-js");u.appendChild(r);s=this.playerElIngest_=u;Object.keys(u).forEach(function(n){try{r[n]=u[n]}catch(t){}})}for(r.setAttribute("tabindex","-1"),f.tabindex="-1",(no||li&&rw)&&(r.setAttribute("role","application"),f.role="application"),r.removeAttribute("width"),r.removeAttribute("height"),("width"in f)&&delete f.width,("height"in f)&&delete f.height,Object.getOwnPropertyNames(f).forEach(function(n){e&&n==="class"||u.setAttribute(n,f[n]);e&&r.setAttribute(n,f[n])}),r.playerId=r.id,r.id+="_html5_api",r.className="vjs-tech",r.player=u.player=this,this.addClass("vjs-paused"),n.VIDEOJS_NO_DYNAMIC_STYLE!==!0&&(this.styleEl_=op("vjs-styles-dimensions"),h=bi(".vjs-styles-defaults"),c=bi("head"),c.insertBefore(this.styleEl_,h?h.nextSibling:c.firstChild)),this.fill_=!1,this.fluid_=!1,this.width(this.options_.width),this.height(this.options_.height),this.fill(this.options_.fill),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio),l=r.getElementsByTagName("a"),o=0;o<l.length;o++)a=l.item(o),si(a,"vjs-hidden"),a.setAttribute("hidden","hidden");return r.initNetworkState_=r.networkState,r.parentNode&&!s&&r.parentNode.insertBefore(u,r),vh(r,u),this.children_.unshift(r),this.el_.setAttribute("lang",this.language_),this.el_=u,u},f.width=function(n){return this.dimension("width",n)},f.height=function(n){return this.dimension("height",n)},f.dimension=function(n,t){var i=n+"_",r;if(t===undefined)return this[i]||0;if(t===""||t==="auto"){this[i]=undefined;this.updateStyleEl_();return}if(r=parseFloat(t),isNaN(r)){h.error('Improper value "'+t+'" supplied for for '+n);return}this[i]=r;this.updateStyleEl_()},f.fluid=function(n){if(n===undefined)return!!this.fluid_;this.fluid_=!!n;ur(this)&&this.off("playerreset",this.updateStyleEl_);n?(this.addClass("vjs-fluid"),this.fill(!1),vit(function(){this.on("playerreset",this.updateStyleEl_)})):this.removeClass("vjs-fluid");this.updateStyleEl_()},f.fill=function(n){if(n===undefined)return!!this.fill_;this.fill_=!!n;n?(this.addClass("vjs-fill"),this.fluid(!1)):this.removeClass("vjs-fill")},f.aspectRatio=function(n){if(n===undefined)return this.aspectRatio_;if(!/^\d+\:\d+$/.test(n))throw new Error("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.aspectRatio_=n;this.fluid(!0);this.updateStyleEl_()},f.updateStyleEl_=function(){var u,s,h,t,f,i;if(n.VIDEOJS_NO_DYNAMIC_STYLE===!0){var e=typeof this.width_=="number"?this.width_:this.options_.width,o=typeof this.height_=="number"?this.height_:this.options_.height,r=this.tech_&&this.tech_.el();r&&(e>=0&&(r.width=e),o>=0&&(r.height=o));return}h=this.aspectRatio_!==undefined&&this.aspectRatio_!=="auto"?this.aspectRatio_:this.videoWidth()>0?this.videoWidth()+":"+this.videoHeight():"16:9";f=h.split(":");i=f[1]/f[0];u=this.width_!==undefined?this.width_:this.height_!==undefined?this.height_/i:this.videoWidth()||300;s=this.height_!==undefined?this.height_:u*i;t=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions";this.addClass(t);sp(this.styleEl_,"\n      ."+t+" {\n        width: "+u+"px;\n        height: "+s+"px;\n      }\n\n      ."+t+".vjs-fluid {\n        padding-top: "+i*100+"%;\n      }\n    ")},f.loadTech_=function(n,t){var i=this,u,f,o,r,e;if(this.tech_&&this.unloadTech_(),u=b(n),f=n.charAt(0).toLowerCase()+n.slice(1),u!=="Html5"&&this.tag&&(a.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=u,this.isReady_=!1,o=typeof this.autoplay()=="string"?!1:this.autoplay(),r={source:t,autoplay:o,nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:this.id()+"_"+f+"_api",playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,"vtt.js":this.options_["vtt.js"],canOverridePoster:!!this.options_.techCanOverridePoster,enableSourceset:this.options_.enableSourceset,Promise:this.options_.Promise},rt.names.forEach(function(n){var t=rt[n];r[t.getterName]=i[t.privateName]}),y(r,this.options_[u]),y(r,this.options_[f]),y(r,this.options_[n.toLowerCase()]),this.tag&&(r.tag=this.tag),t&&t.src===this.cache_.src&&this.cache_.currentTime>0&&(r.startTime=this.cache_.currentTime),e=a.getTech(n),!e)throw new Error("No Tech named '"+u+"' exists! '"+u+"' should be registered using videojs.registerTech()'");this.tech_=new e(r);this.tech_.ready(s(this,this.handleTechReady_),!0);sw.jsonToTextTracks(this.textTracksJson_||[],this.tech_);id.forEach(function(n){i.on(i.tech_,n,i["handleTech"+b(n)+"_"])});Object.keys(ha).forEach(function(n){i.on(i.tech_,n,function(t){if(i.tech_.playbackRate()===0&&i.tech_.seeking()){i.queuedCallbacks_.push({callback:i["handleTech"+ha[n]+"_"].bind(i),event:t});return}i["handleTech"+ha[n]+"_"](t)})});this.on(this.tech_,"loadstart",this.handleTechLoadStart_);this.on(this.tech_,"sourceset",this.handleTechSourceset_);this.on(this.tech_,"waiting",this.handleTechWaiting_);this.on(this.tech_,"ended",this.handleTechEnded_);this.on(this.tech_,"seeking",this.handleTechSeeking_);this.on(this.tech_,"play",this.handleTechPlay_);this.on(this.tech_,"firstplay",this.handleTechFirstPlay_);this.on(this.tech_,"pause",this.handleTechPause_);this.on(this.tech_,"durationchange",this.handleTechDurationChange_);this.on(this.tech_,"fullscreenchange",this.handleTechFullscreenChange_);this.on(this.tech_,"enterpictureinpicture",this.handleTechEnterPictureInPicture_);this.on(this.tech_,"leavepictureinpicture",this.handleTechLeavePictureInPicture_);this.on(this.tech_,"error",this.handleTechError_);this.on(this.tech_,"loadedmetadata",this.updateStyleEl_);this.on(this.tech_,"posterchange",this.handleTechPosterChange_);this.on(this.tech_,"textdata",this.handleTechTextData_);this.on(this.tech_,"ratechange",this.handleTechRateChange_);this.usingNativeControls(this.techGet_("controls"));this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_();this.tech_.el().parentNode===this.el()||u==="Html5"&&this.tag||vh(this.tech_.el(),this.el());this.tag&&(this.tag.player=null,this.tag=null)},f.unloadTech_=function(){var n=this;rt.names.forEach(function(t){var i=rt[t];n[i.privateName]=n[i.getterName]()});this.textTracksJson_=sw.textTracksToJson(this.tech_);this.isReady_=!1;this.tech_.dispose();this.tech_=!1;this.isPosterFromTech_&&(this.poster_="",this.trigger("posterchange"));this.isPosterFromTech_=!1},f.tech=function(n){return n===undefined&&h.warn("Using the tech directly can be dangerous. I hope you know what you're doing.\nSee https://github.com/videojs/video.js/issues/2617 for more info.\n"),this.tech_},f.addTechControlsListeners_=function(){this.removeTechControlsListeners_();this.on(this.tech_,"mouseup",this.handleTechClick_);this.on(this.tech_,"dblclick",this.handleTechDoubleClick_);this.on(this.tech_,"touchstart",this.handleTechTouchStart_);this.on(this.tech_,"touchmove",this.handleTechTouchMove_);this.on(this.tech_,"touchend",this.handleTechTouchEnd_);this.on(this.tech_,"tap",this.handleTechTap_)},f.removeTechControlsListeners_=function(){this.off(this.tech_,"tap",this.handleTechTap_);this.off(this.tech_,"touchstart",this.handleTechTouchStart_);this.off(this.tech_,"touchmove",this.handleTechTouchMove_);this.off(this.tech_,"touchend",this.handleTechTouchEnd_);this.off(this.tech_,"mouseup",this.handleTechClick_);this.off(this.tech_,"dblclick",this.handleTechDoubleClick_)},f.handleTechReady_=function(){this.triggerReady();this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume);this.handleTechPosterChange_();this.handleTechDurationChange_()},f.handleTechLoadStart_=function(){this.removeClass("vjs-ended");this.removeClass("vjs-seeking");this.error(null);this.handleTechDurationChange_();this.paused()?(this.hasStarted(!1),this.trigger("loadstart")):(this.trigger("loadstart"),this.trigger("firstplay"));this.manualAutoplay_(this.autoplay())},f.manualAutoplay_=function(n){var t=this,r,i;if(this.tech_&&typeof n=="string")return(r=function(){var r=t.muted(),n,i;if(t.muted(!0),n=function(){t.muted(r)},t.playTerminatedQueue_.push(n),i=t.play(),yf(i))return i["catch"](n)},n==="any"&&this.muted()!==!0?(i=this.play(),yf(i)&&(i=i["catch"](r))):i=n==="muted"&&this.muted()!==!0?r():this.play(),!yf(i))?void 0:i.then(function(){t.trigger({type:"autoplay-success",autoplay:n})})["catch"](function(){t.trigger({type:"autoplay-failure",autoplay:n})})},f.updateSourceCaches_=function(n){var t,i,u,r;n===void 0&&(n="");t=n;i="";typeof t!="string"&&(t=n.src,i=n.type);this.cache_.source=this.cache_.source||{};this.cache_.sources=this.cache_.sources||[];t&&!i&&(i=oft(this,t));this.cache_.source=v({},n,{src:t,type:i});var f=this.cache_.sources.filter(function(n){return n.src&&n.src===t}),e=[],o=this.$$("source"),s=[];for(u=0;u<o.length;u++)r=hi(o[u]),e.push(r),r.src&&r.src===t&&s.push(r.src);s.length&&!f.length?this.cache_.sources=e:f.length||(this.cache_.sources=[this.cache_.source]);this.cache_.src=t},f.handleTechSourceset_=function(n){var t=this;if(!this.changingSrc_){var u=function(n){return t.updateSourceCaches_(n)},i=this.currentSource().src,r=n.src;i&&!/^blob:/.test(i)&&/^blob:/.test(r)&&(this.lastSource_&&(this.lastSource_.tech===r||this.lastSource_.player===i)||(u=function(){}));u(r);n.src||this.tech_.any(["sourceset","loadstart"],function(n){if(n.type!=="sourceset"){var i=t.techGet("currentSrc");t.lastSource_.tech=i;t.updateSourceCaches_(i)}})}this.lastSource_={player:this.currentSource().src,tech:n.src};this.trigger({src:n.src,type:"sourceset"})},f.hasStarted=function(n){if(n===undefined)return this.hasStarted_;n!==this.hasStarted_&&(this.hasStarted_=n,this.hasStarted_?(this.addClass("vjs-has-started"),this.trigger("firstplay")):this.removeClass("vjs-has-started"))},f.handleTechPlay_=function(){this.removeClass("vjs-ended");this.removeClass("vjs-paused");this.addClass("vjs-playing");this.hasStarted(!0);this.trigger("play")},f.handleTechRateChange_=function(){this.tech_.playbackRate()>0&&this.cache_.lastPlaybackRate===0&&(this.queuedCallbacks_.forEach(function(n){return n.callback(n.event)}),this.queuedCallbacks_=[]);this.cache_.lastPlaybackRate=this.tech_.playbackRate();this.trigger("ratechange")},f.handleTechWaiting_=function(){var n=this,i,t;this.addClass("vjs-waiting");this.trigger("waiting");i=this.currentTime();t=function t(){i!==n.currentTime()&&(n.removeClass("vjs-waiting"),n.off("timeupdate",t))};this.on("timeupdate",t)},f.handleTechCanPlay_=function(){this.removeClass("vjs-waiting");this.trigger("canplay")},f.handleTechCanPlayThrough_=function(){this.removeClass("vjs-waiting");this.trigger("canplaythrough")},f.handleTechPlaying_=function(){this.removeClass("vjs-waiting");this.trigger("playing")},f.handleTechSeeking_=function(){this.addClass("vjs-seeking");this.trigger("seeking")},f.handleTechSeeked_=function(){this.removeClass("vjs-seeking");this.removeClass("vjs-ended");this.trigger("seeked")},f.handleTechFirstPlay_=function(){this.options_.starttime&&(h.warn("Passing the `starttime` option to the player will be deprecated in 6.0"),this.currentTime(this.options_.starttime));this.addClass("vjs-has-started");this.trigger("firstplay")},f.handleTechPause_=function(){this.removeClass("vjs-playing");this.addClass("vjs-paused");this.trigger("pause")},f.handleTechEnded_=function(){this.addClass("vjs-ended");this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause();this.trigger("ended")},f.handleTechDurationChange_=function(){this.duration(this.techGet_("duration"))},f.handleTechClick_=function(n){iu(n)&&this.controls_&&(this.paused()?fu(this.play()):this.pause())},f.handleTechDoubleClick_=function(n){if(this.controls_){var t=Array.prototype.some.call(this.$$(".vjs-control-bar, .vjs-modal-dialog"),function(t){return t.contains(n.target)});t||(this.options_===undefined||this.options_.userActions===undefined||this.options_.userActions.doubleClick===undefined||this.options_.userActions.doubleClick!==!1)&&(this.options_!==undefined&&this.options_.userActions!==undefined&&typeof this.options_.userActions.doubleClick=="function"?this.options_.userActions.doubleClick.call(this,n):this.isFullscreen()?this.exitFullscreen():this.requestFullscreen())}},f.handleTechTap_=function(){this.userActive(!this.userActive())},f.handleTechTouchStart_=function(){this.userWasActive=this.userActive()},f.handleTechTouchMove_=function(){this.userWasActive&&this.reportUserActivity()},f.handleTechTouchEnd_=function(n){n.preventDefault()},f.handleStageClick_=function(){this.reportUserActivity()},f.toggleFullscreenClass_=function(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")},f.documentFullscreenChange_=function(n){var u=n.target.player,i,r;u&&u!==this||(i=this.el(),r=t[this.fsApi_.fullscreenElement]===i,!r&&i.matches?r=i.matches(":"+this.fsApi_.fullscreen):!r&&i.msMatchesSelector&&(r=i.msMatchesSelector(":"+this.fsApi_.fullscreen)),this.isFullscreen(r))},f.handleTechFullscreenChange_=function(n,t){t&&this.isFullscreen(t.isFullscreen)},f.togglePictureInPictureClass_=function(){this.isInPictureInPicture()?this.addClass("vjs-picture-in-picture"):this.removeClass("vjs-picture-in-picture")},f.handleTechEnterPictureInPicture_=function(){this.isInPictureInPicture(!0)},f.handleTechLeavePictureInPicture_=function(){this.isInPictureInPicture(!1)},f.handleTechError_=function(){var n=this.tech_.error();this.error(n)},f.handleTechTextData_=function(){var n=null;arguments.length>1&&(n=arguments[1]);this.trigger("textdata",n)},f.getCache=function(){return this.cache_},f.resetCache_=function(){this.cache_={currentTime:0,inactivityTimeout:this.options_.inactivityTimeout,duration:NaN,lastVolume:1,lastPlaybackRate:this.defaultPlaybackRate(),media:null,src:"",source:{},sources:[],volume:1}},f.techCall_=function(n,t){this.ready(function(){if(n in ift)return nft(this.middleware_,this.tech_,n,t);if(n in hb)return sb(this.middleware_,this.tech_,n,t);try{this.tech_&&this.tech_[n](t)}catch(i){h(i);throw i;}},!0)},f.techGet_=function(n){if(this.tech_&&this.tech_.isReady_){if(n in tft)return ob(this.middleware_,this.tech_,n);if(n in hb)return sb(this.middleware_,this.tech_,n);try{return this.tech_[n]()}catch(t){if(this.tech_[n]===undefined){h("Video.js: "+n+" method not defined for "+this.techName_+" playback technology.",t);throw t;}if(t.name==="TypeError"){h("Video.js: "+n+" unavailable on "+this.techName_+" playback technology element.",t);this.tech_.isReady_=!1;throw t;}h(t);throw t;}}},f.play=function(){var i=this,t=this.options_.Promise||n.Promise;return t?new t(function(n){i.play_(n)}):this.play_()},f.play_=function(n){var r=this,t,i;if(n===void 0&&(n=fu),this.playCallbacks_.push(n),t=Boolean(!this.changingSrc_&&(this.src()||this.currentSrc())),this.waitToPlay_&&(this.off(["ready","loadstart"],this.waitToPlay_),this.waitToPlay_=null),!this.isReady_||!t){this.waitToPlay_=function(){r.play_()};this.one(["ready","loadstart"],this.waitToPlay_);!t&&(oc||ri)&&this.load();return}i=this.techGet_("play");i===null?this.runPlayTerminatedQueue_():this.runPlayCallbacks_(i)},f.runPlayTerminatedQueue_=function(){var n=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[];n.forEach(function(n){n()})},f.runPlayCallbacks_=function(n){var t=this.playCallbacks_.slice(0);this.playCallbacks_=[];this.playTerminatedQueue_=[];t.forEach(function(t){t(n)})},f.pause=function(){this.techCall_("pause")},f.paused=function(){return this.techGet_("paused")===!1?!1:!0},f.played=function(){return this.techGet_("played")||er(0,0)},f.scrubbing=function(n){if(typeof n=="undefined")return this.scrubbing_;this.scrubbing_=!!n;n?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing")},f.currentTime=function(n){if(typeof n!="undefined"){n<0&&(n=0);this.techCall_("setCurrentTime",n);return}return this.cache_.currentTime=this.techGet_("currentTime")||0,this.cache_.currentTime},f.duration=function(n){if(n===undefined)return this.cache_.duration!==undefined?this.cache_.duration:NaN;n=parseFloat(n);n<0&&(n=Infinity);n!==this.cache_.duration&&(this.cache_.duration=n,n===Infinity?(this.addClass("vjs-live"),this.options_.liveui&&this.player_.liveTracker&&this.addClass("vjs-liveui")):(this.removeClass("vjs-live"),this.removeClass("vjs-liveui")),isNaN(n)||this.trigger("durationchange"))},f.remainingTime=function(){return this.duration()-this.currentTime()},f.remainingTimeDisplay=function(){return Math.floor(this.duration())-Math.floor(this.currentTime())},f.buffered=function(){var n=this.techGet_("buffered");return n&&n.length||(n=er(0,0)),n},f.bufferedPercent=function(){return fw(this.buffered(),this.duration())},f.bufferedEnd=function(){var t=this.buffered(),i=this.duration(),n=t.end(t.length-1);return n>i&&(n=i),n},f.volume=function(n){var t;if(n!==undefined){t=Math.max(0,Math.min(1,parseFloat(n)));this.cache_.volume=t;this.techCall_("setVolume",t);t>0&&this.lastVolume_(t);return}return t=parseFloat(this.techGet_("volume")),isNaN(t)?1:t},f.muted=function(n){if(n!==undefined){this.techCall_("setMuted",n);return}return this.techGet_("muted")||!1},f.defaultMuted=function(n){return n!==undefined?this.techCall_("setDefaultMuted",n):this.techGet_("defaultMuted")||!1},f.lastVolume_=function(n){if(n!==undefined&&n!==0){this.cache_.lastVolume=n;return}return this.cache_.lastVolume},f.supportsFullScreen=function(){return this.techGet_("supportsFullScreen")||!1},f.isFullscreen=function(n){if(n!==undefined){var t=this.isFullscreen_;this.isFullscreen_=Boolean(n);this.isFullscreen_!==t&&this.fsApi_.prefixed&&this.trigger("fullscreenchange");this.toggleFullscreenClass_();return}return this.isFullscreen_},f.requestFullscreen=function(n){var r=this,i,t;if(this.fsApi_.prefixed||(i=this.options_.fullscreen&&this.options_.fullscreen.options||{},n!==undefined&&(i=n)),this.fsApi_.requestFullscreen)return t=this.el_[this.fsApi_.requestFullscreen](i),t&&t.then(function(){return r.isFullscreen(!0)},function(){return r.isFullscreen(!1)}),t;this.tech_.supportsFullScreen()?this.techCall_("enterFullScreen"):this.enterFullWindow()},f.exitFullscreen=function(){var i=this,n;if(this.fsApi_.requestFullscreen)return n=t[this.fsApi_.exitFullscreen](),n&&n.then(function(){return i.isFullscreen(!1)}),n;this.tech_.supportsFullScreen()?this.techCall_("exitFullScreen"):this.exitFullWindow()},f.enterFullWindow=function(){this.isFullscreen(!0);this.isFullWindow=!0;this.docOrigOverflow=t.documentElement.style.overflow;yt(t,"keydown",this.boundFullWindowOnEscKey_);t.documentElement.style.overflow="hidden";si(t.body,"vjs-full-window");this.trigger("enterFullWindow")},f.fullWindowOnEscKey=function(n){e.isEventKey(n,"Esc")&&(this.isFullscreen()===!0?this.exitFullscreen():this.exitFullWindow())},f.exitFullWindow=function(){this.isFullscreen(!1);this.isFullWindow=!1;it(t,"keydown",this.boundFullWindowOnEscKey_);t.documentElement.style.overflow=this.docOrigOverflow;of(t.body,"vjs-full-window");this.trigger("exitFullWindow")},f.isInPictureInPicture=function(n){if(n!==undefined){this.isInPictureInPicture_=!!n;this.togglePictureInPictureClass_();return}return!!this.isInPictureInPicture_},f.requestPictureInPicture=function(){if("pictureInPictureEnabled"in t)return this.techGet_("requestPictureInPicture")},f.exitPictureInPicture=function(){if("pictureInPictureEnabled"in t)return t.exitPictureInPicture()},f.handleKeyDown=function(n){var t=this.options_.userActions,i;t&&t.hotkeys&&((i=function(n){var t=n.tagName.toLowerCase(),i,r;return n.isContentEditable?!0:(i=["button","checkbox","hidden","radio","reset","submit"],t==="input")?i.indexOf(n.type)===-1:(r=["textarea"],r.indexOf(t)!==-1)},i(this.el_.ownerDocument.activeElement))||(typeof t.hotkeys=="function"?t.hotkeys.call(this,n):this.handleHotkeys(n)))},f.handleHotkeys=function(n){var i=this.options_.userActions?this.options_.userActions.hotkeys:{},u=i.fullscreenKey,l=u===void 0?function(n){return e.isEventKey(n,"f")}:u,f=i.muteKey,a=f===void 0?function(n){return e.isEventKey(n,"m")}:f,o=i.playPauseKey,v=o===void 0?function(n){return e.isEventKey(n,"k")||e.isEventKey(n,"Space")}:o,s,h,c;l.call(this,n)?(n.preventDefault(),n.stopPropagation(),s=r.getComponent("FullscreenToggle"),t[this.fsApi_.fullscreenEnabled]!==!1&&s.prototype.handleClick.call(this,n)):a.call(this,n)?(n.preventDefault(),n.stopPropagation(),h=r.getComponent("MuteToggle"),h.prototype.handleClick.call(this,n)):v.call(this,n)&&(n.preventDefault(),n.stopPropagation(),c=r.getComponent("PlayToggle"),c.prototype.handleClick.call(this,n))},f.canPlayType=function(n){for(var f,u,t,i=0,e=this.options_.techOrder;i<e.length;i++){if(u=e[i],t=a.getTech(u),t||(t=r.getComponent(u)),!t){h.error('The "'+u+'" tech is undefined. Skipped browser support check for that tech.');continue}if(t.isSupported()&&(f=t.canPlayType(n),f))return f}return""},f.selectSource=function(n){var f=this,t=this.options_.techOrder.map(function(n){return[n,a.getTech(n)]}).filter(function(n){var i=n[0],t=n[1];return t?t.isSupported():(h.error('The "'+i+'" tech is undefined. Skipped browser support check for that tech.'),!1)}),i=function(n,t,i){var r;return n.some(function(n){return t.some(function(t){return r=i(n,t),r?!0:void 0})}),r},r,e=function(n){return function(t,i){return n(i,t)}},u=function(n,t){var i=n[0],r=n[1];if(r.canPlaySource(t,f.options_[i.toLowerCase()]))return{source:t,tech:i}};return r=this.options_.sourceOrder?i(n,t,e(u)):i(t,n,u),r||!1},f.src=function(n){var t=this,i;if(typeof n=="undefined")return this.cache_.src||"";if(i=cb(n),!i.length){this.setTimeout(function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})},0);return}this.changingSrc_=!0;this.cache_.sources=i;this.updateSourceCaches_(i[0]);dut(this,i[0],function(n,r){t.middleware_=r;t.cache_.sources=i;t.updateSourceCaches_(n);var u=t.src_(n);if(u){if(i.length>1)return t.src(i.slice(1));t.changingSrc_=!1;t.setTimeout(function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})},0);t.triggerReady();return}gut(r,t.tech_)})},f.src_=function(n){var i=this,t=this.selectSource([n]);return t?pit(t.tech,this.techName_)?(this.ready(function(){this.tech_.constructor.prototype.hasOwnProperty("setSource")?this.techCall_("setSource",n):this.techCall_("src",n.src);this.changingSrc_=!1},!0),!1):(this.changingSrc_=!0,this.loadTech_(t.tech,t.source),this.tech_.ready(function(){i.changingSrc_=!1}),!1):!0},f.load=function(){this.techCall_("load")},f.reset=function(){var i=this,r=this.options_.Promise||n.Promise,t;this.paused()||!r?this.doReset_():(t=this.play(),fu(t.then(function(){return i.doReset_()})))},f.doReset_=function(){this.tech_&&this.tech_.clearTracks("text");this.resetCache_();this.poster("");this.loadTech_(this.options_.techOrder[0],null);this.techCall_("reset");this.resetControlBarUI_();ur(this)&&this.trigger("playerreset")},f.resetControlBarUI_=function(){this.resetProgressBar_();this.resetPlaybackRate_();this.resetVolumeBar_()},f.resetProgressBar_=function(){this.currentTime(0);var n=this.controlBar,t=n.durationDisplay,i=n.remainingTimeDisplay;t&&t.updateContent();i&&i.updateContent()},f.resetPlaybackRate_=function(){this.playbackRate(this.defaultPlaybackRate());this.handleTechRateChange_()},f.resetVolumeBar_=function(){this.volume(1);this.trigger("volumechange")},f.currentSources=function(){var n=this.currentSource(),t=[];return Object.keys(n).length!==0&&t.push(n),this.cache_.sources||t},f.currentSource=function(){return this.cache_.source||{}},f.currentSrc=function(){return this.currentSource()&&this.currentSource().src||""},f.currentType=function(){return this.currentSource()&&this.currentSource().type||""},f.preload=function(n){if(n!==undefined){this.techCall_("setPreload",n);this.options_.preload=n;return}return this.techGet_("preload")},f.autoplay=function(n){if(n===undefined)return this.options_.autoplay||!1;var t;typeof n=="string"&&/(any|play|muted)/.test(n)?(this.options_.autoplay=n,this.manualAutoplay_(n),t=!1):this.options_.autoplay=n?!0:!1;t=typeof t=="undefined"?this.options_.autoplay:t;this.tech_&&this.techCall_("setAutoplay",t)},f.playsinline=function(n){return n!==undefined?(this.techCall_("setPlaysinline",n),this.options_.playsinline=n,this):this.techGet_("playsinline")},f.loop=function(n){if(n!==undefined){this.techCall_("setLoop",n);this.options_.loop=n;return}return this.techGet_("loop")},f.poster=function(n){if(n===undefined)return this.poster_;(n||(n=""),n!==this.poster_)&&(this.poster_=n,this.techCall_("setPoster",n),this.isPosterFromTech_=!1,this.trigger("posterchange"))},f.handleTechPosterChange_=function(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){var n=this.tech_.poster()||"";n!==this.poster_&&(this.poster_=n,this.isPosterFromTech_=!0,this.trigger("posterchange"))}},f.controls=function(n){if(n===undefined)return!!this.controls_;(n=!!n,this.controls_!==n)&&(this.controls_=n,this.usingNativeControls()&&this.techCall_("setControls",n),this.controls_?(this.removeClass("vjs-controls-disabled"),this.addClass("vjs-controls-enabled"),this.trigger("controlsenabled"),this.usingNativeControls()||this.addTechControlsListeners_()):(this.removeClass("vjs-controls-enabled"),this.addClass("vjs-controls-disabled"),this.trigger("controlsdisabled"),this.usingNativeControls()||this.removeTechControlsListeners_()))},f.usingNativeControls=function(n){if(n===undefined)return!!this.usingNativeControls_;(n=!!n,this.usingNativeControls_!==n)&&(this.usingNativeControls_=n,this.usingNativeControls_?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols")))},f.error=function(n){if(n===undefined)return this.error_||null;if(this.options_.suppressNotSupportedError&&n&&n.code===4){var t=function(){this.error(n)};this.options_.suppressNotSupportedError=!1;this.any(["click","touchstart"],t);this.one("loadstart",function(){this.off(["click","touchstart"],t)});return}if(n===null){this.error_=n;this.removeClass("vjs-error");this.errorDisplay&&this.errorDisplay.close();return}this.error_=new ut(n);this.addClass("vjs-error");h.error("(CODE:"+this.error_.code+" "+ut.errorTypes[this.error_.code]+")",this.error_.message,this.error_);this.trigger("error");return},f.reportUserActivity=function(){this.userActivity_=!0},f.userActive=function(n){if(n===undefined)return this.userActive_;if(n=!!n,n!==this.userActive_){if(this.userActive_=n,this.userActive_){this.userActivity_=!0;this.removeClass("vjs-user-inactive");this.addClass("vjs-user-active");this.trigger("useractive");return}if(this.tech_)this.tech_.one("mousemove",function(n){n.stopPropagation();n.preventDefault()});this.userActivity_=!1;this.removeClass("vjs-user-active");this.addClass("vjs-user-inactive");this.trigger("userinactive")}},f.listenForUserActivity_=function(){var i,r,u,n=s(this,this.reportUserActivity),o=function(t){(t.screenX!==r||t.screenY!==u)&&(r=t.screenX,u=t.screenY,n())},h=function(){n();this.clearInterval(i);i=this.setInterval(n,250)},f=function(){n();this.clearInterval(i)},t,e;this.on("mousedown",h);this.on("mousemove",o);this.on("mouseup",f);this.on("mouseleave",f);if(t=this.getChild("controlBar"),t&&!ri&&!di){t.on("mouseenter",function(){this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout;this.player().options_.inactivityTimeout=0});t.on("mouseleave",function(){this.player().options_.inactivityTimeout=this.player().cache_.inactivityTimeout})}this.on("keydown",n);this.on("keyup",n);this.setInterval(function(){if(this.userActivity_){this.userActivity_=!1;this.userActive(!0);this.clearTimeout(e);var n=this.options_.inactivityTimeout;n<=0||(e=this.setTimeout(function(){this.userActivity_||this.userActive(!1)},n))}},250)},f.playbackRate=function(n){if(n!==undefined){this.techCall_("setPlaybackRate",n);return}return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_("playbackRate"):1},f.defaultPlaybackRate=function(n){return n!==undefined?this.techCall_("setDefaultPlaybackRate",n):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1},f.isAudio=function(n){if(n!==undefined){this.isAudio_=!!n;return}return!!this.isAudio_},f.addTextTrack=function(n,t,i){if(this.tech_)return this.tech_.addTextTrack(n,t,i)},f.addRemoteTextTrack=function(n,t){if(this.tech_)return this.tech_.addRemoteTextTrack(n,t)},f.removeRemoteTextTrack=function(n){n===void 0&&(n={});var i=n,t=i.track;return t||(t=n),this.tech_?this.tech_.removeRemoteTextTrack(t):void 0},f.getVideoPlaybackQuality=function(){return this.techGet_("getVideoPlaybackQuality")},f.videoWidth=function(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0},f.videoHeight=function(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0},f.language=function(n){if(n===undefined)return this.language_;this.language_=String(n).toLowerCase()},f.languages=function(){return v(c.prototype.options_.languages,this.languages_)},f.toJSON=function(){var i=v(this.options_),r=i.tracks,n,t;for(i.tracks=[],n=0;n<r.length;n++)t=r[n],t=v(t),t.player=undefined,i.tracks[n]=t;return i},f.createModal=function(n,t){var r=this,i;t=t||{};t.content=n||"";i=new eu(this,t);this.addChild(i);i.on("dispose",function(){r.removeChild(i)});return i.open(),i},f.updateCurrentBreakpoint_=function(){var t,r,i,n,u;if(this.responsive())for(t=this.currentBreakpoint(),r=this.currentWidth(),i=0;i<ca.length;i++)if(n=ca[i],u=this.breakpoints_[n],r<=u){if(t===n)return;t&&this.removeClass(hs[t]);this.addClass(hs[n]);this.breakpoint_=n;break}},f.removeCurrentBreakpoint_=function(){var n=this.currentBreakpointClass();this.breakpoint_="";n&&this.removeClass(n)},f.breakpoints=function(n){return n===undefined?y(this.breakpoints_):(this.breakpoint_="",this.breakpoints_=y({},rd,n),this.updateCurrentBreakpoint_(),y(this.breakpoints_))},f.responsive=function(n){if(n===undefined)return this.responsive_;n=Boolean(n);var t=this.responsive_;if(n!==t){if(this.responsive_=n,n){this.on("playerresize",this.updateCurrentBreakpoint_);this.updateCurrentBreakpoint_()}else this.off("playerresize",this.updateCurrentBreakpoint_),this.removeCurrentBreakpoint_();return n}},f.currentBreakpoint=function(){return this.breakpoint_},f.currentBreakpointClass=function(){return hs[this.breakpoint_]||""},f.loadMedia=function(n,t){var e=this;if(n&&typeof n=="object"){this.reset();this.cache_.media=v(n);var r=this.cache_.media,o=r.artwork,i=r.poster,u=r.src,f=r.textTracks;!o&&i&&(this.cache_.media.artwork=[{src:i,type:oo(i)}]);u&&this.src(u);i&&this.poster(i);Array.isArray(f)&&f.forEach(function(n){return e.addRemoteTextTrack(n,!1)});this.ready(t)}},f.getMedia=function(){if(!this.cache_.media){var t=this.poster(),i=this.currentSources(),r=Array.prototype.map.call(this.remoteTextTracks(),function(n){return{kind:n.kind,label:n.label,language:n.language,src:n.src}}),n={src:i,textTracks:r};return t&&(n.poster=t,n.artwork=[{src:n.poster,type:oo(n.poster)}]),n}return v(this.cache_.media)},c.getTagSettings=function(n){var i={sources:[],tracks:[]},t=hi(n),o=t["data-setup"],f,r,l,u,e;if(ir(n,"vjs-fill")&&(t.fill=!0),ir(n,"vjs-fluid")&&(t.fluid=!0),o!==null){var s=ow(o||"{}"),c=s[0],a=s[1];c&&h.error(c);y(t,a)}if(y(i,t),n.hasChildNodes())for(f=n.childNodes,r=0,l=f.length;r<l;r++)u=f[r],e=u.nodeName.toLowerCase(),e==="source"?i.sources.push(hi(u)):e==="track"&&i.tracks.push(hi(u));return i},f.flexNotSupported_=function(){var n=t.createElement("i");return!("flexBasis"in n.style||"webkitFlexBasis"in n.style||"mozFlexBasis"in n.style||"msFlexBasis"in n.style||"msFlexOrder"in n.style)},c}(r);rt.names.forEach(function(n){var t=rt[n];k.prototype[t.getterName]=function(){return this.tech_?this.tech_[t.getterName]():(this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName])}});k.players={};vu=n.navigator;k.prototype.options_={techOrder:a.defaultTechOrder_,html5:{},flash:{},inactivityTimeout:2e3,playbackRates:[],liveui:!1,children:["mediaLoader","posterImage","textTrackDisplay","loadingSpinner","bigPlayButton","liveTracker","controlBar","errorDisplay","textTrackSettings","resizeManager"],language:vu&&(vu.languages&&vu.languages[0]||vu.userLanguage||vu.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media.",fullscreen:{options:{navigationUI:"hide"}},breakpoints:{},responsive:!1};["ended","seeking","seekable","networkState","readyState"].forEach(function(n){k.prototype[n]=function(){return this.techGet_(n)}});id.forEach(function(n){k.prototype["handleTech"+b(n)+"_"]=function(){return this.trigger(n)}});r.registerComponent("Player",k);var ud=dr(function(n){function t(i,r){return n.exports=t=Object.setPrototypeOf||function(n,t){return n.__proto__=t,n},t(i,r)}n.exports=t}),kft=dr(function(n){function i(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(n){return!1}}function t(){return n.exports=i()?t=Reflect.construct:t=function(n,t,i){var r=[null],f,u;return r.push.apply(r,t),f=Function.bind.apply(n,r),u=new f,i&&ud(u,i.prototype),u},t.apply(null,arguments)}n.exports=t}),cs="plugin",yu="activePlugins_",pu={},ls=function(n){return pu.hasOwnProperty(n)},as=function(n){return ls(n)?pu[n]:undefined},fd=function(n,t){n[yu]=n[yu]||{};n[yu][t]=!0},vs=function(n,t,i){var r=(i?"before":"")+"pluginsetup";n.trigger(r,t);n.trigger(r+":"+t.name,t)},dft=function(n,t){var i=function(){vs(this,{name:n,plugin:t,instance:null},!0);var i=t.apply(this,arguments);return fd(this,n),vs(this,{name:n,plugin:t,instance:i}),i};return Object.keys(t).forEach(function(n){i[n]=t[n]}),i},ed=function(n,t){return t.prototype.name=n,function(){var r;vs(this,{name:n,plugin:t,instance:null},!0);for(var u=arguments.length,f=new Array(u),i=0;i<u;i++)f[i]=arguments[i];return r=kft(t,[this].concat(f)),this[n]=function(){return r},vs(this,r.getEventHash()),r}},fi=function(){function n(t){if(this.constructor===n)throw new Error("Plugin must be sub-classed; not directly instantiated.");this.player=t;ic(this);delete this.trigger;kp(this,this.constructor.defaultState);fd(t,this.name);this.dispose=s(this,this.dispose);t.on("dispose",this.dispose)}var t=n.prototype;return t.version=function(){return this.constructor.VERSION},t.getEventHash=function(n){return n===void 0&&(n={}),n.name=this.name,n.plugin=this.constructor,n.instance=this,n},t.trigger=function(n,t){return t===void 0&&(t={}),ru(this.eventBusEl_,n,this.getEventHash(t))},t.handleStateChanged=function(){},t.dispose=function(){var n=this.name,t=this.player;this.trigger("dispose");this.off();t.off("dispose",this.dispose);t[yu][n]=!1;this.player=this.state=null;t[n]=ed(n,pu[n])},n.isBasic=function(t){var i=typeof t=="string"?as(t):t;return typeof i=="function"&&!n.prototype.isPrototypeOf(i.prototype)},n.registerPlugin=function(t,i){if(typeof t!="string")throw new Error('Illegal plugin name, "'+t+'", must be a string, was '+typeof t+".");if(ls(t))h.warn('A plugin named "'+t+'" already exists. You may want to avoid re-registering plugins!');else if(k.prototype.hasOwnProperty(t))throw new Error('Illegal plugin name, "'+t+'", cannot share a name with an existing player method!');if(typeof i!="function")throw new Error('Illegal plugin for "'+t+'", must be a function, was '+typeof i+".");return pu[t]=i,t!==cs&&(k.prototype[t]=n.isBasic(i)?dft(t,i):ed(t,i)),i},n.deregisterPlugin=function(n){if(n===cs)throw new Error("Cannot de-register base plugin.");ls(n)&&(delete pu[n],delete k.prototype[n])},n.getPlugins=function(n){n===void 0&&(n=Object.keys(pu));var t;return n.forEach(function(n){var i=as(n);i&&(t=t||{},t[n]=i)}),t},n.getPluginVersion=function(n){var t=as(n);return t&&t.VERSION||""},n}();fi.getPlugin=as;fi.BASE_PLUGIN_NAME=cs;fi.registerPlugin(cs,fi);k.prototype.usingPlugin=function(n){return!!this[yu]&&this[yu][n]===!0};k.prototype.hasPlugin=function(n){return!!ls(n)};var net=gft,tet=function(n,t){var i,r,u;t===void 0&&(t={});i=function(){n.apply(this,arguments)};r={};typeof t=="object"?(t.constructor!==Object.prototype.constructor&&(i=t.constructor),r=t):typeof t=="function"&&(i=t);net(i,n);n&&(i.super_=n);for(u in r)r.hasOwnProperty(u)&&(i.prototype[u]=r[u]);return i},od=function(n){return n.indexOf("#")===0?n.slice(1):n};i.hooks_={};i.hooks=function(n,t){return i.hooks_[n]=i.hooks_[n]||[],t&&(i.hooks_[n]=i.hooks_[n].concat(t)),i.hooks_[n]};i.hook=function(n,t){i.hooks(n,t)};i.hookOnce=function(n,t){i.hooks(n,[].concat(t).map(function(t){var r=function r(){return i.removeHook(n,r),t.apply(void 0,arguments)};return r}))};i.removeHook=function(n,t){var r=i.hooks(n).indexOf(t);return r<=-1?!1:(i.hooks_[n]=i.hooks_[n].slice(),i.hooks_[n].splice(r,1),!0)};n.VIDEOJS_NO_DYNAMIC_STYLE!==!0&&nu()&&(te=bi(".vjs-styles-defaults"),te||(te=op("vjs-styles-defaults"),ys=bi("head"),ys&&ys.insertBefore(te,ys.firstChild),sp(te,"\n      .video-js {\n        width: 300px;\n        height: 150px;\n      }\n\n      .vjs-fluid {\n        padding-top: 56.25%\n      }\n    ")));kh(1,i);i.VERSION=hy;i.options=k.prototype.options_;i.getPlayers=function(){return k.players};i.getPlayer=function(n){var i=k.players,t,r,u;if(typeof n=="string"){if(r=od(n),u=i[r],u)return u;t=bi("#"+r)}else t=n;if(ef(t)){var f=t,e=f.player,o=f.playerId;if(e||i[o])return e||i[o]}};i.getAllPlayers=function(){return Object.keys(k.players).map(function(n){return k.players[n]}).filter(Boolean)};i.players=k.players;i.getComponent=r.getComponent;i.registerComponent=function(n,t){a.isTech(t)&&h.warn("The "+n+" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)");r.registerComponent.call(r,n,t)};i.getTech=a.getTech;i.registerTech=a.registerTech;i.use=kut;Object.defineProperty(i,"middleware",{value:{},writeable:!1,enumerable:!0});Object.defineProperty(i.middleware,"TERMINATOR",{value:eo,writeable:!1,enumerable:!0});i.browser=git;i.TOUCH_ENABLED=uu;i.extend=tet;i.mergeOptions=v;i.bind=s;i.registerPlugin=fi.registerPlugin;i.deregisterPlugin=fi.deregisterPlugin;i.plugin=function(n,t){return h.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),fi.registerPlugin(n,t)};i.getPlugins=fi.getPlugins;i.getPlugin=fi.getPlugin;i.getPluginVersion=fi.getPluginVersion;i.addLanguage=function(n,t){var r;return n=(""+n).toLowerCase(),i.options.languages=v(i.options.languages,(r={},r[n]=t,r)),i.options.languages[n]};i.log=h;i.createLogger=ah;i.createTimeRange=i.createTimeRanges=er;i.formatTime=cu;i.setFormatTime=hft;i.resetFormatTime=cft;i.parseUrl=pc;i.isCrossOrigin=io;i.EventTarget=d;i.on=yt;i.one=ke;i.off=it;i.trigger=ru;i.xhr=bc;i.TextTrack=pf;i.AudioTrack=kw;i.VideoTrack=dw;["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach(function(n){i[n]=function(){return h.warn("videojs."+n+"() is deprecated; use videojs.dom."+n+"() instead"),fp[n].apply(null,arguments)}});i.computedStyle=ye;i.dom=fp;i.url=crt;i.defineLazyProperty=sa;la=dr(function(n){(function(){var i=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/\?#]*\/)*.*?)??(;.*?)?(\?.*?)?(#.*?)?$/,r=/^([^\/?#]*)(.*)$/,u=/(?:\/|^)\.(?=\/)/g,f=/(?:\/|^)\.\.\/(?!\.\.\/).*?(?=\/)/g,t={buildAbsoluteURL:function(n,i,u){var s,f,e,h,o,c,l;if(u=u||{},n=n.trim(),i=i.trim(),!i){if(!u.alwaysNormalize)return n;if(s=t.parseURL(n),!s)throw new Error("Error trying to parse base URL.");return s.path=t.normalizePath(s.path),t.buildURLFromParts(s)}if(f=t.parseURL(i),!f)throw new Error("Error trying to parse relative URL.");if(f.scheme)return u.alwaysNormalize?(f.path=t.normalizePath(f.path),t.buildURLFromParts(f)):i;if(e=t.parseURL(n),!e)throw new Error("Error trying to parse base URL.");return!e.netLoc&&e.path&&e.path[0]!=="/"&&(h=r.exec(e.path),e.netLoc=h[1],e.path=h[2]),e.netLoc&&!e.path&&(e.path="/"),o={scheme:e.scheme,netLoc:f.netLoc,path:null,params:f.params,query:f.query,fragment:f.fragment},f.netLoc||(o.netLoc=e.netLoc,f.path[0]!=="/"&&(f.path?(c=e.path,l=c.substring(0,c.lastIndexOf("/")+1)+f.path,o.path=t.normalizePath(l)):(o.path=e.path,f.params||(o.params=e.params,f.query||(o.query=e.query))))),o.path===null&&(o.path=u.alwaysNormalize?t.normalizePath(f.path):f.path),t.buildURLFromParts(o)},parseURL:function(n){var t=i.exec(n);return t?{scheme:t[1]||"",netLoc:t[2]||"",path:t[3]||"",params:t[4]||"",query:t[5]||"",fragment:t[6]||""}:null},normalizePath:function(n){for(n=n.split("").reverse().join("").replace(u,"");n.length!==(n=n.replace(f,"")).length;);return n.split("").reverse().join("")},buildURLFromParts:function(n){return n.scheme+n.netLoc+n.path+n.params+n.query+n.fragment}};n.exports=t})()});var ya=function(){function t(){this.listeners={}}var n=t.prototype;return n.on=function(n,t){this.listeners[n]||(this.listeners[n]=[]);this.listeners[n].push(t)},n.off=function(n,t){if(!this.listeners[n])return!1;var i=this.listeners[n].indexOf(t);return this.listeners[n].splice(i,1),i>-1},n.trigger=function(n){var i=this.listeners[n],t,r,u;if(i)if(arguments.length===2)for(r=i.length,t=0;t<r;++t)i[t].call(this,arguments[1]);else for(u=Array.prototype.slice.call(arguments,1),r=i.length,t=0;t<r;++t)i[t].apply(this,u)},n.dispose=function(){this.listeners={}},n.pipe=function(n){this.on("data",function(t){n.push(t)})},t}(),ret=function(n){function t(){var t;return t=n.call(this)||this,t.buffer="",t}va(t,n);var i=t.prototype;return i.push=function(n){var t;for(this.buffer+=n,t=this.buffer.indexOf("\n");t>-1;t=this.buffer.indexOf("\n"))this.trigger("data",this.buffer.substring(0,t)),this.buffer=this.buffer.substring(t+1)},t}(ya),uet=function(){return new RegExp('(?:^|,)((?:[^=]*)=(?:"[^"]*"|[^,]*))')},ie=function(n){for(var i=n.split(uet()),u={},r=i.length,t;r--;)i[r]!==""&&(t=/([^=]*)=(.*)/.exec(i[r]).slice(1),t[0]=t[0].replace(/^\s+|\s+$/g,""),t[1]=t[1].replace(/^\s+|\s+$/g,""),t[1]=t[1].replace(/^['"](.*)['"]$/g,"$1"),u[t[0]]=t[1]);return u},fet=function(n){function t(){var t;return t=n.call(this)||this,t.customParsers=[],t.tagMappers=[],t}va(t,n);var i=t.prototype;return i.push=function(n){var r=this,i,t,u;if(n=n.trim(),n.length!==0){if(n[0]!=="#"){this.trigger("data",{type:"uri",uri:n});return}u=this.tagMappers.reduce(function(t,i){var r=i(n);return r===n?t:t.concat([r])},[n]);u.forEach(function(n){for(var u,f,o,e=0;e<r.customParsers.length;e++)if(r.customParsers[e].call(r,n))return;if(n.indexOf("#EXT")!==0){r.trigger("data",{type:"comment",text:n.slice(1)});return}if(n=n.replace("\r",""),i=/^#EXTM3U/.exec(n),i){r.trigger("data",{type:"tag",tagType:"m3u"});return}if(i=/^#EXTINF:?([0-9\.]*)?,?(.*)?$/.exec(n),i){t={type:"tag",tagType:"inf"};i[1]&&(t.duration=parseFloat(i[1]));i[2]&&(t.title=i[2]);r.trigger("data",t);return}if(i=/^#EXT-X-TARGETDURATION:?([0-9.]*)?/.exec(n),i){t={type:"tag",tagType:"targetduration"};i[1]&&(t.duration=parseInt(i[1],10));r.trigger("data",t);return}if(i=/^#ZEN-TOTAL-DURATION:?([0-9.]*)?/.exec(n),i){t={type:"tag",tagType:"totalduration"};i[1]&&(t.duration=parseInt(i[1],10));r.trigger("data",t);return}if(i=/^#EXT-X-VERSION:?([0-9.]*)?/.exec(n),i){t={type:"tag",tagType:"version"};i[1]&&(t.version=parseInt(i[1],10));r.trigger("data",t);return}if(i=/^#EXT-X-MEDIA-SEQUENCE:?(\-?[0-9.]*)?/.exec(n),i){t={type:"tag",tagType:"media-sequence"};i[1]&&(t.number=parseInt(i[1],10));r.trigger("data",t);return}if(i=/^#EXT-X-DISCONTINUITY-SEQUENCE:?(\-?[0-9.]*)?/.exec(n),i){t={type:"tag",tagType:"discontinuity-sequence"};i[1]&&(t.number=parseInt(i[1],10));r.trigger("data",t);return}if(i=/^#EXT-X-PLAYLIST-TYPE:?(.*)?$/.exec(n),i){t={type:"tag",tagType:"playlist-type"};i[1]&&(t.playlistType=i[1]);r.trigger("data",t);return}if(i=/^#EXT-X-BYTERANGE:?([0-9.]*)?@?([0-9.]*)?/.exec(n),i){t={type:"tag",tagType:"byterange"};i[1]&&(t.length=parseInt(i[1],10));i[2]&&(t.offset=parseInt(i[2],10));r.trigger("data",t);return}if(i=/^#EXT-X-ALLOW-CACHE:?(YES|NO)?/.exec(n),i){t={type:"tag",tagType:"allow-cache"};i[1]&&(t.allowed=!/NO/.test(i[1]));r.trigger("data",t);return}if(i=/^#EXT-X-MAP:?(.*)$/.exec(n),i){if(t={type:"tag",tagType:"map"},i[1]&&(u=ie(i[1]),u.URI&&(t.uri=u.URI),u.BYTERANGE)){var s=u.BYTERANGE.split("@"),h=s[0],c=s[1];t.byterange={};h&&(t.byterange.length=parseInt(h,10));c&&(t.byterange.offset=parseInt(c,10))}r.trigger("data",t);return}if(i=/^#EXT-X-STREAM-INF:?(.*)$/.exec(n),i){t={type:"tag",tagType:"stream-inf"};i[1]&&(t.attributes=ie(i[1]),t.attributes.RESOLUTION&&(f=t.attributes.RESOLUTION.split("x"),o={},f[0]&&(o.width=parseInt(f[0],10)),f[1]&&(o.height=parseInt(f[1],10)),t.attributes.RESOLUTION=o),t.attributes.BANDWIDTH&&(t.attributes.BANDWIDTH=parseInt(t.attributes.BANDWIDTH,10)),t.attributes["PROGRAM-ID"]&&(t.attributes["PROGRAM-ID"]=parseInt(t.attributes["PROGRAM-ID"],10)));r.trigger("data",t);return}if(i=/^#EXT-X-MEDIA:?(.*)$/.exec(n),i){t={type:"tag",tagType:"media"};i[1]&&(t.attributes=ie(i[1]));r.trigger("data",t);return}if(i=/^#EXT-X-ENDLIST/.exec(n),i){r.trigger("data",{type:"tag",tagType:"endlist"});return}if(i=/^#EXT-X-DISCONTINUITY/.exec(n),i){r.trigger("data",{type:"tag",tagType:"discontinuity"});return}if(i=/^#EXT-X-PROGRAM-DATE-TIME:?(.*)$/.exec(n),i){t={type:"tag",tagType:"program-date-time"};i[1]&&(t.dateTimeString=i[1],t.dateTimeObject=new Date(i[1]));r.trigger("data",t);return}if(i=/^#EXT-X-KEY:?(.*)$/.exec(n),i){t={type:"tag",tagType:"key"};i[1]&&(t.attributes=ie(i[1]),t.attributes.IV&&(t.attributes.IV.substring(0,2).toLowerCase()==="0x"&&(t.attributes.IV=t.attributes.IV.substring(2)),t.attributes.IV=t.attributes.IV.match(/.{8}/g),t.attributes.IV[0]=parseInt(t.attributes.IV[0],16),t.attributes.IV[1]=parseInt(t.attributes.IV[1],16),t.attributes.IV[2]=parseInt(t.attributes.IV[2],16),t.attributes.IV[3]=parseInt(t.attributes.IV[3],16),t.attributes.IV=new Uint32Array(t.attributes.IV)));r.trigger("data",t);return}if(i=/^#EXT-X-START:?(.*)$/.exec(n),i){t={type:"tag",tagType:"start"};i[1]&&(t.attributes=ie(i[1]),t.attributes["TIME-OFFSET"]=parseFloat(t.attributes["TIME-OFFSET"]),t.attributes.PRECISE=/YES/.test(t.attributes.PRECISE));r.trigger("data",t);return}if(i=/^#EXT-X-CUE-OUT-CONT:?(.*)?$/.exec(n),i){t={type:"tag",tagType:"cue-out-cont"};t.data=i[1]?i[1]:"";r.trigger("data",t);return}if(i=/^#EXT-X-CUE-OUT:?(.*)?$/.exec(n),i){t={type:"tag",tagType:"cue-out"};t.data=i[1]?i[1]:"";r.trigger("data",t);return}if(i=/^#EXT-X-CUE-IN:?(.*)?$/.exec(n),i){t={type:"tag",tagType:"cue-in"};t.data=i[1]?i[1]:"";r.trigger("data",t);return}r.trigger("data",{type:"tag",data:n.slice(4)})})}},i.addParser=function(n){var i=this,r=n.expression,u=n.customType,t=n.dataParser,f=n.segment;typeof t!="function"&&(t=function(n){return n});this.customParsers.push(function(n){var e=r.exec(n);if(e)return i.trigger("data",{type:"custom",data:t(n),customType:u,segment:f}),!0})},i.addTagMapper=function(n){var t=n.expression,i=n.map,r=function(n){return t.test(n)?i(n):n};this.tagMappers.push(r)},t}(ya);var sd=function(n){function i(){var i;i=n.call(this)||this;i.lineStream=new ret;i.parseStream=new fet;i.lineStream.pipe(i.parseStream);var o=iet(i),f=[],t={},r,u,h=function(){},s={AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},c="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",e=0;i.manifest={allowCache:!0,discontinuityStarts:[],segments:[]};i.parseStream.on("data",function(n){var l,i;({tag:function(){({"allow-cache":function(){this.manifest.allowCache=n.allowed;"allowed"in n||(this.trigger("info",{message:"defaulting allowCache to YES"}),this.manifest.allowCache=!0)},byterange:function(){var i={};"length"in n&&(t.byterange=i,i.length=n.length,"offset"in n||(this.trigger("info",{message:"defaulting offset to zero"}),n.offset=0));"offset"in n&&(t.byterange=i,i.offset=n.offset)},endlist:function(){this.manifest.endList=!0},inf:function(){"mediaSequence"in this.manifest||(this.manifest.mediaSequence=0,this.trigger("info",{message:"defaulting media sequence to zero"}));"discontinuitySequence"in this.manifest||(this.manifest.discontinuitySequence=0,this.trigger("info",{message:"defaulting discontinuity sequence to zero"}));n.duration>0&&(t.duration=n.duration);n.duration===0&&(t.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"}));this.manifest.segments=f},key:function(){if(!n.attributes){this.trigger("warn",{message:"ignoring key declaration without attribute list"});return}if(n.attributes.METHOD==="NONE"){u=null;return}if(!n.attributes.URI){this.trigger("warn",{message:"ignoring key declaration without URI"});return}if(n.attributes.KEYFORMAT===c){if(["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"].indexOf(n.attributes.METHOD)===-1){this.trigger("warn",{message:"invalid key method provided for Widevine"});return}if(n.attributes.METHOD==="SAMPLE-AES-CENC"&&this.trigger("warn",{message:"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead"}),n.attributes.URI.substring(0,23)!=="data:text/plain;base64,"){this.trigger("warn",{message:"invalid key URI provided for Widevine"});return}if(!(n.attributes.KEYID&&n.attributes.KEYID.substring(0,2)==="0x")){this.trigger("warn",{message:"invalid key ID provided for Widevine"});return}this.manifest.contentProtection={"com.widevine.alpha":{attributes:{schemeIdUri:n.attributes.KEYFORMAT,keyId:n.attributes.KEYID.substring(2)},pssh:eet(n.attributes.URI.split(",")[1])}};return}n.attributes.METHOD||this.trigger("warn",{message:"defaulting key method to AES-128"});u={method:n.attributes.METHOD||"AES-128",uri:n.attributes.URI};typeof n.attributes.IV!="undefined"&&(u.iv=n.attributes.IV)},"media-sequence":function(){if(!isFinite(n.number)){this.trigger("warn",{message:"ignoring invalid media sequence: "+n.number});return}this.manifest.mediaSequence=n.number},"discontinuity-sequence":function(){if(!isFinite(n.number)){this.trigger("warn",{message:"ignoring invalid discontinuity sequence: "+n.number});return}this.manifest.discontinuitySequence=n.number;e=n.number},"playlist-type":function(){if(!/VOD|EVENT/.test(n.playlistType)){this.trigger("warn",{message:"ignoring unknown playlist type: "+n.playlist});return}this.manifest.playlistType=n.playlistType},map:function(){r={};n.uri&&(r.uri=n.uri);n.byterange&&(r.byterange=n.byterange)},"stream-inf":function(){if(this.manifest.playlists=f,this.manifest.mediaGroups=this.manifest.mediaGroups||s,!n.attributes){this.trigger("warn",{message:"ignoring empty stream-inf attributes"});return}t.attributes||(t.attributes={});aa(t.attributes,n.attributes)},media:function(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||s,!(n.attributes&&n.attributes.TYPE&&n.attributes["GROUP-ID"]&&n.attributes.NAME)){this.trigger("warn",{message:"ignoring incomplete or missing media group"});return}var t=this.manifest.mediaGroups[n.attributes.TYPE];t[n.attributes["GROUP-ID"]]=t[n.attributes["GROUP-ID"]]||{};l=t[n.attributes["GROUP-ID"]];i={"default":/yes/i.test(n.attributes.DEFAULT)};i.autoselect=i["default"]?!0:/yes/i.test(n.attributes.AUTOSELECT);n.attributes.LANGUAGE&&(i.language=n.attributes.LANGUAGE);n.attributes.URI&&(i.uri=n.attributes.URI);n.attributes["INSTREAM-ID"]&&(i.instreamId=n.attributes["INSTREAM-ID"]);n.attributes.CHARACTERISTICS&&(i.characteristics=n.attributes.CHARACTERISTICS);n.attributes.FORCED&&(i.forced=/yes/i.test(n.attributes.FORCED));l[n.attributes.NAME]=i},discontinuity:function(){e+=1;t.discontinuity=!0;this.manifest.discontinuityStarts.push(f.length)},"program-date-time":function(){typeof this.manifest.dateTimeString=="undefined"&&(this.manifest.dateTimeString=n.dateTimeString,this.manifest.dateTimeObject=n.dateTimeObject);t.dateTimeString=n.dateTimeString;t.dateTimeObject=n.dateTimeObject},targetduration:function(){if(!isFinite(n.duration)||n.duration<0){this.trigger("warn",{message:"ignoring invalid target duration: "+n.duration});return}this.manifest.targetDuration=n.duration},totalduration:function(){if(!isFinite(n.duration)||n.duration<0){this.trigger("warn",{message:"ignoring invalid total duration: "+n.duration});return}this.manifest.totalDuration=n.duration},start:function(){if(!n.attributes||isNaN(n.attributes["TIME-OFFSET"])){this.trigger("warn",{message:"ignoring start declaration without appropriate attribute list"});return}this.manifest.start={timeOffset:n.attributes["TIME-OFFSET"],precise:n.attributes.PRECISE}},"cue-out":function(){t.cueOut=n.data},"cue-out-cont":function(){t.cueOutCont=n.data},"cue-in":function(){t.cueIn=n.data}}[n.tagType]||h).call(o)},uri:function(){t.uri=n.uri;f.push(t);!this.manifest.targetDuration||"duration"in t||(this.trigger("warn",{message:"defaulting segment duration to the target duration"}),t.duration=this.manifest.targetDuration);u&&(t.key=u);t.timeline=e;r&&(t.map=r);t={}},comment:function(){},custom:function(){n.segment?(t.custom=t.custom||{},t.custom[n.customType]=n.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[n.customType]=n.data)}})[n.type].call(o)});return i}va(i,n);var t=i.prototype;return t.push=function(n){this.lineStream.push(n)},t.end=function(){this.lineStream.push("\n")},t.addParser=function(n){this.parseStream.addParser(n)},t.addTagMapper=function(n){this.parseStream.addTagMapper(n)},i}(ya),hd=function(n){return!!n&&typeof n=="object"},lt=function lt(){for(var t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];return i.reduce(function(n,t){return Object.keys(t).forEach(function(i){n[i]=Array.isArray(n[i])&&Array.isArray(t[i])?n[i].concat(t[i]):hd(n[i])&&hd(t[i])?lt(n[i],t[i]):t[i]}),n},{})},oet=function(n){return Object.keys(n).map(function(t){return n[t]})},set=function(n,t){for(var r=[],i=n;i<t;i++)r.push(i);return r},ps=function(n){return n.reduce(function(n,t){return n.concat(t)},[])},cd=function(n){var i,t;if(!n.length)return[];for(i=[],t=0;t<n.length;t++)i.push(n[t]);return i},het=function(n,t){return n.reduce(function(n,i,r){return i[t]&&n.push(r),n},[])},wu={INVALID_NUMBER_OF_PERIOD:"INVALID_NUMBER_OF_PERIOD",DASH_EMPTY_MANIFEST:"DASH_EMPTY_MANIFEST",DASH_INVALID_XML:"DASH_INVALID_XML",NO_BASE_URL:"NO_BASE_URL",MISSING_SEGMENT_INFORMATION:"MISSING_SEGMENT_INFORMATION",SEGMENT_TIME_UNSPECIFIED:"SEGMENT_TIME_UNSPECIFIED",UNSUPPORTED_UTC_TIMING_SCHEME:"UNSUPPORTED_UTC_TIMING_SCHEME"};var ld=cet(function(n){(function(){var i=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/\?#]*\/)*.*?)??(;.*?)?(\?.*?)?(#.*?)?$/,r=/^([^\/?#]*)(.*)$/,u=/(?:\/|^)\.(?=\/)/g,f=/(?:\/|^)\.\.\/(?!\.\.\/).*?(?=\/)/g,t={buildAbsoluteURL:function(n,i,u){var s,f,e,h,o,c,l;if(u=u||{},n=n.trim(),i=i.trim(),!i){if(!u.alwaysNormalize)return n;if(s=t.parseURL(n),!s)throw new Error("Error trying to parse base URL.");return s.path=t.normalizePath(s.path),t.buildURLFromParts(s)}if(f=t.parseURL(i),!f)throw new Error("Error trying to parse relative URL.");if(f.scheme)return u.alwaysNormalize?(f.path=t.normalizePath(f.path),t.buildURLFromParts(f)):i;if(e=t.parseURL(n),!e)throw new Error("Error trying to parse base URL.");return!e.netLoc&&e.path&&e.path[0]!=="/"&&(h=r.exec(e.path),e.netLoc=h[1],e.path=h[2]),e.netLoc&&!e.path&&(e.path="/"),o={scheme:e.scheme,netLoc:f.netLoc,path:null,params:f.params,query:f.query,fragment:f.fragment},f.netLoc||(o.netLoc=e.netLoc,f.path[0]!=="/"&&(f.path?(c=e.path,l=c.substring(0,c.lastIndexOf("/")+1)+f.path,o.path=t.normalizePath(l)):(o.path=e.path,f.params||(o.params=e.params,f.query||(o.query=e.query))))),o.path===null&&(o.path=u.alwaysNormalize?t.normalizePath(f.path):f.path),t.buildURLFromParts(o)},parseURL:function(n){var t=i.exec(n);return t?{scheme:t[1]||"",netLoc:t[2]||"",path:t[3]||"",params:t[4]||"",query:t[5]||"",fragment:t[6]||""}:null},normalizePath:function(n){for(n=n.split("").reverse().join("").replace(u,"");n.length!==(n=n.replace(f,"")).length;);return n.split("").reverse().join("")},buildURLFromParts:function(n){return n.scheme+n.netLoc+n.path+n.params+n.query+n.fragment}};n.exports=t})()}),pa=function(t,i){return/^[a-z]+:/i.test(i)?i:(/\/\//i.test(t)||(t=ld.buildAbsoluteURL(n.location.href,t)),ld.buildAbsoluteURL(t,i))},re=function(n){var i=n.baseUrl,l=i===void 0?"":i,r=n.source,u=r===void 0?"":r,f=n.range,t=f===void 0?"":f,e=n.indexRange,o=e===void 0?"":e,s={uri:u,resolvedUri:pa(l||"",u)};if(t||o){var a=t?t:o,h=a.split("-"),c=parseInt(h[0],10),v=parseInt(h[1],10);s.byterange={length:v-c+1,offset:c}}return s},aet=function(n){var t=n.offset+n.length-1;return n.offset+"-"+t},vet={"static":function(n){var i=n.duration,t=n.timescale,r=t===void 0?1:t,u=n.sourceDuration;return{start:0,end:Math.ceil(u/(i/r))}},dynamic:function(n){var h=n.NOW,c=n.clientOffset,l=n.availabilityStartTime,f=n.timescale,t=f===void 0?1:f,i=n.duration,e=n.start,a=e===void 0?0:e,o=n.minimumUpdatePeriod,v=o===void 0?0:o,s=n.timeShiftBufferDepth,y=s===void 0?Infinity:s,r=(h+c)/1e3,u=l+a,p=r+v,w=p-u,b=Math.ceil(w*t/i),k=Math.floor((r-u-y)*t/i),d=Math.floor((r-u)*t/i);return{start:Math.max(0,k),end:Math.min(b,d)}}},yet=function(n){return function(t,i){var r=n.duration,u=n.timescale,e=u===void 0?1:u,o=n.periodIndex,f=n.startNumber,s=f===void 0?1:f;return{number:s+t,duration:r/e,timeline:o,time:i*r}}},wa=function(n){var r=n.type,u=r===void 0?"static":r,o=n.duration,f=n.timescale,s=f===void 0?1:f,h=n.sourceDuration,e=vet[u](n),c=e.start,l=e.end,t=set(c,l).map(yet(n)),i;return u==="static"&&(i=t.length-1,t[i].duration=h-o/s*i),t},ad=function(n){var i=n.baseUrl,u=n.initialization,f=u===void 0?{}:u,e=n.sourceDuration,o=n.timescale,c=o===void 0?1:o,s=n.indexRange,l=s===void 0?"":s,a=n.duration,h,t,r;if(!i)throw new Error(wu.NO_BASE_URL);return h=re({baseUrl:i,source:f.sourceURL,range:f.range}),t=re({baseUrl:i,source:i,indexRange:l}),t.map=h,a?(r=wa(n),r.length&&(t.duration=r[0].duration,t.timeline=r[0].timeline)):e&&(t.duration=e/c,t.timeline=0),t.number=0,[t]},pet=function(n,t,i){for(var f=n.sidx.map?n.sidx.map:null,a=n.sidx.duration,e=n.timeline||0,o=n.sidx.byterange,v=o.offset+o.length,y=t.timescale,p=t.references.filter(function(n){return n.referenceType!==1}),s=[],u=v+t.firstOffset,r=0;r<p.length;r++){var h=t.references[r],c=h.referencedSize,w=h.subsegmentDuration,b=u+c-1,k=u+"-"+b,d={baseUrl:i,timescale:y,timeline:e,periodIndex:e,duration:w,sourceDuration:a,indexRange:k},l=ad(d)[0];f&&(l.map=f);s.push(l);u+=c}return n.segments=s,n},vd=function(n){var t=oet(n.reduce(function(n,t){var i=t.attributes.id+(t.attributes.lang||""),r;return n[i]?(t.segments[0]&&(t.segments[0].discontinuity=!0),(r=n[i].segments).push.apply(r,t.segments),t.attributes.contentProtection&&(n[i].attributes.contentProtection=t.attributes.contentProtection)):n[i]=t,n},{}));return t.map(function(n){return n.discontinuityStarts=het(n.segments,"discontinuity"),n})},ba=function(n,t){var f,i,r,u;if(t===void 0&&(t={}),!Object.keys(t).length)return n;for(f in n)(i=n[f],i.sidx)&&(r=i.sidx.uri+"-"+aet(i.sidx.byterange),u=t[r]&&t[r].sidx,i.sidx&&u&&pet(i,u,i.sidx.resolvedUri));return n},wet=function(n){var i,t=n.attributes,r=n.segments,f=n.sidx,u={attributes:(i={NAME:t.id,BANDWIDTH:t.bandwidth,CODECS:t.codecs},i["PROGRAM-ID"]=1,i),uri:"",endList:(t.type||"static")==="static",timeline:t.periodIndex,resolvedUri:"",targetDuration:t.duration,segments:r,mediaSequence:r.length?r[0].number:1};return t.contentProtection&&(u.contentProtection=t.contentProtection),f&&(u.sidx=f),u},bet=function(n){var r,t=n.attributes,i=n.segments;return typeof i=="undefined"&&(i=[{uri:t.baseUrl,timeline:t.periodIndex,resolvedUri:t.baseUrl||"",duration:t.sourceDuration,number:0}],t.duration=t.sourceDuration),{attributes:(r={NAME:t.id,BANDWIDTH:t.bandwidth},r["PROGRAM-ID"]=1,r),uri:"",endList:(t.type||"static")==="static",timeline:t.periodIndex,resolvedUri:t.baseUrl||"",targetDuration:t.duration,segments:i,mediaSequence:i.length?i[0].number:1}},ket=function(n,t){var i,r,u;return t===void 0&&(t={}),r=n.reduce(function(n,r){var u=r.attributes.role&&r.attributes.role.value||"",e=r.attributes.lang||"",f="main",o;return(e&&(o=u?" ("+u+")":"",f=""+r.attributes.lang+o),n[f]&&n[f].playlists[0].attributes.BANDWIDTH>r.attributes.bandwidth)?n:(n[f]={language:e,autoselect:!0,"default":u==="main",playlists:ba([wet(r)],t),uri:""},typeof i=="undefined"&&u==="main"&&(i=r,i["default"]=!0),n)},{}),i||(u=Object.keys(r)[0],r[u]["default"]=!0),r},det=function(n,t){return t===void 0&&(t={}),n.reduce(function(n,i){var r=i.attributes.lang||"text";return n[r]?n:(n[r]={language:r,"default":!1,autoselect:!1,playlists:ba([bet(i)],t),uri:""},n)},{})},get=function(n){var i,t=n.attributes,r=n.segments,f=n.sidx,u={attributes:(i={NAME:t.id,AUDIO:"audio",SUBTITLES:"subs",RESOLUTION:{width:t.width,height:t.height},CODECS:t.codecs,BANDWIDTH:t.bandwidth},i["PROGRAM-ID"]=1,i),uri:"",endList:(t.type||"static")==="static",timeline:t.periodIndex,resolvedUri:"",targetDuration:t.duration,segments:r,mediaSequence:r.length?r[0].number:1};return t.contentProtection&&(u.contentProtection=t.contentProtection),f&&(u.sidx=f),u},not=function(n,t){var i;if(t===void 0&&(t={}),!n.length)return{};var u=n[0].attributes,s=u.sourceDuration,f=u.minimumUpdatePeriod,h=f===void 0?0:f,c=function(n){var t=n.attributes;return t.mimeType==="video/mp4"||t.contentType==="video"},l=function(n){var t=n.attributes;return t.mimeType==="audio/mp4"||t.contentType==="audio"},a=function(n){var t=n.attributes;return t.mimeType==="text/vtt"||t.contentType==="text"},v=vd(n.filter(c)).map(get),e=vd(n.filter(l)),o=n.filter(a),r={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:(i={AUDIO:{},VIDEO:{}},i["CLOSED-CAPTIONS"]={},i.SUBTITLES={},i),uri:"",duration:s,playlists:ba(v,t),minimumUpdatePeriod:h*1e3};return e.length&&(r.mediaGroups.AUDIO.audio=ket(e,t)),o.length&&(r.mediaGroups.SUBTITLES.subs=det(o,t)),r},tot=function(n,t,i){var e=n.NOW,o=n.clientOffset,s=n.availabilityStartTime,r=n.timescale,h=r===void 0?1:r,u=n.start,c=u===void 0?0:u,f=n.minimumUpdatePeriod,l=f===void 0?0:f,a=(e+o)/1e3,v=s+c,y=a+l,p=y-v;return Math.ceil((p*h-t)/i)},yd=function(n,t){for(var l=n.type,g=l===void 0?"static":l,a=n.minimumUpdatePeriod,nt=a===void 0?0:a,v=n.media,tt=v===void 0?"":v,it=n.sourceDuration,y=n.timescale,p=y===void 0?1:y,w=n.startNumber,b=w===void 0?1:w,rt=n.periodIndex,f=[],i=-1,o,c,d,s,r=0;r<t.length;r++){var h=t[r],u=h.d,k=h.r||0,e=h.t||0;for(i<0&&(i=e),e&&e>i&&(i=e),o=void 0,k<0?(c=r+1,o=c===t.length?g==="dynamic"&&nt>0&&tt.indexOf("$Number$")>0?tot(n,i,u):(it*p-i)/u:(t[c].t-i)/u):o=k+1,d=b+f.length+o,s=b+f.length;s<d;)f.push({number:s,duration:u/p,time:i,timeline:rt}),i+=u,s++}return f},iot=/\$([A-z]*)(?:(%0)([0-9]+)d)?\$/g,rot=function(n){return function(t,i,r,u){if(t==="$$")return"$";if(typeof n[i]=="undefined")return t;var f=""+n[i];return i==="RepresentationID"?f:(u=r?parseInt(u,10):1,f.length>=u)?f:""+new Array(u-f.length+1).join("0")+f}},pd=function(n,t){return n.replace(iot,rot(t))},uot=function(n,t){return!n.duration&&!t?[{number:n.startNumber||1,duration:n.sourceDuration,time:0,timeline:n.periodIndex}]:n.duration?wa(n):yd(n,t)},fot=function(n,t){var i={RepresentationID:n.id,Bandwidth:n.bandwidth||0},r=n.initialization,u=r===void 0?{sourceURL:"",range:""}:r,f=re({baseUrl:n.baseUrl,source:pd(u.sourceURL,i),range:u.range}),e=uot(n,t);return e.map(function(t){i.Number=t.number;i.Time=t.time;var r=pd(n.media||"",i);return{uri:r,timeline:t.timeline,duration:t.duration,resolvedUri:pa(n.baseUrl||"",r),map:f,number:t.number}})},eot=function(n,t){var i=n.baseUrl,r=n.initialization,u=r===void 0?{}:r,e=re({baseUrl:i,source:u.sourceURL,range:u.range}),f=re({baseUrl:i,source:t.media,range:t.mediaRange});return f.map=e,f},oot=function(n,t){var i=n.duration,f=n.segmentUrls,e=f===void 0?[]:f,r,u;if(!i&&!t||i&&t)throw new Error(wu.SEGMENT_TIME_UNSPECIFIED);return r=e.map(function(t){return eot(n,t)}),i&&(u=wa(n)),t&&(u=yd(n,t)),u.map(function(n,t){if(r[t]){var i=r[t];return i.timeline=n.timeline,i.duration=n.duration,i.number=n.number,i}}).filter(function(n){return n})},sot=function(n){var e=n.attributes,i=n.segmentInfo,t,u,r,f;if(i.template?(u=fot,t=lt(e,i.template)):i.base?(u=ad,t=lt(e,i.base)):i.list&&(u=oot,t=lt(e,i.list)),r={attributes:e},!u)return r;if(f=u(t,i.timeline),t.duration){var o=t,h=o.duration,s=o.timescale,c=s===void 0?1:s;t.duration=h/c}else t.duration=f.length?f.reduce(function(n,t){return Math.max(n,Math.ceil(t.duration))},0):0;return r.attributes=t,r.segments=f,i.base&&t.indexRange&&(r.sidx=f[0],r.segments=[]),r},hot=function(n){return n.map(sot)},nt=function(n,t){return cd(n.childNodes).filter(function(n){var i=n.tagName;return i===t})},wd=function(n){return n.textContent.trim()},ue=function(n){var i=/P(?:(\d*)Y)?(?:(\d*)M)?(?:(\d*)D)?(?:T(?:(\d*)H)?(?:(\d*)M)?(?:([\d.]*)S)?)?/.exec(n);if(!i)return 0;var t=i.slice(1),r=t[0],u=t[1],f=t[2],e=t[3],o=t[4],s=t[5];return parseFloat(r||0)*31536e3+parseFloat(u||0)*2592e3+parseFloat(f||0)*86400+parseFloat(e||0)*3600+parseFloat(o||0)*60+parseFloat(s||0)},cot=function(n){return/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(n)&&(n+="Z"),Date.parse(n)},bd={mediaPresentationDuration:function(n){return ue(n)},availabilityStartTime:function(n){return cot(n)/1e3},minimumUpdatePeriod:function(n){return ue(n)},timeShiftBufferDepth:function(n){return ue(n)},start:function(n){return ue(n)},width:function(n){return parseInt(n,10)},height:function(n){return parseInt(n,10)},bandwidth:function(n){return parseInt(n,10)},startNumber:function(n){return parseInt(n,10)},timescale:function(n){return parseInt(n,10)},duration:function(n){var t=parseInt(n,10);return isNaN(t)?ue(n):t},d:function(n){return parseInt(n,10)},t:function(n){return parseInt(n,10)},r:function(n){return parseInt(n,10)},DEFAULT:function(n){return n}},et=function(n){return(n&&n.attributes)?cd(n.attributes).reduce(function(n,t){var i=bd[t.name]||bd.DEFAULT;return n[t.name]=i(t.value),n},{}):{}};var aot={"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime"},ws=function(n,t){return t.length?ps(n.map(function(n){return t.map(function(t){return pa(n,wd(t))})})):n},ka=function(n){var f=nt(n,"SegmentTemplate")[0],i=nt(n,"SegmentList")[0],c=i&&nt(i,"SegmentURL").map(function(n){return lt({tag:"SegmentURL"},et(n))}),e=nt(n,"SegmentBase")[0],o=i||f,s=o&&nt(o,"SegmentTimeline")[0],h=i||e||f,r=h&&nt(h,"Initialization")[0],t=f&&et(f),u;return t&&r?t.initialization=r&&et(r):t&&t.initialization&&(t.initialization={sourceURL:t.initialization}),u={template:t,timeline:s&&nt(s,"S").map(function(n){return et(n)}),list:i&&lt(et(i),{segmentUrls:c,initialization:et(r)}),base:e&&lt(et(e),{initialization:et(r)})},Object.keys(u).forEach(function(n){u[n]||delete u[n]}),u},vot=function(n,t,i){return function(r){var u=nt(r,"BaseURL"),f=ws(t,u),e=lt(n,et(r)),o=ka(r);return f.map(function(n){return{segmentInfo:lt(i,o),attributes:lt(e,{baseUrl:n})}})}},yot=function(n){return n.reduce(function(n,t){var f=et(t),i=aot[f.schemeIdUri],r,u,e;return i&&(n[i]={attributes:f},r=nt(t,"cenc:pssh")[0],r&&(u=wd(r),e=u&&lot(u),n[i].pssh=e)),n},{})},pot=function(n,t,i){return function(r){var e=et(r),o=ws(t,nt(r,"BaseURL")),s=nt(r,"Role")[0],h={role:et(s)},u=lt(n,e,h),f=yot(nt(r,"ContentProtection"));Object.keys(f).length&&(u=lt(u,{contentProtection:f}));var c=ka(r),l=nt(r,"Representation"),a=lt(i,c);return ps(l.map(vot(u,o,a)))}},wot=function(t,i){return function(r,u){var e=ws(i,nt(r,"BaseURL")),o=et(r),f=parseInt(o.id,10),s=n.isNaN(f)?u:f,h=lt(t,{periodIndex:s}),c=nt(r,"AdaptationSet"),l=ka(r);return ps(c.map(pot(h,e,l)))}},bot=function(n,t){var i,s;t===void 0&&(t={});var r=t,u=r.manifestUri,h=u===void 0?"":u,f=r.NOW,c=f===void 0?Date.now():f,e=r.clientOffset,l=e===void 0?0:e,o=nt(n,"Period");if(!o.length)throw new Error(wu.INVALID_NUMBER_OF_PERIOD);return i=et(n),s=ws([h],nt(n,"BaseURL")),i.sourceDuration=i.mediaPresentationDuration||0,i.NOW=c,i.clientOffset=l,ps(o.map(wot(i,s)))},kd=function(t){if(t==="")throw new Error(wu.DASH_EMPTY_MANIFEST);var u=new n.DOMParser,r=u.parseFromString(t,"application/xml"),i=r&&r.documentElement.tagName==="MPD"?r.documentElement:null;if(!i||i&&i.getElementsByTagName("parsererror").length>0)throw new Error(wu.DASH_INVALID_XML);return i},kot=function(n){var i=nt(n,"UTCTiming")[0],t;if(!i)return null;t=et(i);switch(t.schemeIdUri){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":t.method="HEAD";break;case"urn:mpeg:dash:utc:http-xsdate:2014":case"urn:mpeg:dash:utc:http-iso:2014":case"urn:mpeg:dash:utc:http-xsdate:2012":case"urn:mpeg:dash:utc:http-iso:2012":t.method="GET";break;case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":t.method="DIRECT";t.value=Date.parse(t.value);break;case"urn:mpeg:dash:utc:http-ntp:2014":case"urn:mpeg:dash:utc:ntp:2014":case"urn:mpeg:dash:utc:sntp:2014":default:throw new Error(wu.UNSUPPORTED_UTC_TIMING_SCHEME);}return t},dd=function(n,t){return t===void 0&&(t={}),not(hot(bot(kd(n),t)),t.sidxMapping)},dot=function(n){return kot(kd(n))},got=function(n){return n>>>0},nst=function(n){return("00"+n.toString(16)).slice(-2)},da={toUnsigned:got,toHexString:nst},ot,ga,nv=da.toUnsigned,gt=function(n){return new Date(n*1e3-20828448e5)},gd=function(n){return{isLeading:(n[0]&12)>>>2,dependsOn:n[0]&3,isDependedOn:(n[1]&192)>>>6,hasRedundancy:(n[1]&48)>>>4,paddingValue:(n[1]&14)>>>1,isNonSyncSample:n[1]&1,degradationPriority:n[2]<<8|n[3]}},bu=function(n){var t="";return t+=String.fromCharCode(n[0]),t+=String.fromCharCode(n[1]),t+=String.fromCharCode(n[2]),t+String.fromCharCode(n[3])},ng=function ng(n,t){var r=[],i,f,o,u,e;if(!t.length)return null;for(i=0;i<n.byteLength;)f=nv(n[i]<<24|n[i+1]<<16|n[i+2]<<8|n[i+3]),o=bu(n.subarray(i+4,i+8)),u=f>1?i+f:n.byteLength,o===t[0]&&(t.length===1?r.push(n.subarray(i+8,u)):(e=ng(n.subarray(i+8,u),t.slice(1)),e.length&&(r=r.concat(e)))),i=u;return r},tst=function(n){for(var u=new DataView(n.buffer,n.byteOffset,n.byteLength),t=[],r,i=0;i+4<n.length;i+=r){if(r=u.getUint32(i),i+=4,r<=0){t.push("<span style='color:red;'>MALFORMED DATA<\/span>");continue}switch(n[i]&31){case 1:t.push("slice_layer_without_partitioning_rbsp");break;case 5:t.push("slice_layer_without_partitioning_rbsp_idr");break;case 6:t.push("sei_rbsp");break;case 7:t.push("seq_parameter_set_rbsp");break;case 8:t.push("pic_parameter_set_rbsp");break;case 9:t.push("access_unit_delimiter_rbsp");break;default:t.push("UNKNOWN NAL - "+n[i]&31)}}return t},gi={avc1:function(n){var t=new DataView(n.buffer,n.byteOffset,n.byteLength);return{dataReferenceIndex:t.getUint16(6),width:t.getUint16(24),height:t.getUint16(26),horizresolution:t.getUint16(28)+t.getUint16(30)/16,vertresolution:t.getUint16(32)+t.getUint16(34)/16,frameCount:t.getUint16(40),depth:t.getUint16(74),config:ot(n.subarray(78,n.byteLength))}},avcC:function(n){for(var f=new DataView(n.buffer,n.byteOffset,n.byteLength),u={configurationVersion:n[0],avcProfileIndication:n[1],profileCompatibility:n[2],avcLevelIndication:n[3],lengthSizeMinusOne:n[4]&3,sps:[],pps:[]},o=n[5]&31,e,i,t=6,r=0;r<o;r++)i=f.getUint16(t),t+=2,u.sps.push(new Uint8Array(n.subarray(t,t+i))),t+=i;for(e=n[t],t++,r=0;r<e;r++)i=f.getUint16(t),t+=2,u.pps.push(new Uint8Array(n.subarray(t,t+i))),t+=i;return u},btrt:function(n){var t=new DataView(n.buffer,n.byteOffset,n.byteLength);return{bufferSizeDB:t.getUint32(0),maxBitrate:t.getUint32(4),avgBitrate:t.getUint32(8)}},esds:function(n){return{version:n[0],flags:new Uint8Array(n.subarray(1,4)),esId:n[6]<<8|n[7],streamPriority:n[8]&31,decoderConfig:{objectProfileIndication:n[11],streamType:n[12]>>>2&63,bufferSize:n[13]<<16|n[14]<<8|n[15],maxBitrate:n[16]<<24|n[17]<<16|n[18]<<8|n[19],avgBitrate:n[20]<<24|n[21]<<16|n[22]<<8|n[23],decoderConfigDescriptor:{tag:n[24],length:n[25],audioObjectType:n[26]>>>3&31,samplingFrequencyIndex:(n[26]&7)<<1|n[27]>>>7&1,channelConfiguration:n[27]>>>3&15}}}},ftyp:function(n){for(var r=new DataView(n.buffer,n.byteOffset,n.byteLength),i={majorBrand:bu(n.subarray(0,4)),minorVersion:r.getUint32(4),compatibleBrands:[]},t=8;t<n.byteLength;)i.compatibleBrands.push(bu(n.subarray(t,t+4))),t+=4;return i},dinf:function(n){return{boxes:ot(n)}},dref:function(n){return{version:n[0],flags:new Uint8Array(n.subarray(1,4)),dataReferences:ot(n.subarray(8))}},hdlr:function(n){for(var r=new DataView(n.buffer,n.byteOffset,n.byteLength),i={version:r.getUint8(0),flags:new Uint8Array(n.subarray(1,4)),handlerType:bu(n.subarray(8,12)),name:""},t=8,t=24;t<n.byteLength;t++){if(n[t]===0){t++;break}i.name+=String.fromCharCode(n[t])}return i.name=decodeURIComponent(escape(i.name)),i},mdat:function(n){return{byteLength:n.byteLength,nals:tst(n)}},mdhd:function(n){var r=new DataView(n.buffer,n.byteOffset,n.byteLength),t=4,u,i={version:r.getUint8(0),flags:new Uint8Array(n.subarray(1,4)),language:""};return i.version===1?(t+=4,i.creationTime=gt(r.getUint32(t)),t+=8,i.modificationTime=gt(r.getUint32(t)),t+=4,i.timescale=r.getUint32(t),t+=8,i.duration=r.getUint32(t)):(i.creationTime=gt(r.getUint32(t)),t+=4,i.modificationTime=gt(r.getUint32(t)),t+=4,i.timescale=r.getUint32(t),t+=4,i.duration=r.getUint32(t)),t+=4,u=r.getUint16(t),i.language+=String.fromCharCode((u>>10)+96),i.language+=String.fromCharCode(((u&992)>>5)+96),i.language+=String.fromCharCode((u&31)+96),i},mdia:function(n){return{boxes:ot(n)}},mfhd:function(n){return{version:n[0],flags:new Uint8Array(n.subarray(1,4)),sequenceNumber:n[4]<<24|n[5]<<16|n[6]<<8|n[7]}},minf:function(n){return{boxes:ot(n)}},mp4a:function(n){var t=new DataView(n.buffer,n.byteOffset,n.byteLength),i={dataReferenceIndex:t.getUint16(6),channelcount:t.getUint16(16),samplesize:t.getUint16(18),samplerate:t.getUint16(24)+t.getUint16(26)/65536};return n.byteLength>28&&(i.streamDescriptor=ot(n.subarray(28))[0]),i},moof:function(n){return{boxes:ot(n)}},moov:function(n){return{boxes:ot(n)}},mvex:function(n){return{boxes:ot(n)}},mvhd:function(n){var i=new DataView(n.buffer,n.byteOffset,n.byteLength),t=4,r={version:i.getUint8(0),flags:new Uint8Array(n.subarray(1,4))};return r.version===1?(t+=4,r.creationTime=gt(i.getUint32(t)),t+=8,r.modificationTime=gt(i.getUint32(t)),t+=4,r.timescale=i.getUint32(t),t+=8,r.duration=i.getUint32(t)):(r.creationTime=gt(i.getUint32(t)),t+=4,r.modificationTime=gt(i.getUint32(t)),t+=4,r.timescale=i.getUint32(t),t+=4,r.duration=i.getUint32(t)),t+=4,r.rate=i.getUint16(t)+i.getUint16(t+2)/16,t+=4,r.volume=i.getUint8(t)+i.getUint8(t+1)/8,t+=2,t+=2,t+=8,r.matrix=new Uint32Array(n.subarray(t,t+36)),t+=36,t+=24,r.nextTrackId=i.getUint32(t),r},pdin:function(n){var t=new DataView(n.buffer,n.byteOffset,n.byteLength);return{version:t.getUint8(0),flags:new Uint8Array(n.subarray(1,4)),rate:t.getUint32(4),initialDelay:t.getUint32(8)}},sdtp:function(n){for(var i={version:n[0],flags:new Uint8Array(n.subarray(1,4)),samples:[]},t=4;t<n.byteLength;t++)i.samples.push({dependsOn:(n[t]&48)>>4,isDependedOn:(n[t]&12)>>2,hasRedundancy:n[t]&3});return i},sidx:function(n){for(var t=new DataView(n.buffer,n.byteOffset,n.byteLength),r={version:n[0],flags:new Uint8Array(n.subarray(1,4)),references:[],referenceId:t.getUint32(4),timescale:t.getUint32(8),earliestPresentationTime:t.getUint32(12),firstOffset:t.getUint32(16)},u=t.getUint16(22),i=24;u;i+=12,u--)r.references.push({referenceType:(n[i]&128)>>>7,referencedSize:t.getUint32(i)&2147483647,subsegmentDuration:t.getUint32(i+4),startsWithSap:!!(n[i+8]&128),sapType:(n[i+8]&112)>>>4,sapDeltaTime:t.getUint32(i+8)&268435455});return r},smhd:function(n){return{version:n[0],flags:new Uint8Array(n.subarray(1,4)),balance:n[4]+n[5]/256}},stbl:function(n){return{boxes:ot(n)}},stco:function(n){for(var i=new DataView(n.buffer,n.byteOffset,n.byteLength),r={version:n[0],flags:new Uint8Array(n.subarray(1,4)),chunkOffsets:[]},u=i.getUint32(4),t=8;u;t+=4,u--)r.chunkOffsets.push(i.getUint32(t));return r},stsc:function(n){for(var i=new DataView(n.buffer,n.byteOffset,n.byteLength),r=i.getUint32(4),u={version:n[0],flags:new Uint8Array(n.subarray(1,4)),sampleToChunks:[]},t=8;r;t+=12,r--)u.sampleToChunks.push({firstChunk:i.getUint32(t),samplesPerChunk:i.getUint32(t+4),sampleDescriptionIndex:i.getUint32(t+8)});return u},stsd:function(n){return{version:n[0],flags:new Uint8Array(n.subarray(1,4)),sampleDescriptions:ot(n.subarray(8))}},stsz:function(n){for(var i=new DataView(n.buffer,n.byteOffset,n.byteLength),r={version:n[0],flags:new Uint8Array(n.subarray(1,4)),sampleSize:i.getUint32(4),entries:[]},t=12;t<n.byteLength;t+=4)r.entries.push(i.getUint32(t));return r},stts:function(n){for(var i=new DataView(n.buffer,n.byteOffset,n.byteLength),r={version:n[0],flags:new Uint8Array(n.subarray(1,4)),timeToSamples:[]},u=i.getUint32(4),t=8;u;t+=8,u--)r.timeToSamples.push({sampleCount:i.getUint32(t),sampleDelta:i.getUint32(t+4)});return r},styp:function(n){return gi.ftyp(n)},tfdt:function(n){var t={version:n[0],flags:new Uint8Array(n.subarray(1,4)),baseMediaDecodeTime:nv(n[4]<<24|n[5]<<16|n[6]<<8|n[7])};return t.version===1&&(t.baseMediaDecodeTime*=Math.pow(2,32),t.baseMediaDecodeTime+=nv(n[8]<<24|n[9]<<16|n[10]<<8|n[11])),t},tfhd:function(n){var r=new DataView(n.buffer,n.byteOffset,n.byteLength),t={version:n[0],flags:new Uint8Array(n.subarray(1,4)),trackId:r.getUint32(4)},u=t.flags[2]&1,f=t.flags[2]&2,e=t.flags[2]&8,o=t.flags[2]&16,s=t.flags[2]&32,h=t.flags[0]&65536,c=t.flags[0]&131072,i;return i=8,u&&(i+=4,t.baseDataOffset=r.getUint32(12),i+=4),f&&(t.sampleDescriptionIndex=r.getUint32(i),i+=4),e&&(t.defaultSampleDuration=r.getUint32(i),i+=4),o&&(t.defaultSampleSize=r.getUint32(i),i+=4),s&&(t.defaultSampleFlags=r.getUint32(i)),h&&(t.durationIsEmpty=!0),!u&&c&&(t.baseDataOffsetIsMoof=!0),t},tkhd:function(n){var i=new DataView(n.buffer,n.byteOffset,n.byteLength),t=4,r={version:i.getUint8(0),flags:new Uint8Array(n.subarray(1,4))};return r.version===1?(t+=4,r.creationTime=gt(i.getUint32(t)),t+=8,r.modificationTime=gt(i.getUint32(t)),t+=4,r.trackId=i.getUint32(t),t+=4,t+=8,r.duration=i.getUint32(t)):(r.creationTime=gt(i.getUint32(t)),t+=4,r.modificationTime=gt(i.getUint32(t)),t+=4,r.trackId=i.getUint32(t),t+=4,t+=4,r.duration=i.getUint32(t)),t+=4,t+=8,r.layer=i.getUint16(t),t+=2,r.alternateGroup=i.getUint16(t),t+=2,r.volume=i.getUint8(t)+i.getUint8(t+1)/8,t+=2,t+=2,r.matrix=new Uint32Array(n.subarray(t,t+36)),t+=36,r.width=i.getUint16(t)+i.getUint16(t+2)/16,t+=4,r.height=i.getUint16(t)+i.getUint16(t+2)/16,r},traf:function(n){return{boxes:ot(n)}},trak:function(n){return{boxes:ot(n)}},trex:function(n){var t=new DataView(n.buffer,n.byteOffset,n.byteLength);return{version:n[0],flags:new Uint8Array(n.subarray(1,4)),trackId:t.getUint32(4),defaultSampleDescriptionIndex:t.getUint32(8),defaultSampleDuration:t.getUint32(12),defaultSampleSize:t.getUint32(16),sampleDependsOn:n[20]&3,sampleIsDependedOn:(n[21]&192)>>6,sampleHasRedundancy:(n[21]&48)>>4,samplePaddingValue:(n[21]&14)>>1,sampleIsDifferenceSample:!!(n[21]&1),sampleDegradationPriority:t.getUint16(22)}},trun:function(n){var r={version:n[0],flags:new Uint8Array(n.subarray(1,4)),samples:[]},u=new DataView(n.buffer,n.byteOffset,n.byteLength),h=r.flags[2]&1,c=r.flags[2]&4,e=r.flags[1]&1,o=r.flags[1]&2,l=r.flags[1]&4,s=r.flags[1]&8,f=u.getUint32(4),t=8,i;for(h&&(r.dataOffset=u.getInt32(t),t+=4),c&&f&&(i={flags:gd(n.subarray(t,t+4))},t+=4,e&&(i.duration=u.getUint32(t),t+=4),o&&(i.size=u.getUint32(t),t+=4),s&&(i.compositionTimeOffset=u.getUint32(t),t+=4),r.samples.push(i),f--);f--;)i={},e&&(i.duration=u.getUint32(t),t+=4),o&&(i.size=u.getUint32(t),t+=4),l&&(i.flags=gd(n.subarray(t,t+4)),t+=4),s&&(i.compositionTimeOffset=u.getUint32(t),t+=4),r.samples.push(i);return r},"url ":function(n){return{version:n[0],flags:new Uint8Array(n.subarray(1,4))}},vmhd:function(n){var t=new DataView(n.buffer,n.byteOffset,n.byteLength);return{version:n[0],flags:new Uint8Array(n.subarray(1,4)),graphicsmode:t.getUint16(4),opcolor:new Uint16Array([t.getUint16(6),t.getUint16(8),t.getUint16(10)])}}};ot=function(n){for(var t=0,o=[],s,r,f,e,u,h=new ArrayBuffer(n.length),c=new Uint8Array(h),i=0;i<n.length;++i)c[i]=n[i];for(s=new DataView(h);t<n.byteLength;)r=s.getUint32(t),f=bu(n.subarray(t+4,t+8)),e=r>1?t+r:n.byteLength,u=(gi[f]||function(n){return{data:n}})(n.subarray(t+8,e)),u.size=r,u.type=f,o.push(u),t=e;return o};ga=function(n,t){var i;return t=t||0,i=new Array(t*2+1).join(" "),n.map(function(n){return i+n.type+"\n"+Object.keys(n).filter(function(n){return n!=="type"&&n!=="boxes"}).map(function(t){var f=i+"  "+t+": ",r=n[t],u;return r instanceof Uint8Array||r instanceof Uint32Array?(u=Array.prototype.slice.call(new Uint8Array(r.buffer,r.byteOffset,r.byteLength)).map(function(n){return" "+("00"+n.toString(16)).slice(-2)}).join("").match(/.{1,24}/g),!u)?f+"<>":u.length===1?f+"<"+u.join("").slice(1)+">":f+"<\n"+u.map(function(n){return i+"  "+n}).join("\n")+"\n"+i+"  >":f+JSON.stringify(r,null,2).split("\n").map(function(n,t){return t===0?n:i+"  "+n}).join("\n")}).join("\n")+(n.boxes?"\n"+ga(n.boxes,t+1):"")}).join("\n")};var l={inspect:ot,textify:ga,parseType:bu,findBox:ng,parseTraf:gi.traf,parseTfdt:gi.tfdt,parseHdlr:gi.hdlr,parseTfhd:gi.tfhd,parseTrun:gi.trun,parseSidx:gi.sidx},ku=da.toUnsigned,fe=da.toHexString,tg,ig,rg,ug,fg;tg=function(n){var t=l.findBox(n,["moov","trak"]);return t.reduce(function(n,t){var r,f,i,e,u;return(r=l.findBox(t,["tkhd"])[0],!r)?null:(f=r[0],i=f===0?12:20,e=ku(r[i]<<24|r[i+1]<<16|r[i+2]<<8|r[i+3]),u=l.findBox(t,["mdia","mdhd"])[0],!u)?null:(f=u[0],i=f===0?12:20,n[e]=ku(u[i]<<24|u[i+1]<<16|u[i+2]<<8|u[i+3]),n)},{})};ig=function(n,t){var r,u,i;return r=l.findBox(t,["moof","traf"]),u=[].concat.apply([],r.map(function(t){return l.findBox(t,["tfhd"]).map(function(i){var u,f,r;return u=ku(i[4]<<24|i[5]<<16|i[6]<<8|i[7]),f=n[u]||9e4,r=l.findBox(t,["tfdt"]).map(function(n){var i,t;return i=n[0],t=ku(n[4]<<24|n[5]<<16|n[6]<<8|n[7]),i===1&&(t*=Math.pow(2,32),t+=ku(n[8]<<24|n[9]<<16|n[10]<<8|n[11])),t})[0],r=r||Infinity,r/f})})),i=Math.min.apply(null,u),isFinite(i)?i:0};rg=function(n,t){var u=l.findBox(t,["moof","traf"]),f=0,e=0,o,r,i,s;if(u&&u.length)for(r=l.parseTraf(u[0]),i=0;i<r.boxes.length;i++)r.boxes[i].type==="tfhd"?o=r.boxes[i].trackId:r.boxes[i].type==="tfdt"?f=r.boxes[i].baseMediaDecodeTime:r.boxes[i].type==="trun"&&r.boxes[i].samples.length&&(e=r.boxes[i].samples[0].compositionTimeOffset||0);return s=n[o]||9e4,(f+e)/s};ug=function(n){var i=l.findBox(n,["moov","trak"]),t=[];return i.forEach(function(n){var i=l.findBox(n,["mdia","hdlr"]),r=l.findBox(n,["tkhd"]);i.forEach(function(n,i){var s=l.parseType(n.subarray(8,12)),f=r[i],u,e,o;s==="vide"&&(u=new DataView(f.buffer,f.byteOffset,f.byteLength),e=u.getUint8(0),o=e===0?u.getUint32(12):u.getUint32(20),t.push(o))})}),t};fg=function(n){var i=l.findBox(n,["moov","trak"]),t=[];return i.forEach(function(n){var i={},f=l.findBox(n,["tkhd"])[0],o,a,v,s,y,p,h,r,c,u,e;f&&(o=new DataView(f.buffer,f.byteOffset,f.byteLength),a=o.getUint8(0),i.id=a===0?o.getUint32(12):o.getUint32(20));v=l.findBox(n,["mdia","hdlr"])[0];v&&(s=l.parseType(v.subarray(8,12)),i.type=s==="vide"?"video":s==="soun"?"audio":s);y=l.findBox(n,["mdia","minf","stbl","stsd"])[0];y&&(p=y.subarray(8),i.codec=l.parseType(p.subarray(4,8)),h=l.findBox(p,[i.codec])[0],h&&(/^[a-z]vc[1-9]$/i.test(i.codec)?(r=h.subarray(78),c=l.parseType(r.subarray(4,8)),c==="avcC"&&r.length>11?(i.codec+=".",i.codec+=fe(r[9]),i.codec+=fe(r[10]),i.codec+=fe(r[11])):i.codec="avc1.4d400d"):/^mp4[a,v]$/i.test(i.codec)&&(r=h.subarray(28),c=l.parseType(r.subarray(4,8)),c==="esds"&&r.length>20&&r[19]!==0?(i.codec+="."+fe(r[19]),i.codec+="."+fe(r[20]>>>2&63).replace(/^0/,"")):i.codec="mp4a.40.2")));u=l.findBox(n,["mdia","mdhd"])[0];u&&f&&(e=a===0?12:20,i.timescale=ku(u[e]<<24|u[e+1]<<16|u[e+2]<<8|u[e+3]));t.push(i)}),t};var vi={findBox:l.findBox,parseType:l.parseType,timescale:tg,startTime:ig,compositionStartTime:rg,videoTrackIds:ug,tracks:fg},eg=4,ist=128,rst=function(n){for(var t=0,r={payloadType:-1,payloadSize:0},u=0,i=0;t<n.byteLength;){if(n[t]===ist)break;while(n[t]===255)u+=255,t++;for(u+=n[t++];n[t]===255;)i+=255,t++;if(i+=n[t++],!r.payload&&u===eg){r.payloadType=u;r.payloadSize=i;r.payload=n.subarray(t,t+i);break}t+=i;u=0;i=0}return r},ust=function(n){return n.payload[0]!==181?null:(n.payload[1]<<8|n.payload[2])!=49?null:String.fromCharCode(n.payload[3],n.payload[4],n.payload[5],n.payload[6])!=="GA94"?null:n.payload[7]!==3?null:n.payload.subarray(8,n.payload.length-1)},fst=function(n,t){var u=[],r,e,i,f;if(!(t[0]&64))return u;for(e=t[0]&31,r=0;r<e;r++)i=r*3,f={type:t[i+2]&3,pts:n},t[i+2]&4&&(f.ccData=t[i+3]<<8|t[i+4],u.push(f));return u},est=function(n){for(var e=n.byteLength,i=[],t=1,u,f,r;t<e-2;)n[t]===0&&n[t+1]===0&&n[t+2]===3?(i.push(t+2),t+=2):t++;if(i.length===0)return n;for(u=e-i.length,f=new Uint8Array(u),r=0,t=0;t<u;r++,t++)r===i[0]&&(r++,i.shift()),f[t]=n[r];return f},ee={parseSei:rst,parseUserData:ust,parseCaptionPackets:fst,discardEmulationPreventionBytes:est,USER_DATA_REGISTERED_ITU_T_T35:eg},yr=function(){this.init=function(){var n={};this.on=function(t,i){n[t]||(n[t]=[]);n[t]=n[t].concat(i)};this.off=function(t,i){var r;return n[t]?(r=n[t].indexOf(i),n[t]=n[t].slice(),n[t].splice(r,1),r>-1):!1};this.trigger=function(t){var r,i,u,f;if(r=n[t],r)if(arguments.length===2)for(u=r.length,i=0;i<u;++i)r[i].call(this,arguments[1]);else{for(f=[],i=arguments.length,i=1;i<arguments.length;++i)f.push(arguments[i]);for(u=r.length,i=0;i<u;++i)r[i].apply(this,f)}};this.dispose=function(){n={}}}};yr.prototype.pipe=function(n){this.on("data",function(t){n.push(t)});this.on("done",function(t){n.flush(t)});this.on("partialdone",function(t){n.partialFlush(t)});this.on("endedtimeline",function(t){n.endTimeline(t)});this.on("reset",function(t){n.reset(t)});return n};yr.prototype.push=function(n){this.trigger("data",n)};yr.prototype.flush=function(n){this.trigger("done",n)};yr.prototype.partialFlush=function(n){this.trigger("partialdone",n)};yr.prototype.endTimeline=function(n){this.trigger("endedtimeline",n)};yr.prototype.reset=function(n){this.trigger("reset",n)};bs=yr;at=function at(){at.prototype.init.call(this);this.captionPackets_=[];this.ccStreams_=[new p(0,0),new p(0,1),new p(1,0),new p(1,1)];this.reset();this.ccStreams_.forEach(function(n){n.on("data",this.trigger.bind(this,"data"));n.on("partialdone",this.trigger.bind(this,"partialdone"));n.on("done",this.trigger.bind(this,"done"))},this)};at.prototype=new bs;at.prototype.push=function(n){var t,i,r;if(n.nalUnitType==="sei_rbsp"&&(t=ee.parseSei(n.escapedRBSP),t.payloadType===ee.USER_DATA_REGISTERED_ITU_T_T35)&&(i=ee.parseUserData(t),i)){if(n.dts<this.latestDts_){this.ignoreNextEqualDts_=!0;return}if(n.dts===this.latestDts_&&this.ignoreNextEqualDts_){this.numSameDts_--;this.numSameDts_||(this.ignoreNextEqualDts_=!1);return}r=ee.parseCaptionPackets(n.pts,i);this.captionPackets_=this.captionPackets_.concat(r);this.latestDts_!==n.dts&&(this.numSameDts_=0);this.numSameDts_++;this.latestDts_=n.dts}};at.prototype.flushCCStreams=function(n){this.ccStreams_.forEach(function(t){return n==="flush"?t.flush():t.partialFlush()},this)};at.prototype.flushStream=function(n){if(!this.captionPackets_.length){this.flushCCStreams(n);return}this.captionPackets_.forEach(function(n,t){n.presortIndex=t});this.captionPackets_.sort(function(n,t){return n.pts===t.pts?n.presortIndex-t.presortIndex:n.pts-t.pts});this.captionPackets_.forEach(function(n){n.type<2&&this.dispatchCea608Packet(n)},this);this.captionPackets_.length=0;this.flushCCStreams(n)};at.prototype.flush=function(){return this.flushStream("flush")};at.prototype.partialFlush=function(){return this.flushStream("partialFlush")};at.prototype.reset=function(){this.latestDts_=null;this.ignoreNextEqualDts_=!1;this.numSameDts_=0;this.activeCea608Channel_=[null,null];this.ccStreams_.forEach(function(n){n.reset()})};at.prototype.dispatchCea608Packet=function(n){(this.setsTextOrXDSActive(n)?this.activeCea608Channel_[n.type]=null:this.setsChannel1Active(n)?this.activeCea608Channel_[n.type]=0:this.setsChannel2Active(n)&&(this.activeCea608Channel_[n.type]=1),this.activeCea608Channel_[n.type]!==null)&&this.ccStreams_[(n.type<<1)+this.activeCea608Channel_[n.type]].push(n)};at.prototype.setsChannel1Active=function(n){return(n.ccData&30720)==4096};at.prototype.setsChannel2Active=function(n){return(n.ccData&30720)==6144};at.prototype.setsTextOrXDSActive=function(n){return(n.ccData&28928)==256||(n.ccData&30974)==4138||(n.ccData&30974)==6186};var ost={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496},ks=function(n){return n===null?"":(n=ost[n]||n,String.fromCharCode(n))},ds=14,sst=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],pr=function(){for(var n=[],t=ds+1;t--;)n.push("");return n},p=function p(n,t){p.prototype.init.call(this);this.field_=n||0;this.dataChannel_=t||0;this.name_="CC"+((this.field_<<1|this.dataChannel_)+1);this.setConstants();this.reset();this.push=function(n){var t,e,r,i,u,f;if(t=n.ccData&32639,t===this.lastControlCode_){this.lastControlCode_=null;return}((t&61440)==4096?this.lastControlCode_=t:t!==this.PADDING_&&(this.lastControlCode_=null),r=t>>>8,i=t&255,t!==this.PADDING_)&&(t===this.RESUME_CAPTION_LOADING_?this.mode_="popOn":t===this.END_OF_CAPTION_?(this.mode_="popOn",this.clearFormatting(n.pts),this.flushDisplayed(n.pts),e=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=e,this.startPts_=n.pts):t===this.ROLL_UP_2_ROWS_?(this.rollUpRows_=2,this.setRollUp(n.pts)):t===this.ROLL_UP_3_ROWS_?(this.rollUpRows_=3,this.setRollUp(n.pts)):t===this.ROLL_UP_4_ROWS_?(this.rollUpRows_=4,this.setRollUp(n.pts)):t===this.CARRIAGE_RETURN_?(this.clearFormatting(n.pts),this.flushDisplayed(n.pts),this.shiftRowsUp_(),this.startPts_=n.pts):t===this.BACKSPACE_?this.mode_==="popOn"?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1):t===this.ERASE_DISPLAYED_MEMORY_?(this.flushDisplayed(n.pts),this.displayed_=pr()):t===this.ERASE_NON_DISPLAYED_MEMORY_?this.nonDisplayed_=pr():t===this.RESUME_DIRECT_CAPTIONING_?(this.mode_!=="paintOn"&&(this.flushDisplayed(n.pts),this.displayed_=pr()),this.mode_="paintOn",this.startPts_=n.pts):this.isSpecialCharacter(r,i)?(r=(r&3)<<8,u=ks(r|i),this[this.mode_](n.pts,u),this.column_++):this.isExtCharacter(r,i)?(this.mode_==="popOn"?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1),r=(r&3)<<8,u=ks(r|i),this[this.mode_](n.pts,u),this.column_++):this.isMidRowCode(r,i)?(this.clearFormatting(n.pts),this[this.mode_](n.pts," "),this.column_++,(i&14)==14&&this.addFormatting(n.pts,["i"]),(i&1)==1&&this.addFormatting(n.pts,["u"])):this.isOffsetControlCode(r,i)?this.column_+=i&3:this.isPAC(r,i)?(f=sst.indexOf(t&7968),this.mode_==="rollUp"&&(f-this.rollUpRows_+1<0&&(f=this.rollUpRows_-1),this.setRollUp(n.pts,f)),f!==this.row_&&(this.clearFormatting(n.pts),this.row_=f),i&1&&this.formatting_.indexOf("u")===-1&&this.addFormatting(n.pts,["u"]),(t&16)==16&&(this.column_=((t&14)>>1)*4),this.isColorPAC(i)&&(i&14)==14&&this.addFormatting(n.pts,["i"])):this.isNormalChar(r)&&(i===0&&(i=null),u=ks(r),u+=ks(i),this[this.mode_](n.pts,u),this.column_+=u.length))}};p.prototype=new bs;p.prototype.flushDisplayed=function(n){var t=this.displayed_.map(function(n){try{return n.trim()}catch(t){return console.error("Skipping malformed caption."),""}}).join("\n").replace(/^\n+|\n+$/g,"");t.length&&this.trigger("data",{startPts:this.startPts_,endPts:n,text:t,stream:this.name_})};p.prototype.reset=function(){this.mode_="popOn";this.topRow_=0;this.startPts_=0;this.displayed_=pr();this.nonDisplayed_=pr();this.lastControlCode_=null;this.column_=0;this.row_=ds;this.rollUpRows_=2;this.formatting_=[]};p.prototype.setConstants=function(){this.dataChannel_===0?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):this.dataChannel_===1&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31);this.PADDING_=0;this.RESUME_CAPTION_LOADING_=this.CONTROL_|32;this.END_OF_CAPTION_=this.CONTROL_|47;this.ROLL_UP_2_ROWS_=this.CONTROL_|37;this.ROLL_UP_3_ROWS_=this.CONTROL_|38;this.ROLL_UP_4_ROWS_=this.CONTROL_|39;this.CARRIAGE_RETURN_=this.CONTROL_|45;this.RESUME_DIRECT_CAPTIONING_=this.CONTROL_|41;this.BACKSPACE_=this.CONTROL_|33;this.ERASE_DISPLAYED_MEMORY_=this.CONTROL_|44;this.ERASE_NON_DISPLAYED_MEMORY_=this.CONTROL_|46};p.prototype.isSpecialCharacter=function(n,t){return n===this.EXT_&&t>=48&&t<=63};p.prototype.isExtCharacter=function(n,t){return(n===this.EXT_+1||n===this.EXT_+2)&&t>=32&&t<=63};p.prototype.isMidRowCode=function(n,t){return n===this.EXT_&&t>=32&&t<=47};p.prototype.isOffsetControlCode=function(n,t){return n===this.OFFSET_&&t>=33&&t<=35};p.prototype.isPAC=function(n,t){return n>=this.BASE_&&n<this.BASE_+8&&t>=64&&t<=127};p.prototype.isColorPAC=function(n){return n>=64&&n<=79||n>=96&&n<=127};p.prototype.isNormalChar=function(n){return n>=32&&n<=127};p.prototype.setRollUp=function(n,t){if(this.mode_!=="rollUp"&&(this.row_=ds,this.mode_="rollUp",this.flushDisplayed(n),this.nonDisplayed_=pr(),this.displayed_=pr()),t!==undefined&&t!==this.row_)for(var i=0;i<this.rollUpRows_;i++)this.displayed_[t-i]=this.displayed_[this.row_-i],this.displayed_[this.row_-i]="";t===undefined&&(t=this.row_);this.topRow_=t-this.rollUpRows_+1};p.prototype.addFormatting=function(n,t){this.formatting_=this.formatting_.concat(t);var i=t.reduce(function(n,t){return n+"<"+t+">"},"");this[this.mode_](n,i)};p.prototype.clearFormatting=function(n){if(this.formatting_.length){var t=this.formatting_.reverse().reduce(function(n,t){return n+"<\/"+t+">"},"");this.formatting_=[];this[this.mode_](n,t)}};p.prototype.popOn=function(n,t){var i=this.nonDisplayed_[this.row_];i+=t;this.nonDisplayed_[this.row_]=i};p.prototype.rollUp=function(n,t){var i=this.displayed_[this.row_];i+=t;this.displayed_[this.row_]=i};p.prototype.shiftRowsUp_=function(){for(var n=0;n<this.topRow_;n++)this.displayed_[n]="";for(n=this.row_+1;n<ds+1;n++)this.displayed_[n]="";for(n=this.topRow_;n<this.row_;n++)this.displayed_[n]=this.displayed_[n+1];this.displayed_[this.row_]=""};p.prototype.paintOn=function(n,t){var i=this.displayed_[this.row_];i+=t;this.displayed_[this.row_]=i};var hst={CaptionStream:at,Cea608Stream:p},cst=ee.discardEmulationPreventionBytes,lst=hst.CaptionStream,ast=function(n,t){for(var u=n,r,i=0;i<t.length;i++){if(r=t[i],u<r.size)return r;u-=r.size}return null},vst=function(n,t,i){for(var c=new DataView(n.buffer,n.byteOffset,n.byteLength),h=[],u,f,o,s,e,r=0;r+4<n.length;r+=f)if(f=c.getUint32(r),r+=4,!(f<=0))switch(n[r]&31){case 6:s=n.subarray(r+1,r+1+f);e=ast(r,t);u={nalUnitType:"sei_rbsp",size:f,data:s,escapedRBSP:cst(s),trackId:i};e?(u.pts=e.pts,u.dts=e.dts,o=e):(u.pts=o.pts,u.dts=o.dts);h.push(u)}return h},yst=function(n,t,i){var r=t,f=i.defaultSampleDuration||0,e=i.defaultSampleSize||0,o=i.trackId,u=[];return n.forEach(function(n){var i=l.parseTrun(n),t=i.samples;t.forEach(function(n){n.duration===undefined&&(n.duration=f);n.size===undefined&&(n.size=e);n.trackId=o;n.dts=r;n.compositionTimeOffset===undefined&&(n.compositionTimeOffset=0);n.pts=r+n.compositionTimeOffset;r+=n.duration});u=u.concat(t)}),u},pst=function(n,t){var u=vi.findBox(n,["moof","traf"]),f=vi.findBox(n,["mdat"]),i={},r=[];return f.forEach(function(n,t){var i=u[t];r.push({mdat:n,traf:i})}),r.forEach(function(n){var c=n.mdat,u=n.traf,a=vi.findBox(u,["tfhd"]),f=l.parseTfhd(a[0]),r=f.trackId,e=vi.findBox(u,["tfdt"]),v=e.length>0?l.parseTfdt(e[0]).baseMediaDecodeTime:0,o=vi.findBox(u,["trun"]),s,h;t===r&&o.length>0&&(s=yst(o,v,f),h=vst(c,s,r),i[r]||(i[r]=[]),i[r]=i[r].concat(h))}),i},wst=function(n,t,i){var r;return t===null?null:(r=pst(n,t),{seiNals:r[t],timescale:i})},bst=function(){var f=!1,r,u,n,t,i,e;this.isInitialized=function(){return f};this.init=function(n){r=new lst;f=!0;e=n?n.isPartial:!1;r.on("data",function(n){n.startTime=n.startPts/t;n.endTime=n.endPts/t;i.captions.push(n);i.captionStreams[n.stream]=!0})};this.isNewInit=function(i,r){return i&&i.length===0||r&&typeof r=="object"&&Object.keys(r).length===0?!1:n!==i[0]||t!==r[n]};this.parse=function(r,f,e){var o,s;if(this.isInitialized())if(f&&e){if(this.isNewInit(f,e))n=f[0],t=e[n];else if(n===null||!t)return u.push(r),null}else return null;else return null;while(u.length>0)s=u.shift(),this.parse(s,f,e);return(o=wst(r,n,t),o===null||!o.seiNals)?null:(this.pushNals(o.seiNals),this.flushStream(),i)};this.pushNals=function(n){if(!this.isInitialized()||!n||n.length===0)return null;n.forEach(function(n){r.push(n)})};this.flushStream=function(){if(!this.isInitialized())return null;e?r.partialFlush():r.flush()};this.clearParsedCaptions=function(){i.captions=[];i.captionStreams={}};this.resetCaptionStream=function(){if(!this.isInitialized())return null;r.reset()};this.clearAllCaptions=function(){this.clearParsedCaptions();this.resetCaptionStream()};this.reset=function(){u=[];n=null;t=null;i?this.clearParsedCaptions():i={captions:[],captionStreams:{}};this.resetCaptionStream()};this.reset()},kst=bst,oe={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},dst=8589934592,gst=4294967296,og="shared",tv=function(n,t){var i=1;for(n>t&&(i=-1);Math.abs(t-n)>gst;)n+=i*dst;return n},iv=function iv(n){var i,t;iv.prototype.init.call(this);this.type_=n||og;this.push=function(n){(this.type_===og||n.type===this.type_)&&(t===undefined&&(t=n.dts),n.dts=tv(n.dts,t),n.pts=tv(n.pts,t),i=n.dts,this.trigger("data",n))};this.flush=function(){t=i;this.trigger("done")};this.endTimeline=function(){this.flush();this.trigger("endedtimeline")};this.discontinuity=function(){t=void 0;i=void 0};this.reset=function(){this.discontinuity();this.trigger("reset")}};iv.prototype=new bs;var nht={TimestampRolloverStream:iv,handleRollover:tv},sg=function(n){var t=n[1]&31;return t<<=8,t|n[2]},gs=function(n){return!!(n[1]&64)},nh=function(n){var t=0;return(n[3]&48)>>>4>1&&(t+=n[4]+1),t},tht=function(n,t){var i=sg(n);return i===0?"pat":i===t?"pmt":t?"pes":null},iht=function(n){var i=gs(n),t=4+nh(n);return i&&(t+=n[t]+1),(n[t+10]&31)<<8|n[t+11]},rht=function(n){var u={},s=gs(n),t=4+nh(n),f,e,o,r,i;if(s&&(t+=n[t]+1),n[t+5]&1){for(f=(n[t+1]&15)<<8|n[t+2],e=3+f-4,o=(n[t+10]&15)<<8|n[t+11],r=12+o;r<e;)i=t+r,u[(n[i+1]&31)<<8|n[i+2]]=n[i],r+=((n[i+3]&15)<<8|n[i+4])+5;return u}},uht=function(n,t){var i=sg(n),r=t[i];switch(r){case oe.H264_STREAM_TYPE:return"video";case oe.ADTS_STREAM_TYPE:return"audio";case oe.METADATA_STREAM_TYPE:return"timed-metadata";default:return null}},fht=function(n){var u=gs(n),t,i,r;return u?(t=4+nh(n),t>=n.byteLength)?null:(i=null,r=n[t+7],r&192&&(i={},i.pts=(n[t+9]&14)<<27|(n[t+10]&255)<<20|(n[t+11]&254)<<12|(n[t+12]&255)<<5|(n[t+13]&254)>>>3,i.pts*=4,i.pts+=(n[t+13]&6)>>>1,i.dts=i.pts,r&64&&(i.dts=(n[t+14]&14)<<27|(n[t+15]&255)<<20|(n[t+16]&254)<<12|(n[t+17]&255)<<5|(n[t+18]&254)>>>3,i.dts*=4,i.dts+=(n[t+18]&6)>>>1)),i):null},rv=function(n){switch(n){case 5:return"slice_layer_without_partitioning_rbsp_idr";case 6:return"sei_rbsp";case 7:return"seq_parameter_set_rbsp";case 8:return"pic_parameter_set_rbsp";case 9:return"access_unit_delimiter_rbsp";default:return null}},eht=function(n){for(var e=4+nh(n),i=n.subarray(e),t=0,r=0,f=!1,u;r<i.byteLength-3;r++)if(i[r+2]===1){t=r+5;break}while(t<i.byteLength)switch(i[t]){case 0:if(i[t-1]!==0){t+=2;break}else if(i[t-2]!==0){t++;break}r+3!==t-2&&(u=rv(i[r+3]&31),u==="slice_layer_without_partitioning_rbsp_idr"&&(f=!0));do t++;while(i[t]!==1&&t<i.length);r=t-2;t+=3;break;case 1:if(i[t-1]!==0||i[t-2]!==0){t+=3;break}u=rv(i[r+3]&31);u==="slice_layer_without_partitioning_rbsp_idr"&&(f=!0);r=t-2;t+=3;break;default:t+=3}return i=i.subarray(r),t-=r,r=0,i&&i.byteLength>3&&(u=rv(i[r+3]&31),u==="slice_layer_without_partitioning_rbsp_idr"&&(f=!0)),f},oht={parseType:tht,parsePat:iht,parsePmt:rht,parsePayloadUnitStartIndicator:gs,parsePesType:uht,parsePesTime:fht,videoPacketContainsKeyFrame:eht},sht=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],hht=function(n){return n[0]==="I".charCodeAt(0)&&n[1]==="D".charCodeAt(0)&&n[2]==="3".charCodeAt(0)?!0:!1},hg=function(n){return n[0]<<21|n[1]<<14|n[2]<<7|n[3]},cht=function(n,t,i){for(var u="",r=t;r<i;r++)u+="%"+("00"+n[r].toString(16)).slice(-2);return u},lht=function(n,t,i){return unescape(cht(n,t,i))},aht=function(n,t){var i=n[t+6]<<21|n[t+7]<<14|n[t+8]<<7|n[t+9],r=n[t+5],u=(r&16)>>4;return u?i+20:i+10},vht=function(n,t){var i=(n[t+5]&224)>>5,r=n[t+4]<<3,u=n[t+3]&6144;return u|r|i},yht=function(n,t){return n[t]==="I".charCodeAt(0)&&n[t+1]==="D".charCodeAt(0)&&n[t+2]==="3".charCodeAt(0)?"timed-metadata":n[t]&!0&&(n[t+1]&240)==240?"audio":null},pht=function(n){for(var t=0;t+5<n.length;){if(n[t]!==255||(n[t+1]&246)!=240){t++;continue}return sht[(n[t+2]&60)>>>2]}return null},wht=function(n){var t,f,u,o,r,s,i,e;t=10;n[5]&64&&(t+=4,t+=hg(n.subarray(10,14)));do{if(f=hg(n.subarray(t+4,t+8)),f<1)return null;if(o=String.fromCharCode(n[t],n[t+1],n[t+2],n[t+3]),o==="PRIV")for(u=n.subarray(t+10,t+f+10),r=0;r<u.byteLength;r++)if(u[r]===0){if(s=lht(u,0,r),s==="com.apple.streaming.transportStreamTimestamp")return i=u.subarray(r+1),e=(i[3]&1)<<30|i[4]<<22|i[5]<<14|i[6]<<6|i[7]>>>2,e*=4,e+(i[7]&3);break}t+=10;t+=f}while(t<n.byteLength);return null},bht={isLikelyAacData:hht,parseId3TagSize:aht,parseAdtsSize:vht,parseType:yht,parseSampleRate:pht,parseAacTimestamp:wht},uv=9e4,fv,ev,th,ov,cg,lg,ag;fv=function(n){return n*uv};ev=function(n,t){return n*t};th=function(n){return n/uv};ov=function(n,t){return n/t};cg=function(n,t){return fv(ov(n,t))};lg=function(n,t){return ev(th(n),t)};ag=function(n,t,i){return th(i?n:n-t)};var kht={ONE_SECOND_IN_TS:uv,secondsToVideoTs:fv,secondsToAudioTs:ev,videoTsToSeconds:th,audioTsToSeconds:ov,audioTsToVideoTs:cg,videoTsToAudioTs:lg,metadataTsToSeconds:ag},du=nht.handleRollover,c={};c.ts=oht;c.aac=bht;var wr=kht.ONE_SECOND_IN_TS,st=188,ei=71,dht=function(n,t){for(var r=0,i=st,u,f;i<n.byteLength;){if(n[r]===ei&&n[i]===ei){u=n.subarray(r,i);f=c.ts.parseType(u,t.pid);switch(f){case"pat":t.pid||(t.pid=c.ts.parsePat(u));break;case"pmt":t.table||(t.table=c.ts.parsePmt(u))}if(t.pid&&t.table)return;r+=st;i+=st;continue}r++;i++}},vg=function(n,t,i){for(var u=0,r=st,f,s,h,l,e,o=!1;r<=n.byteLength;){if(n[u]===ei&&(n[r]===ei||r===n.byteLength)){f=n.subarray(u,r);s=c.ts.parseType(f,t.pid);switch(s){case"pes":h=c.ts.parsePesType(f,t.table);l=c.ts.parsePayloadUnitStartIndicator(f);h==="audio"&&l&&(e=c.ts.parsePesTime(f),e&&(e.type="audio",i.audio.push(e),o=!0))}if(o)break;u+=st;r+=st;continue}u++;r++}for(r=n.byteLength,u=r-st,o=!1;u>=0;){if(n[u]===ei&&(n[r]===ei||r===n.byteLength)){f=n.subarray(u,r);s=c.ts.parseType(f,t.pid);switch(s){case"pes":h=c.ts.parsePesType(f,t.table);l=c.ts.parsePayloadUnitStartIndicator(f);h==="audio"&&l&&(e=c.ts.parsePesTime(f),e&&(e.type="audio",i.audio.push(e),o=!0))}if(o)break;u-=st;r-=st;continue}u--;r--}},ght=function(n,t,i){for(var f=0,u=st,r,l,a,h,e,v,y,p,s=!1,o={data:[],size:0},w;u<n.byteLength;){if(n[f]===ei&&n[u]===ei){r=n.subarray(f,u);l=c.ts.parseType(r,t.pid);switch(l){case"pes":if(a=c.ts.parsePesType(r,t.table),h=c.ts.parsePayloadUnitStartIndicator(r),a==="video"&&(h&&!s&&(e=c.ts.parsePesTime(r),e&&(e.type="video",i.video.push(e),s=!0)),!i.firstKeyFrame)){if(h&&o.size!==0){for(v=new Uint8Array(o.size),y=0;o.data.length;)p=o.data.shift(),v.set(p,y),y+=p.byteLength;c.ts.videoPacketContainsKeyFrame(v)&&(w=c.ts.parsePesTime(v),w?(i.firstKeyFrame=w,i.firstKeyFrame.type="video"):console.warn("Failed to extract PTS/DTS from PES at first keyframe. This could be an unusual TS segment, or else mux.js did not parse your TS segment correctly. If you know your TS segments do contain PTS/DTS on keyframes please file a bug report! You can try ffprobe to double check for yourself."));o.size=0}o.data.push(r);o.size+=r.byteLength}}if(s&&i.firstKeyFrame)break;f+=st;u+=st;continue}f++;u++}for(u=n.byteLength,f=u-st,s=!1;f>=0;){if(n[f]===ei&&n[u]===ei){r=n.subarray(f,u);l=c.ts.parseType(r,t.pid);switch(l){case"pes":a=c.ts.parsePesType(r,t.table);h=c.ts.parsePayloadUnitStartIndicator(r);a==="video"&&h&&(e=c.ts.parsePesTime(r),e&&(e.type="video",i.video.push(e),s=!0))}if(s)break;f-=st;u-=st;continue}f--;u--}},nct=function(n,t){var u,r,i;n.audio&&n.audio.length&&(u=t,typeof u=="undefined"&&(u=n.audio[0].dts),n.audio.forEach(function(n){n.dts=du(n.dts,u);n.pts=du(n.pts,u);n.dtsTime=n.dts/wr;n.ptsTime=n.pts/wr}));n.video&&n.video.length&&(r=t,typeof r=="undefined"&&(r=n.video[0].dts),n.video.forEach(function(n){n.dts=du(n.dts,r);n.pts=du(n.pts,r);n.dtsTime=n.dts/wr;n.ptsTime=n.pts/wr}),n.firstKeyFrame&&(i=n.firstKeyFrame,i.dts=du(i.dts,r),i.pts=du(i.pts,r),i.dtsTime=i.dts/wr,i.ptsTime=i.dts/wr))},tct=function(n){for(var u=!1,o=0,f=null,r=null,i=0,t=0,e,h,s,l;n.length-t>=3;){h=c.aac.parseType(n,t);switch(h){case"timed-metadata":if(n.length-t<10){u=!0;break}if(i=c.aac.parseId3TagSize(n,t),i>n.length){u=!0;break}r===null&&(e=n.subarray(t,t+i),r=c.aac.parseAacTimestamp(e));t+=i;break;case"audio":if(n.length-t<7){u=!0;break}if(i=c.aac.parseAdtsSize(n,t),i>n.length){u=!0;break}f===null&&(e=n.subarray(t,t+i),f=c.aac.parseSampleRate(e));o++;t+=i;break;default:t++}if(u)return null}return f===null||r===null?null:(s=wr/f,l={audio:[{type:"audio",dts:r,pts:r},{type:"audio",dts:r+o*1024*s,pts:r+o*1024*s}]},l)},ict=function(n){var i={pid:null,table:null},t={},r,u;dht(n,i);for(r in i.table)if(i.table.hasOwnProperty(r)){u=i.table[r];switch(u){case oe.H264_STREAM_TYPE:t.video=[];ght(n,i,t);t.video.length===0&&delete t.video;break;case oe.ADTS_STREAM_TYPE:t.audio=[];vg(n,i,t);t.audio.length===0&&delete t.audio}}return t},rct=function(n,t){var r=c.aac.isLikelyAacData(n),i;return(i=r?tct(n):ict(n),!i||!i.audio&&!i.video)?null:(nct(i,t),i)},uct={inspect:rct,parseAudioPes_:vg};var ih=function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");},ect=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),oct=function(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)},sct=function(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:n},hct=function(){for(var h=[[[],[],[],[],[]],[[],[],[],[],[]]],f=h[0],e=h[1],l=f[4],p=e[4],n=void 0,i=void 0,r=void 0,u=[],a=[],c=void 0,v=void 0,y=void 0,t=void 0,o=void 0,s=void 0,n=0;n<256;n++)a[(u[n]=n<<1^(n>>7)*283)^n]=n;for(i=r=0;!l[i];i^=c||1,r=a[r]||1)for(t=r^r<<1^r<<2^r<<3^r<<4,t=t>>8^t&255^99,l[i]=t,p[t]=i,y=u[v=u[c=u[i]]],s=y*16843009^v*65537^c*257^i*16843008,o=u[t]*257^t*16843008,n=0;n<4;n++)f[n][i]=o=o<<24^o>>>8,e[n][t]=s=s<<24^s>>>8;for(n=0;n<5;n++)f[n]=f[n].slice(0),e[n]=e[n].slice(0);return h},ni=null,cct=function(){function n(t){ih(this,n);ni||(ni=hct());this._tables=[[ni[0][0].slice(),ni[0][1].slice(),ni[0][2].slice(),ni[0][3].slice(),ni[0][4].slice()],[ni[1][0].slice(),ni[1][1].slice(),ni[1][2].slice(),ni[1][3].slice(),ni[1][4].slice()]];var r=void 0,o=void 0,i=void 0,e=void 0,c=void 0,f=this._tables[0][4],s=this._tables[1],u=t.length,h=1;if(u!==4&&u!==6&&u!==8)throw new Error("Invalid aes key size");for(e=t.slice(0),c=[],this._key=[e,c],r=u;r<4*u+28;r++)i=e[r-1],(r%u==0||u===8&&r%u==4)&&(i=f[i>>>24]<<24^f[i>>16&255]<<16^f[i>>8&255]<<8^f[i&255],r%u==0&&(i=i<<8^i>>>24^h<<24,h=h<<1^(h>>7)*283)),e[r]=e[r-u]^i;for(o=0;r;o++,r--)i=e[o&3?r:r-4],c[o]=r<=4||o<4?i:s[0][f[i>>>24]]^s[1][f[i>>16&255]]^s[2][f[i>>8&255]]^s[3][f[i&255]]}return n.prototype.decrypt=function(n,t,i,r,u,f){for(var e=this._key[1],o=n^e[0],s=r^e[1],h=i^e[2],c=t^e[3],y=void 0,g=void 0,nt=void 0,tt=e.length/4-2,l=void 0,a=4,v=this._tables[1],p=v[0],w=v[1],b=v[2],k=v[3],d=v[4],l=0;l<tt;l++)y=p[o>>>24]^w[s>>16&255]^b[h>>8&255]^k[c&255]^e[a],g=p[s>>>24]^w[h>>16&255]^b[c>>8&255]^k[o&255]^e[a+1],nt=p[h>>>24]^w[c>>16&255]^b[o>>8&255]^k[s&255]^e[a+2],c=p[c>>>24]^w[o>>16&255]^b[s>>8&255]^k[h&255]^e[a+3],a+=4,o=y,s=g,h=nt;for(l=0;l<4;l++)u[(3&-l)+f]=d[o>>>24]<<24^d[s>>16&255]<<16^d[h>>8&255]<<8^d[c&255]^e[a++],y=o,o=s,s=h,h=c,c=y},n}(),yg=function(){function n(){ih(this,n);this.listeners={}}return n.prototype.on=function(n,t){this.listeners[n]||(this.listeners[n]=[]);this.listeners[n].push(t)},n.prototype.off=function(n,t){if(!this.listeners[n])return!1;var i=this.listeners[n].indexOf(t);return this.listeners[n].splice(i,1),i>-1},n.prototype.trigger=function(n){var t=this.listeners[n],u,i,f,e,r;if(t)if(arguments.length===2)for(u=t.length,i=0;i<u;++i)t[i].call(this,arguments[1]);else for(f=Array.prototype.slice.call(arguments,1),e=t.length,r=0;r<e;++r)t[r].apply(this,f)},n.prototype.dispose=function(){this.listeners={}},n.prototype.pipe=function(n){this.on("data",function(t){n.push(t)})},n}(),pg=function(n){function t(){ih(this,t);var i=sct(this,n.call(this,yg));return i.jobs=[],i.delay=1,i.timeout_=null,i}return oct(t,n),t.prototype.processJob_=function(){this.jobs.shift()();this.timeout_=this.jobs.length?setTimeout(this.processJob_.bind(this),this.delay):null},t.prototype.push=function(n){this.jobs.push(n);this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))},t}(yg),ti=function(n){return n<<24|(n&65280)<<8|(n&16711680)>>8|n>>>24},wg=function(n,t,i){var f=new Int32Array(n.buffer,n.byteOffset,n.byteLength>>2),p=new cct(Array.prototype.slice.call(t)),y=new Uint8Array(n.byteLength),u=new Int32Array(y.buffer),e=void 0,o=void 0,s=void 0,h=void 0,c=void 0,l=void 0,a=void 0,v=void 0,r=void 0;for(e=i[0],o=i[1],s=i[2],h=i[3],r=0;r<f.length;r+=4)c=ti(f[r]),l=ti(f[r+1]),a=ti(f[r+2]),v=ti(f[r+3]),p.decrypt(c,l,a,v,u,r),u[r]=ti(u[r]^e),u[r+1]=ti(u[r+1]^o),u[r+2]=ti(u[r+2]^s),u[r+3]=ti(u[r+3]^h),e=c,o=l,s=a,h=v;return y},lct=function(){function n(t,i,r,u){ih(this,n);var o=n.STEP,e=new Int32Array(t.buffer),s=new Uint8Array(t.byteLength),f=0;for(this.asyncStream_=new pg,this.asyncStream_.push(this.decryptChunk_(e.subarray(f,f+o),i,r,s)),f=o;f<e.length;f+=o)r=new Uint32Array([ti(e[f-4]),ti(e[f-3]),ti(e[f-2]),ti(e[f-1])]),this.asyncStream_.push(this.decryptChunk_(e.subarray(f,f+o),i,r,s));this.asyncStream_.push(function(){u(null,fct(s))})}return n.prototype.decryptChunk_=function(n,t,i,r){return function(){var u=wg(n,t,i);r.set(u,n.byteOffset)}},ect(n,null,[{key:"STEP",get:function(){return 32e3}}]),n}(),br=function(t,i){return/^[a-z]+:/i.test(i)?i:(/\/\//i.test(t)||(t=la.buildAbsoluteURL(n.location.href,t)),la.buildAbsoluteURL(t,i))},rh=function(n,t,i){return n&&i.responseURL&&t!==i.responseURL?i.responseURL:t},ii=function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");},ui=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),act=function ob(n,t,i){var r,u,f;return n===null&&(n=Function.prototype),r=Object.getOwnPropertyDescriptor(n,t),r===undefined?(u=Object.getPrototypeOf(n),u===null?undefined:ob(u,t,i)):"value"in r?r.value:(f=r.get,f===undefined)?undefined:f.call(i)},yi=function(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)},oi=function(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:n},vct=function(){function n(n,t){var r=[],u=!0,f=!1,e=undefined,i,o;try{for(i=n[Symbol.iterator]();!(u=(o=i.next()).done);u=!0)if(r.push(o.value),t&&r.length===t)break}catch(s){f=!0;e=s}finally{try{!u&&i["return"]&&i["return"]()}finally{if(f)throw e;}}return r}return function(t,i){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return n(t,i);throw new TypeError("Invalid attempt to destructure non-iterable instance");}}(),sv=i.mergeOptions,yct=i.EventTarget,pct=i.log,uh=function(n,t){["AUDIO","SUBTITLES"].forEach(function(i){var r,u,f;for(r in n.mediaGroups[i])for(u in n.mediaGroups[i][r])f=n.mediaGroups[i][r][u],t(f,i,r,u)})},wct=function(n,t,i){var u=t.slice(),f,r;for(i=i||0,f=Math.min(n.length,t.length+i),r=i;r<f;r++)u[r-i]=sv(n[r],u[r-i]);return u},bct=function(n,t){n.resolvedUri||(n.resolvedUri=br(t,n.uri));n.key&&!n.key.resolvedUri&&(n.key.resolvedUri=br(t,n.key.uri));n.map&&!n.map.resolvedUri&&(n.map.resolvedUri=br(t,n.map.uri))},hv=function(n,t){var r=sv(n,{}),i=r.playlists[t.uri],u,f;if(!i||i.segments&&t.segments&&i.segments.length===t.segments.length&&i.endList===t.endList&&i.mediaSequence===t.mediaSequence)return null;for(u=sv(i,t),i.segments&&(u.segments=wct(i.segments,t.segments,t.mediaSequence-i.mediaSequence)),u.segments.forEach(function(n){bct(n,u.resolvedUri)}),f=0;f<r.playlists.length;f++)r.playlists[f].uri===t.uri&&(r.playlists[f]=u);return r.playlists[t.uri]=u,r},bg=function(n){for(var i=n.playlists.length,t;i--;)t=n.playlists[i],n.playlists[t.uri]=t,t.resolvedUri=br(n.uri,t.uri),t.id=i,t.attributes||(t.attributes={},pct.warn("Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute."))},kg=function(n){uh(n,function(t){t.uri&&(t.resolvedUri=br(n.uri,t.uri))})},dg=function(n,t){var i=n.segments[n.segments.length-1];return t&&i&&i.duration?i.duration*1e3:(n.targetDuration||10)*500},fh=function(t){function i(n,t){var f=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{},u;ii(this,i);var r=oi(this,(i.__proto__||Object.getPrototypeOf(i)).call(this)),e=f.withCredentials,s=e===undefined?!1:e,o=f.handleManifestRedirects,h=o===undefined?!1:o;if(r.srcUrl=n,r.hls_=t,r.withCredentials=s,r.handleManifestRedirects=h,u=t.options_,r.customTagParsers=u&&u.customTagParsers||[],r.customTagMappers=u&&u.customTagMappers||[],!r.srcUrl)throw new Error("A non-empty playlist URL is required");r.state="HAVE_NOTHING";r.on("mediaupdatetimeout",function(){r.state==="HAVE_METADATA"&&(r.state="HAVE_CURRENT_METADATA",r.request=r.hls_.xhr({uri:br(r.master.uri,r.media().uri),withCredentials:r.withCredentials},function(n){if(r.request){if(n)return r.playlistRequestError(r.request,r.media().uri,"HAVE_METADATA");r.haveMetadata(r.request,r.media().uri)}}))});return r}return yi(i,t),ui(i,[{key:"playlistRequestError",value:function(n,t,i){this.request=null;i&&(this.state=i);this.error={playlist:this.master.playlists[t],status:n.status,message:"HLS playlist request error at URL: "+t+".",responseText:n.responseText,code:n.status>=500?4:2};this.trigger("error")}},{key:"haveMetadata",value:function(t,i){var f=this,r,u;this.request=null;this.state="HAVE_METADATA";r=new sd;this.customTagParsers.forEach(function(n){return r.addParser(n)});this.customTagMappers.forEach(function(n){return r.addTagMapper(n)});r.push(t.responseText);r.end();r.manifest.uri=i;r.manifest.attributes=r.manifest.attributes||{};u=hv(this.master,r.manifest);this.targetDuration=r.manifest.targetDuration;u?(this.master=u,this.media_=this.master.playlists[r.manifest.uri]):this.trigger("playlistunchanged");this.media().endList||(n.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=n.setTimeout(function(){f.trigger("mediaupdatetimeout")},dg(this.media(),!!u)));this.trigger("loadedplaylist")}},{key:"dispose",value:function(){this.stopRequest();n.clearTimeout(this.mediaUpdateTimeout);n.clearTimeout(this.finalRenditionTimeout)}},{key:"stopRequest",value:function(){if(this.request){var n=this.request;this.request=null;n.onreadystatechange=null;n.abort()}}},{key:"media",value:function(t,i){var r=this,e,u,f;if(!t)return this.media_;if(this.state==="HAVE_NOTHING")throw new Error("Cannot switch media playlist from "+this.state);if(typeof t=="string"){if(!this.master.playlists[t])throw new Error("Unknown playlist URI: "+t);t=this.master.playlists[t]}if(n.clearTimeout(this.finalRenditionTimeout),i){e=t.targetDuration*500||5e3;this.finalRenditionTimeout=n.setTimeout(this.media.bind(this,t,!1),e);return}if(u=this.state,f=!this.media_||t.uri!==this.media_.uri,this.master.playlists[t.uri].endList){this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null);this.state="HAVE_METADATA";this.media_=t;f&&(this.trigger("mediachanging"),this.trigger("mediachange"));return}if(f){if(this.state="SWITCHING_MEDIA",this.request){if(t.resolvedUri===this.request.url)return;this.request.onreadystatechange=null;this.request.abort();this.request=null}this.media_&&this.trigger("mediachanging");this.request=this.hls_.xhr({uri:t.resolvedUri,withCredentials:this.withCredentials},function(n,i){if(r.request){if(t.resolvedUri=rh(r.handleManifestRedirects,t.resolvedUri,i),n)return r.playlistRequestError(r.request,t.uri,u);r.haveMetadata(i,t.uri);u==="HAVE_MASTER"?r.trigger("loadedmetadata"):r.trigger("mediachange")}})}}},{key:"pause",value:function(){this.stopRequest();n.clearTimeout(this.mediaUpdateTimeout);this.state==="HAVE_NOTHING"&&(this.started=!1);this.state==="SWITCHING_MEDIA"?this.state=this.media_?"HAVE_METADATA":"HAVE_MASTER":this.state==="HAVE_CURRENT_METADATA"&&(this.state="HAVE_METADATA")}},{key:"load",value:function(t){var u=this,i,r;if(n.clearTimeout(this.mediaUpdateTimeout),i=this.media(),t){r=i?i.targetDuration*500:5e3;this.mediaUpdateTimeout=n.setTimeout(function(){return u.load()},r);return}if(!this.started){this.start();return}i&&!i.endList?this.trigger("mediaupdatetimeout"):this.trigger("loadedplaylist")}},{key:"start",value:function(){var t=this;this.started=!0;this.request=this.hls_.xhr({uri:this.srcUrl,withCredentials:this.withCredentials},function(i,r){if(t.request){if(t.request=null,i)return t.error={status:r.status,message:"HLS playlist request error at URL: "+t.srcUrl+".",responseText:r.responseText,code:2},t.state==="HAVE_NOTHING"&&(t.started=!1),t.trigger("error");var u=new sd;if(t.customTagParsers.forEach(function(n){return u.addParser(n)}),t.customTagMappers.forEach(function(n){return u.addTagMapper(n)}),u.push(r.responseText),u.end(),t.state="HAVE_MASTER",t.srcUrl=rh(t.handleManifestRedirects,t.srcUrl,r),u.manifest.uri=t.srcUrl,u.manifest.playlists){t.master=u.manifest;bg(t.master);kg(t.master);t.trigger("loadedplaylist");t.request||t.media(u.manifest.playlists[0]);return}return t.master={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:n.location.href,playlists:[{uri:t.srcUrl,id:0,resolvedUri:t.srcUrl,attributes:{}}]},t.master.playlists[t.srcUrl]=t.master.playlists[0],t.haveMetadata(r,t.srcUrl),t.trigger("loadedmetadata")}})}}]),i}(yct),gg=i.createTimeRange,kct=function(n,t){var r=0,u=t-n.mediaSequence,i=n.segments[u];if(i){if(typeof i.start!="undefined")return{result:i.start,precise:!0};if(typeof i.end!="undefined")return{result:i.end-i.duration,precise:!0}}while(u--){if(i=n.segments[u],typeof i.end!="undefined")return{result:r+i.end,precise:!0};if(r+=i.duration,typeof i.start!="undefined")return{result:r+i.start,precise:!0}}return{result:r,precise:!1}},dct=function(n,t){for(var r=0,i=void 0,u=t-n.mediaSequence;u<n.segments.length;u++){if(i=n.segments[u],typeof i.start!="undefined")return{result:i.start-r,precise:!0};if(r+=i.duration,typeof i.end!="undefined")return{result:i.end-r,precise:!0}}return{result:-1,precise:!1}},nn=function(n,t,i){var r=void 0,u=void 0;return(typeof t=="undefined"&&(t=n.mediaSequence+n.segments.length),t<n.mediaSequence)?0:(r=kct(n,t),r.precise)?r.result:(u=dct(n,t),u.precise)?u.result:r.result+i},tn=function(t,i,r){if(!t)return 0;if(typeof r!="number"&&(r=0),typeof i=="undefined"){if(t.totalDuration)return t.totalDuration;if(!t.endList)return n.Infinity}return nn(t,i,r)},se=function(n,t,i){var u=0,f,e,r;if(t>i&&(f=[i,t],t=f[0],i=f[1]),t<0){for(e=t;e<Math.min(0,i);e++)u+=n.targetDuration;t=0}for(r=t;r<i;r++)u+=n.segments[r].duration;return u},rn=function(n){if(!n.segments.length)return 0;for(var t=n.segments.length-1,i=n.segments[t].duration||n.targetDuration,r=i+n.targetDuration*2;t--;)if(i+=n.segments[t].duration,i>=r)break;return Math.max(0,t)},un=function(n,t,i){if(!n||!n.segments)return null;if(n.endList)return tn(n);if(t===null)return null;t=t||0;var r=i?rn(n):n.segments.length;return nn(n,n.mediaSequence+r,t)},gct=function(n,t){var r=t||0,i=un(n,t,!0);return i===null?gg():gg(r,i)},fn=function(n){return n-Math.floor(n)==0},en=function(n,t){var r,i,u,f;if(fn(t))return t+n*.1;for(r=t.toString().split(".")[1].length,i=1;i<=r;i++)if(u=Math.pow(10,i),f=t*u,fn(f)||i===r)return(f+n)/u},nlt=en.bind(null,1),tlt=en.bind(null,-1),ilt=function(n,t,i,r){var u=void 0,e=void 0,o=n.segments.length,f=t-r;if(f<0){if(i>0)for(u=i-1;u>=0;u--)if(e=n.segments[u],f+=tlt(e.duration),f>0)return{mediaIndex:u,startTime:r-se(n,i,u)};return{mediaIndex:0,startTime:t}}if(i<0){for(u=i;u<0;u++)if(f-=n.targetDuration,f<0)return{mediaIndex:0,startTime:t};i=0}for(u=i;u<o;u++)if(e=n.segments[u],f-=nlt(e.duration),f<0)return{mediaIndex:u,startTime:r+se(n,i,u)};return{mediaIndex:o-1,startTime:t}},on=function(n){return n.excludeUntil&&n.excludeUntil>Date.now()},cv=function(n){return n.excludeUntil&&n.excludeUntil===Infinity},eh=function(n){var t=on(n);return!n.disabled&&!t},rlt=function(n){return n.disabled},ult=function(n){for(var t=0;t<n.segments.length;t++)if(n.segments[t].key)return!0;return!1},flt=function(n){for(var t=0;t<n.segments.length;t++)if(n.segments[t].map)return!0;return!1},sn=function(n,t){return t.attributes&&t.attributes[n]},elt=function(n,t,i){var u=arguments.length>3&&arguments[3]!==undefined?arguments[3]:0,r;return sn("BANDWIDTH",i)?(r=n*i.attributes.BANDWIDTH,(r-u*8)/t):NaN},lv=function(n,t){if(n.playlists.length===1)return!0;var i=t.attributes.BANDWIDTH||Number.MAX_VALUE;return n.playlists.filter(function(n){return eh(n)?(n.attributes.BANDWIDTH||0)<i:!1}).length===0},vt={duration:tn,seekable:gct,safeLiveIndex:rn,getMediaInfoForTime:ilt,isEnabled:eh,isDisabled:rlt,isBlacklisted:on,isIncompatible:cv,playlistEnd:un,isAes:ult,isFmp4:flt,hasAttribute:sn,estimateSegmentRequestTime:elt,isLowestEnabledRendition:lv},olt=i.xhr,slt=i.mergeOptions,hn=function(){return function n(t,r){var f,e,u,o;return t=slt({timeout:45e3},t),f=n.beforeRequest||i.Hls.xhr.beforeRequest,f&&typeof f=="function"&&(e=f(t),e&&(t=e)),u=olt(t,function(n,t){var i=u.response;!n&&i&&(u.responseTime=Date.now(),u.roundTripTime=u.responseTime-u.requestTime,u.bytesReceived=i.byteLength||i.length,u.bandwidth||(u.bandwidth=Math.floor(u.bytesReceived/u.roundTripTime*8e3)));t.headers&&(u.responseHeaders=t.headers);n&&n.code==="ETIMEDOUT"&&(u.timedout=!0);n||u.aborted||t.statusCode===200||t.statusCode===206||t.statusCode===0||(n=new Error("XHR Failed with a response of: "+(u&&(i||u.responseText))));r(n,u)}),o=u.abort,u.abort=function(){return u.aborted=!0,o.apply(u,arguments)},u.uri=t.uri,u.requestTime=Date.now(),u}},hlt=function(n){var t=void 0,i=void 0;return i=n.offset+n.length-1,t=n.offset,"bytes="+t+"-"+i},av=function(n){var t={};return n.byterange&&(t.Range=hlt(n.byterange)),t},clt=function(n,t){return n.start(t)+"-"+n.end(t)},llt=function(n,t){var i=n.toString(16);return"00".substring(0,2-i.length)+i+(t%2?" ":"")},alt=function(n){return n>=32&&n<126?String.fromCharCode(n):"."},cn=function(n){var t={};return Object.keys(n).forEach(function(i){var r=n[i];t[i]=ArrayBuffer.isView(r)?{bytes:r.buffer,byteOffset:r.byteOffset,byteLength:r.byteLength}:r}),t},oh=function(n){var t=n.byterange||{length:Infinity,offset:0};return[t.length,t.offset,n.resolvedUri].join(",")},ln=function(n){return n.resolvedUri},an=function(n){for(var r=Array.prototype.slice.call(n),t=16,u="",f=void 0,e=void 0,i=0;i<r.length/t;i++)f=r.slice(i*t,i*t+t).map(llt).join(""),e=r.slice(i*t,i*t+t).map(alt).join(""),u+=f+" "+e+"\n";return u},vlt=function(n){var t=n.bytes;return an(t)},ylt=function(n){for(var i="",t=void 0,t=0;t<n.length;t++)i+=clt(n,t)+" ";return i},plt=Object.freeze({createTransferableMessage:cn,initSegmentId:oh,segmentKeyId:ln,hexDump:an,tagDump:vlt,textRanges:ylt}),vn=.25,wlt=function(n,t){if(!t.dateTimeObject)return null;var i=t.videoTimingInfo.transmuxerPrependedSeconds,r=t.videoTimingInfo.transmuxedPresentationStart,u=r+i,f=n-u;return new Date(t.dateTimeObject.getTime()+f*1e3)},blt=function(n){return n.transmuxedPresentationEnd-n.transmuxedPresentationStart-n.transmuxerPrependedSeconds},klt=function(n,t){var u=void 0,i,f,e;try{u=new Date(n)}catch(c){return null}if(!t||!t.segments||t.segments.length===0||(i=t.segments[0],u<i.dateTimeObject))return null;for(f=0;f<t.segments.length-1;f++)if(i=t.segments[f],e=t.segments[f+1].dateTimeObject,u<e)break;var r=t.segments[t.segments.length-1],o=r.dateTimeObject,s=r.videoTimingInfo?blt(r.videoTimingInfo):r.duration+r.duration*vn,h=new Date(o.getTime()+s*1e3);return u>h?null:(u>o&&(i=r),{segment:i,estimatedStart:i.videoTimingInfo?i.videoTimingInfo.transmuxedPresentationStart:vt.duration(t,t.mediaSequence+t.segments.indexOf(i)),type:i.videoTimingInfo?"accurate":"estimate"})},dlt=function(n,t){var r,i,f,u;if(!t||!t.segments||t.segments.length===0)return null;for(r=0,i=void 0,f=0;f<t.segments.length;f++)if(i=t.segments[f],r=i.videoTimingInfo?i.videoTimingInfo.transmuxedPresentationEnd:r+i.duration,n<=r)break;if(u=t.segments[t.segments.length-1],u.videoTimingInfo&&u.videoTimingInfo.transmuxedPresentationEnd<n)return null;if(n>r){if(n>r+u.duration*vn)return null;i=u}return{segment:i,estimatedStart:i.videoTimingInfo?i.videoTimingInfo.transmuxedPresentationStart:r-i.duration,type:i.videoTimingInfo?"accurate":"estimate"}},glt=function(n,t){var i=void 0,r=void 0,u,f;try{i=new Date(n);r=new Date(t)}catch(e){}return u=i.getTime(),f=r.getTime(),(f-u)/1e3},nat=function(n){var t,i;if(!n.segments||n.segments.length===0)return!1;for(t=0;t<n.segments.length;t++)if(i=n.segments[t],!i.dateTimeObject)return!1;return!0},tat=function(n){var e=n.playlist,o=n.time,r=o===undefined?undefined:o,t=n.callback,i,u,f;if(!t)throw new Error("getProgramTime: callback must be provided");return!e||r===undefined?t({message:"getProgramTime: playlist and time must be provided"}):(i=dlt(r,e),!i)?t({message:"valid programTime was not found"}):i.type==="estimate"?t({message:"Accurate programTime could not be determined. Please seek to e.seekTime and try again",seekTime:i.estimatedStart}):(u={mediaSeconds:r},f=wlt(r,i.segment),f&&(u.programDateTime=f.toISOString()),t(null,u))},yn=function yn(n){var i=n.programTime,r=n.playlist,h=n.retryCount,c=h===undefined?2:h,e=n.seekTo,l=n.pauseAfterSeek,a=l===undefined?!0:l,u=n.tech,t=n.callback,f,o,s,v,y;if(!t)throw new Error("seekToProgramTime: callback must be provided");if(typeof i=="undefined"||!r||!e)return t({message:"seekToProgramTime: programTime, seekTo and playlist must be provided"});if(!r.endList&&!u.hasStarted_)return t({message:"player must be playing a live stream to start buffering"});if(!nat(r))return t({message:"programDateTime tags must be provided in the manifest "+r.resolvedUri});if(f=klt(i,r),!f)return t({message:i+" was not found in the stream"});if(o=f.segment,s=glt(o.dateTimeObject,i),f.type==="estimate"){if(c===0)return t({message:i+" is not buffered yet. Try again"});e(f.estimatedStart+s);u.one("seeked",function(){yn({programTime:i,playlist:r,retryCount:c-1,seekTo:e,pauseAfterSeek:a,tech:u,callback:t})});return}v=o.start+s;y=function(){return t(null,u.currentTime())};u.one("seeked",y);a&&u.pause();e(v)},sh=1/30,pi=sh*3,pn=function(n,t){var u=[],r=void 0;if(n&&n.length)for(r=0;r<n.length;r++)t(n.start(r),n.end(r))&&u.push([n.start(r),n.end(r)]);return i.createTimeRanges(u)},wn=function(n,t){return pn(n,function(n,i){return n-pi<=t&&i+pi>=t})},bn=function(n,t){return pn(n,function(n){return n-sh>=t})},iat=function(n){var r,t,u,f;if(n.length<2)return i.createTimeRanges();for(r=[],t=1;t<n.length;t++)u=n.end(t-1),f=n.start(t),r.push([u,f]);return i.createTimeRanges(r)},vv=function(n){var i=[],t;if(!n||!n.length)return"";for(t=0;t<n.length;t++)i.push(n.start(t)+" => "+n.end(t));return i.join(", ")},rat=function(n,t){var i=arguments.length>2&&arguments[2]!==undefined?arguments[2]:1,r=n.length?n.end(n.length-1):0;return(r-t)/i},kn=function(n){for(var i=[],t=0;t<n.length;t++)i.push({start:n.start(t),end:n.end(t)});return i},uat=function(n,t,i){var u=t.player_,r,f;if(i.captions&&i.captions.length){n.inbandTextTracks_||(n.inbandTextTracks_={});for(r in i.captionStreams)n.inbandTextTracks_[r]||(u.tech_.trigger({type:"usage",name:"hls-608"}),f=u.textTracks().getTrackById(r),n.inbandTextTracks_[r]=f?f:u.addRemoteTextTrack({kind:"captions",id:r,label:r},!1).track)}i.metadata&&i.metadata.length&&!n.metadataTrack_&&(n.metadataTrack_=u.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},!1).track,n.metadataTrack_.inBandMetadataTrackDispatchType=i.metadata.dispatchType)},gu=function(n,t,i){var u=void 0,r=void 0;if(i&&i.cues)for(u=i.cues.length;u--;)r=i.cues[u],r.startTime<=t&&r.endTime>=n&&i.removeCue(r)},fat=function(n){Object.defineProperties(n.frame,{id:{get:function(){return i.log.warn("cue.frame.id is deprecated. Use cue.value.key instead."),n.value.key}},value:{get:function(){return i.log.warn("cue.frame.value is deprecated. Use cue.value.data instead."),n.value.data}},privateData:{get:function(){return i.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead."),n.value.data}}})},dn=function(n){return isNaN(n)||Math.abs(n)===Infinity?Number.MAX_VALUE:n},eat=function(t,i,r){var h=n.WebKitDataCue||n.VTTCue,c,f,e,u,o,s;if(i&&i.forEach(function(n){var t=n.stream;this.inbandTextTracks_[t].addCue(new h(n.startTime+this.timestampOffset,n.endTime+this.timestampOffset,n.text))},t),r&&(c=dn(t.mediaSource_.duration),r.forEach(function(t){var i=t.cueTime+this.timestampOffset;typeof i!="number"||n.isNaN(i)||i<0||!(i<Infinity)||t.frames.forEach(function(n){var t=new h(i,i,n.value||n.url||n.data||"");t.frame=n;t.value=n;fat(t);this.metadataTrack_.addCue(t)},this)},t),t.metadataTrack_&&t.metadataTrack_.cues&&t.metadataTrack_.cues.length)){for(f=t.metadataTrack_.cues,e=[],u=0;u<f.length;u++)f[u]&&e.push(f[u]);o=e.reduce(function(n,t){var i=n[t.startTime]||[];return i.push(t),n[t.startTime]=i,n},{});s=Object.keys(o).sort(function(n,t){return Number(n)-Number(t)});s.forEach(function(n,t){var i=o[n],r=Number(s[t+1])||c;i.forEach(function(n){n.endTime=r})})}},kr=typeof window!="undefined"?window:{},yv=typeof Symbol=="undefined"?"__target":Symbol(),oat="application/javascript",sat=kr.BlobBuilder||kr.WebKitBlobBuilder||kr.MozBlobBuilder||kr.MSBlobBuilder,nf=kr.URL||kr.webkitURL||nf&&nf.msURL,tf=kr.Worker;if(tf){pv=ntt("self.onmessage = function () {}");wv=new Uint8Array(1);try{hh=new tf(pv);hh.postMessage(wv,[wv.buffer])}catch(gkt){tf=null}finally{nf.revokeObjectURL(pv);hh&&hh.terminate()}}var cat=new gn("./transmuxer-worker.worker.js",function(){var n=this,t=function(){var a=function(){this.init=function(){var n={};this.on=function(t,i){n[t]||(n[t]=[]);n[t]=n[t].concat(i)};this.off=function(t,i){var r;return n[t]?(r=n[t].indexOf(i),n[t]=n[t].slice(),n[t].splice(r,1),r>-1):!1};this.trigger=function(t){var r,i,u,f;if(r=n[t],r)if(arguments.length===2)for(u=r.length,i=0;i<u;++i)r[i].call(this,arguments[1]);else{for(f=[],i=arguments.length,i=1;i<arguments.length;++i)f.push(arguments[i]);for(u=r.length,i=0;i<u;++i)r[i].apply(this,f)}};this.dispose=function(){n={}}}},f,bt,i,yi,pi,kt,wi,bi,ki,di,dt,gi,nr,tr,ir,rr,ur,fr,er,or,sr,hr,cr,gt,t,ni,lr,ar,vr,yr,pr,wr,br,kr,tt,dr,gr,nu,hi,at,ci,lu,au,yt,g,vu;a.prototype.pipe=function(n){this.on("data",function(t){n.push(t)});this.on("done",function(t){n.flush(t)});this.on("partialdone",function(t){n.partialFlush(t)});this.on("endedtimeline",function(t){n.endTimeline(t)});this.on("reset",function(t){n.reset(t)});return n};a.prototype.push=function(n){this.trigger("data",n)};a.prototype.flush=function(n){this.trigger("done",n)};a.prototype.partialFlush=function(n){this.trigger("partialdone",n)};a.prototype.endTimeline=function(n){this.trigger("endedtimeline",n)};a.prototype.reset=function(n){this.trigger("reset",n)};f=a;bt=Math.pow(2,32)-1,function(){var n;if(t={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],pasp:[],sdtp:[],smhd:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],styp:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[]},typeof Uint8Array!="undefined"){for(n in t)t.hasOwnProperty(n)&&(t[n]=[n.charCodeAt(0),n.charCodeAt(1),n.charCodeAt(2),n.charCodeAt(3)]);ni=new Uint8Array(["i".charCodeAt(0),"s".charCodeAt(0),"o".charCodeAt(0),"m".charCodeAt(0)]);ar=new Uint8Array(["a".charCodeAt(0),"v".charCodeAt(0),"c".charCodeAt(0),"1".charCodeAt(0)]);lr=new Uint8Array([0,0,0,1]);vr=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]);yr=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);pr={video:vr,audio:yr};kr=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]);br=new Uint8Array([0,0,0,0,0,0,0,0]);tt=new Uint8Array([0,0,0,0,0,0,0,0]);dr=tt;gr=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]);nu=tt;wr=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}}();i=function(n){for(var r=[],u=0,i,f,t=1;t<arguments.length;t++)r.push(arguments[t]);for(t=r.length;t--;)u+=r[t].byteLength;for(i=new Uint8Array(u+8),f=new DataView(i.buffer,i.byteOffset,i.byteLength),f.setUint32(0,i.byteLength),i.set(n,4),t=0,u=8;t<r.length;t++)i.set(r[t],u),u+=r[t].byteLength;return i};yi=function(){return i(t.dinf,i(t.dref,kr))};pi=function(n){return i(t.esds,new Uint8Array([0,0,0,0,3,25,0,0,0,4,17,64,21,0,6,0,0,0,218,192,0,0,218,192,5,2,n.audioobjecttype<<3|n.samplingfrequencyindex>>>1,n.samplingfrequencyindex<<7|n.channelcount<<3,6,1,2]))};kt=function(){return i(t.ftyp,ni,lr,ni,ar)};fr=function(n){return i(t.hdlr,pr[n])};wi=function(n){return i(t.mdat,n)};ur=function(n){var r=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,n.duration>>>24&255,n.duration>>>16&255,n.duration>>>8&255,n.duration&255,85,196,0,0]);return n.samplerate&&(r[12]=n.samplerate>>>24&255,r[13]=n.samplerate>>>16&255,r[14]=n.samplerate>>>8&255,r[15]=n.samplerate&255),i(t.mdhd,r)};rr=function(n){return i(t.mdia,ur(n),fr(n.type),ki(n))};bi=function(n){return i(t.mfhd,new Uint8Array([0,0,0,0,(n&4278190080)>>24,(n&16711680)>>16,(n&65280)>>8,n&255]))};ki=function(n){return i(t.minf,n.type==="video"?i(t.vmhd,wr):i(t.smhd,br),yi(),or(n))};di=function(n,r){for(var f=[],u=r.length;u--;)f[u]=hr(r[u]);return i.apply(null,[t.moof,bi(n)].concat(f))};dt=function(n){for(var r=n.length,u=[];r--;)u[r]=tr(n[r]);return i.apply(null,[t.moov,nr(4294967295)].concat(u).concat(gi(n)))};gi=function(n){for(var r=n.length,u=[];r--;)u[r]=cr(n[r]);return i.apply(null,[t.mvex].concat(u))};nr=function(n){var r=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(n&4278190080)>>24,(n&16711680)>>16,(n&65280)>>8,n&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return i(t.mvhd,r)};er=function(n){for(var f=n.samples||[],e=new Uint8Array(4+f.length),u,r=0;r<f.length;r++)u=f[r].flags,e[r+4]=u.dependsOn<<4|u.isDependedOn<<2|u.hasRedundancy;return i(t.sdtp,e)};or=function(n){return i(t.stbl,sr(n),i(t.stts,nu),i(t.stsc,dr),i(t.stsz,gr),i(t.stco,tt))},function(){var n,r;sr=function(u){return i(t.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),u.type==="video"?n(u):r(u))};n=function(n){for(var u=n.sps||[],f=n.pps||[],e=[],o=[],c,s,h,r=0;r<u.length;r++)e.push((u[r].byteLength&65280)>>>8),e.push(u[r].byteLength&255),e=e.concat(Array.prototype.slice.call(u[r]));for(r=0;r<f.length;r++)o.push((f[r].byteLength&65280)>>>8),o.push(f[r].byteLength&255),o=o.concat(Array.prototype.slice.call(f[r]));return c=[t.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,(n.width&65280)>>8,n.width&255,(n.height&65280)>>8,n.height&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),i(t.avcC,new Uint8Array([1,n.profileIdc,n.profileCompatibility,n.levelIdc,255].concat([u.length],e,[f.length],o))),i(t.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],n.sarRatio&&(s=n.sarRatio[0],h=n.sarRatio[1],c.push(i(t.pasp,new Uint8Array([(s&4278190080)>>24,(s&16711680)>>16,(s&65280)>>8,s&255,(h&4278190080)>>24,(h&16711680)>>16,(h&65280)>>8,h&255])))),i.apply(null,c)};r=function(n){return i(t.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(n.channelcount&65280)>>8,n.channelcount&255,(n.samplesize&65280)>>8,n.samplesize&255,0,0,0,0,(n.samplerate&65280)>>8,n.samplerate&255,0,0]),pi(n))}}();ir=function(n){var r=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(n.id&4278190080)>>24,(n.id&16711680)>>16,(n.id&65280)>>8,n.id&255,0,0,0,0,(n.duration&4278190080)>>24,(n.duration&16711680)>>16,(n.duration&65280)>>8,n.duration&255,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,(n.width&65280)>>8,n.width&255,0,0,(n.height&65280)>>8,n.height&255,0,0]);return i(t.tkhd,r)};hr=function(n){var e,o,f,s,h,r,u;return(e=i(t.tfhd,new Uint8Array([0,0,0,58,(n.id&4278190080)>>24,(n.id&16711680)>>16,(n.id&65280)>>8,n.id&255,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),r=Math.floor(n.baseMediaDecodeTime/(bt+1)),u=Math.floor(n.baseMediaDecodeTime%(bt+1)),o=i(t.tfdt,new Uint8Array([1,0,0,0,r>>>24&255,r>>>16&255,r>>>8&255,r&255,u>>>24&255,u>>>16&255,u>>>8&255,u&255])),h=92,n.type==="audio")?(f=gt(n,h),i(t.traf,e,o,f)):(s=er(n),f=gt(n,s.length+h),i(t.traf,e,o,f,s))};tr=function(n){return n.duration=n.duration||4294967295,i(t.trak,ir(n),rr(n))};cr=function(n){var r=new Uint8Array([0,0,0,0,(n.id&4278190080)>>24,(n.id&16711680)>>16,(n.id&65280)>>8,n.id&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return n.type!=="video"&&(r[r.length-1]=0),i(t.trex,r)},function(){var r,u,n;n=function(n,t){var i=0,r=0,u=0,f=0;return n.length&&(n[0].duration!==undefined&&(i=1),n[0].size!==undefined&&(r=2),n[0].flags!==undefined&&(u=4),n[0].compositionTimeOffset!==undefined&&(f=8)),[0,0,i|r|u|f,1,(n.length&4278190080)>>>24,(n.length&16711680)>>>16,(n.length&65280)>>>8,n.length&255,(t&4278190080)>>>24,(t&16711680)>>>16,(t&65280)>>>8,t&255]};u=function(r,u){var o,e,f,s;for(e=r.samples||[],u+=20+16*e.length,o=n(e,u),s=0;s<e.length;s++)f=e[s],o=o.concat([(f.duration&4278190080)>>>24,(f.duration&16711680)>>>16,(f.duration&65280)>>>8,f.duration&255,(f.size&4278190080)>>>24,(f.size&16711680)>>>16,(f.size&65280)>>>8,f.size&255,f.flags.isLeading<<2|f.flags.dependsOn,f.flags.isDependedOn<<6|f.flags.hasRedundancy<<4|f.flags.paddingValue<<1|f.flags.isNonSyncSample,f.flags.degradationPriority&61440,f.flags.degradationPriority&15,(f.compositionTimeOffset&4278190080)>>>24,(f.compositionTimeOffset&16711680)>>>16,(f.compositionTimeOffset&65280)>>>8,f.compositionTimeOffset&255]);return i(t.trun,new Uint8Array(o))};r=function(r,u){var o,e,f,s;for(e=r.samples||[],u+=20+8*e.length,o=n(e,u),s=0;s<e.length;s++)f=e[s],o=o.concat([(f.duration&4278190080)>>>24,(f.duration&16711680)>>>16,(f.duration&65280)>>>8,f.duration&255,(f.size&4278190080)>>>24,(f.size&16711680)>>>16,(f.size&65280)>>>8,f.size&255]);return i(t.trun,new Uint8Array(o))};gt=function(n,t){return n.type==="audio"?r(n,t):u(n,t)}}();var b={ftyp:kt,mdat:wi,moof:di,moov:dt,initSegment:function(n){var i=kt(),r=dt(n),t;return t=new Uint8Array(i.byteLength+r.byteLength),t.set(i),t.set(r,i.byteLength),t}},ku=function(n){var u,r,t=[],i=[];for(i.byteLength=0,i.nalCount=0,i.duration=0,t.byteLength=0,u=0;u<n.length;u++)r=n[u],r.nalUnitType==="access_unit_delimiter_rbsp"?(t.length&&(t.duration=r.dts-t.dts,i.byteLength+=t.byteLength,i.nalCount+=t.length,i.duration+=t.duration,i.push(t)),t=[r],t.byteLength=r.data.byteLength,t.pts=r.pts,t.dts=r.dts):(r.nalUnitType==="slice_layer_without_partitioning_rbsp_idr"&&(t.keyFrame=!0),t.duration=r.dts-t.dts,t.byteLength+=r.data.byteLength,t.push(r));return i.length&&(!t.duration||t.duration<=0)&&(t.duration=i[i.length-1].duration),i.byteLength+=t.byteLength,i.nalCount+=t.length,i.duration+=t.duration,i.push(t),i},du=function(n){var u,r,t=[],i=[];for(t.byteLength=0,t.nalCount=0,t.duration=0,t.pts=n[0].pts,t.dts=n[0].dts,i.byteLength=0,i.nalCount=0,i.duration=0,i.pts=n[0].pts,i.dts=n[0].dts,u=0;u<n.length;u++)r=n[u],r.keyFrame?(t.length&&(i.push(t),i.byteLength+=t.byteLength,i.nalCount+=t.nalCount,i.duration+=t.duration),t=[r],t.nalCount=r.length,t.byteLength=r.byteLength,t.pts=r.pts,t.dts=r.dts,t.duration=r.duration):(t.duration+=r.duration,t.nalCount+=r.length,t.byteLength+=r.byteLength,t.push(r));return i.length&&t.duration<=0&&(t.duration=i[i.length-1].duration),i.byteLength+=t.byteLength,i.nalCount+=t.nalCount,i.duration+=t.duration,i.push(t),i},gu=function(n){var t;return!n[0][0].keyFrame&&n.length>1&&(t=n.shift(),n.byteLength-=t.byteLength,n.nalCount-=t.nalCount,n[0][0].dts=t.dts,n[0][0].pts=t.pts,n[0][0].duration+=t.duration),n},nf=function(){return{size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}}},tu=function(n,t){var i=nf();return i.dataOffset=t,i.compositionTimeOffset=n.pts-n.dts,i.duration=n.duration,i.size=4*n.length,i.size+=n.byteLength,n.keyFrame&&(i.flags.dependsOn=2,i.flags.isNonSyncSample=0),i},tf=function(n,t){for(var r,u,f,e,o=t||0,s=[],i=0;i<n.length;i++)for(f=n[i],r=0;r<f.length;r++)e=f[r],u=tu(e,o),o+=u.size,s.push(u);return s},rf=function(n){for(var i,r,e,o,u,f=0,h=n.byteLength,c=n.nalCount,l=h+4*c,s=new Uint8Array(l),a=new DataView(s.buffer),t=0;t<n.length;t++)for(e=n[t],i=0;i<e.length;i++)for(o=e[i],r=0;r<o.length;r++)u=o[r],a.setUint32(f,u.data.byteLength),f+=4,s.set(u.data,f),f+=u.data.byteLength;return s},uf=function(n,t){var i,u=t||0,r=[];return i=tu(n,u),r.push(i),r},ff=function(n){for(var i,r=0,f=n.byteLength,e=n.length,o=f+4*e,u=new Uint8Array(o),s=new DataView(u.buffer),t=0;t<n.length;t++)i=n[t],s.setUint32(r,i.data.byteLength),r+=4,u.set(i.data,r),r+=i.data.byteLength;return u},k={groupNalsIntoFrames:ku,groupFramesIntoGops:du,extendFirstKeyFrame:gu,generateSampleTable:tf,concatenateNalData:rf,generateSampleTableForFrame:uf,concatenateNalDataForFrame:ff},l=[33,16,5,32,164,27],ti=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],r=function(n){for(var t=[];n--;)t.push(0);return t},ef=function(n){return Object.keys(n).reduce(function(t,i){return t[i]=new Uint8Array(n[i].reduce(function(n,t){return n.concat(t)},[])),t},{})},of={96e3:[l,[227,64],r(154),[56]],88200:[l,[231],r(170),[56]],64e3:[l,[248,192],r(240),[56]],48e3:[l,[255,192],r(268),[55,148,128],r(54),[112]],44100:[l,[255,192],r(268),[55,163,128],r(84),[112]],32e3:[l,[255,192],r(268),[55,234],r(226),[112]],24e3:[l,[255,192],r(268),[55,255,128],r(268),[111,112],r(126),[224]],16e3:[l,[255,192],r(268),[55,255,128],r(268),[111,255],r(269),[223,108],r(195),[1,192]],12e3:[ti,r(268),[3,127,248],r(268),[6,255,240],r(268),[13,255,224],r(268),[27,253,128],r(259),[56]],11025:[ti,r(268),[3,127,248],r(268),[6,255,240],r(268),[13,255,224],r(268),[27,255,192],r(268),[55,175,128],r(108),[112]],8e3:[ti,r(268),[3,121,16],r(47),[7]]},sf=ef(of),ii=9e4,ri,ui,it,fi,iu,ru,uu;ri=function(n){return n*ii};ui=function(n,t){return n*t};it=function(n){return n/ii};fi=function(n,t){return n/t};iu=function(n,t){return ri(fi(n,t))};ru=function(n,t){return ui(it(n),t)};uu=function(n,t,i){return it(i?n:n-t)};var h={ONE_SECOND_IN_TS:ii,secondsToVideoTs:ri,secondsToAudioTs:ui,videoTsToSeconds:it,audioTsToSeconds:fi,audioTsToVideoTs:iu,videoTsToAudioTs:ru,metadataTsToSeconds:uu},hf=function(n){for(var i,r=0,t=0;t<n.length;t++)i=n[t],r+=i.data.byteLength;return r},cf=function(n,t,i,r){var l,u=0,a=0,f=0,o=0,e,s,c;if(t.length&&(l=h.audioTsToVideoTs(n.baseMediaDecodeTime,n.samplerate),u=Math.ceil(h.ONE_SECOND_IN_TS/(n.samplerate/1024)),i&&r&&(a=l-Math.max(i,r),f=Math.floor(a/u),o=f*u),!(f<1)&&!(o>h.ONE_SECOND_IN_TS/2))){for(e=sf[n.samplerate],e||(e=t[0].data),s=0;s<f;s++)c=t[0],t.splice(0,0,{data:e,dts:c.dts-u,pts:c.pts-u});n.baseMediaDecodeTime-=Math.floor(h.videoTsToAudioTs(o,n.samplerate))}},lf=function(n,t,i){return t.minSegmentDts>=i?n:(t.minSegmentDts=Infinity,n.filter(function(n){return n.dts>=i?(t.minSegmentDts=Math.min(t.minSegmentDts,n.dts),t.minSegmentPts=t.minSegmentDts,!0):!1}))},af=function(n){for(var i,r=[],t=0;t<n.length;t++)i=n[t],r.push({size:i.data.byteLength,duration:1024});return r},vf=function(n){for(var i,r=0,u=new Uint8Array(hf(n)),t=0;t<n.length;t++)i=n[t],u.set(i.data,r),r+=i.data.byteLength;return u},rt={prefixWithSilence:cf,trimAdtsFramesByEarliestDts:lf,generateSampleTable:af,concatenateFrameData:vf},yf=h.ONE_SECOND_IN_TS,pf=function(n,t){typeof t.pts=="number"&&(n.timelineStartInfo.pts===undefined&&(n.timelineStartInfo.pts=t.pts),n.minSegmentPts=n.minSegmentPts===undefined?t.pts:Math.min(n.minSegmentPts,t.pts),n.maxSegmentPts=n.maxSegmentPts===undefined?t.pts:Math.max(n.maxSegmentPts,t.pts));typeof t.dts=="number"&&(n.timelineStartInfo.dts===undefined&&(n.timelineStartInfo.dts=t.dts),n.minSegmentDts=n.minSegmentDts===undefined?t.dts:Math.min(n.minSegmentDts,t.dts),n.maxSegmentDts=n.maxSegmentDts===undefined?t.dts:Math.max(n.maxSegmentDts,t.dts))},wf=function(n){delete n.minSegmentDts;delete n.maxSegmentDts;delete n.minSegmentPts;delete n.maxSegmentPts},bf=function(n,t){var i,r,u=n.minSegmentDts;return t||(u-=n.timelineStartInfo.dts),i=n.timelineStartInfo.baseMediaDecodeTime,i+=u,i=Math.max(0,i),n.type==="audio"&&(r=n.samplerate/yf,i*=r,i=Math.floor(i)),i},s={clearDtsInfo:wf,calculateTrackBaseMediaDecodeTime:bf,collectDtsInfo:pf},fu=4,kf=128,df=function(n){for(var t=0,r={payloadType:-1,payloadSize:0},u=0,i=0;t<n.byteLength;){if(n[t]===kf)break;while(n[t]===255)u+=255,t++;for(u+=n[t++];n[t]===255;)i+=255,t++;if(i+=n[t++],!r.payload&&u===fu){r.payloadType=u;r.payloadSize=i;r.payload=n.subarray(t,t+i);break}t+=i;u=0;i=0}return r},gf=function(n){return n.payload[0]!==181?null:(n.payload[1]<<8|n.payload[2])!=49?null:String.fromCharCode(n.payload[3],n.payload[4],n.payload[5],n.payload[6])!=="GA94"?null:n.payload[7]!==3?null:n.payload.subarray(8,n.payload.length-1)},ne=function(n,t){var u=[],r,e,i,f;if(!(t[0]&64))return u;for(e=t[0]&31,r=0;r<e;r++)i=r*3,f={type:t[i+2]&3,pts:n},t[i+2]&4&&(f.ccData=t[i+3]<<8|t[i+4],u.push(f));return u},te=function(n){for(var e=n.byteLength,i=[],t=1,u,f,r;t<e-2;)n[t]===0&&n[t+1]===0&&n[t+2]===3?(i.push(t+2),t+=2):t++;if(i.length===0)return n;for(u=e-i.length,f=new Uint8Array(u),r=0,t=0;t<u;r++,t++)r===i[0]&&(r++,i.shift()),f[t]=n[r];return f},ut={parseSei:df,parseUserData:gf,parseCaptionPackets:ne,discardEmulationPreventionBytes:te,USER_DATA_REGISTERED_ITU_T_T35:fu},e=function e(){e.prototype.init.call(this);this.captionPackets_=[];this.ccStreams_=[new u(0,0),new u(0,1),new u(1,0),new u(1,1)];this.reset();this.ccStreams_.forEach(function(n){n.on("data",this.trigger.bind(this,"data"));n.on("partialdone",this.trigger.bind(this,"partialdone"));n.on("done",this.trigger.bind(this,"done"))},this)};e.prototype=new f;e.prototype.push=function(n){var t,i,r;if(n.nalUnitType==="sei_rbsp"&&(t=ut.parseSei(n.escapedRBSP),t.payloadType===ut.USER_DATA_REGISTERED_ITU_T_T35)&&(i=ut.parseUserData(t),i)){if(n.dts<this.latestDts_){this.ignoreNextEqualDts_=!0;return}if(n.dts===this.latestDts_&&this.ignoreNextEqualDts_){this.numSameDts_--;this.numSameDts_||(this.ignoreNextEqualDts_=!1);return}r=ut.parseCaptionPackets(n.pts,i);this.captionPackets_=this.captionPackets_.concat(r);this.latestDts_!==n.dts&&(this.numSameDts_=0);this.numSameDts_++;this.latestDts_=n.dts}};e.prototype.flushCCStreams=function(n){this.ccStreams_.forEach(function(t){return n==="flush"?t.flush():t.partialFlush()},this)};e.prototype.flushStream=function(n){if(!this.captionPackets_.length){this.flushCCStreams(n);return}this.captionPackets_.forEach(function(n,t){n.presortIndex=t});this.captionPackets_.sort(function(n,t){return n.pts===t.pts?n.presortIndex-t.presortIndex:n.pts-t.pts});this.captionPackets_.forEach(function(n){n.type<2&&this.dispatchCea608Packet(n)},this);this.captionPackets_.length=0;this.flushCCStreams(n)};e.prototype.flush=function(){return this.flushStream("flush")};e.prototype.partialFlush=function(){return this.flushStream("partialFlush")};e.prototype.reset=function(){this.latestDts_=null;this.ignoreNextEqualDts_=!1;this.numSameDts_=0;this.activeCea608Channel_=[null,null];this.ccStreams_.forEach(function(n){n.reset()})};e.prototype.dispatchCea608Packet=function(n){(this.setsTextOrXDSActive(n)?this.activeCea608Channel_[n.type]=null:this.setsChannel1Active(n)?this.activeCea608Channel_[n.type]=0:this.setsChannel2Active(n)&&(this.activeCea608Channel_[n.type]=1),this.activeCea608Channel_[n.type]!==null)&&this.ccStreams_[(n.type<<1)+this.activeCea608Channel_[n.type]].push(n)};e.prototype.setsChannel1Active=function(n){return(n.ccData&30720)==4096};e.prototype.setsChannel2Active=function(n){return(n.ccData&30720)==6144};e.prototype.setsTextOrXDSActive=function(n){return(n.ccData&28928)==256||(n.ccData&30974)==4138||(n.ccData&30974)==6186};var ie={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496},ft=function(n){return n===null?"":(n=ie[n]||n,String.fromCharCode(n))},et=14,re=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],v=function(){for(var n=[],t=et+1;t--;)n.push("");return n},u=function u(n,t){u.prototype.init.call(this);this.field_=n||0;this.dataChannel_=t||0;this.name_="CC"+((this.field_<<1|this.dataChannel_)+1);this.setConstants();this.reset();this.push=function(n){var t,e,r,i,u,f;if(t=n.ccData&32639,t===this.lastControlCode_){this.lastControlCode_=null;return}((t&61440)==4096?this.lastControlCode_=t:t!==this.PADDING_&&(this.lastControlCode_=null),r=t>>>8,i=t&255,t!==this.PADDING_)&&(t===this.RESUME_CAPTION_LOADING_?this.mode_="popOn":t===this.END_OF_CAPTION_?(this.mode_="popOn",this.clearFormatting(n.pts),this.flushDisplayed(n.pts),e=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=e,this.startPts_=n.pts):t===this.ROLL_UP_2_ROWS_?(this.rollUpRows_=2,this.setRollUp(n.pts)):t===this.ROLL_UP_3_ROWS_?(this.rollUpRows_=3,this.setRollUp(n.pts)):t===this.ROLL_UP_4_ROWS_?(this.rollUpRows_=4,this.setRollUp(n.pts)):t===this.CARRIAGE_RETURN_?(this.clearFormatting(n.pts),this.flushDisplayed(n.pts),this.shiftRowsUp_(),this.startPts_=n.pts):t===this.BACKSPACE_?this.mode_==="popOn"?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1):t===this.ERASE_DISPLAYED_MEMORY_?(this.flushDisplayed(n.pts),this.displayed_=v()):t===this.ERASE_NON_DISPLAYED_MEMORY_?this.nonDisplayed_=v():t===this.RESUME_DIRECT_CAPTIONING_?(this.mode_!=="paintOn"&&(this.flushDisplayed(n.pts),this.displayed_=v()),this.mode_="paintOn",this.startPts_=n.pts):this.isSpecialCharacter(r,i)?(r=(r&3)<<8,u=ft(r|i),this[this.mode_](n.pts,u),this.column_++):this.isExtCharacter(r,i)?(this.mode_==="popOn"?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1),r=(r&3)<<8,u=ft(r|i),this[this.mode_](n.pts,u),this.column_++):this.isMidRowCode(r,i)?(this.clearFormatting(n.pts),this[this.mode_](n.pts," "),this.column_++,(i&14)==14&&this.addFormatting(n.pts,["i"]),(i&1)==1&&this.addFormatting(n.pts,["u"])):this.isOffsetControlCode(r,i)?this.column_+=i&3:this.isPAC(r,i)?(f=re.indexOf(t&7968),this.mode_==="rollUp"&&(f-this.rollUpRows_+1<0&&(f=this.rollUpRows_-1),this.setRollUp(n.pts,f)),f!==this.row_&&(this.clearFormatting(n.pts),this.row_=f),i&1&&this.formatting_.indexOf("u")===-1&&this.addFormatting(n.pts,["u"]),(t&16)==16&&(this.column_=((t&14)>>1)*4),this.isColorPAC(i)&&(i&14)==14&&this.addFormatting(n.pts,["i"])):this.isNormalChar(r)&&(i===0&&(i=null),u=ft(r),u+=ft(i),this[this.mode_](n.pts,u),this.column_+=u.length))}};u.prototype=new f;u.prototype.flushDisplayed=function(n){var t=this.displayed_.map(function(n){try{return n.trim()}catch(t){return console.error("Skipping malformed caption."),""}}).join("\n").replace(/^\n+|\n+$/g,"");t.length&&this.trigger("data",{startPts:this.startPts_,endPts:n,text:t,stream:this.name_})};u.prototype.reset=function(){this.mode_="popOn";this.topRow_=0;this.startPts_=0;this.displayed_=v();this.nonDisplayed_=v();this.lastControlCode_=null;this.column_=0;this.row_=et;this.rollUpRows_=2;this.formatting_=[]};u.prototype.setConstants=function(){this.dataChannel_===0?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):this.dataChannel_===1&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31);this.PADDING_=0;this.RESUME_CAPTION_LOADING_=this.CONTROL_|32;this.END_OF_CAPTION_=this.CONTROL_|47;this.ROLL_UP_2_ROWS_=this.CONTROL_|37;this.ROLL_UP_3_ROWS_=this.CONTROL_|38;this.ROLL_UP_4_ROWS_=this.CONTROL_|39;this.CARRIAGE_RETURN_=this.CONTROL_|45;this.RESUME_DIRECT_CAPTIONING_=this.CONTROL_|41;this.BACKSPACE_=this.CONTROL_|33;this.ERASE_DISPLAYED_MEMORY_=this.CONTROL_|44;this.ERASE_NON_DISPLAYED_MEMORY_=this.CONTROL_|46};u.prototype.isSpecialCharacter=function(n,t){return n===this.EXT_&&t>=48&&t<=63};u.prototype.isExtCharacter=function(n,t){return(n===this.EXT_+1||n===this.EXT_+2)&&t>=32&&t<=63};u.prototype.isMidRowCode=function(n,t){return n===this.EXT_&&t>=32&&t<=47};u.prototype.isOffsetControlCode=function(n,t){return n===this.OFFSET_&&t>=33&&t<=35};u.prototype.isPAC=function(n,t){return n>=this.BASE_&&n<this.BASE_+8&&t>=64&&t<=127};u.prototype.isColorPAC=function(n){return n>=64&&n<=79||n>=96&&n<=127};u.prototype.isNormalChar=function(n){return n>=32&&n<=127};u.prototype.setRollUp=function(n,t){if(this.mode_!=="rollUp"&&(this.row_=et,this.mode_="rollUp",this.flushDisplayed(n),this.nonDisplayed_=v(),this.displayed_=v()),t!==undefined&&t!==this.row_)for(var i=0;i<this.rollUpRows_;i++)this.displayed_[t-i]=this.displayed_[this.row_-i],this.displayed_[this.row_-i]="";t===undefined&&(t=this.row_);this.topRow_=t-this.rollUpRows_+1};u.prototype.addFormatting=function(n,t){this.formatting_=this.formatting_.concat(t);var i=t.reduce(function(n,t){return n+"<"+t+">"},"");this[this.mode_](n,i)};u.prototype.clearFormatting=function(n){if(this.formatting_.length){var t=this.formatting_.reverse().reduce(function(n,t){return n+"<\/"+t+">"},"");this.formatting_=[];this[this.mode_](n,t)}};u.prototype.popOn=function(n,t){var i=this.nonDisplayed_[this.row_];i+=t;this.nonDisplayed_[this.row_]=i};u.prototype.rollUp=function(n,t){var i=this.displayed_[this.row_];i+=t;this.displayed_[this.row_]=i};u.prototype.shiftRowsUp_=function(){for(var n=0;n<this.topRow_;n++)this.displayed_[n]="";for(n=this.row_+1;n<et+1;n++)this.displayed_[n]="";for(n=this.topRow_;n<this.row_;n++)this.displayed_[n]=this.displayed_[n+1];this.displayed_[this.row_]=""};u.prototype.paintOn=function(n,t){var i=this.displayed_[this.row_];i+=t;this.displayed_[this.row_]=i};var eu={CaptionStream:e,Cea608Stream:u},o={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},ue=8589934592,fe=4294967296,ou="shared",ei=function(n,t){var i=1;for(n>t&&(i=-1);Math.abs(t-n)>fe;)n+=i*ue;return n},oi=function oi(n){var i,t;oi.prototype.init.call(this);this.type_=n||ou;this.push=function(n){(this.type_===ou||n.type===this.type_)&&(t===undefined&&(t=n.dts),n.dts=ei(n.dts,t),n.pts=ei(n.pts,t),i=n.dts,this.trigger("data",n))};this.flush=function(){t=i;this.trigger("done")};this.endTimeline=function(){this.flush();this.trigger("endedtimeline")};this.discontinuity=function(){t=void 0;i=void 0};this.reset=function(){this.discontinuity();this.trigger("reset")}};oi.prototype=new f;var ee={TimestampRolloverStream:oi,handleRollover:ei},su=function(n,t,i){for(var u="",r=t;r<i;r++)u+="%"+("00"+n[r].toString(16)).slice(-2);return u},ot=function(n,t,i){return decodeURIComponent(su(n,t,i))},oe=function(n,t,i){return unescape(su(n,t,i))},st=function(n){return n[0]<<21|n[1]<<14|n[2]<<7|n[3]},hu={TXXX:function(n){var t;if(n.data[0]===3){for(t=1;t<n.data.length;t++)if(n.data[t]===0){n.description=ot(n.data,1,t);n.value=ot(n.data,t+1,n.data.length).replace(/\0*$/,"");break}n.data=n.value}},WXXX:function(n){var t;if(n.data[0]===3)for(t=1;t<n.data.length;t++)if(n.data[t]===0){n.description=ot(n.data,1,t);n.url=ot(n.data,t+1,n.data.length);break}},PRIV:function(n){for(var t=0;t<n.data.length;t++)if(n.data[t]===0){n.owner=oe(n.data,0,t);break}n.privateData=n.data.subarray(t+1);n.data=n.privateData}},ht;ht=function(n){var r={debug:!!(n&&n.debug),descriptor:n&&n.descriptor},i=0,t=[],u=0,f;if(ht.prototype.init.call(this),this.dispatchType=o.METADATA_STREAM_TYPE.toString(16),r.descriptor)for(f=0;f<r.descriptor.length;f++)this.dispatchType+=("00"+r.descriptor[f].toString(16)).slice(-2);this.push=function(n){var f,e,c,o,h,a,s,l;if(n.type==="timed-metadata"){if(n.dataAlignmentIndicator&&(u=0,t.length=0),t.length===0&&(n.data.length<10||n.data[0]!=="I".charCodeAt(0)||n.data[1]!=="D".charCodeAt(0)||n.data[2]!=="3".charCodeAt(0))){r.debug&&console.log("Skipping unrecognized metadata packet");return}if(t.push(n),u+=n.data.byteLength,t.length===1&&(i=st(n.data.subarray(6,10))+10),!(u<i)){for(f={data:new Uint8Array(i),frames:[],pts:t[0].pts,dts:t[0].dts},h=0;h<i;)f.data.set(t[0].data.subarray(0,i-h),h),h+=t[0].data.byteLength,u-=t[0].data.byteLength,t.shift();e=10;f.data[5]&64&&(e+=4,e+=st(f.data.subarray(10,14)),i-=st(f.data.subarray(16,20)));do{if(c=st(f.data.subarray(e+4,e+8)),c<1)return console.log("Malformed ID3 frame encountered. Skipping metadata parsing.");a=String.fromCharCode(f.data[e],f.data[e+1],f.data[e+2],f.data[e+3]);o={id:a,data:f.data.subarray(e+10,e+c+10)};o.key=o.id;hu[o.id]&&(hu[o.id](o),o.owner==="com.apple.streaming.transportStreamTimestamp"&&(s=o.data,l=(s[3]&1)<<30|s[4]<<22|s[5]<<14|s[6]<<6|s[7]>>>2,l*=4,l+=s[7]&3,o.timeStamp=l,f.pts===undefined&&f.dts===undefined&&(f.pts=o.timeStamp,f.dts=o.timeStamp),this.trigger("timestamp",o)));f.frames.push(o);e+=10;e+=c}while(e<i);this.trigger("data",f)}}}};ht.prototype=new f;var se=ht,he=ee.TimestampRolloverStream,ct,d,lt,p=188,si=71;ct=function(){var t=new Uint8Array(p),n=0;ct.prototype.init.call(this);this.push=function(i){var u=0,f=p,r;for(n?(r=new Uint8Array(i.byteLength+n),r.set(t.subarray(0,n)),r.set(i,n),n=0):r=i;f<r.byteLength;){if(r[u]===si&&r[f]===si){this.trigger("data",r.subarray(u,f));u+=p;f+=p;continue}u++;f++}u<r.byteLength&&(t.set(r.subarray(u),0),n=r.byteLength-u)};this.flush=function(){n===p&&t[0]===si&&(this.trigger("data",t),n=0);this.trigger("done")};this.endTimeline=function(){this.flush();this.trigger("endedtimeline")};this.reset=function(){n=0;this.trigger("reset")}};ct.prototype=new f;d=function(){var t,i,r,n;d.prototype.init.call(this);n=this;this.packetsWaitingForPmt=[];this.programMapTable=undefined;t=function(n,t){var u=0;t.payloadUnitStartIndicator&&(u+=n[u]+1);t.type==="pat"?i(n.subarray(u),t):r(n.subarray(u),t)};i=function(t,i){i.section_number=t[7];i.last_section_number=t[8];n.pmtPid=(t[10]&31)<<8|t[11];i.pmtPid=n.pmtPid};r=function(t,i){var e,s,h,r,u,f;if(t[5]&1){for(n.programMapTable={video:null,audio:null,"timed-metadata":{}},e=(t[1]&15)<<8|t[2],s=3+e-4,h=(t[10]&15)<<8|t[11],r=12+h;r<s;)u=t[r],f=(t[r+1]&31)<<8|t[r+2],u===o.H264_STREAM_TYPE&&n.programMapTable.video===null?n.programMapTable.video=f:u===o.ADTS_STREAM_TYPE&&n.programMapTable.audio===null?n.programMapTable.audio=f:u===o.METADATA_STREAM_TYPE&&(n.programMapTable["timed-metadata"][f]=u),r+=((t[r+3]&15)<<8|t[r+4])+5;i.programMapTable=n.programMapTable}};this.push=function(n){var i={},r=4;if(i.payloadUnitStartIndicator=!!(n[1]&64),i.pid=n[1]&31,i.pid<<=8,i.pid|=n[2],(n[3]&48)>>>4>1&&(r+=n[r]+1),i.pid===0)i.type="pat",t(n.subarray(r),i),this.trigger("data",i);else if(i.pid===this.pmtPid)for(i.type="pmt",t(n.subarray(r),i),this.trigger("data",i);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else this.programMapTable===undefined?this.packetsWaitingForPmt.push([n,r,i]):this.processPes_(n,r,i)};this.processPes_=function(n,t,i){i.streamType=i.pid===this.programMapTable.video?o.H264_STREAM_TYPE:i.pid===this.programMapTable.audio?o.ADTS_STREAM_TYPE:this.programMapTable["timed-metadata"][i.pid];i.type="pes";i.data=n.subarray(t);this.trigger("data",i)}};d.prototype=new f;d.STREAM_TYPES={h264:27,adts:15};lt=function(){var u=this,t={data:[],size:0},i={data:[],size:0},f={data:[],size:0},n,e=function(n,t){var i;t.packetLength=6+(n[4]<<8|n[5]);t.dataAlignmentIndicator=(n[6]&4)!=0;i=n[7];i&192&&(t.pts=(n[9]&14)<<27|(n[10]&255)<<20|(n[11]&254)<<12|(n[12]&255)<<5|(n[13]&254)>>>3,t.pts*=4,t.pts+=(n[13]&6)>>>1,t.dts=t.pts,i&64&&(t.dts=(n[14]&14)<<27|(n[15]&255)<<20|(n[16]&254)<<12|(n[17]&255)<<5|(n[18]&254)>>>3,t.dts*=4,t.dts+=(n[18]&6)>>>1));t.data=n.subarray(9+n[8])},r=function(n,t,i){var h=new Uint8Array(n.size),r={type:t},f=0,c=0,o=!1,s;if(n.data.length&&!(n.size<9)){for(r.trackId=n.data[0].pid,f=0;f<n.data.length;f++)s=n.data[f],h.set(s.data,c),c+=s.data.byteLength;e(h,r);o=t==="video"||r.packetLength<=n.size;(i||o)&&(n.size=0,n.data.length=0);o&&u.trigger("data",r)}};lt.prototype.init.call(this);this.push=function(e){({pat:function(){},pes:function(){var n,u;switch(e.streamType){case o.H264_STREAM_TYPE:case o.H264_STREAM_TYPE:n=t;u="video";break;case o.ADTS_STREAM_TYPE:n=i;u="audio";break;case o.METADATA_STREAM_TYPE:n=f;u="timed-metadata";break;default:return}e.payloadUnitStartIndicator&&r(n,u,!0);n.data.push(e);n.size+=e.data.byteLength},pmt:function(){var t={type:"metadata",tracks:[]};n=e.programMapTable;n.video!==null&&t.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+n.video,codec:"avc",type:"video"});n.audio!==null&&t.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+n.audio,codec:"adts",type:"audio"});u.trigger("data",t)}})[e.type]()};this.reset=function(){t.size=0;t.data.length=0;i.size=0;i.data.length=0;this.trigger("reset")};this.flushStreams_=function(){r(t,"video");r(i,"audio");r(f,"timed-metadata")};this.flush=function(){this.flushStreams_();this.trigger("done")}};lt.prototype=new f;hi={PAT_PID:0,MP2T_PACKET_LENGTH:p,TransportPacketStream:ct,TransportParseStream:d,ElementaryStream:lt,TimestampRolloverStream:he,CaptionStream:eu.CaptionStream,Cea608Stream:eu.Cea608Stream,MetadataStream:se};for(at in o)o.hasOwnProperty(at)&&(hi[at]=o[at]);var c=hi,ce=h.ONE_SECOND_IN_TS,vt,cu=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];vt=function(n){var t,i=0;vt.prototype.init.call(this);this.push=function(r){var u=0,h,c,f,e,o,s;if(n||(i=0),r.type==="audio")for(t?(e=t,t=new Uint8Array(e.byteLength+r.data.byteLength),t.set(e),t.set(r.data,e.byteLength)):t=r.data;u+5<t.length;){if(t[u]!==255||(t[u+1]&246)!=240){u++;continue}if(c=(~t[u+1]&1)*2,h=(t[u+3]&3)<<11|t[u+4]<<3|(t[u+5]&224)>>5,o=((t[u+6]&3)+1)*1024,s=o*ce/cu[(t[u+2]&60)>>>2],f=u+h,t.byteLength<f)return;if(this.trigger("data",{pts:r.pts+i*s,dts:r.dts+i*s,sampleCount:o,audioobjecttype:(t[u+2]>>>6&3)+1,channelcount:(t[u+2]&1)<<2|(t[u+3]&192)>>>6,samplerate:cu[(t[u+2]&60)>>>2],samplingfrequencyindex:(t[u+2]&60)>>>2,samplesize:16,data:t.subarray(u+7+c,f)}),i++,t.byteLength===f){t=undefined;return}t=t.subarray(f)}};this.flush=function(){i=0;this.trigger("done")};this.reset=function(){t=void 0;this.trigger("reset")};this.endTimeline=function(){t=void 0;this.trigger("endedtimeline")}};vt.prototype=new f;ci=vt;lu=function(n){var i=n.byteLength,r=0,t=0;this.length=function(){return 8*i};this.bitsAvailable=function(){return 8*i+t};this.loadWord=function(){var f=n.byteLength-i,e=new Uint8Array(4),u=Math.min(4,i);if(u===0)throw new Error("no bytes available");e.set(n.subarray(f,f+u));r=new DataView(e.buffer).getUint32(0);t=u*8;i-=u};this.skipBits=function(n){var u;t>n?(r<<=n,t-=n):(n-=t,u=Math.floor(n/8),n-=u*8,i-=u,this.loadWord(),r<<=n,t-=n)};this.readBits=function(n){var u=Math.min(t,n),f=r>>>32-u;return(t-=u,t>0?r<<=u:i>0&&this.loadWord(),u=n-u,u>0)?f<<u|this.readBits(u):f};this.skipLeadingZeros=function(){for(var n=0;n<t;++n)if((r&2147483648>>>n)!=0)return r<<=n,t-=n,n;return this.loadWord(),n+this.skipLeadingZeros()};this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())};this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())};this.readUnsignedExpGolomb=function(){var n=this.skipLeadingZeros();return this.readBits(n+1)-1};this.readExpGolomb=function(){var n=this.readUnsignedExpGolomb();return 1&n?1+n>>>1:-1*(n>>>1)};this.readBoolean=function(){return this.readBits(1)===1};this.readUnsignedByte=function(){return this.readBits(8)};this.loadWord()};au=lu;g=function(){var i=0,t,n;g.prototype.init.call(this);this.push=function(r){var u,f;for(n?(u=new Uint8Array(n.byteLength+r.data.byteLength),u.set(n),u.set(r.data,n.byteLength),n=u):n=r.data,f=n.byteLength;i<f-3;i++)if(n[i+2]===1){t=i+5;break}while(t<f)switch(n[t]){case 0:if(n[t-1]!==0){t+=2;break}else if(n[t-2]!==0){t++;break}i+3!==t-2&&this.trigger("data",n.subarray(i+3,t-2));do t++;while(n[t]!==1&&t<f);i=t-2;t+=3;break;case 1:if(n[t-1]!==0||n[t-2]!==0){t+=3;break}this.trigger("data",n.subarray(i+3,t-2));i=t-2;t+=3;break;default:t+=3}n=n.subarray(i);t-=i;i=0};this.reset=function(){n=null;i=0;this.trigger("reset")};this.flush=function(){n&&n.byteLength>3&&this.trigger("data",n.subarray(i+3));n=null;i=0;this.trigger("done")};this.endTimeline=function(){this.flush();this.trigger("endedtimeline")}};g.prototype=new f;vu={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0};yt=function(){var n=new g,t,u,f,e,i,o,r;yt.prototype.init.call(this);t=this;this.push=function(t){t.type==="video"&&(u=t.trackId,f=t.pts,e=t.dts,n.push(t))};n.on("data",function(n){var r={trackId:u,pts:f,dts:e,data:n};switch(n[0]&31){case 5:r.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:r.nalUnitType="sei_rbsp";r.escapedRBSP=i(n.subarray(1));break;case 7:r.nalUnitType="seq_parameter_set_rbsp";r.escapedRBSP=i(n.subarray(1));r.config=o(r.escapedRBSP);break;case 8:r.nalUnitType="pic_parameter_set_rbsp";break;case 9:r.nalUnitType="access_unit_delimiter_rbsp"}t.trigger("data",r)});n.on("done",function(){t.trigger("done")});n.on("partialdone",function(){t.trigger("partialdone")});n.on("reset",function(){t.trigger("reset")});n.on("endedtimeline",function(){t.trigger("endedtimeline")});this.flush=function(){n.flush()};this.partialFlush=function(){n.partialFlush()};this.reset=function(){n.reset()};this.endTimeline=function(){n.endTimeline()};r=function(n,t){for(var r=8,i=8,f,u=0;u<n;u++)i!==0&&(f=t.readExpGolomb(),i=(r+f+256)%256),r=i===0?r:i};i=function(n){for(var e=n.byteLength,i=[],t=1,u,f,r;t<e-2;)n[t]===0&&n[t+1]===0&&n[t+2]===3?(i.push(t+2),t+=2):t++;if(i.length===0)return n;for(u=e-i.length,f=new Uint8Array(u),r=0,t=0;t<u;r++,t++)r===i[0]&&(r++,i.shift()),f[t]=n[r];return f};o=function(n){var h=0,c=0,l=0,a=0,v=1,t,f,y,p,e,o,w,b,k,s,d,i,g,u;if(t=new au(n),f=t.readUnsignedByte(),p=t.readUnsignedByte(),y=t.readUnsignedByte(),t.skipUnsignedExpGolomb(),vu[f]&&(e=t.readUnsignedExpGolomb(),e===3&&t.skipBits(1),t.skipUnsignedExpGolomb(),t.skipUnsignedExpGolomb(),t.skipBits(1),t.readBoolean()))for(d=e!==3?8:12,u=0;u<d;u++)t.readBoolean()&&(u<6?r(16,t):r(64,t));if(t.skipUnsignedExpGolomb(),o=t.readUnsignedExpGolomb(),o===0)t.readUnsignedExpGolomb();else if(o===1)for(t.skipBits(1),t.skipExpGolomb(),t.skipExpGolomb(),w=t.readUnsignedExpGolomb(),u=0;u<w;u++)t.skipExpGolomb();if(t.skipUnsignedExpGolomb(),t.skipBits(1),b=t.readUnsignedExpGolomb(),k=t.readUnsignedExpGolomb(),s=t.readBits(1),s===0&&t.skipBits(1),t.skipBits(1),t.readBoolean()&&(h=t.readUnsignedExpGolomb(),c=t.readUnsignedExpGolomb(),l=t.readUnsignedExpGolomb(),a=t.readUnsignedExpGolomb()),t.readBoolean()&&t.readBoolean()){g=t.readUnsignedByte();switch(g){case 1:i=[1,1];break;case 2:i=[12,11];break;case 3:i=[10,11];break;case 4:i=[16,11];break;case 5:i=[40,33];break;case 6:i=[24,11];break;case 7:i=[20,11];break;case 8:i=[32,11];break;case 9:i=[80,33];break;case 10:i=[18,11];break;case 11:i=[15,11];break;case 12:i=[64,33];break;case 13:i=[160,99];break;case 14:i=[4,3];break;case 15:i=[3,2];break;case 16:i=[2,1];break;case 255:i=[t.readUnsignedByte()<<8|t.readUnsignedByte(),t.readUnsignedByte()<<8|t.readUnsignedByte()]}i&&(v=i[0]/i[1])}return{profileIdc:f,levelIdc:y,profileCompatibility:p,width:Math.ceil(((b+1)*16-h*2-c*2)*v),height:(2-s)*(k+1)*16-l*2-a*2,sarRatio:i}}};yt.prototype=new f;var le={H264Stream:yt,NalByteStream:g},ae=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],ve=function(n){return n[0]==="I".charCodeAt(0)&&n[1]==="D".charCodeAt(0)&&n[2]==="3".charCodeAt(0)?!0:!1},yu=function(n){return n[0]<<21|n[1]<<14|n[2]<<7|n[3]},ye=function(n,t,i){for(var u="",r=t;r<i;r++)u+="%"+("00"+n[r].toString(16)).slice(-2);return u},pe=function(n,t,i){return unescape(ye(n,t,i))},we=function(n,t){var i=n[t+6]<<21|n[t+7]<<14|n[t+8]<<7|n[t+9],r=n[t+5],u=(r&16)>>4;return u?i+20:i+10},be=function(n,t){var i=(n[t+5]&224)>>5,r=n[t+4]<<3,u=n[t+3]&6144;return u|r|i},ke=function(n,t){return n[t]==="I".charCodeAt(0)&&n[t+1]==="D".charCodeAt(0)&&n[t+2]==="3".charCodeAt(0)?"timed-metadata":n[t]&!0&&(n[t+1]&240)==240?"audio":null},de=function(n){for(var t=0;t+5<n.length;){if(n[t]!==255||(n[t+1]&246)!=240){t++;continue}return ae[(n[t+2]&60)>>>2]}return null},ge=function(n){var t,f,u,o,r,s,i,e;t=10;n[5]&64&&(t+=4,t+=yu(n.subarray(10,14)));do{if(f=yu(n.subarray(t+4,t+8)),f<1)return null;if(o=String.fromCharCode(n[t],n[t+1],n[t+2],n[t+3]),o==="PRIV")for(u=n.subarray(t+10,t+f+10),r=0;r<u.byteLength;r++)if(u[r]===0){if(s=pe(u,0,r),s==="com.apple.streaming.transportStreamTimestamp")return i=u.subarray(r+1),e=(i[3]&1)<<30|i[4]<<22|i[5]<<14|i[6]<<6|i[7]>>>2,e*=4,e+(i[7]&3);break}t+=10;t+=f}while(t<n.byteLength);return null},li={isLikelyAacData:ve,parseId3TagSize:we,parseAdtsSize:be,parseType:ke,parseSampleRate:de,parseAacTimestamp:ge},pt;pt=function(){var n=new Uint8Array,t=0;pt.prototype.init.call(this);this.setTimestamp=function(n){t=n};this.push=function(i){var u=0,r=0,e,o,s,f;for(n.length?(f=n.length,n=new Uint8Array(i.byteLength+f),n.set(n.subarray(0,f)),n.set(i,f)):n=i;n.length-r>=3;){if(n[r]==="I".charCodeAt(0)&&n[r+1]==="D".charCodeAt(0)&&n[r+2]==="3".charCodeAt(0)){if(n.length-r<10)break;if(u=li.parseId3TagSize(n,r),r+u>n.length)break;o={type:"timed-metadata",data:n.subarray(r,r+u)};this.trigger("data",o);r+=u;continue}else if((n[r]&255)==255&&(n[r+1]&240)==240){if(n.length-r<7)break;if(u=li.parseAdtsSize(n,r),r+u>n.length)break;s={type:"audio",data:n.subarray(r,r+u),pts:t,dts:t};this.trigger("data",s);r+=u;continue}r++}e=n.length-r;n=e>0?n.subarray(r):new Uint8Array};this.reset=function(){n=new Uint8Array;this.trigger("reset")};this.endTimeline=function(){n=new Uint8Array;this.trigger("endedtimeline")}};pt.prototype=new f;var no=pt,to=le.H264Stream,io=li.isLikelyAacData,ro=h.ONE_SECOND_IN_TS,ai=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],vi=["width","height","profileIdc","levelIdc","profileCompatibility","sarRatio"],nt,w,wt,y,pu=function(n,t){var i;if(n.length!==t.length)return!1;for(i=0;i<n.length;i++)if(n[i]!==t[i])return!1;return!0},wu=function(n,t,i,r,u,f){var e=i-t,o=r-t,s=u-i;return{start:{dts:n,pts:n+e},end:{dts:n+o,pts:n+s},prependedContentDuration:f,baseMediaDecodeTime:n}};w=function(n,t){var i=[],r=0,u=0,f=0,e=Infinity;t=t||{};w.prototype.init.call(this);this.push=function(t){s.collectDtsInfo(n,t);n&&ai.forEach(function(i){n[i]=t[i]});i.push(t)};this.setEarliestDts=function(t){u=t-n.timelineStartInfo.baseMediaDecodeTime};this.setVideoBaseMediaDecodeTime=function(n){e=n};this.setAudioAppendStart=function(n){f=n};this.flush=function(){var o,h,l,c,a;if(i.length===0){this.trigger("done","AudioSegmentStream");return}o=rt.trimAdtsFramesByEarliestDts(i,n,u);n.baseMediaDecodeTime=s.calculateTrackBaseMediaDecodeTime(n,t.keepOriginalTimestamps);rt.prefixWithSilence(n,o,f,e);n.samples=rt.generateSampleTable(o);l=b.mdat(rt.concatenateFrameData(o));i=[];h=b.moof(r,[n]);c=new Uint8Array(h.byteLength+l.byteLength);r++;c.set(h);c.set(l,h.byteLength);s.clearDtsInfo(n);a=Math.ceil(ro*1024/n.samplerate);o.length&&this.trigger("timingInfo",{start:o[0].dts,end:o[0].dts+o.length*a});this.trigger("data",{track:n,boxes:c});this.trigger("done","AudioSegmentStream")};this.reset=function(){s.clearDtsInfo(n);i=[];this.trigger("reset")}};w.prototype=new f;nt=function(n,t){var e=0,i=[],r=[],u,f;t=t||{};nt.prototype.init.call(this);delete n.minPTS;this.gopCache_=[];this.push=function(t){s.collectDtsInfo(n,t);t.nalUnitType!=="seq_parameter_set_rbsp"||u||(u=t.config,n.sps=[t.data],vi.forEach(function(t){n[t]=u[t]},this));t.nalUnitType!=="pic_parameter_set_rbsp"||f||(f=t.data,n.pps=[t.data]);i.push(t)};this.flush=function(){for(var y,f,u,h,l,c,p=0,a,o,v;i.length;){if(i[0].nalUnitType==="access_unit_delimiter_rbsp")break;i.shift()}if(i.length===0){this.resetStream_();this.trigger("done","VideoSegmentStream");return}if(y=k.groupNalsIntoFrames(i),u=k.groupFramesIntoGops(y),u[0][0].keyFrame||(f=this.getGopForFusion_(i[0],n),f?(p=f.duration,u.unshift(f),u.byteLength+=f.byteLength,u.nalCount+=f.nalCount,u.pts=f.pts,u.dts=f.dts,u.duration+=f.duration):u=k.extendFirstKeyFrame(u)),r.length){if(v=t.alignGopsAtEnd?this.alignGopsAtEnd_(u):this.alignGopsAtStart_(u),!v){this.gopCache_.unshift({gop:u.pop(),pps:n.pps,sps:n.sps});this.gopCache_.length=Math.min(6,this.gopCache_.length);i=[];this.resetStream_();this.trigger("done","VideoSegmentStream");return}s.clearDtsInfo(n);u=v}s.collectDtsInfo(n,u);n.samples=k.generateSampleTable(u);l=b.mdat(k.concatenateNalData(u));n.baseMediaDecodeTime=s.calculateTrackBaseMediaDecodeTime(n,t.keepOriginalTimestamps);this.trigger("processedGopsInfo",u.map(function(n){return{pts:n.pts,dts:n.dts,byteLength:n.byteLength}}));a=u[0];o=u[u.length-1];this.trigger("segmentTimingInfo",wu(n.baseMediaDecodeTime,a.dts,a.pts,o.dts+o.duration,o.pts+o.duration,p));this.trigger("timingInfo",{start:u[0].dts,end:u[u.length-1].dts+u[u.length-1].duration});this.gopCache_.unshift({gop:u.pop(),pps:n.pps,sps:n.sps});this.gopCache_.length=Math.min(6,this.gopCache_.length);i=[];this.trigger("baseMediaDecodeTime",n.baseMediaDecodeTime);this.trigger("timelineStartInfo",n.timelineStartInfo);h=b.moof(e,[n]);c=new Uint8Array(h.byteLength+l.byteLength);e++;c.set(h);c.set(l,h.byteLength);this.trigger("data",{track:n,boxes:c});this.resetStream_();this.trigger("done","VideoSegmentStream")};this.reset=function(){this.resetStream_();i=[];this.gopCache_.length=0;r.length=0;this.trigger("reset")};this.resetStream_=function(){s.clearDtsInfo(n);u=undefined;f=undefined};this.getGopForFusion_=function(t){for(var o=Infinity,i,u,f,r,e=0;e<this.gopCache_.length;e++)(r=this.gopCache_[e],f=r.gop,n.pps&&pu(n.pps[0],r.pps[0])&&n.sps&&pu(n.sps[0],r.sps[0]))&&(f.dts<n.timelineStartInfo.dts||(i=t.dts-f.dts-f.duration,i>=-1e4&&i<=45e3&&(!u||o>i)&&(u=r,o=i)));return u?u.gop:null};this.alignGopsAtStart_=function(n){var f,i,e,u,o,s,h,t;for(o=n.byteLength,s=n.nalCount,h=n.duration,f=i=0;f<r.length&&i<n.length;){if(e=r[f],u=n[i],e.pts===u.pts)break;if(u.pts>e.pts){f++;continue}i++;o-=u.byteLength;s-=u.nalCount;h-=u.duration}return i===0?n:i===n.length?null:(t=n.slice(i),t.byteLength=o,t.duration=h,t.nalCount=s,t.pts=t[0].pts,t.dts=t[0].dts,t)};this.alignGopsAtEnd_=function(n){var u,i,s,h,f,e,c,t,o;for(u=r.length-1,i=n.length-1,f=null,e=!1;u>=0&&i>=0;){if(s=r[u],h=n[i],s.pts===h.pts){e=!0;break}if(s.pts>h.pts){u--;continue}u===r.length-1&&(f=i);i--}return!e&&f===null?null:(c=e?i:f,c===0)?n:(t=n.slice(c),o=t.reduce(function(n,t){return n.byteLength+=t.byteLength,n.duration+=t.duration,n.nalCount+=t.nalCount,n},{byteLength:0,duration:0,nalCount:0}),t.byteLength=o.byteLength,t.duration=o.duration,t.nalCount=o.nalCount,t.pts=t[0].pts,t.dts=t[0].dts,t)};this.alignGopsWith=function(n){r=n}};nt.prototype=new f;y=function(n,t){this.numberOfTracks=0;this.metadataStream=t;n=n||{};this.remuxTracks=typeof n.remux!="undefined"?!!n.remux:!0;this.keepOriginalTimestamps=typeof n.keepOriginalTimestamps=="boolean"?n.keepOriginalTimestamps:!1;this.pendingTracks=[];this.videoTrack=null;this.pendingBoxes=[];this.pendingCaptions=[];this.pendingMetadata=[];this.pendingBytes=0;this.emittedTracks=0;y.prototype.init.call(this);this.push=function(n){if(n.text)return this.pendingCaptions.push(n);if(n.frames)return this.pendingMetadata.push(n);this.pendingTracks.push(n.track);this.pendingBytes+=n.boxes.byteLength;n.track.type==="video"&&(this.videoTrack=n.track,this.pendingBoxes.push(n.boxes));n.track.type==="audio"&&(this.audioTrack=n.track,this.pendingBoxes.unshift(n.boxes))}};y.prototype=new f;y.prototype.flush=function(n){var o=0,i={captions:[],captionStreams:{},metadata:[],info:{}},r,u,e,f=0,t;if(this.pendingTracks.length<this.numberOfTracks){if(n!=="VideoSegmentStream"&&n!=="AudioSegmentStream")return;if(this.remuxTracks)return;if(this.pendingTracks.length===0){this.emittedTracks++;this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0);return}}if(this.videoTrack?(f=this.videoTrack.timelineStartInfo.pts,vi.forEach(function(n){i.info[n]=this.videoTrack[n]},this)):this.audioTrack&&(f=this.audioTrack.timelineStartInfo.pts,ai.forEach(function(n){i.info[n]=this.audioTrack[n]},this)),this.videoTrack||this.audioTrack){for(i.type=this.pendingTracks.length===1?this.pendingTracks[0].type:"combined",this.emittedTracks+=this.pendingTracks.length,e=b.initSegment(this.pendingTracks),i.initSegment=new Uint8Array(e.byteLength),i.initSegment.set(e),i.data=new Uint8Array(this.pendingBytes),t=0;t<this.pendingBoxes.length;t++)i.data.set(this.pendingBoxes[t],o),o+=this.pendingBoxes[t].byteLength;for(t=0;t<this.pendingCaptions.length;t++)r=this.pendingCaptions[t],r.startTime=h.metadataTsToSeconds(r.startPts,f,this.keepOriginalTimestamps),r.endTime=h.metadataTsToSeconds(r.endPts,f,this.keepOriginalTimestamps),i.captionStreams[r.stream]=!0,i.captions.push(r);for(t=0;t<this.pendingMetadata.length;t++)u=this.pendingMetadata[t],u.cueTime=h.metadataTsToSeconds(u.pts,f,this.keepOriginalTimestamps),i.metadata.push(u);for(i.metadata.dispatchType=this.metadataStream.dispatchType,this.pendingTracks.length=0,this.videoTrack=null,this.pendingBoxes.length=0,this.pendingCaptions.length=0,this.pendingBytes=0,this.pendingMetadata.length=0,this.trigger("data",i),t=0;t<i.captions.length;t++)r=i.captions[t],this.trigger("caption",r);for(t=0;t<i.metadata.length;t++)u=i.metadata[t],this.trigger("id3Frame",u)}this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)};y.prototype.setRemux=function(n){this.remuxTracks=n};wt=function(n){var i=this,u=!0,r,t;wt.prototype.init.call(this);n=n||{};this.baseMediaDecodeTime=n.baseMediaDecodeTime||0;this.transmuxPipeline_={};this.setupAacPipeline=function(){var u={};this.transmuxPipeline_=u;u.type="aac";u.metadataStream=new c.MetadataStream;u.aacStream=new no;u.audioTimestampRolloverStream=new c.TimestampRolloverStream("audio");u.timedMetadataTimestampRolloverStream=new c.TimestampRolloverStream("timed-metadata");u.adtsStream=new ci;u.coalesceStream=new y(n,u.metadataStream);u.headOfPipeline=u.aacStream;u.aacStream.pipe(u.audioTimestampRolloverStream).pipe(u.adtsStream);u.aacStream.pipe(u.timedMetadataTimestampRolloverStream).pipe(u.metadataStream).pipe(u.coalesceStream);u.metadataStream.on("timestamp",function(n){u.aacStream.setTimestamp(n.timeStamp)});u.aacStream.on("data",function(f){if(f.type==="timed-metadata"&&!u.audioSegmentStream){t=t||{timelineStartInfo:{baseMediaDecodeTime:i.baseMediaDecodeTime},codec:"adts",type:"audio"};u.coalesceStream.numberOfTracks++;u.audioSegmentStream=new w(t,n);u.audioSegmentStream.on("timingInfo",i.trigger.bind(i,"audioTimingInfo"));u.adtsStream.pipe(u.audioSegmentStream).pipe(u.coalesceStream)}i.trigger("trackinfo",{hasAudio:!!t,hasVideo:!!r})});u.coalesceStream.on("data",this.trigger.bind(this,"data"));u.coalesceStream.on("done",this.trigger.bind(this,"done"))};this.setupTsPipeline=function(){var u={};this.transmuxPipeline_=u;u.type="ts";u.metadataStream=new c.MetadataStream;u.packetStream=new c.TransportPacketStream;u.parseStream=new c.TransportParseStream;u.elementaryStream=new c.ElementaryStream;u.timestampRolloverStream=new c.TimestampRolloverStream;u.adtsStream=new ci;u.h264Stream=new to;u.captionStream=new c.CaptionStream;u.coalesceStream=new y(n,u.metadataStream);u.headOfPipeline=u.packetStream;u.packetStream.pipe(u.parseStream).pipe(u.elementaryStream).pipe(u.timestampRolloverStream);u.timestampRolloverStream.pipe(u.h264Stream);u.timestampRolloverStream.pipe(u.adtsStream);u.timestampRolloverStream.pipe(u.metadataStream).pipe(u.coalesceStream);u.h264Stream.pipe(u.captionStream).pipe(u.coalesceStream);u.elementaryStream.on("data",function(f){var e;if(f.type==="metadata"){for(e=f.tracks.length;e--;)r||f.tracks[e].type!=="video"?t||f.tracks[e].type!=="audio"||(t=f.tracks[e],t.timelineStartInfo.baseMediaDecodeTime=i.baseMediaDecodeTime):(r=f.tracks[e],r.timelineStartInfo.baseMediaDecodeTime=i.baseMediaDecodeTime);if(r&&!u.videoSegmentStream){u.coalesceStream.numberOfTracks++;u.videoSegmentStream=new nt(r,n);u.videoSegmentStream.on("timelineStartInfo",function(n){t&&(t.timelineStartInfo=n,u.audioSegmentStream.setEarliestDts(n.dts))});u.videoSegmentStream.on("processedGopsInfo",i.trigger.bind(i,"gopInfo"));u.videoSegmentStream.on("segmentTimingInfo",i.trigger.bind(i,"videoSegmentTimingInfo"));u.videoSegmentStream.on("baseMediaDecodeTime",function(n){t&&u.audioSegmentStream.setVideoBaseMediaDecodeTime(n)});u.videoSegmentStream.on("timingInfo",i.trigger.bind(i,"videoTimingInfo"));u.h264Stream.pipe(u.videoSegmentStream).pipe(u.coalesceStream)}if(t&&!u.audioSegmentStream){u.coalesceStream.numberOfTracks++;u.audioSegmentStream=new w(t,n);u.audioSegmentStream.on("timingInfo",i.trigger.bind(i,"audioTimingInfo"));u.adtsStream.pipe(u.audioSegmentStream).pipe(u.coalesceStream)}i.trigger("trackinfo",{hasAudio:!!t,hasVideo:!!r})}});u.coalesceStream.on("data",this.trigger.bind(this,"data"));u.coalesceStream.on("id3Frame",function(n){n.dispatchType=u.metadataStream.dispatchType;i.trigger("id3Frame",n)});u.coalesceStream.on("caption",this.trigger.bind(this,"caption"));u.coalesceStream.on("done",this.trigger.bind(this,"done"))};this.setBaseMediaDecodeTime=function(i){var u=this.transmuxPipeline_;n.keepOriginalTimestamps||(this.baseMediaDecodeTime=i);t&&(t.timelineStartInfo.dts=undefined,t.timelineStartInfo.pts=undefined,s.clearDtsInfo(t),n.keepOriginalTimestamps||(t.timelineStartInfo.baseMediaDecodeTime=i),u.audioTimestampRolloverStream&&u.audioTimestampRolloverStream.discontinuity());r&&(u.videoSegmentStream&&(u.videoSegmentStream.gopCache_=[]),r.timelineStartInfo.dts=undefined,r.timelineStartInfo.pts=undefined,s.clearDtsInfo(r),u.captionStream.reset(),n.keepOriginalTimestamps||(r.timelineStartInfo.baseMediaDecodeTime=i));u.timestampRolloverStream&&u.timestampRolloverStream.discontinuity()};this.setAudioAppendStart=function(n){t&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(n)};this.setRemux=function(t){var i=this.transmuxPipeline_;n.remux=t;i&&i.coalesceStream&&i.coalesceStream.setRemux(t)};this.alignGopsWith=function(n){r&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(n)};this.push=function(n){if(u){var t=io(n);t&&this.transmuxPipeline_.type!=="aac"?this.setupAacPipeline():t||this.transmuxPipeline_.type==="ts"||this.setupTsPipeline();u=!1}this.transmuxPipeline_.headOfPipeline.push(n)};this.flush=function(){u=!0;this.transmuxPipeline_.headOfPipeline.flush()};this.endTimeline=function(){this.transmuxPipeline_.headOfPipeline.endTimeline()};this.reset=function(){this.transmuxPipeline_.headOfPipeline&&this.transmuxPipeline_.headOfPipeline.reset()};this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}};wt.prototype=new f;var uo={Transmuxer:wt,VideoSegmentStream:nt,AudioSegmentStream:w,AUDIO_PROPERTIES:ai,VIDEO_PROPERTIES:vi,generateVideoSegmentTimingInfo:wu},fo=function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");},eo=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),oo=function(n,t){t.on("data",function(t){var r=t.initSegment,i;t.initSegment={data:r.buffer,byteOffset:r.byteOffset,byteLength:r.byteLength};i=t.data;t.data=i.buffer;n.postMessage({action:"data",segment:t,byteOffset:i.byteOffset,byteLength:i.byteLength},[t.data])});if(t.captionStream)t.captionStream.on("data",function(t){n.postMessage({action:"caption",data:t})});t.on("done",function(){n.postMessage({action:"done"})});t.on("gopInfo",function(t){n.postMessage({action:"gopInfo",gopInfo:t})});t.on("videoSegmentTimingInfo",function(t){n.postMessage({action:"videoSegmentTimingInfo",videoSegmentTimingInfo:t})})},bu=function(){function n(t,i){fo(this,n);this.options=i||{};this.self=t;this.init()}return eo(n,[{key:"init",value:function(){this.transmuxer&&this.transmuxer.dispose();this.transmuxer=new uo.Transmuxer(this.options);oo(this.self,this.transmuxer)}},{key:"push",value:function(n){var t=new Uint8Array(n.data,n.byteOffset,n.byteLength);this.transmuxer.push(t)}},{key:"reset",value:function(){this.init()}},{key:"setTimestampOffset",value:function(n){var t=n.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(t*9e4))}},{key:"setAudioAppendStart",value:function(n){this.transmuxer.setAudioAppendStart(Math.ceil(n.appendStart*9e4))}},{key:"flush",value:function(){this.transmuxer.flush()}},{key:"resetCaptions",value:function(){this.transmuxer.resetCaptions()}},{key:"alignGopsWith",value:function(n){this.transmuxer.alignGopsWith(n.gopsToAlignWith.slice())}}]),n}(),so=function(n){n.onmessage=function(t){if(t.data.action==="init"&&t.data.options){this.messageHandlers=new bu(n,t.data.options);return}this.messageHandlers||(this.messageHandlers=new bu(n));t.data&&t.data.action&&t.data.action!=="init"&&this.messageHandlers[t.data.action]&&this.messageHandlers[t.data.action](t.data)}};return new so(n)}()}),ttt={videoCodec:"avc1",videoObjectTypeIndicator:".4d400d",audioProfile:"2"},itt=function(n){return n.map(function(n){return n.replace(/avc1\.(\d+)\.(\d+)/i,function(n,t,i){var r=("00"+Number(t).toString(16)).slice(-2),u=("00"+Number(i).toString(16)).slice(-2);return"avc1."+r+"00"+u})})},he=function(){var i=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"",n={codecCount:0},t=void 0;return n.codecCount=i.split(",").length,n.codecCount=n.codecCount||2,t=/(^|\s|,)+(avc[13])([^ ,]*)/i.exec(i),t&&(n.videoCodec=t[2],n.videoObjectTypeIndicator=t[3]),n.audioProfile=/(^|\s|,)+mp4a.[0-9A-Fa-f]+\.([0-9A-Fa-f]+)/i.exec(i),n.audioProfile=n.audioProfile&&n.audioProfile[2],n},lat=function(n){return n.replace(/avc1\.(\d+)\.(\d+)/i,function(n){return itt([n])[0]})},bv=function(n,t,i){return n+"/"+t+'; codecs="'+i.filter(function(n){return!!n}).join(", ")+'"'},aat=function(n){return n.segments&&n.segments.length&&n.segments[0].map?"mp4":"mp2t"},vat=function(n){var t=n.attributes||{};return t.CODECS?he(t.CODECS):ttt},yat=function(n,t){var i,u,r;if(!n.mediaGroups.AUDIO||!t||(i=n.mediaGroups.AUDIO[t],!i))return null;for(u in i)if(r=i[u],r["default"]&&r.playlists)return he(r.playlists[0].attributes.CODECS).audioProfile;return null},pat=function(n,t){var s=aat(t),u=vat(t),h=t.attributes||{},f=!0,c=!1,e,l,r;if(!t)return[];if(n.mediaGroups.AUDIO&&h.AUDIO&&(e=n.mediaGroups.AUDIO[h.AUDIO],e)){c=!0;f=!1;for(l in e)if(!e[l].uri&&!e[l].playlists){f=!0;break}}c&&!u.audioProfile&&(f||(u.audioProfile=yat(n,h.AUDIO)),u.audioProfile||(i.log.warn("Multiple audio tracks present but no audio codec string is specified. Attempting to use the default audio codec (mp4a.40.2)"),u.audioProfile=ttt.audioProfile));r={};u.videoCodec&&(r.video=""+u.videoCodec+u.videoObjectTypeIndicator);u.audioProfile&&(r.audio="mp4a.40."+u.audioProfile);var o=bv("audio",s,[r.audio]),v=bv("video",s,[r.video]),a=bv("video",s,[r.video,r.audio]);return c?!f&&r.video?[v,o]:!f&&!r.video?[o,o]:[a,o]:r.video?[a]:[o]},rtt=function(n){var t={type:"",parameters:{}},i=n.trim().split(";");return t.type=i.shift().trim(),i.forEach(function(n){var i=n.trim().split("="),r,u;i.length>1&&(r=i[0].replace(/"/g,"").trim(),u=i[1].replace(/"/g,"").trim(),t.parameters[r]=u)}),t},kv=function(n){return/mp4a\.\d+.\d+/i.test(n)},dv=function(n){return/avc1\.[\da-f]+/i.test(n)},wat=function(n,t,i){if(typeof t=="undefined"||t===null||!n.length)return[];for(var u=Math.ceil((t-i+3)*9e4),r=void 0,r=0;r<n.length;r++)if(n[r].pts>u)break;return n.slice(r)},bat=function(n,t,i){if(!t.length)return n;if(i)return t.slice();var u=t[0].pts,r=0;for(r;r<n.length;r++)if(n[r].pts>=u)break;return n.slice(0,r).concat(t)},kat=function(n,t,i,r){for(var o=Math.ceil((t-r)*9e4),s=Math.ceil((i-r)*9e4),e=n.slice(),f=n.length,u;f--;)if(n[f].pts<=s)break;if(f===-1)return e;for(u=f+1;u--;)if(n[u].pts<=o)break;return u=Math.max(u,0),e.splice(u,f-u+1),e},dat=function(n,t,r){var e=null,o=null,s=0,f=[],l=[];if(!n&&!t)return i.createTimeRange();if(!n)return t.buffered;if(!t||r)return n.buffered;if(n.buffered.length===0&&t.buffered.length===0)return i.createTimeRange();for(var h=n.buffered,c=t.buffered,u=h.length;u--;)f.push({time:h.start(u),type:"start"}),f.push({time:h.end(u),type:"end"});for(u=c.length;u--;)f.push({time:c.start(u),type:"start"}),f.push({time:c.end(u),type:"end"});for(f.sort(function(n,t){return n.time-t.time}),u=0;u<f.length;u++)f[u].type==="start"?(s++,s===2&&(e=f[u].time)):f[u].type==="end"&&(s--,s===1&&(o=f[u].time)),e!==null&&o!==null&&(l.push([e,o]),e=null,o=null);return i.createTimeRanges(l)},rf=9e4,gat=function(n,t){var i=n.addSourceBuffer(t),r=Object.create(null),u,f;r.updating=!1;r.realBuffer_=i;u=function(n){typeof i[n]=="function"?r[n]=function(){return i[n].apply(i,arguments)}:typeof r[n]=="undefined"&&Object.defineProperty(r,n,{get:function(){return i[n]},set:function(t){return i[n]=t}})};for(f in i)u(f);return r},nvt=function(n){function t(n,r){var u,f;return ii(this,t),u=oi(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,i.EventTarget)),u.timestampOffset_=0,u.pendingBuffers_=[],u.bufferUpdating_=!1,u.mediaSource_=n,u.codecs_=r,u.audioCodec_=null,u.videoCodec_=null,u.audioDisabled_=!1,u.appendAudioInitSegment_=!0,u.gopBuffer_=[],u.timeMapping_=0,u.safeAppend_=i.browser.IE_VERSION>=11,f={remux:!1,alignGopsAtEnd:u.safeAppend_},u.codecs_.forEach(function(n){kv(n)?u.audioCodec_=n:dv(n)&&(u.videoCodec_=n)}),u.transmuxer_=new cat,u.transmuxer_.postMessage({action:"init",options:f}),u.transmuxer_.onmessage=function(n){return n.data.action==="data"?u.data_(n):n.data.action==="done"?u.done_(n):n.data.action==="gopInfo"?u.appendGopInfo_(n):n.data.action==="videoSegmentTimingInfo"?u.videoSegmentTimingInfo_(n.data.videoSegmentTimingInfo):void 0},Object.defineProperty(u,"timestampOffset",{get:function(){return this.timestampOffset_},set:function(n){typeof n=="number"&&n>=0&&(this.timestampOffset_=n,this.appendAudioInitSegment_=!0,this.gopBuffer_.length=0,this.timeMapping_=0,this.transmuxer_.postMessage({action:"setTimestampOffset",timestampOffset:n}))}}),Object.defineProperty(u,"appendWindowStart",{get:function(){return(this.videoBuffer_||this.audioBuffer_).appendWindowStart},set:function(n){this.videoBuffer_&&(this.videoBuffer_.appendWindowStart=n);this.audioBuffer_&&(this.audioBuffer_.appendWindowStart=n)}}),Object.defineProperty(u,"updating",{get:function(){return!!(this.bufferUpdating_||!this.audioDisabled_&&this.audioBuffer_&&this.audioBuffer_.updating||this.videoBuffer_&&this.videoBuffer_.updating)}}),Object.defineProperty(u,"buffered",{get:function(){return dat(this.videoBuffer_,this.audioBuffer_,this.audioDisabled_)}}),u}return yi(t,n),ui(t,[{key:"data_",value:function(n){var t=n.data.segment;t.data=new Uint8Array(t.data,n.data.byteOffset,n.data.byteLength);t.initSegment=new Uint8Array(t.initSegment.data,t.initSegment.byteOffset,t.initSegment.byteLength);uat(this,this.mediaSource_,t);this.pendingBuffers_.push(t);return}},{key:"done_",value:function(){if(this.mediaSource_.readyState==="closed"){this.pendingBuffers_.length=0;return}this.processPendingSegments_();return}},{key:"videoSegmentTimingInfo_",value:function(n){var t={start:{decode:n.start.dts/rf,presentation:n.start.pts/rf},end:{decode:n.end.dts/rf,presentation:n.end.pts/rf},baseMediaDecodeTime:n.baseMediaDecodeTime/rf};n.prependedContentDuration&&(t.prependedContentDuration=n.prependedContentDuration/rf);this.trigger({type:"videoSegmentTimingInfo",videoSegmentTimingInfo:t})}},{key:"createRealSourceBuffers_",value:function(){var n=this,t=["audio","video"];t.forEach(function(i){var r,u,f;n[i+"Codec_"]&&(n[i+"Buffer_"]||(r=null,n.mediaSource_[i+"Buffer_"]?(r=n.mediaSource_[i+"Buffer_"],r.updating=!1):(u=i+"Codec_",f=i+'/mp4;codecs="'+n[u]+'"',r=gat(n.mediaSource_.nativeMediaSource_,f),n.mediaSource_[i+"Buffer_"]=r),n[i+"Buffer_"]=r,["update","updatestart","updateend"].forEach(function(u){r.addEventListener(u,function(){if(i!=="audio"||!n.audioDisabled_){u==="updateend"&&(n[i+"Buffer_"].updating=!1);var r=t.every(function(t){return t==="audio"&&n.audioDisabled_?!0:i!==t&&n[t+"Buffer_"]&&n[t+"Buffer_"].updating?!1:!0});if(r)return n.trigger(u)}})})))})}},{key:"appendBuffer",value:function(n){if(this.bufferUpdating_=!0,this.audioBuffer_&&this.audioBuffer_.buffered.length){var t=this.audioBuffer_.buffered;this.transmuxer_.postMessage({action:"setAudioAppendStart",appendStart:t.end(t.length-1)})}this.videoBuffer_&&this.transmuxer_.postMessage({action:"alignGopsWith",gopsToAlignWith:wat(this.gopBuffer_,this.mediaSource_.player_?this.mediaSource_.player_.currentTime():null,this.timeMapping_)});this.transmuxer_.postMessage({action:"push",data:n.buffer,byteOffset:n.byteOffset,byteLength:n.byteLength},[n.buffer]);this.transmuxer_.postMessage({action:"flush"})}},{key:"appendGopInfo_",value:function(n){this.gopBuffer_=bat(this.gopBuffer_,n.data.gopInfo,this.safeAppend_)}},{key:"remove",value:function(n,t){if(this.videoBuffer_&&(this.videoBuffer_.updating=!0,this.videoBuffer_.remove(n,t),this.gopBuffer_=kat(this.gopBuffer_,n,t,this.timeMapping_)),!this.audioDisabled_&&this.audioBuffer_&&(this.audioBuffer_.updating=!0,this.audioBuffer_.remove(n,t)),gu(n,t,this.metadataTrack_),this.inbandTextTracks_)for(var i in this.inbandTextTracks_)gu(n,t,this.inbandTextTracks_[i])}},{key:"processPendingSegments_",value:function(){var n={video:{segments:[],bytes:0},audio:{segments:[],bytes:0},captions:[],metadata:[]},t;if(!this.pendingBuffers_.length){this.trigger("updateend");this.bufferUpdating_=!1;return}n=this.pendingBuffers_.reduce(function(n,t){var i=t.type,r=t.data,u=t.initSegment;return n[i].segments.push(r),n[i].bytes+=r.byteLength,n[i].initSegment=u,t.captions&&(n.captions=n.captions.concat(t.captions)),t.info&&(n[i].info=t.info),t.metadata&&(n.metadata=n.metadata.concat(t.metadata)),n},n);this.videoBuffer_||this.audioBuffer_||(n.video.bytes===0&&(this.videoCodec_=null),n.audio.bytes===0&&(this.audioCodec_=null),this.createRealSourceBuffers_());n.audio.info&&this.mediaSource_.trigger({type:"audioinfo",info:n.audio.info});n.video.info&&this.mediaSource_.trigger({type:"videoinfo",info:n.video.info});this.appendAudioInitSegment_&&(!this.audioDisabled_&&this.audioBuffer_&&(n.audio.segments.unshift(n.audio.initSegment),n.audio.bytes+=n.audio.initSegment.byteLength),this.appendAudioInitSegment_=!1);t=!1;this.videoBuffer_&&n.video.bytes?(n.video.segments.unshift(n.video.initSegment),n.video.bytes+=n.video.initSegment.byteLength,this.concatAndAppendSegments_(n.video,this.videoBuffer_)):this.videoBuffer_&&(this.audioDisabled_||!this.audioBuffer_)&&(t=!0);eat(this,n.captions,n.metadata);!this.audioDisabled_&&this.audioBuffer_&&this.concatAndAppendSegments_(n.audio,this.audioBuffer_);this.pendingBuffers_.length=0;t&&this.trigger("updateend");this.bufferUpdating_=!1}},{key:"concatAndAppendSegments_",value:function(n,t){var r=0,i=void 0;if(n.bytes){i=new Uint8Array(n.bytes);n.segments.forEach(function(n){i.set(n,r);r+=n.byteLength});try{t.updating=!0;t.appendBuffer(i)}catch(u){this.mediaSource_.player_&&this.mediaSource_.player_.error({code:-3,type:"APPEND_BUFFER_ERR",message:u.message,originalError:u})}}}},{key:"abort",value:function(){this.videoBuffer_&&this.videoBuffer_.abort();!this.audioDisabled_&&this.audioBuffer_&&this.audioBuffer_.abort();this.transmuxer_&&this.transmuxer_.postMessage({action:"reset"});this.pendingBuffers_.length=0;this.bufferUpdating_=!1}}]),t}(i.EventTarget),gv=function(r){function u(){ii(this,u);var r=oi(this,(u.__proto__||Object.getPrototypeOf(u)).call(this)),f=void 0;r.nativeMediaSource_=new n.MediaSource;for(f in r.nativeMediaSource_)f in u.prototype||typeof r.nativeMediaSource_[f]!="function"||(r[f]=r.nativeMediaSource_[f].bind(r.nativeMediaSource_));r.duration_=NaN;Object.defineProperty(r,"duration",{get:function(){return this.duration_===Infinity?this.duration_:this.nativeMediaSource_.duration},set:function(n){if(this.duration_=n,n!==Infinity){this.nativeMediaSource_.duration=n;return}}});Object.defineProperty(r,"seekable",{get:function(){return this.duration_===Infinity?i.createTimeRanges([[0,this.nativeMediaSource_.duration]]):this.nativeMediaSource_.seekable}});Object.defineProperty(r,"readyState",{get:function(){return this.nativeMediaSource_.readyState}});Object.defineProperty(r,"activeSourceBuffers",{get:function(){return this.activeSourceBuffers_}});r.sourceBuffers=[];r.activeSourceBuffers_=[];r.updateActiveSourceBuffers_=function(){var n,u,t,i,f;if(r.activeSourceBuffers_.length=0,r.sourceBuffers.length===1){n=r.sourceBuffers[0];n.appendAudioInitSegment_=!0;n.audioDisabled_=!n.audioCodec_;r.activeSourceBuffers_.push(n);return}for(u=!1,t=!0,i=0;i<r.player_.audioTracks().length;i++)if(f=r.player_.audioTracks()[i],f.enabled&&f.kind!=="main"){u=!0;t=!1;break}r.sourceBuffers.forEach(function(n,i){if(n.appendAudioInitSegment_=!0,n.videoCodec_&&n.audioCodec_)n.audioDisabled_=u;else if(n.videoCodec_&&!n.audioCodec_)n.audioDisabled_=!0,t=!1;else if(!n.videoCodec_&&n.audioCodec_&&(n.audioDisabled_=i?t:!t,n.audioDisabled_))return;r.activeSourceBuffers_.push(n)})};r.onPlayerMediachange_=function(){r.sourceBuffers.forEach(function(n){n.appendAudioInitSegment_=!0})};r.onHlsReset_=function(){r.sourceBuffers.forEach(function(n){n.transmuxer_&&n.transmuxer_.postMessage({action:"resetCaptions"})})};r.onHlsSegmentTimeMapping_=function(n){r.sourceBuffers.forEach(function(t){return t.timeMapping_=n.mapping})};["sourceopen","sourceclose","sourceended"].forEach(function(n){this.nativeMediaSource_.addEventListener(n,this.trigger.bind(this))},r);r.on("sourceopen",function(){var n=t.querySelector('[src="'+r.url_+'"]');if(n&&(r.player_=i(n.parentNode),r.player_)){r.player_.tech_.on("hls-reset",r.onHlsReset_);r.player_.tech_.on("hls-segment-time-mapping",r.onHlsSegmentTimeMapping_);if(r.player_.audioTracks&&r.player_.audioTracks()){r.player_.audioTracks().on("change",r.updateActiveSourceBuffers_);r.player_.audioTracks().on("addtrack",r.updateActiveSourceBuffers_);r.player_.audioTracks().on("removetrack",r.updateActiveSourceBuffers_)}r.player_.on("mediachange",r.onPlayerMediachange_)}});r.on("sourceended",function(){for(var u=dn(r.duration),i,n,t=0;t<r.sourceBuffers.length;t++)i=r.sourceBuffers[t],n=i.metadataTrack_&&i.metadataTrack_.cues,n&&n.length&&(n[n.length-1].endTime=u)});r.on("sourceclose",function(){(this.sourceBuffers.forEach(function(n){n.transmuxer_&&n.transmuxer_.terminate()}),this.sourceBuffers.length=0,this.player_)&&(this.player_.audioTracks&&this.player_.audioTracks()&&(this.player_.audioTracks().off("change",this.updateActiveSourceBuffers_),this.player_.audioTracks().off("addtrack",this.updateActiveSourceBuffers_),this.player_.audioTracks().off("removetrack",this.updateActiveSourceBuffers_)),this.player_.el_&&this.player_.off("mediachange",this.onPlayerMediachange_),this.player_.tech_&&this.player_.tech_.el_&&(this.player_.tech_.off("hls-reset",this.onHlsReset_),this.player_.tech_.off("hls-segment-time-mapping",this.onHlsSegmentTimeMapping_)))});return r}return yi(u,r),ui(u,[{key:"addSeekableRange_",value:function(n,t){var i=void 0;if(this.duration!==Infinity){i=new Error("MediaSource.addSeekableRange() can only be invoked when the duration is Infinity");i.name="InvalidStateError";i.code=11;throw i;}(t>this.nativeMediaSource_.duration||isNaN(this.nativeMediaSource_.duration))&&(this.nativeMediaSource_.duration=t)}},{key:"addSourceBuffer",value:function(n){var i=void 0,r=rtt(n),t;return/^(video|audio)\/mp2t$/i.test(r.type)?(t=[],r.parameters&&r.parameters.codecs&&(t=r.parameters.codecs.split(","),t=itt(t),t=t.filter(function(n){return kv(n)||dv(n)})),t.length===0&&(t=["avc1.4d400d","mp4a.40.2"]),i=new nvt(this,t),this.sourceBuffers.length!==0&&(this.sourceBuffers[0].createRealSourceBuffers_(),i.createRealSourceBuffers_(),this.sourceBuffers[0].audioDisabled_=!0)):i=this.nativeMediaSource_.addSourceBuffer(n),this.sourceBuffers.push(i),i}}]),u}(i.EventTarget),utt=0;i.mediaSources={};var ftt=function(n,t){var r=i.mediaSources[n];if(r)r.trigger({type:"sourceopen",swfId:t});else throw new Error("Media Source not found (Video.js)");},ny=function(){return!!n.MediaSource&&!!n.MediaSource.isTypeSupported&&n.MediaSource.isTypeSupported('video/mp4;codecs="avc1.4d400d,mp4a.40.2"')},ce=function(){if(this.MediaSource={open:ftt,supportsNativeMediaSources:ny},ny())return new gv;throw new Error("Cannot use create a virtual MediaSource for this video");};ce.open=ftt;ce.supportsNativeMediaSources=ny;ty={createObjectURL:function(t){var r=void 0;return t instanceof gv?(r=n.URL.createObjectURL(t.nativeMediaSource_),t.url_=r,r):(t instanceof gv)?(r="blob:vjs-media-source/"+utt,utt++,i.mediaSources[r]=t,r):(r=n.URL.createObjectURL(t),t.url_=r,r)}};i.MediaSource=ce;i.URL=ty;var tvt=i.EventTarget,ett=i.mergeOptions,ott=function(n,t){for(var u=void 0,i=ett(n,{duration:t.duration,minimumUpdatePeriod:t.minimumUpdatePeriod}),f,r=0;r<t.playlists.length;r++)f=hv(i,t.playlists[r]),f?i=f:u=!0;return(uh(t,function(n,t,r,f){if(n.playlists&&n.playlists.length){var o=n.playlists[0].uri,e=hv(i,n.playlists[0]);e&&(i=e,i.mediaGroups[t][r][f].playlists[0]=i.playlists[o],u=!1)}}),u)?null:i},iy=function(n){var t=n.byterange.offset+n.byterange.length-1;return n.uri+"-"+n.byterange.offset+"-"+t},ivt=function(n,t){var i=Boolean(!n.map&&!t.map),r=i||Boolean(n.map&&t.map&&n.map.byterange.offset===t.map.byterange.offset&&n.map.byterange.length===t.map.byterange.length);return r&&n.uri===t.uri&&n.byterange.offset===t.byterange.offset&&n.byterange.length===t.byterange.length},stt=function(n,t){var u={},f,e,r,i,o;for(f in n)if(e=n[f],r=e.sidx,r){if(i=iy(r),!t[i])break;o=t[i].sidxInfo;ivt(o,r)&&(u[i]=t[i])}return u},rvt=function(n,t,i,r){var f=dd(n,{manifestUri:t,clientOffset:i}),e=stt(f.playlists,r),u=e;return uh(f,function(n){if(n.playlists&&n.playlists.length){var t=n.playlists;u=ett(u,stt(t,r))}}),u},htt=function(n,t,r,u,f){var e={uri:rh(u.handleManifestRedirects,n.resolvedUri),byterange:n.byterange,playlist:t},o=i.mergeOptions(e,{responseType:"arraybuffer",headers:av(e)});return r(o,f)},ry=function(t){function i(n,t){var u=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{},o=arguments[3];ii(this,i);var r=oi(this,(i.__proto__||Object.getPrototypeOf(i)).call(this)),f=u.withCredentials,s=f===undefined?!1:f,e=u.handleManifestRedirects,h=e===undefined?!1:e;if(r.hls_=t,r.withCredentials=s,r.handleManifestRedirects=h,!n)throw new Error("A non-empty playlist URL or playlist is required");r.on("minimumUpdatePeriod",function(){r.refreshXml_()});r.on("mediaupdatetimeout",function(){r.refreshMedia_(r.media().uri)});return(r.state="HAVE_NOTHING",r.loadedPlaylists_={},typeof n=="string")?(r.srcUrl=n,r.sidxMapping_={},oi(r)):(r.setupChildLoader(o,n),r)}return yi(i,t),ui(i,[{key:"setupChildLoader",value:function(n,t){this.masterPlaylistLoader_=n;this.childPlaylist_=t}},{key:"dispose",value:function(){this.stopRequest();this.loadedPlaylists_={};n.clearTimeout(this.minimumUpdatePeriodTimeout_);n.clearTimeout(this.mediaRequest_);n.clearTimeout(this.mediaUpdateTimeout)}},{key:"hasPendingRequest",value:function(){return this.request||this.mediaRequest_}},{key:"stopRequest",value:function(){if(this.request){var n=this.request;this.request=null;n.onreadystatechange=null;n.abort()}}},{key:"sidxRequestFinished_",value:function(n,t,i,r){var u=this;return function(f,e){if(u.request){if(u.request=null,f)return u.error={status:e.status,message:"DASH playlist request error at URL: "+n.uri,response:e.response,code:2},i&&(u.state=i),u.trigger("error"),r(t,null);var o=new Uint8Array(e.response),s=l.parseSidx(o.subarray(8));return r(t,s)}}}},{key:"media",value:function(t){var o=this,r,u,f,i,e;if(!t)return this.media_;if(this.state==="HAVE_NOTHING")throw new Error("Cannot switch media playlist from "+this.state);if(r=this.state,typeof t=="string"){if(!this.master.playlists[t])throw new Error("Unknown playlist URI: "+t);t=this.master.playlists[t]}if(u=!this.media_||t.uri!==this.media_.uri,u&&this.loadedPlaylists_[t.uri]&&this.loadedPlaylists_[t.uri].endList){this.state="HAVE_METADATA";this.media_=t;u&&(this.trigger("mediachanging"),this.trigger("mediachange"));return}if(u){if(this.media_&&this.trigger("mediachanging"),!t.sidx){this.mediaRequest_=n.setTimeout(this.haveMetadata.bind(this,{startingState:r,playlist:t}),0);return}f=void 0;i=void 0;this.masterPlaylistLoader_?(f=this.masterPlaylistLoader_.master,i=this.masterPlaylistLoader_.sidxMapping_):(f=this.master,i=this.sidxMapping_);e=iy(t.sidx);i[e]={sidxInfo:t.sidx};this.request=htt(t.sidx,t,this.hls_.xhr,{handleManifestRedirects:this.handleManifestRedirects},this.sidxRequestFinished_(t,f,r,function(n,u){if(!n||!u)throw new Error("failed to request sidx");i[e].sidx=u;o.haveMetadata({startingState:r,playlist:n.playlists[t.uri]})}))}}},{key:"haveMetadata",value:function(n){var i=n.startingState,t=n.playlist;this.state="HAVE_METADATA";this.loadedPlaylists_[t.uri]=t;this.mediaRequest_=null;this.refreshMedia_(t.uri);i==="HAVE_MASTER"?this.trigger("loadedmetadata"):this.trigger("mediachange")}},{key:"pause",value:function(){this.stopRequest();n.clearTimeout(this.mediaUpdateTimeout);n.clearTimeout(this.minimumUpdatePeriodTimeout_);this.state==="HAVE_NOTHING"&&(this.started=!1)}},{key:"load",value:function(t){var u=this,i,r;if(n.clearTimeout(this.mediaUpdateTimeout),n.clearTimeout(this.minimumUpdatePeriodTimeout_),i=this.media(),t){r=i?i.targetDuration*500:5e3;this.mediaUpdateTimeout=n.setTimeout(function(){return u.load()},r);return}if(!this.started){this.start();return}this.trigger("loadedplaylist")}},{key:"parseMasterXml",value:function(){var n=dd(this.masterXml_,{manifestUri:this.srcUrl,clientOffset:this.clientOffset_,sidxMapping:this.sidxMapping_}),t,i;for(n.uri=this.srcUrl,t=0;t<n.playlists.length;t++)i="placeholder-uri-"+t,n.playlists[t].uri=i,n.playlists[i]=n.playlists[t];return uh(n,function(t,i,r,u){if(t.playlists&&t.playlists.length){var f="placeholder-uri-"+i+"-"+r+"-"+u;t.playlists[0].uri=f;n.playlists[f]=t.playlists[0]}}),bg(n),kg(n),n}},{key:"start",value:function(){var t=this;if(this.started=!0,this.masterPlaylistLoader_){this.mediaRequest_=n.setTimeout(this.haveMaster_.bind(this),0);return}this.request=this.hls_.xhr({uri:this.srcUrl,withCredentials:this.withCredentials},function(n,i){if(t.request){if(t.request=null,n)return t.error={status:i.status,message:"DASH playlist request error at URL: "+t.srcUrl,responseText:i.responseText,code:2},t.state==="HAVE_NOTHING"&&(t.started=!1),t.trigger("error");t.masterXml_=i.responseText;t.masterLoaded_=i.responseHeaders&&i.responseHeaders.date?Date.parse(i.responseHeaders.date):Date.now();t.srcUrl=rh(t.handleManifestRedirects,t.srcUrl,i);t.syncClientServerClock_(t.onClientServerClockSync_.bind(t))}})}},{key:"syncClientServerClock_",value:function(n){var i=this,t=dot(this.masterXml_);if(t===null)return this.clientOffset_=this.masterLoaded_-Date.now(),n();if(t.method==="DIRECT")return this.clientOffset_=t.value-Date.now(),n();this.request=this.hls_.xhr({uri:br(this.srcUrl,t.value),method:t.method,withCredentials:this.withCredentials},function(r,u){if(i.request){if(r)return i.clientOffset_=i.masterLoaded_-Date.now(),n();var f=void 0;f=t.method==="HEAD"?u.responseHeaders&&u.responseHeaders.date?Date.parse(u.responseHeaders.date):i.masterLoaded_:Date.parse(u.responseText);i.clientOffset_=f-Date.now();n()}})}},{key:"haveMaster_",value:function(){this.state="HAVE_MASTER";this.mediaRequest_=null;this.masterPlaylistLoader_?this.media_||this.media(this.childPlaylist_):(this.master=this.parseMasterXml(),this.trigger("loadedplaylist"))}},{key:"onClientServerClockSync_",value:function(){var t=this;this.haveMaster_();this.hasPendingRequest()||this.media_||this.media(this.master.playlists[0]);this.master&&this.master.minimumUpdatePeriod&&(this.minimumUpdatePeriodTimeout_=n.setTimeout(function(){t.trigger("minimumUpdatePeriod")},this.master.minimumUpdatePeriod))}},{key:"refreshXml_",value:function(){var t=this;this.request=this.hls_.xhr({uri:this.srcUrl,withCredentials:this.withCredentials},function(i,r){var f,u;if(t.request){if(t.request=null,i)return t.error={status:r.status,message:"DASH playlist request error at URL: "+t.srcUrl,responseText:r.responseText,code:2},t.state==="HAVE_NOTHING"&&(t.started=!1),t.trigger("error");t.masterXml_=r.responseText;t.sidxMapping_=rvt(t.masterXml_,t.srcUrl,t.clientOffset_,t.sidxMapping_);var e=t.parseMasterXml(),o=ott(t.master,e),s=t.media().sidx;o&&(s?(f=iy(s),t.sidxMapping_[f]||(u=t.media(),t.request=htt(u.sidx,u,t.hls_.xhr,{handleManifestRedirects:t.handleManifestRedirects},t.sidxRequestFinished_(u,e,t.state,function(i,r){if(!i||!r)throw new Error("failed to request sidx on minimumUpdatePeriod");t.sidxMapping_[f].sidx=r;t.minimumUpdatePeriodTimeout_=n.setTimeout(function(){t.trigger("minimumUpdatePeriod")},t.master.minimumUpdatePeriod);t.refreshMedia_(t.media().uri);return})))):t.master=o);t.minimumUpdatePeriodTimeout_=n.setTimeout(function(){t.trigger("minimumUpdatePeriod")},t.master.minimumUpdatePeriod)}})}},{key:"refreshMedia_",value:function(t){var f=this,u,r,i;if(!t)throw new Error("refreshMedia_ must take a media uri");u=void 0;r=void 0;this.masterPlaylistLoader_?(u=this.masterPlaylistLoader_.master,r=this.masterPlaylistLoader_.parseMasterXml()):(u=this.master,r=this.parseMasterXml());i=ott(u,r);i?(this.masterPlaylistLoader_?this.masterPlaylistLoader_.master=i:this.master=i,this.media_=i.playlists[t]):(this.media_=r.playlists[t],this.trigger("playlistunchanged"));this.media().endList||(this.mediaUpdateTimeout=n.setTimeout(function(){f.trigger("mediaupdatetimeout")},dg(this.media(),!!i)));this.trigger("loadedplaylist")}}]),i}(tvt),le=function(n){return i.log.debug?i.log.debug.bind(i,"VHS:",n+" >"):function(){}};var uvt=function(){function n(t,i,r,u){ii(this,n);this.callbacks_=[];this.pendingCallback_=null;this.timestampOffset_=0;this.mediaSource=t;this.processedAppend_=!1;this.type_=r;this.mimeType_=i;this.logger_=le("SourceUpdater["+r+"]["+i+"]");t.readyState==="closed"?t.addEventListener("sourceopen",this.createSourceBuffer_.bind(this,i,u)):this.createSourceBuffer_(i,u)}return ui(n,[{key:"createSourceBuffer_",value:function(n,t){var i=this;if(this.sourceBuffer_=this.mediaSource.addSourceBuffer(n),this.logger_("created SourceBuffer"),t&&(t.trigger("sourcebufferadded"),this.mediaSource.sourceBuffers.length<2)){t.on("sourcebufferadded",function(){i.start_()});return}this.start_()}},{key:"start_",value:function(){var n=this;this.started_=!0;this.onUpdateendCallback_=function(){var t=n.pendingCallback_;n.pendingCallback_=null;n.sourceBuffer_.removing=!1;n.logger_("buffered ["+vv(n.buffered())+"]");t&&t();n.runCallback_()};this.sourceBuffer_.addEventListener("updateend",this.onUpdateendCallback_);this.runCallback_()}},{key:"abort",value:function(n){var t=this;this.processedAppend_&&this.queueCallback_(function(){t.sourceBuffer_.abort()},n)}},{key:"appendBuffer",value:function(n,t){var i=this;this.processedAppend_=!0;this.queueCallback_(function(){n.videoSegmentTimingInfoCallback&&i.sourceBuffer_.addEventListener("videoSegmentTimingInfo",n.videoSegmentTimingInfoCallback);i.sourceBuffer_.appendBuffer(n.bytes)},function(){n.videoSegmentTimingInfoCallback&&i.sourceBuffer_.removeEventListener("videoSegmentTimingInfo",n.videoSegmentTimingInfoCallback);t()})}},{key:"buffered",value:function(){return this.sourceBuffer_?this.sourceBuffer_.buffered:i.createTimeRanges()}},{key:"remove",value:function(n,t){var i=this,r=arguments.length>2&&arguments[2]!==undefined?arguments[2]:uf;this.processedAppend_&&this.queueCallback_(function(){i.logger_("remove ["+n+" => "+t+"]");i.sourceBuffer_.removing=!0;i.sourceBuffer_.remove(n,t)},r)}},{key:"updating",value:function(){return!this.sourceBuffer_||this.sourceBuffer_.updating||!!this.pendingCallback_&&this.pendingCallback_!==uf}},{key:"timestampOffset",value:function(n){var t=this;return typeof n!="undefined"&&(this.queueCallback_(function(){t.sourceBuffer_.timestampOffset=n;t.runCallback_()}),this.timestampOffset_=n),this.timestampOffset_}},{key:"queueCallback_",value:function(n,t){this.callbacks_.push([n.bind(this),t]);this.runCallback_()}},{key:"runCallback_",value:function(){var n=void 0;!this.updating()&&this.callbacks_.length&&this.started_&&(n=this.callbacks_.shift(),this.pendingCallback_=n[1],n[0]())}},{key:"dispose",value:function(){var n=this,t=function t(){n.sourceBuffer_&&n.mediaSource.readyState==="open"&&n.sourceBuffer_.abort();n.sourceBuffer_.removeEventListener("updateend",t)};this.sourceBuffer_.removeEventListener("updateend",this.onUpdateendCallback_);this.sourceBuffer_.removing?this.sourceBuffer_.addEventListener("updateend",t):t()}}]),n}(),bt={GOAL_BUFFER_LENGTH:30,MAX_GOAL_BUFFER_LENGTH:60,GOAL_BUFFER_LENGTH_RATE:1,INITIAL_BANDWIDTH:4194304,BANDWIDTH_VARIANCE:1.2,BUFFER_LOW_WATER_LINE:0,MAX_BUFFER_LOW_WATER_LINE:30,BUFFER_LOW_WATER_LINE_RATE:1},nr={FAILURE:2,TIMEOUT:-101,ABORTED:-102},ctt=function(n){n.forEach(function(n){n.abort()})},fvt=function(n){return{bandwidth:n.bandwidth,bytesReceived:n.bytesReceived||0,roundTripTime:n.roundTripTime||0}},evt=function(n){var i=n.target,r=Date.now()-i.requestTime,t={bandwidth:Infinity,bytesReceived:0,roundTripTime:r||0};return t.bytesReceived=n.loaded,t.bandwidth=Math.floor(t.bytesReceived/t.roundTripTime*8e3),t},uy=function(n,t){return t.timedout?{status:t.status,message:"HLS request timed-out at URL: "+t.uri,code:nr.TIMEOUT,xhr:t}:t.aborted?{status:t.status,message:"HLS request aborted at URL: "+t.uri,code:nr.ABORTED,xhr:t}:n?{status:t.status,message:"HLS request errored at URL: "+t.uri,code:nr.FAILURE,xhr:t}:null},ovt=function(n,t){return function(i,r){var f=r.response,e=uy(i,r),u;return e?t(e,n):f.byteLength!==16?t({status:r.status,message:"Invalid HLS key at URL: "+r.uri,code:nr.FAILURE,xhr:r},n):(u=new DataView(f),n.key.bytes=new Uint32Array([u.getUint32(0),u.getUint32(4),u.getUint32(8),u.getUint32(12)]),t(null,n))}},svt=function(n,t,i){return function(r,u){var e=u.response,f=uy(r,u);return f?i(f,n):e.byteLength===0?i({status:u.status,message:"Empty HLS segment content at URL: "+u.uri,code:nr.FAILURE,xhr:u},n):(n.map.bytes=new Uint8Array(u.response),t&&!t.isInitialized()&&t.init(),n.map.timescales=vi.timescale(n.map.bytes),n.map.videoTrackIds=vi.videoTrackIds(n.map.bytes),i(null,n))}},hvt=function(n,t,i){return function(r,u){var o=u.response,e=uy(r,u),f=void 0;return e?i(e,n):o.byteLength===0?i({status:u.status,message:"Empty HLS segment content at URL: "+u.uri,code:nr.FAILURE,xhr:u},n):(n.stats=fvt(u),n.key?n.encryptedBytes=new Uint8Array(u.response):n.bytes=new Uint8Array(u.response),t&&n.map&&n.map.bytes&&(t.isInitialized()||t.init(),f=t.parse(n.bytes,n.map.videoTrackIds,n.map.timescales),f&&f.captions&&(n.captionStreams=f.captionStreams,n.fmp4Captions=f.captions)),i(null,n))}},cvt=function(n,t,i){var u=function u(r){if(r.data.source===t.requestId){n.removeEventListener("message",u);var f=r.data.decrypted;return t.bytes=new Uint8Array(f.bytes,f.byteOffset,f.byteLength),i(null,t)}},r;n.addEventListener("message",u);r=void 0;r=t.key.bytes.slice?t.key.bytes.slice():new Uint32Array(Array.prototype.slice.call(t.key.bytes));n.postMessage(cn({source:t.requestId,encrypted:t.encryptedBytes,key:r,iv:t.key.iv}),[t.encryptedBytes.buffer,r.buffer])},lvt=function(n,t,i){var r=0,u=!1;return function(f,e){if(!u)return f?(u=!0,ctt(n),i(f,e)):(r+=1,r===n.length?(e.endOfAllRequests=Date.now(),e.encryptedBytes)?cvt(t,e,i):i(null,e):void 0)}},avt=function(n,t){return function(r){return n.stats=i.mergeOptions(n.stats,evt(r)),!n.stats.firstBytesReceivedAt&&n.stats.bytesReceived&&(n.stats.firstBytesReceivedAt=Date.now()),t(r,n)}},vvt=function(n,t,r,u,f,e,o){var s=[],h=lvt(s,r,o);if(f.key&&!f.key.bytes){var l=i.mergeOptions(t,{uri:f.key.resolvedUri,responseType:"arraybuffer"}),a=ovt(f,h),v=n(l,a);s.push(v)}if(f.map&&!f.map.bytes){var y=i.mergeOptions(t,{uri:f.map.resolvedUri,responseType:"arraybuffer",headers:av(f.map)}),p=svt(f,u,h),w=n(y,p);s.push(w)}var b=i.mergeOptions(t,{uri:f.resolvedUri,responseType:"arraybuffer",headers:av(f)}),k=hvt(f,u,h),c=n(b,k);return c.addEventListener("progress",avt(f,e)),s.push(c),function(){return ctt(s)}},ltt=function(t,i){var r=void 0;return t?(r=n.getComputedStyle(t),!r)?"":r[i]:""},ae=function(n,t){var i=n.slice();n.sort(function(n,r){var u=t(n,r);return u===0?i.indexOf(n)-i.indexOf(r):u})},fy=function(t,i){var r=void 0,u=void 0;return t.attributes.BANDWIDTH&&(r=t.attributes.BANDWIDTH),r=r||n.Number.MAX_VALUE,i.attributes.BANDWIDTH&&(u=i.attributes.BANDWIDTH),u=u||n.Number.MAX_VALUE,r-u},yvt=function(t,i){var r=void 0,u=void 0;return(t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width&&(r=t.attributes.RESOLUTION.width),r=r||n.Number.MAX_VALUE,i.attributes.RESOLUTION&&i.attributes.RESOLUTION.width&&(u=i.attributes.RESOLUTION.width),u=u||n.Number.MAX_VALUE,r===u&&t.attributes.BANDWIDTH&&i.attributes.BANDWIDTH)?t.attributes.BANDWIDTH-i.attributes.BANDWIDTH:r-u},pvt=function(t,i,r,u,f){var e=t.playlists.map(function(t){var r=void 0,u=void 0,i=void 0;return r=t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width,u=t.attributes.RESOLUTION&&t.attributes.RESOLUTION.height,i=t.attributes.BANDWIDTH,i=i||n.Number.MAX_VALUE,{bandwidth:i,width:r,height:u,playlist:t}}),o,y,c,l,p;ae(e,function(n,t){return n.bandwidth-t.bandwidth});e=e.filter(function(n){return!vt.isIncompatible(n.playlist)});o=e.filter(function(n){return vt.isEnabled(n.playlist)});o.length||(o=e.filter(function(n){return!vt.isDisabled(n.playlist)}));var h=o.filter(function(n){return n.bandwidth*bt.BANDWIDTH_VARIANCE<i}),s=h[h.length-1],w=h.filter(function(n){return n.bandwidth===s.bandwidth})[0];if(f===!1)return y=w||o[0]||e[0],y?y.playlist:null;c=h.filter(function(n){return n.width&&n.height});ae(c,function(n,t){return n.width-t.width});l=c.filter(function(n){return n.width===r&&n.height===u});s=l[l.length-1];var b=l.filter(function(n){return n.bandwidth===s.bandwidth})[0],a=void 0,v=void 0,k=void 0;return b||(a=c.filter(function(n){return n.width>r||n.height>u}),v=a.filter(function(n){return n.width===a[0].width&&n.height===a[0].height}),s=v[v.length-1],k=v.filter(function(n){return n.bandwidth===s.bandwidth})[0]),p=k||b||w||o[0]||e[0],p?p.playlist:null},wvt=function(){return pvt(this.playlists.master,this.systemBandwidth,parseInt(ltt(this.tech_.el(),"width"),10),parseInt(ltt(this.tech_.el(),"height"),10),this.limitRenditionByPlayerDimensions)},bvt=function(n){var f=n.master,e=n.currentTime,o=n.bandwidth,s=n.duration,h=n.segmentDuration,c=n.timeUntilRebuffer,l=n.currentTimeline,a=n.syncController,u=f.playlists.filter(function(n){return!vt.isIncompatible(n)}),t=u.filter(vt.isEnabled);t.length||(t=u.filter(function(n){return!vt.isDisabled(n)}));var v=t.filter(vt.hasAttribute.bind(null,"BANDWIDTH")),i=v.map(function(n){var t=a.getSyncPoint(n,s,l,e),i=t?1:2,r=vt.estimateSegmentRequestTime(h,o,n),u=r*i-c;return{playlist:n,rebufferingImpact:u}}),r=i.filter(function(n){return n.rebufferingImpact<=0});return(ae(r,function(n,t){return fy(t.playlist,n.playlist)}),r.length)?r[0]:(ae(i,function(n,t){return n.rebufferingImpact-t.rebufferingImpact}),i[0]||null)},kvt=function(){var n=this.playlists.master.playlists.filter(vt.isEnabled),t;return ae(n,function(n,t){return fy(n,t)}),t=n.filter(function(n){return he(n.attributes.CODECS).videoCodec}),t[0]||null},dvt=function(n,t,i){var r,u;for(r in i)n[r]||(t.trigger({type:"usage",name:"hls-608"}),u=t.textTracks().getTrackById(r),n[r]=u?u:t.addRemoteTextTrack({kind:"captions",id:r,label:r},!1).track)},gvt=function(n){var t=n.inbandTextTracks,i=n.captionArray,r=n.timestampOffset,u;i&&(u=window.WebKitDataCue||window.VTTCue,i.forEach(function(n){var i=n.stream,f=n.startTime,e=n.endTime;t[i]&&(f+=r,e+=r,t[i].addCue(new u(f,e,n.text)))}))},nyt=500,tyt=function(n,t,i){if(!n||!t)return!1;var r=n.segments,u=i===r.length;return n.endList&&t.readyState==="open"&&u},att=function(n){return typeof n=="number"&&isFinite(n)},iyt=function(n,t,i){return n!=="main"||!t||!i?null:!i.containsAudio&&!i.containsVideo?"Neither audio nor video found in segment.":t.containsVideo&&!i.containsVideo?"Only audio found in segment when we expected video. We can't switch to audio only from a stream that had video. To get rid of this message, please add codec information to the manifest.":!t.containsVideo&&i.containsVideo?"Video found in segment when we expected only audio. We can't switch to a stream with video from an audio only stream. To get rid of this message, please add codec information to the manifest.":null},ryt=function(n,t,i){var r=void 0;return r=n.length&&n.start(0)>0&&n.start(0)<t?n.start(0):t-30,Math.min(r,t-i)},uyt=function(n){var i=n.segment,f=i.start,e=i.end,t=n.playlist,r=t.mediaSequence,o=t.id,u=t.segments,s=u===undefined?[]:u,h=n.mediaIndex,c=n.timeline;return["appending ["+h+"] of ["+r+", "+(r+s.length)+"] from playlist ["+o+"]","["+f+" => "+e+"] in timeline ["+c+"]"].join(" ")},ey=function(t){function r(n){ii(this,r);var t=oi(this,(r.__proto__||Object.getPrototypeOf(r)).call(this));if(!n)throw new TypeError("Initialization settings are required");if(typeof n.currentTime!="function")throw new TypeError("No currentTime getter specified");if(!n.mediaSource)throw new TypeError("No MediaSource specified");t.bandwidth=n.bandwidth;t.throughput={rate:0,count:0};t.roundTrip=NaN;t.resetStats_();t.mediaIndex=null;t.hasPlayed_=n.hasPlayed;t.currentTime_=n.currentTime;t.seekable_=n.seekable;t.seeking_=n.seeking;t.duration_=n.duration;t.mediaSource_=n.mediaSource;t.hls_=n.hls;t.loaderType_=n.loaderType;t.startingMedia_=void 0;t.segmentMetadataTrack_=n.segmentMetadataTrack;t.goalBufferLength_=n.goalBufferLength;t.sourceType_=n.sourceType;t.inbandTextTracks_=n.inbandTextTracks;t.state_="INIT";t.checkBufferTimeout_=null;t.error_=void 0;t.currentTimeline_=-1;t.pendingSegment_=null;t.mimeType_=null;t.sourceUpdater_=null;t.xhrOptions_=null;t.activeInitSegmentId_=null;t.initSegments_={};t.cacheEncryptionKeys_=n.cacheEncryptionKeys;t.keyCache_={};t.captionParser_=t.loaderType_==="main"?new kst:null;t.decrypter_=n.decrypter;t.syncController_=n.syncController;t.syncPoint_={segmentIndex:0,time:0};t.syncController_.on("syncinfoupdate",function(){return t.trigger("syncinfoupdate")});return t.mediaSource_.addEventListener("sourceopen",function(){return t.ended_=!1}),t.fetchAtBuffer_=!1,t.logger_=le("SegmentLoader["+t.loaderType_+"]"),Object.defineProperty(t,"state",{get:function(){return this.state_},set:function(n){n!==this.state_&&(this.logger_(this.state_+" -> "+n),this.state_=n)}}),t}return yi(r,t),ui(r,[{key:"resetStats_",value:function(){this.mediaBytesTransferred=0;this.mediaRequests=0;this.mediaRequestsAborted=0;this.mediaRequestsTimedout=0;this.mediaRequestsErrored=0;this.mediaTransferDuration=0;this.mediaSecondsLoaded=0}},{key:"dispose",value:function(){this.state="DISPOSED";this.pause();this.abort_();this.sourceUpdater_&&this.sourceUpdater_.dispose();this.resetStats_();this.captionParser_&&this.captionParser_.reset()}},{key:"abort",value:function(){if(this.state!=="WAITING"){this.pendingSegment_&&(this.pendingSegment_=null);return}this.abort_();this.state="READY";this.paused()||this.monitorBuffer_()}},{key:"abort_",value:function(){this.pendingSegment_&&this.pendingSegment_.abortRequests();this.pendingSegment_=null}},{key:"error",value:function(n){return typeof n!="undefined"&&(this.error_=n),this.pendingSegment_=null,this.error_}},{key:"endOfStream",value:function(){this.ended_=!0;this.pause();this.trigger("ended")}},{key:"buffered_",value:function(){return this.sourceUpdater_?this.sourceUpdater_.buffered():i.createTimeRanges()}},{key:"initSegment",value:function(n){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:!1,i,t;return n?(i=oh(n),t=this.initSegments_[i],r&&!t&&n.bytes&&(this.initSegments_[i]=t={resolvedUri:n.resolvedUri,byterange:n.byterange,bytes:n.bytes,timescales:n.timescales,videoTrackIds:n.videoTrackIds}),t||n):null}},{key:"segmentKey",value:function(n){var u=arguments.length>1&&arguments[1]!==undefined?arguments[1]:!1,i,t,r;return n?(i=ln(n),t=this.keyCache_[i],this.cacheEncryptionKeys_&&u&&!t&&n.bytes&&(this.keyCache_[i]=t={resolvedUri:n.resolvedUri,bytes:n.bytes}),r={resolvedUri:(t||n).resolvedUri},t&&(r.bytes=t.bytes),r):null}},{key:"couldBeginLoading_",value:function(){return this.playlist_&&(this.sourceUpdater_||this.mimeType_&&this.state==="INIT")&&!this.paused()}},{key:"load",value:function(){if(this.monitorBuffer_(),this.playlist_){if(this.syncController_.setDateTimeMapping(this.playlist_),this.state==="INIT"&&this.couldBeginLoading_())return this.init_();this.couldBeginLoading_()&&(this.state==="READY"||this.state==="INIT")&&(this.state="READY")}}},{key:"init_",value:function(){return this.state="READY",this.sourceUpdater_=new uvt(this.mediaSource_,this.mimeType_,this.loaderType_,this.sourceBufferEmitter_),this.resetEverything(),this.monitorBuffer_()}},{key:"playlist",value:function(n){var f=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},t,i,r,u;if(n){if(t=this.playlist_,i=this.pendingSegment_,this.playlist_=n,this.xhrOptions_=f,this.hasPlayed_()||(n.syncInfo={mediaSequence:n.mediaSequence,time:0}),r=null,t&&(t.id?r=t.id:t.uri&&(r=t.uri)),this.logger_("playlist update ["+r+" => "+(n.id||n.uri)+"]"),this.trigger("syncinfoupdate"),this.state==="INIT"&&this.couldBeginLoading_())return this.init_();if(!t||t.uri!==n.uri){this.mediaIndex!==null&&this.resyncLoader();return}u=n.mediaSequence-t.mediaSequence;this.logger_("live window shift ["+u+"]");this.mediaIndex!==null&&(this.mediaIndex-=u);i&&(i.mediaIndex-=u,i.mediaIndex>=0&&(i.segment=n.segments[i.mediaIndex]));this.syncController_.saveExpiredSegmentInfo(t,n)}}},{key:"pause",value:function(){this.checkBufferTimeout_&&(n.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)}},{key:"paused",value:function(){return this.checkBufferTimeout_===null}},{key:"mimeType",value:function(n,t){this.mimeType_||(this.mimeType_=n,this.sourceBufferEmitter_=t,this.state==="INIT"&&this.couldBeginLoading_()&&this.init_())}},{key:"resetEverything",value:function(n){this.ended_=!1;this.resetLoader();this.remove(0,this.duration_(),n);this.captionParser_&&this.captionParser_.clearAllCaptions();this.trigger("reseteverything")}},{key:"resetLoader",value:function(){this.fetchAtBuffer_=!1;this.resyncLoader()}},{key:"resyncLoader",value:function(){this.mediaIndex=null;this.syncPoint_=null;this.abort()}},{key:"remove",value:function(n,t,i){if(this.sourceUpdater_&&this.sourceUpdater_.remove(n,t,i),gu(n,t,this.segmentMetadataTrack_),this.inbandTextTracks_)for(var r in this.inbandTextTracks_)gu(n,t,this.inbandTextTracks_[r])}},{key:"monitorBuffer_",value:function(){this.checkBufferTimeout_&&n.clearTimeout(this.checkBufferTimeout_);this.checkBufferTimeout_=n.setTimeout(this.monitorBufferTick_.bind(this),1)}},{key:"monitorBufferTick_",value:function(){this.state==="READY"&&this.fillBuffer_();this.checkBufferTimeout_&&n.clearTimeout(this.checkBufferTimeout_);this.checkBufferTimeout_=n.setTimeout(this.monitorBufferTick_.bind(this),nyt)}},{key:"fillBuffer_",value:function(){if(!this.sourceUpdater_.updating()){this.syncPoint_||(this.syncPoint_=this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_()));var n=this.checkBuffer_(this.buffered_(),this.playlist_,this.mediaIndex,this.hasPlayed_(),this.currentTime_(),this.syncPoint_);if(n){if(this.isEndOfStream_(n.mediaIndex)){this.endOfStream();return}(n.mediaIndex!==this.playlist_.segments.length-1||this.mediaSource_.readyState!=="ended"||this.seeking_())&&(n.timeline!==this.currentTimeline_&&(this.syncController_.reset(),n.timestampOffset=n.startOfSegment,this.captionParser_&&this.captionParser_.clearAllCaptions()),this.loadSegment_(n))}}}},{key:"isEndOfStream_",value:function(n){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:this.playlist_;return tyt(t,this.mediaSource_,n)&&!this.sourceUpdater_.updating()}},{key:"checkBuffer_",value:function(n,t,i,r,u,f){var o=0,e=void 0,s,l,h,c;return(n.length&&(o=n.end(n.length-1)),s=Math.max(0,o-u),!t.segments.length)?null:s>=this.goalBufferLength_()?null:!r&&s>=1?null:f===null?(i=this.getSyncSegmentCandidate_(t),this.generateSegmentInfo_(t,i,null,!0)):i!==null?(l=t.segments[i],e=o,this.generateSegmentInfo_(t,i+1,e,!1)):(this.fetchAtBuffer_?(h=vt.getMediaInfoForTime(t,o,f.segmentIndex,f.time),i=h.mediaIndex,e=h.startTime):(c=vt.getMediaInfoForTime(t,u,f.segmentIndex,f.time),i=c.mediaIndex,e=c.startTime),this.generateSegmentInfo_(t,i,e,!1))}},{key:"getSyncSegmentCandidate_",value:function(n){var i=this,t;return this.currentTimeline_===-1?0:(t=n.segments.map(function(n,t){return{timeline:n.timeline,segmentIndex:t}}).filter(function(n){return n.timeline===i.currentTimeline_}),t.length)?t[Math.min(t.length-1,1)].segmentIndex:Math.max(n.segments.length-1,0)}},{key:"generateSegmentInfo_",value:function(n,t,i,r){if(t<0||t>=n.segments.length)return null;var u=n.segments[t];return{requestId:"segment-loader-"+Math.random(),uri:u.resolvedUri,mediaIndex:t,isSyncRequest:r,startOfSegment:i,playlist:n,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:u.timeline,duration:u.duration,segment:u}}},{key:"abortRequestEarly_",value:function(n){var t;if(this.hls_.tech_.paused()||!this.xhrOptions_.timeout||!this.playlist_.attributes.BANDWIDTH||Date.now()-(n.firstBytesReceivedAt||Date.now())<1e3)return!1;var r=this.currentTime_(),u=n.bandwidth,f=this.pendingSegment_.duration,e=vt.estimateSegmentRequestTime(f,u,this.playlist_,n.bytesReceived),i=rat(this.buffered_(),r,this.hls_.tech_.playbackRate())-1;if(e<=i)return!1;if(t=bvt({master:this.hls_.playlists.master,currentTime:r,bandwidth:u,duration:this.duration_(),segmentDuration:f,timeUntilRebuffer:i,currentTimeline:this.currentTimeline_,syncController:this.syncController_}),t){var s=e-i,h=s-t.rebufferingImpact,o=.5;return(i<=sh&&(o=1),!t.playlist||t.playlist.uri===this.playlist_.uri||h<o)?!1:(this.bandwidth=t.playlist.attributes.BANDWIDTH*bt.BANDWIDTH_VARIANCE+1,this.abort(),this.trigger("earlyabort"),!0)}}},{key:"handleProgress_",value:function(n,t){this.pendingSegment_&&t.requestId===this.pendingSegment_.requestId&&!this.abortRequestEarly_(t.stats)&&this.trigger("progress")}},{key:"loadSegment_",value:function(n){this.state="WAITING";this.pendingSegment_=n;this.trimBackBuffer_(n);n.abortRequests=vvt(this.hls_.xhr,this.xhrOptions_,this.decrypter_,this.captionParser_,this.createSimplifiedSegmentObj_(n),this.handleProgress_.bind(this),this.segmentRequestFinished_.bind(this))}},{key:"trimBackBuffer_",value:function(){var n=ryt(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);n>0&&this.remove(0,n)}},{key:"createSimplifiedSegmentObj_",value:function(n){var t=n.segment,i={resolvedUri:t.resolvedUri,byterange:t.byterange,requestId:n.requestId},r;return t.key&&(r=t.key.iv||new Uint32Array([0,0,0,n.mediaIndex+n.playlist.mediaSequence]),i.key=this.segmentKey(t.key),i.key.iv=r),t.map&&(i.map=this.initSegment(t.map)),i}},{key:"segmentRequestFinished_",value:function(n,t){if(this.mediaRequests+=1,t.stats&&(this.mediaBytesTransferred+=t.stats.bytesReceived,this.mediaTransferDuration+=t.stats.roundTripTime),!this.pendingSegment_){this.mediaRequestsAborted+=1;return}if(t.requestId===this.pendingSegment_.requestId){if(n){if(this.pendingSegment_=null,this.state="READY",n.code===nr.ABORTED){this.mediaRequestsAborted+=1;return}if(this.pause(),n.code===nr.TIMEOUT){this.mediaRequestsTimedout+=1;this.bandwidth=1;this.roundTrip=NaN;this.trigger("bandwidthupdate");return}this.mediaRequestsErrored+=1;this.error(n);this.trigger("error");return}this.bandwidth=t.stats.bandwidth;this.roundTrip=t.stats.roundTripTime;t.map&&(t.map=this.initSegment(t.map,!0));t.key&&this.segmentKey(t.key,!0);this.processSegmentResponse_(t)}}},{key:"processSegmentResponse_",value:function(n){var t=this.pendingSegment_;t.bytes=n.bytes;n.map&&(t.segment.map.bytes=n.map.bytes);t.endOfAllRequests=n.endOfAllRequests;n.fmp4Captions&&(dvt(this.inbandTextTracks_,this.hls_.tech_,n.captionStreams),gvt({inbandTextTracks:this.inbandTextTracks_,captionArray:n.fmp4Captions,timestampOffset:0}),this.captionParser_&&this.captionParser_.clearParsedCaptions());this.handleSegment_()}},{key:"handleSegment_",value:function(){var h=this,r,e,o,u,f,s;if(!this.pendingSegment_){this.state="READY";return}var n=this.pendingSegment_,i=n.segment,t=this.syncController_.probeSegmentInfo(n);if(typeof this.startingMedia_=="undefined"&&t&&(t.containsAudio||t.containsVideo)&&(this.startingMedia_={containsAudio:t.containsAudio,containsVideo:t.containsVideo}),r=iyt(this.loaderType_,this.startingMedia_,t),r){this.error({message:r,blacklistDuration:Infinity});this.trigger("error");return}if(n.isSyncRequest){this.trigger("syncinfoupdate");this.pendingSegment_=null;this.state="READY";return}n.timestampOffset!==null&&n.timestampOffset!==this.sourceUpdater_.timestampOffset()&&(t&&t.segmentTimestampInfo&&(e=t.segmentTimestampInfo[0].ptsTime,o=t.segmentTimestampInfo[0].dtsTime,n.timestampOffset-=e-o),this.sourceUpdater_.timestampOffset(n.timestampOffset),this.trigger("timestampoffset"));u=this.syncController_.mappingForTimeline(n.timeline);u!==null&&this.trigger({type:"segmenttimemapping",mapping:u});this.state="APPENDING";i.map&&(f=oh(i.map),this.activeInitSegmentId_&&this.activeInitSegmentId_===f||(s=this.initSegment(i.map),this.sourceUpdater_.appendBuffer({bytes:s.bytes},function(){h.activeInitSegmentId_=f})));n.byteLength=n.bytes.byteLength;this.mediaSecondsLoaded+=typeof i.start=="number"&&typeof i.end=="number"?i.end-i.start:i.duration;this.logger_(uyt(n));this.sourceUpdater_.appendBuffer({bytes:n.bytes,videoSegmentTimingInfoCallback:this.handleVideoSegmentTimingInfo_.bind(this,n.requestId)},this.handleUpdateEnd_.bind(this))}},{key:"handleVideoSegmentTimingInfo_",value:function(n,t){if(this.pendingSegment_&&n===this.pendingSegment_.requestId){var i=this.pendingSegment_.segment;i.videoTimingInfo||(i.videoTimingInfo={});i.videoTimingInfo.transmuxerPrependedSeconds=t.videoSegmentTimingInfo.prependedContentDuration||0;i.videoTimingInfo.transmuxedPresentationStart=t.videoSegmentTimingInfo.start.presentation;i.videoTimingInfo.transmuxedPresentationEnd=t.videoSegmentTimingInfo.end.presentation;i.videoTimingInfo.baseMediaDecodeTime=t.videoSegmentTimingInfo.baseMediaDecodeTime}}},{key:"handleUpdateEnd_",value:function(){if(!this.pendingSegment_){this.state="READY";this.paused()||this.monitorBuffer_();return}var n=this.pendingSegment_,t=n.segment,i=this.mediaIndex!==null;if(this.pendingSegment_=null,this.recordThroughput_(n),this.addSegmentMetadataCue_(n),this.state="READY",this.mediaIndex=n.mediaIndex,this.fetchAtBuffer_=!0,this.currentTimeline_=n.timeline,this.trigger("syncinfoupdate"),t.end&&this.currentTime_()-t.end>n.playlist.targetDuration*3){this.resetEverything();return}i&&this.trigger("bandwidthupdate");this.trigger("progress");this.isEndOfStream_(n.mediaIndex+1,n.playlist)&&this.endOfStream();this.paused()||this.monitorBuffer_()}},{key:"recordThroughput_",value:function(n){var t=this.throughput.rate,i=Date.now()-n.endOfAllRequests+1,r=Math.floor(n.byteLength/i*8e3);this.throughput.rate+=(r-t)/++this.throughput.count}},{key:"addSegmentMetadataCue_",value:function(t){if(this.segmentMetadataTrack_){var i=t.segment,r=i.start,u=i.end;if(att(r)&&att(u)){gu(r,u,this.segmentMetadataTrack_);var o=n.WebKitDataCue||n.VTTCue,f={custom:i.custom,dateTimeObject:i.dateTimeObject,dateTimeString:i.dateTimeString,bandwidth:t.playlist.attributes.BANDWIDTH,resolution:t.playlist.attributes.RESOLUTION,codecs:t.playlist.attributes.CODECS,byteLength:t.byteLength,uri:t.uri,timeline:t.timeline,playlist:t.playlist.uri,start:r,end:u},s=JSON.stringify(f),e=new o(r,u,s);e.value=f;this.segmentMetadataTrack_.addCue(e)}}}}]),r}(i.EventTarget),vtt=function(n){return decodeURIComponent(escape(String.fromCharCode.apply(null,n)))},ytt=new Uint8Array("\n\n".split("").map(function(n){return n.charCodeAt(0)})),fyt=function(t){function r(n){var i=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},t;return ii(this,r),t=oi(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,n,i)),t.mediaSource_=null,t.subtitlesTrack_=null,t}return yi(r,t),ui(r,[{key:"buffered_",value:function(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues.length)return i.createTimeRanges();var n=this.subtitlesTrack_.cues,t=n[0].startTime,r=n[n.length-1].startTime;return i.createTimeRanges([[t,r]])}},{key:"initSegment",value:function(n){var f=arguments.length>1&&arguments[1]!==undefined?arguments[1]:!1,r,t,u,i;return n?(r=oh(n),t=this.initSegments_[r],f&&!t&&n.bytes&&(u=ytt.byteLength+n.bytes.byteLength,i=new Uint8Array(u),i.set(n.bytes),i.set(ytt,n.bytes.byteLength),this.initSegments_[r]=t={resolvedUri:n.resolvedUri,byterange:n.byterange,bytes:i}),t||n):null}},{key:"couldBeginLoading_",value:function(){return this.playlist_&&this.subtitlesTrack_&&!this.paused()}},{key:"init_",value:function(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()}},{key:"track",value:function(n){return typeof n=="undefined"?this.subtitlesTrack_:(this.subtitlesTrack_=n,this.state==="INIT"&&this.couldBeginLoading_()&&this.init_(),this.subtitlesTrack_)}},{key:"remove",value:function(n,t){gu(n,t,this.subtitlesTrack_)}},{key:"fillBuffer_",value:function(){var t=this,n,i;if(this.syncPoint_||(this.syncPoint_=this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_())),n=this.checkBuffer_(this.buffered_(),this.playlist_,this.mediaIndex,this.hasPlayed_(),this.currentTime_(),this.syncPoint_),n=this.skipEmptySegments_(n),n){if(this.syncController_.timestampOffsetForTimeline(n.timeline)===null){i=function(){t.state="READY";t.paused()||t.monitorBuffer_()};this.syncController_.one("timestampoffset",i);this.state="WAITING_ON_TIMELINE";return}this.loadSegment_(n)}}},{key:"skipEmptySegments_",value:function(n){while(n&&n.segment.empty)n=this.generateSegmentInfo_(n.playlist,n.mediaIndex+1,n.startOfSegment+n.duration,n.isSyncRequest);return n}},{key:"handleSegment_",value:function(){var i=this,t,u,r,f;if(!this.pendingSegment_||!this.subtitlesTrack_){this.state="READY";return}if(this.state="APPENDING",t=this.pendingSegment_,u=t.segment,typeof n.WebVTT!="function"&&this.subtitlesTrack_&&this.subtitlesTrack_.tech_){r=void 0;f=function(){i.subtitlesTrack_.tech_.off("vttjsloaded",r);i.error({message:"Error loading vtt.js"});i.state="READY";i.pause();i.trigger("error")};r=function(){i.subtitlesTrack_.tech_.off("vttjserror",f);i.handleSegment_()};this.state="WAITING_ON_VTTJS";this.subtitlesTrack_.tech_.one("vttjsloaded",r);this.subtitlesTrack_.tech_.one("vttjserror",f);return}u.requested=!0;try{this.parseVTTCues_(t)}catch(e){return this.error({message:e.message}),this.state="READY",this.pause(),this.trigger("error")}if(this.updateTimeMapping_(t,this.syncController_.timelines[t.timeline],this.playlist_),t.isSyncRequest){this.trigger("syncinfoupdate");this.pendingSegment_=null;this.state="READY";return}t.byteLength=t.bytes.byteLength;this.mediaSecondsLoaded+=u.duration;t.cues.length&&this.remove(t.cues[0].endTime,t.cues[t.cues.length-1].endTime);t.cues.forEach(function(n){i.subtitlesTrack_.addCue(n)});this.handleUpdateEnd_()}},{key:"parseVTTCues_",value:function(t){var e=void 0,o=!1,r,u,f;typeof n.TextDecoder=="function"?e=new n.TextDecoder("utf8"):(e=n.WebVTT.StringDecoder(),o=!0);r=new n.WebVTT.Parser(n,n.vttjs,e);t.cues=[];t.timestampmap={MPEGTS:0,LOCAL:0};r.oncue=t.cues.push.bind(t.cues);r.ontimestampmap=function(n){return t.timestampmap=n};r.onparsingerror=function(n){i.log.warn("Error encountered when parsing cues: "+n.message)};t.segment.map&&(u=t.segment.map.bytes,o&&(u=vtt(u)),r.parse(u));f=t.bytes;o&&(f=vtt(f));r.parse(f);r.flush()}},{key:"updateTimeMapping_",value:function(n,t,i){var f=n.segment,r,u,e,o;if(t){if(!n.cues.length){f.empty=!0;return}r=n.timestampmap;u=r.MPEGTS/9e4-r.LOCAL+t.mapping;n.cues.forEach(function(n){n.startTime+=u;n.endTime+=u});i.syncInfo||(e=n.cues[0].startTime,o=n.cues[n.cues.length-1].startTime,i.syncInfo={mediaSequence:i.mediaSequence+n.mediaIndex,time:Math.min(e,o-f.duration)})}}}]),r}(ey),eyt=function(n,t){for(var u=n.cues,r,i=0;i<u.length;i++)if(r=u[i],t>=r.adStartTime&&t<=r.adEndTime)return r;return null},oyt=function(t,i){var c=arguments.length>2&&arguments[2]!==undefined?arguments[2]:0,u,r,e,f;if(t.segments)for(u=c,r=void 0,e=0;e<t.segments.length;e++){if(f=t.segments[e],r||(r=eyt(i,u+f.duration/2)),r){if("cueIn"in f){r.endTime=u;r.adEndTime=u;u+=f.duration;r=null;continue}if(u<r.endTime){u+=f.duration;continue}r.endTime+=f.duration}else if("cueOut"in f&&(r=new n.VTTCue(u,u+f.duration,f.cueOut),r.adStartTime=u,r.adEndTime=u+parseFloat(f.cueOut),i.addCue(r)),"cueOutCont"in f){var o=void 0,s=void 0,l=f.cueOutCont.split("/").map(parseFloat),h=vct(l,2);o=h[0];s=h[1];r=new n.VTTCue(u,u+f.duration,"");r.adStartTime=u-o;r.adEndTime=r.adStartTime+s;i.addCue(r)}u+=f.duration}},syt=uct.inspect,ptt=[{name:"VOD",run:function(n,t,i){return i!==Infinity?{time:0,segmentIndex:0}:null}},{name:"ProgramDateTime",run:function(n,t,i,r,u){var f,o;if(!n.datetimeToDisplayTime)return null;var h=t.segments||[],c=null,e=null;for(u=u||0,f=0;f<h.length;f++)if(o=h[f],o.dateTimeObject){var a=o.dateTimeObject.getTime()/1e3,l=a+n.datetimeToDisplayTime,s=Math.abs(u-l);if(e!==null&&(s===0||e<s))break;e=s;c={time:l,segmentIndex:f}}return c}},{name:"Segment",run:function(n,t,i,r,u){var c=t.segments||[],h=null,f=null,e,o,s;for(u=u||0,e=0;e<c.length;e++)if(o=c[e],o.timeline===r&&typeof o.start!="undefined"){if(s=Math.abs(u-o.start),f!==null&&f<s)break;(!h||f===null||f>=s)&&(f=s,h={time:o.start,segmentIndex:e})}return h}},{name:"Discontinuity",run:function(n,t,i,r,u){var s=null,f,e,o;if(u=u||0,t.discontinuityStarts&&t.discontinuityStarts.length)for(f=null,e=0;e<t.discontinuityStarts.length;e++){var c=t.discontinuityStarts[e],l=t.discontinuitySequence+e+1,h=n.discontinuities[l];if(h){if(o=Math.abs(u-h.time),f!==null&&f<o)break;(!s||f===null||f>=o)&&(f=o,s={time:h.time,segmentIndex:c})}}return s}},{name:"Playlist",run:function(n,t){return t.syncInfo?{time:t.syncInfo.time,segmentIndex:t.syncInfo.mediaSequence-t.mediaSequence}:null}}],hyt=function(n){function t(){ii(this,t);var n=oi(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.inspectCache_=undefined,n.timelines=[],n.discontinuities=[],n.datetimeToDisplayTime=null,n.logger_=le("SyncController"),n}return yi(t,n),ui(t,[{key:"getSyncPoint",value:function(n,t,i,r){var u=this.runStrategies_(n,t,i,r);return u.length?this.selectSyncPoint_(u,{key:"time",value:r}):null}},{key:"getExpiredTime",value:function(n,t){var r,i;return!n||!n.segments?null:(r=this.runStrategies_(n,t,n.discontinuitySequence,0),!r.length)?null:(i=this.selectSyncPoint_(r,{key:"segmentIndex",value:0}),i.segmentIndex>0&&(i.time*=-1),Math.abs(i.time+se(n,i.segmentIndex,0)))}},{key:"runStrategies_",value:function(n,t,i,r){for(var o=[],f,e,u=0;u<ptt.length;u++)f=ptt[u],e=f.run(this,n,t,i,r),e&&(e.strategy=f.name,o.push({strategy:f.name,syncPoint:e}));return o}},{key:"selectSyncPoint_",value:function(n,t){for(var r=n[0].syncPoint,f=Math.abs(n[0].syncPoint[t.key]-t.value),e=n[0].strategy,u,i=1;i<n.length;i++)u=Math.abs(n[i].syncPoint[t.key]-t.value),u<f&&(f=u,r=n[i].syncPoint,e=n[i].strategy);return this.logger_("syncPoint for ["+t.key+": "+t.value+"] chosen with strategy"+(" ["+e+"]: [time:"+r.time+",")+(" segmentIndex:"+r.segmentIndex+"]")),r}},{key:"saveExpiredSegmentInfo",value:function(n,t){for(var u=t.mediaSequence-n.mediaSequence,r,i=u-1;i>=0;i--)if(r=n.segments[i],r&&typeof r.start!="undefined"){t.syncInfo={mediaSequence:n.mediaSequence+i,time:r.start};this.logger_("playlist refresh sync: [time:"+t.syncInfo.time+","+(" mediaSequence: "+t.syncInfo.mediaSequence+"]"));this.trigger("syncinfoupdate");break}}},{key:"setDateTimeMapping",value:function(n){if(!this.datetimeToDisplayTime&&n.segments&&n.segments.length&&n.segments[0].dateTimeObject){var t=n.segments[0].dateTimeObject.getTime()/1e3;this.datetimeToDisplayTime=-t}}},{key:"reset",value:function(){this.inspectCache_=undefined}},{key:"probeSegmentInfo",value:function(n){var r=n.segment,i=n.playlist,t=void 0;return t=r.map?this.probeMp4Segment_(n):this.probeTsSegment_(n),t&&this.calculateSegmentTimeMapping_(n,t)&&(this.saveDiscontinuitySyncInfo_(n),i.syncInfo||(i.syncInfo={mediaSequence:i.mediaSequence+n.mediaIndex,time:r.start})),t}},{key:"probeMp4Segment_",value:function(n){var i=n.segment,r=vi.timescale(i.map.bytes),t=vi.compositionStartTime(r,n.bytes);return n.timestampOffset!==null&&(n.timestampOffset-=t),{start:t,end:t+i.duration}}},{key:"probeTsSegment_",value:function(n){var t=syt(n.bytes,this.inspectCache_),i=void 0,r=void 0,u=void 0;return t?(t.video&&t.video.length===2?(this.inspectCache_=t.video[1].dts,i=t.video[0].dtsTime,r=t.video[1].dtsTime,u=t.video):t.audio&&t.audio.length===2&&(this.inspectCache_=t.audio[1].dts,i=t.audio[0].dtsTime,r=t.audio[1].dtsTime,u=t.audio),{segmentTimestampInfo:u,start:i,end:r,containsVideo:t.video&&t.video.length===2,containsAudio:t.audio&&t.audio.length===2}):null}},{key:"timestampOffsetForTimeline",value:function(n){return typeof this.timelines[n]=="undefined"?null:this.timelines[n].time}},{key:"mappingForTimeline",value:function(n){return typeof this.timelines[n]=="undefined"?null:this.timelines[n].mapping}},{key:"calculateSegmentTimeMapping_",value:function(n,t){var r=n.segment,i=this.timelines[n.timeline];if(n.timestampOffset!==null)i={time:n.startOfSegment,mapping:n.startOfSegment-t.start},this.timelines[n.timeline]=i,this.trigger("timestampoffset"),this.logger_("time mapping for timeline "+n.timeline+": "+("[time: "+i.time+"] [mapping: "+i.mapping+"]")),r.start=n.startOfSegment,r.end=t.end+i.mapping;else if(i)r.start=t.start+i.mapping,r.end=t.end+i.mapping;else return!1;return!0}},{key:"saveDiscontinuitySyncInfo_",value:function(n){var t=n.playlist,i=n.segment,r,e;if(i.discontinuity)this.discontinuities[i.timeline]={time:i.start,accuracy:0};else if(t.discontinuityStarts&&t.discontinuityStarts.length)for(r=0;r<t.discontinuityStarts.length;r++){var u=t.discontinuityStarts[r],f=t.discontinuitySequence+r+1,o=u-n.mediaIndex,s=Math.abs(o);(!this.discontinuities[f]||this.discontinuities[f].accuracy>s)&&(e=void 0,e=o<0?i.start-se(t,n.mediaIndex,u):i.end+se(t,n.mediaIndex+1,u),this.discontinuities[f]={time:e,accuracy:s})}}}]),t}(i.EventTarget),cyt=new gn("./decrypter-worker.worker.js",function(){var n=this,t=function(){function f(n){return n.subarray(0,n.byteLength-n[n.byteLength-1])}var r=function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");},e=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),o=function(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)},s=function(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:n},h=function(){for(var h=[[[],[],[],[],[]],[[],[],[],[],[]]],f=h[0],e=h[1],l=f[4],p=e[4],n=void 0,i=void 0,r=void 0,u=[],a=[],c=void 0,v=void 0,y=void 0,t=void 0,o=void 0,s=void 0,n=0;n<256;n++)a[(u[n]=n<<1^(n>>7)*283)^n]=n;for(i=r=0;!l[i];i^=c||1,r=a[r]||1)for(t=r^r<<1^r<<2^r<<3^r<<4,t=t>>8^t&255^99,l[i]=t,p[t]=i,y=u[v=u[c=u[i]]],s=y*16843009^v*65537^c*257^i*16843008,o=u[t]*257^t*16843008,n=0;n<4;n++)f[n][i]=o=o<<24^o>>>8,e[n][t]=s=s<<24^s>>>8;for(n=0;n<5;n++)f[n]=f[n].slice(0),e[n]=e[n].slice(0);return h},t=null,c=function(){function n(i){r(this,n);t||(t=h());this._tables=[[t[0][0].slice(),t[0][1].slice(),t[0][2].slice(),t[0][3].slice(),t[0][4].slice()],[t[1][0].slice(),t[1][1].slice(),t[1][2].slice(),t[1][3].slice(),t[1][4].slice()]];var f=void 0,c=void 0,u=void 0,s=void 0,v=void 0,o=this._tables[0][4],l=this._tables[1],e=i.length,a=1;if(e!==4&&e!==6&&e!==8)throw new Error("Invalid aes key size");for(s=i.slice(0),v=[],this._key=[s,v],f=e;f<4*e+28;f++)u=s[f-1],(f%e==0||e===8&&f%e==4)&&(u=o[u>>>24]<<24^o[u>>16&255]<<16^o[u>>8&255]<<8^o[u&255],f%e==0&&(u=u<<8^u>>>24^a<<24,a=a<<1^(a>>7)*283)),s[f]=s[f-e]^u;for(c=0;f;c++,f--)u=s[c&3?f:f-4],v[c]=f<=4||c<4?u:l[0][o[u>>>24]]^l[1][o[u>>16&255]]^l[2][o[u>>8&255]]^l[3][o[u&255]]}return n.prototype.decrypt=function(n,t,i,r,u,f){for(var e=this._key[1],o=n^e[0],s=r^e[1],h=i^e[2],c=t^e[3],y=void 0,g=void 0,nt=void 0,tt=e.length/4-2,l=void 0,a=4,v=this._tables[1],p=v[0],w=v[1],b=v[2],k=v[3],d=v[4],l=0;l<tt;l++)y=p[o>>>24]^w[s>>16&255]^b[h>>8&255]^k[c&255]^e[a],g=p[s>>>24]^w[h>>16&255]^b[c>>8&255]^k[o&255]^e[a+1],nt=p[h>>>24]^w[c>>16&255]^b[o>>8&255]^k[s&255]^e[a+2],c=p[c>>>24]^w[o>>16&255]^b[s>>8&255]^k[h&255]^e[a+3],a+=4,o=y,s=g,h=nt;for(l=0;l<4;l++)u[(3&-l)+f]=d[o>>>24]<<24^d[s>>16&255]<<16^d[h>>8&255]<<8^d[c&255]^e[a++],y=o,o=s,s=h,h=c,c=y},n}(),u=function(){function n(){r(this,n);this.listeners={}}return n.prototype.on=function(n,t){this.listeners[n]||(this.listeners[n]=[]);this.listeners[n].push(t)},n.prototype.off=function(n,t){if(!this.listeners[n])return!1;var i=this.listeners[n].indexOf(t);return this.listeners[n].splice(i,1),i>-1},n.prototype.trigger=function(n){var t=this.listeners[n],u,i,f,e,r;if(t)if(arguments.length===2)for(u=t.length,i=0;i<u;++i)t[i].call(this,arguments[1]);else for(f=Array.prototype.slice.call(arguments,1),e=t.length,r=0;r<e;++r)t[r].apply(this,f)},n.prototype.dispose=function(){this.listeners={}},n.prototype.pipe=function(n){this.on("data",function(t){n.push(t)})},n}(),l=function(n){function t(){r(this,t);var i=s(this,n.call(this,u));return i.jobs=[],i.delay=1,i.timeout_=null,i}return o(t,n),t.prototype.processJob_=function(){this.jobs.shift()();this.timeout_=this.jobs.length?setTimeout(this.processJob_.bind(this),this.delay):null},t.prototype.push=function(n){this.jobs.push(n);this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))},t}(u),i=function(n){return n<<24|(n&65280)<<8|(n&16711680)>>8|n>>>24},a=function(n,t,r){var e=new Int32Array(n.buffer,n.byteOffset,n.byteLength>>2),b=new c(Array.prototype.slice.call(t)),w=new Uint8Array(n.byteLength),f=new Int32Array(w.buffer),o=void 0,s=void 0,h=void 0,l=void 0,a=void 0,v=void 0,y=void 0,p=void 0,u=void 0;for(o=r[0],s=r[1],h=r[2],l=r[3],u=0;u<e.length;u+=4)a=i(e[u]),v=i(e[u+1]),y=i(e[u+2]),p=i(e[u+3]),b.decrypt(a,v,y,p,f,u),f[u]=i(f[u]^o),f[u+1]=i(f[u+1]^s),f[u+2]=i(f[u+2]^h),f[u+3]=i(f[u+3]^l),o=a,s=v,h=y,l=p;return w},v=function(){function n(t,u,e,o){r(this,n);var c=n.STEP,h=new Int32Array(t.buffer),a=new Uint8Array(t.byteLength),s=0;for(this.asyncStream_=new l,this.asyncStream_.push(this.decryptChunk_(h.subarray(s,s+c),u,e,a)),s=c;s<h.length;s+=c)e=new Uint32Array([i(h[s-4]),i(h[s-3]),i(h[s-2]),i(h[s-1])]),this.asyncStream_.push(this.decryptChunk_(h.subarray(s,s+c),u,e,a));this.asyncStream_.push(function(){o(null,f(a))})}return n.prototype.decryptChunk_=function(n,t,i,r){return function(){var u=a(n,t,i);r.set(u,n.byteOffset)}},e(n,null,[{key:"STEP",get:function(){return 32e3}}]),n}(),y=function(n){var t={};return Object.keys(n).forEach(function(i){var r=n[i];t[i]=ArrayBuffer.isView(r)?{bytes:r.buffer,byteOffset:r.byteOffset,byteLength:r.byteLength}:r}),t},p=function(n){n.onmessage=function(t){var i=t.data,r=new Uint8Array(i.encrypted.bytes,i.encrypted.byteOffset,i.encrypted.byteLength),u=new Uint32Array(i.key.bytes,i.key.byteOffset,i.key.byteLength/4),f=new Uint32Array(i.iv.bytes,i.iv.byteOffset,i.iv.byteLength/4);new v(r,u,f,function(t,r){n.postMessage(y({source:i.source,decrypted:r}),[r.buffer])})}};return new p(n)}()}),lyt=function(n){var t=n["default"]?"main":"alternative";return n.characteristics&&n.characteristics.indexOf("public.accessibility.describes-video")>=0&&(t="main-desc"),t},ch=function(n,t){n.abort();n.pause();t&&t.activePlaylistLoader&&(t.activePlaylistLoader.pause(),t.activePlaylistLoader=null)},oy=function(n,t){t.activePlaylistLoader=n;n.load()},ayt=function(n,t){return function(){var u=t.segmentLoaders,f=u[n],e=u.main,i=t.mediaTypes[n],o=i.activeTrack(),r=i.activeGroup(o),s=i.activePlaylistLoader;if(ch(f,i),r){if(!r.playlistLoader){s&&e.resetEverything();return}f.resyncLoader();oy(r.playlistLoader,i)}}},vyt=function(n,t){return function(){var f=t.segmentLoaders,u=f[n],o=f.main,i=t.mediaTypes[n],e=i.activeTrack(),r=i.activeGroup(e),s=i.activePlaylistLoader;if(ch(u,i),r){if(!r.playlistLoader){o.resetEverything();return}if(s===r.playlistLoader){oy(r.playlistLoader,i);return}u.track&&u.track(e);u.resetEverything();oy(r.playlistLoader,i)}}},lh={AUDIO:function(n,t){return function(){var o=t.segmentLoaders[n],r=t.mediaTypes[n],s=t.blacklistCurrentPlaylist,u;ch(o,r);var h=r.activeTrack(),f=r.activeGroup(),c=(f.filter(function(n){return n["default"]})[0]||f[0]).id,e=r.tracks[c];if(h===e){s({message:"Problem encountered loading the default audio track."});return}i.log.warn("Problem encountered loading the alternate audio track.Switching back to default.");for(u in r.tracks)r.tracks[u].enabled=r.tracks[u]===e;r.onTrackChanged()}},SUBTITLES:function(n,t){return function(){var f=t.segmentLoaders[n],r=t.mediaTypes[n],u;i.log.warn("Problem encountered loading the subtitle track.Disabling subtitle track.");ch(f,r);u=r.activeTrack();u&&(u.mode="disabled");r.onTrackChanged()}}},wtt={AUDIO:function(n,t,i){if(t){var u=i.tech,f=i.requestOptions,r=i.segmentLoaders[n];t.on("loadedmetadata",function(){var n=t.media();r.playlist(n,f);(!u.paused()||n.endList&&u.preload()!=="none")&&r.load()});t.on("loadedplaylist",function(){r.playlist(t.media(),f);u.paused()||r.load()});t.on("error",lh[n](n,i))}},SUBTITLES:function(n,t,i){var u=i.tech,f=i.requestOptions,r=i.segmentLoaders[n],e=i.mediaTypes[n];t.on("loadedmetadata",function(){var n=t.media();r.playlist(n,f);r.track(e.activeTrack());(!u.paused()||n.endList&&u.preload()!=="none")&&r.load()});t.on("loadedplaylist",function(){r.playlist(t.media(),f);u.paused()||r.load()});t.on("error",lh[n](n,i))}},yyt={AUDIO:function(n,t){var h=t.hls,y=t.sourceType,p=t.segmentLoaders[n],c=t.requestOptions,f=t.master.mediaGroups,l=t.mediaTypes[n],o=l.groups,a=l.tracks,w=t.masterPlaylistLoader,e,u,r,s,v;f[n]&&Object.keys(f[n]).length!==0||(f[n]={main:{"default":{"default":!0}}});for(e in f[n]){o[e]||(o[e]=[]);for(u in f[n][e])r=f[n][e][u],s=void 0,s=r.resolvedUri?new fh(r.resolvedUri,h,c):r.playlists&&y==="dash"?new ry(r.playlists[0],h,c,w):null,r=i.mergeOptions({id:u,playlistLoader:s},r),wtt[n](n,r.playlistLoader,t),o[e].push(r),typeof a[u]=="undefined"&&(v=new i.AudioTrack({id:u,kind:lyt(r),enabled:!1,language:r.language,"default":r["default"],label:u}),a[u]=v)}p.on("error",lh[n](n,t))},SUBTITLES:function(n,t){var p=t.tech,h=t.hls,c=t.sourceType,w=t.segmentLoaders[n],l=t.requestOptions,e=t.master.mediaGroups,a=t.mediaTypes[n],s=a.groups,v=a.tracks,b=t.masterPlaylistLoader,f,u,r,o,y;for(f in e[n]){s[f]||(s[f]=[]);for(u in e[n][f])e[n][f][u].forced||(r=e[n][f][u],o=void 0,c==="hls"?o=new fh(r.resolvedUri,h,l):c==="dash"&&(o=new ry(r.playlists[0],h,l,b)),r=i.mergeOptions({id:u,playlistLoader:o},r),wtt[n](n,r.playlistLoader,t),s[f].push(r),typeof v[u]=="undefined"&&(y=p.addRemoteTextTrack({id:u,kind:"subtitles","default":r["default"]&&r.autoselect,language:r.language,label:u},!1).track,v[u]=y))}w.on("error",lh[n](n,t))},"CLOSED-CAPTIONS":function(n,t){var l=t.tech,e=t.master.mediaGroups,s=t.mediaTypes[n],o=s.groups,h=s.tracks,u,f,r,c;for(u in e[n]){o[u]||(o[u]=[]);for(f in e[n][u])(r=e[n][u][f],r.instreamId.match(/CC\d/))&&(o[u].push(i.mergeOptions({id:f},r)),typeof h[f]=="undefined"&&(c=l.addRemoteTextTrack({id:r.instreamId,kind:"captions","default":r["default"]&&r.autoselect,language:r.language,label:f},!1).track,h[f]=c))}}},pyt=function(n,t){return function(i){var e=t.masterPlaylistLoader,f=t.mediaTypes[n].groups,u=e.media(),r;return u?(r=null,u.attributes[n]&&(r=f[u.attributes[n]]),r=r||f.main,typeof i=="undefined")?r:i===null?null:r.filter(function(n){return n.id===i.id})[0]||null:null}},wyt={AUDIO:function(n,t){return function(){var i=t.mediaTypes[n].tracks,r;for(r in i)if(i[r].enabled)return i[r];return null}},SUBTITLES:function(n,t){return function(){var i=t.mediaTypes[n].tracks,r;for(r in i)if(i[r].mode==="showing")return i[r];return null}}},byt=function(n){var r,f,u,e;["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(function(t){yyt[t](t,n)});var t=n.mediaTypes,o=n.masterPlaylistLoader,i=n.tech,s=n.hls;["AUDIO","SUBTITLES"].forEach(function(i){t[i].activeGroup=pyt(i,n);t[i].activeTrack=wyt[i](i,n);t[i].onGroupChanged=ayt(i,n);t[i].onTrackChanged=vyt(i,n)});r=t.AUDIO.activeGroup();f=(r.filter(function(n){return n["default"]})[0]||r[0]).id;t.AUDIO.tracks[f].enabled=!0;t.AUDIO.onTrackChanged();o.on("mediachange",function(){["AUDIO","SUBTITLES"].forEach(function(n){return t[n].onGroupChanged()})});u=function(){t.AUDIO.onTrackChanged();i.trigger({type:"usage",name:"hls-audio-change"})};i.audioTracks().addEventListener("change",u);i.remoteTextTracks().addEventListener("change",t.SUBTITLES.onTrackChanged);s.on("dispose",function(){i.audioTracks().removeEventListener("change",u);i.remoteTextTracks().removeEventListener("change",t.SUBTITLES.onTrackChanged)});i.clearTracks("audio");for(e in t.AUDIO.tracks)i.audioTracks().addTrack(t.AUDIO.tracks[e])},kyt=function(){var n={};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(function(t){n[t]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:uf,activeTrack:uf,onGroupChanged:uf,onTrackChanged:uf}}),n},dyt=120,tr=void 0,gyt=["mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaBytesTransferred"],npt=function(n){return this.audioSegmentLoader_[n]+this.mainSegmentLoader_[n]},tpt=function(t){function r(n){var u;ii(this,r);var t=oi(this,(r.__proto__||Object.getPrototypeOf(r)).call(this)),f=n.url,s=n.handleManifestRedirects,o=n.withCredentials,e=n.tech,h=n.bandwidth,c=n.externHls,l=n.useCueTags,a=n.blacklistDuration,v=n.enableLowInitialPlaylist,y=n.sourceType,p=n.seekTo,w=n.cacheEncryptionKeys;if(!f)throw new Error("A non-empty playlist URL is required");return tr=c,t.withCredentials=o,t.tech_=e,t.hls_=e.hls,t.seekTo_=p,t.sourceType_=y,t.useCueTags_=l,t.blacklistDuration=a,t.enableLowInitialPlaylist=v,t.useCueTags_&&(t.cueTagsTrack_=t.tech_.addTextTrack("metadata","ad-cues"),t.cueTagsTrack_.inBandMetadataTrackDispatchType=""),t.requestOptions_={withCredentials:o,handleManifestRedirects:s,timeout:null},t.mediaTypes_=kyt(),t.mediaSource=new i.MediaSource,t.mediaSource.addEventListener("sourceopen",t.handleSourceOpen_.bind(t)),t.seekable_=i.createTimeRanges(),t.hasPlayed_=function(){return!1},t.syncController_=new hyt(n),t.segmentMetadataTrack_=e.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},!1).track,t.decrypter_=new cyt,t.inbandTextTracks_={},u={hls:t.hls_,mediaSource:t.mediaSource,currentTime:t.tech_.currentTime.bind(t.tech_),seekable:function(){return t.seekable()},seeking:function(){return t.tech_.seeking()},duration:function(){return t.mediaSource.duration},hasPlayed:function(){return t.hasPlayed_()},goalBufferLength:function(){return t.goalBufferLength()},bandwidth:h,syncController:t.syncController_,decrypter:t.decrypter_,sourceType:t.sourceType_,inbandTextTracks:t.inbandTextTracks_,cacheEncryptionKeys:w},t.masterPlaylistLoader_=t.sourceType_==="dash"?new ry(f,t.hls_,t.requestOptions_):new fh(f,t.hls_,t.requestOptions_),t.setupMasterPlaylistLoaderListeners_(),t.mainSegmentLoader_=new ey(i.mergeOptions(u,{segmentMetadataTrack:t.segmentMetadataTrack_,loaderType:"main"}),n),t.audioSegmentLoader_=new ey(i.mergeOptions(u,{loaderType:"audio"}),n),t.subtitleSegmentLoader_=new fyt(i.mergeOptions(u,{loaderType:"vtt"}),n),t.setupSegmentLoaderListeners_(),gyt.forEach(function(n){t[n+"_"]=npt.bind(t,n)}),t.logger_=le("MPC"),t.masterPlaylistLoader_.load(),t}return yi(r,t),ui(r,[{key:"setupMasterPlaylistLoaderListeners_",value:function(){var n=this;this.masterPlaylistLoader_.on("loadedmetadata",function(){var t=n.masterPlaylistLoader_.media(),r=t.targetDuration*1.5*1e3;n.requestOptions_.timeout=lv(n.masterPlaylistLoader_.master,n.masterPlaylistLoader_.media())?0:r;t.endList&&n.tech_.preload()!=="none"&&(n.mainSegmentLoader_.playlist(t,n.requestOptions_),n.mainSegmentLoader_.load());byt({sourceType:n.sourceType_,segmentLoaders:{AUDIO:n.audioSegmentLoader_,SUBTITLES:n.subtitleSegmentLoader_,main:n.mainSegmentLoader_},tech:n.tech_,requestOptions:n.requestOptions_,masterPlaylistLoader:n.masterPlaylistLoader_,hls:n.hls_,master:n.master(),mediaTypes:n.mediaTypes_,blacklistCurrentPlaylist:n.blacklistCurrentPlaylist.bind(n)});n.triggerPresenceUsage_(n.master(),t);try{n.setupSourceBuffers_()}catch(u){return i.log.warn("Failed to create SourceBuffers",u),n.mediaSource.endOfStream("decode")}if(n.setupFirstPlay(),!n.mediaTypes_.AUDIO.activePlaylistLoader||n.mediaTypes_.AUDIO.activePlaylistLoader.media())n.trigger("selectedinitialmedia");else n.mediaTypes_.AUDIO.activePlaylistLoader.one("loadedmetadata",function(){n.trigger("selectedinitialmedia")})});this.masterPlaylistLoader_.on("loadedplaylist",function(){var i=n.masterPlaylistLoader_.media(),t,r,u;if(!i){n.excludeUnsupportedVariants_();t=void 0;n.enableLowInitialPlaylist&&(t=n.selectInitialPlaylist());t||(t=n.selectPlaylist());n.initialMedia_=t;n.masterPlaylistLoader_.media(n.initialMedia_);return}if(n.useCueTags_&&n.updateAdCues_(i),n.mainSegmentLoader_.playlist(i,n.requestOptions_),n.updateDuration(),n.tech_.paused()||(n.mainSegmentLoader_.load(),n.audioSegmentLoader_&&n.audioSegmentLoader_.load()),!i.endList)if(r=function(){var t=n.seekable();t.length!==0&&n.mediaSource.addSeekableRange_(t.start(0),t.end(0))},n.duration()!==Infinity){u=function u(){if(n.duration()===Infinity)r();else n.tech_.one("durationchange",u)};n.tech_.one("durationchange",u)}else r()});this.masterPlaylistLoader_.on("error",function(){n.blacklistCurrentPlaylist(n.masterPlaylistLoader_.error)});this.masterPlaylistLoader_.on("mediachanging",function(){n.mainSegmentLoader_.abort();n.mainSegmentLoader_.pause()});this.masterPlaylistLoader_.on("mediachange",function(){var t=n.masterPlaylistLoader_.media(),i=t.targetDuration*1.5*1e3;n.requestOptions_.timeout=lv(n.masterPlaylistLoader_.master,n.masterPlaylistLoader_.media())?0:i;n.mainSegmentLoader_.playlist(t,n.requestOptions_);n.mainSegmentLoader_.load();n.tech_.trigger({type:"mediachange",bubbles:!0})});this.masterPlaylistLoader_.on("playlistunchanged",function(){var t=n.masterPlaylistLoader_.media(),i=n.stuckAtPlaylistEnd_(t);i&&(n.blacklistCurrentPlaylist({message:"Playlist no longer updating."}),n.tech_.trigger("playliststuck"))});this.masterPlaylistLoader_.on("renditiondisabled",function(){n.tech_.trigger({type:"usage",name:"hls-rendition-disabled"})});this.masterPlaylistLoader_.on("renditionenabled",function(){n.tech_.trigger({type:"usage",name:"hls-rendition-enabled"})})}},{key:"triggerPresenceUsage_",value:function(n,t){var i=n.mediaGroups||{},u=!0,f=Object.keys(i.AUDIO),r,e,o;for(r in i.AUDIO)for(e in i.AUDIO[r])o=i.AUDIO[r][e],o.uri||(u=!1);u&&this.tech_.trigger({type:"usage",name:"hls-demuxed"});Object.keys(i.SUBTITLES).length&&this.tech_.trigger({type:"usage",name:"hls-webvtt"});tr.Playlist.isAes(t)&&this.tech_.trigger({type:"usage",name:"hls-aes"});tr.Playlist.isFmp4(t)&&this.tech_.trigger({type:"usage",name:"hls-fmp4"});f.length&&Object.keys(i.AUDIO[f[0]]).length>1&&this.tech_.trigger({type:"usage",name:"hls-alternate-audio"});this.useCueTags_&&this.tech_.trigger({type:"usage",name:"hls-playlist-cue-tags"})}},{key:"setupSegmentLoaderListeners_",value:function(){var n=this;this.mainSegmentLoader_.on("bandwidthupdate",function(){var i=n.selectPlaylist(),r=n.masterPlaylistLoader_.media(),t=n.tech_.buffered(),u=t.length?t.end(t.length-1)-n.tech_.currentTime():0,f=n.bufferLowWaterLine();(!r.endList||n.duration()<bt.MAX_BUFFER_LOW_WATER_LINE||i.attributes.BANDWIDTH<r.attributes.BANDWIDTH||u>=f)&&n.masterPlaylistLoader_.media(i);n.tech_.trigger("bandwidthupdate")});this.mainSegmentLoader_.on("progress",function(){n.trigger("progress")});this.mainSegmentLoader_.on("error",function(){n.blacklistCurrentPlaylist(n.mainSegmentLoader_.error())});this.mainSegmentLoader_.on("syncinfoupdate",function(){n.onSyncInfoUpdate_()});this.mainSegmentLoader_.on("timestampoffset",function(){n.tech_.trigger({type:"usage",name:"hls-timestamp-offset"})});this.audioSegmentLoader_.on("syncinfoupdate",function(){n.onSyncInfoUpdate_()});this.mainSegmentLoader_.on("ended",function(){n.onEndOfStream()});this.mainSegmentLoader_.on("earlyabort",function(){n.blacklistCurrentPlaylist({message:"Aborted early because there isn't enough bandwidth to complete the request without rebuffering."},dyt)});this.mainSegmentLoader_.on("reseteverything",function(){n.tech_.trigger("hls-reset")});this.mainSegmentLoader_.on("segmenttimemapping",function(t){n.tech_.trigger({type:"hls-segment-time-mapping",mapping:t.mapping})});this.audioSegmentLoader_.on("ended",function(){n.onEndOfStream()})}},{key:"mediaSecondsLoaded_",value:function(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)}},{key:"load",value:function(){this.mainSegmentLoader_.load();this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load();this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()}},{key:"smoothQualityChange_",value:function(){var n=this.selectPlaylist();n!==this.masterPlaylistLoader_.media()&&(this.masterPlaylistLoader_.media(n),this.mainSegmentLoader_.resetLoader())}},{key:"fastQualityChange_",value:function(){var n=this,t=this.selectPlaylist();t!==this.masterPlaylistLoader_.media()&&(this.masterPlaylistLoader_.media(t),this.mainSegmentLoader_.resetEverything(function(){i.browser.IE_VERSION||i.browser.IS_EDGE?n.tech_.setCurrentTime(n.tech_.currentTime()+.04):n.tech_.setCurrentTime(n.tech_.currentTime())}))}},{key:"play",value:function(){if(!this.setupFirstPlay()){this.tech_.ended()&&this.seekTo_(0);this.hasPlayed_()&&this.load();var n=this.tech_.seekable();if(this.tech_.duration()===Infinity&&this.tech_.currentTime()<n.start(0))return this.seekTo_(n.end(n.length-1))}}},{key:"setupFirstPlay",value:function(){var t=this,r=this.masterPlaylistLoader_.media(),n;if(!r||this.tech_.paused()||this.hasPlayed_())return!1;if(!r.endList){if(n=this.seekable(),!n.length)return!1;if(i.browser.IE_VERSION&&this.tech_.readyState()===0){this.tech_.one("loadedmetadata",function(){t.trigger("firstplay");t.seekTo_(n.end(0));t.hasPlayed_=function(){return!0}});return!1}this.trigger("firstplay");this.seekTo_(n.end(0))}return this.hasPlayed_=function(){return!0},this.load(),!0}},{key:"handleSourceOpen_",value:function(){try{this.setupSourceBuffers_()}catch(t){return i.log.warn("Failed to create Source Buffers",t),this.mediaSource.endOfStream("decode")}if(this.tech_.autoplay()){var n=this.tech_.play();typeof n!="undefined"&&typeof n.then=="function"&&n.then(null,function(){})}this.trigger("sourceopen")}},{key:"onEndOfStream",value:function(){var n=this.mainSegmentLoader_.ended_;if(this.mediaTypes_.AUDIO.activePlaylistLoader&&(n=!this.mainSegmentLoader_.startingMedia_||this.mainSegmentLoader_.startingMedia_.containsVideo?n&&this.audioSegmentLoader_.ended_:this.audioSegmentLoader_.ended_),n){this.logger_("calling mediaSource.endOfStream()");try{this.mediaSource.endOfStream()}catch(t){i.log.warn("Failed to call media source endOfStream",t)}}}},{key:"stuckAtPlaylistEnd_",value:function(n){var e=this.seekable(),t,r;if(!e.length||(t=this.syncController_.getExpiredTime(n,this.mediaSource.duration),t===null))return!1;var u=tr.Playlist.playlistEnd(n,t),f=this.tech_.currentTime(),i=this.tech_.buffered();return i.length?(r=i.end(i.length-1),r-f<=pi&&u-r<=pi):u-f<=pi}},{key:"blacklistCurrentPlaylist",value:function(){var n=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},r=arguments[1],u=void 0,e=void 0,t,f;if(u=n.playlist||this.masterPlaylistLoader_.media(),r=r||n.blacklistDuration||this.blacklistDuration,!u){this.error=n;try{return this.mediaSource.endOfStream("network")}catch(o){return this.trigger("error")}}return(t=this.masterPlaylistLoader_.master.playlists.filter(eh).length===1,f=this.masterPlaylistLoader_.master.playlists,f.length===1)?(i.log.warn("Problem encountered with the current HLS playlist. Trying again since it is the only playlist."),this.tech_.trigger("retryplaylist"),this.masterPlaylistLoader_.load(t)):(t&&(i.log.warn("Removing all playlists from the blacklist because the last rendition is about to be blacklisted."),f.forEach(function(n){n.excludeUntil!==Infinity&&delete n.excludeUntil}),this.tech_.trigger("retryplaylist")),u.excludeUntil=Date.now()+r*1e3,this.tech_.trigger("blacklistplaylist"),this.tech_.trigger({type:"usage",name:"hls-rendition-blacklisted"}),e=this.selectPlaylist(),i.log.warn("Problem encountered with the current HLS playlist."+(n.message?" "+n.message:"")+" Switching to another playlist."),this.masterPlaylistLoader_.media(e,t))}},{key:"pauseLoading",value:function(){this.mainSegmentLoader_.pause();this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.pause();this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.pause()}},{key:"setCurrentTime",value:function(n){var t=wn(this.tech_.buffered(),n);if(!(this.masterPlaylistLoader_&&this.masterPlaylistLoader_.media())||!this.masterPlaylistLoader_.media().segments)return 0;if(t&&t.length)return n;this.mainSegmentLoader_.resetEverything();this.mainSegmentLoader_.abort();this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.resetEverything(),this.audioSegmentLoader_.abort());this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.resetEverything(),this.subtitleSegmentLoader_.abort());this.load()}},{key:"duration",value:function(){return this.masterPlaylistLoader_?this.mediaSource?this.mediaSource.duration:tr.Playlist.duration(this.masterPlaylistLoader_.media()):0}},{key:"seekable",value:function(){return this.seekable_}},{key:"onSyncInfoUpdate_",value:function(){var n=void 0,t=void 0,r,u,f,e;if(this.masterPlaylistLoader_&&(r=this.masterPlaylistLoader_.media(),r)&&(u=this.syncController_.getExpiredTime(r,this.mediaSource.duration),u!==null)&&(n=tr.Playlist.seekable(r,u),n.length!==0)){if(this.mediaTypes_.AUDIO.activePlaylistLoader){if(r=this.mediaTypes_.AUDIO.activePlaylistLoader.media(),u=this.syncController_.getExpiredTime(r,this.mediaSource.duration),u===null)return;if(t=tr.Playlist.seekable(r,u),t.length===0)return}(f=void 0,e=void 0,this.seekable_&&this.seekable_.length&&(f=this.seekable_.end(0),e=this.seekable_.start(0)),this.seekable_=t?t.start(0)>n.end(0)||n.start(0)>t.end(0)?n:i.createTimeRanges([[t.start(0)>n.start(0)?t.start(0):n.start(0),t.end(0)<n.end(0)?t.end(0):n.end(0)]]):n,this.seekable_&&this.seekable_.length&&this.seekable_.end(0)===f&&this.seekable_.start(0)===e)||(this.logger_("seekable updated ["+vv(this.seekable_)+"]"),this.tech_.trigger("seekablechanged"))}}},{key:"updateDuration",value:function(){var n=this,f=this.mediaSource.duration,t=tr.Playlist.duration(this.masterPlaylistLoader_.media()),r=this.tech_.buffered(),u=function u(){n.logger_("Setting duration from "+n.mediaSource.duration+" => "+t);try{n.mediaSource.duration=t}catch(r){i.log.warn("Failed to set media source duration",r)}n.tech_.trigger("durationchange");n.mediaSource.removeEventListener("sourceopen",u)};r.length>0&&(t=Math.max(t,r.end(r.length-1)));f!==t&&(this.mediaSource.readyState!=="open"?this.mediaSource.addEventListener("sourceopen",u):u())}},{key:"dispose",value:function(){var n=this;this.decrypter_.terminate();this.masterPlaylistLoader_.dispose();this.mainSegmentLoader_.dispose();["AUDIO","SUBTITLES"].forEach(function(t){var i=n.mediaTypes_[t].groups,r;for(r in i)i[r].forEach(function(n){n.playlistLoader&&n.playlistLoader.dispose()})});this.audioSegmentLoader_.dispose();this.subtitleSegmentLoader_.dispose()}},{key:"master",value:function(){return this.masterPlaylistLoader_.master}},{key:"media",value:function(){return this.masterPlaylistLoader_.media()||this.initialMedia_}},{key:"setupSourceBuffers_",value:function(){var n=this.masterPlaylistLoader_.media(),t=void 0;if(n&&this.mediaSource.readyState==="open"){if(t=pat(this.masterPlaylistLoader_.master,n),t.length<1)return this.error="No compatible SourceBuffer configuration for the variant stream:"+n.resolvedUri,this.mediaSource.endOfStream("decode");this.configureLoaderMimeTypes_(t);this.excludeIncompatibleVariants_(n)}}},{key:"configureLoaderMimeTypes_",value:function(n){var t=n.length>1&&n[0].indexOf(",")===-1&&n[0]!==n[1]?new i.EventTarget:null;this.mainSegmentLoader_.mimeType(n[0],t);n[1]&&this.audioSegmentLoader_.mimeType(n[1],t)}},{key:"excludeUnsupportedVariants_",value:function(){this.master().playlists.forEach(function(t){t.attributes.CODECS&&n.MediaSource&&n.MediaSource.isTypeSupported&&!n.MediaSource.isTypeSupported('video/mp4; codecs="'+lat(t.attributes.CODECS)+'"')&&(t.excludeUntil=Infinity)})}},{key:"excludeIncompatibleVariants_",value:function(n){var i=2,r=null,t=void 0;n.attributes.CODECS&&(t=he(n.attributes.CODECS),r=t.videoCodec,i=t.codecCount);this.master().playlists.forEach(function(n){var t={codecCount:2,videoCodec:null};n.attributes.CODECS&&(t=he(n.attributes.CODECS));t.codecCount!==i&&(n.excludeUntil=Infinity);t.videoCodec!==r&&(n.excludeUntil=Infinity)})}},{key:"updateAdCues_",value:function(n){var t=0,i=this.seekable();i.length&&(t=i.start(0));oyt(n,this.cueTagsTrack_,t)}},{key:"goalBufferLength",value:function(){var t=this.tech_.currentTime(),n=bt.GOAL_BUFFER_LENGTH,i=bt.GOAL_BUFFER_LENGTH_RATE,r=Math.max(n,bt.MAX_GOAL_BUFFER_LENGTH);return Math.min(n+t*i,r)}},{key:"bufferLowWaterLine",value:function(){var t=this.tech_.currentTime(),n=bt.BUFFER_LOW_WATER_LINE,i=bt.BUFFER_LOW_WATER_LINE_RATE,r=Math.max(n,bt.MAX_BUFFER_LOW_WATER_LINE);return Math.min(n+t*i,r)}}]),r}(i.EventTarget),ipt=function(n,t,i){return function(r){var u=n.master.playlists[t],e=cv(u),f=eh(u);return typeof r=="undefined"?f:(r?delete u.disabled:u.disabled=!0,r===f||e||(i(),r?n.trigger("renditionenabled"):n.trigger("renditiondisabled")),r)}},btt=function btt(n,t,i){var r;ii(this,btt);var u=n.masterPlaylistController_,f=n.options_.smoothQualityChange,e=f?"smooth":"fast",o=u[e+"QualityChange_"].bind(u);t.attributes.RESOLUTION&&(r=t.attributes.RESOLUTION,this.width=r.width,this.height=r.height);this.bandwidth=t.attributes.BANDWIDTH;this.id=i;this.enabled=ipt(n.playlists,t.uri,o)},rpt=function(n){var t=n.playlists;n.representations=function(){return t.master.playlists.filter(function(n){return!cv(n)}).map(function(t){return new btt(n,t,t.uri)})}},ktt=["seeking","seeked","pause","playing","error"],upt=function(){function t(i){var r=this;ii(this,t);this.tech_=i.tech;this.seekable=i.seekable;this.seekTo=i.seekTo;this.allowSeeksWithinUnsafeLiveWindow=i.allowSeeksWithinUnsafeLiveWindow;this.media=i.media;this.consecutiveUpdates=0;this.lastRecordedTime=null;this.timer_=null;this.checkCurrentTimeTimeout_=null;this.logger_=le("PlaybackWatcher");this.logger_("initialize");var u=function(){return r.monitorCurrentTime_()},f=function(){return r.techWaiting_()},e=function(){return r.cancelTimer_()},o=function(){return r.fixesBadSeeks_()};this.tech_.on("seekablechanged",o);this.tech_.on("waiting",f);this.tech_.on(ktt,e);this.tech_.on("canplay",u);this.dispose=function(){r.logger_("dispose");r.tech_.off("seekablechanged",o);r.tech_.off("waiting",f);r.tech_.off(ktt,e);r.tech_.off("canplay",u);r.checkCurrentTimeTimeout_&&n.clearTimeout(r.checkCurrentTimeTimeout_);r.cancelTimer_()}}return ui(t,[{key:"monitorCurrentTime_",value:function(){this.checkCurrentTime_();this.checkCurrentTimeTimeout_&&n.clearTimeout(this.checkCurrentTimeTimeout_);this.checkCurrentTimeTimeout_=n.setTimeout(this.monitorCurrentTime_.bind(this),250)}},{key:"checkCurrentTime_",value:function(){if(this.tech_.seeking()&&this.fixesBadSeeks_()){this.consecutiveUpdates=0;this.lastRecordedTime=this.tech_.currentTime();return}if(!this.tech_.paused()&&!this.tech_.seeking()){var n=this.tech_.currentTime(),t=this.tech_.buffered();if(this.lastRecordedTime===n&&(!t.length||n+pi>=t.end(t.length-1)))return this.techWaiting_();this.consecutiveUpdates>=5&&n===this.lastRecordedTime?(this.consecutiveUpdates++,this.waiting_()):n===this.lastRecordedTime?this.consecutiveUpdates++:(this.consecutiveUpdates=0,this.lastRecordedTime=n)}}},{key:"cancelTimer_",value:function(){this.consecutiveUpdates=0;this.timer_&&(this.logger_("cancelTimer_"),clearTimeout(this.timer_));this.timer_=null}},{key:"fixesBadSeeks_",value:function(){var f=this.tech_.seeking(),r,u;if(!f)return!1;var n=this.seekable(),i=this.tech_.currentTime(),e=this.afterSeekableWindow_(n,i,this.media(),this.allowSeeksWithinUnsafeLiveWindow),t=void 0;return(e&&(r=n.end(n.length-1),t=r),this.beforeSeekableWindow_(n,i)&&(u=n.start(0),t=u+pi),typeof t!="undefined")?(this.logger_("Trying to seek outside of seekable at time "+i+" with "+("seekable range "+vv(n)+". Seeking to ")+(t+".")),this.seekTo(t),!0):!1}},{key:"waiting_",value:function(){if(!this.techWaiting_()){var n=this.tech_.currentTime(),i=this.tech_.buffered(),t=wn(i,n);if(t.length&&n+3<=t.end(0)){this.cancelTimer_();this.seekTo(n);this.logger_("Stopped at "+n+" while inside a buffered region "+("["+t.start(0)+" -> "+t.end(0)+"]. Attempting to resume ")+"playback by seeking to the current time.");this.tech_.trigger({type:"usage",name:"hls-unknown-waiting"});return}}}},{key:"techWaiting_",value:function(){var i=this.seekable(),n=this.tech_.currentTime(),r,u,t,f;return this.tech_.seeking()&&this.fixesBadSeeks_()?!0:this.tech_.seeking()||this.timer_!==null?!0:this.beforeSeekableWindow_(i,n)?(r=i.end(i.length-1),this.logger_("Fell out of live window at time "+n+". Seeking to "+("live point (seekable end) "+r)),this.cancelTimer_(),this.seekTo(r),this.tech_.trigger({type:"usage",name:"hls-live-resync"}),!0):(u=this.tech_.buffered(),t=bn(u,n),this.videoUnderflow_(t,u,n))?(this.cancelTimer_(),this.seekTo(n),this.tech_.trigger({type:"usage",name:"hls-video-underflow"}),!0):t.length>0?(f=t.start(0)-n,this.logger_("Stopped at "+n+", setting timer for "+f+", seeking "+("to "+t.start(0))),this.timer_=setTimeout(this.skipTheGap_.bind(this),f*1e3,n),!0):!1}},{key:"afterSeekableWindow_",value:function(n,t,i){var f=arguments.length>3&&arguments[3]!==undefined?arguments[3]:!1,r,u;return n.length?(r=n.end(n.length-1)+pi,u=!i.endList,u&&f&&(r=n.end(n.length-1)+i.targetDuration*3),t>r)?!0:!1:!1}},{key:"beforeSeekableWindow_",value:function(n,t){return n.length&&n.start(0)>0&&t<n.start(0)-pi?!0:!1}},{key:"videoUnderflow_",value:function(n,t,i){if(n.length===0){var r=this.gapFromVideoUnderflow_(t,i);if(r)return this.logger_("Encountered a gap in video from "+r.start+" to "+r.end+". "+("Seeking to current time "+i)),!0}return!1}},{key:"skipTheGap_",value:function(n){var r=this.tech_.buffered(),t=this.tech_.currentTime(),i=bn(r,t);(this.cancelTimer_(),i.length!==0&&t===n)&&(this.logger_("skipTheGap_:","currentTime:",t,"scheduled currentTime:",n,"nextRange start:",i.start(0)),this.seekTo(i.start(0)+sh),this.tech_.trigger({type:"usage",name:"hls-gap-skip"}))}},{key:"gapFromVideoUnderflow_",value:function(n,t){for(var u=iat(n),r,f,i=0;i<u.length;i++)if(r=u.start(i),f=u.end(i),t-r<4&&t-r>2)return{start:r,end:f};return null}}]),t}(),fpt={errorInterval:30,getSource:function(n){var t=this.tech({IWillNotUseThisInPlugins:!0}),i=t.currentSource_;return n(i)}},dtt=function dtt(n,t){var e=0,u=0,r=i.mergeOptions(fpt,t);n.ready(function(){n.trigger({type:"usage",name:"hls-error-reload-initialized"})});var o=function(){u&&n.currentTime(u)},h=function(t){if(t!==null&&t!==undefined){u=n.duration()!==Infinity&&n.currentTime()||0;n.one("loadedmetadata",o);n.src(t);n.trigger({type:"usage",name:"hls-error-reload"});n.play()}},s=function(){if(Date.now()-e<r.errorInterval*1e3){n.trigger({type:"usage",name:"hls-error-reload-canceled"});return}if(!r.getSource||typeof r.getSource!="function"){i.log.error("ERROR: reloadSourceOnError - The option getSource must be a function!");return}return e=Date.now(),r.getSource.call(n,h)},f=function f(){n.off("loadedmetadata",o);n.off("error",s);n.off("dispose",f)},c=function(t){f();dtt(n,t)};n.on("error",s);n.on("dispose",f);n.reloadSourceOnError=c},gtt=function(n){dtt(this,n)};i.use("*",function(n){return{setSource:function(n,t){t(null,n)},setCurrentTime:function(t){return n.vhs&&n.currentSource().src===n.vhs.source_.src&&n.vhs.setCurrentTime(t),t},play:function(){n.vhs&&n.currentSource().src===n.vhs.source_.src&&n.vhs.setCurrentTime(n.tech_.currentTime())}}});ht={PlaylistLoader:fh,Playlist:vt,Decrypter:lct,AsyncStream:pg,decrypt:wg,utils:plt,STANDARD_PLAYLIST_SELECTOR:wvt,INITIAL_PLAYLIST_SELECTOR:kvt,comparePlaylistBandwidth:fy,comparePlaylistResolution:yvt,xhr:hn()};["GOAL_BUFFER_LENGTH","MAX_GOAL_BUFFER_LENGTH","GOAL_BUFFER_LENGTH_RATE","BUFFER_LOW_WATER_LINE","MAX_BUFFER_LOW_WATER_LINE","BUFFER_LOW_WATER_LINE_RATE","BANDWIDTH_VARIANCE"].forEach(function(n){Object.defineProperty(ht,n,{get:function(){return i.log.warn("using Hls."+n+" is UNSAFE be sure you know what you are doing"),bt[n]},set:function(t){if(i.log.warn("using Hls."+n+" is UNSAFE be sure you know what you are doing"),typeof t!="number"||t<0){i.log.warn("value of Hls."+n+" must be greater than or equal to 0");return}bt[n]=t}})});var nit="videojs-vhs",tit=function(n){var t;return/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i.test(n)?"hls":(t=/^application\/dash\+xml/i,t.test(n))?"dash":null},iit=function(n,t){for(var u=t.media(),r=-1,i=0;i<n.length;i++)if(n[i].id===u.uri){r=i;break}n.selectedIndex_=r;n.trigger({selectedIndex:r,type:"change"})},ept=function(n,t){t.representations().forEach(function(t){n.addQualityLevel(t)});iit(n,t.playlists)};ht.canPlaySource=function(){return i.log.warn("HLS is no longer a tech. Please remove it from your player's techOrder.")};var opt=function(n,t,r){var o,s,f,e,u;if(!n)return n;if(o=void 0,s=void 0,r.mimeType_)o=t.mimeType_,s=r.mimeType_;else{var h=rtt(t.mimeType_),a=h.parameters.codecs.split(","),c=void 0,l=void 0;a.forEach(function(n){n=n.trim();kv(n)?c=n:dv(n)&&(l=n)});o=h.type+'; codecs="'+l+'"';s=h.type.replace("video","audio")+'; codecs="'+c+'"'}f={};e=t.playlist_;for(u in n)f[u]={audioContentType:s,videoContentType:o},e.contentProtection&&e.contentProtection[u]&&e.contentProtection[u].pssh&&(f[u].pssh=e.contentProtection[u].pssh),typeof n[u]=="string"&&(f[u].url=n[u]);return i.mergeOptions(n,f)},spt=function(n){var u=n.masterPlaylistController_.mainSegmentLoader_,f=n.masterPlaylistController_.audioSegmentLoader_,t=i.players[n.tech_.options_.playerId],r;t.eme&&(r=opt(n.source_.keySystems,u,f),r&&(t.currentSource().keySystems=r,i.browser.IE_VERSION===11||!t.eme.initializeMediaKeys||t.eme.initializeMediaKeys()))},rit=function(){if(!window.localStorage)return null;var n=window.localStorage.getItem(nit);if(!n)return null;try{return JSON.parse(n)}catch(t){return null}},hpt=function(n){if(!window.localStorage)return!1;var t=rit();t=t?i.mergeOptions(t,n):n;try{window.localStorage.setItem(nit,JSON.stringify(t))}catch(r){return!1}return t};ht.supportsNativeHls=function(){var r=t.createElement("video"),n;return i.getTech("Html5").isSupported()?(n=["application/vnd.apple.mpegurl","audio/mpegurl","audio/x-mpegurl","application/x-mpegurl","video/x-mpegurl","video/mpegurl","application/mpegurl"],n.some(function(n){return/maybe|probably/i.test(r.canPlayType(n))})):!1}();ht.supportsNativeDash=function(){return i.getTech("Html5").isSupported()?/maybe|probably/i.test(t.createElement("video").canPlayType("application/dash+xml")):!1}();ht.supportsTypeNatively=function(n){return n==="hls"?ht.supportsNativeHls:n==="dash"?ht.supportsNativeDash:!1};ht.isSupported=function(){return i.log.warn("HLS is no longer a tech. Please remove it from your player's techOrder.")};var cpt=i.getComponent("Component"),uit=function(n){function r(n,u,f){var e,o;if(ii(this,r),e=oi(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,u,f.hls)),u.options_&&u.options_.playerId&&(o=i(u.options_.playerId),o.hasOwnProperty("hls")||Object.defineProperty(o,"hls",{get:function(){return i.log.warn("player.hls is deprecated. Use player.tech().hls instead."),u.trigger({type:"usage",name:"hls-player-access"}),e},configurable:!0}),o.vhs=e,o.dash=e,e.player_=o),e.tech_=u,e.source_=n,e.stats={},e.setOptions_(),e.options_.overrideNative&&u.overrideNativeAudioTracks&&u.overrideNativeVideoTracks)u.overrideNativeAudioTracks(!0),u.overrideNativeVideoTracks(!0);else if(e.options_.overrideNative&&(u.featuresNativeVideoTracks||u.featuresNativeAudioTracks))throw new Error("Overriding native HLS requires emulated tracks. See https://git.io/vMpjB");e.on(t,["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],function(){var n=t.fullscreenElement||t.webkitFullscreenElement||t.mozFullScreenElement||t.msFullscreenElement;n&&n.contains(e.tech_.el())&&e.masterPlaylistController_.smoothQualityChange_()});e.on(e.tech_,"seeking",function(){this.tech_.currentTime()===0&&this.tech_.player_.loop()&&this.setCurrentTime(0)});e.on(e.tech_,"error",function(){this.masterPlaylistController_&&this.masterPlaylistController_.pauseLoading()});e.on(e.tech_,"play",e.play);return e}return yi(r,n),ui(r,[{key:"setOptions_",value:function(){var t=this,n;this.options_.withCredentials=this.options_.withCredentials||!1;this.options_.handleManifestRedirects=this.options_.handleManifestRedirects||!1;this.options_.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions===!1?!1:!0;this.options_.smoothQualityChange=this.options_.smoothQualityChange||!1;this.options_.useBandwidthFromLocalStorage=typeof this.source_.useBandwidthFromLocalStorage!="undefined"?this.source_.useBandwidthFromLocalStorage:this.options_.useBandwidthFromLocalStorage||!1;this.options_.customTagParsers=this.options_.customTagParsers||[];this.options_.customTagMappers=this.options_.customTagMappers||[];this.options_.cacheEncryptionKeys=this.options_.cacheEncryptionKeys||!1;typeof this.options_.blacklistDuration!="number"&&(this.options_.blacklistDuration=300);typeof this.options_.bandwidth!="number"&&this.options_.useBandwidthFromLocalStorage&&(n=rit(),n&&n.bandwidth&&(this.options_.bandwidth=n.bandwidth,this.tech_.trigger({type:"usage",name:"hls-bandwidth-from-local-storage"})),n&&n.throughput&&(this.options_.throughput=n.throughput,this.tech_.trigger({type:"usage",name:"hls-throughput-from-local-storage"})));typeof this.options_.bandwidth!="number"&&(this.options_.bandwidth=bt.INITIAL_BANDWIDTH);this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===bt.INITIAL_BANDWIDTH;["withCredentials","limitRenditionByPlayerDimensions","bandwidth","smoothQualityChange","customTagParsers","customTagMappers","handleManifestRedirects","cacheEncryptionKeys"].forEach(function(n){typeof t.source_[n]!="undefined"&&(t.options_[n]=t.source_[n])});this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions}},{key:"src",value:function(n,t){var r=this;if(n){this.setOptions_();this.options_.url=this.source_.src;this.options_.tech=this.tech_;this.options_.externHls=ht;this.options_.sourceType=tit(t);this.options_.seekTo=function(n){r.tech_.setCurrentTime(n);r.setCurrentTime(n)};this.masterPlaylistController_=new tpt(this.options_);this.playbackWatcher_=new upt(i.mergeOptions(this.options_,{seekable:function(){return r.seekable()},media:function(){return r.masterPlaylistController_.media()}}));this.masterPlaylistController_.on("error",function(){var n=i.players[r.tech_.options_.playerId];n.error(r.masterPlaylistController_.error)});this.masterPlaylistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):ht.STANDARD_PLAYLIST_SELECTOR.bind(this);this.masterPlaylistController_.selectInitialPlaylist=ht.INITIAL_PLAYLIST_SELECTOR.bind(this);this.playlists=this.masterPlaylistController_.masterPlaylistLoader_;this.mediaSource=this.masterPlaylistController_.mediaSource;Object.defineProperties(this,{selectPlaylist:{get:function(){return this.masterPlaylistController_.selectPlaylist},set:function(n){this.masterPlaylistController_.selectPlaylist=n.bind(this)}},throughput:{get:function(){return this.masterPlaylistController_.mainSegmentLoader_.throughput.rate},set:function(n){this.masterPlaylistController_.mainSegmentLoader_.throughput.rate=n;this.masterPlaylistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get:function(){return this.masterPlaylistController_.mainSegmentLoader_.bandwidth},set:function(n){this.masterPlaylistController_.mainSegmentLoader_.bandwidth=n;this.masterPlaylistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get:function(){var t=1/(this.bandwidth||1),n=void 0;return n=this.throughput>0?1/this.throughput:0,Math.floor(1/(t+n))},set:function(){i.log.error('The "systemBandwidth" property is read-only')}}});this.options_.bandwidth&&(this.bandwidth=this.options_.bandwidth);this.options_.throughput&&(this.throughput=this.options_.throughput);Object.defineProperties(this.stats,{bandwidth:{get:function(){return r.bandwidth||0},enumerable:!0},mediaRequests:{get:function(){return r.masterPlaylistController_.mediaRequests_()||0},enumerable:!0},mediaRequestsAborted:{get:function(){return r.masterPlaylistController_.mediaRequestsAborted_()||0},enumerable:!0},mediaRequestsTimedout:{get:function(){return r.masterPlaylistController_.mediaRequestsTimedout_()||0},enumerable:!0},mediaRequestsErrored:{get:function(){return r.masterPlaylistController_.mediaRequestsErrored_()||0},enumerable:!0},mediaTransferDuration:{get:function(){return r.masterPlaylistController_.mediaTransferDuration_()||0},enumerable:!0},mediaBytesTransferred:{get:function(){return r.masterPlaylistController_.mediaBytesTransferred_()||0},enumerable:!0},mediaSecondsLoaded:{get:function(){return r.masterPlaylistController_.mediaSecondsLoaded_()||0},enumerable:!0},buffered:{get:function(){return kn(r.tech_.buffered())},enumerable:!0},currentTime:{get:function(){return r.tech_.currentTime()},enumerable:!0},currentSource:{get:function(){return r.tech_.currentSource_},enumerable:!0},currentTech:{get:function(){return r.tech_.name_},enumerable:!0},duration:{get:function(){return r.tech_.duration()},enumerable:!0},master:{get:function(){return r.playlists.master},enumerable:!0},playerDimensions:{get:function(){return r.tech_.currentDimensions()},enumerable:!0},seekable:{get:function(){return kn(r.tech_.seekable())},enumerable:!0},timestamp:{get:function(){return Date.now()},enumerable:!0},videoPlaybackQuality:{get:function(){return r.tech_.getVideoPlaybackQuality()},enumerable:!0}});this.tech_.one("canplay",this.masterPlaylistController_.setupFirstPlay.bind(this.masterPlaylistController_));this.tech_.on("bandwidthupdate",function(){r.options_.useBandwidthFromLocalStorage&&hpt({bandwidth:r.bandwidth,throughput:Math.round(r.throughput)})});this.masterPlaylistController_.on("selectedinitialmedia",function(){rpt(r);spt(r)});this.on(this.masterPlaylistController_,"progress",function(){this.tech_.trigger("progress")});(this.tech_.ready(function(){return r.setupQualityLevels_()}),this.tech_.el())&&this.tech_.src(i.URL.createObjectURL(this.masterPlaylistController_.mediaSource))}}},{key:"setupQualityLevels_",value:function(){var n=this,t=i.players[this.tech_.options_.playerId];if(t&&t.qualityLevels){this.qualityLevels_=t.qualityLevels();this.masterPlaylistController_.on("selectedinitialmedia",function(){ept(n.qualityLevels_,n)});this.playlists.on("mediachange",function(){iit(n.qualityLevels_,n.playlists)})}}},{key:"play",value:function(){this.masterPlaylistController_.play()}},{key:"setCurrentTime",value:function(n){this.masterPlaylistController_.setCurrentTime(n)}},{key:"duration",value:function(){return this.masterPlaylistController_.duration()}},{key:"seekable",value:function(){return this.masterPlaylistController_.seekable()}},{key:"dispose",value:function(){this.playbackWatcher_&&this.playbackWatcher_.dispose();this.masterPlaylistController_&&this.masterPlaylistController_.dispose();this.qualityLevels_&&this.qualityLevels_.dispose();this.player_&&(delete this.player_.vhs,delete this.player_.dash,delete this.player_.hls);this.tech_&&this.tech_.hls&&delete this.tech_.hls;act(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"dispose",this).call(this)}},{key:"convertToProgramTime",value:function(n,t){return tat({playlist:this.masterPlaylistController_.media(),time:n,callback:t})}},{key:"seekToProgramTime",value:function(n,t){var i=arguments.length>2&&arguments[2]!==undefined?arguments[2]:!0,r=arguments.length>3&&arguments[3]!==undefined?arguments[3]:2;return yn({programTime:n,playlist:this.masterPlaylistController_.media(),retryCount:r,pauseAfterSeek:i,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:t})}}]),r}(cpt),sy={name:"videojs-http-streaming",VERSION:"1.11.2",canHandleSource:function(n){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},r=i.mergeOptions(i.options,t);return sy.canPlayType(n.type,r)},handleSource:function(n,t){var r=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{},u=i.mergeOptions(i.options,r);return t.hls=new uit(n,t,u),t.hls.xhr=hn(),t.hls.src(n.src,n.type),t.hls},canPlayType:function(n){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},u=i.mergeOptions(i.options,r),f=u.hls.overrideNative,t=tit(n),e=t&&(!ht.supportsTypeNatively(t)||f);return e?"maybe":""}};return(typeof i.MediaSource=="undefined"||typeof i.URL=="undefined")&&(i.MediaSource=ce,i.URL=ty),ce.supportsNativeMediaSources()&&i.getTech("Html5").registerSourceHandler(sy,0),i.HlsHandler=uit,i.HlsSourceHandler=sy,i.Hls=ht,i.use||i.registerComponent("Hls",ht),i.options.hls=i.options.hls||{},i.registerPlugin?i.registerPlugin("reloadSourceOnError",gtt):i.plugin("reloadSourceOnError",gtt),i});!function(){!function(n){var t=n&&n.videojs;t&&(t.CDN_VERSION="7.7.5")}(window)}();!function(n){function o(n){var i=n.length,r=t.type(n);return"function"===r||t.isWindow(n)?!1:1===n.nodeType&&i?!0:"array"===r||0===i||"number"==typeof i&&i>0&&i-1 in n}var t,i;if(!n.jQuery){t=function(n,i){return new t.fn.init(n,i)};t.isWindow=function(n){return null!=n&&n==n.window};t.type=function(n){return null==n?n+"":"object"==typeof n||"function"==typeof n?r[s.call(n)]||"object":typeof n};t.isArray=Array.isArray||function(n){return"array"===t.type(n)};t.isPlainObject=function(n){var i;if(!n||"object"!==t.type(n)||n.nodeType||t.isWindow(n))return!1;try{if(n.constructor&&!f.call(n,"constructor")&&!f.call(n.constructor.prototype,"isPrototypeOf"))return!1}catch(r){return!1}for(i in n);return void 0===i||f.call(n,i)};t.each=function(n,t,i){var u,r=0,f=n.length,e=o(n);if(i){if(e)for(;f>r&&(u=t.apply(n[r],i),u!==!1);r++);else for(r in n)if(u=t.apply(n[r],i),u===!1)break}else if(e)for(;f>r&&(u=t.call(n[r],r,n[r]),u!==!1);r++);else for(r in n)if(u=t.call(n[r],r,n[r]),u===!1)break;return n};t.data=function(n,r,u){var e,f;if(void 0===u){if(f=n[t.expando],e=f&&i[f],void 0===r)return e;if(e&&r in e)return e[r]}else if(void 0!==r)return f=n[t.expando]||(n[t.expando]=++t.uuid),i[f]=i[f]||{},i[f][r]=u,u};t.removeData=function(n,r){var u=n[t.expando],f=u&&i[u];f&&t.each(r,function(n,t){delete f[t]})};t.extend=function(){var r,e,i,f,o,s,n=arguments[0]||{},u=1,c=arguments.length,h=!1;for("boolean"==typeof n&&(h=n,n=arguments[u]||{},u++),"object"!=typeof n&&"function"!==t.type(n)&&(n={}),u===c&&(n=this,u--);c>u;u++)if(null!=(o=arguments[u]))for(f in o)r=n[f],i=o[f],n!==i&&(h&&i&&(t.isPlainObject(i)||(e=t.isArray(i)))?(e?(e=!1,s=r&&t.isArray(r)?r:[]):s=r&&t.isPlainObject(r)?r:{},n[f]=t.extend(h,s,i)):void 0!==i&&(n[f]=i));return n};t.queue=function(n,i,r){function f(n,t){var i=t||[];return null!=n&&(o(Object(n))?!function(n,t){for(var r=+t.length,i=0,u=n.length;r>i;)n[u++]=t[i++];if(r!==r)for(;void 0!==t[i];)n[u++]=t[i++];return n.length=u,n}(i,"string"==typeof n?[n]:n):[].push.call(i,n)),i}if(n){i=(i||"fx")+"queue";var u=t.data(n,i);return r?(!u||t.isArray(r)?u=t.data(n,i,f(r)):u.push(r),u):u||[]}};t.dequeue=function(n,i){t.each(n.nodeType?[n]:n,function(n,r){i=i||"fx";var f=t.queue(r,i),u=f.shift();"inprogress"===u&&(u=f.shift());u&&("fx"===i&&f.unshift("inprogress"),u.call(r,function(){t.dequeue(r,i)}))})};t.fn=t.prototype={init:function(n){if(n.nodeType)return this[0]=n,this;throw new Error("Not a DOM node.");},offset:function(){var t=this[0].getBoundingClientRect?this[0].getBoundingClientRect():{top:0,left:0};return{top:t.top+(n.pageYOffset||document.scrollTop||0)-(document.clientTop||0),left:t.left+(n.pageXOffset||document.scrollLeft||0)-(document.clientLeft||0)}},position:function(){function a(){for(var n=this.offsetParent||document;n&&!1&&"static"===n.style.position;)n=n.offsetParent;return n||document}var r=this[0],a=a.apply(r),n=this.offset(),i=/^(?:body|html)$/i.test(a.nodeName)?{top:0,left:0}:t(a).offset();return n.top-=parseFloat(r.style.marginTop)||0,n.left-=parseFloat(r.style.marginLeft)||0,a.style&&(i.top+=parseFloat(a.style.borderTopWidth)||0,i.left+=parseFloat(a.style.borderLeftWidth)||0),{top:n.top-i.top,left:n.left-i.left}}};i={};t.expando="velocity"+(new Date).getTime();t.uuid=0;for(var r={},f=r.hasOwnProperty,s=r.toString,e="Boolean Number String Function Array Date RegExp Object Error".split(" "),u=0;u<e.length;u++)r["[object "+e[u]+"]"]=e[u].toLowerCase();t.fn.init.prototype=t.fn;n.Velocity={Utilities:t}}}(window),function(n){"object"==typeof module&&"object"==typeof module.exports?module.exports=n():"function"==typeof define&&define.amd?define(n):n()}(function(){return function(n,t,i,r){function tt(n){for(var t,i=-1,u=n?n.length:0,r=[];++i<u;)t=n[i],t&&r.push(t);return r}function y(n){return s.isWrapped(n)?n=[].slice.call(n):s.isNode(n)&&(n=[n]),n}function e(n){var t=o.data(n,"velocity");return null===t?r:t}function it(n){return function(t){return Math.round(t*n)*(1/n)}}function p(n,i,r,u){function l(n,t){return 1-3*t+3*n}function a(n,t){return 3*t-6*n}function v(n){return 3*n}function s(n,t,i){return((l(t,i)*n+a(t,i))*n+v(t))*n}function y(n,t,i){return 3*l(t,i)*n*n+2*a(t,i)*n+v(t)}function b(t,i){for(var f,e,u=0;tt>u;++u){if(f=y(i,n,r),0===f)return i;e=s(i,n,r)-t;i-=e/f}return i}function k(){for(var t=0;e>t;++t)o[t]=s(t*h,n,r)}function d(t,i,u){var e,f,o=0;do f=i+(u-i)/2,e=s(f,n,r)-t,e>0?u=f:i=f;while(Math.abs(e)>rt&&++o<ut);return f}function g(t){for(var u=0,i=1,c=e-1;i!=c&&o[i]<=t;++i)u+=h;--i;var l=(t-o[i])/(o[i+1]-o[i]),f=u+l*h,s=y(f,n,r);return s>=it?b(t,f):0==s?f:d(t,u,u+h)}function nt(){p=!0;(n!=i||r!=u)&&k()}var tt=4,it=.001,rt=1e-7,ut=10,e=11,h=1/(e-1),ft="Float32Array"in t,f,w;if(4!==arguments.length)return!1;for(f=0;4>f;++f)if("number"!=typeof arguments[f]||isNaN(arguments[f])||!isFinite(arguments[f]))return!1;n=Math.min(n,1);r=Math.min(r,1);n=Math.max(n,0);r=Math.max(r,0);var o=ft?new Float32Array(e):new Array(e),p=!1,c=function(t){return p||nt(),n===i&&r===u?t:0===t?0:1===t?1:s(g(t),i,u)};return c.getControlPoints=function(){return[{x:n,y:i},{x:r,y:u}]},w="generateBezier("+[n,i,r,u]+")",c.toString=function(){return w},c}function w(n,t){var i=n;return s.isString(n)?f.Easings[n]||(i=!1):i=s.isArray(n)&&1===n.length?it.apply(null,n):s.isArray(n)&&2===n.length?nt.apply(null,n.concat([t])):s.isArray(n)&&4===n.length?p.apply(null,n):!1,i===!1&&(i=f.Easings[f.defaults.easing]?f.defaults.easing:g),i}function a(n){var d,ut,c,nt,h,it,ct,v,p,i,lt,et,k,ot,rt;if(n)for(d=(new Date).getTime(),ut=f.State.calls.length,ut>1e4&&(f.State.calls=tt(f.State.calls)),c=0;ut>c;c++)if(f.State.calls[c]){var w=f.State.calls[c],st=w[0],t=w[2],y=w[3],at=!!y,ht=null;y||(y=f.State.calls[c][3]=d-16);for(var g=Math.min((d-y)/t.duration,1),ft=0,vt=st.length;vt>ft;ft++)if(nt=st[ft],h=nt.element,e(h)){it=!1;t.display!==r&&null!==t.display&&"none"!==t.display&&("flex"===t.display&&(ct=["-webkit-box","-moz-box","-ms-flexbox","-webkit-flex"],o.each(ct,function(n,t){u.setPropertyValue(h,"display",t)})),u.setPropertyValue(h,"display",t.display));t.visibility!==r&&"hidden"!==t.visibility&&u.setPropertyValue(h,"visibility",t.visibility);for(v in nt)if("element"!==v){if(i=nt[v],lt=s.isString(i.easing)?f.Easings[i.easing]:i.easing,1===g)p=i.endValue;else if(et=i.endValue-i.startValue,p=i.startValue+et*lt(g,t,et),!at&&p===i.currentValue)continue;(i.currentValue=p,"tween"===v)?ht=p:(u.Hooks.registered[v]&&(k=u.Hooks.getRoot(v),ot=e(h).rootPropertyValueCache[k],ot&&(i.rootPropertyValue=ot)),rt=u.setPropertyValue(h,v,i.currentValue+(0===parseFloat(p)?"":i.unitType),i.rootPropertyValue,i.scrollData),u.Hooks.registered[v]&&(e(h).rootPropertyValueCache[k]=u.Normalizations.registered[k]?u.Normalizations.registered[k]("extract",null,rt[1]):rt[1]),"transform"===rt[0]&&(it=!0))}t.mobileHA&&e(h).transformCache.translate3d===r&&(e(h).transformCache.translate3d="(0px, 0px, 0px)",it=!0);it&&u.flushTransformCache(h)}t.display!==r&&"none"!==t.display&&(f.State.calls[c][2].display=!1);t.visibility!==r&&"hidden"!==t.visibility&&(f.State.calls[c][2].visibility=!1);t.progress&&t.progress.call(w[1],w[1],g,Math.max(0,y+t.duration-d),y,ht);1===g&&b(c)}f.State.isTicking&&l(a)}function b(n,t){var i,c,l,b;if(!f.State.calls[n])return!1;for(var v=f.State.calls[n][0],a=f.State.calls[n][1],s=f.State.calls[n][2],y=f.State.calls[n][4],p=!1,h=0,w=v.length;w>h;h++){if(i=v[h].element,(t||s.loop||("none"===s.display&&u.setPropertyValue(i,"display",s.display),"hidden"===s.visibility&&u.setPropertyValue(i,"visibility",s.visibility)),s.loop!==!0&&(o.queue(i)[1]===r||!/\.velocityQueueEntryFlag/i.test(o.queue(i)[1]))&&e(i))&&(e(i).isAnimating=!1,e(i).rootPropertyValueCache={},c=!1,o.each(u.Lists.transforms3D,function(n,t){var u=/^scale/.test(t)?1:0,f=e(i).transformCache[t];e(i).transformCache[t]!==r&&new RegExp("^\\("+u+"[^.]").test(f)&&(c=!0,delete e(i).transformCache[t])}),s.mobileHA&&(c=!0,delete e(i).transformCache.translate3d),c&&u.flushTransformCache(i),u.Values.removeClass(i,"velocity-animating")),!t&&s.complete&&!s.loop&&h===w-1)try{s.complete.call(a,a)}catch(k){setTimeout(function(){throw k;},1)}y&&s.loop!==!0&&y(a);e(i)&&s.loop===!0&&!t&&(o.each(e(i).tweensContainer,function(n,t){/^rotate/.test(n)&&360===parseFloat(t.endValue)&&(t.endValue=0,t.startValue=360);/^backgroundPosition/.test(n)&&100===parseFloat(t.endValue)&&"%"===t.unitType&&(t.endValue=0,t.startValue=100)}),f(i,"reverse",{loop:!0,delay:s.delay}));s.queue!==!1&&o.dequeue(i,s.queue)}for(f.State.calls[n]=!1,l=0,b=f.State.calls.length;b>l;l++)if(f.State.calls[l]!==!1){p=!0;break}p===!1&&(f.State.isTicking=!1,delete f.State.calls,f.State.calls=[])}var o,h=function(){var n,t;if(i.documentMode)return i.documentMode;for(n=7;n>4;n--)if(t=i.createElement("div"),t.innerHTML="<!--[if IE "+n+"]><span><\/span><![endif]-->",t.getElementsByTagName("span").length)return t=null,n;return r}(),k=function(){var n=0;return t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||function(t){var i,r=(new Date).getTime();return i=Math.max(0,16-(r-n)),n=r+i,setTimeout(function(){t(r+i)},i)}}(),s={isString:function(n){return"string"==typeof n},isArray:Array.isArray||function(n){return"[object Array]"===Object.prototype.toString.call(n)},isFunction:function(n){return"[object Function]"===Object.prototype.toString.call(n)},isNode:function(n){return n&&n.nodeType},isNodeList:function(n){return"object"==typeof n&&/^\[object (HTMLCollection|NodeList|Object)\]$/.test(Object.prototype.toString.call(n))&&n.length!==r&&(0===n.length||"object"==typeof n[0]&&n[0].nodeType>0)},isWrapped:function(n){return n&&(n.jquery||t.Zepto&&t.Zepto.zepto.isZ(n))},isSVG:function(n){return t.SVGElement&&n instanceof t.SVGElement},isEmptyObject:function(n){for(var t in n)return!1;return!0}},d=!1,nt,u,c,l;if(n.fn&&n.fn.jquery?(o=n,d=!0):o=t.Velocity.Utilities,8>=h&&!d)throw new Error("Velocity: IE8 and below require jQuery to be loaded before Velocity.");if(7>=h)return void(jQuery.fn.velocity=jQuery.fn.animate);var v=400,g="swing",f={State:{isMobile:/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),isAndroid:/Android/i.test(navigator.userAgent),isGingerbread:/Android 2\.3\.[3-7]/i.test(navigator.userAgent),isChrome:t.chrome,isFirefox:/Firefox/i.test(navigator.userAgent),prefixElement:i.createElement("div"),prefixMatches:{},scrollAnchor:null,scrollPropertyLeft:null,scrollPropertyTop:null,isTicking:!1,calls:[]},CSS:{},Utilities:o,Redirects:{},Easings:{},Promise:t.Promise,defaults:{queue:"",duration:v,easing:g,begin:r,complete:r,progress:r,display:r,visibility:r,loop:!1,delay:!1,mobileHA:!0,_cacheValues:!0},init:function(n){o.data(n,"velocity",{isSVG:s.isSVG(n),isAnimating:!1,computedStyle:null,tweensContainer:null,rootPropertyValueCache:{},transformCache:{}})},hook:null,mock:!1,version:{major:1,minor:2,patch:2},debug:!1};return t.pageYOffset!==r?(f.State.scrollAnchor=t,f.State.scrollPropertyLeft="pageXOffset",f.State.scrollPropertyTop="pageYOffset"):(f.State.scrollAnchor=i.documentElement||i.body.parentNode||i.body,f.State.scrollPropertyLeft="scrollLeft",f.State.scrollPropertyTop="scrollTop"),nt=function(){function t(n){return-n.tension*n.x-n.friction*n.v}function n(n,i,r){var u={x:n.x+r.dx*i,v:n.v+r.dv*i,tension:n.tension,friction:n.friction};return{dx:u.v,dv:t(u)}}function i(i,r){var u={dx:i.v,dv:t(i)},f=n(i,.5*r,u),e=n(i,.5*r,f),o=n(i,r,e),s=1/6*(u.dx+2*(f.dx+e.dx)+o.dx),h=1/6*(u.dv+2*(f.dv+e.dv)+o.dv);return i.x=i.x+s*r,i.v=i.v+h*r,i}return function r(n,t,u){var o,s,f,h={x:-1,v:0,tension:null,friction:null},c=[0],e=0,l=.0001,a=.016;for(n=parseFloat(n)||500,t=parseFloat(t)||20,u=u||null,h.tension=n,h.friction=t,o=null!==u,o?(e=r(n,t),s=e/u*a):s=a;;)if(f=i(f||h,s),c.push(1+f.x),e+=16,!(Math.abs(f.x)>l&&Math.abs(f.v)>l))break;return o?function(n){return c[n*(c.length-1)|0]}:e}}(),f.Easings={linear:function(n){return n},swing:function(n){return.5-Math.cos(n*Math.PI)/2},spring:function(n){return 1-Math.cos(4.5*n*Math.PI)*Math.exp(6*-n)}},o.each([["ease",[.25,.1,.25,1]],["ease-in",[.42,0,1,1]],["ease-out",[0,0,.58,1]],["ease-in-out",[.42,0,.58,1]],["easeInSine",[.47,0,.745,.715]],["easeOutSine",[.39,.575,.565,1]],["easeInOutSine",[.445,.05,.55,.95]],["easeInQuad",[.55,.085,.68,.53]],["easeOutQuad",[.25,.46,.45,.94]],["easeInOutQuad",[.455,.03,.515,.955]],["easeInCubic",[.55,.055,.675,.19]],["easeOutCubic",[.215,.61,.355,1]],["easeInOutCubic",[.645,.045,.355,1]],["easeInQuart",[.895,.03,.685,.22]],["easeOutQuart",[.165,.84,.44,1]],["easeInOutQuart",[.77,0,.175,1]],["easeInQuint",[.755,.05,.855,.06]],["easeOutQuint",[.23,1,.32,1]],["easeInOutQuint",[.86,0,.07,1]],["easeInExpo",[.95,.05,.795,.035]],["easeOutExpo",[.19,1,.22,1]],["easeInOutExpo",[1,0,0,1]],["easeInCirc",[.6,.04,.98,.335]],["easeOutCirc",[.075,.82,.165,1]],["easeInOutCirc",[.785,.135,.15,.86]]],function(n,t){f.Easings[t[0]]=p.apply(null,t[1])}),u=f.CSS={RegEx:{isHex:/^#([A-f\d]{3}){1,2}$/i,valueUnwrap:/^[A-z]+\((.*)\)$/i,wrappedValueAlreadyExtracted:/[0-9.]+ [0-9.]+ [0-9.]+( [0-9.]+)?/,valueSplit:/([A-z]+\(.+\))|(([A-z0-9#-.]+?)(?=\s|$))/gi},Lists:{colors:["fill","stroke","stopColor","color","backgroundColor","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","outlineColor"],transformsBase:["translateX","translateY","scale","scaleX","scaleY","skewX","skewY","rotateZ"],transforms3D:["transformPerspective","translateZ","scaleZ","rotateX","rotateY"]},Hooks:{templates:{textShadow:["Color X Y Blur","black 0px 0px 0px"],boxShadow:["Color X Y Blur Spread","black 0px 0px 0px 0px"],clip:["Top Right Bottom Left","0px 0px 0px 0px"],backgroundPosition:["X Y","0% 0%"],transformOrigin:["X Y Z","50% 50% 0px"],perspectiveOrigin:["X Y","50% 50%"]},registered:{},register:function(){for(var e,i,r,t,f,o,s,n=0;n<u.Lists.colors.length;n++)e="color"===u.Lists.colors[n]?"0 0 0 1":"255 255 255 1",u.Hooks.templates[u.Lists.colors[n]]=["Red Green Blue Alpha",e];if(h)for(i in u.Hooks.templates)r=u.Hooks.templates[i],t=r[0].split(" "),f=r[1].match(u.RegEx.valueSplit),"Color"===t[0]&&(t.push(t.shift()),f.push(f.shift()),u.Hooks.templates[i]=[t.join(" "),f.join(" ")]);for(i in u.Hooks.templates){r=u.Hooks.templates[i];t=r[0].split(" ");for(n in t)o=i+t[n],s=n,u.Hooks.registered[o]=[i,s]}},getRoot:function(n){var t=u.Hooks.registered[n];return t?t[0]:n},cleanRootPropertyValue:function(n,t){return u.RegEx.valueUnwrap.test(t)&&(t=t.match(u.RegEx.valueUnwrap)[1]),u.Values.isCSSNullValue(t)&&(t=u.Hooks.templates[n][1]),t},extractValue:function(n,t){var i=u.Hooks.registered[n],r,f;return i?(r=i[0],f=i[1],t=u.Hooks.cleanRootPropertyValue(r,t),t.toString().match(u.RegEx.valueSplit)[f]):t},injectValue:function(n,t,i){var r=u.Hooks.registered[n],f,s,e,o;return r?(e=r[0],o=r[1],i=u.Hooks.cleanRootPropertyValue(e,i),f=i.toString().match(u.RegEx.valueSplit),f[o]=t,s=f.join(" ")):i}},Normalizations:{registered:{clip:function(n,t,i){switch(n){case"name":return"clip";case"extract":var r;return u.RegEx.wrappedValueAlreadyExtracted.test(i)?r=i:(r=i.toString().match(u.RegEx.valueUnwrap),r=r?r[1].replace(/,(\s+)?/g," "):i),r;case"inject":return"rect("+i+")"}},blur:function(n,t,i){var r,u;switch(n){case"name":return f.State.isFirefox?"filter":"-webkit-filter";case"extract":return r=parseFloat(i),r||0===r||(u=i.toString().match(/blur\(([0-9]+[A-z]+)\)/i),r=u?u[1]:0),r;case"inject":return parseFloat(i)?"blur("+i+")":"none"}},opacity:function(n,t,i){if(8>=h)switch(n){case"name":return"filter";case"extract":var r=i.toString().match(/alpha\(opacity=(.*)\)/i);return r?r[1]/100:1;case"inject":return t.style.zoom=1,parseFloat(i)>=1?"":"alpha(opacity="+parseInt(100*parseFloat(i),10)+")"}else switch(n){case"name":return"opacity";case"extract":return i;case"inject":return i}}},register:function(){var n;for(9>=h||f.State.isGingerbread||(u.Lists.transformsBase=u.Lists.transformsBase.concat(u.Lists.transforms3D)),n=0;n<u.Lists.transformsBase.length;n++)!function(){var t=u.Lists.transformsBase[n];u.Normalizations.registered[t]=function(n,i,u){switch(n){case"name":return"transform";case"extract":return e(i)===r||e(i).transformCache[t]===r?/^scale/i.test(t)?1:0:e(i).transformCache[t].replace(/[()]/g,"");case"inject":var o=!1;switch(t.substr(0,t.length-1)){case"translate":o=!/(%|px|em|rem|vw|vh|\d)$/i.test(u);break;case"scal":case"scale":f.State.isAndroid&&e(i).transformCache[t]===r&&1>u&&(u=1);o=!/(\d)$/i.test(u);break;case"skew":o=!/(deg|\d)$/i.test(u);break;case"rotate":o=!/(deg|\d)$/i.test(u)}return o||(e(i).transformCache[t]="("+u+")"),e(i).transformCache[t]}}}();for(n=0;n<u.Lists.colors.length;n++)!function(){var t=u.Lists.colors[n];u.Normalizations.registered[t]=function(n,i,f){var e,s,o;switch(n){case"name":return t;case"extract":return u.RegEx.wrappedValueAlreadyExtracted.test(f)?e=f:(o={black:"rgb(0, 0, 0)",blue:"rgb(0, 0, 255)",gray:"rgb(128, 128, 128)",green:"rgb(0, 128, 0)",red:"rgb(255, 0, 0)",white:"rgb(255, 255, 255)"},/^[A-z]+$/i.test(f)?s=o[f]!==r?o[f]:o.black:u.RegEx.isHex.test(f)?s="rgb("+u.Values.hexToRgb(f).join(" ")+")":/^rgba?\(/i.test(f)||(s=o.black),e=(s||f).toString().match(u.RegEx.valueUnwrap)[1].replace(/,(\s+)?/g," ")),8>=h||3!==e.split(" ").length||(e+=" 1"),e;case"inject":return 8>=h?4===f.split(" ").length&&(f=f.split(/\s+/).slice(0,3).join(" ")):3===f.split(" ").length&&(f+=" 1"),(8>=h?"rgb":"rgba")+"("+f.replace(/\s+/g,",").replace(/\.(\d)+(?=,)/g,"")+")"}}}()}},Names:{camelCase:function(n){return n.replace(/-(\w)/g,function(n,t){return t.toUpperCase()})},SVGAttribute:function(n){var t="width|height|x|y|cx|cy|r|rx|ry|x1|x2|y1|y2";return(h||f.State.isAndroid&&!f.State.isChrome)&&(t+="|transform"),new RegExp("^("+t+")$","i").test(n)},prefixCheck:function(n){var i;if(f.State.prefixMatches[n])return[f.State.prefixMatches[n],!0];for(var r=["","Webkit","Moz","ms","O"],t=0,u=r.length;u>t;t++)if(i=0===t?n:r[t]+n.replace(/^\w/,function(n){return n.toUpperCase()}),s.isString(f.State.prefixElement.style[i]))return f.State.prefixMatches[n]=i,[i,!0];return[n,!1]}},Values:{hexToRgb:function(n){var t;return n=n.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(n,t,i,r){return t+t+i+i+r+r}),t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(n),t?[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]:[0,0,0]},isCSSNullValue:function(n){return 0==n||/^(none|auto|transparent|(rgba\(0, ?0, ?0, ?0\)))$/i.test(n)},getUnitType:function(n){return/^(rotate|skew)/i.test(n)?"deg":/(^(scale|scaleX|scaleY|scaleZ|alpha|flexGrow|flexHeight|zIndex|fontWeight)$)|((opacity|red|green|blue|alpha)$)/i.test(n)?"":"px"},getDisplayType:function(n){var t=n&&n.tagName.toString().toLowerCase();return/^(b|big|i|small|tt|abbr|acronym|cite|code|dfn|em|kbd|strong|samp|var|a|bdo|br|img|map|object|q|script|span|sub|sup|button|input|label|select|textarea)$/i.test(t)?"inline":/^(li)$/i.test(t)?"list-item":/^(tr)$/i.test(t)?"table-row":/^(table)$/i.test(t)?"table":/^(tbody)$/i.test(t)?"table-row-group":"block"},addClass:function(n,t){n.classList?n.classList.add(t):n.className+=(n.className.length?" ":"")+t},removeClass:function(n,t){n.classList?n.classList.remove(t):n.className=n.className.toString().replace(new RegExp("(^|\\s)"+t.split(" ").join("|")+"(\\s|$)","gi")," ")}},getPropertyValue:function(n,i,s,c){function y(n,i){function s(){l&&u.setPropertyValue(n,"display","none")}var f=0,l,p,w,a,v;if(8>=h)f=o.css(n,i);else{if(l=!1,/^(width|height)$/.test(i)&&0===u.getPropertyValue(n,"display")&&(l=!0,u.setPropertyValue(n,"display",u.Values.getDisplayType(n))),!c){if("height"===i&&"border-box"!==u.getPropertyValue(n,"boxSizing").toString().toLowerCase())return p=n.offsetHeight-(parseFloat(u.getPropertyValue(n,"borderTopWidth"))||0)-(parseFloat(u.getPropertyValue(n,"borderBottomWidth"))||0)-(parseFloat(u.getPropertyValue(n,"paddingTop"))||0)-(parseFloat(u.getPropertyValue(n,"paddingBottom"))||0),s(),p;if("width"===i&&"border-box"!==u.getPropertyValue(n,"boxSizing").toString().toLowerCase())return w=n.offsetWidth-(parseFloat(u.getPropertyValue(n,"borderLeftWidth"))||0)-(parseFloat(u.getPropertyValue(n,"borderRightWidth"))||0)-(parseFloat(u.getPropertyValue(n,"paddingLeft"))||0)-(parseFloat(u.getPropertyValue(n,"paddingRight"))||0),s(),w}a=e(n)===r?t.getComputedStyle(n,null):e(n).computedStyle?e(n).computedStyle:e(n).computedStyle=t.getComputedStyle(n,null);"borderColor"===i&&(i="borderTopColor");f=9===h&&"filter"===i?a.getPropertyValue(i):a[i];(""===f||null===f)&&(f=n.style[i]);s()}return"auto"===f&&/^(top|right|bottom|left)$/i.test(i)&&(v=y(n,"position"),("fixed"===v||"absolute"===v&&/top|left/i.test(i))&&(f=o(n).position()[i]+"px")),f}var l,p,a,w,v;if(u.Hooks.registered[i]?(p=i,a=u.Hooks.getRoot(p),s===r&&(s=u.getPropertyValue(n,u.Names.prefixCheck(a)[0])),u.Normalizations.registered[a]&&(s=u.Normalizations.registered[a]("extract",n,s)),l=u.Hooks.extractValue(p,s)):u.Normalizations.registered[i]&&(w=u.Normalizations.registered[i]("name",n),"transform"!==w&&(v=y(n,u.Names.prefixCheck(w)[0]),u.Values.isCSSNullValue(v)&&u.Hooks.templates[i]&&(v=u.Hooks.templates[i][1])),l=u.Normalizations.registered[i]("extract",n,v)),!/^[\d-]/.test(l))if(e(n)&&e(n).isSVG&&u.Names.SVGAttribute(i))if(/^(height|width)$/i.test(i))try{l=n.getBBox()[i]}catch(b){l=0}else l=n.getAttribute(i);else l=y(n,u.Names.prefixCheck(i)[0]);return u.Values.isCSSNullValue(l)&&(l=0),f.debug>=2&&console.log("Get "+i+": "+l),l},setPropertyValue:function(n,i,r,o,s){var c=i,a,l;if("scroll"===i)s.container?s.container["scroll"+s.direction]=r:"Left"===s.direction?t.scrollTo(r,s.alternateValue):t.scrollTo(s.alternateValue,r);else if(u.Normalizations.registered[i]&&"transform"===u.Normalizations.registered[i]("name",n))u.Normalizations.registered[i]("inject",n,r),c="transform",r=e(n).transformCache[i];else{if(u.Hooks.registered[i]&&(a=i,l=u.Hooks.getRoot(i),o=o||u.getPropertyValue(n,l),r=u.Hooks.injectValue(a,r,o),i=l),u.Normalizations.registered[i]&&(r=u.Normalizations.registered[i]("inject",n,r),i=u.Normalizations.registered[i]("name",n)),c=u.Names.prefixCheck(i)[0],8>=h)try{n.style[c]=r}catch(v){f.debug&&console.log("Browser does not support ["+r+"] for ["+c+"]")}else e(n)&&e(n).isSVG&&u.Names.SVGAttribute(i)?n.setAttribute(i,r):n.style[c]=r;f.debug>=2&&console.log("Set "+i+" ("+c+"): "+r)}return[c,r]},flushTransformCache:function(n){function t(t){return parseFloat(u.getPropertyValue(n,t))}var i="",r,s,c;(h||f.State.isAndroid&&!f.State.isChrome)&&e(n).isSVG?(r={translate:[t("translateX"),t("translateY")],skewX:[t("skewX")],skewY:[t("skewY")],scale:1!==t("scale")?[t("scale"),t("scale")]:[t("scaleX"),t("scaleY")],rotate:[t("rotateZ"),0,0]},o.each(e(n).transformCache,function(n){/^translate/i.test(n)?n="translate":/^scale/i.test(n)?n="scale":/^rotate/i.test(n)&&(n="rotate");r[n]&&(i+=n+"("+r[n].join(" ")+") ",delete r[n])})):(o.each(e(n).transformCache,function(t){return s=e(n).transformCache[t],"transformPerspective"===t?(c=s,!0):(9===h&&"rotateZ"===t&&(t="rotate"),void(i+=t+s+" "))}),c&&(i="perspective"+c+" "+i));u.setPropertyValue(n,"transform",i)}},u.Hooks.register(),u.Normalizations.register(),f.hook=function(n,t,i){var u=r;return n=y(n),o.each(n,function(n,o){if(e(o)===r&&f.init(o),i===r)u===r&&(u=f.CSS.getPropertyValue(o,t));else{var s=f.CSS.setPropertyValue(o,t,i);"transform"===s[0]&&f.CSS.flushTransformCache(o);u=s}}),u},c=function(){function ft(){return et?d.promise||null:at}function wt(){function g(){function dt(n,t){var i=r,e=r,f=r;return s.isArray(n)?(i=n[0],!s.isArray(n[1])&&/^[\d-]/.test(n[1])||s.isFunction(n[1])||u.RegEx.isHex.test(n[1])?f=n[1]:(s.isString(n[1])&&!u.RegEx.isHex.test(n[1])||s.isArray(n[1]))&&(e=t?n[1]:w(n[1],h.duration),n[2]!==r&&(f=n[2]))):i=n,t||(e=e||h.easing),s.isFunction(i)&&(i=i.call(c,tt,nt)),s.isFunction(f)&&(f=f.call(c,tt,nt)),[i||0,e,f]}function gt(n,t){var i,r;return r=(t||"0").toString().toLowerCase().replace(/[%A-z]+$/,function(n){return i=n,""}),i||(i=u.Values.getUnitType(n)),[r,i]}function ii(){var s={myParent:c.parentNode||i.body,position:u.getPropertyValue(c,"position"),fontSize:u.getPropertyValue(c,"fontSize")},l=s.position===p.lastPosition&&s.myParent===p.lastParent,a=s.fontSize===p.lastFontSize,h,r,n;return p.lastParent=s.myParent,p.lastPosition=s.position,p.lastFontSize=s.fontSize,h=100,r={},a&&l?(r.emToPx=p.lastEmToPx,r.percentToPxWidth=p.lastPercentToPxWidth,r.percentToPxHeight=p.lastPercentToPxHeight):(n=e(c).isSVG?i.createElementNS("http://www.w3.org/2000/svg","rect"):i.createElement("div"),f.init(n),s.myParent.appendChild(n),o.each(["overflow","overflowX","overflowY"],function(t,i){f.CSS.setPropertyValue(n,i,"hidden")}),f.CSS.setPropertyValue(n,"position",s.position),f.CSS.setPropertyValue(n,"fontSize",s.fontSize),f.CSS.setPropertyValue(n,"boxSizing","content-box"),o.each(["minWidth","maxWidth","width","minHeight","maxHeight","height"],function(t,i){f.CSS.setPropertyValue(n,i,h+"%")}),f.CSS.setPropertyValue(n,"paddingLeft",h+"em"),r.percentToPxWidth=p.lastPercentToPxWidth=(parseFloat(u.getPropertyValue(n,"width",null,!0))||1)/h,r.percentToPxHeight=p.lastPercentToPxHeight=(parseFloat(u.getPropertyValue(n,"height",null,!0))||1)/h,r.emToPx=p.lastEmToPx=(parseFloat(u.getPropertyValue(n,"paddingLeft"))||1)/h,s.myParent.removeChild(n)),null===p.remToPx&&(p.remToPx=parseFloat(u.getPropertyValue(i.body,"fontSize"))||16),null===p.vwToPx&&(p.vwToPx=parseFloat(t.innerWidth)/100,p.vhToPx=parseFloat(t.innerHeight)/100),r.remToPx=p.remToPx,r.vwToPx=p.vwToPx,r.vhToPx=p.vhToPx,f.debug>=1&&console.log("Unit ratios: "+JSON.stringify(r),c),r}var vt,ni,pt,st,wt,et,ti,ut,v,ot,ht,lt,ft,at,yt,kt;if(h.begin&&0===tt)try{h.begin.call(k,k)}catch(ri){setTimeout(function(){throw ri;},1)}if("scroll"===it)st=/^x$/i.test(h.axis)?"Left":"Top",wt=parseFloat(h.offset)||0,h.container?s.isWrapped(h.container)||s.isNode(h.container)?(h.container=h.container[0]||h.container,vt=h.container["scroll"+st],pt=vt+o(c).position()[st.toLowerCase()]+wt):h.container=null:(vt=f.State.scrollAnchor[f.State["scrollProperty"+st]],ni=f.State.scrollAnchor[f.State["scrollProperty"+("Left"===st?"Top":"Left")]],pt=o(c).offset()[st.toLowerCase()]+wt),y={scroll:{rootPropertyValue:!1,startValue:vt,currentValue:vt,endValue:pt,unitType:"",easing:h.easing,scrollData:{container:h.container,direction:st,alternateValue:ni}},element:c},f.debug&&console.log("tweensContainer (scroll): ",y.scroll,c);else if("reverse"===it){if(!e(c).tweensContainer)return void o.dequeue(c,h.queue);"none"===e(c).opts.display&&(e(c).opts.display="auto");"hidden"===e(c).opts.visibility&&(e(c).opts.visibility="visible");e(c).opts.loop=!1;e(c).opts.begin=null;e(c).opts.complete=null;n.easing||delete h.easing;n.duration||delete h.duration;h=o.extend({},e(c).opts,h);ut=o.extend(!0,{},e(c).tweensContainer);for(et in ut)"element"!==et&&(ti=ut[et].startValue,ut[et].startValue=ut[et].currentValue=ut[et].endValue,ut[et].endValue=ti,s.isEmptyObject(n)||(ut[et].easing=h.easing),f.debug&&console.log("reverse tweensContainer ("+et+"): "+JSON.stringify(ut[et]),c));y=ut}else if("start"===it){e(c).tweensContainer&&e(c).isAnimating===!0&&(ut=e(c).tweensContainer);o.each(l,function(n,t){var f;if(RegExp("^"+u.Lists.colors.join("$|^")+"$").test(n)){var e=dt(t,!0),o=e[0],s=e[1],h=e[2];if(u.RegEx.isHex.test(o)){for(var c=["Red","Green","Blue"],v=u.Values.hexToRgb(o),a=h?u.Values.hexToRgb(h):r,i=0;i<c.length;i++)f=[v[i]],s&&f.push(s),a!==r&&f.push(a[i]),l[n+c[i]]=f;delete l[n]}}});for(v in l){var bt=dt(l[v]),rt=bt[0],ui=bt[1],g=bt[2];if(v=u.Names.camelCase(v),ot=u.Hooks.getRoot(v),ht=!1,e(c).isSVG||"tween"===ot||u.Names.prefixCheck(ot)[1]!==!1||u.Normalizations.registered[ot]!==r){if((h.display!==r&&null!==h.display&&"none"!==h.display||h.visibility!==r&&"hidden"!==h.visibility)&&/opacity|filter/.test(v)&&!g&&0!==rt&&(g=0),h._cacheValues&&ut&&ut[v]?(g===r&&(g=ut[v].endValue+ut[v].unitType),ht=e(c).rootPropertyValueCache[ot]):u.Hooks.registered[v]?g===r?(ht=u.getPropertyValue(c,ot),g=u.getPropertyValue(c,v,ht)):ht=u.Hooks.templates[ot][1]:g===r&&(g=u.getPropertyValue(c,v)),yt=!1,lt=gt(v,g),g=lt[0],at=lt[1],lt=gt(v,rt),rt=lt[0].replace(/^([+-\/*])=/,function(n,t){return yt=t,""}),ft=lt[1],g=parseFloat(g)||0,rt=parseFloat(rt)||0,"%"===ft&&(/^(fontSize|lineHeight)$/.test(v)?(rt/=100,ft="em"):/^scale/.test(v)?(rt/=100,ft=""):/(Red|Green|Blue)$/i.test(v)&&(rt=rt/100*255,ft="")),/[\/*]/.test(yt))ft=at;else if(at!==ft&&0!==g)if(0===rt)ft=at;else{b=b||ii();kt=/margin|padding|left|right|width|text|word|letter/i.test(v)||/X$/.test(v)||"x"===v?"x":"y";switch(at){case"%":g*="x"===kt?b.percentToPxWidth:b.percentToPxHeight;break;case"px":break;default:g*=b[at+"ToPx"]}switch(ft){case"%":g*=1/("x"===kt?b.percentToPxWidth:b.percentToPxHeight);break;case"px":break;default:g*=1/b[ft+"ToPx"]}}switch(yt){case"+":rt=g+rt;break;case"-":rt=g-rt;break;case"*":rt=g*rt;break;case"/":rt=g/rt}y[v]={rootPropertyValue:ht,startValue:g,currentValue:g,endValue:rt,unitType:ft,easing:ui};f.debug&&console.log("tweensContainer ("+v+"): "+JSON.stringify(y[v]),c)}else f.debug&&console.log("Skipping ["+ot+"] due to a lack of browser support.")}y.element=c}y.element&&(u.Values.addClass(c,"velocity-animating"),ct.push(y),""===h.queue&&(e(c).tweensContainer=y,e(c).opts=h),e(c).isAnimating=!0,tt===nt-1?(f.State.calls.push([ct,k,h,null,d.resolver]),f.State.isTicking===!1&&(f.State.isTicking=!0,a())):tt++)}var b,c=this,h=o.extend({},f.defaults,n),y={};switch(e(c)===r&&f.init(c),parseFloat(h.delay)&&h.queue!==!1&&o.queue(c,h.queue,function(n){f.velocityQueueEntryFlag=!0;e(c).delayTimer={setTimeout:setTimeout(n,parseFloat(h.delay)),next:n}}),h.duration.toString().toLowerCase()){case"fast":h.duration=200;break;case"normal":h.duration=v;break;case"slow":h.duration=600;break;default:h.duration=parseFloat(h.duration)||1}f.mock!==!1&&(f.mock===!0?h.duration=h.delay=1:(h.duration*=parseFloat(f.mock)||1,h.delay*=parseFloat(f.mock)||1));h.easing=w(h.easing,h.duration);h.begin&&!s.isFunction(h.begin)&&(h.begin=null);h.progress&&!s.isFunction(h.progress)&&(h.progress=null);h.complete&&!s.isFunction(h.complete)&&(h.complete=null);h.display!==r&&null!==h.display&&(h.display=h.display.toString().toLowerCase(),"auto"===h.display&&(h.display=f.CSS.Values.getDisplayType(c)));h.visibility!==r&&null!==h.visibility&&(h.visibility=h.visibility.toString().toLowerCase());h.mobileHA=h.mobileHA&&f.State.isMobile&&!f.State.isGingerbread;h.queue===!1?h.delay?setTimeout(g,h.delay):g():o.queue(c,h.queue,function(n,t){return t===!0?(d.promise&&d.resolver(k),!0):(f.velocityQueueEntryFlag=!0,void g(n))});""!==h.queue&&"fx"!==h.queue||"inprogress"===o.queue(c)[0]||o.dequeue(c)}var et,at,rt,k,l,n,vt=arguments[0]&&(arguments[0].p||o.isPlainObject(arguments[0].properties)&&!arguments[0].properties.names||s.isString(arguments[0].properties)),nt,tt,yt,g,d,it,st,ht,p,ct,lt,h,ot,ut;if(s.isWrapped(this)?(et=!1,rt=0,k=this,at=this):(et=!0,rt=1,k=vt?arguments[0].elements||arguments[0].e:arguments[0]),k=y(k)){if(vt?(l=arguments[0].properties||arguments[0].p,n=arguments[0].options||arguments[0].o):(l=arguments[rt],n=arguments[rt+1]),nt=k.length,tt=0,!/^(stop|finish|finishAll)$/i.test(l)&&!o.isPlainObject(n))for(yt=rt+1,n={},g=yt;g<arguments.length;g++)s.isArray(arguments[g])||!/^(fast|normal|slow)$/i.test(arguments[g])&&!/^\d/.test(arguments[g])?s.isString(arguments[g])||s.isArray(arguments[g])?n.easing=arguments[g]:s.isFunction(arguments[g])&&(n.complete=arguments[g]):n.duration=arguments[g];d={promise:null,resolver:null,rejecter:null};et&&f.Promise&&(d.promise=new f.Promise(function(n,t){d.resolver=n;d.rejecter=t}));switch(l){case"scroll":it="scroll";break;case"reverse":it="reverse";break;case"finish":case"finishAll":case"stop":return o.each(k,function(t,i){e(i)&&e(i).delayTimer&&(clearTimeout(e(i).delayTimer.setTimeout),e(i).delayTimer.next&&e(i).delayTimer.next(),delete e(i).delayTimer);"finishAll"===l&&(n===!0||s.isString(n))&&(o.each(o.queue(i,s.isString(n)?n:""),function(n,t){s.isFunction(t)&&t()}),o.queue(i,s.isString(n)?n:"",[]))}),st=[],o.each(f.State.calls,function(t,i){i&&o.each(i[1],function(u,f){var h=n===r?"":n;return h===!0||i[2].queue===h||n===r&&i[2].queue===!1?void o.each(k,function(r,u){u===f&&((n===!0||s.isString(n))&&(o.each(o.queue(u,s.isString(n)?n:""),function(n,t){s.isFunction(t)&&t(null,!0)}),o.queue(u,s.isString(n)?n:"",[])),"stop"===l?(e(u)&&e(u).tweensContainer&&h!==!1&&o.each(e(u).tweensContainer,function(n,t){t.endValue=t.currentValue}),st.push(t)):("finish"===l||"finishAll"===l)&&(i[2].duration=1))}):!0})}),"stop"===l&&(o.each(st,function(n,t){b(t,!0)}),d.promise&&d.resolver(k)),ft();default:if(!o.isPlainObject(l)||s.isEmptyObject(l)){if(s.isString(l)&&f.Redirects[l]){var h=o.extend({},n),bt=h.duration,pt=h.delay||0;return h.backwards===!0&&(k=o.extend(!0,[],k).reverse()),o.each(k,function(n,t){parseFloat(h.stagger)?h.delay=pt+parseFloat(h.stagger)*n:s.isFunction(h.stagger)&&(h.delay=pt+h.stagger.call(t,n,nt));h.drag&&(h.duration=parseFloat(bt)||(/^(callout|transition)/.test(l)?1e3:v),h.duration=Math.max(h.duration*(h.backwards?1-n/nt:(n+1)/nt),.75*h.duration,200));f.Redirects[l].call(t,t,h||{},n,nt,k,d.promise?d:r)}),ft()}return ht="Velocity: First argument ("+l+") was not a property map, a known action, or a registered redirect. Aborting.",d.promise?d.rejecter(new Error(ht)):console.log(ht),ft()}it="start"}if(p={lastParent:null,lastPosition:null,lastFontSize:null,lastPercentToPxWidth:null,lastPercentToPxHeight:null,lastEmToPx:null,remToPx:null,vwToPx:null,vhToPx:null},ct=[],o.each(k,function(n,t){s.isNode(t)&&wt.call(t)}),h=o.extend({},f.defaults,n),h.loop=parseInt(h.loop),lt=2*h.loop-1,h.loop)for(ot=0;lt>ot;ot++)ut={delay:h.delay,progress:h.progress},ot===lt-1&&(ut.display=h.display,ut.visibility=h.visibility,ut.complete=h.complete),c(k,"reverse",ut);return ft()}},f=o.extend(c,f),f.animate=c,l=t.requestAnimationFrame||k,f.State.isMobile||i.hidden===r||i.addEventListener("visibilitychange",function(){i.hidden?(l=function(n){return setTimeout(function(){n(!0)},16)},a()):l=t.requestAnimationFrame||k}),n.Velocity=f,n!==t&&(n.fn.velocity=c,n.fn.velocity.defaults=f.defaults),o.each(["Down","Up"],function(n,t){f.Redirects["slide"+t]=function(n,i,u,e,s,h){var c=o.extend({},i),v=c.begin,y=c.complete,a={height:"",marginTop:"",marginBottom:"",paddingTop:"",paddingBottom:""},l={};c.display===r&&(c.display="Down"===t?"inline"===f.CSS.Values.getDisplayType(n)?"inline-block":"block":"none");c.begin=function(){var i,r;v&&v.call(s,s);for(i in a)l[i]=n.style[i],r=f.CSS.getPropertyValue(n,i),a[i]="Down"===t?[r,0]:[0,r];l.overflow=n.style.overflow;n.style.overflow="hidden"};c.complete=function(){for(var t in l)n.style[t]=l[t];y&&y.call(s,s);h&&h.resolver(s)};f(n,a,c)}}),o.each(["In","Out"],function(n,t){f.Redirects["fade"+t]=function(n,i,u,e,s,h){var c=o.extend({},i),a={opacity:"In"===t?1:0},l=c.complete;c.complete=u!==e-1?c.begin=null:function(){l&&l.call(s,s);h&&h.resolver(s)};c.display===r&&(c.display="In"===t?"auto":"none");f(this,a,c)}}),f}(window.jQuery||window.Zepto||window,window,document)}),function(n,t){if(typeof exports=="object"&&typeof module!="undefined"){var i=require("video.js");module.exports=t(i.default||i)}else typeof define=="function"&&define.amd?define(["videojs"],function(i){return n.Youtube=t(i)}):n.Youtube=t(n.videojs)}(this,function(n){"use strict";function u(){YT.ready(function(){t.isApiReady=!0;for(var n=0;n<t.apiReadyQueue.length;++n)t.apiReadyQueue[n].initYTPlayer()})}function f(n,t){var i=!1,r=document.createElement("script"),u=document.getElementsByTagName("script")[0];u&&(u.parentNode.insertBefore(r,u),r.onload=function(){i||(i=!0,t())},r.onreadystatechange=function(){i||this.readyState!=="complete"&&this.readyState!=="loaded"||(i=!0,t())},r.src=n)}function e(){var t=".vjs-youtube .vjs-iframe-blocker { display: none; }.vjs-youtube.vjs-user-inactive .vjs-iframe-blocker { display: block; }.vjs-youtube .vjs-poster { background-size: cover; }.vjs-youtube-mobile .vjs-big-play-button { display: none; }",i=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css";n.styleSheet?n.styleSheet.cssText=t:n.appendChild(document.createTextNode(t));i.appendChild(n)}var i=n.browser.IS_IOS||n.browser.IS_NATIVE_ANDROID,r=n.getTech("Tech"),t=n.extend(r,{constructor:function(n,u){r.call(this,n,u);this.setPoster(n.poster);this.setSrc(this.options_.source,!0);this.setTimeout(function(){this.el_&&(this.el_.parentNode.className+=" vjs-youtube",i&&(this.el_.parentNode.className+=" vjs-youtube-mobile"),t.isApiReady?this.initYTPlayer():t.apiReadyQueue.push(this))}.bind(this))},dispose:function(){if(this.ytPlayer)this.ytPlayer.stopVideo&&this.ytPlayer.stopVideo(),this.ytPlayer.destroy&&this.ytPlayer.destroy();else{var n=t.apiReadyQueue.indexOf(this);n!==-1&&t.apiReadyQueue.splice(n,1)}this.ytPlayer=null;this.el_.parentNode.className=this.el_.parentNode.className.replace(" vjs-youtube","").replace(" vjs-youtube-mobile","");this.el_.parentNode.removeChild(this.el_);r.prototype.dispose.call(this)},createEl:function(){var t=document.createElement("div"),r,n;return t.setAttribute("id",this.options_.techId),t.setAttribute("style","width:100%;height:100%;top:0;left:0;position:absolute"),t.setAttribute("class","vjs-tech"),r=document.createElement("div"),r.appendChild(t),i||this.options_.ytControls||(n=document.createElement("div"),n.setAttribute("class","vjs-iframe-blocker"),n.setAttribute("style","position:absolute;top:0;left:0;width:100%;height:100%"),n.onclick=function(){this.pause()}.bind(this),r.appendChild(n)),r},initYTPlayer:function(){var n={controls:0,modestbranding:1,rel:0,showinfo:0,loop:this.options_.loop?1:0},r,u,t,i;typeof this.options_.autohide!="undefined"&&(n.autohide=this.options_.autohide);typeof this.options_.cc_load_policy!="undefined"&&(n.cc_load_policy=this.options_.cc_load_policy);typeof this.options_.ytControls!="undefined"&&(n.controls=this.options_.ytControls);typeof this.options_.disablekb!="undefined"&&(n.disablekb=this.options_.disablekb);typeof this.options_.color!="undefined"&&(n.color=this.options_.color);n.controls?typeof this.options_.fs!="undefined"&&(n.fs=this.options_.fs):n.fs=0;this.options_.source.src.indexOf("end=")!==-1&&(r=this.options_.source.src.match(/end=([0-9]*)/),this.options_.end=parseInt(r[1]));typeof this.options_.end!="undefined"&&(n.end=this.options_.end);typeof this.options_.hl!="undefined"?n.hl=this.options_.hl:typeof this.options_.language!="undefined"&&(n.hl=this.options_.language.substr(0,2));typeof this.options_.iv_load_policy!="undefined"&&(n.iv_load_policy=this.options_.iv_load_policy);typeof this.options_.list!="undefined"?(App.console.log("LIST????"),n.list=this.options_.list):this.url&&typeof this.url.listId!="undefined"&&(n.list=this.url.listId);typeof this.options_.listType!="undefined"&&(n.listType=this.options_.listType);typeof this.options_.modestbranding!="undefined"&&(n.modestbranding=this.options_.modestbranding);typeof this.options_.playlist!="undefined"&&(n.playlist=this.options_.playlist);typeof this.options_.playsinline!="undefined"&&(n.playsinline=this.options_.playsinline);typeof this.options_.rel!="undefined"&&(n.rel=this.options_.rel);typeof this.options_.showinfo!="undefined"&&(n.showinfo=this.options_.showinfo);this.options_.source.src.indexOf("start=")!==-1&&(u=this.options_.source.src.match(/start=([0-9]*)/),this.options_.start=parseInt(u[1]));typeof this.options_.start!="undefined"&&(n.start=this.options_.start);typeof this.options_.theme!="undefined"&&(n.theme=this.options_.theme);typeof this.options_.customVars!="undefined"&&(t=this.options_.customVars,Object.keys(t).forEach(function(i){n[i]=t[i]}));this.activeVideoId=this.url?this.url.videoId:null;this.activeList=n.list;i={videoId:this.activeVideoId,playerVars:n,events:{onReady:this.onPlayerReady.bind(this),onPlaybackQualityChange:this.onPlayerPlaybackQualityChange.bind(this),onPlaybackRateChange:this.onPlayerPlaybackRateChange.bind(this),onStateChange:this.onPlayerStateChange.bind(this),onVolumeChange:this.onPlayerVolumeChange.bind(this),onError:this.onPlayerError.bind(this)}};typeof this.options_.enablePrivacyEnhancedMode!="undefined"&&this.options_.enablePrivacyEnhancedMode&&(i.host="https://www.youtube-nocookie.com");this.ytPlayer=new YT.Player(this.options_.techId,i)},onPlayerReady:function(){this.options_.muted&&this.ytPlayer.mute();var n=this.ytPlayer.getAvailablePlaybackRates();n.length>1&&(this.featuresPlaybackRate=!0);this.playerReady_=!0;this.triggerReady();this.playOnReady?this.play():this.cueOnReady&&(this.cueVideoById_(this.url.videoId),this.activeVideoId=this.url.videoId)},onPlayerPlaybackQualityChange:function(){},onPlayerPlaybackRateChange:function(){this.trigger("ratechange")},onPlayerStateChange:function(n){var t=n.data;if(t!==this.lastState&&!this.errorNumber){this.lastState=t;switch(t){case-1:this.trigger("loadstart");this.trigger("loadedmetadata");this.trigger("durationchange");this.trigger("ratechange");break;case YT.PlayerState.ENDED:this.trigger("ended");break;case YT.PlayerState.PLAYING:this.trigger("timeupdate");this.trigger("durationchange");this.trigger("playing");this.trigger("play");this.isSeeking&&this.onSeeked();break;case YT.PlayerState.PAUSED:this.trigger("canplay");this.isSeeking?this.onSeeked():this.trigger("pause");break;case YT.PlayerState.BUFFERING:this.player_.trigger("timeupdate");this.player_.trigger("waiting")}}},onPlayerVolumeChange:function(){this.trigger("volumechange")},onPlayerError:function(n){this.errorNumber=n.data;this.trigger("pause");this.trigger("error")},error:function(){var n=1e3+this.errorNumber;switch(this.errorNumber){case 5:return{code:n,message:"Error while trying to play the video"};case 2:case 100:return{code:n,message:"Unable to find the video"};case 101:case 150:return{code:n,message:"Playback on other Websites has been disabled by the video owner."}}return{code:n,message:"YouTube unknown error ("+this.errorNumber+")"}},loadVideoById_:function(n){var t={videoId:n};this.options_.start&&(t.startSeconds=this.options_.start);this.options_.end&&(t.endSeconds=this.options_.end);this.ytPlayer.loadVideoById(t)},cueVideoById_:function(n){var t={videoId:n};this.options_.start&&(t.startSeconds=this.options_.start);this.options_.end&&(t.endSeconds=this.options_.end);this.ytPlayer.cueVideoById(t)},src:function(n){return n&&this.setSrc({src:n}),this.source},poster:function(){return i?null:this.poster_},setPoster:function(n){this.poster_=n},setSrc:function(n){n&&n.src&&(delete this.errorNumber,this.source=n,this.url=t.parseUrl(n.src),this.options_.poster||this.url.videoId&&(this.poster_="https://img.youtube.com/vi/"+this.url.videoId+"/0.jpg",this.trigger("posterchange"),this.checkHighResPoster()),this.options_.autoplay&&!i?this.isReady_?this.play():this.playOnReady=!0:this.activeVideoId!==this.url.videoId&&(this.isReady_?(this.cueVideoById_(this.url.videoId),this.activeVideoId=this.url.videoId):this.cueOnReady=!0))},autoplay:function(){return this.options_.autoplay},setAutoplay:function(n){this.options_.autoplay=n},loop:function(){return this.options_.loop},setLoop:function(n){this.options_.loop=n},play:function(){this.url&&this.url.videoId&&(this.wasPausedBeforeSeek=!1,this.isReady_?(this.url.listId&&(this.activeList===this.url.listId?this.ytPlayer.playVideo():(this.ytPlayer.loadPlaylist(this.url.listId),this.activeList=this.url.listId)),this.activeVideoId===this.url.videoId?this.ytPlayer.playVideo():(this.loadVideoById_(this.url.videoId),this.activeVideoId=this.url.videoId)):(this.trigger("waiting"),this.playOnReady=!0))},pause:function(){this.ytPlayer&&this.ytPlayer.pauseVideo()},paused:function(){return this.ytPlayer?this.lastState!==YT.PlayerState.PLAYING&&this.lastState!==YT.PlayerState.BUFFERING:!0},currentTime:function(){return this.ytPlayer?this.ytPlayer.getCurrentTime():0},setCurrentTime:function(n){this.lastState===YT.PlayerState.PAUSED&&(this.timeBeforeSeek=this.currentTime());this.isSeeking||(this.wasPausedBeforeSeek=this.paused());this.ytPlayer.seekTo(n,!0);this.trigger("timeupdate");this.trigger("seeking");this.isSeeking=!0;this.lastState===YT.PlayerState.PAUSED&&this.timeBeforeSeek!==n&&(clearInterval(this.checkSeekedInPauseInterval),this.checkSeekedInPauseInterval=setInterval(function(){this.lastState===YT.PlayerState.PAUSED&&this.isSeeking?this.currentTime()!==this.timeBeforeSeek&&(this.trigger("timeupdate"),this.onSeeked()):clearInterval(this.checkSeekedInPauseInterval)}.bind(this),250))},seeking:function(){return this.isSeeking},seekable:function(){return this.ytPlayer?n.createTimeRange(0,this.ytPlayer.getDuration()):n.createTimeRange()},onSeeked:function(){clearInterval(this.checkSeekedInPauseInterval);this.isSeeking=!1;this.wasPausedBeforeSeek&&this.pause();this.trigger("seeked")},playbackRate:function(){return this.ytPlayer?this.ytPlayer.getPlaybackRate():1},setPlaybackRate:function(n){this.ytPlayer&&this.ytPlayer.setPlaybackRate(n)},duration:function(){return this.ytPlayer?this.ytPlayer.getDuration():0},currentSrc:function(){return this.source&&this.source.src},ended:function(){return this.ytPlayer?this.lastState===YT.PlayerState.ENDED:!1},volume:function(){return this.ytPlayer?this.ytPlayer.getVolume()/100:1},setVolume:function(n){this.ytPlayer&&this.ytPlayer.setVolume(n*100)},muted:function(){return this.ytPlayer?this.ytPlayer.isMuted():!1},setMuted:function(n){if(this.ytPlayer)this.muted(!0);else return;n?this.ytPlayer.mute():this.ytPlayer.unMute();this.setTimeout(function(){this.trigger("volumechange")},50)},buffered:function(){if(!this.ytPlayer||!this.ytPlayer.getVideoLoadedFraction)return n.createTimeRange();var t=this.ytPlayer.getVideoLoadedFraction()*this.ytPlayer.getDuration();return n.createTimeRange(0,t)},preload:function(){},load:function(){},reset:function(){},networkState:function(){if(!this.ytPlayer)return 0;switch(this.ytPlayer.getPlayerState()){case-1:return 0;case 3:return 2;default:return 1}},readyState:function(){if(!this.ytPlayer)return 0;switch(this.ytPlayer.getPlayerState()){case-1:return 0;case 5:return 1;case 3:return 2;default:return 4}},supportsFullScreen:function(){return document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled},checkHighResPoster:function(){var t="https://img.youtube.com/vi/"+this.url.videoId+"/maxresdefault.jpg",n;try{n=new Image;n.onload=function(){if("naturalHeight"in n){if(n.naturalHeight<=90||n.naturalWidth<=120)return}else if(n.height<=90||n.width<=120)return;this.poster_=t;this.trigger("posterchange")}.bind(this);n.onerror=function(){};n.src=t}catch(i){}}});t.isSupported=function(){return!0};t.canPlaySource=function(n){return t.canPlayType(n.type)};t.canPlayType=function(n){return n==="video/youtube"};t.parseUrl=function(n){var i={videoId:null},t=n.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/),r;return t&&t[2].length===11&&(i.videoId=t[2]),r=/[?&]list=([^#\&\?]+)/,t=n.match(r),t&&t[1]&&(i.listId=t[1]),i};t.apiReadyQueue=[];typeof document!="undefined"&&(f("https://www.youtube.com/iframe_api",u),e());typeof n.registerTech!="undefined"?n.registerTech("Youtube",t):n.registerComponent("Youtube",t)});!function(n,t){"use strict";"function"==typeof define&&define.amd?define("jquery-bridget/jquery-bridget",["jquery"],function(i){t(n,i)}):"object"==typeof module&&module.exports?module.exports=t(n,require("jquery")):n.jQueryBridget=t(n,n.jQuery)}(window,function(n,t){"use strict";function i(i,u,o){function s(n,t,r){var u,e="$()."+i+'("'+t+'")';return n.each(function(n,s){var h=o.data(s,i),c,l;if(!h)return void f(i+" not initialized. Cannot call methods, i.e. "+e);if(c=h[t],!c||"_"==t.charAt(0))return void f(e+" is not a valid method");l=c.apply(h,r);u=void 0===u?l:u}),void 0!==u?u:n}function h(n,t){n.each(function(n,r){var f=o.data(r,i);f?(f.option(t),f._init()):(f=new u(r,t),o.data(r,i,f))})}o=o||t||n.jQuery;o&&(u.prototype.option||(u.prototype.option=function(n){o.isPlainObject(n)&&(this.options=o.extend(!0,this.options,n))}),o.fn[i]=function(n){if("string"==typeof n){var t=e.call(arguments,1);return s(this,n,t)}return h(this,n),this},r(o))}function r(n){!n||n&&n.bridget||(n.bridget=i)}var e=Array.prototype.slice,u=n.console,f="undefined"==typeof u?function(){}:function(n){u.error(n)};return r(t||n.jQuery),i}),function(n,t){"use strict";"function"==typeof define&&define.amd?define("get-size/get-size",[],function(){return t()}):"object"==typeof module&&module.exports?module.exports=t():n.getSize=t()}(window,function(){"use strict";function n(n){var t=parseFloat(n),i=-1==n.indexOf("%")&&!isNaN(t);return i&&t}function o(){}function s(){for(var r,i={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},n=0;f>n;n++)r=t[n],i[r]=0;return i}function i(n){var t=getComputedStyle(n);return t||c("Style returned "+t+". Are you running this code in a hidden iframe on Firefox? See http://bit.ly/getsizebug1"),t}function h(){var t,f,o;e||(e=!0,t=document.createElement("div"),t.style.width="200px",t.style.padding="1px 2px 3px 4px",t.style.borderStyle="solid",t.style.borderWidth="1px 2px 3px 4px",t.style.boxSizing="border-box",f=document.body||document.documentElement,f.appendChild(t),o=i(t),r.isBoxSizeOuter=u=200==n(o.width),f.removeChild(t))}function r(r){var o,e,a,c,l;if(h(),"string"==typeof r&&(r=document.querySelector(r)),r&&"object"==typeof r&&r.nodeType){if(o=i(r),"none"==o.display)return s();for(e={},e.width=r.offsetWidth,e.height=r.offsetHeight,a=e.isBorderBox="border-box"==o.boxSizing,c=0;f>c;c++){var v=t[c],nt=o[v],y=parseFloat(nt);e[v]=isNaN(y)?0:y}var p=e.paddingLeft+e.paddingRight,w=e.paddingTop+e.paddingBottom,tt=e.marginLeft+e.marginRight,it=e.marginTop+e.marginBottom,b=e.borderLeftWidth+e.borderRightWidth,k=e.borderTopWidth+e.borderBottomWidth,d=a&&u,g=n(o.width);return g!==!1&&(e.width=g+(d?0:p+b)),l=n(o.height),l!==!1&&(e.height=l+(d?0:w+k)),e.innerWidth=e.width-(p+b),e.innerHeight=e.height-(w+k),e.outerWidth=e.width+tt,e.outerHeight=e.height+it,e}}var u,c="undefined"==typeof console?o:function(n){console.error(n)},t=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],f=t.length,e=!1;return r}),function(n,t){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",t):"object"==typeof module&&module.exports?module.exports=t():n.EvEmitter=t()}(this,function(){function t(){}var n=t.prototype;return n.on=function(n,t){if(n&&t){var i=this._events=this._events||{},r=i[n]=i[n]||[];return-1==r.indexOf(t)&&r.push(t),this}},n.once=function(n,t){if(n&&t){this.on(n,t);var i=this._onceEvents=this._onceEvents||{},r=i[n]=i[n]||{};return r[t]=!0,this}},n.off=function(n,t){var i=this._events&&this._events[n],r;if(i&&i.length)return r=i.indexOf(t),-1!=r&&i.splice(r,1),this},n.emitEvent=function(n,t){var r=this._events&&this._events[n],u,i,f,e;if(r&&r.length){for(u=0,i=r[u],t=t||[],f=this._onceEvents&&this._onceEvents[n];i;)e=f&&f[i],e&&(this.off(n,i),delete f[i]),i.apply(this,t),u+=e?0:1,i=r[u];return this}},t}),function(n,t){"use strict";"function"==typeof define&&define.amd?define("desandro-matches-selector/matches-selector",t):"object"==typeof module&&module.exports?module.exports=t():n.matchesSelector=t()}(window,function(){"use strict";var n=function(){var t=Element.prototype,i,n,u,r;if(t.matches)return"matches";if(t.matchesSelector)return"matchesSelector";for(i=["webkit","moz","ms","o"],n=0;n<i.length;n++)if(u=i[n],r=u+"MatchesSelector",t[r])return r}();return function(t,i){return t[n](i)}}),function(n,t){"function"==typeof define&&define.amd?define("fizzy-ui-utils/utils",["desandro-matches-selector/matches-selector"],function(i){return t(n,i)}):"object"==typeof module&&module.exports?module.exports=t(n,require("desandro-matches-selector")):n.fizzyUIUtils=t(n,n.matchesSelector)}(window,function(n,t){var i={},r;return i.extend=function(n,t){for(var i in t)n[i]=t[i];return n},i.modulo=function(n,t){return(n%t+t)%t},i.makeArray=function(n){var t=[],i;if(Array.isArray(n))t=n;else if(n&&"number"==typeof n.length)for(i=0;i<n.length;i++)t.push(n[i]);else t.push(n);return t},i.removeFrom=function(n,t){var i=n.indexOf(t);-1!=i&&n.splice(i,1)},i.getParent=function(n,i){for(;n!=document.body;)if(n=n.parentNode,t(n,i))return n},i.getQueryElement=function(n){return"string"==typeof n?document.querySelector(n):n},i.handleEvent=function(n){var t="on"+n.type;this[t]&&this[t](n)},i.filterFindElements=function(n,r){n=i.makeArray(n);var u=[];return n.forEach(function(n){if(n instanceof HTMLElement){if(!r)return void u.push(n);t(n,r)&&u.push(n);for(var f=n.querySelectorAll(r),i=0;i<f.length;i++)u.push(f[i])}}),u},i.debounceMethod=function(n,t,i){var u=n.prototype[t],r=t+"Timeout";n.prototype[t]=function(){var t=this[r],f,n;t&&clearTimeout(t);f=arguments;n=this;this[r]=setTimeout(function(){u.apply(n,f);delete n[r]},i||100)}},i.docReady=function(n){"complete"==document.readyState?n():document.addEventListener("DOMContentLoaded",n)},i.toDashed=function(n){return n.replace(/(.)([A-Z])/g,function(n,t,i){return t+"-"+i}).toLowerCase()},r=n.console,i.htmlInit=function(t,u){i.docReady(function(){var e=i.toDashed(u),f="data-"+e,s=document.querySelectorAll("["+f+"]"),h=document.querySelectorAll(".js-"+e),c=i.makeArray(s).concat(i.makeArray(h)),l=f+"-options",o=n.jQuery;c.forEach(function(n){var i,e=n.getAttribute(f)||n.getAttribute(l),s;try{i=e&&JSON.parse(e)}catch(h){return void(r&&r.error("Error parsing "+f+" on "+n.className+": "+h))}s=new t(n,i);o&&o.data(n,u,s)})})},i}),function(n,t){"function"==typeof define&&define.amd?define("outlayer/item",["ev-emitter/ev-emitter","get-size/get-size"],t):"object"==typeof module&&module.exports?module.exports=t(require("ev-emitter"),require("get-size")):(n.Outlayer={},n.Outlayer.Item=t(n.EvEmitter,n.getSize))}(window,function(n,t){"use strict";function l(n){for(var t in n)return!1;return t=null,!0}function u(n,t){n&&(this.element=n,this.layout=t,this.position={x:0,y:0},this._create())}function a(n){return n.replace(/([A-Z])/g,function(n){return"-"+n.toLowerCase()})}var f=document.documentElement.style,r="string"==typeof f.transition?"transition":"WebkitTransition",e="string"==typeof f.transform?"transform":"WebkitTransform",o={WebkitTransition:"webkitTransitionEnd",transition:"transitionend"}[r],v={transform:e,transition:r,transitionDuration:r+"Duration",transitionProperty:r+"Property",transitionDelay:r+"Delay"},i=u.prototype=Object.create(n.prototype),s,h,c;return i.constructor=u,i._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}};this.css({position:"absolute"})},i.handleEvent=function(n){var t="on"+n.type;this[t]&&this[t](n)},i.getSize=function(){this.size=t(this.element)},i.css=function(n){var r=this.element.style,t,i;for(t in n)i=v[t]||t,r[i]=n[t]},i.getPosition=function(){var f=getComputedStyle(this.element),e=this.layout._getOption("originLeft"),o=this.layout._getOption("originTop"),r=f[e?"left":"right"],u=f[o?"top":"bottom"],n=this.layout.size,t=-1!=r.indexOf("%")?parseFloat(r)/100*n.width:parseInt(r,10),i=-1!=u.indexOf("%")?parseFloat(u)/100*n.height:parseInt(u,10);t=isNaN(t)?0:t;i=isNaN(i)?0:i;t-=e?n.paddingLeft:n.paddingRight;i-=o?n.paddingTop:n.paddingBottom;this.position.x=t;this.position.y=i},i.layoutPosition=function(){var r=this.layout.size,n={},t=this.layout._getOption("originLeft"),i=this.layout._getOption("originTop"),u=t?"paddingLeft":"paddingRight",f=t?"left":"right",e=t?"right":"left",o=this.position.x+r[u];n[f]=this.getXValue(o);n[e]="";var s=i?"paddingTop":"paddingBottom",h=i?"top":"bottom",c=i?"bottom":"top",l=this.position.y+r[s];n[h]=this.getYValue(l);n[c]="";this.css(n);this.emitEvent("layout",[this])},i.getXValue=function(n){var t=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&!t?n/this.layout.size.width*100+"%":n+"px"},i.getYValue=function(n){var t=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&t?n/this.layout.size.height*100+"%":n+"px"},i._transitionTo=function(n,t){this.getPosition();var r=this.position.x,u=this.position.y,f=parseInt(n,10),e=parseInt(t,10),o=f===this.position.x&&e===this.position.y;if(this.setPosition(n,t),o&&!this.isTransitioning)return void this.layoutPosition();var s=n-r,h=t-u,i={};i.transform=this.getTranslate(s,h);this.transition({to:i,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})},i.getTranslate=function(n,t){var i=this.layout._getOption("originLeft"),r=this.layout._getOption("originTop");return n=i?n:-n,t=r?t:-t,"translate3d("+n+"px, "+t+"px, 0)"},i.goTo=function(n,t){this.setPosition(n,t);this.layoutPosition()},i.moveTo=i._transitionTo,i.setPosition=function(n,t){this.position.x=parseInt(n,10);this.position.y=parseInt(t,10)},i._nonTransition=function(n){this.css(n.to);n.isCleaning&&this._removeStyles(n.to);for(var t in n.onTransitionEnd)n.onTransitionEnd[t].call(this)},i.transition=function(n){var i,t,r;if(!parseFloat(this.layout.options.transitionDuration))return void this._nonTransition(n);i=this._transn;for(t in n.onTransitionEnd)i.onEnd[t]=n.onTransitionEnd[t];for(t in n.to)i.ingProperties[t]=!0,n.isCleaning&&(i.clean[t]=!0);n.from&&(this.css(n.from),r=this.element.offsetHeight,r=null);this.enableTransition(n.to);this.css(n.to);this.isTransitioning=!0},s="opacity,"+a(e),i.enableTransition=function(){if(!this.isTransitioning){var n=this.layout.options.transitionDuration;n="number"==typeof n?n+"ms":n;this.css({transitionProperty:s,transitionDuration:n,transitionDelay:this.staggerDelay||0});this.element.addEventListener(o,this,!1)}},i.onwebkitTransitionEnd=function(n){this.ontransitionend(n)},i.onotransitionend=function(n){this.ontransitionend(n)},h={"-webkit-transform":"transform"},i.ontransitionend=function(n){var t,i,r;n.target===this.element&&(t=this._transn,i=h[n.propertyName]||n.propertyName,(delete t.ingProperties[i],l(t.ingProperties)&&this.disableTransition(),i in t.clean&&(this.element.style[n.propertyName]="",delete t.clean[i]),i in t.onEnd)&&(r=t.onEnd[i],r.call(this),delete t.onEnd[i]),this.emitEvent("transitionEnd",[this]))},i.disableTransition=function(){this.removeTransitionStyles();this.element.removeEventListener(o,this,!1);this.isTransitioning=!1},i._removeStyles=function(n){var t={},i;for(i in n)t[i]="";this.css(t)},c={transitionProperty:"",transitionDuration:"",transitionDelay:""},i.removeTransitionStyles=function(){this.css(c)},i.stagger=function(n){n=isNaN(n)?0:n;this.staggerDelay=n+"ms"},i.removeElem=function(){this.element.parentNode.removeChild(this.element);this.css({display:""});this.emitEvent("remove",[this])},i.remove=function(){return r&&parseFloat(this.layout.options.transitionDuration)?(this.once("transitionEnd",function(){this.removeElem()}),void this.hide()):void this.removeElem()},i.reveal=function(){delete this.isHidden;this.css({display:""});var n=this.layout.options,t={},i=this.getHideRevealTransitionEndProperty("visibleStyle");t[i]=this.onRevealTransitionEnd;this.transition({from:n.hiddenStyle,to:n.visibleStyle,isCleaning:!0,onTransitionEnd:t})},i.onRevealTransitionEnd=function(){this.isHidden||this.emitEvent("reveal")},i.getHideRevealTransitionEndProperty=function(n){var t=this.layout.options[n],i;if(t.opacity)return"opacity";for(i in t)return i},i.hide=function(){this.isHidden=!0;this.css({display:""});var n=this.layout.options,t={},i=this.getHideRevealTransitionEndProperty("hiddenStyle");t[i]=this.onHideTransitionEnd;this.transition({from:n.visibleStyle,to:n.hiddenStyle,isCleaning:!0,onTransitionEnd:t})},i.onHideTransitionEnd=function(){this.isHidden&&(this.css({display:"none"}),this.emitEvent("hide"))},i.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},u}),function(n,t){"use strict";"function"==typeof define&&define.amd?define("outlayer/outlayer",["ev-emitter/ev-emitter","get-size/get-size","fizzy-ui-utils/utils","./item"],function(i,r,u,f){return t(n,i,r,u,f)}):"object"==typeof module&&module.exports?module.exports=t(n,require("ev-emitter"),require("get-size"),require("fizzy-ui-utils"),require("./item")):n.Outlayer=t(n,n.EvEmitter,n.getSize,n.fizzyUIUtils,n.Outlayer.Item)}(window,function(n,t,i,r,u){"use strict";function e(n,t){var i=r.getQueryElement(n),u,f;if(!i)return void(c&&c.error("Bad element for "+this.constructor.namespace+": "+(i||n)));this.element=i;o&&(this.$element=o(this.element));this.options=r.extend({},this.constructor.defaults);this.option(t);u=++y;this.element.outlayerGUID=u;s[u]=this;this._create();f=this._getOption("initLayout");f&&this.layout()}function h(n){function t(){n.apply(this,arguments)}return t.prototype=Object.create(n.prototype),t.prototype.constructor=t,t}function v(n){var r;if("number"==typeof n)return n;var t=n.match(/(^\d*\.?\d*)(\w*)/),i=t&&t[1],u=t&&t[2];return i.length?(i=parseFloat(i),r=a[u]||1,i*r):0}var c=n.console,o=n.jQuery,l=function(){},y=0,s={},f,a;return e.namespace="outlayer",e.Item=u,e.defaults={containerStyle:{position:"relative"},initLayout:!0,originLeft:!0,originTop:!0,resize:!0,resizeContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}},f=e.prototype,r.extend(f,t.prototype),f.option=function(n){r.extend(this.options,n)},f._getOption=function(n){var t=this.constructor.compatOptions[n];return t&&void 0!==this.options[t]?this.options[t]:this.options[n]},e.compatOptions={initLayout:"isInitLayout",horizontal:"isHorizontal",layoutInstant:"isLayoutInstant",originLeft:"isOriginLeft",originTop:"isOriginTop",resize:"isResizeBound",resizeContainer:"isResizingContainer"},f._create=function(){this.reloadItems();this.stamps=[];this.stamp(this.options.stamp);r.extend(this.element.style,this.options.containerStyle);var n=this._getOption("resize");n&&this.bindResize()},f.reloadItems=function(){this.items=this._itemize(this.element.children)},f._itemize=function(n){for(var u,f,i=this._filterFindItemElements(n),e=this.constructor.Item,r=[],t=0;t<i.length;t++)u=i[t],f=new e(u,this),r.push(f);return r},f._filterFindItemElements=function(n){return r.filterFindElements(n,this.options.itemSelector)},f.getItemElements=function(){return this.items.map(function(n){return n.element})},f.layout=function(){this._resetLayout();this._manageStamps();var n=this._getOption("layoutInstant"),t=void 0!==n?n:!this._isLayoutInited;this.layoutItems(this.items,t);this._isLayoutInited=!0},f._init=f.layout,f._resetLayout=function(){this.getSize()},f.getSize=function(){this.size=i(this.element)},f._getMeasurement=function(n,t){var u,r=this.options[n];r?("string"==typeof r?u=this.element.querySelector(r):r instanceof HTMLElement&&(u=r),this[n]=u?i(u)[t]:r):this[n]=0},f.layoutItems=function(n,t){n=this._getItemsForLayout(n);this._layoutItems(n,t);this._postLayout()},f._getItemsForLayout=function(n){return n.filter(function(n){return!n.isIgnored})},f._layoutItems=function(n,t){if(this._emitCompleteOnItems("layout",n),n&&n.length){var i=[];n.forEach(function(n){var r=this._getItemLayoutPosition(n);r.item=n;r.isInstant=t||n.isLayoutInstant;i.push(r)},this);this._processLayoutQueue(i)}},f._getItemLayoutPosition=function(){return{x:0,y:0}},f._processLayoutQueue=function(n){this.updateStagger();n.forEach(function(n,t){this._positionItem(n.item,n.x,n.y,n.isInstant,t)},this)},f.updateStagger=function(){var n=this.options.stagger;return null===n||void 0===n?void(this.stagger=0):(this.stagger=v(n),this.stagger)},f._positionItem=function(n,t,i,r,u){r?n.goTo(t,i):(n.stagger(u*this.stagger),n.moveTo(t,i))},f._postLayout=function(){this.resizeContainer()},f.resizeContainer=function(){var t=this._getOption("resizeContainer"),n;t&&(n=this._getContainerSize(),n&&(this._setContainerMeasure(n.width,!0),this._setContainerMeasure(n.height,!1)))},f._getContainerSize=l,f._setContainerMeasure=function(n,t){if(void 0!==n){var i=this.size;i.isBorderBox&&(n+=t?i.paddingLeft+i.paddingRight+i.borderLeftWidth+i.borderRightWidth:i.paddingBottom+i.paddingTop+i.borderTopWidth+i.borderBottomWidth);n=Math.max(n,0);this.element.style[t?"width":"height"]=n+"px"}},f._emitCompleteOnItems=function(n,t){function r(){e.dispatchEvent(n+"Complete",null,[t])}function f(){i++;i==u&&r()}var e=this,u=t.length,i;if(!t||!u)return void r();i=0;t.forEach(function(t){t.once(n,f)})},f.dispatchEvent=function(n,t,i){var u=t?[t].concat(i):i,r;(this.emitEvent(n,u),o)&&((this.$element=this.$element||o(this.element),t)?(r=o.Event(t),r.type=n,this.$element.trigger(r,i)):this.$element.trigger(n,i))},f.ignore=function(n){var t=this.getItem(n);t&&(t.isIgnored=!0)},f.unignore=function(n){var t=this.getItem(n);t&&delete t.isIgnored},f.stamp=function(n){n=this._find(n);n&&(this.stamps=this.stamps.concat(n),n.forEach(this.ignore,this))},f.unstamp=function(n){n=this._find(n);n&&n.forEach(function(n){r.removeFrom(this.stamps,n);this.unignore(n)},this)},f._find=function(n){if(n)return("string"==typeof n&&(n=this.element.querySelectorAll(n)),n=r.makeArray(n))},f._manageStamps=function(){this.stamps&&this.stamps.length&&(this._getBoundingRect(),this.stamps.forEach(this._manageStamp,this))},f._getBoundingRect=function(){var t=this.element.getBoundingClientRect(),n=this.size;this._boundingRect={left:t.left+n.paddingLeft+n.borderLeftWidth,top:t.top+n.paddingTop+n.borderTopWidth,right:t.right-(n.paddingRight+n.borderRightWidth),bottom:t.bottom-(n.paddingBottom+n.borderBottomWidth)}},f._manageStamp=l,f._getElementOffset=function(n){var t=n.getBoundingClientRect(),r=this._boundingRect,u=i(n);return{left:t.left-r.left-u.marginLeft,top:t.top-r.top-u.marginTop,right:r.right-t.right-u.marginRight,bottom:r.bottom-t.bottom-u.marginBottom}},f.handleEvent=r.handleEvent,f.bindResize=function(){n.addEventListener("resize",this);this.isResizeBound=!0},f.unbindResize=function(){n.removeEventListener("resize",this);this.isResizeBound=!1},f.onresize=function(){this.resize()},r.debounceMethod(e,"onresize",100),f.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&this.layout()},f.needsResizeLayout=function(){var n=i(this.element),t=this.size&&n;return t&&n.innerWidth!==this.size.innerWidth},f.addItems=function(n){var t=this._itemize(n);return t.length&&(this.items=this.items.concat(t)),t},f.appended=function(n){var t=this.addItems(n);t.length&&(this.layoutItems(t,!0),this.reveal(t))},f.prepended=function(n){var t=this._itemize(n),i;t.length&&(i=this.items.slice(0),this.items=t.concat(i),this._resetLayout(),this._manageStamps(),this.layoutItems(t,!0),this.reveal(t),this.layoutItems(i))},f.reveal=function(n){if(this._emitCompleteOnItems("reveal",n),n&&n.length){var t=this.updateStagger();n.forEach(function(n,i){n.stagger(i*t);n.reveal()})}},f.hide=function(n){if(this._emitCompleteOnItems("hide",n),n&&n.length){var t=this.updateStagger();n.forEach(function(n,i){n.stagger(i*t);n.hide()})}},f.revealItemElements=function(n){var t=this.getItems(n);this.reveal(t)},f.hideItemElements=function(n){var t=this.getItems(n);this.hide(t)},f.getItem=function(n){for(var i,t=0;t<this.items.length;t++)if(i=this.items[t],i.element==n)return i},f.getItems=function(n){n=r.makeArray(n);var t=[];return n.forEach(function(n){var i=this.getItem(n);i&&t.push(i)},this),t},f.remove=function(n){var t=this.getItems(n);this._emitCompleteOnItems("remove",t);t&&t.length&&t.forEach(function(n){n.remove();r.removeFrom(this.items,n)},this)},f.destroy=function(){var n=this.element.style,t;n.height="";n.position="";n.width="";this.items.forEach(function(n){n.destroy()});this.unbindResize();t=this.element.outlayerGUID;delete s[t];delete this.element.outlayerGUID;o&&o.removeData(this.element,this.constructor.namespace)},e.data=function(n){n=r.getQueryElement(n);var t=n&&n.outlayerGUID;return t&&s[t]},e.create=function(n,t){var i=h(e);return i.defaults=r.extend({},e.defaults),r.extend(i.defaults,t),i.compatOptions=r.extend({},e.compatOptions),i.namespace=n,i.data=e.data,i.Item=h(u),r.htmlInit(i,n),o&&o.bridget&&o.bridget(n,i),i},a={ms:1,s:1e3},e.Item=u,e}),function(n,t){"function"==typeof define&&define.amd?define("packery/js/rect",t):"object"==typeof module&&module.exports?module.exports=t():(n.Packery=n.Packery||{},n.Packery.Rect=t())}(window,function(){"use strict";function n(t){for(var i in n.defaults)this[i]=n.defaults[i];for(i in t)this[i]=t[i]}n.defaults={x:0,y:0,width:0,height:0};var t=n.prototype;return t.contains=function(n){var t=n.width||0,i=n.height||0;return this.x<=n.x&&this.y<=n.y&&this.x+this.width>=n.x+t&&this.y+this.height>=n.y+i},t.overlaps=function(n){var t=this.x+this.width,i=this.y+this.height,r=n.x+n.width,u=n.y+n.height;return this.x<r&&t>n.x&&this.y<u&&i>n.y},t.getMaximalFreeRects=function(t){if(!this.overlaps(t))return!1;var i,r=[],e=this.x+this.width,o=this.y+this.height,u=t.x+t.width,f=t.y+t.height;return this.y<t.y&&(i=new n({x:this.x,y:this.y,width:this.width,height:t.y-this.y}),r.push(i)),e>u&&(i=new n({x:u,y:this.y,width:e-u,height:this.height}),r.push(i)),o>f&&(i=new n({x:this.x,y:f,width:this.width,height:o-f}),r.push(i)),this.x<t.x&&(i=new n({x:this.x,y:this.y,width:t.x-this.x,height:this.height}),r.push(i)),r},t.canFit=function(n){return this.width>=n.width&&this.height>=n.height},n}),function(n,t){if("function"==typeof define&&define.amd)define("packery/js/packer",["./rect"],t);else if("object"==typeof module&&module.exports)module.exports=t(require("./rect"));else{var i=n.Packery=n.Packery||{};i.Packer=t(i.Rect)}}(window,function(n){"use strict";function i(n,t,i){this.width=n||0;this.height=t||0;this.sortDirection=i||"downwardLeftToRight";this.reset()}var t=i.prototype,r;return t.reset=function(){this.spaces=[];var t=new n({x:0,y:0,width:this.width,height:this.height});this.spaces.push(t);this.sorter=r[this.sortDirection]||r.downwardLeftToRight},t.pack=function(n){for(var i,t=0;t<this.spaces.length;t++)if(i=this.spaces[t],i.canFit(n)){this.placeInSpace(n,i);break}},t.columnPack=function(n){for(var t,r,i=0;i<this.spaces.length;i++)if(t=this.spaces[i],r=t.x<=n.x&&t.x+t.width>=n.x+n.width&&t.height>=n.height-.01,r){n.y=t.y;this.placed(n);break}},t.rowPack=function(n){for(var t,r,i=0;i<this.spaces.length;i++)if(t=this.spaces[i],r=t.y<=n.y&&t.y+t.height>=n.y+n.height&&t.width>=n.width-.01,r){n.x=t.x;this.placed(n);break}},t.placeInSpace=function(n,t){n.x=t.x;n.y=t.y;this.placed(n)},t.placed=function(n){for(var r,u,t=[],i=0;i<this.spaces.length;i++)r=this.spaces[i],u=r.getMaximalFreeRects(n),u?t.push.apply(t,u):t.push(r);this.spaces=t;this.mergeSortSpaces()},t.mergeSortSpaces=function(){i.mergeRects(this.spaces);this.spaces.sort(this.sorter)},t.addSpace=function(n){this.spaces.push(n);this.mergeSortSpaces()},i.mergeRects=function(n){var t=0,i=n[t],r,u;n:for(;i;){for(r=0,u=n[t+r];u;){if(u==i)r++;else{if(u.contains(i)){n.splice(t,1);i=n[t];continue n}i.contains(u)?n.splice(t+r,1):r++}u=n[t+r]}t++;i=n[t]}return n},r={downwardLeftToRight:function(n,t){return n.y-t.y||n.x-t.x},rightwardTopToBottom:function(n,t){return n.x-t.x||n.y-t.y}},i}),function(n,t){"function"==typeof define&&define.amd?define("packery/js/item",["outlayer/outlayer","./rect"],t):"object"==typeof module&&module.exports?module.exports=t(require("outlayer"),require("./rect")):n.Packery.Item=t(n.Outlayer,n.Packery.Rect)}(window,function(n,t){"use strict";var e=document.documentElement.style,r="string"==typeof e.transform?"transform":"WebkitTransform",u=function(){n.Item.apply(this,arguments)},i=u.prototype=Object.create(n.Item.prototype),o=i._create,f;return i._create=function(){o.call(this);this.rect=new t},f=i.moveTo,i.moveTo=function(n,t){var i=Math.abs(this.position.x-n),r=Math.abs(this.position.y-t),u=this.layout.dragItemCount&&!this.isPlacing&&!this.isTransitioning&&1>i&&1>r;return u?void this.goTo(n,t):void f.apply(this,arguments)},i.enablePlacing=function(){this.removeTransitionStyles();this.isTransitioning&&r&&(this.element.style[r]="none");this.isTransitioning=!1;this.getSize();this.layout._setRectSize(this.element,this.rect);this.isPlacing=!0},i.disablePlacing=function(){this.isPlacing=!1},i.removeElem=function(){this.element.parentNode.removeChild(this.element);this.layout.packer.addSpace(this.rect);this.emitEvent("remove",[this])},i.showDropPlaceholder=function(){var n=this.dropPlaceholder;n||(n=this.dropPlaceholder=document.createElement("div"),n.className="packery-drop-placeholder",n.style.position="absolute");n.style.width=this.size.width+"px";n.style.height=this.size.height+"px";this.positionDropPlaceholder();this.layout.element.appendChild(n)},i.positionDropPlaceholder=function(){this.dropPlaceholder.style[r]="translate("+this.rect.x+"px, "+this.rect.y+"px)"},i.hideDropPlaceholder=function(){var n=this.dropPlaceholder.parentNode;n&&n.removeChild(this.dropPlaceholder)},u}),function(n,t){"function"==typeof define&&define.amd?define(["get-size/get-size","outlayer/outlayer","packery/js/rect","packery/js/packer","packery/js/item"],t):"object"==typeof module&&module.exports?module.exports=t(require("get-size"),require("outlayer"),require("./rect"),require("./packer"),require("./item")):n.Packery=t(n.getSize,n.Outlayer,n.Packery.Rect,n.Packery.Packer,n.Packery.Item)}(window,function(n,t,i,r,u){"use strict";function h(n,t){return n.position.y-t.position.y||n.position.x-t.position.x}function c(n,t){return n.position.x-t.position.x||n.position.y-t.position.y}function l(n,t){var i=t.x-n.x,r=t.y-n.y;return Math.sqrt(i*i+r*r)}var e,f,o,s;return i.prototype.canFit=function(n){return this.width>=n.width-1&&this.height>=n.height-1},e=t.create("packery"),e.Item=u,f=e.prototype,f._create=function(){t.prototype._create.call(this);this.packer=new r;this.shiftPacker=new r;this.isEnabled=!0;this.dragItemCount=0;var n=this;this.handleDraggabilly={dragStart:function(){n.itemDragStart(this.element)},dragMove:function(){n.itemDragMove(this.element,this.position.x,this.position.y)},dragEnd:function(){n.itemDragEnd(this.element)}};this.handleUIDraggable={start:function(t,i){i&&n.itemDragStart(t.currentTarget)},drag:function(t,i){i&&n.itemDragMove(t.currentTarget,i.position.left,i.position.top)},stop:function(t,i){i&&n.itemDragEnd(t.currentTarget)}}},f._resetLayout=function(){this.getSize();this._getMeasurements();var n,t,i;this._getOption("horizontal")?(n=1/0,t=this.size.innerHeight+this.gutter,i="rightwardTopToBottom"):(n=this.size.innerWidth+this.gutter,t=1/0,i="downwardLeftToRight");this.packer.width=this.shiftPacker.width=n;this.packer.height=this.shiftPacker.height=t;this.packer.sortDirection=this.shiftPacker.sortDirection=i;this.packer.reset();this.maxY=0;this.maxX=0},f._getMeasurements=function(){this._getMeasurement("columnWidth","width");this._getMeasurement("rowHeight","height");this._getMeasurement("gutter","width")},f._getItemLayoutPosition=function(n){if(this._setRectSize(n.element,n.rect),this.isShifting||this.dragItemCount>0){var t=this._getPackMethod();this.packer[t](n.rect)}else this.packer.pack(n.rect);return this._setMaxXY(n.rect),n.rect},f.shiftLayout=function(){this.isShifting=!0;this.layout();delete this.isShifting},f._getPackMethod=function(){return this._getOption("horizontal")?"rowPack":"columnPack"},f._setMaxXY=function(n){this.maxX=Math.max(n.x+n.width,this.maxX);this.maxY=Math.max(n.y+n.height,this.maxY)},f._setRectSize=function(t,i){var f=n(t),r=f.outerWidth,u=f.outerHeight;(r||u)&&(r=this._applyGridGutter(r,this.columnWidth),u=this._applyGridGutter(u,this.rowHeight));i.width=Math.min(r,this.packer.width);i.height=Math.min(u,this.packer.height)},f._applyGridGutter=function(n,t){if(!t)return n+this.gutter;t+=this.gutter;var i=n%t,r=i&&1>i?"round":"ceil";return Math[r](n/t)*t},f._getContainerSize=function(){return this._getOption("horizontal")?{width:this.maxX-this.gutter}:{height:this.maxY-this.gutter}},f._manageStamp=function(n){var t,u=this.getItem(n),r;u&&u.isPlacing?t=u.rect:(r=this._getElementOffset(n),t=new i({x:this._getOption("originLeft")?r.left:r.right,y:this._getOption("originTop")?r.top:r.bottom}));this._setRectSize(n,t);this.packer.placed(t);this._setMaxXY(t)},f.sortItemsByPosition=function(){var n=this._getOption("horizontal")?c:h;this.items.sort(n)},f.fit=function(n,t,i){var r=this.getItem(n);r&&(this.stamp(r.element),r.enablePlacing(),this.updateShiftTargets(r),t=void 0===t?r.rect.x:t,i=void 0===i?r.rect.y:i,this.shift(r,t,i),this._bindFitEvents(r),r.moveTo(r.rect.x,r.rect.y),this.shiftLayout(),this.unstamp(r.element),this.sortItemsByPosition(),r.disablePlacing())},f._bindFitEvents=function(n){function t(){i++;2==i&&r.dispatchEvent("fitComplete",null,[n])}var r=this,i=0;n.once("layout",t);this.once("layoutComplete",t)},f.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&(this.options.shiftPercentResize?this.resizeShiftPercentLayout():this.layout())},f.needsResizeLayout=function(){var i=n(this.element),t=this._getOption("horizontal")?"innerHeight":"innerWidth";return i[t]!=this.size[t]},f.resizeShiftPercentLayout=function(){var u=this._getItemsForLayout(this.items),t=this._getOption("horizontal"),i=t?"y":"x",h=t?"height":"width",f=t?"rowHeight":"columnWidth",c=t?"innerHeight":"innerWidth",r=this[f],e,o,s;(r=r&&r+this.gutter)?(this._getMeasurements(),e=this[f]+this.gutter,u.forEach(function(n){var t=Math.round(n.rect[i]/r);n.rect[i]=t*e})):(o=n(this.element)[c]+this.gutter,s=this.packer[h],u.forEach(function(n){n.rect[i]=n.rect[i]/s*o}));this.shiftLayout()},f.itemDragStart=function(n){if(this.isEnabled){this.stamp(n);var t=this.getItem(n);t&&(t.enablePlacing(),t.showDropPlaceholder(),this.dragItemCount++,this.updateShiftTargets(t))}},f.updateShiftTargets=function(n){var s,h,u,t,c,o,e,l,a,v,y;this.shiftPacker.reset();this._getBoundingRect();s=this._getOption("originLeft");h=this._getOption("originTop");this.stamps.forEach(function(n){var u=this.getItem(n),t,r;u&&u.isPlacing||(t=this._getElementOffset(n),r=new i({x:s?t.left:t.right,y:h?t.top:t.bottom}),this._setRectSize(n,r),this.shiftPacker.placed(r))},this);var r=this._getOption("horizontal"),p=r?"rowHeight":"columnWidth",f=r?"height":"width";if(this.shiftTargetKeys=[],this.shiftTargets=[],t=this[p],t=t&&t+this.gutter)for(c=Math.ceil(n.rect[f]/t),o=Math.floor((this.shiftPacker[f]+this.gutter)/t),u=(o-c)*t,e=0;o>e;e++)l=r?0:e*t,a=r?e*t:0,this._addShiftTarget(l,a,u);else u=this.shiftPacker[f]+this.gutter-n.rect[f],this._addShiftTarget(0,0,u);v=this._getItemsForLayout(this.items);y=this._getPackMethod();v.forEach(function(n){var i=n.rect,o,s,h,e,c,l;if(this._setRectSize(n.element,i),this.shiftPacker[y](i),this._addShiftTarget(i.x,i.y,u),o=r?i.x+i.width:i.x,s=r?i.y:i.y+i.height,this._addShiftTarget(o,s,u),t)for(h=Math.round(i[f]/t),e=1;h>e;e++)c=r?o:i.x+t*e,l=r?i.y+t*e:s,this._addShiftTarget(c,l,u)},this)},f._addShiftTarget=function(n,t,i){var u=this._getOption("horizontal")?t:n,r,f;0!==u&&u>i||(r=n+","+t,f=-1!=this.shiftTargetKeys.indexOf(r),f||(this.shiftTargetKeys.push(r),this.shiftTargets.push({x:n,y:t})))},f.shift=function(n,t,i){var r,u=1/0,f={x:t,y:i};this.shiftTargets.forEach(function(n){var t=l(n,f);u>t&&(r=n,u=t)});n.rect.x=r.x;n.rect.y=r.y},o=120,f.itemDragMove=function(n,t,i){function e(){u.shift(r,t,i);r.positionDropPlaceholder();u.layout()}var r=this.isEnabled&&this.getItem(n),u,f;r&&(t-=this.size.paddingLeft,i-=this.size.paddingTop,u=this,f=new Date,this._itemDragTime&&f-this._itemDragTime<o?(clearTimeout(this.dragTimeout),this.dragTimeout=setTimeout(e,o)):(e(),this._itemDragTime=f))},f.itemDragEnd=function(n){function r(){i++;2==i&&(t.element.classList.remove("is-positioning-post-drag"),t.hideDropPlaceholder(),u.dispatchEvent("dragItemPositioned",null,[t]))}var t=this.isEnabled&&this.getItem(n),i,u;t&&(clearTimeout(this.dragTimeout),t.element.classList.add("is-positioning-post-drag"),i=0,u=this,t.once("layout",r),this.once("layoutComplete",r),t.moveTo(t.rect.x,t.rect.y),this.layout(),this.dragItemCount=Math.max(0,this.dragItemCount-1),this.sortItemsByPosition(),t.disablePlacing(),this.unstamp(t.element))},f.bindDraggabillyEvents=function(n){this._bindDraggabillyEvents(n,"on")},f.unbindDraggabillyEvents=function(n){this._bindDraggabillyEvents(n,"off")},f._bindDraggabillyEvents=function(n,t){var i=this.handleDraggabilly;n[t]("dragStart",i.dragStart);n[t]("dragMove",i.dragMove);n[t]("dragEnd",i.dragEnd)},f.bindUIDraggableEvents=function(n){this._bindUIDraggableEvents(n,"on")},f.unbindUIDraggableEvents=function(n){this._bindUIDraggableEvents(n,"off")},f._bindUIDraggableEvents=function(n,t){var i=this.handleUIDraggable;n[t]("dragstart",i.start)[t]("drag",i.drag)[t]("dragstop",i.stop)},s=f.destroy,f.destroy=function(){s.apply(this,arguments);this.isEnabled=!1},e.Rect=i,e.Packer=r,e}),function(n,t){"use strict";typeof define=="function"&&define.amd?define(["ev-emitter/ev-emitter"],function(i){return t(n,i)}):typeof module=="object"&&module.exports?module.exports=t(n,require("ev-emitter")):n.imagesLoaded=t(n,n.EvEmitter)}(typeof window!="undefined"?window:this,function(n,t){"use strict";function o(n,t){for(var i in t)n[i]=t[i];return n}function h(n){var t=[],i;if(Array.isArray(n))t=n;else if(typeof n.length=="number")for(i=0;i<n.length;i++)t.push(n[i]);else t.push(n);return t}function i(n,t,r){if(!(this instanceof i))return new i(n,t,r);if(typeof n=="string"&&(n=document.querySelectorAll(n)),this.elements=h(n),this.options=o({},this.options),typeof t=="function"?r=t:o(this.options,t),r)this.on("always",r);this.getImages();u&&(this.jqDeferred=new u.Deferred);setTimeout(function(){this.check()}.bind(this))}function r(n){this.img=n}function f(n,t){this.url=n;this.element=t;this.img=new Image}var u=n.jQuery,e=n.console,s;return i.prototype=Object.create(t.prototype),i.prototype.options={},i.prototype.getImages=function(){this.images=[];this.elements.forEach(this.addElementImages,this)},i.prototype.addElementImages=function(n){var i,r,t,f,u,e;if(n.nodeName=="IMG"&&this.addImage(n),this.options.background===!0&&this.addElementBackgroundImages(n),i=n.nodeType,i&&s[i]){for(r=n.querySelectorAll("img"),t=0;t<r.length;t++)f=r[t],this.addImage(f);if(typeof this.options.background=="string")for(u=n.querySelectorAll(this.options.background),t=0;t<u.length;t++)e=u[t],this.addElementBackgroundImages(e)}},s={1:!0,9:!0,11:!0},i.prototype.addElementBackgroundImages=function(n){var i=getComputedStyle(n),r,t,u;if(i)for(r=/url\((['"])?(.*?)\1\)/gi,t=r.exec(i.backgroundImage);t!==null;)u=t&&t[2],u&&this.addBackground(u,n),t=r.exec(i.backgroundImage)},i.prototype.addImage=function(n){var t=new r(n);this.images.push(t)},i.prototype.addBackground=function(n,t){var i=new f(n,t);this.images.push(i)},i.prototype.check=function(){function t(t,i,r){setTimeout(function(){n.progress(t,i,r)})}var n=this;if(this.progressedCount=0,this.hasAnyBroken=!1,!this.images.length){this.complete();return}this.images.forEach(function(n){n.once("progress",t);n.check()})},i.prototype.progress=function(n,t,i){this.progressedCount++;this.hasAnyBroken=this.hasAnyBroken||!n.isLoaded;this.emitEvent("progress",[this,n,t]);this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,n);this.progressedCount==this.images.length&&this.complete();this.options.debug&&e&&e.log("progress: "+i,n,t)},i.prototype.complete=function(){var t=this.hasAnyBroken?"fail":"done",n;this.isComplete=!0;this.emitEvent(t,[this]);this.emitEvent("always",[this]);this.jqDeferred&&(n=this.hasAnyBroken?"reject":"resolve",this.jqDeferred[n](this))},r.prototype=Object.create(t.prototype),r.prototype.check=function(){var n=this.getIsImageComplete();if(n){this.confirm(this.img.naturalWidth!==0,"naturalWidth");return}this.proxyImage=new Image;this.proxyImage.addEventListener("load",this);this.proxyImage.addEventListener("error",this);this.img.addEventListener("load",this);this.img.addEventListener("error",this);this.proxyImage.src=this.img.src},r.prototype.getIsImageComplete=function(){return this.img.complete&&this.img.naturalWidth!==undefined},r.prototype.confirm=function(n,t){this.isLoaded=n;this.emitEvent("progress",[this,this.img,t])},r.prototype.handleEvent=function(n){var t="on"+n.type;this[t]&&this[t](n)},r.prototype.onload=function(){this.confirm(!0,"onload");this.unbindEvents()},r.prototype.onerror=function(){this.confirm(!1,"onerror");this.unbindEvents()},r.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this);this.proxyImage.removeEventListener("error",this);this.img.removeEventListener("load",this);this.img.removeEventListener("error",this)},f.prototype=Object.create(r.prototype),f.prototype.check=function(){this.img.addEventListener("load",this);this.img.addEventListener("error",this);this.img.src=this.url;var n=this.getIsImageComplete();n&&(this.confirm(this.img.naturalWidth!==0,"naturalWidth"),this.unbindEvents())},f.prototype.unbindEvents=function(){this.img.removeEventListener("load",this);this.img.removeEventListener("error",this)},f.prototype.confirm=function(n,t){this.isLoaded=n;this.emitEvent("progress",[this,this.element,t])},i.makeJQueryPlugin=function(t){(t=t||n.jQuery,t)&&(u=t,u.fn.imagesLoaded=function(n,t){var r=new i(this,n,t);return r.jqDeferred.promise(u(this))})},i.makeJQueryPlugin(),i});!function(){"use strict";function t(r){return"undefined"==typeof this||Object.getPrototypeOf(this)!==t.prototype?new t(r):(n=this,n.version="3.3.2",n.tools=new i,n.isSupported()?(n.tools.extend(n.defaults,r||{}),n.defaults.container=f(n.defaults),n.store={elements:{},containers:[]},n.sequences={},n.history=[],n.uid=0,n.initialized=!1):"undefined"!=typeof console&&null!==console,n)}function f(t){if(t&&t.container){if("string"==typeof t.container)return window.document.documentElement.querySelector(t.container);if(n.tools.isNode(t.container))return t.container}return n.defaults.container}function y(t,i){return"string"==typeof t?Array.prototype.slice.call(i.querySelectorAll(t)):n.tools.isNode(t)?[t]:n.tools.isNodeList(t)?Array.prototype.slice.call(t):[]}function e(){return++n.uid}function p(t,i,r){i.container&&(i.container=r);t.config=t.config?n.tools.extendClone(t.config,i):n.tools.extendClone(n.defaults,i);t.config.axis="top"===t.config.origin||"bottom"===t.config.origin?"Y":"X"}function w(n){var t=window.getComputedStyle(n.domEl);n.styles||(n.styles={transition:{},transform:{},computed:{}},n.styles.inline=n.domEl.getAttribute("style")||"",n.styles.inline+="; visibility: visible; ",n.styles.computed.opacity=t.opacity,n.styles.computed.transition=t.transition&&"all 0s ease 0s"!==t.transition?t.transition+", ":"");n.styles.transition.instant=o(n,0);n.styles.transition.delayed=o(n,n.config.delay);n.styles.transform.initial=" -webkit-transform:";n.styles.transform.target=" -webkit-transform:";s(n);n.styles.transform.initial+="transform:";n.styles.transform.target+="transform:";s(n)}function o(n,t){var i=n.config;return"-webkit-transition: "+n.styles.computed.transition+"-webkit-transform "+i.duration/1e3+"s "+i.easing+" "+t/1e3+"s, opacity "+i.duration/1e3+"s "+i.easing+" "+t/1e3+"s; transition: "+n.styles.computed.transition+"transform "+i.duration/1e3+"s "+i.easing+" "+t/1e3+"s, opacity "+i.duration/1e3+"s "+i.easing+" "+t/1e3+"s; "}function s(n){var r,t=n.config,i=n.styles.transform;r="top"===t.origin||"left"===t.origin?/^-/.test(t.distance)?t.distance.substr(1):"-"+t.distance:t.distance;parseInt(t.distance)&&(i.initial+=" translate"+t.axis+"("+r+")",i.target+=" translate"+t.axis+"(0)");t.scale&&(i.initial+=" scale("+t.scale+")",i.target+=" scale(1)");t.rotate.x&&(i.initial+=" rotateX("+t.rotate.x+"deg)",i.target+=" rotateX(0)");t.rotate.y&&(i.initial+=" rotateY("+t.rotate.y+"deg)",i.target+=" rotateY(0)");t.rotate.z&&(i.initial+=" rotateZ("+t.rotate.z+"deg)",i.target+=" rotateZ(0)");i.initial+="; opacity: "+t.opacity+";";i.target+="; opacity: "+n.styles.computed.opacity+";"}function b(t){var i=t.config.container;i&&n.store.containers.indexOf(i)===-1&&n.store.containers.push(t.config.container);n.store.elements[t.id]=t}function k(t,i,r){var u={target:t,config:i,interval:r};n.history.push(u)}function h(){if(n.isSupported()){c();for(var t=0;t<n.store.containers.length;t++)n.store.containers[t].addEventListener("scroll",r),n.store.containers[t].addEventListener("resize",r);n.initialized||(window.addEventListener("scroll",r),window.addEventListener("resize",r),n.initialized=!0)}return n}function r(){v(c)}function d(){var t,r,f,i;n.tools.forOwn(n.sequences,function(e){i=n.sequences[e];t=!1;for(var o=0;o<i.elemIds.length;o++)f=i.elemIds[o],r=n.store.elements[f],u(r)&&!t&&(t=!0);i.active=t})}function c(){var i,t;d();n.tools.forOwn(n.store.elements,function(r){t=n.store.elements[r];i=tt(t);nt(t)?(t.config.beforeReveal(t.domEl),i?t.domEl.setAttribute("style",t.styles.inline+t.styles.transform.target+t.styles.transition.delayed):t.domEl.setAttribute("style",t.styles.inline+t.styles.transform.target+t.styles.transition.instant),l("reveal",t,i),t.revealing=!0,t.seen=!0,t.sequence&&g(t,i)):it(t)&&(t.config.beforeReset(t.domEl),t.domEl.setAttribute("style",t.styles.inline+t.styles.transform.initial+t.styles.transition.instant),l("reset",t),t.revealing=!1)})}function g(t,i){var f=0,e=0,u=n.sequences[t.sequence.id];u.blocked=!0;i&&"onload"===t.config.useDelay&&(e=t.config.delay);t.sequence.timer&&(f=Math.abs(t.sequence.timer.started-new Date),window.clearTimeout(t.sequence.timer));t.sequence.timer={started:new Date};t.sequence.timer.clock=window.setTimeout(function(){u.blocked=!1;t.sequence.timer=null;r()},Math.abs(u.interval)+e-f)}function l(n,t,i){var f=0,r=0,u="after";switch(n){case"reveal":r=t.config.duration;i&&(r+=t.config.delay);u+="Reveal";break;case"reset":r=t.config.duration;u+="Reset"}t.timer&&(f=Math.abs(t.timer.started-new Date),window.clearTimeout(t.timer.clock));t.timer={started:new Date};t.timer.clock=window.setTimeout(function(){t.config[u](t.domEl);t.timer=null},r-f)}function nt(t){if(t.sequence){var i=n.sequences[t.sequence.id];return i.active&&!i.blocked&&!t.revealing&&!t.disabled}return u(t)&&!t.revealing&&!t.disabled}function tt(t){var i=t.config.useDelay;return"always"===i||"onload"===i&&!n.initialized||"once"===i&&!t.seen}function it(t){if(t.sequence){var i=n.sequences[t.sequence.id];return!i.active&&t.config.reset&&t.revealing&&!t.disabled}return!u(t)&&t.config.reset&&t.revealing&&!t.disabled}function rt(n){return{width:n.clientWidth,height:n.clientHeight}}function ut(n){if(n&&n!==window.document.documentElement){var t=a(n);return{x:n.scrollLeft+t.left,y:n.scrollTop+t.top}}return{x:window.pageXOffset,y:window.pageYOffset}}function a(n){var t=0,i=0,r=n.offsetHeight,u=n.offsetWidth;do isNaN(n.offsetTop)||(t+=n.offsetTop),isNaN(n.offsetLeft)||(i+=n.offsetLeft),n=n.offsetParent;while(n);return{top:t,left:i,height:r,width:u}}function u(n){function h(){var t=o+u*r,h=s+f*r,c=l-u*r,a=v-f*r,y=i.y+n.config.viewOffset.top,p=i.x+n.config.viewOffset.left,w=i.y-n.config.viewOffset.bottom+e.height,b=i.x-n.config.viewOffset.right+e.width;return t<w&&c>y&&h>p&&a<b}function c(){return"fixed"===window.getComputedStyle(n.domEl).position}var t=a(n.domEl),e=rt(n.config.container),i=ut(n.config.container),r=n.config.viewFactor,u=t.height,f=t.width,o=t.top,s=t.left,l=o+u,v=s+f;return h()||c()}function i(){}var n,v;t.prototype.defaults={origin:"bottom",distance:"20px",duration:500,delay:0,rotate:{x:0,y:0,z:0},opacity:0,scale:.9,easing:"cubic-bezier(0.6, 0.2, 0.1, 1)",container:window.document.documentElement,mobile:!0,reset:!1,useDelay:"always",viewFactor:.2,viewOffset:{top:0,right:0,bottom:0,left:0},beforeReveal:function(){},beforeReset:function(){},afterReveal:function(){},afterReset:function(){}};t.prototype.isSupported=function(){var n=document.documentElement.style;return"WebkitTransition"in n&&"WebkitTransform"in n||"transition"in n&&"transform"in n};t.prototype.reveal=function(t,i,r,u){var a,s,o,v,c,d,l;if(void 0!==i&&"number"==typeof i?(r=i,i={}):void 0!==i&&null!==i||(i={}),a=f(i),s=y(t,a),!s.length)return n;for(r&&"number"==typeof r&&(d=e(),c=n.sequences[d]={id:d,interval:r,elemIds:[],active:!1}),l=0;l<s.length;l++)v=s[l].getAttribute("data-sr-id"),v?o=n.store.elements[v]:(o={id:e(),domEl:s[l],seen:!1,revealing:!1},o.domEl.setAttribute("data-sr-id",o.id)),c&&(o.sequence={id:c.id,index:c.elemIds.length},c.elemIds.push(o.id)),p(o,i,a),w(o),b(o),n.tools.isMobile()&&!o.config.mobile||!n.isSupported()?(o.domEl.setAttribute("style",o.styles.inline),o.disabled=!0):o.revealing||o.domEl.setAttribute("style",o.styles.inline+o.styles.transform.initial);return!u&&n.isSupported()&&(k(t,i,r),n.initTimeout&&window.clearTimeout(n.initTimeout),n.initTimeout=window.setTimeout(h,0)),n};t.prototype.sync=function(){var t,i;if(n.history.length&&n.isSupported()){for(t=0;t<n.history.length;t++)i=n.history[t],n.reveal(i.target,i.config,i.interval,!0);h()}return n};i.prototype.isObject=function(n){return null!==n&&"object"==typeof n&&n.constructor===Object};i.prototype.isNode=function(n){return"object"==typeof window.Node?n instanceof window.Node:n&&"object"==typeof n&&"number"==typeof n.nodeType&&"string"==typeof n.nodeName};i.prototype.isNodeList=function(n){var t=Object.prototype.toString.call(n);return"object"==typeof window.NodeList?n instanceof window.NodeList:n&&"object"==typeof n&&/^\[object (HTMLCollection|NodeList|Object)\]$/.test(t)&&"number"==typeof n.length&&(0===n.length||this.isNode(n[0]))};i.prototype.forOwn=function(n,t){if(!this.isObject(n))throw new TypeError('Expected "object", but received "'+typeof n+'".');for(var i in n)n.hasOwnProperty(i)&&t(i)};i.prototype.extend=function(n,t){return this.forOwn(t,function(i){this.isObject(t[i])?(n[i]&&this.isObject(n[i])||(n[i]={}),this.extend(n[i],t[i])):n[i]=t[i]}.bind(this)),n};i.prototype.extendClone=function(n,t){return this.extend(this.extend({},n),t)};i.prototype.isMobile=function(){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)};v=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(n){window.setTimeout(n,1e3/60)};"function"==typeof define&&"object"==typeof define.amd&&define.amd?define(function(){return t}):"undefined"!=typeof module&&module.exports?module.exports=t:window.ScrollReveal=t}();!function(n){"use strict";"function"==typeof define&&define.amd?define(["jquery"],n):"undefined"!=typeof exports?module.exports=n(require("jquery")):n(jQuery)}(function(n){"use strict";var t=window.Slick||{};t=function(){function t(t,r){var f,u=this;u.defaults={accessibility:!0,adaptiveHeight:!1,appendArrows:n(t),appendDots:n(t),arrows:!0,asNavFor:null,prevArrow:'<button type="button" data-role="none" class="slick-prev" aria-label="Previous" tabindex="0" role="button">Previous<\/button>',nextArrow:'<button type="button" data-role="none" class="slick-next" aria-label="Next" tabindex="0" role="button">Next<\/button>',autoplay:!1,autoplaySpeed:3e3,centerMode:!1,centerPadding:"50px",cssEase:"ease",customPaging:function(t,i){return n('<button type="button" data-role="none" role="button" tabindex="0" />').text(i+1)},dots:!1,dotsClass:"slick-dots",draggable:!0,easing:"linear",edgeFriction:.35,fade:!1,focusOnSelect:!1,infinite:!0,initialSlide:0,lazyLoad:"ondemand",mobileFirst:!1,pauseOnHover:!0,pauseOnFocus:!0,pauseOnDotsHover:!1,respondTo:"window",responsive:null,rows:1,rtl:!1,slide:"",slidesPerRow:1,slidesToShow:1,slidesToScroll:1,speed:500,swipe:!0,swipeToSlide:!1,touchMove:!0,touchThreshold:5,useCSS:!0,useTransform:!0,variableWidth:!1,vertical:!1,verticalSwiping:!1,waitForAnimate:!0,zIndex:1e3};u.initials={animating:!1,dragging:!1,autoPlayTimer:null,currentDirection:0,currentLeft:null,currentSlide:0,direction:1,$dots:null,listWidth:null,listHeight:null,loadIndex:0,$nextArrow:null,$prevArrow:null,slideCount:null,slideWidth:null,$slideTrack:null,$slides:null,sliding:!1,slideOffset:0,swipeLeft:null,$list:null,touchObject:{},transformsEnabled:!1,unslicked:!1};n.extend(u,u.initials);u.activeBreakpoint=null;u.animType=null;u.animProp=null;u.breakpoints=[];u.breakpointSettings=[];u.cssTransitions=!1;u.focussed=!1;u.interrupted=!1;u.hidden="hidden";u.paused=!0;u.positionProp=null;u.respondTo=null;u.rowCount=1;u.shouldClick=!0;u.$slider=n(t);u.$slidesCache=null;u.transformType=null;u.transitionType=null;u.visibilityChange="visibilitychange";u.windowWidth=0;u.windowTimer=null;f=n(t).data("slick")||{};u.options=n.extend({},u.defaults,r,f);u.currentSlide=u.options.initialSlide;u.originalSettings=u.options;"undefined"!=typeof document.mozHidden?(u.hidden="mozHidden",u.visibilityChange="mozvisibilitychange"):"undefined"!=typeof document.webkitHidden&&(u.hidden="webkitHidden",u.visibilityChange="webkitvisibilitychange");u.autoPlay=n.proxy(u.autoPlay,u);u.autoPlayClear=n.proxy(u.autoPlayClear,u);u.autoPlayIterator=n.proxy(u.autoPlayIterator,u);u.changeSlide=n.proxy(u.changeSlide,u);u.clickHandler=n.proxy(u.clickHandler,u);u.selectHandler=n.proxy(u.selectHandler,u);u.setPosition=n.proxy(u.setPosition,u);u.swipeHandler=n.proxy(u.swipeHandler,u);u.dragHandler=n.proxy(u.dragHandler,u);u.keyHandler=n.proxy(u.keyHandler,u);u.instanceUid=i++;u.htmlExpr=/^(?:\s*(<[\w\W]+>)[^>]*)$/;u.registerBreakpoints();u.init(!0)}var i=0;return t}();t.prototype.activateADA=function(){var n=this;n.$slideTrack.find(".slick-active").attr({"aria-hidden":"false"}).find("a, input, button, select").attr({tabindex:"0"})};t.prototype.addSlide=t.prototype.slickAdd=function(t,i,r){var u=this;if("boolean"==typeof i)r=i,i=null;else if(0>i||i>=u.slideCount)return!1;u.unload();"number"==typeof i?0===i&&0===u.$slides.length?n(t).appendTo(u.$slideTrack):r?n(t).insertBefore(u.$slides.eq(i)):n(t).insertAfter(u.$slides.eq(i)):r===!0?n(t).prependTo(u.$slideTrack):n(t).appendTo(u.$slideTrack);u.$slides=u.$slideTrack.children(this.options.slide);u.$slideTrack.children(this.options.slide).detach();u.$slideTrack.append(u.$slides);u.$slides.each(function(t,i){n(i).attr("data-slick-index",t)});u.$slidesCache=u.$slides;u.reinit()};t.prototype.animateHeight=function(){var n=this,t;1===n.options.slidesToShow&&n.options.adaptiveHeight===!0&&n.options.vertical===!1&&(t=n.$slides.eq(n.currentSlide).outerHeight(!0),n.$list.animate({height:t},n.options.speed))};t.prototype.animateSlide=function(t,i){var u={},r=this;r.animateHeight();r.options.rtl===!0&&r.options.vertical===!1&&(t=-t);r.transformsEnabled===!1?r.options.vertical===!1?r.$slideTrack.animate({left:t},r.options.speed,r.options.easing,i):r.$slideTrack.animate({top:t},r.options.speed,r.options.easing,i):r.cssTransitions===!1?(r.options.rtl===!0&&(r.currentLeft=-r.currentLeft),n({animStart:r.currentLeft}).animate({animStart:t},{duration:r.options.speed,easing:r.options.easing,step:function(n){n=Math.ceil(n);r.options.vertical===!1?(u[r.animType]="translate("+n+"px, 0px)",r.$slideTrack.css(u)):(u[r.animType]="translate(0px,"+n+"px)",r.$slideTrack.css(u))},complete:function(){i&&i.call()}})):(r.applyTransition(),t=Math.ceil(t),u[r.animType]=r.options.vertical===!1?"translate3d("+t+"px, 0px, 0px)":"translate3d(0px,"+t+"px, 0px)",r.$slideTrack.css(u),i&&setTimeout(function(){r.disableTransition();i.call()},r.options.speed))};t.prototype.getNavTarget=function(){var i=this,t=i.options.asNavFor;return t&&null!==t&&(t=n(t).not(i.$slider)),t};t.prototype.asNavFor=function(t){var r=this,i=r.getNavTarget();null!==i&&"object"==typeof i&&i.each(function(){var i=n(this).slick("getSlick");i.unslicked||i.slideHandler(t,!0)})};t.prototype.applyTransition=function(n){var t=this,i={};i[t.transitionType]=t.options.fade===!1?t.transformType+" "+t.options.speed+"ms "+t.options.cssEase:"opacity "+t.options.speed+"ms "+t.options.cssEase;t.options.fade===!1?t.$slideTrack.css(i):t.$slides.eq(n).css(i)};t.prototype.autoPlay=function(){var n=this;n.autoPlayClear();n.slideCount>n.options.slidesToShow&&(n.autoPlayTimer=setInterval(n.autoPlayIterator,n.options.autoplaySpeed))};t.prototype.autoPlayClear=function(){var n=this;n.autoPlayTimer&&clearInterval(n.autoPlayTimer)};t.prototype.autoPlayIterator=function(){var n=this,t=n.currentSlide+n.options.slidesToScroll;n.paused||n.interrupted||n.focussed||(n.options.infinite===!1&&(1===n.direction&&n.currentSlide+1===n.slideCount-1?n.direction=0:0===n.direction&&(t=n.currentSlide-n.options.slidesToScroll,n.currentSlide-1==0&&(n.direction=1))),n.slideHandler(t))};t.prototype.buildArrows=function(){var t=this;t.options.arrows===!0&&(t.$prevArrow=n(t.options.prevArrow).addClass("slick-arrow"),t.$nextArrow=n(t.options.nextArrow).addClass("slick-arrow"),t.slideCount>t.options.slidesToShow?(t.$prevArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),t.$nextArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),t.htmlExpr.test(t.options.prevArrow)&&t.$prevArrow.prependTo(t.options.appendArrows),t.htmlExpr.test(t.options.nextArrow)&&t.$nextArrow.appendTo(t.options.appendArrows),t.options.infinite!==!0&&t.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true")):t.$prevArrow.add(t.$nextArrow).addClass("slick-hidden").attr({"aria-disabled":"true",tabindex:"-1"}))};t.prototype.buildDots=function(){var i,r,t=this;if(t.options.dots===!0&&t.slideCount>t.options.slidesToShow){for(t.$slider.addClass("slick-dotted"),r=n("<ul />").addClass(t.options.dotsClass),i=0;i<=t.getDotCount();i+=1)r.append(n("<li />").append(t.options.customPaging.call(this,t,i)));t.$dots=r.appendTo(t.options.appendDots);t.$dots.find("li").first().addClass("slick-active").attr("aria-hidden","false")}};t.prototype.buildOut=function(){var t=this;t.$slides=t.$slider.children(t.options.slide+":not(.slick-cloned)").addClass("slick-slide");t.slideCount=t.$slides.length;t.$slides.each(function(t,i){n(i).attr("data-slick-index",t).data("originalStyling",n(i).attr("style")||"")});t.$slider.addClass("slick-slider");t.$slideTrack=0===t.slideCount?n('<div class="slick-track"/>').appendTo(t.$slider):t.$slides.wrapAll('<div class="slick-track"/>').parent();t.$list=t.$slideTrack.wrap('<div aria-live="polite" class="slick-list"/>').parent();t.$slideTrack.css("opacity",0);(t.options.centerMode===!0||t.options.swipeToSlide===!0)&&(t.options.slidesToScroll=1);n("img[data-lazy]",t.$slider).not("[src]").addClass("slick-loading");t.setupInfinite();t.buildArrows();t.buildDots();t.updateDots();t.setSlideClasses("number"==typeof t.currentSlide?t.currentSlide:0);t.options.draggable===!0&&t.$list.addClass("draggable")};t.prototype.buildRows=function(){var t,i,r,f,c,u,e,n=this,o,s,h;if(f=document.createDocumentFragment(),u=n.$slider.children(),n.options.rows>1){for(e=n.options.slidesPerRow*n.options.rows,c=Math.ceil(u.length/e),t=0;c>t;t++){for(o=document.createElement("div"),i=0;i<n.options.rows;i++){for(s=document.createElement("div"),r=0;r<n.options.slidesPerRow;r++)h=t*e+(i*n.options.slidesPerRow+r),u.get(h)&&s.appendChild(u.get(h));o.appendChild(s)}f.appendChild(o)}n.$slider.empty().append(f);n.$slider.children().children().children().css({width:100/n.options.slidesPerRow+"%",display:"inline-block"})}};t.prototype.checkResponsive=function(t,i){var f,u,e,r=this,o=!1,s=r.$slider.width(),h=window.innerWidth||n(window).width();if("window"===r.respondTo?e=h:"slider"===r.respondTo?e=s:"min"===r.respondTo&&(e=Math.min(h,s)),r.options.responsive&&r.options.responsive.length&&null!==r.options.responsive){u=null;for(f in r.breakpoints)r.breakpoints.hasOwnProperty(f)&&(r.originalSettings.mobileFirst===!1?e<r.breakpoints[f]&&(u=r.breakpoints[f]):e>r.breakpoints[f]&&(u=r.breakpoints[f]));null!==u?null!==r.activeBreakpoint?(u!==r.activeBreakpoint||i)&&(r.activeBreakpoint=u,"unslick"===r.breakpointSettings[u]?r.unslick(u):(r.options=n.extend({},r.originalSettings,r.breakpointSettings[u]),t===!0&&(r.currentSlide=r.options.initialSlide),r.refresh(t)),o=u):(r.activeBreakpoint=u,"unslick"===r.breakpointSettings[u]?r.unslick(u):(r.options=n.extend({},r.originalSettings,r.breakpointSettings[u]),t===!0&&(r.currentSlide=r.options.initialSlide),r.refresh(t)),o=u):null!==r.activeBreakpoint&&(r.activeBreakpoint=null,r.options=r.originalSettings,t===!0&&(r.currentSlide=r.options.initialSlide),r.refresh(t),o=u);t||o===!1||r.$slider.trigger("breakpoint",[r,o])}};t.prototype.changeSlide=function(t,i){var f,e,o,r=this,u=n(t.currentTarget),s;switch(u.is("a")&&t.preventDefault(),u.is("li")||(u=u.closest("li")),o=r.slideCount%r.options.slidesToScroll!=0,f=o?0:(r.slideCount-r.currentSlide)%r.options.slidesToScroll,t.data.message){case"previous":e=0===f?r.options.slidesToScroll:r.options.slidesToShow-f;r.slideCount>r.options.slidesToShow&&r.slideHandler(r.currentSlide-e,!1,i);break;case"next":e=0===f?r.options.slidesToScroll:f;r.slideCount>r.options.slidesToShow&&r.slideHandler(r.currentSlide+e,!1,i);break;case"index":s=0===t.data.index?0:t.data.index||u.index()*r.options.slidesToScroll;r.slideHandler(r.checkNavigable(s),!1,i);u.children().trigger("focus");break;default:return}};t.prototype.checkNavigable=function(n){var t,i,u=this,r;if(t=u.getNavigableIndexes(),i=0,n>t[t.length-1])n=t[t.length-1];else for(r in t){if(n<t[r]){n=i;break}i=t[r]}return n};t.prototype.cleanUpEvents=function(){var t=this;t.options.dots&&null!==t.$dots&&n("li",t.$dots).off("click.slick",t.changeSlide).off("mouseenter.slick",n.proxy(t.interrupt,t,!0)).off("mouseleave.slick",n.proxy(t.interrupt,t,!1));t.$slider.off("focus.slick blur.slick");t.options.arrows===!0&&t.slideCount>t.options.slidesToShow&&(t.$prevArrow&&t.$prevArrow.off("click.slick",t.changeSlide),t.$nextArrow&&t.$nextArrow.off("click.slick",t.changeSlide));t.$list.off("touchstart.slick mousedown.slick",t.swipeHandler);t.$list.off("touchmove.slick mousemove.slick",t.swipeHandler);t.$list.off("touchend.slick mouseup.slick",t.swipeHandler);t.$list.off("touchcancel.slick mouseleave.slick",t.swipeHandler);t.$list.off("click.slick",t.clickHandler);n(document).off(t.visibilityChange,t.visibility);t.cleanUpSlideEvents();t.options.accessibility===!0&&t.$list.off("keydown.slick",t.keyHandler);t.options.focusOnSelect===!0&&n(t.$slideTrack).children().off("click.slick",t.selectHandler);n(window).off("orientationchange.slick.slick-"+t.instanceUid,t.orientationChange);n(window).off("resize.slick.slick-"+t.instanceUid,t.resize);n("[draggable!=true]",t.$slideTrack).off("dragstart",t.preventDefault);n(window).off("load.slick.slick-"+t.instanceUid,t.setPosition);n(document).off("ready.slick.slick-"+t.instanceUid,t.setPosition)};t.prototype.cleanUpSlideEvents=function(){var t=this;t.$list.off("mouseenter.slick",n.proxy(t.interrupt,t,!0));t.$list.off("mouseleave.slick",n.proxy(t.interrupt,t,!1))};t.prototype.cleanUpRows=function(){var n,t=this;t.options.rows>1&&(n=t.$slides.children().children(),n.removeAttr("style"),t.$slider.empty().append(n))};t.prototype.clickHandler=function(n){var t=this;t.shouldClick===!1&&(n.stopImmediatePropagation(),n.stopPropagation(),n.preventDefault())};t.prototype.destroy=function(t){var i=this;i.autoPlayClear();i.touchObject={};i.cleanUpEvents();n(".slick-cloned",i.$slider).detach();i.$dots&&i.$dots.remove();i.$prevArrow&&i.$prevArrow.length&&(i.$prevArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),i.htmlExpr.test(i.options.prevArrow)&&i.$prevArrow.remove());i.$nextArrow&&i.$nextArrow.length&&(i.$nextArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),i.htmlExpr.test(i.options.nextArrow)&&i.$nextArrow.remove());i.$slides&&(i.$slides.removeClass("slick-slide slick-active slick-center slick-visible slick-current").removeAttr("aria-hidden").removeAttr("data-slick-index").each(function(){n(this).attr("style",n(this).data("originalStyling"))}),i.$slideTrack.children(this.options.slide).detach(),i.$slideTrack.detach(),i.$list.detach(),i.$slider.append(i.$slides));i.cleanUpRows();i.$slider.removeClass("slick-slider");i.$slider.removeClass("slick-initialized");i.$slider.removeClass("slick-dotted");i.unslicked=!0;t||i.$slider.trigger("destroy",[i])};t.prototype.disableTransition=function(n){var t=this,i={};i[t.transitionType]="";t.options.fade===!1?t.$slideTrack.css(i):t.$slides.eq(n).css(i)};t.prototype.fadeSlide=function(n,t){var i=this;i.cssTransitions===!1?(i.$slides.eq(n).css({zIndex:i.options.zIndex}),i.$slides.eq(n).animate({opacity:1},i.options.speed,i.options.easing,t)):(i.applyTransition(n),i.$slides.eq(n).css({opacity:1,zIndex:i.options.zIndex}),t&&setTimeout(function(){i.disableTransition(n);t.call()},i.options.speed))};t.prototype.fadeSlideOut=function(n){var t=this;t.cssTransitions===!1?t.$slides.eq(n).animate({opacity:0,zIndex:t.options.zIndex-2},t.options.speed,t.options.easing):(t.applyTransition(n),t.$slides.eq(n).css({opacity:0,zIndex:t.options.zIndex-2}))};t.prototype.filterSlides=t.prototype.slickFilter=function(n){var t=this;null!==n&&(t.$slidesCache=t.$slides,t.unload(),t.$slideTrack.children(this.options.slide).detach(),t.$slidesCache.filter(n).appendTo(t.$slideTrack),t.reinit())};t.prototype.focusHandler=function(){var t=this;t.$slider.off("focus.slick blur.slick").on("focus.slick blur.slick","*:not(.slick-arrow)",function(i){i.stopImmediatePropagation();var r=n(this);setTimeout(function(){t.options.pauseOnFocus&&(t.focussed=r.is(":focus"),t.autoPlay())},0)})};t.prototype.getCurrent=t.prototype.slickCurrentSlide=function(){var n=this;return n.currentSlide};t.prototype.getDotCount=function(){var n=this,i=0,r=0,t=0;if(n.options.infinite===!0)for(;i<n.slideCount;)++t,i=r+n.options.slidesToScroll,r+=n.options.slidesToScroll<=n.options.slidesToShow?n.options.slidesToScroll:n.options.slidesToShow;else if(n.options.centerMode===!0)t=n.slideCount;else if(n.options.asNavFor)for(;i<n.slideCount;)++t,i=r+n.options.slidesToScroll,r+=n.options.slidesToScroll<=n.options.slidesToShow?n.options.slidesToScroll:n.options.slidesToShow;else t=1+Math.ceil((n.slideCount-n.options.slidesToShow)/n.options.slidesToScroll);return t-1};t.prototype.getLeft=function(n){var f,r,i,t=this,u=0;return t.slideOffset=0,r=t.$slides.first().outerHeight(!0),t.options.infinite===!0?(t.slideCount>t.options.slidesToShow&&(t.slideOffset=t.slideWidth*t.options.slidesToShow*-1,u=r*t.options.slidesToShow*-1),t.slideCount%t.options.slidesToScroll!=0&&n+t.options.slidesToScroll>t.slideCount&&t.slideCount>t.options.slidesToShow&&(n>t.slideCount?(t.slideOffset=(t.options.slidesToShow-(n-t.slideCount))*t.slideWidth*-1,u=(t.options.slidesToShow-(n-t.slideCount))*r*-1):(t.slideOffset=t.slideCount%t.options.slidesToScroll*t.slideWidth*-1,u=t.slideCount%t.options.slidesToScroll*r*-1))):n+t.options.slidesToShow>t.slideCount&&(t.slideOffset=(n+t.options.slidesToShow-t.slideCount)*t.slideWidth,u=(n+t.options.slidesToShow-t.slideCount)*r),t.slideCount<=t.options.slidesToShow&&(t.slideOffset=0,u=0),t.options.centerMode===!0&&t.options.infinite===!0?t.slideOffset+=t.slideWidth*Math.floor(t.options.slidesToShow/2)-t.slideWidth:t.options.centerMode===!0&&(t.slideOffset=0,t.slideOffset+=t.slideWidth*Math.floor(t.options.slidesToShow/2)),f=t.options.vertical===!1?n*t.slideWidth*-1+t.slideOffset:n*r*-1+u,t.options.variableWidth===!0&&(i=t.slideCount<=t.options.slidesToShow||t.options.infinite===!1?t.$slideTrack.children(".slick-slide").eq(n):t.$slideTrack.children(".slick-slide").eq(n+t.options.slidesToShow),f=t.options.rtl===!0?i[0]?-1*(t.$slideTrack.width()-i[0].offsetLeft-i.width()):0:i[0]?-1*i[0].offsetLeft:0,t.options.centerMode===!0&&(i=t.slideCount<=t.options.slidesToShow||t.options.infinite===!1?t.$slideTrack.children(".slick-slide").eq(n):t.$slideTrack.children(".slick-slide").eq(n+t.options.slidesToShow+1),f=t.options.rtl===!0?i[0]?-1*(t.$slideTrack.width()-i[0].offsetLeft-i.width()):0:i[0]?-1*i[0].offsetLeft:0,f+=(t.$list.width()-i.outerWidth())/2)),f};t.prototype.getOption=t.prototype.slickGetOption=function(n){var t=this;return t.options[n]};t.prototype.getNavigableIndexes=function(){var i,n=this,t=0,r=0,u=[];for(n.options.infinite===!1?i=n.slideCount:(t=-1*n.options.slidesToScroll,r=-1*n.options.slidesToScroll,i=2*n.slideCount);i>t;)u.push(t),t=r+n.options.slidesToScroll,r+=n.options.slidesToScroll<=n.options.slidesToShow?n.options.slidesToScroll:n.options.slidesToShow;return u};t.prototype.getSlick=function(){return this};t.prototype.getSlideCount=function(){var u,i,r,t=this;return r=t.options.centerMode===!0?t.slideWidth*Math.floor(t.options.slidesToShow/2):0,t.options.swipeToSlide===!0?(t.$slideTrack.find(".slick-slide").each(function(u,f){if(f.offsetLeft-r+n(f).outerWidth()/2>-1*t.swipeLeft)return(i=f,!1)}),u=Math.abs(n(i).attr("data-slick-index")-t.currentSlide)||1):t.options.slidesToScroll};t.prototype.goTo=t.prototype.slickGoTo=function(n,t){var i=this;i.changeSlide({data:{message:"index",index:parseInt(n)}},t)};t.prototype.init=function(t){var i=this;n(i.$slider).hasClass("slick-initialized")||(n(i.$slider).addClass("slick-initialized"),i.buildRows(),i.buildOut(),i.setProps(),i.startLoad(),i.loadSlider(),i.initializeEvents(),i.updateArrows(),i.updateDots(),i.checkResponsive(!0),i.focusHandler());t&&i.$slider.trigger("init",[i]);i.options.accessibility===!0&&i.initADA();i.options.autoplay&&(i.paused=!1,i.autoPlay())};t.prototype.initADA=function(){var t=this;t.$slides.add(t.$slideTrack.find(".slick-cloned")).attr({"aria-hidden":"true",tabindex:"-1"}).find("a, input, button, select").attr({tabindex:"-1"});t.$slideTrack.attr("role","listbox");t.$slides.not(t.$slideTrack.find(".slick-cloned")).each(function(i){n(this).attr({role:"option","aria-describedby":"slick-slide"+t.instanceUid+i})});null!==t.$dots&&t.$dots.attr("role","tablist").find("li").each(function(i){n(this).attr({role:"presentation","aria-selected":"false","aria-controls":"navigation"+t.instanceUid+i,id:"slick-slide"+t.instanceUid+i})}).first().attr("aria-selected","true").end().find("button").attr("role","button").end().closest("div").attr("role","toolbar");t.activateADA()};t.prototype.initArrowEvents=function(){var n=this;n.options.arrows===!0&&n.slideCount>n.options.slidesToShow&&(n.$prevArrow.off("click.slick").on("click.slick",{message:"previous"},n.changeSlide),n.$nextArrow.off("click.slick").on("click.slick",{message:"next"},n.changeSlide))};t.prototype.initDotEvents=function(){var t=this;t.options.dots===!0&&t.slideCount>t.options.slidesToShow&&n("li",t.$dots).on("click.slick",{message:"index"},t.changeSlide);t.options.dots===!0&&t.options.pauseOnDotsHover===!0&&n("li",t.$dots).on("mouseenter.slick",n.proxy(t.interrupt,t,!0)).on("mouseleave.slick",n.proxy(t.interrupt,t,!1))};t.prototype.initSlideEvents=function(){var t=this;t.options.pauseOnHover&&(t.$list.on("mouseenter.slick",n.proxy(t.interrupt,t,!0)),t.$list.on("mouseleave.slick",n.proxy(t.interrupt,t,!1)))};t.prototype.initializeEvents=function(){var t=this;t.initArrowEvents();t.initDotEvents();t.initSlideEvents();t.$list.on("touchstart.slick mousedown.slick",{action:"start"},t.swipeHandler);t.$list.on("touchmove.slick mousemove.slick",{action:"move"},t.swipeHandler);t.$list.on("touchend.slick mouseup.slick",{action:"end"},t.swipeHandler);t.$list.on("touchcancel.slick mouseleave.slick",{action:"end"},t.swipeHandler);t.$list.on("click.slick",t.clickHandler);n(document).on(t.visibilityChange,n.proxy(t.visibility,t));t.options.accessibility===!0&&t.$list.on("keydown.slick",t.keyHandler);t.options.focusOnSelect===!0&&n(t.$slideTrack).children().on("click.slick",t.selectHandler);n(window).on("orientationchange.slick.slick-"+t.instanceUid,n.proxy(t.orientationChange,t));n(window).on("resize.slick.slick-"+t.instanceUid,n.proxy(t.resize,t));n("[draggable!=true]",t.$slideTrack).on("dragstart",t.preventDefault);n(window).on("load.slick.slick-"+t.instanceUid,t.setPosition);n(document).on("ready.slick.slick-"+t.instanceUid,t.setPosition)};t.prototype.initUI=function(){var n=this;n.options.arrows===!0&&n.slideCount>n.options.slidesToShow&&(n.$prevArrow.show(),n.$nextArrow.show());n.options.dots===!0&&n.slideCount>n.options.slidesToShow&&n.$dots.show()};t.prototype.keyHandler=function(n){var t=this;n.target.tagName.match("TEXTAREA|INPUT|SELECT")||(37===n.keyCode&&t.options.accessibility===!0?t.changeSlide({data:{message:t.options.rtl===!0?"next":"previous"}}):39===n.keyCode&&t.options.accessibility===!0&&t.changeSlide({data:{message:t.options.rtl===!0?"previous":"next"}}))};t.prototype.lazyLoad=function(){function f(i){n("img[data-lazy]",i).each(function(){var i=n(this),r=n(this).attr("data-lazy"),u=document.createElement("img");u.onload=function(){i.animate({opacity:0},100,function(){i.attr("src",r).animate({opacity:1},200,function(){i.removeAttr("data-lazy").removeClass("slick-loading")});t.$slider.trigger("lazyLoaded",[t,i,r])})};u.onerror=function(){i.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error");t.$slider.trigger("lazyLoadError",[t,i,r])};u.src=r})}var e,r,i,u,t=this;t.options.centerMode===!0?t.options.infinite===!0?(i=t.currentSlide+(t.options.slidesToShow/2+1),u=i+t.options.slidesToShow+2):(i=Math.max(0,t.currentSlide-(t.options.slidesToShow/2+1)),u=2+(t.options.slidesToShow/2+1)+t.currentSlide):(i=t.options.infinite?t.options.slidesToShow+t.currentSlide:t.currentSlide,u=Math.ceil(i+t.options.slidesToShow),t.options.fade===!0&&(i>0&&i--,u<=t.slideCount&&u++));e=t.$slider.find(".slick-slide").slice(i,u);f(e);t.slideCount<=t.options.slidesToShow?(r=t.$slider.find(".slick-slide"),f(r)):t.currentSlide>=t.slideCount-t.options.slidesToShow?(r=t.$slider.find(".slick-cloned").slice(0,t.options.slidesToShow),f(r)):0===t.currentSlide&&(r=t.$slider.find(".slick-cloned").slice(-1*t.options.slidesToShow),f(r))};t.prototype.loadSlider=function(){var n=this;n.setPosition();n.$slideTrack.css({opacity:1});n.$slider.removeClass("slick-loading");n.initUI();"progressive"===n.options.lazyLoad&&n.progressiveLazyLoad()};t.prototype.next=t.prototype.slickNext=function(){var n=this;n.changeSlide({data:{message:"next"}})};t.prototype.orientationChange=function(){var n=this;n.checkResponsive();n.setPosition()};t.prototype.pause=t.prototype.slickPause=function(){var n=this;n.autoPlayClear();n.paused=!0};t.prototype.play=t.prototype.slickPlay=function(){var n=this;n.autoPlay();n.options.autoplay=!0;n.paused=!1;n.focussed=!1;n.interrupted=!1};t.prototype.postSlide=function(n){var t=this;t.unslicked||(t.$slider.trigger("afterChange",[t,n]),t.animating=!1,t.setPosition(),t.swipeLeft=null,t.options.autoplay&&t.autoPlay(),t.options.accessibility===!0&&t.initADA())};t.prototype.prev=t.prototype.slickPrev=function(){var n=this;n.changeSlide({data:{message:"previous"}})};t.prototype.preventDefault=function(n){n.preventDefault()};t.prototype.progressiveLazyLoad=function(t){t=t||1;var r,u,f,i=this,e=n("img[data-lazy]",i.$slider);e.length?(r=e.first(),u=r.attr("data-lazy"),f=document.createElement("img"),f.onload=function(){r.attr("src",u).removeAttr("data-lazy").removeClass("slick-loading");i.options.adaptiveHeight===!0&&i.setPosition();i.$slider.trigger("lazyLoaded",[i,r,u]);i.progressiveLazyLoad()},f.onerror=function(){3>t?setTimeout(function(){i.progressiveLazyLoad(t+1)},500):(r.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"),i.$slider.trigger("lazyLoadError",[i,r,u]),i.progressiveLazyLoad())},f.src=u):i.$slider.trigger("allImagesLoaded",[i])};t.prototype.refresh=function(t){var r,u,i=this;u=i.slideCount-i.options.slidesToShow;!i.options.infinite&&i.currentSlide>u&&(i.currentSlide=u);i.slideCount<=i.options.slidesToShow&&(i.currentSlide=0);r=i.currentSlide;i.destroy(!0);n.extend(i,i.initials,{currentSlide:r});i.init();t||i.changeSlide({data:{message:"index",index:r}},!1)};t.prototype.registerBreakpoints=function(){var u,f,i,t=this,r=t.options.responsive||null;if("array"===n.type(r)&&r.length){t.respondTo=t.options.respondTo||"window";for(u in r)if(i=t.breakpoints.length-1,f=r[u].breakpoint,r.hasOwnProperty(u)){for(;i>=0;)t.breakpoints[i]&&t.breakpoints[i]===f&&t.breakpoints.splice(i,1),i--;t.breakpoints.push(f);t.breakpointSettings[f]=r[u].settings}t.breakpoints.sort(function(n,i){return t.options.mobileFirst?n-i:i-n})}};t.prototype.reinit=function(){var t=this;t.$slides=t.$slideTrack.children(t.options.slide).addClass("slick-slide");t.slideCount=t.$slides.length;t.currentSlide>=t.slideCount&&0!==t.currentSlide&&(t.currentSlide=t.currentSlide-t.options.slidesToScroll);t.slideCount<=t.options.slidesToShow&&(t.currentSlide=0);t.registerBreakpoints();t.setProps();t.setupInfinite();t.buildArrows();t.updateArrows();t.initArrowEvents();t.buildDots();t.updateDots();t.initDotEvents();t.cleanUpSlideEvents();t.initSlideEvents();t.checkResponsive(!1,!0);t.options.focusOnSelect===!0&&n(t.$slideTrack).children().on("click.slick",t.selectHandler);t.setSlideClasses("number"==typeof t.currentSlide?t.currentSlide:0);t.setPosition();t.focusHandler();t.paused=!t.options.autoplay;t.autoPlay();t.$slider.trigger("reInit",[t])};t.prototype.resize=function(){var t=this;n(window).width()!==t.windowWidth&&(clearTimeout(t.windowDelay),t.windowDelay=window.setTimeout(function(){t.windowWidth=n(window).width();t.checkResponsive();t.unslicked||t.setPosition()},50))};t.prototype.removeSlide=t.prototype.slickRemove=function(n,t,i){var r=this;return"boolean"==typeof n?(t=n,n=t===!0?0:r.slideCount-1):n=t===!0?--n:n,r.slideCount<1||0>n||n>r.slideCount-1?!1:(r.unload(),i===!0?r.$slideTrack.children().remove():r.$slideTrack.children(this.options.slide).eq(n).remove(),r.$slides=r.$slideTrack.children(this.options.slide),r.$slideTrack.children(this.options.slide).detach(),r.$slideTrack.append(r.$slides),r.$slidesCache=r.$slides,void r.reinit())};t.prototype.setCSS=function(n){var r,u,t=this,i={};t.options.rtl===!0&&(n=-n);r="left"==t.positionProp?Math.ceil(n)+"px":"0px";u="top"==t.positionProp?Math.ceil(n)+"px":"0px";i[t.positionProp]=n;t.transformsEnabled===!1?t.$slideTrack.css(i):(i={},t.cssTransitions===!1?(i[t.animType]="translate("+r+", "+u+")",t.$slideTrack.css(i)):(i[t.animType]="translate3d("+r+", "+u+", 0px)",t.$slideTrack.css(i)))};t.prototype.setDimensions=function(){var n=this,t;n.options.vertical===!1?n.options.centerMode===!0&&n.$list.css({padding:"0px "+n.options.centerPadding}):(n.$list.height(n.$slides.first().outerHeight(!0)*n.options.slidesToShow),n.options.centerMode===!0&&n.$list.css({padding:n.options.centerPadding+" 0px"}));n.listWidth=n.$list.width();n.listHeight=n.$list.height();n.options.vertical===!1&&n.options.variableWidth===!1?(n.slideWidth=Math.ceil(n.listWidth/n.options.slidesToShow),n.$slideTrack.width(Math.ceil(n.slideWidth*n.$slideTrack.children(".slick-slide").length))):n.options.variableWidth===!0?n.$slideTrack.width(5e3*n.slideCount):(n.slideWidth=Math.ceil(n.listWidth),n.$slideTrack.height(Math.ceil(n.$slides.first().outerHeight(!0)*n.$slideTrack.children(".slick-slide").length)));t=n.$slides.first().outerWidth(!0)-n.$slides.first().width();n.options.variableWidth===!1&&n.$slideTrack.children(".slick-slide").width(n.slideWidth-t)};t.prototype.setFade=function(){var i,t=this;t.$slides.each(function(r,u){i=t.slideWidth*r*-1;t.options.rtl===!0?n(u).css({position:"relative",right:i,top:0,zIndex:t.options.zIndex-2,opacity:0}):n(u).css({position:"relative",left:i,top:0,zIndex:t.options.zIndex-2,opacity:0})});t.$slides.eq(t.currentSlide).css({zIndex:t.options.zIndex-1,opacity:1})};t.prototype.setHeight=function(){var n=this,t;1===n.options.slidesToShow&&n.options.adaptiveHeight===!0&&n.options.vertical===!1&&(t=n.$slides.eq(n.currentSlide).outerHeight(!0),n.$list.css("height",t))};t.prototype.setOption=t.prototype.slickSetOption=function(){var u,f,e,i,r,t=this,o=!1;if("object"===n.type(arguments[0])?(e=arguments[0],o=arguments[1],r="multiple"):"string"===n.type(arguments[0])&&(e=arguments[0],i=arguments[1],o=arguments[2],"responsive"===arguments[0]&&"array"===n.type(arguments[1])?r="responsive":"undefined"!=typeof arguments[1]&&(r="single")),"single"===r)t.options[e]=i;else if("multiple"===r)n.each(e,function(n,i){t.options[n]=i});else if("responsive"===r)for(f in i)if("array"!==n.type(t.options.responsive))t.options.responsive=[i[f]];else{for(u=t.options.responsive.length-1;u>=0;)t.options.responsive[u].breakpoint===i[f].breakpoint&&t.options.responsive.splice(u,1),u--;t.options.responsive.push(i[f])}o&&(t.unload(),t.reinit())};t.prototype.setPosition=function(){var n=this;n.setDimensions();n.setHeight();n.options.fade===!1?n.setCSS(n.getLeft(n.currentSlide)):n.setFade();n.$slider.trigger("setPosition",[n])};t.prototype.setProps=function(){var n=this,t=document.body.style;n.positionProp=n.options.vertical===!0?"top":"left";"top"===n.positionProp?n.$slider.addClass("slick-vertical"):n.$slider.removeClass("slick-vertical");(void 0!==t.WebkitTransition||void 0!==t.MozTransition||void 0!==t.msTransition)&&n.options.useCSS===!0&&(n.cssTransitions=!0);n.options.fade&&("number"==typeof n.options.zIndex?n.options.zIndex<3&&(n.options.zIndex=3):n.options.zIndex=n.defaults.zIndex);void 0!==t.OTransform&&(n.animType="OTransform",n.transformType="-o-transform",n.transitionType="OTransition",void 0===t.perspectiveProperty&&void 0===t.webkitPerspective&&(n.animType=!1));void 0!==t.MozTransform&&(n.animType="MozTransform",n.transformType="-moz-transform",n.transitionType="MozTransition",void 0===t.perspectiveProperty&&void 0===t.MozPerspective&&(n.animType=!1));void 0!==t.webkitTransform&&(n.animType="webkitTransform",n.transformType="-webkit-transform",n.transitionType="webkitTransition",void 0===t.perspectiveProperty&&void 0===t.webkitPerspective&&(n.animType=!1));void 0!==t.msTransform&&(n.animType="msTransform",n.transformType="-ms-transform",n.transitionType="msTransition",void 0===t.msTransform&&(n.animType=!1));void 0!==t.transform&&n.animType!==!1&&(n.animType="transform",n.transformType="transform",n.transitionType="transition");n.transformsEnabled=n.options.useTransform&&null!==n.animType&&n.animType!==!1};t.prototype.setSlideClasses=function(n){var u,i,r,f,t=this;i=t.$slider.find(".slick-slide").removeClass("slick-active slick-center slick-current").attr("aria-hidden","true");t.$slides.eq(n).addClass("slick-current");t.options.centerMode===!0?(u=Math.floor(t.options.slidesToShow/2),t.options.infinite===!0&&(n>=u&&n<=t.slideCount-1-u?t.$slides.slice(n-u,n+u+1).addClass("slick-active").attr("aria-hidden","false"):(r=t.options.slidesToShow+n,i.slice(r-u+1,r+u+2).addClass("slick-active").attr("aria-hidden","false")),0===n?i.eq(i.length-1-t.options.slidesToShow).addClass("slick-center"):n===t.slideCount-1&&i.eq(t.options.slidesToShow).addClass("slick-center")),t.$slides.eq(n).addClass("slick-center")):n>=0&&n<=t.slideCount-t.options.slidesToShow?t.$slides.slice(n,n+t.options.slidesToShow).addClass("slick-active").attr("aria-hidden","false"):i.length<=t.options.slidesToShow?i.addClass("slick-active").attr("aria-hidden","false"):(f=t.slideCount%t.options.slidesToShow,r=t.options.infinite===!0?t.options.slidesToShow+n:n,t.options.slidesToShow==t.options.slidesToScroll&&t.slideCount-n<t.options.slidesToShow?i.slice(r-(t.options.slidesToShow-f),r+f).addClass("slick-active").attr("aria-hidden","false"):i.slice(r,r+t.options.slidesToShow).addClass("slick-active").attr("aria-hidden","false"));"ondemand"===t.options.lazyLoad&&t.lazyLoad()};t.prototype.setupInfinite=function(){var i,r,u,t=this;if(t.options.fade===!0&&(t.options.centerMode=!1),t.options.infinite===!0&&t.options.fade===!1&&(r=null,t.slideCount>t.options.slidesToShow)){for(u=t.options.centerMode===!0?t.options.slidesToShow+1:t.options.slidesToShow,i=t.slideCount;i>t.slideCount-u;i-=1)r=i-1,n(t.$slides[r]).clone(!0).attr("id","").attr("data-slick-index",r-t.slideCount).prependTo(t.$slideTrack).addClass("slick-cloned");for(i=0;u>i;i+=1)r=i,n(t.$slides[r]).clone(!0).attr("id","").attr("data-slick-index",r+t.slideCount).appendTo(t.$slideTrack).addClass("slick-cloned");t.$slideTrack.find(".slick-cloned").find("[id]").each(function(){n(this).attr("id","")})}};t.prototype.interrupt=function(n){var t=this;n||t.autoPlay();t.interrupted=n};t.prototype.selectHandler=function(t){var i=this,u=n(t.target).is(".slick-slide")?n(t.target):n(t.target).parents(".slick-slide"),r=parseInt(u.attr("data-slick-index"));return r||(r=0),i.slideCount<=i.options.slidesToShow?(i.setSlideClasses(r),void i.asNavFor(r)):void i.slideHandler(r)};t.prototype.slideHandler=function(n,t,i){var u,f,s,o,e,h=null,r=this;return t=t||!1,r.animating===!0&&r.options.waitForAnimate===!0||r.options.fade===!0&&r.currentSlide===n||r.slideCount<=r.options.slidesToShow?void 0:(t===!1&&r.asNavFor(n),u=n,h=r.getLeft(u),o=r.getLeft(r.currentSlide),r.currentLeft=null===r.swipeLeft?o:r.swipeLeft,r.options.infinite===!1&&r.options.centerMode===!1&&(0>n||n>r.getDotCount()*r.options.slidesToScroll)?void(r.options.fade===!1&&(u=r.currentSlide,i!==!0?r.animateSlide(o,function(){r.postSlide(u)}):r.postSlide(u))):r.options.infinite===!1&&r.options.centerMode===!0&&(0>n||n>r.slideCount-r.options.slidesToScroll)?void(r.options.fade===!1&&(u=r.currentSlide,i!==!0?r.animateSlide(o,function(){r.postSlide(u)}):r.postSlide(u))):(r.options.autoplay&&clearInterval(r.autoPlayTimer),f=0>u?r.slideCount%r.options.slidesToScroll!=0?r.slideCount-r.slideCount%r.options.slidesToScroll:r.slideCount+u:u>=r.slideCount?r.slideCount%r.options.slidesToScroll!=0?0:u-r.slideCount:u,r.animating=!0,r.$slider.trigger("beforeChange",[r,r.currentSlide,f]),s=r.currentSlide,r.currentSlide=f,r.setSlideClasses(r.currentSlide),r.options.asNavFor&&(e=r.getNavTarget(),e=e.slick("getSlick"),e.slideCount<=e.options.slidesToShow&&e.setSlideClasses(r.currentSlide)),r.updateDots(),r.updateArrows(),r.options.fade===!0?(i!==!0?(r.fadeSlideOut(s),r.fadeSlide(f,function(){r.postSlide(f)})):r.postSlide(f),void r.animateHeight()):void(i!==!0?r.animateSlide(h,function(){r.postSlide(f)}):r.postSlide(f))))};t.prototype.startLoad=function(){var n=this;n.options.arrows===!0&&n.slideCount>n.options.slidesToShow&&(n.$prevArrow.hide(),n.$nextArrow.hide());n.options.dots===!0&&n.slideCount>n.options.slidesToShow&&n.$dots.hide();n.$slider.addClass("slick-loading")};t.prototype.swipeDirection=function(){var i,r,u,n,t=this;return i=t.touchObject.startX-t.touchObject.curX,r=t.touchObject.startY-t.touchObject.curY,u=Math.atan2(r,i),n=Math.round(180*u/Math.PI),0>n&&(n=360-Math.abs(n)),45>=n&&n>=0?t.options.rtl===!1?"left":"right":360>=n&&n>=315?t.options.rtl===!1?"left":"right":n>=135&&225>=n?t.options.rtl===!1?"right":"left":t.options.verticalSwiping===!0?n>=35&&135>=n?"down":"up":"vertical"};t.prototype.swipeEnd=function(){var t,i,n=this;if(n.dragging=!1,n.interrupted=!1,n.shouldClick=n.touchObject.swipeLength>10?!1:!0,void 0===n.touchObject.curX)return!1;if(n.touchObject.edgeHit===!0&&n.$slider.trigger("edge",[n,n.swipeDirection()]),n.touchObject.swipeLength>=n.touchObject.minSwipe){switch(i=n.swipeDirection()){case"left":case"down":t=n.options.swipeToSlide?n.checkNavigable(n.currentSlide+n.getSlideCount()):n.currentSlide+n.getSlideCount();n.currentDirection=0;break;case"right":case"up":t=n.options.swipeToSlide?n.checkNavigable(n.currentSlide-n.getSlideCount()):n.currentSlide-n.getSlideCount();n.currentDirection=1}"vertical"!=i&&(n.slideHandler(t),n.touchObject={},n.$slider.trigger("swipe",[n,i]))}else n.touchObject.startX!==n.touchObject.curX&&(n.slideHandler(n.currentSlide),n.touchObject={})};t.prototype.swipeHandler=function(n){var t=this;if(!(t.options.swipe===!1||"ontouchend"in document&&t.options.swipe===!1||t.options.draggable===!1&&-1!==n.type.indexOf("mouse")))switch(t.touchObject.fingerCount=n.originalEvent&&void 0!==n.originalEvent.touches?n.originalEvent.touches.length:1,t.touchObject.minSwipe=t.listWidth/t.options.touchThreshold,t.options.verticalSwiping===!0&&(t.touchObject.minSwipe=t.listHeight/t.options.touchThreshold),n.data.action){case"start":t.swipeStart(n);break;case"move":t.swipeMove(n);break;case"end":t.swipeEnd(n)}};t.prototype.swipeMove=function(n){var f,e,r,u,i,t=this;return i=void 0!==n.originalEvent?n.originalEvent.touches:null,!t.dragging||i&&1!==i.length?!1:(f=t.getLeft(t.currentSlide),t.touchObject.curX=void 0!==i?i[0].pageX:n.clientX,t.touchObject.curY=void 0!==i?i[0].pageY:n.clientY,t.touchObject.swipeLength=Math.round(Math.sqrt(Math.pow(t.touchObject.curX-t.touchObject.startX,2))),t.options.verticalSwiping===!0&&(t.touchObject.swipeLength=Math.round(Math.sqrt(Math.pow(t.touchObject.curY-t.touchObject.startY,2)))),e=t.swipeDirection(),"vertical"!==e?(void 0!==n.originalEvent&&t.touchObject.swipeLength>4&&n.preventDefault(),u=(t.options.rtl===!1?1:-1)*(t.touchObject.curX>t.touchObject.startX?1:-1),t.options.verticalSwiping===!0&&(u=t.touchObject.curY>t.touchObject.startY?1:-1),r=t.touchObject.swipeLength,t.touchObject.edgeHit=!1,t.options.infinite===!1&&(0===t.currentSlide&&"right"===e||t.currentSlide>=t.getDotCount()&&"left"===e)&&(r=t.touchObject.swipeLength*t.options.edgeFriction,t.touchObject.edgeHit=!0),t.swipeLeft=t.options.vertical===!1?f+r*u:f+r*(t.$list.height()/t.listWidth)*u,t.options.verticalSwiping===!0&&(t.swipeLeft=f+r*u),t.options.fade===!0||t.options.touchMove===!1?!1:t.animating===!0?(t.swipeLeft=null,!1):void t.setCSS(t.swipeLeft)):void 0)};t.prototype.swipeStart=function(n){var i,t=this;return t.interrupted=!0,1!==t.touchObject.fingerCount||t.slideCount<=t.options.slidesToShow?(t.touchObject={},!1):(void 0!==n.originalEvent&&void 0!==n.originalEvent.touches&&(i=n.originalEvent.touches[0]),t.touchObject.startX=t.touchObject.curX=void 0!==i?i.pageX:n.clientX,t.touchObject.startY=t.touchObject.curY=void 0!==i?i.pageY:n.clientY,void(t.dragging=!0))};t.prototype.unfilterSlides=t.prototype.slickUnfilter=function(){var n=this;null!==n.$slidesCache&&(n.unload(),n.$slideTrack.children(this.options.slide).detach(),n.$slidesCache.appendTo(n.$slideTrack),n.reinit())};t.prototype.unload=function(){var t=this;n(".slick-cloned",t.$slider).remove();t.$dots&&t.$dots.remove();t.$prevArrow&&t.htmlExpr.test(t.options.prevArrow)&&t.$prevArrow.remove();t.$nextArrow&&t.htmlExpr.test(t.options.nextArrow)&&t.$nextArrow.remove();t.$slides.removeClass("slick-slide slick-active slick-visible slick-current").attr("aria-hidden","true").css("width","")};t.prototype.unslick=function(n){var t=this;t.$slider.trigger("unslick",[t,n]);t.destroy()};t.prototype.updateArrows=function(){var t,n=this;t=Math.floor(n.options.slidesToShow/2);n.options.arrows===!0&&n.slideCount>n.options.slidesToShow&&!n.options.infinite&&(n.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false"),n.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false"),0===n.currentSlide?(n.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true"),n.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false")):n.currentSlide>=n.slideCount-n.options.slidesToShow&&n.options.centerMode===!1?(n.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),n.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")):n.currentSlide>=n.slideCount-1&&n.options.centerMode===!0&&(n.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),n.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")))};t.prototype.updateDots=function(){var n=this;null!==n.$dots&&(n.$dots.find("li").removeClass("slick-active").attr("aria-hidden","true"),n.$dots.find("li").eq(Math.floor(n.currentSlide/n.options.slidesToScroll)).addClass("slick-active").attr("aria-hidden","false"))};t.prototype.visibility=function(){var n=this;n.options.autoplay&&(n.interrupted=document[n.hidden]?!0:!1)};n.fn.slick=function(){for(var u,i=this,r=arguments[0],f=Array.prototype.slice.call(arguments,1),e=i.length,n=0;e>n;n++)if("object"==typeof r||"undefined"==typeof r?i[n].slick=new t(i[n],r):u=i[n].slick[r].apply(i[n].slick,f),"undefined"!=typeof u)return u;return i}})