!function(r){"function"==typeof define&&define.amd?define(["jquery"],r):"object"==typeof module&&module.exports?module.exports=function(e,t){return void 0===t&&(t="undefined"!=typeof window?require("jquery"):require("jquery")(e)),r(t),t}:r(jQuery)}(function(q){"use strict";var m=/\r?\n/g,S={};S.fileapi=void 0!==q('<input type="file">').get(0).files,S.formdata=void 0!==window.FormData;var _=!!q.fn.prop;function o(e){var t=e.data;e.isDefaultPrevented()||(e.preventDefault(),q(e.target).closest("form").ajaxSubmit(t))}function i(e){var t=e.target,r=q(t);if(!r.is("[type=submit],[type=image]")){var a=r.closest("[type=submit]");if(0===a.length)return;t=a[0]}var n,o=t.form;"image"===(o.clk=t).type&&(void 0!==e.offsetX?(o.clk_x=e.offsetX,o.clk_y=e.offsetY):"function"==typeof q.fn.offset?(n=r.offset(),o.clk_x=e.pageX-n.left,o.clk_y=e.pageY-n.top):(o.clk_x=e.pageX-t.offsetLeft,o.clk_y=e.pageY-t.offsetTop)),setTimeout(function(){o.clk=o.clk_x=o.clk_y=null},100)}function N(){var e;q.fn.ajaxSubmit.debug&&(e="[jquery.form] "+Array.prototype.join.call(arguments,""),window.console&&window.console.log?window.console.log(e):window.opera&&window.opera.postError&&window.opera.postError(e))}q.fn.attr2=function(){if(!_)return this.attr.apply(this,arguments);var e=this.prop.apply(this,arguments);return e&&e.jquery||"string"==typeof e?e:this.attr.apply(this,arguments)},q.fn.ajaxSubmit=function(M,e,t,r){if(!this.length)return N("ajaxSubmit: skipping submit process - no element selected"),this;var O,a,n,o,X=this;"function"==typeof M?M={success:M}:"string"==typeof M||!1===M&&0<arguments.length?(M={url:M,data:e,dataType:t},"function"==typeof r&&(M.success=r)):void 0===M&&(M={}),O=M.method||M.type||this.attr2("method"),n=(n=(n="string"==typeof(a=M.url||this.attr2("action"))?q.trim(a):"")||window.location.href||"")&&(n.match(/^([^#]+)/)||[])[1],o=/(MSIE|Trident)/.test(navigator.userAgent||"")&&/^https/i.test(window.location.href||"")?"javascript:false":"about:blank",M=q.extend(!0,{url:n,success:q.ajaxSettings.success,type:O||q.ajaxSettings.type,iframeSrc:o},M);var i={};if(this.trigger("form-pre-serialize",[this,M,i]),i.veto)return N("ajaxSubmit: submit vetoed via form-pre-serialize trigger"),this;if(M.beforeSerialize&&!1===M.beforeSerialize(this,M))return N("ajaxSubmit: submit aborted via beforeSerialize callback"),this;var s=M.traditional;void 0===s&&(s=q.ajaxSettings.traditional);var u,c,C=[],l=this.formToArray(M.semantic,C,M.filtering);if(M.data&&(c=q.isFunction(M.data)?M.data(l):M.data,M.extraData=c,u=q.param(c,s)),M.beforeSubmit&&!1===M.beforeSubmit(l,this,M))return N("ajaxSubmit: submit aborted via beforeSubmit callback"),this;if(this.trigger("form-submit-validate",[l,this,M,i]),i.veto)return N("ajaxSubmit: submit vetoed via form-submit-validate trigger"),this;var f=q.param(l,s);u&&(f=f?f+"&"+u:u),"GET"===M.type.toUpperCase()?(M.url+=(0<=M.url.indexOf("?")?"&":"?")+f,M.data=null):M.data=f;var d,m,p,h=[];M.resetForm&&h.push(function(){X.resetForm()}),M.clearForm&&h.push(function(){X.clearForm(M.includeHidden)}),!M.dataType&&M.target?(d=M.success||function(){},h.push(function(e,t,r){var a=arguments,n=M.replaceTarget?"replaceWith":"html";q(M.target)[n](e).each(function(){d.apply(this,a)})})):M.success&&(q.isArray(M.success)?q.merge(h,M.success):h.push(M.success)),M.success=function(e,t,r){for(var a=M.context||this,n=0,o=h.length;n<o;n++)h[n].apply(a,[e,t,r||X,X])},M.error&&(m=M.error,M.error=function(e,t,r){var a=M.context||this;m.apply(a,[e,t,r,X])}),M.complete&&(p=M.complete,M.complete=function(e,t){var r=M.context||this;p.apply(r,[e,t,X])});var v=0<q("input[type=file]:enabled",this).filter(function(){return""!==q(this).val()}).length,g="multipart/form-data",x=X.attr("enctype")===g||X.attr("encoding")===g,y=S.fileapi&&S.formdata;N("fileAPI :"+y);var b,T=(v||x)&&!y;!1!==M.iframe&&(M.iframe||T)?M.closeKeepAlive?q.get(M.closeKeepAlive,function(){b=w(l)}):b=w(l):b=(v||x)&&y?function(e){for(var r=new FormData,t=0;t<e.length;t++)r.append(e[t].name,e[t].value);if(M.extraData){var a=function(e){var t,r,a=q.param(e,M.traditional).split("&"),n=a.length,o=[];for(t=0;t<n;t++)a[t]=a[t].replace(/\+/g," "),r=a[t].split("="),o.push([decodeURIComponent(r[0]),decodeURIComponent(r[1])]);return o}(M.extraData);for(t=0;t<a.length;t++)a[t]&&r.append(a[t][0],a[t][1])}M.data=null;var n=q.extend(!0,{},q.ajaxSettings,M,{contentType:!1,processData:!1,cache:!1,type:O||"POST"});M.uploadProgress&&(n.xhr=function(){var e=q.ajaxSettings.xhr();return e.upload&&e.upload.addEventListener("progress",function(e){var t=0,r=e.loaded||e.position,a=e.total;e.lengthComputable&&(t=Math.ceil(r/a*100)),M.uploadProgress(e,r,a,t)},!1),e});n.data=null;var o=n.beforeSend;return n.beforeSend=function(e,t){M.formData?t.data=M.formData:t.data=r,o&&o.call(this,e,t)},q.ajax(n)}(l):q.ajax(M),X.removeData("jqxhr").data("jqxhr",b);for(var j=0;j<C.length;j++)C[j]=null;return this.trigger("form-submit-notify",[this,M]),this;function w(e){var t,r,l,f,o,d,m,p,a,n,h,v,i=X[0],g=q.Deferred();if(g.abort=function(e){p.abort(e)},e)for(r=0;r<C.length;r++)t=q(C[r]),_?t.prop("disabled",!1):t.removeAttr("disabled");(l=q.extend(!0,{},q.ajaxSettings,M)).context=l.context||l,o="jqFormIO"+(new Date).getTime();var s=i.ownerDocument,u=X.closest("body");if(l.iframeTarget?(n=(d=q(l.iframeTarget,s)).attr2("name"))?o=n:d.attr2("name",o):(d=q('<iframe name="'+o+'" src="'+l.iframeSrc+'" />',s)).css({position:"absolute",top:"-1000px",left:"-1000px"}),m=d[0],p={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(e){var t="timeout"===e?"timeout":"aborted";N("aborting upload... "+t),this.aborted=1;try{m.contentWindow.document.execCommand&&m.contentWindow.document.execCommand ("Stop")}catch(e){}d.attr("src",l.iframeSrc),p.error=t,l.error&&l.error.call(l.context,p,t,e),f&&q.event.trigger("ajaxError",[p,l,t]),l.complete&&l.complete.call(l.context,p,t)}},(f=l.global)&&0==q.active++&&q.event.trigger("ajaxStart"),f&&q.event.trigger("ajaxSend",[p,l]),l.beforeSend&&!1===l.beforeSend.call(l.context,p,l))return l.global&&q.active--,g.reject(),g;if(p.aborted)return g.reject(),g;(a=i.clk)&&(n=a.name)&&!a.disabled&&(l.extraData=l.extraData||{},l.extraData[n]=a.value,"image"===a.type&&(l.extraData[n+".x"]=i.clk_x,l.extraData[n+".y"]=i.clk_y));var x=1,y=2;function b(t){var r=null;try{t.contentWindow&&(r=t.contentWindow.document)}catch(e){N("cannot get iframe.contentWindow document: "+e)}if(r)return r;try{r=t.contentDocument?t.contentDocument:t.document}catch(e){N("cannot get iframe.contentDocument: "+e),r=t.document}return r}var c=q("meta[name=csrf-token]").attr("content"),T=q("meta[name=csrf-param]").attr("content");function j(){var e=X.attr2("target"),t=X.attr2("action"),r=X.attr("enctype")||X.attr("encoding")||"multipart/form-data";i.setAttribute("target",o),O&&!/post/i.test(O)||i.setAttribute("method","POST"),t!==l.url&&i.setAttribute("action",l.url),l.skipEncodingOverride||O&&!/post/i.test(O)||X.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"}),l.timeout&&(v=setTimeout(function(){h=!0,A(x)},l.timeout));var a=[];try{if(l.extraData)for(var n in l.extraData)l.extraData.hasOwnProperty(n)&&(q.isPlainObject(l.extraData[n])&&l.extraData[n].hasOwnProperty("name")&&l.extraData[n].hasOwnProperty("value")?a.push(q('<input type="hidden" name="'+l.extraData[n].name+'">',s).val(l.extraData[n].value).appendTo(i)[0]):a.push(q('<input type="hidden" name="'+n+'">',s).val(l.extraData[n]).appendTo(i)[0]));l.iframeTarget||d.appendTo(u),m.attachEvent?m.attachEvent("onload",A):m.addEventListener("load",A,!1),setTimeout(function e(){try{var t=b(m).readyState;N("state="+t),t&&"uninitialized"===t.toLowerCase()&&setTimeout(e,50)}catch(e){N("Server abort: ",e," (",e.name,")"),A(y),v&&clearTimeout(v),v=void 0}},15);try{i.submit()}catch(e){document.createElement("form").submit.apply(i)}}finally{i.setAttribute("action",t),i.setAttribute("enctype",r),e?i.setAttribute("target",e):X.removeAttr("target"),q(a).remove()}}T&&c&&(l.extraData=l.extraData||{},l.extraData[T]=c),l.forceSync?j():setTimeout(j,10);var w,S,k,D=50;function A(e){if(!p.aborted&&!k){if((S=b(m))||(N("cannot access response document"),e=y),e===x&&p)return p.abort("timeout"),void g.reject(p,"timeout");if(e===y&&p)return p.abort("server abort"),void g.reject(p,"error","server abort");if(S&&S.location.href!==l.iframeSrc||h){m.detachEvent?m.detachEvent("onload",A):m.removeEventListener("load",A,!1);var t,r="success";try{if(h)throw"timeout";var a="xml"===l.dataType||S.XMLDocument||q.isXMLDoc(S);if(N("isXml="+a),!a&&window.opera&&(null===S.body||!S.body.innerHTML)&&--D)return N("requeing onLoad callback, DOM not available"),void setTimeout(A,250);var n=S.body?S.body:S.documentElement;p.responseText=n?n.innerHTML:null,p.responseXML=S.XMLDocument?S.XMLDocument:S,a&&(l.dataType="xml"),p.getResponseHeader=function(e){return{"content-type":l.dataType}[e.toLowerCase()]},n&&(p.status=Number(n.getAttribute("status"))||p.status,p.statusText=n.getAttribute("statusText")||p.statusText);var o,i,s,u=(l.dataType||"").toLowerCase(),c=/(json|script|text)/.test(u);c||l.textarea?(o=S.getElementsByTagName("textarea")[0])?(p.responseText=o.value,p.status=Number(o.getAttribute("status"))||p.status,p.statusText=o.getAttribute("statusText")||p.statusText):c&&(i=S.getElementsByTagName("pre")[0],s=S.getElementsByTagName("body")[0],i?p.responseText=i.textContent?i.textContent:i.innerText:s&&(p.responseText=s.textContent?s.textContent:s.innerText)):"xml"===u&&!p.responseXML&&p.responseText&&(p.responseXML=F(p.responseText));try{w=E(p,u,l)}catch(e){r="parsererror",p.error=t=e||r}}catch(e){N("error caught: ",e),r="error",p.error=t=e||r}p.aborted&&(N("upload aborted"),r=null),p.status&&(r=200<=p.status&&p.status<300||304===p.status?"success":"error"),"success"===r?(l.success&&l.success.call(l.context,w,"success",p),g.resolve(p.responseText,"success",p),f&&q.event.trigger("ajaxSuccess",[p,l])):r&&(void 0===t&&(t=p.statusText),l.error&&l.error.call(l.context,p,r,t),g.reject(p,"error",t),f&&q.event.trigger("ajaxError",[p,l,t])),f&&q.event.trigger("ajaxComplete",[p,l]),f&&!--q.active&&q.event.trigger("ajaxStop"),l.complete&&l.complete.call(l.context,p,r),k=!0,l.timeout&&clearTimeout(v),setTimeout(function(){l.iframeTarget?d.attr("src",l.iframeSrc):d.remove(),p.responseXML=null},100)}}}var F=q.parseXML||function(e,t){return window.ActiveXObject?((t=new ActiveXObject("Microsoft.XMLDOM")).async="false",t.loadXML(e)):t=(new DOMParser).parseFromString(e,"text/xml"),t&&t.documentElement&&"parsererror"!==t.documentElement.nodeName?t:null},L=q.parseJSON||function(e){return window.eval("("+e+")")},E=function(e,t,r){var a=e.getResponseHeader("content-type")||"",n=("xml"===t||!t)&&0<=a.indexOf("xml"),o=n?e.responseXML:e.responseText;return n&&"parsererror"===o.documentElement.nodeName&&q.error&&q.error("parsererror"),r&&r.dataFilter&&(o=r.dataFilter(o,t)),"string"==typeof o&&(("json"===t||!t)&&0<=a.indexOf("json")?o=L(o):("script"===t||!t)&&0<=a.indexOf("javascript")&&q.globalEval(o)),o};return g}},q.fn.ajaxForm=function(e,t,r,a){if(("string"==typeof e||!1===e&&0<arguments.length)&&(e={url:e,data:t,dataType:r},"function"==typeof a&&(e.success=a)),(e=e||{}).delegation=e.delegation&&q.isFunction(q.fn.on),e.delegation||0!==this.length)return e.delegation?(q(document).off("submit.form-plugin",this.selector,o).off("click.form-plugin",this.selector,i).on("submit.form-plugin",this.selector,e,o).on("click.form-plugin",this.selector,e,i),this):(e.beforeFormUnbind&&e.beforeFormUnbind(this,e),this.ajaxFormUnbind().on("submit.form-plugin",e,o).on("click.form-plugin",e,i));var n={s:this.selector,c:this.context};return!q.isReady&&n.s?(N("DOM not ready, queuing ajaxForm"),q(function(){q(n.s,n.c).ajaxForm(e)})):N("terminating; zero elements found by selector"+(q.isReady?"":" (DOM not ready)")),this},q.fn.ajaxFormUnbind=function(){return this.off("submit.form-plugin click.form-plugin")},q.fn.formToArray=function(e,t,r){var a=[];if(0===this.length)return a;var n,o,i,s,u,c,l,f,d,m,p=this[0],h=this.attr("id"),v=(v=e||void 0===p.elements?p.getElementsByTagName("*"):p.elements)&&q.makeArray(v);if(h&&(e||/(Edge|Trident)\//.test(navigator.userAgent))&&(n=q(':input[form="'+h+'"]').get()).length&&(v=(v||[]).concat(n)),!v||!v.length)return a;for(q.isFunction(r)&&(v=q.map(v,r)),o=0,c=v.length;o<c;o++)if((m=(u=v[o]).name)&&!u.disabled)if(e&&p.clk&&"image"===u.type)p.clk===u&&(a.push({name:m,value:q(u).val(),type:u.type}),a.push({name:m+".x",value:p.clk_x},{name:m+".y",value:p.clk_y}));else if((s=q.fieldValue(u,!0))&&s.constructor===Array)for(t&&t.push(u),i=0,l=s.length;i<l;i++)a.push({name:m,value:s[i]});else if(S.fileapi&&"file"===u.type){t&&t.push(u);var g=u.files;if(g.length)for(i=0;i<g.length;i++)a.push({name:m,value:g[i],type:u.type});else a.push({name:m,value:"",type:u.type})}else null!=s&&(t&&t.push(u),a.push({name:m,value:s,type:u.type,required:u.required}));return e||!p.clk||(m=(d=(f=q(p.clk))[0]).name)&&!d.disabled&&"image"===d.type&&(a.push({name:m,value:f.val()}),a.push({name:m+".x",value:p.clk_x},{name:m+".y",value:p.clk_y})),a},q.fn.formSerialize=function(e){return q.param(this.formToArray(e))},q.fn.fieldSerialize=function(n){var o=[];return this.each(function(){var e=this.name;if(e){var t=q.fieldValue(this,n);if(t&&t.constructor===Array)for(var r=0,a=t.length;r<a;r++)o.push({name:e,value:t[r]});else null!=t&&o.push({name:this.name,value:t})}}),q.param(o)},q.fn.fieldValue=function(e){for(var t=[],r=0,a=this.length;r<a;r++){var n=this[r],o=q.fieldValue(n,e);null==o||o.constructor===Array&&!o.length||(o.constructor===Array?q.merge(t,o):t.push(o))}return t},q.fieldValue=function(e,t){var r=e.name,a=e.type,n=e.tagName.toLowerCase();if(void 0===t&&(t=!0),t&&(!r||e.disabled||"reset"===a||"button"===a||("checkbox"===a||"radio"===a)&&!e.checked||("submit"===a||"image"===a)&&e.form&&e.form.clk!==e||"select"===n&&-1===e.selectedIndex))return null;if("select"!==n)return q(e).val().replace(m,"\r\n");var o=e.selectedIndex;if(o<0)return null;for(var i=[],s=e.options,u="select-one"===a,c=u?o+1:s.length,l=u?o:0;l<c;l++){var f=s[l];if(f.selected&&!f.disabled){var d=(d=f.value)||(f.attributes&&f.attributes.value&&!f.attributes.value.specified?f.text:f.value);if(u)return d;i.push(d)}}return i},q.fn.clearForm=function(e){return this.each(function(){q("input,select,textarea",this).clearFields(e)})},q.fn.clearFields=q.fn.clearInputs=function(r){var a=/^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i;return this.each(function(){var e=this.type,t=this.tagName.toLowerCase();a.test(e)||"textarea"===t?this.value="":"checkbox"===e||"radio"===e?this.checked=!1:"select"===t?this.selectedIndex=-1:"file"===e?/MSIE/.test(navigator.userAgent)?q(this).replaceWith(q(this).clone(!0)):q(this).val(""):r&&(!0===r&&/hidden/.test(e)||"string"==typeof r&&q(this).is(r))&&(this.value="")})},q.fn.resetForm=function(){return this.each(function(){var t=q(this),e=this.tagName.toLowerCase();switch(e){case"input":this.checked=this.defaultChecked;case"textarea":return this.value=this.defaultValue,!0;case"option":case"optgroup":var r=t.parents("select");return r.length&&r[0].multiple?"option"===e?this.selected=this.defaultSelected:t.find("option").resetForm():r.resetForm(),!0;case"select":return t.find("option").each(function(e){if(this.selected=this.defaultSelected,this.defaultSelected&&!t[0].multiple)return t[0].selectedIndex=e,!1}),!0;case"label":var a=q(t.attr("for")),n=t.find("input,select,textarea");return a[0]&&n.unshift(a[0]),n.resetForm(),!0;case"form":return"function"!=typeof this.reset&&("object"!=typeof this.reset||this.reset.nodeType)||this.reset(),!0;default:return t.find("form,input,label,select,textarea").resetForm(),!0}})},q.fn.enable=function(e){return void 0===e&&(e=!0),this.each(function(){this.disabled=!e})},q.fn.selected=function(r){return void 0===r&&(r=!0),this.each(function(){var e,t=this.type;"checkbox"===t||"radio"===t?this.checked=r:"option"===this.tagName.toLowerCase()&&(e=q(this).parent("select"),r&&e[0]&&"select-one"===e[0].type&&e.find("option").selected(!1),this.selected=r)})},q.fn.ajaxSubmit.debug=!1});
;(function(f){"use strict";"function"===typeof define&&define.amd?define(["jquery"],f):"undefined"!==typeof module&&module.exports?module.exports=f(require("jquery")):f(jQuery)})(function($){"use strict";function n(a){return!a.nodeName||-1!==$.inArray(a.nodeName.toLowerCase(),["iframe","#document","html","body"])}function h(a){return $.isFunction(a)||$.isPlainObject(a)?a:{top:a,left:a}}var p=$.scrollTo=function(a,d,b){return $(window).scrollTo(a,d,b)};p.defaults={axis:"xy",duration:0,limit:!0};$.fn.scrollTo=function(a,d,b){"object"===typeof d&&(b=d,d=0);"function"===typeof b&&(b={onAfter:b});"max"===a&&(a=9E9);b=$.extend({},p.defaults,b);d=d||b.duration;var u=b.queue&&1<b.axis.length;u&&(d/=2);b.offset=h(b.offset);b.over=h(b.over);return this.each(function(){function k(a){var k=$.extend({},b,{queue:!0,duration:d,complete:a&&function(){a.call(q,e,b)}});r.animate(f,k)}if(null!==a){var l=n(this),q=l?this.contentWindow||window:this,r=$(q),e=a,f={},t;switch(typeof e){case "number":case "string":if(/^([+-]=?)?\d+(\.\d+)?(px|%)?$/.test(e)){e=h(e);break}e=l?$(e):$(e,q);case "object":if(e.length===0)return;if(e.is||e.style)t=(e=$(e)).offset()}var v=$.isFunction(b.offset)&&b.offset(q,e)||b.offset;$.each(b.axis.split(""),function(a,c){var d="x"===c?"Left":"Top",m=d.toLowerCase(),g="scroll"+d,h=r[g](),n=p.max(q,c);t?(f[g]=t[m]+(l?0:h-r.offset()[m]),b.margin&&(f[g]-=parseInt(e.css("margin"+d),10)||0,f[g]-=parseInt(e.css("border"+d+"Width"),10)||0),f[g]+=v[m]||0,b.over[m]&&(f[g]+=e["x"===c?"width":"height"]()*b.over[m])):(d=e[m],f[g]=d.slice&&"%"===d.slice(-1)?parseFloat(d)/100*n:d);b.limit&&/^\d+$/.test(f[g])&&(f[g]=0>=f[g]?0:Math.min(f[g],n));!a&&1<b.axis.length&&(h===f[g]?f={}:u&&(k(b.onAfterFirst),f={}))});k(b.onAfter)}})};p.max=function(a,d){var b="x"===d?"Width":"Height",h="scroll"+b;if(!n(a))return a[h]-$(a)[b.toLowerCase()]();var b="client"+b,k=a.ownerDocument||a.document,l=k.documentElement,k=k.body;return Math.max(l[h],k[h])-Math.min(l[b],k[b])};$.Tween.propHooks.scrollLeft=$.Tween.propHooks.scrollTop={get:function(a){return $(a.elem)[a.prop]()}, set:function(a){var d=this.get(a);if(a.options.interrupt&&a._last&&a._last!==d)return $(a.elem).stop();var b=Math.round(a.now);d!==b&&($(a.elem)[a.prop](b),a._last=this.get(a))}};return p});
!function(a,b,c){!function(a){"use strict";"function"==typeof define&&define.amd?define(["jquery"],a):jQuery&&!jQuery.fn.qtip&&a(jQuery)}(function(d){"use strict";function e(a,b,c,e){this.id=c,this.target=a,this.tooltip=F,this.elements={target:a},this._id=S+"-"+c,this.timers={img:{}},this.options=b,this.plugins={},this.cache={event:{},target:d(),disabled:E,attr:e,onTooltip:E,lastClass:""},this.rendered=this.destroyed=this.disabled=this.waiting=this.hiddenDuringWait=this.positioning=this.triggering=E}function f(a){return a===F||"object"!==d.type(a)}function g(a){return!(d.isFunction(a)||a&&a.attr||a.length||"object"===d.type(a)&&(a.jquery||a.then))}function h(a){var b,c,e,h;return f(a)?E:(f(a.metadata)&&(a.metadata={type:a.metadata}),"content"in a&&(b=a.content,f(b)||b.jquery||b.done?(c=g(b)?E:b,b=a.content={text:c}):c=b.text,"ajax"in b&&(e=b.ajax,h=e&&e.once!==E,delete b.ajax,b.text=function(a,b){var f=c||d(this).attr(b.options.content.attr)||"Loading...",g=d.ajax(d.extend({},e,{context:b})).then(e.success,F,e.error).then(function(a){return a&&h&&b.set("content.text",a),a},function(a,c,d){b.destroyed||0===a.status||b.set("content.text",c+": "+d)});return h?f:(b.set("content.text",f),g)}),"title"in b&&(d.isPlainObject(b.title)&&(b.button=b.title.button,b.title=b.title.text),g(b.title||E)&&(b.title=E))),"position"in a&&f(a.position)&&(a.position={my:a.position,at:a.position}),"show"in a&&f(a.show)&&(a.show=a.show.jquery?{target:a.show}:a.show===D?{ready:D}:{event:a.show}),"hide"in a&&f(a.hide)&&(a.hide=a.hide.jquery?{target:a.hide}:{event:a.hide}),"style"in a&&f(a.style)&&(a.style={classes:a.style}),d.each(R,function(){this.sanitize&&this.sanitize(a)}),a)}function i(a,b){for(var c,d=0,e=a,f=b.split(".");e=e[f[d++]];)d<f.length&&(c=e);return[c||a,f.pop()]}function j(a,b){var c,d,e;for(c in this.checks)if(this.checks.hasOwnProperty(c))for(d in this.checks[c])this.checks[c].hasOwnProperty(d)&&(e=new RegExp(d,"i").exec(a))&&(b.push(e),("builtin"===c||this.plugins[c])&&this.checks[c][d].apply(this.plugins[c]||this,b))}function k(a){return V.concat("").join(a?"-"+a+" ":" ")}function l(a,b){return b>0?setTimeout(d.proxy(a,this),b):void a.call(this)}function m(a){this.tooltip.hasClass(aa)||(clearTimeout(this.timers.show),clearTimeout(this.timers.hide),this.timers.show=l.call(this,function(){this.toggle(D,a)},this.options.show.delay))}function n(a){if(!this.tooltip.hasClass(aa)&&!this.destroyed){var b=d(a.relatedTarget),c=b.closest(W)[0]===this.tooltip[0],e=b[0]===this.options.show.target[0];if(clearTimeout(this.timers.show),clearTimeout(this.timers.hide),this!==b[0]&&"mouse"===this.options.position.target&&c||this.options.hide.fixed&&/mouse(out|leave|move)/.test(a.type)&&(c||e))try{a.preventDefault(),a.stopImmediatePropagation()}catch(f){}else this.timers.hide=l.call(this,function(){this.toggle(E,a)},this.options.hide.delay,this)}}function o(a){!this.tooltip.hasClass(aa)&&this.options.hide.inactive&&(clearTimeout(this.timers.inactive),this.timers.inactive=l.call(this,function(){this.hide(a)},this.options.hide.inactive))}function p(a){this.rendered&&this.tooltip[0].offsetWidth>0&&this.reposition(a)}function q(a,c,e){d(b.body).delegate(a,(c.split?c:c.join("."+S+" "))+"."+S,function(){var a=y.api[d.attr(this,U)];a&&!a.disabled&&e.apply(a,arguments)})}function r(a,c,f){var g,i,j,k,l,m=d(b.body),n=a[0]===b?m:a,o=a.metadata?a.metadata(f.metadata):F,p="html5"===f.metadata.type&&o?o[f.metadata.name]:F,q=a.data(f.metadata.name||"qtipopts");try{q="string"==typeof q?d.parseJSON(q):q}catch(r){}if(k=d.extend(D,{},y.defaults,f,"object"==typeof q?h(q):F,h(p||o)),i=k.position,k.id=c,"boolean"==typeof k.content.text){if(j=a.attr(k.content.attr),k.content.attr===E||!j)return E;k.content.text=j}if(i.container.length||(i.container=m),i.target===E&&(i.target=n),k.show.target===E&&(k.show.target=n),k.show.solo===D&&(k.show.solo=i.container.closest("body")),k.hide.target===E&&(k.hide.target=n),k.position.viewport===D&&(k.position.viewport=i.container),i.container=i.container.eq(0),i.at=new A(i.at,D),i.my=new A(i.my),a.data(S))if(k.overwrite)a.qtip("destroy",!0);else if(k.overwrite===E)return E;return a.attr(T,c),k.suppress&&(l=a.attr("title"))&&a.removeAttr("title").attr(ca,l).attr("title",""),g=new e(a,k,c,!!j),a.data(S,g),g}function s(a){return a.charAt(0).toUpperCase()+a.slice(1)}function t(a,b){var d,e,f=b.charAt(0).toUpperCase()+b.slice(1),g=(b+" "+va.join(f+" ")+f).split(" "),h=0;if(ua[b])return a.css(ua[b]);for(;d=g[h++];)if((e=a.css(d))!==c)return ua[b]=d,e}function u(a,b){return Math.ceil(parseFloat(t(a,b)))}function v(a,b){this._ns="tip",this.options=b,this.offset=b.offset,this.size=[b.width,b.height],this.qtip=a,this.init(a)}function w(a,b){this.options=b,this._ns="-modal",this.qtip=a,this.init(a)}function x(a){this._ns="ie6",this.qtip=a,this.init(a)}var y,z,A,B,C,D=!0,E=!1,F=null,G="x",H="y",I="width",J="height",K="top",L="left",M="bottom",N="right",O="center",P="flipinvert",Q="shift",R={},S="qtip",T="data-hasqtip",U="data-qtip-id",V=["ui-widget","ui-tooltip"],W="."+S,X="click dblclick mousedown mouseup mousemove mouseleave mouseenter".split(" "),Y=S+"-fixed",Z=S+"-default",$=S+"-focus",_=S+"-hover",aa=S+"-disabled",ba="_replacedByqTip",ca="oldtitle",da={ie:function(){var a,c;for(a=4,c=b.createElement("div");(c.innerHTML="<!--[if gt IE "+a+"]><i></i><![endif]-->")&&c.getElementsByTagName("i")[0];a+=1);return a>4?a:NaN}(),iOS:parseFloat((""+(/CPU.*OS ([0-9_]{1,5})|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent)||[0,""])[1]).replace("undefined","3_2").replace("_",".").replace("_",""))||E};z=e.prototype,z._when=function(a){return d.when.apply(d,a)},z.render=function(a){if(this.rendered||this.destroyed)return this;var b=this,c=this.options,e=this.cache,f=this.elements,g=c.content.text,h=c.content.title,i=c.content.button,j=c.position,k=[];return d.attr(this.target[0],"aria-describedby",this._id),e.posClass=this._createPosClass((this.position={my:j.my,at:j.at}).my),this.tooltip=f.tooltip=d("<div/>",{id:this._id,"class":[S,Z,c.style.classes,e.posClass].join(" "),width:c.style.width||"",height:c.style.height||"",tracking:"mouse"===j.target&&j.adjust.mouse,role:"alert","aria-live":"polite","aria-atomic":E,"aria-describedby":this._id+"-content","aria-hidden":D}).toggleClass(aa,this.disabled).attr(U,this.id).data(S,this).appendTo(j.container).append(f.content=d("<div />",{"class":S+"-content",id:this._id+"-content","aria-atomic":D})),this.rendered=-1,this.positioning=D,h&&(this._createTitle(),d.isFunction(h)||k.push(this._updateTitle(h,E))),i&&this._createButton(),d.isFunction(g)||k.push(this._updateContent(g,E)),this.rendered=D,this._setWidget(),d.each(R,function(a){var c;"render"===this.initialize&&(c=this(b))&&(b.plugins[a]=c)}),this._unassignEvents(),this._assignEvents(),this._when(k).then(function(){b._trigger("render"),b.positioning=E,b.hiddenDuringWait||!c.show.ready&&!a||b.toggle(D,e.event,E),b.hiddenDuringWait=E}),y.api[this.id]=this,this},z.destroy=function(a){function b(){if(!this.destroyed){this.destroyed=D;var a,b=this.target,c=b.attr(ca);this.rendered&&this.tooltip.stop(1,0).find("*").remove().end().remove(),d.each(this.plugins,function(){this.destroy&&this.destroy()});for(a in this.timers)this.timers.hasOwnProperty(a)&&clearTimeout(this.timers[a]);b.removeData(S).removeAttr(U).removeAttr(T).removeAttr("aria-describedby"),this.options.suppress&&c&&b.attr("title",c).removeAttr(ca),this._unassignEvents(),this.options=this.elements=this.cache=this.timers=this.plugins=this.mouse=F,delete y.api[this.id]}}return this.destroyed?this.target:(a===D&&"hide"!==this.triggering||!this.rendered?b.call(this):(this.tooltip.one("tooltiphidden",d.proxy(b,this)),!this.triggering&&this.hide()),this.target)},B=z.checks={builtin:{"^id$":function(a,b,c,e){var f=c===D?y.nextid:c,g=S+"-"+f;f!==E&&f.length>0&&!d("#"+g).length?(this._id=g,this.rendered&&(this.tooltip[0].id=this._id,this.elements.content[0].id=this._id+"-content",this.elements.title[0].id=this._id+"-title")):a[b]=e},"^prerender":function(a,b,c){c&&!this.rendered&&this.render(this.options.show.ready)},"^content.text$":function(a,b,c){this._updateContent(c)},"^content.attr$":function(a,b,c,d){this.options.content.text===this.target.attr(d)&&this._updateContent(this.target.attr(c))},"^content.title$":function(a,b,c){return c?(c&&!this.elements.title&&this._createTitle(),void this._updateTitle(c)):this._removeTitle()},"^content.button$":function(a,b,c){this._updateButton(c)},"^content.title.(text|button)$":function(a,b,c){this.set("content."+b,c)},"^position.(my|at)$":function(a,b,c){"string"==typeof c&&(this.position[b]=a[b]=new A(c,"at"===b))},"^position.container$":function(a,b,c){this.rendered&&this.tooltip.appendTo(c)},"^show.ready$":function(a,b,c){c&&(!this.rendered&&this.render(D)||this.toggle(D))},"^style.classes$":function(a,b,c,d){this.rendered&&this.tooltip.removeClass(d).addClass(c)},"^style.(width|height)":function(a,b,c){this.rendered&&this.tooltip.css(b,c)},"^style.widget|content.title":function(){this.rendered&&this._setWidget()},"^style.def":function(a,b,c){this.rendered&&this.tooltip.toggleClass(Z,!!c)},"^events.(render|show|move|hide|focus|blur)$":function(a,b,c){this.rendered&&this.tooltip[(d.isFunction(c)?"":"un")+"bind"]("tooltip"+b,c)},"^(show|hide|position).(event|target|fixed|inactive|leave|distance|viewport|adjust)":function(){if(this.rendered){var a=this.options.position;this.tooltip.attr("tracking","mouse"===a.target&&a.adjust.mouse),this._unassignEvents(),this._assignEvents()}}}},z.get=function(a){if(this.destroyed)return this;var b=i(this.options,a.toLowerCase()),c=b[0][b[1]];return c.precedance?c.string():c};var ea=/^position\.(my|at|adjust|target|container|viewport)|style|content|show\.ready/i,fa=/^prerender|show\.ready/i;z.set=function(a,b){if(this.destroyed)return this;var c,e=this.rendered,f=E,g=this.options;return"string"==typeof a?(c=a,a={},a[c]=b):a=d.extend({},a),d.each(a,function(b,c){if(e&&fa.test(b))return void delete a[b];var h,j=i(g,b.toLowerCase());h=j[0][j[1]],j[0][j[1]]=c&&c.nodeType?d(c):c,f=ea.test(b)||f,a[b]=[j[0],j[1],c,h]}),h(g),this.positioning=D,d.each(a,d.proxy(j,this)),this.positioning=E,this.rendered&&this.tooltip[0].offsetWidth>0&&f&&this.reposition("mouse"===g.position.target?F:this.cache.event),this},z._update=function(a,b){var c=this,e=this.cache;return this.rendered&&a?(d.isFunction(a)&&(a=a.call(this.elements.target,e.event,this)||""),d.isFunction(a.then)?(e.waiting=D,a.then(function(a){return e.waiting=E,c._update(a,b)},F,function(a){return c._update(a,b)})):a===E||!a&&""!==a?E:(a.jquery&&a.length>0?b.empty().append(a.css({display:"block",visibility:"visible"})):b.html(a),this._waitForContent(b).then(function(a){c.rendered&&c.tooltip[0].offsetWidth>0&&c.reposition(e.event,!a.length)}))):E},z._waitForContent=function(a){var b=this.cache;return b.waiting=D,(d.fn.imagesLoaded?a.imagesLoaded():(new d.Deferred).resolve([])).done(function(){b.waiting=E}).promise()},z._updateContent=function(a,b){this._update(a,this.elements.content,b)},z._updateTitle=function(a,b){this._update(a,this.elements.title,b)===E&&this._removeTitle(E)},z._createTitle=function(){var a=this.elements,b=this._id+"-title";a.titlebar&&this._removeTitle(),a.titlebar=d("<div />",{"class":S+"-titlebar "+(this.options.style.widget?k("header"):"")}).append(a.title=d("<div />",{id:b,"class":S+"-title","aria-atomic":D})).insertBefore(a.content).delegate(".qtip-close","mousedown keydown mouseup keyup mouseout",function(a){d(this).toggleClass("ui-state-active ui-state-focus","down"===a.type.substr(-4))}).delegate(".qtip-close","mouseover mouseout",function(a){d(this).toggleClass("ui-state-hover","mouseover"===a.type)}),this.options.content.button&&this._createButton()},z._removeTitle=function(a){var b=this.elements;b.title&&(b.titlebar.remove(),b.titlebar=b.title=b.button=F,a!==E&&this.reposition())},z._createPosClass=function(a){return S+"-pos-"+(a||this.options.position.my).abbrev()},z.reposition=function(c,e){if(!this.rendered||this.positioning||this.destroyed)return this;this.positioning=D;var f,g,h,i,j=this.cache,k=this.tooltip,l=this.options.position,m=l.target,n=l.my,o=l.at,p=l.viewport,q=l.container,r=l.adjust,s=r.method.split(" "),t=k.outerWidth(E),u=k.outerHeight(E),v=0,w=0,x=k.css("position"),y={left:0,top:0},z=k[0].offsetWidth>0,A=c&&"scroll"===c.type,B=d(a),C=q[0].ownerDocument,F=this.mouse;if(d.isArray(m)&&2===m.length)o={x:L,y:K},y={left:m[0],top:m[1]};else if("mouse"===m)o={x:L,y:K},(!r.mouse||this.options.hide.distance)&&j.origin&&j.origin.pageX?c=j.origin:!c||c&&("resize"===c.type||"scroll"===c.type)?c=j.event:F&&F.pageX&&(c=F),"static"!==x&&(y=q.offset()),C.body.offsetWidth!==(a.innerWidth||C.documentElement.clientWidth)&&(g=d(b.body).offset()),y={left:c.pageX-y.left+(g&&g.left||0),top:c.pageY-y.top+(g&&g.top||0)},r.mouse&&A&&F&&(y.left-=(F.scrollX||0)-B.scrollLeft(),y.top-=(F.scrollY||0)-B.scrollTop());else{if("event"===m?c&&c.target&&"scroll"!==c.type&&"resize"!==c.type?j.target=d(c.target):c.target||(j.target=this.elements.target):"event"!==m&&(j.target=d(m.jquery?m:this.elements.target)),m=j.target,m=d(m).eq(0),0===m.length)return this;m[0]===b||m[0]===a?(v=da.iOS?a.innerWidth:m.width(),w=da.iOS?a.innerHeight:m.height(),m[0]===a&&(y={top:(p||m).scrollTop(),left:(p||m).scrollLeft()})):R.imagemap&&m.is("area")?f=R.imagemap(this,m,o,R.viewport?s:E):R.svg&&m&&m[0].ownerSVGElement?f=R.svg(this,m,o,R.viewport?s:E):(v=m.outerWidth(E),w=m.outerHeight(E),y=m.offset()),f&&(v=f.width,w=f.height,g=f.offset,y=f.position),y=this.reposition.offset(m,y,q),(da.iOS>3.1&&da.iOS<4.1||da.iOS>=4.3&&da.iOS<4.33||!da.iOS&&"fixed"===x)&&(y.left-=B.scrollLeft(),y.top-=B.scrollTop()),(!f||f&&f.adjustable!==E)&&(y.left+=o.x===N?v:o.x===O?v/2:0,y.top+=o.y===M?w:o.y===O?w/2:0)}return y.left+=r.x+(n.x===N?-t:n.x===O?-t/2:0),y.top+=r.y+(n.y===M?-u:n.y===O?-u/2:0),R.viewport?(h=y.adjusted=R.viewport(this,y,l,v,w,t,u),g&&h.left&&(y.left+=g.left),g&&h.top&&(y.top+=g.top),h.my&&(this.position.my=h.my)):y.adjusted={left:0,top:0},j.posClass!==(i=this._createPosClass(this.position.my))&&(j.posClass=i,k.removeClass(j.posClass).addClass(i)),this._trigger("move",[y,p.elem||p],c)?(delete y.adjusted,e===E||!z||isNaN(y.left)||isNaN(y.top)||"mouse"===m||!d.isFunction(l.effect)?k.css(y):d.isFunction(l.effect)&&(l.effect.call(k,this,d.extend({},y)),k.queue(function(a){d(this).css({opacity:"",height:""}),da.ie&&this.style.removeAttribute("filter"),a()})),this.positioning=E,this):this},z.reposition.offset=function(a,c,e){function f(a,b){c.left+=b*a.scrollLeft(),c.top+=b*a.scrollTop()}if(!e[0])return c;var g,h,i,j,k=d(a[0].ownerDocument),l=!!da.ie&&"CSS1Compat"!==b.compatMode,m=e[0];do"static"!==(h=d.css(m,"position"))&&("fixed"===h?(i=m.getBoundingClientRect(),f(k,-1)):(i=d(m).position(),i.left+=parseFloat(d.css(m,"borderLeftWidth"))||0,i.top+=parseFloat(d.css(m,"borderTopWidth"))||0),c.left-=i.left+(parseFloat(d.css(m,"marginLeft"))||0),c.top-=i.top+(parseFloat(d.css(m,"marginTop"))||0),g||"hidden"===(j=d.css(m,"overflow"))||"visible"===j||(g=d(m)));while(m=m.offsetParent);return g&&(g[0]!==k[0]||l)&&f(g,1),c};var ga=(A=z.reposition.Corner=function(a,b){a=(""+a).replace(/([A-Z])/," $1").replace(/middle/gi,O).toLowerCase(),this.x=(a.match(/left|right/i)||a.match(/center/)||["inherit"])[0].toLowerCase(),this.y=(a.match(/top|bottom|center/i)||["inherit"])[0].toLowerCase(),this.forceY=!!b;var c=a.charAt(0);this.precedance="t"===c||"b"===c?H:G}).prototype;ga.invert=function(a,b){this[a]=this[a]===L?N:this[a]===N?L:b||this[a]},ga.string=function(a){var b=this.x,c=this.y,d=b!==c?"center"===b||"center"!==c&&(this.precedance===H||this.forceY)?[c,b]:[b,c]:[b];return a!==!1?d.join(" "):d},ga.abbrev=function(){var a=this.string(!1);return a[0].charAt(0)+(a[1]&&a[1].charAt(0)||"")},ga.clone=function(){return new A(this.string(),this.forceY)},z.toggle=function(a,c){var e=this.cache,f=this.options,g=this.tooltip;if(c){if(/over|enter/.test(c.type)&&e.event&&/out|leave/.test(e.event.type)&&f.show.target.add(c.target).length===f.show.target.length&&g.has(c.relatedTarget).length)return this;e.event=d.event.fix(c)}if(this.waiting&&!a&&(this.hiddenDuringWait=D),!this.rendered)return a?this.render(1):this;if(this.destroyed||this.disabled)return this;var h,i,j,k=a?"show":"hide",l=this.options[k],m=this.options.position,n=this.options.content,o=this.tooltip.css("width"),p=this.tooltip.is(":visible"),q=a||1===l.target.length,r=!c||l.target.length<2||e.target[0]===c.target;return(typeof a).search("boolean|number")&&(a=!p),h=!g.is(":animated")&&p===a&&r,i=h?F:!!this._trigger(k,[90]),this.destroyed?this:(i!==E&&a&&this.focus(c),!i||h?this:(d.attr(g[0],"aria-hidden",!a),a?(this.mouse&&(e.origin=d.event.fix(this.mouse)),d.isFunction(n.text)&&this._updateContent(n.text,E),d.isFunction(n.title)&&this._updateTitle(n.title,E),!C&&"mouse"===m.target&&m.adjust.mouse&&(d(b).bind("mousemove."+S,this._storeMouse),C=D),o||g.css("width",g.outerWidth(E)),this.reposition(c,arguments[2]),o||g.css("width",""),l.solo&&("string"==typeof l.solo?d(l.solo):d(W,l.solo)).not(g).not(l.target).qtip("hide",new d.Event("tooltipsolo"))):(clearTimeout(this.timers.show),delete e.origin,C&&!d(W+'[tracking="true"]:visible',l.solo).not(g).length&&(d(b).unbind("mousemove."+S),C=E),this.blur(c)),j=d.proxy(function(){a?(da.ie&&g[0].style.removeAttribute("filter"),g.css("overflow",""),"string"==typeof l.autofocus&&d(this.options.show.autofocus,g).focus(),this.options.show.target.trigger("qtip-"+this.id+"-inactive")):g.css({display:"",visibility:"",opacity:"",left:"",top:""}),this._trigger(a?"visible":"hidden")},this),l.effect===E||q===E?(g[k](),j()):d.isFunction(l.effect)?(g.stop(1,1),l.effect.call(g,this),g.queue("fx",function(a){j(),a()})):g.fadeTo(90,a?1:0,j),a&&l.target.trigger("qtip-"+this.id+"-inactive"),this))},z.show=function(a){return this.toggle(D,a)},z.hide=function(a){return this.toggle(E,a)},z.focus=function(a){if(!this.rendered||this.destroyed)return this;var b=d(W),c=this.tooltip,e=parseInt(c[0].style.zIndex,10),f=y.zindex+b.length;return c.hasClass($)||this._trigger("focus",[f],a)&&(e!==f&&(b.each(function(){this.style.zIndex>e&&(this.style.zIndex=this.style.zIndex-1)}),b.filter("."+$).qtip("blur",a)),c.addClass($)[0].style.zIndex=f),this},z.blur=function(a){return!this.rendered||this.destroyed?this:(this.tooltip.removeClass($),this._trigger("blur",[this.tooltip.css("zIndex")],a),this)},z.disable=function(a){return this.destroyed?this:("toggle"===a?a=!(this.rendered?this.tooltip.hasClass(aa):this.disabled):"boolean"!=typeof a&&(a=D),this.rendered&&this.tooltip.toggleClass(aa,a).attr("aria-disabled",a),this.disabled=!!a,this)},z.enable=function(){return this.disable(E)},z._createButton=function(){var a=this,b=this.elements,c=b.tooltip,e=this.options.content.button,f="string"==typeof e,g=f?e:"Close tooltip";b.button&&b.button.remove(),e.jquery?b.button=e:b.button=d("<a />",{"class":"qtip-close "+(this.options.style.widget?"":S+"-icon"),title:g,"aria-label":g}).prepend(d("<span />",{"class":"ui-icon ui-icon-close",html:"&times;"})),b.button.appendTo(b.titlebar||c).attr("role","button").click(function(b){return c.hasClass(aa)||a.hide(b),E})},z._updateButton=function(a){if(!this.rendered)return E;var b=this.elements.button;a?this._createButton():b.remove()},z._setWidget=function(){var a=this.options.style.widget,b=this.elements,c=b.tooltip,d=c.hasClass(aa);c.removeClass(aa),aa=a?"ui-state-disabled":"qtip-disabled",c.toggleClass(aa,d),c.toggleClass("ui-helper-reset "+k(),a).toggleClass(Z,this.options.style.def&&!a),b.content&&b.content.toggleClass(k("content"),a),b.titlebar&&b.titlebar.toggleClass(k("header"),a),b.button&&b.button.toggleClass(S+"-icon",!a)},z._storeMouse=function(a){return(this.mouse=d.event.fix(a)).type="mousemove",this},z._bind=function(a,b,c,e,f){if(a&&c&&b.length){var g="."+this._id+(e?"-"+e:"");return d(a).bind((b.split?b:b.join(g+" "))+g,d.proxy(c,f||this)),this}},z._unbind=function(a,b){return a&&d(a).unbind("."+this._id+(b?"-"+b:"")),this},z._trigger=function(a,b,c){var e=new d.Event("tooltip"+a);return e.originalEvent=c&&d.extend({},c)||this.cache.event||F,this.triggering=a,this.tooltip.trigger(e,[this].concat(b||[])),this.triggering=E,!e.isDefaultPrevented()},z._bindEvents=function(a,b,c,e,f,g){var h=c.filter(e).add(e.filter(c)),i=[];h.length&&(d.each(b,function(b,c){var e=d.inArray(c,a);e>-1&&i.push(a.splice(e,1)[0])}),i.length&&(this._bind(h,i,function(a){var b=this.rendered?this.tooltip[0].offsetWidth>0:!1;(b?g:f).call(this,a)}),c=c.not(h),e=e.not(h))),this._bind(c,a,f),this._bind(e,b,g)},z._assignInitialEvents=function(a){function b(a){return this.disabled||this.destroyed?E:(this.cache.event=a&&d.event.fix(a),this.cache.target=a&&d(a.target),clearTimeout(this.timers.show),void(this.timers.show=l.call(this,function(){this.render("object"==typeof a||c.show.ready)},c.prerender?0:c.show.delay)))}var c=this.options,e=c.show.target,f=c.hide.target,g=c.show.event?d.trim(""+c.show.event).split(" "):[],h=c.hide.event?d.trim(""+c.hide.event).split(" "):[];this._bind(this.elements.target,["remove","removeqtip"],function(){this.destroy(!0)},"destroy"),/mouse(over|enter)/i.test(c.show.event)&&!/mouse(out|leave)/i.test(c.hide.event)&&h.push("mouseleave"),this._bind(e,"mousemove",function(a){this._storeMouse(a),this.cache.onTarget=D}),this._bindEvents(g,h,e,f,b,function(){return this.timers?void clearTimeout(this.timers.show):E}),(c.show.ready||c.prerender)&&b.call(this,a)},z._assignEvents=function(){var c=this,e=this.options,f=e.position,g=this.tooltip,h=e.show.target,i=e.hide.target,j=f.container,k=f.viewport,l=d(b),q=d(a),r=e.show.event?d.trim(""+e.show.event).split(" "):[],s=e.hide.event?d.trim(""+e.hide.event).split(" "):[];d.each(e.events,function(a,b){c._bind(g,"toggle"===a?["tooltipshow","tooltiphide"]:["tooltip"+a],b,null,g)}),/mouse(out|leave)/i.test(e.hide.event)&&"window"===e.hide.leave&&this._bind(l,["mouseout","blur"],function(a){/select|option/.test(a.target.nodeName)||a.relatedTarget||this.hide(a)}),e.hide.fixed?i=i.add(g.addClass(Y)):/mouse(over|enter)/i.test(e.show.event)&&this._bind(i,"mouseleave",function(){clearTimeout(this.timers.show)}),(""+e.hide.event).indexOf("unfocus")>-1&&this._bind(j.closest("html"),["mousedown","touchstart"],function(a){var b=d(a.target),c=this.rendered&&!this.tooltip.hasClass(aa)&&this.tooltip[0].offsetWidth>0,e=b.parents(W).filter(this.tooltip[0]).length>0;b[0]===this.target[0]||b[0]===this.tooltip[0]||e||this.target.has(b[0]).length||!c||this.hide(a)}),"number"==typeof e.hide.inactive&&(this._bind(h,"qtip-"+this.id+"-inactive",o,"inactive"),this._bind(i.add(g),y.inactiveEvents,o)),this._bindEvents(r,s,h,i,m,n),this._bind(h.add(g),"mousemove",function(a){if("number"==typeof e.hide.distance){var b=this.cache.origin||{},c=this.options.hide.distance,d=Math.abs;(d(a.pageX-b.pageX)>=c||d(a.pageY-b.pageY)>=c)&&this.hide(a)}this._storeMouse(a)}),"mouse"===f.target&&f.adjust.mouse&&(e.hide.event&&this._bind(h,["mouseenter","mouseleave"],function(a){return this.cache?void(this.cache.onTarget="mouseenter"===a.type):E}),this._bind(l,"mousemove",function(a){this.rendered&&this.cache.onTarget&&!this.tooltip.hasClass(aa)&&this.tooltip[0].offsetWidth>0&&this.reposition(a)})),(f.adjust.resize||k.length)&&this._bind(d.event.special.resize?k:q,"resize",p),f.adjust.scroll&&this._bind(q.add(f.container),"scroll",p)},z._unassignEvents=function(){var c=this.options,e=c.show.target,f=c.hide.target,g=d.grep([this.elements.target[0],this.rendered&&this.tooltip[0],c.position.container[0],c.position.viewport[0],c.position.container.closest("html")[0],a,b],function(a){return"object"==typeof a});e&&e.toArray&&(g=g.concat(e.toArray())),f&&f.toArray&&(g=g.concat(f.toArray())),this._unbind(g)._unbind(g,"destroy")._unbind(g,"inactive")},d(function(){q(W,["mouseenter","mouseleave"],function(a){var b="mouseenter"===a.type,c=d(a.currentTarget),e=d(a.relatedTarget||a.target),f=this.options;b?(this.focus(a),c.hasClass(Y)&&!c.hasClass(aa)&&clearTimeout(this.timers.hide)):"mouse"===f.position.target&&f.position.adjust.mouse&&f.hide.event&&f.show.target&&!e.closest(f.show.target[0]).length&&this.hide(a),c.toggleClass(_,b)}),q("["+U+"]",X,o)}),y=d.fn.qtip=function(a,b,e){var f=(""+a).toLowerCase(),g=F,i=d.makeArray(arguments).slice(1),j=i[i.length-1],k=this[0]?d.data(this[0],S):F;return!arguments.length&&k||"api"===f?k:"string"==typeof a?(this.each(function(){var a=d.data(this,S);if(!a)return D;if(j&&j.timeStamp&&(a.cache.event=j),!b||"option"!==f&&"options"!==f)a[f]&&a[f].apply(a,i);else{if(e===c&&!d.isPlainObject(b))return g=a.get(b),E;a.set(b,e)}}),g!==F?g:this):"object"!=typeof a&&arguments.length?void 0:(k=h(d.extend(D,{},a)),this.each(function(a){var b,c;return c=d.isArray(k.id)?k.id[a]:k.id,c=!c||c===E||c.length<1||y.api[c]?y.nextid++:c,b=r(d(this),c,k),b===E?D:(y.api[c]=b,d.each(R,function(){"initialize"===this.initialize&&this(b)}),void b._assignInitialEvents(j))}))},d.qtip=e,y.api={},d.each({attr:function(a,b){if(this.length){var c=this[0],e="title",f=d.data(c,"qtip");if(a===e&&f&&f.options&&"object"==typeof f&&"object"==typeof f.options&&f.options.suppress)return arguments.length<2?d.attr(c,ca):(f&&f.options.content.attr===e&&f.cache.attr&&f.set("content.text",b),this.attr(ca,b))}return d.fn["attr"+ba].apply(this,arguments)},clone:function(a){var b=d.fn["clone"+ba].apply(this,arguments);return a||b.filter("["+ca+"]").attr("title",function(){return d.attr(this,ca)}).removeAttr(ca),b}},function(a,b){if(!b||d.fn[a+ba])return D;var c=d.fn[a+ba]=d.fn[a];d.fn[a]=function(){return b.apply(this,arguments)||c.apply(this,arguments)}}),d.ui||(d["cleanData"+ba]=d.cleanData,d.cleanData=function(a){for(var b,c=0;(b=d(a[c])).length;c++)if(b.attr(T))try{b.triggerHandler("removeqtip")}catch(e){}d["cleanData"+ba].apply(this,arguments)}),y.version="3.0.3",y.nextid=0,y.inactiveEvents=X,y.zindex=15e3,y.defaults={prerender:E,id:E,overwrite:D,suppress:D,content:{text:D,attr:"title",title:E,button:E},position:{my:"top left",at:"bottom right",target:E,container:E,viewport:E,adjust:{x:0,y:0,mouse:D,scroll:D,resize:D,method:"flipinvert flipinvert"},effect:function(a,b){d(this).animate(b,{duration:200,queue:E})}},show:{target:E,event:"mouseenter",effect:D,delay:90,solo:E,ready:E,autofocus:E},hide:{target:E,event:"mouseleave",effect:D,delay:0,fixed:E,inactive:E,leave:"window",distance:E},style:{classes:"",widget:E,width:E,height:E,def:D},events:{render:F,move:F,show:F,hide:F,toggle:F,visible:F,hidden:F,focus:F,blur:F}};var ha,ia,ja,ka,la,ma="margin",na="border",oa="color",pa="background-color",qa="transparent",ra=" !important",sa=!!b.createElement("canvas").getContext,ta=/rgba?\(0, 0, 0(, 0)?\)|transparent|#123456/i,ua={},va=["Webkit","O","Moz","ms"];sa?(ka=a.devicePixelRatio||1,la=function(){var a=b.createElement("canvas").getContext("2d");return a.backingStorePixelRatio||a.webkitBackingStorePixelRatio||a.mozBackingStorePixelRatio||a.msBackingStorePixelRatio||a.oBackingStorePixelRatio||1}(),ja=ka/la):ia=function(a,b,c){return"<qtipvml:"+a+' xmlns="urn:schemas-microsoft.com:vml" class="qtip-vml" '+(b||"")+' style="behavior: url(#default#VML); '+(c||"")+'" />'},d.extend(v.prototype,{init:function(a){var b,c;c=this.element=a.elements.tip=d("<div />",{"class":S+"-tip"}).prependTo(a.tooltip),sa?(b=d("<canvas />").appendTo(this.element)[0].getContext("2d"),b.lineJoin="miter",b.miterLimit=1e5,b.save()):(b=ia("shape",'coordorigin="0,0"',"position:absolute;"),this.element.html(b+b),a._bind(d("*",c).add(c),["click","mousedown"],function(a){a.stopPropagation()},this._ns)),a._bind(a.tooltip,"tooltipmove",this.reposition,this._ns,this),this.create()},_swapDimensions:function(){this.size[0]=this.options.height,this.size[1]=this.options.width},_resetDimensions:function(){this.size[0]=this.options.width,this.size[1]=this.options.height},_useTitle:function(a){var b=this.qtip.elements.titlebar;return b&&(a.y===K||a.y===O&&this.element.position().top+this.size[1]/2+this.options.offset<b.outerHeight(D))},_parseCorner:function(a){var b=this.qtip.options.position.my;return a===E||b===E?a=E:a===D?a=new A(b.string()):a.string||(a=new A(a),a.fixed=D),a},_parseWidth:function(a,b,c){var d=this.qtip.elements,e=na+s(b)+"Width";return(c?u(c,e):u(d.content,e)||u(this._useTitle(a)&&d.titlebar||d.content,e)||u(d.tooltip,e))||0},_parseRadius:function(a){var b=this.qtip.elements,c=na+s(a.y)+s(a.x)+"Radius";return da.ie<9?0:u(this._useTitle(a)&&b.titlebar||b.content,c)||u(b.tooltip,c)||0},_invalidColour:function(a,b,c){var d=a.css(b);return!d||c&&d===a.css(c)||ta.test(d)?E:d},_parseColours:function(a){var b=this.qtip.elements,c=this.element.css("cssText",""),e=na+s(a[a.precedance])+s(oa),f=this._useTitle(a)&&b.titlebar||b.content,g=this._invalidColour,h=[];return h[0]=g(c,pa)||g(f,pa)||g(b.content,pa)||g(b.tooltip,pa)||c.css(pa),h[1]=g(c,e,oa)||g(f,e,oa)||g(b.content,e,oa)||g(b.tooltip,e,oa)||b.tooltip.css(e),d("*",c).add(c).css("cssText",pa+":"+qa+ra+";"+na+":0"+ra+";"),h},_calculateSize:function(a){var b,c,d,e=a.precedance===H,f=this.options.width,g=this.options.height,h="c"===a.abbrev(),i=(e?f:g)*(h?.5:1),j=Math.pow,k=Math.round,l=Math.sqrt(j(i,2)+j(g,2)),m=[this.border/i*l,this.border/g*l];return m[2]=Math.sqrt(j(m[0],2)-j(this.border,2)),m[3]=Math.sqrt(j(m[1],2)-j(this.border,2)),b=l+m[2]+m[3]+(h?0:m[0]),c=b/l,d=[k(c*f),k(c*g)],e?d:d.reverse()},_calculateTip:function(a,b,c){c=c||1,b=b||this.size;var d=b[0]*c,e=b[1]*c,f=Math.ceil(d/2),g=Math.ceil(e/2),h={br:[0,0,d,e,d,0],bl:[0,0,d,0,0,e],tr:[0,e,d,0,d,e],tl:[0,0,0,e,d,e],tc:[0,e,f,0,d,e],bc:[0,0,d,0,f,e],rc:[0,0,d,g,0,e],lc:[d,0,d,e,0,g]};return h.lt=h.br,h.rt=h.bl,h.lb=h.tr,h.rb=h.tl,h[a.abbrev()]},_drawCoords:function(a,b){a.beginPath(),a.moveTo(b[0],b[1]),a.lineTo(b[2],b[3]),a.lineTo(b[4],b[5]),a.closePath()},create:function(){var a=this.corner=(sa||da.ie)&&this._parseCorner(this.options.corner);return this.enabled=!!this.corner&&"c"!==this.corner.abbrev(),this.enabled&&(this.qtip.cache.corner=a.clone(),this.update()),this.element.toggle(this.enabled),this.corner},update:function(b,c){if(!this.enabled)return this;var e,f,g,h,i,j,k,l,m=this.qtip.elements,n=this.element,o=n.children(),p=this.options,q=this.size,r=p.mimic,s=Math.round;b||(b=this.qtip.cache.corner||this.corner),r===E?r=b:(r=new A(r),r.precedance=b.precedance,"inherit"===r.x?r.x=b.x:"inherit"===r.y?r.y=b.y:r.x===r.y&&(r[b.precedance]=b[b.precedance])),f=r.precedance,b.precedance===G?this._swapDimensions():this._resetDimensions(),e=this.color=this._parseColours(b),e[1]!==qa?(l=this.border=this._parseWidth(b,b[b.precedance]),p.border&&1>l&&!ta.test(e[1])&&(e[0]=e[1]),this.border=l=p.border!==D?p.border:l):this.border=l=0,k=this.size=this._calculateSize(b),n.css({width:k[0],height:k[1],lineHeight:k[1]+"px"}),j=b.precedance===H?[s(r.x===L?l:r.x===N?k[0]-q[0]-l:(k[0]-q[0])/2),s(r.y===K?k[1]-q[1]:0)]:[s(r.x===L?k[0]-q[0]:0),s(r.y===K?l:r.y===M?k[1]-q[1]-l:(k[1]-q[1])/2)],sa?(g=o[0].getContext("2d"),g.restore(),g.save(),g.clearRect(0,0,6e3,6e3),h=this._calculateTip(r,q,ja),i=this._calculateTip(r,this.size,ja),o.attr(I,k[0]*ja).attr(J,k[1]*ja),o.css(I,k[0]).css(J,k[1]),this._drawCoords(g,i),g.fillStyle=e[1],g.fill(),g.translate(j[0]*ja,j[1]*ja),this._drawCoords(g,h),g.fillStyle=e[0],g.fill()):(h=this._calculateTip(r),h="m"+h[0]+","+h[1]+" l"+h[2]+","+h[3]+" "+h[4]+","+h[5]+" xe",j[2]=l&&/^(r|b)/i.test(b.string())?8===da.ie?2:1:0,o.css({coordsize:k[0]+l+" "+k[1]+l,antialias:""+(r.string().indexOf(O)>-1),left:j[0]-j[2]*Number(f===G),top:j[1]-j[2]*Number(f===H),width:k[0]+l,height:k[1]+l}).each(function(a){var b=d(this);b[b.prop?"prop":"attr"]({coordsize:k[0]+l+" "+k[1]+l,path:h,fillcolor:e[0],filled:!!a,stroked:!a}).toggle(!(!l&&!a)),!a&&b.html(ia("stroke",'weight="'+2*l+'px" color="'+e[1]+'" miterlimit="1000" joinstyle="miter"'))})),a.opera&&setTimeout(function(){m.tip.css({display:"inline-block",visibility:"visible"})},1),c!==E&&this.calculate(b,k)},calculate:function(a,b){if(!this.enabled)return E;var c,e,f=this,g=this.qtip.elements,h=this.element,i=this.options.offset,j={};
return a=a||this.corner,c=a.precedance,b=b||this._calculateSize(a),e=[a.x,a.y],c===G&&e.reverse(),d.each(e,function(d,e){var h,k,l;e===O?(h=c===H?L:K,j[h]="50%",j[ma+"-"+h]=-Math.round(b[c===H?0:1]/2)+i):(h=f._parseWidth(a,e,g.tooltip),k=f._parseWidth(a,e,g.content),l=f._parseRadius(a),j[e]=Math.max(-f.border,d?k:i+(l>h?l:-h)))}),j[a[c]]-=b[c===G?0:1],h.css({margin:"",top:"",bottom:"",left:"",right:""}).css(j),j},reposition:function(a,b,d){function e(a,b,c,d,e){a===Q&&j.precedance===b&&k[d]&&j[c]!==O?j.precedance=j.precedance===G?H:G:a!==Q&&k[d]&&(j[b]=j[b]===O?k[d]>0?d:e:j[b]===d?e:d)}function f(a,b,e){j[a]===O?p[ma+"-"+b]=o[a]=g[ma+"-"+b]-k[b]:(h=g[e]!==c?[k[b],-g[b]]:[-k[b],g[b]],(o[a]=Math.max(h[0],h[1]))>h[0]&&(d[b]-=k[b],o[b]=E),p[g[e]!==c?e:b]=o[a])}if(this.enabled){var g,h,i=b.cache,j=this.corner.clone(),k=d.adjusted,l=b.options.position.adjust.method.split(" "),m=l[0],n=l[1]||l[0],o={left:E,top:E,x:0,y:0},p={};this.corner.fixed!==D&&(e(m,G,H,L,N),e(n,H,G,K,M),j.string()===i.corner.string()&&i.cornerTop===k.top&&i.cornerLeft===k.left||this.update(j,E)),g=this.calculate(j),g.right!==c&&(g.left=-g.right),g.bottom!==c&&(g.top=-g.bottom),g.user=this.offset,o.left=m===Q&&!!k.left,o.left&&f(G,L,N),o.top=n===Q&&!!k.top,o.top&&f(H,K,M),this.element.css(p).toggle(!(o.x&&o.y||j.x===O&&o.y||j.y===O&&o.x)),d.left-=g.left.charAt?g.user:m!==Q||o.top||!o.left&&!o.top?g.left+this.border:0,d.top-=g.top.charAt?g.user:n!==Q||o.left||!o.left&&!o.top?g.top+this.border:0,i.cornerLeft=k.left,i.cornerTop=k.top,i.corner=j.clone()}},destroy:function(){this.qtip._unbind(this.qtip.tooltip,this._ns),this.qtip.elements.tip&&this.qtip.elements.tip.find("*").remove().end().remove()}}),ha=R.tip=function(a){return new v(a,a.options.style.tip)},ha.initialize="render",ha.sanitize=function(a){if(a.style&&"tip"in a.style){var b=a.style.tip;"object"!=typeof b&&(b=a.style.tip={corner:b}),/string|boolean/i.test(typeof b.corner)||(b.corner=D)}},B.tip={"^position.my|style.tip.(corner|mimic|border)$":function(){this.create(),this.qtip.reposition()},"^style.tip.(height|width)$":function(a){this.size=[a.width,a.height],this.update(),this.qtip.reposition()},"^content.title|style.(classes|widget)$":function(){this.update()}},d.extend(D,y.defaults,{style:{tip:{corner:D,mimic:E,width:6,height:6,border:D,offset:0}}});var wa,xa,ya="qtip-modal",za="."+ya;xa=function(){function a(a){if(d.expr[":"].focusable)return d.expr[":"].focusable;var b,c,e,f=!isNaN(d.attr(a,"tabindex")),g=a.nodeName&&a.nodeName.toLowerCase();return"area"===g?(b=a.parentNode,c=b.name,a.href&&c&&"map"===b.nodeName.toLowerCase()?(e=d("img[usemap=#"+c+"]")[0],!!e&&e.is(":visible")):!1):/input|select|textarea|button|object/.test(g)?!a.disabled:"a"===g?a.href||f:f}function c(a){j.length<1&&a.length?a.not("body").blur():j.first().focus()}function e(a){if(h.is(":visible")){var b,e=d(a.target),g=f.tooltip,i=e.closest(W);b=i.length<1?E:parseInt(i[0].style.zIndex,10)>parseInt(g[0].style.zIndex,10),b||e.closest(W)[0]===g[0]||c(e)}}var f,g,h,i=this,j={};d.extend(i,{init:function(){return h=i.elem=d("<div />",{id:"qtip-overlay",html:"<div></div>",mousedown:function(){return E}}).hide(),d(b.body).bind("focusin"+za,e),d(b).bind("keydown"+za,function(a){f&&f.options.show.modal.escape&&27===a.keyCode&&f.hide(a)}),h.bind("click"+za,function(a){f&&f.options.show.modal.blur&&f.hide(a)}),i},update:function(b){f=b,j=b.options.show.modal.stealfocus!==E?b.tooltip.find("*").filter(function(){return a(this)}):[]},toggle:function(a,e,j){var k=a.tooltip,l=a.options.show.modal,m=l.effect,n=e?"show":"hide",o=h.is(":visible"),p=d(za).filter(":visible:not(:animated)").not(k);return i.update(a),e&&l.stealfocus!==E&&c(d(":focus")),h.toggleClass("blurs",l.blur),e&&h.appendTo(b.body),h.is(":animated")&&o===e&&g!==E||!e&&p.length?i:(h.stop(D,E),d.isFunction(m)?m.call(h,e):m===E?h[n]():h.fadeTo(parseInt(j,10)||90,e?1:0,function(){e||h.hide()}),e||h.queue(function(a){h.css({left:"",top:""}),d(za).length||h.detach(),a()}),g=e,f.destroyed&&(f=F),i)}}),i.init()},xa=new xa,d.extend(w.prototype,{init:function(a){var b=a.tooltip;return this.options.on?(a.elements.overlay=xa.elem,b.addClass(ya).css("z-index",y.modal_zindex+d(za).length),a._bind(b,["tooltipshow","tooltiphide"],function(a,c,e){var f=a.originalEvent;if(a.target===b[0])if(f&&"tooltiphide"===a.type&&/mouse(leave|enter)/.test(f.type)&&d(f.relatedTarget).closest(xa.elem[0]).length)try{a.preventDefault()}catch(g){}else(!f||f&&"tooltipsolo"!==f.type)&&this.toggle(a,"tooltipshow"===a.type,e)},this._ns,this),a._bind(b,"tooltipfocus",function(a,c){if(!a.isDefaultPrevented()&&a.target===b[0]){var e=d(za),f=y.modal_zindex+e.length,g=parseInt(b[0].style.zIndex,10);xa.elem[0].style.zIndex=f-1,e.each(function(){this.style.zIndex>g&&(this.style.zIndex-=1)}),e.filter("."+$).qtip("blur",a.originalEvent),b.addClass($)[0].style.zIndex=f,xa.update(c);try{a.preventDefault()}catch(h){}}},this._ns,this),void a._bind(b,"tooltiphide",function(a){a.target===b[0]&&d(za).filter(":visible").not(b).last().qtip("focus",a)},this._ns,this)):this},toggle:function(a,b,c){return a&&a.isDefaultPrevented()?this:void xa.toggle(this.qtip,!!b,c)},destroy:function(){this.qtip.tooltip.removeClass(ya),this.qtip._unbind(this.qtip.tooltip,this._ns),xa.toggle(this.qtip,E),delete this.qtip.elements.overlay}}),wa=R.modal=function(a){return new w(a,a.options.show.modal)},wa.sanitize=function(a){a.show&&("object"!=typeof a.show.modal?a.show.modal={on:!!a.show.modal}:"undefined"==typeof a.show.modal.on&&(a.show.modal.on=D))},y.modal_zindex=y.zindex-200,wa.initialize="render",B.modal={"^show.modal.(on|blur)$":function(){this.destroy(),this.init(),this.qtip.elems.overlay.toggle(this.qtip.tooltip[0].offsetWidth>0)}},d.extend(D,y.defaults,{show:{modal:{on:E,effect:D,blur:D,stealfocus:D,escape:D}}}),R.viewport=function(c,d,e,f,g,h,i){function j(a,b,c,e,f,g,h,i,j){var k=d[f],s=u[a],t=v[a],w=c===Q,x=s===f?j:s===g?-j:-j/2,y=t===f?i:t===g?-i:-i/2,z=q[f]+r[f]-(n?0:m[f]),A=z-k,B=k+j-(h===I?o:p)-z,C=x-(u.precedance===a||s===u[b]?y:0)-(t===O?i/2:0);return w?(C=(s===f?1:-1)*x,d[f]+=A>0?A:B>0?-B:0,d[f]=Math.max(-m[f]+r[f],k-C,Math.min(Math.max(-m[f]+r[f]+(h===I?o:p),k+C),d[f],"center"===s?k-x:1e9))):(e*=c===P?2:0,A>0&&(s!==f||B>0)?(d[f]-=C+e,l.invert(a,f)):B>0&&(s!==g||A>0)&&(d[f]-=(s===O?-C:C)+e,l.invert(a,g)),d[f]<q[f]&&-d[f]>B&&(d[f]=k,l=u.clone())),d[f]-k}var k,l,m,n,o,p,q,r,s=e.target,t=c.elements.tooltip,u=e.my,v=e.at,w=e.adjust,x=w.method.split(" "),y=x[0],z=x[1]||x[0],A=e.viewport,B=e.container,C={left:0,top:0};return A.jquery&&s[0]!==a&&s[0]!==b.body&&"none"!==w.method?(m=B.offset()||C,n="static"===B.css("position"),k="fixed"===t.css("position"),o=A[0]===a?A.width():A.outerWidth(E),p=A[0]===a?A.height():A.outerHeight(E),q={left:k?0:A.scrollLeft(),top:k?0:A.scrollTop()},r=A.offset()||C,"shift"===y&&"shift"===z||(l=u.clone()),C={left:"none"!==y?j(G,H,y,w.x,L,N,I,f,h):0,top:"none"!==z?j(H,G,z,w.y,K,M,J,g,i):0,my:l}):C},R.polys={polygon:function(a,b){var c,d,e,f={width:0,height:0,position:{top:1e10,right:0,bottom:0,left:1e10},adjustable:E},g=0,h=[],i=1,j=1,k=0,l=0;for(g=a.length;g--;)c=[parseInt(a[--g],10),parseInt(a[g+1],10)],c[0]>f.position.right&&(f.position.right=c[0]),c[0]<f.position.left&&(f.position.left=c[0]),c[1]>f.position.bottom&&(f.position.bottom=c[1]),c[1]<f.position.top&&(f.position.top=c[1]),h.push(c);if(d=f.width=Math.abs(f.position.right-f.position.left),e=f.height=Math.abs(f.position.bottom-f.position.top),"c"===b.abbrev())f.position={left:f.position.left+f.width/2,top:f.position.top+f.height/2};else{for(;d>0&&e>0&&i>0&&j>0;)for(d=Math.floor(d/2),e=Math.floor(e/2),b.x===L?i=d:b.x===N?i=f.width-d:i+=Math.floor(d/2),b.y===K?j=e:b.y===M?j=f.height-e:j+=Math.floor(e/2),g=h.length;g--&&!(h.length<2);)k=h[g][0]-f.position.left,l=h[g][1]-f.position.top,(b.x===L&&k>=i||b.x===N&&i>=k||b.x===O&&(i>k||k>f.width-i)||b.y===K&&l>=j||b.y===M&&j>=l||b.y===O&&(j>l||l>f.height-j))&&h.splice(g,1);f.position={left:h[0][0],top:h[0][1]}}return f},rect:function(a,b,c,d){return{width:Math.abs(c-a),height:Math.abs(d-b),position:{left:Math.min(a,c),top:Math.min(b,d)}}},_angles:{tc:1.5,tr:7/4,tl:5/4,bc:.5,br:.25,bl:.75,rc:2,lc:1,c:0},ellipse:function(a,b,c,d,e){var f=R.polys._angles[e.abbrev()],g=0===f?0:c*Math.cos(f*Math.PI),h=d*Math.sin(f*Math.PI);return{width:2*c-Math.abs(g),height:2*d-Math.abs(h),position:{left:a+g,top:b+h},adjustable:E}},circle:function(a,b,c,d){return R.polys.ellipse(a,b,c,c,d)}},R.svg=function(a,c,e){for(var f,g,h,i,j,k,l,m,n,o=c[0],p=d(o.ownerSVGElement),q=o.ownerDocument,r=(parseInt(c.css("stroke-width"),10)||0)/2;!o.getBBox;)o=o.parentNode;if(!o.getBBox||!o.parentNode)return E;switch(o.nodeName){case"ellipse":case"circle":m=R.polys.ellipse(o.cx.baseVal.value,o.cy.baseVal.value,(o.rx||o.r).baseVal.value+r,(o.ry||o.r).baseVal.value+r,e);break;case"line":case"polygon":case"polyline":for(l=o.points||[{x:o.x1.baseVal.value,y:o.y1.baseVal.value},{x:o.x2.baseVal.value,y:o.y2.baseVal.value}],m=[],k=-1,i=l.numberOfItems||l.length;++k<i;)j=l.getItem?l.getItem(k):l[k],m.push.apply(m,[j.x,j.y]);m=R.polys.polygon(m,e);break;default:m=o.getBBox(),m={width:m.width,height:m.height,position:{left:m.x,top:m.y}}}return n=m.position,p=p[0],p.createSVGPoint&&(g=o.getScreenCTM(),l=p.createSVGPoint(),l.x=n.left,l.y=n.top,h=l.matrixTransform(g),n.left=h.x,n.top=h.y),q!==b&&"mouse"!==a.position.target&&(f=d((q.defaultView||q.parentWindow).frameElement).offset(),f&&(n.left+=f.left,n.top+=f.top)),q=d(q),n.left+=q.scrollLeft(),n.top+=q.scrollTop(),m},R.imagemap=function(a,b,c){b.jquery||(b=d(b));var e,f,g,h,i,j=(b.attr("shape")||"rect").toLowerCase().replace("poly","polygon"),k=d('img[usemap="#'+b.parent("map").attr("name")+'"]'),l=d.trim(b.attr("coords")),m=l.replace(/,$/,"").split(",");if(!k.length)return E;if("polygon"===j)h=R.polys.polygon(m,c);else{if(!R.polys[j])return E;for(g=-1,i=m.length,f=[];++g<i;)f.push(parseInt(m[g],10));h=R.polys[j].apply(this,f.concat(c))}return e=k.offset(),e.left+=Math.ceil((k.outerWidth(E)-k.width())/2),e.top+=Math.ceil((k.outerHeight(E)-k.height())/2),h.position.left+=e.left,h.position.top+=e.top,h};var Aa,Ba='<iframe class="qtip-bgiframe" frameborder="0" tabindex="-1" src="javascript:\'\';"  style="display:block; position:absolute; z-index:-1; filter:alpha(opacity=0); -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";"></iframe>';d.extend(x.prototype,{_scroll:function(){var b=this.qtip.elements.overlay;b&&(b[0].style.top=d(a).scrollTop()+"px")},init:function(c){var e=c.tooltip;d("select, object").length<1&&(this.bgiframe=c.elements.bgiframe=d(Ba).appendTo(e),c._bind(e,"tooltipmove",this.adjustBGIFrame,this._ns,this)),this.redrawContainer=d("<div/>",{id:S+"-rcontainer"}).appendTo(b.body),c.elements.overlay&&c.elements.overlay.addClass("qtipmodal-ie6fix")&&(c._bind(a,["scroll","resize"],this._scroll,this._ns,this),c._bind(e,["tooltipshow"],this._scroll,this._ns,this)),this.redraw()},adjustBGIFrame:function(){var a,b,c=this.qtip.tooltip,d={height:c.outerHeight(E),width:c.outerWidth(E)},e=this.qtip.plugins.tip,f=this.qtip.elements.tip;b=parseInt(c.css("borderLeftWidth"),10)||0,b={left:-b,top:-b},e&&f&&(a="x"===e.corner.precedance?[I,L]:[J,K],b[a[1]]-=f[a[0]]()),this.bgiframe.css(b).css(d)},redraw:function(){if(this.qtip.rendered<1||this.drawing)return this;var a,b,c,d,e=this.qtip.tooltip,f=this.qtip.options.style,g=this.qtip.options.position.container;return this.qtip.drawing=1,f.height&&e.css(J,f.height),f.width?e.css(I,f.width):(e.css(I,"").appendTo(this.redrawContainer),b=e.width(),1>b%2&&(b+=1),c=e.css("maxWidth")||"",d=e.css("minWidth")||"",a=(c+d).indexOf("%")>-1?g.width()/100:0,c=(c.indexOf("%")>-1?a:1*parseInt(c,10))||b,d=(d.indexOf("%")>-1?a:1*parseInt(d,10))||0,b=c+d?Math.min(Math.max(b,d),c):b,e.css(I,Math.round(b)).appendTo(g)),this.drawing=0,this},destroy:function(){this.bgiframe&&this.bgiframe.remove(),this.qtip._unbind([a,this.qtip.tooltip],this._ns)}}),Aa=R.ie6=function(a){return 6===da.ie?new x(a):E},Aa.initialize="render",B.ie6={"^content|style$":function(){this.redraw()}}})}(window,document);
(function(e){e.InFieldLabels=function(n,i,t){var a=this;a.$label=e(n),a.label=n,a.$field=e(i),a.field=i,a.$label.data("InFieldLabels",a),a.showing=!0,a.init=function(){var n;a.options=e.extend({},e.InFieldLabels.defaultOptions,t),a.options.className&&a.$label.addClass(a.options.className),setTimeout(function(){""!==a.$field.val()?(a.$label.hide(),a.showing=!1):(a.$label.show(),a.showing=!0)},200),a.$field.focus(function(){a.fadeOnFocus()}).blur(function(){a.checkForEmpty(!0)}).bind("keydown.infieldlabel",function(e){a.hideOnChange(e)}).bind("paste",function(){a.setOpacity(0)}).change(function(){a.checkForEmpty()}).bind("onPropertyChange",function(){a.checkForEmpty()}).bind("keyup.infieldlabel",function(){a.checkForEmpty()}),a.options.pollDuration>0&&(n=setInterval(function(){""!==a.$field.val()&&(a.$label.hide(),a.showing=!1,clearInterval(n))},a.options.pollDuration))},a.fadeOnFocus=function(){a.showing&&a.setOpacity(a.options.fadeOpacity)},a.setOpacity=function(e){a.$label.stop().animate({opacity:e},a.options.fadeDuration,function(){0===e&&a.$label.hide()}),a.showing=e>0},a.checkForEmpty=function(e){""===a.$field.val()?(a.prepForShow(),a.setOpacity(e?1:a.options.fadeOpacity)):a.setOpacity(0)},a.prepForShow=function(){a.showing||(a.$label.css({opacity:0}).show(),a.$field.bind("keydown.infieldlabel",function(e){a.hideOnChange(e)}))},a.hideOnChange=function(e){16!==e.keyCode&&9!==e.keyCode&&(a.showing&&(a.$label.hide(),a.showing=!1),a.$field.unbind("keydown.infieldlabel"))},a.init()},e.InFieldLabels.defaultOptions={fadeOpacity:.5,fadeDuration:300,pollDuration:0,enabledInputTypes:["text","search","tel","url","email","password","number","textarea"],className:!1},e.fn.inFieldLabels=function(n){var i=n&&n.enabledInputTypes||e.InFieldLabels.defaultOptions.enabledInputTypes;return this.each(function(){var t,a,o=e(this).attr("for");o&&(t=document.getElementById(o),t&&(a=e.inArray(t.type,i),(-1!==a||"TEXTAREA"===t.nodeName)&&new e.InFieldLabels(this,t,n)))})}})(jQuery);
!function(d){"use strict";var e;function h(e,t){if(this.$form=d(e),this.submitted=!1,this.nextUploadId=1,this.removedUploadUids=[],this.captchaRefreshQueue=[],this.uploadQueue=[],this.uploadElements=[],this.logicCache={},!this.$form.length)throw new Error("Form not found.");if(this.$form.data("quform"))throw new Error("Quform already attached.");this.$form.data("quform",this),this.options=d.extend({},h.defaults,t),d.isFunction(d.scrollTo)&&d.isFunction(d.fn.scrollTo)||(this.options.scrolling=!1),this.$wrapper=this.$form.closest(".quform"),this.$elements=d(".quform-elements",this.$form),this.$loading=d(".quform-loading",this.$form),this.currentPageId=this.options.currentPageId,this.submitStartTime=0,this.submitEndTime=0,this.successTimeout=null,this.errorShowFunction=this.$wrapper.hasClass("quform-errors-absolute")?"fadeIn":"quformShowSlide",this.init()}h.defaults={errorsIcon:"",scrolling:!0,scrollSpeed:800,scrollDelay:0,scrollOffset:-50,hasPages:!1,pages:[],logic:{logic:[],dependents:[],elementIds:[],dependentElementIds:[],animate:!0}},h.prototype.init=function(){var a=this;this.setupInsideLabels(),this.setupEnhancedSelects(),this.setupEnhancedUploaders(),this.setupDatepickers(),this.setupTimepickers(),this.applyAllLogic(!0),this.setupTooltips(),this.setupCaptchaImages(),this.$wrapper.hasClass("quform-prevent-fouc")&&this.$wrapper.removeClass("quform-prevent-fouc"),this.options.ajax&&(a.$form.on("submit",function(e){if(e.preventDefault(),window.grecaptcha){var t=a.$form.find(".quform-recaptcha");if(t.length){var o=t.data("config");if("v3"===o._version)return void window.grecaptcha.execute(t.data("recaptcha-id"),{action:"quform"}).then(function(e){t.find(".g-recaptcha-response").val(e),a.submit()});if("invisible"===o.size)return void window.grecaptcha.execute(t.data("recaptcha-id"))}}a.submit()}),d(".quform-back",a.$form).on("click",function(e){e.preventDefault(),a.submit("back")}),a.$form.addClass("quform-ajax-initialized")),d(".quform-field-select.quform-submit-on-choice",a.$form).change(function(){a.$form.submit()}),d(".quform-field-radio.quform-submit-on-choice",a.$form).click(function(){a.$form.submit()}),d(".quform-button-submit > button",a.$form).each(function(){var e,t,o=d(this),i=o.closest(".quform-button-submit"),r=i.data("animation"),n=1e3,s=a.options.scrollDelay;r&&(e="quform-button-animation-"+r,"two"===r&&(n=3200),o.click(function(){a.options.scrollDelay=n,i.removeClass(e),"number"==typeof t&&(clearTimeout(t),t=null),setTimeout(function(){i.addClass(e),t=setTimeout(function(){i.removeClass(e),a.options.scrollDelay=s},n)},4)}))})},h.prototype.setupInsideLabels=function(){var r=this;d.InFieldLabels?d(".quform-labels-inside > .quform-spacer > .quform-label",r.$form).each(function(){var e=d(this),t=e.parent().find(".quform-input"),o=t.find(".quform-field"),i={top:parseInt(o.css("padding-top"),10)+parseInt(o.css("border-top-width"),10)};r.options.isRtl?i.right=parseInt(o.css("padding-right"),10)+parseInt(o.css("border-right-width"),10):i.left=parseInt(o.css("padding-left"),10)+parseInt(o.css("border-left-width"),10),e.addClass("quform-label-inside").css(i).appendTo(t),new d.InFieldLabels(e[0],o[0])}):d(".quform-labels-inside > .quform-spacer > .quform-label",r.$form).show()},h.prototype.setupEnhancedSelects=function(){var r;"function"==typeof d.fn.select2&&(d(".quform-field-select-enhanced",(r=this).$form).each(function(){var e=d(this),t=e.data("options"),o={theme:"quform",language:{noResults:function(){return t.noResultsFound}}};t.search||(o.minimumResultsForSearch=Infinity),t.rtl&&(o.dir="rtl"),e.select2(o);var i="quform-"+r.options.id+"-select2";h.isNonEmptyString(r.options.theme)&&(i+=" quform-theme-"+r.options.theme),e.on("select2:opening",function(){e.data("select2").$dropdown.addClass(i)})}),d(".quform-field-multiselect-enhanced",r.$form).each(function(){var e=d(this),t=e.data("options"),o={theme:"quform",language:{noResults:function(){return t.noResultsFound}}};h.isNonEmptyString(t.placeholder)&&(o.placeholder=t.placeholder),t.rtl&&(o.dir="rtl"),e.select2(o);var i="quform-"+r.options.id+"-select2";h.isNonEmptyString(r.options.theme)&&(i+=" quform-theme-"+r.options.theme),e.on("select2:opening",function(){e.data("select2").$dropdown.addClass(i)})}))},h.prototype.setupEnhancedUploaders=function(){var s;d.isFunction(d.fn.fileupload)&&d.support.xhrFileUpload&&d.support.xhrFormDataFileUpload&&d(".quform-field-file-enhanced",(s=this).$form).each(function(){var e,t=d(this),o=t.closest(".quform-input-file"),i=t.data("config"),r=d('<div class="quform-upload-files quform-cf">').insertAfter(o).hide();i.queued=0,s.uploadElements.push(i),e="dropzone"===i.buttonType?s.createUploadButton("quform-upload-dropzone",i):s.createUploadButton("quform-upload-button",i),o.append(e.append(t));var n=t.closest(".quform-element").addClass("quform-enhanced-upload");t.fileupload({dataType:"json",paramName:i.name+"[]",dropZone:e,change:function(){n.find(".quform-error").empty().remove()},add:function(e,t){s.uploadAdd(t,i,r)},start:function(){d(".quform-upload-progress-wrap",s.$form).show()},progress:function(e,t){var o=Math.min(100,t.loaded/t.total*100);d(".quform-upload-progress-bar",s.$form).css("width",o+"%"),d(".quform-upload-filename",s.$form).text(t.files[0].name)}})})},h.prototype.createUploadButton=function(e,t){var o,i=d('<div class="'+e+'">');return i.append(d('<span class="'+e+'-text">').html(t.buttonText)),h.isNonEmptyString(t.buttonIcon)&&(o=d('<span class="'+e+'-icon">').append(d('<i class="'+t.buttonIcon+'">')),i.addClass(e+"-icon-"+t.buttonIconPosition),"right"===t.buttonIconPosition?i.append(o):i.prepend(o)),i},h.prototype.setupDatepickers=function(){var m;d.isFunction(d.fn.kendoDatePicker)&&d(".quform-field-date",(m=this).$form).each(function(){var o=d(this).addClass("quform-field-date-enhanced"),e=o.closest(".quform-input-date"),t=e.find("> .quform-field-icon"),i=o.data("options"),r=d("<input>",{type:"hidden",name:o.attr("name"),value:o.val()}).data("default",o.val()).addClass("quform-field-date-hidden").insertAfter(o);o.attr("name",""),i.placeholder?o.attr("placeholder",i.placeholder):o.removeAttr("placeholder");var n,s,a={start:i.start||"month",depth:i.depth||"month",culture:i.locale||"en-US"};i.format?a.format=i.format:a.format=kendo.getCulture(i.locale).calendars.standard.patterns.d,i.showFooter||(a.footer=!1),!i.min||null!==(n=kendo.parseDate(i.min,"yyyy-MM-dd"))&&(a.min=n),!i.max||null!==(s=kendo.parseDate(i.max,"yyyy-MM-dd"))&&(a.max=s),o.kendoDatePicker(a),o.removeClass("k-input").closest(".k-datepicker").removeAttr("class").addClass("k-widget k-datepicker k-header");var u=o.data("kendoDatePicker"),c="quform-datepicker quform-"+m.options.id+"-datepicker quform-"+i.identifier+"-datepicker";h.isNonEmptyString(m.options.theme)&&(c+=" quform-theme-"+m.options.theme),u.dateView.popup.element.addClass(c),e.find(".k-select").hide(),i.autoOpen&&o.on("click focus",function(){u.open()}).blur(function(){u.close()}),t.click(function(){u.open()});var l=function(){var e,t=o.val();h.isNonEmptyString(t)?null===(e=kendo.parseDate(t,a.format,a.culture))?r.val("9999-99-99"):r.val(kendo.toString(e,"yyyy-MM-dd")):r.val("")};u.bind("change",l),o.on("blur.quformDatePicker keyup.quformDatePicker",l);var p,f=o.val();!h.isNonEmptyString(f)||null!==(p=kendo.parseDate(f,"yyyy-MM-dd"))&&(u.value(p),l())})},h.prototype.setupTimepickers=function(){var m;d.isFunction(d.fn.kendoTimePicker)&&d(".quform-field-time",(m=this).$form).each(function(){var o=d(this).addClass("quform-field-time-enhanced"),e=o.closest(".quform-input-time"),t=e.find("> .quform-field-icon"),i=o.data("options"),r=d("<input>",{type:"hidden",name:o.attr("name"),value:o.val()}).data("default",o.val()).addClass("quform-field-time-hidden").insertAfter(o);o.attr("name",""),i.placeholder?o.attr("placeholder",i.placeholder):o.removeAttr("placeholder");var n,s,a={interval:i.interval&&d.isNumeric(i.interval)?parseInt(i.interval,10):30,culture:i.locale||"en-US"};i.format?a.format=i.format:a.format=kendo.getCulture(i.locale).calendars.standard.patterns.t,!i.min||null!==(n=kendo.parseDate(i.min,"HH:mm"))&&(a.min=n),!i.max||null!==(s=kendo.parseDate(i.max,"HH:mm"))&&(a.max=s),o.kendoTimePicker(a),o.removeClass("k-input").closest(".k-timepicker").removeAttr("class").addClass("k-widget k-timepicker k-header");var u=o.data("kendoTimePicker"),c="quform-timepicker quform-"+m.options.id+"-timepicker quform-"+i.identifier+"-timepicker";h.isNonEmptyString(m.options.theme)&&(c+=" quform-theme-"+m.options.theme),u.timeView.popup.element.addClass(c),e.find(".k-select").hide(),i.autoOpen&&o.on("click focus",function(){u.open()}).blur(function(){u.close()}),t.click(function(){u.open()});var l=function(){var e,t=o.val();h.isNonEmptyString(t)?null===(e=kendo.parseDate(t,a.format,a.culture))?r.val("99:99"):r.val(kendo.toString(e,"HH:mm")):r.val("")};u.bind("change",l),o.on("blur.quformTimePicker keyup.quformTimePicker",l);var p,f=o.val();!h.isNonEmptyString(f)||null!==(p=kendo.parseDate(f,"HH:mm"))&&(u.value(p),l())})},h.prototype.setupTooltips=function(){var e;d.isFunction(d.fn.qtip)&&this.options.tooltipsEnabled&&(e={style:{classes:this.options.tooltipClasses},position:{my:this.options.tooltipMy,at:this.options.tooltipAt,viewport:!0,adjust:{method:"shift shift"}}},d(".quform-tooltip-hover",this.$form).qtip(d.extend({},e,{content:{text:function(){return d(this).closest(".quform-input").find("> .quform-tooltip-content").html()}}})),d(".quform-tooltip-click",this.$form).qtip(d.extend({},e,{show:{event:"focus"},hide:{event:"unfocus"},content:{text:function(){return d(this).closest(".quform-input").find("> .quform-tooltip-content").html()}}})),d(".quform-tooltip-icon-hover",this.$form).qtip(d.extend({},e,{content:{text:function(){return d(this).find(".quform-tooltip-icon-content").html()}}})),d(".quform-tooltip-icon-click",this.$form).qtip(d.extend({},e,{show:{event:"click"},hide:{event:"unfocus"},content:{text:function(){return d(this).find(".quform-tooltip-icon-content").html()}}})),d(".quform-labels-inside > .quform-spacer > .quform-inner > .quform-input > .quform-label",this.$form).hover(function(){d(this).siblings(".quform-tooltip-hover").qtip("show")},function(){d(this).siblings(".quform-tooltip-hover").qtip("hide")}))},h.prototype.setupCaptchaImages=function(){var e=this;d(".quform-captcha-image img",this.$form).hover(function(){d(this).stop().fadeTo(400,"0.3")},function(){d(this).stop().fadeTo(400,"1.0")}).click(function(){e.captchaRefreshQueue.push(d(this)),e.processCaptchaRefreshQueue()})},h.prototype.processCaptchaRefreshQueue=function(t){var o,i=this;i.captchaRefreshQueue.length?(o=i.captchaRefreshQueue.shift(),d.ajax({type:"GET",url:quformL10n.ajaxUrl,dataType:"json",data:{action:"quform_regenerate_captcha",quform_form_id:i.options.id,quform_unique_id:i.options.uniqueId,quform_element_id:o.data("element-id")}}).done(function(e){"success"===(e=h.sanitizeResponse(e)).type&&o.attr("src",e.image).animate({opacity:1}),i.captchaRefreshQueue.length?i.processCaptchaRefreshQueue(t):"function"==typeof t&&t.call(i)})):"function"==typeof t&&t.call(i)},h.prototype.applyAllLogic=function(e){this.logicCache={},this.options.logic.elementIds.length&&(this.applyLogic(this.options.logic.elementIds,e),e&&this.applyDependentLogic(this.options.logic.dependentElementIds))},h.prototype.applyLogic=function(e,t){for(var o=0,i=e.length;o<i;o++)this.applyElementLogic(e[o],t)},h.prototype.applyElementLogic=function(e,t){if(this.options.logic&&this.options.logic.logic){var o=this.options.logic.logic[e];if(o&&o.rules&&o.rules.length){for(var i=0,r=o.action,n=this.options.id+"_"+e,s=0;s<o.rules.length;s++)this.isLogicRuleMatch(o.rules[s])&&i++;"any"===o.match&&0<i||"all"===o.match&&i===o.rules.length||(r=!r);var a=this,u=d(".quform-element-"+n,a.$form),c=r?"show":"hide";!t&&this.options.logic.animate?u.animate({opacity:c,height:c,marginTop:c,marginBottom:c,paddingTop:c,paddingBottom:c},{duration:400,complete:function(){a.updateFancybox()}}):(u[c](),t||a.updateFancybox())}}},h.prototype.applyDependentLogic=function(e){if(this.options.logic&&this.options.logic.dependents)for(var r=this,t=0,o=e.length;t<o;t++){var i,n=this.options.logic.dependents[e[t]],s=this.options.id+"_"+e[t],a=d(".quform-field-"+s,this.$form);a.length&&(a.is("select")||a.is('input[type="checkbox"]')||a.is('input[type="radio"]')||a.is('input[type="hidden"]')?i="change.quform":a.is('textarea, input[type="text"], input[type="email"], input[type="password"]')&&(i="keyup.quform blur.quform",(a.hasClass("quform-field-date-enhanced")||a.hasClass("quform-field-time-enhanced"))&&(i="change.quform")),i&&function(e,t,o,i){e.on(t,function(){r.logicCache[i]=[],setTimeout(function(){r.applyLogic(o)},0)})}(a,i,n,s))}},h.prototype.isLogicRuleMatch=function(e){var t=this.options.id+"_"+e.elementId;if(d.isArray(this.logicCache[t])){if(this.logicCache[t].length)for(var o=0,i=this.logicCache[t].length;o<i;o++)if(this.logicCache[t][o].operator===e.operator&&this.logicCache[t][o].value===e.value)return this.logicCache[t][o].result}else this.logicCache[t]=[];var r,n,s=d(".quform-field-"+t,this.$form),a=!1;return s.length&&(s.is('select:not([multiple]), input[type="hidden"], textarea, input[type="text"], input[type="email"], input[type="password"]')?(n=s.val(),s.hasClass("quform-field-date-enhanced")?(r="date",n=s.closest(".quform-input").find(".quform-field-date-hidden").val()):s.hasClass("quform-field-time-enhanced")&&(r="time",n=s.closest(".quform-input").find(".quform-field-time-hidden").val()),a=this.isLogicValueMatch(n,e,r)):s.is('input[type="checkbox"]')?(n=[],s.filter(":checked").each(function(){n.push(d(this).val())}),a=this.isLogicArrayValueMatch(n,e)):s.is('input[type="radio"]')?(n=s.filter(":checked").val()||"",a=this.isLogicValueMatch(n,e)):s.is("select[multiple]")&&(n=s.val()||[],a=this.isLogicArrayValueMatch(n,e))),this.logicCache[t].push({operator:e.operator,value:e.value,result:a}),a},h.prototype.isLogicValueMatch=function(e,t,o){switch("string"!=typeof e&&(e=""),t.operator){case"eq":return e===t.value;case"neq":return e!==t.value;case"empty":return""===e;case"not_empty":return""!==e;case"gt":return"date"===o?1===h.compareDates(e,t.value):"time"===o?1===h.compareTimes(e,t.value):d.isNumeric(e)&&d.isNumeric(t.value)&&parseFloat(e)>parseFloat(t.value);case"lt":return"date"===o?-1===h.compareDates(e,t.value):"time"===o?-1===h.compareTimes(e,t.value):d.isNumeric(e)&&d.isNumeric(t.value)&&parseFloat(e)<parseFloat(t.value);case"contains":return-1!==e.indexOf(t.value);case"starts_with":return 0===e.indexOf(t.value);case"ends_with":return-1!==e.indexOf(t.value,t.value.length)}return!1},h.prototype.isLogicArrayValueMatch=function(e,t){var o=!1;if(e.length){if("not_empty"===t.operator)o=!0;else for(var i=0;i<e.length;i++)if(this.isLogicValueMatch(e[i],t)){o=!0;break}}else"neq"!==t.operator&&"empty"!==t.operator||(o=!0);return o},h.prototype.uploadAdd=function(e,i,r){var t,o,n=this,s=e.files[0];i.max&&i.queued===i.max?this.addElementError(i.identifier,i.tooMany.replace("%max%",i.max))[this.errorShowFunction]():!i.allowedExtensions||h.isValidFile(s,i.allowedExtensions)?i.size&&s.size>i.size?this.addElementError(i.identifier,i.tooBigWithFilename.replace("%filename%",s.name))[this.errorShowFunction]():(t=this.nextUploadId++,e.formData={quform_ajax_uploading:1,quform_form_id:this.options.id,quform_form_uid:this.options.uniqueId,quform_element_id:i.id,quform_element_identifier:i.identifier,quform_upload_id:t},this.uploadQueue.push(e),i.queued++,o=e.context=d('<div class="quform-upload-file">').data("quform-upload-id",t),d('<span class="quform-upload-file-name">').text(s.name).appendTo(o),d('<span class="quform-upload-file-remove">').attr("title",quformL10n.removeFile).click(function(){for(var e=d(this).closest(".quform-upload-file"),t=e.data("quform-upload-id"),o=n.uploadQueue.length;o--;)n.uploadQueue[o].formData.quform_upload_id===t&&n.uploadQueue.splice(o,1);e.data("quform-upload-uid")&&n.removedUploadUids.push(e.data("quform-upload-uid")),e.remove(),0===r.children().length&&r.hide(),i.queued--}).appendTo(o),r.append(o).show()):this.addElementError(i.identifier,i.notAllowedTypeWithFilename.replace("%filename%",s.name))[this.errorShowFunction]()},h.prototype.processUploadQueue=function(){var t=this,o=t.uploadQueue.shift();o.submit().done(function(e){"success"===(e=h.sanitizeResponse(e)).type?(o.context.addClass("quform-uploaded").prepend(d('<span class="quform-upload-tick"><i class="qicon-check">')).data("quform-upload-uid",e.uid),t.uploadQueue.length?t.processUploadQueue():(d(".quform-upload-progress-wrap",t.$form).hide(),t.submitted=!1,t.submit())):t.uploadError(o,e.message)}).fail(function(){t.uploadError(o,quformL10n.ajaxError)})},h.prototype.uploadError=function(e,t){d(".quform-upload-progress-wrap",this.$form).hide(),this.uploadQueue.unshift(e),this.allowResubmission(),this.addElementError(e.formData.quform_element_identifier,t)[this.errorShowFunction](),this.scrollTo(d(".quform-element-"+e.formData.quform_element_identifier,this.$form))},h.prototype.submit=function(e){var t,o=this;o.submitted||(o.submitStartTime=h.timeNow(),o.submitted=!0,e="back"===e?"back":"submit",o.$form.trigger("quform:submit",[o,e]),o.$loading.fadeIn().addClass("quform-loading-triggered"),"submit"===e&&this.uploadQueue.length?o.processUploadQueue():(t={quform_ajax:1,quform_submit:e,quform_removed_upload_uids:o.removedUploadUids.join(",")},o.$form.ajaxSubmit({type:"POST",data:t,dataType:"json",iframe:!0,iframeSrc:"about:blank",url:"",success:function(e){switch(o.submitEndTime=h.timeNow(),(e=h.sanitizeResponse(e)).type){case"success":o.responseSuccess(e.confirmation);break;case"error":o.responseError(e);break;case"page":o.allowResubmission(),o.goToPage(e.page);break;case"invalid":o.responseInvalid(e)}},error:function(){o.submitEndTime=h.timeNow(),o.responseInvalid({message:quformL10n.ajaxError})}})))},h.prototype.responseSuccess=function(e){var t=this;t.$form.trigger("quform:successStart",[t,e]),t.$loading.addClass("quform-loading-success");var o=function(){switch(e.type){case"message":t.reset(e.resetForm),t.showSuccessMessage(e);break;case"message-redirect-page":case"message-redirect-url":t.showSuccessMessage(e),setTimeout(function(){window.location=e.redirectUrl},1e3*parseFloat(e.redirectDelay));break;case"redirect-page":case"redirect-url":window.location=e.redirectUrl;break;case"reload":window.location.reload()}};e.hideForm?t.$elements.quformHideSlide(function(){o()}):o()},h.prototype.showSuccessMessage=function(e){var t=this,o=d('<div class="quform-success-message-animate">').hide(),i=d('<div class="quform-success-message quform-success-message-'+t.options.id+'">').appendTo(o);h.isNonEmptyString(e.messageIcon)&&i.addClass("quform-success-message-has-icon").append('<div class="quform-success-message-icon"><i class="'+e.messageIcon+'"></i></div>'),i.append(d('<div class="quform-success-message-content">').html(e.message)),o["below"===e.messagePosition?"insertAfter":"insertBefore"](t.$elements).quformShowSlide(),setTimeout(function(){t.scrollTo(o)},t.getScrollDelay());var r=1e3*parseFloat(e.messageTimeout);0<r&&(t.successTimeout=setTimeout(function(){o.quformHideSlide(function(){t.updateFancybox()})},r))},h.prototype.responseError=function(e){var i=this,r=null,t=!1;i.$form.trigger("quform:errorStart",[i,e]),i.allowResubmission(),"object"==typeof e.error&&null!==e.error&&e.error.enabled&&"string"==typeof e.error.content&&e.error.content.length&&(i.errorMessage(e.error.content,e.error.title),t=!0),d.each(e.errors,function(e,t){var o=d(".quform-element-"+e,i.$form);o.length&&(i.addElementError(e,t),r=r||o)}),i.options.hasPages&&e.page!==i.currentPageId&&i.goToPage(e.page),d(".quform-error",i.$form)[this.errorShowFunction](),!t&&r&&setTimeout(function(){i.scrollTo(r)},i.getScrollDelay()),i.updateFancybox(),i.$form.trigger("quform:errorEnd",[i,e])},h.prototype.responseInvalid=function(e){this.allowResubmission(),this.errorMessage(e.message,quformL10n.errorMessageTitle)},h.prototype.goToPage=function(e){var t,o,i,r=d(".quform-page-"+e,this.$form);r.length&&1<this.options.pages.length&&(-1<(t=d.inArray(e,this.options.pages))&&(this.$form.trigger("quform:goToPageStart",[this,r,e,t]),this.currentPageId=e,d('input[name="quform_current_page_id"]',this.$form).val(e),d(".quform-current-page",this.$form).hide().removeClass("quform-current-page"),r.show().addClass("quform-current-page"),(o=this.$form.closest(".quform")).removeClass("quform-is-first-page quform-is-last-page"),0===t?o.addClass("quform-is-first-page"):t===this.options.pages.length-1&&o.addClass("quform-is-last-page"),this.scrollTo(this.$form),i=Math.round((t+1)/this.options.pages.length*100),"numbers"===this.options.pageProgressType||"percentage"===this.options.pageProgressType?(d(".quform-page-progress-bar",this.$form).width(i+"%"),"numbers"===this.options.pageProgressType?d(".quform-page-progress-text > .quform-page-progress-number",this.$form).text(t+1):d(".quform-page-progress-text > .quform-page-progress-percentage",this.$form).text(i)):"tabs"===this.options.pageProgressType&&(d(".quform-page-progress-tab.quform-current-tab",this.$form).removeClass("quform-current-tab"),d(".quform-page-progress-tab",this.$form).filter(function(){return d(this).data("id")===e}).addClass("quform-current-tab")),this.$form.trigger("quform:goToPageEnd",[this,r,e,t])))},h.prototype.allowResubmission=function(){var e=this;e.$loading.removeClass("quform-loading-triggered").fadeOut(function(){e.$loading.removeClass("quform-loading-success")}),d(".quform-error-message, .quform-error, .quform-success-message-animate",e.$form).remove(),d(".quform-has-error",e.$form).removeClass("quform-has-error"),"number"==typeof e.successTimeout&&(clearTimeout(e.successTimeout),e.successTimeout=null),window.grecaptcha&&d(".quform-recaptcha",e.$form).each(function(){if("v3"!==d(this).data("config")._version)try{window.grecaptcha.reset(d(this).data("recaptcha-id"))}catch(e){}}),d(".quform-upload-progress-bar",e.$form).width(0),d(".quform-upload-filename",e.$form).text(""),e.submitted=!1},h.prototype.reset=function(e){var t=this;switch(t.$form.trigger("quform:resetStart",[t,e]),t.allowResubmission(),e){default:case"":t.$form.resetForm(),d("input.quform-field-date-enhanced",t.$form).each(function(){var e=d(this),t=e.closest(".quform-input").find(".quform-field-date-hidden").data("default"),o=e.data("kendoDatePicker"),t=h.isNonEmptyString(t)?kendo.parseDate(t,"yyyy-MM-dd"):null;o.value(t),o.trigger("change"),o.dateView.calendar&&o.dateView.calendar.navigate(null===t?new Date:t)}),d("input.quform-field-time-enhanced",t.$form).each(function(){var e=d(this),t=e.closest(".quform-input").find(".quform-field-time-hidden").data("default"),o=e.data("kendoTimePicker"),t=h.isNonEmptyString(t)?kendo.parseDate(t,"HH:mm"):null;o.value(t),o.trigger("change")}),d(".quform-field-hidden",t.$form).each(function(){var e=d(this);e.val(e.data("default")).change()});break;case"clear":t.$form.clearForm(),d("select",t.$form).each(function(){d(this).prop("selectedIndex",0)}),d("input.quform-field-date-enhanced",t.$form).each(function(){var e=d(this).data("kendoDatePicker");e.value(null),e.trigger("change"),e.dateView.calendar&&e.dateView.calendar.navigate(new Date)}),d("input.quform-field-time-enhanced",t.$form).each(function(){var e=d(this).data("kendoTimePicker");e.value(null),e.trigger("change")}),d(".quform-field-hidden",t.$form).val("").change();break;case"keep":}d(".quform-captcha-image img",t.$form).each(function(){t.captchaRefreshQueue.push(d(this))}),t.processCaptchaRefreshQueue(),d('input[type="text"], input[type="email"], textarea',t.$form).blur(),t.applyAllLogic(),d(".quform-field-select-enhanced, .quform-field-multiselect-enhanced",t.$form).trigger("change"),t.removedUploadUids=[],d(".quform-upload-files",t.$form).empty().hide();for(var o=0,i=t.uploadElements.length;o<i;o++)t.uploadElements[o].queued=0;d('input[type="file"]',t.$form).each(function(){var e=d(this);e.replaceWith(e.val("").clone(!0))}),d(".qtip").hide(),t.options.hasPages&&t.goToPage(t.options.pages[0]),t.$form.trigger("quform:resetEnd",[t,e])},h.prototype.errorMessage=function(e,t){var o=this,i=d('<div class="quform-error-message">').hide(),r=d('<div class="quform-error-message-inner">');"string"==typeof t&&t.length&&r.append(d('<div class="quform-error-message-title">').html(t)),r.append(d('<div class="quform-error-message-content">').html(e)).appendTo(i),o.$elements.prepend(i),i.quformShowSlide(),setTimeout(function(){o.scrollTo(i)},o.getScrollDelay())},h.prototype.addElementError=function(e,t){var o,i=d('<div class="quform-error quform-cf">'),r=d('<div class="quform-error-inner">').appendTo(i);return h.isNonEmptyString(this.options.errorsIcon)&&r.append(d('<span class="quform-error-icon">').append('<i class="'+this.options.errorsIcon+'"></i>')),r.append(d('<span class="quform-error-text">').html(t)),this.$wrapper.hasClass("quform-errors-absolute")&&((o=d('<span class="quform-error-close">').append('<i class="qicon-close">')).click(function(){d(this).closest(".quform-error").fadeOut()}),r.append(o)),d(".quform-element-"+e,this.$form).addClass("quform-has-error"),d(".quform-input-"+e,this.$form).after(i),i},h.prototype.scrollTo=function(e){var t;this.options.scrolling&&e&&e.length&&((t=this.getScrollElement())?t.scrollTo(e,this.options.scrollSpeed,{axis:"y",offset:this.options.scrollOffset}):h.isScrolledIntoView(e,this.options.scrollOffset)||d.scrollTo(e,this.options.scrollSpeed,{axis:"y",offset:this.options.scrollOffset}))},h.prototype.getScrollDelay=function(){return 0<this.options.scrollDelay?h.clamp(this.options.scrollDelay-(this.submitEndTime-this.submitStartTime),0,3200):0},h.prototype.getScrollElement=function(){var e=null;return this.$form.closest(".fancybox-slide").length?e=this.$form.closest(".quform").hasClass("quform-max-height")?this.$form.closest(".quform"):this.$form.closest(".fancybox-slide"):this.$form.closest(".fancybox-inner").length?e=this.$form.closest(".fancybox-inner"):this.$form.closest("#fancybox-content").length?this.$form.closest(".quform").hasClass("quform-custom-dimensions")&&(e=this.$form.closest("#fancybox-content > div")):this.$form.closest(".mfp-wrap").length&&(this.$form.closest(".quform").hasClass("quform-max-height")?e=this.$form.closest(".quform"):d.magnificPopup&&d.magnificPopup.instance&&d.magnificPopup.instance.fixedContentPos&&(e=this.$form.closest(".mfp-wrap"))),e},h.prototype.updateFancybox=function(){var e,t;this.options.updateFancybox&&d.isFunction(d.fn.fancybox)&&d.fancybox&&("2"===(e=h.getFancyboxVersion())?(t=d(".fancybox-wrap")).length&&t.is(":visible")&&d.fancybox.update():"1"===e&&(t=d("#fancybox-wrap")).length&&t.is(":visible")&&d.fancybox.resize())},h.getFancyboxVersion=function(){return d.isFunction(d.fn.fancybox)&&d.fancybox?h.isNonEmptyString(d.fancybox.version)?d.fancybox.version.charAt(0):"1":null},h.isScrolledIntoView=function(e,t){var o=d(window).scrollTop(),i=o+d(window).height(),r=e.offset().top,n=r+e.height();return t&&(r+=t),o<=n&&r<=i&&n<=i&&o<=r},h.formatFileSize=function(e){return 1073741824<=e?e=Math.round(e/1073741824*10)/10+" GB":1048576<=e?e=Math.round(e/1048576*10)/10+" MB":1024<=e?e=Math.round(e/1024*10)/10+" KB":e+=" bytes",e},(h.preLoadImages=function(e,t){for(var o=0;o<e.length;o++){var i=new Image;i.src=t?t+e[o]:e[o],h.preLoadImages.cache.push(i)}}).cache=[],h.sanitizeResponse=function(e){return null!==e&&"object"==typeof e&&"string"==typeof e.type&&0!==e.type.length||(e={type:"invalid",message:"The response from the server was invalid or malformed"}),e},h.sanitiseResponse=function(e){return h.sanitizeResponse(e)},h.compareDates=function(e,t){if(!h.isNonEmptyString(e)||!h.isNonEmptyString(t))return!1;if(e=kendo.parseDate(e,"yyyy-MM-dd"),t=kendo.parseDate(t,"yyyy-MM-dd"),null===e||null===t)return!1;var o=e.getTime(),i=t.getTime();return o<i?-1:i<o?1:0},h.compareTimes=function(e,t){if(!h.isNonEmptyString(e)||!h.isNonEmptyString(t))return!1;if(e=kendo.parseDate(e,"HH:mm"),t=kendo.parseDate(t,"HH:mm"),null===e||null===t)return!1;var o=e.getTime(),i=t.getTime();return o<i?-1:i<o?1:0},h.isValidFile=function(e,t){var o,i;if(!t.length)return!0;for(o=0,i=t.length;o<i;o++)if(-1!==e.name.toLowerCase().indexOf(t[o].toLowerCase(),e.name.length-t[o].length))return!0;return!1},h.isNonEmptyString=function(e){return"string"==typeof e&&e.length},h.clamp=function(e,t,o){return Math.min(Math.max(e,t),o)},h.timeNow=function(){return(new Date).getTime()},h.setupPopupLinks=function(){(d.isFunction(d.fn.fancybox)||d.isFunction(d.fn.magnificPopup))&&d(".quform-popup-link").each(function(){var e,t,o,i,r,n=d(this);n.data("quform-processed")||(e="#quform-"+n.data("unique-id"),t=d(e),o=n.data("options")||{},d.isFunction(d.fn.fancybox)&&d.fancybox?("3"===(r=h.getFancyboxVersion())?(i={type:"inline",baseClass:"quform-fancybox-3-popup",src:e,touch:!1,beforeClose:function(){d(".qtip").hide()}},o.width&&(t.css({width:d.isNumeric(o.width)?o.width+"px":o.width}),delete o.width),o.height&&(t.css({height:d.isNumeric(o.height)?o.height+"px":o.height}).addClass("quform-max-height"),delete o.height)):"2"===r?(i={type:"inline",wrapCSS:"quform-fancybox-2-popup",href:e,beforeClose:function(){d(".qtip").hide()}},(o.width||o.height)&&("undefined"==typeof o.autoSize&&(o.autoSize=!1),o.width||"undefined"!=typeof o.autoWidth||(o.autoWidth=!0),o.height||"undefined"!=typeof o.autoHeight||(o.autoHeight=!0))):"1"===r&&(i={inline:!0,href:e,onStart:function(){d("#fancybox-outer").css("opacity",0),d("#fancybox-wrap").addClass("quform-fancybox-1-popup")},onComplete:function(){window.grecaptcha&&d("#fancybox-content .quform-recaptcha").each(function(){try{window.grecaptcha.reset(d(this).data("recaptcha-id"))}catch(e){}}),d("#fancybox-wrap, #fancybox-content").css({width:"auto"}),d.fancybox.center(0),setTimeout(function(){d("#fancybox-outer").animate({opacity:1},200),d("#fancybox-overlay").css({height:d(document).height()})},1)},onClosed:function(){d("#fancybox-wrap").removeClass("quform-fancybox-1-popup")}},(o.width||o.height)&&"undefined"==typeof o.autoDimensions&&(o.autoDimensions=!1),(o.width||o.height)&&t.addClass("quform-custom-dimensions")),r&&n.fancybox(d.extend({},i,o))):d.isFunction(d.fn.magnificPopup)&&(i={items:{src:t,type:"inline"},mainClass:"quform-magnific-popup"},o.width&&(t.css({maxWidth:d.isNumeric(o.width)?o.width+"px":o.width}),delete o.width),o.height&&(t.css({maxHeight:d.isNumeric(o.height)?o.height+"px":o.height}).addClass("quform-max-height"),delete o.height),n.magnificPopup(d.extend({},i,o)),d.magnificPopup.instance._onFocusIn=function(e){if(d(e.target).hasClass("select2-search__field"))return!0;d.magnificPopup.proto._onFocusIn.call(this,e)}),n.data("quform-processed",!0))})},h.supportPageCaching=function(){var e;quformL10n.supportPageCaching&&(e=[],d(".quform-form").each(function(){e.push(d(this).find('input[name="quform_form_uid"]').val())}),e.length&&d.ajax({type:"GET",url:quformL10n.ajaxUrl,dataType:"json",data:{action:"quform_support_page_caching",forms:e}}).done(function(r){"success"===(r=h.sanitizeResponse(r)).type&&(d(".quform-form").each(function(){var e=d(this),t=e.data("quform"),o=e.attr("action"),i=e.find('input[name="quform_form_uid"]').val();r.forms&&h.isNonEmptyString(i)&&r.forms[i]&&h.isNonEmptyString(r.forms[i])&&(e.find('input[name="quform_form_uid"]').val(r.forms[i]),h.isNonEmptyString(o)&&(o=o.replace(/#quform-(.)+$/,"#quform-"+r.forms[i]),e.attr("action",o)),t&&(t.options.uniqueId=r.forms[i])),r.token&&h.isNonEmptyString(r.token)&&e.find('input[name="quform_csrf_token"]').val(r.token),t&&e.find(".quform-captcha-image img").length&&h.captchaRefreshFormQueue.push(t)}),h.captchaRefreshFormQueue.length&&h.processCaptchaRefreshFormQueue())}))},h.captchaRefreshFormQueue=[],h.processCaptchaRefreshFormQueue=function(){var e;h.captchaRefreshFormQueue.length&&(e=h.captchaRefreshFormQueue.shift(),d(".quform-captcha-image img",e.$form).each(function(){e.captchaRefreshQueue.push(d(this))}),e.processCaptchaRefreshQueue(function(){h.captchaRefreshFormQueue.length&&h.processCaptchaRefreshFormQueue()}))},e=h,window.Quform=e,d.fn.extend({quform:function(){return this.each(function(){return new e(this,d(this).data("options")||{})})},quformHideSlide:function(e,t){var o={height:"hide",opacity:"hide",marginTop:"hide",marginBottom:"hide",paddingTop:"hide",paddingBottom:"hide"},i={duration:400};return e&&(i.complete=e),t&&(o=d.extend(o,t)),this.animate(o,i)},quformShowSlide:function(e,t){var o={height:"show",opacity:"show",marginTop:"show",marginBottom:"show",paddingTop:"show",paddingBottom:"show"},i={duration:400};return e&&(i.complete=e),t&&(o=d.extend(o,t)),this.animate(o,i)}}),d(function(){d(".quform-form").quform(),e.supportPageCaching(),e.setupPopupLinks()})}(jQuery);
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.katex=t():e.katex=t()}("undefined"!=typeof self?self:this,(function(){return function(){"use strict";var e={d:function(t,r){for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},t={};e.d(t,{default:function(){return Wn}});class r{constructor(e,t){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;let n,o,s="KaTeX parse error: "+e;const i=t&&t.loc;if(i&&i.start<=i.end){const e=i.lexer.input;n=i.start,o=i.end,n===e.length?s+=" at end of input: ":s+=" at position "+(n+1)+": ";const t=e.slice(n,o).replace(/[^]/g,"$&\u0332");let r,a;r=n>15?"\u2026"+e.slice(n-15,n):e.slice(0,n),a=o+15<e.length?e.slice(o,o+15)+"\u2026":e.slice(o),s+=r+t+a}const a=new Error(s);return a.name="ParseError",a.__proto__=r.prototype,a.position=n,null!=n&&null!=o&&(a.length=o-n),a.rawMessage=e,a}}r.prototype.__proto__=Error.prototype;var n=r;const o=/([A-Z])/g,s={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;"},i=/[&><"']/g;const a=function(e){return"ordgroup"===e.type||"color"===e.type?1===e.body.length?a(e.body[0]):e:"font"===e.type?a(e.body):e};var l={contains:function(e,t){return-1!==e.indexOf(t)},deflt:function(e,t){return void 0===e?t:e},escape:function(e){return String(e).replace(i,(e=>s[e]))},hyphenate:function(e){return e.replace(o,"-$1").toLowerCase()},getBaseElem:a,isCharacterBox:function(e){const t=a(e);return"mathord"===t.type||"textord"===t.type||"atom"===t.type},protocolFromUrl:function(e){const t=/^[\x00-\x20]*([^\\/#?]*?)(:|&#0*58|&#x0*3a|&colon)/i.exec(e);return t?":"!==t[2]?null:/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?t[1].toLowerCase():null:"_relative"}};const h={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:e=>"#"+e},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:e=>Math.max(0,e),cli:"-s, --max-size <n>",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:e=>Math.max(0,e),cli:"-e, --max-expand <n>",cliProcessor:e=>"Infinity"===e?1/0:parseInt(e)},globalGroup:{type:"boolean",cli:!1}};function c(e){if(e.default)return e.default;const t=e.type,r=Array.isArray(t)?t[0]:t;if("string"!=typeof r)return r.enum[0];switch(r){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}class m{constructor(e){this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{};for(const t in h)if(h.hasOwnProperty(t)){const r=h[t];this[t]=void 0!==e[t]?r.processor?r.processor(e[t]):e[t]:c(r)}}reportNonstrict(e,t,r){let o=this.strict;if("function"==typeof o&&(o=o(e,t,r)),o&&"ignore"!==o){if(!0===o||"error"===o)throw new n("LaTeX-incompatible input and strict mode is set to 'error': "+t+" ["+e+"]",r);"warn"===o?"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"):"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+o+"': "+t+" ["+e+"]")}}useStrictBehavior(e,t,r){let n=this.strict;if("function"==typeof n)try{n=n(e,t,r)}catch(e){n="error"}return!(!n||"ignore"===n)&&(!0===n||"error"===n||("warn"===n?("undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"),!1):("undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+n+"': "+t+" ["+e+"]"),!1)))}isTrusted(e){if(e.url&&!e.protocol){const t=l.protocolFromUrl(e.url);if(null==t)return!1;e.protocol=t}const t="function"==typeof this.trust?this.trust(e):this.trust;return Boolean(t)}}class p{constructor(e,t,r){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=r}sup(){return u[d[this.id]]}sub(){return u[g[this.id]]}fracNum(){return u[f[this.id]]}fracDen(){return u[b[this.id]]}cramp(){return u[y[this.id]]}text(){return u[x[this.id]]}isTight(){return this.size>=2}}const u=[new p(0,0,!1),new p(1,0,!0),new p(2,1,!1),new p(3,1,!0),new p(4,2,!1),new p(5,2,!0),new p(6,3,!1),new p(7,3,!0)],d=[4,5,4,5,6,7,6,7],g=[5,5,5,5,7,7,7,7],f=[2,3,4,5,6,7,6,7],b=[3,3,5,5,7,7,7,7],y=[1,1,3,3,5,5,7,7],x=[0,1,2,3,2,3,2,3];var w={DISPLAY:u[0],TEXT:u[2],SCRIPT:u[4],SCRIPTSCRIPT:u[6]};const v=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];const k=[];function S(e){for(let t=0;t<k.length;t+=2)if(e>=k[t]&&e<=k[t+1])return!0;return!1}v.forEach((e=>e.blocks.forEach((e=>k.push(...e)))));const M=80,z={doubleleftarrow:"M262 157\nl10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3\n 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28\n 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5\nc2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5\n 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87\n-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7\n-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z\nm8 0v40h399730v-40zm0 194v40h399730v-40z",doublerightarrow:"M399738 392l\n-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5\n 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88\n-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68\n-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18\n-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782\nc-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3\n-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z",leftarrow:"M400000 241H110l3-3c68.7-52.7 113.7-120\n 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8\n-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247\nc-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208\n 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3\n 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202\n l-3-3h399890zM100 241v40h399900v-40z",leftbrace:"M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117\n-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7\n 5-6 9-10 13-.7 1-7.3 1-20 1H6z",leftbraceunder:"M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13\n 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688\n 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7\n-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z",leftgroup:"M400000 80\nH435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0\n 435 0h399565z",leftgroupunder:"M400000 262\nH435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219\n 435 219h399565z",leftharpoon:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3\n-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5\n-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7\n-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z",leftharpoonplus:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5\n 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3\n-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7\n-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z\nm0 0v40h400000v-40z",leftharpoondown:"M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333\n 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5\n 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667\n-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z",leftharpoondownplus:"M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12\n 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7\n-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0\nv40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z",lefthook:"M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5\n-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3\n-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21\n 71.5 23h399859zM103 281v-40h399897v40z",leftlinesegment:"M40 281 V428 H0 V94 H40 V241 H400000 v40z\nM40 281 V428 H0 V94 H40 V241 H400000 v40z",leftmapsto:"M40 281 V448H0V74H40V241H400000v40z\nM40 281 V448H0V74H40V241H400000v40z",leftToFrom:"M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23\n-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8\nc28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3\n 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z",longequal:"M0 50 h400000 v40H0z m0 194h40000v40H0z\nM0 50 h400000 v40H0z m0 194h40000v40H0z",midbrace:"M200428 334\nc-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14\n-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7\n 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11\n 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z",midbraceunder:"M199572 214\nc100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14\n 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3\n 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0\n-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z",oiintSize1:"M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6\n-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z\nm368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8\n60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z",oiintSize2:"M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8\n-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z\nm502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2\nc0 110 84 276 504 276s502.4-166 502.4-276z",oiiintSize1:"M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6\n-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z\nm525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0\n85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z",oiiintSize2:"M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8\n-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z\nm770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1\nc0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z",rightarrow:"M0 241v40h399891c-47.3 35.3-84 78-110 128\n-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20\n 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7\n 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85\n-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n 151.7 139 205zm0 0v40h399900v-40z",rightbrace:"M400000 542l\n-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5\ns-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1\nc124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z",rightbraceunder:"M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3\n 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237\n-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z",rightgroup:"M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0\n 3-1 3-3v-38c-76-158-257-219-435-219H0z",rightgroupunder:"M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18\n 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z",rightharpoon:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3\n-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2\n-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58\n 69.2 92 94.5zm0 0v40h399900v-40z",rightharpoonplus:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11\n-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7\n 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z\nm0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z",rightharpoondown:"M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8\n 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5\n-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95\n-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z",rightharpoondownplus:"M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8\n 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3\n 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3\n-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z\nm0-194v40h400000v-40zm0 0v40h400000v-40z",righthook:"M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3\n 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0\n-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21\n 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z",rightlinesegment:"M399960 241 V94 h40 V428 h-40 V281 H0 v-40z\nM399960 241 V94 h40 V428 h-40 V281 H0 v-40z",rightToFrom:"M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23\n 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32\n-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142\n-167z M100 147v40h399900v-40zM0 341v40h399900v-40z",twoheadleftarrow:"M0 167c68 40\n 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69\n-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3\n-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19\n-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101\n 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z",twoheadrightarrow:"M400000 167\nc-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3\n 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42\n 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333\n-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70\n 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z",tilde1:"M200 55.538c-77 0-168 73.953-177 73.953-3 0-7\n-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0\n 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0\n 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128\n-68.267.847-113-73.952-191-73.952z",tilde2:"M344 55.266c-142 0-300.638 81.316-311.5 86.418\n-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9\n 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114\nc1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751\n 181.476 676 181.476c-149 0-189-126.21-332-126.21z",tilde3:"M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457\n-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0\n 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697\n 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696\n -338 0-409-156.573-744-156.573z",tilde4:"M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345\n-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409\n 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9\n 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409\n -175.236-744-175.236z",vec:"M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5\n3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11\n10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63\n-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1\n-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59\nH213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359\nc-16-25.333-24-45-24-59z",widehat1:"M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22\nc-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z",widehat2:"M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat3:"M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat4:"M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widecheck1:"M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,\n-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z",widecheck2:"M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck3:"M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck4:"M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",baraboveleftarrow:"M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202\nc4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5\nc-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130\ns-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47\n121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6\ns2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11\nc0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z\nM100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z",rightarrowabovebar:"M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32\n-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0\n13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39\n-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5\n-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z",baraboveshortleftharpoon:"M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17\nc2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21\nc-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40\nc-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z\nM0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z",rightharpoonaboveshortbar:"M0,241 l0,40c399126,0,399993,0,399993,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z",shortbaraboveleftharpoon:"M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,\n1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,\n-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z\nM93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z",shortrightharpoonabovebar:"M53,241l0,40c398570,0,399437,0,399437,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z"};class A{constructor(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return l.contains(this.classes,e)}toNode(){const e=document.createDocumentFragment();for(let t=0;t<this.children.length;t++)e.appendChild(this.children[t].toNode());return e}toMarkup(){let e="";for(let t=0;t<this.children.length;t++)e+=this.children[t].toMarkup();return e}toText(){return this.children.map((e=>e.toText())).join("")}}var T={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}};const B={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},C={"\xc5":"A","\xd0":"D","\xde":"o","\xe5":"a","\xf0":"d","\xfe":"o","\u0410":"A","\u0411":"B","\u0412":"B","\u0413":"F","\u0414":"A","\u0415":"E","\u0416":"K","\u0417":"3","\u0418":"N","\u0419":"N","\u041a":"K","\u041b":"N","\u041c":"M","\u041d":"H","\u041e":"O","\u041f":"N","\u0420":"P","\u0421":"C","\u0422":"T","\u0423":"y","\u0424":"O","\u0425":"X","\u0426":"U","\u0427":"h","\u0428":"W","\u0429":"W","\u042a":"B","\u042b":"X","\u042c":"B","\u042d":"3","\u042e":"X","\u042f":"R","\u0430":"a","\u0431":"b","\u0432":"a","\u0433":"r","\u0434":"y","\u0435":"e","\u0436":"m","\u0437":"e","\u0438":"n","\u0439":"n","\u043a":"n","\u043b":"n","\u043c":"m","\u043d":"n","\u043e":"o","\u043f":"n","\u0440":"p","\u0441":"c","\u0442":"o","\u0443":"y","\u0444":"b","\u0445":"x","\u0446":"n","\u0447":"n","\u0448":"w","\u0449":"w","\u044a":"a","\u044b":"m","\u044c":"a","\u044d":"e","\u044e":"m","\u044f":"r"};function N(e,t,r){if(!T[t])throw new Error("Font metrics not found for font: "+t+".");let n=e.charCodeAt(0),o=T[t][n];if(!o&&e[0]in C&&(n=C[e[0]].charCodeAt(0),o=T[t][n]),o||"text"!==r||S(n)&&(o=T[t][77]),o)return{depth:o[0],height:o[1],italic:o[2],skew:o[3],width:o[4]}}const q={};const I=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],R=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],H=function(e,t){return t.size<2?e:I[e-1][t.size-1]};class O{constructor(e){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=e.style,this.color=e.color,this.size=e.size||O.BASESIZE,this.textSize=e.textSize||this.size,this.phantom=!!e.phantom,this.font=e.font||"",this.fontFamily=e.fontFamily||"",this.fontWeight=e.fontWeight||"",this.fontShape=e.fontShape||"",this.sizeMultiplier=R[this.size-1],this.maxSize=e.maxSize,this.minRuleThickness=e.minRuleThickness,this._fontMetrics=void 0}extend(e){const t={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};for(const r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);return new O(t)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:H(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:R[e-1]})}havingBaseStyle(e){e=e||this.style.text();const t=H(O.BASESIZE,e);return this.size===t&&this.textSize===O.BASESIZE&&this.style===e?this:this.extend({style:e,size:t})}havingBaseSizing(){let e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:""})}withTextFontWeight(e){return this.extend({fontWeight:e,font:""})}withTextFontShape(e){return this.extend({fontShape:e,font:""})}sizingClasses(e){return e.size!==this.size?["sizing","reset-size"+e.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==O.BASESIZE?["sizing","reset-size"+this.size,"size"+O.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=function(e){let t;if(t=e>=5?0:e>=3?1:2,!q[t]){const e=q[t]={cssEmPerMu:B.quad[t]/18};for(const r in B)B.hasOwnProperty(r)&&(e[r]=B[r][t])}return q[t]}(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}O.BASESIZE=6;var E=O;const L={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:1.00375,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:1.00375},D={ex:!0,em:!0,mu:!0},V=function(e){return"string"!=typeof e&&(e=e.unit),e in L||e in D||"ex"===e},P=function(e,t){let r;if(e.unit in L)r=L[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if("mu"===e.unit)r=t.fontMetrics().cssEmPerMu;else{let o;if(o=t.style.isTight()?t.havingStyle(t.style.text()):t,"ex"===e.unit)r=o.fontMetrics().xHeight;else{if("em"!==e.unit)throw new n("Invalid unit: '"+e.unit+"'");r=o.fontMetrics().quad}o!==t&&(r*=o.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*r,t.maxSize)},F=function(e){return+e.toFixed(4)+"em"},G=function(e){return e.filter((e=>e)).join(" ")},U=function(e,t,r){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=r||{},t){t.style.isTight()&&this.classes.push("mtight");const e=t.getColor();e&&(this.style.color=e)}},Y=function(e){const t=document.createElement(e);t.className=G(this.classes);for(const e in this.style)this.style.hasOwnProperty(e)&&(t.style[e]=this.style[e]);for(const e in this.attributes)this.attributes.hasOwnProperty(e)&&t.setAttribute(e,this.attributes[e]);for(let e=0;e<this.children.length;e++)t.appendChild(this.children[e].toNode());return t},X=/[\s"'>/=\x00-\x1f]/,W=function(e){let t="<"+e;this.classes.length&&(t+=' class="'+l.escape(G(this.classes))+'"');let r="";for(const e in this.style)this.style.hasOwnProperty(e)&&(r+=l.hyphenate(e)+":"+this.style[e]+";");r&&(t+=' style="'+l.escape(r)+'"');for(const e in this.attributes)if(this.attributes.hasOwnProperty(e)){if(X.test(e))throw new n("Invalid attribute name '"+e+"'");t+=" "+e+'="'+l.escape(this.attributes[e])+'"'}t+=">";for(let e=0;e<this.children.length;e++)t+=this.children[e].toMarkup();return t+="</"+e+">",t};class _{constructor(e,t,r,n){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,U.call(this,e,r,n),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return l.contains(this.classes,e)}toNode(){return Y.call(this,"span")}toMarkup(){return W.call(this,"span")}}class j{constructor(e,t,r,n){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,U.call(this,t,n),this.children=r||[],this.setAttribute("href",e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return l.contains(this.classes,e)}toNode(){return Y.call(this,"a")}toMarkup(){return W.call(this,"a")}}class ${constructor(e,t,r){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=e,this.classes=["mord"],this.style=r}hasClass(e){return l.contains(this.classes,e)}toNode(){const e=document.createElement("img");e.src=this.src,e.alt=this.alt,e.className="mord";for(const t in this.style)this.style.hasOwnProperty(t)&&(e.style[t]=this.style[t]);return e}toMarkup(){let e='<img src="'+l.escape(this.src)+'" alt="'+l.escape(this.alt)+'"',t="";for(const e in this.style)this.style.hasOwnProperty(e)&&(t+=l.hyphenate(e)+":"+this.style[e]+";");return t&&(e+=' style="'+l.escape(t)+'"'),e+="'/>",e}}const Z={"\xee":"\u0131\u0302","\xef":"\u0131\u0308","\xed":"\u0131\u0301","\xec":"\u0131\u0300"};class K{constructor(e,t,r,n,o,s,i,a){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=e,this.height=t||0,this.depth=r||0,this.italic=n||0,this.skew=o||0,this.width=s||0,this.classes=i||[],this.style=a||{},this.maxFontSize=0;const l=function(e){for(let t=0;t<v.length;t++){const r=v[t];for(let t=0;t<r.blocks.length;t++){const n=r.blocks[t];if(e>=n[0]&&e<=n[1])return r.name}}return null}(this.text.charCodeAt(0));l&&this.classes.push(l+"_fallback"),/[\xee\xef\xed\xec]/.test(this.text)&&(this.text=Z[this.text])}hasClass(e){return l.contains(this.classes,e)}toNode(){const e=document.createTextNode(this.text);let t=null;this.italic>0&&(t=document.createElement("span"),t.style.marginRight=F(this.italic)),this.classes.length>0&&(t=t||document.createElement("span"),t.className=G(this.classes));for(const e in this.style)this.style.hasOwnProperty(e)&&(t=t||document.createElement("span"),t.style[e]=this.style[e]);return t?(t.appendChild(e),t):e}toMarkup(){let e=!1,t="<span";this.classes.length&&(e=!0,t+=' class="',t+=l.escape(G(this.classes)),t+='"');let r="";this.italic>0&&(r+="margin-right:"+this.italic+"em;");for(const e in this.style)this.style.hasOwnProperty(e)&&(r+=l.hyphenate(e)+":"+this.style[e]+";");r&&(e=!0,t+=' style="'+l.escape(r)+'"');const n=l.escape(this.text);return e?(t+=">",t+=n,t+="</span>",t):n}}class J{constructor(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}toNode(){const e=document.createElementNS("http://www.w3.org/2000/svg","svg");for(const t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);for(let t=0;t<this.children.length;t++)e.appendChild(this.children[t].toNode());return e}toMarkup(){let e='<svg xmlns="http://www.w3.org/2000/svg"';for(const t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+'="'+l.escape(this.attributes[t])+'"');e+=">";for(let t=0;t<this.children.length;t++)e+=this.children[t].toMarkup();return e+="</svg>",e}}class Q{constructor(e,t){this.pathName=void 0,this.alternate=void 0,this.pathName=e,this.alternate=t}toNode(){const e=document.createElementNS("http://www.w3.org/2000/svg","path");return this.alternate?e.setAttribute("d",this.alternate):e.setAttribute("d",z[this.pathName]),e}toMarkup(){return this.alternate?'<path d="'+l.escape(this.alternate)+'"/>':'<path d="'+l.escape(z[this.pathName])+'"/>'}}class ee{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){const e=document.createElementNS("http://www.w3.org/2000/svg","line");for(const t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);return e}toMarkup(){let e="<line";for(const t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+'="'+l.escape(this.attributes[t])+'"');return e+="/>",e}}function te(e){if(e instanceof K)return e;throw new Error("Expected symbolNode but got "+String(e)+".")}const re={bin:1,close:1,inner:1,open:1,punct:1,rel:1},ne={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},oe={math:{},text:{}};var se=oe;function ie(e,t,r,n,o,s){oe[e][o]={font:t,group:r,replace:n},s&&n&&(oe[e][n]=oe[e][o])}const ae="math",le="text",he="main",ce="ams",me="accent-token",pe="bin",ue="close",de="inner",ge="mathord",fe="op-token",be="open",ye="punct",xe="rel",we="spacing",ve="textord";ie(ae,he,xe,"\u2261","\\equiv",!0),ie(ae,he,xe,"\u227a","\\prec",!0),ie(ae,he,xe,"\u227b","\\succ",!0),ie(ae,he,xe,"\u223c","\\sim",!0),ie(ae,he,xe,"\u22a5","\\perp"),ie(ae,he,xe,"\u2aaf","\\preceq",!0),ie(ae,he,xe,"\u2ab0","\\succeq",!0),ie(ae,he,xe,"\u2243","\\simeq",!0),ie(ae,he,xe,"\u2223","\\mid",!0),ie(ae,he,xe,"\u226a","\\ll",!0),ie(ae,he,xe,"\u226b","\\gg",!0),ie(ae,he,xe,"\u224d","\\asymp",!0),ie(ae,he,xe,"\u2225","\\parallel"),ie(ae,he,xe,"\u22c8","\\bowtie",!0),ie(ae,he,xe,"\u2323","\\smile",!0),ie(ae,he,xe,"\u2291","\\sqsubseteq",!0),ie(ae,he,xe,"\u2292","\\sqsupseteq",!0),ie(ae,he,xe,"\u2250","\\doteq",!0),ie(ae,he,xe,"\u2322","\\frown",!0),ie(ae,he,xe,"\u220b","\\ni",!0),ie(ae,he,xe,"\u221d","\\propto",!0),ie(ae,he,xe,"\u22a2","\\vdash",!0),ie(ae,he,xe,"\u22a3","\\dashv",!0),ie(ae,he,xe,"\u220b","\\owns"),ie(ae,he,ye,".","\\ldotp"),ie(ae,he,ye,"\u22c5","\\cdotp"),ie(ae,he,ve,"#","\\#"),ie(le,he,ve,"#","\\#"),ie(ae,he,ve,"&","\\&"),ie(le,he,ve,"&","\\&"),ie(ae,he,ve,"\u2135","\\aleph",!0),ie(ae,he,ve,"\u2200","\\forall",!0),ie(ae,he,ve,"\u210f","\\hbar",!0),ie(ae,he,ve,"\u2203","\\exists",!0),ie(ae,he,ve,"\u2207","\\nabla",!0),ie(ae,he,ve,"\u266d","\\flat",!0),ie(ae,he,ve,"\u2113","\\ell",!0),ie(ae,he,ve,"\u266e","\\natural",!0),ie(ae,he,ve,"\u2663","\\clubsuit",!0),ie(ae,he,ve,"\u2118","\\wp",!0),ie(ae,he,ve,"\u266f","\\sharp",!0),ie(ae,he,ve,"\u2662","\\diamondsuit",!0),ie(ae,he,ve,"\u211c","\\Re",!0),ie(ae,he,ve,"\u2661","\\heartsuit",!0),ie(ae,he,ve,"\u2111","\\Im",!0),ie(ae,he,ve,"\u2660","\\spadesuit",!0),ie(ae,he,ve,"\xa7","\\S",!0),ie(le,he,ve,"\xa7","\\S"),ie(ae,he,ve,"\xb6","\\P",!0),ie(le,he,ve,"\xb6","\\P"),ie(ae,he,ve,"\u2020","\\dag"),ie(le,he,ve,"\u2020","\\dag"),ie(le,he,ve,"\u2020","\\textdagger"),ie(ae,he,ve,"\u2021","\\ddag"),ie(le,he,ve,"\u2021","\\ddag"),ie(le,he,ve,"\u2021","\\textdaggerdbl"),ie(ae,he,ue,"\u23b1","\\rmoustache",!0),ie(ae,he,be,"\u23b0","\\lmoustache",!0),ie(ae,he,ue,"\u27ef","\\rgroup",!0),ie(ae,he,be,"\u27ee","\\lgroup",!0),ie(ae,he,pe,"\u2213","\\mp",!0),ie(ae,he,pe,"\u2296","\\ominus",!0),ie(ae,he,pe,"\u228e","\\uplus",!0),ie(ae,he,pe,"\u2293","\\sqcap",!0),ie(ae,he,pe,"\u2217","\\ast"),ie(ae,he,pe,"\u2294","\\sqcup",!0),ie(ae,he,pe,"\u25ef","\\bigcirc",!0),ie(ae,he,pe,"\u2219","\\bullet",!0),ie(ae,he,pe,"\u2021","\\ddagger"),ie(ae,he,pe,"\u2240","\\wr",!0),ie(ae,he,pe,"\u2a3f","\\amalg"),ie(ae,he,pe,"&","\\And"),ie(ae,he,xe,"\u27f5","\\longleftarrow",!0),ie(ae,he,xe,"\u21d0","\\Leftarrow",!0),ie(ae,he,xe,"\u27f8","\\Longleftarrow",!0),ie(ae,he,xe,"\u27f6","\\longrightarrow",!0),ie(ae,he,xe,"\u21d2","\\Rightarrow",!0),ie(ae,he,xe,"\u27f9","\\Longrightarrow",!0),ie(ae,he,xe,"\u2194","\\leftrightarrow",!0),ie(ae,he,xe,"\u27f7","\\longleftrightarrow",!0),ie(ae,he,xe,"\u21d4","\\Leftrightarrow",!0),ie(ae,he,xe,"\u27fa","\\Longleftrightarrow",!0),ie(ae,he,xe,"\u21a6","\\mapsto",!0),ie(ae,he,xe,"\u27fc","\\longmapsto",!0),ie(ae,he,xe,"\u2197","\\nearrow",!0),ie(ae,he,xe,"\u21a9","\\hookleftarrow",!0),ie(ae,he,xe,"\u21aa","\\hookrightarrow",!0),ie(ae,he,xe,"\u2198","\\searrow",!0),ie(ae,he,xe,"\u21bc","\\leftharpoonup",!0),ie(ae,he,xe,"\u21c0","\\rightharpoonup",!0),ie(ae,he,xe,"\u2199","\\swarrow",!0),ie(ae,he,xe,"\u21bd","\\leftharpoondown",!0),ie(ae,he,xe,"\u21c1","\\rightharpoondown",!0),ie(ae,he,xe,"\u2196","\\nwarrow",!0),ie(ae,he,xe,"\u21cc","\\rightleftharpoons",!0),ie(ae,ce,xe,"\u226e","\\nless",!0),ie(ae,ce,xe,"\ue010","\\@nleqslant"),ie(ae,ce,xe,"\ue011","\\@nleqq"),ie(ae,ce,xe,"\u2a87","\\lneq",!0),ie(ae,ce,xe,"\u2268","\\lneqq",!0),ie(ae,ce,xe,"\ue00c","\\@lvertneqq"),ie(ae,ce,xe,"\u22e6","\\lnsim",!0),ie(ae,ce,xe,"\u2a89","\\lnapprox",!0),ie(ae,ce,xe,"\u2280","\\nprec",!0),ie(ae,ce,xe,"\u22e0","\\npreceq",!0),ie(ae,ce,xe,"\u22e8","\\precnsim",!0),ie(ae,ce,xe,"\u2ab9","\\precnapprox",!0),ie(ae,ce,xe,"\u2241","\\nsim",!0),ie(ae,ce,xe,"\ue006","\\@nshortmid"),ie(ae,ce,xe,"\u2224","\\nmid",!0),ie(ae,ce,xe,"\u22ac","\\nvdash",!0),ie(ae,ce,xe,"\u22ad","\\nvDash",!0),ie(ae,ce,xe,"\u22ea","\\ntriangleleft"),ie(ae,ce,xe,"\u22ec","\\ntrianglelefteq",!0),ie(ae,ce,xe,"\u228a","\\subsetneq",!0),ie(ae,ce,xe,"\ue01a","\\@varsubsetneq"),ie(ae,ce,xe,"\u2acb","\\subsetneqq",!0),ie(ae,ce,xe,"\ue017","\\@varsubsetneqq"),ie(ae,ce,xe,"\u226f","\\ngtr",!0),ie(ae,ce,xe,"\ue00f","\\@ngeqslant"),ie(ae,ce,xe,"\ue00e","\\@ngeqq"),ie(ae,ce,xe,"\u2a88","\\gneq",!0),ie(ae,ce,xe,"\u2269","\\gneqq",!0),ie(ae,ce,xe,"\ue00d","\\@gvertneqq"),ie(ae,ce,xe,"\u22e7","\\gnsim",!0),ie(ae,ce,xe,"\u2a8a","\\gnapprox",!0),ie(ae,ce,xe,"\u2281","\\nsucc",!0),ie(ae,ce,xe,"\u22e1","\\nsucceq",!0),ie(ae,ce,xe,"\u22e9","\\succnsim",!0),ie(ae,ce,xe,"\u2aba","\\succnapprox",!0),ie(ae,ce,xe,"\u2246","\\ncong",!0),ie(ae,ce,xe,"\ue007","\\@nshortparallel"),ie(ae,ce,xe,"\u2226","\\nparallel",!0),ie(ae,ce,xe,"\u22af","\\nVDash",!0),ie(ae,ce,xe,"\u22eb","\\ntriangleright"),ie(ae,ce,xe,"\u22ed","\\ntrianglerighteq",!0),ie(ae,ce,xe,"\ue018","\\@nsupseteqq"),ie(ae,ce,xe,"\u228b","\\supsetneq",!0),ie(ae,ce,xe,"\ue01b","\\@varsupsetneq"),ie(ae,ce,xe,"\u2acc","\\supsetneqq",!0),ie(ae,ce,xe,"\ue019","\\@varsupsetneqq"),ie(ae,ce,xe,"\u22ae","\\nVdash",!0),ie(ae,ce,xe,"\u2ab5","\\precneqq",!0),ie(ae,ce,xe,"\u2ab6","\\succneqq",!0),ie(ae,ce,xe,"\ue016","\\@nsubseteqq"),ie(ae,ce,pe,"\u22b4","\\unlhd"),ie(ae,ce,pe,"\u22b5","\\unrhd"),ie(ae,ce,xe,"\u219a","\\nleftarrow",!0),ie(ae,ce,xe,"\u219b","\\nrightarrow",!0),ie(ae,ce,xe,"\u21cd","\\nLeftarrow",!0),ie(ae,ce,xe,"\u21cf","\\nRightarrow",!0),ie(ae,ce,xe,"\u21ae","\\nleftrightarrow",!0),ie(ae,ce,xe,"\u21ce","\\nLeftrightarrow",!0),ie(ae,ce,xe,"\u25b3","\\vartriangle"),ie(ae,ce,ve,"\u210f","\\hslash"),ie(ae,ce,ve,"\u25bd","\\triangledown"),ie(ae,ce,ve,"\u25ca","\\lozenge"),ie(ae,ce,ve,"\u24c8","\\circledS"),ie(ae,ce,ve,"\xae","\\circledR"),ie(le,ce,ve,"\xae","\\circledR"),ie(ae,ce,ve,"\u2221","\\measuredangle",!0),ie(ae,ce,ve,"\u2204","\\nexists"),ie(ae,ce,ve,"\u2127","\\mho"),ie(ae,ce,ve,"\u2132","\\Finv",!0),ie(ae,ce,ve,"\u2141","\\Game",!0),ie(ae,ce,ve,"\u2035","\\backprime"),ie(ae,ce,ve,"\u25b2","\\blacktriangle"),ie(ae,ce,ve,"\u25bc","\\blacktriangledown"),ie(ae,ce,ve,"\u25a0","\\blacksquare"),ie(ae,ce,ve,"\u29eb","\\blacklozenge"),ie(ae,ce,ve,"\u2605","\\bigstar"),ie(ae,ce,ve,"\u2222","\\sphericalangle",!0),ie(ae,ce,ve,"\u2201","\\complement",!0),ie(ae,ce,ve,"\xf0","\\eth",!0),ie(le,he,ve,"\xf0","\xf0"),ie(ae,ce,ve,"\u2571","\\diagup"),ie(ae,ce,ve,"\u2572","\\diagdown"),ie(ae,ce,ve,"\u25a1","\\square"),ie(ae,ce,ve,"\u25a1","\\Box"),ie(ae,ce,ve,"\u25ca","\\Diamond"),ie(ae,ce,ve,"\xa5","\\yen",!0),ie(le,ce,ve,"\xa5","\\yen",!0),ie(ae,ce,ve,"\u2713","\\checkmark",!0),ie(le,ce,ve,"\u2713","\\checkmark"),ie(ae,ce,ve,"\u2136","\\beth",!0),ie(ae,ce,ve,"\u2138","\\daleth",!0),ie(ae,ce,ve,"\u2137","\\gimel",!0),ie(ae,ce,ve,"\u03dd","\\digamma",!0),ie(ae,ce,ve,"\u03f0","\\varkappa"),ie(ae,ce,be,"\u250c","\\@ulcorner",!0),ie(ae,ce,ue,"\u2510","\\@urcorner",!0),ie(ae,ce,be,"\u2514","\\@llcorner",!0),ie(ae,ce,ue,"\u2518","\\@lrcorner",!0),ie(ae,ce,xe,"\u2266","\\leqq",!0),ie(ae,ce,xe,"\u2a7d","\\leqslant",!0),ie(ae,ce,xe,"\u2a95","\\eqslantless",!0),ie(ae,ce,xe,"\u2272","\\lesssim",!0),ie(ae,ce,xe,"\u2a85","\\lessapprox",!0),ie(ae,ce,xe,"\u224a","\\approxeq",!0),ie(ae,ce,pe,"\u22d6","\\lessdot"),ie(ae,ce,xe,"\u22d8","\\lll",!0),ie(ae,ce,xe,"\u2276","\\lessgtr",!0),ie(ae,ce,xe,"\u22da","\\lesseqgtr",!0),ie(ae,ce,xe,"\u2a8b","\\lesseqqgtr",!0),ie(ae,ce,xe,"\u2251","\\doteqdot"),ie(ae,ce,xe,"\u2253","\\risingdotseq",!0),ie(ae,ce,xe,"\u2252","\\fallingdotseq",!0),ie(ae,ce,xe,"\u223d","\\backsim",!0),ie(ae,ce,xe,"\u22cd","\\backsimeq",!0),ie(ae,ce,xe,"\u2ac5","\\subseteqq",!0),ie(ae,ce,xe,"\u22d0","\\Subset",!0),ie(ae,ce,xe,"\u228f","\\sqsubset",!0),ie(ae,ce,xe,"\u227c","\\preccurlyeq",!0),ie(ae,ce,xe,"\u22de","\\curlyeqprec",!0),ie(ae,ce,xe,"\u227e","\\precsim",!0),ie(ae,ce,xe,"\u2ab7","\\precapprox",!0),ie(ae,ce,xe,"\u22b2","\\vartriangleleft"),ie(ae,ce,xe,"\u22b4","\\trianglelefteq"),ie(ae,ce,xe,"\u22a8","\\vDash",!0),ie(ae,ce,xe,"\u22aa","\\Vvdash",!0),ie(ae,ce,xe,"\u2323","\\smallsmile"),ie(ae,ce,xe,"\u2322","\\smallfrown"),ie(ae,ce,xe,"\u224f","\\bumpeq",!0),ie(ae,ce,xe,"\u224e","\\Bumpeq",!0),ie(ae,ce,xe,"\u2267","\\geqq",!0),ie(ae,ce,xe,"\u2a7e","\\geqslant",!0),ie(ae,ce,xe,"\u2a96","\\eqslantgtr",!0),ie(ae,ce,xe,"\u2273","\\gtrsim",!0),ie(ae,ce,xe,"\u2a86","\\gtrapprox",!0),ie(ae,ce,pe,"\u22d7","\\gtrdot"),ie(ae,ce,xe,"\u22d9","\\ggg",!0),ie(ae,ce,xe,"\u2277","\\gtrless",!0),ie(ae,ce,xe,"\u22db","\\gtreqless",!0),ie(ae,ce,xe,"\u2a8c","\\gtreqqless",!0),ie(ae,ce,xe,"\u2256","\\eqcirc",!0),ie(ae,ce,xe,"\u2257","\\circeq",!0),ie(ae,ce,xe,"\u225c","\\triangleq",!0),ie(ae,ce,xe,"\u223c","\\thicksim"),ie(ae,ce,xe,"\u2248","\\thickapprox"),ie(ae,ce,xe,"\u2ac6","\\supseteqq",!0),ie(ae,ce,xe,"\u22d1","\\Supset",!0),ie(ae,ce,xe,"\u2290","\\sqsupset",!0),ie(ae,ce,xe,"\u227d","\\succcurlyeq",!0),ie(ae,ce,xe,"\u22df","\\curlyeqsucc",!0),ie(ae,ce,xe,"\u227f","\\succsim",!0),ie(ae,ce,xe,"\u2ab8","\\succapprox",!0),ie(ae,ce,xe,"\u22b3","\\vartriangleright"),ie(ae,ce,xe,"\u22b5","\\trianglerighteq"),ie(ae,ce,xe,"\u22a9","\\Vdash",!0),ie(ae,ce,xe,"\u2223","\\shortmid"),ie(ae,ce,xe,"\u2225","\\shortparallel"),ie(ae,ce,xe,"\u226c","\\between",!0),ie(ae,ce,xe,"\u22d4","\\pitchfork",!0),ie(ae,ce,xe,"\u221d","\\varpropto"),ie(ae,ce,xe,"\u25c0","\\blacktriangleleft"),ie(ae,ce,xe,"\u2234","\\therefore",!0),ie(ae,ce,xe,"\u220d","\\backepsilon"),ie(ae,ce,xe,"\u25b6","\\blacktriangleright"),ie(ae,ce,xe,"\u2235","\\because",!0),ie(ae,ce,xe,"\u22d8","\\llless"),ie(ae,ce,xe,"\u22d9","\\gggtr"),ie(ae,ce,pe,"\u22b2","\\lhd"),ie(ae,ce,pe,"\u22b3","\\rhd"),ie(ae,ce,xe,"\u2242","\\eqsim",!0),ie(ae,he,xe,"\u22c8","\\Join"),ie(ae,ce,xe,"\u2251","\\Doteq",!0),ie(ae,ce,pe,"\u2214","\\dotplus",!0),ie(ae,ce,pe,"\u2216","\\smallsetminus"),ie(ae,ce,pe,"\u22d2","\\Cap",!0),ie(ae,ce,pe,"\u22d3","\\Cup",!0),ie(ae,ce,pe,"\u2a5e","\\doublebarwedge",!0),ie(ae,ce,pe,"\u229f","\\boxminus",!0),ie(ae,ce,pe,"\u229e","\\boxplus",!0),ie(ae,ce,pe,"\u22c7","\\divideontimes",!0),ie(ae,ce,pe,"\u22c9","\\ltimes",!0),ie(ae,ce,pe,"\u22ca","\\rtimes",!0),ie(ae,ce,pe,"\u22cb","\\leftthreetimes",!0),ie(ae,ce,pe,"\u22cc","\\rightthreetimes",!0),ie(ae,ce,pe,"\u22cf","\\curlywedge",!0),ie(ae,ce,pe,"\u22ce","\\curlyvee",!0),ie(ae,ce,pe,"\u229d","\\circleddash",!0),ie(ae,ce,pe,"\u229b","\\circledast",!0),ie(ae,ce,pe,"\u22c5","\\centerdot"),ie(ae,ce,pe,"\u22ba","\\intercal",!0),ie(ae,ce,pe,"\u22d2","\\doublecap"),ie(ae,ce,pe,"\u22d3","\\doublecup"),ie(ae,ce,pe,"\u22a0","\\boxtimes",!0),ie(ae,ce,xe,"\u21e2","\\dashrightarrow",!0),ie(ae,ce,xe,"\u21e0","\\dashleftarrow",!0),ie(ae,ce,xe,"\u21c7","\\leftleftarrows",!0),ie(ae,ce,xe,"\u21c6","\\leftrightarrows",!0),ie(ae,ce,xe,"\u21da","\\Lleftarrow",!0),ie(ae,ce,xe,"\u219e","\\twoheadleftarrow",!0),ie(ae,ce,xe,"\u21a2","\\leftarrowtail",!0),ie(ae,ce,xe,"\u21ab","\\looparrowleft",!0),ie(ae,ce,xe,"\u21cb","\\leftrightharpoons",!0),ie(ae,ce,xe,"\u21b6","\\curvearrowleft",!0),ie(ae,ce,xe,"\u21ba","\\circlearrowleft",!0),ie(ae,ce,xe,"\u21b0","\\Lsh",!0),ie(ae,ce,xe,"\u21c8","\\upuparrows",!0),ie(ae,ce,xe,"\u21bf","\\upharpoonleft",!0),ie(ae,ce,xe,"\u21c3","\\downharpoonleft",!0),ie(ae,he,xe,"\u22b6","\\origof",!0),ie(ae,he,xe,"\u22b7","\\imageof",!0),ie(ae,ce,xe,"\u22b8","\\multimap",!0),ie(ae,ce,xe,"\u21ad","\\leftrightsquigarrow",!0),ie(ae,ce,xe,"\u21c9","\\rightrightarrows",!0),ie(ae,ce,xe,"\u21c4","\\rightleftarrows",!0),ie(ae,ce,xe,"\u21a0","\\twoheadrightarrow",!0),ie(ae,ce,xe,"\u21a3","\\rightarrowtail",!0),ie(ae,ce,xe,"\u21ac","\\looparrowright",!0),ie(ae,ce,xe,"\u21b7","\\curvearrowright",!0),ie(ae,ce,xe,"\u21bb","\\circlearrowright",!0),ie(ae,ce,xe,"\u21b1","\\Rsh",!0),ie(ae,ce,xe,"\u21ca","\\downdownarrows",!0),ie(ae,ce,xe,"\u21be","\\upharpoonright",!0),ie(ae,ce,xe,"\u21c2","\\downharpoonright",!0),ie(ae,ce,xe,"\u21dd","\\rightsquigarrow",!0),ie(ae,ce,xe,"\u21dd","\\leadsto"),ie(ae,ce,xe,"\u21db","\\Rrightarrow",!0),ie(ae,ce,xe,"\u21be","\\restriction"),ie(ae,he,ve,"\u2018","`"),ie(ae,he,ve,"$","\\$"),ie(le,he,ve,"$","\\$"),ie(le,he,ve,"$","\\textdollar"),ie(ae,he,ve,"%","\\%"),ie(le,he,ve,"%","\\%"),ie(ae,he,ve,"_","\\_"),ie(le,he,ve,"_","\\_"),ie(le,he,ve,"_","\\textunderscore"),ie(ae,he,ve,"\u2220","\\angle",!0),ie(ae,he,ve,"\u221e","\\infty",!0),ie(ae,he,ve,"\u2032","\\prime"),ie(ae,he,ve,"\u25b3","\\triangle"),ie(ae,he,ve,"\u0393","\\Gamma",!0),ie(ae,he,ve,"\u0394","\\Delta",!0),ie(ae,he,ve,"\u0398","\\Theta",!0),ie(ae,he,ve,"\u039b","\\Lambda",!0),ie(ae,he,ve,"\u039e","\\Xi",!0),ie(ae,he,ve,"\u03a0","\\Pi",!0),ie(ae,he,ve,"\u03a3","\\Sigma",!0),ie(ae,he,ve,"\u03a5","\\Upsilon",!0),ie(ae,he,ve,"\u03a6","\\Phi",!0),ie(ae,he,ve,"\u03a8","\\Psi",!0),ie(ae,he,ve,"\u03a9","\\Omega",!0),ie(ae,he,ve,"A","\u0391"),ie(ae,he,ve,"B","\u0392"),ie(ae,he,ve,"E","\u0395"),ie(ae,he,ve,"Z","\u0396"),ie(ae,he,ve,"H","\u0397"),ie(ae,he,ve,"I","\u0399"),ie(ae,he,ve,"K","\u039a"),ie(ae,he,ve,"M","\u039c"),ie(ae,he,ve,"N","\u039d"),ie(ae,he,ve,"O","\u039f"),ie(ae,he,ve,"P","\u03a1"),ie(ae,he,ve,"T","\u03a4"),ie(ae,he,ve,"X","\u03a7"),ie(ae,he,ve,"\xac","\\neg",!0),ie(ae,he,ve,"\xac","\\lnot"),ie(ae,he,ve,"\u22a4","\\top"),ie(ae,he,ve,"\u22a5","\\bot"),ie(ae,he,ve,"\u2205","\\emptyset"),ie(ae,ce,ve,"\u2205","\\varnothing"),ie(ae,he,ge,"\u03b1","\\alpha",!0),ie(ae,he,ge,"\u03b2","\\beta",!0),ie(ae,he,ge,"\u03b3","\\gamma",!0),ie(ae,he,ge,"\u03b4","\\delta",!0),ie(ae,he,ge,"\u03f5","\\epsilon",!0),ie(ae,he,ge,"\u03b6","\\zeta",!0),ie(ae,he,ge,"\u03b7","\\eta",!0),ie(ae,he,ge,"\u03b8","\\theta",!0),ie(ae,he,ge,"\u03b9","\\iota",!0),ie(ae,he,ge,"\u03ba","\\kappa",!0),ie(ae,he,ge,"\u03bb","\\lambda",!0),ie(ae,he,ge,"\u03bc","\\mu",!0),ie(ae,he,ge,"\u03bd","\\nu",!0),ie(ae,he,ge,"\u03be","\\xi",!0),ie(ae,he,ge,"\u03bf","\\omicron",!0),ie(ae,he,ge,"\u03c0","\\pi",!0),ie(ae,he,ge,"\u03c1","\\rho",!0),ie(ae,he,ge,"\u03c3","\\sigma",!0),ie(ae,he,ge,"\u03c4","\\tau",!0),ie(ae,he,ge,"\u03c5","\\upsilon",!0),ie(ae,he,ge,"\u03d5","\\phi",!0),ie(ae,he,ge,"\u03c7","\\chi",!0),ie(ae,he,ge,"\u03c8","\\psi",!0),ie(ae,he,ge,"\u03c9","\\omega",!0),ie(ae,he,ge,"\u03b5","\\varepsilon",!0),ie(ae,he,ge,"\u03d1","\\vartheta",!0),ie(ae,he,ge,"\u03d6","\\varpi",!0),ie(ae,he,ge,"\u03f1","\\varrho",!0),ie(ae,he,ge,"\u03c2","\\varsigma",!0),ie(ae,he,ge,"\u03c6","\\varphi",!0),ie(ae,he,pe,"\u2217","*",!0),ie(ae,he,pe,"+","+"),ie(ae,he,pe,"\u2212","-",!0),ie(ae,he,pe,"\u22c5","\\cdot",!0),ie(ae,he,pe,"\u2218","\\circ",!0),ie(ae,he,pe,"\xf7","\\div",!0),ie(ae,he,pe,"\xb1","\\pm",!0),ie(ae,he,pe,"\xd7","\\times",!0),ie(ae,he,pe,"\u2229","\\cap",!0),ie(ae,he,pe,"\u222a","\\cup",!0),ie(ae,he,pe,"\u2216","\\setminus",!0),ie(ae,he,pe,"\u2227","\\land"),ie(ae,he,pe,"\u2228","\\lor"),ie(ae,he,pe,"\u2227","\\wedge",!0),ie(ae,he,pe,"\u2228","\\vee",!0),ie(ae,he,ve,"\u221a","\\surd"),ie(ae,he,be,"\u27e8","\\langle",!0),ie(ae,he,be,"\u2223","\\lvert"),ie(ae,he,be,"\u2225","\\lVert"),ie(ae,he,ue,"?","?"),ie(ae,he,ue,"!","!"),ie(ae,he,ue,"\u27e9","\\rangle",!0),ie(ae,he,ue,"\u2223","\\rvert"),ie(ae,he,ue,"\u2225","\\rVert"),ie(ae,he,xe,"=","="),ie(ae,he,xe,":",":"),ie(ae,he,xe,"\u2248","\\approx",!0),ie(ae,he,xe,"\u2245","\\cong",!0),ie(ae,he,xe,"\u2265","\\ge"),ie(ae,he,xe,"\u2265","\\geq",!0),ie(ae,he,xe,"\u2190","\\gets"),ie(ae,he,xe,">","\\gt",!0),ie(ae,he,xe,"\u2208","\\in",!0),ie(ae,he,xe,"\ue020","\\@not"),ie(ae,he,xe,"\u2282","\\subset",!0),ie(ae,he,xe,"\u2283","\\supset",!0),ie(ae,he,xe,"\u2286","\\subseteq",!0),ie(ae,he,xe,"\u2287","\\supseteq",!0),ie(ae,ce,xe,"\u2288","\\nsubseteq",!0),ie(ae,ce,xe,"\u2289","\\nsupseteq",!0),ie(ae,he,xe,"\u22a8","\\models"),ie(ae,he,xe,"\u2190","\\leftarrow",!0),ie(ae,he,xe,"\u2264","\\le"),ie(ae,he,xe,"\u2264","\\leq",!0),ie(ae,he,xe,"<","\\lt",!0),ie(ae,he,xe,"\u2192","\\rightarrow",!0),ie(ae,he,xe,"\u2192","\\to"),ie(ae,ce,xe,"\u2271","\\ngeq",!0),ie(ae,ce,xe,"\u2270","\\nleq",!0),ie(ae,he,we,"\xa0","\\ "),ie(ae,he,we,"\xa0","\\space"),ie(ae,he,we,"\xa0","\\nobreakspace"),ie(le,he,we,"\xa0","\\ "),ie(le,he,we,"\xa0"," "),ie(le,he,we,"\xa0","\\space"),ie(le,he,we,"\xa0","\\nobreakspace"),ie(ae,he,we,null,"\\nobreak"),ie(ae,he,we,null,"\\allowbreak"),ie(ae,he,ye,",",","),ie(ae,he,ye,";",";"),ie(ae,ce,pe,"\u22bc","\\barwedge",!0),ie(ae,ce,pe,"\u22bb","\\veebar",!0),ie(ae,he,pe,"\u2299","\\odot",!0),ie(ae,he,pe,"\u2295","\\oplus",!0),ie(ae,he,pe,"\u2297","\\otimes",!0),ie(ae,he,ve,"\u2202","\\partial",!0),ie(ae,he,pe,"\u2298","\\oslash",!0),ie(ae,ce,pe,"\u229a","\\circledcirc",!0),ie(ae,ce,pe,"\u22a1","\\boxdot",!0),ie(ae,he,pe,"\u25b3","\\bigtriangleup"),ie(ae,he,pe,"\u25bd","\\bigtriangledown"),ie(ae,he,pe,"\u2020","\\dagger"),ie(ae,he,pe,"\u22c4","\\diamond"),ie(ae,he,pe,"\u22c6","\\star"),ie(ae,he,pe,"\u25c3","\\triangleleft"),ie(ae,he,pe,"\u25b9","\\triangleright"),ie(ae,he,be,"{","\\{"),ie(le,he,ve,"{","\\{"),ie(le,he,ve,"{","\\textbraceleft"),ie(ae,he,ue,"}","\\}"),ie(le,he,ve,"}","\\}"),ie(le,he,ve,"}","\\textbraceright"),ie(ae,he,be,"{","\\lbrace"),ie(ae,he,ue,"}","\\rbrace"),ie(ae,he,be,"[","\\lbrack",!0),ie(le,he,ve,"[","\\lbrack",!0),ie(ae,he,ue,"]","\\rbrack",!0),ie(le,he,ve,"]","\\rbrack",!0),ie(ae,he,be,"(","\\lparen",!0),ie(ae,he,ue,")","\\rparen",!0),ie(le,he,ve,"<","\\textless",!0),ie(le,he,ve,">","\\textgreater",!0),ie(ae,he,be,"\u230a","\\lfloor",!0),ie(ae,he,ue,"\u230b","\\rfloor",!0),ie(ae,he,be,"\u2308","\\lceil",!0),ie(ae,he,ue,"\u2309","\\rceil",!0),ie(ae,he,ve,"\\","\\backslash"),ie(ae,he,ve,"\u2223","|"),ie(ae,he,ve,"\u2223","\\vert"),ie(le,he,ve,"|","\\textbar",!0),ie(ae,he,ve,"\u2225","\\|"),ie(ae,he,ve,"\u2225","\\Vert"),ie(le,he,ve,"\u2225","\\textbardbl"),ie(le,he,ve,"~","\\textasciitilde"),ie(le,he,ve,"\\","\\textbackslash"),ie(le,he,ve,"^","\\textasciicircum"),ie(ae,he,xe,"\u2191","\\uparrow",!0),ie(ae,he,xe,"\u21d1","\\Uparrow",!0),ie(ae,he,xe,"\u2193","\\downarrow",!0),ie(ae,he,xe,"\u21d3","\\Downarrow",!0),ie(ae,he,xe,"\u2195","\\updownarrow",!0),ie(ae,he,xe,"\u21d5","\\Updownarrow",!0),ie(ae,he,fe,"\u2210","\\coprod"),ie(ae,he,fe,"\u22c1","\\bigvee"),ie(ae,he,fe,"\u22c0","\\bigwedge"),ie(ae,he,fe,"\u2a04","\\biguplus"),ie(ae,he,fe,"\u22c2","\\bigcap"),ie(ae,he,fe,"\u22c3","\\bigcup"),ie(ae,he,fe,"\u222b","\\int"),ie(ae,he,fe,"\u222b","\\intop"),ie(ae,he,fe,"\u222c","\\iint"),ie(ae,he,fe,"\u222d","\\iiint"),ie(ae,he,fe,"\u220f","\\prod"),ie(ae,he,fe,"\u2211","\\sum"),ie(ae,he,fe,"\u2a02","\\bigotimes"),ie(ae,he,fe,"\u2a01","\\bigoplus"),ie(ae,he,fe,"\u2a00","\\bigodot"),ie(ae,he,fe,"\u222e","\\oint"),ie(ae,he,fe,"\u222f","\\oiint"),ie(ae,he,fe,"\u2230","\\oiiint"),ie(ae,he,fe,"\u2a06","\\bigsqcup"),ie(ae,he,fe,"\u222b","\\smallint"),ie(le,he,de,"\u2026","\\textellipsis"),ie(ae,he,de,"\u2026","\\mathellipsis"),ie(le,he,de,"\u2026","\\ldots",!0),ie(ae,he,de,"\u2026","\\ldots",!0),ie(ae,he,de,"\u22ef","\\@cdots",!0),ie(ae,he,de,"\u22f1","\\ddots",!0),ie(ae,he,ve,"\u22ee","\\varvdots"),ie(le,he,ve,"\u22ee","\\varvdots"),ie(ae,he,me,"\u02ca","\\acute"),ie(ae,he,me,"\u02cb","\\grave"),ie(ae,he,me,"\xa8","\\ddot"),ie(ae,he,me,"~","\\tilde"),ie(ae,he,me,"\u02c9","\\bar"),ie(ae,he,me,"\u02d8","\\breve"),ie(ae,he,me,"\u02c7","\\check"),ie(ae,he,me,"^","\\hat"),ie(ae,he,me,"\u20d7","\\vec"),ie(ae,he,me,"\u02d9","\\dot"),ie(ae,he,me,"\u02da","\\mathring"),ie(ae,he,ge,"\ue131","\\@imath"),ie(ae,he,ge,"\ue237","\\@jmath"),ie(ae,he,ve,"\u0131","\u0131"),ie(ae,he,ve,"\u0237","\u0237"),ie(le,he,ve,"\u0131","\\i",!0),ie(le,he,ve,"\u0237","\\j",!0),ie(le,he,ve,"\xdf","\\ss",!0),ie(le,he,ve,"\xe6","\\ae",!0),ie(le,he,ve,"\u0153","\\oe",!0),ie(le,he,ve,"\xf8","\\o",!0),ie(le,he,ve,"\xc6","\\AE",!0),ie(le,he,ve,"\u0152","\\OE",!0),ie(le,he,ve,"\xd8","\\O",!0),ie(le,he,me,"\u02ca","\\'"),ie(le,he,me,"\u02cb","\\`"),ie(le,he,me,"\u02c6","\\^"),ie(le,he,me,"\u02dc","\\~"),ie(le,he,me,"\u02c9","\\="),ie(le,he,me,"\u02d8","\\u"),ie(le,he,me,"\u02d9","\\."),ie(le,he,me,"\xb8","\\c"),ie(le,he,me,"\u02da","\\r"),ie(le,he,me,"\u02c7","\\v"),ie(le,he,me,"\xa8",'\\"'),ie(le,he,me,"\u02dd","\\H"),ie(le,he,me,"\u25ef","\\textcircled");const ke={"--":!0,"---":!0,"``":!0,"''":!0};ie(le,he,ve,"\u2013","--",!0),ie(le,he,ve,"\u2013","\\textendash"),ie(le,he,ve,"\u2014","---",!0),ie(le,he,ve,"\u2014","\\textemdash"),ie(le,he,ve,"\u2018","`",!0),ie(le,he,ve,"\u2018","\\textquoteleft"),ie(le,he,ve,"\u2019","'",!0),ie(le,he,ve,"\u2019","\\textquoteright"),ie(le,he,ve,"\u201c","``",!0),ie(le,he,ve,"\u201c","\\textquotedblleft"),ie(le,he,ve,"\u201d","''",!0),ie(le,he,ve,"\u201d","\\textquotedblright"),ie(ae,he,ve,"\xb0","\\degree",!0),ie(le,he,ve,"\xb0","\\degree"),ie(le,he,ve,"\xb0","\\textdegree",!0),ie(ae,he,ve,"\xa3","\\pounds"),ie(ae,he,ve,"\xa3","\\mathsterling",!0),ie(le,he,ve,"\xa3","\\pounds"),ie(le,he,ve,"\xa3","\\textsterling",!0),ie(ae,ce,ve,"\u2720","\\maltese"),ie(le,ce,ve,"\u2720","\\maltese");const Se='0123456789/@."';for(let e=0;e<14;e++){const t=Se.charAt(e);ie(ae,he,ve,t,t)}const Me='0123456789!@*()-=+";:?/.,';for(let e=0;e<25;e++){const t=Me.charAt(e);ie(le,he,ve,t,t)}const ze="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";for(let e=0;e<52;e++){const t=ze.charAt(e);ie(ae,he,ge,t,t),ie(le,he,ve,t,t)}ie(ae,ce,ve,"C","\u2102"),ie(le,ce,ve,"C","\u2102"),ie(ae,ce,ve,"H","\u210d"),ie(le,ce,ve,"H","\u210d"),ie(ae,ce,ve,"N","\u2115"),ie(le,ce,ve,"N","\u2115"),ie(ae,ce,ve,"P","\u2119"),ie(le,ce,ve,"P","\u2119"),ie(ae,ce,ve,"Q","\u211a"),ie(le,ce,ve,"Q","\u211a"),ie(ae,ce,ve,"R","\u211d"),ie(le,ce,ve,"R","\u211d"),ie(ae,ce,ve,"Z","\u2124"),ie(le,ce,ve,"Z","\u2124"),ie(ae,he,ge,"h","\u210e"),ie(le,he,ge,"h","\u210e");let Ae="";for(let e=0;e<52;e++){const t=ze.charAt(e);Ae=String.fromCharCode(55349,56320+e),ie(ae,he,ge,t,Ae),ie(le,he,ve,t,Ae),Ae=String.fromCharCode(55349,56372+e),ie(ae,he,ge,t,Ae),ie(le,he,ve,t,Ae),Ae=String.fromCharCode(55349,56424+e),ie(ae,he,ge,t,Ae),ie(le,he,ve,t,Ae),Ae=String.fromCharCode(55349,56580+e),ie(ae,he,ge,t,Ae),ie(le,he,ve,t,Ae),Ae=String.fromCharCode(55349,56684+e),ie(ae,he,ge,t,Ae),ie(le,he,ve,t,Ae),Ae=String.fromCharCode(55349,56736+e),ie(ae,he,ge,t,Ae),ie(le,he,ve,t,Ae),Ae=String.fromCharCode(55349,56788+e),ie(ae,he,ge,t,Ae),ie(le,he,ve,t,Ae),Ae=String.fromCharCode(55349,56840+e),ie(ae,he,ge,t,Ae),ie(le,he,ve,t,Ae),Ae=String.fromCharCode(55349,56944+e),ie(ae,he,ge,t,Ae),ie(le,he,ve,t,Ae),e<26&&(Ae=String.fromCharCode(55349,56632+e),ie(ae,he,ge,t,Ae),ie(le,he,ve,t,Ae),Ae=String.fromCharCode(55349,56476+e),ie(ae,he,ge,t,Ae),ie(le,he,ve,t,Ae))}Ae=String.fromCharCode(55349,56668),ie(ae,he,ge,"k",Ae),ie(le,he,ve,"k",Ae);for(let e=0;e<10;e++){const t=e.toString();Ae=String.fromCharCode(55349,57294+e),ie(ae,he,ge,t,Ae),ie(le,he,ve,t,Ae),Ae=String.fromCharCode(55349,57314+e),ie(ae,he,ge,t,Ae),ie(le,he,ve,t,Ae),Ae=String.fromCharCode(55349,57324+e),ie(ae,he,ge,t,Ae),ie(le,he,ve,t,Ae),Ae=String.fromCharCode(55349,57334+e),ie(ae,he,ge,t,Ae),ie(le,he,ve,t,Ae)}const Te="\xd0\xde\xfe";for(let e=0;e<3;e++){const t=Te.charAt(e);ie(ae,he,ge,t,t),ie(le,he,ve,t,t)}const Be=[["mathbf","textbf","Main-Bold"],["mathbf","textbf","Main-Bold"],["mathnormal","textit","Math-Italic"],["mathnormal","textit","Math-Italic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["mathscr","textscr","Script-Regular"],["","",""],["","",""],["","",""],["mathfrak","textfrak","Fraktur-Regular"],["mathfrak","textfrak","Fraktur-Regular"],["mathbb","textbb","AMS-Regular"],["mathbb","textbb","AMS-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathitsf","textitsf","SansSerif-Italic"],["mathitsf","textitsf","SansSerif-Italic"],["","",""],["","",""],["mathtt","texttt","Typewriter-Regular"],["mathtt","texttt","Typewriter-Regular"]],Ce=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],Ne=function(e,t,r){return se[r][e]&&se[r][e].replace&&(e=se[r][e].replace),{value:e,metrics:N(e,t,r)}},qe=function(e,t,r,n,o){const s=Ne(e,t,r),i=s.metrics;let a;if(e=s.value,i){let t=i.italic;("text"===r||n&&"mathit"===n.font)&&(t=0),a=new K(e,i.height,i.depth,t,i.skew,i.width,o)}else"undefined"!=typeof console&&console.warn("No character metrics for '"+e+"' in style '"+t+"' and mode '"+r+"'"),a=new K(e,0,0,0,0,0,o);if(n){a.maxFontSize=n.sizeMultiplier,n.style.isTight()&&a.classes.push("mtight");const e=n.getColor();e&&(a.style.color=e)}return a},Ie=(e,t)=>{if(G(e.classes)!==G(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize)return!1;if(1===e.classes.length){const t=e.classes[0];if("mbin"===t||"mord"===t)return!1}for(const r in e.style)if(e.style.hasOwnProperty(r)&&e.style[r]!==t.style[r])return!1;for(const r in t.style)if(t.style.hasOwnProperty(r)&&e.style[r]!==t.style[r])return!1;return!0},Re=function(e){let t=0,r=0,n=0;for(let o=0;o<e.children.length;o++){const s=e.children[o];s.height>t&&(t=s.height),s.depth>r&&(r=s.depth),s.maxFontSize>n&&(n=s.maxFontSize)}e.height=t,e.depth=r,e.maxFontSize=n},He=function(e,t,r,n){const o=new _(e,t,r,n);return Re(o),o},Oe=(e,t,r,n)=>new _(e,t,r,n),Ee=function(e){const t=new A(e);return Re(t),t},Le=function(e,t,r){let n,o="";switch(e){case"amsrm":o="AMS";break;case"textrm":o="Main";break;case"textsf":o="SansSerif";break;case"texttt":o="Typewriter";break;default:o=e}return n="textbf"===t&&"textit"===r?"BoldItalic":"textbf"===t?"Bold":"textit"===t?"Italic":"Regular",o+"-"+n},De={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathsfit:{variant:"sans-serif-italic",fontName:"SansSerif-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},Ve={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]};var Pe={fontMap:De,makeSymbol:qe,mathsym:function(e,t,r,n){return void 0===n&&(n=[]),"boldsymbol"===r.font&&Ne(e,"Main-Bold",t).metrics?qe(e,"Main-Bold",t,r,n.concat(["mathbf"])):"\\"===e||"main"===se[t][e].font?qe(e,"Main-Regular",t,r,n):qe(e,"AMS-Regular",t,r,n.concat(["amsrm"]))},makeSpan:He,makeSvgSpan:Oe,makeLineSpan:function(e,t,r){const n=He([e],[],t);return n.height=Math.max(r||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),n.style.borderBottomWidth=F(n.height),n.maxFontSize=1,n},makeAnchor:function(e,t,r,n){const o=new j(e,t,r,n);return Re(o),o},makeFragment:Ee,wrapFragment:function(e,t){return e instanceof A?He([],[e],t):e},makeVList:function(e,t){const{children:r,depth:n}=function(e){if("individualShift"===e.positionType){const t=e.children,r=[t[0]],n=-t[0].shift-t[0].elem.depth;let o=n;for(let e=1;e<t.length;e++){const n=-t[e].shift-o-t[e].elem.depth,s=n-(t[e-1].elem.height+t[e-1].elem.depth);o+=n,r.push({type:"kern",size:s}),r.push(t[e])}return{children:r,depth:n}}let t;if("top"===e.positionType){let r=e.positionData;for(let t=0;t<e.children.length;t++){const n=e.children[t];r-="kern"===n.type?n.size:n.elem.height+n.elem.depth}t=r}else if("bottom"===e.positionType)t=-e.positionData;else{const r=e.children[0];if("elem"!==r.type)throw new Error('First child must have type "elem".');if("shift"===e.positionType)t=-r.elem.depth-e.positionData;else{if("firstBaseline"!==e.positionType)throw new Error("Invalid positionType "+e.positionType+".");t=-r.elem.depth}}return{children:e.children,depth:t}}(e);let o=0;for(let e=0;e<r.length;e++){const t=r[e];if("elem"===t.type){const e=t.elem;o=Math.max(o,e.maxFontSize,e.height)}}o+=2;const s=He(["pstrut"],[]);s.style.height=F(o);const i=[];let a=n,l=n,h=n;for(let e=0;e<r.length;e++){const t=r[e];if("kern"===t.type)h+=t.size;else{const e=t.elem,r=t.wrapperClasses||[],n=t.wrapperStyle||{},a=He(r,[s,e],void 0,n);a.style.top=F(-o-h-e.depth),t.marginLeft&&(a.style.marginLeft=t.marginLeft),t.marginRight&&(a.style.marginRight=t.marginRight),i.push(a),h+=e.height+e.depth}a=Math.min(a,h),l=Math.max(l,h)}const c=He(["vlist"],i);let m;if(c.style.height=F(l),a<0){const e=He([],[]),t=He(["vlist"],[e]);t.style.height=F(-a);const r=He(["vlist-s"],[new K("\u200b")]);m=[He(["vlist-r"],[c,r]),He(["vlist-r"],[t])]}else m=[He(["vlist-r"],[c])];const p=He(["vlist-t"],m);return 2===m.length&&p.classes.push("vlist-t2"),p.height=l,p.depth=-a,p},makeOrd:function(e,t,r){const o=e.mode,s=e.text,i=["mord"],a="math"===o||"text"===o&&t.font,l=a?t.font:t.fontFamily;let h="",c="";if(55349===s.charCodeAt(0)&&([h,c]=function(e,t){const r=1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536,o="math"===t?0:1;if(119808<=r&&r<120484){const e=Math.floor((r-119808)/26);return[Be[e][2],Be[e][o]]}if(120782<=r&&r<=120831){const e=Math.floor((r-120782)/10);return[Ce[e][2],Ce[e][o]]}if(120485===r||120486===r)return[Be[0][2],Be[0][o]];if(120486<r&&r<120782)return["",""];throw new n("Unsupported character: "+e)}(s,o)),h.length>0)return qe(s,h,o,t,i.concat(c));if(l){let e,n;if("boldsymbol"===l){const t=function(e,t,r,n,o){return"textord"!==o&&Ne(e,"Math-BoldItalic",t).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}}(s,o,0,0,r);e=t.fontName,n=[t.fontClass]}else a?(e=De[l].fontName,n=[l]):(e=Le(l,t.fontWeight,t.fontShape),n=[l,t.fontWeight,t.fontShape]);if(Ne(s,e,o).metrics)return qe(s,e,o,t,i.concat(n));if(ke.hasOwnProperty(s)&&"Typewriter"===e.slice(0,10)){const r=[];for(let a=0;a<s.length;a++)r.push(qe(s[a],e,o,t,i.concat(n)));return Ee(r)}}if("mathord"===r)return qe(s,"Math-Italic",o,t,i.concat(["mathnormal"]));if("textord"===r){const e=se[o][s]&&se[o][s].font;if("ams"===e){const e=Le("amsrm",t.fontWeight,t.fontShape);return qe(s,e,o,t,i.concat("amsrm",t.fontWeight,t.fontShape))}if("main"!==e&&e){const r=Le(e,t.fontWeight,t.fontShape);return qe(s,r,o,t,i.concat(r,t.fontWeight,t.fontShape))}{const e=Le("textrm",t.fontWeight,t.fontShape);return qe(s,e,o,t,i.concat(t.fontWeight,t.fontShape))}}throw new Error("unexpected type: "+r+" in makeOrd")},makeGlue:(e,t)=>{const r=He(["mspace"],[],t),n=P(e,t);return r.style.marginRight=F(n),r},staticSvg:function(e,t){const[r,n,o]=Ve[e],s=new Q(r),i=new J([s],{width:F(n),height:F(o),style:"width:"+F(n),viewBox:"0 0 "+1e3*n+" "+1e3*o,preserveAspectRatio:"xMinYMin"}),a=Oe(["overlay"],[i],t);return a.height=o,a.style.height=F(o),a.style.width=F(n),a},svgData:Ve,tryCombineChars:e=>{for(let t=0;t<e.length-1;t++){const r=e[t],n=e[t+1];r instanceof K&&n instanceof K&&Ie(r,n)&&(r.text+=n.text,r.height=Math.max(r.height,n.height),r.depth=Math.max(r.depth,n.depth),r.italic=n.italic,e.splice(t+1,1),t--)}return e}};const Fe={number:3,unit:"mu"},Ge={number:4,unit:"mu"},Ue={number:5,unit:"mu"},Ye={mord:{mop:Fe,mbin:Ge,mrel:Ue,minner:Fe},mop:{mord:Fe,mop:Fe,mrel:Ue,minner:Fe},mbin:{mord:Ge,mop:Ge,mopen:Ge,minner:Ge},mrel:{mord:Ue,mop:Ue,mopen:Ue,minner:Ue},mopen:{},mclose:{mop:Fe,mbin:Ge,mrel:Ue,minner:Fe},mpunct:{mord:Fe,mop:Fe,mrel:Ue,mopen:Fe,mclose:Fe,mpunct:Fe,minner:Fe},minner:{mord:Fe,mop:Fe,mbin:Ge,mrel:Ue,mopen:Fe,mpunct:Fe,minner:Fe}},Xe={mord:{mop:Fe},mop:{mord:Fe,mop:Fe},mbin:{},mrel:{},mopen:{},mclose:{mop:Fe},mpunct:{},minner:{mop:Fe}},We={},_e={},je={};function $e(e){let{type:t,names:r,props:n,handler:o,htmlBuilder:s,mathmlBuilder:i}=e;const a={type:t,numArgs:n.numArgs,argTypes:n.argTypes,allowedInArgument:!!n.allowedInArgument,allowedInText:!!n.allowedInText,allowedInMath:void 0===n.allowedInMath||n.allowedInMath,numOptionalArgs:n.numOptionalArgs||0,infix:!!n.infix,primitive:!!n.primitive,handler:o};for(let e=0;e<r.length;++e)We[r[e]]=a;t&&(s&&(_e[t]=s),i&&(je[t]=i))}function Ze(e){let{type:t,htmlBuilder:r,mathmlBuilder:n}=e;$e({type:t,names:[],props:{numArgs:0},handler(){throw new Error("Should never be called.")},htmlBuilder:r,mathmlBuilder:n})}const Ke=function(e){return"ordgroup"===e.type&&1===e.body.length?e.body[0]:e},Je=function(e){return"ordgroup"===e.type?e.body:[e]},Qe=Pe.makeSpan,et=["leftmost","mbin","mopen","mrel","mop","mpunct"],tt=["rightmost","mrel","mclose","mpunct"],rt={display:w.DISPLAY,text:w.TEXT,script:w.SCRIPT,scriptscript:w.SCRIPTSCRIPT},nt={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},ot=function(e,t,r,n){void 0===n&&(n=[null,null]);const o=[];for(let r=0;r<e.length;r++){const n=ct(e[r],t);if(n instanceof A){const e=n.children;o.push(...e)}else o.push(n)}if(Pe.tryCombineChars(o),!r)return o;let s=t;if(1===e.length){const r=e[0];"sizing"===r.type?s=t.havingSize(r.size):"styling"===r.type&&(s=t.havingStyle(rt[r.style]))}const i=Qe([n[0]||"leftmost"],[],t),a=Qe([n[1]||"rightmost"],[],t),h="root"===r;return st(o,((e,t)=>{const r=t.classes[0],n=e.classes[0];"mbin"===r&&l.contains(tt,n)?t.classes[0]="mord":"mbin"===n&&l.contains(et,r)&&(e.classes[0]="mord")}),{node:i},a,h),st(o,((e,t)=>{const r=lt(t),n=lt(e),o=r&&n?e.hasClass("mtight")?Xe[r][n]:Ye[r][n]:null;if(o)return Pe.makeGlue(o,s)}),{node:i},a,h),o},st=function(e,t,r,n,o){n&&e.push(n);let s=0;for(;s<e.length;s++){const n=e[s],i=it(n);if(i){st(i.children,t,r,null,o);continue}const a=!n.hasClass("mspace");if(a){const o=t(n,r.node);o&&(r.insertAfter?r.insertAfter(o):(e.unshift(o),s++))}a?r.node=n:o&&n.hasClass("newline")&&(r.node=Qe(["leftmost"])),r.insertAfter=(t=>r=>{e.splice(t+1,0,r),s++})(s)}n&&e.pop()},it=function(e){return e instanceof A||e instanceof j||e instanceof _&&e.hasClass("enclosing")?e:null},at=function(e,t){const r=it(e);if(r){const e=r.children;if(e.length){if("right"===t)return at(e[e.length-1],"right");if("left"===t)return at(e[0],"left")}}return e},lt=function(e,t){return e?(t&&(e=at(e,t)),nt[e.classes[0]]||null):null},ht=function(e,t){const r=["nulldelimiter"].concat(e.baseSizingClasses());return Qe(t.concat(r))},ct=function(e,t,r){if(!e)return Qe();if(_e[e.type]){let n=_e[e.type](e,t);if(r&&t.size!==r.size){n=Qe(t.sizingClasses(r),[n],t);const e=t.sizeMultiplier/r.sizeMultiplier;n.height*=e,n.depth*=e}return n}throw new n("Got group of unknown type: '"+e.type+"'")};function mt(e,t){const r=Qe(["base"],e,t),n=Qe(["strut"]);return n.style.height=F(r.height+r.depth),r.depth&&(n.style.verticalAlign=F(-r.depth)),r.children.unshift(n),r}function pt(e,t){let r=null;1===e.length&&"tag"===e[0].type&&(r=e[0].tag,e=e[0].body);const n=ot(e,t,"root");let o;2===n.length&&n[1].hasClass("tag")&&(o=n.pop());const s=[];let i,a=[];for(let e=0;e<n.length;e++)if(a.push(n[e]),n[e].hasClass("mbin")||n[e].hasClass("mrel")||n[e].hasClass("allowbreak")){let r=!1;for(;e<n.length-1&&n[e+1].hasClass("mspace")&&!n[e+1].hasClass("newline");)e++,a.push(n[e]),n[e].hasClass("nobreak")&&(r=!0);r||(s.push(mt(a,t)),a=[])}else n[e].hasClass("newline")&&(a.pop(),a.length>0&&(s.push(mt(a,t)),a=[]),s.push(n[e]));a.length>0&&s.push(mt(a,t)),r?(i=mt(ot(r,t,!0)),i.classes=["tag"],s.push(i)):o&&s.push(o);const l=Qe(["katex-html"],s);if(l.setAttribute("aria-hidden","true"),i){const e=i.children[0];e.style.height=F(l.height+l.depth),l.depth&&(e.style.verticalAlign=F(-l.depth))}return l}function ut(e){return new A(e)}class dt{constructor(e,t,r){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=t||[],this.classes=r||[]}setAttribute(e,t){this.attributes[e]=t}getAttribute(e){return this.attributes[e]}toNode(){const e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(const t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);this.classes.length>0&&(e.className=G(this.classes));for(let t=0;t<this.children.length;t++)if(this.children[t]instanceof gt&&this.children[t+1]instanceof gt){let r=this.children[t].toText()+this.children[++t].toText();for(;this.children[t+1]instanceof gt;)r+=this.children[++t].toText();e.appendChild(new gt(r).toNode())}else e.appendChild(this.children[t].toNode());return e}toMarkup(){let e="<"+this.type;for(const t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+'="',e+=l.escape(this.attributes[t]),e+='"');this.classes.length>0&&(e+=' class="'+l.escape(G(this.classes))+'"'),e+=">";for(let t=0;t<this.children.length;t++)e+=this.children[t].toMarkup();return e+="</"+this.type+">",e}toText(){return this.children.map((e=>e.toText())).join("")}}class gt{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return l.escape(this.toText())}toText(){return this.text}}var ft={MathNode:dt,TextNode:gt,SpaceNode:class{constructor(e){this.width=void 0,this.character=void 0,this.width=e,this.character=e>=.05555&&e<=.05556?"\u200a":e>=.1666&&e<=.1667?"\u2009":e>=.2222&&e<=.2223?"\u2005":e>=.2777&&e<=.2778?"\u2005\u200a":e>=-.05556&&e<=-.05555?"\u200a\u2063":e>=-.1667&&e<=-.1666?"\u2009\u2063":e>=-.2223&&e<=-.2222?"\u205f\u2063":e>=-.2778&&e<=-.2777?"\u2005\u2063":null}toNode(){if(this.character)return document.createTextNode(this.character);{const e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return e.setAttribute("width",F(this.width)),e}}toMarkup(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+F(this.width)+'"/>'}toText(){return this.character?this.character:" "}},newDocumentFragment:ut};const bt=function(e,t,r){return!se[t][e]||!se[t][e].replace||55349===e.charCodeAt(0)||ke.hasOwnProperty(e)&&r&&(r.fontFamily&&"tt"===r.fontFamily.slice(4,6)||r.font&&"tt"===r.font.slice(4,6))||(e=se[t][e].replace),new ft.TextNode(e)},yt=function(e){return 1===e.length?e[0]:new ft.MathNode("mrow",e)},xt=function(e,t){if("texttt"===t.fontFamily)return"monospace";if("textsf"===t.fontFamily)return"textit"===t.fontShape&&"textbf"===t.fontWeight?"sans-serif-bold-italic":"textit"===t.fontShape?"sans-serif-italic":"textbf"===t.fontWeight?"bold-sans-serif":"sans-serif";if("textit"===t.fontShape&&"textbf"===t.fontWeight)return"bold-italic";if("textit"===t.fontShape)return"italic";if("textbf"===t.fontWeight)return"bold";const r=t.font;if(!r||"mathnormal"===r)return null;const n=e.mode;if("mathit"===r)return"italic";if("boldsymbol"===r)return"textord"===e.type?"bold":"bold-italic";if("mathbf"===r)return"bold";if("mathbb"===r)return"double-struck";if("mathsfit"===r)return"sans-serif-italic";if("mathfrak"===r)return"fraktur";if("mathscr"===r||"mathcal"===r)return"script";if("mathsf"===r)return"sans-serif";if("mathtt"===r)return"monospace";let o=e.text;if(l.contains(["\\imath","\\jmath"],o))return null;se[n][o]&&se[n][o].replace&&(o=se[n][o].replace);return N(o,Pe.fontMap[r].fontName,n)?Pe.fontMap[r].variant:null};function wt(e){if(!e)return!1;if("mi"===e.type&&1===e.children.length){const t=e.children[0];return t instanceof gt&&"."===t.text}if("mo"===e.type&&1===e.children.length&&"true"===e.getAttribute("separator")&&"0em"===e.getAttribute("lspace")&&"0em"===e.getAttribute("rspace")){const t=e.children[0];return t instanceof gt&&","===t.text}return!1}const vt=function(e,t,r){if(1===e.length){const n=St(e[0],t);return r&&n instanceof dt&&"mo"===n.type&&(n.setAttribute("lspace","0em"),n.setAttribute("rspace","0em")),[n]}const n=[];let o;for(let r=0;r<e.length;r++){const s=St(e[r],t);if(s instanceof dt&&o instanceof dt){if("mtext"===s.type&&"mtext"===o.type&&s.getAttribute("mathvariant")===o.getAttribute("mathvariant")){o.children.push(...s.children);continue}if("mn"===s.type&&"mn"===o.type){o.children.push(...s.children);continue}if(wt(s)&&"mn"===o.type){o.children.push(...s.children);continue}if("mn"===s.type&&wt(o))s.children=[...o.children,...s.children],n.pop();else if(("msup"===s.type||"msub"===s.type)&&s.children.length>=1&&("mn"===o.type||wt(o))){const e=s.children[0];e instanceof dt&&"mn"===e.type&&(e.children=[...o.children,...e.children],n.pop())}else if("mi"===o.type&&1===o.children.length){const e=o.children[0];if(e instanceof gt&&"\u0338"===e.text&&("mo"===s.type||"mi"===s.type||"mn"===s.type)){const e=s.children[0];e instanceof gt&&e.text.length>0&&(e.text=e.text.slice(0,1)+"\u0338"+e.text.slice(1),n.pop())}}}n.push(s),o=s}return n},kt=function(e,t,r){return yt(vt(e,t,r))},St=function(e,t){if(!e)return new ft.MathNode("mrow");if(je[e.type]){return je[e.type](e,t)}throw new n("Got group of unknown type: '"+e.type+"'")};function Mt(e,t,r,n,o){const s=vt(e,r);let i;i=1===s.length&&s[0]instanceof dt&&l.contains(["mrow","mtable"],s[0].type)?s[0]:new ft.MathNode("mrow",s);const a=new ft.MathNode("annotation",[new ft.TextNode(t)]);a.setAttribute("encoding","application/x-tex");const h=new ft.MathNode("semantics",[i,a]),c=new ft.MathNode("math",[h]);c.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),n&&c.setAttribute("display","block");const m=o?"katex":"katex-mathml";return Pe.makeSpan([m],[c])}const zt=function(e){return new E({style:e.displayMode?w.DISPLAY:w.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},At=function(e,t){if(t.displayMode){const r=["katex-display"];t.leqno&&r.push("leqno"),t.fleqn&&r.push("fleqn"),e=Pe.makeSpan(r,[e])}return e},Tt=function(e,t,r){const n=zt(r);let o;if("mathml"===r.output)return Mt(e,t,n,r.displayMode,!0);if("html"===r.output){const t=pt(e,n);o=Pe.makeSpan(["katex"],[t])}else{const s=Mt(e,t,n,r.displayMode,!1),i=pt(e,n);o=Pe.makeSpan(["katex"],[s,i])}return At(o,r)};const Bt={widehat:"^",widecheck:"\u02c7",widetilde:"~",utilde:"~",overleftarrow:"\u2190",underleftarrow:"\u2190",xleftarrow:"\u2190",overrightarrow:"\u2192",underrightarrow:"\u2192",xrightarrow:"\u2192",underbrace:"\u23df",overbrace:"\u23de",overgroup:"\u23e0",undergroup:"\u23e1",overleftrightarrow:"\u2194",underleftrightarrow:"\u2194",xleftrightarrow:"\u2194",Overrightarrow:"\u21d2",xRightarrow:"\u21d2",overleftharpoon:"\u21bc",xleftharpoonup:"\u21bc",overrightharpoon:"\u21c0",xrightharpoonup:"\u21c0",xLeftarrow:"\u21d0",xLeftrightarrow:"\u21d4",xhookleftarrow:"\u21a9",xhookrightarrow:"\u21aa",xmapsto:"\u21a6",xrightharpoondown:"\u21c1",xleftharpoondown:"\u21bd",xrightleftharpoons:"\u21cc",xleftrightharpoons:"\u21cb",xtwoheadleftarrow:"\u219e",xtwoheadrightarrow:"\u21a0",xlongequal:"=",xtofrom:"\u21c4",xrightleftarrows:"\u21c4",xrightequilibrium:"\u21cc",xleftequilibrium:"\u21cb","\\cdrightarrow":"\u2192","\\cdleftarrow":"\u2190","\\cdlongequal":"="},Ct={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]};var Nt=function(e,t,r,n,o){let s;const i=e.height+e.depth+r+n;if(/fbox|color|angl/.test(t)){if(s=Pe.makeSpan(["stretchy",t],[],o),"fbox"===t){const e=o.color&&o.getColor();e&&(s.style.borderColor=e)}}else{const e=[];/^[bx]cancel$/.test(t)&&e.push(new ee({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&e.push(new ee({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));const r=new J(e,{width:"100%",height:F(i)});s=Pe.makeSvgSpan([],[r],o)}return s.height=i,s.style.height=F(i),s},qt=function(e){const t=new ft.MathNode("mo",[new ft.TextNode(Bt[e.replace(/^\\/,"")])]);return t.setAttribute("stretchy","true"),t},It=function(e,t){const{span:r,minWidth:n,height:o}=function(){let r=4e5;const n=e.label.slice(1);if(l.contains(["widehat","widecheck","widetilde","utilde"],n)){const s="ordgroup"===(o=e.base).type?o.body.length:1;let i,a,l;if(s>5)"widehat"===n||"widecheck"===n?(i=420,r=2364,l=.42,a=n+"4"):(i=312,r=2340,l=.34,a="tilde4");else{const e=[1,1,2,2,3,3][s];"widehat"===n||"widecheck"===n?(r=[0,1062,2364,2364,2364][e],i=[0,239,300,360,420][e],l=[0,.24,.3,.3,.36,.42][e],a=n+e):(r=[0,600,1033,2339,2340][e],i=[0,260,286,306,312][e],l=[0,.26,.286,.3,.306,.34][e],a="tilde"+e)}const h=new Q(a),c=new J([h],{width:"100%",height:F(l),viewBox:"0 0 "+r+" "+i,preserveAspectRatio:"none"});return{span:Pe.makeSvgSpan([],[c],t),minWidth:0,height:l}}{const e=[],o=Ct[n],[s,i,a]=o,l=a/1e3,h=s.length;let c,m;if(1===h){c=["hide-tail"],m=[o[3]]}else if(2===h)c=["halfarrow-left","halfarrow-right"],m=["xMinYMin","xMaxYMin"];else{if(3!==h)throw new Error("Correct katexImagesData or update code here to support\n                    "+h+" children.");c=["brace-left","brace-center","brace-right"],m=["xMinYMin","xMidYMin","xMaxYMin"]}for(let n=0;n<h;n++){const o=new Q(s[n]),p=new J([o],{width:"400em",height:F(l),viewBox:"0 0 "+r+" "+a,preserveAspectRatio:m[n]+" slice"}),u=Pe.makeSvgSpan([c[n]],[p],t);if(1===h)return{span:u,minWidth:i,height:l};u.style.height=F(l),e.push(u)}return{span:Pe.makeSpan(["stretchy"],e,t),minWidth:i,height:l}}var o}();return r.height=o,r.style.height=F(o),n>0&&(r.style.minWidth=F(n)),r};function Rt(e,t){if(!e||e.type!==t)throw new Error("Expected node of type "+t+", but got "+(e?"node of type "+e.type:String(e)));return e}function Ht(e){const t=Ot(e);if(!t)throw new Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)));return t}function Ot(e){return e&&("atom"===e.type||ne.hasOwnProperty(e.type))?e:null}const Et=(e,t)=>{let r,n,o;e&&"supsub"===e.type?(n=Rt(e.base,"accent"),r=n.base,e.base=r,o=function(e){if(e instanceof _)return e;throw new Error("Expected span<HtmlDomNode> but got "+String(e)+".")}(ct(e,t)),e.base=n):(n=Rt(e,"accent"),r=n.base);const s=ct(r,t.havingCrampedStyle());let i=0;if(n.isShifty&&l.isCharacterBox(r)){const e=l.getBaseElem(r);i=te(ct(e,t.havingCrampedStyle())).skew}const a="\\c"===n.label;let h,c=a?s.height+s.depth:Math.min(s.height,t.fontMetrics().xHeight);if(n.isStretchy)h=It(n,t),h=Pe.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"elem",elem:h,wrapperClasses:["svg-align"],wrapperStyle:i>0?{width:"calc(100% - "+F(2*i)+")",marginLeft:F(2*i)}:void 0}]},t);else{let e,r;"\\vec"===n.label?(e=Pe.staticSvg("vec",t),r=Pe.svgData.vec[1]):(e=Pe.makeOrd({mode:n.mode,text:n.label},t,"textord"),e=te(e),e.italic=0,r=e.width,a&&(c+=e.depth)),h=Pe.makeSpan(["accent-body"],[e]);const o="\\textcircled"===n.label;o&&(h.classes.push("accent-full"),c=s.height);let l=i;o||(l-=r/2),h.style.left=F(l),"\\textcircled"===n.label&&(h.style.top=".2em"),h=Pe.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"kern",size:-c},{type:"elem",elem:h}]},t)}const m=Pe.makeSpan(["mord","accent"],[h],t);return o?(o.children[0]=m,o.height=Math.max(m.height,o.height),o.classes[0]="mord",o):m},Lt=(e,t)=>{const r=e.isStretchy?qt(e.label):new ft.MathNode("mo",[bt(e.label,e.mode)]),n=new ft.MathNode("mover",[St(e.base,t),r]);return n.setAttribute("accent","true"),n},Dt=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map((e=>"\\"+e)).join("|"));$e({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(e,t)=>{const r=Ke(t[0]),n=!Dt.test(e.funcName),o=!n||"\\widehat"===e.funcName||"\\widetilde"===e.funcName||"\\widecheck"===e.funcName;return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:n,isShifty:o,base:r}},htmlBuilder:Et,mathmlBuilder:Lt}),$e({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(e,t)=>{const r=t[0];let n=e.parser.mode;return"math"===n&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),n="text"),{type:"accent",mode:n,label:e.funcName,isStretchy:!1,isShifty:!0,base:r}},htmlBuilder:Et,mathmlBuilder:Lt}),$e({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(e,t)=>{let{parser:r,funcName:n}=e;const o=t[0];return{type:"accentUnder",mode:r.mode,label:n,base:o}},htmlBuilder:(e,t)=>{const r=ct(e.base,t),n=It(e,t),o="\\utilde"===e.label?.12:0,s=Pe.makeVList({positionType:"top",positionData:r.height,children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:o},{type:"elem",elem:r}]},t);return Pe.makeSpan(["mord","accentunder"],[s],t)},mathmlBuilder:(e,t)=>{const r=qt(e.label),n=new ft.MathNode("munder",[St(e.base,t),r]);return n.setAttribute("accentunder","true"),n}});const Vt=e=>{const t=new ft.MathNode("mpadded",e?[e]:[]);return t.setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t};$e({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,r){let{parser:n,funcName:o}=e;return{type:"xArrow",mode:n.mode,label:o,body:t[0],below:r[0]}},htmlBuilder(e,t){const r=t.style;let n=t.havingStyle(r.sup());const o=Pe.wrapFragment(ct(e.body,n,t),t),s="\\x"===e.label.slice(0,2)?"x":"cd";let i;o.classes.push(s+"-arrow-pad"),e.below&&(n=t.havingStyle(r.sub()),i=Pe.wrapFragment(ct(e.below,n,t),t),i.classes.push(s+"-arrow-pad"));const a=It(e,t),l=-t.fontMetrics().axisHeight+.5*a.height;let h,c=-t.fontMetrics().axisHeight-.5*a.height-.111;if((o.depth>.25||"\\xleftequilibrium"===e.label)&&(c-=o.depth),i){const e=-t.fontMetrics().axisHeight+i.height+.5*a.height+.111;h=Pe.makeVList({positionType:"individualShift",children:[{type:"elem",elem:o,shift:c},{type:"elem",elem:a,shift:l},{type:"elem",elem:i,shift:e}]},t)}else h=Pe.makeVList({positionType:"individualShift",children:[{type:"elem",elem:o,shift:c},{type:"elem",elem:a,shift:l}]},t);return h.children[0].children[0].children[1].classes.push("svg-align"),Pe.makeSpan(["mrel","x-arrow"],[h],t)},mathmlBuilder(e,t){const r=qt(e.label);let n;if(r.setAttribute("minsize","x"===e.label.charAt(0)?"1.75em":"3.0em"),e.body){const o=Vt(St(e.body,t));if(e.below){const s=Vt(St(e.below,t));n=new ft.MathNode("munderover",[r,s,o])}else n=new ft.MathNode("mover",[r,o])}else if(e.below){const o=Vt(St(e.below,t));n=new ft.MathNode("munder",[r,o])}else n=Vt(),n=new ft.MathNode("mover",[r,n]);return n}});const Pt=Pe.makeSpan;function Ft(e,t){const r=ot(e.body,t,!0);return Pt([e.mclass],r,t)}function Gt(e,t){let r;const n=vt(e.body,t);return"minner"===e.mclass?r=new ft.MathNode("mpadded",n):"mord"===e.mclass?e.isCharacterBox?(r=n[0],r.type="mi"):r=new ft.MathNode("mi",n):(e.isCharacterBox?(r=n[0],r.type="mo"):r=new ft.MathNode("mo",n),"mbin"===e.mclass?(r.attributes.lspace="0.22em",r.attributes.rspace="0.22em"):"mpunct"===e.mclass?(r.attributes.lspace="0em",r.attributes.rspace="0.17em"):"mopen"===e.mclass||"mclose"===e.mclass?(r.attributes.lspace="0em",r.attributes.rspace="0em"):"minner"===e.mclass&&(r.attributes.lspace="0.0556em",r.attributes.width="+0.1111em")),r}$e({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(e,t){let{parser:r,funcName:n}=e;const o=t[0];return{type:"mclass",mode:r.mode,mclass:"m"+n.slice(5),body:Je(o),isCharacterBox:l.isCharacterBox(o)}},htmlBuilder:Ft,mathmlBuilder:Gt});const Ut=e=>{const t="ordgroup"===e.type&&e.body.length?e.body[0]:e;return"atom"!==t.type||"bin"!==t.family&&"rel"!==t.family?"mord":"m"+t.family};$e({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,t){let{parser:r}=e;return{type:"mclass",mode:r.mode,mclass:Ut(t[0]),body:Je(t[1]),isCharacterBox:l.isCharacterBox(t[1])}}}),$e({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,t){let{parser:r,funcName:n}=e;const o=t[1],s=t[0];let i;i="\\stackrel"!==n?Ut(o):"mrel";const a={type:"op",mode:o.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:"\\stackrel"!==n,body:Je(o)},h={type:"supsub",mode:s.mode,base:a,sup:"\\underset"===n?null:s,sub:"\\underset"===n?s:null};return{type:"mclass",mode:r.mode,mclass:i,body:[h],isCharacterBox:l.isCharacterBox(h)}},htmlBuilder:Ft,mathmlBuilder:Gt}),$e({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,t){let{parser:r}=e;return{type:"pmb",mode:r.mode,mclass:Ut(t[0]),body:Je(t[0])}},htmlBuilder(e,t){const r=ot(e.body,t,!0),n=Pe.makeSpan([e.mclass],r,t);return n.style.textShadow="0.02em 0.01em 0.04px",n},mathmlBuilder(e,t){const r=vt(e.body,t),n=new ft.MathNode("mstyle",r);return n.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),n}});const Yt={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},Xt=e=>"textord"===e.type&&"@"===e.text;function Wt(e,t,r){const n=Yt[e];switch(n){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return r.callFunction(n,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":{const e={type:"atom",text:n,mode:"math",family:"rel"},o={type:"ordgroup",mode:"math",body:[r.callFunction("\\\\cdleft",[t[0]],[]),r.callFunction("\\Big",[e],[]),r.callFunction("\\\\cdright",[t[1]],[])]};return r.callFunction("\\\\cdparent",[o],[])}case"\\\\cdlongequal":return r.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{const e={type:"textord",text:"\\Vert",mode:"math"};return r.callFunction("\\Big",[e],[])}default:return{type:"textord",text:" ",mode:"math"}}}$e({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(e,t){let{parser:r,funcName:n}=e;return{type:"cdlabel",mode:r.mode,side:n.slice(4),label:t[0]}},htmlBuilder(e,t){const r=t.havingStyle(t.style.sup()),n=Pe.wrapFragment(ct(e.label,r,t),t);return n.classes.push("cd-label-"+e.side),n.style.bottom=F(.8-n.depth),n.height=0,n.depth=0,n},mathmlBuilder(e,t){let r=new ft.MathNode("mrow",[St(e.label,t)]);return r=new ft.MathNode("mpadded",[r]),r.setAttribute("width","0"),"left"===e.side&&r.setAttribute("lspace","-1width"),r.setAttribute("voffset","0.7em"),r=new ft.MathNode("mstyle",[r]),r.setAttribute("displaystyle","false"),r.setAttribute("scriptlevel","1"),r}}),$e({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(e,t){let{parser:r}=e;return{type:"cdlabelparent",mode:r.mode,fragment:t[0]}},htmlBuilder(e,t){const r=Pe.wrapFragment(ct(e.fragment,t),t);return r.classes.push("cd-vert-arrow"),r},mathmlBuilder(e,t){return new ft.MathNode("mrow",[St(e.fragment,t)])}}),$e({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,t){let{parser:r}=e;const o=Rt(t[0],"ordgroup").body;let s="";for(let e=0;e<o.length;e++){s+=Rt(o[e],"textord").text}let i,a=parseInt(s);if(isNaN(a))throw new n("\\@char has non-numeric argument "+s);if(a<0||a>=1114111)throw new n("\\@char with invalid code point "+s);return a<=65535?i=String.fromCharCode(a):(a-=65536,i=String.fromCharCode(55296+(a>>10),56320+(1023&a))),{type:"textord",mode:r.mode,text:i}}});const _t=(e,t)=>{const r=ot(e.body,t.withColor(e.color),!1);return Pe.makeFragment(r)},jt=(e,t)=>{const r=vt(e.body,t.withColor(e.color)),n=new ft.MathNode("mstyle",r);return n.setAttribute("mathcolor",e.color),n};$e({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,t){let{parser:r}=e;const n=Rt(t[0],"color-token").color,o=t[1];return{type:"color",mode:r.mode,color:n,body:Je(o)}},htmlBuilder:_t,mathmlBuilder:jt}),$e({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,t){let{parser:r,breakOnTokenText:n}=e;const o=Rt(t[0],"color-token").color;r.gullet.macros.set("\\current@color",o);const s=r.parseExpression(!0,n);return{type:"color",mode:r.mode,color:o,body:s}},htmlBuilder:_t,mathmlBuilder:jt}),$e({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,t,r){let{parser:n}=e;const o="["===n.gullet.future().text?n.parseSizeGroup(!0):null,s=!n.settings.displayMode||!n.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:n.mode,newLine:s,size:o&&Rt(o,"size").value}},htmlBuilder(e,t){const r=Pe.makeSpan(["mspace"],[],t);return e.newLine&&(r.classes.push("newline"),e.size&&(r.style.marginTop=F(P(e.size,t)))),r},mathmlBuilder(e,t){const r=new ft.MathNode("mspace");return e.newLine&&(r.setAttribute("linebreak","newline"),e.size&&r.setAttribute("height",F(P(e.size,t)))),r}});const $t={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},Zt=e=>{const t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new n("Expected a control sequence",e);return t},Kt=(e,t,r,n)=>{let o=e.gullet.macros.get(r.text);null==o&&(r.noexpand=!0,o={tokens:[r],numArgs:0,unexpandable:!e.gullet.isExpandable(r.text)}),e.gullet.macros.set(t,o,n)};$e({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(e){let{parser:t,funcName:r}=e;t.consumeSpaces();const o=t.fetch();if($t[o.text])return"\\global"!==r&&"\\\\globallong"!==r||(o.text=$t[o.text]),Rt(t.parseFunction(),"internal");throw new n("Invalid token after macro prefix",o)}}),$e({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){let{parser:t,funcName:r}=e,o=t.gullet.popToken();const s=o.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(s))throw new n("Expected a control sequence",o);let i,a=0;const l=[[]];for(;"{"!==t.gullet.future().text;)if(o=t.gullet.popToken(),"#"===o.text){if("{"===t.gullet.future().text){i=t.gullet.future(),l[a].push("{");break}if(o=t.gullet.popToken(),!/^[1-9]$/.test(o.text))throw new n('Invalid argument number "'+o.text+'"');if(parseInt(o.text)!==a+1)throw new n('Argument number "'+o.text+'" out of order');a++,l.push([])}else{if("EOF"===o.text)throw new n("Expected a macro definition");l[a].push(o.text)}let{tokens:h}=t.gullet.consumeArg();return i&&h.unshift(i),"\\edef"!==r&&"\\xdef"!==r||(h=t.gullet.expandTokens(h),h.reverse()),t.gullet.macros.set(s,{tokens:h,numArgs:a,delimiters:l},r===$t[r]),{type:"internal",mode:t.mode}}}),$e({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){let{parser:t,funcName:r}=e;const n=Zt(t.gullet.popToken());t.gullet.consumeSpaces();const o=(e=>{let t=e.gullet.popToken();return"="===t.text&&(t=e.gullet.popToken()," "===t.text&&(t=e.gullet.popToken())),t})(t);return Kt(t,n,o,"\\\\globallet"===r),{type:"internal",mode:t.mode}}}),$e({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){let{parser:t,funcName:r}=e;const n=Zt(t.gullet.popToken()),o=t.gullet.popToken(),s=t.gullet.popToken();return Kt(t,n,s,"\\\\globalfuture"===r),t.gullet.pushToken(s),t.gullet.pushToken(o),{type:"internal",mode:t.mode}}});const Jt=function(e,t,r){const n=N(se.math[e]&&se.math[e].replace||e,t,r);if(!n)throw new Error("Unsupported symbol "+e+" and font size "+t+".");return n},Qt=function(e,t,r,n){const o=r.havingBaseStyle(t),s=Pe.makeSpan(n.concat(o.sizingClasses(r)),[e],r),i=o.sizeMultiplier/r.sizeMultiplier;return s.height*=i,s.depth*=i,s.maxFontSize=o.sizeMultiplier,s},er=function(e,t,r){const n=t.havingBaseStyle(r),o=(1-t.sizeMultiplier/n.sizeMultiplier)*t.fontMetrics().axisHeight;e.classes.push("delimcenter"),e.style.top=F(o),e.height-=o,e.depth+=o},tr=function(e,t,r,n,o,s){const i=function(e,t,r,n){return Pe.makeSymbol(e,"Size"+t+"-Regular",r,n)}(e,t,o,n),a=Qt(Pe.makeSpan(["delimsizing","size"+t],[i],n),w.TEXT,n,s);return r&&er(a,n,w.TEXT),a},rr=function(e,t,r){let n;n="Size1-Regular"===t?"delim-size1":"delim-size4";return{type:"elem",elem:Pe.makeSpan(["delimsizinginner",n],[Pe.makeSpan([],[Pe.makeSymbol(e,t,r)])])}},nr=function(e,t,r){const n=T["Size4-Regular"][e.charCodeAt(0)]?T["Size4-Regular"][e.charCodeAt(0)][4]:T["Size1-Regular"][e.charCodeAt(0)][4],o=new Q("inner",function(e,t){switch(e){case"\u239c":return"M291 0 H417 V"+t+" H291z M291 0 H417 V"+t+" H291z";case"\u2223":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145z";case"\u2225":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145zM367 0 H410 V"+t+" H367z M367 0 H410 V"+t+" H367z";case"\u239f":return"M457 0 H583 V"+t+" H457z M457 0 H583 V"+t+" H457z";case"\u23a2":return"M319 0 H403 V"+t+" H319z M319 0 H403 V"+t+" H319z";case"\u23a5":return"M263 0 H347 V"+t+" H263z M263 0 H347 V"+t+" H263z";case"\u23aa":return"M384 0 H504 V"+t+" H384z M384 0 H504 V"+t+" H384z";case"\u23d0":return"M312 0 H355 V"+t+" H312z M312 0 H355 V"+t+" H312z";case"\u2016":return"M257 0 H300 V"+t+" H257z M257 0 H300 V"+t+" H257zM478 0 H521 V"+t+" H478z M478 0 H521 V"+t+" H478z";default:return""}}(e,Math.round(1e3*t))),s=new J([o],{width:F(n),height:F(t),style:"width:"+F(n),viewBox:"0 0 "+1e3*n+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"}),i=Pe.makeSvgSpan([],[s],r);return i.height=t,i.style.height=F(t),i.style.width=F(n),{type:"elem",elem:i}},or={type:"kern",size:-.008},sr=["|","\\lvert","\\rvert","\\vert"],ir=["\\|","\\lVert","\\rVert","\\Vert"],ar=function(e,t,r,n,o,s){let i,a,h,c,m="",p=0;i=h=c=e,a=null;let u="Size1-Regular";"\\uparrow"===e?h=c="\u23d0":"\\Uparrow"===e?h=c="\u2016":"\\downarrow"===e?i=h="\u23d0":"\\Downarrow"===e?i=h="\u2016":"\\updownarrow"===e?(i="\\uparrow",h="\u23d0",c="\\downarrow"):"\\Updownarrow"===e?(i="\\Uparrow",h="\u2016",c="\\Downarrow"):l.contains(sr,e)?(h="\u2223",m="vert",p=333):l.contains(ir,e)?(h="\u2225",m="doublevert",p=556):"["===e||"\\lbrack"===e?(i="\u23a1",h="\u23a2",c="\u23a3",u="Size4-Regular",m="lbrack",p=667):"]"===e||"\\rbrack"===e?(i="\u23a4",h="\u23a5",c="\u23a6",u="Size4-Regular",m="rbrack",p=667):"\\lfloor"===e||"\u230a"===e?(h=i="\u23a2",c="\u23a3",u="Size4-Regular",m="lfloor",p=667):"\\lceil"===e||"\u2308"===e?(i="\u23a1",h=c="\u23a2",u="Size4-Regular",m="lceil",p=667):"\\rfloor"===e||"\u230b"===e?(h=i="\u23a5",c="\u23a6",u="Size4-Regular",m="rfloor",p=667):"\\rceil"===e||"\u2309"===e?(i="\u23a4",h=c="\u23a5",u="Size4-Regular",m="rceil",p=667):"("===e||"\\lparen"===e?(i="\u239b",h="\u239c",c="\u239d",u="Size4-Regular",m="lparen",p=875):")"===e||"\\rparen"===e?(i="\u239e",h="\u239f",c="\u23a0",u="Size4-Regular",m="rparen",p=875):"\\{"===e||"\\lbrace"===e?(i="\u23a7",a="\u23a8",c="\u23a9",h="\u23aa",u="Size4-Regular"):"\\}"===e||"\\rbrace"===e?(i="\u23ab",a="\u23ac",c="\u23ad",h="\u23aa",u="Size4-Regular"):"\\lgroup"===e||"\u27ee"===e?(i="\u23a7",c="\u23a9",h="\u23aa",u="Size4-Regular"):"\\rgroup"===e||"\u27ef"===e?(i="\u23ab",c="\u23ad",h="\u23aa",u="Size4-Regular"):"\\lmoustache"===e||"\u23b0"===e?(i="\u23a7",c="\u23ad",h="\u23aa",u="Size4-Regular"):"\\rmoustache"!==e&&"\u23b1"!==e||(i="\u23ab",c="\u23a9",h="\u23aa",u="Size4-Regular");const d=Jt(i,u,o),g=d.height+d.depth,f=Jt(h,u,o),b=f.height+f.depth,y=Jt(c,u,o),x=y.height+y.depth;let v=0,k=1;if(null!==a){const e=Jt(a,u,o);v=e.height+e.depth,k=2}const S=g+x+v,M=S+Math.max(0,Math.ceil((t-S)/(k*b)))*k*b;let z=n.fontMetrics().axisHeight;r&&(z*=n.sizeMultiplier);const A=M/2-z,T=[];if(m.length>0){const e=M-g-x,t=Math.round(1e3*M),r=function(e,t){switch(e){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+" v1759 h347 v-84\nH403z M403 1759 V0 H319 V1759 v"+t+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+" v1759 H0 v84 H347z\nM347 1759 V0 H263 V1759 v"+t+" v1759 h84z";case"vert":return"M145 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v"+t+" v585 h43z";case"doublevert":return"M145 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v"+t+" v585 h43z\nM367 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M410 15 H367 v585 v"+t+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+t+" v1715 h263 v84 H319z\nMM319 602 V0 H403 V602 v"+t+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+t+" v1799 H0 v-84 H319z\nMM319 602 V0 H403 V602 v"+t+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+" v602 h84z\nM403 1759 V0 H319 V1759 v"+t+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+" v602 h84z\nM347 1759 V0 h-84 V1759 v"+t+" v602 h84z";case"lparen":return"M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1\nc-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,\n-36,557 l0,"+(t+84)+"c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,\n949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9\nc0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,\n-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189\nl0,-"+(t+92)+"c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,\n-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z";case"rparen":return"M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,\n63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5\nc11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,"+(t+9)+"\nc-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664\nc-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11\nc0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17\nc242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558\nl0,-"+(t+144)+"c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,\n-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z";default:throw new Error("Unknown stretchy delimiter.")}}(m,Math.round(1e3*e)),o=new Q(m,r),s=(p/1e3).toFixed(3)+"em",i=(t/1e3).toFixed(3)+"em",a=new J([o],{width:s,height:i,viewBox:"0 0 "+p+" "+t}),l=Pe.makeSvgSpan([],[a],n);l.height=t/1e3,l.style.width=s,l.style.height=i,T.push({type:"elem",elem:l})}else{if(T.push(rr(c,u,o)),T.push(or),null===a){const e=M-g-x+.016;T.push(nr(h,e,n))}else{const e=(M-g-x-v)/2+.016;T.push(nr(h,e,n)),T.push(or),T.push(rr(a,u,o)),T.push(or),T.push(nr(h,e,n))}T.push(or),T.push(rr(i,u,o))}const B=n.havingBaseStyle(w.TEXT),C=Pe.makeVList({positionType:"bottom",positionData:A,children:T},B);return Qt(Pe.makeSpan(["delimsizing","mult"],[C],B),w.TEXT,n,s)},lr=.08,hr=function(e,t,r,n,o){const s=function(e,t,r){t*=1e3;let n="";switch(e){case"sqrtMain":n=function(e,t){return"M95,"+(622+e+t)+"\nc-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14\nc0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54\nc44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10\ns173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429\nc69,-144,104.5,-217.7,106.5,-221\nl"+e/2.075+" -"+e+"\nc5.3,-9.3,12,-14,20,-14\nH400000v"+(40+e)+"H845.2724\ns-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7\nc-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z\nM"+(834+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,M);break;case"sqrtSize1":n=function(e,t){return"M263,"+(601+e+t)+"c0.7,0,18,39.7,52,119\nc34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120\nc340,-704.7,510.7,-1060.3,512,-1067\nl"+e/2.084+" -"+e+"\nc4.7,-7.3,11,-11,19,-11\nH40000v"+(40+e)+"H1012.3\ns-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232\nc-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1\ns-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26\nc-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z\nM"+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,M);break;case"sqrtSize2":n=function(e,t){return"M983 "+(10+e+t)+"\nl"+e/3.13+" -"+e+"\nc4,-6.7,10,-10,18,-10 H400000v"+(40+e)+"\nH1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7\ns-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744\nc-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30\nc26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722\nc56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5\nc53.7,-170.3,84.5,-266.8,92.5,-289.5z\nM"+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,M);break;case"sqrtSize3":n=function(e,t){return"M424,"+(2398+e+t)+"\nc-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514\nc0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20\ns-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121\ns209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081\nl"+e/4.223+" -"+e+"c4,-6.7,10,-10,18,-10 H400000\nv"+(40+e)+"H1014.6\ns-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185\nc-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2z M"+(1001+e)+" "+t+"\nh400000v"+(40+e)+"h-400000z"}(t,M);break;case"sqrtSize4":n=function(e,t){return"M473,"+(2713+e+t)+"\nc339.3,-1799.3,509.3,-2700,510,-2702 l"+e/5.298+" -"+e+"\nc3.3,-7.3,9.3,-11,18,-11 H400000v"+(40+e)+"H1017.7\ns-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200\nc0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26\ns76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,\n606zM"+(1001+e)+" "+t+"h400000v"+(40+e)+"H1017.7z"}(t,M);break;case"sqrtTall":n=function(e,t,r){return"M702 "+(e+t)+"H400000"+(40+e)+"\nH742v"+(r-54-t-e)+"l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1\nh-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170\nc-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667\n219 661 l218 661zM702 "+t+"H400000v"+(40+e)+"H742z"}(t,M,r)}return n}(e,n,r),i=new Q(e,s),a=new J([i],{width:"400em",height:F(t),viewBox:"0 0 400000 "+r,preserveAspectRatio:"xMinYMin slice"});return Pe.makeSvgSpan(["hide-tail"],[a],o)},cr=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230a","\u230b","\\lceil","\\rceil","\u2308","\u2309","\\surd"],mr=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27ee","\u27ef","\\lmoustache","\\rmoustache","\u23b0","\u23b1"],pr=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],ur=[0,1.2,1.8,2.4,3],dr=[{type:"small",style:w.SCRIPTSCRIPT},{type:"small",style:w.SCRIPT},{type:"small",style:w.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],gr=[{type:"small",style:w.SCRIPTSCRIPT},{type:"small",style:w.SCRIPT},{type:"small",style:w.TEXT},{type:"stack"}],fr=[{type:"small",style:w.SCRIPTSCRIPT},{type:"small",style:w.SCRIPT},{type:"small",style:w.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],br=function(e){if("small"===e.type)return"Main-Regular";if("large"===e.type)return"Size"+e.size+"-Regular";if("stack"===e.type)return"Size4-Regular";throw new Error("Add support for delim type '"+e.type+"' here.")},yr=function(e,t,r,n){for(let o=Math.min(2,3-n.style.size);o<r.length&&"stack"!==r[o].type;o++){const s=Jt(e,br(r[o]),"math");let i=s.height+s.depth;if("small"===r[o].type){i*=n.havingBaseStyle(r[o].style).sizeMultiplier}if(i>t)return r[o]}return r[r.length-1]},xr=function(e,t,r,n,o,s){let i;"<"===e||"\\lt"===e||"\u27e8"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"\u27e9"!==e||(e="\\rangle"),i=l.contains(pr,e)?dr:l.contains(cr,e)?fr:gr;const a=yr(e,t,i,n);return"small"===a.type?function(e,t,r,n,o,s){const i=Pe.makeSymbol(e,"Main-Regular",o,n),a=Qt(i,t,n,s);return r&&er(a,n,t),a}(e,a.style,r,n,o,s):"large"===a.type?tr(e,a.size,r,n,o,s):ar(e,t,r,n,o,s)};var wr={sqrtImage:function(e,t){const r=t.havingBaseSizing(),n=yr("\\surd",e*r.sizeMultiplier,fr,r);let o=r.sizeMultiplier;const s=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness);let i,a,l=0,h=0,c=0;return"small"===n.type?(c=1e3+1e3*s+80,e<1?o=1:e<1.4&&(o=.7),l=(1+s+lr)/o,h=(1+s)/o,i=hr("sqrtMain",l,c,s,t),i.style.minWidth="0.853em",a=.833/o):"large"===n.type?(c=1080*ur[n.size],h=(ur[n.size]+s)/o,l=(ur[n.size]+s+lr)/o,i=hr("sqrtSize"+n.size,l,c,s,t),i.style.minWidth="1.02em",a=1/o):(l=e+s+lr,h=e+s,c=Math.floor(1e3*e+s)+80,i=hr("sqrtTall",l,c,s,t),i.style.minWidth="0.742em",a=1.056),i.height=h,i.style.height=F(l),{span:i,advanceWidth:a,ruleWidth:(t.fontMetrics().sqrtRuleThickness+s)*o}},sizedDelim:function(e,t,r,o,s){if("<"===e||"\\lt"===e||"\u27e8"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"\u27e9"!==e||(e="\\rangle"),l.contains(cr,e)||l.contains(pr,e))return tr(e,t,!1,r,o,s);if(l.contains(mr,e))return ar(e,ur[t],!1,r,o,s);throw new n("Illegal delimiter: '"+e+"'")},sizeToMaxHeight:ur,customSizedDelim:xr,leftRightDelim:function(e,t,r,n,o,s){const i=n.fontMetrics().axisHeight*n.sizeMultiplier,a=5/n.fontMetrics().ptPerEm,l=Math.max(t-i,r+i),h=Math.max(l/500*901,2*l-a);return xr(e,h,!0,n,o,s)}};const vr={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},kr=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230a","\u230b","\\lceil","\\rceil","\u2308","\u2309","<",">","\\langle","\u27e8","\\rangle","\u27e9","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27ee","\u27ef","\\lmoustache","\\rmoustache","\u23b0","\u23b1","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];function Sr(e,t){const r=Ot(e);if(r&&l.contains(kr,r.text))return r;throw new n(r?"Invalid delimiter '"+r.text+"' after '"+t.funcName+"'":"Invalid delimiter type '"+e.type+"'",e)}function Mr(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}$e({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(e,t)=>{const r=Sr(t[0],e);return{type:"delimsizing",mode:e.parser.mode,size:vr[e.funcName].size,mclass:vr[e.funcName].mclass,delim:r.text}},htmlBuilder:(e,t)=>"."===e.delim?Pe.makeSpan([e.mclass]):wr.sizedDelim(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{const t=[];"."!==e.delim&&t.push(bt(e.delim,e.mode));const r=new ft.MathNode("mo",t);"mopen"===e.mclass||"mclose"===e.mclass?r.setAttribute("fence","true"):r.setAttribute("fence","false"),r.setAttribute("stretchy","true");const n=F(wr.sizeToMaxHeight[e.size]);return r.setAttribute("minsize",n),r.setAttribute("maxsize",n),r}}),$e({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{const r=e.parser.gullet.macros.get("\\current@color");if(r&&"string"!=typeof r)throw new n("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:Sr(t[0],e).text,color:r}}}),$e({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{const r=Sr(t[0],e),n=e.parser;++n.leftrightDepth;const o=n.parseExpression(!1);--n.leftrightDepth,n.expect("\\right",!1);const s=Rt(n.parseFunction(),"leftright-right");return{type:"leftright",mode:n.mode,body:o,left:r.text,right:s.delim,rightColor:s.color}},htmlBuilder:(e,t)=>{Mr(e);const r=ot(e.body,t,!0,["mopen","mclose"]);let n,o,s=0,i=0,a=!1;for(let e=0;e<r.length;e++)r[e].isMiddle?a=!0:(s=Math.max(r[e].height,s),i=Math.max(r[e].depth,i));if(s*=t.sizeMultiplier,i*=t.sizeMultiplier,n="."===e.left?ht(t,["mopen"]):wr.leftRightDelim(e.left,s,i,t,e.mode,["mopen"]),r.unshift(n),a)for(let t=1;t<r.length;t++){const n=r[t].isMiddle;n&&(r[t]=wr.leftRightDelim(n.delim,s,i,n.options,e.mode,[]))}if("."===e.right)o=ht(t,["mclose"]);else{const r=e.rightColor?t.withColor(e.rightColor):t;o=wr.leftRightDelim(e.right,s,i,r,e.mode,["mclose"])}return r.push(o),Pe.makeSpan(["minner"],r,t)},mathmlBuilder:(e,t)=>{Mr(e);const r=vt(e.body,t);if("."!==e.left){const t=new ft.MathNode("mo",[bt(e.left,e.mode)]);t.setAttribute("fence","true"),r.unshift(t)}if("."!==e.right){const t=new ft.MathNode("mo",[bt(e.right,e.mode)]);t.setAttribute("fence","true"),e.rightColor&&t.setAttribute("mathcolor",e.rightColor),r.push(t)}return yt(r)}}),$e({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{const r=Sr(t[0],e);if(!e.parser.leftrightDepth)throw new n("\\middle without preceding \\left",r);return{type:"middle",mode:e.parser.mode,delim:r.text}},htmlBuilder:(e,t)=>{let r;if("."===e.delim)r=ht(t,[]);else{r=wr.sizedDelim(e.delim,1,t,e.mode,[]);const n={delim:e.delim,options:t};r.isMiddle=n}return r},mathmlBuilder:(e,t)=>{const r="\\vert"===e.delim||"|"===e.delim?bt("|","text"):bt(e.delim,e.mode),n=new ft.MathNode("mo",[r]);return n.setAttribute("fence","true"),n.setAttribute("lspace","0.05em"),n.setAttribute("rspace","0.05em"),n}});const zr=(e,t)=>{const r=Pe.wrapFragment(ct(e.body,t),t),n=e.label.slice(1);let o,s=t.sizeMultiplier,i=0;const a=l.isCharacterBox(e.body);if("sout"===n)o=Pe.makeSpan(["stretchy","sout"]),o.height=t.fontMetrics().defaultRuleThickness/s,i=-.5*t.fontMetrics().xHeight;else if("phase"===n){const e=P({number:.6,unit:"pt"},t),n=P({number:.35,unit:"ex"},t);s/=t.havingBaseSizing().sizeMultiplier;const a=r.height+r.depth+e+n;r.style.paddingLeft=F(a/2+e);const l=Math.floor(1e3*a*s),c="M400000 "+(h=l)+" H0 L"+h/2+" 0 l65 45 L145 "+(h-80)+" H400000z",m=new J([new Q("phase",c)],{width:"400em",height:F(l/1e3),viewBox:"0 0 400000 "+l,preserveAspectRatio:"xMinYMin slice"});o=Pe.makeSvgSpan(["hide-tail"],[m],t),o.style.height=F(a),i=r.depth+e+n}else{/cancel/.test(n)?a||r.classes.push("cancel-pad"):"angl"===n?r.classes.push("anglpad"):r.classes.push("boxpad");let s=0,l=0,h=0;/box/.test(n)?(h=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),s=t.fontMetrics().fboxsep+("colorbox"===n?0:h),l=s):"angl"===n?(h=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness),s=4*h,l=Math.max(0,.25-r.depth)):(s=a?.2:0,l=s),o=Nt(r,n,s,l,t),/fbox|boxed|fcolorbox/.test(n)?(o.style.borderStyle="solid",o.style.borderWidth=F(h)):"angl"===n&&.049!==h&&(o.style.borderTopWidth=F(h),o.style.borderRightWidth=F(h)),i=r.depth+l,e.backgroundColor&&(o.style.backgroundColor=e.backgroundColor,e.borderColor&&(o.style.borderColor=e.borderColor))}var h;let c;if(e.backgroundColor)c=Pe.makeVList({positionType:"individualShift",children:[{type:"elem",elem:o,shift:i},{type:"elem",elem:r,shift:0}]},t);else{const e=/cancel|phase/.test(n)?["svg-align"]:[];c=Pe.makeVList({positionType:"individualShift",children:[{type:"elem",elem:r,shift:0},{type:"elem",elem:o,shift:i,wrapperClasses:e}]},t)}return/cancel/.test(n)&&(c.height=r.height,c.depth=r.depth),/cancel/.test(n)&&!a?Pe.makeSpan(["mord","cancel-lap"],[c],t):Pe.makeSpan(["mord"],[c],t)},Ar=(e,t)=>{let r=0;const n=new ft.MathNode(e.label.indexOf("colorbox")>-1?"mpadded":"menclose",[St(e.body,t)]);switch(e.label){case"\\cancel":n.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":n.setAttribute("notation","downdiagonalstrike");break;case"\\phase":n.setAttribute("notation","phasorangle");break;case"\\sout":n.setAttribute("notation","horizontalstrike");break;case"\\fbox":n.setAttribute("notation","box");break;case"\\angl":n.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(r=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,n.setAttribute("width","+"+2*r+"pt"),n.setAttribute("height","+"+2*r+"pt"),n.setAttribute("lspace",r+"pt"),n.setAttribute("voffset",r+"pt"),"\\fcolorbox"===e.label){const r=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);n.setAttribute("style","border: "+r+"em solid "+String(e.borderColor))}break;case"\\xcancel":n.setAttribute("notation","updiagonalstrike downdiagonalstrike")}return e.backgroundColor&&n.setAttribute("mathbackground",e.backgroundColor),n};$e({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(e,t,r){let{parser:n,funcName:o}=e;const s=Rt(t[0],"color-token").color,i=t[1];return{type:"enclose",mode:n.mode,label:o,backgroundColor:s,body:i}},htmlBuilder:zr,mathmlBuilder:Ar}),$e({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(e,t,r){let{parser:n,funcName:o}=e;const s=Rt(t[0],"color-token").color,i=Rt(t[1],"color-token").color,a=t[2];return{type:"enclose",mode:n.mode,label:o,backgroundColor:i,borderColor:s,body:a}},htmlBuilder:zr,mathmlBuilder:Ar}),$e({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(e,t){let{parser:r}=e;return{type:"enclose",mode:r.mode,label:"\\fbox",body:t[0]}}}),$e({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(e,t){let{parser:r,funcName:n}=e;const o=t[0];return{type:"enclose",mode:r.mode,label:n,body:o}},htmlBuilder:zr,mathmlBuilder:Ar}),$e({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(e,t){let{parser:r}=e;return{type:"enclose",mode:r.mode,label:"\\angl",body:t[0]}}});const Tr={};function Br(e){let{type:t,names:r,props:n,handler:o,htmlBuilder:s,mathmlBuilder:i}=e;const a={type:t,numArgs:n.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:o};for(let e=0;e<r.length;++e)Tr[r[e]]=a;s&&(_e[t]=s),i&&(je[t]=i)}const Cr={};function Nr(e,t){Cr[e]=t}class qr{constructor(e,t,r){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=t,this.end=r}static range(e,t){return t?e&&e.loc&&t.loc&&e.loc.lexer===t.loc.lexer?new qr(e.loc.lexer,e.loc.start,t.loc.end):null:e&&e.loc}}class Ir{constructor(e,t){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=t}range(e,t){return new Ir(t,qr.range(this,e))}}function Rr(e){const t=[];e.consumeSpaces();let r=e.fetch().text;for("\\relax"===r&&(e.consume(),e.consumeSpaces(),r=e.fetch().text);"\\hline"===r||"\\hdashline"===r;)e.consume(),t.push("\\hdashline"===r),e.consumeSpaces(),r=e.fetch().text;return t}const Hr=e=>{if(!e.parser.settings.displayMode)throw new n("{"+e.envName+"} can be used only in display mode.")};function Or(e){if(-1===e.indexOf("ed"))return-1===e.indexOf("*")}function Er(e,t,r){let{hskipBeforeAndAfter:o,addJot:s,cols:i,arraystretch:a,colSeparationType:l,autoTag:h,singleRow:c,emptySingleRow:m,maxNumCols:p,leqno:u}=t;if(e.gullet.beginGroup(),c||e.gullet.macros.set("\\cr","\\\\\\relax"),!a){const t=e.gullet.expandMacroAsText("\\arraystretch");if(null==t)a=1;else if(a=parseFloat(t),!a||a<0)throw new n("Invalid \\arraystretch: "+t)}e.gullet.beginGroup();let d=[];const g=[d],f=[],b=[],y=null!=h?[]:void 0;function x(){h&&e.gullet.macros.set("\\@eqnsw","1",!0)}function w(){y&&(e.gullet.macros.get("\\df@tag")?(y.push(e.subparse([new Ir("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):y.push(Boolean(h)&&"1"===e.gullet.macros.get("\\@eqnsw")))}for(x(),b.push(Rr(e));;){let t=e.parseExpression(!1,c?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup(),t={type:"ordgroup",mode:e.mode,body:t},r&&(t={type:"styling",mode:e.mode,style:r,body:[t]}),d.push(t);const o=e.fetch().text;if("&"===o){if(p&&d.length===p){if(c||l)throw new n("Too many tab characters: &",e.nextToken);e.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}e.consume()}else{if("\\end"===o){w(),1===d.length&&"styling"===t.type&&0===t.body[0].body.length&&(g.length>1||!m)&&g.pop(),b.length<g.length+1&&b.push([]);break}if("\\\\"!==o)throw new n("Expected & or \\\\ or \\cr or \\end",e.nextToken);{let t;e.consume()," "!==e.gullet.future().text&&(t=e.parseSizeGroup(!0)),f.push(t?t.value:null),w(),b.push(Rr(e)),d=[],g.push(d),x()}}}return e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:e.mode,addJot:s,arraystretch:a,body:g,cols:i,rowGaps:f,hskipBeforeAndAfter:o,hLinesBeforeRow:b,colSeparationType:l,tags:y,leqno:u}}function Lr(e){return"d"===e.slice(0,1)?"display":"text"}const Dr=function(e,t){let r,o;const s=e.body.length,i=e.hLinesBeforeRow;let a=0,h=new Array(s);const c=[],m=Math.max(t.fontMetrics().arrayRuleWidth,t.minRuleThickness),p=1/t.fontMetrics().ptPerEm;let u=5*p;if(e.colSeparationType&&"small"===e.colSeparationType){u=t.havingStyle(w.SCRIPT).sizeMultiplier/t.sizeMultiplier*.2778}const d="CD"===e.colSeparationType?P({number:3,unit:"ex"},t):12*p,g=3*p,f=e.arraystretch*d,b=.7*f,y=.3*f;let x=0;function v(e){for(let t=0;t<e.length;++t)t>0&&(x+=.25),c.push({pos:x,isDashed:e[t]})}for(v(i[0]),r=0;r<e.body.length;++r){const n=e.body[r];let s=b,l=y;a<n.length&&(a=n.length);const c=new Array(n.length);for(o=0;o<n.length;++o){const e=ct(n[o],t);l<e.depth&&(l=e.depth),s<e.height&&(s=e.height),c[o]=e}const m=e.rowGaps[r];let p=0;m&&(p=P(m,t),p>0&&(p+=y,l<p&&(l=p),p=0)),e.addJot&&(l+=g),c.height=s,c.depth=l,x+=s,c.pos=x,x+=l+p,h[r]=c,v(i[r+1])}const k=x/2+t.fontMetrics().axisHeight,S=e.cols||[],M=[];let z,A;const T=[];if(e.tags&&e.tags.some((e=>e)))for(r=0;r<s;++r){const n=h[r],o=n.pos-k,s=e.tags[r];let i;i=!0===s?Pe.makeSpan(["eqn-num"],[],t):!1===s?Pe.makeSpan([],[],t):Pe.makeSpan([],ot(s,t,!0),t),i.depth=n.depth,i.height=n.height,T.push({type:"elem",elem:i,shift:o})}for(o=0,A=0;o<a||A<S.length;++o,++A){let i,c=S[A]||{},p=!0;for(;"separator"===c.type;){if(p||(z=Pe.makeSpan(["arraycolsep"],[]),z.style.width=F(t.fontMetrics().doubleRuleSep),M.push(z)),"|"!==c.separator&&":"!==c.separator)throw new n("Invalid separator type: "+c.separator);{const e="|"===c.separator?"solid":"dashed",r=Pe.makeSpan(["vertical-separator"],[],t);r.style.height=F(x),r.style.borderRightWidth=F(m),r.style.borderRightStyle=e,r.style.margin="0 "+F(-m/2);const n=x-k;n&&(r.style.verticalAlign=F(-n)),M.push(r)}A++,c=S[A]||{},p=!1}if(o>=a)continue;(o>0||e.hskipBeforeAndAfter)&&(i=l.deflt(c.pregap,u),0!==i&&(z=Pe.makeSpan(["arraycolsep"],[]),z.style.width=F(i),M.push(z)));let d=[];for(r=0;r<s;++r){const e=h[r],t=e[o];if(!t)continue;const n=e.pos-k;t.depth=e.depth,t.height=e.height,d.push({type:"elem",elem:t,shift:n})}d=Pe.makeVList({positionType:"individualShift",children:d},t),d=Pe.makeSpan(["col-align-"+(c.align||"c")],[d]),M.push(d),(o<a-1||e.hskipBeforeAndAfter)&&(i=l.deflt(c.postgap,u),0!==i&&(z=Pe.makeSpan(["arraycolsep"],[]),z.style.width=F(i),M.push(z)))}if(h=Pe.makeSpan(["mtable"],M),c.length>0){const e=Pe.makeLineSpan("hline",t,m),r=Pe.makeLineSpan("hdashline",t,m),n=[{type:"elem",elem:h,shift:0}];for(;c.length>0;){const t=c.pop(),o=t.pos-k;t.isDashed?n.push({type:"elem",elem:r,shift:o}):n.push({type:"elem",elem:e,shift:o})}h=Pe.makeVList({positionType:"individualShift",children:n},t)}if(0===T.length)return Pe.makeSpan(["mord"],[h],t);{let e=Pe.makeVList({positionType:"individualShift",children:T},t);return e=Pe.makeSpan(["tag"],[e],t),Pe.makeFragment([h,e])}},Vr={c:"center ",l:"left ",r:"right "},Pr=function(e,t){const r=[],n=new ft.MathNode("mtd",[],["mtr-glue"]),o=new ft.MathNode("mtd",[],["mml-eqn-num"]);for(let s=0;s<e.body.length;s++){const i=e.body[s],a=[];for(let e=0;e<i.length;e++)a.push(new ft.MathNode("mtd",[St(i[e],t)]));e.tags&&e.tags[s]&&(a.unshift(n),a.push(n),e.leqno?a.unshift(o):a.push(o)),r.push(new ft.MathNode("mtr",a))}let s=new ft.MathNode("mtable",r);const i=.5===e.arraystretch?.1:.16+e.arraystretch-1+(e.addJot?.09:0);s.setAttribute("rowspacing",F(i));let a="",l="";if(e.cols&&e.cols.length>0){const t=e.cols;let r="",n=!1,o=0,i=t.length;"separator"===t[0].type&&(a+="top ",o=1),"separator"===t[t.length-1].type&&(a+="bottom ",i-=1);for(let e=o;e<i;e++)"align"===t[e].type?(l+=Vr[t[e].align],n&&(r+="none "),n=!0):"separator"===t[e].type&&n&&(r+="|"===t[e].separator?"solid ":"dashed ",n=!1);s.setAttribute("columnalign",l.trim()),/[sd]/.test(r)&&s.setAttribute("columnlines",r.trim())}if("align"===e.colSeparationType){const t=e.cols||[];let r="";for(let e=1;e<t.length;e++)r+=e%2?"0em ":"1em ";s.setAttribute("columnspacing",r.trim())}else"alignat"===e.colSeparationType||"gather"===e.colSeparationType?s.setAttribute("columnspacing","0em"):"small"===e.colSeparationType?s.setAttribute("columnspacing","0.2778em"):"CD"===e.colSeparationType?s.setAttribute("columnspacing","0.5em"):s.setAttribute("columnspacing","1em");let h="";const c=e.hLinesBeforeRow;a+=c[0].length>0?"left ":"",a+=c[c.length-1].length>0?"right ":"";for(let e=1;e<c.length-1;e++)h+=0===c[e].length?"none ":c[e][0]?"dashed ":"solid ";return/[sd]/.test(h)&&s.setAttribute("rowlines",h.trim()),""!==a&&(s=new ft.MathNode("menclose",[s]),s.setAttribute("notation",a.trim())),e.arraystretch&&e.arraystretch<1&&(s=new ft.MathNode("mstyle",[s]),s.setAttribute("scriptlevel","1")),s},Fr=function(e,t){-1===e.envName.indexOf("ed")&&Hr(e);const r=[],o=e.envName.indexOf("at")>-1?"alignat":"align",s="split"===e.envName,i=Er(e.parser,{cols:r,addJot:!0,autoTag:s?void 0:Or(e.envName),emptySingleRow:!0,colSeparationType:o,maxNumCols:s?2:void 0,leqno:e.parser.settings.leqno},"display");let a,l=0;const h={type:"ordgroup",mode:e.mode,body:[]};if(t[0]&&"ordgroup"===t[0].type){let e="";for(let r=0;r<t[0].body.length;r++){e+=Rt(t[0].body[r],"textord").text}a=Number(e),l=2*a}const c=!l;i.body.forEach((function(e){for(let t=1;t<e.length;t+=2){const r=Rt(e[t],"styling");Rt(r.body[0],"ordgroup").body.unshift(h)}if(c)l<e.length&&(l=e.length);else{const t=e.length/2;if(a<t)throw new n("Too many math in a row: expected "+a+", but got "+t,e[0])}}));for(let e=0;e<l;++e){let t="r",n=0;e%2==1?t="l":e>0&&c&&(n=1),r[e]={type:"align",align:t,pregap:n,postgap:0}}return i.colSeparationType=c?"align":"alignat",i};Br({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,t){const r=(Ot(t[0])?[t[0]]:Rt(t[0],"ordgroup").body).map((function(e){const t=Ht(e).text;if(-1!=="lcr".indexOf(t))return{type:"align",align:t};if("|"===t)return{type:"separator",separator:"|"};if(":"===t)return{type:"separator",separator:":"};throw new n("Unknown column alignment: "+t,e)})),o={cols:r,hskipBeforeAndAfter:!0,maxNumCols:r.length};return Er(e.parser,o,Lr(e.envName))},htmlBuilder:Dr,mathmlBuilder:Pr}),Br({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(e){const t={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")];let r="c";const o={hskipBeforeAndAfter:!1,cols:[{type:"align",align:r}]};if("*"===e.envName.charAt(e.envName.length-1)){const t=e.parser;if(t.consumeSpaces(),"["===t.fetch().text){if(t.consume(),t.consumeSpaces(),r=t.fetch().text,-1==="lcr".indexOf(r))throw new n("Expected l or c or r",t.nextToken);t.consume(),t.consumeSpaces(),t.expect("]"),t.consume(),o.cols=[{type:"align",align:r}]}}const s=Er(e.parser,o,Lr(e.envName)),i=Math.max(0,...s.body.map((e=>e.length)));return s.cols=new Array(i).fill({type:"align",align:r}),t?{type:"leftright",mode:e.mode,body:[s],left:t[0],right:t[1],rightColor:void 0}:s},htmlBuilder:Dr,mathmlBuilder:Pr}),Br({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){const t=Er(e.parser,{arraystretch:.5},"script");return t.colSeparationType="small",t},htmlBuilder:Dr,mathmlBuilder:Pr}),Br({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){const r=(Ot(t[0])?[t[0]]:Rt(t[0],"ordgroup").body).map((function(e){const t=Ht(e).text;if(-1!=="lc".indexOf(t))return{type:"align",align:t};throw new n("Unknown column alignment: "+t,e)}));if(r.length>1)throw new n("{subarray} can contain only one column");let o={cols:r,hskipBeforeAndAfter:!1,arraystretch:.5};if(o=Er(e.parser,o,"script"),o.body.length>0&&o.body[0].length>1)throw new n("{subarray} can contain only one column");return o},htmlBuilder:Dr,mathmlBuilder:Pr}),Br({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(e){const t=Er(e.parser,{arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},Lr(e.envName));return{type:"leftright",mode:e.mode,body:[t],left:e.envName.indexOf("r")>-1?".":"\\{",right:e.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:Dr,mathmlBuilder:Pr}),Br({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:Fr,htmlBuilder:Dr,mathmlBuilder:Pr}),Br({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){l.contains(["gather","gather*"],e.envName)&&Hr(e);const t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:Or(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return Er(e.parser,t,"display")},htmlBuilder:Dr,mathmlBuilder:Pr}),Br({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:Fr,htmlBuilder:Dr,mathmlBuilder:Pr}),Br({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){Hr(e);const t={autoTag:Or(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return Er(e.parser,t,"display")},htmlBuilder:Dr,mathmlBuilder:Pr}),Br({type:"array",names:["CD"],props:{numArgs:0},handler(e){return Hr(e),function(e){const t=[];for(e.gullet.beginGroup(),e.gullet.macros.set("\\cr","\\\\\\relax"),e.gullet.beginGroup();;){t.push(e.parseExpression(!1,"\\\\")),e.gullet.endGroup(),e.gullet.beginGroup();const r=e.fetch().text;if("&"!==r&&"\\\\"!==r){if("\\end"===r){0===t[t.length-1].length&&t.pop();break}throw new n("Expected \\\\ or \\cr or \\end",e.nextToken)}e.consume()}let r=[];const o=[r];for(let a=0;a<t.length;a++){const l=t[a];let h={type:"styling",body:[],mode:"math",style:"display"};for(let t=0;t<l.length;t++)if(Xt(l[t])){r.push(h),t+=1;const o=Ht(l[t]).text,a=new Array(2);if(a[0]={type:"ordgroup",mode:"math",body:[]},a[1]={type:"ordgroup",mode:"math",body:[]},"=|.".indexOf(o)>-1);else{if(!("<>AV".indexOf(o)>-1))throw new n('Expected one of "<>AV=|." after @',l[t]);for(let e=0;e<2;e++){let r=!0;for(let h=t+1;h<l.length;h++){if(i=o,("mathord"===(s=l[h]).type||"atom"===s.type)&&s.text===i){r=!1,t=h;break}if(Xt(l[h]))throw new n("Missing a "+o+" character to complete a CD arrow.",l[h]);a[e].body.push(l[h])}if(r)throw new n("Missing a "+o+" character to complete a CD arrow.",l[t])}}const c={type:"styling",body:[Wt(o,a,e)],mode:"math",style:"display"};r.push(c),h={type:"styling",body:[],mode:"math",style:"display"}}else h.body.push(l[t]);a%2==0?r.push(h):r.shift(),r=[],o.push(r)}var s,i;return e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:"math",body:o,arraystretch:1,addJot:!0,rowGaps:[null],cols:new Array(o[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25}),colSeparationType:"CD",hLinesBeforeRow:new Array(o.length+1).fill([])}}(e.parser)},htmlBuilder:Dr,mathmlBuilder:Pr}),Nr("\\nonumber","\\gdef\\@eqnsw{0}"),Nr("\\notag","\\nonumber"),$e({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,t){throw new n(e.funcName+" valid only within array environment")}});var Gr=Tr;$e({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(e,t){let{parser:r,funcName:o}=e;const s=t[0];if("ordgroup"!==s.type)throw new n("Invalid environment name",s);let i="";for(let e=0;e<s.body.length;++e)i+=Rt(s.body[e],"textord").text;if("\\begin"===o){if(!Gr.hasOwnProperty(i))throw new n("No such environment: "+i,s);const e=Gr[i],{args:t,optArgs:o}=r.parseArguments("\\begin{"+i+"}",e),a={mode:r.mode,envName:i,parser:r},l=e.handler(a,t,o);r.expect("\\end",!1);const h=r.nextToken,c=Rt(r.parseFunction(),"environment");if(c.name!==i)throw new n("Mismatch: \\begin{"+i+"} matched by \\end{"+c.name+"}",h);return l}return{type:"environment",mode:r.mode,name:i,nameGroup:s}}});const Ur=(e,t)=>{const r=e.font,n=t.withFont(r);return ct(e.body,n)},Yr=(e,t)=>{const r=e.font,n=t.withFont(r);return St(e.body,n)},Xr={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};$e({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(e,t)=>{let{parser:r,funcName:n}=e;const o=Ke(t[0]);let s=n;return s in Xr&&(s=Xr[s]),{type:"font",mode:r.mode,font:s.slice(1),body:o}},htmlBuilder:Ur,mathmlBuilder:Yr}),$e({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(e,t)=>{let{parser:r}=e;const n=t[0],o=l.isCharacterBox(n);return{type:"mclass",mode:r.mode,mclass:Ut(n),body:[{type:"font",mode:r.mode,font:"boldsymbol",body:n}],isCharacterBox:o}}}),$e({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{let{parser:r,funcName:n,breakOnTokenText:o}=e;const{mode:s}=r,i=r.parseExpression(!0,o);return{type:"font",mode:s,font:"math"+n.slice(1),body:{type:"ordgroup",mode:r.mode,body:i}}},htmlBuilder:Ur,mathmlBuilder:Yr});const Wr=(e,t)=>{let r=t;return"display"===e?r=r.id>=w.SCRIPT.id?r.text():w.DISPLAY:"text"===e&&r.size===w.DISPLAY.size?r=w.TEXT:"script"===e?r=w.SCRIPT:"scriptscript"===e&&(r=w.SCRIPTSCRIPT),r},_r=(e,t)=>{const r=Wr(e.size,t.style),n=r.fracNum(),o=r.fracDen();let s;s=t.havingStyle(n);const i=ct(e.numer,s,t);if(e.continued){const e=8.5/t.fontMetrics().ptPerEm,r=3.5/t.fontMetrics().ptPerEm;i.height=i.height<e?e:i.height,i.depth=i.depth<r?r:i.depth}s=t.havingStyle(o);const a=ct(e.denom,s,t);let l,h,c,m,p,u,d,g,f,b;if(e.hasBarLine?(e.barSize?(h=P(e.barSize,t),l=Pe.makeLineSpan("frac-line",t,h)):l=Pe.makeLineSpan("frac-line",t),h=l.height,c=l.height):(l=null,h=0,c=t.fontMetrics().defaultRuleThickness),r.size===w.DISPLAY.size||"display"===e.size?(m=t.fontMetrics().num1,p=h>0?3*c:7*c,u=t.fontMetrics().denom1):(h>0?(m=t.fontMetrics().num2,p=c):(m=t.fontMetrics().num3,p=3*c),u=t.fontMetrics().denom2),l){const e=t.fontMetrics().axisHeight;m-i.depth-(e+.5*h)<p&&(m+=p-(m-i.depth-(e+.5*h))),e-.5*h-(a.height-u)<p&&(u+=p-(e-.5*h-(a.height-u)));const r=-(e-.5*h);d=Pe.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:u},{type:"elem",elem:l,shift:r},{type:"elem",elem:i,shift:-m}]},t)}else{const e=m-i.depth-(a.height-u);e<p&&(m+=.5*(p-e),u+=.5*(p-e)),d=Pe.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:u},{type:"elem",elem:i,shift:-m}]},t)}return s=t.havingStyle(r),d.height*=s.sizeMultiplier/t.sizeMultiplier,d.depth*=s.sizeMultiplier/t.sizeMultiplier,g=r.size===w.DISPLAY.size?t.fontMetrics().delim1:r.size===w.SCRIPTSCRIPT.size?t.havingStyle(w.SCRIPT).fontMetrics().delim2:t.fontMetrics().delim2,f=null==e.leftDelim?ht(t,["mopen"]):wr.customSizedDelim(e.leftDelim,g,!0,t.havingStyle(r),e.mode,["mopen"]),b=e.continued?Pe.makeSpan([]):null==e.rightDelim?ht(t,["mclose"]):wr.customSizedDelim(e.rightDelim,g,!0,t.havingStyle(r),e.mode,["mclose"]),Pe.makeSpan(["mord"].concat(s.sizingClasses(t)),[f,Pe.makeSpan(["mfrac"],[d]),b],t)},jr=(e,t)=>{let r=new ft.MathNode("mfrac",[St(e.numer,t),St(e.denom,t)]);if(e.hasBarLine){if(e.barSize){const n=P(e.barSize,t);r.setAttribute("linethickness",F(n))}}else r.setAttribute("linethickness","0px");const n=Wr(e.size,t.style);if(n.size!==t.style.size){r=new ft.MathNode("mstyle",[r]);const e=n.size===w.DISPLAY.size?"true":"false";r.setAttribute("displaystyle",e),r.setAttribute("scriptlevel","0")}if(null!=e.leftDelim||null!=e.rightDelim){const t=[];if(null!=e.leftDelim){const r=new ft.MathNode("mo",[new ft.TextNode(e.leftDelim.replace("\\",""))]);r.setAttribute("fence","true"),t.push(r)}if(t.push(r),null!=e.rightDelim){const r=new ft.MathNode("mo",[new ft.TextNode(e.rightDelim.replace("\\",""))]);r.setAttribute("fence","true"),t.push(r)}return yt(t)}return r};$e({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(e,t)=>{let{parser:r,funcName:n}=e;const o=t[0],s=t[1];let i,a=null,l=null,h="auto";switch(n){case"\\dfrac":case"\\frac":case"\\tfrac":i=!0;break;case"\\\\atopfrac":i=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":i=!1,a="(",l=")";break;case"\\\\bracefrac":i=!1,a="\\{",l="\\}";break;case"\\\\brackfrac":i=!1,a="[",l="]";break;default:throw new Error("Unrecognized genfrac command")}switch(n){case"\\dfrac":case"\\dbinom":h="display";break;case"\\tfrac":case"\\tbinom":h="text"}return{type:"genfrac",mode:r.mode,continued:!1,numer:o,denom:s,hasBarLine:i,leftDelim:a,rightDelim:l,size:h,barSize:null}},htmlBuilder:_r,mathmlBuilder:jr}),$e({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:(e,t)=>{let{parser:r,funcName:n}=e;const o=t[0],s=t[1];return{type:"genfrac",mode:r.mode,continued:!0,numer:o,denom:s,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}}),$e({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(e){let t,{parser:r,funcName:n,token:o}=e;switch(n){case"\\over":t="\\frac";break;case"\\choose":t="\\binom";break;case"\\atop":t="\\\\atopfrac";break;case"\\brace":t="\\\\bracefrac";break;case"\\brack":t="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:r.mode,replaceWith:t,token:o}}});const $r=["display","text","script","scriptscript"],Zr=function(e){let t=null;return e.length>0&&(t=e,t="."===t?null:t),t};$e({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(e,t){let{parser:r}=e;const n=t[4],o=t[5],s=Ke(t[0]),i="atom"===s.type&&"open"===s.family?Zr(s.text):null,a=Ke(t[1]),l="atom"===a.type&&"close"===a.family?Zr(a.text):null,h=Rt(t[2],"size");let c,m=null;h.isBlank?c=!0:(m=h.value,c=m.number>0);let p="auto",u=t[3];if("ordgroup"===u.type){if(u.body.length>0){const e=Rt(u.body[0],"textord");p=$r[Number(e.text)]}}else u=Rt(u,"textord"),p=$r[Number(u.text)];return{type:"genfrac",mode:r.mode,numer:n,denom:o,continued:!1,hasBarLine:c,barSize:m,leftDelim:i,rightDelim:l,size:p}},htmlBuilder:_r,mathmlBuilder:jr}),$e({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(e,t){let{parser:r,funcName:n,token:o}=e;return{type:"infix",mode:r.mode,replaceWith:"\\\\abovefrac",size:Rt(t[0],"size").value,token:o}}}),$e({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,t)=>{let{parser:r,funcName:n}=e;const o=t[0],s=function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e}(Rt(t[1],"infix").size),i=t[2],a=s.number>0;return{type:"genfrac",mode:r.mode,numer:o,denom:i,continued:!1,hasBarLine:a,barSize:s,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:_r,mathmlBuilder:jr});const Kr=(e,t)=>{const r=t.style;let n,o;"supsub"===e.type?(n=e.sup?ct(e.sup,t.havingStyle(r.sup()),t):ct(e.sub,t.havingStyle(r.sub()),t),o=Rt(e.base,"horizBrace")):o=Rt(e,"horizBrace");const s=ct(o.base,t.havingBaseStyle(w.DISPLAY)),i=It(o,t);let a;if(o.isOver?(a=Pe.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"kern",size:.1},{type:"elem",elem:i}]},t),a.children[0].children[0].children[1].classes.push("svg-align")):(a=Pe.makeVList({positionType:"bottom",positionData:s.depth+.1+i.height,children:[{type:"elem",elem:i},{type:"kern",size:.1},{type:"elem",elem:s}]},t),a.children[0].children[0].children[0].classes.push("svg-align")),n){const e=Pe.makeSpan(["mord",o.isOver?"mover":"munder"],[a],t);a=o.isOver?Pe.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:e},{type:"kern",size:.2},{type:"elem",elem:n}]},t):Pe.makeVList({positionType:"bottom",positionData:e.depth+.2+n.height+n.depth,children:[{type:"elem",elem:n},{type:"kern",size:.2},{type:"elem",elem:e}]},t)}return Pe.makeSpan(["mord",o.isOver?"mover":"munder"],[a],t)};$e({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(e,t){let{parser:r,funcName:n}=e;return{type:"horizBrace",mode:r.mode,label:n,isOver:/^\\over/.test(n),base:t[0]}},htmlBuilder:Kr,mathmlBuilder:(e,t)=>{const r=qt(e.label);return new ft.MathNode(e.isOver?"mover":"munder",[St(e.base,t),r])}}),$e({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,t)=>{let{parser:r}=e;const n=t[1],o=Rt(t[0],"url").url;return r.settings.isTrusted({command:"\\href",url:o})?{type:"href",mode:r.mode,href:o,body:Je(n)}:r.formatUnsupportedCmd("\\href")},htmlBuilder:(e,t)=>{const r=ot(e.body,t,!1);return Pe.makeAnchor(e.href,[],r,t)},mathmlBuilder:(e,t)=>{let r=kt(e.body,t);return r instanceof dt||(r=new dt("mrow",[r])),r.setAttribute("href",e.href),r}}),$e({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,t)=>{let{parser:r}=e;const n=Rt(t[0],"url").url;if(!r.settings.isTrusted({command:"\\url",url:n}))return r.formatUnsupportedCmd("\\url");const o=[];for(let e=0;e<n.length;e++){let t=n[e];"~"===t&&(t="\\textasciitilde"),o.push({type:"textord",mode:"text",text:t})}const s={type:"text",mode:r.mode,font:"\\texttt",body:o};return{type:"href",mode:r.mode,href:n,body:Je(s)}}}),$e({type:"hbox",names:["\\hbox"],props:{numArgs:1,argTypes:["text"],allowedInText:!0,primitive:!0},handler(e,t){let{parser:r}=e;return{type:"hbox",mode:r.mode,body:Je(t[0])}},htmlBuilder(e,t){const r=ot(e.body,t,!1);return Pe.makeFragment(r)},mathmlBuilder(e,t){return new ft.MathNode("mrow",vt(e.body,t))}}),$e({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:(e,t)=>{let{parser:r,funcName:o,token:s}=e;const i=Rt(t[0],"raw").string,a=t[1];let l;r.settings.strict&&r.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");const h={};switch(o){case"\\htmlClass":h.class=i,l={command:"\\htmlClass",class:i};break;case"\\htmlId":h.id=i,l={command:"\\htmlId",id:i};break;case"\\htmlStyle":h.style=i,l={command:"\\htmlStyle",style:i};break;case"\\htmlData":{const e=i.split(",");for(let t=0;t<e.length;t++){const r=e[t].split("=");if(2!==r.length)throw new n("Error parsing key-value for \\htmlData");h["data-"+r[0].trim()]=r[1].trim()}l={command:"\\htmlData",attributes:h};break}default:throw new Error("Unrecognized html command")}return r.settings.isTrusted(l)?{type:"html",mode:r.mode,attributes:h,body:Je(a)}:r.formatUnsupportedCmd(o)},htmlBuilder:(e,t)=>{const r=ot(e.body,t,!1),n=["enclosing"];e.attributes.class&&n.push(...e.attributes.class.trim().split(/\s+/));const o=Pe.makeSpan(n,r,t);for(const t in e.attributes)"class"!==t&&e.attributes.hasOwnProperty(t)&&o.setAttribute(t,e.attributes[t]);return o},mathmlBuilder:(e,t)=>kt(e.body,t)}),$e({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(e,t)=>{let{parser:r}=e;return{type:"htmlmathml",mode:r.mode,html:Je(t[0]),mathml:Je(t[1])}},htmlBuilder:(e,t)=>{const r=ot(e.html,t,!1);return Pe.makeFragment(r)},mathmlBuilder:(e,t)=>kt(e.mathml,t)});const Jr=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:"bp"};{const t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!t)throw new n("Invalid size: '"+e+"' in \\includegraphics");const r={number:+(t[1]+t[2]),unit:t[3]};if(!V(r))throw new n("Invalid unit: '"+r.unit+"' in \\includegraphics.");return r}};$e({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(e,t,r)=>{let{parser:o}=e,s={number:0,unit:"em"},i={number:.9,unit:"em"},a={number:0,unit:"em"},l="";if(r[0]){const e=Rt(r[0],"raw").string.split(",");for(let t=0;t<e.length;t++){const r=e[t].split("=");if(2===r.length){const e=r[1].trim();switch(r[0].trim()){case"alt":l=e;break;case"width":s=Jr(e);break;case"height":i=Jr(e);break;case"totalheight":a=Jr(e);break;default:throw new n("Invalid key: '"+r[0]+"' in \\includegraphics.")}}}}const h=Rt(t[0],"url").url;return""===l&&(l=h,l=l.replace(/^.*[\\/]/,""),l=l.substring(0,l.lastIndexOf("."))),o.settings.isTrusted({command:"\\includegraphics",url:h})?{type:"includegraphics",mode:o.mode,alt:l,width:s,height:i,totalheight:a,src:h}:o.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:(e,t)=>{const r=P(e.height,t);let n=0;e.totalheight.number>0&&(n=P(e.totalheight,t)-r);let o=0;e.width.number>0&&(o=P(e.width,t));const s={height:F(r+n)};o>0&&(s.width=F(o)),n>0&&(s.verticalAlign=F(-n));const i=new $(e.src,e.alt,s);return i.height=r,i.depth=n,i},mathmlBuilder:(e,t)=>{const r=new ft.MathNode("mglyph",[]);r.setAttribute("alt",e.alt);const n=P(e.height,t);let o=0;if(e.totalheight.number>0&&(o=P(e.totalheight,t)-n,r.setAttribute("valign",F(-o))),r.setAttribute("height",F(n+o)),e.width.number>0){const n=P(e.width,t);r.setAttribute("width",F(n))}return r.setAttribute("src",e.src),r}}),$e({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(e,t){let{parser:r,funcName:n}=e;const o=Rt(t[0],"size");if(r.settings.strict){const e="m"===n[1],t="mu"===o.value.unit;e?(t||r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" supports only mu units, not "+o.value.unit+" units"),"math"!==r.mode&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" works only in math mode")):t&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" doesn't support mu units")}return{type:"kern",mode:r.mode,dimension:o.value}},htmlBuilder(e,t){return Pe.makeGlue(e.dimension,t)},mathmlBuilder(e,t){const r=P(e.dimension,t);return new ft.SpaceNode(r)}}),$e({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{let{parser:r,funcName:n}=e;const o=t[0];return{type:"lap",mode:r.mode,alignment:n.slice(5),body:o}},htmlBuilder:(e,t)=>{let r;"clap"===e.alignment?(r=Pe.makeSpan([],[ct(e.body,t)]),r=Pe.makeSpan(["inner"],[r],t)):r=Pe.makeSpan(["inner"],[ct(e.body,t)]);const n=Pe.makeSpan(["fix"],[]);let o=Pe.makeSpan([e.alignment],[r,n],t);const s=Pe.makeSpan(["strut"]);return s.style.height=F(o.height+o.depth),o.depth&&(s.style.verticalAlign=F(-o.depth)),o.children.unshift(s),o=Pe.makeSpan(["thinbox"],[o],t),Pe.makeSpan(["mord","vbox"],[o],t)},mathmlBuilder:(e,t)=>{const r=new ft.MathNode("mpadded",[St(e.body,t)]);if("rlap"!==e.alignment){const t="llap"===e.alignment?"-1":"-0.5";r.setAttribute("lspace",t+"width")}return r.setAttribute("width","0px"),r}}),$e({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){let{funcName:r,parser:n}=e;const o=n.mode;n.switchMode("math");const s="\\("===r?"\\)":"$",i=n.parseExpression(!1,s);return n.expect(s),n.switchMode(o),{type:"styling",mode:n.mode,style:"text",body:i}}}),$e({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new n("Mismatched "+e.funcName)}});const Qr=(e,t)=>{switch(t.style.size){case w.DISPLAY.size:return e.display;case w.TEXT.size:return e.text;case w.SCRIPT.size:return e.script;case w.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};$e({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,t)=>{let{parser:r}=e;return{type:"mathchoice",mode:r.mode,display:Je(t[0]),text:Je(t[1]),script:Je(t[2]),scriptscript:Je(t[3])}},htmlBuilder:(e,t)=>{const r=Qr(e,t),n=ot(r,t,!1);return Pe.makeFragment(n)},mathmlBuilder:(e,t)=>{const r=Qr(e,t);return kt(r,t)}});const en=(e,t,r,n,o,s,i)=>{e=Pe.makeSpan([],[e]);const a=r&&l.isCharacterBox(r);let h,c,m;if(t){const e=ct(t,n.havingStyle(o.sup()),n);c={elem:e,kern:Math.max(n.fontMetrics().bigOpSpacing1,n.fontMetrics().bigOpSpacing3-e.depth)}}if(r){const e=ct(r,n.havingStyle(o.sub()),n);h={elem:e,kern:Math.max(n.fontMetrics().bigOpSpacing2,n.fontMetrics().bigOpSpacing4-e.height)}}if(c&&h){const t=n.fontMetrics().bigOpSpacing5+h.elem.height+h.elem.depth+h.kern+e.depth+i;m=Pe.makeVList({positionType:"bottom",positionData:t,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:h.elem,marginLeft:F(-s)},{type:"kern",size:h.kern},{type:"elem",elem:e},{type:"kern",size:c.kern},{type:"elem",elem:c.elem,marginLeft:F(s)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}else if(h){const t=e.height-i;m=Pe.makeVList({positionType:"top",positionData:t,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:h.elem,marginLeft:F(-s)},{type:"kern",size:h.kern},{type:"elem",elem:e}]},n)}else{if(!c)return e;{const t=e.depth+i;m=Pe.makeVList({positionType:"bottom",positionData:t,children:[{type:"elem",elem:e},{type:"kern",size:c.kern},{type:"elem",elem:c.elem,marginLeft:F(s)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}}const p=[m];if(h&&0!==s&&!a){const e=Pe.makeSpan(["mspace"],[],n);e.style.marginRight=F(s),p.unshift(e)}return Pe.makeSpan(["mop","op-limits"],p,n)},tn=["\\smallint"],rn=(e,t)=>{let r,n,o,s=!1;"supsub"===e.type?(r=e.sup,n=e.sub,o=Rt(e.base,"op"),s=!0):o=Rt(e,"op");const i=t.style;let a,h=!1;if(i.size===w.DISPLAY.size&&o.symbol&&!l.contains(tn,o.name)&&(h=!0),o.symbol){const e=h?"Size2-Regular":"Size1-Regular";let r="";if("\\oiint"!==o.name&&"\\oiiint"!==o.name||(r=o.name.slice(1),o.name="oiint"===r?"\\iint":"\\iiint"),a=Pe.makeSymbol(o.name,e,"math",t,["mop","op-symbol",h?"large-op":"small-op"]),r.length>0){const e=a.italic,n=Pe.staticSvg(r+"Size"+(h?"2":"1"),t);a=Pe.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:0},{type:"elem",elem:n,shift:h?.08:0}]},t),o.name="\\"+r,a.classes.unshift("mop"),a.italic=e}}else if(o.body){const e=ot(o.body,t,!0);1===e.length&&e[0]instanceof K?(a=e[0],a.classes[0]="mop"):a=Pe.makeSpan(["mop"],e,t)}else{const e=[];for(let r=1;r<o.name.length;r++)e.push(Pe.mathsym(o.name[r],o.mode,t));a=Pe.makeSpan(["mop"],e,t)}let c=0,m=0;return(a instanceof K||"\\oiint"===o.name||"\\oiiint"===o.name)&&!o.suppressBaseShift&&(c=(a.height-a.depth)/2-t.fontMetrics().axisHeight,m=a.italic),s?en(a,r,n,t,i,m,c):(c&&(a.style.position="relative",a.style.top=F(c)),a)},nn=(e,t)=>{let r;if(e.symbol)r=new dt("mo",[bt(e.name,e.mode)]),l.contains(tn,e.name)&&r.setAttribute("largeop","false");else if(e.body)r=new dt("mo",vt(e.body,t));else{r=new dt("mi",[new gt(e.name.slice(1))]);const t=new dt("mo",[bt("\u2061","text")]);r=e.parentIsSupSub?new dt("mrow",[r,t]):ut([r,t])}return r},on={"\u220f":"\\prod","\u2210":"\\coprod","\u2211":"\\sum","\u22c0":"\\bigwedge","\u22c1":"\\bigvee","\u22c2":"\\bigcap","\u22c3":"\\bigcup","\u2a00":"\\bigodot","\u2a01":"\\bigoplus","\u2a02":"\\bigotimes","\u2a04":"\\biguplus","\u2a06":"\\bigsqcup"};$e({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","\u220f","\u2210","\u2211","\u22c0","\u22c1","\u22c2","\u22c3","\u2a00","\u2a01","\u2a02","\u2a04","\u2a06"],props:{numArgs:0},handler:(e,t)=>{let{parser:r,funcName:n}=e,o=n;return 1===o.length&&(o=on[o]),{type:"op",mode:r.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:o}},htmlBuilder:rn,mathmlBuilder:nn}),$e({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{let{parser:r}=e;const n=t[0];return{type:"op",mode:r.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:Je(n)}},htmlBuilder:rn,mathmlBuilder:nn});const sn={"\u222b":"\\int","\u222c":"\\iint","\u222d":"\\iiint","\u222e":"\\oint","\u222f":"\\oiint","\u2230":"\\oiiint"};$e({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(e){let{parser:t,funcName:r}=e;return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:rn,mathmlBuilder:nn}),$e({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(e){let{parser:t,funcName:r}=e;return{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:rn,mathmlBuilder:nn}),$e({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","\u222b","\u222c","\u222d","\u222e","\u222f","\u2230"],props:{numArgs:0},handler(e){let{parser:t,funcName:r}=e,n=r;return 1===n.length&&(n=sn[n]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:rn,mathmlBuilder:nn});const an=(e,t)=>{let r,n,o,s,i=!1;if("supsub"===e.type?(r=e.sup,n=e.sub,o=Rt(e.base,"operatorname"),i=!0):o=Rt(e,"operatorname"),o.body.length>0){const e=o.body.map((e=>{const t=e.text;return"string"==typeof t?{type:"textord",mode:e.mode,text:t}:e})),r=ot(e,t.withFont("mathrm"),!0);for(let e=0;e<r.length;e++){const t=r[e];t instanceof K&&(t.text=t.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}s=Pe.makeSpan(["mop"],r,t)}else s=Pe.makeSpan(["mop"],[],t);return i?en(s,r,n,t,t.style,0,0):s};function ln(e,t,r){const n=ot(e,t,!1),o=t.sizeMultiplier/r.sizeMultiplier;for(let e=0;e<n.length;e++){const s=n[e].classes.indexOf("sizing");s<0?Array.prototype.push.apply(n[e].classes,t.sizingClasses(r)):n[e].classes[s+1]==="reset-size"+t.size&&(n[e].classes[s+1]="reset-size"+r.size),n[e].height*=o,n[e].depth*=o}return Pe.makeFragment(n)}$e({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(e,t)=>{let{parser:r,funcName:n}=e;const o=t[0];return{type:"operatorname",mode:r.mode,body:Je(o),alwaysHandleSupSub:"\\operatornamewithlimits"===n,limits:!1,parentIsSupSub:!1}},htmlBuilder:an,mathmlBuilder:(e,t)=>{let r=vt(e.body,t.withFont("mathrm")),n=!0;for(let e=0;e<r.length;e++){const t=r[e];if(t instanceof ft.SpaceNode);else if(t instanceof ft.MathNode)switch(t.type){case"mi":case"mn":case"ms":case"mspace":case"mtext":break;case"mo":{const e=t.children[0];1===t.children.length&&e instanceof ft.TextNode?e.text=e.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):n=!1;break}default:n=!1}else n=!1}if(n){const e=r.map((e=>e.toText())).join("");r=[new ft.TextNode(e)]}const o=new ft.MathNode("mi",r);o.setAttribute("mathvariant","normal");const s=new ft.MathNode("mo",[bt("\u2061","text")]);return e.parentIsSupSub?new ft.MathNode("mrow",[o,s]):ft.newDocumentFragment([o,s])}}),Nr("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@"),Ze({type:"ordgroup",htmlBuilder(e,t){return e.semisimple?Pe.makeFragment(ot(e.body,t,!1)):Pe.makeSpan(["mord"],ot(e.body,t,!0),t)},mathmlBuilder(e,t){return kt(e.body,t,!0)}}),$e({type:"overline",names:["\\overline"],props:{numArgs:1},handler(e,t){let{parser:r}=e;const n=t[0];return{type:"overline",mode:r.mode,body:n}},htmlBuilder(e,t){const r=ct(e.body,t.havingCrampedStyle()),n=Pe.makeLineSpan("overline-line",t),o=t.fontMetrics().defaultRuleThickness,s=Pe.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r},{type:"kern",size:3*o},{type:"elem",elem:n},{type:"kern",size:o}]},t);return Pe.makeSpan(["mord","overline"],[s],t)},mathmlBuilder(e,t){const r=new ft.MathNode("mo",[new ft.TextNode("\u203e")]);r.setAttribute("stretchy","true");const n=new ft.MathNode("mover",[St(e.body,t),r]);return n.setAttribute("accent","true"),n}}),$e({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{let{parser:r}=e;const n=t[0];return{type:"phantom",mode:r.mode,body:Je(n)}},htmlBuilder:(e,t)=>{const r=ot(e.body,t.withPhantom(),!1);return Pe.makeFragment(r)},mathmlBuilder:(e,t)=>{const r=vt(e.body,t);return new ft.MathNode("mphantom",r)}}),$e({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{let{parser:r}=e;const n=t[0];return{type:"hphantom",mode:r.mode,body:n}},htmlBuilder:(e,t)=>{let r=Pe.makeSpan([],[ct(e.body,t.withPhantom())]);if(r.height=0,r.depth=0,r.children)for(let e=0;e<r.children.length;e++)r.children[e].height=0,r.children[e].depth=0;return r=Pe.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r}]},t),Pe.makeSpan(["mord"],[r],t)},mathmlBuilder:(e,t)=>{const r=vt(Je(e.body),t),n=new ft.MathNode("mphantom",r),o=new ft.MathNode("mpadded",[n]);return o.setAttribute("height","0px"),o.setAttribute("depth","0px"),o}}),$e({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{let{parser:r}=e;const n=t[0];return{type:"vphantom",mode:r.mode,body:n}},htmlBuilder:(e,t)=>{const r=Pe.makeSpan(["inner"],[ct(e.body,t.withPhantom())]),n=Pe.makeSpan(["fix"],[]);return Pe.makeSpan(["mord","rlap"],[r,n],t)},mathmlBuilder:(e,t)=>{const r=vt(Je(e.body),t),n=new ft.MathNode("mphantom",r),o=new ft.MathNode("mpadded",[n]);return o.setAttribute("width","0px"),o}}),$e({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,t){let{parser:r}=e;const n=Rt(t[0],"size").value,o=t[1];return{type:"raisebox",mode:r.mode,dy:n,body:o}},htmlBuilder(e,t){const r=ct(e.body,t),n=P(e.dy,t);return Pe.makeVList({positionType:"shift",positionData:-n,children:[{type:"elem",elem:r}]},t)},mathmlBuilder(e,t){const r=new ft.MathNode("mpadded",[St(e.body,t)]),n=e.dy.number+e.dy.unit;return r.setAttribute("voffset",n),r}}),$e({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){let{parser:t}=e;return{type:"internal",mode:t.mode}}}),$e({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(e,t,r){let{parser:n}=e;const o=r[0],s=Rt(t[0],"size"),i=Rt(t[1],"size");return{type:"rule",mode:n.mode,shift:o&&Rt(o,"size").value,width:s.value,height:i.value}},htmlBuilder(e,t){const r=Pe.makeSpan(["mord","rule"],[],t),n=P(e.width,t),o=P(e.height,t),s=e.shift?P(e.shift,t):0;return r.style.borderRightWidth=F(n),r.style.borderTopWidth=F(o),r.style.bottom=F(s),r.width=n,r.height=o+s,r.depth=-s,r.maxFontSize=1.125*o*t.sizeMultiplier,r},mathmlBuilder(e,t){const r=P(e.width,t),n=P(e.height,t),o=e.shift?P(e.shift,t):0,s=t.color&&t.getColor()||"black",i=new ft.MathNode("mspace");i.setAttribute("mathbackground",s),i.setAttribute("width",F(r)),i.setAttribute("height",F(n));const a=new ft.MathNode("mpadded",[i]);return o>=0?a.setAttribute("height",F(o)):(a.setAttribute("height",F(o)),a.setAttribute("depth",F(-o))),a.setAttribute("voffset",F(o)),a}});const hn=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"];$e({type:"sizing",names:hn,props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{let{breakOnTokenText:r,funcName:n,parser:o}=e;const s=o.parseExpression(!1,r);return{type:"sizing",mode:o.mode,size:hn.indexOf(n)+1,body:s}},htmlBuilder:(e,t)=>{const r=t.havingSize(e.size);return ln(e.body,r,t)},mathmlBuilder:(e,t)=>{const r=t.havingSize(e.size),n=vt(e.body,r),o=new ft.MathNode("mstyle",n);return o.setAttribute("mathsize",F(r.sizeMultiplier)),o}}),$e({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,t,r)=>{let{parser:n}=e,o=!1,s=!1;const i=r[0]&&Rt(r[0],"ordgroup");if(i){let e="";for(let t=0;t<i.body.length;++t){if(e=i.body[t].text,"t"===e)o=!0;else{if("b"!==e){o=!1,s=!1;break}s=!0}}}else o=!0,s=!0;const a=t[0];return{type:"smash",mode:n.mode,body:a,smashHeight:o,smashDepth:s}},htmlBuilder:(e,t)=>{const r=Pe.makeSpan([],[ct(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return r;if(e.smashHeight&&(r.height=0,r.children))for(let e=0;e<r.children.length;e++)r.children[e].height=0;if(e.smashDepth&&(r.depth=0,r.children))for(let e=0;e<r.children.length;e++)r.children[e].depth=0;const n=Pe.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r}]},t);return Pe.makeSpan(["mord"],[n],t)},mathmlBuilder:(e,t)=>{const r=new ft.MathNode("mpadded",[St(e.body,t)]);return e.smashHeight&&r.setAttribute("height","0px"),e.smashDepth&&r.setAttribute("depth","0px"),r}}),$e({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,r){let{parser:n}=e;const o=r[0],s=t[0];return{type:"sqrt",mode:n.mode,body:s,index:o}},htmlBuilder(e,t){let r=ct(e.body,t.havingCrampedStyle());0===r.height&&(r.height=t.fontMetrics().xHeight),r=Pe.wrapFragment(r,t);const n=t.fontMetrics().defaultRuleThickness;let o=n;t.style.id<w.TEXT.id&&(o=t.fontMetrics().xHeight);let s=n+o/4;const i=r.height+r.depth+s+n,{span:a,ruleWidth:l,advanceWidth:h}=wr.sqrtImage(i,t),c=a.height-l;c>r.height+r.depth+s&&(s=(s+c-r.height-r.depth)/2);const m=a.height-r.height-s-l;r.style.paddingLeft=F(h);const p=Pe.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:-(r.height+m)},{type:"elem",elem:a},{type:"kern",size:l}]},t);if(e.index){const r=t.havingStyle(w.SCRIPTSCRIPT),n=ct(e.index,r,t),o=.6*(p.height-p.depth),s=Pe.makeVList({positionType:"shift",positionData:-o,children:[{type:"elem",elem:n}]},t),i=Pe.makeSpan(["root"],[s]);return Pe.makeSpan(["mord","sqrt"],[i,p],t)}return Pe.makeSpan(["mord","sqrt"],[p],t)},mathmlBuilder(e,t){const{body:r,index:n}=e;return n?new ft.MathNode("mroot",[St(r,t),St(n,t)]):new ft.MathNode("msqrt",[St(r,t)])}});const cn={display:w.DISPLAY,text:w.TEXT,script:w.SCRIPT,scriptscript:w.SCRIPTSCRIPT};$e({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,t){let{breakOnTokenText:r,funcName:n,parser:o}=e;const s=o.parseExpression(!0,r),i=n.slice(1,n.length-5);return{type:"styling",mode:o.mode,style:i,body:s}},htmlBuilder(e,t){const r=cn[e.style],n=t.havingStyle(r).withFont("");return ln(e.body,n,t)},mathmlBuilder(e,t){const r=cn[e.style],n=t.havingStyle(r),o=vt(e.body,n),s=new ft.MathNode("mstyle",o),i={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]}[e.style];return s.setAttribute("scriptlevel",i[0]),s.setAttribute("displaystyle",i[1]),s}});Ze({type:"supsub",htmlBuilder(e,t){const r=function(e,t){const r=e.base;if(r)return"op"===r.type?r.limits&&(t.style.size===w.DISPLAY.size||r.alwaysHandleSupSub)?rn:null:"operatorname"===r.type?r.alwaysHandleSupSub&&(t.style.size===w.DISPLAY.size||r.limits)?an:null:"accent"===r.type?l.isCharacterBox(r.base)?Et:null:"horizBrace"===r.type&&!e.sub===r.isOver?Kr:null;return null}(e,t);if(r)return r(e,t);const{base:n,sup:o,sub:s}=e,i=ct(n,t);let a,h;const c=t.fontMetrics();let m=0,p=0;const u=n&&l.isCharacterBox(n);if(o){const e=t.havingStyle(t.style.sup());a=ct(o,e,t),u||(m=i.height-e.fontMetrics().supDrop*e.sizeMultiplier/t.sizeMultiplier)}if(s){const e=t.havingStyle(t.style.sub());h=ct(s,e,t),u||(p=i.depth+e.fontMetrics().subDrop*e.sizeMultiplier/t.sizeMultiplier)}let d;d=t.style===w.DISPLAY?c.sup1:t.style.cramped?c.sup3:c.sup2;const g=t.sizeMultiplier,f=F(.5/c.ptPerEm/g);let b,y=null;if(h){const t=e.base&&"op"===e.base.type&&e.base.name&&("\\oiint"===e.base.name||"\\oiiint"===e.base.name);(i instanceof K||t)&&(y=F(-i.italic))}if(a&&h){m=Math.max(m,d,a.depth+.25*c.xHeight),p=Math.max(p,c.sub2);const e=4*c.defaultRuleThickness;if(m-a.depth-(h.height-p)<e){p=e-(m-a.depth)+h.height;const t=.8*c.xHeight-(m-a.depth);t>0&&(m+=t,p-=t)}const r=[{type:"elem",elem:h,shift:p,marginRight:f,marginLeft:y},{type:"elem",elem:a,shift:-m,marginRight:f}];b=Pe.makeVList({positionType:"individualShift",children:r},t)}else if(h){p=Math.max(p,c.sub1,h.height-.8*c.xHeight);const e=[{type:"elem",elem:h,marginLeft:y,marginRight:f}];b=Pe.makeVList({positionType:"shift",positionData:p,children:e},t)}else{if(!a)throw new Error("supsub must have either sup or sub.");m=Math.max(m,d,a.depth+.25*c.xHeight),b=Pe.makeVList({positionType:"shift",positionData:-m,children:[{type:"elem",elem:a,marginRight:f}]},t)}const x=lt(i,"right")||"mord";return Pe.makeSpan([x],[i,Pe.makeSpan(["msupsub"],[b])],t)},mathmlBuilder(e,t){let r,n,o=!1;e.base&&"horizBrace"===e.base.type&&(n=!!e.sup,n===e.base.isOver&&(o=!0,r=e.base.isOver)),!e.base||"op"!==e.base.type&&"operatorname"!==e.base.type||(e.base.parentIsSupSub=!0);const s=[St(e.base,t)];let i;if(e.sub&&s.push(St(e.sub,t)),e.sup&&s.push(St(e.sup,t)),o)i=r?"mover":"munder";else if(e.sub)if(e.sup){const r=e.base;i=r&&"op"===r.type&&r.limits&&t.style===w.DISPLAY||r&&"operatorname"===r.type&&r.alwaysHandleSupSub&&(t.style===w.DISPLAY||r.limits)?"munderover":"msubsup"}else{const r=e.base;i=r&&"op"===r.type&&r.limits&&(t.style===w.DISPLAY||r.alwaysHandleSupSub)||r&&"operatorname"===r.type&&r.alwaysHandleSupSub&&(r.limits||t.style===w.DISPLAY)?"munder":"msub"}else{const r=e.base;i=r&&"op"===r.type&&r.limits&&(t.style===w.DISPLAY||r.alwaysHandleSupSub)||r&&"operatorname"===r.type&&r.alwaysHandleSupSub&&(r.limits||t.style===w.DISPLAY)?"mover":"msup"}return new ft.MathNode(i,s)}}),Ze({type:"atom",htmlBuilder(e,t){return Pe.mathsym(e.text,e.mode,t,["m"+e.family])},mathmlBuilder(e,t){const r=new ft.MathNode("mo",[bt(e.text,e.mode)]);if("bin"===e.family){const n=xt(e,t);"bold-italic"===n&&r.setAttribute("mathvariant",n)}else"punct"===e.family?r.setAttribute("separator","true"):"open"!==e.family&&"close"!==e.family||r.setAttribute("stretchy","false");return r}});const mn={mi:"italic",mn:"normal",mtext:"normal"};Ze({type:"mathord",htmlBuilder(e,t){return Pe.makeOrd(e,t,"mathord")},mathmlBuilder(e,t){const r=new ft.MathNode("mi",[bt(e.text,e.mode,t)]),n=xt(e,t)||"italic";return n!==mn[r.type]&&r.setAttribute("mathvariant",n),r}}),Ze({type:"textord",htmlBuilder(e,t){return Pe.makeOrd(e,t,"textord")},mathmlBuilder(e,t){const r=bt(e.text,e.mode,t),n=xt(e,t)||"normal";let o;return o="text"===e.mode?new ft.MathNode("mtext",[r]):/[0-9]/.test(e.text)?new ft.MathNode("mn",[r]):"\\prime"===e.text?new ft.MathNode("mo",[r]):new ft.MathNode("mi",[r]),n!==mn[o.type]&&o.setAttribute("mathvariant",n),o}});const pn={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},un={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};Ze({type:"spacing",htmlBuilder(e,t){if(un.hasOwnProperty(e.text)){const r=un[e.text].className||"";if("text"===e.mode){const n=Pe.makeOrd(e,t,"textord");return n.classes.push(r),n}return Pe.makeSpan(["mspace",r],[Pe.mathsym(e.text,e.mode,t)],t)}if(pn.hasOwnProperty(e.text))return Pe.makeSpan(["mspace",pn[e.text]],[],t);throw new n('Unknown type of space "'+e.text+'"')},mathmlBuilder(e,t){let r;if(!un.hasOwnProperty(e.text)){if(pn.hasOwnProperty(e.text))return new ft.MathNode("mspace");throw new n('Unknown type of space "'+e.text+'"')}return r=new ft.MathNode("mtext",[new ft.TextNode("\xa0")]),r}});const dn=()=>{const e=new ft.MathNode("mtd",[]);return e.setAttribute("width","50%"),e};Ze({type:"tag",mathmlBuilder(e,t){const r=new ft.MathNode("mtable",[new ft.MathNode("mtr",[dn(),new ft.MathNode("mtd",[kt(e.body,t)]),dn(),new ft.MathNode("mtd",[kt(e.tag,t)])])]);return r.setAttribute("width","100%"),r}});const gn={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},fn={"\\textbf":"textbf","\\textmd":"textmd"},bn={"\\textit":"textit","\\textup":"textup"},yn=(e,t)=>{const r=e.font;return r?gn[r]?t.withTextFontFamily(gn[r]):fn[r]?t.withTextFontWeight(fn[r]):"\\emph"===r?"textit"===t.fontShape?t.withTextFontShape("textup"):t.withTextFontShape("textit"):t.withTextFontShape(bn[r]):t};$e({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(e,t){let{parser:r,funcName:n}=e;const o=t[0];return{type:"text",mode:r.mode,body:Je(o),font:n}},htmlBuilder(e,t){const r=yn(e,t),n=ot(e.body,r,!0);return Pe.makeSpan(["mord","text"],n,r)},mathmlBuilder(e,t){const r=yn(e,t);return kt(e.body,r)}}),$e({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(e,t){let{parser:r}=e;return{type:"underline",mode:r.mode,body:t[0]}},htmlBuilder(e,t){const r=ct(e.body,t),n=Pe.makeLineSpan("underline-line",t),o=t.fontMetrics().defaultRuleThickness,s=Pe.makeVList({positionType:"top",positionData:r.height,children:[{type:"kern",size:o},{type:"elem",elem:n},{type:"kern",size:3*o},{type:"elem",elem:r}]},t);return Pe.makeSpan(["mord","underline"],[s],t)},mathmlBuilder(e,t){const r=new ft.MathNode("mo",[new ft.TextNode("\u203e")]);r.setAttribute("stretchy","true");const n=new ft.MathNode("munder",[St(e.body,t),r]);return n.setAttribute("accentunder","true"),n}}),$e({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(e,t){let{parser:r}=e;return{type:"vcenter",mode:r.mode,body:t[0]}},htmlBuilder(e,t){const r=ct(e.body,t),n=t.fontMetrics().axisHeight,o=.5*(r.height-n-(r.depth+n));return Pe.makeVList({positionType:"shift",positionData:o,children:[{type:"elem",elem:r}]},t)},mathmlBuilder(e,t){return new ft.MathNode("mpadded",[St(e.body,t)],["vcenter"])}}),$e({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,t,r){throw new n("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,t){const r=xn(e),n=[],o=t.havingStyle(t.style.text());for(let t=0;t<r.length;t++){let s=r[t];"~"===s&&(s="\\textasciitilde"),n.push(Pe.makeSymbol(s,"Typewriter-Regular",e.mode,o,["mord","texttt"]))}return Pe.makeSpan(["mord","text"].concat(o.sizingClasses(t)),Pe.tryCombineChars(n),o)},mathmlBuilder(e,t){const r=new ft.TextNode(xn(e)),n=new ft.MathNode("mtext",[r]);return n.setAttribute("mathvariant","monospace"),n}});const xn=e=>e.body.replace(/ /g,e.star?"\u2423":"\xa0");var wn=We;const vn="[ \r\n\t]",kn="(\\\\[a-zA-Z@]+)"+vn+"*",Sn="[\u0300-\u036f]",Mn=new RegExp(Sn+"+$"),zn="("+vn+"+)|\\\\(\n|[ \r\t]+\n?)[ \r\t]*|([!-\\[\\]-\u2027\u202a-\ud7ff\uf900-\uffff]"+Sn+"*|[\ud800-\udbff][\udc00-\udfff]"+Sn+"*|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5|"+kn+"|\\\\[^\ud800-\udfff])";class An{constructor(e,t){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=t,this.tokenRegex=new RegExp(zn,"g"),this.catcodes={"%":14,"~":13}}setCatcode(e,t){this.catcodes[e]=t}lex(){const e=this.input,t=this.tokenRegex.lastIndex;if(t===e.length)return new Ir("EOF",new qr(this,t,t));const r=this.tokenRegex.exec(e);if(null===r||r.index!==t)throw new n("Unexpected character: '"+e[t]+"'",new Ir(e[t],new qr(this,t,t+1)));const o=r[6]||r[3]||(r[2]?"\\ ":" ");if(14===this.catcodes[o]){const t=e.indexOf("\n",this.tokenRegex.lastIndex);return-1===t?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=t+1,this.lex()}return new Ir(o,new qr(this,t,this.tokenRegex.lastIndex))}}class Tn{constructor(e,t){void 0===e&&(e={}),void 0===t&&(t={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=t,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(0===this.undefStack.length)throw new n("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");const e=this.undefStack.pop();for(const t in e)e.hasOwnProperty(t)&&(null==e[t]?delete this.current[t]:this.current[t]=e[t])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]}set(e,t,r){if(void 0===r&&(r=!1),r){for(let t=0;t<this.undefStack.length;t++)delete this.undefStack[t][e];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][e]=t)}else{const t=this.undefStack[this.undefStack.length-1];t&&!t.hasOwnProperty(e)&&(t[e]=this.current[e])}null==t?delete this.current[e]:this.current[e]=t}}var Bn=Cr;Nr("\\noexpand",(function(e){const t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}})),Nr("\\expandafter",(function(e){const t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}})),Nr("\\@firstoftwo",(function(e){return{tokens:e.consumeArgs(2)[0],numArgs:0}})),Nr("\\@secondoftwo",(function(e){return{tokens:e.consumeArgs(2)[1],numArgs:0}})),Nr("\\@ifnextchar",(function(e){const t=e.consumeArgs(3);e.consumeSpaces();const r=e.future();return 1===t[0].length&&t[0][0].text===r.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}})),Nr("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),Nr("\\TextOrMath",(function(e){const t=e.consumeArgs(2);return"text"===e.mode?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}}));const Cn={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};Nr("\\char",(function(e){let t,r=e.popToken(),o="";if("'"===r.text)t=8,r=e.popToken();else if('"'===r.text)t=16,r=e.popToken();else if("`"===r.text)if(r=e.popToken(),"\\"===r.text[0])o=r.text.charCodeAt(1);else{if("EOF"===r.text)throw new n("\\char` missing argument");o=r.text.charCodeAt(0)}else t=10;if(t){if(o=Cn[r.text],null==o||o>=t)throw new n("Invalid base-"+t+" digit "+r.text);let s;for(;null!=(s=Cn[e.future().text])&&s<t;)o*=t,o+=s,e.popToken()}return"\\@char{"+o+"}"}));const Nn=(e,t,r,o)=>{let s=e.consumeArg().tokens;if(1!==s.length)throw new n("\\newcommand's first argument must be a macro name");const i=s[0].text,a=e.isDefined(i);if(a&&!t)throw new n("\\newcommand{"+i+"} attempting to redefine "+i+"; use \\renewcommand");if(!a&&!r)throw new n("\\renewcommand{"+i+"} when command "+i+" does not yet exist; use \\newcommand");let l=0;if(s=e.consumeArg().tokens,1===s.length&&"["===s[0].text){let t="",r=e.expandNextToken();for(;"]"!==r.text&&"EOF"!==r.text;)t+=r.text,r=e.expandNextToken();if(!t.match(/^\s*[0-9]+\s*$/))throw new n("Invalid number of arguments: "+t);l=parseInt(t),s=e.consumeArg().tokens}return a&&o||e.macros.set(i,{tokens:s,numArgs:l}),""};Nr("\\newcommand",(e=>Nn(e,!1,!0,!1))),Nr("\\renewcommand",(e=>Nn(e,!0,!1,!1))),Nr("\\providecommand",(e=>Nn(e,!0,!0,!0))),Nr("\\message",(e=>{const t=e.consumeArgs(1)[0];return console.log(t.reverse().map((e=>e.text)).join("")),""})),Nr("\\errmessage",(e=>{const t=e.consumeArgs(1)[0];return console.error(t.reverse().map((e=>e.text)).join("")),""})),Nr("\\show",(e=>{const t=e.popToken(),r=t.text;return console.log(t,e.macros.get(r),wn[r],se.math[r],se.text[r]),""})),Nr("\\bgroup","{"),Nr("\\egroup","}"),Nr("~","\\nobreakspace"),Nr("\\lq","`"),Nr("\\rq","'"),Nr("\\aa","\\r a"),Nr("\\AA","\\r A"),Nr("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`\xa9}"),Nr("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),Nr("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`\xae}"),Nr("\u212c","\\mathscr{B}"),Nr("\u2130","\\mathscr{E}"),Nr("\u2131","\\mathscr{F}"),Nr("\u210b","\\mathscr{H}"),Nr("\u2110","\\mathscr{I}"),Nr("\u2112","\\mathscr{L}"),Nr("\u2133","\\mathscr{M}"),Nr("\u211b","\\mathscr{R}"),Nr("\u212d","\\mathfrak{C}"),Nr("\u210c","\\mathfrak{H}"),Nr("\u2128","\\mathfrak{Z}"),Nr("\\Bbbk","\\Bbb{k}"),Nr("\xb7","\\cdotp"),Nr("\\llap","\\mathllap{\\textrm{#1}}"),Nr("\\rlap","\\mathrlap{\\textrm{#1}}"),Nr("\\clap","\\mathclap{\\textrm{#1}}"),Nr("\\mathstrut","\\vphantom{(}"),Nr("\\underbar","\\underline{\\text{#1}}"),Nr("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}'),Nr("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`\u2260}}"),Nr("\\ne","\\neq"),Nr("\u2260","\\neq"),Nr("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`\u2209}}"),Nr("\u2209","\\notin"),Nr("\u2258","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`\u2258}}"),Nr("\u2259","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`\u2258}}"),Nr("\u225a","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`\u225a}}"),Nr("\u225b","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`\u225b}}"),Nr("\u225d","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`\u225d}}"),Nr("\u225e","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`\u225e}}"),Nr("\u225f","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`\u225f}}"),Nr("\u27c2","\\perp"),Nr("\u203c","\\mathclose{!\\mkern-0.8mu!}"),Nr("\u220c","\\notni"),Nr("\u231c","\\ulcorner"),Nr("\u231d","\\urcorner"),Nr("\u231e","\\llcorner"),Nr("\u231f","\\lrcorner"),Nr("\xa9","\\copyright"),Nr("\xae","\\textregistered"),Nr("\ufe0f","\\textregistered"),Nr("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}'),Nr("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}'),Nr("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}'),Nr("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}'),Nr("\\vdots","{\\varvdots\\rule{0pt}{15pt}}"),Nr("\u22ee","\\vdots"),Nr("\\varGamma","\\mathit{\\Gamma}"),Nr("\\varDelta","\\mathit{\\Delta}"),Nr("\\varTheta","\\mathit{\\Theta}"),Nr("\\varLambda","\\mathit{\\Lambda}"),Nr("\\varXi","\\mathit{\\Xi}"),Nr("\\varPi","\\mathit{\\Pi}"),Nr("\\varSigma","\\mathit{\\Sigma}"),Nr("\\varUpsilon","\\mathit{\\Upsilon}"),Nr("\\varPhi","\\mathit{\\Phi}"),Nr("\\varPsi","\\mathit{\\Psi}"),Nr("\\varOmega","\\mathit{\\Omega}"),Nr("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),Nr("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax"),Nr("\\boxed","\\fbox{$\\displaystyle{#1}$}"),Nr("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),Nr("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),Nr("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;"),Nr("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}"),Nr("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");const qn={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"};Nr("\\dots",(function(e){let t="\\dotso";const r=e.expandAfterFuture().text;return r in qn?t=qn[r]:("\\not"===r.slice(0,4)||r in se.math&&l.contains(["bin","rel"],se.math[r].group))&&(t="\\dotsb"),t}));const In={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};Nr("\\dotso",(function(e){return e.future().text in In?"\\ldots\\,":"\\ldots"})),Nr("\\dotsc",(function(e){const t=e.future().text;return t in In&&","!==t?"\\ldots\\,":"\\ldots"})),Nr("\\cdots",(function(e){return e.future().text in In?"\\@cdots\\,":"\\@cdots"})),Nr("\\dotsb","\\cdots"),Nr("\\dotsm","\\cdots"),Nr("\\dotsi","\\!\\cdots"),Nr("\\dotsx","\\ldots\\,"),Nr("\\DOTSI","\\relax"),Nr("\\DOTSB","\\relax"),Nr("\\DOTSX","\\relax"),Nr("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),Nr("\\,","\\tmspace+{3mu}{.1667em}"),Nr("\\thinspace","\\,"),Nr("\\>","\\mskip{4mu}"),Nr("\\:","\\tmspace+{4mu}{.2222em}"),Nr("\\medspace","\\:"),Nr("\\;","\\tmspace+{5mu}{.2777em}"),Nr("\\thickspace","\\;"),Nr("\\!","\\tmspace-{3mu}{.1667em}"),Nr("\\negthinspace","\\!"),Nr("\\negmedspace","\\tmspace-{4mu}{.2222em}"),Nr("\\negthickspace","\\tmspace-{5mu}{.277em}"),Nr("\\enspace","\\kern.5em "),Nr("\\enskip","\\hskip.5em\\relax"),Nr("\\quad","\\hskip1em\\relax"),Nr("\\qquad","\\hskip2em\\relax"),Nr("\\tag","\\@ifstar\\tag@literal\\tag@paren"),Nr("\\tag@paren","\\tag@literal{({#1})}"),Nr("\\tag@literal",(e=>{if(e.macros.get("\\df@tag"))throw new n("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"})),Nr("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),Nr("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),Nr("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),Nr("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),Nr("\\newline","\\\\\\relax"),Nr("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");const Rn=F(T["Main-Regular"]["T".charCodeAt(0)][1]-.7*T["Main-Regular"]["A".charCodeAt(0)][1]);Nr("\\LaTeX","\\textrm{\\html@mathml{L\\kern-.36em\\raisebox{"+Rn+"}{\\scriptstyle A}\\kern-.15em\\TeX}{LaTeX}}"),Nr("\\KaTeX","\\textrm{\\html@mathml{K\\kern-.17em\\raisebox{"+Rn+"}{\\scriptstyle A}\\kern-.15em\\TeX}{KaTeX}}"),Nr("\\hspace","\\@ifstar\\@hspacer\\@hspace"),Nr("\\@hspace","\\hskip #1\\relax"),Nr("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),Nr("\\ordinarycolon",":"),Nr("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),Nr("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),Nr("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),Nr("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),Nr("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),Nr("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),Nr("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),Nr("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),Nr("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),Nr("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),Nr("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),Nr("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),Nr("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),Nr("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),Nr("\u2237","\\dblcolon"),Nr("\u2239","\\eqcolon"),Nr("\u2254","\\coloneqq"),Nr("\u2255","\\eqqcolon"),Nr("\u2a74","\\Coloneqq"),Nr("\\ratio","\\vcentcolon"),Nr("\\coloncolon","\\dblcolon"),Nr("\\colonequals","\\coloneqq"),Nr("\\coloncolonequals","\\Coloneqq"),Nr("\\equalscolon","\\eqqcolon"),Nr("\\equalscoloncolon","\\Eqqcolon"),Nr("\\colonminus","\\coloneq"),Nr("\\coloncolonminus","\\Coloneq"),Nr("\\minuscolon","\\eqcolon"),Nr("\\minuscoloncolon","\\Eqcolon"),Nr("\\coloncolonapprox","\\Colonapprox"),Nr("\\coloncolonsim","\\Colonsim"),Nr("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),Nr("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),Nr("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),Nr("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),Nr("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`\u220c}}"),Nr("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),Nr("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),Nr("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}"),Nr("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}"),Nr("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}"),Nr("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}"),Nr("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}"),Nr("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}"),Nr("\\gvertneqq","\\html@mathml{\\@gvertneqq}{\u2269}"),Nr("\\lvertneqq","\\html@mathml{\\@lvertneqq}{\u2268}"),Nr("\\ngeqq","\\html@mathml{\\@ngeqq}{\u2271}"),Nr("\\ngeqslant","\\html@mathml{\\@ngeqslant}{\u2271}"),Nr("\\nleqq","\\html@mathml{\\@nleqq}{\u2270}"),Nr("\\nleqslant","\\html@mathml{\\@nleqslant}{\u2270}"),Nr("\\nshortmid","\\html@mathml{\\@nshortmid}{\u2224}"),Nr("\\nshortparallel","\\html@mathml{\\@nshortparallel}{\u2226}"),Nr("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{\u2288}"),Nr("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{\u2289}"),Nr("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{\u228a}"),Nr("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{\u2acb}"),Nr("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{\u228b}"),Nr("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{\u2acc}"),Nr("\\imath","\\html@mathml{\\@imath}{\u0131}"),Nr("\\jmath","\\html@mathml{\\@jmath}{\u0237}"),Nr("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`\u27e6}}"),Nr("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`\u27e7}}"),Nr("\u27e6","\\llbracket"),Nr("\u27e7","\\rrbracket"),Nr("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`\u2983}}"),Nr("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`\u2984}}"),Nr("\u2983","\\lBrace"),Nr("\u2984","\\rBrace"),Nr("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`\u29b5}}"),Nr("\u29b5","\\minuso"),Nr("\\darr","\\downarrow"),Nr("\\dArr","\\Downarrow"),Nr("\\Darr","\\Downarrow"),Nr("\\lang","\\langle"),Nr("\\rang","\\rangle"),Nr("\\uarr","\\uparrow"),Nr("\\uArr","\\Uparrow"),Nr("\\Uarr","\\Uparrow"),Nr("\\N","\\mathbb{N}"),Nr("\\R","\\mathbb{R}"),Nr("\\Z","\\mathbb{Z}"),Nr("\\alef","\\aleph"),Nr("\\alefsym","\\aleph"),Nr("\\Alpha","\\mathrm{A}"),Nr("\\Beta","\\mathrm{B}"),Nr("\\bull","\\bullet"),Nr("\\Chi","\\mathrm{X}"),Nr("\\clubs","\\clubsuit"),Nr("\\cnums","\\mathbb{C}"),Nr("\\Complex","\\mathbb{C}"),Nr("\\Dagger","\\ddagger"),Nr("\\diamonds","\\diamondsuit"),Nr("\\empty","\\emptyset"),Nr("\\Epsilon","\\mathrm{E}"),Nr("\\Eta","\\mathrm{H}"),Nr("\\exist","\\exists"),Nr("\\harr","\\leftrightarrow"),Nr("\\hArr","\\Leftrightarrow"),Nr("\\Harr","\\Leftrightarrow"),Nr("\\hearts","\\heartsuit"),Nr("\\image","\\Im"),Nr("\\infin","\\infty"),Nr("\\Iota","\\mathrm{I}"),Nr("\\isin","\\in"),Nr("\\Kappa","\\mathrm{K}"),Nr("\\larr","\\leftarrow"),Nr("\\lArr","\\Leftarrow"),Nr("\\Larr","\\Leftarrow"),Nr("\\lrarr","\\leftrightarrow"),Nr("\\lrArr","\\Leftrightarrow"),Nr("\\Lrarr","\\Leftrightarrow"),Nr("\\Mu","\\mathrm{M}"),Nr("\\natnums","\\mathbb{N}"),Nr("\\Nu","\\mathrm{N}"),Nr("\\Omicron","\\mathrm{O}"),Nr("\\plusmn","\\pm"),Nr("\\rarr","\\rightarrow"),Nr("\\rArr","\\Rightarrow"),Nr("\\Rarr","\\Rightarrow"),Nr("\\real","\\Re"),Nr("\\reals","\\mathbb{R}"),Nr("\\Reals","\\mathbb{R}"),Nr("\\Rho","\\mathrm{P}"),Nr("\\sdot","\\cdot"),Nr("\\sect","\\S"),Nr("\\spades","\\spadesuit"),Nr("\\sub","\\subset"),Nr("\\sube","\\subseteq"),Nr("\\supe","\\supseteq"),Nr("\\Tau","\\mathrm{T}"),Nr("\\thetasym","\\vartheta"),Nr("\\weierp","\\wp"),Nr("\\Zeta","\\mathrm{Z}"),Nr("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),Nr("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),Nr("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),Nr("\\bra","\\mathinner{\\langle{#1}|}"),Nr("\\ket","\\mathinner{|{#1}\\rangle}"),Nr("\\braket","\\mathinner{\\langle{#1}\\rangle}"),Nr("\\Bra","\\left\\langle#1\\right|"),Nr("\\Ket","\\left|#1\\right\\rangle");const Hn=e=>t=>{const r=t.consumeArg().tokens,n=t.consumeArg().tokens,o=t.consumeArg().tokens,s=t.consumeArg().tokens,i=t.macros.get("|"),a=t.macros.get("\\|");t.macros.beginGroup();const l=t=>r=>{e&&(r.macros.set("|",i),o.length&&r.macros.set("\\|",a));let s=t;if(!t&&o.length){"|"===r.future().text&&(r.popToken(),s=!0)}return{tokens:s?o:n,numArgs:0}};t.macros.set("|",l(!1)),o.length&&t.macros.set("\\|",l(!0));const h=t.consumeArg().tokens,c=t.expandTokens([...s,...h,...r]);return t.macros.endGroup(),{tokens:c.reverse(),numArgs:0}};Nr("\\bra@ket",Hn(!1)),Nr("\\bra@set",Hn(!0)),Nr("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}"),Nr("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}"),Nr("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}"),Nr("\\angln","{\\angl n}"),Nr("\\blue","\\textcolor{##6495ed}{#1}"),Nr("\\orange","\\textcolor{##ffa500}{#1}"),Nr("\\pink","\\textcolor{##ff00af}{#1}"),Nr("\\red","\\textcolor{##df0030}{#1}"),Nr("\\green","\\textcolor{##28ae7b}{#1}"),Nr("\\gray","\\textcolor{gray}{#1}"),Nr("\\purple","\\textcolor{##9d38bd}{#1}"),Nr("\\blueA","\\textcolor{##ccfaff}{#1}"),Nr("\\blueB","\\textcolor{##80f6ff}{#1}"),Nr("\\blueC","\\textcolor{##63d9ea}{#1}"),Nr("\\blueD","\\textcolor{##11accd}{#1}"),Nr("\\blueE","\\textcolor{##0c7f99}{#1}"),Nr("\\tealA","\\textcolor{##94fff5}{#1}"),Nr("\\tealB","\\textcolor{##26edd5}{#1}"),Nr("\\tealC","\\textcolor{##01d1c1}{#1}"),Nr("\\tealD","\\textcolor{##01a995}{#1}"),Nr("\\tealE","\\textcolor{##208170}{#1}"),Nr("\\greenA","\\textcolor{##b6ffb0}{#1}"),Nr("\\greenB","\\textcolor{##8af281}{#1}"),Nr("\\greenC","\\textcolor{##74cf70}{#1}"),Nr("\\greenD","\\textcolor{##1fab54}{#1}"),Nr("\\greenE","\\textcolor{##0d923f}{#1}"),Nr("\\goldA","\\textcolor{##ffd0a9}{#1}"),Nr("\\goldB","\\textcolor{##ffbb71}{#1}"),Nr("\\goldC","\\textcolor{##ff9c39}{#1}"),Nr("\\goldD","\\textcolor{##e07d10}{#1}"),Nr("\\goldE","\\textcolor{##a75a05}{#1}"),Nr("\\redA","\\textcolor{##fca9a9}{#1}"),Nr("\\redB","\\textcolor{##ff8482}{#1}"),Nr("\\redC","\\textcolor{##f9685d}{#1}"),Nr("\\redD","\\textcolor{##e84d39}{#1}"),Nr("\\redE","\\textcolor{##bc2612}{#1}"),Nr("\\maroonA","\\textcolor{##ffbde0}{#1}"),Nr("\\maroonB","\\textcolor{##ff92c6}{#1}"),Nr("\\maroonC","\\textcolor{##ed5fa6}{#1}"),Nr("\\maroonD","\\textcolor{##ca337c}{#1}"),Nr("\\maroonE","\\textcolor{##9e034e}{#1}"),Nr("\\purpleA","\\textcolor{##ddd7ff}{#1}"),Nr("\\purpleB","\\textcolor{##c6b9fc}{#1}"),Nr("\\purpleC","\\textcolor{##aa87ff}{#1}"),Nr("\\purpleD","\\textcolor{##7854ab}{#1}"),Nr("\\purpleE","\\textcolor{##543b78}{#1}"),Nr("\\mintA","\\textcolor{##f5f9e8}{#1}"),Nr("\\mintB","\\textcolor{##edf2df}{#1}"),Nr("\\mintC","\\textcolor{##e0e5cc}{#1}"),Nr("\\grayA","\\textcolor{##f6f7f7}{#1}"),Nr("\\grayB","\\textcolor{##f0f1f2}{#1}"),Nr("\\grayC","\\textcolor{##e3e5e6}{#1}"),Nr("\\grayD","\\textcolor{##d6d8da}{#1}"),Nr("\\grayE","\\textcolor{##babec2}{#1}"),Nr("\\grayF","\\textcolor{##888d93}{#1}"),Nr("\\grayG","\\textcolor{##626569}{#1}"),Nr("\\grayH","\\textcolor{##3b3e40}{#1}"),Nr("\\grayI","\\textcolor{##21242c}{#1}"),Nr("\\kaBlue","\\textcolor{##314453}{#1}"),Nr("\\kaGreen","\\textcolor{##71B307}{#1}");const On={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class En{constructor(e,t,r){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new Tn(Bn,t.macros),this.mode=r,this.stack=[]}feed(e){this.lexer=new An(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return 0===this.stack.length&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){let t,r,n;if(e){if(this.consumeSpaces(),"["!==this.future().text)return null;t=this.popToken(),({tokens:n,end:r}=this.consumeArg(["]"]))}else({tokens:n,start:t,end:r}=this.consumeArg());return this.pushToken(new Ir("EOF",r.loc)),this.pushTokens(n),t.range(r,"")}consumeSpaces(){for(;;){if(" "!==this.future().text)break;this.stack.pop()}}consumeArg(e){const t=[],r=e&&e.length>0;r||this.consumeSpaces();const o=this.future();let s,i=0,a=0;do{if(s=this.popToken(),t.push(s),"{"===s.text)++i;else if("}"===s.text){if(--i,-1===i)throw new n("Extra }",s)}else if("EOF"===s.text)throw new n("Unexpected end of input in a macro argument, expected '"+(e&&r?e[a]:"}")+"'",s);if(e&&r)if((0===i||1===i&&"{"===e[a])&&s.text===e[a]){if(++a,a===e.length){t.splice(-a,a);break}}else a=0}while(0!==i||r);return"{"===o.text&&"}"===t[t.length-1].text&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:o,end:s}}consumeArgs(e,t){if(t){if(t.length!==e+1)throw new n("The length of delimiters doesn't match the number of args!");const r=t[0];for(let e=0;e<r.length;e++){const t=this.popToken();if(r[e]!==t.text)throw new n("Use of the macro doesn't match its definition",t)}}const r=[];for(let n=0;n<e;n++)r.push(this.consumeArg(t&&t[n+1]).tokens);return r}countExpansion(e){if(this.expansionCount+=e,this.expansionCount>this.settings.maxExpand)throw new n("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(e){const t=this.popToken(),r=t.text,o=t.noexpand?null:this._getExpansion(r);if(null==o||e&&o.unexpandable){if(e&&null==o&&"\\"===r[0]&&!this.isDefined(r))throw new n("Undefined control sequence: "+r);return this.pushToken(t),!1}this.countExpansion(1);let s=o.tokens;const i=this.consumeArgs(o.numArgs,o.delimiters);if(o.numArgs){s=s.slice();for(let e=s.length-1;e>=0;--e){let t=s[e];if("#"===t.text){if(0===e)throw new n("Incomplete placeholder at end of macro body",t);if(t=s[--e],"#"===t.text)s.splice(e+1,1);else{if(!/^[1-9]$/.test(t.text))throw new n("Not a valid argument number",t);s.splice(e,2,...i[+t.text-1])}}}}return this.pushTokens(s),s.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(!1===this.expandOnce()){const e=this.stack.pop();return e.treatAsRelax&&(e.text="\\relax"),e}throw new Error}expandMacro(e){return this.macros.has(e)?this.expandTokens([new Ir(e)]):void 0}expandTokens(e){const t=[],r=this.stack.length;for(this.pushTokens(e);this.stack.length>r;)if(!1===this.expandOnce(!0)){const e=this.stack.pop();e.treatAsRelax&&(e.noexpand=!1,e.treatAsRelax=!1),t.push(e)}return this.countExpansion(t.length),t}expandMacroAsText(e){const t=this.expandMacro(e);return t?t.map((e=>e.text)).join(""):t}_getExpansion(e){const t=this.macros.get(e);if(null==t)return t;if(1===e.length){const t=this.lexer.catcodes[e];if(null!=t&&13!==t)return}const r="function"==typeof t?t(this):t;if("string"==typeof r){let e=0;if(-1!==r.indexOf("#")){const t=r.replace(/##/g,"");for(;-1!==t.indexOf("#"+(e+1));)++e}const t=new An(r,this.settings),n=[];let o=t.lex();for(;"EOF"!==o.text;)n.push(o),o=t.lex();n.reverse();return{tokens:n,numArgs:e}}return r}isDefined(e){return this.macros.has(e)||wn.hasOwnProperty(e)||se.math.hasOwnProperty(e)||se.text.hasOwnProperty(e)||On.hasOwnProperty(e)}isExpandable(e){const t=this.macros.get(e);return null!=t?"string"==typeof t||"function"==typeof t||!t.unexpandable:wn.hasOwnProperty(e)&&!wn[e].primitive}}const Ln=/^[\u208a\u208b\u208c\u208d\u208e\u2080\u2081\u2082\u2083\u2084\u2085\u2086\u2087\u2088\u2089\u2090\u2091\u2095\u1d62\u2c7c\u2096\u2097\u2098\u2099\u2092\u209a\u1d63\u209b\u209c\u1d64\u1d65\u2093\u1d66\u1d67\u1d68\u1d69\u1d6a]/,Dn=Object.freeze({"\u208a":"+","\u208b":"-","\u208c":"=","\u208d":"(","\u208e":")","\u2080":"0","\u2081":"1","\u2082":"2","\u2083":"3","\u2084":"4","\u2085":"5","\u2086":"6","\u2087":"7","\u2088":"8","\u2089":"9","\u2090":"a","\u2091":"e","\u2095":"h","\u1d62":"i","\u2c7c":"j","\u2096":"k","\u2097":"l","\u2098":"m","\u2099":"n","\u2092":"o","\u209a":"p","\u1d63":"r","\u209b":"s","\u209c":"t","\u1d64":"u","\u1d65":"v","\u2093":"x","\u1d66":"\u03b2","\u1d67":"\u03b3","\u1d68":"\u03c1","\u1d69":"\u03d5","\u1d6a":"\u03c7","\u207a":"+","\u207b":"-","\u207c":"=","\u207d":"(","\u207e":")","\u2070":"0","\xb9":"1","\xb2":"2","\xb3":"3","\u2074":"4","\u2075":"5","\u2076":"6","\u2077":"7","\u2078":"8","\u2079":"9","\u1d2c":"A","\u1d2e":"B","\u1d30":"D","\u1d31":"E","\u1d33":"G","\u1d34":"H","\u1d35":"I","\u1d36":"J","\u1d37":"K","\u1d38":"L","\u1d39":"M","\u1d3a":"N","\u1d3c":"O","\u1d3e":"P","\u1d3f":"R","\u1d40":"T","\u1d41":"U","\u2c7d":"V","\u1d42":"W","\u1d43":"a","\u1d47":"b","\u1d9c":"c","\u1d48":"d","\u1d49":"e","\u1da0":"f","\u1d4d":"g","\u02b0":"h","\u2071":"i","\u02b2":"j","\u1d4f":"k","\u02e1":"l","\u1d50":"m","\u207f":"n","\u1d52":"o","\u1d56":"p","\u02b3":"r","\u02e2":"s","\u1d57":"t","\u1d58":"u","\u1d5b":"v","\u02b7":"w","\u02e3":"x","\u02b8":"y","\u1dbb":"z","\u1d5d":"\u03b2","\u1d5e":"\u03b3","\u1d5f":"\u03b4","\u1d60":"\u03d5","\u1d61":"\u03c7","\u1dbf":"\u03b8"}),Vn={"\u0301":{text:"\\'",math:"\\acute"},"\u0300":{text:"\\`",math:"\\grave"},"\u0308":{text:'\\"',math:"\\ddot"},"\u0303":{text:"\\~",math:"\\tilde"},"\u0304":{text:"\\=",math:"\\bar"},"\u0306":{text:"\\u",math:"\\breve"},"\u030c":{text:"\\v",math:"\\check"},"\u0302":{text:"\\^",math:"\\hat"},"\u0307":{text:"\\.",math:"\\dot"},"\u030a":{text:"\\r",math:"\\mathring"},"\u030b":{text:"\\H"},"\u0327":{text:"\\c"}},Pn={"\xe1":"a\u0301","\xe0":"a\u0300","\xe4":"a\u0308","\u01df":"a\u0308\u0304","\xe3":"a\u0303","\u0101":"a\u0304","\u0103":"a\u0306","\u1eaf":"a\u0306\u0301","\u1eb1":"a\u0306\u0300","\u1eb5":"a\u0306\u0303","\u01ce":"a\u030c","\xe2":"a\u0302","\u1ea5":"a\u0302\u0301","\u1ea7":"a\u0302\u0300","\u1eab":"a\u0302\u0303","\u0227":"a\u0307","\u01e1":"a\u0307\u0304","\xe5":"a\u030a","\u01fb":"a\u030a\u0301","\u1e03":"b\u0307","\u0107":"c\u0301","\u1e09":"c\u0327\u0301","\u010d":"c\u030c","\u0109":"c\u0302","\u010b":"c\u0307","\xe7":"c\u0327","\u010f":"d\u030c","\u1e0b":"d\u0307","\u1e11":"d\u0327","\xe9":"e\u0301","\xe8":"e\u0300","\xeb":"e\u0308","\u1ebd":"e\u0303","\u0113":"e\u0304","\u1e17":"e\u0304\u0301","\u1e15":"e\u0304\u0300","\u0115":"e\u0306","\u1e1d":"e\u0327\u0306","\u011b":"e\u030c","\xea":"e\u0302","\u1ebf":"e\u0302\u0301","\u1ec1":"e\u0302\u0300","\u1ec5":"e\u0302\u0303","\u0117":"e\u0307","\u0229":"e\u0327","\u1e1f":"f\u0307","\u01f5":"g\u0301","\u1e21":"g\u0304","\u011f":"g\u0306","\u01e7":"g\u030c","\u011d":"g\u0302","\u0121":"g\u0307","\u0123":"g\u0327","\u1e27":"h\u0308","\u021f":"h\u030c","\u0125":"h\u0302","\u1e23":"h\u0307","\u1e29":"h\u0327","\xed":"i\u0301","\xec":"i\u0300","\xef":"i\u0308","\u1e2f":"i\u0308\u0301","\u0129":"i\u0303","\u012b":"i\u0304","\u012d":"i\u0306","\u01d0":"i\u030c","\xee":"i\u0302","\u01f0":"j\u030c","\u0135":"j\u0302","\u1e31":"k\u0301","\u01e9":"k\u030c","\u0137":"k\u0327","\u013a":"l\u0301","\u013e":"l\u030c","\u013c":"l\u0327","\u1e3f":"m\u0301","\u1e41":"m\u0307","\u0144":"n\u0301","\u01f9":"n\u0300","\xf1":"n\u0303","\u0148":"n\u030c","\u1e45":"n\u0307","\u0146":"n\u0327","\xf3":"o\u0301","\xf2":"o\u0300","\xf6":"o\u0308","\u022b":"o\u0308\u0304","\xf5":"o\u0303","\u1e4d":"o\u0303\u0301","\u1e4f":"o\u0303\u0308","\u022d":"o\u0303\u0304","\u014d":"o\u0304","\u1e53":"o\u0304\u0301","\u1e51":"o\u0304\u0300","\u014f":"o\u0306","\u01d2":"o\u030c","\xf4":"o\u0302","\u1ed1":"o\u0302\u0301","\u1ed3":"o\u0302\u0300","\u1ed7":"o\u0302\u0303","\u022f":"o\u0307","\u0231":"o\u0307\u0304","\u0151":"o\u030b","\u1e55":"p\u0301","\u1e57":"p\u0307","\u0155":"r\u0301","\u0159":"r\u030c","\u1e59":"r\u0307","\u0157":"r\u0327","\u015b":"s\u0301","\u1e65":"s\u0301\u0307","\u0161":"s\u030c","\u1e67":"s\u030c\u0307","\u015d":"s\u0302","\u1e61":"s\u0307","\u015f":"s\u0327","\u1e97":"t\u0308","\u0165":"t\u030c","\u1e6b":"t\u0307","\u0163":"t\u0327","\xfa":"u\u0301","\xf9":"u\u0300","\xfc":"u\u0308","\u01d8":"u\u0308\u0301","\u01dc":"u\u0308\u0300","\u01d6":"u\u0308\u0304","\u01da":"u\u0308\u030c","\u0169":"u\u0303","\u1e79":"u\u0303\u0301","\u016b":"u\u0304","\u1e7b":"u\u0304\u0308","\u016d":"u\u0306","\u01d4":"u\u030c","\xfb":"u\u0302","\u016f":"u\u030a","\u0171":"u\u030b","\u1e7d":"v\u0303","\u1e83":"w\u0301","\u1e81":"w\u0300","\u1e85":"w\u0308","\u0175":"w\u0302","\u1e87":"w\u0307","\u1e98":"w\u030a","\u1e8d":"x\u0308","\u1e8b":"x\u0307","\xfd":"y\u0301","\u1ef3":"y\u0300","\xff":"y\u0308","\u1ef9":"y\u0303","\u0233":"y\u0304","\u0177":"y\u0302","\u1e8f":"y\u0307","\u1e99":"y\u030a","\u017a":"z\u0301","\u017e":"z\u030c","\u1e91":"z\u0302","\u017c":"z\u0307","\xc1":"A\u0301","\xc0":"A\u0300","\xc4":"A\u0308","\u01de":"A\u0308\u0304","\xc3":"A\u0303","\u0100":"A\u0304","\u0102":"A\u0306","\u1eae":"A\u0306\u0301","\u1eb0":"A\u0306\u0300","\u1eb4":"A\u0306\u0303","\u01cd":"A\u030c","\xc2":"A\u0302","\u1ea4":"A\u0302\u0301","\u1ea6":"A\u0302\u0300","\u1eaa":"A\u0302\u0303","\u0226":"A\u0307","\u01e0":"A\u0307\u0304","\xc5":"A\u030a","\u01fa":"A\u030a\u0301","\u1e02":"B\u0307","\u0106":"C\u0301","\u1e08":"C\u0327\u0301","\u010c":"C\u030c","\u0108":"C\u0302","\u010a":"C\u0307","\xc7":"C\u0327","\u010e":"D\u030c","\u1e0a":"D\u0307","\u1e10":"D\u0327","\xc9":"E\u0301","\xc8":"E\u0300","\xcb":"E\u0308","\u1ebc":"E\u0303","\u0112":"E\u0304","\u1e16":"E\u0304\u0301","\u1e14":"E\u0304\u0300","\u0114":"E\u0306","\u1e1c":"E\u0327\u0306","\u011a":"E\u030c","\xca":"E\u0302","\u1ebe":"E\u0302\u0301","\u1ec0":"E\u0302\u0300","\u1ec4":"E\u0302\u0303","\u0116":"E\u0307","\u0228":"E\u0327","\u1e1e":"F\u0307","\u01f4":"G\u0301","\u1e20":"G\u0304","\u011e":"G\u0306","\u01e6":"G\u030c","\u011c":"G\u0302","\u0120":"G\u0307","\u0122":"G\u0327","\u1e26":"H\u0308","\u021e":"H\u030c","\u0124":"H\u0302","\u1e22":"H\u0307","\u1e28":"H\u0327","\xcd":"I\u0301","\xcc":"I\u0300","\xcf":"I\u0308","\u1e2e":"I\u0308\u0301","\u0128":"I\u0303","\u012a":"I\u0304","\u012c":"I\u0306","\u01cf":"I\u030c","\xce":"I\u0302","\u0130":"I\u0307","\u0134":"J\u0302","\u1e30":"K\u0301","\u01e8":"K\u030c","\u0136":"K\u0327","\u0139":"L\u0301","\u013d":"L\u030c","\u013b":"L\u0327","\u1e3e":"M\u0301","\u1e40":"M\u0307","\u0143":"N\u0301","\u01f8":"N\u0300","\xd1":"N\u0303","\u0147":"N\u030c","\u1e44":"N\u0307","\u0145":"N\u0327","\xd3":"O\u0301","\xd2":"O\u0300","\xd6":"O\u0308","\u022a":"O\u0308\u0304","\xd5":"O\u0303","\u1e4c":"O\u0303\u0301","\u1e4e":"O\u0303\u0308","\u022c":"O\u0303\u0304","\u014c":"O\u0304","\u1e52":"O\u0304\u0301","\u1e50":"O\u0304\u0300","\u014e":"O\u0306","\u01d1":"O\u030c","\xd4":"O\u0302","\u1ed0":"O\u0302\u0301","\u1ed2":"O\u0302\u0300","\u1ed6":"O\u0302\u0303","\u022e":"O\u0307","\u0230":"O\u0307\u0304","\u0150":"O\u030b","\u1e54":"P\u0301","\u1e56":"P\u0307","\u0154":"R\u0301","\u0158":"R\u030c","\u1e58":"R\u0307","\u0156":"R\u0327","\u015a":"S\u0301","\u1e64":"S\u0301\u0307","\u0160":"S\u030c","\u1e66":"S\u030c\u0307","\u015c":"S\u0302","\u1e60":"S\u0307","\u015e":"S\u0327","\u0164":"T\u030c","\u1e6a":"T\u0307","\u0162":"T\u0327","\xda":"U\u0301","\xd9":"U\u0300","\xdc":"U\u0308","\u01d7":"U\u0308\u0301","\u01db":"U\u0308\u0300","\u01d5":"U\u0308\u0304","\u01d9":"U\u0308\u030c","\u0168":"U\u0303","\u1e78":"U\u0303\u0301","\u016a":"U\u0304","\u1e7a":"U\u0304\u0308","\u016c":"U\u0306","\u01d3":"U\u030c","\xdb":"U\u0302","\u016e":"U\u030a","\u0170":"U\u030b","\u1e7c":"V\u0303","\u1e82":"W\u0301","\u1e80":"W\u0300","\u1e84":"W\u0308","\u0174":"W\u0302","\u1e86":"W\u0307","\u1e8c":"X\u0308","\u1e8a":"X\u0307","\xdd":"Y\u0301","\u1ef2":"Y\u0300","\u0178":"Y\u0308","\u1ef8":"Y\u0303","\u0232":"Y\u0304","\u0176":"Y\u0302","\u1e8e":"Y\u0307","\u0179":"Z\u0301","\u017d":"Z\u030c","\u1e90":"Z\u0302","\u017b":"Z\u0307","\u03ac":"\u03b1\u0301","\u1f70":"\u03b1\u0300","\u1fb1":"\u03b1\u0304","\u1fb0":"\u03b1\u0306","\u03ad":"\u03b5\u0301","\u1f72":"\u03b5\u0300","\u03ae":"\u03b7\u0301","\u1f74":"\u03b7\u0300","\u03af":"\u03b9\u0301","\u1f76":"\u03b9\u0300","\u03ca":"\u03b9\u0308","\u0390":"\u03b9\u0308\u0301","\u1fd2":"\u03b9\u0308\u0300","\u1fd1":"\u03b9\u0304","\u1fd0":"\u03b9\u0306","\u03cc":"\u03bf\u0301","\u1f78":"\u03bf\u0300","\u03cd":"\u03c5\u0301","\u1f7a":"\u03c5\u0300","\u03cb":"\u03c5\u0308","\u03b0":"\u03c5\u0308\u0301","\u1fe2":"\u03c5\u0308\u0300","\u1fe1":"\u03c5\u0304","\u1fe0":"\u03c5\u0306","\u03ce":"\u03c9\u0301","\u1f7c":"\u03c9\u0300","\u038e":"\u03a5\u0301","\u1fea":"\u03a5\u0300","\u03ab":"\u03a5\u0308","\u1fe9":"\u03a5\u0304","\u1fe8":"\u03a5\u0306","\u038f":"\u03a9\u0301","\u1ffa":"\u03a9\u0300"};class Fn{constructor(e,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new En(e,t,this.mode),this.settings=t,this.leftrightDepth=0}expect(e,t){if(void 0===t&&(t=!0),this.fetch().text!==e)throw new n("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return null==this.nextToken&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{const e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){const t=this.nextToken;this.consume(),this.gullet.pushToken(new Ir("}")),this.gullet.pushTokens(e);const r=this.parseExpression(!1);return this.expect("}"),this.nextToken=t,r}parseExpression(e,t){const r=[];for(;;){"math"===this.mode&&this.consumeSpaces();const n=this.fetch();if(-1!==Fn.endOfExpression.indexOf(n.text))break;if(t&&n.text===t)break;if(e&&wn[n.text]&&wn[n.text].infix)break;const o=this.parseAtom(t);if(!o)break;"internal"!==o.type&&r.push(o)}return"text"===this.mode&&this.formLigatures(r),this.handleInfixNodes(r)}handleInfixNodes(e){let t,r=-1;for(let o=0;o<e.length;o++)if("infix"===e[o].type){if(-1!==r)throw new n("only one infix operator per group",e[o].token);r=o,t=e[o].replaceWith}if(-1!==r&&t){let n,o;const s=e.slice(0,r),i=e.slice(r+1);let a;return n=1===s.length&&"ordgroup"===s[0].type?s[0]:{type:"ordgroup",mode:this.mode,body:s},o=1===i.length&&"ordgroup"===i[0].type?i[0]:{type:"ordgroup",mode:this.mode,body:i},a="\\\\abovefrac"===t?this.callFunction(t,[n,e[r],o],[]):this.callFunction(t,[n,o],[]),[a]}return e}handleSupSubscript(e){const t=this.fetch(),r=t.text;let o;this.consume(),this.consumeSpaces();do{var s;o=this.parseGroup(e)}while("internal"===(null==(s=o)?void 0:s.type));if(!o)throw new n("Expected group after '"+r+"'",t);return o}formatUnsupportedCmd(e){const t=[];for(let r=0;r<e.length;r++)t.push({type:"textord",mode:"text",text:e[r]});const r={type:"text",mode:this.mode,body:t};return{type:"color",mode:this.mode,color:this.settings.errorColor,body:[r]}}parseAtom(e){const t=this.parseGroup("atom",e);if("internal"===(null==t?void 0:t.type))return t;if("text"===this.mode)return t;let r,o;for(;;){this.consumeSpaces();const e=this.fetch();if("\\limits"===e.text||"\\nolimits"===e.text){if(t&&"op"===t.type){const r="\\limits"===e.text;t.limits=r,t.alwaysHandleSupSub=!0}else{if(!t||"operatorname"!==t.type)throw new n("Limit controls must follow a math operator",e);t.alwaysHandleSupSub&&(t.limits="\\limits"===e.text)}this.consume()}else if("^"===e.text){if(r)throw new n("Double superscript",e);r=this.handleSupSubscript("superscript")}else if("_"===e.text){if(o)throw new n("Double subscript",e);o=this.handleSupSubscript("subscript")}else if("'"===e.text){if(r)throw new n("Double superscript",e);const t={type:"textord",mode:this.mode,text:"\\prime"},o=[t];for(this.consume();"'"===this.fetch().text;)o.push(t),this.consume();"^"===this.fetch().text&&o.push(this.handleSupSubscript("superscript")),r={type:"ordgroup",mode:this.mode,body:o}}else{if(!Dn[e.text])break;{const t=Ln.test(e.text),n=[];for(n.push(new Ir(Dn[e.text])),this.consume();;){const e=this.fetch().text;if(!Dn[e])break;if(Ln.test(e)!==t)break;n.unshift(new Ir(Dn[e])),this.consume()}const s=this.subparse(n);t?o={type:"ordgroup",mode:"math",body:s}:r={type:"ordgroup",mode:"math",body:s}}}}return r||o?{type:"supsub",mode:this.mode,base:t,sup:r,sub:o}:t}parseFunction(e,t){const r=this.fetch(),o=r.text,s=wn[o];if(!s)return null;if(this.consume(),t&&"atom"!==t&&!s.allowedInArgument)throw new n("Got function '"+o+"' with no arguments"+(t?" as "+t:""),r);if("text"===this.mode&&!s.allowedInText)throw new n("Can't use function '"+o+"' in text mode",r);if("math"===this.mode&&!1===s.allowedInMath)throw new n("Can't use function '"+o+"' in math mode",r);const{args:i,optArgs:a}=this.parseArguments(o,s);return this.callFunction(o,i,a,r,e)}callFunction(e,t,r,o,s){const i={funcName:e,parser:this,token:o,breakOnTokenText:s},a=wn[e];if(a&&a.handler)return a.handler(i,t,r);throw new n("No function handler for "+e)}parseArguments(e,t){const r=t.numArgs+t.numOptionalArgs;if(0===r)return{args:[],optArgs:[]};const o=[],s=[];for(let i=0;i<r;i++){let r=t.argTypes&&t.argTypes[i];const a=i<t.numOptionalArgs;(t.primitive&&null==r||"sqrt"===t.type&&1===i&&null==s[0])&&(r="primitive");const l=this.parseGroupOfType("argument to '"+e+"'",r,a);if(a)s.push(l);else{if(null==l)throw new n("Null argument, please report this as a bug");o.push(l)}}return{args:o,optArgs:s}}parseGroupOfType(e,t,r){switch(t){case"color":return this.parseColorGroup(r);case"size":return this.parseSizeGroup(r);case"url":return this.parseUrlGroup(r);case"math":case"text":return this.parseArgumentGroup(r,t);case"hbox":{const e=this.parseArgumentGroup(r,"text");return null!=e?{type:"styling",mode:e.mode,body:[e],style:"text"}:null}case"raw":{const e=this.parseStringGroup("raw",r);return null!=e?{type:"raw",mode:"text",string:e.text}:null}case"primitive":{if(r)throw new n("A primitive argument cannot be optional");const t=this.parseGroup(e);if(null==t)throw new n("Expected group as "+e,this.fetch());return t}case"original":case null:case void 0:return this.parseArgumentGroup(r);default:throw new n("Unknown group type as "+e,this.fetch())}}consumeSpaces(){for(;" "===this.fetch().text;)this.consume()}parseStringGroup(e,t){const r=this.gullet.scanArgument(t);if(null==r)return null;let n,o="";for(;"EOF"!==(n=this.fetch()).text;)o+=n.text,this.consume();return this.consume(),r.text=o,r}parseRegexGroup(e,t){const r=this.fetch();let o,s=r,i="";for(;"EOF"!==(o=this.fetch()).text&&e.test(i+o.text);)s=o,i+=s.text,this.consume();if(""===i)throw new n("Invalid "+t+": '"+r.text+"'",r);return r.range(s,i)}parseColorGroup(e){const t=this.parseStringGroup("color",e);if(null==t)return null;const r=/^(#[a-f0-9]{3}|#?[a-f0-9]{6}|[a-z]+)$/i.exec(t.text);if(!r)throw new n("Invalid color: '"+t.text+"'",t);let o=r[0];return/^[0-9a-f]{6}$/i.test(o)&&(o="#"+o),{type:"color-token",mode:this.mode,color:o}}parseSizeGroup(e){let t,r=!1;if(this.gullet.consumeSpaces(),t=e||"{"===this.gullet.future().text?this.parseStringGroup("size",e):this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size"),!t)return null;e||0!==t.text.length||(t.text="0pt",r=!0);const o=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t.text);if(!o)throw new n("Invalid size: '"+t.text+"'",t);const s={number:+(o[1]+o[2]),unit:o[3]};if(!V(s))throw new n("Invalid unit: '"+s.unit+"'",t);return{type:"size",mode:this.mode,value:s,isBlank:r}}parseUrlGroup(e){this.gullet.lexer.setCatcode("%",13),this.gullet.lexer.setCatcode("~",12);const t=this.parseStringGroup("url",e);if(this.gullet.lexer.setCatcode("%",14),this.gullet.lexer.setCatcode("~",13),null==t)return null;const r=t.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:r}}parseArgumentGroup(e,t){const r=this.gullet.scanArgument(e);if(null==r)return null;const n=this.mode;t&&this.switchMode(t),this.gullet.beginGroup();const o=this.parseExpression(!1,"EOF");this.expect("EOF"),this.gullet.endGroup();const s={type:"ordgroup",mode:this.mode,loc:r.loc,body:o};return t&&this.switchMode(n),s}parseGroup(e,t){const r=this.fetch(),o=r.text;let s;if("{"===o||"\\begingroup"===o){this.consume();const e="{"===o?"}":"\\endgroup";this.gullet.beginGroup();const t=this.parseExpression(!1,e),n=this.fetch();this.expect(e),this.gullet.endGroup(),s={type:"ordgroup",mode:this.mode,loc:qr.range(r,n),body:t,semisimple:"\\begingroup"===o||void 0}}else if(s=this.parseFunction(t,e)||this.parseSymbol(),null==s&&"\\"===o[0]&&!On.hasOwnProperty(o)){if(this.settings.throwOnError)throw new n("Undefined control sequence: "+o,r);s=this.formatUnsupportedCmd(o),this.consume()}return s}formLigatures(e){let t=e.length-1;for(let r=0;r<t;++r){const n=e[r],o=n.text;"-"===o&&"-"===e[r+1].text&&(r+1<t&&"-"===e[r+2].text?(e.splice(r,3,{type:"textord",mode:"text",loc:qr.range(n,e[r+2]),text:"---"}),t-=2):(e.splice(r,2,{type:"textord",mode:"text",loc:qr.range(n,e[r+1]),text:"--"}),t-=1)),"'"!==o&&"`"!==o||e[r+1].text!==o||(e.splice(r,2,{type:"textord",mode:"text",loc:qr.range(n,e[r+1]),text:o+o}),t-=1)}}parseSymbol(){const e=this.fetch();let t=e.text;if(/^\\verb[^a-zA-Z]/.test(t)){this.consume();let e=t.slice(5);const r="*"===e.charAt(0);if(r&&(e=e.slice(1)),e.length<2||e.charAt(0)!==e.slice(-1))throw new n("\\verb assertion failed --\n                    please report what input caused this bug");return e=e.slice(1,-1),{type:"verb",mode:"text",body:e,star:r}}Pn.hasOwnProperty(t[0])&&!se[this.mode][t[0]]&&(this.settings.strict&&"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+t[0]+'" used in math mode',e),t=Pn[t[0]]+t.slice(1));const r=Mn.exec(t);let o;if(r&&(t=t.substring(0,r.index),"i"===t?t="\u0131":"j"===t&&(t="\u0237")),se[this.mode][t]){this.settings.strict&&"math"===this.mode&&Te.indexOf(t)>=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+t[0]+'" used in math mode',e);const r=se[this.mode][t].group,n=qr.range(e);let s;if(re.hasOwnProperty(r)){const e=r;s={type:"atom",mode:this.mode,family:e,loc:n,text:t}}else s={type:r,mode:this.mode,loc:n,text:t};o=s}else{if(!(t.charCodeAt(0)>=128))return null;this.settings.strict&&(S(t.charCodeAt(0))?"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+t[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+t[0]+'" ('+t.charCodeAt(0)+")",e)),o={type:"textord",mode:"text",loc:qr.range(e),text:t}}if(this.consume(),r)for(let t=0;t<r[0].length;t++){const s=r[0][t];if(!Vn[s])throw new n("Unknown accent ' "+s+"'",e);const i=Vn[s][this.mode]||Vn[s].text;if(!i)throw new n("Accent "+s+" unsupported in "+this.mode+" mode",e);o={type:"accent",mode:this.mode,loc:qr.range(e),label:i,isStretchy:!1,isShifty:!0,base:o}}return o}}Fn.endOfExpression=["}","\\endgroup","\\end","\\right","&"];var Gn=function(e,t){if(!("string"==typeof e||e instanceof String))throw new TypeError("KaTeX can only parse string typed expression");const r=new Fn(e,t);delete r.gullet.macros.current["\\df@tag"];let o=r.parse();if(delete r.gullet.macros.current["\\current@color"],delete r.gullet.macros.current["\\color"],r.gullet.macros.get("\\df@tag")){if(!t.displayMode)throw new n("\\tag works only in display equations");o=[{type:"tag",mode:"text",body:o,tag:r.subparse([new Ir("\\df@tag")])}]}return o};let Un=function(e,t,r){t.textContent="";const n=Xn(e,r).toNode();t.appendChild(n)};"undefined"!=typeof document&&"CSS1Compat"!==document.compatMode&&("undefined"!=typeof console&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."),Un=function(){throw new n("KaTeX doesn't work in quirks mode.")});const Yn=function(e,t,r){if(r.throwOnError||!(e instanceof n))throw e;const o=Pe.makeSpan(["katex-error"],[new K(t)]);return o.setAttribute("title",e.toString()),o.setAttribute("style","color:"+r.errorColor),o},Xn=function(e,t){const r=new m(t);try{const t=Gn(e,r);return Tt(t,e,r)}catch(t){return Yn(t,e,r)}};var Wn={version:"0.16.22",render:Un,renderToString:function(e,t){return Xn(e,t).toMarkup()},ParseError:n,SETTINGS_SCHEMA:h,__parse:function(e,t){const r=new m(t);return Gn(e,r)},__renderToDomTree:Xn,__renderToHTMLTree:function(e,t){const r=new m(t);try{return function(e,t,r){const n=pt(e,zt(r)),o=Pe.makeSpan(["katex"],[n]);return At(o,r)}(Gn(e,r),0,r)}catch(t){return Yn(t,e,r)}},__setFontMetrics:function(e,t){T[e]=t},__defineSymbol:ie,__defineFunction:$e,__defineMacro:Nr,__domTree:{Span:_,Anchor:j,SymbolNode:K,SvgNode:J,PathNode:Q,LineNode:ee}};return t=t.default}()}));
function preloader(){
jQuery('.wpfd-loading').css('background',"transparent url("+wpfdfrontend.pluginurl + "/app/site/assets/images/theme/loadingfile.svg) no-repeat center center");
}
function addLoadEvent(func){
var oldonload=window.onload;
if(typeof window.onload!='function'){
window.onload=func;
}else{
window.onload=function(){
if(oldonload){
oldonload();
}
func();
}}
}
function wpfdSendTrackingEventThenDownload(Action, Label, Url){
"use strict";
var rtn=false;
if(typeof (_gaq)!=="undefined"){
_gaq.push(['_trackEvent', 'WPFD', Action, Label]);
rtn=true;
}
if(typeof (ga)!=="undefined"){
try {
var trackers=window.ga.getAll();
trackers.forEach(function(tracker){
var trackerName=tracker.get('name');
if(trackerName){
ga(trackerName + '.send', 'event', 'WPFD', Action, Label);
}});
} catch (error){
console.log(error);
}
rtn=true;
}
if(typeof (gtag)!=="undefined"){
gtag('event', Action, {
'event_category':'WPFD',
'event_label':Label
});
rtn=true;
}
return rtn;
}
function wpfdTrackDownload(){
if(typeof (wpfdparams)!=="undefined"&&wpfdparams.ga_download_tracking==="1"){
jQuery(document).on('click', 'a.wpfd_downloadlink', function(e){
var href=jQuery(this).attr('href');
var extLink=href.replace(/^https?\:\/\//i, '');
wpfdSendTrackingEventThenDownload('Download', extLink, href);
})
.on('click', 'a.wpfd_previewlink', function(e){
var href=jQuery(this).attr('href');
var extLink=href.replace(/^https?\:\/\//i, '');
wpfdSendTrackingEventThenDownload('Preview', extLink, href);
});
}}
function wpfd_remove_loading(el){
jQuery('.wpfd-loading', el).remove();
}
window.wpfdAjax={};
jQuery(document).ready(function($){
addLoadEvent(preloader);
wpfdTrackDownload();
$(document).on('click', '.wpfd-open-tree', function (e){
var $this=$(this);
var tree=$this.parent().find('.wpfd-foldertree');
if(tree.hasClass('tree-open')){
tree.slideUp(500).removeClass('tree-open');
}else{
tree.slideDown(500).addClass('tree-open');
}});
$(document).on('wpfd:category-loaded', function (e){
var tree2=$('.wpfd-foldertree');
if(tree2.hasClass('tree-open')){
tree2.slideUp(500).removeClass('tree-open');
}});
});
!function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(x){"use strict";var t,e,i,n,W,C,o,s,r,l,a,h,u;function E(t,e,i){return[parseFloat(t[0])*(a.test(t[0])?e/100:1),parseFloat(t[1])*(a.test(t[1])?i/100:1)]}function L(t,e){return parseInt(x.css(t,e),10)||0}function N(t){return null!=t&&t===t.window}x.ui=x.ui||{},x.ui.version="1.13.3",
x.extend(x.expr.pseudos,{data:x.expr.createPseudo?x.expr.createPseudo(function(e){return function(t){return!!x.data(t,e)}}):function(t,e,i){return!!x.data(t,i[3])}}),
x.fn.extend({disableSelection:(t="onselectstart"in document.createElement("div")?"selectstart":"mousedown",function(){return this.on(t+".ui-disableSelection",function(t){t.preventDefault()})}),enableSelection:function(){return this.off(".ui-disableSelection")}}),
x.ui.focusable=function(t,e){var i,n,o,s=t.nodeName.toLowerCase();return"area"===s?(o=(i=t.parentNode).name,!(!t.href||!o||"map"!==i.nodeName.toLowerCase())&&0<(i=x("img[usemap='#"+o+"']")).length&&i.is(":visible")):(/^(input|select|textarea|button|object)$/.test(s)?(n=!t.disabled)&&(o=x(t).closest("fieldset")[0])&&(n=!o.disabled):n="a"===s&&t.href||e,n&&x(t).is(":visible")&&function(t){var e=t.css("visibility");for(;"inherit"===e;)t=t.parent(),e=t.css("visibility");return"visible"===e}(x(t)))},x.extend(x.expr.pseudos,{focusable:function(t){return x.ui.focusable(t,null!=x.attr(t,"tabindex"))}}),x.fn._form=function(){return"string"==typeof this[0].form?this.closest("form"):x(this[0].form)},
x.ui.formResetMixin={_formResetHandler:function(){var e=x(this);setTimeout(function(){var t=e.data("ui-form-reset-instances");x.each(t,function(){this.refresh()})})},_bindFormResetHandler:function(){var t;this.form=this.element._form(),this.form.length&&((t=this.form.data("ui-form-reset-instances")||[]).length||this.form.on("reset.ui-form-reset",this._formResetHandler),t.push(this),this.form.data("ui-form-reset-instances",t))},_unbindFormResetHandler:function(){var t;this.form.length&&((t=this.form.data("ui-form-reset-instances")).splice(x.inArray(this,t),1),t.length?this.form.data("ui-form-reset-instances",t):this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset"))}},x.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),
x.expr.pseudos||(x.expr.pseudos=x.expr[":"]),x.uniqueSort||(x.uniqueSort=x.unique),x.escapeSelector||(e=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,i=function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t},x.escapeSelector=function(t){return(t+"").replace(e,i)}),x.fn.even&&x.fn.odd||x.fn.extend({even:function(){return this.filter(function(t){return t%2==0})},odd:function(){return this.filter(function(t){return t%2==1})}}),
x.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},
x.fn.labels=function(){var t,e,i;return this.length?this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(e=this.eq(0).parents("label"),(t=this.attr("id"))&&(i=(i=this.eq(0).parents().last()).add((i.length?i:this).siblings()),t="label[for='"+x.escapeSelector(t)+"']",e=e.add(i.find(t).addBack(t))),this.pushStack(e)):this.pushStack([])},x.ui.plugin={add:function(t,e,i){var n,o=x.ui[t].prototype;for(n in i)o.plugins[n]=o.plugins[n]||[],o.plugins[n].push([e,i[n]])},call:function(t,e,i,n){var o,s=t.plugins[e];if(s&&(n||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(o=0;o<s.length;o++)t.options[s[o][0]]&&s[o][1].apply(t.element,i)}},
W=Math.max,C=Math.abs,o=/left|center|right/,s=/top|center|bottom/,r=/[\+\-]\d+(\.[\d]+)?%?/,l=/^\w+/,a=/%$/,h=x.fn.position,x.position={scrollbarWidth:function(){var t,e,i;return void 0!==n?n:(i=(e=x("<div style='display:block;position:absolute;width:200px;height:200px;overflow:hidden;'><div style='height:300px;width:auto;'></div></div>")).children()[0],x("body").append(e),t=i.offsetWidth,e.css("overflow","scroll"),t===(i=i.offsetWidth)&&(i=e[0].clientWidth),e.remove(),n=t-i)},getScrollInfo:function(t){var e=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),i=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),e="scroll"===e||"auto"===e&&t.width<t.element[0].scrollWidth;return{width:"scroll"===i||"auto"===i&&t.height<t.element[0].scrollHeight?x.position.scrollbarWidth():0,height:e?x.position.scrollbarWidth():0}},getWithinInfo:function(t){var e=x(t||window),i=N(e[0]),n=!!e[0]&&9===e[0].nodeType;return{element:e,isWindow:i,isDocument:n,offset:!i&&!n?x(t).offset():{left:0,top:0},scrollLeft:e.scrollLeft(),scrollTop:e.scrollTop(),width:e.outerWidth(),height:e.outerHeight()}}},x.fn.position=function(f){var c,d,p,g,m,v,y,w,b,_,t,e;return f&&f.of?(v="string"==typeof(f=x.extend({},f)).of?x(document).find(f.of):x(f.of),y=x.position.getWithinInfo(f.within),w=x.position.getScrollInfo(y),b=(f.collision||"flip").split(" "),_={},e=9===(e=(t=v)[0]).nodeType?{width:t.width(),height:t.height(),offset:{top:0,left:0}}:N(e)?{width:t.width(),height:t.height(),offset:{top:t.scrollTop(),left:t.scrollLeft()}}:e.preventDefault?{width:0,height:0,offset:{top:e.pageY,left:e.pageX}}:{width:t.outerWidth(),height:t.outerHeight(),offset:t.offset()},v[0].preventDefault&&(f.at="left top"),d=e.width,p=e.height,m=x.extend({},g=e.offset),x.each(["my","at"],function(){var t,e,i=(f[this]||"").split(" ");(i=1===i.length?o.test(i[0])?i.concat(["center"]):s.test(i[0])?["center"].concat(i):["center","center"]:i)[0]=o.test(i[0])?i[0]:"center",i[1]=s.test(i[1])?i[1]:"center",t=r.exec(i[0]),e=r.exec(i[1]),_[this]=[t?t[0]:0,e?e[0]:0],f[this]=[l.exec(i[0])[0],l.exec(i[1])[0]]}),1===b.length&&(b[1]=b[0]),"right"===f.at[0]?m.left+=d:"center"===f.at[0]&&(m.left+=d/2),"bottom"===f.at[1]?m.top+=p:"center"===f.at[1]&&(m.top+=p/2),c=E(_.at,d,p),m.left+=c[0],m.top+=c[1],this.each(function(){var i,t,r=x(this),l=r.outerWidth(),a=r.outerHeight(),e=L(this,"marginLeft"),n=L(this,"marginTop"),o=l+e+L(this,"marginRight")+w.width,s=a+n+L(this,"marginBottom")+w.height,h=x.extend({},m),u=E(_.my,r.outerWidth(),r.outerHeight());"right"===f.my[0]?h.left-=l:"center"===f.my[0]&&(h.left-=l/2),"bottom"===f.my[1]?h.top-=a:"center"===f.my[1]&&(h.top-=a/2),h.left+=u[0],h.top+=u[1],i={marginLeft:e,marginTop:n},x.each(["left","top"],function(t,e){x.ui.position[b[t]]&&x.ui.position[b[t]][e](h,{targetWidth:d,targetHeight:p,elemWidth:l,elemHeight:a,collisionPosition:i,collisionWidth:o,collisionHeight:s,offset:[c[0]+u[0],c[1]+u[1]],my:f.my,at:f.at,within:y,elem:r})}),f.using&&(t=function(t){var e=g.left-h.left,i=e+d-l,n=g.top-h.top,o=n+p-a,s={target:{element:v,left:g.left,top:g.top,width:d,height:p},element:{element:r,left:h.left,top:h.top,width:l,height:a},horizontal:i<0?"left":0<e?"right":"center",vertical:o<0?"top":0<n?"bottom":"middle"};d<l&&C(e+i)<d&&(s.horizontal="center"),p<a&&C(n+o)<p&&(s.vertical="middle"),W(C(e),C(i))>W(C(n),C(o))?s.important="horizontal":s.important="vertical",f.using.call(this,t,s)}),r.offset(x.extend(h,{using:t}))})):h.apply(this,arguments)},x.ui.position={fit:{left:function(t,e){var i,n=e.within,o=n.isWindow?n.scrollLeft:n.offset.left,n=n.width,s=t.left-e.collisionPosition.marginLeft,r=o-s,l=s+e.collisionWidth-n-o;n<e.collisionWidth?0<r&&l<=0?(i=t.left+r+e.collisionWidth-n-o,t.left+=r-i):t.left=!(0<l&&r<=0)&&l<r?o+n-e.collisionWidth:o:0<r?t.left+=r:0<l?t.left-=l:t.left=W(t.left-s,t.left)},top:function(t,e){var i,n=e.within,n=n.isWindow?n.scrollTop:n.offset.top,o=e.within.height,s=t.top-e.collisionPosition.marginTop,r=n-s,l=s+e.collisionHeight-o-n;o<e.collisionHeight?0<r&&l<=0?(i=t.top+r+e.collisionHeight-o-n,t.top+=r-i):t.top=!(0<l&&r<=0)&&l<r?n+o-e.collisionHeight:n:0<r?t.top+=r:0<l?t.top-=l:t.top=W(t.top-s,t.top)}},flip:{left:function(t,e){var i=e.within,n=i.offset.left+i.scrollLeft,o=i.width,i=i.isWindow?i.scrollLeft:i.offset.left,s=t.left-e.collisionPosition.marginLeft,r=s-i,s=s+e.collisionWidth-o-i,l="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,a="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,h=-2*e.offset[0];r<0?((o=t.left+l+a+h+e.collisionWidth-o-n)<0||o<C(r))&&(t.left+=l+a+h):0<s&&(0<(n=t.left-e.collisionPosition.marginLeft+l+a+h-i)||C(n)<s)&&(t.left+=l+a+h)},top:function(t,e){var i=e.within,n=i.offset.top+i.scrollTop,o=i.height,i=i.isWindow?i.scrollTop:i.offset.top,s=t.top-e.collisionPosition.marginTop,r=s-i,s=s+e.collisionHeight-o-i,l="top"===e.my[1]?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,a="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,h=-2*e.offset[1];r<0?((o=t.top+l+a+h+e.collisionHeight-o-n)<0||o<C(r))&&(t.top+=l+a+h):0<s&&(0<(n=t.top-e.collisionPosition.marginTop+l+a+h-i)||C(n)<s)&&(t.top+=l+a+h)}},flipfit:{left:function(){x.ui.position.flip.left.apply(this,arguments),x.ui.position.fit.left.apply(this,arguments)},top:function(){x.ui.position.flip.top.apply(this,arguments),x.ui.position.fit.top.apply(this,arguments)}}},x.ui.safeActiveElement=function(e){var i;try{i=e.activeElement}catch(t){i=e.body}return i=(i=i||e.body).nodeName?i:e.body},x.ui.safeBlur=function(t){t&&"body"!==t.nodeName.toLowerCase()&&x(t).trigger("blur")},
x.fn.scrollParent=function(t){var e=this.css("position"),i="absolute"===e,n=t?/(auto|scroll|hidden)/:/(auto|scroll)/,t=this.parents().filter(function(){var t=x(this);return(!i||"static"!==t.css("position"))&&n.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))}).eq(0);return"fixed"!==e&&t.length?t:x(this[0].ownerDocument||document)},
x.extend(x.expr.pseudos,{tabbable:function(t){var e=x.attr(t,"tabindex"),i=null!=e;return(!i||0<=e)&&x.ui.focusable(t,i)}}),
x.fn.extend({uniqueId:(u=0,function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++u)})}),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&x(this).removeAttr("id")})}});
var f,c=0,d=Array.prototype.hasOwnProperty,p=Array.prototype.slice;x.cleanData=(f=x.cleanData,function(t){for(var e,i,n=0;null!=(i=t[n]);n++)(e=x._data(i,"events"))&&e.remove&&x(i).triggerHandler("remove");f(t)}),x.widget=function(t,i,e){var n,o,s,r={},l=t.split(".")[0],a=l+"-"+(t=t.split(".")[1]);return e||(e=i,i=x.Widget),Array.isArray(e)&&(e=x.extend.apply(null,[{}].concat(e))),x.expr.pseudos[a.toLowerCase()]=function(t){return!!x.data(t,a)},x[l]=x[l]||{},n=x[l][t],o=x[l][t]=function(t,e){if(!this||!this._createWidget)return new o(t,e);arguments.length&&this._createWidget(t,e)},x.extend(o,n,{version:e.version,_proto:x.extend({},e),_childConstructors:[]}),(s=new i).options=x.widget.extend({},s.options),x.each(e,function(e,n){function o(){return i.prototype[e].apply(this,arguments)}function s(t){return i.prototype[e].apply(this,t)}r[e]="function"!=typeof n?n:function(){var t,e=this._super,i=this._superApply;return this._super=o,this._superApply=s,t=n.apply(this,arguments),this._super=e,this._superApply=i,t}}),o.prototype=x.widget.extend(s,{widgetEventPrefix:n&&s.widgetEventPrefix||t},r,{constructor:o,namespace:l,widgetName:t,widgetFullName:a}),n?(x.each(n._childConstructors,function(t,e){var i=e.prototype;x.widget(i.namespace+"."+i.widgetName,o,e._proto)}),delete n._childConstructors):i._childConstructors.push(o),x.widget.bridge(t,o),o},x.widget.extend=function(t){for(var e,i,n=p.call(arguments,1),o=0,s=n.length;o<s;o++)for(e in n[o])i=n[o][e],d.call(n[o],e)&&void 0!==i&&(x.isPlainObject(i)?t[e]=x.isPlainObject(t[e])?x.widget.extend({},t[e],i):x.widget.extend({},i):t[e]=i);return t},x.widget.bridge=function(s,e){var r=e.prototype.widgetFullName||s;x.fn[s]=function(i){var t="string"==typeof i,n=p.call(arguments,1),o=this;return t?this.length||"instance"!==i?this.each(function(){var t,e=x.data(this,r);return"instance"===i?(o=e,!1):e?"function"!=typeof e[i]||"_"===i.charAt(0)?x.error("no such method '"+i+"' for "+s+" widget instance"):(t=e[i].apply(e,n))!==e&&void 0!==t?(o=t&&t.jquery?o.pushStack(t.get()):t,!1):void 0:x.error("cannot call methods on "+s+" prior to initialization; attempted to call method '"+i+"'")}):o=void 0:(n.length&&(i=x.widget.extend.apply(null,[i].concat(n))),this.each(function(){var t=x.data(this,r);t?(t.option(i||{}),t._init&&t._init()):x.data(this,r,new e(i,this))})),o}},x.Widget=function(){},x.Widget._childConstructors=[],x.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(t,e){e=x(e||this.defaultElement||this)[0],this.element=x(e),this.uuid=c++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=x(),this.hoverable=x(),this.focusable=x(),this.classesElementLookup={},e!==this&&(x.data(e,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===e&&this.destroy()}}),this.document=x(e.style?e.ownerDocument:e.document||e),this.window=x(this.document[0].defaultView||this.document[0].parentWindow)),this.options=x.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:x.noop,_create:x.noop,_init:x.noop,destroy:function(){var i=this;this._destroy(),x.each(this.classesElementLookup,function(t,e){i._removeClass(e,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:x.noop,widget:function(){return this.element},option:function(t,e){var i,n,o,s=t;if(0===arguments.length)return x.widget.extend({},this.options);if("string"==typeof t)if(s={},t=(i=t.split(".")).shift(),i.length){for(n=s[t]=x.widget.extend({},this.options[t]),o=0;o<i.length-1;o++)n[i[o]]=n[i[o]]||{},n=n[i[o]];if(t=i.pop(),1===arguments.length)return void 0===n[t]?null:n[t];n[t]=e}else{if(1===arguments.length)return void 0===this.options[t]?null:this.options[t];s[t]=e}return this._setOptions(s),this},_setOptions:function(t){for(var e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(t){var e,i,n;for(e in t)n=this.classesElementLookup[e],t[e]!==this.options.classes[e]&&n&&n.length&&(i=x(n.get()),this._removeClass(n,e),i.addClass(this._classes({element:i,keys:e,classes:t,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(o){var s=[],r=this;function t(t,e){for(var i,n=0;n<t.length;n++)i=r.classesElementLookup[t[n]]||x(),i=o.add?(function(){var i=[];o.element.each(function(t,e){x.map(r.classesElementLookup,function(t){return t}).some(function(t){return t.is(e)})||i.push(e)}),r._on(x(i),{remove:"_untrackClassesElement"})}(),x(x.uniqueSort(i.get().concat(o.element.get())))):x(i.not(o.element).get()),r.classesElementLookup[t[n]]=i,s.push(t[n]),e&&o.classes[t[n]]&&s.push(o.classes[t[n]])}return(o=x.extend({element:this.element,classes:this.options.classes||{}},o)).keys&&t(o.keys.match(/\S+/g)||[],!0),o.extra&&t(o.extra.match(/\S+/g)||[]),s.join(" ")},_untrackClassesElement:function(i){var n=this;x.each(n.classesElementLookup,function(t,e){-1!==x.inArray(i.target,e)&&(n.classesElementLookup[t]=x(e.not(i.target).get()))}),this._off(x(i.target))},_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,n){var o="string"==typeof t||null===t,e={extra:o?e:i,keys:o?t:e,element:o?this.element:t,add:n="boolean"==typeof n?n:i};return e.element.toggleClass(this._classes(e),n),this},_on:function(o,s,t){var r,l=this;"boolean"!=typeof o&&(t=s,s=o,o=!1),t?(s=r=x(s),this.bindings=this.bindings.add(s)):(t=s,s=this.element,r=this.widget()),x.each(t,function(t,e){function i(){if(o||!0!==l.options.disabled&&!x(this).hasClass("ui-state-disabled"))return("string"==typeof e?l[e]:e).apply(l,arguments)}"string"!=typeof e&&(i.guid=e.guid=e.guid||i.guid||x.guid++);var t=t.match(/^([\w:-]*)\s*(.*)$/),n=t[1]+l.eventNamespace,t=t[2];t?r.on(n,t,i):s.on(n,i)})},_off:function(t,e){e=(e||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.off(e),this.bindings=x(this.bindings.not(t).get()),this.focusable=x(this.focusable.not(t).get()),this.hoverable=x(this.hoverable.not(t).get())},_delay:function(t,e){var i=this;return setTimeout(function(){return("string"==typeof t?i[t]:t).apply(i,arguments)},e||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){this._addClass(x(t.currentTarget),null,"ui-state-hover")},mouseleave:function(t){this._removeClass(x(t.currentTarget),null,"ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){this._addClass(x(t.currentTarget),null,"ui-state-focus")},focusout:function(t){this._removeClass(x(t.currentTarget),null,"ui-state-focus")}})},_trigger:function(t,e,i){var n,o,s=this.options[t];if(i=i||{},(e=x.Event(e)).type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),e.target=this.element[0],o=e.originalEvent)for(n in o)n in e||(e[n]=o[n]);return this.element.trigger(e,i),!("function"==typeof s&&!1===s.apply(this.element[0],[e].concat(i))||e.isDefaultPrevented())}},x.each({show:"fadeIn",hide:"fadeOut"},function(s,r){x.Widget.prototype["_"+s]=function(e,t,i){var n,o=(t="string"==typeof t?{effect:t}:t)?!0!==t&&"number"!=typeof t&&t.effect||r:s;"number"==typeof(t=t||{})?t={duration:t}:!0===t&&(t={}),n=!x.isEmptyObject(t),t.complete=i,t.delay&&e.delay(t.delay),n&&x.effects&&x.effects.effect[o]?e[s](t):o!==s&&e[o]?e[o](t.duration,t.easing,i):e.queue(function(t){x(this)[s](),i&&i.call(e[0]),t()})}})});
(function(e,t,i){function o(i,o,n){var r=t.createElement(i);return o&&(r.id=Z+o),n&&(r.style.cssText=n),e(r)}function n(){return i.innerHeight?i.innerHeight:e(i).height()}function r(e){var t=k.length,i=(z+e)%t;return 0>i?t+i:i}function h(e,t){return Math.round((/%/.test(e)?("x"===t?E.width():n())/100:1)*parseInt(e,10))}function l(e,t){return e.photo||e.photoRegex.test(t)}function s(e,t){return e.retinaUrl&&i.devicePixelRatio>1?t.replace(e.photoRegex,e.retinaSuffix):t}function a(e){"contains"in g[0]&&!g[0].contains(e.target)&&(e.stopPropagation(),g.focus())}function d(){var t,i=e.data(N,Y);null==i?(B=e.extend({},X),console&&console.log&&console.log("Error: cboxElement missing settings object")):B=e.extend({},i);for(t in B)e.isFunction(B[t])&&"on"!==t.slice(0,2)&&(B[t]=B[t].call(N));B.rel=B.rel||N.rel||e(N).data("rel")||"nofollow",B.href=B.href||e(N).attr("href"),B.title=B.title||N.title,"string"==typeof B.href&&(B.href=e.trim(B.href))}function c(i,o){e(t).trigger(i),lt.triggerHandler(i),e.isFunction(o)&&o.call(N)}function u(i){q||(N=i,d(),k=e(N),z=0,"nofollow"!==B.rel&&(k=e("."+et).filter(function(){var t,i=e.data(this,Y);return i&&(t=e(this).data("rel")||i.rel||this.rel),t===B.rel}),z=k.index(N),-1===z&&(k=k.add(N),z=k.length-1)),w.css({opacity:parseFloat(B.opacity),cursor:B.overlayClose?"pointer":"auto",visibility:"visible"}).show(),J&&g.add(w).removeClass(J),B.className&&g.add(w).addClass(B.className),J=B.className,B.closeButton?K.html(B.close).appendTo(y):K.appendTo("<div/>"),U||(U=$=!0,g.css({visibility:"hidden",display:"block"}),H=o(st,"LoadedContent","width:0; height:0; overflow:hidden"),y.css({width:"",height:""}).append(H),O=x.height()+C.height()+y.outerHeight(!0)-y.height(),_=b.width()+T.width()+y.outerWidth(!0)-y.width(),D=H.outerHeight(!0),A=H.outerWidth(!0),B.w=h(B.initialWidth,"x"),B.h=h(B.initialHeight,"y"),H.css({width:"",height:B.h}),Q.position(),c(tt,B.onOpen),P.add(L).hide(),g.focus(),B.trapFocus&&t.addEventListener&&(t.addEventListener("focus",a,!0),lt.one(rt,function(){t.removeEventListener("focus",a,!0)})),B.returnFocus&&lt.one(rt,function(){e(N).focus()})),m())}function f(){!g&&t.body&&(V=!1,E=e(i),g=o(st).attr({id:Y,"class":e.support.opacity===!1?Z+"IE":"",role:"dialog",tabindex:"-1"}).hide(),w=o(st,"Overlay").hide(),F=e([o(st,"LoadingOverlay")[0],o(st,"LoadingGraphic")[0]]),v=o(st,"Wrapper"),y=o(st,"Content").append(L=o(st,"Title"),S=o(st,"Current"),I=e('<button type="button"/>').attr({id:Z+"Previous"}),R=e('<button type="button"/>').attr({id:Z+"Next"}),M=o("button","Slideshow"),F),K=e('<button type="button"/>').attr({id:Z+"Close"}),v.append(o(st).append(o(st,"TopLeft"),x=o(st,"TopCenter"),o(st,"TopRight")),o(st,!1,"clear:left").append(b=o(st,"MiddleLeft"),y,T=o(st,"MiddleRight")),o(st,!1,"clear:left").append(o(st,"BottomLeft"),C=o(st,"BottomCenter"),o(st,"BottomRight"))).find("div div").css({"float":"left"}),W=o(st,!1,"position:absolute; width:9999px; visibility:hidden; display:none; max-width:none;"),P=R.add(I).add(S).add(M),e(t.body).append(w,g.append(v,W)))}function p(){function i(e){e.which>1||e.shiftKey||e.altKey||e.metaKey||e.ctrlKey||(e.preventDefault(),u(this))}return g?(V||(V=!0,R.click(function(){Q.next()}),I.click(function(){Q.prev()}),K.click(function(){Q.close()}),w.click(function(){B.overlayClose&&Q.close()}),e(t).bind("keydown."+Z,function(e){var t=e.keyCode;U&&B.escKey&&27===t&&(e.preventDefault(),Q.close()),U&&B.arrowKey&&k[1]&&!e.altKey&&(37===t?(e.preventDefault(),I.click()):39===t&&(e.preventDefault(),R.click()))}),e.isFunction(e.fn.on)?e(t).on("click."+Z,"."+et,i):e("."+et).live("click."+Z,i)),!0):!1}function m(){var n,r,a,u=Q.prep,f=++at;$=!0,j=!1,N=k[z],d(),c(ht),c(it,B.onLoad),B.h=B.height?h(B.height,"y")-D-O:B.innerHeight&&h(B.innerHeight,"y"),B.w=B.width?h(B.width,"x")-A-_:B.innerWidth&&h(B.innerWidth,"x"),B.mw=B.w,B.mh=B.h,B.maxWidth&&(B.mw=h(B.maxWidth,"x")-A-_,B.mw=B.w&&B.w<B.mw?B.w:B.mw),B.maxHeight&&(B.mh=h(B.maxHeight,"y")-D-O,B.mh=B.h&&B.h<B.mh?B.h:B.mh),n=B.href,G=setTimeout(function(){F.show()},100),B.inline?(a=o(st).hide().insertBefore(e(n)[0]),lt.one(ht,function(){a.replaceWith(H.children())}),u(e(n))):B.iframe?u(" "):B.html?u(B.html):l(B,n)?(n=s(B,n),j=t.createElement("img"),e(j).addClass(Z+"Photo").bind("error",function(){B.title=!1,u(o(st,"Error").html(B.imgError))}).one("load",function(){var t;f===at&&(e.each(["alt","longdesc","aria-describedby"],function(t,i){var o=e(N).attr(i)||e(N).attr("data-"+i);o&&j.setAttribute(i,o)}),B.retinaImage&&i.devicePixelRatio>1&&(j.height=j.height/i.devicePixelRatio,j.width=j.width/i.devicePixelRatio),B.scalePhotos&&(r=function(){j.height-=j.height*t,j.width-=j.width*t},B.mw&&j.width>B.mw&&(t=(j.width-B.mw)/j.width,r()),B.mh&&j.height>B.mh&&(t=(j.height-B.mh)/j.height,r())),B.h&&(j.style.marginTop=Math.max(B.mh-j.height,0)/2+"px"),k[1]&&(B.loop||k[z+1])&&(j.style.cursor="pointer",j.onclick=function(){Q.next()}),j.style.width=j.width+"px",j.style.height=j.height+"px",setTimeout(function(){u(j)},1))}),setTimeout(function(){j.src=n},1)):n&&W.load(n,B.data,function(t,i){f===at&&u("error"===i?o(st,"Error").html(B.xhrError):e(this).contents())})}var w,g,v,y,x,b,T,C,k,E,H,W,F,L,S,M,R,I,K,P,B,O,_,D,A,N,z,j,U,$,q,G,Q,J,V,X={html:!1,photo:!1,iframe:!1,inline:!1,transition:"elastic",speed:300,fadeOut:300,width:!1,initialWidth:"600",innerWidth:!1,maxWidth:!1,height:!1,initialHeight:"450",innerHeight:!1,maxHeight:!1,scalePhotos:!0,scrolling:!0,href:!1,title:!1,rel:!1,opacity:.9,preloading:!0,className:!1,overlayClose:!0,escKey:!0,arrowKey:!0,top:!1,bottom:!1,left:!1,right:!1,fixed:!1,data:void 0,closeButton:!0,fastIframe:!0,open:!1,reposition:!0,loop:!0,slideshow:!1,slideshowAuto:!0,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",photoRegex:/\.(gif|png|jp(e|g|eg)|bmp|ico|webp)((#|\?).*)?$/i,retinaImage:!1,retinaUrl:!1,retinaSuffix:"@2x.$1",current:"image {current} of {total}",previous:"previous",next:"next",close:"close",xhrError:"This content failed to load.",imgError:"This image failed to load.",returnFocus:!0,trapFocus:!0,onOpen:!1,onLoad:!1,onComplete:!1,onCleanup:!1,onClosed:!1},Y="colorbox",Z="cbox",et=Z+"Element",tt=Z+"_open",it=Z+"_load",ot=Z+"_complete",nt=Z+"_cleanup",rt=Z+"_closed",ht=Z+"_purge",lt=e("<a/>"),st="div",at=0,dt={},ct=function(){function e(){clearTimeout(h)}function t(){(B.loop||k[z+1])&&(e(),h=setTimeout(Q.next,B.slideshowSpeed))}function i(){M.html(B.slideshowStop).unbind(s).one(s,o),lt.bind(ot,t).bind(it,e),g.removeClass(l+"off").addClass(l+"on")}function o(){e(),lt.unbind(ot,t).unbind(it,e),M.html(B.slideshowStart).unbind(s).one(s,function(){Q.next(),i()}),g.removeClass(l+"on").addClass(l+"off")}function n(){r=!1,M.hide(),e(),lt.unbind(ot,t).unbind(it,e),g.removeClass(l+"off "+l+"on")}var r,h,l=Z+"Slideshow_",s="click."+Z;return function(){r?B.slideshow||(lt.unbind(nt,n),n()):B.slideshow&&k[1]&&(r=!0,lt.one(nt,n),B.slideshowAuto?i():o(),M.show())}}();e.colorbox||(e(f),Q=e.fn[Y]=e[Y]=function(t,i){var o=this;if(t=t||{},f(),p()){if(e.isFunction(o))o=e("<a/>"),t.open=!0;else if(!o[0])return o;i&&(t.onComplete=i),o.each(function(){e.data(this,Y,e.extend({},e.data(this,Y)||X,t))}).addClass(et),(e.isFunction(t.open)&&t.open.call(o)||t.open)&&u(o[0])}return o},Q.position=function(t,i){function o(){x[0].style.width=C[0].style.width=y[0].style.width=parseInt(g[0].style.width,10)-_+"px",y[0].style.height=b[0].style.height=T[0].style.height=parseInt(g[0].style.height,10)-O+"px"}var r,l,s,a=0,d=0,c=g.offset();if(E.unbind("resize."+Z),g.css({top:-9e4,left:-9e4}),l=E.scrollTop(),s=E.scrollLeft(),B.fixed?(c.top-=l,c.left-=s,g.css({position:"fixed"})):(a=l,d=s,g.css({position:"absolute"})),d+=B.right!==!1?Math.max(E.width()-B.w-A-_-h(B.right,"x"),0):B.left!==!1?h(B.left,"x"):Math.round(Math.max(E.width()-B.w-A-_,0)/2),a+=B.bottom!==!1?Math.max(n()-B.h-D-O-h(B.bottom,"y"),0):B.top!==!1?h(B.top,"y"):Math.round(Math.max(n()-B.h-D-O,0)/2),g.css({top:c.top,left:c.left,visibility:"visible"}),v[0].style.width=v[0].style.height="9999px",r={width:B.w+A+_,height:B.h+D+O,top:a,left:d},t){var u=0;e.each(r,function(e){return r[e]!==dt[e]?(u=t,void 0):void 0}),t=u}dt=r,t||g.css(r),g.dequeue().animate(r,{duration:t||0,complete:function(){o(),$=!1,v[0].style.width=B.w+A+_+"px",v[0].style.height=B.h+D+O+"px",B.reposition&&setTimeout(function(){E.bind("resize."+Z,Q.position)},1),i&&i()},step:o})},Q.resize=function(e){var t;U&&(e=e||{},e.width&&(B.w=h(e.width,"x")-A-_),e.innerWidth&&(B.w=h(e.innerWidth,"x")),H.css({width:B.w}),e.height&&(B.h=h(e.height,"y")-D-O),e.innerHeight&&(B.h=h(e.innerHeight,"y")),e.innerHeight||e.height||(t=H.scrollTop(),H.css({height:"auto"}),B.h=H.height()),H.css({height:B.h}),t&&H.scrollTop(t),Q.position("none"===B.transition?0:B.speed))},Q.prep=function(i){function n(){return B.w=B.w||H.width(),B.w=B.mw&&B.mw<B.w?B.mw:B.w,B.w}function h(){return B.h=B.h||H.height(),B.h=B.mh&&B.mh<B.h?B.mh:B.h,B.h}if(U){var a,d="none"===B.transition?0:B.speed;H.empty().remove(),H=o(st,"LoadedContent").append(i),H.hide().appendTo(W.show()).css({width:n(),overflow:B.scrolling?"auto":"hidden"}).css({height:h()}).prependTo(y),W.hide(),e(j).css({"float":"none"}),a=function(){function i(){e.support.opacity===!1&&g[0].style.removeAttribute("filter")}var n,h,a=k.length,u="frameBorder",f="allowTransparency";U&&(h=function(){clearTimeout(G),F.hide(),c(ot,B.onComplete)},L.html(B.title).add(H).show(),a>1?("string"==typeof B.current&&S.html(B.current.replace("{current}",z+1).replace("{total}",a)).show(),R[B.loop||a-1>z?"show":"hide"]().html(B.next),I[B.loop||z?"show":"hide"]().html(B.previous),ct(),B.preloading&&e.each([r(-1),r(1)],function(){var i,o,n=k[this],r=e.data(n,Y);r&&r.href?(i=r.href,e.isFunction(i)&&(i=i.call(n))):i=e(n).attr("href"),i&&l(r,i)&&(i=s(r,i),o=t.createElement("img"),o.src=i)})):P.hide(),B.iframe?(n=o("iframe")[0],u in n&&(n[u]=0),f in n&&(n[f]="true"),B.scrolling||(n.scrolling="no"),e(n).attr({src:B.href,name:(new Date).getTime(),"class":Z+"Iframe",allowFullScreen:!0,webkitAllowFullScreen:!0,mozallowfullscreen:!0}).one("load",h).appendTo(H),lt.one(ht,function(){n.src="//about:blank"}),B.fastIframe&&e(n).trigger("load")):h(),"fade"===B.transition?g.fadeTo(d,1,i):i())},"fade"===B.transition?g.fadeTo(d,0,function(){Q.position(0,a)}):Q.position(d,a)}},Q.next=function(){!$&&k[1]&&(B.loop||k[z+1])&&(z=r(1),u(k[z]))},Q.prev=function(){!$&&k[1]&&(B.loop||z)&&(z=r(-1),u(k[z]))},Q.close=function(){U&&!q&&(q=!0,U=!1,c(nt,B.onCleanup),E.unbind("."+Z),w.fadeTo(B.fadeOut||0,0),g.stop().fadeTo(B.fadeOut||0,0,function(){g.add(w).css({opacity:1,cursor:"auto"}).hide(),c(ht),H.empty().remove(),setTimeout(function(){q=!1,c(rt,B.onClosed)},1)}))},Q.remove=function(){g&&(g.stop(),e.colorbox.close(),g.stop().remove(),w.remove(),q=!1,g=null,e("."+et).removeData(Y).removeClass(et),e(t).unbind("click."+Z))},Q.element=function(){return e(N)},Q.settings=X)})(jQuery,document,window);
var wpfdColorboxInit;
var loading;
jQuery(document).ready(function ($){
var videoTypes=['m4a', 'mp4', 'webm', 'ogg', 'ogv', 'flv'];
var audioTypes=['mp3', 'wav', 'wma', 'm4a'];
var imageTypes=['jpg', 'png', 'gif', 'jpeg', 'jpe', 'bmp', 'ico', 'tiff', 'tif', 'svg', 'svgz'];
(wpfdColorboxInit=function (){
$('.wpfdlightbox').each(function (){
var filetype=$(this).data('file-type');
var previewLink=$(this).prop('href');
sW=$(window).width();
sH=$(window).height();
sR=sW / sH;
$(this).unbind('click').click(function (e){
e.preventDefault();
fileid=$(this).data('id');
catid=$(this).data('catid');
downloadLink=wpfdcolorbox.wpfdajaxurl + 'action=wpfd&task=file.download&wpfd_category_id=' + catid + '&wpfd_file_id=' + fileid + '&preview=1';
if($(this).hasClass('wpfd_previewlink')){
var href=jQuery(this).attr('href');
var extLink=href.replace(/^https?\:\/\//i, '');
if(typeof (_gaq)!=='undefined'){
_gaq.push(['_trackEvent', 'WPFD', 'Preview', extLink]);
}else if(typeof (ga)!=="undefined"){
ga('send', 'event', 'WPFD', 'Preview', extLink);
}}
if(typeof fileid=='string'){
while (fileid.indexOf(':') > -1){
fileid=fileid.replace(':', '-');
}}
html='<div class="dropblock">';
html +=' <a href="#" id="wpfd-dropblock-close"><span class="dashicons dashicons-dismiss"></span></a>';
if(audioTypes.indexOf(filetype) > -1){
html +='<audio  class="video-js vjs-default-skin" id="player-' + fileid + '" controls autoplay> ';
html +='<source src="' + downloadLink + '" type="audio/' + filetype + '">';
html +=' <p class="vjs-no-js">Your browser does not support the <code>audio</code> element.</p></audio>';
}else if(imageTypes.indexOf(filetype) > -1){
html +='<img src="' + downloadLink + '" class="video-js vjs-default-skin" id="player-' + fileid + '" /> ';
}else if(videoTypes.indexOf(filetype) > -1){
html +='<video width="1000" height="1000"  class="video-js vjs-default-skin" id="player-' + fileid + '" controls="controls" preload="auto" autoplay="true">';
html +='<p class="vjs-no-js">Your browser does not support the <code>video</code> element.</p>';
html +='<source src="' + downloadLink + '" type="video/'+filetype+'">';
html +='</video>';
}else if(previewLink.includes('file.preview')||previewLink.includes('/previews/')){
html +='<div style="display: block;width: 600px; height: 90vh;overflow-y: auto">';
html +='<img src="' + previewLink + '" class="video-js vjs-default-skin" id="player-' + fileid + '" /> ';
html +='</div>'
}else{
viewlink=$(this).attr('href');
html +='<iframe mozallowfullscreen="true" webkitallowfullscreen="true" allowfullscreen="true" class="cboxIframe"  src="' + viewlink + '" frameborder="0"></iframe>';
}
html +='</div>';
loader=$("#wpfd-box-loading");
if(loader.length===0){
$('body').append('<div id="wpfd-box-loading" style="display: none;"><div class="loading"></div></div>');
loader=$("#wpfd-box-loading");
}
loader.show();
$(document).unbind('click', '#wpfd-box-loading, .wpfd-loading-close').on('click', '#wpfd-box-loading, .wpfd-loading-close', function (){
$("#wpfd-box-loading").remove();
});
var timeout=5000;
loading=setTimeout(function(){
var currentLoading=$('#wpfd-box-loading');
if(currentLoading.length > 0){
$('.wpfd-loading-status', currentLoading).remove();
var status=$('<div class="wpfd-loading-status" style="text-align:center;">' + wpfdcolorboxvars.preview_loading_message + '</div>');
currentLoading.append(status);
}}, timeout);
pBox=$("#wpfd-box-player");
if(pBox.length===0){
$('body').append('<div id="wpfd-box-player" style="display: none;"></div>');
pBox=$("#wpfd-box-player");
}
pBox.hide();
pBox.empty();
pBox.prepend(html);
$('#wpfd-dropblock-close').click(function(e){
e.preventDefault();
pBox.hide();
if($("#player-"+fileid).length){
myPlayer=videojs("player-"+fileid);
myPlayer.dispose();
}});
pBox.click(function (e){
if($(e.target).is('#wpfd-box-player')){
pBox.hide();
if($("#player-" + fileid).length){
myPlayer=videojs("player-" + fileid);
myPlayer.dispose();
}}
$('#wpfd-box-player').unbind('click.box').bind('click.box', function (e){
if($(e.target).is('#wpfd-box-player')){
pBox.hide();
}});
});
if(imageTypes.indexOf(filetype) > -1||previewLink.includes('file.preview')||previewLink.includes('/previews/')){
new_img=new Image();
new_img.onload=function (){
var img_width=this.width,
img_heigth=this.height;
vR=img_width / img_heigth;
if(vR > sR){
new_vW=parseInt(sW * 0.9);
new_vH=parseInt(new_vW / vR);
}else{
new_vH=parseInt(sH * 0.9);
new_vW=parseInt(new_vH * vR);
}
if(new_vW > img_width&&new_vH > img_heigth){
new_vW=img_width;
new_vH=img_heigth;
}
$("#player-" + fileid).css('width', '100%');
$("#player-" + fileid).css('maxHeight', 'unset');
loader.hide(0, function(){
clearTimeout(loading);
});
pBox.show();
}
if(previewLink.includes('file.preview')||previewLink.includes('/previews/')){
new_img.src=previewLink;
}else{
new_img.src=downloadLink;
}}else if(videoTypes.indexOf(filetype) > -1||(audioTypes.indexOf(filetype) > -1)){
videojs("player-" + fileid, {}, function (){
var myPlayer=this;
if(audioTypes.indexOf(filetype) > -1){
new_vW=350;
new_vH=60;
myPlayer.dimensions(new_vW, new_vH);
loader.hide(0, function(){
clearTimeout(loading);
});
pBox.show();
}else{
myPlayer.on('loadedmetadata', function (){
var v=document.getElementById('player-' + fileid + '_html5_api');
vW=v.videoWidth;
vH=v.videoHeight;
vR=vW / vH;
if(vR > sR){
new_vW=parseInt(sW * 0.9);
new_vH=parseInt(new_vW / vR);
}else{
new_vH=parseInt(sH * 0.9);
new_vW=parseInt(new_vH * vR);
}
myPlayer.dimensions(new_vW, new_vH);
loader.hide(0, function(){
clearTimeout(loading);
});
pBox.show();
});
}
myPlayer.on('error', function (){
error=myPlayer.error();
myPlayer.dispose();
pBox.empty();
pBox.prepend('<div class="dropblock">' + error.message + '</div>');
new_vW=300;
new_vH=200;
var dropblock=pBox.find('.dropblock');
dropblock.css('width', new_vW).css('height', new_vH);
loader.hide(0, function(){
clearTimeout(loading);
});
pBox.show();
})
});
}else{
new_vW=sW * 0.9;
new_vH=sH * 0.9;
var dropblock=pBox.find('.dropblock');
dropblock.css('width', new_vW).css('height', new_vH);
$('.dropblock iframe').on('load', function (){
loader.hide(0, function(){
clearTimeout(loading);
});
pBox.show();
})
}});
});
})();
centerDropblock=function (fileid, margin_top, margin_left){
var dropblock=$("#player-" + fileid).parent('.dropblock');
dropblock.css('margin-top', (-margin_top) + 'px');
dropblock.css('margin-left', (-margin_left) + 'px');
dropblock.css('height', '');
dropblock.css('width', '');
dropblock.css('top', '');
dropblock.css('left', '');
}});
jQuery(document).keyup(function (e){
if(e.keyCode==27){
pBox=jQuery("#wpfd-box-player");
if(pBox.length){
pBox.hide();
if(pBox.find(".video-js").length){
var playerId=pBox.find(".video-js").first().attr("id");
myPlayer=videojs(playerId);
myPlayer.dispose();
}}
}});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("global/window"),require("global/document")):"function"==typeof define&&define.amd?define(["global/window","global/document"],e):t.videojs=e(t.window,t.document)}(this,function(v,d){v=v&&v.hasOwnProperty("default")?v.default:v,d=d&&d.hasOwnProperty("default")?d.default:d;var p="7.3.0";function f(t,e){t.prototype=Object.create(e.prototype),(t.prototype.constructor=t).__proto__=e}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function s(t,e,i){return(s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()?Reflect.construct:function(t,e,i){var n=[null];n.push.apply(n,e);var r=new(Function.bind.apply(t,n));return i&&a(r,i.prototype),r}).apply(null,arguments)}function m(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function e(t,e){return e||(e=t.slice(0)),t.raw=e,t}var u=[],t=function(s,o){return function(t,e,i){var n=o.levels[e],r=new RegExp("^("+n+")$");if("log"!==t&&i.unshift(t.toUpperCase()+":"),i.unshift(s+":"),u&&u.push([].concat(i)),v.console){var a=v.console[t];a||"debug"!==t||(a=v.console.info||v.console.log),a&&n&&r.test(t)&&a[Array.isArray(i)?"apply":"call"](v.console,i)}}};var g=function e(i){var n,r="info",a=function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];n("log",r,e)};return n=t(i,a),a.createLogger=function(t){return e(i+": "+t)},a.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:r},a.level=function(t){if("string"==typeof t){if(!a.levels.hasOwnProperty(t))throw new Error('"'+t+'" in not a valid log level');r=t}return r},(a.history=function(){return u?[].concat(u):[]}).filter=function(e){return(u||[]).filter(function(t){return new RegExp(".*"+e+".*").test(t[0])})},a.history.clear=function(){u&&(u.length=0)},a.history.disable=function(){null!==u&&(u.length=0,u=null)},a.history.enable=function(){null===u&&(u=[])},a.error=function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return n("error",r,e)},a.warn=function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return n("warn",r,e)},a.debug=function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return n("debug",r,e)},a}("VIDEOJS"),y=g.createLogger;var _=function(t){for(var e="",i=0;i<arguments.length;i++)e+=t[i].replace(/\n\r?\s*/g,"")+(arguments[i+1]||"");return e},i=Object.prototype.toString,r=function(t){return l(t)?Object.keys(t):[]};function o(e,i){r(e).forEach(function(t){return i(e[t],t)})}function b(i){for(var t=arguments.length,e=new Array(1<t?t-1:0),n=1;n<t;n++)e[n-1]=arguments[n];return Object.assign?Object.assign.apply(Object,[i].concat(e)):(e.forEach(function(t){t&&o(t,function(t,e){i[e]=t})}),i)}function l(t){return!!t&&"object"==typeof t}function c(t){return l(t)&&"[object Object]"===i.call(t)&&t.constructor===Object}function n(t,e){if(!t||!e)return"";if("function"!=typeof v.getComputedStyle)return"";var i=v.getComputedStyle(t);return i?i[e]:""}function h(){var t=e(["Setting attributes in the second argument of createEl()\n                has been deprecated. Use the third argument instead.\n                createEl(type, properties, attributes). Attempting to set "," to ","."]);return h=function(){return t},t}function T(t){return"string"==typeof t&&/\S/.test(t)}function S(t){if(/\s/.test(t))throw new Error("class has illegal whitespace characters")}function k(){return d===v.document}function w(t){return l(t)&&1===t.nodeType}function C(){try{return v.parent!==v.self}catch(t){return!0}}function E(n){return function(t,e){if(!T(t))return d[n](null);T(e)&&(e=d.querySelector(e));var i=w(e)?e:d;return i[n]&&i[n](t)}}function A(t,i,e,n){void 0===t&&(t="div"),void 0===i&&(i={}),void 0===e&&(e={});var r=d.createElement(t);return Object.getOwnPropertyNames(i).forEach(function(t){var e=i[t];-1!==t.indexOf("aria-")||"role"===t||"type"===t?(g.warn(_(h(),t,e)),r.setAttribute(t,e)):"textContent"===t?L(r,e):r[t]=e}),Object.getOwnPropertyNames(e).forEach(function(t){r.setAttribute(t,e[t])}),n&&X(r,n),r}function L(t,e){return"undefined"==typeof t.textContent?t.innerText=e:t.textContent=e,t}function O(t,e){e.firstChild?e.insertBefore(t,e.firstChild):e.appendChild(t)}function P(t,e){return S(e),t.classList?t.classList.contains(e):(i=e,new RegExp("(^|\\s)"+i+"($|\\s)")).test(t.className);var i}function U(t,e){return t.classList?t.classList.add(e):P(t,e)||(t.className=(t.className+" "+e).trim()),t}function x(t,e){return t.classList?t.classList.remove(e):(S(e),t.className=t.className.split(/\s+/).filter(function(t){return t!==e}).join(" ")),t}function I(t,e,i){var n=P(t,e);if("function"==typeof i&&(i=i(t,e)),"boolean"!=typeof i&&(i=!n),i!==n)return i?U(t,e):x(t,e),t}function D(i,n){Object.getOwnPropertyNames(n).forEach(function(t){var e=n[t];null===e||"undefined"==typeof e||!1===e?i.removeAttribute(t):i.setAttribute(t,!0===e?"":e)})}function R(t){var e={},i=",autoplay,controls,playsinline,loop,muted,default,defaultMuted,";if(t&&t.attributes&&0<t.attributes.length)for(var n=t.attributes,r=n.length-1;0<=r;r--){var a=n[r].name,s=n[r].value;"boolean"!=typeof t[a]&&-1===i.indexOf(","+a+",")||(s=null!==s),e[a]=s}return e}function M(t,e){return t.getAttribute(e)}function B(t,e,i){t.setAttribute(e,i)}function N(t,e){t.removeAttribute(e)}function j(){d.body.focus(),d.onselectstart=function(){return!1}}function F(){d.onselectstart=function(){return!0}}function V(t){if(t&&t.getBoundingClientRect&&t.parentNode){var e=t.getBoundingClientRect(),i={};return["bottom","height","left","right","top","width"].forEach(function(t){void 0!==e[t]&&(i[t]=e[t])}),i.height||(i.height=parseFloat(n(t,"height"))),i.width||(i.width=parseFloat(n(t,"width"))),i}}function H(t){var e;if(t.getBoundingClientRect&&t.parentNode&&(e=t.getBoundingClientRect()),!e)return{left:0,top:0};var i=d.documentElement,n=d.body,r=i.clientLeft||n.clientLeft||0,a=v.pageXOffset||n.scrollLeft,s=e.left+a-r,o=i.clientTop||n.clientTop||0,u=v.pageYOffset||n.scrollTop,l=e.top+u-o;return{left:Math.round(s),top:Math.round(l)}}function q(t,e){var i={},n=H(t),r=t.offsetWidth,a=t.offsetHeight,s=n.top,o=n.left,u=e.pageY,l=e.pageX;return e.changedTouches&&(l=e.changedTouches[0].pageX,u=e.changedTouches[0].pageY),i.y=Math.max(0,Math.min(1,(s-u+a)/a)),i.x=Math.max(0,Math.min(1,(l-o)/r)),i}function z(t){return l(t)&&3===t.nodeType}function W(t){for(;t.firstChild;)t.removeChild(t.firstChild);return t}function G(t){return"function"==typeof t&&(t=t()),(Array.isArray(t)?t:[t]).map(function(t){return"function"==typeof t&&(t=t()),w(t)||z(t)?t:"string"==typeof t&&/\S/.test(t)?d.createTextNode(t):void 0}).filter(function(t){return t})}function X(e,t){return G(t).forEach(function(t){return e.appendChild(t)}),e}function Y(t,e){return X(W(t),e)}function $(t){return void 0===t.button&&void 0===t.buttons||(0===t.button&&void 0===t.buttons||0===t.button&&1===t.buttons)}var K=E("querySelector"),Q=E("querySelectorAll"),J=Object.freeze({isReal:k,isEl:w,isInFrame:C,createEl:A,textContent:L,prependTo:O,hasClass:P,addClass:U,removeClass:x,toggleClass:I,setAttributes:D,getAttributes:R,getAttribute:M,setAttribute:B,removeAttribute:N,blockTextSelection:j,unblockTextSelection:F,getBoundingClientRect:V,findPosition:H,getPointerPosition:q,isTextNode:z,emptyEl:W,normalizeContent:G,appendContent:X,insertContent:Y,isSingleLeftClick:$,$:K,$$:Q}),Z=1;function tt(){return Z++}var et={},it="vdata"+(new Date).getTime();function nt(t){var e=t[it];return e||(e=t[it]=tt()),et[e]||(et[e]={}),et[e]}function rt(t){var e=t[it];return!!e&&!!Object.getOwnPropertyNames(et[e]).length}function at(e){var t=e[it];if(t){delete et[t];try{delete e[it]}catch(t){e.removeAttribute?e.removeAttribute(it):e[it]=null}}}function st(t,e){var i=nt(t);0===i.handlers[e].length&&(delete i.handlers[e],t.removeEventListener?t.removeEventListener(e,i.dispatcher,!1):t.detachEvent&&t.detachEvent("on"+e,i.dispatcher)),Object.getOwnPropertyNames(i.handlers).length<=0&&(delete i.handlers,delete i.dispatcher,delete i.disabled),0===Object.getOwnPropertyNames(i).length&&at(t)}function ot(e,i,t,n){t.forEach(function(t){e(i,t,n)})}function ut(t){function e(){return!0}function i(){return!1}if(!t||!t.isPropagationStopped){var n=t||v.event;for(var r in t={},n)"layerX"!==r&&"layerY"!==r&&"keyLocation"!==r&&"webkitMovementX"!==r&&"webkitMovementY"!==r&&("returnValue"===r&&n.preventDefault||(t[r]=n[r]));if(t.target||(t.target=t.srcElement||d),t.relatedTarget||(t.relatedTarget=t.fromElement===t.target?t.toElement:t.fromElement),t.preventDefault=function(){n.preventDefault&&n.preventDefault(),t.returnValue=!1,n.returnValue=!1,t.defaultPrevented=!0},t.defaultPrevented=!1,t.stopPropagation=function(){n.stopPropagation&&n.stopPropagation(),t.cancelBubble=!0,n.cancelBubble=!0,t.isPropagationStopped=e},t.isPropagationStopped=i,t.stopImmediatePropagation=function(){n.stopImmediatePropagation&&n.stopImmediatePropagation(),t.isImmediatePropagationStopped=e,t.stopPropagation()},t.isImmediatePropagationStopped=i,null!==t.clientX&&void 0!==t.clientX){var a=d.documentElement,s=d.body;t.pageX=t.clientX+(a&&a.scrollLeft||s&&s.scrollLeft||0)-(a&&a.clientLeft||s&&s.clientLeft||0),t.pageY=t.clientY+(a&&a.scrollTop||s&&s.scrollTop||0)-(a&&a.clientTop||s&&s.clientTop||0)}t.which=t.charCode||t.keyCode,null!==t.button&&void 0!==t.button&&(t.button=1&t.button?0:4&t.button?1:2&t.button?2:0)}return t}var lt=!1;!function(){try{var t=Object.defineProperty({},"passive",{get:function(){lt=!0}});v.addEventListener("test",null,t),v.removeEventListener("test",null,t)}catch(t){}}();var ct=["touchstart","touchmove"];function ht(s,t,e){if(Array.isArray(t))return ot(ht,s,t,e);var o=nt(s);if(o.handlers||(o.handlers={}),o.handlers[t]||(o.handlers[t]=[]),e.guid||(e.guid=tt()),o.handlers[t].push(e),o.dispatcher||(o.disabled=!1,o.dispatcher=function(t,e){if(!o.disabled){t=ut(t);var i=o.handlers[t.type];if(i)for(var n=i.slice(0),r=0,a=n.length;r<a&&!t.isImmediatePropagationStopped();r++)try{n[r].call(s,t,e)}catch(t){g.error(t)}}}),1===o.handlers[t].length)if(s.addEventListener){var i=!1;lt&&-1<ct.indexOf(t)&&(i={passive:!0}),s.addEventListener(t,o.dispatcher,i)}else s.attachEvent&&s.attachEvent("on"+t,o.dispatcher)}function dt(t,e,i){if(rt(t)){var n=nt(t);if(n.handlers){if(Array.isArray(e))return ot(dt,t,e,i);var r=function(t,e){n.handlers[e]=[],st(t,e)};if(void 0!==e){var a=n.handlers[e];if(a)if(i){if(i.guid)for(var s=0;s<a.length;s++)a[s].guid===i.guid&&a.splice(s--,1);st(t,e)}else r(t,e)}else for(var o in n.handlers)Object.prototype.hasOwnProperty.call(n.handlers||{},o)&&r(t,o)}}}function pt(t,e,i){var n=rt(t)?nt(t):{},r=t.parentNode||t.ownerDocument;if("string"==typeof e?e={type:e,target:t}:e.target||(e.target=t),e=ut(e),n.dispatcher&&n.dispatcher.call(t,e,i),r&&!e.isPropagationStopped()&&!0===e.bubbles)pt.call(null,r,e,i);else if(!r&&!e.defaultPrevented){var a=nt(e.target);e.target[e.type]&&(a.disabled=!0,"function"==typeof e.target[e.type]&&e.target[e.type](),a.disabled=!1)}return!e.defaultPrevented}function ft(e,i,n){if(Array.isArray(i))return ot(ft,e,i,n);var t=function t(){dt(e,i,t),n.apply(this,arguments)};t.guid=n.guid=n.guid||tt(),ht(e,i,t)}var mt,gt=Object.freeze({fixEvent:ut,on:ht,off:dt,trigger:pt,one:ft}),yt=!1,vt=function(){if(k()&&!1!==mt.options.autoSetup){var t=Array.prototype.slice.call(d.getElementsByTagName("video")),e=Array.prototype.slice.call(d.getElementsByTagName("audio")),i=Array.prototype.slice.call(d.getElementsByTagName("video-js")),n=t.concat(e,i);if(n&&0<n.length)for(var r=0,a=n.length;r<a;r++){var s=n[r];if(!s||!s.getAttribute){_t(1);break}void 0===s.player&&null!==s.getAttribute("data-setup")&&mt(s)}else yt||_t(1)}};function _t(t,e){e&&(mt=e),v.setTimeout(vt,t)}k()&&"complete"===d.readyState?yt=!0:ft(v,"load",function(){yt=!0});var bt,Tt=function(t){var e=d.createElement("style");return e.className=t,e},St=function(t,e){t.styleSheet?t.styleSheet.cssText=e:t.textContent=e},kt=function(t,e,i){e.guid||(e.guid=tt());var n=function(){return e.apply(t,arguments)};return n.guid=i?i+"_"+e.guid:e.guid,n},wt=function(e,i){var n=Date.now();return function(){var t=Date.now();i<=t-n&&(e.apply(void 0,arguments),n=t)}},Ct=function(){};Ct.prototype.allowedEvents_={},Ct.prototype.addEventListener=Ct.prototype.on=function(t,e){var i=this.addEventListener;this.addEventListener=function(){},ht(this,t,e),this.addEventListener=i},Ct.prototype.removeEventListener=Ct.prototype.off=function(t,e){dt(this,t,e)},Ct.prototype.one=function(t,e){var i=this.addEventListener;this.addEventListener=function(){},ft(this,t,e),this.addEventListener=i},Ct.prototype.dispatchEvent=Ct.prototype.trigger=function(t){var e=t.type||t;"string"==typeof t&&(t={type:e}),t=ut(t),this.allowedEvents_[e]&&this["on"+e]&&this["on"+e](t),pt(this,t)},Ct.prototype.queueTrigger=function(t){var e=this;bt||(bt=new Map);var i=t.type||t,n=bt.get(this);n||(n=new Map,bt.set(this,n));var r=n.get(i);n.delete(i),v.clearTimeout(r);var a=v.setTimeout(function(){0===n.size&&(n=null,bt.delete(e)),e.trigger(t)},0);n.set(i,a)};var Et=function(e){return e instanceof Ct||!!e.eventBusEl_&&["on","one","off","trigger"].every(function(t){return"function"==typeof e[t]})},At=function(t){return"string"==typeof t&&/\S/.test(t)||Array.isArray(t)&&!!t.length},Lt=function(t){if(!t.nodeName&&!Et(t))throw new Error("Invalid target; must be a DOM node or evented object.")},Ot=function(t){if(!At(t))throw new Error("Invalid event type; must be a non-empty string or array.")},Pt=function(t){if("function"!=typeof t)throw new Error("Invalid listener; must be a function.")},Ut=function(t,e){var i,n,r,a=e.length<3||e[0]===t||e[0]===t.eventBusEl_;return r=a?(i=t.eventBusEl_,3<=e.length&&e.shift(),n=e[0],e[1]):(i=e[0],n=e[1],e[2]),Lt(i),Ot(n),Pt(r),{isTargetingSelf:a,target:i,type:n,listener:r=kt(t,r)}},xt=function(t,e,i,n){Lt(t),t.nodeName?gt[e](t,i,n):t[e](i,n)},It={on:function(){for(var t=this,e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];var r=Ut(this,i),a=r.isTargetingSelf,s=r.target,o=r.type,u=r.listener;if(xt(s,"on",o,u),!a){var l=function(){return t.off(s,o,u)};l.guid=u.guid;var c=function(){return t.off("dispose",l)};c.guid=u.guid,xt(this,"on","dispose",l),xt(s,"on","dispose",c)}},one:function(){for(var r=this,t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];var n=Ut(this,e),a=n.isTargetingSelf,s=n.target,o=n.type,u=n.listener;if(a)xt(s,"one",o,u);else{var l=function t(){r.off(s,o,t);for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];u.apply(null,i)};l.guid=u.guid,xt(s,"one",o,l)}},off:function(t,e,i){if(!t||At(t))dt(this.eventBusEl_,t,e);else{var n=t,r=e;Lt(n),Ot(r),Pt(i),i=kt(this,i),this.off("dispose",i),n.nodeName?(dt(n,r,i),dt(n,"dispose",i)):Et(n)&&(n.off(r,i),n.off("dispose",i))}},trigger:function(t,e){return pt(this.eventBusEl_,t,e)}};function Dt(t,e){void 0===e&&(e={});var i=e.eventBusKey;if(i){if(!t[i].nodeName)throw new Error('The eventBusKey "'+i+'" does not refer to an element.');t.eventBusEl_=t[i]}else t.eventBusEl_=A("span",{className:"vjs-event-bus"});return b(t,It),t.on("dispose",function(){t.off(),v.setTimeout(function(){t.eventBusEl_=null},0)}),t}var Rt={state:{},setState:function(t){var i,n=this;return"function"==typeof t&&(t=t()),o(t,function(t,e){n.state[e]!==t&&((i=i||{})[e]={from:n.state[e],to:t}),n.state[e]=t}),i&&Et(this)&&this.trigger({changes:i,type:"statechanged"}),i}};function Mt(t,e){return b(t,Rt),t.state=b({},t.state,e),"function"==typeof t.handleStateChanged&&Et(t)&&t.on("statechanged",t.handleStateChanged),t}function Bt(t){return"string"!=typeof t?t:t.charAt(0).toUpperCase()+t.slice(1)}function Nt(){for(var i={},t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return e.forEach(function(t){t&&o(t,function(t,e){c(t)?(c(i[e])||(i[e]={}),i[e]=Nt(i[e],t)):i[e]=t})}),i}var jt=function(){function l(t,e,i){if(!t&&this.play?this.player_=t=this:this.player_=t,this.options_=Nt({},this.options_),e=this.options_=Nt(this.options_,e),this.id_=e.id||e.el&&e.el.id,!this.id_){var n=t&&t.id&&t.id()||"no_player";this.id_=n+"_component_"+tt()}this.name_=e.name||null,e.el?this.el_=e.el:!1!==e.createEl&&(this.el_=this.createEl()),!1!==e.evented&&Dt(this,{eventBusKey:this.el_?"el_":null}),Mt(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},!(this.childNameIndex_={})!==e.initChildren&&this.initChildren(),this.ready(i),!1!==e.reportTouchActivity&&this.enableTouchActivity()}var t=l.prototype;return t.dispose=function(){if(this.trigger({type:"dispose",bubbles:!1}),this.children_)for(var t=this.children_.length-1;0<=t;t--)this.children_[t].dispose&&this.children_[t].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.el_&&(this.el_.parentNode&&this.el_.parentNode.removeChild(this.el_),at(this.el_),this.el_=null),this.player_=null},t.player=function(){return this.player_},t.options=function(t){return g.warn("this.options() has been deprecated and will be moved to the constructor in 6.0"),t&&(this.options_=Nt(this.options_,t)),this.options_},t.el=function(){return this.el_},t.createEl=function(t,e,i){return A(t,e,i)},t.localize=function(t,r,e){void 0===e&&(e=t);var i=this.player_.language&&this.player_.language(),n=this.player_.languages&&this.player_.languages(),a=n&&n[i],s=i&&i.split("-")[0],o=n&&n[s],u=e;return a&&a[t]?u=a[t]:o&&o[t]&&(u=o[t]),r&&(u=u.replace(/\{(\d+)\}/g,function(t,e){var i=r[e-1],n=i;return"undefined"==typeof i&&(n=t),n})),u},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(t){return this.childIndex_[t]},t.getChild=function(t){if(t)return t=Bt(t),this.childNameIndex_[t]},t.addChild=function(t,e,i){var n,r;if(void 0===e&&(e={}),void 0===i&&(i=this.children_.length),"string"==typeof t){r=Bt(t);var a=e.componentClass||r;e.name=r;var s=l.getComponent(a);if(!s)throw new Error("Component "+a+" does not exist");if("function"!=typeof s)return null;n=new s(this.player_||this,e)}else n=t;if(this.children_.splice(i,0,n),"function"==typeof n.id&&(this.childIndex_[n.id()]=n),(r=r||n.name&&Bt(n.name()))&&(this.childNameIndex_[r]=n),"function"==typeof n.el&&n.el()){var o=this.contentEl().children[i]||null;this.contentEl().insertBefore(n.el(),o)}return n},t.removeChild=function(t){if("string"==typeof t&&(t=this.getChild(t)),t&&this.children_){for(var e=!1,i=this.children_.length-1;0<=i;i--)if(this.children_[i]===t){e=!0,this.children_.splice(i,1);break}if(e){this.childIndex_[t.id()]=null,this.childNameIndex_[t.name()]=null;var n=t.el();n&&n.parentNode===this.contentEl()&&this.contentEl().removeChild(t.el())}}},t.initChildren=function(){var r=this,n=this.options_.children;if(n){var t,a=this.options_,i=l.getComponent("Tech");(t=Array.isArray(n)?n:Object.keys(n)).concat(Object.keys(this.options_).filter(function(e){return!t.some(function(t){return"string"==typeof t?e===t:e===t.name})})).map(function(t){var e,i;return i="string"==typeof t?n[e=t]||r.options_[e]||{}:(e=t.name,t),{name:e,opts:i}}).filter(function(t){var e=l.getComponent(t.opts.componentClass||Bt(t.name));return e&&!i.isTech(e)}).forEach(function(t){var e=t.name,i=t.opts;if(void 0!==a[e]&&(i=a[e]),!1!==i){!0===i&&(i={}),i.playerOptions=r.options_.playerOptions;var n=r.addChild(e,i);n&&(r[e]=n)}})}},t.buildCSSClass=function(){return""},t.ready=function(t,e){if(void 0===e&&(e=!1),t)return this.isReady_?void(e?t.call(this):this.setTimeout(t,1)):(this.readyQueue_=this.readyQueue_||[],void this.readyQueue_.push(t))},t.triggerReady=function(){this.isReady_=!0,this.setTimeout(function(){var t=this.readyQueue_;this.readyQueue_=[],t&&0<t.length&&t.forEach(function(t){t.call(this)},this),this.trigger("ready")},1)},t.$=function(t,e){return K(t,e||this.contentEl())},t.$$=function(t,e){return Q(t,e||this.contentEl())},t.hasClass=function(t){return P(this.el_,t)},t.addClass=function(t){U(this.el_,t)},t.removeClass=function(t){x(this.el_,t)},t.toggleClass=function(t,e){I(this.el_,t,e)},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(t){return M(this.el_,t)},t.setAttribute=function(t,e){B(this.el_,t,e)},t.removeAttribute=function(t){N(this.el_,t)},t.width=function(t,e){return this.dimension("width",t,e)},t.height=function(t,e){return this.dimension("height",t,e)},t.dimensions=function(t,e){this.width(t,!0),this.height(e)},t.dimension=function(t,e,i){if(void 0!==e)return null!==e&&e==e||(e=0),-1!==(""+e).indexOf("%")||-1!==(""+e).indexOf("px")?this.el_.style[t]=e:this.el_.style[t]="auto"===e?"":e+"px",void(i||this.trigger("componentresize"));if(!this.el_)return 0;var n=this.el_.style[t],r=n.indexOf("px");return-1!==r?parseInt(n.slice(0,r),10):parseInt(this.el_["offset"+Bt(t)],10)},t.currentDimension=function(t){var e=0;if("width"!==t&&"height"!==t)throw new Error("currentDimension only accepts width or height value");if("function"==typeof v.getComputedStyle){var i=v.getComputedStyle(this.el_);e=i.getPropertyValue(t)||i[t]}if(0===(e=parseFloat(e))){var n="offset"+Bt(t);e=this.el_[n]}return e},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.emitTapEvents=function(){var n,e=0,r=null;this.on("touchstart",function(t){1===t.touches.length&&(r={pageX:t.touches[0].pageX,pageY:t.touches[0].pageY},e=(new Date).getTime(),n=!0)}),this.on("touchmove",function(t){if(1<t.touches.length)n=!1;else if(r){var e=t.touches[0].pageX-r.pageX,i=t.touches[0].pageY-r.pageY;10<Math.sqrt(e*e+i*i)&&(n=!1)}});var t=function(){n=!1};this.on("touchleave",t),this.on("touchcancel",t),this.on("touchend",function(t){!(r=null)===n&&((new Date).getTime()-e<200&&(t.preventDefault(),this.trigger("tap")))})},t.enableTouchActivity=function(){if(this.player()&&this.player().reportUserActivity){var e,i=kt(this.player(),this.player().reportUserActivity);this.on("touchstart",function(){i(),this.clearInterval(e),e=this.setInterval(i,250)});var t=function(t){i(),this.clearInterval(e)};this.on("touchmove",i),this.on("touchend",t),this.on("touchcancel",t)}},t.setTimeout=function(t,e){var i,n,r=this;return t=kt(this,t),i=v.setTimeout(function(){r.off("dispose",n),t()},e),(n=function(){return r.clearTimeout(i)}).guid="vjs-timeout-"+i,this.on("dispose",n),i},t.clearTimeout=function(t){v.clearTimeout(t);var e=function(){};return e.guid="vjs-timeout-"+t,this.off("dispose",e),t},t.setInterval=function(t,e){var i=this;t=kt(this,t);var n=v.setInterval(t,e),r=function(){return i.clearInterval(n)};return r.guid="vjs-interval-"+n,this.on("dispose",r),n},t.clearInterval=function(t){v.clearInterval(t);var e=function(){};return e.guid="vjs-interval-"+t,this.off("dispose",e),t},t.requestAnimationFrame=function(t){var e,i,n=this;return this.supportsRaf_?(t=kt(this,t),e=v.requestAnimationFrame(function(){n.off("dispose",i),t()}),(i=function(){return n.cancelAnimationFrame(e)}).guid="vjs-raf-"+e,this.on("dispose",i),e):this.setTimeout(t,1e3/60)},t.cancelAnimationFrame=function(t){if(this.supportsRaf_){v.cancelAnimationFrame(t);var e=function(){};return e.guid="vjs-raf-"+t,this.off("dispose",e),t}return this.clearTimeout(t)},l.registerComponent=function(t,e){if("string"!=typeof t||!t)throw new Error('Illegal component name, "'+t+'"; must be a non-empty string.');var i,n=l.getComponent("Tech"),r=n&&n.isTech(e),a=l===e||l.prototype.isPrototypeOf(e.prototype);if(r||!a)throw i=r?"techs must be registered using Tech.registerTech()":"must be a Component subclass",new Error('Illegal component, "'+t+'"; '+i+".");t=Bt(t),l.components_||(l.components_={});var s=l.getComponent("Player");if("Player"===t&&s&&s.players){var o=s.players,u=Object.keys(o);if(o&&0<u.length&&u.map(function(t){return o[t]}).every(Boolean))throw new Error("Can not register Player component after player has been created.")}return l.components_[t]=e},l.getComponent=function(t){if(t)return t=Bt(t),l.components_&&l.components_[t]?l.components_[t]:void 0},l}();jt.prototype.supportsRaf_="function"==typeof v.requestAnimationFrame&&"function"==typeof v.cancelAnimationFrame,jt.registerComponent("Component",jt);var Ft,Vt,Ht,qt,zt=v.navigator&&v.navigator.userAgent||"",Wt=/AppleWebKit\/([\d.]+)/i.exec(zt),Gt=Wt?parseFloat(Wt.pop()):null,Xt=/iPad/i.test(zt),Yt=/iPhone/i.test(zt)&&!Xt,$t=/iPod/i.test(zt),Kt=Yt||Xt||$t,Qt=(Ft=zt.match(/OS (\d+)_/i))&&Ft[1]?Ft[1]:null,Jt=/Android/i.test(zt),Zt=function(){var t=zt.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!t)return null;var e=t[1]&&parseFloat(t[1]),i=t[2]&&parseFloat(t[2]);return e&&i?parseFloat(t[1]+"."+t[2]):e||null}(),te=Jt&&Zt<5&&Gt<537,ee=/Firefox/i.test(zt),ie=/Edge/i.test(zt),ne=!ie&&(/Chrome/i.test(zt)||/CriOS/i.test(zt)),re=(Vt=zt.match(/(Chrome|CriOS)\/(\d+)/))&&Vt[2]?parseFloat(Vt[2]):null,ae=(Ht=/MSIE\s(\d+)\.\d/.exec(zt),!(qt=Ht&&parseFloat(Ht[1]))&&/Trident\/7.0/i.test(zt)&&/rv:11.0/.test(zt)&&(qt=11),qt),se=/Safari/i.test(zt)&&!ne&&!Jt&&!ie,oe=(se||Kt)&&!ne,ue=k()&&("ontouchstart"in v||v.navigator.maxTouchPoints||v.DocumentTouch&&v.document instanceof v.DocumentTouch),le=Object.freeze({IS_IPAD:Xt,IS_IPHONE:Yt,IS_IPOD:$t,IS_IOS:Kt,IOS_VERSION:Qt,IS_ANDROID:Jt,ANDROID_VERSION:Zt,IS_NATIVE_ANDROID:te,IS_FIREFOX:ee,IS_EDGE:ie,IS_CHROME:ne,CHROME_VERSION:re,IE_VERSION:ae,IS_SAFARI:se,IS_ANY_SAFARI:oe,TOUCH_ENABLED:ue});function ce(t,e,i,n){return function(t,e,i){if("number"!=typeof e||e<0||i<e)throw new Error("Failed to execute '"+t+"' on 'TimeRanges': The index provided ("+e+") is non-numeric or out of bounds (0-"+i+").")}(t,n,i.length-1),i[n][e]}function he(t){return void 0===t||0===t.length?{length:0,start:function(){throw new Error("This TimeRanges object is empty")},end:function(){throw new Error("This TimeRanges object is empty")}}:{length:t.length,start:ce.bind(null,"start",0,t),end:ce.bind(null,"end",1,t)}}function de(t,e){return Array.isArray(t)?he(t):void 0===t||void 0===e?he():he([[t,e]])}function pe(t,e){var i,n,r=0;if(!e)return 0;t&&t.length||(t=de(0,0));for(var a=0;a<t.length;a++)i=t.start(a),e<(n=t.end(a))&&(n=e),r+=n-i;return r/e}for(var fe,me={},ge=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],ye=ge[0],ve=0;ve<ge.length;ve++)if(ge[ve][1]in d){fe=ge[ve];break}if(fe)for(var _e=0;_e<fe.length;_e++)me[ye[_e]]=fe[_e];function be(t){if(t instanceof be)return t;"number"==typeof t?this.code=t:"string"==typeof t?this.message=t:l(t)&&("number"==typeof t.code&&(this.code=t.code),b(this,t)),this.message||(this.message=be.defaultMessages[this.code]||"")}be.prototype.code=0,be.prototype.message="",be.prototype.status=null,be.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],be.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."};for(var Te=0;Te<be.errorTypes.length;Te++)be[be.errorTypes[Te]]=Te,be.prototype[be.errorTypes[Te]]=Te;var Se=function(t,e){var i,n=null;try{i=JSON.parse(t,e)}catch(t){n=t}return[n,i]};function ke(t){return null!=t&&"function"==typeof t.then}function we(t){ke(t)&&t.then(null,function(t){})}var Ce=function(n){return["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce(function(t,e,i){return n[e]&&(t[e]=n[e]),t},{cues:n.cues&&Array.prototype.map.call(n.cues,function(t){return{startTime:t.startTime,endTime:t.endTime,text:t.text,id:t.id}})})},Ee=function(t){var e=t.$$("track"),i=Array.prototype.map.call(e,function(t){return t.track});return Array.prototype.map.call(e,function(t){var e=Ce(t.track);return t.src&&(e.src=t.src),e}).concat(Array.prototype.filter.call(t.textTracks(),function(t){return-1===i.indexOf(t)}).map(Ce))},Ae=function(t,i){return t.forEach(function(t){var e=i.addRemoteTextTrack(t).track;!t.src&&t.cues&&t.cues.forEach(function(t){return e.addCue(t)})}),i.textTracks()},Le="vjs-modal-dialog",Oe=function(n){function t(t,e){var i;return(i=n.call(this,t,e)||this).opened_=i.hasBeenOpened_=i.hasBeenFilled_=!1,i.closeable(!i.options_.uncloseable),i.content(i.options_.content),i.contentEl_=A("div",{className:Le+"-content"},{role:"document"}),i.descEl_=A("p",{className:Le+"-description vjs-control-text",id:i.el().getAttribute("aria-describedby")}),L(i.descEl_,i.description()),i.el_.appendChild(i.descEl_),i.el_.appendChild(i.contentEl_),i}f(t,n);var e=t.prototype;return e.createEl=function(){return n.prototype.createEl.call(this,"div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-describedby":this.id()+"_description","aria-hidden":"true","aria-label":this.label(),role:"dialog"})},e.dispose=function(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,n.prototype.dispose.call(this)},e.buildCSSClass=function(){return Le+" vjs-hidden "+n.prototype.buildCSSClass.call(this)},e.handleKeyPress=function(t){27===t.which&&this.closeable()&&this.close()},e.label=function(){return this.localize(this.options_.label||"Modal Window")},e.description=function(){var t=this.options_.description||this.localize("This is a modal window.");return this.closeable()&&(t+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")),t},e.open=function(){if(!this.opened_){var t=this.player();this.trigger("beforemodalopen"),this.opened_=!0,(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)&&this.fill(),this.wasPlaying_=!t.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&t.pause(),this.closeable()&&this.on(this.el_.ownerDocument,"keydown",kt(this,this.handleKeyPress)),this.hadControls_=t.controls(),t.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.hasBeenOpened_=!0}},e.opened=function(t){return"boolean"==typeof t&&this[t?"open":"close"](),this.opened_},e.close=function(){if(this.opened_){var t=this.player();this.trigger("beforemodalclose"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&t.play(),this.closeable()&&this.off(this.el_.ownerDocument,"keydown",kt(this,this.handleKeyPress)),this.hadControls_&&t.controls(!0),this.hide(),this.el().setAttribute("aria-hidden","true"),this.trigger("modalclose"),this.conditionalBlur_(),this.options_.temporary&&this.dispose()}},e.closeable=function(t){if("boolean"==typeof t){var e=this.closeable_=!!t,i=this.getChild("closeButton");if(e&&!i){var n=this.contentEl_;this.contentEl_=this.el_,i=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.contentEl_=n,this.on(i,"close",this.close)}!e&&i&&(this.off(i,"close",this.close),this.removeChild(i),i.dispose())}return this.closeable_},e.fill=function(){this.fillWith(this.content())},e.fillWith=function(t){var e=this.contentEl(),i=e.parentNode,n=e.nextSibling;this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,i.removeChild(e),this.empty(),Y(e,t),this.trigger("modalfill"),n?i.insertBefore(e,n):i.appendChild(e);var r=this.getChild("closeButton");r&&i.appendChild(r.el_)},e.empty=function(){this.trigger("beforemodalempty"),W(this.contentEl()),this.trigger("modalempty")},e.content=function(t){return"undefined"!=typeof t&&(this.content_=t),this.content_},e.conditionalFocus_=function(){var t=d.activeElement,e=this.player_.el_;this.previouslyActiveEl_=null,(e.contains(t)||e===t)&&(this.previouslyActiveEl_=t,this.focus(),this.on(d,"keydown",this.handleKeyDown))},e.conditionalBlur_=function(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null),this.off(d,"keydown",this.handleKeyDown)},e.handleKeyDown=function(t){if(9===t.which){for(var e,i=this.focusableEls_(),n=this.el_.querySelector(":focus"),r=0;r<i.length;r++)if(n===i[r]){e=r;break}d.activeElement===this.el_&&(e=0),t.shiftKey&&0===e?(i[i.length-1].focus(),t.preventDefault()):t.shiftKey||e!==i.length-1||(i[0].focus(),t.preventDefault())}},e.focusableEls_=function(){var t=this.el_.querySelectorAll("*");return Array.prototype.filter.call(t,function(t){return(t instanceof v.HTMLAnchorElement||t instanceof v.HTMLAreaElement)&&t.hasAttribute("href")||(t instanceof v.HTMLInputElement||t instanceof v.HTMLSelectElement||t instanceof v.HTMLTextAreaElement||t instanceof v.HTMLButtonElement)&&!t.hasAttribute("disabled")||t instanceof v.HTMLIFrameElement||t instanceof v.HTMLObjectElement||t instanceof v.HTMLEmbedElement||t.hasAttribute("tabindex")&&-1!==t.getAttribute("tabindex")||t.hasAttribute("contenteditable")})},t}(jt);Oe.prototype.options_={pauseOnOpen:!0,temporary:!0},jt.registerComponent("ModalDialog",Oe);var Pe=function(n){function t(t){var e;void 0===t&&(t=[]),(e=n.call(this)||this).tracks_=[],Object.defineProperty(m(m(e)),"length",{get:function(){return this.tracks_.length}});for(var i=0;i<t.length;i++)e.addTrack(t[i]);return e}f(t,n);var e=t.prototype;return e.addTrack=function(t){var e=this.tracks_.length;""+e in this||Object.defineProperty(this,e,{get:function(){return this.tracks_[e]}}),-1===this.tracks_.indexOf(t)&&(this.tracks_.push(t),this.trigger({track:t,type:"addtrack"}))},e.removeTrack=function(t){for(var e,i=0,n=this.length;i<n;i++)if(this[i]===t){(e=this[i]).off&&e.off(),this.tracks_.splice(i,1);break}e&&this.trigger({track:e,type:"removetrack"})},e.getTrackById=function(t){for(var e=null,i=0,n=this.length;i<n;i++){var r=this[i];if(r.id===t){e=r;break}}return e},t}(Ct);for(var Ue in Pe.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack"},Pe.prototype.allowedEvents_)Pe.prototype["on"+Ue]=null;var xe=function(t,e){for(var i=0;i<t.length;i++)Object.keys(t[i]).length&&e.id!==t[i].id&&(t[i].enabled=!1)},Ie=function(n){function t(t){var e;void 0===t&&(t=[]);for(var i=t.length-1;0<=i;i--)if(t[i].enabled){xe(t,t[i]);break}return(e=n.call(this,t)||this).changing_=!1,e}return f(t,n),t.prototype.addTrack=function(t){var e=this;t.enabled&&xe(this,t),n.prototype.addTrack.call(this,t),t.addEventListener&&t.addEventListener("enabledchange",function(){e.changing_||(e.changing_=!0,xe(e,t),e.changing_=!1,e.trigger("change"))})},t}(Pe),De=function(t,e){for(var i=0;i<t.length;i++)Object.keys(t[i]).length&&e.id!==t[i].id&&(t[i].selected=!1)},Re=function(n){function t(t){var e;void 0===t&&(t=[]);for(var i=t.length-1;0<=i;i--)if(t[i].selected){De(t,t[i]);break}return(e=n.call(this,t)||this).changing_=!1,Object.defineProperty(m(m(e)),"selectedIndex",{get:function(){for(var t=0;t<this.length;t++)if(this[t].selected)return t;return-1},set:function(){}}),e}return f(t,n),t.prototype.addTrack=function(t){var e=this;t.selected&&De(this,t),n.prototype.addTrack.call(this,t),t.addEventListener&&t.addEventListener("selectedchange",function(){e.changing_||(e.changing_=!0,De(e,t),e.changing_=!1,e.trigger("change"))})},t}(Pe),Me=function(e){function t(){return e.apply(this,arguments)||this}return f(t,e),t.prototype.addTrack=function(t){e.prototype.addTrack.call(this,t),t.addEventListener("modechange",kt(this,function(){this.queueTrigger("change")}));-1===["metadata","chapters"].indexOf(t.kind)&&t.addEventListener("modechange",kt(this,function(){this.trigger("selectedlanguagechange")}))},t}(Pe),Be=function(){function t(t){void 0===t&&(t=[]),this.trackElements_=[],Object.defineProperty(this,"length",{get:function(){return this.trackElements_.length}});for(var e=0,i=t.length;e<i;e++)this.addTrackElement_(t[e])}var e=t.prototype;return e.addTrackElement_=function(t){var e=this.trackElements_.length;""+e in this||Object.defineProperty(this,e,{get:function(){return this.trackElements_[e]}}),-1===this.trackElements_.indexOf(t)&&this.trackElements_.push(t)},e.getTrackElementByTrack_=function(t){for(var e,i=0,n=this.trackElements_.length;i<n;i++)if(t===this.trackElements_[i].track){e=this.trackElements_[i];break}return e},e.removeTrackElement_=function(t){for(var e=0,i=this.trackElements_.length;e<i;e++)if(t===this.trackElements_[e]){this.trackElements_.splice(e,1);break}},t}(),Ne=function(){function e(t){e.prototype.setCues_.call(this,t),Object.defineProperty(this,"length",{get:function(){return this.length_}})}var t=e.prototype;return t.setCues_=function(t){var e=this.length||0,i=0,n=t.length;this.cues_=t,this.length_=t.length;var r=function(t){""+t in this||Object.defineProperty(this,""+t,{get:function(){return this.cues_[t]}})};if(e<n)for(i=e;i<n;i++)r.call(this,i)},t.getCueById=function(t){for(var e=null,i=0,n=this.length;i<n;i++){var r=this[i];if(r.id===t){e=r;break}}return e},e}(),je={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},Fe={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},Ve={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},He={disabled:"disabled",hidden:"hidden",showing:"showing"},qe=function(a){function t(t){var e;void 0===t&&(t={}),e=a.call(this)||this;var i={id:t.id||"vjs_track_"+tt(),kind:t.kind||"",label:t.label||"",language:t.language||""},n=function(t){Object.defineProperty(m(m(e)),t,{get:function(){return i[t]},set:function(){}})};for(var r in i)n(r);return e}return f(t,a),t}(Ct),ze=function(t){var e=["protocol","hostname","port","pathname","search","hash","host"],i=d.createElement("a");i.href=t;var n,r=""===i.host&&"file:"!==i.protocol;r&&((n=d.createElement("div")).innerHTML='<a href="'+t+'"></a>',i=n.firstChild,n.setAttribute("style","display:none; position:absolute;"),d.body.appendChild(n));for(var a={},s=0;s<e.length;s++)a[e[s]]=i[e[s]];return"http:"===a.protocol&&(a.host=a.host.replace(/:80$/,"")),"https:"===a.protocol&&(a.host=a.host.replace(/:443$/,"")),a.protocol||(a.protocol=v.location.protocol),r&&d.body.removeChild(n),a},We=function(t){if(!t.match(/^https?:\/\//)){var e=d.createElement("div");e.innerHTML='<a href="'+t+'">x</a>',t=e.firstChild.href}return t},Ge=function(t){if("string"==typeof t){var e=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/i.exec(t);if(e)return e.pop().toLowerCase()}return""},Xe=function(t){var e=v.location,i=ze(t);return(":"===i.protocol?e.protocol:i.protocol)+i.host!==e.protocol+e.host},Ye=Object.freeze({parseUrl:ze,getAbsoluteURL:We,getFileExtension:Ge,isCrossOrigin:Xe}),$e=function(t){var e=Ke.call(t);return"[object Function]"===e||"function"==typeof t&&"[object RegExp]"!==e||"undefined"!=typeof window&&(t===window.setTimeout||t===window.alert||t===window.confirm||t===window.prompt)},Ke=Object.prototype.toString;"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function Qe(t,e){return t(e={exports:{}},e.exports),e.exports}var Je=Qe(function(t,e){(e=t.exports=function(t){return t.replace(/^\s*|\s*$/g,"")}).left=function(t){return t.replace(/^\s*/,"")},e.right=function(t){return t.replace(/\s*$/,"")}}),Ze=(Je.left,Je.right,Function.prototype.toString),ti=/^\s*class\b/,ei=function(t){try{var e=Ze.call(t);return ti.test(e)}catch(t){return!1}},ii=Object.prototype.toString,ni="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,ri=function(t){if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if("function"==typeof t&&!t.prototype)return!0;if(ni)return function(t){try{return!ei(t)&&(Ze.call(t),!0)}catch(t){return!1}}(t);if(ei(t))return!1;var e=ii.call(t);return"[object Function]"===e||"[object GeneratorFunction]"===e},ai=Object.prototype.toString,si=Object.prototype.hasOwnProperty,oi=function(t,e,i){if(!ri(e))throw new TypeError("iterator must be a function");var n;3<=arguments.length&&(n=i),"[object Array]"===ai.call(t)?function(t,e,i){for(var n=0,r=t.length;n<r;n++)si.call(t,n)&&(null==i?e(t[n],n,t):e.call(i,t[n],n,t))}(t,e,n):"string"==typeof t?function(t,e,i){for(var n=0,r=t.length;n<r;n++)null==i?e(t.charAt(n),n,t):e.call(i,t.charAt(n),n,t)}(t,e,n):function(t,e,i){for(var n in t)si.call(t,n)&&(null==i?e(t[n],n,t):e.call(i,t[n],n,t))}(t,e,n)},ui=function(t){if(!t)return{};var a={};return oi(Je(t).split("\n"),function(t){var e,i=t.indexOf(":"),n=Je(t.slice(0,i)).toLowerCase(),r=Je(t.slice(i+1));"undefined"==typeof a[n]?a[n]=r:(e=a[n],"[object Array]"===Object.prototype.toString.call(e)?a[n].push(r):a[n]=[a[n],r])}),a},li=function(){for(var t={},e=0;e<arguments.length;e++){var i=arguments[e];for(var n in i)ci.call(i,n)&&(t[n]=i[n])}return t},ci=Object.prototype.hasOwnProperty;var hi=pi;function di(t,e,i){var n=t;return $e(e)?(i=e,"string"==typeof t&&(n={uri:t})):n=li(e,{uri:t}),n.callback=i,n}function pi(t,e,i){return fi(e=di(t,e,i))}function fi(n){if("undefined"==typeof n.callback)throw new Error("callback argument missing");var r=!1,a=function(t,e,i){r||(r=!0,n.callback(t,e,i))};function e(t){return clearTimeout(u),t instanceof Error||(t=new Error(""+(t||"Unknown XMLHttpRequest Error"))),t.statusCode=0,a(t,m)}function t(){if(!s){var t;clearTimeout(u),t=n.useXDR&&void 0===o.status?200:1223===o.status?204:o.status;var e=m,i=null;return 0!==t?(e={body:function(){var t=void 0;if(t=o.response?o.response:o.responseText||function(t){if("document"===t.responseType)return t.responseXML;var e=t.responseXML&&"parsererror"===t.responseXML.documentElement.nodeName;return""!==t.responseType||e?null:t.responseXML}(o),f)try{t=JSON.parse(t)}catch(t){}return t}(),statusCode:t,method:c,headers:{},url:l,rawRequest:o},o.getAllResponseHeaders&&(e.headers=ui(o.getAllResponseHeaders()))):i=new Error("Internal XMLHttpRequest Error"),a(i,e,e.body)}}var i,s,o=n.xhr||null;o||(o=n.cors||n.useXDR?new pi.XDomainRequest:new pi.XMLHttpRequest);var u,l=o.url=n.uri||n.url,c=o.method=n.method||"GET",h=n.body||n.data,d=o.headers=n.headers||{},p=!!n.sync,f=!1,m={body:void 0,headers:{},statusCode:0,method:c,url:l,rawRequest:o};if("json"in n&&!1!==n.json&&(f=!0,d.accept||d.Accept||(d.Accept="application/json"),"GET"!==c&&"HEAD"!==c&&(d["content-type"]||d["Content-Type"]||(d["Content-Type"]="application/json"),h=JSON.stringify(!0===n.json?h:n.json))),o.onreadystatechange=function(){4===o.readyState&&setTimeout(t,0)},o.onload=t,o.onerror=e,o.onprogress=function(){},o.onabort=function(){s=!0},o.ontimeout=e,o.open(c,l,!p,n.username,n.password),p||(o.withCredentials=!!n.withCredentials),!p&&0<n.timeout&&(u=setTimeout(function(){if(!s){s=!0,o.abort("timeout");var t=new Error("XMLHttpRequest timeout");t.code="ETIMEDOUT",e(t)}},n.timeout)),o.setRequestHeader)for(i in d)d.hasOwnProperty(i)&&o.setRequestHeader(i,d[i]);else if(n.headers&&!function(t){for(var e in t)if(t.hasOwnProperty(e))return!1;return!0}(n.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in n&&(o.responseType=n.responseType),"beforeSend"in n&&"function"==typeof n.beforeSend&&n.beforeSend(o),o.send(h||null),o}pi.XMLHttpRequest=v.XMLHttpRequest||function(){},pi.XDomainRequest="withCredentials"in new pi.XMLHttpRequest?pi.XMLHttpRequest:v.XDomainRequest,function(t,e){for(var i=0;i<t.length;i++)e(t[i])}(["get","put","post","patch","head","delete"],function(n){pi["delete"===n?"del":n]=function(t,e,i){return(e=di(t,e,i)).method=n.toUpperCase(),fi(e)}});var mi=function(t,e){var i=new v.WebVTT.Parser(v,v.vttjs,v.WebVTT.StringDecoder()),n=[];i.oncue=function(t){e.addCue(t)},i.onparsingerror=function(t){n.push(t)},i.onflush=function(){e.trigger({type:"loadeddata",target:e})},i.parse(t),0<n.length&&(v.console&&v.console.groupCollapsed&&v.console.groupCollapsed("Text Track parsing errors for "+e.src),n.forEach(function(t){return g.error(t)}),v.console&&v.console.groupEnd&&v.console.groupEnd()),i.flush()},gi=function(l){function t(t){var e;if(void 0===t&&(t={}),!t.tech)throw new Error("A tech was not provided.");var i=Nt(t,{kind:Ve[t.kind]||"subtitles",language:t.language||t.srclang||""}),n=He[i.mode]||"disabled",r=i.default;"metadata"!==i.kind&&"chapters"!==i.kind||(n="hidden"),(e=l.call(this,i)||this).tech_=i.tech,e.cues_=[],e.activeCues_=[];var a=new Ne(e.cues_),s=new Ne(e.activeCues_),o=!1,u=kt(m(m(e)),function(){this.activeCues=this.activeCues,o&&(this.trigger("cuechange"),o=!1)});return"disabled"!==n&&e.tech_.ready(function(){e.tech_.on("timeupdate",u)},!0),Object.defineProperties(m(m(e)),{default:{get:function(){return r},set:function(){}},mode:{get:function(){return n},set:function(t){var e=this;He[t]&&("disabled"!==(n=t)?this.tech_.ready(function(){e.tech_.on("timeupdate",u)},!0):this.tech_.off("timeupdate",u),this.trigger("modechange"))}},cues:{get:function(){return this.loaded_?a:null},set:function(){}},activeCues:{get:function(){if(!this.loaded_)return null;if(0===this.cues.length)return s;for(var t=this.tech_.currentTime(),e=[],i=0,n=this.cues.length;i<n;i++){var r=this.cues[i];r.startTime<=t&&r.endTime>=t?e.push(r):r.startTime===r.endTime&&r.startTime<=t&&r.startTime+.5>=t&&e.push(r)}if(o=!1,e.length!==this.activeCues_.length)o=!0;else for(var a=0;a<e.length;a++)-1===this.activeCues_.indexOf(e[a])&&(o=!0);return this.activeCues_=e,s.setCues_(this.activeCues_),s},set:function(){}}}),i.src?(e.src=i.src,function(t,r){var e={uri:t},i=Xe(t);i&&(e.cors=i),hi(e,kt(this,function(t,e,i){if(t)return g.error(t,e);if(r.loaded_=!0,"function"!=typeof v.WebVTT){if(r.tech_){var n=function(){return mi(i,r)};r.tech_.on("vttjsloaded",n),r.tech_.on("vttjserror",function(){g.error("vttjs failed to load, stopping trying to process "+r.src),r.tech_.off("vttjsloaded",n)})}}else mi(i,r)}))}(i.src,m(m(e)))):e.loaded_=!0,e}f(t,l);var e=t.prototype;return e.addCue=function(t){var e=t;if(v.vttjs&&!(t instanceof v.vttjs.VTTCue)){for(var i in e=new v.vttjs.VTTCue(t.startTime,t.endTime,t.text),t)i in e||(e[i]=t[i]);e.id=t.id,e.originalCue_=t}for(var n=this.tech_.textTracks(),r=0;r<n.length;r++)n[r]!==this&&n[r].removeCue(e);this.cues_.push(e),this.cues.setCues_(this.cues_)},e.removeCue=function(t){for(var e=this.cues_.length;e--;){var i=this.cues_[e];if(i===t||i.originalCue_&&i.originalCue_===t){this.cues_.splice(e,1),this.cues.setCues_(this.cues_);break}}},t}(qe);gi.prototype.allowedEvents_={cuechange:"cuechange"};var yi=function(r){function t(t){var e;void 0===t&&(t={});var i=Nt(t,{kind:Fe[t.kind]||""});e=r.call(this,i)||this;var n=!1;return Object.defineProperty(m(m(e)),"enabled",{get:function(){return n},set:function(t){"boolean"==typeof t&&t!==n&&(n=t,this.trigger("enabledchange"))}}),i.enabled&&(e.enabled=i.enabled),e.loaded_=!0,e}return f(t,r),t}(qe),vi=function(r){function t(t){var e;void 0===t&&(t={});var i=Nt(t,{kind:je[t.kind]||""});e=r.call(this,i)||this;var n=!1;return Object.defineProperty(m(m(e)),"selected",{get:function(){return n},set:function(t){"boolean"==typeof t&&t!==n&&(n=t,this.trigger("selectedchange"))}}),i.selected&&(e.selected=i.selected),e}return f(t,r),t}(qe),_i=function(r){function t(t){var e,i;void 0===t&&(t={}),e=r.call(this)||this;var n=new gi(t);return e.kind=n.kind,e.src=n.src,e.srclang=n.language,e.label=n.label,e.default=n.default,Object.defineProperties(m(m(e)),{readyState:{get:function(){return i}},track:{get:function(){return n}}}),i=0,n.addEventListener("loadeddata",function(){i=2,e.trigger({type:"load",target:m(m(e))})}),e}return f(t,r),t}(Ct);_i.prototype.allowedEvents_={load:"load"},_i.NONE=0,_i.LOADING=1,_i.LOADED=2,_i.ERROR=3;var bi={audio:{ListClass:Ie,TrackClass:yi,capitalName:"Audio"},video:{ListClass:Re,TrackClass:vi,capitalName:"Video"},text:{ListClass:Me,TrackClass:gi,capitalName:"Text"}};Object.keys(bi).forEach(function(t){bi[t].getterName=t+"Tracks",bi[t].privateName=t+"Tracks_"});var Ti={remoteText:{ListClass:Me,TrackClass:gi,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:Be,TrackClass:_i,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},Si=Nt(bi,Ti);Ti.names=Object.keys(Ti),bi.names=Object.keys(bi),Si.names=[].concat(Ti.names).concat(bi.names);var ki=Object.create||function(){function e(){}return function(t){if(1!==arguments.length)throw new Error("Object.create shim only accepts one parameter.");return e.prototype=t,new e}}();function wi(t,e){this.name="ParsingError",this.code=t.code,this.message=e||t.message}function Ci(t){function e(t,e,i,n){return 3600*(0|t)+60*(0|e)+(0|i)+(0|n)/1e3}var i=t.match(/^(\d+):(\d{2})(:\d{2})?\.(\d{3})/);return i?i[3]?e(i[1],i[2],i[3].replace(":",""),i[4]):59<i[1]?e(i[1],i[2],0,i[4]):e(0,i[1],i[2],i[4]):null}function Ei(){this.values=ki(null)}function Ai(t,e,i,n){var r=n?t.split(n):[t];for(var a in r)if("string"==typeof r[a]){var s=r[a].split(i);if(2===s.length)e(s[0],s[1])}}function Li(e,t,a){var i,n,s,r=e;function o(){var t=Ci(e);if(null===t)throw new wi(wi.Errors.BadTimeStamp,"Malformed timestamp: "+r);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function u(){e=e.replace(/^\s+/,"")}if(u(),t.startTime=o(),u(),"--\x3e"!==e.substr(0,3))throw new wi(wi.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '--\x3e'): "+r);e=e.substr(3),u(),t.endTime=o(),u(),i=e,n=t,s=new Ei,Ai(i,function(t,e){switch(t){case"region":for(var i=a.length-1;0<=i;i--)if(a[i].id===e){s.set(t,a[i].region);break}break;case"vertical":s.alt(t,e,["rl","lr"]);break;case"line":var n=e.split(","),r=n[0];s.integer(t,r),s.percent(t,r)&&s.set("snapToLines",!1),s.alt(t,r,["auto"]),2===n.length&&s.alt("lineAlign",n[1],["start","middle","end"]);break;case"position":n=e.split(","),s.percent(t,n[0]),2===n.length&&s.alt("positionAlign",n[1],["start","middle","end"]);break;case"size":s.percent(t,e);break;case"align":s.alt(t,e,["start","middle","end","left","right"])}},/:/,/\s/),n.region=s.get("region",null),n.vertical=s.get("vertical",""),n.line=s.get("line","auto"),n.lineAlign=s.get("lineAlign","start"),n.snapToLines=s.get("snapToLines",!0),n.size=s.get("size",100),n.align=s.get("align","middle"),n.position=s.get("position",{start:0,left:0,middle:50,end:100,right:100},n.align),n.positionAlign=s.get("positionAlign",{start:"start",left:"start",middle:"middle",end:"end",right:"end"},n.align)}((wi.prototype=ki(Error.prototype)).constructor=wi).Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}},Ei.prototype={set:function(t,e){this.get(t)||""===e||(this.values[t]=e)},get:function(t,e,i){return i?this.has(t)?this.values[t]:e[i]:this.has(t)?this.values[t]:e},has:function(t){return t in this.values},alt:function(t,e,i){for(var n=0;n<i.length;++n)if(e===i[n]){this.set(t,e);break}},integer:function(t,e){/^-?\d+$/.test(e)&&this.set(t,parseInt(e,10))},percent:function(t,e){return!!(e.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&0<=(e=parseFloat(e))&&e<=100)&&(this.set(t,e),!0)}};var Oi={"&amp;":"&","&lt;":"<","&gt;":">","&lrm;":"‎","&rlm;":"‏","&nbsp;":" "},Pi={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},Ui={v:"title",lang:"lang"},xi={rt:"ruby"};function Ii(a,i){function t(){if(!i)return null;var t,e=i.match(/^([^<]*)(<[^>]*>?)?/);return t=e[1]?e[1]:e[2],i=i.substr(t.length),t}function e(t){return Oi[t]}function n(t){for(;f=t.match(/&(amp|lt|gt|lrm|rlm|nbsp);/);)t=t.replace(f[0],e);return t}function r(t,e){var i=Pi[t];if(!i)return null;var n=a.document.createElement(i);n.localName=i;var r=Ui[t];return r&&e&&(n[r]=e.trim()),n}for(var s,o,u,l=a.document.createElement("div"),c=l,h=[];null!==(s=t());)if("<"!==s[0])c.appendChild(a.document.createTextNode(n(s)));else{if("/"===s[1]){h.length&&h[h.length-1]===s.substr(2).replace(">","")&&(h.pop(),c=c.parentNode);continue}var d,p=Ci(s.substr(1,s.length-2));if(p){d=a.document.createProcessingInstruction("timestamp",p),c.appendChild(d);continue}var f=s.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!f)continue;if(!(d=r(f[1],f[3])))continue;if(o=c,xi[(u=d).localName]&&xi[u.localName]!==o.localName)continue;f[2]&&(d.className=f[2].substr(1).replace("."," ")),h.push(f[1]),c.appendChild(d),c=d}return l}var Di=[[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]];function Ri(t){for(var e=0;e<Di.length;e++){var i=Di[e];if(t>=i[0]&&t<=i[1])return!0}return!1}function Mi(){}function Bi(t,e,i){Mi.call(this),this.cue=e,this.cueDiv=Ii(t,e.text);var n={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:""===e.vertical?"horizontal-tb":"lr"===e.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext"};this.applyStyles(n,this.cueDiv),this.div=t.document.createElement("div"),n={direction:function(t){var e=[],i="";if(!t||!t.childNodes)return"ltr";function r(t,e){for(var i=e.childNodes.length-1;0<=i;i--)t.push(e.childNodes[i])}function a(t){if(!t||!t.length)return null;var e=t.pop(),i=e.textContent||e.innerText;if(i){var n=i.match(/^.*(\n|\r)/);return n?n[t.length=0]:i}return"ruby"===e.tagName?a(t):e.childNodes?(r(t,e),a(t)):void 0}for(r(e,t);i=a(e);)for(var n=0;n<i.length;n++)if(Ri(i.charCodeAt(n)))return"rtl";return"ltr"}(this.cueDiv),writingMode:""===e.vertical?"horizontal-tb":"lr"===e.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext",textAlign:"middle"===e.align?"center":e.align,font:i.font,whiteSpace:"pre-line",position:"absolute"},this.applyStyles(n),this.div.appendChild(this.cueDiv);var r=0;switch(e.positionAlign){case"start":r=e.position;break;case"middle":r=e.position-e.size/2;break;case"end":r=e.position-e.size}""===e.vertical?this.applyStyles({left:this.formatStyle(r,"%"),width:this.formatStyle(e.size,"%")}):this.applyStyles({top:this.formatStyle(r,"%"),height:this.formatStyle(e.size,"%")}),this.move=function(t){this.applyStyles({top:this.formatStyle(t.top,"px"),bottom:this.formatStyle(t.bottom,"px"),left:this.formatStyle(t.left,"px"),right:this.formatStyle(t.right,"px"),height:this.formatStyle(t.height,"px"),width:this.formatStyle(t.width,"px")})}}function Ni(t){var e,i,n,r;if(t.div){i=t.div.offsetHeight,n=t.div.offsetWidth,r=t.div.offsetTop;var a=(a=t.div.childNodes)&&(a=a[0])&&a.getClientRects&&a.getClientRects();t=t.div.getBoundingClientRect(),e=a?Math.max(a[0]&&a[0].height||0,t.height/a.length):0}this.left=t.left,this.right=t.right,this.top=t.top||r,this.height=t.height||i,this.bottom=t.bottom||r+(t.height||i),this.width=t.width||n,this.lineHeight=void 0!==e?e:t.lineHeight}function ji(t,e,o,u){var i=new Ni(e),n=e.cue,r=function(t){if("number"==typeof t.line&&(t.snapToLines||0<=t.line&&t.line<=100))return t.line;if(!t.track||!t.track.textTrackList||!t.track.textTrackList.mediaElement)return-1;for(var e=t.track,i=e.textTrackList,n=0,r=0;r<i.length&&i[r]!==e;r++)"showing"===i[r].mode&&n++;return-1*++n}(n),a=[];if(n.snapToLines){var s;switch(n.vertical){case"":a=["+y","-y"],s="height";break;case"rl":a=["+x","-x"],s="width";break;case"lr":a=["-x","+x"],s="width"}var l=i.lineHeight,c=l*Math.round(r),h=o[s]+l,d=a[0];Math.abs(c)>h&&(c=c<0?-1:1,c*=Math.ceil(h/l)*l),r<0&&(c+=""===n.vertical?o.height:o.width,a=a.reverse()),i.move(d,c)}else{var p=i.lineHeight/o.height*100;switch(n.lineAlign){case"middle":r-=p/2;break;case"end":r-=p}switch(n.vertical){case"":e.applyStyles({top:e.formatStyle(r,"%")});break;case"rl":e.applyStyles({left:e.formatStyle(r,"%")});break;case"lr":e.applyStyles({right:e.formatStyle(r,"%")})}a=["+y","-x","+x","-y"],i=new Ni(e)}var f=function(t,e){for(var i,n=new Ni(t),r=1,a=0;a<e.length;a++){for(;t.overlapsOppositeAxis(o,e[a])||t.within(o)&&t.overlapsAny(u);)t.move(e[a]);if(t.within(o))return t;var s=t.intersectPercentage(o);s<r&&(i=new Ni(t),r=s),t=new Ni(n)}return i||n}(i,a);e.move(f.toCSSCompatValues(o))}function Fi(){}Mi.prototype.applyStyles=function(t,e){for(var i in e=e||this.div,t)t.hasOwnProperty(i)&&(e.style[i]=t[i])},Mi.prototype.formatStyle=function(t,e){return 0===t?0:t+e},(Bi.prototype=ki(Mi.prototype)).constructor=Bi,Ni.prototype.move=function(t,e){switch(e=void 0!==e?e:this.lineHeight,t){case"+x":this.left+=e,this.right+=e;break;case"-x":this.left-=e,this.right-=e;break;case"+y":this.top+=e,this.bottom+=e;break;case"-y":this.top-=e,this.bottom-=e}},Ni.prototype.overlaps=function(t){return this.left<t.right&&this.right>t.left&&this.top<t.bottom&&this.bottom>t.top},Ni.prototype.overlapsAny=function(t){for(var e=0;e<t.length;e++)if(this.overlaps(t[e]))return!0;return!1},Ni.prototype.within=function(t){return this.top>=t.top&&this.bottom<=t.bottom&&this.left>=t.left&&this.right<=t.right},Ni.prototype.overlapsOppositeAxis=function(t,e){switch(e){case"+x":return this.left<t.left;case"-x":return this.right>t.right;case"+y":return this.top<t.top;case"-y":return this.bottom>t.bottom}},Ni.prototype.intersectPercentage=function(t){return Math.max(0,Math.min(this.right,t.right)-Math.max(this.left,t.left))*Math.max(0,Math.min(this.bottom,t.bottom)-Math.max(this.top,t.top))/(this.height*this.width)},Ni.prototype.toCSSCompatValues=function(t){return{top:this.top-t.top,bottom:t.bottom-this.bottom,left:this.left-t.left,right:t.right-this.right,height:this.height,width:this.width}},Ni.getSimpleBoxPosition=function(t){var e=t.div?t.div.offsetHeight:t.tagName?t.offsetHeight:0,i=t.div?t.div.offsetWidth:t.tagName?t.offsetWidth:0,n=t.div?t.div.offsetTop:t.tagName?t.offsetTop:0;return{left:(t=t.div?t.div.getBoundingClientRect():t.tagName?t.getBoundingClientRect():t).left,right:t.right,top:t.top||n,height:t.height||e,bottom:t.bottom||n+(t.height||e),width:t.width||i}},Fi.StringDecoder=function(){return{decode:function(t){if(!t)return"";if("string"!=typeof t)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(t))}}},Fi.convertCueToDOMTree=function(t,e){return t&&e?Ii(t,e):null};Fi.processCues=function(n,r,t){if(!n||!r||!t)return null;for(;t.firstChild;)t.removeChild(t.firstChild);var a=n.document.createElement("div");if(a.style.position="absolute",a.style.left="0",a.style.right="0",a.style.top="0",a.style.bottom="0",a.style.margin="1.5%",t.appendChild(a),function(t){for(var e=0;e<t.length;e++)if(t[e].hasBeenReset||!t[e].displayState)return!0;return!1}(r)){var s=[],o=Ni.getSimpleBoxPosition(a),u={font:Math.round(.05*o.height*100)/100+"px sans-serif"};!function(){for(var t,e,i=0;i<r.length;i++)e=r[i],t=new Bi(n,e,u),a.appendChild(t.div),ji(0,t,o,s),e.displayState=t.div,s.push(Ni.getSimpleBoxPosition(t))}()}else for(var e=0;e<r.length;e++)a.appendChild(r[e].displayState)},(Fi.Parser=function(t,e,i){i||(i=e,e={}),e||(e={}),this.window=t,this.vttjs=e,this.state="INITIAL",this.buffer="",this.decoder=i||new TextDecoder("utf8"),this.regionList=[]}).prototype={reportOrThrowError:function(t){if(!(t instanceof wi))throw t;this.onparsingerror&&this.onparsingerror(t)},parse:function(t){var a=this;function e(){for(var t=a.buffer,e=0;e<t.length&&"\r"!==t[e]&&"\n"!==t[e];)++e;var i=t.substr(0,e);return"\r"===t[e]&&++e,"\n"===t[e]&&++e,a.buffer=t.substr(e),i}function i(t){t.match(/X-TIMESTAMP-MAP/)?Ai(t,function(t,e){switch(t){case"X-TIMESTAMP-MAP":i=e,n=new Ei,Ai(i,function(t,e){switch(t){case"MPEGT":n.integer(t+"S",e);break;case"LOCA":n.set(t+"L",Ci(e))}},/[^\d]:/,/,/),a.ontimestampmap&&a.ontimestampmap({MPEGTS:n.get("MPEGTS"),LOCAL:n.get("LOCAL")})}var i,n},/=/):Ai(t,function(t,e){switch(t){case"Region":!function(t){var r=new Ei;if(Ai(t,function(t,e){switch(t){case"id":r.set(t,e);break;case"width":r.percent(t,e);break;case"lines":r.integer(t,e);break;case"regionanchor":case"viewportanchor":var i=e.split(",");if(2!==i.length)break;var n=new Ei;if(n.percent("x",i[0]),n.percent("y",i[1]),!n.has("x")||!n.has("y"))break;r.set(t+"X",n.get("x")),r.set(t+"Y",n.get("y"));break;case"scroll":r.alt(t,e,["up"])}},/=/,/\s/),r.has("id")){var e=new(a.vttjs.VTTRegion||a.window.VTTRegion);e.width=r.get("width",100),e.lines=r.get("lines",3),e.regionAnchorX=r.get("regionanchorX",0),e.regionAnchorY=r.get("regionanchorY",100),e.viewportAnchorX=r.get("viewportanchorX",0),e.viewportAnchorY=r.get("viewportanchorY",100),e.scroll=r.get("scroll",""),a.onregion&&a.onregion(e),a.regionList.push({id:r.get("id"),region:e})}}(e)}},/:/)}t&&(a.buffer+=a.decoder.decode(t,{stream:!0}));try{var n;if("INITIAL"===a.state){if(!/\r\n|\n/.test(a.buffer))return this;var r=(n=e()).match(/^WEBVTT([ \t].*)?$/);if(!r||!r[0])throw new wi(wi.Errors.BadSignature);a.state="HEADER"}for(var s=!1;a.buffer;){if(!/\r\n|\n/.test(a.buffer))return this;switch(s?s=!1:n=e(),a.state){case"HEADER":/:/.test(n)?i(n):n||(a.state="ID");continue;case"NOTE":n||(a.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(n)){a.state="NOTE";break}if(!n)continue;if(a.cue=new(a.vttjs.VTTCue||a.window.VTTCue)(0,0,""),a.state="CUE",-1===n.indexOf("--\x3e")){a.cue.id=n;continue}case"CUE":try{Li(n,a.cue,a.regionList)}catch(t){a.reportOrThrowError(t),a.cue=null,a.state="BADCUE";continue}a.state="CUETEXT";continue;case"CUETEXT":var o=-1!==n.indexOf("--\x3e");if(!n||o&&(s=!0)){a.oncue&&a.oncue(a.cue),a.cue=null,a.state="ID";continue}a.cue.text&&(a.cue.text+="\n"),a.cue.text+=n;continue;case"BADCUE":n||(a.state="ID");continue}}}catch(t){a.reportOrThrowError(t),"CUETEXT"===a.state&&a.cue&&a.oncue&&a.oncue(a.cue),a.cue=null,a.state="INITIAL"===a.state?"BADWEBVTT":"BADCUE"}return this},flush:function(){var e=this;try{if(e.buffer+=e.decoder.decode(),(e.cue||"HEADER"===e.state)&&(e.buffer+="\n\n",e.parse()),"INITIAL"===e.state)throw new wi(wi.Errors.BadSignature)}catch(t){e.reportOrThrowError(t)}return e.onflush&&e.onflush(),this}};var Vi=Fi,Hi={"":1,lr:1,rl:1},qi={start:1,middle:1,end:1,left:1,right:1};function zi(t){return"string"==typeof t&&(!!qi[t.toLowerCase()]&&t.toLowerCase())}function Wi(t,e,i){this.hasBeenReset=!1;var n="",r=!1,a=t,s=e,o=i,u=null,l="",c=!0,h="auto",d="start",p=50,f="middle",m=50,g="middle";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return n},set:function(t){n=""+t}},pauseOnExit:{enumerable:!0,get:function(){return r},set:function(t){r=!!t}},startTime:{enumerable:!0,get:function(){return a},set:function(t){if("number"!=typeof t)throw new TypeError("Start time must be set to a number.");a=t,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return s},set:function(t){if("number"!=typeof t)throw new TypeError("End time must be set to a number.");s=t,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return o},set:function(t){o=""+t,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return u},set:function(t){u=t,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return l},set:function(t){var e,i="string"==typeof(e=t)&&!!Hi[e.toLowerCase()]&&e.toLowerCase();if(!1===i)throw new SyntaxError("An invalid or illegal string was specified.");l=i,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return c},set:function(t){c=!!t,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return h},set:function(t){if("number"!=typeof t&&"auto"!==t)throw new SyntaxError("An invalid number or illegal string was specified.");h=t,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return d},set:function(t){var e=zi(t);if(!e)throw new SyntaxError("An invalid or illegal string was specified.");d=e,this.hasBeenReset=!0}},position:{enumerable:!0,get:function(){return p},set:function(t){if(t<0||100<t)throw new Error("Position must be between 0 and 100.");p=t,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return f},set:function(t){var e=zi(t);if(!e)throw new SyntaxError("An invalid or illegal string was specified.");f=e,this.hasBeenReset=!0}},size:{enumerable:!0,get:function(){return m},set:function(t){if(t<0||100<t)throw new Error("Size must be between 0 and 100.");m=t,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return g},set:function(t){var e=zi(t);if(!e)throw new SyntaxError("An invalid or illegal string was specified.");g=e,this.hasBeenReset=!0}}}),this.displayState=void 0}Wi.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)};var Gi=Wi,Xi={"":!0,up:!0};function Yi(t){return"number"==typeof t&&0<=t&&t<=100}var $i=function(){var e=100,i=3,n=0,r=100,a=0,s=100,o="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return e},set:function(t){if(!Yi(t))throw new Error("Width must be between 0 and 100.");e=t}},lines:{enumerable:!0,get:function(){return i},set:function(t){if("number"!=typeof t)throw new TypeError("Lines must be set to a number.");i=t}},regionAnchorY:{enumerable:!0,get:function(){return r},set:function(t){if(!Yi(t))throw new Error("RegionAnchorX must be between 0 and 100.");r=t}},regionAnchorX:{enumerable:!0,get:function(){return n},set:function(t){if(!Yi(t))throw new Error("RegionAnchorY must be between 0 and 100.");n=t}},viewportAnchorY:{enumerable:!0,get:function(){return s},set:function(t){if(!Yi(t))throw new Error("ViewportAnchorY must be between 0 and 100.");s=t}},viewportAnchorX:{enumerable:!0,get:function(){return a},set:function(t){if(!Yi(t))throw new Error("ViewportAnchorX must be between 0 and 100.");a=t}},scroll:{enumerable:!0,get:function(){return o},set:function(t){var e,i="string"==typeof(e=t)&&!!Xi[e.toLowerCase()]&&e.toLowerCase();if(!1===i)throw new SyntaxError("An invalid or illegal string was specified.");o=i}}})},Ki=Qe(function(t){var e=t.exports={WebVTT:Vi,VTTCue:Gi,VTTRegion:$i};v.vttjs=e,v.WebVTT=e.WebVTT;var i=e.VTTCue,n=e.VTTRegion,r=v.VTTCue,a=v.VTTRegion;e.shim=function(){v.VTTCue=i,v.VTTRegion=n},e.restore=function(){v.VTTCue=r,v.VTTRegion=a},v.VTTCue||e.shim()});Ki.WebVTT,Ki.VTTCue,Ki.VTTRegion;var Qi=function(e){function i(i,t){var n;return void 0===i&&(i={}),void 0===t&&(t=function(){}),i.reportTouchActivity=!1,(n=e.call(this,null,i,t)||this).hasStarted_=!1,n.on("playing",function(){this.hasStarted_=!0}),n.on("loadstart",function(){this.hasStarted_=!1}),Si.names.forEach(function(t){var e=Si[t];i&&i[e.getterName]&&(n[e.privateName]=i[e.getterName])}),n.featuresProgressEvents||n.manualProgressOn(),n.featuresTimeupdateEvents||n.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach(function(t){!1===i["native"+t+"Tracks"]&&(n["featuresNative"+t+"Tracks"]=!1)}),!1===i.nativeCaptions||!1===i.nativeTextTracks?n.featuresNativeTextTracks=!1:!0!==i.nativeCaptions&&!0!==i.nativeTextTracks||(n.featuresNativeTextTracks=!0),n.featuresNativeTextTracks||n.emulateTextTracks(),n.autoRemoteTextTracks_=new Si.text.ListClass,n.initTrackListeners(),i.nativeControlsForTouch||n.emitTapEvents(),n.constructor&&(n.name_=n.constructor.name||"Unknown Tech"),n}f(i,e);var t=i.prototype;return t.triggerSourceset=function(t){var e=this;this.isReady_||this.one("ready",function(){return e.setTimeout(function(){return e.triggerSourceset(t)},1)}),this.trigger({src:t,type:"sourceset"})},t.manualProgressOn=function(){this.on("durationchange",this.onDurationChange),this.manualProgress=!0,this.one("ready",this.trackProgress)},t.manualProgressOff=function(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange)},t.trackProgress=function(t){this.stopTrackingProgress(),this.progressInterval=this.setInterval(kt(this,function(){var t=this.bufferedPercent();this.bufferedPercent_!==t&&this.trigger("progress"),1===(this.bufferedPercent_=t)&&this.stopTrackingProgress()}),500)},t.onDurationChange=function(t){this.duration_=this.duration()},t.buffered=function(){return de(0,0)},t.bufferedPercent=function(){return pe(this.buffered(),this.duration_)},t.stopTrackingProgress=function(){this.clearInterval(this.progressInterval)},t.manualTimeUpdatesOn=function(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime),this.on("pause",this.stopTrackingCurrentTime)},t.manualTimeUpdatesOff=function(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime),this.off("pause",this.stopTrackingCurrentTime)},t.trackCurrentTime=function(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval(function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},250)},t.stopTrackingCurrentTime=function(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},t.dispose=function(){this.clearTracks(bi.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),e.prototype.dispose.call(this)},t.clearTracks=function(t){var r=this;(t=[].concat(t)).forEach(function(t){for(var e=r[t+"Tracks"]()||[],i=e.length;i--;){var n=e[i];"text"===t&&r.removeRemoteTextTrack(n),e.removeTrack(n)}})},t.cleanupAutoTextTracks=function(){for(var t=this.autoRemoteTextTracks_||[],e=t.length;e--;){var i=t[e];this.removeRemoteTextTrack(i)}},t.reset=function(){},t.error=function(t){return void 0!==t&&(this.error_=new be(t),this.trigger("error")),this.error_},t.played=function(){return this.hasStarted_?de(0,0):de()},t.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},t.initTrackListeners=function(){var r=this;bi.names.forEach(function(t){var e=bi[t],i=function(){r.trigger(t+"trackchange")},n=r[e.getterName]();n.addEventListener("removetrack",i),n.addEventListener("addtrack",i),r.on("dispose",function(){n.removeEventListener("removetrack",i),n.removeEventListener("addtrack",i)})})},t.addWebVttScript_=function(){var t=this;if(!v.WebVTT)if(d.body.contains(this.el())){if(!this.options_["vtt.js"]&&c(Ki)&&0<Object.keys(Ki).length)return void this.trigger("vttjsloaded");var e=d.createElement("script");e.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js",e.onload=function(){t.trigger("vttjsloaded")},e.onerror=function(){t.trigger("vttjserror")},this.on("dispose",function(){e.onload=null,e.onerror=null}),v.WebVTT=!0,this.el().parentNode.appendChild(e)}else this.ready(this.addWebVttScript_)},t.emulateTextTracks=function(){var t=this,i=this.textTracks(),e=this.remoteTextTracks(),n=function(t){return i.addTrack(t.track)},r=function(t){return i.removeTrack(t.track)};e.on("addtrack",n),e.on("removetrack",r),this.addWebVttScript_();var a=function(){return t.trigger("texttrackchange")},s=function(){a();for(var t=0;t<i.length;t++){var e=i[t];e.removeEventListener("cuechange",a),"showing"===e.mode&&e.addEventListener("cuechange",a)}};s(),i.addEventListener("change",s),i.addEventListener("addtrack",s),i.addEventListener("removetrack",s),this.on("dispose",function(){e.off("addtrack",n),e.off("removetrack",r),i.removeEventListener("change",s),i.removeEventListener("addtrack",s),i.removeEventListener("removetrack",s);for(var t=0;t<i.length;t++){i[t].removeEventListener("cuechange",a)}})},t.addTextTrack=function(t,e,i){if(!t)throw new Error("TextTrack kind is required but was not provided");return function(t,e,i,n,r){void 0===r&&(r={});var a=t.textTracks();r.kind=e,i&&(r.label=i),n&&(r.language=n),r.tech=t;var s=new Si.text.TrackClass(r);return a.addTrack(s),s}(this,t,e,i)},t.createRemoteTextTrack=function(t){var e=Nt(t,{tech:this});return new Ti.remoteTextEl.TrackClass(e)},t.addRemoteTextTrack=function(t,e){var i=this;void 0===t&&(t={});var n=this.createRemoteTextTrack(t);return!0!==e&&!1!==e&&(g.warn('Calling addRemoteTextTrack without explicitly setting the "manualCleanup" parameter to `true` is deprecated and default to `false` in future version of video.js'),e=!0),this.remoteTextTrackEls().addTrackElement_(n),this.remoteTextTracks().addTrack(n.track),!0!==e&&this.ready(function(){return i.autoRemoteTextTracks_.addTrack(n.track)}),n},t.removeRemoteTextTrack=function(t){var e=this.remoteTextTrackEls().getTrackElementByTrack_(t);this.remoteTextTrackEls().removeTrackElement_(e),this.remoteTextTracks().removeTrack(t),this.autoRemoteTextTracks_.removeTrack(t)},t.getVideoPlaybackQuality=function(){return{}},t.setPoster=function(){},t.playsinline=function(){},t.setPlaysinline=function(){},t.overrideNativeAudioTracks=function(){},t.overrideNativeVideoTracks=function(){},t.canPlayType=function(){return""},i.canPlayType=function(){return""},i.canPlaySource=function(t,e){return i.canPlayType(t.type)},i.isTech=function(t){return t.prototype instanceof i||t instanceof i||t===i},i.registerTech=function(t,e){if(i.techs_||(i.techs_={}),!i.isTech(e))throw new Error("Tech "+t+" must be a Tech");if(!i.canPlayType)throw new Error("Techs must have a static canPlayType method on them");if(!i.canPlaySource)throw new Error("Techs must have a static canPlaySource method on them");return t=Bt(t),i.techs_[t]=e,"Tech"!==t&&i.defaultTechOrder_.push(t),e},i.getTech=function(t){if(t)return t=Bt(t),i.techs_&&i.techs_[t]?i.techs_[t]:v&&v.videojs&&v.videojs[t]?(g.warn("The "+t+" tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)"),v.videojs[t]):void 0},i}(jt);Si.names.forEach(function(t){var e=Si[t];Qi.prototype[e.getterName]=function(){return this[e.privateName]=this[e.privateName]||new e.ListClass,this[e.privateName]}}),Qi.prototype.featuresVolumeControl=!0,Qi.prototype.featuresMuteControl=!0,Qi.prototype.featuresFullscreenResize=!1,Qi.prototype.featuresPlaybackRate=!1,Qi.prototype.featuresProgressEvents=!1,Qi.prototype.featuresSourceset=!1,Qi.prototype.featuresTimeupdateEvents=!1,Qi.prototype.featuresNativeTextTracks=!1,Qi.withSourceHandlers=function(r){r.registerSourceHandler=function(t,e){var i=r.sourceHandlers;i||(i=r.sourceHandlers=[]),void 0===e&&(e=i.length),i.splice(e,0,t)},r.canPlayType=function(t){for(var e,i=r.sourceHandlers||[],n=0;n<i.length;n++)if(e=i[n].canPlayType(t))return e;return""},r.selectSourceHandler=function(t,e){for(var i=r.sourceHandlers||[],n=0;n<i.length;n++)if(i[n].canHandleSource(t,e))return i[n];return null},r.canPlaySource=function(t,e){var i=r.selectSourceHandler(t,e);return i?i.canHandleSource(t,e):""};["seekable","seeking","duration"].forEach(function(t){var e=this[t];"function"==typeof e&&(this[t]=function(){return this.sourceHandler_&&this.sourceHandler_[t]?this.sourceHandler_[t].apply(this.sourceHandler_,arguments):e.apply(this,arguments)})},r.prototype),r.prototype.setSource=function(t){var e=r.selectSourceHandler(t,this.options_);e||(r.nativeSourceHandler?e=r.nativeSourceHandler:g.error("No source handler found for the current source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler),e!==r.nativeSourceHandler&&(this.currentSource_=t),this.sourceHandler_=e.handleSource(t,this,this.options_),this.on("dispose",this.disposeSourceHandler)},r.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)}},jt.registerComponent("Tech",Qi),Qi.registerTech("Tech",Qi),Qi.defaultTechOrder_=[];var Ji={},Zi={},tn={};function en(t,e,i){t.setTimeout(function(){return function i(n,t,r,a,s,o){void 0===n&&(n={});void 0===t&&(t=[]);void 0===s&&(s=[]);void 0===o&&(o=!1);var e=t,u=e[0],l=e.slice(1);if("string"==typeof u)i(n,Ji[u],r,a,s,o);else if(u){var c=un(a,u);if(!c.setSource)return s.push(c),i(n,l,r,a,s,o);c.setSource(b({},n),function(t,e){if(t)return i(n,l,r,a,s,o);s.push(c),i(e,n.type===e.type?l:Ji[e.type],r,a,s,o)})}else l.length?i(n,l,r,a,s,o):o?r(n,s):i(n,Ji["*"],r,a,s,!0)}(e,Ji[e.type],i,t)},1)}function nn(t,e,i,n){void 0===n&&(n=null);var r="call"+Bt(i),a=t.reduce(on(r),n),s=a===tn,o=s?null:e[i](a);return function(t,e,i,n){for(var r=t.length-1;0<=r;r--){var a=t[r];a[e]&&a[e](n,i)}}(t,i,o,s),o}var rn={buffered:1,currentTime:1,duration:1,seekable:1,played:1,paused:1},an={setCurrentTime:1},sn={play:1,pause:1};function on(i){return function(t,e){return t===tn?tn:e[i]?e[i](t):t}}function un(t,e){var i=Zi[t.id()],n=null;if(null==i)return n=e(t),Zi[t.id()]=[[e,n]],n;for(var r=0;r<i.length;r++){var a=i[r],s=a[0],o=a[1];s===e&&(n=o)}return null===n&&(n=e(t),i.push([e,n])),n}var ln={opus:"video/ogg",ogv:"video/ogg",mp4:"video/mp4",mov:"video/mp4",m4v:"video/mp4",mkv:"video/x-matroska",mp3:"audio/mpeg",aac:"audio/aac",oga:"audio/ogg",m3u8:"application/x-mpegURL"},cn=function(t){void 0===t&&(t="");var e=Ge(t);return ln[e.toLowerCase()]||""};function hn(t){var e=cn(t.src);return!t.type&&e&&(t.type=e),t}var dn=function(l){function t(t,e,i){var n,r=Nt({createEl:!1},e);if(n=l.call(this,t,r,i)||this,e.playerOptions.sources&&0!==e.playerOptions.sources.length)t.src(e.playerOptions.sources);else for(var a=0,s=e.playerOptions.techOrder;a<s.length;a++){var o=Bt(s[a]),u=Qi.getTech(o);if(o||(u=jt.getComponent(o)),u&&u.isSupported()){t.loadTech_(o);break}}return n}return f(t,l),t}(jt);jt.registerComponent("MediaLoader",dn);var pn=function(r){function t(t,e){var i;return(i=r.call(this,t,e)||this).emitTapEvents(),i.enable(),i}f(t,r);var e=t.prototype;return e.createEl=function(t,e,i){void 0===t&&(t="div"),void 0===e&&(e={}),void 0===i&&(i={}),e=b({innerHTML:'<span aria-hidden="true" class="vjs-icon-placeholder"></span>',className:this.buildCSSClass(),tabIndex:0},e),"button"===t&&g.error("Creating a ClickableComponent with an HTML element of "+t+" is not supported; use a Button instead."),i=b({role:"button"},i),this.tabIndex_=e.tabIndex;var n=r.prototype.createEl.call(this,t,e,i);return this.createControlTextEl(n),n},e.dispose=function(){this.controlTextEl_=null,r.prototype.dispose.call(this)},e.createControlTextEl=function(t){return this.controlTextEl_=A("span",{className:"vjs-control-text"},{"aria-live":"polite"}),t&&t.appendChild(this.controlTextEl_),this.controlText(this.controlText_,t),this.controlTextEl_},e.controlText=function(t,e){if(void 0===e&&(e=this.el()),void 0===t)return this.controlText_||"Need Text";var i=this.localize(t);this.controlText_=t,L(this.controlTextEl_,i),this.nonIconControl||e.setAttribute("title",i)},e.buildCSSClass=function(){return"vjs-control vjs-button "+r.prototype.buildCSSClass.call(this)},e.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("focus",this.handleFocus),this.on("blur",this.handleBlur))},e.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(["tap","click"],this.handleClick),this.off("focus",this.handleFocus),this.off("blur",this.handleBlur)},e.handleClick=function(t){},e.handleFocus=function(t){ht(d,"keydown",kt(this,this.handleKeyPress))},e.handleKeyPress=function(t){32===t.which||13===t.which?(t.preventDefault(),this.trigger("click")):r.prototype.handleKeyPress&&r.prototype.handleKeyPress.call(this,t)},e.handleBlur=function(t){dt(d,"keydown",kt(this,this.handleKeyPress))},t}(jt);jt.registerComponent("ClickableComponent",pn);var fn=function(n){function t(t,e){var i;return(i=n.call(this,t,e)||this).update(),t.on("posterchange",kt(m(m(i)),i.update)),i}f(t,n);var e=t.prototype;return e.dispose=function(){this.player().off("posterchange",this.update),n.prototype.dispose.call(this)},e.createEl=function(){return A("div",{className:"vjs-poster",tabIndex:-1})},e.update=function(t){var e=this.player().poster();this.setSrc(e),e?this.show():this.hide()},e.setSrc=function(t){var e="";t&&(e='url("'+t+'")'),this.el_.style.backgroundImage=e},e.handleClick=function(t){this.player_.controls()&&(this.player_.paused()?we(this.player_.play()):this.player_.pause())},t}(pn);jt.registerComponent("PosterImage",fn);var mn="#222",gn={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'};function yn(t,e){var i;if(4===t.length)i=t[1]+t[1]+t[2]+t[2]+t[3]+t[3];else{if(7!==t.length)throw new Error("Invalid color code provided, "+t+"; must be formatted as e.g. #f0e or #f604e2.");i=t.slice(1)}return"rgba("+parseInt(i.slice(0,2),16)+","+parseInt(i.slice(2,4),16)+","+parseInt(i.slice(4,6),16)+","+e+")"}function vn(t,e,i){try{t.style[e]=i}catch(t){return}}var _n=function(a){function t(i,t,e){var n;n=a.call(this,i,t,e)||this;var r=kt(m(m(n)),n.updateDisplay);return i.on("loadstart",kt(m(m(n)),n.toggleDisplay)),i.on("texttrackchange",r),i.on("loadstart",kt(m(m(n)),n.preselectTrack)),i.ready(kt(m(m(n)),function(){if(i.tech_&&i.tech_.featuresNativeTextTracks)this.hide();else{i.on("fullscreenchange",r),i.on("playerresize",r),v.addEventListener("orientationchange",r),i.on("dispose",function(){return v.removeEventListener("orientationchange",r)});for(var t=this.options_.playerOptions.tracks||[],e=0;e<t.length;e++)this.player_.addRemoteTextTrack(t[e],!0);this.preselectTrack()}})),n}f(t,a);var e=t.prototype;return e.preselectTrack=function(){for(var t,e,i,n={captions:1,subtitles:1},r=this.player_.textTracks(),a=this.player_.cache_.selectedLanguage,s=0;s<r.length;s++){var o=r[s];a&&a.enabled&&a.language===o.language?o.kind===a.kind?i=o:i||(i=o):a&&!a.enabled?e=t=i=null:o.default&&("descriptions"!==o.kind||t?o.kind in n&&!e&&(e=o):t=o)}i?i.mode="showing":e?e.mode="showing":t&&(t.mode="showing")},e.toggleDisplay=function(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()},e.createEl=function(){return a.prototype.createEl.call(this,"div",{className:"vjs-text-track-display"},{"aria-live":"off","aria-atomic":"true"})},e.clearDisplay=function(){"function"==typeof v.WebVTT&&v.WebVTT.processCues(v,[],this.el_)},e.updateDisplay=function(){var t=this.player_.textTracks();this.clearDisplay();for(var e=null,i=null,n=t.length;n--;){var r=t[n];"showing"===r.mode&&("descriptions"===r.kind?e=r:i=r)}i?("off"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","off"),this.updateForTrack(i)):e&&("assertive"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","assertive"),this.updateForTrack(e))},e.updateForTrack=function(t){if("function"==typeof v.WebVTT&&t.activeCues){for(var e=[],i=0;i<t.activeCues.length;i++)e.push(t.activeCues[i]);if(v.WebVTT.processCues(v,e,this.el_),this.player_.textTrackSettings)for(var n=this.player_.textTrackSettings.getValues(),r=e.length;r--;){var a=e[r];if(a){var s=a.displayState;if(n.color&&(s.firstChild.style.color=n.color),n.textOpacity&&vn(s.firstChild,"color",yn(n.color||"#fff",n.textOpacity)),n.backgroundColor&&(s.firstChild.style.backgroundColor=n.backgroundColor),n.backgroundOpacity&&vn(s.firstChild,"backgroundColor",yn(n.backgroundColor||"#000",n.backgroundOpacity)),n.windowColor&&(n.windowOpacity?vn(s,"backgroundColor",yn(n.windowColor,n.windowOpacity)):s.style.backgroundColor=n.windowColor),n.edgeStyle&&("dropshadow"===n.edgeStyle?s.firstChild.style.textShadow="2px 2px 3px #222, 2px 2px 4px #222, 2px 2px 5px "+mn:"raised"===n.edgeStyle?s.firstChild.style.textShadow="1px 1px #222, 2px 2px #222, 3px 3px "+mn:"depressed"===n.edgeStyle?s.firstChild.style.textShadow="1px 1px #ccc, 0 1px #ccc, -1px -1px #222, 0 -1px "+mn:"uniform"===n.edgeStyle&&(s.firstChild.style.textShadow="0 0 4px #222, 0 0 4px #222, 0 0 4px #222, 0 0 4px "+mn)),n.fontPercent&&1!==n.fontPercent){var o=v.parseFloat(s.style.fontSize);s.style.fontSize=o*n.fontPercent+"px",s.style.height="auto",s.style.top="auto",s.style.bottom="2px"}n.fontFamily&&"default"!==n.fontFamily&&("small-caps"===n.fontFamily?s.firstChild.style.fontVariant="small-caps":s.firstChild.style.fontFamily=gn[n.fontFamily])}}}},t}(jt);jt.registerComponent("TextTrackDisplay",_n);var bn=function(r){function t(){return r.apply(this,arguments)||this}return f(t,r),t.prototype.createEl=function(){var t=this.player_.isAudio(),e=this.localize(t?"Audio Player":"Video Player"),i=A("span",{className:"vjs-control-text",innerHTML:this.localize("{1} is loading.",[e])}),n=r.prototype.createEl.call(this,"div",{className:"vjs-loading-spinner",dir:"ltr"});return n.appendChild(i),n},t}(jt);jt.registerComponent("LoadingSpinner",bn);var Tn=function(e){function t(){return e.apply(this,arguments)||this}f(t,e);var i=t.prototype;return i.createEl=function(t,e,i){void 0===e&&(e={}),void 0===i&&(i={}),e=b({innerHTML:'<span aria-hidden="true" class="vjs-icon-placeholder"></span>',className:this.buildCSSClass()},e),i=b({type:"button"},i);var n=jt.prototype.createEl.call(this,"button",e,i);return this.createControlTextEl(n),n},i.addChild=function(t,e){void 0===e&&(e={});var i=this.constructor.name;return g.warn("Adding an actionable (user controllable) child to a Button ("+i+") is not supported; use a ClickableComponent instead."),jt.prototype.addChild.call(this,t,e)},i.enable=function(){e.prototype.enable.call(this),this.el_.removeAttribute("disabled")},i.disable=function(){e.prototype.disable.call(this),this.el_.setAttribute("disabled","disabled")},i.handleKeyPress=function(t){32!==t.which&&13!==t.which&&e.prototype.handleKeyPress.call(this,t)},t}(pn);jt.registerComponent("Button",Tn);var Sn=function(n){function t(t,e){var i;return(i=n.call(this,t,e)||this).mouseused_=!1,i.on("mousedown",i.handleMouseDown),i}f(t,n);var e=t.prototype;return e.buildCSSClass=function(){return"vjs-big-play-button"},e.handleClick=function(t){var e=this.player_.play();if(this.mouseused_&&t.clientX&&t.clientY)we(e);else{var i=this.player_.getChild("controlBar"),n=i&&i.getChild("playToggle");if(n){var r=function(){return n.focus()};ke(e)?e.then(r,function(){}):this.setTimeout(r,1)}else this.player_.focus()}},e.handleKeyPress=function(t){this.mouseused_=!1,n.prototype.handleKeyPress.call(this,t)},e.handleMouseDown=function(t){this.mouseused_=!0},t}(Tn);Sn.prototype.controlText_="Play Video",jt.registerComponent("BigPlayButton",Sn);var kn=function(n){function t(t,e){var i;return(i=n.call(this,t,e)||this).controlText(e&&e.controlText||i.localize("Close")),i}f(t,n);var e=t.prototype;return e.buildCSSClass=function(){return"vjs-close-button "+n.prototype.buildCSSClass.call(this)},e.handleClick=function(t){this.trigger({type:"close",bubbles:!1})},t}(Tn);jt.registerComponent("CloseButton",kn);var wn=function(n){function t(t,e){var i;return(i=n.call(this,t,e)||this).on(t,"play",i.handlePlay),i.on(t,"pause",i.handlePause),i.on(t,"ended",i.handleEnded),i}f(t,n);var e=t.prototype;return e.buildCSSClass=function(){return"vjs-play-control "+n.prototype.buildCSSClass.call(this)},e.handleClick=function(t){this.player_.paused()?this.player_.play():this.player_.pause()},e.handleSeeked=function(t){this.removeClass("vjs-ended"),this.player_.paused()?this.handlePause(t):this.handlePlay(t)},e.handlePlay=function(t){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.controlText("Pause")},e.handlePause=function(t){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.controlText("Play")},e.handleEnded=function(t){this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.controlText("Replay"),this.one(this.player_,"seeked",this.handleSeeked)},t}(Tn);wn.prototype.controlText_="Play",jt.registerComponent("PlayToggle",wn);var Cn=function(t,e){t=t<0?0:t;var i=Math.floor(t%60),n=Math.floor(t/60%60),r=Math.floor(t/3600),a=Math.floor(e/60%60),s=Math.floor(e/3600);return(isNaN(t)||t===1/0)&&(r=n=i="-"),(r=0<r||0<s?r+":":"")+(n=((r||10<=a)&&n<10?"0"+n:n)+":")+(i=i<10?"0"+i:i)},En=Cn;function An(t,e){return void 0===e&&(e=t),En(t,e)}var Ln=function(n){function t(t,e){var i;return(i=n.call(this,t,e)||this).throttledUpdateContent=wt(kt(m(m(i)),i.updateContent),25),i.on(t,"timeupdate",i.throttledUpdateContent),i}f(t,n);var e=t.prototype;return e.createEl=function(t){var e=this.buildCSSClass(),i=n.prototype.createEl.call(this,"div",{className:e+" vjs-time-control vjs-control",innerHTML:'<span class="vjs-control-text">'+this.localize(this.labelText_)+" </span>"});return this.contentEl_=A("span",{className:e+"-display"},{"aria-live":"off"}),this.updateTextNode_(),i.appendChild(this.contentEl_),i},e.dispose=function(){this.contentEl_=null,this.textNode_=null,n.prototype.dispose.call(this)},e.updateTextNode_=function(){if(this.contentEl_){for(;this.contentEl_.firstChild;)this.contentEl_.removeChild(this.contentEl_.firstChild);this.textNode_=d.createTextNode(this.formattedTime_||this.formatTime_(0)),this.contentEl_.appendChild(this.textNode_)}},e.formatTime_=function(t){return An(t)},e.updateFormattedTime_=function(t){var e=this.formatTime_(t);e!==this.formattedTime_&&(this.formattedTime_=e,this.requestAnimationFrame(this.updateTextNode_))},e.updateContent=function(t){},t}(jt);Ln.prototype.labelText_="Time",Ln.prototype.controlText_="Time",jt.registerComponent("TimeDisplay",Ln);var On=function(n){function t(t,e){var i;return(i=n.call(this,t,e)||this).on(t,"ended",i.handleEnded),i}f(t,n);var e=t.prototype;return e.buildCSSClass=function(){return"vjs-current-time"},e.updateContent=function(t){var e=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();this.updateFormattedTime_(e)},e.handleEnded=function(t){this.player_.duration()&&this.updateFormattedTime_(this.player_.duration())},t}(Ln);On.prototype.labelText_="Current Time",On.prototype.controlText_="Current Time",jt.registerComponent("CurrentTimeDisplay",On);var Pn=function(n){function t(t,e){var i;return(i=n.call(this,t,e)||this).on(t,"durationchange",i.updateContent),i.on(t,"loadedmetadata",i.throttledUpdateContent),i}f(t,n);var e=t.prototype;return e.buildCSSClass=function(){return"vjs-duration"},e.updateContent=function(t){var e=this.player_.duration();e&&this.duration_!==e&&(this.duration_=e,this.updateFormattedTime_(e))},t}(Ln);Pn.prototype.labelText_="Duration",Pn.prototype.controlText_="Duration",jt.registerComponent("DurationDisplay",Pn);var Un=function(t){function e(){return t.apply(this,arguments)||this}return f(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider",innerHTML:"<div><span>/</span></div>"})},e}(jt);jt.registerComponent("TimeDivider",Un);var xn=function(n){function t(t,e){var i;return(i=n.call(this,t,e)||this).on(t,"durationchange",i.throttledUpdateContent),i.on(t,"ended",i.handleEnded),i}f(t,n);var e=t.prototype;return e.buildCSSClass=function(){return"vjs-remaining-time"},e.formatTime_=function(t){return"-"+n.prototype.formatTime_.call(this,t)},e.updateContent=function(t){this.player_.duration()&&(this.player_.remainingTimeDisplay?this.updateFormattedTime_(this.player_.remainingTimeDisplay()):this.updateFormattedTime_(this.player_.remainingTime()))},e.handleEnded=function(t){this.player_.duration()&&this.updateFormattedTime_(0)},t}(Ln);xn.prototype.labelText_="Remaining Time",xn.prototype.controlText_="Remaining Time",jt.registerComponent("RemainingTimeDisplay",xn);var In=function(n){function t(t,e){var i;return(i=n.call(this,t,e)||this).updateShowing(),i.on(i.player(),"durationchange",i.updateShowing),i}f(t,n);var e=t.prototype;return e.createEl=function(){var t=n.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});return this.contentEl_=A("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},e.dispose=function(){this.contentEl_=null,n.prototype.dispose.call(this)},e.updateShowing=function(t){this.player().duration()===1/0?this.show():this.hide()},t}(jt);jt.registerComponent("LiveDisplay",In);var Dn=function(n){function t(t,e){var i;return(i=n.call(this,t,e)||this).bar=i.getChild(i.options_.barName),i.vertical(!!i.options_.vertical),i.enable(),i}f(t,n);var e=t.prototype;return e.enabled=function(){return this.enabled_},e.enable=function(){this.enabled()||(this.on("mousedown",this.handleMouseDown),this.on("touchstart",this.handleMouseDown),this.on("focus",this.handleFocus),this.on("blur",this.handleBlur),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)},e.disable=function(){if(this.enabled()){var t=this.bar.el_.ownerDocument;this.off("mousedown",this.handleMouseDown),this.off("touchstart",this.handleMouseDown),this.off("focus",this.handleFocus),this.off("blur",this.handleBlur),this.off("click",this.handleClick),this.off(this.player_,"controlsvisible",this.update),this.off(t,"mousemove",this.handleMouseMove),this.off(t,"mouseup",this.handleMouseUp),this.off(t,"touchmove",this.handleMouseMove),this.off(t,"touchend",this.handleMouseUp),this.removeAttribute("tabindex"),this.addClass("disabled"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}},e.createEl=function(t,e,i){return void 0===e&&(e={}),void 0===i&&(i={}),e.className=e.className+" vjs-slider",e=b({tabIndex:0},e),i=b({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},i),n.prototype.createEl.call(this,t,e,i)},e.handleMouseDown=function(t){var e=this.bar.el_.ownerDocument;"mousedown"===t.type&&t.preventDefault(),"touchstart"!==t.type||ne||t.preventDefault(),j(),this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(e,"mousemove",this.handleMouseMove),this.on(e,"mouseup",this.handleMouseUp),this.on(e,"touchmove",this.handleMouseMove),this.on(e,"touchend",this.handleMouseUp),this.handleMouseMove(t)},e.handleMouseMove=function(t){},e.handleMouseUp=function(){var t=this.bar.el_.ownerDocument;F(),this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(t,"mousemove",this.handleMouseMove),this.off(t,"mouseup",this.handleMouseUp),this.off(t,"touchmove",this.handleMouseMove),this.off(t,"touchend",this.handleMouseUp),this.update()},e.update=function(){if(this.el_){var t=this.getPercent(),e=this.bar;if(e){("number"!=typeof t||t!=t||t<0||t===1/0)&&(t=0);var i=(100*t).toFixed(2)+"%",n=e.el().style;return this.vertical()?n.height=i:n.width=i,t}}},e.calculateDistance=function(t){var e=q(this.el_,t);return this.vertical()?e.y:e.x},e.handleFocus=function(){this.on(this.bar.el_.ownerDocument,"keydown",this.handleKeyPress)},e.handleKeyPress=function(t){37===t.which||40===t.which?(t.preventDefault(),this.stepBack()):38!==t.which&&39!==t.which||(t.preventDefault(),this.stepForward())},e.handleBlur=function(){this.off(this.bar.el_.ownerDocument,"keydown",this.handleKeyPress)},e.handleClick=function(t){t.stopImmediatePropagation(),t.preventDefault()},e.vertical=function(t){if(void 0===t)return this.vertical_||!1;this.vertical_=!!t,this.vertical_?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal")},t}(jt);jt.registerComponent("Slider",Dn);var Rn=function(n){function t(t,e){var i;return(i=n.call(this,t,e)||this).partEls_=[],i.on(t,"progress",i.update),i}f(t,n);var e=t.prototype;return e.createEl=function(){return n.prototype.createEl.call(this,"div",{className:"vjs-load-progress",innerHTML:'<span class="vjs-control-text"><span>'+this.localize("Loaded")+"</span>: 0%</span>"})},e.dispose=function(){this.partEls_=null,n.prototype.dispose.call(this)},e.update=function(t){var e=this.player_.buffered(),i=this.player_.duration(),n=this.player_.bufferedEnd(),r=this.partEls_,a=function(t,e){var i=t/e||0;return 100*(1<=i?1:i)+"%"};this.el_.style.width=a(n,i);for(var s=0;s<e.length;s++){var o=e.start(s),u=e.end(s),l=r[s];l||(l=this.el_.appendChild(A()),r[s]=l),l.style.left=a(o,n),l.style.width=a(u-o,n)}for(var c=r.length;c>e.length;c--)this.el_.removeChild(r[c-1]);r.length=e.length},t}(jt);jt.registerComponent("LoadProgressBar",Rn);var Mn=function(t){function e(){return t.apply(this,arguments)||this}f(e,t);var i=e.prototype;return i.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-time-tooltip"})},i.update=function(t,e,i){var n=V(this.el_),r=V(this.player_.el()),a=t.width*e;if(r&&n){var s=t.left-r.left+a,o=t.width-a+(r.right-t.right),u=n.width/2;s<u?u+=u-s:o<u&&(u=o),u<0?u=0:u>n.width&&(u=n.width),this.el_.style.right="-"+u+"px",L(this.el_,i)}},e}(jt);jt.registerComponent("TimeTooltip",Mn);var Bn=function(t){function e(){return t.apply(this,arguments)||this}f(e,t);var i=e.prototype;return i.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar",innerHTML:'<span class="vjs-control-text"><span>'+this.localize("Progress")+"</span>: 0%</span>"})},i.update=function(i,n){var r=this;this.rafId_&&this.cancelAnimationFrame(this.rafId_),this.rafId_=this.requestAnimationFrame(function(){var t=An(r.player_.scrubbing()?r.player_.getCache().currentTime:r.player_.currentTime(),r.player_.duration()),e=r.getChild("timeTooltip");e&&e.update(i,n,t)})},e}(jt);Bn.prototype.options_={children:[]},Kt||Jt||Bn.prototype.options_.children.push("timeTooltip"),jt.registerComponent("PlayProgressBar",Bn);var Nn=function(n){function t(t,e){var i;return(i=n.call(this,t,e)||this).update=wt(kt(m(m(i)),i.update),25),i}f(t,n);var e=t.prototype;return e.createEl=function(){return n.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},e.update=function(i,n){var r=this;this.rafId_&&this.cancelAnimationFrame(this.rafId_),this.rafId_=this.requestAnimationFrame(function(){var t=r.player_.duration(),e=An(n*t,t);r.el_.style.left=i.width*n+"px",r.getChild("timeTooltip").update(i,n,e)})},t}(jt);Nn.prototype.options_={children:["timeTooltip"]},jt.registerComponent("MouseTimeDisplay",Nn);var jn=function(n){function t(t,e){var i;return(i=n.call(this,t,e)||this).setEventHandlers_(),i}f(t,n);var e=t.prototype;return e.setEventHandlers_=function(){var t=this;this.update=wt(kt(this,this.update),30),this.on(this.player_,"timeupdate",this.update),this.on(this.player_,"ended",this.handleEnded),this.updateInterval=null,this.on(this.player_,["playing"],function(){t.clearInterval(t.updateInterval),t.updateInterval=t.setInterval(function(){t.requestAnimationFrame(function(){t.update()})},30)}),this.on(this.player_,["ended","pause","waiting"],function(){t.clearInterval(t.updateInterval)}),this.on(this.player_,["timeupdate","ended"],this.update)},e.createEl=function(){return n.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})},e.update_=function(t,e){var i=this.player_.duration();this.el_.setAttribute("aria-valuenow",(100*e).toFixed(2)),this.el_.setAttribute("aria-valuetext",this.localize("progress bar timing: currentTime={1} duration={2}",[An(t,i),An(i,i)],"{1} of {2}")),this.bar.update(V(this.el_),e)},e.update=function(t){var e=n.prototype.update.call(this);return this.update_(this.getCurrentTime_(),e),e},e.getCurrentTime_=function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()},e.handleEnded=function(t){this.update_(this.player_.duration(),1)},e.getPercent=function(){var t=this.getCurrentTime_()/this.player_.duration();return 1<=t?1:t||0},e.handleMouseDown=function(t){$(t)&&(t.stopPropagation(),this.player_.scrubbing(!0),this.videoWasPlaying=!this.player_.paused(),this.player_.pause(),n.prototype.handleMouseDown.call(this,t))},e.handleMouseMove=function(t){if($(t)){var e=this.calculateDistance(t)*this.player_.duration();e===this.player_.duration()&&(e-=.1),this.player_.currentTime(e)}},e.enable=function(){n.prototype.enable.call(this);var t=this.getChild("mouseTimeDisplay");t&&t.show()},e.disable=function(){n.prototype.disable.call(this);var t=this.getChild("mouseTimeDisplay");t&&t.hide()},e.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&&we(this.player_.play())},e.stepForward=function(){this.player_.currentTime(this.player_.currentTime()+5)},e.stepBack=function(){this.player_.currentTime(this.player_.currentTime()-5)},e.handleAction=function(t){this.player_.paused()?this.player_.play():this.player_.pause()},e.handleKeyPress=function(t){32===t.which||13===t.which?(t.preventDefault(),this.handleAction(t)):n.prototype.handleKeyPress&&n.prototype.handleKeyPress.call(this,t)},t}(Dn);jn.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"},Kt||Jt||jn.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),jn.prototype.playerEvent="timeupdate",jt.registerComponent("SeekBar",jn);var Fn=function(n){function t(t,e){var i;return(i=n.call(this,t,e)||this).handleMouseMove=wt(kt(m(m(i)),i.handleMouseMove),25),i.throttledHandleMouseSeek=wt(kt(m(m(i)),i.handleMouseSeek),25),i.enable(),i}f(t,n);var e=t.prototype;return e.createEl=function(){return n.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},e.handleMouseMove=function(t){var e=this.getChild("seekBar");if(e){var i=e.getChild("mouseTimeDisplay"),n=e.el(),r=V(n),a=q(n,t).x;1<a?a=1:a<0&&(a=0),i&&i.update(r,a)}},e.handleMouseSeek=function(t){var e=this.getChild("seekBar");e&&e.handleMouseMove(t)},e.enabled=function(){return this.enabled_},e.disable=function(){this.children().forEach(function(t){return t.disable&&t.disable()}),this.enabled()&&(this.off(["mousedown","touchstart"],this.handleMouseDown),this.off(this.el_,"mousemove",this.handleMouseMove),this.handleMouseUp(),this.addClass("disabled"),this.enabled_=!1)},e.enable=function(){this.children().forEach(function(t){return t.enable&&t.enable()}),this.enabled()||(this.on(["mousedown","touchstart"],this.handleMouseDown),this.on(this.el_,"mousemove",this.handleMouseMove),this.removeClass("disabled"),this.enabled_=!0)},e.handleMouseDown=function(t){var e=this.el_.ownerDocument,i=this.getChild("seekBar");i&&i.handleMouseDown(t),this.on(e,"mousemove",this.throttledHandleMouseSeek),this.on(e,"touchmove",this.throttledHandleMouseSeek),this.on(e,"mouseup",this.handleMouseUp),this.on(e,"touchend",this.handleMouseUp)},e.handleMouseUp=function(t){var e=this.el_.ownerDocument,i=this.getChild("seekBar");i&&i.handleMouseUp(t),this.off(e,"mousemove",this.throttledHandleMouseSeek),this.off(e,"touchmove",this.throttledHandleMouseSeek),this.off(e,"mouseup",this.handleMouseUp),this.off(e,"touchend",this.handleMouseUp)},t}(jt);Fn.prototype.options_={children:["seekBar"]},jt.registerComponent("ProgressControl",Fn);var Vn=function(n){function t(t,e){var i;return(i=n.call(this,t,e)||this).on(t,"fullscreenchange",i.handleFullscreenChange),!1===d[me.fullscreenEnabled]&&i.disable(),i}f(t,n);var e=t.prototype;return e.buildCSSClass=function(){return"vjs-fullscreen-control "+n.prototype.buildCSSClass.call(this)},e.handleFullscreenChange=function(t){this.player_.isFullscreen()?this.controlText("Non-Fullscreen"):this.controlText("Fullscreen")},e.handleClick=function(t){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()},t}(Tn);Vn.prototype.controlText_="Fullscreen",jt.registerComponent("FullscreenToggle",Vn);var Hn=function(t){function e(){return t.apply(this,arguments)||this}return f(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-volume-level",innerHTML:'<span class="vjs-control-text"></span>'})},e}(jt);jt.registerComponent("VolumeLevel",Hn);var qn=function(n){function t(t,e){var i;return(i=n.call(this,t,e)||this).on("slideractive",i.updateLastVolume_),i.on(t,"volumechange",i.updateARIAAttributes),t.ready(function(){return i.updateARIAAttributes()}),i}f(t,n);var e=t.prototype;return e.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"})},e.handleMouseDown=function(t){$(t)&&n.prototype.handleMouseDown.call(this,t)},e.handleMouseMove=function(t){$(t)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(t)))},e.checkMuted=function(){this.player_.muted()&&this.player_.muted(!1)},e.getPercent=function(){return this.player_.muted()?0:this.player_.volume()},e.stepForward=function(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)},e.stepBack=function(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)},e.updateARIAAttributes=function(t){var e=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",e),this.el_.setAttribute("aria-valuetext",e+"%")},e.volumeAsPercentage_=function(){return Math.round(100*this.player_.volume())},e.updateLastVolume_=function(){var t=this,e=this.player_.volume();this.one("sliderinactive",function(){0===t.player_.volume()&&t.player_.lastVolume_(e)})},t}(Dn);qn.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},qn.prototype.playerEvent="volumechange",jt.registerComponent("VolumeBar",qn);var zn=function(a){function t(t,e){var i,n,r;return void 0===e&&(e={}),e.vertical=e.vertical||!1,("undefined"==typeof e.volumeBar||c(e.volumeBar))&&(e.volumeBar=e.volumeBar||{},e.volumeBar.vertical=e.vertical),i=a.call(this,t,e)||this,n=m(m(i)),(r=t).tech_&&!r.tech_.featuresVolumeControl&&n.addClass("vjs-hidden"),n.on(r,"loadstart",function(){r.tech_.featuresVolumeControl?n.removeClass("vjs-hidden"):n.addClass("vjs-hidden")}),i.throttledHandleMouseMove=wt(kt(m(m(i)),i.handleMouseMove),25),i.on("mousedown",i.handleMouseDown),i.on("touchstart",i.handleMouseDown),i.on(i.volumeBar,["focus","slideractive"],function(){i.volumeBar.addClass("vjs-slider-active"),i.addClass("vjs-slider-active"),i.trigger("slideractive")}),i.on(i.volumeBar,["blur","sliderinactive"],function(){i.volumeBar.removeClass("vjs-slider-active"),i.removeClass("vjs-slider-active"),i.trigger("sliderinactive")}),i}f(t,a);var e=t.prototype;return e.createEl=function(){var t="vjs-volume-horizontal";return this.options_.vertical&&(t="vjs-volume-vertical"),a.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control "+t})},e.handleMouseDown=function(t){var e=this.el_.ownerDocument;this.on(e,"mousemove",this.throttledHandleMouseMove),this.on(e,"touchmove",this.throttledHandleMouseMove),this.on(e,"mouseup",this.handleMouseUp),this.on(e,"touchend",this.handleMouseUp)},e.handleMouseUp=function(t){var e=this.el_.ownerDocument;this.off(e,"mousemove",this.throttledHandleMouseMove),this.off(e,"touchmove",this.throttledHandleMouseMove),this.off(e,"mouseup",this.handleMouseUp),this.off(e,"touchend",this.handleMouseUp)},e.handleMouseMove=function(t){this.volumeBar.handleMouseMove(t)},t}(jt);zn.prototype.options_={children:["volumeBar"]},jt.registerComponent("VolumeControl",zn);var Wn=function(a){function t(t,e){var i,n,r;return i=a.call(this,t,e)||this,n=m(m(i)),(r=t).tech_&&!r.tech_.featuresMuteControl&&n.addClass("vjs-hidden"),n.on(r,"loadstart",function(){r.tech_.featuresMuteControl?n.removeClass("vjs-hidden"):n.addClass("vjs-hidden")}),i.on(t,["loadstart","volumechange"],i.update),i}f(t,a);var e=t.prototype;return e.buildCSSClass=function(){return"vjs-mute-control "+a.prototype.buildCSSClass.call(this)},e.handleClick=function(t){var e=this.player_.volume(),i=this.player_.lastVolume_();if(0===e){var n=i<.1?.1:i;this.player_.volume(n),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())},e.update=function(t){this.updateIcon_(),this.updateControlText_()},e.updateIcon_=function(){var t=this.player_.volume(),e=3;Kt&&this.player_.muted(this.player_.tech_.el_.muted),0===t||this.player_.muted()?e=0:t<.33?e=1:t<.67&&(e=2);for(var i=0;i<4;i++)x(this.el_,"vjs-vol-"+i);U(this.el_,"vjs-vol-"+e)},e.updateControlText_=function(){var t=this.player_.muted()||0===this.player_.volume()?"Unmute":"Mute";this.controlText()!==t&&this.controlText(t)},t}(Tn);Wn.prototype.controlText_="Mute",jt.registerComponent("MuteToggle",Wn);var Gn=function(n){function t(t,e){var i;return void 0===e&&(e={}),"undefined"!=typeof e.inline?e.inline=e.inline:e.inline=!0,("undefined"==typeof e.volumeControl||c(e.volumeControl))&&(e.volumeControl=e.volumeControl||{},e.volumeControl.vertical=!e.inline),(i=n.call(this,t,e)||this).on(t,["loadstart"],i.volumePanelState_),i.on(i.volumeControl,["slideractive"],i.sliderActive_),i.on(i.volumeControl,["sliderinactive"],i.sliderInactive_),i}f(t,n);var e=t.prototype;return e.sliderActive_=function(){this.addClass("vjs-slider-active")},e.sliderInactive_=function(){this.removeClass("vjs-slider-active")},e.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")},e.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})},t}(jt);Gn.prototype.options_={children:["muteToggle","volumeControl"]},jt.registerComponent("VolumePanel",Gn);var Xn=function(n){function t(t,e){var i;return i=n.call(this,t,e)||this,e&&(i.menuButton_=e.menuButton),i.focusedChild_=-1,i.on("keydown",i.handleKeyPress),i}f(t,n);var e=t.prototype;return e.addItem=function(e){this.addChild(e),e.on("click",kt(this,function(t){this.menuButton_&&(this.menuButton_.unpressButton(),"CaptionSettingsMenuItem"!==e.name()&&this.menuButton_.focus())}))},e.createEl=function(){var t=this.options_.contentElType||"ul";this.contentEl_=A(t,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");var e=n.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"});return e.appendChild(this.contentEl_),ht(e,"click",function(t){t.preventDefault(),t.stopImmediatePropagation()}),e},e.dispose=function(){this.contentEl_=null,n.prototype.dispose.call(this)},e.handleKeyPress=function(t){37===t.which||40===t.which?(t.preventDefault(),this.stepForward()):38!==t.which&&39!==t.which||(t.preventDefault(),this.stepBack())},e.stepForward=function(){var t=0;void 0!==this.focusedChild_&&(t=this.focusedChild_+1),this.focus(t)},e.stepBack=function(){var t=0;void 0!==this.focusedChild_&&(t=this.focusedChild_-1),this.focus(t)},e.focus=function(t){void 0===t&&(t=0);var e=this.children().slice();e.length&&e[0].className&&/vjs-menu-title/.test(e[0].className)&&e.shift(),0<e.length&&(t<0?t=0:t>=e.length&&(t=e.length-1),e[this.focusedChild_=t].el_.focus())},t}(jt);jt.registerComponent("Menu",Xn);var Yn=function(r){function t(t,e){var i;void 0===e&&(e={}),(i=r.call(this,t,e)||this).menuButton_=new Tn(t,e),i.menuButton_.controlText(i.controlText_),i.menuButton_.el_.setAttribute("aria-haspopup","true");var n=Tn.prototype.buildCSSClass();return i.menuButton_.el_.className=i.buildCSSClass()+" "+n,i.menuButton_.removeClass("vjs-control"),i.addChild(i.menuButton_),i.update(),i.enabled_=!0,i.on(i.menuButton_,"tap",i.handleClick),i.on(i.menuButton_,"click",i.handleClick),i.on(i.menuButton_,"focus",i.handleFocus),i.on(i.menuButton_,"blur",i.handleBlur),i.on("keydown",i.handleSubmenuKeyPress),i}f(t,r);var e=t.prototype;return e.update=function(){var t=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=t,this.addChild(t),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.hideThreshold_?this.hide():this.show()},e.createMenu=function(){var t=new Xn(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var e=A("li",{className:"vjs-menu-title",innerHTML:Bt(this.options_.title),tabIndex:-1});this.hideThreshold_+=1,t.children_.unshift(e),O(e,t.contentEl())}if(this.items=this.createItems(),this.items)for(var i=0;i<this.items.length;i++)t.addItem(this.items[i]);return t},e.createItems=function(){},e.createEl=function(){return r.prototype.createEl.call(this,"div",{className:this.buildWrapperCSSClass()},{})},e.buildWrapperCSSClass=function(){var t="vjs-menu-button";return!0===this.options_.inline?t+="-inline":t+="-popup","vjs-menu-button "+t+" "+Tn.prototype.buildCSSClass()+" "+r.prototype.buildCSSClass.call(this)},e.buildCSSClass=function(){var t="vjs-menu-button";return!0===this.options_.inline?t+="-inline":t+="-popup","vjs-menu-button "+t+" "+r.prototype.buildCSSClass.call(this)},e.controlText=function(t,e){return void 0===e&&(e=this.menuButton_.el()),this.menuButton_.controlText(t,e)},e.handleClick=function(t){this.one(this.menu.contentEl(),"mouseleave",kt(this,function(t){this.unpressButton(),this.el_.blur()})),this.buttonPressed_?this.unpressButton():this.pressButton()},e.focus=function(){this.menuButton_.focus()},e.blur=function(){this.menuButton_.blur()},e.handleFocus=function(){ht(d,"keydown",kt(this,this.handleKeyPress))},e.handleBlur=function(){dt(d,"keydown",kt(this,this.handleKeyPress))},e.handleKeyPress=function(t){27===t.which||9===t.which?(this.buttonPressed_&&this.unpressButton(),9!==t.which&&(t.preventDefault(),this.menuButton_.el_.focus())):38!==t.which&&40!==t.which||this.buttonPressed_||(this.pressButton(),t.preventDefault())},e.handleSubmenuKeyPress=function(t){27!==t.which&&9!==t.which||(this.buttonPressed_&&this.unpressButton(),9!==t.which&&(t.preventDefault(),this.menuButton_.el_.focus()))},e.pressButton=function(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.lockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","true"),Kt&&C())return;this.menu.focus()}},e.unpressButton=function(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","false"))},e.disable=function(){this.unpressButton(),this.enabled_=!1,this.addClass("vjs-disabled"),this.menuButton_.disable()},e.enable=function(){this.enabled_=!0,this.removeClass("vjs-disabled"),this.menuButton_.enable()},t}(jt);jt.registerComponent("MenuButton",Yn);var $n=function(a){function t(t,e){var i,n=e.tracks;if((i=a.call(this,t,e)||this).items.length<=1&&i.hide(),!n)return m(i);var r=kt(m(m(i)),i.update);return n.addEventListener("removetrack",r),n.addEventListener("addtrack",r),i.player_.on("ready",r),i.player_.on("dispose",function(){n.removeEventListener("removetrack",r),n.removeEventListener("addtrack",r)}),i}return f(t,a),t}(Yn);jt.registerComponent("TrackButton",$n);var Kn=function(n){function t(t,e){var i;return(i=n.call(this,t,e)||this).selectable=e.selectable,i.isSelected_=e.selected||!1,i.multiSelectable=e.multiSelectable,i.selected(i.isSelected_),i.selectable?i.multiSelectable?i.el_.setAttribute("role","menuitemcheckbox"):i.el_.setAttribute("role","menuitemradio"):i.el_.setAttribute("role","menuitem"),i}f(t,n);var e=t.prototype;return e.createEl=function(t,e,i){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},e),i)},e.handleClick=function(t){this.selected(!0)},e.selected=function(t){this.selectable&&(this.isSelected_=t?(this.addClass("vjs-selected"),this.el_.setAttribute("aria-checked","true"),this.controlText(", selected"),!0):(this.removeClass("vjs-selected"),this.el_.setAttribute("aria-checked","false"),this.controlText(""),!1))},t}(pn);jt.registerComponent("MenuItem",Kn);var Qn=function(u){function t(t,e){var n,i=e.track,r=t.textTracks();e.label=i.label||i.language||"Unknown",e.selected="showing"===i.mode,(n=u.call(this,t,e)||this).track=i;var a,s=function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];n.handleTracksChange.apply(m(m(n)),e)},o=function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];n.handleSelectedLanguageChange.apply(m(m(n)),e)};(t.on(["loadstart","texttrackchange"],s),r.addEventListener("change",s),r.addEventListener("selectedlanguagechange",o),n.on("dispose",function(){t.off(["loadstart","texttrackchange"],s),r.removeEventListener("change",s),r.removeEventListener("selectedlanguagechange",o)}),void 0===r.onchange)&&n.on(["tap","click"],function(){if("object"!=typeof v.Event)try{a=new v.Event("change")}catch(t){}a||(a=d.createEvent("Event")).initEvent("change",!0,!0),r.dispatchEvent(a)});return n.handleTracksChange(),n}f(t,u);var e=t.prototype;return e.handleClick=function(t){var e=this.track.kind,i=this.track.kinds,n=this.player_.textTracks();if(i||(i=[e]),u.prototype.handleClick.call(this,t),n)for(var r=0;r<n.length;r++){var a=n[r];a===this.track&&-1<i.indexOf(a.kind)?"showing"!==a.mode&&(a.mode="showing"):"disabled"!==a.mode&&(a.mode="disabled")}},e.handleTracksChange=function(t){var e="showing"===this.track.mode;e!==this.isSelected_&&this.selected(e)},e.handleSelectedLanguageChange=function(t){if("showing"===this.track.mode){var e=this.player_.cache_.selectedLanguage;if(e&&e.enabled&&e.language===this.track.language&&e.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}},e.dispose=function(){this.track=null,u.prototype.dispose.call(this)},t}(Kn);jt.registerComponent("TextTrackMenuItem",Qn);var Jn=function(i){function t(t,e){return e.track={player:t,kind:e.kind,kinds:e.kinds,default:!1,mode:"disabled"},e.kinds||(e.kinds=[e.kind]),e.label?e.track.label=e.label:e.track.label=e.kinds.join(" and ")+" off",e.selectable=!0,e.multiSelectable=!1,i.call(this,t,e)||this}f(t,i);var e=t.prototype;return e.handleTracksChange=function(t){for(var e=this.player().textTracks(),i=!0,n=0,r=e.length;n<r;n++){var a=e[n];if(-1<this.options_.kinds.indexOf(a.kind)&&"showing"===a.mode){i=!1;break}}i!==this.isSelected_&&this.selected(i)},e.handleSelectedLanguageChange=function(t){for(var e=this.player().textTracks(),i=!0,n=0,r=e.length;n<r;n++){var a=e[n];if(-1<["captions","descriptions","subtitles"].indexOf(a.kind)&&"showing"===a.mode){i=!1;break}}i&&(this.player_.cache_.selectedLanguage={enabled:!1})},t}(Qn);jt.registerComponent("OffTextTrackMenuItem",Jn);var Zn=function(i){function t(t,e){return void 0===e&&(e={}),e.tracks=t.textTracks(),i.call(this,t,e)||this}return f(t,i),t.prototype.createItems=function(t,e){var i;void 0===t&&(t=[]),void 0===e&&(e=Qn),this.label_&&(i=this.label_+" off"),t.push(new Jn(this.player_,{kinds:this.kinds_,kind:this.kind_,label:i})),this.hideThreshold_+=1;var n=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(var r=0;r<n.length;r++){var a=n[r];if(-1<this.kinds_.indexOf(a.kind)){var s=new e(this.player_,{track:a,selectable:!0,multiSelectable:!1});s.addClass("vjs-"+a.kind+"-menu-item"),t.push(s)}}return t},t}($n);jt.registerComponent("TextTrackButton",Zn);var tr=function(s){function t(t,e){var i,n=e.track,r=e.cue,a=t.currentTime();return e.selectable=!0,e.multiSelectable=!1,e.label=r.text,e.selected=r.startTime<=a&&a<r.endTime,(i=s.call(this,t,e)||this).track=n,i.cue=r,n.addEventListener("cuechange",kt(m(m(i)),i.update)),i}f(t,s);var e=t.prototype;return e.handleClick=function(t){s.prototype.handleClick.call(this),this.player_.currentTime(this.cue.startTime),this.update(this.cue.startTime)},e.update=function(t){var e=this.cue,i=this.player_.currentTime();this.selected(e.startTime<=i&&i<e.endTime)},t}(Kn);jt.registerComponent("ChaptersTrackMenuItem",tr);var er=function(n){function t(t,e,i){return n.call(this,t,e,i)||this}f(t,n);var e=t.prototype;return e.buildCSSClass=function(){return"vjs-chapters-button "+n.prototype.buildCSSClass.call(this)},e.buildWrapperCSSClass=function(){return"vjs-chapters-button "+n.prototype.buildWrapperCSSClass.call(this)},e.update=function(t){this.track_&&(!t||"addtrack"!==t.type&&"removetrack"!==t.type)||this.setTrack(this.findChaptersTrack()),n.prototype.update.call(this)},e.setTrack=function(t){if(this.track_!==t){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){var e=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);e&&e.removeEventListener("load",this.updateHandler_),this.track_=null}if(this.track_=t,this.track_){this.track_.mode="hidden";var i=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);i&&i.addEventListener("load",this.updateHandler_)}}},e.findChaptersTrack=function(){for(var t=this.player_.textTracks()||[],e=t.length-1;0<=e;e--){var i=t[e];if(i.kind===this.kind_)return i}},e.getMenuCaption=function(){return this.track_&&this.track_.label?this.track_.label:this.localize(Bt(this.kind_))},e.createMenu=function(){return this.options_.title=this.getMenuCaption(),n.prototype.createMenu.call(this)},e.createItems=function(){var t=[];if(!this.track_)return t;var e=this.track_.cues;if(!e)return t;for(var i=0,n=e.length;i<n;i++){var r=e[i],a=new tr(this.player_,{track:this.track_,cue:r});t.push(a)}return t},t}(Zn);er.prototype.kind_="chapters",er.prototype.controlText_="Chapters",jt.registerComponent("ChaptersButton",er);var ir=function(s){function t(t,e,i){var n;n=s.call(this,t,e,i)||this;var r=t.textTracks(),a=kt(m(m(n)),n.handleTracksChange);return r.addEventListener("change",a),n.on("dispose",function(){r.removeEventListener("change",a)}),n}f(t,s);var e=t.prototype;return e.handleTracksChange=function(t){for(var e=this.player().textTracks(),i=!1,n=0,r=e.length;n<r;n++){var a=e[n];if(a.kind!==this.kind_&&"showing"===a.mode){i=!0;break}}i?this.disable():this.enable()},e.buildCSSClass=function(){return"vjs-descriptions-button "+s.prototype.buildCSSClass.call(this)},e.buildWrapperCSSClass=function(){return"vjs-descriptions-button "+s.prototype.buildWrapperCSSClass.call(this)},t}(Zn);ir.prototype.kind_="descriptions",ir.prototype.controlText_="Descriptions",jt.registerComponent("DescriptionsButton",ir);var nr=function(n){function t(t,e,i){return n.call(this,t,e,i)||this}f(t,n);var e=t.prototype;return e.buildCSSClass=function(){return"vjs-subtitles-button "+n.prototype.buildCSSClass.call(this)},e.buildWrapperCSSClass=function(){return"vjs-subtitles-button "+n.prototype.buildWrapperCSSClass.call(this)},t}(Zn);nr.prototype.kind_="subtitles",nr.prototype.controlText_="Subtitles",jt.registerComponent("SubtitlesButton",nr);var rr=function(n){function t(t,e){var i;return e.track={player:t,kind:e.kind,label:e.kind+" settings",selectable:!1,default:!1,mode:"disabled"},e.selectable=!1,e.name="CaptionSettingsMenuItem",(i=n.call(this,t,e)||this).addClass("vjs-texttrack-settings"),i.controlText(", opens "+e.kind+" settings dialog"),i}return f(t,n),t.prototype.handleClick=function(t){this.player().getChild("textTrackSettings").open()},t}(Qn);jt.registerComponent("CaptionSettingsMenuItem",rr);var ar=function(n){function t(t,e,i){return n.call(this,t,e,i)||this}f(t,n);var e=t.prototype;return e.buildCSSClass=function(){return"vjs-captions-button "+n.prototype.buildCSSClass.call(this)},e.buildWrapperCSSClass=function(){return"vjs-captions-button "+n.prototype.buildWrapperCSSClass.call(this)},e.createItems=function(){var t=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(t.push(new rr(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),n.prototype.createItems.call(this,t)},t}(Zn);ar.prototype.kind_="captions",ar.prototype.controlText_="Captions",jt.registerComponent("CaptionsButton",ar);var sr=function(r){function t(){return r.apply(this,arguments)||this}return f(t,r),t.prototype.createEl=function(t,e,i){var n='<span class="vjs-menu-item-text">'+this.localize(this.options_.label);return"captions"===this.options_.track.kind&&(n+='\n        <span aria-hidden="true" class="vjs-icon-placeholder"></span>\n        <span class="vjs-control-text"> '+this.localize("Captions")+"</span>\n      "),n+="</span>",r.prototype.createEl.call(this,t,b({innerHTML:n},e),i)},t}(Qn);jt.registerComponent("SubsCapsMenuItem",sr);var or=function(n){function t(t,e){var i;return void 0===e&&(e={}),(i=n.call(this,t,e)||this).label_="subtitles",-1<["en","en-us","en-ca","fr-ca"].indexOf(i.player_.language_)&&(i.label_="captions"),i.menuButton_.controlText(Bt(i.label_)),i}f(t,n);var e=t.prototype;return e.buildCSSClass=function(){return"vjs-subs-caps-button "+n.prototype.buildCSSClass.call(this)},e.buildWrapperCSSClass=function(){return"vjs-subs-caps-button "+n.prototype.buildWrapperCSSClass.call(this)},e.createItems=function(){var t=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(t.push(new rr(this.player_,{kind:this.label_})),this.hideThreshold_+=1),t=n.prototype.createItems.call(this,t,sr)},t}(Zn);or.prototype.kinds_=["captions","subtitles"],or.prototype.controlText_="Subtitles",jt.registerComponent("SubsCapsButton",or);var ur=function(s){function t(t,e){var n,i=e.track,r=t.audioTracks();e.label=i.label||i.language||"Unknown",e.selected=i.enabled,(n=s.call(this,t,e)||this).track=i,n.addClass("vjs-"+i.kind+"-menu-item");var a=function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];n.handleTracksChange.apply(m(m(n)),e)};return r.addEventListener("change",a),n.on("dispose",function(){r.removeEventListener("change",a)}),n}f(t,s);var e=t.prototype;return e.createEl=function(t,e,i){var n='<span class="vjs-menu-item-text">'+this.localize(this.options_.label);return"main-desc"===this.options_.track.kind&&(n+='\n        <span aria-hidden="true" class="vjs-icon-placeholder"></span>\n        <span class="vjs-control-text"> '+this.localize("Descriptions")+"</span>\n      "),n+="</span>",s.prototype.createEl.call(this,t,b({innerHTML:n},e),i)},e.handleClick=function(t){var e=this.player_.audioTracks();s.prototype.handleClick.call(this,t);for(var i=0;i<e.length;i++){var n=e[i];n.enabled=n===this.track}},e.handleTracksChange=function(t){this.selected(this.track.enabled)},t}(Kn);jt.registerComponent("AudioTrackMenuItem",ur);var lr=function(i){function t(t,e){return void 0===e&&(e={}),e.tracks=t.audioTracks(),i.call(this,t,e)||this}f(t,i);var e=t.prototype;return e.buildCSSClass=function(){return"vjs-audio-button "+i.prototype.buildCSSClass.call(this)},e.buildWrapperCSSClass=function(){return"vjs-audio-button "+i.prototype.buildWrapperCSSClass.call(this)},e.createItems=function(t){void 0===t&&(t=[]),this.hideThreshold_=1;for(var e=this.player_.audioTracks(),i=0;i<e.length;i++){var n=e[i];t.push(new ur(this.player_,{track:n,selectable:!0,multiSelectable:!1}))}return t},t}($n);lr.prototype.controlText_="Audio Track",jt.registerComponent("AudioTrackButton",lr);var cr=function(a){function t(t,e){var i,n=e.rate,r=parseFloat(n,10);return e.label=n,e.selected=1===r,e.selectable=!0,e.multiSelectable=!1,(i=a.call(this,t,e)||this).label=n,i.rate=r,i.on(t,"ratechange",i.update),i}f(t,a);var e=t.prototype;return e.handleClick=function(t){a.prototype.handleClick.call(this),this.player().playbackRate(this.rate)},e.update=function(t){this.selected(this.player().playbackRate()===this.rate)},t}(Kn);cr.prototype.contentElType="button",jt.registerComponent("PlaybackRateMenuItem",cr);var hr=function(n){function t(t,e){var i;return(i=n.call(this,t,e)||this).updateVisibility(),i.updateLabel(),i.on(t,"loadstart",i.updateVisibility),i.on(t,"ratechange",i.updateLabel),i}f(t,n);var e=t.prototype;return e.createEl=function(){var t=n.prototype.createEl.call(this);return this.labelEl_=A("div",{className:"vjs-playback-rate-value",innerHTML:"1x"}),t.appendChild(this.labelEl_),t},e.dispose=function(){this.labelEl_=null,n.prototype.dispose.call(this)},e.buildCSSClass=function(){return"vjs-playback-rate "+n.prototype.buildCSSClass.call(this)},e.buildWrapperCSSClass=function(){return"vjs-playback-rate "+n.prototype.buildWrapperCSSClass.call(this)},e.createMenu=function(){var t=new Xn(this.player()),e=this.playbackRates();if(e)for(var i=e.length-1;0<=i;i--)t.addChild(new cr(this.player(),{rate:e[i]+"x"}));return t},e.updateARIAAttributes=function(){this.el().setAttribute("aria-valuenow",this.player().playbackRate())},e.handleClick=function(t){for(var e=this.player().playbackRate(),i=this.playbackRates(),n=i[0],r=0;r<i.length;r++)if(i[r]>e){n=i[r];break}this.player().playbackRate(n)},e.playbackRates=function(){return this.options_.playbackRates||this.options_.playerOptions&&this.options_.playerOptions.playbackRates},e.playbackRateSupported=function(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&0<this.playbackRates().length},e.updateVisibility=function(t){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")},e.updateLabel=function(t){this.playbackRateSupported()&&(this.labelEl_.innerHTML=this.player().playbackRate()+"x")},t}(Yn);hr.prototype.controlText_="Playback Rate",jt.registerComponent("PlaybackRateMenuButton",hr);var dr=function(t){function e(){return t.apply(this,arguments)||this}f(e,t);var i=e.prototype;return i.buildCSSClass=function(){return"vjs-spacer "+t.prototype.buildCSSClass.call(this)},i.createEl=function(){return t.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},e}(jt);jt.registerComponent("Spacer",dr);var pr=function(e){function t(){return e.apply(this,arguments)||this}f(t,e);var i=t.prototype;return i.buildCSSClass=function(){return"vjs-custom-control-spacer "+e.prototype.buildCSSClass.call(this)},i.createEl=function(){var t=e.prototype.createEl.call(this,{className:this.buildCSSClass()});return t.innerHTML=" ",t},t}(dr);jt.registerComponent("CustomControlSpacer",pr);var fr=function(t){function e(){return t.apply(this,arguments)||this}return f(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"})},e}(jt);fr.prototype.options_={children:["playToggle","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","fullscreenToggle"]},jt.registerComponent("ControlBar",fr);var mr=function(n){function t(t,e){var i;return(i=n.call(this,t,e)||this).on(t,"error",i.open),i}f(t,n);var e=t.prototype;return e.buildCSSClass=function(){return"vjs-error-display "+n.prototype.buildCSSClass.call(this)},e.content=function(){var t=this.player().error();return t?this.localize(t.message):""},t}(Oe);mr.prototype.options_=Nt(Oe.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),jt.registerComponent("ErrorDisplay",mr);var gr="vjs-text-track-settings",yr=["#000","Black"],vr=["#00F","Blue"],_r=["#0FF","Cyan"],br=["#0F0","Green"],Tr=["#F0F","Magenta"],Sr=["#F00","Red"],kr=["#FFF","White"],wr=["#FF0","Yellow"],Cr=["1","Opaque"],Er=["0.5","Semi-Transparent"],Ar=["0","Transparent"],Lr={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[yr,kr,Sr,br,vr,wr,Tr,_r]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[Cr,Er,Ar]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[kr,yr,Sr,br,vr,wr,Tr,_r]},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(t){return"1.00"===t?null:Number(t)}},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Transparency",options:[Cr,Er]},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:[Ar,Er,Cr]}};function Or(t,e){if(e&&(t=e(t)),t&&"none"!==t)return t}Lr.windowColor.options=Lr.backgroundColor.options;var Pr=function(n){function t(t,e){var i;return e.temporary=!1,(i=n.call(this,t,e)||this).updateDisplay=kt(m(m(i)),i.updateDisplay),i.fill(),i.hasBeenOpened_=i.hasBeenFilled_=!0,i.endDialog=A("p",{className:"vjs-control-text",textContent:i.localize("End of dialog window.")}),i.el().appendChild(i.endDialog),i.setDefaults(),void 0===e.persistTextTrackSettings&&(i.options_.persistTextTrackSettings=i.options_.playerOptions.persistTextTrackSettings),i.on(i.$(".vjs-done-button"),"click",function(){i.saveSettings(),i.close()}),i.on(i.$(".vjs-default-button"),"click",function(){i.setDefaults(),i.updateDisplay()}),o(Lr,function(t){i.on(i.$(t.selector),"change",i.updateDisplay)}),i.options_.persistTextTrackSettings&&i.restoreSettings(),i}f(t,n);var e=t.prototype;return e.dispose=function(){this.endDialog=null,n.prototype.dispose.call(this)},e.createElSelect_=function(t,e,i){var n=this;void 0===e&&(e=""),void 0===i&&(i="label");var r=Lr[t],a=r.id.replace("%s",this.id_),s=[e,a].join(" ").trim();return["<"+i+' id="'+a+'" class="'+("label"===i?"vjs-label":"")+'">',this.localize(r.label),"</"+i+">",'<select aria-labelledby="'+s+'">'].concat(r.options.map(function(t){var e=a+"-"+t[1].replace(/\W+/g,"");return['<option id="'+e+'" value="'+t[0]+'" ','aria-labelledby="'+s+" "+e+'">',n.localize(t[1]),"</option>"].join("")})).concat("</select>").join("")},e.createElFgColor_=function(){var t="captions-text-legend-"+this.id_;return['<fieldset class="vjs-fg-color vjs-track-setting">','<legend id="'+t+'">',this.localize("Text"),"</legend>",this.createElSelect_("color",t),'<span class="vjs-text-opacity vjs-opacity">',this.createElSelect_("textOpacity",t),"</span>","</fieldset>"].join("")},e.createElBgColor_=function(){var t="captions-background-"+this.id_;return['<fieldset class="vjs-bg-color vjs-track-setting">','<legend id="'+t+'">',this.localize("Background"),"</legend>",this.createElSelect_("backgroundColor",t),'<span class="vjs-bg-opacity vjs-opacity">',this.createElSelect_("backgroundOpacity",t),"</span>","</fieldset>"].join("")},e.createElWinColor_=function(){var t="captions-window-"+this.id_;return['<fieldset class="vjs-window-color vjs-track-setting">','<legend id="'+t+'">',this.localize("Window"),"</legend>",this.createElSelect_("windowColor",t),'<span class="vjs-window-opacity vjs-opacity">',this.createElSelect_("windowOpacity",t),"</span>","</fieldset>"].join("")},e.createElColors_=function(){return A("div",{className:"vjs-track-settings-colors",innerHTML:[this.createElFgColor_(),this.createElBgColor_(),this.createElWinColor_()].join("")})},e.createElFont_=function(){return A("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("")})},e.createElControls_=function(){var t=this.localize("restore all settings to the default values");return A("div",{className:"vjs-track-settings-controls",innerHTML:['<button type="button" class="vjs-default-button" title="'+t+'">',this.localize("Reset"),'<span class="vjs-control-text"> '+t+"</span>","</button>",'<button type="button" class="vjs-done-button">'+this.localize("Done")+"</button>"].join("")})},e.content=function(){return[this.createElColors_(),this.createElFont_(),this.createElControls_()]},e.label=function(){return this.localize("Caption Settings Dialog")},e.description=function(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")},e.buildCSSClass=function(){return n.prototype.buildCSSClass.call(this)+" vjs-text-track-settings"},e.getValues=function(){var i,n,t,s=this;return n=function(t,e,i){var n,r,a=(n=s.$(e.selector),r=e.parser,Or(n.options[n.options.selectedIndex].value,r));return void 0!==a&&(t[i]=a),t},void 0===(t={})&&(t=0),r(i=Lr).reduce(function(t,e){return n(t,i[e],e)},t)},e.setValues=function(i){var n=this;o(Lr,function(t,e){!function(t,e,i){if(e)for(var n=0;n<t.options.length;n++)if(Or(t.options[n].value,i)===e){t.selectedIndex=n;break}}(n.$(t.selector),i[e],t.parser)})},e.setDefaults=function(){var i=this;o(Lr,function(t){var e=t.hasOwnProperty("default")?t.default:0;i.$(t.selector).selectedIndex=e})},e.restoreSettings=function(){var t;try{t=JSON.parse(v.localStorage.getItem(gr))}catch(t){g.warn(t)}t&&this.setValues(t)},e.saveSettings=function(){if(this.options_.persistTextTrackSettings){var t=this.getValues();try{Object.keys(t).length?v.localStorage.setItem(gr,JSON.stringify(t)):v.localStorage.removeItem(gr)}catch(t){g.warn(t)}}},e.updateDisplay=function(){var t=this.player_.getChild("textTrackDisplay");t&&t.updateDisplay()},e.conditionalBlur_=function(){this.previouslyActiveEl_=null,this.off(d,"keydown",this.handleKeyDown);var t=this.player_.controlBar,e=t&&t.subsCapsButton,i=t&&t.captionsButton;e?e.focus():i&&i.focus()},t}(Oe);jt.registerComponent("TextTrackSettings",Pr);var Ur=function(a){function t(t,e){var i,n=e.ResizeObserver||v.ResizeObserver;null===e.ResizeObserver&&(n=!1);var r=Nt({createEl:!n,reportTouchActivity:!1},e);return(i=a.call(this,t,r)||this).ResizeObserver=e.ResizeObserver||v.ResizeObserver,i.loadListener_=null,i.resizeObserver_=null,i.debouncedHandler_=function(n,r,a,s){var o;void 0===s&&(s=v);var t=function(){var t=this,e=arguments,i=function(){i=o=null,a||n.apply(t,e)};!o&&a&&n.apply(t,e),s.clearTimeout(o),o=s.setTimeout(i,r)};return t.cancel=function(){s.clearTimeout(o),o=null},t}(function(){i.resizeHandler()},100,!1,m(m(i))),n?(i.resizeObserver_=new i.ResizeObserver(i.debouncedHandler_),i.resizeObserver_.observe(t.el())):(i.loadListener_=function(){i.el_&&i.el_.contentWindow&&ht(i.el_.contentWindow,"resize",i.debouncedHandler_)},i.one("load",i.loadListener_)),i}f(t,a);var e=t.prototype;return e.createEl=function(){return a.prototype.createEl.call(this,"iframe",{className:"vjs-resize-manager"})},e.resizeHandler=function(){this.player_&&this.player_.trigger&&this.player_.trigger("playerresize")},e.dispose=function(){this.debouncedHandler_&&this.debouncedHandler_.cancel(),this.resizeObserver_&&(this.player_.el()&&this.resizeObserver_.unobserve(this.player_.el()),this.resizeObserver_.disconnect()),this.el_&&this.el_.contentWindow&&dt(this.el_.contentWindow,"resize",this.debouncedHandler_),this.loadListener_&&this.off("load",this.loadListener_),this.ResizeObserver=null,this.resizeObserver=null,this.debouncedHandler_=null,this.loadListener_=null},t}(jt);jt.registerComponent("ResizeManager",Ur);var xr=function(t){var e=t.el();if(e.hasAttribute("src"))return t.triggerSourceset(e.src),!0;var i=t.$$("source"),n=[],r="";if(!i.length)return!1;for(var a=0;a<i.length;a++){var s=i[a].src;s&&-1===n.indexOf(s)&&n.push(s)}return!!n.length&&(1===n.length&&(r=n[0]),t.triggerSourceset(r),!0)},Ir=Object.defineProperty({},"innerHTML",{get:function(){return this.cloneNode(!0).innerHTML},set:function(t){var e=d.createElement(this.nodeName.toLowerCase());e.innerHTML=t;for(var i=d.createDocumentFragment();e.childNodes.length;)i.appendChild(e.childNodes[0]);return this.innerText="",v.Element.prototype.appendChild.call(this,i),this.innerHTML}}),Dr=function(t,e){for(var i={},n=0;n<t.length&&!((i=Object.getOwnPropertyDescriptor(t[n],e))&&i.set&&i.get);n++);return i.enumerable=!0,i.configurable=!0,i},Rr=function(a){var s=a.el();if(!s.resetSourceWatch_){var e={},t=Dr([a.el(),v.HTMLMediaElement.prototype,v.Element.prototype,Ir],"innerHTML"),i=function(r){return function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];var n=r.apply(s,e);return xr(a),n}};["append","appendChild","insertAdjacentHTML"].forEach(function(t){s[t]&&(e[t]=s[t],s[t]=i(e[t]))}),Object.defineProperty(s,"innerHTML",Nt(t,{set:i(t.set)})),s.resetSourceWatch_=function(){s.resetSourceWatch_=null,Object.keys(e).forEach(function(t){s[t]=e[t]}),Object.defineProperty(s,"innerHTML",t)},a.one("sourceset",s.resetSourceWatch_)}},Mr=Object.defineProperty({},"src",{get:function(){return this.hasAttribute("src")?We(v.Element.prototype.getAttribute.call(this,"src")):""},set:function(t){return v.Element.prototype.setAttribute.call(this,"src",t),t}}),Br=function(n){if(n.featuresSourceset){var r=n.el();if(!r.resetSourceset_){var i=Dr([n.el(),v.HTMLMediaElement.prototype,Mr],"src"),a=r.setAttribute,e=r.load;Object.defineProperty(r,"src",Nt(i,{set:function(t){var e=i.set.call(r,t);return n.triggerSourceset(r.src),e}})),r.setAttribute=function(t,e){var i=a.call(r,t,e);return/src/i.test(t)&&n.triggerSourceset(r.src),i},r.load=function(){var t=e.call(r);return xr(n)||(n.triggerSourceset(""),Rr(n)),t},r.currentSrc?n.triggerSourceset(r.currentSrc):xr(n)||Rr(n),r.resetSourceset_=function(){r.resetSourceset_=null,r.load=e,r.setAttribute=a,Object.defineProperty(r,"src",i),r.resetSourceWatch_&&r.resetSourceWatch_()}}}};function Nr(){var t=e(["Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\n            This may prevent text tracks from loading."]);return Nr=function(){return t},t}var jr=function(c){function o(t,e){var i;i=c.call(this,t,e)||this;var n=t.source,r=!1;if(n&&(i.el_.currentSrc!==n.src||t.tag&&3===t.tag.initNetworkState_)?i.setSource(n):i.handleLateInit_(i.el_),t.enableSourceset&&i.setupSourcesetHandling_(),i.el_.hasChildNodes()){for(var a=i.el_.childNodes,s=a.length,o=[];s--;){var u=a[s];"track"===u.nodeName.toLowerCase()&&(i.featuresNativeTextTracks?(i.remoteTextTrackEls().addTrackElement_(u),i.remoteTextTracks().addTrack(u.track),i.textTracks().addTrack(u.track),r||i.el_.hasAttribute("crossorigin")||!Xe(u.src)||(r=!0)):o.push(u))}for(var l=0;l<o.length;l++)i.el_.removeChild(o[l])}return i.proxyNativeTracks_(),i.featuresNativeTextTracks&&r&&g.warn(_(Nr())),i.restoreMetadataTracksInIOSNativePlayer_(),(ue||Yt||te)&&!0===t.nativeControlsForTouch&&i.setControls(!0),i.proxyWebkitFullscreen_(),i.triggerReady(),i}f(o,c);var t=o.prototype;return t.dispose=function(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_(),o.disposeMediaElement(this.el_),this.options_=null,c.prototype.dispose.call(this)},t.setupSourcesetHandling_=function(){Br(this)},t.restoreMetadataTracksInIOSNativePlayer_=function(){var n,r=this.textTracks(),t=function(){n=[];for(var t=0;t<r.length;t++){var e=r[t];"metadata"===e.kind&&n.push({track:e,storedMode:e.mode})}};t(),r.addEventListener("change",t),this.on("dispose",function(){return r.removeEventListener("change",t)});var e=function t(){for(var e=0;e<n.length;e++){var i=n[e];"disabled"===i.track.mode&&i.track.mode!==i.storedMode&&(i.track.mode=i.storedMode)}r.removeEventListener("change",t)};this.on("webkitbeginfullscreen",function(){r.removeEventListener("change",t),r.removeEventListener("change",e),r.addEventListener("change",e)}),this.on("webkitendfullscreen",function(){r.removeEventListener("change",t),r.addEventListener("change",t),r.removeEventListener("change",e)})},t.overrideNative_=function(t,e){var i=this;if(e===this["featuresNative"+t+"Tracks"]){var n=t.toLowerCase();this[n+"TracksListeners_"]&&Object.keys(this[n+"TracksListeners_"]).forEach(function(t){i.el()[n+"Tracks"].removeEventListener(t,i[n+"TracksListeners_"][t])}),this["featuresNative"+t+"Tracks"]=!e,this[n+"TracksListeners_"]=null,this.proxyNativeTracksForType_(n)}},t.overrideNativeAudioTracks=function(t){this.overrideNative_("Audio",t)},t.overrideNativeVideoTracks=function(t){this.overrideNative_("Video",t)},t.proxyNativeTracksForType_=function(t){var n=this,e=bi[t],r=this.el()[e.getterName],a=this[e.getterName]();if(this["featuresNative"+e.capitalName+"Tracks"]&&r&&r.addEventListener){var s={change:function(t){a.trigger({type:"change",target:a,currentTarget:a,srcElement:a})},addtrack:function(t){a.addTrack(t.track)},removetrack:function(t){a.removeTrack(t.track)}},i=function(){for(var t=[],e=0;e<a.length;e++){for(var i=!1,n=0;n<r.length;n++)if(r[n]===a[e]){i=!0;break}i||t.push(a[e])}for(;t.length;)a.removeTrack(t.shift())};this[e.getterName+"Listeners_"]=s,Object.keys(s).forEach(function(e){var i=s[e];r.addEventListener(e,i),n.on("dispose",function(t){return r.removeEventListener(e,i)})}),this.on("loadstart",i),this.on("dispose",function(t){return n.off("loadstart",i)})}},t.proxyNativeTracks_=function(){var e=this;bi.names.forEach(function(t){e.proxyNativeTracksForType_(t)})},t.createEl=function(){var t=this.options_.tag;if(!t||!this.options_.playerElIngest&&!this.movingMediaElementInDOM){if(t){var e=t.cloneNode(!0);t.parentNode&&t.parentNode.insertBefore(e,t),o.disposeMediaElement(t),t=e}else{t=d.createElement("video");var i=Nt({},this.options_.tag&&R(this.options_.tag));ue&&!0===this.options_.nativeControlsForTouch||delete i.controls,D(t,b(i,{id:this.options_.techId,class:"vjs-tech"}))}t.playerId=this.options_.playerId}"undefined"!=typeof this.options_.preload&&B(t,"preload",this.options_.preload);for(var n=["loop","muted","playsinline","autoplay"],r=0;r<n.length;r++){var a=n[r],s=this.options_[a];"undefined"!=typeof s&&(s?B(t,a,a):N(t,a),t[a]=s)}return t},t.handleLateInit_=function(t){if(0!==t.networkState&&3!==t.networkState){if(0===t.readyState){var e=!1,i=function(){e=!0};this.on("loadstart",i);var n=function(){e||this.trigger("loadstart")};return this.on("loadedmetadata",n),void this.ready(function(){this.off("loadstart",i),this.off("loadedmetadata",n),e||this.trigger("loadstart")})}var r=["loadstart"];r.push("loadedmetadata"),2<=t.readyState&&r.push("loadeddata"),3<=t.readyState&&r.push("canplay"),4<=t.readyState&&r.push("canplaythrough"),this.ready(function(){r.forEach(function(t){this.trigger(t)},this)})}},t.setCurrentTime=function(t){try{this.el_.currentTime=t}catch(t){g(t,"Video is not ready. (Video.js)")}},t.duration=function(){var e=this;if(this.el_.duration===1/0&&Jt&&ne&&0===this.el_.currentTime){return this.on("timeupdate",function t(){0<e.el_.currentTime&&(e.el_.duration===1/0&&e.trigger("durationchange"),e.off("timeupdate",t))}),NaN}return this.el_.duration||NaN},t.width=function(){return this.el_.offsetWidth},t.height=function(){return this.el_.offsetHeight},t.proxyWebkitFullscreen_=function(){var t=this;if("webkitDisplayingFullscreen"in this.el_){var e=function(){this.trigger("fullscreenchange",{isFullscreen:!1})},i=function(){"webkitPresentationMode"in this.el_&&"picture-in-picture"!==this.el_.webkitPresentationMode&&(this.one("webkitendfullscreen",e),this.trigger("fullscreenchange",{isFullscreen:!0}))};this.on("webkitbeginfullscreen",i),this.on("dispose",function(){t.off("webkitbeginfullscreen",i),t.off("webkitendfullscreen",e)})}},t.supportsFullScreen=function(){if("function"==typeof this.el_.webkitEnterFullScreen){var t=v.navigator&&v.navigator.userAgent||"";if(/Android/.test(t)||!/Chrome|Mac OS X 10.5/.test(t))return!0}return!1},t.enterFullScreen=function(){var t=this.el_;t.paused&&t.networkState<=t.HAVE_METADATA?(this.el_.play(),this.setTimeout(function(){t.pause(),t.webkitEnterFullScreen()},0)):t.webkitEnterFullScreen()},t.exitFullScreen=function(){this.el_.webkitExitFullScreen()},t.src=function(t){if(void 0===t)return this.el_.src;this.setSrc(t)},t.reset=function(){o.resetMediaElement(this.el_)},t.currentSrc=function(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc},t.setControls=function(t){this.el_.controls=!!t},t.addTextTrack=function(t,e,i){return this.featuresNativeTextTracks?this.el_.addTextTrack(t,e,i):c.prototype.addTextTrack.call(this,t,e,i)},t.createRemoteTextTrack=function(t){if(!this.featuresNativeTextTracks)return c.prototype.createRemoteTextTrack.call(this,t);var e=d.createElement("track");return t.kind&&(e.kind=t.kind),t.label&&(e.label=t.label),(t.language||t.srclang)&&(e.srclang=t.language||t.srclang),t.default&&(e.default=t.default),t.id&&(e.id=t.id),t.src&&(e.src=t.src),e},t.addRemoteTextTrack=function(t,e){var i=c.prototype.addRemoteTextTrack.call(this,t,e);return this.featuresNativeTextTracks&&this.el().appendChild(i),i},t.removeRemoteTextTrack=function(t){if(c.prototype.removeRemoteTextTrack.call(this,t),this.featuresNativeTextTracks)for(var e=this.$$("track"),i=e.length;i--;)t!==e[i]&&t!==e[i].track||this.el().removeChild(e[i])},t.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),v.performance&&"function"==typeof v.performance.now?t.creationTime=v.performance.now():v.performance&&v.performance.timing&&"number"==typeof v.performance.timing.navigationStart&&(t.creationTime=v.Date.now()-v.performance.timing.navigationStart),t},o}(Qi);if(k()){jr.TEST_VID=d.createElement("video");var Fr=d.createElement("track");Fr.kind="captions",Fr.srclang="en",Fr.label="English",jr.TEST_VID.appendChild(Fr)}jr.isSupported=function(){try{jr.TEST_VID.volume=.5}catch(t){return!1}return!(!jr.TEST_VID||!jr.TEST_VID.canPlayType)},jr.canPlayType=function(t){return jr.TEST_VID.canPlayType(t)},jr.canPlaySource=function(t,e){return jr.canPlayType(t.type)},jr.canControlVolume=function(){try{var t=jr.TEST_VID.volume;return jr.TEST_VID.volume=t/2+.1,t!==jr.TEST_VID.volume}catch(t){return!1}},jr.canMuteVolume=function(){try{var t=jr.TEST_VID.muted;return jr.TEST_VID.muted=!t,jr.TEST_VID.muted?B(jr.TEST_VID,"muted","muted"):N(jr.TEST_VID,"muted"),t!==jr.TEST_VID.muted}catch(t){return!1}},jr.canControlPlaybackRate=function(){if(Jt&&ne&&re<58)return!1;try{var t=jr.TEST_VID.playbackRate;return jr.TEST_VID.playbackRate=t/2+.1,t!==jr.TEST_VID.playbackRate}catch(t){return!1}},jr.canOverrideAttributes=function(){try{var t=function(){};Object.defineProperty(d.createElement("video"),"src",{get:t,set:t}),Object.defineProperty(d.createElement("audio"),"src",{get:t,set:t}),Object.defineProperty(d.createElement("video"),"innerHTML",{get:t,set:t}),Object.defineProperty(d.createElement("audio"),"innerHTML",{get:t,set:t})}catch(t){return!1}return!0},jr.supportsNativeTextTracks=function(){return oe||Kt&&ne},jr.supportsNativeVideoTracks=function(){return!(!jr.TEST_VID||!jr.TEST_VID.videoTracks)},jr.supportsNativeAudioTracks=function(){return!(!jr.TEST_VID||!jr.TEST_VID.audioTracks)},jr.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","resize","volumechange"],jr.prototype.featuresVolumeControl=jr.canControlVolume(),jr.prototype.featuresMuteControl=jr.canMuteVolume(),jr.prototype.featuresPlaybackRate=jr.canControlPlaybackRate(),jr.prototype.featuresSourceset=jr.canOverrideAttributes(),jr.prototype.movingMediaElementInDOM=!Kt,jr.prototype.featuresFullscreenResize=!0,jr.prototype.featuresProgressEvents=!0,jr.prototype.featuresTimeupdateEvents=!0,jr.prototype.featuresNativeTextTracks=jr.supportsNativeTextTracks(),jr.prototype.featuresNativeVideoTracks=jr.supportsNativeVideoTracks(),jr.prototype.featuresNativeAudioTracks=jr.supportsNativeAudioTracks();var Vr=jr.TEST_VID&&jr.TEST_VID.constructor.prototype.canPlayType,Hr=/^application\/(?:x-|vnd\.apple\.)mpegurl/i;function qr(){var t=e(["\n        Using the tech directly can be dangerous. I hope you know what you're doing.\n        See https://github.com/videojs/video.js/issues/2617 for more info.\n      "]);return qr=function(){return t},t}jr.patchCanPlayType=function(){4<=Zt&&!ee&&!ne&&(jr.TEST_VID.constructor.prototype.canPlayType=function(t){return t&&Hr.test(t)?"maybe":Vr.call(this,t)})},jr.unpatchCanPlayType=function(){var t=jr.TEST_VID.constructor.prototype.canPlayType;return jr.TEST_VID.constructor.prototype.canPlayType=Vr,t},jr.patchCanPlayType(),jr.disposeMediaElement=function(t){if(t){for(t.parentNode&&t.parentNode.removeChild(t);t.hasChildNodes();)t.removeChild(t.firstChild);t.removeAttribute("src"),"function"==typeof t.load&&function(){try{t.load()}catch(t){}}()}},jr.resetMediaElement=function(t){if(t){for(var e=t.querySelectorAll("source"),i=e.length;i--;)t.removeChild(e[i]);t.removeAttribute("src"),"function"==typeof t.load&&function(){try{t.load()}catch(t){}}()}},["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach(function(t){jr.prototype[t]=function(){return this.el_[t]||this.el_.hasAttribute(t)}}),["muted","defaultMuted","autoplay","loop","playsinline"].forEach(function(e){jr.prototype["set"+Bt(e)]=function(t){(this.el_[e]=t)?this.el_.setAttribute(e,e):this.el_.removeAttribute(e)}}),["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","defaultPlaybackRate","played","networkState","readyState","videoWidth","videoHeight"].forEach(function(t){jr.prototype[t]=function(){return this.el_[t]}}),["volume","src","poster","preload","playbackRate","defaultPlaybackRate"].forEach(function(e){jr.prototype["set"+Bt(e)]=function(t){this.el_[e]=t}}),["pause","load","play"].forEach(function(t){jr.prototype[t]=function(){return this.el_[t]()}}),Qi.withSourceHandlers(jr),jr.nativeSourceHandler={},jr.nativeSourceHandler.canPlayType=function(t){try{return jr.TEST_VID.canPlayType(t)}catch(t){return""}},jr.nativeSourceHandler.canHandleSource=function(t,e){if(t.type)return jr.nativeSourceHandler.canPlayType(t.type);if(t.src){var i=Ge(t.src);return jr.nativeSourceHandler.canPlayType("video/"+i)}return""},jr.nativeSourceHandler.handleSource=function(t,e,i){e.setSrc(t.src)},jr.nativeSourceHandler.dispose=function(){},jr.registerSourceHandler(jr.nativeSourceHandler),Qi.registerTech("Html5",jr);var zr=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"],Wr={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},Gr=["tiny","xsmall","small","medium","large","xlarge","huge"],Xr={};Gr.forEach(function(t){var e="x"===t.charAt(0)?"x-"+t.substring(1):t;Xr[t]="vjs-layout-"+e});var Yr={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0},$r=function(c){function h(t,e,i){var n;if(t.id=t.id||e.id||"vjs_video_"+tt(),(e=b(h.getTagSettings(t),e)).initChildren=!1,e.createEl=!1,e.evented=!1,e.reportTouchActivity=!1,!e.language)if("function"==typeof t.closest){var r=t.closest("[lang]");r&&r.getAttribute&&(e.language=r.getAttribute("lang"))}else for(var a=t;a&&1===a.nodeType;){if(R(a).hasOwnProperty("lang")){e.language=a.getAttribute("lang");break}a=a.parentNode}if((n=c.call(this,null,e,i)||this).log=y(n.id_),n.isPosterFromTech_=!1,n.queuedCallbacks_=[],n.isReady_=!1,n.hasStarted_=!1,n.userActive_=!1,!n.options_||!n.options_.techOrder||!n.options_.techOrder.length)throw new Error("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");if(n.tag=t,n.tagAttributes=t&&R(t),n.language(n.options_.language),e.languages){var s={};Object.getOwnPropertyNames(e.languages).forEach(function(t){s[t.toLowerCase()]=e.languages[t]}),n.languages_=s}else n.languages_=h.prototype.options_.languages;n.cache_={},n.poster_=e.poster||"",n.controls_=!!e.controls,n.cache_.lastVolume=1,t.controls=!1,t.removeAttribute("controls"),t.hasAttribute("autoplay")?n.options_.autoplay=!0:n.autoplay(n.options_.autoplay),n.scrubbing_=!1,n.el_=n.createEl(),n.cache_.lastPlaybackRate=n.defaultPlaybackRate(),Dt(m(m(n)),{eventBusKey:"el_"});var o=Nt(n.options_);if(e.plugins){var u=e.plugins;Object.keys(u).forEach(function(t){if("function"!=typeof this[t])throw new Error('plugin "'+t+'" does not exist');this[t](u[t])},m(m(n)))}n.options_.playerOptions=o,n.middleware_=[],n.initChildren(),n.isAudio("audio"===t.nodeName.toLowerCase()),n.controls()?n.addClass("vjs-controls-enabled"):n.addClass("vjs-controls-disabled"),n.el_.setAttribute("role","region"),n.isAudio()?n.el_.setAttribute("aria-label",n.localize("Audio Player")):n.el_.setAttribute("aria-label",n.localize("Video Player")),n.isAudio()&&n.addClass("vjs-audio"),n.flexNotSupported_()&&n.addClass("vjs-no-flex"),Kt||n.addClass("vjs-workinghover"),h.players[n.id_]=m(m(n));var l=p.split(".")[0];return n.addClass("vjs-v"+l),n.userActive(!0),n.reportUserActivity(),n.one("play",n.listenForUserActivity_),n.on("fullscreenchange",n.handleFullscreenChange_),n.on("stageclick",n.handleStageClick_),n.breakpoints(n.options_.breakpoints),n.responsive(n.options_.responsive),n.changingSrc_=!1,n.playWaitingForReady_=!1,n.playOnLoadstart_=null,n}f(h,c);var t=h.prototype;return t.dispose=function(){this.trigger("dispose"),this.off("dispose"),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),h.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),Zi[this.id()]=null,c.prototype.dispose.call(this)},t.createEl=function(){var e,i=this.tag,t=this.playerElIngest_=i.parentNode&&i.parentNode.hasAttribute&&i.parentNode.hasAttribute("data-vjs-player"),n="video-js"===this.tag.tagName.toLowerCase();t?e=this.el_=i.parentNode:n||(e=this.el_=c.prototype.createEl.call(this,"div"));var r=R(i);if(n){for(e=this.el_=i,i=this.tag=d.createElement("video");e.children.length;)i.appendChild(e.firstChild);P(e,"video-js")||U(e,"video-js"),e.appendChild(i),t=this.playerElIngest_=e,Object.keys(e).forEach(function(t){i[t]=e[t]})}if(i.setAttribute("tabindex","-1"),r.tabindex="-1",ae&&(i.setAttribute("role","application"),r.role="application"),i.removeAttribute("width"),i.removeAttribute("height"),"width"in r&&delete r.width,"height"in r&&delete r.height,Object.getOwnPropertyNames(r).forEach(function(t){n&&"class"===t||e.setAttribute(t,r[t]),n&&i.setAttribute(t,r[t])}),i.playerId=i.id,i.id+="_html5_api",i.className="vjs-tech",i.player=e.player=this,this.addClass("vjs-paused"),!0!==v.VIDEOJS_NO_DYNAMIC_STYLE){this.styleEl_=Tt("vjs-styles-dimensions");var a=K(".vjs-styles-defaults"),s=K("head");s.insertBefore(this.styleEl_,a?a.nextSibling:s.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);for(var o=i.getElementsByTagName("a"),u=0;u<o.length;u++){var l=o.item(u);U(l,"vjs-hidden"),l.setAttribute("hidden","hidden")}return i.initNetworkState_=i.networkState,i.parentNode&&!t&&i.parentNode.insertBefore(e,i),O(i,e),this.children_.unshift(i),this.el_.setAttribute("lang",this.language_),this.el_=e},t.width=function(t){return this.dimension("width",t)},t.height=function(t){return this.dimension("height",t)},t.dimension=function(t,e){var i=t+"_";if(void 0===e)return this[i]||0;if(""===e)return this[i]=void 0,void this.updateStyleEl_();var n=parseFloat(e);isNaN(n)?g.error('Improper value "'+e+'" supplied for for '+t):(this[i]=n,this.updateStyleEl_())},t.fluid=function(t){if(void 0===t)return!!this.fluid_;this.fluid_=!!t,t?(this.addClass("vjs-fluid"),this.fill(!1)):this.removeClass("vjs-fluid"),this.updateStyleEl_()},t.fill=function(t){if(void 0===t)return!!this.fill_;this.fill_=!!t,t?(this.addClass("vjs-fill"),this.fluid(!1)):this.removeClass("vjs-fill")},t.aspectRatio=function(t){if(void 0===t)return this.aspectRatio_;if(!/^\d+\:\d+$/.test(t))throw new Error("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.aspectRatio_=t,this.fluid(!0),this.updateStyleEl_()},t.updateStyleEl_=function(){if(!0!==v.VIDEOJS_NO_DYNAMIC_STYLE){var t,e,i,n=(void 0!==this.aspectRatio_&&"auto"!==this.aspectRatio_?this.aspectRatio_:0<this.videoWidth()?this.videoWidth()+":"+this.videoHeight():"16:9").split(":"),r=n[1]/n[0];t=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/r:this.videoWidth()||300,e=void 0!==this.height_?this.height_:t*r,i=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(i),St(this.styleEl_,"\n      ."+i+" {\n        width: "+t+"px;\n        height: "+e+"px;\n      }\n\n      ."+i+".vjs-fluid {\n        padding-top: "+100*r+"%;\n      }\n    ")}else{var a="number"==typeof this.width_?this.width_:this.options_.width,s="number"==typeof this.height_?this.height_:this.options_.height,o=this.tech_&&this.tech_.el();o&&(0<=a&&(o.width=a),0<=s&&(o.height=s))}},t.loadTech_=function(t,e){var i=this;this.tech_&&this.unloadTech_();var n=Bt(t),r=t.charAt(0).toLowerCase()+t.slice(1);"Html5"!==n&&this.tag&&(Qi.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=n,this.isReady_=!1;var a={source:e,autoplay:"string"!=typeof this.autoplay()&&this.autoplay(),nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:this.id()+"_"+r+"_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};Si.names.forEach(function(t){var e=Si[t];a[e.getterName]=i[e.privateName]}),b(a,this.options_[n]),b(a,this.options_[r]),b(a,this.options_[t.toLowerCase()]),this.tag&&(a.tag=this.tag),e&&e.src===this.cache_.src&&0<this.cache_.currentTime&&(a.startTime=this.cache_.currentTime);var s=Qi.getTech(t);if(!s)throw new Error("No Tech named '"+n+"' exists! '"+n+"' should be registered using videojs.registerTech()'");this.tech_=new s(a),this.tech_.ready(kt(this,this.handleTechReady_),!0),Ae(this.textTracksJson_||[],this.tech_),zr.forEach(function(t){i.on(i.tech_,t,i["handleTech"+Bt(t)+"_"])}),Object.keys(Wr).forEach(function(e){i.on(i.tech_,e,function(t){0===i.tech_.playbackRate()&&i.tech_.seeking()?i.queuedCallbacks_.push({callback:i["handleTech"+Wr[e]+"_"].bind(i),event:t}):i["handleTech"+Wr[e]+"_"](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_,"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"===n&&this.tag||O(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)},t.unloadTech_=function(){var i=this;Si.names.forEach(function(t){var e=Si[t];i[e.privateName]=i[e.getterName]()}),this.textTracksJson_=Ee(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_="",this.trigger("posterchange")),this.isPosterFromTech_=!1},t.tech=function(t){return void 0===t&&g.warn(_(qr())),this.tech_},t.addTechControlsListeners_=function(){this.removeTechControlsListeners_(),this.on(this.tech_,"mousedown",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_)},t.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_,"mousedown",this.handleTechClick_),this.off(this.tech_,"dblclick",this.handleTechDoubleClick_)},t.handleTechReady_=function(){this.triggerReady(),this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_()},t.handleTechLoadStart_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-seeking"),this.error(null),this.paused()?(this.hasStarted(!1),this.trigger("loadstart")):(this.trigger("loadstart"),this.trigger("firstplay")),this.manualAutoplay_(this.autoplay())},t.manualAutoplay_=function(e){var i=this;if(this.tech_&&"string"==typeof e){var t,n=function(){var e=i.muted();i.muted(!0);var t=i.play();if(t&&t.then&&t.catch)return t.catch(function(t){i.muted(e)})};if("any"===e?(t=this.play())&&t.then&&t.catch&&t.catch(function(){return n()}):t="muted"===e?n():this.play(),t&&t.then&&t.catch)return t.then(function(){i.trigger({type:"autoplay-success",autoplay:e})}).catch(function(t){i.trigger({type:"autoplay-failure",autoplay:e})})}},t.updateSourceCaches_=function(t){void 0===t&&(t="");var e=t,i="";"string"!=typeof e&&(e=t.src,i=t.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],e&&!i&&(i=function(t,e){if(!e)return"";if(t.cache_.source.src===e&&t.cache_.source.type)return t.cache_.source.type;var i=t.cache_.sources.filter(function(t){return t.src===e});if(i.length)return i[0].type;for(var n=t.$$("source"),r=0;r<n.length;r++){var a=n[r];if(a.type&&a.src&&a.src===e)return a.type}return cn(e)}(this,e)),this.cache_.source=Nt({},t,{src:e,type:i});for(var n=this.cache_.sources.filter(function(t){return t.src&&t.src===e}),r=[],a=this.$$("source"),s=[],o=0;o<a.length;o++){var u=R(a[o]);r.push(u),u.src&&u.src===e&&s.push(u.src)}s.length&&!n.length?this.cache_.sources=r:n.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=e},t.handleTechSourceset_=function(t){var n=this;if(!this.changingSrc_){var e=function(t){return n.updateSourceCaches_(t)},i=this.currentSource().src,r=t.src;if(i&&!/^blob:/.test(i)&&/^blob:/.test(r)&&(!this.lastSource_||this.lastSource_.tech!==r&&this.lastSource_.player!==i)&&(e=function(){}),e(r),!t.src){this.tech_.one(["sourceset","loadstart"],function t(e){if("sourceset"!==e.type){var i=n.techGet("currentSrc");n.lastSource_.tech=i,n.updateSourceCaches_(i)}n.tech_.off(["sourceset","loadstart"],t)})}}this.lastSource_={player:this.currentSource().src,tech:t.src},this.trigger({src:t.src,type:"sourceset"})},t.hasStarted=function(t){if(void 0===t)return this.hasStarted_;t!==this.hasStarted_&&(this.hasStarted_=t,this.hasStarted_?(this.addClass("vjs-has-started"),this.trigger("firstplay")):this.removeClass("vjs-has-started"))},t.handleTechPlay_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")},t.handleTechRateChange_=function(){0<this.tech_.playbackRate()&&0===this.cache_.lastPlaybackRate&&(this.queuedCallbacks_.forEach(function(t){return t.callback(t.event)}),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger("ratechange")},t.handleTechWaiting_=function(){var t=this;this.addClass("vjs-waiting"),this.trigger("waiting"),this.one("timeupdate",function(){return t.removeClass("vjs-waiting")})},t.handleTechCanPlay_=function(){this.removeClass("vjs-waiting"),this.trigger("canplay")},t.handleTechCanPlayThrough_=function(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")},t.handleTechPlaying_=function(){this.removeClass("vjs-waiting"),this.trigger("playing")},t.handleTechSeeking_=function(){this.addClass("vjs-seeking"),this.trigger("seeking")},t.handleTechSeeked_=function(){this.removeClass("vjs-seeking"),this.trigger("seeked")},t.handleTechFirstPlay_=function(){this.options_.starttime&&(g.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")},t.handleTechPause_=function(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")},t.handleTechEnded_=function(){this.addClass("vjs-ended"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")},t.handleTechDurationChange_=function(){this.duration(this.techGet_("duration"))},t.handleTechClick_=function(t){$(t)&&this.controls_&&(this.paused()?we(this.play()):this.pause())},t.handleTechDoubleClick_=function(e){this.controls_&&(Array.prototype.some.call(this.$$(".vjs-control-bar, .vjs-modal-dialog"),function(t){return t.contains(e.target)})||(this.isFullscreen()?this.exitFullscreen():this.requestFullscreen()))},t.handleTechTap_=function(){this.userActive(!this.userActive())},t.handleTechTouchStart_=function(){this.userWasActive=this.userActive()},t.handleTechTouchMove_=function(){this.userWasActive&&this.reportUserActivity()},t.handleTechTouchEnd_=function(t){t.preventDefault()},t.handleFullscreenChange_=function(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")},t.handleStageClick_=function(){this.reportUserActivity()},t.handleTechFullscreenChange_=function(t,e){e&&this.isFullscreen(e.isFullscreen),this.trigger("fullscreenchange")},t.handleTechError_=function(){var t=this.tech_.error();this.error(t)},t.handleTechTextData_=function(){var t=null;1<arguments.length&&(t=arguments[1]),this.trigger("textdata",t)},t.getCache=function(){return this.cache_},t.techCall_=function(r,a){this.ready(function(){if(r in an)return t=this.middleware_,e=this.tech_,n=a,e[i=r](t.reduce(on(i),n));if(r in sn)return nn(this.middleware_,this.tech_,r,a);var t,e,i,n;try{this.tech_&&this.tech_[r](a)}catch(t){throw g(t),t}},!0)},t.techGet_=function(e){if(this.tech_&&this.tech_.isReady_){if(e in rn)return t=this.middleware_,i=this.tech_,n=e,t.reduceRight(on(n),i[n]());if(e in sn)return nn(this.middleware_,this.tech_,e);var t,i,n;try{return this.tech_[e]()}catch(t){if(void 0===this.tech_[e])throw g("Video.js: "+e+" method not defined for "+this.techName_+" playback technology.",t),t;if("TypeError"===t.name)throw g("Video.js: "+e+" unavailable on "+this.techName_+" playback technology element.",t),this.tech_.isReady_=!1,t;throw g(t),t}}},t.play=function(){var e=this,t=this.options_.Promise||v.Promise;return t?new t(function(t){e.play_(t)}):this.play_()},t.play_=function(t){var e=this;if(void 0===t&&(t=we),this.playOnLoadstart_&&this.off("loadstart",this.playOnLoadstart_),this.isReady_){if(!this.changingSrc_&&(this.src()||this.currentSrc()))return void t(this.techGet_("play"));this.playOnLoadstart_=function(){e.playOnLoadstart_=null,t(e.play())},this.one("loadstart",this.playOnLoadstart_)}else{if(this.playWaitingForReady_)return;this.playWaitingForReady_=!0,this.ready(function(){e.playWaitingForReady_=!1,t(e.play())})}},t.pause=function(){this.techCall_("pause")},t.paused=function(){return!1!==this.techGet_("paused")},t.played=function(){return this.techGet_("played")||de(0,0)},t.scrubbing=function(t){if("undefined"==typeof t)return this.scrubbing_;this.scrubbing_=!!t,t?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing")},t.currentTime=function(t){return"undefined"!=typeof t?(t<0&&(t=0),void this.techCall_("setCurrentTime",t)):(this.cache_.currentTime=this.techGet_("currentTime")||0,this.cache_.currentTime)},t.duration=function(t){if(void 0===t)return void 0!==this.cache_.duration?this.cache_.duration:NaN;(t=parseFloat(t))<0&&(t=1/0),t!==this.cache_.duration&&((this.cache_.duration=t)===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),this.trigger("durationchange"))},t.remainingTime=function(){return this.duration()-this.currentTime()},t.remainingTimeDisplay=function(){return Math.floor(this.duration())-Math.floor(this.currentTime())},t.buffered=function(){var t=this.techGet_("buffered");return t&&t.length||(t=de(0,0)),t},t.bufferedPercent=function(){return pe(this.buffered(),this.duration())},t.bufferedEnd=function(){var t=this.buffered(),e=this.duration(),i=t.end(t.length-1);return e<i&&(i=e),i},t.volume=function(t){var e;return void 0!==t?(e=Math.max(0,Math.min(1,parseFloat(t))),this.cache_.volume=e,this.techCall_("setVolume",e),void(0<e&&this.lastVolume_(e))):(e=parseFloat(this.techGet_("volume")),isNaN(e)?1:e)},t.muted=function(t){if(void 0===t)return this.techGet_("muted")||!1;this.techCall_("setMuted",t)},t.defaultMuted=function(t){return void 0!==t?this.techCall_("setDefaultMuted",t):this.techGet_("defaultMuted")||!1},t.lastVolume_=function(t){if(void 0===t||0===t)return this.cache_.lastVolume;this.cache_.lastVolume=t},t.supportsFullScreen=function(){return this.techGet_("supportsFullScreen")||!1},t.isFullscreen=function(t){if(void 0===t)return!!this.isFullscreen_;this.isFullscreen_=!!t},t.requestFullscreen=function(){var i=me;this.isFullscreen(!0),i.requestFullscreen?(ht(d,i.fullscreenchange,kt(this,function t(e){this.isFullscreen(d[i.fullscreenElement]),!1===this.isFullscreen()&&dt(d,i.fullscreenchange,t),this.trigger("fullscreenchange")})),this.el_[i.requestFullscreen]()):this.tech_.supportsFullScreen()?this.techCall_("enterFullScreen"):(this.enterFullWindow(),this.trigger("fullscreenchange"))},t.exitFullscreen=function(){var t=me;this.isFullscreen(!1),t.requestFullscreen?d[t.exitFullscreen]():this.tech_.supportsFullScreen()?this.techCall_("exitFullScreen"):(this.exitFullWindow(),this.trigger("fullscreenchange"))},t.enterFullWindow=function(){this.isFullWindow=!0,this.docOrigOverflow=d.documentElement.style.overflow,ht(d,"keydown",kt(this,this.fullWindowOnEscKey)),d.documentElement.style.overflow="hidden",U(d.body,"vjs-full-window"),this.trigger("enterFullWindow")},t.fullWindowOnEscKey=function(t){27===t.keyCode&&(!0===this.isFullscreen()?this.exitFullscreen():this.exitFullWindow())},t.exitFullWindow=function(){this.isFullWindow=!1,dt(d,"keydown",this.fullWindowOnEscKey),d.documentElement.style.overflow=this.docOrigOverflow,x(d.body,"vjs-full-window"),this.trigger("exitFullWindow")},t.canPlayType=function(t){for(var e,i=0,n=this.options_.techOrder;i<n.length;i++){var r=n[i],a=Qi.getTech(r);if(a||(a=jt.getComponent(r)),a){if(a.isSupported()&&(e=a.canPlayType(t)))return e}else g.error('The "'+r+'" tech is undefined. Skipped browser support check for that tech.')}return""},t.selectSource=function(t){var i,n=this,e=this.options_.techOrder.map(function(t){return[t,Qi.getTech(t)]}).filter(function(t){var e=t[0],i=t[1];return i?i.isSupported():(g.error('The "'+e+'" tech is undefined. Skipped browser support check for that tech.'),!1)}),r=function(t,i,n){var r;return t.some(function(e){return i.some(function(t){if(r=n(e,t))return!0})}),r},a=function(t,e){var i=t[0];if(t[1].canPlaySource(e,n.options_[i.toLowerCase()]))return{source:e,tech:i}};return(this.options_.sourceOrder?r(t,e,(i=a,function(t,e){return i(e,t)})):r(e,t,a))||!1},t.src=function(t){var r=this;if("undefined"==typeof t)return this.cache_.src||"";var a=function e(t){if(Array.isArray(t)){var i=[];t.forEach(function(t){t=e(t),Array.isArray(t)?i=i.concat(t):l(t)&&i.push(t)}),t=i}else t="string"==typeof t&&t.trim()?[hn({src:t})]:l(t)&&"string"==typeof t.src&&t.src&&t.src.trim()?[hn(t)]:[];return t}(t);a.length?(this.changingSrc_=!0,this.cache_.sources=a,this.updateSourceCaches_(a[0]),en(this,a[0],function(t,e){var i,n;if(r.middleware_=e,r.cache_.sources=a,r.updateSourceCaches_(t),r.src_(t))return 1<a.length?r.src(a.slice(1)):(r.changingSrc_=!1,r.setTimeout(function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})},0),void r.triggerReady());i=e,n=r.tech_,i.forEach(function(t){return t.setTech&&t.setTech(n)})})):this.setTimeout(function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})},0)},t.src_=function(t){var e,i,n=this,r=this.selectSource([t]);return!r||(e=r.tech,i=this.techName_,Bt(e)!==Bt(i)?(this.changingSrc_=!0,this.loadTech_(r.tech,r.source),this.tech_.ready(function(){n.changingSrc_=!1})):this.ready(function(){this.tech_.constructor.prototype.hasOwnProperty("setSource")?this.techCall_("setSource",t):this.techCall_("src",t.src),this.changingSrc_=!1},!0),!1)},t.load=function(){this.techCall_("load")},t.reset=function(){this.tech_&&this.tech_.clearTracks("text"),this.loadTech_(this.options_.techOrder[0],null),this.techCall_("reset")},t.currentSources=function(){var t=this.currentSource(),e=[];return 0!==Object.keys(t).length&&e.push(t),this.cache_.sources||e},t.currentSource=function(){return this.cache_.source||{}},t.currentSrc=function(){return this.currentSource()&&this.currentSource().src||""},t.currentType=function(){return this.currentSource()&&this.currentSource().type||""},t.preload=function(t){return void 0!==t?(this.techCall_("setPreload",t),void(this.options_.preload=t)):this.techGet_("preload")},t.autoplay=function(t){if(void 0===t)return this.options_.autoplay||!1;var e;"string"==typeof t&&/(any|play|muted)/.test(t)?(this.options_.autoplay=t,this.manualAutoplay_(t),e=!1):this.options_.autoplay=!!t,e=e||this.options_.autoplay,this.tech_&&this.techCall_("setAutoplay",e)},t.playsinline=function(t){return void 0!==t?(this.techCall_("setPlaysinline",t),this.options_.playsinline=t,this):this.techGet_("playsinline")},t.loop=function(t){return void 0!==t?(this.techCall_("setLoop",t),void(this.options_.loop=t)):this.techGet_("loop")},t.poster=function(t){if(void 0===t)return this.poster_;t||(t=""),t!==this.poster_&&(this.poster_=t,this.techCall_("setPoster",t),this.isPosterFromTech_=!1,this.trigger("posterchange"))},t.handleTechPosterChange_=function(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){var t=this.tech_.poster()||"";t!==this.poster_&&(this.poster_=t,this.isPosterFromTech_=!0,this.trigger("posterchange"))}},t.controls=function(t){if(void 0===t)return!!this.controls_;t=!!t,this.controls_!==t&&(this.controls_=t,this.usingNativeControls()&&this.techCall_("setControls",t),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_()))},t.usingNativeControls=function(t){if(void 0===t)return!!this.usingNativeControls_;t=!!t,this.usingNativeControls_!==t&&(this.usingNativeControls_=t,this.usingNativeControls_?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols")))},t.error=function(t){return void 0===t?this.error_||null:null===t?(this.error_=t,this.removeClass("vjs-error"),void(this.errorDisplay&&this.errorDisplay.close())):(this.error_=new be(t),this.addClass("vjs-error"),g.error("(CODE:"+this.error_.code+" "+be.errorTypes[this.error_.code]+")",this.error_.message,this.error_),void this.trigger("error"))},t.reportUserActivity=function(t){this.userActivity_=!0},t.userActive=function(t){if(void 0===t)return this.userActive_;if((t=!!t)!==this.userActive_){if(this.userActive_=t,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(t){t.stopPropagation(),t.preventDefault()}),this.userActivity_=!1,this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive")}},t.listenForUserActivity_=function(){var e,i,n,r,a=kt(this,this.reportUserActivity);this.on("mousedown",function(){a(),this.clearInterval(e),e=this.setInterval(a,250)}),this.on("mousemove",function(t){t.screenX===i&&t.screenY===n||(i=t.screenX,n=t.screenY,a())}),this.on("mouseup",function(t){a(),this.clearInterval(e)}),this.on("keydown",a),this.on("keyup",a),this.setInterval(function(){if(this.userActivity_){this.userActivity_=!1,this.userActive(!0),this.clearTimeout(r);var t=this.options_.inactivityTimeout;t<=0||(r=this.setTimeout(function(){this.userActivity_||this.userActive(!1)},t))}},250)},t.playbackRate=function(t){if(void 0===t)return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_("playbackRate"):1;this.techCall_("setPlaybackRate",t)},t.defaultPlaybackRate=function(t){return void 0!==t?this.techCall_("setDefaultPlaybackRate",t):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1},t.isAudio=function(t){if(void 0===t)return!!this.isAudio_;this.isAudio_=!!t},t.addTextTrack=function(t,e,i){if(this.tech_)return this.tech_.addTextTrack(t,e,i)},t.addRemoteTextTrack=function(t,e){if(this.tech_)return this.tech_.addRemoteTextTrack(t,e)},t.removeRemoteTextTrack=function(t){void 0===t&&(t={});var e=t.track;if(e||(e=t),this.tech_)return this.tech_.removeRemoteTextTrack(e)},t.getVideoPlaybackQuality=function(){return this.techGet_("getVideoPlaybackQuality")},t.videoWidth=function(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0},t.videoHeight=function(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0},t.language=function(t){if(void 0===t)return this.language_;this.language_=String(t).toLowerCase()},t.languages=function(){return Nt(h.prototype.options_.languages,this.languages_)},t.toJSON=function(){var t=Nt(this.options_),e=t.tracks;t.tracks=[];for(var i=0;i<e.length;i++){var n=e[i];(n=Nt(n)).player=void 0,t.tracks[i]=n}return t},t.createModal=function(t,e){var i=this;(e=e||{}).content=t||"";var n=new Oe(this,e);return this.addChild(n),n.on("dispose",function(){i.removeChild(n)}),n.open(),n},t.updateCurrentBreakpoint_=function(){if(this.responsive())for(var t=this.currentBreakpoint(),e=this.currentWidth(),i=0;i<Gr.length;i++){var n=Gr[i];if(e<=this.breakpoints_[n]){if(t===n)return;t&&this.removeClass(Xr[t]),this.addClass(Xr[n]),this.breakpoint_=n;break}}},t.removeCurrentBreakpoint_=function(){var t=this.currentBreakpointClass();this.breakpoint_="",t&&this.removeClass(t)},t.breakpoints=function(t){return void 0===t||(this.breakpoint_="",this.breakpoints_=b({},Yr,t),this.updateCurrentBreakpoint_()),b(this.breakpoints_)},t.responsive=function(t){return void 0===t?this.responsive_:(t=Boolean(t))!==this.responsive_?((this.responsive_=t)?(this.on("playerresize",this.updateCurrentBreakpoint_),this.updateCurrentBreakpoint_()):(this.off("playerresize",this.updateCurrentBreakpoint_),this.removeCurrentBreakpoint_()),t):void 0},t.currentBreakpoint=function(){return this.breakpoint_},t.currentBreakpointClass=function(){return Xr[this.breakpoint_]||""},h.getTagSettings=function(t){var e={sources:[],tracks:[]},i=R(t),n=i["data-setup"];if(P(t,"vjs-fill")&&(i.fill=!0),P(t,"vjs-fluid")&&(i.fluid=!0),null!==n){var r=Se(n||"{}"),a=r[0],s=r[1];a&&g.error(a),b(i,s)}if(b(e,i),t.hasChildNodes())for(var o=t.childNodes,u=0,l=o.length;u<l;u++){var c=o[u],h=c.nodeName.toLowerCase();"source"===h?e.sources.push(R(c)):"track"===h&&e.tracks.push(R(c))}return e},t.flexNotSupported_=function(){var t=d.createElement("i");return!("flexBasis"in t.style||"webkitFlexBasis"in t.style||"mozFlexBasis"in t.style||"msFlexBasis"in t.style||"msFlexOrder"in t.style)},h}(jt);Si.names.forEach(function(t){var e=Si[t];$r.prototype[e.getterName]=function(){return this.tech_?this.tech_[e.getterName]():(this[e.privateName]=this[e.privateName]||new e.ListClass,this[e.privateName])}}),$r.players={};var Kr=v.navigator;$r.prototype.options_={techOrder:Qi.defaultTechOrder_,html5:{},flash:{},inactivityTimeout:2e3,playbackRates:[],children:["mediaLoader","posterImage","textTrackDisplay","loadingSpinner","bigPlayButton","controlBar","errorDisplay","textTrackSettings","resizeManager"],language:Kr&&(Kr.languages&&Kr.languages[0]||Kr.userLanguage||Kr.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media.",breakpoints:{},responsive:!1},["ended","seeking","seekable","networkState","readyState"].forEach(function(t){$r.prototype[t]=function(){return this.techGet_(t)}}),zr.forEach(function(t){$r.prototype["handleTech"+Bt(t)+"_"]=function(){return this.trigger(t)}}),jt.registerComponent("Player",$r);var Qr="plugin",Jr="activePlugins_",Zr={},ta=function(t){return Zr.hasOwnProperty(t)},ea=function(t){return ta(t)?Zr[t]:void 0},ia=function(t,e){t[Jr]=t[Jr]||{},t[Jr][e]=!0},na=function(t,e,i){var n=(i?"before":"")+"pluginsetup";t.trigger(n,e),t.trigger(n+":"+e.name,e)},ra=function(r,a){return a.prototype.name=r,function(){na(this,{name:r,plugin:a,instance:null},!0);for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];var n=s(a,[this].concat(e));return this[r]=function(){return n},na(this,n.getEventHash()),n}},aa=function(){function a(t){if(this.constructor===a)throw new Error("Plugin must be sub-classed; not directly instantiated.");this.player=t,Dt(this),delete this.trigger,Mt(this,this.constructor.defaultState),ia(t,this.name),this.dispose=kt(this,this.dispose),t.on("dispose",this.dispose)}var t=a.prototype;return t.version=function(){return this.constructor.VERSION},t.getEventHash=function(t){return void 0===t&&(t={}),t.name=this.name,t.plugin=this.constructor,t.instance=this,t},t.trigger=function(t,e){return void 0===e&&(e={}),pt(this.eventBusEl_,t,this.getEventHash(e))},t.handleStateChanged=function(t){},t.dispose=function(){var t=this.name,e=this.player;this.trigger("dispose"),this.off(),e.off("dispose",this.dispose),e[Jr][t]=!1,this.player=this.state=null,e[t]=ra(t,Zr[t])},a.isBasic=function(t){var e="string"==typeof t?ea(t):t;return"function"==typeof e&&!a.prototype.isPrototypeOf(e.prototype)},a.registerPlugin=function(t,e){if("string"!=typeof t)throw new Error('Illegal plugin name, "'+t+'", must be a string, was '+typeof t+".");if(ta(t))g.warn('A plugin named "'+t+'" already exists. You may want to avoid re-registering plugins!');else if($r.prototype.hasOwnProperty(t))throw new Error('Illegal plugin name, "'+t+'", cannot share a name with an existing player method!');if("function"!=typeof e)throw new Error('Illegal plugin for "'+t+'", must be a function, was '+typeof e+".");var i,n,r;return Zr[t]=e,t!==Qr&&(a.isBasic(e)?$r.prototype[t]=(i=t,n=e,r=function(){na(this,{name:i,plugin:n,instance:null},!0);var t=n.apply(this,arguments);return ia(this,i),na(this,{name:i,plugin:n,instance:t}),t},Object.keys(n).forEach(function(t){r[t]=n[t]}),r):$r.prototype[t]=ra(t,e)),e},a.deregisterPlugin=function(t){if(t===Qr)throw new Error("Cannot de-register base plugin.");ta(t)&&(delete Zr[t],delete $r.prototype[t])},a.getPlugins=function(t){var i;return void 0===t&&(t=Object.keys(Zr)),t.forEach(function(t){var e=ea(t);e&&((i=i||{})[t]=e)}),i},a.getPluginVersion=function(t){var e=ea(t);return e&&e.VERSION||""},a}();aa.getPlugin=ea,aa.BASE_PLUGIN_NAME=Qr,aa.registerPlugin(Qr,aa),$r.prototype.usingPlugin=function(t){return!!this[Jr]&&!0===this[Jr][t]},$r.prototype.hasPlugin=function(t){return!!ta(t)};var sa=function(t){return 0===t.indexOf("#")?t.slice(1):t};function oa(t,i,e){var n=oa.getPlayer(t);if(n)return i&&g.warn('Player "'+t+'" is already initialised. Options will not be applied.'),e&&n.ready(e),n;var r="string"==typeof t?K("#"+sa(t)):t;if(!w(r))throw new TypeError("The element or ID supplied is not valid. (videojs)");d.body.contains(r)||g.warn("The element supplied is not included in the DOM"),i=i||{},oa.hooks("beforesetup").forEach(function(t){var e=t(r,Nt(i));l(e)&&!Array.isArray(e)?i=Nt(i,e):g.error("please return an object in beforesetup hooks")});var a=jt.getComponent("Player");return n=new a(r,i,e),oa.hooks("setup").forEach(function(t){return t(n)}),n}if(oa.hooks_={},oa.hooks=function(t,e){return oa.hooks_[t]=oa.hooks_[t]||[],e&&(oa.hooks_[t]=oa.hooks_[t].concat(e)),oa.hooks_[t]},oa.hook=function(t,e){oa.hooks(t,e)},oa.hookOnce=function(i,t){oa.hooks(i,[].concat(t).map(function(e){return function t(){return oa.removeHook(i,t),e.apply(void 0,arguments)}}))},oa.removeHook=function(t,e){var i=oa.hooks(t).indexOf(e);return!(i<=-1)&&(oa.hooks_[t]=oa.hooks_[t].slice(),oa.hooks_[t].splice(i,1),!0)},!0!==v.VIDEOJS_NO_DYNAMIC_STYLE&&k()){var ua=K(".vjs-styles-defaults");if(!ua){ua=Tt("vjs-styles-defaults");var la=K("head");la&&la.insertBefore(ua,la.firstChild),St(ua,"\n      .video-js {\n        width: 300px;\n        height: 150px;\n      }\n\n      .vjs-fluid {\n        padding-top: 56.25%\n      }\n    ")}}_t(1,oa),oa.VERSION=p,oa.options=$r.prototype.options_,oa.getPlayers=function(){return $r.players},oa.getPlayer=function(t){var e,i=$r.players;if("string"==typeof t){var n=sa(t),r=i[n];if(r)return r;e=K("#"+n)}else e=t;if(w(e)){var a=e,s=a.player,o=a.playerId;if(s||i[o])return s||i[o]}},oa.getAllPlayers=function(){return Object.keys($r.players).map(function(t){return $r.players[t]}).filter(Boolean)},oa.players=$r.players,oa.getComponent=jt.getComponent,oa.registerComponent=function(t,e){Qi.isTech(e)&&g.warn("The "+t+" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)"),jt.registerComponent.call(jt,t,e)},oa.getTech=Qi.getTech,oa.registerTech=Qi.registerTech,oa.use=function(t,e){Ji[t]=Ji[t]||[],Ji[t].push(e)},Object.defineProperty(oa,"middleware",{value:{},writeable:!1,enumerable:!0}),Object.defineProperty(oa.middleware,"TERMINATOR",{value:tn,writeable:!1,enumerable:!0}),oa.browser=le,oa.TOUCH_ENABLED=ue,oa.extend=function(t,e){void 0===e&&(e={});var i=function(){t.apply(this,arguments)},n={};for(var r in"object"==typeof e?(e.constructor!==Object.prototype.constructor&&(i=e.constructor),n=e):"function"==typeof e&&(i=e),function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(t.super_=e)}(i,t),n)n.hasOwnProperty(r)&&(i.prototype[r]=n[r]);return i},oa.mergeOptions=Nt,oa.bind=kt,oa.registerPlugin=aa.registerPlugin,oa.deregisterPlugin=aa.deregisterPlugin,oa.plugin=function(t,e){return g.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),aa.registerPlugin(t,e)},oa.getPlugins=aa.getPlugins,oa.getPlugin=aa.getPlugin,oa.getPluginVersion=aa.getPluginVersion,oa.addLanguage=function(t,e){var i;return t=(""+t).toLowerCase(),oa.options.languages=Nt(oa.options.languages,((i={})[t]=e,i)),oa.options.languages[t]},oa.log=g,oa.createLogger=y,oa.createTimeRange=oa.createTimeRanges=de,oa.formatTime=An,oa.setFormatTime=function(t){En=t},oa.resetFormatTime=function(){En=Cn},oa.parseUrl=ze,oa.isCrossOrigin=Xe,oa.EventTarget=Ct,oa.on=ht,oa.one=ft,oa.off=dt,oa.trigger=pt,oa.xhr=hi,oa.TextTrack=gi,oa.AudioTrack=yi,oa.VideoTrack=vi,["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach(function(t){oa[t]=function(){return g.warn("videojs."+t+"() is deprecated; use videojs.dom."+t+"() instead"),J[t].apply(null,arguments)}}),oa.computedStyle=n,oa.dom=J,oa.url=Ye;var ca=Qe(function(t,e){var i,c,n,r,h;i=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/\?#]*\/)*.*?)??(;.*?)?(\?.*?)?(#.*?)?$/,c=/^([^\/?#]*)(.*)$/,n=/(?:\/|^)\.(?=\/)/g,r=/(?:\/|^)\.\.\/(?!\.\.\/).*?(?=\/)/g,h={buildAbsoluteURL:function(t,e,i){if(i=i||{},t=t.trim(),!(e=e.trim())){if(!i.alwaysNormalize)return t;var n=h.parseURL(t);if(!n)throw new Error("Error trying to parse base URL.");return n.path=h.normalizePath(n.path),h.buildURLFromParts(n)}var r=h.parseURL(e);if(!r)throw new Error("Error trying to parse relative URL.");if(r.scheme)return i.alwaysNormalize?(r.path=h.normalizePath(r.path),h.buildURLFromParts(r)):e;var a=h.parseURL(t);if(!a)throw new Error("Error trying to parse base URL.");if(!a.netLoc&&a.path&&"/"!==a.path[0]){var s=c.exec(a.path);a.netLoc=s[1],a.path=s[2]}a.netLoc&&!a.path&&(a.path="/");var o={scheme:a.scheme,netLoc:r.netLoc,path:null,params:r.params,query:r.query,fragment:r.fragment};if(!r.netLoc&&(o.netLoc=a.netLoc,"/"!==r.path[0]))if(r.path){var u=a.path,l=u.substring(0,u.lastIndexOf("/")+1)+r.path;o.path=h.normalizePath(l)}else o.path=a.path,r.params||(o.params=a.params,r.query||(o.query=a.query));return null===o.path&&(o.path=i.alwaysNormalize?h.normalizePath(r.path):r.path),h.buildURLFromParts(o)},parseURL:function(t){var e=i.exec(t);return e?{scheme:e[1]||"",netLoc:e[2]||"",path:e[3]||"",params:e[4]||"",query:e[5]||"",fragment:e[6]||""}:null},normalizePath:function(t){for(t=t.split("").reverse().join("").replace(n,"");t.length!==(t=t.replace(r,"")).length;);return t.split("").reverse().join("")},buildURLFromParts:function(t){return t.scheme+t.netLoc+t.path+t.params+t.query+t.fragment}},t.exports=h}),ha=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},da=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t},pa=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)},fa=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e},ma=function(){function t(){ha(this,t),this.listeners={}}return t.prototype.on=function(t,e){this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push(e)},t.prototype.off=function(t,e){if(!this.listeners[t])return!1;var i=this.listeners[t].indexOf(e);return this.listeners[t].splice(i,1),-1<i},t.prototype.trigger=function(t){var e=this.listeners[t],i=void 0,n=void 0,r=void 0;if(e)if(2===arguments.length)for(n=e.length,i=0;i<n;++i)e[i].call(this,arguments[1]);else for(r=Array.prototype.slice.call(arguments,1),n=e.length,i=0;i<n;++i)e[i].apply(this,r)},t.prototype.dispose=function(){this.listeners={}},t.prototype.pipe=function(e){this.on("data",function(t){e.push(t)})},t}(),ga=function(e){function i(){ha(this,i);var t=fa(this,e.call(this));return t.buffer="",t}return pa(i,e),i.prototype.push=function(t){var e=void 0;for(this.buffer+=t,e=this.buffer.indexOf("\n");-1<e;e=this.buffer.indexOf("\n"))this.trigger("data",this.buffer.substring(0,e)),this.buffer=this.buffer.substring(e+1)},i}(ma),ya=function(t){for(var e=t.split(new RegExp('(?:^|,)((?:[^=]*)=(?:"[^"]*"|[^,]*))')),i={},n=e.length,r=void 0;n--;)""!==e[n]&&((r=/([^=]*)=(.*)/.exec(e[n]).slice(1))[0]=r[0].replace(/^\s+|\s+$/g,""),r[1]=r[1].replace(/^\s+|\s+$/g,""),r[1]=r[1].replace(/^['"](.*)['"]$/g,"$1"),i[r[0]]=r[1]);return i},va=function(e){function i(){ha(this,i);var t=fa(this,e.call(this));return t.customParsers=[],t}return pa(i,e),i.prototype.push=function(t){var e=void 0,i=void 0;if(0!==(t=t.replace(/^[\u0000\s]+|[\u0000\s]+$/g,"")).length)if("#"===t[0]){for(var n=0;n<this.customParsers.length;n++)if(this.customParsers[n].call(this,t))return;if(0===t.indexOf("#EXT"))if(t=t.replace("\r",""),e=/^#EXTM3U/.exec(t))this.trigger("data",{type:"tag",tagType:"m3u"});else{if(e=/^#EXTINF:?([0-9\.]*)?,?(.*)?$/.exec(t))return i={type:"tag",tagType:"inf"},e[1]&&(i.duration=parseFloat(e[1])),e[2]&&(i.title=e[2]),void this.trigger("data",i);if(e=/^#EXT-X-TARGETDURATION:?([0-9.]*)?/.exec(t))return i={type:"tag",tagType:"targetduration"},e[1]&&(i.duration=parseInt(e[1],10)),void this.trigger("data",i);if(e=/^#ZEN-TOTAL-DURATION:?([0-9.]*)?/.exec(t))return i={type:"tag",tagType:"totalduration"},e[1]&&(i.duration=parseInt(e[1],10)),void this.trigger("data",i);if(e=/^#EXT-X-VERSION:?([0-9.]*)?/.exec(t))return i={type:"tag",tagType:"version"},e[1]&&(i.version=parseInt(e[1],10)),void this.trigger("data",i);if(e=/^#EXT-X-MEDIA-SEQUENCE:?(\-?[0-9.]*)?/.exec(t))return i={type:"tag",tagType:"media-sequence"},e[1]&&(i.number=parseInt(e[1],10)),void this.trigger("data",i);if(e=/^#EXT-X-DISCONTINUITY-SEQUENCE:?(\-?[0-9.]*)?/.exec(t))return i={type:"tag",tagType:"discontinuity-sequence"},e[1]&&(i.number=parseInt(e[1],10)),void this.trigger("data",i);if(e=/^#EXT-X-PLAYLIST-TYPE:?(.*)?$/.exec(t))return i={type:"tag",tagType:"playlist-type"},e[1]&&(i.playlistType=e[1]),void this.trigger("data",i);if(e=/^#EXT-X-BYTERANGE:?([0-9.]*)?@?([0-9.]*)?/.exec(t))return i={type:"tag",tagType:"byterange"},e[1]&&(i.length=parseInt(e[1],10)),e[2]&&(i.offset=parseInt(e[2],10)),void this.trigger("data",i);if(e=/^#EXT-X-ALLOW-CACHE:?(YES|NO)?/.exec(t))return i={type:"tag",tagType:"allow-cache"},e[1]&&(i.allowed=!/NO/.test(e[1])),void this.trigger("data",i);if(e=/^#EXT-X-MAP:?(.*)$/.exec(t)){if(i={type:"tag",tagType:"map"},e[1]){var r=ya(e[1]);if(r.URI&&(i.uri=r.URI),r.BYTERANGE){var a=r.BYTERANGE.split("@"),s=a[0],o=a[1];i.byterange={},s&&(i.byterange.length=parseInt(s,10)),o&&(i.byterange.offset=parseInt(o,10))}}this.trigger("data",i)}else if(e=/^#EXT-X-STREAM-INF:?(.*)$/.exec(t)){if(i={type:"tag",tagType:"stream-inf"},e[1]){if(i.attributes=ya(e[1]),i.attributes.RESOLUTION){var u=i.attributes.RESOLUTION.split("x"),l={};u[0]&&(l.width=parseInt(u[0],10)),u[1]&&(l.height=parseInt(u[1],10)),i.attributes.RESOLUTION=l}i.attributes.BANDWIDTH&&(i.attributes.BANDWIDTH=parseInt(i.attributes.BANDWIDTH,10)),i.attributes["PROGRAM-ID"]&&(i.attributes["PROGRAM-ID"]=parseInt(i.attributes["PROGRAM-ID"],10))}this.trigger("data",i)}else{if(e=/^#EXT-X-MEDIA:?(.*)$/.exec(t))return i={type:"tag",tagType:"media"},e[1]&&(i.attributes=ya(e[1])),void this.trigger("data",i);if(e=/^#EXT-X-ENDLIST/.exec(t))this.trigger("data",{type:"tag",tagType:"endlist"});else if(e=/^#EXT-X-DISCONTINUITY/.exec(t))this.trigger("data",{type:"tag",tagType:"discontinuity"});else{if(e=/^#EXT-X-PROGRAM-DATE-TIME:?(.*)$/.exec(t))return i={type:"tag",tagType:"program-date-time"},e[1]&&(i.dateTimeString=e[1],i.dateTimeObject=new Date(e[1])),void this.trigger("data",i);if(e=/^#EXT-X-KEY:?(.*)$/.exec(t))return i={type:"tag",tagType:"key"},e[1]&&(i.attributes=ya(e[1]),i.attributes.IV&&("0x"===i.attributes.IV.substring(0,2).toLowerCase()&&(i.attributes.IV=i.attributes.IV.substring(2)),i.attributes.IV=i.attributes.IV.match(/.{8}/g),i.attributes.IV[0]=parseInt(i.attributes.IV[0],16),i.attributes.IV[1]=parseInt(i.attributes.IV[1],16),i.attributes.IV[2]=parseInt(i.attributes.IV[2],16),i.attributes.IV[3]=parseInt(i.attributes.IV[3],16),i.attributes.IV=new Uint32Array(i.attributes.IV))),void this.trigger("data",i);if(e=/^#EXT-X-START:?(.*)$/.exec(t))return i={type:"tag",tagType:"start"},e[1]&&(i.attributes=ya(e[1]),i.attributes["TIME-OFFSET"]=parseFloat(i.attributes["TIME-OFFSET"]),i.attributes.PRECISE=/YES/.test(i.attributes.PRECISE)),void this.trigger("data",i);if(e=/^#EXT-X-CUE-OUT-CONT:?(.*)?$/.exec(t))return i={type:"tag",tagType:"cue-out-cont"},e[1]?i.data=e[1]:i.data="",void this.trigger("data",i);if(e=/^#EXT-X-CUE-OUT:?(.*)?$/.exec(t))return i={type:"tag",tagType:"cue-out"},e[1]?i.data=e[1]:i.data="",void this.trigger("data",i);if(e=/^#EXT-X-CUE-IN:?(.*)?$/.exec(t))return i={type:"tag",tagType:"cue-in"},e[1]?i.data=e[1]:i.data="",void this.trigger("data",i);this.trigger("data",{type:"tag",data:t.slice(4)})}}}else this.trigger("data",{type:"comment",text:t.slice(1)})}else this.trigger("data",{type:"uri",uri:t})},i.prototype.addParser=function(t){var e=this,i=t.expression,n=t.customType,r=t.dataParser,a=t.segment;"function"!=typeof r&&(r=function(t){return t}),this.customParsers.push(function(t){if(i.exec(t))return e.trigger("data",{type:"custom",data:r(t),customType:n,segment:a}),!0})},i}(ma),_a=function(e){function i(){ha(this,i);var t=fa(this,e.call(this));t.lineStream=new ga,t.parseStream=new va,t.lineStream.pipe(t.parseStream);var r=t,a=[],s={},o=void 0,u=void 0,l={AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},c=0;return t.manifest={allowCache:!0,discontinuityStarts:[],segments:[]},t.parseStream.on("data",function(e){var i=void 0,n=void 0;({tag:function(){({"allow-cache":function(){this.manifest.allowCache=e.allowed,"allowed"in e||(this.trigger("info",{message:"defaulting allowCache to YES"}),this.manifest.allowCache=!0)},byterange:function(){var t={};"length"in e&&((s.byterange=t).length=e.length,"offset"in e||(this.trigger("info",{message:"defaulting offset to zero"}),e.offset=0)),"offset"in e&&((s.byterange=t).offset=e.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<e.duration&&(s.duration=e.duration),0===e.duration&&(s.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"})),this.manifest.segments=a},key:function(){e.attributes?"NONE"!==e.attributes.METHOD?e.attributes.URI?(e.attributes.METHOD||this.trigger("warn",{message:"defaulting key method to AES-128"}),u={method:e.attributes.METHOD||"AES-128",uri:e.attributes.URI},"undefined"!=typeof e.attributes.IV&&(u.iv=e.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(e.number)?this.manifest.mediaSequence=e.number:this.trigger("warn",{message:"ignoring invalid media sequence: "+e.number})},"discontinuity-sequence":function(){isFinite(e.number)?(this.manifest.discontinuitySequence=e.number,c=e.number):this.trigger("warn",{message:"ignoring invalid discontinuity sequence: "+e.number})},"playlist-type":function(){/VOD|EVENT/.test(e.playlistType)?this.manifest.playlistType=e.playlistType:this.trigger("warn",{message:"ignoring unknown playlist type: "+e.playlist})},map:function(){o={},e.uri&&(o.uri=e.uri),e.byterange&&(o.byterange=e.byterange)},"stream-inf":function(){this.manifest.playlists=a,this.manifest.mediaGroups=this.manifest.mediaGroups||l,e.attributes?(s.attributes||(s.attributes={}),da(s.attributes,e.attributes)):this.trigger("warn",{message:"ignoring empty stream-inf attributes"})},media:function(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||l,e.attributes&&e.attributes.TYPE&&e.attributes["GROUP-ID"]&&e.attributes.NAME){var t=this.manifest.mediaGroups[e.attributes.TYPE];t[e.attributes["GROUP-ID"]]=t[e.attributes["GROUP-ID"]]||{},i=t[e.attributes["GROUP-ID"]],(n={default:/yes/i.test(e.attributes.DEFAULT)}).default?n.autoselect=!0:n.autoselect=/yes/i.test(e.attributes.AUTOSELECT),e.attributes.LANGUAGE&&(n.language=e.attributes.LANGUAGE),e.attributes.URI&&(n.uri=e.attributes.URI),e.attributes["INSTREAM-ID"]&&(n.instreamId=e.attributes["INSTREAM-ID"]),e.attributes.CHARACTERISTICS&&(n.characteristics=e.attributes.CHARACTERISTICS),e.attributes.FORCED&&(n.forced=/yes/i.test(e.attributes.FORCED)),i[e.attributes.NAME]=n}else this.trigger("warn",{message:"ignoring incomplete or missing media group"})},discontinuity:function(){c+=1,s.discontinuity=!0,this.manifest.discontinuityStarts.push(a.length)},"program-date-time":function(){"undefined"==typeof this.manifest.dateTimeString&&(this.manifest.dateTimeString=e.dateTimeString,this.manifest.dateTimeObject=e.dateTimeObject),s.dateTimeString=e.dateTimeString,s.dateTimeObject=e.dateTimeObject},targetduration:function(){!isFinite(e.duration)||e.duration<0?this.trigger("warn",{message:"ignoring invalid target duration: "+e.duration}):this.manifest.targetDuration=e.duration},totalduration:function(){!isFinite(e.duration)||e.duration<0?this.trigger("warn",{message:"ignoring invalid total duration: "+e.duration}):this.manifest.totalDuration=e.duration},start:function(){e.attributes&&!isNaN(e.attributes["TIME-OFFSET"])?this.manifest.start={timeOffset:e.attributes["TIME-OFFSET"],precise:e.attributes.PRECISE}:this.trigger("warn",{message:"ignoring start declaration without appropriate attribute list"})},"cue-out":function(){s.cueOut=e.data},"cue-out-cont":function(){s.cueOutCont=e.data},"cue-in":function(){s.cueIn=e.data}}[e.tagType]||function(){}).call(r)},uri:function(){s.uri=e.uri,a.push(s),!this.manifest.targetDuration||"duration"in s||(this.trigger("warn",{message:"defaulting segment duration to the target duration"}),s.duration=this.manifest.targetDuration),u&&(s.key=u),s.timeline=c,o&&(s.map=o),s={}},comment:function(){},custom:function(){e.segment?(s.custom=s.custom||{},s.custom[e.customType]=e.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[e.customType]=e.data)}})[e.type].call(r)}),t}return pa(i,e),i.prototype.push=function(t){this.lineStream.push(t)},i.prototype.end=function(){this.lineStream.push("\n")},i.prototype.addParser=function(t){this.parseStream.addParser(t)},i}(ma),ba=function(t){return!!t&&"object"==typeof t},Ta=function n(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return e.reduce(function(e,i){return Object.keys(i).forEach(function(t){Array.isArray(e[t])&&Array.isArray(i[t])?e[t]=e[t].concat(i[t]):ba(e[t])&&ba(i[t])?e[t]=n(e[t],i[t]):e[t]=i[t]}),e},{})},Sa=function(t){return t.reduce(function(t,e){return t.concat(e)},[])},ka=function(t){if(!t.length)return[];for(var e=[],i=0;i<t.length;i++)e.push(t[i]);return e},wa=function(t){var e;return(e=t.reduce(function(t,e){var i,n=e.attributes.id+(e.attributes.lang||"");t[n]?(e.segments[0].discontinuity=!0,(i=t[n].segments).push.apply(i,e.segments),e.attributes.contentProtection&&(t[n].attributes.contentProtection=e.attributes.contentProtection)):t[n]=e;return t},{}),Object.keys(e).map(function(t){return e[t]})).map(function(t){var e,n;return t.discontinuityStarts=(e=t.segments,n="discontinuity",e.reduce(function(t,e,i){return e[n]&&t.push(i),t},[])),t})},Ca=function(t){var e,i=t.attributes,n=t.segments,r={attributes:(e={NAME:i.id,AUDIO:"audio",SUBTITLES:"subs",RESOLUTION:{width:i.width,height:i.height},CODECS:i.codecs,BANDWIDTH:i.bandwidth},e["PROGRAM-ID"]=1,e),uri:"",endList:"static"===(i.type||"static"),timeline:i.periodIndex,resolvedUri:"",targetDuration:i.duration,segments:n,mediaSequence:n.length?n[0].number:1};return i.contentProtection&&(r.contentProtection=i.contentProtection),r};"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var Ea,Aa=(function(t,e){var i,c,n,r,h;i=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/\?#]*\/)*.*?)??(;.*?)?(\?.*?)?(#.*?)?$/,c=/^([^\/?#]*)(.*)$/,n=/(?:\/|^)\.(?=\/)/g,r=/(?:\/|^)\.\.\/(?!\.\.\/).*?(?=\/)/g,h={buildAbsoluteURL:function(t,e,i){if(i=i||{},t=t.trim(),!(e=e.trim())){if(!i.alwaysNormalize)return t;var n=h.parseURL(t);if(!n)throw new Error("Error trying to parse base URL.");return n.path=h.normalizePath(n.path),h.buildURLFromParts(n)}var r=h.parseURL(e);if(!r)throw new Error("Error trying to parse relative URL.");if(r.scheme)return i.alwaysNormalize?(r.path=h.normalizePath(r.path),h.buildURLFromParts(r)):e;var a=h.parseURL(t);if(!a)throw new Error("Error trying to parse base URL.");if(!a.netLoc&&a.path&&"/"!==a.path[0]){var s=c.exec(a.path);a.netLoc=s[1],a.path=s[2]}a.netLoc&&!a.path&&(a.path="/");var o={scheme:a.scheme,netLoc:r.netLoc,path:null,params:r.params,query:r.query,fragment:r.fragment};if(!r.netLoc&&(o.netLoc=a.netLoc,"/"!==r.path[0]))if(r.path){var u=a.path,l=u.substring(0,u.lastIndexOf("/")+1)+r.path;o.path=h.normalizePath(l)}else o.path=a.path,r.params||(o.params=a.params,r.query||(o.query=a.query));return null===o.path&&(o.path=i.alwaysNormalize?h.normalizePath(r.path):r.path),h.buildURLFromParts(o)},parseURL:function(t){var e=i.exec(t);return e?{scheme:e[1]||"",netLoc:e[2]||"",path:e[3]||"",params:e[4]||"",query:e[5]||"",fragment:e[6]||""}:null},normalizePath:function(t){for(t=t.split("").reverse().join("").replace(n,"");t.length!==(t=t.replace(r,"")).length;);return t.split("").reverse().join("")},buildURLFromParts:function(t){return t.scheme+t.netLoc+t.path+t.params+t.query+t.fragment}},t.exports=h}(Ea={exports:{}},Ea.exports),Ea.exports),La=function(t,e){return/^[a-z]+:/i.test(e)?e:(/\/\//i.test(t)||(t=Aa.buildAbsoluteURL(v.location.href,t)),Aa.buildAbsoluteURL(t,e))},Oa=function(t){var e=t.baseUrl,i=void 0===e?"":e,n=t.source,r=void 0===n?"":n,a=t.range,s=void 0===a?"":a,o={uri:r,resolvedUri:La(i||"",r)};if(s){var u=s.split("-"),l=parseInt(u[0],10),c=parseInt(u[1],10);o.byterange={length:c-l,offset:l}}return o},Pa=function(t,e){for(var i,n,r,a,s,o,u,l,c,h,d,p,f=t.type,m=void 0===f?"static":f,g=t.minimumUpdatePeriod,y=void 0===g?0:g,v=t.media,_=void 0===v?"":v,b=t.sourceDuration,T=t.timescale,S=void 0===T?1:T,k=t.startNumber,w=void 0===k?1:k,C=t.periodIndex,E=[],A=-1,L=0;L<e.length;L++){var O=e[L],P=O.d,U=O.r||0,x=O.t||0;A<0&&(A=x),x&&A<x&&(A=x);var I=void 0;if(U<0){var D=L+1;I=D===e.length?"dynamic"===m&&0<y&&0<_.indexOf("$Number$")?(n=A,r=P,void 0,a=(i=t).NOW,s=i.clientOffset,o=i.availabilityStartTime,u=i.timescale,l=void 0===u?1:u,c=i.start,h=void 0===c?0:c,d=i.minimumUpdatePeriod,p=(a+s)/1e3+(void 0===d?0:d)-(o+h),Math.ceil((p*l-n)/r)):(b*S-A)/P:(e[D].t-A)/P}else I=U+1;for(var R=w+E.length+I,M=w+E.length;M<R;)E.push({number:M,duration:P/S,time:A,timeline:C}),A+=P,M++}return E},Ua={static:function(t){var e=t.duration,i=t.timescale,n=void 0===i?1:i,r=t.sourceDuration;return{start:0,end:Math.ceil(r/(e/n))}},dynamic:function(t){var e=t.NOW,i=t.clientOffset,n=t.availabilityStartTime,r=t.timescale,a=void 0===r?1:r,s=t.duration,o=t.start,u=void 0===o?0:o,l=t.minimumUpdatePeriod,c=void 0===l?0:l,h=t.timeShiftBufferDepth,d=void 0===h?1/0:h,p=(e+i)/1e3,f=n+u,m=p+c-f,g=Math.ceil(m*a/s),y=Math.floor((p-f-d)*a/s),v=Math.floor((p-f)*a/s);return{start:Math.max(0,y),end:Math.min(g,v)}}},xa=function(t){var o,e=t.type,i=void 0===e?"static":e,n=t.duration,r=t.timescale,a=void 0===r?1:r,s=t.sourceDuration,u=Ua[i](t),l=function(t,e){for(var i=[],n=t;n<e;n++)i.push(n);return i}(u.start,u.end).map((o=t,function(t,e){var i=o.duration,n=o.timescale,r=void 0===n?1:n,a=o.periodIndex,s=o.startNumber;return{number:(void 0===s?1:s)+t,duration:i/r,timeline:a,time:e*i}}));if("static"===i){var c=l.length-1;l[c].duration=s-n/a*c}return l},Ia=/\$([A-z]*)(?:(%0)([0-9]+)d)?\$/g,Da=function(t,e){return t.replace(Ia,(a=e,function(t,e,i,n){if("$$"===t)return"$";if("undefined"==typeof a[e])return t;var r=""+a[e];return"RepresentationID"===e?r:(n=i?parseInt(n,10):1)<=r.length?r:""+new Array(n-r.length+1).join("0")+r}));var a},Ra=function(i,t){var e,n,r={RepresentationID:i.id,Bandwidth:i.bandwidth||0},a=i.initialization,s=void 0===a?{sourceURL:"",range:""}:a,o=Oa({baseUrl:i.baseUrl,source:Da(s.sourceURL,r),range:s.range});return(n=t,(e=i).duration||n?e.duration?xa(e):Pa(e,n):[{number:e.startNumber||1,duration:e.sourceDuration,time:0,timeline:e.periodIndex}]).map(function(t){r.Number=t.number,r.Time=t.time;var e=Da(i.media||"",r);return{uri:e,timeline:t.timeline,duration:t.duration,resolvedUri:La(i.baseUrl||"",e),map:o,number:t.number}})},Ma="INVALID_NUMBER_OF_PERIOD",Ba="DASH_EMPTY_MANIFEST",Na="DASH_INVALID_XML",ja="NO_BASE_URL",Fa="SEGMENT_TIME_UNSPECIFIED",Va="UNSUPPORTED_UTC_TIMING_SCHEME",Ha=function(u,t){var e=u.duration,i=u.segmentUrls,n=void 0===i?[]:i;if(!e&&!t||e&&t)throw new Error(Fa);var r,a=n.map(function(t){return i=t,n=(e=u).baseUrl,r=e.initialization,s=Oa({baseUrl:n,source:(a=void 0===r?{}:r).sourceURL,range:a.range}),(o=Oa({baseUrl:n,source:i.media,range:i.mediaRange})).map=s,o;var e,i,n,r,a,s,o});return e&&(r=xa(u)),t&&(r=Pa(u,t)),r.map(function(t,e){if(a[e]){var i=a[e];return i.timeline=t.timeline,i.duration=t.duration,i.number=t.number,i}}).filter(function(t){return t})},qa=function(t){var e=t.baseUrl,i=t.initialization,n=void 0===i?{}:i,r=t.sourceDuration,a=t.timescale,s=void 0===a?1:a,o=t.indexRange,u=void 0===o?"":o,l=t.duration;if(!e)throw new Error(ja);var c=Oa({baseUrl:e,source:n.sourceURL,range:n.range}),h=Oa({baseUrl:e,source:e,range:u});if(h.map=c,l){var d=xa(t);d.length&&(h.duration=d[0].duration,h.timeline=d[0].timeline)}else r&&(h.duration=r/s,h.timeline=0);return h.number=0,[h]},za=function(t){var e,i,n=t.attributes,r=t.segmentInfo;if(r.template?(i=Ra,e=Ta(n,r.template)):r.base?(i=qa,e=Ta(n,r.base)):r.list&&(i=Ha,e=Ta(n,r.list)),!i)return{attributes:n};var a=i(e,r.timeline);if(e.duration){var s=e,o=s.duration,u=s.timescale,l=void 0===u?1:u;e.duration=o/l}else a.length?e.duration=a.reduce(function(t,e){return Math.max(t,Math.ceil(e.duration))},0):e.duration=0;return{attributes:e,segments:a}},Wa=function(t,e){return ka(t.childNodes).filter(function(t){return t.tagName===e})},Ga=function(t){return t.textContent.trim()},Xa=function(t){var e=/P(?:(\d*)Y)?(?:(\d*)M)?(?:(\d*)D)?(?:T(?:(\d*)H)?(?:(\d*)M)?(?:([\d.]*)S)?)?/.exec(t);if(!e)return 0;var i=e.slice(1),n=i[0],r=i[1],a=i[2],s=i[3],o=i[4],u=i[5];return 31536e3*parseFloat(n||0)+2592e3*parseFloat(r||0)+86400*parseFloat(a||0)+3600*parseFloat(s||0)+60*parseFloat(o||0)+parseFloat(u||0)},Ya={mediaPresentationDuration:function(t){return Xa(t)},availabilityStartTime:function(t){return/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(e=t)&&(e+="Z"),Date.parse(e)/1e3;var e},minimumUpdatePeriod:function(t){return Xa(t)},timeShiftBufferDepth:function(t){return Xa(t)},start:function(t){return Xa(t)},width:function(t){return parseInt(t,10)},height:function(t){return parseInt(t,10)},bandwidth:function(t){return parseInt(t,10)},startNumber:function(t){return parseInt(t,10)},timescale:function(t){return parseInt(t,10)},duration:function(t){var e=parseInt(t,10);return isNaN(e)?Xa(t):e},d:function(t){return parseInt(t,10)},t:function(t){return parseInt(t,10)},r:function(t){return parseInt(t,10)},DEFAULT:function(t){return t}},$a=function(t){return t&&t.attributes?ka(t.attributes).reduce(function(t,e){var i=Ya[e.name]||Ya.DEFAULT;return t[e.name]=i(e.value),t},{}):{}};var Ka,Qa,Ja,Za,ts,es={"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"},is=function(t,i){return i.length?Sa(t.map(function(e){return i.map(function(t){return La(e,Ga(t))})})):t},ns=function(t){var e=Wa(t,"SegmentTemplate")[0],i=Wa(t,"SegmentList")[0],n=i&&Wa(i,"SegmentURL").map(function(t){return Ta({tag:"SegmentURL"},$a(t))}),r=Wa(t,"SegmentBase")[0],a=i||e,s=a&&Wa(a,"SegmentTimeline")[0],o=i||r||e,u=o&&Wa(o,"Initialization")[0],l=e&&$a(e);l&&u?l.initialization=u&&$a(u):l&&l.initialization&&(l.initialization={sourceURL:l.initialization});var c={template:l,timeline:s&&Wa(s,"S").map(function(t){return $a(t)}),list:i&&Ta($a(i),{segmentUrls:n,initialization:$a(u)}),base:r&&Ta($a(r),{initialization:$a(u)})};return Object.keys(c).forEach(function(t){c[t]||delete c[t]}),c},rs=function(t){return t.reduce(function(t,e){var i=$a(e),n=es[i.schemeIdUri];if(n){t[n]={attributes:i};var r=Wa(e,"cenc:pssh")[0];if(r){var a=Ga(r),s=a&&function(t){for(var e=v.atob(t),i=new Uint8Array(e.length),n=0;n<e.length;n++)i[n]=e.charCodeAt(n);return i}(a);t[n].pssh=s}}return t},{})},as=function(p,f,m){return function(t){var e=$a(t),i=is(f,Wa(t,"BaseURL")),n=Wa(t,"Role")[0],r={role:$a(n)},a=Ta(p,e,r),s=rs(Wa(t,"ContentProtection"));Object.keys(s).length&&(a=Ta(a,{contentProtection:s}));var o,u,l,c=ns(t),h=Wa(t,"Representation"),d=Ta(m,c);return Sa(h.map((o=a,u=i,l=d,function(t){var e=Wa(t,"BaseURL"),i=is(u,e),n=Ta(o,$a(t)),r=ns(t);return i.map(function(t){return{segmentInfo:Ta(l,r),attributes:Ta(n,{baseUrl:t})}})})))}},ss=function(t,e){void 0===e&&(e={});var i=e,n=i.manifestUri,r=void 0===n?"":n,a=i.NOW,s=void 0===a?Date.now():a,o=i.clientOffset,u=void 0===o?0:o,l=Wa(t,"Period");if(!l.length)throw new Error(Ma);var c,h,d=$a(t),p=is([r],Wa(t,"BaseURL"));return d.sourceDuration=d.mediaPresentationDuration||0,d.NOW=s,d.clientOffset=u,Sa(l.map((c=d,h=p,function(t,e){var i=is(h,Wa(t,"BaseURL")),n=$a(t),r=parseInt(n.id,10),a=v.isNaN(r)?e:r,s=Ta(c,{periodIndex:a}),o=Wa(t,"AdaptationSet"),u=ns(t);return Sa(o.map(as(s,i,u)))})))},os=function(t){if(""===t)throw new Error(Ba);var e=(new v.DOMParser).parseFromString(t,"application/xml"),i=e&&"MPD"===e.documentElement.tagName?e.documentElement:null;if(!i||i&&0<i.getElementsByTagName("parsererror").length)throw new Error(Na);return i},us=function(t,e){return function(t){var e;if(!t.length)return{};var i=t[0].attributes,n=i.sourceDuration,r=i.minimumUpdatePeriod,a=void 0===r?0:r,s=wa(t.filter(function(t){var e=t.attributes;return"video/mp4"===e.mimeType||"video"===e.contentType})).map(Ca),o=wa(t.filter(function(t){var e=t.attributes;return"audio/mp4"===e.mimeType||"audio"===e.contentType})),u=t.filter(function(t){var e=t.attributes;return"text/vtt"===e.mimeType||"text"===e.contentType}),l={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:(e={AUDIO:{},VIDEO:{}},e["CLOSED-CAPTIONS"]={},e.SUBTITLES={},e),uri:"",duration:n,playlists:s,minimumUpdatePeriod:1e3*a};return o.length&&(l.mediaGroups.AUDIO.audio=o.reduce(function(t,e){var i,n,r,a,s,o=e.attributes.role&&e.attributes.role.value||"main",u=e.attributes.lang||"",l="main";return u&&(l=e.attributes.lang+" ("+o+")"),t[l]&&t[l].playlists[0].attributes.BANDWIDTH>e.attributes.bandwidth||(t[l]={language:u,autoselect:!0,default:"main"===o,playlists:[(i=e,r=i.attributes,a=i.segments,s={attributes:(n={NAME:r.id,BANDWIDTH:r.bandwidth,CODECS:r.codecs},n["PROGRAM-ID"]=1,n),uri:"",endList:"static"===(r.type||"static"),timeline:r.periodIndex,resolvedUri:"",targetDuration:r.duration,segments:a,mediaSequence:a.length?a[0].number:1},r.contentProtection&&(s.contentProtection=r.contentProtection),s)],uri:""}),t},{})),u.length&&(l.mediaGroups.SUBTITLES.subs=u.reduce(function(t,e){var i,n,r,a,s=e.attributes.lang||"text";return t[s]||(t[s]={language:s,default:!1,autoselect:!1,playlists:[(i=e,r=i.attributes,a=i.segments,"undefined"==typeof a&&(a=[{uri:r.baseUrl,timeline:r.periodIndex,resolvedUri:r.baseUrl||"",duration:r.sourceDuration,number:0}],r.duration=r.sourceDuration),{attributes:(n={NAME:r.id,BANDWIDTH:r.bandwidth},n["PROGRAM-ID"]=1,n),uri:"",endList:"static"===(r.type||"static"),timeline:r.periodIndex,resolvedUri:r.baseUrl||"",targetDuration:r.duration,segments:a,mediaSequence:a.length?a[0].number:1})],uri:""}),t},{})),l}(ss(os(t),e).map(za))},ls=function(t){return function(t){var e=Wa(t,"UTCTiming")[0];if(!e)return null;var i=$a(e);switch(i.schemeIdUri){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":i.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":i.method="GET";break;case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":i.method="DIRECT",i.value=Date.parse(i.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(Va)}return i}(os(t))},cs=function(t){return t>>>0};Ja=function(t){return Ka(t,["moov","trak"]).reduce(function(t,e){var i,n,r,a,s;return(i=Ka(e,["tkhd"])[0])?(n=i[0],a=cs(i[r=0===n?12:20]<<24|i[r+1]<<16|i[r+2]<<8|i[r+3]),(s=Ka(e,["mdia","mdhd"])[0])?(r=0===(n=s[0])?12:20,t[a]=cs(s[r]<<24|s[r+1]<<16|s[r+2]<<8|s[r+3]),t):null):null},{})},Za=function(r,t){var e,i,n;return e=Ka(t,["moof","traf"]),i=[].concat.apply([],e.map(function(n){return Ka(n,["tfhd"]).map(function(t){var e,i;return e=cs(t[4]<<24|t[5]<<16|t[6]<<8|t[7]),i=r[e]||9e4,(Ka(n,["tfdt"]).map(function(t){var e,i;return e=t[0],i=cs(t[4]<<24|t[5]<<16|t[6]<<8|t[7]),1===e&&(i*=Math.pow(2,32),i+=cs(t[8]<<24|t[9]<<16|t[10]<<8|t[11])),i})[0]||1/0)/i})})),n=Math.min.apply(null,i),isFinite(n)?n:0},ts=function(t){var e=Ka(t,["moov","trak"]),o=[];return e.forEach(function(t){var e=Ka(t,["mdia","hdlr"]),s=Ka(t,["tkhd"]);e.forEach(function(t,e){var i,n,r=Qa(t.subarray(8,12)),a=s[e];"vide"===r&&(n=0===(i=new DataView(a.buffer,a.byteOffset,a.byteLength)).getUint8(0)?i.getUint32(12):i.getUint32(20),o.push(n))})}),o};var hs,ds,ps,fs,ms,gs,ys,vs,_s,bs,Ts,Ss,ks,ws,Cs,Es,As,Ls,Os,Ps,Us,xs,Is,Ds,Rs,Ms,Bs,Ns,js,Fs,Vs,Hs,qs,zs,Ws,Gs,Xs,Ys,$s,Ks,Qs={findBox:Ka=function(t,e){var i,n,r,a,s,o=[];if(!e.length)return null;for(i=0;i<t.byteLength;)n=cs(t[i]<<24|t[i+1]<<16|t[i+2]<<8|t[i+3]),r=Qa(t.subarray(i+4,i+8)),a=1<n?i+n:t.byteLength,r===e[0]&&(1===e.length?o.push(t.subarray(i+8,a)):(s=Ka(t.subarray(i+8,a),e.slice(1))).length&&(o=o.concat(s))),i=a;return o},parseType:Qa=function(t){var e="";return e+=String.fromCharCode(t[0]),e+=String.fromCharCode(t[1]),e+=String.fromCharCode(t[2]),e+=String.fromCharCode(t[3])},timescale:Ja,startTime:Za,videoTrackIds:ts},Js=Math.pow(2,32)-1;!function(){var t;if(xs={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(t in xs)xs.hasOwnProperty(t)&&(xs[t]=[t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2),t.charCodeAt(3)]);Is=new Uint8Array(["i".charCodeAt(0),"s".charCodeAt(0),"o".charCodeAt(0),"m".charCodeAt(0)]),Rs=new Uint8Array(["a".charCodeAt(0),"v".charCodeAt(0),"c".charCodeAt(0),"1".charCodeAt(0)]),Ds=new Uint8Array([0,0,0,1]),Ms=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]),Bs=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]),Ns={video:Ms,audio:Bs},Vs=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),Fs=new Uint8Array([0,0,0,0,0,0,0,0]),Hs=new Uint8Array([0,0,0,0,0,0,0,0]),qs=Hs,zs=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),Ws=Hs,js=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}}(),hs=function(t){var e,i,n=[],r=0;for(e=1;e<arguments.length;e++)n.push(arguments[e]);for(e=n.length;e--;)r+=n[e].byteLength;for(i=new Uint8Array(r+8),new DataView(i.buffer,i.byteOffset,i.byteLength).setUint32(0,i.byteLength),i.set(t,4),e=0,r=8;e<n.length;e++)i.set(n[e],r),r+=n[e].byteLength;return i},ds=function(){return hs(xs.dinf,hs(xs.dref,Vs))},ps=function(t){return hs(xs.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,t.audioobjecttype<<3|t.samplingfrequencyindex>>>1,t.samplingfrequencyindex<<7|t.channelcount<<3,6,1,2]))},Cs=function(t){return hs(xs.hdlr,Ns[t])},ws=function(t){var e=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,t.duration>>>24&255,t.duration>>>16&255,t.duration>>>8&255,255&t.duration,85,196,0,0]);return t.samplerate&&(e[12]=t.samplerate>>>24&255,e[13]=t.samplerate>>>16&255,e[14]=t.samplerate>>>8&255,e[15]=255&t.samplerate),hs(xs.mdhd,e)},ks=function(t){return hs(xs.mdia,ws(t),Cs(t.type),gs(t))},ms=function(t){return hs(xs.mfhd,new Uint8Array([0,0,0,0,(4278190080&t)>>24,(16711680&t)>>16,(65280&t)>>8,255&t]))},gs=function(t){return hs(xs.minf,"video"===t.type?hs(xs.vmhd,js):hs(xs.smhd,Fs),ds(),As(t))},ys=function(t,e){for(var i=[],n=e.length;n--;)i[n]=Os(e[n]);return hs.apply(null,[xs.moof,ms(t)].concat(i))},vs=function(t){for(var e=t.length,i=[];e--;)i[e]=Ts(t[e]);return hs.apply(null,[xs.moov,bs(4294967295)].concat(i).concat(_s(t)))},_s=function(t){for(var e=t.length,i=[];e--;)i[e]=Ps(t[e]);return hs.apply(null,[xs.mvex].concat(i))},bs=function(t){var e=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(4278190080&t)>>24,(16711680&t)>>16,(65280&t)>>8,255&t,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 hs(xs.mvhd,e)},Es=function(t){var e,i,n=t.samples||[],r=new Uint8Array(4+n.length);for(i=0;i<n.length;i++)e=n[i].flags,r[i+4]=e.dependsOn<<4|e.isDependedOn<<2|e.hasRedundancy;return hs(xs.sdtp,r)},As=function(t){return hs(xs.stbl,Ls(t),hs(xs.stts,Ws),hs(xs.stsc,qs),hs(xs.stsz,zs),hs(xs.stco,Hs))},Ls=function(t){return hs(xs.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),"video"===t.type?Gs(t):Xs(t))},Gs=function(t){var e,i=t.sps||[],n=t.pps||[],r=[],a=[];for(e=0;e<i.length;e++)r.push((65280&i[e].byteLength)>>>8),r.push(255&i[e].byteLength),r=r.concat(Array.prototype.slice.call(i[e]));for(e=0;e<n.length;e++)a.push((65280&n[e].byteLength)>>>8),a.push(255&n[e].byteLength),a=a.concat(Array.prototype.slice.call(n[e]));return hs(xs.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&t.width)>>8,255&t.width,(65280&t.height)>>8,255&t.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]),hs(xs.avcC,new Uint8Array([1,t.profileIdc,t.profileCompatibility,t.levelIdc,255].concat([i.length]).concat(r).concat([n.length]).concat(a))),hs(xs.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])))},Xs=function(t){return hs(xs.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(65280&t.channelcount)>>8,255&t.channelcount,(65280&t.samplesize)>>8,255&t.samplesize,0,0,0,0,(65280&t.samplerate)>>8,255&t.samplerate,0,0]),ps(t))},Ss=function(t){var e=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(4278190080&t.id)>>24,(16711680&t.id)>>16,(65280&t.id)>>8,255&t.id,0,0,0,0,(4278190080&t.duration)>>24,(16711680&t.duration)>>16,(65280&t.duration)>>8,255&t.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&t.width)>>8,255&t.width,0,0,(65280&t.height)>>8,255&t.height,0,0]);return hs(xs.tkhd,e)},Os=function(t){var e,i,n,r,a,s;return e=hs(xs.tfhd,new Uint8Array([0,0,0,58,(4278190080&t.id)>>24,(16711680&t.id)>>16,(65280&t.id)>>8,255&t.id,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),a=Math.floor(t.baseMediaDecodeTime/(Js+1)),s=Math.floor(t.baseMediaDecodeTime%(Js+1)),i=hs(xs.tfdt,new Uint8Array([1,0,0,0,a>>>24&255,a>>>16&255,a>>>8&255,255&a,s>>>24&255,s>>>16&255,s>>>8&255,255&s])),92,"audio"===t.type?(n=Us(t,92),hs(xs.traf,e,i,n)):(r=Es(t),n=Us(t,r.length+92),hs(xs.traf,e,i,n,r))},Ts=function(t){return t.duration=t.duration||4294967295,hs(xs.trak,Ss(t),ks(t))},Ps=function(t){var e=new Uint8Array([0,0,0,0,(4278190080&t.id)>>24,(16711680&t.id)>>16,(65280&t.id)>>8,255&t.id,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return"video"!==t.type&&(e[e.length-1]=0),hs(xs.trex,e)},Ks=function(t,e){var i=0,n=0,r=0,a=0;return t.length&&(void 0!==t[0].duration&&(i=1),void 0!==t[0].size&&(n=2),void 0!==t[0].flags&&(r=4),void 0!==t[0].compositionTimeOffset&&(a=8)),[0,0,i|n|r|a,1,(4278190080&t.length)>>>24,(16711680&t.length)>>>16,(65280&t.length)>>>8,255&t.length,(4278190080&e)>>>24,(16711680&e)>>>16,(65280&e)>>>8,255&e]},$s=function(t,e){var i,n,r,a;for(e+=20+16*(n=t.samples||[]).length,i=Ks(n,e),a=0;a<n.length;a++)r=n[a],i=i.concat([(4278190080&r.duration)>>>24,(16711680&r.duration)>>>16,(65280&r.duration)>>>8,255&r.duration,(4278190080&r.size)>>>24,(16711680&r.size)>>>16,(65280&r.size)>>>8,255&r.size,r.flags.isLeading<<2|r.flags.dependsOn,r.flags.isDependedOn<<6|r.flags.hasRedundancy<<4|r.flags.paddingValue<<1|r.flags.isNonSyncSample,61440&r.flags.degradationPriority,15&r.flags.degradationPriority,(4278190080&r.compositionTimeOffset)>>>24,(16711680&r.compositionTimeOffset)>>>16,(65280&r.compositionTimeOffset)>>>8,255&r.compositionTimeOffset]);return hs(xs.trun,new Uint8Array(i))},Ys=function(t,e){var i,n,r,a;for(e+=20+8*(n=t.samples||[]).length,i=Ks(n,e),a=0;a<n.length;a++)r=n[a],i=i.concat([(4278190080&r.duration)>>>24,(16711680&r.duration)>>>16,(65280&r.duration)>>>8,255&r.duration,(4278190080&r.size)>>>24,(16711680&r.size)>>>16,(65280&r.size)>>>8,255&r.size]);return hs(xs.trun,new Uint8Array(i))},Us=function(t,e){return"audio"===t.type?Ys(t,e):$s(t,e)};var Zs={ftyp:fs=function(){return hs(xs.ftyp,Is,Ds,Is,Rs)},mdat:function(t){return hs(xs.mdat,t)},moof:ys,moov:vs,initSegment:function(t){var e,i=fs(),n=vs(t);return(e=new Uint8Array(i.byteLength+n.byteLength)).set(i),e.set(n,i.byteLength),e}},to=function(){this.init=function(){var a={};this.on=function(t,e){a[t]||(a[t]=[]),a[t]=a[t].concat(e)},this.off=function(t,e){var i;return!!a[t]&&(i=a[t].indexOf(e),a[t]=a[t].slice(),a[t].splice(i,1),-1<i)},this.trigger=function(t){var e,i,n,r;if(e=a[t])if(2===arguments.length)for(n=e.length,i=0;i<n;++i)e[i].call(this,arguments[1]);else{for(r=[],i=arguments.length,i=1;i<arguments.length;++i)r.push(arguments[i]);for(n=e.length,i=0;i<n;++i)e[i].apply(this,r)}},this.dispose=function(){a={}}}};to.prototype.pipe=function(e){return this.on("data",function(t){e.push(t)}),this.on("done",function(t){e.flush(t)}),e},to.prototype.push=function(t){this.trigger("data",t)},to.prototype.flush=function(t){this.trigger("done",t)};var eo=to,io=function(t){var e,i,n=[],r=[];for(e=n.byteLength=0;e<t.length;e++)"access_unit_delimiter_rbsp"===(i=t[e]).nalUnitType?(n.length&&(n.duration=i.dts-n.dts,r.push(n)),(n=[i]).byteLength=i.data.byteLength,n.pts=i.pts,n.dts=i.dts):("slice_layer_without_partitioning_rbsp_idr"===i.nalUnitType&&(n.keyFrame=!0),n.duration=i.dts-n.dts,n.byteLength+=i.data.byteLength,n.push(i));return r.length&&(!n.duration||n.duration<=0)&&(n.duration=r[r.length-1].duration),r.push(n),r},no=function(t){var e,i,n=[],r=[];for(n.byteLength=0,n.nalCount=0,n.duration=0,n.pts=t[0].pts,n.dts=t[0].dts,r.byteLength=0,r.nalCount=0,r.duration=0,r.pts=t[0].pts,r.dts=t[0].dts,e=0;e<t.length;e++)(i=t[e]).keyFrame?(n.length&&(r.push(n),r.byteLength+=n.byteLength,r.nalCount+=n.nalCount,r.duration+=n.duration),(n=[i]).nalCount=i.length,n.byteLength=i.byteLength,n.pts=i.pts,n.dts=i.dts,n.duration=i.duration):(n.duration+=i.duration,n.nalCount+=i.length,n.byteLength+=i.byteLength,n.push(i));return r.length&&n.duration<=0&&(n.duration=r[r.length-1].duration),r.byteLength+=n.byteLength,r.nalCount+=n.nalCount,r.duration+=n.duration,r.push(n),r},ro=function(t){var e;return!t[0][0].keyFrame&&1<t.length&&(e=t.shift(),t.byteLength-=e.byteLength,t.nalCount-=e.nalCount,t[0][0].dts=e.dts,t[0][0].pts=e.pts,t[0][0].duration+=e.duration),t},ao=function(t,e){var i,n,r,a,s,o,u,l=e||0,c=[];for(i=0;i<t.length;i++)for(a=t[i],n=0;n<a.length;n++)s=a[n],o=s,u=void 0,(u={size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}}).dataOffset=l,u.compositionTimeOffset=o.pts-o.dts,u.duration=o.duration,u.size=4*o.length,u.size+=o.byteLength,o.keyFrame&&(u.flags.dependsOn=2,u.flags.isNonSyncSample=0),l+=(r=u).size,c.push(r);return c},so=function(t){var e,i,n,r,a,s,o=0,u=t.byteLength,l=t.nalCount,c=new Uint8Array(u+4*l),h=new DataView(c.buffer);for(e=0;e<t.length;e++)for(r=t[e],i=0;i<r.length;i++)for(a=r[i],n=0;n<a.length;n++)s=a[n],h.setUint32(o,s.data.byteLength),o+=4,c.set(s.data,o),o+=s.data.byteLength;return c},oo=function(t){delete t.minSegmentDts,delete t.maxSegmentDts,delete t.minSegmentPts,delete t.maxSegmentPts},uo=function(t,e){var i,n=t.minSegmentDts;return e||(n-=t.timelineStartInfo.dts),i=t.timelineStartInfo.baseMediaDecodeTime,i+=n,i=Math.max(0,i),"audio"===t.type&&(i*=t.samplerate/9e4,i=Math.floor(i)),i},lo=function(t,e){"number"==typeof e.pts&&(void 0===t.timelineStartInfo.pts&&(t.timelineStartInfo.pts=e.pts),void 0===t.minSegmentPts?t.minSegmentPts=e.pts:t.minSegmentPts=Math.min(t.minSegmentPts,e.pts),void 0===t.maxSegmentPts?t.maxSegmentPts=e.pts:t.maxSegmentPts=Math.max(t.maxSegmentPts,e.pts)),"number"==typeof e.dts&&(void 0===t.timelineStartInfo.dts&&(t.timelineStartInfo.dts=e.dts),void 0===t.minSegmentDts?t.minSegmentDts=e.dts:t.minSegmentDts=Math.min(t.minSegmentDts,e.dts),void 0===t.maxSegmentDts?t.maxSegmentDts=e.dts:t.maxSegmentDts=Math.max(t.maxSegmentDts,e.dts))},co=function(t){for(var e=0,i={payloadType:-1,payloadSize:0},n=0,r=0;e<t.byteLength&&128!==t[e];){for(;255===t[e];)n+=255,e++;for(n+=t[e++];255===t[e];)r+=255,e++;if(r+=t[e++],!i.payload&&4===n){i.payloadType=n,i.payloadSize=r,i.payload=t.subarray(e,e+r);break}e+=r,r=n=0}return i},ho=function(t){return 181!==t.payload[0]?null:49!=(t.payload[1]<<8|t.payload[2])?null:"GA94"!==String.fromCharCode(t.payload[3],t.payload[4],t.payload[5],t.payload[6])?null:3!==t.payload[7]?null:t.payload.subarray(8,t.payload.length-1)},po=function(t,e){var i,n,r,a,s=[];if(!(64&e[0]))return s;for(n=31&e[0],i=0;i<n;i++)a={type:3&e[2+(r=3*i)],pts:t},4&e[r+2]&&(a.ccData=e[r+3]<<8|e[r+4],s.push(a));return s},fo=function(t){for(var e,i,n=t.byteLength,r=[],a=1;a<n-2;)0===t[a]&&0===t[a+1]&&3===t[a+2]?(r.push(a+2),a+=2):a++;if(0===r.length)return t;e=n-r.length,i=new Uint8Array(e);var s=0;for(a=0;a<e;s++,a++)s===r[0]&&(s++,r.shift()),i[a]=t[s];return i},mo=4,go=function t(){t.prototype.init.call(this),this.captionPackets_=[],this.ccStreams_=[new To(0,0),new To(0,1),new To(1,0),new To(1,1)],this.reset(),this.ccStreams_.forEach(function(t){t.on("data",this.trigger.bind(this,"data")),t.on("done",this.trigger.bind(this,"done"))},this)};(go.prototype=new eo).push=function(t){var e,i,n;if("sei_rbsp"===t.nalUnitType&&(e=co(t.escapedRBSP)).payloadType===mo&&(i=ho(e)))if(t.dts<this.latestDts_)this.ignoreNextEqualDts_=!0;else{if(t.dts===this.latestDts_&&this.ignoreNextEqualDts_)return this.numSameDts_--,void(this.numSameDts_||(this.ignoreNextEqualDts_=!1));n=po(t.pts,i),this.captionPackets_=this.captionPackets_.concat(n),this.latestDts_!==t.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=t.dts}},go.prototype.flush=function(){this.captionPackets_.length?(this.captionPackets_.forEach(function(t,e){t.presortIndex=e}),this.captionPackets_.sort(function(t,e){return t.pts===e.pts?t.presortIndex-e.presortIndex:t.pts-e.pts}),this.captionPackets_.forEach(function(t){t.type<2&&this.dispatchCea608Packet(t)},this),this.captionPackets_.length=0,this.ccStreams_.forEach(function(t){t.flush()},this)):this.ccStreams_.forEach(function(t){t.flush()},this)},go.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach(function(t){t.reset()})},go.prototype.dispatchCea608Packet=function(t){this.setsChannel1Active(t)?this.activeCea608Channel_[t.type]=0:this.setsChannel2Active(t)&&(this.activeCea608Channel_[t.type]=1),null!==this.activeCea608Channel_[t.type]&&this.ccStreams_[(t.type<<1)+this.activeCea608Channel_[t.type]].push(t)},go.prototype.setsChannel1Active=function(t){return 4096==(30720&t.ccData)},go.prototype.setsChannel2Active=function(t){return 6144==(30720&t.ccData)};var yo={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},vo=function(t){return null===t?"":(t=yo[t]||t,String.fromCharCode(t))},_o=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],bo=function(){for(var t=[],e=15;e--;)t.push("");return t},To=function t(e,i){t.prototype.init.call(this),this.field_=e||0,this.dataChannel_=i||0,this.name_="CC"+(1+(this.field_<<1|this.dataChannel_)),this.setConstants(),this.reset(),this.push=function(t){var e,i,n,r,a;if((e=32639&t.ccData)!==this.lastControlCode_){if(4096==(61440&e)?this.lastControlCode_=e:e!==this.PADDING_&&(this.lastControlCode_=null),n=e>>>8,r=255&e,e!==this.PADDING_)if(e===this.RESUME_CAPTION_LOADING_)this.mode_="popOn";else if(e===this.END_OF_CAPTION_)this.mode_="popOn",this.clearFormatting(t.pts),this.flushDisplayed(t.pts),i=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=i,this.startPts_=t.pts;else if(e===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(t.pts);else if(e===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(t.pts);else if(e===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(t.pts);else if(e===this.CARRIAGE_RETURN_)this.clearFormatting(t.pts),this.flushDisplayed(t.pts),this.shiftRowsUp_(),this.startPts_=t.pts;else if(e===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);else if(e===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(t.pts),this.displayed_=bo();else if(e===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=bo();else if(e===this.RESUME_DIRECT_CAPTIONING_)"paintOn"!==this.mode_&&(this.flushDisplayed(t.pts),this.displayed_=bo()),this.mode_="paintOn",this.startPts_=t.pts;else if(this.isSpecialCharacter(n,r))a=vo((n=(3&n)<<8)|r),this[this.mode_](t.pts,a),this.column_++;else if(this.isExtCharacter(n,r))"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),a=vo((n=(3&n)<<8)|r),this[this.mode_](t.pts,a),this.column_++;else if(this.isMidRowCode(n,r))this.clearFormatting(t.pts),this[this.mode_](t.pts," "),this.column_++,14==(14&r)&&this.addFormatting(t.pts,["i"]),1==(1&r)&&this.addFormatting(t.pts,["u"]);else if(this.isOffsetControlCode(n,r))this.column_+=3&r;else if(this.isPAC(n,r)){var s=_o.indexOf(7968&e);"rollUp"===this.mode_&&this.setRollUp(t.pts,s),s!==this.row_&&(this.clearFormatting(t.pts),this.row_=s),1&r&&-1===this.formatting_.indexOf("u")&&this.addFormatting(t.pts,["u"]),16==(16&e)&&(this.column_=4*((14&e)>>1)),this.isColorPAC(r)&&14==(14&r)&&this.addFormatting(t.pts,["i"])}else this.isNormalChar(n)&&(0===r&&(r=null),a=vo(n),a+=vo(r),this[this.mode_](t.pts,a),this.column_+=a.length)}else this.lastControlCode_=null}};To.prototype=new eo,To.prototype.flushDisplayed=function(t){var e=this.displayed_.map(function(t){return t.trim()}).join("\n").replace(/^\n+|\n+$/g,"");e.length&&this.trigger("data",{startPts:this.startPts_,endPts:t,text:e,stream:this.name_})},To.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=bo(),this.nonDisplayed_=bo(),this.lastControlCode_=null,this.column_=0,this.row_=14,this.rollUpRows_=2,this.formatting_=[]},To.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_},To.prototype.isSpecialCharacter=function(t,e){return t===this.EXT_&&48<=e&&e<=63},To.prototype.isExtCharacter=function(t,e){return(t===this.EXT_+1||t===this.EXT_+2)&&32<=e&&e<=63},To.prototype.isMidRowCode=function(t,e){return t===this.EXT_&&32<=e&&e<=47},To.prototype.isOffsetControlCode=function(t,e){return t===this.OFFSET_&&33<=e&&e<=35},To.prototype.isPAC=function(t,e){return t>=this.BASE_&&t<this.BASE_+8&&64<=e&&e<=127},To.prototype.isColorPAC=function(t){return 64<=t&&t<=79||96<=t&&t<=127},To.prototype.isNormalChar=function(t){return 32<=t&&t<=127},To.prototype.setRollUp=function(t,e){if("rollUp"!==this.mode_&&(this.row_=14,this.mode_="rollUp",this.flushDisplayed(t),this.nonDisplayed_=bo(),this.displayed_=bo()),void 0!==e&&e!==this.row_)for(var i=0;i<this.rollUpRows_;i++)this.displayed_[e-i]=this.displayed_[this.row_-i],this.displayed_[this.row_-i]="";void 0===e&&(e=this.row_),this.topRow_=e-this.rollUpRows_+1},To.prototype.addFormatting=function(t,e){this.formatting_=this.formatting_.concat(e);var i=e.reduce(function(t,e){return t+"<"+e+">"},"");this[this.mode_](t,i)},To.prototype.clearFormatting=function(t){if(this.formatting_.length){var e=this.formatting_.reverse().reduce(function(t,e){return t+"</"+e+">"},"");this.formatting_=[],this[this.mode_](t,e)}},To.prototype.popOn=function(t,e){var i=this.nonDisplayed_[this.row_];i+=e,this.nonDisplayed_[this.row_]=i},To.prototype.rollUp=function(t,e){var i=this.displayed_[this.row_];i+=e,this.displayed_[this.row_]=i},To.prototype.shiftRowsUp_=function(){var t;for(t=0;t<this.topRow_;t++)this.displayed_[t]="";for(t=this.row_+1;t<15;t++)this.displayed_[t]="";for(t=this.topRow_;t<this.row_;t++)this.displayed_[t]=this.displayed_[t+1];this.displayed_[this.row_]=""},To.prototype.paintOn=function(t,e){var i=this.displayed_[this.row_];i+=e,this.displayed_[this.row_]=i};var So={CaptionStream:go,Cea608Stream:To},ko={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},wo=function(t,e){var i=1;for(e<t&&(i=-1);4294967296<Math.abs(e-t);)t+=8589934592*i;return t},Co=function t(e){var i,n;t.prototype.init.call(this),this.type_=e,this.push=function(t){t.type===this.type_&&(void 0===n&&(n=t.dts),t.dts=wo(t.dts,n),t.pts=wo(t.pts,n),i=t.dts,this.trigger("data",t))},this.flush=function(){n=i,this.trigger("done")},this.discontinuity=function(){i=n=void 0}};Co.prototype=new eo;var Eo,Ao=Co,Lo=wo,Oo=function(t,e,i){var n,r="";for(n=e;n<i;n++)r+="%"+("00"+t[n].toString(16)).slice(-2);return r},Po=function(t,e,i){return decodeURIComponent(Oo(t,e,i))},Uo=function(t){return t[0]<<21|t[1]<<14|t[2]<<7|t[3]},xo={TXXX:function(t){var e;if(3===t.data[0]){for(e=1;e<t.data.length;e++)if(0===t.data[e]){t.description=Po(t.data,1,e),t.value=Po(t.data,e+1,t.data.length).replace(/\0*$/,"");break}t.data=t.value}},WXXX:function(t){var e;if(3===t.data[0])for(e=1;e<t.data.length;e++)if(0===t.data[e]){t.description=Po(t.data,1,e),t.url=Po(t.data,e+1,t.data.length);break}},PRIV:function(t){var e,i;for(e=0;e<t.data.length;e++)if(0===t.data[e]){t.owner=(i=t.data,unescape(Oo(i,0,e)));break}t.privateData=t.data.subarray(e+1),t.data=t.privateData}};(Eo=function(t){var e,u={debug:!(!t||!t.debug),descriptor:t&&t.descriptor},l=0,c=[],h=0;if(Eo.prototype.init.call(this),this.dispatchType=ko.METADATA_STREAM_TYPE.toString(16),u.descriptor)for(e=0;e<u.descriptor.length;e++)this.dispatchType+=("00"+u.descriptor[e].toString(16)).slice(-2);this.push=function(t){var e,i,n,r,a;if("timed-metadata"===t.type)if(t.dataAlignmentIndicator&&(h=0,c.length=0),0===c.length&&(t.data.length<10||t.data[0]!=="I".charCodeAt(0)||t.data[1]!=="D".charCodeAt(0)||t.data[2]!=="3".charCodeAt(0)))u.debug;else if(c.push(t),h+=t.data.byteLength,1===c.length&&(l=Uo(t.data.subarray(6,10)),l+=10),!(h<l)){for(e={data:new Uint8Array(l),frames:[],pts:c[0].pts,dts:c[0].dts},a=0;a<l;)e.data.set(c[0].data.subarray(0,l-a),a),a+=c[0].data.byteLength,h-=c[0].data.byteLength,c.shift();i=10,64&e.data[5]&&(i+=4,i+=Uo(e.data.subarray(10,14)),l-=Uo(e.data.subarray(16,20)));do{if((n=Uo(e.data.subarray(i+4,i+8)))<1)return;if((r={id:String.fromCharCode(e.data[i],e.data[i+1],e.data[i+2],e.data[i+3]),data:e.data.subarray(i+10,i+n+10)}).key=r.id,xo[r.id]&&(xo[r.id](r),"com.apple.streaming.transportStreamTimestamp"===r.owner)){var s=r.data,o=(1&s[3])<<30|s[4]<<22|s[5]<<14|s[6]<<6|s[7]>>>2;o*=4,o+=3&s[7],r.timeStamp=o,void 0===e.pts&&void 0===e.dts&&(e.pts=r.timeStamp,e.dts=r.timeStamp),this.trigger("timestamp",r)}e.frames.push(r),i+=10,i+=n}while(i<l);this.trigger("data",e)}}}).prototype=new eo;var Io,Do,Ro,Mo=Eo,Bo=Ao;(Io=function(){var r=new Uint8Array(188),a=0;Io.prototype.init.call(this),this.push=function(t){var e,i=0,n=188;for(a?((e=new Uint8Array(t.byteLength+a)).set(r.subarray(0,a)),e.set(t,a),a=0):e=t;n<e.byteLength;)71!==e[i]||71!==e[n]?(i++,n++):(this.trigger("data",e.subarray(i,n)),i+=188,n+=188);i<e.byteLength&&(r.set(e.subarray(i),0),a=e.byteLength-i)},this.flush=function(){188===a&&71===r[0]&&(this.trigger("data",r),a=0),this.trigger("done")}}).prototype=new eo,(Do=function(){var n,r,a,s;Do.prototype.init.call(this),(s=this).packetsWaitingForPmt=[],this.programMapTable=void 0,n=function(t,e){var i=0;e.payloadUnitStartIndicator&&(i+=t[i]+1),"pat"===e.type?r(t.subarray(i),e):a(t.subarray(i),e)},r=function(t,e){e.section_number=t[7],e.last_section_number=t[8],s.pmtPid=(31&t[10])<<8|t[11],e.pmtPid=s.pmtPid},a=function(t,e){var i,n;if(1&t[5]){for(s.programMapTable={video:null,audio:null,"timed-metadata":{}},i=3+((15&t[1])<<8|t[2])-4,n=12+((15&t[10])<<8|t[11]);n<i;){var r=t[n],a=(31&t[n+1])<<8|t[n+2];r===ko.H264_STREAM_TYPE&&null===s.programMapTable.video?s.programMapTable.video=a:r===ko.ADTS_STREAM_TYPE&&null===s.programMapTable.audio?s.programMapTable.audio=a:r===ko.METADATA_STREAM_TYPE&&(s.programMapTable["timed-metadata"][a]=r),n+=5+((15&t[n+3])<<8|t[n+4])}e.programMapTable=s.programMapTable}},this.push=function(t){var e={},i=4;if(e.payloadUnitStartIndicator=!!(64&t[1]),e.pid=31&t[1],e.pid<<=8,e.pid|=t[2],1<(48&t[3])>>>4&&(i+=t[i]+1),0===e.pid)e.type="pat",n(t.subarray(i),e),this.trigger("data",e);else if(e.pid===this.pmtPid)for(e.type="pmt",n(t.subarray(i),e),this.trigger("data",e);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else void 0===this.programMapTable?this.packetsWaitingForPmt.push([t,i,e]):this.processPes_(t,i,e)},this.processPes_=function(t,e,i){i.pid===this.programMapTable.video?i.streamType=ko.H264_STREAM_TYPE:i.pid===this.programMapTable.audio?i.streamType=ko.ADTS_STREAM_TYPE:i.streamType=this.programMapTable["timed-metadata"][i.pid],i.type="pes",i.data=t.subarray(e),this.trigger("data",i)}}).prototype=new eo,Do.STREAM_TYPES={h264:27,adts:15},(Ro=function(){var d=this,n={data:[],size:0},r={data:[],size:0},a={data:[],size:0},s=function(t,e,i){var n,r,a=new Uint8Array(t.size),s={type:e},o=0,u=0;if(t.data.length&&!(t.size<9)){for(s.trackId=t.data[0].pid,o=0;o<t.data.length;o++)r=t.data[o],a.set(r.data,u),u+=r.data.byteLength;var l,c,h;l=a,(c=s).packetLength=6+(l[4]<<8|l[5]),c.dataAlignmentIndicator=0!=(4&l[6]),192&(h=l[7])&&(c.pts=(14&l[9])<<27|(255&l[10])<<20|(254&l[11])<<12|(255&l[12])<<5|(254&l[13])>>>3,c.pts*=4,c.pts+=(6&l[13])>>>1,c.dts=c.pts,64&h&&(c.dts=(14&l[14])<<27|(255&l[15])<<20|(254&l[16])<<12|(255&l[17])<<5|(254&l[18])>>>3,c.dts*=4,c.dts+=(6&l[18])>>>1)),c.data=l.subarray(9+l[8]),n="video"===e||s.packetLength<=t.size,(i||n)&&(t.size=0,t.data.length=0),n&&d.trigger("data",s)}};Ro.prototype.init.call(this),this.push=function(i){({pat:function(){},pes:function(){var t,e;switch(i.streamType){case ko.H264_STREAM_TYPE:case ko.H264_STREAM_TYPE:t=n,e="video";break;case ko.ADTS_STREAM_TYPE:t=r,e="audio";break;case ko.METADATA_STREAM_TYPE:t=a,e="timed-metadata";break;default:return}i.payloadUnitStartIndicator&&s(t,e,!0),t.data.push(i),t.size+=i.data.byteLength},pmt:function(){var t={type:"metadata",tracks:[]},e=i.programMapTable;null!==e.video&&t.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.video,codec:"avc",type:"video"}),null!==e.audio&&t.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.audio,codec:"adts",type:"audio"}),d.trigger("data",t)}})[i.type]()},this.flush=function(){s(n,"video"),s(r,"audio"),s(a,"timed-metadata"),this.trigger("done")}}).prototype=new eo;var No={PAT_PID:0,MP2T_PACKET_LENGTH:188,TransportPacketStream:Io,TransportParseStream:Do,ElementaryStream:Ro,TimestampRolloverStream:Bo,CaptionStream:So.CaptionStream,Cea608Stream:So.Cea608Stream,MetadataStream:Mo};for(var jo in ko)ko.hasOwnProperty(jo)&&(No[jo]=ko[jo]);var Fo,Vo=No,Ho=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];(Fo=function(){var l;Fo.prototype.init.call(this),this.push=function(t){var e,i,n,r,a,s,o=0,u=0;if("audio"===t.type)for(l?(r=l,(l=new Uint8Array(r.byteLength+t.data.byteLength)).set(r),l.set(t.data,r.byteLength)):l=t.data;o+5<l.length;)if(255===l[o]&&240==(246&l[o+1])){if(i=2*(1&~l[o+1]),e=(3&l[o+3])<<11|l[o+4]<<3|(224&l[o+5])>>5,s=9e4*(a=1024*(1+(3&l[o+6])))/Ho[(60&l[o+2])>>>2],n=o+e,l.byteLength<n)return;if(this.trigger("data",{pts:t.pts+u*s,dts:t.dts+u*s,sampleCount:a,audioobjecttype:1+(l[o+2]>>>6&3),channelcount:(1&l[o+2])<<2|(192&l[o+3])>>>6,samplerate:Ho[(60&l[o+2])>>>2],samplingfrequencyindex:(60&l[o+2])>>>2,samplesize:16,data:l.subarray(o+7+i,n)}),l.byteLength===n)return void(l=void 0);u++,l=l.subarray(n)}else o++},this.flush=function(){this.trigger("done")}}).prototype=new eo;var qo,zo,Wo,Go=Fo,Xo=function(n){var r=n.byteLength,a=0,s=0;this.length=function(){return 8*r},this.bitsAvailable=function(){return 8*r+s},this.loadWord=function(){var t=n.byteLength-r,e=new Uint8Array(4),i=Math.min(4,r);if(0===i)throw new Error("no bytes available");e.set(n.subarray(t,t+i)),a=new DataView(e.buffer).getUint32(0),s=8*i,r-=i},this.skipBits=function(t){var e;t<s||(t-=s,t-=8*(e=Math.floor(t/8)),r-=e,this.loadWord()),a<<=t,s-=t},this.readBits=function(t){var e=Math.min(s,t),i=a>>>32-e;return 0<(s-=e)?a<<=e:0<r&&this.loadWord(),0<(e=t-e)?i<<e|this.readBits(e):i},this.skipLeadingZeros=function(){var t;for(t=0;t<s;++t)if(0!=(a&2147483648>>>t))return a<<=t,s-=t,t;return this.loadWord(),t+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var t=this.skipLeadingZeros();return this.readBits(t+1)-1},this.readExpGolomb=function(){var t=this.readUnsignedExpGolomb();return 1&t?1+t>>>1:-1*(t>>>1)},this.readBoolean=function(){return 1===this.readBits(1)},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()};(zo=function(){var i,n,r=0;zo.prototype.init.call(this),this.push=function(t){var e;for(n=n?((e=new Uint8Array(n.byteLength+t.data.byteLength)).set(n),e.set(t.data,n.byteLength),e):t.data;r<n.byteLength-3;r++)if(1===n[r+2]){i=r+5;break}for(;i<n.byteLength;)switch(n[i]){case 0:if(0!==n[i-1]){i+=2;break}if(0!==n[i-2]){i++;break}for(r+3!==i-2&&this.trigger("data",n.subarray(r+3,i-2));1!==n[++i]&&i<n.length;);r=i-2,i+=3;break;case 1:if(0!==n[i-1]||0!==n[i-2]){i+=3;break}this.trigger("data",n.subarray(r+3,i-2)),r=i-2,i+=3;break;default:i+=3}n=n.subarray(r),i-=r,r=0},this.flush=function(){n&&3<n.byteLength&&this.trigger("data",n.subarray(r+3)),n=null,r=0,this.trigger("done")}}).prototype=new eo,Wo={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},(qo=function(){var i,n,r,a,s,o,_,e=new zo;qo.prototype.init.call(this),(i=this).push=function(t){"video"===t.type&&(n=t.trackId,r=t.pts,a=t.dts,e.push(t))},e.on("data",function(t){var e={trackId:n,pts:r,dts:a,data:t};switch(31&t[0]){case 5:e.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:e.nalUnitType="sei_rbsp",e.escapedRBSP=s(t.subarray(1));break;case 7:e.nalUnitType="seq_parameter_set_rbsp",e.escapedRBSP=s(t.subarray(1)),e.config=o(e.escapedRBSP);break;case 8:e.nalUnitType="pic_parameter_set_rbsp";break;case 9:e.nalUnitType="access_unit_delimiter_rbsp"}i.trigger("data",e)}),e.on("done",function(){i.trigger("done")}),this.flush=function(){e.flush()},_=function(t,e){var i,n=8,r=8;for(i=0;i<t;i++)0!==r&&(r=(n+e.readExpGolomb()+256)%256),n=0===r?n:r},s=function(t){for(var e,i,n=t.byteLength,r=[],a=1;a<n-2;)0===t[a]&&0===t[a+1]&&3===t[a+2]?(r.push(a+2),a+=2):a++;if(0===r.length)return t;e=n-r.length,i=new Uint8Array(e);var s=0;for(a=0;a<e;s++,a++)s===r[0]&&(s++,r.shift()),i[a]=t[s];return i},o=function(t){var e,i,n,r,a,s,o,u,l,c,h,d,p,f=0,m=0,g=0,y=0,v=1;if(i=(e=new Xo(t)).readUnsignedByte(),r=e.readUnsignedByte(),n=e.readUnsignedByte(),e.skipUnsignedExpGolomb(),Wo[i]&&(3===(a=e.readUnsignedExpGolomb())&&e.skipBits(1),e.skipUnsignedExpGolomb(),e.skipUnsignedExpGolomb(),e.skipBits(1),e.readBoolean()))for(h=3!==a?8:12,p=0;p<h;p++)e.readBoolean()&&_(p<6?16:64,e);if(e.skipUnsignedExpGolomb(),0===(s=e.readUnsignedExpGolomb()))e.readUnsignedExpGolomb();else if(1===s)for(e.skipBits(1),e.skipExpGolomb(),e.skipExpGolomb(),o=e.readUnsignedExpGolomb(),p=0;p<o;p++)e.skipExpGolomb();if(e.skipUnsignedExpGolomb(),e.skipBits(1),u=e.readUnsignedExpGolomb(),l=e.readUnsignedExpGolomb(),0===(c=e.readBits(1))&&e.skipBits(1),e.skipBits(1),e.readBoolean()&&(f=e.readUnsignedExpGolomb(),m=e.readUnsignedExpGolomb(),g=e.readUnsignedExpGolomb(),y=e.readUnsignedExpGolomb()),e.readBoolean()&&e.readBoolean()){switch(e.readUnsignedByte()){case 1:d=[1,1];break;case 2:d=[12,11];break;case 3:d=[10,11];break;case 4:d=[16,11];break;case 5:d=[40,33];break;case 6:d=[24,11];break;case 7:d=[20,11];break;case 8:d=[32,11];break;case 9:d=[80,33];break;case 10:d=[18,11];break;case 11:d=[15,11];break;case 12:d=[64,33];break;case 13:d=[160,99];break;case 14:d=[4,3];break;case 15:d=[3,2];break;case 16:d=[2,1];break;case 255:d=[e.readUnsignedByte()<<8|e.readUnsignedByte(),e.readUnsignedByte()<<8|e.readUnsignedByte()]}d&&(v=d[0]/d[1])}return{profileIdc:i,levelIdc:n,profileCompatibility:r,width:Math.ceil((16*(u+1)-2*f-2*m)*v),height:(2-c)*(l+1)*16-2*g-2*y}}}).prototype=new eo;var Yo,$o={H264Stream:qo,NalByteStream:zo};(Yo=function(){var o=new Uint8Array,u=0;Yo.prototype.init.call(this),this.setTimestamp=function(t){u=t},this.parseId3TagSize=function(t,e){var i=t[e+6]<<21|t[e+7]<<14|t[e+8]<<7|t[e+9];return(16&t[e+5])>>4?i+20:i+10},this.parseAdtsSize=function(t,e){var i=(224&t[e+5])>>5,n=t[e+4]<<3;return 6144&t[e+3]|n|i},this.push=function(t){var e,i,n,r,a=0,s=0;for(o.length?(r=o.length,(o=new Uint8Array(t.byteLength+r)).set(o.subarray(0,r)),o.set(t,r)):o=t;3<=o.length-s;)if(o[s]!=="I".charCodeAt(0)||o[s+1]!=="D".charCodeAt(0)||o[s+2]!=="3".charCodeAt(0))if(!0&o[s]&&240==(240&o[s+1])){if(o.length-s<7)break;if((a=this.parseAdtsSize(o,s))>o.length)break;n={type:"audio",data:o.subarray(s,s+a),pts:u,dts:u},this.trigger("data",n),s+=a}else s++;else{if(o.length-s<10)break;if((a=this.parseId3TagSize(o,s))>o.length)break;i={type:"timed-metadata",data:o.subarray(s,s+a)},this.trigger("data",i),s+=a}e=o.length-s,o=0<e?o.subarray(s):new Uint8Array}}).prototype=new eo;var Ko,Qo,Jo,Zo,tu,eu,iu,nu=Yo,ru=[33,16,5,32,164,27],au=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],su=function(t){for(var e=[];t--;)e.push(0);return e},ou={96e3:[ru,[227,64],su(154),[56]],88200:[ru,[231],su(170),[56]],64e3:[ru,[248,192],su(240),[56]],48e3:[ru,[255,192],su(268),[55,148,128],su(54),[112]],44100:[ru,[255,192],su(268),[55,163,128],su(84),[112]],32e3:[ru,[255,192],su(268),[55,234],su(226),[112]],24e3:[ru,[255,192],su(268),[55,255,128],su(268),[111,112],su(126),[224]],16e3:[ru,[255,192],su(268),[55,255,128],su(268),[111,255],su(269),[223,108],su(195),[1,192]],12e3:[au,su(268),[3,127,248],su(268),[6,255,240],su(268),[13,255,224],su(268),[27,253,128],su(259),[56]],11025:[au,su(268),[3,127,248],su(268),[6,255,240],su(268),[13,255,224],su(268),[27,255,192],su(268),[55,175,128],su(108),[112]],8e3:[au,su(268),[3,121,16],su(47),[7]]},uu=(Ko=ou,Object.keys(Ko).reduce(function(t,e){return t[e]=new Uint8Array(Ko[e].reduce(function(t,e){return t.concat(e)},[])),t},{}));eu=function(t,e){return Qo(tu(t,e))},iu=function(t,e){return Jo(Zo(t),e)};Qo=function(t){return 9e4*t},Jo=function(t,e){return t*e},Zo=function(t){return t/9e4},tu=function(t,e){return t/e};var lu,cu,hu,du,pu,fu,mu,gu=eu,yu=iu,vu=$o.H264Stream,_u=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],bu=["width","height","profileIdc","levelIdc","profileCompatibility"];pu=function(t){return t[0]==="I".charCodeAt(0)&&t[1]==="D".charCodeAt(0)&&t[2]==="3".charCodeAt(0)},fu=function(t,e){var i;if(t.length!==e.length)return!1;for(i=0;i<t.length;i++)if(t[i]!==e[i])return!1;return!0},mu=function(t){var e,i=0;for(e=0;e<t.length;e++)i+=t[e].data.byteLength;return i},(cu=function(r,a){var s=[],o=0,e=0,l=0,c=1/0;a=a||{},cu.prototype.init.call(this),this.push=function(e){lo(r,e),r&&_u.forEach(function(t){r[t]=e[t]}),s.push(e)},this.setEarliestDts=function(t){e=t-r.timelineStartInfo.baseMediaDecodeTime},this.setVideoBaseMediaDecodeTime=function(t){c=t},this.setAudioAppendStart=function(t){l=t},this.flush=function(){var t,e,i,n;0!==s.length&&(t=this.trimAdtsFramesByEarliestDts_(s),r.baseMediaDecodeTime=uo(r,a.keepOriginalTimestamps),this.prefixWithSilence_(r,t),r.samples=this.generateSampleTable_(t),i=Zs.mdat(this.concatenateFrameData_(t)),s=[],e=Zs.moof(o,[r]),n=new Uint8Array(e.byteLength+i.byteLength),o++,n.set(e),n.set(i,e.byteLength),oo(r),this.trigger("data",{track:r,boxes:n})),this.trigger("done","AudioSegmentStream")},this.prefixWithSilence_=function(t,e){var i,n,r,a,s=0,o=0,u=0;if(e.length&&(i=gu(t.baseMediaDecodeTime,t.samplerate),n=Math.ceil(9e4/(t.samplerate/1024)),l&&c&&(s=i-Math.max(l,c),u=(o=Math.floor(s/n))*n),!(o<1||45e3<u))){for((r=uu[t.samplerate])||(r=e[0].data),a=0;a<o;a++)e.splice(a,0,{data:r});t.baseMediaDecodeTime-=Math.floor(yu(u,t.samplerate))}},this.trimAdtsFramesByEarliestDts_=function(t){return r.minSegmentDts>=e?t:(r.minSegmentDts=1/0,t.filter(function(t){return t.dts>=e&&(r.minSegmentDts=Math.min(r.minSegmentDts,t.dts),r.minSegmentPts=r.minSegmentDts,!0)}))},this.generateSampleTable_=function(t){var e,i,n=[];for(e=0;e<t.length;e++)i=t[e],n.push({size:i.data.byteLength,duration:1024});return n},this.concatenateFrameData_=function(t){var e,i,n=0,r=new Uint8Array(mu(t));for(e=0;e<t.length;e++)i=t[e],r.set(i.data,n),n+=i.data.byteLength;return r}}).prototype=new eo,(lu=function(o,u){var e,i,l=0,c=[],h=[];u=u||{},lu.prototype.init.call(this),delete o.minPTS,this.gopCache_=[],this.push=function(t){lo(o,t),"seq_parameter_set_rbsp"!==t.nalUnitType||e||(e=t.config,o.sps=[t.data],bu.forEach(function(t){o[t]=e[t]},this)),"pic_parameter_set_rbsp"!==t.nalUnitType||i||(i=t.data,o.pps=[t.data]),c.push(t)},this.flush=function(){for(var t,e,i,n,r,a;c.length&&"access_unit_delimiter_rbsp"!==c[0].nalUnitType;)c.shift();if(0===c.length)return this.resetStream_(),void this.trigger("done","VideoSegmentStream");if(t=io(c),(i=no(t))[0][0].keyFrame||((e=this.getGopForFusion_(c[0],o))?(i.unshift(e),i.byteLength+=e.byteLength,i.nalCount+=e.nalCount,i.pts=e.pts,i.dts=e.dts,i.duration+=e.duration):i=ro(i)),h.length){var s;if(!(s=u.alignGopsAtEnd?this.alignGopsAtEnd_(i):this.alignGopsAtStart_(i)))return this.gopCache_.unshift({gop:i.pop(),pps:o.pps,sps:o.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),c=[],this.resetStream_(),void this.trigger("done","VideoSegmentStream");oo(o),i=s}lo(o,i),o.samples=ao(i),r=Zs.mdat(so(i)),o.baseMediaDecodeTime=uo(o,u.keepOriginalTimestamps),this.trigger("processedGopsInfo",i.map(function(t){return{pts:t.pts,dts:t.dts,byteLength:t.byteLength}})),this.gopCache_.unshift({gop:i.pop(),pps:o.pps,sps:o.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),c=[],this.trigger("baseMediaDecodeTime",o.baseMediaDecodeTime),this.trigger("timelineStartInfo",o.timelineStartInfo),n=Zs.moof(l,[o]),a=new Uint8Array(n.byteLength+r.byteLength),l++,a.set(n),a.set(r,n.byteLength),this.trigger("data",{track:o,boxes:a}),this.resetStream_(),this.trigger("done","VideoSegmentStream")},this.resetStream_=function(){oo(o),i=e=void 0},this.getGopForFusion_=function(t){var e,i,n,r,a,s=1/0;for(a=0;a<this.gopCache_.length;a++)n=(r=this.gopCache_[a]).gop,o.pps&&fu(o.pps[0],r.pps[0])&&o.sps&&fu(o.sps[0],r.sps[0])&&(n.dts<o.timelineStartInfo.dts||-1e4<=(e=t.dts-n.dts-n.duration)&&e<=45e3&&(!i||e<s)&&(i=r,s=e));return i?i.gop:null},this.alignGopsAtStart_=function(t){var e,i,n,r,a,s,o,u;for(a=t.byteLength,s=t.nalCount,o=t.duration,e=i=0;e<h.length&&i<t.length&&(n=h[e],r=t[i],n.pts!==r.pts);)r.pts>n.pts?e++:(i++,a-=r.byteLength,s-=r.nalCount,o-=r.duration);return 0===i?t:i===t.length?null:((u=t.slice(i)).byteLength=a,u.duration=o,u.nalCount=s,u.pts=u[0].pts,u.dts=u[0].dts,u)},this.alignGopsAtEnd_=function(t){var e,i,n,r,a,s,o;for(e=h.length-1,i=t.length-1,a=null,s=!1;0<=e&&0<=i;){if(n=h[e],r=t[i],n.pts===r.pts){s=!0;break}n.pts>r.pts?e--:(e===h.length-1&&(a=i),i--)}if(!s&&null===a)return null;if(0===(o=s?i:a))return t;var u=t.slice(o),l=u.reduce(function(t,e){return t.byteLength+=e.byteLength,t.duration+=e.duration,t.nalCount+=e.nalCount,t},{byteLength:0,duration:0,nalCount:0});return u.byteLength=l.byteLength,u.duration=l.duration,u.nalCount=l.nalCount,u.pts=u[0].pts,u.dts=u[0].dts,u},this.alignGopsWith=function(t){h=t}}).prototype=new eo,(du=function(t,e){this.numberOfTracks=0,this.metadataStream=e,"undefined"!=typeof t.remux?this.remuxTracks=!!t.remux:this.remuxTracks=!0,this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,du.prototype.init.call(this),this.push=function(t){return t.text?this.pendingCaptions.push(t):t.frames?this.pendingMetadata.push(t):(this.pendingTracks.push(t.track),this.pendingBoxes.push(t.boxes),this.pendingBytes+=t.boxes.byteLength,"video"===t.track.type&&(this.videoTrack=t.track),void("audio"===t.track.type&&(this.audioTrack=t.track)))}}).prototype=new eo,du.prototype.flush=function(t){var e,i,n,r,a=0,s={captions:[],captionStreams:{},metadata:[],info:{}},o=0;if(this.pendingTracks.length<this.numberOfTracks){if("VideoSegmentStream"!==t&&"AudioSegmentStream"!==t)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?(o=this.videoTrack.timelineStartInfo.pts,bu.forEach(function(t){s.info[t]=this.videoTrack[t]},this)):this.audioTrack&&(o=this.audioTrack.timelineStartInfo.pts,_u.forEach(function(t){s.info[t]=this.audioTrack[t]},this)),1===this.pendingTracks.length?s.type=this.pendingTracks[0].type:s.type="combined",this.emittedTracks+=this.pendingTracks.length,n=Zs.initSegment(this.pendingTracks),s.initSegment=new Uint8Array(n.byteLength),s.initSegment.set(n),s.data=new Uint8Array(this.pendingBytes),r=0;r<this.pendingBoxes.length;r++)s.data.set(this.pendingBoxes[r],a),a+=this.pendingBoxes[r].byteLength;for(r=0;r<this.pendingCaptions.length;r++)(e=this.pendingCaptions[r]).startTime=e.startPts-o,e.startTime/=9e4,e.endTime=e.endPts-o,e.endTime/=9e4,s.captionStreams[e.stream]=!0,s.captions.push(e);for(r=0;r<this.pendingMetadata.length;r++)(i=this.pendingMetadata[r]).cueTime=i.pts-o,i.cueTime/=9e4,s.metadata.push(i);s.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",s),this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},(hu=function(n){var r,a,s=this,i=!0;hu.prototype.init.call(this),n=n||{},this.baseMediaDecodeTime=n.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var e={};(this.transmuxPipeline_=e).type="aac",e.metadataStream=new Vo.MetadataStream,e.aacStream=new nu,e.audioTimestampRolloverStream=new Vo.TimestampRolloverStream("audio"),e.timedMetadataTimestampRolloverStream=new Vo.TimestampRolloverStream("timed-metadata"),e.adtsStream=new Go,e.coalesceStream=new du(n,e.metadataStream),e.headOfPipeline=e.aacStream,e.aacStream.pipe(e.audioTimestampRolloverStream).pipe(e.adtsStream),e.aacStream.pipe(e.timedMetadataTimestampRolloverStream).pipe(e.metadataStream).pipe(e.coalesceStream),e.metadataStream.on("timestamp",function(t){e.aacStream.setTimestamp(t.timeStamp)}),e.aacStream.on("data",function(t){"timed-metadata"!==t.type||e.audioSegmentStream||(a=a||{timelineStartInfo:{baseMediaDecodeTime:s.baseMediaDecodeTime},codec:"adts",type:"audio"},e.coalesceStream.numberOfTracks++,e.audioSegmentStream=new cu(a,n),e.adtsStream.pipe(e.audioSegmentStream).pipe(e.coalesceStream))}),e.coalesceStream.on("data",this.trigger.bind(this,"data")),e.coalesceStream.on("done",this.trigger.bind(this,"done"))},this.setupTsPipeline=function(){var i={};(this.transmuxPipeline_=i).type="ts",i.metadataStream=new Vo.MetadataStream,i.packetStream=new Vo.TransportPacketStream,i.parseStream=new Vo.TransportParseStream,i.elementaryStream=new Vo.ElementaryStream,i.videoTimestampRolloverStream=new Vo.TimestampRolloverStream("video"),i.audioTimestampRolloverStream=new Vo.TimestampRolloverStream("audio"),i.timedMetadataTimestampRolloverStream=new Vo.TimestampRolloverStream("timed-metadata"),i.adtsStream=new Go,i.h264Stream=new vu,i.captionStream=new Vo.CaptionStream,i.coalesceStream=new du(n,i.metadataStream),i.headOfPipeline=i.packetStream,i.packetStream.pipe(i.parseStream).pipe(i.elementaryStream),i.elementaryStream.pipe(i.videoTimestampRolloverStream).pipe(i.h264Stream),i.elementaryStream.pipe(i.audioTimestampRolloverStream).pipe(i.adtsStream),i.elementaryStream.pipe(i.timedMetadataTimestampRolloverStream).pipe(i.metadataStream).pipe(i.coalesceStream),i.h264Stream.pipe(i.captionStream).pipe(i.coalesceStream),i.elementaryStream.on("data",function(t){var e;if("metadata"===t.type){for(e=t.tracks.length;e--;)r||"video"!==t.tracks[e].type?a||"audio"!==t.tracks[e].type||((a=t.tracks[e]).timelineStartInfo.baseMediaDecodeTime=s.baseMediaDecodeTime):(r=t.tracks[e]).timelineStartInfo.baseMediaDecodeTime=s.baseMediaDecodeTime;r&&!i.videoSegmentStream&&(i.coalesceStream.numberOfTracks++,i.videoSegmentStream=new lu(r,n),i.videoSegmentStream.on("timelineStartInfo",function(t){a&&(a.timelineStartInfo=t,i.audioSegmentStream.setEarliestDts(t.dts))}),i.videoSegmentStream.on("processedGopsInfo",s.trigger.bind(s,"gopInfo")),i.videoSegmentStream.on("baseMediaDecodeTime",function(t){a&&i.audioSegmentStream.setVideoBaseMediaDecodeTime(t)}),i.h264Stream.pipe(i.videoSegmentStream).pipe(i.coalesceStream)),a&&!i.audioSegmentStream&&(i.coalesceStream.numberOfTracks++,i.audioSegmentStream=new cu(a,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.setBaseMediaDecodeTime=function(t){var e=this.transmuxPipeline_;this.baseMediaDecodeTime=t,a&&(a.timelineStartInfo.dts=void 0,a.timelineStartInfo.pts=void 0,oo(a),a.timelineStartInfo.baseMediaDecodeTime=t,e.audioTimestampRolloverStream&&e.audioTimestampRolloverStream.discontinuity()),r&&(e.videoSegmentStream&&(e.videoSegmentStream.gopCache_=[],e.videoTimestampRolloverStream.discontinuity()),r.timelineStartInfo.dts=void 0,r.timelineStartInfo.pts=void 0,oo(r),e.captionStream.reset(),r.timelineStartInfo.baseMediaDecodeTime=t),e.timedMetadataTimestampRolloverStream&&e.timedMetadataTimestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(t){a&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(t)},this.alignGopsWith=function(t){r&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(t)},this.push=function(t){if(i){var e=pu(t);e&&"aac"!==this.transmuxPipeline_.type?this.setupAacPipeline():e||"ts"===this.transmuxPipeline_.type||this.setupTsPipeline(),i=!1}this.transmuxPipeline_.headOfPipeline.push(t)},this.flush=function(){i=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}}).prototype=new eo;var Tu,Su,ku={Transmuxer:hu,VideoSegmentStream:lu,AudioSegmentStream:cu,AUDIO_PROPERTIES:_u,VIDEO_PROPERTIES:bu},wu=Qs.parseType,Cu=function(t){return new Date(1e3*t-20828448e5)},Eu=function(t){return{isLeading:(12&t[0])>>>2,dependsOn:3&t[0],isDependedOn:(192&t[1])>>>6,hasRedundancy:(48&t[1])>>>4,paddingValue:(14&t[1])>>>1,isNonSyncSample:1&t[1],degradationPriority:t[2]<<8|t[3]}},Au={avc1:function(t){var e=new DataView(t.buffer,t.byteOffset,t.byteLength);return{dataReferenceIndex:e.getUint16(6),width:e.getUint16(24),height:e.getUint16(26),horizresolution:e.getUint16(28)+e.getUint16(30)/16,vertresolution:e.getUint16(32)+e.getUint16(34)/16,frameCount:e.getUint16(40),depth:e.getUint16(74),config:Tu(t.subarray(78,t.byteLength))}},avcC:function(t){var e,i,n,r,a=new DataView(t.buffer,t.byteOffset,t.byteLength),s={configurationVersion:t[0],avcProfileIndication:t[1],profileCompatibility:t[2],avcLevelIndication:t[3],lengthSizeMinusOne:3&t[4],sps:[],pps:[]},o=31&t[5];for(n=6,r=0;r<o;r++)i=a.getUint16(n),n+=2,s.sps.push(new Uint8Array(t.subarray(n,n+i))),n+=i;for(e=t[n],n++,r=0;r<e;r++)i=a.getUint16(n),n+=2,s.pps.push(new Uint8Array(t.subarray(n,n+i))),n+=i;return s},btrt:function(t){var e=new DataView(t.buffer,t.byteOffset,t.byteLength);return{bufferSizeDB:e.getUint32(0),maxBitrate:e.getUint32(4),avgBitrate:e.getUint32(8)}},esds:function(t){return{version:t[0],flags:new Uint8Array(t.subarray(1,4)),esId:t[6]<<8|t[7],streamPriority:31&t[8],decoderConfig:{objectProfileIndication:t[11],streamType:t[12]>>>2&63,bufferSize:t[13]<<16|t[14]<<8|t[15],maxBitrate:t[16]<<24|t[17]<<16|t[18]<<8|t[19],avgBitrate:t[20]<<24|t[21]<<16|t[22]<<8|t[23],decoderConfigDescriptor:{tag:t[24],length:t[25],audioObjectType:t[26]>>>3&31,samplingFrequencyIndex:(7&t[26])<<1|t[27]>>>7&1,channelConfiguration:t[27]>>>3&15}}}},ftyp:function(t){for(var e=new DataView(t.buffer,t.byteOffset,t.byteLength),i={majorBrand:wu(t.subarray(0,4)),minorVersion:e.getUint32(4),compatibleBrands:[]},n=8;n<t.byteLength;)i.compatibleBrands.push(wu(t.subarray(n,n+4))),n+=4;return i},dinf:function(t){return{boxes:Tu(t)}},dref:function(t){return{version:t[0],flags:new Uint8Array(t.subarray(1,4)),dataReferences:Tu(t.subarray(8))}},hdlr:function(t){var e={version:new DataView(t.buffer,t.byteOffset,t.byteLength).getUint8(0),flags:new Uint8Array(t.subarray(1,4)),handlerType:wu(t.subarray(8,12)),name:""},i=8;for(i=24;i<t.byteLength;i++){if(0===t[i]){i++;break}e.name+=String.fromCharCode(t[i])}return e.name=decodeURIComponent(escape(e.name)),e},mdat:function(t){return{byteLength:t.byteLength,nals:function(t){var e,i,n=new DataView(t.buffer,t.byteOffset,t.byteLength),r=[];for(e=0;e+4<t.length;e+=i)if(i=n.getUint32(e),e+=4,i<=0)r.push("<span style='color:red;'>MALFORMED DATA</span>");else switch(31&t[e]){case 1:r.push("slice_layer_without_partitioning_rbsp");break;case 5:r.push("slice_layer_without_partitioning_rbsp_idr");break;case 6:r.push("sei_rbsp");break;case 7:r.push("seq_parameter_set_rbsp");break;case 8:r.push("pic_parameter_set_rbsp");break;case 9:r.push("access_unit_delimiter_rbsp");break;default:r.push("UNKNOWN NAL - "+t[e]&31)}return r}(t)}},mdhd:function(t){var e,i=new DataView(t.buffer,t.byteOffset,t.byteLength),n=4,r={version:i.getUint8(0),flags:new Uint8Array(t.subarray(1,4)),language:""};return 1===r.version?(n+=4,r.creationTime=Cu(i.getUint32(n)),n+=8,r.modificationTime=Cu(i.getUint32(n)),n+=4,r.timescale=i.getUint32(n),n+=8):(r.creationTime=Cu(i.getUint32(n)),n+=4,r.modificationTime=Cu(i.getUint32(n)),n+=4,r.timescale=i.getUint32(n),n+=4),r.duration=i.getUint32(n),n+=4,e=i.getUint16(n),r.language+=String.fromCharCode(96+(e>>10)),r.language+=String.fromCharCode(96+((992&e)>>5)),r.language+=String.fromCharCode(96+(31&e)),r},mdia:function(t){return{boxes:Tu(t)}},mfhd:function(t){return{version:t[0],flags:new Uint8Array(t.subarray(1,4)),sequenceNumber:t[4]<<24|t[5]<<16|t[6]<<8|t[7]}},minf:function(t){return{boxes:Tu(t)}},mp4a:function(t){var e=new DataView(t.buffer,t.byteOffset,t.byteLength),i={dataReferenceIndex:e.getUint16(6),channelcount:e.getUint16(16),samplesize:e.getUint16(18),samplerate:e.getUint16(24)+e.getUint16(26)/65536};return 28<t.byteLength&&(i.streamDescriptor=Tu(t.subarray(28))[0]),i},moof:function(t){return{boxes:Tu(t)}},moov:function(t){return{boxes:Tu(t)}},mvex:function(t){return{boxes:Tu(t)}},mvhd:function(t){var e=new DataView(t.buffer,t.byteOffset,t.byteLength),i=4,n={version:e.getUint8(0),flags:new Uint8Array(t.subarray(1,4))};return 1===n.version?(i+=4,n.creationTime=Cu(e.getUint32(i)),i+=8,n.modificationTime=Cu(e.getUint32(i)),i+=4,n.timescale=e.getUint32(i),i+=8):(n.creationTime=Cu(e.getUint32(i)),i+=4,n.modificationTime=Cu(e.getUint32(i)),i+=4,n.timescale=e.getUint32(i),i+=4),n.duration=e.getUint32(i),i+=4,n.rate=e.getUint16(i)+e.getUint16(i+2)/16,i+=4,n.volume=e.getUint8(i)+e.getUint8(i+1)/8,i+=2,i+=2,i+=8,n.matrix=new Uint32Array(t.subarray(i,i+36)),i+=36,i+=24,n.nextTrackId=e.getUint32(i),n},pdin:function(t){var e=new DataView(t.buffer,t.byteOffset,t.byteLength);return{version:e.getUint8(0),flags:new Uint8Array(t.subarray(1,4)),rate:e.getUint32(4),initialDelay:e.getUint32(8)}},sdtp:function(t){var e,i={version:t[0],flags:new Uint8Array(t.subarray(1,4)),samples:[]};for(e=4;e<t.byteLength;e++)i.samples.push({dependsOn:(48&t[e])>>4,isDependedOn:(12&t[e])>>2,hasRedundancy:3&t[e]});return i},sidx:function(t){var e,i=new DataView(t.buffer,t.byteOffset,t.byteLength),n={version:t[0],flags:new Uint8Array(t.subarray(1,4)),references:[],referenceId:i.getUint32(4),timescale:i.getUint32(8),earliestPresentationTime:i.getUint32(12),firstOffset:i.getUint32(16)},r=i.getUint16(22);for(e=24;r;e+=12,r--)n.references.push({referenceType:(128&t[e])>>>7,referencedSize:2147483647&i.getUint32(e),subsegmentDuration:i.getUint32(e+4),startsWithSap:!!(128&t[e+8]),sapType:(112&t[e+8])>>>4,sapDeltaTime:268435455&i.getUint32(e+8)});return n},smhd:function(t){return{version:t[0],flags:new Uint8Array(t.subarray(1,4)),balance:t[4]+t[5]/256}},stbl:function(t){return{boxes:Tu(t)}},stco:function(t){var e,i=new DataView(t.buffer,t.byteOffset,t.byteLength),n={version:t[0],flags:new Uint8Array(t.subarray(1,4)),chunkOffsets:[]},r=i.getUint32(4);for(e=8;r;e+=4,r--)n.chunkOffsets.push(i.getUint32(e));return n},stsc:function(t){var e,i=new DataView(t.buffer,t.byteOffset,t.byteLength),n=i.getUint32(4),r={version:t[0],flags:new Uint8Array(t.subarray(1,4)),sampleToChunks:[]};for(e=8;n;e+=12,n--)r.sampleToChunks.push({firstChunk:i.getUint32(e),samplesPerChunk:i.getUint32(e+4),sampleDescriptionIndex:i.getUint32(e+8)});return r},stsd:function(t){return{version:t[0],flags:new Uint8Array(t.subarray(1,4)),sampleDescriptions:Tu(t.subarray(8))}},stsz:function(t){var e,i=new DataView(t.buffer,t.byteOffset,t.byteLength),n={version:t[0],flags:new Uint8Array(t.subarray(1,4)),sampleSize:i.getUint32(4),entries:[]};for(e=12;e<t.byteLength;e+=4)n.entries.push(i.getUint32(e));return n},stts:function(t){var e,i=new DataView(t.buffer,t.byteOffset,t.byteLength),n={version:t[0],flags:new Uint8Array(t.subarray(1,4)),timeToSamples:[]},r=i.getUint32(4);for(e=8;r;e+=8,r--)n.timeToSamples.push({sampleCount:i.getUint32(e),sampleDelta:i.getUint32(e+4)});return n},styp:function(t){return Au.ftyp(t)},tfdt:function(t){var e={version:t[0],flags:new Uint8Array(t.subarray(1,4)),baseMediaDecodeTime:t[4]<<24|t[5]<<16|t[6]<<8|t[7]};return 1===e.version&&(e.baseMediaDecodeTime*=Math.pow(2,32),e.baseMediaDecodeTime+=t[8]<<24|t[9]<<16|t[10]<<8|t[11]),e},tfhd:function(t){var e,i=new DataView(t.buffer,t.byteOffset,t.byteLength),n={version:t[0],flags:new Uint8Array(t.subarray(1,4)),trackId:i.getUint32(4)},r=1&n.flags[2],a=2&n.flags[2],s=8&n.flags[2],o=16&n.flags[2],u=32&n.flags[2],l=65536&n.flags[0],c=131072&n.flags[0];return e=8,r&&(e+=4,n.baseDataOffset=i.getUint32(12),e+=4),a&&(n.sampleDescriptionIndex=i.getUint32(e),e+=4),s&&(n.defaultSampleDuration=i.getUint32(e),e+=4),o&&(n.defaultSampleSize=i.getUint32(e),e+=4),u&&(n.defaultSampleFlags=i.getUint32(e)),l&&(n.durationIsEmpty=!0),!r&&c&&(n.baseDataOffsetIsMoof=!0),n},tkhd:function(t){var e=new DataView(t.buffer,t.byteOffset,t.byteLength),i=4,n={version:e.getUint8(0),flags:new Uint8Array(t.subarray(1,4))};return 1===n.version?(i+=4,n.creationTime=Cu(e.getUint32(i)),i+=8,n.modificationTime=Cu(e.getUint32(i)),i+=4,n.trackId=e.getUint32(i),i+=4,i+=8):(n.creationTime=Cu(e.getUint32(i)),i+=4,n.modificationTime=Cu(e.getUint32(i)),i+=4,n.trackId=e.getUint32(i),i+=4,i+=4),n.duration=e.getUint32(i),i+=4,i+=8,n.layer=e.getUint16(i),i+=2,n.alternateGroup=e.getUint16(i),i+=2,n.volume=e.getUint8(i)+e.getUint8(i+1)/8,i+=2,i+=2,n.matrix=new Uint32Array(t.subarray(i,i+36)),i+=36,n.width=e.getUint16(i)+e.getUint16(i+2)/16,i+=4,n.height=e.getUint16(i)+e.getUint16(i+2)/16,n},traf:function(t){return{boxes:Tu(t)}},trak:function(t){return{boxes:Tu(t)}},trex:function(t){var e=new DataView(t.buffer,t.byteOffset,t.byteLength);return{version:t[0],flags:new Uint8Array(t.subarray(1,4)),trackId:e.getUint32(4),defaultSampleDescriptionIndex:e.getUint32(8),defaultSampleDuration:e.getUint32(12),defaultSampleSize:e.getUint32(16),sampleDependsOn:3&t[20],sampleIsDependedOn:(192&t[21])>>6,sampleHasRedundancy:(48&t[21])>>4,samplePaddingValue:(14&t[21])>>1,sampleIsDifferenceSample:!!(1&t[21]),sampleDegradationPriority:e.getUint16(22)}},trun:function(t){var e,i={version:t[0],flags:new Uint8Array(t.subarray(1,4)),samples:[]},n=new DataView(t.buffer,t.byteOffset,t.byteLength),r=1&i.flags[2],a=4&i.flags[2],s=1&i.flags[1],o=2&i.flags[1],u=4&i.flags[1],l=8&i.flags[1],c=n.getUint32(4),h=8;for(r&&(i.dataOffset=n.getInt32(h),h+=4),a&&c&&(e={flags:Eu(t.subarray(h,h+4))},h+=4,s&&(e.duration=n.getUint32(h),h+=4),o&&(e.size=n.getUint32(h),h+=4),l&&(e.compositionTimeOffset=n.getUint32(h),h+=4),i.samples.push(e),c--);c--;)e={},s&&(e.duration=n.getUint32(h),h+=4),o&&(e.size=n.getUint32(h),h+=4),u&&(e.flags=Eu(t.subarray(h,h+4)),h+=4),l&&(e.compositionTimeOffset=n.getUint32(h),h+=4),i.samples.push(e);return i},"url ":function(t){return{version:t[0],flags:new Uint8Array(t.subarray(1,4))}},vmhd:function(t){var e=new DataView(t.buffer,t.byteOffset,t.byteLength);return{version:t[0],flags:new Uint8Array(t.subarray(1,4)),graphicsmode:e.getUint16(4),opcolor:new Uint16Array([e.getUint16(6),e.getUint16(8),e.getUint16(10)])}}},Lu={inspect:Tu=function(t){for(var e,i,n,r,a,s=0,o=[],u=new ArrayBuffer(t.length),l=new Uint8Array(u),c=0;c<t.length;++c)l[c]=t[c];for(e=new DataView(u);s<t.byteLength;)i=e.getUint32(s),n=wu(t.subarray(s+4,s+8)),r=1<i?s+i:t.byteLength,(a=(Au[n]||function(t){return{data:t}})(t.subarray(s+8,r))).size=i,a.type=n,o.push(a),s=r;return o},textify:Su=function(t,e){var a;return e=e||0,a=new Array(2*e+1).join(" "),t.map(function(r,t){return a+r.type+"\n"+Object.keys(r).filter(function(t){return"type"!==t&&"boxes"!==t}).map(function(t){var e=a+"  "+t+": ",i=r[t];if(i instanceof Uint8Array||i instanceof Uint32Array){var n=Array.prototype.slice.call(new Uint8Array(i.buffer,i.byteOffset,i.byteLength)).map(function(t){return" "+("00"+t.toString(16)).slice(-2)}).join("").match(/.{1,24}/g);return n?1===n.length?e+"<"+n.join("").slice(1)+">":e+"<\n"+n.map(function(t){return a+"  "+t}).join("\n")+"\n"+a+"  >":e+"<>"}return e+JSON.stringify(i,null,2).split("\n").map(function(t,e){return 0===e?t:a+"  "+t}).join("\n")}).join("\n")+(r.boxes?"\n"+Su(r.boxes,e+1):"")}).join("\n")},parseTfdt:Au.tfdt,parseHdlr:Au.hdlr,parseTfhd:Au.tfhd,parseTrun:Au.trun},Ou=fo,Pu=So.CaptionStream,Uu=function(t,e){for(var i=t,n=0;n<e.length;n++){var r=e[n];if(i<r.size)return r;i-=r.size}return null},xu=function(t,y){var n=Qs.findBox(t,["moof","traf"]),e=Qs.findBox(t,["mdat"]),v={},r=[];return e.forEach(function(t,e){var i=n[e];r.push({mdat:t,traf:i})}),r.forEach(function(t){var e,i,n,r,a,s,o,u,l=t.mdat,c=t.traf,h=Qs.findBox(c,["tfhd"]),d=Lu.parseTfhd(h[0]),p=d.trackId,f=Qs.findBox(c,["tfdt"]),m=0<f.length?Lu.parseTfdt(f[0]).baseMediaDecodeTime:0,g=Qs.findBox(c,["trun"]);y===p&&0<g.length&&(i=g,r=m,a=(n=d).defaultSampleDuration||0,s=n.defaultSampleSize||0,o=n.trackId,u=[],i.forEach(function(t){var e=Lu.parseTrun(t).samples;e.forEach(function(t){void 0===t.duration&&(t.duration=a),void 0===t.size&&(t.size=s),t.trackId=o,t.dts=r,void 0===t.compositionTimeOffset&&(t.compositionTimeOffset=0),t.pts=r+t.compositionTimeOffset,r+=t.duration}),u=u.concat(e)}),e=function(t,e,i){var n,r,a,s,o=new DataView(t.buffer,t.byteOffset,t.byteLength),u=[];for(r=0;r+4<t.length;r+=a)if(a=o.getUint32(r),r+=4,!(a<=0))switch(31&t[r]){case 6:var l=t.subarray(r+1,r+1+a),c=Uu(r,e);n={nalUnitType:"sei_rbsp",size:a,data:l,escapedRBSP:Ou(l),trackId:i},c?(n.pts=c.pts,n.dts=c.dts,s=c):(n.pts=s.pts,n.dts=s.dts),u.push(n)}return u}(l,u,p),v[p]||(v[p]=[]),v[p]=v[p].concat(e))}),v},Iu={generator:Zs,probe:Qs,Transmuxer:ku.Transmuxer,AudioSegmentStream:ku.AudioSegmentStream,VideoSegmentStream:ku.VideoSegmentStream,CaptionParser:function(){var e,u,l,c,h,t=!1;this.isInitialized=function(){return t},this.init=function(){e=new Pu,t=!0,e.on("data",function(t){t.startTime=t.startPts/c,t.endTime=t.endPts/c,h.captions.push(t),h.captionStreams[t.stream]=!0})},this.isNewInit=function(t,e){return!(t&&0===t.length||e&&"object"==typeof e&&0===Object.keys(e).length||l===t[0]&&c===e[l])},this.parse=function(t,e,i){var n,r,a,s;if(!this.isInitialized())return null;if(!e||!i)return null;if(this.isNewInit(e,i))l=e[0],c=i[l];else if(!l||!c)return u.push(t),null;for(;0<u.length;){var o=u.shift();this.parse(o,e,i)}return r=t,s=c,null!==(n=(a=l)?{seiNals:xu(r,a)[a],timescale:s}:null)&&n.seiNals?(this.pushNals(n.seiNals),this.flushStream(),h):null},this.pushNals=function(t){if(!this.isInitialized()||!t||0===t.length)return null;t.forEach(function(t){e.push(t)})},this.flushStream=function(){if(!this.isInitialized())return null;e.flush()},this.clearParsedCaptions=function(){h.captions=[],h.captionStreams={}},this.resetCaptionStream=function(){if(!this.isInitialized())return null;e.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){u=[],c=l=null,h?this.clearParsedCaptions():h={captions:[],captionStreams:{}},this.resetCaptionStream()},this.reset()}}.CaptionParser,Du=function(t){var e=31&t[1];return e<<=8,e|=t[2]},Ru=function(t){return!!(64&t[1])},Mu=function(t){var e=0;return 1<(48&t[3])>>>4&&(e+=t[4]+1),e},Bu=function(t){switch(t){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}},Nu={parseType:function(t,e){var i=Du(t);return 0===i?"pat":i===e?"pmt":e?"pes":null},parsePat:function(t){var e=Ru(t),i=4+Mu(t);return e&&(i+=t[i]+1),(31&t[i+10])<<8|t[i+11]},parsePmt:function(t){var e={},i=Ru(t),n=4+Mu(t);if(i&&(n+=t[n]+1),1&t[n+5]){var r;r=3+((15&t[n+1])<<8|t[n+2])-4;for(var a=12+((15&t[n+10])<<8|t[n+11]);a<r;){var s=n+a;e[(31&t[s+1])<<8|t[s+2]]=t[s],a+=5+((15&t[s+3])<<8|t[s+4])}return e}},parsePayloadUnitStartIndicator:Ru,parsePesType:function(t,e){switch(e[Du(t)]){case ko.H264_STREAM_TYPE:return"video";case ko.ADTS_STREAM_TYPE:return"audio";case ko.METADATA_STREAM_TYPE:return"timed-metadata";default:return null}},parsePesTime:function(t){if(!Ru(t))return null;var e=4+Mu(t);if(e>=t.byteLength)return null;var i,n=null;return 192&(i=t[e+7])&&((n={}).pts=(14&t[e+9])<<27|(255&t[e+10])<<20|(254&t[e+11])<<12|(255&t[e+12])<<5|(254&t[e+13])>>>3,n.pts*=4,n.pts+=(6&t[e+13])>>>1,n.dts=n.pts,64&i&&(n.dts=(14&t[e+14])<<27|(255&t[e+15])<<20|(254&t[e+16])<<12|(255&t[e+17])<<5|(254&t[e+18])>>>3,n.dts*=4,n.dts+=(6&t[e+18])>>>1)),n},videoPacketContainsKeyFrame:function(t){for(var e=4+Mu(t),i=t.subarray(e),n=0,r=0,a=!1;r<i.byteLength-3;r++)if(1===i[r+2]){n=r+5;break}for(;n<i.byteLength;)switch(i[n]){case 0:if(0!==i[n-1]){n+=2;break}if(0!==i[n-2]){n++;break}for(r+3!==n-2&&"slice_layer_without_partitioning_rbsp_idr"===Bu(31&i[r+3])&&(a=!0);1!==i[++n]&&n<i.length;);r=n-2,n+=3;break;case 1:if(0!==i[n-1]||0!==i[n-2]){n+=3;break}"slice_layer_without_partitioning_rbsp_idr"===Bu(31&i[r+3])&&(a=!0),r=n-2,n+=3;break;default:n+=3}return i=i.subarray(r),n-=r,r=0,i&&3<i.byteLength&&"slice_layer_without_partitioning_rbsp_idr"===Bu(31&i[r+3])&&(a=!0),a}},ju=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],Fu=function(t){return t[0]<<21|t[1]<<14|t[2]<<7|t[3]},Vu={parseId3TagSize:function(t,e){var i=t[e+6]<<21|t[e+7]<<14|t[e+8]<<7|t[e+9];return(16&t[e+5])>>4?i+20:i+10},parseAdtsSize:function(t,e){var i=(224&t[e+5])>>5,n=t[e+4]<<3;return 6144&t[e+3]|n|i},parseType:function(t,e){return t[e]==="I".charCodeAt(0)&&t[e+1]==="D".charCodeAt(0)&&t[e+2]==="3".charCodeAt(0)?"timed-metadata":!0&t[e]&&240==(240&t[e+1])?"audio":null},parseSampleRate:function(t){for(var e=0;e+5<t.length;){if(255===t[e]&&240==(246&t[e+1]))return ju[(60&t[e+2])>>>2];e++}return null},parseAacTimestamp:function(t){var e,i,n;e=10,64&t[5]&&(e+=4,e+=Fu(t.subarray(10,14)));do{if((i=Fu(t.subarray(e+4,e+8)))<1)return null;if("PRIV"===String.fromCharCode(t[e],t[e+1],t[e+2],t[e+3])){n=t.subarray(e+10,e+i+10);for(var r=0;r<n.byteLength;r++)if(0===n[r]){if("com.apple.streaming.transportStreamTimestamp"!==unescape(function(t,e,i){var n,r="";for(n=e;n<i;n++)r+="%"+("00"+t[n].toString(16)).slice(-2);return r}(n,0,r)))break;var a=n.subarray(r+1),s=(1&a[3])<<30|a[4]<<22|a[5]<<14|a[6]<<6|a[7]>>>2;return s*=4,s+=3&a[7]}}e+=10,e+=i}while(e<t.byteLength);return null}},Hu=Lo,qu={};qu.ts=Nu,qu.aac=Vu;var zu=188,Wu=function(t,e,i){for(var n,r,a,s,o=0,u=zu,l=!1;u<t.byteLength;)if(71!==t[o]||71!==t[u])o++,u++;else{switch(n=t.subarray(o,u),qu.ts.parseType(n,e.pid)){case"pes":r=qu.ts.parsePesType(n,e.table),a=qu.ts.parsePayloadUnitStartIndicator(n),"audio"===r&&a&&(s=qu.ts.parsePesTime(n))&&(s.type="audio",i.audio.push(s),l=!0)}if(l)break;o+=zu,u+=zu}for(o=(u=t.byteLength)-zu,l=!1;0<=o;)if(71!==t[o]||71!==t[u])o--,u--;else{switch(n=t.subarray(o,u),qu.ts.parseType(n,e.pid)){case"pes":r=qu.ts.parsePesType(n,e.table),a=qu.ts.parsePayloadUnitStartIndicator(n),"audio"===r&&a&&(s=qu.ts.parsePesTime(n))&&(s.type="audio",i.audio.push(s),l=!0)}if(l)break;o-=zu,u-=zu}},Gu=function(t,e,i){for(var n,r,a,s,o,u,l,c=0,h=zu,d=!1,p={data:[],size:0};h<t.byteLength;)if(71!==t[c]||71!==t[h])c++,h++;else{switch(n=t.subarray(c,h),qu.ts.parseType(n,e.pid)){case"pes":if(r=qu.ts.parsePesType(n,e.table),a=qu.ts.parsePayloadUnitStartIndicator(n),"video"===r&&(a&&!d&&(s=qu.ts.parsePesTime(n))&&(s.type="video",i.video.push(s),d=!0),!i.firstKeyFrame)){if(a&&0!==p.size){for(o=new Uint8Array(p.size),u=0;p.data.length;)l=p.data.shift(),o.set(l,u),u+=l.byteLength;qu.ts.videoPacketContainsKeyFrame(o)&&(i.firstKeyFrame=qu.ts.parsePesTime(o),i.firstKeyFrame.type="video"),p.size=0}p.data.push(n),p.size+=n.byteLength}}if(d&&i.firstKeyFrame)break;c+=zu,h+=zu}for(c=(h=t.byteLength)-zu,d=!1;0<=c;)if(71!==t[c]||71!==t[h])c--,h--;else{switch(n=t.subarray(c,h),qu.ts.parseType(n,e.pid)){case"pes":r=qu.ts.parsePesType(n,e.table),a=qu.ts.parsePayloadUnitStartIndicator(n),"video"===r&&a&&(s=qu.ts.parsePesTime(n))&&(s.type="video",i.video.push(s),d=!0)}if(d)break;c-=zu,h-=zu}},Xu=function(t){var e={pid:null,table:null},i={};for(var n in function(t,e){for(var i,n=0,r=zu;r<t.byteLength;)if(71!==t[n]||71!==t[r])n++,r++;else{switch(i=t.subarray(n,r),qu.ts.parseType(i,e.pid)){case"pat":e.pid||(e.pid=qu.ts.parsePat(i));break;case"pmt":e.table||(e.table=qu.ts.parsePmt(i))}if(e.pid&&e.table)return;n+=zu,r+=zu}}(t,e),e.table){if(e.table.hasOwnProperty(n))switch(e.table[n]){case ko.H264_STREAM_TYPE:i.video=[],Gu(t,e,i),0===i.video.length&&delete i.video;break;case ko.ADTS_STREAM_TYPE:i.audio=[],Wu(t,e,i),0===i.audio.length&&delete i.audio}}return i},Yu=function(t,e){var i,n;return(n=(i=t)[0]==="I".charCodeAt(0)&&i[1]==="D".charCodeAt(0)&&i[2]==="3".charCodeAt(0)?function(t){for(var e,i=!1,n=0,r=null,a=null,s=0,o=0;3<=t.length-o;){switch(qu.aac.parseType(t,o)){case"timed-metadata":if(t.length-o<10){i=!0;break}if((s=qu.aac.parseId3TagSize(t,o))>t.length){i=!0;break}null===a&&(e=t.subarray(o,o+s),a=qu.aac.parseAacTimestamp(e)),o+=s;break;case"audio":if(t.length-o<7){i=!0;break}if((s=qu.aac.parseAdtsSize(t,o))>t.length){i=!0;break}null===r&&(e=t.subarray(o,o+s),r=qu.aac.parseSampleRate(e)),n++,o+=s;break;default:o++}if(i)return null}if(null===r||null===a)return null;var u=9e4/r;return{audio:[{type:"audio",dts:a,pts:a},{type:"audio",dts:a+1024*n*u,pts:a+1024*n*u}]}}(t):Xu(t))&&(n.audio||n.video)?(function(t,e){if(t.audio&&t.audio.length){var i=e;"undefined"==typeof i&&(i=t.audio[0].dts),t.audio.forEach(function(t){t.dts=Hu(t.dts,i),t.pts=Hu(t.pts,i),t.dtsTime=t.dts/9e4,t.ptsTime=t.pts/9e4})}if(t.video&&t.video.length){var n=e;if("undefined"==typeof n&&(n=t.video[0].dts),t.video.forEach(function(t){t.dts=Hu(t.dts,n),t.pts=Hu(t.pts,n),t.dtsTime=t.dts/9e4,t.ptsTime=t.pts/9e4}),t.firstKeyFrame){var r=t.firstKeyFrame;r.dts=Hu(r.dts,n),r.pts=Hu(r.pts,n),r.dtsTime=r.dts/9e4,r.ptsTime=r.dts/9e4}}}(n,e),n):null};var $u=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},Ku=function(){function n(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(t,e,i){return e&&n(t.prototype,e),i&&n(t,i),t}}(),Qu=null,Ju=function(){function c(t){$u(this,c),Qu||(Qu=function(){var t=[[[],[],[],[],[]],[[],[],[],[],[]]],e=t[0],i=t[1],n=e[4],r=i[4],a=void 0,s=void 0,o=void 0,u=[],l=[],c=void 0,h=void 0,d=void 0,p=void 0,f=void 0;for(a=0;a<256;a++)l[(u[a]=a<<1^283*(a>>7))^a]=a;for(s=o=0;!n[s];s^=c||1,o=l[o]||1)for(d=(d=o^o<<1^o<<2^o<<3^o<<4)>>8^255&d^99,f=16843009*u[h=u[c=u[r[n[s]=d]=s]]]^65537*h^257*c^16843008*s,p=257*u[d]^16843008*d,a=0;a<4;a++)e[a][s]=p=p<<24^p>>>8,i[a][d]=f=f<<24^f>>>8;for(a=0;a<5;a++)e[a]=e[a].slice(0),i[a]=i[a].slice(0);return t}()),this._tables=[[Qu[0][0].slice(),Qu[0][1].slice(),Qu[0][2].slice(),Qu[0][3].slice(),Qu[0][4].slice()],[Qu[1][0].slice(),Qu[1][1].slice(),Qu[1][2].slice(),Qu[1][3].slice(),Qu[1][4].slice()]];var e=void 0,i=void 0,n=void 0,r=void 0,a=void 0,s=this._tables[0][4],o=this._tables[1],u=t.length,l=1;if(4!==u&&6!==u&&8!==u)throw new Error("Invalid aes key size");for(r=t.slice(0),a=[],this._key=[r,a],e=u;e<4*u+28;e++)n=r[e-1],(e%u==0||8===u&&e%u==4)&&(n=s[n>>>24]<<24^s[n>>16&255]<<16^s[n>>8&255]<<8^s[255&n],e%u==0&&(n=n<<8^n>>>24^l<<24,l=l<<1^283*(l>>7))),r[e]=r[e-u]^n;for(i=0;e;i++,e--)n=r[3&i?e:e-4],a[i]=e<=4||i<4?n:o[0][s[n>>>24]]^o[1][s[n>>16&255]]^o[2][s[n>>8&255]]^o[3][s[255&n]]}return c.prototype.decrypt=function(t,e,i,n,r,a){var s=this._key[1],o=t^s[0],u=n^s[1],l=i^s[2],c=e^s[3],h=void 0,d=void 0,p=void 0,f=s.length/4-2,m=void 0,g=4,y=this._tables[1],v=y[0],_=y[1],b=y[2],T=y[3],S=y[4];for(m=0;m<f;m++)h=v[o>>>24]^_[u>>16&255]^b[l>>8&255]^T[255&c]^s[g],d=v[u>>>24]^_[l>>16&255]^b[c>>8&255]^T[255&o]^s[g+1],p=v[l>>>24]^_[c>>16&255]^b[o>>8&255]^T[255&u]^s[g+2],c=v[c>>>24]^_[o>>16&255]^b[u>>8&255]^T[255&l]^s[g+3],g+=4,o=h,u=d,l=p;for(m=0;m<4;m++)r[(3&-m)+a]=S[o>>>24]<<24^S[u>>16&255]<<16^S[l>>8&255]<<8^S[255&c]^s[g++],h=o,o=u,u=l,l=c,c=h},c}(),Zu=function(){function t(){$u(this,t),this.listeners={}}return t.prototype.on=function(t,e){this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push(e)},t.prototype.off=function(t,e){if(!this.listeners[t])return!1;var i=this.listeners[t].indexOf(e);return this.listeners[t].splice(i,1),-1<i},t.prototype.trigger=function(t){var e=this.listeners[t];if(e)if(2===arguments.length)for(var i=e.length,n=0;n<i;++n)e[n].call(this,arguments[1]);else for(var r=Array.prototype.slice.call(arguments,1),a=e.length,s=0;s<a;++s)e[s].apply(this,r)},t.prototype.dispose=function(){this.listeners={}},t.prototype.pipe=function(e){this.on("data",function(t){e.push(t)})},t}(),tl=function(e){function i(){$u(this,i);var t=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,e.call(this,Zu));return t.jobs=[],t.delay=1,t.timeout_=null,t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(i,e),i.prototype.processJob_=function(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null},i.prototype.push=function(t){this.jobs.push(t),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))},i}(Zu),el=function(t){return t<<24|(65280&t)<<8|(16711680&t)>>8|t>>>24},il=function(t,e,i){var n=new Int32Array(t.buffer,t.byteOffset,t.byteLength>>2),r=new Ju(Array.prototype.slice.call(e)),a=new Uint8Array(t.byteLength),s=new Int32Array(a.buffer),o=void 0,u=void 0,l=void 0,c=void 0,h=void 0,d=void 0,p=void 0,f=void 0,m=void 0;for(o=i[0],u=i[1],l=i[2],c=i[3],m=0;m<n.length;m+=4)h=el(n[m]),d=el(n[m+1]),p=el(n[m+2]),f=el(n[m+3]),r.decrypt(h,d,p,f,s,m),s[m]=el(s[m]^o),s[m+1]=el(s[m+1]^u),s[m+2]=el(s[m+2]^l),s[m+3]=el(s[m+3]^c),o=h,u=d,l=p,c=f;return a},nl=function(){function u(t,e,i,n){$u(this,u);var r=u.STEP,a=new Int32Array(t.buffer),s=new Uint8Array(t.byteLength),o=0;for(this.asyncStream_=new tl,this.asyncStream_.push(this.decryptChunk_(a.subarray(o,o+r),e,i,s)),o=r;o<a.length;o+=r)i=new Uint32Array([el(a[o-4]),el(a[o-3]),el(a[o-2]),el(a[o-1])]),this.asyncStream_.push(this.decryptChunk_(a.subarray(o,o+r),e,i,s));this.asyncStream_.push(function(){var t;n(null,(t=s).subarray(0,t.byteLength-t[t.byteLength-1]))})}return u.prototype.decryptChunk_=function(e,i,n,r){return function(){var t=il(e,i,n);r.set(t,e.byteOffset)}},Ku(u,null,[{key:"STEP",get:function(){return 32e3}}]),u}(),rl=function(t,e){return/^[a-z]+:/i.test(e)?e:(/\/\//i.test(t)||(t=ca.buildAbsoluteURL(v.location.href,t)),ca.buildAbsoluteURL(t,e))},al=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},sl=function(){function n(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(t,e,i){return e&&n(t.prototype,e),i&&n(t,i),t}}(),ol=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)},ul=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e},ll=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var i=[],n=!0,r=!1,a=void 0;try{for(var s,o=t[Symbol.iterator]();!(n=(s=o.next()).done)&&(i.push(s.value),!e||i.length!==e);n=!0);}catch(t){r=!0,a=t}finally{try{!n&&o.return&&o.return()}finally{if(r)throw a}}return i}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},cl=oa.mergeOptions,hl=oa.EventTarget,dl=oa.log,pl=function(r,a){["AUDIO","SUBTITLES"].forEach(function(t){for(var e in r.mediaGroups[t])for(var i in r.mediaGroups[t][e]){var n=r.mediaGroups[t][e][i];a(n,t,e,i)}})},fl=function(t,e){var i=cl(t,{}),n=i.playlists[e.uri];if(!n)return null;if(n.segments&&e.segments&&n.segments.length===e.segments.length&&n.mediaSequence===e.mediaSequence)return null;var r=cl(n,e);n.segments&&(r.segments=function(t,e,i){var n=e.slice();i=i||0;for(var r=Math.min(t.length,e.length+i),a=i;a<r;a++)n[a-i]=cl(t[a],n[a-i]);return n}(n.segments,e.segments,e.mediaSequence-n.mediaSequence)),r.segments.forEach(function(t){var e,i;e=t,i=r.resolvedUri,e.resolvedUri||(e.resolvedUri=rl(i,e.uri)),e.key&&!e.key.resolvedUri&&(e.key.resolvedUri=rl(i,e.key.uri)),e.map&&!e.map.resolvedUri&&(e.map.resolvedUri=rl(i,e.map.uri))});for(var a=0;a<i.playlists.length;a++)i.playlists[a].uri===e.uri&&(i.playlists[a]=r);return i.playlists[e.uri]=r,i},ml=function(t){for(var e=t.playlists.length;e--;){var i=t.playlists[e];(t.playlists[i.uri]=i).resolvedUri=rl(t.uri,i.uri),i.id=e,i.attributes||(i.attributes={},dl.warn("Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute."))}},gl=function(e){pl(e,function(t){t.uri&&(t.resolvedUri=rl(e.uri,t.uri))})},yl=function(t,e){var i=t.segments[t.segments.length-1];return e&&i&&i.duration?1e3*i.duration:500*(t.targetDuration||10)},vl=function(t){function r(t,e,i){al(this,r);var n=ul(this,(r.__proto__||Object.getPrototypeOf(r)).call(this));if(n.srcUrl=t,n.hls_=e,n.withCredentials=i,!n.srcUrl)throw new Error("A non-empty playlist URL is required");return n.state="HAVE_NOTHING",n.on("mediaupdatetimeout",function(){"HAVE_METADATA"===n.state&&(n.state="HAVE_CURRENT_METADATA",n.request=n.hls_.xhr({uri:rl(n.master.uri,n.media().uri),withCredentials:n.withCredentials},function(t,e){if(n.request)return t?n.playlistRequestError(n.request,n.media().uri,"HAVE_METADATA"):void n.haveMetadata(n.request,n.media().uri)}))}),n}return ol(r,hl),sl(r,[{key:"playlistRequestError",value:function(t,e,i){this.request=null,i&&(this.state=i),this.error={playlist:this.master.playlists[e],status:t.status,message:"HLS playlist request error at URL: "+e,responseText:t.responseText,code:500<=t.status?4:2},this.trigger("error")}},{key:"haveMetadata",value:function(t,e){var i=this;this.request=null,this.state="HAVE_METADATA";var n=new _a;n.push(t.responseText),n.end(),n.manifest.uri=e,n.manifest.attributes=n.manifest.attributes||{};var r=fl(this.master,n.manifest);this.targetDuration=n.manifest.targetDuration,r?(this.master=r,this.media_=this.master.playlists[n.manifest.uri]):this.trigger("playlistunchanged"),this.media().endList||(v.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=v.setTimeout(function(){i.trigger("mediaupdatetimeout")},yl(this.media(),!!r))),this.trigger("loadedplaylist")}},{key:"dispose",value:function(){this.stopRequest(),v.clearTimeout(this.mediaUpdateTimeout)}},{key:"stopRequest",value:function(){if(this.request){var t=this.request;this.request=null,t.onreadystatechange=null,t.abort()}}},{key:"media",value:function(i){var n=this;if(!i)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);var r=this.state;if("string"==typeof i){if(!this.master.playlists[i])throw new Error("Unknown playlist URI: "+i);i=this.master.playlists[i]}var t=!this.media_||i.uri!==this.media_.uri;if(this.master.playlists[i.uri].endList)return this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state="HAVE_METADATA",this.media_=i,void(t&&(this.trigger("mediachanging"),this.trigger("mediachange")));if(t){if(this.state="SWITCHING_MEDIA",this.request){if(rl(this.master.uri,i.uri)===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:rl(this.master.uri,i.uri),withCredentials:this.withCredentials},function(t,e){if(n.request){if(t)return n.playlistRequestError(n.request,i.uri,r);n.haveMetadata(e,i.uri),"HAVE_MASTER"===r?n.trigger("loadedmetadata"):n.trigger("mediachange")}})}}},{key:"pause",value:function(){this.stopRequest(),v.clearTimeout(this.mediaUpdateTimeout),"HAVE_NOTHING"===this.state&&(this.started=!1),"SWITCHING_MEDIA"===this.state?this.media_?this.state="HAVE_METADATA":this.state="HAVE_MASTER":"HAVE_CURRENT_METADATA"===this.state&&(this.state="HAVE_METADATA")}},{key:"load",value:function(t){var e=this;v.clearTimeout(this.mediaUpdateTimeout);var i=this.media();if(t){var n=i?i.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=v.setTimeout(function(){return e.load()},n)}else this.started?i&&!i.endList?this.trigger("mediaupdatetimeout"):this.trigger("loadedplaylist"):this.start()}},{key:"start",value:function(){var n=this;this.started=!0,this.request=this.hls_.xhr({uri:this.srcUrl,withCredentials:this.withCredentials},function(t,e){if(n.request){if(n.request=null,t)return n.error={status:e.status,message:"HLS playlist request error at URL: "+n.srcUrl,responseText:e.responseText,code:2},"HAVE_NOTHING"===n.state&&(n.started=!1),n.trigger("error");var i=new _a;return i.push(e.responseText),i.end(),n.state="HAVE_MASTER",i.manifest.uri=n.srcUrl,i.manifest.playlists?(n.master=i.manifest,ml(n.master),gl(n.master),n.trigger("loadedplaylist"),void(n.request||n.media(i.manifest.playlists[0]))):(n.master={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:v.location.href,playlists:[{uri:n.srcUrl,id:0}]},n.master.playlists[n.srcUrl]=n.master.playlists[0],n.master.playlists[0].resolvedUri=n.srcUrl,n.master.playlists[0].attributes=n.master.playlists[0].attributes||{},n.haveMetadata(e,n.srcUrl),n.trigger("loadedmetadata"))}})}}]),r}(),_l=oa.createTimeRange,bl=function(t,e,i){var n,r;return"undefined"==typeof e&&(e=t.mediaSequence+t.segments.length),e<t.mediaSequence?0:(n=function(t,e){var i=0,n=e-t.mediaSequence,r=t.segments[n];if(r){if("undefined"!=typeof r.start)return{result:r.start,precise:!0};if("undefined"!=typeof r.end)return{result:r.end-r.duration,precise:!0}}for(;n--;){if("undefined"!=typeof(r=t.segments[n]).end)return{result:i+r.end,precise:!0};if(i+=r.duration,"undefined"!=typeof r.start)return{result:i+r.start,precise:!0}}return{result:i,precise:!1}}(t,e)).precise?n.result:(r=function(t,e){for(var i=0,n=void 0,r=e-t.mediaSequence;r<t.segments.length;r++){if("undefined"!=typeof(n=t.segments[r]).start)return{result:n.start-i,precise:!0};if(i+=n.duration,"undefined"!=typeof n.end)return{result:n.end-i,precise:!0}}return{result:-1,precise:!1}}(t,e)).precise?r.result:n.result+i},Tl=function(t,e,i){if(!t)return 0;if("number"!=typeof i&&(i=0),"undefined"==typeof e){if(t.totalDuration)return t.totalDuration;if(!t.endList)return v.Infinity}return bl(t,e,i)},Sl=function(t,e,i){var n=0;if(i<e){var r=[i,e];e=r[0],i=r[1]}if(e<0){for(var a=e;a<Math.min(0,i);a++)n+=t.targetDuration;e=0}for(var s=e;s<i;s++)n+=t.segments[s].duration;return n},kl=function(t){if(!t.segments.length)return 0;for(var e=t.segments.length-1,i=t.segments[e].duration||t.targetDuration,n=i+2*t.targetDuration;e--&&!(n<=(i+=t.segments[e].duration)););return Math.max(0,e)},wl=function(t,e,i){if(!t||!t.segments)return null;if(t.endList)return Tl(t);if(null===e)return null;e=e||0;var n=i?kl(t):t.segments.length;return bl(t,t.mediaSequence+n,e)},Cl=function(t){return t-Math.floor(t)==0},El=function(t,e){if(Cl(e))return e+.1*t;for(var i=e.toString().split(".")[1].length,n=1;n<=i;n++){var r=Math.pow(10,n),a=e*r;if(Cl(a)||n===i)return(a+t)/r}},Al=El.bind(null,1),Ll=El.bind(null,-1),Ol=function(t){return t.excludeUntil&&t.excludeUntil>Date.now()},Pl=function(t){return t.excludeUntil&&t.excludeUntil===1/0},Ul=function(t){var e=Ol(t);return!t.disabled&&!e},xl=function(t,e){return e.attributes&&e.attributes[t]},Il=function(t,e){if(1===t.playlists.length)return!0;var i=e.attributes.BANDWIDTH||Number.MAX_VALUE;return 0===t.playlists.filter(function(t){return!!Ul(t)&&(t.attributes.BANDWIDTH||0)<i}).length},Dl={duration:Tl,seekable:function(t,e){var i=e||0,n=wl(t,e,!0);return null===n?_l():_l(i,n)},safeLiveIndex:kl,getMediaInfoForTime:function(t,e,i,n){var r=void 0,a=void 0,s=t.segments.length,o=e-n;if(o<0){if(0<i)for(r=i-1;0<=r;r--)if(a=t.segments[r],0<(o+=Ll(a.duration)))return{mediaIndex:r,startTime:n-Sl(t,i,r)};return{mediaIndex:0,startTime:e}}if(i<0){for(r=i;r<0;r++)if((o-=t.targetDuration)<0)return{mediaIndex:0,startTime:e};i=0}for(r=i;r<s;r++)if(a=t.segments[r],(o-=Al(a.duration))<0)return{mediaIndex:r,startTime:n+Sl(t,i,r)};return{mediaIndex:s-1,startTime:e}},isEnabled:Ul,isDisabled:function(t){return t.disabled},isBlacklisted:Ol,isIncompatible:Pl,playlistEnd:wl,isAes:function(t){for(var e=0;e<t.segments.length;e++)if(t.segments[e].key)return!0;return!1},isFmp4:function(t){for(var e=0;e<t.segments.length;e++)if(t.segments[e].map)return!0;return!1},hasAttribute:xl,estimateSegmentRequestTime:function(t,e,i){var n=3<arguments.length&&void 0!==arguments[3]?arguments[3]:0;return xl("BANDWIDTH",i)?(t*i.attributes.BANDWIDTH-8*n)/e:NaN},isLowestEnabledRendition:Il},Rl=oa.xhr,Ml=oa.mergeOptions,Bl=function(){return function t(e,n){e=Ml({timeout:45e3},e);var i=t.beforeRequest||oa.Hls.xhr.beforeRequest;if(i&&"function"==typeof i){var r=i(e);r&&(e=r)}var a=Rl(e,function(t,e){var i=a.response;!t&&i&&(a.responseTime=Date.now(),a.roundTripTime=a.responseTime-a.requestTime,a.bytesReceived=i.byteLength||i.length,a.bandwidth||(a.bandwidth=Math.floor(a.bytesReceived/a.roundTripTime*8*1e3))),e.headers&&(a.responseHeaders=e.headers),t&&"ETIMEDOUT"===t.code&&(a.timedout=!0),t||a.aborted||200===e.statusCode||206===e.statusCode||0===e.statusCode||(t=new Error("XHR Failed with a response of: "+(a&&(i||a.responseText)))),n(t,a)}),s=a.abort;return a.abort=function(){return a.aborted=!0,s.apply(a,arguments)},a.uri=e.uri,a.requestTime=Date.now(),a}},Nl=function(t,e){var i=t.toString(16);return"00".substring(0,2-i.length)+i+(e%2?" ":"")},jl=function(t){return 32<=t&&t<126?String.fromCharCode(t):"."},Fl=function(i){var n={};return Object.keys(i).forEach(function(t){var e=i[t];ArrayBuffer.isView(e)?n[t]={bytes:e.buffer,byteOffset:e.byteOffset,byteLength:e.byteLength}:n[t]=e}),n},Vl=function(t){var e=t.byterange||{length:1/0,offset:0};return[e.length,e.offset,t.resolvedUri].join(",")},Hl=function(t){for(var e=Array.prototype.slice.call(t),i="",n=0;n<e.length/16;n++)i+=e.slice(16*n,16*n+16).map(Nl).join("")+" "+e.slice(16*n,16*n+16).map(jl).join("")+"\n";return i},ql=Object.freeze({createTransferableMessage:Fl,initSegmentId:Vl,hexDump:Hl,tagDump:function(t){var e=t.bytes;return Hl(e)},textRanges:function(t){var e,i,n="",r=void 0;for(r=0;r<t.length;r++)n+=(i=r,(e=t).start(i)+"-"+e.end(i)+" ");return n}}),zl=1/30,Wl=function(t,e){var i=[],n=void 0;if(t&&t.length)for(n=0;n<t.length;n++)e(t.start(n),t.end(n))&&i.push([t.start(n),t.end(n)]);return oa.createTimeRanges(i)},Gl=function(t,i){return Wl(t,function(t,e){return t-zl<=i&&i<=e+zl})},Xl=function(t,e){return Wl(t,function(t){return e<=t-zl})},Yl=function(t){var e=[];if(!t||!t.length)return"";for(var i=0;i<t.length;i++)e.push(t.start(i)+"=> "+t.end(i));return e.join(", ")},$l=function(t){for(var e=[],i=0;i<t.length;i++)e.push({start:t.start(i),end:t.end(i)});return e},Kl=function(t,e,i){var n=void 0,r=void 0;if(i&&i.cues)for(n=i.cues.length;n--;)(r=i.cues[n]).startTime<=e&&r.endTime>=t&&i.removeCue(r)},Ql=function(t){return isNaN(t)||Math.abs(t)===1/0?Number.MAX_VALUE:t},Jl=function(t,e,i){var r=v.WebKitDataCue||v.VTTCue;if(e&&e.forEach(function(t){var e=t.stream;this.inbandTextTracks_[e].addCue(new r(t.startTime+this.timestampOffset,t.endTime+this.timestampOffset,t.text))},t),i){var a=Ql(t.mediaSource_.duration);if(i.forEach(function(t){var n=t.cueTime+this.timestampOffset;t.frames.forEach(function(t){var e,i=new r(n,n,t.value||t.url||t.data||"");i.frame=t,i.value=t,e=i,Object.defineProperties(e.frame,{id:{get:function(){return oa.log.warn("cue.frame.id is deprecated. Use cue.value.key instead."),e.value.key}},value:{get:function(){return oa.log.warn("cue.frame.value is deprecated. Use cue.value.data instead."),e.value.data}},privateData:{get:function(){return oa.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead."),e.value.data}}}),this.metadataTrack_.addCue(i)},this)},t),t.metadataTrack_&&t.metadataTrack_.cues&&t.metadataTrack_.cues.length){for(var n=t.metadataTrack_.cues,s=[],o=0;o<n.length;o++)n[o]&&s.push(n[o]);var u=s.reduce(function(t,e){var i=t[e.startTime]||[];return i.push(e),t[e.startTime]=i,t},{}),l=Object.keys(u).sort(function(t,e){return Number(t)-Number(e)});l.forEach(function(t,e){var i=u[t],n=Number(l[e+1])||a;i.forEach(function(t){t.endTime=n})})}}},Zl="undefined"!=typeof window?window:{},tc="undefined"==typeof Symbol?"__target":Symbol(),ec="application/javascript",ic=Zl.BlobBuilder||Zl.WebKitBlobBuilder||Zl.MozBlobBuilder||Zl.MSBlobBuilder,nc=Zl.URL||Zl.webkitURL||nc&&nc.msURL,rc=Zl.Worker;function ac(r,a){return function(t){var e=this;if(!a)return new rc(r);if(rc&&!t){var i=lc(a.toString().replace(/^function.+?{/,"").slice(0,-1));return this[tc]=new rc(i),function(t,e){if(!t||!e)return;var i=t.terminate;t.objURL=e,t.terminate=function(){t.objURL&&nc.revokeObjectURL(t.objURL),i.call(t)}}(this[tc],i),this[tc]}var n={postMessage:function(t){e.onmessage&&setTimeout(function(){e.onmessage({data:t,target:n})})}};a.call(n),this.postMessage=function(t){setTimeout(function(){n.onmessage({data:t,target:e})})},this.isThisThread=!0}}if(rc){var sc,oc=lc("self.onmessage=function (){}"),uc=new Uint8Array(1);try{(sc=new rc(oc)).postMessage(uc,[uc.buffer])}catch(t){rc=null}finally{nc.revokeObjectURL(oc),sc&&sc.terminate()}}function lc(e){try{return nc.createObjectURL(new Blob([e],{type:ec}))}catch(t){var i=new ic;return i.append(e),nc.createObjectURL(i.getBlob(type))}}var cc=new ac("./transmuxer-worker.worker.js",function(t,e){var Oe=this;!function(){var o,e,i,r,a,n,t,s,u,l,c,h,d,p,f,m,g,y,v,_,b,T,S,k,w,C,E,A,L,O,P,U,x,I,D,R,M,B,N,j,F=Math.pow(2,32)-1;!function(){var t;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(t in T)T.hasOwnProperty(t)&&(T[t]=[t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2),t.charCodeAt(3)]);S=new Uint8Array(["i".charCodeAt(0),"s".charCodeAt(0),"o".charCodeAt(0),"m".charCodeAt(0)]),w=new Uint8Array(["a".charCodeAt(0),"v".charCodeAt(0),"c".charCodeAt(0),"1".charCodeAt(0)]),k=new Uint8Array([0,0,0,1]),C=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]),E=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]),A={video:C,audio:E},P=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),O=new Uint8Array([0,0,0,0,0,0,0,0]),U=new Uint8Array([0,0,0,0,0,0,0,0]),x=U,I=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),D=U,L=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}}(),o=function(t){var e,i,n=[],r=0;for(e=1;e<arguments.length;e++)n.push(arguments[e]);for(e=n.length;e--;)r+=n[e].byteLength;for(i=new Uint8Array(r+8),new DataView(i.buffer,i.byteOffset,i.byteLength).setUint32(0,i.byteLength),i.set(t,4),e=0,r=8;e<n.length;e++)i.set(n[e],r),r+=n[e].byteLength;return i},e=function(){return o(T.dinf,o(T.dref,P))},i=function(t){return o(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,t.audioobjecttype<<3|t.samplingfrequencyindex>>>1,t.samplingfrequencyindex<<7|t.channelcount<<3,6,1,2]))},f=function(t){return o(T.hdlr,A[t])},p=function(t){var e=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,t.duration>>>24&255,t.duration>>>16&255,t.duration>>>8&255,255&t.duration,85,196,0,0]);return t.samplerate&&(e[12]=t.samplerate>>>24&255,e[13]=t.samplerate>>>16&255,e[14]=t.samplerate>>>8&255,e[15]=255&t.samplerate),o(T.mdhd,e)},d=function(t){return o(T.mdia,p(t),f(t.type),n(t))},a=function(t){return o(T.mfhd,new Uint8Array([0,0,0,0,(4278190080&t)>>24,(16711680&t)>>16,(65280&t)>>8,255&t]))},n=function(t){return o(T.minf,"video"===t.type?o(T.vmhd,L):o(T.smhd,O),e(),g(t))},t=function(t,e){for(var i=[],n=e.length;n--;)i[n]=v(e[n]);return o.apply(null,[T.moof,a(t)].concat(i))},s=function(t){for(var e=t.length,i=[];e--;)i[e]=c(t[e]);return o.apply(null,[T.moov,l(4294967295)].concat(i).concat(u(t)))},u=function(t){for(var e=t.length,i=[];e--;)i[e]=_(t[e]);return o.apply(null,[T.mvex].concat(i))},l=function(t){var e=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(4278190080&t)>>24,(16711680&t)>>16,(65280&t)>>8,255&t,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 o(T.mvhd,e)},m=function(t){var e,i,n=t.samples||[],r=new Uint8Array(4+n.length);for(i=0;i<n.length;i++)e=n[i].flags,r[i+4]=e.dependsOn<<4|e.isDependedOn<<2|e.hasRedundancy;return o(T.sdtp,r)},g=function(t){return o(T.stbl,y(t),o(T.stts,D),o(T.stsc,x),o(T.stsz,I),o(T.stco,U))},y=function(t){return o(T.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),"video"===t.type?R(t):M(t))},R=function(t){var e,i=t.sps||[],n=t.pps||[],r=[],a=[];for(e=0;e<i.length;e++)r.push((65280&i[e].byteLength)>>>8),r.push(255&i[e].byteLength),r=r.concat(Array.prototype.slice.call(i[e]));for(e=0;e<n.length;e++)a.push((65280&n[e].byteLength)>>>8),a.push(255&n[e].byteLength),a=a.concat(Array.prototype.slice.call(n[e]));return o(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&t.width)>>8,255&t.width,(65280&t.height)>>8,255&t.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]),o(T.avcC,new Uint8Array([1,t.profileIdc,t.profileCompatibility,t.levelIdc,255].concat([i.length]).concat(r).concat([n.length]).concat(a))),o(T.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])))},M=function(t){return o(T.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(65280&t.channelcount)>>8,255&t.channelcount,(65280&t.samplesize)>>8,255&t.samplesize,0,0,0,0,(65280&t.samplerate)>>8,255&t.samplerate,0,0]),i(t))},h=function(t){var e=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(4278190080&t.id)>>24,(16711680&t.id)>>16,(65280&t.id)>>8,255&t.id,0,0,0,0,(4278190080&t.duration)>>24,(16711680&t.duration)>>16,(65280&t.duration)>>8,255&t.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&t.width)>>8,255&t.width,0,0,(65280&t.height)>>8,255&t.height,0,0]);return o(T.tkhd,e)},v=function(t){var e,i,n,r,a,s;return e=o(T.tfhd,new Uint8Array([0,0,0,58,(4278190080&t.id)>>24,(16711680&t.id)>>16,(65280&t.id)>>8,255&t.id,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),a=Math.floor(t.baseMediaDecodeTime/(F+1)),s=Math.floor(t.baseMediaDecodeTime%(F+1)),i=o(T.tfdt,new Uint8Array([1,0,0,0,a>>>24&255,a>>>16&255,a>>>8&255,255&a,s>>>24&255,s>>>16&255,s>>>8&255,255&s])),92,"audio"===t.type?(n=b(t,92),o(T.traf,e,i,n)):(r=m(t),n=b(t,r.length+92),o(T.traf,e,i,n,r))},c=function(t){return t.duration=t.duration||4294967295,o(T.trak,h(t),d(t))},_=function(t){var e=new Uint8Array([0,0,0,0,(4278190080&t.id)>>24,(16711680&t.id)>>16,(65280&t.id)>>8,255&t.id,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return"video"!==t.type&&(e[e.length-1]=0),o(T.trex,e)},j=function(t,e){var i=0,n=0,r=0,a=0;return t.length&&(void 0!==t[0].duration&&(i=1),void 0!==t[0].size&&(n=2),void 0!==t[0].flags&&(r=4),void 0!==t[0].compositionTimeOffset&&(a=8)),[0,0,i|n|r|a,1,(4278190080&t.length)>>>24,(16711680&t.length)>>>16,(65280&t.length)>>>8,255&t.length,(4278190080&e)>>>24,(16711680&e)>>>16,(65280&e)>>>8,255&e]},N=function(t,e){var i,n,r,a;for(e+=20+16*(n=t.samples||[]).length,i=j(n,e),a=0;a<n.length;a++)r=n[a],i=i.concat([(4278190080&r.duration)>>>24,(16711680&r.duration)>>>16,(65280&r.duration)>>>8,255&r.duration,(4278190080&r.size)>>>24,(16711680&r.size)>>>16,(65280&r.size)>>>8,255&r.size,r.flags.isLeading<<2|r.flags.dependsOn,r.flags.isDependedOn<<6|r.flags.hasRedundancy<<4|r.flags.paddingValue<<1|r.flags.isNonSyncSample,61440&r.flags.degradationPriority,15&r.flags.degradationPriority,(4278190080&r.compositionTimeOffset)>>>24,(16711680&r.compositionTimeOffset)>>>16,(65280&r.compositionTimeOffset)>>>8,255&r.compositionTimeOffset]);return o(T.trun,new Uint8Array(i))},B=function(t,e){var i,n,r,a;for(e+=20+8*(n=t.samples||[]).length,i=j(n,e),a=0;a<n.length;a++)r=n[a],i=i.concat([(4278190080&r.duration)>>>24,(16711680&r.duration)>>>16,(65280&r.duration)>>>8,255&r.duration,(4278190080&r.size)>>>24,(16711680&r.size)>>>16,(65280&r.size)>>>8,255&r.size]);return o(T.trun,new Uint8Array(i))},b=function(t,e){return"audio"===t.type?B(t,e):N(t,e)};var V,H,q,z,W,G={ftyp:r=function(){return o(T.ftyp,S,k,S,w)},mdat:function(t){return o(T.mdat,t)},moof:t,moov:s,initSegment:function(t){var e,i=r(),n=s(t);return(e=new Uint8Array(i.byteLength+n.byteLength)).set(i),e.set(n,i.byteLength),e}},X=function(t){return t>>>0};q=function(t){return V(t,["moov","trak"]).reduce(function(t,e){var i,n,r,a,s;return(i=V(e,["tkhd"])[0])?(n=i[0],a=X(i[r=0===n?12:20]<<24|i[r+1]<<16|i[r+2]<<8|i[r+3]),(s=V(e,["mdia","mdhd"])[0])?(r=0===(n=s[0])?12:20,t[a]=X(s[r]<<24|s[r+1]<<16|s[r+2]<<8|s[r+3]),t):null):null},{})},z=function(r,t){var e,i,n;return e=V(t,["moof","traf"]),i=[].concat.apply([],e.map(function(n){return V(n,["tfhd"]).map(function(t){var e,i;return e=X(t[4]<<24|t[5]<<16|t[6]<<8|t[7]),i=r[e]||9e4,(V(n,["tfdt"]).map(function(t){var e,i;return e=t[0],i=X(t[4]<<24|t[5]<<16|t[6]<<8|t[7]),1===e&&(i*=Math.pow(2,32),i+=X(t[8]<<24|t[9]<<16|t[10]<<8|t[11])),i})[0]||1/0)/i})})),n=Math.min.apply(null,i),isFinite(n)?n:0},W=function(t){var e=V(t,["moov","trak"]),o=[];return e.forEach(function(t){var e=V(t,["mdia","hdlr"]),s=V(t,["tkhd"]);e.forEach(function(t,e){var i,n,r=H(t.subarray(8,12)),a=s[e];"vide"===r&&(n=0===(i=new DataView(a.buffer,a.byteOffset,a.byteLength)).getUint8(0)?i.getUint32(12):i.getUint32(20),o.push(n))})}),o};var Y={findBox:V=function(t,e){var i,n,r,a,s,o=[];if(!e.length)return null;for(i=0;i<t.byteLength;)n=X(t[i]<<24|t[i+1]<<16|t[i+2]<<8|t[i+3]),r=H(t.subarray(i+4,i+8)),a=1<n?i+n:t.byteLength,r===e[0]&&(1===e.length?o.push(t.subarray(i+8,a)):(s=V(t.subarray(i+8,a),e.slice(1))).length&&(o=o.concat(s))),i=a;return o},parseType:H=function(t){var e="";return e+=String.fromCharCode(t[0]),e+=String.fromCharCode(t[1]),e+=String.fromCharCode(t[2]),e+=String.fromCharCode(t[3])},timescale:q,startTime:z,videoTrackIds:W},$=function(){this.init=function(){var a={};this.on=function(t,e){a[t]||(a[t]=[]),a[t]=a[t].concat(e)},this.off=function(t,e){var i;return!!a[t]&&(i=a[t].indexOf(e),a[t]=a[t].slice(),a[t].splice(i,1),-1<i)},this.trigger=function(t){var e,i,n,r;if(e=a[t])if(2===arguments.length)for(n=e.length,i=0;i<n;++i)e[i].call(this,arguments[1]);else{for(r=[],i=arguments.length,i=1;i<arguments.length;++i)r.push(arguments[i]);for(n=e.length,i=0;i<n;++i)e[i].apply(this,r)}},this.dispose=function(){a={}}}};$.prototype.pipe=function(e){return this.on("data",function(t){e.push(t)}),this.on("done",function(t){e.flush(t)}),e},$.prototype.push=function(t){this.trigger("data",t)},$.prototype.flush=function(t){this.trigger("done",t)};var K=$,Q=function(t){var e,i,n=[],r=[];for(e=n.byteLength=0;e<t.length;e++)"access_unit_delimiter_rbsp"===(i=t[e]).nalUnitType?(n.length&&(n.duration=i.dts-n.dts,r.push(n)),(n=[i]).byteLength=i.data.byteLength,n.pts=i.pts,n.dts=i.dts):("slice_layer_without_partitioning_rbsp_idr"===i.nalUnitType&&(n.keyFrame=!0),n.duration=i.dts-n.dts,n.byteLength+=i.data.byteLength,n.push(i));return r.length&&(!n.duration||n.duration<=0)&&(n.duration=r[r.length-1].duration),r.push(n),r},J=function(t){var e,i,n=[],r=[];for(n.byteLength=0,n.nalCount=0,n.duration=0,n.pts=t[0].pts,n.dts=t[0].dts,r.byteLength=0,r.nalCount=0,r.duration=0,r.pts=t[0].pts,r.dts=t[0].dts,e=0;e<t.length;e++)(i=t[e]).keyFrame?(n.length&&(r.push(n),r.byteLength+=n.byteLength,r.nalCount+=n.nalCount,r.duration+=n.duration),(n=[i]).nalCount=i.length,n.byteLength=i.byteLength,n.pts=i.pts,n.dts=i.dts,n.duration=i.duration):(n.duration+=i.duration,n.nalCount+=i.length,n.byteLength+=i.byteLength,n.push(i));return r.length&&n.duration<=0&&(n.duration=r[r.length-1].duration),r.byteLength+=n.byteLength,r.nalCount+=n.nalCount,r.duration+=n.duration,r.push(n),r},Z=function(t){var e;return!t[0][0].keyFrame&&1<t.length&&(e=t.shift(),t.byteLength-=e.byteLength,t.nalCount-=e.nalCount,t[0][0].dts=e.dts,t[0][0].pts=e.pts,t[0][0].duration+=e.duration),t},tt=function(t,e){var i,n,r,a,s,o,u,l=e||0,c=[];for(i=0;i<t.length;i++)for(a=t[i],n=0;n<a.length;n++)s=a[n],o=s,u=void 0,(u={size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}}).dataOffset=l,u.compositionTimeOffset=o.pts-o.dts,u.duration=o.duration,u.size=4*o.length,u.size+=o.byteLength,o.keyFrame&&(u.flags.dependsOn=2,u.flags.isNonSyncSample=0),l+=(r=u).size,c.push(r);return c},et=function(t){var e,i,n,r,a,s,o=0,u=t.byteLength,l=t.nalCount,c=new Uint8Array(u+4*l),h=new DataView(c.buffer);for(e=0;e<t.length;e++)for(r=t[e],i=0;i<r.length;i++)for(a=r[i],n=0;n<a.length;n++)s=a[n],h.setUint32(o,s.data.byteLength),o+=4,c.set(s.data,o),o+=s.data.byteLength;return c},it=function(t){delete t.minSegmentDts,delete t.maxSegmentDts,delete t.minSegmentPts,delete t.maxSegmentPts},nt=function(t,e){var i,n=t.minSegmentDts;return e||(n-=t.timelineStartInfo.dts),i=t.timelineStartInfo.baseMediaDecodeTime,i+=n,i=Math.max(0,i),"audio"===t.type&&(i*=t.samplerate/9e4,i=Math.floor(i)),i},rt=function(t,e){"number"==typeof e.pts&&(void 0===t.timelineStartInfo.pts&&(t.timelineStartInfo.pts=e.pts),void 0===t.minSegmentPts?t.minSegmentPts=e.pts:t.minSegmentPts=Math.min(t.minSegmentPts,e.pts),void 0===t.maxSegmentPts?t.maxSegmentPts=e.pts:t.maxSegmentPts=Math.max(t.maxSegmentPts,e.pts)),"number"==typeof e.dts&&(void 0===t.timelineStartInfo.dts&&(t.timelineStartInfo.dts=e.dts),void 0===t.minSegmentDts?t.minSegmentDts=e.dts:t.minSegmentDts=Math.min(t.minSegmentDts,e.dts),void 0===t.maxSegmentDts?t.maxSegmentDts=e.dts:t.maxSegmentDts=Math.max(t.maxSegmentDts,e.dts))},at=function(t){for(var e=0,i={payloadType:-1,payloadSize:0},n=0,r=0;e<t.byteLength&&128!==t[e];){for(;255===t[e];)n+=255,e++;for(n+=t[e++];255===t[e];)r+=255,e++;if(r+=t[e++],!i.payload&&4===n){i.payloadType=n,i.payloadSize=r,i.payload=t.subarray(e,e+r);break}e+=r,r=n=0}return i},st=function(t){return 181!==t.payload[0]?null:49!=(t.payload[1]<<8|t.payload[2])?null:"GA94"!==String.fromCharCode(t.payload[3],t.payload[4],t.payload[5],t.payload[6])?null:3!==t.payload[7]?null:t.payload.subarray(8,t.payload.length-1)},ot=function(t,e){var i,n,r,a,s=[];if(!(64&e[0]))return s;for(n=31&e[0],i=0;i<n;i++)a={type:3&e[2+(r=3*i)],pts:t},4&e[r+2]&&(a.ccData=e[r+3]<<8|e[r+4],s.push(a));return s},ut=function(t){for(var e,i,n=t.byteLength,r=[],a=1;a<n-2;)0===t[a]&&0===t[a+1]&&3===t[a+2]?(r.push(a+2),a+=2):a++;if(0===r.length)return t;e=n-r.length,i=new Uint8Array(e);var s=0;for(a=0;a<e;s++,a++)s===r[0]&&(s++,r.shift()),i[a]=t[s];return i},lt=4,ct=function t(){t.prototype.init.call(this),this.captionPackets_=[],this.ccStreams_=[new mt(0,0),new mt(0,1),new mt(1,0),new mt(1,1)],this.reset(),this.ccStreams_.forEach(function(t){t.on("data",this.trigger.bind(this,"data")),t.on("done",this.trigger.bind(this,"done"))},this)};(ct.prototype=new K).push=function(t){var e,i,n;if("sei_rbsp"===t.nalUnitType&&(e=at(t.escapedRBSP)).payloadType===lt&&(i=st(e)))if(t.dts<this.latestDts_)this.ignoreNextEqualDts_=!0;else{if(t.dts===this.latestDts_&&this.ignoreNextEqualDts_)return this.numSameDts_--,void(this.numSameDts_||(this.ignoreNextEqualDts_=!1));n=ot(t.pts,i),this.captionPackets_=this.captionPackets_.concat(n),this.latestDts_!==t.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=t.dts}},ct.prototype.flush=function(){this.captionPackets_.length?(this.captionPackets_.forEach(function(t,e){t.presortIndex=e}),this.captionPackets_.sort(function(t,e){return t.pts===e.pts?t.presortIndex-e.presortIndex:t.pts-e.pts}),this.captionPackets_.forEach(function(t){t.type<2&&this.dispatchCea608Packet(t)},this),this.captionPackets_.length=0,this.ccStreams_.forEach(function(t){t.flush()},this)):this.ccStreams_.forEach(function(t){t.flush()},this)},ct.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach(function(t){t.reset()})},ct.prototype.dispatchCea608Packet=function(t){this.setsChannel1Active(t)?this.activeCea608Channel_[t.type]=0:this.setsChannel2Active(t)&&(this.activeCea608Channel_[t.type]=1),null!==this.activeCea608Channel_[t.type]&&this.ccStreams_[(t.type<<1)+this.activeCea608Channel_[t.type]].push(t)},ct.prototype.setsChannel1Active=function(t){return 4096==(30720&t.ccData)},ct.prototype.setsChannel2Active=function(t){return 6144==(30720&t.ccData)};var ht={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},dt=function(t){return null===t?"":(t=ht[t]||t,String.fromCharCode(t))},pt=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],ft=function(){for(var t=[],e=15;e--;)t.push("");return t},mt=function t(e,i){t.prototype.init.call(this),this.field_=e||0,this.dataChannel_=i||0,this.name_="CC"+(1+(this.field_<<1|this.dataChannel_)),this.setConstants(),this.reset(),this.push=function(t){var e,i,n,r,a;if((e=32639&t.ccData)!==this.lastControlCode_){if(4096==(61440&e)?this.lastControlCode_=e:e!==this.PADDING_&&(this.lastControlCode_=null),n=e>>>8,r=255&e,e!==this.PADDING_)if(e===this.RESUME_CAPTION_LOADING_)this.mode_="popOn";else if(e===this.END_OF_CAPTION_)this.mode_="popOn",this.clearFormatting(t.pts),this.flushDisplayed(t.pts),i=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=i,this.startPts_=t.pts;else if(e===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(t.pts);else if(e===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(t.pts);else if(e===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(t.pts);else if(e===this.CARRIAGE_RETURN_)this.clearFormatting(t.pts),this.flushDisplayed(t.pts),this.shiftRowsUp_(),this.startPts_=t.pts;else if(e===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);else if(e===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(t.pts),this.displayed_=ft();else if(e===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=ft();else if(e===this.RESUME_DIRECT_CAPTIONING_)"paintOn"!==this.mode_&&(this.flushDisplayed(t.pts),this.displayed_=ft()),this.mode_="paintOn",this.startPts_=t.pts;else if(this.isSpecialCharacter(n,r))a=dt((n=(3&n)<<8)|r),this[this.mode_](t.pts,a),this.column_++;else if(this.isExtCharacter(n,r))"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),a=dt((n=(3&n)<<8)|r),this[this.mode_](t.pts,a),this.column_++;else if(this.isMidRowCode(n,r))this.clearFormatting(t.pts),this[this.mode_](t.pts," "),this.column_++,14==(14&r)&&this.addFormatting(t.pts,["i"]),1==(1&r)&&this.addFormatting(t.pts,["u"]);else if(this.isOffsetControlCode(n,r))this.column_+=3&r;else if(this.isPAC(n,r)){var s=pt.indexOf(7968&e);"rollUp"===this.mode_&&this.setRollUp(t.pts,s),s!==this.row_&&(this.clearFormatting(t.pts),this.row_=s),1&r&&-1===this.formatting_.indexOf("u")&&this.addFormatting(t.pts,["u"]),16==(16&e)&&(this.column_=4*((14&e)>>1)),this.isColorPAC(r)&&14==(14&r)&&this.addFormatting(t.pts,["i"])}else this.isNormalChar(n)&&(0===r&&(r=null),a=dt(n),a+=dt(r),this[this.mode_](t.pts,a),this.column_+=a.length)}else this.lastControlCode_=null}};mt.prototype=new K,mt.prototype.flushDisplayed=function(t){var e=this.displayed_.map(function(t){return t.trim()}).join("\n").replace(/^\n+|\n+$/g,"");e.length&&this.trigger("data",{startPts:this.startPts_,endPts:t,text:e,stream:this.name_})},mt.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=ft(),this.nonDisplayed_=ft(),this.lastControlCode_=null,this.column_=0,this.row_=14,this.rollUpRows_=2,this.formatting_=[]},mt.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_},mt.prototype.isSpecialCharacter=function(t,e){return t===this.EXT_&&48<=e&&e<=63},mt.prototype.isExtCharacter=function(t,e){return(t===this.EXT_+1||t===this.EXT_+2)&&32<=e&&e<=63},mt.prototype.isMidRowCode=function(t,e){return t===this.EXT_&&32<=e&&e<=47},mt.prototype.isOffsetControlCode=function(t,e){return t===this.OFFSET_&&33<=e&&e<=35},mt.prototype.isPAC=function(t,e){return t>=this.BASE_&&t<this.BASE_+8&&64<=e&&e<=127},mt.prototype.isColorPAC=function(t){return 64<=t&&t<=79||96<=t&&t<=127},mt.prototype.isNormalChar=function(t){return 32<=t&&t<=127},mt.prototype.setRollUp=function(t,e){if("rollUp"!==this.mode_&&(this.row_=14,this.mode_="rollUp",this.flushDisplayed(t),this.nonDisplayed_=ft(),this.displayed_=ft()),void 0!==e&&e!==this.row_)for(var i=0;i<this.rollUpRows_;i++)this.displayed_[e-i]=this.displayed_[this.row_-i],this.displayed_[this.row_-i]="";void 0===e&&(e=this.row_),this.topRow_=e-this.rollUpRows_+1},mt.prototype.addFormatting=function(t,e){this.formatting_=this.formatting_.concat(e);var i=e.reduce(function(t,e){return t+"<"+e+">"},"");this[this.mode_](t,i)},mt.prototype.clearFormatting=function(t){if(this.formatting_.length){var e=this.formatting_.reverse().reduce(function(t,e){return t+"</"+e+">"},"");this.formatting_=[],this[this.mode_](t,e)}},mt.prototype.popOn=function(t,e){var i=this.nonDisplayed_[this.row_];i+=e,this.nonDisplayed_[this.row_]=i},mt.prototype.rollUp=function(t,e){var i=this.displayed_[this.row_];i+=e,this.displayed_[this.row_]=i},mt.prototype.shiftRowsUp_=function(){var t;for(t=0;t<this.topRow_;t++)this.displayed_[t]="";for(t=this.row_+1;t<15;t++)this.displayed_[t]="";for(t=this.topRow_;t<this.row_;t++)this.displayed_[t]=this.displayed_[t+1];this.displayed_[this.row_]=""},mt.prototype.paintOn=function(t,e){var i=this.displayed_[this.row_];i+=e,this.displayed_[this.row_]=i};var gt={CaptionStream:ct,Cea608Stream:mt},yt={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},vt=function(t,e){var i=1;for(e<t&&(i=-1);4294967296<Math.abs(e-t);)t+=8589934592*i;return t},_t=function t(e){var i,n;t.prototype.init.call(this),this.type_=e,this.push=function(t){t.type===this.type_&&(void 0===n&&(n=t.dts),t.dts=vt(t.dts,n),t.pts=vt(t.pts,n),i=t.dts,this.trigger("data",t))},this.flush=function(){n=i,this.trigger("done")},this.discontinuity=function(){i=n=void 0}};_t.prototype=new K;var bt,Tt=_t,St=function(t,e,i){var n,r="";for(n=e;n<i;n++)r+="%"+("00"+t[n].toString(16)).slice(-2);return r},kt=function(t,e,i){return decodeURIComponent(St(t,e,i))},wt=function(t){return t[0]<<21|t[1]<<14|t[2]<<7|t[3]},Ct={TXXX:function(t){var e;if(3===t.data[0]){for(e=1;e<t.data.length;e++)if(0===t.data[e]){t.description=kt(t.data,1,e),t.value=kt(t.data,e+1,t.data.length).replace(/\0*$/,"");break}t.data=t.value}},WXXX:function(t){var e;if(3===t.data[0])for(e=1;e<t.data.length;e++)if(0===t.data[e]){t.description=kt(t.data,1,e),t.url=kt(t.data,e+1,t.data.length);break}},PRIV:function(t){var e,i;for(e=0;e<t.data.length;e++)if(0===t.data[e]){t.owner=(i=t.data,unescape(St(i,0,e)));break}t.privateData=t.data.subarray(e+1),t.data=t.privateData}};(bt=function(t){var e,u={debug:!(!t||!t.debug),descriptor:t&&t.descriptor},l=0,c=[],h=0;if(bt.prototype.init.call(this),this.dispatchType=yt.METADATA_STREAM_TYPE.toString(16),u.descriptor)for(e=0;e<u.descriptor.length;e++)this.dispatchType+=("00"+u.descriptor[e].toString(16)).slice(-2);this.push=function(t){var e,i,n,r,a;if("timed-metadata"===t.type)if(t.dataAlignmentIndicator&&(h=0,c.length=0),0===c.length&&(t.data.length<10||t.data[0]!=="I".charCodeAt(0)||t.data[1]!=="D".charCodeAt(0)||t.data[2]!=="3".charCodeAt(0)))u.debug;else if(c.push(t),h+=t.data.byteLength,1===c.length&&(l=wt(t.data.subarray(6,10)),l+=10),!(h<l)){for(e={data:new Uint8Array(l),frames:[],pts:c[0].pts,dts:c[0].dts},a=0;a<l;)e.data.set(c[0].data.subarray(0,l-a),a),a+=c[0].data.byteLength,h-=c[0].data.byteLength,c.shift();i=10,64&e.data[5]&&(i+=4,i+=wt(e.data.subarray(10,14)),l-=wt(e.data.subarray(16,20)));do{if((n=wt(e.data.subarray(i+4,i+8)))<1)return;if((r={id:String.fromCharCode(e.data[i],e.data[i+1],e.data[i+2],e.data[i+3]),data:e.data.subarray(i+10,i+n+10)}).key=r.id,Ct[r.id]&&(Ct[r.id](r),"com.apple.streaming.transportStreamTimestamp"===r.owner)){var s=r.data,o=(1&s[3])<<30|s[4]<<22|s[5]<<14|s[6]<<6|s[7]>>>2;o*=4,o+=3&s[7],r.timeStamp=o,void 0===e.pts&&void 0===e.dts&&(e.pts=r.timeStamp,e.dts=r.timeStamp),this.trigger("timestamp",r)}e.frames.push(r),i+=10,i+=n}while(i<l);this.trigger("data",e)}}}).prototype=new K;var Et,At,Lt,Ot=bt,Pt=Tt;(Et=function(){var r=new Uint8Array(188),a=0;Et.prototype.init.call(this),this.push=function(t){var e,i=0,n=188;for(a?((e=new Uint8Array(t.byteLength+a)).set(r.subarray(0,a)),e.set(t,a),a=0):e=t;n<e.byteLength;)71!==e[i]||71!==e[n]?(i++,n++):(this.trigger("data",e.subarray(i,n)),i+=188,n+=188);i<e.byteLength&&(r.set(e.subarray(i),0),a=e.byteLength-i)},this.flush=function(){188===a&&71===r[0]&&(this.trigger("data",r),a=0),this.trigger("done")}}).prototype=new K,(At=function(){var n,r,a,s;At.prototype.init.call(this),(s=this).packetsWaitingForPmt=[],this.programMapTable=void 0,n=function(t,e){var i=0;e.payloadUnitStartIndicator&&(i+=t[i]+1),"pat"===e.type?r(t.subarray(i),e):a(t.subarray(i),e)},r=function(t,e){e.section_number=t[7],e.last_section_number=t[8],s.pmtPid=(31&t[10])<<8|t[11],e.pmtPid=s.pmtPid},a=function(t,e){var i,n;if(1&t[5]){for(s.programMapTable={video:null,audio:null,"timed-metadata":{}},i=3+((15&t[1])<<8|t[2])-4,n=12+((15&t[10])<<8|t[11]);n<i;){var r=t[n],a=(31&t[n+1])<<8|t[n+2];r===yt.H264_STREAM_TYPE&&null===s.programMapTable.video?s.programMapTable.video=a:r===yt.ADTS_STREAM_TYPE&&null===s.programMapTable.audio?s.programMapTable.audio=a:r===yt.METADATA_STREAM_TYPE&&(s.programMapTable["timed-metadata"][a]=r),n+=5+((15&t[n+3])<<8|t[n+4])}e.programMapTable=s.programMapTable}},this.push=function(t){var e={},i=4;if(e.payloadUnitStartIndicator=!!(64&t[1]),e.pid=31&t[1],e.pid<<=8,e.pid|=t[2],1<(48&t[3])>>>4&&(i+=t[i]+1),0===e.pid)e.type="pat",n(t.subarray(i),e),this.trigger("data",e);else if(e.pid===this.pmtPid)for(e.type="pmt",n(t.subarray(i),e),this.trigger("data",e);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else void 0===this.programMapTable?this.packetsWaitingForPmt.push([t,i,e]):this.processPes_(t,i,e)},this.processPes_=function(t,e,i){i.pid===this.programMapTable.video?i.streamType=yt.H264_STREAM_TYPE:i.pid===this.programMapTable.audio?i.streamType=yt.ADTS_STREAM_TYPE:i.streamType=this.programMapTable["timed-metadata"][i.pid],i.type="pes",i.data=t.subarray(e),this.trigger("data",i)}}).prototype=new K,At.STREAM_TYPES={h264:27,adts:15},(Lt=function(){var d=this,n={data:[],size:0},r={data:[],size:0},a={data:[],size:0},s=function(t,e,i){var n,r,a=new Uint8Array(t.size),s={type:e},o=0,u=0;if(t.data.length&&!(t.size<9)){for(s.trackId=t.data[0].pid,o=0;o<t.data.length;o++)r=t.data[o],a.set(r.data,u),u+=r.data.byteLength;var l,c,h;l=a,(c=s).packetLength=6+(l[4]<<8|l[5]),c.dataAlignmentIndicator=0!=(4&l[6]),192&(h=l[7])&&(c.pts=(14&l[9])<<27|(255&l[10])<<20|(254&l[11])<<12|(255&l[12])<<5|(254&l[13])>>>3,c.pts*=4,c.pts+=(6&l[13])>>>1,c.dts=c.pts,64&h&&(c.dts=(14&l[14])<<27|(255&l[15])<<20|(254&l[16])<<12|(255&l[17])<<5|(254&l[18])>>>3,c.dts*=4,c.dts+=(6&l[18])>>>1)),c.data=l.subarray(9+l[8]),n="video"===e||s.packetLength<=t.size,(i||n)&&(t.size=0,t.data.length=0),n&&d.trigger("data",s)}};Lt.prototype.init.call(this),this.push=function(i){({pat:function(){},pes:function(){var t,e;switch(i.streamType){case yt.H264_STREAM_TYPE:case yt.H264_STREAM_TYPE:t=n,e="video";break;case yt.ADTS_STREAM_TYPE:t=r,e="audio";break;case yt.METADATA_STREAM_TYPE:t=a,e="timed-metadata";break;default:return}i.payloadUnitStartIndicator&&s(t,e,!0),t.data.push(i),t.size+=i.data.byteLength},pmt:function(){var t={type:"metadata",tracks:[]},e=i.programMapTable;null!==e.video&&t.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.video,codec:"avc",type:"video"}),null!==e.audio&&t.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.audio,codec:"adts",type:"audio"}),d.trigger("data",t)}})[i.type]()},this.flush=function(){s(n,"video"),s(r,"audio"),s(a,"timed-metadata"),this.trigger("done")}}).prototype=new K;var Ut={PAT_PID:0,MP2T_PACKET_LENGTH:188,TransportPacketStream:Et,TransportParseStream:At,ElementaryStream:Lt,TimestampRolloverStream:Pt,CaptionStream:gt.CaptionStream,Cea608Stream:gt.Cea608Stream,MetadataStream:Ot};for(var xt in yt)yt.hasOwnProperty(xt)&&(Ut[xt]=yt[xt]);var It,Dt=Ut,Rt=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];(It=function(){var l;It.prototype.init.call(this),this.push=function(t){var e,i,n,r,a,s,o=0,u=0;if("audio"===t.type)for(l?(r=l,(l=new Uint8Array(r.byteLength+t.data.byteLength)).set(r),l.set(t.data,r.byteLength)):l=t.data;o+5<l.length;)if(255===l[o]&&240==(246&l[o+1])){if(i=2*(1&~l[o+1]),e=(3&l[o+3])<<11|l[o+4]<<3|(224&l[o+5])>>5,s=9e4*(a=1024*(1+(3&l[o+6])))/Rt[(60&l[o+2])>>>2],n=o+e,l.byteLength<n)return;if(this.trigger("data",{pts:t.pts+u*s,dts:t.dts+u*s,sampleCount:a,audioobjecttype:1+(l[o+2]>>>6&3),channelcount:(1&l[o+2])<<2|(192&l[o+3])>>>6,samplerate:Rt[(60&l[o+2])>>>2],samplingfrequencyindex:(60&l[o+2])>>>2,samplesize:16,data:l.subarray(o+7+i,n)}),l.byteLength===n)return void(l=void 0);u++,l=l.subarray(n)}else o++},this.flush=function(){this.trigger("done")}}).prototype=new K;var Mt,Bt,Nt,jt=It,Ft=function(n){var r=n.byteLength,a=0,s=0;this.length=function(){return 8*r},this.bitsAvailable=function(){return 8*r+s},this.loadWord=function(){var t=n.byteLength-r,e=new Uint8Array(4),i=Math.min(4,r);if(0===i)throw new Error("no bytes available");e.set(n.subarray(t,t+i)),a=new DataView(e.buffer).getUint32(0),s=8*i,r-=i},this.skipBits=function(t){var e;t<s||(t-=s,t-=8*(e=Math.floor(t/8)),r-=e,this.loadWord()),a<<=t,s-=t},this.readBits=function(t){var e=Math.min(s,t),i=a>>>32-e;return 0<(s-=e)?a<<=e:0<r&&this.loadWord(),0<(e=t-e)?i<<e|this.readBits(e):i},this.skipLeadingZeros=function(){var t;for(t=0;t<s;++t)if(0!=(a&2147483648>>>t))return a<<=t,s-=t,t;return this.loadWord(),t+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var t=this.skipLeadingZeros();return this.readBits(t+1)-1},this.readExpGolomb=function(){var t=this.readUnsignedExpGolomb();return 1&t?1+t>>>1:-1*(t>>>1)},this.readBoolean=function(){return 1===this.readBits(1)},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()};(Bt=function(){var i,n,r=0;Bt.prototype.init.call(this),this.push=function(t){var e;for(n=n?((e=new Uint8Array(n.byteLength+t.data.byteLength)).set(n),e.set(t.data,n.byteLength),e):t.data;r<n.byteLength-3;r++)if(1===n[r+2]){i=r+5;break}for(;i<n.byteLength;)switch(n[i]){case 0:if(0!==n[i-1]){i+=2;break}if(0!==n[i-2]){i++;break}for(r+3!==i-2&&this.trigger("data",n.subarray(r+3,i-2));1!==n[++i]&&i<n.length;);r=i-2,i+=3;break;case 1:if(0!==n[i-1]||0!==n[i-2]){i+=3;break}this.trigger("data",n.subarray(r+3,i-2)),r=i-2,i+=3;break;default:i+=3}n=n.subarray(r),i-=r,r=0},this.flush=function(){n&&3<n.byteLength&&this.trigger("data",n.subarray(r+3)),n=null,r=0,this.trigger("done")}}).prototype=new K,Nt={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},(Mt=function(){var i,n,r,a,s,o,_,e=new Bt;Mt.prototype.init.call(this),(i=this).push=function(t){"video"===t.type&&(n=t.trackId,r=t.pts,a=t.dts,e.push(t))},e.on("data",function(t){var e={trackId:n,pts:r,dts:a,data:t};switch(31&t[0]){case 5:e.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:e.nalUnitType="sei_rbsp",e.escapedRBSP=s(t.subarray(1));break;case 7:e.nalUnitType="seq_parameter_set_rbsp",e.escapedRBSP=s(t.subarray(1)),e.config=o(e.escapedRBSP);break;case 8:e.nalUnitType="pic_parameter_set_rbsp";break;case 9:e.nalUnitType="access_unit_delimiter_rbsp"}i.trigger("data",e)}),e.on("done",function(){i.trigger("done")}),this.flush=function(){e.flush()},_=function(t,e){var i,n=8,r=8;for(i=0;i<t;i++)0!==r&&(r=(n+e.readExpGolomb()+256)%256),n=0===r?n:r},s=function(t){for(var e,i,n=t.byteLength,r=[],a=1;a<n-2;)0===t[a]&&0===t[a+1]&&3===t[a+2]?(r.push(a+2),a+=2):a++;if(0===r.length)return t;e=n-r.length,i=new Uint8Array(e);var s=0;for(a=0;a<e;s++,a++)s===r[0]&&(s++,r.shift()),i[a]=t[s];return i},o=function(t){var e,i,n,r,a,s,o,u,l,c,h,d,p,f=0,m=0,g=0,y=0,v=1;if(i=(e=new Ft(t)).readUnsignedByte(),r=e.readUnsignedByte(),n=e.readUnsignedByte(),e.skipUnsignedExpGolomb(),Nt[i]&&(3===(a=e.readUnsignedExpGolomb())&&e.skipBits(1),e.skipUnsignedExpGolomb(),e.skipUnsignedExpGolomb(),e.skipBits(1),e.readBoolean()))for(h=3!==a?8:12,p=0;p<h;p++)e.readBoolean()&&_(p<6?16:64,e);if(e.skipUnsignedExpGolomb(),0===(s=e.readUnsignedExpGolomb()))e.readUnsignedExpGolomb();else if(1===s)for(e.skipBits(1),e.skipExpGolomb(),e.skipExpGolomb(),o=e.readUnsignedExpGolomb(),p=0;p<o;p++)e.skipExpGolomb();if(e.skipUnsignedExpGolomb(),e.skipBits(1),u=e.readUnsignedExpGolomb(),l=e.readUnsignedExpGolomb(),0===(c=e.readBits(1))&&e.skipBits(1),e.skipBits(1),e.readBoolean()&&(f=e.readUnsignedExpGolomb(),m=e.readUnsignedExpGolomb(),g=e.readUnsignedExpGolomb(),y=e.readUnsignedExpGolomb()),e.readBoolean()&&e.readBoolean()){switch(e.readUnsignedByte()){case 1:d=[1,1];break;case 2:d=[12,11];break;case 3:d=[10,11];break;case 4:d=[16,11];break;case 5:d=[40,33];break;case 6:d=[24,11];break;case 7:d=[20,11];break;case 8:d=[32,11];break;case 9:d=[80,33];break;case 10:d=[18,11];break;case 11:d=[15,11];break;case 12:d=[64,33];break;case 13:d=[160,99];break;case 14:d=[4,3];break;case 15:d=[3,2];break;case 16:d=[2,1];break;case 255:d=[e.readUnsignedByte()<<8|e.readUnsignedByte(),e.readUnsignedByte()<<8|e.readUnsignedByte()]}d&&(v=d[0]/d[1])}return{profileIdc:i,levelIdc:n,profileCompatibility:r,width:Math.ceil((16*(u+1)-2*f-2*m)*v),height:(2-c)*(l+1)*16-2*g-2*y}}}).prototype=new K;var Vt,Ht={H264Stream:Mt,NalByteStream:Bt};(Vt=function(){var o=new Uint8Array,u=0;Vt.prototype.init.call(this),this.setTimestamp=function(t){u=t},this.parseId3TagSize=function(t,e){var i=t[e+6]<<21|t[e+7]<<14|t[e+8]<<7|t[e+9];return(16&t[e+5])>>4?i+20:i+10},this.parseAdtsSize=function(t,e){var i=(224&t[e+5])>>5,n=t[e+4]<<3;return 6144&t[e+3]|n|i},this.push=function(t){var e,i,n,r,a=0,s=0;for(o.length?(r=o.length,(o=new Uint8Array(t.byteLength+r)).set(o.subarray(0,r)),o.set(t,r)):o=t;3<=o.length-s;)if(o[s]!=="I".charCodeAt(0)||o[s+1]!=="D".charCodeAt(0)||o[s+2]!=="3".charCodeAt(0))if(!0&o[s]&&240==(240&o[s+1])){if(o.length-s<7)break;if((a=this.parseAdtsSize(o,s))>o.length)break;n={type:"audio",data:o.subarray(s,s+a),pts:u,dts:u},this.trigger("data",n),s+=a}else s++;else{if(o.length-s<10)break;if((a=this.parseId3TagSize(o,s))>o.length)break;i={type:"timed-metadata",data:o.subarray(s,s+a)},this.trigger("data",i),s+=a}e=o.length-s,o=0<e?o.subarray(s):new Uint8Array}}).prototype=new K;var qt,zt,Wt,Gt,Xt,Yt,$t,Kt=Vt,Qt=[33,16,5,32,164,27],Jt=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],Zt=function(t){for(var e=[];t--;)e.push(0);return e},te={96e3:[Qt,[227,64],Zt(154),[56]],88200:[Qt,[231],Zt(170),[56]],64e3:[Qt,[248,192],Zt(240),[56]],48e3:[Qt,[255,192],Zt(268),[55,148,128],Zt(54),[112]],44100:[Qt,[255,192],Zt(268),[55,163,128],Zt(84),[112]],32e3:[Qt,[255,192],Zt(268),[55,234],Zt(226),[112]],24e3:[Qt,[255,192],Zt(268),[55,255,128],Zt(268),[111,112],Zt(126),[224]],16e3:[Qt,[255,192],Zt(268),[55,255,128],Zt(268),[111,255],Zt(269),[223,108],Zt(195),[1,192]],12e3:[Jt,Zt(268),[3,127,248],Zt(268),[6,255,240],Zt(268),[13,255,224],Zt(268),[27,253,128],Zt(259),[56]],11025:[Jt,Zt(268),[3,127,248],Zt(268),[6,255,240],Zt(268),[13,255,224],Zt(268),[27,255,192],Zt(268),[55,175,128],Zt(108),[112]],8e3:[Jt,Zt(268),[3,121,16],Zt(47),[7]]},ee=(qt=te,Object.keys(qt).reduce(function(t,e){return t[e]=new Uint8Array(qt[e].reduce(function(t,e){return t.concat(e)},[])),t},{}));Yt=function(t,e){return zt(Xt(t,e))},$t=function(t,e){return Wt(Gt(t),e)};zt=function(t){return 9e4*t},Wt=function(t,e){return t*e},Gt=function(t){return t/9e4},Xt=function(t,e){return t/e};var ie,ne,re,ae,se,oe,ue,le=Yt,ce=$t,he=Ht.H264Stream,de=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],pe=["width","height","profileIdc","levelIdc","profileCompatibility"];se=function(t){return t[0]==="I".charCodeAt(0)&&t[1]==="D".charCodeAt(0)&&t[2]==="3".charCodeAt(0)},oe=function(t,e){var i;if(t.length!==e.length)return!1;for(i=0;i<t.length;i++)if(t[i]!==e[i])return!1;return!0},ue=function(t){var e,i=0;for(e=0;e<t.length;e++)i+=t[e].data.byteLength;return i},(ne=function(r,a){var s=[],o=0,e=0,l=0,c=1/0;a=a||{},ne.prototype.init.call(this),this.push=function(e){rt(r,e),r&&de.forEach(function(t){r[t]=e[t]}),s.push(e)},this.setEarliestDts=function(t){e=t-r.timelineStartInfo.baseMediaDecodeTime},this.setVideoBaseMediaDecodeTime=function(t){c=t},this.setAudioAppendStart=function(t){l=t},this.flush=function(){var t,e,i,n;0!==s.length&&(t=this.trimAdtsFramesByEarliestDts_(s),r.baseMediaDecodeTime=nt(r,a.keepOriginalTimestamps),this.prefixWithSilence_(r,t),r.samples=this.generateSampleTable_(t),i=G.mdat(this.concatenateFrameData_(t)),s=[],e=G.moof(o,[r]),n=new Uint8Array(e.byteLength+i.byteLength),o++,n.set(e),n.set(i,e.byteLength),it(r),this.trigger("data",{track:r,boxes:n})),this.trigger("done","AudioSegmentStream")},this.prefixWithSilence_=function(t,e){var i,n,r,a,s=0,o=0,u=0;if(e.length&&(i=le(t.baseMediaDecodeTime,t.samplerate),n=Math.ceil(9e4/(t.samplerate/1024)),l&&c&&(s=i-Math.max(l,c),u=(o=Math.floor(s/n))*n),!(o<1||45e3<u))){for((r=ee[t.samplerate])||(r=e[0].data),a=0;a<o;a++)e.splice(a,0,{data:r});t.baseMediaDecodeTime-=Math.floor(ce(u,t.samplerate))}},this.trimAdtsFramesByEarliestDts_=function(t){return r.minSegmentDts>=e?t:(r.minSegmentDts=1/0,t.filter(function(t){return t.dts>=e&&(r.minSegmentDts=Math.min(r.minSegmentDts,t.dts),r.minSegmentPts=r.minSegmentDts,!0)}))},this.generateSampleTable_=function(t){var e,i,n=[];for(e=0;e<t.length;e++)i=t[e],n.push({size:i.data.byteLength,duration:1024});return n},this.concatenateFrameData_=function(t){var e,i,n=0,r=new Uint8Array(ue(t));for(e=0;e<t.length;e++)i=t[e],r.set(i.data,n),n+=i.data.byteLength;return r}}).prototype=new K,(ie=function(o,u){var e,i,l=0,c=[],h=[];u=u||{},ie.prototype.init.call(this),delete o.minPTS,this.gopCache_=[],this.push=function(t){rt(o,t),"seq_parameter_set_rbsp"!==t.nalUnitType||e||(e=t.config,o.sps=[t.data],pe.forEach(function(t){o[t]=e[t]},this)),"pic_parameter_set_rbsp"!==t.nalUnitType||i||(i=t.data,o.pps=[t.data]),c.push(t)},this.flush=function(){for(var t,e,i,n,r,a;c.length&&"access_unit_delimiter_rbsp"!==c[0].nalUnitType;)c.shift();if(0===c.length)return this.resetStream_(),void this.trigger("done","VideoSegmentStream");if(t=Q(c),(i=J(t))[0][0].keyFrame||((e=this.getGopForFusion_(c[0],o))?(i.unshift(e),i.byteLength+=e.byteLength,i.nalCount+=e.nalCount,i.pts=e.pts,i.dts=e.dts,i.duration+=e.duration):i=Z(i)),h.length){var s;if(!(s=u.alignGopsAtEnd?this.alignGopsAtEnd_(i):this.alignGopsAtStart_(i)))return this.gopCache_.unshift({gop:i.pop(),pps:o.pps,sps:o.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),c=[],this.resetStream_(),void this.trigger("done","VideoSegmentStream");it(o),i=s}rt(o,i),o.samples=tt(i),r=G.mdat(et(i)),o.baseMediaDecodeTime=nt(o,u.keepOriginalTimestamps),this.trigger("processedGopsInfo",i.map(function(t){return{pts:t.pts,dts:t.dts,byteLength:t.byteLength}})),this.gopCache_.unshift({gop:i.pop(),pps:o.pps,sps:o.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),c=[],this.trigger("baseMediaDecodeTime",o.baseMediaDecodeTime),this.trigger("timelineStartInfo",o.timelineStartInfo),n=G.moof(l,[o]),a=new Uint8Array(n.byteLength+r.byteLength),l++,a.set(n),a.set(r,n.byteLength),this.trigger("data",{track:o,boxes:a}),this.resetStream_(),this.trigger("done","VideoSegmentStream")},this.resetStream_=function(){it(o),i=e=void 0},this.getGopForFusion_=function(t){var e,i,n,r,a,s=1/0;for(a=0;a<this.gopCache_.length;a++)n=(r=this.gopCache_[a]).gop,o.pps&&oe(o.pps[0],r.pps[0])&&o.sps&&oe(o.sps[0],r.sps[0])&&(n.dts<o.timelineStartInfo.dts||-1e4<=(e=t.dts-n.dts-n.duration)&&e<=45e3&&(!i||e<s)&&(i=r,s=e));return i?i.gop:null},this.alignGopsAtStart_=function(t){var e,i,n,r,a,s,o,u;for(a=t.byteLength,s=t.nalCount,o=t.duration,e=i=0;e<h.length&&i<t.length&&(n=h[e],r=t[i],n.pts!==r.pts);)r.pts>n.pts?e++:(i++,a-=r.byteLength,s-=r.nalCount,o-=r.duration);return 0===i?t:i===t.length?null:((u=t.slice(i)).byteLength=a,u.duration=o,u.nalCount=s,u.pts=u[0].pts,u.dts=u[0].dts,u)},this.alignGopsAtEnd_=function(t){var e,i,n,r,a,s,o;for(e=h.length-1,i=t.length-1,a=null,s=!1;0<=e&&0<=i;){if(n=h[e],r=t[i],n.pts===r.pts){s=!0;break}n.pts>r.pts?e--:(e===h.length-1&&(a=i),i--)}if(!s&&null===a)return null;if(0===(o=s?i:a))return t;var u=t.slice(o),l=u.reduce(function(t,e){return t.byteLength+=e.byteLength,t.duration+=e.duration,t.nalCount+=e.nalCount,t},{byteLength:0,duration:0,nalCount:0});return u.byteLength=l.byteLength,u.duration=l.duration,u.nalCount=l.nalCount,u.pts=u[0].pts,u.dts=u[0].dts,u},this.alignGopsWith=function(t){h=t}}).prototype=new K,(ae=function(t,e){this.numberOfTracks=0,this.metadataStream=e,"undefined"!=typeof t.remux?this.remuxTracks=!!t.remux:this.remuxTracks=!0,this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,ae.prototype.init.call(this),this.push=function(t){return t.text?this.pendingCaptions.push(t):t.frames?this.pendingMetadata.push(t):(this.pendingTracks.push(t.track),this.pendingBoxes.push(t.boxes),this.pendingBytes+=t.boxes.byteLength,"video"===t.track.type&&(this.videoTrack=t.track),void("audio"===t.track.type&&(this.audioTrack=t.track)))}}).prototype=new K,ae.prototype.flush=function(t){var e,i,n,r,a=0,s={captions:[],captionStreams:{},metadata:[],info:{}},o=0;if(this.pendingTracks.length<this.numberOfTracks){if("VideoSegmentStream"!==t&&"AudioSegmentStream"!==t)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?(o=this.videoTrack.timelineStartInfo.pts,pe.forEach(function(t){s.info[t]=this.videoTrack[t]},this)):this.audioTrack&&(o=this.audioTrack.timelineStartInfo.pts,de.forEach(function(t){s.info[t]=this.audioTrack[t]},this)),1===this.pendingTracks.length?s.type=this.pendingTracks[0].type:s.type="combined",this.emittedTracks+=this.pendingTracks.length,n=G.initSegment(this.pendingTracks),s.initSegment=new Uint8Array(n.byteLength),s.initSegment.set(n),s.data=new Uint8Array(this.pendingBytes),r=0;r<this.pendingBoxes.length;r++)s.data.set(this.pendingBoxes[r],a),a+=this.pendingBoxes[r].byteLength;for(r=0;r<this.pendingCaptions.length;r++)(e=this.pendingCaptions[r]).startTime=e.startPts-o,e.startTime/=9e4,e.endTime=e.endPts-o,e.endTime/=9e4,s.captionStreams[e.stream]=!0,s.captions.push(e);for(r=0;r<this.pendingMetadata.length;r++)(i=this.pendingMetadata[r]).cueTime=i.pts-o,i.cueTime/=9e4,s.metadata.push(i);s.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",s),this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},(re=function(n){var r,a,s=this,i=!0;re.prototype.init.call(this),n=n||{},this.baseMediaDecodeTime=n.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var e={};(this.transmuxPipeline_=e).type="aac",e.metadataStream=new Dt.MetadataStream,e.aacStream=new Kt,e.audioTimestampRolloverStream=new Dt.TimestampRolloverStream("audio"),e.timedMetadataTimestampRolloverStream=new Dt.TimestampRolloverStream("timed-metadata"),e.adtsStream=new jt,e.coalesceStream=new ae(n,e.metadataStream),e.headOfPipeline=e.aacStream,e.aacStream.pipe(e.audioTimestampRolloverStream).pipe(e.adtsStream),e.aacStream.pipe(e.timedMetadataTimestampRolloverStream).pipe(e.metadataStream).pipe(e.coalesceStream),e.metadataStream.on("timestamp",function(t){e.aacStream.setTimestamp(t.timeStamp)}),e.aacStream.on("data",function(t){"timed-metadata"!==t.type||e.audioSegmentStream||(a=a||{timelineStartInfo:{baseMediaDecodeTime:s.baseMediaDecodeTime},codec:"adts",type:"audio"},e.coalesceStream.numberOfTracks++,e.audioSegmentStream=new ne(a,n),e.adtsStream.pipe(e.audioSegmentStream).pipe(e.coalesceStream))}),e.coalesceStream.on("data",this.trigger.bind(this,"data")),e.coalesceStream.on("done",this.trigger.bind(this,"done"))},this.setupTsPipeline=function(){var i={};(this.transmuxPipeline_=i).type="ts",i.metadataStream=new Dt.MetadataStream,i.packetStream=new Dt.TransportPacketStream,i.parseStream=new Dt.TransportParseStream,i.elementaryStream=new Dt.ElementaryStream,i.videoTimestampRolloverStream=new Dt.TimestampRolloverStream("video"),i.audioTimestampRolloverStream=new Dt.TimestampRolloverStream("audio"),i.timedMetadataTimestampRolloverStream=new Dt.TimestampRolloverStream("timed-metadata"),i.adtsStream=new jt,i.h264Stream=new he,i.captionStream=new Dt.CaptionStream,i.coalesceStream=new ae(n,i.metadataStream),i.headOfPipeline=i.packetStream,i.packetStream.pipe(i.parseStream).pipe(i.elementaryStream),i.elementaryStream.pipe(i.videoTimestampRolloverStream).pipe(i.h264Stream),i.elementaryStream.pipe(i.audioTimestampRolloverStream).pipe(i.adtsStream),i.elementaryStream.pipe(i.timedMetadataTimestampRolloverStream).pipe(i.metadataStream).pipe(i.coalesceStream),i.h264Stream.pipe(i.captionStream).pipe(i.coalesceStream),i.elementaryStream.on("data",function(t){var e;if("metadata"===t.type){for(e=t.tracks.length;e--;)r||"video"!==t.tracks[e].type?a||"audio"!==t.tracks[e].type||((a=t.tracks[e]).timelineStartInfo.baseMediaDecodeTime=s.baseMediaDecodeTime):(r=t.tracks[e]).timelineStartInfo.baseMediaDecodeTime=s.baseMediaDecodeTime;r&&!i.videoSegmentStream&&(i.coalesceStream.numberOfTracks++,i.videoSegmentStream=new ie(r,n),i.videoSegmentStream.on("timelineStartInfo",function(t){a&&(a.timelineStartInfo=t,i.audioSegmentStream.setEarliestDts(t.dts))}),i.videoSegmentStream.on("processedGopsInfo",s.trigger.bind(s,"gopInfo")),i.videoSegmentStream.on("baseMediaDecodeTime",function(t){a&&i.audioSegmentStream.setVideoBaseMediaDecodeTime(t)}),i.h264Stream.pipe(i.videoSegmentStream).pipe(i.coalesceStream)),a&&!i.audioSegmentStream&&(i.coalesceStream.numberOfTracks++,i.audioSegmentStream=new ne(a,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.setBaseMediaDecodeTime=function(t){var e=this.transmuxPipeline_;this.baseMediaDecodeTime=t,a&&(a.timelineStartInfo.dts=void 0,a.timelineStartInfo.pts=void 0,it(a),a.timelineStartInfo.baseMediaDecodeTime=t,e.audioTimestampRolloverStream&&e.audioTimestampRolloverStream.discontinuity()),r&&(e.videoSegmentStream&&(e.videoSegmentStream.gopCache_=[],e.videoTimestampRolloverStream.discontinuity()),r.timelineStartInfo.dts=void 0,r.timelineStartInfo.pts=void 0,it(r),e.captionStream.reset(),r.timelineStartInfo.baseMediaDecodeTime=t),e.timedMetadataTimestampRolloverStream&&e.timedMetadataTimestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(t){a&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(t)},this.alignGopsWith=function(t){r&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(t)},this.push=function(t){if(i){var e=se(t);e&&"aac"!==this.transmuxPipeline_.type?this.setupAacPipeline():e||"ts"===this.transmuxPipeline_.type||this.setupTsPipeline(),i=!1}this.transmuxPipeline_.headOfPipeline.push(t)},this.flush=function(){i=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}}).prototype=new K;var fe,me,ge={Transmuxer:re,VideoSegmentStream:ie,AudioSegmentStream:ne,AUDIO_PROPERTIES:de,VIDEO_PROPERTIES:pe},ye=Y.parseType,ve=function(t){return new Date(1e3*t-20828448e5)},_e=function(t){return{isLeading:(12&t[0])>>>2,dependsOn:3&t[0],isDependedOn:(192&t[1])>>>6,hasRedundancy:(48&t[1])>>>4,paddingValue:(14&t[1])>>>1,isNonSyncSample:1&t[1],degradationPriority:t[2]<<8|t[3]}},be={avc1:function(t){var e=new DataView(t.buffer,t.byteOffset,t.byteLength);return{dataReferenceIndex:e.getUint16(6),width:e.getUint16(24),height:e.getUint16(26),horizresolution:e.getUint16(28)+e.getUint16(30)/16,vertresolution:e.getUint16(32)+e.getUint16(34)/16,frameCount:e.getUint16(40),depth:e.getUint16(74),config:fe(t.subarray(78,t.byteLength))}},avcC:function(t){var e,i,n,r,a=new DataView(t.buffer,t.byteOffset,t.byteLength),s={configurationVersion:t[0],avcProfileIndication:t[1],profileCompatibility:t[2],avcLevelIndication:t[3],lengthSizeMinusOne:3&t[4],sps:[],pps:[]},o=31&t[5];for(n=6,r=0;r<o;r++)i=a.getUint16(n),n+=2,s.sps.push(new Uint8Array(t.subarray(n,n+i))),n+=i;for(e=t[n],n++,r=0;r<e;r++)i=a.getUint16(n),n+=2,s.pps.push(new Uint8Array(t.subarray(n,n+i))),n+=i;return s},btrt:function(t){var e=new DataView(t.buffer,t.byteOffset,t.byteLength);return{bufferSizeDB:e.getUint32(0),maxBitrate:e.getUint32(4),avgBitrate:e.getUint32(8)}},esds:function(t){return{version:t[0],flags:new Uint8Array(t.subarray(1,4)),esId:t[6]<<8|t[7],streamPriority:31&t[8],decoderConfig:{objectProfileIndication:t[11],streamType:t[12]>>>2&63,bufferSize:t[13]<<16|t[14]<<8|t[15],maxBitrate:t[16]<<24|t[17]<<16|t[18]<<8|t[19],avgBitrate:t[20]<<24|t[21]<<16|t[22]<<8|t[23],decoderConfigDescriptor:{tag:t[24],length:t[25],audioObjectType:t[26]>>>3&31,samplingFrequencyIndex:(7&t[26])<<1|t[27]>>>7&1,channelConfiguration:t[27]>>>3&15}}}},ftyp:function(t){for(var e=new DataView(t.buffer,t.byteOffset,t.byteLength),i={majorBrand:ye(t.subarray(0,4)),minorVersion:e.getUint32(4),compatibleBrands:[]},n=8;n<t.byteLength;)i.compatibleBrands.push(ye(t.subarray(n,n+4))),n+=4;return i},dinf:function(t){return{boxes:fe(t)}},dref:function(t){return{version:t[0],flags:new Uint8Array(t.subarray(1,4)),dataReferences:fe(t.subarray(8))}},hdlr:function(t){var e={version:new DataView(t.buffer,t.byteOffset,t.byteLength).getUint8(0),flags:new Uint8Array(t.subarray(1,4)),handlerType:ye(t.subarray(8,12)),name:""},i=8;for(i=24;i<t.byteLength;i++){if(0===t[i]){i++;break}e.name+=String.fromCharCode(t[i])}return e.name=decodeURIComponent(escape(e.name)),e},mdat:function(t){return{byteLength:t.byteLength,nals:function(t){var e,i,n=new DataView(t.buffer,t.byteOffset,t.byteLength),r=[];for(e=0;e+4<t.length;e+=i)if(i=n.getUint32(e),e+=4,i<=0)r.push("<span style='color:red;'>MALFORMED DATA</span>");else switch(31&t[e]){case 1:r.push("slice_layer_without_partitioning_rbsp");break;case 5:r.push("slice_layer_without_partitioning_rbsp_idr");break;case 6:r.push("sei_rbsp");break;case 7:r.push("seq_parameter_set_rbsp");break;case 8:r.push("pic_parameter_set_rbsp");break;case 9:r.push("access_unit_delimiter_rbsp");break;default:r.push("UNKNOWN NAL - "+t[e]&31)}return r}(t)}},mdhd:function(t){var e,i=new DataView(t.buffer,t.byteOffset,t.byteLength),n=4,r={version:i.getUint8(0),flags:new Uint8Array(t.subarray(1,4)),language:""};return 1===r.version?(n+=4,r.creationTime=ve(i.getUint32(n)),n+=8,r.modificationTime=ve(i.getUint32(n)),n+=4,r.timescale=i.getUint32(n),n+=8):(r.creationTime=ve(i.getUint32(n)),n+=4,r.modificationTime=ve(i.getUint32(n)),n+=4,r.timescale=i.getUint32(n),n+=4),r.duration=i.getUint32(n),n+=4,e=i.getUint16(n),r.language+=String.fromCharCode(96+(e>>10)),r.language+=String.fromCharCode(96+((992&e)>>5)),r.language+=String.fromCharCode(96+(31&e)),r},mdia:function(t){return{boxes:fe(t)}},mfhd:function(t){return{version:t[0],flags:new Uint8Array(t.subarray(1,4)),sequenceNumber:t[4]<<24|t[5]<<16|t[6]<<8|t[7]}},minf:function(t){return{boxes:fe(t)}},mp4a:function(t){var e=new DataView(t.buffer,t.byteOffset,t.byteLength),i={dataReferenceIndex:e.getUint16(6),channelcount:e.getUint16(16),samplesize:e.getUint16(18),samplerate:e.getUint16(24)+e.getUint16(26)/65536};return 28<t.byteLength&&(i.streamDescriptor=fe(t.subarray(28))[0]),i},moof:function(t){return{boxes:fe(t)}},moov:function(t){return{boxes:fe(t)}},mvex:function(t){return{boxes:fe(t)}},mvhd:function(t){var e=new DataView(t.buffer,t.byteOffset,t.byteLength),i=4,n={version:e.getUint8(0),flags:new Uint8Array(t.subarray(1,4))};return 1===n.version?(i+=4,n.creationTime=ve(e.getUint32(i)),i+=8,n.modificationTime=ve(e.getUint32(i)),i+=4,n.timescale=e.getUint32(i),i+=8):(n.creationTime=ve(e.getUint32(i)),i+=4,n.modificationTime=ve(e.getUint32(i)),i+=4,n.timescale=e.getUint32(i),i+=4),n.duration=e.getUint32(i),i+=4,n.rate=e.getUint16(i)+e.getUint16(i+2)/16,i+=4,n.volume=e.getUint8(i)+e.getUint8(i+1)/8,i+=2,i+=2,i+=8,n.matrix=new Uint32Array(t.subarray(i,i+36)),i+=36,i+=24,n.nextTrackId=e.getUint32(i),n},pdin:function(t){var e=new DataView(t.buffer,t.byteOffset,t.byteLength);return{version:e.getUint8(0),flags:new Uint8Array(t.subarray(1,4)),rate:e.getUint32(4),initialDelay:e.getUint32(8)}},sdtp:function(t){var e,i={version:t[0],flags:new Uint8Array(t.subarray(1,4)),samples:[]};for(e=4;e<t.byteLength;e++)i.samples.push({dependsOn:(48&t[e])>>4,isDependedOn:(12&t[e])>>2,hasRedundancy:3&t[e]});return i},sidx:function(t){var e,i=new DataView(t.buffer,t.byteOffset,t.byteLength),n={version:t[0],flags:new Uint8Array(t.subarray(1,4)),references:[],referenceId:i.getUint32(4),timescale:i.getUint32(8),earliestPresentationTime:i.getUint32(12),firstOffset:i.getUint32(16)},r=i.getUint16(22);for(e=24;r;e+=12,r--)n.references.push({referenceType:(128&t[e])>>>7,referencedSize:2147483647&i.getUint32(e),subsegmentDuration:i.getUint32(e+4),startsWithSap:!!(128&t[e+8]),sapType:(112&t[e+8])>>>4,sapDeltaTime:268435455&i.getUint32(e+8)});return n},smhd:function(t){return{version:t[0],flags:new Uint8Array(t.subarray(1,4)),balance:t[4]+t[5]/256}},stbl:function(t){return{boxes:fe(t)}},stco:function(t){var e,i=new DataView(t.buffer,t.byteOffset,t.byteLength),n={version:t[0],flags:new Uint8Array(t.subarray(1,4)),chunkOffsets:[]},r=i.getUint32(4);for(e=8;r;e+=4,r--)n.chunkOffsets.push(i.getUint32(e));return n},stsc:function(t){var e,i=new DataView(t.buffer,t.byteOffset,t.byteLength),n=i.getUint32(4),r={version:t[0],flags:new Uint8Array(t.subarray(1,4)),sampleToChunks:[]};for(e=8;n;e+=12,n--)r.sampleToChunks.push({firstChunk:i.getUint32(e),samplesPerChunk:i.getUint32(e+4),sampleDescriptionIndex:i.getUint32(e+8)});return r},stsd:function(t){return{version:t[0],flags:new Uint8Array(t.subarray(1,4)),sampleDescriptions:fe(t.subarray(8))}},stsz:function(t){var e,i=new DataView(t.buffer,t.byteOffset,t.byteLength),n={version:t[0],flags:new Uint8Array(t.subarray(1,4)),sampleSize:i.getUint32(4),entries:[]};for(e=12;e<t.byteLength;e+=4)n.entries.push(i.getUint32(e));return n},stts:function(t){var e,i=new DataView(t.buffer,t.byteOffset,t.byteLength),n={version:t[0],flags:new Uint8Array(t.subarray(1,4)),timeToSamples:[]},r=i.getUint32(4);for(e=8;r;e+=8,r--)n.timeToSamples.push({sampleCount:i.getUint32(e),sampleDelta:i.getUint32(e+4)});return n},styp:function(t){return be.ftyp(t)},tfdt:function(t){var e={version:t[0],flags:new Uint8Array(t.subarray(1,4)),baseMediaDecodeTime:t[4]<<24|t[5]<<16|t[6]<<8|t[7]};return 1===e.version&&(e.baseMediaDecodeTime*=Math.pow(2,32),e.baseMediaDecodeTime+=t[8]<<24|t[9]<<16|t[10]<<8|t[11]),e},tfhd:function(t){var e,i=new DataView(t.buffer,t.byteOffset,t.byteLength),n={version:t[0],flags:new Uint8Array(t.subarray(1,4)),trackId:i.getUint32(4)},r=1&n.flags[2],a=2&n.flags[2],s=8&n.flags[2],o=16&n.flags[2],u=32&n.flags[2],l=65536&n.flags[0],c=131072&n.flags[0];return e=8,r&&(e+=4,n.baseDataOffset=i.getUint32(12),e+=4),a&&(n.sampleDescriptionIndex=i.getUint32(e),e+=4),s&&(n.defaultSampleDuration=i.getUint32(e),e+=4),o&&(n.defaultSampleSize=i.getUint32(e),e+=4),u&&(n.defaultSampleFlags=i.getUint32(e)),l&&(n.durationIsEmpty=!0),!r&&c&&(n.baseDataOffsetIsMoof=!0),n},tkhd:function(t){var e=new DataView(t.buffer,t.byteOffset,t.byteLength),i=4,n={version:e.getUint8(0),flags:new Uint8Array(t.subarray(1,4))};return 1===n.version?(i+=4,n.creationTime=ve(e.getUint32(i)),i+=8,n.modificationTime=ve(e.getUint32(i)),i+=4,n.trackId=e.getUint32(i),i+=4,i+=8):(n.creationTime=ve(e.getUint32(i)),i+=4,n.modificationTime=ve(e.getUint32(i)),i+=4,n.trackId=e.getUint32(i),i+=4,i+=4),n.duration=e.getUint32(i),i+=4,i+=8,n.layer=e.getUint16(i),i+=2,n.alternateGroup=e.getUint16(i),i+=2,n.volume=e.getUint8(i)+e.getUint8(i+1)/8,i+=2,i+=2,n.matrix=new Uint32Array(t.subarray(i,i+36)),i+=36,n.width=e.getUint16(i)+e.getUint16(i+2)/16,i+=4,n.height=e.getUint16(i)+e.getUint16(i+2)/16,n},traf:function(t){return{boxes:fe(t)}},trak:function(t){return{boxes:fe(t)}},trex:function(t){var e=new DataView(t.buffer,t.byteOffset,t.byteLength);return{version:t[0],flags:new Uint8Array(t.subarray(1,4)),trackId:e.getUint32(4),defaultSampleDescriptionIndex:e.getUint32(8),defaultSampleDuration:e.getUint32(12),defaultSampleSize:e.getUint32(16),sampleDependsOn:3&t[20],sampleIsDependedOn:(192&t[21])>>6,sampleHasRedundancy:(48&t[21])>>4,samplePaddingValue:(14&t[21])>>1,sampleIsDifferenceSample:!!(1&t[21]),sampleDegradationPriority:e.getUint16(22)}},trun:function(t){var e,i={version:t[0],flags:new Uint8Array(t.subarray(1,4)),samples:[]},n=new DataView(t.buffer,t.byteOffset,t.byteLength),r=1&i.flags[2],a=4&i.flags[2],s=1&i.flags[1],o=2&i.flags[1],u=4&i.flags[1],l=8&i.flags[1],c=n.getUint32(4),h=8;for(r&&(i.dataOffset=n.getInt32(h),h+=4),a&&c&&(e={flags:_e(t.subarray(h,h+4))},h+=4,s&&(e.duration=n.getUint32(h),h+=4),o&&(e.size=n.getUint32(h),h+=4),l&&(e.compositionTimeOffset=n.getUint32(h),h+=4),i.samples.push(e),c--);c--;)e={},s&&(e.duration=n.getUint32(h),h+=4),o&&(e.size=n.getUint32(h),h+=4),u&&(e.flags=_e(t.subarray(h,h+4)),h+=4),l&&(e.compositionTimeOffset=n.getUint32(h),h+=4),i.samples.push(e);return i},"url ":function(t){return{version:t[0],flags:new Uint8Array(t.subarray(1,4))}},vmhd:function(t){var e=new DataView(t.buffer,t.byteOffset,t.byteLength);return{version:t[0],flags:new Uint8Array(t.subarray(1,4)),graphicsmode:e.getUint16(4),opcolor:new Uint16Array([e.getUint16(6),e.getUint16(8),e.getUint16(10)])}}},Te={inspect:fe=function(t){for(var e,i,n,r,a,s=0,o=[],u=new ArrayBuffer(t.length),l=new Uint8Array(u),c=0;c<t.length;++c)l[c]=t[c];for(e=new DataView(u);s<t.byteLength;)i=e.getUint32(s),n=ye(t.subarray(s+4,s+8)),r=1<i?s+i:t.byteLength,(a=(be[n]||function(t){return{data:t}})(t.subarray(s+8,r))).size=i,a.type=n,o.push(a),s=r;return o},textify:me=function(t,e){var a;return e=e||0,a=new Array(2*e+1).join(" "),t.map(function(r,t){return a+r.type+"\n"+Object.keys(r).filter(function(t){return"type"!==t&&"boxes"!==t}).map(function(t){var e=a+"  "+t+": ",i=r[t];if(i instanceof Uint8Array||i instanceof Uint32Array){var n=Array.prototype.slice.call(new Uint8Array(i.buffer,i.byteOffset,i.byteLength)).map(function(t){return" "+("00"+t.toString(16)).slice(-2)}).join("").match(/.{1,24}/g);return n?1===n.length?e+"<"+n.join("").slice(1)+">":e+"<\n"+n.map(function(t){return a+"  "+t}).join("\n")+"\n"+a+"  >":e+"<>"}return e+JSON.stringify(i,null,2).split("\n").map(function(t,e){return 0===e?t:a+"  "+t}).join("\n")}).join("\n")+(r.boxes?"\n"+me(r.boxes,e+1):"")}).join("\n")},parseTfdt:be.tfdt,parseHdlr:be.hdlr,parseTfhd:be.tfhd,parseTrun:be.trun},Se=ut,ke=gt.CaptionStream,we=function(t,e){for(var i=t,n=0;n<e.length;n++){var r=e[n];if(i<r.size)return r;i-=r.size}return null},Ce=function(t,y){var n=Y.findBox(t,["moof","traf"]),e=Y.findBox(t,["mdat"]),v={},r=[];return e.forEach(function(t,e){var i=n[e];r.push({mdat:t,traf:i})}),r.forEach(function(t){var e,i,n,r,a,s,o,u,l=t.mdat,c=t.traf,h=Y.findBox(c,["tfhd"]),d=Te.parseTfhd(h[0]),p=d.trackId,f=Y.findBox(c,["tfdt"]),m=0<f.length?Te.parseTfdt(f[0]).baseMediaDecodeTime:0,g=Y.findBox(c,["trun"]);y===p&&0<g.length&&(i=g,r=m,a=(n=d).defaultSampleDuration||0,s=n.defaultSampleSize||0,o=n.trackId,u=[],i.forEach(function(t){var e=Te.parseTrun(t).samples;e.forEach(function(t){void 0===t.duration&&(t.duration=a),void 0===t.size&&(t.size=s),t.trackId=o,t.dts=r,void 0===t.compositionTimeOffset&&(t.compositionTimeOffset=0),t.pts=r+t.compositionTimeOffset,r+=t.duration}),u=u.concat(e)}),e=function(t,e,i){var n,r,a,s,o=new DataView(t.buffer,t.byteOffset,t.byteLength),u=[];for(r=0;r+4<t.length;r+=a)if(a=o.getUint32(r),r+=4,!(a<=0))switch(31&t[r]){case 6:var l=t.subarray(r+1,r+1+a),c=we(r,e);n={nalUnitType:"sei_rbsp",size:a,data:l,escapedRBSP:Se(l),trackId:i},c?(n.pts=c.pts,n.dts=c.dts,s=c):(n.pts=s.pts,n.dts=s.dts),u.push(n)}return u}(l,u,p),v[p]||(v[p]=[]),v[p]=v[p].concat(e))}),v},Ee={generator:G,probe:Y,Transmuxer:ge.Transmuxer,AudioSegmentStream:ge.AudioSegmentStream,VideoSegmentStream:ge.VideoSegmentStream,CaptionParser:function(){var e,u,l,c,h,t=!1;this.isInitialized=function(){return t},this.init=function(){e=new ke,t=!0,e.on("data",function(t){t.startTime=t.startPts/c,t.endTime=t.endPts/c,h.captions.push(t),h.captionStreams[t.stream]=!0})},this.isNewInit=function(t,e){return!(t&&0===t.length||e&&"object"==typeof e&&0===Object.keys(e).length||l===t[0]&&c===e[l])},this.parse=function(t,e,i){var n,r,a,s;if(!this.isInitialized())return null;if(!e||!i)return null;if(this.isNewInit(e,i))l=e[0],c=i[l];else if(!l||!c)return u.push(t),null;for(;0<u.length;){var o=u.shift();this.parse(o,e,i)}return r=t,s=c,null!==(n=(a=l)?{seiNals:Ce(r,a)[a],timescale:s}:null)&&n.seiNals?(this.pushNals(n.seiNals),this.flushStream(),h):null},this.pushNals=function(t){if(!this.isInitialized()||!t||0===t.length)return null;t.forEach(function(t){e.push(t)})},this.flushStream=function(){if(!this.isInitialized())return null;e.flush()},this.clearParsedCaptions=function(){h.captions=[],h.captionStreams={}},this.resetCaptionStream=function(){if(!this.isInitialized())return null;e.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){u=[],c=l=null,h?this.clearParsedCaptions():h={captions:[],captionStreams:{}},this.resetCaptionStream()},this.reset()}},Ae=function(){function n(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(t,e,i){return e&&n(t.prototype,e),i&&n(t,i),t}}(),Le=function(){function i(t,e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),this.options=e||{},this.self=t,this.init()}return Ae(i,[{key:"init",value:function(){var n,t;this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=new Ee.Transmuxer(this.options),n=this.self,(t=this.transmuxer).on("data",function(t){var e=t.initSegment;t.initSegment={data:e.buffer,byteOffset:e.byteOffset,byteLength:e.byteLength};var 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(t){n.postMessage({action:"done"})}),t.on("gopInfo",function(t){n.postMessage({action:"gopInfo",gopInfo:t})})}},{key:"push",value:function(t){var e=new Uint8Array(t.data,t.byteOffset,t.byteLength);this.transmuxer.push(e)}},{key:"reset",value:function(){this.init()}},{key:"setTimestampOffset",value:function(t){var e=t.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(9e4*e))}},{key:"setAudioAppendStart",value:function(t){this.transmuxer.setAudioAppendStart(Math.ceil(9e4*t.appendStart))}},{key:"flush",value:function(t){this.transmuxer.flush()}},{key:"resetCaptions",value:function(){this.transmuxer.resetCaptions()}},{key:"alignGopsWith",value:function(t){this.transmuxer.alignGopsWith(t.gopsToAlignWith.slice())}}]),i}();new function(e){e.onmessage=function(t){"init"===t.data.action&&t.data.options?this.messageHandlers=new Le(e,t.data.options):(this.messageHandlers||(this.messageHandlers=new Le(e)),t.data&&t.data.action&&"init"!==t.data.action&&this.messageHandlers[t.data.action]&&this.messageHandlers[t.data.action](t.data))}}(Oe)}()}),hc={videoCodec:"avc1",videoObjectTypeIndicator:".4d400d",audioProfile:"2"},dc=function(t){return t.map(function(t){return t.replace(/avc1\.(\d+)\.(\d+)/i,function(t,e,i){return"avc1."+("00"+Number(e).toString(16)).slice(-2)+"00"+("00"+Number(i).toString(16)).slice(-2)})})},pc=function(){var t,e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",i={codecCount:0};return i.codecCount=e.split(",").length,i.codecCount=i.codecCount||2,(t=/(^|\s|,)+(avc[13])([^ ,]*)/i.exec(e))&&(i.videoCodec=t[2],i.videoObjectTypeIndicator=t[3]),i.audioProfile=/(^|\s|,)+mp4a.[0-9A-Fa-f]+\.([0-9A-Fa-f]+)/i.exec(e),i.audioProfile=i.audioProfile&&i.audioProfile[2],i},fc=function(t,e,i){return t+"/"+e+'; codecs="'+i.filter(function(t){return!!t}).join(", ")+'"'},mc=function(t,e){var i,n,r=(i=e).segments&&i.segments.length&&i.segments[0].map?"mp4":"mp2t",a=(n=e.attributes||{}).CODECS?pc(n.CODECS):hc,s=e.attributes||{},o=!0,u=!1;if(!e)return[];if(t.mediaGroups.AUDIO&&s.AUDIO){var l=t.mediaGroups.AUDIO[s.AUDIO];if(l)for(var c in o=!(u=!0),l)if(!l[c].uri&&!l[c].playlists){o=!0;break}}u&&!a.audioProfile&&(o||(a.audioProfile=function(t,e){if(!t.mediaGroups.AUDIO||!e)return null;var i=t.mediaGroups.AUDIO[e];if(!i)return null;for(var n in i){var r=i[n];if(r.default&&r.playlists)return pc(r.playlists[0].attributes.CODECS).audioProfile}return null}(t,s.AUDIO)),a.audioProfile||(oa.log.warn("Multiple audio tracks present but no audio codec string is specified. Attempting to use the default audio codec (mp4a.40.2)"),a.audioProfile=hc.audioProfile));var h={};a.videoCodec&&(h.video=""+a.videoCodec+a.videoObjectTypeIndicator),a.audioProfile&&(h.audio="mp4a.40."+a.audioProfile);var d=fc("audio",r,[h.audio]),p=fc("video",r,[h.video]),f=fc("video",r,[h.video,h.audio]);return u?!o&&h.video?[p,d]:o||h.video?[f,d]:[d,d]:h.video?[f]:[d]},gc=function(t){return/mp4a\.\d+.\d+/i.test(t)},yc=function(t){return/avc1\.[\da-f]+/i.test(t)},vc=function(t){function r(t,e){al(this,r);var i=ul(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,oa.EventTarget));i.timestampOffset_=0,i.pendingBuffers_=[],i.bufferUpdating_=!1,i.mediaSource_=t,i.codecs_=e,i.audioCodec_=null,i.videoCodec_=null,i.audioDisabled_=!1,i.appendAudioInitSegment_=!0,i.gopBuffer_=[],i.timeMapping_=0,i.safeAppend_=11<=oa.browser.IE_VERSION;var n={remux:!1,alignGopsAtEnd:i.safeAppend_};return i.codecs_.forEach(function(t){gc(t)?i.audioCodec_=t:yc(t)&&(i.videoCodec_=t)}),i.transmuxer_=new cc,i.transmuxer_.postMessage({action:"init",options:n}),i.transmuxer_.onmessage=function(t){return"data"===t.data.action?i.data_(t):"done"===t.data.action?i.done_(t):"gopInfo"===t.data.action?i.appendGopInfo_(t):void 0},Object.defineProperty(i,"timestampOffset",{get:function(){return this.timestampOffset_},set:function(t){"number"==typeof t&&0<=t&&(this.timestampOffset_=t,this.appendAudioInitSegment_=!0,this.gopBuffer_.length=0,this.timeMapping_=0,this.transmuxer_.postMessage({action:"setTimestampOffset",timestampOffset:t}))}}),Object.defineProperty(i,"appendWindowStart",{get:function(){return(this.videoBuffer_||this.audioBuffer_).appendWindowStart},set:function(t){this.videoBuffer_&&(this.videoBuffer_.appendWindowStart=t),this.audioBuffer_&&(this.audioBuffer_.appendWindowStart=t)}}),Object.defineProperty(i,"updating",{get:function(){return!!(this.bufferUpdating_||!this.audioDisabled_&&this.audioBuffer_&&this.audioBuffer_.updating||this.videoBuffer_&&this.videoBuffer_.updating)}}),Object.defineProperty(i,"buffered",{get:function(){return function(t,e,i){var n=null,r=null,a=0,s=[],o=[];if(!t&&!e)return oa.createTimeRange();if(!t)return e.buffered;if(!e)return t.buffered;if(i)return t.buffered;if(0===t.buffered.length&&0===e.buffered.length)return oa.createTimeRange();for(var u=t.buffered,l=e.buffered,c=u.length;c--;)s.push({time:u.start(c),type:"start"}),s.push({time:u.end(c),type:"end"});for(c=l.length;c--;)s.push({time:l.start(c),type:"start"}),s.push({time:l.end(c),type:"end"});for(s.sort(function(t,e){return t.time-e.time}),c=0;c<s.length;c++)"start"===s[c].type?2==++a&&(n=s[c].time):"end"===s[c].type&&1==--a&&(r=s[c].time),null!==n&&null!==r&&(o.push([n,r]),r=n=null);return oa.createTimeRanges(o)}(this.videoBuffer_,this.audioBuffer_,this.audioDisabled_)}}),i}return ol(r,oa.EventTarget),sl(r,[{key:"data_",value:function(t){var e=t.data.segment;e.data=new Uint8Array(e.data,t.data.byteOffset,t.data.byteLength),e.initSegment=new Uint8Array(e.initSegment.data,e.initSegment.byteOffset,e.initSegment.byteLength),function(t,e,i){var n=e.player_;if(i.captions&&i.captions.length)for(var r in t.inbandTextTracks_||(t.inbandTextTracks_={}),i.captionStreams)if(!t.inbandTextTracks_[r]){n.tech_.trigger({type:"usage",name:"hls-608"});var a=n.textTracks().getTrackById(r);t.inbandTextTracks_[r]=a||n.addRemoteTextTrack({kind:"captions",id:r,label:r},!1).track}i.metadata&&i.metadata.length&&!t.metadataTrack_&&(t.metadataTrack_=n.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},!1).track,t.metadataTrack_.inBandMetadataTrackDispatchType=i.metadata.dispatchType)}(this,this.mediaSource_,e),this.pendingBuffers_.push(e)}},{key:"done_",value:function(t){"closed"!==this.mediaSource_.readyState?this.processPendingSegments_():this.pendingBuffers_.length=0}},{key:"createRealSourceBuffers_",value:function(){var n=this,r=["audio","video"];r.forEach(function(e){if(n[e+"Codec_"]&&!n[e+"Buffer_"]){var i=null;if(n.mediaSource_[e+"Buffer_"])(i=n.mediaSource_[e+"Buffer_"]).updating=!1;else{var t=e+'/mp4;codecs="'+n[e+"Codec_"]+'"';i=function(t,e){var i=t.addSourceBuffer(e),n=Object.create(null);n.updating=!1,n.realBuffer_=i;var r=function(e){"function"==typeof i[e]?n[e]=function(){return i[e].apply(i,arguments)}:"undefined"==typeof n[e]&&Object.defineProperty(n,e,{get:function(){return i[e]},set:function(t){return i[e]=t}})};for(var a in i)r(a);return n}(n.mediaSource_.nativeMediaSource_,t),n.mediaSource_[e+"Buffer_"]=i}n[e+"Buffer_"]=i,["update","updatestart","updateend"].forEach(function(t){i.addEventListener(t,function(){if("audio"!==e||!n.audioDisabled_)return"updateend"===t&&(n[e+"Buffer_"].updating=!1),r.every(function(t){return!("audio"!==t||!n.audioDisabled_)||(e===t||!n[t+"Buffer_"]||!n[t+"Buffer_"].updating)})?n.trigger(t):void 0})})}})}},{key:"appendBuffer",value:function(t){if(this.bufferUpdating_=!0,this.audioBuffer_&&this.audioBuffer_.buffered.length){var e=this.audioBuffer_.buffered;this.transmuxer_.postMessage({action:"setAudioAppendStart",appendStart:e.end(e.length-1)})}this.videoBuffer_&&this.transmuxer_.postMessage({action:"alignGopsWith",gopsToAlignWith:function(t,e,i){if("undefined"==typeof e||null===e||!t.length)return[];var n=Math.ceil(9e4*(e-i+3)),r=void 0;for(r=0;r<t.length&&!(t[r].pts>n);r++);return t.slice(r)}(this.gopBuffer_,this.mediaSource_.player_?this.mediaSource_.player_.currentTime():null,this.timeMapping_)}),this.transmuxer_.postMessage({action:"push",data:t.buffer,byteOffset:t.byteOffset,byteLength:t.byteLength},[t.buffer]),this.transmuxer_.postMessage({action:"flush"})}},{key:"appendGopInfo_",value:function(t){this.gopBuffer_=function(t,e,i){if(!e.length)return t;if(i)return e.slice();for(var n=e[0].pts,r=0;r<t.length&&!(t[r].pts>=n);r++);return t.slice(0,r).concat(e)}(this.gopBuffer_,t.data.gopInfo,this.safeAppend_)}},{key:"remove",value:function(t,e){if(this.videoBuffer_&&(this.videoBuffer_.updating=!0,this.videoBuffer_.remove(t,e),this.gopBuffer_=function(t,e,i,n){for(var r=Math.ceil(9e4*(e-n)),a=Math.ceil(9e4*(i-n)),s=t.slice(),o=t.length;o--&&!(t[o].pts<=a););if(-1===o)return s;for(var u=o+1;u--&&!(t[u].pts<=r););return u=Math.max(u,0),s.splice(u,o-u+1),s}(this.gopBuffer_,t,e,this.timeMapping_)),!this.audioDisabled_&&this.audioBuffer_&&(this.audioBuffer_.updating=!0,this.audioBuffer_.remove(t,e)),Kl(t,e,this.metadataTrack_),this.inbandTextTracks_)for(var i in this.inbandTextTracks_)Kl(t,e,this.inbandTextTracks_[i])}},{key:"processPendingSegments_",value:function(){var t={video:{segments:[],bytes:0},audio:{segments:[],bytes:0},captions:[],metadata:[]};t=this.pendingBuffers_.reduce(function(t,e){var i=e.type,n=e.data,r=e.initSegment;return t[i].segments.push(n),t[i].bytes+=n.byteLength,t[i].initSegment=r,e.captions&&(t.captions=t.captions.concat(e.captions)),e.info&&(t[i].info=e.info),e.metadata&&(t.metadata=t.metadata.concat(e.metadata)),t},t),this.videoBuffer_||this.audioBuffer_||(0===t.video.bytes&&(this.videoCodec_=null),0===t.audio.bytes&&(this.audioCodec_=null),this.createRealSourceBuffers_()),t.audio.info&&this.mediaSource_.trigger({type:"audioinfo",info:t.audio.info}),t.video.info&&this.mediaSource_.trigger({type:"videoinfo",info:t.video.info}),this.appendAudioInitSegment_&&(!this.audioDisabled_&&this.audioBuffer_&&(t.audio.segments.unshift(t.audio.initSegment),t.audio.bytes+=t.audio.initSegment.byteLength),this.appendAudioInitSegment_=!1);var e=!1;this.videoBuffer_&&t.video.bytes?(t.video.segments.unshift(t.video.initSegment),t.video.bytes+=t.video.initSegment.byteLength,this.concatAndAppendSegments_(t.video,this.videoBuffer_),Jl(this,t.captions,t.metadata)):!this.videoBuffer_||!this.audioDisabled_&&this.audioBuffer_||(e=!0),!this.audioDisabled_&&this.audioBuffer_&&this.concatAndAppendSegments_(t.audio,this.audioBuffer_),this.pendingBuffers_.length=0,e&&this.trigger("updateend"),this.bufferUpdating_=!1}},{key:"concatAndAppendSegments_",value:function(t,e){var i=0,n=void 0;if(t.bytes){n=new Uint8Array(t.bytes),t.segments.forEach(function(t){n.set(t,i),i+=t.byteLength});try{e.updating=!0,e.appendBuffer(n)}catch(t){this.mediaSource_.player_&&this.mediaSource_.player_.error({code:-3,type:"APPEND_BUFFER_ERR",message:t.message,originalError:t})}}}},{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}}]),r}(),_c=function(t){function e(){al(this,e);var a=ul(this,(e.__proto__||Object.getPrototypeOf(e)).call(this)),t=void 0;for(t in a.nativeMediaSource_=new v.MediaSource,a.nativeMediaSource_)t in e.prototype||"function"!=typeof a.nativeMediaSource_[t]||(a[t]=a.nativeMediaSource_[t].bind(a.nativeMediaSource_));return a.duration_=NaN,Object.defineProperty(a,"duration",{get:function(){return this.duration_===1/0?this.duration_:this.nativeMediaSource_.duration},set:function(t){(this.duration_=t)===1/0||(this.nativeMediaSource_.duration=t)}}),Object.defineProperty(a,"seekable",{get:function(){return this.duration_===1/0?oa.createTimeRanges([[0,this.nativeMediaSource_.duration]]):this.nativeMediaSource_.seekable}}),Object.defineProperty(a,"readyState",{get:function(){return this.nativeMediaSource_.readyState}}),Object.defineProperty(a,"activeSourceBuffers",{get:function(){return this.activeSourceBuffers_}}),a.sourceBuffers=[],a.activeSourceBuffers_=[],a.updateActiveSourceBuffers_=function(){if(a.activeSourceBuffers_.length=0,1===a.sourceBuffers.length){var t=a.sourceBuffers[0];return t.appendAudioInitSegment_=!0,t.audioDisabled_=!t.audioCodec_,void a.activeSourceBuffers_.push(t)}for(var i=!1,n=!0,e=0;e<a.player_.audioTracks().length;e++){var r=a.player_.audioTracks()[e];if(r.enabled&&"main"!==r.kind){n=!(i=!0);break}}a.sourceBuffers.forEach(function(t,e){if(t.appendAudioInitSegment_=!0,t.videoCodec_&&t.audioCodec_)t.audioDisabled_=i;else if(t.videoCodec_&&!t.audioCodec_)t.audioDisabled_=!0,n=!1;else if(!t.videoCodec_&&t.audioCodec_&&(t.audioDisabled_=e?n:!n,t.audioDisabled_))return;a.activeSourceBuffers_.push(t)})},a.onPlayerMediachange_=function(){a.sourceBuffers.forEach(function(t){t.appendAudioInitSegment_=!0})},a.onHlsReset_=function(){a.sourceBuffers.forEach(function(t){t.transmuxer_&&t.transmuxer_.postMessage({action:"resetCaptions"})})},a.onHlsSegmentTimeMapping_=function(e){a.sourceBuffers.forEach(function(t){return t.timeMapping_=e.mapping})},["sourceopen","sourceclose","sourceended"].forEach(function(t){this.nativeMediaSource_.addEventListener(t,this.trigger.bind(this))},a),a.on("sourceopen",function(t){var e=d.querySelector('[src="'+a.url_+'"]');e&&(a.player_=oa(e.parentNode),a.player_.tech_.on("hls-reset",a.onHlsReset_),a.player_.tech_.on("hls-segment-time-mapping",a.onHlsSegmentTimeMapping_),a.player_.audioTracks&&a.player_.audioTracks()&&(a.player_.audioTracks().on("change",a.updateActiveSourceBuffers_),a.player_.audioTracks().on("addtrack",a.updateActiveSourceBuffers_),a.player_.audioTracks().on("removetrack",a.updateActiveSourceBuffers_)),a.player_.on("mediachange",a.onPlayerMediachange_))}),a.on("sourceended",function(t){for(var e=Ql(a.duration),i=0;i<a.sourceBuffers.length;i++){var n=a.sourceBuffers[i],r=n.metadataTrack_&&n.metadataTrack_.cues;r&&r.length&&(r[r.length-1].endTime=e)}}),a.on("sourceclose",function(t){this.sourceBuffers.forEach(function(t){t.transmuxer_&&t.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_.off("hls-reset",this.onHlsReset_),this.player_.tech_.off("hls-segment-time-mapping",this.onHlsSegmentTimeMapping_)))}),a}return ol(e,oa.EventTarget),sl(e,[{key:"addSeekableRange_",value:function(t,e){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;(e>this.nativeMediaSource_.duration||isNaN(this.nativeMediaSource_.duration))&&(this.nativeMediaSource_.duration=e)}},{key:"addSourceBuffer",value:function(t){var r,e,i=void 0,n=(r={type:"",parameters:{}},e=t.trim().split(";"),r.type=e.shift().trim(),e.forEach(function(t){var e=t.trim().split("=");if(1<e.length){var i=e[0].replace(/"/g,"").trim(),n=e[1].replace(/"/g,"").trim();r.parameters[i]=n}}),r);if(/^(video|audio)\/mp2t$/i.test(n.type)){var a=[];n.parameters&&n.parameters.codecs&&(a=n.parameters.codecs.split(","),a=(a=dc(a)).filter(function(t){return gc(t)||yc(t)})),0===a.length&&(a=["avc1.4d400d","mp4a.40.2"]),i=new vc(this,a),0!==this.sourceBuffers.length&&(this.sourceBuffers[0].createRealSourceBuffers_(),i.createRealSourceBuffers_(),this.sourceBuffers[0].audioDisabled_=!0)}else i=this.nativeMediaSource_.addSourceBuffer(t);return this.sourceBuffers.push(i),i}}]),e}(),bc=0;oa.mediaSources={};var Tc=function(t,e){var i=oa.mediaSources[t];if(!i)throw new Error("Media Source not found (Video.js)");i.trigger({type:"sourceopen",swfId:e})},Sc=function(){return!!v.MediaSource&&!!v.MediaSource.isTypeSupported&&v.MediaSource.isTypeSupported('video/mp4;codecs="avc1.4d400d,mp4a.40.2"')},kc=function(){if(this.MediaSource={open:Tc,supportsNativeMediaSources:Sc},Sc())return new _c;throw new Error("Cannot use create a virtual MediaSource for this video")};kc.open=Tc,kc.supportsNativeMediaSources=Sc;var wc={createObjectURL:function(t){var e=void 0;return t instanceof _c?(e=v.URL.createObjectURL(t.nativeMediaSource_),t.url_=e):t instanceof _c?(e="blob:vjs-media-source/"+bc,bc++,oa.mediaSources[e]=t,e):(e=v.URL.createObjectURL(t),t.url_=e)}};oa.MediaSource=kc,oa.URL=wc;var Cc=oa.EventTarget,Ec=oa.mergeOptions,Ac=function(t,e){for(var s=Ec(t,{duration:e.duration,minimumUpdatePeriod:e.minimumUpdatePeriod}),i=0;i<e.playlists.length;i++){var n=fl(s,e.playlists[i]);n&&(s=n)}return pl(e,function(t,e,i,n){if(t.playlists&&t.playlists.length){var r=t.playlists[0].uri,a=fl(s,t.playlists[0]);a&&((s=a).mediaGroups[e][i][n].playlists[0]=s.playlists[r])}}),s},Lc=function(t){function a(t,e,i,n){al(this,a);var r=ul(this,(a.__proto__||Object.getPrototypeOf(a)).call(this));if(r.hls_=e,r.withCredentials=i,!t)throw new Error("A non-empty playlist URL or playlist is required");return r.on("minimumUpdatePeriod",function(){r.refreshXml_()}),r.on("mediaupdatetimeout",function(){r.refreshMedia_()}),"string"==typeof t?(r.srcUrl=t,r.state="HAVE_NOTHING",ul(r)):(r.masterPlaylistLoader_=n,r.state="HAVE_METADATA",r.started=!0,r.media(t),v.setTimeout(function(){r.trigger("loadedmetadata")},0),r)}return ol(a,Cc),sl(a,[{key:"dispose",value:function(){this.stopRequest(),v.clearTimeout(this.mediaUpdateTimeout)}},{key:"stopRequest",value:function(){if(this.request){var t=this.request;this.request=null,t.onreadystatechange=null,t.abort()}}},{key:"media",value:function(t){if(!t)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);var e=this.state;if("string"==typeof t){if(!this.master.playlists[t])throw new Error("Unknown playlist URI: "+t);t=this.master.playlists[t]}var i=!this.media_||t.uri!==this.media_.uri;this.state="HAVE_METADATA",i&&(this.media_&&this.trigger("mediachanging"),this.media_=t,this.refreshMedia_(),"HAVE_MASTER"!==e&&this.trigger("mediachange"))}},{key:"pause",value:function(){this.stopRequest(),"HAVE_NOTHING"===this.state&&(this.started=!1)}},{key:"load",value:function(){this.started?this.trigger("loadedplaylist"):this.start()}},{key:"parseMasterXml",value:function(){var a=us(this.masterXml_,{manifestUri:this.srcUrl,clientOffset:this.clientOffset_});a.uri=this.srcUrl;for(var t=0;t<a.playlists.length;t++){var e="placeholder-uri-"+t;a.playlists[t].uri=e,a.playlists[e]=a.playlists[t]}return pl(a,function(t,e,i,n){if(t.playlists&&t.playlists.length){var r="placeholder-uri-"+e+"-"+i+"-"+n;t.playlists[0].uri=r,a.playlists[r]=t.playlists[0]}}),ml(a),gl(a),a}},{key:"start",value:function(){var i=this;this.started=!0,this.request=this.hls_.xhr({uri:this.srcUrl,withCredentials:this.withCredentials},function(t,e){if(i.request){if(i.request=null,t)return i.error={status:e.status,message:"DASH playlist request error at URL: "+i.srcUrl,responseText:e.responseText,code:2},"HAVE_NOTHING"===i.state&&(i.started=!1),i.trigger("error");i.masterXml_=e.responseText,e.responseHeaders&&e.responseHeaders.date?i.masterLoaded_=Date.parse(e.responseHeaders.date):i.masterLoaded_=Date.now(),i.syncClientServerClock_(i.onClientServerClockSync_.bind(i))}})}},{key:"syncClientServerClock_",value:function(n){var r=this,a=ls(this.masterXml_);return null===a?(this.clientOffset_=this.masterLoaded_-Date.now(),n()):"DIRECT"===a.method?(this.clientOffset_=a.value-Date.now(),n()):void(this.request=this.hls_.xhr({uri:rl(this.srcUrl,a.value),method:a.method,withCredentials:this.withCredentials},function(t,e){if(r.request){if(t)return r.clientOffset_=r.masterLoaded_-Date.now(),n();var i=void 0;i="HEAD"===a.method?e.responseHeaders&&e.responseHeaders.date?Date.parse(e.responseHeaders.date):r.masterLoaded_:Date.parse(e.responseText),r.clientOffset_=i-Date.now(),n()}}))}},{key:"onClientServerClockSync_",value:function(){var t=this;this.master=this.parseMasterXml(),this.state="HAVE_MASTER",this.trigger("loadedplaylist"),this.media_||this.media(this.master.playlists[0]),v.setTimeout(function(){t.trigger("loadedmetadata")},0),this.master.minimumUpdatePeriod&&v.setTimeout(function(){t.trigger("minimumUpdatePeriod")},this.master.minimumUpdatePeriod)}},{key:"refreshXml_",value:function(){var n=this;this.request=this.hls_.xhr({uri:this.srcUrl,withCredentials:this.withCredentials},function(t,e){if(n.request){if(n.request=null,t)return n.error={status:e.status,message:"DASH playlist request error at URL: "+n.srcUrl,responseText:e.responseText,code:2},"HAVE_NOTHING"===n.state&&(n.started=!1),n.trigger("error");n.masterXml_=e.responseText;var i=n.parseMasterXml();n.master=Ac(n.master,i),v.setTimeout(function(){n.trigger("minimumUpdatePeriod")},n.master.minimumUpdatePeriod)}})}},{key:"refreshMedia_",value:function(){var t=this,e=void 0,i=void 0;i=this.masterPlaylistLoader_?(e=this.masterPlaylistLoader_.master,this.masterPlaylistLoader_.parseMasterXml()):(e=this.master,this.parseMasterXml());var n=Ac(e,i);n?(this.masterPlaylistLoader_?this.masterPlaylistLoader_.master=n:this.master=n,this.media_=n.playlists[this.media_.uri]):this.trigger("playlistunchanged"),this.media().endList||(this.mediaUpdateTimeout=v.setTimeout(function(){t.trigger("mediaupdatetimeout")},yl(this.media(),!!n))),this.trigger("loadedplaylist")}}]),a}(),Oc=function(t){return oa.log.debug?oa.log.debug.bind(oa,"VHS:",t+" >"):function(){}};function Pc(){}var Uc=function(){function r(t,e,i,n){al(this,r),this.callbacks_=[],this.pendingCallback_=null,this.timestampOffset_=0,this.mediaSource=t,this.processedAppend_=!1,this.type_=i,this.mimeType_=e,this.logger_=Oc("SourceUpdater["+i+"]["+e+"]"),"closed"===t.readyState?t.addEventListener("sourceopen",this.createSourceBuffer_.bind(this,e,n)):this.createSourceBuffer_(e,n)}return sl(r,[{key:"createSourceBuffer_",value:function(t,e){var i=this;this.sourceBuffer_=this.mediaSource.addSourceBuffer(t),this.logger_("created SourceBuffer"),e&&(e.trigger("sourcebufferadded"),this.mediaSource.sourceBuffers.length<2)?e.on("sourcebufferadded",function(){i.start_()}):this.start_()}},{key:"start_",value:function(){var e=this;this.started_=!0,this.onUpdateendCallback_=function(){var t=e.pendingCallback_;e.pendingCallback_=null,e.logger_("buffered ["+Yl(e.buffered())+"]"),t&&t(),e.runCallback_()},this.sourceBuffer_.addEventListener("updateend",this.onUpdateendCallback_),this.runCallback_()}},{key:"abort",value:function(t){var e=this;this.processedAppend_&&this.queueCallback_(function(){e.sourceBuffer_.abort()},t)}},{key:"appendBuffer",value:function(t,e){var i=this;this.processedAppend_=!0,this.queueCallback_(function(){i.sourceBuffer_.appendBuffer(t)},e)}},{key:"buffered",value:function(){return this.sourceBuffer_?this.sourceBuffer_.buffered:oa.createTimeRanges()}},{key:"remove",value:function(t,e){var i=this,n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:Pc;this.processedAppend_&&this.queueCallback_(function(){i.logger_("remove ["+t+"=> "+e+"]"),i.sourceBuffer_.remove(t,e)},n)}},{key:"updating",value:function(){return!this.sourceBuffer_||this.sourceBuffer_.updating||this.pendingCallback_}},{key:"timestampOffset",value:function(t){var e=this;return"undefined"!=typeof t&&(this.queueCallback_(function(){e.sourceBuffer_.timestampOffset=t}),this.timestampOffset_=t),this.timestampOffset_}},{key:"queueCallback_",value:function(t,e){this.callbacks_.push([t.bind(this),e]),this.runCallback_()}},{key:"runCallback_",value:function(){var t=void 0;!this.updating()&&this.callbacks_.length&&this.started_&&(t=this.callbacks_.shift(),this.pendingCallback_=t[1],t[0]())}},{key:"dispose",value:function(){this.sourceBuffer_.removeEventListener("updateend",this.onUpdateendCallback_),this.sourceBuffer_&&"open"===this.mediaSource.readyState&&this.sourceBuffer_.abort()}}]),r}(),xc={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},Ic=2,Dc=-101,Rc=-102,Mc=function(t){var e,i,n={};return t.byterange&&(n.Range=(e=t.byterange,i=e.offset+e.length-1,"bytes="+e.offset+"-"+i)),n},Bc=function(t){t.forEach(function(t){t.abort()})},Nc=function(t,e){return e.timedout?{status:e.status,message:"HLS request timed-out at URL: "+e.uri,code:Dc,xhr:e}:e.aborted?{status:e.status,message:"HLS request aborted at URL: "+e.uri,code:Rc,xhr:e}:t?{status:e.status,message:"HLS request errored at URL: "+e.uri,code:Ic,xhr:e}:null},jc=function(s,o,u){var l=[],c=0;return function(t,e){if(t&&(Bc(s),l.push(t)),(c+=1)===s.length){if(e.endOfAllRequests=Date.now(),0<l.length){var i=l.reduce(function(t,e){return e.code>t.code?e:t});return u(i,e)}return e.encryptedBytes?(r=e,a=u,(n=o).addEventListener("message",function t(e){if(e.data.source===r.requestId){n.removeEventListener("message",t);var i=e.data.decrypted;return r.bytes=new Uint8Array(i.bytes,i.byteOffset,i.byteLength),a(null,r)}}),void n.postMessage(Fl({source:r.requestId,encrypted:r.encryptedBytes,key:r.key.bytes,iv:r.key.iv}),[r.encryptedBytes.buffer,r.key.bytes.buffer])):u(null,e)}var n,r,a}},Fc=function(r,a){return function(t){var e,i,n;return r.stats=oa.mergeOptions(r.stats,(i=(e=t).target,(n={bandwidth:1/0,bytesReceived:0,roundTripTime:Date.now()-i.requestTime||0}).bytesReceived=e.loaded,n.bandwidth=Math.floor(n.bytesReceived/n.roundTripTime*8*1e3),n)),!r.stats.firstBytesReceivedAt&&r.stats.bytesReceived&&(r.stats.firstBytesReceivedAt=Date.now()),a(t,r)}},Vc=function(t,e,i,n,r,a,s){var o,u,l,c,h,d=[],p=jc(d,i,s);if(r.key){var f=t(oa.mergeOptions(e,{uri:r.key.resolvedUri,responseType:"arraybuffer"}),(o=r,u=p,function(t,e){var i=e.response,n=Nc(t,e);if(n)return u(n,o);if(16!==i.byteLength)return u({status:e.status,message:"Invalid HLS key at URL: "+e.uri,code:Ic,xhr:e},o);var r=new DataView(i);return o.key.bytes=new Uint32Array([r.getUint32(0),r.getUint32(4),r.getUint32(8),r.getUint32(12)]),u(null,o)}));d.push(f)}if(r.map&&!r.map.bytes){var m=t(oa.mergeOptions(e,{uri:r.map.resolvedUri,responseType:"arraybuffer",headers:Mc(r.map)}),(l=r,c=n,h=p,function(t,e){var i=e.response,n=Nc(t,e);return n?h(n,l):0===i.byteLength?h({status:e.status,message:"Empty HLS segment content at URL: "+e.uri,code:Ic,xhr:e},l):(l.map.bytes=new Uint8Array(e.response),c.isInitialized()||c.init(),l.map.timescales=Qs.timescale(l.map.bytes),l.map.videoTrackIds=Qs.videoTrackIds(l.map.bytes),h(null,l))}));d.push(m)}var g,y,v,_=t(oa.mergeOptions(e,{uri:r.resolvedUri,responseType:"arraybuffer",headers:Mc(r)}),(g=r,y=n,v=p,function(t,e){var i,n=e.response,r=Nc(t,e),a=void 0;return r?v(r,g):0===n.byteLength?v({status:e.status,message:"Empty HLS segment content at URL: "+e.uri,code:Ic,xhr:e},g):(g.stats={bandwidth:(i=e).bandwidth,bytesReceived:i.bytesReceived||0,roundTripTime:i.roundTripTime||0},g.key?g.encryptedBytes=new Uint8Array(e.response):g.bytes=new Uint8Array(e.response),g.map&&g.map.bytes&&(y.isInitialized()||y.init(),(a=y.parse(g.bytes,g.map.videoTrackIds,g.map.timescales))&&a.captions&&(g.captionStreams=a.captionStreams,g.fmp4Captions=a.captions)),v(null,g))}));return _.addEventListener("progress",Fc(r,a)),d.push(_),function(){return Bc(d)}},Hc=function(t,e){var i;return t&&(i=v.getComputedStyle(t))?i[e]:""},qc=function(t,n){var r=t.slice();t.sort(function(t,e){var i=n(t,e);return 0===i?r.indexOf(t)-r.indexOf(e):i})},zc=function(t,e){var i=void 0,n=void 0;return t.attributes.BANDWIDTH&&(i=t.attributes.BANDWIDTH),i=i||v.Number.MAX_VALUE,e.attributes.BANDWIDTH&&(n=e.attributes.BANDWIDTH),i-(n=n||v.Number.MAX_VALUE)},Wc=function(t,e,i){if(!t||!e)return!1;var n=i===t.segments.length;return t.endList&&"open"===e.readyState&&n},Gc=function(t){return"number"==typeof t&&isFinite(t)},Xc=function(t){function i(t){al(this,i);var e=ul(this,(i.__proto__||Object.getPrototypeOf(i)).call(this));if(!t)throw new TypeError("Initialization settings are required");if("function"!=typeof t.currentTime)throw new TypeError("No currentTime getter specified");if(!t.mediaSource)throw new TypeError("No MediaSource specified");return e.bandwidth=t.bandwidth,e.throughput={rate:0,count:0},e.roundTrip=NaN,e.resetStats_(),e.mediaIndex=null,e.hasPlayed_=t.hasPlayed,e.currentTime_=t.currentTime,e.seekable_=t.seekable,e.seeking_=t.seeking,e.duration_=t.duration,e.mediaSource_=t.mediaSource,e.hls_=t.hls,e.loaderType_=t.loaderType,e.startingMedia_=void 0,e.segmentMetadataTrack_=t.segmentMetadataTrack,e.goalBufferLength_=t.goalBufferLength,e.sourceType_=t.sourceType,e.inbandTextTracks_=t.inbandTextTracks,e.state_="INIT",e.checkBufferTimeout_=null,e.error_=void 0,e.currentTimeline_=-1,e.pendingSegment_=null,e.mimeType_=null,e.sourceUpdater_=null,e.xhrOptions_=null,e.activeInitSegmentId_=null,e.initSegments_={},e.captionParser_=new Iu,e.decrypter_=t.decrypter,e.syncController_=t.syncController,e.syncPoint_={segmentIndex:0,time:0},e.syncController_.on("syncinfoupdate",function(){return e.trigger("syncinfoupdate")}),e.mediaSource_.addEventListener("sourceopen",function(){return e.ended_=!1}),e.fetchAtBuffer_=!1,e.logger_=Oc("SegmentLoader["+e.loaderType_+"]"),Object.defineProperty(e,"state",{get:function(){return this.state_},set:function(t){t!==this.state_&&(this.logger_(this.state_+" -> "+t),this.state_=t)}}),e}return ol(i,oa.EventTarget),sl(i,[{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_.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(t){return"undefined"!=typeof t&&(this.error_=t),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():oa.createTimeRanges()}},{key:"initSegment",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]&&arguments[1];if(!t)return null;var i=Vl(t),n=this.initSegments_[i];return e&&!n&&t.bytes&&(this.initSegments_[i]=n={resolvedUri:t.resolvedUri,byterange:t.byterange,bytes:t.bytes,timescales:t.timescales,videoTrackIds:t.videoTrackIds}),n||t}},{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 Uc(this.mediaSource_,this.mimeType_,this.loaderType_,this.sourceBufferEmitter_),this.resetEverything(),this.monitorBuffer_()}},{key:"playlist",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};if(t){var i=this.playlist_,n=this.pendingSegment_;this.playlist_=t,this.xhrOptions_=e,this.hasPlayed_()||(t.syncInfo={mediaSequence:t.mediaSequence,time:0});var r=i?i.id:null;if(this.logger_("playlist update ["+r+"=> "+t.id+"]"),this.trigger("syncinfoupdate"),"INIT"===this.state&&this.couldBeginLoading_())return this.init_();if(i&&i.uri===t.uri){var a=t.mediaSequence-i.mediaSequence;this.logger_("live window shift ["+a+"]"),null!==this.mediaIndex&&(this.mediaIndex-=a),n&&(n.mediaIndex-=a,0<=n.mediaIndex&&(n.segment=t.segments[n.mediaIndex])),this.syncController_.saveExpiredSegmentInfo(i,t)}else null!==this.mediaIndex&&this.resyncLoader()}}},{key:"pause",value:function(){this.checkBufferTimeout_&&(v.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)}},{key:"paused",value:function(){return null===this.checkBufferTimeout_}},{key:"mimeType",value:function(t,e){this.mimeType_||(this.mimeType_=t,this.sourceBufferEmitter_=e,"INIT"===this.state&&this.couldBeginLoading_()&&this.init_())}},{key:"resetEverything",value:function(t){this.ended_=!1,this.resetLoader(),this.remove(0,this.duration_(),t),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(t,e,i){if(this.sourceUpdater_&&this.sourceUpdater_.remove(t,e,i),Kl(t,e,this.segmentMetadataTrack_),this.inbandTextTracks_)for(var n in this.inbandTextTracks_)Kl(t,e,this.inbandTextTracks_[n])}},{key:"monitorBuffer_",value:function(){this.checkBufferTimeout_&&v.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=v.setTimeout(this.monitorBufferTick_.bind(this),1)}},{key:"monitorBufferTick_",value:function(){"READY"===this.state&&this.fillBuffer_(),this.checkBufferTimeout_&&v.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=v.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 t=this.checkBuffer_(this.buffered_(),this.playlist_,this.mediaIndex,this.hasPlayed_(),this.currentTime_(),this.syncPoint_);if(t)Wc(this.playlist_,this.mediaSource_,t.mediaIndex)?this.endOfStream():(t.mediaIndex!==this.playlist_.segments.length-1||"ended"!==this.mediaSource_.readyState||this.seeking_())&&((t.timeline!==this.currentTimeline_||null!==t.startOfSegment&&t.startOfSegment<this.sourceUpdater_.timestampOffset())&&(this.syncController_.reset(),t.timestampOffset=t.startOfSegment,this.captionParser_.clearAllCaptions()),this.loadSegment_(t))}}},{key:"checkBuffer_",value:function(t,e,i,n,r,a){var s=0,o=void 0;t.length&&(s=t.end(t.length-1));var u=Math.max(0,s-r);if(!e.segments.length)return null;if(u>=this.goalBufferLength_())return null;if(!n&&1<=u)return null;if(null===a)return i=this.getSyncSegmentCandidate_(e),this.generateSegmentInfo_(e,i,null,!0);if(null!==i){var l=e.segments[i];return o=l&&l.end?l.end:s,this.generateSegmentInfo_(e,i+1,o,!1)}if(this.fetchAtBuffer_){var c=Dl.getMediaInfoForTime(e,s,a.segmentIndex,a.time);i=c.mediaIndex,o=c.startTime}else{var h=Dl.getMediaInfoForTime(e,r,a.segmentIndex,a.time);i=h.mediaIndex,o=h.startTime}return this.generateSegmentInfo_(e,i,o,!1)}},{key:"getSyncSegmentCandidate_",value:function(t){var e=this;if(-1===this.currentTimeline_)return 0;var i=t.segments.map(function(t,e){return{timeline:t.timeline,segmentIndex:e}}).filter(function(t){return t.timeline===e.currentTimeline_});return i.length?i[Math.min(i.length-1,1)].segmentIndex:Math.max(t.segments.length-1,0)}},{key:"generateSegmentInfo_",value:function(t,e,i,n){if(e<0||e>=t.segments.length)return null;var r=t.segments[e];return{requestId:"segment-loader-"+Math.random(),uri:r.resolvedUri,mediaIndex:e,isSyncRequest:n,startOfSegment:i,playlist:t,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:r.timeline,duration:r.duration,segment:r}}},{key:"abortRequestEarly_",value:function(t){if(this.hls_.tech_.paused()||!this.xhrOptions_.timeout||!this.playlist_.attributes.BANDWIDTH)return!1;if(Date.now()-(t.firstBytesReceivedAt||Date.now())<1e3)return!1;var e=this.currentTime_(),i=t.bandwidth,n=this.pendingSegment_.duration,r=Dl.estimateSegmentRequestTime(n,i,this.playlist_,t.bytesReceived),a=function(t,e){var i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:1;return((t.length?t.end(t.length-1):0)-e)/i}(this.buffered_(),e,this.hls_.tech_.playbackRate())-1;if(r<=a)return!1;var s=function(t){var e=t.master,i=t.currentTime,n=t.bandwidth,r=t.duration,a=t.segmentDuration,s=t.timeUntilRebuffer,o=t.currentTimeline,u=t.syncController,l=e.playlists.filter(function(t){return!Dl.isIncompatible(t)}),c=l.filter(Dl.isEnabled);c.length||(c=l.filter(function(t){return!Dl.isDisabled(t)}));var h=c.filter(Dl.hasAttribute.bind(null,"BANDWIDTH")).map(function(t){var e=u.getSyncPoint(t,r,o,i)?1:2;return{playlist:t,rebufferingImpact:Dl.estimateSegmentRequestTime(a,n,t)*e-s}}),d=h.filter(function(t){return t.rebufferingImpact<=0});return qc(d,function(t,e){return zc(e.playlist,t.playlist)}),d.length?d[0]:(qc(h,function(t,e){return t.rebufferingImpact-e.rebufferingImpact}),h[0]||null)}({master:this.hls_.playlists.master,currentTime:e,bandwidth:i,duration:this.duration_(),segmentDuration:n,timeUntilRebuffer:a,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(s){var o=r-a-s.rebufferingImpact,u=.5;return a<=zl&&(u=1),!s.playlist||s.playlist.uri===this.playlist_.uri||o<u?!1:(this.bandwidth=s.playlist.attributes.BANDWIDTH*xc.BANDWIDTH_VARIANCE+1,this.abort(),this.trigger("earlyabort"),!0)}}},{key:"handleProgress_",value:function(t,e){this.pendingSegment_&&e.requestId===this.pendingSegment_.requestId&&!this.abortRequestEarly_(e.stats)&&this.trigger("progress")}},{key:"loadSegment_",value:function(t){this.state="WAITING",this.pendingSegment_=t,this.trimBackBuffer_(t),t.abortRequests=Vc(this.hls_.xhr,this.xhrOptions_,this.decrypter_,this.captionParser_,this.createSimplifiedSegmentObj_(t),this.handleProgress_.bind(this),this.segmentRequestFinished_.bind(this))}},{key:"trimBackBuffer_",value:function(t){var e,i,n,r,a=(e=this.seekable_(),i=this.currentTime_(),n=this.playlist_.targetDuration||10,r=void 0,r=e.length&&0<e.start(0)&&e.start(0)<i?e.start(0):i-30,Math.min(r,i-n));0<a&&this.remove(0,a)}},{key:"createSimplifiedSegmentObj_",value:function(t){var e=t.segment,i={resolvedUri:e.resolvedUri,byterange:e.byterange,requestId:t.requestId};if(e.key){var n=e.key.iv||new Uint32Array([0,0,0,t.mediaIndex+t.playlist.mediaSequence]);i.key={resolvedUri:e.key.resolvedUri,iv:n}}return e.map&&(i.map=this.initSegment(e.map)),i}},{key:"segmentRequestFinished_",value:function(t,e){if(this.mediaRequests+=1,e.stats&&(this.mediaBytesTransferred+=e.stats.bytesReceived,this.mediaTransferDuration+=e.stats.roundTripTime),this.pendingSegment_){if(e.requestId===this.pendingSegment_.requestId){if(t)return this.pendingSegment_=null,this.state="READY",t.code===Rc?void(this.mediaRequestsAborted+=1):(this.pause(),t.code===Dc?(this.mediaRequestsTimedout+=1,this.bandwidth=1,this.roundTrip=NaN,void this.trigger("bandwidthupdate")):(this.mediaRequestsErrored+=1,this.error(t),void this.trigger("error")));this.bandwidth=e.stats.bandwidth,this.roundTrip=e.stats.roundTripTime,e.map&&(e.map=this.initSegment(e.map,!0)),this.processSegmentResponse_(e)}}else this.mediaRequestsAborted+=1}},{key:"processSegmentResponse_",value:function(t){var e=this.pendingSegment_;e.bytes=t.bytes,t.map&&(e.segment.map.bytes=t.map.bytes),e.endOfAllRequests=t.endOfAllRequests,t.fmp4Captions&&(!function(t,e,i){for(var n in i)if(!t[n]){e.trigger({type:"usage",name:"hls-608"});var r=e.textTracks().getTrackById(n);t[n]=r||e.addRemoteTextTrack({kind:"captions",id:n,label:n},!1).track}}(this.inbandTextTracks_,this.hls_.tech_,t.captionStreams),function(t){var r=t.inbandTextTracks,e=t.captionArray,a=t.timestampOffset;if(e){var s=window.WebKitDataCue||window.VTTCue;e.forEach(function(t){var e=t.stream,i=t.startTime,n=t.endTime;r[e]&&(i+=a,n+=a,r[e].addCue(new s(i,n,t.text)))})}}({inbandTextTracks:this.inbandTextTracks_,captionArray:t.fmp4Captions,timestampOffset:0}),this.captionParser_.clearParsedCaptions()),this.handleSegment_()}},{key:"handleSegment_",value:function(){var t=this;if(this.pendingSegment_){var e=this.pendingSegment_,i=e.segment,n=this.syncController_.probeSegmentInfo(e);"undefined"==typeof this.startingMedia_&&n&&(n.containsAudio||n.containsVideo)&&(this.startingMedia_={containsAudio:n.containsAudio,containsVideo:n.containsVideo});var r,a,s,o=(r=this.loaderType_,a=this.startingMedia_,s=n,"main"===r&&a&&s?s.containsAudio||s.containsVideo?a.containsVideo&&!s.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.":!a.containsVideo&&s.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);if(o)return this.error({message:o,blacklistDuration:1/0}),void this.trigger("error");if(e.isSyncRequest)return this.trigger("syncinfoupdate"),this.pendingSegment_=null,void(this.state="READY");null!==e.timestampOffset&&e.timestampOffset!==this.sourceUpdater_.timestampOffset()&&(this.sourceUpdater_.timestampOffset(e.timestampOffset),this.trigger("timestampoffset"));var u,l,c,h,d,p,f,m,g,y,v,_=this.syncController_.mappingForTimeline(e.timeline);if(null!==_&&this.trigger({type:"segmenttimemapping",mapping:_}),this.state="APPENDING",i.map){var b=Vl(i.map);if(!this.activeInitSegmentId_||this.activeInitSegmentId_!==b){var T=this.initSegment(i.map);this.sourceUpdater_.appendBuffer(T.bytes,function(){t.activeInitSegmentId_=b})}}e.byteLength=e.bytes.byteLength,"number"==typeof i.start&&"number"==typeof i.end?this.mediaSecondsLoaded+=i.end-i.start:this.mediaSecondsLoaded+=i.duration,this.logger_((l=(u=e).segment,c=l.start,h=l.end,d=u.playlist,p=d.mediaSequence,f=d.id,m=d.segments,g=void 0===m?[]:m,y=u.mediaIndex,v=u.timeline,["appending ["+y+"] of ["+p+", "+(p+g.length)+"] from playlist ["+f+"]","["+c+"=> "+h+"] in timeline ["+v+"]"].join(" "))),this.sourceUpdater_.appendBuffer(e.bytes,this.handleUpdateEnd_.bind(this))}else this.state="READY"}},{key:"handleUpdateEnd_",value:function(){if(!this.pendingSegment_)return this.state="READY",void(this.paused()||this.monitorBuffer_());var t=this.pendingSegment_,e=t.segment,i=null!==this.mediaIndex;(this.pendingSegment_=null,this.recordThroughput_(t),this.addSegmentMetadataCue_(t),this.state="READY",this.mediaIndex=t.mediaIndex,this.fetchAtBuffer_=!0,this.currentTimeline_=t.timeline,this.trigger("syncinfoupdate"),e.end&&this.currentTime_()-e.end>3*t.playlist.targetDuration)?this.resetEverything():(i&&this.trigger("bandwidthupdate"),this.trigger("progress"),Wc(t.playlist,this.mediaSource_,t.mediaIndex+1)&&this.endOfStream(),this.paused()||this.monitorBuffer_())}},{key:"recordThroughput_",value:function(t){var e=this.throughput.rate,i=Date.now()-t.endOfAllRequests+1,n=Math.floor(t.byteLength/i*8*1e3);this.throughput.rate+=(n-e)/++this.throughput.count}},{key:"addSegmentMetadataCue_",value:function(t){if(this.segmentMetadataTrack_){var e=t.segment,i=e.start,n=e.end;if(Gc(i)&&Gc(n)){Kl(i,n,this.segmentMetadataTrack_);var r=v.WebKitDataCue||v.VTTCue,a={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:i,end:n},s=new r(i,n,JSON.stringify(a));s.value=a,this.segmentMetadataTrack_.addCue(s)}}}}]),i}(),Yc=function(t){return decodeURIComponent(escape(String.fromCharCode.apply(null,t)))},$c=new Uint8Array("\n\n".split("").map(function(t){return t.charCodeAt(0)})),Kc=function(t){function n(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};al(this,n);var i=ul(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,t,e));return i.mediaSource_=null,i.subtitlesTrack_=null,i}return ol(n,Xc),sl(n,[{key:"buffered_",value:function(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues.length)return oa.createTimeRanges();var t=this.subtitlesTrack_.cues,e=t[0].startTime,i=t[t.length-1].startTime;return oa.createTimeRanges([[e,i]])}},{key:"initSegment",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]&&arguments[1];if(!t)return null;var i=Vl(t),n=this.initSegments_[i];if(e&&!n&&t.bytes){var r=$c.byteLength+t.bytes.byteLength,a=new Uint8Array(r);a.set(t.bytes),a.set($c,t.bytes.byteLength),this.initSegments_[i]=n={resolvedUri:t.resolvedUri,byterange:t.byterange,bytes:a}}return n||t}},{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(t){return"undefined"==typeof t||(this.subtitlesTrack_=t,"INIT"===this.state&&this.couldBeginLoading_()&&this.init_()),this.subtitlesTrack_}},{key:"remove",value:function(t,e){Kl(t,e,this.subtitlesTrack_)}},{key:"fillBuffer_",value:function(){var t=this;this.syncPoint_||(this.syncPoint_=this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_()));var e=this.checkBuffer_(this.buffered_(),this.playlist_,this.mediaIndex,this.hasPlayed_(),this.currentTime_(),this.syncPoint_);if(e=this.skipEmptySegments_(e)){if(null===this.syncController_.timestampOffsetForTimeline(e.timeline)){return this.syncController_.one("timestampoffset",function(){t.state="READY",t.paused()||t.monitorBuffer_()}),void(this.state="WAITING_ON_TIMELINE")}this.loadSegment_(e)}}},{key:"skipEmptySegments_",value:function(t){for(;t&&t.segment.empty;)t=this.generateSegmentInfo_(t.playlist,t.mediaIndex+1,t.startOfSegment+t.duration,t.isSyncRequest);return t}},{key:"handleSegment_",value:function(){var e=this;if(this.pendingSegment_&&this.subtitlesTrack_){this.state="APPENDING";var t=this.pendingSegment_,i=t.segment;if("function"!=typeof v.WebVTT&&this.subtitlesTrack_&&this.subtitlesTrack_.tech_){var n=function(){e.handleSegment_()};return this.state="WAITING_ON_VTTJS",this.subtitlesTrack_.tech_.one("vttjsloaded",n),void this.subtitlesTrack_.tech_.one("vttjserror",function(){e.subtitlesTrack_.tech_.off("vttjsloaded",n),e.error({message:"Error loading vtt.js"}),e.state="READY",e.pause(),e.trigger("error")})}i.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+=i.duration,t.cues.length&&this.remove(t.cues[0].endTime,t.cues[t.cues.length-1].endTime),t.cues.forEach(function(t){e.subtitlesTrack_.addCue(t)}),this.handleUpdateEnd_()}else this.state="READY"}},{key:"parseVTTCues_",value:function(e){var t=void 0,i=!1;"function"==typeof v.TextDecoder?t=new v.TextDecoder("utf8"):(t=v.WebVTT.StringDecoder(),i=!0);var n=new v.WebVTT.Parser(v,v.vttjs,t);if(e.cues=[],e.timestampmap={MPEGTS:0,LOCAL:0},n.oncue=e.cues.push.bind(e.cues),n.ontimestampmap=function(t){return e.timestampmap=t},n.onparsingerror=function(t){oa.log.warn("Error encountered when parsing cues: "+t.message)},e.segment.map){var r=e.segment.map.bytes;i&&(r=Yc(r)),n.parse(r)}var a=e.bytes;i&&(a=Yc(a)),n.parse(a),n.flush()}},{key:"updateTimeMapping_",value:function(t,e,i){var n=t.segment;if(e)if(t.cues.length){var r=t.timestampmap,a=r.MPEGTS/9e4-r.LOCAL+e.mapping;if(t.cues.forEach(function(t){t.startTime+=a,t.endTime+=a}),!i.syncInfo){var s=t.cues[0].startTime,o=t.cues[t.cues.length-1].startTime;i.syncInfo={mediaSequence:i.mediaSequence+t.mediaIndex,time:Math.min(s,o-n.duration)}}}else n.empty=!0}}]),n}(),Qc=function(t,e){for(var i=t.cues,n=0;n<i.length;n++){var r=i[n];if(e>=r.adStartTime&&e<=r.adEndTime)return r}return null},Jc=Yu,Zc=[{name:"VOD",run:function(t,e,i,n,r){if(i===1/0)return null;return{time:0,segmentIndex:0}}},{name:"ProgramDateTime",run:function(t,e,i,n,r){if(!t.datetimeToDisplayTime)return null;var a=e.segments||[],s=null,o=null;r=r||0;for(var u=0;u<a.length;u++){var l=a[u];if(l.dateTimeObject){var c=l.dateTimeObject.getTime()/1e3+t.datetimeToDisplayTime,h=Math.abs(r-c);if(null!==o&&o<h)break;o=h,s={time:c,segmentIndex:u}}}return s}},{name:"Segment",run:function(t,e,i,n,r){var a=e.segments||[],s=null,o=null;r=r||0;for(var u=0;u<a.length;u++){var l=a[u];if(l.timeline===n&&"undefined"!=typeof l.start){var c=Math.abs(r-l.start);if(null!==o&&o<c)break;(!s||null===o||c<=o)&&(o=c,s={time:l.start,segmentIndex:u})}}return s}},{name:"Discontinuity",run:function(t,e,i,n,r){var a=null;if(r=r||0,e.discontinuityStarts&&e.discontinuityStarts.length)for(var s=null,o=0;o<e.discontinuityStarts.length;o++){var u=e.discontinuityStarts[o],l=e.discontinuitySequence+o+1,c=t.discontinuities[l];if(c){var h=Math.abs(r-c.time);if(null!==s&&s<h)break;(!a||null===s||h<=s)&&(s=h,a={time:c.time,segmentIndex:u})}}return a}},{name:"Playlist",run:function(t,e,i,n,r){return e.syncInfo?{time:e.syncInfo.time,segmentIndex:e.syncInfo.mediaSequence-e.mediaSequence}:null}}],th=function(t){function e(){al(this,e);var t=ul(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return t.inspectCache_=void 0,t.timelines=[],t.discontinuities=[],t.datetimeToDisplayTime=null,t.logger_=Oc("SyncController"),t}return ol(e,oa.EventTarget),sl(e,[{key:"getSyncPoint",value:function(t,e,i,n){var r=this.runStrategies_(t,e,i,n);return r.length?this.selectSyncPoint_(r,{key:"time",value:n}):null}},{key:"getExpiredTime",value:function(t,e){if(!t||!t.segments)return null;var i=this.runStrategies_(t,e,t.discontinuitySequence,0);if(!i.length)return null;var n=this.selectSyncPoint_(i,{key:"segmentIndex",value:0});return 0<n.segmentIndex&&(n.time*=-1),Math.abs(n.time+Sl(t,n.segmentIndex,0))}},{key:"runStrategies_",value:function(t,e,i,n){for(var r=[],a=0;a<Zc.length;a++){var s=Zc[a],o=s.run(this,t,e,i,n);o&&(o.strategy=s.name,r.push({strategy:s.name,syncPoint:o}))}return r}},{key:"selectSyncPoint_",value:function(t,e){for(var i=t[0].syncPoint,n=Math.abs(t[0].syncPoint[e.key]-e.value),r=t[0].strategy,a=1;a<t.length;a++){var s=Math.abs(t[a].syncPoint[e.key]-e.value);s<n&&(n=s,i=t[a].syncPoint,r=t[a].strategy)}return this.logger_("syncPoint for ["+e.key+": "+e.value+"] chosen with strategy ["+r+"]: [time:"+i.time+", segmentIndex:"+i.segmentIndex+"]"),i}},{key:"saveExpiredSegmentInfo",value:function(t,e){for(var i=e.mediaSequence-t.mediaSequence-1;0<=i;i--){var n=t.segments[i];if(n&&"undefined"!=typeof n.start){e.syncInfo={mediaSequence:t.mediaSequence+i,time:n.start},this.logger_("playlist refresh sync: [time:"+e.syncInfo.time+", mediaSequence: "+e.syncInfo.mediaSequence+"]"),this.trigger("syncinfoupdate");break}}}},{key:"setDateTimeMapping",value:function(t){if(!this.datetimeToDisplayTime&&t.segments&&t.segments.length&&t.segments[0].dateTimeObject){var e=t.segments[0].dateTimeObject.getTime()/1e3;this.datetimeToDisplayTime=-e}}},{key:"reset",value:function(){this.inspectCache_=void 0}},{key:"probeSegmentInfo",value:function(t){var e=t.segment,i=t.playlist,n=void 0;return(n=e.map?this.probeMp4Segment_(t):this.probeTsSegment_(t))&&this.calculateSegmentTimeMapping_(t,n)&&(this.saveDiscontinuitySyncInfo_(t),i.syncInfo||(i.syncInfo={mediaSequence:i.mediaSequence+t.mediaIndex,time:e.start})),n}},{key:"probeMp4Segment_",value:function(t){var e=t.segment,i=Qs.timescale(e.map.bytes),n=Qs.startTime(i,t.bytes);return null!==t.timestampOffset&&(t.timestampOffset-=n),{start:n,end:n+e.duration}}},{key:"probeTsSegment_",value:function(t){var e=Jc(t.bytes,this.inspectCache_),i=void 0,n=void 0;return e?(e.video&&2===e.video.length?(this.inspectCache_=e.video[1].dts,i=e.video[0].dtsTime,n=e.video[1].dtsTime):e.audio&&2===e.audio.length&&(this.inspectCache_=e.audio[1].dts,i=e.audio[0].dtsTime,n=e.audio[1].dtsTime),{start:i,end:n,containsVideo:e.video&&2===e.video.length,containsAudio:e.audio&&2===e.audio.length}):null}},{key:"timestampOffsetForTimeline",value:function(t){return"undefined"==typeof this.timelines[t]?null:this.timelines[t].time}},{key:"mappingForTimeline",value:function(t){return"undefined"==typeof this.timelines[t]?null:this.timelines[t].mapping}},{key:"calculateSegmentTimeMapping_",value:function(t,e){var i=t.segment,n=this.timelines[t.timeline];if(null!==t.timestampOffset)n={time:t.startOfSegment,mapping:t.startOfSegment-e.start},this.timelines[t.timeline]=n,this.trigger("timestampoffset"),this.logger_("time mapping for timeline "+t.timeline+": [time: "+n.time+"] [mapping: "+n.mapping+"]"),i.start=t.startOfSegment,i.end=e.end+n.mapping;else{if(!n)return!1;i.start=e.start+n.mapping,i.end=e.end+n.mapping}return!0}},{key:"saveDiscontinuitySyncInfo_",value:function(t){var e=t.playlist,i=t.segment;if(i.discontinuity)this.discontinuities[i.timeline]={time:i.start,accuracy:0};else if(e.discontinuityStarts&&e.discontinuityStarts.length)for(var n=0;n<e.discontinuityStarts.length;n++){var r=e.discontinuityStarts[n],a=e.discontinuitySequence+n+1,s=r-t.mediaIndex,o=Math.abs(s);if(!this.discontinuities[a]||this.discontinuities[a].accuracy>o){var u=void 0;u=s<0?i.start-Sl(e,t.mediaIndex,r):i.end+Sl(e,t.mediaIndex+1,r),this.discontinuities[a]={time:u,accuracy:o}}}}}]),e}(),eh=new ac("./decrypter-worker.worker.js",function(t,e){var h,i,d,g,n,l,y,s,r=this;h=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},i=function(){function n(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(t,e,i){return e&&n(t.prototype,e),i&&n(t,i),t}}(),d=null,g=function(){function c(t){h(this,c),d||(d=function(){var t=[[[],[],[],[],[]],[[],[],[],[],[]]],e=t[0],i=t[1],n=e[4],r=i[4],a=void 0,s=void 0,o=void 0,u=[],l=[],c=void 0,h=void 0,d=void 0,p=void 0,f=void 0;for(a=0;a<256;a++)l[(u[a]=a<<1^283*(a>>7))^a]=a;for(s=o=0;!n[s];s^=c||1,o=l[o]||1)for(d=(d=o^o<<1^o<<2^o<<3^o<<4)>>8^255&d^99,f=16843009*u[h=u[c=u[r[n[s]=d]=s]]]^65537*h^257*c^16843008*s,p=257*u[d]^16843008*d,a=0;a<4;a++)e[a][s]=p=p<<24^p>>>8,i[a][d]=f=f<<24^f>>>8;for(a=0;a<5;a++)e[a]=e[a].slice(0),i[a]=i[a].slice(0);return t}()),this._tables=[[d[0][0].slice(),d[0][1].slice(),d[0][2].slice(),d[0][3].slice(),d[0][4].slice()],[d[1][0].slice(),d[1][1].slice(),d[1][2].slice(),d[1][3].slice(),d[1][4].slice()]];var e=void 0,i=void 0,n=void 0,r=void 0,a=void 0,s=this._tables[0][4],o=this._tables[1],u=t.length,l=1;if(4!==u&&6!==u&&8!==u)throw new Error("Invalid aes key size");for(r=t.slice(0),a=[],this._key=[r,a],e=u;e<4*u+28;e++)n=r[e-1],(e%u==0||8===u&&e%u==4)&&(n=s[n>>>24]<<24^s[n>>16&255]<<16^s[n>>8&255]<<8^s[255&n],e%u==0&&(n=n<<8^n>>>24^l<<24,l=l<<1^283*(l>>7))),r[e]=r[e-u]^n;for(i=0;e;i++,e--)n=r[3&i?e:e-4],a[i]=e<=4||i<4?n:o[0][s[n>>>24]]^o[1][s[n>>16&255]]^o[2][s[n>>8&255]]^o[3][s[255&n]]}return c.prototype.decrypt=function(t,e,i,n,r,a){var s=this._key[1],o=t^s[0],u=n^s[1],l=i^s[2],c=e^s[3],h=void 0,d=void 0,p=void 0,f=s.length/4-2,m=void 0,g=4,y=this._tables[1],v=y[0],_=y[1],b=y[2],T=y[3],S=y[4];for(m=0;m<f;m++)h=v[o>>>24]^_[u>>16&255]^b[l>>8&255]^T[255&c]^s[g],d=v[u>>>24]^_[l>>16&255]^b[c>>8&255]^T[255&o]^s[g+1],p=v[l>>>24]^_[c>>16&255]^b[o>>8&255]^T[255&u]^s[g+2],c=v[c>>>24]^_[o>>16&255]^b[u>>8&255]^T[255&l]^s[g+3],g+=4,o=h,u=d,l=p;for(m=0;m<4;m++)r[(3&-m)+a]=S[o>>>24]<<24^S[u>>16&255]<<16^S[l>>8&255]<<8^S[255&c]^s[g++],h=o,o=u,u=l,l=c,c=h},c}(),n=function(){function t(){h(this,t),this.listeners={}}return t.prototype.on=function(t,e){this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push(e)},t.prototype.off=function(t,e){if(!this.listeners[t])return!1;var i=this.listeners[t].indexOf(e);return this.listeners[t].splice(i,1),-1<i},t.prototype.trigger=function(t){var e=this.listeners[t];if(e)if(2===arguments.length)for(var i=e.length,n=0;n<i;++n)e[n].call(this,arguments[1]);else for(var r=Array.prototype.slice.call(arguments,1),a=e.length,s=0;s<a;++s)e[s].apply(this,r)},t.prototype.dispose=function(){this.listeners={}},t.prototype.pipe=function(e){this.on("data",function(t){e.push(t)})},t}(),l=function(e){function i(){h(this,i);var t=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,e.call(this,n));return t.jobs=[],t.delay=1,t.timeout_=null,t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(i,e),i.prototype.processJob_=function(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null},i.prototype.push=function(t){this.jobs.push(t),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))},i}(n),y=function(t){return t<<24|(65280&t)<<8|(16711680&t)>>8|t>>>24},s=function(){function u(t,e,i,n){h(this,u);var r=u.STEP,a=new Int32Array(t.buffer),s=new Uint8Array(t.byteLength),o=0;for(this.asyncStream_=new l,this.asyncStream_.push(this.decryptChunk_(a.subarray(o,o+r),e,i,s)),o=r;o<a.length;o+=r)i=new Uint32Array([y(a[o-4]),y(a[o-3]),y(a[o-2]),y(a[o-1])]),this.asyncStream_.push(this.decryptChunk_(a.subarray(o,o+r),e,i,s));this.asyncStream_.push(function(){var t;n(null,(t=s).subarray(0,t.byteLength-t[t.byteLength-1]))})}return u.prototype.decryptChunk_=function(e,i,n,r){return function(){var t=function(t,e,i){var n=new Int32Array(t.buffer,t.byteOffset,t.byteLength>>2),r=new g(Array.prototype.slice.call(e)),a=new Uint8Array(t.byteLength),s=new Int32Array(a.buffer),o=void 0,u=void 0,l=void 0,c=void 0,h=void 0,d=void 0,p=void 0,f=void 0,m=void 0;for(o=i[0],u=i[1],l=i[2],c=i[3],m=0;m<n.length;m+=4)h=y(n[m]),d=y(n[m+1]),p=y(n[m+2]),f=y(n[m+3]),r.decrypt(h,d,p,f,s,m),s[m]=y(s[m]^o),s[m+1]=y(s[m+1]^u),s[m+2]=y(s[m+2]^l),s[m+3]=y(s[m+3]^c),o=h,u=d,l=p,c=f;return a}(e,i,n);r.set(t,e.byteOffset)}},i(u,null,[{key:"STEP",get:function(){return 32e3}}]),u}(),new function(a){a.onmessage=function(t){var r=t.data,e=new Uint8Array(r.encrypted.bytes,r.encrypted.byteOffset,r.encrypted.byteLength),i=new Uint32Array(r.key.bytes,r.key.byteOffset,r.key.byteLength/4),n=new Uint32Array(r.iv.bytes,r.iv.byteOffset,r.iv.byteLength/4);new s(e,i,n,function(t,e){var i,n;a.postMessage((i={source:r.source,decrypted:e},n={},Object.keys(i).forEach(function(t){var e=i[t];ArrayBuffer.isView(e)?n[t]={bytes:e.buffer,byteOffset:e.byteOffset,byteLength:e.byteLength}:n[t]=e}),n),[e.buffer])})}}(r)}),ih=function(t,e){t.abort(),t.pause(),e&&e.activePlaylistLoader&&(e.activePlaylistLoader.pause(),e.activePlaylistLoader=null)},nh=function(t,e){(e.activePlaylistLoader=t).load()},rh={AUDIO:function(u,l){return function(){var t=l.segmentLoaders[u],e=l.mediaTypes[u],i=l.blacklistCurrentPlaylist;ih(t,e);var n=e.activeTrack(),r=e.activeGroup(),a=(r.filter(function(t){return t.default})[0]||r[0]).id,s=e.tracks[a];if(n!==s){for(var o in oa.log.warn("Problem encountered loading the alternate audio track.Switching back to default."),e.tracks)e.tracks[o].enabled=e.tracks[o]===s;e.onTrackChanged()}else i({message:"Problem encountered loading the default audio track."})}},SUBTITLES:function(n,r){return function(){var t=r.segmentLoaders[n],e=r.mediaTypes[n];oa.log.warn("Problem encountered loading the subtitle track.Disabling subtitle track."),ih(t,e);var i=e.activeTrack();i&&(i.mode="disabled"),e.onTrackChanged()}}},ah={AUDIO:function(t,e,i){if(e){var n=i.tech,r=i.requestOptions,a=i.segmentLoaders[t];e.on("loadedmetadata",function(){var t=e.media();a.playlist(t,r),(!n.paused()||t.endList&&"none"!==n.preload())&&a.load()}),e.on("loadedplaylist",function(){a.playlist(e.media(),r),n.paused()||a.load()}),e.on("error",rh[t](t,i))}},SUBTITLES:function(t,e,i){var n=i.tech,r=i.requestOptions,a=i.segmentLoaders[t],s=i.mediaTypes[t];e.on("loadedmetadata",function(){var t=e.media();a.playlist(t,r),a.track(s.activeTrack()),(!n.paused()||t.endList&&"none"!==n.preload())&&a.load()}),e.on("loadedplaylist",function(){a.playlist(e.media(),r),n.paused()||a.load()}),e.on("error",rh[t](t,i))}},sh=function(e,i){return function(t){return t.attributes[e]===i}},oh=function(e){return function(t){return t.resolvedUri===e}},uh={AUDIO:function(t,e){var i,n,r=e.hls,a=e.sourceType,s=e.segmentLoaders[t],o=e.requestOptions.withCredentials,u=e.master,l=u.mediaGroups,c=u.playlists,h=e.mediaTypes[t],d=h.groups,p=h.tracks,f=e.masterPlaylistLoader;for(var m in l[t]&&0!==Object.keys(l[t]).length||(l[t]={main:{default:{default:!0}}}),l[t]){d[m]||(d[m]=[]);var g=c.filter(sh(t,m));for(var y in l[t][m]){var v=l[t][m][y];g.filter(oh(v.resolvedUri)).length&&delete v.resolvedUri;var _=void 0;if(_=v.resolvedUri?new vl(v.resolvedUri,r,o):v.playlists&&"dash"===a?new Lc(v.playlists[0],r,o,f):null,v=oa.mergeOptions({id:y,playlistLoader:_},v),ah[t](t,v.playlistLoader,e),d[m].push(v),"undefined"==typeof p[y]){var b=new oa.AudioTrack({id:y,kind:(i=v,n=void 0,n=i.default?"main":"alternative",i.characteristics&&0<=i.characteristics.indexOf("public.accessibility.describes-video")&&(n="main-desc"),n),enabled:!1,language:v.language,default:v.default,label:y});p[y]=b}}}s.on("error",rh[t](t,e))},SUBTITLES:function(t,e){var i=e.tech,n=e.hls,r=e.sourceType,a=e.segmentLoaders[t],s=e.requestOptions.withCredentials,o=e.master.mediaGroups,u=e.mediaTypes[t],l=u.groups,c=u.tracks,h=e.masterPlaylistLoader;for(var d in o[t])for(var p in l[d]||(l[d]=[]),o[t][d])if(!o[t][d][p].forced){var f=o[t][d][p],m=void 0;if("hls"===r?m=new vl(f.resolvedUri,n,s):"dash"===r&&(m=new Lc(f.playlists[0],n,s,h)),f=oa.mergeOptions({id:p,playlistLoader:m},f),ah[t](t,f.playlistLoader,e),l[d].push(f),"undefined"==typeof c[p]){var g=i.addRemoteTextTrack({id:p,kind:"subtitles",default:f.default&&f.autoselect,language:f.language,label:p},!1).track;c[p]=g}}a.on("error",rh[t](t,e))},"CLOSED-CAPTIONS":function(t,e){var i=e.tech,n=e.master.mediaGroups,r=e.mediaTypes[t],a=r.groups,s=r.tracks;for(var o in n[t])for(var u in a[o]||(a[o]=[]),n[t][o]){var l=n[t][o][u];if(l.instreamId.match(/CC\d/)&&(a[o].push(oa.mergeOptions({id:u},l)),"undefined"==typeof s[u])){var c=i.addRemoteTextTrack({id:l.instreamId,kind:"captions",default:l.default&&l.autoselect,language:l.language,label:u},!1).track;s[u]=c}}}},lh={AUDIO:function(i,n){return function(){var t=n.mediaTypes[i].tracks;for(var e in t)if(t[e].enabled)return t[e];return null}},SUBTITLES:function(i,n){return function(){var t=n.mediaTypes[i].tracks;for(var e in t)if("showing"===t[e].mode)return t[e];return null}}},ch=function(e){["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(function(t){uh[t](t,e)});var i=e.mediaTypes,t=e.masterPlaylistLoader,n=e.tech,r=e.hls;["AUDIO","SUBTITLES"].forEach(function(t){var a,s,o,u,l,c;i[t].activeGroup=(a=t,s=e,function(e){var t=s.masterPlaylistLoader,i=s.mediaTypes[a].groups,n=t.media();if(!n)return null;var r=null;return n.attributes[a]&&(r=i[n.attributes[a]]),r=r||i.main,"undefined"==typeof e?r:null===e?null:r.filter(function(t){return t.id===e.id})[0]||null}),i[t].activeTrack=lh[t](t,e),i[t].onGroupChanged=(o=t,u=e,function(){var t=u.segmentLoaders,e=t[o],i=t.main,n=u.mediaTypes[o],r=n.activeTrack(),a=n.activeGroup(r),s=n.activePlaylistLoader;ih(e,n),a&&(a.playlistLoader?(e.resyncLoader(),nh(a.playlistLoader,n)):s&&i.resetEverything())}),i[t].onTrackChanged=(l=t,c=e,function(){var t=c.segmentLoaders,e=t[l],i=t.main,n=c.mediaTypes[l],r=n.activeTrack(),a=n.activeGroup(r),s=n.activePlaylistLoader;ih(e,n),a&&(a.playlistLoader?(s!==a.playlistLoader&&(e.track&&e.track(r),e.resetEverything()),nh(a.playlistLoader,n)):i.resetEverything())})});var a=i.AUDIO.activeGroup(),s=(a.filter(function(t){return t.default})[0]||a[0]).id;i.AUDIO.tracks[s].enabled=!0,i.AUDIO.onTrackChanged(),t.on("mediachange",function(){["AUDIO","SUBTITLES"].forEach(function(t){return i[t].onGroupChanged()})});var o=function(){i.AUDIO.onTrackChanged(),n.trigger({type:"usage",name:"hls-audio-change"})};for(var u in n.audioTracks().addEventListener("change",o),n.remoteTextTracks().addEventListener("change",i.SUBTITLES.onTrackChanged),r.on("dispose",function(){n.audioTracks().removeEventListener("change",o),n.remoteTextTracks().removeEventListener("change",i.SUBTITLES.onTrackChanged)}),n.clearTracks("audio"),i.AUDIO.tracks)n.audioTracks().addTrack(i.AUDIO.tracks[u])},hh=void 0,dh=["mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaBytesTransferred"],ph=function(t){function f(t){al(this,f);var e,i=ul(this,(f.__proto__||Object.getPrototypeOf(f)).call(this)),n=t.url,r=t.withCredentials,a=t.tech,s=t.bandwidth,o=t.externHls,u=t.useCueTags,l=t.blacklistDuration,c=t.enableLowInitialPlaylist,h=t.sourceType,d=t.seekTo;if(!n)throw new Error("A non-empty playlist URL is required");hh=o,i.withCredentials=r,i.tech_=a,i.hls_=a.hls,i.seekTo_=d,i.sourceType_=h,i.useCueTags_=u,i.blacklistDuration=l,i.enableLowInitialPlaylist=c,i.useCueTags_&&(i.cueTagsTrack_=i.tech_.addTextTrack("metadata","ad-cues"),i.cueTagsTrack_.inBandMetadataTrackDispatchType=""),i.requestOptions_={withCredentials:i.withCredentials,timeout:null},i.mediaTypes_=(e={},["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(function(t){e[t]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:Pc,activeTrack:Pc,onGroupChanged:Pc,onTrackChanged:Pc}}),e),i.mediaSource=new oa.MediaSource,i.mediaSource.addEventListener("sourceopen",i.handleSourceOpen_.bind(i)),i.seekable_=oa.createTimeRanges(),i.hasPlayed_=function(){return!1},i.syncController_=new th(t),i.segmentMetadataTrack_=a.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},!1).track,i.decrypter_=new eh,i.inbandTextTracks_={};var p={hls:i.hls_,mediaSource:i.mediaSource,currentTime:i.tech_.currentTime.bind(i.tech_),seekable:function(){return i.seekable()},seeking:function(){return i.tech_.seeking()},duration:function(){return i.mediaSource.duration},hasPlayed:function(){return i.hasPlayed_()},goalBufferLength:function(){return i.goalBufferLength()},bandwidth:s,syncController:i.syncController_,decrypter:i.decrypter_,sourceType:i.sourceType_,inbandTextTracks:i.inbandTextTracks_};return i.masterPlaylistLoader_="dash"===i.sourceType_?new Lc(n,i.hls_,i.withCredentials):new vl(n,i.hls_,i.withCredentials),i.setupMasterPlaylistLoaderListeners_(),i.mainSegmentLoader_=new Xc(oa.mergeOptions(p,{segmentMetadataTrack:i.segmentMetadataTrack_,loaderType:"main"}),t),i.audioSegmentLoader_=new Xc(oa.mergeOptions(p,{loaderType:"audio"}),t),i.subtitleSegmentLoader_=new Kc(oa.mergeOptions(p,{loaderType:"vtt"}),t),i.setupSegmentLoaderListeners_(),dh.forEach(function(t){i[t+"_"]=function(t){return this.audioSegmentLoader_[t]+this.mainSegmentLoader_[t]}.bind(i,t)}),i.logger_=Oc("MPC"),i.masterPlaylistLoader_.load(),i}return ol(f,oa.EventTarget),sl(f,[{key:"setupMasterPlaylistLoaderListeners_",value:function(){var n=this;this.masterPlaylistLoader_.on("loadedmetadata",function(){var t=n.masterPlaylistLoader_.media(),e=1.5*n.masterPlaylistLoader_.targetDuration*1e3;Il(n.masterPlaylistLoader_.master,n.masterPlaylistLoader_.media())?n.requestOptions_.timeout=0:n.requestOptions_.timeout=e,t.endList&&"none"!==n.tech_.preload()&&(n.mainSegmentLoader_.playlist(t,n.requestOptions_),n.mainSegmentLoader_.load()),ch({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 oa.log.warn("Failed to create SourceBuffers",t),n.mediaSource.endOfStream("decode")}n.setupFirstPlay(),n.trigger("selectedinitialmedia")}),this.masterPlaylistLoader_.on("loadedplaylist",function(){var t=n.masterPlaylistLoader_.media();if(!t){n.excludeUnsupportedVariants_();var e=void 0;return n.enableLowInitialPlaylist&&(e=n.selectInitialPlaylist()),e||(e=n.selectPlaylist()),n.initialMedia_=e,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){var i=function(){var t=n.seekable();0!==t.length&&n.mediaSource.addSeekableRange_(t.start(0),t.end(0))};if(n.duration()!==1/0){n.tech_.one("durationchange",function t(){n.duration()===1/0?i():n.tech_.one("durationchange",t)})}else i()}}),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(),e=1.5*n.masterPlaylistLoader_.targetDuration*1e3;Il(n.masterPlaylistLoader_.master,n.masterPlaylistLoader_.media())?n.requestOptions_.timeout=0:n.requestOptions_.timeout=e,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(t,e){var i=t.mediaGroups||{},n=!0,r=Object.keys(i.AUDIO);for(var a in i.AUDIO)for(var s in i.AUDIO[a]){i.AUDIO[a][s].uri||(n=!1)}n&&this.tech_.trigger({type:"usage",name:"hls-demuxed"}),Object.keys(i.SUBTITLES).length&&this.tech_.trigger({type:"usage",name:"hls-webvtt"}),hh.Playlist.isAes(e)&&this.tech_.trigger({type:"usage",name:"hls-aes"}),hh.Playlist.isFmp4(e)&&this.tech_.trigger({type:"usage",name:"hls-fmp4"}),r.length&&1<Object.keys(i.AUDIO[r[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 a=this;this.mainSegmentLoader_.on("bandwidthupdate",function(){var t=a.selectPlaylist(),e=a.masterPlaylistLoader_.media(),i=a.tech_.buffered(),n=i.length?i.end(i.length-1)-a.tech_.currentTime():0,r=a.bufferLowWaterLine();(!e.endList||a.duration()<xc.MAX_BUFFER_LOW_WATER_LINE||t.attributes.BANDWIDTH<e.attributes.BANDWIDTH||r<=n)&&a.masterPlaylistLoader_.media(t),a.tech_.trigger("bandwidthupdate")}),this.mainSegmentLoader_.on("progress",function(){a.trigger("progress")}),this.mainSegmentLoader_.on("error",function(){a.blacklistCurrentPlaylist(a.mainSegmentLoader_.error())}),this.mainSegmentLoader_.on("syncinfoupdate",function(){a.onSyncInfoUpdate_()}),this.mainSegmentLoader_.on("timestampoffset",function(){a.tech_.trigger({type:"usage",name:"hls-timestamp-offset"})}),this.audioSegmentLoader_.on("syncinfoupdate",function(){a.onSyncInfoUpdate_()}),this.mainSegmentLoader_.on("ended",function(){a.onEndOfStream()}),this.mainSegmentLoader_.on("earlyabort",function(){a.blacklistCurrentPlaylist({message:"Aborted early because there isn't enough bandwidth to complete the request without rebuffering."},120)}),this.mainSegmentLoader_.on("reseteverything",function(){a.tech_.trigger("hls-reset")}),this.mainSegmentLoader_.on("segmenttimemapping",function(t){a.tech_.trigger({type:"hls-segment-time-mapping",mapping:t.mapping})}),this.audioSegmentLoader_.on("ended",function(){a.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 t=this.selectPlaylist();t!==this.masterPlaylistLoader_.media()&&(this.masterPlaylistLoader_.media(t),this.mainSegmentLoader_.resetLoader())}},{key:"fastQualityChange_",value:function(){var t=this,e=this.selectPlaylist();e!==this.masterPlaylistLoader_.media()&&(this.masterPlaylistLoader_.media(e),this.mainSegmentLoader_.resetEverything(function(){oa.browser.IE_VERSION||oa.browser.IS_EDGE?t.tech_.setCurrentTime(t.tech_.currentTime()+.04):t.tech_.setCurrentTime(t.tech_.currentTime())}))}},{key:"play",value:function(){if(!this.setupFirstPlay()){this.tech_.ended()&&this.seekTo_(0),this.hasPlayed_()&&this.load();var t=this.tech_.seekable();return this.tech_.duration()===1/0&&this.tech_.currentTime()<t.start(0)?this.seekTo_(t.end(t.length-1)):void 0}}},{key:"setupFirstPlay",value:function(){var t=this,e=this.masterPlaylistLoader_.media();if(!e||this.tech_.paused()||this.hasPlayed_())return!1;if(!e.endList){var i=this.seekable();if(!i.length)return!1;if(oa.browser.IE_VERSION&&0===this.tech_.readyState())return this.tech_.one("loadedmetadata",function(){t.trigger("firstplay"),t.seekTo_(i.end(0)),t.hasPlayed_=function(){return!0}}),!1;this.trigger("firstplay"),this.seekTo_(i.end(0))}return this.hasPlayed_=function(){return!0},this.load(),!0}},{key:"handleSourceOpen_",value:function(){try{this.setupSourceBuffers_()}catch(t){return oa.log.warn("Failed to create Source Buffers",t),this.mediaSource.endOfStream("decode")}if(this.tech_.autoplay()){var t=this.tech_.play();"undefined"!=typeof t&&"function"==typeof t.then&&t.then(null,function(t){})}this.trigger("sourceopen")}},{key:"onEndOfStream",value:function(){var t=this.mainSegmentLoader_.ended_;this.mediaTypes_.AUDIO.activePlaylistLoader&&(t=!this.mainSegmentLoader_.startingMedia_||this.mainSegmentLoader_.startingMedia_.containsVideo?t&&this.audioSegmentLoader_.ended_:this.audioSegmentLoader_.ended_),t&&this.mediaSource.endOfStream()}},{key:"stuckAtPlaylistEnd_",value:function(t){if(!this.seekable().length)return!1;var e=this.syncController_.getExpiredTime(t,this.mediaSource.duration);if(null===e)return!1;var i=hh.Playlist.playlistEnd(t,e),n=this.tech_.currentTime(),r=this.tech_.buffered();if(!r.length)return i-n<=.1;var a=r.end(r.length-1);return a-n<=.1&&i-a<=.1}},{key:"blacklistCurrentPlaylist",value:function(){var t,e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},i=arguments[1],n=void 0;if(n=e.playlist||this.masterPlaylistLoader_.media(),i=i||e.blacklistDuration||this.blacklistDuration,!n){this.error=e;try{return this.mediaSource.endOfStream("network")}catch(t){return this.trigger("error")}}var r=1===this.masterPlaylistLoader_.master.playlists.filter(Ul).length;return r?(oa.log.warn("Problem encountered with the current HLS playlist. Trying again since it is the final playlist."),this.tech_.trigger("retryplaylist"),this.masterPlaylistLoader_.load(r)):(n.excludeUntil=Date.now()+1e3*i,this.tech_.trigger("blacklistplaylist"),this.tech_.trigger({type:"usage",name:"hls-rendition-blacklisted"}),t=this.selectPlaylist(),oa.log.warn("Problem encountered with the current HLS playlist."+(e.message?" "+e.message:"")+" Switching to another playlist."),this.masterPlaylistLoader_.media(t))}},{key:"pauseLoading",value:function(){this.mainSegmentLoader_.pause(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.pause(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.pause()}},{key:"setCurrentTime",value:function(t){var e=Gl(this.tech_.buffered(),t);return this.masterPlaylistLoader_&&this.masterPlaylistLoader_.media()&&this.masterPlaylistLoader_.media().segments?e&&e.length?t:(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:hh.Playlist.duration(this.masterPlaylistLoader_.media()):0}},{key:"seekable",value:function(){return this.seekable_}},{key:"onSyncInfoUpdate_",value:function(){var t=void 0,e=void 0;if(this.masterPlaylistLoader_){var i=this.masterPlaylistLoader_.media();if(i){var n=this.syncController_.getExpiredTime(i,this.mediaSource.duration);if(null!==n&&0!==(t=hh.Playlist.seekable(i,n)).length){if(this.mediaTypes_.AUDIO.activePlaylistLoader){if(i=this.mediaTypes_.AUDIO.activePlaylistLoader.media(),null===(n=this.syncController_.getExpiredTime(i,this.mediaSource.duration)))return;if(0===(e=hh.Playlist.seekable(i,n)).length)return}e?e.start(0)>t.end(0)||t.start(0)>e.end(0)?this.seekable_=t:this.seekable_=oa.createTimeRanges([[e.start(0)>t.start(0)?e.start(0):t.start(0),e.end(0)<t.end(0)?e.end(0):t.end(0)]]):this.seekable_=t,this.logger_("seekable updated ["+Yl(this.seekable_)+"]"),this.tech_.trigger("seekablechanged")}}}}},{key:"updateDuration",value:function(){var e=this,t=this.mediaSource.duration,i=hh.Playlist.duration(this.masterPlaylistLoader_.media()),n=this.tech_.buffered(),r=function t(){e.mediaSource.duration=i,e.tech_.trigger("durationchange"),e.mediaSource.removeEventListener("sourceopen",t)};0<n.length&&(i=Math.max(i,n.end(n.length-1))),t!==i&&("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 e=n.mediaTypes_[t].groups;for(var i in e)e[i].forEach(function(t){t.playlistLoader&&t.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,e=this.masterPlaylistLoader_.media();if(e&&"open"===this.mediaSource.readyState){if((t=mc(this.masterPlaylistLoader_.master,e)).length<1)return this.error="No compatible SourceBuffer configuration for the variant stream:"+e.resolvedUri,this.mediaSource.endOfStream("decode");this.configureLoaderMimeTypes_(t),this.excludeIncompatibleVariants_(e)}}},{key:"configureLoaderMimeTypes_",value:function(t){var e=1<t.length&&-1===t[0].indexOf(",")&&t[0]!==t[1]?new oa.EventTarget:null;this.mainSegmentLoader_.mimeType(t[0],e),t[1]&&this.audioSegmentLoader_.mimeType(t[1],e)}},{key:"excludeUnsupportedVariants_",value:function(){this.master().playlists.forEach(function(t){t.attributes.CODECS&&v.MediaSource&&v.MediaSource.isTypeSupported&&!v.MediaSource.isTypeSupported('video/mp4; codecs="'+t.attributes.CODECS.replace(/avc1\.(\d+)\.(\d+)/i,function(t){return dc([t])[0]})+'"')&&(t.excludeUntil=1/0)})}},{key:"excludeIncompatibleVariants_",value:function(t){var i=2,n=null,e=void 0;t.attributes.CODECS&&(e=pc(t.attributes.CODECS),n=e.videoCodec,i=e.codecCount),this.master().playlists.forEach(function(t){var e={codecCount:2,videoCodec:null};t.attributes.CODECS&&(e=pc(t.attributes.CODECS)),e.codecCount!==i&&(t.excludeUntil=1/0),e.videoCodec!==n&&(t.excludeUntil=1/0)})}},{key:"updateAdCues_",value:function(t){var e=0,i=this.seekable();i.length&&(e=i.start(0)),function(t,e){var i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0;if(t.segments)for(var n=i,r=void 0,a=0;a<t.segments.length;a++){var s=t.segments[a];if(r||(r=Qc(e,n+s.duration/2)),r){if("cueIn"in s){r.endTime=n,r.adEndTime=n,n+=s.duration,r=null;continue}if(n<r.endTime){n+=s.duration;continue}r.endTime+=s.duration}else if("cueOut"in s&&((r=new v.VTTCue(n,n+s.duration,s.cueOut)).adStartTime=n,r.adEndTime=n+parseFloat(s.cueOut),e.addCue(r)),"cueOutCont"in s){var o,u,l=s.cueOutCont.split("/").map(parseFloat),c=ll(l,2);o=c[0],u=c[1],(r=new v.VTTCue(n,n+s.duration,"")).adStartTime=n-o,r.adEndTime=r.adStartTime+u,e.addCue(r)}n+=s.duration}}(t,this.cueTagsTrack_,e)}},{key:"goalBufferLength",value:function(){var t=this.tech_.currentTime(),e=xc.GOAL_BUFFER_LENGTH,i=xc.GOAL_BUFFER_LENGTH_RATE,n=Math.max(e,xc.MAX_GOAL_BUFFER_LENGTH);return Math.min(e+t*i,n)}},{key:"bufferLowWaterLine",value:function(){var t=this.tech_.currentTime(),e=xc.BUFFER_LOW_WATER_LINE,i=xc.BUFFER_LOW_WATER_LINE_RATE,n=Math.max(e,xc.MAX_BUFFER_LOW_WATER_LINE);return Math.min(e+t*i,n)}}]),f}(),fh=function t(e,i,n){al(this,t);var r,a,s,o=e.masterPlaylistController_,u=o[(e.options_.smoothQualityChange?"smooth":"fast")+"QualityChange_"].bind(o);if(i.attributes.RESOLUTION){var l=i.attributes.RESOLUTION;this.width=l.width,this.height=l.height}this.bandwidth=i.attributes.BANDWIDTH,this.id=n,this.enabled=(r=e.playlists,a=i.uri,s=u,function(t){var e=r.master.playlists[a],i=Pl(e),n=Ul(e);return"undefined"==typeof t?n:(t?delete e.disabled:e.disabled=!0,t===n||i||(s(),t?r.trigger("renditionenabled"):r.trigger("renditiondisabled")),t)})},mh=["seeking","seeked","pause","playing","error"],gh=function(){function s(t){var e=this;al(this,s),this.tech_=t.tech,this.seekable=t.seekable,this.seekTo=t.seekTo,this.consecutiveUpdates=0,this.lastRecordedTime=null,this.timer_=null,this.checkCurrentTimeTimeout_=null,this.logger_=Oc("PlaybackWatcher"),this.logger_("initialize");var i=function(){return e.monitorCurrentTime_()},n=function(){return e.techWaiting_()},r=function(){return e.cancelTimer_()},a=function(){return e.fixesBadSeeks_()};this.tech_.on("seekablechanged",a),this.tech_.on("waiting",n),this.tech_.on(mh,r),this.tech_.on("canplay",i),this.dispose=function(){e.logger_("dispose"),e.tech_.off("seekablechanged",a),e.tech_.off("waiting",n),e.tech_.off(mh,r),e.tech_.off("canplay",i),e.checkCurrentTimeTimeout_&&v.clearTimeout(e.checkCurrentTimeTimeout_),e.cancelTimer_()}}return sl(s,[{key:"monitorCurrentTime_",value:function(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&v.clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=v.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 t=this.tech_.currentTime(),e=this.tech_.buffered();if(this.lastRecordedTime===t&&(!e.length||t+.1>=e.end(e.length-1)))return this.techWaiting_();5<=this.consecutiveUpdates&&t===this.lastRecordedTime?(this.consecutiveUpdates++,this.waiting_()):t===this.lastRecordedTime?this.consecutiveUpdates++:(this.consecutiveUpdates=0,this.lastRecordedTime=t)}}},{key:"cancelTimer_",value:function(){this.consecutiveUpdates=0,this.timer_&&(this.logger_("cancelTimer_"),clearTimeout(this.timer_)),this.timer_=null}},{key:"fixesBadSeeks_",value:function(){var t=this.tech_.seeking(),e=this.seekable(),i=this.tech_.currentTime(),n=void 0;t&&this.afterSeekableWindow_(e,i)&&(n=e.end(e.length-1));t&&this.beforeSeekableWindow_(e,i)&&(n=e.start(0)+.1);return"undefined"!=typeof n&&(this.logger_("Trying to seek outside of seekable at time "+i+" with seekable range "+Yl(e)+". Seeking to "+n+"."),this.seekTo(n),!0)}},{key:"waiting_",value:function(){if(!this.techWaiting_()){var t=this.tech_.currentTime(),e=this.tech_.buffered(),i=Gl(e,t);return i.length&&t+3<=i.end(0)?(this.cancelTimer_(),this.seekTo(t),this.logger_("Stopped at "+t+" while inside a buffered region ["+i.start(0)+" -> "+i.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 t=this.seekable(),e=this.tech_.currentTime();if(this.tech_.seeking()&&this.fixesBadSeeks_())return!0;if(this.tech_.seeking()||null!==this.timer_)return!0;if(this.beforeSeekableWindow_(t,e)){var i=t.end(t.length-1);return this.logger_("Fell out of live window at time "+e+". Seeking to live point (seekable end) "+i),this.cancelTimer_(),this.seekTo(i),this.tech_.trigger({type:"usage",name:"hls-live-resync"}),!0}var n=this.tech_.buffered(),r=Xl(n,e);if(this.videoUnderflow_(r,n,e))return this.cancelTimer_(),this.seekTo(e),this.tech_.trigger({type:"usage",name:"hls-video-underflow"}),!0;if(0<r.length){var a=r.start(0)-e;return this.logger_("Stopped at "+e+", setting timer for "+a+", seeking to "+r.start(0)),this.timer_=setTimeout(this.skipTheGap_.bind(this),1e3*a,e),!0}return!1}},{key:"afterSeekableWindow_",value:function(t,e){return!!t.length&&e>t.end(t.length-1)+.1}},{key:"beforeSeekableWindow_",value:function(t,e){return!!(t.length&&0<t.start(0)&&e<t.start(0)-.1)}},{key:"videoUnderflow_",value:function(t,e,i){if(0===t.length){var n=this.gapFromVideoUnderflow_(e,i);if(n)return this.logger_("Encountered a gap in video from "+n.start+" to "+n.end+". Seeking to current time "+i),!0}return!1}},{key:"skipTheGap_",value:function(t){var e=this.tech_.buffered(),i=this.tech_.currentTime(),n=Xl(e,i);this.cancelTimer_(),0!==n.length&&i===t&&(this.logger_("skipTheGap_:","currentTime:",i,"scheduled currentTime:",t,"nextRange start:",n.start(0)),this.seekTo(n.start(0)+zl),this.tech_.trigger({type:"usage",name:"hls-gap-skip"}))}},{key:"gapFromVideoUnderflow_",value:function(t,e){for(var i=function(t){if(t.length<2)return oa.createTimeRanges();for(var e=[],i=1;i<t.length;i++){var n=t.end(i-1),r=t.start(i);e.push([n,r])}return oa.createTimeRanges(e)}(t),n=0;n<i.length;n++){var r=i.start(n),a=i.end(n);if(e-r<4&&2<e-r)return{start:r,end:a}}return null}}]),s}(),yh={errorInterval:30,getSource:function(t){return t(this.tech({IWillNotUseThisInPlugins:!0}).currentSource_)}},vh=function(t){!function e(i,t){var n=0,r=0,a=oa.mergeOptions(yh,t);i.ready(function(){i.trigger({type:"usage",name:"hls-error-reload-initialized"})});var s=function(){r&&i.currentTime(r)},o=function(t){null!=t&&(r=i.duration()!==1/0&&i.currentTime()||0,i.one("loadedmetadata",s),i.src(t),i.trigger({type:"usage",name:"hls-error-reload"}),i.play())},u=function(){if(Date.now()-n<1e3*a.errorInterval)i.trigger({type:"usage",name:"hls-error-reload-canceled"});else{if(a.getSource&&"function"==typeof a.getSource)return n=Date.now(),a.getSource.call(i,o);oa.log.error("ERROR: reloadSourceOnError - The option getSource must be a function!")}},l=function t(){i.off("loadedmetadata",s),i.off("error",u),i.off("dispose",t)};i.on("error",u),i.on("dispose",l),i.reloadSourceOnError=function(t){l(),e(i,t)}}(this,t)};oa.use("*",function(e){return{setSource:function(t,e){e(null,t)},setCurrentTime:function(t){return e.vhs&&e.currentSource().src===e.vhs.source_.src&&e.vhs.setCurrentTime(t),t},play:function(){e.vhs&&e.currentSource().src===e.vhs.source_.src&&e.vhs.setCurrentTime(e.currentTime())}}});var _h={PlaylistLoader:vl,Playlist:Dl,Decrypter:nl,AsyncStream:tl,decrypt:il,utils:ql,STANDARD_PLAYLIST_SELECTOR:function(){return function(t,e,i,n,r){var a=t.playlists.map(function(t){var e,i;return e=t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width,i=t.attributes.RESOLUTION&&t.attributes.RESOLUTION.height,{bandwidth:t.attributes.BANDWIDTH||v.Number.MAX_VALUE,width:e,height:i,playlist:t}});qc(a,function(t,e){return t.bandwidth-e.bandwidth});var s=(a=a.filter(function(t){return!Dl.isIncompatible(t.playlist)})).filter(function(t){return Dl.isEnabled(t.playlist)});s.length||(s=a.filter(function(t){return!Dl.isDisabled(t.playlist)}));var o=s.filter(function(t){return t.bandwidth*xc.BANDWIDTH_VARIANCE<e}),u=o[o.length-1],l=o.filter(function(t){return t.bandwidth===u.bandwidth})[0];if(!1===r){var c=l||s[0]||a[0];return c?c.playlist:null}var h=o.filter(function(t){return t.width&&t.height});qc(h,function(t,e){return t.width-e.width});var d=h.filter(function(t){return t.width===i&&t.height===n});u=d[d.length-1];var p=d.filter(function(t){return t.bandwidth===u.bandwidth})[0],f=void 0,m=void 0,g=void 0;p||(m=(f=h.filter(function(t){return t.width>i||t.height>n})).filter(function(t){return t.width===f[0].width&&t.height===f[0].height}),u=m[m.length-1],g=m.filter(function(t){return t.bandwidth===u.bandwidth})[0]);var y=g||p||l||s[0]||a[0];return y?y.playlist:null}(this.playlists.master,this.systemBandwidth,parseInt(Hc(this.tech_.el(),"width"),10),parseInt(Hc(this.tech_.el(),"height"),10),this.limitRenditionByPlayerDimensions)},INITIAL_PLAYLIST_SELECTOR:function(){var t=this.playlists.master.playlists.filter(Dl.isEnabled);return qc(t,function(t,e){return zc(t,e)}),t.filter(function(t){return pc(t.attributes.CODECS).videoCodec})[0]||null},comparePlaylistBandwidth:zc,comparePlaylistResolution:function(t,e){var i=void 0,n=void 0;return t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width&&(i=t.attributes.RESOLUTION.width),i=i||v.Number.MAX_VALUE,e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(n=e.attributes.RESOLUTION.width),i===(n=n||v.Number.MAX_VALUE)&&t.attributes.BANDWIDTH&&e.attributes.BANDWIDTH?t.attributes.BANDWIDTH-e.attributes.BANDWIDTH:i-n},xhr:Bl()};["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(e){Object.defineProperty(_h,e,{get:function(){return oa.log.warn("using Hls."+e+" is UNSAFE be sure you know what you are doing"),xc[e]},set:function(t){oa.log.warn("using Hls."+e+" is UNSAFE be sure you know what you are doing"),"number"!=typeof t||t<0?oa.log.warn("value of Hls."+e+" must be greater than or equal to 0"):xc[e]=t}})});var bh=function(t){if(/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i.test(t))return"hls";return/^application\/dash\+xml/i.test(t)?"dash":null},Th=function(t,e){for(var i=e.media(),n=-1,r=0;r<t.length;r++)if(t[r].id===i.uri){n=r;break}t.selectedIndex_=n,t.trigger({selectedIndex:n,type:"change"})};_h.canPlaySource=function(){return oa.log.warn("HLS is no longer a tech. Please remove it from your player's techOrder.")};var Sh=function(t){if("dash"===t.options_.sourceType){var e=oa.players[t.tech_.options_.playerId];if(e.eme){var i=function(t,e,i){if(!t)return t;var n={};for(var r in t)n[r]={audioContentType:'audio/mp4; codecs="'+i.attributes.CODECS+'"',videoContentType:'video/mp4; codecs="'+e.attributes.CODECS+'"'},e.contentProtection&&e.contentProtection[r]&&e.contentProtection[r].pssh&&(n[r].pssh=e.contentProtection[r].pssh),"string"==typeof t[r]&&(n[r].url=t[r]);return oa.mergeOptions(t,n)}(t.source_.keySystems,t.playlists.media(),t.masterPlaylistController_.mediaTypes_.AUDIO.activePlaylistLoader.media());i&&(e.currentSource().keySystems=i,e.eme.initializeMediaKeys&&e.eme.initializeMediaKeys())}}};_h.supportsNativeHls=function(){var e=d.createElement("video");if(!oa.getTech("Html5").isSupported())return!1;return["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(e.canPlayType(t))})}(),_h.supportsNativeDash=!!oa.getTech("Html5").isSupported()&&/maybe|probably/i.test(d.createElement("video").canPlayType("application/dash+xml")),_h.supportsTypeNatively=function(t){return"hls"===t?_h.supportsNativeHls:"dash"===t&&_h.supportsNativeDash},_h.isSupported=function(){return oa.log.warn("HLS is no longer a tech. Please remove it from your player's techOrder.")};var kh=oa.getComponent("Component"),wh=function(t){function a(t,e,i){al(this,a);var n=ul(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,e,i.hls));if(e.options_&&e.options_.playerId){var r=oa(e.options_.playerId);r.hasOwnProperty("hls")||Object.defineProperty(r,"hls",{get:function(){return oa.log.warn("player.hls is deprecated. Use player.tech().hls instead."),e.trigger({type:"usage",name:"hls-player-access"}),n}}),r.vhs=n,r.dash=n}if(n.tech_=e,n.source_=t,n.stats={},n.setOptions_(),n.options_.overrideNative&&e.overrideNativeAudioTracks&&e.overrideNativeVideoTracks)e.overrideNativeAudioTracks(!0),e.overrideNativeVideoTracks(!0);else if(n.options_.overrideNative&&(e.featuresNativeVideoTracks||e.featuresNativeAudioTracks))throw new Error("Overriding native HLS requires emulated tracks. See https://git.io/vMpjB");return n.on(d,["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],function(t){var e=d.fullscreenElement||d.webkitFullscreenElement||d.mozFullScreenElement||d.msFullscreenElement;e&&e.contains(n.tech_.el())&&n.masterPlaylistController_.smoothQualityChange_()}),n.on(n.tech_,"seeking",function(){this.tech_.seeking()&&0===this.tech_.currentTime()&&this.tech_.player_.loop()&&this.setCurrentTime(0)}),n.on(n.tech_,"error",function(){this.masterPlaylistController_&&this.masterPlaylistController_.pauseLoading()}),n.on(n.tech_,"play",n.play),n}return ol(a,kh),sl(a,[{key:"setOptions_",value:function(){var e=this;this.options_.withCredentials=this.options_.withCredentials||!1,this.options_.limitRenditionByPlayerDimensions=!1!==this.options_.limitRenditionByPlayerDimensions,this.options_.smoothQualityChange=this.options_.smoothQualityChange||!1,"number"!=typeof this.options_.blacklistDuration&&(this.options_.blacklistDuration=300),"number"!=typeof this.options_.bandwidth&&(this.options_.bandwidth=xc.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===xc.INITIAL_BANDWIDTH,["withCredentials","limitRenditionByPlayerDimensions","bandwidth","smoothQualityChange"].forEach(function(t){"undefined"!=typeof e.source_[t]&&(e.options_[t]=e.source_[t])}),this.bandwidth=this.options_.bandwidth,this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions}},{key:"src",value:function(t,e){var n=this;t&&(this.setOptions_(),this.options_.url=this.source_.src,this.options_.tech=this.tech_,this.options_.externHls=_h,this.options_.sourceType=bh(e),this.options_.seekTo=function(t){n.tech_.setCurrentTime(t),n.setCurrentTime(t)},this.masterPlaylistController_=new ph(this.options_),this.playbackWatcher_=new gh(oa.mergeOptions(this.options_,{seekable:function(){return n.seekable()}})),this.masterPlaylistController_.on("error",function(){oa.players[n.tech_.options_.playerId].error(n.masterPlaylistController_.error)}),this.masterPlaylistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):_h.STANDARD_PLAYLIST_SELECTOR.bind(this),this.masterPlaylistController_.selectInitialPlaylist=_h.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(t){this.masterPlaylistController_.selectPlaylist=t.bind(this)}},throughput:{get:function(){return this.masterPlaylistController_.mainSegmentLoader_.throughput.rate},set:function(t){this.masterPlaylistController_.mainSegmentLoader_.throughput.rate=t,this.masterPlaylistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get:function(){return this.masterPlaylistController_.mainSegmentLoader_.bandwidth},set:function(t){this.masterPlaylistController_.mainSegmentLoader_.bandwidth=t,this.masterPlaylistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get:function(){var t=1/(this.bandwidth||1),e=void 0;return e=0<this.throughput?1/this.throughput:0,Math.floor(1/(t+e))},set:function(){oa.log.error('The "systemBandwidth" property is read-only')}}}),Object.defineProperties(this.stats,{bandwidth:{get:function(){return n.bandwidth||0},enumerable:!0},mediaRequests:{get:function(){return n.masterPlaylistController_.mediaRequests_()||0},enumerable:!0},mediaRequestsAborted:{get:function(){return n.masterPlaylistController_.mediaRequestsAborted_()||0},enumerable:!0},mediaRequestsTimedout:{get:function(){return n.masterPlaylistController_.mediaRequestsTimedout_()||0},enumerable:!0},mediaRequestsErrored:{get:function(){return n.masterPlaylistController_.mediaRequestsErrored_()||0},enumerable:!0},mediaTransferDuration:{get:function(){return n.masterPlaylistController_.mediaTransferDuration_()||0},enumerable:!0},mediaBytesTransferred:{get:function(){return n.masterPlaylistController_.mediaBytesTransferred_()||0},enumerable:!0},mediaSecondsLoaded:{get:function(){return n.masterPlaylistController_.mediaSecondsLoaded_()||0},enumerable:!0},buffered:{get:function(){return $l(n.tech_.buffered())},enumerable:!0},currentTime:{get:function(){return n.tech_.currentTime()},enumerable:!0},currentSource:{get:function(){return n.tech_.currentSource_},enumerable:!0},currentTech:{get:function(){return n.tech_.name_},enumerable:!0},duration:{get:function(){return n.tech_.duration()},enumerable:!0},master:{get:function(){return n.playlists.master},enumerable:!0},playerDimensions:{get:function(){return n.tech_.currentDimensions()},enumerable:!0},seekable:{get:function(){return $l(n.tech_.seekable())},enumerable:!0},timestamp:{get:function(){return Date.now()},enumerable:!0},videoPlaybackQuality:{get:function(){return n.tech_.getVideoPlaybackQuality()},enumerable:!0}}),this.tech_.one("canplay",this.masterPlaylistController_.setupFirstPlay.bind(this.masterPlaylistController_)),this.masterPlaylistController_.on("selectedinitialmedia",function(){var i,t;t=(i=n).playlists,i.representations=function(){return t.master.playlists.filter(function(t){return!Pl(t)}).map(function(t,e){return new fh(i,t,t.uri)})},Sh(n)}),this.on(this.masterPlaylistController_,"progress",function(){this.tech_.trigger("progress")}),this.tech_.ready(function(){return n.setupQualityLevels_()}),this.tech_.el()&&this.tech_.src(oa.URL.createObjectURL(this.masterPlaylistController_.mediaSource)))}},{key:"setupQualityLevels_",value:function(){var i=this,t=oa.players[this.tech_.options_.playerId];t&&t.qualityLevels&&(this.qualityLevels_=t.qualityLevels(),this.masterPlaylistController_.on("selectedinitialmedia",function(){var e,t;e=i.qualityLevels_,(t=i).representations().forEach(function(t){e.addQualityLevel(t)}),Th(e,t.playlists)}),this.playlists.on("mediachange",function(){Th(i.qualityLevels_,i.playlists)}))}},{key:"play",value:function(){this.masterPlaylistController_.play()}},{key:"setCurrentTime",value:function(t){this.masterPlaylistController_.setCurrentTime(t)}},{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(),function t(e,i,n){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,i);if(void 0===r){var a=Object.getPrototypeOf(e);return null===a?void 0:t(a,i,n)}if("value"in r)return r.value;var s=r.get;return void 0!==s?s.call(n):void 0}(a.prototype.__proto__||Object.getPrototypeOf(a.prototype),"dispose",this).call(this)}}]),a}(),Ch={name:"videojs-http-streaming",VERSION:"1.4.1",canHandleSource:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},i=oa.mergeOptions(oa.options,e);return Ch.canPlayType(t.type,i)},handleSource:function(t,e){var i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},n=oa.mergeOptions(oa.options,i);return e.hls=new wh(t,e,n),e.hls.xhr=Bl(),e.hls.src(t.src,t.type),e.hls},canPlayType:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},i=oa.mergeOptions(oa.options,e).hls.overrideNative,n=bh(t);return n&&(!_h.supportsTypeNatively(n)||i)?"maybe":""}};return"undefined"!=typeof oa.MediaSource&&"undefined"!=typeof oa.URL||(oa.MediaSource=kc,oa.URL=wc),kc.supportsNativeMediaSources()&&oa.getTech("Html5").registerSourceHandler(Ch,0),oa.HlsHandler=wh,oa.HlsSourceHandler=Ch,oa.Hls=_h,oa.use||oa.registerComponent("Hls",_h),oa.options.hls=oa.options.hls||{},oa.registerPlugin?oa.registerPlugin("reloadSourceOnError",vh):oa.plugin("reloadSourceOnError",vh),oa});
!function(){!function(a){var b=a&&a.videojs;b&&(b.CDN_VERSION="7.3.0")}(window)}();
function _katexRender(rootElement){
const eles=rootElement.querySelectorAll(".katex-eq:not(.katex-rendered)");
for (let idx=0; idx < eles.length; idx++){
const ele=eles[idx];
ele.classList.add("katex-rendered");
try {
katex.render(ele.textContent, ele, {
displayMode: ele.getAttribute("data-katex-display")==="true",
throwOnError: false,
});
} catch (n){
ele.style.color="red";
ele.textContent=n.message;
}}
}
function katexRender(){
_katexRender(document);
}
document.addEventListener("DOMContentLoaded", function (){
katexRender();
const katexObserver=new MutationObserver(function (mutations){
[].forEach.call(mutations, function (mutation){
if(mutation.target&&mutation.target instanceof Element){
_katexRender(mutation.target);
}});
});
const katexObservationConfig={
subtree: true,
childList: true,
attributes: true,
characterData: true,
};
katexObserver.observe(document.body, katexObservationConfig);
});
(function(n,t){"use strict";var i="!important;",r="position:absolute"+i+"visibility:hidden"+i+"width:1em"+i+"font-size:1em"+i+"padding:0"+i;window.getEmPixels=function(u){var f,e,o;return u||(u=f=n.createElement("body"),f.style.cssText="font-size:1em"+i,t.insertBefore(f,n.body)),e=n.createElement("i"),e.style.cssText=r,u.appendChild(e),o=e.clientWidth,f?t.removeChild(f):u.removeChild(e),o}})(document,document.documentElement);
(function(n,t,i){"use strict";var e=n.Sizzle||jQuery.find,r={},o=function(n,t,u,o,s){if(n=f(n),n!=""){var h;o||s||(h=/^([0-9]*.?[0-9]+)(px|em)$/.exec(u),h!=null&&(o=Number(h[1]),o+""!="NaN"&&(s=h[2]))),s&&(e.compile&&e.compile(n),r[n]===i&&(r[n]={}),r[n][t]===i&&(r[n][t]={}),r[n][t][u]=[o,s])}},h=function(n,t){var i,r,f;for(i in n)for(r in n[i])if(typeof n[i][r]=="string")o(i,r,n[i][r]);else if(typeof n[i][r]=="object")for(f=0;f<n[i][r].length;f++)o(i,r,n[i][r][f]);t==!0&&u()},f=function(n){if(n==null)return"";var t="".trim;return t&&!t.call(" ")?t.call(n):(n+"").replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},s=function(n,t){var i=n.getAttribute(t);return i?(" "+i+" ").replace(/[\t\r\n]/g," "):" "},c=function(n,t,i){var r,u;n.nodeType===1&&(r=f(i),r!=""&&(u=s(n,t),u.indexOf(" "+r+" ")<0&&n.setAttribute(t,f(u+r))))},l=function(n,t,i){var u,r,e;if(n.nodeType===1&&(u=f(i),u!="")){for(r=s(n,t),e=!1;r.indexOf(" "+u+" ")>=0;)r=r.replace(" "+u+" "," "),e=!0;e&&n.setAttribute(t,f(r))}},u=function(){var o,h,i,s,a,u,f,v;for(o in r)if(a=e(o),a.length>0)for(h=0;h<a.length;h++){u=a[h];for(i in r[o])for(s in r[o][i])f=r[o][i][s][0],r[o][i][s][1]=="em"&&(f=f*(n.getEmPixels?getEmPixels(u):16)),i=="min-width"&&u.offsetWidth>=f||i=="max-width"&&u.offsetWidth<=f||i=="min-height"&&u.offsetHeight>=f||i=="max-height"&&u.offsetHeight<=f?c(u,i,s):l(u,i,s)}!n.addEventListener&&n.attachEvent&&(v=t.documentElement.className,t.documentElement.className=" "+v,t.documentElement.className=v)};n.elementQuery=function(n,t){!n||typeof n!="object"||n.cssRules||n.rules?n||t||u():h(n,t)},n.elementQuery.selectors=function(){},n.addEventListener?(n.addEventListener("resize",u,!1),n.addEventListener("DOMContentLoaded",u,!1),n.addEventListener("load",u,!1)):n.attachEvent&&(n.attachEvent("onresize",u),n.attachEvent("onload",u))})(this,document,undefined);
jQuery(document).ready(function(i){i(".bsp-wrapper").on("click",".bsp-videos-items a",function(e){e.preventDefault();var l=i(this),r=l.closest(".bsp-wrapper"),s=l.closest(".bsp-wrapper").find(".bsp-player"),t=i(this).data("video-id"),n=s.data("frame-url").replace("{video-id}",t);s.html('<iframe type="text/html" width="100%" height="100%"\n        src="'+n+'"\n        frameborder="0" allowfullscreen="allowfullscreen" mozallowfullscreen="mozallowfullscreen" msallowfullscreen="msallowfullscreen" oallowfullscreen="oallowfullscreen" webkitallowfullscreen="webkitallowfullscreen"></iframe>'),l.closest("li").addClass("bsp-current-item").siblings("li").removeClass("bsp-current-item");var a=r.find(".bsp-current-item .bsp-video-index").html();r.find(".bsp-current-playing .bsp-current-index").html(a)}),"function"==typeof elementQuery&&elementQuery({".bsp-wrapper":{"max-width":["480px","680px","780px"]}})});
var Better_Social_Counter=function(){"use strict";return{init:function(){this.fix_element_query()},fix_element_query:function(){"function"==typeof elementQuery&&elementQuery({".better-social-counter":{"max-width":["358px","199px","230px","900px","530px","750px"]},".better-social-banner":{"max-width":["250px"]}})}}}(jQuery);jQuery(function(e){Better_Social_Counter.init()});
!function(t,e){"function"==typeof define&&define.amd?define(e):"object"==typeof exports?module.exports=e():t.Blazy=e()}(this,function(){"use strict";function t(t){var o=t._util;o.elements=v(t.options),o.count=o.elements.length,o.destroyed&&(o.destroyed=!1,t.options.container&&w(t.options.container,function(t){h(t,"scroll",o.validateT)}),h(window,"resize",o.saveViewportOffsetT),h(window,"resize",o.validateT),h(window,"scroll",o.validateT)),e(t)}function e(t){for(var e=t._util,n=0;n<e.count;n++){var s=e.elements[n];(o(s,t.options)||p(s,t.options.successClass))&&(t.load(s),e.elements.splice(n,1),e.count--,n--)}0===e.count&&t.destroy()}function o(t,e){var o=t.getBoundingClientRect();if(e.container&&E){var s=t.closest(e.containerClass);if(s){var i=s.getBoundingClientRect();if(n(i,C)){var r=i.top-e.offset,a=i.right+e.offset,c=i.bottom+e.offset,l=i.left-e.offset,f={top:r>C.top?r:C.top,right:a<C.right?a:C.right,bottom:c<C.bottom?c:C.bottom,left:l>C.left?l:C.left};return n(o,f)}return!1}}return n(o,C)}function n(t,e){return t.right>=e.left&&t.bottom>=e.top&&t.left<=e.right&&t.top<=e.bottom}function s(t,e,o){if(!p(t,o.errorClass)){var n=t.offsetWidth>0&&t.offsetHeight>0,s=function(){return"function"==typeof o.loadInvisible?o.loadInvisible(t,n):o.loadInvisible};if(!p(t,o.successClass)&&(e||n||s())){var c=l(t,b)||l(t,o.src);if(c){var f=c.split(o.separator),v=f[T&&f.length>1?1:0],m=l(t,o.srcset),y=Publisher_Theme.parseBsSrcset(t,o.srcset,!1);y&&(m=void 0,v=y);var C=u(t,"img"),E=t.parentNode,A=E&&u(E,"picture");if(C||void 0===t.src){var D=new Image,I=function(){o.error&&o.error(t,"invalid"),d(t,o.errorClass),g(D,"error",I),g(D,"load",N)},N=function(){C?A||a(t,v,m):t.style.backgroundImage='url("'+v+'")',i(t,o),g(D,"load",N),g(D,"error",I)};A&&(D=t,w(E.getElementsByTagName("source"),function(t){r(t,k,o.srcset)})),h(D,"error",I),h(D,"load",N),a(D,v,m)}else t.src=v,i(t,o)}else u(t,"video")?(w(t.getElementsByTagName("source"),function(t){r(t,S,o.src)}),t.load(),i(t,o)):(o.error&&o.error(t,"missing"),d(t,o.errorClass))}}}function i(t,e){d(t,e.successClass),e.success&&e.success(t),f(t,e.src),f(t,e.srcset),w(e.breakpoints,function(e){f(t,e.src)}),"function"==typeof e.itemLoaded&&e.itemLoaded.call(t,e)}function r(t,e,o){var n=l(t,o);n&&(c(t,e,n),f(t,o))}function a(t,e,o){o&&c(t,k,o),t.src=e}function c(t,e,o){t.setAttribute(e,o)}function l(t,e){return t.getAttribute(e)}function f(t,e){t.removeAttribute(e)}function u(t,e){return t.nodeName.toLowerCase()===e}function p(t,e){return-1!==(" "+t.className+" ").indexOf(" "+e+" ")}function d(t,e){p(t,e)||(t.className+=" "+e)}function v(t){for(var e=[],o=t.root.querySelectorAll(t.selector),n=o.length;n--;e.unshift(o[n]));return e}function m(t){C.bottom=(window.innerHeight||document.documentElement.clientHeight)+t,C.right=(window.innerWidth||document.documentElement.clientWidth)+t}function h(t,e,o){t.attachEvent?t.attachEvent&&t.attachEvent("on"+e,o):t.addEventListener(e,o,{capture:!1,passive:!0})}function g(t,e,o){t.detachEvent?t.detachEvent&&t.detachEvent("on"+e,o):t.removeEventListener(e,o,{capture:!1,passive:!0})}function w(t,e){if(t&&e)for(var o=t.length,n=0;o>n&&e(t[n],n)!==!1;n++);}function y(t,e,o){var n=0;return function(){var s=+new Date;e>s-n||(n=s,t.apply(o,arguments))}}var b,C,T,E,S="src",k="srcset";return function(o){if(!document.querySelectorAll){var n=document.createStyleSheet();document.querySelectorAll=function(t,e,o,s,i){for(i=document.all,e=[],t=t.replace(/\[for\b/gi,"[htmlFor").split(","),o=t.length;o--;){for(n.addRule(t[o],"k:v"),s=i.length;s--;)i[s].currentStyle.k&&e.push(i[s]);n.removeRule(0)}return e}}var i=this,r=i._util={};r.elements=[],r.destroyed=!0,i.options=o||{},i.options.error=i.options.error||!1,i.options.offset=i.options.offset||100,i.options.root=i.options.root||document,i.options.success=i.options.success||!1,i.options.selector=i.options.selector||".b-lazy",i.options.separator=i.options.separator||"|",i.options.containerClass=i.options.container,i.options.container=i.options.containerClass?document.querySelectorAll(i.options.containerClass):!1,i.options.errorClass=i.options.errorClass||"b-error",i.options.breakpoints=i.options.breakpoints||!1,i.options.loadInvisible=i.options.loadInvisible||!1,i.options.successClass=i.options.successClass||"b-loaded",i.options.validateDelay=i.options.validateDelay||25,i.options.saveViewportOffsetDelay=i.options.saveViewportOffsetDelay||50,i.options.srcset=i.options.srcset||"data-srcset",i.options.src=b=i.options.src||"data-src",E=Element.prototype.closest,T=window.devicePixelRatio>1,C={},C.top=0-i.options.offset,C.left=0-i.options.offset,i.revalidate=function(){t(i)},i.load=function(t,e){var o=this.options;t&&void 0===t.length?s(t,e,o):w(t,function(t){s(t,e,o)})},i.destroy=function(){var t=i._util;i.options.container&&w(i.options.container,function(e){g(e,"scroll",t.validateT)}),g(window,"scroll",t.validateT),g(window,"resize",t.validateT),g(window,"resize",t.saveViewportOffsetT),t.count=0,t.elements.length=0,t.destroyed=!0},r.validateT=y(function(){e(i)},i.options.validateDelay,i),r.saveViewportOffsetT=y(function(){m(i.options.offset)},i.options.saveViewportOffsetDelay,i),m(i.options.offset),w(i.options.breakpoints,function(t){return t.width>=window.screen.width?(b=t.src,!1):void 0}),setTimeout(function(){t(i)})}});
!function(d){"use strict";var o={},n={};function l(e){(e=void 0===e||e)&&d(window).scroll()}function t(e){return this.prefix="bs_ajax_paginate_",this.deferredPrefix="bs_deferred_loading_",this.isPrevPage=!1,this.$link_el=!1,this.id=!1,this.paginationStyle=!1,this.settings=d.extend({afterSuccessDeferredAjax:function(){}},e),this}t.prototype.init=function(e){var o=this;d(e).on("click",".bs-ajax-pagination a",function(e){e.preventDefault();var a=d(this),t=a.parent();if(a.hasClass("disabled")||t.hasClass("bs-pagination-loading"))return!1;t.addClass("bs-pagination-loading");var n=a.closest(".bs-pagination");o.$link_el=a,o.id=a.data("id");try{if(!o.id)throw"invalid element";o.setNewPageNumber(),o.paginationStyle=o.getPaginationStyle();var i=o.getAjaxProps(),s=n.prevAll(".bs-pagination-wrapper"),r=o.cache_get(i.current_page,o.id);if("object"==typeof r)s.addClass("bs-pagination-cached"),o.handle_response(r),t.removeClass("bs-pagination-loading");else{switch(s.removeClass("bs-pagination-cached"),2==i.current_page&&o.cache_add(1,{output:s.html(),label:n.find(".bs-pagination-label").html(),have_next:!0,have_prev:!1},o.id),o.paginationStyle){case"next_prev":s.children().addClass("bs-pagination-in-loading"),s.prepend(o.getLoadingRawHtml());break;case"more_btn_infinity":a.find(".loaded").hide(),a.find(".loading").show(),a.removeClass("more_btn_infinity").addClass("infinity").addClass("bs-pagination-in-loading"),n.removeClass("more_btn_infinity").addClass("infinity");break;case"infinity":case"more_btn":a.addClass("bs-pagination-in-loading"),a.find(".loaded").hide(),a.find(".loading").show()}d.ajax({url:i.ajax_url,type:"POST",dataType:"json",data:i}).fail(function(e){switch(t.removeClass("bs-pagination-loading"),o.paginationStyle){case"more_btn_infinity":case"next_prev":s.find(".bs-pagin-loading-wrapper").remove(),a.addClass("bs-pagination-in-loading");break;case"infinity":case"more_btn":a.addClass("bs-pagination-in-loading"),a.find(".loaded").show(),a.find(".loading").hide()}"abort"!==e.statusText&&alert("cannot load data. please check your internet connection!")}).done(function(e){switch(o.handle_response(e),o.cacheThisStyle(o.paginationStyle)&&o.cache_add(i.current_page,e,o.id),o.paginationStyle){case"more_btn_infinity":a.removeClass("bs-pagination-in-loading"),s.find(".bs-pagin-loading-wrapper").remove();break;case"next_prev":a.removeClass("bs-pagination-in-loading"),s.find(".bs-pagin-loading-wrapper").remove(),s.children().removeClass("bs-pagination-in-loading");break;case"infinity":case"more_btn":a.removeClass("bs-pagination-in-loading"),a.find(".loaded").show(),a.find(".loading").hide()}t.removeClass("bs-pagination-loading")})}}catch(e){o.debug(e)}}),"function"==typeof OnScreen&&new OnScreen({tolerance:0,debounce:100,container:window}).on("enter",".bs-ajax-pagination.infinity",function(e){d(e).find("a").click()})},t.prototype.filter_slider_params=function(e){return void 0!==e.autoplayspeed&&(e.autoplaySpeed=e.autoplayspeed),e.dots=void 0!==e.sliderControlDots&&"off"!==e.sliderControlDots,e.autoplay=void 0!==e.sliderAutoplay&&parseInt(e.sliderAutoplay),e.speed=e.sliderAnimationSpeed,void 0!==e.sliderControlNextPrev&&"off"==e.sliderControlNextPrev&&(e.appendArrows=!1),e},t.prototype.handler_slider=function(e){var i=this;d.fn.slick&&(d(".bs-slider-items-container",e).each(function(){var e=d(this),a=d(document.body).hasClass("rtl");if(!e.hasClass("slick-ready")){var t=e.data(),n=i.filter_slider_params(d.extend({sliderControlDots:"off",prevArrow:'<a class="btn-bs-pagination prev" rel="prev" title="Previous">\n\t\t\t<i class="fa fa-angle-'+(a?"right":"left")+'" aria-hidden="true"></i>\n\t\t</a>',nextArrow:'<a rel="next" class="btn-bs-pagination next" title="Next">\n\t\t\t<i class="fa fa-angle-'+(a?"left":"right")+'" aria-hidden="true"></i>\n\t\t</a>',rtl:a,slideMargin:25,slide:".bs-slider-item",appendArrows:e.find(".bs-slider-controls .bs-control-nav"),classPrefix:"bs-slider-",dotsClass:"bs-slider-dots",customPaging:function(e,a){return d('<span class="bts-bs-dots-btn"></span>').text(a+1)}},t));n.sliderControlDots&&t.sliderControlDots&&(n.appendDots=e.find(".bs-slider-controls"),n.dotsClass+=" "+n.dotsClass+"-"+t.sliderControlDots),e.slick(n),e.addClass("slick-ready")}}),d(".multi-tab").on("shown.bs.tab",'a[data-toggle="tab"]:not([data-deferred-init])',function(e){var a=d(e.target).attr("href");d(a).find(".bs-slider-items-container").slick("setPosition"),l()}))},t.prototype.refreshLazyImages=function(){Publisher_Theme&&Publisher_Theme.refreshLazyImages&&Publisher_Theme.refreshLazyImages()},t.prototype.bindDeferredEvents=function(e){var i=200,s=this,r=0;d(".multi-tab",e).on("show.bs.tab","a[data-deferred-init]",function(e){var a=d(this).closest(".multi-tab").find(".active").attr("href");i=d(a).height()}),d(".tabs-section",e).on("show.bs.tab","a[data-deferred-init]",function(e){var a=d(this).closest(".tabs-section").find(".active:visible a").data("target"),t=d(a);i=t.height()}).on("show.bs.tab","a",function(){s.refreshLazyImages();var e=d(this).closest(".tabs-section").find(".active:visible a").data("target"),a=d(e),t=a.outerHeight();if(t){var n=a.closest(".tab-content");if(n.length){var i=Math.max(t,parseInt(n.outerHeight()));i=Math.max(i,r),n.css("min-height",i).data("bs-height",i),r=i}}}),d("a[data-deferred-init]",e).each(function(e){var a=d(this),t=a.data("deferred-event")||"click";0<a.closest(".deferred-block-exclude").length||a.on(t,function(e){var a=d(this).data("deferred-init"),t=d("#bsd_"+a),n=t.closest(".bs-deferred-container");t.hasClass("bs-deferred-load-wrapper")&&(t.hasClass("bs-deferred-loaded")?l(!t.closest(".bs-pinning-block.pinned").length):(n.removeClass("bs-tab-animated"),s.handleDeferredElements(t,{loadingHeight:i||void 0},function(){n.addClass("bs-tab-animated"),t.addClass("bs-deferred-loaded");var e=n.find(".bs-pagination");!i||e.length&&!e.hasClass("next_prev")||n.css("min-height",i),i=void 0})))})})},t.prototype.handleDeferredElements=function(e,i,s){var r=this;e.hasClass("bs-deferred-load-wrapper")||(e=e.find(".bs-deferred-load-wrapper")),e.each(function(){var a=d(this);if(!a.hasClass("deferred-html-exists")){if(i=d.extend({loadingHeight:100,loadingMinHeight:0},i),!a.find(".deferred-loading-container").length){var e=d("<div></div>",{class:"deferred-loading-container",height:i.loadingHeight}),t=a.find(".bs-pagination");!i.loadingMinHeight||t&&t.hasClass("more_btn")||e.css("min-height",i.loadingMinHeight),e.append(r.getLoadingRawHtml()),e.appendTo(a)}r.id=a.attr("id");var n=r.getAjaxProps("deferred");"object"==typeof o[r.id]&&o[r.id].abort(),o[r.id]=d.ajax({url:n.ajax_url,type:"POST",dataType:"json",data:n}).done(function(e){a.find(".deferred-loading-container").remove(),delete o[r.id],a.addClass("deferred-html-exists").append(e.output),r.handler_slider(a),s&&s.call(a,e),l(!a.closest(".bs-pinning-block.pinned").length),r.settings.afterSuccessDeferredAjax.call(r,a,e)})}})},t.prototype.getLoadingRawHtml=function(){return'<div class="bs-pagin-loading-wrapper">'+bs_pagination_loc.loading+"</div>"},t.prototype.getAjaxProps=function(e){var a,t=("deferred"===(e=e||"pagination")?this.deferredPrefix:this.prefix)+this.id;if(void 0===window[t])throw"pagination settings not set";switch((a=jQuery.parseJSON(window[t]))._data=a.data,e.toLowerCase()){case"pagination":a.action="pagination_ajax",a.current_page=this.$link_el.parent().data("current-page")||1,a.pagin_type=this.paginationStyle;break;case"deferred":a.action="deferred_loading",a.current_page=1}if(this.$link_el){var n=this.$link_el.closest(".bs-pagination").data("bs-pagin-data");n&&(a._data=n)}return a},t.prototype.setNewPageNumber=function(){var e=this.$link_el.parent(),a=e.data("current-page")||1;if(this.isPrevPage=this.$link_el.hasClass("prev"),this.isPrevPage){if(a<2)throw"Wrong page number!";a--}else a++;e.data("current-page",a)},t.prototype.debug=function(e){console.error(e)},t.prototype.cacheThisStyle=function(e){return"next_prev"===e},t.prototype.getPaginationStyle=function(){for(var e,a=["next_prev","more_btn","more_btn_infinity","infinity"],t=this.$link_el.closest(".bs-pagination"),n=0;n<a.length;n++)if(e=a[n],t.hasClass(e))return e;return""},t.prototype.cache_get=function(e,a){if(void 0!==n[a]&&void 0!==n[a][e])return n[a][e]},t.prototype.cache_add=function(e,a,t){void 0===n[t]&&(n[t]={}),n[t][e]=a},t.prototype.handle_event=function(e,a){if("object"!=typeof e.events)return!1;if("string"==typeof e.events[a]){var t=e.events[a];"function"==typeof window[t]&&window[t].call(this,e,a)}},t.prototype.handle_response=function(e){if(null!==e&&"string"!=typeof e.error){var a=this.$link_el.closest(".bs-pagination"),t=a.prevAll(".bs-pagination-wrapper");e.data&&a.data("bs-pagin-data",e.data);var n=a.closest(".bs-pinning-block.pinned").length;switch(this.handle_event(e,"before_append"),this.paginationStyle){case"next_prev":t.html(e.output),this.handle_event(e,"after_append"),t.addClass("bs-animate").addClass(this.isPrevPage?"bs-fadeInLeft":"bs-fadeInRight").delay(400).queue(function(e){d(this).removeClass("bs-animate bs-fadeInRight bs-fadeInLeft"),e()}),l(!n),void 0!==e.label&&a.find(".bs-pagination-label").html(e.label),a.find(".next")[e.have_next?"removeClass":"addClass"]("disabled"),a.find(".prev")[e.have_prev?"removeClass":"addClass"]("disabled");break;case"more_btn":case"more_btn_infinity":case"infinity":if("string"==typeof e["add-to"]){var i=d(e.output);"prepend"==e["add-type"]?t.find(e["add-to"]).prepend(i):t.find(e["add-to"]).append(i)}else i=t.append(e.output).children(":last");l(!n),this.handle_event(e,"after_append"),i.addClass("bs-animate bs-fadeInUp").delay(400).queue(function(e){d(this).removeClass("bs-animate bs-fadeInUp"),e()}),"infinity"===this.paginationStyle?e.have_next||this.$link_el.unbind("inview").remove():e.have_next?this.$link_el.removeClass("disabled"):(this.$link_el.addClass("disabled"),this.$link_el.find(".loaded").remove(),this.$link_el.find(".no-more").show()),setTimeout(function(){if(d.fn.hcSticky)for(var e=t[0],a=0;a<=8&&(e&&e.parentElement);a++){if(e.parentElement.classList.contains("wrapper-sticky")){d(e).hcSticky("reinit");break}e=e.parentElement}}),t.closest("")}this.refreshLazyImages(),this.handle_event(e,"after_response")}else null===e?this.debug("Error!"):this.debug(e.error)},d.fn.Better_Ajax_Pagination=function(e){return new t(e).handler_slider(),this.each(function(){(new t).init(this)})},d.fn.Better_Deferred_Loading=function(e){var a=new t(e);return a.bindDeferredEvents(e.context),a}}(jQuery);
!function(a){"use strict";"function"==typeof define&&define.amd?define(["jquery"],a):"undefined"!=typeof exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){"use strict";var b=window.Slick||{};b=function(){function c(c,d){var f,e=this;e.defaults={accessibility:!0,adaptiveHeight:!1,appendArrows:a(c),appendDots:a(c),arrows:!0,asNavFor:null,prevArrow:'<button type="button" data-role="none" class="slick-prev" aria-label="Previous" tabindex="0" role="button">Previous</button>',nextArrow:'<button type="button" data-role="none" class="slick-next" aria-label="Next" tabindex="0" role="button">Next</button>',autoplay:!1,autoplaySpeed:3e3,centerMode:!1,centerPadding:"50px",cssEase:"ease",customPaging:function(b,c){return a('<button type="button" data-role="none" role="button" tabindex="0" />').text(c+1)},dots:!1,dotsClass:"slick-dots",draggable:!0,easing:"linear",edgeFriction:.35,fade:!1,focusOnSelect:!1,infinite:!0,initialSlide:0,lazyLoad:"ondemand",mobileFirst:!1,pauseOnHover:!0,pauseOnFocus:!0,pauseOnDotsHover:!1,respondTo:"window",responsive:null,rows:1,rtl:!1,slide:"",slidesPerRow:1,slidesToShow:1,slidesToScroll:1,speed:500,swipe:!0,swipeToSlide:!1,touchMove:!0,touchThreshold:5,useCSS:!0,useTransform:!0,variableWidth:!1,vertical:!1,verticalSwiping:!1,waitForAnimate:!0,zIndex:1e3,slideMargin:0,classPrefix:"slick-"},e.initials={animating:!1,dragging:!1,autoPlayTimer:null,currentDirection:0,currentLeft:null,currentSlide:0,direction:1,$dots:null,listWidth:null,listHeight:null,loadIndex:0,$nextArrow:null,$prevArrow:null,slideCount:null,slideWidth:null,$slideTrack:null,$slides:null,sliding:!1,slideOffset:0,swipeLeft:null,$list:null,touchObject:{},transformsEnabled:!1,unslicked:!1},a.extend(e,e.initials),e.activeBreakpoint=null,e.animType=null,e.animProp=null,e.breakpoints=[],e.breakpointSettings=[],e.cssTransitions=!1,e.focussed=!1,e.interrupted=!1,e.hidden="hidden",e.paused=!0,e.positionProp=null,e.respondTo=null,e.rowCount=1,e.shouldClick=!0,e.$slider=a(c),e.$slidesCache=null,e.transformType=null,e.transitionType=null,e.visibilityChange="visibilitychange",e.windowWidth=0,e.windowTimer=null,f=a(c).data("slick")||{},e.options=a.extend({},e.defaults,d,f),e.currentSlide=e.options.initialSlide,e.originalSettings=e.options,"undefined"!=typeof document.mozHidden?(e.hidden="mozHidden",e.visibilityChange="mozvisibilitychange"):"undefined"!=typeof document.webkitHidden&&(e.hidden="webkitHidden",e.visibilityChange="webkitvisibilitychange"),e.autoPlay=a.proxy(e.autoPlay,e),e.autoPlayClear=a.proxy(e.autoPlayClear,e),e.autoPlayIterator=a.proxy(e.autoPlayIterator,e),e.changeSlide=a.proxy(e.changeSlide,e),e.clickHandler=a.proxy(e.clickHandler,e),e.selectHandler=a.proxy(e.selectHandler,e),e.setPosition=a.proxy(e.setPosition,e),e.swipeHandler=a.proxy(e.swipeHandler,e),e.dragHandler=a.proxy(e.dragHandler,e),e.keyHandler=a.proxy(e.keyHandler,e),e.instanceUid=b++,e.htmlExpr=/^(?:\s*(<[\w\W]+>)[^>]*)$/,e.registerBreakpoints(),e.init(!0)}var b=0;return c}(),b.prototype.activateADA=function(){var a=this;a.$slideTrack.find("."+a.options.classPrefix+"active").attr({"aria-hidden":"false"}).find("a, input, button, select").attr({tabindex:"0"})},b.prototype.addSlide=b.prototype.slickAdd=function(b,c,d){var e=this;if("boolean"==typeof c)d=c,c=null;else if(c<0||c>=e.slideCount)return!1;e.unload(),"number"==typeof c?0===c&&0===e.$slides.length?a(b).appendTo(e.$slideTrack):d?a(b).insertBefore(e.$slides.eq(c)):a(b).insertAfter(e.$slides.eq(c)):d===!0?a(b).prependTo(e.$slideTrack):a(b).appendTo(e.$slideTrack),e.$slides=e.$slideTrack.children(this.options.slide),e.$slideTrack.children(this.options.slide).detach(),e.$slideTrack.append(e.$slides),e.$slides.each(function(b,c){a(c).attr("data-"+e.options.classPrefix+"index",b)}),e.$slidesCache=e.$slides,e.reinit()},b.prototype.animateHeight=function(){var a=this;if(1===a.options.slidesToShow&&a.options.adaptiveHeight===!0&&a.options.vertical===!1){var b=a.$slides.eq(a.currentSlide).outerHeight(!0);a.$list.animate({height:b},a.options.speed)}},b.prototype.animateSlide=function(b,c){var d={},e=this;if(e.animateHeight(),e.options.rtl===!0&&e.options.vertical===!1&&(b=-b),e.transformsEnabled===!1)e.options.vertical===!1?e.$slideTrack.animate({left:b},e.options.speed,e.options.easing,c):e.$slideTrack.animate({top:b},e.options.speed,e.options.easing,c);else if(e.cssTransitions===!1)e.options.rtl===!0&&(e.currentLeft=-e.currentLeft),a({animStart:e.currentLeft}).animate({animStart:b},{duration:e.options.speed,easing:e.options.easing,step:function(a){a=Math.ceil(a),e.options.vertical===!1?(d[e.animType]="translate("+a+"px, 0px)",e.$slideTrack.css(d)):(d[e.animType]="translate(0px,"+a+"px)",e.$slideTrack.css(d))},complete:function(){c&&c.call()}});else{e.applyTransition();var f=e.options.rtl===!0?1:-1;b=Math.ceil(b+e.options.slideMargin*f),e.options.vertical===!1?d[e.animType]="translate3d("+b+"px, 0px, 0px)":d[e.animType]="translate3d(0px,"+b+"px, 0px)",e.$slideTrack.css(d),c&&setTimeout(function(){e.disableTransition(),c.call()},e.options.speed)}},b.prototype.getNavTarget=function(){var b=this,c=b.options.asNavFor;return c&&null!==c&&(c=a(c).not(b.$slider)),c},b.prototype.asNavFor=function(b){var c=this,d=c.getNavTarget();null!==d&&"object"==typeof d&&d.each(function(){var c=a(this).slick("getSlick");c.unslicked||c.slideHandler(b,!0)})},b.prototype.applyTransition=function(a){var b=this,c={};b.options.fade===!1?c[b.transitionType]=b.transformType+" "+b.options.speed+"ms "+b.options.cssEase:c[b.transitionType]="opacity "+b.options.speed+"ms "+b.options.cssEase,b.options.fade===!1?b.$slideTrack.css(c):b.$slides.eq(a).css(c)},b.prototype.autoPlay=function(){var a=this;a.autoPlayClear(),a.slideCount>a.options.slidesToShow&&(a.autoPlayTimer=setInterval(a.autoPlayIterator,a.options.autoplaySpeed))},b.prototype.autoPlayClear=function(){var a=this;a.autoPlayTimer&&clearInterval(a.autoPlayTimer)},b.prototype.autoPlayIterator=function(){var a=this,b=a.currentSlide+a.options.slidesToScroll;a.paused||a.interrupted||a.focussed||(a.options.infinite===!1&&(1===a.direction&&a.currentSlide+1===a.slideCount-1?a.direction=0:0===a.direction&&(b=a.currentSlide-a.options.slidesToScroll,a.currentSlide-1===0&&(a.direction=1))),a.slideHandler(b))},b.prototype.buildArrows=function(){var b=this;b.options.arrows===!0&&(b.$prevArrow=a(b.options.prevArrow).addClass(b.options.classPrefix+"arrow"),b.$nextArrow=a(b.options.nextArrow).addClass(b.options.classPrefix+"arrow"),b.slideCount>b.options.slidesToShow?(b.$prevArrow.removeClass(b.options.classPrefix+"hidden").removeAttr("aria-hidden tabindex"),b.$nextArrow.removeClass(b.options.classPrefix+"hidden").removeAttr("aria-hidden tabindex"),b.htmlExpr.test(b.options.prevArrow)&&b.$prevArrow.prependTo(b.options.appendArrows),b.htmlExpr.test(b.options.nextArrow)&&b.$nextArrow.appendTo(b.options.appendArrows),b.options.infinite!==!0&&b.$prevArrow.addClass(b.options.classPrefix+"disabled").attr("aria-disabled","true")):b.$prevArrow.add(b.$nextArrow).addClass(b.options.classPrefix+"hidden").attr({"aria-disabled":"true",tabindex:"-1"}))},b.prototype.buildDots=function(){var c,d,b=this;if(b.options.dots===!0&&b.slideCount>b.options.slidesToShow){for(b.$slider.addClass(b.options.classPrefix+"dotted"),d=a("<ul />").addClass(b.options.dotsClass),c=0;c<=b.getDotCount();c+=1)d.append(a("<li />").append(b.options.customPaging.call(this,b,c)));b.$dots=d.appendTo(b.options.appendDots),b.$dots.find("li").first().addClass(b.options.classPrefix+"active").attr("aria-hidden","false")}},b.prototype.buildOut=function(){var b=this;if(b.$slides=b.$slider.children(b.options.slide+":not(."+b.options.classPrefix+"cloned)").addClass(b.options.classPrefix+"slide"),b.options.slideMargin){var c=b.options.rtl===!0?"right":"left";b.$slides.css("margin-"+c,b.options.slideMargin)}b.slideCount=b.$slides.length,b.$slides.each(function(c,d){a(d).attr("data-"+b.options.classPrefix+"index",c).data("originalStyling",a(d).attr("style")||"")}),b.$slider.addClass(b.options.classPrefix+"slider"),b.$slideTrack=0===b.slideCount?a('<div class="'+b.options.classPrefix+'track"/>').appendTo(b.$slider):b.$slides.wrapAll('<div class="'+b.options.classPrefix+'track"/>').parent(),b.$list=b.$slideTrack.wrap('<div aria-live="polite" class="'+b.options.classPrefix+'list"/>').parent(),b.$slideTrack.css("opacity",0),b.options.centerMode!==!0&&b.options.swipeToSlide!==!0||(b.options.slidesToScroll=1),a("img[data-lazy]",b.$slider).not("[src]").addClass(b.options.classPrefix+"loading"),b.setupInfinite(),b.buildArrows(),b.buildDots(),b.updateDots(),b.setSlideClasses("number"==typeof b.currentSlide?b.currentSlide:0),b.options.draggable===!0&&b.$list.addClass("draggable")},b.prototype.buildRows=function(){var b,c,d,e,f,g,h,a=this;if(e=document.createDocumentFragment(),g=a.$slider.children(),a.options.rows>1){for(h=a.options.slidesPerRow*a.options.rows,f=Math.ceil(g.length/h),b=0;b<f;b++){var i=document.createElement("div");for(c=0;c<a.options.rows;c++){var j=document.createElement("div");for(d=0;d<a.options.slidesPerRow;d++){var k=b*h+(c*a.options.slidesPerRow+d);g.get(k)&&j.appendChild(g.get(k))}i.appendChild(j)}e.appendChild(i)}a.$slider.empty().append(e),a.$slider.children().children().children().css({width:100/a.options.slidesPerRow+"%",display:"inline-block"})}},b.prototype.checkResponsive=function(b,c){var e,f,g,d=this,h=!1,i=d.$slider.width(),j=window.innerWidth||a(window).width();if("window"===d.respondTo?g=j:"slider"===d.respondTo?g=i:"min"===d.respondTo&&(g=Math.min(j,i)),d.options.responsive&&d.options.responsive.length&&null!==d.options.responsive){f=null;for(e in d.breakpoints)d.breakpoints.hasOwnProperty(e)&&(d.originalSettings.mobileFirst===!1?g<d.breakpoints[e]&&(f=d.breakpoints[e]):g>d.breakpoints[e]&&(f=d.breakpoints[e]));null!==f?null!==d.activeBreakpoint?(f!==d.activeBreakpoint||c)&&(d.activeBreakpoint=f,"unslick"===d.breakpointSettings[f]?d.unslick(f):(d.options=a.extend({},d.originalSettings,d.breakpointSettings[f]),b===!0&&(d.currentSlide=d.options.initialSlide),d.refresh(b)),h=f):(d.activeBreakpoint=f,"unslick"===d.breakpointSettings[f]?d.unslick(f):(d.options=a.extend({},d.originalSettings,d.breakpointSettings[f]),b===!0&&(d.currentSlide=d.options.initialSlide),d.refresh(b)),h=f):null!==d.activeBreakpoint&&(d.activeBreakpoint=null,d.options=d.originalSettings,b===!0&&(d.currentSlide=d.options.initialSlide),d.refresh(b),h=f),b||h===!1||d.$slider.trigger("breakpoint",[d,h])}},b.prototype.changeSlide=function(b,c){var f,g,h,d=this,e=a(b.currentTarget);switch(e.is("a")&&b.preventDefault(),e.is("li")||(e=e.closest("li")),h=d.slideCount%d.options.slidesToScroll!==0,f=h?0:(d.slideCount-d.currentSlide)%d.options.slidesToScroll,b.data.message){case"previous":g=0===f?d.options.slidesToScroll:d.options.slidesToShow-f,d.slideCount>d.options.slidesToShow&&d.slideHandler(d.currentSlide-g,!1,c);break;case"next":g=0===f?d.options.slidesToScroll:f,d.slideCount>d.options.slidesToShow&&d.slideHandler(d.currentSlide+g,!1,c);break;case"index":var i=0===b.data.index?0:b.data.index||e.index()*d.options.slidesToScroll;d.slideHandler(d.checkNavigable(i),!1,c),e.children().trigger("focus");break;default:return}},b.prototype.checkNavigable=function(a){var c,d,b=this;if(c=b.getNavigableIndexes(),d=0,a>c[c.length-1])a=c[c.length-1];else for(var e in c){if(a<c[e]){a=d;break}d=c[e]}return a},b.prototype.cleanUpEvents=function(){var b=this;b.options.dots&&null!==b.$dots&&a("li",b.$dots).off("click.slick",b.changeSlide).off("mouseenter.slick",a.proxy(b.interrupt,b,!0)).off("mouseleave.slick",a.proxy(b.interrupt,b,!1)),b.$slider.off("focus.slick blur.slick"),b.options.arrows===!0&&b.slideCount>b.options.slidesToShow&&(b.$prevArrow&&b.$prevArrow.off("click.slick",b.changeSlide),b.$nextArrow&&b.$nextArrow.off("click.slick",b.changeSlide)),b.$list.off("touchstart.slick mousedown.slick",b.swipeHandler),b.$list.off("touchmove.slick mousemove.slick",b.swipeHandler),b.$list.off("touchend.slick mouseup.slick",b.swipeHandler),b.$list.off("touchcancel.slick mouseleave.slick",b.swipeHandler),b.$list.off("click.slick",b.clickHandler),a(document).off(b.visibilityChange,b.visibility),b.cleanUpSlideEvents(),b.options.accessibility===!0&&b.$list.off("keydown.slick",b.keyHandler),b.options.focusOnSelect===!0&&a(b.$slideTrack).children().off("click.slick",b.selectHandler),a(window).off("orientationchange.slick.slick-"+b.instanceUid,b.orientationChange),a(window).off("resize.slick.slick-"+b.instanceUid,b.resize),a("[draggable!=true]",b.$slideTrack).off("dragstart",b.preventDefault),a(window).off("load.slick.slick-"+b.instanceUid,b.setPosition),a(document).off("ready.slick.slick-"+b.instanceUid,b.setPosition)},b.prototype.cleanUpSlideEvents=function(){var b=this;b.$list.off("mouseenter.slick",a.proxy(b.interrupt,b,!0)),b.$list.off("mouseleave.slick",a.proxy(b.interrupt,b,!1))},b.prototype.cleanUpRows=function(){var b,a=this;a.options.rows>1&&(b=a.$slides.children().children(),b.removeAttr("style"),a.$slider.empty().append(b))},b.prototype.clickHandler=function(a){var b=this;b.shouldClick===!1&&(a.stopImmediatePropagation(),a.stopPropagation(),a.preventDefault())},b.prototype.destroy=function(b){var c=this;c.autoPlayClear(),c.touchObject={},c.cleanUpEvents(),a("."+c.options.classPrefix+"cloned",c.$slider).detach(),c.$dots&&c.$dots.remove(),c.$prevArrow&&c.$prevArrow.length&&(c.$prevArrow.removeClass(c.options.classPrefix+"disabled "+c.options.classPrefix+"arrow "+c.options.classPrefix+"hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),c.htmlExpr.test(c.options.prevArrow)&&c.$prevArrow.remove()),c.$nextArrow&&c.$nextArrow.length&&(c.$nextArrow.removeClass(c.options.classPrefix+"disabled "+c.options.classPrefix+"arrow "+c.options.classPrefix+"hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),c.htmlExpr.test(c.options.nextArrow)&&c.$nextArrow.remove()),c.$slides&&(c.$slides.removeClass(c.options.classPrefix+"slide "+c.options.classPrefix+"active "+c.options.classPrefix+"center "+c.options.classPrefix+"visible "+c.options.classPrefix+"current").removeAttr("aria-hidden").removeAttr("data-"+c.options.classPrefix+"index").each(function(){a(this).attr("style",a(this).data("originalStyling"))}),c.$slideTrack.children(this.options.slide).detach(),c.$slideTrack.detach(),c.$list.detach(),c.$slider.append(c.$slides)),c.cleanUpRows(),c.$slider.removeClass(c.options.classPrefix+"slider"),c.$slider.removeClass(c.options.classPrefix+"initialized"),c.$slider.removeClass(c.options.classPrefix+"dotted"),c.unslicked=!0,b||c.$slider.trigger("destroy",[c])},b.prototype.disableTransition=function(a){var b=this,c={};c[b.transitionType]="",b.options.fade===!1?b.$slideTrack.css(c):b.$slides.eq(a).css(c)},b.prototype.fadeSlide=function(a,b){var c=this;c.cssTransitions===!1?(c.$slides.eq(a).css({zIndex:c.options.zIndex}),c.$slides.eq(a).animate({opacity:1},c.options.speed,c.options.easing,b)):(c.applyTransition(a),c.$slides.eq(a).css({opacity:1,zIndex:c.options.zIndex}),b&&setTimeout(function(){c.disableTransition(a),b.call()},c.options.speed))},b.prototype.fadeSlideOut=function(a){var b=this;b.cssTransitions===!1?b.$slides.eq(a).animate({opacity:0,zIndex:b.options.zIndex-2},b.options.speed,b.options.easing):(b.applyTransition(a),b.$slides.eq(a).css({opacity:0,zIndex:b.options.zIndex-2}))},b.prototype.filterSlides=b.prototype.slickFilter=function(a){var b=this;null!==a&&(b.$slidesCache=b.$slides,b.unload(),b.$slideTrack.children(this.options.slide).detach(),b.$slidesCache.filter(a).appendTo(b.$slideTrack),b.reinit())},b.prototype.focusHandler=function(){var b=this;b.$slider.off("focus.slick blur.slick").on("focus.slick blur.slick","*:not(."+b.options.classPrefix+"arrow)",function(c){c.stopImmediatePropagation();var d=a(this);setTimeout(function(){b.options.pauseOnFocus&&(b.focussed=d.is(":focus"),b.autoPlay())},0)})},b.prototype.getCurrent=b.prototype.slickCurrentSlide=function(){var a=this;return a.currentSlide},b.prototype.getDotCount=function(){var a=this,b=0,c=0,d=0;if(a.options.infinite===!0)for(;b<a.slideCount;)++d,b=c+a.options.slidesToScroll,c+=a.options.slidesToScroll<=a.options.slidesToShow?a.options.slidesToScroll:a.options.slidesToShow;else if(a.options.centerMode===!0)d=a.slideCount;else if(a.options.asNavFor)for(;b<a.slideCount;)++d,b=c+a.options.slidesToScroll,c+=a.options.slidesToScroll<=a.options.slidesToShow?a.options.slidesToScroll:a.options.slidesToShow;else d=1+Math.ceil((a.slideCount-a.options.slidesToShow)/a.options.slidesToScroll);return d-1},b.prototype.getLeft=function(a){var c,d,f,b=this,e=0;return b.slideOffset=0,d=b.$slides.first().outerHeight(!0),b.options.infinite===!0?(b.slideCount>b.options.slidesToShow&&(b.slideOffset=b.slideWidth*b.options.slidesToShow*-1,e=d*b.options.slidesToShow*-1),b.slideCount%b.options.slidesToScroll!==0&&a+b.options.slidesToScroll>b.slideCount&&b.slideCount>b.options.slidesToShow&&(a>b.slideCount?(b.slideOffset=(b.options.slidesToShow-(a-b.slideCount))*b.slideWidth*-1,e=(b.options.slidesToShow-(a-b.slideCount))*d*-1):(b.slideOffset=b.slideCount%b.options.slidesToScroll*b.slideWidth*-1,e=b.slideCount%b.options.slidesToScroll*d*-1))):a+b.options.slidesToShow>b.slideCount&&(b.slideOffset=(a+b.options.slidesToShow-b.slideCount)*b.slideWidth,e=(a+b.options.slidesToShow-b.slideCount)*d),b.slideCount<=b.options.slidesToShow&&(b.slideOffset=0,e=0),b.options.centerMode===!0&&b.options.infinite===!0?b.slideOffset+=b.slideWidth*Math.floor(b.options.slidesToShow/2)-b.slideWidth:b.options.centerMode===!0&&(b.slideOffset=0,b.slideOffset+=b.slideWidth*Math.floor(b.options.slidesToShow/2)),c=b.options.vertical===!1?a*b.slideWidth*-1+b.slideOffset:a*d*-1+e,b.options.variableWidth===!0&&(f=b.slideCount<=b.options.slidesToShow||b.options.infinite===!1?b.$slideTrack.children("."+b.options.classPrefix+"slide").eq(a):b.$slideTrack.children("."+b.options.classPrefix+"slide").eq(a+b.options.slidesToShow),c=b.options.rtl===!0?f[0]?(b.$slideTrack.width()-f[0].offsetLeft-f.width())*-1:0:f[0]?f[0].offsetLeft*-1:0,b.options.centerMode===!0&&(f=b.slideCount<=b.options.slidesToShow||b.options.infinite===!1?b.$slideTrack.children("."+b.options.classPrefix+"slide").eq(a):b.$slideTrack.children("."+b.options.classPrefix+"slide").eq(a+b.options.slidesToShow+1),c=b.options.rtl===!0?f[0]?(b.$slideTrack.width()-f[0].offsetLeft-f.width())*-1:0:f[0]?f[0].offsetLeft*-1:0,c+=(b.$list.width()-f.outerWidth())/2)),c},b.prototype.getOption=b.prototype.slickGetOption=function(a){var b=this;return b.options[a]},b.prototype.getNavigableIndexes=function(){var e,a=this,b=0,c=0,d=[];for(a.options.infinite===!1?e=a.slideCount:(b=a.options.slidesToScroll*-1,c=a.options.slidesToScroll*-1,e=2*a.slideCount);b<e;)d.push(b),b=c+a.options.slidesToScroll,c+=a.options.slidesToScroll<=a.options.slidesToShow?a.options.slidesToScroll:a.options.slidesToShow;return d},b.prototype.getSlick=function(){return this},b.prototype.getSlideCount=function(){var c,d,e,b=this;return e=b.options.centerMode===!0?b.slideWidth*Math.floor(b.options.slidesToShow/2):0,b.options.swipeToSlide===!0?(b.$slideTrack.find("."+b.options.classPrefix+"slide").each(function(c,f){if(f.offsetLeft-e+a(f).outerWidth()/2>b.swipeLeft*-1)return d=f,!1}),c=Math.abs(a(d).attr("data-"+b.options.classPrefix+"index")-b.currentSlide)||1):b.options.slidesToScroll},b.prototype.goTo=b.prototype.slickGoTo=function(a,b){var c=this;c.changeSlide({data:{message:"index",index:parseInt(a)}},b)},b.prototype.init=function(b){var c=this;a(c.$slider).hasClass(c.options.classPrefix+"initialized")||(a(c.$slider).addClass(c.options.classPrefix+"initialized"),c.buildRows(),c.buildOut(),c.setProps(),c.startLoad(),c.loadSlider(),c.initializeEvents(),c.updateArrows(),c.updateDots(),c.checkResponsive(!0),c.focusHandler()),b&&c.$slider.trigger("init",[c]),c.options.accessibility===!0&&c.initADA(),c.options.autoplay&&(c.paused=!1,c.autoPlay())},b.prototype.initADA=function(){var b=this;b.$slides.add(b.$slideTrack.find("."+b.options.classPrefix+"cloned")).attr({"aria-hidden":"true",tabindex:"-1"}).find("a, input, button, select").attr({tabindex:"-1"}),b.$slideTrack.attr("role","listbox"),b.$slides.not(b.$slideTrack.find("."+b.options.classPrefix+"cloned")).each(function(c){a(this).attr("role","option");var d=b.options.centerMode?c:Math.floor(c/b.options.slidesToShow);b.options.dots===!0&&a(this).attr("aria-describedby",b.options.classPrefix+"-slide"+b.instanceUid+d)}),null!==b.$dots&&b.$dots.attr("role","tablist").find("li").each(function(c){a(this).attr({role:"presentation","aria-selected":"false","aria-controls":"navigation"+b.instanceUid+c,id:b.options.classPrefix+"-slide"+b.instanceUid+c})}).first().attr("aria-selected","true").end().find("button").attr("role","button").end().closest("div").attr("role","toolbar"),b.activateADA()},b.prototype.initArrowEvents=function(){var a=this;a.options.arrows===!0&&a.slideCount>a.options.slidesToShow&&(a.$prevArrow.off("click.slick").on("click.slick",{message:"previous"},a.changeSlide),a.$nextArrow.off("click.slick").on("click.slick",{message:"next"},a.changeSlide))},b.prototype.initDotEvents=function(){var b=this;b.options.dots===!0&&b.slideCount>b.options.slidesToShow&&a("li",b.$dots).on("click.slick",{message:"index"},b.changeSlide),b.options.dots===!0&&b.options.pauseOnDotsHover===!0&&a("li",b.$dots).on("mouseenter.slick",a.proxy(b.interrupt,b,!0)).on("mouseleave.slick",a.proxy(b.interrupt,b,!1))},b.prototype.initSlideEvents=function(){var b=this;b.options.pauseOnHover&&(b.$list.on("mouseenter.slick",a.proxy(b.interrupt,b,!0)),b.$list.on("mouseleave.slick",a.proxy(b.interrupt,b,!1)))},b.prototype.initializeEvents=function(){var b=this;b.initArrowEvents(),b.initDotEvents(),b.initSlideEvents(),b.$list.on("touchstart.slick mousedown.slick",{action:"start"},b.swipeHandler),b.$list.on("touchmove.slick mousemove.slick",{action:"move"},b.swipeHandler),b.$list.on("touchend.slick mouseup.slick",{action:"end"},b.swipeHandler),b.$list.on("touchcancel.slick mouseleave.slick",{action:"end"},b.swipeHandler),b.$list.on("click.slick",b.clickHandler),a(document).on(b.visibilityChange,a.proxy(b.visibility,b)),b.options.accessibility===!0&&b.$list.on("keydown.slick",b.keyHandler),b.options.focusOnSelect===!0&&a(b.$slideTrack).children().on("click.slick",b.selectHandler),a(window).on("orientationchange.slick.slick-"+b.instanceUid,a.proxy(b.orientationChange,b)),a(window).on("resize.slick.slick-"+b.instanceUid,a.proxy(b.resize,b)),a("[draggable!=true]",b.$slideTrack).on("dragstart",b.preventDefault),a(window).on("load.slick.slick-"+b.instanceUid,b.setPosition),a(document).on("ready.slick.slick-"+b.instanceUid,b.setPosition)},b.prototype.initUI=function(){var a=this;a.options.arrows===!0&&a.slideCount>a.options.slidesToShow&&(a.$prevArrow.show(),a.$nextArrow.show()),a.options.dots===!0&&a.slideCount>a.options.slidesToShow&&a.$dots.show()},b.prototype.keyHandler=function(a){var b=this;a.target.tagName.match("TEXTAREA|INPUT|SELECT")||(37===a.keyCode&&b.options.accessibility===!0?b.changeSlide({data:{message:b.options.rtl===!0?"next":"previous"}}):39===a.keyCode&&b.options.accessibility===!0&&b.changeSlide({data:{message:b.options.rtl===!0?"previous":"next"}}))},b.prototype.lazyLoad=function(){function g(c){a("img[data-lazy]",c).each(function(){var c=a(this),d=a(this).attr("data-lazy"),e=document.createElement("img");e.onload=function(){c.animate({opacity:0},100,function(){c.attr("src",d).animate({opacity:1},200,function(){c.removeAttr("data-lazy").removeClass(b.options.classPrefix+"loading")}),b.$slider.trigger("lazyLoaded",[b,c,d])})},e.onerror=function(){c.removeAttr("data-lazy").removeClass(b.options.classPrefix+"loading").addClass(b.options.classPrefix+"lazyload-error"),b.$slider.trigger("lazyLoadError",[b,c,d])},e.src=d})}var c,d,e,f,b=this;b.options.centerMode===!0?b.options.infinite===!0?(e=b.currentSlide+(b.options.slidesToShow/2+1),f=e+b.options.slidesToShow+2):(e=Math.max(0,b.currentSlide-(b.options.slidesToShow/2+1)),f=2+(b.options.slidesToShow/2+1)+b.currentSlide):(e=b.options.infinite?b.options.slidesToShow+b.currentSlide:b.currentSlide,f=Math.ceil(e+b.options.slidesToShow),b.options.fade===!0&&(e>0&&e--,f<=b.slideCount&&f++)),c=b.$slider.find("."+b.options.classPrefix+"slide").slice(e,f),g(c),b.slideCount<=b.options.slidesToShow?(d=b.$slider.find("."+b.options.classPrefix+"slide"),g(d)):b.currentSlide>=b.slideCount-b.options.slidesToShow?(d=b.$slider.find("."+b.options.classPrefix+"cloned").slice(0,b.options.slidesToShow),g(d)):0===b.currentSlide&&(d=b.$slider.find("."+b.options.classPrefix+"cloned").slice(b.options.slidesToShow*-1),g(d))},b.prototype.loadSlider=function(){var a=this;a.setPosition(),a.$slideTrack.css({opacity:1}),a.$slider.removeClass(a.options.classPrefix+"loading"),a.initUI(),"progressive"===a.options.lazyLoad&&a.progressiveLazyLoad()},b.prototype.next=b.prototype.slickNext=function(){var a=this;a.changeSlide({data:{message:"next"}})},b.prototype.orientationChange=function(){var a=this;a.checkResponsive(),a.setPosition()},b.prototype.pause=b.prototype.slickPause=function(){var a=this;a.autoPlayClear(),a.paused=!0},b.prototype.play=b.prototype.slickPlay=function(){var a=this;a.autoPlay(),a.options.autoplay=!0,a.paused=!1,a.focussed=!1,a.interrupted=!1},b.prototype.postSlide=function(a){var b=this;b.unslicked||(b.$slider.trigger("afterChange",[b,a]),b.animating=!1,b.setPosition(),b.swipeLeft=null,b.options.autoplay&&b.autoPlay(),b.options.accessibility===!0&&b.initADA())},b.prototype.prev=b.prototype.slickPrev=function(){var a=this;a.changeSlide({data:{message:"previous"}})},b.prototype.preventDefault=function(a){a.preventDefault()},b.prototype.progressiveLazyLoad=function(b){b=b||1;var e,f,g,c=this,d=a("img[data-lazy]",c.$slider);d.length?(e=d.first(),f=e.attr("data-lazy"),g=document.createElement("img"),g.onload=function(){e.attr("src",f).removeAttr("data-lazy").removeClass(c.options.classPrefix+"loading"),c.options.adaptiveHeight===!0&&c.setPosition(),c.$slider.trigger("lazyLoaded",[c,e,f]),c.progressiveLazyLoad()},g.onerror=function(){b<3?setTimeout(function(){c.progressiveLazyLoad(b+1)},500):(e.removeAttr("data-lazy").removeClass(c.options.classPrefix+"loading").addClass(c.options.classPrefix+"lazyload-error"),c.$slider.trigger("lazyLoadError",[c,e,f]),c.progressiveLazyLoad())},g.src=f):c.$slider.trigger("allImagesLoaded",[c])},b.prototype.refresh=function(b){var d,e,c=this;e=c.slideCount-c.options.slidesToShow,!c.options.infinite&&c.currentSlide>e&&(c.currentSlide=e),c.slideCount<=c.options.slidesToShow&&(c.currentSlide=0),d=c.currentSlide,c.destroy(!0),a.extend(c,c.initials,{currentSlide:d}),c.init(),b||c.changeSlide({data:{message:"index",index:d}},!1)},b.prototype.registerBreakpoints=function(){var c,d,e,b=this,f=b.options.responsive||null;if("array"===a.type(f)&&f.length){b.respondTo=b.options.respondTo||"window";for(c in f)if(e=b.breakpoints.length-1,d=f[c].breakpoint,f.hasOwnProperty(c)){for(;e>=0;)b.breakpoints[e]&&b.breakpoints[e]===d&&b.breakpoints.splice(e,1),e--;b.breakpoints.push(d),b.breakpointSettings[d]=f[c].settings}b.breakpoints.sort(function(a,c){return b.options.mobileFirst?a-c:c-a})}},b.prototype.reinit=function(){var b=this;if(b.$slides=b.$slideTrack.children(b.options.slide).addClass(b.options.classPrefix+"slide"),b.options.slideMargin){var c=b.options.rtl===!0?"right":"left";b.$slides.css("margin-"+c,b.options.slideMargin)}b.slideCount=b.$slides.length,b.currentSlide>=b.slideCount&&0!==b.currentSlide&&(b.currentSlide=b.currentSlide-b.options.slidesToScroll),b.slideCount<=b.options.slidesToShow&&(b.currentSlide=0),b.registerBreakpoints(),b.setProps(),b.setupInfinite(),b.buildArrows(),b.updateArrows(),b.initArrowEvents(),b.buildDots(),b.updateDots(),b.initDotEvents(),b.cleanUpSlideEvents(),b.initSlideEvents(),b.checkResponsive(!1,!0),b.options.focusOnSelect===!0&&a(b.$slideTrack).children().on("click.slick",b.selectHandler),b.setSlideClasses("number"==typeof b.currentSlide?b.currentSlide:0),b.setPosition(),b.focusHandler(),b.paused=!b.options.autoplay,b.autoPlay(),b.$slider.trigger("reInit",[b])},b.prototype.resize=function(){var b=this;a(window).width()!==b.windowWidth&&(clearTimeout(b.windowDelay),b.windowDelay=window.setTimeout(function(){b.windowWidth=a(window).width(),b.checkResponsive(),b.unslicked||b.setPosition()},50))},b.prototype.removeSlide=b.prototype.slickRemove=function(a,b,c){var d=this;return"boolean"==typeof a?(b=a,a=b===!0?0:d.slideCount-1):a=b===!0?--a:a,!(d.slideCount<1||a<0||a>d.slideCount-1)&&(d.unload(),c===!0?d.$slideTrack.children().remove():d.$slideTrack.children(this.options.slide).eq(a).remove(),d.$slides=d.$slideTrack.children(this.options.slide),d.$slideTrack.children(this.options.slide).detach(),d.$slideTrack.append(d.$slides),d.$slidesCache=d.$slides,void d.reinit())},b.prototype.setCSS=function(a){var d,e,b=this,c={};b.options.rtl===!0&&(a=-a);var f=b.options.rtl===!0?1:-1;d="left"==b.positionProp?Math.ceil(a+b.options.slideMargin*f)+"px":"0px",e="top"==b.positionProp?Math.ceil(a)+"px":"0px",c[b.positionProp]=a,b.transformsEnabled===!1?b.$slideTrack.css(c):(c={},b.cssTransitions===!1?(c[b.animType]="translate("+d+", "+e+")",b.$slideTrack.css(c)):(c[b.animType]="translate3d("+d+", "+e+", 0px)",b.$slideTrack.css(c)))},b.prototype.setDimensions=function(){var a=this;a.options.vertical===!1?a.options.centerMode===!0&&a.$list.css({padding:"0px "+a.options.centerPadding}):(a.$list.height(a.$slides.first().outerHeight(!0)*a.options.slidesToShow),a.options.centerMode===!0&&a.$list.css({padding:a.options.centerPadding+" 0px"})),a.listWidth=a.$list.width(),a.listHeight=a.$list.height(),a.options.vertical===!1&&a.options.variableWidth===!1?(a.slideWidth=Math.ceil(a.listWidth/a.options.slidesToShow),a.slideWidth+=a.options.slideMargin,a.$slideTrack.width(Math.ceil(a.slideWidth*a.$slideTrack.children("."+a.options.classPrefix+"slide").length))):a.options.variableWidth===!0?a.$slideTrack.width(5e3*a.slideCount):(a.slideWidth=Math.ceil(a.listWidth),a.$slideTrack.height(Math.ceil(a.$slides.first().outerHeight(!0)*a.$slideTrack.children("."+a.options.classPrefix+"slide").length)));var b=a.$slides.first().outerWidth(!0)-a.$slides.first().width();a.options.variableWidth===!1&&a.$slideTrack.children("."+a.options.classPrefix+"slide").width(a.slideWidth-b)},b.prototype.setFade=function(){var c,b=this;b.$slides.each(function(d,e){c=b.slideWidth*d*-1,b.options.rtl===!0?a(e).css({position:"relative",right:c,top:0,zIndex:b.options.zIndex-2,opacity:0}):a(e).css({position:"relative",left:c,top:0,zIndex:b.options.zIndex-2,opacity:0})}),b.$slides.eq(b.currentSlide).css({zIndex:b.options.zIndex-1,opacity:1})},b.prototype.setHeight=function(){var a=this;if(1===a.options.slidesToShow&&a.options.adaptiveHeight===!0&&a.options.vertical===!1){var b=a.$slides.eq(a.currentSlide).outerHeight(!0);a.$list.css("height",b)}},b.prototype.setOption=b.prototype.slickSetOption=function(){var c,d,e,f,h,b=this,g=!1;if("object"===a.type(arguments[0])?(e=arguments[0],g=arguments[1],h="multiple"):"string"===a.type(arguments[0])&&(e=arguments[0],f=arguments[1],g=arguments[2],"responsive"===arguments[0]&&"array"===a.type(arguments[1])?h="responsive":"undefined"!=typeof arguments[1]&&(h="single")),"single"===h)b.options[e]=f;else if("multiple"===h)a.each(e,function(a,c){b.options[a]=c});else if("responsive"===h)for(d in f)if("array"!==a.type(b.options.responsive))b.options.responsive=[f[d]];else{for(c=b.options.responsive.length-1;c>=0;)b.options.responsive[c].breakpoint===f[d].breakpoint&&b.options.responsive.splice(c,1),c--;b.options.responsive.push(f[d])}g&&(b.unload(),b.reinit())},b.prototype.setPosition=function(){var a=this;a.setDimensions(),a.setHeight(),a.options.fade===!1?a.setCSS(a.getLeft(a.currentSlide)):a.setFade(),a.$slider.trigger("setPosition",[a])},b.prototype.setProps=function(){var a=this,b=document.body.style;a.positionProp=a.options.vertical===!0?"top":"left","top"===a.positionProp?a.$slider.addClass(a.options.classPrefix+"vertical"):a.$slider.removeClass(a.options.classPrefix+"vertical"),
void 0===b.WebkitTransition&&void 0===b.MozTransition&&void 0===b.msTransition||a.options.useCSS===!0&&(a.cssTransitions=!0),a.options.fade&&("number"==typeof a.options.zIndex?a.options.zIndex<3&&(a.options.zIndex=3):a.options.zIndex=a.defaults.zIndex),void 0!==b.OTransform&&(a.animType="OTransform",a.transformType="-o-transform",a.transitionType="OTransition",void 0===b.perspectiveProperty&&void 0===b.webkitPerspective&&(a.animType=!1)),void 0!==b.MozTransform&&(a.animType="MozTransform",a.transformType="-moz-transform",a.transitionType="MozTransition",void 0===b.perspectiveProperty&&void 0===b.MozPerspective&&(a.animType=!1)),void 0!==b.webkitTransform&&(a.animType="webkitTransform",a.transformType="-webkit-transform",a.transitionType="webkitTransition",void 0===b.perspectiveProperty&&void 0===b.webkitPerspective&&(a.animType=!1)),void 0!==b.msTransform&&(a.animType="msTransform",a.transformType="-ms-transform",a.transitionType="msTransition",void 0===b.msTransform&&(a.animType=!1)),void 0!==b.transform&&a.animType!==!1&&(a.animType="transform",a.transformType="transform",a.transitionType="transition"),a.transformsEnabled=a.options.useTransform&&null!==a.animType&&a.animType!==!1},b.prototype.setSlideClasses=function(a){var c,d,e,f,b=this;d=b.$slider.find("."+b.options.classPrefix+"slide").removeClass(b.options.classPrefix+"active "+b.options.classPrefix+"center "+b.options.classPrefix+"current").attr("aria-hidden","true"),b.$slides.eq(a).addClass(b.options.classPrefix+"current"),b.options.centerMode===!0?(c=Math.floor(b.options.slidesToShow/2),b.options.infinite===!0&&(a>=c&&a<=b.slideCount-1-c?b.$slides.slice(a-c,a+c+1).addClass(b.options.classPrefix+"active").attr("aria-hidden","false"):(e=b.options.slidesToShow+a,d.slice(e-c+1,e+c+2).addClass(b.options.classPrefix+"active").attr("aria-hidden","false")),0===a?d.eq(d.length-1-b.options.slidesToShow).addClass(b.options.classPrefix+"center"):a===b.slideCount-1&&d.eq(b.options.slidesToShow).addClass(b.options.classPrefix+"center")),b.$slides.eq(a).addClass(b.options.classPrefix+"center")):a>=0&&a<=b.slideCount-b.options.slidesToShow?b.$slides.slice(a,a+b.options.slidesToShow).addClass(b.options.classPrefix+"active").attr("aria-hidden","false"):d.length<=b.options.slidesToShow?d.addClass(b.options.classPrefix+"active").attr("aria-hidden","false"):(f=b.slideCount%b.options.slidesToShow,e=b.options.infinite===!0?b.options.slidesToShow+a:a,b.options.slidesToShow==b.options.slidesToScroll&&b.slideCount-a<b.options.slidesToShow?d.slice(e-(b.options.slidesToShow-f),e+f).addClass(b.options.classPrefix+"active").attr("aria-hidden","false"):d.slice(e,e+b.options.slidesToShow).addClass(b.options.classPrefix+"active").attr("aria-hidden","false")),"ondemand"===b.options.lazyLoad&&b.lazyLoad()},b.prototype.setupInfinite=function(){var c,d,e,b=this;if(b.options.fade===!0&&(b.options.centerMode=!1),b.options.infinite===!0&&b.options.fade===!1&&(d=null,b.slideCount>b.options.slidesToShow)){for(e=b.options.centerMode===!0?b.options.slidesToShow+1:b.options.slidesToShow,c=b.slideCount;c>b.slideCount-e;c-=1)d=c-1,a(b.$slides[d]).clone(!0).attr("id","").attr("data-"+b.options.classPrefix+"index",d-b.slideCount).prependTo(b.$slideTrack).addClass(b.options.classPrefix+"cloned");for(c=0;c<e;c+=1)d=c,a(b.$slides[d]).clone(!0).attr("id","").attr("data-"+b.options.classPrefix+"index",d+b.slideCount).appendTo(b.$slideTrack).addClass(b.options.classPrefix+"cloned");b.$slideTrack.find("."+b.options.classPrefix+"cloned").find("[id]").each(function(){a(this).attr("id","")})}},b.prototype.interrupt=function(a){var b=this;a||b.autoPlay(),b.interrupted=a},b.prototype.selectHandler=function(b){var c=this,d=a(b.target).is("."+c.options.classPrefix+"slide")?a(b.target):a(b.target).parents("."+c.options.classPrefix+"slide"),e=parseInt(d.attr("data-"+c.options.classPrefix+"index"));return e||(e=0),c.slideCount<=c.options.slidesToShow?(c.setSlideClasses(e),void c.asNavFor(e)):void c.slideHandler(e)},b.prototype.slideHandler=function(a,b,c){var d,e,f,g,j,h=null,i=this;if(b=b||!1,(i.animating!==!0||i.options.waitForAnimate!==!0)&&!(i.options.fade===!0&&i.currentSlide===a||i.slideCount<=i.options.slidesToShow))return b===!1&&i.asNavFor(a),d=a,h=i.getLeft(d),g=i.getLeft(i.currentSlide),i.currentLeft=null===i.swipeLeft?g:i.swipeLeft,i.options.infinite===!1&&i.options.centerMode===!1&&(a<0||a>i.getDotCount()*i.options.slidesToScroll)?void(i.options.fade===!1&&(d=i.currentSlide,c!==!0?i.animateSlide(g,function(){i.postSlide(d)}):i.postSlide(d))):i.options.infinite===!1&&i.options.centerMode===!0&&(a<0||a>i.slideCount-i.options.slidesToScroll)?void(i.options.fade===!1&&(d=i.currentSlide,c!==!0?i.animateSlide(g,function(){i.postSlide(d)}):i.postSlide(d))):(i.options.autoplay&&clearInterval(i.autoPlayTimer),e=d<0?i.slideCount%i.options.slidesToScroll!==0?i.slideCount-i.slideCount%i.options.slidesToScroll:i.slideCount+d:d>=i.slideCount?i.slideCount%i.options.slidesToScroll!==0?0:d-i.slideCount:d,i.animating=!0,i.$slider.trigger("beforeChange",[i,i.currentSlide,e]),f=i.currentSlide,i.currentSlide=e,i.setSlideClasses(i.currentSlide),i.options.asNavFor&&(j=i.getNavTarget(),j=j.slick("getSlick"),j.slideCount<=j.options.slidesToShow&&j.setSlideClasses(i.currentSlide)),i.updateDots(),i.updateArrows(),i.options.fade===!0?(c!==!0?(i.fadeSlideOut(f),i.fadeSlide(e,function(){i.postSlide(e)})):i.postSlide(e),void i.animateHeight()):void(c!==!0?i.animateSlide(h,function(){i.postSlide(e)}):i.postSlide(e)))},b.prototype.startLoad=function(){var a=this;a.options.arrows===!0&&a.slideCount>a.options.slidesToShow&&(a.$prevArrow.hide(),a.$nextArrow.hide()),a.options.dots===!0&&a.slideCount>a.options.slidesToShow&&a.$dots.hide(),a.$slider.addClass(a.options.classPrefix+"loading")},b.prototype.swipeDirection=function(){var a,b,c,d,e=this;return a=e.touchObject.startX-e.touchObject.curX,b=e.touchObject.startY-e.touchObject.curY,c=Math.atan2(b,a),d=Math.round(180*c/Math.PI),d<0&&(d=360-Math.abs(d)),d<=45&&d>=0?e.options.rtl===!1?"left":"right":d<=360&&d>=315?e.options.rtl===!1?"left":"right":d>=135&&d<=225?e.options.rtl===!1?"right":"left":e.options.verticalSwiping===!0?d>=35&&d<=135?"down":"up":"vertical"},b.prototype.swipeEnd=function(a){var c,d,b=this;if(b.dragging=!1,b.interrupted=!1,b.shouldClick=!(b.touchObject.swipeLength>10),void 0===b.touchObject.curX)return!1;if(b.touchObject.edgeHit===!0&&b.$slider.trigger("edge",[b,b.swipeDirection()]),b.touchObject.swipeLength>=b.touchObject.minSwipe){switch(d=b.swipeDirection()){case"left":case"down":c=b.options.swipeToSlide?b.checkNavigable(b.currentSlide+b.getSlideCount()):b.currentSlide+b.getSlideCount(),b.currentDirection=0;break;case"right":case"up":c=b.options.swipeToSlide?b.checkNavigable(b.currentSlide-b.getSlideCount()):b.currentSlide-b.getSlideCount(),b.currentDirection=1}"vertical"!=d&&(b.slideHandler(c),b.touchObject={},b.$slider.trigger("swipe",[b,d]))}else b.touchObject.startX!==b.touchObject.curX&&(b.slideHandler(b.currentSlide),b.touchObject={})},b.prototype.swipeHandler=function(a){var b=this;if(!(b.options.swipe===!1||"ontouchend"in document&&b.options.swipe===!1||b.options.draggable===!1&&a.type.indexOf("mouse")!==-1))switch(b.touchObject.fingerCount=a.originalEvent&&void 0!==a.originalEvent.touches?a.originalEvent.touches.length:1,b.touchObject.minSwipe=b.listWidth/b.options.touchThreshold,b.options.verticalSwiping===!0&&(b.touchObject.minSwipe=b.listHeight/b.options.touchThreshold),a.data.action){case"start":b.swipeStart(a);break;case"move":b.swipeMove(a);break;case"end":b.swipeEnd(a)}},b.prototype.swipeMove=function(a){var d,e,f,g,h,b=this;return h=void 0!==a.originalEvent?a.originalEvent.touches:null,!(!b.dragging||h&&1!==h.length)&&(d=b.getLeft(b.currentSlide),b.touchObject.curX=void 0!==h?h[0].pageX:a.clientX,b.touchObject.curY=void 0!==h?h[0].pageY:a.clientY,b.touchObject.swipeLength=Math.round(Math.sqrt(Math.pow(b.touchObject.curX-b.touchObject.startX,2))),b.options.verticalSwiping===!0&&(b.touchObject.swipeLength=Math.round(Math.sqrt(Math.pow(b.touchObject.curY-b.touchObject.startY,2)))),e=b.swipeDirection(),"vertical"!==e?(void 0!==a.originalEvent&&b.touchObject.swipeLength>4&&a.preventDefault(),g=(b.options.rtl===!1?1:-1)*(b.touchObject.curX>b.touchObject.startX?1:-1),b.options.verticalSwiping===!0&&(g=b.touchObject.curY>b.touchObject.startY?1:-1),f=b.touchObject.swipeLength,b.touchObject.edgeHit=!1,b.options.infinite===!1&&(0===b.currentSlide&&"right"===e||b.currentSlide>=b.getDotCount()&&"left"===e)&&(f=b.touchObject.swipeLength*b.options.edgeFriction,b.touchObject.edgeHit=!0),b.options.vertical===!1?b.swipeLeft=d+f*g:b.swipeLeft=d+f*(b.$list.height()/b.listWidth)*g,b.options.verticalSwiping===!0&&(b.swipeLeft=d+f*g),b.options.fade!==!0&&b.options.touchMove!==!1&&(b.animating===!0?(b.swipeLeft=null,!1):void b.setCSS(b.swipeLeft))):void 0)},b.prototype.swipeStart=function(a){var c,b=this;return b.interrupted=!0,1!==b.touchObject.fingerCount||b.slideCount<=b.options.slidesToShow?(b.touchObject={},!1):(void 0!==a.originalEvent&&void 0!==a.originalEvent.touches&&(c=a.originalEvent.touches[0]),b.touchObject.startX=b.touchObject.curX=void 0!==c?c.pageX:a.clientX,b.touchObject.startY=b.touchObject.curY=void 0!==c?c.pageY:a.clientY,void(b.dragging=!0))},b.prototype.unfilterSlides=b.prototype.slickUnfilter=function(){var a=this;null!==a.$slidesCache&&(a.unload(),a.$slideTrack.children(this.options.slide).detach(),a.$slidesCache.appendTo(a.$slideTrack),a.reinit())},b.prototype.unload=function(){var b=this;a("."+b.options.classPrefix+"cloned",b.$slider).remove(),b.$dots&&b.$dots.remove(),b.$prevArrow&&b.htmlExpr.test(b.options.prevArrow)&&b.$prevArrow.remove(),b.$nextArrow&&b.htmlExpr.test(b.options.nextArrow)&&b.$nextArrow.remove(),b.$slides.removeClass(b.options.classPrefix+"slide "+b.options.classPrefix+"active "+b.options.classPrefix+"visible "+b.options.classPrefix+"current").attr("aria-hidden","true").css("width","")},b.prototype.unslick=function(a){var b=this;b.$slider.trigger("unslick",[b,a]),b.destroy()},b.prototype.updateArrows=function(){var b,a=this;b=Math.floor(a.options.slidesToShow/2),a.options.arrows===!0&&a.slideCount>a.options.slidesToShow&&!a.options.infinite&&(a.$prevArrow.removeClass(a.options.classPrefix+"disabled").attr("aria-disabled","false"),a.$nextArrow.removeClass(a.options.classPrefix+"disabled").attr("aria-disabled","false"),0===a.currentSlide?(a.$prevArrow.addClass(a.options.classPrefix+"disabled").attr("aria-disabled","true"),a.$nextArrow.removeClass(a.options.classPrefix+"disabled").attr("aria-disabled","false")):a.currentSlide>=a.slideCount-a.options.slidesToShow&&a.options.centerMode===!1?(a.$nextArrow.addClass(a.options.classPrefix+"disabled").attr("aria-disabled","true"),a.$prevArrow.removeClass(a.options.classPrefix+"disabled").attr("aria-disabled","false")):a.currentSlide>=a.slideCount-1&&a.options.centerMode===!0&&(a.$nextArrow.addClass(a.options.classPrefix+"disabled").attr("aria-disabled","true"),a.$prevArrow.removeClass(a.options.classPrefix+"disabled").attr("aria-disabled","false")))},b.prototype.updateDots=function(){var a=this;null!==a.$dots&&(a.$dots.find("li").removeClass(a.options.classPrefix+"active").attr("aria-hidden","true"),a.$dots.find("li").eq(Math.floor(a.currentSlide/a.options.slidesToScroll)).addClass(a.options.classPrefix+"active").attr("aria-hidden","false"))},b.prototype.visibility=function(){var a=this;a.options.autoplay&&(document[a.hidden]?a.interrupted=!0:a.interrupted=!1)},a.fn.slick=function(){var f,g,a=this,c=arguments[0],d=Array.prototype.slice.call(arguments,1),e=a.length;for(f=0;f<e;f++)if("object"==typeof c||"undefined"==typeof c?a[f].slick=new b(a[f],c):g=a[f].slick[c].apply(a[f].slick,d),"undefined"!=typeof g)return g;return a}});
jQuery(function(e){function t(e){return a().indexOf(e.toString())>-1}function a(){var e=s.getItem("better-review-user-rating");return e?e.split(","):[]}function n(e){var t=a();t.push(e.toString());s.setItem("better-review-user-rating",t,217728e3,betterReviewsLoc.cp)}var s={getItem:function(e){return e?decodeURIComponent(document.cookie.replace(new RegExp("(?:(?:^|.*;)\\s*"+encodeURIComponent(e).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*([^;]*).*$)|^.*$"),"$1"))||null:null},setItem:function(e,t,a,n,s,r){if(!e||/^(?:expires|max\-age|path|domain|secure)$/i.test(e))return!1;var i="";if(a)switch(a.constructor){case Number:i=a===1/0?"; expires=Fri, 31 Dec 9999 23:59:59 GMT":"; max-age="+a;break;case String:i="; expires="+a;break;case Date:i="; expires="+a.toUTCString()}return document.cookie=encodeURIComponent(e)+"="+encodeURIComponent(t)+i+(s?"; domain="+s:"")+(n?"; path="+n:"")+(r?"; secure":""),!0},removeItem:function(e,t,a){return!!this.hasItem(e)&&(document.cookie=encodeURIComponent(e)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT"+(a?"; domain="+a:"")+(t?"; path="+t:""),!0)},hasItem:function(e){return!!e&&new RegExp("(?:^|;\\s*)"+encodeURIComponent(e).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(document.cookie)},keys:function(){for(var e=document.cookie.replace(/((?:^|\s*;)[^\=]+)(?=;|$)|^\s*|\s*(?:\=[^;]*)?(?:\1|$)/g,"").split(/\s*(?:\=[^;]*)?;\s*/),t=e.length,a=0;a<t;a++)e[a]=decodeURIComponent(e[a]);return e}},r=e("body").hasClass("rtl");e(".readers-ratings").on("mousemove",".rating-stars:not(.disable)",function(t){var a=e(this),n=(a.width()-2)/100,s=Math.ceil(r?e(this).offset().left+e(this).width()-t.pageX:t.pageX-e(this).offset().left),i=Math.min(100,Math.ceil(s/n));a.children("span").width(i+"%").data("rate",i)}).on("click",".rating-stars:not(.disable)",function(){var t=e(this),a=t.closest(".betterstudio-review");t.addClass("disable"),t.fadeOut(150,function(){t.parent().append('<i class="fa fa-spinner fa-spin loading" style="margin: 0 50px;"></i>')}),e.ajax({url:betterReviewsLoc.ajax_url,type:"POST",dataType:"json",data:{action:"better-review-rating",post_id:t.data("post-id"),rating:t.children("span").data("rate")}}).done(function(s){if(s.success)n(t.data("post-id")),t.children("span").width(s.data.vote+"%").data("rate",s.data.vote),e(".ratings-results .number",a).html(s.data.vote+"%"),t.fadeIn(150),e(".total-votes .number",a).html(s.data.votes_count);else{var r=e("<span />",{class:"error-message"}).html(s.data.message);r.appendTo(t.parent()),r.delay(4e3).fadeOut(150,function(){t.fadeIn(150),t.removeClass("disable")})}}).always(function(){t.parent().find(".loading").remove()})}),e(".readers-ratings .rating-stars:not(.disable)").each(function(){var a=e(this);t(a.data("post-id"))&&a.addClass("disable")})});
!function(e,t){"function"==typeof define&&define.amd?define("Chartist",[],function(){return e.Chartist=t()}):"object"==typeof module&&module.exports?module.exports=t():e.Chartist=t()}(this,function(){var e={version:"0.11.0"};return function(u,f,m){"use strict";m.namespaces={svg:"http://www.w3.org/2000/svg",xmlns:"http://www.w3.org/2000/xmlns/",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",ct:"http://gionkunz.github.com/chartist-js/ct"},m.noop=function(e){return e},m.alphaNumerate=function(e){return String.fromCharCode(97+e%26)},m.extend=function(e){var t,i,n;for(e=e||{},t=1;t<arguments.length;t++)for(var s in i=arguments[t])"object"!=typeof(n=i[s])||null===n||n instanceof Array?e[s]=n:e[s]=m.extend(e[s],n);return e},m.replaceAll=function(e,t,i){return e.replace(new RegExp(t,"g"),i)},m.ensureUnit=function(e,t){return"number"==typeof e&&(e+=t),e},m.quantity=function(e){if("string"!=typeof e)return{value:e};var t=/^(\d+)\s*(.*)$/g.exec(e);return{value:+t[1],unit:t[2]||void 0}},m.querySelector=function(e){return e instanceof Node?e:f.querySelector(e)},m.times=function(e){return Array.apply(null,new Array(e))},m.sum=function(e,t){return e+(t||0)},m.mapMultiply=function(t){return function(e){return e*t}},m.mapAdd=function(t){return function(e){return e+t}},m.serialMap=function(n,s){var r=[],e=Math.max.apply(null,n.map(function(e){return e.length}));return m.times(e).forEach(function(e,t){var i=n.map(function(e){return e[t]});r[t]=s.apply(null,i)}),r},m.roundWithPrecision=function(e,t){var i=Math.pow(10,t||m.precision);return Math.round(e*i)/i},m.precision=8,m.escapingMap={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#039;"},m.serialize=function(e){return null==e?e:("number"==typeof e?e=""+e:"object"==typeof e&&(e=JSON.stringify({data:e})),Object.keys(m.escapingMap).reduce(function(e,t){return m.replaceAll(e,t,m.escapingMap[t])},e))},m.deserialize=function(e){if("string"!=typeof e)return e;e=Object.keys(m.escapingMap).reduce(function(e,t){return m.replaceAll(e,m.escapingMap[t],t)},e);try{e=void 0!==(e=JSON.parse(e)).data?e.data:e}catch(e){}return e},m.createSvg=function(t,e,i,n){var s;return e=e||"100%",i=i||"100%",Array.prototype.slice.call(t.querySelectorAll("svg")).filter(function(e){return e.getAttributeNS(m.namespaces.xmlns,"ct")}).forEach(function(e){t.removeChild(e)}),(s=new m.Svg("svg").attr({width:e,height:i}).addClass(n))._node.style.width=e,s._node.style.height=i,t.appendChild(s._node),s},m.normalizeData=function(e,t,i){var n,s={raw:e,normalized:{}};return s.normalized.series=m.getDataArray({series:e.series||[]},t,i),n=s.normalized.series.every(function(e){return e instanceof Array})?Math.max.apply(null,s.normalized.series.map(function(e){return e.length})):s.normalized.series.length,s.normalized.labels=(e.labels||[]).slice(),Array.prototype.push.apply(s.normalized.labels,m.times(Math.max(0,n-s.normalized.labels.length)).map(function(){return""})),t&&m.reverseData(s.normalized),s},m.safeHasProperty=function(e,t){return null!==e&&"object"==typeof e&&e.hasOwnProperty(t)},m.isDataHoleValue=function(e){return null==e||"number"==typeof e&&isNaN(e)},m.reverseData=function(e){e.labels.reverse(),e.series.reverse();for(var t=0;t<e.series.length;t++)"object"==typeof e.series[t]&&void 0!==e.series[t].data?e.series[t].data.reverse():e.series[t]instanceof Array&&e.series[t].reverse()},m.getDataArray=function(e,t,n){return e.series.map(function e(t){if(m.safeHasProperty(t,"value"))return e(t.value);if(m.safeHasProperty(t,"data"))return e(t.data);if(t instanceof Array)return t.map(e);if(!m.isDataHoleValue(t)){if(n){var i={};return"string"==typeof n?i[n]=m.getNumberOrUndefined(t):i.y=m.getNumberOrUndefined(t),i.x=t.hasOwnProperty("x")?m.getNumberOrUndefined(t.x):i.x,i.y=t.hasOwnProperty("y")?m.getNumberOrUndefined(t.y):i.y,i}return m.getNumberOrUndefined(t)}})},m.normalizePadding=function(e,t){return t=t||0,"number"==typeof e?{top:e,right:e,bottom:e,left:e}:{top:"number"==typeof e.top?e.top:t,right:"number"==typeof e.right?e.right:t,bottom:"number"==typeof e.bottom?e.bottom:t,left:"number"==typeof e.left?e.left:t}},m.getMetaData=function(e,t){var i=e.data?e.data[t]:e[t];return i?i.meta:void 0},m.orderOfMagnitude=function(e){return Math.floor(Math.log(Math.abs(e))/Math.LN10)},m.projectLength=function(e,t,i){return t/i.range*e},m.getAvailableHeight=function(e,t){return Math.max((m.quantity(t.height).value||e.height())-(t.chartPadding.top+t.chartPadding.bottom)-t.axisX.offset,0)},m.getHighLow=function(e,t,s){var r={high:void 0===(t=m.extend({},t,s?t["axis"+s.toUpperCase()]:{})).high?-Number.MAX_VALUE:+t.high,low:void 0===t.low?Number.MAX_VALUE:+t.low},a=void 0===t.high,o=void 0===t.low;return(a||o)&&function e(t){if(void 0!==t)if(t instanceof Array)for(var i=0;i<t.length;i++)e(t[i]);else{var n=s?+t[s]:+t;a&&n>r.high&&(r.high=n),o&&n<r.low&&(r.low=n)}}(e),!t.referenceValue&&0!==t.referenceValue||(r.high=Math.max(t.referenceValue,r.high),r.low=Math.min(t.referenceValue,r.low)),r.high<=r.low&&(0===r.low?r.high=1:r.low<0?r.high=0:(0<r.high||(r.high=1),r.low=0)),r},m.isNumeric=function(e){return null!==e&&isFinite(e)},m.isFalseyButZero=function(e){return!e&&0!==e},m.getNumberOrUndefined=function(e){return m.isNumeric(e)?+e:void 0},m.isMultiValue=function(e){return"object"==typeof e&&("x"in e||"y"in e)},m.getMultiValue=function(e,t){return m.isMultiValue(e)?m.getNumberOrUndefined(e[t||"y"]):m.getNumberOrUndefined(e)},m.rho=function(e){function i(e,t){return e%t==0?t:i(t,e%t)}function t(e){return e*e+1}if(1===e)return e;var n,s=2,r=2;if(e%2==0)return 2;for(;s=t(s)%e,r=t(t(r))%e,1===(n=i(Math.abs(s-r),e)););return n},m.getBounds=function(e,t,i,n){function s(e,t){return e===(e+=t)&&(e*=1+(0<t?d:-d)),e}var r,a,o,l=0,u={high:t.high,low:t.low};u.valueRange=u.high-u.low,u.oom=m.orderOfMagnitude(u.valueRange),u.step=Math.pow(10,u.oom),u.min=Math.floor(u.low/u.step)*u.step,u.max=Math.ceil(u.high/u.step)*u.step,u.range=u.max-u.min,u.numberOfSteps=Math.round(u.range/u.step);var c=m.projectLength(e,u.step,u)<i,h=n?m.rho(u.range):0;if(n&&m.projectLength(e,1,u)>=i)u.step=1;else if(n&&h<u.step&&m.projectLength(e,h,u)>=i)u.step=h;else for(;;){if(c&&m.projectLength(e,u.step,u)<=i)u.step*=2;else{if(c||!(m.projectLength(e,u.step/2,u)>=i))break;if(u.step/=2,n&&u.step%1!=0){u.step*=2;break}}if(1e3<l++)throw new Error("Exceeded maximum number of iterations while optimizing scale step!")}var d=2221e-19;for(u.step=Math.max(u.step,d),a=u.min,o=u.max;a+u.step<=u.low;)a=s(a,u.step);for(;o-u.step>=u.high;)o=s(o,-u.step);u.min=a,u.max=o,u.range=u.max-u.min;var p=[];for(r=u.min;r<=u.max;r=s(r,u.step)){var f=m.roundWithPrecision(r);f!==p[p.length-1]&&p.push(f)}return u.values=p,u},m.polarToCartesian=function(e,t,i,n){var s=(n-90)*Math.PI/180;return{x:e+i*Math.cos(s),y:t+i*Math.sin(s)}},m.createChartRect=function(e,t,i){var n=!(!t.axisX&&!t.axisY),s=n?t.axisY.offset:0,r=n?t.axisX.offset:0,a=e.width()||m.quantity(t.width).value||0,o=e.height()||m.quantity(t.height).value||0,l=m.normalizePadding(t.chartPadding,i);a=Math.max(a,s+l.left+l.right),o=Math.max(o,r+l.top+l.bottom);var u={padding:l,width:function(){return this.x2-this.x1},height:function(){return this.y1-this.y2}};return n?("start"===t.axisX.position?(u.y2=l.top+r,u.y1=Math.max(o-l.bottom,u.y2+1)):(u.y2=l.top,u.y1=Math.max(o-l.bottom-r,u.y2+1)),"start"===t.axisY.position?(u.x1=l.left+s,u.x2=Math.max(a-l.right,u.x1+1)):(u.x1=l.left,u.x2=Math.max(a-l.right-s,u.x1+1))):(u.x1=l.left,u.x2=Math.max(a-l.right,u.x1+1),u.y2=l.top,u.y1=Math.max(o-l.bottom,u.y2+1)),u},m.createGrid=function(e,t,i,n,s,r,a,o){var l={};l[i.units.pos+"1"]=e,l[i.units.pos+"2"]=e,l[i.counterUnits.pos+"1"]=n,l[i.counterUnits.pos+"2"]=n+s;var u=r.elem("line",l,a.join(" "));o.emit("draw",m.extend({type:"grid",axis:i,index:t,group:r,element:u},l))},m.createGridBackground=function(e,t,i,n){var s=e.elem("rect",{x:t.x1,y:t.y2,width:t.width(),height:t.height()},i,!0);n.emit("draw",{type:"gridBackground",group:e,element:s})},m.createLabel=function(e,t,i,n,s,r,a,o,l,u,c){var h,d={};if(d[s.units.pos]=e+a[s.units.pos],d[s.counterUnits.pos]=a[s.counterUnits.pos],d[s.units.len]=t,d[s.counterUnits.len]=Math.max(0,r-10),u){var p=f.createElement("span");p.className=l.join(" "),p.setAttribute("xmlns",m.namespaces.xhtml),p.innerText=n[i],p.style[s.units.len]=Math.round(d[s.units.len])+"px",p.style[s.counterUnits.len]=Math.round(d[s.counterUnits.len])+"px",h=o.foreignObject(p,m.extend({style:"overflow: visible;"},d))}else h=o.elem("text",d,l.join(" ")).text(n[i]);c.emit("draw",m.extend({type:"label",axis:s,index:i,group:o,element:h,text:n[i]},d))},m.getSeriesOption=function(e,t,i){if(e.name&&t.series&&t.series[e.name]){var n=t.series[e.name];return n.hasOwnProperty(i)?n[i]:t[i]}return t[i]},m.optionsProvider=function(e,i,n){function t(e){var t=s;if(s=m.extend({},a),i)for(r=0;r<i.length;r++){u.matchMedia(i[r][0]).matches&&(s=m.extend(s,i[r][1]))}n&&e&&n.emit("optionsChanged",{previousOptions:t,currentOptions:s})}var s,r,a=m.extend({},e),o=[];if(!u.matchMedia)throw"window.matchMedia not found! Make sure you're using a polyfill.";if(i)for(r=0;r<i.length;r++){var l=u.matchMedia(i[r][0]);l.addListener(t),o.push(l)}return t(),{removeMediaQueryListeners:function(){o.forEach(function(e){e.removeListener(t)})},getCurrentOptions:function(){return m.extend({},s)}}},m.splitIntoSegments=function(e,t,i){i=m.extend({},{increasingX:!1,fillHoles:!1},i);for(var n=[],s=!0,r=0;r<e.length;r+=2)void 0===m.getMultiValue(t[r/2].value)?i.fillHoles||(s=!0):(i.increasingX&&2<=r&&e[r]<=e[r-2]&&(s=!0),s&&(n.push({pathCoordinates:[],valueData:[]}),s=!1),n[n.length-1].pathCoordinates.push(e[r],e[r+1]),n[n.length-1].valueData.push(t[r/2]));return n}}(window,document,e),function(m){"use strict";m.Interpolation={},m.Interpolation.none=function(l){return l=m.extend({},{fillHoles:!1},l),function(e,t){for(var i=new m.Svg.Path,n=!0,s=0;s<e.length;s+=2){var r=e[s],a=e[s+1],o=t[s/2];void 0!==m.getMultiValue(o.value)?(n?i.move(r,a,!1,o):i.line(r,a,!1,o),n=!1):l.fillHoles||(n=!0)}return i}},m.Interpolation.simple=function(h){h=m.extend({},{divisor:2,fillHoles:!1},h);var d=1/Math.max(1,h.divisor);return function(e,t){for(var i,n,s,r=new m.Svg.Path,a=0;a<e.length;a+=2){var o=e[a],l=e[a+1],u=(o-i)*d,c=t[a/2];void 0!==c.value?(void 0===s?r.move(o,l,!1,c):r.curve(i+u,n,o-u,l,o,l,!1,c),i=o,n=l,s=c):h.fillHoles||(i=o=s=void 0)}return r}},m.Interpolation.cardinal=function(u){u=m.extend({},{tension:1,fillHoles:!1},u);var c=Math.min(1,Math.max(0,u.tension)),h=1-c;return function t(e,i){var n=m.splitIntoSegments(e,i,{fillHoles:u.fillHoles});if(n.length){if(1<n.length){var s=[];return n.forEach(function(e){s.push(t(e.pathCoordinates,e.valueData))}),m.Svg.Path.join(s)}if(e=n[0].pathCoordinates,i=n[0].valueData,e.length<=4)return m.Interpolation.none()(e,i);for(var r=(new m.Svg.Path).move(e[0],e[1],!1,i[0]),a=0,o=e.length;a<o-2;a+=2){var l=[{x:+e[a-2],y:+e[a-1]},{x:+e[a],y:+e[a+1]},{x:+e[a+2],y:+e[a+3]},{x:+e[a+4],y:+e[a+5]}];o-4===a?l[3]=l[2]:a||(l[0]={x:+e[a],y:+e[a+1]}),r.curve(c*(-l[0].x+6*l[1].x+l[2].x)/6+h*l[2].x,c*(-l[0].y+6*l[1].y+l[2].y)/6+h*l[2].y,c*(l[1].x+6*l[2].x-l[3].x)/6+h*l[2].x,c*(l[1].y+6*l[2].y-l[3].y)/6+h*l[2].y,l[2].x,l[2].y,!1,i[(a+2)/2])}return r}return m.Interpolation.none()([])}},m.Interpolation.monotoneCubic=function(f){return f=m.extend({},{fillHoles:!1},f),function t(e,i){var n=m.splitIntoSegments(e,i,{fillHoles:f.fillHoles,increasingX:!0});if(n.length){if(1<n.length){var s=[];return n.forEach(function(e){s.push(t(e.pathCoordinates,e.valueData))}),m.Svg.Path.join(s)}if(e=n[0].pathCoordinates,i=n[0].valueData,e.length<=4)return m.Interpolation.none()(e,i);var r,a,o=[],l=[],u=e.length/2,c=[],h=[],d=[],p=[];for(r=0;r<u;r++)o[r]=e[2*r],l[r]=e[2*r+1];for(r=0;r<u-1;r++)d[r]=l[r+1]-l[r],p[r]=o[r+1]-o[r],h[r]=d[r]/p[r];for(c[0]=h[0],c[u-1]=h[u-2],r=1;r<u-1;r++)0===h[r]||0===h[r-1]||0<h[r-1]!=0<h[r]?c[r]=0:(c[r]=3*(p[r-1]+p[r])/((2*p[r]+p[r-1])/h[r-1]+(p[r]+2*p[r-1])/h[r]),isFinite(c[r])||(c[r]=0));for(a=(new m.Svg.Path).move(o[0],l[0],!1,i[0]),r=0;r<u-1;r++)a.curve(o[r]+p[r]/3,l[r]+c[r]*p[r]/3,o[r+1]-p[r]/3,l[r+1]-c[r+1]*p[r]/3,o[r+1],l[r+1],!1,i[r+1]);return a}return m.Interpolation.none()([])}},m.Interpolation.step=function(c){return c=m.extend({},{postpone:!0,fillHoles:!1},c),function(e,t){for(var i,n,s,r=new m.Svg.Path,a=0;a<e.length;a+=2){var o=e[a],l=e[a+1],u=t[a/2];void 0!==u.value?(void 0===s?r.move(o,l,!1,u):(c.postpone?r.line(o,n,!1,s):r.line(i,l,!1,u),r.line(o,l,!1,u)),i=o,n=l,s=u):c.fillHoles||(i=n=s=void 0)}return r}}}((window,document,e)),function(){"use strict";e.EventEmitter=function(){var n=[];return{addEventHandler:function(e,t){n[e]=n[e]||[],n[e].push(t)},removeEventHandler:function(e,t){n[e]&&(t?(n[e].splice(n[e].indexOf(t),1),0===n[e].length&&delete n[e]):delete n[e])},emit:function(t,i){n[t]&&n[t].forEach(function(e){e(i)}),n["*"]&&n["*"].forEach(function(e){e(t,i)})}}}}((window,document)),function(r){"use strict";r.Class={extend:function(e,t){var i=t||this.prototype||r.Class,n=Object.create(i);function s(){var e,t=n.constructor||function(){};return e=this===r?Object.create(n):this,t.apply(e,Array.prototype.slice.call(arguments,0)),e}return r.Class.cloneDefinitions(n,e),s.prototype=n,s.super=i,s.extend=this.extend,s},cloneDefinitions:function(){var e=function(e){var t=[];if(e.length)for(var i=0;i<e.length;i++)t.push(e[i]);return t}(arguments),i=e[0];return e.splice(1,e.length-1).forEach(function(t){Object.getOwnPropertyNames(t).forEach(function(e){delete i[e],Object.defineProperty(i,e,Object.getOwnPropertyDescriptor(t,e))})}),i}}}((window,document,e)),function(r,a){"use strict";a.Base=a.Class.extend({constructor:function(e,t,i,n,s){this.container=a.querySelector(e),this.data=t||{},this.data.labels=this.data.labels||[],this.data.series=this.data.series||[],this.defaultOptions=i,this.options=n,this.responsiveOptions=s,this.eventEmitter=a.EventEmitter(),this.supportsForeignObject=a.Svg.isSupported("Extensibility"),this.supportsAnimations=a.Svg.isSupported("AnimationEventsAttribute"),this.resizeListener=function(){this.update()}.bind(this),this.container&&(this.container.__chartist__&&this.container.__chartist__.detach(),this.container.__chartist__=this),this.initializeTimeoutId=setTimeout(function(){r.addEventListener("resize",this.resizeListener),this.optionsProvider=a.optionsProvider(this.options,this.responsiveOptions,this.eventEmitter),this.eventEmitter.addEventHandler("optionsChanged",function(){this.update()}.bind(this)),this.options.plugins&&this.options.plugins.forEach(function(e){e instanceof Array?e[0](this,e[1]):e(this)}.bind(this)),this.eventEmitter.emit("data",{type:"initial",data:this.data}),this.createChart(this.optionsProvider.getCurrentOptions()),this.initializeTimeoutId=void 0}.bind(this),0)},optionsProvider:void 0,container:void 0,svg:void 0,eventEmitter:void 0,createChart:function(){throw new Error("Base chart type can't be instantiated!")},update:function(e,t,i){return e&&(this.data=e||{},this.data.labels=this.data.labels||[],this.data.series=this.data.series||[],this.eventEmitter.emit("data",{type:"update",data:this.data})),t&&(this.options=a.extend({},i?this.options:this.defaultOptions,t),this.initializeTimeoutId||(this.optionsProvider.removeMediaQueryListeners(),this.optionsProvider=a.optionsProvider(this.options,this.responsiveOptions,this.eventEmitter))),this.initializeTimeoutId||this.createChart(this.optionsProvider.getCurrentOptions()),this},detach:function(){return this.initializeTimeoutId?r.clearTimeout(this.initializeTimeoutId):(r.removeEventListener("resize",this.resizeListener),this.optionsProvider.removeMediaQueryListeners()),this},on:function(e,t){return this.eventEmitter.addEventHandler(e,t),this},off:function(e,t){return this.eventEmitter.removeEventHandler(e,t),this},version:a.version,supportsForeignObject:!1})}(window,(document,e)),function(a,l){"use strict";l.Svg=l.Class.extend({constructor:function(e,t,i,n,s){e instanceof Element?this._node=e:(this._node=a.createElementNS(l.namespaces.svg,e),"svg"===e&&this.attr({"xmlns:ct":l.namespaces.ct})),t&&this.attr(t),i&&this.addClass(i),n&&(s&&n._node.firstChild?n._node.insertBefore(this._node,n._node.firstChild):n._node.appendChild(this._node))},attr:function(i,e){return"string"==typeof i?e?this._node.getAttributeNS(e,i):this._node.getAttribute(i):(Object.keys(i).forEach(function(e){if(void 0!==i[e])if(-1!==e.indexOf(":")){var t=e.split(":");this._node.setAttributeNS(l.namespaces[t[0]],e,i[e])}else this._node.setAttribute(e,i[e])}.bind(this)),this)},elem:function(e,t,i,n){return new l.Svg(e,t,i,this,n)},parent:function(){return this._node.parentNode instanceof SVGElement?new l.Svg(this._node.parentNode):null},root:function(){for(var e=this._node;"svg"!==e.nodeName;)e=e.parentNode;return new l.Svg(e)},querySelector:function(e){var t=this._node.querySelector(e);return t?new l.Svg(t):null},querySelectorAll:function(e){var t=this._node.querySelectorAll(e);return t.length?new l.Svg.List(t):null},getNode:function(){return this._node},foreignObject:function(e,t,i,n){if("string"==typeof e){var s=a.createElement("div");s.innerHTML=e,e=s.firstChild}e.setAttribute("xmlns",l.namespaces.xmlns);var r=this.elem("foreignObject",t,i,n);return r._node.appendChild(e),r},text:function(e){return this._node.appendChild(a.createTextNode(e)),this},empty:function(){for(;this._node.firstChild;)this._node.removeChild(this._node.firstChild);return this},remove:function(){return this._node.parentNode.removeChild(this._node),this.parent()},replace:function(e){return this._node.parentNode.replaceChild(e._node,this._node),e},append:function(e,t){return t&&this._node.firstChild?this._node.insertBefore(e._node,this._node.firstChild):this._node.appendChild(e._node),this},classes:function(){return this._node.getAttribute("class")?this._node.getAttribute("class").trim().split(/\s+/):[]},addClass:function(e){return this._node.setAttribute("class",this.classes(this._node).concat(e.trim().split(/\s+/)).filter(function(e,t,i){return i.indexOf(e)===t}).join(" ")),this},removeClass:function(e){var t=e.trim().split(/\s+/);return this._node.setAttribute("class",this.classes(this._node).filter(function(e){return-1===t.indexOf(e)}).join(" ")),this},removeAllClasses:function(){return this._node.setAttribute("class",""),this},height:function(){return this._node.getBoundingClientRect().height},width:function(){return this._node.getBoundingClientRect().width},animate:function(e,i,o){return void 0===i&&(i=!0),Object.keys(e).forEach(function(a){function t(t,e){var i,n,s,r={};t.easing&&(s=t.easing instanceof Array?t.easing:l.Svg.Easing[t.easing],delete t.easing),t.begin=l.ensureUnit(t.begin,"ms"),t.dur=l.ensureUnit(t.dur,"ms"),s&&(t.calcMode="spline",t.keySplines=s.join(" "),t.keyTimes="0;1"),e&&(t.fill="freeze",r[a]=t.from,this.attr(r),n=l.quantity(t.begin||0).value,t.begin="indefinite"),i=this.elem("animate",l.extend({attributeName:a},t)),e&&setTimeout(function(){try{i._node.beginElement()}catch(e){r[a]=t.to,this.attr(r),i.remove()}}.bind(this),n),o&&i._node.addEventListener("beginEvent",function(){o.emit("animationBegin",{element:this,animate:i._node,params:t})}.bind(this)),i._node.addEventListener("endEvent",function(){o&&o.emit("animationEnd",{element:this,animate:i._node,params:t}),e&&(r[a]=t.to,this.attr(r),i.remove())}.bind(this))}e[a]instanceof Array?e[a].forEach(function(e){t.bind(this)(e,!1)}.bind(this)):t.bind(this)(e[a],i)}.bind(this)),this}}),l.Svg.isSupported=function(e){return a.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#"+e,"1.1")};l.Svg.Easing={easeInSine:[.47,0,.745,.715],easeOutSine:[.39,.575,.565,1],easeInOutSine:[.445,.05,.55,.95],easeInQuad:[.55,.085,.68,.53],easeOutQuad:[.25,.46,.45,.94],easeInOutQuad:[.455,.03,.515,.955],easeInCubic:[.55,.055,.675,.19],easeOutCubic:[.215,.61,.355,1],easeInOutCubic:[.645,.045,.355,1],easeInQuart:[.895,.03,.685,.22],easeOutQuart:[.165,.84,.44,1],easeInOutQuart:[.77,0,.175,1],easeInQuint:[.755,.05,.855,.06],easeOutQuint:[.23,1,.32,1],easeInOutQuint:[.86,0,.07,1],easeInExpo:[.95,.05,.795,.035],easeOutExpo:[.19,1,.22,1],easeInOutExpo:[1,0,0,1],easeInCirc:[.6,.04,.98,.335],easeOutCirc:[.075,.82,.165,1],easeInOutCirc:[.785,.135,.15,.86],easeInBack:[.6,-.28,.735,.045],easeOutBack:[.175,.885,.32,1.275],easeInOutBack:[.68,-.55,.265,1.55]},l.Svg.List=l.Class.extend({constructor:function(e){var n=this;this.svgElements=[];for(var t=0;t<e.length;t++)this.svgElements.push(new l.Svg(e[t]));Object.keys(l.Svg.prototype).filter(function(e){return-1===["constructor","parent","querySelector","querySelectorAll","replace","append","classes","height","width"].indexOf(e)}).forEach(function(i){n[i]=function(){var t=Array.prototype.slice.call(arguments,0);return n.svgElements.forEach(function(e){l.Svg.prototype[i].apply(e,t)}),n}})}})}((window,document),e),function(o){"use strict";function u(e,t,i,n,s,r){var a=o.extend({command:s?e.toLowerCase():e.toUpperCase()},t,r?{data:r}:{});i.splice(n,0,a)}function e(s,r){s.forEach(function(i,n){a[i.command.toLowerCase()].forEach(function(e,t){r(i,e,n,t,s)})})}var a={m:["x","y"],l:["x","y"],c:["x1","y1","x2","y2","x","y"],a:["rx","ry","xAr","lAf","sf","x","y"]},i={accuracy:3};o.Svg.Path=o.Class.extend({constructor:function(e,t){this.pathElements=[],this.pos=0,this.close=e,this.options=o.extend({},i,t)},position:function(e){return void 0!==e?(this.pos=Math.max(0,Math.min(this.pathElements.length,e)),this):this.pos},remove:function(e){return this.pathElements.splice(this.pos,e),this},move:function(e,t,i,n){return u("M",{x:+e,y:+t},this.pathElements,this.pos++,i,n),this},line:function(e,t,i,n){return u("L",{x:+e,y:+t},this.pathElements,this.pos++,i,n),this},curve:function(e,t,i,n,s,r,a,o){return u("C",{x1:+e,y1:+t,x2:+i,y2:+n,x:+s,y:+r},this.pathElements,this.pos++,a,o),this},arc:function(e,t,i,n,s,r,a,o,l){return u("A",{rx:+e,ry:+t,xAr:+i,lAf:+n,sf:+s,x:+r,y:+a},this.pathElements,this.pos++,o,l),this},scale:function(i,n){return e(this.pathElements,function(e,t){e[t]*="x"===t[0]?i:n}),this},translate:function(i,n){return e(this.pathElements,function(e,t){e[t]+="x"===t[0]?i:n}),this},transform:function(a){return e(this.pathElements,function(e,t,i,n,s){var r=a(e,t,i,n,s);!r&&0!==r||(e[t]=r)}),this},parse:function(e){var t=e.replace(/([A-Za-z])([0-9])/g,"$1 $2").replace(/([0-9])([A-Za-z])/g,"$1 $2").split(/[\s,]+/).reduce(function(e,t){return t.match(/[A-Za-z]/)&&e.push([]),e[e.length-1].push(t),e},[]);"Z"===t[t.length-1][0].toUpperCase()&&t.pop();var i=t.map(function(n){var e=n.shift(),t=a[e.toLowerCase()];return o.extend({command:e},t.reduce(function(e,t,i){return e[t]=+n[i],e},{}))}),n=[this.pos,0];return Array.prototype.push.apply(n,i),Array.prototype.splice.apply(this.pathElements,n),this.pos+=i.length,this},stringify:function(){var n=Math.pow(10,this.options.accuracy);return this.pathElements.reduce(function(e,t){var i=a[t.command.toLowerCase()].map(function(e){return this.options.accuracy?Math.round(t[e]*n)/n:t[e]}.bind(this));return e+t.command+i.join(",")}.bind(this),"")+(this.close?"Z":"")},clone:function(e){var t=new o.Svg.Path(e||this.close);return t.pos=this.pos,t.pathElements=this.pathElements.slice().map(function(e){return o.extend({},e)}),t.options=o.extend({},this.options),t},splitByCommand:function(t){var i=[new o.Svg.Path];return this.pathElements.forEach(function(e){e.command===t.toUpperCase()&&0!==i[i.length-1].pathElements.length&&i.push(new o.Svg.Path),i[i.length-1].pathElements.push(e)}),i}}),o.Svg.Path.elementDescriptions=a,o.Svg.Path.join=function(e,t,i){for(var n=new o.Svg.Path(t,i),s=0;s<e.length;s++)for(var r=e[s],a=0;a<r.pathElements.length;a++)n.pathElements.push(r.pathElements[a]);return n}}((window,document,e)),function(d){"use strict";var s={x:{pos:"x",len:"width",dir:"horizontal",rectStart:"x1",rectEnd:"x2",rectOffset:"y2"},y:{pos:"y",len:"height",dir:"vertical",rectStart:"y2",rectEnd:"y1",rectOffset:"x1"}};d.Axis=d.Class.extend({constructor:function(e,t,i,n){this.units=e,this.counterUnits=e===s.x?s.y:s.x,this.chartRect=t,this.axisLength=t[e.rectEnd]-t[e.rectStart],this.gridOffset=t[e.rectOffset],this.ticks=i,this.options=n},createGridAndLabels:function(s,r,a,o,l){var u=o["axis"+this.units.pos.toUpperCase()],c=this.ticks.map(this.projectValue.bind(this)),h=this.ticks.map(u.labelInterpolationFnc);c.forEach(function(e,t){var i,n={x:0,y:0};i=c[t+1]?c[t+1]-e:Math.max(this.axisLength-e,30),d.isFalseyButZero(h[t])&&""!==h[t]||("x"===this.units.pos?(e=this.chartRect.x1+e,n.x=o.axisX.labelOffset.x,"start"===o.axisX.position?n.y=this.chartRect.padding.top+o.axisX.labelOffset.y+(a?5:20):n.y=this.chartRect.y1+o.axisX.labelOffset.y+(a?5:20)):(e=this.chartRect.y1-e,n.y=o.axisY.labelOffset.y-(a?i:0),"start"===o.axisY.position?n.x=a?this.chartRect.padding.left+o.axisY.labelOffset.x:this.chartRect.x1-10:n.x=this.chartRect.x2+o.axisY.labelOffset.x+10),u.showGrid&&d.createGrid(e,t,this,this.gridOffset,this.chartRect[this.counterUnits.len](),s,[o.classNames.grid,o.classNames[this.units.dir]],l),u.showLabel&&d.createLabel(e,i,t,h,this,u.offset,n,r,[o.classNames.label,o.classNames[this.units.dir],"start"===u.position?o.classNames[u.position]:o.classNames.end],a,l))}.bind(this))},projectValue:function(e,t,i){throw new Error("Base axis can't be instantiated!")}}),d.Axis.units=s}((window,document,e)),function(r){"use strict";r.AutoScaleAxis=r.Axis.extend({constructor:function(e,t,i,n){var s=n.highLow||r.getHighLow(t,n,e.pos);this.bounds=r.getBounds(i[e.rectEnd]-i[e.rectStart],s,n.scaleMinSpace||20,n.onlyInteger),this.range={min:this.bounds.min,max:this.bounds.max},r.AutoScaleAxis.super.constructor.call(this,e,i,this.bounds.values,n)},projectValue:function(e){return this.axisLength*(r.getMultiValue(e,this.units.pos)-this.bounds.min)/this.bounds.range}})}((window,document,e)),function(r){"use strict";r.FixedScaleAxis=r.Axis.extend({constructor:function(e,t,i,n){var s=n.highLow||r.getHighLow(t,n,e.pos);this.divisor=n.divisor||1,this.ticks=n.ticks||r.times(this.divisor).map(function(e,t){return s.low+(s.high-s.low)/this.divisor*t}.bind(this)),this.ticks.sort(function(e,t){return e-t}),this.range={min:s.low,max:s.high},r.FixedScaleAxis.super.constructor.call(this,e,i,this.ticks,n),this.stepLength=this.axisLength/this.divisor},projectValue:function(e){return this.axisLength*(r.getMultiValue(e,this.units.pos)-this.range.min)/(this.range.max-this.range.min)}})}((window,document,e)),function(r){"use strict";r.StepAxis=r.Axis.extend({constructor:function(e,t,i,n){r.StepAxis.super.constructor.call(this,e,i,n.ticks,n);var s=Math.max(1,n.ticks.length-(n.stretch?1:0));this.stepLength=this.axisLength/s},projectValue:function(e,t){return this.stepLength*t}})}((window,document,e)),function(g){"use strict";var s={axisX:{offset:30,position:"end",labelOffset:{x:0,y:0},showLabel:!0,showGrid:!0,labelInterpolationFnc:g.noop,type:void 0},axisY:{offset:40,position:"start",labelOffset:{x:0,y:0},showLabel:!0,showGrid:!0,labelInterpolationFnc:g.noop,type:void 0,scaleMinSpace:20,onlyInteger:!1},width:void 0,height:void 0,showLine:!0,showPoint:!0,showArea:!1,areaBase:0,lineSmooth:!0,showGridBackground:!1,low:void 0,high:void 0,chartPadding:{top:15,right:15,bottom:5,left:10},fullWidth:!1,reverseData:!1,classNames:{chart:"ct-chart-line",label:"ct-label",labelGroup:"ct-labels",series:"ct-series",line:"ct-line",point:"ct-point",area:"ct-area",grid:"ct-grid",gridGroup:"ct-grids",gridBackground:"ct-grid-background",vertical:"ct-vertical",horizontal:"ct-horizontal",start:"ct-start",end:"ct-end"}};g.Line=g.Base.extend({constructor:function(e,t,i,n){g.Line.super.constructor.call(this,e,t,s,g.extend({},s,i),n)},createChart:function(c){var h=g.normalizeData(this.data,c.reverseData,!0);this.svg=g.createSvg(this.container,c.width,c.height,c.classNames.chart);var d,p,e=this.svg.elem("g").addClass(c.classNames.gridGroup),f=this.svg.elem("g"),t=this.svg.elem("g").addClass(c.classNames.labelGroup),m=g.createChartRect(this.svg,c,s.padding);d=void 0===c.axisX.type?new g.StepAxis(g.Axis.units.x,h.normalized.series,m,g.extend({},c.axisX,{ticks:h.normalized.labels,stretch:c.fullWidth})):c.axisX.type.call(g,g.Axis.units.x,h.normalized.series,m,c.axisX),p=void 0===c.axisY.type?new g.AutoScaleAxis(g.Axis.units.y,h.normalized.series,m,g.extend({},c.axisY,{high:g.isNumeric(c.high)?c.high:c.axisY.high,low:g.isNumeric(c.low)?c.low:c.axisY.low})):c.axisY.type.call(g,g.Axis.units.y,h.normalized.series,m,c.axisY),d.createGridAndLabels(e,t,this.supportsForeignObject,c,this.eventEmitter),p.createGridAndLabels(e,t,this.supportsForeignObject,c,this.eventEmitter),c.showGridBackground&&g.createGridBackground(e,m,c.classNames.gridBackground,this.eventEmitter),h.raw.series.forEach(function(n,s){var i=f.elem("g");i.attr({"ct:series-name":n.name,"ct:meta":g.serialize(n.meta)}),i.addClass([c.classNames.series,n.className||c.classNames.series+"-"+g.alphaNumerate(s)].join(" "));var r=[],a=[];h.normalized.series[s].forEach(function(e,t){var i={x:m.x1+d.projectValue(e,t,h.normalized.series[s]),y:m.y1-p.projectValue(e,t,h.normalized.series[s])};r.push(i.x,i.y),a.push({value:e,valueIndex:t,meta:g.getMetaData(n,t)})}.bind(this));var e={lineSmooth:g.getSeriesOption(n,c,"lineSmooth"),showPoint:g.getSeriesOption(n,c,"showPoint"),showLine:g.getSeriesOption(n,c,"showLine"),showArea:g.getSeriesOption(n,c,"showArea"),areaBase:g.getSeriesOption(n,c,"areaBase")},t=("function"==typeof e.lineSmooth?e.lineSmooth:e.lineSmooth?g.Interpolation.monotoneCubic():g.Interpolation.none())(r,a);if(e.showPoint&&t.pathElements.forEach(function(e){var t=i.elem("line",{x1:e.x,y1:e.y,x2:e.x+.01,y2:e.y},c.classNames.point).attr({"ct:value":[e.data.value.x,e.data.value.y].filter(g.isNumeric).join(","),"ct:meta":g.serialize(e.data.meta)});this.eventEmitter.emit("draw",{type:"point",value:e.data.value,index:e.data.valueIndex,meta:e.data.meta,series:n,seriesIndex:s,axisX:d,axisY:p,group:i,element:t,x:e.x,y:e.y})}.bind(this)),e.showLine){var o=i.elem("path",{d:t.stringify()},c.classNames.line,!0);this.eventEmitter.emit("draw",{type:"line",values:h.normalized.series[s],path:t.clone(),chartRect:m,index:s,series:n,seriesIndex:s,seriesMeta:n.meta,axisX:d,axisY:p,group:i,element:o})}if(e.showArea&&p.range){var l=Math.max(Math.min(e.areaBase,p.range.max),p.range.min),u=m.y1-p.projectValue(l);t.splitByCommand ("M").filter(function(e){return 1<e.pathElements.length}).map(function(e){var t=e.pathElements[0],i=e.pathElements[e.pathElements.length-1];return e.clone(!0).position(0).remove(1).move(t.x,u).line(t.x,t.y).position(e.pathElements.length+1).line(i.x,u)}).forEach(function(e){var t=i.elem("path",{d:e.stringify()},c.classNames.area,!0);this.eventEmitter.emit("draw",{type:"area",values:h.normalized.series[s],path:e.clone(),series:n,seriesIndex:s,axisX:d,axisY:p,chartRect:m,index:s,group:i,element:t})}.bind(this))}}.bind(this)),this.eventEmitter.emit("created",{bounds:p.bounds,chartRect:m,axisX:d,axisY:p,svg:this.svg,options:c})}})}((window,document,e)),function(E){"use strict";var a={axisX:{offset:30,position:"end",labelOffset:{x:0,y:0},showLabel:!0,showGrid:!0,labelInterpolationFnc:E.noop,scaleMinSpace:30,onlyInteger:!1},axisY:{offset:40,position:"start",labelOffset:{x:0,y:0},showLabel:!0,showGrid:!0,labelInterpolationFnc:E.noop,scaleMinSpace:20,onlyInteger:!1},width:void 0,height:void 0,high:void 0,low:void 0,referenceValue:0,chartPadding:{top:15,right:15,bottom:5,left:10},seriesBarDistance:15,stackBars:!1,stackMode:"accumulate",horizontalBars:!1,distributeSeries:!1,reverseData:!1,showGridBackground:!1,classNames:{chart:"ct-chart-bar",horizontalBars:"ct-horizontal-bars",label:"ct-label",labelGroup:"ct-labels",series:"ct-series",bar:"ct-bar",grid:"ct-grid",gridGroup:"ct-grids",gridBackground:"ct-grid-background",vertical:"ct-vertical",horizontal:"ct-horizontal",start:"ct-start",end:"ct-end"}};E.Bar=E.Base.extend({constructor:function(e,t,i,n){E.Bar.super.constructor.call(this,e,t,a,E.extend({},a,i),n)},createChart:function(p){var f,e;p.distributeSeries?(f=E.normalizeData(this.data,p.reverseData,p.horizontalBars?"x":"y")).normalized.series=f.normalized.series.map(function(e){return[e]}):f=E.normalizeData(this.data,p.reverseData,p.horizontalBars?"x":"y"),this.svg=E.createSvg(this.container,p.width,p.height,p.classNames.chart+(p.horizontalBars?" "+p.classNames.horizontalBars:""));var t=this.svg.elem("g").addClass(p.classNames.gridGroup),i=this.svg.elem("g"),n=this.svg.elem("g").addClass(p.classNames.labelGroup);if(p.stackBars&&0!==f.normalized.series.length){var s=E.serialMap(f.normalized.series,function(){return Array.prototype.slice.call(arguments).map(function(e){return e}).reduce(function(e,t){return{x:e.x+(t&&t.x)||0,y:e.y+(t&&t.y)||0}},{x:0,y:0})});e=E.getHighLow([s],p,p.horizontalBars?"x":"y")}else e=E.getHighLow(f.normalized.series,p,p.horizontalBars?"x":"y");e.high=+p.high||(0===p.high?0:e.high),e.low=+p.low||(0===p.low?0:e.low);var m,r,g,v,x,y=E.createChartRect(this.svg,p,a.padding);r=p.distributeSeries&&p.stackBars?f.normalized.labels.slice(0,1):f.normalized.labels,p.horizontalBars?(m=v=void 0===p.axisX.type?new E.AutoScaleAxis(E.Axis.units.x,f.normalized.series,y,E.extend({},p.axisX,{highLow:e,referenceValue:0})):p.axisX.type.call(E,E.Axis.units.x,f.normalized.series,y,E.extend({},p.axisX,{highLow:e,referenceValue:0})),g=x=void 0===p.axisY.type?new E.StepAxis(E.Axis.units.y,f.normalized.series,y,{ticks:r}):p.axisY.type.call(E,E.Axis.units.y,f.normalized.series,y,p.axisY)):(g=v=void 0===p.axisX.type?new E.StepAxis(E.Axis.units.x,f.normalized.series,y,{ticks:r}):p.axisX.type.call(E,E.Axis.units.x,f.normalized.series,y,p.axisX),m=x=void 0===p.axisY.type?new E.AutoScaleAxis(E.Axis.units.y,f.normalized.series,y,E.extend({},p.axisY,{highLow:e,referenceValue:0})):p.axisY.type.call(E,E.Axis.units.y,f.normalized.series,y,E.extend({},p.axisY,{highLow:e,referenceValue:0})));var b=p.horizontalBars?y.x1+m.projectValue(0):y.y1-m.projectValue(0),w=[];g.createGridAndLabels(t,n,this.supportsForeignObject,p,this.eventEmitter),m.createGridAndLabels(t,n,this.supportsForeignObject,p,this.eventEmitter),p.showGridBackground&&E.createGridBackground(t,y,p.classNames.gridBackground,this.eventEmitter),f.raw.series.forEach(function(l,u){var c,h,d=u-(f.raw.series.length-1)/2;c=p.distributeSeries&&!p.stackBars?g.axisLength/f.normalized.series.length/2:p.distributeSeries&&p.stackBars?g.axisLength/2:g.axisLength/f.normalized.series[u].length/2,(h=i.elem("g")).attr({"ct:series-name":l.name,"ct:meta":E.serialize(l.meta)}),h.addClass([p.classNames.series,l.className||p.classNames.series+"-"+E.alphaNumerate(u)].join(" ")),f.normalized.series[u].forEach(function(e,t){var i,n,s,r;if(r=p.distributeSeries&&!p.stackBars?u:p.distributeSeries&&p.stackBars?0:t,i=p.horizontalBars?{x:y.x1+m.projectValue(e&&e.x?e.x:0,t,f.normalized.series[u]),y:y.y1-g.projectValue(e&&e.y?e.y:0,r,f.normalized.series[u])}:{x:y.x1+g.projectValue(e&&e.x?e.x:0,r,f.normalized.series[u]),y:y.y1-m.projectValue(e&&e.y?e.y:0,t,f.normalized.series[u])},g instanceof E.StepAxis&&(g.options.stretch||(i[g.units.pos]+=c*(p.horizontalBars?-1:1)),i[g.units.pos]+=p.stackBars||p.distributeSeries?0:d*p.seriesBarDistance*(p.horizontalBars?-1:1)),s=w[t]||b,w[t]=s-(b-i[g.counterUnits.pos]),void 0!==e){var a={};a[g.units.pos+"1"]=i[g.units.pos],a[g.units.pos+"2"]=i[g.units.pos],!p.stackBars||"accumulate"!==p.stackMode&&p.stackMode?(a[g.counterUnits.pos+"1"]=b,a[g.counterUnits.pos+"2"]=i[g.counterUnits.pos]):(a[g.counterUnits.pos+"1"]=s,a[g.counterUnits.pos+"2"]=w[t]),a.x1=Math.min(Math.max(a.x1,y.x1),y.x2),a.x2=Math.min(Math.max(a.x2,y.x1),y.x2),a.y1=Math.min(Math.max(a.y1,y.y2),y.y1),a.y2=Math.min(Math.max(a.y2,y.y2),y.y1);var o=E.getMetaData(l,t);n=h.elem("line",a,p.classNames.bar).attr({"ct:value":[e.x,e.y].filter(E.isNumeric).join(","),"ct:meta":E.serialize(o)}),this.eventEmitter.emit("draw",E.extend({type:"bar",value:e,index:t,meta:o,series:l,seriesIndex:u,axisX:v,axisY:x,chartRect:y,group:h,element:n},a))}}.bind(this))}.bind(this)),this.eventEmitter.emit("created",{bounds:m.bounds,chartRect:y,axisX:v,axisY:x,svg:this.svg,options:p})}})}((window,document,e)),function(O){"use strict";function C(e,t,i){var n=t.x>e.x;return n&&"explode"===i||!n&&"implode"===i?"start":n&&"implode"===i||!n&&"explode"===i?"end":"middle"}var s={width:void 0,height:void 0,chartPadding:5,classNames:{chartPie:"ct-chart-pie",chartDonut:"ct-chart-donut",series:"ct-series",slicePie:"ct-slice-pie",sliceDonut:"ct-slice-donut",sliceDonutSolid:"ct-slice-donut-solid",label:"ct-label"},startAngle:0,total:void 0,donut:!1,donutSolid:!1,donutWidth:60,showLabel:!0,labelOffset:0,labelPosition:"inside",labelInterpolationFnc:O.noop,labelDirection:"neutral",reverseData:!1,ignoreEmptyValues:!1};O.Pie=O.Base.extend({constructor:function(e,t,i,n){O.Pie.super.constructor.call(this,e,t,s,O.extend({},s,i),n)},createChart:function(g){var v,e,x,y,b,w=O.normalizeData(this.data),E=[],S=g.startAngle;this.svg=O.createSvg(this.container,g.width,g.height,g.donut?g.classNames.chartDonut:g.classNames.chartPie),e=O.createChartRect(this.svg,g,s.padding),x=Math.min(e.width()/2,e.height()/2),b=g.total||w.normalized.series.reduce(function(e,t){return e+t},0);var A=O.quantity(g.donutWidth);"%"===A.unit&&(A.value*=x/100),x-=g.donut&&!g.donutSolid?A.value/2:0,y="outside"===g.labelPosition||g.donut&&!g.donutSolid?x:"center"===g.labelPosition?0:g.donutSolid?x-A.value/2:x/2,y+=g.labelOffset;var z={x:e.x1+e.width()/2,y:e.y2+e.height()/2},M=1===w.raw.series.filter(function(e){return e.hasOwnProperty("value")?0!==e.value:0!==e}).length;w.raw.series.forEach(function(e,t){E[t]=this.svg.elem("g",null,null)}.bind(this)),g.showLabel&&(v=this.svg.elem("g",null,null)),w.raw.series.forEach(function(e,t){if(0!==w.normalized.series[t]||!g.ignoreEmptyValues){E[t].attr({"ct:series-name":e.name}),E[t].addClass([g.classNames.series,e.className||g.classNames.series+"-"+O.alphaNumerate(t)].join(" "));var i=0<b?S+w.normalized.series[t]/b*360:0,n=Math.max(0,S-(0===t||M?0:.2));359.99<=i-n&&(i=n+359.99);var s,r,a,o=O.polarToCartesian(z.x,z.y,x,n),l=O.polarToCartesian(z.x,z.y,x,i),u=new O.Svg.Path(!g.donut||g.donutSolid).move(l.x,l.y).arc(x,x,0,180<i-S,0,o.x,o.y);g.donut?g.donutSolid&&(a=x-A.value,s=O.polarToCartesian(z.x,z.y,a,S-(0===t||M?0:.2)),r=O.polarToCartesian(z.x,z.y,a,i),u.line(s.x,s.y),u.arc(a,a,0,180<i-S,1,r.x,r.y)):u.line(z.x,z.y);var c=g.classNames.slicePie;g.donut&&(c=g.classNames.sliceDonut,g.donutSolid&&(c=g.classNames.sliceDonutSolid));var h=E[t].elem("path",{d:u.stringify()},c);if(h.attr({"ct:value":w.normalized.series[t],"ct:meta":O.serialize(e.meta)}),g.donut&&!g.donutSolid&&(h._node.style.strokeWidth=A.value+"px"),this.eventEmitter.emit("draw",{type:"slice",value:w.normalized.series[t],totalDataSum:b,index:t,meta:e.meta,series:e,group:E[t],element:h,path:u.clone(),center:z,radius:x,startAngle:S,endAngle:i}),g.showLabel){var d,p;d=1===w.raw.series.length?{x:z.x,y:z.y}:O.polarToCartesian(z.x,z.y,y,S+(i-S)/2),p=w.normalized.labels&&!O.isFalseyButZero(w.normalized.labels[t])?w.normalized.labels[t]:w.normalized.series[t];var f=g.labelInterpolationFnc(p,t);if(f||0===f){var m=v.elem("text",{dx:d.x,dy:d.y,"text-anchor":C(z,d,g.labelDirection)},g.classNames.label).text(""+f);this.eventEmitter.emit("draw",{type:"label",index:t,group:v,element:m,text:""+f,x:d.x,y:d.y})}}S=i}}.bind(this)),this.eventEmitter.emit("created",{chartRect:e,svg:this.svg,options:g})},determineAnchorPosition:C})}((window,document,e)),e});
!function(C){C.fn.marquee=function(j){return this.each(function(){function a(e,t,a){for(var r=["webkit","moz","MS","o",""],n=0;n<r.length;n++)r[n]||(t=t.toLowerCase()),e.addEventListener(r[n]+t,a,!1)}var r,n,i=C.extend({},C.fn.marquee.defaults,j),s=C(this),o=3,e="animation-play-state",u=!1,t={pause:function(){u&&i.allowCss3Support?r.css(e,"paused"):C.fn.pause&&r.pause(),s.data("runningStatus","paused"),s.trigger("paused")},resume:function(){u&&i.allowCss3Support?r.css(e,"running"):C.fn.resume&&r.resume(),s.data("runningStatus","resumed"),s.trigger("resumed")},toggle:function(){t["resumed"==s.data("runningStatus")?"pause":"resume"]()},destroy:function(){clearTimeout(s.timer),s.find("*").addBack().unbind(),s.html(s.find(".js-marquee:first").html())}};if("string"==typeof j)C.isFunction(t[j])&&(r=r||s.find(".js-marquee-wrapper"),!0===s.data("css3AnimationIsSupported")&&(u=!0),t[j]());else{var d;C.each(i,function(e,t){if(void 0!==(d=s.attr("data-"+e))){switch(d){case"true":d=!0;break;case"false":d=!1}i[e]=d}}),i.speed&&(i.duration=parseInt(s.width(),10)/i.speed*1e3);var p="up"==i.direction||"down"==i.direction;i.gap=i.duplicated?parseInt(i.gap):0,s.wrapInner('<div class="js-marquee"></div>');var l=s.find(".js-marquee").css({"margin-right":i.gap,float:"left"});if(i.duplicated&&l.clone(!0).appendTo(s),s.wrapInner('<div style="width:100000px" class="js-marquee-wrapper"></div>'),r=s.find(".js-marquee-wrapper"),p){var f=s.height();r.removeAttr("style"),s.height(f),s.find(".js-marquee").css({float:"none","margin-bottom":i.gap,"margin-right":0}),i.duplicated&&s.find(".js-marquee:last").css({"margin-bottom":0});var c=s.find(".js-marquee:first").height()+i.gap;i.startVisible&&!i.duplicated?(i._completeDuration=(parseInt(c,10)+parseInt(f,10))/parseInt(f,10)*i.duration,i.duration*=parseInt(c,10)/parseInt(f,10)):i.duration*=(parseInt(c,10)+parseInt(f,10))/parseInt(f,10)}else{var m=s.find(".js-marquee:first").width()+i.gap,g=s.width();i.startVisible&&!i.duplicated?(i._completeDuration=(parseInt(m,10)+parseInt(g,10))/parseInt(g,10)*i.duration,i.duration*=parseInt(m,10)/parseInt(g,10)):i.duration*=(parseInt(m,10)+parseInt(g,10))/parseInt(g,10)}if(i.duplicated&&(i.duration/=2),i.allowCss3Support){l=document.body||document.createElement("div");var h="marqueeAnimation-"+Math.floor(1e7*Math.random()),v=["Webkit","Moz","O","ms","Khtml"],y="animation",I="",b="";if(l.style.animation&&(b="@keyframes "+h+" ",u=!0),!1===u)for(var x=0;x<v.length;x++)if(void 0!==l.style[v[x]+"AnimationName"]){l="-"+v[x].toLowerCase()+"-",y=l+y,e=l+e,b="@"+l+"keyframes "+h+" ",u=!0;break}u&&(I=h+" "+i.duration/1e3+"s "+i.delayBeforeStart/1e3+"s infinite "+i.css3easing,s.data("css3AnimationIsSupported",!0))}function w(){r.css("transform","translateY("+("up"==i.direction?f+"px":"-"+c+"px")+")")}function S(){r.css("transform","translateX("+("left"==i.direction?g+"px":"-"+m+"px")+")")}i.duplicated?(p?i.startVisible?r.css("transform","translateY(0)"):r.css("transform","translateY("+("up"==i.direction?f+"px":"-"+(2*c-i.gap)+"px")+")"):i.startVisible?r.css("transform","translateX(0)"):r.css("transform","translateX("+("left"==i.direction?g+"px":"-"+(2*m-i.gap)+"px")+")"),i.startVisible||(o=1)):i.startVisible?o=2:(p?w:S)();var q=function(){if(i.duplicated&&(1===o?(i._originalDuration=i.duration,i.duration=p?"up"==i.direction?i.duration+f/(c/i.duration):2*i.duration:"left"==i.direction?i.duration+g/(m/i.duration):2*i.duration,I=I&&h+" "+i.duration/1e3+"s "+i.delayBeforeStart/1e3+"s "+i.css3easing,o++):2===o&&(i.duration=i._originalDuration,I&&(h+="0",b=C.trim(b)+"0 ",I=h+" "+i.duration/1e3+"s 0s infinite "+i.css3easing),o++)),p?i.duplicated?(2<o&&r.css("transform","translateY("+("up"==i.direction?0:"-"+c+"px")+")"),n={transform:"translateY("+("up"==i.direction?"-"+c+"px":0)+")"}):i.startVisible?2===o?(I=I&&h+" "+i.duration/1e3+"s "+i.delayBeforeStart/1e3+"s "+i.css3easing,n={transform:"translateY("+("up"==i.direction?"-"+c+"px":f+"px")+")"},o++):3===o&&(i.duration=i._completeDuration,I&&(h+="0",b=C.trim(b)+"0 ",I=h+" "+i.duration/1e3+"s 0s infinite "+i.css3easing),w()):(w(),n={transform:"translateY("+("up"==i.direction?"-"+r.height()+"px":f+"px")+")"}):i.duplicated?(2<o&&r.css("transform","translateX("+("left"==i.direction?0:"-"+m+"px")+")"),n={transform:"translateX("+("left"==i.direction?"-"+m+"px":0)+")"}):i.startVisible?2===o?(I=I&&h+" "+i.duration/1e3+"s "+i.delayBeforeStart/1e3+"s "+i.css3easing,n={transform:"translateX("+("left"==i.direction?"-"+m+"px":g+"px")+")"},o++):3===o&&(i.duration=i._completeDuration,I&&(h+="0",b=C.trim(b)+"0 ",I=h+" "+i.duration/1e3+"s 0s infinite "+i.css3easing),S()):(S(),n={transform:"translateX("+("left"==i.direction?"-"+m+"px":g+"px")+")"}),s.trigger("beforeStarting"),u){r.css(y,I);var e=b+" { 100%  "+function(e){var t,a=[];for(t in e)e.hasOwnProperty(t)&&a.push(t+":"+e[t]);return a.push(),"{"+a.join(",")+"}"}(n)+"}",t=r.find("style");0!==t.length?t.filter(":last").html(e):C("head").append("<style>"+e+"</style>"),a(r[0],"AnimationIteration",function(){s.trigger("finished")}),a(r[0],"AnimationEnd",function(){q(),s.trigger("finished")})}else r.animate(n,i.duration,i.easing,function(){s.trigger("finished"),i.pauseOnCycle?s.timer=setTimeout(q,i.delayBeforeStart):q()});s.data("runningStatus","resumed")};s.bind("pause",t.pause),s.bind("resume",t.resume),i.pauseOnHover&&(s.bind("mouseenter",t.pause),s.bind("mouseleave",t.resume)),u&&i.allowCss3Support?q():s.timer=setTimeout(q,i.delayBeforeStart)}})},C.fn.marquee.defaults={allowCss3Support:!0,css3easing:"linear",easing:"linear",delayBeforeStart:1e3,direction:"left",duplicated:!1,duration:5e3,speed:0,gap:20,pauseOnCycle:!1,pauseOnHover:!1,startVisible:!1}}(jQuery);
!function(e){function f(e){return""===e||e&&e.charCodeAt&&e.substr}function u(e){return t?t(e):"[object Array]"===n.call(e)}function p(e){return"[object Object]"===n.call(e)}function m(e,r){var t;e=e||{},r=r||{};for(t in r)r.hasOwnProperty(t)&&null==e[t]&&(e[t]=r[t]);return e}function h(e,r,t){var n,c,o=[];if(!e)return o;if(a&&e.map===a)return e.map(r,t);for(n=0,c=e.length;n<c;n++)o[n]=r.call(t,e[n],n,e);return o}function d(e,r){return e=Math.round(Math.abs(e)),isNaN(e)?r:e}function v(e){var r=b.settings.currency.format;return"function"==typeof e&&(e=e()),f(e)&&e.match("%v")?{pos:e,neg:e.replace("-","").replace("%v","-%v"),zero:e}:e&&e.pos&&e.pos.match("%v")?e:f(r)?b.settings.currency.format={pos:r,neg:r.replace("%v","-%v"),zero:r}:r}var r,b={version:"0.4.1",settings:{currency:{symbol:"$",format:"%s%v",decimal:".",thousand:",",precision:2,grouping:3},number:{precision:0,grouping:3,thousand:",",decimal:"."}}},a=Array.prototype.map,t=Array.isArray,n=Object.prototype.toString,y=b.unformat=b.parse=function(e,r){if(u(e))return h(e,function(e){return y(e,r)});if("number"==typeof(e=e||0))return e;r=r||".";var t=RegExp("[^0-9-"+r+"]",["g"]);t=parseFloat((""+e).replace(/\((.*)\)/,"-$1").replace(t,"").replace(r,"."));return isNaN(t)?0:t},l=b.toFixed=function(e,r){r=d(r,b.settings.number.precision);var t=Math.pow(10,r);return(Math.round(b.unformat(e)*t)/t).toFixed(r)},g=b.formatNumber=b.format=function(e,r,t,n){if(u(e))return h(e,function(e){return g(e,r,t,n)});e=y(e);var c=m(p(r)?r:{precision:r,thousand:t,decimal:n},b.settings.number),o=d(c.precision),a=e<0?"-":"",i=parseInt(l(Math.abs(e||0),o),10)+"",s=3<i.length?i.length%3:0;return a+(s?i.substr(0,s)+c.thousand:"")+i.substr(s).replace(/(\d{3})(?=\d)/g,"$1"+c.thousand)+(o?c.decimal+l(Math.abs(e),o).split(".")[1]:"")},s=b.formatMoney=function(e,r,t,n,c,o){if(u(e))return h(e,function(e){return s(e,r,t,n,c,o)});e=y(e);var a=m(p(r)?r:{symbol:r,precision:t,thousand:n,decimal:c,format:o},b.settings.currency),i=v(a.format);return(0<e?i.pos:e<0?i.neg:i.zero).replace("%s",a.symbol).replace("%v",g(Math.abs(e),d(a.precision),a.thousand,a.decimal))};b.formatColumn=function(e,r,t,n,c,o){if(!e)return[];var a=m(p(r)?r:{symbol:r,precision:t,thousand:n,decimal:c,format:o},b.settings.currency),i=v(a.format),s=i.pos.indexOf("%s")<i.pos.indexOf("%v"),l=0;e=h(e,function(e){return u(e)?b.formatColumn(e,a):((e=(0<(e=y(e))?i.pos:e<0?i.neg:i.zero).replace("%s",a.symbol).replace("%v",g(Math.abs(e),d(a.precision),a.thousand,a.decimal))).length>l&&(l=e.length),e)});return h(e,function(e){return f(e)&&e.length<l?s?e.replace(a.symbol,a.symbol+Array(l-e.length+1).join(" ")):Array(l-e.length+1).join(" ")+e:e})},"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=b),exports.accounting=b):"function"==typeof define&&define.amd?define([],function(){return b}):(b.noConflict=(r=e.accounting,function(){return e.accounting=r,b.noConflict=void 0,b}),e.accounting=b)}(this),Array.prototype.map||(Array.prototype.map=function(e){var r,t,n;if(null==this)throw new TypeError("this is null or not defined");var c=Object(this),o=c.length>>>0;if("function"!=typeof e)throw new TypeError(e+" is not a function");for(1<arguments.length&&(r=arguments[1]),t=new Array(o),n=0;n<o;){var a,i;n in c&&(a=c[n],i=e.call(r,a,n,c),t[n]=i),n++}return t}),jQuery(function(p){"use strict";if(p(".bsfp-widgets-list.bsfp-align-marquee").marquee({allowCss3Support:!0,delayBeforeStart:0,duplicated:!0,startVisible:!0}),p(".bs-fp-chart-list.ct-chart, .bs-fpt-chart-list.ct-chart").each(function(){var e=p(this),r={},t={chartPadding:0,stretch:!0,grid:!1,showArea:!0,showPoint:!1,fullWidth:!0,axisX:{showLabel:!1,showGrid:!1,offset:0},axisY:{showLabel:!1,showGrid:!1,offset:0},lineSmooth:Chartist.Interpolation.simple({divisor:100})};e.data("series")&&(r.series=[e.data("series").split(",").map(Number)]),e.data("width")&&(t.width=e.data("width")),e.data("height")&&(t.height=e.data("height")),new Chartist.Line(this,r,t),e.removeAttr("data-series")}),"object"==typeof bs_financial_loc&&"object"==typeof bs_financial_loc.converter&&"object"==typeof bs_financial_loc.converter.rates){var u=function(e,r,t){if(r=r.toUpperCase(),t=t.toUpperCase(),bs_financial_loc.converter.base_currency!==r)if(bs_financial_loc.converter.currencies&&bs_financial_loc.converter.currencies[r])e*=bs_financial_loc.converter.currencies[r];else{if(!bs_financial_loc.converter.rates||!bs_financial_loc.converter.rates[r])return!1;e/=bs_financial_loc.converter.rates[r]}var n;return bs_financial_loc.converter.base_currency!==t?bs_financial_loc.converter.rates&&bs_financial_loc.converter.rates[t]?n=e*bs_financial_loc.converter.rates[t]:bs_financial_loc.converter.currencies&&bs_financial_loc.converter.currencies[t]&&(n=e/bs_financial_loc.converter.currencies[t]):n=e,n},m=function(e){isNaN(e);for(var r=(e+="").split("."),t=r[0],n=1<r.length?"."+r[1]:"",c=/(\d+)(\d{3})/;c.test(t);)t=t.replace(c,"$1,$2");return t+n},h=function(e,r){var t,n=2;if(0===(e=parseFloat(e)))return"0";if(e<1){n=Math.ceil((t=1/e,Math.log(t)/Math.LN10+2))}return accounting.formatMoney(e,r,n)},d=function(e){if(!e||"SELECT"!==e.tagName)return{};var r=[];return Array.prototype.forEach.call(e.options,function(e){r.push({key:e.value,value:e.innerText})}),r},v=function(n,e,r){return!(!n||"SELECT"!==n.tagName)&&(n.innerHTML="",e.forEach(function(e,r){var t=document.createElement("option");t.value=e.key,t.innerText=e.value,n.options.add(t,r)}),n.options.selectedIndex=r||0,!0)},e=p(document);e.on("keyup",".bs-fpc .fpc-convert-from",function(e){var r,t,n,c=p(this),o=c.val().replace(/,/g,""),a=c.closest(".fpc-wrapper-body"),i=p(".fpc-to-unit :selected",a).val(),s=p(".fpc-from-unit :selected",a).val(),l=c.hasClass("fpc-convert-to"),f=l?(n=s,{from:u(t=o,i,n),to:t}):{from:r=o,to:u(r,s,i)};p(".fpc-to-currency-label .value",a).html(h(f.to,"")),l?p(".fpc-input.fpc-convert-from",a).val(m(f.from)):p(".fpc-input.fpc-convert-to",a).val(m(f.to)),c.val(m(o)),p(".fpc-from-currency-label .value",a).html(h(f.from,""))}),e.on("change",".fpc-from-unit,.fpc-to-unit",function(){var e=p(this),r=e.closest(".fpc-wrapper-body"),t=p(":selected",e).val().toUpperCase(),n=function(e){if(""!==e){e=e.replace("*","");var r=bs_financial_loc.converter.currencies_logo;return r=r&&r.list&&r.list[e]?r.list[e]:r&&r.pattern&&r.pattern.cc&&r.pattern.cc.list[e]?r.pattern.cc.url.replace("%code%",e.toLowerCase()).replace("%id%",r.pattern.cc.list[e]):r&&r.pattern&&r.pattern.local&&-1<r.pattern.local.list.indexOf(e.toUpperCase())?r.pattern.local.url.replace("%code%",e.toLowerCase()):bs_financial_loc.converter.cash_logo_url.replace("%code%",e.toLowerCase())}}(t);p(e.hasClass("fpc-from-unit")?".fpc-from-currency-icon":".fpc-to-currency-icon",r).attr("src",n);var c=e.hasClass("fpc-from-unit")?".fpc-from-currency-label .unit":".fpc-to-currency-label .unit";p(c,r.closest(".fpc-wrapper-body")).hasClass("keep-empty")||p(c,r.closest(".fpc-wrapper-body")).html(t),p(".fpc-convert-from",r).keyup()}),e.on("click",".fpc-switch-arrow",function(e){e.preventDefault();var r=p(this).closest(".bs-fpc"),t=p(".fpc-from-unit",r)[0],n=p(".fpc-to-unit",r)[0],c=d(n),o=d(t),a=t.selectedIndex,i=n.selectedIndex;v(t,c,i),v(n,o,a);var s=p(".fpc-from-currency-icon",r),l=p(".fpc-to-currency-icon",r),f=s.attr("src"),u=l.attr("src");p(".fpc-from-currency-label .unit",r).hasClass("keep-empty")||(p(".fpc-from-currency-label .unit",r).hasClass("bsf-currency-code")?p(".fpc-from-currency-label .unit",r).html(p(t.options.item(i)).attr("value")):p(".fpc-from-currency-label .unit",r).html(t.options.item(i).innerText)),p(".fpc-to-currency-label .unit",r).hasClass("keep-empty")||(p(".fpc-to-currency-label .unit",r).hasClass("bsf-currency-code")?p(".fpc-to-currency-label .unit",r).html(p(t.options.item(a)).attr("value")):p(".fpc-to-currency-label .unit",r).html(n.options.item(a).innerText)),s.attr("src",u),l.attr("src",f),p(".fpc-convert-from",r).keyup()}),e.find(".fpc-convert-from").keyup(),e.find(".fpc-from-unit,.fpc-to-unit").change()}});
jQuery(function(e){var a=e(document.body).hasClass("rtl");e(".bs-smart-list.bssl-style-1 .bssl-items").each(function(s,l){e(l).slick({sliderControlDots:"off",prevArrow:'<a rel="prev" class="bssl-nav-btn-big prev"><i class="fa fa-angle-'+(a?"right":"left")+'" aria-hidden="true"></i> '+bs_smart_lists_loc.translations.nav_prev+"</a>",nextArrow:'<a rel="next" class="bssl-nav-btn-big next">'+bs_smart_lists_loc.translations.nav_next+' <i class="fa fa-angle-'+(a?"left":"right")+'" aria-hidden="true"></i></a>',rtl:a,slideMargin:25,slide:".bs-slider-item",appendArrows:e(l).siblings(".bssl-control-nav"),classPrefix:"bs-slider-",adaptiveHeight:!0,accessibility:!1})}),e(".bs-smart-list.bssl-style-2 .bssl-items").each(function(s,l){e(l).slick({sliderControlDots:"off",prevArrow:'<a rel="prev" class="bssl-nav-btn-big prev"><i class="fa fa-angle-'+(a?"right":"left")+'" aria-hidden="true"></i> '+bs_smart_lists_loc.translations.nav_prev+"</a>",nextArrow:'<a rel="next" class="bssl-nav-btn-big next">'+bs_smart_lists_loc.translations.nav_next+' <i class="fa fa-angle-'+(a?"left":"right")+'" aria-hidden="true"></i></a>',rtl:a,slideMargin:25,slide:".bs-slider-item",appendArrows:e(l).siblings(".bssl-control-nav"),classPrefix:"bs-slider-",adaptiveHeight:!0,accessibility:!1})}),e(".bs-smart-list.bssl-style-3 .bssl-items").each(function(s,l){e(l).slick({sliderControlDots:"off",prevArrow:'<a rel="prev" class="bssl-nav-btn-big prev"><i class="fa fa-angle-'+(a?"right":"left")+'" aria-hidden="true"></i> '+bs_smart_lists_loc.translations.nav_prev+"</a>",nextArrow:'<a rel="next" class="bssl-nav-btn-big next">'+bs_smart_lists_loc.translations.nav_next+' <i class="fa fa-angle-'+(a?"left":"right")+'" aria-hidden="true"></i></a>',rtl:a,slideMargin:25,slide:".bs-slider-item",appendArrows:e(l).siblings(".bssl-control-nav"),classPrefix:"bs-slider-",adaptiveHeight:!0,accessibility:!1})}),e(".bs-smart-list.bssl-style-4 .bssl-items").each(function(s,l){e(l).slick({sliderControlDots:"off",prevArrow:'<a rel="prev" class="bssl-outline bssl-nav-btn-big prev"><i class="fa fa-angle-'+(a?"right":"left")+'" aria-hidden="true"></i> '+bs_smart_lists_loc.translations.nav_prev+"</a>",nextArrow:'<a rel="next" class="bssl-outline bssl-nav-btn-big next">'+bs_smart_lists_loc.translations.nav_next+' <i class="fa fa-angle-'+(a?"left":"right")+'" aria-hidden="true"></i></a>',rtl:a,slideMargin:25,slide:".bs-slider-item",appendArrows:e(l).siblings(".bssl-control-nav"),classPrefix:"bs-slider-",adaptiveHeight:!0,accessibility:!1})}),e(".bs-smart-list.bssl-style-5 .bssl-items").each(function(s,l){e(l).slick({sliderControlDots:"off",prevArrow:'<a rel="prev" class="bssl-nav-btn-big prev"><i class="fa fa-angle-'+(a?"right":"left")+'" aria-hidden="true"></i></a>',nextArrow:'<a rel="next" class="bssl-nav-btn-big next"><i class="fa fa-angle-'+(a?"left":"right")+'" aria-hidden="true"></i></a>',rtl:a,slideMargin:25,slide:".bs-slider-item",appendArrows:e(l).siblings(".bssl-control-nav"),classPrefix:"bs-slider-",adaptiveHeight:!0,accessibility:!1})}),e(".bs-smart-list.bssl-style-15 .bssl-items").each(function(s,l){e(l).slick({sliderControlDots:"off",prevArrow:'<a rel="prev" class="bssl-nav-btn-big prev"><i class="fa fa-angle-'+(a?"right":"left")+'" aria-hidden="true"></i> '+bs_smart_lists_loc.translations.nav_prev+"</a>",nextArrow:'<a rel="next" class="bssl-nav-btn-big next">'+bs_smart_lists_loc.translations.nav_next+' <i class="fa fa-angle-'+(a?"left":"right")+'" aria-hidden="true"></i></a>',rtl:a,slideMargin:25,slide:".bs-slider-item",appendArrows:e(l).siblings(".bssl-control-nav"),classPrefix:"bs-slider-",adaptiveHeight:!0,accessibility:!1})}),e(".bs-smart-list.bssl-style-16 .bssl-control-nav select").on("change",function(){window.location=e(this).val()}),e(".bs-smart-list.bssl-style-17 .bssl-control-nav .bssl-select").on("click",function(){e(this).toggleClass("open")}),e(".bs-smart-list.bssl-style-17 .bssl-control-nav .bssl-select li").on("click",function(s){s.preventDefault(),window.location=e(this).data("url")}),e(".bs-smart-list.bssl-style-18 .bssl-items").each(function(s,l){e(l).slick({sliderControlDots:"off",prevArrow:'<a rel="prev" class="bssl-nav-btn-big prev"><i class="fa fa-angle-'+(a?"right":"left")+'" aria-hidden="true"></i></a>',nextArrow:'<a rel="next" class="bssl-nav-btn-big next"><i class="fa fa-angle-'+(a?"left":"right")+'" aria-hidden="true"></i></a>',rtl:a,slide:".bs-slider-item",appendArrows:e(l).siblings(".bssl-control-nav"),classPrefix:"bs-slider-",adaptiveHeight:!0,accessibility:!1,fade:!0}),e(l).on("afterChange",function(s,l,a){var i=bs_smart_lists_loc.translations.trans_x_of_y,t=e(this).closest(".bs-smart-list").find(".bssl-items-title .bssl-count");i=(i=i.replace("%1$s",a+1)).replace("%2$s",t.data("all")),t.html(i)})}),e(".bs-smart-list.bssl-style-19 .bssl-big-items").each(function(s,l){e(l).slick({sliderControlDots:"off",prevArrow:'<a rel="prev" class="bssl-nav-btn-big prev"><i class="fa fa-angle-'+(a?"right":"left")+'" aria-hidden="true"></i></a>',nextArrow:'<a rel="next" class="bssl-nav-btn-big next"><i class="fa fa-angle-'+(a?"left":"right")+'" aria-hidden="true"></i></a>',rtl:a,slide:".bs-slider-item",appendArrows:e(l).siblings(".bssl-control-nav"),classPrefix:"bs-slider-",adaptiveHeight:!0,accessibility:!1,fade:!0})}),e(".bs-smart-list.bssl-style-20 .bssl-big-items").each(function(s,l){e(l).slick({sliderControlDots:"off",prevArrow:'<a rel="prev" class="bssl-nav-btn-big prev"><i class="fa fa-angle-'+(a?"right":"left")+'" aria-hidden="true"></i></a>',nextArrow:'<a rel="next" class="bssl-nav-btn-big next"><i class="fa fa-angle-'+(a?"left":"right")+'" aria-hidden="true"></i></a>',rtl:a,slide:".bs-slider-item",appendArrows:e(l).siblings(".bssl-control-nav"),classPrefix:"bs-slider-",adaptiveHeight:!0,accessibility:!1,fade:!0})})});
(function defineMustache(global,factory){if(typeof exports==="object"&&exports&&typeof exports.nodeName!=="string"){factory(exports)}else if(typeof define==="function"&&define.amd){define(["exports"],factory)}else{global.Mustache={};factory(global.Mustache)}})(this,function mustacheFactory(mustache){var objectToString=Object.prototype.toString;var isArray=Array.isArray||function isArrayPolyfill(object){return objectToString.call(object)==="[object Array]"};function isFunction(object){return typeof object==="function"}function typeStr(obj){return isArray(obj)?"array":typeof obj}function escapeRegExp(string){return string.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function hasProperty(obj,propName){return obj!=null&&typeof obj==="object"&&propName in obj}var regExpTest=RegExp.prototype.test;function testRegExp(re,string){return regExpTest.call(re,string)}var nonSpaceRe=/\S/;function isWhitespace(string){return!testRegExp(nonSpaceRe,string)}var entityMap={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;","`":"&#x60;","=":"&#x3D;"};function escapeHtml(string){return String(string).replace(/[&<>"'`=\/]/g,function fromEntityMap(s){return entityMap[s]})}var whiteRe=/\s*/;var spaceRe=/\s+/;var equalsRe=/\s*=/;var curlyRe=/\s*\}/;var tagRe=/#|\^|\/|>|\{|&|=|!/;function parseTemplate(template,tags){if(!template)return[];var sections=[];var tokens=[];var spaces=[];var hasTag=false;var nonSpace=false;function stripSpace(){if(hasTag&&!nonSpace){while(spaces.length)delete tokens[spaces.pop()]}else{spaces=[]}hasTag=false;nonSpace=false}var openingTagRe,closingTagRe,closingCurlyRe;function compileTags(tagsToCompile){if(typeof tagsToCompile==="string")tagsToCompile=tagsToCompile.split(spaceRe,2);if(!isArray(tagsToCompile)||tagsToCompile.length!==2)throw new Error("Invalid tags: "+tagsToCompile);openingTagRe=new RegExp(escapeRegExp(tagsToCompile[0])+"\\s*");closingTagRe=new RegExp("\\s*"+escapeRegExp(tagsToCompile[1]));closingCurlyRe=new RegExp("\\s*"+escapeRegExp("}"+tagsToCompile[1]))}compileTags(tags||mustache.tags);var scanner=new Scanner(template);var start,type,value,chr,token,openSection;while(!scanner.eos()){start=scanner.pos;value=scanner.scanUntil(openingTagRe);if(value){for(var i=0,valueLength=value.length;i<valueLength;++i){chr=value.charAt(i);if(isWhitespace(chr)){spaces.push(tokens.length)}else{nonSpace=true}tokens.push(["text",chr,start,start+1]);start+=1;if(chr==="\n")stripSpace()}}if(!scanner.scan(openingTagRe))break;hasTag=true;type=scanner.scan(tagRe)||"name";scanner.scan(whiteRe);if(type==="="){value=scanner.scanUntil(equalsRe);scanner.scan(equalsRe);scanner.scanUntil(closingTagRe)}else if(type==="{"){value=scanner.scanUntil(closingCurlyRe);scanner.scan(curlyRe);scanner.scanUntil(closingTagRe);type="&"}else{value=scanner.scanUntil(closingTagRe)}if(!scanner.scan(closingTagRe))throw new Error("Unclosed tag at "+scanner.pos);token=[type,value,start,scanner.pos];tokens.push(token);if(type==="#"||type==="^"){sections.push(token)}else if(type==="/"){openSection=sections.pop();if(!openSection)throw new Error('Unopened section "'+value+'" at '+start);if(openSection[1]!==value)throw new Error('Unclosed section "'+openSection[1]+'" at '+start)}else if(type==="name"||type==="{"||type==="&"){nonSpace=true}else if(type==="="){compileTags(value)}}openSection=sections.pop();if(openSection)throw new Error('Unclosed section "'+openSection[1]+'" at '+scanner.pos);return nestTokens(squashTokens(tokens))}function squashTokens(tokens){var squashedTokens=[];var token,lastToken;for(var i=0,numTokens=tokens.length;i<numTokens;++i){token=tokens[i];if(token){if(token[0]==="text"&&lastToken&&lastToken[0]==="text"){lastToken[1]+=token[1];lastToken[3]=token[3]}else{squashedTokens.push(token);lastToken=token}}}return squashedTokens}function nestTokens(tokens){var nestedTokens=[];var collector=nestedTokens;var sections=[];var token,section;for(var i=0,numTokens=tokens.length;i<numTokens;++i){token=tokens[i];switch(token[0]){case"#":case"^":collector.push(token);sections.push(token);collector=token[4]=[];break;case"/":section=sections.pop();section[5]=token[2];collector=sections.length>0?sections[sections.length-1][4]:nestedTokens;break;default:collector.push(token)}}return nestedTokens}function Scanner(string){this.string=string;this.tail=string;this.pos=0}Scanner.prototype.eos=function eos(){return this.tail===""};Scanner.prototype.scan=function scan(re){var match=this.tail.match(re);if(!match||match.index!==0)return"";var string=match[0];this.tail=this.tail.substring(string.length);this.pos+=string.length;return string};Scanner.prototype.scanUntil=function scanUntil(re){var index=this.tail.search(re),match;switch(index){case-1:match=this.tail;this.tail="";break;case 0:match="";break;default:match=this.tail.substring(0,index);this.tail=this.tail.substring(index)}this.pos+=match.length;return match};function Context(view,parentContext){this.view=view;this.cache={".":this.view};this.parent=parentContext}Context.prototype.push=function push(view){return new Context(view,this)};Context.prototype.lookup=function lookup(name){var cache=this.cache;var value;if(cache.hasOwnProperty(name)){value=cache[name]}else{var context=this,names,index,lookupHit=false;while(context){if(name.indexOf(".")>0){value=context.view;names=name.split(".");index=0;while(value!=null&&index<names.length){if(index===names.length-1)lookupHit=hasProperty(value,names[index]);value=value[names[index++]]}}else{value=context.view[name];lookupHit=hasProperty(context.view,name)}if(lookupHit)break;context=context.parent}cache[name]=value}if(isFunction(value))value=value.call(this.view);return value};function Writer(){this.cache={}}Writer.prototype.clearCache=function clearCache(){this.cache={}};Writer.prototype.parse=function parse(template,tags){var cache=this.cache;var tokens=cache[template];if(tokens==null)tokens=cache[template]=parseTemplate(template,tags);return tokens};Writer.prototype.render=function render(template,view,partials){var tokens=this.parse(template);var context=view instanceof Context?view:new Context(view);return this.renderTokens(tokens,context,partials,template)};Writer.prototype.renderTokens=function renderTokens(tokens,context,partials,originalTemplate){var buffer="";var token,symbol,value;for(var i=0,numTokens=tokens.length;i<numTokens;++i){value=undefined;token=tokens[i];symbol=token[0];if(symbol==="#")value=this.renderSection(token,context,partials,originalTemplate);else if(symbol==="^")value=this.renderInverted(token,context,partials,originalTemplate);else if(symbol===">")value=this.renderPartial(token,context,partials,originalTemplate);else if(symbol==="&")value=this.unescapedValue(token,context);else if(symbol==="name")value=this.escapedValue(token,context);else if(symbol==="text")value=this.rawValue(token);if(value!==undefined)buffer+=value}return buffer};Writer.prototype.renderSection=function renderSection(token,context,partials,originalTemplate){var self=this;var buffer="";var value=context.lookup(token[1]);function subRender(template){return self.render(template,context,partials)}if(!value)return;if(isArray(value)){for(var j=0,valueLength=value.length;j<valueLength;++j){buffer+=this.renderTokens(token[4],context.push(value[j]),partials,originalTemplate)}}else if(typeof value==="object"||typeof value==="string"||typeof value==="number"){buffer+=this.renderTokens(token[4],context.push(value),partials,originalTemplate)}else if(isFunction(value)){if(typeof originalTemplate!=="string")throw new Error("Cannot use higher-order sections without the original template");value=value.call(context.view,originalTemplate.slice(token[3],token[5]),subRender);if(value!=null)buffer+=value}else{buffer+=this.renderTokens(token[4],context,partials,originalTemplate)}return buffer};Writer.prototype.renderInverted=function renderInverted(token,context,partials,originalTemplate){var value=context.lookup(token[1]);if(!value||isArray(value)&&value.length===0)return this.renderTokens(token[4],context,partials,originalTemplate)};Writer.prototype.renderPartial=function renderPartial(token,context,partials){if(!partials)return;var value=isFunction(partials)?partials(token[1]):partials[token[1]];if(value!=null)return this.renderTokens(this.parse(value),context,partials,value)};Writer.prototype.unescapedValue=function unescapedValue(token,context){var value=context.lookup(token[1]);if(value!=null)return value};Writer.prototype.escapedValue=function escapedValue(token,context){var value=context.lookup(token[1]);if(value!=null)return mustache.escape(value)};Writer.prototype.rawValue=function rawValue(token){return token[1]};mustache.name="mustache.js";mustache.version="2.2.1";mustache.tags=["{{","}}"];var defaultWriter=new Writer;mustache.clearCache=function clearCache(){return defaultWriter.clearCache()};mustache.parse=function parse(template,tags){return defaultWriter.parse(template,tags)};mustache.render=function render(template,view,partials){if(typeof template!=="string"){throw new TypeError('Invalid template! Template should be a "string" '+'but "'+typeStr(template)+'" was given as the first '+"argument for mustache#render(template, view, partials)")}return defaultWriter.render(template,view,partials)};mustache.to_html=function to_html(template,view,partials,send){var result=mustache.render(template,view,partials);if(isFunction(send)){send(result)}else{return result}};mustache.escape=escapeHtml;mustache.Scanner=Scanner;mustache.Context=Context;mustache.Writer=Writer});
!function(t){"use strict";var n=0,s=[],e=function(n){function s(){return!0}this.options=t.extend(!0,{template:"default",skin:"skin-1",initialZIndex:0,show:!0,content:{},close_button:!0,button_position:"right",animations:{delay:600,open:"bs-animate bs-fadeInDown",close:"bs-animate bs-fadeOutUp"},buttons:{},events:{before_click:s,clicked:s,handle_keyup:function(t,n,s){return s}},styles:{modal:"",container:""},modalId:"modal-"+Math.floor(999*Math.random()),modalClass:"",destroyHtml:!0,is_vertical_center:!0},n),this.$modal=!1,this.$overlay=!1,this.timerTimeouts=[],this.$document=!1,this.modalID=!1,this.visible=!1,this.init()};e.prototype={templates:{"default":'\n<div class="bs-modal-default"  {{#inline_style}} style="{{inline_style}}" {{/inline_style}}>\n    {{#close_button}}\n    <a href="#" class="bs-close-modal">\n        <i class="fa fa-times" aria-hidden="true"></i>\n    </a>\n    {{/close_button}}\n    <div class="bs-modal-header-wrapper bs-modal-clearfix">\n        <h2 class="bs-modal-header">\n            {{#icon}}\n            <i class="fa {{icon}}"></i>\n            {{/icon}}\n\n            {{header}}\n        </h2>\n    </div>\n\n    <div class="bs-modal-body">\n        {{{bs_body}}}\n    </div>\n\n    {{#bs_buttons}}\n    <div class="bs-modal-bottom bs-modal-buttons-{{btn_position}} bs-modal-clearfix">\n        {{{bs_buttons}}}\n    </div>\n    {{/bs_buttons}}\n</div>',single_image:'\n<div class="bs-modal-default" {{#inline_style}} style="{{inline_style}}" {{/inline_style}}>\n    {{#close_button}}\n    <a href="#" class="bs-close-modal">\n        <i class="fa fa-times" aria-hidden="true"></i>\n    </a>\n    {{/close_button}}\n    <div class="bs-modal-header-wrapper bs-modal-clearfix">\n        <h2 class="bs-modal-header">\n            {{#icon}}\n            <i class="fa {{icon}}"></i>\n            {{/icon}}\n\n            {{header}}\n        </h2>\n    </div>\n\n    <div class="bs-modal-body bf-clearfix">\n        \n        <div class="bs-modal-image bf-clearfix" {{#image_align}} style="float:{{image_align}}"{{/image_align}}>\n\n            <img src="{{image_src}}" {{#image_style}} style="{{image_style}}"{{/image_style}}/>\n            \n            {{#image_caption}}\n            <div class="bs-modal-image-caption">\n                {{image_caption}}\n            </div>\n            {{/image_caption}}\n        </div>\n        {{{bs_body}}}\n    </div>\n\n    {{#bs_buttons}}\n    <div class="bs-modal-bottom bs-modal-buttons-left bs-modal-clearfix">\n        {{{bs_buttons}}}\n        \n        {{#checkbox}}\n        <div class="bs-modal-checkbox">\n            <input type="checkbox" name="include_content" class="toggle-content" value="1" checked="checked"> <label class="checkbox-label">{{checkbox_label}}</label>\n        </div>\n        {{/checkbox}}\n    </div>\n    {{/bs_buttons}}\n</div>'},skins:{"skin-1":'<div class="bs-modal-description">\n   {{#title}} <h3 class="bs-modal-title">{{title}}</h3>\n   {{/title}} \n    {{{body}}}\n</div>',loading:' <div class="bs-modal-loading bs-modal-loading-1">\n    <img src="data:image/false;base64,R0lGODlhIAAIAPEAALy8vHh4eP///wAAACH/C05FVFNDQVBFMi4wAwEAAAAh/hhPcHRpbWl6ZWQgd2l0aCBlemdpZi5jb20AIfkEBQsAAQAsAAAAACAACAAAAiGEb6GBuNyiWxK8Wq/UuHFPdaCSheLxTeSJmiPEWq4KNwUAIfkEBQsAAAAsAAAAAAgACAAAAgaMj6nL7V0AIfkEBQsAAgAsAAAAABQACAAAAhuEb6IS7Y3QYs/FM6u9IOvAdcsHcp4WnlU6fgUAIfkEBQsAAgAsDAAAABQACAAAAhuEb6IS7Y3QYs/FM6u9IOvAdcsHcp4WnlU6fgUAOw==" />\n\n     <div class="bs-modal-loading-heading">\n         <h4>{{loading_heading}}</h4>\n     </div>\n </div>\n',"loading-2":' <div class="bs-modal-loading">\n     <div class="la-line-scale-pulse-out-rapid la-2x">\n         <div></div>\n         <div></div>\n         <div></div>\n         <div></div>\n         <div></div>\n     </div>\n     \n     <div class="bs-modal-loading-heading">\n         <h4>{{loading_heading}}</h4>\n     </div>\n</div>\n',success:' <div class="bs-modal-success">\n     \n     <i class="fa fa-thumbs-o-up" aria-hidden="true"></i>\n     \n     <div class="bs-modal-bs-modal-success-heading">\n         <h4>{{success_heading}}</h4>\n     </div>\n</div>\n'},button_struct:'<a {{#href}}href="{{href}}"{{/href}} {{#btn_classes}}class="{{btn_classes}}"{{/btn_classes}} id="{{id}}">{{{label}}}</a>',debug:function(t){console.error(t)},get_html:function(n,s,e){if("undefined"==typeof this.templates[n])return this.debug("invalid template name"),!1;if("undefined"==typeof this.skins[s])return this.debug("invalid skin"),!1;Mustache.parse(this.templates[n]);Mustache.parse(this.skins[s]);var i=Mustache.render(this.skins[s],e),o={bs_body:i,bs_buttons:this.generate_buttons(),close_button:this.options.close_button,inline_style:this.options.styles.modal,btn_position:this.options.button_position};return this.handle_event("prepare_html",this,n,s,e),Mustache.render(this.templates[n],t.extend(e,o))},before_append_html:function(t){this.handle_event("before_append_html",this,t)},after_append_html:function(t){this.options.is_vertical_center&&this.make_vertical_center(),this.$modal.focus(),this.handle_event("after_append_html",this,t)},after_close_modal:function(){t(window).off("resize.bs-modal"),s.pop()},has_button:function(){return"object"==typeof this.options.buttons},append_html:function(){this.before_append_html("modal");var t=this.get_html(this.options.template,this.options.skin,this.options.content);return"string"!=typeof t?t:(this.$modal.html(t),this.after_append_html("modal"),!0)},generate_buttons:function(){if(!this.has_button())return"";Mustache.parse(this.button_struct);var t="";for(var n in this.options.buttons)t+="\n",t+=Mustache.render(this.button_struct,this.get_button_replacement_object(n));return t},get_button_replacement_object:function(n){if("object"!=typeof this.options.buttons[n])return this.debug("invalid button id"),{};var s=t.extend({focus:!1},this.options.buttons[n]);return delete s.clicked,s.id=n,"string"!=typeof s.btn_classes&&(s.btn_classes=""),-1!==t.inArray(s.type,["primary","secondary"])&&(s.btn_classes+=" bs-modal-btn-"+s.type),s.focus&&(s.btn_classes+=" bs-modal-btn-focus"),s},close_modal:function(t){this.visible=!1;var n=this,t=t||"callback";n.handle_event("modal_close",this,t);for(var s=0;s<this.timerTimeouts.length;s++)clearTimeout(this.timerTimeouts[s]);n.$modal.removeClass(this.options.animations.open).addClass(this.options.animations.close).delay(this.options.animations.delay).queue(function(t){n.$modal.hide().removeClass(n.options.animations.close),n.options.destroyHtml?n.$modal.remove():n.$modal.clearQueue(),t()}),n.$overlay.fadeOut(this.options.animations.delay,function(){n.options.destroyHtml&&n.find().remove(),n.$document.removeClass("modal-open").removeClass("modal-open-vc"),n.keyup_unbind(),n.handle_event("modal_closed",this,t)}),n.after_close_modal()},keyup_unbind:function(){this.options.destroyHtml&&this.$document.off("keyup.bs-modal-"+this.getModalID())},handle_event:function(t,n){var s=Array.prototype.slice.call(arguments,2);return"function"==typeof this.options.events[t]?this.options.events[t].apply(this,[n,this.options].concat(s)):void 0},handle_timer:function(t){var n=this;this.timerTimeouts.push(setTimeout(function(){t.callback.call(n,n.option)},t.delay))},change_skin:function(s,e){e="boolean"==typeof e?e:!0;var i=t.extend(e,{template:this.options.template,skin:this.options.skin,content:this.options.content,animations:{open:!1,body:!1,delay:20},buttons:{},styles:{}},s);if(this.options.buttons=i.buttons,i.styles.container){var o={inline_style:i.styles.container},a=Mustache.render('<div class="bs-modal" {{#inline_style}} style="{{inline_style}}" {{/inline_style}}></div>\n',o);this.$modal[0].outerHTML=a,this.$modal=this.find(".bs-modal").css("z-index",n+1).show(),this.afterWrapperHtmlGenerated()}var l=this.get_html(i.template,i.skin,i.content);return"string"!=typeof l?l:(this.$modal.html(l).removeClass(this.options.animations.open).delay(20).queue(function(n){i.animations.open&&t(this).addClass(i.animations.open),n()}).removeClass(function(t,n){return(n.match(/(^|\s)skin-\S+/g)||[]).join(" ")}).addClass("skin-"+i.skin).find(".bs-modal-body").addClass(i.animations.body),"object"==typeof i.timer&&this.handle_timer(i.timer),this.after_append_html("change_skin"),void this.handle_event("modal_loaded",this))},make_vertical_center:function(){var n=this;t(window).on("resize.bs-modal",function(){if(!n.isModalLast())return!1;var t=n.$modal.innerHeight(),s=window.innerHeight;if(s>t)var e=Math.ceil((s-t)/2);else var e=35;n.$modal.css("top",e)}).trigger("resize.bs-modal")},getModalID:function(){return this.modalID},setModalID:function(t){this.modalID=t},setActiveModalId:function(t){s.push(t)},getActiveModalId:function(){return s.length?s[s.length-1]:0},isModalLast:function(){return this.getActiveModalId()===this.getModalID()},find:function(n){var s=this.$document.find("#"+this.getModalID());return n?t(n,s):s},_fixModalZindex:function(){},show:function(){var t=this;t.$document.find(".vc_ui-panel.vc_active .vc_ui-panel-window-inner").length&&t.$document.addClass("modal-alongside-vc-panel"),this.$overlay.fadeIn(this.options.animations.open,function(){t.$document.addClass("modal-open")}),this.$modal.addClass(t.options.animations.open).addClass("skin-"+t.options.skin).show().delay(t.options.animations.delay).queue(function(n){"object"==typeof t.options.timer&&t.handle_timer(t.options.timer),n()}),this.setActiveModalId(this.getModalID()),this.visible=!0,this.handle_event("modal_show",this)},init:function(){this.$document=t(document.body);var s=this;this.setModalID(this.options.modalId),this.setActiveModalId(this.getModalID());var e=0===this.find().length;if(e){var i={inline_style:this.options.styles.container,modal_id:this.getModalID(),modal_class:this.options.modalClass};this.$document.append(Mustache.render('<div id="{{modal_id}}"{{#modal_class}} class="{{modal_class}}"{{/modal_class}}>\n    <div class="bs-modal-overlay"></div>\n        <div class="bs-modal" {{#inline_style}} style="{{inline_style}}" {{/inline_style}}>\n    </div>\n</div>',i))}this.$modal=this.find(".bs-modal"),this.$overlay=this.find(".bs-modal-overlay"),n?(n=Math.max(n,this.options.initialZIndex),n++,this.$overlay.css("z-index",n),this.$modal.css("z-index",n+1)):this.options.initialZIndex?(this.$overlay.css("z-index",this.options.initialZIndex),this.$modal.css("z-index",this.options.initialZIndex+1),n=this.options.initialZIndex):n=parseInt(this.$modal.css("z-index")),e&&s.afterWrapperHtmlGenerated(),this.options.close_button&&this.$document.on("keyup.bs-modal-"+this.getModalID(),function(n){if(!s.handle_event("handle_keyup",n,s.isModalLast()))return!1;if("TEXTAREA"===n.target.tagName)return!1;if(s.options.close_button&&27===n.which)s.close_modal("esc");else if(13===n.which){if(s.has_button()){var e=s.$modal.find(".bs-modal-bottom"),i=t(".bs-modal-btn-focus",e);i.length||(i=t(".bs-modal-btn-primary",e)),i.trigger("click")}s.keyup_unbind()}}),this.options.show&&s.show(),e&&s.append_html(),this.handle_event("modal_loaded",this)},afterWrapperHtmlGenerated:function(){var n=this;this.$modal.on("click","a",function(s){if(n.handle_event("before_click",this)){var e=t(this),i=e.attr("id");if(e.hasClass("bs-close-modal"))s.preventDefault(),n.close_modal("btn");else if(i&&"object"==typeof n.options.buttons[i]){var o=n.options.buttons[i];switch(o.action){case"close":n.close_modal("link")}"function"==typeof o.clicked&&o.clicked.call(n)}n.handle_event("clicked",this)}})}},t.bs_modal=function(t){return new e(t)},t.bs_modal_template=function(t,n){return n?void(e.prototype.templates[t]=n):e.prototype.templates[t]}}(jQuery);
({activeKeys:{cmd:!1,ctrl:!1,alt:!1,shift:!1},setup:function(){this.loc("opt-1.0")&&this.disableImageRightClick(),this.loc("opt-1.1")&&this.disableImageDragDrop(),this.loc("opt-2.1")&&this.disableRightClick(),this.loc("opt-2.0")&&this.addText2Copy(),this.loc("opt-2.4")&&this.disableShortcuts(),this.loc("opt-3.0")&&this.disableIframeLoad(),this.loc("opt-2.5")&&this.disableTextSelection(),this.loc("opt-2.6")&&this.disableCopy()},disableImageDragDrop:function(){this.attachEvent("dragstart",this.returnFalse)},disableImageRightClick:function(){this.attachEvent("contextmenu",function(t){if("IMG"===t.target.tagName)return t.preventDefault(),!1})},disableRightClick:function(){var o=this;this.attachEvent("contextmenu",function(t){if(!o.loc("opt-2.2")||"A"!==t.target.tagName)return t.preventDefault(),o.rightClickAlert(),!1;var e=o.getHost(t.target.href),i=o.loc("opt-2.7");return e&&i?-1===i.indexOf(e)?(t.preventDefault(),o.rightClickAlert(),!1):void 0:(t.preventDefault(),o.rightClickAlert(),!1)})},disableTextSelection:function(){this.attachEvent("selectstart",this.returnFalse)},disableCopy:function(){this.attachEvent("copy",this.returnFalse),this.attachEvent("cut",this.returnFalse)},addText2Copy:function(){var o=this,t=function(t){var e=t.clipboardData||window.clipboardData;if(e){var i=window.getSelection().toString();0<o.loc("opt-2.8")&&i.length>o.loc("opt-2.8")&&(i=i.substring(0,o.loc("opt-2.8"))+"..."),t.preventDefault(),i=(i=(i=i+"\n"+o.loc("opt-2.0")).replace("%POSTLINK%",window.location.href)).replace("%SITELINK%",window.location.origin),e.setData("Text",i)}};this.attachEvent("copy",t),this.attachEvent("cut",t)},disableShortcuts:function(){var a=this;this.attachEvent("keydown",function(t){var e=t.keyCode?t.keyCode:t.which;if(16===e)a.activeKeys.shift=!0;else if(17===e)a.activeKeys.ctrl=!0;else if(18===e)a.activeKeys.alt=!0;else if(91===e)a.activeKeys.cmd=!0;else{var i,o="";for(i in a.activeKeys)a.activeKeys[i]&&(o+=i,o+="_");if(o=(o+=String.fromCharCode(e)).toLowerCase(),-1!==a.loc("opt-2.4").indexOf(o))return t.preventDefault(),!1}return!0}),this.attachEvent("keyup",function(t){var e=t.keyCode?t.keyCode:t.which;16===e&&(a.activeKeys.shift=!1),17===e&&(a.activeKeys.ctrl=!1),18===e&&(a.activeKeys.alt=!1),91===e&&(a.activeKeys.cmd=!1)})},rightClickAlert:function(){var t=this.loc("opt-2.3");t&&this.alert(t)},disableIframeLoad:function(){if(this.isIframe()){try{if(this.getHost(window.parent.location.href)===this.getHost(window.location.href))return}catch(t){}var t=this.loc("opt-3.2"),e=this.loc("opt-3.1");if("redirect"===this.loc("opt-3.0")&&t){if(window.location.href!==t)return void(window.location=t)}else document.write("<h1>"+e+"</h1>"),this.attachEvent("DOMContentLoaded",function(){document.write("<h1>"+e+"</h1>")})}},attachEvent:function(t,e){window.addEventListener?window.addEventListener(t,e,!1):window.attachEvent&&window.attachEvent("on"+t,e)},returnFalse:function(t){return t&&t.preventDefault&&t.preventDefault(),!1},alert:function(t){alert(t)},loc:function(t){if(t&&cpp_loc){if(-1==t.indexOf("."))return cpp_loc[t];var e=t.split("."),i=cpp_loc[e[0]];if(void 0!==i){for(var o=(e=e.splice(1)).length-1,a=0;a<=o;a++){if("object"!=typeof i[e[a]]&&a!==o)return;i=i[e[a]]}return i}}},isIframe:function(){return window.parent!==window.self},getHost:function(t){var e=t.match(/^https?\:\/\/(?:w{3}\.)?([^\/?#]+)(?:[\/?#]|$)/i);if(e)return e[1]}}).setup();
if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");!function(){var t=jQuery.fn.jquery.split(" ")[0].split(".");if(t[0]<2&&t[1]<9||1==t[0]&&9==t[1]&&t[2]<1)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher")}(),function(a){"use strict";function s(t){a(t).on("click",e,this.close)}var e='[data-dismiss="alert"]';s.VERSION="3.3.0",s.TRANSITION_DURATION=150,s.prototype.close=function(t){function e(){o.detach().trigger("closed.bs.alert").remove()}var i=a(this),n=i.attr("data-target");n||(n=(n=i.attr("href"))&&n.replace(/.*(?=#[^\s]*$)/,""));var o=a(n);t&&t.preventDefault(),o.length||(o=i.closest(".alert")),o.trigger(t=a.Event("close.bs.alert")),t.isDefaultPrevented()||(o.removeClass("in"),a.support.transition&&o.hasClass("fade")?o.one("bsTransitionEnd",e).emulateTransitionEnd(s.TRANSITION_DURATION):e())};var t=a.fn.alert;a.fn.alert=function(i){return this.each(function(){var t=a(this),e=t.data("bs.alert");e||t.data("bs.alert",e=new s(this)),"string"==typeof i&&e[i].call(t)})},a.fn.alert.Constructor=s,a.fn.alert.noConflict=function(){return a.fn.alert=t,this},a(document).on("click.bs.alert.data-api",e,s.prototype.close)}(jQuery),function(a){"use strict";function i(n){return this.each(function(){var t=a(this),e=t.data("bs.button"),i="object"==typeof n&&n;e||t.data("bs.button",e=new o(this,i)),"toggle"==n?e.toggle():n&&e.setState(n)})}var o=function(t,e){this.$element=a(t),this.options=a.extend({},o.DEFAULTS,e),this.isLoading=!1};o.VERSION="3.3.0",o.DEFAULTS={loadingText:"loading..."},o.prototype.setState=function(t){var e="disabled",i=this.$element,n=i.is("input")?"val":"html",o=i.data();t+="Text",null==o.resetText&&i.data("resetText",i[n]()),setTimeout(a.proxy(function(){i[n](null==o[t]?this.options[t]:o[t]),"loadingText"==t?(this.isLoading=!0,i.addClass(e).attr(e,e)):this.isLoading&&(this.isLoading=!1,i.removeClass(e).removeAttr(e))},this),0)},o.prototype.toggle=function(){var t=!0,e=this.$element.closest('[data-toggle="buttons"]');if(e.length){var i=this.$element.find("input");"radio"==i.prop("type")&&(i.prop("checked")&&this.$element.hasClass("active")?t=!1:e.find(".active").removeClass("active")),t&&i.prop("checked",!this.$element.hasClass("active")).trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active"));t&&this.$element.toggleClass("active")};var t=a.fn.button;a.fn.button=i,a.fn.button.Constructor=o,a.fn.button.noConflict=function(){return a.fn.button=t,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(t){var e=a(t.target);e.hasClass("btn")||(e=e.closest(".btn")),i.call(e,"toggle"),t.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(t){a(t.target).closest(".btn").toggleClass("focus","focus"==t.type)})}(jQuery),function(r){"use strict";function a(n){n&&3===n.which||(r(".dropdown-backdrop").remove(),r(c).each(function(){var t=r(this),e=l(t),i={relatedTarget:this};e.hasClass("open")&&(e.trigger(n=r.Event("hide.bs.dropdown",i)),n.isDefaultPrevented()||(t.attr("aria-expanded","false"),e.removeClass("open").trigger("hidden.bs.dropdown",i)))}))}function l(t){var e=t.attr("data-target");e||(e=(e=t.attr("href"))&&/#[A-Za-z]/.test(e)&&e.replace(/.*(?=#[^\s]*$)/,""));var i=e&&r(e);return i&&i.length?i:t.parent()}function n(t){r(t).on("click.bs.dropdown",this.toggle)}var c='[data-toggle="dropdown"]';n.VERSION="3.3.0",n.prototype.toggle=function(t){var e=r(this);if(!e.is(".disabled, :disabled")){var i=l(e),n=i.hasClass("open");if(a(),!n){"ontouchstart"in document.documentElement&&!i.closest(".navbar-nav").length&&r('<div class="dropdown-backdrop"/>').insertAfter(r(this)).on("click",a);var o={relatedTarget:this};if(i.trigger(t=r.Event("show.bs.dropdown",o)),t.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),i.toggleClass("open").trigger("shown.bs.dropdown",o)}return!1}},n.prototype.keydown=function(t){if(/(38|40|27|32)/.test(t.which)){var e=r(this);if(t.preventDefault(),t.stopPropagation(),!e.is(".disabled, :disabled")){var i=l(e),n=i.hasClass("open");if(!n&&27!=t.which||n&&27==t.which)return 27==t.which&&i.find(c).trigger("focus"),e.trigger("click");var o=" li:not(.divider):visible a",a=i.find('[role="menu"]'+o+', [role="listbox"]'+o);if(a.length){var s=a.index(t.target);38==t.which&&0<s&&s--,40==t.which&&s<a.length-1&&s++,~s||(s=0),a.eq(s).trigger("focus")}}}};var t=r.fn.dropdown;r.fn.dropdown=function(i){return this.each(function(){var t=r(this),e=t.data("bs.dropdown");e||t.data("bs.dropdown",e=new n(this)),"string"==typeof i&&e[i].call(t)})},r.fn.dropdown.Constructor=n,r.fn.dropdown.noConflict=function(){return r.fn.dropdown=t,this},r(document).on("click.bs.dropdown.data-api",a).on("click.bs.dropdown.data-api",".dropdown form",function(t){t.stopPropagation()}).on("click.bs.dropdown.data-api",c,n.prototype.toggle).on("keydown.bs.dropdown.data-api",c,n.prototype.keydown).on("keydown.bs.dropdown.data-api",'[role="menu"]',n.prototype.keydown).on("keydown.bs.dropdown.data-api",'[role="listbox"]',n.prototype.keydown)}(jQuery),function(a){"use strict";function s(n,o){return this.each(function(){var t=a(this),e=t.data("bs.modal"),i=a.extend({},r.DEFAULTS,t.data(),"object"==typeof n&&n);e||t.data("bs.modal",e=new r(this,i)),"string"==typeof n?e[n](o):i.show&&e.show(o)})}function r(t,e){this.options=e,this.$body=a(document.body),this.$element=a(t),this.$backdrop=this.isShown=null,this.scrollbarWidth=0,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,a.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))}r.VERSION="3.3.0",r.TRANSITION_DURATION=300,r.BACKDROP_TRANSITION_DURATION=150,r.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},r.prototype.toggle=function(t){return this.isShown?this.hide():this.show(t)},r.prototype.show=function(i){var n=this,t=a.Event("show.bs.modal",{relatedTarget:i});this.$element.trigger(t),this.isShown||t.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.$body.addClass("modal-open"),this.setScrollbar(),this.escape(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',a.proxy(this.hide,this)),this.backdrop(function(){var t=a.support.transition&&n.$element.hasClass("fade");n.$element.parent().length||n.$element.appendTo(n.$body),n.$element.show().scrollTop(0),t&&n.$element[0].offsetWidth,n.$element.addClass("in").attr("aria-hidden",!1),n.enforceFocus();var e=a.Event("shown.bs.modal",{relatedTarget:i});t?n.$element.find(".modal-dialog").one("bsTransitionEnd",function(){n.$element.trigger("focus").trigger(e)}).emulateTransitionEnd(r.TRANSITION_DURATION):n.$element.trigger("focus").trigger(e)}))},r.prototype.hide=function(t){t&&t.preventDefault(),t=a.Event("hide.bs.modal"),this.$element.trigger(t),this.isShown&&!t.isDefaultPrevented()&&(this.isShown=!1,this.escape(),a(document).off("focusin.bs.modal"),this.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss.bs.modal"),a.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",a.proxy(this.hideModal,this)).emulateTransitionEnd(r.TRANSITION_DURATION):this.hideModal())},r.prototype.enforceFocus=function(){a(document).off("focusin.bs.modal").on("focusin.bs.modal",a.proxy(function(t){this.$element[0]===t.target||this.$element.has(t.target).length||this.$element.trigger("focus")},this))},r.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",a.proxy(function(t){27==t.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},r.prototype.hideModal=function(){var t=this;this.$element.hide(),this.backdrop(function(){t.$body.removeClass("modal-open"),t.resetScrollbar(),t.$element.trigger("hidden.bs.modal")})},r.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},r.prototype.backdrop=function(t){var e=this,i=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var n=a.support.transition&&i;if(this.$backdrop=a('<div class="modal-backdrop '+i+'" />').prependTo(this.$element).on("click.dismiss.bs.modal",a.proxy(function(t){t.target===t.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))},this)),n&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!t)return;n?this.$backdrop.one("bsTransitionEnd",t).emulateTransitionEnd(r.BACKDROP_TRANSITION_DURATION):t()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var o=function(){e.removeBackdrop(),t&&t()};a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",o).emulateTransitionEnd(r.BACKDROP_TRANSITION_DURATION):o()}else t&&t()},r.prototype.checkScrollbar=function(){this.scrollbarWidth=this.measureScrollbar()},r.prototype.setScrollbar=function(){var t=parseInt(this.$body.css("padding-right")||0,10);this.scrollbarWidth&&this.$body.css("padding-right",t+this.scrollbarWidth)},r.prototype.resetScrollbar=function(){this.$body.css("padding-right","")},r.prototype.measureScrollbar=function(){if(document.body.clientWidth>=window.innerWidth)return 0;var t=document.createElement("div");t.className="modal-scrollbar-measure",this.$body.append(t);var e=t.offsetWidth-t.clientWidth;return this.$body[0].removeChild(t),e};var t=a.fn.modal;a.fn.modal=s,a.fn.modal.Constructor=r,a.fn.modal.noConflict=function(){return a.fn.modal=t,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(t){var e=a(this),i=e.attr("href"),n=a(e.attr("data-target")||i&&i.replace(/.*(?=#[^\s]+$)/,"")),o=n.data("bs.modal")?"toggle":a.extend({remote:!/#/.test(i)&&i},n.data(),e.data());e.is("a")&&t.preventDefault(),n.one("show.bs.modal",function(t){t.isDefaultPrevented()||n.one("hidden.bs.modal",function(){e.is(":visible")&&e.trigger("focus")})}),s.call(n,o,this)})}(jQuery),function(v){"use strict";function g(t,e){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",t,e)}g.VERSION="3.3.0",g.TRANSITION_DURATION=150,g.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},g.prototype.init=function(t,e,i){this.enabled=!0,this.type=t,this.$element=v(e),this.options=this.getOptions(i),this.$viewport=this.options.viewport&&v(this.options.viewport.selector||this.options.viewport);for(var n=this.options.trigger.split(" "),o=n.length;o--;){var a=n[o];if("click"==a)this.$element.on("click."+this.type,this.options.selector,v.proxy(this.toggle,this));else if("manual"!=a){var s="hover"==a?"mouseenter":"focusin",r="hover"==a?"mouseleave":"focusout";this.$element.on(s+"."+this.type,this.options.selector,v.proxy(this.enter,this)),this.$element.on(r+"."+this.type,this.options.selector,v.proxy(this.leave,this))}}this.options.selector?this._options=v.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},g.prototype.getDefaults=function(){return g.DEFAULTS},g.prototype.getOptions=function(t){return(t=v.extend({},this.getDefaults(),this.$element.data(),t)).delay&&"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),t},g.prototype.getDelegateOptions=function(){var i={},n=this.getDefaults();return this._options&&v.each(this._options,function(t,e){n[t]!=e&&(i[t]=e)}),i},g.prototype.enter=function(t){var e=t instanceof this.constructor?t:v(t.currentTarget).data("bs."+this.type);return e&&e.$tip&&e.$tip.is(":visible")?void(e.hoverState="in"):(e||(e=new this.constructor(t.currentTarget,this.getDelegateOptions()),v(t.currentTarget).data("bs."+this.type,e)),clearTimeout(e.timeout),e.hoverState="in",e.options.delay&&e.options.delay.show?void(e.timeout=setTimeout(function(){"in"==e.hoverState&&e.show()},e.options.delay.show)):e.show())},g.prototype.leave=function(t){var e=t instanceof this.constructor?t:v(t.currentTarget).data("bs."+this.type);return e||(e=new this.constructor(t.currentTarget,this.getDelegateOptions()),v(t.currentTarget).data("bs."+this.type,e)),clearTimeout(e.timeout),e.hoverState="out",e.options.delay&&e.options.delay.hide?void(e.timeout=setTimeout(function(){"out"==e.hoverState&&e.hide()},e.options.delay.hide)):e.hide()},g.prototype.show=function(){var t=v.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(t);var e=v.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(t.isDefaultPrevented()||!e)return;var i=this,n=this.tip(),o=this.getUID(this.type);this.setContent(),n.attr("id",o),this.$element.attr("aria-describedby",o),this.options.animation&&n.addClass("fade");var a="function"==typeof this.options.placement?this.options.placement.call(this,n[0],this.$element[0]):this.options.placement,s=/\s?auto?\s?/i,r=s.test(a);r&&(a=a.replace(s,"")||"top"),n.detach().css({top:0,left:0,display:"block"}).addClass(a).data("bs."+this.type,this),this.options.container?n.appendTo(this.options.container):n.insertAfter(this.$element);var l=this.getPosition(),c=n[0].offsetWidth,d=n[0].offsetHeight;if(r){var u=a,h=this.options.container?v(this.options.container):this.$element.parent(),p=this.getPosition(h);a="bottom"==a&&l.bottom+d>p.bottom?"top":"top"==a&&l.top-d<p.top?"bottom":"right"==a&&l.right+c>p.width?"left":"left"==a&&l.left-c<p.left?"right":a,n.removeClass(u).addClass(a)}var f=this.getCalculatedOffset(a,l,c,d);this.applyPlacement(f,a);var m=function(){var t=i.hoverState;i.$element.trigger("shown.bs."+i.type),i.hoverState=null,"out"==t&&i.leave(i)};v.support.transition&&this.$tip.hasClass("fade")?n.one("bsTransitionEnd",m).emulateTransitionEnd(g.TRANSITION_DURATION):m()}},g.prototype.applyPlacement=function(t,e){var i=this.tip(),n=i[0].offsetWidth,o=i[0].offsetHeight,a=parseInt(i.css("margin-top"),10),s=parseInt(i.css("margin-left"),10);isNaN(a)&&(a=0),isNaN(s)&&(s=0),t.top=t.top+a,t.left=t.left+s,v.offset.setOffset(i[0],v.extend({using:function(t){i.css({top:Math.round(t.top),left:Math.round(t.left)})}},t),0),i.addClass("in");var r=i[0].offsetWidth,l=i[0].offsetHeight;"top"==e&&l!=o&&(t.top=t.top+o-l);var c=this.getViewportAdjustedDelta(e,t,r,l);c.left?t.left+=c.left:t.top+=c.top;var d=/top|bottom/.test(e),u=d?2*c.left-n+r:2*c.top-o+l,h=d?"offsetWidth":"offsetHeight";i.offset(t),this.replaceArrow(u,i[0][h],d)},g.prototype.replaceArrow=function(t,e,i){this.arrow().css(i?"left":"top",50*(1-t/e)+"%").css(i?"top":"left","")},g.prototype.setContent=function(){var t=this.tip(),e=this.getTitle();t.find(".tooltip-inner")[this.options.html?"html":"text"](e),t.removeClass("fade in top bottom left right")},g.prototype.hide=function(t){function e(){"in"!=i.hoverState&&n.detach(),i.$element.removeAttr("aria-describedby").trigger("hidden.bs."+i.type),t&&t()}var i=this,n=this.tip(),o=v.Event("hide.bs."+this.type);return this.$element.trigger(o),o.isDefaultPrevented()?void 0:(n.removeClass("in"),v.support.transition&&this.$tip.hasClass("fade")?n.one("bsTransitionEnd",e).emulateTransitionEnd(g.TRANSITION_DURATION):e(),this.hoverState=null,this)},g.prototype.fixTitle=function(){var t=this.$element;!t.attr("title")&&"string"==typeof t.attr("data-original-title")||t.attr("data-original-title",t.attr("title")||"").attr("title","")},g.prototype.hasContent=function(){return this.getTitle()},g.prototype.getPosition=function(t){var e=(t=t||this.$element)[0],i="BODY"==e.tagName,n=e.getBoundingClientRect();null==n.width&&(n=v.extend({},n,{width:n.right-n.left,height:n.bottom-n.top}));var o=i?{top:0,left:0}:t.offset(),a={scroll:i?document.documentElement.scrollTop||document.body.scrollTop:t.scrollTop()},s=i?{width:v(window).width(),height:v(window).height()}:null;return v.extend({},n,a,s,o)},g.prototype.getCalculatedOffset=function(t,e,i,n){return"bottom"==t?{top:e.top+e.height,left:e.left+e.width/2-i/2}:"top"==t?{top:e.top-n,left:e.left+e.width/2-i/2}:"left"==t?{top:e.top+e.height/2-n/2,left:e.left-i}:{top:e.top+e.height/2-n/2,left:e.left+e.width}},g.prototype.getViewportAdjustedDelta=function(t,e,i,n){var o={top:0,left:0};if(!this.$viewport)return o;var a=this.options.viewport&&this.options.viewport.padding||0,s=this.getPosition(this.$viewport);if(/right|left/.test(t)){var r=e.top-a-s.scroll,l=e.top+a-s.scroll+n;r<s.top?o.top=s.top-r:l>s.top+s.height&&(o.top=s.top+s.height-l)}else{var c=e.left-a,d=e.left+a+i;c<s.left?o.left=s.left-c:d>s.width&&(o.left=s.left+s.width-d)}return o},g.prototype.getTitle=function(){var t=this.$element,e=this.options;return t.attr("data-original-title")||("function"==typeof e.title?e.title.call(t[0]):e.title)},g.prototype.getUID=function(t){for(;t+=~~(1e6*Math.random()),document.getElementById(t););return t},g.prototype.tip=function(){return this.$tip=this.$tip||v(this.options.template)},g.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},g.prototype.enable=function(){this.enabled=!0},g.prototype.disable=function(){this.enabled=!1},g.prototype.toggleEnabled=function(){this.enabled=!this.enabled},g.prototype.toggle=function(t){var e=this;t&&((e=v(t.currentTarget).data("bs."+this.type))||(e=new this.constructor(t.currentTarget,this.getDelegateOptions()),v(t.currentTarget).data("bs."+this.type,e))),e.tip().hasClass("in")?e.leave(e):e.enter(e)},g.prototype.destroy=function(){var t=this;clearTimeout(this.timeout),this.hide(function(){t.$element.off("."+t.type).removeData("bs."+t.type)})};var t=v.fn.tooltip;v.fn.tooltip=function(o){return this.each(function(){var t=v(this),e=t.data("bs.tooltip"),i="object"==typeof o&&o,n=i&&i.selector;!e&&"destroy"==o||(n?(e||t.data("bs.tooltip",e={}),e[n]||(e[n]=new g(this,i))):e||t.data("bs.tooltip",e=new g(this,i)),"string"==typeof o&&e[o]())})},v.fn.tooltip.Constructor=g,v.fn.tooltip.noConflict=function(){return v.fn.tooltip=t,this}}(jQuery),function(a){"use strict";function s(t,e){this.init("popover",t,e)}if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");s.VERSION="3.3.0",s.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),((s.prototype=a.extend({},a.fn.tooltip.Constructor.prototype)).constructor=s).prototype.getDefaults=function(){return s.DEFAULTS},s.prototype.setContent=function(){var t=this.tip(),e=this.getTitle(),i=this.getContent();t.find(".popover-title")[this.options.html?"html":"text"](e),t.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof i?"html":"append":"text"](i),t.removeClass("fade top bottom left right in"),t.find(".popover-title").html()||t.find(".popover-title").hide()},s.prototype.hasContent=function(){return this.getTitle()||this.getContent()},s.prototype.getContent=function(){var t=this.$element,e=this.options;return t.attr("data-content")||("function"==typeof e.content?e.content.call(t[0]):e.content)},s.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},s.prototype.tip=function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip};var t=a.fn.popover;a.fn.popover=function(o){return this.each(function(){var t=a(this),e=t.data("bs.popover"),i="object"==typeof o&&o,n=i&&i.selector;!e&&"destroy"==o||(n?(e||t.data("bs.popover",e={}),e[n]||(e[n]=new s(this,i))):e||t.data("bs.popover",e=new s(this,i)),"string"==typeof o&&e[o]())})},a.fn.popover.Constructor=s,a.fn.popover.noConflict=function(){return a.fn.popover=t,this}}(jQuery),function(r){"use strict";function e(i){return this.each(function(){var t=r(this),e=t.data("bs.tab");e||t.data("bs.tab",e=new s(this)),"string"==typeof i&&e[i]()})}function s(t){this.element=r(t)}s.VERSION="3.3.0",s.TRANSITION_DURATION=150,s.prototype.show=function(){var t=this.element,e=t.closest("ul:not(.dropdown-menu)"),i=t.data("target");if(i||(i=(i=t.attr("href"))&&i.replace(/.*(?=#[^\s]*$)/,"")),!t.parent("li").hasClass("active")){var n=e.find(".active:last a"),o=r.Event("hide.bs.tab",{relatedTarget:t[0]}),a=r.Event("show.bs.tab",{relatedTarget:n[0]});if(n.trigger(o),t.trigger(a),!a.isDefaultPrevented()&&!o.isDefaultPrevented()){var s=r(i);this.activate(t.closest("li"),e),this.activate(s,s.parent(),function(){n.trigger({type:"hidden.bs.tab",relatedTarget:t[0]}),t.trigger({type:"shown.bs.tab",relatedTarget:n[0]})})}}},s.prototype.activate=function(t,e,i){function n(){o.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),t.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),a?(t[0].offsetWidth,t.addClass("in")):t.removeClass("fade"),t.parent(".dropdown-menu")&&t.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),i&&i()}var o=e.find("> .active"),a=i&&r.support.transition&&(o.length&&o.hasClass("fade")||!!e.find("> .fade").length);o.length&&a?o.one("bsTransitionEnd",n).emulateTransitionEnd(s.TRANSITION_DURATION):n(),o.removeClass("in")};var t=r.fn.tab;r.fn.tab=e,r.fn.tab.Constructor=s,r.fn.tab.noConflict=function(){return r.fn.tab=t,this};function i(t){t.preventDefault(),e.call(r(this),"show")}r(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',i).on("click.bs.tab.data-api",'[data-toggle="pill"]',i)}(jQuery),function(s){"use strict";function o(t){var e,i=t.attr("data-target")||(e=t.attr("href"))&&e.replace(/.*(?=#[^\s]+$)/,"");return s(i)}function r(n){return this.each(function(){var t=s(this),e=t.data("bs.collapse"),i=s.extend({},l.DEFAULTS,t.data(),"object"==typeof n&&n);!e&&i.toggle&&"show"==n&&(i.toggle=!1),e||t.data("bs.collapse",e=new l(this,i)),"string"==typeof n&&e[n]()})}var l=function(t,e){this.$element=s(t),this.options=s.extend({},l.DEFAULTS,e),this.$trigger=s(this.options.trigger).filter('[href="#'+t.id+'"], [data-target="#'+t.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};l.VERSION="3.3.0",l.TRANSITION_DURATION=350,l.DEFAULTS={toggle:!0,trigger:'[data-toggle="collapse"]'},l.prototype.dimension=function(){return this.$element.hasClass("width")?"width":"height"},l.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var t,e=this.$parent&&this.$parent.find("> .panel").children(".in, .collapsing");if(!(e&&e.length&&((t=e.data("bs.collapse"))&&t.transitioning))){var i=s.Event("show.bs.collapse");if(this.$element.trigger(i),!i.isDefaultPrevented()){e&&e.length&&(r.call(e,"hide"),t||e.data("bs.collapse",null));var n=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[n](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var o=function(){this.$element.removeClass("collapsing").addClass("collapse in")[n](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!s.support.transition)return o.call(this);var a=s.camelCase(["scroll",n].join("-"));this.$element.one("bsTransitionEnd",s.proxy(o,this)).emulateTransitionEnd(l.TRANSITION_DURATION)[n](this.$element[0][a])}}}},l.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var t=s.Event("hide.bs.collapse");if(this.$element.trigger(t),!t.isDefaultPrevented()){var e=this.dimension();this.$element[e](this.$element[e]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var i=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return s.support.transition?void this.$element[e](0).one("bsTransitionEnd",s.proxy(i,this)).emulateTransitionEnd(l.TRANSITION_DURATION):i.call(this)}}},l.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},l.prototype.getParent=function(){return s(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(s.proxy(function(t,e){var i=s(e);this.addAriaAndCollapsedClass(o(i),i)},this)).end()},l.prototype.addAriaAndCollapsedClass=function(t,e){var i=t.hasClass("in");t.attr("aria-expanded",i),e.toggleClass("collapsed",!i).attr("aria-expanded",i)};var t=s.fn.collapse;s.fn.collapse=r,s.fn.collapse.Constructor=l,s.fn.collapse.noConflict=function(){return s.fn.collapse=t,this},s(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(t){var e=s(this);e.attr("data-target")||t.preventDefault();var i=o(e),n=i.data("bs.collapse")?"toggle":s.extend({},e.data(),{trigger:this});r.call(i,n)})}(jQuery),function(n){"use strict";n.fn.emulateTransitionEnd=function(t){var e=!1,i=this;n(this).one("bsTransitionEnd",function(){e=!0});return setTimeout(function(){e||n(i).trigger(n.support.transition.end)},t),this},n(function(){n.support.transition=function(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var i in e)if(void 0!==t.style[i])return{end:e[i]};return!1}(),n.support.transition&&(n.event.special.bsTransitionEnd={bindType:n.support.transition.end,delegateType:n.support.transition.end,handle:function(t){return n(t.target).is(this)?t.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),function(x){x.flexslider=function(p,t){var f=x(p);f.vars=x.extend({},x.flexslider.defaults,t);var e,d=f.vars.namespace,m=window.navigator&&window.navigator.msPointerEnabled&&window.MSGesture,u=("ontouchstart"in window||m||window.DocumentTouch&&document instanceof DocumentTouch)&&f.vars.touch,s="click touchend MSPointerUp",r="",v="vertical"===f.vars.direction,g=f.vars.reverse,b=0<f.vars.itemWidth,w="fade"===f.vars.animation,h=""!==f.vars.asNavFor,y={};x.data(p,"flexslider",f),y={init:function(){f.animating=!1,f.currentSlide=parseInt(f.vars.startAt?f.vars.startAt:0,10),isNaN(f.currentSlide)&&(f.currentSlide=0),f.animatingTo=f.currentSlide,f.atEnd=0===f.currentSlide||f.currentSlide===f.last,f.containerSelector=f.vars.selector.substr(0,f.vars.selector.search(" ")),f.slides=x(f.vars.selector,f),f.container=x(f.containerSelector,f),f.count=f.slides.length,f.syncExists=0<x(f.vars.sync).length,"slide"===f.vars.animation&&(f.vars.animation="swing"),f.prop=v?"top":"marginLeft",f.args={},f.manualPause=!1,f.stopped=!1,f.started=!1,f.startTimeout=null,f.transitions=!f.vars.video&&!w&&f.vars.useCSS&&function(){var t=document.createElement("div"),e=["perspectiveProperty","WebkitPerspective","MozPerspective","OPerspective","msPerspective"];for(var i in e)if(void 0!==t.style[e[i]])return f.pfx=e[i].replace("Perspective","").toLowerCase(),f.prop="-"+f.pfx+"-transform",!0;return!1}(),(f.ensureAnimationEnd="")!==f.vars.controlsContainer&&(f.controlsContainer=0<x(f.vars.controlsContainer).length&&x(f.vars.controlsContainer)),""!==f.vars.manualControls&&(f.manualControls=0<x(f.vars.manualControls).length&&x(f.vars.manualControls)),f.vars.randomize&&(f.slides.sort(function(){return Math.round(Math.random())-.5}),f.container.empty().append(f.slides)),f.doMath(),f.setup("init"),f.vars.controlNav&&y.controlNav.setup(),f.vars.directionNav&&y.directionNav.setup(),f.vars.keyboard&&(1===x(f.containerSelector).length||f.vars.multipleKeyboard)&&x(document).bind("keyup",function(t){var e=t.keyCode;if(!f.animating&&(39===e||37===e)){var i=39===e?f.getTarget("next"):37===e&&f.getTarget("prev");f.flexAnimate(i,f.vars.pauseOnAction)}}),f.vars.mousewheel&&f.bind("mousewheel",function(t,e){t.preventDefault();var i=e<0?f.getTarget("next"):f.getTarget("prev");f.flexAnimate(i,f.vars.pauseOnAction)}),f.vars.pausePlay&&y.pausePlay.setup(),f.vars.slideshow&&f.vars.pauseInvisible&&y.pauseInvisible.init(),f.vars.slideshow&&(f.vars.pauseOnHover&&f.hover(function(){f.manualPlay||f.manualPause||f.pause()},function(){f.manualPause||f.manualPlay||f.stopped||f.play()}),f.vars.pauseInvisible&&y.pauseInvisible.isHidden()||(0<f.vars.initDelay?f.startTimeout=setTimeout(f.play,f.vars.initDelay):f.play())),h&&y.asNav.setup(),u&&f.vars.touch&&y.touch(),(!w||w&&f.vars.smoothHeight)&&x(window).bind("resize orientationchange focus",y.resize),f.find("img").attr("draggable","false"),setTimeout(function(){f.vars.start(f)},200)},asNav:{setup:function(){f.asNav=!0,f.animatingTo=Math.floor(f.currentSlide/f.move),f.currentItem=f.currentSlide,f.slides.removeClass(d+"active-slide").eq(f.currentItem).addClass(d+"active-slide"),m?(p._slider=f).slides.each(function(){var t=this;t._gesture=new MSGesture,(t._gesture.target=t).addEventListener("MSPointerDown",function(t){t.preventDefault(),t.currentTarget._gesture&&t.currentTarget._gesture.addPointer(t.pointerId)},!1),t.addEventListener("MSGestureTap",function(t){t.preventDefault();var e=x(this),i=e.index();x(f.vars.asNavFor).data("flexslider").animating||e.hasClass("active")||(f.direction=f.currentItem<i?"next":"prev",f.flexAnimate(i,f.vars.pauseOnAction,!1,!0,!0))})}):f.slides.on(s,function(t){t.preventDefault();var e=x(this),i=e.index();e.offset().left-x(f).scrollLeft()<=0&&e.hasClass(d+"active-slide")?f.flexAnimate(f.getTarget("prev"),!0):x(f.vars.asNavFor).data("flexslider").animating||e.hasClass(d+"active-slide")||(f.direction=f.currentItem<i?"next":"prev",f.flexAnimate(i,f.vars.pauseOnAction,!1,!0,!0))})}},controlNav:{setup:function(){f.manualControls?y.controlNav.setupManual():y.controlNav.setupPaging()},setupPaging:function(){var t,e,i="thumbnails"===f.vars.controlNav?"control-thumbs":"control-paging",n=1;if(f.controlNavScaffold=x('<ol class="'+d+"control-nav "+d+i+'"></ol>'),1<f.pagingCount)for(var o=0;o<f.pagingCount;o++){if(e=f.slides.eq(o),t="thumbnails"===f.vars.controlNav?'<img src="'+e.attr("data-thumb")+'"/>':"<a>"+n+"</a>","thumbnails"===f.vars.controlNav&&!0===f.vars.thumbCaptions){var a=e.attr("data-thumbcaption");""!=a&&null!=a&&(t+='<span class="'+d+'caption">'+a+"</span>")}f.controlNavScaffold.append("<li>"+t+"</li>"),n++}f.controlsContainer?x(f.controlsContainer).append(f.controlNavScaffold):f.append(f.controlNavScaffold),y.controlNav.set(),y.controlNav.active(),f.controlNavScaffold.delegate("a, img",s,function(t){if(t.preventDefault(),""===r||r===t.type){var e=x(this),i=f.controlNav.index(e);e.hasClass(d+"active")||(f.direction=i>f.currentSlide?"next":"prev",f.flexAnimate(i,f.vars.pauseOnAction))}""===r&&(r=t.type),y.setToClearWatchedEvent()})},setupManual:function(){f.controlNav=f.manualControls,y.controlNav.active(),f.controlNav.bind(s,function(t){if(t.preventDefault(),""===r||r===t.type){var e=x(this),i=f.controlNav.index(e);e.hasClass(d+"active")||(f.direction=i>f.currentSlide?"next":"prev",f.flexAnimate(i,f.vars.pauseOnAction))}""===r&&(r=t.type),y.setToClearWatchedEvent()})},set:function(){var t="thumbnails"===f.vars.controlNav?"img":"a";f.controlNav=x("."+d+"control-nav li "+t,f.controlsContainer?f.controlsContainer:f)},active:function(){f.controlNav.removeClass(d+"active").eq(f.animatingTo).addClass(d+"active")},update:function(t,e){1<f.pagingCount&&"add"===t?f.controlNavScaffold.append(x("<li><a>"+f.count+"</a></li>")):1===f.pagingCount?f.controlNavScaffold.find("li").remove():f.controlNav.eq(e).closest("li").remove(),y.controlNav.set(),1<f.pagingCount&&f.pagingCount!==f.controlNav.length?f.update(e,t):y.controlNav.active()}},directionNav:{setup:function(){var t=x('<ul class="'+d+'direction-nav"><li><a class="'+d+'prev" href="#">'+f.vars.prevText+'</a></li><li><a class="'+d+'next" href="#">'+f.vars.nextText+"</a></li></ul>");f.controlsContainer?(x(f.controlsContainer).append(t),f.directionNav=x("."+d+"direction-nav li a",f.controlsContainer)):(f.append(t),f.directionNav=x("."+d+"direction-nav li a",f)),y.directionNav.update(),f.directionNav.bind(s,function(t){var e;t.preventDefault(),""!==r&&r!==t.type||(e=x(this).hasClass(d+"next")?f.getTarget("next"):f.getTarget("prev"),f.flexAnimate(e,f.vars.pauseOnAction)),""===r&&(r=t.type),y.setToClearWatchedEvent()})},update:function(){var t=d+"disabled";1===f.pagingCount?f.directionNav.addClass(t).attr("tabindex","-1"):f.vars.animationLoop?f.directionNav.removeClass(t).removeAttr("tabindex"):0===f.animatingTo?f.directionNav.removeClass(t).filter("."+d+"prev").addClass(t).attr("tabindex","-1"):f.animatingTo===f.last?f.directionNav.removeClass(t).filter("."+d+"next").addClass(t).attr("tabindex","-1"):f.directionNav.removeClass(t).removeAttr("tabindex")}},pausePlay:{setup:function(){var t=x('<div class="'+d+'pauseplay"><a></a></div>');f.controlsContainer?(f.controlsContainer.append(t),f.pausePlay=x("."+d+"pauseplay a",f.controlsContainer)):(f.append(t),f.pausePlay=x("."+d+"pauseplay a",f)),y.pausePlay.update(f.vars.slideshow?d+"pause":d+"play"),f.pausePlay.bind(s,function(t){t.preventDefault(),""!==r&&r!==t.type||(x(this).hasClass(d+"pause")?(f.manualPause=!0,f.manualPlay=!1,f.pause()):(f.manualPause=!1,f.manualPlay=!0,f.play())),""===r&&(r=t.type),y.setToClearWatchedEvent()})},update:function(t){"play"===t?f.pausePlay.removeClass(d+"pause").addClass(d+"play").html(f.vars.playText):f.pausePlay.removeClass(d+"play").addClass(d+"pause").html(f.vars.pauseText)}},touch:function(){function i(t){e=t.touches[0].pageX,u=t.touches[0].pageY,l=v?o-u:o-e;(!(d=v?Math.abs(l)<Math.abs(e-a):Math.abs(l)<Math.abs(u-a))||500<Number(new Date)-c)&&(t.preventDefault(),!w&&f.transitions&&(f.vars.animationLoop||(l/=0===f.currentSlide&&l<0||f.currentSlide===f.last&&0<l?Math.abs(l)/r+2:1),f.setProps(s+l,"setTouch")))}function n(){if(p.removeEventListener("touchmove",i,!1),f.animatingTo===f.currentSlide&&!d&&null!==l){var t=g?-l:l,e=0<t?f.getTarget("next"):f.getTarget("prev");f.canAdvance(e)&&(Number(new Date)-c<550&&50<Math.abs(t)||Math.abs(t)>r/2)?f.flexAnimate(e,f.vars.pauseOnAction):w||f.flexAnimate(f.currentSlide,f.vars.pauseOnAction,!0)}p.removeEventListener("touchend",n,!1),s=l=a=o=null}var o,a,s,r,l,c,d=!1,e=0,u=0,h=0;m?(p.style.msTouchAction="none",p._gesture=new MSGesture,(p._gesture.target=p).addEventListener("MSPointerDown",function(t){t.stopPropagation(),f.animating?t.preventDefault():(f.pause(),p._gesture.addPointer(t.pointerId),h=0,r=v?f.h:f.w,c=Number(new Date),s=b&&g&&f.animatingTo===f.last?0:b&&g?f.limit-(f.itemW+f.vars.itemMargin)*f.move*f.animatingTo:b&&f.currentSlide===f.last?f.limit:b?(f.itemW+f.vars.itemMargin)*f.move*f.currentSlide:g?(f.last-f.currentSlide+f.cloneOffset)*r:(f.currentSlide+f.cloneOffset)*r)},!1),p._slider=f,p.addEventListener("MSGestureChange",function(t){t.stopPropagation();var e=t.target._slider;if(e){var i=-t.translationX,n=-t.translationY;return l=h+=v?n:i,d=v?Math.abs(h)<Math.abs(-i):Math.abs(h)<Math.abs(-n),t.detail===t.MSGESTURE_FLAG_INERTIA?void setImmediate(function(){p._gesture.stop()}):void((!d||500<Number(new Date)-c)&&(t.preventDefault(),!w&&e.transitions&&(e.vars.animationLoop||(l=h/(0===e.currentSlide&&h<0||e.currentSlide===e.last&&0<h?Math.abs(h)/r+2:1)),e.setProps(s+l,"setTouch"))))}},!1),p.addEventListener("MSGestureEnd",function(t){t.stopPropagation();var e=t.target._slider;if(e){if(e.animatingTo===e.currentSlide&&!d&&null!==l){var i=g?-l:l,n=0<i?e.getTarget("next"):e.getTarget("prev");e.canAdvance(n)&&(Number(new Date)-c<550&&50<Math.abs(i)||Math.abs(i)>r/2)?e.flexAnimate(n,e.vars.pauseOnAction):w||e.flexAnimate(e.currentSlide,e.vars.pauseOnAction,!0)}s=l=a=o=null,h=0}},!1)):p.addEventListener("touchstart",function(t){f.animating?t.preventDefault():!window.navigator.msPointerEnabled&&1!==t.touches.length||(f.pause(),r=v?f.h:f.w,c=Number(new Date),e=t.touches[0].pageX,u=t.touches[0].pageY,s=b&&g&&f.animatingTo===f.last?0:b&&g?f.limit-(f.itemW+f.vars.itemMargin)*f.move*f.animatingTo:b&&f.currentSlide===f.last?f.limit:b?(f.itemW+f.vars.itemMargin)*f.move*f.currentSlide:g?(f.last-f.currentSlide+f.cloneOffset)*r:(f.currentSlide+f.cloneOffset)*r,o=v?u:e,a=v?e:u,p.addEventListener("touchmove",i,!1),p.addEventListener("touchend",n,!1))},!1)},resize:function(){!f.animating&&f.is(":visible")&&(b||f.doMath(),w?y.smoothHeight():b?(f.slides.width(f.computedW),f.update(f.pagingCount),f.setProps()):v?(f.viewport.height(f.h),f.setProps(f.h,"setTotal")):(f.vars.smoothHeight&&y.smoothHeight(),f.newSlides.width(f.computedW),f.setProps(f.computedW,"setTotal")))},smoothHeight:function(t){if(!v||w){var e=w?f:f.viewport;t?e.animate({height:f.slides.eq(f.animatingTo).height()},t):e.height(f.slides.eq(f.animatingTo).height())}},sync:function(t){var e=x(f.vars.sync).data("flexslider"),i=f.animatingTo;switch(t){case"animate":e.flexAnimate(i,f.vars.pauseOnAction,!1,!0);break;case"play":e.playing||e.asNav||e.play();break;case"pause":e.pause()}},uniqueID:function(t){return t.find("[id]").each(function(){var t=x(this);t.attr("id",t.attr("id")+"_clone")}),t},pauseInvisible:{visProp:null,init:function(){var t=["webkit","moz","ms","o"];if("hidden"in document)return"hidden";for(var e=0;e<t.length;e++)t[e]+"Hidden"in document&&(y.pauseInvisible.visProp=t[e]+"Hidden");if(y.pauseInvisible.visProp){var i=y.pauseInvisible.visProp.replace(/[H|h]idden/,"")+"visibilitychange";document.addEventListener(i,function(){y.pauseInvisible.isHidden()?f.startTimeout?clearTimeout(f.startTimeout):f.pause():!f.started&&0<f.vars.initDelay?setTimeout(f.play,f.vars.initDelay):f.play()})}},isHidden:function(){return document[y.pauseInvisible.visProp]||!1}},setToClearWatchedEvent:function(){clearTimeout(e),e=setTimeout(function(){r=""},3e3)}},f.flexAnimate=function(t,e,i,n,o){if(f.vars.animationLoop||t===f.currentSlide||(f.direction=t>f.currentSlide?"next":"prev"),h&&1===f.pagingCount&&(f.direction=f.currentItem<t?"next":"prev"),!f.animating&&(f.canAdvance(t,o)||i)&&f.is(":visible")){if(h&&n){var a=x(f.vars.asNavFor).data("flexslider");if(f.atEnd=0===t||t===f.count-1,a.flexAnimate(t,!0,!1,!0,o),f.direction=f.currentItem<t?"next":"prev",a.direction=f.direction,Math.ceil((t+1)/f.visible)-1===f.currentSlide||0===t)return f.currentItem=t,f.slides.removeClass(d+"active-slide").eq(t).addClass(d+"active-slide"),!1;f.currentItem=t,f.slides.removeClass(d+"active-slide").eq(t).addClass(d+"active-slide"),t=Math.floor(t/f.visible)}if(f.animating=!0,f.animatingTo=t,e&&f.pause(),f.vars.before(f),f.syncExists&&!o&&y.sync("animate"),f.vars.controlNav&&y.controlNav.active(),b||f.slides.removeClass(d+"active-slide").eq(t).addClass(d+"active-slide"),f.atEnd=0===t||t===f.last,f.vars.directionNav&&y.directionNav.update(),t===f.last&&(f.vars.end(f),f.vars.animationLoop||f.pause()),w)u?(f.slides.eq(f.currentSlide).css({opacity:0,zIndex:1}),f.slides.eq(t).css({opacity:1,zIndex:2}),f.wrapup(c)):(f.slides.eq(f.currentSlide).css({zIndex:1}).animate({opacity:0},f.vars.animationSpeed,f.vars.easing),f.slides.eq(t).css({zIndex:2}).animate({opacity:1},f.vars.animationSpeed,f.vars.easing,f.wrapup));else{var s,r,l,c=v?f.slides.filter(":first").height():f.computedW;r=b?(s=f.vars.itemMargin,(l=(f.itemW+s)*f.move*f.animatingTo)>f.limit&&1!==f.visible?f.limit:l):0===f.currentSlide&&t===f.count-1&&f.vars.animationLoop&&"next"!==f.direction?g?(f.count+f.cloneOffset)*c:0:f.currentSlide===f.last&&0===t&&f.vars.animationLoop&&"prev"!==f.direction?g?0:(f.count+1)*c:g?(f.count-1-t+f.cloneOffset)*c:(t+f.cloneOffset)*c,f.setProps(r,"",f.vars.animationSpeed),f.transitions?(f.vars.animationLoop&&f.atEnd||(f.animating=!1,f.currentSlide=f.animatingTo),f.container.unbind("webkitTransitionEnd transitionend"),f.container.bind("webkitTransitionEnd transitionend",function(){clearTimeout(f.ensureAnimationEnd),f.wrapup(c)}),clearTimeout(f.ensureAnimationEnd),f.ensureAnimationEnd=setTimeout(function(){f.wrapup(c)},f.vars.animationSpeed+100)):f.container.animate(f.args,f.vars.animationSpeed,f.vars.easing,function(){f.wrapup(c)})}f.vars.smoothHeight&&y.smoothHeight(f.vars.animationSpeed)}},f.wrapup=function(t){w||b||(0===f.currentSlide&&f.animatingTo===f.last&&f.vars.animationLoop?f.setProps(t,"jumpEnd"):f.currentSlide===f.last&&0===f.animatingTo&&f.vars.animationLoop&&f.setProps(t,"jumpStart")),f.animating=!1,f.currentSlide=f.animatingTo,f.vars.after(f)},f.animateSlides=function(){f.animating||f.flexAnimate(f.getTarget("next"))},f.pause=function(){clearInterval(f.animatedSlides),f.animatedSlides=null,f.playing=!1,f.vars.pausePlay&&y.pausePlay.update("play"),f.syncExists&&y.sync("pause")},f.play=function(){f.playing&&clearInterval(f.animatedSlides),f.animatedSlides=f.animatedSlides||setInterval(f.animateSlides,f.vars.slideshowSpeed),f.started=f.playing=!0,f.vars.pausePlay&&y.pausePlay.update("pause"),f.syncExists&&y.sync("play")},f.stop=function(){f.pause(),f.stopped=!0},f.canAdvance=function(t,e){var i=h?f.pagingCount-1:f.last;return!!e||(h&&f.currentItem===f.count-1&&0===t&&"prev"===f.direction||(!h||0!==f.currentItem||t!==f.pagingCount-1||"next"===f.direction)&&((t!==f.currentSlide||h)&&(!!f.vars.animationLoop||(!f.atEnd||0!==f.currentSlide||t!==i||"next"===f.direction)&&(!f.atEnd||f.currentSlide!==i||0!==t||"next"!==f.direction))))},f.getTarget=function(t){return"next"===(f.direction=t)?f.currentSlide===f.last?0:f.currentSlide+1:0===f.currentSlide?f.last:f.currentSlide-1},f.setProps=function(t,e,i){var n,o=(n=t||(f.itemW+f.vars.itemMargin)*f.move*f.animatingTo,-1*function(){if(b)return"setTouch"===e?t:g&&f.animatingTo===f.last?0:g?f.limit-(f.itemW+f.vars.itemMargin)*f.move*f.animatingTo:f.animatingTo===f.last?f.limit:n;switch(e){case"setTotal":return g?(f.count-1-f.currentSlide+f.cloneOffset)*t:(f.currentSlide+f.cloneOffset)*t;case"setTouch":return t;case"jumpEnd":return g?t:f.count*t;case"jumpStart":return g?f.count*t:t;default:return t}}()+"px");f.transitions&&(o=v?"translate3d(0,"+o+",0)":"translate3d("+o+",0,0)",i=void 0!==i?i/1e3+"s":"0s",f.container.css("-"+f.pfx+"-transition-duration",i),f.container.css("transition-duration",i)),f.args[f.prop]=o,!f.transitions&&void 0!==i||f.container.css(f.args),f.container.css("transform",o)},f.setup=function(t){var e,i;w?(f.slides.css({width:"100%",float:"left",marginRight:"-100%",position:"relative"}),"init"===t&&(u?f.slides.css({opacity:0,display:"block",webkitTransition:"opacity "+f.vars.animationSpeed/1e3+"s ease",zIndex:1}).eq(f.currentSlide).css({opacity:1,zIndex:2}):f.slides.css({opacity:0,display:"block",zIndex:1}).eq(f.currentSlide).css({zIndex:2}).animate({opacity:1},f.vars.animationSpeed,f.vars.easing)),f.vars.smoothHeight&&y.smoothHeight()):("init"===t&&(f.viewport=x('<div class="'+d+'viewport"></div>').css({overflow:"hidden",position:"relative"}).appendTo(f).append(f.container),f.cloneCount=0,f.cloneOffset=0,g&&(i=x.makeArray(f.slides).reverse(),f.slides=x(i),f.container.empty().append(f.slides))),f.vars.animationLoop&&!b&&(f.cloneCount=2,f.cloneOffset=1,"init"!==t&&f.container.find(".clone").remove(),y.uniqueID(f.slides.first().clone().addClass("clone").attr("aria-hidden","true")).appendTo(f.container),y.uniqueID(f.slides.last().clone().addClass("clone").attr("aria-hidden","true")).prependTo(f.container)),f.newSlides=x(f.vars.selector,f),e=g?f.count-1-f.currentSlide+f.cloneOffset:f.currentSlide+f.cloneOffset,v&&!b?(f.container.height(200*(f.count+f.cloneCount)+"%").css("position","absolute").width("100%"),setTimeout(function(){f.newSlides.css({display:"block"}),f.doMath(),f.viewport.height(f.h),f.setProps(e*f.h,"init")},"init"===t?100:0)):(f.container.width(200*(f.count+f.cloneCount)+"%"),f.setProps(e*f.computedW,"init"),setTimeout(function(){f.doMath(),f.newSlides.css({width:f.computedW,float:"left",display:"block"}),f.vars.smoothHeight&&y.smoothHeight()},"init"===t?100:0)));b||f.slides.removeClass(d+"active-slide").eq(f.currentSlide).addClass(d+"active-slide"),f.vars.init(f)},f.doMath=function(){var t=f.slides.first(),e=f.vars.itemMargin,i=f.vars.minItems,n=f.vars.maxItems;f.w=void 0===f.viewport?f.width():f.viewport.width(),f.h=t.height(),f.boxPadding=t.outerWidth()-t.width(),b?(f.itemT=f.vars.itemWidth+e,f.minW=i?i*f.itemT:f.w,f.maxW=n?n*f.itemT-e:f.w,f.itemW=f.minW>f.w?(f.w-e*(i-1))/i:f.maxW<f.w?(f.w-e*(n-1))/n:f.vars.itemWidth>f.w?f.w:f.vars.itemWidth,f.visible=Math.floor(f.w/f.itemW),f.move=0<f.vars.move&&f.vars.move<f.visible?f.vars.move:f.visible,f.pagingCount=Math.ceil((f.count-f.visible)/f.move+1),f.last=f.pagingCount-1,f.limit=1===f.pagingCount?0:f.vars.itemWidth>f.w?f.itemW*(f.count-1)+e*(f.count-1):(f.itemW+e)*f.count-f.w-e):(f.itemW=f.w,f.pagingCount=f.count,f.last=f.count-1),f.computedW=f.itemW-f.boxPadding},f.update=function(t,e){f.doMath(),b||(t<f.currentSlide?f.currentSlide+=1:t<=f.currentSlide&&0!==t&&--f.currentSlide,f.animatingTo=f.currentSlide),f.vars.controlNav&&!f.manualControls&&("add"===e&&!b||f.pagingCount>f.controlNav.length?y.controlNav.update("add"):("remove"===e&&!b||f.pagingCount<f.controlNav.length)&&(b&&f.currentSlide>f.last&&(--f.currentSlide,--f.animatingTo),y.controlNav.update("remove",f.last))),f.vars.directionNav&&y.directionNav.update()},f.addSlide=function(t,e){var i=x(t);f.count+=1,f.last=f.count-1,v&&g?void 0!==e?f.slides.eq(f.count-e).after(i):f.container.prepend(i):void 0!==e?f.slides.eq(e).before(i):f.container.append(i),f.update(e,"add"),f.slides=x(f.vars.selector+":not(.clone)",f),f.setup(),f.vars.added(f)},f.removeSlide=function(t){var e=isNaN(t)?f.slides.index(x(t)):t;--f.count,f.last=f.count-1,isNaN(t)?x(t,f.slides).remove():v&&g?f.slides.eq(f.last).remove():f.slides.eq(t).remove(),f.doMath(),f.update(e,"remove"),f.slides=x(f.vars.selector+":not(.clone)",f),f.setup(),f.vars.removed(f)},y.init()},x(window).blur(function(){focused=!1}).focus(function(){focused=!0}),x.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(){},init:function(){}},x.fn.flexslider=function(n){if(void 0===n&&(n={}),"object"==typeof n)return this.each(function(){var t=x(this),e=n.selector?n.selector:".slides > li",i=t.find(e);1===i.length&&!0===n.allowOneSlide||0===i.length?(i.fadeIn(400),n.start&&n.start(t)):void 0===t.data("flexslider")&&new x.flexslider(this,n)});var t=x(this).data("flexslider");switch(n){case"play":t.play();break;case"pause":t.pause();break;case"stop":t.stop();break;case"next":t.flexAnimate(t.getTarget("next"),!0);break;case"prev":case"previous":t.flexAnimate(t.getTarget("prev"),!0);break;default:"number"==typeof n&&t.flexAnimate(n,!0)}}}(jQuery),function(o){"use strict";o.fn.fitVids=function(t){var i={customSelector:null,ignore:null};if(!document.getElementById("fit-vids-style")){var e=document.head||document.getElementsByTagName("head")[0],n=document.createElement("div");n.innerHTML='<p>x</p><style id="fit-vids-style">.fluid-width-video-wrapper{width:100%;position:relative;padding:0;}.fluid-width-video-wrapper iframe,.fluid-width-video-wrapper object,.fluid-width-video-wrapper embed {position:absolute;top:0;left:0;width:100%;height:100%;}</style>',e.appendChild(n.childNodes[1])}return t&&o.extend(i,t),this.each(function(){var t=['iframe[src*="player.vimeo.com"]','iframe[src*="youtube.com"]','iframe[src*="youtube-nocookie.com"]','iframe[src*="kickstarter.com"][src*="video.html"]',"object","embed"];i.customSelector&&t.push(i.customSelector);var n=".fitvidsignore";i.ignore&&(n=n+", "+i.ignore);var e=o(this).find(t.join(","));(e=(e=e.not("object object")).not(n)).each(function(){var t=o(this);if(!(0<t.parents(n).length||"embed"===this.tagName.toLowerCase()&&t.parent("object").length||t.parent(".fluid-width-video-wrapper").length)){1==(t.css("width")&&t.css("width").indexOf("%")||t.css("height")&&t.css("height").indexOf("%"))&&t.removeAttr("width").removeAttr("height"),t.css("height")||t.css("width")||!isNaN(t.attr("height"))&&!isNaN(t.attr("width"))||(t.attr("height",9),t.attr("width",16));var e=("object"===this.tagName.toLowerCase()||t.attr("height")&&!isNaN(parseInt(t.attr("height"),10))?parseInt(t.attr("height"),10):t.height())/(isNaN(parseInt(t.attr("width"),10))?t.width():parseInt(t.attr("width"),10));if(!t.attr("name")){var i="fitvid"+o.fn.fitVids._count;t.attr("name",i),o.fn.fitVids._count++}t.wrap('<div class="fluid-width-video-wrapper"></div>').parent(".fluid-width-video-wrapper").css("padding-top",100*e+"%"),t.removeAttr("height").removeAttr("width")}})})},o.fn.fitVids._count=0}(window.jQuery||window.Zepto),function(d){function e(){var t,e,i,o=d(),n=0;if(d.each(p,function(t,e){var i=e.data.selector,n=e.$element;o=o.add(i?n.find(i):n)}),t=o.length)for(u=u||(i=e=void 0,(i={height:m.innerHeight,width:m.innerWidth}).height||!(e=f.compatMode)&&d.support.boxModel||(i={height:(e="CSS1Compat"===e?v:f.body).clientHeight,width:e.clientWidth}),i),h=h||{top:m.pageYOffset||v.scrollTop||f.body.scrollTop,left:m.pageXOffset||v.scrollLeft||f.body.scrollLeft};n<t;n++)if(d.contains(v,o[n])){var a=d(o[n]),s=a.height(),r=a.width(),l=a.offset(),c=a.data("inview");if(!h||!u)break;l.top+s>h.top&&l.top<h.top+u.height&&l.left+r>h.left&&l.left<h.left+u.width?(l=(r=h.left>l.left?"right":h.left+u.width<l.left+r?"left":"both")+"-"+(s=h.top>l.top?"bottom":h.top+u.height<l.top+s?"top":"both"),c&&c===l||a.data("inview",l).trigger("inview",[!0,r,s])):c&&a.data("inview",!1).trigger("inview",[!1])}}var u,h,i,p={},f=document,m=window,v=f.documentElement,n=d.expando;d.event.special.inview={add:function(t){p[t.guid+"-"+this[n]]={data:t,$element:d(this)},i||d.isEmptyObject(p)||(i=setInterval(e,250))},remove:function(t){try{delete p[t.guid+"-"+this[n]]}catch(t){}d.isEmptyObject(p)&&(clearInterval(i),i=null)}},d(m).bind("scroll resize",function(){u=h=null}),!v.addEventListener&&v.attachEvent&&v.attachEvent("onfocusin",function(){h=null})}(jQuery),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.OnScreen=e()}(this,function(){"use strict";function a(t){var e=arguments.length<=1||void 0===arguments[1]?{tolerance:0,container:window}:arguments[1];if(!t)return!1;"string"==typeof t&&(t=document.querySelector(t)),"string"==typeof e&&(e={container:document.querySelector(e)});var i=void 0,n=t.getBoundingClientRect();if(e.container===window)i=0<n.bottom-e.tolerance&&0<n.right-e.tolerance&&n.left+e.tolerance<(window.innerWidth||document.documentElement.clientWidth)&&n.top+e.tolerance<(window.innerHeight||document.documentElement.clientHeight);else{var o=e.container.getBoundingClientRect();i=t.offsetTop+t.clientHeight-e.tolerance>e.container.scrollTop&&t.offsetLeft+t.clientWidth-e.tolerance>e.container.scrollLeft&&t.offsetLeft+e.tolerance<o.width+e.container.scrollLeft&&t.offsetTop+e.tolerance<o.height+e.container.scrollTop}return i}function t(){var t,e,i,n,o=this,a=arguments.length<=0||void 0===arguments[0]?{tolerance:0,debounce:100,container:window}:arguments[0];this.options={},this.trackedElements={},Object.defineProperties(this.options,{container:{configurable:!1,enumerable:!1,get:function(){var t=void 0;return"string"==typeof a.container?t=document.querySelector(a.container):a.container instanceof HTMLElement&&(t=a.container),t||window},set:function(t){a.container=t}},debounce:{get:function(){return parseInt(a.debounce,10)||100},set:function(t){a.debounce=t}},tolerance:{get:function(){return parseInt(a.tolerance,10)||0},set:function(t){a.tolerance=t}}}),Object.defineProperty(this,"_scroll",{enumerable:!1,configurable:!1,writable:!1,value:this._debouncedScroll.call(this)}),t=document.querySelector("body"),e=function(){Object.keys(o.trackedElements).forEach(function(t){o.on("enter",t),o.on("leave",t)})},i=window.MutationObserver||window.WebKitMutationObserver,n=window.addEventListener,i?new i(function(t){(t[0].addedNodes.length||t[0].removedNodes.length)&&e()}).observe(t,{childList:!0,subtree:!0}):n&&(t.addEventListener("DOMNodeInserted",e,!1),t.addEventListener("DOMNodeRemoved",e,!1)),this.attach()}return Object.defineProperties(t.prototype,{_debouncedScroll:{configurable:!1,writable:!1,enumerable:!1,value:function(){var t=this,e=void 0;return function(){clearTimeout(e),e=setTimeout(function(){!function(t,e){var i=arguments.length<=0||void 0===t?{}:t,n=arguments.length<=1||void 0===e?{tolerance:0}:e,o=Object.keys(i);o.length&&o.forEach(function(e){i[e].nodes.forEach(function(t){a(t.node,n)?(t.wasVisible=t.isVisible,t.isVisible=!0):(t.wasVisible=t.isVisible,t.isVisible=!1),!0===t.isVisible&&!1===t.wasVisible&&"function"==typeof i[e].enter&&i[e].enter(t.node),!1===t.isVisible&&!0===t.wasVisible&&"function"==typeof i[e].leave&&i[e].leave(t.node)})})}(t.trackedElements,t.options)},t.options.throttle)}}},attach:{configurable:!1,writable:!1,enumerable:!1,value:function(){var t=this.options.container;t instanceof HTMLElement&&"static"===window.getComputedStyle(t).position&&(t.style.position="relative"),t.addEventListener("scroll",this._scroll),window.addEventListener("resize",this._scroll),this._scroll(),this.attached=!0}},destroy:{configurable:!1,writable:!1,enumerable:!1,value:function(){this.options.container.removeEventListener("scroll",this._scroll),window.removeEventListener("resize",this._scroll),this.attached=!1}},off:{configurable:!1,writable:!1,enumerable:!1,value:function(t,e){this.trackedElements.hasOwnProperty(e)&&this.trackedElements[e][t]&&delete this.trackedElements[e][t],this.trackedElements[e].enter||this.trackedElements[e].leave||delete this.trackedElements[e]}},on:{configurable:!1,writable:!1,enumerable:!1,value:function(t,e,i){if(!t)throw new Error("No event given. Choose either enter or leave");if(!e)throw new Error("No selector to track");if(["enter","leave"].indexOf(t)<0)throw new Error(t+" event is not supported");this.trackedElements.hasOwnProperty(e)||(this.trackedElements[e]={}),this.trackedElements[e].nodes=[];for(var n=0;n<document.querySelectorAll(e).length;n++){var o={isVisible:!1,wasVisible:!1,node:document.querySelectorAll(e)[n]};this.trackedElements[e].nodes.push(o)}"function"==typeof i&&(this.trackedElements[e][t]=i)}}}),t.check=a,t}),function(t,e,o){var i,n,a="[object OperaMini]"==Object.prototype.toString.call(t.operamini),s="placeholder"in e.createElement("input")&&!a,r="placeholder"in e.createElement("textarea")&&!a,l=o.fn,c=o.valHooks,d=o.propHooks;function u(t,e){var i=this,n=o(i);if(i.value==n.attr("placeholder")&&n.hasClass("placeholder"))if(n.data("placeholder-password")){if(n=n.hide().next().show().attr("id",n.removeAttr("id").data("placeholder-id")),!0===t)return n[0].value=e;n.focus()}else i.value="",n.removeClass("placeholder"),i==p()&&i.select()}function h(){var e,t=o(this),i=this.id;if(""==this.value){if("password"==this.type){if(!t.data("placeholder-textinput")){try{e=t.clone().attr({type:"text"})}catch(t){e=o("<input>").attr(o.extend(function(t){var i={},n=/^jQuery\d+$/;return o.each(t.attributes,function(t,e){e.specified&&!n.test(e.name)&&(i[e.name]=e.value)}),i}(this),{type:"text"}))}e.removeAttr("name").data({"placeholder-password":t,"placeholder-id":i}).bind("focus.placeholder",u),t.data({"placeholder-textinput":e,"placeholder-id":i}).before(e)}t=t.removeAttr("id").hide().prev().attr("id",i).show()}t.addClass("placeholder"),t[0].value=t.attr("placeholder")}else t.removeClass("placeholder")}function p(){try{return e.activeElement}catch(t){}}s&&r?(n=l.placeholder=function(){return this}).input=n.textarea=!0:((n=l.placeholder=function(){return this.filter((s?"textarea":":input")+"[placeholder]").not(".placeholder").bind({"focus.placeholder":u,"blur.placeholder":h}).data("placeholder-enabled",!0).trigger("blur.placeholder"),this}).input=s,n.textarea=r,i={get:function(t){var e=o(t),i=e.data("placeholder-password");return i?i[0].value:e.data("placeholder-enabled")&&e.hasClass("placeholder")?"":t.value},set:function(t,e){var i=o(t),n=i.data("placeholder-password");return n?n[0].value=e:i.data("placeholder-enabled")?(""==e?(t.value=e,t!=p()&&h.call(t)):i.hasClass("placeholder")&&u.call(t,!0,e)||(t.value=e),i):t.value=e}},s||(c.input=i,d.value=i),r||(c.textarea=i,d.value=i),o(function(){o(e).delegate("form","submit.placeholder",function(){var t=o(".placeholder",this).each(u);setTimeout(function(){t.each(h)},10)})}),o(t).bind("beforeunload.placeholder",function(){o(".placeholder").each(function(){this.value=""})}))}(this,document,jQuery),blockFotoramaData=!0,fotoramaVersion="4.6.2",function(a,we,ye,xe,l){"use strict";function Ce(){}function Te(t,e,i){return Math.max(isNaN(e)?-1/0:e,Math.min(isNaN(i)?1/0:i,t))}function Se(t){var e={};return Fi?e.transform="translate3d("+t+"px,0,0)":e.left=t,e}function ke(t){return{"transition-duration":t+"ms"}}function n(t,e){return isNaN(t)?e:t}function Ee(t,e){return n(+String(t).replace(e||"px",""))}function $e(t,e){return n((/%$/.test(i=t)?Ee(i,"%"):l)/100*e,Ee(t));var i}function _e(t){return(!isNaN(Ee(t))||!isNaN(Ee(t,"%")))&&t}function Me(t,e,i,n){return(t-(n||0))*(e+(i||0))}function s(t,e,i,n){var o,a=t.data();a&&(a.onEndFn=function(){o||(o=!0,clearTimeout(a.tT),i())},a.tProp=e,clearTimeout(a.tT),a.tT=setTimeout(function(){a.onEndFn()},1.5*n),function(t){var e=t.data();if(!e.tEnd){Ue(t[0],{WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",msTransition:"MSTransitionEnd",transition:"transitionend"}[c.prefixed("transition")],function(t){e.tProp&&t.propertyName.match(e.tProp)&&e.onEndFn()}),e.tEnd=!0}}(t))}function Ne(i,t){if(i.length){var e=i.data();Fi?(i.css(ke(0)),e.onEndFn=Ce,clearTimeout(e.tT)):i.stop();var n=Ie(t,function(){return t=i,Fi?+((e=t.css("transform")).match(/ma/)&&e.match(/-?\d+(?!d)/g)[e.match(/3d/)?12:4]):+t.css("left").replace("px","");var t,e});return i.css(Se(n)),n}}function Ie(){for(var t,e=0,i=arguments.length;e<i&&"number"!=typeof(t=e?arguments[e]():arguments[e]);e++);return t}function r(t,e){return Math.round(t+(e-t)/1.5)}function Ae(){return Ae.p=Ae.p||("https:"===ye.protocol?"https://":"http://")}function Pe(t,e){if("string"!=typeof t)return t;var i,n,o,a;if(i=t,(n=we.createElement("a")).href=i,(t=n).host.match(/youtube\.com/)&&t.search){if(o=t.search.split("v=")[1]){var s=o.indexOf("&");-1!==s&&(o=o.substring(0,s)),a="youtube"}}else t.host.match(/youtube\.com|youtu\.be/)?(o=t.pathname.replace(/^\/(embed\/|v\/)?/,"").replace(/\/.*/,""),a="youtube"):t.host.match(/vimeo\.com/)&&(a="vimeo",o=t.pathname.replace(/^\/(video\/)?/,"").replace(/\/.*/,""));return o&&a||!e||(o=t.href,a="custom"),!!o&&{id:o,type:a,s:t.search.replace(/^\?/,""),p:Ae()}}function Oe(t,e,i,n){for(var o=0,a=t.length;o<a;o++){var s=t[o];if(s.i===i&&s.thumbsReady){var r={videoReady:!0};r[Ui]=r[Xi]=r[Qi]=!1,n.splice(o,1,xe.extend({},s,r,e));break}}}function De(t){function u(t,e,i){var n=i.thumb&&i.img!==i.thumb,o=Ee(i.width||t.attr("width")),a=Ee(i.height||t.attr("height"));xe.extend(i,{width:o,height:a,thumbratio:Ve(i.thumbratio||Ee(i.thumbwidth||e&&e.attr("width")||n||o)/Ee(i.thumbheight||e&&e.attr("height")||n||a))})}var h=[];return t.children().each(function(){var t,e,i,n,o,a,s,r,l,c=xe(this),d=Be(xe.extend(c.data(),{id:c.attr("id")}));if(c.is("a, img"))e=d,i=!0,n=(t=c).children("img").eq(0),o=t.attr("href"),a=t.attr("src"),s=n.attr("src"),r=e.video,(l=!!i&&Pe(o,!0===r))?o=!1:l=r,u(t,n,xe.extend(e,{video:l,img:e.img||o||a||s,thumb:e.thumb||s||a||o}));else{if(c.is(":empty"))return;u(c,null,xe.extend(d,{html:this,_html:c.html()}))}h.push(d)}),h}function Le(t,e,i,n){return Le.i||(Le.i=1,Le.ii=[!0]),void 0===Le.ii[n=n||Le.i]&&(Le.ii[n]=!0),t()?e():Le.ii[n]&&setTimeout(function(){Le.ii[n]&&Le(t,e,i,n)},i||100),Le.i++}function We(t,e,i,n){var o,a=t.data(),s=a.measures;if(s&&(!a.l||a.l.W!==s.width||a.l.H!==s.height||a.l.r!==s.ratio||a.l.w!==e.w||a.l.h!==e.h||a.l.m!==i||a.l.p!==n)){var r=s.width,l=s.height,c=e.w/e.h,d=s.ratio>=c,u="scaledown"===i,h="contain"===i,p="cover"===i,f={x:_e((o=((o=n)+"").split(/\s+/))[0])||T,y:_e(o[1])||T};d&&(u||h)||!d&&p?l=(r=Te(e.w,0,u?r:1/0))/s.ratio:(d&&p||!d&&(u||h))&&(r=(l=Te(e.h,0,u?l:1/0))*s.ratio),t.css({width:Math.ceil(r),height:Math.ceil(l),left:Math.floor($e(f.x,e.w-r)),top:Math.floor($e(f.y,e.h-l))}),a.l={W:s.width,H:s.height,r:s.ratio,w:e.w,h:e.h,m:i,p:n}}return!0}function je(t,e,i){return e!==i&&(t<=e?"left":i<=t?"right":"left right")}function Fe(t,e,i,n){if(!i)return!1;if(!isNaN(t))return t-(n?0:1);for(var o,a=0,s=e.length;a<s;a++){if(e[a].id===t){o=a;break}}return o}function Re(t,e){return'<div class="'+t+'">'+(e||"")+"</div>"}function qe(t){for(var e=t.length;e;){var i=Math.floor(Math.random()*e--),n=t[e];t[e]=t[i],t[i]=n}return t}function He(t){return"[object Array]"==Object.prototype.toString.call(t)&&xe.map(t,function(t){return xe.extend({},t)})}function ze(t,e,i){t.scrollLeft(e||0).scrollTop(i||0)}function Be(t){if(t){var i={};return xe.each(t,function(t,e){i[t.toLowerCase()]=e}),i}}function Ve(t){if(t){var e=+t;return isNaN(e)?(e=t.split("/"))[0]/e[1]||l:e}}function Ue(t,e,i,n){e&&(t.addEventListener?t.addEventListener(e,i,!!n):t.attachEvent("on"+e,i))}function Qe(t){return{tabindex:-1*t+"",disabled:t}}function Xe(e,i){Ue(e,"keyup",function(t){e.getAttribute("disabled")||13==t.keyCode&&i.call(e,t)})}function Ye(e,i){Ue(e,"focus",e.onfocusin=function(t){i.call(e,t)},!0)}function Ke(t,e){t.preventDefault?t.preventDefault():t.returnValue=!1,e&&t.stopPropagation&&t.stopPropagation()}function Ge(t){return t?">":"<"}function Je(t,e){var i=t.data(),n=Math.round(e.pos),o=function(){i.sliding=!1,(e.onEnd||Ce)()};void 0!==e.overPos&&e.overPos!==e.pos&&(n=e.overPos,o=function(){Je(t,xe.extend({},e,{overPos:e.pos,time:Math.max(Vi,e.time/2)}))});var a=xe.extend(Se(n),e.width&&{width:e.width});i.sliding=!0,Fi?(t.css(xe.extend(ke(e.time),a)),10<e.time?s(t,"transform",o,e.time):o()):t.stop().animate(a,e.time,C,o)}function g(t){var e=(t.touches||[])[0]||t;t._x=e.pageX,t._y=e.clientY,t._now=xe.now()}function Ze(t,s){function e(t){return o=xe(t.target),v.checked=u=h=f=!1,l||v.flow||t.touches&&1<t.touches.length||1<t.which||b&&b.type!==t.type&&y||(u=s.select&&o.is(s.select,m))?u:(d="touchstart"===t.type,h=o.is("a, a *",m),a=v.control,p=v.noMove||v.noSwipe||a?16:v.snap?0:4,g(t),c=b=t,w=t.type.replace(/down|start/,"move").replace(/Down/,"Move"),(s.onStart||Ce).call(m,t,{control:a,$target:o}),l=v.flow=!0,void(d&&!v.go||Ke(t)))}function i(t){if(t.touches&&1<t.touches.length||zi&&!t.isPrimary||w!==t.type||!l)return l&&r(),void(s.onTouchEnd||Ce)();g(t);var e=Math.abs(t._x-c._x),i=Math.abs(t._y-c._y),n=e-i,o=(v.go||v.x||0<=n)&&!v.noSwipe,a=n<0;d&&!v.checked?(l=o)&&Ke(t):(Ke(t),(s.onMove||Ce).call(m,t,{touch:d})),!f&&Math.sqrt(Math.pow(e,2)+Math.pow(i,2))>p&&(f=!0),v.checked=v.checked||o||a}function r(t){(s.onTouchEnd||Ce)();var e=l;v.control=l=!1,e&&(v.flow=!1),!e||h&&!v.checked||(t&&Ke(t),y=!0,clearTimeout(x),x=setTimeout(function(){y=!1},1e3),(s.onEnd||Ce).call(m,{moved:f,$target:o,control:a,touch:d,startEvent:c,aborted:!t||"MSPointerCancel"===t.type}))}function n(){v.flow&&setTimeout(function(){v.flow=!1},Bi)}var l,c,o,a,d,u,h,p,f,m=t[0],v={};return zi?(Ue(m,"MSPointerDown",e),Ue(we,"MSPointerMove",i),Ue(we,"MSPointerCancel",r),Ue(we,"MSPointerUp",r)):(Ue(m,"touchstart",e),Ue(m,"touchmove",i),Ue(m,"touchend",r),Ue(we,"touchstart",function(){v.flow||setTimeout(function(){v.flow=!0},10)}),Ue(we,"touchend",n),Ue(we,"touchcancel",n),Wi.on("scroll",n),t.on("mousedown",e),ji.on("mousemove",i).on("mouseup",r)),t.on("click","a",function(t){v.checked&&Ke(t)}),v}function ti(y,x){function C(t,e){A=!0,i=T=t._x,o=t._now,E=[[o,i]],S=k=O.noMove||e?0:Ne(y,(x.getPos||Ce)()),(x.onStart||Ce).call(P,t)}var i,T,S,k,n,E,o,$,_,M,N,I,a,A,P=y[0],s=y.data(),O={};return O=xe.extend(Ze(x.$wrap,xe.extend({},x,{onStart:function(t,e){_=O.min,M=O.max,N=O.snap,I=t.altKey,A=a=!1,e.control||s.sliding||C(t)},onMove:function(t,e){O.noSwipe||(A||C(t),T=t._x,E.push([t._now,T]),n=je(k=S-(i-T),_,M),k<=_?k=r(k,_):M<=k&&(k=r(k,M)),O.noMove||(y.css(Se(k)),a||(a=!0,e.touch||zi||y.addClass(D)),(x.onMove||Ce).call(P,t,{pos:k,edge:n})))},onEnd:function(t){if(!O.noSwipe||!t.moved){A||C(t.startEvent,!0),t.touch||zi||y.removeClass(D);for(var e,i,n,o,a,s,r,l,c,d=($=xe.now())-Bi,u=null,h=Vi,p=x.friction,f=E.length-1;0<=f;f--){if(e=E[f][0],i=Math.abs(e-d),null===u||i<n)u=e,o=E[f][1];else if(u===d||n<i)break;n=i}r=Te(k,_,M);var m=o-T,v=0<=m,g=$-u,b=Bi<g,w=!b&&k!==S&&r===k;N&&(r=Te(Math[w?v?"floor":"ceil":"round"](k/N)*N,_,M),_=M=r),w&&(N||r===k)&&(c=-m/g,h*=Te(Math.abs(c),x.timeLow,x.timeHigh),a=Math.round(k+c*h/p),N||(r=a),(!v&&M<a||v&&a<_)&&(s=v?_:M,N||(r=s),l=Te(r+.03*(l=a-s),s-50,s+50),h=Math.abs((k-l)/(c/p)))),h*=I?10:1,(x.onEnd||Ce).call(P,xe.extend(t,{moved:t.moved||b&&N,pos:k,newPos:r,overPos:l,time:h}))}}})),O)}function ei(t,l){var c,d,u,e=t[0],h={prevent:{}};return Ue(e,m,function(t){var e=t.wheelDeltaY||-1*t.deltaY||0,i=t.wheelDeltaX||-1*t.deltaX||0,n=Math.abs(i)&&!Math.abs(e),o=Ge(i<0),a=d===o,s=xe.now(),r=s-u<Bi;d=o,u=s,n&&h.ok&&(!h.prevent[o]||c)&&(Ke(t,!0),c&&a&&r||(l.shift&&(c=!0,clearTimeout(h.t),h.t=setTimeout(function(){c=!1},v)),(l.onEnd||Ce)(t,l.shift?o:i)))}),h}function ii(){xe.each(xe.Fotorama.instances,function(t,e){e.index=t})}var ni="fotorama",oi="fullscreen",ai=ni+"__wrap",si=ai+"--video",ri=ai+"--no-controls",li=ai+"--only-active",ci=ni+"__stage",di=ci+"__frame",ui=ni+"__grab",hi=ni+"__arr",pi=hi+"--disabled",fi=ni+"__nav",mi=fi+"--dots",vi=fi+"--thumbs",gi=fi+"__frame",t=ni+"__fade",bi=t+"-front",wi=t+"-rear",yi="fotorama__shadows",xi=ni+"__active",Ci=ni+"__select",Ti=ni+"--fullscreen",Si=ni+"__error",ki=ni+"__loading",Ei=ni+"__loaded",D=ni+"__grabbing",$i=ni+"__img",_i=ni+"__thumb",e=ni+"__video",Mi=e+"-play",Ni='" tabindex="0" role="button',i=xe&&xe.fn.jquery.split(".");if(!i||i[0]<1||1==i[0]&&i[1]<8)throw"Fotorama requires jQuery 1.8 or later and will not run without it.";var c=function(u,a){function s(t,e){return typeof t===e}function r(t,e){for(var i in t){var n=t[i];if(!~(""+n).indexOf("-")&&c[n]!==a)return"pfx"!=e||n}return!1}function n(t,e,i){var n=t.charAt(0).toUpperCase()+t.slice(1),o=(t+" "+m.join(n+" ")+n).split(" ");return s(e,"string")||s(e,"undefined")?r(o,e):function(t,e,i){for(var n in t){var o=e[t[n]];if(o!==a)return!1===i?t[n]:s(o,"function")?o.bind(i||e):o}return!1}(o=(t+" "+v.join(n+" ")+n).split(" "),e,i)}var t,o,e,l={},h=u.documentElement,p="modernizr",i=u.createElement(p),c=i.style,d=" -webkit- -moz- -o- -ms- ".split(" "),f="Webkit Moz O ms",m=f.split(" "),v=f.toLowerCase().split(" "),g={},b=[],w=b.slice,y={}.hasOwnProperty;for(var x in o=s(y,"undefined")||s(y.call,"undefined")?function(t,e){return e in t&&s(t.constructor.prototype[e],"undefined")}:function(t,e){return y.call(t,e)},Function.prototype.bind||(Function.prototype.bind=function(n){var o=this;if("function"!=typeof o)throw new TypeError;var a=w.call(arguments,1),s=function(){if(this instanceof s){var t=function(){};t.prototype=o.prototype;var e=new t,i=o.apply(e,a.concat(w.call(arguments)));return Object(i)===i?i:e}return o.apply(n,a.concat(w.call(arguments)))};return s}),g.csstransforms3d=function(){return!!n("perspective")},g)o(g,x)&&(t=x.toLowerCase(),l[t]=g[x](),b.push((l[t]?"":"no-")+t));return l.addTest=function(t,e){if("object"==typeof t)for(var i in t)o(t,i)&&l.addTest(i,t[i]);else{if(t=t.toLowerCase(),l[t]!==a)return l;e="function"==typeof e?e():e,"undefined"!=typeof enableClasses&&enableClasses&&(h.className+=" "+(e?"":"no-")+t),l[t]=e}return l},e="",c.cssText=e,i=null,l._version="2.6.2",l._prefixes=d,l._domPrefixes=v,l._cssomPrefixes=m,l.testProp=function(t){return r([t])},l.testAllProps=n,l.testStyles=function(t,e,i,n){var o,a,s,r,l=u.createElement("div"),c=u.body,d=c||u.createElement("body");if(parseInt(i,10))for(;i--;)(s=u.createElement("div")).id=n?n[i]:p+(i+1),l.appendChild(s);return o=["&#173;",'<style id="s',p,'">',t,"</style>"].join(""),l.id=p,(c?l:d).innerHTML+=o,d.appendChild(l),c||(d.style.background="",d.style.overflow="hidden",r=h.style.overflow,h.style.overflow="hidden",h.appendChild(d)),a=e(l,t),c?l.parentNode.removeChild(l):(d.parentNode.removeChild(d),h.style.overflow=r),!!a},l.prefixed=function(t,e,i){return e?n(t,e,i):n(t,"pfx")},l}(we),Ii={ok:!1,is:function(){return!1},request:function(){},cancel:function(){},event:"",prefix:""},o="webkit moz o ms khtml".split(" ");if(void 0!==we.cancelFullScreen)Ii.ok=!0;else for(var d=0,u=o.length;d<u;d++)if(Ii.prefix=o[d],void 0!==we[Ii.prefix+"CancelFullScreen"]){Ii.ok=!0;break}Ii.ok&&(Ii.event=Ii.prefix+"fullscreenchange",Ii.is=function(){switch(this.prefix){case"":return we.fullScreen;case"webkit":return we.webkitIsFullScreen;default:return we[this.prefix+"FullScreen"]}},Ii.request=function(t){return""===this.prefix?t.requestFullScreen():t[this.prefix+"RequestFullScreen"]()},Ii.cancel=function(){return""===this.prefix?we.cancelFullScreen():we[this.prefix+"CancelFullScreen"]()});var Ai,Pi={lines:12,length:5,width:2,radius:7,corners:1,rotate:15,color:"rgba(128, 128, 128, .75)",hwaccel:!0},Oi={top:"auto",left:"auto",className:""};Ai=function(){function f(t,e){var i,n=we.createElement(t||"div");for(i in e)n[i]=e[i];return n}function d(t){for(var e=1,i=arguments.length;i>e;e++)t.appendChild(arguments[e]);return t}function s(t,e,i,n){var o=["opacity",e,~~(100*t),i,n].join("-"),a=.01+i/n*100,s=Math.max(1-(1-t)/e*(100-a),t),r=g.substring(0,g.indexOf("Animation")).toLowerCase(),l=r&&"-"+r+"-"||"";return c[o]||(h.insertRule("@"+l+"keyframes "+o+"{0%{opacity:"+s+"}"+a+"%{opacity:"+t+"}"+(a+.01)+"%{opacity:1}"+(a+e)%100+"%{opacity:"+t+"}100%{opacity:"+s+"}}",h.cssRules.length),c[o]=1),o}function n(t,e){var i,n,o=t.style;for(e=e.charAt(0).toUpperCase()+e.slice(1),n=0;n<a.length;n++)if(i=a[n]+e,o[i]!==l)return i;return o[e]!==l?e:void 0}function m(t,e){for(var i in e)t.style[n(t,i)||i]=e[i];return t}function e(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)t[n]===l&&(t[n]=i[n])}return t}function v(t){for(var e={x:t.offsetLeft,y:t.offsetTop};t=t.offsetParent;)e.x+=t.offsetLeft,e.y+=t.offsetTop;return e}function u(t,e){return"string"==typeof t?t:t[e%t.length]}function i(t){return"undefined"==typeof this?new i(t):void(this.opts=e(t||{},i.defaults,o))}function t(){function c(t,e){return f("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="spin-vml">',e)}h.addRule(".spin-vml","behavior:url(#default#VML)"),i.prototype.lines=function(t,n){function o(){return m(c("group",{coordsize:s+" "+s,coordorigin:-a+" "+-a}),{width:s,height:s})}function e(t,e,i){d(l,d(m(o(),{rotation:360/n.lines*t+"deg",left:~~e}),d(m(c("roundrect",{arcsize:n.corners}),{width:a,height:n.width,left:n.radius,top:-n.width>>1,filter:i}),c("fill",{color:u(n.color,t),opacity:n.opacity}),c("stroke",{opacity:0}))))}var i,a=n.length+n.width,s=2*a,r=2*-(n.width+n.length)+"px",l=m(o(),{position:"absolute",top:r,left:r});if(n.shadow)for(i=1;i<=n.lines;i++)e(i,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)");for(i=1;i<=n.lines;i++)e(i);return d(t,l)},i.prototype.opacity=function(t,e,i,n){var o=t.firstChild;n=n.shadow&&n.lines||0,o&&e+n<o.childNodes.length&&(o=o.childNodes[e+n],o=o&&o.firstChild,o=o&&o.firstChild,o&&(o.opacity=i))}}var g,a=["webkit","Moz","ms","O"],c={},h=function(){var t=f("style",{type:"text/css"});return d(we.getElementsByTagName("head")[0],t),t.sheet||t.styleSheet}(),o={lines:12,length:7,width:5,radius:10,rotate:0,corners:1,color:"#000",direction:1,speed:1,trail:100,opacity:.25,fps:20,zIndex:2e9,className:"spinner",top:"auto",left:"auto",position:"relative"};i.defaults={},e(i.prototype,{spin:function(t){this.stop();var e,i,n=this,o=n.opts,a=n.el=m(f(0,{className:o.className}),{position:o.position,width:0,zIndex:o.zIndex}),s=o.radius+o.length+o.width;if(t&&(t.insertBefore(a,t.firstChild||null),i=v(t),e=v(a),m(a,{left:("auto"==o.left?i.x-e.x+(t.offsetWidth>>1):parseInt(o.left,10)+s)+"px",top:("auto"==o.top?i.y-e.y+(t.offsetHeight>>1):parseInt(o.top,10)+s)+"px"})),a.setAttribute("role","progressbar"),n.lines(a,n.opts),!g){var r,l=0,c=(o.lines-1)*(1-o.direction)/2,d=o.fps,u=d/o.speed,h=(1-o.opacity)/(u*o.trail/100),p=u/o.lines;!function t(){l++;for(var e=0;e<o.lines;e++)r=Math.max(1-(l+(o.lines-e)*p)%u*h,o.opacity),n.opacity(a,e*o.direction+c,r,o);n.timeout=n.el&&setTimeout(t,~~(1e3/d))}()}return n},stop:function(){var t=this.el;return t&&(clearTimeout(this.timeout),t.parentNode&&t.parentNode.removeChild(t),this.el=l),this},lines:function(t,i){function e(t,e){return m(f(),{position:"absolute",width:i.length+i.width+"px",height:i.width+"px",background:t,boxShadow:e,transformOrigin:"left",transform:"rotate("+~~(360/i.lines*o+i.rotate)+"deg) translate("+i.radius+"px,0)",borderRadius:(i.corners*i.width>>1)+"px"})}for(var n,o=0,a=(i.lines-1)*(1-i.direction)/2;o<i.lines;o++)n=m(f(),{position:"absolute",top:1+~(i.width/2)+"px",transform:i.hwaccel?"translate3d(0,0,0)":"",opacity:i.opacity,animation:g&&s(i.opacity,i.trail,a+o*i.direction,i.lines)+" "+1/i.speed+"s linear infinite"}),i.shadow&&d(n,m(e("#000","0 0 4px #000"),{top:"2px"})),d(t,d(n,e(u(i.color,o),"0 0 1px rgba(0,0,0,.1)")));return t},opacity:function(t,e,i){e<t.childNodes.length&&(t.childNodes[e].style.opacity=i)}});var r=m(f("group"),{behavior:"url(#default#VML)"});return!n(r,"transform")&&r.adj?t():g=n(r,"animation"),i}();var Di,Li,b,w,y,x,Wi=xe(a),ji=xe(we),h="quirks"===ye.hash.replace("#",""),p=c.csstransforms3d,Fi=p&&!h,Ri=p||"CSS1Compat"===we.compatMode,qi=Ii.ok,f=navigator.userAgent.match(/Android|webOS|iPhone|iPad|iPod|BlackBerry|Windows Phone/i),Hi=!Fi||f,zi=navigator.msPointerEnabled,m="onwheel"in we.createElement("div")?"wheel":we.onmousewheel!==l?"mousewheel":"DOMMouseScroll",Bi=250,Vi=300,v=1400,Ui="$stageFrame",Qi="$navDotFrame",Xi="$navThumbFrame",C=function(a){var t="bez_"+xe.makeArray(arguments).join("_").replace(".","p");if("function"!=typeof xe.easing[t]){var s=function(i,n){function a(t,e){return l[e]=3*i[e],r[e]=3*(n[e]-i[e])-l[e],s[e]=1-l[e]-r[e],t*(l[e]+t*(r[e]+t*s[e]))}var s=[null,null],r=[null,null],l=[null,null];return function(t){return a(function(t){for(var e,i=t,n=0;++n<14&&(e=a(i,0)-t,!(Math.abs(e)<.001));)i-=e/(o=i,l[0]+o*(2*r[0]+3*s[0]*o));var o;return i}(t),1)}};xe.easing[t]=function(t,e,i,n,o){return n*s([a[0],a[1]],[a[2],a[3]])(e/o)+i}}return t}([.1,0,.25,1]),T="50%",S={width:null,minwidth:null,maxwidth:"100%",height:null,minheight:null,maxheight:null,ratio:null,margin:2,glimpse:0,fit:"contain",position:T,thumbposition:T,nav:"dots",navposition:"bottom",navwidth:null,thumbwidth:64,thumbheight:64,thumbmargin:2,thumbborderwidth:2,thumbfit:"cover",allowfullscreen:!1,transition:"slide",clicktransition:null,transitionduration:Vi,captions:!0,hash:!1,startindex:0,loop:!1,autoplay:!1,stopautoplayontouch:!0,keyboard:!1,arrows:!0,click:!0,swipe:!0,trackpad:!1,enableifsingleframe:!1,controlsonstart:!0,shuffle:!1,direction:"ltr",shadows:!0,spinner:null},Yi={left:!0,right:!0,down:!1,up:!1,space:!1,home:!1,end:!1};Le.stop=function(t){Le.ii[t]=!1},jQuery.Fotorama=function(r,x){function e(){xe.each(G,function(t,e){if(!e.i){e.i=qt++;var i=Pe(e.video,!0);if(i){var n={};e.video=i,e.img||e.thumb?e.thumbsReady=!0:(a=G,s=Wt,"youtube"===(c=(o=e).video).type?(r=(l=Ae()+"img.youtube.com/vi/"+c.id+"/default.jpg").replace(/\/default.jpg$/,"/hqdefault.jpg"),o.thumbsReady=!0):"vimeo"===c.type?xe.ajax({url:Ae()+"vimeo.com/api/v2/video/"+c.id+".json",dataType:"jsonp",success:function(t){o.thumbsReady=!0,Oe(a,{img:t[0].thumbnail_large,thumb:t[0].thumbnail_small},o.i,s)}}):o.thumbsReady=!0,n={img:r,thumb:l}),Oe(G,{img:n.img,thumb:n.thumb},e.i,Wt)}}var o,a,s,r,l,c})}function l(t){return St[t]||Wt.fullScreen}function c(t){var e,i,n,o,a,s;t!==c.f&&(t?(r.html("").addClass(ni+" "+Ft).append(Vt).before(zt).before(Bt),s=Wt,xe.Fotorama.instances.push(s),ii()):(Vt.detach(),zt.detach(),Bt.detach(),r.html(Ht.urtext).removeClass(Ft),a=Wt,xe.Fotorama.instances.splice(a.index,1),ii()),e="keydown."+ni,n="keydown."+(i=ni+jt),o="resize."+i+" orientationchange."+i,t?(ji.on(n,function(t){var e,i;et&&27===t.keyCode?q(et,e=!0,!0):(Wt.fullScreen||x.keyboard&&!Wt.index)&&(27===t.keyCode?(e=!0,Wt.cancelFullScreen()):t.shiftKey&&32===t.keyCode&&l("space")||37===t.keyCode&&l("left")||38===t.keyCode&&l("up")?i="<":32===t.keyCode&&l("space")||39===t.keyCode&&l("right")||40===t.keyCode&&l("down")?i=">":36===t.keyCode&&l("home")?i="<<":35===t.keyCode&&l("end")&&(i=">>")),(e||i)&&Ke(t),i&&Wt.show({index:i,slow:t.altKey,user:!0})}),Wt.index||ji.off(e).on(e,"textarea, input, select",function(t){Li.hasClass(oi)||t.stopPropagation()}),Wi.on(o,Wt.resize)):(ji.off(n),Wi.off(o)),c.f=t)}function a(){var t=J<2&&!x.enableifsingleframe||et;ue.noMove=t||gt,ue.noSwipe=t||!x.swipe,xt||Qt.toggleClass(ui,!x.click&&!ue.noMove&&!ue.noSwipe),zi&&Vt.toggleClass("fotorama__wrap--pan-y",!ue.noSwipe)}function s(t){!0===t&&(t=""),x.autoplay=Math.max(+t||5e3,1.5*yt)}function C(t){return t<0?(J+t%J)%J:J<=t?t%J:t}function d(t){return Te(t,0,J-1)}function u(t){return(ut?C:d)(t)}function h(t){return!!(0<t||ut)&&t-1}function p(t){return!!(t<J-1||ut)&&t+1}function i(t,a,s){if("number"==typeof t){t=new Array(t);var r=!0}return xe.each(t,function(t,e){if(r&&(e=t),"number"==typeof e){var i=G[C(e)];if(i){var n="$"+a+"Frame",o=i[n];s.call(this,t,e,i,o,n,o&&o.data())}}})}function T(t,e,i,n){kt&&("*"!==kt||n!==dt)||(t=_e(x.width)||_e(t)||500,e=_e(x.height)||_e(e)||333,Wt.resize({width:t,ratio:x.ratio||i||t/e},0,n!==dt&&"*"))}function S(t,v,g,b,w,y){i(t,v,function(t,i,e,n,o,a){function s(t){var e=C(i);D(t,{index:e,src:f,frame:G[e]})}function r(){u.remove(),xe.Fotorama.cache[f]="error",e.html&&"stage"===v||!m||m===f?(!f||e.html||c?"stage"===v&&(n.trigger("f:load").removeClass(ki+" "+Si).addClass(Ei),s("load"),T()):(n.trigger("f:error").removeClass(ki).addClass(Si),s("error")),a.state="error",!(1<J&&G[i]===e)||e.html||e.deleted||e.video||c||(e.deleted=!0,Wt.splice(i,1))):(e[p]=f=m,S([i],v,g,b,w,!0))}function l(){var t=10;Le(function(){return!At||!t--&&!Hi},function(){xe.Fotorama.measures[f]=h.measures=xe.Fotorama.measures[f]||{width:d.width,height:d.height,ratio:d.width/d.height},T(h.measures.width,h.measures.height,h.measures.ratio,i),u.off("load error").addClass($i+(c?" fotorama__img--full":"")).prependTo(n),We(u,(xe.isFunction(g)?g():g)||de,b||e.fit||x.fit,w||e.position||x.position),xe.Fotorama.cache[f]=a.state="loaded",setTimeout(function(){n.trigger("f:load").removeClass(ki+" "+Si).addClass(Ei+" "+(c?"fotorama__loaded--full":"fotorama__loaded--img")),"stage"===v?s("load"):"auto"!==e.thumbratio&&(e.thumbratio||"auto"!==x.thumbratio)||(e.thumbratio=h.measures.ratio,Y())},0)})}if(n){var c=Wt.fullScreen&&e.full&&e.full!==e.img&&!a.$full&&"stage"===v;if(!a.$img||y||c){var d=new Image,u=xe(d),h=u.data();a[c?"$full":"$img"]=u;var p="stage"===v?c?"full":"img":"thumb",f=e[p],m=c?null:e["stage"===v?"thumb":"img"];if("navThumb"===v&&(n=a.$wrap),!f)return void r();xe.Fotorama.cache[f]?function t(){"error"===xe.Fotorama.cache[f]?r():"loaded"===xe.Fotorama.cache[f]?setTimeout(l,0):setTimeout(t,100)}():(xe.Fotorama.cache[f]="*",u.on("load",l).on("error",r)),a.state="",d.src=f}}})}function f(){le.detach(),tt&&tt.stop()}function m(){var t,e=it[Ui];e&&!e.data().state&&(t=e,le.append(tt.spin().el).appendTo(t),e.on("f:load f:error",function(){e.off("f:load f:error"),f()}))}function v(t){Xe(t,U),Ye(t,function(){setTimeout(function(){ze(Zt)},0),I({time:yt,guessIndex:xe(this).data().eq,minMax:pe})})}function g(t,r){i(t,r,function(t,e,i,n,o,a){if(!n){n=i[o]=Vt[o].clone(),(a=n.data()).data=i;var s=n[0];"stage"===r?(i.html&&xe('<div class="fotorama__html"></div>').append(i._html?xe(i.html).removeAttr("id").html(i._html):i.html).appendTo(n),i.caption&&xe(Re("fotorama__caption",Re("fotorama__caption__wrap",i.caption))).appendTo(n),i.video&&n.addClass("fotorama__stage__frame--video").append(se.clone()),Ye(s,function(){setTimeout(function(){ze(Ut)},0),B({index:a.eq,user:!0})}),Xt=Xt.add(n)):"navDot"===r?(v(s),ee=ee.add(n)):"navThumb"===r&&(v(s),a.$wrap=n.children(":first"),ie=ie.add(n),i.video&&a.$wrap.append(se.clone()))}})}function b(t,e,i,n){return t&&t.length&&We(t,e,i,n)}function w(t){i(t,"stage",function(t,e,i,n,o,a){if(n){var s=C(e),r=i.fit||x.fit,l=i.position||x.position;a.eq=s,ve[Ui][s]=n.css(xe.extend({left:gt?0:Me(e,de.w,x.margin,ot)},gt&&ke(0))),c=n[0],xe.contains(we.documentElement,c)||(n.appendTo(Qt),q(i.$video)),b(a.$img,de,r,l),b(a.$full,de,r,l)}var c})}function y(t,r){if("thumbs"===ht&&!isNaN(t)){var l=-t,c=-t+de.nw;ie.each(function(){function t(){return{h:wt,w:e.w}}var e=xe(this).data(),i=e.eq,n=t(),o=G[i]||{},a=o.thumbfit||x.thumbfit,s=o.thumbposition||x.thumbposition;n.w=e.w,e.l+e.w<l||e.l>c||b(e.$img,n,a,s)||r&&S([i],"navThumb",t,a,s)})}}function k(t,e,i){if(!k[i]){var n="nav"===i&&pt,o=0;e.append(t.filter(function(){for(var t,e=xe(this),i=e.data(),n=0,o=G.length;n<o;n++)if(i.data===G[n]){t=!0,i.eq=n;break}return t||e.remove()&&!1}).sort(function(t,e){return xe(t).data().eq-xe(e).data().eq}).each(function(){if(n){var t=xe(this),e=t.data(),i=Math.round(wt*e.data.thumbratio)||bt;e.l=o,e.w=i,t.css({width:i}),o+=i+x.thumbmargin}})),k[i]=!0}}function E(t){return t-ge>de.w/3}function n(t){return!(ut||ce+t&&ce-J+t||et)}function $(){var t=n(0),e=n(1);Yt.toggleClass(pi,t).attr(Qe(t)),Kt.toggleClass(pi,e).attr(Qe(e))}function _(){he.ok&&(he.prevent={"<":n(0),">":n(1)})}function M(t){var e,i,n=t.data();return i=pt?(e=n.l,n.w):(e=t.position().left,t.width()),{c:e+i/2,min:-e+10*x.thumbmargin,max:-e+de.w-i-10*x.thumbmargin}}function N(t){var e=it[Ot].data();Je(ne,{time:1.2*t,pos:e.l,width:e.w-2*x.thumbborderwidth})}function I(t){var e=G[t.guessIndex][Ot];if(e){var i=pe.min!==pe.max,n=t.minMax||i&&M(it[Ot]),o=i&&(t.keep&&I.l?I.l:Te((t.coo||de.nw/2)-M(e).c,n.min,n.max)),a=i&&Te(o,pe.min,pe.max),s=1.1*t.time;Je(te,{time:s,pos:a||0,onEnd:function(){y(a,!0)}}),R(Zt,je(a,pe.min,pe.max)),I.l=o}}function A(t){for(var e=me[t];e.length;)e.shift().removeClass(xi)}function o(t){var i=ve[t];xe.each(nt,function(t,e){delete i[C(e)]}),xe.each(i,function(t,e){delete i[t],e.detach()})}function P(t){ot=at=ce;var e=it[Ui];e&&(A(Ui),me[Ui].push(e.addClass(xi)),t||Wt.show.onEnd(!0),Ne(Qt,0),o(Ui),w(nt),ue.min=ut?-1/0:-Me(J-1,de.w,x.margin,ot),ue.max=ut?1/0:-Me(0,de.w,x.margin,ot),ue.snap=de.w+x.margin,pe.min=Math.min(0,de.nw-te.width()),pe.max=0,te.toggleClass(ui,!(pe.noMove=pe.min===pe.max)))}function O(i,t){i&&xe.each(t,function(t,e){e&&xe.extend(e,{width:i.width||e.width,height:i.height,minwidth:i.minwidth,maxwidth:i.maxwidth,minheight:i.minheight,maxheight:i.maxheight,ratio:Ve(i.ratio)})})}function D(t,e){r.trigger(ni+":"+t,[Wt,e])}function L(){clearTimeout(W.t),At=1,x.stopautoplayontouch?Wt.stopAutoplay():Mt=!0}function W(){x.stopautoplayontouch||(j(),F()),W.t=setTimeout(function(){At=0},Vi+Bi)}function j(){Mt=!(!et&&!Nt)}function F(){if(clearTimeout(F.t),Le.stop(F.w),x.autoplay&&!Mt){Wt.autoplay||(Wt.autoplay=!0,D("startautoplay"));var i=ce,t=it[Ui].data();F.w=Le(function(){return t.state||i!==ce},function(){F.t=setTimeout(function(){if(!Mt&&i===ce){var t=ct,e=G[t][Ui].data();F.w=Le(function(){return e.state||t!==ct},function(){Mt||t!==ct||Wt.show(ut?Ge(!Tt):ct)})}},x.autoplay)})}else Wt.autoplay&&(Wt.autoplay=!1,D("stopautoplay"))}function t(){Wt.fullScreen&&(Wt.fullScreen=!1,qi&&Ii.cancel(Rt),Li.removeClass(oi),Di.removeClass(oi),r.removeClass(Ti).insertAfter(Bt),de=xe.extend({},It),q(et,!0,!0),V("x",!1),Wt.resize(),S(nt,"stage"),ze(Wi,$t,Et),D("fullscreenexit"))}function R(t,e){Ct&&(t.removeClass("fotorama__shadows--left fotorama__shadows--right"),e&&!et&&t.addClass(e.replace(/^|\s/g," "+yi+"--")))}function q(t,e,i){e&&(Vt.removeClass(si),et=!1,a()),t&&t!==et&&(t.remove(),D("unloadvideo")),i&&(j(),F())}function H(t){Vt.toggleClass(ri,t)}function z(t){if(!ue.flow){var e=t?t.pageX:z.x,i=e&&!n(E(e))&&x.click;z.p!==i&&Ut.toggleClass("fotorama__pointer",i)&&(z.p=i,z.x=e)}}function B(e){clearTimeout(B.t),x.clicktransition&&x.clicktransition!==x.transition?setTimeout(function(){var t=x.transition;Wt.setOptions({transition:x.clicktransition}),xt=t,B.t=setTimeout(function(){Wt.show(e)},10)},0):Wt.show(e)}function V(t,e){ue[t]=pe[t]=e}function U(t){B({index:xe(this).data().eq,slow:t.altKey,user:!0,coo:t._x-Zt.offset().left})}function Q(t){B({index:Gt.index(this)?">":"<",slow:t.altKey,user:!0})}function X(t){Ye(t,function(){setTimeout(function(){ze(Ut)},0),H(!1)})}function Y(){if(G=Wt.data=G||He(x.data)||De(r),J=Wt.size=G.length,!K.ok&&x.shuffle&&qe(G),e(),ce=d(ce),J&&c(!0),function(){function t(t,e){o[t?"add":"remove"].push(e)}Wt.options=x=Be(x),gt="crossfade"===x.transition||"dissolve"===x.transition,ut=x.loop&&(2<J||gt&&(!xt||"slide"!==xt)),yt=+x.transitionduration||Vi,Tt="rtl"===x.direction,St=xe.extend({},x.keyboard&&Yi,x.keyboard);var e,i,n,o={add:[],remove:[]};1<J||x.enableifsingleframe?(ht=x.nav,ft="top"===x.navposition,o.remove.push(Ci),Gt.toggle(!!x.arrows)):(ht=!1,Gt.hide()),f(),tt=new Ai(xe.extend(Pi,x.spinner,Oi,{direction:Tt?-1:1})),$(),_(),x.autoplay&&s(x.autoplay),bt=Ee(x.thumbwidth)||64,wt=Ee(x.thumbheight)||64,he.ok=fe.ok=x.trackpad&&!Hi,a(),O(x,[de]),(pt="thumbs"===ht)?(g(J,"navThumb"),Z=ie,Ot=Xi,e=zt,i=xe.Fotorama.jst.style({w:bt,h:wt,b:x.thumbborderwidth,m:x.thumbmargin,s:jt,q:!Ri}),(n=e[0]).styleSheet?n.styleSheet.cssText=i:e.html(i),Zt.addClass(vi).removeClass(mi)):"dots"===ht?(g(J,"navDot"),Z=ee,Ot=Qi,Zt.addClass(mi).removeClass(vi)):(ht=!1,Zt.removeClass(vi+" "+mi)),ht&&(ft?Jt.insertBefore(Ut):Jt.insertAfter(Ut),k.nav=!1,k(Z,te,"nav")),mt=x.allowfullscreen,vt=mt?(oe.prependTo(Ut),qi&&"native"===mt):(oe.detach(),!1),t(gt,"fotorama__wrap--fade"),t(!gt,"fotorama__wrap--slide"),t(!x.captions,"fotorama__wrap--no-captions"),t(Tt,"fotorama__wrap--rtl"),t("always"!==x.arrows,"fotorama__wrap--toggle-arrows"),t(!(Ct=x.shadows&&!Hi),"fotorama__wrap--no-shadows"),Vt.addClass(o.add.join(" ")).removeClass(o.remove.join(" ")),xe.extend({},x)}(),!Y.i){Y.i=!0;var t=x.startindex;(t||x.hash&&ye.hash)&&(dt=Fe(t||ye.hash.replace(/^#/,""),G,0===Wt.index||t,t)),ce=ot=at=st=dt=u(dt)||0}if(J){if(function t(){return!t.f===Tt?(t.f=Tt,ce=J-1-ce,Wt.reverse(),!0):void 0}())return;et&&q(et,!0),nt=[],o(Ui),Y.ok=!0,Wt.show({index:ce,time:0}),Wt.resize()}else Wt.destroy()}function K(){K.ok||(K.ok=!0,D("ready"))}Di=xe("html"),Li=xe("body");var G,J,Z,tt,et,it,nt,ot,at,st,rt,lt,ct,dt,ut,ht,pt,ft,mt,vt,gt,bt,wt,yt,xt,Ct,Tt,St,kt,Et,$t,_t,Mt,Nt,It,At,Pt,Ot,Dt,Lt,Wt=this,jt=xe.now(),Ft=ni+jt,Rt=r[0],qt=1,Ht=r.data(),zt=xe("<style></style>"),Bt=xe(Re("fotorama--hidden")),Vt=xe(Re(ai)),Ut=xe(Re(ci)).appendTo(Vt),Qt=(Ut[0],xe(Re("fotorama__stage__shaft")).appendTo(Ut)),Xt=xe(),Yt=xe(Re(hi+" fotorama__arr--prev"+Ni)),Kt=xe(Re(hi+" fotorama__arr--next"+Ni)),Gt=Yt.add(Kt).appendTo(Ut),Jt=xe(Re("fotorama__nav-wrap")),Zt=xe(Re(fi)).appendTo(Jt),te=xe(Re("fotorama__nav__shaft")).appendTo(Zt),ee=xe(),ie=xe(),ne=(Qt.data(),te.data(),xe(Re("fotorama__thumb-border")).appendTo(te)),oe=xe(Re("fotorama__fullscreen-icon"+Ni)),ae=oe[0],se=xe(Re(Mi)),re=xe(Re("fotorama__video-close")).appendTo(Ut)[0],le=xe(Re("fotorama__spinner")),ce=!1,de={},ue={},he={},pe={},fe={},me={},ve={},ge=0,be=[];Vt[Ui]=xe(Re(di)),Vt[Xi]=xe(Re(gi+" fotorama__nav__frame--thumb"+Ni,Re(_i))),Vt[Qi]=xe(Re(gi+" fotorama__nav__frame--dot"+Ni,Re("fotorama__dot"))),me[Ui]=[],me[Xi]=[],me[Qi]=[],ve[Ui]={},Vt.addClass(Fi?"fotorama__wrap--css3":"fotorama__wrap--css2").toggleClass(ri,!x.controlsonstart),Ht.fotorama=this,Wt.startAutoplay=function(t){return Wt.autoplay||(Mt=Nt=!1,s(t||x.autoplay),F()),this},Wt.stopAutoplay=function(){return Wt.autoplay&&(Mt=Nt=!0,F()),this},Wt.show=function(e){var t;"object"!=typeof e?(t=e,e={}):t=e.index,t=">"===t?at+1:"<"===t?at-1:"<<"===t?0:">>"===t?J-1:t,t=void 0===(t=isNaN(t)?Fe(t,G,!0):t)?ce||0:t,Wt.activeIndex=ce=u(t),rt=h(ce),lt=p(ce),ct=C(ce+(Tt?-1:1)),nt=[ce,rt,lt],at=ut?t:ce;var i=Math.abs(st-at),n=Ie(e.time,function(){return Math.min(yt*(1+(i-1)/12),2*yt)}),o=e.overPos;e.slow&&(n*=10);var a=it;Wt.activeFrame=it=G[ce];var s=a===it&&!e.user;q(et,it.i!==G[C(ot)].i),g(nt,"stage"),w(Hi?[at]:[at,h(at),p(at)]),V("go",!0),s||D("show",{user:e.user,time:n}),Mt=!0;var r,l=Wt.show.onEnd=function(t){if(!l.ok){if(l.ok=!0,t||P(!0),s||D("showend",{user:e.user}),!t&&xt&&xt!==x.transition)return Wt.setOptions({transition:xt}),void(xt=!1);m(),S(nt,"stage"),V("go",!1),_(),z(),j(),F()}};gt?function e(t,i,n,o,a,s){var r=void 0!==s;if(r||(a.push(arguments),Array.prototype.push.call(arguments,a.length),!(1<a.length))){t=t||xe(t),i=i||xe(i);var l=t[0],c=i[0],d="crossfade"===o.method,u=function(){if(!u.done){u.done=!0;var t=(r||a.shift())&&a.shift();t&&e.apply(this,t),(o.onEnd||Ce)(!!t)}},h=o.time/(s||1);n.removeClass(wi+" "+bi),t.stop().addClass(wi),i.stop().addClass(bi),d&&c&&t.fadeTo(0,0),t.fadeTo(d?h:0,1,d&&u),i.fadeTo(h,0,u),l&&d||c||u()}}(it[Ui],ce!==st?G[st][Ui]:null,Xt,{time:n,method:x.transition,onEnd:l},be):Je(Qt,{pos:-Me(at,de.w,x.margin,ot),overPos:o,time:n,onEnd:l});if($(),ht){A(Ot),me[Ot].push(it[Ot].addClass(xi));var c=d(ce+Te(at-st,-1,1));I({time:n,coo:c!==ce&&e.coo,guessIndex:void 0!==e.coo?c:ce,keep:s}),pt&&N(n)}return _t=void 0!==st&&st!==ce,st=ce,x.hash&&_t&&!Wt.eq&&(r=it.id||ce+1,ye.replace(ye.protocol+"//"+ye.host+ye.pathname.replace(/^\/?/,"/")+ye.search+"#"+r)),this},Wt.requestFullScreen=function(){return mt&&!Wt.fullScreen&&(Et=Wi.scrollTop(),$t=Wi.scrollLeft(),ze(Wi),V("x",!0),It=xe.extend({},de),r.addClass(Ti).appendTo(Li.addClass(oi)),Di.addClass(oi),q(et,!0,!0),Wt.fullScreen=!0,vt&&Ii.request(Rt),Wt.resize(),S(nt,"stage"),m(),D("fullscreenenter")),this},Wt.cancelFullScreen=function(){return vt&&Ii.is()?Ii.cancel(we):t(),this},Wt.toggleFullScreen=function(){return Wt[(Wt.fullScreen?"cancel":"request")+"FullScreen"]()},Ue(we,Ii.event,function(){!G||Ii.is()||et||t()}),Wt.resize=function(t){if(!G)return this;var e=arguments[1]||0,i=arguments[2];O(Wt.fullScreen?{width:"100%",maxwidth:null,minwidth:null,height:"100%",maxheight:null,minheight:null}:Be(t),[de,i||Wt.fullScreen||x]);var n=de.width,o=de.height,a=de.ratio,s=Wi.height()-(ht?Zt.height():0);return _e(n)&&(Vt.addClass(li).css({width:n,minWidth:de.minwidth||0,maxWidth:de.maxwidth||99999}),n=de.W=de.w=Vt.width(),de.nw=ht&&$e(x.navwidth,n)||n,x.glimpse&&(de.w-=Math.round(2*($e(x.glimpse,n)||0))),Qt.css({width:de.w,marginLeft:(de.W-de.w)/2}),(o=(o=$e(o,s))||a&&n/a)&&(n=Math.round(n),o=de.h=Math.round(Te(o,$e(de.minheight,s),$e(de.maxheight,s))),Ut.stop().animate({width:n,height:o},e,function(){Vt.removeClass(li)}),P(),ht&&(Zt.stop().animate({width:de.nw},e),I({guessIndex:ce,time:e,keep:!0}),pt&&k.nav&&N(e)),kt=i||!0,K())),ge=Ut.offset().left,this},Wt.setOptions=function(t){return xe.extend(x,t),Y(),this},Wt.shuffle=function(){return G&&qe(G)&&Y(),this},Wt.destroy=function(){return Wt.cancelFullScreen(),Wt.stopAutoplay(),G=Wt.data=null,c(),nt=[],o(Ui),Y.ok=!1,this},Wt.playVideo=function(){var t=it,e=t.video,i=ce;return"object"==typeof e&&t.videoReady&&(vt&&Wt.fullScreen&&Wt.cancelFullScreen(),Le(function(){return!Ii.is()||i!==ce},function(){i===ce&&(t.$video=t.$video||xe(xe.Fotorama.jst.video(e)),t.$video.appendTo(t[Ui]),Vt.addClass(si),et=t.$video,a(),Gt.blur(),oe.blur(),D("loadvideo"))})),this},Wt.stopVideo=function(){return q(et,!0,!0),this},Ut.on("mousemove",z),ue=ti(Qt,{onStart:L,onMove:function(t,e){R(Ut,e.edge)},onTouchEnd:W,onEnd:function(t){R(Ut);var e,i,n,o,a,s,r,l=(zi&&!Pt||t.touch)&&x.arrows&&"always"!==x.arrows;if(t.moved||l&&t.pos!==t.newPos&&!t.control){var c=(o=t.newPos,a=de.w,s=x.margin,r=ot,-Math.round(o/(a+(s||0))-(r||0)));Wt.show({index:c,time:gt?yt:t.time,overPos:t.overPos,user:!0})}else t.aborted||t.control||(e=t.startEvent,i=l,n=e.target,xe(n).hasClass(Mi)?Wt.playVideo():n===ae?Wt.toggleFullScreen():et?n===re&&q(et,!0,!0):i?H():x.click&&B({index:e.shiftKey||Ge(E(e._x)),slow:e.altKey,user:!0}))},timeLow:1,timeHigh:1,friction:2,select:"."+Ci+", ."+Ci+" *",$wrap:Ut}),pe=ti(te,{onStart:L,onMove:function(t,e){R(Zt,e.edge)},onTouchEnd:W,onEnd:function(t){function e(){I.l=t.newPos,j(),F(),y(t.newPos,!0)}if(t.moved)t.pos!==t.newPos?(Mt=!0,Je(te,{time:t.time,pos:t.newPos,overPos:t.overPos,onEnd:e}),y(t.newPos),Ct&&R(Zt,je(t.newPos,pe.min,pe.max))):e();else{var i=t.$target.closest("."+gi,te)[0];i&&U.call(i,t.startEvent)}},timeLow:.5,timeHigh:2,friction:5,$wrap:Zt}),he=ei(Ut,{shift:!0,onEnd:function(t,e){L(),W(),Wt.show({index:e,slow:t.altKey})}}),fe=ei(Zt,{onEnd:function(t,e){L(),W();var i=Ne(te)+.25*e;te.css(Se(Te(i,pe.min,pe.max))),Ct&&R(Zt,je(i,pe.min,pe.max)),fe.prevent={"<":i>=pe.max,">":i<=pe.min},clearTimeout(fe.t),fe.t=setTimeout(function(){y(I.l=i,!0)},Bi),y(i)}}),Vt.hover(function(){setTimeout(function(){At||H(!(Pt=!0))},0)},function(){Pt&&H(!(Pt=!1))}),Dt=function(t){Ke(t),Q.call(this,t)},Lt=(Lt={onStart:function(){L(),ue.control=!0},onTouchEnd:W})||{},Gt.each(function(){var e,t=xe(this),i=t.data();i.clickOn||(i.clickOn=!0,xe.extend(Ze(t,{onStart:function(t){e=t,(Lt.onStart||Ce).call(this,t)},onMove:Lt.onMove||Ce,onTouchEnd:Lt.onTouchEnd||Ce,onEnd:function(t){t.moved||Dt.call(this,e)}}),{noMove:!0}))}),Gt.each(function(){Xe(this,function(t){Q.call(this,t)}),X(this)}),Xe(ae,Wt.toggleFullScreen),X(ae),xe.each("load push pop shift unshift reverse sort splice".split(" "),function(t,e){Wt[e]=function(){return G=G||[],"load"!==e?Array.prototype[e].apply(G,arguments):arguments[0]&&"object"==typeof arguments[0]&&arguments[0].length&&(G=He(arguments[0])),Y(),Wt}}),Y()},xe.fn.fotorama=function(o){return this.each(function(){var e=this,t=xe(this),i=t.data(),n=i.fotorama;n?n.setOptions(o,!0):Le(function(){return!(0===(t=e).offsetWidth&&0===t.offsetHeight);var t},function(){i.urtext=t.html(),new xe.Fotorama(t,xe.extend({},S,a.fotoramaDefaults,o,i))})})},xe.Fotorama.instances=[],xe.Fotorama.cache={},xe.Fotorama.measures={},(xe=xe||{}).Fotorama=xe.Fotorama||{},xe.Fotorama.jst=xe.Fotorama.jst||{},xe.Fotorama.jst.style=function(t){var e;return""+(".fotorama"+(null==(e=t.s)?"":e)+" .fotorama__nav--thumbs .fotorama__nav__frame{\npadding:"+(null==(e=t.m)?"":e)+"px;\nheight:"+(null==(e=t.h)?"":e)+"px}\n.fotorama"+(null==(e=t.s)?"":e)+" .fotorama__thumb-border{\nheight:"+(null==(e=t.h-t.b*(t.q?0:2))?"":e)+"px;\nborder-width:"+(null==(e=t.b)?"":e)+"px;\nmargin-top:"+(null==(e=t.m)?"":e))+"px}"},xe.Fotorama.jst.video=function(t){var e="",i=Array.prototype.join;return e+='<div class="fotorama__video"><iframe src="',function(){e+=i.call(arguments,"")}(("youtube"==t.type?t.p+"youtube.com/embed/"+t.id+"?autoplay=1":"vimeo"==t.type?t.p+"player.vimeo.com/video/"+t.id+"?autoplay=1&badge=0":t.id)+(t.s&&"custom"!=t.type?"&"+t.s:"")),e+='" frameborder="0" allowfullscreen></iframe></div>\n'},xe(function(){xe("."+ni+':not([data-auto="false"])').fotorama(),"http://"===Ae()&&ye.host.match(/\./)&&!a.blockFotoramaData&&xe("body").append('<iframe src="http://data.fotorama.io/?version='+fotoramaVersion+'" style="display: none;"></iframe>')})}(window,document,location,"undefined"!=typeof jQuery&&jQuery),function(e){"function"==typeof define&&define.amd?define(["jquery"],function(t){e(t)}):"object"==typeof module&&"object"==typeof module.exports?module.exports=e(require("jquery")):e(jQuery)}(function(t){"use strict";var e,i;if(t.uaMatch=function(t){t=t.toLowerCase();var e=/(edge)\/([\w.]+)/.exec(t)||/(opr)[\/]([\w.]+)/.exec(t)||/(chrome)[ \/]([\w.]+)/.exec(t)||/(version)(applewebkit)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(t)||/(webkit)[ \/]([\w.]+).*(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(t)||/(webkit)[ \/]([\w.]+)/.exec(t)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(t)||/(msie) ([\w.]+)/.exec(t)||0<=t.indexOf("trident")&&/(rv)(?::|)([\w.]+)/.exec(t)||t.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(t)||[],i=/(ipad)/.exec(t)||/(ipod)/.exec(t)||/(iphone)/.exec(t)||/(kindle)/.exec(t)||/(silk)/.exec(t)||/(android)/.exec(t)||/(windows phone)/.exec(t)||/(win)/.exec(t)||/(mac)/.exec(t)||/(linux)/.exec(t)||/(cros)/.exec(t)||/(playbook)/.exec(t)||/(bb)/.exec(t)||/(blackberry)/.exec(t)||[];return{browser:e[5]||e[3]||e[1]||"",version:e[2]||e[4]||"0",versionNumber:e[4]||e[2]||"0",platform:i[0]||""}},i={},(e=t.uaMatch(window.navigator.userAgent)).browser&&(i[e.browser]=!0,i.version=e.version,i.versionNumber=parseInt(e.versionNumber,10)),e.platform&&(i[e.platform]=!0),(i.android||i.bb||i.blackberry||i.ipad||i.iphone||i.ipod||i.kindle||i.playbook||i.silk||i["windows phone"])&&(i.mobile=!0),(i.cros||i.mac||i.linux||i.win)&&(i.desktop=!0),(i.chrome||i.opr||i.safari)&&(i.webkit=!0),i.rv||i.edge){e.browser="msie",i.msie=!0}if(i.safari&&i.blackberry){var n="blackberry";i[e.browser=n]=!0}if(i.safari&&i.playbook){var o="playbook";i[e.browser=o]=!0}if(i.bb){var a="blackberry";i[e.browser=a]=!0}if(i.opr){e.browser="opera",i.opera=!0}if(i.safari&&i.android){var s="android";i[e.browser=s]=!0}if(i.safari&&i.kindle){e.browser="kindle",i.kindle=!0}if(i.safari&&i.silk){e.browser="silk",i.silk=!0}return i.name=e.browser,i.platform=e.platform,t.browser=i}),function(d){d.fn.addBack=d.fn.addBack||d.fn.andSelf,d.fn.extend({actual:function(t,e){if(!this[t])throw'$.actual=> The jQuery method "'+t+'" you called does not exist';var i,n,o=d.extend({absolute:!1,clone:!1,includeMargin:!1},e),a=this.eq(0);if(!0===o.clone)i=function(){a=a.clone().attr("style","position: absolute !important; top: -1000 !important; ").appendTo("body")},n=function(){a.remove()};else{var s,r=[],l="";i=function(){s=a.parents().addBack().filter(":hidden"),l+="visibility: hidden !important; display: block !important; ",!0===o.absolute&&(l+="position: absolute !important; "),s.each(function(){var t=d(this),e=t.attr("style");r.push(e),t.attr("style",e?e+";"+l:l)})},n=function(){s.each(function(t){var e=d(this),i=r[t];void 0===i?e.removeAttr("style"):e.attr("style",i)})}}i();var c=/(outer)/.test(t)?a[t](o.includeMargin):a[t]();return n(),c}})}(jQuery),function(a){a.fn.bsPinning=function(t){var e={smart:!0,onPin:function(){},onTop:a.noop,onUnpin:function(){},onNormal:function(){},wrapper_class:""},i=a.extend({},e,t),n={lastScrollTop:a(window).scrollTop(),status:""},o={isNormal:function(){return"normal"===n.status},isUnpinned:function(){return"unpinned"===n.status},isPinned:function(){return"pinned"===n.status},prepare:function(){n.target.addClass("bs-pinning-block"),i.smart&&n.target.addClass("smart"),n.wrapper_height=n.target.actual("outerHeight"),n.wrapper.css("height",n.wrapper_height),i.wrapper_class&&n.wrapper.addClass(i.wrapper_class),o.pinHandler()},pin:function(){n.status="pinned",n.target.removeClass("unpinned normal unpinned-no-transition").addClass("pinned"),i.onPin.call(n.target),a("body").hasClass("admin-bar")&&600<window.innerWidth&&n.target.css("top",a("#wpadminbar").actual("outerHeight"))},unpin:function(){n.status="unpinned",n.target.removeClass("pinned top normal").addClass("unpinned"),i.onUnpin.call(n.target)},top:function(){n.status="top",i.onTop.call(n.target)},normal:function(){n.status="normal",n.target.removeClass("pinned top unpinned").addClass("normal unpinned-no-transition"),i.onNormal.call(n.target),a("body").hasClass("admin-bar")&&n.target.css("top","")},fire:function(t){if(this.prevMethodName===t)return!1;if("function"!=typeof this[t])return!1;this.prevMethodName=t;var e=Array.prototype.slice.call(arguments,1);return this[t].apply(this,e)},pinHandler:function(){var t=a(window).scrollTop(),e=n.wrapper.offset().top;i.smart&&!n.wrapper.hasClass("stop-smarty-pinning")?t<=0?(o.fire("top"),o.fire("normal")):t>=n.lastScrollTop&&e+n.wrapper_height>=t||t<n.lastScrollTop&&t<=e?o.fire("normal"):t>=n.lastScrollTop?o.fire("unpin"):o.fire("pin"):0===t?(o.fire("top"),o.fire("normal")):e+1<t?o.fire("pin"):t<e&&o.fire("normal"),n.lastScrollTop=t}};return this.each(function(){a(this).wrap("<div class='bs-pinning-wrapper'></div>"),n.wrapper=a(this).closest(".bs-pinning-wrapper"),n.target=a(this),o.prepare(),a(window).on("scroll",o.pinHandler)})}}(jQuery),function(t,e){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",e):"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}(this,function(){function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var i=this._events=this._events||{},n=i[t]=i[t]||[];return-1==n.indexOf(e)&&n.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var i=this._onceEvents=this._onceEvents||{};return(i[t]=i[t]||[])[e]=!0,this}},e.off=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var n=i.indexOf(e);return-1!=n&&i.splice(n,1),this}},e.emitEvent=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var n=0,o=i[n];e=e||[];for(var a=this._onceEvents&&this._onceEvents[t];o;){var s=a&&a[o];s&&(this.off(t,o),delete a[o]),o.apply(this,e),o=i[n+=s?0:1]}return this}},t}),function(e,i){"use strict";"function"==typeof define&&define.amd?define(["ev-emitter/ev-emitter"],function(t){return i(e,t)}):"object"==typeof module&&module.exports?module.exports=i(e,require("ev-emitter")):e.imagesLoaded=i(e,e.EvEmitter)}(window,function(e,t){function n(t,e){for(var i in e)t[i]=e[i];return t}function o(t,e,i){return this instanceof o?("string"==typeof t&&(t=document.querySelectorAll(t)),this.elements=function(t){var e=[];if(Array.isArray(t))e=t;else if("number"==typeof t.length)for(var i=0;i<t.length;i++)e.push(t[i]);else e.push(t);return e}(t),this.options=n({},this.options),"function"==typeof e?i=e:n(this.options,e),i&&this.on("always",i),this.getImages(),s&&(this.jqDeferred=new s.Deferred),void setTimeout(function(){this.check()}.bind(this))):new o(t,e,i)}function i(t){this.img=t}function a(t,e){this.url=t,this.element=e,this.img=new Image}var s=e.jQuery,r=e.console;(o.prototype=Object.create(t.prototype)).options={},o.prototype.getImages=function(){this.images=[],this.elements.forEach(this.addElementImages,this)},o.prototype.addElementImages=function(t){"IMG"==t.nodeName&&this.addImage(t),!0===this.options.background&&this.addElementBackgroundImages(t);var e=t.nodeType;if(e&&l[e]){for(var i=t.querySelectorAll("img"),n=0;n<i.length;n++){var o=i[n];this.addImage(o)}if("string"==typeof this.options.background){var a=t.querySelectorAll(this.options.background);for(n=0;n<a.length;n++){var s=a[n];this.addElementBackgroundImages(s)}}}};var l={1:!0,9:!0,11:!0};return o.prototype.addElementBackgroundImages=function(t){var e=getComputedStyle(t);if(e)for(var i=/url\((['"])?(.*?)\1\)/gi,n=i.exec(e.backgroundImage);null!==n;){var o=n&&n[2];o&&this.addBackground(o,t),n=i.exec(e.backgroundImage)}},o.prototype.addImage=function(t){var e=new i(t);this.images.push(e)},o.prototype.addBackground=function(t,e){var i=new a(t,e);this.images.push(i)},o.prototype.check=function(){function e(t,e,i){setTimeout(function(){n.progress(t,e,i)})}var n=this;return this.progressedCount=0,this.hasAnyBroken=!1,this.images.length?void this.images.forEach(function(t){t.once("progress",e),t.check()}):void this.complete()},o.prototype.progress=function(t,e,i){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!t.isLoaded,this.emitEvent("progress",[this,t,e]),this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,t),this.progressedCount==this.images.length&&this.complete(),this.options.debug&&r&&r.log("progress: "+i,t,e)},o.prototype.complete=function(){var t=this.hasAnyBroken?"fail":"done";if(this.isComplete=!0,this.emitEvent(t,[this]),this.emitEvent("always",[this]),this.jqDeferred){var e=this.hasAnyBroken?"reject":"resolve";this.jqDeferred[e](this)}},(i.prototype=Object.create(t.prototype)).check=function(){return this.getIsImageComplete()?void this.confirm(0!==this.img.naturalWidth,"naturalWidth"):(this.proxyImage=new Image,this.proxyImage.addEventListener("load",this),this.proxyImage.addEventListener("error",this),this.img.addEventListener("load",this),this.img.addEventListener("error",this),void(this.proxyImage.src=this.img.src))},i.prototype.getIsImageComplete=function(){return this.img.complete&&void 0!==this.img.naturalWidth},i.prototype.confirm=function(t,e){this.isLoaded=t,this.emitEvent("progress",[this,this.img,e])},i.prototype.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},i.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},i.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},i.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this),this.proxyImage.removeEventListener("error",this),this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},(a.prototype=Object.create(i.prototype)).check=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.img.src=this.url,this.getIsImageComplete()&&(this.confirm(0!==this.img.naturalWidth,"naturalWidth"),this.unbindEvents())},a.prototype.unbindEvents=function(){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},a.prototype.confirm=function(t,e){this.isLoaded=t,this.emitEvent("progress",[this,this.element,e])},(o.makeJQueryPlugin=function(t){(t=t||e.jQuery)&&((s=t).fn.imagesLoaded=function(t,e){return new o(this,t,e).jqDeferred.promise(s(this))})})(),o}),function(n){n.betterNewsticker=function(t,e){var i=this;i.$el=n(t),i.el=t,i.$el.data("betterNewsticker",i),i.init=function(){i.options=n.extend({},n.betterNewsticker.defaultOptions,e),void 0!==i.$el.data("speed")&&(i.options.speed=i.$el.data("speed")),i.$el.find("li.active").length||i.$el.find("li:first").addClass("active"),window.setInterval(function(){i.next()},i.options.speed),i.options.control_nav&&(i.$el.append('<div class="control-nav"><span class="prev">'+i.options.prev_label+'</span><span class="next">'+i.options.next_label+"</span></div>"),i.$el.on("click",".control-nav .prev",function(){i.prev()}),i.$el.on("click",".control-nav .next",function(){i.next()}))},i.next=function(){var t=i.$el.find("li.active").next();t.length||(t=i.$el.find("li:first")),i.$el.find("li.active").removeClass("active"),t.addClass("active").fadeIn()},i.prev=function(){var t=i.$el.find("li.active").prev();t.length||(t=i.$el.find("li:last")),i.$el.find("li.active").removeClass("active"),t.addClass("active").fadeIn()},i.init()},n.betterNewsticker.defaultOptions={speed:8e3,control_nav:!1,prev_label:'<i class="fa fa-angle-left"></i>',next_label:'<i class="fa fa-angle-right"></i>'},n.fn.betterNewsticker=function(t){return this.each(function(){new n.betterNewsticker(this,t)})}}(jQuery),function(s,a){var r={customClass:"simply-scroll",frameRate:24,speed:1,orientation:"horizontal",auto:!0,autoMode:"loop",manualMode:"end",direction:"forwards",pauseOnHover:!0,pauseOnTouch:!0,pauseButton:!(s.fn.simplyScroll=function(t){return this.each(function(){new s.simplyScroll(this,t)})}),startOnLoad:!1};s.simplyScroll=function(t,e){var i=this;this.o=s.extend({},r,e||{}),this.isAuto=!1!==this.o.auto&&null!==this.o.autoMode.match(/^loop|bounce$/),this.isRTL=(this.isHorizontal=null!==this.o.orientation.match(/^horizontal|vertical$/)&&this.o.orientation==r.orientation)&&"rtl"==s("html").attr("dir"),this.isForwards=!this.isAuto||this.isAuto&&null!==this.o.direction.match(/^forwards|backwards$/)&&this.o.direction==r.direction&&!this.isRTL,this.isLoop=this.isAuto&&"loop"==this.o.autoMode||!this.isAuto&&"loop"==this.o.manualMode,this.events=(this.supportsTouch="createTouch"in document)?{start:"touchstart MozTouchDown",move:"touchmove MozTouchMove",end:"touchend touchcancel MozTouchRelease"}:{start:"mouseenter",end:"mouseleave"},this.$list=s(t);var n=this.$list.children();if(this.$list.addClass("simply-scroll-list").wrap('<div class="simply-scroll-clip"></div>').parent().wrap('<div class="'+this.o.customClass+' simply-scroll-container"></div>'),this.isAuto?this.o.pauseButton&&(this.$list.parent().parent().prepend('<div class="simply-scroll-btn simply-scroll-btn-pause"></div>'),this.o.pauseOnHover=!1):this.$list.parent().parent().prepend('<div class="simply-scroll-forward"></div>').prepend('<div class="simply-scroll-back"></div>'),1<n.length){var o=0;(this.isHorizontal?(n.each(function(){o+=s(this).outerWidth(!0)}),n.eq(0).outerWidth(!0)*n.length!==o):(n.each(function(){o+=s(this).outerHeight(!0)}),n.eq(0).outerHeight(!0)*n.length!==o))&&(this.$list=this.$list.wrap("<div></div>").parent().addClass("simply-scroll-list"),this.isHorizontal?this.$list.children().css({float:"left",width:o+"px"}):this.$list.children().css({height:o+"px"}))}this.o.startOnLoad?s(a).load(function(){i.init()}):this.init()},s.simplyScroll.fn=s.simplyScroll.prototype={},s.simplyScroll.fn.extend=s.simplyScroll.extend=s.extend,s.simplyScroll.fn.extend({init:function(){this.$items=this.$list.children(),this.$clip=this.$list.parent(),this.$container=this.$clip.parent(),this.$btnBack=s(".simply-scroll-back",this.$container),this.$btnForward=s(".simply-scroll-forward",this.$container),this.isHorizontal?(this.itemMax=this.$items.eq(0).outerWidth(!0),this.clipMax=this.$clip.width(),this.dimension="width",this.moveBackClass="simply-scroll-btn-left",this.moveForwardClass="simply-scroll-btn-right",this.scrollPos="Left"):(this.itemMax=this.$items.eq(0).outerHeight(!0),this.clipMax=this.$clip.height(),this.dimension="height",this.moveBackClass="simply-scroll-btn-up",this.moveForwardClass="simply-scroll-btn-down",this.scrollPos="Top"),this.posMin=0,this.posMax=this.$items.length*this.itemMax;var t=Math.ceil(this.clipMax/this.itemMax);if(this.isAuto&&"loop"==this.o.autoMode)this.$list.css(this.dimension,this.posMax+this.itemMax*t+"px"),this.posMax+=this.clipMax-this.o.speed,this.isForwards?(this.$items.slice(0,t).clone(!0).appendTo(this.$list),this.resetPosition=0):(this.$items.slice(-t).clone(!0).prependTo(this.$list),this.resetPosition=this.$items.length*this.itemMax,this.isRTL&&(this.$clip[0].dir="ltr",this.$items.css("float","right")));else if(this.isAuto||"loop"!=this.o.manualMode)this.$list.css(this.dimension,this.posMax+"px"),this.isForwards?this.resetPosition=0:(this.resetPosition=this.$items.length*this.itemMax,this.isRTL&&(this.$clip[0].dir="ltr",this.$items.css("float","right")));else{this.posMax+=this.itemMax*t,this.$list.css(this.dimension,this.posMax+this.itemMax*t+"px"),this.posMax+=this.clipMax-this.o.speed,this.$items.slice(0,t).clone(!0).appendTo(this.$list),this.$items.slice(-t).clone(!0).prependTo(this.$list),this.resetPositionForwards=this.resetPosition=t*this.itemMax,this.resetPositionBackwards=this.$items.length*this.itemMax;var i=this;this.$btnBack.bind(this.events.start,function(){i.isForwards=!1,i.resetPosition=i.resetPositionBackwards}),this.$btnForward.bind(this.events.start,function(){i.isForwards=!0,i.resetPosition=i.resetPositionForwards})}if(this.resetPos(),this.interval=null,this.intervalDelay=Math.floor(1e3/this.o.frameRate),this.isAuto||"end"!=this.o.manualMode)for(;0!=this.itemMax%this.o.speed;)if(this.o.speed--,0===this.o.speed){this.o.speed=1;break}if((i=this).trigger=null,this.funcMoveBack=function(t){void 0!==t&&t.preventDefault(),i.trigger=i.isAuto||"end"!=i.o.manualMode?null:this,!i.isAuto||i.isForwards?i.moveBack():i.moveForward()},this.funcMoveForward=function(t){void 0!==t&&t.preventDefault(),i.trigger=i.isAuto||"end"!=i.o.manualMode?null:this,!i.isAuto||i.isForwards?i.moveForward():i.moveBack()},this.funcMovePause=function(){i.movePause()},this.funcMoveStop=function(){i.moveStop()},this.funcMoveResume=function(){i.moveResume()},this.isAuto){this.paused=!1;function n(){return!1===i.paused?(i.paused=!0,i.funcMovePause()):(i.paused=!1,i.funcMoveResume()),i.paused}if(this.supportsTouch&&this.$items.find("a").length&&(this.supportsTouch=!1),this.isAuto&&this.o.pauseOnHover&&!this.supportsTouch)this.$clip.bind(this.events.start,this.funcMovePause).bind(this.events.end,this.funcMoveResume);else if(this.isAuto&&this.o.pauseOnTouch&&!this.o.pauseButton&&this.supportsTouch){var o,a;this.$clip.bind(this.events.start,function(t){n();var e=t.originalEvent.touches[0];o=i.isHorizontal?e.pageX:e.pageY,a=i.$clip[0]["scroll"+i.scrollPos],t.stopPropagation(),t.preventDefault()}).bind(this.events.move,function(t){t.stopPropagation(),t.preventDefault(),t=t.originalEvent.touches[0],(t=o-(i.isHorizontal?t.pageX:t.pageY)+a)<0?t=0:t>i.posMax&&(t=i.posMax),i.$clip[0]["scroll"+i.scrollPos]=t,i.funcMovePause(),i.paused=!0})}else this.o.pauseButton&&(this.$btnPause=s(".simply-scroll-btn-pause",this.$container).bind("click",function(t){t.preventDefault(),n()?s(this).addClass("active"):s(this).removeClass("active")}));this.funcMoveForward()}else this.$btnBack.addClass("simply-scroll-btn "+this.moveBackClass).bind(this.events.start,this.funcMoveBack).bind(this.events.end,this.funcMoveStop),this.$btnForward.addClass("simply-scroll-btn "+this.moveForwardClass).bind(this.events.start,this.funcMoveForward).bind(this.events.end,this.funcMoveStop),"end"==this.o.manualMode&&(this.isRTL?this.$btnForward.addClass("disabled"):this.$btnBack.addClass("disabled"))},moveForward:function(){var t=this;this.movement="forward",null!==this.trigger&&this.$btnBack.removeClass("disabled"),t.interval=setInterval(function(){t.$clip[0]["scroll"+t.scrollPos]<t.posMax-t.clipMax?t.$clip[0]["scroll"+t.scrollPos]+=t.o.speed:t.isLoop?t.resetPos():t.moveStop(t.movement)},t.intervalDelay)},moveBack:function(){var t=this;this.movement="back",null!==this.trigger&&this.$btnForward.removeClass("disabled"),t.interval=setInterval(function(){t.$clip[0]["scroll"+t.scrollPos]>t.posMin?t.$clip[0]["scroll"+t.scrollPos]-=t.o.speed:t.isLoop?t.resetPos():t.moveStop(t.movement)},t.intervalDelay)},movePause:function(){clearInterval(this.interval)},moveStop:function(t){this.movePause(),null!==this.trigger&&(void 0!==t&&s(this.trigger).addClass("disabled"),this.trigger=null),this.isAuto&&"bounce"==this.o.autoMode&&("forward"==t?this.moveBack():this.moveForward())},moveResume:function(){"forward"==this.movement?this.moveForward():this.moveBack()},resetPos:function(){this.$clip[0]["scroll"+this.scrollPos]=this.resetPosition}})}(jQuery,window),function(b,w,y){"use strict";var x=b(w),s=w.document,C=b(s),T=function(){for(var t=3,e=s.createElement("div"),i=e.getElementsByTagName("i");e.innerHTML="\x3c!--[if gt IE "+ ++t+"]><i></i><![endif]--\x3e",i[0];);return 4<t?t:void 0}(),S=function(){var t=w.pageXOffset!==y?w.pageXOffset:"CSS1Compat"==s.compatMode?w.document.documentElement.scrollLeft:w.document.body.scrollLeft,e=w.pageYOffset!==y?w.pageYOffset:"CSS1Compat"==s.compatMode?w.document.documentElement.scrollTop:w.document.body.scrollTop;void 0===S.x&&(S.x=t,S.y=e),void 0===S.distanceX?(S.distanceX=t,S.distanceY=e):(S.distanceX=t-S.x,S.distanceY=e-S.y);var i=S.x-t,n=S.y-e;S.direction=i<0?"right":0<i?"left":n<=0?"down":0<n?"up":"first",S.x=t,S.y=e};x.on("scroll",S),b.fn.style=function(t){if(!t)return null;var i,n=b(this),o=n.clone().css("display","none");o.find("input:radio").attr("name","copy-"+Math.floor(100*Math.random()+1)),n.after(o);function a(t,e){var i;return t.currentStyle?i=t.currentStyle[e.replace(/-\w/g,function(t){return t.toUpperCase().replace("-","")})]:w.getComputedStyle&&(i=s.defaultView.getComputedStyle(t,null).getPropertyValue(e)),!/margin/g.test(e)||parseInt(i)===n[0].offsetLeft?i:"auto"}return"string"==typeof t?i=a(o[0],t):(i={},b.each(t,function(t,e){i[e]=a(o[0],e)})),o.remove(),i||null},b.fn.extend({hcSticky:function(t){return 0==this.length?this:(this.pluginOptions("hcSticky",{top:0,bottom:0,bottomEnd:0,innerTop:0,innerSticker:null,className:"sticky",wrapperClassName:"wrapper-sticky",stickTo:null,responsive:!0,followScroll:!0,offResolutions:null,onStart:b.noop,onStop:b.noop,on:!0,fn:null},t||{},{reinit:function(){b(this).hcSticky()},stop:function(){b(this).pluginOptions("hcSticky",{on:!1}).each(function(){var t=b(this),e=t.pluginOptions("hcSticky"),i=t.parent("."+e.wrapperClassName),n=t.offset().top-i.offset().top;t.stop().css({position:"absolute",top:n,bottom:"auto",left:"auto",right:"auto"}).removeClass(e.className)})},off:function(){b(this).pluginOptions("hcSticky",{on:!1}).each(function(){var t=b(this),e=t.pluginOptions("hcSticky"),i=t.parent("."+e.wrapperClassName);t.stop().css({position:"relative",top:"auto",bottom:"auto",left:"auto",right:"auto"}).removeClass(e.className),i.css("height","auto")})},on:function(){b(this).each(function(){b(this).pluginOptions("hcSticky",{on:!0,remember:{offsetTop:x.scrollTop()}}).hcSticky()})},destroy:function(){var t=b(this),e=t.pluginOptions("hcSticky"),i=t.parent("."+e.wrapperClassName);t.removeData("hcStickyInit").stop().css({position:i.css("position"),top:i.css("top"),bottom:i.css("bottom"),left:i.css("left"),right:i.css("right")}).removeClass(e.className),x.off("resize",e.fn.resize).off("scroll",e.fn.scroll),t.unwrap()}}),t&&void 0!==t.on&&(t.on?this.hcSticky("on"):this.hcSticky("off")),"string"==typeof t?this:this.each(function(){var t,e,i,n,o,a,u=b(this),h=u.pluginOptions("hcSticky"),p=(a=u.parent("."+h.wrapperClassName),u.trigger("hcSticky-reinit",[u,a,h]),0<a.length&&(a.stop().css({height:u.outerHeight(!0),width:0<=(o=a.style("width")).indexOf("%")||"auto"==o?("border-box"==u.css("box-sizing")||"border-box"==u.css("-moz-box-sizing")?u.css("width",a.width()):u.css("width",a.width()-parseInt(u.css("padding-left")-parseInt(u.css("padding-right")))),o):u.outerWidth(!0)}),a)||(e=u.style(["width","margin-left","left","right","top","bottom","float","display"]),i=u.css("display"),n=b("<div>",{class:h.wrapperClassName}).stop().css({display:i,height:u.outerHeight(!0),width:0<=e.width.indexOf("%")||"auto"==e.width&&"inline-block"!=i&&"inline"!=i?(u.css("width",parseFloat(u.css("width"))),e.width):"auto"!=e.width||"inline-block"!=i&&"inline"!=i?"auto"==e["margin-left"]?u.outerWidth():u.outerWidth(!0):u.width(),margin:e["margin-left"]?"auto":null,position:"static"==(t=u.css("position"))?"relative":t,float:e.float||null,left:e.left,right:e.right,top:e.top,bottom:e.bottom,"vertical-align":"top"}),u.wrap(n),7===T&&0===b("head").find("style#hcsticky-iefix").length&&b('<style id="hcsticky-iefix">.'+h.wrapperClassName+" {zoom: 1;}</style>").appendTo("head"),u.parent()));if(!u.data("hcStickyInit")){u.data("hcStickyInit",!0);var f=!(!h.stickTo||!("document"==h.stickTo||h.stickTo.nodeType&&9==h.stickTo.nodeType||"object"==typeof h.stickTo&&h.stickTo instanceof("undefined"!=typeof HTMLDocument?HTMLDocument:Document))),m=h.stickTo?f?C:"string"==typeof h.stickTo?b(h.stickTo):h.stickTo:p.parent();u.stop().css({top:"auto",bottom:"auto",left:"auto",right:"auto"}),x.load(function(){u.outerHeight(!0)>m.height()&&(p.css("height",u.outerHeight(!0)),u.hcSticky("reinit"))});var v=function(t){u.hasClass(h.className)||(t=t||{},u.stop().css({position:"fixed",top:t.top||0,left:t.left||p.offset().left}).addClass(h.className),h.onStart.apply(u[0]),p.addClass("sticky-active"))},g=function(t){(t=t||{}).position=t.position||"absolute",t.top=t.top||0,t.left=t.left||0,"fixed"!=u.css("position")&&parseInt(u.css("top"))==t.top||(u.stop().css({position:t.position,top:t.top,left:t.left}).removeClass(h.className),h.onStop.apply(u[0]),p.removeClass("sticky-active"))},s=!1,r=!1,l=function(){if(d(),c(),h.on){if(h.responsive){r||(r=u.clone().attr("style","").css({visibility:"hidden",height:0,overflow:"hidden",paddingTop:0,paddingBottom:0,marginTop:0,marginBottom:0}),p.after(r));var t=p.style("width"),e=r.style("width");"auto"==e&&"auto"!=t&&(e=parseInt(u.css("width"))),e!=t&&p.width(e),s&&clearTimeout(s),s=setTimeout(function(){s=!1,r.remove(),r=!1},250)}if("fixed"==u.css("position")?u.css("left",p.offset().left):u.css("left",0),u.outerWidth(!0)!=p.width()){var i="border-box"==u.css("box-sizing")||"border-box"==u.css("-moz-box-sizing")?p.width():p.width()-parseInt(u.css("padding-left"))-parseInt(u.css("padding-right"));i=i-parseInt(u.css("margin-left"))-parseInt(u.css("margin-right")),u.css("width",i)}}};u.pluginOptions("hcSticky",{fn:{scroll:function(){if(h.on&&u.is(":visible")){if(u.outerHeight(!0)>=m.height())return void g();var t,e=h.innerSticker?b(h.innerSticker).position().top:h.innerTop?h.innerTop:0,i=p.offset().top,n=m.height()-h.bottomEnd+(f?0:i),o=p.offset().top-h.top+e,a=u.outerHeight(!0)+h.bottom,s=x.height(),r=x.scrollTop(),l=u.offset().top,c=l-r;if(void 0!==h.remember&&h.remember){var d=l-h.top-e;return void(s<a-e&&h.followScroll?d<r&&r+s<=d+u.height()&&(h.remember=!1):h.remember.offsetTop>d?r<=d&&(v({top:h.top-e}),h.remember=!1):d<=r&&(v({top:h.top-e}),h.remember=!1))}o<r?n+h.bottom-(h.followScroll&&s<a?0:h.top)<=r+a-e-(s-(o-e)<a-e&&h.followScroll&&0<(t=a-s-e)?t:0)?g({top:n-a+h.bottom-i}):s<a-e&&h.followScroll?c+a<=s?"down"==S.direction?v({top:s-a}):c<0&&"fixed"==u.css("position")&&g({top:l-(o+h.top-e)-S.distanceY}):"up"==S.direction&&l>=r+h.top-e?v({top:h.top-e}):"down"==S.direction&&s<l+a&&"fixed"==u.css("position")&&g({top:l-(o+h.top-e)-S.distanceY}):v({top:h.top-e}):g()}},resize:l}});var c=function(){if(h.offResolutions){b.isArray(h.offResolutions)||(h.offResolutions=[h.offResolutions]);var i=!0;b.each(h.offResolutions,function(t,e){e<0?x.width()<-1*e&&(i=!1,u.hcSticky("off")):x.width()>e&&(i=!1,u.hcSticky("off"))}),i&&!h.on&&u.hcSticky("on")}};c(),x.on("resize",l);var d=function(){var i=!1;b._data(w,"events").scroll!=y&&b.each(b._data(w,"events").scroll,function(t,e){e.handler==h.fn.scroll&&(i=!0)}),i||(h.fn.scroll(!0),x.on("scroll",h.fn.scroll))};d()}}))}})}(jQuery,this),function(a){"use strict";a.fn.extend({pluginOptions:function(e,i,n,o){return this.data(e)||this.data(e,{}),e&&void 0===i?this.data(e).options:"object"==typeof(n=n||i||{})||void 0===n?this.each(function(){var t=a(this);t.data(e).options?t.data(e,a.extend(t.data(e),{options:a.extend(t.data(e).options,n||{})})):(t.data(e,{options:a.extend(i,n||{})}),o&&(t.data(e).commands=o))}):"string"==typeof n?this.each(function(){var t=a(this).data(e).commands;t&&t[n]&&t[n].call(this)}):this}})}(jQuery),function(){function o(t,e){this.element=t[0],this.$element=t,this.overflowElements=[],this.elementsWidth=0,this.lastExecutedBR=0,this.handleBR=!1,this.enable=!0,this.options=c.extend({childClass:!1,mustDisplayClass:!1,menuContainerTag:"div",menuContainerClass:"bs-pretty-tabs-container",menuContainerPosition:"beginning",itemsWrapperSelector:!1,moreContainer:'<a href="#" class="bs-pretty-tabs-more">More <i class="fa fa-angle-down" aria-hidden="true"></i></a><div class="bs-pretty-tabs-elements"></div>',getContainerWidth:function(t){return t},initWrapperContainer:function(t){return t},styleChangesAt:[]},e),this.options.styleChangesAt.length&&(this.handleBR=!0,this.options.styleChangesAt=this.options.styleChangesAt.sort(function(t,e){return e<t})),this.init()}var c;(c=jQuery).extend(o.prototype,{init:function(){var e=this;function t(){if(e.handleBR&&e.enable){var t=e.getCurrentBR();t!==e.lastExecutedBR&&(e.retrieveElements(!0),e.getItems().each(function(){var t=c(this);e._updateElementWidth(t)}),e.lastExecutedBR=t)}e.handlePrettyTabs()}c(window).on("resize.bsPrettyTabs",t),e.$element.addClass("bs-pretty-tabs bs-pretty-tabs-initialized"),t()},getItemsWrapper:function(){return this.options.itemsWrapperSelector?this.$element.find(this.options.itemsWrapperSelector):this.$element},getItems:function(t){return this.getItemsWrapper().children(t)},getCurrentBR:function(){var t=0;for(i=0;i<this.options.styleChangesAt.length;i++)if(this.options.styleChangesAt[i]>=window.outerWidth){t=this.options.styleChangesAt[i];break}return t},handlePrettyTabs:function(){var e=this;if(e.enable){e.collectOverflowElements(),e.overflowElements.length?e.overflowElements.forEach(function(t){e.moveToInvisibleContainer(t)}):e.retrieveElements();var t=this._getTotalWidth(),i=this._getMenuLinkWidth(),n=this._getMenuContainer();if(t<i)n.hide();else{var o=t;e._getVisibleElement().each(function(){o-=e._getElementWidth(c(this))}),n[i<=o&&e._getInvisibleElements().length?"show":"hide"]()}this.$element.trigger("after-pretty-tabs",[this])}},retrieveElements:function(t){var e=this.options.getContainerWidth.call(this,this.$element.width()),i=this.elementsWidth,n=this;if(n._getInvisibleElements().length){for(var o=this.getInvisibleElementsContainer().children(),a=!1,s=0;s<o.length;s++){var r=c(o[s]),l=i+n._getElementWidth(r);if(!(t||l<e))break;i=l,n.moveToVisibleContainer(r),a=!0}1!==o.length||a||l-n._getMenuLinkWidth()<e&&(n.moveToVisibleContainer(o),n._getMenuContainer().remove())}else this._getMenuContainer().remove()},_getInvisibleElements:function(){var t=this.options.menuContainerClass;return this.$element.find("."+t+" .bs-pretty-tabs-elements").children()},_updateElementWidth:function(t){var e=t.outerWidth(!0)+1;return"hidden"!==t.data("bs-visibility")&&(t.data("bs-width",e),e)},_getElementWidth:function(t){return"hidden"===t.data("bs-visibility")?t.data("bs-width"):this._updateElementWidth(t)},_getVisibleElement:function(){var t=this.options.menuContainerClass;return this.getItems(":not(."+t+"):last")},_getMenuContainer:function(){var t=this.$element.find("."+this.options.menuContainerClass);return t.length?t:this._setMenuContainer()},_setMenuContainer:function(){var t=c("<"+this.options.menuContainerTag+"/>",{class:this.options.menuContainerClass});return(t=this.options.initWrapperContainer.call(this,t)).append(this.options.moreContainer),"end"===this.options.menuContainerPosition?t.appendTo(this.getItemsWrapper()):t.prependTo(this.getItemsWrapper()),t.on("mouseover",function(){c(this).addClass("display-more-items")}).on("mouseout",function(){c(this).removeClass("display-more-items")}).on("click",function(){c(this).toggleClass("display-more-items")}),t},_getMenuLinkWidth:function(t){var e=this.options.menuContainerClass,i=this.$element.find("."+e+" .bs-pretty-tabs-more");t=t||!1;return i.length||t?this._getElementWidth(i)||0:(this._setMenuContainer(),this._getMenuLinkWidth(!0))},_getTotalWidth:function(){return this.options.getContainerWidth.call(this,this.$element.width())},getInvisibleElementsContainer:function(){return c(".bs-pretty-tabs-elements",this._getMenuContainer())},moveToInvisibleContainer:function(t){var e=this.getInvisibleElementsContainer(),i=c(t);i.data("bs-visibility","hidden"),i.prependTo(e)},moveToVisibleContainer:function(t){var e=this._getMenuContainer();t.data("bs-visibility","visible"),"end"===this.options.menuContainerPosition?t.insertBefore(this._getMenuContainer()):t.appendTo(e.parent())},collectOverflowElements:function(){var e=this._getTotalWidth(),i=this;this.overflowElements=[],this.elementsWidth=i._getMenuLinkWidth();var n=0;this.getItems().each(function(){var t=c(this);t.hasClass(i.options.menuContainerClass)||(n=i._getElementWidth(t),i.elementsWidth+=n,i.elementsWidth>e&&(t.hasClass(i.options.menuContainerClass)||i.options.mustDisplayClass&&t.hasClass(i.options.mustDisplayClass)||i.overflowElements.push(t)))}),1===i.overflowElements.length&&i.elementsWidth-i._getMenuLinkWidth()+n<e&&i.overflowElements.pop(),i.overflowElements=i.overflowElements.reverse()},changeState:function(t){this.enable="start"===t}}),c.fn.bsPrettyTabs=function(n){return this.each(function(){var t=c(this);if("string"==typeof n){var e=t.data("bs-pretty-tabs");e&&e.changeState&&e.changeState(n)}else if(!t.data("bs-pretty-tabs")){var i=new o(t,n);t.data("bs-pretty-tabs",i)}})}}(),function(){function i(t){return Array.prototype.slice.call(t)}function s(e,i){var n=e.nodeName.toLowerCase(),t=document.createElement("img");t.addEventListener("load",function(){var t;"img"===n?((t=e).hasAttribute("data-no-resize")||(0===t.offsetWidth&&0===t.offsetHeight?(t.setAttribute("width",t.naturalWidth),t.setAttribute("height",t.naturalHeight)):(t.setAttribute("width",t.offsetWidth),t.setAttribute("height",t.offsetHeight))),t.setAttribute("src",i)):e.style.backgroundImage="url("+i+")"}),t.setAttribute("src",i),e.setAttribute(d,!0)}function r(t,e,i){var n,o=(n=parseInt(arguments.length<=2||void 0===i?1:i,10),l<n?l:n);e&&1<o&&s(t,e.replace(a,"@"+o+"x$1"))}function t(t){var e;((e=t)?"function"==typeof e.forEach?e:i(e):"undefined"!=typeof document?i(document.querySelectorAll(n)):[]).forEach(function(t){if(!t.getAttribute(d)){var e="img"===t.nodeName.toLowerCase()?t.getAttribute("src"):t.style.backgroundImage.replace(c,"$2"),i=t.getAttribute("data-bsrjs"),n=!isNaN(parseInt(i,10));if(null===i)return;n?r(t,e,i):(o=t,a=i,1<l&&s(o,a))}var o,a})}var e="undefined"!=typeof window,l=e&&window.devicePixelRatio||1,a=/(\.[A-z]{3,4}\/?(\?.*)?)$/,c=/url\(('|")?([^\)'"]+)('|")?\)/i,n="[data-bsrjs]",d="data-bsrjs-processed";e&&(window.addEventListener("load",t),window.bsrj_retinajs=t)}(),function(){var e=jQuery.fn.addClass;jQuery.fn.addClass=function(){var t=e.apply(this,arguments);return jQuery(this).trigger("cssClassChanged"),t}}(),String.prototype.startsWith||(String.prototype.startsWith=function(t,e){return e=e||0,this.indexOf(t,e)===e});
!function(a){function b(){var a=location.href;return hashtag=a.indexOf("#prettyPhoto")!==-1&&decodeURI(a.substring(a.indexOf("#prettyPhoto")+1,a.length)),hashtag&&(hashtag=hashtag.replace(/<|>/g,"")),hashtag}function c(){"undefined"!=typeof theRel&&(location.hash=theRel+"/"+rel_index+"/")}function d(){location.href.indexOf("#prettyPhoto")!==-1&&(location.hash="prettyPhoto")}function e(a,b){a=a.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var c="[\\?&]"+a+"=([^&#]*)",d=new RegExp(c),e=d.exec(b);return null==e?"":e[1]}a.fn.prettyPhoto||(a.prettyPhoto={version:"3.1.6"},a.fn.prettyPhoto=function(f){function r(){a(".pp_loaderIcon").hide(),projectedTop=scroll_pos.scrollTop+(o/2-i.containerHeight/2),projectedTop<0&&(projectedTop=0),$ppt.fadeTo(settings.animation_speed,1),$pp_pic_holder.find(".pp_content").animate({height:i.contentHeight,width:i.contentWidth},settings.animation_speed),$pp_pic_holder.animate({top:projectedTop,left:p/2-i.containerWidth/2<0?0:p/2-i.containerWidth/2,width:i.containerWidth},settings.animation_speed,function(){$pp_pic_holder.find(".pp_hoverContainer,#fullResImage").height(i.height).width(i.width),$pp_pic_holder.find(".pp_fade").fadeIn(settings.animation_speed),isSet&&"image"==w(pp_images[set_position])?$pp_pic_holder.find(".pp_hoverContainer").show():$pp_pic_holder.find(".pp_hoverContainer").hide(),settings.allow_expand&&(i.resized?a("a.pp_expand,a.pp_contract").show():a("a.pp_expand").hide()),!settings.autoplay_slideshow||q||j||a.prettyPhoto.startSlideshow(),settings.changepicturecallback(),j=!0}),A(),f.ajaxcallback()}function s(b){$pp_pic_holder.find("#pp_full_res object,#pp_full_res embed").css("visibility","hidden"),$pp_pic_holder.find(".pp_fade").fadeOut(settings.animation_speed,function(){a(".pp_loaderIcon").show(),b()})}function t(b){b>1?a(".pp_nav").show():a(".pp_nav").hide()}function u(a,b){if(resized=!1,v(a,b),imageWidth=a,imageHeight=b,(n>p||m>o)&&doresize&&settings.allow_resize&&!h){for(resized=!0,fitting=!1;!fitting;)n>p?(imageWidth=p-200,imageHeight=b/a*imageWidth):m>o?(imageHeight=o-200,imageWidth=a/b*imageHeight):fitting=!0,m=imageHeight,n=imageWidth;(n>p||m>o)&&u(n,m),v(imageWidth,imageHeight)}return{width:Math.floor(imageWidth),height:Math.floor(imageHeight),containerHeight:Math.floor(m),containerWidth:Math.floor(n)+2*settings.horizontal_padding,contentHeight:Math.floor(k),contentWidth:Math.floor(l),resized:resized}}function v(b,c){b=parseFloat(b),c=parseFloat(c),$pp_details=$pp_pic_holder.find(".pp_details"),$pp_details.width(b),detailsHeight=parseFloat($pp_details.css("marginTop"))+parseFloat($pp_details.css("marginBottom")),$pp_details=$pp_details.clone().addClass(settings.theme).width(b).appendTo(a("body")).css({position:"absolute",top:-1e4}),detailsHeight+=$pp_details.height(),detailsHeight=detailsHeight<=34?36:detailsHeight,$pp_details.remove(),$pp_title=$pp_pic_holder.find(".ppt"),$pp_title.width(b),titleHeight=parseFloat($pp_title.css("marginTop"))+parseFloat($pp_title.css("marginBottom")),$pp_title=$pp_title.clone().appendTo(a("body")).css({position:"absolute",top:-1e4}),titleHeight+=$pp_title.height(),$pp_title.remove(),k=c+detailsHeight,l=b,m=k+titleHeight+$pp_pic_holder.find(".pp_top").height()+$pp_pic_holder.find(".pp_bottom").height(),n=b}function w(a){return a.match(/youtube\.com\/watch/i)||a.match(/youtu\.be/i)?"youtube":a.match(/vimeo\.com/i)?"vimeo":a.match(/\b.mov\b/i)?"quicktime":a.match(/\b.swf\b/i)?"flash":a.match(/\biframe=true\b/i)?"iframe":a.match(/\bajax=true\b/i)?"ajax":a.match(/\bcustom=true\b/i)?"custom":"#"==a.substr(0,1)?"inline":"image"}function x(){if(doresize&&"undefined"!=typeof $pp_pic_holder){if(scroll_pos=y(),contentHeight=$pp_pic_holder.height(),contentwidth=$pp_pic_holder.width(),projectedTop=o/2+scroll_pos.scrollTop-contentHeight/2,projectedTop<0&&(projectedTop=0),contentHeight>o)return;$pp_pic_holder.css({top:projectedTop,left:p/2+scroll_pos.scrollLeft-contentwidth/2})}}function y(){return self.pageYOffset?{scrollTop:self.pageYOffset,scrollLeft:self.pageXOffset}:document.documentElement&&document.documentElement.scrollTop?{scrollTop:document.documentElement.scrollTop,scrollLeft:document.documentElement.scrollLeft}:document.body?{scrollTop:document.body.scrollTop,scrollLeft:document.body.scrollLeft}:void 0}function z(){o=a(window).height(),p=a(window).width(),"undefined"!=typeof $pp_overlay&&$pp_overlay.height(a(document).height()).width(p)}function A(){isSet&&settings.overlay_gallery&&"image"==w(pp_images[set_position])?(itemWidth=57,navWidth="facebook"==settings.theme||"pp_default"==settings.theme?50:30,itemsPerPage=Math.floor((i.containerWidth-100-navWidth)/itemWidth),itemsPerPage=itemsPerPage<pp_images.length?itemsPerPage:pp_images.length,totalPage=Math.ceil(pp_images.length/itemsPerPage)-1,0==totalPage?(navWidth=0,$pp_gallery.find(".pp_arrow_next,.pp_arrow_previous").hide()):$pp_gallery.find(".pp_arrow_next,.pp_arrow_previous").show(),galleryWidth=itemsPerPage*itemWidth,fullGalleryWidth=pp_images.length*itemWidth,$pp_gallery.css("margin-left",-(galleryWidth/2+navWidth/2)).find("div:first").width(galleryWidth+5).find("ul").width(fullGalleryWidth).find("li.selected").removeClass("selected"),goToPage=Math.floor(set_position/itemsPerPage)<totalPage?Math.floor(set_position/itemsPerPage):totalPage,a.prettyPhoto.changeGalleryPage(goToPage),$pp_gallery_li.filter(":eq("+set_position+")").addClass("selected")):$pp_pic_holder.find(".pp_content").unbind("mouseenter mouseleave")}function B(b){if(settings.social_tools&&(facebook_like_link=settings.social_tools.replace("{location_href}",encodeURIComponent(location.href))),settings.markup=settings.markup.replace("{pp_social}",""),a("body").append(settings.markup),$pp_pic_holder=a(".pp_pic_holder"),$ppt=a(".ppt"),$pp_overlay=a("div.pp_overlay"),isSet&&settings.overlay_gallery){currentGalleryPage=0,toInject="";for(var c=0;c<pp_images.length;c++)pp_images[c].match(/\b(jpg|jpeg|png|gif)\b/gi)?(classname="",img_src=pp_images[c]):(classname="default",img_src=""),toInject+="<li class='"+classname+"'><a href='#'><img src='"+img_src+"' width='50' alt='' /></a></li>";toInject=settings.gallery_markup.replace(/{gallery}/g,toInject),$pp_pic_holder.find("#pp_full_res").after(toInject),$pp_gallery=a(".pp_pic_holder .pp_gallery"),$pp_gallery_li=$pp_gallery.find("li"),$pp_gallery.find(".pp_arrow_next").click(function(){return a.prettyPhoto.changeGalleryPage("next"),a.prettyPhoto.stopSlideshow(),!1}),$pp_gallery.find(".pp_arrow_previous").click(function(){return a.prettyPhoto.changeGalleryPage("previous"),a.prettyPhoto.stopSlideshow(),!1}),$pp_pic_holder.find(".pp_content").hover(function(){$pp_pic_holder.find(".pp_gallery:not(.disabled)").fadeIn()},function(){$pp_pic_holder.find(".pp_gallery:not(.disabled)").fadeOut()}),itemWidth=57,$pp_gallery_li.each(function(b){a(this).find("a").click(function(){return a.prettyPhoto.changePage(b),a.prettyPhoto.stopSlideshow(),!1})})}settings.slideshow&&($pp_pic_holder.find(".pp_nav").prepend('<a href="#" class="pp_play"><i class="fa fa-play"></i></a>'),$pp_pic_holder.find(".pp_nav .pp_play").click(function(){return a.prettyPhoto.startSlideshow(),!1})),$pp_pic_holder.attr("class","pp_pic_holder "+settings.theme),$pp_overlay.css({opacity:0,height:a(document).height(),width:a(window).width()}).bind("click",function(){settings.modal||a.prettyPhoto.close()}),a("a.pp_close").bind("click",function(){return a.prettyPhoto.close(),!1}),settings.allow_expand&&a("a.pp_expand").bind("click",function(b){return a(this).hasClass("pp_expand")?(a(this).removeClass("pp_expand").addClass("pp_contract"),doresize=!1):(a(this).removeClass("pp_contract").addClass("pp_expand"),doresize=!0),s(function(){a.prettyPhoto.open()}),!1}),$pp_pic_holder.find(".pp_previous, .pp_nav .pp_arrow_previous").bind("click",function(){return a.prettyPhoto.changePage("previous"),a.prettyPhoto.stopSlideshow(),!1}),$pp_pic_holder.find(".pp_next, .pp_nav .pp_arrow_next").bind("click",function(){return a.prettyPhoto.changePage("next"),a.prettyPhoto.stopSlideshow(),!1}),x()}f=jQuery.extend({hook:"rel",animation_speed:"fast",ajaxcallback:function(){},slideshow:5e3,autoplay_slideshow:!1,opacity:.8,show_title:!0,allow_resize:!0,allow_expand:!0,default_width:500,default_height:344,counter_separator_label:"/",theme:"pp_default",horizontal_padding:20,hideflash:!1,wmode:"opaque",autoplay:!0,modal:!1,deeplinking:!0,overlay_gallery:!0,overlay_gallery_max:30,keyboard_shortcuts:!0,changepicturecallback:function(){},callback:function(){},ie6_fallback:!0,markup:'<div class="pp_pic_holder"> <div class="ppt">&nbsp;</div> <div class="pp_top"> <div class="pp_left"></div> <div class="pp_middle"></div> <div class="pp_right"></div> </div> <div class="pp_content_container"> <div class="pp_left"> <div class="pp_right"> <div class="pp_content"> <div class="pp_loaderIcon"></div> <div class="pp_fade"> <a href="#" class="pp_expand" title="Expand the image">Expand</a> <div class="pp_hoverContainer"> <a class="pp_next" href="#">next</a> <a class="pp_previous" href="#">previous</a> </div> <div id="pp_full_res"></div> <div class="pp_details"> <div class="pp_nav"> <a href="#" class="pp_arrow_previous">Previous</a> <p class="currentTextHolder">0/0</p> <a href="#" class="pp_arrow_next">Next</a> </div> <p class="pp_description"></p> <div class="pp_social">{pp_social}</div> <a class="pp_close" href="#">Close</a> </div> </div> </div> </div> </div> </div> <div class="pp_bottom"> <div class="pp_left"></div> <div class="pp_middle"></div> <div class="pp_right"></div> </div> </div> <div class="pp_overlay"></div>',gallery_markup:'<div class="pp_gallery"> <a href="#" class="pp_arrow_previous">Previous</a> <div> <ul> {gallery} </ul> </div> <a href="#" class="pp_arrow_next">Next</a> </div>',image_markup:'<img id="fullResImage" src="{path}" />',flash_markup:'<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="{width}" height="{height}"><param name="wmode" value="{wmode}" /><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="{path}" /><embed src="{path}" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="{width}" height="{height}" wmode="{wmode}"></embed></object>',quicktime_markup:'<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" height="{height}" width="{width}"><param name="src" value="{path}"><param name="autoplay" value="{autoplay}"><param name="type" value="video/quicktime"><embed src="{path}" height="{height}" width="{width}" autoplay="{autoplay}" type="video/quicktime" pluginspage="http://www.apple.com/quicktime/download/"></embed></object>',iframe_markup:'<iframe src="{path}" width="{width}" height="{height}" frameborder="no"></iframe>',inline_markup:'<div class="pp_inline">{content}</div>',custom_markup:"",social_tools:'<div class="twitter"><a href="http://twitter.com/share" class="twitter-share-button" data-count="none">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div><div class="facebook"><iframe src="//www.facebook.com/plugins/like.php?locale=en_US&href={location_href}&amp;layout=button_count&amp;show_faces=true&amp;width=500&amp;action=like&amp;font&amp;colorscheme=light&amp;height=23" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:23px;" allowTransparency="true"></iframe></div>'},f);var i,j,k,l,m,n,q,g=this,h=!1,o=a(window).height(),p=a(window).width();return doresize=!0,scroll_pos=y(),a(window).unbind("resize.prettyphoto").bind("resize.prettyphoto",function(){x(),z()}),f.keyboard_shortcuts&&a(document).unbind("keydown.prettyphoto").bind("keydown.prettyphoto",function(b){if("undefined"!=typeof $pp_pic_holder&&$pp_pic_holder.is(":visible"))switch(b.keyCode){case 37:a.prettyPhoto.changePage("previous"),b.preventDefault();break;case 39:a.prettyPhoto.changePage("next"),b.preventDefault();break;case 27:settings.modal||a.prettyPhoto.close(),b.preventDefault()}}),a.prettyPhoto.initialize=function(){return settings=f,"pp_default"==settings.theme&&(settings.horizontal_padding=16),theRel=a(this).attr(settings.hook),galleryRegExp=/\[(?:.*)\]/,isSet=!!galleryRegExp.exec(theRel),pp_images=isSet?jQuery.map(g,function(b,c){if(a(b).attr(settings.hook).indexOf(theRel)!=-1)return a(b).attr("href")}):a.makeArray(a(this).attr("href")),pp_titles=isSet?jQuery.map(g,function(b,c){if(a(b).attr(settings.hook).indexOf(theRel)!=-1)return a(b).find("img").attr("alt")?a(b).find("img").attr("alt"):""}):a.makeArray(a(this).find("img").attr("alt")),pp_descriptions=isSet?jQuery.map(g,function(b,c){if(a(b).attr(settings.hook).indexOf(theRel)!=-1)return a(b).attr("title")?a(b).attr("title"):""}):a.makeArray(a(this).attr("title")),pp_images.length>settings.overlay_gallery_max&&(settings.overlay_gallery=!1),set_position=jQuery.inArray(a(this).attr("href"),pp_images),rel_index=isSet?set_position:a("a["+settings.hook+"^='"+theRel+"']").index(a(this)),B(this),settings.allow_resize&&a(window).bind("scroll.prettyphoto",function(){x()}),a.prettyPhoto.open(),!1},a.prettyPhoto.open=function(b){return"undefined"==typeof settings&&(settings=f,pp_images=a.makeArray(arguments[0]),pp_titles=arguments[1]?a.makeArray(arguments[1]):a.makeArray(""),pp_descriptions=arguments[2]?a.makeArray(arguments[2]):a.makeArray(""),isSet=pp_images.length>1,set_position=arguments[3]?arguments[3]:0,B(b.target)),settings.hideflash&&a("object,embed,iframe[src*=youtube],iframe[src*=vimeo]").css("visibility","hidden"),t(a(pp_images).size()),a(".pp_loaderIcon").show(),settings.deeplinking&&c(),settings.social_tools&&(facebook_like_link=settings.social_tools.replace("{location_href}",encodeURIComponent(location.href)),$pp_pic_holder.find(".pp_social").html(facebook_like_link)),$ppt.is(":hidden")&&$ppt.css("opacity",0).show(),$pp_overlay.show().fadeTo(settings.animation_speed,settings.opacity),$pp_pic_holder.find(".currentTextHolder").text(set_position+1+settings.counter_separator_label+a(pp_images).size()),"undefined"!=typeof pp_descriptions[set_position]&&""!=pp_descriptions[set_position]?$pp_pic_holder.find(".pp_description").show().html(unescape(pp_descriptions[set_position])):$pp_pic_holder.find(".pp_description").hide(),movie_width=parseFloat(e("width",pp_images[set_position]))?e("width",pp_images[set_position]):settings.default_width.toString(),movie_height=parseFloat(e("height",pp_images[set_position]))?e("height",pp_images[set_position]):settings.default_height.toString(),h=!1,movie_height.indexOf("%")!=-1&&(movie_height=parseFloat(a(window).height()*parseFloat(movie_height)/100-150),h=!0),movie_width.indexOf("%")!=-1&&(movie_width=parseFloat(a(window).width()*parseFloat(movie_width)/100-150),h=!0),$pp_pic_holder.fadeIn(function(){switch(settings.show_title&&""!=pp_titles[set_position]&&"undefined"!=typeof pp_titles[set_position]?$ppt.html(unescape(pp_titles[set_position])):$ppt.html("&nbsp;"),imgPreloader="",skipInjection=!1,w(pp_images[set_position])){case"image":imgPreloader=new Image,nextImage=new Image,isSet&&set_position<a(pp_images).size()-1&&(nextImage.src=pp_images[set_position+1]),prevImage=new Image,isSet&&pp_images[set_position-1]&&(prevImage.src=pp_images[set_position-1]),$pp_pic_holder.find("#pp_full_res")[0].innerHTML=settings.image_markup.replace(/{path}/g,pp_images[set_position]),imgPreloader.onload=function(){i=u(imgPreloader.width,imgPreloader.height),r()},imgPreloader.onerror=function(){alert("Image cannot be loaded. Make sure the path is correct and image exist."),a.prettyPhoto.close()},imgPreloader.src=pp_images[set_position];break;case"youtube":i=u(movie_width,movie_height),movie_id=e("v",pp_images[set_position]),""==movie_id&&(movie_id=pp_images[set_position].split("youtu.be/"),movie_id=movie_id[1],movie_id.indexOf("?")>0&&(movie_id=movie_id.substr(0,movie_id.indexOf("?"))),movie_id.indexOf("&")>0&&(movie_id=movie_id.substr(0,movie_id.indexOf("&")))),movie="http://www.youtube.com/embed/"+movie_id,e("rel",pp_images[set_position])?movie+="?rel="+e("rel",pp_images[set_position]):movie+="?rel=1",settings.autoplay&&(movie+="&autoplay=1"),toInject=settings.iframe_markup.replace(/{width}/g,i.width).replace(/{height}/g,i.height).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,movie);break;case"vimeo":i=u(movie_width,movie_height),movie_id=pp_images[set_position];var b=/http(s?):\/\/(www\.)?vimeo.com\/(\d+)/,c=movie_id.match(b);movie="http://player.vimeo.com/video/"+c[3]+"?title=0&amp;byline=0&amp;portrait=0",settings.autoplay&&(movie+="&autoplay=1;"),vimeo_width=i.width+"/embed/?moog_width="+i.width,toInject=settings.iframe_markup.replace(/{width}/g,vimeo_width).replace(/{height}/g,i.height).replace(/{path}/g,movie);break;case"quicktime":i=u(movie_width,movie_height),i.height+=15,i.contentHeight+=15,i.containerHeight+=15,toInject=settings.quicktime_markup.replace(/{width}/g,i.width).replace(/{height}/g,i.height).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,pp_images[set_position]).replace(/{autoplay}/g,settings.autoplay);break;case"flash":i=u(movie_width,movie_height),flash_vars=pp_images[set_position],flash_vars=flash_vars.substring(pp_images[set_position].indexOf("flashvars")+10,pp_images[set_position].length),filename=pp_images[set_position],filename=filename.substring(0,filename.indexOf("?")),toInject=settings.flash_markup.replace(/{width}/g,i.width).replace(/{height}/g,i.height).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,filename+"?"+flash_vars);break;case"iframe":i=u(movie_width,movie_height),frame_url=pp_images[set_position],frame_url=frame_url.substr(0,frame_url.indexOf("iframe")-1),toInject=settings.iframe_markup.replace(/{width}/g,i.width).replace(/{height}/g,i.height).replace(/{path}/g,frame_url);break;case"ajax":doresize=!1,i=u(movie_width,movie_height),doresize=!0,skipInjection=!0,a.get(pp_images[set_position],function(a){toInject=settings.inline_markup.replace(/{content}/g,a),$pp_pic_holder.find("#pp_full_res")[0].innerHTML=toInject,r()});break;case"custom":i=u(movie_width,movie_height),toInject=settings.custom_markup;break;case"inline":myClone=a(pp_images[set_position]).clone().append('<br clear="all" />').css({width:settings.default_width}).wrapInner('<div id="pp_full_res"><div class="pp_inline"></div></div>').appendTo(a("body")).show(),doresize=!1,i=u(a(myClone).width(),a(myClone).height()),doresize=!0,a(myClone).remove(),toInject=settings.inline_markup.replace(/{content}/g,a(pp_images[set_position]).html())}imgPreloader||skipInjection||($pp_pic_holder.find("#pp_full_res")[0].innerHTML=toInject,r())}),!1},a.prettyPhoto.changePage=function(b){currentGalleryPage=0,"previous"==b?(set_position--,set_position<0&&(set_position=a(pp_images).size()-1)):"next"==b?(set_position++,set_position>a(pp_images).size()-1&&(set_position=0)):set_position=b,rel_index=set_position,doresize||(doresize=!0),settings.allow_expand&&a(".pp_contract").removeClass("pp_contract").addClass("pp_expand"),s(function(){a.prettyPhoto.open()})},a.prettyPhoto.changeGalleryPage=function(a){"next"==a?(currentGalleryPage++,currentGalleryPage>totalPage&&(currentGalleryPage=0)):"previous"==a?(currentGalleryPage--,currentGalleryPage<0&&(currentGalleryPage=totalPage)):currentGalleryPage=a,slide_speed="next"==a||"previous"==a?settings.animation_speed:0,slide_to=currentGalleryPage*(itemsPerPage*itemWidth),$pp_gallery.find("ul").animate({left:-slide_to},slide_speed)},a.prettyPhoto.startSlideshow=function(){"undefined"==typeof q?($pp_pic_holder.find(".pp_play").unbind("click").removeClass("pp_play").addClass("pp_pause").click(function(){return a.prettyPhoto.stopSlideshow(),!1}),q=setInterval(a.prettyPhoto.startSlideshow,settings.slideshow)):a.prettyPhoto.changePage("next")},a.prettyPhoto.stopSlideshow=function(){$pp_pic_holder.find(".pp_pause").unbind("click").removeClass("pp_pause").addClass("pp_play").click(function(){return a.prettyPhoto.startSlideshow(),!1}),clearInterval(q),q=void 0},a.prettyPhoto.close=function(){$pp_overlay.is(":animated")||(a.prettyPhoto.stopSlideshow(),$pp_pic_holder.stop().find("object,embed").css("visibility","hidden"),a("div.pp_pic_holder,div.ppt,.pp_fade").fadeOut(settings.animation_speed,function(){a(this).remove()}),$pp_overlay.fadeOut(settings.animation_speed,function(){settings.hideflash&&a("object,embed,iframe[src*=youtube],iframe[src*=vimeo]").css("visibility","visible"),a(this).remove(),a(window).unbind("scroll.prettyphoto"),d(),settings.callback(),doresize=!0,j=!1,delete settings}))},!pp_alreadyInitialized&&b()&&(pp_alreadyInitialized=!0,hashIndex=b(),hashRel=hashIndex,hashIndex=hashIndex.substring(hashIndex.indexOf("/")+1,hashIndex.length-1),hashRel=hashRel.substring(0,hashRel.indexOf("/")),setTimeout(function(){a("a["+f.hook+"^='"+hashRel+"']:eq("+hashIndex+")").trigger("click")},50)),this.unbind("click.prettyphoto").bind("click.prettyphoto",a.prettyPhoto.initialize)})}(jQuery);var pp_alreadyInitialized=!1;
var $bs_sticky_sidebars,docCookies={getItem:function(e){return e&&decodeURIComponent(document.cookie.replace(new RegExp("(?:(?:^|.*;)\\s*"+encodeURIComponent(e).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*([^;]*).*$)|^.*$"),"$1"))||null},setItem:function(e,t,a,s,n,i){if(!e||/^(?:expires|max\-age|path|domain|secure)$/i.test(e))return!1;var o="";if(a)switch(a.constructor){case Number:o=a===1/0?"; expires=Fri, 31 Dec 9999 23:59:59 GMT":"; max-age="+a;break;case String:o="; expires="+a;break;case Date:o="; expires="+a.toUTCString()}return document.cookie=encodeURIComponent(e)+"="+encodeURIComponent(t)+o+(n?"; domain="+n:"")+(s?"; path="+s:"")+(i?"; secure":""),!0},removeItem:function(e,t,a){return!!this.hasItem(e)&&(document.cookie=encodeURIComponent(e)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT"+(a?"; domain="+a:"")+(t?"; path="+t:""),!0)},hasItem:function(e){return!!e&&new RegExp("(?:^|;\\s*)"+encodeURIComponent(e).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(document.cookie)},keys:function(){for(var e=document.cookie.replace(/((?:^|\s*;)[^\=]+)(?=;|$)|^\s*|\s*(?:\=[^;]*)?(?:\1|$)/g,"").split(/\s*(?:\=[^;]*)?;\s*/),t=e.length,a=0;a<t;a++)e[a]=decodeURIComponent(e[a]);return e}},Publisher_UI=function(t){return{is_blocked:function(e){return!!e.data("publisher-el-blocked")},block:function(e){this.is_blocked(e)||(e.data("publisher-el-blocked",!0),e.prepend('<div class="publisher-block-overlay" style="z-index:10;display:none;border:none;margin:0;padding:0;width:100%;height:100%;top:0;left:0;display:none;position: absolute;background:rgba(255,255,255,0.4)"></div>'),t(".publisher-block-overlay").fadeIn())},unblock:function(e){this.is_blocked(e)&&(e.data("publisher-el-blocked",!1),t(".publisher-block-overlay").fadeOut(function(){t(this).remove()}))}}}(jQuery),Publisher_Theme=function(u){"use strict";return{init:function(){this.initWhiteSpaceBlock(),u(window).on("resize",this.initWhiteSpaceBlock),this.prettyPhotoSettings={social_tools:!1,show_title:!1,deeplinking:!1,markup:'<div class="pp_pic_holder"> <div class="ppt"></div> <div class="pp_content_container"> <div class="pp_content"> <div class="pp_loaderIcon"></div> <div class="pp_fade"> <a href="#" class="pp_expand" title="'+publisher_theme_global_loc.translations.lightbox_expand+'"></a> <a class="pp_close" href="#" title="'+publisher_theme_global_loc.translations.lightbox_close+'"></a> <div class="pp_hoverContainer"> <a class="pp_next" href="#"><i class="fa fa-chevron-right"></i></a> <a class="pp_previous" href="#"><i class="fa fa-chevron-left"></i></a> </div> <div id="pp_full_res"></div> <div class="pp_details"> <div class="pp_nav"> <a href="#" class="pp_arrow_previous"><i class="fa fa-backward"></i></a> <p class="currentTextHolder">0/0</p> <a href="#" class="pp_arrow_next"><i class="fa fa-forward"></i></a> </div> <p class="pp_description"></p> </div> </div> </div> </div> </div> <div class="pp_overlay"></div>',gallery_markup:'<div class="pp_gallery"> <a href="#" class="pp_arrow_previous"><i class="fa fa-chevron-left"></i></a> <div> <ul> {gallery} </ul> </div> <a href="#" class="pp_arrow_next"><i class="fa fa-chevron-right"></i></a> </div>'},this.setup_responsive_header(),this.back_to_top(),this.handleAjaxifiedComments(),this.setup_post(),this.setup_menu(),this.small_style_fixes();var e=u(document.body).attr("class").toString().match(/\bpostid\-(\d+)\b/i);e&&this.handleInfinitySinglePostLoading(e[1]),this.woo_commerce(),this.visual_composer(),this.init_off_canvas_menu(),this.init_more_stories(),this.init_continue_reading(),this.init_push_notification(),this.print_style_fix(),this.init_gdpr()},initWhiteSpaceBlock:function(){var e,t,a=document.getElementsByClassName("bs-white-space");e=992<=window.innerWidth?"desktop":768<=window.innerWidth?"tablet":"mobile";for(var s=0;s<a.length;s++)(t=a[s].getAttribute("data-"+e+"-ws"))&&(a[s].style.height=t+"px")},fix_element_query:function(){"function"==typeof elementQuery&&elementQuery({".listing-attachment-sibling":{"max-width":["450px","560px","900px"]},".bs-shortcode-row":{"max-width":["450px","600px","700px"]}})},is_rtl:function(){return u("body").hasClass("rtl")},setup_responsive_header:function(){if(u(".rh-header .menu-container .menu-handler").click(function(e){e.preventDefault(),u("body").toggleClass("open-rh").toggleClass("close-rh"),setTimeout(function(){u(".rh-cover").removeClass("noscroll"),u("body").addClass("noscroll")},640)}),u(".rh-cover > .rh-close").click(function(e){e.preventDefault(),u("body").toggleClass("open-rh").toggleClass("close-rh"),u(".rh-cover").addClass("noscroll"),u("body").removeClass("noscroll")}),u(".rh-cover .rh-c-m").is(":empty")&&u(".rh-cover .rh-c-m").html(u(".main-menu.menu").clone().removeClass("main-menu").addClass("resp-menu").prop("id","resp-navigation")),!u(".rh-cover").hasClass("no-top-nav")&&0<u(".topbar ul.top-menu").length){var e=u(".topbar ul.top-menu").clone();e.find("li#topbar-date").remove(),e.removeAttr("id").removeClass("top-menu"),u(".rh-cover .rh-c-m").append(e.addClass("resp-menu"))}if(!u(".rh-cover").hasClass("no-social-icon")&&0<u(".topbar .better-social-counter").length&&0==u(".rh-cover .rh-pm .better-social-counter").length){var t=u(".topbar .better-social-counter").clone();u(".rh-cover .rh-pm .rh-p-b").append(t)}u(".rh-cover .rh-c-m .mega-menu.mega-grid-posts").remove(),u(".rh-cover .resp-menu li > a").each(function(){var e=u(this).parent();if(e.hasClass("menu-item-mega-tabbed-grid-posts")){e.find(".tab-content").remove();var t=e.find(".tabs-section").removeClass("tabs-section").addClass("sub-menu");e.find(".mega-menu.tabbed-grid-posts").remove(),t.find("li a").removeAttr("data-target").removeAttr("data-deferred-init").removeAttr("data-toggle").removeAttr("data-deferred-event").removeAttr("class"),t.find(".fa").remove(),t.find("li:first-child").remove(),e.append(t)}if(e.hasClass("menu-item-mega-link-2-column")||e.hasClass("menu-item-mega-link-3-column")||e.hasClass("menu-item-mega-link-4-column")||e.hasClass("menu-item-mega-link-5-column")||e.hasClass("menu-item-mega-link-list")){var a=e.find(".mega-links").removeAttr("class").addClass("sub-menu");e.find(".mega-menu").replaceWith(a),e=u(this).parent()}!e.hasClass("menu-item-mega-grid-posts")&&0<e.children("ul,.mega-menu").length&&e.append('<span class="children-button"></span>')}),u(".rh-cover .resp-menu .children-button").click(function(e){e.preventDefault(),u(this).closest("li").toggleClass("open-sub"),u(this).siblings("ul").slideToggle()}),u(".rh-cover .rh-p-h .user-login").click(function(e){e.preventDefault(),u(".rh-cover .rh-panel.rh-pm").fadeOut(400),setTimeout(function(){u(".rh-cover .rh-panel.rh-p-u").fadeIn(400)},400)}),u(".rh-cover .rh-p-h .rh-back-menu").click(function(e){e.preventDefault();var t=u(this);t.addClass("abtn"),u(".rh-cover .rh-panel.rh-p-u").fadeOut(400),setTimeout(function(){u(".rh-cover .rh-panel.rh-pm").fadeIn(400),t.removeClass("abtn")},400)}),u(".rh-container").bsPinning(),u(".better-newsticker").betterNewsticker({control_nav:!0})},refreshLazyImages:function(){Publisher_Theme.betterLazyLoad&&Publisher_Theme.betterLazyLoad.isActive()?Publisher_Theme.betterLazyLoad.refresh():"object"==typeof Publisher_Theme.bsLazy&&Publisher_Theme.bsLazy.revalidate()},get_header_sticky_classes:function(){return" .site-header .main-menu-wrapper, .site-header.header-style-5.full-width > .content-wrap, .site-header.header-style-5.boxed > .content-wrap > .container, .site-header.header-style-6.full-width > .content-wrap, .site-header.header-style-6.boxed > .content-wrap > .container, .site-header.header-style-8.full-width > .content-wrap, .site-header.header-style-8.boxed > .content-wrap > .container"},updateHcStickySettings:function(e,t){if(e.length){var a=e.data("hcSticky");a&&a.options&&(a.options=u.extend(a.options,t),e.data("hcSticky",a))}},setup_menu:function(){var a=this;function e(e,n,t){if(e.length){var i=u.extend({duration:250,checkPosition:!0,completed:u.noop},t);e.off("hcSticky-reinit.bs-hcSticky-menu"),e.one("hcSticky-reinit.bs-hcSticky-menu",function(e,t,a,s){i.checkPosition&&"fixed"!==t.style("position")||(i.duration?t.stop().animate(n,i.duration,"swing",i.completed):(t.stop().css(n),i.completed.call(t)))}),a.updateHcStickySettings(e,n),e.hcSticky("reinit")}}u("ul.menu.bsm-pure").addClass("bsm-initialized").removeClass("bsm-pure"),u(".menu.bsm-initialized li.menu-item-has-children").each(function(){var e=u(this);e.is(":hover")?e.addClass("bsm-enter"):e.addClass("bsm-leave")}),u(document).on("mouseenter","li.menu-item-has-children",function(e){var t=u(this);t.siblings("li").stop().clearQueue().removeClass("bsm-enter").addClass("bsm-leave"),t.stop().clearQueue().removeClass("bsm-leave").addClass("bsm-enter"),a.refreshLazyImages()}).on("mouseleave","li.menu-item-has-children",function(){u(this).stop().delay(450).queue(function(e){u(this).removeClass("bsm-enter"),e()}).delay(200).queue(function(e){u(this).addClass("bsm-leave"),e()})}).on("afterChange",".bs-slider-items-container",function(){a.refreshLazyImages()});var t=Publisher_Theme.get_header_sticky_classes(),s=u(".site-header").attr("class");if(s){if(s=s.match(/header-style-[\w-]*\b/),publisher_theme_global_loc.skyscraper.sticky){var n=u("#wpadminbar"),i=0<n.length?n.outerHeight():0,o=0,r=publisher_theme_global_loc.skyscraper.sticky&&"after-header"===publisher_theme_global_loc.skyscraper.position&&"boxed"!==publisher_theme_global_loc.page.boxed&&"boxed"!==publisher_theme_global_loc.header.boxed;r&&(o=u(t).outerHeight()+i+publisher_theme_global_loc.skyscraper.sticky_gap)}var l={smart:!0,wrapper_class:"bspw-"+s[0]},c=0;r&&(l.onPin=function(){c=!0,e(u(".bs-sks  .bs-sksin2"),{top:o})},l.onUnpin=function(){"boxed"==publisher_theme_global_loc.page.boxed?c&&e(u(".bs-sks  .bs-sksin2"),{top:i}):c&&e(u(".bs-sks  .bs-sksin2"),{top:i+publisher_theme_global_loc.skyscraper.sticky_gap}),c=!1}),u("body").hasClass("main-menu-sticky-smart")?u(t).bsPinning(l):u("body").hasClass("main-menu-sticky")&&(l.smart=!1,l.wrapper_class="bspw-header bspw-"+s[0],u(t).bsPinning(l))}var d=[["#top-navigation",270],["#main-navigation",210]],h="ul.sub-menu",m=u(document.body).hasClass("rtl");function p(e,t,a,s){var n,i,o=window.innerWidth-Math.ceil((a||e).offset().left);if(n=o>window.innerWidth/2,i=m,n&&!i||!n&&i)return 1;var r=Math.floor(o/t);s&&(r-=s);for(var l=[],c=0;c<=r;c++)l.push(h);return 0===u(l.join(" "),e).length}function f(){d.forEach(function(e){var t=u(e[0]),a=e[1];t.children("li.menu-item").each(function(){var e=u(this);e[p(e,a)?"removeClass":"addClass"]("bs-flip-children")});var s=u("li.bs-pretty-tabs-container",t);if(s.length){for(var n=u(".bs-pretty-tabs-elements>li.menu-item",s),i=!1,o=0;o<n.length;o++){if(!p(u(n[o]),a,s,1)){i=!0;break}}s[i?"addClass":"removeClass"]("bs-flip-children")}})}jQuery(window).resize(f),setTimeout(f)},setup_sliders:function(){u.fn.flexslider&&(u(".gallery-slider .better-slider").flexslider({namespace:"better-",animation:"fade",controlNav:!1,smoothHeight:!0,animationSpeed:"200"}).find(".better-control-nav").addClass("square"),u(".bs-shortcode.bs-slider > .better-slider, .bs-shortcode.bs-instagram > .better-slider, .bs-shortcode.bs-dribbble > .better-slider, .bs-shortcode.bs-flickr > .better-slider").each(function(){var e=u(this);e.flexslider({namespace:"better-",animation:e.data("animation"),slideshowSpeed:e.data("slideshowspeed"),animationSpeed:e.data("animationspeed"),controlNav:void 0===e.data("controlnav")||e.data("controlnav"),animationLoop:!0,directionNav:!0,pauseOnHover:!0,start:function(e){jQuery(e).find(".better-active-slide").addClass("slider-content-shown")},before:function(e){jQuery(e).find(".slider-content-shown").removeClass("slider-content-shown")},after:function(e){jQuery(e).find(".better-active-slide").addClass("slider-content-shown")}}).find(".better-control-nav").addClass("circle")}))},setup_video_players:function(){u(".single-featured, .the-content, .sidebar, .post, .bs-embed, .entry-content").fitVids({ignore:".bsp-player > iframe"})},small_style_fixes:function(){u(".site-header .search-container .search-handler").click(function(){u(this).closest(".main-menu-container").toggleClass("search-open").toggleClass("search-close");var e=u(this).closest(".search-container");e.toggleClass("open").toggleClass("close"),e.hasClass("open")?(u(this).find(".fa").removeClass("fa-search").addClass("fa-close"),e.find(".search-field").focus()):(u(this).find(".fa").addClass("fa-search").removeClass("fa-close"),e.find(".search-field").focusout())}),u(document).on("keyup",function(e){if(27==e.keyCode&&0<u(".search-container.open").length){var t=u(".site-header .search-container"),a=t.find(".search-handler");t.removeClass("open").addClass("close"),u(".main-menu-container.search-open").removeClass("search-open").addClass("search-close"),t.hasClass("open")?(a.find(".fa").removeClass("fa-search").addClass("fa-close"),t.find(".search-field").focus()):(a.find(".fa").addClass("fa-search").removeClass("fa-close"),t.find(".search-field").focusout())}}),u(".site-header .shop-cart-container").hover(function(e){e.preventDefault(),u(this).closest(".main-menu-container").toggleClass("cart-open").toggleClass("cart-close"),u(this).toggleClass("open").toggleClass("close")}),u(".widget.widget_calendar table td a").each(function(){u(this).parent().addClass("active-day")}),u.browser.msie&&10==u.browser.version&&u("html").addClass("ie ie10"),u('.section-heading.multi-tab a[data-toggle="tab"]').on("shown.bs.tab",function(e){if(u(this).hasClass("active"))e.preventDefault();else{if(void 0===u(e.target).parent().attr("class"))return!0;var a=u(e.target).closest(".section-heading");if(!u(this).hasClass("ncpt")){var t=u(e.target).find(".h-text").attr("class").split(" "),s="";jQuery.each(t,function(e,t){if(t.match(/main-term-/))return s=t,!1}),jQuery.each(a.attr("class").split(" "),function(e,t){t.startsWith("main-term")&&a.removeClass(t)}),a.addClass(s)}a.find("a.active").removeClass("active"),u(this).addClass("active")}}),u(".bs-accordion-shortcode .panel-heading a").on("click",function(e){u(this).closest(".panel-heading").hasClass("active")||u(this).closest(".panel").addClass("open")}),u(".panel-collapse").on("hide.bs.collapse",function(e){u(e.target).closest(".panel").removeClass("open")}),u('.bs-listing a[data-toggle="tab"]').on("show.bs.tab",function(e){var t=u(u(this).attr("href"));t.hasClass("active")||(u(this).closest(".bs-listing").find(".tab-pane").removeClass("bs-tab-animated"),t.addClass("bs-tab-animated"))}),u(".tabbed-grid-posts .tabs-section > li > a").click(function(){"#"!=u(this).attr("href")&&(window.location=u(this).attr("href"))}).hover(function(){u(this).tab("show")}),u('.tabbed-grid-posts .tabs-section > li > a[data-toggle="tab"]').on("show.bs.tab",function(e){var t=u(u(this).data("target"));t.hasClass("active")||(u(this).closest(".tabbed-grid-posts").find(".tab-pane").removeClass("bs-tab-animated"),t.addClass("bs-tab-animated"))}),u(".move-to-content .fa").click(function(){u("body,html").animate({scrollTop:u(".content-column").offset().top-25},700)}),u(".post-tp-4-header,.post-tp-5-header").each(function(){var a=u(this),s=u(this).find(".post-header-title");jQuery(window).scroll(function(){var e=jQuery(window).scrollTop(),t=a.height();e<a.offset().top||e>a.offset().bottom?s.css({"-webkit-transform":"translate3d(0px, 0px, 0px)"}).css({transform:"translate3d(0px, 0px, 0px)"}).css({opacity:"1"}):s.css({"-webkit-transform":"translate3d(0px, "+Math.ceil((e-a.offset().top)/5.3)+"px, 0px)"}).css({transform:"translate3d(0px, "+Math.ceil((e-a.offset().top)/5.3)+"px, 0px)"}).css({opacity:(e-t)/333.333*-1})})}),u(".footer-instagram-3 .bs-instagram-photos").simplyScroll({frameRate:70}),u(".remember-label").on("click",function(){u(this).siblings("input[type=checkbox]").click()}),u(".bs-login").css({display:"block",visibility:"visible"}),u(".bs-login .go-login-panel, .bs-login .go-reset-panel").click(function(e){e.preventDefault();var t=u(this).closest(".bs-login"),a=u(this).closest(".bs-login-panel"),s=a.siblings(".bs-login-panel");t.hasClass("inmove")||t.addClass("inmove").height(t.find(".bs-login-panel:first-child").outerHeight()),a.removeClass("bs-current-login-panel"),s.addClass("bs-current-login-panel")}),u(".single-post-share .post-share-btn-comments").click(function(){var e;e=0<u("form.comment-form").length?u("form.comment-form"):u("#respond"),u("body,html").animate({scrollTop:e.offset().top-100},1e3)}),u("#bsLoginModal").on("shown.bs.modal",function(){u("#bsLoginModal #user_login").focus()})},init_sticky_columns:function(){var e=this;if(u.fn.hcSticky&&!(window.innerWidth<=700)){if(publisher_theme_global_loc.skyscraper.sticky){var t=u("#wpadminbar"),a=0<t.length?t.outerHeight():0,s=a;"after-header"===publisher_theme_global_loc.skyscraper.position&&"boxed"!=publisher_theme_global_loc.page.boxed&&(s+=publisher_theme_global_loc.skyscraper.sticky_gap),u(".bs-sks  .bs-sksin2").hcSticky({wrapperClassName:"wrapper-sticky",top:s,onStop:function(){e.updateHcStickySettings(u(".bs-sks  .bs-sksin2"),{top:a})}})}var n={wrapperClassName:"wrapper-sticky"},i=!1,o=u("body");$bs_sticky_sidebars=u([]),(o.hasClass("main-menu-sticky-smart")||o.hasClass("main-menu-sticky"))&&(n.top=u("#header .main-menu-wrapper").height()),o.hasClass("active-sticky-sidebar")&&780<u(window).width()&&($bs_sticky_sidebars=($bs_sticky_sidebars=$bs_sticky_sidebars.add(u(".wpb_widgetised_column").closest(".wpb_column").not(".sticky-column"))).add(u(".sidebar-column"))),($bs_sticky_sidebars=$bs_sticky_sidebars.add(u(".wpb_column.sticky-column"))).each(function(e,t){var a=u(t),s=u.extend({},n);if(a.hasClass("wpb_column")){["vc_hidden-lg","vc_hidden-md","vc_hidden-sm","vc_hidden-xs",".hidden-lg",".hidden-md",".hidden-sm",".hidden-xs"].forEach(function(e){a.hasClass(e)&&(s.wrapperClassName+=" "+e)})}a.hcSticky(s)}),u(window).on("resize.bs-sticky-column",function(){window.innerWidth<=780&&!i&&$bs_sticky_sidebars.each(function(e,t){u(t).hcSticky("off").hcSticky("destroy").data("hcSticky-destroy",!0).removeAttr("style"),i=!0})}),1==publisher_theme_global_loc.refresh_googletagads&&"object"==typeof googletag&&"function"==typeof googletag.pubads&&"function"==typeof googletag.pubads().refresh&&googletag.pubads().refresh()}},betterstudio_editor_shortcodes:function(){u(".bs-accordion-shortcode").on("show.bs.collapse",function(e){u(e.target).prev(".panel-heading").addClass("active")}).on("hide.bs.collapse",function(e){u(e.target).prev(".panel-heading").removeClass("active")})},back_to_top:function(){var e=u(".back-top");0!=e.length&&(e.click(function(){u("body,html").animate({scrollTop:0},700)}),u(window).scroll(function(){switch(300<u(this).scrollTop()?e.addClass("is-visible"):e.removeClass("is-visible fade-out1 fade-out2 fade-out3 fade-out4"),!0){case 2400<u(this).scrollTop():e.addClass("fade-out4");break;case 1700<u(this).scrollTop():e.removeClass("fade-out3").addClass("fade-out3");break;case 1e3<u(this).scrollTop():e.removeClass("fade-out4 fade-out3").addClass("fade-out2");break;case 500<u(this).scrollTop():e.removeClass("fade-out4 fade-out3 fade-out2").addClass("fade-out1")}}))},popup:function(){if(u("body").hasClass("active-light-box")&&u.fn.prettyPhoto&&!(u(window).width()<700)){var e=publisher_theme_global_loc.lightbox.not_classes.split(" "),t=function(){var a=u(this);if(!a.attr("href"))return!1;if(void 0!==a.data("not-rel"))return!1;var s=!1;return 0<e.length&&e.forEach(function(e,t){""!=e&&a.hasClass(e)&&(s=!0)}),!s&&a.attr("href").match(/\.(jp?g|png|bmp|jpeg|gif)((\?.+$)|$)/)};u(".entry-content a,.single-featured a.open-lightbox").has("img").filter(t).attr("rel","prettyPhoto");var a=1;u(".entry-content .gallery,.entry-content .tiled-gallery").each(function(){u(this).find("a").has("img").filter(t).attr("rel","prettyPhoto[gallery_"+a+"]"),a++}),u("a[rel^='prettyPhoto']").prettyPhoto(Publisher_Theme.prettyPhotoSettings)}},gallery:function(){if(u.fn.fotorama){jQuery(".fotorama").fotorama({width:"100%",loop:!0,margin:10,thumbwidth:85,thumbheight:62,thumbmargin:9,transitionduration:800,arrows:!1,click:!1,swipe:!0}).on("fotorama:show",function(e,t,a){u(this).closest(".better-gallery").find(".count .current").html(t.activeFrame.i)});(u("body").hasClass("active-light-box")&&u.fn.prettyPhoto||u(window).width()<700)&&jQuery(".better-gallery").on("click",".slide-link",function(){event.preventDefault();var e=u(this).closest(".better-gallery").data("gallery-id"),t=Publisher_Theme.prettyPhotoSettings;return t.changepicturecallback=function(){u("#gallery-"+e).find(".fotorama").data("fotorama").show(u(".pp_gallery").find("li").index(u(".selected")))},u.fn.prettyPhoto(t),u.prettyPhoto.open(window["prt_gal_img_"+e],window["prt_gal_cap_"+e],window["prt_gal_cap_"+e]),u.prettyPhoto.changePage(u("#gallery-"+e).find(".fotorama").data("fotorama").activeFrame.i-1),!1}),jQuery(".better-gallery .gallery-title .next").click(function(){u(this).closest(".better-gallery").find(".fotorama").data("fotorama").show(">")}),jQuery(".better-gallery .gallery-title .prev").click(function(){u(this).closest(".better-gallery").find(".fotorama").data("fotorama").show("<")})}},bsPrettyTabs:function(){if(publisher_theme_global_loc.share.more){var t=".share-handler-wrap";u(t).on("click",".bs-pretty-tabs-more",function(){var e=u(this).next(".bs-pretty-tabs-elements");e.closest(t).bsPrettyTabs("stop"),e.closest(".bs-pretty-tabs-container").replaceWith(e.html())}).on("after-pretty-tabs",function(e,t){var a=t.$element.children(".social-item");a.removeClass("first last"),a.filter(":first").addClass("first"),a.filter(":last").addClass("last")}).bsPrettyTabs({menuContainerPosition:"end",menuContainerTag:"span",getContainerWidth:function(e){return 540<window.innerWidth&&(e-=Math.floor(.1*e)),e},moreContainer:'<a class="bs-pretty-tabs-more post-share-btn"><i class="bf-icon fa fa-plus"></i></a><ul class="bs-pretty-tabs-elements"></ul>'})}if("enable"===publisher_theme_global_loc.main_menu.more_menu){var a=u("#header").hasClass("header-style-6"),e='<a href="#" class="bs-pretty-tabs-more">';a&&(e+='<i class="bf-icon fa fa-bars" aria-hidden="true"></i>'),e+=publisher_theme_global_loc.translations.tabs_more+'</a><ul class="sub-menu bs-pretty-tabs-elements"></ul>',u("#main-navigation").parent().bsPrettyTabs({menuContainerPosition:"end",menuContainerTag:"li",itemsWrapperSelector:"#main-navigation",moreContainer:e,initWrapperContainer:function(e){return e.addClass("menu-item-has-children menu-item better-anim-fade"),a&&e.addClass("menu-have-icon menu-icon-type-fontawesome"),e},styleChangesAt:[992,780]})}"enable"===publisher_theme_global_loc.top_menu.more_menu&&u("#top-navigation").bsPrettyTabs({menuContainerPosition:"end",menuContainerTag:"li",moreContainer:'<a href="#" class="bs-pretty-tabs-more">'+publisher_theme_global_loc.translations.tabs_more+' <i class="fa fa-angle-down" aria-hidden="true"></i></a><ul class="bs-pretty-tabs-elements sub-menu"></ul>',getContainerWidth:function(e){return.9*e}}),u(".section-heading.multi-tab").bsPrettyTabs({moreContainer:'<a href="#" class="bs-pretty-tabs-more other-link"><span class="h-text">'+publisher_theme_global_loc.translations.tabs_all+' <i class="fa fa-angle-down" aria-hidden="true"></i></span></a><div class="bs-pretty-tabs-elements"></div>',mustDisplayClass:"main-link",getContainerWidth:function(e){return.8*e}}),u(".topbar").addClass("use-pretty-tabs")},bsPagination:function(e){if(u.fn.Better_Ajax_Pagination){u(".bs-ajax-pagination",e).parent().Better_Ajax_Pagination({after_response:function(){}})}},isRetinaDisplay:function(){if(window.matchMedia){var e=window.matchMedia("only screen and (min--moz-device-pixel-ratio: 1.3), only screen and (-o-min-device-pixel-ratio: 2.6/2), only screen and (-webkit-min-device-pixel-ratio: 1.3), only screen  and (min-device-pixel-ratio: 1.3), only screen and (min-resolution: 1.3dppx)");return e&&e.matches||1<window.devicePixelRatio}},parseBsSrcset:function(e,t,a){var s,n,i=e.getAttribute(t);if(!i)return a;if(!(i=JSON.parse(i))||!i.sizes)return a;for(n in s=e.hasAttribute("width")?parseInt(e.getAttribute("width")):e.offsetWidth,this.isRetinaDisplay()&&(s*=2),i.sizes)if(parseInt(n)>=s)return i.baseurl+i.sizes[n];return parseInt(n)<s?i.baseurl+i.sizes[n]:a},betterLazyLoad:{observer:null,options:{},init:function(e){var a=this;a.options=u.extend(!0,{rootMargin:"0px",threshold:0,src:"data-src",srcset:"data-bs-srcset",errorClass:"b-error",successClass:"b-loaded",readyClass:"b-load-ready",itemLoaded:u.noop},e);var t={root:null,rootMargin:a.options.rootMargin,threshold:a.options.threshold};return a.observer=new IntersectionObserver(function(e,t){e.forEach(function(e){e.target.classList.contains(a.options.successClass)||e.intersectionRatio>t.thresholds[0]&&a.loadElement(e.target)})},t),document.querySelectorAll(a.options.selector).forEach(function(e){a.observer.observe(e)}),this},refresh:function(){return this.init(this.options)},isActive:function(){return"function"==typeof IntersectionObserver&&"function"==typeof Promise},loadElement:function(a){var e=this.getSrc(a),s=this;return!!e&&(s.loadUrl(a).then(function(e){var t=a.tagName.toLowerCase();s.elementLoadedCompletely(a),-1<["img","iframe"].indexOf(t)?a.src=e:a.style.backgroundImage='url("'+e+'")',a.removeAttribute(s.options.src),s.options.itemLoaded.call(s,a,e)}).catch(function(e){s.ElementLoadFailed(a)}),!0)},loadUrl:function(n){var i=this;return new Promise(function(e,t){var a=i.getSrc(n);if("iframe"!==n.tagName.toLowerCase()){var s=new Image;s.onload=function(){e(a)},s.onerror=function(){t(a)},s.src=a}else e(a)})},getSrc:function(e){return Publisher_Theme.parseBsSrcset(e,this.options.srcset,e.getAttribute(this.options.src))},ElementLoadFailed:function(e){this.observer.unobserve&&this.observer.unobserve(e),e.classList.add(this.options.errorClass)},elementLoadedCompletely:function(e){var t=this;t.observer.unobserve&&this.observer.unobserve(e),e.classList.add(t.options.readyClass),setTimeout(function(){e.classList.remove(t.options.readyClass),e.classList.add(t.options.successClass)},100)}},initLazyLoad:function(){var e={selector:".img-holder,.img-cont,.bs-lazy,img[data-src],iframe[data-src]",itemLoaded:function(e,t){"iframe"===e.tagName.toLowerCase()&&u.fn.fitVids&&u(e.parentNode).fitVids()}};this.betterLazyLoad.isActive()?this.betterLazyLoad.init(e):"function"==typeof Blazy&&this.BLazyLoad(e),this.likeBoxLazyLoad()},BLazyLoad:function(e){"function"==typeof Blazy&&(Publisher_Theme.bsLazy=new Blazy({selector:e.selector,loadInvisible:function(e,t){if(!t)for(;e=e.parentElement;)if(e.className.match(/\bmega-menu\b/i))return!1;return!0},successClass:" ",success:function(e){e.className=e.className+" b-load-ready",setTimeout(function(){e.className=e.className.replace("b-load-ready","")+" b-loaded"},100)},itemLoaded:function(){u.fn.fitVids&&u(this.parentNode).fitVids()}}))},likeBoxLazyLoad:function(){function t(e){var t,a,s,n;e=e||"en_US",t=document,a="facebook-jssdk",n=t.getElementsByTagName("script")[0],t.getElementById(a)||((s=t.createElement("script")).id=a,s.src="//connect.facebook.net/"+e+"/sdk.js#xfbml=1&version=v2.4",n.parentNode.insertBefore(s,n))}function a(e){""!==e&&(window.___gcfg={lang:e}),function(){var e=document.createElement("script");e.type="text/javascript",e.async=!0,e.src="https://apis.google.com/js/plusone.js";var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t)}()}var e=u("#fb-root").length,s=u(".google-plus-block");if("function"==typeof OnScreen){var n=new OnScreen({tolerance:-100,container:window});e&&n.on("enter",".fb-page",function(e){t(e.getAttribute("data-locale")),n.off("enter",".fb-page")}),s.length&&n.on("enter",".google-plus-block",function(e){a(e.getAttribute("data-locale")),n.off("enter",".google-plus-block")})}else e&&t(u(".fb-page").data("locale")),s.length&&a(s.data("locale"))},initDeferredElements:function(){if(u.fn.Better_Deferred_Loading){var t=this;u.fn.Better_Deferred_Loading({afterSuccessDeferredAjax:function(e){t.bsPagination(e),t.refreshLazyImages()}})}},handleAjaxifiedComments:function(){u(document).on("click",".comment-ajaxified-placeholder",function(e){e.preventDefault();var t=u(this),s=t.closest(".comments-template"),n=t.closest(".ajaxified-respond"),i=t.closest("#ajaxified-comments"),o=t.closest(".ajaxified-comments-container");t.hide();var r=u("<div></div>",{class:"deferred-loading-container",height:40});r.append('<div class="bs-pagin-loading-wrapper">'+publisher_theme_global_loc.loading+"</div>"),r.appendTo(s),u(document).trigger("ajaxified-comments-before-load",[s,t]),u.ajax({url:publisher_theme_global_loc.ajax_url,type:"post",dataType:"json",data:u.extend(t.data(),{action:"ajaxified-comments"})}).done(function(e){r.remove(),o.hide();var t=o[0].outerHTML,a=s.parent();s.replaceWith(e.rawHTML+t),u(".deferred-loading-container",s).remove(),u(document).trigger("ajaxified-comments-loaded",[s,e]),u.fn.Better_Deferred_Loading&&u.fn.Better_Deferred_Loading({context:a.find(".bs-comments-wrapper")}),i.html(n.html())})})},handleInfinitySinglePostLoading:function(s){var o={config:{},util:{pathname:function(e){return u("<a></a>",{href:e})[0].pathname}},GA:{available:function(){return"function"==typeof ga},send:function(){return ga("send","pageview",o.util.pathname(o.config.permalink)),!0}},gTag:{available:function(){return"function"==typeof gtag&&"object"==typeof dataLayer&&dataLayer.forEach},send:function(){return gtag("config",this.gaID(),{page_title:o.config.title,page_path:o.util.pathname(o.config.permalink)}),!0},gaID:function(){return void 0===o.config.gaID&&(o.config.gaID="",dataLayer.forEach(function(e){"config"===e[0]&&"UA-"===e[1].substr(0,3)&&(o.config.gaID=e[1])})),o.config.gaID}},send:function(e){this.config=e;var t=!1;return this.gTag.available()&&(t=this.gTag.send()),!t&&this.GA.available()&&(t=this.GA.send()),t}};if(u("body").hasClass("single")&&u("body").hasClass("infinity-related-post")&&"function"==typeof OnScreen){var n,r,i="infinity-single-post-loading",e=u(".content-column"),t=e.find(".single-post-content"),l=[parseInt(t.attr("id").replace(/[^0-9\.]/g,""))],c=this,d=new OnScreen({tolerance:-1500,container:window}),h=new OnScreen({tolerance:100,container:window});u(i).length||u("<div></div>",{id:i}).appendTo(e),p(),m({permalink:window.location.href,post_id:s,post_title:document.title})}function m(e){var t=".content-column .post.post-"+e.post_id,a=u(t);a.data("post-permalink",e.permalink),a.data("post-title",e.post_title),a.data("post-id",e.post_id),a.data("post-count-calc",e.counter),h.on("enter",t,function(e){var t=u(e),a=t.data("post-id"),s=t.data("post-count-calc"),n=t.data("post-title"),i=t.data("post-permalink");if(r===a)return!1;i&&history.pushState({},void 0,i),n&&(document.title=Publisher_Theme.decodeHtml(n)),s&&(o.send({permalink:i,title:n}),t.data("post-count-calc",!1)),r=a})}function a(e){d.off("enter","#"+i);var t=u(e),a=u("<div></div>",{class:"deferred-loading-container",height:200});a.append('<div class="bs-pagin-loading-wrapper">'+publisher_theme_global_loc.loading+"</div>"),a.appendTo(t),n&&n.abort(),n=u.ajax({url:document.URL,type:"GET",dataType:"json",data:{action:"ajax-get-post",post_ID:s,loaded_posts:l}}).done(function(e){u(".deferred-loading-container",t).remove(),e.rawHTML&&t.before(e.rawHTML),e.loaded_posts&&(l=l.concat(e.loaded_posts)),e.haveNext&&p(),c.ajax_setup_post(),e.posts_info&&e.posts_info.forEach(function(e){m({permalink:e.link,post_id:e.id,counter:!0,post_title:e.title})})})}function p(){d.on("enter","#"+i,a)}},setup_post:function(){this.initLazyLoad(),this.gallery(),this.setup_sliders(),this.setup_video_players(),this.init_sticky_columns(),this.betterstudio_editor_shortcodes(),this.popup(),this.fix_element_query(),this.bsPrettyTabs(),this.bsPagination(),this.initDeferredElements()},ajax_setup_post:function(){this.setup_post(),this.ajax_setup_post_compatibility()},ajax_setup_post_compatibility:function(){u.fn.glossaryTooltip&&u(document).trigger("glossaryTooltipReady")},woo_commerce:function(){var e=!1;u(".woocommerce div.product .woocommerce-tabs ul.tabs li").bind("cssClassChanged",function(){1!=e&&(e=!0,u(this).hasClass("active")&&(u(this).closest("ul.tabs").find("a.active").removeClass("active"),u(this).find("a").addClass("active")),e=!1)}),u(window).on("added_to_cart",function(e,t,a){void 0!==t["total-items-in-cart"]&&1<=u(".main-menu-container .shop-cart-container").length&&(u(".main-menu-container .shop-cart-container .cart-handler .cart-count").length<1?u(".main-menu-container .shop-cart-container .cart-handler").append('<span class="cart-count">'+t["total-items-in-cart"]+"</span>"):u(".main-menu-container .shop-cart-container .cart-handler .cart-count").html(t["total-items-in-cart"]))})},visual_composer:function(){this.is_rtl()},init_off_canvas_menu:function(){var t=this;function a(e){var t="close"===e;u(".off-canvas-overlay")[t?"fadeOut":"fadeIn"](600),u(document.body)[t?"removeClass":"addClass"]("off-canvas-menu-open"),t?(u(".off-canvas-container").addClass("closing"),u(".site-header.header-style-6.full-width .bs-pinning-block.pinned").css("right","0"),setTimeout(function(){u("body").css("padding-right","inherit"),u(".off-canvas-container").removeClass("closing"),u(document.body).removeClass("off-canvas-scroll")},510)):setTimeout(function(){var e=jQuery(document).innerWidth();u(document.body).addClass("off-canvas-scroll"),e=jQuery(document).width()-e,u("body").css("padding-right",e+"px"),u(".site-header.header-style-6.full-width .bs-pinning-block.pinned").css("right",e+"px")},610)}!function(){var e=u(".off-canvas-menu-fallback");if(0!==e.length){var t=u("#main-navigation").clone();t.removeAttr("id").removeAttr("class").addClass("menu clearfix bsm-initialized"),t.find(".mega-menu").each(function(){var e=u(this);if(e.hasClass("mega-type-link"))e.replaceWith(e.find(".content-wrap > ul.mega-links").removeAttr("class").addClass("sub-menu"));else if(e.hasClass("mega-type-link-list"))e.replaceWith(e.find("ul.mega-links").removeAttr("class").addClass("sub-menu"));else if(e.hasClass("tabbed-grid-posts")){var t=e.find(".tabs-section");t.removeAttr("class").addClass("sub-menu").find("li:first-child").remove(),t.find("a").removeAttr("data-target").removeAttr("data-deferred-init").removeAttr("data-toggle").removeAttr("data-deferred-event"),t.find(".fa").remove(),e.replaceWith(t)}else e.closest("li").removeClass("menu-item-has-children"),e.remove()}),t.find("li.bs-pretty-tabs-container").remove(),e.replaceWith(t)}}(),u(".off-canvas-menu-icon, .off-canvas-inner .canvas-close").on("click",function(){if(u(document.body).hasClass("off-canvas-menu-open")){if(a("close"),u(this).hasClass("canvas-close")){var e=u(this).addClass("open");setTimeout(function(){e.removeClass("open")},800)}}else t.refreshLazyImages(),a("open")}),u(".off-canvas-container").on("click",function(e){if(!u(e.target).hasClass("off-canvas-container"))return!0;a("close")})},init_more_stories:function(){if("yes"!==docCookies.getItem("hide-more-stories")){var o=u(".more-stories"),a=this;if(0!==o.length){var r=u(window),t=parseInt(o.data("scroll-top"))||450;r.on("scroll.more-stories",function(){var e=r.scrollTop()>t;e!==o.hasClass("active")&&l(e)}),o.on("click",".more-stories-close",function(){r.off("scroll.more-stories"),l(!1);var e=o.data("close-settings").split(";"),t=e[0],a=e[1]||"/";if(t&&"always"!=t){var s=0,n=0;if("session"!==t){var i=t.substr(-1).toUpperCase();switch(n=t.substr(0,t.length-1),i){case"H":s=3600;break;case"D":s=86400;break;case"W":s=604800;break;case"M":s=18144e3}}docCookies.setItem("hide-more-stories","yes",n*s,a)}return!1})}}function l(e){var t={};t[o.hasClass("left")?"left":"right"]=e?0:-1*o.outerWidth(),o.show().animate(t,400,function(){e&&a.refreshLazyImages()}),o[e?"addClass":"removeClass"]("active")}},init_continue_reading:function(){u(".continue-reading-btn").on("click",function(e){var t=u(".continue-reading-content"),a=u(".continue-reading-container"),s=u(this);e.preventDefault(),t.css("max-height","3000px").delay(750).queue(function(e){t.removeClass("close"),s.fadeOut(function(){a.remove()}),t.css("max-height","none"),e()})})},print_style_fix:function(){function t(){!u("body").hasClass("fixed-for-print")&&u("body").hasClass("bs-ll-a")&&(u("img").each(function(){void 0===u(this).attr("src")&&void 0!==u(this).data("src")&&u(this).attr("src",u(this).data("src"))}),u("body").addClass("fixed-for-print"))}if(u(".post-share").on("click",".social-item.print",function(e){t(),window.print(),e.preventDefault()}),u("body").hasClass("bs-ll-a")){if(jQuery(document).bind("keydown",function(e){80==e.keyCode&&(navigator.platform.match("Mac")?e.metaKey:e.ctrlKey)&&t()}),window.matchMedia)window.matchMedia("print").addListener(function(e){e.matches&&t()});window.onbeforeprint=t}},init_gdpr:function(){u(".bs-gdpr-accept, .bs-gdpr-show").length<=0||("hide"==docCookies.getItem("bs_law_confirmation")?u(".bs-wrap-gdpr-law").addClass("bs-wrap-gdpr-law-close").removeClass("bs-wrap-gdpr-law-open"):u(".bs-wrap-gdpr-law").removeClass("bs-wrap-gdpr-law-close").addClass("bs-wrap-gdpr-law-open"),u(".bs-gdpr-accept, .bs-gdpr-show").on("click",function(e){e.preventDefault();var t=u(this),a=publisher_theme_global_loc.ajax_url;t.closest(".bs-wrap-gdpr-law").toggleClass("bs-wrap-gdpr-law-close"),jQuery.ajax({type:"post",url:a,data:"action=bs_gdpr&data="+t.data("cookie")}),u(".bs-gdpr-accept, .bs-gdpr-show").attr("data-cookie","show"==t.data("cookie")?"hide":"show")}))},init_push_notification:function(){if("undefined"!=typeof OneSignal&&"function"==typeof OneSignal.push){var s=".bs-push-noti";Publisher_UI.block(u(s));var t=function(t){var a=publisher_theme_global_loc.notification||{};u(s).each(function(){var e=u(this);u(".bs-push-noti-message",e).html(t?a.subscribed_msg:a.subscribe_msg),u(".bs-push-noti-button",e).html(t?a.subscribed_btn:a.subscribe_btn),u(".bs-push-noti-message",e).addClass(t?"subscribed":"subscribe").removeClass(t?"subscribe":"subscribed"),Publisher_UI.unblock(e)})};OneSignal.push(function(){OneSignal.on("subscriptionChange",t)}),u(document).on("click",".bs-push-noti-button",function(){var e=u(this).closest(s);return Publisher_UI.block(e),OneSignal.isPushNotificationsEnabled(function(e){e?OneSignal.push(["setSubscription",!1]):OneSignal.push(function(){OneSignal.registerForPushNotifications()})}),!1}),u(document).ready(function(){setTimeout(function(){OneSignal.isPushNotificationsEnabled(function(e){t(e)})},500)})}},decodeHtml:function(e){var t=document.createElement("textarea");return t.innerHTML=e,t.value}}}(jQuery);jQuery(document).ready(function(){function e(){var i,e={wrapperSelector:".main-menu-container .search-container",$wrapper:!1,_xhr:!1,prevSearchQuery:!1,_doingAjax:!1,localize:(i=jQuery).extend({ajax_url:!1,previewMarkup:!1},"object"==typeof publisher_theme_ajax_search_loc?publisher_theme_ajax_search_loc:{}),ajaxRequestDelay:300,EL:{INPUT:"search-field",PREVIEW:"search-preview",LOADING:"ajax-search-loading"},init:function(){this.$wrapper=i(this.wrapperSelector),this.prepareMarkup(),this.bindEvents()},prepareMarkup:function(){var e=this.findElements(this.EL.PREVIEW);e.length||(e=i("<div/>",{class:this.EL.PREVIEW}).appendTo(this.$wrapper),this.localize.previewMarkup&&e.html(this.localize.previewMarkup)),this.findElements(this.EL.LOADING).length||(this._createLoadingELement().appendTo(this.$wrapper.find(".search-handler")).hide(),this._addLoadingInPreview())},_createLoadingELement:function(){return i("<i/>",{class:"fa fa-refresh fa-spin fa-fw ajax-loading-icon"})},_addLoadingInPreview:function(){if(!this._doingAjax){var e,t=i("<span/>",{class:this.EL.LOADING}),a=this.findSections(this.EL.PREVIEW);for(e in t.html('<i class="fa fa-refresh fa-spin fa-fw ajax-loading-icon"></i>'),a)a[e].html(" "),t.clone().appendTo(a[e])}},_ajax:function(e,t,a){var s=this,n=i.extend({url:this.localize.ajax_url,data:i.extend({action:"ajaxified-search"},t)},a);return s._doingAjax=!0,i.ajax({url:n.url,type:"POST",dataType:"json",data:n.data}).done(function(){s._doingAjax=!1,e.apply(this,arguments)})},findElements:function(e){return this.$wrapper.find("."+e)},findSections:function(e){var t;if(t=e?this.findElements(e):this.$wrapper){var a={};return i("[data-section-name]",t).each(function(){var e=i(this),t=e.data("section-name");t&&(a[t]=e)}),a}return!1},listSections:function(){var e=this.findSections();return e?Object.keys(e):[]},bindEvents:function(){var a=this;a.findElements(this.EL.INPUT).on("keyup.ajax-search",function(e){if(!e.ctrlKey&&!e.metaKey){var t=i.trim(this.value);t!==a.prevSearchQuery&&(a.handleUserSearch.call(a,this),a.prevSearchQuery=t)}})},hidePreviewSection:function(){i(".bs-pinning-wrapper").removeClass("stop-smarty-pinning");var e=i("#header .bs-pinning-block");e.hasClass("pinned")&&e.removeClass("pinned top normal").addClass("unpinned")},showPreviewSection:function(){i(".bs-pinning-wrapper").addClass("stop-smarty-pinning")},handleUserSearch:function(e){var t=e.value,a=this;t?(a.triggerLoading("on"),a._xhr&&a._xhr.abort(),a.$wrapper.finish().delay(a.ajaxRequestDelay).queue(function(){a._xhr=a._ajax(function(e){a.appendHTML(e),a.triggerLoading("off"),Publisher_Theme.refreshLazyImages()},{s:t,sections:a.listSections(),full_width:a.localize.full_width})})):(a.triggerEmpty(),a.hidePreviewSection())},bindCloseEvent:function(){i(document);var t=this;this.findElements(this.EL.PREVIEW).on("click.ajax-search",function(e){e.stopPropagation()}),i(".search-container .search-handler").on("click",function(e){i(".search-container").hasClass("open")||t.$wrapper.hasClass("result-results-exist")&&t.showPreviewSection()})},appendHTML:function(e){if("object"==typeof e.sections){var t=this.findSections(this.EL.PREVIEW);if(t){var a;for(a in t)"string"==typeof e.sections[a]&&t[a].html(e.sections[a]);this.$wrapper.addClass("result-results-exist")}}this.bindCloseEvent()},triggerLoading:function(e){var t="on"===e;this.findElements(this.EL.LOADING)[t?"show":"hide"]();var a=i(".ajax-loading-icon",this.$wrapper);a[t?"show":"hide"](),a.siblings()[t?"hide":"show"](),t&&(this.showPreviewSection(),this._addLoadingInPreview())},triggerEmpty:function(){if(!this._doingAjax){var e,t=this.findSections(this.EL.PREVIEW);for(e in t)t[e].html(" ")}}};Publisher_Theme.init(),jQuery("body").hasClass("active-ajax-search")&&e.init()}window.self===window.top?e():setTimeout(e)}),"function"==typeof OnScreen&&(bsrj_retinajs(document.querySelectorAll(".site-header img#site-logo")),bsrj_retinajs(document.querySelectorAll(".rh-header .logo-container img")),bsrj_retinajs(document.querySelectorAll(".bs-subscribe-newsletter .powered-by img")),bsrj_retinajs(document.querySelectorAll("body.bs-ll-d .img-holder")),bsrj_retinajs(document.querySelectorAll("body.bs-ll-d .img-cont")));