!function(n,t){"object"==typeof module&&"object"==typeof module.exports?module.exports=n.document?t(n,!0):function(n){if(!n.document)throw new Error("jQuery requires a window with a document");return t(n)}:t(n)}("undefined"!=typeof window?window:this,function(n,t){function ri(n){var t=n.length,r=i.type(n);return"function"===r||i.isWindow(n)?!1:1===n.nodeType&&t?!0:"array"===r||0===t||"number"==typeof t&&t>0&&t-1 in n}function ui(n,t,r){if(i.isFunction(t))return i.grep(n,function(n,i){return!!t.call(n,i,n)!==r});if(t.nodeType)return i.grep(n,function(n){return n===t!==r});if("string"==typeof t){if(ef.test(t))return i.filter(t,n,r);t=i.filter(t,n)}return i.grep(n,function(n){return ft.call(t,n)>=0!==r})}function ur(n,t){while((n=n[t])&&1!==n.nodeType);return n}function of(n){var t=fi[n]={};return i.each(n.match(c)||[],function(n,i){t[i]=!0}),t}function ht(){u.removeEventListener("DOMContentLoaded",ht,!1);n.removeEventListener("load",ht,!1);i.ready()}function v(){Object.defineProperty(this.cache={},0,{get:function(){return{}}});this.expando=i.expando+v.uid++}function fr(n,t,r){var u;if(void 0===r&&1===n.nodeType)if(u="data-"+t.replace(hf,"-$1").toLowerCase(),r=n.getAttribute(u),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:sf.test(r)?i.parseJSON(r):r}catch(f){}e.set(n,t,r)}else r=void 0;return r}function lt(){return!0}function k(){return!1}function hr(){try{return u.activeElement}catch(n){}}function vr(n,t){return i.nodeName(n,"table")&&i.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?n.getElementsByTagName("tbody")[0]||n.appendChild(n.ownerDocument.createElement("tbody")):n}function bf(n){return n.type=(null!==n.getAttribute("type"))+"/"+n.type,n}function kf(n){var t=pf.exec(n.type);return t?n.type=t[1]:n.removeAttribute("type"),n}function ei(n,t){for(var i=0,u=n.length;u>i;i++)r.set(n[i],"globalEval",!t||r.get(t[i],"globalEval"))}function yr(n,t){var u,c,f,s,h,l,a,o;if(1===t.nodeType){if(r.hasData(n)&&(s=r.access(n),h=r.set(t,s),o=s.events)){delete h.handle;h.events={};for(f in o)for(u=0,c=o[f].length;c>u;u++)i.event.add(t,f,o[f][u])}e.hasData(n)&&(l=e.access(n),a=i.extend({},l),e.set(t,a))}}function o(n,t){var r=n.getElementsByTagName?n.getElementsByTagName(t||"*"):n.querySelectorAll?n.querySelectorAll(t||"*"):[];return void 0===t||t&&i.nodeName(n,t)?i.merge([n],r):r}function df(n,t){var i=t.nodeName.toLowerCase();"input"===i&&er.test(n.type)?t.checked=n.checked:("input"===i||"textarea"===i)&&(t.defaultValue=n.defaultValue)}function pr(t,r){var f,u=i(r.createElement(t)).appendTo(r.body),e=n.getDefaultComputedStyle&&(f=n.getDefaultComputedStyle(u[0]))?f.display:i.css(u[0],"display");return u.detach(),e}function si(n){var r=u,t=oi[n];return t||(t=pr(n,r),"none"!==t&&t||(at=(at||i("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' height='0'/>")).appendTo(r.documentElement),r=at[0].contentDocument,r.write(),r.close(),t=pr(n,r),at.detach()),oi[n]=t),t}function it(n,t,r){var e,o,s,u,f=n.style;return r=r||vt(n),r&&(u=r.getPropertyValue(t)||r[t]),r&&(""!==u||i.contains(n.ownerDocument,n)||(u=i.style(n,t)),hi.test(u)&&wr.test(t)&&(e=f.width,o=f.minWidth,s=f.maxWidth,f.minWidth=f.maxWidth=f.width=u,u=r.width,f.width=e,f.minWidth=o,f.maxWidth=s)),void 0!==u?u+"":u}function br(n,t){return{get:function(){return n()?void delete this.get:(this.get=t).apply(this,arguments)}}}function gr(n,t){if(t in n)return t;for(var r=t[0].toUpperCase()+t.slice(1),u=t,i=dr.length;i--;)if(t=dr[i]+r,t in n)return t;return u}function nu(n,t,i){var r=ne.exec(t);return r?Math.max(0,r[1]-(i||0))+(r[2]||"px"):t}function tu(n,t,r,u,f){for(var e=r===(u?"border":"content")?4:"width"===t?1:0,o=0;4>e;e+=2)"margin"===r&&(o+=i.css(n,r+p[e],!0,f)),u?("content"===r&&(o-=i.css(n,"padding"+p[e],!0,f)),"margin"!==r&&(o-=i.css(n,"border"+p[e]+"Width",!0,f))):(o+=i.css(n,"padding"+p[e],!0,f),"padding"!==r&&(o+=i.css(n,"border"+p[e]+"Width",!0,f)));return o}function iu(n,t,r){var o=!0,u="width"===t?n.offsetWidth:n.offsetHeight,e=vt(n),s="border-box"===i.css(n,"boxSizing",!1,e);if(0>=u||null==u){if(u=it(n,t,e),(0>u||null==u)&&(u=n.style[t]),hi.test(u))return u;o=s&&(f.boxSizingReliable()||u===n.style[t]);u=parseFloat(u)||0}return u+tu(n,t,r||(s?"border":"content"),o,e)+"px"}function ru(n,t){for(var e,u,s,o=[],f=0,h=n.length;h>f;f++)u=n[f],u.style&&(o[f]=r.get(u,"olddisplay"),e=u.style.display,t?(o[f]||"none"!==e||(u.style.display=""),""===u.style.display&&tt(u)&&(o[f]=r.access(u,"olddisplay",si(u.nodeName)))):(s=tt(u),"none"===e&&s||r.set(u,"olddisplay",s?e:i.css(u,"display"))));for(f=0;h>f;f++)u=n[f],u.style&&(t&&"none"!==u.style.display&&""!==u.style.display||(u.style.display=t?o[f]||"":"none"));return n}function s(n,t,i,r,u){return new s.prototype.init(n,t,i,r,u)}function fu(){return setTimeout(function(){d=void 0}),d=i.now()}function wt(n,t){var r,u=0,i={height:n};for(t=t?1:0;4>u;u+=2-t)r=p[u],i["margin"+r]=i["padding"+r]=n;return t&&(i.opacity=i.width=n),i}function eu(n,t,i){for(var u,f=(rt[t]||[]).concat(rt["*"]),r=0,e=f.length;e>r;r++)if(u=f[r].call(i,t,n))return u}function fe(n,t,u){var f,a,p,v,o,w,h,b,l=this,y={},s=n.style,c=n.nodeType&&tt(n),e=r.get(n,"fxshow");u.queue||(o=i._queueHooks(n,"fx"),null==o.unqueued&&(o.unqueued=0,w=o.empty.fire,o.empty.fire=function(){o.unqueued||w()}),o.unqueued++,l.always(function(){l.always(function(){o.unqueued--;i.queue(n,"fx").length||o.empty.fire()})}));1===n.nodeType&&("height"in t||"width"in t)&&(u.overflow=[s.overflow,s.overflowX,s.overflowY],h=i.css(n,"display"),b="none"===h?r.get(n,"olddisplay")||si(n.nodeName):h,"inline"===b&&"none"===i.css(n,"float")&&(s.display="inline-block"));u.overflow&&(s.overflow="hidden",l.always(function(){s.overflow=u.overflow[0];s.overflowX=u.overflow[1];s.overflowY=u.overflow[2]}));for(f in t)if(a=t[f],re.exec(a)){if(delete t[f],p=p||"toggle"===a,a===(c?"hide":"show")){if("show"!==a||!e||void 0===e[f])continue;c=!0}y[f]=e&&e[f]||i.style(n,f)}else h=void 0;if(i.isEmptyObject(y))"inline"===("none"===h?si(n.nodeName):h)&&(s.display=h);else{e?"hidden"in e&&(c=e.hidden):e=r.access(n,"fxshow",{});p&&(e.hidden=!c);c?i(n).show():l.done(function(){i(n).hide()});l.done(function(){var t;r.remove(n,"fxshow");for(t in y)i.style(n,t,y[t])});for(f in y)v=eu(c?e[f]:0,f,l),f in e||(e[f]=v.start,c&&(v.end=v.start,v.start="width"===f||"height"===f?1:0))}}function ee(n,t){var r,f,e,u,o;for(r in n)if(f=i.camelCase(r),e=t[f],u=n[r],i.isArray(u)&&(e=u[1],u=n[r]=u[0]),r!==f&&(n[f]=u,delete n[r]),o=i.cssHooks[f],o&&"expand"in o){u=o.expand(u);delete n[f];for(r in u)r in n||(n[r]=u[r],t[r]=e)}else t[f]=e}function ou(n,t,r){var h,e,o=0,l=pt.length,f=i.Deferred().always(function(){delete c.elem}),c=function(){if(e)return!1;for(var s=d||fu(),t=Math.max(0,u.startTime+u.duration-s),h=t/u.duration||0,i=1-h,r=0,o=u.tweens.length;o>r;r++)u.tweens[r].run(i);return f.notifyWith(n,[u,i,t]),1>i&&o?t:(f.resolveWith(n,[u]),!1)},u=f.promise({elem:n,props:i.extend({},t),opts:i.extend(!0,{specialEasing:{}},r),originalProperties:t,originalOptions:r,startTime:d||fu(),duration:r.duration,tweens:[],createTween:function(t,r){var f=i.Tween(n,u.opts,t,r,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(f),f},stop:function(t){var i=0,r=t?u.tweens.length:0;if(e)return this;for(e=!0;r>i;i++)u.tweens[i].run(1);return t?f.resolveWith(n,[u,t]):f.rejectWith(n,[u,t]),this}}),s=u.props;for(ee(s,u.opts.specialEasing);l>o;o++)if(h=pt[o].call(u,n,s,u.opts))return h;return i.map(s,eu,u),i.isFunction(u.opts.start)&&u.opts.start.call(n,u),i.fx.timer(i.extend(c,{elem:n,anim:u,queue:u.opts.queue})),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always)}function pu(n){return function(t,r){"string"!=typeof t&&(r=t,t="*");var u,f=0,e=t.toLowerCase().match(c)||[];if(i.isFunction(r))while(u=e[f++])"+"===u[0]?(u=u.slice(1)||"*",(n[u]=n[u]||[]).unshift(r)):(n[u]=n[u]||[]).push(r)}}function wu(n,t,r,u){function e(s){var h;return f[s]=!0,i.each(n[s]||[],function(n,i){var s=i(t,r,u);return"string"!=typeof s||o||f[s]?o?!(h=s):void 0:(t.dataTypes.unshift(s),e(s),!1)}),h}var f={},o=n===ci;return e(t.dataTypes[0])||!f["*"]&&e("*")}function ai(n,t){var r,u,f=i.ajaxSettings.flatOptions||{};for(r in t)void 0!==t[r]&&((f[r]?n:u||(u={}))[r]=t[r]);return u&&i.extend(!0,n,u),n}function ae(n,t,i){for(var e,u,f,o,s=n.contents,r=n.dataTypes;"*"===r[0];)r.shift(),void 0===e&&(e=n.mimeType||t.getResponseHeader("Content-Type"));if(e)for(u in s)if(s[u]&&s[u].test(e)){r.unshift(u);break}if(r[0]in i)f=r[0];else{for(u in i){if(!r[0]||n.converters[u+" "+r[0]]){f=u;break}o||(o=u)}f=f||o}if(f)return(f!==r[0]&&r.unshift(f),i[f])}function ve(n,t,i,r){var h,u,f,s,e,o={},c=n.dataTypes.slice();if(c[1])for(f in n.converters)o[f.toLowerCase()]=n.converters[f];for(u=c.shift();u;)if(n.responseFields[u]&&(i[n.responseFields[u]]=t),!e&&r&&n.dataFilter&&(t=n.dataFilter(t,n.dataType)),e=u,u=c.shift())if("*"===u)u=e;else if("*"!==e&&e!==u){if(f=o[e+" "+u]||o["* "+u],!f)for(h in o)if(s=h.split(" "),s[1]===u&&(f=o[e+" "+s[0]]||o["* "+s[0]])){f===!0?f=o[h]:o[h]!==!0&&(u=s[0],c.unshift(s[1]));break}if(f!==!0)if(f&&n.throws)t=f(t);else try{t=f(t)}catch(l){return{state:"parsererror",error:f?l:"No conversion from "+e+" to "+u}}}return{state:"success",data:t}}function vi(n,t,r,u){var f;if(i.isArray(t))i.each(t,function(t,i){r||pe.test(n)?u(n,i):vi(n+"["+("object"==typeof i?t:"")+"]",i,r,u)});else if(r||"object"!==i.type(t))u(n,t);else for(f in t)vi(n+"["+f+"]",t[f],r,u)}function ku(n){return i.isWindow(n)?n:9===n.nodeType&&n.defaultView}var w=[],a=w.slice,bi=w.concat,ti=w.push,ft=w.indexOf,et={},nf=et.toString,ii=et.hasOwnProperty,f={},u=n.document,ki="2.1.3",i=function(n,t){return new i.fn.init(n,t)},tf=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,rf=/^-ms-/,uf=/-([\da-z])/gi,ff=function(n,t){return t.toUpperCase()},y,ot,nr,tr,ir,rr,c,fi,st,l,b,at,oi,oe,su,g,hu,bt,cu,kt,dt,yi,ni,pi,wi,du,gu;i.fn=i.prototype={jquery:ki,constructor:i,selector:"",length:0,toArray:function(){return a.call(this)},get:function(n){return null!=n?0>n?this[n+this.length]:this[n]:a.call(this)},pushStack:function(n){var t=i.merge(this.constructor(),n);return t.prevObject=this,t.context=this.context,t},each:function(n,t){return i.each(this,n,t)},map:function(n){return this.pushStack(i.map(this,function(t,i){return n.call(t,i,t)}))},slice:function(){return this.pushStack(a.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(n){var i=this.length,t=+n+(0>n?i:0);return this.pushStack(t>=0&&i>t?[this[t]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:ti,sort:w.sort,splice:w.splice};i.extend=i.fn.extend=function(){var e,f,r,t,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||i.isFunction(n)||(n={}),u===c&&(n=this,u--);c>u;u++)if(null!=(e=arguments[u]))for(f in e)r=n[f],t=e[f],n!==t&&(h&&t&&(i.isPlainObject(t)||(o=i.isArray(t)))?(o?(o=!1,s=r&&i.isArray(r)?r:[]):s=r&&i.isPlainObject(r)?r:{},n[f]=i.extend(h,s,t)):void 0!==t&&(n[f]=t));return n};i.extend({expando:"jQuery"+(ki+Math.random()).replace(/\D/g,""),isReady:!0,error:function(n){throw new Error(n);},noop:function(){},isFunction:function(n){return"function"===i.type(n)},isArray:Array.isArray,isWindow:function(n){return null!=n&&n===n.window},isNumeric:function(n){return!i.isArray(n)&&n-parseFloat(n)+1>=0},isPlainObject:function(n){return"object"!==i.type(n)||n.nodeType||i.isWindow(n)?!1:n.constructor&&!ii.call(n.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(n){var t;for(t in n)return!1;return!0},type:function(n){return null==n?n+"":"object"==typeof n||"function"==typeof n?et[nf.call(n)]||"object":typeof n},globalEval:function(n){var t,r=eval;n=i.trim(n);n&&(1===n.indexOf("use strict")?(t=u.createElement("script"),t.text=n,u.head.appendChild(t).parentNode.removeChild(t)):r(n))},camelCase:function(n){return n.replace(rf,"ms-").replace(uf,ff)},nodeName:function(n,t){return n.nodeName&&n.nodeName.toLowerCase()===t.toLowerCase()},each:function(n,t,i){var u,r=0,f=n.length,e=ri(n);if(i){if(e){for(;f>r;r++)if(u=t.apply(n[r],i),u===!1)break}else for(r in n)if(u=t.apply(n[r],i),u===!1)break}else if(e){for(;f>r;r++)if(u=t.call(n[r],r,n[r]),u===!1)break}else for(r in n)if(u=t.call(n[r],r,n[r]),u===!1)break;return n},trim:function(n){return null==n?"":(n+"").replace(tf,"")},makeArray:function(n,t){var r=t||[];return null!=n&&(ri(Object(n))?i.merge(r,"string"==typeof n?[n]:n):ti.call(r,n)),r},inArray:function(n,t,i){return null==t?-1:ft.call(t,n,i)},merge:function(n,t){for(var u=+t.length,i=0,r=n.length;u>i;i++)n[r++]=t[i];return n.length=r,n},grep:function(n,t,i){for(var u,f=[],r=0,e=n.length,o=!i;e>r;r++)u=!t(n[r],r),u!==o&&f.push(n[r]);return f},map:function(n,t,i){var u,r=0,e=n.length,o=ri(n),f=[];if(o)for(;e>r;r++)u=t(n[r],r,i),null!=u&&f.push(u);else for(r in n)u=t(n[r],r,i),null!=u&&f.push(u);return bi.apply([],f)},guid:1,proxy:function(n,t){var u,f,r;return"string"==typeof t&&(u=n[t],t=n,n=u),i.isFunction(n)?(f=a.call(arguments,2),r=function(){return n.apply(t||this,f.concat(a.call(arguments)))},r.guid=n.guid=n.guid||i.guid++,r):void 0},now:Date.now,support:f});i.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(n,t){et["[object "+t+"]"]=t.toLowerCase()});y=function(n){function r(n,t,i,r){var p,s,a,c,w,y,d,v,nt,g;if((t?t.ownerDocument||t:h)!==o&&k(t),t=t||o,i=i||[],c=t.nodeType,"string"!=typeof n||!n||1!==c&&9!==c&&11!==c)return i;if(!r&&l){if(11!==c&&(p=hr.exec(n)))if(a=p[1]){if(9===c){if(s=t.getElementById(a),!s||!s.parentNode)return i;if(s.id===a)return i.push(s),i}else if(t.ownerDocument&&(s=t.ownerDocument.getElementById(a))&&et(t,s)&&s.id===a)return i.push(s),i}else{if(p[2])return b.apply(i,t.getElementsByTagName(n)),i;if((a=p[3])&&u.getElementsByClassName)return b.apply(i,t.getElementsByClassName(a)),i}if(u.qsa&&(!e||!e.test(n))){if(v=d=f,nt=t,g=1!==c&&n,1===c&&"object"!==t.nodeName.toLowerCase()){for(y=ft(n),(d=t.getAttribute("id"))?v=d.replace(cr,"\\$&"):t.setAttribute("id",v),v="[id='"+v+"'] ",w=y.length;w--;)y[w]=v+vt(y[w]);nt=dt.test(n)&&ti(t.parentNode)||t;g=y.join(",")}if(g)try{return b.apply(i,nt.querySelectorAll(g)),i}catch(tt){}finally{d||t.removeAttribute("id")}}}return oi(n.replace(lt,"$1"),t,i,r)}function gt(){function n(r,u){return i.push(r+" ")>t.cacheLength&&delete n[i.shift()],n[r+" "]=u}var i=[];return n}function c(n){return n[f]=!0,n}function v(n){var t=o.createElement("div");try{return!!n(t)}catch(i){return!1}finally{t.parentNode&&t.parentNode.removeChild(t);t=null}}function ni(n,i){for(var u=n.split("|"),r=n.length;r--;)t.attrHandle[u[r]]=i}function wi(n,t){var i=t&&n,r=i&&1===n.nodeType&&1===t.nodeType&&(~t.sourceIndex||li)-(~n.sourceIndex||li);if(r)return r;if(i)while(i=i.nextSibling)if(i===t)return-1;return n?1:-1}function lr(n){return function(t){var i=t.nodeName.toLowerCase();return"input"===i&&t.type===n}}function ar(n){return function(t){var i=t.nodeName.toLowerCase();return("input"===i||"button"===i)&&t.type===n}}function tt(n){return c(function(t){return t=+t,c(function(i,r){for(var u,f=n([],i.length,t),e=f.length;e--;)i[u=f[e]]&&(i[u]=!(r[u]=i[u]))})})}function ti(n){return n&&"undefined"!=typeof n.getElementsByTagName&&n}function bi(){}function vt(n){for(var t=0,r=n.length,i="";r>t;t++)i+=n[t].value;return i}function ii(n,t,i){var r=t.dir,u=i&&"parentNode"===r,e=ki++;return t.first?function(t,i,f){while(t=t[r])if(1===t.nodeType||u)return n(t,i,f)}:function(t,i,o){var s,h,c=[a,e];if(o){while(t=t[r])if((1===t.nodeType||u)&&n(t,i,o))return!0}else while(t=t[r])if(1===t.nodeType||u){if(h=t[f]||(t[f]={}),(s=h[r])&&s[0]===a&&s[1]===e)return c[2]=s[2];if(h[r]=c,c[2]=n(t,i,o))return!0}}}function ri(n){return n.length>1?function(t,i,r){for(var u=n.length;u--;)if(!n[u](t,i,r))return!1;return!0}:n[0]}function vr(n,t,i){for(var u=0,f=t.length;f>u;u++)r(n,t[u],i);return i}function yt(n,t,i,r,u){for(var e,o=[],f=0,s=n.length,h=null!=t;s>f;f++)(e=n[f])&&(!i||i(e,r,u))&&(o.push(e),h&&t.push(f));return o}function ui(n,t,i,r,u,e){return r&&!r[f]&&(r=ui(r)),u&&!u[f]&&(u=ui(u,e)),c(function(f,e,o,s){var l,c,a,p=[],y=[],w=e.length,k=f||vr(t||"*",o.nodeType?[o]:o,[]),v=!n||!f&&t?k:yt(k,p,n,o,s),h=i?u||(f?n:w||r)?[]:e:v;if(i&&i(v,h,o,s),r)for(l=yt(h,y),r(l,[],o,s),c=l.length;c--;)(a=l[c])&&(h[y[c]]=!(v[y[c]]=a));if(f){if(u||n){if(u){for(l=[],c=h.length;c--;)(a=h[c])&&l.push(v[c]=a);u(null,h=[],l,s)}for(c=h.length;c--;)(a=h[c])&&(l=u?nt(f,a):p[c])>-1&&(f[l]=!(e[l]=a))}}else h=yt(h===e?h.splice(w,h.length):h),u?u(null,e,h,s):b.apply(e,h)})}function fi(n){for(var o,u,r,s=n.length,h=t.relative[n[0].type],c=h||t.relative[" "],i=h?1:0,l=ii(function(n){return n===o},c,!0),a=ii(function(n){return nt(o,n)>-1},c,!0),e=[function(n,t,i){var r=!h&&(i||t!==ht)||((o=t).nodeType?l(n,t,i):a(n,t,i));return o=null,r}];s>i;i++)if(u=t.relative[n[i].type])e=[ii(ri(e),u)];else{if(u=t.filter[n[i].type].apply(null,n[i].matches),u[f]){for(r=++i;s>r;r++)if(t.relative[n[r].type])break;return ui(i>1&&ri(e),i>1&&vt(n.slice(0,i-1).concat({value:" "===n[i-2].type?"*":""})).replace(lt,"$1"),u,r>i&&fi(n.slice(i,r)),s>r&&fi(n=n.slice(r)),s>r&&vt(n))}e.push(u)}return ri(e)}function yr(n,i){var u=i.length>0,f=n.length>0,e=function(e,s,h,c,l){var y,d,w,k=0,v="0",g=e&&[],p=[],nt=ht,tt=e||f&&t.find.TAG("*",l),it=a+=null==nt?1:Math.random()||.1,rt=tt.length;for(l&&(ht=s!==o&&s);v!==rt&&null!=(y=tt[v]);v++){if(f&&y){for(d=0;w=n[d++];)if(w(y,s,h)){c.push(y);break}l&&(a=it)}u&&((y=!w&&y)&&k--,e&&g.push(y))}if(k+=v,u&&v!==k){for(d=0;w=i[d++];)w(g,p,s,h);if(e){if(k>0)while(v--)g[v]||p[v]||(p[v]=gi.call(c));p=yt(p)}b.apply(c,p);l&&!e&&p.length>0&&k+i.length>1&&r.uniqueSort(c)}return l&&(a=it,ht=nt),g};return u?c(e):e}var it,u,t,st,ei,ft,pt,oi,ht,w,rt,k,o,s,l,e,d,ct,et,f="sizzle"+1*new Date,h=n.document,a=0,ki=0,si=gt(),hi=gt(),ci=gt(),wt=function(n,t){return n===t&&(rt=!0),0},li=-2147483648,di={}.hasOwnProperty,g=[],gi=g.pop,nr=g.push,b=g.push,ai=g.slice,nt=function(n,t){for(var i=0,r=n.length;r>i;i++)if(n[i]===t)return i;return-1},bt="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",i="[\\x20\\t\\r\\n\\f]",ut="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",vi=ut.replace("w","w#"),yi="\\["+i+"*("+ut+")(?:"+i+"*([*^$|!~]?=)"+i+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+vi+"))|)"+i+"*\\]",kt=":("+ut+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+yi+")*)|.*)\\)|)",tr=new RegExp(i+"+","g"),lt=new RegExp("^"+i+"+|((?:^|[^\\\\])(?:\\\\.)*)"+i+"+$","g"),ir=new RegExp("^"+i+"*,"+i+"*"),rr=new RegExp("^"+i+"*([>+~]|"+i+")"+i+"*"),ur=new RegExp("="+i+"*([^\\]'\"]*?)"+i+"*\\]","g"),fr=new RegExp(kt),er=new RegExp("^"+vi+"$"),at={ID:new RegExp("^#("+ut+")"),CLASS:new RegExp("^\\.("+ut+")"),TAG:new RegExp("^("+ut.replace("w","w*")+")"),ATTR:new RegExp("^"+yi),PSEUDO:new RegExp("^"+kt),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+i+"*(even|odd|(([+-]|)(\\d*)n|)"+i+"*(?:([+-]|)"+i+"*(\\d+)|))"+i+"*\\)|)","i"),bool:new RegExp("^(?:"+bt+")$","i"),needsContext:new RegExp("^"+i+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+i+"*((?:-\\d)?\\d*)"+i+"*\\)|)(?=[^-]|$)","i")},or=/^(?:input|select|textarea|button)$/i,sr=/^h\d$/i,ot=/^[^{]+\{\s*\[native \w/,hr=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,dt=/[+~]/,cr=/'|\\/g,y=new RegExp("\\\\([\\da-f]{1,6}"+i+"?|("+i+")|.)","ig"),p=function(n,t,i){var r="0x"+t-65536;return r!==r||i?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},pi=function(){k()};try{b.apply(g=ai.call(h.childNodes),h.childNodes);g[h.childNodes.length].nodeType}catch(pr){b={apply:g.length?function(n,t){nr.apply(n,ai.call(t))}:function(n,t){for(var i=n.length,r=0;n[i++]=t[r++];);n.length=i-1}}}u=r.support={};ei=r.isXML=function(n){var t=n&&(n.ownerDocument||n).documentElement;return t?"HTML"!==t.nodeName:!1};k=r.setDocument=function(n){var a,c,r=n?n.ownerDocument||n:h;return r!==o&&9===r.nodeType&&r.documentElement?(o=r,s=r.documentElement,c=r.defaultView,c&&c!==c.top&&(c.addEventListener?c.addEventListener("unload",pi,!1):c.attachEvent&&c.attachEvent("onunload",pi)),l=!ei(r),u.attributes=v(function(n){return n.className="i",!n.getAttribute("className")}),u.getElementsByTagName=v(function(n){return n.appendChild(r.createComment("")),!n.getElementsByTagName("*").length}),u.getElementsByClassName=ot.test(r.getElementsByClassName),u.getById=v(function(n){return s.appendChild(n).id=f,!r.getElementsByName||!r.getElementsByName(f).length}),u.getById?(t.find.ID=function(n,t){if("undefined"!=typeof t.getElementById&&l){var i=t.getElementById(n);return i&&i.parentNode?[i]:[]}},t.filter.ID=function(n){var t=n.replace(y,p);return function(n){return n.getAttribute("id")===t}}):(delete t.find.ID,t.filter.ID=function(n){var t=n.replace(y,p);return function(n){var i="undefined"!=typeof n.getAttributeNode&&n.getAttributeNode("id");return i&&i.value===t}}),t.find.TAG=u.getElementsByTagName?function(n,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(n):u.qsa?t.querySelectorAll(n):void 0}:function(n,t){var i,r=[],f=0,u=t.getElementsByTagName(n);if("*"===n){while(i=u[f++])1===i.nodeType&&r.push(i);return r}return u},t.find.CLASS=u.getElementsByClassName&&function(n,t){if(l)return t.getElementsByClassName(n)},d=[],e=[],(u.qsa=ot.test(r.querySelectorAll))&&(v(function(n){s.appendChild(n).innerHTML="<a id='"+f+"'><\/a><select id='"+f+"-\f]' msallowcapture=''><option selected=''><\/option><\/select>";n.querySelectorAll("[msallowcapture^='']").length&&e.push("[*^$]="+i+"*(?:''|\"\")");n.querySelectorAll("[selected]").length||e.push("\\["+i+"*(?:value|"+bt+")");n.querySelectorAll("[id~="+f+"-]").length||e.push("~=");n.querySelectorAll(":checked").length||e.push(":checked");n.querySelectorAll("a#"+f+"+*").length||e.push(".#.+[+~]")}),v(function(n){var t=r.createElement("input");t.setAttribute("type","hidden");n.appendChild(t).setAttribute("name","D");n.querySelectorAll("[name=d]").length&&e.push("name"+i+"*[*^$|!~]?=");n.querySelectorAll(":enabled").length||e.push(":enabled",":disabled");n.querySelectorAll("*,:x");e.push(",.*:")})),(u.matchesSelector=ot.test(ct=s.matches||s.webkitMatchesSelector||s.mozMatchesSelector||s.oMatchesSelector||s.msMatchesSelector))&&v(function(n){u.disconnectedMatch=ct.call(n,"div");ct.call(n,"[s!='']:x");d.push("!=",kt)}),e=e.length&&new RegExp(e.join("|")),d=d.length&&new RegExp(d.join("|")),a=ot.test(s.compareDocumentPosition),et=a||ot.test(s.contains)?function(n,t){var r=9===n.nodeType?n.documentElement:n,i=t&&t.parentNode;return n===i||!(!i||1!==i.nodeType||!(r.contains?r.contains(i):n.compareDocumentPosition&&16&n.compareDocumentPosition(i)))}:function(n,t){if(t)while(t=t.parentNode)if(t===n)return!0;return!1},wt=a?function(n,t){if(n===t)return rt=!0,0;var i=!n.compareDocumentPosition-!t.compareDocumentPosition;return i?i:(i=(n.ownerDocument||n)===(t.ownerDocument||t)?n.compareDocumentPosition(t):1,1&i||!u.sortDetached&&t.compareDocumentPosition(n)===i?n===r||n.ownerDocument===h&&et(h,n)?-1:t===r||t.ownerDocument===h&&et(h,t)?1:w?nt(w,n)-nt(w,t):0:4&i?-1:1)}:function(n,t){if(n===t)return rt=!0,0;var i,u=0,o=n.parentNode,s=t.parentNode,f=[n],e=[t];if(!o||!s)return n===r?-1:t===r?1:o?-1:s?1:w?nt(w,n)-nt(w,t):0;if(o===s)return wi(n,t);for(i=n;i=i.parentNode;)f.unshift(i);for(i=t;i=i.parentNode;)e.unshift(i);while(f[u]===e[u])u++;return u?wi(f[u],e[u]):f[u]===h?-1:e[u]===h?1:0},r):o};r.matches=function(n,t){return r(n,null,null,t)};r.matchesSelector=function(n,t){if((n.ownerDocument||n)!==o&&k(n),t=t.replace(ur,"='$1']"),!(!u.matchesSelector||!l||d&&d.test(t)||e&&e.test(t)))try{var i=ct.call(n,t);if(i||u.disconnectedMatch||n.document&&11!==n.document.nodeType)return i}catch(f){}return r(t,o,null,[n]).length>0};r.contains=function(n,t){return(n.ownerDocument||n)!==o&&k(n),et(n,t)};r.attr=function(n,i){(n.ownerDocument||n)!==o&&k(n);var f=t.attrHandle[i.toLowerCase()],r=f&&di.call(t.attrHandle,i.toLowerCase())?f(n,i,!l):void 0;return void 0!==r?r:u.attributes||!l?n.getAttribute(i):(r=n.getAttributeNode(i))&&r.specified?r.value:null};r.error=function(n){throw new Error("Syntax error, unrecognized expression: "+n);};r.uniqueSort=function(n){var r,f=[],t=0,i=0;if(rt=!u.detectDuplicates,w=!u.sortStable&&n.slice(0),n.sort(wt),rt){while(r=n[i++])r===n[i]&&(t=f.push(i));while(t--)n.splice(f[t],1)}return w=null,n};st=r.getText=function(n){var r,i="",u=0,t=n.nodeType;if(t){if(1===t||9===t||11===t){if("string"==typeof n.textContent)return n.textContent;for(n=n.firstChild;n;n=n.nextSibling)i+=st(n)}else if(3===t||4===t)return n.nodeValue}else while(r=n[u++])i+=st(r);return i};t=r.selectors={cacheLength:50,createPseudo:c,match:at,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(n){return n[1]=n[1].replace(y,p),n[3]=(n[3]||n[4]||n[5]||"").replace(y,p),"~="===n[2]&&(n[3]=" "+n[3]+" "),n.slice(0,4)},CHILD:function(n){return n[1]=n[1].toLowerCase(),"nth"===n[1].slice(0,3)?(n[3]||r.error(n[0]),n[4]=+(n[4]?n[5]+(n[6]||1):2*("even"===n[3]||"odd"===n[3])),n[5]=+(n[7]+n[8]||"odd"===n[3])):n[3]&&r.error(n[0]),n},PSEUDO:function(n){var i,t=!n[6]&&n[2];return at.CHILD.test(n[0])?null:(n[3]?n[2]=n[4]||n[5]||"":t&&fr.test(t)&&(i=ft(t,!0))&&(i=t.indexOf(")",t.length-i)-t.length)&&(n[0]=n[0].slice(0,i),n[2]=t.slice(0,i)),n.slice(0,3))}},filter:{TAG:function(n){var t=n.replace(y,p).toLowerCase();return"*"===n?function(){return!0}:function(n){return n.nodeName&&n.nodeName.toLowerCase()===t}},CLASS:function(n){var t=si[n+" "];return t||(t=new RegExp("(^|"+i+")"+n+"("+i+"|$)"))&&si(n,function(n){return t.test("string"==typeof n.className&&n.className||"undefined"!=typeof n.getAttribute&&n.getAttribute("class")||"")})},ATTR:function(n,t,i){return function(u){var f=r.attr(u,n);return null==f?"!="===t:t?(f+="","="===t?f===i:"!="===t?f!==i:"^="===t?i&&0===f.indexOf(i):"*="===t?i&&f.indexOf(i)>-1:"$="===t?i&&f.slice(-i.length)===i:"~="===t?(" "+f.replace(tr," ")+" ").indexOf(i)>-1:"|="===t?f===i||f.slice(0,i.length+1)===i+"-":!1):!0}},CHILD:function(n,t,i,r,u){var s="nth"!==n.slice(0,3),o="last"!==n.slice(-4),e="of-type"===t;return 1===r&&0===u?function(n){return!!n.parentNode}:function(t,i,h){var v,k,c,l,y,w,b=s!==o?"nextSibling":"previousSibling",p=t.parentNode,g=e&&t.nodeName.toLowerCase(),d=!h&&!e;if(p){if(s){while(b){for(c=t;c=c[b];)if(e?c.nodeName.toLowerCase()===g:1===c.nodeType)return!1;w=b="only"===n&&!w&&"nextSibling"}return!0}if(w=[o?p.firstChild:p.lastChild],o&&d){for(k=p[f]||(p[f]={}),v=k[n]||[],y=v[0]===a&&v[1],l=v[0]===a&&v[2],c=y&&p.childNodes[y];c=++y&&c&&c[b]||(l=y=0)||w.pop();)if(1===c.nodeType&&++l&&c===t){k[n]=[a,y,l];break}}else if(d&&(v=(t[f]||(t[f]={}))[n])&&v[0]===a)l=v[1];else while(c=++y&&c&&c[b]||(l=y=0)||w.pop())if((e?c.nodeName.toLowerCase()===g:1===c.nodeType)&&++l&&(d&&((c[f]||(c[f]={}))[n]=[a,l]),c===t))break;return l-=u,l===r||l%r==0&&l/r>=0}}},PSEUDO:function(n,i){var e,u=t.pseudos[n]||t.setFilters[n.toLowerCase()]||r.error("unsupported pseudo: "+n);return u[f]?u(i):u.length>1?(e=[n,n,"",i],t.setFilters.hasOwnProperty(n.toLowerCase())?c(function(n,t){for(var r,f=u(n,i),e=f.length;e--;)r=nt(n,f[e]),n[r]=!(t[r]=f[e])}):function(n){return u(n,0,e)}):u}},pseudos:{not:c(function(n){var t=[],r=[],i=pt(n.replace(lt,"$1"));return i[f]?c(function(n,t,r,u){for(var e,o=i(n,null,u,[]),f=n.length;f--;)(e=o[f])&&(n[f]=!(t[f]=e))}):function(n,u,f){return t[0]=n,i(t,null,f,r),t[0]=null,!r.pop()}}),has:c(function(n){return function(t){return r(n,t).length>0}}),contains:c(function(n){return n=n.replace(y,p),function(t){return(t.textContent||t.innerText||st(t)).indexOf(n)>-1}}),lang:c(function(n){return er.test(n||"")||r.error("unsupported lang: "+n),n=n.replace(y,p).toLowerCase(),function(t){var i;do if(i=l?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return i=i.toLowerCase(),i===n||0===i.indexOf(n+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var i=n.location&&n.location.hash;return i&&i.slice(1)===t.id},root:function(n){return n===s},focus:function(n){return n===o.activeElement&&(!o.hasFocus||o.hasFocus())&&!!(n.type||n.href||~n.tabIndex)},enabled:function(n){return n.disabled===!1},disabled:function(n){return n.disabled===!0},checked:function(n){var t=n.nodeName.toLowerCase();return"input"===t&&!!n.checked||"option"===t&&!!n.selected},selected:function(n){return n.parentNode&&n.parentNode.selectedIndex,n.selected===!0},empty:function(n){for(n=n.firstChild;n;n=n.nextSibling)if(n.nodeType<6)return!1;return!0},parent:function(n){return!t.pseudos.empty(n)},header:function(n){return sr.test(n.nodeName)},input:function(n){return or.test(n.nodeName)},button:function(n){var t=n.nodeName.toLowerCase();return"input"===t&&"button"===n.type||"button"===t},text:function(n){var t;return"input"===n.nodeName.toLowerCase()&&"text"===n.type&&(null==(t=n.getAttribute("type"))||"text"===t.toLowerCase())},first:tt(function(){return[0]}),last:tt(function(n,t){return[t-1]}),eq:tt(function(n,t,i){return[0>i?i+t:i]}),even:tt(function(n,t){for(var i=0;t>i;i+=2)n.push(i);return n}),odd:tt(function(n,t){for(var i=1;t>i;i+=2)n.push(i);return n}),lt:tt(function(n,t,i){for(var r=0>i?i+t:i;--r>=0;)n.push(r);return n}),gt:tt(function(n,t,i){for(var r=0>i?i+t:i;++r<t;)n.push(r);return n})}};t.pseudos.nth=t.pseudos.eq;for(it in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})t.pseudos[it]=lr(it);for(it in{submit:!0,reset:!0})t.pseudos[it]=ar(it);return bi.prototype=t.filters=t.pseudos,t.setFilters=new bi,ft=r.tokenize=function(n,i){var e,f,s,o,u,h,c,l=hi[n+" "];if(l)return i?0:l.slice(0);for(u=n,h=[],c=t.preFilter;u;){(!e||(f=ir.exec(u)))&&(f&&(u=u.slice(f[0].length)||u),h.push(s=[]));e=!1;(f=rr.exec(u))&&(e=f.shift(),s.push({value:e,type:f[0].replace(lt," ")}),u=u.slice(e.length));for(o in t.filter)(f=at[o].exec(u))&&(!c[o]||(f=c[o](f)))&&(e=f.shift(),s.push({value:e,type:o,matches:f}),u=u.slice(e.length));if(!e)break}return i?u.length:u?r.error(n):hi(n,h).slice(0)},pt=r.compile=function(n,t){var r,u=[],e=[],i=ci[n+" "];if(!i){for(t||(t=ft(n)),r=t.length;r--;)i=fi(t[r]),i[f]?u.push(i):e.push(i);i=ci(n,yr(e,u));i.selector=n}return i},oi=r.select=function(n,i,r,f){var s,e,o,a,v,c="function"==typeof n&&n,h=!f&&ft(n=c.selector||n);if(r=r||[],1===h.length){if(e=h[0]=h[0].slice(0),e.length>2&&"ID"===(o=e[0]).type&&u.getById&&9===i.nodeType&&l&&t.relative[e[1].type]){if(i=(t.find.ID(o.matches[0].replace(y,p),i)||[])[0],!i)return r;c&&(i=i.parentNode);n=n.slice(e.shift().value.length)}for(s=at.needsContext.test(n)?0:e.length;s--;){if(o=e[s],t.relative[a=o.type])break;if((v=t.find[a])&&(f=v(o.matches[0].replace(y,p),dt.test(e[0].type)&&ti(i.parentNode)||i))){if(e.splice(s,1),n=f.length&&vt(e),!n)return b.apply(r,f),r;break}}}return(c||pt(n,h))(f,i,!l,r,dt.test(n)&&ti(i.parentNode)||i),r},u.sortStable=f.split("").sort(wt).join("")===f,u.detectDuplicates=!!rt,k(),u.sortDetached=v(function(n){return 1&n.compareDocumentPosition(o.createElement("div"))}),v(function(n){return n.innerHTML="<a href='#'><\/a>","#"===n.firstChild.getAttribute("href")})||ni("type|href|height|width",function(n,t,i){if(!i)return n.getAttribute(t,"type"===t.toLowerCase()?1:2)}),u.attributes&&v(function(n){return n.innerHTML="<input/>",n.firstChild.setAttribute("value",""),""===n.firstChild.getAttribute("value")})||ni("value",function(n,t,i){if(!i&&"input"===n.nodeName.toLowerCase())return n.defaultValue}),v(function(n){return null==n.getAttribute("disabled")})||ni(bt,function(n,t,i){var r;if(!i)return n[t]===!0?t.toLowerCase():(r=n.getAttributeNode(t))&&r.specified?r.value:null}),r}(n);i.find=y;i.expr=y.selectors;i.expr[":"]=i.expr.pseudos;i.unique=y.uniqueSort;i.text=y.getText;i.isXMLDoc=y.isXML;i.contains=y.contains;var di=i.expr.match.needsContext,gi=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,ef=/^.[^:#\[\.,]*$/;i.filter=function(n,t,r){var u=t[0];return r&&(n=":not("+n+")"),1===t.length&&1===u.nodeType?i.find.matchesSelector(u,n)?[u]:[]:i.find.matches(n,i.grep(t,function(n){return 1===n.nodeType}))};i.fn.extend({find:function(n){var t,u=this.length,r=[],f=this;if("string"!=typeof n)return this.pushStack(i(n).filter(function(){for(t=0;u>t;t++)if(i.contains(f[t],this))return!0}));for(t=0;u>t;t++)i.find(n,f[t],r);return r=this.pushStack(u>1?i.unique(r):r),r.selector=this.selector?this.selector+" "+n:n,r},filter:function(n){return this.pushStack(ui(this,n||[],!1))},not:function(n){return this.pushStack(ui(this,n||[],!0))},is:function(n){return!!ui(this,"string"==typeof n&&di.test(n)?i(n):n||[],!1).length}});nr=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/;tr=i.fn.init=function(n,t){var r,f;if(!n)return this;if("string"==typeof n){if(r="<"===n[0]&&">"===n[n.length-1]&&n.length>=3?[null,n,null]:nr.exec(n),!r||!r[1]&&t)return!t||t.jquery?(t||ot).find(n):this.constructor(t).find(n);if(r[1]){if(t=t instanceof i?t[0]:t,i.merge(this,i.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:u,!0)),gi.test(r[1])&&i.isPlainObject(t))for(r in t)i.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return f=u.getElementById(r[2]),f&&f.parentNode&&(this.length=1,this[0]=f),this.context=u,this.selector=n,this}return n.nodeType?(this.context=this[0]=n,this.length=1,this):i.isFunction(n)?"undefined"!=typeof ot.ready?ot.ready(n):n(i):(void 0!==n.selector&&(this.selector=n.selector,this.context=n.context),i.makeArray(n,this))};tr.prototype=i.fn;ot=i(u);ir=/^(?:parents|prev(?:Until|All))/;rr={children:!0,contents:!0,next:!0,prev:!0};i.extend({dir:function(n,t,r){for(var u=[],f=void 0!==r;(n=n[t])&&9!==n.nodeType;)if(1===n.nodeType){if(f&&i(n).is(r))break;u.push(n)}return u},sibling:function(n,t){for(var i=[];n;n=n.nextSibling)1===n.nodeType&&n!==t&&i.push(n);return i}});i.fn.extend({has:function(n){var t=i(n,this),r=t.length;return this.filter(function(){for(var n=0;r>n;n++)if(i.contains(this,t[n]))return!0})},closest:function(n,t){for(var r,f=0,o=this.length,u=[],e=di.test(n)||"string"!=typeof n?i(n,t||this.context):0;o>f;f++)for(r=this[f];r&&r!==t;r=r.parentNode)if(r.nodeType<11&&(e?e.index(r)>-1:1===r.nodeType&&i.find.matchesSelector(r,n))){u.push(r);break}return this.pushStack(u.length>1?i.unique(u):u)},index:function(n){return n?"string"==typeof n?ft.call(i(n),this[0]):ft.call(this,n.jquery?n[0]:n):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(n,t){return this.pushStack(i.unique(i.merge(this.get(),i(n,t))))},addBack:function(n){return this.add(null==n?this.prevObject:this.prevObject.filter(n))}});i.each({parent:function(n){var t=n.parentNode;return t&&11!==t.nodeType?t:null},parents:function(n){return i.dir(n,"parentNode")},parentsUntil:function(n,t,r){return i.dir(n,"parentNode",r)},next:function(n){return ur(n,"nextSibling")},prev:function(n){return ur(n,"previousSibling")},nextAll:function(n){return i.dir(n,"nextSibling")},prevAll:function(n){return i.dir(n,"previousSibling")},nextUntil:function(n,t,r){return i.dir(n,"nextSibling",r)},prevUntil:function(n,t,r){return i.dir(n,"previousSibling",r)},siblings:function(n){return i.sibling((n.parentNode||{}).firstChild,n)},children:function(n){return i.sibling(n.firstChild)},contents:function(n){return n.contentDocument||i.merge([],n.childNodes)}},function(n,t){i.fn[n]=function(r,u){var f=i.map(this,t,r);return"Until"!==n.slice(-5)&&(u=r),u&&"string"==typeof u&&(f=i.filter(u,f)),this.length>1&&(rr[n]||i.unique(f),ir.test(n)&&f.reverse()),this.pushStack(f)}});c=/\S+/g;fi={};i.Callbacks=function(n){n="string"==typeof n?fi[n]||of(n):i.extend({},n);var u,h,o,c,f,e,t=[],r=!n.once&&[],l=function(i){for(u=n.memory&&i,h=!0,e=c||0,c=0,f=t.length,o=!0;t&&f>e;e++)if(t[e].apply(i[0],i[1])===!1&&n.stopOnFalse){u=!1;break}o=!1;t&&(r?r.length&&l(r.shift()):u?t=[]:s.disable())},s={add:function(){if(t){var r=t.length;!function e(r){i.each(r,function(r,u){var f=i.type(u);"function"===f?n.unique&&s.has(u)||t.push(u):u&&u.length&&"string"!==f&&e(u)})}(arguments);o?f=t.length:u&&(c=r,l(u))}return this},remove:function(){return t&&i.each(arguments,function(n,r){for(var u;(u=i.inArray(r,t,u))>-1;)t.splice(u,1),o&&(f>=u&&f--,e>=u&&e--)}),this},has:function(n){return n?i.inArray(n,t)>-1:!(!t||!t.length)},empty:function(){return t=[],f=0,this},disable:function(){return t=r=u=void 0,this},disabled:function(){return!t},lock:function(){return r=void 0,u||s.disable(),this},locked:function(){return!r},fireWith:function(n,i){return!t||h&&!r||(i=i||[],i=[n,i.slice?i.slice():i],o?r.push(i):l(i)),this},fire:function(){return s.fireWith(this,arguments),this},fired:function(){return!!h}};return s};i.extend({Deferred:function(n){var u=[["resolve","done",i.Callbacks("once memory"),"resolved"],["reject","fail",i.Callbacks("once memory"),"rejected"],["notify","progress",i.Callbacks("memory")]],f="pending",r={state:function(){return f},always:function(){return t.done(arguments).fail(arguments),this},then:function(){var n=arguments;return i.Deferred(function(f){i.each(u,function(u,e){var o=i.isFunction(n[u])&&n[u];t[e[1]](function(){var n=o&&o.apply(this,arguments);n&&i.isFunction(n.promise)?n.promise().done(f.resolve).fail(f.reject).progress(f.notify):f[e[0]+"With"](this===r?f.promise():this,o?[n]:arguments)})});n=null}).promise()},promise:function(n){return null!=n?i.extend(n,r):r}},t={};return r.pipe=r.then,i.each(u,function(n,i){var e=i[2],o=i[3];r[i[1]]=e.add;o&&e.add(function(){f=o},u[1^n][2].disable,u[2][2].lock);t[i[0]]=function(){return t[i[0]+"With"](this===t?r:this,arguments),this};t[i[0]+"With"]=e.fireWith}),r.promise(t),n&&n.call(t,t),t},when:function(n){var t=0,u=a.call(arguments),r=u.length,e=1!==r||n&&i.isFunction(n.promise)?r:0,f=1===e?n:i.Deferred(),h=function(n,t,i){return function(r){t[n]=this;i[n]=arguments.length>1?a.call(arguments):r;i===o?f.notifyWith(t,i):--e||f.resolveWith(t,i)}},o,c,s;if(r>1)for(o=new Array(r),c=new Array(r),s=new Array(r);r>t;t++)u[t]&&i.isFunction(u[t].promise)?u[t].promise().done(h(t,s,u)).fail(f.reject).progress(h(t,c,o)):--e;return e||f.resolveWith(s,u),f.promise()}});i.fn.ready=function(n){return i.ready.promise().done(n),this};i.extend({isReady:!1,readyWait:1,holdReady:function(n){n?i.readyWait++:i.ready(!0)},ready:function(n){(n===!0?--i.readyWait:i.isReady)||(i.isReady=!0,n!==!0&&--i.readyWait>0||(st.resolveWith(u,[i]),i.fn.triggerHandler&&(i(u).triggerHandler("ready"),i(u).off("ready"))))}});i.ready.promise=function(t){return st||(st=i.Deferred(),"complete"===u.readyState?setTimeout(i.ready):(u.addEventListener("DOMContentLoaded",ht,!1),n.addEventListener("load",ht,!1))),st.promise(t)};i.ready.promise();l=i.access=function(n,t,r,u,f,e,o){var s=0,c=n.length,h=null==r;if("object"===i.type(r)){f=!0;for(s in r)i.access(n,t,s,r[s],!0,e,o)}else if(void 0!==u&&(f=!0,i.isFunction(u)||(o=!0),h&&(o?(t.call(n,u),t=null):(h=t,t=function(n,t,r){return h.call(i(n),r)})),t))for(;c>s;s++)t(n[s],r,o?u:u.call(n[s],s,t(n[s],r)));return f?n:h?t.call(n):c?t(n[0],r):e};i.acceptData=function(n){return 1===n.nodeType||9===n.nodeType||!+n.nodeType};v.uid=1;v.accepts=i.acceptData;v.prototype={key:function(n){if(!v.accepts(n))return 0;var r={},t=n[this.expando];if(!t){t=v.uid++;try{r[this.expando]={value:t};Object.defineProperties(n,r)}catch(u){r[this.expando]=t;i.extend(n,r)}}return this.cache[t]||(this.cache[t]={}),t},set:function(n,t,r){var f,e=this.key(n),u=this.cache[e];if("string"==typeof t)u[t]=r;else if(i.isEmptyObject(u))i.extend(this.cache[e],t);else for(f in t)u[f]=t[f];return u},get:function(n,t){var i=this.cache[this.key(n)];return void 0===t?i:i[t]},access:function(n,t,r){var u;return void 0===t||t&&"string"==typeof t&&void 0===r?(u=this.get(n,t),void 0!==u?u:this.get(n,i.camelCase(t))):(this.set(n,t,r),void 0!==r?r:t)},remove:function(n,t){var u,r,f,o=this.key(n),e=this.cache[o];if(void 0===t)this.cache[o]={};else for(i.isArray(t)?r=t.concat(t.map(i.camelCase)):(f=i.camelCase(t),(t in e)?r=[t,f]:(r=f,r=(r in e)?[r]:r.match(c)||[])),u=r.length;u--;)delete e[r[u]]},hasData:function(n){return!i.isEmptyObject(this.cache[n[this.expando]]||{})},discard:function(n){n[this.expando]&&delete this.cache[n[this.expando]]}};var r=new v,e=new v,sf=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,hf=/([A-Z])/g;i.extend({hasData:function(n){return e.hasData(n)||r.hasData(n)},data:function(n,t,i){return e.access(n,t,i)},removeData:function(n,t){e.remove(n,t)},_data:function(n,t,i){return r.access(n,t,i)},_removeData:function(n,t){r.remove(n,t)}});i.fn.extend({data:function(n,t){var o,f,s,u=this[0],h=u&&u.attributes;if(void 0===n){if(this.length&&(s=e.get(u),1===u.nodeType&&!r.get(u,"hasDataAttrs"))){for(o=h.length;o--;)h[o]&&(f=h[o].name,0===f.indexOf("data-")&&(f=i.camelCase(f.slice(5)),fr(u,f,s[f])));r.set(u,"hasDataAttrs",!0)}return s}return"object"==typeof n?this.each(function(){e.set(this,n)}):l(this,function(t){var r,f=i.camelCase(n);if(u&&void 0===t){if((r=e.get(u,n),void 0!==r)||(r=e.get(u,f),void 0!==r)||(r=fr(u,f,void 0),void 0!==r))return r}else this.each(function(){var i=e.get(this,f);e.set(this,f,t);-1!==n.indexOf("-")&&void 0!==i&&e.set(this,n,t)})},null,t,arguments.length>1,null,!0)},removeData:function(n){return this.each(function(){e.remove(this,n)})}});i.extend({queue:function(n,t,u){var f;if(n)return(t=(t||"fx")+"queue",f=r.get(n,t),u&&(!f||i.isArray(u)?f=r.access(n,t,i.makeArray(u)):f.push(u)),f||[])},dequeue:function(n,t){t=t||"fx";var r=i.queue(n,t),e=r.length,u=r.shift(),f=i._queueHooks(n,t),o=function(){i.dequeue(n,t)};"inprogress"===u&&(u=r.shift(),e--);u&&("fx"===t&&r.unshift("inprogress"),delete f.stop,u.call(n,o,f));!e&&f&&f.empty.fire()},_queueHooks:function(n,t){var u=t+"queueHooks";return r.get(n,u)||r.access(n,u,{empty:i.Callbacks("once memory").add(function(){r.remove(n,[t+"queue",u])})})}});i.fn.extend({queue:function(n,t){var r=2;return"string"!=typeof n&&(t=n,n="fx",r--),arguments.length<r?i.queue(this[0],n):void 0===t?this:this.each(function(){var r=i.queue(this,n,t);i._queueHooks(this,n);"fx"===n&&"inprogress"!==r[0]&&i.dequeue(this,n)})},dequeue:function(n){return this.each(function(){i.dequeue(this,n)})},clearQueue:function(n){return this.queue(n||"fx",[])},promise:function(n,t){var u,e=1,o=i.Deferred(),f=this,s=this.length,h=function(){--e||o.resolveWith(f,[f])};for("string"!=typeof n&&(t=n,n=void 0),n=n||"fx";s--;)u=r.get(f[s],n+"queueHooks"),u&&u.empty&&(e++,u.empty.add(h));return h(),o.promise(t)}});var ct=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,p=["Top","Right","Bottom","Left"],tt=function(n,t){return n=t||n,"none"===i.css(n,"display")||!i.contains(n.ownerDocument,n)},er=/^(?:checkbox|radio)$/i;!function(){var i=u.createDocumentFragment(),n=i.appendChild(u.createElement("div")),t=u.createElement("input");t.setAttribute("type","radio");t.setAttribute("checked","checked");t.setAttribute("name","t");n.appendChild(t);f.checkClone=n.cloneNode(!0).cloneNode(!0).lastChild.checked;n.innerHTML="<textarea>x<\/textarea>";f.noCloneChecked=!!n.cloneNode(!0).lastChild.defaultValue}();b="undefined";f.focusinBubbles="onfocusin"in n;var cf=/^key/,lf=/^(?:mouse|pointer|contextmenu)|click/,or=/^(?:focusinfocus|focusoutblur)$/,sr=/^([^.]*)(?:\.(.+)|)$/;i.event={global:{},add:function(n,t,u,f,e){var v,y,w,p,k,h,s,l,o,d,g,a=r.get(n);if(a)for(u.handler&&(v=u,u=v.handler,e=v.selector),u.guid||(u.guid=i.guid++),(p=a.events)||(p=a.events={}),(y=a.handle)||(y=a.handle=function(t){if(typeof i!==b&&i.event.triggered!==t.type)return i.event.dispatch.apply(n,arguments)}),t=(t||"").match(c)||[""],k=t.length;k--;)w=sr.exec(t[k])||[],o=g=w[1],d=(w[2]||"").split(".").sort(),o&&(s=i.event.special[o]||{},o=(e?s.delegateType:s.bindType)||o,s=i.event.special[o]||{},h=i.extend({type:o,origType:g,data:f,handler:u,guid:u.guid,selector:e,needsContext:e&&i.expr.match.needsContext.test(e),namespace:d.join(".")},v),(l=p[o])||(l=p[o]=[],l.delegateCount=0,s.setup&&s.setup.call(n,f,d,y)!==!1||n.addEventListener&&n.addEventListener(o,y,!1)),s.add&&(s.add.call(n,h),h.handler.guid||(h.handler.guid=u.guid)),e?l.splice(l.delegateCount++,0,h):l.push(h),i.event.global[o]=!0)},remove:function(n,t,u,f,e){var p,k,h,v,w,s,l,a,o,b,d,y=r.hasData(n)&&r.get(n);if(y&&(v=y.events)){for(t=(t||"").match(c)||[""],w=t.length;w--;)if(h=sr.exec(t[w])||[],o=d=h[1],b=(h[2]||"").split(".").sort(),o){for(l=i.event.special[o]||{},o=(f?l.delegateType:l.bindType)||o,a=v[o]||[],h=h[2]&&new RegExp("(^|\\.)"+b.join("\\.(?:.*\\.|)")+"(\\.|$)"),k=p=a.length;p--;)s=a[p],!e&&d!==s.origType||u&&u.guid!==s.guid||h&&!h.test(s.namespace)||f&&f!==s.selector&&("**"!==f||!s.selector)||(a.splice(p,1),s.selector&&a.delegateCount--,l.remove&&l.remove.call(n,s));k&&!a.length&&(l.teardown&&l.teardown.call(n,b,y.handle)!==!1||i.removeEvent(n,o,y.handle),delete v[o])}else for(o in v)i.event.remove(n,o+t[w],u,f,!0);i.isEmptyObject(v)&&(delete y.handle,r.remove(n,"events"))}},trigger:function(t,f,e,o){var w,s,c,b,a,v,l,p=[e||u],h=ii.call(t,"type")?t.type:t,y=ii.call(t,"namespace")?t.namespace.split("."):[];if(s=c=e=e||u,3!==e.nodeType&&8!==e.nodeType&&!or.test(h+i.event.triggered)&&(h.indexOf(".")>=0&&(y=h.split("."),h=y.shift(),y.sort()),a=h.indexOf(":")<0&&"on"+h,t=t[i.expando]?t:new i.Event(h,"object"==typeof t&&t),t.isTrigger=o?2:3,t.namespace=y.join("."),t.namespace_re=t.namespace?new RegExp("(^|\\.)"+y.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=e),f=null==f?[t]:i.makeArray(f,[t]),l=i.event.special[h]||{},o||!l.trigger||l.trigger.apply(e,f)!==!1)){if(!o&&!l.noBubble&&!i.isWindow(e)){for(b=l.delegateType||h,or.test(b+h)||(s=s.parentNode);s;s=s.parentNode)p.push(s),c=s;c===(e.ownerDocument||u)&&p.push(c.defaultView||c.parentWindow||n)}for(w=0;(s=p[w++])&&!t.isPropagationStopped();)t.type=w>1?b:l.bindType||h,v=(r.get(s,"events")||{})[t.type]&&r.get(s,"handle"),v&&v.apply(s,f),v=a&&s[a],v&&v.apply&&i.acceptData(s)&&(t.result=v.apply(s,f),t.result===!1&&t.preventDefault());return t.type=h,o||t.isDefaultPrevented()||l._default&&l._default.apply(p.pop(),f)!==!1||!i.acceptData(e)||a&&i.isFunction(e[h])&&!i.isWindow(e)&&(c=e[a],c&&(e[a]=null),i.event.triggered=h,e[h](),i.event.triggered=void 0,c&&(e[a]=c)),t.result}},dispatch:function(n){n=i.event.fix(n);var o,s,e,u,t,h=[],c=a.call(arguments),l=(r.get(this,"events")||{})[n.type]||[],f=i.event.special[n.type]||{};if(c[0]=n,n.delegateTarget=this,!f.preDispatch||f.preDispatch.call(this,n)!==!1){for(h=i.event.handlers.call(this,n,l),o=0;(u=h[o++])&&!n.isPropagationStopped();)for(n.currentTarget=u.elem,s=0;(t=u.handlers[s++])&&!n.isImmediatePropagationStopped();)(!n.namespace_re||n.namespace_re.test(t.namespace))&&(n.handleObj=t,n.data=t.data,e=((i.event.special[t.origType]||{}).handle||t.handler).apply(u.elem,c),void 0!==e&&(n.result=e)===!1&&(n.preventDefault(),n.stopPropagation()));return f.postDispatch&&f.postDispatch.call(this,n),n.result}},handlers:function(n,t){var e,u,f,o,h=[],s=t.delegateCount,r=n.target;if(s&&r.nodeType&&(!n.button||"click"!==n.type))for(;r!==this;r=r.parentNode||this)if(r.disabled!==!0||"click"!==n.type){for(u=[],e=0;s>e;e++)o=t[e],f=o.selector+" ",void 0===u[f]&&(u[f]=o.needsContext?i(f,this).index(r)>=0:i.find(f,this,null,[r]).length),u[f]&&u.push(o);u.length&&h.push({elem:r,handlers:u})}return s<t.length&&h.push({elem:this,handlers:t.slice(s)}),h},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(n,t){return null==n.which&&(n.which=null!=t.charCode?t.charCode:t.keyCode),n}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(n,t){var e,i,r,f=t.button;return null==n.pageX&&null!=t.clientX&&(e=n.target.ownerDocument||u,i=e.documentElement,r=e.body,n.pageX=t.clientX+(i&&i.scrollLeft||r&&r.scrollLeft||0)-(i&&i.clientLeft||r&&r.clientLeft||0),n.pageY=t.clientY+(i&&i.scrollTop||r&&r.scrollTop||0)-(i&&i.clientTop||r&&r.clientTop||0)),n.which||void 0===f||(n.which=1&f?1:2&f?3:4&f?2:0),n}},fix:function(n){if(n[i.expando])return n;var f,e,o,r=n.type,s=n,t=this.fixHooks[r];for(t||(this.fixHooks[r]=t=lf.test(r)?this.mouseHooks:cf.test(r)?this.keyHooks:{}),o=t.props?this.props.concat(t.props):this.props,n=new i.Event(s),f=o.length;f--;)e=o[f],n[e]=s[e];return n.target||(n.target=u),3===n.target.nodeType&&(n.target=n.target.parentNode),t.filter?t.filter(n,s):n},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==hr()&&this.focus)return(this.focus(),!1)},delegateType:"focusin"},blur:{trigger:function(){if(this===hr()&&this.blur)return(this.blur(),!1)},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&i.nodeName(this,"input"))return(this.click(),!1)},_default:function(n){return i.nodeName(n.target,"a")}},beforeunload:{postDispatch:function(n){void 0!==n.result&&n.originalEvent&&(n.originalEvent.returnValue=n.result)}}},simulate:function(n,t,r,u){var f=i.extend(new i.Event,r,{type:n,isSimulated:!0,originalEvent:{}});u?i.event.trigger(f,null,t):i.event.dispatch.call(t,f);f.isDefaultPrevented()&&r.preventDefault()}};i.removeEvent=function(n,t,i){n.removeEventListener&&n.removeEventListener(t,i,!1)};i.Event=function(n,t){return this instanceof i.Event?(n&&n.type?(this.originalEvent=n,this.type=n.type,this.isDefaultPrevented=n.defaultPrevented||void 0===n.defaultPrevented&&n.returnValue===!1?lt:k):this.type=n,t&&i.extend(this,t),this.timeStamp=n&&n.timeStamp||i.now(),void(this[i.expando]=!0)):new i.Event(n,t)};i.Event.prototype={isDefaultPrevented:k,isPropagationStopped:k,isImmediatePropagationStopped:k,preventDefault:function(){var n=this.originalEvent;this.isDefaultPrevented=lt;n&&n.preventDefault&&n.preventDefault()},stopPropagation:function(){var n=this.originalEvent;this.isPropagationStopped=lt;n&&n.stopPropagation&&n.stopPropagation()},stopImmediatePropagation:function(){var n=this.originalEvent;this.isImmediatePropagationStopped=lt;n&&n.stopImmediatePropagation&&n.stopImmediatePropagation();this.stopPropagation()}};i.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(n,t){i.event.special[n]={delegateType:t,bindType:t,handle:function(n){var u,f=this,r=n.relatedTarget,e=n.handleObj;return(!r||r!==f&&!i.contains(f,r))&&(n.type=e.origType,u=e.handler.apply(this,arguments),n.type=t),u}}});f.focusinBubbles||i.each({focus:"focusin",blur:"focusout"},function(n,t){var u=function(n){i.event.simulate(t,n.target,i.event.fix(n),!0)};i.event.special[t]={setup:function(){var i=this.ownerDocument||this,f=r.access(i,t);f||i.addEventListener(n,u,!0);r.access(i,t,(f||0)+1)},teardown:function(){var i=this.ownerDocument||this,f=r.access(i,t)-1;f?r.access(i,t,f):(i.removeEventListener(n,u,!0),r.remove(i,t))}}});i.fn.extend({on:function(n,t,r,u,f){var e,o;if("object"==typeof n){"string"!=typeof t&&(r=r||t,t=void 0);for(o in n)this.on(o,t,r,n[o],f);return this}if(null==r&&null==u?(u=t,r=t=void 0):null==u&&("string"==typeof t?(u=r,r=void 0):(u=r,r=t,t=void 0)),u===!1)u=k;else if(!u)return this;return 1===f&&(e=u,u=function(n){return i().off(n),e.apply(this,arguments)},u.guid=e.guid||(e.guid=i.guid++)),this.each(function(){i.event.add(this,n,u,r,t)})},one:function(n,t,i,r){return this.on(n,t,i,r,1)},off:function(n,t,r){var u,f;if(n&&n.preventDefault&&n.handleObj)return u=n.handleObj,i(n.delegateTarget).off(u.namespace?u.origType+"."+u.namespace:u.origType,u.selector,u.handler),this;if("object"==typeof n){for(f in n)this.off(f,t,n[f]);return this}return(t===!1||"function"==typeof t)&&(r=t,t=void 0),r===!1&&(r=k),this.each(function(){i.event.remove(this,n,r,t)})},trigger:function(n,t){return this.each(function(){i.event.trigger(n,t,this)})},triggerHandler:function(n,t){var r=this[0];if(r)return i.event.trigger(n,t,r,!0)}});var cr=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,lr=/<([\w:]+)/,af=/<|&#?\w+;/,vf=/<(?:script|style|link)/i,yf=/checked\s*(?:[^=]|=\s*.checked.)/i,ar=/^$|\/(?:java|ecma)script/i,pf=/^true\/(.*)/,wf=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,h={option:[1,"<select multiple='multiple'>","<\/select>"],thead:[1,"<table>","<\/table>"],col:[2,"<table><colgroup>","<\/colgroup><\/table>"],tr:[2,"<table><tbody>","<\/tbody><\/table>"],td:[3,"<table><tbody><tr>","<\/tr><\/tbody><\/table>"],_default:[0,"",""]};h.optgroup=h.option;h.tbody=h.tfoot=h.colgroup=h.caption=h.thead;h.th=h.td;i.extend({clone:function(n,t,r){var u,c,s,e,h=n.cloneNode(!0),l=i.contains(n.ownerDocument,n);if(!(f.noCloneChecked||1!==n.nodeType&&11!==n.nodeType||i.isXMLDoc(n)))for(e=o(h),s=o(n),u=0,c=s.length;c>u;u++)df(s[u],e[u]);if(t)if(r)for(s=s||o(n),e=e||o(h),u=0,c=s.length;c>u;u++)yr(s[u],e[u]);else yr(n,h);return e=o(h,"script"),e.length>0&&ei(e,!l&&o(n,"script")),h},buildFragment:function(n,t,r,u){for(var f,e,y,l,p,a,s=t.createDocumentFragment(),v=[],c=0,w=n.length;w>c;c++)if(f=n[c],f||0===f)if("object"===i.type(f))i.merge(v,f.nodeType?[f]:f);else if(af.test(f)){for(e=e||s.appendChild(t.createElement("div")),y=(lr.exec(f)||["",""])[1].toLowerCase(),l=h[y]||h._default,e.innerHTML=l[1]+f.replace(cr,"<$1><\/$2>")+l[2],a=l[0];a--;)e=e.lastChild;i.merge(v,e.childNodes);e=s.firstChild;e.textContent=""}else v.push(t.createTextNode(f));for(s.textContent="",c=0;f=v[c++];)if((!u||-1===i.inArray(f,u))&&(p=i.contains(f.ownerDocument,f),e=o(s.appendChild(f),"script"),p&&ei(e),r))for(a=0;f=e[a++];)ar.test(f.type||"")&&r.push(f);return s},cleanData:function(n){for(var f,t,o,u,h=i.event.special,s=0;void 0!==(t=n[s]);s++){if(i.acceptData(t)&&(u=t[r.expando],u&&(f=r.cache[u]))){if(f.events)for(o in f.events)h[o]?i.event.remove(t,o):i.removeEvent(t,o,f.handle);r.cache[u]&&delete r.cache[u]}delete e.cache[t[e.expando]]}}});i.fn.extend({text:function(n){return l(this,function(n){return void 0===n?i.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=n)})},null,n,arguments.length)},append:function(){return this.domManip(arguments,function(n){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=vr(this,n);t.appendChild(n)}})},prepend:function(){return this.domManip(arguments,function(n){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=vr(this,n);t.insertBefore(n,t.firstChild)}})},before:function(){return this.domManip(arguments,function(n){this.parentNode&&this.parentNode.insertBefore(n,this)})},after:function(){return this.domManip(arguments,function(n){this.parentNode&&this.parentNode.insertBefore(n,this.nextSibling)})},remove:function(n,t){for(var r,f=n?i.filter(n,this):this,u=0;null!=(r=f[u]);u++)t||1!==r.nodeType||i.cleanData(o(r)),r.parentNode&&(t&&i.contains(r.ownerDocument,r)&&ei(o(r,"script")),r.parentNode.removeChild(r));return this},empty:function(){for(var n,t=0;null!=(n=this[t]);t++)1===n.nodeType&&(i.cleanData(o(n,!1)),n.textContent="");return this},clone:function(n,t){return n=null==n?!1:n,t=null==t?n:t,this.map(function(){return i.clone(this,n,t)})},html:function(n){return l(this,function(n){var t=this[0]||{},r=0,u=this.length;if(void 0===n&&1===t.nodeType)return t.innerHTML;if("string"==typeof n&&!vf.test(n)&&!h[(lr.exec(n)||["",""])[1].toLowerCase()]){n=n.replace(cr,"<$1><\/$2>");try{for(;u>r;r++)t=this[r]||{},1===t.nodeType&&(i.cleanData(o(t,!1)),t.innerHTML=n);t=0}catch(f){}}t&&this.empty().append(n)},null,n,arguments.length)},replaceWith:function(){var n=arguments[0];return this.domManip(arguments,function(t){n=this.parentNode;i.cleanData(o(this));n&&n.replaceChild(t,this)}),n&&(n.length||n.nodeType)?this:this.remove()},detach:function(n){return this.remove(n,!0)},domManip:function(n,t){n=bi.apply([],n);var h,v,s,c,u,y,e=0,l=this.length,w=this,b=l-1,a=n[0],p=i.isFunction(a);if(p||l>1&&"string"==typeof a&&!f.checkClone&&yf.test(a))return this.each(function(i){var r=w.eq(i);p&&(n[0]=a.call(this,i,r.html()));r.domManip(n,t)});if(l&&(h=i.buildFragment(n,this[0].ownerDocument,!1,this),v=h.firstChild,1===h.childNodes.length&&(h=v),v)){for(s=i.map(o(h,"script"),bf),c=s.length;l>e;e++)u=h,e!==b&&(u=i.clone(u,!0,!0),c&&i.merge(s,o(u,"script"))),t.call(this[e],u,e);if(c)for(y=s[s.length-1].ownerDocument,i.map(s,kf),e=0;c>e;e++)u=s[e],ar.test(u.type||"")&&!r.access(u,"globalEval")&&i.contains(y,u)&&(u.src?i._evalUrl&&i._evalUrl(u.src):i.globalEval(u.textContent.replace(wf,"")))}return this}});i.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(n,t){i.fn[n]=function(n){for(var u,f=[],e=i(n),o=e.length-1,r=0;o>=r;r++)u=r===o?this:this.clone(!0),i(e[r])[t](u),ti.apply(f,u.get());return this.pushStack(f)}});oi={};var wr=/^margin/,hi=new RegExp("^("+ct+")(?!px)[a-z%]+$","i"),vt=function(t){return t.ownerDocument.defaultView.opener?t.ownerDocument.defaultView.getComputedStyle(t,null):n.getComputedStyle(t,null)};!function(){var s,o,e=u.documentElement,r=u.createElement("div"),t=u.createElement("div");if(t.style){t.style.backgroundClip="content-box";t.cloneNode(!0).style.backgroundClip="";f.clearCloneStyle="content-box"===t.style.backgroundClip;r.style.cssText="border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;position:absolute";r.appendChild(t);function h(){t.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute";t.innerHTML="";e.appendChild(r);var i=n.getComputedStyle(t,null);s="1%"!==i.top;o="4px"===i.width;e.removeChild(r)}n.getComputedStyle&&i.extend(f,{pixelPosition:function(){return h(),s},boxSizingReliable:function(){return null==o&&h(),o},reliableMarginRight:function(){var f,i=t.appendChild(u.createElement("div"));return i.style.cssText=t.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",i.style.marginRight=i.style.width="0",t.style.width="1px",e.appendChild(r),f=!parseFloat(n.getComputedStyle(i,null).marginRight),e.removeChild(r),t.removeChild(i),f}})}}();i.swap=function(n,t,i,r){var f,u,e={};for(u in t)e[u]=n.style[u],n.style[u]=t[u];f=i.apply(n,r||[]);for(u in t)n.style[u]=e[u];return f};var gf=/^(none|table(?!-c[ea]).+)/,ne=new RegExp("^("+ct+")(.*)$","i"),te=new RegExp("^([+-])=("+ct+")","i"),ie={position:"absolute",visibility:"hidden",display:"block"},kr={letterSpacing:"0",fontWeight:"400"},dr=["Webkit","O","Moz","ms"];i.extend({cssHooks:{opacity:{get:function(n,t){if(t){var i=it(n,"opacity");return""===i?"1":i}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:"cssFloat"},style:function(n,t,r,u){if(n&&3!==n.nodeType&&8!==n.nodeType&&n.style){var o,h,e,s=i.camelCase(t),c=n.style;return t=i.cssProps[s]||(i.cssProps[s]=gr(c,s)),e=i.cssHooks[t]||i.cssHooks[s],void 0===r?e&&"get"in e&&void 0!==(o=e.get(n,!1,u))?o:c[t]:(h=typeof r,"string"===h&&(o=te.exec(r))&&(r=(o[1]+1)*o[2]+parseFloat(i.css(n,t)),h="number"),null!=r&&r===r&&("number"!==h||i.cssNumber[s]||(r+="px"),f.clearCloneStyle||""!==r||0!==t.indexOf("background")||(c[t]="inherit"),e&&"set"in e&&void 0===(r=e.set(n,r,u))||(c[t]=r)),void 0)}},css:function(n,t,r,u){var f,s,e,o=i.camelCase(t);return t=i.cssProps[o]||(i.cssProps[o]=gr(n.style,o)),e=i.cssHooks[t]||i.cssHooks[o],e&&"get"in e&&(f=e.get(n,!0,r)),void 0===f&&(f=it(n,t,u)),"normal"===f&&t in kr&&(f=kr[t]),""===r||r?(s=parseFloat(f),r===!0||i.isNumeric(s)?s||0:f):f}});i.each(["height","width"],function(n,t){i.cssHooks[t]={get:function(n,r,u){if(r)return gf.test(i.css(n,"display"))&&0===n.offsetWidth?i.swap(n,ie,function(){return iu(n,t,u)}):iu(n,t,u)},set:function(n,r,u){var f=u&&vt(n);return nu(n,r,u?tu(n,t,u,"border-box"===i.css(n,"boxSizing",!1,f),f):0)}}});i.cssHooks.marginRight=br(f.reliableMarginRight,function(n,t){if(t)return i.swap(n,{display:"inline-block"},it,[n,"marginRight"])});i.each({margin:"",padding:"",border:"Width"},function(n,t){i.cssHooks[n+t]={expand:function(i){for(var r=0,f={},u="string"==typeof i?i.split(" "):[i];4>r;r++)f[n+p[r]+t]=u[r]||u[r-2]||u[0];return f}};wr.test(n)||(i.cssHooks[n+t].set=nu)});i.fn.extend({css:function(n,t){return l(this,function(n,t,r){var f,e,o={},u=0;if(i.isArray(t)){for(f=vt(n),e=t.length;e>u;u++)o[t[u]]=i.css(n,t[u],!1,f);return o}return void 0!==r?i.style(n,t,r):i.css(n,t)},n,t,arguments.length>1)},show:function(){return ru(this,!0)},hide:function(){return ru(this)},toggle:function(n){return"boolean"==typeof n?n?this.show():this.hide():this.each(function(){tt(this)?i(this).show():i(this).hide()})}});i.Tween=s;s.prototype={constructor:s,init:function(n,t,r,u,f,e){this.elem=n;this.prop=r;this.easing=f||"swing";this.options=t;this.start=this.now=this.cur();this.end=u;this.unit=e||(i.cssNumber[r]?"":"px")},cur:function(){var n=s.propHooks[this.prop];return n&&n.get?n.get(this):s.propHooks._default.get(this)},run:function(n){var r,t=s.propHooks[this.prop];return this.pos=r=this.options.duration?i.easing[this.easing](n,this.options.duration*n,0,1,this.options.duration):n,this.now=(this.end-this.start)*r+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),t&&t.set?t.set(this):s.propHooks._default.set(this),this}};s.prototype.init.prototype=s.prototype;s.propHooks={_default:{get:function(n){var t;return null==n.elem[n.prop]||n.elem.style&&null!=n.elem.style[n.prop]?(t=i.css(n.elem,n.prop,""),t&&"auto"!==t?t:0):n.elem[n.prop]},set:function(n){i.fx.step[n.prop]?i.fx.step[n.prop](n):n.elem.style&&(null!=n.elem.style[i.cssProps[n.prop]]||i.cssHooks[n.prop])?i.style(n.elem,n.prop,n.now+n.unit):n.elem[n.prop]=n.now}}};s.propHooks.scrollTop=s.propHooks.scrollLeft={set:function(n){n.elem.nodeType&&n.elem.parentNode&&(n.elem[n.prop]=n.now)}};i.easing={linear:function(n){return n},swing:function(n){return.5-Math.cos(n*Math.PI)/2}};i.fx=s.prototype.init;i.fx.step={};var d,yt,re=/^(?:toggle|show|hide)$/,uu=new RegExp("^(?:([+-])=|)("+ct+")([a-z%]*)$","i"),ue=/queueHooks$/,pt=[fe],rt={"*":[function(n,t){var f=this.createTween(n,t),s=f.cur(),r=uu.exec(t),e=r&&r[3]||(i.cssNumber[n]?"":"px"),u=(i.cssNumber[n]||"px"!==e&&+s)&&uu.exec(i.css(f.elem,n)),o=1,h=20;if(u&&u[3]!==e){e=e||u[3];r=r||[];u=+s||1;do o=o||".5",u/=o,i.style(f.elem,n,u+e);while(o!==(o=f.cur()/s)&&1!==o&&--h)}return r&&(u=f.start=+u||+s||0,f.unit=e,f.end=r[1]?u+(r[1]+1)*r[2]:+r[2]),f}]};i.Animation=i.extend(ou,{tweener:function(n,t){i.isFunction(n)?(t=n,n=["*"]):n=n.split(" ");for(var r,u=0,f=n.length;f>u;u++)r=n[u],rt[r]=rt[r]||[],rt[r].unshift(t)},prefilter:function(n,t){t?pt.unshift(n):pt.push(n)}});i.speed=function(n,t,r){var u=n&&"object"==typeof n?i.extend({},n):{complete:r||!r&&t||i.isFunction(n)&&n,duration:n,easing:r&&t||t&&!i.isFunction(t)&&t};return u.duration=i.fx.off?0:"number"==typeof u.duration?u.duration:u.duration in i.fx.speeds?i.fx.speeds[u.duration]:i.fx.speeds._default,(null==u.queue||u.queue===!0)&&(u.queue="fx"),u.old=u.complete,u.complete=function(){i.isFunction(u.old)&&u.old.call(this);u.queue&&i.dequeue(this,u.queue)},u};i.fn.extend({fadeTo:function(n,t,i,r){return this.filter(tt).css("opacity",0).show().end().animate({opacity:t},n,i,r)},animate:function(n,t,u,f){var s=i.isEmptyObject(n),o=i.speed(t,u,f),e=function(){var t=ou(this,i.extend({},n),o);(s||r.get(this,"finish"))&&t.stop(!0)};return e.finish=e,s||o.queue===!1?this.each(e):this.queue(o.queue,e)},stop:function(n,t,u){var f=function(n){var t=n.stop;delete n.stop;t(u)};return"string"!=typeof n&&(u=t,t=n,n=void 0),t&&n!==!1&&this.queue(n||"fx",[]),this.each(function(){var s=!0,t=null!=n&&n+"queueHooks",o=i.timers,e=r.get(this);if(t)e[t]&&e[t].stop&&f(e[t]);else for(t in e)e[t]&&e[t].stop&&ue.test(t)&&f(e[t]);for(t=o.length;t--;)o[t].elem!==this||null!=n&&o[t].queue!==n||(o[t].anim.stop(u),s=!1,o.splice(t,1));(s||!u)&&i.dequeue(this,n)})},finish:function(n){return n!==!1&&(n=n||"fx"),this.each(function(){var t,e=r.get(this),u=e[n+"queue"],o=e[n+"queueHooks"],f=i.timers,s=u?u.length:0;for(e.finish=!0,i.queue(this,n,[]),o&&o.stop&&o.stop.call(this,!0),t=f.length;t--;)f[t].elem===this&&f[t].queue===n&&(f[t].anim.stop(!0),f.splice(t,1));for(t=0;s>t;t++)u[t]&&u[t].finish&&u[t].finish.call(this);delete e.finish})}});i.each(["toggle","show","hide"],function(n,t){var r=i.fn[t];i.fn[t]=function(n,i,u){return null==n||"boolean"==typeof n?r.apply(this,arguments):this.animate(wt(t,!0),n,i,u)}});i.each({slideDown:wt("show"),slideUp:wt("hide"),slideToggle:wt("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(n,t){i.fn[n]=function(n,i,r){return this.animate(t,n,i,r)}});i.timers=[];i.fx.tick=function(){var r,n=0,t=i.timers;for(d=i.now();n<t.length;n++)r=t[n],r()||t[n]!==r||t.splice(n--,1);t.length||i.fx.stop();d=void 0};i.fx.timer=function(n){i.timers.push(n);n()?i.fx.start():i.timers.pop()};i.fx.interval=13;i.fx.start=function(){yt||(yt=setInterval(i.fx.tick,i.fx.interval))};i.fx.stop=function(){clearInterval(yt);yt=null};i.fx.speeds={slow:600,fast:200,_default:400};i.fn.delay=function(n,t){return n=i.fx?i.fx.speeds[n]||n:n,t=t||"fx",this.queue(t,function(t,i){var r=setTimeout(t,n);i.stop=function(){clearTimeout(r)}})},function(){var n=u.createElement("input"),t=u.createElement("select"),i=t.appendChild(u.createElement("option"));n.type="checkbox";f.checkOn=""!==n.value;f.optSelected=i.selected;t.disabled=!0;f.optDisabled=!i.disabled;n=u.createElement("input");n.value="t";n.type="radio";f.radioValue="t"===n.value}();g=i.expr.attrHandle;i.fn.extend({attr:function(n,t){return l(this,i.attr,n,t,arguments.length>1)},removeAttr:function(n){return this.each(function(){i.removeAttr(this,n)})}});i.extend({attr:function(n,t,r){var u,f,e=n.nodeType;if(n&&3!==e&&8!==e&&2!==e)return typeof n.getAttribute===b?i.prop(n,t,r):(1===e&&i.isXMLDoc(n)||(t=t.toLowerCase(),u=i.attrHooks[t]||(i.expr.match.bool.test(t)?su:oe)),void 0===r?u&&"get"in u&&null!==(f=u.get(n,t))?f:(f=i.find.attr(n,t),null==f?void 0:f):null!==r?u&&"set"in u&&void 0!==(f=u.set(n,r,t))?f:(n.setAttribute(t,r+""),r):void i.removeAttr(n,t))},removeAttr:function(n,t){var r,u,e=0,f=t&&t.match(c);if(f&&1===n.nodeType)while(r=f[e++])u=i.propFix[r]||r,i.expr.match.bool.test(r)&&(n[u]=!1),n.removeAttribute(r)},attrHooks:{type:{set:function(n,t){if(!f.radioValue&&"radio"===t&&i.nodeName(n,"input")){var r=n.value;return n.setAttribute("type",t),r&&(n.value=r),t}}}}});su={set:function(n,t,r){return t===!1?i.removeAttr(n,r):n.setAttribute(r,r),r}};i.each(i.expr.match.bool.source.match(/\w+/g),function(n,t){var r=g[t]||i.find.attr;g[t]=function(n,t,i){var u,f;return i||(f=g[t],g[t]=u,u=null!=r(n,t,i)?t.toLowerCase():null,g[t]=f),u}});hu=/^(?:input|select|textarea|button)$/i;i.fn.extend({prop:function(n,t){return l(this,i.prop,n,t,arguments.length>1)},removeProp:function(n){return this.each(function(){delete this[i.propFix[n]||n]})}});i.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(n,t,r){var f,u,o,e=n.nodeType;if(n&&3!==e&&8!==e&&2!==e)return o=1!==e||!i.isXMLDoc(n),o&&(t=i.propFix[t]||t,u=i.propHooks[t]),void 0!==r?u&&"set"in u&&void 0!==(f=u.set(n,r,t))?f:n[t]=r:u&&"get"in u&&null!==(f=u.get(n,t))?f:n[t]},propHooks:{tabIndex:{get:function(n){return n.hasAttribute("tabindex")||hu.test(n.nodeName)||n.href?n.tabIndex:-1}}}});f.optSelected||(i.propHooks.selected={get:function(n){var t=n.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null}});i.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){i.propFix[this.toLowerCase()]=this});bt=/[\t\r\n\f]/g;i.fn.extend({addClass:function(n){var o,t,r,u,s,f,h="string"==typeof n&&n,e=0,l=this.length;if(i.isFunction(n))return this.each(function(t){i(this).addClass(n.call(this,t,this.className))});if(h)for(o=(n||"").match(c)||[];l>e;e++)if(t=this[e],r=1===t.nodeType&&(t.className?(" "+t.className+" ").replace(bt," "):" ")){for(s=0;u=o[s++];)r.indexOf(" "+u+" ")<0&&(r+=u+" ");f=i.trim(r);t.className!==f&&(t.className=f)}return this},removeClass:function(n){var o,t,r,u,s,f,h=0===arguments.length||"string"==typeof n&&n,e=0,l=this.length;if(i.isFunction(n))return this.each(function(t){i(this).removeClass(n.call(this,t,this.className))});if(h)for(o=(n||"").match(c)||[];l>e;e++)if(t=this[e],r=1===t.nodeType&&(t.className?(" "+t.className+" ").replace(bt," "):"")){for(s=0;u=o[s++];)while(r.indexOf(" "+u+" ")>=0)r=r.replace(" "+u+" "," ");f=n?i.trim(r):"";t.className!==f&&(t.className=f)}return this},toggleClass:function(n,t){var u=typeof n;return"boolean"==typeof t&&"string"===u?t?this.addClass(n):this.removeClass(n):this.each(i.isFunction(n)?function(r){i(this).toggleClass(n.call(this,r,this.className,t),t)}:function(){if("string"===u)for(var t,e=0,f=i(this),o=n.match(c)||[];t=o[e++];)f.hasClass(t)?f.removeClass(t):f.addClass(t);else(u===b||"boolean"===u)&&(this.className&&r.set(this,"__className__",this.className),this.className=this.className||n===!1?"":r.get(this,"__className__")||"")})},hasClass:function(n){for(var i=" "+n+" ",t=0,r=this.length;r>t;t++)if(1===this[t].nodeType&&(" "+this[t].className+" ").replace(bt," ").indexOf(i)>=0)return!0;return!1}});cu=/\r/g;i.fn.extend({val:function(n){var t,r,f,u=this[0];return arguments.length?(f=i.isFunction(n),this.each(function(r){var u;1===this.nodeType&&(u=f?n.call(this,r,i(this).val()):n,null==u?u="":"number"==typeof u?u+="":i.isArray(u)&&(u=i.map(u,function(n){return null==n?"":n+""})),t=i.valHooks[this.type]||i.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&void 0!==t.set(this,u,"value")||(this.value=u))})):u?(t=i.valHooks[u.type]||i.valHooks[u.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(r=t.get(u,"value"))?r:(r=u.value,"string"==typeof r?r.replace(cu,""):null==r?"":r)):void 0}});i.extend({valHooks:{option:{get:function(n){var t=i.find.attr(n,"value");return null!=t?t:i.trim(i.text(n))}},select:{get:function(n){for(var o,t,s=n.options,r=n.selectedIndex,u="select-one"===n.type||0>r,h=u?null:[],c=u?r+1:s.length,e=0>r?c:u?r:0;c>e;e++)if(t=s[e],!(!t.selected&&e!==r||(f.optDisabled?t.disabled:null!==t.getAttribute("disabled"))||t.parentNode.disabled&&i.nodeName(t.parentNode,"optgroup"))){if(o=i(t).val(),u)return o;h.push(o)}return h},set:function(n,t){for(var u,r,f=n.options,e=i.makeArray(t),o=f.length;o--;)r=f[o],(r.selected=i.inArray(r.value,e)>=0)&&(u=!0);return u||(n.selectedIndex=-1),e}}}});i.each(["radio","checkbox"],function(){i.valHooks[this]={set:function(n,t){if(i.isArray(t))return n.checked=i.inArray(i(n).val(),t)>=0}};f.checkOn||(i.valHooks[this].get=function(n){return null===n.getAttribute("value")?"on":n.value})});i.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(n,t){i.fn[t]=function(n,i){return arguments.length>0?this.on(t,null,n,i):this.trigger(t)}});i.fn.extend({hover:function(n,t){return this.mouseenter(n).mouseleave(t||n)},bind:function(n,t,i){return this.on(n,null,t,i)},unbind:function(n,t){return this.off(n,null,t)},delegate:function(n,t,i,r){return this.on(t,n,i,r)},undelegate:function(n,t,i){return 1===arguments.length?this.off(n,"**"):this.off(t,n||"**",i)}});kt=i.now();dt=/\?/;i.parseJSON=function(n){return JSON.parse(n+"")};i.parseXML=function(n){var t,r;if(!n||"string"!=typeof n)return null;try{r=new DOMParser;t=r.parseFromString(n,"text/xml")}catch(u){t=void 0}return(!t||t.getElementsByTagName("parsererror").length)&&i.error("Invalid XML: "+n),t};var se=/#.*$/,lu=/([?&])_=[^&]*/,he=/^(.*?):[ \t]*([^\r\n]*)$/gm,ce=/^(?:GET|HEAD)$/,le=/^\/\//,au=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,vu={},ci={},yu="*/".concat("*"),li=n.location.href,nt=au.exec(li.toLowerCase())||[];i.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:li,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(nt[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":yu,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":i.parseJSON,"text xml":i.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(n,t){return t?ai(ai(n,i.ajaxSettings),t):ai(i.ajaxSettings,n)},ajaxPrefilter:pu(vu),ajaxTransport:pu(ci),ajax:function(n,t){function p(n,t,s,h){var v,it,tt,p,nt,c=t;2!==e&&(e=2,b&&clearTimeout(b),l=void 0,w=h||"",u.readyState=n>0?4:0,v=n>=200&&300>n||304===n,s&&(p=ae(r,u,s)),p=ve(r,p,u,v),v?(r.ifModified&&(nt=u.getResponseHeader("Last-Modified"),nt&&(i.lastModified[f]=nt),nt=u.getResponseHeader("etag"),nt&&(i.etag[f]=nt)),204===n||"HEAD"===r.type?c="nocontent":304===n?c="notmodified":(c=p.state,it=p.data,tt=p.error,v=!tt)):(tt=c,(n||!c)&&(c="error",0>n&&(n=0))),u.status=n,u.statusText=(t||c)+"",v?d.resolveWith(o,[it,c,u]):d.rejectWith(o,[u,c,tt]),u.statusCode(y),y=void 0,a&&k.trigger(v?"ajaxSuccess":"ajaxError",[u,r,v?it:tt]),g.fireWith(o,[u,c]),a&&(k.trigger("ajaxComplete",[u,r]),--i.active||i.event.trigger("ajaxStop")))}"object"==typeof n&&(t=n,n=void 0);t=t||{};var l,f,w,v,b,s,a,h,r=i.ajaxSetup({},t),o=r.context||r,k=r.context&&(o.nodeType||o.jquery)?i(o):i.event,d=i.Deferred(),g=i.Callbacks("once memory"),y=r.statusCode||{},tt={},it={},e=0,rt="canceled",u={readyState:0,getResponseHeader:function(n){var t;if(2===e){if(!v)for(v={};t=he.exec(w);)v[t[1].toLowerCase()]=t[2];t=v[n.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===e?w:null},setRequestHeader:function(n,t){var i=n.toLowerCase();return e||(n=it[i]=it[i]||n,tt[n]=t),this},overrideMimeType:function(n){return e||(r.mimeType=n),this},statusCode:function(n){var t;if(n)if(2>e)for(t in n)y[t]=[y[t],n[t]];else u.always(n[u.status]);return this},abort:function(n){var t=n||rt;return l&&l.abort(t),p(0,t),this}};if(d.promise(u).complete=g.add,u.success=u.done,u.error=u.fail,r.url=((n||r.url||li)+"").replace(se,"").replace(le,nt[1]+"//"),r.type=t.method||t.type||r.method||r.type,r.dataTypes=i.trim(r.dataType||"*").toLowerCase().match(c)||[""],null==r.crossDomain&&(s=au.exec(r.url.toLowerCase()),r.crossDomain=!(!s||s[1]===nt[1]&&s[2]===nt[2]&&(s[3]||("http:"===s[1]?"80":"443"))===(nt[3]||("http:"===nt[1]?"80":"443")))),r.data&&r.processData&&"string"!=typeof r.data&&(r.data=i.param(r.data,r.traditional)),wu(vu,r,t,u),2===e)return u;a=i.event&&r.global;a&&0==i.active++&&i.event.trigger("ajaxStart");r.type=r.type.toUpperCase();r.hasContent=!ce.test(r.type);f=r.url;r.hasContent||(r.data&&(f=r.url+=(dt.test(f)?"&":"?")+r.data,delete r.data),r.cache===!1&&(r.url=lu.test(f)?f.replace(lu,"$1_="+kt++):f+(dt.test(f)?"&":"?")+"_="+kt++));r.ifModified&&(i.lastModified[f]&&u.setRequestHeader("If-Modified-Since",i.lastModified[f]),i.etag[f]&&u.setRequestHeader("If-None-Match",i.etag[f]));(r.data&&r.hasContent&&r.contentType!==!1||t.contentType)&&u.setRequestHeader("Content-Type",r.contentType);u.setRequestHeader("Accept",r.dataTypes[0]&&r.accepts[r.dataTypes[0]]?r.accepts[r.dataTypes[0]]+("*"!==r.dataTypes[0]?", "+yu+"; q=0.01":""):r.accepts["*"]);for(h in r.headers)u.setRequestHeader(h,r.headers[h]);if(r.beforeSend&&(r.beforeSend.call(o,u,r)===!1||2===e))return u.abort();rt="abort";for(h in{success:1,error:1,complete:1})u[h](r[h]);if(l=wu(ci,r,t,u)){u.readyState=1;a&&k.trigger("ajaxSend",[u,r]);r.async&&r.timeout>0&&(b=setTimeout(function(){u.abort("timeout")},r.timeout));try{e=1;l.send(tt,p)}catch(ut){if(!(2>e))throw ut;p(-1,ut)}}else p(-1,"No Transport");return u},getJSON:function(n,t,r){return i.get(n,t,r,"json")},getScript:function(n,t){return i.get(n,void 0,t,"script")}});i.each(["get","post"],function(n,t){i[t]=function(n,r,u,f){return i.isFunction(r)&&(f=f||u,u=r,r=void 0),i.ajax({url:n,type:t,dataType:f,data:r,success:u})}});i._evalUrl=function(n){return i.ajax({url:n,type:"GET",dataType:"script",async:!1,global:!1,throws:!0})};i.fn.extend({wrapAll:function(n){var t;return i.isFunction(n)?this.each(function(t){i(this).wrapAll(n.call(this,t))}):(this[0]&&(t=i(n,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var n=this;n.firstElementChild;)n=n.firstElementChild;return n}).append(this)),this)},wrapInner:function(n){return this.each(i.isFunction(n)?function(t){i(this).wrapInner(n.call(this,t))}:function(){var t=i(this),r=t.contents();r.length?r.wrapAll(n):t.append(n)})},wrap:function(n){var t=i.isFunction(n);return this.each(function(r){i(this).wrapAll(t?n.call(this,r):n)})},unwrap:function(){return this.parent().each(function(){i.nodeName(this,"body")||i(this).replaceWith(this.childNodes)}).end()}});i.expr.filters.hidden=function(n){return n.offsetWidth<=0&&n.offsetHeight<=0};i.expr.filters.visible=function(n){return!i.expr.filters.hidden(n)};var ye=/%20/g,pe=/\[\]$/,bu=/\r?\n/g,we=/^(?:submit|button|image|reset|file)$/i,be=/^(?:input|select|textarea|keygen)/i;i.param=function(n,t){var r,u=[],f=function(n,t){t=i.isFunction(t)?t():null==t?"":t;u[u.length]=encodeURIComponent(n)+"="+encodeURIComponent(t)};if(void 0===t&&(t=i.ajaxSettings&&i.ajaxSettings.traditional),i.isArray(n)||n.jquery&&!i.isPlainObject(n))i.each(n,function(){f(this.name,this.value)});else for(r in n)vi(r,n[r],t,f);return u.join("&").replace(ye,"+")};i.fn.extend({serialize:function(){return i.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var n=i.prop(this,"elements");return n?i.makeArray(n):this}).filter(function(){var n=this.type;return this.name&&!i(this).is(":disabled")&&be.test(this.nodeName)&&!we.test(n)&&(this.checked||!er.test(n))}).map(function(n,t){var r=i(this).val();return null==r?null:i.isArray(r)?i.map(r,function(n){return{name:t.name,value:n.replace(bu,"\r\n")}}):{name:t.name,value:r.replace(bu,"\r\n")}}).get()}});i.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(n){}};var ke=0,gt={},de={0:200,1223:204},ut=i.ajaxSettings.xhr();return n.attachEvent&&n.attachEvent("onunload",function(){for(var n in gt)gt[n]()}),f.cors=!!ut&&"withCredentials"in ut,f.ajax=ut=!!ut,i.ajaxTransport(function(n){var t;if(f.cors||ut&&!n.crossDomain)return{send:function(i,r){var f,u=n.xhr(),e=++ke;if(u.open(n.type,n.url,n.async,n.username,n.password),n.xhrFields)for(f in n.xhrFields)u[f]=n.xhrFields[f];n.mimeType&&u.overrideMimeType&&u.overrideMimeType(n.mimeType);n.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");for(f in i)u.setRequestHeader(f,i[f]);t=function(n){return function(){t&&(delete gt[e],t=u.onload=u.onerror=null,"abort"===n?u.abort():"error"===n?r(u.status,u.statusText):r(de[u.status]||u.status,u.statusText,"string"==typeof u.responseText?{text:u.responseText}:void 0,u.getAllResponseHeaders()))}};u.onload=t();u.onerror=t("error");t=gt[e]=t("abort");try{u.send(n.hasContent&&n.data||null)}catch(o){if(t)throw o;}},abort:function(){t&&t()}}}),i.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(n){return i.globalEval(n),n}}}),i.ajaxPrefilter("script",function(n){void 0===n.cache&&(n.cache=!1);n.crossDomain&&(n.type="GET")}),i.ajaxTransport("script",function(n){if(n.crossDomain){var r,t;return{send:function(f,e){r=i("<script>").prop({async:!0,charset:n.scriptCharset,src:n.url}).on("load error",t=function(n){r.remove();t=null;n&&e("error"===n.type?404:200,n.type)});u.head.appendChild(r[0])},abort:function(){t&&t()}}}}),yi=[],ni=/(=)\?(?=&|$)|\?\?/,i.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var n=yi.pop()||i.expando+"_"+kt++;return this[n]=!0,n}}),i.ajaxPrefilter("json jsonp",function(t,r,u){var f,o,e,s=t.jsonp!==!1&&(ni.test(t.url)?"url":"string"==typeof t.data&&!(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&ni.test(t.data)&&"data");if(s||"jsonp"===t.dataTypes[0])return(f=t.jsonpCallback=i.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(ni,"$1"+f):t.jsonp!==!1&&(t.url+=(dt.test(t.url)?"&":"?")+t.jsonp+"="+f),t.converters["script json"]=function(){return e||i.error(f+" was not called"),e[0]},t.dataTypes[0]="json",o=n[f],n[f]=function(){e=arguments},u.always(function(){n[f]=o;t[f]&&(t.jsonpCallback=r.jsonpCallback,yi.push(f));e&&i.isFunction(o)&&o(e[0]);e=o=void 0}),"script")}),i.parseHTML=function(n,t,r){if(!n||"string"!=typeof n)return null;"boolean"==typeof t&&(r=t,t=!1);t=t||u;var f=gi.exec(n),e=!r&&[];return f?[t.createElement(f[1])]:(f=i.buildFragment([n],t,e),e&&e.length&&i(e).remove(),i.merge([],f.childNodes))},pi=i.fn.load,i.fn.load=function(n,t,r){if("string"!=typeof n&&pi)return pi.apply(this,arguments);var u,o,s,f=this,e=n.indexOf(" ");return e>=0&&(u=i.trim(n.slice(e)),n=n.slice(0,e)),i.isFunction(t)?(r=t,t=void 0):t&&"object"==typeof t&&(o="POST"),f.length>0&&i.ajax({url:n,type:o,dataType:"html",data:t}).done(function(n){s=arguments;f.html(u?i("<div>").append(i.parseHTML(n)).find(u):n)}).complete(r&&function(n,t){f.each(r,s||[n.responseText,t,n])}),this},i.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(n,t){i.fn[t]=function(n){return this.on(t,n)}}),i.expr.filters.animated=function(n){return i.grep(i.timers,function(t){return n===t.elem}).length},wi=n.document.documentElement,i.offset={setOffset:function(n,t,r){var e,o,s,h,u,c,v,l=i.css(n,"position"),a=i(n),f={};"static"===l&&(n.style.position="relative");u=a.offset();s=i.css(n,"top");c=i.css(n,"left");v=("absolute"===l||"fixed"===l)&&(s+c).indexOf("auto")>-1;v?(e=a.position(),h=e.top,o=e.left):(h=parseFloat(s)||0,o=parseFloat(c)||0);i.isFunction(t)&&(t=t.call(n,r,u));null!=t.top&&(f.top=t.top-u.top+h);null!=t.left&&(f.left=t.left-u.left+o);"using"in t?t.using.call(n,f):a.css(f)}},i.fn.extend({offset:function(n){if(arguments.length)return void 0===n?this:this.each(function(t){i.offset.setOffset(this,n,t)});var r,f,t=this[0],u={top:0,left:0},e=t&&t.ownerDocument;if(e)return r=e.documentElement,i.contains(r,t)?(typeof t.getBoundingClientRect!==b&&(u=t.getBoundingClientRect()),f=ku(e),{top:u.top+f.pageYOffset-r.clientTop,left:u.left+f.pageXOffset-r.clientLeft}):u},position:function(){if(this[0]){var n,r,u=this[0],t={top:0,left:0};return"fixed"===i.css(u,"position")?r=u.getBoundingClientRect():(n=this.offsetParent(),r=this.offset(),i.nodeName(n[0],"html")||(t=n.offset()),t.top+=i.css(n[0],"borderTopWidth",!0),t.left+=i.css(n[0],"borderLeftWidth",!0)),{top:r.top-t.top-i.css(u,"marginTop",!0),left:r.left-t.left-i.css(u,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var n=this.offsetParent||wi;n&&!i.nodeName(n,"html")&&"static"===i.css(n,"position");)n=n.offsetParent;return n||wi})}}),i.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,r){var u="pageYOffset"===r;i.fn[t]=function(i){return l(this,function(t,i,f){var e=ku(t);return void 0===f?e?e[r]:t[i]:void(e?e.scrollTo(u?n.pageXOffset:f,u?f:n.pageYOffset):t[i]=f)},t,i,arguments.length,null)}}),i.each(["top","left"],function(n,t){i.cssHooks[t]=br(f.pixelPosition,function(n,r){if(r)return(r=it(n,t),hi.test(r)?i(n).position()[t]+"px":r)})}),i.each({Height:"height",Width:"width"},function(n,t){i.each({padding:"inner"+n,content:t,"":"outer"+n},function(r,u){i.fn[u]=function(u,f){var e=arguments.length&&(r||"boolean"!=typeof u),o=r||(u===!0||f===!0?"margin":"border");return l(this,function(t,r,u){var f;return i.isWindow(t)?t.document.documentElement["client"+n]:9===t.nodeType?(f=t.documentElement,Math.max(t.body["scroll"+n],f["scroll"+n],t.body["offset"+n],f["offset"+n],f["client"+n])):void 0===u?i.css(t,r,o):i.style(t,r,u,o)},t,e?u:void 0,e,null)}})}),i.fn.size=function(){return this.length},i.fn.andSelf=i.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return i}),du=n.jQuery,gu=n.$,i.noConflict=function(t){return n.$===i&&(n.$=gu),t&&n.jQuery===i&&(n.jQuery=du),i},typeof t===b&&(n.jQuery=n.$=i),i});jQuery.migrateMute===void 0&&(jQuery.migrateMute=!0),function(n,t,i){function r(i){var r=t.console;o[i]||(o[i]=!0,n.migrateWarnings.push(i),r&&r.warn&&!n.migrateMute&&(r.warn("JQMIGRATE: "+i),n.migrateTrace&&r.trace&&r.trace()))}function e(t,u,f,e){if(Object.defineProperty)try{return Object.defineProperty(t,u,{configurable:!0,enumerable:!0,get:function(){return r(e),f},set:function(n){r(e);f=n}}),i}catch(o){}n._definePropertyBroken=!0;t[u]=f}var o={},l,a,v;n.migrateWarnings=[];!n.migrateMute&&t.console&&t.console.log&&t.console.log("JQMIGRATE: Logging is active");n.migrateTrace===i&&(n.migrateTrace=!0);n.migrateReset=function(){o={};n.migrateWarnings.length=0};"BackCompat"===document.compatMode&&r("jQuery is not compatible with Quirks Mode");var s=n("<input/>",{size:1}).attr("size")&&n.attrFn,h=n.attr,g=n.attrHooks.value&&n.attrHooks.value.get||function(){return null},nt=n.attrHooks.value&&n.attrHooks.value.set||function(){return i},tt=/^(?:input|button)$/i,it=/^[238]$/,rt=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,ut=/^(?:checked|selected)$/i;e(n,"attrFn",s||{},"jQuery.attrFn is deprecated");n.attr=function(t,u,f,e){var o=u.toLowerCase(),c=t&&t.nodeType;return e&&(4>h.length&&r("jQuery.fn.attr( props, pass ) is deprecated"),t&&!it.test(c)&&(s?u in s:n.isFunction(n.fn[u])))?n(t)[u](f):("type"===u&&f!==i&&tt.test(t.nodeName)&&t.parentNode&&r("Can't change the 'type' of an input or button in IE 6/7/8"),!n.attrHooks[o]&&rt.test(o)&&(n.attrHooks[o]={get:function(t,r){var u,f=n.prop(t,r);return f===!0||"boolean"!=typeof f&&(u=t.getAttributeNode(r))&&u.nodeValue!==!1?r.toLowerCase():i},set:function(t,i,r){var u;return i===!1?n.removeAttr(t,r):(u=n.propFix[r]||r,u in t&&(t[u]=!0),t.setAttribute(r,r.toLowerCase())),r}},ut.test(o)&&r("jQuery.fn.attr('"+o+"') may use property instead of attribute")),h.call(n,t,u,f))};n.attrHooks.value={get:function(n,t){var i=(n.nodeName||"").toLowerCase();return"button"===i?g.apply(this,arguments):("input"!==i&&"option"!==i&&r("jQuery.fn.attr('value') no longer gets properties"),t in n?n.value:null)},set:function(n,t){var u=(n.nodeName||"").toLowerCase();return"button"===u?nt.apply(this,arguments):("input"!==u&&"option"!==u&&r("jQuery.fn.attr('value', val) no longer sets properties"),n.value=t,i)}};var f,u,c=n.fn.init,ft=n.parseJSON,et=/^([^<]*)(<[\w\W]+>)([^>]*)$/;n.fn.init=function(t,i,u){var f;return t&&"string"==typeof t&&!n.isPlainObject(i)&&(f=et.exec(n.trim(t)))&&f[0]&&("<"!==t.charAt(0)&&r("$(html) HTML strings must start with '<' character"),f[3]&&r("$(html) HTML text after last tag is ignored"),"#"===f[0].charAt(0)&&(r("HTML string cannot start with a '#' character"),n.error("JQMIGRATE: Invalid selector string (XSS)")),i&&i.context&&(i=i.context),n.parseHTML)?c.call(this,n.parseHTML(f[2],i,!0),i,u):c.apply(this,arguments)};n.fn.init.prototype=n.fn;n.parseJSON=function(n){return n||null===n?ft.apply(this,arguments):(r("jQuery.parseJSON requires a valid JSON string"),null)};n.uaMatch=function(n){n=n.toLowerCase();var t=/(chrome)[ \/]([\w.]+)/.exec(n)||/(webkit)[ \/]([\w.]+)/.exec(n)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(n)||/(msie) ([\w.]+)/.exec(n)||0>n.indexOf("compatible")&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(n)||[];return{browser:t[1]||"",version:t[2]||"0"}};n.browser||(f=n.uaMatch(navigator.userAgent),u={},f.browser&&(u[f.browser]=!0,u.version=f.version),u.chrome?u.webkit=!0:u.webkit&&(u.safari=!0),n.browser=u);e(n,"browser",n.browser,"jQuery.browser is deprecated");n.sub=function(){function t(n,i){return new t.fn.init(n,i)}n.extend(!0,t,this);t.superclass=this;t.fn=t.prototype=this();t.fn.constructor=t;t.sub=this.sub;t.fn.init=function(r,u){return u&&u instanceof n&&!(u instanceof t)&&(u=t(u)),n.fn.init.call(this,r,u,i)};t.fn.init.prototype=t.fn;var i=t(document);return r("jQuery.sub() is deprecated"),t};n.ajaxSetup({converters:{"text json":n.parseJSON}});l=n.fn.data;n.fn.data=function(t){var f,u,e=this[0];return!e||"events"!==t||1!==arguments.length||(f=n.data(e,t),u=n._data(e,t),f!==i&&f!==u||u===i)?l.apply(this,arguments):(r("Use of jQuery.fn.data('events') is deprecated"),u)};a=/\/(java|ecma)script/i;v=n.fn.andSelf||n.fn.addBack;n.fn.andSelf=function(){return r("jQuery.fn.andSelf() replaced by jQuery.fn.addBack()"),v.apply(this,arguments)};n.clean||(n.clean=function(t,u,f,e){u=u||document;u=!u.nodeType&&u[0]||u;u=u.ownerDocument||u;r("jQuery.clean() is deprecated");var s,o,c,l,h=[];if(n.merge(h,n.buildFragment(t,u).childNodes),f)for(c=function(n){return!n.type||a.test(n.type)?e?e.push(n.parentNode?n.parentNode.removeChild(n):n):f.appendChild(n):i},s=0;null!=(o=h[s]);s++)n.nodeName(o,"script")&&c(o)||(f.appendChild(o),o.getElementsByTagName!==i&&(l=n.grep(n.merge([],o.getElementsByTagName("script")),c),h.splice.apply(h,[s+1,0].concat(l)),s+=l.length));return h});var ot=n.event.add,st=n.event.remove,ht=n.event.trigger,ct=n.fn.toggle,y=n.fn.live,p=n.fn.die,w="ajaxStart|ajaxStop|ajaxSend|ajaxComplete|ajaxError|ajaxSuccess",b=RegExp("\\b(?:"+w+")\\b"),k=/(?:^|\s)hover(\.\S+|)\b/,d=function(t){return"string"!=typeof t||n.event.special.hover?t:(k.test(t)&&r("'hover' pseudo-event is deprecated, use 'mouseenter mouseleave'"),t&&t.replace(k,"mouseenter$1 mouseleave$1"))};n.event.props&&"attrChange"!==n.event.props[0]&&n.event.props.unshift("attrChange","attrName","relatedNode","srcElement");n.event.dispatch&&e(n.event,"handle",n.event.dispatch,"jQuery.event.handle is undocumented and deprecated");n.event.add=function(n,t,i,u,f){n!==document&&b.test(t)&&r("AJAX events should be attached to document: "+t);ot.call(this,n,d(t||""),i,u,f)};n.event.remove=function(n,t,i,r,u){st.call(this,n,d(t)||"",i,r,u)};n.fn.error=function(){var n=Array.prototype.slice.call(arguments,0);return r("jQuery.fn.error() is deprecated"),n.splice(0,0,"error"),arguments.length?this.bind.apply(this,n):(this.triggerHandler.apply(this,n),this)};n.fn.toggle=function(t,i){if(!n.isFunction(t)||!n.isFunction(i))return ct.apply(this,arguments);r("jQuery.fn.toggle(handler, handler...) is deprecated");var u=arguments,e=t.guid||n.guid++,f=0,o=function(i){var r=(n._data(this,"lastToggle"+t.guid)||0)%f;return n._data(this,"lastToggle"+t.guid,r+1),i.preventDefault(),u[r].apply(this,arguments)||!1};for(o.guid=e;u.length>f;)u[f++].guid=e;return this.click(o)};n.fn.live=function(t,i,u){return r("jQuery.fn.live() is deprecated"),y?y.apply(this,arguments):(n(this.context).on(t,this.selector,i,u),this)};n.fn.die=function(t,i){return r("jQuery.fn.die() is deprecated"),p?p.apply(this,arguments):(n(this.context).off(t,this.selector||"**",i),this)};n.event.trigger=function(n,t,i,u){return i||b.test(n)||r("Global events are undocumented and deprecated"),ht.call(this,n,t,i||document,u)};n.each(w.split("|"),function(t,i){n.event.special[i]={setup:function(){var t=this;return t!==document&&(n.event.add(document,i+"."+n.guid,function(){n.event.trigger(i,null,t,!0)}),n._data(this,i,n.guid++)),!1},teardown:function(){return this!==document&&n.event.remove(document,i+"."+n._data(this,i)),!1}}})}(jQuery,window);window.Modernizr=function(n,t,i){function f(n,t){var i=n.charAt(0).toUpperCase()+n.substr(1),r=(n+" "+k.join(i+" ")+i).split(" ");return c(r,t)}function c(n,t){for(var r in n)if(e[n[r]]!==i)return t=="pfx"?n[r]:!0;return!1}function l(n,t){return!!~(""+n).indexOf(t)}function p(n,t){return typeof n===t}function tt(n,t){return s(o.join(n+";")+(t||""))}function s(n){e.cssText=n}var u={},h=t.documentElement,ut=t.head||t.getElementsByTagName("head")[0],a="modernizr",b=t.createElement(a),e=b.style,it,ft=Object.prototype.toString,o=" -webkit- -moz- -o- -ms- -khtml- ".split(" "),k="Webkit Moz O ms Khtml".split(" "),r={},d=[],g=function(n,i,r,u){var o,s,e,f=t.createElement("div");if(parseInt(r,10))while(r--)e=t.createElement("div"),e.id=u?u[r]:a+(r+1),f.appendChild(e);return o=["&shy;","<style>",n,"<\/style>"].join(""),f.id=a,f.innerHTML+=o,h.appendChild(f),s=i(f,n),f.parentNode.removeChild(f),!!s},v,w={}.hasOwnProperty,nt,rt,y;nt=!p(w,i)&&!p(w.call,i)?function(n,t){return w.call(n,t)}:function(n,t){return t in n&&p(n.constructor.prototype[t],i)};rt=function(n,i){var f=n.join(""),r=i.length;g(f,function(n,i){for(var f=t.styleSheets[t.styleSheets.length-1],o=f.cssRules&&f.cssRules[0]?f.cssRules[0].cssText:f.cssText||"",s=n.childNodes,e={};r--;)e[s[r].id]=s[r];u.csstransforms3d=e.csstransforms3d.offsetLeft===9;u.generatedcontent=e.generatedcontent.offsetHeight>=1;u.fontface=/src/i.test(o)&&o.indexOf(i.split(" ")[0])===0},r,i)}(['@font-face {font-family:"font";src:url("https://")}',["@media (",o.join("transform-3d),("),a,")","{#csstransforms3d{left:9px;position:absolute}}"].join(""),'#generatedcontent:after{content:":)";visibility:hidden}'],["fontface","csstransforms3d","generatedcontent"]);r.flexbox=function(){function u(n,t,i,r){n.style.cssText=o.join(t+":"+i+";")+(r||"")}function f(n,t,i,r){t+=":";n.style.cssText=(t+o.join(i+";"+t)).slice(0,-t.length)+(r||"")}var n=t.createElement("div"),i=t.createElement("div"),r;return f(n,"display","box","width:42px;padding:0;"),u(i,"box-flex","1","width:10px;"),n.appendChild(i),h.appendChild(n),r=i.offsetWidth===42,n.removeChild(i),h.removeChild(n),r};r.rgba=function(){return s("background-color:rgba(150,255,150,.5)"),l(e.backgroundColor,"rgba")};r.hsla=function(){return s("background-color:hsla(120,40%,100%,.5)"),l(e.backgroundColor,"rgba")||l(e.backgroundColor,"hsla")};r.multiplebgs=function(){return s("background:url(https://),url(https://),red url(https://)"),/(url\s*\(.*?){3}/.test(e.background)};r.backgroundsize=function(){return f("backgroundSize")};r.borderimage=function(){return f("borderImage")};r.borderradius=function(){return f("borderRadius")};r.boxshadow=function(){return f("boxShadow")};r.textshadow=function(){return t.createElement("div").style.textShadow===""};r.opacity=function(){return tt("opacity:.55"),/^0.55$/.test(e.opacity)};r.cssanimations=function(){return f("animationName")};r.csscolumns=function(){return f("columnCount")};r.cssgradients=function(){var n="background-image:";return s((n+o.join("gradient(linear,left top,right bottom,from(#9f9),to(white));"+n)+o.join("linear-gradient(left top,#9f9, white);"+n)).slice(0,-n.length)),l(e.backgroundImage,"gradient")};r.cssreflections=function(){return f("boxReflect")};r.csstransforms=function(){return!!c(["transformProperty","WebkitTransform","MozTransform","OTransform","msTransform"])};r.csstransforms3d=function(){var n=!!c(["perspectiveProperty","WebkitPerspective","MozPerspective","OPerspective","msPerspective"]);return n&&"webkitPerspective"in h.style&&(n=u.csstransforms3d),n};r.csstransitions=function(){return f("transitionProperty")};r.fontface=function(){return u.fontface};r.generatedcontent=function(){return u.generatedcontent};for(y in r)nt(r,y)&&(v=y.toLowerCase(),u[v]=r[y](),d.push((u[v]?"":"no-")+v));return s(""),b=it=null,n.attachEvent&&function(){var n=t.createElement("div");return n.innerHTML="<elem><\/elem>",n.childNodes.length!==1}()&&function(n,t){function c(n){for(var t=-1;++t<l;)n.createElement(s[t])}n.iepp=n.iepp||{};var r=n.iepp,o=r.html5elements||"abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",s=o.split("|"),l=s.length,y=new RegExp("(^|\\s)("+o+")","gi"),p=new RegExp("<(/*)("+o+")","gi"),w=/^\s*[\{\}]\s*$/,b=new RegExp("(^|[^\\n]*?\\s)("+o+")([^\\n]*)({[\\n\\w\\W]*?})","gi"),a=t.createDocumentFragment(),h=t.documentElement,v=h.firstChild,f=t.createElement("body"),e=t.createElement("style"),k=/print|all/,u;r.getCSS=function(n,t){if(n+""===i)return"";for(var f=-1,o=n.length,u,e=[];++f<o;)(u=n[f],u.disabled)||(t=u.media||t,k.test(t)&&e.push(r.getCSS(u.imports,t),u.cssText),t="all");return e.join("")};r.parseCSS=function(n){for(var i=[],t;(t=b.exec(n))!=null;)i.push(((w.exec(t[1])?"\n":t[1])+t[2]+t[3]).replace(y,"$1.iepp_$2")+t[4]);return i.join("\n")};r.writeHTML=function(){var n=-1;for(u=u||t.body;++n<l;)for(var i=t.getElementsByTagName(s[n]),e=i.length,r=-1;++r<e;)i[r].className.indexOf("iepp_")<0&&(i[r].className+=" iepp_"+s[n]);a.appendChild(u);h.appendChild(f);f.className=u.className;f.id=u.id;f.innerHTML=u.innerHTML.replace(p,"<$1font")};r._beforePrint=function(){e.styleSheet.cssText=r.parseCSS(r.getCSS(t.styleSheets,"all"));r.writeHTML()};r.restoreHTML=function(){f.innerHTML="";h.removeChild(f);h.appendChild(u)};r._afterPrint=function(){r.restoreHTML();e.styleSheet.cssText=""};c(t);c(a);r.disablePP||(v.insertBefore(e,v.firstChild),e.media="print",e.className="iepp-printshim",n.attachEvent("onbeforeprint",r._beforePrint),n.attachEvent("onafterprint",r._afterPrint))}(n,t),u._version="2.0.6",u._prefixes=o,u._domPrefixes=k,u.testProp=function(n){return c([n])},u.testAllProps=f,u.testStyles=g,h.className=h.className.replace(/\bno-js\b/,"")+(" js "+d.join(" ")),u}(this,this.document),function(n,t,i){function g(n){return!n||n=="loaded"||n=="complete"}function r(){for(var t=1,n=-1;e.length-++n;)if(e[n].s&&!(t=e[n].r))break;t&&v()}function ft(n){var i=t.createElement("script"),e;i.src=n.s;i.onreadystatechange=i.onload=function(){!e&&g(i.readyState)&&(e=1,r(),i.onload=i.onreadystatechange=null)};f(function(){e||(e=1,r())},u.errorTimeout);n.e?i.onload():o.parentNode.insertBefore(i,o)}function et(n){var i=t.createElement("link"),e,s;i.href=n.s;i.rel="stylesheet";i.type="text/css";!n.e&&(w||c)?(s=function(n){f(function(){if(!e)try{n.sheet.cssRules.length?(e=1,r()):s(n)}catch(t){t.code==1e3||t.message=="security"||t.message=="denied"?(e=1,f(function(){r()},0)):s(n)}},0)},s(i)):(i.onload=function(){e||(e=1,f(function(){r()},0))},n.e&&i.onload());f(function(){e||(e=1,r())},u.errorTimeout);n.e||o.parentNode.insertBefore(i,o)}function v(){var n=e.shift();h=1;n?n.t?f(function(){n.t=="c"?et(n):ft(n)},0):(n(),r()):h=0}function ot(n,i,s,c,a,y){function d(){!k&&g(w.readyState)&&(b.r=k=1,!h&&r(),w.onload=w.onreadystatechange=null,f(function(){p.removeChild(w)},0))}var w=t.createElement(n),k=0,b={t:s,s:i,e:y};w.src=w.data=i;!l&&(w.style.display="none");w.width=w.height="0";n!="object"&&(w.type=s);w.onload=w.onreadystatechange=d;n=="img"?w.onerror=d:n=="script"&&(w.onerror=function(){b.e=b.r=1;v()});e.splice(c,0,b);p.insertBefore(w,l?null:o);f(function(){k||(p.removeChild(w),b.r=b.e=k=1,r())},u.errorTimeout)}function st(n,t,i){var r=t=="c"?lt:tt;return h=0,t=t||"j",a(n)?ot(r,n,t,this.i++,s,i):(e.splice(this.i++,0,n),e.length==1&&v()),this}function nt(){var n=u;return n.loader={load:st,i:0},n}var s=t.documentElement,f=n.setTimeout,o=t.getElementsByTagName("script")[0],y={}.toString,e=[],h=0,c="MozAppearance"in s.style,l=c&&!!t.createRange().compareNode,at=c&&!l,p=l?s:o.parentNode,ht=n.opera&&y.call(n.opera)=="[object Opera]",w="webkitAppearance"in s.style,ct=w&&"async"in t.createElement("script"),tt=c?"object":ht||ct?"img":"script",lt=w?"img":tt,it=Array.isArray||function(n){return y.call(n)=="[object Array]"},b=function(n){return Object(n)===n},a=function(n){return typeof n=="string"},k=function(n){return y.call(n)=="[object Function]"},d=[],rt={},ut,u;u=function(n){function s(n){for(var r=n.split("!"),e=d.length,f=r.pop(),o=r.length,i={url:f,origUrl:f,prefixes:r},u,t=0;t<o;t++)u=rt[r[t]],u&&(i=u(i));for(t=0;t<e;t++)i=d[t](i);return i}function r(n,t,r,u,f){var e=s(n),o=e.autoCallback;if(!e.bypass){if(t&&(t=k(t)?t:t[n]||t[u]||t[n.split("/").pop().split("?")[0]]),e.instead)return e.instead(n,t,r,u,f);r.load(e.url,e.forceCSS||!e.forceJS&&/css$/.test(e.url)?"c":i,e.noexec);(k(t)||k(o))&&r.load(function(){nt();t&&t(e.origUrl,f,u);o&&o(e.origUrl,f,u)})}}function o(n,t){function f(n){if(a(n))r(n,e,t,0,u);else if(b(n))for(i in n)n.hasOwnProperty(i)&&r(n[i],e,t,i,u)}var u=!!n.test,o=u?n.yep:n.nope,s=n.load||n.both,e=n.callback,i;f(o);f(s);n.complete&&t.load(n.complete)}var f,t,e=this.yepnope.loader;if(a(n))r(n,0,e,0);else if(it(n))for(f=0;f<n.length;f++)t=n[f],a(t)?r(t,0,e,0):it(t)?u(t):b(t)&&o(t,e);else b(n)&&o(n,e)};u.addPrefix=function(n,t){rt[n]=t};u.addFilter=function(n){d.push(n)};u.errorTimeout=1e4;t.readyState==null&&t.addEventListener&&(t.readyState="loading",t.addEventListener("DOMContentLoaded",ut=function(){t.removeEventListener("DOMContentLoaded",ut,0);t.readyState="complete"},0));n.yepnope=nt()}(this,this.document);Modernizr.load=function(){yepnope.apply(window,[].slice.call(arguments,0))},function(n,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):n.Popper=t()}(this,function(){"use strict";function et(n){return n&&"[object Function]"==={}.toString.call(n)}function r(n,t){if(1!==n.nodeType)return[];var i=getComputedStyle(n,null);return t?i[t]:i}function p(n){return"HTML"===n.nodeName?n:n.parentNode||n.host}function s(n){if(!n)return document.body;switch(n.nodeName){case"HTML":case"BODY":return n.ownerDocument.body;case"#document":return n.body}var t=r(n),i=t.overflow,u=t.overflowX,f=t.overflowY;return/(auto|scroll|overlay)/.test(i+f+u)?n:s(p(n))}function u(n){return 11===n?ui:10===n?fi:ui||fi}function f(n){var e,t,i;if(!n)return document.documentElement;for(e=u(10)?document.body:null,t=n.offsetParent;t===e&&n.nextElementSibling;)t=(n=n.nextElementSibling).offsetParent;return i=t&&t.nodeName,i&&"BODY"!==i&&"HTML"!==i?-1!==["TD","TABLE"].indexOf(t.nodeName)&&"static"===r(t,"position")?f(t):t:n?n.ownerDocument.documentElement:document.documentElement}function oi(n){var t=n.nodeName;return"BODY"!==t&&("HTML"===t||f(n.firstElementChild)===n)}function w(n){return null===n.parentNode?n:w(n.parentNode)}function c(n,t){var i,u;if(!n||!n.nodeType||!t||!t.nodeType)return document.documentElement;var e=n.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,o=e?n:t,s=e?t:n,r=document.createRange();return(r.setStart(o,0),r.setEnd(s,0),i=r.commonAncestorContainer,n!==i&&t!==i||o.contains(s))?oi(i)?i:f(i):(u=w(n),u.host?c(u.host,t):c(n,w(t).host))}function e(n){var f=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"top",t="top"===f?"scrollTop":"scrollLeft",i=n.nodeName,r,u;return"BODY"===i||"HTML"===i?(r=n.ownerDocument.documentElement,u=n.ownerDocument.scrollingElement||r,u[t]):n[t]}function si(n,t){var f=2<arguments.length&&void 0!==arguments[2]&&arguments[2],r=e(t,"top"),u=e(t,"left"),i=f?-1:1;return n.top+=r*i,n.bottom+=r*i,n.left+=u*i,n.right+=u*i,n}function ot(n,t){var i="x"===t?"Left":"Top",r="Left"==i?"Right":"Bottom";return parseFloat(n["border"+i+"Width"],10)+parseFloat(n["border"+r+"Width"],10)}function st(n,i,r,f){return t(i["offset"+n],i["scroll"+n],r["client"+n],r["offset"+n],r["scroll"+n],u(10)?r["offset"+n]+f["margin"+("Height"===n?"Top":"Left")]+f["margin"+("Height"===n?"Bottom":"Right")]:0)}function ht(){var t=document.body,n=document.documentElement,i=u(10)&&getComputedStyle(n);return{height:st("Height",t,n,i),width:st("Width",t,n,i)}}function i(t){return n({},t,{right:t.left+t.width,bottom:t.top+t.height})}function b(n){var t={},o,s,l;try{u(10)?(t=n.getBoundingClientRect(),o=e(n,"top"),s=e(n,"left"),t.top+=o,t.left+=s,t.bottom+=o,t.right+=s):t=n.getBoundingClientRect()}catch(r){}var f={left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top},a="HTML"===n.nodeName?ht():{},v=a.width||n.clientWidth||f.right-f.left,y=a.height||n.clientHeight||f.bottom-f.top,h=n.offsetWidth-v,c=n.offsetHeight-y;return(h||c)&&(l=r(n),h-=ot(l,"x"),c-=ot(l,"y"),f.width-=h,f.height-=c),i(f)}function k(n,f){var w=2<arguments.length&&void 0!==arguments[2]&&arguments[2],k=u(10),d="HTML"===f.nodeName,h=b(n),o=b(f),v=s(n),c=r(f),y=parseFloat(c.borderTopWidth,10),p=parseFloat(c.borderLeftWidth,10),e,l,a;return w&&"HTML"===f.nodeName&&(o.top=t(o.top,0),o.left=t(o.left,0)),e=i({top:h.top-o.top-y,left:h.left-o.left-p,width:h.width,height:h.height}),(e.marginTop=0,e.marginLeft=0,!k&&d)&&(l=parseFloat(c.marginTop,10),a=parseFloat(c.marginLeft,10),e.top-=y-l,e.bottom-=y-l,e.left-=p-a,e.right-=p-a,e.marginTop=l,e.marginLeft=a),(k&&!w?f.contains(v):f===v&&"BODY"!==v.nodeName)&&(e=si(e,f)),e}function hi(n){var f=1<arguments.length&&void 0!==arguments[1]&&arguments[1],r=n.ownerDocument.documentElement,u=k(n,r),o=t(r.clientWidth,window.innerWidth||0),s=t(r.clientHeight,window.innerHeight||0),h=f?0:e(r),c=f?0:e(r,"left"),l={top:h-u.top+u.marginTop,left:c-u.left+u.marginLeft,width:o,height:s};return i(l)}function ct(n){var t=n.nodeName;return"BODY"===t||"HTML"===t?!1:"fixed"===r(n,"position")||ct(p(n))}function lt(n){if(!n||!n.parentElement||u())return document.documentElement;for(var t=n.parentElement;t&&"none"===r(t,"transform");)t=t.parentElement;return t||document.documentElement}function d(n,t,i,r){var o=4<arguments.length&&void 0!==arguments[4]&&arguments[4],u={top:0,left:0},h=o?lt(n):c(n,t),e,f;if("viewport"===r)u=hi(h,o);else if("scrollParent"===r?(e=s(p(t)),"BODY"===e.nodeName&&(e=n.ownerDocument.documentElement)):e="window"===r?n.ownerDocument.documentElement:r,f=k(e,h,o),"HTML"!==e.nodeName||ct(h))u=f;else{var l=ht(),a=l.height,v=l.width;u.top+=f.top-f.marginTop;u.bottom=a+f.top;u.left+=f.left-f.marginLeft;u.right=v+f.left}return u.left+=i,u.top+=i,u.right-=i,u.bottom-=i,u}function ci(n){var t=n.width,i=n.height;return t*i}function at(t,i,r,u,f){var l=5<arguments.length&&void 0!==arguments[5]?arguments[5]:0;if(-1===t.indexOf("auto"))return t;var e=d(r,u,l,f),o={top:{width:e.width,height:i.top-e.top},right:{width:e.right-i.right,height:e.height},bottom:{width:e.width,height:e.bottom-i.bottom},left:{width:i.left-e.left,height:e.height}},s=Object.keys(o).map(function(t){return n({key:t},o[t],{area:ci(o[t])})}).sort(function(n,t){return t.area-n.area}),h=s.filter(function(n){var t=n.width,i=n.height;return t>=r.clientWidth&&i>=r.clientHeight}),a=0<h.length?h[0].key:s[0].key,c=t.split("-")[1];return a+(c?"-"+c:"")}function vt(n,t,i){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null,u=r?lt(t):c(t,i);return k(i,u,r)}function yt(n){var t=getComputedStyle(n),i=parseFloat(t.marginTop)+parseFloat(t.marginBottom),r=parseFloat(t.marginLeft)+parseFloat(t.marginRight);return{width:n.offsetWidth+r,height:n.offsetHeight+i}}function l(n){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return n.replace(/left|right|bottom|top/g,function(n){return t[n]})}function pt(n,t,i){i=i.split("-")[0];var r=yt(n),e={width:r.width,height:r.height},u=-1!==["right","left"].indexOf(i),o=u?"top":"left",f=u?"left":"top",s=u?"height":"width",h=u?"width":"height";return e[o]=t[o]+t[s]/2-r[s]/2,e[f]=i===f?t[f]-r[h]:t[l(f)],e}function h(n,t){return Array.prototype.find?n.find(t):n.filter(t)[0]}function li(n,t,i){if(Array.prototype.findIndex)return n.findIndex(function(n){return n[t]===i});var r=h(n,function(n){return n[t]===i});return n.indexOf(r)}function wt(n,t,r){var u=void 0===r?n:n.slice(0,li(n,"name",r));return u.forEach(function(n){n["function"]&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var r=n["function"]||n.fn;n.enabled&&et(r)&&(t.offsets.popper=i(t.offsets.popper),t.offsets.reference=i(t.offsets.reference),t=r(t,n))}),t}function ai(){if(!this.state.isDestroyed){var n={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};n.offsets.reference=vt(this.state,this.popper,this.reference,this.options.positionFixed);n.placement=at(this.options.placement,n.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding);n.originalPlacement=n.placement;n.positionFixed=this.options.positionFixed;n.offsets.popper=pt(this.popper,n.offsets.reference,n.placement);n.offsets.popper.position=this.options.positionFixed?"fixed":"absolute";n=wt(this.modifiers,n);this.state.isCreated?this.options.onUpdate(n):(this.state.isCreated=!0,this.options.onCreate(n))}}function bt(n,t){return n.some(function(n){var i=n.name,r=n.enabled;return r&&i===t})}function g(n){for(var i,r,u=[!1,"ms","Webkit","Moz","O"],f=n.charAt(0).toUpperCase()+n.slice(1),t=0;t<u.length;t++)if(i=u[t],r=i?""+i+f:n,"undefined"!=typeof document.body.style[r])return r;return null}function vi(){return this.state.isDestroyed=!0,bt(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[g("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function kt(n){var t=n.ownerDocument;return t?t.defaultView:window}function dt(n,t,i,r){var f="BODY"===n.nodeName,u=f?n.ownerDocument.defaultView:n;u.addEventListener(t,i,{passive:!0});f||dt(s(u.parentNode),t,i,r);r.push(u)}function yi(n,t,i,r){i.updateBound=r;kt(n).addEventListener("resize",i.updateBound,{passive:!0});var u=s(n);return dt(u,"scroll",i.updateBound,i.scrollParents),i.scrollElement=u,i.eventsEnabled=!0,i}function pi(){this.state.eventsEnabled||(this.state=yi(this.reference,this.options,this.state,this.scheduleUpdate))}function wi(n,t){return kt(n).removeEventListener("resize",t.updateBound),t.scrollParents.forEach(function(n){n.removeEventListener("scroll",t.updateBound)}),t.updateBound=null,t.scrollParents=[],t.scrollElement=null,t.eventsEnabled=!1,t}function bi(){this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=wi(this.reference,this.state))}function nt(n){return""!==n&&!isNaN(parseFloat(n))&&isFinite(n)}function tt(n,t){Object.keys(t).forEach(function(i){var r="";-1!==["width","height","top","right","bottom","left"].indexOf(i)&&nt(t[i])&&(r="px");n.style[i]=t[i]+r})}function ki(n,t){Object.keys(t).forEach(function(i){var r=t[i];!1===r?n.removeAttribute(i):n.setAttribute(i,t[i])})}function gt(n,t,i){var u=h(n,function(n){var i=n.name;return i===t}),f=!!u&&n.some(function(n){return n.name===i&&n.enabled&&n.order<u.order}),r;return f||(r="`"+t+"`",console.warn("`"+i+"` modifier is required by "+r+" modifier in order to work, be sure to include it before "+r+"!")),f}function di(n){return"end"===n?"start":"start"===n?"end":n}function ni(n){var r=1<arguments.length&&void 0!==arguments[1]&&arguments[1],t=ut.indexOf(n),i=ut.slice(t+1).concat(ut.slice(0,t));return r?i.reverse():i}function gi(n,r,u,f){var h=n.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),o=+h[1],e=h[2],s,c,l;if(!o)return n;if(0===e.indexOf("%")){switch(e){case"%p":s=u;break;case"%":case"%r":default:s=f}return c=i(s),c[r]/100*o}return"vh"===e||"vw"===e?(l="vh"===e?t(document.documentElement.clientHeight,window.innerHeight||0):t(document.documentElement.clientWidth,window.innerWidth||0),l/100*o):o}function nr(n,t,i,r){var s=[0,0],c=-1!==["right","left"].indexOf(r),u=n.split(/(\+|\-)/).map(function(n){return n.trim()}),f=u.indexOf(h(u,function(n){return-1!==n.search(/,|\s/)})),o,e;return u[f]&&-1===u[f].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead."),o=/\s*,\s*|\s+/,e=-1===f?[u]:[u.slice(0,f).concat([u[f].split(o)[0]]),[u[f].split(o)[1]].concat(u.slice(f+1))],e=e.map(function(n,r){var f=(1===r?!c:c)?"height":"width",u=!1;return n.reduce(function(n,t){return""===n[n.length-1]&&-1!==["+","-"].indexOf(t)?(n[n.length-1]=t,u=!0,n):u?(n[n.length-1]+=t,u=!1,n):n.concat(t)},[]).map(function(n){return gi(n,f,t,i)})}),e.forEach(function(n,t){n.forEach(function(i,r){nt(i)&&(s[t]+=i*("-"===n[r-1]?-1:1))})}),s}function tr(n,t){var r,f=t.offset,o=n.placement,e=n.offsets,i=e.popper,s=e.reference,u=o.split("-")[0];return r=nt(+f)?[+f,0]:nr(f,i,s,u),"left"===u?(i.top+=r[0],i.left-=r[1]):"right"===u?(i.top+=r[0],i.left+=r[1]):"top"===u?(i.left+=r[0],i.top-=r[1]):"bottom"===u&&(i.left+=r[0],i.top+=r[1]),n.popper=i,n}for(var ti=Math.min,it=Math.round,a=Math.floor,t=Math.max,v="undefined"!=typeof window&&"undefined"!=typeof document,ii=["Edge","Trident","Firefox"],ri=0,rt=0;rt<ii.length;rt+=1)if(v&&0<=navigator.userAgent.indexOf(ii[rt])){ri=1;break}var ir=v&&window.Promise,rr=ir?function(n){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then(function(){t=!1;n()}))}}:function(n){var t=!1;return function(){t||(t=!0,setTimeout(function(){t=!1;n()},ri))}},ui=v&&!!(window.MSInputMethodContext&&document.documentMode),fi=v&&/MSIE 10/.test(navigator.userAgent),ur=function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");},fr=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,i){return t in n?Object.defineProperty(n,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[t]=i,n},n=Object.assign||function(n){for(var t,r,i=1;i<arguments.length;i++)for(r in t=arguments[i],t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n},ei=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],ut=ei.slice(3),ft={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"},y=function(){function t(i,r){var u=this,f=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},e;ur(this,t);this.scheduleUpdate=function(){return requestAnimationFrame(u.update)};this.update=rr(this.update.bind(this));this.options=n({},t.Defaults,f);this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]};this.reference=i&&i.jquery?i[0]:i;this.popper=r&&r.jquery?r[0]:r;this.options.modifiers={};Object.keys(n({},t.Defaults.modifiers,f.modifiers)).forEach(function(i){u.options.modifiers[i]=n({},t.Defaults.modifiers[i]||{},f.modifiers?f.modifiers[i]:{})});this.modifiers=Object.keys(this.options.modifiers).map(function(t){return n({name:t},u.options.modifiers[t])}).sort(function(n,t){return n.order-t.order});this.modifiers.forEach(function(n){n.enabled&&et(n.onLoad)&&n.onLoad(u.reference,u.popper,u.options,n,u.state)});this.update();e=this.options.eventsEnabled;e&&this.enableEventListeners();this.state.eventsEnabled=e}return fr(t,[{key:"update",value:function(){return ai.call(this)}},{key:"destroy",value:function(){return vi.call(this)}},{key:"enableEventListeners",value:function(){return pi.call(this)}},{key:"disableEventListeners",value:function(){return bi.call(this)}}]),t}();return y.Utils=("undefined"==typeof window?global:window).PopperUtils,y.placements=ei,y.Defaults={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(t){var u=t.placement,l=u.split("-")[0],f=u.split("-")[1];if(f){var e=t.offsets,r=e.reference,s=e.popper,h=-1!==["bottom","top"].indexOf(l),i=h?"left":"top",c=h?"width":"height",a={start:o({},i,r[i]),end:o({},i,r[i]+r[c]-s[c])};t.offsets.popper=n({},s,a[f])}return t}},offset:{order:200,enabled:!0,fn:tr,offset:0},preventOverflow:{order:300,enabled:!0,fn:function(i,r){var h=r.boundariesElement||f(i.instance.popper),s;i.instance.reference===h&&(h=f(h));var c=g("transform"),e=i.instance.popper.style,l=e.top,a=e.left,v=e[c];e.top="";e.left="";e[c]="";s=d(i.instance.popper,i.instance.reference,r.padding,h,i.positionFixed);e.top=l;e.left=a;e[c]=v;r.boundaries=s;var y=r.priority,u=i.offsets.popper,p={primary:function(n){var i=u[n];return u[n]<s[n]&&!r.escapeWithReference&&(i=t(u[n],s[n])),o({},n,i)},secondary:function(n){var t="right"===n?"left":"top",i=u[t];return u[n]>s[n]&&!r.escapeWithReference&&(i=ti(u[t],s[n]-("right"===n?u.width:u.height))),o({},t,i)}};return y.forEach(function(t){var i=-1===["left","top"].indexOf(t)?"secondary":"primary";u=n({},u,p[i](t))}),i.offsets.popper=u,i},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(n){var o=n.offsets,u=o.popper,i=o.reference,s=n.placement.split("-")[0],r=a,f=-1!==["top","bottom"].indexOf(s),e=f?"right":"bottom",t=f?"left":"top",h=f?"width":"height";return u[e]<r(i[t])&&(n.offsets.popper[t]=r(i[t])-u[h]),u[t]>r(i[e])&&(n.offsets.popper[t]=r(i[e])),n}},arrow:{order:500,enabled:!0,fn:function(n,u){var l,e;if(!gt(n.instance.modifiers,"arrow","keepTogether"))return n;if(e=u.element,"string"==typeof e){if(e=n.instance.popper.querySelector(e),!e)return n}else if(!n.instance.popper.contains(e))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),n;var d=n.placement.split("-")[0],b=n.offsets,c=b.popper,s=b.reference,a=-1!==["left","right"].indexOf(d),y=a?"height":"width",p=a?"Top":"Left",f=p.toLowerCase(),g=a?"left":"top",v=a?"bottom":"right",h=yt(e)[y];s[v]-h<c[f]&&(n.offsets.popper[f]-=c[f]-(s[v]-h));s[f]+h>c[v]&&(n.offsets.popper[f]+=s[f]+h-c[v]);n.offsets.popper=i(n.offsets.popper);var nt=s[f]+s[y]/2-h/2,k=r(n.instance.popper),tt=parseFloat(k["margin"+p],10),rt=parseFloat(k["border"+p+"Width"],10),w=nt-n.offsets.popper[f]-tt-rt;return w=t(ti(c[y]-h,w),0),n.arrowElement=e,n.offsets.arrow=(l={},o(l,f,it(w)),o(l,g,""),l),n},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(t,i){if(bt(t.instance.modifiers,"inner")||t.flipped&&t.placement===t.originalPlacement)return t;var e=d(t.instance.popper,t.instance.reference,i.padding,i.boundariesElement,t.positionFixed),r=t.placement.split("-")[0],o=l(r),u=t.placement.split("-")[1]||"",f=[];switch(i.behavior){case ft.FLIP:f=[r,o];break;case ft.CLOCKWISE:f=ni(r);break;case ft.COUNTERCLOCKWISE:f=ni(r,!0);break;default:f=i.behavior}return f.forEach(function(s,h){if(r!==s||f.length===h+1)return t;r=t.placement.split("-")[0];o=l(r);var v=t.offsets.popper,y=t.offsets.reference,c=a,w="left"===r&&c(v.right)>c(y.left)||"right"===r&&c(v.left)<c(y.right)||"top"===r&&c(v.bottom)>c(y.top)||"bottom"===r&&c(v.top)<c(y.bottom),b=c(v.left)<c(e.left),k=c(v.right)>c(e.right),d=c(v.top)<c(e.top),g=c(v.bottom)>c(e.bottom),nt="left"===r&&b||"right"===r&&k||"top"===r&&d||"bottom"===r&&g,p=-1!==["top","bottom"].indexOf(r),tt=!!i.flipVariations&&(p&&"start"===u&&b||p&&"end"===u&&k||!p&&"start"===u&&d||!p&&"end"===u&&g);(w||nt||tt)&&(t.flipped=!0,(w||nt)&&(r=f[h+1]),tt&&(u=di(u)),t.placement=r+(u?"-"+u:""),t.offsets.popper=n({},t.offsets.popper,pt(t.instance.popper,t.offsets.reference,t.placement)),t=wt(t.instance.modifiers,t,"flip"))}),t},behavior:"flip",padding:5,boundariesElement:"viewport"},inner:{order:700,enabled:!1,fn:function(n){var u=n.placement,t=u.split("-")[0],f=n.offsets,r=f.popper,o=f.reference,e=-1!==["left","right"].indexOf(t),s=-1===["top","left"].indexOf(t);return r[e?"left":"top"]=o[t]-(s?r[e?"width":"height"]:0),n.placement=l(u),n.offsets.popper=i(r),n}},hide:{order:800,enabled:!0,fn:function(n){if(!gt(n.instance.modifiers,"hide","preventOverflow"))return n;var t=n.offsets.reference,i=h(n.instance.modifiers,function(n){return"preventOverflow"===n.name}).boundaries;if(t.bottom<i.top||t.left>i.right||t.top>i.bottom||t.right<i.left){if(!0===n.hide)return n;n.hide=!0;n.attributes["x-out-of-boundaries"]=""}else{if(!1===n.hide)return n;n.hide=!1;n.attributes["x-out-of-boundaries"]=!1}return n}},computeStyle:{order:850,enabled:!0,fn:function(t,i){var nt=i.x,tt=i.y,u=t.offsets.popper,c=h(t.instance.modifiers,function(n){return"applyStyle"===n.name}).gpuAcceleration,w,k,d;void 0!==c&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var l,v,rt=void 0===c?i.gpuAcceleration:c,ut=f(t.instance.popper),y=b(ut),r={position:u.position},s={left:a(u.left),top:it(u.top),bottom:it(u.bottom),right:a(u.right)},e="bottom"===nt?"top":"bottom",o="right"===tt?"left":"right",p=g("transform");return(v="bottom"==e?-y.height+s.bottom:s.top,l="right"==o?-y.width+s.right:s.left,rt&&p)?(r[p]="translate3d("+l+"px, "+v+"px, 0)",r[e]=0,r[o]=0,r.willChange="transform"):(w="bottom"==e?-1:1,k="right"==o?-1:1,r[e]=v*w,r[o]=l*k,r.willChange=e+", "+o),d={"x-placement":t.placement},t.attributes=n({},d,t.attributes),t.styles=n({},r,t.styles),t.arrowStyles=n({},t.offsets.arrow,t.arrowStyles),t},gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:function(n){return tt(n.instance.popper,n.styles),ki(n.instance.popper,n.attributes),n.arrowElement&&Object.keys(n.arrowStyles).length&&tt(n.arrowElement,n.arrowStyles),n},onLoad:function(n,t,i,r,u){var f=vt(u,t,n,i.positionFixed),e=at(i.placement,f,t,n,i.modifiers.flip.boundariesElement,i.modifiers.flip.padding);return t.setAttribute("x-placement",e),tt(t,{position:i.positionFixed?"fixed":"absolute"}),i},gpuAcceleration:void 0}}},y});!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("global/window"),require("global/document")):"function"==typeof define&&define.amd?define(["global/window","global/document"],t):(n=n||self).videojs=t(n.window,n.document)}(this,function(n,t){function ou(n,t){ob(n).forEach(function(i){return t(n[i],i)})}function b(n){for(var i=arguments.length,r=new Array(1<i?i-1:0),t=1;t<i;t++)r[t-1]=arguments[t];return Object.assign?Object.assign.apply(Object,[n].concat(r)):(r.forEach(function(t){t&&ou(t,function(t,i){n[i]=t})}),n)}function di(n){return!!n&&"object"==typeof n}function wf(n){return di(n)&&"[object Object]"===eb.call(n)&&n.constructor===Object}function ho(t,i){if(!t||!i||"function"!=typeof n.getComputedStyle)return"";var r=n.getComputedStyle(t);return r?r.getPropertyValue(i)||r[i]:""}function sb(n){return"string"==typeof n&&/\S/.test(n)}function hb(n){if(/\s/.test(n))throw new Error("class has illegal whitespace characters");}function su(){return t===n.document}function bf(n){return di(n)&&1===n.nodeType}function cb(){try{return n.parent!==n.self}catch(t){return!0}}function lb(n){return function(i,r){if(!sb(i))return t[n](null);sb(r)&&(r=t.querySelector(r));var u=bf(r)?r:t;return u[n]&&u[n](i)}}function nt(n,i,r,u){void 0===n&&(n="div");void 0===i&&(i={});void 0===r&&(r={});var f=t.createElement(n);return Object.getOwnPropertyNames(i).forEach(function(n){var t=i[n];-1!==n.indexOf("aria-")||"role"===n||"type"===n?(a.warn("Setting attributes in the second argument of createEl()\nhas been deprecated. Use the third argument instead.\ncreateEl(type, properties, attributes). Attempting to set "+n+" to "+t+"."),f.setAttribute(n,t)):"textContent"===n?hu(f,t):f[n]=t}),Object.getOwnPropertyNames(r).forEach(function(n){f.setAttribute(n,r[n])}),u&&dc(f,u),f}function hu(n,t){return"undefined"==typeof n.textContent?n.innerText=t:n.textContent=t,n}function wc(n,t){t.firstChild?t.insertBefore(n,t.firstChild):t.appendChild(n)}function sr(n,t){return hb(t),n.classList?n.classList.contains(t):function(n){return new RegExp("(^|\\s)"+n+"($|\\s)")}(t).test(n.className)}function yi(n,t){return n.classList?n.classList.add(t):sr(n,t)||(n.className=(n.className+" "+t).trim()),n}function kf(n,t){return n.classList?n.classList.remove(t):(hb(t),n.className=n.className.split(/\s+/).filter(function(n){return n!==t}).join(" ")),n}function ab(n,t,i){var r=sr(n,t);if("function"==typeof i&&(i=i(n,t)),"boolean"!=typeof i&&(i=!r),i!==r)return i?yi(n,t):kf(n,t),n}function vb(n,t){Object.getOwnPropertyNames(t).forEach(function(i){var r=t[i];null===r||"undefined"==typeof r||!1===r?n.removeAttribute(i):n.setAttribute(i,!0===r?"":r)})}function pi(n){var f={},i,t,r,u;if(n&&n.attributes&&0<n.attributes.length)for(i=n.attributes,t=i.length-1;0<=t;t--)r=i[t].name,u=i[t].value,"boolean"!=typeof n[r]&&-1===",autoplay,controls,playsinline,loop,muted,default,defaultMuted,".indexOf(","+r+",")||(u=null!==u),f[r]=u;return f}function yb(n,t){return n.getAttribute(t)}function df(n,t,i){n.setAttribute(t,i)}function co(n,t){n.removeAttribute(t)}function pb(){t.body.focus();t.onselectstart=function(){return!1}}function wb(){t.onselectstart=function(){return!0}}function gf(n){if(n&&n.getBoundingClientRect&&n.parentNode){var i=n.getBoundingClientRect(),t={};return["bottom","height","left","right","top","width"].forEach(function(n){void 0!==i[n]&&(t[n]=i[n])}),t.height||(t.height=parseFloat(ho(n,"height"))),t.width||(t.width=parseFloat(ho(n,"width"))),t}}function bb(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 bc(n,t){var i={},r=bb(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 kb(n){return di(n)&&3===n.nodeType}function kc(n){for(;n.firstChild;)n.removeChild(n.firstChild);return n}function db(n){return"function"==typeof n&&(n=n()),(Array.isArray(n)?n:[n]).map(function(n){return"function"==typeof n&&(n=n()),bf(n)||kb(n)?n:"string"==typeof n&&/\S/.test(n)?t.createTextNode(n):void 0}).filter(function(n){return n})}function dc(n,t){return db(t).forEach(function(t){return n.appendChild(t)}),n}function gb(n,t){return dc(kc(n),t)}function cu(n){return void 0===n.button&&void 0===n.buttons||0===n.button&&void 0===n.buttons||"mouseup"===n.type&&0===n.button&&0===n.buttons||0===n.button&&1===n.buttons}function hr(){return fst++}function ik(n,t){if(st.has(n)){var i=st.get(n);0===i.handlers[t].length&&(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);0===Object.getOwnPropertyNames(i).length&&st.delete(n)}}function gc(n,t,i,r){i.forEach(function(i){n(t,i,r)})}function lo(i){function o(){return!0}function s(){return!1}var r,u,f,e;if(!i||!i.isPropagationStopped){r=i||n.event;for(u in i={},r)"layerX"!==u&&"layerY"!==u&&"keyLocation"!==u&&"webkitMovementX"!==u&&"webkitMovementY"!==u&&("returnValue"===u&&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,null!==i.clientX&&void 0!==i.clientX)&&(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;null!==i.button&&void 0!==i.button&&(i.button=1&i.button?0:4&i.button?1:2&i.button?2:0)}return i}function kt(n,t,i){var r,u;if(Array.isArray(t))return gc(kt,n,t,i);st.has(n)||st.set(n,{});r=st.get(n);(r.handlers||(r.handlers={}),r.handlers[t]||(r.handlers[t]=[]),i.guid||(i.guid=hr()),r.handlers[t].push(i),r.dispatcher||(r.disabled=!1,r.dispatcher=function(t,i){var u;if(!r.disabled&&(t=lo(t),u=r.handlers[t.type],u))for(var e=u.slice(0),f=0,o=e.length;f<o&&!t.isImmediatePropagationStopped();f++)try{e[f].call(n,t,i)}catch(t){a.error(t)}}),1===r.handlers[t].length)&&(n.addEventListener?(u=!1,nl&&-1<rk.indexOf(t)&&(u={passive:!0}),n.addEventListener(t,r.dispatcher,u)):n.attachEvent&&n.attachEvent("on"+t,r.dispatcher))}function ut(n,t,i){var r,u,f,e;if(st.has(n)&&(r=st.get(n),r.handlers)){if(Array.isArray(t))return gc(ut,n,t,i);function o(n,t){r.handlers[t]=[];ik(n,t)}if(void 0!==t){if(u=r.handlers[t],u)if(i){if(i.guid)for(f=0;f<u.length;f++)u[f].guid===i.guid&&u.splice(f--,1);ik(n,t)}else o(n,t)}else for(e in r.handlers)Object.prototype.hasOwnProperty.call(r.handlers||{},e)&&o(n,e)}}function lu(n,t,i){var f=st.has(n)?st.get(n):{},r=n.parentNode||n.ownerDocument,u;return("string"==typeof t?t={type:t,target:n}:t.target||(t.target=n),t=lo(t),f.dispatcher&&f.dispatcher.call(n,t,i),r&&!t.isPropagationStopped()&&!0===t.bubbles)?lu.call(null,r,t,i):!r&&!t.defaultPrevented&&t.target&&t.target[t.type]&&(st.has(t.target)||st.set(t.target,{}),u=st.get(t.target),t.target[t.type]&&(u.disabled=!0,"function"==typeof t.target[t.type]&&t.target[t.type](),u.disabled=!1)),!t.defaultPrevented}function ne(n,t,i){function r(){ut(n,t,r);i.apply(this,arguments)}if(Array.isArray(t))return gc(ne,n,t,i);r.guid=i.guid=i.guid||hr();kt(n,t,r)}function uk(n,t,i){function r(){ut(n,t,r);i.apply(this,arguments)}r.guid=i.guid=i.guid||hr();kt(n,t,r)}function rl(t,i){i&&(tl=i);n.setTimeout(ost,t)}function fk(n){var i=t.createElement("style");return i.className=n,i}function ek(n,t){n.styleSheet?n.styleSheet.cssText=t:n.textContent=t}function c(n,t,i){t.guid||(t.guid=hr());var r=t.bind(n);return r.guid=i?i+"_"+t.guid:t.guid,r}function nr(t,i){var r=n.performance.now();return function(){var u=n.performance.now();i<=u-r&&(t.apply(void 0,arguments),r=u)}}function ht(){}function ok(n){return"string"==typeof n&&/\S/.test(n)||Array.isArray(n)&&!!n.length}function ul(n){if(!n.nodeName&&!tr(n))throw new Error("Invalid target; must be a DOM node or evented object.");}function sk(n){if(!ok(n))throw new Error("Invalid event type; must be a non-empty string or array.");}function hk(n){if("function"!=typeof n)throw new Error("Invalid listener; must be a function.");}function fl(n,t){var i,r,u,f=t.length<3||t[0]===n||t[0]===n.eventBusEl_;return u=f?(i=n.eventBusEl_,3<=t.length&&t.shift(),r=t[0],t[1]):(i=t[0],r=t[1],t[2]),ul(i),sk(r),hk(u),{isTargetingSelf:f,target:i,type:r,listener:u=c(n,u)}}function cr(n,t,i,r){ul(n);n.nodeName?est[t](n,i,r):n[t](i,r)}function el(t,i){void 0===i&&(i={});var r=i.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_=nt("span",{className:"vjs-event-bus"});return b(t,ck),t.eventedCallbacks&&t.eventedCallbacks.forEach(function(n){n()}),t.on("dispose",function(){t.off();n.setTimeout(function(){t.eventBusEl_=null},0)}),t}function ak(n,t){return b(n,lk),n.state=b({},n.state,t),"function"==typeof n.handleStateChanged&&tr(n)&&n.on("statechanged",n.handleStateChanged),n}function ao(n){return"string"!=typeof n?n:n.replace(/./,function(n){return n.toLowerCase()})}function g(n){return"string"!=typeof n?n:n.replace(/./,function(n){return n.toUpperCase()})}function p(){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&&ou(t,function(t,i){wf(t)?(wf(n[i])||(n[i]={}),n[i]=p(n[i],t)):n[i]=t})}),n}function f(n,t){n.prototype=Object.create(t.prototype);(n.prototype.constructor=n).__proto__=t}function vk(n,t){return(vk=Object.setPrototypeOf||function(n,t){return n.__proto__=t,n})(n,t)}function yk(){return(yk=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(n){return!1}}()?Reflect.construct:function(n,t,i){var r=[null],u;return r.push.apply(r,t),u=new(Function.bind.apply(n,r)),i&&vk(u,i.prototype),u}).apply(null,arguments)}function s(n){if(void 0===n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function td(n,t,i,r){return function(n,t,i){if("number"!=typeof t||t<0||i<t)throw new Error("Failed to execute '"+n+"' on 'TimeRanges': The index provided ("+t+") is non-numeric or out of bounds (0-"+i+").");}(n,r,i.length-1),i[r][t]}function bl(n){return void 0===n||0===n.length?{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:td.bind(null,"start",0,n),end:td.bind(null,"end",1,n)}}function lr(n,t){return Array.isArray(n)?bl(n):void 0===n||void 0===t?bl():bl([[n,t]])}function id(n,t){var u,r,f=0,i;if(!t)return 0;for(n&&n.length||(n=lr(0,0)),i=0;i<n.length;i++)u=n.start(i),t<(r=n.end(i))&&(r=t),f+=r-u;return f/t}function ct(n){if(n instanceof ct)return n;"number"==typeof n?this.code=n:"string"==typeof n?this.message=n:di(n)&&("number"==typeof n.code&&(this.code=n.code),b(this,n));this.message||(this.message=ct.defaultMessages[this.code]||"")}function fe(n){return null!=n&&"function"==typeof n.then}function rr(n){fe(n)&&n.then(null,function(){})}function fd(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}})})}function dl(n,t){return n(t={exports:{}},t.exports),t.exports}function na(n,t){for(var i=0;i<n.length;i++)Object.keys(n[i]).length&&t.id!==n[i].id&&(n[i].enabled=!1)}function ta(n,t){for(var i=0;i<n.length;i++)Object.keys(n[i]).length&&t.id!==n[i].id&&(n[i].selected=!1)}function ia(i){var o=["protocol","hostname","port","pathname","search","hash","host"],u=t.createElement("a"),f,s,r,e;for(u.href=i,s=""===u.host&&"file:"!==u.protocol,s&&((f=t.createElement("div")).innerHTML='<a href="'+i+'"><\/a>',u=f.firstChild,f.setAttribute("style","display:none; position:absolute;"),t.body.appendChild(f)),r={},e=0;e<o.length;e++)r[o[e]]=u[o[e]];return"http:"===r.protocol&&(r.host=r.host.replace(/:80$/,"")),"https:"===r.protocol&&(r.host=r.host.replace(/:443$/,"")),r.protocol||(r.protocol=n.location.protocol),s&&t.body.removeChild(f),r}function hd(n){if(!n.match(/^https?:\/\//)){var i=t.createElement("div");i.innerHTML='<a href="'+n+'">x<\/a>';n=i.firstChild.href}return n}function ra(n){if("string"==typeof n){var t=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/.exec(n);if(t)return t.pop().toLowerCase()}return""}function po(t){var i=n.location,r=ia(t);return(":"===r.protocol?i.protocol:r.protocol)+r.host!==i.protocol+i.host}function vd(n){var t=pd.call(n),i="[object Arguments]"===t;return i||"[object Array]"!==t&&null!==n&&"object"==typeof n&&"number"==typeof n.length&&0<=n.length&&"[object Function]"===pd.call(n.callee)}function oht(n,t,i,r){t in n&&(!function(n){return"function"==typeof n&&"[object Function]"===cht.call(n)}(r)||!r())||(ng?sa(n,t,{configurable:!0,enumerable:!1,value:i,writable:!0}):n[t]=i)}function gd(n,t,i){var f=2<arguments.length?i:{},r=sht(t),u;for(hht&&(r=lht.call(r,Object.getOwnPropertySymbols(t))),u=0;u<r.length;u+=1)oht(n,r[u],t[r[u]],f[r[u]])}function ee(n,t){if(1<arguments.length&&"boolean"!=typeof t)throw new TypeError('"allowMissing" argument must be a boolean');var i="$ "+n;if(!(i in aa))throw new SyntaxError("intrinsic "+n+" does not exist!");if("undefined"==typeof aa[i]&&!t)throw new TypeError("intrinsic "+n+" exists, but is not available. Please file an issue!");return aa[i]}function go(n,t,i,r){var u=yht[t];if("function"!=typeof u)throw new vht("unknown record type: "+t);if(!u(n,r))throw new eg(i+" must be a "+t);}function tg(n){return 0<=n?1:-1}function ig(n){try{var t=sg.call(n);return wht.test(t)}catch(n){return!1}}function ha(n){if(!n||"function"!=typeof n&&"object"!=typeof n)return!1;if("function"==typeof n&&!n.prototype)return!0;if(kht)return function(n){try{return!ig(n)&&(sg.call(n),!0)}catch(n){return!1}}(n);if(ig(n))return!1;var t=bht.call(n);return"[object Function]"===t||"[object GeneratorFunction]"===t}function rg(n){return null===n||"function"!=typeof n&&"object"!=typeof n}function ug(){var n=cg.ToString(cg.CheckObjectCoercible(this));return lg(lg(n,tct,""),ict,"")}function ca(){return String.prototype.trim&&"​"==="​".trim()?String.prototype.trim:ug}function pg(n,t,i){var r=n;return kst(t)?(i=t,"string"==typeof n&&(r={uri:n})):r=ect(t,{uri:n}),r.callback=i,r}function ur(n,t,i){return wg(t=pg(n,t,i))}function wg(n){function s(n){return clearTimeout(h),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(h),u=n.useXDR&&void 0===t.status?200:1223===t.status?204:t.status,i=p,e=null,0!==u?(i={body:function(){var n=void 0;if(n=t.response?t.response:t.responseText||function(n){if("document"===n.responseType)return n.responseXML;var t=n.responseXML&&"parsererror"===n.responseXML.documentElement.nodeName;return""!==n.responseType||t?null:n.responseXML}(t),y)try{n=JSON.parse(n)}catch(n){}return n}(),statusCode:u,method:r,headers:{},url:c,rawRequest:t},t.getAllResponseHeaders&&(i.headers=fct(t.getAllResponseHeaders()))):e=new Error("Internal XMLHttpRequest Error"),o(e,i,i.body)}var e,o;if("undefined"==typeof n.callback)throw new Error("callback argument missing");e=!1;o=function(t,i,r){e||(e=!0,n.callback(t,i,r))};var u,f,h,t=n.xhr||null,c=(t=t||(n.cors||n.useXDR?new ur.XDomainRequest:new ur.XMLHttpRequest)).url=n.uri||n.url,r=t.method=n.method||"GET",l=n.body||n.data,i=t.headers=n.headers||{},a=!!n.sync,y=!1,p={body:void 0,headers:{},statusCode:0,method:r,url:c,rawRequest:t};if("json"in n&&!1!==n.json&&(y=!0,i.accept||i.Accept||(i.Accept="application/json"),"GET"!==r&&"HEAD"!==r&&(i["content-type"]||i["Content-Type"]||(i["Content-Type"]="application/json"),l=JSON.stringify(!0===n.json?l:n.json))),t.onreadystatechange=function(){4===t.readyState&&setTimeout(v,0)},t.onload=v,t.onerror=s,t.onprogress=function(){},t.onabort=function(){f=!0},t.ontimeout=s,t.open(r,c,!a,n.username,n.password),a||(t.withCredentials=!!n.withCredentials),!a&&0<n.timeout&&(h=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&&!function(n){for(var t in n)if(n.hasOwnProperty(t))return!1;return!0}(n.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in n&&(t.responseType=n.responseType),"beforeSend"in n&&"function"==typeof n.beforeSend&&n.beforeSend(t),t.send(l||null),t}function bg(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);0<u.length&&(n.console&&n.console.groupCollapsed&&n.console.groupCollapsed("Text Track parsing errors for "+i.src),u.forEach(function(n){return a.error(n)}),n.console&&n.console.groupEnd&&n.console.groupEnd());r.flush()}function gg(){}function hi(n,t){this.name="ParsingError";this.code=n.code;this.message=t||n.message}function ya(n){function i(n,t,i,r){return 3600*(0|n)+60*(0|t)+(0|i)+(0|r)/1e3}var t=n.match(/^(\d+):(\d{2})(:\d{2})?\.(\d{3})/);return t?t[3]?i(t[1],t[2],t[3].replace(":",""),t[4]):59<t[1]?i(t[1],t[2],0,t[4]):i(0,t[1],t[2],t[4]):null}function oe(){this.values=ts(null)}function se(n,t,i,r){var f=r?n.split(r):[n],e,u;for(e in f)"string"==typeof f[e]&&(u=f[e].split(i),2===u.length&&t(u[0],u[1]))}function sct(n,t,i){function s(){var t=ya(n);if(null===t)throw new hi(hi.Errors.BadTimeStamp,"Malformed timestamp: "+o);return n=n.replace(/^[^\sa-zA-Z-]+/,""),t}function f(){n=n.replace(/^\s+/,"")}var e,u,r,o=n;if(f(),t.startTime=s(),f(),"-->"!==n.substr(0,3))throw new hi(hi.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '-->'): "+o);n=n.substr(3);f();t.endTime=s();f();e=n;u=t;r=new oe;se(e,function(n,t){var f,u,e;switch(n){case"region":for(f=i.length-1;0<=f;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);r.alt(n,e,["auto"]);2===u.length&&r.alt("lineAlign",u[1],["start","middle","end"]);break;case"position":u=t.split(",");r.percent(n,u[0]);2===u.length&&r.alt("positionAlign",u[1],["start","middle","end"]);break;case"size":r.percent(n,t);break;case"align":r.alt(n,t,["start","middle","end","left","right"])}},/:/,/\s/);u.region=r.get("region",null);u.vertical=r.get("vertical","");u.line=r.get("line","auto");u.lineAlign=r.get("lineAlign","start");u.snapToLines=r.get("snapToLines",!0);u.size=r.get("size",100);u.align=r.get("align","middle");u.position=r.get("position",{start:0,left:0,middle:50,end:100,right:100},u.align);u.positionAlign=r.get("positionAlign",{start:"start",left:"start",middle:"middle",end:"end",right:"end"},u.align)}function tn(n,t){function l(){if(!t)return null;var n,i=t.match(/^([^<]*)(<[^>]*>?)?/);return n=i[1]?i[1]:i[2],t=t.substr(n.length),n}function a(n){return hct[n]}function v(n){for(;i=n.match(/&(amp|lt|gt|lrm|rlm|nbsp);/);)n=n.replace(i[0],a);return n}function y(t,i){var u=cct[t],r,f;return u?(r=n.document.createElement(u),r.localName=u,f=lct[t],f&&i&&(r[f]=i.trim()),r):null}for(var f,o,i,r,s,h,c=n.document.createElement("div"),u=c,e=[];null!==(r=l());)if("<"!==r[0])u.appendChild(n.document.createTextNode(v(r)));else{if("/"===r[1]){e.length&&e[e.length-1]===r.substr(2).replace(">","")&&(e.pop(),u=u.parentNode);continue}if(o=ya(r.substr(1,r.length-2)),o){f=n.document.createProcessingInstruction("timestamp",o);u.appendChild(f);continue}if(i=r.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/),!i)continue;if(!(f=y(i[1],i[3])))continue;if(s=u,nn[(h=f).localName]&&nn[h.localName]!==s.localName)continue;i[2]&&(f.className=i[2].substr(1).replace("."," "));e.push(i[1]);u.appendChild(f);u=f}return c}function act(n){for(var i,t=0;t<pa.length;t++)if(i=pa[t],n>=i[0]&&n<=i[1])return!0;return!1}function is(){}function wa(n,t,i){var u,r;is.call(this);this.cue=t;this.cueDiv=tn(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":"lr"===t.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext"};this.applyStyles(u,this.cueDiv);this.div=n.document.createElement("div");u={direction:function(n){function f(n,t){for(var i=t.childNodes.length-1;0<=i;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?u[n.length=0]:i):"ruby"===t.tagName?r(n):t.childNodes?(f(n,t),r(n)):void 0}var u=[],i="",t;if(!n||!n.childNodes)return"ltr";for(f(u,n);i=r(u);)for(t=0;t<i.length;t++)if(act(i.charCodeAt(t)))return"rtl";return"ltr"}(this.cueDiv),writingMode:""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext",textAlign:"middle"===t.align?"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"middle":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 lt(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=void 0!==i?i:n.lineHeight}function vct(n,t,i,r){var s=new lt(t),e=t.cue,f=function(n){if("number"==typeof n.line&&(n.snapToLines||0<=n.line&&n.line<=100))return n.line;if(!n.track||!n.track.textTrackList||!n.track.textTrackList.mediaElement)return-1;for(var r=n.track,i=r.textTrackList,u=0,t=0;t<i.length&&i[t]!==r;t++)"showing"===i[t].mode&&u++;return-1*++u}(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=s.lineHeight,o=c*Math.round(f),a=i[h]+c,y=u[0];Math.abs(o)>a&&(o=o<0?-1:1,o*=Math.ceil(a/c)*c);f<0&&(o+=""===e.vertical?i.height:i.width,u=u.reverse());s.move(y,o)}else{l=s.lineHeight/i.height*100;switch(e.lineAlign){case"middle":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"];s=new lt(t)}v=function(n,t){for(var f,e,o=new lt(n),s=1,u=0;u<t.length;u++){for(;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);f<s&&(e=new lt(n),s=f);n=new lt(o)}return e||o}(s,u);t.move(v.toCSSCompatValues(i))}function he(){}function ba(n){return"string"==typeof n&&!!wct[n.toLowerCase()]&&n.toLowerCase()}function rn(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=50,y="middle",p=50,w="middle";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("number"!=typeof n)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("number"!=typeof n)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=function(n){return"string"==typeof n&&!!pct[n.toLowerCase()]&&n.toLowerCase()}(n);if(!1===t)throw new SyntaxError("An invalid or illegal 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("number"!=typeof n&&"auto"!==n)throw new SyntaxError("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=ba(n);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");a=t;this.hasBeenReset=!0}},position:{enumerable:!0,get:function(){return v},set:function(n){if(n<0||100<n)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=ba(n);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");y=t;this.hasBeenReset=!0}},size:{enumerable:!0,get:function(){return p},set:function(n){if(n<0||100<n)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=ba(n);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");w=t;this.hasBeenReset=!0}}});this.displayState=void 0}function ce(n){return"number"==typeof n&&0<=n&&n<=100}function bct(){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(!ce(t))throw new Error("Width must be between 0 and 100.");n=t}},lines:{enumerable:!0,get:function(){return t},set:function(n){if("number"!=typeof n)throw new TypeError("Lines must be set to a number.");t=n}},regionAnchorY:{enumerable:!0,get:function(){return r},set:function(n){if(!ce(n))throw new Error("RegionAnchorX must be between 0 and 100.");r=n}},regionAnchorX:{enumerable:!0,get:function(){return i},set:function(n){if(!ce(n))throw new Error("RegionAnchorY must be between 0 and 100.");i=n}},viewportAnchorY:{enumerable:!0,get:function(){return f},set:function(n){if(!ce(n))throw new Error("ViewportAnchorY must be between 0 and 100.");f=n}},viewportAnchorX:{enumerable:!0,get:function(){return u},set:function(n){if(!ce(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=function(n){return"string"==typeof n&&!!fn[n.toLowerCase()]&&n.toLowerCase()}(n);if(!1===t)throw new SyntaxError("An invalid or illegal string was specified.");e=t}}})}function kct(n,t,i){n.setTimeout(function(){return function i(n,t,r,u,f,e){var s;void 0===n&&(n={});void 0===t&&(t=[]);void 0===f&&(f=[]);void 0===e&&(e=!1);var c=t,h=c[0],o=c.slice(1);if("string"==typeof h)i(n,wr[h],r,u,f,e);else if(h){if(s=nlt(u,h),!s.setSource)return f.push(s),i(n,o,r,u,f,e);s.setSource(b({},n),function(t,h){if(t)return i(n,o,r,u,f,e);f.push(s);i(h,n.type===h.type?o:wr[h.type],r,u,f,e)})}else o.length?i(n,o,r,u,f,e):e?r(n,f):i(n,wr["*"],r,u,f,!0)}(t,wr[t.type],i,n)},1)}function en(n,t,i,r){void 0===r&&(r=null);var o="call"+g(i),u=n.reduce(da(o),r),f=u===rs,e=f?null:t[i](u);return function(n,t,i,r){for(var f,u=n.length-1;0<=u;u--)f=n[u],f[t]&&f[t](r,i)}(n,i,e,f),e}function da(n){return function(t,i){return t===rs?rs:i[n]?i[n](t):t}}function nlt(n,t){var r=ka[n.id()],i=null,u;if(null==r)return i=t(n),ka[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 null===i&&(i=t(n),r.push([t,i])),i}function us(n){void 0===n&&(n="");var t=ra(n);return sn[t.toLowerCase()]||""}function hn(n){if(!n.type){var t=us(n.src);t&&(n.type=t)}return n}function ga(n,t){var i;if(4===n.length)i=n[1]+n[1]+n[2]+n[2]+n[3]+n[3];else{if(7!==n.length)throw new Error("Invalid color code provided, "+n+"; must be formatted as e.g. #f0e or #f604e2.");i=n.slice(1)}return"rgba("+parseInt(i.slice(0,2),16)+","+parseInt(i.slice(2,4),16)+","+parseInt(i.slice(4,6),16)+","+t+")"}function nv(n,t,i){try{n.style[t]=i}catch(n){return}}function wn(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!==1/0||(u=r=i="-"),(u=0<u||0<e?u+":":"")+(r=((u||10<=f)&&r<10?"0"+r:r)+":")+(i=i<10?"0"+i:i)}function ku(n,t){return void 0===t&&(t=n),fs(n,t)}function att(n,t){if(t&&(n=t(n)),n&&"none"!==n)return n}function ty(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&&-1===t.indexOf(r)&&t.push(r);return!!t.length&&(1===t.length&&(e=t[0]),n.triggerSourceset(e),!0)}function wtt(n,t){for(var i={},r=0;r<n.length&&!((i=Object.getOwnPropertyDescriptor(n[r],t))&&i.set&&i.get);r++);return i.enumerable=!0,i.configurable=!0,i}function btt(t){var i=t.el(),r,u;if(!i.resetSourceWatch_){function f(n){return function(){for(var e,u=arguments.length,f=new Array(u),r=0;r<u;r++)f[r]=arguments[r];return e=n.apply(i,f),ty(t),e}}r={};u=function(t){return wtt([t.el(),n.HTMLMediaElement.prototype,n.Element.prototype,ilt],"innerHTML")}(t);["append","appendChild","insertAdjacentHTML"].forEach(function(n){i[n]&&(r[n]=i[n],i[n]=f(r[n]))});Object.defineProperty(i,"innerHTML",p(u,{set:f(u.set)}));i.resetSourceWatch_=function(){i.resetSourceWatch_=null;Object.keys(r).forEach(function(n){i[n]=r[n]});Object.defineProperty(i,"innerHTML",u)};t.one("sourceset",i.resetSourceWatch_)}}function tlt(t){var i;if(t.featuresSourceset&&(i=t.el(),!i.resetSourceset_)){var r=function(t){return wtt([t.el(),n.HTMLMediaElement.prototype,rlt],"src")}(t),u=i.setAttribute,f=i.load;Object.defineProperty(i,"src",p(r,{set:function(n){var u=r.set.call(i,n);return t.triggerSourceset(i.src),u}}));i.setAttribute=function(n,r){var f=u.call(i,n,r);return/src/i.test(n)&&t.triggerSourceset(i.src),f};i.load=function(){var n=f.call(i);return ty(t)||(t.triggerSourceset(""),btt(t)),n};i.currentSrc?t.triggerSourceset(i.currentSrc):ty(t)||btt(t);i.resetSourceset_=function(){i.resetSourceset_=null;i.load=f;i.setAttribute=u;Object.defineProperty(i,"src",r);i.resetSourceWatch_&&i.resetSourceWatch_()}}}function rh(n){return rf.hasOwnProperty(n)}function uh(n){if(rh(n))return rf[n]}function nit(n,t){n[tf]=n[tf]||{};n[tf][t]=!0}function fh(n,t,i){var r=(i?"before":"")+"pluginsetup";n.trigger(r,t);n.trigger(r+":"+t.name,t)}function tit(n,t){return t.prototype.name=n,function(){var r;fh(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=yk(t,[this].concat(f)),this[n]=function(){return r},fh(this,r.getEventHash()),r}}function i(n,t,u){var e=i.getPlayer(n),f,o;if(e)return t&&a.warn('Player "'+n+'" is already initialised. Options will not be applied.'),u&&e.ready(u),e;if(f="string"==typeof n?gi("#"+fy(n)):n,!bf(f))throw new TypeError("The element or ID supplied is not valid. (videojs)");return f.ownerDocument.defaultView&&f.ownerDocument.body.contains(f)||a.warn("The element supplied is not included in the DOM"),t=t||{},i.hooks("beforesetup").forEach(function(n){var i=n(f,p(t));di(i)&&!Array.isArray(i)?t=p(t,i):a.error("please return an object in beforesetup hooks")}),o=r.getComponent("Player"),e=new o(f,t,u),i.hooks("setup").forEach(function(n){return n(e)}),e}function iit(){return(iit=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}).apply(this,arguments)}function oy(n,t){n.prototype=Object.create(t.prototype);(n.prototype.constructor=n).__proto__=t}function rit(n){if(void 0===n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function we(n){for(var t,i=n.split(new RegExp('(?:^|,)((?:[^=]*)=(?:"[^"]*"|[^,]*))')),u={},r=i.length;r--;)""!==i[r]&&((t=/([^=]*)=(.*)/.exec(i[r]).slice(1))[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}function uit(n){return!!n&&"object"==typeof n}function pt(){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]):uit(n[i])&&uit(t[i])?pt(n[i],t[i]):t[i]}),n},{})}function sh(n){return n.reduce(function(n,t){return n.concat(t)},[])}function fit(n){if(!n.length)return[];for(var i=[],t=0;t<n.length;t++)i.push(n[t]);return i}function hy(t,i){return/^[a-z]+:/i.test(i)?i:(/\/\//i.test(t)||(t=ait.buildAbsoluteURL(n.location.href,t)),ait.buildAbsoluteURL(t,i))}function be(n){var t=n.baseUrl,l=void 0===t?"":t,i=n.source,r=void 0===i?"":i,u=n.range,f=void 0===u?"":u,e=n.indexRange,o=void 0===e?"":e,s={uri:r,resolvedUri:hy(l||"",r)};if(f||o){var h=(f||o).split("-"),c=parseInt(h[0],10),a=parseInt(h[1],10);s.byterange={length:a-c+1,offset:c}}return s}function cy(n){var r=n.type,u=void 0===r?"static":r,o=n.duration,f=n.timescale,s=void 0===f?1:f,h=n.sourceDuration,e=klt[u](n),t=function(n,t){for(var r=[],i=n;i<t;i++)r.push(i);return r}(e.start,e.end).map(function(n){return function(t,i){var r=n.duration,u=n.timescale,e=void 0===u?1:u,o=n.periodIndex,f=n.startNumber;return{number:(void 0===f?1:f)+t,duration:r/e,timeline:o,time:i*r}}}(n)),i;return"static"===u&&(i=t.length-1,t[i].duration=h-o/s*i),t}function oit(n){var i=n.baseUrl,u=n.initialization,f=void 0===u?{}:u,e=n.sourceDuration,o=n.timescale,c=void 0===o?1:o,s=n.indexRange,l=void 0===s?"":s,a=n.duration,h,t,r;if(!i)throw new Error(hlt);return h=be({baseUrl:i,source:f.sourceURL,range:f.range}),t=be({baseUrl:i,source:i,indexRange:l}),(t.map=h,a)?(r=cy(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]}function alt(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 1!==n.referenceType}),s=[],r=v+t.firstOffset,u=0;u<p.length;u++){var h=t.references[u],c=h.referencedSize,w=h.subsegmentDuration,l=oit({baseUrl:i,timescale:y,timeline:e,periodIndex:e,duration:w,sourceDuration:a,indexRange:r+"-"+(r+c-1)})[0];f&&(l.map=f);s.push(l);r+=c}return n.segments=s,n}function sit(n){return function(n){return Object.keys(n).map(function(t){return n[t]})}(n.reduce(function(n,t){var r,i=t.attributes.id+(t.attributes.lang||"");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},{})).map(function(n){return n.discontinuityStarts=function(n,t){return n.reduce(function(n,i,r){return i[t]&&n.push(r),n},[])}(n.segments,"discontinuity"),n})}function ly(n,t){var e,i,u,f,r,o;if(void 0===t&&(t={}),!Object.keys(t).length)return n;for(e in n)i=n[e],i.sidx&&(u=i.sidx.uri+"-"+(r=i.sidx.byterange,void 0,o=r.offset+r.length-1,r.offset+"-"+o),f=t[u]&&t[u].sidx,i.sidx&&f&&alt(i,f,i.sidx.resolvedUri));return n}function vlt(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:"static"===(t.type||"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}function ylt(n,t){var i;if(void 0===t&&(t={}),!n.length)return{};var u=n[0].attributes,s=u.sourceDuration,f=u.minimumUpdatePeriod,h=void 0===f?0:f,c=sit(n.filter(function(n){var t=n.attributes;return"video/mp4"===t.mimeType||"video"===t.contentType})).map(vlt),e=sit(n.filter(function(n){var t=n.attributes;return"audio/mp4"===t.mimeType||"audio"===t.contentType})),o=n.filter(function(n){var t=n.attributes;return"text/vtt"===t.mimeType||"text"===t.contentType}),r={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:(i={AUDIO:{},VIDEO:{}},i["CLOSED-CAPTIONS"]={},i.SUBTITLES={},i),uri:"",duration:s,playlists:ly(c,t),minimumUpdatePeriod:1e3*h};return e.length&&(r.mediaGroups.AUDIO.audio=function(n,t){var r,i;return void 0===t&&(t={}),i=n.reduce(function(n,i){var u=i.attributes.role&&i.attributes.role.value||"",e=i.attributes.lang||"",f="main",o;return e&&(o=u?" ("+u+")":"",f=i.attributes.lang+o),n[f]&&n[f].playlists[0].attributes.BANDWIDTH>i.attributes.bandwidth||(n[f]={language:e,autoselect:!0,"default":"main"===u,playlists:ly([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:"static"===(t.type||"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}(i)],t),uri:""},"undefined"==typeof r&&"main"===u&&((r=i).default=!0)),n},{}),r||(i[Object.keys(i)[0]].default=!0),i}(e,t)),o.length&&(r.mediaGroups.SUBTITLES.subs=function(n,t){return void 0===t&&(t={}),n.reduce(function(n,i){var r=i.attributes.lang||"text";return n[r]||(n[r]={language:r,"default":!1,autoselect:!1,playlists:ly([function(n){var r,t=n.attributes,i=n.segments;return"undefined"==typeof i&&(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:"static"===(t.type||"static"),timeline:t.periodIndex,resolvedUri:t.baseUrl||"",targetDuration:t.duration,segments:i,mediaSequence:i.length?i[0].number:1}}(i)],t),uri:""}),n},{})}(o,t)),r}function hit(n,t){for(var s,y,ct,h,r,p,w,b,k,d,c,g,l,nt,a,tt,it=n.type,lt=void 0===it?"static":it,rt=n.minimumUpdatePeriod,at=void 0===rt?0:rt,ut=n.media,vt=void 0===ut?"":ut,yt=n.sourceDuration,ft=n.timescale,et=void 0===ft?1:ft,ot=n.startNumber,st=void 0===ot?1:ot,pt=n.periodIndex,f=[],i=-1,e=0;e<t.length;e++){var v=t[e],u=v.d,ht=v.r||0,o=v.t||0;for(i<0&&(i=o),o&&i<o&&(i=o),s=void 0,ht<0?(y=e+1,s=y===t.length?"dynamic"===lt&&0<at&&0<vt.indexOf("$Number$")?(p=i,w=u,void 0,b=(r=n).NOW,k=r.clientOffset,d=r.availabilityStartTime,c=r.timescale,g=void 0===c?1:c,l=r.start,nt=void 0===l?0:l,a=r.minimumUpdatePeriod,tt=(b+k)/1e3+(void 0===a?0:a)-(d+nt),Math.ceil((tt*g-p)/w)):(yt*et-i)/u:(t[y].t-i)/u):s=ht+1,ct=st+f.length+s,h=st+f.length;h<ct;)f.push({number:h,duration:u/et,time:i,timeline:pt}),i+=u,h++}return f}function cit(n,t){return n.replace(dlt,function(n){return function(t,i,r,u){if("$$"===t)return"$";if("undefined"==typeof n[i])return t;var f=""+n[i];return"RepresentationID"===i?f:(u=r?parseInt(u,10):1)<=f.length?f:new Array(u-f.length+1).join("0")+f}}(t))}function plt(n,t){var i={RepresentationID:n.id,Bandwidth:n.bandwidth||0},r=n.initialization,u=void 0===r?{sourceURL:"",range:""}:r,f=be({baseUrl:n.baseUrl,source:cit(u.sourceURL,i),range:u.range});return function(n,t){return n.duration||t?n.duration?cy(n):hit(n,t):[{number:n.startNumber||1,duration:n.sourceDuration,time:0,timeline:n.periodIndex}]}(n,t).map(function(t){i.Number=t.number;i.Time=t.time;var r=cit(n.media||"",i);return{uri:r,timeline:t.timeline,duration:t.duration,resolvedUri:hy(n.baseUrl||"",r),map:f,number:t.number}})}function wlt(n,t){var i=n.duration,f=n.segmentUrls,e=void 0===f?[]:f,r,u;if(!i&&!t||i&&t)throw new Error(clt);return u=e.map(function(t){return function(n,t){var i=n.baseUrl,r=n.initialization,u=void 0===r?{}:r,e=be({baseUrl:i,source:u.sourceURL,range:u.range}),f=be({baseUrl:i,source:t.media,range:t.mediaRange});return f.map=e,f}(n,t)}),i&&(r=cy(n)),t&&(r=hit(n,t)),r.map(function(n,t){if(u[t]){var i=u[t];return i.timeline=n.timeline,i.duration=n.duration,i.number=n.number,i}}).filter(function(n){return n})}function blt(n){var t,u,e=n.attributes,i=n.segmentInfo,r,f;if(i.template?(u=plt,t=pt(e,i.template)):i.base?(u=oit,t=pt(e,i.base)):i.list&&(u=wlt,t=pt(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=void 0===s?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}function rt(n,t){return fit(n.childNodes).filter(function(n){return n.tagName===t})}function lit(n){return n.textContent.trim()}function ke(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 31536e3*parseFloat(r||0)+2592e3*parseFloat(u||0)+86400*parseFloat(f||0)+3600*parseFloat(e||0)+60*parseFloat(o||0)+parseFloat(s||0)}function at(n){return n&&n.attributes?fit(n.attributes).reduce(function(n,t){var i=vit[t.name]||vit.DEFAULT;return n[t.name]=i(t.value),n},{}):{}}function hh(n,t){return t.length?sh(n.map(function(n){return t.map(function(t){return hy(n,lit(t))})})):n}function vy(n){var f=rt(n,"SegmentTemplate")[0],i=rt(n,"SegmentList")[0],c=i&&rt(i,"SegmentURL").map(function(n){return pt({tag:"SegmentURL"},at(n))}),e=rt(n,"SegmentBase")[0],o=i||f,s=o&&rt(o,"SegmentTimeline")[0],h=i||e||f,r=h&&rt(h,"Initialization")[0],t=f&&at(f),u;return t&&r?t.initialization=r&&at(r):t&&t.initialization&&(t.initialization={sourceURL:t.initialization}),u={template:t,timeline:s&&rt(s,"S").map(function(n){return at(n)}),list:i&&pt(at(i),{segmentUrls:c,initialization:at(r)}),base:e&&pt(at(e),{initialization:at(r)})},Object.keys(u).forEach(function(n){u[n]||delete u[n]}),u}function glt(t){return t.reduce(function(t,i){var e=at(i),r=dit[e.schemeIdUri],u,f,o;return r&&(t[r]={attributes:e},u=rt(i,"cenc:pssh")[0],u&&(f=lit(u),o=f&&function(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}(f),t[r].pssh=o)),t},{})}function nat(n,t,i){return function(r){var e=at(r),o=hh(t,rt(r,"BaseURL")),s=rt(r,"Role")[0],h={role:at(s)},u=pt(n,e,h),f=glt(rt(r,"ContentProtection"));Object.keys(f).length&&(u=pt(u,{contentProtection:f}));var c=vy(r),l=rt(r,"Representation"),a=pt(i,c);return sh(l.map(function(n,t,i){return function(r){var u=rt(r,"BaseURL"),f=hh(t,u),e=pt(n,at(r)),o=vy(r);return f.map(function(n){return{segmentInfo:pt(i,o),attributes:pt(e,{baseUrl:n})}})}}(u,o,a)))}}function tat(t,i){var r,h;void 0===i&&(i={});var u=i,f=u.manifestUri,c=void 0===f?"":f,e=u.NOW,l=void 0===e?Date.now():e,o=u.clientOffset,a=void 0===o?0:o,s=rt(t,"Period");if(!s.length)throw new Error(elt);return r=at(t),h=hh([c],rt(t,"BaseURL")),r.sourceDuration=r.mediaPresentationDuration||0,r.NOW=l,r.clientOffset=a,sh(s.map(function(t,i){return function(r,u){var e=hh(i,rt(r,"BaseURL")),o=at(r),f=parseInt(o.id,10),s=n.isNaN(f)?u:f,h=pt(t,{periodIndex:s}),c=rt(r,"AdaptationSet"),l=vy(r);return sh(c.map(nat(h,e,l)))}}(r,h)))}function yit(t){if(""===t)throw new Error(olt);var r=(new n.DOMParser).parseFromString(t,"application/xml"),i=r&&"MPD"===r.documentElement.tagName?r.documentElement:null;if(!i||i&&0<i.getElementsByTagName("parsererror").length)throw new Error(slt);return i}function pit(n,t){return void 0===t&&(t={}),ylt(function(n){return n.map(blt)}(tat(yit(n),t)),t.sidxMapping)}function iat(n){return function(n){var i=rt(n,"UTCTiming")[0],t;if(!i)return null;t=at(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(llt);}return t}(yit(n))}function ri(n){return new Date(1e3*n-20828448e5)}function git(n){return{isLeading:(12&n[0])>>>2,dependsOn:3&n[0],isDependedOn:(192&n[1])>>>6,hasRedundancy:(48&n[1])>>>4,paddingValue:(14&n[1])>>>1,isNonSyncSample:1&n[1],degradationPriority:n[2]<<8|n[3]}}function vh(){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),-1<r)};this.trigger=function(t){var r,i,u,f;if(r=n[t])if(2===arguments.length)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={}}}}function v(n){for(var t=[];n--;)t.push(0);return t}function bi(){bi.prototype.init.call(this);this.captionPackets_=[];this.ccStreams_=[new k(0,0),new k(0,1),new k(1,0),new k(1,1)];this.reset();this.ccStreams_.forEach(function(n){n.on("data",this.trigger.bind(this,"data"));n.on("done",this.trigger.bind(this,"done"))},this)}function yh(n){return null===n?"":(n=nvt[n]||n,String.fromCharCode(n))}function iu(){for(var n=[],t=15;t--;)n.push("");return n}function tp(n,t){var i=1;for(t<n&&(i=-1);4294967296<Math.abs(t-n);)n+=8589934592*i;return n}function ip(n){var i,t;ip.prototype.init.call(this);this.type_=n;this.push=function(n){n.type===this.type_&&(void 0===t&&(t=n.dts),n.dts=tp(n.dts,t),n.pts=tp(n.pts,t),i=n.dts,this.trigger("data",n))};this.flush=function(){t=i;this.trigger("done")};this.discontinuity=function(){i=t=void 0}}function dut(n,t,i){for(var u="",r=t;r<i;r++)u+="%"+("00"+n[r].toString(16)).slice(-2);return u}function wh(n,t,i){return decodeURIComponent(dut(n,t,i))}function bh(n){return n[0]<<21|n[1]<<14|n[2]<<7|n[3]}function uft(n){return n[0]<<21|n[1]<<14|n[2]<<7|n[3]}function fft(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}function eft(n,t,i,r,u,f){return{start:{dts:n,pts:n+(i-t)},end:{dts:n+(r-t),pts:n+(u-i)},prependedContentDuration:f,baseMediaDecodeTime:n}}function hvt(n,t){for(var r,u=n,i=0;i<t.length;i++){if(r=t[i],u<r.size)return r;u-=r.size}return null}function cvt(n,t){var u=li.findBox(n,["moof","traf"]),f=li.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 f,h=n.mdat,u=n.traf,c=li.findBox(u,["tfhd"]),e=ah.parseTfhd(c[0]),r=e.trackId,o=li.findBox(u,["tfdt"]),l=0<o.length?ah.parseTfdt(o[0]).baseMediaDecodeTime:0,s=li.findBox(u,["trun"]);t===r&&0<s.length&&(f=function(n,t,i){for(var u,f,o,c=new DataView(n.buffer,n.byteOffset,n.byteLength),h=[],s,e,r=0;r+4<n.length;r+=f)if(f=c.getUint32(r),r+=4,!(f<=0))switch(31&n[r]){case 6:s=n.subarray(r+1,r+1+f);e=hvt(r,t);u={nalUnitType:"sei_rbsp",size:f,data:s,escapedRBSP:lvt(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}(h,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 t=ah.parseTrun(n).samples;t.forEach(function(n){void 0===n.duration&&(n.duration=f);void 0===n.size&&(n.size=e);n.trackId=o;n.dts=r;void 0===n.compositionTimeOffset&&(n.compositionTimeOffset=0);n.pts=r+n.compositionTimeOffset;r+=n.duration});u=u.concat(t)}),u}(s,l,e),r),i[r]||(i[r]=[]),i[r]=i[r].concat(f))}),i}function oft(n){var t=31&n[1];return t<<=8,t|n[2]}function ic(n){return!!(64&n[1])}function rc(n){var t=0;return 1<(48&n[3])>>>4&&(t+=n[4]+1),t}function pp(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}}function pvt(n,t,i){for(var u,s,h,e,f=0,r=ot,o=!1;r<=n.byteLength;)if(71!==n[f]||71!==n[r]&&r!==n.byteLength)f++,r++;else{switch(u=n.subarray(f,r),y.ts.parseType(u,t.pid)){case"pes":s=y.ts.parsePesType(u,t.table);h=y.ts.parsePayloadUnitStartIndicator(u);"audio"===s&&h&&(e=y.ts.parsePesTime(u))&&(e.type="audio",i.audio.push(e),o=!0)}if(o)break;f+=ot;r+=ot}for(f=(r=n.byteLength)-ot,o=!1;0<=f;)if(71!==n[f]||71!==n[r]&&r!==n.byteLength)f--,r--;else{switch(u=n.subarray(f,r),y.ts.parseType(u,t.pid)){case"pes":s=y.ts.parsePesType(u,t.table);h=y.ts.parsePayloadUnitStartIndicator(u);"audio"===s&&h&&(e=y.ts.parsePesTime(u))&&(e.type="audio",i.audio.push(e),o=!0)}if(o)break;f-=ot;r-=ot}}function wvt(n,t,i){for(var p,r,c,h,o,l,a,v,u=0,f=ot,s=!1,e={data:[],size:0};f<n.byteLength;)if(71!==n[u]||71!==n[f])u++,f++;else{switch(r=n.subarray(u,f),y.ts.parseType(r,t.pid)){case"pes":if(c=y.ts.parsePesType(r,t.table),h=y.ts.parsePayloadUnitStartIndicator(r),"video"===c&&(h&&!s&&(o=y.ts.parsePesTime(r))&&(o.type="video",i.video.push(o),s=!0),!i.firstKeyFrame)){if(h&&0!==e.size){for(l=new Uint8Array(e.size),a=0;e.data.length;)v=e.data.shift(),l.set(v,a),a+=v.byteLength;y.ts.videoPacketContainsKeyFrame(l)&&(p=y.ts.parsePesTime(l),p&&(i.firstKeyFrame=p,i.firstKeyFrame.type="video"));e.size=0}e.data.push(r);e.size+=r.byteLength}}if(s&&i.firstKeyFrame)break;u+=ot;f+=ot}for(u=(f=n.byteLength)-ot,s=!1;0<=u;)if(71!==n[u]||71!==n[f])u--,f--;else{switch(r=n.subarray(u,f),y.ts.parseType(r,t.pid)){case"pes":c=y.ts.parsePesType(r,t.table);h=y.ts.parsePayloadUnitStartIndicator(r);"video"===c&&h&&(o=y.ts.parsePesTime(r))&&(o.type="video",i.video.push(o),s=!0)}if(s)break;u-=ot;f-=ot}}function bvt(n){var i={pid:null,table:null},t={},r;for(r in function(n,t){for(var r,u=0,i=ot;i<n.byteLength;)if(71!==n[u]||71!==n[i])u++,i++;else{switch(r=n.subarray(u,i),y.ts.parseType(r,t.pid)){case"pat":t.pid||(t.pid=y.ts.parsePat(r));break;case"pmt":t.table||(t.table=y.ts.parsePmt(r))}if(t.pid&&t.table)return;u+=ot;i+=ot}}(n,i),i.table)if(i.table.hasOwnProperty(r))switch(i.table[r]){case it.H264_STREAM_TYPE:t.video=[];wvt(n,i,t);0===t.video.length&&delete t.video;break;case it.ADTS_STREAM_TYPE:t.audio=[];pvt(n,i,t);0===t.audio.length&&delete t.audio}return t}function uc(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function cft(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)}function bp(n){uc(this,bp);gt=gt||function(){for(var h=[[[],[],[],[],[]],[[],[],[],[],[]]],f=h[0],e=h[1],l=f[4],y=e[4],n=void 0,i=void 0,t=void 0,u=[],a=[],c=void 0,v=void 0,r=void 0,o=void 0,s=void 0,n=0;n<256;n++)a[(u[n]=n<<1^283*(n>>7))^n]=n;for(i=t=0;!l[i];i^=c||1,t=a[t]||1)for(r=(r=t^t<<1^t<<2^t<<3^t<<4)>>8^255&r^99,s=16843009*u[v=u[c=u[y[l[i]=r]=i]]]^65537*v^257*c^16843008*i,o=257*u[r]^16843008*r,n=0;n<4;n++)f[n][i]=o=o<<24^o>>>8,e[n][r]=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}();this._tables=[[gt[0][0].slice(),gt[0][1].slice(),gt[0][2].slice(),gt[0][3].slice(),gt[0][4].slice()],[gt[1][0].slice(),gt[1][1].slice(),gt[1][2].slice(),gt[1][3].slice(),gt[1][4].slice()]];var i=void 0,e=void 0,t=void 0,f=void 0,h=void 0,u=this._tables[0][4],o=this._tables[1],r=n.length,s=1;if(4!==r&&6!==r&&8!==r)throw new Error("Invalid aes key size");for(f=n.slice(0),h=[],this._key=[f,h],i=r;i<4*r+28;i++)t=f[i-1],(i%r==0||8===r&&i%r==4)&&(t=u[t>>>24]<<24^u[t>>16&255]<<16^u[t>>8&255]<<8^u[255&t],i%r==0&&(t=t<<8^t>>>24^s<<24,s=s<<1^283*(s>>7))),f[i]=f[i-r]^t;for(e=0;i;e++,i--)t=f[3&e?i:i-4],h[e]=i<=4||e<4?t:o[0][u[t>>>24]]^o[1][u[t>>16&255]]^o[2][u[t>>8&255]]^o[3][u[255&t]]}function ru(){uc(this,ru);this.listeners={}}function to(){uc(this,to);var n=function(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?n:t}(this,aft.call(this,kp));return n.jobs=[],n.delay=1,n.timeout_=null,n}function fi(n){return n<<24|(65280&n)<<8|(16711680&n)>>8|n>>>24}function vft(n,t,i){var f=new Int32Array(n.buffer,n.byteOffset,n.byteLength>>2),p=new lft(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=fi(f[r]),l=fi(f[r+1]),a=fi(f[r+2]),v=fi(f[r+3]),p.decrypt(c,l,a,v,u,r),u[r]=fi(u[r]^e),u[r+1]=fi(u[r+1]^o),u[r+2]=fi(u[r+2]^s),u[r+3]=fi(u[r+3]^h),e=c,o=l,s=a,h=v;return y}function io(n,t,i,r){uc(this,io);var e=io.STEP,f=new Int32Array(n.buffer),o=new Uint8Array(n.byteLength),u=0;for(this.asyncStream_=new dp,this.asyncStream_.push(this.decryptChunk_(f.subarray(u,u+e),t,i,o)),u=e;u<f.length;u+=e)i=new Uint32Array([fi(f[u-4]),fi(f[u-3]),fi(f[u-2]),fi(f[u-1])]),this.asyncStream_.push(this.decryptChunk_(f.subarray(u,u+e),t,i,o));this.asyncStream_.push(function(){r(null,function(n){return n.subarray(0,n.byteLength-n[n.byteLength-1])}(o))})}function uu(t,i){return/^[a-z]+:/i.test(i)?i:(/\/\//i.test(t)||(t=ey.buildAbsoluteURL(n.location.href,t)),ey.buildAbsoluteURL(t,i))}function fc(n,t,i){return n&&i.responseURL&&t!==i.responseURL?i.responseURL:t}function ei(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function pft(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)}function ki(n,t){if("function"!=typeof t&&null!==t)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)}function vi(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?n:t}function ec(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)})}function gp(n,t){var r=nw(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=nw(i,t),i.segments&&(u.segments=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]=nw(n[r],u[r-i]);return u}(i.segments,t.segments,t.mediaSequence-i.mediaSequence)),u.segments.forEach(function(n){!function(n,t){n.resolvedUri||(n.resolvedUri=uu(t,n.uri));n.key&&!n.key.resolvedUri&&(n.key.resolvedUri=uu(t,n.key.uri));n.map&&!n.map.resolvedUri&&(n.map.resolvedUri=uu(t,n.map.uri))}(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}function wft(n){for(var t,i=n.playlists.length;i--;)t=n.playlists[i],(n.playlists[t.uri]=t).resolvedUri=uu(n.uri,t.uri),t.id=i,t.attributes||(t.attributes={},dvt.warn("Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute."))}function bft(n){ec(n,function(t){t.uri&&(t.resolvedUri=uu(n.uri,t.uri))})}function kft(n,t){var i=n.segments[n.segments.length-1];return t&&i&&i.duration?1e3*i.duration:500*(n.targetDuration||10)}function ff(n,t){var u=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},r;ei(this,ff);var i=vi(this,(ff.__proto__||Object.getPrototypeOf(ff)).call(this)),f=u.withCredentials,o=void 0!==f&&f,e=u.handleManifestRedirects,s=void 0!==e&&e;if(i.srcUrl=n,i.hls_=t,i.withCredentials=o,i.handleManifestRedirects=s,r=t.options_,i.customTagParsers=r&&r.customTagParsers||[],i.customTagMappers=r&&r.customTagMappers||[],!i.srcUrl)throw new Error("A non-empty playlist URL is required");return i.state="HAVE_NOTHING",i.on("mediaupdatetimeout",function(){"HAVE_METADATA"===i.state&&(i.state="HAVE_CURRENT_METADATA",i.request=i.hls_.xhr({uri:uu(i.master.uri,i.media().uri),withCredentials:i.withCredentials},function(n){if(i.request)return n?i.playlistRequestError(i.request,i.media().uri,"HAVE_METADATA"):void i.haveMetadata(i.request,i.media().uri)}))}),i}function dft(n,t,i){var r,u;return"undefined"==typeof t&&(t=n.mediaSequence+n.segments.length),t<n.mediaSequence?0:(r=function(n,t){var r=0,u=t-n.mediaSequence,i=n.segments[u];if(i){if("undefined"!=typeof i.start)return{result:i.start,precise:!0};if("undefined"!=typeof i.end)return{result:i.end-i.duration,precise:!0}}for(;u--;){if("undefined"!=typeof(i=n.segments[u]).end)return{result:r+i.end,precise:!0};if(r+=i.duration,"undefined"!=typeof i.start)return{result:r+i.start,precise:!0}}return{result:r,precise:!1}}(n,t)).precise?r.result:(u=function(n,t){for(var r=0,i=void 0,u=t-n.mediaSequence;u<n.segments.length;u++){if("undefined"!=typeof(i=n.segments[u]).start)return{result:i.start-r,precise:!0};if(r+=i.duration,"undefined"!=typeof i.end)return{result:i.end-r,precise:!0}}return{result:-1,precise:!1}}(n,t)).precise?u.result:r.result+i}function gft(t,i,r){if(!t)return 0;if("number"!=typeof r&&(r=0),"undefined"==typeof i){if(t.totalDuration)return t.totalDuration;if(!t.endList)return n.Infinity}return dft(t,i,r)}function ro(n,t,i){var u=0,f,e,r;if(i<t&&(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}function net(n){if(!n.segments.length)return 0;for(var t=n.segments.length-1,i=n.segments[t].duration||n.targetDuration,r=i+2*n.targetDuration;t--&&!(r<=(i+=n.segments[t].duration)););return Math.max(0,t)}function tet(n,t,i){if(!n||!n.segments)return null;if(n.endList)return gft(n);if(null===t)return null;t=t||0;var r=i?net(n):n.segments.length;return dft(n,n.mediaSequence+r,t)}function iet(n){return n-Math.floor(n)==0}function ret(n,t){var r,i,u,f;if(iet(t))return t+.1*n;for(r=t.toString().split(".")[1].length,i=1;i<=r;i++)if(u=Math.pow(10,i),f=t*u,iet(f)||i===r)return(f+n)/u}function uet(n){return n.excludeUntil&&n.excludeUntil>Date.now()}function tw(n){return n.excludeUntil&&n.excludeUntil===1/0}function sc(n){var t=uet(n);return!n.disabled&&!t}function fet(n,t){return t.attributes&&t.attributes[n]}function iw(n,t){if(1===n.playlists.length)return!0;var i=t.attributes.BANDWIDTH||Number.MAX_VALUE;return 0===n.playlists.filter(function(n){return!!sc(n)&&(n.attributes.BANDWIDTH||0)<i}).length}function eet(){return function n(t,r){var f,e,u,o;return t=eyt({timeout:45e3},t),f=n.beforeRequest||i.Hls.xhr.beforeRequest,f&&"function"==typeof f&&(e=f(t),e&&(t=e)),u=fyt(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&&"ETIMEDOUT"===n.code&&(u.timedout=!0);n||u.aborted||200===t.statusCode||206===t.statusCode||0===t.statusCode||(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}}function rw(n){var t={};return n.byterange&&(t.Range=function(n){var t;return t=n.offset+n.length-1,"bytes="+n.offset+"-"+t}(n.byterange)),t}function gvt(n,t){var i=n.toString(16);return"00".substring(0,2-i.length)+i+(t%2?" ":"")}function nyt(n){return 32<=n&&n<126?String.fromCharCode(n):"."}function oet(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}function hc(n){var t=n.byterange||{length:1/0,offset:0};return[t.length,t.offset,n.resolvedUri].join(",")}function set(n){return n.resolvedUri}function het(n){for(var i=Array.prototype.slice.call(n),r="",t=0;t<i.length/16;t++)r+=i.slice(16*t,16*t+16).map(gvt).join("")+" "+i.slice(16*t,16*t+16).map(nyt).join("")+"\n";return r}function tyt(n){var e=n.playlist,o=n.time,r=void 0===o?void 0:o,t=n.callback,i,u,f;if(!t)throw new Error("getProgramTime: callback must be provided");return!e||void 0===r?t({message:"getProgramTime: playlist and time must be provided"}):(i=function(n,t){var u;if(!t||!t.segments||0===t.segments.length)return null;for(var r=0,i=void 0,f=0;f<t.segments.length&&!(n<=(r=(i=t.segments[f]).videoTimingInfo?i.videoTimingInfo.transmuxedPresentationEnd:r+i.duration));f++);if(u=t.segments[t.segments.length-1],u.videoTimingInfo&&u.videoTimingInfo.transmuxedPresentationEnd<n)return null;if(r<n){if(n>r+.25*u.duration)return null;i=u}return{segment:i,estimatedStart:i.videoTimingInfo?i.videoTimingInfo.transmuxedPresentationStart:r-i.duration,type:i.videoTimingInfo?"accurate":"estimate"}}(r,e),!i)?t({message:"valid programTime was not found"}):"estimate"===i.type?t({message:"Accurate programTime could not be determined. Please seek to e.seekTime and try again",seekTime:i.estimatedStart}):(u={mediaSeconds:r},f=function(n,t){if(!t.dateTimeObject)return null;var i=t.videoTimingInfo.transmuxerPrependedSeconds,r=n-(t.videoTimingInfo.transmuxedPresentationStart+i);return new Date(t.dateTimeObject.getTime()+1e3*r)}(r,i.segment),f&&(u.programDateTime=f.toISOString()),t(null,u))}function cet(n){var i=n.programTime,r=n.playlist,h=n.retryCount,c=void 0===h?2:h,e=n.seekTo,l=n.pauseAfterSeek,a=void 0===l||l,u=n.tech,t=n.callback,f,o,s,v;if(!t)throw new Error("seekToProgramTime: callback must be provided");if("undefined"==typeof i||!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(!function(n){if(!n.segments||0===n.segments.length)return!1;for(var t=0;t<n.segments.length;t++)if(!n.segments[t].dateTimeObject)return!1;return!0}(r))return t({message:"programDateTime tags must be provided in the manifest "+r.resolvedUri});if(f=function(n,t){var u=void 0,i,f;try{u=new Date(n)}catch(n){return null}if(!t||!t.segments||0===t.segments.length||(i=t.segments[0],u<i.dateTimeObject))return null;for(f=0;f<t.segments.length-1;f++)if(i=t.segments[f],u<t.segments[f+1].dateTimeObject)break;var r=t.segments[t.segments.length-1],e=r.dateTimeObject,o=r.videoTimingInfo?function(n){return n.transmuxedPresentationEnd-n.transmuxedPresentationStart-n.transmuxerPrependedSeconds}(r.videoTimingInfo):r.duration+.25*r.duration;return new Date(e.getTime()+1e3*o)<u?null:(e<u&&(i=r),{segment:i,estimatedStart:i.videoTimingInfo?i.videoTimingInfo.transmuxedPresentationStart:bt.duration(t,t.mediaSequence+t.segments.indexOf(i)),type:i.videoTimingInfo?"accurate":"estimate"})}(i,r),!f)return t({message:i+" was not found in the stream"});if(o=f.segment,s=function(n,t){var i=void 0,r=void 0,u;try{i=new Date(n);r=new Date(t)}catch(n){}return u=i.getTime(),(r.getTime()-u)/1e3}(o.dateTimeObject,i),"estimate"===f.type)return 0===c?t({message:i+" is not buffered yet. Try again"}):(e(f.estimatedStart+s),void u.one("seeked",function(){cet({programTime:i,playlist:r,retryCount:c-1,seekTo:e,pauseAfterSeek:a,tech:u,callback:t})}));v=o.start+s;u.one("seeked",function(){return t(null,u.currentTime())});a&&u.pause();e(v)}function aet(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)}function vet(n,t){return aet(n,function(n,i){return n-uo<=t&&t<=i+uo})}function yet(n,t){return aet(n,function(n){return t<=n-uo})}function uw(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(", ")}function pet(n){for(var i=[],t=0;t<n.length;t++)i.push({start:n.start(t),end:n.end(t)});return i}function ef(n,t,i){var r=void 0,u=void 0;if(i&&i.cues)for(r=i.cues.length;r--;)(u=i.cues[r]).startTime<=t&&u.endTime>=n&&i.removeCue(u)}function wet(n){return isNaN(n)||Math.abs(n)===1/0?Number.MAX_VALUE:n}function iyt(t,r,u){var h=n.WebKitDataCue||n.VTTCue,c,o,s;if((r&&r.forEach(function(n){var t=n.stream;this.inbandTextTracks_[t].addCue(new h(n.startTime+this.timestampOffset,n.endTime+this.timestampOffset,n.text))},t),u)&&(c=wet(t.mediaSource_.duration),u.forEach(function(t){var r=t.cueTime+this.timestampOffset;!("number"!=typeof r||n.isNaN(r)||r<0)&&r<1/0&&t.frames.forEach(function(n){var t=new h(r,r,n.value||n.url||n.data||"");t.frame=n;t.value=n,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}}})}(t);this.metadataTrack_.addCue(t)},this)},t),t.metadataTrack_&&t.metadataTrack_.cues&&t.metadataTrack_.cues.length)){for(var e=t.metadataTrack_.cues,l=[],f=0;f<e.length;f++)e[f]&&l.push(e[f]);o=l.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})})}}function ket(n,t){return function(i){var u=this,f,r;if(!t)return new sf(n);if(sf&&!i)return f=det(t.toString().replace(/^function.+?{/,"").slice(0,-1)),this[fw]=new sf(f),function(n,t){if(n&&t){var i=n.terminate;n.objURL=t;n.terminate=function(){n.objURL&&of.revokeObjectURL(n.objURL);i.call(n)}}}(this[fw],f),this[fw];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}}function det(n){try{return of.createObjectURL(new Blob([n],{type:syt}))}catch(i){var t=new hyt;return t.append(n),of.createObjectURL(t.getBlob(type))}}function get(n){return n.map(function(n){return n.replace(/avc1\.(\d+)\.(\d+)/i,function(n,t,i){return"avc1."+("00"+Number(t).toString(16)).slice(-2)+"00"+("00"+Number(i).toString(16)).slice(-2)})})}function fo(n){var i,r=0<arguments.length&&void 0!==n?n:"",t={codecCount:0};return t.codecCount=r.split(",").length,t.codecCount=t.codecCount||2,(i=/(^|\s|,)+(avc[13])([^ ,]*)/i.exec(r))&&(t.videoCodec=i[2],t.videoObjectTypeIndicator=i[3]),t.audioProfile=/(^|\s|,)+mp4a.[0-9A-Fa-f]+\.([0-9A-Fa-f]+)/i.exec(r),t.audioProfile=t.audioProfile&&t.audioProfile[2],t}function hw(n,t,i){return n+"/"+t+'; codecs="'+i.filter(function(n){return!!n}).join(", ")+'"'}function cyt(n,t){var s=function(n){return n.segments&&n.segments.length&&n.segments[0].map?"mp4":"mp2t"}(t),u=function(n){var t=n.attributes||{};return t.CODECS?fo(t.CODECS):iot}(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))for(l in f=!(c=!0),e)if(!e[l].uri&&!e[l].playlists){f=!0;break}c&&!u.audioProfile&&(f||(u.audioProfile=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 fo(r.playlists[0].attributes.CODECS).audioProfile;return null}(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=iot.audioProfile));r={};u.videoCodec&&(r.video=""+u.videoCodec+u.videoObjectTypeIndicator);u.audioProfile&&(r.audio="mp4a.40."+u.audioProfile);var o=hw("audio",s,[r.audio]),v=hw("video",s,[r.video]),a=hw("video",s,[r.video,r.audio]);return c?!f&&r.video?[v,o]:f||r.video?[a,o]:[o,o]:r.video?[a]:[o]}function not(n){return/mp4a\.\d+.\d+/i.test(n)}function tot(n){return/avc1\.[\da-f]+/i.test(n)}function hf(n,t){var r,u;return ei(this,hf),r=vi(this,(hf.__proto__||Object.getPrototypeOf(hf)).call(this,i.EventTarget)),r.timestampOffset_=0,r.pendingBuffers_=[],r.bufferUpdating_=!1,r.mediaSource_=n,r.codecs_=t,r.audioCodec_=null,r.videoCodec_=null,r.audioDisabled_=!1,r.appendAudioInitSegment_=!0,r.gopBuffer_=[],r.timeMapping_=0,r.safeAppend_=11<=i.browser.IE_VERSION,u={remux:!1,alignGopsAtEnd:r.safeAppend_},r.codecs_.forEach(function(n){not(n)?r.audioCodec_=n:tot(n)&&(r.videoCodec_=n)}),r.transmuxer_=new lyt,r.transmuxer_.postMessage({action:"init",options:u}),r.transmuxer_.onmessage=function(n){return"data"===n.data.action?r.data_(n):"done"===n.data.action?r.done_(n):"gopInfo"===n.data.action?r.appendGopInfo_(n):"videoSegmentTimingInfo"===n.data.action?r.videoSegmentTimingInfo_(n.data.videoSegmentTimingInfo):void 0},Object.defineProperty(r,"timestampOffset",{get:function(){return this.timestampOffset_},set:function(n){"number"==typeof n&&0<=n&&(this.timestampOffset_=n,this.appendAudioInitSegment_=!0,this.gopBuffer_.length=0,this.timeMapping_=0,this.transmuxer_.postMessage({action:"setTimestampOffset",timestampOffset:n}))}}),Object.defineProperty(r,"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(r,"updating",{get:function(){return!!(this.bufferUpdating_||!this.audioDisabled_&&this.audioBuffer_&&this.audioBuffer_.updating||this.videoBuffer_&&this.videoBuffer_.updating)}}),Object.defineProperty(r,"buffered",{get:function(){return function(n,t,r){var e=null,o=null,c=0,f=[],l=[];if(!n&&!t)return i.createTimeRange();if(!n)return t.buffered;if(!t||r)return n.buffered;if(0===n.buffered.length&&0===t.buffered.length)return i.createTimeRange();for(var s=n.buffered,h=t.buffered,u=s.length;u--;)f.push({time:s.start(u),type:"start"}),f.push({time:s.end(u),type:"end"});for(u=h.length;u--;)f.push({time:h.start(u),type:"start"}),f.push({time:h.end(u),type:"end"});for(f.sort(function(n,t){return n.time-t.time}),u=0;u<f.length;u++)"start"===f[u].type?2==++c&&(e=f[u].time):"end"===f[u].type&&1==--c&&(o=f[u].time),null!==e&&null!==o&&(l.push([e,o]),o=e=null);return i.createTimeRanges(l)}(this.videoBuffer_,this.audioBuffer_,this.audioDisabled_)}}),r}function eu(){ei(this,eu);var r=vi(this,(eu.__proto__||Object.getPrototypeOf(eu)).call(this)),u=void 0;for(u in r.nativeMediaSource_=new n.MediaSource,r.nativeMediaSource_)u in eu.prototype||"function"!=typeof r.nativeMediaSource_[u]||(r[u]=r.nativeMediaSource_[u].bind(r.nativeMediaSource_));return r.duration_=NaN,Object.defineProperty(r,"duration",{get:function(){return this.duration_===1/0?this.duration_:this.nativeMediaSource_.duration},set:function(n){(this.duration_=n)===1/0||(this.nativeMediaSource_.duration=n)}}),Object.defineProperty(r,"seekable",{get:function(){return this.duration_===1/0?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;if(r.activeSourceBuffers_.length=0,1===r.sourceBuffers.length)return n=r.sourceBuffers[0],n.appendAudioInitSegment_=!0,n.audioDisabled_=!n.audioCodec_,void r.activeSourceBuffers_.push(n);for(var f=!1,t=!0,i=0;i<r.player_.audioTracks().length;i++)if(u=r.player_.audioTracks()[i],u.enabled&&"main"!==u.kind){t=!(f=!0);break}r.sourceBuffers.forEach(function(n,i){if(n.appendAudioInitSegment_=!0,n.videoCodec_&&n.audioCodec_)n.audioDisabled_=f;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_+'"]');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_),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 i,n,u=wet(r.duration),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_)))}),r}function rot(n,t){var r=i.mediaSources[n];if(!r)throw new Error("Media Source not found (Video.js)");r.trigger({type:"sourceopen",swfId:t})}function lw(){return!!n.MediaSource&&!!n.MediaSource.isTypeSupported&&n.MediaSource.isTypeSupported('video/mp4;codecs="avc1.4d400d,mp4a.40.2"')}function eo(){if(this.MediaSource={open:rot,supportsNativeMediaSources:lw},lw())return new cc;throw new Error("Cannot use create a virtual MediaSource for this video");}function uot(n,t){for(var f,r=void 0,i=yw(n,{duration:t.duration,minimumUpdatePeriod:t.minimumUpdatePeriod}),u=0;u<t.playlists.length;u++)f=gp(i,t.playlists[u]),f?i=f:r=!0;return ec(t,function(n,t,u,f){if(n.playlists&&n.playlists.length){var o=n.playlists[0].uri,e=gp(i,n.playlists[0]);e&&((i=e).mediaGroups[t][u][f].playlists[0]=i.playlists[o],r=!1)}}),r?null:i}function vw(n){var t=n.byterange.offset+n.byterange.length-1;return n.uri+"-"+n.byterange.offset+"-"+t}function fot(n,t){var i,r,e={},o,f,u,s;for(o in n)if(f=n[o].sidx,f){if(u=vw(f),!t[u])break;s=t[u].sidxInfo;i=s;r=f;(Boolean(!i.map&&!r.map)||Boolean(i.map&&r.map&&i.map.byterange.offset===r.map.byterange.offset&&i.map.byterange.length===r.map.byterange.length))&&i.uri===r.uri&&i.byterange.offset===r.byterange.offset&&i.byterange.length===r.byterange.length&&(e[u]=t[u])}return e}function eot(n,t,r,u,f){var e={uri:fc(u.handleManifestRedirects,n.resolvedUri),byterange:n.byterange,playlist:t};return r(i.mergeOptions(e,{responseType:"arraybuffer",headers:rw(e)}),f)}function cf(n,t){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},e=arguments[3];ei(this,cf);var i=vi(this,(cf.__proto__||Object.getPrototypeOf(cf)).call(this)),u=r.withCredentials,o=void 0!==u&&u,f=r.handleManifestRedirects,s=void 0!==f&&f;if(i.hls_=t,i.withCredentials=o,i.handleManifestRedirects=s,!n)throw new Error("A non-empty playlist URL or playlist is required");return i.on("minimumUpdatePeriod",function(){i.refreshXml_()}),i.on("mediaupdatetimeout",function(){i.refreshMedia_(i.media().uri)}),i.state="HAVE_NOTHING",i.loadedPlaylists_={},"string"==typeof n?(i.srcUrl=n,i.sidxMapping_={},vi(i)):(i.setupChildLoader(e,n),i)}function oo(n){return i.log.debug?i.log.debug.bind(i,"VHS:",n+" >"):function(){}}function lf(){}function pw(n,t,i,r){ei(this,pw);this.callbacks_=[];this.pendingCallback_=null;this.timestampOffset_=0;this.mediaSource=n;this.processedAppend_=!1;this.type_=i;this.mimeType_=t;this.logger_=oo("SourceUpdater["+i+"]["+t+"]");"closed"===n.readyState?n.addEventListener("sourceopen",this.createSourceBuffer_.bind(this,t,r)):this.createSourceBuffer_(t,r)}function sot(n){n.forEach(function(n){n.abort()})}function ww(n,t){return t.timedout?{status:t.status,message:"HLS request timed-out at URL: "+t.uri,code:lot,xhr:t}:t.aborted?{status:t.status,message:"HLS request aborted at URL: "+t.uri,code:aot,xhr:t}:n?{status:t.status,message:"HLS request errored at URL: "+t.uri,code:ac,xhr:t}:null}function vyt(n,t,i){var u=0,r=!1;return function(f,e){if(!r)return f?(r=!0,sot(n),i(f,e)):(u+=1)===n.length?(e.endOfAllRequests=Date.now(),e.encryptedBytes?function(n,t,i){n.addEventListener("message",function r(u){if(u.data.source===t.requestId){n.removeEventListener("message",r);var f=u.data.decrypted;return t.bytes=new Uint8Array(f.bytes,f.byteOffset,f.byteLength),i(null,t)}});var r=void 0;r=t.key.bytes.slice?t.key.bytes.slice():new Uint32Array(Array.prototype.slice.call(t.key.bytes));n.postMessage(oet({source:t.requestId,encrypted:t.encryptedBytes,key:r,iv:t.key.iv}),[t.encryptedBytes.buffer,r.buffer])}(t,e,i):i(null,e)):void 0}}function yyt(n,t){return function(r){return n.stats=i.mergeOptions(n.stats,function(n){var i=n.target,t={bandwidth:1/0,bytesReceived:0,roundTripTime:Date.now()-i.requestTime||0};return t.bytesReceived=n.loaded,t.bandwidth=Math.floor(t.bytesReceived/t.roundTripTime*8e3),t}(r)),!n.stats.firstBytesReceivedAt&&n.stats.bytesReceived&&(n.stats.firstBytesReceivedAt=Date.now()),t(r,n)}}function pyt(n,t,r,u,f,e,o){var s=[],h=vyt(s,r,o),l,a,c;return f.key&&!f.key.bytes&&(l=n(i.mergeOptions(t,{uri:f.key.resolvedUri,responseType:"arraybuffer"}),function(n,t){return function(i,r){var f=r.response,e=ww(i,r),u;return e?t(e,n):16!==f.byteLength?t({status:r.status,message:"Invalid HLS key at URL: "+r.uri,code:ac,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))}}(f,h)),s.push(l)),f.map&&!f.map.bytes&&(a=n(i.mergeOptions(t,{uri:f.map.resolvedUri,responseType:"arraybuffer",headers:rw(f.map)}),function(n,t,i){return function(r,u){var e=u.response,f=ww(r,u);return f?i(f,n):0===e.byteLength?i({status:u.status,message:"Empty HLS segment content at URL: "+u.uri,code:ac,xhr:u},n):(n.map.bytes=new Uint8Array(u.response),t&&!t.isInitialized()&&t.init(),n.map.timescales=li.timescale(n.map.bytes),n.map.videoTrackIds=li.videoTrackIds(n.map.bytes),i(null,n))}}(f,u,h)),s.push(a)),c=n(i.mergeOptions(t,{uri:f.resolvedUri,responseType:"arraybuffer",headers:rw(f)}),function(n,t,i){return function(r,u){var o=u.response,e=ww(r,u),f=void 0;return e?i(e,n):0===o.byteLength?i({status:u.status,message:"Empty HLS segment content at URL: "+u.uri,code:ac,xhr:u},n):(n.stats=function(n){return{bandwidth:n.bandwidth,bytesReceived:n.bytesReceived||0,roundTripTime:n.roundTripTime||0}}(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.captions&&(n.captionStreams=f.captionStreams,n.fmp4Captions=f.captions)),i(null,n))}}(f,u,h)),c.addEventListener("progress",yyt(f,e)),s.push(c),function(){return sot(s)}}function hot(t,i){var r;return t&&(r=n.getComputedStyle(t))?r[i]:""}function so(n,t){var i=n.slice();n.sort(function(n,r){var u=t(n,r);return 0===u?i.indexOf(n)-i.indexOf(r):u})}function bw(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),r-(u=u||n.Number.MAX_VALUE)}function cot(n){return"number"==typeof n&&isFinite(n)}function af(n){ei(this,af);var t=vi(this,(af.__proto__||Object.getPrototypeOf(af)).call(this));if(!n)throw new TypeError("Initialization settings are required");if("function"!=typeof n.currentTime)throw new TypeError("No currentTime getter specified");if(!n.mediaSource)throw new TypeError("No MediaSource specified");return 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_="main"===t.loaderType_?new vvt:null,t.decrypter_=n.decrypter,t.syncController_=n.syncController,t.syncPoint_={segmentIndex:0,time:0},t.syncController_.on("syncinfoupdate",function(){return t.trigger("syncinfoupdate")}),t.mediaSource_.addEventListener("sourceopen",function(){return t.ended_=!1}),t.fetchAtBuffer_=!1,t.logger_=oo("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}function vot(n){return decodeURIComponent(escape(String.fromCharCode.apply(null,n)))}function vf(n){var i=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},t;return ei(this,vf),t=vi(this,(vf.__proto__||Object.getPrototypeOf(vf)).call(this,n,i)),t.mediaSource_=null,t.subtitlesTrack_=null,t}function wyt(n,t){for(var r,u=n.cues,i=0;i<u.length;i++)if(r=u[i],t>=r.adStartTime&&t<=r.adEndTime)return r;return null}function yf(){ei(this,yf);var n=vi(this,(yf.__proto__||Object.getPrototypeOf(yf)).call(this));return n.inspectCache_=void 0,n.timelines=[],n.discontinuities=[],n.datetimeToDisplayTime=null,n.logger_=oo("SyncController"),n}function vc(n,t){n.abort();n.pause();t&&t.activePlaylistLoader&&(t.activePlaylistLoader.pause(),t.activePlaylistLoader=null)}function wot(n,t){(t.activePlaylistLoader=n).load()}function dyt(n){function f(){t.AUDIO.onTrackChanged();i.trigger({type:"usage",name:"hls-audio-change"})}var r,u,e;["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(function(t){npt[t](t,n)});var t=n.mediaTypes,o=n.masterPlaylistLoader,i=n.tech,s=n.hls;["AUDIO","SUBTITLES"].forEach(function(i){t[i].activeGroup=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,"undefined"==typeof i?r:null===i?null:r.filter(function(n){return n.id===i.id})[0]||null):null}}(i,n);t[i].activeTrack=tpt[i](i,n);t[i].onGroupChanged=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;vc(f,i);r&&(r.playlistLoader?(f.resyncLoader(),wot(r.playlistLoader,i)):s&&e.resetEverything())}}(i,n);t[i].onTrackChanged=function(n,t){return function(){var f=t.segmentLoaders,r=f[n],o=f.main,i=t.mediaTypes[n],e=i.activeTrack(),u=i.activeGroup(e),s=i.activePlaylistLoader;vc(r,i);u&&(u.playlistLoader?(s!==u.playlistLoader&&(r.track&&r.track(e),r.resetEverything()),wot(u.playlistLoader,i)):o.resetEverything())}}(i,n)});r=t.AUDIO.activeGroup();u=(r.filter(function(n){return n.default})[0]||r[0]).id;for(e in t.AUDIO.tracks[u].enabled=!0,t.AUDIO.onTrackChanged(),o.on("mediachange",function(){["AUDIO","SUBTITLES"].forEach(function(n){return t[n].onGroupChanged()})}),i.audioTracks().addEventListener("change",f),i.remoteTextTracks().addEventListener("change",t.SUBTITLES.onTrackChanged),s.on("dispose",function(){i.audioTracks().removeEventListener("change",f);i.remoteTextTracks().removeEventListener("change",t.SUBTITLES.onTrackChanged)}),i.clearTracks("audio"),t.AUDIO.tracks)i.audioTracks().addTrack(t.AUDIO.tracks[e])}function pf(n){var r;ei(this,pf);var t=vi(this,(pf.__proto__||Object.getPrototypeOf(pf)).call(this)),u=n.url,o=n.handleManifestRedirects,e=n.withCredentials,f=n.tech,s=n.bandwidth,h=n.externHls,c=n.useCueTags,l=n.blacklistDuration,a=n.enableLowInitialPlaylist,v=n.sourceType,y=n.seekTo,p=n.cacheEncryptionKeys;if(!u)throw new Error("A non-empty playlist URL is required");return er=h,t.withCredentials=e,t.tech_=f,t.hls_=f.hls,t.seekTo_=y,t.sourceType_=v,t.useCueTags_=c,t.blacklistDuration=l,t.enableLowInitialPlaylist=a,t.useCueTags_&&(t.cueTagsTrack_=t.tech_.addTextTrack("metadata","ad-cues"),t.cueTagsTrack_.inBandMetadataTrackDispatchType=""),t.requestOptions_={withCredentials:e,handleManifestRedirects:o,timeout:null},t.mediaTypes_=function(){var n={};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(function(t){n[t]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:lf,activeTrack:lf,onGroupChanged:lf,onTrackChanged:lf}}),n}(),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 kyt(n),t.segmentMetadataTrack_=f.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},!1).track,t.decrypter_=new gyt,t.inbandTextTracks_={},r={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:s,syncController:t.syncController_,decrypter:t.decrypter_,sourceType:t.sourceType_,inbandTextTracks:t.inbandTextTracks_,cacheEncryptionKeys:p},t.masterPlaylistLoader_="dash"===t.sourceType_?new lc(u,t.hls_,t.requestOptions_):new oc(u,t.hls_,t.requestOptions_),t.setupMasterPlaylistLoaderListeners_(),t.mainSegmentLoader_=new kw(i.mergeOptions(r,{segmentMetadataTrack:t.segmentMetadataTrack_,loaderType:"main"}),n),t.audioSegmentLoader_=new kw(i.mergeOptions(r,{loaderType:"audio"}),n),t.subtitleSegmentLoader_=new yot(i.mergeOptions(r,{loaderType:"vtt"}),n),t.setupSegmentLoaderListeners_(),ipt.forEach(function(n){t[n+"_"]=function(n){return this.audioSegmentLoader_[n]+this.mainSegmentLoader_[n]}.bind(t,n)}),t.logger_=oo("MPC"),t.masterPlaylistLoader_.load(),t}function kot(n,t,i){var r,f,u;ei(this,kot);r=n.masterPlaylistController_;f=r[(n.options_.smoothQualityChange?"smooth":"fast")+"QualityChange_"].bind(r);t.attributes.RESOLUTION&&(u=t.attributes.RESOLUTION,this.width=u.width,this.height=u.height);this.bandwidth=t.attributes.BANDWIDTH;this.id=i;this.enabled=function(n,t,i){return function(r){var u=n.master.playlists[t],e=tw(u),f=sc(u);return"undefined"==typeof r?f:(r?delete u.disabled:u.disabled=!0,r===f||e||(i(),r?n.trigger("renditionenabled"):n.trigger("renditiondisabled")),r)}}(n.playlists,t.uri,f)}function nb(t){function r(){return i.monitorCurrentTime_()}function u(){return i.techWaiting_()}function f(){return i.cancelTimer_()}function e(){return i.fixesBadSeeks_()}var i=this;ei(this,nb);this.tech_=t.tech;this.seekable=t.seekable;this.seekTo=t.seekTo;this.allowSeeksWithinUnsafeLiveWindow=t.allowSeeksWithinUnsafeLiveWindow;this.media=t.media;this.consecutiveUpdates=0;this.lastRecordedTime=null;this.timer_=null;this.checkCurrentTimeTimeout_=null;this.logger_=oo("PlaybackWatcher");this.logger_("initialize");this.tech_.on("seekablechanged",e);this.tech_.on("waiting",u);this.tech_.on(gw,f);this.tech_.on("canplay",r);this.dispose=function(){i.logger_("dispose");i.tech_.off("seekablechanged",e);i.tech_.off("waiting",u);i.tech_.off(gw,f);i.tech_.off("canplay",r);i.checkCurrentTimeTimeout_&&n.clearTimeout(i.checkCurrentTimeTimeout_);i.cancelTimer_()}}function got(n){!function t(n,r){function s(){f&&n.currentTime(f)}function c(t){null!=t&&(f=n.duration()!==1/0&&n.currentTime()||0,n.one("loadedmetadata",s),n.src(t),n.trigger({type:"usage",name:"hls-error-reload"}),n.play())}function h(){if(Date.now()-o<1e3*u.errorInterval)n.trigger({type:"usage",name:"hls-error-reload-canceled"});else{if(u.getSource&&"function"==typeof u.getSource)return o=Date.now(),u.getSource.call(n,c);i.log.error("ERROR: reloadSourceOnError - The option getSource must be a function!")}}function e(){n.off("loadedmetadata",s);n.off("error",h);n.off("dispose",e)}var o=0,f=0,u=i.mergeOptions(nst,r);n.ready(function(){n.trigger({type:"usage",name:"hls-error-reload-initialized"})});n.on("error",h);n.on("dispose",e);n.reloadSourceOnError=function(i){e();t(n,i)}}(this,n)}function tst(n){return/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i.test(n)?"hls":/^application\/dash\+xml/i.test(n)?"dash":null}function ist(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"})}function upt(n){var t,r;"dash"===n.options_.sourceType&&(t=i.players[n.tech_.options_.playerId],t.eme&&(r=function(n,t,r){var f,u;if(!n)return n;f={};for(u in n)f[u]={audioContentType:'audio/mp4; codecs="'+r.attributes.CODECS+'"',videoContentType:'video/mp4; codecs="'+t.attributes.CODECS+'"'},t.contentProtection&&t.contentProtection[u]&&t.contentProtection[u].pssh&&(f[u].pssh=t.contentProtection[u].pssh),"string"==typeof n[u]&&(f[u].url=n[u]);return i.mergeOptions(n,f)}(n.source_.keySystems,n.playlists.media(),n.masterPlaylistController_.mediaTypes_.AUDIO.activePlaylistLoader.media()),r&&(t.currentSource().keySystems=r,t.eme.initializeMediaKeys&&t.eme.initializeMediaKeys())))}function rst(){if(!window.localStorage)return null;var n=window.localStorage.getItem(tb);if(!n)return null;try{return JSON.parse(n)}catch(n){return null}}function or(n,r,u){var f,e;if(ei(this,or),f=vi(this,(or.__proto__||Object.getPrototypeOf(or)).call(this,r,u.hls)),r.options_&&r.options_.playerId&&(e=i(r.options_.playerId),e.hasOwnProperty("hls")||Object.defineProperty(e,"hls",{get:function(){return i.log.warn("player.hls is deprecated. Use player.tech().hls instead."),r.trigger({type:"usage",name:"hls-player-access"}),f},configurable:!0}),e.vhs=f,(e.dash=f).player_=e),f.tech_=r,f.source_=n,f.stats={},f.setOptions_(),f.options_.overrideNative&&r.overrideNativeAudioTracks&&r.overrideNativeVideoTracks)r.overrideNativeAudioTracks(!0),r.overrideNativeVideoTracks(!0);else if(f.options_.overrideNative&&(r.featuresNativeVideoTracks||r.featuresNativeAudioTracks))throw new Error("Overriding native HLS requires emulated tracks. See https://git.io/vMpjB");return f.on(t,["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],function(){var n=t.fullscreenElement||t.webkitFullscreenElement||t.mozFullScreenElement||t.msFullscreenElement;n&&n.contains(f.tech_.el())&&f.masterPlaylistController_.smoothQualityChange_()}),f.on(f.tech_,"seeking",function(){0===this.tech_.currentTime()&&this.tech_.player_.loop()&&this.setCurrentTime(0)}),f.on(f.tech_,"error",function(){this.masterPlaylistController_&&this.masterPlaylistController_.pauseLoading()}),f.on(f.tech_,"play",f.play),f}var nl,rk,te,tr,ck,lk,r,ue,ar,ud,ed,od,vr,sd,yu,dt,wu,et,ts,pa,un,fn,bu,w,sn,cn,le,ln,ae,an,vn,yn,ii,tv,pn,iv,fs,br,es,os,bn,ss,kn,rv,hs,dn,gn,cs,uv,ls,fv,ev,ov,ntt,as,sv,hv,cv,vs,ys,ps,ttt,du,gu,lv,kr,av,ws,bs,ks,ds,gs,vv,nh,yv,pv,th,wv,bv,itt,ve,kv,vtt,ytt,ptt,ye,iy,ktt,gtt,tt,nf,fy,pe,oh,ey,ci,yy,wit,bit,kit,dit,gr,tu,ph,it,up,kh,fp,nft,tft,ep,dh,op,ui,sp,hp,gh,ift,cp,rft,ot,sft,hft,gt,lft,kp,aft,dp,yft,oi,ew,ow,sw,cc,cw,aw,yw,lc,oot,dw,yot,gw,dot,nst,yt,tb,ust,ib,pc;n=n&&n.hasOwnProperty("default")?n.default:n;t=t&&t.hasOwnProperty("default")?t.default:t;var rb="7.6.3",ti=[],ub=function(t,i){return function(r,u,f){var o=i.levels[u],s=new RegExp("^("+o+")$"),e;("log"!==r&&f.unshift(r.toUpperCase()+":"),f.unshift(t+":"),ti&&ti.push([].concat(f)),n.console)&&(e=n.console[r],e||"debug"!==r||(e=n.console.info||n.console.log),e&&o&&s.test(r)&&e[Array.isArray(f)?"apply":"call"](n.console,f))}},a=function eb(n){function t(){for(var t=arguments.length,u=new Array(t),n=0;n<t;n++)u[n]=arguments[n];r("log",i,u)}var r,i="info";return r=ub(n,t),t.createLogger=function(t){return eb(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("string"==typeof n){if(!t.levels.hasOwnProperty(n))throw new Error('"'+n+'" in not a valid log level');i=n}return i},(t.history=function(){return ti?[].concat(ti):[]}).filter=function(n){return(ti||[]).filter(function(t){return new RegExp(".*"+n+".*").test(t[0])})},t.history.clear=function(){ti&&(ti.length=0)},t.history.disable=function(){null!==ti&&(ti.length=0,ti=null)},t.history.enable=function(){null===ti&&(ti=[])},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}("VIDEOJS"),fb=a.createLogger,eb=Object.prototype.toString,ob=function(n){return di(n)?Object.keys(n):[]};var gi=lb("querySelector"),nk=lb("querySelectorAll"),tk=Object.freeze({isReal:su,isEl:bf,isInFrame:cb,createEl:nt,textContent:hu,prependTo:wc,hasClass:sr,addClass:yi,removeClass:kf,toggleClass:ab,setAttributes:vb,getAttributes:pi,getAttribute:yb,setAttribute:df,removeAttribute:co,blockTextSelection:pb,unblockTextSelection:wb,getBoundingClientRect:gf,findPosition:bb,getPointerPosition:bc,isTextNode:kb,emptyEl:kc,normalizeContent:db,appendContent:dc,insertContent:gb,isSingleLeftClick:cu,$:gi,$$:nk}),st=new WeakMap,fst=1;nl=!1;!function(){try{var t=Object.defineProperty({},"passive",{get:function(){nl=!0}});n.addEventListener("test",null,t);n.removeEventListener("test",null,t)}catch(t){}}();rk=["touchstart","touchmove"];var tl,est=Object.freeze({fixEvent:lo,on:kt,off:ut,trigger:lu,one:ne,any:uk}),il=!1,ost=function(){var r,u,n;if(su()&&!1!==tl.options.autoSetup){var f=Array.prototype.slice.call(t.getElementsByTagName("video")),e=Array.prototype.slice.call(t.getElementsByTagName("audio")),o=Array.prototype.slice.call(t.getElementsByTagName("video-js")),i=f.concat(e,o);if(i&&0<i.length)for(r=0,u=i.length;r<u;r++){if(n=i[r],!n||!n.getAttribute){rl(1);break}void 0===n.player&&null!==n.getAttribute("data-setup")&&tl(n)}else il||rl(1)}};su()&&"complete"===t.readyState?il=!0:ne(n,"load",function(){il=!0});ht.prototype.allowedEvents_={};ht.prototype.addEventListener=ht.prototype.on=function(n,t){var i=this.addEventListener;this.addEventListener=function(){};kt(this,n,t);this.addEventListener=i};ht.prototype.removeEventListener=ht.prototype.off=function(n,t){ut(this,n,t)};ht.prototype.one=function(n,t){var i=this.addEventListener;this.addEventListener=function(){};ne(this,n,t);this.addEventListener=i};ht.prototype.any=function(n,t){var i=this.addEventListener;this.addEventListener=function(){};uk(this,n,t);this.addEventListener=i};ht.prototype.dispatchEvent=ht.prototype.trigger=function(n){var t=n.type||n;"string"==typeof n&&(n={type:t});n=lo(n);this.allowedEvents_[t]&&this["on"+t]&&this["on"+t](n);lu(this,n)};ht.prototype.queueTrigger=function(t){var u=this,r,i,f,e;te=te||new Map;r=t.type||t;i=te.get(this);i||(i=new Map,te.set(this,i));f=i.get(r);i.delete(r);n.clearTimeout(f);e=n.setTimeout(function(){0===i.size&&(i=null,te.delete(u));u.trigger(t)},0);i.set(r,e)};tr=function(n){return n instanceof ht||!!n.eventBusEl_&&["on","one","off","trigger"].every(function(t){return"function"==typeof n[t]})};ck={on:function(){for(var f=this,e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];var t=fl(this,o),c=t.isTargetingSelf,r=t.target,s=t.type,i=t.listener;if(cr(r,"on",s,i),!c){function u(){return f.off(r,s,i)}u.guid=i.guid;function h(){return f.off("dispose",u)}h.guid=i.guid;cr(this,"on","dispose",u);cr(r,"on","dispose",h)}},one:function(){for(var s=this,e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];var t=fl(this,o),h=t.isTargetingSelf,i=t.target,r=t.type,u=t.listener;if(h)cr(i,"one",r,u);else{function f(){s.off(i,r,f);for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];u.apply(null,e)}f.guid=u.guid;cr(i,"one",r,f)}},any:function(){for(var s=this,e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];var t=fl(this,o),h=t.isTargetingSelf,i=t.target,r=t.type,u=t.listener;if(h)cr(i,"any",r,u);else{function f(){s.off(i,r,f);for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];u.apply(null,e)}f.guid=u.guid;cr(i,"any",r,f)}},off:function(n,t,i){if(!n||ok(n))ut(this.eventBusEl_,n,t);else{var r=n,u=t;ul(r);sk(u);hk(i);i=c(this,i);this.off("dispose",i);r.nodeName?(ut(r,u,i),ut(r,"dispose",i)):tr(r)&&(r.off(u,i),r.off("dispose",i))}},trigger:function(n,t){return lu(this.eventBusEl_,n,t)}};lk={state:{},setState:function(n){var t,i=this;return"function"==typeof n&&(n=n()),ou(n,function(n,r){i.state[r]!==n&&((t=t||{})[r]={from:i.state[r],to:n});i.state[r]=n}),t&&tr(this)&&this.trigger({changes:t,type:"statechanged"}),t}};r=function(){function i(n,t,i){if(this.player_=!n&&this.play?n=this:n,this.parentComponent_=null,this.options_=p({},this.options_),t=this.options_=p(this.options_,t),this.id_=t.id||t.el&&t.el.id,!this.id_){var r=n&&n.id&&n.id()||"no_player";this.id_=r+"_component_"+hr()}this.name_=t.name||null;t.el?this.el_=t.el:!1!==t.createEl&&(this.el_=this.createEl());!1!==t.evented&&el(this,{eventBusKey:this.el_?"el_":null});ak(this,this.constructor.defaultState);this.children_=[];this.childIndex_={};this.childNameIndex_={};this.setTimeoutIds_=new Set;this.setIntervalIds_=new Set;this.rafIds_=new Set;(this.clearingTimersOnDispose_=!1)!==t.initChildren&&this.initChildren();this.ready(i);!1!==t.reportTouchActivity&&this.enableTouchActivity()}var t=i.prototype;return t.dispose=function(){if(this.trigger({type:"dispose",bubbles:!1}),this.children_)for(var n=this.children_.length-1;0<=n;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_),st.has(this.el_)&&st.delete(this.el_),this.el_=null);this.player_=null},t.player=function(){return this.player_},t.options=function(n){return n&&(this.options_=p(this.options_,n)),this.options_},t.el=function(){return this.el_},t.createEl=function(n,t,i){return nt(n,t,i)},t.localize=function(n,t,i){void 0===i&&(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"undefined"==typeof r&&(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(void 0===t&&(t={}),void 0===r&&(r=this.children_.length),"string"==typeof n){if(f=g(n),o=t.componentClass||f,t.name=f,e=i.getComponent(o),!e)throw new Error("Component "+o+" does not exist");if("function"!=typeof e)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,"function"==typeof u.id&&(this.childIndex_[u.id()]=u),(f=f||u.name&&g(u.name()))&&(this.childNameIndex_[f]=u,this.childNameIndex_[ao(f)]=u),"function"==typeof u.el&&u.el())&&(s=this.contentEl().children[r]||null,this.contentEl().insertBefore(u.el(),s)),u},t.removeChild=function(n){var i,t,r;if("string"==typeof n&&(n=this.getChild(n)),n&&this.children_){for(i=!1,t=this.children_.length-1;0<=t;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_[g(n.name())]=null,this.childNameIndex_[ao(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,u,r,f;n&&(r=this.options_,f=i.getComponent("Tech"),(u=Array.isArray(n)?n:Object.keys(n)).concat(Object.keys(this.options_).filter(function(n){return!u.some(function(t){return"string"==typeof t?n===t:n===t.name})})).map(function(i){var r,u;return u="string"==typeof i?n[r=i]||t.options_[r]||{}:(r=i.name,i),{name:r,opts:u}}).filter(function(n){var t=i.getComponent(n.opts.componentClass||g(n.name));return t&&!f.isTech(t)}).forEach(function(n){var u=n.name,i=n.opts,f;(void 0!==r[u]&&(i=r[u]),!1!==i)&&(!0===i&&(i={}),i.playerOptions=t.options_.playerOptions,f=t.addChild(u,i),f&&(t[u]=f))}))},t.buildCSSClass=function(){return""},t.ready=function(n,t){if(void 0===t&&(t=!1),n)return this.isReady_?void(t?n.call(this):this.setTimeout(n,1)):(this.readyQueue_=this.readyQueue_||[],void this.readyQueue_.push(n))},t.triggerReady=function(){this.isReady_=!0;this.setTimeout(function(){var n=this.readyQueue_;this.readyQueue_=[];n&&0<n.length&&n.forEach(function(n){n.call(this)},this);this.trigger("ready")},1)},t.$=function(n,t){return gi(n,t||this.contentEl())},t.$$=function(n,t){return nk(n,t||this.contentEl())},t.hasClass=function(n){return sr(this.el_,n)},t.addClass=function(n){yi(this.el_,n)},t.removeClass=function(n){kf(this.el_,n)},t.toggleClass=function(n,t){ab(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 yb(this.el_,n)},t.setAttribute=function(n,t){df(this.el_,n,t)},t.removeAttribute=function(n){co(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(void 0!==t)return null!==t&&t==t||(t=0),this.el_.style[n]=-1!==(""+t).indexOf("%")||-1!==(""+t).indexOf("px")?t:"auto"===t?"":t+"px",void(i||this.trigger("componentresize"));if(!this.el_)return 0;var r=this.el_.style[n],u=r.indexOf("px");return-1!==u?parseInt(r.slice(0,u),10):parseInt(this.el_["offset"+g(n)],10)},t.currentDimension=function(n){var t=0,i;if("width"!==n&&"height"!==n)throw new Error("currentDimension only accepts width or height value");return(t=ho(this.el_,n),0===(t=parseFloat(t))||isNaN(t))&&(i="offset"+g(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(){function u(){t=!1}var t,r=0,i=null;this.on("touchstart",function(u){1===u.touches.length&&(i={pageX:u.touches[0].pageX,pageY:u.touches[0].pageY},r=n.performance.now(),t=!0)});this.on("touchmove",function(n){if(1<n.touches.length)t=!1;else if(i){var r=n.touches[0].pageX-i.pageX,u=n.touches[0].pageY-i.pageY;10<Math.sqrt(r*r+u*u)&&(t=!1)}});this.on("touchleave",u);this.on("touchcancel",u);this.on("touchend",function(u){!(i=null)===t&&n.performance.now()-r<200&&(u.preventDefault(),this.trigger("tap"))})},t.enableTouchActivity=function(){if(this.player()&&this.player().reportUserActivity){var t,n=c(this.player(),this.player().reportUserActivity);this.on("touchstart",function(){n();this.clearInterval(t);t=this.setInterval(n,250)});function i(){n();this.clearInterval(t)}this.on("touchmove",n);this.on("touchend",i);this.on("touchcancel",i)}},t.setTimeout=function(t,i){var r,u=this;return t=c(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=c(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 i,r=this;return this.supportsRaf_?(this.clearTimersOnDispose_(),t=c(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;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 r,u,f;if("string"!=typeof n||!n)throw new Error('Illegal component name, "'+n+'"; must be a non-empty string.');var e,o=i.getComponent("Tech"),s=o&&o.isTech(t),h=i===t||i.prototype.isPrototypeOf(t.prototype);if(s||!h)throw e=s?"techs must be registered using Tech.registerTech()":"must be a Component subclass",new Error('Illegal component, "'+n+'"; '+e+".");if(n=g(n),i.components_||(i.components_={}),r=i.getComponent("Player"),"Player"===n&&r&&r.players&&(u=r.players,f=Object.keys(u),u&&0<f.length&&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_[ao(n)]=t},i.getComponent=function(n){if(n&&i.components_)return i.components_[n]},i}();r.prototype.supportsRaf_="function"==typeof n.requestAnimationFrame&&"function"==typeof n.cancelAnimationFrame;r.registerComponent("Component",r);for(var ol,sl,hl,cl,ft=n.navigator&&n.navigator.userAgent||"",pk=/AppleWebKit\/([\d.]+)/i.exec(ft),sst=pk?parseFloat(pk.pop()):null,ll=/iPad/i.test(ft),al=/iPhone/i.test(ft)&&!ll,wk=/iPod/i.test(ft),si=al||ll||wk,hst=(ol=ft.match(/OS (\d+)_/i))&&ol[1]?ol[1]:null,ir=/Android/i.test(ft),vl=function(){var n=ft.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||null):null}(),bk=ir&&vl<5&&sst<537,kk=/Firefox/i.test(ft),yl=/Edge/i.test(ft),wi=!yl&&(/Chrome/i.test(ft)||/CriOS/i.test(ft)),dk=(sl=ft.match(/(Chrome|CriOS)\/(\d+)/))&&sl[2]?parseFloat(sl[2]):null,pl=(hl=/MSIE\s(\d+)\.\d/.exec(ft),!(cl=hl&&parseFloat(hl[1]))&&/Trident\/7.0/i.test(ft)&&/rv:11.0/.test(ft)&&(cl=11),cl),gk=/Safari/i.test(ft)&&!wi&&!ir&&!yl,wl=(gk||si)&&!wi,nd=/Windows/i.test(ft),ie=su()&&(("ontouchstart"in n)||n.navigator.maxTouchPoints||n.DocumentTouch&&n.document instanceof n.DocumentTouch),cst=Object.freeze({IS_IPAD:ll,IS_IPHONE:al,IS_IPOD:wk,IS_IOS:si,IOS_VERSION:hst,IS_ANDROID:ir,ANDROID_VERSION:vl,IS_NATIVE_ANDROID:bk,IS_FIREFOX:kk,IS_EDGE:yl,IS_CHROME:wi,CHROME_VERSION:dk,IE_VERSION:pl,IS_SAFARI:gk,IS_ANY_SAFARI:wl,IS_WINDOWS:nd,TOUCH_ENABLED:ie}),re,kl={prefixed:!0},vo=[["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"]],rd=vo[0],yo=0;yo<vo.length;yo++)if(vo[yo][1]in t){re=vo[yo];break}if(re){for(ue=0;ue<re.length;ue++)kl[rd[ue]]=re[ue];kl.prefixed=re[0]!==rd[0]}for(ct.prototype.code=0,ct.prototype.message="",ct.prototype.status=null,ct.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],ct.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."},ar=0;ar<ct.errorTypes.length;ar++)ct[ct.errorTypes[ar]]=ar,ct.prototype[ct.errorTypes[ar]]=ar;ud=function(n,t){var i,r=null;try{i=JSON.parse(n,t)}catch(n){r=n}return[r,i]};ed=function(n){var t=n.$$("track"),i=Array.prototype.map.call(t,function(n){return n.track});return Array.prototype.map.call(t,function(n){var t=fd(n.track);return n.src&&(t.src=n.src),t}).concat(Array.prototype.filter.call(n.textTracks(),function(n){return-1===i.indexOf(n)}).map(fd))};od=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()};var o=dl(function(n,t){function o(n){var i,e,t;return(n&&"object"==typeof n&&(i=n.which||n.keyCode||n.charCode,i&&(n=i)),"number"==typeof n)?f[n]:(t=String(n),(e=r[t.toLowerCase()])?e:(e=u[t.toLowerCase()])||(1===t.length?t.charCodeAt(0):void 0))}var r,u,i,f,e;for(o.isEventKey=function(n,t){var i,f;if(n&&"object"==typeof n){if(i=n.which||n.keyCode||n.charCode,null==i)return!1;if("string"==typeof t){if((f=r[t.toLowerCase()])||(f=u[t.toLowerCase()]))return f===i}else if("number"==typeof t)return t===i;return!1}},r=(t=n.exports=o).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]}),gl=(o.code,o.codes,o.aliases,o.names,o.title,"vjs-modal-dialog"),au=function(i){function u(n,t){var r;return(r=i.call(this,n,t)||this).opened_=r.hasBeenOpened_=r.hasBeenFilled_=!1,r.closeable(!r.options_.uncloseable),r.content(r.options_.content),r.contentEl_=nt("div",{className:gl+"-content"},{role:"document"}),r.descEl_=nt("p",{className:gl+"-description vjs-control-text",id:r.el().getAttribute("aria-describedby")}),hu(r.descEl_,r.description()),r.el_.appendChild(r.descEl_),r.el_.appendChild(r.contentEl_),r}f(u,i);var r=u.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 gl+" 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"boolean"==typeof n&&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;return"boolean"==typeof n&&(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())),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();gb(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");kc(this.contentEl());this.trigger("modalempty")},r.content=function(n){return"undefined"!=typeof n&&(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){if(n.stopPropagation(),o.isEventKey(n,"Escape")&&this.closeable())return n.preventDefault(),void this.close();if(o.isEventKey(n,"Tab")){for(var r,i=this.focusableEls_(),f=this.el_.querySelector(":focus"),u=0;u<i.length;u++)if(f===i[u]){r=u;break}t.activeElement===this.el_&&(r=0);n.shiftKey&&0===r?(i[i.length-1].focus(),n.preventDefault()):n.shiftKey||r!==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")&&-1!==t.getAttribute("tabindex")||t.hasAttribute("contenteditable")})},u}(r);au.prototype.options_={pauseOnOpen:!0,temporary:!0};r.registerComponent("ModalDialog",au);vr=function(n){function t(t){var i,r;for(void 0===t&&(t=[]),(i=n.call(this)||this).tracks_=[],Object.defineProperty(s(i),"length",{get:function(){return this.tracks_.length}}),r=0;r<t.length;r++)i.addTrack(t[r]);return i}f(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]}});-1===this.tracks_.indexOf(n)&&(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]).off&&i.off();this.tracks_.splice(t,1);break}i&&this.trigger({track:i,type:"removetrack",target:this})},i.getTrackById=function(n){for(var i,r=null,t=0,u=this.length;t<u;t++)if(i=this[t],i.id===n){r=i;break}return r},t}(ht);for(sd in vr.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack"},vr.prototype.allowedEvents_)vr.prototype["on"+sd]=null;var lst=function(n){function t(t){var r,i;for(void 0===t&&(t=[]),i=t.length-1;0<=i;i--)if(t[i].enabled){na(t,t[i]);break}return(r=n.call(this,t)||this).changing_=!1,r}f(t,n);var i=t.prototype;return i.addTrack=function(t){var i=this;t.enabled&&na(this,t);n.prototype.addTrack.call(this,t);t.addEventListener&&(t.enabledChange_=function(){i.changing_||(i.changing_=!0,na(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}(vr),ast=function(n){function t(t){var r,i;for(void 0===t&&(t=[]),i=t.length-1;0<=i;i--)if(t[i].selected){ta(t,t[i]);break}return(r=n.call(this,t)||this).changing_=!1,Object.defineProperty(s(r),"selectedIndex",{get:function(){for(var n=0;n<this.length;n++)if(this[n].selected)return n;return-1},set:function(){}}),r}f(t,n);var i=t.prototype;return i.addTrack=function(t){var i=this;t.selected&&ta(this,t);n.prototype.addTrack.call(this,t);t.addEventListener&&(t.selectedChange_=function(){i.changing_||(i.changing_=!0,ta(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}(vr),cd=function(n){function t(){return n.apply(this,arguments)||this}f(t,n);var i=t.prototype;return i.addTrack=function(t){var i=this;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_);-1===["metadata","chapters"].indexOf(t.kind)&&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}(vr),vst=function(){function t(n){void 0===n&&(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]}});-1===this.trackElements_.indexOf(n)&&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&&"function"==typeof this.trackElements_[t].track.off&&this.trackElements_[t].track.off();"function"==typeof this.trackElements_[t].off&&this.trackElements_[t].off();this.trackElements_.splice(t,1);break}},t}(),ld=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){function u(n){""+n in this||Object.defineProperty(this,""+n,{get:function(){return this.cues_[n]}})}var i=this.length||0,t=0,r=n.length;if(this.cues_=n,this.length_=n.length,i<r)for(t=i;t<r;t++)u.call(this,t)},t.getCueById=function(n){for(var i,r=null,t=0,u=this.length;t<u;t++)if(i=this[t],i.id===n){r=i;break}return r},n}(),yst={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},pst={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},wst={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},ad={disabled:"disabled",hidden:"hidden",showing:"showing"},ua=function(n){function t(t){function f(n){Object.defineProperty(s(i),n,{get:function(){return r[n]},set:function(){}})}var i,r,u;void 0===t&&(t={});i=n.call(this)||this;r={id:t.id||"vjs_track_"+hr(),kind:t.kind||"",label:t.label||"",language:t.language||""};for(u in r)f(u);return i}return f(t,n),t}(ht),bst=Object.freeze({parseUrl:ia,getAbsoluteURL:hd,getFileExtension:ra,isCrossOrigin:po}),kst=function(n){var t=dst.call(n);return"[object Function]"===t||"function"==typeof n&&"[object RegExp]"!==t||"undefined"!=typeof window&&(n===window.setTimeout||n===window.alert||n===window.confirm||n===window.prompt)},dst=Object.prototype.toString;var yd,fa=Array.prototype.slice,gst=Object.prototype.toString,ea=Function.prototype.bind||function(n){var t=this;if("function"!=typeof t||"[object Function]"!==gst.call(t))throw new TypeError("Function.prototype.bind called on incompatible "+t);for(var i,r=fa.call(arguments,1),o=Math.max(0,t.length-r.length),e=[],u=0;u<o;u++)e.push("$"+u);if(i=Function("binder","return function ("+e.join(",")+"){ return binder.apply(this,arguments); }")(function(){if(this instanceof i){var u=t.apply(this,r.concat(fa.call(arguments)));return Object(u)===u?u:this}return t.apply(n,r.concat(fa.call(arguments)))}),t.prototype){function f(){}f.prototype=t.prototype;i.prototype=new f;f.prototype=null}return i},pd=Object.prototype.toString;if(!Object.keys){function oa(n){var t=n.constructor;return t&&t.prototype===n}var wo=Object.prototype.hasOwnProperty,wd=Object.prototype.toString,nht=vd,bd=Object.prototype.propertyIsEnumerable,tht=!bd.call({toString:null},"toString"),iht=bd.call(function(){},"prototype"),bo=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],rht={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},uht=function(){if("undefined"==typeof window)return!1;for(var n in window)try{if(!rht["$"+n]&&wo.call(window,n)&&null!==window[n]&&"object"==typeof window[n])try{oa(window[n])}catch(n){return!0}}catch(n){return!0}return!1}();yd=function(n){var e=null!==n&&"object"==typeof n,o="[object Function]"===wd.call(n),s=nht(n),l=e&&"[object String]"===wd.call(n),i=[],h,r,u,f,c,t;if(!e&&!o&&!s)throw new TypeError("Object.keys called on a non-object");if(h=iht&&o,l&&0<n.length&&!wo.call(n,0))for(r=0;r<n.length;++r)i.push(String(r));if(s&&0<n.length)for(u=0;u<n.length;++u)i.push(String(u));else for(f in n)h&&"prototype"===f||!wo.call(n,f)||i.push(String(f));if(tht)for(c=function(n){if("undefined"==typeof window||!uht)return oa(n);try{return oa(n)}catch(n){return!1}}(n),t=0;t<bo.length;++t)c&&"constructor"===bo[t]||!wo.call(n,bo[t])||i.push(bo[t]);return i}}var fht=yd,eht=Array.prototype.slice,kd=Object.keys,ko=kd?function(n){return kd(n)}:fht,dd=Object.keys;ko.shim=function(){return Object.keys?function(){var n=Object.keys(arguments);return n&&n.length===arguments.length}(1,2)||(Object.keys=function(n){return vd(n)?dd(eht.call(n)):dd(n)}):Object.keys=ko,Object.keys||ko};var sht=ko,hht="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),cht=Object.prototype.toString,lht=Array.prototype.concat,sa=Object.defineProperty,ng=sa&&function(){var n={},t;try{for(t in sa(n,"x",{enumerable:!1,value:n}),n)return!1;return n.x===n}catch(n){return!1}}();gd.supportsDescriptors=!!ng;var e,fg=gd,aht=Object.getOwnPropertyDescriptor?function(){return Object.getOwnPropertyDescriptor(arguments,"callee").get}():function(){throw new TypeError;},yr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator,pr=Object.getPrototypeOf||function(n){return n.__proto__},la="undefined"==typeof Uint8Array?e:pr(Uint8Array),aa={"$ %Array%":Array,"$ %ArrayBuffer%":"undefined"==typeof ArrayBuffer?e:ArrayBuffer,"$ %ArrayBufferPrototype%":"undefined"==typeof ArrayBuffer?e:ArrayBuffer.prototype,"$ %ArrayIteratorPrototype%":yr?pr([][Symbol.iterator]()):e,"$ %ArrayPrototype%":Array.prototype,"$ %ArrayProto_entries%":Array.prototype.entries,"$ %ArrayProto_forEach%":Array.prototype.forEach,"$ %ArrayProto_keys%":Array.prototype.keys,"$ %ArrayProto_values%":Array.prototype.values,"$ %AsyncFromSyncIteratorPrototype%":e,"$ %AsyncFunction%":void 0,"$ %AsyncFunctionPrototype%":e,"$ %AsyncGenerator%":e,"$ %AsyncGeneratorFunction%":void 0,"$ %AsyncGeneratorPrototype%":e,"$ %AsyncIteratorPrototype%":e,"$ %Atomics%":"undefined"==typeof Atomics?e:Atomics,"$ %Boolean%":Boolean,"$ %BooleanPrototype%":Boolean.prototype,"$ %DataView%":"undefined"==typeof DataView?e:DataView,"$ %DataViewPrototype%":"undefined"==typeof DataView?e:DataView.prototype,"$ %Date%":Date,"$ %DatePrototype%":Date.prototype,"$ %decodeURI%":decodeURI,"$ %decodeURIComponent%":decodeURIComponent,"$ %encodeURI%":encodeURI,"$ %encodeURIComponent%":encodeURIComponent,"$ %Error%":Error,"$ %ErrorPrototype%":Error.prototype,"$ %eval%":eval,"$ %EvalError%":EvalError,"$ %EvalErrorPrototype%":EvalError.prototype,"$ %Float32Array%":"undefined"==typeof Float32Array?e:Float32Array,"$ %Float32ArrayPrototype%":"undefined"==typeof Float32Array?e:Float32Array.prototype,"$ %Float64Array%":"undefined"==typeof Float64Array?e:Float64Array,"$ %Float64ArrayPrototype%":"undefined"==typeof Float64Array?e:Float64Array.prototype,"$ %Function%":Function,"$ %FunctionPrototype%":Function.prototype,"$ %Generator%":e,"$ %GeneratorFunction%":void 0,"$ %GeneratorPrototype%":e,"$ %Int8Array%":"undefined"==typeof Int8Array?e:Int8Array,"$ %Int8ArrayPrototype%":"undefined"==typeof Int8Array?e:Int8Array.prototype,"$ %Int16Array%":"undefined"==typeof Int16Array?e:Int16Array,"$ %Int16ArrayPrototype%":"undefined"==typeof Int16Array?e:Int8Array.prototype,"$ %Int32Array%":"undefined"==typeof Int32Array?e:Int32Array,"$ %Int32ArrayPrototype%":"undefined"==typeof Int32Array?e:Int32Array.prototype,"$ %isFinite%":isFinite,"$ %isNaN%":isNaN,"$ %IteratorPrototype%":yr?pr(pr([][Symbol.iterator]())):e,"$ %JSON%":JSON,"$ %JSONParse%":JSON.parse,"$ %Map%":"undefined"==typeof Map?e:Map,"$ %MapIteratorPrototype%":"undefined"!=typeof Map&&yr?pr((new Map)[Symbol.iterator]()):e,"$ %MapPrototype%":"undefined"==typeof Map?e:Map.prototype,"$ %Math%":Math,"$ %Number%":Number,"$ %NumberPrototype%":Number.prototype,"$ %Object%":Object,"$ %ObjectPrototype%":Object.prototype,"$ %ObjProto_toString%":Object.prototype.toString,"$ %ObjProto_valueOf%":Object.prototype.valueOf,"$ %parseFloat%":parseFloat,"$ %parseInt%":parseInt,"$ %Promise%":"undefined"==typeof Promise?e:Promise,"$ %PromisePrototype%":"undefined"==typeof Promise?e:Promise.prototype,"$ %PromiseProto_then%":"undefined"==typeof Promise?e:Promise.prototype.then,"$ %Promise_all%":"undefined"==typeof Promise?e:Promise.all,"$ %Promise_reject%":"undefined"==typeof Promise?e:Promise.reject,"$ %Promise_resolve%":"undefined"==typeof Promise?e:Promise.resolve,"$ %Proxy%":"undefined"==typeof Proxy?e:Proxy,"$ %RangeError%":RangeError,"$ %RangeErrorPrototype%":RangeError.prototype,"$ %ReferenceError%":ReferenceError,"$ %ReferenceErrorPrototype%":ReferenceError.prototype,"$ %Reflect%":"undefined"==typeof Reflect?e:Reflect,"$ %RegExp%":RegExp,"$ %RegExpPrototype%":RegExp.prototype,"$ %Set%":"undefined"==typeof Set?e:Set,"$ %SetIteratorPrototype%":"undefined"!=typeof Set&&yr?pr((new Set)[Symbol.iterator]()):e,"$ %SetPrototype%":"undefined"==typeof Set?e:Set.prototype,"$ %SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?e:SharedArrayBuffer,"$ %SharedArrayBufferPrototype%":"undefined"==typeof SharedArrayBuffer?e:SharedArrayBuffer.prototype,"$ %String%":String,"$ %StringIteratorPrototype%":yr?pr(""[Symbol.iterator]()):e,"$ %StringPrototype%":String.prototype,"$ %Symbol%":yr?Symbol:e,"$ %SymbolPrototype%":yr?Symbol.prototype:e,"$ %SyntaxError%":SyntaxError,"$ %SyntaxErrorPrototype%":SyntaxError.prototype,"$ %ThrowTypeError%":aht,"$ %TypedArray%":la,"$ %TypedArrayPrototype%":la?la.prototype:e,"$ %TypeError%":TypeError,"$ %TypeErrorPrototype%":TypeError.prototype,"$ %Uint8Array%":"undefined"==typeof Uint8Array?e:Uint8Array,"$ %Uint8ArrayPrototype%":"undefined"==typeof Uint8Array?e:Uint8Array.prototype,"$ %Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?e:Uint8ClampedArray,"$ %Uint8ClampedArrayPrototype%":"undefined"==typeof Uint8ClampedArray?e:Uint8ClampedArray.prototype,"$ %Uint16Array%":"undefined"==typeof Uint16Array?e:Uint16Array,"$ %Uint16ArrayPrototype%":"undefined"==typeof Uint16Array?e:Uint16Array.prototype,"$ %Uint32Array%":"undefined"==typeof Uint32Array?e:Uint32Array,"$ %Uint32ArrayPrototype%":"undefined"==typeof Uint32Array?e:Uint32Array.prototype,"$ %URIError%":URIError,"$ %URIErrorPrototype%":URIError.prototype,"$ %WeakMap%":"undefined"==typeof WeakMap?e:WeakMap,"$ %WeakMapPrototype%":"undefined"==typeof WeakMap?e:WeakMap.prototype,"$ %WeakSet%":"undefined"==typeof WeakSet?e:WeakSet,"$ %WeakSetPrototype%":"undefined"==typeof WeakSet?e:WeakSet.prototype},d=ea.call(Function.call,Object.prototype.hasOwnProperty),eg=ee("%TypeError%"),vht=ee("%SyntaxError%"),yht={"Property Descriptor":function(n,t){var r,i,u,f;if("Object"!==n.Type(t))return!1;r={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(i in t)if(d(t,i)&&!r[i])return!1;if(u=d(t,"[[Value]]"),f=d(t,"[[Get]]")||d(t,"[[Set]]"),u&&f)throw new eg("Property Descriptors may not be both accessor and data descriptors");return!0}},ns=Number.isNaN||function(n){return n!=n},pht=Number.isNaN||function(n){return n!=n},og=Number.isFinite||function(n){return"number"==typeof n&&!pht(n)&&n!==1/0&&n!==-1/0},sg=Function.prototype.toString,wht=/^\s*class\b/,bht=Object.prototype.toString,kht="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,dht=Object.prototype.toString,hg=function(n,t){var u,f,i,r;if((u=1<arguments.length?t:"[object Date]"===dht.call(n)?String:Number)!==String&&u!==Number)throw new TypeError("invalid [[DefaultValue]] hint supplied");for(r=u===String?["toString","valueOf"]:["valueOf","toString"],i=0;i<r.length;++i)if(ha(n[r[i]])&&(f=n[r[i]](),rg(f)))return f;throw new TypeError("No default value");},ght=ee("%Object%"),vu=ee("%TypeError%"),nct=ee("%String%"),cg={ToPrimitive:function(n,t){return rg(n)?n:1<arguments.length?hg(n,t):hg(n)},ToBoolean:function(n){return!!n},ToNumber:function(n){return+n},ToInteger:function(n){var t=this.ToNumber(n);return ns(t)?0:0!==t&&og(t)?tg(t)*Math.floor(Math.abs(t)):t},ToInt32:function(n){return this.ToNumber(n)>>0},ToUint32:function(n){return this.ToNumber(n)>>>0},ToUint16:function(n){var t=this.ToNumber(n);return ns(t)||0===t||!og(t)?0:function(n,t){var i=n%t;return Math.floor(0<=i?i:i+t)}(tg(t)*Math.floor(Math.abs(t)),65536)},ToString:function(n){return nct(n)},ToObject:function(n){return this.CheckObjectCoercible(n),ght(n)},CheckObjectCoercible:function(n,t){if(null==n)throw new vu(t||"Cannot call method on "+n);return n},IsCallable:ha,SameValue:function(n,t){return n===t?0!==n||1/n==1/t:ns(n)&&ns(t)},Type:function(n){return null===n?"Null":"undefined"==typeof n?"Undefined":"function"==typeof n||"object"==typeof n?"Object":"number"==typeof n?"Number":"boolean"==typeof n?"Boolean":"string"==typeof n?"String":void 0},IsPropertyDescriptor:function(n){var i,t,r,u;if("Object"!==this.Type(n))return!1;i={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(t in n)if(d(n,t)&&!i[t])return!1;if(r=d(n,"[[Value]]"),u=d(n,"[[Get]]")||d(n,"[[Set]]"),r&&u)throw new vu("Property Descriptors may not be both accessor and data descriptors");return!0},IsAccessorDescriptor:function(n){return"undefined"!=typeof n&&(go(this,"Property Descriptor","Desc",n),!(!d(n,"[[Get]]")&&!d(n,"[[Set]]")))},IsDataDescriptor:function(n){return"undefined"!=typeof n&&(go(this,"Property Descriptor","Desc",n),!(!d(n,"[[Value]]")&&!d(n,"[[Writable]]")))},IsGenericDescriptor:function(n){return"undefined"!=typeof n&&(go(this,"Property Descriptor","Desc",n),!this.IsAccessorDescriptor(n)&&!this.IsDataDescriptor(n))},FromPropertyDescriptor:function(n){if("undefined"==typeof n)return n;if(go(this,"Property Descriptor","Desc",n),this.IsDataDescriptor(n))return{value:n["[[Value]]"],writable:!!n["[[Writable]]"],enumerable:!!n["[[Enumerable]]"],configurable:!!n["[[Configurable]]"]};if(this.IsAccessorDescriptor(n))return{get:n["[[Get]]"],set:n["[[Set]]"],enumerable:!!n["[[Enumerable]]"],configurable:!!n["[[Configurable]]"]};throw new vu("FromPropertyDescriptor must be called with a fully populated Property Descriptor");},ToPropertyDescriptor:function(n){var t,i,r;if("Object"!==this.Type(n))throw new vu("ToPropertyDescriptor requires an object");if(t={},d(n,"enumerable")&&(t["[[Enumerable]]"]=this.ToBoolean(n.enumerable)),d(n,"configurable")&&(t["[[Configurable]]"]=this.ToBoolean(n.configurable)),d(n,"value")&&(t["[[Value]]"]=n.value),d(n,"writable")&&(t["[[Writable]]"]=this.ToBoolean(n.writable)),d(n,"get")){if(i=n.get,"undefined"!=typeof i&&!this.IsCallable(i))throw new TypeError("getter must be a function");t["[[Get]]"]=i}if(d(n,"set")){if(r=n.set,"undefined"!=typeof r&&!this.IsCallable(r))throw new vu("setter must be a function");t["[[Set]]"]=r}if((d(t,"[[Get]]")||d(t,"[[Set]]"))&&(d(t,"[[Value]]")||d(t,"[[Writable]]")))throw new vu("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return t}},lg=ea.call(Function.call,String.prototype.replace),tct=/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,ict=/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/,ag=ea.call(Function.call,ca());fg(ag,{getPolyfill:ca,implementation:ug,shim:function(){var n=ca();return fg(String.prototype,{trim:n},{trim:function(){return String.prototype.trim!==n}}),n}});var va=ag,rct=Object.prototype.toString,vg=Object.prototype.hasOwnProperty,uct=function(n,t,i){if(!ha(t))throw new TypeError("iterator must be a function");var r;3<=arguments.length&&(r=i);"[object Array]"===rct.call(n)?function(n,t,i){for(var r=0,u=n.length;r<u;r++)vg.call(n,r)&&(null==i?t(n[r],r,n):t.call(i,n[r],r,n))}(n,t,r):"string"==typeof n?function(n,t,i){for(var r=0,u=n.length;r<u;r++)null==i?t(n.charAt(r),r,n):t.call(i,n.charAt(r),r,n)}(n,t,r):function(n,t,i){for(var r in n)vg.call(n,r)&&(null==i?t(n[r],r,n):t.call(i,n[r],r,n))}(n,t,r)},fct=function(n){if(!n)return{};var t={};return uct(va(n).split("\n"),function(n){var u=n.indexOf(":"),i=va(n.slice(0,u)).toLowerCase(),r=va(n.slice(u+1));"undefined"==typeof t[i]?t[i]=r:function(n){return"[object Array]"===Object.prototype.toString.call(n)}(t[i])?t[i].push(r):t[i]=[t[i],r]}),t},ect=function(){for(var t,i,r={},n=0;n<arguments.length;n++){t=arguments[n];for(i in t)oct.call(t,i)&&(r[i]=t[i])}return r},oct=Object.prototype.hasOwnProperty,yg=ur;ur.XMLHttpRequest=n.XMLHttpRequest||function(){};ur.XDomainRequest="withCredentials"in new ur.XMLHttpRequest?ur.XMLHttpRequest:n.XDomainRequest,function(n,t){for(var i=0;i<n.length;i++)t(n[i])}(["get","put","post","patch","head","delete"],function(n){ur["delete"===n?"del":n]=function(t,i,r){return(i=pg(t,i,r)).method=n.toUpperCase(),wg(i)}});yu=function(t){function i(i){var r;if(void 0===i&&(i={}),!i.tech)throw new Error("A tech was not provided.");var u=p(i,{kind:wst[i.kind]||"subtitles",language:i.language||i.srclang||""}),e=ad[u.mode]||"disabled",l=u.default;"metadata"!==u.kind&&"chapters"!==u.kind||(e="hidden");(r=t.call(this,u)||this).tech_=u.tech;r.cues_=[];r.activeCues_=[];var v=new ld(r.cues_),o=new ld(r.activeCues_),f=!1,h=c(s(r),function(){this.activeCues=this.activeCues;f&&(this.trigger("cuechange"),f=!1)});return"disabled"!==e&&r.tech_.ready(function(){r.tech_.on("timeupdate",h)},!0),Object.defineProperties(s(r),{"default":{get:function(){return l},set:function(){}},mode:{get:function(){return e},set:function(n){var t=this;ad[n]&&("disabled"!==(e=n)?this.tech_.ready(function(){t.tech_.on("timeupdate",h)},!0):this.tech_.off("timeupdate",h),this.trigger("modechange"))}},cues:{get:function(){return this.loaded_?v:null},set:function(){}},activeCues:{get:function(){var n,r;if(!this.loaded_)return null;if(0===this.cues.length)return o;for(var i=this.tech_.currentTime(),t=[],u=0,e=this.cues.length;u<e;u++)n=this.cues[u],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(r=0;r<t.length;r++)-1===this.activeCues_.indexOf(t[r])&&(f=!0);return this.activeCues_=t,o.setCues_(this.activeCues_),o},set:function(){}}}),u.src?(r.src=u.src,function(t,i){var r={uri:t},u=po(t);u&&(r.cors=u);yg(r,c(this,function(t,r,u){if(t)return a.error(t,r);i.loaded_=!0;"function"!=typeof n.WebVTT?i.tech_&&i.tech_.any(["vttjsloaded","vttjserror"],function(n){if("vttjserror"!==n.type)return bg(u,i);a.error("vttjs failed to load, stopping trying to process "+i.src)}):bg(u,i)}))}(u.src,s(r))):r.loaded_=!0,r}f(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)){for(u in i=new n.vttjs.VTTCue(t.startTime,t.endTime,t.text),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,t=this.cues_.length;t--;)if(i=this.cues_[t],i===n||i.originalCue_&&i.originalCue_===n){this.cues_.splice(t,1);this.cues.setCues_(this.cues_);break}},i}(ua);yu.prototype.allowedEvents_={cuechange:"cuechange"};var kg=function(n){function t(t){var i,r,u;return void 0===t&&(t={}),r=p(t,{kind:pst[t.kind]||""}),i=n.call(this,r)||this,u=!1,Object.defineProperty(s(i),"enabled",{get:function(){return u},set:function(n){"boolean"==typeof n&&n!==u&&(u=n,this.trigger("enabledchange"))}}),r.enabled&&(i.enabled=r.enabled),i.loaded_=!0,i}return f(t,n),t}(ua),dg=function(n){function t(t){var i,r,u;return void 0===t&&(t={}),r=p(t,{kind:yst[t.kind]||""}),i=n.call(this,r)||this,u=!1,Object.defineProperty(s(i),"selected",{get:function(){return u},set:function(n){"boolean"==typeof n&&n!==u&&(u=n,this.trigger("selectedchange"))}}),r.selected&&(i.selected=r.selected),i}return f(t,n),t}(ua),pu=function(n){function t(t){var i,u,r;return void 0===t&&(t={}),i=n.call(this)||this,r=new yu(t),i.kind=r.kind,i.src=r.src,i.srclang=r.language,i.label=r.label,i.default=r.default,Object.defineProperties(s(i),{readyState:{get:function(){return u}},track:{get:function(){return r}}}),u=0,r.addEventListener("loadeddata",function(){u=2;i.trigger({type:"load",target:s(i)})}),i}return f(t,n),t}(ht);pu.prototype.allowedEvents_={load:"load"};pu.NONE=0;pu.LOADING=1;pu.LOADED=2;pu.ERROR=3;dt={audio:{ListClass:lst,TrackClass:kg,capitalName:"Audio"},video:{ListClass:ast,TrackClass:dg,capitalName:"Video"},text:{ListClass:cd,TrackClass:yu,capitalName:"Text"}};Object.keys(dt).forEach(function(n){dt[n].getterName=n+"Tracks";dt[n].privateName=n+"Tracks_"});wu={remoteText:{ListClass:cd,TrackClass:yu,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:vst,TrackClass:pu,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}};et=p(dt,wu);wu.names=Object.keys(wu);dt.names=Object.keys(dt);et.names=[].concat(wu.names).concat(dt.names);ts=Object.create||function(n){if(1!==arguments.length)throw new Error("Object.create shim only accepts one parameter.");return gg.prototype=n,new gg};((hi.prototype=ts(Error.prototype)).constructor=hi).Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}};oe.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){return!!(t.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&0<=(t=parseFloat(t))&&t<=100)&&(this.set(n,t),!0)}};var hct={"&amp;":"&","&lt;":"<","&gt;":">","&lrm;":"‎","&rlm;":"‏","&nbsp;":" "},cct={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},lct={v:"title",lang:"lang"},nn={rt:"ruby"};pa=[[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]];is.prototype.applyStyles=function(n,t){for(var i in t=t||this.div,n)n.hasOwnProperty(i)&&(t.style[i]=n[i])};is.prototype.formatStyle=function(n,t){return 0===n?0:n+t};(wa.prototype=ts(is.prototype)).constructor=wa;lt.prototype.move=function(n,t){switch(t=void 0!==t?t:this.lineHeight,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}};lt.prototype.overlaps=function(n){return this.left<n.right&&this.right>n.left&&this.top<n.bottom&&this.bottom>n.top};lt.prototype.overlapsAny=function(n){for(var t=0;t<n.length;t++)if(this.overlaps(n[t]))return!0;return!1};lt.prototype.within=function(n){return this.top>=n.top&&this.bottom<=n.bottom&&this.left>=n.left&&this.right<=n.right};lt.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}};lt.prototype.intersectPercentage=function(n){return Math.max(0,Math.min(this.right,n.right)-Math.max(this.left,n.left))*Math.max(0,Math.min(this.bottom,n.bottom)-Math.max(this.top,n.top))/(this.height*this.width)};lt.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}};lt.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{left:(n=n.div?n.div.getBoundingClientRect():n.tagName?n.getBoundingClientRect():n).left,right:n.right,top:n.top||i,height:n.height||t,bottom:n.bottom||i+(n.height||t),width:n.width||r}};he.StringDecoder=function(){return{decode:function(n){if(!n)return"";if("string"!=typeof n)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(n))}}};he.convertCueToDOMTree=function(n,t){return n&&t?tn(n,t):null};he.processCues=function(n,t,i){var r,u;if(!n||!t||!i)return null;for(;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="1.5%",i.appendChild(r),function(n){for(var t=0;t<n.length;t++)if(n[t].hasBeenReset||!n[t].displayState)return!0;return!1}(t)){var f=[],e=lt.getSimpleBoxPosition(r),o={font:Math.round(.05*e.height*100)/100+"px sans-serif"};!function(){for(var i,u,s=0;s<t.length;s++)u=t[s],i=new wa(n,u,o),r.appendChild(i.div),vct(0,i,e,f),u.displayState=i.div,f.push(lt.getSimpleBoxPosition(i))}()}else for(u=0;u<t.length;u++)r.appendChild(t[u].displayState)};(he.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=[]}).prototype={reportOrThrowError:function(n){if(!(n instanceof hi))throw n;this.onparsingerror&&this.onparsingerror(n)},parse:function(n){function f(){for(var r,i=t.buffer,n=0;n<i.length&&"\r"!==i[n]&&"\n"!==i[n];)++n;return r=i.substr(0,n),"\r"===i[n]&&++n,"\n"===i[n]&&++n,t.buffer=i.substr(n),r}function o(n){n.match(/X-TIMESTAMP-MAP/)?se(n,function(n,i){switch(n){case"X-TIMESTAMP-MAP":!function(n){var i=new oe;se(n,function(n,t){switch(n){case"MPEGT":i.integer(n+"S",t);break;case"LOCA":i.set(n+"L",ya(t))}},/[^\d]:/,/,/);t.ontimestampmap&&t.ontimestampmap({MPEGTS:i.get("MPEGTS"),LOCAL:i.get("LOCAL")})}(i)}},/=/):se(n,function(n,i){switch(n){case"Region":!function(n){var i=new oe,r;(se(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(","),2!==u.length)break;if(r=new oe,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}))}(i)}},/:/)}var t=this,i,u,r,e;n&&(t.buffer+=t.decoder.decode(n,{stream:!0}));try{if("INITIAL"===t.state){if(!/\r\n|\n/.test(t.buffer))return this;if(u=(i=f()).match(/^WEBVTT([ \t].*)?$/),!u||!u[0])throw new hi(hi.Errors.BadSignature);t.state="HEADER"}for(r=!1;t.buffer;){if(!/\r\n|\n/.test(t.buffer))return this;switch(r?r=!1:i=f(),t.state){case"HEADER":/:/.test(i)?o(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;if(t.cue=new(t.vttjs.VTTCue||t.window.VTTCue)(0,0,""),t.state="CUE",-1===i.indexOf("-->")){t.cue.id=i;continue}case"CUE":try{sct(i,t.cue,t.regionList)}catch(n){t.reportOrThrowError(n);t.cue=null;t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":if(e=-1!==i.indexOf("-->"),!i||e&&(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;continue;case"BADCUE":i||(t.state="ID");continue}}}catch(n){t.reportOrThrowError(n);"CUETEXT"===t.state&&t.cue&&t.oncue&&t.oncue(t.cue);t.cue=null;t.state="INITIAL"===t.state?"BADWEBVTT":"BADCUE"}return this},flush:function(){var n=this;try{if(n.buffer+=n.decoder.decode(),!n.cue&&"HEADER"!==n.state||(n.buffer+="\n\n",n.parse()),"INITIAL"===n.state)throw new hi(hi.Errors.BadSignature);}catch(t){n.reportOrThrowError(t)}return n.onflush&&n.onflush(),this}};var yct=he,pct={"":1,lr:1,rl:1},wct={start:1,middle:1,end:1,left:1,right:1};rn.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)};un=rn;fn={"":!0,up:!0};bu=dl(function(t){var i=t.exports={WebVTT:yct,VTTCue:un,VTTRegion:bct};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()});bu.WebVTT;bu.VTTCue;bu.VTTRegion;w=function(i){function u(n,t){var r;return void 0===n&&(n={}),void 0===t&&(t=function(){}),n.reportTouchActivity=!1,(r=i.call(this,null,n,t)||this).hasStarted_=!1,r.on("playing",function(){this.hasStarted_=!0}),r.on("loadstart",function(){this.hasStarted_=!1}),et.names.forEach(function(t){var i=et[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){!1===n["native"+t+"Tracks"]&&(r["featuresNative"+t+"Tracks"]=!1)}),!1===n.nativeCaptions||!1===n.nativeTextTracks?r.featuresNativeTextTracks=!1:!0!==n.nativeCaptions&&!0!==n.nativeTextTracks||(r.featuresNativeTextTracks=!0),r.featuresNativeTextTracks||r.emulateTextTracks(),r.autoRemoteTextTracks_=new et.text.ListClass,r.initTrackListeners(),n.nativeControlsForTouch||r.emitTapEvents(),r.constructor&&(r.name_=r.constructor.name||"Unknown Tech"),r}f(u,i);var r=u.prototype;return r.triggerSourceset=function(n){var t=this;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(c(this,function(){var n=this.bufferedPercent();this.bufferedPercent_!==n&&this.trigger("progress");1===(this.bufferedPercent_=n)&&this.stopTrackingProgress()}),500)},r.onDurationChange=function(){this.duration_=this.duration()},r.buffered=function(){return lr(0,0)},r.bufferedPercent=function(){return id(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(dt.names);this.manualProgress&&this.manualProgressOff();this.manualTimeUpdates&&this.manualTimeUpdatesOff();i.prototype.dispose.call(this)},r.clearTracks=function(n){var t=this;(n=[].concat(n)).forEach(function(n){for(var u,i=t[n+"Tracks"]()||[],r=i.length;r--;)u=i[r],"text"===n&&t.removeRemoteTextTrack(u),i.removeTrack(u)})},r.cleanupAutoTextTracks=function(){for(var i,n=this.autoRemoteTextTracks_||[],t=n.length;t--;)i=n[t],this.removeRemoteTextTrack(i)},r.reset=function(){},r.error=function(n){return void 0!==n&&(this.error_=new ct(n),this.trigger("error")),this.error_},r.played=function(){return this.hasStarted_?lr(0,0):lr()},r.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},r.initTrackListeners=function(){var n=this;dt.names.forEach(function(t){function i(){n.trigger(t+"trackchange")}var u=dt[t],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"]&&wf(bu)&&0<Object.keys(bu).length)return void this.trigger("vttjsloaded");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(){function u(t){return n.addTrack(t.track)}function f(t){return n.removeTrack(t.track)}function r(){return e.trigger("texttrackchange")}function t(){var t,i;for(r(),t=0;t<n.length;t++)i=n[t],i.removeEventListener("cuechange",r),"showing"===i.mode&&i.addEventListener("cuechange",r)}var e=this,n=this.textTracks(),i=this.remoteTextTracks();i.on("addtrack",u);i.on("removetrack",f);this.addWebVttScript_();t();n.addEventListener("change",t);n.addEventListener("addtrack",t);n.addEventListener("removetrack",t);this.on("dispose",function(){i.off("addtrack",u);i.off("removetrack",f);n.removeEventListener("change",t);n.removeEventListener("addtrack",t);n.removeEventListener("removetrack",t);for(var e=0;e<n.length;e++)n[e].removeEventListener("cuechange",r)})},r.addTextTrack=function(n,t,i){if(!n)throw new Error("TextTrack kind is required but was not provided");return function(n,t,i,r,u){var e,f;return void 0===u&&(u={}),e=n.textTracks(),u.kind=t,i&&(u.label=i),r&&(u.language=r),u.tech=n,f=new et.text.TrackClass(u),e.addTrack(f),f}(this,n,t,i)},r.createRemoteTextTrack=function(n){var t=p(n,{tech:this});return new wu.remoteTextEl.TrackClass(t)},r.addRemoteTextTrack=function(n,t){var r=this,i;return void 0===n&&(n={}),i=this.createRemoteTextTrack(n),!0!==t&&!1!==t&&(a.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),!0!==t&&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""},u.canPlayType=function(){return""},u.canPlaySource=function(n){return u.canPlayType(n.type)},u.isTech=function(n){return n.prototype instanceof u||n instanceof u||n===u},u.registerTech=function(n,t){if(u.techs_||(u.techs_={}),!u.isTech(t))throw new Error("Tech "+n+" must be a Tech");if(!u.canPlayType)throw new Error("Techs must have a static canPlayType method on them");if(!u.canPlaySource)throw new Error("Techs must have a static canPlaySource method on them");return n=g(n),u.techs_[n]=t,u.techs_[ao(n)]=t,"Tech"!==n&&u.defaultTechOrder_.push(n),t},u.getTech=function(t){if(t)return u.techs_&&u.techs_[t]?u.techs_[t]:(t=g(t),n&&n.videojs&&n.videojs[t]?(a.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)},u}(r);et.names.forEach(function(n){var t=et[n];w.prototype[t.getterName]=function(){return this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName]}});w.prototype.featuresVolumeControl=!0;w.prototype.featuresMuteControl=!0;w.prototype.featuresFullscreenResize=!1;w.prototype.featuresPlaybackRate=!1;w.prototype.featuresProgressEvents=!1;w.prototype.featuresSourceset=!1;w.prototype.featuresTimeupdateEvents=!1;w.prototype.featuresNativeTextTracks=!1;w.withSourceHandlers=function(n){n.registerSourceHandler=function(t,i){var r=n.sourceHandlers;r=r||(n.sourceHandlers=[]);void 0===i&&(i=r.length);r.splice(i,0,t)};n.canPlayType=function(t){for(var r,u=n.sourceHandlers||[],i=0;i<u.length;i++)if(r=u[i].canPlayType(t))return r;return""};n.selectSourceHandler=function(t,i){for(var u=n.sourceHandlers||[],r=0;r<u.length;r++)if(u[r].canHandleSource(t,i))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];"function"==typeof t&&(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:a.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",w);w.registerTech("Tech",w);w.defaultTechOrder_=[];var wr={},ka={},rs={};var dct={buffered:1,currentTime:1,duration:1,seekable:1,played:1,paused:1,volume:1},gct={setCurrentTime:1,setVolume:1},on={play:1,pause:1};sn={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"};cn=function(n){function t(t,i,u){var h,c=p({createEl:!1},i),e,s,f,o;if(h=n.call(this,t,c,u)||this,i.playerOptions.sources&&0!==i.playerOptions.sources.length)t.src(i.playerOptions.sources);else for(e=0,s=i.playerOptions.techOrder;e<s.length;e++)if(f=g(s[e]),o=w.getTech(f),f||(o=r.getComponent(f)),o&&o.isSupported()){t.loadTech_(f);break}return h}return f(t,n),t}(r);r.registerComponent("MediaLoader",cn);le=function(n){function i(t,i){var r;return(r=n.call(this,t,i)||this).emitTapEvents(),r.enable(),r}f(i,n);var t=i.prototype;return t.createEl=function(t,i,r){void 0===t&&(t="div");void 0===i&&(i={});void 0===r&&(r={});i=b({innerHTML:'<span aria-hidden="true" class="vjs-icon-placeholder"><\/span>',className:this.buildCSSClass(),tabIndex:0},i);"button"===t&&a.error("Creating a ClickableComponent with an HTML element of "+t+" is not supported; use a Button instead.");r=b({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_=nt("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(void 0===t&&(t=this.el()),void 0===n)return this.controlText_||"Need Text";var i=this.localize(n);this.controlText_=n;hu(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(){this.enabled_||(this.enabled_=!0,this.removeClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","false"),"undefined"!=typeof this.tabIndex_&&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");"undefined"!=typeof this.tabIndex_&&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(){},t.handleKeyDown=function(t){o.isEventKey(t,"Space")||o.isEventKey(t,"Enter")?(t.preventDefault(),t.stopPropagation(),this.trigger("click")):n.prototype.handleKeyDown.call(this,t)},i}(r);r.registerComponent("ClickableComponent",le);ln=function(n){function i(t,i){var r;return(r=n.call(this,t,i)||this).update(),t.on("posterchange",c(s(r),r.update)),r}f(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 nt("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()?rr(this.player_.play()):this.player_.pause())},i}(le);r.registerComponent("PosterImage",ln);ae="#222";an={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'};vn=function(t){function r(i,r,u){var f,e;return f=t.call(this,i,r,u)||this,e=c(s(f),f.updateDisplay),i.on("loadstart",c(s(f),f.toggleDisplay)),i.on("texttrackchange",e),i.on("loadedmetadata",c(s(f),f.preselectTrack)),i.ready(c(s(f),function(){if(i.tech_&&i.tech_.featuresNativeTextTracks)this.hide();else{i.on("fullscreenchange",e);i.on("playerresize",e);n.addEventListener("orientationchange",e);i.on("dispose",function(){return n.removeEventListener("orientationchange",e)});for(var r=this.options_.playerOptions.tracks||[],t=0;t<r.length;t++)this.player_.addRemoteTextTrack(r[t],!0);this.preselectTrack()}})),f}f(r,t);var i=r.prototype;return i.preselectTrack=function(){for(var n,i,r,u,e={captions:1,subtitles:1},o=this.player_.textTracks(),t=this.player_.cache_.selectedLanguage,f=0;f<o.length;f++)n=o[f],t&&t.enabled&&t.language&&t.language===n.language&&n.kind in e?u=n.kind===t.kind?n:u||n:t&&!t.enabled?r=i=u=null:n.default&&("descriptions"!==n.kind||i?n.kind in e&&!r&&(r=n):i=n);u?u.mode="showing":r?r.mode="showing":i&&(i.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(){"function"==typeof n.WebVTT&&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],"showing"===u.mode&&r.push(u);this.updateForTrack(r)}else{for(var f=null,e=null,o=t.length;o--;)n=t[o],"showing"===n.mode&&("descriptions"===n.kind?f=n:e=n);e?("off"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","off"),this.updateForTrack(e)):f&&("assertive"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","assertive"),this.updateForTrack(f))}},i.updateDisplayState=function(t){for(var u,r,o,i=this.player_.textTrackSettings.getValues(),f=t.activeCues,e=f.length;e--;)u=f[e],u&&(r=u.displayState,(i.color&&(r.firstChild.style.color=i.color),i.textOpacity&&nv(r.firstChild,"color",ga(i.color||"#fff",i.textOpacity)),i.backgroundColor&&(r.firstChild.style.backgroundColor=i.backgroundColor),i.backgroundOpacity&&nv(r.firstChild,"backgroundColor",ga(i.backgroundColor||"#000",i.backgroundOpacity)),i.windowColor&&(i.windowOpacity?nv(r,"backgroundColor",ga(i.windowColor,i.windowOpacity)):r.style.backgroundColor=i.windowColor),i.edgeStyle&&("dropshadow"===i.edgeStyle?r.firstChild.style.textShadow="2px 2px 3px #222, 2px 2px 4px #222, 2px 2px 5px "+ae:"raised"===i.edgeStyle?r.firstChild.style.textShadow="1px 1px #222, 2px 2px #222, 3px 3px "+ae:"depressed"===i.edgeStyle?r.firstChild.style.textShadow="1px 1px #ccc, 0 1px #ccc, -1px -1px #222, 0 -1px "+ae:"uniform"===i.edgeStyle&&(r.firstChild.style.textShadow="0 0 4px #222, 0 0 4px #222, 0 0 4px #222, 0 0 4px "+ae)),i.fontPercent&&1!==i.fontPercent)&&(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&&"default"!==i.fontFamily&&("small-caps"===i.fontFamily?r.firstChild.style.fontVariant="small-caps":r.firstChild.style.fontFamily=an[i.fontFamily]))},i.updateForTrack=function(t){var o,u,s,f,r,i,e,h;if(Array.isArray(t)||(t=[t]),"function"==typeof n.WebVTT&&!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,yi(h,"vjs-text-track-cue"),yi(h,"vjs-text-track-cue-"+(i.language?i.language:r));this.player_.textTrackSettings&&this.updateDisplayState(i)}}},r}(r);r.registerComponent("TextTrackDisplay",vn);yn=function(n){function t(){return n.apply(this,arguments)||this}return f(t,n),t.prototype.createEl=function(){var i=this.player_.isAudio(),r=this.localize(i?"Audio Player":"Video Player"),u=nt("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",yn);ii=function(n){function i(){return n.apply(this,arguments)||this}f(i,n);var t=i.prototype;return t.createEl=function(n,t,i){void 0===t&&(t={});void 0===i&&(i={});t=b({innerHTML:'<span aria-hidden="true" class="vjs-icon-placeholder"><\/span>',className:this.buildCSSClass()},t);i=b({type:"button"},i);var u=r.prototype.createEl.call(this,"button",t,i);return this.createControlTextEl(u),u},t.addChild=function(n,t){void 0===t&&(t={});var i=this.constructor.name;return a.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){o.isEventKey(t,"Space")||o.isEventKey(t,"Enter")?t.stopPropagation():n.prototype.handleKeyDown.call(this,t)},i}(le);r.registerComponent("Button",ii);tv=function(n){function i(t,i){var r;return(r=n.call(this,t,i)||this).mouseused_=!1,r.on("mousedown",r.handleMouseDown),r}f(i,n);var t=i.prototype;return t.buildCSSClass=function(){return"vjs-big-play-button"},t.handleClick=function(n){var t=this.player_.play(),i,r;if(this.mouseused_&&n.clientX&&n.clientY)return rr(t),void(this.player_.tech(!0)&&this.player_.tech(!0).focus());if(i=this.player_.getChild("controlBar"),r=i&&i.getChild("playToggle"),r){function u(){return r.focus()}fe(t)?t.then(u,function(){}):this.setTimeout(u,1)}else this.player_.tech(!0).focus()},t.handleKeyDown=function(t){this.mouseused_=!1;n.prototype.handleKeyDown.call(this,t)},t.handleMouseDown=function(){this.mouseused_=!0},i}(ii);tv.prototype.controlText_="Play Video";r.registerComponent("BigPlayButton",tv);pn=function(n){function t(t,i){var r;return(r=n.call(this,t,i)||this).controlText(i&&i.controlText||r.localize("Close")),r}f(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){o.isEventKey(t,"Esc")?(t.preventDefault(),t.stopPropagation(),this.trigger("click")):n.prototype.handleKeyDown.call(this,t)},t}(ii);r.registerComponent("CloseButton",pn);iv=function(n){function i(t,i){var r;return void 0===i&&(i={}),r=n.call(this,t,i)||this,i.replay=void 0===i.replay||i.replay,r.on(t,"play",r.handlePlay),r.on(t,"pause",r.handlePause),i.replay&&r.on(t,"ended",r.handleEnded),r}f(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}(ii);iv.prototype.controlText_="Play";r.registerComponent("PlayToggle",iv);fs=wn;br=function(n){function r(t,i){var r;return(r=n.call(this,t,i)||this).throttledUpdateContent=nr(c(s(r),r.updateContent),30),r.on(t,"timeupdate",r.throttledUpdateContent),r}f(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_=nt("span",{className:t+"-display"},{"aria-live":"off",role:"presentation"}),this.updateTextNode_(),i.appendChild(this.contentEl_),i},i.dispose=function(){this.contentEl_=null;this.textNode_=null;n.prototype.dispose.call(this)},i.updateTextNode_=function(){if(this.contentEl_){for(;this.contentEl_.firstChild;)this.contentEl_.removeChild(this.contentEl_.firstChild);this.textNode_=t.createTextNode(this.formattedTime_||this.formatTime_(0));this.contentEl_.appendChild(this.textNode_)}},i.formatTime_=function(n){return ku(n)},i.updateFormattedTime_=function(n){var t=this.formatTime_(n);t!==this.formattedTime_&&(this.formattedTime_=t,this.requestAnimationFrame(this.updateTextNode_))},i.updateContent=function(){},r}(r);br.prototype.labelText_="Time";br.prototype.controlText_="Time";r.registerComponent("TimeDisplay",br);es=function(n){function t(t,i){var r;return(r=n.call(this,t,i)||this).on(t,"ended",r.handleEnded),r}f(t,n);var i=t.prototype;return i.buildCSSClass=function(){return"vjs-current-time"},i.updateContent=function(){var n=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();this.updateFormattedTime_(n)},i.handleEnded=function(){this.player_.duration()&&this.updateFormattedTime_(this.player_.duration())},t}(br);es.prototype.labelText_="Current Time";es.prototype.controlText_="Current Time";r.registerComponent("CurrentTimeDisplay",es);os=function(n){function t(t,i){var r;return(r=n.call(this,t,i)||this).on(t,"durationchange",r.updateContent),r.on(t,"loadstart",r.updateContent),r.on(t,"loadedmetadata",r.throttledUpdateContent),r}f(t,n);var i=t.prototype;return i.buildCSSClass=function(){return"vjs-duration"},i.updateContent=function(){var n=this.player_.duration();this.duration_!==n&&(this.duration_=n,this.updateFormattedTime_(n))},t}(br);os.prototype.labelText_="Duration";os.prototype.controlText_="Duration";r.registerComponent("DurationDisplay",os);bn=function(n){function t(){return n.apply(this,arguments)||this}return f(t,n),t.prototype.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",bn);ss=function(n){function i(t,i){var r;return(r=n.call(this,t,i)||this).on(t,"durationchange",r.throttledUpdateContent),r.on(t,"ended",r.handleEnded),r}f(i,n);var t=i.prototype;return t.buildCSSClass=function(){return"vjs-remaining-time"},t.createEl=function(){var t=n.prototype.createEl.call(this);return t.insertBefore(nt("span",{},{"aria-hidden":!0},"-"),this.contentEl_),t},t.updateContent=function(){"number"==typeof this.player_.duration()&&(this.player_.remainingTimeDisplay?this.updateFormattedTime_(this.player_.remainingTimeDisplay()):this.updateFormattedTime_(this.player_.remainingTime()))},t.handleEnded=function(){this.player_.duration()&&this.updateFormattedTime_(0)},i}(br);ss.prototype.labelText_="Remaining Time";ss.prototype.controlText_="Remaining Time";r.registerComponent("RemainingTimeDisplay",ss);kn=function(n){function t(t,i){var r;return(r=n.call(this,t,i)||this).updateShowing(),r.on(r.player(),"durationchange",r.updateShowing),r}f(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_=nt("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()===1/0?this.show():this.hide()},t}(r);r.registerComponent("LiveDisplay",kn);rv=function(n){function i(t,i){var r;return(r=n.call(this,t,i)||this).updateLiveEdgeStatus(),r.player_.liveTracker&&r.on(r.player_.liveTracker,"liveedgechange",r.updateLiveEdgeStatus),r}f(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_=nt("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}(ii);rv.prototype.controlText_="Seek to live, currently playing live";r.registerComponent("SeekToLive",rv);hs=function(n){function i(t,i){var r;return(r=n.call(this,t,i)||this).bar=r.getChild(r.options_.barName),r.vertical(!!r.options_.vertical),r.enable(),r}f(i,n);var t=i.prototype;return t.enabled=function(){return this.enabled_},t.enable=function(){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),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 void 0===i&&(i={}),void 0===r&&(r={}),i.className=i.className+" vjs-slider",i=b({tabIndex:0},i),r=b({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;"mousedown"===n.type&&n.preventDefault();"touchstart"!==n.type||wi||n.preventDefault();pb();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;wb();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 n,t;if(this.el_&&(n=this.getPercent(),t=this.bar,t)){("number"!=typeof n||n!=n||n<0||n===1/0)&&(n=0);var i=(100*n).toFixed(2)+"%",r=t.el().style,u=this.vertical()?"height":"width";return r[u]!==i&&(r[u]=i),n}},t.calculateDistance=function(n){var t=bc(this.el_,n);return this.vertical()?t.y:t.x},t.handleKeyDown=function(t){o.isEventKey(t,"Left")||o.isEventKey(t,"Down")?(t.preventDefault(),t.stopPropagation(),this.stepBack()):o.isEventKey(t,"Right")||o.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(void 0===n)return this.vertical_||!1;this.vertical_=!!n;this.vertical_?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal")},i}(r);r.registerComponent("Slider",hs);dn=function(n){function t(t,i){var r;return(r=n.call(this,t,i)||this).partEls_=[],r.on(t,"progress",r.update),r}f(t,n);var i=t.prototype;return i.createEl=function(){return n.prototype.createEl.call(this,"div",{className:"vjs-load-progress",innerHTML:'<span class="vjs-control-text"><span>'+this.localize("Loaded")+'<\/span>: <span class="vjs-control-text-loaded-percentage">0%<\/span><\/span>'})},i.dispose=function(){this.partEls_=null;n.prototype.dispose.call(this)},i.update=function(){function u(n,t,i){var r=n/t||0;return r=100*(1<=r?1:r),i&&(r=r.toFixed(2)),r+"%"}var o=this.player_.liveTracker,t=this.player_.buffered(),s=o&&o.isLive()?o.seekableEnd():this.player_.duration(),f=this.player_.bufferedEnd(),i=this.partEls_,c=this.$(".vjs-control-text-loaded-percentage"),n,e;for(this.el_.style.width=u(f,s),hu(c,u(f,s,!0)),n=0;n<t.length;n++){var h=t.start(n),l=t.end(n),r=i[n];r||(r=this.el_.appendChild(nt()),i[n]=r);r.style.left=u(h,f);r.style.width=u(l-h,f)}for(e=i.length;e>t.length;e--)this.el_.removeChild(i[e-1]);i.length=t.length},t}(r);r.registerComponent("LoadProgressBar",dn);gn=function(n){function i(t,i){var r;return(r=n.call(this,t,i)||this).update=nr(c(s(r),r.update),30),r}f(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=gf(this.el_),f=gf(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){hu(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?"":"-")+ku(o,f)):e=ku(i,s);u.update(n,t,e);r&&r()})},i}(r);r.registerComponent("TimeTooltip",gn);cs=function(n){function t(t,i){var r;return(r=n.call(this,t,i)||this).update=nr(c(s(r),r.update),30),r}f(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);cs.prototype.options_={children:[]};si||ir||cs.prototype.options_.children.push("timeTooltip");r.registerComponent("PlayProgressBar",cs);uv=function(n){function t(t,i){var r;return(r=n.call(this,t,i)||this).update=nr(c(s(r),r.update),30),r}f(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);uv.prototype.options_={children:["timeTooltip"]};r.registerComponent("MouseTimeDisplay",uv);ls=function(n){function r(t,i){var r;return(r=n.call(this,t,i)||this).setEventHandlers_(),r}f(r,n);var i=r.prototype;return i.setEventHandlers_=function(){this.update=nr(c(this,this.update),30);this.on(this.player_,"timeupdate",this.update);this.on(this.player_,"ended",this.handleEnded);this.on(this.player_,"durationchange",this.update);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_);"hidden"in t&&"visibilityState"in t&&this.on(t,"visibilitychange",this.toggleVisibility_)},i.toggleVisibility_=function(n){t.hidden?this.disableInterval_(n):(this.enableInterval_(),this.requestAnimationFrame(this.update))},i.enableInterval_=function(){var n=this;this.clearInterval(this.updateInterval);this.updateInterval=this.setInterval(function(){n.requestAnimationFrame(n.update)},30)},i.disableInterval_=function(n){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&"ended"!==n.type||this.clearInterval(this.updateInterval)},i.createEl=function(){return n.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})},i.update_=function(n,t){var r=this.player_.liveTracker,i=this.player_.duration();r&&r.isLive()&&(i=this.player_.liveTracker.liveCurrentTime());this.el_.setAttribute("aria-valuenow",(100*t).toFixed(2));this.el_.setAttribute("aria-valuetext",this.localize("progress bar timing: currentTime={1} duration={2}",[ku(n,i),ku(i,i)],"{1} of {2}"));this.bar&&this.bar.update(gf(this.el_),t)},i.update=function(){if(null!==this.el().offsetParent){var t=n.prototype.update.call(this);return this.update_(this.getCurrentTime_(),t),t}},i.getCurrentTime_=function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()},i.handleEnded=function(){this.update_(this.player_.duration(),1)},i.getPercent=function(){var n,i=this.getCurrentTime_(),t=this.player_.liveTracker;return t&&t.isLive()?(n=(i-t.seekableStart())/t.liveWindow(),t.atLiveEdge()&&(n=1)):n=i/this.player_.duration(),1<=n?1:n||0},i.handleMouseDown=function(t){cu(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(cu(n)){if(u=this.calculateDistance(n),i=this.player_.liveTracker,i&&i.isLive()){if(r=i.seekableStart(),f=i.liveCurrentTime(),f<=(t=r+u*i.liveWindow())&&(t=f),t<=r&&(t=r+.1),t===1/0)return}else(t=u*this.player_.duration())===this.player_.duration()&&(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&&rr(this.player_.play())},i.stepForward=function(){this.player_.currentTime(this.player_.currentTime()+5)},i.stepBack=function(){this.player_.currentTime(this.player_.currentTime()-5)},i.handleAction=function(){this.player_.paused()?this.player_.play():this.player_.pause()},i.handleKeyDown=function(t){if(o.isEventKey(t,"Space")||o.isEventKey(t,"Enter"))t.preventDefault(),t.stopPropagation(),this.handleAction(t);else if(o.isEventKey(t,"Home"))t.preventDefault(),t.stopPropagation(),this.player_.currentTime(0);else if(o.isEventKey(t,"End"))t.preventDefault(),t.stopPropagation(),this.player_.currentTime(this.player_.duration());else if(/^[0-9]$/.test(o(t))){t.preventDefault();t.stopPropagation();var i=(o.codes[o(t)]-o.codes[0])/10;this.player_.currentTime(this.player_.duration()*i)}else o.isEventKey(t,"PgDn")?(t.preventDefault(),t.stopPropagation(),this.player_.currentTime(this.player_.currentTime()-60)):o.isEventKey(t,"PgUp")?(t.preventDefault(),t.stopPropagation(),this.player_.currentTime(this.player_.currentTime()+60)):n.prototype.handleKeyDown.call(this,t)},r}(hs);ls.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"};si||ir||ls.prototype.options_.children.splice(1,0,"mouseTimeDisplay");r.registerComponent("SeekBar",ls);fv=function(n){function i(t,i){var r;return(r=n.call(this,t,i)||this).handleMouseMove=nr(c(s(r),r.handleMouseMove),30),r.throttledHandleMouseSeek=nr(c(s(r),r.handleMouseSeek),30),r.enable(),r}f(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 i=this.getChild("seekBar");if(i){var r=i.getChild("mouseTimeDisplay"),u=i.el(),f=gf(u),t=bc(u,n).x;1<t?t=1:t<0&&(t=0);r&&r.update(f,t)}},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(){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);fv.prototype.options_={children:["seekBar"]};r.registerComponent("ProgressControl",fv);ev=function(n){function i(i,r){var u;return(u=n.call(this,i,r)||this).on(i,["enterpictureinpicture","leavepictureinpicture"],u.handlePictureInPictureChange),t.pictureInPictureEnabled||u.disable(),u}f(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}(ii);ev.prototype.controlText_="Picture-in-Picture";r.registerComponent("PictureInPictureToggle",ev);ov=function(n){function i(i,r){var u;return(u=n.call(this,i,r)||this).on(i,"fullscreenchange",u.handleFullscreenChange),!1===t[i.fsApi_.fullscreenEnabled]&&u.disable(),u}f(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}(ii);ov.prototype.controlText_="Fullscreen";r.registerComponent("FullscreenToggle",ov);ntt=function(n){function t(){return n.apply(this,arguments)||this}return f(t,n),t.prototype.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",ntt);as=function(n){function i(t,i){var r;return(r=n.call(this,t,i)||this).on("slideractive",r.updateLastVolume_),r.on(t,"volumechange",r.updateARIAAttributes),t.ready(function(){return r.updateARIAAttributes()}),r}f(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){cu(t)&&n.prototype.handleMouseDown.call(this,t)},t.handleMouseMove=function(n){cu(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(100*this.player_.volume())},t.updateLastVolume_=function(){var n=this,t=this.player_.volume();this.one("sliderinactive",function(){0===n.player_.volume()&&n.player_.lastVolume_(t)})},i}(hs);as.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"};as.prototype.playerEvent="volumechange";r.registerComponent("VolumeBar",as);sv=function(n){function i(t,i){var r;return void 0===i&&(i={}),i.vertical=i.vertical||!1,"undefined"!=typeof i.volumeBar&&!wf(i.volumeBar)||(i.volumeBar=i.volumeBar||{},i.volumeBar.vertical=i.vertical),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")})}(s(r=n.call(this,t,i)||this),t),r.throttledHandleMouseMove=nr(c(s(r),r.handleMouseMove),30),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")}),r}f(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);sv.prototype.options_={children:["volumeBar"]};r.registerComponent("VolumeControl",sv);hv=function(n){function i(t,i){var r;return 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")})}(s(r=n.call(this,t,i)||this),t),r.on(t,["loadstart","volumechange"],r.update),r}f(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;0===i?(t=n<.1?.1:n,this.player_.volume(t),this.player_.muted(!1)):this.player_.muted(!this.player_.muted())},t.update=function(){this.updateIcon_();this.updateControlText_()},t.updateIcon_=function(){var i=this.player_.volume(),n=3,t;for(si&&this.player_.tech_&&this.player_.tech_.el_&&this.player_.muted(this.player_.tech_.el_.muted),0===i||this.player_.muted()?n=0:i<.33?n=1:i<.67&&(n=2),t=0;t<4;t++)kf(this.el_,"vjs-vol-"+t);yi(this.el_,"vjs-vol-"+n)},t.updateControlText_=function(){var n=this.player_.muted()||0===this.player_.volume()?"Unmute":"Mute";this.controlText()!==n&&this.controlText(n)},i}(ii);hv.prototype.controlText_="Mute";r.registerComponent("MuteToggle",hv);cv=function(n){function r(t,i){var r;return void 0===i&&(i={}),i.inline="undefined"!=typeof i.inline?i.inline:!0,"undefined"!=typeof i.volumeControl&&!wf(i.volumeControl)||(i.volumeControl=i.volumeControl||{},i.volumeControl.vertical=!i.inline),(r=n.call(this,t,i)||this).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_),r}f(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){o.isEventKey(n,"Esc")&&this.muteToggle.focus()},i.handleMouseOver=function(){this.addClass("vjs-hover");kt(t,"keyup",c(this,this.handleKeyPress))},i.handleMouseOut=function(){this.removeClass("vjs-hover");ut(t,"keyup",c(this,this.handleKeyPress))},i.handleKeyPress=function(n){o.isEventKey(n,"Esc")&&this.handleMouseOut()},r}(r);cv.prototype.options_={children:["muteToggle","volumeControl"]};r.registerComponent("VolumePanel",cv);vs=function(n){function u(t,i){var r;return r=n.call(this,t,i)||this,i&&(r.menuButton_=i.menuButton),r.focusedChild_=-1,r.on("keydown",r.handleKeyDown),r.boundHandleBlur_=c(s(r),r.handleBlur),r.boundHandleTapClick_=c(s(r),r.handleTapClick),r}f(u,n);var i=u.prototype;return i.addEventListenerForItem=function(n){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){"string"==typeof t&&(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_=nt(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_),kt(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;"CaptionSettingsMenuItem"!==i.name()&&this.menuButton_.focus()}},i.handleKeyDown=function(n){o.isEventKey(n,"Left")||o.isEventKey(n,"Down")?(n.preventDefault(),n.stopPropagation(),this.stepForward()):(o.isEventKey(n,"Right")||o.isEventKey(n,"Up"))&&(n.preventDefault(),n.stopPropagation(),this.stepBack())},i.stepForward=function(){var n=0;void 0!==this.focusedChild_&&(n=this.focusedChild_+1);this.focus(n)},i.stepBack=function(){var n=0;void 0!==this.focusedChild_&&(n=this.focusedChild_-1);this.focus(n)},i.focus=function(n){void 0===n&&(n=0);var t=this.children().slice();t.length&&t[0].className&&/vjs-menu-title/.test(t[0].className)&&t.shift();0<t.length&&(n<0?n=0:n>=t.length&&(n=t.length-1),t[this.focusedChild_=n].el_.focus())},u}(r);r.registerComponent("Menu",vs);ys=function(n){function u(i,r){var u,f;return void 0===r&&(r={}),(u=n.call(this,i,r)||this).menuButton_=new ii(i,r),u.menuButton_.controlText(u.controlText_),u.menuButton_.el_.setAttribute("aria-haspopup","true"),f=ii.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();kt(t,"keyup",c(s(u),u.handleMenuKeyUp))}),u.on("mouseleave",u.handleMouseLeave),u.on("keydown",u.handleSubmenuKeyDown),u}f(u,n);var i=u.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 vs(this.player_,{menuButton:this}),i,u,n;if((this.hideThreshold_=0,this.options_.title)&&(i=nt("li",{className:"vjs-menu-title",innerHTML:g(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";return t+=!0===this.options_.inline?"-inline":"-popup","vjs-menu-button "+t+" "+ii.prototype.buildCSSClass()+" "+n.prototype.buildCSSClass.call(this)},i.buildCSSClass=function(){var t="vjs-menu-button";return t+=!0===this.options_.inline?"-inline":"-popup","vjs-menu-button "+t+" "+n.prototype.buildCSSClass.call(this)},i.controlText=function(n,t){return void 0===t&&(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");ut(t,"keyup",c(this,this.handleMenuKeyUp))},i.focus=function(){this.menuButton_.focus()},i.blur=function(){this.menuButton_.blur()},i.handleKeyDown=function(n){o.isEventKey(n,"Esc")||o.isEventKey(n,"Tab")?(this.buttonPressed_&&this.unpressButton(),o.isEventKey(n,"Tab")||(n.preventDefault(),this.menuButton_.focus())):(o.isEventKey(n,"Up")||o.isEventKey(n,"Down"))&&(this.buttonPressed_||(n.preventDefault(),this.pressButton()))},i.handleMenuKeyUp=function(n){(o.isEventKey(n,"Esc")||o.isEventKey(n,"Tab"))&&this.removeClass("vjs-hover")},i.handleSubmenuKeyPress=function(n){this.handleSubmenuKeyDown(n)},i.handleSubmenuKeyDown=function(n){(o.isEventKey(n,"Esc")||o.isEventKey(n,"Tab"))&&(this.buttonPressed_&&this.unpressButton(),o.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"),si&&cb())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()},u}(r);r.registerComponent("MenuButton",ys);ps=function(n){function t(t,i){var r,f=i.tracks,u;return((r=n.call(this,t,i)||this).items.length<=1&&r.hide(),!f)?s(r):(u=c(s(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)}),r)}return f(t,n),t}(ys);r.registerComponent("TrackButton",ps);ttt=["Tab","Esc","Up","Down","Right","Left"];du=function(n){function i(t,i){var r;return(r=n.call(this,t,i)||this).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}f(i,n);var t=i.prototype;return t.createEl=function(t,i,r){return this.nonIconControl=!0,n.prototype.createEl.call(this,"li",b({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){ttt.some(function(n){return o.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}(le);r.registerComponent("MenuItem",du);gu=function(i){function u(r,u){function h(){for(var t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];f.handleTracksChange.apply(s(f),i)}function l(){for(var t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];f.handleSelectedLanguageChange.apply(s(f),i)}var f,o=u.track,e=r.textTracks(),c;return u.label=o.label||o.language||"Unknown",u.selected="showing"===o.mode,(f=i.call(this,r,u)||this).track=o,f.kinds=(u.kinds||[u.kind||f.track.kind]).filter(Boolean),r.on(["loadstart","texttrackchange"],h),e.addEventListener("change",h),e.addEventListener("selectedlanguagechange",l),f.on("dispose",function(){r.off(["loadstart","texttrackchange"],h);e.removeEventListener("change",h);e.removeEventListener("selectedlanguagechange",l)}),void 0===e.onchange&&f.on(["tap","click"],function(){if("object"!=typeof n.Event)try{c=new n.Event("change")}catch(i){}c||(c=t.createEvent("Event")).initEvent("change",!0,!0);e.dispatchEvent(c)}),f.handleTracksChange(),f}f(u,i);var r=u.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],-1!==this.kinds.indexOf(t.kind)&&(t===f?"showing"!==t.mode&&(t.mode="showing"):"disabled"!==t.mode&&(t.mode="disabled"))},r.handleTracksChange=function(){var n="showing"===this.track.mode;n!==this.isSelected_&&this.selected(n)},r.handleSelectedLanguageChange=function(){if("showing"===this.track.mode){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)},u}(du);r.registerComponent("TextTrackMenuItem",gu);lv=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}f(t,n);var i=t.prototype;return i.handleTracksChange=function(){for(var i,r=this.player().textTracks(),n=!0,t=0,u=r.length;t<u;t++)if(i=r[t],-1<this.options_.kinds.indexOf(i.kind)&&"showing"===i.mode){n=!1;break}n!==this.isSelected_&&this.selected(n)},i.handleSelectedLanguageChange=function(){for(var t,i=this.player().textTracks(),r=!0,n=0,u=i.length;n<u;n++)if(t=i[n],-1<["captions","descriptions","subtitles"].indexOf(t.kind)&&"showing"===t.mode){r=!1;break}r&&(this.player_.cache_.selectedLanguage={enabled:!1})},t}(gu);r.registerComponent("OffTextTrackMenuItem",lv);kr=function(n){function t(t,i){return void 0===i&&(i={}),i.tracks=t.textTracks(),n.call(this,t,i)||this}return f(t,n),t.prototype.createItems=function(n,t){var e,u,i,r,f;for(void 0===n&&(n=[]),void 0===t&&(t=gu),this.label_&&(e=this.label_+" off"),n.push(new lv(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],-1<this.kinds_.indexOf(r.kind)&&(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}(ps);r.registerComponent("TextTrackButton",kr);av=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).track=f,r.cue=u,f.addEventListener("cuechange",c(s(r),r.update)),r}f(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}(du);r.registerComponent("ChaptersTrackMenuItem",av);ws=function(n){function i(t,i,r){return n.call(this,t,i,r)||this}f(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||"addtrack"!==t.type&&"removetrack"!==t.type)||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,t=this.player_.textTracks()||[],n=t.length-1;0<=n;n--)if(i=t[n],i.kind===this.kind_)return i},t.getMenuCaption=function(){return this.track_&&this.track_.label?this.track_.label:this.localize(g(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 av(this.player_,{track:this.track_,cue:u}),i.push(f);return i},i}(kr);ws.prototype.kind_="chapters";ws.prototype.controlText_="Chapters";r.registerComponent("ChaptersButton",ws);bs=function(n){function t(t,i,r){var u,f,e;return u=n.call(this,t,i,r)||this,f=t.textTracks(),e=c(s(u),u.handleTracksChange),f.addEventListener("change",e),u.on("dispose",function(){f.removeEventListener("change",e)}),u}f(t,n);var i=t.prototype;return i.handleTracksChange=function(){for(var t,i=this.player().textTracks(),r=!1,n=0,u=i.length;n<u;n++)if(t=i[n],t.kind!==this.kind_&&"showing"===t.mode){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}(kr);bs.prototype.kind_="descriptions";bs.prototype.controlText_="Descriptions";r.registerComponent("DescriptionsButton",bs);ks=function(n){function t(t,i,r){return n.call(this,t,i,r)||this}f(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}(kr);ks.prototype.kind_="subtitles";ks.prototype.controlText_="Subtitles";r.registerComponent("SubtitlesButton",ks);ds=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).addClass("vjs-texttrack-settings"),r.controlText(", opens "+i.kind+" settings dialog"),r}return f(t,n),t.prototype.handleClick=function(){this.player().getChild("textTrackSettings").open()},t}(gu);r.registerComponent("CaptionSettingsMenuItem",ds);gs=function(n){function t(t,i,r){return n.call(this,t,i,r)||this}f(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 ds(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),n.prototype.createItems.call(this,t)},t}(kr);gs.prototype.kind_="captions";gs.prototype.controlText_="Captions";r.registerComponent("CaptionsButton",gs);vv=function(n){function t(){return n.apply(this,arguments)||this}return f(t,n),t.prototype.createEl=function(t,i,r){var u='<span class="vjs-menu-item-text">'+this.localize(this.options_.label);return"captions"===this.options_.track.kind&&(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,b({innerHTML:u},i),r)},t}(gu);r.registerComponent("SubsCapsMenuItem",vv);nh=function(n){function t(t,i){var r;return void 0===i&&(i={}),(r=n.call(this,t,i)||this).label_="subtitles",-1<["en","en-us","en-ca","fr-ca"].indexOf(r.player_.language_)&&(r.label_="captions"),r.menuButton_.controlText(g(r.label_)),r}f(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 ds(this.player_,{kind:this.label_})),this.hideThreshold_+=1),t=n.prototype.createItems.call(this,t,vv)},t}(kr);nh.prototype.kinds_=["captions","subtitles"];nh.prototype.controlText_="Subtitles";r.registerComponent("SubsCapsButton",nh);yv=function(n){function t(t,i){function e(){for(var t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];r.handleTracksChange.apply(s(r),i)}var r,u=i.track,f=t.audioTracks();return i.label=u.label||u.language||"Unknown",i.selected=u.enabled,(r=n.call(this,t,i)||this).track=u,r.addClass("vjs-"+u.kind+"-menu-item"),f.addEventListener("change",e),r.on("dispose",function(){f.removeEventListener("change",e)}),r}f(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"main-desc"===this.options_.track.kind&&(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,b({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}(du);r.registerComponent("AudioTrackMenuItem",yv);pv=function(n){function t(t,i){return void 0===i&&(i={}),i.tracks=t.audioTracks(),n.call(this,t,i)||this}f(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(void 0===n&&(n=[]),this.hideThreshold_=1,i=this.player_.audioTracks(),t=0;t<i.length;t++)r=i[t],n.push(new yv(this.player_,{track:r,selectable:!0,multiSelectable:!1}));return n},t}(ps);pv.prototype.controlText_="Audio Track";r.registerComponent("AudioTrackButton",pv);th=function(n){function t(t,i){var r,u=i.rate,f=parseFloat(u,10);return i.label=u,i.selected=1===f,i.selectable=!0,i.multiSelectable=!1,(r=n.call(this,t,i)||this).label=u,r.rate=f,r.on(t,"ratechange",r.update),r}f(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}(du);th.prototype.contentElType="button";r.registerComponent("PlaybackRateMenuItem",th);wv=function(n){function i(t,i){var r;return(r=n.call(this,t,i)||this).updateVisibility(),r.updateLabel(),r.on(t,"loadstart",r.updateVisibility),r.on(t,"ratechange",r.updateLabel),r}f(i,n);var t=i.prototype;return t.createEl=function(){var t=n.prototype.createEl.call(this);return this.labelEl_=nt("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 vs(this.player()),t=this.playbackRates(),n;if(t)for(n=t.length-1;0<=n;n--)i.addChild(new th(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(),n=this.playbackRates(),i=n[0],t=0;t<n.length;t++)if(n[t]>r){i=n[t];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()&&0<this.playbackRates().length},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}(ys);wv.prototype.controlText_="Playback Rate";r.registerComponent("PlaybackRateMenuButton",wv);bv=function(n){function t(){return n.apply(this,arguments)||this}f(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",bv);itt=function(n){function t(){return n.apply(this,arguments)||this}f(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}(bv);r.registerComponent("CustomControlSpacer",itt);ve=function(n){function t(){return n.apply(this,arguments)||this}return f(t,n),t.prototype.createEl=function(){return n.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"})},t}(r);ve.prototype.options_={children:["playToggle","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","seekToLive","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","fullscreenToggle"]};"exitPictureInPicture"in t&&ve.prototype.options_.children.splice(ve.prototype.options_.children.length-1,0,"pictureInPictureToggle");r.registerComponent("ControlBar",ve);kv=function(n){function t(t,i){var r;return(r=n.call(this,t,i)||this).on(t,"error",r.open),r}f(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}(au);kv.prototype.options_=p(au.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0});r.registerComponent("ErrorDisplay",kv);var dv="vjs-text-track-settings",rtt=["#000","Black"],utt=["#00F","Blue"],ftt=["#0FF","Cyan"],ett=["#0F0","Green"],ott=["#F0F","Magenta"],stt=["#F00","Red"],htt=["#FFF","White"],ctt=["#FF0","Yellow"],gv=["1","Opaque"],ny=["0.5","Semi-Transparent"],ltt=["0","Transparent"],dr={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[rtt,htt,stt,ett,utt,ctt,ott,ftt]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[gv,ny,ltt]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[htt,rtt,stt,ett,utt,ctt,ott,ftt]},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"1.00"===n?null:Number(n)}},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Transparency",options:[gv,ny]},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:[ltt,ny,gv]}};dr.windowColor.options=dr.backgroundColor.options;vtt=function(t){function r(n,i){var r;return i.temporary=!1,(r=t.call(this,n,i)||this).updateDisplay=c(s(r),r.updateDisplay),r.fill(),r.hasBeenOpened_=r.hasBeenFilled_=!0,r.endDialog=nt("p",{className:"vjs-control-text",textContent:r.localize("End of dialog window.")}),r.el().appendChild(r.endDialog),r.setDefaults(),void 0===i.persistTextTrackSettings&&(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()}),ou(dr,function(n){r.on(r.$(n.selector),"change",r.updateDisplay)}),r.options_.persistTextTrackSettings&&r.restoreSettings(),r}f(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;void 0===t&&(t="");void 0===i&&(i="label");var r=dr[n],u=r.id.replace("%s",this.id_),f=[t,u].join(" ").trim();return["<"+i+' id="'+u+'" class="'+("label"===i?"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 nt("div",{className:"vjs-track-settings-colors",innerHTML:[this.createElFgColor_(),this.createElBgColor_(),this.createElWinColor_()].join("")})},i.createElFont_=function(){return nt("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 nt("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 function(n,t,i){return void 0===i&&(i=0),ob(n).reduce(function(i,r){return t(i,n[r],r)},i)}(dr,function(t,i,r){var u=function(n,t){return att(n.options[n.options.selectedIndex].value,t)}(n.$(i.selector),i.parser);return void 0!==u&&(t[r]=u),t},{})},i.setValues=function(n){var t=this;ou(dr,function(i,r){!function(n,t,i){if(t)for(var r=0;r<n.options.length;r++)if(att(n.options[r].value,i)===t){n.selectedIndex=r;break}}(t.$(i.selector),n[r],i.parser)})},i.setDefaults=function(){var n=this;ou(dr,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(dv))}catch(t){a.warn(t)}t&&this.setValues(t)},i.saveSettings=function(){if(this.options_.persistTextTrackSettings){var t=this.getValues();try{Object.keys(t).length?n.localStorage.setItem(dv,JSON.stringify(t)):n.localStorage.removeItem(dv)}catch(t){a.warn(t)}}},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}(au);r.registerComponent("TextTrackSettings",vtt);ytt=function(t){function i(i,r){var u,f=r.ResizeObserver||n.ResizeObserver,e;return null===r.ResizeObserver&&(f=!1),e=p({createEl:!f,reportTouchActivity:!1},r),(u=t.call(this,i,e)||this).ResizeObserver=r.ResizeObserver||n.ResizeObserver,u.loadListener_=null,u.resizeObserver_=null,u.debouncedHandler_=function(t,i,r,u){function e(){var n=this,e=arguments,o=function(){o=f=null;r||t.apply(n,e)};!f&&r&&t.apply(n,e);u.clearTimeout(f);f=u.setTimeout(o,i)}var f;return void 0===u&&(u=n),e.cancel=function(){u.clearTimeout(f);f=null},e}(function(){u.resizeHandler()},100,!1,s(u)),f?(u.resizeObserver_=new u.ResizeObserver(u.debouncedHandler_),u.resizeObserver_.observe(i.el())):(u.loadListener_=function(){if(u.el_&&u.el_.contentWindow){var t=u.debouncedHandler_,n=u.unloadListener_=function(){ut(this,"resize",t);ut(this,"unload",n);n=null};kt(u.el_.contentWindow,"unload",n);kt(u.el_.contentWindow,"resize",t)}},u.one("load",u.loadListener_)),u}f(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",ytt);ptt=function(n){function r(i,r){var u,f=p({createEl:!1},r);return(u=n.call(this,i,f)||this).reset_(),u.on(u.player_,"durationchange",u.handleDurationchange),pl&&"hidden"in t&&"visibilityState"in t&&u.on(t,"visibilitychange",u.handleVisibilityChange),u}f(r,n);var i=r.prototype;return i.handleVisibilityChange=function(){this.player_.duration()===1/0&&(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_;return n!==1/0&&t<=n-(2*i+.07)},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.seekableIncrement_=Math.abs(n-this.lastSeekEnd_)),this.pastSeekEnd_=0,this.lastSeekEnd_=n,this.trigger("seekableendchange")),this.pastSeekEnd_=this.pastSeekEnd()+.03,this.isBehind_()!==this.behindLiveEdge()&&(this.behindLiveEdge_=this.isBehind_(),this.trigger("liveedgechange")))},i.handleDurationchange=function(){this.player_.duration()===1/0?this.startTracking():this.stopTracking()},i.startTracking=function(){var n=this;this.isTracking()||(this.timeupdateSeen_||(this.timeupdateSeen_=this.player_.hasStarted()),this.trackingInterval_=this.setInterval(this.trackLive_,30),this.trackLive_(),this.on(this.player_,"play",this.trackLive_),this.on(this.player_,"pause",this.trackLive_),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.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]:1/0},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===1/0?1/0: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"number"==typeof this.trackingInterval_},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",ptt);var ilt=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}}),rlt=Object.defineProperty({},"src",{get:function(){return this.hasAttribute("src")?hd(n.Element.prototype.getAttribute.call(this,"src")):""},set:function(t){return n.Element.prototype.setAttribute.call(this,"src",t),t}}),u=function(i){function u(n,t){var r,f,e,u,o;if(r=i.call(this,n,t)||this,f=n.source,e=!1,f&&(r.el_.currentSrc!==f.src||n.tag&&3===n.tag.initNetworkState_)?r.setSource(f):r.handleLateInit_(r.el_),n.enableSourceset&&r.setupSourcesetHandling_(),r.el_.hasChildNodes()){for(var h=r.el_.childNodes,c=h.length,s=[];c--;)u=h[c],"track"===u.nodeName.toLowerCase()&&(r.featuresNativeTextTracks?(r.remoteTextTrackEls().addTrackElement_(u),r.remoteTextTracks().addTrack(u.track),r.textTracks().addTrack(u.track),e||r.el_.hasAttribute("crossorigin")||!po(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&&a.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_(),(ie||al||bk)&&!0===n.nativeControlsForTouch&&r.setControls(!0),r.proxyWebkitFullscreen_(),r.triggerReady(),r}f(u,i);var r=u.prototype;return r.dispose=function(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_();u.disposeMediaElement(this.el_);this.options_=null;i.prototype.dispose.call(this)},r.setupSourcesetHandling_=function(){tlt(this)},r.restoreMetadataTracksInIOSNativePlayer_=function(){function t(){var t,r;for(i=[],t=0;t<n.length;t++)r=n[t],"metadata"===r.kind&&i.push({track:r,storedMode:r.mode})}function r(){for(var t,u=0;u<i.length;u++)t=i[u],"disabled"===t.track.mode&&t.track.mode!==t.storedMode&&(t.track.mode=t.storedMode);n.removeEventListener("change",r)}var i,n=this.textTracks();t();n.addEventListener("change",t);this.on("dispose",function(){return n.removeEventListener("change",t)});this.on("webkitbeginfullscreen",function(){n.removeEventListener("change",t);n.removeEventListener("change",r);n.addEventListener("change",r)});this.on("webkitendfullscreen",function(){n.removeEventListener("change",t);n.addEventListener("change",t);n.removeEventListener("change",r)})},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){r.el()[i+"Tracks"].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 f=this,r=dt[n],i=this.el()[r.getterName],t=this[r.getterName](),u;if(this["featuresNative"+r.capitalName+"Tracks"]&&i&&i.addEventListener){function e(){for(var f,u,r=[],n=0;n<t.length;n++){for(f=!1,u=0;u<i.length;u++)if(i[u]===t[n]){f=!0;break}f||r.push(t[n])}for(;r.length;)t.removeTrack(r.shift())}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)}};this[r.getterName+"Listeners_"]=u;Object.keys(u).forEach(function(n){var t=u[n];i.addEventListener(n,t);f.on("dispose",function(){return i.removeEventListener(n,t)})});this.on("loadstart",e);this.on("dispose",function(){return f.off("loadstart",e)})}},r.proxyNativeTracks_=function(){var n=this;dt.names.forEach(function(t){n.proxyNativeTracksForType_(t)})},r.createEl=function(){var n=this.options_.tag,e,o,s,r,i,f;for(n&&(this.options_.playerElIngest||this.movingMediaElementInDOM)||(n?(e=n.cloneNode(!0),n.parentNode&&n.parentNode.insertBefore(e,n),u.disposeMediaElement(n),n=e):(n=t.createElement("video"),o=p({},this.options_.tag&&pi(this.options_.tag)),ie&&!0===this.options_.nativeControlsForTouch||delete o.controls,vb(n,b(o,{id:this.options_.techId,"class":"vjs-tech"}))),n.playerId=this.options_.playerId),"undefined"!=typeof this.options_.preload&&df(n,"preload",this.options_.preload),s=["loop","muted","playsinline","autoplay"],r=0;r<s.length;r++)i=s[r],f=this.options_[i],"undefined"!=typeof f&&(f?df(n,i,i):co(n,i),n[i]=f);return n},r.handleLateInit_=function(n){var i,t;if(0!==n.networkState&&3!==n.networkState){if(0===n.readyState){function r(){i=!0}i=!1;this.on("loadstart",r);function u(){i||this.trigger("loadstart")}return this.on("loadedmetadata",u),void this.ready(function(){this.off("loadstart",r);this.off("loadedmetadata",u);i||this.trigger("loadstart")})}t=["loadstart"];t.push("loadedmetadata");2<=n.readyState&&t.push("loadeddata");3<=n.readyState&&t.push("canplay");4<=n.readyState&&t.push("canplaythrough");this.ready(function(){t.forEach(function(n){this.trigger(n)},this)})}},r.setCurrentTime=function(n){try{this.el_.currentTime=n}catch(n){a(n,"Video is not ready. (Video.js)")}},r.duration=function(){var n=this;return this.el_.duration===1/0&&ir&&wi&&0===this.el_.currentTime?(this.on("timeupdate",function t(){0<n.el_.currentTime&&(n.el_.duration===1/0&&n.trigger("durationchange"),n.off("timeupdate",t))}),NaN):this.el_.duration||NaN},r.width=function(){return this.el_.offsetWidth},r.height=function(){return this.el_.offsetHeight},r.proxyWebkitFullscreen_=function(){var n=this;if("webkitDisplayingFullscreen"in this.el_){function t(){this.trigger("fullscreenchange",{isFullscreen:!1})}function i(){"webkitPresentationMode"in this.el_&&"picture-in-picture"!==this.el_.webkitPresentationMode&&(this.one("webkitendfullscreen",t),this.trigger("fullscreenchange",{isFullscreen:!0}))}this.on("webkitbeginfullscreen",i);this.on("dispose",function(){n.off("webkitbeginfullscreen",i);n.off("webkitendfullscreen",t)})}},r.supportsFullScreen=function(){if("function"==typeof this.el_.webkitEnterFullScreen){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(void 0===n)return this.el_.src;this.setSrc(n)},r.reset=function(){u.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("function"==typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();var t={};return"undefined"!=typeof this.el().webkitDroppedFrameCount&&"undefined"!=typeof this.el().webkitDecodedFrameCount&&(t.droppedVideoFrames=this.el().webkitDroppedFrameCount,t.totalVideoFrames=this.el().webkitDecodedFrameCount),n.performance&&"function"==typeof n.performance.now?t.creationTime=n.performance.now():n.performance&&n.performance.timing&&"number"==typeof n.performance.timing.navigationStart&&(t.creationTime=n.Date.now()-n.performance.timing.navigationStart),t},u}(w);su()&&(u.TEST_VID=t.createElement("video"),ye=t.createElement("track"),ye.kind="captions",ye.srclang="en",ye.label="English",u.TEST_VID.appendChild(ye));u.isSupported=function(){try{u.TEST_VID.volume=.5}catch(n){return!1}return!(!u.TEST_VID||!u.TEST_VID.canPlayType)};u.canPlayType=function(n){return u.TEST_VID.canPlayType(n)};u.canPlaySource=function(n){return u.canPlayType(n.type)};u.canControlVolume=function(){try{var n=u.TEST_VID.volume;return u.TEST_VID.volume=n/2+.1,n!==u.TEST_VID.volume}catch(n){return!1}};u.canMuteVolume=function(){try{var n=u.TEST_VID.muted;return u.TEST_VID.muted=!n,u.TEST_VID.muted?df(u.TEST_VID,"muted","muted"):co(u.TEST_VID,"muted"),n!==u.TEST_VID.muted}catch(n){return!1}};u.canControlPlaybackRate=function(){if(ir&&wi&&dk<58)return!1;try{var n=u.TEST_VID.playbackRate;return u.TEST_VID.playbackRate=n/2+.1,n!==u.TEST_VID.playbackRate}catch(n){return!1}};u.canOverrideAttributes=function(){try{function n(){}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(n){return!1}return!0};u.supportsNativeTextTracks=function(){return wl||si&&wi};u.supportsNativeVideoTracks=function(){return!(!u.TEST_VID||!u.TEST_VID.videoTracks)};u.supportsNativeAudioTracks=function(){return!(!u.TEST_VID||!u.TEST_VID.audioTracks)};u.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","resize","volumechange"];u.prototype.featuresVolumeControl=u.canControlVolume();u.prototype.featuresMuteControl=u.canMuteVolume();u.prototype.featuresPlaybackRate=u.canControlPlaybackRate();u.prototype.featuresSourceset=u.canOverrideAttributes();u.prototype.movingMediaElementInDOM=!si;u.prototype.featuresFullscreenResize=!0;u.prototype.featuresProgressEvents=!0;u.prototype.featuresTimeupdateEvents=!0;u.prototype.featuresNativeTextTracks=u.supportsNativeTextTracks();u.prototype.featuresNativeVideoTracks=u.supportsNativeVideoTracks();u.prototype.featuresNativeAudioTracks=u.supportsNativeAudioTracks();iy=u.TEST_VID&&u.TEST_VID.constructor.prototype.canPlayType;ktt=/^application\/(?:x-|vnd\.apple\.)mpegurl/i;u.patchCanPlayType=function(){4<=vl&&!kk&&!wi&&(u.TEST_VID.constructor.prototype.canPlayType=function(n){return n&&ktt.test(n)?"maybe":iy.call(this,n)})};u.unpatchCanPlayType=function(){var n=u.TEST_VID.constructor.prototype.canPlayType;return u.TEST_VID.constructor.prototype.canPlayType=iy,n};u.patchCanPlayType();u.disposeMediaElement=function(n){if(n){for(n.parentNode&&n.parentNode.removeChild(n);n.hasChildNodes();)n.removeChild(n.firstChild);n.removeAttribute("src");"function"==typeof n.load&&function(){try{n.load()}catch(n){}}()}};u.resetMediaElement=function(n){if(n){for(var t=n.querySelectorAll("source"),i=t.length;i--;)n.removeChild(t[i]);n.removeAttribute("src");"function"==typeof n.load&&function(){try{n.load()}catch(n){}}()}};["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach(function(n){u.prototype[n]=function(){return this.el_[n]||this.el_.hasAttribute(n)}});["muted","defaultMuted","autoplay","loop","playsinline"].forEach(function(n){u.prototype["set"+g(n)]=function(t){(this.el_[n]=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){u.prototype[n]=function(){return this.el_[n]}});["volume","src","poster","preload","playbackRate","defaultPlaybackRate"].forEach(function(n){u.prototype["set"+g(n)]=function(t){this.el_[n]=t}});["pause","load","play"].forEach(function(n){u.prototype[n]=function(){return this.el_[n]()}});w.withSourceHandlers(u);u.nativeSourceHandler={};u.nativeSourceHandler.canPlayType=function(n){try{return u.TEST_VID.canPlayType(n)}catch(n){return""}};u.nativeSourceHandler.canHandleSource=function(n){if(n.type)return u.nativeSourceHandler.canPlayType(n.type);if(n.src){var t=ra(n.src);return u.nativeSourceHandler.canPlayType("video/"+t)}return""};u.nativeSourceHandler.handleSource=function(n,t){t.setSrc(n.src)};u.nativeSourceHandler.dispose=function(){};u.registerSourceHandler(u.nativeSourceHandler);w.registerTech("Html5",u);var dtt=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"],ry={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},uy=["tiny","xsmall","small","medium","large","xlarge","huge"],ih={};uy.forEach(function(n){var t="x"===n.charAt(0)?"x-"+n.substring(1):n;ih[n]="vjs-layout-"+t});gtt={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0};tt=function(i){function e(n,t,r){var u,o,f,h,l,a;if(n.id=n.id||t.id||"vjs_video_"+hr(),(t=b(e.getTagSettings(n),t)).initChildren=!1,t.createEl=!1,t.evented=!1,t.reportTouchActivity=!1,!t.language)if("function"==typeof n.closest)o=n.closest("[lang]"),o&&o.getAttribute&&(t.language=o.getAttribute("lang"));else for(f=n;f&&1===f.nodeType;){if(pi(f).hasOwnProperty("lang")){t.language=f.getAttribute("lang");break}f=f.parentNode}if((u=i.call(this,null,t,r)||this).boundDocumentFullscreenChange_=c(s(u),u.documentFullscreenChange_),u.boundFullWindowOnEscKey_=c(s(u),u.fullWindowOnEscKey),u.log=fb(u.id_),u.fsApi_=kl,u.isPosterFromTech_=!1,u.queuedCallbacks_=[],u.isReady_=!1,u.hasStarted_=!1,u.userActive_=!1,!u.options_||!u.options_.techOrder||!u.options_.techOrder.length)throw new Error("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");return(u.tag=n,u.tagAttributes=n&&pi(n),u.language(u.options_.language),t.languages)?(h={},Object.getOwnPropertyNames(t.languages).forEach(function(n){h[n.toLowerCase()]=t.languages[n]}),u.languages_=h):u.languages_=e.prototype.options_.languages,u.resetCache_(),u.poster_=t.poster||"",u.controls_=!!t.controls,n.controls=!1,n.removeAttribute("controls"),u.changingSrc_=!1,u.playCallbacks_=[],u.playTerminatedQueue_=[],n.hasAttribute("autoplay")?u.autoplay(!0):u.autoplay(u.options_.autoplay),t.plugins&&Object.keys(t.plugins).forEach(function(n){if("function"!=typeof u[n])throw new Error('plugin "'+n+'" does not exist');}),u.scrubbing_=!1,u.el_=u.createEl(),el(s(u),{eventBusKey:"el_"}),u.fluid_&&u.on("playerreset",u.updateStyleEl_),l=p(u.options_),t.plugins&&Object.keys(t.plugins).forEach(function(n){u[n](t.plugins[n])}),u.options_.playerOptions=l,u.middleware_=[],u.initChildren(),u.isAudio("audio"===n.nodeName.toLowerCase()),u.controls()?u.addClass("vjs-controls-enabled"):u.addClass("vjs-controls-disabled"),u.el_.setAttribute("role","region"),u.isAudio()?u.el_.setAttribute("aria-label",u.localize("Audio Player")):u.el_.setAttribute("aria-label",u.localize("Video Player")),u.isAudio()&&u.addClass("vjs-audio"),u.flexNotSupported_()&&u.addClass("vjs-no-flex"),ie&&u.addClass("vjs-touch-enabled"),si||u.addClass("vjs-workinghover"),e.players[u.id_]=s(u),a=rb.split(".")[0],u.addClass("vjs-v"+a),u.userActive(!0),u.reportUserActivity(),u.one("play",u.listenForUserActivity_),u.on("stageclick",u.handleStageClick_),u.on("keydown",u.handleKeyDown),u.breakpoints(u.options_.breakpoints),u.responsive(u.options_.responsive),u}f(e,i);var u=e.prototype;return u.dispose=function(){var n=this;this.trigger("dispose");this.off("dispose");ut(t,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_);ut(t,"keydown",this.boundFullWindowOnEscKey_);this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null);e.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),function(n){ka[n.id()]=null}(this);et.names.forEach(function(t){var r=et[t],i=n[r.getterName]();i&&i.off&&i.off()});i.prototype.dispose.call(this)},u.createEl=function(){var u,r=this.tag,s=this.playerElIngest_=r.parentNode&&r.parentNode.hasAttribute&&r.parentNode.hasAttribute("data-vjs-player"),e="video-js"===this.tag.tagName.toLowerCase(),f,h,c,l,o,a;if(s?u=this.el_=r.parentNode:e||(u=this.el_=i.prototype.createEl.call(this,"div")),f=pi(r),e){for(u=this.el_=r,r=this.tag=t.createElement("video");u.children.length;)r.appendChild(u.firstChild);sr(u,"video-js")||yi(u,"video-js");u.appendChild(r);s=this.playerElIngest_=u;Object.keys(u).forEach(function(n){r[n]=u[n]})}for((r.setAttribute("tabindex","-1"),f.tabindex="-1",(pl||wi&&nd)&&(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&&"class"===n||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"),!0!==n.VIDEOJS_NO_DYNAMIC_STYLE)&&(this.styleEl_=fk("vjs-styles-dimensions"),h=gi(".vjs-styles-defaults"),c=gi("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),yi(a,"vjs-hidden"),a.setAttribute("hidden","hidden");return r.initNetworkState_=r.networkState,r.parentNode&&!s&&r.parentNode.insertBefore(u,r),wc(r,u),this.children_.unshift(r),this.el_.setAttribute("lang",this.language_),this.el_=u},u.width=function(n){return this.dimension("width",n)},u.height=function(n){return this.dimension("height",n)},u.dimension=function(n,t){var i=n+"_",r;if(void 0===t)return this[i]||0;if(""===t)return this[i]=void 0,void this.updateStyleEl_();r=parseFloat(t);isNaN(r)?a.error('Improper value "'+t+'" supplied for for '+n):(this[i]=r,this.updateStyleEl_())},u.fluid=function(n){if(void 0===n)return!!this.fluid_;this.fluid_=!!n;tr(this)&&this.off("playerreset",this.updateStyleEl_);n?(this.addClass("vjs-fluid"),this.fill(!1),function(n,t){tr(n)?t():(n.eventedCallbacks||(n.eventedCallbacks=[]),n.eventedCallbacks.push(t))}(function(){this.on("playerreset",this.updateStyleEl_)})):this.removeClass("vjs-fluid");this.updateStyleEl_()},u.fill=function(n){if(void 0===n)return!!this.fill_;this.fill_=!!n;n?(this.addClass("vjs-fill"),this.fluid(!1)):this.removeClass("vjs-fill")},u.aspectRatio=function(n){if(void 0===n)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_()},u.updateStyleEl_=function(){var r,e,t,u,i;if(!0!==n.VIDEOJS_NO_DYNAMIC_STYLE)u=(void 0!==this.aspectRatio_&&"auto"!==this.aspectRatio_?this.aspectRatio_:0<this.videoWidth()?this.videoWidth()+":"+this.videoHeight():"16:9").split(":"),i=u[1]/u[0],r=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/i:this.videoWidth()||300,e=void 0!==this.height_?this.height_:r*i,t=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(t),ek(this.styleEl_,"\n      ."+t+" {\n        width: "+r+"px;\n        height: "+e+"px;\n      }\n\n      ."+t+".vjs-fluid {\n        padding-top: "+100*i+"%;\n      }\n    ");else{var o="number"==typeof this.width_?this.width_:this.options_.width,s="number"==typeof this.height_?this.height_:this.options_.height,f=this.tech_&&this.tech_.el();f&&(0<=o&&(f.width=o),0<=s&&(f.height=s))}},u.loadTech_=function(n,t){var i=this,u,f,r,e;if(this.tech_&&this.unloadTech_(),u=g(n),f=n.charAt(0).toLowerCase()+n.slice(1),"Html5"!==u&&this.tag&&(w.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=u,this.isReady_=!1,r={source:t,autoplay:"string"!=typeof this.autoplay()&&this.autoplay(),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},et.names.forEach(function(n){var t=et[n];r[t.getterName]=i[t.privateName]}),b(r,this.options_[u]),b(r,this.options_[f]),b(r,this.options_[n.toLowerCase()]),this.tag&&(r.tag=this.tag),t&&t.src===this.cache_.src&&0<this.cache_.currentTime&&(r.startTime=this.cache_.currentTime),e=w.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(c(this,this.handleTechReady_),!0);od(this.textTracksJson_||[],this.tech_);dtt.forEach(function(n){i.on(i.tech_,n,i["handleTech"+g(n)+"_"])});Object.keys(ry).forEach(function(n){i.on(i.tech_,n,function(t){0===i.tech_.playbackRate()&&i.tech_.seeking()?i.queuedCallbacks_.push({callback:i["handleTech"+ry[n]+"_"].bind(i),event:t}):i["handleTech"+ry[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()||"Html5"===u&&this.tag||wc(this.tech_.el(),this.el());this.tag&&(this.tag.player=null,this.tag=null)},u.unloadTech_=function(){var n=this;et.names.forEach(function(t){var i=et[t];n[i.privateName]=n[i.getterName]()});this.textTracksJson_=ed(this.tech_);this.isReady_=!1;this.tech_.dispose();this.tech_=!1;this.isPosterFromTech_&&(this.poster_="",this.trigger("posterchange"));this.isPosterFromTech_=!1},u.tech=function(n){return void 0===n&&a.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_},u.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_)},u.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_)},u.handleTechReady_=function(){this.triggerReady();this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume);this.handleTechPosterChange_();this.handleTechDurationChange_()},u.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())},u.manualAutoplay_=function(n){var t=this,i;if(this.tech_&&"string"==typeof n){function r(){function i(){t.muted(r)}var r=t.muted(),n;return t.muted(!0),t.playTerminatedQueue_.push(i),n=t.play(),fe(n)?n.catch(i):void 0}if("any"===n&&!0!==this.muted()?fe(i=this.play())&&(i=i.catch(r)):i="muted"===n&&!0!==this.muted()?r():this.play(),fe(i))return i.then(function(){t.trigger({type:"autoplay-success",autoplay:n})}).catch(function(){t.trigger({type:"autoplay-failure",autoplay:n})})}},u.updateSourceCaches_=function(n){var t,i,r;void 0===n&&(n="");t=n;i="";"string"!=typeof t&&(t=n.src,i=n.type);this.cache_.source=this.cache_.source||{};this.cache_.sources=this.cache_.sources||[];t&&!i&&(i=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 us(t)}(this,t));this.cache_.source=p({},n,{src:t,type:i});for(var f=this.cache_.sources.filter(function(n){return n.src&&n.src===t}),e=[],o=this.$$("source"),s=[],u=0;u<o.length;u++)r=pi(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},u.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("sourceset"!==n.type){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"})},u.hasStarted=function(n){if(void 0===n)return this.hasStarted_;n!==this.hasStarted_&&(this.hasStarted_=n,this.hasStarted_?(this.addClass("vjs-has-started"),this.trigger("firstplay")):this.removeClass("vjs-has-started"))},u.handleTechPlay_=function(){this.removeClass("vjs-ended");this.removeClass("vjs-paused");this.addClass("vjs-playing");this.hasStarted(!0);this.trigger("play")},u.handleTechRateChange_=function(){0<this.tech_.playbackRate()&&0===this.cache_.lastPlaybackRate&&(this.queuedCallbacks_.forEach(function(n){return n.callback(n.event)}),this.queuedCallbacks_=[]);this.cache_.lastPlaybackRate=this.tech_.playbackRate();this.trigger("ratechange")},u.handleTechWaiting_=function(){var n=this,t;this.addClass("vjs-waiting");this.trigger("waiting");t=this.currentTime();this.on("timeupdate",function i(){t!==n.currentTime()&&(n.removeClass("vjs-waiting"),n.off("timeupdate",i))})},u.handleTechCanPlay_=function(){this.removeClass("vjs-waiting");this.trigger("canplay")},u.handleTechCanPlayThrough_=function(){this.removeClass("vjs-waiting");this.trigger("canplaythrough")},u.handleTechPlaying_=function(){this.removeClass("vjs-waiting");this.trigger("playing")},u.handleTechSeeking_=function(){this.addClass("vjs-seeking");this.trigger("seeking")},u.handleTechSeeked_=function(){this.removeClass("vjs-seeking");this.removeClass("vjs-ended");this.trigger("seeked")},u.handleTechFirstPlay_=function(){this.options_.starttime&&(a.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")},u.handleTechPause_=function(){this.removeClass("vjs-playing");this.addClass("vjs-paused");this.trigger("pause")},u.handleTechEnded_=function(){this.addClass("vjs-ended");this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause();this.trigger("ended")},u.handleTechDurationChange_=function(){this.duration(this.techGet_("duration"))},u.handleTechClick_=function(n){cu(n)&&this.controls_&&(this.paused()?rr(this.play()):this.pause())},u.handleTechDoubleClick_=function(n){this.controls_&&(Array.prototype.some.call(this.$$(".vjs-control-bar, .vjs-modal-dialog"),function(t){return t.contains(n.target)})||void 0!==this.options_&&void 0!==this.options_.userActions&&void 0!==this.options_.userActions.doubleClick&&!1===this.options_.userActions.doubleClick||(void 0!==this.options_&&void 0!==this.options_.userActions&&"function"==typeof this.options_.userActions.doubleClick?this.options_.userActions.doubleClick.call(this,n):this.isFullscreen()?this.exitFullscreen():this.requestFullscreen()))},u.handleTechTap_=function(){this.userActive(!this.userActive())},u.handleTechTouchStart_=function(){this.userWasActive=this.userActive()},u.handleTechTouchMove_=function(){this.userWasActive&&this.reportUserActivity()},u.handleTechTouchEnd_=function(n){n.preventDefault()},u.handleStageClick_=function(){this.reportUserActivity()},u.toggleFullscreenClass_=function(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")},u.documentFullscreenChange_=function(){var n=this.el(),i=t[this.fsApi_.fullscreenElement]===n;!i&&n.matches?i=n.matches(":"+this.fsApi_.fullscreen):!i&&n.msMatchesSelector&&(i=n.msMatchesSelector(":"+this.fsApi_.fullscreen));this.isFullscreen(i);!1===this.isFullscreen()&&ut(t,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_);this.fsApi_.prefixed&&this.trigger("fullscreenchange")},u.handleTechFullscreenChange_=function(n,t){t&&this.isFullscreen(t.isFullscreen);this.trigger("fullscreenchange")},u.togglePictureInPictureClass_=function(){this.isInPictureInPicture()?this.addClass("vjs-picture-in-picture"):this.removeClass("vjs-picture-in-picture")},u.handleTechEnterPictureInPicture_=function(){this.isInPictureInPicture(!0)},u.handleTechLeavePictureInPicture_=function(){this.isInPictureInPicture(!1)},u.handleTechError_=function(){var n=this.tech_.error();this.error(n)},u.handleTechTextData_=function(n,t){var i=null;1<arguments.length&&(i=t);this.trigger("textdata",i)},u.getCache=function(){return this.cache_},u.resetCache_=function(){this.cache_={currentTime:0,inactivityTimeout:this.options_.inactivityTimeout,duration:NaN,lastVolume:1,lastPlaybackRate:this.defaultPlaybackRate(),media:null,src:"",source:{},sources:[],volume:1}},u.techCall_=function(n,t){this.ready(function(){if(n in gct)return function(n,t,i,r){return t[i](n.reduce(da(i),r))}(this.middleware_,this.tech_,n,t);if(n in on)return en(this.middleware_,this.tech_,n,t);try{this.tech_&&this.tech_[n](t)}catch(n){throw a(n),n;}},!0)},u.techGet_=function(n){if(this.tech_&&this.tech_.isReady_){if(n in dct)return function(n,t,i){return n.reduceRight(da(i),t[i]())}(this.middleware_,this.tech_,n);if(n in on)return en(this.middleware_,this.tech_,n);try{return this.tech_[n]()}catch(t){if(void 0===this.tech_[n])throw a("Video.js: "+n+" method not defined for "+this.techName_+" playback technology.",t),t;if("TypeError"===t.name)throw a("Video.js: "+n+" unavailable on "+this.techName_+" playback technology element.",t),this.tech_.isReady_=!1,t;throw a(t),t;}}},u.play=function(){var i=this,t=this.options_.Promise||n.Promise;return t?new t(function(n){i.play_(n)}):this.play_()},u.play_=function(n){var r=this,t,i;if(void 0===n&&(n=rr),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)return this.waitToPlay_=function(){r.play_()},this.one(["ready","loadstart"],this.waitToPlay_),void(t||!wl&&!si||this.load());i=this.techGet_("play");null===i?this.runPlayTerminatedQueue_():this.runPlayCallbacks_(i)},u.runPlayTerminatedQueue_=function(){var n=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[];n.forEach(function(n){n()})},u.runPlayCallbacks_=function(n){var t=this.playCallbacks_.slice(0);this.playCallbacks_=[];this.playTerminatedQueue_=[];t.forEach(function(t){t(n)})},u.pause=function(){this.techCall_("pause")},u.paused=function(){return!1!==this.techGet_("paused")},u.played=function(){return this.techGet_("played")||lr(0,0)},u.scrubbing=function(n){if("undefined"==typeof n)return this.scrubbing_;this.scrubbing_=!!n;n?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing")},u.currentTime=function(n){return"undefined"!=typeof n?(n<0&&(n=0),void this.techCall_("setCurrentTime",n)):(this.cache_.currentTime=this.techGet_("currentTime")||0,this.cache_.currentTime)},u.duration=function(n){if(void 0===n)return void 0!==this.cache_.duration?this.cache_.duration:NaN;(n=parseFloat(n))<0&&(n=1/0);n!==this.cache_.duration&&((this.cache_.duration=n)===1/0?(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"))},u.remainingTime=function(){return this.duration()-this.currentTime()},u.remainingTimeDisplay=function(){return Math.floor(this.duration())-Math.floor(this.currentTime())},u.buffered=function(){var n=this.techGet_("buffered");return n&&n.length||(n=lr(0,0)),n},u.bufferedPercent=function(){return id(this.buffered(),this.duration())},u.bufferedEnd=function(){var t=this.buffered(),i=this.duration(),n=t.end(t.length-1);return i<n&&(n=i),n},u.volume=function(n){var t;return void 0!==n?(t=Math.max(0,Math.min(1,parseFloat(n))),this.cache_.volume=t,this.techCall_("setVolume",t),void(0<t&&this.lastVolume_(t))):(t=parseFloat(this.techGet_("volume")),isNaN(t)?1:t)},u.muted=function(n){if(void 0===n)return this.techGet_("muted")||!1;this.techCall_("setMuted",n)},u.defaultMuted=function(n){return void 0!==n?this.techCall_("setDefaultMuted",n):this.techGet_("defaultMuted")||!1},u.lastVolume_=function(n){if(void 0===n||0===n)return this.cache_.lastVolume;this.cache_.lastVolume=n},u.supportsFullScreen=function(){return this.techGet_("supportsFullScreen")||!1},u.isFullscreen=function(n){return void 0!==n?(this.isFullscreen_=!!n,void this.toggleFullscreenClass_()):!!this.isFullscreen_},u.requestFullscreen=function(n){var i;this.isFullscreen(!0);this.fsApi_.requestFullscreen?(kt(t,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),this.fsApi_.prefixed||(i=this.options_.fullscreen&&this.options_.fullscreen.options||{},void 0!==n&&(i=n)),rr(this.el_[this.fsApi_.requestFullscreen](i))):this.tech_.supportsFullScreen()?this.techCall_("enterFullScreen"):(this.enterFullWindow(),this.trigger("fullscreenchange"))},u.exitFullscreen=function(){this.isFullscreen(!1);this.fsApi_.requestFullscreen?rr(t[this.fsApi_.exitFullscreen]()):this.tech_.supportsFullScreen()?this.techCall_("exitFullScreen"):(this.exitFullWindow(),this.trigger("fullscreenchange"))},u.enterFullWindow=function(){this.isFullWindow=!0;this.docOrigOverflow=t.documentElement.style.overflow;kt(t,"keydown",this.boundFullWindowOnEscKey_);t.documentElement.style.overflow="hidden";yi(t.body,"vjs-full-window");this.trigger("enterFullWindow")},u.fullWindowOnEscKey=function(n){o.isEventKey(n,"Esc")&&(!0===this.isFullscreen()?this.exitFullscreen():this.exitFullWindow())},u.exitFullWindow=function(){this.isFullWindow=!1;ut(t,"keydown",this.boundFullWindowOnEscKey_);t.documentElement.style.overflow=this.docOrigOverflow;kf(t.body,"vjs-full-window");this.trigger("exitFullWindow")},u.isInPictureInPicture=function(n){return void 0!==n?(this.isInPictureInPicture_=!!n,void this.togglePictureInPictureClass_()):!!this.isInPictureInPicture_},u.requestPictureInPicture=function(){if("pictureInPictureEnabled"in t)return this.techGet_("requestPictureInPicture")},u.exitPictureInPicture=function(){if("pictureInPictureEnabled"in t)return t.exitPictureInPicture()},u.handleKeyDown=function(n){var t=this.options_.userActions;t&&t.hotkeys&&(function(n){var t=n.tagName.toLowerCase();return n.isContentEditable?!0:"input"===t?-1===["button","checkbox","hidden","radio","reset","submit"].indexOf(n.type):-1!==["textarea"].indexOf(t)}(this.el_.ownerDocument.activeElement)||("function"==typeof t.hotkeys?t.hotkeys.call(this,n):this.handleHotkeys(n)))},u.handleHotkeys=function(n){var i=this.options_.userActions?this.options_.userActions.hotkeys:{},u=i.fullscreenKey,h=void 0===u?function(n){return o.isEventKey(n,"f")}:u,f=i.muteKey,c=void 0===f?function(n){return o.isEventKey(n,"m")}:f,e=i.playPauseKey,l=void 0===e?function(n){return o.isEventKey(n,"k")||o.isEventKey(n,"Space")}:e,s;h.call(this,n)?(n.preventDefault(),n.stopPropagation(),s=r.getComponent("FullscreenToggle"),!1!==t[this.fsApi_.fullscreenEnabled]&&s.prototype.handleClick.call(this,n)):c.call(this,n)?(n.preventDefault(),n.stopPropagation(),r.getComponent("MuteToggle").prototype.handleClick.call(this,n)):l.call(this,n)&&(n.preventDefault(),n.stopPropagation(),r.getComponent("PlayToggle").prototype.handleClick.call(this,n))},u.canPlayType=function(n){for(var e,u,t,i=0,f=this.options_.techOrder;i<f.length;i++)if(u=f[i],t=w.getTech(u),t=t||r.getComponent(u)){if(t.isSupported()&&(e=t.canPlayType(n)))return e}else a.error('The "'+u+'" tech is undefined. Skipped browser support check for that tech.');return""},u.selectSource=function(n){function t(n,t,i){var r;return n.some(function(n){return t.some(function(t){if(r=i(n,t))return!0})}),r}function i(n,t){var i=n[0];if(n[1].canPlaySource(t,f.options_[i.toLowerCase()]))return{source:t,tech:i}}var r,f=this,u=this.options_.techOrder.map(function(n){return[n,w.getTech(n)]}).filter(function(n){var i=n[0],t=n[1];return t?t.isSupported():(a.error('The "'+i+'" tech is undefined. Skipped browser support check for that tech.'),!1)});return(this.options_.sourceOrder?t(n,u,(r=i,function(n,t){return r(t,n)})):t(u,n,i))||!1},u.src=function(n){var t=this,i;if("undefined"==typeof n)return this.cache_.src||"";i=function r(n){if(Array.isArray(n)){var t=[];n.forEach(function(n){n=r(n);Array.isArray(n)?t=t.concat(n):di(n)&&t.push(n)});n=t}else n="string"==typeof n&&n.trim()?[hn({src:n})]:di(n)&&"string"==typeof n.src&&n.src&&n.src.trim()?[hn(n)]:[];return n}(n);i.length?(this.changingSrc_=!0,this.cache_.sources=i,this.updateSourceCaches_(i[0]),kct(this,i[0],function(n,r){if(t.middleware_=r,t.cache_.sources=i,t.updateSourceCaches_(n),t.src_(n))return 1<i.length?t.src(i.slice(1)):(t.changingSrc_=!1,t.setTimeout(function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})},0),void t.triggerReady());!function(n,t){n.forEach(function(n){return n.setTech&&n.setTech(t)})}(r,t.tech_)})):this.setTimeout(function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})},0)},u.src_=function(n){var i=this,t=this.selectSource([n]);return!t||(function(n,t){return g(n)===g(t)}(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):(this.changingSrc_=!0,this.loadTech_(t.tech,t.source),this.tech_.ready(function(){i.changingSrc_=!1})),!1)},u.load=function(){this.techCall_("load")},u.reset=function(){var t=this,i=this.options_.Promise||n.Promise;this.paused()||!i?this.doReset_():rr(this.play().then(function(){return t.doReset_()}))},u.doReset_=function(){this.tech_&&this.tech_.clearTracks("text");this.resetCache_();this.poster("");this.loadTech_(this.options_.techOrder[0],null);this.techCall_("reset");this.resetControlBarUI_();tr(this)&&this.trigger("playerreset")},u.resetControlBarUI_=function(){this.resetProgressBar_();this.resetPlaybackRate_();this.resetVolumeBar_()},u.resetProgressBar_=function(){this.currentTime(0);var n=this.controlBar,t=n.durationDisplay,i=n.remainingTimeDisplay;t&&t.updateContent();i&&i.updateContent()},u.resetPlaybackRate_=function(){this.playbackRate(this.defaultPlaybackRate());this.handleTechRateChange_()},u.resetVolumeBar_=function(){this.volume(1);this.trigger("volumechange")},u.currentSources=function(){var n=this.currentSource(),t=[];return 0!==Object.keys(n).length&&t.push(n),this.cache_.sources||t},u.currentSource=function(){return this.cache_.source||{}},u.currentSrc=function(){return this.currentSource()&&this.currentSource().src||""},u.currentType=function(){return this.currentSource()&&this.currentSource().type||""},u.preload=function(n){return void 0!==n?(this.techCall_("setPreload",n),void(this.options_.preload=n)):this.techGet_("preload")},u.autoplay=function(n){if(void 0===n)return this.options_.autoplay||!1;var t;"string"==typeof n&&/(any|play|muted)/.test(n)?(this.options_.autoplay=n,this.manualAutoplay_(n),t=!1):this.options_.autoplay=!!n;t="undefined"==typeof t?this.options_.autoplay:t;this.tech_&&this.techCall_("setAutoplay",t)},u.playsinline=function(n){return void 0!==n?(this.techCall_("setPlaysinline",n),this.options_.playsinline=n,this):this.techGet_("playsinline")},u.loop=function(n){return void 0!==n?(this.techCall_("setLoop",n),void(this.options_.loop=n)):this.techGet_("loop")},u.poster=function(n){if(void 0===n)return this.poster_;(n=n||"")!==this.poster_&&(this.poster_=n,this.techCall_("setPoster",n),this.isPosterFromTech_=!1,this.trigger("posterchange"))},u.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"))}},u.controls=function(n){if(void 0===n)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_()))},u.usingNativeControls=function(n){if(void 0===n)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")))},u.error=function(n){if(void 0===n)return this.error_||null;if(this.options_.suppressNotSupportedError&&n&&n.message&&n.message===this.localize(this.options_.notSupportedMessage)){function t(){this.error(n)}return this.options_.suppressNotSupportedError=!1,this.any(["click","touchstart"],t),void this.one("loadstart",function(){this.off(["click","touchstart"],t)})}if(null===n)return this.error_=n,this.removeClass("vjs-error"),void(this.errorDisplay&&this.errorDisplay.close());this.error_=new ct(n);this.addClass("vjs-error");a.error("(CODE:"+this.error_.code+" "+ct.errorTypes[this.error_.code]+")",this.error_.message,this.error_);this.trigger("error")},u.reportUserActivity=function(){this.userActivity_=!0},u.userActive=function(n){if(void 0===n)return this.userActive_;if((n=!!n)!==this.userActive_){if(this.userActive_=n,this.userActive_)return this.userActivity_=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),void this.trigger("useractive");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")}},u.listenForUserActivity_=function(){var i,r,u,n=c(this,this.reportUserActivity),f,t;this.on("mousedown",function(){n();this.clearInterval(i);i=this.setInterval(n,250)});this.on("mousemove",function(t){t.screenX===r&&t.screenY===u||(r=t.screenX,u=t.screenY,n())});this.on("mouseup",function(){n();this.clearInterval(i)});t=this.getChild("controlBar");!t||si||ir||(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(f);var n=this.options_.inactivityTimeout;n<=0||(f=this.setTimeout(function(){this.userActivity_||this.userActive(!1)},n))}},250)},u.playbackRate=function(n){if(void 0===n)return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_("playbackRate"):1;this.techCall_("setPlaybackRate",n)},u.defaultPlaybackRate=function(n){return void 0!==n?this.techCall_("setDefaultPlaybackRate",n):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1},u.isAudio=function(n){if(void 0===n)return!!this.isAudio_;this.isAudio_=!!n},u.addTextTrack=function(n,t,i){if(this.tech_)return this.tech_.addTextTrack(n,t,i)},u.addRemoteTextTrack=function(n,t){if(this.tech_)return this.tech_.addRemoteTextTrack(n,t)},u.removeRemoteTextTrack=function(n){void 0===n&&(n={});var t=n.track;if(t=t||n,this.tech_)return this.tech_.removeRemoteTextTrack(t)},u.getVideoPlaybackQuality=function(){return this.techGet_("getVideoPlaybackQuality")},u.videoWidth=function(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0},u.videoHeight=function(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0},u.language=function(n){if(void 0===n)return this.language_;this.language_=String(n).toLowerCase()},u.languages=function(){return p(e.prototype.options_.languages,this.languages_)},u.toJSON=function(){var t=p(this.options_),r=t.tracks,n,i;for(t.tracks=[],n=0;n<r.length;n++)i=r[n],(i=p(i)).player=void 0,t.tracks[n]=i;return t},u.createModal=function(n,t){var r=this,i;return(t=t||{}).content=n||"",i=new au(this,t),this.addChild(i),i.on("dispose",function(){r.removeChild(i)}),i.open(),i},u.updateCurrentBreakpoint_=function(){var n;if(this.responsive())for(var t=this.currentBreakpoint(),r=this.currentWidth(),i=0;i<uy.length;i++)if(n=uy[i],r<=this.breakpoints_[n]){if(t===n)return;t&&this.removeClass(ih[t]);this.addClass(ih[n]);this.breakpoint_=n;break}},u.removeCurrentBreakpoint_=function(){var n=this.currentBreakpointClass();this.breakpoint_="";n&&this.removeClass(n)},u.breakpoints=function(n){return void 0===n||(this.breakpoint_="",this.breakpoints_=b({},gtt,n),this.updateCurrentBreakpoint_()),b(this.breakpoints_)},u.responsive=function(n){return void 0===n?this.responsive_:(n=Boolean(n))!==this.responsive_?((this.responsive_=n)?(this.on("playerresize",this.updateCurrentBreakpoint_),this.updateCurrentBreakpoint_()):(this.off("playerresize",this.updateCurrentBreakpoint_),this.removeCurrentBreakpoint_()),n):void 0},u.currentBreakpoint=function(){return this.breakpoint_},u.currentBreakpointClass=function(){return ih[this.breakpoint_]||""},u.loadMedia=function(n,t){var e=this;if(n&&"object"==typeof n){this.reset();this.cache_.media=p(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:us(i)}]);u&&this.src(u);i&&this.poster(i);Array.isArray(f)&&f.forEach(function(n){return e.addRemoteTextTrack(n,!1)});this.ready(t)}},u.getMedia=function(){if(this.cache_.media)return p(this.cache_.media);var t=this.poster(),n={src:this.currentSources(),textTracks:Array.prototype.map.call(this.remoteTextTracks(),function(n){return{kind:n.kind,label:n.label,language:n.language,src:n.src}})};return t&&(n.poster=t,n.artwork=[{src:n.poster,type:us(n.poster)}]),n},e.getTagSettings=function(n){var i={sources:[],tracks:[]},t=pi(n),e=t["data-setup"],r,f;if(sr(n,"vjs-fill")&&(t.fill=!0),sr(n,"vjs-fluid")&&(t.fluid=!0),null!==e){var o=ud(e||"{}"),s=o[0],c=o[1];s&&a.error(s);b(t,c)}if(b(i,t),n.hasChildNodes())for(var h=n.childNodes,u=0,l=h.length;u<l;u++)r=h[u],f=r.nodeName.toLowerCase(),"source"===f?i.sources.push(pi(r)):"track"===f&&i.tracks.push(pi(r));return i},u.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)},e}(r);et.names.forEach(function(n){var t=et[n];tt.prototype[t.getterName]=function(){return this.tech_?this.tech_[t.getterName]():(this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName])}});tt.players={};nf=n.navigator;tt.prototype.options_={techOrder:w.defaultTechOrder_,html5:{},flash:{},inactivityTimeout:2e3,playbackRates:[],liveui:!1,children:["mediaLoader","posterImage","textTrackDisplay","loadingSpinner","bigPlayButton","liveTracker","controlBar","errorDisplay","textTrackSettings","resizeManager"],language:nf&&(nf.languages&&nf.languages[0]||nf.userLanguage||nf.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){tt.prototype[n]=function(){return this.techGet_(n)}});dtt.forEach(function(n){tt.prototype["handleTech"+g(n)+"_"]=function(){return this.trigger(n)}});r.registerComponent("Player",tt);var eh="plugin",tf="activePlugins_",rf={},ai=function(){function n(t){if(this.constructor===n)throw new Error("Plugin must be sub-classed; not directly instantiated.");this.player=t;el(this);delete this.trigger;ak(this,this.constructor.defaultState);nit(t,this.name);this.dispose=c(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 void 0===n&&(n={}),n.name=this.name,n.plugin=this.constructor,n.instance=this,n},t.trigger=function(n,t){return void 0===t&&(t={}),lu(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[tf][n]=!1;this.player=this.state=null;t[n]=tit(n,rf[n])},n.isBasic=function(t){var i="string"==typeof t?uh(t):t;return"function"==typeof i&&!n.prototype.isPrototypeOf(i.prototype)},n.registerPlugin=function(t,i){if("string"!=typeof t)throw new Error('Illegal plugin name, "'+t+'", must be a string, was '+typeof t+".");if(rh(t))a.warn('A plugin named "'+t+'" already exists. You may want to avoid re-registering plugins!');else if(tt.prototype.hasOwnProperty(t))throw new Error('Illegal plugin name, "'+t+'", cannot share a name with an existing player method!');if("function"!=typeof i)throw new Error('Illegal plugin for "'+t+'", must be a function, was '+typeof i+".");return rf[t]=i,t!==eh&&(tt.prototype[t]=n.isBasic(i)?function(n,t){function i(){fh(this,{name:n,plugin:t,instance:null},!0);var i=t.apply(this,arguments);return nit(this,n),fh(this,{name:n,plugin:t,instance:i}),i}return Object.keys(t).forEach(function(n){i[n]=t[n]}),i}(t,i):tit(t,i)),i},n.deregisterPlugin=function(n){if(n===eh)throw new Error("Cannot de-register base plugin.");rh(n)&&(delete rf[n],delete tt.prototype[n])},n.getPlugins=function(n){var t;return void 0===n&&(n=Object.keys(rf)),n.forEach(function(n){var i=uh(n);i&&((t=t||{})[n]=i)}),t},n.getPluginVersion=function(n){var t=uh(n);return t&&t.VERSION||""},n}();ai.getPlugin=uh;ai.BASE_PLUGIN_NAME=eh;ai.registerPlugin(eh,ai);tt.prototype.usingPlugin=function(n){return!!this[tf]&&!0===this[tf][n]};tt.prototype.hasPlugin=function(n){return!!rh(n)};fy=function(n){return 0===n.indexOf("#")?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){return function r(){return i.removeHook(n,r),t.apply(void 0,arguments)}}))},i.removeHook=function(n,t){var r=i.hooks(n).indexOf(t);return!(r<=-1)&&(i.hooks_[n]=i.hooks_[n].slice(),i.hooks_[n].splice(r,1),!0)},!0!==n.VIDEOJS_NO_DYNAMIC_STYLE&&su())&&(pe=gi(".vjs-styles-defaults"),pe||(pe=fk("vjs-styles-defaults"),oh=gi("head"),oh&&oh.insertBefore(pe,oh.firstChild),ek(pe,"\n      .video-js {\n        width: 300px;\n        height: 150px;\n      }\n\n      .vjs-fluid {\n        padding-top: 56.25%\n      }\n    ")));rl(1,i);i.VERSION=rb;i.options=tt.prototype.options_;i.getPlayers=function(){return tt.players};i.getPlayer=function(n){var t,i=tt.players,r,u;if("string"==typeof n){if(r=fy(n),u=i[r],u)return u;t=gi("#"+r)}else t=n;if(bf(t)){var f=t,e=f.player,o=f.playerId;if(e||i[o])return e||i[o]}};i.getAllPlayers=function(){return Object.keys(tt.players).map(function(n){return tt.players[n]}).filter(Boolean)};i.players=tt.players;i.getComponent=r.getComponent;i.registerComponent=function(n,t){w.isTech(t)&&a.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=w.getTech;i.registerTech=w.registerTech;i.use=function(n,t){wr[n]=wr[n]||[];wr[n].push(t)};Object.defineProperty(i,"middleware",{value:{},writeable:!1,enumerable:!0});Object.defineProperty(i.middleware,"TERMINATOR",{value:rs,writeable:!1,enumerable:!0});i.browser=cst;i.TOUCH_ENABLED=ie;i.extend=function(n,t){var i,r,u;void 0===t&&(t={});i=function(){n.apply(this,arguments)};r={};for(u in"object"==typeof t?(t.constructor!==Object.prototype.constructor&&(i=t.constructor),r=t):"function"==typeof t&&(i=t),function(n,t){if("function"!=typeof t&&null!==t)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&&(n.super_=t)}(i,n),r)r.hasOwnProperty(u)&&(i.prototype[u]=r[u]);return i};i.mergeOptions=p;i.bind=c;i.registerPlugin=ai.registerPlugin;i.deregisterPlugin=ai.deregisterPlugin;i.plugin=function(n,t){return a.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),ai.registerPlugin(n,t)};i.getPlugins=ai.getPlugins;i.getPlugin=ai.getPlugin;i.getPluginVersion=ai.getPluginVersion;i.addLanguage=function(n,t){var r;return n=(""+n).toLowerCase(),i.options.languages=p(i.options.languages,((r={})[n]=t,r)),i.options.languages[n]};i.log=a;i.createLogger=fb;i.createTimeRange=i.createTimeRanges=lr;i.formatTime=ku;i.setFormatTime=function(n){fs=n};i.resetFormatTime=function(){fs=wn};i.parseUrl=ia;i.isCrossOrigin=po;i.EventTarget=ht;i.on=kt;i.one=ne;i.off=ut;i.trigger=lu;i.xhr=yg;i.TextTrack=yu;i.AudioTrack=kg;i.VideoTrack=dg;["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach(function(n){i[n]=function(){return a.warn("videojs."+n+"() is deprecated; use videojs.dom."+n+"() instead"),tk[n].apply(null,arguments)}});i.computedStyle=ho;i.dom=tk;i.url=bst;ey=dl(function(n){var i,r,u,f,t;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())){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)))),null===o.path&&(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 sy=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),-1<i},n.trigger=function(n,t){var i,u,f,r=this.listeners[n];if(r)if(2===arguments.length)for(u=r.length,i=0;i<u;++i)r[i].call(this,t);else for(f=Array.prototype.slice.call(arguments,1),u=r.length,i=0;i<u;++i)r[i].apply(this,f)},n.dispose=function(){this.listeners={}},n.pipe=function(n){this.on("data",function(t){n.push(t)})},t}(),ult=function(n){function t(){var t;return(t=n.call(this)||this).buffer="",t}return oy(t,n),t.prototype.push=function(n){var t;for(this.buffer+=n,t=this.buffer.indexOf("\n");-1<t;t=this.buffer.indexOf("\n"))this.trigger("data",this.buffer.substring(0,t)),this.buffer=this.buffer.substring(t+1)},t}(sy),flt=function(n){function t(){var t;return(t=n.call(this)||this).customParsers=[],t.tagMappers=[],t}oy(t,n);var i=t.prototype;return i.push=function(n){var i,t,r=this;0!==(n=n.trim()).length&&("#"===n[0]?this.tagMappers.reduce(function(t,i){var r=i(n);return r===n?t:t.concat([r])},[n]).forEach(function(n){for(var u,f,o,e=0;e<r.customParsers.length;e++)if(r.customParsers[e].call(r,n))return;if(0===n.indexOf("#EXT"))if(n=n.replace("\r",""),i=/^#EXTM3U/.exec(n))r.trigger("data",{type:"tag",tagType:"m3u"});else{if(i=/^#EXTINF:?([0-9\.]*)?,?(.*)?$/.exec(n))return t={type:"tag",tagType:"inf"},i[1]&&(t.duration=parseFloat(i[1])),i[2]&&(t.title=i[2]),void r.trigger("data",t);if(i=/^#EXT-X-TARGETDURATION:?([0-9.]*)?/.exec(n))return t={type:"tag",tagType:"targetduration"},i[1]&&(t.duration=parseInt(i[1],10)),void r.trigger("data",t);if(i=/^#ZEN-TOTAL-DURATION:?([0-9.]*)?/.exec(n))return t={type:"tag",tagType:"totalduration"},i[1]&&(t.duration=parseInt(i[1],10)),void r.trigger("data",t);if(i=/^#EXT-X-VERSION:?([0-9.]*)?/.exec(n))return t={type:"tag",tagType:"version"},i[1]&&(t.version=parseInt(i[1],10)),void r.trigger("data",t);if(i=/^#EXT-X-MEDIA-SEQUENCE:?(\-?[0-9.]*)?/.exec(n))return t={type:"tag",tagType:"media-sequence"},i[1]&&(t.number=parseInt(i[1],10)),void r.trigger("data",t);if(i=/^#EXT-X-DISCONTINUITY-SEQUENCE:?(\-?[0-9.]*)?/.exec(n))return t={type:"tag",tagType:"discontinuity-sequence"},i[1]&&(t.number=parseInt(i[1],10)),void r.trigger("data",t);if(i=/^#EXT-X-PLAYLIST-TYPE:?(.*)?$/.exec(n))return t={type:"tag",tagType:"playlist-type"},i[1]&&(t.playlistType=i[1]),void r.trigger("data",t);if(i=/^#EXT-X-BYTERANGE:?([0-9.]*)?@?([0-9.]*)?/.exec(n))return t={type:"tag",tagType:"byterange"},i[1]&&(t.length=parseInt(i[1],10)),i[2]&&(t.offset=parseInt(i[2],10)),void r.trigger("data",t);if(i=/^#EXT-X-ALLOW-CACHE:?(YES|NO)?/.exec(n))return t={type:"tag",tagType:"allow-cache"},i[1]&&(t.allowed=!/NO/.test(i[1])),void r.trigger("data",t);if(i=/^#EXT-X-MAP:?(.*)$/.exec(n)){if((t={type:"tag",tagType:"map"},i[1])&&(u=we(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)}else if(i=/^#EXT-X-STREAM-INF:?(.*)$/.exec(n))(t={type:"tag",tagType:"stream-inf"},i[1])&&((t.attributes=we(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);else{if(i=/^#EXT-X-MEDIA:?(.*)$/.exec(n))return t={type:"tag",tagType:"media"},i[1]&&(t.attributes=we(i[1])),void r.trigger("data",t);if(i=/^#EXT-X-ENDLIST/.exec(n))r.trigger("data",{type:"tag",tagType:"endlist"});else if(i=/^#EXT-X-DISCONTINUITY/.exec(n))r.trigger("data",{type:"tag",tagType:"discontinuity"});else{if(i=/^#EXT-X-PROGRAM-DATE-TIME:?(.*)$/.exec(n))return t={type:"tag",tagType:"program-date-time"},i[1]&&(t.dateTimeString=i[1],t.dateTimeObject=new Date(i[1])),void r.trigger("data",t);if(i=/^#EXT-X-KEY:?(.*)$/.exec(n))return t={type:"tag",tagType:"key"},i[1]&&(t.attributes=we(i[1]),t.attributes.IV&&("0x"===t.attributes.IV.substring(0,2).toLowerCase()&&(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))),void r.trigger("data",t);if(i=/^#EXT-X-START:?(.*)$/.exec(n))return t={type:"tag",tagType:"start"},i[1]&&(t.attributes=we(i[1]),t.attributes["TIME-OFFSET"]=parseFloat(t.attributes["TIME-OFFSET"]),t.attributes.PRECISE=/YES/.test(t.attributes.PRECISE)),void r.trigger("data",t);if(i=/^#EXT-X-CUE-OUT-CONT:?(.*)?$/.exec(n))return t={type:"tag",tagType:"cue-out-cont"},t.data=i[1]?i[1]:"",void r.trigger("data",t);if(i=/^#EXT-X-CUE-OUT:?(.*)?$/.exec(n))return t={type:"tag",tagType:"cue-out"},t.data=i[1]?i[1]:"",void r.trigger("data",t);if(i=/^#EXT-X-CUE-IN:?(.*)?$/.exec(n))return t={type:"tag",tagType:"cue-in"},t.data=i[1]?i[1]:"",void r.trigger("data",t);r.trigger("data",{type:"tag",data:n.slice(4)})}}}else r.trigger("data",{type:"comment",text:n.slice(1)})}):this.trigger("data",{type:"uri",uri:n}))},i.addParser=function(n){var i=this,r=n.expression,u=n.customType,t=n.dataParser,f=n.segment;"function"!=typeof t&&(t=function(n){return n});this.customParsers.push(function(n){if(r.exec(n))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;this.tagMappers.push(function(n){return t.test(n)?i(n):n})},t}(sy),eit=function(n){function i(){var i;(i=n.call(this)||this).lineStream=new ult;i.parseStream=new flt;i.lineStream.pipe(i.parseStream);var r,u,o=rit(rit(i)),f=[],t={},s={AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},e=0;return i.manifest={allowCache:!0,discontinuityStarts:[],segments:[]},i.parseStream.on("data",function(n){var h,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).length=n.length,"offset"in n||(this.trigger("info",{message:"defaulting offset to zero"}),n.offset=0));"offset"in n&&((t.byterange=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"}));0<n.duration&&(t.duration=n.duration);0===n.duration&&(t.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"}));this.manifest.segments=f},key:function(){n.attributes?"NONE"!==n.attributes.METHOD?n.attributes.URI?(n.attributes.METHOD||this.trigger("warn",{message:"defaulting key method to AES-128"}),u={method:n.attributes.METHOD||"AES-128",uri:n.attributes.URI},"undefined"!=typeof n.attributes.IV&&(u.iv=n.attributes.IV)):this.trigger("warn",{message:"ignoring key declaration without URI"}):u=null:this.trigger("warn",{message:"ignoring key declaration without attribute list"})},"media-sequence":function(){isFinite(n.number)?this.manifest.mediaSequence=n.number:this.trigger("warn",{message:"ignoring invalid media sequence: "+n.number})},"discontinuity-sequence":function(){isFinite(n.number)?(this.manifest.discontinuitySequence=n.number,e=n.number):this.trigger("warn",{message:"ignoring invalid discontinuity sequence: "+n.number})},"playlist-type":function(){/VOD|EVENT/.test(n.playlistType)?this.manifest.playlistType=n.playlistType:this.trigger("warn",{message:"ignoring unknown playlist type: "+n.playlist})},map:function(){r={};n.uri&&(r.uri=n.uri);n.byterange&&(r.byterange=n.byterange)},"stream-inf":function(){this.manifest.playlists=f;this.manifest.mediaGroups=this.manifest.mediaGroups||s;n.attributes?(t.attributes||(t.attributes={}),iit(t.attributes,n.attributes)):this.trigger("warn",{message:"ignoring empty stream-inf attributes"})},media:function(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||s,n.attributes&&n.attributes.TYPE&&n.attributes["GROUP-ID"]&&n.attributes.NAME){var t=this.manifest.mediaGroups[n.attributes.TYPE];t[n.attributes["GROUP-ID"]]=t[n.attributes["GROUP-ID"]]||{};h=t[n.attributes["GROUP-ID"]];i.autoselect=(i={"default":/yes/i.test(n.attributes.DEFAULT)}).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));h[n.attributes.NAME]=i}else this.trigger("warn",{message:"ignoring incomplete or missing media group"})},discontinuity:function(){e+=1;t.discontinuity=!0;this.manifest.discontinuityStarts.push(f.length)},"program-date-time":function(){"undefined"==typeof this.manifest.dateTimeString&&(this.manifest.dateTimeString=n.dateTimeString,this.manifest.dateTimeObject=n.dateTimeObject);t.dateTimeString=n.dateTimeString;t.dateTimeObject=n.dateTimeObject},targetduration:function(){!isFinite(n.duration)||n.duration<0?this.trigger("warn",{message:"ignoring invalid target duration: "+n.duration}):this.manifest.targetDuration=n.duration},totalduration:function(){!isFinite(n.duration)||n.duration<0?this.trigger("warn",{message:"ignoring invalid total duration: "+n.duration}):this.manifest.totalDuration=n.duration},start:function(){n.attributes&&!isNaN(n.attributes["TIME-OFFSET"])?this.manifest.start={timeOffset:n.attributes["TIME-OFFSET"],precise:n.attributes.PRECISE}:this.trigger("warn",{message:"ignoring start declaration without appropriate attribute list"})},"cue-out":function(){t.cueOut=n.data},"cue-out-cont":function(){t.cueOutCont=n.data},"cue-in":function(){t.cueIn=n.data}}[n.tagType]||function(){}).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)}),i}oy(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}(sy),elt="INVALID_NUMBER_OF_PERIOD",olt="DASH_EMPTY_MANIFEST",slt="DASH_INVALID_XML",hlt="NO_BASE_URL",clt="SEGMENT_TIME_UNSPECIFIED",llt="UNSUPPORTED_UTC_TIMING_SCHEME";var ay,ait=(function(n){var i,r,u,f,t;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())){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)))),null===o.path&&(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}(ay={exports:{}},ay.exports),ay.exports),klt={static:function(n){var i=n.duration,t=n.timescale,r=void 0===t?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=void 0===f?1:f,i=n.duration,e=n.start,a=void 0===e?0:e,o=n.minimumUpdatePeriod,v=void 0===o?0:o,s=n.timeShiftBufferDepth,y=void 0===s?1/0:s,r=(h+c)/1e3,u=l+a,p=r+v-u,w=Math.ceil(p*t/i),b=Math.floor((r-u-y)*t/i),k=Math.floor((r-u)*t/i);return{start:Math.max(0,b),end:Math.min(w,k)}}},dlt=/\$([A-z]*)(?:(%0)([0-9]+)d)?\$/g,vit={mediaPresentationDuration:function(n){return ke(n)},availabilityStartTime:function(n){return function(n){return/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(n)&&(n+="Z"),Date.parse(n)}(n)/1e3},minimumUpdatePeriod:function(n){return ke(n)},timeShiftBufferDepth:function(n){return ke(n)},start:function(n){return ke(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)?ke(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}};dit={"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"};gr=function(n){return n>>>0};wit=function(n){return ci(n,["moov","trak"]).reduce(function(n,t){var r,f,i,e,u;return(r=ci(t,["tkhd"])[0])?(f=r[0],e=gr(r[i=0===f?12:20]<<24|r[i+1]<<16|r[i+2]<<8|r[i+3]),(u=ci(t,["mdia","mdhd"])[0])?(i=0===(f=u[0])?12:20,n[e]=gr(u[i]<<24|u[i+1]<<16|u[i+2]<<8|u[i+3]),n):null):null},{})};bit=function(n,t){var r,u,i;return r=ci(t,["moof","traf"]),u=[].concat.apply([],r.map(function(t){return ci(t,["tfhd"]).map(function(i){var r,u;return r=gr(i[4]<<24|i[5]<<16|i[6]<<8|i[7]),u=n[r]||9e4,(ci(t,["tfdt"]).map(function(n){var i,t;return i=n[0],t=gr(n[4]<<24|n[5]<<16|n[6]<<8|n[7]),1===i&&(t*=Math.pow(2,32),t+=gr(n[8]<<24|n[9]<<16|n[10]<<8|n[11])),t})[0]||1/0)/u})})),i=Math.min.apply(null,u),isFinite(i)?i:0};kit=function(n){var i=ci(n,["moov","trak"]),t=[];return i.forEach(function(n){var i=ci(n,["mdia","hdlr"]),r=ci(n,["tkhd"]);i.forEach(function(n,i){var u,e,o=yy(n.subarray(8,12)),f=r[i];"vide"===o&&(e=0===(u=new DataView(f.buffer,f.byteOffset,f.byteLength)).getUint8(0)?u.getUint32(12):u.getUint32(20),t.push(e))})}),t};var wt,nrt,l,trt,irt,rrt,urt,frt,ert,py,ort,srt,hrt,crt,lrt,art,vrt,yrt,prt,wrt,brt,krt,wy,h,by,drt,grt,nut,tut,iut,rut,uut,fut,ch,eut,out,sut,hut,cut,lut,aut,ky,li={findBox:ci=function(n,t){var i,f,e,r,o,u=[];if(!t.length)return null;for(i=0;i<n.byteLength;)f=gr(n[i]<<24|n[i+1]<<16|n[i+2]<<8|n[i+3]),e=yy(n.subarray(i+4,i+8)),r=1<f?i+f:n.byteLength,e===t[0]&&(1===t.length?u.push(n.subarray(i+8,r)):(o=ci(n.subarray(i+8,r),t.slice(1))).length&&(u=u.concat(o))),i=r;return u},parseType:yy=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])},timescale:wit,startTime:bit,videoTrackIds:kit},lh=li.parseType,nu={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:wt(n.subarray(78,n.byteLength))}},avcC:function(n){for(var f,i,e=new DataView(n.buffer,n.byteOffset,n.byteLength),u={configurationVersion:n[0],avcProfileIndication:n[1],profileCompatibility:n[2],avcLevelIndication:n[3],lengthSizeMinusOne:3&n[4],sps:[],pps:[]},o=31&n[5],t=6,r=0;r<o;r++)i=e.getUint16(t),t+=2,u.sps.push(new Uint8Array(n.subarray(t,t+i))),t+=i;for(f=n[t],t++,r=0;r<f;r++)i=e.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:31&n[8],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:(7&n[26])<<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:lh(n.subarray(0,4)),minorVersion:r.getUint32(4),compatibleBrands:[]},t=8;t<n.byteLength;)i.compatibleBrands.push(lh(n.subarray(t,t+4))),t+=4;return i},dinf:function(n){return{boxes:wt(n)}},dref:function(n){return{version:n[0],flags:new Uint8Array(n.subarray(1,4)),dataReferences:wt(n.subarray(8))}},hdlr:function(n){for(var i={version:new DataView(n.buffer,n.byteOffset,n.byteLength).getUint8(0),flags:new Uint8Array(n.subarray(1,4)),handlerType:lh(n.subarray(8,12)),name:""},t=8,t=24;t<n.byteLength;t++){if(0===n[t]){t++;break}i.name+=String.fromCharCode(n[t])}return i.name=decodeURIComponent(escape(i.name)),i},mdat:function(n){return{byteLength:n.byteLength,nals:function(n){for(var r,u=new DataView(n.buffer,n.byteOffset,n.byteLength),t=[],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>");else switch(31&n[i]){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}(n)}},mdhd:function(n){var u,r=new DataView(n.buffer,n.byteOffset,n.byteLength),t=4,i={version:r.getUint8(0),flags:new Uint8Array(n.subarray(1,4)),language:""};return 1===i.version?(t+=4,i.creationTime=ri(r.getUint32(t)),t+=8,i.modificationTime=ri(r.getUint32(t)),t+=4,i.timescale=r.getUint32(t),t+=8):(i.creationTime=ri(r.getUint32(t)),t+=4,i.modificationTime=ri(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(96+(u>>10)),i.language+=String.fromCharCode(96+((992&u)>>5)),i.language+=String.fromCharCode(96+(31&u)),i},mdia:function(n){return{boxes:wt(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:wt(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 28<n.byteLength&&(i.streamDescriptor=wt(n.subarray(28))[0]),i},moof:function(n){return{boxes:wt(n)}},moov:function(n){return{boxes:wt(n)}},mvex:function(n){return{boxes:wt(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 1===r.version?(t+=4,r.creationTime=ri(i.getUint32(t)),t+=8,r.modificationTime=ri(i.getUint32(t)),t+=4,r.timescale=i.getUint32(t),t+=8):(r.creationTime=ri(i.getUint32(t)),t+=4,r.modificationTime=ri(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:(48&n[t])>>4,isDependedOn:(12&n[t])>>2,hasRedundancy:3&n[t]});return i},sidx:function(n){for(var i=new DataView(n.buffer,n.byteOffset,n.byteLength),r={version:n[0],flags:new Uint8Array(n.subarray(1,4)),references:[],referenceId:i.getUint32(4),timescale:i.getUint32(8),earliestPresentationTime:i.getUint32(12),firstOffset:i.getUint32(16)},u=i.getUint16(22),t=24;u;t+=12,u--)r.references.push({referenceType:(128&n[t])>>>7,referencedSize:2147483647&i.getUint32(t),subsegmentDuration:i.getUint32(t+4),startsWithSap:!!(128&n[t+8]),sapType:(112&n[t+8])>>>4,sapDeltaTime:268435455&i.getUint32(t+8)});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:wt(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:wt(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 nu.ftyp(n)},tfdt:function(n){var t={version:n[0],flags:new Uint8Array(n.subarray(1,4)),baseMediaDecodeTime:n[4]<<24|n[5]<<16|n[6]<<8|n[7]};return 1===t.version&&(t.baseMediaDecodeTime*=Math.pow(2,32),t.baseMediaDecodeTime+=n[8]<<24|n[9]<<16|n[10]<<8|n[11]),t},tfhd:function(n){var i,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=1&t.flags[2],f=2&t.flags[2],e=8&t.flags[2],o=16&t.flags[2],s=32&t.flags[2],h=65536&t.flags[0],c=131072&t.flags[0];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 1===r.version?(t+=4,r.creationTime=ri(i.getUint32(t)),t+=8,r.modificationTime=ri(i.getUint32(t)),t+=4,r.trackId=i.getUint32(t),t+=4,t+=8):(r.creationTime=ri(i.getUint32(t)),t+=4,r.modificationTime=ri(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:wt(n)}},trak:function(n){return{boxes:wt(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:3&n[20],sampleIsDependedOn:(192&n[21])>>6,sampleHasRedundancy:(48&n[21])>>4,samplePaddingValue:(14&n[21])>>1,sampleIsDifferenceSample:!!(1&n[21]),sampleDegradationPriority:t.getUint16(22)}},trun:function(n){var i,r={version:n[0],flags:new Uint8Array(n.subarray(1,4)),samples:[]},u=new DataView(n.buffer,n.byteOffset,n.byteLength),h=1&r.flags[2],c=4&r.flags[2],e=1&r.flags[1],o=2&r.flags[1],l=4&r.flags[1],s=8&r.flags[1],f=u.getUint32(4),t=8;for(h&&(r.dataOffset=u.getInt32(t),t+=4),c&&f&&(i={flags:git(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=git(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)])}}},ah={inspect:wt=function(n){for(var o,i,u,f,e,t=0,s=[],h=new ArrayBuffer(n.length),c=new Uint8Array(h),r=0;r<n.length;++r)c[r]=n[r];for(o=new DataView(h);t<n.byteLength;)i=o.getUint32(t),u=lh(n.subarray(t+4,t+8)),f=1<i?t+i:n.byteLength,(e=(nu[u]||function(n){return{data:n}})(n.subarray(t+8,f))).size=i,e.type=u,s.push(e),t=f;return s},textify:nrt=function(n,t){var i;return t=t||0,i=new Array(2*t+1).join(" "),n.map(function(n){return i+n.type+"\n"+Object.keys(n).filter(function(n){return"type"!==n&&"boxes"!==n}).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?1===u.length?f+"<"+u.join("").slice(1)+">":f+"<\n"+u.map(function(n){return i+"  "+n}).join("\n")+"\n"+i+"  >":f+"<>"):f+JSON.stringify(r,null,2).split("\n").map(function(n,t){return 0===t?n:i+"  "+n}).join("\n")}).join("\n")+(n.boxes?"\n"+nrt(n.boxes,t+1):"")}).join("\n")},parseTfdt:nu.tfdt,parseHdlr:nu.hdlr,parseTfhd:nu.tfhd,parseTrun:nu.trun,parseSidx:nu.sidx},vut=Math.pow(2,32)-1;!function(){var n;if(h={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],sdtp:[],smhd:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],styp:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[]},"undefined"!=typeof Uint8Array){for(n in h)h.hasOwnProperty(n)&&(h[n]=[n.charCodeAt(0),n.charCodeAt(1),n.charCodeAt(2),n.charCodeAt(3)]);by=new Uint8Array(["i".charCodeAt(0),"s".charCodeAt(0),"o".charCodeAt(0),"m".charCodeAt(0)]);grt=new Uint8Array(["a".charCodeAt(0),"v".charCodeAt(0),"c".charCodeAt(0),"1".charCodeAt(0)]);drt=new Uint8Array([0,0,0,1]);nut=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]);tut=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]);iut={video:nut,audio:tut};fut=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]);uut=new Uint8Array([0,0,0,0,0,0,0,0]);ch=new Uint8Array([0,0,0,0,0,0,0,0]);eut=ch;out=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]);sut=ch;rut=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}}();l=function(n){for(var i,r=[],u=0,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),new DataView(i.buffer,i.byteOffset,i.byteLength).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};trt=function(){return l(h.dinf,l(h.dref,fut))};irt=function(n){return l(h.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]))};vrt=function(n){return l(h.hdlr,iut[n])};art=function(n){var t=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,255&n.duration,85,196,0,0]);return n.samplerate&&(t[12]=n.samplerate>>>24&255,t[13]=n.samplerate>>>16&255,t[14]=n.samplerate>>>8&255,t[15]=255&n.samplerate),l(h.mdhd,t)};lrt=function(n){return l(h.mdia,art(n),vrt(n.type),frt(n))};urt=function(n){return l(h.mfhd,new Uint8Array([0,0,0,0,(4278190080&n)>>24,(16711680&n)>>16,(65280&n)>>8,255&n]))};frt=function(n){return l(h.minf,"video"===n.type?l(h.vmhd,rut):l(h.smhd,uut),trt(),prt(n))};ert=function(n,t){for(var r=[],i=t.length;i--;)r[i]=brt(t[i]);return l.apply(null,[h.moof,urt(n)].concat(r))};py=function(n){for(var t=n.length,i=[];t--;)i[t]=hrt(n[t]);return l.apply(null,[h.moov,srt(4294967295)].concat(i).concat(ort(n)))};ort=function(n){for(var t=n.length,i=[];t--;)i[t]=krt(n[t]);return l.apply(null,[h.mvex].concat(i))};srt=function(n){var t=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(4278190080&n)>>24,(16711680&n)>>16,(65280&n)>>8,255&n,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 l(h.mvhd,t)};yrt=function(n){for(var i,r=n.samples||[],u=new Uint8Array(4+r.length),t=0;t<r.length;t++)i=r[t].flags,u[t+4]=i.dependsOn<<4|i.isDependedOn<<2|i.hasRedundancy;return l(h.sdtp,u)};prt=function(n){return l(h.stbl,wrt(n),l(h.stts,sut),l(h.stsc,eut),l(h.stsz,out),l(h.stco,ch))};wrt=function(n){return l(h.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),"video"===n.type?hut(n):cut(n))};hut=function(n){for(var i=n.sps||[],r=n.pps||[],u=[],f=[],t=0;t<i.length;t++)u.push((65280&i[t].byteLength)>>>8),u.push(255&i[t].byteLength),u=u.concat(Array.prototype.slice.call(i[t]));for(t=0;t<r.length;t++)f.push((65280&r[t].byteLength)>>>8),f.push(255&r[t].byteLength),f=f.concat(Array.prototype.slice.call(r[t]));return l(h.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,(65280&n.width)>>8,255&n.width,(65280&n.height)>>8,255&n.height,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]),l(h.avcC,new Uint8Array([1,n.profileIdc,n.profileCompatibility,n.levelIdc,255].concat([i.length]).concat(u).concat([r.length]).concat(f))),l(h.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])))};cut=function(n){return l(h.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(65280&n.channelcount)>>8,255&n.channelcount,(65280&n.samplesize)>>8,255&n.samplesize,0,0,0,0,(65280&n.samplerate)>>8,255&n.samplerate,0,0]),irt(n))};crt=function(n){var t=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(4278190080&n.id)>>24,(16711680&n.id)>>16,(65280&n.id)>>8,255&n.id,0,0,0,0,(4278190080&n.duration)>>24,(16711680&n.duration)>>16,(65280&n.duration)>>8,255&n.duration,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,(65280&n.width)>>8,255&n.width,0,0,(65280&n.height)>>8,255&n.height,0,0]);return l(h.tkhd,t)};brt=function(n){var u,f,r,e,t,i;return u=l(h.tfhd,new Uint8Array([0,0,0,58,(4278190080&n.id)>>24,(16711680&n.id)>>16,(65280&n.id)>>8,255&n.id,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),t=Math.floor(n.baseMediaDecodeTime/(1+vut)),i=Math.floor(n.baseMediaDecodeTime%(1+vut)),f=l(h.tfdt,new Uint8Array([1,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t,i>>>24&255,i>>>16&255,i>>>8&255,255&i])),"audio"===n.type?(r=wy(n,92),l(h.traf,u,f,r)):(e=yrt(n),r=wy(n,e.length+92),l(h.traf,u,f,r,e))};hrt=function(n){return n.duration=n.duration||4294967295,l(h.trak,crt(n),lrt(n))};krt=function(n){var t=new Uint8Array([0,0,0,0,(4278190080&n.id)>>24,(16711680&n.id)>>16,(65280&n.id)>>8,255&n.id,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return"video"!==n.type&&(t[t.length-1]=0),l(h.trex,t)};ky=function(n,t){var i=0,r=0,u=0,f=0;return n.length&&(void 0!==n[0].duration&&(i=1),void 0!==n[0].size&&(r=2),void 0!==n[0].flags&&(u=4),void 0!==n[0].compositionTimeOffset&&(f=8)),[0,0,i|r|u|f,1,(4278190080&n.length)>>>24,(16711680&n.length)>>>16,(65280&n.length)>>>8,255&n.length,(4278190080&t)>>>24,(16711680&t)>>>16,(65280&t)>>>8,255&t]};aut=function(n,t){var r,u,i,f;for(t+=20+16*(u=n.samples||[]).length,r=ky(u,t),f=0;f<u.length;f++)i=u[f],r=r.concat([(4278190080&i.duration)>>>24,(16711680&i.duration)>>>16,(65280&i.duration)>>>8,255&i.duration,(4278190080&i.size)>>>24,(16711680&i.size)>>>16,(65280&i.size)>>>8,255&i.size,i.flags.isLeading<<2|i.flags.dependsOn,i.flags.isDependedOn<<6|i.flags.hasRedundancy<<4|i.flags.paddingValue<<1|i.flags.isNonSyncSample,61440&i.flags.degradationPriority,15&i.flags.degradationPriority,(4278190080&i.compositionTimeOffset)>>>24,(16711680&i.compositionTimeOffset)>>>16,(65280&i.compositionTimeOffset)>>>8,255&i.compositionTimeOffset]);return l(h.trun,new Uint8Array(r))};lut=function(n,t){var r,u,i,f;for(t+=20+8*(u=n.samples||[]).length,r=ky(u,t),f=0;f<u.length;f++)i=u[f],r=r.concat([(4278190080&i.duration)>>>24,(16711680&i.duration)>>>16,(65280&i.duration)>>>8,255&i.duration,(4278190080&i.size)>>>24,(16711680&i.size)>>>16,(65280&i.size)>>>8,255&i.size]);return l(h.trun,new Uint8Array(r))};wy=function(n,t){return"audio"===n.type?lut(n,t):aut(n,t)};tu={ftyp:rrt=function(){return l(h.ftyp,by,drt,by,grt)},mdat:function(n){return l(h.mdat,n)},moof:ert,moov:py,initSegment:function(n){var t,i=rrt(),r=py(n);return(t=new Uint8Array(i.byteLength+r.byteLength)).set(i),t.set(r,i.byteLength),t}};vh.prototype.pipe=function(n){return this.on("data",function(t){n.push(t)}),this.on("done",function(t){n.flush(t)}),n};vh.prototype.push=function(n){this.trigger("data",n)};vh.prototype.flush=function(n){this.trigger("done",n)};var dy,yut,put,wut,but,vt=vh,rat=function(n){for(var i,t=[],r=[],u=t.byteLength=0;u<n.length;u++)"access_unit_delimiter_rbsp"===(i=n[u]).nalUnitType?(t.length&&(t.duration=i.dts-t.dts,r.push(t)),(t=[i]).byteLength=i.data.byteLength,t.pts=i.pts,t.dts=i.dts):("slice_layer_without_partitioning_rbsp_idr"===i.nalUnitType&&(t.keyFrame=!0),t.duration=i.dts-t.dts,t.byteLength+=i.data.byteLength,t.push(i));return r.length&&(!t.duration||t.duration<=0)&&(t.duration=r[r.length-1].duration),r.push(t),r},uat=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]).keyFrame?(t.length&&(i.push(t),i.byteLength+=t.byteLength,i.nalCount+=t.nalCount,i.duration+=t.duration),(t=[r]).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},fat=function(n){var t;return!n[0][0].keyFrame&&1<n.length&&(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},eat=function(n,t){for(var f,o,e,s,r,i,h=t||0,c=[],u=0;u<n.length;u++)for(e=n[u],f=0;f<e.length;f++)s=e[f],r=s,i=void 0,(i={size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}}).dataOffset=h,i.compositionTimeOffset=r.pts-r.dts,i.duration=r.duration,i.size=4*r.length,i.size+=r.byteLength,r.keyFrame&&(i.flags.dependsOn=2,i.flags.isNonSyncSample=0),h+=(o=i).size,c.push(o);return c},oat=function(n){for(var i,r,e,o,u,f=0,h=n.byteLength,c=n.nalCount,s=new Uint8Array(h+4*c),l=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],l.setUint32(f,u.data.byteLength),f+=4,s.set(u.data,f),f+=u.data.byteLength;return s},fr=[33,16,5,32,164,27],gy=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],sat={96e3:[fr,[227,64],v(154),[56]],88200:[fr,[231],v(170),[56]],64e3:[fr,[248,192],v(240),[56]],48e3:[fr,[255,192],v(268),[55,148,128],v(54),[112]],44100:[fr,[255,192],v(268),[55,163,128],v(84),[112]],32e3:[fr,[255,192],v(268),[55,234],v(226),[112]],24e3:[fr,[255,192],v(268),[55,255,128],v(268),[111,112],v(126),[224]],16e3:[fr,[255,192],v(268),[55,255,128],v(268),[111,255],v(269),[223,108],v(195),[1,192]],12e3:[gy,v(268),[3,127,248],v(268),[6,255,240],v(268),[13,255,224],v(268),[27,253,128],v(259),[56]],11025:[gy,v(268),[3,127,248],v(268),[6,255,240],v(268),[13,255,224],v(268),[27,255,192],v(268),[55,175,128],v(108),[112]],8e3:[gy,v(268),[3,121,16],v(47),[7]]},hat=(dy=sat,Object.keys(dy).reduce(function(n,t){return n[t]=new Uint8Array(dy[t].reduce(function(n,t){return n.concat(t)},[])),n},{})),cat=(yut=function(n){return 9e4*n},put=function(n,t){return n*t},wut=function(n){return n/9e4},but=function(n,t){return n/t},function(n,t){return yut(but(n,t))}),lat=function(n,t){return put(wut(n),t)},aat=function(n,t,i,r){var h,f,e,u,c=0,o=0,s=0;if(t.length&&(h=cat(n.baseMediaDecodeTime,n.samplerate),f=Math.ceil(9216e4/n.samplerate),i&&r&&(c=h-Math.max(i,r),s=(o=Math.floor(c/f))*f),!(o<1||45e3<s))){for(e=(e=hat[n.samplerate])||t[0].data,u=0;u<o;u++)t.splice(u,0,{data:e});n.baseMediaDecodeTime-=Math.floor(lat(s,n.samplerate))}},vat=function(n,t,i){return t.minSegmentDts>=i?n:(t.minSegmentDts=1/0,n.filter(function(n){return n.dts>=i&&(t.minSegmentDts=Math.min(t.minSegmentDts,n.dts),t.minSegmentPts=t.minSegmentDts,!0)}))},yat=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},pat=function(n){for(var i,r=0,u=new Uint8Array(function(n){for(var i=0,t=0;t<n.length;t++)i+=n[t].data.byteLength;return i}(n)),t=0;t<n.length;t++)i=n[t],u.set(i.data,r),r+=i.data.byteLength;return u},de=function(n){delete n.minSegmentDts;delete n.maxSegmentDts;delete n.minSegmentPts;delete n.maxSegmentPts},kut=function(n,t){var i,r=n.minSegmentDts;return t||(r-=n.timelineStartInfo.dts),i=n.timelineStartInfo.baseMediaDecodeTime,i+=r,i=Math.max(0,i),"audio"===n.type&&(i*=n.samplerate/9e4,i=Math.floor(i)),i},np=function(n,t){"number"==typeof t.pts&&(void 0===n.timelineStartInfo.pts&&(n.timelineStartInfo.pts=t.pts),n.minSegmentPts=void 0===n.minSegmentPts?t.pts:Math.min(n.minSegmentPts,t.pts),n.maxSegmentPts=void 0===n.maxSegmentPts?t.pts:Math.max(n.maxSegmentPts,t.pts));"number"==typeof t.dts&&(void 0===n.timelineStartInfo.dts&&(n.timelineStartInfo.dts=t.dts),n.minSegmentDts=void 0===n.minSegmentDts?t.dts:Math.min(n.minSegmentDts,t.dts),n.maxSegmentDts=void 0===n.maxSegmentDts?t.dts:Math.max(n.maxSegmentDts,t.dts))},wat=function(n){for(var t=0,r={payloadType:-1,payloadSize:0},u=0,i=0;t<n.byteLength&&128!==n[t];){for(;255===n[t];)u+=255,t++;for(u+=n[t++];255===n[t];)i+=255,t++;if(i+=n[t++],!r.payload&&4===u){r.payloadType=u;r.payloadSize=i;r.payload=n.subarray(t,t+i);break}t+=i;i=u=0}return r},bat=function(n){return 181!==n.payload[0]?null:49!=(n.payload[1]<<8|n.payload[2])?null:"GA94"!==String.fromCharCode(n.payload[3],n.payload[4],n.payload[5],n.payload[6])?null:3!==n.payload[7]?null:n.payload.subarray(8,n.payload.length-1)},kat=function(n,t){var i,e,r,u,f=[];if(!(64&t[0]))return f;for(e=31&t[0],i=0;i<e;i++)u={type:3&t[2+(r=3*i)],pts:n},4&t[2+r]&&(u.ccData=t[3+r]<<8|t[4+r],f.push(u));return f},dat=function(n){for(var r,u,f,e=n.byteLength,i=[],t=1;t<e-2;)0===n[t]&&0===n[t+1]&&3===n[t+2]?(i.push(t+2),t+=2):t++;if(0===i.length)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},gat=4;(bi.prototype=new vt).push=function(n){var t,i,r;if("sei_rbsp"===n.nalUnitType&&(t=wat(n.escapedRBSP)).payloadType===gat&&(i=bat(t)))if(n.dts<this.latestDts_)this.ignoreNextEqualDts_=!0;else{if(n.dts===this.latestDts_&&this.ignoreNextEqualDts_)return this.numSameDts_--,void(this.numSameDts_||(this.ignoreNextEqualDts_=!1));r=kat(n.pts,i);this.captionPackets_=this.captionPackets_.concat(r);this.latestDts_!==n.dts&&(this.numSameDts_=0);this.numSameDts_++;this.latestDts_=n.dts}};bi.prototype.flush=function(){this.captionPackets_.length?(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.ccStreams_.forEach(function(n){n.flush()},this)):this.ccStreams_.forEach(function(n){n.flush()},this)};bi.prototype.reset=function(){this.latestDts_=null;this.ignoreNextEqualDts_=!1;this.numSameDts_=0;this.activeCea608Channel_=[null,null];this.ccStreams_.forEach(function(n){n.reset()})};bi.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);null!==this.activeCea608Channel_[n.type]&&this.ccStreams_[(n.type<<1)+this.activeCea608Channel_[n.type]].push(n)};bi.prototype.setsChannel1Active=function(n){return 4096==(30720&n.ccData)};bi.prototype.setsChannel2Active=function(n){return 6144==(30720&n.ccData)};bi.prototype.setsTextOrXDSActive=function(n){return 256==(28928&n.ccData)||4138==(30974&n.ccData)||6186==(30974&n.ccData)};var nvt={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},tvt=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],k=function ub(n,t){ub.prototype.init.call(this);this.field_=n||0;this.dataChannel_=t||0;this.name_="CC"+(1+(this.field_<<1|this.dataChannel_));this.setConstants();this.reset();this.push=function(n){var t,e,r,i,u,f;(t=32639&n.ccData)!==this.lastControlCode_?(4096==(61440&t)?this.lastControlCode_=t:t!==this.PADDING_&&(this.lastControlCode_=null),r=t>>>8,i=255&t,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_?"popOn"===this.mode_?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_=iu()):t===this.ERASE_NON_DISPLAYED_MEMORY_?this.nonDisplayed_=iu():t===this.RESUME_DIRECT_CAPTIONING_?("paintOn"!==this.mode_&&(this.flushDisplayed(n.pts),this.displayed_=iu()),this.mode_="paintOn",this.startPts_=n.pts):this.isSpecialCharacter(r,i)?(u=yh((r=(3&r)<<8)|i),this[this.mode_](n.pts,u),this.column_++):this.isExtCharacter(r,i)?("popOn"===this.mode_?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1),u=yh((r=(3&r)<<8)|i),this[this.mode_](n.pts,u),this.column_++):this.isMidRowCode(r,i)?(this.clearFormatting(n.pts),this[this.mode_](n.pts," "),this.column_++,14==(14&i)&&this.addFormatting(n.pts,["i"]),1==(1&i)&&this.addFormatting(n.pts,["u"])):this.isOffsetControlCode(r,i)?this.column_+=3&i:this.isPAC(r,i)?(f=tvt.indexOf(7968&t),"rollUp"===this.mode_&&(f-this.rollUpRows_+1<0&&(f=this.rollUpRows_-1),this.setRollUp(n.pts,f)),f!==this.row_&&(this.clearFormatting(n.pts),this.row_=f),1&i&&-1===this.formatting_.indexOf("u")&&this.addFormatting(n.pts,["u"]),16==(16&t)&&(this.column_=4*((14&t)>>1)),this.isColorPAC(i)&&14==(14&i)&&this.addFormatting(n.pts,["i"])):this.isNormalChar(r)&&(0===i&&(i=null),u=yh(r),u+=yh(i),this[this.mode_](n.pts,u),this.column_+=u.length)):this.lastControlCode_=null}};k.prototype=new vt;k.prototype.flushDisplayed=function(n){var t=this.displayed_.map(function(n){try{return n.trim()}catch(n){return""}}).join("\n").replace(/^\n+|\n+$/g,"");t.length&&this.trigger("data",{startPts:this.startPts_,endPts:n,text:t,stream:this.name_})};k.prototype.reset=function(){this.mode_="popOn";this.topRow_=0;this.startPts_=0;this.displayed_=iu();this.nonDisplayed_=iu();this.lastControlCode_=null;this.column_=0;this.row_=14;this.rollUpRows_=2;this.formatting_=[]};k.prototype.setConstants=function(){0===this.dataChannel_?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):1===this.dataChannel_&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31);this.PADDING_=0;this.RESUME_CAPTION_LOADING_=32|this.CONTROL_;this.END_OF_CAPTION_=47|this.CONTROL_;this.ROLL_UP_2_ROWS_=37|this.CONTROL_;this.ROLL_UP_3_ROWS_=38|this.CONTROL_;this.ROLL_UP_4_ROWS_=39|this.CONTROL_;this.CARRIAGE_RETURN_=45|this.CONTROL_;this.RESUME_DIRECT_CAPTIONING_=41|this.CONTROL_;this.BACKSPACE_=33|this.CONTROL_;this.ERASE_DISPLAYED_MEMORY_=44|this.CONTROL_;this.ERASE_NON_DISPLAYED_MEMORY_=46|this.CONTROL_};k.prototype.isSpecialCharacter=function(n,t){return n===this.EXT_&&48<=t&&t<=63};k.prototype.isExtCharacter=function(n,t){return(n===this.EXT_+1||n===this.EXT_+2)&&32<=t&&t<=63};k.prototype.isMidRowCode=function(n,t){return n===this.EXT_&&32<=t&&t<=47};k.prototype.isOffsetControlCode=function(n,t){return n===this.OFFSET_&&33<=t&&t<=35};k.prototype.isPAC=function(n,t){return n>=this.BASE_&&n<this.BASE_+8&&64<=t&&t<=127};k.prototype.isColorPAC=function(n){return 64<=n&&n<=79||96<=n&&n<=127};k.prototype.isNormalChar=function(n){return 32<=n&&n<=127};k.prototype.setRollUp=function(n,t){if("rollUp"!==this.mode_&&(this.row_=14,this.mode_="rollUp",this.flushDisplayed(n),this.nonDisplayed_=iu(),this.displayed_=iu()),void 0!==t&&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]="";void 0===t&&(t=this.row_);this.topRow_=t-this.rollUpRows_+1};k.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)};k.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)}};k.prototype.popOn=function(n,t){var i=this.nonDisplayed_[this.row_];i+=t;this.nonDisplayed_[this.row_]=i};k.prototype.rollUp=function(n,t){var i=this.displayed_[this.row_];i+=t;this.displayed_[this.row_]=i};k.prototype.shiftRowsUp_=function(){for(var n=0;n<this.topRow_;n++)this.displayed_[n]="";for(n=this.row_+1;n<15;n++)this.displayed_[n]="";for(n=this.topRow_;n<this.row_;n++)this.displayed_[n]=this.displayed_[n+1];this.displayed_[this.row_]=""};k.prototype.paintOn=function(n,t){var i=this.displayed_[this.row_];i+=t;this.displayed_[this.row_]=i};ph={CaptionStream:bi,Cea608Stream:k};it={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21};ip.prototype=new vt;var rp,ivt=ip,rvt=tp,gut={TXXX:function(n){var t;if(3===n.data[0]){for(t=1;t<n.data.length;t++)if(0===n.data[t]){n.description=wh(n.data,1,t);n.value=wh(n.data,t+1,n.data.length).replace(/\0*$/,"");break}n.data=n.value}},WXXX:function(n){var t;if(3===n.data[0])for(t=1;t<n.data.length;t++)if(0===n.data[t]){n.description=wh(n.data,1,t);n.url=wh(n.data,t+1,n.data.length);break}},PRIV:function(n){for(var i,t=0;t<n.data.length;t++)if(0===n.data[t]){n.owner=(i=n.data,unescape(dut(i,0,t)));break}n.privateData=n.data.subarray(t+1);n.data=n.privateData}};(rp=function(n){var r,u={debug:!(!n||!n.debug),descriptor:n&&n.descriptor},i=0,t=[],f=0;if(rp.prototype.init.call(this),this.dispatchType=it.METADATA_STREAM_TYPE.toString(16),u.descriptor)for(r=0;r<u.descriptor.length;r++)this.dispatchType+=("00"+u.descriptor[r].toString(16)).slice(-2);this.push=function(n){var r,e,l,o,h,s,c;if("timed-metadata"===n.type)if(n.dataAlignmentIndicator&&(f=0,t.length=0),0===t.length&&(n.data.length<10||n.data[0]!=="I".charCodeAt(0)||n.data[1]!=="D".charCodeAt(0)||n.data[2]!=="3".charCodeAt(0)))u.debug;else if(t.push(n),f+=n.data.byteLength,1===t.length&&(i=bh(n.data.subarray(6,10)),i+=10),!(f<i)){for(r={data:new Uint8Array(i),frames:[],pts:t[0].pts,dts:t[0].dts},h=0;h<i;)r.data.set(t[0].data.subarray(0,i-h),h),h+=t[0].data.byteLength,f-=t[0].data.byteLength,t.shift();e=10;64&r.data[5]&&(e+=4,e+=bh(r.data.subarray(10,14)),i-=bh(r.data.subarray(16,20)));do{if((l=bh(r.data.subarray(e+4,e+8)))<1)return;((o={id:String.fromCharCode(r.data[e],r.data[e+1],r.data[e+2],r.data[e+3]),data:r.data.subarray(e+10,e+l+10)}).key=o.id,gut[o.id]&&(gut[o.id](o),"com.apple.streaming.transportStreamTimestamp"===o.owner))&&(s=o.data,c=(1&s[3])<<30|s[4]<<22|s[5]<<14|s[6]<<6|s[7]>>>2,c*=4,c+=3&s[7],o.timeStamp=c,void 0===r.pts&&void 0===r.dts&&(r.pts=o.timeStamp,r.dts=o.timeStamp),this.trigger("timestamp",o));r.frames.push(o);e+=10;e+=l}while(e<i);this.trigger("data",r)}}}).prototype=new vt;nft=rp;tft=ivt;(up=function(){var t=new Uint8Array(188),n=0;up.prototype.init.call(this);this.push=function(i){var r,u=0,f=188;for(n?((r=new Uint8Array(i.byteLength+n)).set(t.subarray(0,n)),r.set(i,n),n=0):r=i;f<r.byteLength;)71!==r[u]||71!==r[f]?(u++,f++):(this.trigger("data",r.subarray(u,f)),u+=188,f+=188);u<r.byteLength&&(t.set(r.subarray(u),0),n=r.byteLength-u)};this.flush=function(){188===n&&71===t[0]&&(this.trigger("data",t),n=0);this.trigger("done")}}).prototype=new vt;(kh=function(){var t,i,r,n;kh.prototype.init.call(this);(n=this).packetsWaitingForPmt=[];this.programMapTable=void 0;t=function(n,t){var u=0;t.payloadUnitStartIndicator&&(u+=n[u]+1);"pat"===t.type?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=(31&t[10])<<8|t[11];i.pmtPid=n.pmtPid};r=function(t,i){var e,r,u,f;if(1&t[5]){for(n.programMapTable={video:null,audio:null,"timed-metadata":{}},e=3+((15&t[1])<<8|t[2])-4,r=12+((15&t[10])<<8|t[11]);r<e;)u=t[r],f=(31&t[r+1])<<8|t[r+2],u===it.H264_STREAM_TYPE&&null===n.programMapTable.video?n.programMapTable.video=f:u===it.ADTS_STREAM_TYPE&&null===n.programMapTable.audio?n.programMapTable.audio=f:u===it.METADATA_STREAM_TYPE&&(n.programMapTable["timed-metadata"][f]=u),r+=5+((15&t[r+3])<<8|t[r+4]);i.programMapTable=n.programMapTable}};this.push=function(n){var i={},r=4;if(i.payloadUnitStartIndicator=!!(64&n[1]),i.pid=31&n[1],i.pid<<=8,i.pid|=n[2],1<(48&n[3])>>>4&&(r+=n[r]+1),0===i.pid)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 void 0===this.programMapTable?this.packetsWaitingForPmt.push([n,r,i]):this.processPes_(n,r,i)};this.processPes_=function(n,t,i){i.streamType=i.pid===this.programMapTable.video?it.H264_STREAM_TYPE:i.pid===this.programMapTable.audio?it.ADTS_STREAM_TYPE:this.programMapTable["timed-metadata"][i.pid];i.type="pes";i.data=n.subarray(t);this.trigger("data",i)}}).prototype=new vt;kh.STREAM_TYPES={h264:27,adts:15};(fp=function(){function n(n,i,r){var e,o,s=new Uint8Array(n.size),u={type:i},f=0,h=0;if(n.data.length&&!(n.size<9)){for(u.trackId=n.data[0].pid,f=0;f<n.data.length;f++)o=n.data[f],s.set(o.data,h),h+=o.data.byteLength;!function(n,t){var i;t.packetLength=6+(n[4]<<8|n[5]);t.dataAlignmentIndicator=0!=(4&n[6]);192&(i=n[7])&&(t.pts=(14&n[9])<<27|(255&n[10])<<20|(254&n[11])<<12|(255&n[12])<<5|(254&n[13])>>>3,t.pts*=4,t.pts+=(6&n[13])>>>1,t.dts=t.pts,64&i&&(t.dts=(14&n[14])<<27|(255&n[15])<<20|(254&n[16])<<12|(255&n[17])<<5|(254&n[18])>>>3,t.dts*=4,t.dts+=(6&n[18])>>>1));t.data=n.subarray(9+n[8])}(s,u);e="video"===i||u.packetLength<=n.size;(r||e)&&(n.size=0,n.data.length=0);e&&t.trigger("data",u)}}var t=this,i={data:[],size:0},r={data:[],size:0},u={data:[],size:0};fp.prototype.init.call(this);this.push=function(f){({pat:function(){},pes:function(){var t,e;switch(f.streamType){case it.H264_STREAM_TYPE:case it.H264_STREAM_TYPE:t=i;e="video";break;case it.ADTS_STREAM_TYPE:t=r;e="audio";break;case it.METADATA_STREAM_TYPE:t=u;e="timed-metadata";break;default:return}f.payloadUnitStartIndicator&&n(t,e,!0);t.data.push(f);t.size+=f.data.byteLength},pmt:function(){var i={type:"metadata",tracks:[]},n=f.programMapTable;null!==n.video&&i.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+n.video,codec:"avc",type:"video"});null!==n.audio&&i.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+n.audio,codec:"adts",type:"audio"});t.trigger("data",i)}})[f.type]()};this.flush=function(){n(i,"video");n(r,"audio");n(u,"timed-metadata");this.trigger("done")}}).prototype=new vt;ep={PAT_PID:0,MP2T_PACKET_LENGTH:188,TransportPacketStream:up,TransportParseStream:kh,ElementaryStream:fp,TimestampRolloverStream:tft,CaptionStream:ph.CaptionStream,Cea608Stream:ph.Cea608Stream,MetadataStream:nft};for(dh in it)it.hasOwnProperty(dh)&&(ep[dh]=it[dh]);ui=ep;sp=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];(op=function(){var n;op.prototype.init.call(this);this.push=function(t){var o,s,r,u,h,f,i=0,e=0;if("audio"===t.type)for(n?(u=n,(n=new Uint8Array(u.byteLength+t.data.byteLength)).set(u),n.set(t.data,u.byteLength)):n=t.data;i+5<n.length;)if(255===n[i]&&240==(246&n[i+1])){if(s=2*(1&~n[i+1]),o=(3&n[i+3])<<11|n[i+4]<<3|(224&n[i+5])>>5,f=9e4*(h=1024*(1+(3&n[i+6])))/sp[(60&n[i+2])>>>2],r=i+o,n.byteLength<r)return;if(this.trigger("data",{pts:t.pts+e*f,dts:t.dts+e*f,sampleCount:h,audioobjecttype:1+(n[i+2]>>>6&3),channelcount:(1&n[i+2])<<2|(192&n[i+3])>>>6,samplerate:sp[(60&n[i+2])>>>2],samplingfrequencyindex:(60&n[i+2])>>>2,samplesize:16,data:n.subarray(i+7+s,r)}),n.byteLength===r)return void(n=void 0);e++;n=n.subarray(r)}else i++};this.flush=function(){this.trigger("done")}}).prototype=new vt;cp=op;rft=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(0===u)throw new Error("no bytes available");e.set(n.subarray(f,f+u));r=new DataView(e.buffer).getUint32(0);t=8*u;i-=u};this.skipBits=function(n){var u;n<t||(n-=t,n-=8*(u=Math.floor(n/8)),i-=u,this.loadWord());r<<=n;t-=n};this.readBits=function(n){var u=Math.min(t,n),f=r>>>32-u;return 0<(t-=u)?r<<=u:0<i&&this.loadWord(),0<(u=n-u)?f<<u|this.readBits(u):f};this.skipLeadingZeros=function(){for(var n=0;n<t;++n)if(0!=(r&2147483648>>>n))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 1===this.readBits(1)};this.readUnsignedByte=function(){return this.readBits(8)};this.loadWord()};(gh=function(){var t,n,i=0;gh.prototype.init.call(this);this.push=function(r){var u;for(n=n?((u=new Uint8Array(n.byteLength+r.data.byteLength)).set(n),u.set(r.data,n.byteLength),u):r.data;i<n.byteLength-3;i++)if(1===n[i+2]){t=i+5;break}for(;t<n.byteLength;)switch(n[t]){case 0:if(0!==n[t-1]){t+=2;break}if(0!==n[t-2]){t++;break}for(i+3!==t-2&&this.trigger("data",n.subarray(i+3,t-2));1!==n[++t]&&t<n.length;);i=t-2;t+=3;break;case 1:if(0!==n[t-1]||0!==n[t-2]){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.flush=function(){n&&3<n.byteLength&&this.trigger("data",n.subarray(i+3));n=null;i=0;this.trigger("done")}}).prototype=new vt;ift={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0};(hp=function(){var t,r,u,f,i,e,o,n=new gh;hp.prototype.init.call(this);(t=this).push=function(t){"video"===t.type&&(r=t.trackId,u=t.pts,f=t.dts,n.push(t))};n.on("data",function(n){var o={trackId:r,pts:u,dts:f,data:n};switch(31&n[0]){case 5:o.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:o.nalUnitType="sei_rbsp";o.escapedRBSP=i(n.subarray(1));break;case 7:o.nalUnitType="seq_parameter_set_rbsp";o.escapedRBSP=i(n.subarray(1));o.config=e(o.escapedRBSP);break;case 8:o.nalUnitType="pic_parameter_set_rbsp";break;case 9:o.nalUnitType="access_unit_delimiter_rbsp"}t.trigger("data",o)});n.on("done",function(){t.trigger("done")});this.flush=function(){n.flush()};o=function(n,t){for(var u=8,i=8,r=0;r<n;r++)0!==i&&(i=(u+t.readExpGolomb()+256)%256),u=0===i?u:i};i=function(n){for(var r,u,f,e=n.byteLength,i=[],t=1;t<e-2;)0===n[t]&&0===n[t+1]&&3===n[t+2]?(i.push(t+2),t+=2):t++;if(0===i.length)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};e=function(n){var t,u,f,e,s,h,c,l,a,v,y,i,r,p=0,w=0,b=0,k=0,d=1;if(u=(t=new rft(n)).readUnsignedByte(),e=t.readUnsignedByte(),f=t.readUnsignedByte(),t.skipUnsignedExpGolomb(),ift[u]&&(3===(s=t.readUnsignedExpGolomb())&&t.skipBits(1),t.skipUnsignedExpGolomb(),t.skipUnsignedExpGolomb(),t.skipBits(1),t.readBoolean()))for(y=3!==s?8:12,r=0;r<y;r++)t.readBoolean()&&o(r<6?16:64,t);if(t.skipUnsignedExpGolomb(),0===(h=t.readUnsignedExpGolomb()))t.readUnsignedExpGolomb();else if(1===h)for(t.skipBits(1),t.skipExpGolomb(),t.skipExpGolomb(),c=t.readUnsignedExpGolomb(),r=0;r<c;r++)t.skipExpGolomb();if(t.skipUnsignedExpGolomb(),t.skipBits(1),l=t.readUnsignedExpGolomb(),a=t.readUnsignedExpGolomb(),0===(v=t.readBits(1))&&t.skipBits(1),t.skipBits(1),t.readBoolean()&&(p=t.readUnsignedExpGolomb(),w=t.readUnsignedExpGolomb(),b=t.readUnsignedExpGolomb(),k=t.readUnsignedExpGolomb()),t.readBoolean()&&t.readBoolean()){switch(t.readUnsignedByte()){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&&(d=i[0]/i[1])}return{profileIdc:u,levelIdc:f,profileCompatibility:e,width:Math.ceil((16*(l+1)-2*p-2*w)*d),height:(2-v)*(a+1)*16-2*b-2*k}}}).prototype=new vt;var lp,uvt={H264Stream:hp,NalByteStream:gh},fvt=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],nc={isLikelyAacData:function(n){return n[0]==="I".charCodeAt(0)&&n[1]==="D".charCodeAt(0)&&n[2]==="3".charCodeAt(0)},parseId3TagSize:function(n,t){var i=n[t+6]<<21|n[t+7]<<14|n[t+8]<<7|n[t+9];return(16&n[t+5])>>4?20+i:10+i},parseAdtsSize:function(n,t){var i=(224&n[t+5])>>5,r=n[t+4]<<3;return 6144&n[t+3]|r|i},parseType:function(n,t){return n[t]==="I".charCodeAt(0)&&n[t+1]==="D".charCodeAt(0)&&n[t+2]==="3".charCodeAt(0)?"timed-metadata":!0&n[t]&&240==(240&n[t+1])?"audio":null},parseSampleRate:function(n){for(var t=0;t+5<n.length;){if(255===n[t]&&240==(246&n[t+1]))return fvt[(60&n[t+2])>>>2];t++}return null},parseAacTimestamp:function(n){var t,f,u,r,i,e;t=10;64&n[5]&&(t+=4,t+=uft(n.subarray(10,14)));do{if((f=uft(n.subarray(t+4,t+8)))<1)return null;if("PRIV"===String.fromCharCode(n[t],n[t+1],n[t+2],n[t+3]))for(u=n.subarray(t+10,t+f+10),r=0;r<u.byteLength;r++)if(0===u[r]){if("com.apple.streaming.transportStreamTimestamp"!==unescape(function(n,t,i){for(var u="",r=t;r<i;r++)u+="%"+("00"+n[r].toString(16)).slice(-2);return u}(u,0,r)))break;return i=u.subarray(r+1),e=(1&i[3])<<30|i[4]<<22|i[5]<<14|i[6]<<6|i[7]>>>2,e*=4,e+(3&i[7])}t+=10;t+=f}while(t<n.byteLength);return null}};(lp=function(){var n=new Uint8Array,t=0;lp.prototype.init.call(this);this.setTimestamp=function(n){t=n};this.push=function(i){var e,o,s,f,u=0,r=0;for(n.length?(f=n.length,(n=new Uint8Array(i.byteLength+f)).set(n.subarray(0,f)),n.set(i,f)):n=i;3<=n.length-r;)if(n[r]!=="I".charCodeAt(0)||n[r+1]!=="D".charCodeAt(0)||n[r+2]!=="3".charCodeAt(0))if(255!=(255&n[r])||240!=(240&n[r+1]))r++;else{if(n.length-r<7)break;if(r+(u=nc.parseAdtsSize(n,r))>n.length)break;s={type:"audio",data:n.subarray(r,r+u),pts:t,dts:t};this.trigger("data",s);r+=u}else{if(n.length-r<10)break;if(r+(u=nc.parseId3TagSize(n,r))>n.length)break;o={type:"timed-metadata",data:n.subarray(r,r+u)};this.trigger("data",o);r+=u}e=n.length-r;n=0<e?n.subarray(r):new Uint8Array}}).prototype=new vt;var tc,ge,ap,no,evt=lp,ovt=uvt.H264Stream,svt=nc.isLikelyAacData,vp=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],yp=["width","height","profileIdc","levelIdc","profileCompatibility"];(ge=function(n,t){var i=[],r=0,u=0,f=0,e=1/0;t=t||{};ge.prototype.init.call(this);this.push=function(t){np(n,t);n&&vp.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,s,c,h;0!==i.length&&(o=vat(i,n,u),n.baseMediaDecodeTime=kut(n,t.keepOriginalTimestamps),aat(n,o,f,e),n.samples=yat(o),c=tu.mdat(pat(o)),i=[],s=tu.moof(r,[n]),h=new Uint8Array(s.byteLength+c.byteLength),r++,h.set(s),h.set(c,s.byteLength),de(n),this.trigger("data",{track:n,boxes:h}));this.trigger("done","AudioSegmentStream")}}).prototype=new vt;(tc=function(n,t){var u,f,e=0,i=[],r=[];t=t||{};tc.prototype.init.call(this);delete n.minPTS;this.gopCache_=[];this.push=function(t){np(n,t);"seq_parameter_set_rbsp"!==t.nalUnitType||u||(u=t.config,n.sps=[t.data],yp.forEach(function(t){n[t]=u[t]},this));"pic_parameter_set_rbsp"!==t.nalUnitType||f||(f=t.data,n.pps=[t.data]);i.push(t)};this.flush=function(){for(var v,f,u,s,c,h,l,o,y,a=0;i.length&&"access_unit_delimiter_rbsp"!==i[0].nalUnitType;)i.shift();if(0===i.length)return this.resetStream_(),void this.trigger("done","VideoSegmentStream");if(v=rat(i),(u=uat(v))[0][0].keyFrame||((f=this.getGopForFusion_(i[0],n))?(a=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=fat(u)),r.length){if(!(y=t.alignGopsAtEnd?this.alignGopsAtEnd_(u):this.alignGopsAtStart_(u)))return this.gopCache_.unshift({gop:u.pop(),pps:n.pps,sps:n.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),i=[],this.resetStream_(),void this.trigger("done","VideoSegmentStream");de(n);u=y}np(n,u);n.samples=eat(u);c=tu.mdat(oat(u));n.baseMediaDecodeTime=kut(n,t.keepOriginalTimestamps);this.trigger("processedGopsInfo",u.map(function(n){return{pts:n.pts,dts:n.dts,byteLength:n.byteLength}}));l=u[0];o=u[u.length-1];this.trigger("segmentTimingInfo",eft(n.baseMediaDecodeTime,l.dts,l.pts,o.dts+o.duration,o.pts+o.duration,a));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);s=tu.moof(e,[n]);h=new Uint8Array(s.byteLength+c.byteLength);e++;h.set(s);h.set(c,s.byteLength);this.trigger("data",{track:n,boxes:h});this.resetStream_();this.trigger("done","VideoSegmentStream")};this.resetStream_=function(){de(n);f=u=void 0};this.getGopForFusion_=function(t){for(var i,r,u,f,o=1/0,e=0;e<this.gopCache_.length;e++)u=(f=this.gopCache_[e]).gop,n.pps&&fft(n.pps[0],f.pps[0])&&n.sps&&fft(n.sps[0],f.sps[0])&&(u.dts<n.timelineStartInfo.dts||-1e4<=(i=t.dts-u.dts-u.duration)&&i<=45e3&&(!r||i<o)&&(r=f,o=i));return r?r.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&&(e=r[f],u=n[i],e.pts!==u.pts);)u.pts>e.pts?f++:(i++,o-=u.byteLength,s-=u.nalCount,h-=u.duration);return 0===i?n:i===n.length?null:((t=n.slice(i)).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;0<=u&&0<=i;){if(s=r[u],h=n[i],s.pts===h.pts){e=!0;break}s.pts>h.pts?u--:(u===r.length-1&&(f=i),i--)}return!e&&null===f?null:0===(c=e?i:f)?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}}).prototype=new vt;(no=function(n,t){this.numberOfTracks=0;this.metadataStream=t;this.remuxTracks="undefined"!=typeof(n=n||{}).remux?!!n.remux:!0;"boolean"==typeof n.keepOriginalTimestamps&&(this.keepOriginalTimestamps=n.keepOriginalTimestamps);this.pendingTracks=[];this.videoTrack=null;this.pendingBoxes=[];this.pendingCaptions=[];this.pendingMetadata=[];this.pendingBytes=0;this.emittedTracks=0;no.prototype.init.call(this);this.push=function(n){return n.text?this.pendingCaptions.push(n):n.frames?this.pendingMetadata.push(n):(this.pendingTracks.push(n.track),this.pendingBoxes.push(n.boxes),this.pendingBytes+=n.boxes.byteLength,"video"===n.track.type&&(this.videoTrack=n.track),void("audio"===n.track.type&&(this.audioTrack=n.track)))}}).prototype=new vt;no.prototype.flush=function(n){var r,u,e,t,o=0,i={captions:[],captionStreams:{},metadata:[],info:{}},f=0;if(this.pendingTracks.length<this.numberOfTracks){if("VideoSegmentStream"!==n&&"AudioSegmentStream"!==n)return;if(this.remuxTracks)return;if(0===this.pendingTracks.length)return this.emittedTracks++,void(this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0))}for(this.videoTrack?(f=this.videoTrack.timelineStartInfo.pts,yp.forEach(function(n){i.info[n]=this.videoTrack[n]},this)):this.audioTrack&&(f=this.audioTrack.timelineStartInfo.pts,vp.forEach(function(n){i.info[n]=this.audioTrack[n]},this)),i.type=1===this.pendingTracks.length?this.pendingTracks[0].type:"combined",this.emittedTracks+=this.pendingTracks.length,e=tu.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]).startTime=r.startPts,this.keepOriginalTimestamps||(r.startTime-=f),r.startTime/=9e4,r.endTime=r.endPts,this.keepOriginalTimestamps||(r.endTime-=f),r.endTime/=9e4,i.captionStreams[r.stream]=!0,i.captions.push(r);for(t=0;t<this.pendingMetadata.length;t++)(u=this.pendingMetadata[t]).cueTime=u.pts,this.keepOriginalTimestamps||(u.cueTime-=f),u.cueTime/=9e4,i.metadata.push(u);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);this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)};(ap=function(n){var i,t,r=this,u=!0;ap.prototype.init.call(this);n=n||{};this.baseMediaDecodeTime=n.baseMediaDecodeTime||0;this.transmuxPipeline_={};this.setupAacPipeline=function(){var i={};(this.transmuxPipeline_=i).type="aac";i.metadataStream=new ui.MetadataStream;i.aacStream=new evt;i.audioTimestampRolloverStream=new ui.TimestampRolloverStream("audio");i.timedMetadataTimestampRolloverStream=new ui.TimestampRolloverStream("timed-metadata");i.adtsStream=new cp;i.coalesceStream=new no(n,i.metadataStream);i.headOfPipeline=i.aacStream;i.aacStream.pipe(i.audioTimestampRolloverStream).pipe(i.adtsStream);i.aacStream.pipe(i.timedMetadataTimestampRolloverStream).pipe(i.metadataStream).pipe(i.coalesceStream);i.metadataStream.on("timestamp",function(n){i.aacStream.setTimestamp(n.timeStamp)});i.aacStream.on("data",function(u){"timed-metadata"!==u.type||i.audioSegmentStream||(t=t||{timelineStartInfo:{baseMediaDecodeTime:r.baseMediaDecodeTime},codec:"adts",type:"audio"},i.coalesceStream.numberOfTracks++,i.audioSegmentStream=new ge(t,n),i.adtsStream.pipe(i.audioSegmentStream).pipe(i.coalesceStream))});i.coalesceStream.on("data",this.trigger.bind(this,"data"));i.coalesceStream.on("done",this.trigger.bind(this,"done"))};this.setupTsPipeline=function(){var u={};(this.transmuxPipeline_=u).type="ts";u.metadataStream=new ui.MetadataStream;u.packetStream=new ui.TransportPacketStream;u.parseStream=new ui.TransportParseStream;u.elementaryStream=new ui.ElementaryStream;u.videoTimestampRolloverStream=new ui.TimestampRolloverStream("video");u.audioTimestampRolloverStream=new ui.TimestampRolloverStream("audio");u.timedMetadataTimestampRolloverStream=new ui.TimestampRolloverStream("timed-metadata");u.adtsStream=new cp;u.h264Stream=new ovt;u.captionStream=new ui.CaptionStream;u.coalesceStream=new no(n,u.metadataStream);u.headOfPipeline=u.packetStream;u.packetStream.pipe(u.parseStream).pipe(u.elementaryStream);u.elementaryStream.pipe(u.videoTimestampRolloverStream).pipe(u.h264Stream);u.elementaryStream.pipe(u.audioTimestampRolloverStream).pipe(u.adtsStream);u.elementaryStream.pipe(u.timedMetadataTimestampRolloverStream).pipe(u.metadataStream).pipe(u.coalesceStream);u.h264Stream.pipe(u.captionStream).pipe(u.coalesceStream);u.elementaryStream.on("data",function(f){var e;if("metadata"===f.type){for(e=f.tracks.length;e--;)i||"video"!==f.tracks[e].type?t||"audio"!==f.tracks[e].type||((t=f.tracks[e]).timelineStartInfo.baseMediaDecodeTime=r.baseMediaDecodeTime):(i=f.tracks[e]).timelineStartInfo.baseMediaDecodeTime=r.baseMediaDecodeTime;i&&!u.videoSegmentStream&&(u.coalesceStream.numberOfTracks++,u.videoSegmentStream=new tc(i,n),u.videoSegmentStream.on("timelineStartInfo",function(n){t&&(t.timelineStartInfo=n,u.audioSegmentStream.setEarliestDts(n.dts))}),u.videoSegmentStream.on("processedGopsInfo",r.trigger.bind(r,"gopInfo")),u.videoSegmentStream.on("segmentTimingInfo",r.trigger.bind(r,"videoSegmentTimingInfo")),u.videoSegmentStream.on("baseMediaDecodeTime",function(n){t&&u.audioSegmentStream.setVideoBaseMediaDecodeTime(n)}),u.h264Stream.pipe(u.videoSegmentStream).pipe(u.coalesceStream));t&&!u.audioSegmentStream&&(u.coalesceStream.numberOfTracks++,u.audioSegmentStream=new ge(t,n),u.adtsStream.pipe(u.audioSegmentStream).pipe(u.coalesceStream))}});u.coalesceStream.on("data",this.trigger.bind(this,"data"));u.coalesceStream.on("done",this.trigger.bind(this,"done"))};this.setBaseMediaDecodeTime=function(r){var u=this.transmuxPipeline_;n.keepOriginalTimestamps||(this.baseMediaDecodeTime=r);t&&(t.timelineStartInfo.dts=void 0,t.timelineStartInfo.pts=void 0,de(t),n.keepOriginalTimestamps||(t.timelineStartInfo.baseMediaDecodeTime=r),u.audioTimestampRolloverStream&&u.audioTimestampRolloverStream.discontinuity());i&&(u.videoSegmentStream&&(u.videoSegmentStream.gopCache_=[],u.videoTimestampRolloverStream.discontinuity()),i.timelineStartInfo.dts=void 0,i.timelineStartInfo.pts=void 0,de(i),u.captionStream.reset(),n.keepOriginalTimestamps||(i.timelineStartInfo.baseMediaDecodeTime=r));u.timedMetadataTimestampRolloverStream&&u.timedMetadataTimestampRolloverStream.discontinuity()};this.setAudioAppendStart=function(n){t&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(n)};this.alignGopsWith=function(n){i&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(n)};this.push=function(n){if(u){var t=svt(n);t&&"aac"!==this.transmuxPipeline_.type?this.setupAacPipeline():t||"ts"===this.transmuxPipeline_.type||this.setupTsPipeline();u=!1}this.transmuxPipeline_.headOfPipeline.push(n)};this.flush=function(){u=!0;this.transmuxPipeline_.headOfPipeline.flush()};this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}}).prototype=new vt;var wp={Transmuxer:ap,VideoSegmentStream:tc,AudioSegmentStream:ge,AUDIO_PROPERTIES:vp,VIDEO_PROPERTIES:yp,generateVideoSegmentTimingInfo:eft},lvt=dat,avt=ph.CaptionStream,vvt={generator:tu,probe:li,Transmuxer:wp.Transmuxer,AudioSegmentStream:wp.AudioSegmentStream,VideoSegmentStream:wp.VideoSegmentStream,CaptionParser:function(){var r,u,n,t,i,f=!1;this.isInitialized=function(){return f};this.init=function(){r=new avt;f=!0;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&&0===i.length||r&&"object"==typeof r&&0===Object.keys(r).length)&&(n!==i[0]||t!==r[n])};this.parse=function(r,f,e){var o,s;if(!this.isInitialized()||!f||!e)return null;if(this.isNewInit(f,e))n=f[0],t=e[n];else if(!n||!t)return u.push(r),null;for(;0<u.length;)s=u.shift(),this.parse(s,f,e);return null!==(o=function(n,t,i){return t?{seiNals:cvt(n,t)[t],timescale:i}:null}(r,n,t))&&o.seiNals?(this.pushNals(o.seiNals),this.flushStream(),i):null};this.pushNals=function(n){if(!this.isInitialized()||!n||0===n.length)return null;n.forEach(function(n){r.push(n)})};this.flushStream=function(){if(!this.isInitialized())return null;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=[];t=n=null;i?this.clearParsedCaptions():i={captions:[],captionStreams:{}};this.resetCaptionStream()};this.reset()}}.CaptionParser,yvt={parseType:function(n,t){var i=oft(n);return 0===i?"pat":i===t?"pmt":t?"pes":null},parsePat:function(n){var i=ic(n),t=4+rc(n);return i&&(t+=n[t]+1),(31&n[t+10])<<8|n[t+11]},parsePmt:function(n){var u={},e=ic(n),t=4+rc(n),f,r,i;if(e&&(t+=n[t]+1),1&n[t+5]){for(f=3+((15&n[t+1])<<8|n[t+2])-4,r=12+((15&n[t+10])<<8|n[t+11]);r<f;)i=t+r,u[(31&n[i+1])<<8|n[i+2]]=n[i],r+=5+((15&n[i+3])<<8|n[i+4]);return u}},parsePayloadUnitStartIndicator:ic,parsePesType:function(n,t){switch(t[oft(n)]){case it.H264_STREAM_TYPE:return"video";case it.ADTS_STREAM_TYPE:return"audio";case it.METADATA_STREAM_TYPE:return"timed-metadata";default:return null}},parsePesTime:function(n){var t,r,i;return ic(n)?(t=4+rc(n),t>=n.byteLength)?null:(i=null,192&(r=n[t+7])&&((i={}).pts=(14&n[t+9])<<27|(255&n[t+10])<<20|(254&n[t+11])<<12|(255&n[t+12])<<5|(254&n[t+13])>>>3,i.pts*=4,i.pts+=(6&n[t+13])>>>1,i.dts=i.pts,64&r&&(i.dts=(14&n[t+14])<<27|(255&n[t+15])<<20|(254&n[t+16])<<12|(255&n[t+17])<<5|(254&n[t+18])>>>3,i.dts*=4,i.dts+=(6&n[t+18])>>>1)),i):null},videoPacketContainsKeyFrame:function(n){for(var f=4+rc(n),i=n.subarray(f),t=0,r=0,u=!1;r<i.byteLength-3;r++)if(1===i[r+2]){t=r+5;break}for(;t<i.byteLength;)switch(i[t]){case 0:if(0!==i[t-1]){t+=2;break}if(0!==i[t-2]){t++;break}for(r+3!==t-2&&"slice_layer_without_partitioning_rbsp_idr"===pp(31&i[r+3])&&(u=!0);1!==i[++t]&&t<i.length;);r=t-2;t+=3;break;case 1:if(0!==i[t-1]||0!==i[t-2]){t+=3;break}"slice_layer_without_partitioning_rbsp_idr"===pp(31&i[r+3])&&(u=!0);r=t-2;t+=3;break;default:t+=3}return i=i.subarray(r),t-=r,r=0,i&&3<i.byteLength&&"slice_layer_without_partitioning_rbsp_idr"===pp(31&i[r+3])&&(u=!0),u}},uf=rvt,y={};y.ts=yvt;y.aac=nc;ot=188;sft=function(n,t){var i;return(i=y.aac.isLikelyAacData(n)?function(n){for(var s,f,u=!1,o=0,e=null,i=null,r=0,t=0;3<=n.length-t;){switch(y.aac.parseType(n,t)){case"timed-metadata":if(n.length-t<10){u=!0;break}if((r=y.aac.parseId3TagSize(n,t))>n.length){u=!0;break}null===i&&(f=n.subarray(t,t+r),i=y.aac.parseAacTimestamp(f));t+=r;break;case"audio":if(n.length-t<7){u=!0;break}if((r=y.aac.parseAdtsSize(n,t))>n.length){u=!0;break}null===e&&(f=n.subarray(t,t+r),e=y.aac.parseSampleRate(f));o++;t+=r;break;default:t++}if(u)return null}return null===e||null===i?null:(s=9e4/e,{audio:[{type:"audio",dts:i,pts:i},{type:"audio",dts:i+1024*o*s,pts:i+1024*o*s}]})}(n):bvt(n))&&(i.audio||i.video)?(function(n,t){var u,r,i;n.audio&&n.audio.length&&(u=t,"undefined"==typeof u&&(u=n.audio[0].dts),n.audio.forEach(function(n){n.dts=uf(n.dts,u);n.pts=uf(n.pts,u);n.dtsTime=n.dts/9e4;n.ptsTime=n.pts/9e4}));n.video&&n.video.length&&(r=t,("undefined"==typeof r&&(r=n.video[0].dts),n.video.forEach(function(n){n.dts=uf(n.dts,r);n.pts=uf(n.pts,r);n.dtsTime=n.dts/9e4;n.ptsTime=n.pts/9e4}),n.firstKeyFrame)&&(i=n.firstKeyFrame,i.dts=uf(i.dts,r),i.pts=uf(i.pts,r),i.dtsTime=i.dts/9e4,i.ptsTime=i.dts/9e4))}(i,t),i):null};hft=function(n,t,i){return t&&cft(n.prototype,t),i&&cft(n,i),n};gt=null;lft=(bp.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[255&c]^e[a],g=p[s>>>24]^w[h>>16&255]^b[c>>8&255]^k[255&o]^e[a+1],nt=p[h>>>24]^w[c>>16&255]^b[o>>8&255]^k[255&s]^e[a+2],c=p[c>>>24]^w[o>>16&255]^b[s>>8&255]^k[255&h]^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[255&c]^e[a++],y=o,o=s,s=h,h=c,c=y},bp);kp=(ru.prototype.on=function(n,t){this.listeners[n]||(this.listeners[n]=[]);this.listeners[n].push(t)},ru.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),-1<i},ru.prototype.trigger=function(n,t){var i=this.listeners[n],f,r;if(i)if(2===arguments.length)for(f=i.length,r=0;r<f;++r)i[r].call(this,t);else for(var e=Array.prototype.slice.call(arguments,1),o=i.length,u=0;u<o;++u)i[u].apply(this,e)},ru.prototype.dispose=function(){this.listeners={}},ru.prototype.pipe=function(n){this.on("data",function(t){n.push(t)})},ru);dp=(function(n,t){if("function"!=typeof t&&null!==t)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)}(to,aft=kp),to.prototype.processJob_=function(){this.jobs.shift()();this.timeout_=this.jobs.length?setTimeout(this.processJob_.bind(this),this.delay):null},to.prototype.push=function(n){this.jobs.push(n);this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))},to);yft=(io.prototype.decryptChunk_=function(n,t,i,r){return function(){var u=vft(n,t,i);r.set(u,n.byteOffset)}},hft(io,null,[{key:"STEP",get:function(){return 32e3}}]),io);oi=function(n,t,i){return t&&pft(n.prototype,t),i&&pft(n,i),n};var kvt=function(n,t){if(Array.isArray(n))return n;if(Symbol.iterator in Object(n))return function(n,t){var r=[],u=!0,f=!1,e=void 0,o,i;try{for(i=n[Symbol.iterator]();!(u=(o=i.next()).done)&&(r.push(o.value),!t||r.length!==t);u=!0);}catch(n){f=!0;e=n}finally{try{!u&&i.return&&i.return()}finally{if(f)throw e;}}return r}(n,t);throw new TypeError("Invalid attempt to destructure non-iterable instance");},nw=i.mergeOptions,dvt=i.log,oc=(ki(ff,i.EventTarget),oi(ff,[{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:500<=n.status?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 eit;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=gp(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")},kft(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("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);if("string"==typeof t){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);else{if(u=this.state,f=!this.media_||t.uri!==this.media_.uri,this.master.playlists[t.uri].endList)return this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state="HAVE_METADATA",this.media_=t,void(f&&(this.trigger("mediachanging"),this.trigger("mediachange")));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=fc(r.handleManifestRedirects,t.resolvedUri,i),n)return r.playlistRequestError(r.request,t.uri,u);r.haveMetadata(i,t.uri);"HAVE_MASTER"===u?r.trigger("loadedmetadata"):r.trigger("mediachange")}})}}}},{key:"pause",value:function(){this.stopRequest();n.clearTimeout(this.mediaUpdateTimeout);"HAVE_NOTHING"===this.state&&(this.started=!1);"SWITCHING_MEDIA"===this.state?this.state=this.media_?"HAVE_METADATA":"HAVE_MASTER":"HAVE_CURRENT_METADATA"===this.state&&(this.state="HAVE_METADATA")}},{key:"load",value:function(t){var u=this,i,r;n.clearTimeout(this.mediaUpdateTimeout);i=this.media();t?(r=i?i.targetDuration*500:5e3,this.mediaUpdateTimeout=n.setTimeout(function(){return u.load()},r)):this.started?i&&!i.endList?this.trigger("mediaupdatetimeout"):this.trigger("loadedplaylist"):this.start()}},{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},"HAVE_NOTHING"===t.state&&(t.started=!1),t.trigger("error");var u=new eit;return 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=fc(t.handleManifestRedirects,t.srcUrl,r),u.manifest.uri=t.srcUrl,u.manifest.playlists?(t.master=u.manifest,wft(t.master),bft(t.master),t.trigger("loadedplaylist"),void(t.request||t.media(u.manifest.playlists[0]))):(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"))}})}}]),ff);var bet=i.createTimeRange,ryt=ret.bind(null,1),uyt=ret.bind(null,-1),bt={duration:gft,seekable:function(n,t){var r=t||0,i=tet(n,t,!0);return null===i?bet():bet(r,i)},safeLiveIndex:net,getMediaInfoForTime:function(n,t,i,r){var u=void 0,f=void 0,o=n.segments.length,e=t-r;if(e<0){if(0<i)for(u=i-1;0<=u;u--)if(f=n.segments[u],0<(e+=uyt(f.duration)))return{mediaIndex:u,startTime:r-ro(n,i,u)};return{mediaIndex:0,startTime:t}}if(i<0){for(u=i;u<0;u++)if((e-=n.targetDuration)<0)return{mediaIndex:0,startTime:t};i=0}for(u=i;u<o;u++)if(f=n.segments[u],(e-=ryt(f.duration))<0)return{mediaIndex:u,startTime:r+ro(n,i,u)};return{mediaIndex:o-1,startTime:t}},isEnabled:sc,isDisabled:function(n){return n.disabled},isBlacklisted:uet,isIncompatible:tw,playlistEnd:tet,isAes:function(n){for(var t=0;t<n.segments.length;t++)if(n.segments[t].key)return!0;return!1},isFmp4:function(n){for(var t=0;t<n.segments.length;t++)if(n.segments[t].map)return!0;return!1},hasAttribute:fet,estimateSegmentRequestTime:function(n,t,i,r){var u=3<arguments.length&&void 0!==r?r:0;return fet("BANDWIDTH",i)?(n*i.attributes.BANDWIDTH-8*u)/t:NaN},isLowestEnabledRendition:iw},fyt=i.xhr,eyt=i.mergeOptions,oyt=Object.freeze({createTransferableMessage:oet,initSegmentId:hc,segmentKeyId:set,hexDump:het,tagDump:function(n){var t=n.bytes;return het(t)},textRanges:function(n){for(var r,i,u="",t=void 0,t=0;t<n.length;t++)u+=(i=t,(r=n).start(i)+"-"+r.end(i)+" ");return u}}),uo=1/30,fu="undefined"!=typeof window?window:{},fw="undefined"==typeof Symbol?"__target":Symbol(),syt="application/javascript",hyt=fu.BlobBuilder||fu.WebKitBlobBuilder||fu.MozBlobBuilder||fu.MSBlobBuilder,of=fu.URL||fu.webkitURL||of&&of.msURL,sf=fu.Worker;if(sf){ow=det("self.onmessage = function () {}");sw=new Uint8Array(1);try{(ew=new sf(ow)).postMessage(sw,[sw.buffer])}catch(ub){sf=null}finally{of.revokeObjectURL(ow);ew&&ew.terminate()}}var lyt=new ket("./transmuxer-worker.worker.js",function(){var n=this;!function(){function tt(){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),-1<r)};this.trigger=function(t){var r,i,u,f;if(r=n[t])if(2===arguments.length)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={}}}}function r(n){for(var t=[];n--;)t.push(0);return t}function l(){l.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("done",this.trigger.bind(this,"done"))},this)}function it(n){return null===n?"":(n=fe[n]||n,String.fromCharCode(n))}function w(){for(var n=[],t=15;t--;)n.push("");return n}function wu(n,t){var i=1;for(t<n&&(i=-1);4294967296<Math.abs(t-n);)n+=8589934592*i;return n}function gt(n){var i,t;gt.prototype.init.call(this);this.type_=n;this.push=function(n){n.type===this.type_&&(void 0===t&&(t=n.dts),n.dts=wu(n.dts,t),n.pts=wu(n.pts,t),i=n.dts,this.trigger("data",n))};this.flush=function(){t=i;this.trigger("done")};this.discontinuity=function(){i=t=void 0}}function bu(n,t,i){for(var u="",r=t;r<i;r++)u+="%"+("00"+n[r].toString(16)).slice(-2);return u}function ut(n,t,i){return decodeURIComponent(bu(n,t,i))}function ft(n){return n[0]<<21|n[1]<<14|n[2]<<7|n[3]}function rf(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}function uf(n,t,i,r,u,f){return{start:{dts:n,pts:n+(i-t)},end:{dts:n+(r-t),pts:n+(u-i)},prependedContentDuration:f,baseMediaDecodeTime:n}}function h(n){return new Date(1e3*n-20828448e5)}function ff(n){return{isLeading:(12&n[0])>>>2,dependsOn:3&n[0],isDependedOn:(192&n[1])>>>6,hasRedundancy:(48&n[1])>>>4,paddingValue:(14&n[1])>>>1,isNonSyncSample:1&n[1],degradationPriority:n[2]<<8|n[3]}}function ye(n,t){for(var r,u=n,i=0;i<t.length;i++){if(r=t[i],u<r.size)return r;u-=r.size}return null}function pe(n,t){var u=a.findBox(n,["moof","traf"]),f=a.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 f,h=n.mdat,u=n.traf,c=a.findBox(u,["tfhd"]),e=yi.parseTfhd(c[0]),r=e.trackId,o=a.findBox(u,["tfdt"]),l=0<o.length?yi.parseTfdt(o[0]).baseMediaDecodeTime:0,s=a.findBox(u,["trun"]);t===r&&0<s.length&&(f=function(n,t,i){for(var u,f,o,c=new DataView(n.buffer,n.byteOffset,n.byteLength),h=[],s,e,r=0;r+4<n.length;r+=f)if(f=c.getUint32(r),r+=4,!(f<=0))switch(31&n[r]){case 6:s=n.subarray(r+1,r+1+f);e=ye(r,t);u={nalUnitType:"sei_rbsp",size:f,data:s,escapedRBSP:we(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}(h,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 t=yi.parseTrun(n).samples;t.forEach(function(n){void 0===n.duration&&(n.duration=f);void 0===n.size&&(n.size=e);n.trackId=o;n.dts=r;void 0===n.compositionTimeOffset&&(n.compositionTimeOffset=0);n.pts=r+n.compositionTimeOffset;r+=n.duration});u=u.concat(t)}),u}(s,l,e),r),i[r]||(i[r]=[]),i[r]=i[r].concat(f))}),i}function of(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)}function wi(n,t){!function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}(this,wi);this.options=t||{};this.self=n;this.init()}var i,bi,ki,di,gi,nr,lt,at,tr,ir,rr,ur,fr,er,or,sr,hr,cr,lr,ar,vt,t,yt,vr,yr,pr,wr,br,kr,dr,gr,nt,nu,tu,iu,ru,uu,fu,eu,pt,ou=Math.pow(2,32)-1,c,wt,su,hu,cu,y,p,a,rt,e,ni,ku,ti,ii,et,ri,du,gu,ui,ot,fi,s,ei,oi,st,nf,si,tf,pi;!function(){var n;if(t={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],sdtp:[],smhd:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],styp:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[]},"undefined"!=typeof Uint8Array){for(n in t)t.hasOwnProperty(n)&&(t[n]=[n.charCodeAt(0),n.charCodeAt(1),n.charCodeAt(2),n.charCodeAt(3)]);yt=new Uint8Array(["i".charCodeAt(0),"s".charCodeAt(0),"o".charCodeAt(0),"m".charCodeAt(0)]);yr=new Uint8Array(["a".charCodeAt(0),"v".charCodeAt(0),"c".charCodeAt(0),"1".charCodeAt(0)]);vr=new Uint8Array([0,0,0,1]);pr=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]);wr=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]);br={video:pr,audio:wr};gr=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]);dr=new Uint8Array([0,0,0,0,0,0,0,0]);nt=new Uint8Array([0,0,0,0,0,0,0,0]);nu=nt;tu=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]);iu=nt;kr=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}}();i=function(n){for(var i,r=[],u=0,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),new DataView(i.buffer,i.byteOffset,i.byteLength).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};bi=function(){return i(t.dinf,i(t.dref,gr))};ki=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]))};or=function(n){return i(t.hdlr,br[n])};er=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,255&n.duration,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]=255&n.samplerate),i(t.mdhd,r)};fr=function(n){return i(t.mdia,er(n),or(n.type),nr(n))};gi=function(n){return i(t.mfhd,new Uint8Array([0,0,0,0,(4278190080&n)>>24,(16711680&n)>>16,(65280&n)>>8,255&n]))};nr=function(n){return i(t.minf,"video"===n.type?i(t.vmhd,kr):i(t.smhd,dr),bi(),hr(n))};lt=function(n,r){for(var f=[],u=r.length;u--;)f[u]=lr(r[u]);return i.apply(null,[t.moof,gi(n)].concat(f))};at=function(n){for(var r=n.length,u=[];r--;)u[r]=rr(n[r]);return i.apply(null,[t.moov,ir(4294967295)].concat(u).concat(tr(n)))};tr=function(n){for(var r=n.length,u=[];r--;)u[r]=ar(n[r]);return i.apply(null,[t.mvex].concat(u))};ir=function(n){var r=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(4278190080&n)>>24,(16711680&n)>>16,(65280&n)>>8,255&n,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)};sr=function(n){for(var u,f=n.samples||[],e=new Uint8Array(4+f.length),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)};hr=function(n){return i(t.stbl,cr(n),i(t.stts,iu),i(t.stsc,nu),i(t.stsz,tu),i(t.stco,nt))};cr=function(n){return i(t.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),"video"===n.type?ru(n):uu(n))};ru=function(n){for(var u=n.sps||[],f=n.pps||[],e=[],o=[],r=0;r<u.length;r++)e.push((65280&u[r].byteLength)>>>8),e.push(255&u[r].byteLength),e=e.concat(Array.prototype.slice.call(u[r]));for(r=0;r<f.length;r++)o.push((65280&f[r].byteLength)>>>8),o.push(255&f[r].byteLength),o=o.concat(Array.prototype.slice.call(f[r]));return i(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,(65280&n.width)>>8,255&n.width,(65280&n.height)>>8,255&n.height,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]).concat(e).concat([f.length]).concat(o))),i(t.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])))};uu=function(n){return i(t.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(65280&n.channelcount)>>8,255&n.channelcount,(65280&n.samplesize)>>8,255&n.samplesize,0,0,0,0,(65280&n.samplerate)>>8,255&n.samplerate,0,0]),ki(n))};ur=function(n){var r=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(4278190080&n.id)>>24,(16711680&n.id)>>16,(65280&n.id)>>8,255&n.id,0,0,0,0,(4278190080&n.duration)>>24,(16711680&n.duration)>>16,(65280&n.duration)>>8,255&n.duration,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,(65280&n.width)>>8,255&n.width,0,0,(65280&n.height)>>8,255&n.height,0,0]);return i(t.tkhd,r)};lr=function(n){var e,o,f,s,r,u;return e=i(t.tfhd,new Uint8Array([0,0,0,58,(4278190080&n.id)>>24,(16711680&n.id)>>16,(65280&n.id)>>8,255&n.id,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),r=Math.floor(n.baseMediaDecodeTime/(1+ou)),u=Math.floor(n.baseMediaDecodeTime%(1+ou)),o=i(t.tfdt,new Uint8Array([1,0,0,0,r>>>24&255,r>>>16&255,r>>>8&255,255&r,u>>>24&255,u>>>16&255,u>>>8&255,255&u])),"audio"===n.type?(f=vt(n,92),i(t.traf,e,o,f)):(s=sr(n),f=vt(n,s.length+92),i(t.traf,e,o,f,s))};rr=function(n){return n.duration=n.duration||4294967295,i(t.trak,ur(n),fr(n))};ar=function(n){var r=new Uint8Array([0,0,0,0,(4278190080&n.id)>>24,(16711680&n.id)>>16,(65280&n.id)>>8,255&n.id,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return"video"!==n.type&&(r[r.length-1]=0),i(t.trex,r)};pt=function(n,t){var i=0,r=0,u=0,f=0;return n.length&&(void 0!==n[0].duration&&(i=1),void 0!==n[0].size&&(r=2),void 0!==n[0].flags&&(u=4),void 0!==n[0].compositionTimeOffset&&(f=8)),[0,0,i|r|u|f,1,(4278190080&n.length)>>>24,(16711680&n.length)>>>16,(65280&n.length)>>>8,255&n.length,(4278190080&t)>>>24,(16711680&t)>>>16,(65280&t)>>>8,255&t]};eu=function(n,r){var f,e,u,o;for(r+=20+16*(e=n.samples||[]).length,f=pt(e,r),o=0;o<e.length;o++)u=e[o],f=f.concat([(4278190080&u.duration)>>>24,(16711680&u.duration)>>>16,(65280&u.duration)>>>8,255&u.duration,(4278190080&u.size)>>>24,(16711680&u.size)>>>16,(65280&u.size)>>>8,255&u.size,u.flags.isLeading<<2|u.flags.dependsOn,u.flags.isDependedOn<<6|u.flags.hasRedundancy<<4|u.flags.paddingValue<<1|u.flags.isNonSyncSample,61440&u.flags.degradationPriority,15&u.flags.degradationPriority,(4278190080&u.compositionTimeOffset)>>>24,(16711680&u.compositionTimeOffset)>>>16,(65280&u.compositionTimeOffset)>>>8,255&u.compositionTimeOffset]);return i(t.trun,new Uint8Array(f))};fu=function(n,r){var f,e,u,o;for(r+=20+8*(e=n.samples||[]).length,f=pt(e,r),o=0;o<e.length;o++)u=e[o],f=f.concat([(4278190080&u.duration)>>>24,(16711680&u.duration)>>>16,(65280&u.duration)>>>8,255&u.duration,(4278190080&u.size)>>>24,(16711680&u.size)>>>16,(65280&u.size)>>>8,255&u.size]);return i(t.trun,new Uint8Array(f))};vt=function(n,t){return"audio"===n.type?fu(n,t):eu(n,t)};y={ftyp:di=function(){return i(t.ftyp,yt,vr,yt,yr)},mdat:function(n){return i(t.mdat,n)},moof:lt,moov:at,initSegment:function(n){var t,i=di(),r=at(n);return(t=new Uint8Array(i.byteLength+r.byteLength)).set(i),t.set(r,i.byteLength),t}};p=function(n){return n>>>0};su=function(n){return c(n,["moov","trak"]).reduce(function(n,t){var r,f,i,e,u;return(r=c(t,["tkhd"])[0])?(f=r[0],e=p(r[i=0===f?12:20]<<24|r[i+1]<<16|r[i+2]<<8|r[i+3]),(u=c(t,["mdia","mdhd"])[0])?(i=0===(f=u[0])?12:20,n[e]=p(u[i]<<24|u[i+1]<<16|u[i+2]<<8|u[i+3]),n):null):null},{})};hu=function(n,t){var r,u,i;return r=c(t,["moof","traf"]),u=[].concat.apply([],r.map(function(t){return c(t,["tfhd"]).map(function(i){var r,u;return r=p(i[4]<<24|i[5]<<16|i[6]<<8|i[7]),u=n[r]||9e4,(c(t,["tfdt"]).map(function(n){var i,t;return i=n[0],t=p(n[4]<<24|n[5]<<16|n[6]<<8|n[7]),1===i&&(t*=Math.pow(2,32),t+=p(n[8]<<24|n[9]<<16|n[10]<<8|n[11])),t})[0]||1/0)/u})})),i=Math.min.apply(null,u),isFinite(i)?i:0};cu=function(n){var i=c(n,["moov","trak"]),t=[];return i.forEach(function(n){var i=c(n,["mdia","hdlr"]),r=c(n,["tkhd"]);i.forEach(function(n,i){var u,e,o=wt(n.subarray(8,12)),f=r[i];"vide"===o&&(e=0===(u=new DataView(f.buffer,f.byteOffset,f.byteLength)).getUint8(0)?u.getUint32(12):u.getUint32(20),t.push(e))})}),t};a={findBox:c=function(n,t){var i,f,e,r,o,u=[];if(!t.length)return null;for(i=0;i<n.byteLength;)f=p(n[i]<<24|n[i+1]<<16|n[i+2]<<8|n[i+3]),e=wt(n.subarray(i+4,i+8)),r=1<f?i+f:n.byteLength,e===t[0]&&(1===t.length?u.push(n.subarray(i+8,r)):(o=c(n.subarray(i+8,r),t.slice(1))).length&&(u=u.concat(o))),i=r;return u},parseType:wt=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])},timescale:su,startTime:hu,videoTrackIds:cu};tt.prototype.pipe=function(n){return this.on("data",function(t){n.push(t)}),this.on("done",function(t){n.flush(t)}),n};tt.prototype.push=function(n){this.trigger("data",n)};tt.prototype.flush=function(n){this.trigger("done",n)};var bt,lu,au,vu,yu,f=tt,sf=function(n){for(var i,t=[],r=[],u=t.byteLength=0;u<n.length;u++)"access_unit_delimiter_rbsp"===(i=n[u]).nalUnitType?(t.length&&(t.duration=i.dts-t.dts,r.push(t)),(t=[i]).byteLength=i.data.byteLength,t.pts=i.pts,t.dts=i.dts):("slice_layer_without_partitioning_rbsp_idr"===i.nalUnitType&&(t.keyFrame=!0),t.duration=i.dts-t.dts,t.byteLength+=i.data.byteLength,t.push(i));return r.length&&(!t.duration||t.duration<=0)&&(t.duration=r[r.length-1].duration),r.push(t),r},hf=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]).keyFrame?(t.length&&(i.push(t),i.byteLength+=t.byteLength,i.nalCount+=t.nalCount,i.duration+=t.duration),(t=[r]).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},cf=function(n){var t;return!n[0][0].keyFrame&&1<n.length&&(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},lf=function(n,t){for(var f,o,e,s,r,i,h=t||0,c=[],u=0;u<n.length;u++)for(e=n[u],f=0;f<e.length;f++)s=e[f],r=s,i=void 0,(i={size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}}).dataOffset=h,i.compositionTimeOffset=r.pts-r.dts,i.duration=r.duration,i.size=4*r.length,i.size+=r.byteLength,r.keyFrame&&(i.flags.dependsOn=2,i.flags.isNonSyncSample=0),h+=(o=i).size,c.push(o);return c},af=function(n){for(var i,r,e,o,u,f=0,h=n.byteLength,c=n.nalCount,s=new Uint8Array(h+4*c),l=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],l.setUint32(f,u.data.byteLength),f+=4,s.set(u.data,f),f+=u.data.byteLength;return s},v=[33,16,5,32,164,27],kt=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],vf={96e3:[v,[227,64],r(154),[56]],88200:[v,[231],r(170),[56]],64e3:[v,[248,192],r(240),[56]],48e3:[v,[255,192],r(268),[55,148,128],r(54),[112]],44100:[v,[255,192],r(268),[55,163,128],r(84),[112]],32e3:[v,[255,192],r(268),[55,234],r(226),[112]],24e3:[v,[255,192],r(268),[55,255,128],r(268),[111,112],r(126),[224]],16e3:[v,[255,192],r(268),[55,255,128],r(268),[111,255],r(269),[223,108],r(195),[1,192]],12e3:[kt,r(268),[3,127,248],r(268),[6,255,240],r(268),[13,255,224],r(268),[27,253,128],r(259),[56]],11025:[kt,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:[kt,r(268),[3,121,16],r(47),[7]]},yf=(bt=vf,Object.keys(bt).reduce(function(n,t){return n[t]=new Uint8Array(bt[t].reduce(function(n,t){return n.concat(t)},[])),n},{})),pf=(lu=function(n){return 9e4*n},au=function(n,t){return n*t},vu=function(n){return n/9e4},yu=function(n,t){return n/t},function(n,t){return lu(yu(n,t))}),wf=function(n,t){return au(vu(n),t)},bf=function(n,t,i,r){var h,f,e,u,c=0,o=0,s=0;if(t.length&&(h=pf(n.baseMediaDecodeTime,n.samplerate),f=Math.ceil(9216e4/n.samplerate),i&&r&&(c=h-Math.max(i,r),s=(o=Math.floor(c/f))*f),!(o<1||45e3<s))){for(e=(e=yf[n.samplerate])||t[0].data,u=0;u<o;u++)t.splice(u,0,{data:e});n.baseMediaDecodeTime-=Math.floor(wf(s,n.samplerate))}},kf=function(n,t,i){return t.minSegmentDts>=i?n:(t.minSegmentDts=1/0,n.filter(function(n){return n.dts>=i&&(t.minSegmentDts=Math.min(t.minSegmentDts,n.dts),t.minSegmentPts=t.minSegmentDts,!0)}))},df=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},gf=function(n){for(var i,r=0,u=new Uint8Array(function(n){for(var i=0,t=0;t<n.length;t++)i+=n[t].data.byteLength;return i}(n)),t=0;t<n.length;t++)i=n[t],u.set(i.data,r),r+=i.data.byteLength;return u},k=function(n){delete n.minSegmentDts;delete n.maxSegmentDts;delete n.minSegmentPts;delete n.maxSegmentPts},pu=function(n,t){var i,r=n.minSegmentDts;return t||(r-=n.timelineStartInfo.dts),i=n.timelineStartInfo.baseMediaDecodeTime,i+=r,i=Math.max(0,i),"audio"===n.type&&(i*=n.samplerate/9e4,i=Math.floor(i)),i},dt=function(n,t){"number"==typeof t.pts&&(void 0===n.timelineStartInfo.pts&&(n.timelineStartInfo.pts=t.pts),n.minSegmentPts=void 0===n.minSegmentPts?t.pts:Math.min(n.minSegmentPts,t.pts),n.maxSegmentPts=void 0===n.maxSegmentPts?t.pts:Math.max(n.maxSegmentPts,t.pts));"number"==typeof t.dts&&(void 0===n.timelineStartInfo.dts&&(n.timelineStartInfo.dts=t.dts),n.minSegmentDts=void 0===n.minSegmentDts?t.dts:Math.min(n.minSegmentDts,t.dts),n.maxSegmentDts=void 0===n.maxSegmentDts?t.dts:Math.max(n.maxSegmentDts,t.dts))},ne=function(n){for(var t=0,r={payloadType:-1,payloadSize:0},u=0,i=0;t<n.byteLength&&128!==n[t];){for(;255===n[t];)u+=255,t++;for(u+=n[t++];255===n[t];)i+=255,t++;if(i+=n[t++],!r.payload&&4===u){r.payloadType=u;r.payloadSize=i;r.payload=n.subarray(t,t+i);break}t+=i;i=u=0}return r},te=function(n){return 181!==n.payload[0]?null:49!=(n.payload[1]<<8|n.payload[2])?null:"GA94"!==String.fromCharCode(n.payload[3],n.payload[4],n.payload[5],n.payload[6])?null:3!==n.payload[7]?null:n.payload.subarray(8,n.payload.length-1)},ie=function(n,t){var i,e,r,u,f=[];if(!(64&t[0]))return f;for(e=31&t[0],i=0;i<e;i++)u={type:3&t[2+(r=3*i)],pts:n},4&t[2+r]&&(u.ccData=t[3+r]<<8|t[4+r],f.push(u));return f},re=function(n){for(var r,u,f,e=n.byteLength,i=[],t=1;t<e-2;)0===n[t]&&0===n[t+1]&&3===n[t+2]?(i.push(t+2),t+=2):t++;if(0===i.length)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},ue=4;(l.prototype=new f).push=function(n){var t,i,r;if("sei_rbsp"===n.nalUnitType&&(t=ne(n.escapedRBSP)).payloadType===ue&&(i=te(t)))if(n.dts<this.latestDts_)this.ignoreNextEqualDts_=!0;else{if(n.dts===this.latestDts_&&this.ignoreNextEqualDts_)return this.numSameDts_--,void(this.numSameDts_||(this.ignoreNextEqualDts_=!1));r=ie(n.pts,i);this.captionPackets_=this.captionPackets_.concat(r);this.latestDts_!==n.dts&&(this.numSameDts_=0);this.numSameDts_++;this.latestDts_=n.dts}};l.prototype.flush=function(){this.captionPackets_.length?(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.ccStreams_.forEach(function(n){n.flush()},this)):this.ccStreams_.forEach(function(n){n.flush()},this)};l.prototype.reset=function(){this.latestDts_=null;this.ignoreNextEqualDts_=!1;this.numSameDts_=0;this.activeCea608Channel_=[null,null];this.ccStreams_.forEach(function(n){n.reset()})};l.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);null!==this.activeCea608Channel_[n.type]&&this.ccStreams_[(n.type<<1)+this.activeCea608Channel_[n.type]].push(n)};l.prototype.setsChannel1Active=function(n){return 4096==(30720&n.ccData)};l.prototype.setsChannel2Active=function(n){return 6144==(30720&n.ccData)};l.prototype.setsTextOrXDSActive=function(n){return 256==(28928&n.ccData)||4138==(30974&n.ccData)||6186==(30974&n.ccData)};var fe={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},ee=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],u=function lt(n,t){lt.prototype.init.call(this);this.field_=n||0;this.dataChannel_=t||0;this.name_="CC"+(1+(this.field_<<1|this.dataChannel_));this.setConstants();this.reset();this.push=function(n){var t,e,r,i,u,f;(t=32639&n.ccData)!==this.lastControlCode_?(4096==(61440&t)?this.lastControlCode_=t:t!==this.PADDING_&&(this.lastControlCode_=null),r=t>>>8,i=255&t,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_?"popOn"===this.mode_?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_=w()):t===this.ERASE_NON_DISPLAYED_MEMORY_?this.nonDisplayed_=w():t===this.RESUME_DIRECT_CAPTIONING_?("paintOn"!==this.mode_&&(this.flushDisplayed(n.pts),this.displayed_=w()),this.mode_="paintOn",this.startPts_=n.pts):this.isSpecialCharacter(r,i)?(u=it((r=(3&r)<<8)|i),this[this.mode_](n.pts,u),this.column_++):this.isExtCharacter(r,i)?("popOn"===this.mode_?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1),u=it((r=(3&r)<<8)|i),this[this.mode_](n.pts,u),this.column_++):this.isMidRowCode(r,i)?(this.clearFormatting(n.pts),this[this.mode_](n.pts," "),this.column_++,14==(14&i)&&this.addFormatting(n.pts,["i"]),1==(1&i)&&this.addFormatting(n.pts,["u"])):this.isOffsetControlCode(r,i)?this.column_+=3&i:this.isPAC(r,i)?(f=ee.indexOf(7968&t),"rollUp"===this.mode_&&(f-this.rollUpRows_+1<0&&(f=this.rollUpRows_-1),this.setRollUp(n.pts,f)),f!==this.row_&&(this.clearFormatting(n.pts),this.row_=f),1&i&&-1===this.formatting_.indexOf("u")&&this.addFormatting(n.pts,["u"]),16==(16&t)&&(this.column_=4*((14&t)>>1)),this.isColorPAC(i)&&14==(14&i)&&this.addFormatting(n.pts,["i"])):this.isNormalChar(r)&&(0===i&&(i=null),u=it(r),u+=it(i),this[this.mode_](n.pts,u),this.column_+=u.length)):this.lastControlCode_=null}};u.prototype=new f;u.prototype.flushDisplayed=function(n){var t=this.displayed_.map(function(n){try{return n.trim()}catch(n){return""}}).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_=w();this.nonDisplayed_=w();this.lastControlCode_=null;this.column_=0;this.row_=14;this.rollUpRows_=2;this.formatting_=[]};u.prototype.setConstants=function(){0===this.dataChannel_?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):1===this.dataChannel_&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31);this.PADDING_=0;this.RESUME_CAPTION_LOADING_=32|this.CONTROL_;this.END_OF_CAPTION_=47|this.CONTROL_;this.ROLL_UP_2_ROWS_=37|this.CONTROL_;this.ROLL_UP_3_ROWS_=38|this.CONTROL_;this.ROLL_UP_4_ROWS_=39|this.CONTROL_;this.CARRIAGE_RETURN_=45|this.CONTROL_;this.RESUME_DIRECT_CAPTIONING_=41|this.CONTROL_;this.BACKSPACE_=33|this.CONTROL_;this.ERASE_DISPLAYED_MEMORY_=44|this.CONTROL_;this.ERASE_NON_DISPLAYED_MEMORY_=46|this.CONTROL_};u.prototype.isSpecialCharacter=function(n,t){return n===this.EXT_&&48<=t&&t<=63};u.prototype.isExtCharacter=function(n,t){return(n===this.EXT_+1||n===this.EXT_+2)&&32<=t&&t<=63};u.prototype.isMidRowCode=function(n,t){return n===this.EXT_&&32<=t&&t<=47};u.prototype.isOffsetControlCode=function(n,t){return n===this.OFFSET_&&33<=t&&t<=35};u.prototype.isPAC=function(n,t){return n>=this.BASE_&&n<this.BASE_+8&&64<=t&&t<=127};u.prototype.isColorPAC=function(n){return 64<=n&&n<=79||96<=n&&n<=127};u.prototype.isNormalChar=function(n){return 32<=n&&n<=127};u.prototype.setRollUp=function(n,t){if("rollUp"!==this.mode_&&(this.row_=14,this.mode_="rollUp",this.flushDisplayed(n),this.nonDisplayed_=w(),this.displayed_=w()),void 0!==t&&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]="";void 0===t&&(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<15;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};rt={CaptionStream:l,Cea608Stream:u};e={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21};gt.prototype=new f;ku=gt;ti={TXXX:function(n){var t;if(3===n.data[0]){for(t=1;t<n.data.length;t++)if(0===n.data[t]){n.description=ut(n.data,1,t);n.value=ut(n.data,t+1,n.data.length).replace(/\0*$/,"");break}n.data=n.value}},WXXX:function(n){var t;if(3===n.data[0])for(t=1;t<n.data.length;t++)if(0===n.data[t]){n.description=ut(n.data,1,t);n.url=ut(n.data,t+1,n.data.length);break}},PRIV:function(n){for(var i,t=0;t<n.data.length;t++)if(0===n.data[t]){n.owner=(i=n.data,unescape(bu(i,0,t)));break}n.privateData=n.data.subarray(t+1);n.data=n.privateData}};(ni=function(n){var r,u={debug:!(!n||!n.debug),descriptor:n&&n.descriptor},i=0,t=[],f=0;if(ni.prototype.init.call(this),this.dispatchType=e.METADATA_STREAM_TYPE.toString(16),u.descriptor)for(r=0;r<u.descriptor.length;r++)this.dispatchType+=("00"+u.descriptor[r].toString(16)).slice(-2);this.push=function(n){var r,e,l,o,h,s,c;if("timed-metadata"===n.type)if(n.dataAlignmentIndicator&&(f=0,t.length=0),0===t.length&&(n.data.length<10||n.data[0]!=="I".charCodeAt(0)||n.data[1]!=="D".charCodeAt(0)||n.data[2]!=="3".charCodeAt(0)))u.debug;else if(t.push(n),f+=n.data.byteLength,1===t.length&&(i=ft(n.data.subarray(6,10)),i+=10),!(f<i)){for(r={data:new Uint8Array(i),frames:[],pts:t[0].pts,dts:t[0].dts},h=0;h<i;)r.data.set(t[0].data.subarray(0,i-h),h),h+=t[0].data.byteLength,f-=t[0].data.byteLength,t.shift();e=10;64&r.data[5]&&(e+=4,e+=ft(r.data.subarray(10,14)),i-=ft(r.data.subarray(16,20)));do{if((l=ft(r.data.subarray(e+4,e+8)))<1)return;((o={id:String.fromCharCode(r.data[e],r.data[e+1],r.data[e+2],r.data[e+3]),data:r.data.subarray(e+10,e+l+10)}).key=o.id,ti[o.id]&&(ti[o.id](o),"com.apple.streaming.transportStreamTimestamp"===o.owner))&&(s=o.data,c=(1&s[3])<<30|s[4]<<22|s[5]<<14|s[6]<<6|s[7]>>>2,c*=4,c+=3&s[7],o.timeStamp=c,void 0===r.pts&&void 0===r.dts&&(r.pts=o.timeStamp,r.dts=o.timeStamp),this.trigger("timestamp",o));r.frames.push(o);e+=10;e+=l}while(e<i);this.trigger("data",r)}}}).prototype=new f;du=ni;gu=ku;(ii=function(){var t=new Uint8Array(188),n=0;ii.prototype.init.call(this);this.push=function(i){var r,u=0,f=188;for(n?((r=new Uint8Array(i.byteLength+n)).set(t.subarray(0,n)),r.set(i,n),n=0):r=i;f<r.byteLength;)71!==r[u]||71!==r[f]?(u++,f++):(this.trigger("data",r.subarray(u,f)),u+=188,f+=188);u<r.byteLength&&(t.set(r.subarray(u),0),n=r.byteLength-u)};this.flush=function(){188===n&&71===t[0]&&(this.trigger("data",t),n=0);this.trigger("done")}}).prototype=new f;(et=function(){var t,i,r,n;et.prototype.init.call(this);(n=this).packetsWaitingForPmt=[];this.programMapTable=void 0;t=function(n,t){var u=0;t.payloadUnitStartIndicator&&(u+=n[u]+1);"pat"===t.type?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=(31&t[10])<<8|t[11];i.pmtPid=n.pmtPid};r=function(t,i){var o,r,u,f;if(1&t[5]){for(n.programMapTable={video:null,audio:null,"timed-metadata":{}},o=3+((15&t[1])<<8|t[2])-4,r=12+((15&t[10])<<8|t[11]);r<o;)u=t[r],f=(31&t[r+1])<<8|t[r+2],u===e.H264_STREAM_TYPE&&null===n.programMapTable.video?n.programMapTable.video=f:u===e.ADTS_STREAM_TYPE&&null===n.programMapTable.audio?n.programMapTable.audio=f:u===e.METADATA_STREAM_TYPE&&(n.programMapTable["timed-metadata"][f]=u),r+=5+((15&t[r+3])<<8|t[r+4]);i.programMapTable=n.programMapTable}};this.push=function(n){var i={},r=4;if(i.payloadUnitStartIndicator=!!(64&n[1]),i.pid=31&n[1],i.pid<<=8,i.pid|=n[2],1<(48&n[3])>>>4&&(r+=n[r]+1),0===i.pid)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 void 0===this.programMapTable?this.packetsWaitingForPmt.push([n,r,i]):this.processPes_(n,r,i)};this.processPes_=function(n,t,i){i.streamType=i.pid===this.programMapTable.video?e.H264_STREAM_TYPE:i.pid===this.programMapTable.audio?e.ADTS_STREAM_TYPE:this.programMapTable["timed-metadata"][i.pid];i.type="pes";i.data=n.subarray(t);this.trigger("data",i)}}).prototype=new f;et.STREAM_TYPES={h264:27,adts:15};(ri=function(){function n(n,i,r){var e,o,s=new Uint8Array(n.size),u={type:i},f=0,h=0;if(n.data.length&&!(n.size<9)){for(u.trackId=n.data[0].pid,f=0;f<n.data.length;f++)o=n.data[f],s.set(o.data,h),h+=o.data.byteLength;!function(n,t){var i;t.packetLength=6+(n[4]<<8|n[5]);t.dataAlignmentIndicator=0!=(4&n[6]);192&(i=n[7])&&(t.pts=(14&n[9])<<27|(255&n[10])<<20|(254&n[11])<<12|(255&n[12])<<5|(254&n[13])>>>3,t.pts*=4,t.pts+=(6&n[13])>>>1,t.dts=t.pts,64&i&&(t.dts=(14&n[14])<<27|(255&n[15])<<20|(254&n[16])<<12|(255&n[17])<<5|(254&n[18])>>>3,t.dts*=4,t.dts+=(6&n[18])>>>1));t.data=n.subarray(9+n[8])}(s,u);e="video"===i||u.packetLength<=n.size;(r||e)&&(n.size=0,n.data.length=0);e&&t.trigger("data",u)}}var t=this,i={data:[],size:0},r={data:[],size:0},u={data:[],size:0};ri.prototype.init.call(this);this.push=function(f){({pat:function(){},pes:function(){var t,o;switch(f.streamType){case e.H264_STREAM_TYPE:case e.H264_STREAM_TYPE:t=i;o="video";break;case e.ADTS_STREAM_TYPE:t=r;o="audio";break;case e.METADATA_STREAM_TYPE:t=u;o="timed-metadata";break;default:return}f.payloadUnitStartIndicator&&n(t,o,!0);t.data.push(f);t.size+=f.data.byteLength},pmt:function(){var i={type:"metadata",tracks:[]},n=f.programMapTable;null!==n.video&&i.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+n.video,codec:"avc",type:"video"});null!==n.audio&&i.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+n.audio,codec:"adts",type:"audio"});t.trigger("data",i)}})[f.type]()};this.flush=function(){n(i,"video");n(r,"audio");n(u,"timed-metadata");this.trigger("done")}}).prototype=new f;ui={PAT_PID:0,MP2T_PACKET_LENGTH:188,TransportPacketStream:ii,TransportParseStream:et,ElementaryStream:ri,TimestampRolloverStream:gu,CaptionStream:rt.CaptionStream,Cea608Stream:rt.Cea608Stream,MetadataStream:du};for(ot in e)e.hasOwnProperty(ot)&&(ui[ot]=e[ot]);s=ui;ei=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];(fi=function(){var n;fi.prototype.init.call(this);this.push=function(t){var o,s,r,u,h,f,i=0,e=0;if("audio"===t.type)for(n?(u=n,(n=new Uint8Array(u.byteLength+t.data.byteLength)).set(u),n.set(t.data,u.byteLength)):n=t.data;i+5<n.length;)if(255===n[i]&&240==(246&n[i+1])){if(s=2*(1&~n[i+1]),o=(3&n[i+3])<<11|n[i+4]<<3|(224&n[i+5])>>5,f=9e4*(h=1024*(1+(3&n[i+6])))/ei[(60&n[i+2])>>>2],r=i+o,n.byteLength<r)return;if(this.trigger("data",{pts:t.pts+e*f,dts:t.dts+e*f,sampleCount:h,audioobjecttype:1+(n[i+2]>>>6&3),channelcount:(1&n[i+2])<<2|(192&n[i+3])>>>6,samplerate:ei[(60&n[i+2])>>>2],samplingfrequencyindex:(60&n[i+2])>>>2,samplesize:16,data:n.subarray(i+7+s,r)}),n.byteLength===r)return void(n=void 0);e++;n=n.subarray(r)}else i++};this.flush=function(){this.trigger("done")}}).prototype=new f;si=fi;tf=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(0===u)throw new Error("no bytes available");e.set(n.subarray(f,f+u));r=new DataView(e.buffer).getUint32(0);t=8*u;i-=u};this.skipBits=function(n){var u;n<t||(n-=t,n-=8*(u=Math.floor(n/8)),i-=u,this.loadWord());r<<=n;t-=n};this.readBits=function(n){var u=Math.min(t,n),f=r>>>32-u;return 0<(t-=u)?r<<=u:0<i&&this.loadWord(),0<(u=n-u)?f<<u|this.readBits(u):f};this.skipLeadingZeros=function(){for(var n=0;n<t;++n)if(0!=(r&2147483648>>>n))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 1===this.readBits(1)};this.readUnsignedByte=function(){return this.readBits(8)};this.loadWord()};(st=function(){var t,n,i=0;st.prototype.init.call(this);this.push=function(r){var u;for(n=n?((u=new Uint8Array(n.byteLength+r.data.byteLength)).set(n),u.set(r.data,n.byteLength),u):r.data;i<n.byteLength-3;i++)if(1===n[i+2]){t=i+5;break}for(;t<n.byteLength;)switch(n[t]){case 0:if(0!==n[t-1]){t+=2;break}if(0!==n[t-2]){t++;break}for(i+3!==t-2&&this.trigger("data",n.subarray(i+3,t-2));1!==n[++t]&&t<n.length;);i=t-2;t+=3;break;case 1:if(0!==n[t-1]||0!==n[t-2]){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.flush=function(){n&&3<n.byteLength&&this.trigger("data",n.subarray(i+3));n=null;i=0;this.trigger("done")}}).prototype=new f;nf={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0};(oi=function(){var t,r,u,f,i,e,o,n=new st;oi.prototype.init.call(this);(t=this).push=function(t){"video"===t.type&&(r=t.trackId,u=t.pts,f=t.dts,n.push(t))};n.on("data",function(n){var o={trackId:r,pts:u,dts:f,data:n};switch(31&n[0]){case 5:o.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:o.nalUnitType="sei_rbsp";o.escapedRBSP=i(n.subarray(1));break;case 7:o.nalUnitType="seq_parameter_set_rbsp";o.escapedRBSP=i(n.subarray(1));o.config=e(o.escapedRBSP);break;case 8:o.nalUnitType="pic_parameter_set_rbsp";break;case 9:o.nalUnitType="access_unit_delimiter_rbsp"}t.trigger("data",o)});n.on("done",function(){t.trigger("done")});this.flush=function(){n.flush()};o=function(n,t){for(var u=8,i=8,r=0;r<n;r++)0!==i&&(i=(u+t.readExpGolomb()+256)%256),u=0===i?u:i};i=function(n){for(var r,u,f,e=n.byteLength,i=[],t=1;t<e-2;)0===n[t]&&0===n[t+1]&&3===n[t+2]?(i.push(t+2),t+=2):t++;if(0===i.length)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};e=function(n){var t,u,f,e,s,h,c,l,a,v,y,i,r,p=0,w=0,b=0,k=0,d=1;if(u=(t=new tf(n)).readUnsignedByte(),e=t.readUnsignedByte(),f=t.readUnsignedByte(),t.skipUnsignedExpGolomb(),nf[u]&&(3===(s=t.readUnsignedExpGolomb())&&t.skipBits(1),t.skipUnsignedExpGolomb(),t.skipUnsignedExpGolomb(),t.skipBits(1),t.readBoolean()))for(y=3!==s?8:12,r=0;r<y;r++)t.readBoolean()&&o(r<6?16:64,t);if(t.skipUnsignedExpGolomb(),0===(h=t.readUnsignedExpGolomb()))t.readUnsignedExpGolomb();else if(1===h)for(t.skipBits(1),t.skipExpGolomb(),t.skipExpGolomb(),c=t.readUnsignedExpGolomb(),r=0;r<c;r++)t.skipExpGolomb();if(t.skipUnsignedExpGolomb(),t.skipBits(1),l=t.readUnsignedExpGolomb(),a=t.readUnsignedExpGolomb(),0===(v=t.readBits(1))&&t.skipBits(1),t.skipBits(1),t.readBoolean()&&(p=t.readUnsignedExpGolomb(),w=t.readUnsignedExpGolomb(),b=t.readUnsignedExpGolomb(),k=t.readUnsignedExpGolomb()),t.readBoolean()&&t.readBoolean()){switch(t.readUnsignedByte()){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&&(d=i[0]/i[1])}return{profileIdc:u,levelIdc:f,profileCompatibility:e,width:Math.ceil((16*(l+1)-2*p-2*w)*d),height:(2-v)*(a+1)*16-2*b-2*k}}}).prototype=new f;var hi,oe={H264Stream:oi,NalByteStream:st},se=function(n){return n[0]==="I".charCodeAt(0)&&n[1]==="D".charCodeAt(0)&&n[2]==="3".charCodeAt(0)},he=function(n,t){var i=n[t+6]<<21|n[t+7]<<14|n[t+8]<<7|n[t+9];return(16&n[t+5])>>4?20+i:10+i},ce=function(n,t){var i=(224&n[t+5])>>5,r=n[t+4]<<3;return 6144&n[t+3]|r|i};(hi=function(){var n=new Uint8Array,t=0;hi.prototype.init.call(this);this.setTimestamp=function(n){t=n};this.push=function(i){var e,o,s,f,u=0,r=0;for(n.length?(f=n.length,(n=new Uint8Array(i.byteLength+f)).set(n.subarray(0,f)),n.set(i,f)):n=i;3<=n.length-r;)if(n[r]!=="I".charCodeAt(0)||n[r+1]!=="D".charCodeAt(0)||n[r+2]!=="3".charCodeAt(0))if(255!=(255&n[r])||240!=(240&n[r+1]))r++;else{if(n.length-r<7)break;if(r+(u=ce(n,r))>n.length)break;s={type:"audio",data:n.subarray(r,r+u),pts:t,dts:t};this.trigger("data",s);r+=u}else{if(n.length-r<10)break;if(r+(u=he(n,r))>n.length)break;o={type:"timed-metadata",data:n.subarray(r,r+u)};this.trigger("data",o);r+=u}e=n.length-r;n=0<e?n.subarray(r):new Uint8Array}}).prototype=new f;var ht,d,ci,g,le=hi,ae=oe.H264Stream,ve=se,li=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],ai=["width","height","profileIdc","levelIdc","profileCompatibility"];(d=function(n,t){var i=[],r=0,u=0,f=0,e=1/0;t=t||{};d.prototype.init.call(this);this.push=function(t){dt(n,t);n&&li.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,s,c,h;0!==i.length&&(o=kf(i,n,u),n.baseMediaDecodeTime=pu(n,t.keepOriginalTimestamps),bf(n,o,f,e),n.samples=df(o),c=y.mdat(gf(o)),i=[],s=y.moof(r,[n]),h=new Uint8Array(s.byteLength+c.byteLength),r++,h.set(s),h.set(c,s.byteLength),k(n),this.trigger("data",{track:n,boxes:h}));this.trigger("done","AudioSegmentStream")}}).prototype=new f;(ht=function(n,t){var u,f,e=0,i=[],r=[];t=t||{};ht.prototype.init.call(this);delete n.minPTS;this.gopCache_=[];this.push=function(t){dt(n,t);"seq_parameter_set_rbsp"!==t.nalUnitType||u||(u=t.config,n.sps=[t.data],ai.forEach(function(t){n[t]=u[t]},this));"pic_parameter_set_rbsp"!==t.nalUnitType||f||(f=t.data,n.pps=[t.data]);i.push(t)};this.flush=function(){for(var v,f,u,s,c,h,l,o,p,a=0;i.length&&"access_unit_delimiter_rbsp"!==i[0].nalUnitType;)i.shift();if(0===i.length)return this.resetStream_(),void this.trigger("done","VideoSegmentStream");if(v=sf(i),(u=hf(v))[0][0].keyFrame||((f=this.getGopForFusion_(i[0],n))?(a=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=cf(u)),r.length){if(!(p=t.alignGopsAtEnd?this.alignGopsAtEnd_(u):this.alignGopsAtStart_(u)))return this.gopCache_.unshift({gop:u.pop(),pps:n.pps,sps:n.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),i=[],this.resetStream_(),void this.trigger("done","VideoSegmentStream");k(n);u=p}dt(n,u);n.samples=lf(u);c=y.mdat(af(u));n.baseMediaDecodeTime=pu(n,t.keepOriginalTimestamps);this.trigger("processedGopsInfo",u.map(function(n){return{pts:n.pts,dts:n.dts,byteLength:n.byteLength}}));l=u[0];o=u[u.length-1];this.trigger("segmentTimingInfo",uf(n.baseMediaDecodeTime,l.dts,l.pts,o.dts+o.duration,o.pts+o.duration,a));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);s=y.moof(e,[n]);h=new Uint8Array(s.byteLength+c.byteLength);e++;h.set(s);h.set(c,s.byteLength);this.trigger("data",{track:n,boxes:h});this.resetStream_();this.trigger("done","VideoSegmentStream")};this.resetStream_=function(){k(n);f=u=void 0};this.getGopForFusion_=function(t){for(var i,r,u,f,o=1/0,e=0;e<this.gopCache_.length;e++)u=(f=this.gopCache_[e]).gop,n.pps&&rf(n.pps[0],f.pps[0])&&n.sps&&rf(n.sps[0],f.sps[0])&&(u.dts<n.timelineStartInfo.dts||-1e4<=(i=t.dts-u.dts-u.duration)&&i<=45e3&&(!r||i<o)&&(r=f,o=i));return r?r.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&&(e=r[f],u=n[i],e.pts!==u.pts);)u.pts>e.pts?f++:(i++,o-=u.byteLength,s-=u.nalCount,h-=u.duration);return 0===i?n:i===n.length?null:((t=n.slice(i)).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;0<=u&&0<=i;){if(s=r[u],h=n[i],s.pts===h.pts){e=!0;break}s.pts>h.pts?u--:(u===r.length-1&&(f=i),i--)}return!e&&null===f?null:0===(c=e?i:f)?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}}).prototype=new f;(g=function(n,t){this.numberOfTracks=0;this.metadataStream=t;this.remuxTracks="undefined"!=typeof(n=n||{}).remux?!!n.remux:!0;"boolean"==typeof n.keepOriginalTimestamps&&(this.keepOriginalTimestamps=n.keepOriginalTimestamps);this.pendingTracks=[];this.videoTrack=null;this.pendingBoxes=[];this.pendingCaptions=[];this.pendingMetadata=[];this.pendingBytes=0;this.emittedTracks=0;g.prototype.init.call(this);this.push=function(n){return n.text?this.pendingCaptions.push(n):n.frames?this.pendingMetadata.push(n):(this.pendingTracks.push(n.track),this.pendingBoxes.push(n.boxes),this.pendingBytes+=n.boxes.byteLength,"video"===n.track.type&&(this.videoTrack=n.track),void("audio"===n.track.type&&(this.audioTrack=n.track)))}}).prototype=new f;g.prototype.flush=function(n){var r,u,e,t,o=0,i={captions:[],captionStreams:{},metadata:[],info:{}},f=0;if(this.pendingTracks.length<this.numberOfTracks){if("VideoSegmentStream"!==n&&"AudioSegmentStream"!==n)return;if(this.remuxTracks)return;if(0===this.pendingTracks.length)return this.emittedTracks++,void(this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0))}for(this.videoTrack?(f=this.videoTrack.timelineStartInfo.pts,ai.forEach(function(n){i.info[n]=this.videoTrack[n]},this)):this.audioTrack&&(f=this.audioTrack.timelineStartInfo.pts,li.forEach(function(n){i.info[n]=this.audioTrack[n]},this)),i.type=1===this.pendingTracks.length?this.pendingTracks[0].type:"combined",this.emittedTracks+=this.pendingTracks.length,e=y.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]).startTime=r.startPts,this.keepOriginalTimestamps||(r.startTime-=f),r.startTime/=9e4,r.endTime=r.endPts,this.keepOriginalTimestamps||(r.endTime-=f),r.endTime/=9e4,i.captionStreams[r.stream]=!0,i.captions.push(r);for(t=0;t<this.pendingMetadata.length;t++)(u=this.pendingMetadata[t]).cueTime=u.pts,this.keepOriginalTimestamps||(u.cueTime-=f),u.cueTime/=9e4,i.metadata.push(u);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);this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)};(ci=function(n){var i,t,r=this,u=!0;ci.prototype.init.call(this);n=n||{};this.baseMediaDecodeTime=n.baseMediaDecodeTime||0;this.transmuxPipeline_={};this.setupAacPipeline=function(){var i={};(this.transmuxPipeline_=i).type="aac";i.metadataStream=new s.MetadataStream;i.aacStream=new le;i.audioTimestampRolloverStream=new s.TimestampRolloverStream("audio");i.timedMetadataTimestampRolloverStream=new s.TimestampRolloverStream("timed-metadata");i.adtsStream=new si;i.coalesceStream=new g(n,i.metadataStream);i.headOfPipeline=i.aacStream;i.aacStream.pipe(i.audioTimestampRolloverStream).pipe(i.adtsStream);i.aacStream.pipe(i.timedMetadataTimestampRolloverStream).pipe(i.metadataStream).pipe(i.coalesceStream);i.metadataStream.on("timestamp",function(n){i.aacStream.setTimestamp(n.timeStamp)});i.aacStream.on("data",function(u){"timed-metadata"!==u.type||i.audioSegmentStream||(t=t||{timelineStartInfo:{baseMediaDecodeTime:r.baseMediaDecodeTime},codec:"adts",type:"audio"},i.coalesceStream.numberOfTracks++,i.audioSegmentStream=new d(t,n),i.adtsStream.pipe(i.audioSegmentStream).pipe(i.coalesceStream))});i.coalesceStream.on("data",this.trigger.bind(this,"data"));i.coalesceStream.on("done",this.trigger.bind(this,"done"))};this.setupTsPipeline=function(){var u={};(this.transmuxPipeline_=u).type="ts";u.metadataStream=new s.MetadataStream;u.packetStream=new s.TransportPacketStream;u.parseStream=new s.TransportParseStream;u.elementaryStream=new s.ElementaryStream;u.videoTimestampRolloverStream=new s.TimestampRolloverStream("video");u.audioTimestampRolloverStream=new s.TimestampRolloverStream("audio");u.timedMetadataTimestampRolloverStream=new s.TimestampRolloverStream("timed-metadata");u.adtsStream=new si;u.h264Stream=new ae;u.captionStream=new s.CaptionStream;u.coalesceStream=new g(n,u.metadataStream);u.headOfPipeline=u.packetStream;u.packetStream.pipe(u.parseStream).pipe(u.elementaryStream);u.elementaryStream.pipe(u.videoTimestampRolloverStream).pipe(u.h264Stream);u.elementaryStream.pipe(u.audioTimestampRolloverStream).pipe(u.adtsStream);u.elementaryStream.pipe(u.timedMetadataTimestampRolloverStream).pipe(u.metadataStream).pipe(u.coalesceStream);u.h264Stream.pipe(u.captionStream).pipe(u.coalesceStream);u.elementaryStream.on("data",function(f){var e;if("metadata"===f.type){for(e=f.tracks.length;e--;)i||"video"!==f.tracks[e].type?t||"audio"!==f.tracks[e].type||((t=f.tracks[e]).timelineStartInfo.baseMediaDecodeTime=r.baseMediaDecodeTime):(i=f.tracks[e]).timelineStartInfo.baseMediaDecodeTime=r.baseMediaDecodeTime;i&&!u.videoSegmentStream&&(u.coalesceStream.numberOfTracks++,u.videoSegmentStream=new ht(i,n),u.videoSegmentStream.on("timelineStartInfo",function(n){t&&(t.timelineStartInfo=n,u.audioSegmentStream.setEarliestDts(n.dts))}),u.videoSegmentStream.on("processedGopsInfo",r.trigger.bind(r,"gopInfo")),u.videoSegmentStream.on("segmentTimingInfo",r.trigger.bind(r,"videoSegmentTimingInfo")),u.videoSegmentStream.on("baseMediaDecodeTime",function(n){t&&u.audioSegmentStream.setVideoBaseMediaDecodeTime(n)}),u.h264Stream.pipe(u.videoSegmentStream).pipe(u.coalesceStream));t&&!u.audioSegmentStream&&(u.coalesceStream.numberOfTracks++,u.audioSegmentStream=new d(t,n),u.adtsStream.pipe(u.audioSegmentStream).pipe(u.coalesceStream))}});u.coalesceStream.on("data",this.trigger.bind(this,"data"));u.coalesceStream.on("done",this.trigger.bind(this,"done"))};this.setBaseMediaDecodeTime=function(r){var u=this.transmuxPipeline_;n.keepOriginalTimestamps||(this.baseMediaDecodeTime=r);t&&(t.timelineStartInfo.dts=void 0,t.timelineStartInfo.pts=void 0,k(t),n.keepOriginalTimestamps||(t.timelineStartInfo.baseMediaDecodeTime=r),u.audioTimestampRolloverStream&&u.audioTimestampRolloverStream.discontinuity());i&&(u.videoSegmentStream&&(u.videoSegmentStream.gopCache_=[],u.videoTimestampRolloverStream.discontinuity()),i.timelineStartInfo.dts=void 0,i.timelineStartInfo.pts=void 0,k(i),u.captionStream.reset(),n.keepOriginalTimestamps||(i.timelineStartInfo.baseMediaDecodeTime=r));u.timedMetadataTimestampRolloverStream&&u.timedMetadataTimestampRolloverStream.discontinuity()};this.setAudioAppendStart=function(n){t&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(n)};this.alignGopsWith=function(n){i&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(n)};this.push=function(n){if(u){var t=ve(n);t&&"aac"!==this.transmuxPipeline_.type?this.setupAacPipeline():t||"ts"===this.transmuxPipeline_.type||this.setupTsPipeline();u=!1}this.transmuxPipeline_.headOfPipeline.push(n)};this.flush=function(){u=!0;this.transmuxPipeline_.headOfPipeline.flush()};this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}}).prototype=new f;var o,ef,vi={Transmuxer:ci,VideoSegmentStream:ht,AudioSegmentStream:d,AUDIO_PROPERTIES:li,VIDEO_PROPERTIES:ai,generateVideoSegmentTimingInfo:uf},ct=a.parseType,b={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:o(n.subarray(78,n.byteLength))}},avcC:function(n){for(var f,i,e=new DataView(n.buffer,n.byteOffset,n.byteLength),u={configurationVersion:n[0],avcProfileIndication:n[1],profileCompatibility:n[2],avcLevelIndication:n[3],lengthSizeMinusOne:3&n[4],sps:[],pps:[]},o=31&n[5],t=6,r=0;r<o;r++)i=e.getUint16(t),t+=2,u.sps.push(new Uint8Array(n.subarray(t,t+i))),t+=i;for(f=n[t],t++,r=0;r<f;r++)i=e.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:31&n[8],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:(7&n[26])<<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:ct(n.subarray(0,4)),minorVersion:r.getUint32(4),compatibleBrands:[]},t=8;t<n.byteLength;)i.compatibleBrands.push(ct(n.subarray(t,t+4))),t+=4;return i},dinf:function(n){return{boxes:o(n)}},dref:function(n){return{version:n[0],flags:new Uint8Array(n.subarray(1,4)),dataReferences:o(n.subarray(8))}},hdlr:function(n){for(var i={version:new DataView(n.buffer,n.byteOffset,n.byteLength).getUint8(0),flags:new Uint8Array(n.subarray(1,4)),handlerType:ct(n.subarray(8,12)),name:""},t=8,t=24;t<n.byteLength;t++){if(0===n[t]){t++;break}i.name+=String.fromCharCode(n[t])}return i.name=decodeURIComponent(escape(i.name)),i},mdat:function(n){return{byteLength:n.byteLength,nals:function(n){for(var r,u=new DataView(n.buffer,n.byteOffset,n.byteLength),t=[],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>");else switch(31&n[i]){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}(n)}},mdhd:function(n){var u,r=new DataView(n.buffer,n.byteOffset,n.byteLength),t=4,i={version:r.getUint8(0),flags:new Uint8Array(n.subarray(1,4)),language:""};return 1===i.version?(t+=4,i.creationTime=h(r.getUint32(t)),t+=8,i.modificationTime=h(r.getUint32(t)),t+=4,i.timescale=r.getUint32(t),t+=8):(i.creationTime=h(r.getUint32(t)),t+=4,i.modificationTime=h(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(96+(u>>10)),i.language+=String.fromCharCode(96+((992&u)>>5)),i.language+=String.fromCharCode(96+(31&u)),i},mdia:function(n){return{boxes:o(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:o(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 28<n.byteLength&&(i.streamDescriptor=o(n.subarray(28))[0]),i},moof:function(n){return{boxes:o(n)}},moov:function(n){return{boxes:o(n)}},mvex:function(n){return{boxes:o(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 1===r.version?(t+=4,r.creationTime=h(i.getUint32(t)),t+=8,r.modificationTime=h(i.getUint32(t)),t+=4,r.timescale=i.getUint32(t),t+=8):(r.creationTime=h(i.getUint32(t)),t+=4,r.modificationTime=h(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:(48&n[t])>>4,isDependedOn:(12&n[t])>>2,hasRedundancy:3&n[t]});return i},sidx:function(n){for(var i=new DataView(n.buffer,n.byteOffset,n.byteLength),r={version:n[0],flags:new Uint8Array(n.subarray(1,4)),references:[],referenceId:i.getUint32(4),timescale:i.getUint32(8),earliestPresentationTime:i.getUint32(12),firstOffset:i.getUint32(16)},u=i.getUint16(22),t=24;u;t+=12,u--)r.references.push({referenceType:(128&n[t])>>>7,referencedSize:2147483647&i.getUint32(t),subsegmentDuration:i.getUint32(t+4),startsWithSap:!!(128&n[t+8]),sapType:(112&n[t+8])>>>4,sapDeltaTime:268435455&i.getUint32(t+8)});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:o(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:o(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 b.ftyp(n)},tfdt:function(n){var t={version:n[0],flags:new Uint8Array(n.subarray(1,4)),baseMediaDecodeTime:n[4]<<24|n[5]<<16|n[6]<<8|n[7]};return 1===t.version&&(t.baseMediaDecodeTime*=Math.pow(2,32),t.baseMediaDecodeTime+=n[8]<<24|n[9]<<16|n[10]<<8|n[11]),t},tfhd:function(n){var i,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=1&t.flags[2],f=2&t.flags[2],e=8&t.flags[2],o=16&t.flags[2],s=32&t.flags[2],h=65536&t.flags[0],c=131072&t.flags[0];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 1===r.version?(t+=4,r.creationTime=h(i.getUint32(t)),t+=8,r.modificationTime=h(i.getUint32(t)),t+=4,r.trackId=i.getUint32(t),t+=4,t+=8):(r.creationTime=h(i.getUint32(t)),t+=4,r.modificationTime=h(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:o(n)}},trak:function(n){return{boxes:o(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:3&n[20],sampleIsDependedOn:(192&n[21])>>6,sampleHasRedundancy:(48&n[21])>>4,samplePaddingValue:(14&n[21])>>1,sampleIsDifferenceSample:!!(1&n[21]),sampleDegradationPriority:t.getUint16(22)}},trun:function(n){var i,r={version:n[0],flags:new Uint8Array(n.subarray(1,4)),samples:[]},u=new DataView(n.buffer,n.byteOffset,n.byteLength),h=1&r.flags[2],c=4&r.flags[2],e=1&r.flags[1],o=2&r.flags[1],l=4&r.flags[1],s=8&r.flags[1],f=u.getUint32(4),t=8;for(h&&(r.dataOffset=u.getInt32(t),t+=4),c&&f&&(i={flags:ff(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=ff(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)])}}},yi={inspect:o=function(n){for(var o,i,u,f,e,t=0,s=[],h=new ArrayBuffer(n.length),c=new Uint8Array(h),r=0;r<n.length;++r)c[r]=n[r];for(o=new DataView(h);t<n.byteLength;)i=o.getUint32(t),u=ct(n.subarray(t+4,t+8)),f=1<i?t+i:n.byteLength,(e=(b[u]||function(n){return{data:n}})(n.subarray(t+8,f))).size=i,e.type=u,s.push(e),t=f;return s},textify:ef=function(n,t){var i;return t=t||0,i=new Array(2*t+1).join(" "),n.map(function(n){return i+n.type+"\n"+Object.keys(n).filter(function(n){return"type"!==n&&"boxes"!==n}).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?1===u.length?f+"<"+u.join("").slice(1)+">":f+"<\n"+u.map(function(n){return i+"  "+n}).join("\n")+"\n"+i+"  >":f+"<>"):f+JSON.stringify(r,null,2).split("\n").map(function(n,t){return 0===t?n:i+"  "+n}).join("\n")}).join("\n")+(n.boxes?"\n"+ef(n.boxes,t+1):"")}).join("\n")},parseTfdt:b.tfdt,parseHdlr:b.hdlr,parseTfhd:b.tfhd,parseTrun:b.trun,parseSidx:b.sidx},we=re,be=rt.CaptionStream,ke={generator:y,probe:a,Transmuxer:vi.Transmuxer,AudioSegmentStream:vi.AudioSegmentStream,VideoSegmentStream:vi.VideoSegmentStream,CaptionParser:function(){var r,u,n,t,i,f=!1;this.isInitialized=function(){return f};this.init=function(){r=new be;f=!0;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&&0===i.length||r&&"object"==typeof r&&0===Object.keys(r).length)&&(n!==i[0]||t!==r[n])};this.parse=function(r,f,e){var o,s;if(!this.isInitialized()||!f||!e)return null;if(this.isNewInit(f,e))n=f[0],t=e[n];else if(!n||!t)return u.push(r),null;for(;0<u.length;)s=u.shift(),this.parse(s,f,e);return null!==(o=function(n,t,i){return t?{seiNals:pe(n,t)[t],timescale:i}:null}(r,n,t))&&o.seiNals?(this.pushNals(o.seiNals),this.flushStream(),i):null};this.pushNals=function(n){if(!this.isInitialized()||!n||0===n.length)return null;n.forEach(function(n){r.push(n)})};this.flushStream=function(){if(!this.isInitialized())return null;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=[];t=n=null;i?this.clearParsedCaptions():i={captions:[],captionStreams:{}};this.resetCaptionStream()};this.reset()}};pi=(function(n,t,i){return t&&of(n.prototype,t),i&&of(n,i),n}(wi,[{key:"init",value:function(){this.transmuxer&&this.transmuxer.dispose();this.transmuxer=new ke.Transmuxer(this.options),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])});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})})}(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(9e4*t))}},{key:"setAudioAppendStart",value:function(n){this.transmuxer.setAudioAppendStart(Math.ceil(9e4*n.appendStart))}},{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())}}]),wi),new function(n){n.onmessage=function(t){"init"===t.data.action&&t.data.options?this.messageHandlers=new pi(n,t.data.options):(this.messageHandlers||(this.messageHandlers=new pi(n)),t.data&&t.data.action&&"init"!==t.data.action&&this.messageHandlers[t.data.action]&&this.messageHandlers[t.data.action](t.data))}}(n)}()}),iot={videoCodec:"avc1",videoObjectTypeIndicator:".4d400d",audioProfile:"2"},ayt=(ki(hf,i.EventTarget),oi(hf,[{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),function(n,t,i){var u=t.player_,r,f;if(i.captions&&i.captions.length)for(r in n.inbandTextTracks_||(n.inbandTextTracks_={}),i.captionStreams)n.inbandTextTracks_[r]||(u.tech_.trigger({type:"usage",name:"hls-608"}),f=u.textTracks().getTrackById(r),n.inbandTextTracks_[r]=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)}(this,this.mediaSource_,t);this.pendingBuffers_.push(t)}},{key:"done_",value:function(){"closed"!==this.mediaSource_.readyState?this.processPendingSegments_():this.pendingBuffers_.length=0}},{key:"videoSegmentTimingInfo_",value:function(n){var t={start:{decode:n.start.dts/9e4,presentation:n.start.pts/9e4},end:{decode:n.end.dts/9e4,presentation:n.end.pts/9e4},baseMediaDecodeTime:n.baseMediaDecodeTime/9e4};n.prependedContentDuration&&(t.prependedContentDuration=n.prependedContentDuration/9e4);this.trigger({type:"videoSegmentTimingInfo",videoSegmentTimingInfo:t})}},{key:"createRealSourceBuffers_",value:function(){var n=this,t=["audio","video"];t.forEach(function(i){var r,u;n[i+"Codec_"]&&!n[i+"Buffer_"]&&(r=null,n.mediaSource_[i+"Buffer_"]?(r=n.mediaSource_[i+"Buffer_"]).updating=!1:(u=i+'/mp4;codecs="'+n[i+"Codec_"]+'"',r=function(n,t){function f(n){"function"==typeof i[n]?r[n]=function(){return i[n].apply(i,arguments)}:"undefined"==typeof r[n]&&Object.defineProperty(r,n,{get:function(){return i[n]},set:function(t){return i[n]=t}})}var i=n.addSourceBuffer(t),r=Object.create(null),u;for(u in r.updating=!1,r.realBuffer_=i)f(u);return r}(n.mediaSource_.nativeMediaSource_,u),n.mediaSource_[i+"Buffer_"]=r),n[i+"Buffer_"]=r,["update","updatestart","updateend"].forEach(function(u){r.addEventListener(u,function(){if("audio"!==i||!n.audioDisabled_)return"updateend"===u&&(n[i+"Buffer_"].updating=!1),t.every(function(t){return!("audio"!==t||!n.audioDisabled_)||i===t||!n[t+"Buffer_"]||!n[t+"Buffer_"].updating})?n.trigger(u):void 0})}))})}},{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:function(n,t,i){if("undefined"==typeof t||null===t||!n.length)return[];for(var u=Math.ceil(9e4*(t-i+3)),r=void 0,r=0;r<n.length&&!(n[r].pts>u);r++);return n.slice(r)}(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_=function(n,t,i){if(!t.length)return n;if(i)return t.slice();for(var u=t[0].pts,r=0;r<n.length&&!(n[r].pts>=u);r++);return n.slice(0,r).concat(t)}(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_=function(n,t,i,r){for(var u,o=Math.ceil(9e4*(t-r)),s=Math.ceil(9e4*(i-r)),e=n.slice(),f=n.length;f--&&!(n[f].pts<=s););if(-1===f)return e;for(u=f+1;u--&&!(n[u].pts<=o););return u=Math.max(u,0),e.splice(u,f-u+1),e}(this.gopBuffer_,n,t,this.timeMapping_)),!this.audioDisabled_&&this.audioBuffer_&&(this.audioBuffer_.updating=!0,this.audioBuffer_.remove(n,t)),ef(n,t,this.metadataTrack_),this.inbandTextTracks_)for(var i in this.inbandTextTracks_)ef(n,t,this.inbandTextTracks_[i])}},{key:"processPendingSegments_",value:function(){var n={video:{segments:[],bytes:0},audio:{segments:[],bytes:0},captions:[],metadata:[]},t;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_||(0===n.video.bytes&&(this.videoCodec_=null),0===n.audio.bytes&&(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);iyt(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(n){this.mediaSource_.player_&&this.mediaSource_.player_.error({code:-3,type:"APPEND_BUFFER_ERR",message:n.message,originalError:n})}}}},{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}}]),hf);cc=(ki(eu,i.EventTarget),oi(eu,[{key:"addSeekableRange_",value:function(n,t){var i=void 0;if(this.duration!==1/0)throw(i=new Error("MediaSource.addSeekableRange() can only be invoked when the duration is Infinity")).name="InvalidStateError",i.code=11,i;(t>this.nativeMediaSource_.duration||isNaN(this.nativeMediaSource_.duration))&&(this.nativeMediaSource_.duration=t)}},{key:"addSourceBuffer",value:function(n){var i=void 0,r=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;1<i.length&&(r=i[0].replace(/"/g,"").trim(),u=i[1].replace(/"/g,"").trim(),t.parameters[r]=u)}),t}(n),t;return/^(video|audio)\/mp2t$/i.test(r.type)?(t=[],r.parameters&&r.parameters.codecs&&(t=r.parameters.codecs.split(","),t=(t=get(t)).filter(function(n){return not(n)||tot(n)})),0===t.length&&(t=["avc1.4d400d","mp4a.40.2"]),i=new ayt(this,t),0!==this.sourceBuffers.length&&(this.sourceBuffers[0].createRealSourceBuffers_(),i.createRealSourceBuffers_(),this.sourceBuffers[0].audioDisabled_=!0)):i=this.nativeMediaSource_.addSourceBuffer(n),this.sourceBuffers.push(i),i}}]),eu);cw=0;i.mediaSources={};eo.open=rot;eo.supportsNativeMediaSources=lw;aw={createObjectURL:function(t){var r=void 0;return t instanceof cc?(r=n.URL.createObjectURL(t.nativeMediaSource_),t.url_=r):t instanceof cc?(r="blob:vjs-media-source/"+cw,cw++,i.mediaSources[r]=t,r):(r=n.URL.createObjectURL(t),t.url_=r)}};i.MediaSource=eo;i.URL=aw;yw=i.mergeOptions;lc=(ki(cf,i.EventTarget),oi(cf,[{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=ah.parseSidx(o.subarray(8));return r(t,s)}}}},{key:"media",value:function(t){var o=this,i,r,u,f,e;if(!t)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);if(i=this.state,"string"==typeof t){if(!this.master.playlists[t])throw new Error("Unknown playlist URI: "+t);t=this.master.playlists[t]}if(r=!this.media_||t.uri!==this.media_.uri,r&&this.loadedPlaylists_[t.uri]&&this.loadedPlaylists_[t.uri].endList)return this.state="HAVE_METADATA",this.media_=t,void(r&&(this.trigger("mediachanging"),this.trigger("mediachange")));r&&((this.media_&&this.trigger("mediachanging"),t.sidx)?(u=void 0,f=void 0,f=this.masterPlaylistLoader_?(u=this.masterPlaylistLoader_.master,this.masterPlaylistLoader_.sidxMapping_):(u=this.master,this.sidxMapping_),e=vw(t.sidx),f[e]={sidxInfo:t.sidx},this.request=eot(t.sidx,t,this.hls_.xhr,{handleManifestRedirects:this.handleManifestRedirects},this.sidxRequestFinished_(t,u,i,function(n,r){if(!n||!r)throw new Error("failed to request sidx");f[e].sidx=r;o.haveMetadata({startingState:i,playlist:n.playlists[t.uri]})}))):this.mediaRequest_=n.setTimeout(this.haveMetadata.bind(this,{startingState:i,playlist:t}),0))}},{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);"HAVE_MASTER"===i?this.trigger("loadedmetadata"):this.trigger("mediachange")}},{key:"pause",value:function(){this.stopRequest();n.clearTimeout(this.mediaUpdateTimeout);n.clearTimeout(this.minimumUpdatePeriodTimeout_);"HAVE_NOTHING"===this.state&&(this.started=!1)}},{key:"load",value:function(t){var u=this,i,r;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)):this.started?this.trigger("loadedplaylist"):this.start()}},{key:"parseMasterXml",value:function(){var n=pit(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 ec(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]}}),wft(n),bft(n),n}},{key:"start",value:function(){var t=this;this.started=!0;this.masterPlaylistLoader_?this.mediaRequest_=n.setTimeout(this.haveMaster_.bind(this),0):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},"HAVE_NOTHING"===t.state&&(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=fc(t.handleManifestRedirects,t.srcUrl,i);t.syncClientServerClock_(t.onClientServerClockSync_.bind(t))}})}},{key:"syncClientServerClock_",value:function(n){var i=this,t=iat(this.masterXml_);return null===t?(this.clientOffset_=this.masterLoaded_-Date.now(),n()):"DIRECT"===t.method?(this.clientOffset_=t.value-Date.now(),n()):void(this.request=this.hls_.xhr({uri:uu(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="HEAD"===t.method?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,e,o,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},"HAVE_NOTHING"===t.state&&(t.started=!1),t.trigger("error");t.masterXml_=r.responseText;t.sidxMapping_=function(n,t,i,r){var f=pit(n,{manifestUri:t,clientOffset:i}),u=fot(f.playlists,r);return ec(f,function(n){if(n.playlists&&n.playlists.length){var t=n.playlists;u=yw(u,fot(t,r))}}),u}(t.masterXml_,t.srcUrl,t.clientOffset_,t.sidxMapping_);f=t.parseMasterXml();e=uot(t.master,f);e&&(o=vw(t.media().sidx),t.sidxMapping_[o]?t.master=e:(u=t.media(),t.request=eot(u.sidx,u,t.hls_.xhr,{handleManifestRedirects:t.handleManifestRedirects},t.sidxRequestFinished_(u,f,t.state,function(i,r){if(!i||!r)throw new Error("failed to request sidx on minimumUpdatePeriod");t.sidxMapping_[o].sidx=r;t.minimumUpdatePeriodTimeout_=n.setTimeout(function(){t.trigger("minimumUpdatePeriod")},t.master.minimumUpdatePeriod);t.refreshMedia_(t.media().uri)}))));t.minimumUpdatePeriodTimeout_=n.setTimeout(function(){t.trigger("minimumUpdatePeriod")},t.master.minimumUpdatePeriod)}})}},{key:"refreshMedia_",value:function(t){var f=this,r,u,i;if(!t)throw new Error("refreshMedia_ must take a media uri");r=void 0;u=void 0;u=this.masterPlaylistLoader_?(r=this.masterPlaylistLoader_.master,this.masterPlaylistLoader_.parseMasterXml()):(r=this.master,this.parseMasterXml());i=uot(r,u);i?(this.masterPlaylistLoader_?this.masterPlaylistLoader_.master=i:this.master=i,this.media_=i.playlists[t]):(this.media_=u.playlists[t],this.trigger("playlistunchanged"));this.media().endList||(this.mediaUpdateTimeout=n.setTimeout(function(){f.trigger("mediaupdatetimeout")},kft(this.media(),!!i)));this.trigger("loadedplaylist")}}]),cf);oot=(oi(pw,[{key:"createSourceBuffer_",value:function(n,t){var i=this;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_()}):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 ["+uw(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,i){var r=this,u=2<arguments.length&&void 0!==i?i:lf;this.processedAppend_&&this.queueCallback_(function(){r.logger_("remove ["+n+" => "+t+"]");r.sourceBuffer_.removing=!0;r.sourceBuffer_.remove(n,t)},u)}},{key:"updating",value:function(){return!this.sourceBuffer_||this.sourceBuffer_.updating||!!this.pendingCallback_&&this.pendingCallback_!==lf}},{key:"timestampOffset",value:function(n){var t=this;return"undefined"!=typeof n&&(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(){function t(){n.sourceBuffer_&&"open"===n.mediaSource.readyState&&n.sourceBuffer_.abort();n.sourceBuffer_.removeEventListener("updateend",t)}var n=this;this.sourceBuffer_.removeEventListener("updateend",this.onUpdateendCallback_);this.sourceBuffer_.removing?this.sourceBuffer_.addEventListener("updateend",t):t()}}]),pw);var ni={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},ac=2,lot=-101,aot=-102,kw=(ki(af,i.EventTarget),oi(af,[{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(){"WAITING"===this.state?(this.abort_(),this.state="READY",this.paused()||this.monitorBuffer_()):this.pendingSegment_&&(this.pendingSegment_=null)}},{key:"abort_",value:function(){this.pendingSegment_&&this.pendingSegment_.abortRequests();this.pendingSegment_=null}},{key:"error",value:function(n){return"undefined"!=typeof n&&(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,t){var u=1<arguments.length&&void 0!==t&&t,r,i;return n?(r=hc(n),i=this.initSegments_[r],u&&!i&&n.bytes&&(this.initSegments_[r]=i={resolvedUri:n.resolvedUri,byterange:n.byterange,bytes:n.bytes,timescales:n.timescales,videoTrackIds:n.videoTrackIds}),i||n):null}},{key:"segmentKey",value:function(n,t){var f=1<arguments.length&&void 0!==t&&t,r,i,u;return n?(r=set(n),i=this.keyCache_[r],this.cacheEncryptionKeys_&&f&&!i&&n.bytes&&(this.keyCache_[r]=i={resolvedUri:n.resolvedUri,bytes:n.bytes}),u={resolvedUri:(i||n).resolvedUri},i&&(u.bytes=i.bytes),u):null}},{key:"couldBeginLoading_",value:function(){return this.playlist_&&(this.sourceUpdater_||this.mimeType_&&"INIT"===this.state)&&!this.paused()}},{key:"load",value:function(){if(this.monitorBuffer_(),this.playlist_){if(this.syncController_.setDateTimeMapping(this.playlist_),"INIT"===this.state&&this.couldBeginLoading_())return this.init_();this.couldBeginLoading_()&&("READY"===this.state||"INIT"===this.state)&&(this.state="READY")}}},{key:"init_",value:function(){return this.state="READY",this.sourceUpdater_=new oot(this.mediaSource_,this.mimeType_,this.loaderType_,this.sourceBufferEmitter_),this.resetEverything(),this.monitorBuffer_()}},{key:"playlist",value:function(n,t){var e=1<arguments.length&&void 0!==t?t:{},i,r,u,f;if(n){if(i=this.playlist_,r=this.pendingSegment_,this.playlist_=n,this.xhrOptions_=e,this.hasPlayed_()||(n.syncInfo={mediaSequence:n.mediaSequence,time:0}),u=null,i&&(i.id?u=i.id:i.uri&&(u=i.uri)),this.logger_("playlist update ["+u+" => "+(n.id||n.uri)+"]"),this.trigger("syncinfoupdate"),"INIT"===this.state&&this.couldBeginLoading_())return this.init_();i&&i.uri===n.uri?(f=n.mediaSequence-i.mediaSequence,this.logger_("live window shift ["+f+"]"),null!==this.mediaIndex&&(this.mediaIndex-=f),r&&(r.mediaIndex-=f,0<=r.mediaIndex&&(r.segment=n.segments[r.mediaIndex])),this.syncController_.saveExpiredSegmentInfo(i,n)):null!==this.mediaIndex&&this.resyncLoader()}}},{key:"pause",value:function(){this.checkBufferTimeout_&&(n.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)}},{key:"paused",value:function(){return null===this.checkBufferTimeout_}},{key:"mimeType",value:function(n,t){this.mimeType_||(this.mimeType_=n,this.sourceBufferEmitter_=t,"INIT"===this.state&&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),ef(n,t,this.segmentMetadataTrack_),this.inbandTextTracks_)for(var r in this.inbandTextTracks_)ef(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(){"READY"===this.state&&this.fillBuffer_();this.checkBufferTimeout_&&n.clearTimeout(this.checkBufferTimeout_);this.checkBufferTimeout_=n.setTimeout(this.monitorBufferTick_.bind(this),500)}},{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_);n&&(this.isEndOfStream_(n.mediaIndex)?this.endOfStream():n.mediaIndex===this.playlist_.segments.length-1&&"ended"===this.mediaSource_.readyState&&!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,t){return function(n,t,i){if(!n||!t)return!1;var r=i===n.segments.length;return n.endList&&"open"===t.readyState&&r}(1<arguments.length&&void 0!==t?t:this.playlist_,this.mediaSource_,n)&&!this.sourceUpdater_.updating()}},{key:"checkBuffer_",value:function(n,t,i,r,u,f){var o=0,e=void 0,h,s,c,l;return(n.length&&(o=n.end(n.length-1)),h=Math.max(0,o-u),!t.segments.length)?null:h>=this.goalBufferLength_()?null:!r&&1<=h?null:null===f?(i=this.getSyncSegmentCandidate_(t),this.generateSegmentInfo_(t,i,null,!0)):null!==i?(s=t.segments[i],e=s&&s.end?s.end:o,this.generateSegmentInfo_(t,i+1,e,!1)):(this.fetchAtBuffer_?(c=bt.getMediaInfoForTime(t,o,f.segmentIndex,f.time),i=c.mediaIndex,e=c.startTime):(l=bt.getMediaInfoForTime(t,u,f.segmentIndex,f.time),i=l.mediaIndex,e=l.startTime),this.generateSegmentInfo_(t,i,e,!1))}},{key:"getSyncSegmentCandidate_",value:function(n){var i=this,t;return-1===this.currentTimeline_?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,s,r;if(this.hls_.tech_.paused()||!this.xhrOptions_.timeout||!this.playlist_.attributes.BANDWIDTH||Date.now()-(n.firstBytesReceivedAt||Date.now())<1e3)return!1;var u=this.currentTime_(),f=n.bandwidth,e=this.pendingSegment_.duration,o=bt.estimateSegmentRequestTime(e,f,this.playlist_,n.bytesReceived),i=function(n,t,i){var r=2<arguments.length&&void 0!==i?i:1;return((n.length?n.end(n.length-1):0)-t)/r}(this.buffered_(),u,this.hls_.tech_.playbackRate())-1;return o<=i?!1:(t=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!bt.isIncompatible(n)}),r=u.filter(bt.isEnabled),t,i;return r.length||(r=u.filter(function(n){return!bt.isDisabled(n)})),t=r.filter(bt.hasAttribute.bind(null,"BANDWIDTH")).map(function(n){var t=a.getSyncPoint(n,s,l,e)?1:2;return{playlist:n,rebufferingImpact:bt.estimateSegmentRequestTime(h,o,n)*t-c}}),i=t.filter(function(n){return n.rebufferingImpact<=0}),so(i,function(n,t){return bw(t.playlist,n.playlist)}),i.length?i[0]:(so(t,function(n,t){return n.rebufferingImpact-t.rebufferingImpact}),t[0]||null)}({master:this.hls_.playlists.master,currentTime:u,bandwidth:f,duration:this.duration_(),segmentDuration:e,timeUntilRebuffer:i,currentTimeline:this.currentTimeline_,syncController:this.syncController_}),t?(s=o-i-t.rebufferingImpact,r=.5,i<=uo&&(r=1),!(!t.playlist||t.playlist.uri===this.playlist_.uri||s<r)&&(this.bandwidth=t.playlist.attributes.BANDWIDTH*ni.BANDWIDTH_VARIANCE+1,this.abort(),this.trigger("earlyabort"),!0)):void 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=pyt(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=function(n,t,i){var r=void 0;return r=n.length&&0<n.start(0)&&n.start(0)<t?n.start(0):t-30,Math.min(r,t-i)}(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);0<n&&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_){if(t.requestId===this.pendingSegment_.requestId){if(n)return this.pendingSegment_=null,this.state="READY",n.code===aot?void(this.mediaRequestsAborted+=1):(this.pause(),n.code===lot?(this.mediaRequestsTimedout+=1,this.bandwidth=1,this.roundTrip=NaN,void this.trigger("bandwidthupdate")):(this.mediaRequestsErrored+=1,this.error(n),void this.trigger("error")));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)}}else this.mediaRequestsAborted+=1}},{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&&(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||t.addRemoteTextTrack({kind:"captions",id:r,label:r},!1).track)}(this.inbandTextTracks_,this.hls_.tech_,n.captionStreams),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)))}))}({inbandTextTracks:this.inbandTextTracks_,captionArray:n.fmp4Captions,timestampOffset:0}),this.captionParser_&&this.captionParser_.clearParsedCaptions());this.handleSegment_()}},{key:"handleSegment_",value:function(){var o=this,r,u,f,e;if(this.pendingSegment_){var n=this.pendingSegment_,t=n.segment,i=this.syncController_.probeSegmentInfo(n);if("undefined"==typeof this.startingMedia_&&i&&(i.containsAudio||i.containsVideo)&&(this.startingMedia_={containsAudio:i.containsAudio,containsVideo:i.containsVideo}),r=function(n,t,i){return"main"===n&&t&&i?i.containsAudio||i.containsVideo?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:"Neither audio nor video found in segment.":null}(this.loaderType_,this.startingMedia_,i),r)return this.error({message:r,blacklistDuration:1/0}),void this.trigger("error");if(n.isSyncRequest)return this.trigger("syncinfoupdate"),this.pendingSegment_=null,void(this.state="READY");null!==n.timestampOffset&&n.timestampOffset!==this.sourceUpdater_.timestampOffset()&&(this.sourceUpdater_.timestampOffset(n.timestampOffset),this.trigger("timestampoffset"));u=this.syncController_.mappingForTimeline(n.timeline);(null!==u&&this.trigger({type:"segmenttimemapping",mapping:u}),this.state="APPENDING",t.map)&&(f=hc(t.map),this.activeInitSegmentId_&&this.activeInitSegmentId_===f||(e=this.initSegment(t.map),this.sourceUpdater_.appendBuffer({bytes:e.bytes},function(){o.activeInitSegmentId_=f})));n.byteLength=n.bytes.byteLength;this.mediaSecondsLoaded+="number"==typeof t.start&&"number"==typeof t.end?t.end-t.start:t.duration;this.logger_(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=void 0===u?[]:u,h=n.mediaIndex,c=n.timeline;return["appending ["+h+"] of ["+r+", "+(r+s.length)+"] from playlist ["+o+"]","["+f+" => "+e+"] in timeline ["+c+"]"].join(" ")}(n));this.sourceUpdater_.appendBuffer({bytes:n.bytes,videoSegmentTimingInfoCallback:this.handleVideoSegmentTimingInfo_.bind(this,n.requestId)},this.handleUpdateEnd_.bind(this))}else this.state="READY"}},{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_)return this.state="READY",void(this.paused()||this.monitorBuffer_());var n=this.pendingSegment_,t=n.segment,i=null!==this.mediaIndex;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>3*n.playlist.targetDuration?this.resetEverything():(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(cot(r)&&cot(u)){ef(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},e=new o(r,u,JSON.stringify(f));e.value=f;this.segmentMetadataTrack_.addCue(e)}}}}]),af);dw=new Uint8Array("\n\n".split("").map(function(n){return n.charCodeAt(0)}));yot=(ki(vf,kw),oi(vf,[{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,t){var e=1<arguments.length&&void 0!==t&&t,u,i,f,r;return n?(u=hc(n),i=this.initSegments_[u],e&&!i&&n.bytes&&(f=dw.byteLength+n.bytes.byteLength,r=new Uint8Array(f),r.set(n.bytes),r.set(dw,n.bytes.byteLength),this.initSegments_[u]=i={resolvedUri:n.resolvedUri,byterange:n.byterange,bytes:r}),i||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"undefined"==typeof n||(this.subtitlesTrack_=n,"INIT"===this.state&&this.couldBeginLoading_()&&this.init_()),this.subtitlesTrack_}},{key:"remove",value:function(n,t){ef(n,t,this.subtitlesTrack_)}},{key:"fillBuffer_",value:function(){var t=this,n;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)){if(null===this.syncController_.timestampOffsetForTimeline(n.timeline))return this.syncController_.one("timestampoffset",function(){t.state="READY";t.paused()||t.monitorBuffer_()}),void(this.state="WAITING_ON_TIMELINE");this.loadSegment_(n)}}},{key:"skipEmptySegments_",value:function(n){for(;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;if(this.pendingSegment_&&this.subtitlesTrack_){if(this.state="APPENDING",t=this.pendingSegment_,u=t.segment,"function"!=typeof n.WebVTT&&this.subtitlesTrack_&&this.subtitlesTrack_.tech_){function f(){i.subtitlesTrack_.tech_.off("vttjsloaded",r);i.error({message:"Error loading vtt.js"});i.state="READY";i.pause();i.trigger("error")}return r=void 0,r=function(){i.subtitlesTrack_.tech_.off("vttjserror",f);i.handleSegment_()},this.state="WAITING_ON_VTTJS",this.subtitlesTrack_.tech_.one("vttjsloaded",r),void this.subtitlesTrack_.tech_.one("vttjserror",f)}u.requested=!0;try{this.parseVTTCues_(t)}catch(t){return this.error({message:t.message}),this.state="READY",this.pause(),this.trigger("error")}if(this.updateTimeMapping_(t,this.syncController_.timelines[t.timeline],this.playlist_),t.isSyncRequest)return this.trigger("syncinfoupdate"),this.pendingSegment_=null,void(this.state="READY");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_()}else this.state="READY"}},{key:"parseVTTCues_",value:function(t){var e=void 0,o=!1,r,u,f;"function"==typeof n.TextDecoder?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=vot(u)),r.parse(u));f=t.bytes;o&&(f=vot(f));r.parse(f);r.flush()}},{key:"updateTimeMapping_",value:function(n,t,i){var f=n.segment,r,u,e,o;t&&(n.cues.length?(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)})):f.empty=!0)}}]),vf);var byt=sft,pot=[{name:"VOD",run:function(n,t,i){return i===1/0?null:{time:0,segmentIndex:0}}},{name:"ProgramDateTime",run:function(n,t,i,r,u){var f,s,h,e;if(!n.datetimeToDisplayTime)return null;var c=t.segments||[],l=null,o=null;for(u=u||0,f=0;f<c.length;f++)if(s=c[f],s.dateTimeObject){if(h=s.dateTimeObject.getTime()/1e3+n.datetimeToDisplayTime,e=Math.abs(u-h),null!==o&&(0===e||o<e))break;o=e;l={time:h,segmentIndex:f}}return l}},{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&&"undefined"!=typeof o.start){if(s=Math.abs(u-o.start),null!==f&&f<s)break;(!h||null===f||s<=f)&&(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),null!==f&&f<o)break;(!s||null===f||o<=f)&&(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}}],kyt=(ki(yf,i.EventTarget),oi(yf,[{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}),0<i.segmentIndex&&(i.time*=-1),Math.abs(i.time+ro(n,i.segmentIndex,0)))}},{key:"runStrategies_",value:function(n,t,i,r){for(var f,e,o=[],u=0;u<pot.length;u++)f=pot[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 u,r=n[0].syncPoint,f=Math.abs(n[0].syncPoint[t.key]-t.value),e=n[0].strategy,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 r,i=t.mediaSequence-n.mediaSequence-1;0<=i;i--)if(r=n.segments[i],r&&"undefined"!=typeof r.start){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_=void 0}},{key:"probeSegmentInfo",value:function(n){var r=n.segment,t=n.playlist,i=void 0;return(i=r.map?this.probeMp4Segment_(n):this.probeTsSegment_(n))&&this.calculateSegmentTimeMapping_(n,i)&&(this.saveDiscontinuitySyncInfo_(n),t.syncInfo||(t.syncInfo={mediaSequence:t.mediaSequence+n.mediaIndex,time:r.start})),i}},{key:"probeMp4Segment_",value:function(n){var i=n.segment,r=li.timescale(i.map.bytes),t=li.startTime(r,n.bytes);return null!==n.timestampOffset&&(n.timestampOffset-=t),{start:t,end:t+i.duration}}},{key:"probeTsSegment_",value:function(n){var t=byt(n.bytes,this.inspectCache_),i=void 0,r=void 0;return t?(t.video&&2===t.video.length?(this.inspectCache_=t.video[1].dts,i=t.video[0].dtsTime,r=t.video[1].dtsTime):t.audio&&2===t.audio.length&&(this.inspectCache_=t.audio[1].dts,i=t.audio[0].dtsTime,r=t.audio[1].dtsTime),{start:i,end:r,containsVideo:t.video&&2===t.video.length,containsAudio:t.audio&&2===t.audio.length}):null}},{key:"timestampOffsetForTimeline",value:function(n){return"undefined"==typeof this.timelines[n]?null:this.timelines[n].time}},{key:"mappingForTimeline",value:function(n){return"undefined"==typeof this.timelines[n]?null:this.timelines[n].mapping}},{key:"calculateSegmentTimeMapping_",value:function(n,t){var r=n.segment,i=this.timelines[n.timeline];if(null!==n.timestampOffset)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)return!1;r.start=t.start+i.mapping;r.end=t.end+i.mapping}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-ro(t,n.mediaIndex,u):i.end+ro(t,n.mediaIndex+1,u),this.discontinuities[f]={time:e,accuracy:s})}}}]),yf);var gyt=new ket("./decrypter-worker.worker.js",function(){function f(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function v(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)}function e(t){f(this,e);n=n||function(){for(var h=[[[],[],[],[],[]],[[],[],[],[],[]]],f=h[0],e=h[1],l=f[4],y=e[4],n=void 0,i=void 0,t=void 0,u=[],a=[],c=void 0,v=void 0,r=void 0,o=void 0,s=void 0,n=0;n<256;n++)a[(u[n]=n<<1^283*(n>>7))^n]=n;for(i=t=0;!l[i];i^=c||1,t=a[t]||1)for(r=(r=t^t<<1^t<<2^t<<3^t<<4)>>8^255&r^99,s=16843009*u[v=u[c=u[y[l[i]=r]=i]]]^65537*v^257*c^16843008*i,o=257*u[r]^16843008*r,n=0;n<4;n++)f[n][i]=o=o<<24^o>>>8,e[n][r]=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}();this._tables=[[n[0][0].slice(),n[0][1].slice(),n[0][2].slice(),n[0][3].slice(),n[0][4].slice()],[n[1][0].slice(),n[1][1].slice(),n[1][2].slice(),n[1][3].slice(),n[1][4].slice()]];var r=void 0,h=void 0,i=void 0,s=void 0,a=void 0,o=this._tables[0][4],c=this._tables[1],u=t.length,l=1;if(4!==u&&6!==u&&8!==u)throw new Error("Invalid aes key size");for(s=t.slice(0),a=[],this._key=[s,a],r=u;r<4*u+28;r++)i=s[r-1],(r%u==0||8===u&&r%u==4)&&(i=o[i>>>24]<<24^o[i>>16&255]<<16^o[i>>8&255]<<8^o[255&i],r%u==0&&(i=i<<8^i>>>24^l<<24,l=l<<1^283*(l>>7))),s[r]=s[r-u]^i;for(h=0;r;h++,r--)i=s[3&h?r:r-4],a[h]=r<=4||h<4?i:c[0][o[i>>>24]]^c[1][o[i>>16&255]]^c[2][o[i>>8&255]]^c[3][o[255&i]]}function i(){f(this,i);this.listeners={}}function r(){f(this,r);var n=function(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?n:t}(this,c.call(this,h));return n.jobs=[],n.delay=1,n.timeout_=null,n}function t(n){return n<<24|(65280&n)<<8|(16711680&n)>>8|n>>>24}function u(n,i,r,e){f(this,u);var h=u.STEP,s=new Int32Array(n.buffer),c=new Uint8Array(n.byteLength),o=0;for(this.asyncStream_=new l,this.asyncStream_.push(this.decryptChunk_(s.subarray(o,o+h),i,r,c)),o=h;o<s.length;o+=h)r=new Uint32Array([t(s[o-4]),t(s[o-3]),t(s[o-2]),t(s[o-1])]),this.asyncStream_.push(this.decryptChunk_(s.subarray(o,o+h),i,r,c));this.asyncStream_.push(function(){e(null,function(n){return n.subarray(0,n.byteLength-n[n.byteLength-1])}(c))})}var o,n,s,h,c,l,a,y=this;o=function(n,t,i){return t&&v(n.prototype,t),i&&v(n,i),n};n=null;e.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[255&c]^e[a],g=p[s>>>24]^w[h>>16&255]^b[c>>8&255]^k[255&o]^e[a+1],nt=p[h>>>24]^w[c>>16&255]^b[o>>8&255]^k[255&s]^e[a+2],c=p[c>>>24]^w[o>>16&255]^b[s>>8&255]^k[255&h]^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[255&c]^e[a++],y=o,o=s,s=h,h=c,c=y};s=e;i.prototype.on=function(n,t){this.listeners[n]||(this.listeners[n]=[]);this.listeners[n].push(t)};i.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),-1<i};i.prototype.trigger=function(n,t){var i=this.listeners[n],f,r;if(i)if(2===arguments.length)for(f=i.length,r=0;r<f;++r)i[r].call(this,t);else for(var e=Array.prototype.slice.call(arguments,1),o=i.length,u=0;u<o;++u)i[u].apply(this,e)};i.prototype.dispose=function(){this.listeners={}};i.prototype.pipe=function(n){this.on("data",function(t){n.push(t)})},function(n,t){if("function"!=typeof t&&null!==t)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)}(r,c=h=i);r.prototype.processJob_=function(){this.jobs.shift()();this.timeout_=this.jobs.length?setTimeout(this.processJob_.bind(this),this.delay):null};r.prototype.push=function(n){this.jobs.push(n);this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))};l=r;u.prototype.decryptChunk_=function(n,i,r,u){return function(){var f=function(n,i,r){var e=new Int32Array(n.buffer,n.byteOffset,n.byteLength>>2),b=new s(Array.prototype.slice.call(i)),w=new Uint8Array(n.byteLength),f=new Int32Array(w.buffer),o=void 0,h=void 0,c=void 0,l=void 0,a=void 0,v=void 0,y=void 0,p=void 0,u=void 0;for(o=r[0],h=r[1],c=r[2],l=r[3],u=0;u<e.length;u+=4)a=t(e[u]),v=t(e[u+1]),y=t(e[u+2]),p=t(e[u+3]),b.decrypt(a,v,y,p,f,u),f[u]=t(f[u]^o),f[u+1]=t(f[u+1]^h),f[u+2]=t(f[u+2]^c),f[u+3]=t(f[u+3]^l),o=a,h=v,c=y,l=p;return w}(n,i,r);u.set(f,n.byteOffset)}};o(u,null,[{key:"STEP",get:function(){return 32e3}}]);a=u,new 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 a(r,u,f,function(t,r){n.postMessage(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}({source:i.source,decrypted:r}),[r.buffer])})}}(y)}),yc={AUDIO:function(n,t){return function(){var o=t.segmentLoaders[n],r=t.mediaTypes[n],s=t.blacklistCurrentPlaylist,u;vc(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){for(u in i.log.warn("Problem encountered loading the alternate audio track.Switching back to default."),r.tracks)r.tracks[u].enabled=r.tracks[u]===e;r.onTrackChanged()}else s({message:"Problem encountered loading the default audio track."})}},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.");vc(f,r);u=r.activeTrack();u&&(u.mode="disabled");r.onTrackChanged()}}},bot={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&&"none"!==u.preload())&&r.load()});t.on("loadedplaylist",function(){r.playlist(t.media(),f);u.paused()||r.load()});t.on("error",yc[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&&"none"!==u.preload())&&r.load()});t.on("loadedplaylist",function(){r.playlist(t.media(),f);u.paused()||r.load()});t.on("error",yc[n](n,i))}},npt={AUDIO:function(n,t){var o,s,l=t.hls,w=t.sourceType,b=t.segmentLoaders[n],a=t.requestOptions,f=t.master.mediaGroups,v=t.mediaTypes[n],h=v.groups,y=v.tracks,k=t.masterPlaylistLoader,e,u,r,c,p;for(e in f[n]&&0!==Object.keys(f[n]).length||(f[n]={main:{"default":{"default":!0}}}),f[n])for(u in h[e]||(h[e]=[]),f[n][e])r=f[n][e][u],c=void 0,(c=r.resolvedUri?new oc(r.resolvedUri,l,a):r.playlists&&"dash"===w?new lc(r.playlists[0],l,a,k):null,r=i.mergeOptions({id:u,playlistLoader:c},r),bot[n](n,r.playlistLoader,t),h[e].push(r),"undefined"==typeof y[u])&&(p=new i.AudioTrack({id:u,kind:(o=r,s=void 0,s=o.default?"main":"alternative",o.characteristics&&0<=o.characteristics.indexOf("public.accessibility.describes-video")&&(s="main-desc"),s),enabled:!1,language:r.language,"default":r.default,label:u}),y[u]=p);b.on("error",yc[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])for(u in s[f]||(s[f]=[]),e[n][f])e[n][f][u].forced||(r=e[n][f][u],o=void 0,("hls"===c?o=new oc(r.resolvedUri,h,l):"dash"===c&&(o=new lc(r.playlists[0],h,l,b)),r=i.mergeOptions({id:u,playlistLoader:o},r),bot[n](n,r.playlistLoader,t),s[f].push(r),"undefined"==typeof v[u])&&(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",yc[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])for(f in o[u]||(o[u]=[]),e[n][u])r=e[n][u][f],r.instreamId.match(/CC\d/)&&(o[u].push(i.mergeOptions({id:f},r)),"undefined"==typeof h[f])&&(c=l.addRemoteTextTrack({id:r.instreamId,kind:"captions","default":r.default&&r.autoselect,language:r.language,label:f},!1).track,h[f]=c)}},tpt={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("showing"===i[r].mode)return i[r];return null}}},er=void 0,ipt=["mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaBytesTransferred"],rpt=(ki(pf,i.EventTarget),oi(pf,[{key:"setupMasterPlaylistLoaderListeners_",value:function(){var n=this;this.masterPlaylistLoader_.on("loadedmetadata",function(){var t=n.masterPlaylistLoader_.media(),r=1.5*t.targetDuration*1e3;n.requestOptions_.timeout=iw(n.masterPlaylistLoader_.master,n.masterPlaylistLoader_.media())?0:r;t.endList&&"none"!==n.tech_.preload()&&(n.mainSegmentLoader_.playlist(t,n.requestOptions_),n.mainSegmentLoader_.load());dyt({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(t){return i.log.warn("Failed to create SourceBuffers",t),n.mediaSource.endOfStream("decode")}n.setupFirstPlay();!n.mediaTypes_.AUDIO.activePlaylistLoader||n.mediaTypes_.AUDIO.activePlaylistLoader.media()?n.trigger("selectedinitialmedia"):n.mediaTypes_.AUDIO.activePlaylistLoader.one("loadedmetadata",function(){n.trigger("selectedinitialmedia")})});this.masterPlaylistLoader_.on("loadedplaylist",function(){var t=n.masterPlaylistLoader_.media(),i;if(!t)return n.excludeUnsupportedVariants_(),i=void 0,n.enableLowInitialPlaylist&&(i=n.selectInitialPlaylist()),i=i||n.selectPlaylist(),n.initialMedia_=i,void n.masterPlaylistLoader_.media(n.initialMedia_);if(n.useCueTags_&&n.updateAdCues_(t),n.mainSegmentLoader_.playlist(t,n.requestOptions_),n.updateDuration(),n.tech_.paused()||(n.mainSegmentLoader_.load(),n.audioSegmentLoader_&&n.audioSegmentLoader_.load()),!t.endList){function r(){var t=n.seekable();0!==t.length&&n.mediaSource.addSeekableRange_(t.start(0),t.end(0))}n.duration()!==1/0?n.tech_.one("durationchange",function t(){n.duration()===1/0?r():n.tech_.one("durationchange",t)}):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=1.5*t.targetDuration*1e3;n.requestOptions_.timeout=iw(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();n.stuckAtPlaylistEnd_(t)&&(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;for(r in i.AUDIO)for(e in i.AUDIO[r])i.AUDIO[r][e].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"});er.Playlist.isAes(t)&&this.tech_.trigger({type:"usage",name:"hls-aes"});er.Playlist.isFmp4(t)&&this.tech_.trigger({type:"usage",name:"hls-fmp4"});f.length&&1<Object.keys(i.AUDIO[f[0]]).length&&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()<ni.MAX_BUFFER_LOW_WATER_LINE||i.attributes.BANDWIDTH<r.attributes.BANDWIDTH||f<=u)&&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."},120)});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();return this.tech_.duration()===1/0&&this.tech_.currentTime()<n.start(0)?this.seekTo_(n.end(n.length-1)):void 0}}},{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&&0===this.tech_.readyState())return this.tech_.one("loadedmetadata",function(){t.trigger("firstplay");t.seekTo_(n.end(0));t.hasPlayed_=function(){return!0}}),!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(n){return i.log.warn("Failed to create Source Buffers",n),this.mediaSource.endOfStream("decode")}if(this.tech_.autoplay()){var n=this.tech_.play();"undefined"!=typeof n&&"function"==typeof n.then&&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(n){i.log.warn("Failed to call media source endOfStream",n)}}}},{key:"stuckAtPlaylistEnd_",value:function(n){var t,r;if(!this.seekable().length||(t=this.syncController_.getExpiredTime(n,this.mediaSource.duration),null===t))return!1;var u=er.Playlist.playlistEnd(n,t),f=this.tech_.currentTime(),i=this.tech_.buffered();return i.length?(r=i.end(i.length-1),r-f<=.1&&u-r<=.1):u-f<=.1}},{key:"blacklistCurrentPlaylist",value:function(n,t){var s,r=0<arguments.length&&void 0!==n?n:{},f=t,e=void 0,u,o;if(e=r.playlist||this.masterPlaylistLoader_.media(),f=f||r.blacklistDuration||this.blacklistDuration,!e){this.error=r;try{return this.mediaSource.endOfStream("network")}catch(n){return this.trigger("error")}}return u=1===this.masterPlaylistLoader_.master.playlists.filter(sc).length,o=this.masterPlaylistLoader_.master.playlists,1===o.length?(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(u)):(u&&(i.log.warn("Removing all playlists from the blacklist because the last rendition is about to be blacklisted."),o.forEach(function(n){n.excludeUntil!==1/0&&delete n.excludeUntil}),this.tech_.trigger("retryplaylist")),e.excludeUntil=Date.now()+1e3*f,this.tech_.trigger("blacklistplaylist"),this.tech_.trigger({type:"usage",name:"hls-rendition-blacklisted"}),s=this.selectPlaylist(),i.log.warn("Problem encountered with the current HLS playlist."+(r.message?" "+r.message:"")+" Switching to another playlist."),this.masterPlaylistLoader_.media(s,u))}},{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=vet(this.tech_.buffered(),n);return this.masterPlaylistLoader_&&this.masterPlaylistLoader_.media()&&this.masterPlaylistLoader_.media().segments?t&&t.length?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()),void this.load()):0}},{key:"duration",value:function(){return this.masterPlaylistLoader_?this.mediaSource?this.mediaSource.duration:er.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),null!==u&&0!==(n=er.Playlist.seekable(r,u)).length))){if(this.mediaTypes_.AUDIO.activePlaylistLoader){if(r=this.mediaTypes_.AUDIO.activePlaylistLoader.media(),null===(u=this.syncController_.getExpiredTime(r,this.mediaSource.duration)))return;if(0===(t=er.Playlist.seekable(r,u)).length)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 ["+uw(this.seekable_)+"]"),this.tech_.trigger("seekablechanged"))}}},{key:"updateDuration",value:function(){function r(){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",r)}var n=this,f=this.mediaSource.duration,t=er.Playlist.duration(this.masterPlaylistLoader_.media()),u=this.tech_.buffered();0<u.length&&(t=Math.max(t,u.end(u.length-1)));f!==t&&("open"!==this.mediaSource.readyState?this.mediaSource.addEventListener("sourceopen",r):r())}},{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 t,n=this.masterPlaylistLoader_.media();if(n&&"open"===this.mediaSource.readyState){if((t=cyt(this.masterPlaylistLoader_.master,n)).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=1<n.length&&-1===n[0].indexOf(",")&&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="'+function(n){return n.replace(/avc1\.(\d+)\.(\d+)/i,function(n){return get([n])[0]})}(t.attributes.CODECS)+'"')&&(t.excludeUntil=1/0)})}},{key:"excludeIncompatibleVariants_",value:function(n){var i=2,r=null,t=void 0;n.attributes.CODECS&&(t=fo(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=fo(n.attributes.CODECS));t.codecCount!==i&&(n.excludeUntil=1/0);t.videoCodec!==r&&(n.excludeUntil=1/0)})}},{key:"updateAdCues_",value:function(t){var i=0,r=this.seekable();r.length&&(i=r.start(0)),function(t,i,r){var a=2<arguments.length&&void 0!==r?r:0,e,h,c,l,s;if(t.segments)for(var u=a,f=void 0,o=0;o<t.segments.length;o++){if(e=t.segments[o],f=f||wyt(i,u+e.duration/2)){if("cueIn"in e){f.endTime=u;f.adEndTime=u;u+=e.duration;f=null;continue}if(u<f.endTime){u+=e.duration;continue}f.endTime+=e.duration}else("cueOut"in e&&((f=new n.VTTCue(u,u+e.duration,e.cueOut)).adStartTime=u,f.adEndTime=u+parseFloat(e.cueOut),i.addCue(f)),"cueOutCont"in e)&&(l=e.cueOutCont.split("/").map(parseFloat),s=kvt(l,2),h=s[0],c=s[1],(f=new n.VTTCue(u,u+e.duration,"")).adStartTime=u-h,f.adEndTime=f.adStartTime+c,i.addCue(f));u+=e.duration}}(t,this.cueTagsTrack_,i)}},{key:"goalBufferLength",value:function(){var t=this.tech_.currentTime(),n=ni.GOAL_BUFFER_LENGTH,i=ni.GOAL_BUFFER_LENGTH_RATE,r=Math.max(n,ni.MAX_GOAL_BUFFER_LENGTH);return Math.min(n+t*i,r)}},{key:"bufferLowWaterLine",value:function(){var t=this.tech_.currentTime(),n=ni.BUFFER_LOW_WATER_LINE,i=ni.BUFFER_LOW_WATER_LINE_RATE,r=Math.max(n,ni.MAX_BUFFER_LOW_WATER_LINE);return Math.min(n+t*i,r)}}]),pf);return gw=["seeking","seeked","pause","playing","error"],dot=(oi(nb,[{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_())return this.consecutiveUpdates=0,void(this.lastRecordedTime=this.tech_.currentTime());if(!this.tech_.paused()&&!this.tech_.seeking()){var n=this.tech_.currentTime(),t=this.tech_.buffered();if(this.lastRecordedTime===n&&(!t.length||n+.1>=t.end(t.length-1)))return this.techWaiting_();5<=this.consecutiveUpdates&&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(){if(!this.tech_.seeking())return!1;var n=this.seekable(),i=this.tech_.currentTime(),t=void 0;return this.afterSeekableWindow_(n,i,this.media(),this.allowSeeksWithinUnsafeLiveWindow)&&(t=n.end(n.length-1)),this.beforeSeekableWindow_(n,i)&&(t=n.start(0)+.1),"undefined"!=typeof t&&(this.logger_("Trying to seek outside of seekable at time "+i+" with seekable range "+uw(n)+". Seeking to "+t+"."),this.seekTo(t),!0)}},{key:"waiting_",value:function(){if(!this.techWaiting_()){var n=this.tech_.currentTime(),i=this.tech_.buffered(),t=vet(i,n);return 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."),void this.tech_.trigger({type:"usage",name:"hls-unknown-waiting"})):void 0}}},{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()||null!==this.timer_?!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=yet(u,n),this.videoUnderflow_(t,u,n))?(this.cancelTimer_(),this.seekTo(n),this.tech_.trigger({type:"usage",name:"hls-video-underflow"}),!0):0<t.length?(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),1e3*f,n),!0):!1}},{key:"afterSeekableWindow_",value:function(n,t,i,r){var f=3<arguments.length&&void 0!==r&&r,u;return n.length?(u=n.end(n.length-1)+.1,!i.endList&&f&&(u=n.end(n.length-1)+3*i.targetDuration),u<t):!1}},{key:"beforeSeekableWindow_",value:function(n,t){return!!(n.length&&0<n.start(0)&&t<n.start(0)-.1)}},{key:"videoUnderflow_",value:function(n,t,i){if(0===n.length){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=yet(r,t);this.cancelTimer_();0!==i.length&&t===n&&(this.logger_("skipTheGap_:","currentTime:",t,"scheduled currentTime:",n,"nextRange start:",i.start(0)),this.seekTo(i.start(0)+uo),this.tech_.trigger({type:"usage",name:"hls-gap-skip"}))}},{key:"gapFromVideoUnderflow_",value:function(n,t){for(var f,e,u=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)}(n),r=0;r<u.length;r++)if(f=u.start(r),e=u.end(r),t-f<4&&2<t-f)return{start:f,end:e};return null}}]),nb),nst={errorInterval:30,getSource:function(n){return n(this.tech({IWillNotUseThisInPlugins:!0}).currentSource_)}},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())}}}),yt={PlaylistLoader:oc,Playlist:bt,Decrypter:yft,AsyncStream:dp,decrypt:vft,utils:oyt,STANDARD_PLAYLIST_SELECTOR:function(){return function(t,i,r,u,f){var e=t.playlists.map(function(t){var i,r;return i=t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width,r=t.attributes.RESOLUTION&&t.attributes.RESOLUTION.height,{bandwidth:t.attributes.BANDWIDTH||n.Number.MAX_VALUE,width:i,height:r,playlist:t}}),o,v,c,l,p;so(e,function(n,t){return n.bandwidth-t.bandwidth});o=(e=e.filter(function(n){return!bt.isIncompatible(n.playlist)})).filter(function(n){return bt.isEnabled(n.playlist)});o.length||(o=e.filter(function(n){return!bt.isDisabled(n.playlist)}));var h=o.filter(function(n){return n.bandwidth*ni.BANDWIDTH_VARIANCE<i}),s=h[h.length-1],w=h.filter(function(n){return n.bandwidth===s.bandwidth})[0];if(!1===f)return v=w||o[0]||e[0],v?v.playlist:null;c=h.filter(function(n){return n.width&&n.height});so(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],y=void 0,a=void 0,k=void 0;return b||(a=(y=c.filter(function(n){return n.width>r||n.height>u})).filter(function(n){return n.width===y[0].width&&n.height===y[0].height}),s=a[a.length-1],k=a.filter(function(n){return n.bandwidth===s.bandwidth})[0]),p=k||b||w||o[0]||e[0],p?p.playlist:null}(this.playlists.master,this.systemBandwidth,parseInt(hot(this.tech_.el(),"width"),10),parseInt(hot(this.tech_.el(),"height"),10),this.limitRenditionByPlayerDimensions)},INITIAL_PLAYLIST_SELECTOR:function(){var n=this.playlists.master.playlists.filter(bt.isEnabled);return so(n,function(n,t){return bw(n,t)}),n.filter(function(n){return fo(n.attributes.CODECS).videoCodec})[0]||null},comparePlaylistBandwidth:bw,comparePlaylistResolution: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),r===(u=u||n.Number.MAX_VALUE)&&t.attributes.BANDWIDTH&&i.attributes.BANDWIDTH?t.attributes.BANDWIDTH-i.attributes.BANDWIDTH:r-u},xhr:eet()},["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(yt,n,{get:function(){return i.log.warn("using Hls."+n+" is UNSAFE be sure you know what you are doing"),ni[n]},set:function(t){i.log.warn("using Hls."+n+" is UNSAFE be sure you know what you are doing");"number"!=typeof t||t<0?i.log.warn("value of Hls."+n+" must be greater than or equal to 0"):ni[n]=t}})}),tb="videojs-vhs",yt.canPlaySource=function(){return i.log.warn("HLS is no longer a tech. Please remove it from your player's techOrder.")},yt.supportsNativeHls=function(){var n=t.createElement("video");return i.getTech("Html5").isSupported()?["application/vnd.apple.mpegurl","audio/mpegurl","audio/x-mpegurl","application/x-mpegurl","video/x-mpegurl","video/mpegurl","application/mpegurl"].some(function(t){return/maybe|probably/i.test(n.canPlayType(t))}):!1}(),yt.supportsNativeDash=!!i.getTech("Html5").isSupported()&&/maybe|probably/i.test(t.createElement("video").canPlayType("application/dash+xml")),yt.supportsTypeNatively=function(n){return"hls"===n?yt.supportsNativeHls:"dash"===n&&yt.supportsNativeDash},yt.isSupported=function(){return i.log.warn("HLS is no longer a tech. Please remove it from your player's techOrder.")},ust=i.getComponent("Component"),ib=(ki(or,ust),oi(or,[{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=!1!==this.options_.limitRenditionByPlayerDimensions,this.options_.smoothQualityChange=this.options_.smoothQualityChange||!1,this.options_.useBandwidthFromLocalStorage="undefined"!=typeof this.source_.useBandwidthFromLocalStorage?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,"number"!=typeof this.options_.blacklistDuration&&(this.options_.blacklistDuration=300),"number"!=typeof this.options_.bandwidth&&this.options_.useBandwidthFromLocalStorage)&&(n=rst(),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"})));"number"!=typeof this.options_.bandwidth&&(this.options_.bandwidth=ni.INITIAL_BANDWIDTH);this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===ni.INITIAL_BANDWIDTH;["withCredentials","limitRenditionByPlayerDimensions","bandwidth","smoothQualityChange","customTagParsers","customTagMappers","handleManifestRedirects","cacheEncryptionKeys"].forEach(function(n){"undefined"!=typeof t.source_[n]&&(t.options_[n]=t.source_[n])});this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions}},{key:"src",value:function(n,t){var r=this;n&&(this.setOptions_(),this.options_.url=this.source_.src,this.options_.tech=this.tech_,this.options_.externHls=yt,this.options_.sourceType=tst(t),this.options_.seekTo=function(n){r.tech_.setCurrentTime(n);r.setCurrentTime(n)},this.masterPlaylistController_=new rpt(this.options_),this.playbackWatcher_=new dot(i.mergeOptions(this.options_,{seekable:function(){return r.seekable()},media:function(){return r.masterPlaylistController_.media()}})),this.masterPlaylistController_.on("error",function(){i.players[r.tech_.options_.playerId].error(r.masterPlaylistController_.error)}),this.masterPlaylistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):yt.STANDARD_PLAYLIST_SELECTOR.bind(this),this.masterPlaylistController_.selectInitialPlaylist=yt.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=0<this.throughput?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 pet(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 pet(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&&function(n){if(window.localStorage){var t=rst();t=t?i.mergeOptions(t,n):n;try{window.localStorage.setItem(tb,JSON.stringify(t))}catch(n){return}}}({bandwidth:r.bandwidth,throughput:Math.round(r.throughput)})}),this.masterPlaylistController_.on("selectedinitialmedia",function(){!function(n){var t=n.playlists;n.representations=function(){return t.master.playlists.filter(function(n){return!tw(n)}).map(function(t){return new kot(n,t,t.uri)})}}(r);upt(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];t&&t.qualityLevels&&(this.qualityLevels_=t.qualityLevels(),this.masterPlaylistController_.on("selectedinitialmedia",function(){!function(n,t){t.representations().forEach(function(t){n.addQualityLevel(t)});ist(n,t.playlists)}(n.qualityLevels_,n)}),this.playlists.on("mediachange",function(){ist(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,function n(t,i,r){var u,f,e;return(null===t&&(t=Function.prototype),u=Object.getOwnPropertyDescriptor(t,i),void 0===u)?(f=Object.getPrototypeOf(t),null===f?void 0:n(f,i,r)):"value"in u?u.value:(e=u.get,void 0!==e?e.call(r):void 0)}(or.prototype.__proto__||Object.getPrototypeOf(or.prototype),"dispose",this).call(this)}},{key:"convertToProgramTime",value:function(n,t){return tyt({playlist:this.masterPlaylistController_.media(),time:n,callback:t})}},{key:"seekToProgramTime",value:function(n,t,i,r){var u=!(2<arguments.length&&void 0!==i)||i,f=3<arguments.length&&void 0!==r?r:2;return cet({programTime:n,playlist:this.masterPlaylistController_.media(),retryCount:f,pauseAfterSeek:u,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:t})}}]),or),pc={name:"videojs-http-streaming",VERSION:"1.10.3",canHandleSource:function(n,t){var r=i.mergeOptions(i.options,1<arguments.length&&void 0!==t?t:{});return pc.canPlayType(n.type,r)},handleSource:function(n,t,r){var u=i.mergeOptions(i.options,2<arguments.length&&void 0!==r?r:{});return t.hls=new ib(n,t,u),t.hls.xhr=eet(),t.hls.src(n.src,n.type),t.hls},canPlayType:function(n,t){var u=i.mergeOptions(i.options,1<arguments.length&&void 0!==t?t:{}).hls.overrideNative,r=tst(n);return r&&(!yt.supportsTypeNatively(r)||u)?"maybe":""}},"undefined"!=typeof i.MediaSource&&"undefined"!=typeof i.URL||(i.MediaSource=eo,i.URL=aw),eo.supportsNativeMediaSources()&&i.getTech("Html5").registerSourceHandler(pc,0),i.HlsHandler=ib,i.HlsSourceHandler=pc,i.Hls=yt,i.use||i.registerComponent("Hls",yt),i.options.hls=i.options.hls||{},i.registerPlugin?i.registerPlugin("reloadSourceOnError",got):i.plugin("reloadSourceOnError",got),i});!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("jquery"),require("popper.js")):"function"==typeof define&&define.amd?define(["exports","jquery","popper.js"],t):t((n=n||self).bootstrap={},n.jQuery,n.Popper)}(this,function(n,t,i){"use strict";function uu(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)}function l(n,t,i){return t&&uu(n.prototype,t),i&&uu(n,i),n}function f(n){for(var i,r,t=1;t<arguments.length;t++)i=null!=arguments[t]?arguments[t]:{},r=Object.keys(i),"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(i).filter(function(n){return Object.getOwnPropertyDescriptor(i,n).enumerable}))),r.forEach(function(t){var r,u,f;r=n;f=i[u=t];u in r?Object.defineProperty(r,u,{value:f,enumerable:!0,configurable:!0,writable:!0}):r[u]=f});return n}function cf(n){var u=this,i=!1;return t(this).one(r.TRANSITION_END,function(){i=!0}),setTimeout(function(){i||r.triggerTransitionEnd(u)},n),this}function wu(n,t,i){if(0===n.length)return n;if(i&&"function"==typeof i)return i(n);for(var u=(new window.DOMParser).parseFromString(n,"text/html"),e=Object.keys(t),f=[].slice.call(u.body.querySelectorAll("*")),o=function(n){var i=f[n],o=i.nodeName.toLowerCase(),r,u;if(-1===e.indexOf(i.nodeName.toLowerCase()))return i.parentNode.removeChild(i),"continue";r=[].slice.call(i.attributes);u=[].concat(t["*"]||[],t[o]||[]);r.forEach(function(n){(function(n,t){var i=n.nodeName.toLowerCase();if(-1!==t.indexOf(i))return-1===us.indexOf(i)||Boolean(n.nodeValue.match(fs)||n.nodeValue.match(es));for(var u=t.filter(function(n){return n instanceof RegExp}),r=0,f=u.length;r<f;r++)if(i.match(u[r]))return!0;return!1})(n,u)||i.removeAttribute(n.nodeName)})},r=0,s=f.length;r<s;r++)o(r);return u.body.innerHTML}var at,r;t=t&&t.hasOwnProperty("default")?t.default:t;i=i&&i.hasOwnProperty("default")?i.default:i;at="transitionend";r={TRANSITION_END:"bsTransitionEnd",getUID:function(n){for(;n+=~~(1e6*Math.random()),document.getElementById(n););return n},getSelectorFromElement:function(n){var t=n.getAttribute("data-target"),i;t&&"#"!==t||(i=n.getAttribute("href"),t=i&&"#"!==i?i.trim():"");try{return document.querySelector(t)?t:null}catch(n){return null}},getTransitionDurationFromElement:function(n){if(!n)return 0;var i=t(n).css("transition-duration"),r=t(n).css("transition-delay"),u=parseFloat(i),f=parseFloat(r);return u||f?(i=i.split(",")[0],r=r.split(",")[0],1e3*(parseFloat(i)+parseFloat(r))):0},reflow:function(n){return n.offsetHeight},triggerTransitionEnd:function(n){t(n).trigger(at)},supportsTransitionEnd:function(){return Boolean(at)},isElement:function(n){return(n[0]||n).nodeType},typeCheckConfig:function(n,t,i){var u,s;for(u in i)if(Object.prototype.hasOwnProperty.call(i,u)){var e=i[u],f=t[u],o=f&&r.isElement(f)?"element":(s=f,{}.toString.call(s).match(/\s([a-z]+)/i)[1].toLowerCase());if(!new RegExp(e).test(o))throw new Error(n.toUpperCase()+': Option "'+u+'" provided type "'+o+'" but expected type "'+e+'".');}},findShadowRoot:function(n){if(!document.documentElement.attachShadow)return null;if("function"!=typeof n.getRootNode)return n instanceof ShadowRoot?n:n.parentNode?r.findShadowRoot(n.parentNode):null;var t=n.getRootNode();return t instanceof ShadowRoot?t:null}};t.fn.emulateTransitionEnd=cf;t.event.special[r.TRANSITION_END]={bindType:at,delegateType:at,handle:function(n){if(t(n.target).is(this))return n.handleObj.handler.apply(this,arguments)}};var vt="alert",pi="bs.alert",cr="."+pi,lf=t.fn[vt],lr={CLOSE:"close"+cr,CLOSED:"closed"+cr,CLICK_DATA_API:"click"+cr+".data-api"},af="alert",vf="fade",yf="show",it=function(){function n(n){this._element=n}var i=n.prototype;return i.close=function(n){var t=this._element;n&&(t=this._getRootElement(n));this._triggerCloseEvent(t).isDefaultPrevented()||this._removeElement(t)},i.dispose=function(){t.removeData(this._element,pi);this._element=null},i._getRootElement=function(n){var u=r.getSelectorFromElement(n),i=!1;return u&&(i=document.querySelector(u)),i||(i=t(n).closest("."+af)[0]),i},i._triggerCloseEvent=function(n){var i=t.Event(lr.CLOSE);return t(n).trigger(i),i},i._removeElement=function(n){var u=this,i;(t(n).removeClass(yf),t(n).hasClass(vf))?(i=r.getTransitionDurationFromElement(n),t(n).one(r.TRANSITION_END,function(t){return u._destroyElement(n,t)}).emulateTransitionEnd(i)):this._destroyElement(n)},i._destroyElement=function(n){t(n).detach().trigger(lr.CLOSED).remove()},n._jQueryInterface=function(i){return this.each(function(){var u=t(this),r=u.data(pi);r||(r=new n(this),u.data(pi,r));"close"===i&&r[i](this)})},n._handleDismiss=function(n){return function(t){t&&t.preventDefault();n.close(this)}},l(n,null,[{key:"VERSION",get:function(){return"4.3.1"}}]),n}();t(document).on(lr.CLICK_DATA_API,'[data-dismiss="alert"]',it._handleDismiss(new it));t.fn[vt]=it._jQueryInterface;t.fn[vt].Constructor=it;t.fn[vt].noConflict=function(){return t.fn[vt]=lf,it._jQueryInterface};var yt="button",wi="bs.button",ar="."+wi,vr=".data-api",pf=t.fn[yt],pt="active",wf="btn",bf="focus",fu='[data-toggle^="button"]',kf='[data-toggle="buttons"]',df='input:not([type="hidden"])',gf=".active",eu=".btn",ou={CLICK_DATA_API:"click"+ar+vr,FOCUS_BLUR_DATA_API:"focus"+ar+vr+" blur"+ar+vr},wt=function(){function n(n){this._element=n}var i=n.prototype;return i.toggle=function(){var r=!0,f=!0,i=t(this._element).closest(kf)[0],n,u;if(i&&(n=this._element.querySelector(df),n)){if("radio"===n.type&&(n.checked&&this._element.classList.contains(pt)?r=!1:(u=i.querySelector(gf),u&&t(u).removeClass(pt))),r){if(n.hasAttribute("disabled")||i.hasAttribute("disabled")||n.classList.contains("disabled")||i.classList.contains("disabled"))return;n.checked=!this._element.classList.contains(pt);t(n).trigger("change")}n.focus();f=!1}f&&this._element.setAttribute("aria-pressed",!this._element.classList.contains(pt));r&&t(this._element).toggleClass(pt)},i.dispose=function(){t.removeData(this._element,wi);this._element=null},n._jQueryInterface=function(i){return this.each(function(){var r=t(this).data(wi);r||(r=new n(this),t(this).data(wi,r));"toggle"===i&&r[i]()})},l(n,null,[{key:"VERSION",get:function(){return"4.3.1"}}]),n}();t(document).on(ou.CLICK_DATA_API,fu,function(n){n.preventDefault();var i=n.target;t(i).hasClass(wf)||(i=t(i).closest(eu));wt._jQueryInterface.call(t(i),"toggle")}).on(ou.FOCUS_BLUR_DATA_API,fu,function(n){var i=t(n.target).closest(eu)[0];t(i).toggleClass(bf,/^focus(in)?$/.test(n.type))});t.fn[yt]=wt._jQueryInterface;t.fn[yt].Constructor=wt;t.fn[yt].noConflict=function(){return t.fn[yt]=pf,wt._jQueryInterface};var rt="carousel",bt="bs.carousel",o="."+bt,su=".data-api",ne=t.fn[rt],yr={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0,touch:!0},te={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean",touch:"boolean"},bi="next",ki="prev",ie="left",re="right",s={SLIDE:"slide"+o,SLID:"slid"+o,KEYDOWN:"keydown"+o,MOUSEENTER:"mouseenter"+o,MOUSELEAVE:"mouseleave"+o,TOUCHSTART:"touchstart"+o,TOUCHMOVE:"touchmove"+o,TOUCHEND:"touchend"+o,POINTERDOWN:"pointerdown"+o,POINTERUP:"pointerup"+o,DRAG_START:"dragstart"+o,LOAD_DATA_API:"load"+o+su,CLICK_DATA_API:"click"+o+su},ue="carousel",w="active",fe="slide",ee="carousel-item-right",oe="carousel-item-left",se="carousel-item-next",he="carousel-item-prev",ce="pointer-event",le=".active",pr=".active.carousel-item",ae=".carousel-item",ve=".carousel-item img",ye=".carousel-item-next, .carousel-item-prev",pe=".carousel-indicators",we='[data-ride="carousel"]',hu={TOUCH:"touch",PEN:"pen"},ut=function(){function i(n,t){this._items=null;this._interval=null;this._activeElement=null;this._isPaused=!1;this._isSliding=!1;this.touchTimeout=null;this.touchStartX=0;this.touchDeltaX=0;this._config=this._getConfig(t);this._element=n;this._indicatorsElement=this._element.querySelector(pe);this._touchSupported="ontouchstart"in document.documentElement||0<navigator.maxTouchPoints;this._pointerEvent=Boolean(window.PointerEvent||window.MSPointerEvent);this._addEventListeners()}var n=i.prototype;return n.next=function(){this._isSliding||this._slide(bi)},n.nextWhenVisible=function(){!document.hidden&&t(this._element).is(":visible")&&"hidden"!==t(this._element).css("visibility")&&this.next()},n.prev=function(){this._isSliding||this._slide(ki)},n.pause=function(n){n||(this._isPaused=!0);this._element.querySelector(ye)&&(r.triggerTransitionEnd(this._element),this.cycle(!0));clearInterval(this._interval);this._interval=null},n.cycle=function(n){n||(this._isPaused=!1);this._interval&&(clearInterval(this._interval),this._interval=null);this._config.interval&&!this._isPaused&&(this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))},n.to=function(n){var u=this,i,r;if(this._activeElement=this._element.querySelector(pr),i=this._getItemIndex(this._activeElement),!(n>this._items.length-1||n<0))if(this._isSliding)t(this._element).one(s.SLID,function(){return u.to(n)});else{if(i===n)return this.pause(),void this.cycle();r=i<n?bi:ki;this._slide(r,this._items[n])}},n.dispose=function(){t(this._element).off(o);t.removeData(this._element,bt);this._items=null;this._config=null;this._element=null;this._interval=null;this._isPaused=null;this._isSliding=null;this._activeElement=null;this._indicatorsElement=null},n._getConfig=function(n){return n=f({},yr,n),r.typeCheckConfig(rt,n,te),n},n._handleSwipe=function(){var t=Math.abs(this.touchDeltaX),n;t<=40||(n=t/this.touchDeltaX,0<n&&this.prev(),n<0&&this.next())},n._addEventListeners=function(){var n=this;this._config.keyboard&&t(this._element).on(s.KEYDOWN,function(t){return n._keydown(t)});"hover"===this._config.pause&&t(this._element).on(s.MOUSEENTER,function(t){return n.pause(t)}).on(s.MOUSELEAVE,function(t){return n.cycle(t)});this._config.touch&&this._addTouchEventListeners()},n._addTouchEventListeners=function(){var n=this,i,r;this._touchSupported&&(i=function(t){n._pointerEvent&&hu[t.originalEvent.pointerType.toUpperCase()]?n.touchStartX=t.originalEvent.clientX:n._pointerEvent||(n.touchStartX=t.originalEvent.touches[0].clientX)},r=function(t){n._pointerEvent&&hu[t.originalEvent.pointerType.toUpperCase()]&&(n.touchDeltaX=t.originalEvent.clientX-n.touchStartX);n._handleSwipe();"hover"===n._config.pause&&(n.pause(),n.touchTimeout&&clearTimeout(n.touchTimeout),n.touchTimeout=setTimeout(function(t){return n.cycle(t)},500+n._config.interval))},t(this._element.querySelectorAll(ve)).on(s.DRAG_START,function(n){return n.preventDefault()}),this._pointerEvent?(t(this._element).on(s.POINTERDOWN,function(n){return i(n)}),t(this._element).on(s.POINTERUP,function(n){return r(n)}),this._element.classList.add(ce)):(t(this._element).on(s.TOUCHSTART,function(n){return i(n)}),t(this._element).on(s.TOUCHMOVE,function(t){var i;n.touchDeltaX=(i=t).originalEvent.touches&&1<i.originalEvent.touches.length?0:i.originalEvent.touches[0].clientX-n.touchStartX}),t(this._element).on(s.TOUCHEND,function(n){return r(n)})))},n._keydown=function(n){if(!/input|textarea/i.test(n.target.tagName))switch(n.which){case 37:n.preventDefault();this.prev();break;case 39:n.preventDefault();this.next()}},n._getItemIndex=function(n){return this._items=n&&n.parentNode?[].slice.call(n.parentNode.querySelectorAll(ae)):[],this._items.indexOf(n)},n._getItemByDirection=function(n,t){var u=n===bi,f=n===ki,i=this._getItemIndex(t),e=this._items.length-1,r;return(f&&0===i||u&&i===e)&&!this._config.wrap?t:(r=(i+(n===ki?-1:1))%this._items.length,-1===r?this._items[this._items.length-1]:this._items[r])},n._triggerSlideEvent=function(n,i){var u=this._getItemIndex(n),f=this._getItemIndex(this._element.querySelector(pr)),r=t.Event(s.SLIDE,{relatedTarget:n,direction:i,from:f,to:u});return t(this._element).trigger(r),r},n._setActiveIndicatorElement=function(n){var r,i;this._indicatorsElement&&(r=[].slice.call(this._indicatorsElement.querySelectorAll(le)),t(r).removeClass(w),i=this._indicatorsElement.children[this._getItemIndex(n)],i&&t(i).addClass(w))},n._slide=function(n,i){var e,o,h,a=this,f=this._element.querySelector(pr),p=this._getItemIndex(f),u=i||f&&this._getItemByDirection(n,f),b=this._getItemIndex(u),v=Boolean(this._interval),c,l,y;(h=n===bi?(e=oe,o=se,ie):(e=ee,o=he,re),u&&t(u).hasClass(w))?this._isSliding=!1:!this._triggerSlideEvent(u,h).isDefaultPrevented()&&f&&u&&(this._isSliding=!0,v&&this.pause(),this._setActiveIndicatorElement(u),c=t.Event(s.SLID,{relatedTarget:u,direction:h,from:p,to:b}),t(this._element).hasClass(fe)?(t(u).addClass(o),r.reflow(u),t(f).addClass(e),t(u).addClass(e),l=parseInt(u.getAttribute("data-interval"),10),this._config.interval=l?(this._config.defaultInterval=this._config.defaultInterval||this._config.interval,l):this._config.defaultInterval||this._config.interval,y=r.getTransitionDurationFromElement(f),t(f).one(r.TRANSITION_END,function(){t(u).removeClass(e+" "+o).addClass(w);t(f).removeClass(w+" "+o+" "+e);a._isSliding=!1;setTimeout(function(){return t(a._element).trigger(c)},0)}).emulateTransitionEnd(y)):(t(f).removeClass(w),t(u).addClass(w),this._isSliding=!1,t(this._element).trigger(c)),v&&this.cycle())},i._jQueryInterface=function(n){return this.each(function(){var r=t(this).data(bt),u=f({},yr,t(this).data()),e;if("object"==typeof n&&(u=f({},u,n)),e="string"==typeof n?n:u.slide,r||(r=new i(this,u),t(this).data(bt,r)),"number"==typeof n)r.to(n);else if("string"==typeof e){if("undefined"==typeof r[e])throw new TypeError('No method named "'+e+'"');r[e]()}else u.interval&&u.ride&&(r.pause(),r.cycle())})},i._dataApiClickHandler=function(n){var s=r.getSelectorFromElement(this),u,o,e;s&&(u=t(s)[0],u&&t(u).hasClass(ue)&&(o=f({},t(u).data(),t(this).data()),e=this.getAttribute("data-slide-to"),e&&(o.interval=!1),i._jQueryInterface.call(t(u),o),e&&t(u).data(bt).to(e),n.preventDefault()))},l(i,null,[{key:"VERSION",get:function(){return"4.3.1"}},{key:"Default",get:function(){return yr}}]),i}();t(document).on(s.CLICK_DATA_API,"[data-slide], [data-slide-to]",ut._dataApiClickHandler);t(window).on(s.LOAD_DATA_API,function(){for(var i,r=[].slice.call(document.querySelectorAll(we)),n=0,u=r.length;n<u;n++)i=t(r[n]),ut._jQueryInterface.call(i,i.data())});t.fn[rt]=ut._jQueryInterface;t.fn[rt].Constructor=ut;t.fn[rt].noConflict=function(){return t.fn[rt]=ne,ut._jQueryInterface};var ft="collapse",b="bs.collapse",kt="."+b,be=t.fn[ft],wr={toggle:!0,parent:""},ke={toggle:"boolean",parent:"(string|element)"},dt={SHOW:"show"+kt,SHOWN:"shown"+kt,HIDE:"hide"+kt,HIDDEN:"hidden"+kt,CLICK_DATA_API:"click"+kt+".data-api"},k="show",gt="collapse",di="collapsing",br="collapsed",cu="width",de="height",ge=".show, .collapsing",lu='[data-toggle="collapse"]',ni=function(){function i(n,t){this._isTransitioning=!1;this._element=n;this._config=this._getConfig(t);this._triggerArray=[].slice.call(document.querySelectorAll('[data-toggle="collapse"][href="#'+n.id+'"],[data-toggle="collapse"][data-target="#'+n.id+'"]'));for(var f=[].slice.call(document.querySelectorAll(lu)),i=0,o=f.length;i<o;i++){var e=f[i],u=r.getSelectorFromElement(e),s=[].slice.call(document.querySelectorAll(u)).filter(function(t){return t===n});null!==u&&0<s.length&&(this._selector=u,this._triggerArray.push(e))}this._parent=this._config.parent?this._getParent():null;this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray);this._config.toggle&&this.toggle()}var n=i.prototype;return n.toggle=function(){t(this._element).hasClass(k)?this.hide():this.show()},n.show=function(){var n,e,u=this,o,f,s,h;this._isTransitioning||t(this._element).hasClass(k)||(this._parent&&0===(n=[].slice.call(this._parent.querySelectorAll(ge)).filter(function(n){return"string"==typeof u._config.parent?n.getAttribute("data-parent")===u._config.parent:n.classList.contains(gt)})).length&&(n=null),n&&(e=t(n).not(this._selector).data(b))&&e._isTransitioning)||(o=t.Event(dt.SHOW),(t(this._element).trigger(o),o.isDefaultPrevented())||(n&&(i._jQueryInterface.call(t(n).not(this._selector),"hide"),e||t(n).data(b,null)),f=this._getDimension(),t(this._element).removeClass(gt).addClass(di),this._element.style[f]=0,this._triggerArray.length&&t(this._triggerArray).removeClass(br).attr("aria-expanded",!0),this.setTransitioning(!0),s="scroll"+(f[0].toUpperCase()+f.slice(1)),h=r.getTransitionDurationFromElement(this._element),t(this._element).one(r.TRANSITION_END,function(){t(u._element).removeClass(di).addClass(gt).addClass(k);u._element.style[f]="";u.setTransitioning(!1);t(u._element).trigger(dt.SHOWN)}).emulateTransitionEnd(h),this._element.style[f]=this._element[s]+"px"))},n.hide=function(){var s=this,u,n,f,i,e,o,h;if(!this._isTransitioning&&t(this._element).hasClass(k)&&(u=t.Event(dt.HIDE),t(this._element).trigger(u),!u.isDefaultPrevented())){if(n=this._getDimension(),this._element.style[n]=this._element.getBoundingClientRect()[n]+"px",r.reflow(this._element),t(this._element).addClass(di).removeClass(gt).removeClass(k),f=this._triggerArray.length,0<f)for(i=0;i<f;i++)e=this._triggerArray[i],o=r.getSelectorFromElement(e),null!==o&&(t([].slice.call(document.querySelectorAll(o))).hasClass(k)||t(e).addClass(br).attr("aria-expanded",!1));this.setTransitioning(!0);this._element.style[n]="";h=r.getTransitionDurationFromElement(this._element);t(this._element).one(r.TRANSITION_END,function(){s.setTransitioning(!1);t(s._element).removeClass(di).addClass(gt).trigger(dt.HIDDEN)}).emulateTransitionEnd(h)}},n.setTransitioning=function(n){this._isTransitioning=n},n.dispose=function(){t.removeData(this._element,b);this._config=null;this._parent=null;this._element=null;this._triggerArray=null;this._isTransitioning=null},n._getConfig=function(n){return(n=f({},wr,n)).toggle=Boolean(n.toggle),r.typeCheckConfig(ft,n,ke),n},n._getDimension=function(){return t(this._element).hasClass(cu)?cu:de},n._getParent=function(){var n,e=this,u,f;return r.isElement(this._config.parent)?(n=this._config.parent,"undefined"!=typeof this._config.parent.jquery&&(n=this._config.parent[0])):n=document.querySelector(this._config.parent),u='[data-toggle="collapse"][data-parent="'+this._config.parent+'"]',f=[].slice.call(n.querySelectorAll(u)),t(f).each(function(n,t){e._addAriaAndCollapsedClass(i._getTargetFromElement(t),[t])}),n},n._addAriaAndCollapsedClass=function(n,i){var r=t(n).hasClass(k);i.length&&t(i).toggleClass(br,!r).attr("aria-expanded",r)},i._getTargetFromElement=function(n){var t=r.getSelectorFromElement(n);return t?document.querySelector(t):null},i._jQueryInterface=function(n){return this.each(function(){var u=t(this),r=u.data(b),e=f({},wr,u.data(),"object"==typeof n&&n?n:{});if(!r&&e.toggle&&/show|hide/.test(n)&&(e.toggle=!1),r||(r=new i(this,e),u.data(b,r)),"string"==typeof n){if("undefined"==typeof r[n])throw new TypeError('No method named "'+n+'"');r[n]()}})},l(i,null,[{key:"VERSION",get:function(){return"4.3.1"}},{key:"Default",get:function(){return wr}}]),i}();t(document).on(dt.CLICK_DATA_API,lu,function(n){"A"===n.currentTarget.tagName&&n.preventDefault();var i=t(this),u=r.getSelectorFromElement(this),f=[].slice.call(document.querySelectorAll(u));t(f).each(function(){var n=t(this),r=n.data(b)?"toggle":i.data();ni._jQueryInterface.call(n,r)})});t.fn[ft]=ni._jQueryInterface;t.fn[ft].Constructor=ni;t.fn[ft].noConflict=function(){return t.fn[ft]=be,ni._jQueryInterface};var et="dropdown",ti="bs.dropdown",y="."+ti,kr=".data-api",no=t.fn[et],to=new RegExp("38|40|27"),e={HIDE:"hide"+y,HIDDEN:"hidden"+y,SHOW:"show"+y,SHOWN:"shown"+y,CLICK:"click"+y,CLICK_DATA_API:"click"+y+kr,KEYDOWN_DATA_API:"keydown"+y+kr,KEYUP_DATA_API:"keyup"+y+kr},gi="disabled",h="show",io="dropup",ro="dropright",uo="dropleft",au="dropdown-menu-right",fo="position-static",nr='[data-toggle="dropdown"]',dr=".dropdown-menu",eo=".navbar-nav",oo=".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",so="top-start",ho="top-end",co="bottom-start",lo="bottom-end",ao="right-start",vo="left-start",yo={offset:0,flip:!0,boundary:"scrollParent",reference:"toggle",display:"dynamic"},po={offset:"(number|string|function)",flip:"boolean",boundary:"(string|element)",reference:"(string|element)",display:"string"},p=function(){function n(n,t){this._element=n;this._popper=null;this._config=this._getConfig(t);this._menu=this._getMenuElement();this._inNavbar=this._detectNavbar();this._addEventListeners()}var u=n.prototype;return u.toggle=function(){var u,c,o,s,f;if(!this._element.disabled&&!t(this._element).hasClass(gi)&&(u=n._getParentFromElement(this._element),c=t(this._menu).hasClass(h),(n._clearMenus(),!c)&&(o={relatedTarget:this._element},s=t.Event(e.SHOW,o),t(u).trigger(s),!s.isDefaultPrevented()))){if(!this._inNavbar){if("undefined"==typeof i)throw new TypeError("Bootstrap's dropdowns require Popper.js (https://popper.js.org/)");f=this._element;"parent"===this._config.reference?f=u:r.isElement(this._config.reference)&&(f=this._config.reference,"undefined"!=typeof this._config.reference.jquery&&(f=this._config.reference[0]));"scrollParent"!==this._config.boundary&&t(u).addClass(fo);this._popper=new i(f,this._menu,this._getPopperConfig())}"ontouchstart"in document.documentElement&&0===t(u).closest(eo).length&&t(document.body).children().on("mouseover",null,t.noop);this._element.focus();this._element.setAttribute("aria-expanded",!0);t(this._menu).toggleClass(h);t(u).toggleClass(h).trigger(t.Event(e.SHOWN,o))}},u.show=function(){if(!(this._element.disabled||t(this._element).hasClass(gi)||t(this._menu).hasClass(h))){var i={relatedTarget:this._element},r=t.Event(e.SHOW,i),u=n._getParentFromElement(this._element);t(u).trigger(r);r.isDefaultPrevented()||(t(this._menu).toggleClass(h),t(u).toggleClass(h).trigger(t.Event(e.SHOWN,i)))}},u.hide=function(){if(!this._element.disabled&&!t(this._element).hasClass(gi)&&t(this._menu).hasClass(h)){var i={relatedTarget:this._element},r=t.Event(e.HIDE,i),u=n._getParentFromElement(this._element);t(u).trigger(r);r.isDefaultPrevented()||(t(this._menu).toggleClass(h),t(u).toggleClass(h).trigger(t.Event(e.HIDDEN,i)))}},u.dispose=function(){t.removeData(this._element,ti);t(this._element).off(y);this._element=null;(this._menu=null)!==this._popper&&(this._popper.destroy(),this._popper=null)},u.update=function(){this._inNavbar=this._detectNavbar();null!==this._popper&&this._popper.scheduleUpdate()},u._addEventListeners=function(){var n=this;t(this._element).on(e.CLICK,function(t){t.preventDefault();t.stopPropagation();n.toggle()})},u._getConfig=function(n){return n=f({},this.constructor.Default,t(this._element).data(),n),r.typeCheckConfig(et,n,this.constructor.DefaultType),n},u._getMenuElement=function(){if(!this._menu){var t=n._getParentFromElement(this._element);t&&(this._menu=t.querySelector(dr))}return this._menu},u._getPlacement=function(){var i=t(this._element.parentNode),n=co;return i.hasClass(io)?(n=so,t(this._menu).hasClass(au)&&(n=ho)):i.hasClass(ro)?n=ao:i.hasClass(uo)?n=vo:t(this._menu).hasClass(au)&&(n=lo),n},u._detectNavbar=function(){return 0<t(this._element).closest(".navbar").length},u._getOffset=function(){var t=this,n={};return"function"==typeof this._config.offset?n.fn=function(n){return n.offsets=f({},n.offsets,t._config.offset(n.offsets,t._element)||{}),n}:n.offset=this._config.offset,n},u._getPopperConfig=function(){var n={placement:this._getPlacement(),modifiers:{offset:this._getOffset(),flip:{enabled:this._config.flip},preventOverflow:{boundariesElement:this._config.boundary}}};return"static"===this._config.display&&(n.modifiers.applyStyle={enabled:!1}),n},n._jQueryInterface=function(i){return this.each(function(){var r=t(this).data(ti);if(r||(r=new n(this,"object"==typeof i?i:null),t(this).data(ti,r)),"string"==typeof i){if("undefined"==typeof r[i])throw new TypeError('No method named "'+i+'"');r[i]()}})},n._clearMenus=function(i){var l,s;if(!i||3!==i.which&&("keyup"!==i.type||9===i.which))for(var u=[].slice.call(document.querySelectorAll(nr)),r=0,a=u.length;r<a;r++){var f=n._getParentFromElement(u[r]),c=t(u[r]).data(ti),o={relatedTarget:u[r]};(i&&"click"===i.type&&(o.clickEvent=i),c)&&(l=c._menu,!t(f).hasClass(h)||i&&("click"===i.type&&/input|textarea/i.test(i.target.tagName)||"keyup"===i.type&&9===i.which)&&t.contains(f,i.target)||(s=t.Event(e.HIDE,o),t(f).trigger(s),s.isDefaultPrevented()||("ontouchstart"in document.documentElement&&t(document.body).children().off("mouseover",null,t.noop),u[r].setAttribute("aria-expanded","false"),t(l).removeClass(h),t(f).removeClass(h).trigger(t.Event(e.HIDDEN,o)))))}},n._getParentFromElement=function(n){var t,i=r.getSelectorFromElement(n);return i&&(t=document.querySelector(i)),t||n.parentNode},n._dataApiKeydownHandler=function(i){var f,e,u,r,o;(/input|textarea/i.test(i.target.tagName)?32===i.which||27!==i.which&&(40!==i.which&&38!==i.which||t(i.target).closest(dr).length):!to.test(i.which))||(i.preventDefault(),i.stopPropagation(),this.disabled||t(this).hasClass(gi))||(f=n._getParentFromElement(this),e=t(f).hasClass(h),e&&(!e||27!==i.which&&32!==i.which)?(u=[].slice.call(f.querySelectorAll(oo)),0!==u.length&&(r=u.indexOf(i.target),38===i.which&&0<r&&r--,40===i.which&&r<u.length-1&&r++,r<0&&(r=0),u[r].focus())):(27===i.which&&(o=f.querySelector(nr),t(o).trigger("focus")),t(this).trigger("click")))},l(n,null,[{key:"VERSION",get:function(){return"4.3.1"}},{key:"Default",get:function(){return yo}},{key:"DefaultType",get:function(){return po}}]),n}();t(document).on(e.KEYDOWN_DATA_API,nr,p._dataApiKeydownHandler).on(e.KEYDOWN_DATA_API,dr,p._dataApiKeydownHandler).on(e.CLICK_DATA_API+" "+e.KEYUP_DATA_API,p._clearMenus).on(e.CLICK_DATA_API,nr,function(n){n.preventDefault();n.stopPropagation();p._jQueryInterface.call(t(this),"toggle")}).on(e.CLICK_DATA_API,".dropdown form",function(n){n.stopPropagation()});t.fn[et]=p._jQueryInterface;t.fn[et].Constructor=p;t.fn[et].noConflict=function(){return t.fn[et]=no,p._jQueryInterface};var ot="modal",ii="bs.modal",c="."+ii,wo=t.fn[ot],gr={backdrop:!0,keyboard:!0,focus:!0,show:!0},bo={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean",show:"boolean"},u={HIDE:"hide"+c,HIDDEN:"hidden"+c,SHOW:"show"+c,SHOWN:"shown"+c,FOCUSIN:"focusin"+c,RESIZE:"resize"+c,CLICK_DISMISS:"click.dismiss"+c,KEYDOWN_DISMISS:"keydown.dismiss"+c,MOUSEUP_DISMISS:"mouseup.dismiss"+c,MOUSEDOWN_DISMISS:"mousedown.dismiss"+c,CLICK_DATA_API:"click"+c+".data-api"},ko="modal-dialog-scrollable",go="modal-scrollbar-measure",ns="modal-backdrop",vu="modal-open",st="fade",tr="show",ts=".modal-dialog",is=".modal-body",rs='[data-dismiss="modal"]',yu=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",pu=".sticky-top",ri=function(){function i(n,t){this._config=this._getConfig(t);this._element=n;this._dialog=n.querySelector(ts);this._backdrop=null;this._isShown=!1;this._isBodyOverflowing=!1;this._ignoreBackdropClick=!1;this._isTransitioning=!1;this._scrollbarWidth=0}var n=i.prototype;return n.toggle=function(n){return this._isShown?this.hide():this.show(n)},n.show=function(n){var i=this,r;this._isShown||this._isTransitioning||(t(this._element).hasClass(st)&&(this._isTransitioning=!0),r=t.Event(u.SHOW,{relatedTarget:n}),t(this._element).trigger(r),this._isShown||r.isDefaultPrevented()||(this._isShown=!0,this._checkScrollbar(),this._setScrollbar(),this._adjustDialog(),this._setEscapeEvent(),this._setResizeEvent(),t(this._element).on(u.CLICK_DISMISS,rs,function(n){return i.hide(n)}),t(this._dialog).on(u.MOUSEDOWN_DISMISS,function(){t(i._element).one(u.MOUSEUP_DISMISS,function(n){t(n.target).is(i._element)&&(i._ignoreBackdropClick=!0)})}),this._showBackdrop(function(){return i._showElement(n)})))},n.hide=function(n){var o=this,i,f,e;(n&&n.preventDefault(),this._isShown&&!this._isTransitioning)&&(i=t.Event(u.HIDE),(t(this._element).trigger(i),this._isShown&&!i.isDefaultPrevented())&&(this._isShown=!1,f=t(this._element).hasClass(st),(f&&(this._isTransitioning=!0),this._setEscapeEvent(),this._setResizeEvent(),t(document).off(u.FOCUSIN),t(this._element).removeClass(tr),t(this._element).off(u.CLICK_DISMISS),t(this._dialog).off(u.MOUSEDOWN_DISMISS),f)?(e=r.getTransitionDurationFromElement(this._element),t(this._element).one(r.TRANSITION_END,function(n){return o._hideModal(n)}).emulateTransitionEnd(e)):this._hideModal()))},n.dispose=function(){[window,this._element,this._dialog].forEach(function(n){return t(n).off(c)});t(document).off(u.FOCUSIN);t.removeData(this._element,ii);this._config=null;this._element=null;this._dialog=null;this._backdrop=null;this._isShown=null;this._isBodyOverflowing=null;this._ignoreBackdropClick=null;this._isTransitioning=null;this._scrollbarWidth=null},n.handleUpdate=function(){this._adjustDialog()},n._getConfig=function(n){return n=f({},gr,n),r.typeCheckConfig(ot,n,bo),n},n._showElement=function(n){var i=this,e=t(this._element).hasClass(st),o,f,s;this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.appendChild(this._element);this._element.style.display="block";this._element.removeAttribute("aria-hidden");this._element.setAttribute("aria-modal",!0);t(this._dialog).hasClass(ko)?this._dialog.querySelector(is).scrollTop=0:this._element.scrollTop=0;e&&r.reflow(this._element);t(this._element).addClass(tr);this._config.focus&&this._enforceFocus();o=t.Event(u.SHOWN,{relatedTarget:n});f=function(){i._config.focus&&i._element.focus();i._isTransitioning=!1;t(i._element).trigger(o)};e?(s=r.getTransitionDurationFromElement(this._dialog),t(this._dialog).one(r.TRANSITION_END,f).emulateTransitionEnd(s)):f()},n._enforceFocus=function(){var n=this;t(document).off(u.FOCUSIN).on(u.FOCUSIN,function(i){document!==i.target&&n._element!==i.target&&0===t(n._element).has(i.target).length&&n._element.focus()})},n._setEscapeEvent=function(){var n=this;this._isShown&&this._config.keyboard?t(this._element).on(u.KEYDOWN_DISMISS,function(t){27===t.which&&(t.preventDefault(),n.hide())}):this._isShown||t(this._element).off(u.KEYDOWN_DISMISS)},n._setResizeEvent=function(){var n=this;this._isShown?t(window).on(u.RESIZE,function(t){return n.handleUpdate(t)}):t(window).off(u.RESIZE)},n._hideModal=function(){var n=this;this._element.style.display="none";this._element.setAttribute("aria-hidden",!0);this._element.removeAttribute("aria-modal");this._isTransitioning=!1;this._showBackdrop(function(){t(document.body).removeClass(vu);n._resetAdjustments();n._resetScrollbar();t(n._element).trigger(u.HIDDEN)})},n._removeBackdrop=function(){this._backdrop&&(t(this._backdrop).remove(),this._backdrop=null)},n._showBackdrop=function(n){var i=this,f=t(this._element).hasClass(st)?st:"",o,e,s;if(this._isShown&&this._config.backdrop){if(this._backdrop=document.createElement("div"),this._backdrop.className=ns,f&&this._backdrop.classList.add(f),t(this._backdrop).appendTo(document.body),t(this._element).on(u.CLICK_DISMISS,function(n){i._ignoreBackdropClick?i._ignoreBackdropClick=!1:n.target===n.currentTarget&&("static"===i._config.backdrop?i._element.focus():i.hide())}),f&&r.reflow(this._backdrop),t(this._backdrop).addClass(tr),!n)return;if(!f)return void n();o=r.getTransitionDurationFromElement(this._backdrop);t(this._backdrop).one(r.TRANSITION_END,n).emulateTransitionEnd(o)}else!this._isShown&&this._backdrop?(t(this._backdrop).removeClass(tr),e=function(){i._removeBackdrop();n&&n()},t(this._element).hasClass(st)?(s=r.getTransitionDurationFromElement(this._backdrop),t(this._backdrop).one(r.TRANSITION_END,e).emulateTransitionEnd(s)):e()):n&&n()},n._adjustDialog=function(){var n=this._element.scrollHeight>document.documentElement.clientHeight;!this._isBodyOverflowing&&n&&(this._element.style.paddingLeft=this._scrollbarWidth+"px");this._isBodyOverflowing&&!n&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},n._resetAdjustments=function(){this._element.style.paddingLeft="";this._element.style.paddingRight=""},n._checkScrollbar=function(){var n=document.body.getBoundingClientRect();this._isBodyOverflowing=n.left+n.right<window.innerWidth;this._scrollbarWidth=this._getScrollbarWidth()},n._setScrollbar=function(){var n=this,i,r,u,f;this._isBodyOverflowing&&(i=[].slice.call(document.querySelectorAll(yu)),r=[].slice.call(document.querySelectorAll(pu)),t(i).each(function(i,r){var u=r.style.paddingRight,f=t(r).css("padding-right");t(r).data("padding-right",u).css("padding-right",parseFloat(f)+n._scrollbarWidth+"px")}),t(r).each(function(i,r){var u=r.style.marginRight,f=t(r).css("margin-right");t(r).data("margin-right",u).css("margin-right",parseFloat(f)-n._scrollbarWidth+"px")}),u=document.body.style.paddingRight,f=t(document.body).css("padding-right"),t(document.body).data("padding-right",u).css("padding-right",parseFloat(f)+this._scrollbarWidth+"px"));t(document.body).addClass(vu)},n._resetScrollbar=function(){var r=[].slice.call(document.querySelectorAll(yu)),n,i;t(r).each(function(n,i){var r=t(i).data("padding-right");t(i).removeData("padding-right");i.style.paddingRight=r||""});n=[].slice.call(document.querySelectorAll(""+pu));t(n).each(function(n,i){var r=t(i).data("margin-right");"undefined"!=typeof r&&t(i).css("margin-right",r).removeData("margin-right")});i=t(document.body).data("padding-right");t(document.body).removeData("padding-right");document.body.style.paddingRight=i||""},n._getScrollbarWidth=function(){var n=document.createElement("div"),t;return n.className=go,document.body.appendChild(n),t=n.getBoundingClientRect().width-n.clientWidth,document.body.removeChild(n),t},i._jQueryInterface=function(n,r){return this.each(function(){var u=t(this).data(ii),e=f({},gr,t(this).data(),"object"==typeof n&&n?n:{});if(u||(u=new i(this,e),t(this).data(ii,u)),"string"==typeof n){if("undefined"==typeof u[n])throw new TypeError('No method named "'+n+'"');u[n](r)}else e.show&&u.show(r)})},l(i,null,[{key:"VERSION",get:function(){return"4.3.1"}},{key:"Default",get:function(){return gr}}]),i}();t(document).on(u.CLICK_DATA_API,'[data-toggle="modal"]',function(n){var i,e=this,o=r.getSelectorFromElement(this),s,h;o&&(i=document.querySelector(o));s=t(i).data(ii)?"toggle":f({},t(i).data(),t(this).data());"A"!==this.tagName&&"AREA"!==this.tagName||n.preventDefault();h=t(i).one(u.SHOW,function(n){n.isDefaultPrevented()||h.one(u.HIDDEN,function(){t(e).is(":visible")&&e.focus()})});ri._jQueryInterface.call(t(i),s,this)});t.fn[ot]=ri._jQueryInterface;t.fn[ot].Constructor=ri;t.fn[ot].noConflict=function(){return t.fn[ot]=wo,ri._jQueryInterface};var us=["background","cite","href","itemtype","longdesc","poster","src","xlink:href"],fs=/^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi,es=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i;var d="tooltip",ir="bs.tooltip",a="."+ir,os=t.fn[d],bu="bs-tooltip",ss=new RegExp("(^|\\s)"+bu+"\\S+","g"),hs=["sanitize","whiteList","sanitizeFn"],cs={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(number|string|function)",container:"(string|element|boolean)",fallbackPlacement:"(string|array)",boundary:"(string|element)",sanitize:"boolean",sanitizeFn:"(null|function)",whiteList:"object"},ls={AUTO:"auto",TOP:"top",RIGHT:"right",BOTTOM:"bottom",LEFT:"left"},as={animation:!0,template:'<div class="tooltip" role="tooltip"><div class="arrow"><\/div><div class="tooltip-inner"><\/div><\/div>',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:0,container:!1,fallbackPlacement:"flip",boundary:"scrollParent",sanitize:!0,sanitizeFn:null,whiteList:{"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]}},ui="show",nu="out",vs={HIDE:"hide"+a,HIDDEN:"hidden"+a,SHOW:"show"+a,SHOWN:"shown"+a,INSERTED:"inserted"+a,CLICK:"click"+a,FOCUSIN:"focusin"+a,FOCUSOUT:"focusout"+a,MOUSEENTER:"mouseenter"+a,MOUSELEAVE:"mouseleave"+a},fi="fade",ei="show",ys=".tooltip-inner",ps=".arrow",oi="hover",tu="focus",ws="click",bs="manual",g=function(){function u(n,t){if("undefined"==typeof i)throw new TypeError("Bootstrap's tooltips require Popper.js (https://popper.js.org/)");this._isEnabled=!0;this._timeout=0;this._hoverState="";this._activeTrigger={};this._popper=null;this.element=n;this.config=this._getConfig(t);this.tip=null;this._setListeners()}var n=u.prototype;return n.enable=function(){this._isEnabled=!0},n.disable=function(){this._isEnabled=!1},n.toggleEnabled=function(){this._isEnabled=!this._isEnabled},n.toggle=function(n){if(this._isEnabled)if(n){var r=this.constructor.DATA_KEY,i=t(n.currentTarget).data(r);i||(i=new this.constructor(n.currentTarget,this._getDelegateConfig()),t(n.currentTarget).data(r,i));i._activeTrigger.click=!i._activeTrigger.click;i._isWithActiveTrigger()?i._enter(null,i):i._leave(null,i)}else{if(t(this.getTipElement()).hasClass(ei))return void this._leave(null,this);this._enter(null,this)}},n.dispose=function(){clearTimeout(this._timeout);t.removeData(this.element,this.constructor.DATA_KEY);t(this.element).off(this.constructor.EVENT_KEY);t(this.element).closest(".modal").off("hide.bs.modal");this.tip&&t(this.tip).remove();this._isEnabled=null;this._timeout=null;this._hoverState=null;(this._activeTrigger=null)!==this._popper&&this._popper.destroy();this._popper=null;this.element=null;this.config=null;this.tip=null},n.show=function(){var n=this,f,e,c,u,o,l,s,a,h,v;if("none"===t(this.element).css("display"))throw new Error("Please use show on visible elements");if(f=t.Event(this.constructor.Event.SHOW),this.isWithContent()&&this._isEnabled){if(t(this.element).trigger(f),e=r.findShadowRoot(this.element),c=t.contains(null!==e?e:this.element.ownerDocument.documentElement,this.element),f.isDefaultPrevented()||!c)return;u=this.getTipElement();o=r.getUID(this.constructor.NAME);u.setAttribute("id",o);this.element.setAttribute("aria-describedby",o);this.setContent();this.config.animation&&t(u).addClass(fi);l="function"==typeof this.config.placement?this.config.placement.call(this,u,this.element):this.config.placement;s=this._getAttachment(l);this.addAttachmentClass(s);a=this._getContainer();t(u).data(this.constructor.DATA_KEY,this);t.contains(this.element.ownerDocument.documentElement,this.tip)||t(u).appendTo(a);t(this.element).trigger(this.constructor.Event.INSERTED);this._popper=new i(this.element,u,{placement:s,modifiers:{offset:this._getOffset(),flip:{behavior:this.config.fallbackPlacement},arrow:{element:ps},preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function(t){t.originalPlacement!==t.placement&&n._handlePopperPlacementChange(t)},onUpdate:function(t){return n._handlePopperPlacementChange(t)}});t(u).addClass(ei);"ontouchstart"in document.documentElement&&t(document.body).children().on("mouseover",null,t.noop);h=function(){n.config.animation&&n._fixTransition();var i=n._hoverState;n._hoverState=null;t(n.element).trigger(n.constructor.Event.SHOWN);i===nu&&n._leave(null,n)};t(this.tip).hasClass(fi)?(v=r.getTransitionDurationFromElement(this.tip),t(this.tip).one(r.TRANSITION_END,h).emulateTransitionEnd(v)):h()}},n.hide=function(n){var i=this,u=this.getTipElement(),f=t.Event(this.constructor.Event.HIDE),e=function(){i._hoverState!==ui&&u.parentNode&&u.parentNode.removeChild(u);i._cleanTipClass();i.element.removeAttribute("aria-describedby");t(i.element).trigger(i.constructor.Event.HIDDEN);null!==i._popper&&i._popper.destroy();n&&n()},o;(t(this.element).trigger(f),f.isDefaultPrevented())||((t(u).removeClass(ei),"ontouchstart"in document.documentElement&&t(document.body).children().off("mouseover",null,t.noop),this._activeTrigger[ws]=!1,this._activeTrigger[tu]=!1,this._activeTrigger[oi]=!1,t(this.tip).hasClass(fi))?(o=r.getTransitionDurationFromElement(u),t(u).one(r.TRANSITION_END,e).emulateTransitionEnd(o)):e(),this._hoverState="")},n.update=function(){null!==this._popper&&this._popper.scheduleUpdate()},n.isWithContent=function(){return Boolean(this.getTitle())},n.addAttachmentClass=function(n){t(this.getTipElement()).addClass(bu+"-"+n)},n.getTipElement=function(){return this.tip=this.tip||t(this.config.template)[0],this.tip},n.setContent=function(){var n=this.getTipElement();this.setElementContent(t(n.querySelectorAll(ys)),this.getTitle());t(n).removeClass(fi+" "+ei)},n.setElementContent=function(n,i){"object"!=typeof i||!i.nodeType&&!i.jquery?this.config.html?(this.config.sanitize&&(i=wu(i,this.config.whiteList,this.config.sanitizeFn)),n.html(i)):n.text(i):this.config.html?t(i).parent().is(n)||n.empty().append(i):n.text(t(i).text())},n.getTitle=function(){var n=this.element.getAttribute("data-original-title");return n||(n="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),n},n._getOffset=function(){var t=this,n={};return"function"==typeof this.config.offset?n.fn=function(n){return n.offsets=f({},n.offsets,t.config.offset(n.offsets,t.element)||{}),n}:n.offset=this.config.offset,n},n._getContainer=function(){return!1===this.config.container?document.body:r.isElement(this.config.container)?t(this.config.container):t(document).find(this.config.container)},n._getAttachment=function(n){return ls[n.toUpperCase()]},n._setListeners=function(){var n=this;this.config.trigger.split(" ").forEach(function(i){if("click"===i)t(n.element).on(n.constructor.Event.CLICK,n.config.selector,function(t){return n.toggle(t)});else if(i!==bs){var r=i===oi?n.constructor.Event.MOUSEENTER:n.constructor.Event.FOCUSIN,u=i===oi?n.constructor.Event.MOUSELEAVE:n.constructor.Event.FOCUSOUT;t(n.element).on(r,n.config.selector,function(t){return n._enter(t)}).on(u,n.config.selector,function(t){return n._leave(t)})}});t(this.element).closest(".modal").on("hide.bs.modal",function(){n.element&&n.hide()});this.config.selector?this.config=f({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},n._fixTitle=function(){var n=typeof this.element.getAttribute("data-original-title");(this.element.getAttribute("title")||"string"!==n)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},n._enter=function(n,i){var r=this.constructor.DATA_KEY;(i=i||t(n.currentTarget).data(r))||(i=new this.constructor(n.currentTarget,this._getDelegateConfig()),t(n.currentTarget).data(r,i));n&&(i._activeTrigger["focusin"===n.type?tu:oi]=!0);t(i.getTipElement()).hasClass(ei)||i._hoverState===ui?i._hoverState=ui:(clearTimeout(i._timeout),i._hoverState=ui,i.config.delay&&i.config.delay.show?i._timeout=setTimeout(function(){i._hoverState===ui&&i.show()},i.config.delay.show):i.show())},n._leave=function(n,i){var r=this.constructor.DATA_KEY;(i=i||t(n.currentTarget).data(r))||(i=new this.constructor(n.currentTarget,this._getDelegateConfig()),t(n.currentTarget).data(r,i));n&&(i._activeTrigger["focusout"===n.type?tu:oi]=!1);i._isWithActiveTrigger()||(clearTimeout(i._timeout),i._hoverState=nu,i.config.delay&&i.config.delay.hide?i._timeout=setTimeout(function(){i._hoverState===nu&&i.hide()},i.config.delay.hide):i.hide())},n._isWithActiveTrigger=function(){for(var n in this._activeTrigger)if(this._activeTrigger[n])return!0;return!1},n._getConfig=function(n){var i=t(this.element).data();return Object.keys(i).forEach(function(n){-1!==hs.indexOf(n)&&delete i[n]}),"number"==typeof(n=f({},this.constructor.Default,i,"object"==typeof n&&n?n:{})).delay&&(n.delay={show:n.delay,hide:n.delay}),"number"==typeof n.title&&(n.title=n.title.toString()),"number"==typeof n.content&&(n.content=n.content.toString()),r.typeCheckConfig(d,n,this.constructor.DefaultType),n.sanitize&&(n.template=wu(n.template,n.whiteList,n.sanitizeFn)),n},n._getDelegateConfig=function(){var t={},n;if(this.config)for(n in this.config)this.constructor.Default[n]!==this.config[n]&&(t[n]=this.config[n]);return t},n._cleanTipClass=function(){var i=t(this.getTipElement()),n=i.attr("class").match(ss);null!==n&&n.length&&i.removeClass(n.join(""))},n._handlePopperPlacementChange=function(n){var t=n.instance;this.tip=t.popper;this._cleanTipClass();this.addAttachmentClass(this._getAttachment(n.placement))},n._fixTransition=function(){var n=this.getTipElement(),i=this.config.animation;null===n.getAttribute("x-placement")&&(t(n).removeClass(fi),this.config.animation=!1,this.hide(),this.show(),this.config.animation=i)},u._jQueryInterface=function(n){return this.each(function(){var i=t(this).data(ir),r="object"==typeof n&&n;if((i||!/dispose|hide/.test(n))&&(i||(i=new u(this,r),t(this).data(ir,i)),"string"==typeof n)){if("undefined"==typeof i[n])throw new TypeError('No method named "'+n+'"');i[n]()}})},l(u,null,[{key:"VERSION",get:function(){return"4.3.1"}},{key:"Default",get:function(){return as}},{key:"NAME",get:function(){return d}},{key:"DATA_KEY",get:function(){return ir}},{key:"Event",get:function(){return vs}},{key:"EVENT_KEY",get:function(){return a}},{key:"DefaultType",get:function(){return cs}}]),u}();t.fn[d]=g._jQueryInterface;t.fn[d].Constructor=g;t.fn[d].noConflict=function(){return t.fn[d]=os,g._jQueryInterface};var ht="popover",rr="bs.popover",v="."+rr,ks=t.fn[ht],ku="bs-popover",ds=new RegExp("(^|\\s)"+ku+"\\S+","g"),gs=f({},g.Default,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"><\/div><h3 class="popover-header"><\/h3><div class="popover-body"><\/div><\/div>'}),nh=f({},g.DefaultType,{content:"(string|element|function)"}),th="fade",ih="show",rh=".popover-header",uh=".popover-body",fh={HIDE:"hide"+v,HIDDEN:"hidden"+v,SHOW:"show"+v,SHOWN:"shown"+v,INSERTED:"inserted"+v,CLICK:"click"+v,FOCUSIN:"focusin"+v,FOCUSOUT:"focusout"+v,MOUSEENTER:"mouseenter"+v,MOUSELEAVE:"mouseleave"+v},ur=function(n){function r(){return n.apply(this,arguments)||this}var u,f,i;return f=n,(u=r).prototype=Object.create(f.prototype),(u.prototype.constructor=u).__proto__=f,i=r.prototype,i.isWithContent=function(){return this.getTitle()||this._getContent()},i.addAttachmentClass=function(n){t(this.getTipElement()).addClass(ku+"-"+n)},i.getTipElement=function(){return this.tip=this.tip||t(this.config.template)[0],this.tip},i.setContent=function(){var i=t(this.getTipElement()),n;this.setElementContent(i.find(rh),this.getTitle());n=this._getContent();"function"==typeof n&&(n=n.call(this.element));this.setElementContent(i.find(uh),n);i.removeClass(th+" "+ih)},i._getContent=function(){return this.element.getAttribute("data-content")||this.config.content},i._cleanTipClass=function(){var i=t(this.getTipElement()),n=i.attr("class").match(ds);null!==n&&0<n.length&&i.removeClass(n.join(""))},r._jQueryInterface=function(n){return this.each(function(){var i=t(this).data(rr),u="object"==typeof n?n:null;if((i||!/dispose|hide/.test(n))&&(i||(i=new r(this,u),t(this).data(rr,i)),"string"==typeof n)){if("undefined"==typeof i[n])throw new TypeError('No method named "'+n+'"');i[n]()}})},l(r,null,[{key:"VERSION",get:function(){return"4.3.1"}},{key:"Default",get:function(){return gs}},{key:"NAME",get:function(){return ht}},{key:"DATA_KEY",get:function(){return rr}},{key:"Event",get:function(){return fh}},{key:"EVENT_KEY",get:function(){return v}},{key:"DefaultType",get:function(){return nh}}]),r}(g);t.fn[ht]=ur._jQueryInterface;t.fn[ht].Constructor=ur;t.fn[ht].noConflict=function(){return t.fn[ht]=ks,ur._jQueryInterface};var nt="scrollspy",fr="bs.scrollspy",er="."+fr,eh=t.fn[nt],du={offset:10,method:"auto",target:""},oh={offset:"number",method:"string",target:"(string|element)"},iu={ACTIVATE:"activate"+er,SCROLL:"scroll"+er,LOAD_DATA_API:"load"+er+".data-api"},sh="dropdown-item",tt="active",hh='[data-spy="scroll"]',gu=".nav, .list-group",ru=".nav-link",ch=".nav-item",nf=".list-group-item",lh=".dropdown",ah=".dropdown-item",vh=".dropdown-toggle",yh="offset",tf="position",si=function(){function i(n,i){var r=this;this._element=n;this._scrollElement="BODY"===n.tagName?window:n;this._config=this._getConfig(i);this._selector=this._config.target+" "+ru+","+this._config.target+" "+nf+","+this._config.target+" "+ah;this._offsets=[];this._targets=[];this._activeTarget=null;this._scrollHeight=0;t(this._scrollElement).on(iu.SCROLL,function(n){return r._process(n)});this.refresh();this._process()}var n=i.prototype;return n.refresh=function(){var n=this,u=this._scrollElement===this._scrollElement.window?yh:tf,i="auto"===this._config.method?u:this._config.method,f=i===tf?this._getScrollTop():0;this._offsets=[];this._targets=[];this._scrollHeight=this._getScrollHeight();[].slice.call(document.querySelectorAll(this._selector)).map(function(n){var u,e=r.getSelectorFromElement(n),o;return(e&&(u=document.querySelector(e)),u)&&(o=u.getBoundingClientRect(),o.width||o.height)?[t(u)[i]().top+f,e]:null}).filter(function(n){return n}).sort(function(n,t){return n[0]-t[0]}).forEach(function(t){n._offsets.push(t[0]);n._targets.push(t[1])})},n.dispose=function(){t.removeData(this._element,fr);t(this._scrollElement).off(er);this._element=null;this._scrollElement=null;this._config=null;this._selector=null;this._offsets=null;this._targets=null;this._activeTarget=null;this._scrollHeight=null},n._getConfig=function(n){if("string"!=typeof(n=f({},du,"object"==typeof n&&n?n:{})).target){var i=t(n.target).attr("id");i||(i=r.getUID(nt),t(n.target).attr("id",i));n.target="#"+i}return r.typeCheckConfig(nt,n,oh),n},n._getScrollTop=function(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop},n._getScrollHeight=function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},n._getOffsetHeight=function(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height},n._process=function(){var t=this._getScrollTop()+this._config.offset,r=this._getScrollHeight(),u=this._config.offset+r-this._getOffsetHeight(),i,n;if(this._scrollHeight!==r&&this.refresh(),u<=t)i=this._targets[this._targets.length-1],this._activeTarget!==i&&this._activate(i);else{if(this._activeTarget&&t<this._offsets[0]&&0<this._offsets[0])return this._activeTarget=null,void this._clear();for(n=this._offsets.length;n--;)this._activeTarget!==this._targets[n]&&t>=this._offsets[n]&&("undefined"==typeof this._offsets[n+1]||t<this._offsets[n+1])&&this._activate(this._targets[n])}},n._activate=function(n){this._activeTarget=n;this._clear();var r=this._selector.split(",").map(function(t){return t+'[data-target="'+n+'"],'+t+'[href="'+n+'"]'}),i=t([].slice.call(document.querySelectorAll(r.join(","))));i.hasClass(sh)?(i.closest(lh).find(vh).addClass(tt),i.addClass(tt)):(i.addClass(tt),i.parents(gu).prev(ru+", "+nf).addClass(tt),i.parents(gu).prev(ch).children(ru).addClass(tt));t(this._scrollElement).trigger(iu.ACTIVATE,{relatedTarget:n})},n._clear=function(){[].slice.call(document.querySelectorAll(this._selector)).filter(function(n){return n.classList.contains(tt)}).forEach(function(n){return n.classList.remove(tt)})},i._jQueryInterface=function(n){return this.each(function(){var r=t(this).data(fr);if(r||(r=new i(this,"object"==typeof n&&n),t(this).data(fr,r)),"string"==typeof n){if("undefined"==typeof r[n])throw new TypeError('No method named "'+n+'"');r[n]()}})},l(i,null,[{key:"VERSION",get:function(){return"4.3.1"}},{key:"Default",get:function(){return du}}]),i}();t(window).on(iu.LOAD_DATA_API,function(){for(var r,n=[].slice.call(document.querySelectorAll(hh)),i=n.length;i--;)r=t(n[i]),si._jQueryInterface.call(r,r.data())});t.fn[nt]=si._jQueryInterface;t.fn[nt].Constructor=si;t.fn[nt].noConflict=function(){return t.fn[nt]=eh,si._jQueryInterface};var or="bs.tab",hi="."+or,ph=t.fn.tab,ci={HIDE:"hide"+hi,HIDDEN:"hidden"+hi,SHOW:"show"+hi,SHOWN:"shown"+hi,CLICK_DATA_API:"click"+hi+".data-api"},wh="dropdown-menu",li="active",bh="disabled",rf="fade",uf="show",kh=".dropdown",dh=".nav, .list-group",ff=".active",ef="> li > .active",gh=".dropdown-toggle",nc="> .dropdown-menu .active",ai=function(){function n(n){this._element=n}var i=n.prototype;return i.show=function(){var h=this,u,n,i,f,c,e,o,s;this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&t(this._element).hasClass(li)||t(this._element).hasClass(bh)||(i=t(this._element).closest(dh)[0],f=r.getSelectorFromElement(this._element),i&&(c="UL"===i.nodeName||"OL"===i.nodeName?ef:ff,n=(n=t.makeArray(t(i).find(c)))[n.length-1]),e=t.Event(ci.HIDE,{relatedTarget:this._element}),o=t.Event(ci.SHOW,{relatedTarget:n}),(n&&t(n).trigger(e),t(this._element).trigger(o),o.isDefaultPrevented()||e.isDefaultPrevented())||(f&&(u=document.querySelector(f)),this._activate(this._element,i),s=function(){var i=t.Event(ci.HIDDEN,{relatedTarget:h._element}),r=t.Event(ci.SHOWN,{relatedTarget:n});t(n).trigger(i);t(h._element).trigger(r)},u?this._activate(u,u.parentNode,s):s()))},i.dispose=function(){t.removeData(this._element,or);this._element=null},i._activate=function(n,i,u){var s=this,f=(!i||"UL"!==i.nodeName&&"OL"!==i.nodeName?t(i).children(ff):t(i).find(ef))[0],h=u&&f&&t(f).hasClass(rf),e=function(){return s._transitionComplete(n,f,u)},o;f&&h?(o=r.getTransitionDurationFromElement(f),t(f).removeClass(uf).one(r.TRANSITION_END,e).emulateTransitionEnd(o)):e()},i._transitionComplete=function(n,i,u){var f,e,o;i&&(t(i).removeClass(li),f=t(i.parentNode).find(nc)[0],f&&t(f).removeClass(li),"tab"===i.getAttribute("role")&&i.setAttribute("aria-selected",!1));(t(n).addClass(li),"tab"===n.getAttribute("role")&&n.setAttribute("aria-selected",!0),r.reflow(n),n.classList.contains(rf)&&n.classList.add(uf),n.parentNode&&t(n.parentNode).hasClass(wh))&&(e=t(n).closest(kh)[0],e&&(o=[].slice.call(e.querySelectorAll(gh)),t(o).addClass(li)),n.setAttribute("aria-expanded",!0));u&&u()},n._jQueryInterface=function(i){return this.each(function(){var u=t(this),r=u.data(or);if(r||(r=new n(this),u.data(or,r)),"string"==typeof i){if("undefined"==typeof r[i])throw new TypeError('No method named "'+i+'"');r[i]()}})},l(n,null,[{key:"VERSION",get:function(){return"4.3.1"}}]),n}();t(document).on(ci.CLICK_DATA_API,'[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',function(n){n.preventDefault();ai._jQueryInterface.call(t(this),"show")});t.fn.tab=ai._jQueryInterface;t.fn.tab.Constructor=ai;t.fn.tab.noConflict=function(){return t.fn.tab=ph,ai._jQueryInterface};var ct="toast",sr="bs.toast",vi="."+sr,tc=t.fn[ct],lt={CLICK_DISMISS:"click.dismiss"+vi,HIDE:"hide"+vi,HIDDEN:"hidden"+vi,SHOW:"show"+vi,SHOWN:"shown"+vi},ic="fade",of="hide",yi="show",sf="showing",rc={animation:"boolean",autohide:"boolean",delay:"number"},hf={animation:!0,autohide:!0,delay:500},uc='[data-dismiss="toast"]',hr=function(){function i(n,t){this._element=n;this._config=this._getConfig(t);this._timeout=null;this._setListeners()}var n=i.prototype;return n.show=function(){var n=this,i,u;t(this._element).trigger(lt.SHOW);this._config.animation&&this._element.classList.add(ic);i=function(){n._element.classList.remove(sf);n._element.classList.add(yi);t(n._element).trigger(lt.SHOWN);n._config.autohide&&n.hide()};(this._element.classList.remove(of),this._element.classList.add(sf),this._config.animation)?(u=r.getTransitionDurationFromElement(this._element),t(this._element).one(r.TRANSITION_END,i).emulateTransitionEnd(u)):i()},n.hide=function(n){var i=this;this._element.classList.contains(yi)&&(t(this._element).trigger(lt.HIDE),n?this._close():this._timeout=setTimeout(function(){i._close()},this._config.delay))},n.dispose=function(){clearTimeout(this._timeout);this._timeout=null;this._element.classList.contains(yi)&&this._element.classList.remove(yi);t(this._element).off(lt.CLICK_DISMISS);t.removeData(this._element,sr);this._element=null;this._config=null},n._getConfig=function(n){return n=f({},hf,t(this._element).data(),"object"==typeof n&&n?n:{}),r.typeCheckConfig(ct,n,this.constructor.DefaultType),n},n._setListeners=function(){var n=this;t(this._element).on(lt.CLICK_DISMISS,uc,function(){return n.hide(!0)})},n._close=function(){var n=this,i=function(){n._element.classList.add(of);t(n._element).trigger(lt.HIDDEN)},u;(this._element.classList.remove(yi),this._config.animation)?(u=r.getTransitionDurationFromElement(this._element),t(this._element).one(r.TRANSITION_END,i).emulateTransitionEnd(u)):i()},i._jQueryInterface=function(n){return this.each(function(){var u=t(this),r=u.data(sr);if(r||(r=new i(this,"object"==typeof n&&n),u.data(sr,r)),"string"==typeof n){if("undefined"==typeof r[n])throw new TypeError('No method named "'+n+'"');r[n](this)}})},l(i,null,[{key:"VERSION",get:function(){return"4.3.1"}},{key:"DefaultType",get:function(){return rc}},{key:"Default",get:function(){return hf}}]),i}();t.fn[ct]=hr._jQueryInterface;t.fn[ct].Constructor=hr;t.fn[ct].noConflict=function(){return t.fn[ct]=tc,hr._jQueryInterface},function(){if("undefined"==typeof t)throw new TypeError("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.");var n=t.fn.jquery.split(" ")[0].split(".");if(n[0]<2&&n[1]<9||1===n[0]&&9===n[1]&&n[2]<1||4<=n[0])throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0");}();n.Util=r;n.Alert=it;n.Button=wt;n.Carousel=ut;n.Collapse=ni;n.Dropdown=p;n.Modal=ri;n.Popover=ur;n.Scrollspy=si;n.Tab=ai;n.Toast=hr;n.Tooltip=g;Object.defineProperty(n,"__esModule",{value:!0})}),function(n){"use strict";var t=function(){var t={bcClass:"sf-breadcrumb",menuClass:"sf-js-enabled",anchorClass:"sf-with-ul",menuArrowClass:"sf-arrows"},f=function(){var t=/iPhone|iPad|iPod/i.test(navigator.userAgent);return t&&n(window).load(function(){n("body").children().on("click",n.noop)}),t}(),l=function(){var n=document.documentElement.style;return"behavior"in n&&"fill"in n&&/iemobile/i.test(navigator.userAgent)}(),e=function(n,i){var r=t.menuClass;i.cssArrows&&(r+=" "+t.menuArrowClass);n.toggleClass(r)},a=function(i,r){return i.find("li."+r.pathClass).slice(0,r.pathLevels).addClass(r.hoverClass+" "+t.bcClass).filter(function(){return n(this).children(r.popUpSelector).hide().show().length}).removeClass(r.pathClass)},o=function(n){n.children("a").toggleClass(t.anchorClass)},s=function(n){var t=n.css("ms-touch-action");t=t==="pan-y"?"auto":"pan-y";n.css("ms-touch-action",t)},v=function(t,r){var o="li:has("+r.popUpSelector+")",e;if(n.fn.hoverIntent&&!r.disableHI)t.hoverIntent(i,u,o);else t.on("mouseenter.superfish",o,i).on("mouseleave.superfish",o,u);e="MSPointerDown.superfish";f||(e+=" touchend.superfish");l&&(e+=" mousedown.superfish");t.on("focusin.superfish","li",i).on("focusout.superfish","li",u).on(e,"a",r,y)},y=function(t){var r=n(this),u=r.siblings(t.data.popUpSelector);if(u.length>0&&u.is(":hidden")){r.one("click.superfish",!1);t.type==="MSPointerDown"?r.trigger("focus"):n.proxy(i,r.parent("li"))()}},i=function(){var t=n(this),i=r(t);clearTimeout(i.sfTimer);t.siblings().superfish("hide").end().superfish("show")},u=function(){var i=n(this),t=r(i);f?n.proxy(h,i,t)():(clearTimeout(t.sfTimer),t.sfTimer=setTimeout(n.proxy(h,i,t),t.delay))},h=function(t){t.retainPath=n.inArray(this[0],t.$path)>-1;this.superfish("hide");this.parents("."+t.hoverClass).length||(t.onIdle.call(c(this)),t.$path.length&&n.proxy(i,t.$path)())},c=function(n){return n.closest("."+t.menuClass)},r=function(n){return c(n).data("sf-options")};return{hide:function(t){var u,i;if(this.length){if(u=this,i=r(u),!i)return this;var o=i.retainPath===!0?i.$path:"",f=u.find("li."+i.hoverClass).add(this).not(o).removeClass(i.hoverClass).children(i.popUpSelector),e=i.speedOut;t&&(f.show(),e=0);i.retainPath=!1;i.onBeforeHide.call(f);f.stop(!0,!0).animate(i.animationOut,e,function(){var t=n(this);i.onHide.call(t)})}return this},show:function(){var n=r(this),i,t;return n?(i=this.addClass(n.hoverClass),t=i.children(n.popUpSelector),n.onBeforeShow.call(t),t.stop(!0,!0).animate(n.animation,n.speed,function(){n.onShow.call(t)}),this):this},destroy:function(){return this.each(function(){var r=n(this),i=r.data("sf-options"),u;if(!i)return!1;u=r.find(i.popUpSelector).parent("li");clearTimeout(i.sfTimer);e(r,i);o(u);s(r);r.off(".superfish").off(".hoverIntent");u.children(i.popUpSelector).attr("style",function(n,t){return t.replace(/display[^;]+;?/g,"")});i.$path.removeClass(i.hoverClass+" "+t.bcClass).addClass(i.pathClass);r.find("."+i.hoverClass).removeClass(i.hoverClass);i.onDestroy.call(r);r.removeData("sf-options")})},init:function(i){return this.each(function(){var u=n(this),r,f;if(u.data("sf-options"))return!1;r=n.extend({},n.fn.superfish.defaults,i);f=u.find(r.popUpSelector).parent("li");r.$path=a(u,r);u.data("sf-options",r);e(u,r);o(f);s(u);v(u,r);f.not("."+t.bcClass).superfish("hide",!0);r.onInit.call(this)})}}}();n.fn.superfish=function(i){return t[i]?t[i].apply(this,Array.prototype.slice.call(arguments,1)):typeof i!="object"&&i?n.error("Method "+i+" does not exist on jQuery.fn.superfish"):t.init.apply(this,arguments)};n.fn.superfish.defaults={popUpSelector:"ul,.sf-mega",hoverClass:"sfHover",pathClass:"overrideThisToUse",pathLevels:1,delay:800,animation:{opacity:"show"},animationOut:{opacity:"hide"},speed:"normal",speedOut:"fast",cssArrows:!0,disableHI:!1,onInit:n.noop,onBeforeShow:n.noop,onShow:n.noop,onBeforeHide:n.noop,onHide:n.noop,onIdle:n.noop,onDestroy:n.noop};n.fn.extend({hideSuperfishUl:t.hide,showSuperfishUl:t.show})}(jQuery),function(n){n.flexslider=function(t,i){var r=n(t);r.vars=n.extend({},n.flexslider.defaults,i);var f=r.vars.namespace,v=window.navigator&&window.navigator.msPointerEnabled&&window.MSGesture,y=("ontouchstart"in window||v||window.DocumentTouch&&document instanceof DocumentTouch)&&r.vars.touch,a="click touchend MSPointerUp",s="",p,h=r.vars.direction==="vertical",o=r.vars.reverse,e=r.vars.itemWidth>0,c=r.vars.animation==="fade",l=r.vars.asNavFor!=="",u={},w=!0;n.data(t,"flexslider",r);u={init:function(){r.animating=!1;r.currentSlide=parseInt(r.vars.startAt?r.vars.startAt:0);isNaN(r.currentSlide)&&(r.currentSlide=0);r.animatingTo=r.currentSlide;r.atEnd=r.currentSlide===0||r.currentSlide===r.last;r.containerSelector=r.vars.selector.substr(0,r.vars.selector.search(" "));r.slides=n(r.vars.selector,r);r.container=n(r.containerSelector,r);r.count=r.slides.length;r.syncExists=n(r.vars.sync).length>0;r.vars.animation==="slide"&&(r.vars.animation="swing");r.prop=h?"top":"marginLeft";r.args={};r.manualPause=!1;r.stopped=!1;r.started=!1;r.startTimeout=null;r.transitions=!r.vars.video&&!c&&r.vars.useCSS&&function(){var i=document.createElement("div"),n=["perspectiveProperty","WebkitPerspective","MozPerspective","OPerspective","msPerspective"],t;for(t in n)if(i.style[n[t]]!==undefined)return r.pfx=n[t].replace("Perspective","").toLowerCase(),r.prop="-"+r.pfx+"-transform",!0;return!1}();r.vars.controlsContainer!==""&&(r.controlsContainer=n(r.vars.controlsContainer).length>0&&n(r.vars.controlsContainer));r.vars.manualControls!==""&&(r.manualControls=n(r.vars.manualControls).length>0&&n(r.vars.manualControls));r.vars.randomize&&(r.slides.sort(function(){return Math.round(Math.random())-.5}),r.container.empty().append(r.slides));r.doMath();r.setup("init");r.vars.controlNav&&u.controlNav.setup();r.vars.directionNav&&u.directionNav.setup();r.vars.keyboard&&(n(r.containerSelector).length===1||r.vars.multipleKeyboard)&&n(document).bind("keyup",function(n){var t=n.keyCode,i;r.animating||t!==39&&t!==37||(i=t===39?r.getTarget("next"):t===37?r.getTarget("prev"):!1,r.flexAnimate(i,r.vars.pauseOnAction))});r.vars.mousewheel&&r.bind("mousewheel",function(n,t){n.preventDefault();var i=t<0?r.getTarget("next"):r.getTarget("prev");r.flexAnimate(i,r.vars.pauseOnAction)});r.vars.pausePlay&&u.pausePlay.setup();r.vars.slideshow&&r.vars.pauseInvisible&&u.pauseInvisible.init();r.vars.slideshow&&(r.vars.pauseOnHover&&r.hover(function(){r.manualPlay||r.manualPause||r.pause()},function(){r.manualPause||r.manualPlay||r.stopped||r.play()}),r.vars.pauseInvisible&&u.pauseInvisible.isHidden()||(r.vars.initDelay>0?r.startTimeout=setTimeout(r.play,r.vars.initDelay):r.play()));l&&u.asNav.setup();y&&r.vars.touch&&u.touch();(!c||c&&r.vars.smoothHeight)&&n(window).bind("resize orientationchange focus",u.resize);r.find("img").attr("draggable","false");setTimeout(function(){r.vars.start(r)},200)},asNav:{setup:function(){r.asNav=!0;r.animatingTo=Math.floor(r.currentSlide/r.move);r.currentItem=r.currentSlide;r.slides.removeClass(f+"active-slide").eq(r.currentItem).addClass(f+"active-slide");v?(t._slider=r,r.slides.each(function(){var t=this;t._gesture=new MSGesture;t._gesture.target=t;t.addEventListener("MSPointerDown",function(n){n.preventDefault();n.currentTarget._gesture&&n.currentTarget._gesture.addPointer(n.pointerId)},!1);t.addEventListener("MSGestureTap",function(t){t.preventDefault();var i=n(this),u=i.index();n(r.vars.asNavFor).data("flexslider").animating||i.hasClass("active")||(r.direction=r.currentItem<u?"next":"prev",r.flexAnimate(u,r.vars.pauseOnAction,!1,!0,!0))})})):r.slides.click(function(t){t.preventDefault();var i=n(this),u=i.index(),e=i.offset().left-n(r).scrollLeft();e<=0&&i.hasClass(f+"active-slide")?r.flexAnimate(r.getTarget("prev"),!0):n(r.vars.asNavFor).data("flexslider").animating||i.hasClass(f+"active-slide")||(r.direction=r.currentItem<u?"next":"prev",r.flexAnimate(u,r.vars.pauseOnAction,!1,!0,!0))})}},controlNav:{setup:function(){r.manualControls?u.controlNav.setupManual():u.controlNav.setupPaging()},setupPaging:function(){var c=r.vars.controlNav==="thumbnails"?"control-thumbs":"control-paging",h=1,e,o,t,i;if(r.controlNavScaffold=n('<ol class="'+f+"control-nav "+f+c+'"><\/ol>'),r.pagingCount>1)for(t=0;t<r.pagingCount;t++)o=r.slides.eq(t),e=r.vars.controlNav==="thumbnails"?'<img src="'+o.attr("data-thumb")+'"/>':"<a>"+h+"<\/a>","thumbnails"===r.vars.controlNav&&!0===r.vars.thumbCaptions&&(i=o.attr("data-thumbcaption"),""!=i&&undefined!=i&&(e+='<span class="'+f+'caption">'+i+"<\/span>")),r.controlNavScaffold.append("<li>"+e+"<\/li>"),h++;r.controlsContainer?n(r.controlsContainer).append(r.controlNavScaffold):r.append(r.controlNavScaffold);u.controlNav.set();u.controlNav.active();r.controlNavScaffold.delegate("a, img",a,function(t){if(t.preventDefault(),s===""||s===t.type){var i=n(this),e=r.controlNav.index(i);i.hasClass(f+"active")||(r.direction=e>r.currentSlide?"next":"prev",r.flexAnimate(e,r.vars.pauseOnAction))}s===""&&(s=t.type);u.setToClearWatchedEvent()})},setupManual:function(){r.controlNav=r.manualControls;u.controlNav.active();r.controlNav.bind(a,function(t){if(t.preventDefault(),s===""||s===t.type){var i=n(this),e=r.controlNav.index(i);i.hasClass(f+"active")||(r.direction=e>r.currentSlide?"next":"prev",r.flexAnimate(e,r.vars.pauseOnAction))}s===""&&(s=t.type);u.setToClearWatchedEvent()})},set:function(){var t=r.vars.controlNav==="thumbnails"?"img":"a";r.controlNav=n("."+f+"control-nav li "+t,r.controlsContainer?r.controlsContainer:r)},active:function(){r.controlNav.removeClass(f+"active").eq(r.animatingTo).addClass(f+"active")},update:function(t,i){r.pagingCount>1&&t==="add"?r.controlNavScaffold.append(n("<li><a>"+r.count+"<\/a><\/li>")):r.pagingCount===1?r.controlNavScaffold.find("li").remove():r.controlNav.eq(i).closest("li").remove();u.controlNav.set();r.pagingCount>1&&r.pagingCount!==r.controlNav.length?r.update(i,t):u.controlNav.active()}},directionNav:{setup:function(){var t=n('<ul class="'+f+'direction-nav"><li><a class="'+f+'prev" href="#">'+r.vars.prevText+'<\/a><\/li><li><a class="'+f+'next" href="#">'+r.vars.nextText+"<\/a><\/li><\/ul>");r.controlsContainer?(n(r.controlsContainer).append(t),r.directionNav=n("."+f+"direction-nav li a",r.controlsContainer)):(r.append(t),r.directionNav=n("."+f+"direction-nav li a",r));u.directionNav.update();r.directionNav.bind(a,function(t){t.preventDefault();var i;(s===""||s===t.type)&&(i=n(this).hasClass(f+"next")?r.getTarget("next"):r.getTarget("prev"),r.flexAnimate(i,r.vars.pauseOnAction));s===""&&(s=t.type);u.setToClearWatchedEvent()})},update:function(){var n=f+"disabled";r.pagingCount===1?r.directionNav.addClass(n).attr("tabindex","-1"):r.vars.animationLoop?r.directionNav.removeClass(n).removeAttr("tabindex"):r.animatingTo===0?r.directionNav.removeClass(n).filter("."+f+"prev").addClass(n).attr("tabindex","-1"):r.animatingTo===r.last?r.directionNav.removeClass(n).filter("."+f+"next").addClass(n).attr("tabindex","-1"):r.directionNav.removeClass(n).removeAttr("tabindex")}},pausePlay:{setup:function(){var t=n('<div class="'+f+'pauseplay"><a><\/a><\/div>');r.controlsContainer?(r.controlsContainer.append(t),r.pausePlay=n("."+f+"pauseplay a",r.controlsContainer)):(r.append(t),r.pausePlay=n("."+f+"pauseplay a",r));u.pausePlay.update(r.vars.slideshow?f+"pause":f+"play");r.pausePlay.bind(a,function(t){t.preventDefault();(s===""||s===t.type)&&(n(this).hasClass(f+"pause")?(r.manualPause=!0,r.manualPlay=!1,r.pause()):(r.manualPause=!1,r.manualPlay=!0,r.play()));s===""&&(s=t.type);u.setToClearWatchedEvent()})},update:function(n){n==="play"?r.pausePlay.removeClass(f+"pause").addClass(f+"play").html(r.vars.playText):r.pausePlay.removeClass(f+"play").addClass(f+"pause").html(r.vars.pauseText)}},touch:function(){var p,w,f,u,n,s,l=!1,a=0,y=0,i=0;if(v){t.style.msTouchAction="none";t._gesture=new MSGesture;t._gesture.target=t;t.addEventListener("MSPointerDown",g,!1);t._slider=r;t.addEventListener("MSGestureChange",nt,!1);t.addEventListener("MSGestureEnd",tt,!1);function g(n){n.stopPropagation();r.animating?n.preventDefault():(r.pause(),t._gesture.addPointer(n.pointerId),i=0,u=h?r.h:r.w,s=Number(new Date),f=e&&o&&r.animatingTo===r.last?0:e&&o?r.limit-(r.itemW+r.vars.itemMargin)*r.move*r.animatingTo:e&&r.currentSlide===r.last?r.limit:e?(r.itemW+r.vars.itemMargin)*r.move*r.currentSlide:o?(r.last-r.currentSlide+r.cloneOffset)*u:(r.currentSlide+r.cloneOffset)*u)}function nt(r){var e,o,a;if(r.stopPropagation(),e=r.target._slider,e){if(o=-r.translationX,a=-r.translationY,i=i+(h?a:o),n=i,l=h?Math.abs(i)<Math.abs(-o):Math.abs(i)<Math.abs(-a),r.detail===r.MSGESTURE_FLAG_INERTIA){setImmediate(function(){t._gesture.stop()});return}(!l||Number(new Date)-s>500)&&(r.preventDefault(),!c&&e.transitions&&(e.vars.animationLoop||(n=i/(e.currentSlide===0&&i<0||e.currentSlide===e.last&&i>0?Math.abs(i)/u+2:1)),e.setProps(f+n,"setTouch")))}}function tt(t){var r,e,h;(t.stopPropagation(),r=t.target._slider,r)&&(r.animatingTo!==r.currentSlide||l||n===null||(e=o?-n:n,h=e>0?r.getTarget("next"):r.getTarget("prev"),r.canAdvance(h)&&(Number(new Date)-s<550&&Math.abs(e)>50||Math.abs(e)>u/2)?r.flexAnimate(h,r.vars.pauseOnAction):c||r.flexAnimate(r.currentSlide,r.vars.pauseOnAction,!0)),p=null,w=null,n=null,f=null,i=0)}}else{t.addEventListener("touchstart",d,!1);function d(n){r.animating?n.preventDefault():(window.navigator.msPointerEnabled||n.touches.length===1)&&(r.pause(),u=h?r.h:r.w,s=Number(new Date),a=n.touches[0].pageX,y=n.touches[0].pageY,f=e&&o&&r.animatingTo===r.last?0:e&&o?r.limit-(r.itemW+r.vars.itemMargin)*r.move*r.animatingTo:e&&r.currentSlide===r.last?r.limit:e?(r.itemW+r.vars.itemMargin)*r.move*r.currentSlide:o?(r.last-r.currentSlide+r.cloneOffset)*u:(r.currentSlide+r.cloneOffset)*u,p=h?y:a,w=h?a:y,t.addEventListener("touchmove",b,!1),t.addEventListener("touchend",k,!1))}function b(t){a=t.touches[0].pageX;y=t.touches[0].pageY;n=h?p-y:p-a;l=h?Math.abs(n)<Math.abs(a-w):Math.abs(n)<Math.abs(y-w);(!l||Number(new Date)-s>500)&&(t.preventDefault(),!c&&r.transitions&&(r.vars.animationLoop||(n=n/(r.currentSlide===0&&n<0||r.currentSlide===r.last&&n>0?Math.abs(n)/u+2:1)),r.setProps(f+n,"setTouch")))}function k(){if(t.removeEventListener("touchmove",b,!1),r.animatingTo===r.currentSlide&&!l&&!(n===null)){var i=o?-n:n,e=i>0?r.getTarget("next"):r.getTarget("prev");r.canAdvance(e)&&(Number(new Date)-s<550&&Math.abs(i)>50||Math.abs(i)>u/2)?r.flexAnimate(e,r.vars.pauseOnAction):c||r.flexAnimate(r.currentSlide,r.vars.pauseOnAction,!0)}t.removeEventListener("touchend",k,!1);p=null;w=null;n=null;f=null}}},resize:function(){!r.animating&&r.is(":visible")&&(e||r.doMath(),c?u.smoothHeight():e?(r.slides.width(r.computedW),r.update(r.pagingCount),r.setProps()):h?(r.viewport.height(r.h),r.setProps(r.h,"setTotal")):(r.vars.smoothHeight&&u.smoothHeight(),r.newSlides.width(r.computedW),r.setProps(r.computedW,"setTotal")))},smoothHeight:function(n){if(!h||c){var t=c?r:r.viewport;n?t.animate({height:r.slides.eq(r.animatingTo).height()},n):t.height(r.slides.eq(r.animatingTo).height())}},sync:function(t){var i=n(r.vars.sync).data("flexslider"),u=r.animatingTo;switch(t){case"animate":i.flexAnimate(u,r.vars.pauseOnAction,!1,!0);break;case"play":i.playing||i.asNav||i.play();break;case"pause":i.pause()}},pauseInvisible:{visProp:null,init:function(){var t=["webkit","moz","ms","o"],n,i;if("hidden"in document)return"hidden";for(n=0;n<t.length;n++)t[n]+"Hidden"in document&&(u.pauseInvisible.visProp=t[n]+"Hidden");u.pauseInvisible.visProp&&(i=u.pauseInvisible.visProp.replace(/[H|h]idden/,"")+"visibilitychange",document.addEventListener(i,function(){u.pauseInvisible.isHidden()?r.startTimeout?clearTimeout(r.startTimeout):r.pause():r.started?r.play():r.vars.initDelay>0?setTimeout(r.play,r.vars.initDelay):r.play()}))},isHidden:function(){return document[u.pauseInvisible.visProp]||!1}},setToClearWatchedEvent:function(){clearTimeout(p);p=setTimeout(function(){s=""},3e3)}};r.flexAnimate=function(t,i,s,a,v){var w,p,d,b,k;if(r.vars.animationLoop||t===r.currentSlide||(r.direction=t>r.currentSlide?"next":"prev"),l&&r.pagingCount===1&&(r.direction=r.currentItem<t?"next":"prev"),!r.animating&&(r.canAdvance(t,v)||s)&&r.is(":visible")){if(l&&a)if(w=n(r.vars.asNavFor).data("flexslider"),r.atEnd=t===0||t===r.count-1,w.flexAnimate(t,!0,!1,!0,v),r.direction=r.currentItem<t?"next":"prev",w.direction=r.direction,Math.ceil((t+1)/r.visible)-1!==r.currentSlide&&t!==0)r.currentItem=t,r.slides.removeClass(f+"active-slide").eq(t).addClass(f+"active-slide"),t=Math.floor(t/r.visible);else return r.currentItem=t,r.slides.removeClass(f+"active-slide").eq(t).addClass(f+"active-slide"),!1;r.animating=!0;r.animatingTo=t;i&&r.pause();r.vars.before(r);r.syncExists&&!v&&u.sync("animate");r.vars.controlNav&&u.controlNav.active();e||r.slides.removeClass(f+"active-slide").eq(t).addClass(f+"active-slide");r.atEnd=t===0||t===r.last;r.vars.directionNav&&u.directionNav.update();t===r.last&&(r.vars.end(r),r.vars.animationLoop||r.pause());c?y?(r.slides.eq(r.currentSlide).css({opacity:0,zIndex:1}),r.slides.eq(t).css({opacity:1,zIndex:2}),r.wrapup(p)):(r.slides.eq(r.currentSlide).css({zIndex:1}).animate({opacity:0},r.vars.animationSpeed,r.vars.easing),r.slides.eq(t).css({zIndex:2}).animate({opacity:1},r.vars.animationSpeed,r.vars.easing,r.wrapup)):(p=h?r.slides.filter(":first").height():r.computedW,e?(d=r.vars.itemMargin,k=(r.itemW+d)*r.move*r.animatingTo,b=k>r.limit&&r.visible!==1?r.limit:k):b=r.currentSlide===0&&t===r.count-1&&r.vars.animationLoop&&r.direction!=="next"?o?(r.count+r.cloneOffset)*p:0:r.currentSlide===r.last&&t===0&&r.vars.animationLoop&&r.direction!=="prev"?o?0:(r.count+1)*p:o?(r.count-1-t+r.cloneOffset)*p:(t+r.cloneOffset)*p,r.setProps(b,"",r.vars.animationSpeed),r.transitions?(r.vars.animationLoop&&r.atEnd||(r.animating=!1,r.currentSlide=r.animatingTo),r.container.unbind("webkitTransitionEnd transitionend"),r.container.bind("webkitTransitionEnd transitionend",function(){r.wrapup(p)})):r.container.animate(r.args,r.vars.animationSpeed,r.vars.easing,function(){r.wrapup(p)}));r.vars.smoothHeight&&u.smoothHeight(r.vars.animationSpeed)}};r.wrapup=function(n){c||e||(r.currentSlide===0&&r.animatingTo===r.last&&r.vars.animationLoop?r.setProps(n,"jumpEnd"):r.currentSlide===r.last&&r.animatingTo===0&&r.vars.animationLoop&&r.setProps(n,"jumpStart"));r.animating=!1;r.currentSlide=r.animatingTo;r.vars.after(r)};r.animateSlides=function(){!r.animating&&w&&r.flexAnimate(r.getTarget("next"))};r.pause=function(){clearInterval(r.animatedSlides);r.animatedSlides=null;r.playing=!1;r.vars.pausePlay&&u.pausePlay.update("play");r.syncExists&&u.sync("pause")};r.play=function(){r.playing&&clearInterval(r.animatedSlides);r.animatedSlides=r.animatedSlides||setInterval(r.animateSlides,r.vars.slideshowSpeed);r.started=r.playing=!0;r.vars.pausePlay&&u.pausePlay.update("pause");r.syncExists&&u.sync("play")};r.stop=function(){r.pause();r.stopped=!0};r.canAdvance=function(n,t){var i=l?r.pagingCount-1:r.last;return t?!0:l&&r.currentItem===r.count-1&&n===0&&r.direction==="prev"?!0:l&&r.currentItem===0&&n===r.pagingCount-1&&r.direction!=="next"?!1:n===r.currentSlide&&!l?!1:r.vars.animationLoop?!0:r.atEnd&&r.currentSlide===0&&n===i&&r.direction!=="next"?!1:r.atEnd&&r.currentSlide===i&&n===0&&r.direction==="next"?!1:!0};r.getTarget=function(n){return r.direction=n,n==="next"?r.currentSlide===r.last?0:r.currentSlide+1:r.currentSlide===0?r.last:r.currentSlide-1};r.setProps=function(n,t,i){var u=function(){var i=n?n:(r.itemW+r.vars.itemMargin)*r.move*r.animatingTo,u=function(){if(e)return t==="setTouch"?n:o&&r.animatingTo===r.last?0:o?r.limit-(r.itemW+r.vars.itemMargin)*r.move*r.animatingTo:r.animatingTo===r.last?r.limit:i;switch(t){case"setTotal":return o?(r.count-1-r.currentSlide+r.cloneOffset)*n:(r.currentSlide+r.cloneOffset)*n;case"setTouch":return o?n:n;case"jumpEnd":return o?n:r.count*n;case"jumpStart":return o?r.count*n:n;default:return n}}();return u*-1+"px"}();r.transitions&&(u=h?"translate3d(0,"+u+",0)":"translate3d("+u+",0,0)",i=i!==undefined?i/1e3+"s":"0s",r.container.css("-"+r.pfx+"-transition-duration",i));r.args[r.prop]=u;(r.transitions||i===undefined)&&r.container.css(r.args)};r.setup=function(t){if(c)r.slides.css({width:"100%",float:"left",marginRight:"-100%",position:"relative"}),t==="init"&&(y?r.slides.css({opacity:0,display:"block",webkitTransition:"opacity "+r.vars.animationSpeed/1e3+"s ease",zIndex:1}).eq(r.currentSlide).css({opacity:1,zIndex:2}):r.slides.css({opacity:0,display:"block",zIndex:1}).eq(r.currentSlide).css({zIndex:2}).animate({opacity:1},r.vars.animationSpeed,r.vars.easing)),r.vars.smoothHeight&&u.smoothHeight();else{var i,s;t==="init"&&(r.viewport=n('<div class="'+f+'viewport"><\/div>').css({overflow:"hidden",position:"relative"}).appendTo(r).append(r.container),r.cloneCount=0,r.cloneOffset=0,o&&(s=n.makeArray(r.slides).reverse(),r.slides=n(s),r.container.empty().append(r.slides)));r.vars.animationLoop&&!e&&(r.cloneCount=2,r.cloneOffset=1,t!=="init"&&r.container.find(".clone").remove(),r.container.append(r.slides.first().clone().addClass("clone").attr("aria-hidden","true")).prepend(r.slides.last().clone().addClass("clone").attr("aria-hidden","true")));r.newSlides=n(r.vars.selector,r);i=o?r.count-1-r.currentSlide+r.cloneOffset:r.currentSlide+r.cloneOffset;h&&!e?(r.container.height((r.count+r.cloneCount)*200+"%").css("position","absolute").width("100%"),setTimeout(function(){r.newSlides.css({display:"block"});r.doMath();r.viewport.height(r.h);r.setProps(i*r.h,"init")},t==="init"?100:0)):(r.container.width((r.count+r.cloneCount)*200+"%"),r.setProps(i*r.computedW,"init"),setTimeout(function(){r.doMath();r.newSlides.css({width:r.computedW,float:"left",display:"block"});r.vars.smoothHeight&&u.smoothHeight()},t==="init"?100:0))}e||r.slides.removeClass(f+"active-slide").eq(r.currentSlide).addClass(f+"active-slide")};r.doMath=function(){var u=r.slides.first(),n=r.vars.itemMargin,t=r.vars.minItems,i=r.vars.maxItems;r.w=r.viewport===undefined?r.width():r.viewport.width();r.h=u.height();r.boxPadding=u.outerWidth()-u.width();e?(r.itemT=r.vars.itemWidth+n,r.minW=t?t*r.itemT:r.w,r.maxW=i?i*r.itemT-n:r.w,r.itemW=r.minW>r.w?(r.w-n*(t-1))/t:r.maxW<r.w?(r.w-n*(i-1))/i:r.vars.itemWidth>r.w?r.w:r.vars.itemWidth,r.visible=Math.floor(r.w/r.itemW),r.move=r.vars.move>0&&r.vars.move<r.visible?r.vars.move:r.visible,r.pagingCount=Math.ceil((r.count-r.visible)/r.move+1),r.last=r.pagingCount-1,r.limit=r.pagingCount===1?0:r.vars.itemWidth>r.w?r.itemW*(r.count-1)+n*(r.count-1):(r.itemW+n)*r.count-r.w-n):(r.itemW=r.w,r.pagingCount=r.count,r.last=r.count-1);r.computedW=r.itemW-r.boxPadding};r.update=function(n,t){r.doMath();e||(n<r.currentSlide?r.currentSlide+=1:n<=r.currentSlide&&n!==0&&(r.currentSlide-=1),r.animatingTo=r.currentSlide);r.vars.controlNav&&!r.manualControls&&(t==="add"&&!e||r.pagingCount>r.controlNav.length?u.controlNav.update("add"):(t==="remove"&&!e||r.pagingCount<r.controlNav.length)&&(e&&r.currentSlide>r.last&&(r.currentSlide-=1,r.animatingTo-=1),u.controlNav.update("remove",r.last)));r.vars.directionNav&&u.directionNav.update()};r.addSlide=function(t,i){var u=n(t);r.count+=1;r.last=r.count-1;h&&o?i!==undefined?r.slides.eq(r.count-i).after(u):r.container.prepend(u):i!==undefined?r.slides.eq(i).before(u):r.container.append(u);r.update(i,"add");r.slides=n(r.vars.selector+":not(.clone)",r);r.setup();r.vars.added(r)};r.removeSlide=function(t){var i=isNaN(t)?r.slides.index(n(t)):t;r.count-=1;r.last=r.count-1;isNaN(t)?n(t,r.slides).remove():h&&o?r.slides.eq(r.last).remove():r.slides.eq(t).remove();r.doMath();r.update(i,"remove");r.slides=n(r.vars.selector+":not(.clone)",r);r.setup();r.vars.removed(r)};u.init()};n(window).blur(function(){focused=!1}).focus(function(){focused=!0});n.flexslider.defaults={namespace:"flex-",selector:".slides > li",animation:"fade",easing:"swing",direction:"horizontal",reverse:!1,animationLoop:!0,smoothHeight:!1,startAt:0,slideshow:!0,slideshowSpeed:7e3,animationSpeed:600,initDelay:0,randomize:!1,thumbCaptions:!1,pauseOnAction:!0,pauseOnHover:!1,pauseInvisible:!0,useCSS:!0,touch:!0,video:!1,controlNav:!0,directionNav:!0,prevText:"Previous",nextText:"Next",keyboard:!0,multipleKeyboard:!1,mousewheel:!1,pausePlay:!1,pauseText:"Pause",playText:"Play",controlsContainer:"",manualControls:"",sync:"",asNavFor:"",itemWidth:0,itemMargin:0,minItems:1,maxItems:0,move:0,allowOneSlide:!0,start:function(){},before:function(){},after:function(){},end:function(){},added:function(){},removed:function(){}};n.fn.flexslider=function(t){if(t===undefined&&(t={}),typeof t=="object")return this.each(function(){var i=n(this),u=t.selector?t.selector:".slides > li",r=i.find(u);r.length===1&&t.allowOneSlide===!0||r.length===0?(r.fadeIn(400),t.start&&t.start(i)):i.data("flexslider")===undefined&&new n.flexslider(this,t)});var i=n(this).data("flexslider");switch(t){case"play":i.play();break;case"pause":i.pause();break;case"stop":i.stop();break;case"next":i.flexAnimate(i.getTarget("next"),!0);break;case"prev":case"previous":i.flexAnimate(i.getTarget("prev"),!0);break;default:typeof t=="number"&&i.flexAnimate(t,!0)}}}(jQuery);jQuery.fn.pSlider=function(n){var t=jQuery.extend({slider:null,button:{prev:null,next:null},visible:1,width:null,height:null,extra:0,direction:"horizontal",duration:1e3,loop:!1,easing:null,start:null,animation:!0,skip:1,auto:!1,time:1e3,keyboard:!1,pagination:null,list:null,callback:function(){},callbackStart:function(){},callbackEnd:function(){}},n),i=this,r;if((t.start===0||t.start===null)&&t.callbackStart(),t.direction==="horizontal"&&t.width===null&&(t.width=t.slider.outerWidth()+t.extra),t.direction==="vertical"&&t.height===null&&(t.height=t.slider.outerHeight()+t.extra),this.animated=!1,this.total=t.slider.length,this.parent=t.slider.parent(),this.css("overflow","hidden"),t.direction==="horizontal"?t.slider.width(t.width):t.direction==="vertical"&&t.slider.height(t.height),t.direction==="horizontal"?(t.slider.css("float","left"),this.parent.width(t.width*this.total+t.extra*this.total)):t.direction==="vertical"&&this.parent.height(t.height*this.total+t.extra*this.total),t.pagination)if(i.total===1)t.pagination.hide();else{for(r=1;r<=i.total;r++)t.pagination.append('<a href="#"'+(r===1?' class="active"':null)+">"+r+"<\/a>");t.pagination.find("a").on("click",function(n){t.start=$(this).index();i.animation("text");n.preventDefault()})}if(t.list){t.list.filter(":first").addClass("active");t.list.on("click",function(n){t.start=$(this).index();i.animation("text");n.preventDefault()})}if(this.animation=function(n){i.animated===!1&&(i.animated=!0,n==="next"?t.start<i.total-t.visible?(t.start=t.start+t.skip,t.start>i.total-t.visible&&(t.start=i.total-t.visible)):t.loop?t.start=0:i.animated=!1:n==="prev"&&(t.start>0?(t.start=t.start-t.skip,t.start<0&&(t.start=0)):t.loop?t.start=i.total-t.visible:i.animated=!1),t.direction==="horizontal"?i.obj={marginLeft:"-"+(t.start*t.width+t.extra*t.start)}:t.direction==="vertical"&&(i.obj={marginTop:"-"+(t.start*t.height+t.extra*t.start)}),i.parent.stop().animate(i.obj,{duration:t.duration,complete:function(){i.animated=!1;t.pagination&&t.pagination.find("a").removeClass("active").eq(t.start).addClass("active");t.list&&t.list.removeClass("active").eq(t.start).addClass("active")},easing:t.easing?t.easing:null}),t.start===i.total-t.visible?t.callbackEnd():t.start===0||t.start===null?t.callbackStart():t.callback())},t.button.next)t.button.next.on("click",function(n){i.animation("next");n.preventDefault()});if(t.button.prev)t.button.prev.on("click",function(n){i.animation("prev");n.preventDefault()});t.start>0&&(t.start=t.start-1,t.start>this.total&&(t.start=this.total),t.animation?this.animation("next"):(t.start=t.start+1,t.direction==="horizontal"?this.parent.css("margin-left","-"+t.start*t.width+"px"):t.direction==="vertical"&&this.parent.css("margin-top","-"+t.start*t.height+"px"),t.pagination&&t.pagination.find("a").removeClass("active").eq(t.start).addClass("active"),t.list&&t.list.removeClass("active").eq(t.start).addClass("active")));t.keyboard&&(this.keyboard=function(n){var r=n.which||n.keyCode;return t.direction==="horizontal"?r===37?i.animation("prev"):r===39&&i.animation("next"):t.direction==="vertical"&&(r===40?i.animation("prev"):r===38&&i.animation("next")),!1},this.hover(function(){$(document).on("keydown",i.keyboard)},function(){$(document).off("keydown",i.keyboard)}));t.auto&&(t.loop=!0,this.interval=setInterval(function(){i.animation("next")},t.time),this.hover(function(){clearInterval(i.interval);i.interval=null},function(){i.interval=setInterval(function(){i.animation("next")},t.time)}));this.bind("resize",function(n,r){i.animated=!1;t.start=t.start+1;r=jQuery.extend(t,r);$(this).pSlider(r)})},function(n,t,i,r){"use strict";var p=i("html"),e=i(n),o=i(t),u=i.fancybox=function(){u.open.apply(this,arguments)},y=navigator.userAgent.match(/msie/i),v=null,s=t.createTouch!==r,a=function(n){return n&&n.hasOwnProperty&&n instanceof i},c=function(n){return n&&i.type(n)==="string"},l=function(n){return c(n)&&n.indexOf("%")>0},w=function(n){return n&&!(n.style.overflow&&n.style.overflow==="hidden")&&(n.clientWidth&&n.scrollWidth>n.clientWidth||n.clientHeight&&n.scrollHeight>n.clientHeight)},f=function(n,t){var i=parseInt(n,10)||0;return t&&l(n)&&(i=u.getViewport()[t]/100*i),Math.ceil(i)},h=function(n,t){return f(n,t)+"px"};i.extend(u,{version:"2.1.5",defaults:{padding:15,margin:20,width:800,height:600,minWidth:100,minHeight:100,maxWidth:9999,maxHeight:9999,pixelRatio:1,autoSize:!0,autoHeight:!1,autoWidth:!1,autoResize:!0,autoCenter:!s,fitToView:!0,aspectRatio:!1,topRatio:.5,leftRatio:.5,scrolling:"auto",wrapCSS:"",arrows:!0,closeBtn:!0,closeClick:!1,nextClick:!1,mouseWheel:!0,autoPlay:!1,playSpeed:3e3,preload:3,modal:!1,loop:!0,ajax:{dataType:"html",headers:{"X-fancyBox":!0}},iframe:{scrolling:"auto",preload:!0},swf:{wmode:"transparent",allowfullscreen:"true",allowscriptaccess:"always"},keys:{next:{13:"left",34:"up",39:"left",40:"up"},prev:{8:"right",33:"down",37:"right",38:"down"},close:[27],play:[32],toggle:[70]},direction:{next:"left",prev:"right"},scrollOutside:!0,index:0,type:null,href:null,content:null,title:null,tpl:{wrap:'<div class="fancybox-wrap" tabIndex="-1"><div class="fancybox-skin"><div class="fancybox-outer"><div class="fancybox-inner"><\/div><\/div><\/div><\/div>',image:'<img class="fancybox-image" src="{href}" alt="" />',iframe:'<iframe id="fancybox-frame{rnd}" name="fancybox-frame{rnd}" class="fancybox-iframe" frameborder="0" vspace="0" hspace="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen'+(y?' allowtransparency="true"':"")+"><\/iframe>",error:'<p class="fancybox-error">The requested content cannot be loaded.<br/>Please try again later.<\/p>',closeBtn:'<a title="Close" class="fancybox-item fancybox-close" href="javascript:;"><\/a>',next:'<a title="Next" class="fancybox-nav fancybox-next" href="javascript:;"><span><\/span><\/a>',prev:'<a title="Previous" class="fancybox-nav fancybox-prev" href="javascript:;"><span><\/span><\/a>'},openEffect:"fade",openSpeed:250,openEasing:"swing",openOpacity:!0,openMethod:"zoomIn",closeEffect:"fade",closeSpeed:250,closeEasing:"swing",closeOpacity:!0,closeMethod:"zoomOut",nextEffect:"elastic",nextSpeed:250,nextEasing:"swing",nextMethod:"changeIn",prevEffect:"elastic",prevSpeed:250,prevEasing:"swing",prevMethod:"changeOut",helpers:{overlay:!0,title:!0},onCancel:i.noop,beforeLoad:i.noop,afterLoad:i.noop,beforeShow:i.noop,afterShow:i.noop,beforeChange:i.noop,beforeClose:i.noop,afterClose:i.noop},group:{},opts:{},previous:null,coming:null,current:null,isActive:!1,isOpen:!1,isOpened:!1,wrap:null,skin:null,outer:null,inner:null,player:{timer:null,isActive:!1},ajaxLoad:null,imgPreload:null,transitions:{},helpers:{},open:function(n,t){if(n)return(i.isPlainObject(t)||(t={}),!1===u.close(!0))?void 0:(i.isArray(n)||(n=a(n)?i(n).get():[n]),i.each(n,function(f,e){var h={},s,p,l,o,v,y,w;i.type(e)==="object"&&(e.nodeType&&(e=i(e)),a(e)?(h={href:e.data("fancybox-href")||e.attr("href"),title:e.data("fancybox-title")||e.attr("title"),isDom:!0,element:e},i.metadata&&i.extend(!0,h,e.metadata())):h=e);s=t.href||h.href||(c(e)?e:null);p=t.title!==r?t.title:h.title||"";l=t.content||h.content;o=l?"html":t.type||h.type;!o&&h.isDom&&(o=e.data("fancybox-type"),o||(v=e.prop("class").match(/fancybox\.(\w+)/),o=v?v[1]:null));c(s)&&(o||(u.isImage(s)?o="image":u.isSWF(s)?o="swf":s.charAt(0)==="#"?o="inline":c(e)&&(o="html",l=e)),o==="ajax"&&(y=s.split(/\s+/,2),s=y.shift(),w=y.shift()));l||(o==="inline"?s?l=i(c(s)?s.replace(/.*(?=#[^\s]+$)/,""):s):h.isDom&&(l=e):o==="html"?l=s:o||s||!h.isDom||(o="inline",l=e));i.extend(h,{href:s,type:o,content:l,title:p,selector:w});n[f]=h}),u.opts=i.extend(!0,{},u.defaults,t),t.keys!==r&&(u.opts.keys=t.keys?i.extend({},u.defaults.keys,t.keys):!1),u.group=n,u._start(u.opts.index))},cancel:function(){var n=u.coming;n&&!1!==u.trigger("onCancel")&&(u.hideLoading(),u.ajaxLoad&&u.ajaxLoad.abort(),u.ajaxLoad=null,u.imgPreload&&(u.imgPreload.onload=u.imgPreload.onerror=null),n.wrap&&n.wrap.stop(!0,!0).trigger("onReset").remove(),u.coming=null,u.current||u._afterZoomOut(n))},close:function(n){(u.cancel(),!1!==u.trigger("beforeClose"))&&(u.unbindEvents(),u.isActive)&&(u.isOpen&&n!==!0?(u.isOpen=u.isOpened=!1,u.isClosing=!0,i(".fancybox-item, .fancybox-nav").remove(),u.wrap.stop(!0,!0).removeClass("fancybox-opened"),u.transitions[u.current.closeMethod]()):(i(".fancybox-wrap").stop(!0).trigger("onReset").remove(),u._afterZoomOut()))},play:function(n){var t=function(){clearTimeout(u.player.timer)},i=function(){t();u.current&&u.player.isActive&&(u.player.timer=setTimeout(u.next,u.current.playSpeed))},r=function(){t();o.unbind(".player");u.player.isActive=!1;u.trigger("onPlayEnd")},f=function(){u.current&&(u.current.loop||u.current.index<u.group.length-1)&&(u.player.isActive=!0,o.bind({"onCancel.player beforeClose.player":r,"onUpdate.player":i,"beforeLoad.player":t}),i(),u.trigger("onPlayStart"))};n!==!0&&(u.player.isActive||n===!1)?r():f()},next:function(n){var t=u.current;t&&(c(n)||(n=t.direction.next),u.jumpto(t.index+1,n,"next"))},prev:function(n){var t=u.current;t&&(c(n)||(n=t.direction.prev),u.jumpto(t.index-1,n,"prev"))},jumpto:function(n,t,i){var e=u.current;e&&(n=f(n),u.direction=t||e.direction[n>=e.index?"next":"prev"],u.router=i||"jumpto",e.loop&&(n<0&&(n=e.group.length+n%e.group.length),n=n%e.group.length),e.group[n]!==r&&(u.cancel(),u._start(n)))},reposition:function(n,t){var f=u.current,e=f?f.wrap:null,r;e&&(r=u._getPosition(t),n&&n.type==="scroll"?(delete r.position,e.stop(!0,!0).animate(r,200)):(e.css(r),f.pos=i.extend({},f.dim,r)))},update:function(n){var t=n&&n.type,i=!t||t==="orientationchange";(i&&(clearTimeout(v),v=null),u.isOpen&&!v)&&(v=setTimeout(function(){var r=u.current;r&&!u.isClosing&&(u.wrap.removeClass("fancybox-tmp"),(i||t==="load"||t==="resize"&&r.autoResize)&&u._setDimension(),t==="scroll"&&r.canShrink||u.reposition(n),u.trigger("onUpdate"),v=null)},i&&!s?0:300))},toggle:function(n){u.isOpen&&(u.current.fitToView=i.type(n)==="boolean"?n:!u.current.fitToView,s&&(u.wrap.removeAttr("style").addClass("fancybox-tmp"),u.trigger("onUpdate")),u.update())},hideLoading:function(){o.unbind(".loading");i("#fancybox-loading").remove()},showLoading:function(){var t,n;u.hideLoading();t=i('<div id="fancybox-loading"><div><\/div><\/div>').click(u.cancel).appendTo("body");o.bind("keydown.loading",function(n){(n.which||n.keyCode)===27&&(n.preventDefault(),u.cancel())});u.defaults.fixed||(n=u.getViewport(),t.css({position:"absolute",top:n.h*.5+n.y,left:n.w*.5+n.x}))},getViewport:function(){var i=u.current&&u.current.locked||!1,t={x:e.scrollLeft(),y:e.scrollTop()};return i?(t.w=i[0].clientWidth,t.h=i[0].clientHeight):(t.w=s&&n.innerWidth?n.innerWidth:e.width(),t.h=s&&n.innerHeight?n.innerHeight:e.height()),t},unbindEvents:function(){u.wrap&&a(u.wrap)&&u.wrap.unbind(".fb");o.unbind(".fb");e.unbind(".fb")},bindEvents:function(){var n=u.current,t;n&&(e.bind("orientationchange.fb"+(s?"":" resize.fb")+(n.autoCenter&&!n.locked?" scroll.fb":""),u.update),t=n.keys,t&&o.bind("keydown.fb",function(f){var e=f.which||f.keyCode,o=f.target||f.srcElement;if(e===27&&u.coming)return!1;f.ctrlKey||f.altKey||f.shiftKey||f.metaKey||o&&(o.type||i(o).is("[contenteditable]"))||i.each(t,function(t,o){return n.group.length>1&&o[e]!==r?(u[t](o[e]),f.preventDefault(),!1):i.inArray(e,o)>-1?(u[t](),f.preventDefault(),!1):void 0})}),i.fn.mousewheel&&n.mouseWheel&&u.wrap.bind("mousewheel.fb",function(t,r,f,e){for(var h=t.target||null,o=i(h),s=!1;o.length;){if(s||o.is(".fancybox-skin")||o.is(".fancybox-wrap"))break;s=w(o[0]);o=i(o).parent()}r===0||s||u.group.length>1&&!n.canShrink&&(e>0||f>0?u.prev(e>0?"down":"left"):(e<0||f<0)&&u.next(e<0?"up":"right"),t.preventDefault())}))},trigger:function(n,t){var f,r=t||u.coming||u.current;if(r){if(i.isFunction(r[n])&&(f=r[n].apply(r,Array.prototype.slice.call(arguments,1))),f===!1)return!1;r.helpers&&i.each(r.helpers,function(t,f){f&&u.helpers[t]&&i.isFunction(u.helpers[t][n])&&u.helpers[t][n](i.extend(!0,{},u.helpers[t].defaults,f),r)});o.trigger(n)}},isImage:function(n){return c(n)&&n.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i)},isSWF:function(n){return c(n)&&n.match(/\.(swf)((\?|#).*)?$/i)},_start:function(n){var t={},c,l,r,e,o;if(n=f(n),c=u.group[n]||null,!c)return!1;if(t=i.extend(!0,{},u.opts,c),e=t.margin,o=t.padding,i.type(e)==="number"&&(t.margin=[e,e,e,e]),i.type(o)==="number"&&(t.padding=[o,o,o,o]),t.modal&&i.extend(!0,t,{closeBtn:!1,closeClick:!1,nextClick:!1,arrows:!1,mouseWheel:!1,keys:null,helpers:{overlay:{closeClick:!1}}}),t.autoSize&&(t.autoWidth=t.autoHeight=!0),t.width==="auto"&&(t.autoWidth=!0),t.height==="auto"&&(t.autoHeight=!0),t.group=u.group,t.index=n,u.coming=t,!1===u.trigger("beforeLoad")){u.coming=null;return}if(r=t.type,l=t.href,!r)return(u.coming=null,u.current&&u.router&&u.router!=="jumpto")?(u.current.index=n,u[u.router](u.direction)):!1;if(u.isActive=!0,(r==="image"||r==="swf")&&(t.autoHeight=t.autoWidth=!1,t.scrolling="visible"),r==="image"&&(t.aspectRatio=!0),r==="iframe"&&s&&(t.scrolling="scroll"),t.wrap=i(t.tpl.wrap).addClass("fancybox-"+(s?"mobile":"desktop")+" fancybox-type-"+r+" fancybox-tmp "+t.wrapCSS).appendTo(t.parent||"body"),i.extend(t,{skin:i(".fancybox-skin",t.wrap),outer:i(".fancybox-outer",t.wrap),inner:i(".fancybox-inner",t.wrap)}),i.each(["Top","Right","Bottom","Left"],function(n,i){t.skin.css("padding"+i,h(t.padding[n]))}),u.trigger("onReady"),r==="inline"||r==="html"){if(!t.content||!t.content.length)return u._error("content")}else if(!l)return u._error("href");r==="image"?u._loadImage():r==="ajax"?u._loadAjax():r==="iframe"?u._loadIframe():u._afterLoad()},_error:function(n){i.extend(u.coming,{type:"html",autoWidth:!0,autoHeight:!0,minWidth:0,minHeight:0,scrolling:"no",hasError:n,content:u.coming.tpl.error});u._afterLoad()},_loadImage:function(){var n=u.imgPreload=new Image;n.onload=function(){this.onload=this.onerror=null;u.coming.width=this.width/u.opts.pixelRatio;u.coming.height=this.height/u.opts.pixelRatio;u._afterLoad()};n.onerror=function(){this.onload=this.onerror=null;u._error("image")};n.src=u.coming.href;n.complete!==!0&&u.showLoading()},_loadAjax:function(){var n=u.coming;u.showLoading();u.ajaxLoad=i.ajax(i.extend({},n.ajax,{url:n.href,error:function(n,t){u.coming&&t!=="abort"?u._error("ajax",n):u.hideLoading()},success:function(t,i){i==="success"&&(n.content=t,u._afterLoad())}}))},_loadIframe:function(){var n=u.coming,t=i(n.tpl.iframe.replace(/\{rnd\}/g,(new Date).getTime())).attr("scrolling",s?"auto":n.iframe.scrolling).attr("src",n.href);if(i(n.wrap).bind("onReset",function(){try{i(this).find("iframe").hide().attr("src","//about:blank").end().empty()}catch(n){}}),n.iframe.preload){u.showLoading();t.one("load",function(){i(this).data("ready",1);s||i(this).bind("load.fb",u.update);i(this).parents(".fancybox-wrap").width("100%").removeClass("fancybox-tmp").show();u._afterLoad()})}n.content=t.appendTo(n.inner);n.iframe.preload||u._afterLoad()},_preloadImages:function(){for(var r=u.group,i=u.current,f=r.length,e=i.preload?Math.min(i.preload,f-1):0,n,t=1;t<=e;t+=1)n=r[(i.index+t)%f],n.type==="image"&&n.href&&((new Image).src=n.href)},_afterLoad:function(){var r=u.coming,f=u.current,e="fancybox-placeholder",t,n,c,o,s,h;if(u.hideLoading(),r&&u.isActive!==!1){if(!1===u.trigger("afterLoad",r,f)){r.wrap.stop(!0).trigger("onReset").remove();u.coming=null;return}f&&(u.trigger("beforeChange",f),f.wrap.stop(!0).removeClass("fancybox-opened").find(".fancybox-item, .fancybox-nav").remove());u.unbindEvents();t=r;n=r.content;c=r.type;o=r.scrolling;i.extend(u,{wrap:t.wrap,skin:t.skin,outer:t.outer,inner:t.inner,current:t,previous:f});s=t.href;switch(c){case"inline":case"ajax":case"html":t.selector?n=i("<div>").html(n).find(t.selector):a(n)&&(n.data(e)||n.data(e,i('<div class="'+e+'"><\/div>').insertAfter(n).hide()),n=n.show().detach(),t.wrap.bind("onReset",function(){i(this).find(n).length&&n.hide().replaceAll(n.data(e)).data(e,!1)}));break;case"image":n=t.tpl.image.replace("{href}",s);break;case"swf":n='<object id="fancybox-swf" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%"><param name="movie" value="'+s+'"><\/param>';h="";i.each(t.swf,function(t,i){n+='<param name="'+t+'" value="'+i+'"><\/param>';h+=" "+t+'="'+i+'"'});n+='<embed src="'+s+'" type="application/x-shockwave-flash" width="100%" height="100%"'+h+"><\/embed><\/object>"}a(n)&&n.parent().is(t.inner)||t.inner.append(n);u.trigger("beforeShow");t.inner.css("overflow",o==="yes"?"scroll":o==="no"?"hidden":o);u._setDimension();u.reposition();u.isOpen=!1;u.coming=null;u.bindEvents();u.isOpened?f.prevMethod&&u.transitions[f.prevMethod]():i(".fancybox-wrap").not(t.wrap).stop(!0).trigger("onReset").remove();u.transitions[u.isOpened?t.nextMethod:t.openMethod]();u._preloadImages()}},_setDimension:function(){var nt=u.getViewport(),wt=0,vt=!1,st=!1,v=u.wrap,k=u.skin,e=u.inner,r=u.current,n=r.width,t=r.height,o=r.minWidth,s=r.minHeight,c=r.maxWidth,a=r.maxHeight,bt=r.scrolling,ft=r.scrollOutside?r.scrollbarWidth:0,et=r.margin,yt=f(et[1]+et[3]),pt=f(et[0]+et[2]),d,ht,tt,it,p,y,ct,lt,w,g,b,rt,ot,ut,at;if(v.add(k).add(e).width("auto").height("auto").removeClass("fancybox-tmp"),d=f(k.outerWidth(!0)-k.width()),ht=f(k.outerHeight(!0)-k.height()),tt=yt+d,it=pt+ht,p=l(n)?(nt.w-tt)*f(n)/100:n,y=l(t)?(nt.h-it)*f(t)/100:t,r.type==="iframe"){if(ut=r.content,r.autoHeight&&ut.data("ready")===1)try{ut[0].contentWindow.document.location&&(e.width(p).height(9999),at=ut.contents().find("body"),ft&&at.css("overflow-x","hidden"),y=at.outerHeight(!0))}catch(kt){}}else(r.autoWidth||r.autoHeight)&&(e.addClass("fancybox-tmp"),r.autoWidth||e.width(p),r.autoHeight||e.height(y),r.autoWidth&&(p=e.width()),r.autoHeight&&(y=e.height()),e.removeClass("fancybox-tmp"));if(n=f(p),t=f(y),w=p/y,o=f(l(o)?f(o,"w")-tt:o),c=f(l(c)?f(c,"w")-tt:c),s=f(l(s)?f(s,"h")-it:s),a=f(l(a)?f(a,"h")-it:a),ct=c,lt=a,r.fitToView&&(c=Math.min(nt.w-tt,c),a=Math.min(nt.h-it,a)),rt=nt.w-yt,ot=nt.h-pt,r.aspectRatio?(n>c&&(n=c,t=f(n/w)),t>a&&(t=a,n=f(t*w)),n<o&&(n=o,t=f(n/w)),t<s&&(t=s,n=f(t*w))):(n=Math.max(o,Math.min(n,c)),r.autoHeight&&r.type!=="iframe"&&(e.width(n),t=e.height()),t=Math.max(s,Math.min(t,a))),r.fitToView)if(e.width(n).height(t),v.width(n+d),g=v.width(),b=v.height(),r.aspectRatio)while((g>rt||b>ot)&&n>o&&t>s){if(wt++>19)break;t=Math.max(s,Math.min(a,t-10));n=f(t*w);n<o&&(n=o,t=f(n/w));n>c&&(n=c,t=f(n/w));e.width(n).height(t);v.width(n+d);g=v.width();b=v.height()}else n=Math.max(o,Math.min(n,n-(g-rt))),t=Math.max(s,Math.min(t,t-(b-ot)));ft&&bt==="auto"&&t<y&&n+d+ft<rt&&(n+=ft);e.width(n).height(t);v.width(n+d);g=v.width();b=v.height();vt=(g>rt||b>ot)&&n>o&&t>s;st=r.aspectRatio?n<ct&&t<lt&&n<p&&t<y:(n<ct||t<lt)&&(n<p||t<y);i.extend(r,{dim:{width:h(g),height:h(b)},origWidth:p,origHeight:y,canShrink:vt,canExpand:st,wPadding:d,hPadding:ht,wrapSpace:b-k.outerHeight(!0),skinSpace:k.height()-t});!ut&&r.autoHeight&&t>s&&t<a&&!st&&e.height("auto")},_getPosition:function(n){var i=u.current,r=u.getViewport(),f=i.margin,e=u.wrap.width()+f[1]+f[3],o=u.wrap.height()+f[0]+f[2],t={position:"absolute",top:f[0],left:f[3]};return i.autoCenter&&i.fixed&&!n&&o<=r.h&&e<=r.w?t.position="fixed":i.locked||(t.top+=r.y,t.left+=r.x),t.top=h(Math.max(t.top,t.top+(r.h-o)*i.topRatio)),t.left=h(Math.max(t.left,t.left+(r.w-e)*i.leftRatio)),t},_afterZoomIn:function(){var n=u.current;n&&(u.isOpen=u.isOpened=!0,u.wrap.css("overflow","visible").addClass("fancybox-opened"),u.update(),(n.closeClick||n.nextClick&&u.group.length>1)&&u.inner.css("cursor","pointer").bind("click.fb",function(t){i(t.target).is("a")||i(t.target).parent().is("a")||(t.preventDefault(),u[n.closeClick?"close":"next"]())}),n.closeBtn&&i(n.tpl.closeBtn).appendTo(u.skin).bind("click.fb",function(n){n.preventDefault();u.close()}),n.arrows&&u.group.length>1&&((n.loop||n.index>0)&&i(n.tpl.prev).appendTo(u.outer).bind("click.fb",u.prev),(n.loop||n.index<u.group.length-1)&&i(n.tpl.next).appendTo(u.outer).bind("click.fb",u.next)),u.trigger("afterShow"),n.loop||n.index!==n.group.length-1?u.opts.autoPlay&&!u.player.isActive&&(u.opts.autoPlay=!1,u.play()):u.play(!1))},_afterZoomOut:function(n){n=n||u.current;i(".fancybox-wrap").trigger("onReset").remove();i.extend(u,{group:{},opts:{},router:!1,current:null,isActive:!1,isOpened:!1,isOpen:!1,isClosing:!1,wrap:null,skin:null,outer:null,inner:null});u.trigger("afterClose",n)}});u.transitions={getOrigPosition:function(){var n=u.current,f=n.element,t=n.orig,i={},e=50,o=50,s=n.hPadding,c=n.wPadding,r=u.getViewport();return!t&&n.isDom&&f.is(":visible")&&(t=f.find("img:first"),t.length||(t=f)),a(t)?(i=t.offset(),t.is("img")&&(e=t.outerWidth(),o=t.outerHeight())):(i.top=r.y+(r.h-o)*n.topRatio,i.left=r.x+(r.w-e)*n.leftRatio),(u.wrap.css("position")==="fixed"||n.locked)&&(i.top-=r.y,i.left-=r.x),{top:h(i.top-s*n.topRatio),left:h(i.left-c*n.leftRatio),width:h(e+c),height:h(o+s)}},step:function(n,t){var r,s,e,i=t.prop,o=u.current,h=o.wrapSpace,c=o.skinSpace;(i==="width"||i==="height")&&(r=t.end===t.start?1:(n-t.start)/(t.end-t.start),u.isClosing&&(r=1-r),s=i==="width"?o.wPadding:o.hPadding,e=n-s,u.skin[i](f(i==="width"?e:e-h*r)),u.inner[i](f(i==="width"?e:e-h*r-c*r)))},zoomIn:function(){var n=u.current,t=n.pos,r=n.openEffect,f=r==="elastic",e=i.extend({opacity:1},t);delete e.position;f?(t=this.getOrigPosition(),n.openOpacity&&(t.opacity=.1)):r==="fade"&&(t.opacity=.1);u.wrap.css(t).animate(e,{duration:r==="none"?0:n.openSpeed,easing:n.openEasing,step:f?this.step:null,complete:u._afterZoomIn})},zoomOut:function(){var n=u.current,i=n.closeEffect,r=i==="elastic",t={opacity:.1};r&&(t=this.getOrigPosition(),n.closeOpacity&&(t.opacity=.1));u.wrap.animate(t,{duration:i==="none"?0:n.closeSpeed,easing:n.closeEasing,step:r?this.step:null,complete:u._afterZoomOut})},changeIn:function(){var i=u.current,s=i.nextEffect,t=i.pos,o={opacity:1},r=u.direction,e=200,n;t.opacity=.1;s==="elastic"&&(n=r==="down"||r==="up"?"top":"left",r==="down"||r==="right"?(t[n]=h(f(t[n])-e),o[n]="+="+e+"px"):(t[n]=h(f(t[n])+e),o[n]="-="+e+"px"));s==="none"?u._afterZoomIn():u.wrap.css(t).animate(o,{duration:i.nextSpeed,easing:i.nextEasing,complete:u._afterZoomIn})},changeOut:function(){var n=u.previous,r=n.prevEffect,f={opacity:.1},t=u.direction;r==="elastic"&&(f[t==="down"||t==="up"?"top":"left"]=(t==="up"||t==="left"?"-":"+")+"=200px");n.wrap.animate(f,{duration:r==="none"?0:n.prevSpeed,easing:n.prevEasing,complete:function(){i(this).trigger("onReset").remove()}})}};u.helpers.overlay={defaults:{closeClick:!0,speedOut:200,showEarly:!0,css:{},locked:!s,fixed:!0},overlay:null,fixed:!1,el:i("html"),create:function(n){n=i.extend({},this.defaults,n);this.overlay&&this.close();this.overlay=i('<div class="fancybox-overlay"><\/div>').appendTo(u.coming?u.coming.parent:n.parent);this.fixed=!1;n.fixed&&u.defaults.fixed&&(this.overlay.addClass("fancybox-overlay-fixed"),this.fixed=!0)},open:function(n){var t=this;n=i.extend({},this.defaults,n);this.overlay?this.overlay.unbind(".overlay").width("auto").height("auto"):this.create(n);this.fixed||(e.bind("resize.overlay",i.proxy(this.update,this)),this.update());n.closeClick&&this.overlay.bind("click.overlay",function(n){if(i(n.target).hasClass("fancybox-overlay"))return u.isActive?u.close():t.close(),!1});this.overlay.css(n.css).show()},close:function(){var n,t;e.unbind("resize.overlay");this.el.hasClass("fancybox-lock")&&(i(".fancybox-margin").removeClass("fancybox-margin"),n=e.scrollTop(),t=e.scrollLeft(),this.el.removeClass("fancybox-lock"),e.scrollTop(n).scrollLeft(t));i(".fancybox-overlay").remove().hide();i.extend(this,{overlay:null,fixed:!1})},update:function(){var n="100%",i;this.overlay.width(n).height("100%");y?(i=Math.max(t.documentElement.offsetWidth,t.body.offsetWidth),o.width()>i&&(n=o.width())):o.width()>e.width()&&(n=o.width());this.overlay.width(n).height(o.height())},onReady:function(n,t){var r=this.overlay;i(".fancybox-overlay").stop(!0,!0);r||this.create(n);n.locked&&this.fixed&&t.fixed&&(r||(this.margin=o.height()>e.height()?i("html").css("margin-right").replace("px",""):!1),t.locked=this.overlay.append(t.wrap),t.fixed=!1);n.showEarly===!0&&this.beforeShow.apply(this,arguments)},beforeShow:function(n,t){var r,u;t.locked&&(this.margin!==!1&&(i("*").filter(function(){return i(this).css("position")==="fixed"&&!i(this).hasClass("fancybox-overlay")&&!i(this).hasClass("fancybox-wrap")}).addClass("fancybox-margin"),this.el.addClass("fancybox-margin")),r=e.scrollTop(),u=e.scrollLeft(),this.el.addClass("fancybox-lock"),e.scrollTop(r).scrollLeft(u));this.open(n)},onUpdate:function(){this.fixed||this.update()},afterClose:function(n){this.overlay&&!u.coming&&this.overlay.fadeOut(n.speedOut,i.proxy(this.close,this))}};u.helpers.title={defaults:{type:"float",position:"bottom"},beforeShow:function(n){var o=u.current,r=o.title,s=n.type,t,e;if(i.isFunction(r)&&(r=r.call(o.element,o)),c(r)&&i.trim(r)!==""){t=i('<div class="fancybox-title fancybox-title-'+s+'-wrap">'+r+"<\/div>");switch(s){case"inside":e=u.skin;break;case"outside":e=u.wrap;break;case"over":e=u.inner;break;default:e=u.skin;t.appendTo("body");y&&t.width(t.width());t.wrapInner('<span class="child"><\/span>');u.current.margin[2]+=Math.abs(f(t.css("margin-bottom")))}t[n.position==="top"?"prependTo":"appendTo"](e)}}};i.fn.fancybox=function(n){var r,f=i(this),t=this.selector||"",e=function(e){var o=i(this).blur(),c=r,h,s;e.ctrlKey||e.altKey||e.shiftKey||e.metaKey||o.is(".fancybox-wrap")||(h=n.groupAttr||"data-fancybox-group",s=o.attr(h),s||(h="rel",s=o.get(0)[h]),s&&s!==""&&s!=="nofollow"&&(o=t.length?i(t):f,o=o.filter("["+h+'="'+s+'"]'),c=o.index(this)),n.index=c,u.open(o,n)!==!1&&e.preventDefault())};return n=n||{},r=n.index||0,t&&n.live!==!1?o.undelegate(t,"click.fb-start").delegate(t+":not('.fancybox-item, .fancybox-nav')","click.fb-start",e):f.unbind("click.fb-start").bind("click.fb-start",e),this.filter("[data-fancybox-start=1]").trigger("click"),this};o.ready(function(){var t,f;i.scrollbarWidth===r&&(i.scrollbarWidth=function(){var n=i('<div style="width:50px;height:50px;overflow:auto"><div/><\/div>').appendTo("body"),t=n.children(),r=t.innerWidth()-t.height(99).innerWidth();return n.remove(),r});i.support.fixedPosition===r&&(i.support.fixedPosition=function(){var n=i('<div style="position:fixed;top:20px;"><\/div>').appendTo("body"),t=n[0].offsetTop===20||n[0].offsetTop===15;return n.remove(),t}());i.extend(u.defaults,{scrollbarWidth:i.scrollbarWidth(),fixed:i.support.fixedPosition,parent:i("body")});t=i(n).width();p.addClass("fancybox-lock-test");f=i(n).width();p.removeClass("fancybox-lock-test");i("<style type='text/css'>.fancybox-margin{margin-right:"+(f-t)+"px;}<\/style>").appendTo("head")})}(window,document,jQuery),function(n){function t(t,r,f,o,s){function g(){var n,t;c.unbind("webkitTransitionEnd transitionend otransitionend oTransitionEnd");r&&i(r,f,o,s);s.startOrder=[];s.newOrder=[];s.origSort=[];s.checkSort=[];k.removeStyle(s.prefix+"filter, filter, "+s.prefix+"transform, transform, opacity, display").css(s.clean).removeAttr("data-checksum");window.atob||k.css({display:"none",opacity:"0"});n=s.resizeContainer?"height":"";c.removeStyle(s.prefix+"transition, transition, "+s.prefix+"perspective, perspective, "+s.prefix+"perspective-origin, perspective-origin, "+n);s.layoutMode=="list"?(l.css({display:s.targetDisplayList,opacity:"1"}),s.origDisplay=s.targetDisplayList):(l.css({display:s.targetDisplayGrid,opacity:"1"}),s.origDisplay=s.targetDisplayGrid);s.origLayout=s.layoutMode;t=setTimeout(function(){if(k.removeStyle(s.prefix+"transition, transition"),s.mixing=!1,typeof s.onMixEnd=="function"){var n=s.onMixEnd.call(this,s);s=n?n:s}})}var rt,a,nt,k,c,tt,it,b,v,ut;for(clearInterval(s.failsafe),s.mixing=!0,s.filter=t,typeof s.onMixStart=="function"&&(rt=s.onMixStart.call(this,s),s=rt?rt:s),a=s.transitionSpeed,b=0;b<2;b++)v=b==0?v=s.prefix:"",s.transition[v+"transition"]="all "+a+"ms linear",s.transition[v+"transform"]=v+"translate3d(0,0,0)",s.perspective[v+"perspective"]=s.perspectiveDistance+"px",s.perspective[v+"perspective-origin"]=s.perspectiveOrigin;nt=s.targetSelector;k=o.find(nt);k.each(function(){this.data={}});c=k.parent();c.css(s.perspective);s.easingFallback="ease-in-out";s.easing=="smooth"&&(s.easing="cubic-bezier(0.25, 0.46, 0.45, 0.94)");s.easing=="snap"&&(s.easing="cubic-bezier(0.77, 0, 0.175, 1)");s.easing=="windback"&&(s.easing="cubic-bezier(0.175, 0.885, 0.320, 1.275)",s.easingFallback="cubic-bezier(0.175, 0.885, 0.320, 1)");s.easing=="windup"&&(s.easing="cubic-bezier(0.6, -0.28, 0.735, 0.045)",s.easingFallback="cubic-bezier(0.6, 0.28, 0.735, 0.045)");tt=s.layoutMode=="list"&&s.listEffects!=null?s.listEffects:s.effects;Array.prototype.indexOf&&(s.fade=tt.indexOf("fade")>-1?"0":"",s.scale=tt.indexOf("scale")>-1?"scale(.01)":"",s.rotateZ=tt.indexOf("rotateZ")>-1?"rotate(180deg)":"",s.rotateY=tt.indexOf("rotateY")>-1?"rotateY(90deg)":"",s.rotateX=tt.indexOf("rotateX")>-1?"rotateX(90deg)":"",s.blur=tt.indexOf("blur")>-1?"blur(8px)":"",s.grayscale=tt.indexOf("grayscale")>-1?"grayscale(100%)":"");var l=n(),p=n(),w=[],ft=!1;typeof t=="string"?w=u(t):(ft=!0,n.each(t,function(n){w[n]=u(this)}));s.filterLogic=="or"?(w[0]==""&&w.shift(),w.length<1?p=p.add(o.find(nt+":visible")):k.each(function(){var t=n(this),i;ft?(i=0,n.each(w,function(){this.length?t.is("."+this.join(", ."))&&i++:i>0&&i++}),i==w.length?l=l.add(t):p=p.add(t)):t.is("."+w.join(", ."))?l=l.add(t):p=p.add(t)})):(l=l.add(c.find(nt+"."+w.join("."))),p=p.add(c.find(nt+":not(."+w.join(".")+"):visible")));var et=l.length,d=n(),y=n(),h=n();if(p.each(function(){var t=n(this);t.css("display")!="none"&&(d=d.add(t),h=h.add(t))}),l.filter(":visible").length==et&&!d.length&&!r){if(s.origLayout==s.layoutMode)return g(),!1;if(l.length==1)return s.layoutMode=="list"?(o.addClass(s.listClass),o.removeClass(s.gridClass),h.css("display",s.targetDisplayList)):(o.addClass(s.gridClass),o.removeClass(s.listClass),h.css("display",s.targetDisplayGrid)),g(),!1}if(s.origHeight=c.height(),l.length){if(o.removeClass(s.failClass),l.each(function(){var t=n(this);t.css("display")=="none"?y=y.add(t):h=h.add(t)}),s.origLayout!=s.layoutMode&&s.animateGridList==!1)return s.layoutMode=="list"?(o.addClass(s.listClass),o.removeClass(s.gridClass),h.css("display",s.targetDisplayList)):(o.addClass(s.gridClass),o.removeClass(s.listClass),h.css("display",s.targetDisplayGrid)),g(),!1;if(!window.atob||(k.css(s.clean),h.each(function(){this.data.origPos=n(this).offset()}),s.layoutMode=="list"?(o.addClass(s.listClass),o.removeClass(s.gridClass),y.css("display",s.targetDisplayList)):(o.addClass(s.gridClass),o.removeClass(s.listClass),y.css("display",s.targetDisplayGrid)),y.each(function(){this.data.showInterPos=n(this).offset()}),d.each(function(){this.data.hideInterPos=n(this).offset()}),h.each(function(){this.data.preInterPos=n(this).offset()}),s.layoutMode=="list"?h.css("display",s.targetDisplayList):h.css("display",s.targetDisplayGrid),r&&i(r,f,o,s),r&&e(s.origSort,s.checkSort)))return g(),!1;for(d.hide(),y.each(function(){this.data.finalPos=n(this).offset()}),h.each(function(){this.data.finalPrePos=n(this).offset()}),s.newHeight=c.height(),r&&i("reset",null,o,s),y.hide(),h.css("display",s.origDisplay),s.origDisplay=="block"?(o.addClass(s.listClass),y.css("display",s.targetDisplayList)):(o.removeClass(s.listClass),y.css("display",s.targetDisplayGrid)),s.resizeContainer&&c.css("height",s.origHeight+"px"),it={},b=0;b<2;b++)v=b==0?v=s.prefix:"",it[v+"transform"]=s.scale+" "+s.rotateX+" "+s.rotateY+" "+s.rotateZ,it[v+"filter"]=s.blur+" "+s.grayscale;y.css(it);h.each(function(){var t=this.data,f=n(this),r,i,u;for(f.hasClass("mix_tohide")?(t.preTX=t.origPos.left-t.hideInterPos.left,t.preTY=t.origPos.top-t.hideInterPos.top):(t.preTX=t.origPos.left-t.preInterPos.left,t.preTY=t.origPos.top-t.preInterPos.top),r={},i=0;i<2;i++)u=i==0?u=s.prefix:"",r[u+"transform"]="translate("+t.preTX+"px,"+t.preTY+"px)";f.css(r)});s.layoutMode=="list"?(o.addClass(s.listClass),o.removeClass(s.gridClass)):(o.addClass(s.gridClass),o.removeClass(s.listClass));ut=setTimeout(function(){var u,r,i,t;if(s.resizeContainer){for(u={},i=0;i<2;i++)t=i==0?t=s.prefix:"",u[t+"transition"]="all "+a+"ms ease-in-out",u.height=s.newHeight+"px";c.css(u)}for(d.css("opacity",s.fade),y.css("opacity",1),y.each(function(){var i=this.data,r,u,t;for(i.tX=i.finalPos.left-i.showInterPos.left,i.tY=i.finalPos.top-i.showInterPos.top,r={},u=0;u<2;u++)t=u==0?t=s.prefix:"",r[t+"transition-property"]=t+"transform, "+t+"filter, opacity",r[t+"transition-timing-function"]=s.easing+", linear, linear",r[t+"transition-duration"]=a+"ms",r[t+"transition-delay"]="0",r[t+"transform"]="translate("+i.tX+"px,"+i.tY+"px)",r[t+"filter"]="none";n(this).css("-webkit-transition","all "+a+"ms "+s.easingFallback).css(r)}),h.each(function(){var t=this.data,i,r,u;for(t.tX=t.finalPrePos.left!=0?t.finalPrePos.left-t.preInterPos.left:0,t.tY=t.finalPrePos.left!=0?t.finalPrePos.top-t.preInterPos.top:0,i={},r=0;r<2;r++)u=r==0?u=s.prefix:"",i[u+"transition"]="all "+a+"ms "+s.easing,i[u+"transform"]="translate("+t.tX+"px,"+t.tY+"px)";n(this).css("-webkit-transition","all "+a+"ms "+s.easingFallback).css(i)}),r={},i=0;i<2;i++)t=i==0?t=s.prefix:"",r[t+"transition"]="all "+a+"ms "+s.easing+", "+t+"filter "+a+"ms linear, opacity "+a+"ms linear",r[t+"transform"]=s.scale+" "+s.rotateX+" "+s.rotateY+" "+s.rotateZ,r[t+"filter"]=s.blur+" "+s.grayscale,r.opacity=s.fade;d.css(r);c.bind("webkitTransitionEnd transitionend otransitionend oTransitionEnd",function(t){(t.originalEvent.propertyName.indexOf("transform")>-1||t.originalEvent.propertyName.indexOf("opacity")>-1)&&(nt.indexOf(".")>-1?n(t.target).hasClass(nt.replace(".",""))&&g():n(t.target).is(nt)&&g())})},10);s.failsafe=setTimeout(function(){s.mixing&&g()},a+400)}else{if(s.resizeContainer&&c.css("height",s.origHeight+"px"),!window.atob)return g(),!1;d=p;ut=setTimeout(function(){var r,u,i,n,t;if(c.css(s.perspective),s.resizeContainer){for(r={},n=0;n<2;n++)t=n==0?t=s.prefix:"",r[t+"transition"]="height "+a+"ms ease-in-out",r.height=s.minHeight+"px";c.css(r)}if(k.css(s.transition),u=p.length,u){for(i={},n=0;n<2;n++)t=n==0?t=s.prefix:"",i[t+"transform"]=s.scale+" "+s.rotateX+" "+s.rotateY+" "+s.rotateZ,i[t+"filter"]=s.blur+" "+s.grayscale,i.opacity=s.fade;d.css(i);c.bind("webkitTransitionEnd transitionend otransitionend oTransitionEnd",function(n){(n.originalEvent.propertyName.indexOf("transform")>-1||n.originalEvent.propertyName.indexOf("opacity")>-1)&&(o.addClass(s.failClass),g())})}else s.mixing=!1},10)}}function i(t,i,r,u){function o(n,i){var r=isNaN(n.attr(t)*1)?n.attr(t).toLowerCase():n.attr(t)*1,u=isNaN(i.attr(t)*1)?i.attr(t).toLowerCase():i.attr(t)*1;return r<u?-1:r>u?1:0}function e(n){i=="asc"?f.prepend(n).prepend(" "):f.append(n).append(" ")}function s(n){for(var t=n.slice(),u=t.length,i=u,r,f;i--;)r=parseInt(Math.random()*u),f=t[i],t[i]=t[r],t[r]=f;return t}r.find(u.targetSelector).wrapAll('<div class="mix_sorter"/>');var f=r.find(".mix_sorter");if(u.origSort.length||f.find(u.targetSelector+":visible").each(function(){n(this).wrap("<s/>");u.origSort.push(n(this).parent().html().replace(/\s+/g,""));n(this).unwrap()}),f.empty(),t=="reset")n.each(u.startOrder,function(){f.append(this).append(" ")});else if(t=="default")n.each(u.origOrder,function(){e(this)});else if(t=="random")u.newOrder.length||(u.newOrder=s(u.startOrder)),n.each(u.newOrder,function(){f.append(this).append(" ")});else if(t=="custom")n.each(i,function(){e(this)});else{if(typeof u.origOrder[0].attr(t)=="undefined")return console.log("No such attribute found. Terminating"),!1;u.newOrder.length||(n.each(u.origOrder,function(){u.newOrder.push(n(this))}),u.newOrder.sort(o));n.each(u.newOrder,function(){e(this)})}u.checkSort=[];f.find(u.targetSelector+":visible").each(function(t){var i=n(this);t==0&&i.attr("data-checksum","1");i.wrap("<s/>");u.checkSort.push(i.parent().html().replace(/\s+/g,""));i.unwrap()});r.find(u.targetSelector).unwrap()}function f(n){for(var i=["Webkit","Moz","O","ms"],t=0;t<i.length;t++)if(i[t]+"Transition"in n.style)return i[t];return"transition"in n.style?"":!1}function e(n,t){if(n.length!=t.length)return!1;for(var i=0;i<t.length;i++)if(n[i].compare&&!n[i].compare(t[i])||n[i]!==t[i])return!1;return!0}function u(t){t=t.replace(/\s{2,}/g," ");var i=t.split(" ");return n.each(i,function(n){this=="all"&&(i[n]="mix_all")}),i[0]==""&&i.shift(),i}var r={init:function(r){return this.each(function(){var v=window.navigator.appVersion.match(/Chrome\/(\d+)\./),l=v?parseInt(v[1],10):!1,p=function(n){var t=document.getElementById(n),r=t.parentElement,i=document.createElement("div"),u=document.createDocumentFragment();r.insertBefore(i,t);u.appendChild(t);r.replaceChild(t,i);u=null;i=null},u,e,a,y,o,s,c,h,w;for((l&&l==31||l==32)&&p(this.id),u={targetSelector:".mix",filterSelector:".filter",sortSelector:".sort",buttonEvent:"click",effects:["fade","scale"],listEffects:null,easing:"smooth",layoutMode:"grid",targetDisplayGrid:"inline-block",targetDisplayList:"block",listClass:"",gridClass:"",transitionSpeed:600,showOnLoad:"all",sortOnLoad:!1,multiFilter:!1,filterLogic:"or",resizeContainer:!0,minHeight:0,failClass:"fail",perspectiveDistance:"3000",perspectiveOrigin:"50% 50%",animateGridList:!0,onMixLoad:null,onMixStart:null,onMixEnd:null,container:null,origOrder:[],startOrder:[],newOrder:[],origSort:[],checkSort:[],filter:"",mixing:!1,origDisplay:"",origLayout:"",origHeight:0,newHeight:0,isTouch:!1,resetDelay:0,failsafe:null,prefix:"",easingFallback:"ease-in-out",transition:{},perspective:{},clean:{},fade:"1",scale:"",rotateX:"",rotateY:"",rotateZ:"",blur:"",grayscale:""},r&&n.extend(u,r),this.config=u,n.support.touch=("ontouchend"in document),n.support.touch&&(u.isTouch=!0,u.resetDelay=350),u.container=n(this),e=u.container,u.prefix=f(e[0]),u.prefix=u.prefix?"-"+u.prefix.toLowerCase()+"-":"",e.find(u.targetSelector).each(function(){u.origOrder.push(n(this))}),u.sortOnLoad&&(n.isArray(u.sortOnLoad)?(a=u.sortOnLoad[0],y=u.sortOnLoad[1],n(u.sortSelector+"[data-sort="+u.sortOnLoad[0]+"][data-order="+u.sortOnLoad[1]+"]").addClass("active")):(n(u.sortSelector+"[data-sort="+u.sortOnLoad+"]").addClass("active"),a=u.sortOnLoad,u.sortOnLoad="desc"),i(a,y,e,u)),o=0;o<2;o++)s=o==0?s=u.prefix:"",u.transition[s+"transition"]="all "+u.transitionSpeed+"ms ease-in-out",u.perspective[s+"perspective"]=u.perspectiveDistance+"px",u.perspective[s+"perspective-origin"]=u.perspectiveOrigin;for(o=0;o<2;o++)s=o==0?s=u.prefix:"",u.clean[s+"transition"]="none";u.layoutMode=="list"?(e.addClass(u.listClass),u.origDisplay=u.targetDisplayList):(e.addClass(u.gridClass),u.origDisplay=u.targetDisplayGrid);u.origLayout=u.layoutMode;c=u.showOnLoad.split(" ");n.each(c,function(){n(u.filterSelector+'[data-filter="'+this+'"]').addClass("active")});e.find(u.targetSelector).addClass("mix_all");c[0]=="all"&&(c[0]="mix_all",u.showOnLoad="mix_all");h=n();n.each(c,function(){h=h.add(n("."+this))});h.each(function(){var t=n(this);u.layoutMode=="list"?t.css("display",u.targetDisplayList):t.css("display",u.targetDisplayGrid);t.css(u.transition)});w=setTimeout(function(){u.mixing=!0;h.css("opacity","1");var n=setTimeout(function(){if(u.layoutMode=="list"?h.removeStyle(u.prefix+"transition, transition").css({display:u.targetDisplayList,opacity:1}):h.removeStyle(u.prefix+"transition, transition").css({display:u.targetDisplayGrid,opacity:1}),u.mixing=!1,typeof u.onMixLoad=="function"){var n=u.onMixLoad.call(this,u);u=n?n:u}},u.transitionSpeed)},10);u.filter=u.showOnLoad;n(u.sortSelector).bind(u.buttonEvent,function(){if(!u.mixing){var i=n(this),r=i.attr("data-sort"),f=i.attr("data-order");if(i.hasClass("active")){if(r!="random")return!1}else n(u.sortSelector).removeClass("active"),i.addClass("active");e.find(u.targetSelector).each(function(){u.startOrder.push(n(this))});t(u.filter,r,f,e,u)}});n(u.filterSelector).bind(u.buttonEvent,function(){var i,r,f;u.mixing||(i=n(this),u.multiFilter==!1?(n(u.filterSelector).removeClass("active"),i.addClass("active"),u.filter=i.attr("data-filter"),n(u.filterSelector+'[data-filter="'+u.filter+'"]').addClass("active")):(r=i.attr("data-filter"),i.hasClass("active")?(i.removeClass("active"),f=new RegExp("(\\s|^)"+r),u.filter=u.filter.replace(f,"")):(i.addClass("active"),u.filter=u.filter+" "+r)),t(u.filter,null,null,e,u))})})},toGrid:function(){return this.each(function(){var i=this.config;i.layoutMode!="grid"&&(i.layoutMode="grid",t(i.filter,null,null,n(this),i))})},toList:function(){return this.each(function(){var i=this.config;i.layoutMode!="list"&&(i.layoutMode="list",t(i.filter,null,null,n(this),i))})},filter:function(i){return this.each(function(){var r=this.config;r.mixing||(n(r.filterSelector).removeClass("active"),n(r.filterSelector+'[data-filter="'+i+'"]').addClass("active"),t(i,null,null,n(this),r))})},sort:function(i){return this.each(function(){var r=this.config,e=n(this),u,f;r.mixing||(n(r.sortSelector).removeClass("active"),n.isArray(i)?(u=i[0],f=i[1],n(r.sortSelector+'[data-sort="'+i[0]+'"][data-order="'+i[1]+'"]').addClass("active")):(n(r.sortSelector+'[data-sort="'+i+'"]').addClass("active"),u=i,f="desc"),e.find(r.targetSelector).each(function(){r.startOrder.push(n(this))}),t(r.filter,u,f,e,r))})},multimix:function(i){return this.each(function(){var r=this.config,u=n(this);multiOut={filter:r.filter,sort:null,order:"desc",layoutMode:r.layoutMode};n.extend(multiOut,i);r.mixing||(n(r.filterSelector).add(r.sortSelector).removeClass("active"),n(r.filterSelector+'[data-filter="'+multiOut.filter+'"]').addClass("active"),typeof multiOut.sort!="undefined"&&(n(r.sortSelector+'[data-sort="'+multiOut.sort+'"][data-order="'+multiOut.order+'"]').addClass("active"),u.find(r.targetSelector).each(function(){r.startOrder.push(n(this))})),r.layoutMode=multiOut.layoutMode,t(multiOut.filter,multiOut.sort,multiOut.order,u,r))})},remix:function(i){return this.each(function(){var r=this.config,u=n(this);r.origOrder=[];u.find(r.targetSelector).each(function(){var t=n(this);t.addClass("mix_all");r.origOrder.push(t)});r.mixing||typeof i=="undefined"||(n(r.filterSelector).removeClass("active"),n(r.filterSelector+'[data-filter="'+i+'"]').addClass("active"),t(i,null,null,u,r))})}};n.fn.mixitup=function(n){return r[n]?r[n].apply(this,Array.prototype.slice.call(arguments,1)):typeof n=="object"||!n?r.init.apply(this,arguments):void 0};n.fn.removeStyle=function(t){return this.each(function(){var r=n(this),i;t=t.replace(/\s+/g,"");i=t.split(",");n.each(i,function(){var n=new RegExp(this.toString()+"[^;]+;?","g");r.attr("style",function(t,i){if(i)return i.replace(n,"")})})})}}(jQuery);jQuery(document).ready(function(n){function t(){n(".social-icons li a").tooltip({placement:"top"})}function i(){n(".sf-menu").superfish({delay:50,autoArrows:!0,animation:{opacity:"show"}});n("nav > ul.sf-menu > li").each(function(){n(this).find(".sf-with-ul").append('<i class="fa fa-angle-down"><\/i>')})}t();n("#tabs").tab();i();n(window).load(function(){n(".flexslider").flexslider({animation:"fade",touch:!0,controlNav:!1,prevText:"&nbsp;",nextText:"&nbsp;"})});n(".carousel").carousel({interval:300});n(".fancybox").fancybox({padding:5,titlePosition:"over"});n("#slider-testimonials").pSlider({slider:n("#slider-testimonials ul li"),visible:1,button:{next:n("#slider-testimonials .next"),prev:n("#slider-testimonials .prev")}});n("#Grid").mixitup({effects:["fade","grayscale"],easing:"snap",transitionSpeed:400});n(".sub-menu").addClass("animated fadeInRight");n(".menu-toggle-btn").click(function(){n(".responsive_menu").stop(!0,!0).slideToggle()});n(".thumb-small-gallery").addClass("closed");n(".thumb-small-gallery").hover(function(){var t=n(this);t.removeClass("closed");t.css({opacity:1});n(".gallery-small-thumbs .closed").css({opacity:.7})},function(){var t=n(this);t.addClass("closed");n(".gallery-small-thumbs .closed").css({opacity:1})})});!function(n,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.swal=t():n.swal=t()}(this,function(){return function(n){function t(r){if(i[r])return i[r].exports;var u=i[r]={i:r,l:!1,exports:{}};return n[r].call(u.exports,u,u.exports,t),u.l=!0,u.exports}var i={};return t.m=n,t.c=i,t.d=function(n,i,r){t.o(n,i)||Object.defineProperty(n,i,{configurable:!1,enumerable:!0,get:r})},t.n=function(n){var i=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(i,"a",i),i},t.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},t.p="",t(t.s=8)}([function(n,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i="swal-button";t.CLASS_NAMES={MODAL:"swal-modal",OVERLAY:"swal-overlay",SHOW_MODAL:"swal-overlay--show-modal",MODAL_TITLE:"swal-title",MODAL_TEXT:"swal-text",ICON:"swal-icon",ICON_CUSTOM:"swal-icon--custom",CONTENT:"swal-content",FOOTER:"swal-footer",BUTTON_CONTAINER:"swal-button-container",BUTTON:i,CONFIRM_BUTTON:i+"--confirm",CANCEL_BUTTON:i+"--cancel",DANGER_BUTTON:i+"--danger",BUTTON_LOADING:i+"--loading",BUTTON_LOADER:i+"__loader"};t.default=t.CLASS_NAMES},function(n,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.getNode=function(n){var t="."+n;return document.querySelector(t)};t.stringToNode=function(n){var t=document.createElement("div");return t.innerHTML=n.trim(),t.firstChild};t.insertAfter=function(n,t){var i=t.nextSibling;t.parentNode.insertBefore(n,i)};t.removeNode=function(n){n.parentElement.removeChild(n)};t.throwErr=function(n){throw n=n.replace(/ +(?= )/g,""),"SweetAlert: "+(n=n.trim());};t.isPlainObject=function(n){if("[object Object]"!==Object.prototype.toString.call(n))return!1;var t=Object.getPrototypeOf(n);return null===t||t===Object.prototype};t.ordinalSuffixOf=function(n){var t=n%10,i=n%100;return 1===t&&11!==i?n+"st":2===t&&12!==i?n+"nd":3===t&&13!==i?n+"rd":n+"th"}},function(n,t,i){"use strict";function r(n){for(var i in n)t.hasOwnProperty(i)||(t[i]=n[i])}var f;Object.defineProperty(t,"__esModule",{value:!0});r(i(25));f=i(26);t.overlayMarkup=f.default;r(i(27));r(i(28));r(i(29));var u=i(0),e=u.default.MODAL_TITLE,o=u.default.MODAL_TEXT,s=u.default.ICON,h=u.default.FOOTER;t.iconMarkup='\n  <div class="'+s+'"><\/div>';t.titleMarkup='\n  <div class="'+e+'"><\/div>\n';t.textMarkup='\n  <div class="'+o+'"><\/div>';t.footerMarkup='\n  <div class="'+h+'"><\/div>\n'},function(n,t,i){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0});r=i(1);t.CONFIRM_KEY="confirm";t.CANCEL_KEY="cancel";var e={visible:!0,text:null,value:null,className:"",closeModal:!0},u=Object.assign({},e,{visible:!1,text:"Cancel",value:null}),s=Object.assign({},e,{text:"OK",value:!0});t.defaultButtonList={cancel:u,confirm:s};var h=function(n){switch(n){case t.CONFIRM_KEY:return s;case t.CANCEL_KEY:return u;default:var i=n.charAt(0).toUpperCase()+n.slice(1);return Object.assign({},e,{text:i,value:n})}},f=function(n,t){var i=h(n);return!0===t?Object.assign({},i,{visible:!0}):"string"==typeof t?Object.assign({},i,{visible:!0,text:t}):r.isPlainObject(t)?Object.assign({visible:!0},i,t):Object.assign({},i,{visible:!1})},c=function(n){for(var t={},i=0,e=Object.keys(n);i<e.length;i++){var r=e[i],o=n[r],s=f(r,o);t[r]=s}return t.cancel||(t.cancel=u),t},o=function(n){var i={};switch(n.length){case 1:i[t.CANCEL_KEY]=Object.assign({},u,{visible:!1});break;case 2:i[t.CANCEL_KEY]=f(t.CANCEL_KEY,n[0]);i[t.CONFIRM_KEY]=f(t.CONFIRM_KEY,n[1]);break;default:r.throwErr("Invalid number of 'buttons' in array ("+n.length+").\n      If you want more than 2 buttons, you need to use an object!")}return i};t.getButtonListOpts=function(n){var i=t.defaultButtonList;return"string"==typeof n?i[t.CONFIRM_KEY]=f(t.CONFIRM_KEY,n):Array.isArray(n)?i=o(n):r.isPlainObject(n)?i=c(n):!0===n?i=o([!0,!0]):!1===n?i=o([!1,!1]):void 0===n&&(i=t.defaultButtonList),i}},function(n,t,i){"use strict";var o,s,h;Object.defineProperty(t,"__esModule",{value:!0});var r=i(1),c=i(2),f=i(0),u=f.default.MODAL,l=f.default.OVERLAY,a=i(30),e=i(31),v=i(32),y=i(33);t.injectElIntoModal=function(n){var i=r.getNode(u),t=r.stringToNode(n);return i.appendChild(t),t};o=function(n){n.className=u;n.textContent=""};s=function(n,t){o(n);var i=t.className;i&&n.classList.add(i)};t.initModalContent=function(n){var t=r.getNode(u);s(t,n);a.default(n.icon);e.initTitle(n.title);e.initText(n.text);y.default(n.content);v.default(n.buttons,n.dangerMode)};h=function(){var n=r.getNode(l),t=r.stringToNode(c.modalMarkup);n.appendChild(t)};t.default=h},function(n,t,i){"use strict";var u;Object.defineProperty(t,"__esModule",{value:!0});var e=i(3),f={isOpen:!1,promise:null,actions:{},timer:null},r=Object.assign({},f);t.resetState=function(){r=Object.assign({},f)};t.setActionValue=function(n){if("string"==typeof n)return u(e.CONFIRM_KEY,n);for(var t in n)u(t,n[t])};u=function(n,t){r.actions[n]||(r.actions[n]={});Object.assign(r.actions[n],{value:t})};t.setActionOptionsFor=function(n,t){var i=(void 0===t?{}:t).closeModal,u=void 0===i||i;Object.assign(r.actions[n],{closeModal:u})};t.default=r},function(n,t,i){"use strict";var c;Object.defineProperty(t,"__esModule",{value:!0});var f=i(1),l=i(3),u=i(0),e=u.default.OVERLAY,o=u.default.SHOW_MODAL,s=u.default.BUTTON,h=u.default.BUTTON_LOADING,r=i(5);t.openModal=function(){f.getNode(e).classList.add(o);r.default.isOpen=!0};c=function(){f.getNode(e).classList.remove(o);r.default.isOpen=!1};t.onAction=function(n){var t,i,u;void 0===n&&(n=l.CANCEL_KEY);t=r.default.actions[n];i=t.value;!1===t.closeModal?(u=s+"--"+n,f.getNode(u).classList.add(h)):c();r.default.promise.resolve(i)};t.getState=function(){var n=Object.assign({},r.default);return delete n.promise,delete n.timer,n};t.stopLoading=function(){for(var t=document.querySelectorAll("."+s),n=0;n<t.length;n++)t[n].classList.remove(h)}},function(n){var t=function(){return this}();try{t=t||Function("return this")()||eval("this")}catch(n){"object"==typeof window&&(t=window)}n.exports=t},function(n,t,i){(function(t){n.exports=t.sweetAlert=i(9)}).call(t,i(7))},function(n,t,i){(function(t){n.exports=t.swal=i(10)}).call(t,i(7))},function(n,t,i){"undefined"!=typeof window&&i(11);i(16);var r=i(23).default;n.exports=r},function(n,t,i){var r=i(12),u;"string"==typeof r&&(r=[[n.i,r,""]]);u={insertAt:"top"};u.transform=void 0;i(14)(r,u);r.locals&&(n.exports=r.locals)},function(n,t,i){t=n.exports=i(13)(void 0);t.push([n.i,'.swal-icon--error{border-color:#f27474;-webkit-animation:animateErrorIcon .5s;animation:animateErrorIcon .5s}.swal-icon--error__x-mark{position:relative;display:block;-webkit-animation:animateXMark .5s;animation:animateXMark .5s}.swal-icon--error__line{position:absolute;height:5px;width:47px;background-color:#f27474;display:block;top:37px;border-radius:2px}.swal-icon--error__line--left{-webkit-transform:rotate(45deg);transform:rotate(45deg);left:17px}.swal-icon--error__line--right{-webkit-transform:rotate(-45deg);transform:rotate(-45deg);right:16px}@-webkit-keyframes animateErrorIcon{0%{-webkit-transform:rotateX(100deg);transform:rotateX(100deg);opacity:0}to{-webkit-transform:rotateX(0deg);transform:rotateX(0deg);opacity:1}}@keyframes animateErrorIcon{0%{-webkit-transform:rotateX(100deg);transform:rotateX(100deg);opacity:0}to{-webkit-transform:rotateX(0deg);transform:rotateX(0deg);opacity:1}}@-webkit-keyframes animateXMark{0%{-webkit-transform:scale(.4);transform:scale(.4);margin-top:26px;opacity:0}50%{-webkit-transform:scale(.4);transform:scale(.4);margin-top:26px;opacity:0}80%{-webkit-transform:scale(1.15);transform:scale(1.15);margin-top:-6px}to{-webkit-transform:scale(1);transform:scale(1);margin-top:0;opacity:1}}@keyframes animateXMark{0%{-webkit-transform:scale(.4);transform:scale(.4);margin-top:26px;opacity:0}50%{-webkit-transform:scale(.4);transform:scale(.4);margin-top:26px;opacity:0}80%{-webkit-transform:scale(1.15);transform:scale(1.15);margin-top:-6px}to{-webkit-transform:scale(1);transform:scale(1);margin-top:0;opacity:1}}.swal-icon--warning{border-color:#f8bb86;-webkit-animation:pulseWarning .75s infinite alternate;animation:pulseWarning .75s infinite alternate}.swal-icon--warning__body{width:5px;height:47px;top:10px;border-radius:2px;margin-left:-2px}.swal-icon--warning__body,.swal-icon--warning__dot{position:absolute;left:50%;background-color:#f8bb86}.swal-icon--warning__dot{width:7px;height:7px;border-radius:50%;margin-left:-4px;bottom:-11px}@-webkit-keyframes pulseWarning{0%{border-color:#f8d486}to{border-color:#f8bb86}}@keyframes pulseWarning{0%{border-color:#f8d486}to{border-color:#f8bb86}}.swal-icon--success{border-color:#a5dc86}.swal-icon--success:after,.swal-icon--success:before{content:"";border-radius:50%;position:absolute;width:60px;height:120px;background:#fff;-webkit-transform:rotate(45deg);transform:rotate(45deg)}.swal-icon--success:before{border-radius:120px 0 0 120px;top:-7px;left:-33px;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);-webkit-transform-origin:60px 60px;transform-origin:60px 60px}.swal-icon--success:after{border-radius:0 120px 120px 0;top:-11px;left:30px;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);-webkit-transform-origin:0 60px;transform-origin:0 60px;-webkit-animation:rotatePlaceholder 4.25s ease-in;animation:rotatePlaceholder 4.25s ease-in}.swal-icon--success__ring{width:80px;height:80px;border:4px solid hsla(98,55%,69%,.2);border-radius:50%;box-sizing:content-box;position:absolute;left:-4px;top:-4px;z-index:2}.swal-icon--success__hide-corners{width:5px;height:90px;background-color:#fff;padding:1px;position:absolute;left:28px;top:8px;z-index:1;-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}.swal-icon--success__line{height:5px;background-color:#a5dc86;display:block;border-radius:2px;position:absolute;z-index:2}.swal-icon--success__line--tip{width:25px;left:14px;top:46px;-webkit-transform:rotate(45deg);transform:rotate(45deg);-webkit-animation:animateSuccessTip .75s;animation:animateSuccessTip .75s}.swal-icon--success__line--long{width:47px;right:8px;top:38px;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);-webkit-animation:animateSuccessLong .75s;animation:animateSuccessLong .75s}@-webkit-keyframes rotatePlaceholder{0%{-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}5%{-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}12%{-webkit-transform:rotate(-405deg);transform:rotate(-405deg)}to{-webkit-transform:rotate(-405deg);transform:rotate(-405deg)}}@keyframes rotatePlaceholder{0%{-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}5%{-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}12%{-webkit-transform:rotate(-405deg);transform:rotate(-405deg)}to{-webkit-transform:rotate(-405deg);transform:rotate(-405deg)}}@-webkit-keyframes animateSuccessTip{0%{width:0;left:1px;top:19px}54%{width:0;left:1px;top:19px}70%{width:50px;left:-8px;top:37px}84%{width:17px;left:21px;top:48px}to{width:25px;left:14px;top:45px}}@keyframes animateSuccessTip{0%{width:0;left:1px;top:19px}54%{width:0;left:1px;top:19px}70%{width:50px;left:-8px;top:37px}84%{width:17px;left:21px;top:48px}to{width:25px;left:14px;top:45px}}@-webkit-keyframes animateSuccessLong{0%{width:0;right:46px;top:54px}65%{width:0;right:46px;top:54px}84%{width:55px;right:0;top:35px}to{width:47px;right:8px;top:38px}}@keyframes animateSuccessLong{0%{width:0;right:46px;top:54px}65%{width:0;right:46px;top:54px}84%{width:55px;right:0;top:35px}to{width:47px;right:8px;top:38px}}.swal-icon--info{border-color:#c9dae1}.swal-icon--info:before{width:5px;height:29px;bottom:17px;border-radius:2px;margin-left:-2px}.swal-icon--info:after,.swal-icon--info:before{content:"";position:absolute;left:50%;background-color:#c9dae1}.swal-icon--info:after{width:7px;height:7px;border-radius:50%;margin-left:-3px;top:19px}.swal-icon{width:80px;height:80px;border-width:4px;border-style:solid;border-radius:50%;padding:0;position:relative;box-sizing:content-box;margin:20px auto}.swal-icon:first-child{margin-top:32px}.swal-icon--custom{width:auto;height:auto;max-width:100%;border:none;border-radius:0}.swal-icon img{max-width:100%;max-height:100%}.swal-title{color:rgba(0,0,0,.65);font-weight:600;text-transform:none;position:relative;display:block;padding:13px 16px;font-size:27px;line-height:normal;text-align:center;margin-bottom:0}.swal-title:first-child{margin-top:26px}.swal-title:not(:first-child){padding-bottom:0}.swal-title:not(:last-child){margin-bottom:13px}.swal-text{font-size:16px;position:relative;float:none;line-height:normal;vertical-align:top;text-align:left;display:inline-block;margin:0;padding:0 10px;font-weight:400;color:rgba(0,0,0,.64);max-width:calc(100% - 20px);overflow-wrap:break-word;box-sizing:border-box}.swal-text:first-child{margin-top:45px}.swal-text:last-child{margin-bottom:45px}.swal-footer{text-align:right;padding-top:13px;margin-top:13px;padding:13px 16px;border-radius:inherit;border-top-left-radius:0;border-top-right-radius:0}.swal-button-container{margin:5px;display:inline-block;position:relative}.swal-button{background-color:#7cd1f9;color:#fff;border:none;box-shadow:none;border-radius:5px;font-weight:600;font-size:14px;padding:10px 24px;margin:0;cursor:pointer}.swal-button:not([disabled]):hover{background-color:#78cbf2}.swal-button:active{background-color:#70bce0}.swal-button:focus{outline:none;box-shadow:0 0 0 1px #fff,0 0 0 3px rgba(43,114,165,.29)}.swal-button[disabled]{opacity:.5;cursor:default}.swal-button::-moz-focus-inner{border:0}.swal-button--cancel{color:#555;background-color:#efefef}.swal-button--cancel:not([disabled]):hover{background-color:#e8e8e8}.swal-button--cancel:active{background-color:#d7d7d7}.swal-button--cancel:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px rgba(116,136,150,.29)}.swal-button--danger{background-color:#e64942}.swal-button--danger:not([disabled]):hover{background-color:#df4740}.swal-button--danger:active{background-color:#cf423b}.swal-button--danger:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px rgba(165,43,43,.29)}.swal-content{padding:0 20px;margin-top:20px;font-size:medium}.swal-content:last-child{margin-bottom:20px}.swal-content__input,.swal-content__textarea{-webkit-appearance:none;background-color:#fff;border:none;font-size:14px;display:block;box-sizing:border-box;width:100%;border:1px solid rgba(0,0,0,.14);padding:10px 13px;border-radius:2px;transition:border-color .2s}.swal-content__input:focus,.swal-content__textarea:focus{outline:none;border-color:#6db8ff}.swal-content__textarea{resize:vertical}.swal-button--loading{color:transparent}.swal-button--loading~.swal-button__loader{opacity:1}.swal-button__loader{position:absolute;height:auto;width:43px;z-index:2;left:50%;top:50%;-webkit-transform:translateX(-50%) translateY(-50%);transform:translateX(-50%) translateY(-50%);text-align:center;pointer-events:none;opacity:0}.swal-button__loader div{display:inline-block;float:none;vertical-align:baseline;width:9px;height:9px;padding:0;border:none;margin:2px;opacity:.4;border-radius:7px;background-color:hsla(0,0%,100%,.9);transition:background .2s;-webkit-animation:swal-loading-anim 1s infinite;animation:swal-loading-anim 1s infinite}.swal-button__loader div:nth-child(3n+2){-webkit-animation-delay:.15s;animation-delay:.15s}.swal-button__loader div:nth-child(3n+3){-webkit-animation-delay:.3s;animation-delay:.3s}@-webkit-keyframes swal-loading-anim{0%{opacity:.4}20%{opacity:.4}50%{opacity:1}to{opacity:.4}}@keyframes swal-loading-anim{0%{opacity:.4}20%{opacity:.4}50%{opacity:1}to{opacity:.4}}.swal-overlay{position:fixed;top:0;bottom:0;left:0;right:0;text-align:center;font-size:0;overflow-y:auto;background-color:rgba(0,0,0,.4);z-index:10000;pointer-events:none;opacity:0;transition:opacity .3s}.swal-overlay:before{content:" ";display:inline-block;vertical-align:middle;height:100%}.swal-overlay--show-modal{opacity:1;pointer-events:auto}.swal-overlay--show-modal .swal-modal{opacity:1;pointer-events:auto;box-sizing:border-box;-webkit-animation:showSweetAlert .3s;animation:showSweetAlert .3s;will-change:transform}.swal-modal{width:478px;opacity:0;pointer-events:none;background-color:#fff;text-align:center;border-radius:5px;position:static;margin:20px auto;display:inline-block;vertical-align:middle;-webkit-transform:scale(1);transform:scale(1);-webkit-transform-origin:50% 50%;transform-origin:50% 50%;z-index:10001;transition:opacity .2s,-webkit-transform .3s;transition:transform .3s,opacity .2s;transition:transform .3s,opacity .2s,-webkit-transform .3s}@media (max-width:500px){.swal-modal{width:calc(100% - 20px)}}@-webkit-keyframes showSweetAlert{0%{-webkit-transform:scale(1);transform:scale(1)}1%{-webkit-transform:scale(.5);transform:scale(.5)}45%{-webkit-transform:scale(1.05);transform:scale(1.05)}80%{-webkit-transform:scale(.95);transform:scale(.95)}to{-webkit-transform:scale(1);transform:scale(1)}}@keyframes showSweetAlert{0%{-webkit-transform:scale(1);transform:scale(1)}1%{-webkit-transform:scale(.5);transform:scale(.5)}45%{-webkit-transform:scale(1.05);transform:scale(1.05)}80%{-webkit-transform:scale(.95);transform:scale(.95)}to{-webkit-transform:scale(1);transform:scale(1)}}',""])},function(n){function t(n,t){var u=n[1]||"",r=n[3],f;return r?t&&"function"==typeof btoa?(f=i(r),[u].concat(r.sources.map(function(n){return"/*# sourceURL="+r.sourceRoot+n+" */"})).concat([f]).join("\n")):[u].join("\n"):u}function i(n){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */"}n.exports=function(n){var i=[];return i.toString=function(){return this.map(function(i){var r=t(i,n);return i[2]?"@media "+i[2]+"{"+r+"}":r}).join("")},i.i=function(n,t){var f,r,e,u;for("string"==typeof n&&(n=[[null,n,""]]),f={},r=0;r<this.length;r++)e=this[r][0],"number"==typeof e&&(f[e]=!0);for(r=0;r<n.length;r++)u=n[r],"number"==typeof u[0]&&f[u[0]]||(t&&!u[2]?u[2]=t:t&&(u[2]="("+u[2]+") and ("+t+")"),i.push(u))},i}},function(n,t,i){function f(n,t){for(var r,f,o,i,e=0;e<n.length;e++)if(r=n[e],f=u[r.id],f){for(f.refs++,i=0;i<f.parts.length;i++)f.parts[i](r.parts[i]);for(;i<r.parts.length;i++)f.parts.push(l(r.parts[i],t))}else{for(o=[],i=0;i<r.parts.length;i++)o.push(l(r.parts[i],t));u[r.id]={id:r.id,refs:1,parts:o}}}function e(n,t){for(var e=[],u={},f=0;f<n.length;f++){var i=n[f],r=t.base?i[0]+t.base:i[0],s=i[1],h=i[2],c=i[3],o={css:s,media:h,sourceMap:c};u[r]?u[r].parts.push(o):e.push(u[r]={id:r,parts:[o]})}return e}function o(n,t){var i=d(n.insertInto),u;if(!i)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");if(u=r[r.length-1],"top"===n.insertAt)u?u.nextSibling?i.insertBefore(t,u.nextSibling):i.appendChild(t):i.insertBefore(t,i.firstChild),r.push(t);else{if("bottom"!==n.insertAt)throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");i.appendChild(t)}}function s(n){if(null===n.parentNode)return!1;n.parentNode.removeChild(n);var t=r.indexOf(n);t>=0&&r.splice(t,1)}function h(n){var t=document.createElement("style");return n.attrs.type="text/css",c(t,n.attrs),o(n,t),t}function p(n){var t=document.createElement("link");return n.attrs.type="text/css",n.attrs.rel="stylesheet",c(t,n.attrs),o(n,t),t}function c(n,t){Object.keys(t).forEach(function(i){n.setAttribute(i,t[i])})}function l(n,t){var i,r,u,e,f;if(t.transform&&n.css){if(!(e=t.transform(n.css)))return function(){};n.css=e}return t.singleton?(f=g++,i=v||(v=h(t)),r=a.bind(null,i,f,!1),u=a.bind(null,i,f,!0)):n.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(i=p(t),r=b.bind(null,i,t),u=function(){s(i);i.href&&URL.revokeObjectURL(i.href)}):(i=h(t),r=w.bind(null,i),u=function(){s(i)}),r(n),function(t){if(t){if(t.css===n.css&&t.media===n.media&&t.sourceMap===n.sourceMap)return;r(n=t)}else u()}}function a(n,t,i,r){var e=i?"":r.css,f,u;n.styleSheet?n.styleSheet.cssText=y(t,e):(f=document.createTextNode(e),u=n.childNodes,u[t]&&n.removeChild(u[t]),u.length?n.insertBefore(f,u[t]):n.appendChild(f))}function w(n,t){var i=t.css,r=t.media;if(r&&n.setAttribute("media",r),n.styleSheet)n.styleSheet.cssText=i;else{for(;n.firstChild;)n.removeChild(n.firstChild);n.appendChild(document.createTextNode(i))}}function b(n,t,i){var r=i.css,u=i.sourceMap,o=void 0===t.convertToAbsoluteUrls&&u,e,f;(t.convertToAbsoluteUrls||o)&&(r=nt(r));u&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(u))))+" */");e=new Blob([r],{type:"text/css"});f=n.href;n.href=URL.createObjectURL(e);f&&URL.revokeObjectURL(f)}var u={},k=function(n){var t;return function(){return void 0===t&&(t=n.apply(this,arguments)),t}}(function(){return window&&document&&document.all&&!window.atob}),d=function(n){var t={};return function(i){return void 0===t[i]&&(t[i]=n.call(this,i)),t[i]}}(function(n){return document.querySelector(n)}),v=null,g=0,r=[],nt=i(15),y;n.exports=function(n,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");t=t||{};t.attrs="object"==typeof t.attrs?t.attrs:{};t.singleton||(t.singleton=k());t.insertInto||(t.insertInto="head");t.insertAt||(t.insertAt="bottom");var i=e(n,t);return f(i,t),function(n){for(var c,o,h,s=[],r=0;r<i.length;r++)c=i[r],o=u[c.id],o.refs--,s.push(o);for(n&&f(e(n,t),t),r=0;r<s.length;r++)if(o=s[r],0===o.refs){for(h=0;h<o.parts.length;h++)o.parts[h]();delete u[o.id]}}};y=function(){var n=[];return function(t,i){return n[t]=i,n.filter(Boolean).join("\n")}}()},function(n){n.exports=function(n){var t="undefined"!=typeof window&&window.location,i,r;if(!t)throw new Error("fixUrls requires window.location");return!n||"string"!=typeof n?n:(i=t.protocol+"//"+t.host,r=i+t.pathname.replace(/\/[^\/]*$/,"/"),n.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(n,t){var u=t.trim().replace(/^"(.*)"$/,function(n,t){return t}).replace(/^'(.*)'$/,function(n,t){return t}),f;return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/)/i.test(u)?n:(f=0===u.indexOf("//")?u:0===u.indexOf("/")?i+u:r+u.replace(/^\.\//,""),"url("+JSON.stringify(f)+")")}))}},function(n,t,i){var r=i(17);"undefined"==typeof window||window.Promise||(window.Promise=r);i(21);String.prototype.includes||(String.prototype.includes=function(n,t){"use strict";return"number"!=typeof t&&(t=0),!(t+n.length>this.length)&&-1!==this.indexOf(n,t)});Array.prototype.includes||Object.defineProperty(Array.prototype,"includes",{value:function(n,t){var f,i,r,u;if(null==this)throw new TypeError('"this" is null or not defined');if(f=Object(this),i=f.length>>>0,0===i)return!1;for(r=0|t,u=Math.max(r>=0?r:i-Math.abs(r),0);u<i;){if(function(n,t){return n===t||"number"==typeof n&&"number"==typeof t&&isNaN(n)&&isNaN(t)}(f[u],n))return!0;u++}return!1}});"undefined"!=typeof window&&function(n){n.forEach(function(n){n.hasOwnProperty("remove")||Object.defineProperty(n,"remove",{configurable:!0,enumerable:!0,writable:!0,value:function(){this.parentNode.removeChild(this)}})})}([Element.prototype,CharacterData.prototype,DocumentType.prototype])},function(n,t,i){(function(t){!function(i){function h(){}function c(n,t){return function(){n.apply(t,arguments)}}function r(n){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof n)throw new TypeError("not a function");this._state=0;this._handled=!1;this._value=void 0;this._deferreds=[];s(n,this)}function o(n,t){for(;3===n._state;)n=n._value;if(0===n._state)return void n._deferreds.push(t);n._handled=!0;r._immediateFn(function(){var i=1===n._state?t.onFulfilled:t.onRejected,r;if(null===i)return void(1===n._state?f:u)(t.promise,n._value);try{r=i(n._value)}catch(n){return void u(t.promise,n)}f(t.promise,r)})}function f(n,t){try{if(t===n)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"==typeof t||"function"==typeof t)){var i=t.then;if(t instanceof r)return n._state=3,n._value=t,void e(n);if("function"==typeof i)return void s(c(i,t),n)}n._state=1;n._value=t;e(n)}catch(t){u(n,t)}}function u(n,t){n._state=2;n._value=t;e(n)}function e(n){2===n._state&&0===n._deferreds.length&&r._immediateFn(function(){n._handled||r._unhandledRejectionFn(n._value)});for(var t=0,i=n._deferreds.length;t<i;t++)o(n,n._deferreds[t]);n._deferreds=null}function l(n,t,i){this.onFulfilled="function"==typeof n?n:null;this.onRejected="function"==typeof t?t:null;this.promise=i}function s(n,t){var i=!1;try{n(function(n){i||(i=!0,f(t,n))},function(n){i||(i=!0,u(t,n))})}catch(n){if(i)return;i=!0;u(t,n)}}var a=setTimeout;r.prototype.catch=function(n){return this.then(null,n)};r.prototype.then=function(n,t){var i=new this.constructor(h);return o(this,new l(n,t,i)),i};r.all=function(n){var t=Array.prototype.slice.call(n);return new r(function(n,i){function u(r,e){try{if(e&&("object"==typeof e||"function"==typeof e)){var o=e.then;if("function"==typeof o)return void o.call(e,function(n){u(r,n)},i)}t[r]=e;0==--f&&n(t)}catch(n){i(n)}}if(0===t.length)return n([]);for(var f=t.length,r=0;r<t.length;r++)u(r,t[r])})};r.resolve=function(n){return n&&"object"==typeof n&&n.constructor===r?n:new r(function(t){t(n)})};r.reject=function(n){return new r(function(t,i){i(n)})};r.race=function(n){return new r(function(t,i){for(var r=0,u=n.length;r<u;r++)n[r].then(t,i)})};r._immediateFn="function"==typeof t&&function(n){t(n)}||function(n){a(n,0)};r._unhandledRejectionFn=function(n){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",n)};r._setImmediateFn=function(n){r._immediateFn=n};r._setUnhandledRejectionFn=function(n){r._unhandledRejectionFn=n};void 0!==n&&n.exports?n.exports=r:i.Promise||(i.Promise=r)}(this)}).call(t,i(18).setImmediate)},function(n,t,i){function r(n,t){this._id=n;this._clearFn=t}var u=Function.prototype.apply;t.setTimeout=function(){return new r(u.call(setTimeout,window,arguments),clearTimeout)};t.setInterval=function(){return new r(u.call(setInterval,window,arguments),clearInterval)};t.clearTimeout=t.clearInterval=function(n){n&&n.close()};r.prototype.unref=r.prototype.ref=function(){};r.prototype.close=function(){this._clearFn.call(window,this._id)};t.enroll=function(n,t){clearTimeout(n._idleTimeoutId);n._idleTimeout=t};t.unenroll=function(n){clearTimeout(n._idleTimeoutId);n._idleTimeout=-1};t._unrefActive=t.active=function(n){clearTimeout(n._idleTimeoutId);var t=n._idleTimeout;t>=0&&(n._idleTimeoutId=setTimeout(function(){n._onTimeout&&n._onTimeout()},t))};i(19);t.setImmediate=setImmediate;t.clearImmediate=clearImmediate},function(n,t,i){(function(n,t){!function(n,i){"use strict";function l(n){var i,t,r;for("function"!=typeof n&&(n=new Function(""+n)),i=new Array(arguments.length-1),t=0;t<i.length;t++)i[t]=arguments[t+1];return r={callback:n,args:i},s[o]=r,u(o),o++}function c(n){delete s[n]}function a(n){var r=n.callback,t=n.args;switch(t.length){case 0:r();break;case 1:r(t[0]);break;case 2:r(t[0],t[1]);break;case 3:r(t[0],t[1],t[2]);break;default:r.apply(i,t)}}function r(n){if(h)setTimeout(r,0,n);else{var t=s[n];if(t){h=!0;try{a(t)}finally{c(n);h=!1}}}}if(!n.setImmediate){var u,o=1,s={},h=!1,e=n.document,f=Object.getPrototypeOf&&Object.getPrototypeOf(n);f=f&&f.setTimeout?f:n;"[object process]"==={}.toString.call(n.process)?function(){u=function(n){t.nextTick(function(){r(n)})}}():function(){if(n.postMessage&&!n.importScripts){var t=!0,i=n.onmessage;return n.onmessage=function(){t=!1},n.postMessage("","*"),n.onmessage=i,t}}()?function(){var t="setImmediate$"+Math.random()+"$",i=function(i){i.source===n&&"string"==typeof i.data&&0===i.data.indexOf(t)&&r(+i.data.slice(t.length))};n.addEventListener?n.addEventListener("message",i,!1):n.attachEvent("onmessage",i);u=function(i){n.postMessage(t+i,"*")}}():n.MessageChannel?function(){var n=new MessageChannel;n.port1.onmessage=function(n){r(n.data)};u=function(t){n.port2.postMessage(t)}}():e&&"onreadystatechange"in e.createElement("script")?function(){var n=e.documentElement;u=function(t){var i=e.createElement("script");i.onreadystatechange=function(){r(t);i.onreadystatechange=null;n.removeChild(i);i=null};n.appendChild(i)}}():function(){u=function(n){setTimeout(r,0,n)}}();f.setImmediate=l;f.clearImmediate=c}}("undefined"==typeof self?void 0===n?this:n:self)}).call(t,i(7),i(20))},function(n){function h(){throw new Error("setTimeout has not been defined");}function c(){throw new Error("clearTimeout has not been defined");}function l(n){if(r===setTimeout)return setTimeout(n,0);if((r===h||!r)&&setTimeout)return r=setTimeout,setTimeout(n,0);try{return r(n,0)}catch(t){try{return r.call(null,n,0)}catch(t){return r.call(this,n,0)}}}function y(n){if(u===clearTimeout)return clearTimeout(n);if((u===c||!u)&&clearTimeout)return u=clearTimeout,clearTimeout(n);try{return u(n)}catch(t){try{return u.call(null,n)}catch(t){return u.call(this,n)}}}function p(){o&&e&&(o=!1,e.length?f=e.concat(f):s=-1,f.length&&a())}function a(){var t,n;if(!o){for(t=l(p),o=!0,n=f.length;n;){for(e=f,f=[];++s<n;)e&&e[s].run();s=-1;n=f.length}e=null;o=!1;y(t)}}function v(n,t){this.fun=n;this.array=t}function i(){}var r,u,t=n.exports={};!function(){try{r="function"==typeof setTimeout?setTimeout:h}catch(n){r=h}try{u="function"==typeof clearTimeout?clearTimeout:c}catch(n){u=c}}();var e,f=[],o=!1,s=-1;t.nextTick=function(n){var i=new Array(arguments.length-1),t;if(arguments.length>1)for(t=1;t<arguments.length;t++)i[t-1]=arguments[t];f.push(new v(n,i));1!==f.length||o||l(a)};v.prototype.run=function(){this.fun.apply(null,this.array)};t.title="browser";t.browser=!0;t.env={};t.argv=[];t.version="";t.versions={};t.on=i;t.addListener=i;t.once=i;t.off=i;t.removeListener=i;t.removeAllListeners=i;t.emit=i;t.prependListener=i;t.prependOnceListener=i;t.listeners=function(){return[]};t.binding=function(){throw new Error("process.binding is not supported");};t.cwd=function(){return"/"};t.chdir=function(){throw new Error("process.chdir is not supported");};t.umask=function(){return 0}},function(n,t,i){"use strict";i(22).polyfill()},function(n){"use strict";function t(n){var u,i,t,r,e;if(void 0===n||null===n)throw new TypeError("Cannot convert first argument to object");for(u=Object(n),i=1;i<arguments.length;i++)if(t=arguments[i],void 0!==t&&null!==t)for(var o=Object.keys(Object(t)),f=0,s=o.length;f<s;f++)r=o[f],e=Object.getOwnPropertyDescriptor(t,r),void 0!==e&&e.enumerable&&(u[r]=t[r]);return u}function i(){Object.assign||Object.defineProperty(Object,"assign",{enumerable:!1,configurable:!0,writable:!0,value:t})}n.exports={assign:t,polyfill:i}},function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=i(24),u=i(6),f=i(5),e=i(36),r=function(){for(var i,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if("undefined"!=typeof window)return i=e.getOpts.apply(void 0,t),new Promise(function(n,t){f.default.promise={resolve:n,reject:t};o.default(i);setTimeout(function(){u.openModal()})})};r.close=u.onAction;r.getState=u.getState;r.setActionValue=f.setActionValue;r.stopLoading=u.stopLoading;r.setDefaults=e.setDefaults;t.default=r},function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var u=i(1),f=i(0),e=f.default.MODAL,r=i(4),o=i(34),s=i(35),h=i(1);t.init=function(n){u.getNode(e)||(document.body||h.throwErr("You can only use SweetAlert AFTER the DOM has loaded!"),o.default(),r.default());r.initModalContent(n);s.default(n)};t.default=t.init},function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(0),u=r.default.MODAL;t.modalMarkup='\n  <div class="'+u+'" role="dialog" aria-modal="true"><\/div>';t.default=t.modalMarkup},function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(0),u=r.default.OVERLAY,f='<div \n    class="'+u+'"\n    tabIndex="-1">\n  <\/div>';t.default=f},function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var u=i(0),r=u.default.ICON;t.errorIconMarkup=function(){var t=r+"--error",n=t+"__line";return'\n    <div class="'+t+'__x-mark">\n      <span class="'+n+" "+n+'--left"><\/span>\n      <span class="'+n+" "+n+'--right"><\/span>\n    <\/div>\n  '};t.warningIconMarkup=function(){var n=r+"--warning";return'\n    <span class="'+n+'__body">\n      <span class="'+n+'__dot"><\/span>\n    <\/span>\n  '};t.successIconMarkup=function(){var n=r+"--success";return'\n    <span class="'+n+"__line "+n+'__line--long"><\/span>\n    <span class="'+n+"__line "+n+'__line--tip"><\/span>\n\n    <div class="'+n+'__ring"><\/div>\n    <div class="'+n+'__hide-corners"><\/div>\n  '}},function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(0),u=r.default.CONTENT;t.contentMarkup='\n  <div class="'+u+'">\n\n  <\/div>\n'},function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(0),u=r.default.BUTTON_CONTAINER,f=r.default.BUTTON,e=r.default.BUTTON_LOADER;t.buttonMarkup='\n  <div class="'+u+'">\n\n    <button\n      class="'+f+'"\n    ><\/button>\n\n    <div class="'+e+'">\n      <div><\/div>\n      <div><\/div>\n      <div><\/div>\n    <\/div>\n\n  <\/div>\n'},function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var f=i(4),r=i(2),u=i(0),e=u.default.ICON,o=u.default.ICON_CUSTOM,s=["error","warning","success","info"],h={error:r.errorIconMarkup(),warning:r.warningIconMarkup(),success:r.successIconMarkup()},c=function(n,t){var r=e+"--"+n,i;t.classList.add(r);i=h[n];i&&(t.innerHTML=i)},l=function(n,t){t.classList.add(o);var i=document.createElement("img");i.src=n;t.appendChild(i)},a=function(n){if(n){var t=f.injectElIntoModal(r.iconMarkup);s.includes(n)?c(n,t):l(n,t)}};t.default=a},function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(2),u=i(4),f=function(n){navigator.userAgent.includes("AppleWebKit")&&(n.style.display="none",n.offsetHeight,n.style.display="")};t.initTitle=function(n){if(n){var t=u.injectElIntoModal(r.titleMarkup);t.textContent=n;f(t)}};t.initText=function(n){var t,i;n&&(t=document.createDocumentFragment(),n.split("\n").forEach(function(n,i,r){t.appendChild(document.createTextNode(n));i<r.length-1&&t.appendChild(document.createElement("br"))}),i=u.injectElIntoModal(r.textMarkup),i.appendChild(t),f(i))}},function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=i(1),s=i(4),r=i(0),u=r.default.BUTTON,h=r.default.DANGER_BUTTON,c=i(3),f=i(2),l=i(6),e=i(5),a=function(n,t,i){var y=t.text,p=t.value,s=t.className,w=t.closeModal,v=o.stringToNode(f.buttonMarkup),r=v.querySelector("."+u),b=u+"--"+n,a;return(r.classList.add(b),s)&&(Array.isArray(s)?s:s.split(" ")).filter(function(n){return n.length>0}).forEach(function(n){r.classList.add(n)}),i&&n===c.CONFIRM_KEY&&r.classList.add(h),r.textContent=y,a={},a[n]=p,e.setActionValue(a),e.setActionOptionsFor(n,{closeModal:w}),r.addEventListener("click",function(){return l.onAction(n)}),v},v=function(n,t){var i=s.injectElIntoModal(f.footerMarkup),r,u,e;for(r in n)u=n[r],e=a(r,u,t),u.visible&&i.appendChild(e);0===i.children.length&&i.remove()};t.default=v},function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var u=i(3),f=i(4),e=i(2),r=i(5),o=i(6),s=i(0),h=s.default.CONTENT,c=function(n){n.addEventListener("input",function(n){var t=n.target,i=t.value;r.setActionValue(i)});n.addEventListener("keyup",function(n){if("Enter"===n.key)return o.onAction(u.CONFIRM_KEY)});setTimeout(function(){n.focus();r.setActionValue("")},0)},l=function(n,t,i){var r=document.createElement(t),e=h+"__"+t,u,f;r.classList.add(e);for(u in i)f=i[u],r[u]=f;"input"===t&&c(r);n.appendChild(r)},a=function(n){if(n){var i=f.injectElIntoModal(e.contentMarkup),t=n.element,r=n.attributes;"string"==typeof t?l(i,t,r):i.appendChild(t)}};t.default=a},function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(1),u=i(2),f=function(){var n=r.stringToNode(u.overlayMarkup);document.body.appendChild(n)};t.default=f},function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(5),f=i(6),u=i(1),e=i(3),o=i(0),h=o.default.MODAL,s=o.default.BUTTON,c=o.default.OVERLAY,p=function(n){n.preventDefault();a()},w=function(n){n.preventDefault();v()},l=function(n){if(r.default.isOpen)switch(n.key){case"Escape":return f.onAction(e.CANCEL_KEY)}},b=function(n){if(r.default.isOpen)switch(n.key){case"Tab":return p(n)}},k=function(n){if(r.default.isOpen)return"Tab"===n.key&&n.shiftKey?w(n):void 0},a=function(){var n=u.getNode(s);n&&(n.tabIndex=0,n.focus())},v=function(){var i=u.getNode(h),n=i.querySelectorAll("."+s),r=n.length-1,t=n[r];t&&t.focus()},d=function(n){n[n.length-1].addEventListener("keydown",b)},g=function(n){n[0].addEventListener("keydown",k)},nt=function(){var t=u.getNode(h),n=t.querySelectorAll("."+s);n.length&&(d(n),g(n))},y=function(n){if(u.getNode(c)===n.target)return f.onAction(e.CANCEL_KEY)},tt=function(n){var t=u.getNode(c);t.removeEventListener("click",y);n&&t.addEventListener("click",y)},it=function(n){r.default.timer&&clearTimeout(r.default.timer);n&&(r.default.timer=window.setTimeout(function(){return f.onAction(e.CANCEL_KEY)},n))},rt=function(n){n.closeOnEsc?document.addEventListener("keyup",l):document.removeEventListener("keyup",l);n.dangerMode?a():v();nt();tt(n.closeOnClickOutside);it(n.timer)};t.default=rt},function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(1),e=i(3),l=i(37),o=i(38),u={title:null,text:null,icon:null,buttons:e.defaultButtonList,content:null,className:null,closeOnClickOutside:!0,closeOnEsc:!0,dangerMode:!1,timer:null},s=Object.assign({},u);t.setDefaults=function(n){s=Object.assign({},u,n)};var a=function(n){var t=n&&n.button,i=n&&n.buttons;return void 0!==t&&void 0!==i&&r.throwErr("Cannot set both 'button' and 'buttons' options!"),void 0!==t?{confirm:t}:i},f=function(n){return r.ordinalSuffixOf(n+1)},h=function(n,t){r.throwErr(f(t)+" argument ('"+n+"') is invalid")},c=function(n,t){var u=n+1,i=t[u];r.isPlainObject(i)||void 0===i||r.throwErr("Expected "+f(u)+" argument ('"+i+"') to be a plain object")},v=function(n,t){var i=n+1,u=t[i];void 0!==u&&r.throwErr("Unexpected "+f(i)+" argument ("+u+")")},y=function(n,t,i,u){var f=typeof t,e="string"===f,o=t instanceof Element;if(e){if(0===i)return{text:t};if(1===i)return{text:t,title:u[0]};if(2===i)return c(i,u),{icon:t};h(t,i)}else{if(o&&0===i)return c(i,u),{content:t};if(r.isPlainObject(t))return v(i,u),t;h(t,i)}};t.getOpts=function(){for(var n,f,r,i=[],t=0;t<arguments.length;t++)i[t]=arguments[t];return n={},i.forEach(function(t,r){var u=y(0,t,r,i);Object.assign(n,u)}),f=a(n),n.buttons=e.getButtonListOpts(f),delete n.button,n.content=l.getContentOpts(n.content),r=Object.assign({},u,s,n),Object.keys(r).forEach(function(n){o.DEPRECATED_OPTS[n]&&o.logDeprecation(n)}),r}},function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(1),u={element:"input",attributes:{placeholder:""}};t.getContentOpts=function(n){return r.isPlainObject(n)?Object.assign({},n):n instanceof Element?{element:n}:"input"===n?u:null}},function(n,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.logDeprecation=function(n){var i=t.DEPRECATED_OPTS[n],s=i.onlyRename,f=i.replacement,e=i.subOption,o=i.link,h=s?"renamed":"deprecated",r='SweetAlert warning: "'+n+'" option has been '+h+".",u;f&&(r+=" Please use"+(e?' "'+e+'" in ':" ")+'"'+f+'" instead.');u="https://sweetalert.js.org";r+=o?" More details: "+u+o:" More details: "+u+"/guides/#upgrading-from-1x";console.warn(r)};t.DEPRECATED_OPTS={type:{replacement:"icon",link:"/docs/#icon"},imageUrl:{replacement:"icon",link:"/docs/#icon"},customClass:{replacement:"className",onlyRename:!0,link:"/docs/#classname"},imageSize:{},showCancelButton:{replacement:"buttons",link:"/docs/#buttons"},showConfirmButton:{replacement:"button",link:"/docs/#button"},confirmButtonText:{replacement:"button",link:"/docs/#button"},confirmButtonColor:{},cancelButtonText:{replacement:"buttons",link:"/docs/#buttons"},closeOnConfirm:{replacement:"button",subOption:"closeModal",link:"/docs/#button"},closeOnCancel:{replacement:"buttons",subOption:"closeModal",link:"/docs/#buttons"},showLoaderOnConfirm:{replacement:"buttons"},animation:{},inputType:{replacement:"content",link:"/docs/#content"},inputValue:{replacement:"content",link:"/docs/#content"},inputPlaceholder:{replacement:"content",link:"/docs/#content"},html:{replacement:"content",link:"/docs/#content"},allowEscapeKey:{replacement:"closeOnEsc",onlyRename:!0,link:"/docs/#closeonesc"},allowClickOutside:{replacement:"closeOnClickOutside",onlyRename:!0,link:"/docs/#closeonclickoutside"}}}])});!function(n,t){"use strict";var i,u,f,r;t.SliderPro={modules:[],addModule:function(n,i){this.modules.push(n);t.extend(u.prototype,i)}};i=t.SliderPro.namespace="SliderPro";u=function(n,i){this.instance=n;this.$slider=t(this.instance);this.$slides=null;this.$slidesMask=null;this.$slidesContainer=null;this.slides=[];this.slidesOrder=[];this.options=i;this.settings={};this.originalSettings={};this.originalGotoSlide=null;this.selectedSlideIndex=0;this.previousSlideIndex=0;this.middleSlidePosition=0;this.supportedAnimation=null;this.vendorPrefix=null;this.transitionEvent=null;this.positionProperty=null;this.sizeProperty=null;this.isIE=null;this.slidesPosition=0;this.slidesSize=0;this.averageSlideSize=0;this.slideWidth=0;this.slideHeight=0;this.previousSlideWidth=0;this.previousSlideHeight=0;this.previousWindowWidth=0;this.previousWindowHeight=0;this.allowResize=!0;this.uniqueId=(new Date).valueOf();this.breakpoints=[];this.currentBreakpoint=-1;this.shuffledIndexes=[];this._init()};u.prototype={_init:function(){var u=this,p,h,f,o,c,s,l,a,v,e,y,w;if(this.supportedAnimation=r.getSupportedAnimation(),this.vendorPrefix=r.getVendorPrefix(),this.transitionEvent=r.getTransitionEvent(),this.isIE=r.checkIE(),this.$slider.removeClass("sp-no-js"),n.navigator.userAgent.match(/(iPad|iPhone|iPod)/g)&&this.$slider.addClass("ios"),p=/(msie) ([\w.]+)/,h=p.exec(n.navigator.userAgent.toLowerCase()),this.isIE&&this.$slider.addClass("ie"),null!==h&&this.$slider.addClass("ie"+parseInt(h[2],10)),this.$slidesContainer=t('<div class="sp-slides-container"><\/div>').appendTo(this.$slider),this.$slidesMask=t('<div class="sp-mask"><\/div>').appendTo(this.$slidesContainer),this.$slides=this.$slider.find(".sp-slides").appendTo(this.$slidesMask),this.$slider.find(".sp-slide").appendTo(this.$slides),f=t.SliderPro.modules,"undefined"!=typeof f)for(o=0;o<f.length;o++)c=f[o].substring(0,1).toLowerCase()+f[o].substring(1)+"Defaults","undefined"!=typeof this[c]&&t.extend(this.defaults,this[c]);if(this.settings=t.extend({},this.defaults,this.options),"undefined"!=typeof f)for(s=0;s<f.length;s++)"undefined"!=typeof this["init"+f[s]]&&this["init"+f[s]]();if(this.originalSettings=t.extend({},this.settings),this.originalGotoSlide=this.gotoSlide,null!==this.settings.breakpoints){for(l in this.settings.breakpoints)this.breakpoints.push({size:parseInt(l,10),properties:this.settings.breakpoints[l]});this.breakpoints=this.breakpoints.sort(function(n,t){return n.size>=t.size?1:-1})}if(this.selectedSlideIndex=this.settings.startSlide,this.settings.shuffle===!0){for(a=this.$slides.find(".sp-slide"),v=[],a.each(function(n){u.shuffledIndexes.push(n)}),e=this.shuffledIndexes.length-1;e>0;e--)y=Math.floor(Math.random()*(e+1)),w=this.shuffledIndexes[e],this.shuffledIndexes[e]=this.shuffledIndexes[y],this.shuffledIndexes[y]=w;t.each(this.shuffledIndexes,function(n,t){v.push(a[t])});this.$slides.empty().append(v)}t(n).on("resize."+this.uniqueId+"."+i,function(){var i=t(n).width(),r=t(n).height();u.allowResize===!1||u.previousWindowWidth===i&&u.previousWindowHeight===r||(u.previousWindowWidth=i,u.previousWindowHeight=r,u.allowResize=!1,setTimeout(function(){u.resize();u.allowResize=!0},200))});this.on("update."+i,function(){u.previousSlideWidth=0;u.resize()});this.update();this.$slides.find(".sp-slide").eq(this.selectedSlideIndex).addClass("sp-selected");this.trigger({type:"init"});t.isFunction(this.settings.init)&&this.settings.init.call(this,{type:"init"})},update:function(){var r=this,n,u;for("horizontal"===this.settings.orientation?(this.$slider.removeClass("sp-vertical").addClass("sp-horizontal"),this.$slider.css({height:"","max-height":""}),this.$slides.find(".sp-slide").css("top","")):"vertical"===this.settings.orientation&&(this.$slider.removeClass("sp-horizontal").addClass("sp-vertical"),this.$slides.find(".sp-slide").css("left","")),this.settings.rightToLeft===!0?this.$slider.addClass("sp-rtl"):this.$slider.removeClass("sp-rtl"),this.positionProperty="horizontal"===this.settings.orientation?"left":"top",this.sizeProperty="horizontal"===this.settings.orientation?"width":"height",this.gotoSlide=this.originalGotoSlide,n=this.slides.length-1;n>=0;n--)0===this.$slider.find('.sp-slide[data-index="'+n+'"]').length&&(u=this.slides[n],u.off("imagesLoaded."+i),u.destroy(),this.slides.splice(n,1));this.slidesOrder.length=0;this.$slider.find(".sp-slide").each(function(n){var i=t(this);"undefined"==typeof i.attr("data-init")?r._createSlide(n,i):r.slides[n].setIndex(n);r.slidesOrder.push(n)});this.middleSlidePosition=parseInt((r.slidesOrder.length-1)/2,10);this.settings.loop===!0&&this._updateSlidesOrder();this.trigger({type:"update"});t.isFunction(this.settings.update)&&this.settings.update.call(this,{type:"update"})},_createSlide:function(n,r){var u=this,e=new f(t(r),n,this.settings);this.slides.splice(n,0,e);e.on("imagesLoaded."+i,function(n){u.$slides.hasClass("sp-animated")===!1&&u._resetSlidesPosition();u._calculateSlidesSize();u.settings.autoHeight===!0&&n.index===u.selectedSlideIndex&&u._resizeHeightTo(e.getSize().height)})},_updateSlidesOrder:function(){var i,n,r=t.inArray(this.selectedSlideIndex,this.slidesOrder)-this.middleSlidePosition;if(0>r)for(i=this.slidesOrder.splice(r,Math.abs(r)),n=i.length-1;n>=0;n--)this.slidesOrder.unshift(i[n]);else if(r>0)for(i=this.slidesOrder.splice(0,r),n=0;n<=i.length-1;n++)this.slidesOrder.push(i[n])},_updateSlidesPosition:function(){var t,i,n,u=parseInt(this.$slides.find(".sp-slide").eq(this.selectedSlideIndex).css(this.positionProperty),10),r=u;if(this.settings.rightToLeft===!0&&"horizontal"===this.settings.orientation){for(n=this.middleSlidePosition;n>=0;n--)t=this.getSlideAt(this.slidesOrder[n]),i=t.$slide,i.css(this.positionProperty,r),r=parseInt(i.css(this.positionProperty),10)+t.getSize()[this.sizeProperty]+this.settings.slideDistance;for(r=u,n=this.middleSlidePosition+1;n<this.slidesOrder.length;n++)t=this.getSlideAt(this.slidesOrder[n]),i=t.$slide,i.css(this.positionProperty,r-(t.getSize()[this.sizeProperty]+this.settings.slideDistance)),r=parseInt(i.css(this.positionProperty),10)}else{for(n=this.middleSlidePosition-1;n>=0;n--)t=this.getSlideAt(this.slidesOrder[n]),i=t.$slide,i.css(this.positionProperty,r-(t.getSize()[this.sizeProperty]+this.settings.slideDistance)),r=parseInt(i.css(this.positionProperty),10);for(r=u,n=this.middleSlidePosition;n<this.slidesOrder.length;n++)t=this.getSlideAt(this.slidesOrder[n]),i=t.$slide,i.css(this.positionProperty,r),r=parseInt(i.css(this.positionProperty),10)+t.getSize()[this.sizeProperty]+this.settings.slideDistance}},_resetSlidesPosition:function(){var t,i,n,r=0,u,f;if(this.settings.rightToLeft===!0&&"horizontal"===this.settings.orientation)for(n=0;n<this.slidesOrder.length;n++)t=this.getSlideAt(this.slidesOrder[n]),i=t.$slide,i.css(this.positionProperty,r-(t.getSize()[this.sizeProperty]+this.settings.slideDistance)),r=parseInt(i.css(this.positionProperty),10);else for(n=0;n<this.slidesOrder.length;n++)t=this.getSlideAt(this.slidesOrder[n]),i=t.$slide,i.css(this.positionProperty,r),r=parseInt(i.css(this.positionProperty),10)+t.getSize()[this.sizeProperty]+this.settings.slideDistance;u=this.settings.centerSelectedSlide===!0?Math.round((parseInt(this.$slidesMask.css(this.sizeProperty),10)-this.getSlideAt(this.selectedSlideIndex).getSize()[this.sizeProperty])/2):0;f=-parseInt(this.$slides.find(".sp-slide").eq(this.selectedSlideIndex).css(this.positionProperty),10)+u;this._moveTo(f,!0)},_calculateSlidesSize:function(){var t=this.$slides.find(".sp-slide").eq(this.slidesOrder[0]),i=parseInt(t.css(this.positionProperty),10),n=this.$slides.find(".sp-slide").eq(this.slidesOrder[this.slidesOrder.length-1]),r=parseInt(n.css(this.positionProperty),10)+(this.settings.rightToLeft===!0&&"horizontal"===this.settings.orientation?-1:1)*parseInt(n.css(this.sizeProperty),10);this.slidesSize=Math.abs(r-i);this.averageSlideSize=Math.round(this.slidesSize/this.slides.length)},resize:function(){var e=this,i,u,r,f;if(null!==this.settings.breakpoints&&this.breakpoints.length>0)if(t(n).width()>this.breakpoints[this.breakpoints.length-1].size&&-1!==this.currentBreakpoint)this.currentBreakpoint=-1,this._setProperties(this.originalSettings,!1);else for(i=0,u=this.breakpoints.length;u>i;i++)if(t(n).width()<=this.breakpoints[i].size){if(this.currentBreakpoint!==this.breakpoints[i].size)return r={type:"breakpointReach",size:this.breakpoints[i].size,settings:this.breakpoints[i].properties},this.trigger(r),t.isFunction(this.settings.breakpointReach)&&this.settings.breakpointReach.call(this,r),this.currentBreakpoint=this.breakpoints[i].size,f=t.extend({},this.originalSettings,this.breakpoints[i].properties),void this._setProperties(f,!1);break}this.settings.responsive===!0?"fullWidth"!==this.settings.forceSize&&"fullWindow"!==this.settings.forceSize||"auto"!==this.settings.visibleSize&&("auto"===this.settings.visibleSize||"vertical"!==this.settings.orientation)?this.$slider.css({width:"100%","max-width":this.settings.width,marginLeft:""}):(this.$slider.css("margin",0),this.$slider.css({width:t(n).width(),"max-width":"",marginLeft:-this.$slider.offset().left})):this.$slider.css({width:this.settings.width});-1===this.settings.aspectRatio&&(this.settings.aspectRatio=this.settings.width/this.settings.height);this.slideWidth=this.$slider.width();this.slideHeight="fullWindow"===this.settings.forceSize?t(n).height():isNaN(this.settings.aspectRatio)?this.settings.height:this.slideWidth/this.settings.aspectRatio;(this.previousSlideWidth!==this.slideWidth||this.previousSlideHeight!==this.slideHeight||"auto"!==this.settings.visibleSize||this.$slider.outerWidth()>this.$slider.parent().width()||this.$slider.width()!==this.$slidesMask.width())&&(this.previousSlideWidth=this.slideWidth,this.previousSlideHeight=this.slideHeight,this._resizeSlides(),this.$slidesMask.css({width:this.slideWidth,height:this.slideHeight}),this.settings.autoHeight===!0?setTimeout(function(){e._resizeHeight()},1):this.$slidesMask.css(this.vendorPrefix+"transition",""),"auto"!==this.settings.visibleSize&&("horizontal"===this.settings.orientation?("fullWidth"===this.settings.forceSize||"fullWindow"===this.settings.forceSize?(this.$slider.css("margin",0),this.$slider.css({width:t(n).width(),"max-width":"",marginLeft:-this.$slider.offset().left})):this.$slider.css({width:this.settings.visibleSize,"max-width":"100%",marginLeft:0}),this.$slidesMask.css("width",this.$slider.width())):("fullWindow"===this.settings.forceSize?this.$slider.css({height:t(n).height(),"max-height":""}):this.$slider.css({height:this.settings.visibleSize,"max-height":"100%"}),this.$slidesMask.css("height",this.$slider.height()))),this._resetSlidesPosition(),this._calculateSlidesSize(),this.trigger({type:"sliderResize"}),t.isFunction(this.settings.sliderResize)&&this.settings.sliderResize.call(this,{type:"sliderResize"}))},_resizeSlides:function(){var i=this.slideWidth,n=this.slideHeight;this.settings.autoSlideSize===!0?"horizontal"===this.settings.orientation?i="auto":"vertical"===this.settings.orientation&&(n="auto"):this.settings.autoHeight===!0&&(n="auto");t.each(this.slides,function(t,r){r.setSize(i,n)})},_resizeHeight:function(){var n=this.getSlideAt(this.selectedSlideIndex);this._resizeHeightTo(n.getSize().height)},gotoSlide:function(n){var i,r,u;n!==this.selectedSlideIndex&&"undefined"!=typeof this.slides[n]&&(i=this,this.previousSlideIndex=this.selectedSlideIndex,this.selectedSlideIndex=n,this.$slides.find(".sp-selected").removeClass("sp-selected"),this.$slides.find(".sp-slide").eq(this.selectedSlideIndex).addClass("sp-selected"),this.settings.loop===!0&&(this._updateSlidesOrder(),this._updateSlidesPosition()),this.settings.autoHeight===!0&&this._resizeHeight(),r=this.settings.centerSelectedSlide===!0?Math.round((parseInt(this.$slidesMask.css(this.sizeProperty),10)-this.getSlideAt(this.selectedSlideIndex).getSize()[this.sizeProperty])/2):0,u=-parseInt(this.$slides.find(".sp-slide").eq(this.selectedSlideIndex).css(this.positionProperty),10)+r,this._moveTo(u,!1,function(){i._resetSlidesPosition();i.trigger({type:"gotoSlideComplete",index:n,previousIndex:i.previousSlideIndex});t.isFunction(i.settings.gotoSlideComplete)&&i.settings.gotoSlideComplete.call(i,{type:"gotoSlideComplete",index:n,previousIndex:i.previousSlideIndex})}),this.trigger({type:"gotoSlide",index:n,previousIndex:this.previousSlideIndex}),t.isFunction(this.settings.gotoSlide)&&this.settings.gotoSlide.call(this,{type:"gotoSlide",index:n,previousIndex:this.previousSlideIndex}))},nextSlide:function(){var n=this.selectedSlideIndex>=this.getTotalSlides()-1?0:this.selectedSlideIndex+1;this.gotoSlide(n)},previousSlide:function(){var n=this.selectedSlideIndex<=0?this.getTotalSlides()-1:this.selectedSlideIndex-1;this.gotoSlide(n)},_moveTo:function(n,t,i){var u=this,r={},f,e,o;n!==this.slidesPosition&&((this.slidesPosition=n,"css-3d"!==this.supportedAnimation&&"css-2d"!==this.supportedAnimation||this.isIE!==!1)?(r["margin-"+this.positionProperty]=n,"undefined"!=typeof t&&t===!0?this.$slides.css(r):(this.$slides.addClass("sp-animated"),this.$slides.animate(r,this.settings.slideAnimationDuration,function(){u.$slides.removeClass("sp-animated");"function"==typeof i&&i()}))):(e="horizontal"===this.settings.orientation?n:0,o="horizontal"===this.settings.orientation?0:n,r[this.vendorPrefix+"transform"]="css-3d"===this.supportedAnimation?"translate3d("+e+"px, "+o+"px, 0)":"translate("+e+"px, "+o+"px)","undefined"!=typeof t&&t===!0?f="":(this.$slides.addClass("sp-animated"),f=this.vendorPrefix+"transform "+this.settings.slideAnimationDuration/1e3+"s",this.$slides.on(this.transitionEvent,function(n){n.target===n.currentTarget&&(u.$slides.off(u.transitionEvent),u.$slides.removeClass("sp-animated"),"function"==typeof i&&i())})),r[this.vendorPrefix+"transition"]=f,this.$slides.css(r)))},_stopMovement:function(){var t={};if("css-3d"!==this.supportedAnimation&&"css-2d"!==this.supportedAnimation||this.isIE!==!1)this.$slides.stop(),this.slidesPosition=parseInt(this.$slides.css("margin-"+this.positionProperty),10);else{var f=this.$slides.css(this.vendorPrefix+"transform"),i=-1!==f.indexOf("matrix3d")?"matrix3d":"matrix",n=f.replace(i,"").match(/-?[0-9\.]+/g),r="matrix3d"===i?parseInt(n[12],10):parseInt(n[4],10),u="matrix3d"===i?parseInt(n[13],10):parseInt(n[5],10);t[this.vendorPrefix+"transform"]="css-3d"===this.supportedAnimation?"translate3d("+r+"px, "+u+"px, 0)":"translate("+r+"px, "+u+"px)";t[this.vendorPrefix+"transition"]="";this.$slides.css(t);this.$slides.off(this.transitionEvent);this.slidesPosition="horizontal"===this.settings.orientation?r:u}this.$slides.removeClass("sp-animated")},_resizeHeightTo:function(n){var i=this,r={height:n};"css-3d"===this.supportedAnimation||"css-2d"===this.supportedAnimation?(r[this.vendorPrefix+"transition"]="height "+this.settings.heightAnimationDuration/1e3+"s",this.$slidesMask.off(this.transitionEvent),this.$slidesMask.on(this.transitionEvent,function(n){n.target===n.currentTarget&&(i.$slidesMask.off(i.transitionEvent),i.trigger({type:"resizeHeightComplete"}),t.isFunction(i.settings.resizeHeightComplete)&&i.settings.resizeHeightComplete.call(i,{type:"resizeHeightComplete"}))}),this.$slidesMask.css(r)):this.$slidesMask.stop().animate(r,this.settings.heightAnimationDuration,function(){i.trigger({type:"resizeHeightComplete"});t.isFunction(i.settings.resizeHeightComplete)&&i.settings.resizeHeightComplete.call(i,{type:"resizeHeightComplete"})})},destroy:function(){var r,u;if(this.$slider.removeData("sliderPro"),this.$slider.removeAttr("style"),this.$slides.removeAttr("style"),this.off("update."+i),t(n).off("resize."+this.uniqueId+"."+i),r=t.SliderPro.modules,"undefined"!=typeof r)for(u=0;u<r.length;u++)"undefined"!=typeof this["destroy"+r[u]]&&this["destroy"+r[u]]();t.each(this.slides,function(n,t){t.destroy()});this.slides.length=0;this.$slides.prependTo(this.$slider);this.$slidesContainer.remove()},_setProperties:function(n,t){for(var i in n)this.settings[i]=n[i],t!==!1&&(this.originalSettings[i]=n[i]);this.update()},on:function(n,t){return this.$slider.on(n,t)},off:function(n){return this.$slider.off(n)},trigger:function(n){return this.$slider.triggerHandler(n)},getSlideAt:function(n){return this.slides[n]},getSelectedSlide:function(){return this.selectedSlideIndex},getTotalSlides:function(){return this.slides.length},defaults:{width:500,height:300,responsive:!0,aspectRatio:-1,imageScaleMode:"cover",centerImage:!0,allowScaleUp:!0,autoHeight:!1,autoSlideSize:!1,startSlide:0,shuffle:!1,orientation:"horizontal",forceSize:"none",loop:!0,slideDistance:10,slideAnimationDuration:700,heightAnimationDuration:700,visibleSize:"auto",centerSelectedSlide:!0,rightToLeft:!1,breakpoints:null,init:function(){},update:function(){},sliderResize:function(){},gotoSlide:function(){},gotoSlideComplete:function(){},resizeHeightComplete:function(){},breakpointReach:function(){}}};f=function(n,t,i){this.$slide=n;this.$mainImage=null;this.$imageContainer=null;this.hasMainImage=!1;this.isMainImageLoaded=!1;this.isMainImageLoading=!1;this.hasImages=!1;this.areImagesLoaded=!1;this.areImagesLoading=!1;this.width=0;this.height=0;this.settings=i;this.setIndex(t);this._init()};f.prototype={_init:function(){this.$slide.attr("data-init",!0);this.$mainImage=0!==this.$slide.find(".sp-image").length?this.$slide.find(".sp-image"):null;null!==this.$mainImage&&(this.hasMainImage=!0,this.$imageContainer=t('<div class="sp-image-container"><\/div>').prependTo(this.$slide),0!==this.$mainImage.parent("a").length?this.$mainImage.parent("a").appendTo(this.$imageContainer):this.$mainImage.appendTo(this.$imageContainer));this.hasImages=0!==this.$slide.find("img").length?!0:!1},setSize:function(n,t){this.width=n;this.height=t;this.$slide.css({width:this.width,height:this.height});this.hasMainImage===!0&&(this.$imageContainer.css({width:this.settings.width,height:this.settings.height}),"undefined"==typeof this.$mainImage.attr("data-src")&&this.resizeMainImage())},getSize:function(){var t,n=this,u;return this.hasImages===!0&&this.areImagesLoaded===!1&&this.areImagesLoading===!1&&(this.areImagesLoading=!0,u=r.checkImagesStatus(this.$slide),"complete"!==u)?(r.checkImagesComplete(this.$slide,function(){n.areImagesLoaded=!0;n.areImagesLoading=!1;n.trigger({type:"imagesLoaded."+i,index:n.index})}),{width:this.settings.width,height:this.settings.height}):(t=this.calculateSize(),{width:t.width,height:t.height})},calculateSize:function(){var n=this.$slide.width(),i=this.$slide.height();return this.$slide.children().each(function(r,u){var e=t(u);if(e.is(":hidden")!==!0){var f=u.getBoundingClientRect(),o=e.position().top+(f.bottom-f.top),s=e.position().left+(f.right-f.left);o>i&&(i=o);s>n&&(n=s)}}),{width:n,height:i}},resizeMainImage:function(n){var t=this;return n===!0&&(this.isMainImageLoaded=!1,this.isMainImageLoading=!1),this.isMainImageLoaded===!1&&this.isMainImageLoading===!1?(this.isMainImageLoading=!0,void r.checkImagesComplete(this.$mainImage,function(){t.isMainImageLoaded=!0;t.isMainImageLoading=!1;t.resizeMainImage();t.trigger({type:"imagesLoaded."+i,index:t.index})})):(this.$imageContainer.css({width:this.width,height:this.height}),this.settings.allowScaleUp===!1&&(this.$mainImage.css({width:"",height:"",maxWidth:"",maxHeight:""}),this.$mainImage.css({maxWidth:this.$mainImage.width(),maxHeight:this.$mainImage.height()})),void(this.settings.autoSlideSize===!0?"horizontal"===this.settings.orientation?this.$mainImage.css({width:"auto",height:"100%"}):"vertical"===this.settings.orientation&&this.$mainImage.css({width:"100%",height:"auto"}):this.settings.autoHeight===!0?this.$mainImage.css({width:"100%",height:"auto"}):("cover"===this.settings.imageScaleMode?this.$mainImage.width()/this.$mainImage.height()<=this.width/this.height?this.$mainImage.css({width:"100%",height:"auto"}):this.$mainImage.css({width:"auto",height:"100%"}):"contain"===this.settings.imageScaleMode?this.$mainImage.width()/this.$mainImage.height()>=this.width/this.height?this.$mainImage.css({width:"100%",height:"auto"}):this.$mainImage.css({width:"auto",height:"100%"}):"exact"===this.settings.imageScaleMode&&this.$mainImage.css({width:"100%",height:"100%"}),this.settings.centerImage===!0&&this.$mainImage.css({marginLeft:.5*(this.$imageContainer.width()-this.$mainImage.width()),marginTop:.5*(this.$imageContainer.height()-this.$mainImage.height())}))))},destroy:function(){this.$slide.removeAttr("style");this.$slide.removeAttr("data-init");this.$slide.removeAttr("data-index");this.$slide.removeAttr("data-loaded");this.hasMainImage===!0&&(this.$slide.find(".sp-image").removeAttr("style").appendTo(this.$slide),this.$slide.find(".sp-image-container").remove())},getIndex:function(){return this.index},setIndex:function(n){this.index=n;this.$slide.attr("data-index",this.index)},on:function(n,t){return this.$slide.on(n,t)},off:function(n){return this.$slide.off(n)},trigger:function(n){return this.$slide.triggerHandler(n)}};n.SliderPro=u;n.SliderProSlide=f;t.fn.sliderPro=function(n){var i=Array.prototype.slice.call(arguments,1);return this.each(function(){var e,r,f;"undefined"==typeof t(this).data("sliderPro")?(e=new u(this,n),t(this).data("sliderPro",e)):"undefined"!=typeof n&&(r=t(this).data("sliderPro"),"function"==typeof r[n]?r[n].apply(r,i):"undefined"!=typeof r.settings[n]?(f={},f[n]=i[0],r._setProperties(f)):"object"==typeof n?r._setProperties(n):t.error(n+" does not exist in sliderPro."))})};r={supportedAnimation:null,vendorPrefix:null,transitionEvent:null,isIE:null,getSupportedAnimation:function(){var n,t;if(null!==this.supportedAnimation)return this.supportedAnimation;var r=document.body||document.documentElement,i=r.style,u="undefined"!=typeof i.transition||"undefined"!=typeof i.WebkitTransition||"undefined"!=typeof i.MozTransition||"undefined"!=typeof i.OTransition;return u===!0?(n=document.createElement("div"),(("undefined"!=typeof n.style.WebkitPerspective||"undefined"!=typeof n.style.perspective)&&(this.supportedAnimation="css-3d"),"css-3d"===this.supportedAnimation&&"undefined"!=typeof n.styleWebkitPerspective)&&(t=document.createElement("style"),t.textContent="@media (transform-3d),(-webkit-transform-3d){#test-3d{left:9px;position:absolute;height:5px;margin:0;padding:0;border:0;}}",document.getElementsByTagName("head")[0].appendChild(t),n.id="test-3d",document.body.appendChild(n),(9!==n.offsetLeft||5!==n.offsetHeight)&&(this.supportedAnimation=null),t.parentNode.removeChild(t),n.parentNode.removeChild(n)),null!==this.supportedAnimation||"undefined"==typeof n.style["-webkit-transform"]&&"undefined"==typeof n.style.transform||(this.supportedAnimation="css-2d")):this.supportedAnimation="javascript",this.supportedAnimation},getVendorPrefix:function(){var i,t,n;if(null!==this.vendorPrefix)return this.vendorPrefix;if(i=document.createElement("div"),t=["Webkit","Moz","ms","O"],"transform"in i.style)return this.vendorPrefix="",this.vendorPrefix;for(n=0;n<t.length;n++)if(t[n]+"Transform"in i.style){this.vendorPrefix="-"+t[n].toLowerCase()+"-";break}return this.vendorPrefix},getTransitionEvent:function(){var i,n,t;if(null!==this.transitionEvent)return this.transitionEvent;i=document.createElement("div");n={transition:"transitionend",WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd"};for(t in n)if(t in i.style){this.transitionEvent=n[t];break}return this.transitionEvent},checkImagesComplete:function(n,t){var u=this,i=this.checkImagesStatus(n),r;return"loading"===i?r=setInterval(function(){i=u.checkImagesStatus(n);"complete"===i&&(clearInterval(r),"function"==typeof t&&t())},100):"function"==typeof t&&t(),i},checkImagesStatus:function(n){var i="complete";return n.is("img")&&n[0].complete===!1?i="loading":n.find("img").each(function(){var n=t(this)[0];n.complete===!1&&(i="loading")}),i},checkIE:function(){if(null!==this.isIE)return this.isIE;var t=n.navigator.userAgent;return t.indexOf("MSIE"),this.isIE=-1!==t.indexOf("MSIE")||t.match(/Trident.*rv\:11\./)?!0:!1,this.isIE}};n.SliderProUtils=r}(window,jQuery),function(n,t){"use strict";var i="Thumbnails."+t.SliderPro.namespace,u={$thumbnails:null,$thumbnailsContainer:null,thumbnails:null,selectedThumbnailIndex:0,thumbnailsSize:0,thumbnailsContainerSize:0,thumbnailsPosition:0,thumbnailsOrientation:null,thumbnailsPositionProperty:null,isThumbnailScroller:!1,initThumbnails:function(){var n=this;this.thumbnails=[];this.on("update."+i,t.proxy(this._thumbnailsOnUpdate,this));this.on("sliderResize."+i,t.proxy(this._thumbnailsOnResize,this));this.on("gotoSlide."+i,function(t){n._gotoThumbnail(t.index)})},_thumbnailsOnUpdate:function(){var n=this,u,r,i,f;if(0===this.$slider.find(".sp-thumbnail").length&&0===this.thumbnails.length)return void(this.isThumbnailScroller=!1);for((this.isThumbnailScroller=!0,null===this.$thumbnailsContainer&&(this.$thumbnailsContainer=t('<div class="sp-thumbnails-container"><\/div>').insertAfter(this.$slidesContainer)),null===this.$thumbnails)&&(0!==this.$slider.find(".sp-thumbnails").length?(this.$thumbnails=this.$slider.find(".sp-thumbnails").appendTo(this.$thumbnailsContainer),this.settings.shuffle===!0)&&(u=this.$thumbnails.find(".sp-thumbnail"),r=[],t.each(this.shuffledIndexes,function(n,i){var f=t(u[i]);0!==f.parent("a").length&&(f=f.parent("a"));r.push(f)}),this.$thumbnails.empty().append(r)):this.$thumbnails=t('<div class="sp-thumbnails"><\/div>').appendTo(this.$thumbnailsContainer)),this.$slides.find(".sp-thumbnail").each(function(){var i=t(this),r=i.parents(".sp-slide").index(),u=n.$thumbnails.find(".sp-thumbnail").length-1;0!==i.parent("a").length&&(i=i.parent("a"));r>u?i.appendTo(n.$thumbnails):i.insertBefore(n.$thumbnails.find(".sp-thumbnail").eq(r))}),i=this.thumbnails.length-1;i>=0;i--)0===this.$thumbnails.find('.sp-thumbnail[data-index="'+i+'"]').length&&(f=this.thumbnails[i],f.destroy(),this.thumbnails.splice(i,1));this.$thumbnails.find(".sp-thumbnail").each(function(i){var r=t(this);"undefined"==typeof r.attr("data-init")?n._createThumbnail(r,i):n.thumbnails[i].setIndex(i)});this.$thumbnailsContainer.removeClass("sp-top-thumbnails sp-bottom-thumbnails sp-left-thumbnails sp-right-thumbnails");"top"===this.settings.thumbnailsPosition?(this.$thumbnailsContainer.addClass("sp-top-thumbnails"),this.thumbnailsOrientation="horizontal"):"bottom"===this.settings.thumbnailsPosition?(this.$thumbnailsContainer.addClass("sp-bottom-thumbnails"),this.thumbnailsOrientation="horizontal"):"left"===this.settings.thumbnailsPosition?(this.$thumbnailsContainer.addClass("sp-left-thumbnails"),this.thumbnailsOrientation="vertical"):"right"===this.settings.thumbnailsPosition&&(this.$thumbnailsContainer.addClass("sp-right-thumbnails"),this.thumbnailsOrientation="vertical");this.settings.thumbnailPointer===!0?this.$thumbnailsContainer.addClass("sp-has-pointer"):this.$thumbnailsContainer.removeClass("sp-has-pointer");this.selectedThumbnailIndex=this.selectedSlideIndex;this.$thumbnails.find(".sp-thumbnail-container").eq(this.selectedThumbnailIndex).addClass("sp-selected-thumbnail");this.thumbnailsSize=0;t.each(this.thumbnails,function(t,i){i.setSize(n.settings.thumbnailWidth,n.settings.thumbnailHeight);n.thumbnailsSize+="horizontal"===n.thumbnailsOrientation?i.getSize().width:i.getSize().height});"horizontal"===this.thumbnailsOrientation?(this.$thumbnails.css({width:this.thumbnailsSize,height:this.settings.thumbnailHeight}),this.$thumbnailsContainer.css("height",""),this.thumbnailsPositionProperty="left"):(this.$thumbnails.css({width:this.settings.thumbnailWidth,height:this.thumbnailsSize}),this.$thumbnailsContainer.css("width",""),this.thumbnailsPositionProperty="top");this.trigger({type:"thumbnailsUpdate"});t.isFunction(this.settings.thumbnailsUpdate)&&this.settings.thumbnailsUpdate.call(this,{type:"thumbnailsUpdate"})},_createThumbnail:function(n,t){var f=this,u=new r(n,this.$thumbnails,t);u.on("thumbnailClick."+i,function(n){f.gotoSlide(n.index)});this.thumbnails.splice(t,0,u)},_thumbnailsOnResize:function(){if(this.isThumbnailScroller!==!1){var i;"horizontal"===this.thumbnailsOrientation?(this.thumbnailsContainerSize=Math.min(this.$slidesMask.width(),this.thumbnailsSize),this.$thumbnailsContainer.css("width",this.thumbnailsContainerSize),"fullWindow"===this.settings.forceSize&&(this.$slidesMask.css("height",this.$slidesMask.height()-this.$thumbnailsContainer.outerHeight(!0)),this.slideHeight=this.$slidesMask.height(),this._resizeSlides(),this._resetSlidesPosition())):"vertical"===this.thumbnailsOrientation&&(this.$slidesMask.width()+this.$thumbnailsContainer.outerWidth(!0)>this.$slider.parent().width()&&("fullWidth"===this.settings.forceSize||"fullWindow"===this.settings.forceSize?this.$slider.css("max-width",t(n).width()-this.$thumbnailsContainer.outerWidth(!0)):this.$slider.css("max-width",this.$slider.parent().width()-this.$thumbnailsContainer.outerWidth(!0)),this.$slidesMask.css("width",this.$slider.width()),"vertical"===this.settings.orientation&&(this.slideWidth=this.$slider.width(),this._resizeSlides()),this._resetSlidesPosition()),this.thumbnailsContainerSize=Math.min(this.$slidesMask.height(),this.thumbnailsSize),this.$thumbnailsContainer.css("height",this.thumbnailsContainerSize));i=this.thumbnailsSize<=this.thumbnailsContainerSize||0===this.$thumbnails.find(".sp-selected-thumbnail").length?0:Math.max(-this.thumbnails[this.selectedThumbnailIndex].getPosition()[this.thumbnailsPositionProperty],this.thumbnailsContainerSize-this.thumbnailsSize);"top"===this.settings.thumbnailsPosition?this.$slider.css({paddingTop:this.$thumbnailsContainer.outerHeight(!0),paddingLeft:"",paddingRight:""}):"bottom"===this.settings.thumbnailsPosition?this.$slider.css({paddingTop:"",paddingLeft:"",paddingRight:""}):"left"===this.settings.thumbnailsPosition?this.$slider.css({paddingTop:"",paddingLeft:this.$thumbnailsContainer.outerWidth(!0),paddingRight:""}):"right"===this.settings.thumbnailsPosition&&this.$slider.css({paddingTop:"",paddingLeft:"",paddingRight:this.$thumbnailsContainer.outerWidth(!0)});this._moveThumbnailsTo(i,!0)}},_gotoThumbnail:function(n){var r,i,f,u;if(this.isThumbnailScroller!==!1&&"undefined"!=typeof this.thumbnails[n]){if(r=this.selectedThumbnailIndex,i=this.thumbnailsPosition,this.selectedThumbnailIndex=n,this.$thumbnails.find(".sp-selected-thumbnail").removeClass("sp-selected-thumbnail"),this.$thumbnails.find(".sp-thumbnail-container").eq(this.selectedThumbnailIndex).addClass("sp-selected-thumbnail"),this.settings.rightToLeft===!0&&"horizontal"===this.thumbnailsOrientation){if(this.selectedThumbnailIndex>=r)f=this.selectedThumbnailIndex===this.thumbnails.length-1?this.selectedThumbnailIndex:this.selectedThumbnailIndex+1,u=this.thumbnails[f],u.getPosition().left<-this.thumbnailsPosition&&(i=-u.getPosition().left);else if(this.selectedThumbnailIndex<r){var v=0===this.selectedThumbnailIndex?this.selectedThumbnailIndex:this.selectedThumbnailIndex-1,e=this.thumbnails[v],o=-this.thumbnailsPosition+this.thumbnailsContainerSize;e.getPosition().right>o&&(i=this.thumbnailsPosition-(e.getPosition().right-o))}}else if(this.selectedThumbnailIndex>=r){var y=this.selectedThumbnailIndex===this.thumbnails.length-1?this.selectedThumbnailIndex:this.selectedThumbnailIndex+1,s=this.thumbnails[y],h="horizontal"===this.thumbnailsOrientation?s.getPosition().right:s.getPosition().bottom,c=-this.thumbnailsPosition+this.thumbnailsContainerSize;h>c&&(i=this.thumbnailsPosition-(h-c))}else if(this.selectedThumbnailIndex<r){var p=0===this.selectedThumbnailIndex?this.selectedThumbnailIndex:this.selectedThumbnailIndex-1,l=this.thumbnails[p],a="horizontal"===this.thumbnailsOrientation?l.getPosition().left:l.getPosition().top;a<-this.thumbnailsPosition&&(i=-a)}this._moveThumbnailsTo(i);this.trigger({type:"gotoThumbnail"});t.isFunction(this.settings.gotoThumbnail)&&this.settings.gotoThumbnail.call(this,{type:"gotoThumbnail"})}},_moveThumbnailsTo:function(n,i,r){var u=this,f={},e,o,s;n!==this.thumbnailsPosition&&((this.thumbnailsPosition=n,"css-3d"===this.supportedAnimation||"css-2d"===this.supportedAnimation)?(o="horizontal"===this.thumbnailsOrientation?n:0,s="horizontal"===this.thumbnailsOrientation?0:n,f[this.vendorPrefix+"transform"]="css-3d"===this.supportedAnimation?"translate3d("+o+"px, "+s+"px, 0)":"translate("+o+"px, "+s+"px)","undefined"!=typeof i&&i===!0?e="":(this.$thumbnails.addClass("sp-animated"),e=this.vendorPrefix+"transform 0.7s",this.$thumbnails.on(this.transitionEvent,function(n){n.target===n.currentTarget&&(u.$thumbnails.off(u.transitionEvent),u.$thumbnails.removeClass("sp-animated"),"function"==typeof r&&r(),u.trigger({type:"thumbnailsMoveComplete"}),t.isFunction(u.settings.thumbnailsMoveComplete)&&u.settings.thumbnailsMoveComplete.call(u,{type:"thumbnailsMoveComplete"}))})),f[this.vendorPrefix+"transition"]=e,this.$thumbnails.css(f)):(f["margin-"+this.thumbnailsPositionProperty]=n,"undefined"!=typeof i&&i===!0?this.$thumbnails.css(f):this.$thumbnails.addClass("sp-animated").animate(f,700,function(){u.$thumbnails.removeClass("sp-animated");"function"==typeof r&&r();u.trigger({type:"thumbnailsMoveComplete"});t.isFunction(u.settings.thumbnailsMoveComplete)&&u.settings.thumbnailsMoveComplete.call(u,{type:"thumbnailsMoveComplete"})})))},_stopThumbnailsMovement:function(){var t={};if("css-3d"===this.supportedAnimation||"css-2d"===this.supportedAnimation){var r=this.$thumbnails.css(this.vendorPrefix+"transform"),i=-1!==r.indexOf("matrix3d")?"matrix3d":"matrix",n=r.replace(i,"").match(/-?[0-9\.]+/g),u="matrix3d"===i?parseInt(n[12],10):parseInt(n[4],10),f="matrix3d"===i?parseInt(n[13],10):parseInt(n[5],10);t[this.vendorPrefix+"transform"]="css-3d"===this.supportedAnimation?"translate3d("+u+"px, "+f+"px, 0)":"translate("+u+"px, "+f+"px)";t[this.vendorPrefix+"transition"]="";this.$thumbnails.css(t);this.$thumbnails.off(this.transitionEvent);this.thumbnailsPosition="horizontal"===this.thumbnailsOrientation?parseInt(n[4],10):parseInt(n[5],10)}else this.$thumbnails.stop(),this.thumbnailsPosition=parseInt(this.$thumbnails.css("margin-"+this.thumbnailsPositionProperty),10);this.$thumbnails.removeClass("sp-animated")},destroyThumbnails:function(){var r=this;this.off("update."+i);this.isThumbnailScroller!==!1&&(this.off("sliderResize."+i),this.off("gotoSlide."+i),t(n).off("resize."+this.uniqueId+"."+i),this.$thumbnails.find(".sp-thumbnail").each(function(){var u=t(this),f=parseInt(u.attr("data-index"),10),n=r.thumbnails[f];n.off("thumbnailClick."+i);n.destroy()}),this.thumbnails.length=0,this.$thumbnails.appendTo(this.$slider),this.$thumbnailsContainer.remove(),this.$slider.css({paddingTop:"",paddingLeft:"",paddingRight:""}))},thumbnailsDefaults:{thumbnailWidth:100,thumbnailHeight:80,thumbnailsPosition:"bottom",thumbnailPointer:!1,thumbnailsUpdate:function(){},gotoThumbnail:function(){},thumbnailsMoveComplete:function(){}}},r=function(n,t,i){this.$thumbnail=n;this.$thumbnails=t;this.$thumbnailContainer=null;this.width=0;this.height=0;this.isImageLoaded=!1;this.setIndex(i);this._init()};r.prototype={_init:function(){var n=this;this.$thumbnail.attr("data-init",!0);this.$thumbnailContainer=t('<div class="sp-thumbnail-container"><\/div>').appendTo(this.$thumbnails);0!==this.$thumbnail.parent("a").length?this.$thumbnail.parent("a").appendTo(this.$thumbnailContainer):this.$thumbnail.appendTo(this.$thumbnailContainer);this.$thumbnailContainer.on("click."+i,function(){n.trigger({type:"thumbnailClick."+i,index:n.index})})},setSize:function(n,t){this.width=n;this.height=t;this.$thumbnailContainer.css({width:this.width,height:this.height});this.$thumbnail.is("img")&&"undefined"==typeof this.$thumbnail.attr("data-src")&&this.resizeImage()},getSize:function(){return{width:this.$thumbnailContainer.outerWidth(!0),height:this.$thumbnailContainer.outerHeight(!0)}},getPosition:function(){return{left:this.$thumbnailContainer.position().left+parseInt(this.$thumbnailContainer.css("marginLeft"),10),right:this.$thumbnailContainer.position().left+parseInt(this.$thumbnailContainer.css("marginLeft"),10)+this.$thumbnailContainer.outerWidth(),top:this.$thumbnailContainer.position().top+parseInt(this.$thumbnailContainer.css("marginTop"),10),bottom:this.$thumbnailContainer.position().top+parseInt(this.$thumbnailContainer.css("marginTop"),10)+this.$thumbnailContainer.outerHeight()}},setIndex:function(n){this.index=n;this.$thumbnail.attr("data-index",this.index)},resizeImage:function(){var n=this,t,i;if(this.isImageLoaded===!1)return void SliderProUtils.checkImagesComplete(this.$thumbnailContainer,function(){n.isImageLoaded=!0;n.resizeImage()});this.$thumbnail=this.$thumbnailContainer.find(".sp-thumbnail");t=this.$thumbnail.width();i=this.$thumbnail.height();t/i<=this.width/this.height?this.$thumbnail.css({width:"100%",height:"auto"}):this.$thumbnail.css({width:"auto",height:"100%"});this.$thumbnail.css({marginLeft:.5*(this.$thumbnailContainer.width()-this.$thumbnail.width()),marginTop:.5*(this.$thumbnailContainer.height()-this.$thumbnail.height())})},destroy:function(){this.$thumbnailContainer.off("click."+i);this.$thumbnail.removeAttr("data-init");this.$thumbnail.removeAttr("data-index");0!==this.$thumbnail.parent("a").length?this.$thumbnail.parent("a").insertBefore(this.$thumbnailContainer):this.$thumbnail.insertBefore(this.$thumbnailContainer);this.$thumbnailContainer.remove()},on:function(n,t){return this.$thumbnailContainer.on(n,t)},off:function(n){return this.$thumbnailContainer.off(n)},trigger:function(n){return this.$thumbnailContainer.triggerHandler(n)}};t.SliderPro.addModule("Thumbnails",u)}(window,jQuery),function(n,t){"use strict";var i="ConditionalImages."+t.SliderPro.namespace,r={previousImageSize:null,currentImageSize:null,isRetinaScreen:!1,initConditionalImages:function(){this.currentImageSize=this.previousImageSize="default";this.isRetinaScreen="undefined"!=typeof this._isRetina&&this._isRetina()===!0;this.on("update."+i,t.proxy(this._conditionalImagesOnUpdate,this));this.on("sliderResize."+i,t.proxy(this._conditionalImagesOnResize,this))},_conditionalImagesOnUpdate:function(){t.each(this.slides,function(n,i){var r=i.$slide;r.find("img:not([ data-default ])").each(function(){var n=t(this);"undefined"!=typeof n.attr("data-src")?n.attr("data-default",n.attr("data-src")):n.attr("data-default",n.attr("src"))})})},_conditionalImagesOnResize:function(){if(this.currentImageSize=this.slideWidth<=this.settings.smallSize?"small":this.slideWidth<=this.settings.mediumSize?"medium":this.slideWidth<=this.settings.largeSize?"large":"default",this.previousImageSize!==this.currentImageSize){var n=this;t.each(this.slides,function(i,r){var u=r.$slide;u.find("img").each(function(){var i=t(this),u="";n.isRetinaScreen===!0&&"undefined"!=typeof i.attr("data-retina"+n.currentImageSize)?(u=i.attr("data-retina"+n.currentImageSize),"undefined"!=typeof i.attr("data-retina")&&i.attr("data-retina")!==u&&i.attr("data-retina",u)):(n.isRetinaScreen===!1||n.isRetinaScreen===!0&&"undefined"==typeof i.attr("data-retina"))&&"undefined"!=typeof i.attr("data-"+n.currentImageSize)&&(u=i.attr("data-"+n.currentImageSize),"undefined"!=typeof i.attr("data-src")&&i.attr("data-src")!==u&&i.attr("data-src",u));""!==u&&"undefined"==typeof i.attr("data-src")&&i.attr("src")!==u&&n._loadConditionalImage(i,u,function(n){n.hasClass("sp-image")&&(r.$mainImage=n,r.resizeMainImage(!0))})})});this.previousImageSize=this.currentImageSize}},_loadConditionalImage:function(n,i,r){var u=t(new Image);u.attr("class",n.attr("class"));u.attr("style",n.attr("style"));t.each(n.data(),function(n,t){u.attr("data-"+n,t)});"undefined"!=typeof n.attr("width")&&u.attr("width",n.attr("width"));"undefined"!=typeof n.attr("height")&&u.attr("height",n.attr("height"));"undefined"!=typeof n.attr("alt")&&u.attr("alt",n.attr("alt"));"undefined"!=typeof n.attr("title")&&u.attr("title",n.attr("title"));u.attr("src",i);u.insertAfter(n);n.remove();n=null;"function"==typeof r&&r(u)},destroyConditionalImages:function(){this.off("update."+i);this.off("sliderResize."+i)},conditionalImagesDefaults:{smallSize:480,mediumSize:768,largeSize:1024}};t.SliderPro.addModule("ConditionalImages",r)}(window,jQuery),function(n,t){"use strict";var i="Retina."+t.SliderPro.namespace,r={initRetina:function(){this._isRetina()!==!1&&(this.on("update."+i,t.proxy(this._checkRetinaImages,this)),0!==this.$slider.find(".sp-thumbnail").length&&this.on("update.Thumbnails."+i,t.proxy(this._checkRetinaThumbnailImages,this)))},_isRetina:function(){return n.devicePixelRatio>=2?!0:n.matchMedia&&n.matchMedia("(-webkit-min-device-pixel-ratio: 2),(min-resolution: 2dppx)").matches?!0:!1},_checkRetinaImages:function(){var n=this;t.each(this.slides,function(i,r){var u=r.$slide;"undefined"==typeof u.attr("data-retina-loaded")&&(u.attr("data-retina-loaded",!0),u.find("img[data-retina]").each(function(){var i=t(this);"undefined"!=typeof i.attr("data-src")?i.attr("data-src",i.attr("data-retina")):n._loadRetinaImage(i,function(n){n.hasClass("sp-image")&&(r.$mainImage=n,r.resizeMainImage(!0))})}))})},_checkRetinaThumbnailImages:function(){var n=this;t.each(this.thumbnails,function(i,r){var u=r.$thumbnailContainer;"undefined"==typeof u.attr("data-retina-loaded")&&(u.attr("data-retina-loaded",!0),u.find("img[data-retina]").each(function(){var i=t(this);"undefined"!=typeof i.attr("data-src")?i.attr("data-src",i.attr("data-retina")):n._loadRetinaImage(i,function(n){n.hasClass("sp-thumbnail")&&r.resizeImage()})}))})},_loadRetinaImage:function(n,i){var f=!1,u="",r;("undefined"!=typeof n.attr("data-retina")&&(f=!0,u=n.attr("data-retina")),"undefined"!=typeof n.attr("data-src")&&(f===!1&&(u=n.attr("data-src")),n.removeAttr("data-src")),""!==u)&&(r=t(new Image),r.attr("class",n.attr("class")),r.attr("style",n.attr("style")),t.each(n.data(),function(n,t){r.attr("data-"+n,t)}),"undefined"!=typeof n.attr("width")&&r.attr("width",n.attr("width")),"undefined"!=typeof n.attr("height")&&r.attr("height",n.attr("height")),"undefined"!=typeof n.attr("alt")&&r.attr("alt",n.attr("alt")),"undefined"!=typeof n.attr("title")&&r.attr("title",n.attr("title")),r.insertAfter(n),n.remove(),n=null,r.attr("src",u),"function"==typeof i&&i(r))},destroyRetina:function(){this.off("update."+i);this.off("update.Thumbnails."+i)}};t.SliderPro.addModule("Retina",r)}(window,jQuery),function(n,t){"use strict";var i="LazyLoading."+t.SliderPro.namespace,r={allowLazyLoadingCheck:!0,initLazyLoading:function(){this.on("sliderResize."+i,t.proxy(this._lazyLoadingOnResize,this));this.on("gotoSlide."+i,t.proxy(this._checkAndLoadVisibleImages,this));this.on("thumbnailsUpdate."+i+" thumbnailsMoveComplete."+i,t.proxy(this._checkAndLoadVisibleThumbnailImages,this))},_lazyLoadingOnResize:function(){var n=this;this.allowLazyLoadingCheck!==!1&&(this.allowLazyLoadingCheck=!1,this._checkAndLoadVisibleImages(),0!==this.$slider.find(".sp-thumbnail").length&&this._checkAndLoadVisibleThumbnailImages(),setTimeout(function(){n.allowLazyLoadingCheck=!0},500))},_checkAndLoadVisibleImages:function(){if(0!==this.$slider.find(".sp-slide:not([ data-loaded ])").length){var r=this,n=this.settings.loop===!0?this.middleSlidePosition:this.selectedSlideIndex,i=Math.ceil((parseInt(this.$slidesMask.css(this.sizeProperty),10)-this.averageSlideSize)/2/this.averageSlideSize),u=n-i-1>0?n-i-1:0,f=n+i+1<this.getTotalSlides()-1?n+i+1:this.getTotalSlides()-1,e=this.slidesOrder.slice(u,f+1);t.each(e,function(n,i){var u=r.slides[i],f=u.$slide;"undefined"==typeof f.attr("data-loaded")&&(f.attr("data-loaded",!0),f.find("img[ data-src ]").each(function(){var n=t(this);r._loadImage(n,function(n){n.hasClass("sp-image")&&(u.$mainImage=n,u.resizeMainImage(!0))})}))})}},_checkAndLoadVisibleThumbnailImages:function(){if(0!==this.$slider.find(".sp-thumbnail-container:not([ data-loaded ])").length){var i=this,n=this.thumbnailsSize/this.thumbnails.length,r=Math.floor(Math.abs(this.thumbnailsPosition/n)),u=Math.floor((-this.thumbnailsPosition+this.thumbnailsContainerSize)/n),f=this.thumbnails.slice(r,u+1);t.each(f,function(n,r){var u=r.$thumbnailContainer;"undefined"==typeof u.attr("data-loaded")&&(u.attr("data-loaded",!0),u.find("img[ data-src ]").each(function(){var n=t(this);i._loadImage(n,function(){r.resizeImage()})}))})}},_loadImage:function(n,i){var r=t(new Image);r.attr("class",n.attr("class"));r.attr("style",n.attr("style"));t.each(n.data(),function(n,t){r.attr("data-"+n,t)});"undefined"!=typeof n.attr("width")&&r.attr("width",n.attr("width"));"undefined"!=typeof n.attr("height")&&r.attr("height",n.attr("height"));"undefined"!=typeof n.attr("alt")&&r.attr("alt",n.attr("alt"));"undefined"!=typeof n.attr("title")&&r.attr("title",n.attr("title"));r.attr("src",n.attr("data-src"));r.removeAttr("data-src");r.insertAfter(n);n.remove();n=null;"function"==typeof i&&i(r)},destroyLazyLoading:function(){this.off("update."+i);this.off("gotoSlide."+i);this.off("sliderResize."+i);this.off("thumbnailsUpdate."+i);this.off("thumbnailsMoveComplete."+i)}};t.SliderPro.addModule("LazyLoading",r)}(window,jQuery),function(n,t){"use strict";var i="Layers."+t.SliderPro.namespace,u={layersGotoSlideReference:null,waitForLayersTimer:null,initLayers:function(){this.on("update."+i,t.proxy(this._layersOnUpdate,this));this.on("sliderResize."+i,t.proxy(this._layersOnResize,this));this.on("gotoSlide."+i,t.proxy(this._layersOnGotoSlide,this))},_layersOnUpdate:function(){var n=this;t.each(this.slides,function(n,i){i.$slide;this.$slide.find(".sp-layer:not([ data-layer-init ])").each(function(){var n=new r(t(this));"undefined"==typeof i.layers&&(i.layers=[]);i.layers.push(n);t(this).hasClass("sp-static")===!1&&("undefined"==typeof i.animatedLayers&&(i.animatedLayers=[]),i.animatedLayers.push(n))})});this.settings.waitForLayers===!0&&(clearTimeout(this.waitForLayersTimer),this.waitForLayersTimer=setTimeout(function(){n.layersGotoSlideReference=n.gotoSlide;n.gotoSlide=n._layersGotoSlide},1));setTimeout(function(){n.showLayers(n.selectedSlideIndex)},1)},_layersOnResize:function(){var n,i,u=this,r=this.settings.autoScaleLayers;this.settings.autoScaleLayers!==!1&&(-1===this.settings.autoScaleReference?"string"==typeof this.settings.width&&-1!==this.settings.width.indexOf("%")?r=!1:n=parseInt(this.settings.width,10):n=this.settings.autoScaleReference,i=r===!0&&this.slideWidth<n?u.slideWidth/n:1,t.each(this.slides,function(n,r){"undefined"!=typeof r.layers&&t.each(r.layers,function(n,t){t.scale(i)})}))},_layersGotoSlide:function(n){var t=this,r=this.slides[this.selectedSlideIndex].animatedLayers;this.$slider.hasClass("sp-swiping")||"undefined"==typeof r||0===r.length?this.layersGotoSlideReference(n):(this.on("hideLayersComplete."+i,function(){t.off("hideLayersComplete."+i);t.layersGotoSlideReference(n)}),this.hideLayers(this.selectedSlideIndex))},_layersOnGotoSlide:function(){this.previousSlideIndex!==this.selectedSlideIndex&&this.hideLayers(this.previousSlideIndex);this.showLayers(this.selectedSlideIndex)},showLayers:function(n){var i=this,r=this.slides[n].animatedLayers,u=0;"undefined"!=typeof r&&t.each(r,function(n,f){f.isVisible()===!0?(u++,u===r.length&&(i.trigger({type:"showLayersComplete",index:n}),t.isFunction(i.settings.showLayersComplete)&&i.settings.showLayersComplete.call(i,{type:"showLayersComplete",index:n}))):f.show(function(){u++;u===r.length&&(i.trigger({type:"showLayersComplete",index:n}),t.isFunction(i.settings.showLayersComplete)&&i.settings.showLayersComplete.call(i,{type:"showLayersComplete",index:n}))})})},hideLayers:function(n){var i=this,r=this.slides[n].animatedLayers,u=0;"undefined"!=typeof r&&t.each(r,function(n,f){f.isVisible()===!1?(u++,u===r.length&&(i.trigger({type:"hideLayersComplete",index:n}),t.isFunction(i.settings.hideLayersComplete)&&i.settings.hideLayersComplete.call(i,{type:"hideLayersComplete",index:n}))):f.hide(function(){u++;u===r.length&&(i.trigger({type:"hideLayersComplete",index:n}),t.isFunction(i.settings.hideLayersComplete)&&i.settings.hideLayersComplete.call(i,{type:"hideLayersComplete",index:n}))})})},destroyLayers:function(){this.off("update."+i);this.off("resize."+i);this.off("gotoSlide."+i);this.off("hideLayersComplete."+i)},layersDefaults:{waitForLayers:!1,autoScaleLayers:!0,autoScaleReference:-1,showLayersComplete:function(){},hideLayersComplete:function(){}}},f=n.SliderProSlide.prototype.destroy,r;n.SliderProSlide.prototype.destroy=function(){"undefined"!=typeof this.layers&&(t.each(this.layers,function(n,t){t.destroy()}),this.layers.length=0);"undefined"!=typeof this.animatedLayers&&(this.animatedLayers.length=0);f.apply(this)};r=function(n){this.$layer=n;this.visible=!1;this.styled=!1;this.data=null;this.position=null;this.horizontalProperty=null;this.verticalProperty=null;this.horizontalPosition=null;this.verticalPosition=null;this.scaleRatio=1;this.supportedAnimation=SliderProUtils.getSupportedAnimation();this.vendorPrefix=SliderProUtils.getVendorPrefix();this.transitionEvent=SliderProUtils.getTransitionEvent();this.stayTimer=null;this._init()};r.prototype={_init:function(){this.$layer.attr("data-layer-init",!0);this.$layer.hasClass("sp-static")?this._setStyle():this.$layer.css({visibility:"hidden"})},_setStyle:function(){this.styled=!0;this.data=this.$layer.data();"undefined"!=typeof this.data.width&&this.$layer.css("width",this.data.width);"undefined"!=typeof this.data.height&&this.$layer.css("height",this.data.height);"undefined"!=typeof this.data.depth&&this.$layer.css("z-index",this.data.depth);this.position=this.data.position?this.data.position.toLowerCase():"topleft";this.horizontalProperty=-1!==this.position.indexOf("right")?"right":-1!==this.position.indexOf("left")?"left":"center";this.verticalProperty=-1!==this.position.indexOf("bottom")?"bottom":-1!==this.position.indexOf("top")?"top":"center";this._setPosition();this.scale(this.scaleRatio)},_setPosition:function(){var n=this.$layer.attr("style");this.horizontalPosition="undefined"!=typeof this.data.horizontal?this.data.horizontal:0;this.verticalPosition="undefined"!=typeof this.data.vertical?this.data.vertical:0;"center"===this.horizontalProperty?(this.$layer.is("img")===!1&&("undefined"==typeof n||"undefined"!=typeof n&&-1===n.indexOf("width"))&&(this.$layer.css("white-space","nowrap"),this.$layer.css("width",this.$layer.outerWidth(!0))),this.$layer.css({marginLeft:"auto",marginRight:"auto",left:this.horizontalPosition,right:0})):this.$layer.css(this.horizontalProperty,this.horizontalPosition);"center"===this.verticalProperty?(this.$layer.is("img")===!1&&("undefined"==typeof n||"undefined"!=typeof n&&-1===n.indexOf("height"))&&(this.$layer.css("white-space","nowrap"),this.$layer.css("height",this.$layer.outerHeight(!0))),this.$layer.css({marginTop:"auto",marginBottom:"auto",top:this.verticalPosition,bottom:0})):this.$layer.css(this.verticalProperty,this.verticalPosition)},scale:function(n){if(!this.$layer.hasClass("sp-no-scale")&&(this.scaleRatio=n,this.styled!==!1)){var i="center"===this.horizontalProperty?"left":this.horizontalProperty,r="center"===this.verticalProperty?"top":this.verticalProperty,t={};t[this.vendorPrefix+"transform-origin"]=this.horizontalProperty+" "+this.verticalProperty;t[this.vendorPrefix+"transform"]="scale("+this.scaleRatio+")";"string"!=typeof this.horizontalPosition&&(t[i]=this.horizontalPosition*this.scaleRatio);"string"!=typeof this.verticalPosition&&(t[r]=this.verticalPosition*this.scaleRatio);"string"==typeof this.data.width&&-1!==this.data.width.indexOf("%")&&(t.width=(parseInt(this.data.width,10)/this.scaleRatio).toString()+"%");"string"==typeof this.data.height&&-1!==this.data.height.indexOf("%")&&(t.height=(parseInt(this.data.height,10)/this.scaleRatio).toString()+"%");this.$layer.css(t)}},show:function(n){if(this.visible!==!0){this.visible=!0;this.styled===!1&&this._setStyle();var t=this,u="undefined"!=typeof this.data.showOffset?this.data.showOffset:50,e="undefined"!=typeof this.data.showDuration?this.data.showDuration/1e3:.4,s="undefined"!=typeof this.data.showDelay?this.data.showDelay:10,f="undefined"!=typeof t.data.stayDuration?parseInt(t.data.stayDuration,10):-1;if("javascript"===this.supportedAnimation)this.$layer.stop().delay(s).css({opacity:0,visibility:"visible"}).animate({opacity:1},1e3*e,function(){-1!==f&&(t.stayTimer=setTimeout(function(){t.hide();t.stayTimer=null},f));"undefined"!=typeof n&&n()});else{var o={opacity:0,visibility:"visible"},r={opacity:1},i="";o[this.vendorPrefix+"transform"]="scale("+this.scaleRatio+")";r[this.vendorPrefix+"transform"]="scale("+this.scaleRatio+")";r[this.vendorPrefix+"transition"]="opacity "+e+"s";"undefined"!=typeof this.data.showTransition&&("left"===this.data.showTransition?i=u+"px, 0":"right"===this.data.showTransition?i="-"+u+"px, 0":"up"===this.data.showTransition?i="0, "+u+"px":"down"===this.data.showTransition&&(i="0, -"+u+"px"),o[this.vendorPrefix+"transform"]+="css-3d"===this.supportedAnimation?" translate3d("+i+", 0)":" translate("+i+")",r[this.vendorPrefix+"transform"]+="css-3d"===this.supportedAnimation?" translate3d(0, 0, 0)":" translate(0, 0)",r[this.vendorPrefix+"transition"]+=", "+this.vendorPrefix+"transform "+e+"s");this.$layer.on(this.transitionEvent,function(i){i.target===i.currentTarget&&(t.$layer.off(t.transitionEvent).css(t.vendorPrefix+"transition",""),-1!==f&&(t.stayTimer=setTimeout(function(){t.hide();t.stayTimer=null},f)),"undefined"!=typeof n&&n())});this.$layer.css(o);setTimeout(function(){t.$layer.css(r)},s)}}},hide:function(n){var i,u;if(this.visible!==!1){var r=this,f="undefined"!=typeof this.data.hideOffset?this.data.hideOffset:50,e="undefined"!=typeof this.data.hideDuration?this.data.hideDuration/1e3:.4,o="undefined"!=typeof this.data.hideDelay?this.data.hideDelay:10;(this.visible=!1,null!==this.stayTimer&&clearTimeout(this.stayTimer),"javascript"===this.supportedAnimation)?this.$layer.stop().delay(o).animate({opacity:0},1e3*e,function(){t(this).css("visibility","hidden");"undefined"!=typeof n&&n()}):(i="",u={opacity:0},u[this.vendorPrefix+"transform"]="scale("+this.scaleRatio+")",u[this.vendorPrefix+"transition"]="opacity "+e+"s","undefined"!=typeof this.data.hideTransition&&("left"===this.data.hideTransition?i="-"+f+"px, 0":"right"===this.data.hideTransition?i=f+"px, 0":"up"===this.data.hideTransition?i="0, -"+f+"px":"down"===this.data.hideTransition&&(i="0, "+f+"px"),u[this.vendorPrefix+"transform"]+="css-3d"===this.supportedAnimation?" translate3d("+i+", 0)":" translate("+i+")",u[this.vendorPrefix+"transition"]+=", "+this.vendorPrefix+"transform "+e+"s"),this.$layer.on(this.transitionEvent,function(t){t.target===t.currentTarget&&(r.$layer.off(r.transitionEvent).css(r.vendorPrefix+"transition",""),r.visible===!1&&r.$layer.css("visibility","hidden"),"undefined"!=typeof n&&n())}),setTimeout(function(){r.$layer.css(u)},o))}},isVisible:function(){return this.visible===!1||this.$layer.is(":hidden")?!1:!0},destroy:function(){this.$layer.removeAttr("style");this.$layer.removeAttr("data-layer-init")}};t.SliderPro.addModule("Layers",u)}(window,jQuery),function(n,t){"use strict";var i="Fade."+t.SliderPro.namespace,r={fadeGotoSlideReference:null,initFade:function(){this.on("update."+i,t.proxy(this._fadeOnUpdate,this))},_fadeOnUpdate:function(){this.settings.fade===!0&&(this.fadeGotoSlideReference=this.gotoSlide,this.gotoSlide=this._fadeGotoSlide)},_fadeGotoSlide:function(n){if(n!==this.selectedSlideIndex)if(this.$slider.hasClass("sp-swiping"))this.fadeGotoSlideReference(n);else{var r,u,i=this,f=n;t.each(this.slides,function(n,t){var o=t.getIndex(),e=t.$slide;o===f?(e.css({opacity:0,left:0,top:0,"z-index":20,visibility:"visible"}),r=e):o===i.selectedSlideIndex?(e.css({opacity:1,left:0,top:0,"z-index":10,visibility:"visible"}),u=e):e.css({opacity:1,visibility:"hidden","z-index":""})});this.previousSlideIndex=this.selectedSlideIndex;this.selectedSlideIndex=n;this.$slides.find(".sp-selected").removeClass("sp-selected");this.$slides.find(".sp-slide").eq(this.selectedSlideIndex).addClass("sp-selected");i.settings.loop===!0&&i._updateSlidesOrder();this._moveTo(0,!0);this._fadeSlideTo(r,1,function(){var r=!0;t.each(i.slides,function(n,t){"undefined"!=typeof t.$slide.attr("data-transitioning")&&(r=!1)});r===!0&&(t.each(i.slides,function(n,t){var i=t.$slide;i.css({visibility:"",opacity:"","z-index":""})}),i._resetSlidesPosition());i.trigger({type:"gotoSlideComplete",index:n,previousIndex:i.previousSlideIndex});t.isFunction(i.settings.gotoSlideComplete)&&i.settings.gotoSlideComplete.call(i,{type:"gotoSlideComplete",index:n,previousIndex:i.previousSlideIndex})});this.settings.fadeOutPreviousSlide===!0&&this._fadeSlideTo(u,0);this.settings.autoHeight===!0&&this._resizeHeight();this.trigger({type:"gotoSlide",index:n,previousIndex:this.previousSlideIndex});t.isFunction(this.settings.gotoSlide)&&this.settings.gotoSlide.call(this,{type:"gotoSlide",index:n,previousIndex:this.previousSlideIndex})}},_fadeSlideTo:function(n,t,i){var r=this;1===t&&n.attr("data-transitioning",!0);"css-3d"===this.supportedAnimation||"css-2d"===this.supportedAnimation?(setTimeout(function(){var i={opacity:t};i[r.vendorPrefix+"transition"]="opacity "+r.settings.fadeDuration/1e3+"s";n.css(i)},100),n.on(this.transitionEvent,function(t){t.target===t.currentTarget&&(n.off(r.transitionEvent),n.css(r.vendorPrefix+"transition",""),n.removeAttr("data-transitioning"),"function"==typeof i&&i())})):n.stop().animate({opacity:t},this.settings.fadeDuration,function(){n.removeAttr("data-transitioning");"function"==typeof i&&i()})},destroyFade:function(){this.off("update."+i);null!==this.fadeGotoSlideReference&&(this.gotoSlide=this.fadeGotoSlideReference)},fadeDefaults:{fade:!1,fadeOutPreviousSlide:!0,fadeDuration:500}};t.SliderPro.addModule("Fade",r)}(window,jQuery),function(n,t){"use strict";var i="TouchSwipe."+t.SliderPro.namespace,r={touchStartPoint:{x:0,y:0},touchEndPoint:{x:0,y:0},touchDistance:{x:0,y:0},touchStartPosition:0,isTouchMoving:!1,touchSwipeEvents:{startEvent:"",moveEvent:"",endEvent:""},initTouchSwipe:function(){this.settings.touchSwipe!==!1&&(this.touchSwipeEvents.startEvent="touchstart."+i+" mousedown."+i,this.touchSwipeEvents.moveEvent="touchmove."+i+" mousemove."+i,this.touchSwipeEvents.endEvent="touchend."+this.uniqueId+"."+i+" mouseup."+this.uniqueId+"."+i,this.$slidesMask.on(this.touchSwipeEvents.startEvent,t.proxy(this._onTouchStart,this)),this.$slidesMask.on("dragstart."+i,function(n){n.preventDefault()}),this.$slidesMask.addClass("sp-grab"))},_onTouchStart:function(n){if(!(t(n.target).closest(".sp-selectable").length>=1)){var r="undefined"!=typeof n.originalEvent.touches?n.originalEvent.touches[0]:n.originalEvent;"undefined"==typeof n.originalEvent.touches&&n.preventDefault();t(n.target).parents(".sp-slide").find("a").one("click."+i,function(n){n.preventDefault()});this.touchStartPoint.x=r.pageX||r.clientX;this.touchStartPoint.y=r.pageY||r.clientY;this.touchStartPosition=this.slidesPosition;this.touchDistance.x=this.touchDistance.y=0;this.$slides.hasClass("sp-animated")&&(this.isTouchMoving=!0,this._stopMovement(),this.touchStartPosition=this.slidesPosition);this.$slidesMask.on(this.touchSwipeEvents.moveEvent,t.proxy(this._onTouchMove,this));t(document).on(this.touchSwipeEvents.endEvent,t.proxy(this._onTouchEnd,this));this.$slidesMask.removeClass("sp-grab").addClass("sp-grabbing");this.$slider.addClass("sp-swiping")}},_onTouchMove:function(n){var i="undefined"!=typeof n.originalEvent.touches?n.originalEvent.touches[0]:n.originalEvent,t,r;this.isTouchMoving=!0;this.touchEndPoint.x=i.pageX||i.clientX;this.touchEndPoint.y=i.pageY||i.clientY;this.touchDistance.x=this.touchEndPoint.x-this.touchStartPoint.x;this.touchDistance.y=this.touchEndPoint.y-this.touchStartPoint.y;t="horizontal"===this.settings.orientation?this.touchDistance.x:this.touchDistance.y;r="horizontal"===this.settings.orientation?this.touchDistance.y:this.touchDistance.x;Math.abs(t)>Math.abs(r)&&(n.preventDefault(),this.settings.loop===!1&&(this.slidesPosition>this.touchStartPosition&&0===this.selectedSlideIndex||this.slidesPosition<this.touchStartPosition&&this.selectedSlideIndex===this.getTotalSlides()-1)&&(t=.2*t),this._moveTo(this.touchStartPosition+t,!0))},_onTouchEnd:function(n){var s=this,e="horizontal"===this.settings.orientation?this.touchDistance.x:this.touchDistance.y,o,f,r,u;(this.$slidesMask.off(this.touchSwipeEvents.moveEvent),t(document).off(this.touchSwipeEvents.endEvent),this.$slidesMask.removeClass("sp-grabbing").addClass("sp-grab"),(this.isTouchMoving===!1||this.isTouchMoving===!0&&Math.abs(this.touchDistance.x)<10&&Math.abs(this.touchDistance.y)<10)&&(t(n.target).parents(".sp-slide").find("a").off("click."+i),this.$slider.removeClass("sp-swiping")),setTimeout(function(){s.$slider.removeClass("sp-swiping")},1),this.isTouchMoving!==!1)&&(this.isTouchMoving=!1,t(n.target).parents(".sp-slide").one("click",function(n){n.preventDefault()}),o=this.settings.centerSelectedSlide===!0?Math.round((parseInt(this.$slidesMask.css(this.sizeProperty),10)-this.getSlideAt(this.selectedSlideIndex).getSize()[this.sizeProperty])/2):0,f=-parseInt(this.$slides.find(".sp-slide").eq(this.selectedSlideIndex).css(this.positionProperty),10)+o,Math.abs(e)<this.settings.touchSwipeThreshold?this._moveTo(f):(r=(this.settings.rightToLeft===!0&&"horizontal"===this.settings.orientation?-1:1)*e/(this.averageSlideSize+this.settings.slideDistance),r=parseInt(r,10)+(r>0?1:-1),u=this.slidesOrder[t.inArray(this.selectedSlideIndex,this.slidesOrder)-r],this.settings.loop===!0?this.gotoSlide(u):"undefined"!=typeof u?this.gotoSlide(u):this._moveTo(f)))},destroyTouchSwipe:function(){this.$slidesMask.off(this.touchSwipeEvents.startEvent);this.$slidesMask.off(this.touchSwipeEvents.moveEvent);this.$slidesMask.off("dragstart."+i);t(document).off(this.touchSwipeEvents.endEvent);this.$slidesMask.removeClass("sp-grab")},touchSwipeDefaults:{touchSwipe:!0,touchSwipeThreshold:50}};t.SliderPro.addModule("TouchSwipe",r)}(window,jQuery),function(n,t){"use strict";var i="Caption."+t.SliderPro.namespace,r={$captionContainer:null,captionContent:"",initCaption:function(){this.on("update."+i,t.proxy(this._captionOnUpdate,this));this.on("gotoSlide."+i,t.proxy(this._updateCaptionContent,this))},_captionOnUpdate:function(){this.$captionContainer=this.$slider.find(".sp-caption-container");this.$slider.find(".sp-caption").length&&0===this.$captionContainer.length&&(this.$captionContainer=t('<div class="sp-caption-container"><\/div>').appendTo(this.$slider),this._updateCaptionContent());this.$slides.find(".sp-caption").each(function(){t(this).css("display","none")})},_updateCaptionContent:function(){var n=this,i=this.$slider.find(".sp-slide").eq(this.selectedSlideIndex).find(".sp-caption"),t=0!==i.length?i.html():"";this.settings.fadeCaption===!0?""!==this.captionContent?(0===parseFloat(this.$captionContainer.css("opacity"),10)&&(this.$captionContainer.css(this.vendorPrefix+"transition",""),this.$captionContainer.css("opacity",1)),this._fadeCaptionTo(0,function(){n.captionContent=t;""!==t?(n.$captionContainer.html(n.captionContent),n._fadeCaptionTo(1)):n.$captionContainer.empty()})):(this.captionContent=t,this.$captionContainer.html(this.captionContent),this.$captionContainer.css("opacity",0),this._fadeCaptionTo(1)):(this.captionContent=t,this.$captionContainer.html(this.captionContent))},_fadeCaptionTo:function(n,t){var i=this;"css-3d"===this.supportedAnimation||"css-2d"===this.supportedAnimation?(setTimeout(function(){var t={opacity:n};t[i.vendorPrefix+"transition"]="opacity "+i.settings.captionFadeDuration/1e3+"s";i.$captionContainer.css(t)},1),this.$captionContainer.on(this.transitionEvent,function(n){n.target===n.currentTarget&&(i.$captionContainer.off(i.transitionEvent),i.$captionContainer.css(i.vendorPrefix+"transition",""),"function"==typeof t&&t())})):this.$captionContainer.stop().animate({opacity:n},this.settings.captionFadeDuration,function(){"function"==typeof t&&t()})},destroyCaption:function(){this.off("update."+i);this.off("gotoSlide."+i);this.$captionContainer.remove();this.$slider.find(".sp-caption").each(function(){t(this).css("display","")})},captionDefaults:{fadeCaption:!0,captionFadeDuration:500}};t.SliderPro.addModule("Caption",r)}(window,jQuery),function(n,t){"use strict";var i="DeepLinking."+t.SliderPro.namespace,r={initDeepLinking:function(){var r=this;this.on("init."+i,function(){r._gotoHash(n.location.hash)});this.on("gotoSlide."+i,function(t){if(r.settings.updateHash===!0){var i=r.$slider.find(".sp-slide").eq(t.index).attr("id");"undefined"==typeof i&&(i=t.index);n.location.hash=r.$slider.attr("id")+"/"+i}});t(n).on("hashchange."+this.uniqueId+"."+i,function(){r._gotoHash(n.location.hash)})},_parseHash:function(n){if(""!==n){n=n.substring(1);var r=n.split("/"),t=r.pop(),i=n.slice(0,-t.toString().length-1);if(this.$slider.attr("id")===i)return{sliderID:i,slideId:t}}return!1},_gotoHash:function(n){var u=this._parseHash(n),r,t,i;u!==!1&&(r=u.slideId,t=parseInt(r,10),isNaN(t)?(i=this.$slider.find(".sp-slide#"+r).index(),-1!==i&&i!==this.selectedSlideIndex&&this.gotoSlide(i)):t!==this.selectedSlideIndex&&this.gotoSlide(t))},destroyDeepLinking:function(){this.off("init."+i);this.off("gotoSlide."+i);t(n).off("hashchange."+this.uniqueId+"."+i)},deepLinkingDefaults:{updateHash:!1}};t.SliderPro.addModule("DeepLinking",r)}(window,jQuery),function(n,t){"use strict";var i="Autoplay."+t.SliderPro.namespace,r={autoplayTimer:null,isTimerRunning:!1,isTimerPaused:!1,initAutoplay:function(){this.on("update."+i,t.proxy(this._autoplayOnUpdate,this))},_autoplayOnUpdate:function(){this.settings.autoplay===!0?(this.on("gotoSlide."+i,t.proxy(this._autoplayOnGotoSlide,this)),this.on("mouseenter."+i,t.proxy(this._autoplayOnMouseEnter,this)),this.on("mouseleave."+i,t.proxy(this._autoplayOnMouseLeave,this)),this.startAutoplay()):(this.off("gotoSlide."+i),this.off("mouseenter."+i),this.off("mouseleave."+i),this.stopAutoplay())},_autoplayOnGotoSlide:function(){this.isTimerRunning===!0&&this.stopAutoplay();this.isTimerPaused===!1&&this.startAutoplay()},_autoplayOnMouseEnter:function(){this.isTimerRunning&&("pause"===this.settings.autoplayOnHover||"stop"===this.settings.autoplayOnHover)&&(this.stopAutoplay(),this.isTimerPaused=!0)},_autoplayOnMouseLeave:function(){this.settings.autoplay===!0&&this.isTimerRunning===!1&&"stop"!==this.settings.autoplayOnHover&&(this.startAutoplay(),this.isTimerPaused=!1)},startAutoplay:function(){var n=this;this.isTimerRunning=!0;this.autoplayTimer=setTimeout(function(){"normal"===n.settings.autoplayDirection?n.nextSlide():"backwards"===n.settings.autoplayDirection&&n.previousSlide()},this.settings.autoplayDelay)},stopAutoplay:function(){this.isTimerRunning=!1;this.isTimerPaused=!1;clearTimeout(this.autoplayTimer)},destroyAutoplay:function(){clearTimeout(this.autoplayTimer);this.off("update."+i);this.off("gotoSlide."+i);this.off("mouseenter."+i);this.off("mouseleave."+i)},autoplayDefaults:{autoplay:!0,autoplayDelay:5e3,autoplayDirection:"normal",autoplayOnHover:"pause"}};t.SliderPro.addModule("Autoplay",r)}(window,jQuery),function(n,t){"use strict";var i="Keyboard."+t.SliderPro.namespace,r={initKeyboard:function(){var n=this,r=!1;this.settings.keyboard!==!1&&(this.$slider.on("focus."+i,function(){r=!0}),this.$slider.on("blur."+i,function(){r=!1}),t(document).on("keydown."+this.uniqueId+"."+i,function(t){if(n.settings.keyboardOnlyOnFocus!==!0||r!==!1)if(37===t.which)n.previousSlide();else if(39===t.which)n.nextSlide();else if(13===t.which){var i=n.$slider.find(".sp-slide").eq(n.selectedSlideIndex).find(".sp-image-container a");0!==i.length&&i[0].click()}}))},destroyKeyboard:function(){this.$slider.off("focus."+i);this.$slider.off("blur."+i);t(document).off("keydown."+this.uniqueId+"."+i)},keyboardDefaults:{keyboard:!0,keyboardOnlyOnFocus:!1}};t.SliderPro.addModule("Keyboard",r)}(window,jQuery),function(n,t){"use strict";var i="FullScreen."+t.SliderPro.namespace,r={isFullScreen:!1,$fullScreenButton:null,sizeBeforeFullScreen:{},initFullScreen:function(){(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)&&this.on("update."+i,t.proxy(this._fullScreenOnUpdate,this))},_fullScreenOnUpdate:function(){this.settings.fullScreen===!0&&null===this.$fullScreenButton?this._addFullScreen():this.settings.fullScreen===!1&&null!==this.$fullScreenButton&&this._removeFullScreen();this.settings.fullScreen===!0&&(this.settings.fadeFullScreen===!0?this.$fullScreenButton.addClass("sp-fade-full-screen"):this.settings.fadeFullScreen===!1&&this.$fullScreenButton.removeClass("sp-fade-full-screen"))},_addFullScreen:function(){this.$fullScreenButton=t('<div class="sp-full-screen-button"><\/div>').appendTo(this.$slider);this.$fullScreenButton.on("click."+i,t.proxy(this._onFullScreenButtonClick,this));document.addEventListener("fullscreenchange",t.proxy(this._onFullScreenChange,this));document.addEventListener("mozfullscreenchange",t.proxy(this._onFullScreenChange,this));document.addEventListener("webkitfullscreenchange",t.proxy(this._onFullScreenChange,this));document.addEventListener("MSFullscreenChange",t.proxy(this._onFullScreenChange,this))},_removeFullScreen:function(){null!==this.$fullScreenButton&&(this.$fullScreenButton.off("click."+i),this.$fullScreenButton.remove(),this.$fullScreenButton=null,document.removeEventListener("fullscreenchange",this._onFullScreenChange),document.removeEventListener("mozfullscreenchange",this._onFullScreenChange),document.removeEventListener("webkitfullscreenchange",this._onFullScreenChange),document.removeEventListener("MSFullscreenChange",this._onFullScreenChange))},_onFullScreenButtonClick:function(){this.isFullScreen===!1?this.instance.requestFullScreen?this.instance.requestFullScreen():this.instance.mozRequestFullScreen?this.instance.mozRequestFullScreen():this.instance.webkitRequestFullScreen?this.instance.webkitRequestFullScreen():this.instance.msRequestFullscreen&&this.instance.msRequestFullscreen():document.exitFullScreen?document.exitFullScreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen?document.webkitCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen()},_onFullScreenChange:function(){this.isFullScreen=document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement?!0:!1;this.isFullScreen===!0?(this.sizeBeforeFullScreen={forceSize:this.settings.forceSize,autoHeight:this.settings.autoHeight},this.$slider.addClass("sp-full-screen"),this.settings.forceSize="fullWindow",this.settings.autoHeight=!1):(this.$slider.css("margin",""),this.$slider.removeClass("sp-full-screen"),this.settings.forceSize=this.sizeBeforeFullScreen.forceSize,this.settings.autoHeight=this.sizeBeforeFullScreen.autoHeight);this.resize()},destroyFullScreen:function(){this.off("update."+i);this._removeFullScreen()},fullScreenDefaults:{fullScreen:!1,fadeFullScreen:!0}};t.SliderPro.addModule("FullScreen",r)}(window,jQuery),function(n,t){"use strict";var i="Buttons."+t.SliderPro.namespace,r={$buttons:null,initButtons:function(){this.on("update."+i,t.proxy(this._buttonsOnUpdate,this))},_buttonsOnUpdate:function(){this.$buttons=this.$slider.find(".sp-buttons");this.settings.buttons===!0&&this.getTotalSlides()>1&&0===this.$buttons.length?this._createButtons():this.settings.buttons===!0&&this.getTotalSlides()!==this.$buttons.find(".sp-button").length&&0!==this.$buttons.length?this._adjustButtons():(this.settings.buttons===!1||this.getTotalSlides()<=1&&0!==this.$buttons.length)&&this._removeButtons()},_createButtons:function(){var n=this,r;for(this.$buttons=t('<div class="sp-buttons"><\/div>').appendTo(this.$slider),r=0;r<this.getTotalSlides();r++)t('<div class="sp-button"><\/div>').appendTo(this.$buttons);this.$buttons.on("click."+i,".sp-button",function(){n.gotoSlide(t(this).index())});this.$buttons.find(".sp-button").eq(this.selectedSlideIndex).addClass("sp-selected-button");this.on("gotoSlide."+i,function(t){n.$buttons.find(".sp-selected-button").removeClass("sp-selected-button");n.$buttons.find(".sp-button").eq(t.index).addClass("sp-selected-button")});this.$slider.addClass("sp-has-buttons")},_adjustButtons:function(){this.$buttons.empty();for(var n=0;n<this.getTotalSlides();n++)t('<div class="sp-button"><\/div>').appendTo(this.$buttons);this.$buttons.find(".sp-selected-button").removeClass("sp-selected-button");this.$buttons.find(".sp-button").eq(this.selectedSlideIndex).addClass("sp-selected-button")},_removeButtons:function(){this.$buttons.off("click."+i,".sp-button");this.off("gotoSlide."+i);this.$buttons.remove();this.$slider.removeClass("sp-has-buttons")},destroyButtons:function(){this._removeButtons();this.off("update."+i)},buttonsDefaults:{buttons:!0}};t.SliderPro.addModule("Buttons",r)}(window,jQuery),function(n,t){"use strict";var i="Arrows."+t.SliderPro.namespace,r={$arrows:null,$previousArrow:null,$nextArrow:null,initArrows:function(){this.on("update."+i,t.proxy(this._arrowsOnUpdate,this));this.on("gotoSlide."+i,t.proxy(this._checkArrowsVisibility,this))},_arrowsOnUpdate:function(){var n=this;this.settings.arrows===!0&&null===this.$arrows?(this.$arrows=t('<div class="sp-arrows"><\/div>').appendTo(this.$slidesContainer),this.$previousArrow=t('<div class="sp-arrow sp-previous-arrow"><\/div>').appendTo(this.$arrows),this.$nextArrow=t('<div class="sp-arrow sp-next-arrow"><\/div>').appendTo(this.$arrows),this.$previousArrow.on("click."+i,function(){n.previousSlide()}),this.$nextArrow.on("click."+i,function(){n.nextSlide()}),this._checkArrowsVisibility()):this.settings.arrows===!1&&null!==this.$arrows&&this._removeArrows();this.settings.arrows===!0&&(this.settings.fadeArrows===!0?this.$arrows.addClass("sp-fade-arrows"):this.settings.fadeArrows===!1&&this.$arrows.removeClass("sp-fade-arrows"))},_checkArrowsVisibility:function(){this.settings.arrows!==!1&&this.settings.loop!==!0&&(0===this.selectedSlideIndex?this.$previousArrow.css("display","none"):this.$previousArrow.css("display","block"),this.selectedSlideIndex===this.getTotalSlides()-1?this.$nextArrow.css("display","none"):this.$nextArrow.css("display","block"))},_removeArrows:function(){null!==this.$arrows&&(this.$previousArrow.off("click."+i),this.$nextArrow.off("click."+i),this.$arrows.remove(),this.$arrows=null)},destroyArrows:function(){this._removeArrows();this.off("update."+i);this.off("gotoSlide."+i)},arrowsDefaults:{arrows:!1,fadeArrows:!0}};t.SliderPro.addModule("Arrows",r)}(window,jQuery),function(n,t){"use strict";var i="ThumbnailTouchSwipe."+t.SliderPro.namespace,r={thumbnailTouchStartPoint:{x:0,y:0},thumbnailTouchEndPoint:{x:0,y:0},thumbnailTouchDistance:{x:0,y:0},thumbnailTouchStartPosition:0,isThumbnailTouchMoving:!1,isThumbnailTouchSwipe:!1,thumbnailTouchSwipeEvents:{startEvent:"",moveEvent:"",endEvent:""},initThumbnailTouchSwipe:function(){this.on("update."+i,t.proxy(this._thumbnailTouchSwipeOnUpdate,this))},_thumbnailTouchSwipeOnUpdate:function(){this.isThumbnailScroller!==!1&&(this.settings.thumbnailTouchSwipe===!0&&this.isThumbnailTouchSwipe===!1&&(this.isThumbnailTouchSwipe=!0,this.thumbnailTouchSwipeEvents.startEvent="touchstart."+i+" mousedown."+i,this.thumbnailTouchSwipeEvents.moveEvent="touchmove."+i+" mousemove."+i,this.thumbnailTouchSwipeEvents.endEvent="touchend."+this.uniqueId+"."+i+" mouseup."+this.uniqueId+"."+i,this.$thumbnails.on(this.thumbnailTouchSwipeEvents.startEvent,t.proxy(this._onThumbnailTouchStart,this)),this.$thumbnails.on("dragstart."+i,function(n){n.preventDefault()}),this.$thumbnails.addClass("sp-grab")),t.each(this.thumbnails,function(n,t){t.off("thumbnailClick")}))},_onThumbnailTouchStart:function(n){if(!(t(n.target).closest(".sp-selectable").length>=1)){var r="undefined"!=typeof n.originalEvent.touches?n.originalEvent.touches[0]:n.originalEvent;"undefined"==typeof n.originalEvent.touches&&n.preventDefault();t(n.target).parents(".sp-thumbnail-container").find("a").one("click."+i,function(n){n.preventDefault()});this.thumbnailTouchStartPoint.x=r.pageX||r.clientX;this.thumbnailTouchStartPoint.y=r.pageY||r.clientY;this.thumbnailTouchStartPosition=this.thumbnailsPosition;this.thumbnailTouchDistance.x=this.thumbnailTouchDistance.y=0;this.$thumbnails.hasClass("sp-animated")&&(this.isThumbnailTouchMoving=!0,this._stopThumbnailsMovement(),this.thumbnailTouchStartPosition=this.thumbnailsPosition);this.$thumbnails.on(this.thumbnailTouchSwipeEvents.moveEvent,t.proxy(this._onThumbnailTouchMove,this));t(document).on(this.thumbnailTouchSwipeEvents.endEvent,t.proxy(this._onThumbnailTouchEnd,this));this.$thumbnails.removeClass("sp-grab").addClass("sp-grabbing");this.$thumbnailsContainer.addClass("sp-swiping")}},_onThumbnailTouchMove:function(n){var i="undefined"!=typeof n.originalEvent.touches?n.originalEvent.touches[0]:n.originalEvent,t,f,r,u;this.isThumbnailTouchMoving=!0;this.thumbnailTouchEndPoint.x=i.pageX||i.clientX;this.thumbnailTouchEndPoint.y=i.pageY||i.clientY;this.thumbnailTouchDistance.x=this.thumbnailTouchEndPoint.x-this.thumbnailTouchStartPoint.x;this.thumbnailTouchDistance.y=this.thumbnailTouchEndPoint.y-this.thumbnailTouchStartPoint.y;t="horizontal"===this.thumbnailsOrientation?this.thumbnailTouchDistance.x:this.thumbnailTouchDistance.y;f="horizontal"===this.thumbnailsOrientation?this.thumbnailTouchDistance.y:this.thumbnailTouchDistance.x;Math.abs(t)>Math.abs(f)&&((n.preventDefault(),this.thumbnailsPosition>=0)?(r=-this.thumbnailTouchStartPosition,t=r+.2*(t-r)):this.thumbnailsPosition<=-this.thumbnailsSize+this.thumbnailsContainerSize&&(u=this.thumbnailsSize-this.thumbnailsContainerSize+this.thumbnailTouchStartPosition,t=-u+.2*(t+u)),this._moveThumbnailsTo(this.thumbnailTouchStartPosition+t,!0))},_onThumbnailTouchEnd:function(n){var f=this,u,r;if("horizontal"===this.thumbnailsOrientation?this.thumbnailTouchDistance.x:this.thumbnailTouchDistance.y,this.$thumbnails.off(this.thumbnailTouchSwipeEvents.moveEvent),t(document).off(this.thumbnailTouchSwipeEvents.endEvent),this.$thumbnails.removeClass("sp-grabbing").addClass("sp-grab"),this.isThumbnailTouchMoving===!1||this.isThumbnailTouchMoving===!0&&Math.abs(this.thumbnailTouchDistance.x)<10&&Math.abs(this.thumbnailTouchDistance.y)<10)return u=t(n.target).hasClass("sp-thumbnail-container")?t(n.target):t(n.target).parents(".sp-thumbnail-container"),r=u.index(),void(0!==t(n.target).parents("a").length?(t(n.target).parents("a").off("click."+i),this.$thumbnailsContainer.removeClass("sp-swiping")):r!==this.selectedThumbnailIndex&&-1!==r&&this.gotoSlide(r));this.isThumbnailTouchMoving=!1;t(n.target).parents(".sp-thumbnail").one("click",function(n){n.preventDefault()});setTimeout(function(){f.$thumbnailsContainer.removeClass("sp-swiping")},1);this.thumbnailsPosition>0?this._moveThumbnailsTo(0):this.thumbnailsPosition<this.thumbnailsContainerSize-this.thumbnailsSize&&this._moveThumbnailsTo(this.thumbnailsContainerSize-this.thumbnailsSize);this.trigger({type:"thumbnailsMoveComplete"});t.isFunction(this.settings.thumbnailsMoveComplete)&&this.settings.thumbnailsMoveComplete.call(this,{type:"thumbnailsMoveComplete"})},destroyThumbnailTouchSwipe:function(){this.off("update."+i);this.isThumbnailScroller!==!1&&(this.$thumbnails.off(this.thumbnailTouchSwipeEvents.startEvent),this.$thumbnails.off(this.thumbnailTouchSwipeEvents.moveEvent),this.$thumbnails.off("dragstart."+i),t(document).off(this.thumbnailTouchSwipeEvents.endEvent),this.$thumbnails.removeClass("sp-grab"))},thumbnailTouchSwipeDefaults:{thumbnailTouchSwipe:!0}};t.SliderPro.addModule("ThumbnailTouchSwipe",r)}(window,jQuery),function(n,t){"use strict";var i="ThumbnailArrows."+t.SliderPro.namespace,r={$thumbnailArrows:null,$previousThumbnailArrow:null,$nextThumbnailArrow:null,initThumbnailArrows:function(){var n=this;this.on("update."+i,t.proxy(this._thumbnailArrowsOnUpdate,this));this.on("sliderResize."+i+" thumbnailsMoveComplete."+i,function(){n.isThumbnailScroller===!0&&n.settings.thumbnailArrows===!0&&n._checkThumbnailArrowsVisibility()})},_thumbnailArrowsOnUpdate:function(){var n=this;this.isThumbnailScroller!==!1&&(this.settings.thumbnailArrows===!0&&null===this.$thumbnailArrows?(this.$thumbnailArrows=t('<div class="sp-thumbnail-arrows"><\/div>').appendTo(this.$thumbnailsContainer),this.$previousThumbnailArrow=t('<div class="sp-thumbnail-arrow sp-previous-thumbnail-arrow"><\/div>').appendTo(this.$thumbnailArrows),this.$nextThumbnailArrow=t('<div class="sp-thumbnail-arrow sp-next-thumbnail-arrow"><\/div>').appendTo(this.$thumbnailArrows),this.$previousThumbnailArrow.on("click."+i,function(){var t=Math.min(0,n.thumbnailsPosition+n.thumbnailsContainerSize);n._moveThumbnailsTo(t)}),this.$nextThumbnailArrow.on("click."+i,function(){var t=Math.max(n.thumbnailsContainerSize-n.thumbnailsSize,n.thumbnailsPosition-n.thumbnailsContainerSize);n._moveThumbnailsTo(t)})):this.settings.thumbnailArrows===!1&&null!==this.$thumbnailArrows&&this._removeThumbnailArrows(),this.settings.thumbnailArrows===!0&&(this.settings.fadeThumbnailArrows===!0?this.$thumbnailArrows.addClass("sp-fade-thumbnail-arrows"):this.settings.fadeThumbnailArrows===!1&&this.$thumbnailArrows.removeClass("sp-fade-thumbnail-arrows"),this._checkThumbnailArrowsVisibility()))},_checkThumbnailArrowsVisibility:function(){0===this.thumbnailsPosition?this.$previousThumbnailArrow.css("display","none"):this.$previousThumbnailArrow.css("display","block");this.thumbnailsPosition===this.thumbnailsContainerSize-this.thumbnailsSize?this.$nextThumbnailArrow.css("display","none"):this.$nextThumbnailArrow.css("display","block")},_removeThumbnailArrows:function(){null!==this.$thumbnailArrows&&(this.$previousThumbnailArrow.off("click."+i),this.$nextThumbnailArrow.off("click."+i),this.$thumbnailArrows.remove(),this.$thumbnailArrows=null)},destroyThumbnailArrows:function(){this._removeThumbnailArrows();this.off("update."+i);this.off("sliderResize."+i);this.off("thumbnailsMoveComplete."+i)},thumbnailArrowsDefaults:{thumbnailArrows:!1,fadeThumbnailArrows:!0}};t.SliderPro.addModule("ThumbnailArrows",r)}(window,jQuery),function(n,t){"use strict";var i="Video."+t.SliderPro.namespace,r={firstInit:!1,initVideo:function(){this.on("update."+i,t.proxy(this._videoOnUpdate,this));this.on("gotoSlideComplete."+i,t.proxy(this._videoOnGotoSlideComplete,this))},_videoOnUpdate:function(){var n=this;this.$slider.find(".sp-video").not("a, [data-video-init]").each(function(){var i=t(this);n._initVideo(i)});this.$slider.find("a.sp-video").not("[data-video-preinit]").each(function(){var i=t(this);n._preinitVideo(i)});this.firstInit===!1&&(this.firstInit=!0,this._videoOnGotoSlideComplete({index:this.selectedSlideIndex,previousIndex:-1}))},_initVideo:function(n){var r=this;n.attr("data-video-init",!0).videoController();n.on("videoPlay."+i,function(){"stopAutoplay"===r.settings.playVideoAction&&"undefined"!=typeof r.stopAutoplay&&(r.stopAutoplay(),r.settings.autoplay=!1);var i={type:"videoPlay",video:n};r.trigger(i);t.isFunction(r.settings.videoPlay)&&r.settings.videoPlay.call(r,i)});n.on("videoPause."+i,function(){"startAutoplay"===r.settings.pauseVideoAction&&"undefined"!=typeof r.startAutoplay&&(r.startAutoplay(),r.settings.autoplay=!0);var i={type:"videoPause",video:n};r.trigger(i);t.isFunction(r.settings.videoPause)&&r.settings.videoPause.call(r,i)});n.on("videoEnded."+i,function(){"startAutoplay"===r.settings.endVideoAction&&"undefined"!=typeof r.startAutoplay?(r.startAutoplay(),r.settings.autoplay=!0):"nextSlide"===r.settings.endVideoAction?r.nextSlide():"replayVideo"===r.settings.endVideoAction&&n.videoController("replay");var i={type:"videoEnd",video:n};r.trigger(i);t.isFunction(r.settings.videoEnd)&&r.settings.videoEnd.call(r,i)})},_preinitVideo:function(n){var r=this;n.attr("data-video-preinit",!0);n.on("click."+i,function(i){if(!r.$slider.hasClass("sp-swiping")){i.preventDefault();var s,e,c,l,o,h,u,f=n.attr("href"),a=n.children("img").attr("width")||n.children("img").width(),v=n.children("img").attr("height")||n.children("img").height();-1!==f.indexOf("youtube")||-1!==f.indexOf("youtu.be")?e="youtube":-1!==f.indexOf("vimeo")&&(e="vimeo");c="youtube"===e?/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/:/http:\/\/(www\.)?vimeo.com\/(\d+)/;l=f.match(c);o=l[2];h="youtube"===e?"//www.youtube.com/embed/"+o+"?enablejsapi=1&wmode=opaque":"//player.vimeo.com/video/"+o+"?api=1";u=f.split("?")[1];"undefined"!=typeof u&&(u=u.split("&"),t.each(u,function(n,t){-1===t.indexOf(o)&&(h+="&"+t)}));s=t("<iframe><\/iframe>").attr({src:h,width:a,height:v,"class":n.attr("class"),frameborder:0,allowfullscreen:"allowfullscreen"}).insertBefore(n);r._initVideo(s);s.videoController("play");n.css("display","none")}})},_videoOnGotoSlideComplete:function(n){var t=this.$slides.find(".sp-slide").eq(n.previousIndex).find(".sp-video[data-video-init]"),r,u;(-1!==n.previousIndex&&0!==t.length&&("stopVideo"===this.settings.leaveVideoAction?t.videoController("stop"):"pauseVideo"===this.settings.leaveVideoAction?t.videoController("pause"):"removeVideo"===this.settings.leaveVideoAction&&(0!==t.siblings("a.sp-video").length?(t.siblings("a.sp-video").css("display",""),t.videoController("destroy"),t.remove()):t.videoController("stop"))),"playVideo"===this.settings.reachVideoAction)&&(r=this.$slides.find(".sp-slide").eq(n.index).find(".sp-video[data-video-init]"),u=this.$slides.find(".sp-slide").eq(n.index).find(".sp-video[data-video-preinit]"),0!==r.length?r.videoController("play"):0!==u.length&&u.trigger("click."+i))},destroyVideo:function(){this.$slider.find(".sp-video[ data-video-preinit ]").each(function(){var n=t(this);n.removeAttr("data-video-preinit");n.off("click."+i)});this.$slider.find(".sp-video[ data-video-init ]").each(function(){var n=t(this);n.removeAttr("data-video-init");n.off("Video");n.videoController("destroy")});this.off("update."+i);this.off("gotoSlideComplete."+i)},videoDefaults:{reachVideoAction:"none",leaveVideoAction:"pauseVideo",playVideoAction:"stopAutoplay",pauseVideoAction:"none",endVideoAction:"none",videoPlay:function(){},videoPause:function(){},videoEnd:function(){}}};t.SliderPro.addModule("Video",r)}(window,jQuery),function(n){"use strict";var s=window.navigator.userAgent.match(/(iPad|iPhone|iPod)/g)?!0:!1,l=function(t,i){this.$video=n(t);this.options=i;this.settings={};this.player=null;this._init()},t,h,i,c,r,u,f,e,o;l.prototype={_init:function(){var r,f;this.settings=n.extend({},this.defaults,this.options);var t=this,i=n.VideoController.players,u=this.$video.attr("id");for(r in i)if("undefined"!=typeof i[r]&&i[r].isType(this.$video)){this.player=new i[r](this.$video);break}null!==this.player&&(f=["ready","start","play","pause","ended"],n.each(f,function(i,r){var f="video"+r.charAt(0).toUpperCase()+r.slice(1);t.player.on(r,function(){t.trigger({type:f,video:u});n.isFunction(t.settings[f])&&t.settings[f].call(t,{type:f,video:u})})}))},play:function(){s===!0&&this.player.isStarted()===!1||"playing"===this.player.getState()||this.player.play()},stop:function(){s===!0&&this.player.isStarted()===!1||"stopped"===this.player.getState()||this.player.stop()},pause:function(){s===!0&&this.player.isStarted()===!1||"paused"===this.player.getState()||this.player.pause()},replay:function(){(s!==!0||this.player.isStarted()!==!1)&&this.player.replay()},on:function(n,t){return this.$video.on(n,t)},off:function(n){return this.$video.off(n)},trigger:function(n){return this.$video.triggerHandler(n)},destroy:function(){this.player.isStarted()===!0&&this.stop();this.player.off("ready");this.player.off("start");this.player.off("play");this.player.off("pause");this.player.off("ended");this.$video.removeData("videoController")},defaults:{videoReady:function(){},videoStart:function(){},videoPlay:function(){},videoPause:function(){},videoEnded:function(){}}};n.VideoController={players:{},addPlayer:function(n,t){this.players[n]=t}};n.fn.videoController=function(t){var i=Array.prototype.slice.call(arguments,1);return this.each(function(){var u,r;"undefined"==typeof n(this).data("videoController")?(u=new l(this,t),n(this).data("videoController",u)):"undefined"!=typeof t&&(r=n(this).data("videoController"),"function"==typeof r[t]?r[t].apply(r,i):n.error(t+" does not exist in videoController."))})};t=function(t){this.$video=t;this.player=null;this.ready=!1;this.started=!1;this.state="";this.events=n({});this._init()};t.prototype={_init:function(){},play:function(){},pause:function(){},stop:function(){},replay:function(){},isType:function(){},isReady:function(){return this.ready},isStarted:function(){return this.started},getState:function(){return this.state},on:function(n,t){return this.events.on(n,t)},off:function(n){return this.events.off(n)},trigger:function(n){return this.events.triggerHandler(n)}};h={youtubeAPIAdded:!1,youtubeVideos:[]};i=function(i){var f,r,u;this.init=!1;f=window.YT&&window.YT.Player;"undefined"!=typeof f?t.call(this,i):(h.youtubeVideos.push({video:i,scope:this}),h.youtubeAPIAdded===!1)&&(h.youtubeAPIAdded=!0,r=document.createElement("script"),r.src="//www.youtube.com/player_api",u=document.getElementsByTagName("script")[0],u.parentNode.insertBefore(r,u),window.onYouTubePlayerAPIReady=function(){n.each(h.youtubeVideos,function(n,i){t.call(i.scope,i.video)})})};i.prototype=new t;i.prototype.constructor=i;n.VideoController.addPlayer("YoutubeVideo",i);i.isType=function(n){if(n.is("iframe")){var t=n.attr("src");if(-1!==t.indexOf("youtube.com")||-1!==t.indexOf("youtu.be"))return!0}return!1};i.prototype._init=function(){this.init=!0;this._setup()};i.prototype._setup=function(){var n=this;this.player=new YT.Player(this.$video[0],{events:{onReady:function(){n.trigger({type:"ready"});n.ready=!0},onStateChange:function(t){switch(t.data){case YT.PlayerState.PLAYING:n.started===!1&&(n.started=!0,n.trigger({type:"start"}));n.state="playing";n.trigger({type:"play"});break;case YT.PlayerState.PAUSED:n.state="paused";n.trigger({type:"pause"});break;case YT.PlayerState.ENDED:n.state="ended";n.trigger({type:"ended"})}}}})};i.prototype.play=function(){var n=this,t;this.ready===!0?this.player.playVideo():t=setInterval(function(){n.ready===!0&&(clearInterval(t),n.player.playVideo())},100)};i.prototype.pause=function(){s===!0?this.stop():this.player.pauseVideo()};i.prototype.stop=function(){this.player.seekTo(1);this.player.stopVideo();this.state="stopped"};i.prototype.replay=function(){this.player.seekTo(1);this.player.playVideo()};i.prototype.on=function(n,i){var r=this,u;this.init===!0?t.prototype.on.call(this,n,i):u=setInterval(function(){r.init===!0&&(clearInterval(u),t.prototype.on.call(r,n,i))},100)};c={vimeoAPIAdded:!1,vimeoVideos:[]};r=function(i){var r,u,f;(this.init=!1,"undefined"!=typeof window.Froogaloop)?t.call(this,i):(c.vimeoVideos.push({video:i,scope:this}),c.vimeoAPIAdded===!1)&&(c.vimeoAPIAdded=!0,r=document.createElement("script"),r.src="//a.vimeocdn.com/js/froogaloop2.min.js",u=document.getElementsByTagName("script")[0],u.parentNode.insertBefore(r,u),f=setInterval(function(){"undefined"!=typeof window.Froogaloop&&(clearInterval(f),n.each(c.vimeoVideos,function(n,i){t.call(i.scope,i.video)}))},100))};r.prototype=new t;r.prototype.constructor=r;n.VideoController.addPlayer("VimeoVideo",r);r.isType=function(n){if(n.is("iframe")){var t=n.attr("src");if(-1!==t.indexOf("vimeo.com"))return!0}return!1};r.prototype._init=function(){this.init=!0;this._setup()};r.prototype._setup=function(){var n=this;this.player=$f(this.$video[0]);this.player.addEvent("ready",function(){n.ready=!0;n.trigger({type:"ready"});n.player.addEvent("play",function(){n.started===!1&&(n.started=!0,n.trigger({type:"start"}));n.state="playing";n.trigger({type:"play"})});n.player.addEvent("pause",function(){n.state="paused";n.trigger({type:"pause"})});n.player.addEvent("finish",function(){n.state="ended";n.trigger({type:"ended"})})})};r.prototype.play=function(){var n=this,t;this.ready===!0?this.player.api("play"):t=setInterval(function(){n.ready===!0&&(clearInterval(t),n.player.api("play"))},100)};r.prototype.pause=function(){this.player.api("pause")};r.prototype.stop=function(){this.player.api("seekTo",0);this.player.api("pause");this.state="stopped"};r.prototype.replay=function(){this.player.api("seekTo",0);this.player.api("play")};r.prototype.on=function(n,i){var r=this,u;this.init===!0?t.prototype.on.call(this,n,i):u=setInterval(function(){r.init===!0&&(clearInterval(u),t.prototype.on.call(r,n,i))},100)};u=function(n){t.call(this,n)};u.prototype=new t;u.prototype.constructor=u;n.VideoController.addPlayer("HTML5Video",u);u.isType=function(n){return n.is("video")&&n.hasClass("video-js")===!1&&n.hasClass("sublime")===!1?!0:!1};u.prototype._init=function(){var n=this,t;this.player=this.$video[0];t=setInterval(function(){4===n.player.readyState&&(clearInterval(t),n.ready=!0,n.trigger({type:"ready"}),n.player.addEventListener("play",function(){n.started===!1&&(n.started=!0,n.trigger({type:"start"}));n.state="playing";n.trigger({type:"play"})}),n.player.addEventListener("pause",function(){n.state="paused";n.trigger({type:"pause"})}),n.player.addEventListener("ended",function(){n.state="ended";n.trigger({type:"ended"})}))},100)};u.prototype.play=function(){var n=this,t;this.ready===!0?this.player.play():t=setInterval(function(){n.ready===!0&&(clearInterval(t),n.player.play())},100)};u.prototype.pause=function(){this.player.pause()};u.prototype.stop=function(){this.player.currentTime=0;this.player.pause();this.state="stopped"};u.prototype.replay=function(){this.player.currentTime=0;this.player.play()};f=function(n){t.call(this,n)};f.prototype=new t;f.prototype.constructor=f;n.VideoController.addPlayer("VideoJSVideo",f);f.isType=function(n){return"undefined"==typeof n.attr("data-videojs-id")&&!n.hasClass("video-js")||"undefined"==typeof videojs?!1:!0};f.prototype._init=function(){var n=this,t=this.$video.hasClass("video-js")?this.$video.attr("id"):this.$video.attr("data-videojs-id");this.player=videojs(t);this.player.ready(function(){n.ready=!0;n.trigger({type:"ready"});n.player.on("play",function(){n.started===!1&&(n.started=!0,n.trigger({type:"start"}));n.state="playing";n.trigger({type:"play"})});n.player.on("pause",function(){n.state="paused";n.trigger({type:"pause"})});n.player.on("ended",function(){n.state="ended";n.trigger({type:"ended"})})})};f.prototype.play=function(){this.player.play()};f.prototype.pause=function(){this.player.pause()};f.prototype.stop=function(){this.player.currentTime(0);this.player.pause();this.state="stopped"};f.prototype.replay=function(){this.player.currentTime(0);this.player.play()};e=function(n){t.call(this,n)};e.prototype=new t;e.prototype.constructor=e;n.VideoController.addPlayer("SublimeVideo",e);e.isType=function(n){return n.hasClass("sublime")&&"undefined"!=typeof sublime?!0:!1};e.prototype._init=function(){var n=this;sublime.ready(function(){n.player=sublime.player(n.$video.attr("id"));n.ready=!0;n.trigger({type:"ready"});n.player.on("play",function(){n.started===!1&&(n.started=!0,n.trigger({type:"start"}));n.state="playing";n.trigger({type:"play"})});n.player.on("pause",function(){n.state="paused";n.trigger({type:"pause"})});n.player.on("stop",function(){n.state="stopped";n.trigger({type:"stop"})});n.player.on("end",function(){n.state="ended";n.trigger({type:"ended"})})})};e.prototype.play=function(){this.player.play()};e.prototype.pause=function(){this.player.pause()};e.prototype.stop=function(){this.player.stop()};e.prototype.replay=function(){this.player.stop();this.player.play()};o=function(n){t.call(this,n)};o.prototype=new t;o.prototype.constructor=o;n.VideoController.addPlayer("JWPlayerVideo",o);o.isType=function(n){return"undefined"==typeof n.attr("data-jwplayer-id")&&!n.hasClass("jwplayer")&&0===n.find("object[data*='jwplayer']").length||"undefined"==typeof jwplayer?!1:!0};o.prototype._init=function(){var t,n=this;this.$video.hasClass("jwplayer")?t=this.$video.attr("id"):"undefined"!=typeof this.$video.attr("data-jwplayer-id")?t=this.$video.attr("data-jwplayer-id"):0!==this.$video.find("object[data*='jwplayer']").length&&(t=this.$video.find("object").attr("id"));this.player=jwplayer(t);this.player.onReady(function(){n.ready=!0;n.trigger({type:"ready"});n.player.onPlay(function(){n.started===!1&&(n.started=!0,n.trigger({type:"start"}));n.state="playing";n.trigger({type:"play"})});n.player.onPause(function(){n.state="paused";n.trigger({type:"pause"})});n.player.onComplete(function(){n.state="ended";n.trigger({type:"ended"})})})};o.prototype.play=function(){this.player.play(!0)};o.prototype.pause=function(){this.player.pause(!0)};o.prototype.stop=function(){this.player.stop();this.state="stopped"};o.prototype.replay=function(){this.player.seek(0);this.player.play(!0)}}(jQuery)