vendor: 5,208 bytes, line 1
1!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).flatpickr=t()}(this,function(){"use strict";var te=function(){return(te=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},ie=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],ne={_disable:[],_enable:[],allowInput:!1,altFormat:"F j, Y",altInput:!1,altInputClass:"form-control input",animate:"object"==typeof window&&-1===window.navigator.userAgent.indexOf("MSIE"),ariaDateFormat:"F j, Y",clickOpens:!0,closeOnSelect:!0,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enable:[],enableSeconds:!1,enableTime:!1,errorHandler:function(e){return"undefined"!=typeof console&&console.warn(e)},getWeek:function(e){var t=new Date(e.getTime());t.setHours(0,0,0,0),t.setDate(t.getDate()+3-(t.getDay()+6)%7);var i=new Date(t.getFullYear(),0,4);return 1+Math.round(((t.getTime()-i.getTime())/864e5-3+(i.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:"default",minuteIncrement:5,mode:"single",monthSelectorType:"dropdown",nextArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1},re={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(e){var t=e%100;if(3<t&&t<21)return"th";switch(t%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:!1},ae=function(e){return("0"+e).slice(-2)},se=function(e){return!0===e?1:0};function oe(i,n,r){var a;return void 0===r&&(r=!1),function(){var e=this,t=arguments;null!==a&&clearTimeout(a),a=window.setTimeout(function(){a=null,r||i.apply(e,t)},n),r&&!a&&i.apply(e,t)}}var le=function(e){return e instanceof Array?e:[e]};function ue(e,t,i){if(!0===i)return e.classList.add(t);e.classList.remove(t)}function ce(e,t,i){var n=window.document.createElement(e);return t=t||"",i=i||"",n.className=t,void 0!==i&&(n.textContent=i),n}function he(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function de(e,t){var i=ce("div","numInputWrapper"),n=ce("input","numInput "+e),r=ce("span","arrowUp"),a=ce("span","arrowDown");if(-1===navigator.userAgent.indexOf("MSIE 9.0")?n.type="number":(n.type="text",n.pattern="\\d*"),void 0!==t)for(var s in t)n.setAttribute(s,t[s]);return i.appendChild(n),i.appendChild(r),i.appendChild(a),i}function e(){}var pe=function(e,t,i){return i.months[t?"shorthand":"longhand"][e]},M={D:e,F:function(e,t,i){e.setMonth(i.months.longhand.indexOf(t))},G:function(e,t){e.setHours(parseFloat(t))},H:function(e,t){e.setHours(parseFloat(t))},J:function(e,t){e.setDate(parseFloat(t))},K:function(e,t,i){e.setHours(e.getHours()%12+12*se(new RegExp(i.amPM[1],"i").test(t)))},M:function(e,t,i){e.setMonth(i.months.shorthand.indexOf(t))},S:function(e,t){e.setSeconds(parseFloat(t))},U:function(e,t){return new Date(1e3*parseFloat(t))},W:function(e,t,i){var n=parseInt(t),r=new Date(e.getFullYear(),0,2+7*(n-1),0,0,0,0);return r.setDate(r.getDate()-r.getDay()+i.firstDayOfWeek),r},Y:function(e,t){e.setFullYear(parseFloat(t))},Z:function(e,t){return new Date(t)},d:function(e,t){e.setDate(parseFloat(t))},h:function(e,t){e.setHours(parseFloat(t))},i:function(e,t){e.setMinutes(parseFloat(t))},j:function(e,t){e.setDate(parseFloat(t))},l:e,m:function(e,t){e.setMonth(parseFloat(t)-1)},n:function(e,t){e.setMonth(parseFloat(t)-1)},s:function(e,t){e.setSeconds(parseFloat(t))},u:function(e,t){return new Date(parseFloat(t))},w:e,y:function(e,t){e.setFullYear(2e3+parseFloat(t))}},fe={D:"(\\w+)",F:"(\\w+)",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"(\\w+)",S:"(\\d\\d|\\d)",U:"(.+)",W:"
1(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"(\\w+)",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",u:"(.+)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},o={Z:function(e){return e.toISOString()},D:function(e,t,i){return t.weekdays.shorthand[o.w(e,t,i)]},F:function(e,t,i){return pe(o.n(e,t,i)-1,!1,t)},G:function(e,t,i){return ae(o.h(e,t,i))},H:function(e){return ae(e.getHours())},J:function(e,t){return void 0!==t.ordinal?e.getDate()+t.ordinal(e.getDate()):e.getDate()},K:function(e,t){return t.amPM[se(11<e.getHours())]},M:function(e,t){return pe(e.getMonth(),!0,t)},S:function(e){return ae(e.getSeconds())},U:function(e){return e.getTime()/1e3},W:function(e,t,i){return i.getWeek(e)},Y:function(e){return e.getFullYear()},d:function(e){return ae(e.getDate())},h:function(e){return e.getHours()%12?e.getHours()%12:12},i:function(e){return ae(e.getMinutes())},j:function(e){return e.getDate()},l:function(e,t){return t.weekdays.longhand[e.getDay()]},m:function(e){return ae(e.getMonth()+1)},n:function(e){return e.getMonth()+1},s:function(e){return e.getSeconds()},u:function(e){return e.getTime()},w:function(e){return e.getDay()},y:function(e){return String(e.getFullYear()).substring(2)}},ge=function(e){var t=e.config,a=void 0===t?ne:t,i=e.l10n,s=void 0===i?re:i;return function(n,e,t){var r=t||s;return void 0!==a.formatDate?a.formatDate(n,e,r):e.split("").map(function(e,t,i){return o[e]&&"\\"!==i[t-1]?o[e](n,r,a):"\\"!==e?e:""}).join("")}},me=function(e){var t=e.config,y=void 0===t?ne:t,i=e.l10n,_=void 0===i?re:i;return function(e,t,i,n){if(0===e||e){var r,a=n||_,s=e;if(e instanceof Date)r=new Date(e.getTime());else if("string"!=typeof e&&void 0!==e.toFixed)r=new Date(e);else if("string"==typeof e){var o=t||(y||ne).dateFormat,l=String(e).trim();if("today"===l)r=new Date,i=!0;else if(/Z$/.test(l)||/GMT$/.test(l))r=new Date(e);else if(y&&y.parseDate)r=y.parseDate(e,o);else{r=y&&y.noCalendar?new Date((new Date).setHours(0,0,0,0)):new Date((new Date).getFullYear(),0,1,0,0,0,0);for(var u=void 0,c=[],h=0,d=0,p="";h<o.length;h++){var f=o[h],g="\\"===f,m="\\"===o[h-1]||g;if(fe[f]&&!m){p+=fe[f];var v=new RegExp(p).exec(e);v&&(u=!0)&&c["Y"!==f?"push":"unshift"]({fn:M[f],val:v[++d]})}else g||(p+=".");c.forEach(function(e){var t=e.fn,i=e.val;return r=t(r,i,a)||r})}r=u?r:void 0}}if(r instanceof Date&&!isNaN(r.getTime()))return!0===i&&r.setHours(0,0,0,0),r;y.errorHandler(new Error("Invalid date provided: "+s))}}};function ve(e,t,i){return void 0===i&&(i=!0),!1!==i?new Date(e.getTime()).setHours(0,0,0,0)-new Date(t.getTime()).setHours(0,0,0,0):e.getTime()-t.getTime()}var ye=function(e,t,i){return e>Math.min(t,i)&&e<Math.max(t,i)},_e={DAY:864e5};"function"!=typeof Object.assign&&(Object.assign=function(i){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];if(!i)throw TypeError("Cannot convert undefined or null to object");for(var n=function(t){t&&Object.keys(t).forEach(function(e){return i[e]=t[e]})},r=0,a=e;r<a.length;r++){n(a[r])}return i});var Me=300;function s(c,h){var M={config:te({},ne,we.defaultConfig),l10n:re};function d(e){return e.bind(M)}function t(){var t=M.config;!1===t.weekNumbers&&1===t.showMonths||!0!==t.noCalendar&&window.requestAnimationFrame(function(){if(void 0!==M.calendarContainer&&(M.calendarContainer.style.visibility="hidden",M.calendarContainer.style.display="block"),void 0!==M.daysContainer){var e=(M.days.offsetWidth+1)*t.showMonths;M.daysContainer.style.width=e+"px",M.calendarContainer.style.width=e+(void 0!==M.weekWrapper?M.weekWrapper.offsetWidth:0)+"px",M.calendarContainer.style.removeProperty("visibility"),M.calendarContainer.style.removeProperty("display")}})}function p(e){0===M.selectedDates.length&&z(),void 0!==e&&"blur"!==e.type&&function(e){e.preventDefault();var t="keydown"===e.type,i=e.target;void 0!==M.amPM&&e.target===M.amPM&&(M.amPM.textContent=M.l10n.amPM[se(M.amPM.textContent===M.l10n.amPM[0])]);var n=parseFloat(i.getAttribute("min")),r=parseFloat(i.getAttribute("max")),a=parseFloat(i.getAttribute("step")),s=parseInt(i.value,10),o=e.delta||(t?38===e.which?1:-1:0),l=s+a*o;if(void 0!==i.value&&2===i.value.length){var u=i===M.hourElement,c=i===M.minuteElement;l<n?(l=r+l+se(!u)+(se(u)&&se(!M.amPM)),c&&m(void 0,-1,M.hourElement)):r<l&&(l=i===M.hourElement?l-r-se(!M.amPM):n,c&&m(void 0,1,M.hourElement)),M.amPM&&u&&(1===a?l+s===23:Math.abs(l-s)>a)&&(M.amPM.textContent=M.l10n.amPM[se(M.amPM.textContent===M.l10n.amPM[0])]),i.value=ae(l)}}(e);var t=M._input.value;f(),J(),M._input.value!==t&&M._debouncedChange()}function f(){if(void 0!==M.hourElement&&void 0!==M.minuteElement){var e,t,i=(parseInt(M.hourElement.value.slice(-2),10)||0)%24,n=(parseInt(M.minuteElement.value,10)||0)%60,r=void 0!==M.secondElement?(parseInt(M.secondElement.value,10)||0)%60:0;void 0!==M.amPM&&(e=i,t=M.amPM.textContent,i=e%12+12*se(t===M.l10n.amPM[1]));var a=void 0!==M.config.minTime||M.config.minDate&&M.minDateHasTime&&M.latestSelectedDateObj&&0===ve(M.latestSelectedDateObj,M.config.minDate,!0);if(void 0!==M.config.maxTime||M.config.maxDate&&M.maxDateHasTime&&M.latestSelectedDateObj&&0===ve(M.latestSelectedDateObj,M.config.maxDate,!0)){var s=void 0!==M.config.maxTime?M.config.maxTime:M.config.maxDate;(i=Math.min(i,s.getHours()))===s.getHours()&&(n=Math.min(n,s.getMinutes())),n===s.getMinutes()&&(r=Math.min(r,s.getSeconds()))}if(a){var o=void 0!==M.config.minTime?M.config.minTime:M.config.minDate;(i=Math.max(i,o.getHours()))===o.getHours()&&(n=Math.max(n,o.getMinutes())),n===o.getMinutes()&&(r=Math.max(r,o.getSeconds()))}l(i,n,r)}}function r(e){var t=e||M.latestSelectedDateObj;t&&l(t.getHours(),t.getMinutes(),t.getSeconds())}function i(){var e=M.config.defaultHour,t=M.config.defaultMinute,i=M.config.defaultSeconds;if(void 0!==M.config.minDate){var n=M.config.minDate.getHours(),r=M.config.minDate.getMinutes();(e=Math.max(e,n))===n&&(t=Math.max(r,t)),e===n&&t===r&&(i=M.config.minDate.getSeconds())}
vendor: 7,137 bytes, line 1
1if(void 0!==M.config.maxDate){var a=M.config.maxDate.getHours(),s=M.config.maxDate.getMinutes();(e=Math.min(e,a))===a&&(t=Math.min(s,t)),e===a&&t===s&&(i=M.config.maxDate.getSeconds())}l(e,t,i)}function l(e,t,i){void 0!==M.latestSelectedDateObj&&M.latestSelectedDateObj.setHours(e%24,t,i||0,0),M.hourElement&&M.minuteElement&&!M.isMobile&&(M.hourElement.value=ae(M.config.time_24hr?e:(12+e)%12+12*se(e%12==0)),M.minuteElement.value=ae(t),void 0!==M.amPM&&(M.amPM.textContent=M.l10n.amPM[se(12<=e)]),void 0!==M.secondElement&&(M.secondElement.value=ae(i)))}function n(e){var t=parseInt(e.target.value)+(e.delta||0);(1<t/1e3||"Enter"===e.key&&!/[^\d]/.test(t.toString()))&&I(t)}function s(t,i,n,r){return i instanceof Array?i.forEach(function(e){return s(t,e,n,r)}):t instanceof Array?t.forEach(function(e){return s(e,i,n,r)}):(t.addEventListener(i,n,r),void M._handlers.push({element:t,event:i,handler:n,options:r}))}function a(t){return function(e){1===e.which&&t(e)}}function u(){q("onChange")}function o(e,t){var i=void 0!==e?M.parseDate(e):M.latestSelectedDateObj||(M.config.minDate&&M.config.minDate>M.now?M.config.minDate:M.config.maxDate&&M.config.maxDate<M.now?M.config.maxDate:M.now),n=M.currentYear,r=M.currentMonth;try{void 0!==i&&(M.currentYear=i.getFullYear(),M.currentMonth=i.getMonth())}catch(e){e.message="Invalid date supplied: "+i,M.config.errorHandler(e)}t&&M.currentYear!==n&&(q("onYearChange"),A()),!t||M.currentYear===n&&M.currentMonth===r||q("onMonthChange"),M.redraw()}function g(e){~e.target.className.indexOf("arrow")&&m(e,e.target.classList.contains("arrowUp")?1:-1)}function m(e,t,i){var n=e&&e.target,r=i||n&&n.parentNode&&n.parentNode.firstChild,a=X("increment");a.delta=t,r&&r.dispatchEvent(a)}function v(e,t,i,n){var r,a=O(t,!0),s=ce("span","flatpickr-day "+e,t.getDate().toString());return s.dateObj=t,s.$i=n,s.setAttribute("aria-label",M.formatDate(t,M.config.ariaDateFormat)),-1===e.indexOf("hidden")&&0===ve(t,M.now)&&((M.todayDateElem=s).classList.add("today"),s.setAttribute("aria-current","date")),a?(s.tabIndex=-1,Z(t)&&(s.classList.add("selected"),M.selectedDateElem=s,"range"===M.config.mode&&(ue(s,"startRange",M.selectedDates[0]&&0===ve(t,M.selectedDates[0],!0)),ue(s,"endRange",M.selectedDates[1]&&0===ve(t,M.selectedDates[1],!0)),"nextMonthDay"===e&&s.classList.add("inRange")))):s.classList.add("flatpickr-disabled"),"range"===M.config.mode&&(r=t,!("range"!==M.config.mode||M.selectedDates.length<2)&&0<=ve(r,M.selectedDates[0])&&ve(r,M.selectedDates[1])<=0&&!Z(t)&&s.classList.add("inRange")),M.weekNumbers&&1===M.config.showMonths&&"prevMonthDay"!==e&&i%7==1&&M.weekNumbers.insertAdjacentHTML("beforeend","<span class='flatpickr-day'>"+M.config.getWeek(t)+"</span>"),q("onDayCreate",s),s}function y(e){e.focus(),"range"===M.config.mode&&P(e)}function _(e){for(var t=0<e?0:M.config.showMonths-1,i=0<e?M.config.showMonths:-1,n=t;n!=i;n+=e)for(var r=M.daysContainer.children[n],a=0<e?0:r.children.length-1,s=0<e?r.children.length:-1,o=a;o!=s;o+=e){var l=r.children[o];if(-1===l.className.indexOf("hidden")&&O(l.dateObj))return l}}function w(e,t){var i=j(document.activeElement||document.body),n=void 0!==e?e:i?document.activeElement:void 0!==M.selectedDateElem&&j(M.selectedDateElem)?M.selectedDateElem:void 0!==M.todayDateElem&&j(M.todayDateElem)?M.todayDateElem:_(0<t?1:-1);return void 0===n?M._input.focus():i?void function(e,t){for(var i=-1===e.className.indexOf("Month")?e.dateObj.getMonth():M.currentMonth,n=0<t?M.config.showMonths:-1,r=0<t?1:-1,a=i-M.currentMonth;a!=n;a+=r)for(var s=M.daysContainer.children[a],o=i-M.currentMonth===a?e.$i+t:t<0?s.children.length-1:0,l=s.children.length,u=o;0<=u&&u<l&&u!=(0<t?l:-1);u+=r){var c=s.children[u];if(-1===c.className.indexOf("hidden")&&O(c.dateObj)&&Math.abs(e.$i-u)>=Math.abs(t))return y(c)}M.changeMonth(r),w(_(r),0)}(n,t):y(n)}function b(e,t){for(var i=(new Date(e,t,1).getDay()-M.l10n.firstDayOfWeek+7)%7,n=M.utils.getDaysInMonth((t-1+12)%12),r=M.utils.getDaysInMonth(t),a=window.document.createDocumentFragment(),s=1<M.config.showMonths,o=s?"prevMonthDay hidden":"prevMonthDay",l=s?"nextMonthDay hidden":"nextMonthDay",u=n+1-i,c=0;u<=n;u++,c++)a.appendChild(v(o,new Date(e,t-1,u),u,c));for(u=1;u<=r;u++,c++)a.appendChild(v("",new Date(e,t,u),u,c));for(var h=r+1;h<=42-i&&(1===M.config.showMonths||c%7!=0);h++,c++)a.appendChild(v(l,new Date(e,t+1,h%r),h,c));var d=ce("div","dayContainer");return d.appendChild(a),d}function T(){if(void 0!==M.daysContainer){he(M.daysContainer),M.weekNumbers&&he(M.weekNumbers);for(var e=document.createDocumentFragment(),t=0;t<M.config.showMonths;t++){var i=new Date(M.currentYear,M.currentMonth,1);i.setMonth(M.currentMonth+t),e.appendChild(b(i.getFullYear(),i.getMonth()))}M.daysContainer.appendChild(e),M.days=M.daysContainer.firstChild,"range"===M.config.mode&&1===M.selectedDates.length&&P()}}function A(){if(!(1<M.config.showMonths||"dropdown"!==M.config.monthSelectorType)){var e;M.monthsDropdownContainer.tabIndex=-1,M.monthsDropdownContainer.innerHTML="";for(var t=0;t<12;t++)if(e=t,!(void 0!==M.config.minDate&&M.currentYear===M.config.minDate.getFullYear()&&e<M.config.minDate.getMonth()||void 0!==M.config.maxDate&&M.currentYear===M.config.maxDate.getFullYear()&&e>M.config.maxDate.getMonth())){var i=ce("option","flatpickr-monthDropdown-month");i.value=new Date(M.currentYear,t).getMonth().toString(),i.textContent=pe(t,M.config.shorthandCurrentMonth,M.l10n),i.tabIndex=-1,M.currentMonth===t&&(i.selected=!0),M.monthsDropdownContainer.appendChild(i)}}}function x(){var e,t=ce("div","flatpickr-month"),i=window.document.createDocumentFragment();e=1<M.config.showMonths||"static"===M.config.monthSelectorType?ce("span","cur-month"):(M.monthsDropdownContainer=ce("select","flatpickr-monthDropdown-months"),s(M.monthsDropdownContainer,"change",function(e){var t=e.target,i=parseInt(t.value,10);M.changeMonth(i-M.currentMonth),q("onMonthChange")}),A(),M.monthsDropdownContainer);var n=de("cur-year",{tabindex:"-1"}),r=n.getElementsByTagName("input")[0];r.setAttribute("aria-label",M.l10n.yearAriaLabel),M.config.minDate&&r.setAttribute("min",M.config.minDate.getFullYear().toString()),M.config.maxDate&&(r.setAttribute("max",M.config.maxDate.getFullYear().toString()),r.disabled=!!M.config.minDate&&M.config.minDate.getFullYear()===M.config.maxDate.getFullYear());var a=ce("div","flatpickr-current-month");return a.appendChild(e),a.appendChild(n),i.appendChild(a),t.appendChild(i),{container:t,yearElement:r,monthElement:e}}function E(){he(M.monthNav),M.monthNav.appendChild(M.prevMonthNav),M.config.showMonths&&(M.yearElements=[],M.monthElements=[]);for(var e=M.config.showMonths;e--;){var t=x();M.yearElements.push(t.yearElement),M.monthElements.push(t.monthElement),M.monthNav.appendChild(t.container)}M.monthNav.appendChild(M.nextMonthNav)}function S(){M.weekdayContainer?he(M.weekdayContainer):M.weekdayContainer=ce("div","flatpickr-weekdays");for(var e=M.config.showMonths;e--;){var t=ce("div","flatpickr-weekdaycontainer");M.weekdayContainer.appendChild(t)}return D(),M.weekdayContainer}function D(){if(M.weekdayContainer){var e=M.l10n.firstDayOfWeek,t=M.l10n.weekdays.shorthand.slice();
vendor: 6,656 bytes, line 1
10<e&&e<t.length&&(t=t.splice(e,t.length).concat(t.splice(0,e)));for(var i=M.config.showMonths;i--;)M.weekdayContainer.children[i].innerHTML="\n <span class='flatpickr-weekday'>\n "+t.join("</span><span class='flatpickr-weekday'>")+"\n </span>\n "}}function N(e,t){void 0===t&&(t=!0);var i=t?e:e-M.currentMonth;i<0&&!0===M._hidePrevMonthArrow||0<i&&!0===M._hideNextMonthArrow||(M.currentMonth+=i,(M.currentMonth<0||11<M.currentMonth)&&(M.currentYear+=11<M.currentMonth?1:-1,M.currentMonth=(M.currentMonth+12)%12,q("onYearChange"),A()),T(),q("onMonthChange"),$())}function C(e){return!(!M.config.appendTo||!M.config.appendTo.contains(e))||M.calendarContainer.contains(e)}function L(e){if(M.isOpen&&!M.config.inline){var t="function"!=typeof(s=e).composedPath?s.target:s.composedPath()[0],i=C(t),n=t===M.input||t===M.altInput||M.element.contains(t)||e.path&&e.path.indexOf&&(~e.path.indexOf(M.input)||~e.path.indexOf(M.altInput)),r="blur"===e.type?n&&e.relatedTarget&&!C(e.relatedTarget):!n&&!i&&!C(e.relatedTarget),a=!M.config.ignoredFocusElements.some(function(e){return e.contains(t)});r&&a&&(void 0!==M.timeContainer&&void 0!==M.minuteElement&&void 0!==M.hourElement&&p(),M.close(),"range"===M.config.mode&&1===M.selectedDates.length&&(M.clear(!1),M.redraw()))}var s}function I(e){if(!(!e||M.config.minDate&&e<M.config.minDate.getFullYear()||M.config.maxDate&&e>M.config.maxDate.getFullYear())){var t=M.currentYear!==e;M.currentYear=e||M.currentYear,M.config.maxDate&&M.currentYear===M.config.maxDate.getFullYear()?M.currentMonth=Math.min(M.config.maxDate.getMonth(),M.currentMonth):M.config.minDate&&M.currentYear===M.config.minDate.getFullYear()&&(M.currentMonth=Math.max(M.config.minDate.getMonth(),M.currentMonth)),t&&(M.redraw(),q("onYearChange"),A())}}function O(e,t){void 0===t&&(t=!0);var i=M.parseDate(e,void 0,t);if(M.config.minDate&&i&&ve(i,M.config.minDate,void 0!==t?t:!M.minDateHasTime)<0||M.config.maxDate&&i&&0<ve(i,M.config.maxDate,void 0!==t?t:!M.maxDateHasTime))return!1;if(0===M.config.enable.length&&0===M.config.disable.length)return!0;if(void 0===i)return!1;for(var n=0<M.config.enable.length,r=n?M.config.enable:M.config.disable,a=0,s=void 0;a<r.length;a++){if("function"==typeof(s=r[a])&&s(i))return n;if(s instanceof Date&&void 0!==i&&s.getTime()===i.getTime())return n;if("string"==typeof s&&void 0!==i){var o=M.parseDate(s,void 0,!0);return o&&o.getTime()===i.getTime()?n:!n}if("object"==typeof s&&void 0!==i&&s.from&&s.to&&i.getTime()>=s.from.getTime()&&i.getTime()<=s.to.getTime())return n}return!n}function j(e){return void 0!==M.daysContainer&&(-1===e.className.indexOf("hidden")&&M.daysContainer.contains(e))}function k(e){var t=e.target===M._input,i=M.config.allowInput,n=M.isOpen&&(!i||!t),r=M.config.inline&&t&&!i;if(13===e.keyCode&&t){if(i)return M.setDate(M._input.value,!0,e.target===M.altInput?M.config.altFormat:M.config.dateFormat),e.target.blur();M.open()}else if(C(e.target)||n||r){var a=!!M.timeContainer&&M.timeContainer.contains(e.target);switch(e.keyCode){case 13:a?(e.preventDefault(),p(),H()):Y(e);break;case 27:e.preventDefault(),H();break;case 8:case 46:t&&!M.config.allowInput&&(e.preventDefault(),M.clear());break;case 37:case 39:if(a||t)M.hourElement&&M.hourElement.focus();else if(e.preventDefault(),void 0!==M.daysContainer&&(!1===i||document.activeElement&&j(document.activeElement))){var s=39===e.keyCode?1:-1;e.ctrlKey?(e.stopPropagation(),N(s),w(_(1),0)):w(void 0,s)}break;case 38:case 40:e.preventDefault();var o=40===e.keyCode?1:-1;M.daysContainer&&void 0!==e.target.$i||e.target===M.input||e.target===M.altInput?e.ctrlKey?(e.stopPropagation(),I(M.currentYear-o),w(_(1),0)):a||w(void 0,7*o):e.target===M.currentYearElement?I(M.currentYear-o):M.config.enableTime&&(!a&&M.hourElement&&M.hourElement.focus(),p(e),M._debouncedChange());break;case 9:if(a){var l=[M.hourElement,M.minuteElement,M.secondElement,M.amPM].concat(M.pluginElements).filter(function(e){return e}),u=l.indexOf(e.target);if(-1!==u){var c=l[u+(e.shiftKey?-1:1)];e.preventDefault(),(c||M._input).focus()}}else!M.config.noCalendar&&M.daysContainer&&M.daysContainer.contains(e.target)&&e.shiftKey&&(e.preventDefault(),M._input.focus())}}if(void 0!==M.amPM&&e.target===M.amPM)switch(e.key){case M.l10n.amPM[0].charAt(0):case M.l10n.amPM[0].charAt(0).toLowerCase():M.amPM.textContent=M.l10n.amPM[0],f(),J();break;case M.l10n.amPM[1].charAt(0):case M.l10n.amPM[1].charAt(0).toLowerCase():M.amPM.textContent=M.l10n.amPM[1],f(),J()}(t||C(e.target))&&q("onKeyDown",e)}function P(a){if(1===M.selectedDates.length&&(!a||a.classList.contains("flatpickr-day")&&!a.classList.contains("flatpickr-disabled"))){for(var s=a?a.dateObj.getTime():M.days.firstElementChild.dateObj.getTime(),o=M.parseDate(M.selectedDates[0],void 0,!0).getTime(),e=Math.min(s,M.selectedDates[0].getTime()),t=Math.max(s,M.selectedDates[0].getTime()),l=!1,u=0,c=0,i=e;i<t;i+=_e.DAY)O(new Date(i),!0)||(l=l||e<i&&i<t,i<o&&(!u||u<i)?u=i:o<i&&(!c||i<c)&&(c=i));for(var n=0;n<M.config.showMonths;n++)for(var h=M.daysContainer.children[n],r=function(e,t){var i=h.children[e],n=i.dateObj.getTime(),r=0<u&&n<u||0<c&&c<n;return r?(i.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(e){i.classList.remove(e)}),"continue"):l&&!r?"continue":(["startRange","inRange","endRange","notAllowed"].forEach(function(e){i.classList.remove(e)}),void(void 0!==a&&(a.classList.add(s<=M.selectedDates[0].getTime()?"startRange":"endRange"),o<s&&n===o?i.classList.add("startRange"):s<o&&n===o&&i.classList.add("endRange"),u<=n&&(0===c||n<=c)&&ye(n,o,s)&&i.classList.add("inRange"))))},d=0,p=h.children.length;d<p;d++)r(d)}}function R(){!M.isOpen||M.config.static||M.config.inline||F()}function z(){M.setDate(void 0!==M.config.minDate?new Date(M.config.minDate.getTime()):new Date,!0),i(),J()}function U(n){return function(e){var t=M.config["_"+n+"Date"]=M.parseDate(e,M.config.dateFormat),i=M.config["_"+("min"===n?"max":"min")+"Date"];void 0!==t&&(M["min"===n?"minDateHasTime":"maxDateHasTime"]=0<t.getHours()||0<t.getMinutes()||0<t.getSeconds()),M.selectedDates&&(M.selectedDates=M.selectedDates.filter(function(e){return O(e)}),M.selectedDates.length||"min"!==n||r(t),J()),M.daysContainer&&(G(),void 0!==t?M.currentYearElement[n]=t.getFullYear().toString():M.currentYearElement.removeAttribute(n),M.currentYearElement.disabled=!!i&&void 0!==t&&i.getFullYear()===t.getFullYear())}}function B(){"object"!=typeof M.config.locale&&void 0===we.l10ns[M.config.locale]&&M.config.errorHandler(new Error("flatpickr: invalid locale "+M.config.locale)),M.l10n=te({},we.l10ns.default,"object"==typeof M.config.locale?M.config.locale:"default"!==M.c
vendor: 5,400 bytes, line 1
1onfig.locale?we.l10ns[M.config.locale]:void 0),fe.K="("+M.l10n.amPM[0]+"|"+M.l10n.amPM[1]+"|"+M.l10n.amPM[0].toLowerCase()+"|"+M.l10n.amPM[1].toLowerCase()+")",void 0===te({},h,JSON.parse(JSON.stringify(c.dataset||{}))).time_24hr&&void 0===we.defaultConfig.time_24hr&&(M.config.time_24hr=M.l10n.time_24hr),M.formatDate=ge(M),M.parseDate=me({config:M.config,l10n:M.l10n})}function F(e){if(void 0!==M.calendarContainer){q("onPreCalendarPosition");var t=e||M._positionElement,i=Array.prototype.reduce.call(M.calendarContainer.children,function(e,t){return e+t.offsetHeight},0),n=M.calendarContainer.offsetWidth,r=M.config.position.split(" "),a=r[0],s=1<r.length?r[1]:null,o=t.getBoundingClientRect(),l=window.innerHeight-o.bottom,u="above"===a||"below"!==a&&l<i&&o.top>i,c=window.pageYOffset+o.top+(u?-i-2:t.offsetHeight+2);if(ue(M.calendarContainer,"arrowTop",!u),ue(M.calendarContainer,"arrowBottom",u),!M.config.inline){var h=window.pageXOffset+o.left-(null!=s&&"center"===s?(n-o.width)/2:0),d=window.document.body.offsetWidth-(window.pageXOffset+o.right),p=h+n>window.document.body.offsetWidth,f=d+n>window.document.body.offsetWidth;if(ue(M.calendarContainer,"rightMost",p),!M.config.static)if(M.calendarContainer.style.top=c+"px",p)if(f){var g=document.styleSheets[0];if(void 0===g)return;var m=window.document.body.offsetWidth,v=Math.max(0,m/2-n/2),y=g.cssRules.length,_="{left:"+o.left+"px;right:auto;}";ue(M.calendarContainer,"rightMost",!1),ue(M.calendarContainer,"centerMost",!0),g.insertRule(".flatpickr-calendar.centerMost:before,.flatpickr-calendar.centerMost:after"+_,y),M.calendarContainer.style.left=v+"px",M.calendarContainer.style.right="auto"}else M.calendarContainer.style.left="auto",M.calendarContainer.style.right=d+"px";else M.calendarContainer.style.left=h+"px",M.calendarContainer.style.right="auto"}}}function G(){M.config.noCalendar||M.isMobile||($(),T())}function H(){M._input.focus(),-1!==window.navigator.userAgent.indexOf("MSIE")||void 0!==navigator.msMaxTouchPoints?setTimeout(M.close,0):M.close()}function Y(e){e.preventDefault(),e.stopPropagation();var t=function e(t,i){return i(t)?t:t.parentNode?e(t.parentNode,i):void 0}(e.target,function(e){return e.classList&&e.classList.contains("flatpickr-day")&&!e.classList.contains("flatpickr-disabled")&&!e.classList.contains("notAllowed")});if(void 0!==t){var i=t,n=M.latestSelectedDateObj=new Date(i.dateObj.getTime()),r=(n.getMonth()<M.currentMonth||n.getMonth()>M.currentMonth+M.config.showMonths-1)&&"range"!==M.config.mode;if(M.selectedDateElem=i,"single"===M.config.mode)M.selectedDates=[n];else if("multiple"===M.config.mode){var a=Z(n);a?M.selectedDates.splice(parseInt(a),1):M.selectedDates.push(n)}else"range"===M.config.mode&&(2===M.selectedDates.length&&M.clear(!1,!1),M.latestSelectedDateObj=n,M.selectedDates.push(n),0!==ve(n,M.selectedDates[0],!0)&&M.selectedDates.sort(function(e,t){return e.getTime()-t.getTime()}));if(f(),r){var s=M.currentYear!==n.getFullYear();M.currentYear=n.getFullYear(),M.currentMonth=n.getMonth(),s&&(q("onYearChange"),A()),q("onMonthChange")}if($(),T(),J(),M.config.enableTime&&setTimeout(function(){return M.showTimeInput=!0},50),r||"range"===M.config.mode||1!==M.config.showMonths?void 0!==M.selectedDateElem&&void 0===M.hourElement&&M.selectedDateElem&&M.selectedDateElem.focus():y(i),void 0!==M.hourElement&&void 0!==M.hourElement&&M.hourElement.focus(),M.config.closeOnSelect){var o="single"===M.config.mode&&!M.config.enableTime,l="range"===M.config.mode&&2===M.selectedDates.length&&!M.config.enableTime;(o||l)&&H()}u()}}M.parseDate=me({config:M.config,l10n:M.l10n}),M._handlers=[],M.pluginElements=[],M.loadedPlugins=[],M._bind=s,M._setHoursFromDate=r,M._positionCalendar=F,M.changeMonth=N,M.changeYear=I,M.clear=function(e,t){void 0===e&&(e=!0);void 0===t&&(t=!0);M.input.value="",void 0!==M.altInput&&(M.altInput.value="");void 0!==M.mobileInput&&(M.mobileInput.value="");M.selectedDates=[],M.latestSelectedDateObj=void 0,!0===t&&(M.currentYear=M._initialDate.getFullYear(),M.currentMonth=M._initialDate.getMonth());M.showTimeInput=!1,!0===M.config.enableTime&&i();M.redraw(),e&&q("onChange")},M.close=function(){M.isOpen=!1,M.isMobile||(void 0!==M.calendarContainer&&M.calendarContainer.classList.remove("open"),void 0!==M._input&&M._input.classList.remove("active"));q("onClose")},M._createElement=ce,M.destroy=function(){void 0!==M.config&&q("onDestroy");for(var e=M._handlers.length;e--;){var t=M._handlers[e];t.element.removeEventListener(t.event,t.handler,t.options)}if(M._handlers=[],M.mobileInput)M.mobileInput.parentNode&&M.mobileInput.parentNode.removeChild(M.mobileInput),M.mobileInput=void 0;else if(M.calendarContainer&&M.calendarContainer.parentNode)if(M.config.static&&M.calendarContainer.parentNode){var i=M.calendarContainer.parentNode;if(i.lastChild&&i.removeChild(i.lastChild),i.parentNode){for(;i.firstChild;)i.parentNode.insertBefore(i.firstChild,i);i.parentNode.removeChild(i)}}else M.calendarContainer.parentNode.removeChild(M.calendarContainer);M.altInput&&(M.input.type="text",M.altInput.parentNode&&M.altInput.parentNode.removeChild(M.altInput),delete M.altInput);M.input&&(M.input.type=M.input._type,M.input.classList.remove("flatpickr-input"),M.input.removeAttribute("readonly"),M.input.value="");["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","
1isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(e){try{delete M[e]}catch(e){}})},M.isEnabled=O,M.jumpToDate=o,M.open=function(e,t){void 0===t&&(t=M._positionElement);if(!0===M.isMobile)return e&&(e.preventDefault(),e.target&&e.target.blur()),void 0!==M.mobileInput&&(M.mobileInput.focus(),M.mobileInput.click()),void q("onOpen");if(M._input.disabled||M.config.inline)return;var i=M.isOpen;M.isOpen=!0,i||(M.calendarContainer.classList.add("open"),M._input.classList.add("active"),q("onOpen"),F(t));!0===M.config.enableTime&&!0===M.config.noCalendar&&(0===M.selectedDates.length&&z(),!1!==M.config.allowInput||void 0!==e&&M.timeContainer.contains(e.relatedTarget)||setTimeout(function(){return M.hourElement.select()},50))},M.redraw=G,M.set=function(e,t){if(null!==e&&"object"==typeof e)for(var i in Object.assign(M.config,e),e)void 0!==Q[i]&&Q[i].forEach(function(e){return e()});else M.config[e]=t,void 0!==Q[e]?Q[e].forEach(function(e){return e()}):-1<ie.indexOf(e)&&(M.config[e]=le(t));M.redraw(),J(!1)},M.setDate=function(e,t,i){void 0===t&&(t=!1);void 0===i&&(i=M.config.dateFormat);if(0!==e&&!e||e instanceof Array&&0===e.length)return M.clear(t);V(e,i),M.showTimeInput=0<M.selectedDates.length,M.latestSelectedDateObj=M.selectedDates[M.selectedDates.length-1],M.redraw(),o(),r(),0===M.selectedDates.length&&M.clear(!1);J(t),t&&q("onChange")},M.toggle=function(e){if(!0===M.isOpen)return M.close();M.open(e)};var Q={locale:[B,D],showMonths:[E,t,S],minDate:[o],maxDate:[o]};function V(e,t){var i=[];if(e instanceof Array)i=e.map(function(e){return M.parseDate(e,t)});else if(e instanceof Date||"number"==typeof e)i=[M.parseDate(e,t)];else if("string"==typeof e)switch(M.config.mode){case"single":case"time":i=[M.parseDate(e,t)];break;case"multiple":i=e.split(M.config.conjunction).map(function(e){return M.parseDate(e,t)});break;case"range":i=e.split(M.l10n.rangeSeparator).map(function(e){return M.parseDate(e,t)})}else M.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(e)));M.selectedDates=i.filter(function(e){return e instanceof Date&&O(e,!1)}),"range"===M.config.mode&&M.selectedDates.sort(function(e,t){return e.getTime()-t.getTime()})}function W(e){return e.slice().map(function(e){return"string"==typeof e||"number"==typeof e||e instanceof Date?M.parseDate(e,void 0,!0):e&&"object"==typeof e&&e.from&&e.to?{from:M.parseDate(e.from,void 0),to:M.parseDate(e.to,void 0)}:e}).filter(function(e){return e})}function q(e,t){if(void 0!==M.config){var i=M.config[e];if(void 0!==i&&0<i.length)for(var n=0;i[n]&&n<i.length;n++)i[n](M.selectedDates,M.input.value,M,t);"onChange"===e&&(M.input.dispatchEvent(X("change")),M.input.dispatchEvent(X("input")))}}function X(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!0),t}function Z(e){for(var t=0;t<M.selectedDates.length;t++)if(0===ve(M.selectedDates[t],e))return""+t;return!1}function $(){M.config.noCalendar||M.isMobile||!M.monthNav||(M.yearElements.forEach(function(e,t){var i=new Date(M.currentYear,M.currentMonth,1);i.setMonth(M.currentMonth+t),1<M.config.showMonths||"static"===M.config.monthSelectorType?M.monthElements[t].textContent=pe(i.getMonth(),M.config.shorthandCurrentMonth,M.l10n)+" ":M.monthsDropdownContainer.value=i.getMonth().toString(),e.value=i.getFullYear().toString()}),M._hidePrevMonthArrow=void 0!==M.config.minDate&&(M.currentYear===M.config.minDate.getFullYear()?M.currentMonth<=M.config.minDate.getMonth():M.currentYear<M.config.minDate.getFullYear()),M._hideNextMonthArrow=void 0!==M.config.maxDate&&(M.currentYear===M.config.maxDate.getFullYear()?M.currentMonth+1>M.config.maxDate.getMonth():M.currentYear>M.config.maxDate.getFullYear()))}function K(t){return M.selectedDates.map(function(e){return M.formatDate(e,t)}).filter(function(e,t,i){return"range"!==M.config.mode||M.config.enableTime||i.indexOf(e)===t}).join("range"!==M.config.mode?M.config.conjunction:M.l10n.rangeSeparator)}function J(e){void 0===e&&(e=!0),void 0!==M.mobileInput&&M.mobileFormatStr&&(M.mobileInput.value=void 0!==M.latestSelectedDateObj?M.formatDate(M.latestSelectedDateObj,M.mobileFormatStr):""),M.input.value=K(M.config.dateFormat),void 0!==M.altInput&&(M.altInput.value=K(M.config.altFormat)),!1!==e&&q("onValueUpdate")}function ee(e){var t=M.prevMonthNav.contains(e.target),i=M.nextMonthNav.contains(e.target);t||i?N(t?-1:1):0<=M.yearElements.indexOf(e.target)?e.target.select():e.target.classList.contains("arrowUp")?M.changeYear(M.currentYear+1):e.target.classList.contains("arrowDown")&&M.changeYear(M.currentYear-1)}return function(){M.element=M.input=c,M.isOpen=!1,function(){var e=["wrap","weekNumbers","allowInput","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],t=te({},h,JSON.parse(JSON.stringify(c.dataset||{}))),i={};M.config.parseDate=t.parseDate,M.config.formatDate=t.formatDate,Object.defineProperty(M.config,"enable",{get:function(){return M.config._enable},set:function(e){M.config._enable=W(e)}}),Object.defineProperty(M.config,"disable",{get:function(){return M.config._disable},set:function(e){M.config._disable=W(e)}});var n="time"===t.mode;if(!t.dateFormat&&(t.enableTime||n)){var r=we.defaultConfig.dateFormat||ne.dateFormat;i.dateFormat=t.noCalendar||n?"H:i"+(t.enableSeconds?":S":""):r+" H:i"+(t.enableSeconds?":S":"")}if(t.altInput&&(t.enableTime||n)&&!t.altFormat){var a=we.defaultConfig.altFormat||ne.altFormat;i.altFormat=t.noCalendar||n?"h:i"+(t.enableSeconds?":S K":" K"):a+(" h:i"+(t.enableSeconds?":S":""))+" K"}t.altInputClass||(M.config.altInputClass=M.input.className+" "+M.config.altInputClass);Object.defineProperty(M.config,"minDate",{get:function(){return M.config._minDate},set:U("min")}),Object.defineProperty(M.config,"maxDate",{get:function(){return M.config._maxDate},set:U("max")});function s(t){return function(e){M.config["min"===t?"_minTime":"_maxTime"]=M.parseDate(e,"H:i:S")}}Object.defineProperty(M.config,"minTime",{get:function(){return M.config._minTime},set:s("min")}),Object.defineProperty(M.config,"maxTime",{get:function(){return M.config._maxTime},set:s("max")}),"time"===t.mode&&(M.config.noCalendar=!0,M.config.enableTime=!0);
vendor: 8,421 bytes, line 1
1Object.assign(M.config,i,t);for(var o=0;o<e.length;o++)M.config[e[o]]=!0===M.config[e[o]]||"true"===M.config[e[o]];ie.filter(function(e){return void 0!==M.config[e]}).forEach(function(e){M.config[e]=le(M.config[e]||[]).map(d)}),M.isMobile=!M.config.disableMobile&&!M.config.inline&&"single"===M.config.mode&&!M.config.disable.length&&!M.config.enable.length&&!M.config.weekNumbers&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);for(o=0;o<M.config.plugins.length;o++){var l=M.config.plugins[o](M)||{};for(var u in l)-1<ie.indexOf(u)?M.config[u]=le(l[u]).map(d).concat(M.config[u]):void 0===t[u]&&(M.config[u]=l[u])}q("onParseConfig")}(),B(),function(){if(M.input=M.config.wrap?c.querySelector("[data-input]"):c,!M.input)return M.config.errorHandler(new Error("Invalid input element specified"));M.input._type=M.input.type,M.input.type="text",M.input.classList.add("flatpickr-input"),M._input=M.input,M.config.altInput&&(M.altInput=ce(M.input.nodeName,M.config.altInputClass),M._input=M.altInput,M.altInput.placeholder=M.input.placeholder,M.altInput.disabled=M.input.disabled,M.altInput.required=M.input.required,M.altInput.tabIndex=M.input.tabIndex,M.altInput.type="text",M.input.setAttribute("type","hidden"),!M.config.static&&M.input.parentNode&&M.input.parentNode.insertBefore(M.altInput,M.input.nextSibling));M.config.allowInput||M._input.setAttribute("readonly","readonly");M._positionElement=M.config.positionElement||M._input}(),function(){M.selectedDates=[],M.now=M.parseDate(M.config.now)||new Date;var e=M.config.defaultDate||("INPUT"!==M.input.nodeName&&"TEXTAREA"!==M.input.nodeName||!M.input.placeholder||M.input.value!==M.input.placeholder?M.input.value:null);e&&V(e,M.config.dateFormat);M._initialDate=0<M.selectedDates.length?M.selectedDates[0]:M.config.minDate&&M.config.minDate.getTime()>M.now.getTime()?M.config.minDate:M.config.maxDate&&M.config.maxDate.getTime()<M.now.getTime()?M.config.maxDate:M.now,M.currentYear=M._initialDate.getFullYear(),M.currentMonth=M._initialDate.getMonth(),0<M.selectedDates.length&&(M.latestSelectedDateObj=M.selectedDates[0]);void 0!==M.config.minTime&&(M.config.minTime=M.parseDate(M.config.minTime,"H:i"));void 0!==M.config.maxTime&&(M.config.maxTime=M.parseDate(M.config.maxTime,"H:i"));M.minDateHasTime=!!M.config.minDate&&(0<M.config.minDate.getHours()||0<M.config.minDate.getMinutes()||0<M.config.minDate.getSeconds()),M.maxDateHasTime=!!M.config.maxDate&&(0<M.config.maxDate.getHours()||0<M.config.maxDate.getMinutes()||0<M.config.maxDate.getSeconds()),Object.defineProperty(M,"showTimeInput",{get:function(){return M._showTimeInput},set:function(e){M._showTimeInput=e,M.calendarContainer&&ue(M.calendarContainer,"showTimeInput",e),M.isOpen&&F()}})}(),M.utils={getDaysInMonth:function(e,t){return void 0===e&&(e=M.currentMonth),void 0===t&&(t=M.currentYear),1===e&&(t%4==0&&t%100!=0||t%400==0)?29:M.l10n.daysInMonth[e]}},M.isMobile||function(){var e=window.document.createDocumentFragment();if(M.calendarContainer=ce("div","flatpickr-calendar"),M.calendarContainer.tabIndex=-1,!M.config.noCalendar){if(e.appendChild((M.monthNav=ce("div","flatpickr-months"),M.yearElements=[],M.monthElements=[],M.prevMonthNav=ce("span","flatpickr-prev-month"),M.prevMonthNav.innerHTML=M.config.prevArrow,M.nextMonthNav=ce("span","flatpickr-next-month"),M.nextMonthNav.innerHTML=M.config.nextArrow,E(),Object.defineProperty(M,"_hidePrevMonthArrow",{get:function(){return M.__hidePrevMonthArrow},set:function(e){M.__hidePrevMonthArrow!==e&&(ue(M.prevMonthNav,"flatpickr-disabled",e),M.__hidePrevMonthArrow=e)}}),Object.defineProperty(M,"_hideNextMonthArrow",{get:function(){return M.__hideNextMonthArrow},set:function(e){M.__hideNextMonthArrow!==e&&(ue(M.nextMonthNav,"flatpickr-disabled",e),M.__hideNextMonthArrow=e)}}),M.currentYearElement=M.yearElements[0],$(),M.monthNav)),M.innerContainer=ce("div","flatpickr-innerContainer"),M.config.weekNumbers){var t=function(){M.calendarContainer.classList.add("hasWeeks");var e=ce("div","flatpickr-weekwrapper");e.appendChild(ce("span","flatpickr-weekday",M.l10n.weekAbbreviation));var t=ce("div","flatpickr-weeks");return e.appendChild(t),{weekWrapper:e,weekNumbers:t}}(),i=t.weekWrapper,n=t.weekNumbers;M.innerContainer.appendChild(i),M.weekNumbers=n,M.weekWrapper=i}M.rContainer=ce("div","flatpickr-rContainer"),M.rContainer.appendChild(S()),M.daysContainer||(M.daysContainer=ce("div","flatpickr-days"),M.daysContainer.tabIndex=-1),T(),M.rContainer.appendChild(M.daysContainer),M.innerContainer.appendChild(M.rContainer),e.appendChild(M.innerContainer)}M.config.enableTime&&e.appendChild(function(){M.calendarContainer.classList.add("hasTime"),M.config.noCalendar&&M.calendarContainer.classList.add("noCalendar");M.timeContainer=ce("div","flatpickr-time"),M.timeContainer.tabIndex=-1;var e=ce("span","flatpickr-time-separator",":"),t=de("flatpickr-hour",{"aria-label":M.l10n.hourAriaLabel});M.hourElement=t.getElementsByTagName("input")[0];var i=de("flatpickr-minute",{"aria-label":M.l10n.minuteAriaLabel});M.minuteElement=i.getElementsByTagName("input")[0],M.hourElement.tabIndex=M.minuteElement.tabIndex=-1,M.hourElement.value=ae(M.latestSelectedDateObj?M.latestSelectedDateObj.getHours():M.config.time_24hr?M.config.defaultHour:function(e){switch(e%24){case 0:case 12:return 12;default:return e%12}}(M.config.defaultHour)),M.minuteElement.value=ae(M.latestSelectedDateObj?M.latestSelectedDateObj.getMinutes():M.config.defaultMinute),M.hourElement.setAttribute("step",M.config.hourIncrement.toString()),M.minuteElement.setAttribute("step",M.config.minuteIncrement.toString()),M.hourElement.setAttribute("min",M.config.time_24hr?"0":"1"),M.hourElement.setAttribute("max",M.config.time_24hr?"23":"12"),M.minuteElement.setAttribute("min","0"),M.minuteElement.setAttribute("max","59"),M.timeContainer.appendChild(t),M.timeContainer.appendChild(e),M.timeContainer.appendChild(i),M.config.time_24hr&&M.timeContainer.classList.add("time24hr");if(M.config.enableSeconds){M.timeContainer.classList.add("hasSeconds");var n=de("flatpickr-second");M.secondElement=n.getElementsByTagName("input")[0],M.secondElement.value=ae(M.latestSelectedDateObj?M.latestSelectedDateObj.getSeconds():M.config.defaultSeconds),M.secondElement.setAttribute("step",M.minuteElement.getAttribute("step")),M.secondElement.setAttribute("min","0"),M.secondElement.setAttribute("max","59"),M.timeContainer.appendChild(ce("span","flatpickr-time-separator",":")),M.timeContainer.appendChild(n)}M.config.time_24hr||(M.amPM=ce("span","flatpickr-am-pm",M.l10n.amPM[se(11<(M.latestSelectedDateObj?M.hourElement.value:M.config.defaultHour))]),M.amPM.title=M.l10n.toggleTitle,M.amPM.tabIndex=-1,M.timeContainer.appendChild(M.amPM));return M.timeContainer}());ue(M.calendarContainer,"rangeMode","range"===M.config.mode),ue(M.calendarContainer,"animate",!0===M.config.animate),ue(M.calendarContainer,"multiMonth",1<M.config.showMonths),M.calendarContainer.appendChild(e);var r=void 0!==M.config.appendTo&&void 0!==M.config.appendTo.nodeType;if((M.config.inline||M.config.static)&&(M.calendarContainer.classList.add(M.config.inline?"inline":"static"),M.config.inline&&(!r&&M.element.parentNode?M.element.parentNode.insertBefore(M.calendarContainer,M._input.nextSibling):void 0!==M.config.appendTo&&M.config.appendTo.appendChild(M.calendarContainer)),M.config.static)){var a=ce("div","flatpickr-wrapper");M.element.parentNode&&M.element.parentNode.insertBefore(a,M.element),a.appendChild(M.element),M.altInput&&a.appendChild(M.altInput),a.appendChild(M.calendarContainer)}M.config.static||M.config.inline||(void 0!==M.config.appendTo?M.config.appendTo:window.document.body).appendChild(M.calendarContainer)}(),function(){M.config.wrap&&["open","close","toggle","clear"].forEach(function(t){Array.prototype.forEach.call(M.element.querySelectorAll("[data-"+t+"]"),function(e){return s(e,"click",M[t])})});if(M.isMobile)return function(){var e=M.config.enableTime?M.config.noCalendar?"time":"datetime-local":"date";M.mobileInput=ce("input",M.input.className+" flatpickr-mobile"),M.mobileInput.step=M.input.getAttribute("step")||"any",M.mobileInput.tabIndex=1,M.mobileInput.type=e,M.mobileInput.disabled=M.input.disabled,M.mobileInput.required=M.input.required,M.mobileInput.placeholder=M.input.placeholder,M.mobileFormatStr="datetime-local"==e?"Y-m-d\\TH:i:S":"date"==e?"Y-m-d":"H:i:S",0<M.selectedDates.length&&(M.mobileInput.defaultValue=
1M.mobileInput.value=M.formatDate(M.selectedDates[0],M.mobileFormatStr));M.config.minDate&&(M.mobileInput.min=M.formatDate(M.config.minDate,"Y-m-d"));M.config.maxDate&&(M.mobileInput.max=M.formatDate(M.config.maxDate,"Y-m-d"));M.input.type="hidden",void 0!==M.altInput&&(M.altInput.type="hidden");try{M.input.parentNode&&M.input.parentNode.insertBefore(M.mobileInput,M.input.nextSibling)}catch(e){}s(M.mobileInput,"change",function(e){M.setDate(e.target.value,!1,M.mobileFormatStr),q("onChange"),q("onClose")})}();var e=oe(R,50);M._debouncedChange=oe(u,Me),M.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&s(M.daysContainer,"mouseover",function(e){"range"===M.config.mode&&P(e.target)});s(window.document.body,"keydown",k),M.config.inline||M.config.static||s(window,"resize",e);void 0!==window.ontouchstart?s(window.document,"touchstart",L):s(window.document,"mousedown",a(L));s(window.document,"focus",L,{capture:!0}),!0===M.config.clickOpens&&(s(M._input,"focus",M.open),s(M._input,"mousedown",a(M.open)));void 0!==M.daysContainer&&(s(M.monthNav,"mousedown",a(ee)),s(M.monthNav,["keyup","increment"],n),s(M.daysContainer,"mousedown",a(Y)));if(void 0!==M.timeContainer&&void 0!==M.minuteElement&&void 0!==M.hourElement){s(M.timeContainer,["increment"],p),s(M.timeContainer,"blur",p,{capture:!0}),s(M.timeContainer,"mousedown",a(g)),s([M.hourElement,M.minuteElement],["focus","click"],function(e){return e.target.select()}),void 0!==M.secondElement&&s(M.secondElement,"focus",function(){return M.secondElement&&M.secondElement.select()}),void 0!==M.amPM&&s(M.amPM,"mousedown",a(function(e){p(e),u()}))}}(),(M.selectedDates.length||M.config.noCalendar)&&(M.config.enableTime&&r(M.config.noCalendar?M.latestSelectedDateObj||M.config.minDate:void 0),J(!1)),t(),M.showTimeInput=0<M.selectedDates.length||M.config.noCalendar;var e=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!M.isMobile&&e&&F(),q("onReady")}(),M}function i(e,t){for(var i=Array.prototype.slice.call(e).filter(function(e){return e instanceof HTMLElement}),n=[],r=0;r<i.length;r++){var a=i[r];try{if(null!==a.getAttribute("data-fp-omit"))continue;void 0!==a._flatpickr&&(a._flatpickr.destroy(),a._flatpickr=void 0),a._flatpickr=s(a,t||{}),n.push(a._flatpickr)}catch(e){console.error(e)}}return 1===n.length?n[0]:n}"undefined"!=typeof HTMLElement&&"undefined"!=typeof HTMLCollection&&"undefined"!=typeof NodeList&&(HTMLCollection.prototype.flatpickr=NodeList.prototype.flatpickr=function(e){return i(this,e)},HTMLElement.prototype.flatpickr=function(e){return i([this],e)});var we=function(e,t){return"string"==typeof e?i(window.document.querySelectorAll(e),t):e instanceof Node?i([e],t):i(e,t)};return we.defaultConfig={},we.l10ns={en:te({},re),default:te({},re)},we.localize=function(e){we.l10ns.default=te({},we.l10ns.default,e)},we.setDefaults=function(e){we.defaultConfig=te({},we.defaultConfig,e)},we.parseDate=me({}),we.formatDate=ge({}),we.compareDates=ve,"undefined"!=typeof jQuery&&void 0!==jQuery.fn&&(jQuery.fn.flatpickr=function(e){return i(this,e)}),Date.prototype.fp_incr=function(e){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+("string"==typeof e?parseInt(e,10):e))},"undefined"!=typeof window&&(window.flatpickr=we),we}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).lt={})}(this,function(e){"use strict";var t="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},i={weekdays:{shorthand:["S","Pr","A","T","K","Pn","Å "],longhand:["Sekmadienis","Pirmadienis","Antradienis","TreÄiadienis","Ketvirtadienis","Penktadienis","Å eÅ¡tadienis"]},months:{shorthand:["Sau","Vas","Kov","Bal","Geg","Bir","Lie","Rgp","Rgs","Spl","Lap","Grd"],longhand:["Sausis","Vasaris","Kovas","Balandis","GegužÄ","Birželis","Liepa","RugpjuÌtis","RugseÌjis","Spalis","Lapkritis","Gruodis"]},firstDayOfWeek:1,ordinal:function(){return"-a"},weekAbbreviation:"Sav",scrollTitle:"Keisti laikÄ
pelÄs rateliu",toggleTitle:"Perjungti laiko formatÄ
",time_24hr:!0};t.l10ns.lt=i;var n=t.l10ns;
vendor: 17,872 bytes, line 1
1e.Lithuanian=i,e.default=n,Object.defineProperty(e,"__esModule",{value:!0})}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).ru={})}(this,function(e){"use strict";var t="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},i={weekdays:{shorthand:["ÐÑ","Ðн","ÐÑ","СÑ","ЧÑ","ÐÑ","Сб"],longhand:["ÐоÑкÑеÑенÑе","ÐонеделÑник","ÐÑоÑник","СÑеда","ЧеÑвеÑг","ÐÑÑниÑа","СÑббоÑа"]},months:{shorthand:["Янв","Фев","ÐаÑÑ","ÐпÑ","Ðай","ÐÑнÑ","ÐÑлÑ","Ðвг","Сен","ÐкÑ","ÐоÑ","Ðек"],longhand:["ЯнваÑÑ","ФевÑалÑ","ÐаÑÑ","ÐпÑелÑ","Ðай","ÐÑнÑ","ÐÑлÑ","ÐвгÑÑÑ","СенÑÑбÑÑ","ÐкÑÑбÑÑ","ÐоÑбÑÑ","ÐекабÑÑ"]},firstDayOfWeek:1,ordinal:function(){return""},rangeSeparator:" â ",weekAbbreviation:"Ðед.",scrollTitle:"ÐÑокÑÑÑиÑе Ð´Ð»Ñ ÑвелиÑениÑ",toggleTitle:"ÐажмиÑе Ð´Ð»Ñ Ð¿ÐµÑеклÑÑениÑ",amPM:["ÐÐ","ÐÐ"],yearAriaLabel:"Ðод",time_24hr:!0};t.l10ns.ru=i;var n=t.l10ns;e.Russian=i,e.default=n,Object.defineProperty(e,"__esModule",{value:!0})}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).window=e.window||{})}(this,function(e){"use strict";function i(e,t){e.prototype=Object.create(t.prototype),(e.prototype.constructor=e).__proto__=t}function A(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function U(e){return"string"==typeof e}function p(e){return"function"==typeof e}function x(e){return"number"==typeof e}function r(e){return void 0===e}function E(e){return"object"==typeof e}function j(e){return!1!==e}function t(){return"undefined"!=typeof window}function S(e){return p(e)||U(e)}function n(e){return(Je=lt(e,Ke))&&si}function B(e,t){return console.warn("Invalid property",e,"set to",t,"Missing plugin? gsap.registerPlugin()")}function D(e,t){return!t&&console.warn(e)}function s(e,t){return e&&(Ke[e]=t)&&Je&&(Je[e]=t)||Ke}function N(){return 0}function k(e){var t,i,n=e[0];if(E(n)||p(n)||(e=[e]),!(t=(n._gsap||{}).harness)){for(i=st.length;i--&&!st[i].targetTest(n););t=st[i]}for(i=e.length;i--;)e[i]&&(e[i]._gsap||(e[i]._gsap=new Ct(e[i],t)))||e.splice(i,1);return e}function P(e){return e._gsap||k(pt(e))[0]._gsap}function a(e,t){var i=e[t];return p(i)?e[t]():r(i)&&e.getAttribute(t)||i}function f(e,t){return(e=e.split(",")).forEach(t)||e}function F(e){return Math.round(1e5*e)/1e5||0}function o(e,t){for(var i=t.length,n=0;e.indexOf(t[n])<0&&++n<i;);return n<i}function l(e,t,i){var n,r=x(e[1]),a=(r?2:1)+(t<2?0:1),s=e[a];if(r&&(s.duration=e[1]),s.parent=i,t){for(n=s;i&&!("immediateRender"in n);)n=i.vars.defaults||{},i=j(i.vars.inherit)&&i.parent;s.immediateRender=j(n.immediateRender),t<2?s.runBackwards=1:s.startAt=e[a-1]}return s}function R(){var e,t,i=tt.length,n=tt.slice(0);for(it={},e=tt.length=0;e<i;e++)(t=n[e])&&t._lazy&&(t.render(t._lazy[0],t._lazy[1],!0)._lazy=0)}function u(e,t,i,n){tt.length&&R(),e.render(t,i,n),tt.length&&R()}function c(e){var t=parseFloat(e);return(t||0===t)&&(e+"").match($e).length<2?t:e}function h(e){return e}function z(e,t){for(var i in t)i in e||(e[i]=t[i]);return e}function d(e,t){for(var i in t)i in e||"duration"===i||"ease"===i||(e[i]=t[i])}function g(e,t){for(var i in t)e[i]=E(t[i])?g(e[i]||(e[i]={}),t[i]):t[i];return e}function G(e,t){var i,n={};for(i in e)i in t||(n[i]=e[i]);return n}function C(e){var t=e.parent||de,i=e.keyframes?d:z;if(j(e.inherit))for(;t;)i(e,t.vars.defaults),t=t.parent;return e}function m(e,t,i,n){void 0===i&&(i="_first"),void 0===n&&(n="_last");var r=t._prev,a=t._next;r?r._next=a:e[i]===t&&(e[i]=a),a?a._prev=r:e[n]===t&&(e[n]=r),t._next=t._prev=t.parent=null}function H(e,t){!e.parent||t&&!e.parent.autoRemoveChildren||e.parent.remove(e),e._act=0}function v(e){for(var t=e;t;)t._dirty=1,t=t.parent;return e}function y(e){return e._repeat?ut(e._tTime,e=e.duration()+e._rDelay)*e:0}function _(e,t){return(e-t._start)*t._ts+(0<=t._ts?0:t._dirty?t.totalDuration():t._tDur)}function T(e){return e._end=F(e._start+(e._tDur/Math.abs(e._ts||e._rts||Re)||0))}function L(e,t){var i;if((t._time||t._initted&&!t._dur)&&(i=_(e.rawTime(),t),(!t._dur||ht(0,t.totalDuration(),i)-t._tTime>Re)&&t.render(i,!0)),v(e)._dp&&e._initted&&e._time>=e._dur&&e._ts){if(e._dur<e.duration())for(i=e;i._dp;)0<=i.rawTime()&&i.totalTime(i._tTime),i=i._dp;e._zTime=-Re}}function M(e,t,i,n){return t.parent&&H(t),t._start=F(i+t._delay),t._end=F(t._start+(t.totalDuration()/Math.abs(t.timeScale())||0)),function(e,t,i,n,r){void 0===i&&(i="_first"),void 0===n&&(n="_last");var a,s=e[n];if(r)for(a=t[r];s&&s[r]>a;)s=s._prev;s?(t._next=s._next,s._next=t):(t._next=e[i],e[i]=t),t._next?t._next._prev=t:e[n]=t,t._prev=s,t.parent=t._dp=e}(e,t,"_first","_last",e._sort?"_start":0),e._recent=t,n||L(e,t),e}function w(e,t,i,n){return Rt(e,t),e._initted?!i&&e._pt&&(e._dur&&!1!==e.vars.lazy||!e._dur&&e.vars.lazy)&&ve!==Mt.frame?(tt.push(e),e._lazy=[t,n]):void 0:1}function b(e,t,i){var n=e._repeat,r=F(t)||0;return e._dur=r,e._tDur=n?n<0?1e12:F(r*(n+1)+e._rDelay*n):r,e._time>r&&(e._time=r,e._tTime=Math.min(e._tTime,e._tDur)),i||v(e.parent),e.parent&&T(e),e}function I(e){return e instanceof Ot?v(e):b(e,e._dur)}function O(e,t){var i,n,r=e.labels,a=e._recent||ct,s=e.duration()>=Pe?a.endTime(!1):e._dur;return U(t)&&(isNaN(t)||t in r)?"<"===(i=t.charAt(0))||">"===i?("<"===i?a._start:a.endTime(0<=a._repeat))+(parseFloat(t.substr(1))||0):(i=t.indexOf("="))<0?(t in r||(r[t]=s),r[t]):(n=+(t.charAt(i-1)+t.substr(i+1)),1<i?O(e,t.substr(0,i-1))+n:s+n):null==t?s:+t}function Y(e,t){return e||0===e?t(e):t}function Q(e){return(e+"").substr((parseFloat(e)+"").length)}function V(e,t){return e&&E(e)&&"length"in e&&(!t&&!e.length||e.length-1 in e&&E(e[0]))&&!e.nodeType&&e!==pe}function W(e){return e.sort(function(){return.5-Math.random()})}function q(e){if(p(e))return e;var f=E(e)?e:{each:e},g=Et(f.ease),m=f.from||0,v=parseFloat(f.base)||0,y={},t=0<m&&m<1,_=isNaN(m)||t,M=f.axis,w=m,b=m;return U(m)?w=b={center:.5,edges:.5,end:1}[m]||0:!t&&_&&(w=m[0],b=m[1]),function(e,t,i){var n,r,a,s,o,l,u,c,h,d=(i||f).length,p=y[d];if(!p){if(!(h="auto"===f.grid?0:(f.grid||[1,Pe])[1])){for(u=-Pe;u<(u=i[h++].getBoundingClientRect().left)&&h<d;);h--}for(p=y[d]=[],n=_?Math.min(h,d)*w-.5:m%h,r=_?d*b/h-.5:m/h|0,c=Pe,l=u=0;l<d;l++)a=l%h-n,s=r-(l/h|0),p[l]=o=M?Math.abs("y"===M?s:a):Fe(a*a+s*s),u<o&&(u=o),o<c&&(c=o);"random"===m&&W(p),p.max=u-c,p.min=c,p.v=d=(parseFloat(f.amount)||parseFloat(f.each)*(d<h?d-1:M?"y"===M?d/h:h:Math.max(h,d/h))||0)*("edges"===m?-1:1),p.b=d<0?v-d:v,p.u=Q(f.amount||f.each)||0,g=g&&d<0?xt(g):g}return d=(p[e]-p.min)/p.max||0,F(p.b+(g?g(d):d)*p.v)+p.u}}function X(t){var i=t<1?Math.pow(10,(t+"").length-2):1;return function(e){return~~(Math.round(parseFloat(e)/t)*t*i)/i+(x(e)?0:Q(e))}}function Z(l,e){var u,c,t=Ye(l);return!t&&E(l)&&(u=t=l.radius||Pe,l.values?(l=pt(l.values),(c=!x(l[0]))&&(u*=u)):l=X(l.increment)),Y(e,t?p(l)?function(e){return c=l(e),Math.abs(c-e)<=u?c:e}:function(e){for(var t,i,n=parseFloat(c?e.x:e),r=parseFloat(c?e.y:0),a=Pe,s=0,o=l.length;o--;)(t=c?(t=l[o].x-n)*t+(i=l[o].y-r)*i:Math.abs(l[o]-n))<a&&(a=t,s=o);return s=!u||a<=u?l[s]:e,c||s===e||x(e)?s:s+Q(e)}:X(l))}function $(e,t,i,n){return Y(Ye(e)?!t:!0===i?!!(i=0):!n,function(){return Ye(e)?e[~~(Math.random()*e.length)]:(i=i||1e-5)&&(n=i<1?Math.pow(10,(i+"").length-2):1)&&~~(Math.round((e+Math.random()*(t-e))/i)*i*n)/n})}function K(t,i,e){return Y(e,function(e){return t[~~i(e)]})}function J(e){for(var t,i,n,r,a=0,s="";~(t=e.indexOf("random(",a));)n=e.indexOf(")",t),r="["===e.charAt(t+7),i=e.substr(t+7,n-t-7).match(r?$e:Qe),s+=e.substr(a,t-a)+$(r?i:+i[0],+i[1],+i[2]||1e-5),a=n+1;return s+e.substr(a,e.length-a)}function ee(e,t,i){var n,r,a,s=e.labels,o=Pe;for(n in s)(r=s[n]-t)<0==!!i&&r&&o>(r=Math.abs(r))&&(a=n,o=r);return a}function te(e){return H(e),e.progress()<1&>(e,"onInterrupt"),e}function ie(e,t,i){return(6*(e=e<0?e+1:1<e?e-1:e)<1?t+(i-t)*e*6:e<.5?i:3*e<2?t+(i-t)*(2/3-e)*6:t)*mt+.5|0}function ne(e,t,i){var n,r,a,s,o,l,u,c,h,d,p=e?x(e)?[e>>16,e>>8&mt,e&mt]:0:vt.black;if(!p){if(","===e.substr(-1)&&(e=e.substr(0,e.length-1)),vt[e])p=vt[e];else if("#"===e.charAt(0))4===e.length&&(e="#"+(n=e.charAt(1))+n+(r=e.charAt(2))+r+(a=e.charAt(3))+a),p=[(e=parseInt(e.substr(1),16))>>16,e>>8&mt,e&mt];else if("hsl"===e.substr(0,3))if(p=d=e.match(Qe),t){if(~e.indexOf("="))return p=e.match(Ve),i&&p.length<4&&(p[3]=1),p}else s=+p[0]%360/360,o=p[1]/100,n=2*(l=p[2]/100)-(r=l<=.5?l*(o+1):l+o-l*o),3<p.length&&(p[3]*=1),p[0]=ie(s+1/3,n,r),p[1]=ie(s,n,r),p[2]=ie(s-1/3,n,r);else p=e.match(Qe)||vt.transparent;p=p.map(Number)}return t&&!d&&(n=p[0]/mt,r=p[1]/mt,a=p[2]/mt,l=((u=Math.max(n,r,a))+(c=Math.min(n,r,a)))/2,u===c?s=o=0:(h=u-c,o=.5<l?h/(2-u-c):h/(u+c),s=u===n?(r-a)/h+(r<a?6:0):u===r?(a-n)/h+2:(n-r)/h+4,s*=60),p[0]=~~(s+.5),p[1]=~~(100*o+.5),p[2]=~~(100*l+.5)),i&&p.length<4&&(p[3]=1),p}function re(e){var i=[],n=[],r=-1;return e.split(yt).forEach(function(e){var t=e.match(We)||[];i.push.apply(i,t),n.push(r+=t.length+1)}),i.c=n,i}function ae(e,t,i){var n,r,a,s,o="",l=(e+o).match(yt),u=t?"hsla(":"rgba(",c=0;if(!l)return e;if(l=l.map(function(e){return(e=ne(e,t,1))&&u+(t?e[0]+","+e[1]+"%,"+e[2]+"%,"+e[3]:e.join(","))+")"}),i&&(a=re(e),(n=i.c).join(o)!==a.c.join(o)))for(s=(r=e.replace(yt,"1").split(We)).length-1;c<s;c++)o+=r[c]+(~n.indexOf(c)?l.shift()||u+"0,0,0,0)":(a.length?a:l.length?l:i).shift());if(!r)for(s=(r=e.split(yt)).length-1;c<s;c++)o+=r[c]+l[c];return o+r[s]}function se(e){var t,i=e.join(" ");if(yt.lastIndex=0,yt.test(i))return t=_t.test(i),e[1]=ae(e[1],t),e[0]=ae(e[0],t,re(e[1])),!0}function oe(e){var t=(e+"").split("("),i=bt[t[0]];return i&&1<t.length&&i.config?i.config.apply(null,~e.indexOf("{")?[function(e){for(var t,i,n,r={},a=e.substr(1,e.length-3).split(":"),s=a[0],o=1,l=a.length;o<l;o++)i=a[o],t=o!==l-1?i.lastIndexOf(","):i.length,n=i.substr(0,t),r[s]=isNaN(n)?n.replace(At,"").trim():+n,s=i.substr(t+1).trim();return r}(t[1])]:Xe.exec(e)[1].split(",").map(c)):bt._CE&&Tt.test(e)?bt._CE("",e):i}function le(e,t,i,n){void 0===i&&(i=function(e){return 1-t(1-e)}),void 0===n&&(n=function(e){return e<.5?t(2*e)/2:1-t(2*(1-e))/2});var r,a={easeIn:t,easeOut:i,easeInOut:n};return f(e,function(e){for(var t in bt[e]=Ke[e]=a,bt[r=e.toLowerCase()]=i,a)bt[r+("easeIn"===t?".in":"easeOut"===t?".out":".inOut")]=bt[e+"."+t]=a[t]}),1}function ue(t){return function(e){return e<.5?(1-t(1-2*e))/2:.5+t(2*(e-.5))/2}}function ce(i,e,t){function n(e){return 1===e?1:r*Math.pow(2,-10*e)*He((e-s)*a)+1}var r=1<=e?e:1,a=(t||(i?.3:.45))/(e<1?e:1),s=a/ze*(Math.asin(1/r)||0),o="out"===i?n:"in"===i?function(e){return 1-n(1-e)}:ue(n);return a=ze/a,o.config=function(e,t){return ce(i,e,t)},o}function he(t,i){function n(e){return e?--e*e*((i+1)*e+i)+1:0}void 0===i&&(i=1.70158);var e="out"===t?n:"in"===t?function(e){return 1-n(1-e)}:ue(n);return e.config=function(e){return he(t,e)},e}var de,pe,fe,ge,me,ve,ye,_e,Me,we,be,Te,Ae,xe,Ee,Se,De,Ne,Ce,Le,Ie,Oe,je={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},ke={duration:.5,overwrite:!1,delay:0},Pe=1e8,Re=1e-8,ze=2*Math.PI,Ue=ze/4,Be=0,Fe=Math.sqrt,Ge=Math.cos,He=Math.sin,Ye=Array.isArray,Qe=/(?:-?\.?\d|\.)+/gi,Ve=/[-+=.]*\d+[.e\-+]*\d*[e\-\+]*\d*/g,We=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,qe=/[-+=.]*\d+(?:\.|e-|e)*\d*/gi,Xe=/\(([^()]+)\)/i,Ze=/[+-]=-?[\.\d]+/,$e=/[#\-+.]*\b[a-z\d-=+%.]+/gi,Ke={},Je={},et={},tt=[],it={},nt={},rt={},at=30,st=[],ot="",lt=function(e,t){for(var i in t)e[i]=t[i];return e},ut=function(e,t){return(e/=t)&&~~e===e?~~e-1:~~e},ct={_start:0,endTime:N},ht=function(e,t,i){return i<e?e:t<i?t:i},dt=[].slice,pt=function(e,t){return!U(e)||t||!fe&&wt()?Ye(e)?(i=t,void 0===n&&(n=[]),e.forEach(function(e){return U(e)&&!i||V(e,1)?n.push.apply(n,pt(e)):n.push(e)})||n):V(e)?dt.call(e,0):e?[e]:[]:dt.call(ge.querySelectorAll(e),0);var i,n},ft=function(t,e,i,n,r){var a=e-t,s=n-i;return Y(r,function(e){return i+(e-t)/a*s})},gt=function(e,t,i){var n,r,a=e.vars,s=a[t];if(s)return n=a[t+"Params"],r=a.callbackScope||e,i&&tt.length&&R(),n?s.apply(r,n):s.call(r)},mt=255,vt={aqua:[0,mt,mt],lime:[0,mt,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,mt],navy:[0,0,128],white:[mt,mt,mt],olive:[128,128,0],yellow:[mt,mt,0],orange:[mt,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[mt,0,0],pink:[mt,192,203],cyan:[0,mt,mt],transparent:[mt,mt,mt,0]},yt=function(){var e,t="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3}){1,2}\\b";for(e in vt)t+="|"+e+"\\b";return new RegExp(t+")","gi")}(),_t=/hsl[a]?\(/,Mt=(Ae=Date.now,xe=500,Ee=33,Se=Ae(),De=Se,Ce=Ne=1/240,Te={time:0,frame:0,tick:function(){St(!0)},wake:function(){me&&(!fe&&t()&&(pe=fe=window,ge=pe.document||{},Ke.gsap=si,(pe.gsapVersions||(pe.gsapVersions=[])).push(si.version),n(Je||pe.GreenSockGlobals||!pe.gsap&&pe||{}),be=pe.requestAnimationFrame),Me&&Te.sleep(),we=be||function(e){return setTimeout(e,1e3*(Ce-Te.time)+1|0)},_e=1,St(2))},sleep:function(){(be?pe.cancelAnimationFrame:clearTimeout)(Me),_e=0,we=N},lagSmoothing:function(e,t){xe=e||1e8,Ee=Math.min(t,xe,0)},fps:function(e){Ne=1/(e||240),Ce=Te.time+Ne},add:function(e){Le.indexOf(e)<0&&Le.push(e),wt()},remove:function(e){var t;~(t=Le.indexOf(e))&&Le.splice(t,1)},_listeners:Le=[]}),wt=function(){return!_e&&Mt.wake()},bt={},Tt=/^[\d.\-M][\d.\-,\s]/,At=/["']/g,xt=function(t){return function(e){return 1-t(1-e)}},Et=function(e,t){return e&&(p(e)?e:bt[e]||oe(e))||t};function St(t){var e,i,n=Ae()-De,r=!0===t;xe<n&&(Se+=n-Ee),De+=n,Te.time=(De-Se)/1e3,(0<(e=Te.time-Ce)||r)&&(Te.frame++,Ce+=e+(Ne<=e?.004:Ne-e),i=1),r||(Me=we(St)),i&&Le.forEach(function(e){return e(Te.time,n,Te.frame,t)})}function Dt(e){return e<Oe?Ie*e*e:e<.7272727272727273?Ie*Math.pow(e-1.5/2.75,2)+.75:e<.9090909090909092?Ie*(e-=2.25/2.75)*e+.9375:Ie*Math.pow(e-2.625/2.75,2)+.984375}f("Linear,Quad,Cubic,Quart,Quint,Strong",function(e,t){var i=t<5?t+1:t;le(e+",Power"+(i-1),t?function(e){return Math.pow(e,i)}:function(e){return e},function(e){return 1-Math.pow(1-e,i)},function(e){return e<.5?Math.pow(2*e,i)/2:1-Math.pow(2*(1-e),i)/2})}),bt.Linear.easeNone=bt.none=bt.Linear.easeIn,le("Elastic",ce("in"),ce("out"),ce()),Ie=7.5625,Oe=1/2.75,le("Bounce",function(e){return 1-Dt(1-e)},Dt),le("Expo",function(e){return e?Math.pow(2,10*(e-1)):0}),le("Circ",function(e){return-(Fe(1-e*e)-1)}),le("Sine",function(e){return 1-Ge(e*Ue)}),le("Back",he("in"),he("out"),he()),bt.SteppedEase=bt.steps=Ke.SteppedEase={config:function(e,t){void 0===e&&(e=1);var i=1/e,n=e+(t?0:1),r=t?1:0;return function(e){return((n*ht(0,.99999999,e)|0)+r)*i}}},ke.ease=bt["quad.out"],f("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",function(e){return ot+=e+","+e+"Params,"});var Nt,Ct=function(e,t){this.id=Be++,(e._gsap=this).target=e,this.harness=t,this.get=t?t.get:a,this.set=t?t.getSetter:Wt},Lt=((Nt=It.prototype).delay=function(e){return e||0===e?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+e-this._delay),this._delay=e,this):this._delay},Nt.duration=function(e){return arguments.length?this.totalDuration(0<this._repeat?e+(e+this._rDelay)*this._repeat:e):this.totalDuration()&&this._dur},Nt.totalDuration=function(e){return arguments.length?(this._dirty=0,b(this,this._repeat<0?e:(e-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},Nt.totalTime=function(e,t){if(wt(),!arguments.length)return this._tTime;var i=this.parent||this._dp;if(i&&i.smoothChildTiming&&this._ts){for(this._start=F(i._time-(0<this._ts?e/this._ts:((this._dirty?this.totalDuration():this._tDur)-e)/-this._ts)),T(this),i._dirty||v(i);i.parent;)i.parent._time!==i._start+(0<=i._ts?i._tTime/i._ts:(i.totalDuration()-i._tTime)/-i._ts)&&i.totalTime(i._tTime,!0),i=i.parent;!this.parent&&this._dp.autoRemoveChildren&&M(this._dp,this,this._start-this._delay)}return(this._tTime!==e||!this._dur&&!t||this._initted&&Math.abs(this._zTime)===Re)&&(this._ts||(this._pTime=e),u(this,e,t)),this},Nt.time=function(e,t){return arguments.length?this.totalTime(Math.min(this.totalDuration(),e+y(this))%this._dur||(e?this._dur:0),t):this._time},Nt.totalProgress=function(e,t){return arguments.length?this.totalTime(this.totalDuration()*e,t):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.ratio},Nt.progress=function(e,t){return arguments.length?this.totalTime(this.duration()*(!this._yoyo||1&this.iteration()?e:1-e)+y(this),t):this.duration()?Math.min(1,this._time/this._dur):this.ratio},Nt.iteration=function(e,t){var i=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(e-1)*i,t):this._repeat?ut(this._tTime,i)+1:1},Nt.timeScale=function(e){if(!arguments.length)return this._rts===-Re?0:this._rts;if(this._rts===e)return this;var t=this.parent&&this._ts?_(this.parent._time,this):this._tTime;return this._rts=+e||0,this._ts=this._ps||e===-Re?0:this._rts,function(e){for(var t=e.parent;t&&t.parent;)t._dirty=1,t.totalDuration(),t=t.parent;return e}(this.totalTime(ht(0,this._tDur,t),!0))},Nt.paused=function(e){return arguments.length?(this._ps!==e&&((this._ps=e)?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(wt(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,1===this.progress()&&(this._tTime-=Re)&&Math.abs(this._zTime)!==Re))),this):this._ps},Nt.startTime=function(e){if(arguments.length){this._start=e;var t=this.parent||this._dp;return!t||!t._sort&&this.parent||M(t,this,e-this._delay),this}return this._start},Nt.endTime=function(e){return this._start+(j(e)?this.totalDuration():this.duration())/Math.abs(this._ts
vendor: 4,168 bytes, line 1
1)},Nt.rawTime=function(e){var t=this.parent||this._dp;return t?e&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?_(t.rawTime(e),this):this._tTime:this._tTime},Nt.repeat=function(e){return arguments.length?(this._repeat=e,I(this)):this._repeat},Nt.repeatDelay=function(e){return arguments.length?(this._rDelay=e,I(this)):this._rDelay},Nt.yoyo=function(e){return arguments.length?(this._yoyo=e,this):this._yoyo},Nt.seek=function(e,t){return this.totalTime(O(this,e),j(t))},Nt.restart=function(e,t){return this.play().totalTime(e?-this._delay:0,j(t))},Nt.play=function(e,t){return null!=e&&this.seek(e,t),this.reversed(!1).paused(!1)},Nt.reverse=function(e,t){return null!=e&&this.seek(e||this.totalDuration(),t),this.reversed(!0).paused(!1)},Nt.pause=function(e,t){return null!=e&&this.seek(e,t),this.paused(!0)},Nt.resume=function(){return this.paused(!1)},Nt.reversed=function(e){return arguments.length?(!!e!==this.reversed()&&this.timeScale(-this._rts||(e?-Re:0)),this):this._rts<0},Nt.invalidate=function(){return this._initted=0,this._zTime=-Re,this},Nt.isActive=function(e){var t,i=this.parent||this._dp,n=this._start;return!(i&&!(this._ts&&(this._initted||!e)&&i.isActive(e)&&(t=i.rawTime(!0))>=n&&t<this.endTime(!0)-Re))},Nt.eventCallback=function(e,t,i){var n=this.vars;return 1<arguments.length?(t?(n[e]=t,i&&(n[e+"Params"]=i),"onUpdate"===e&&(this._onUpdate=t)):delete n[e],this):n[e]},Nt.then=function(n){var r=this;return new Promise(function(t){function e(){var e=r.then;r.then=null,p(i)&&(i=i(r))&&(i.then||i===r)&&(r.then=e),t(i),r.then=e}var i=p(n)?n:h;r._initted&&1===r.totalProgress()&&0<=r._ts||!r._tTime&&r._ts<0?e():r._prom=e})},Nt.kill=function(){te(this)},It);function It(e,t){var i=e.parent||de;this.vars=e,this._delay=+e.delay||0,(this._repeat=e.repeat||0)&&(this._rDelay=e.repeatDelay||0,this._yoyo=!!e.yoyo||!!e.yoyoEase),this._ts=1,b(this,+e.duration,1),this.data=e.data,_e||Mt.wake(),i&&M(i,this,t||0===t?t:i._time,1),e.reversed&&this.reverse(),e.paused&&this.paused(!0)}z(Lt.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-Re,_prom:0,_ps:!1,_rts:1});var Ot=function(n){function e(e,t){var i;return void 0===e&&(e={}),(i=n.call(this,e,t)||this).labels={},i.smoothChildTiming=!!e.smoothChildTiming,i.autoRemoveChildren=!!e.autoRemoveChildren,i._sort=j(e.sortChildren),i.parent&&L(i.parent,A(i)),i}i(e,n);var t=e.prototype;return t.to=function(e,t,i,n){return new Ft(e,l(arguments,0,this),O(this,x(t)?n:i)),this},t.from=function(e,t,i,n){return new Ft(e,l(arguments,1,this),O(this,x(t)?n:i)),this},t.fromTo=function(e,t,i,n,r){return new Ft(e,l(arguments,2,this),O(this,x(t)?r:n)),this},t.set=function(e,t,i){return t.duration=0,t.parent=this,C(t).repeatDelay||(t.repeat=0),t.immediateRender=!!t.immediateRender,new Ft(e,t,O(this,i),1),this},t.call=function(e,t,i){return M(this,Ft.delayedCall(0,e,t),O(this,i))},t.staggerTo=function(e,t,i,n,r,a,s){return i.duration=t,i.stagger=i.stagger||n,i.onComplete=a,i.onCompleteParams=s,i.parent=this,new Ft(e,i,O(this,r)),this},t.staggerFrom=function(e,t,i,n,r,a,s){return i.runBackwards=1,C(i).immediateRender=j(i.immediateRender),this.staggerTo(e,t,i,n,r,a,s)},t.staggerFromTo=function(e,t,i,n,r,a,s,o){return n.startAt=i,C(n).immediateRender=j(n.immediateRender),this.staggerTo(e,t,n,r,a,s,o)},t.render=function(e,t,i){var n,r,a,s,o,l,u,c,h,d,p,f,g=this._time,m=this._dirty?this.totalDuration():this._tDur,v=this._dur,y=this!==de&&m-Re<e&&0<=e?m:e<Re?0:e,_=this._zTime<0!=e<0&&(this._initted||!v);if(y!==this._tTime||i||_){if(g!==this._time&&v&&(y+=this._time-g,e+=this._time-g),n=y,h=this._start,l=!(c=this._ts),_&&(v||(g=this._zTime),!e&&t||(this._zTime=e)),this._repeat&&(p=this._yoyo,o=v+this._rDelay,(v<(n=F(y%o))||m===y)&&(n=v),(s=~~(y/o))&&s===y/o&&(n=v,s--),p&&1&s&&(n=v-n,f=1),s!==(d=ut(this._tTime,o))&&!this._lock)){var M=p&&1&d,w=M===(p&&1&s);if(s<d&&(M=!M),g=M?0:v,this._lock=1,this.render(g,t,!v)._lock=0,!t&&this.parent&>(this,"onRepeat"),this.vars.repeatRefresh&&!f&&(this.invalidate()._lock=1),g!==this._time||l!=!this._ts
vendor: 7,889 bytes, line 1
1)return this;if(w&&(this._lock=2,g=M?v+1e-4:-1e-4,this.render(g,!0),this.vars.repeatRefresh&&!f&&this.invalidate()),this._lock=0,!this._ts&&!l)return this}if(this._hasPause&&!this._forcing&&this._lock<2&&(u=function(e,t,i){var n;if(t<i)for(n=e._first;n&&n._start<=i;){if(!n._dur&&"isPause"===n.data&&n._start>t)return n;n=n._next}else for(n=e._last;n&&n._start>=i;){if(!n._dur&&"isPause"===n.data&&n._start<t)return n;n=n._prev}}(this,F(g),F(n)))&&(y-=n-(n=u._start)),this._tTime=y,this._time=n,this._act=!c,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=e),g||!n||t||gt(this,"onStart"),g<=n&&0<=e)for(r=this._first;r;){if(a=r._next,(r._act||n>=r._start)&&r._ts&&u!==r){if(r.parent!==this)return this.render(e,t,i);if(r.render(0<r._ts?(n-r._start)*r._ts:(r._dirty?r.totalDuration():r._tDur)+(n-r._start)*r._ts,t,i),n!==this._time||!this._ts&&!l){u=0,a&&(y+=this._zTime=-Re);break}}r=a}else{r=this._last;for(var b=e<0?e:n;r;){if(a=r._prev,(r._act||b<=r._end)&&r._ts&&u!==r){if(r.parent!==this)return this.render(e,t,i);if(r.render(0<r._ts?(b-r._start)*r._ts:(r._dirty?r.totalDuration():r._tDur)+(b-r._start)*r._ts,t,i),n!==this._time||!this._ts&&!l){u=0,a&&(y+=this._zTime=b?-Re:Re);break}}r=a}}if(u&&!t&&(this.pause(),u.render(g<=n?0:-Re)._zTime=g<=n?1:-1,this._ts))return this._start=h,T(this),this.render(e,t,i);this._onUpdate&&!t&>(this,"onUpdate",!0),(y===m&&m>=this.totalDuration()||!y&&this._ts<0)&&(h!==this._start&&Math.abs(c)===Math.abs(this._ts)||this._lock||(!e&&v||!(e&&0<this._ts||!y&&this._ts<0)||H(this,1),t||e<0&&!g||(gt(this,y===m?"onComplete":"onReverseComplete",!0),this._prom&&this._prom())))}return this},t.add=function(e,t){var i=this;if(x(t)||(t=O(this,t)),!(e instanceof Lt)){if(Ye(e))return e.forEach(function(e){return i.add(e,t)}),v(this);if(U(e))return this.addLabel(e,t);if(!p(e))return this;e=Ft.delayedCall(0,e)}return this!==e?M(this,e,t):this},t.getChildren=function(e,t,i,n){void 0===e&&(e=!0),void 0===t&&(t=!0),void 0===i&&(i=!0),void 0===n&&(n=-Pe);for(var r=[],a=this._first;a;)a._start>=n&&(a instanceof Ft?t&&r.push(a):(i&&r.push(a),e&&r.push.apply(r,a.getChildren(!0,t,i)))),a=a._next;return r},t.getById=function(e){for(var t=this.getChildren(1,1,1),i=t.length;i--;)if(t[i].vars.id===e)return t[i]},t.remove=function(e){return U(e)?this.removeLabel(e):p(e)?this.killTweensOf(e):(m(this,e),e===this._recent&&(this._recent=this._last),v(this))},t.totalTime=function(e,t){return arguments.length?(this._forcing=1,this.parent||this._dp||!this._ts||(this._start=F(Mt.time-(0<this._ts?e/this._ts:(this.totalDuration()-e)/-this._ts))),n.prototype.totalTime.call(this,e,t),this._forcing=0,this):this._tTime},t.addLabel=function(e,t){return this.labels[e]=O(this,t),this},t.removeLabel=function(e){return delete this.labels[e],this},t.addPause=function(e,t,i){var n=Ft.delayedCall(0,t||N,i);return n.data="isPause",this._hasPause=1,M(this,n,O(this,e))},t.removePause=function(e){var t=this._first;for(e=O(this,e);t;)t._start===e&&"isPause"===t.data&&H(t),t=t._next},t.killTweensOf=function(e,t,i){for(var n=this.getTweensOf(e,i),r=n.length;r--;)kt!==n[r]&&n[r].kill(e,t);return this},t.getTweensOf=function(e,t){for(var i,n=[],r=pt(e),a=this._first;a;)a instanceof Ft?!o(a._targets,r)||t&&!a.isActive("started"===t)||n.push(a):(i=a.getTweensOf(r,t)).length&&n.push.apply(n,i),a=a._next;return n},t.tweenTo=function(e,t){t=t||{};var i=this,n=O(i,e),r=t.startAt,a=t.onStart,s=t.onStartParams,o=Ft.to(i,z(t,{ease:"none",lazy:!1,time:n,duration:t.duration||Math.abs((n-(r&&"time"in r?r.time:i._time))/i.timeScale())||Re,onStart:function(){i.pause();var e=t.duration||Math.abs((n-i._time)/i.timeScale());o._dur!==e&&b(o,e).render(o._time,!0,!0),a&&a.apply(o,s||[])}}));return o},t.tweenFromTo=function(e,t,i){return this.tweenTo(t,z({startAt:{time:O(this,e)}},i))},t.recent=function(){return this._recent},t.nextLabel=function(e){return void 0===e&&(e=this._time),ee(this,O(this,e))},t.previousLabel=function(e){return void 0===e&&(e=this._time),ee(this,O(this,e),1)},t.currentLabel=function(e){return arguments.length?this.seek(e,!0):this.previousLabel(this._time+Re)},t.shiftChildren=function(e,t,i){void 0===i&&(i=0);for(var n,r=this._first,a=this.labels;r;)r._start>=i&&(r._start+=e),r=r._next;if(t)for(n in a)a[n]>=i&&(a[n]+=e);return v(this)},t.invalidate=function(){var e=this._first;for(this._lock=0;e;)e.invalidate(),e=e._next;return n.prototype.invalidate.call(this)},t.clear=function(e){void 0===e&&(e=!0);for(var t,i=this._first;i;)t=i._next,this.remove(i),i=t;return this._time=this._tTime=0,e&&(this.labels={}),v(this)},t.totalDuration=function(e){var t,i,n,r,a=0,s=this,o=s._last,l=Pe;if(arguments.length)return s.timeScale((s._repeat<0?s.duration():s.totalDuration())/(s.reversed()?-e:e));if(s._dirty){for(r=s.parent;o;)t=o._prev,o._dirty&&o.totalDuration(),l<(n=o._start)&&s._sort&&o._ts&&!s._lock?(s._lock=1,M(s,o,n-o._delay,1)._lock=0):l=n,n<0&&o._ts&&(a-=n,(!r&&!s._dp||r&&r.smoothChildTiming)&&(s._start+=n/s._ts,s._time-=n,s._tTime-=n),s.shiftChildren(-n,!1,-1e20),l=0),a<(i=T(o))&&o._ts&&(a=i),o=t;b(s,s===de&&s._time>a?s._time:Math.min(Pe,a),1),s._dirty=0}return s._tDur},e.updateRoot=function(e){if(de._ts&&(u(de,_(e,de)),ve=Mt.frame),Mt.frame>=at){at+=je.autoSleep||120;var t=de._first;if((!t||!t._ts)&&je.autoSleep&&Mt._listeners.length<2){for(;t&&!t._ts;)t=t._next;t||Mt.sleep()}}},e}(Lt);z(Ot.prototype,{_lock:0,_hasPause:0,_forcing:0});function jt(e,t,i,n,r,a){var s,o,l,u;if(nt[e]&&!1!==(s=new nt[e]).init(r,s.rawVars?t[e]:function(e,t,i,n,r){if(p(e)&&(e=zt(e,r,t,i,n)),!E(e)||e.style&&e.nodeType||Ye(e))return U(e)?zt(e,r,t,i,n):e;var a,s={};for(a in e)s[a]=zt(e[a],r,t,i,n);return s}(t[e],n,r,a,i),i,n,a)&&(i._pt=o=new ti(i._pt,r,e,0,1,s.render,s,0,s.priority),i!==ye))for(l=i._ptLookup[i._targets.indexOf(r)],u=s._props.length;u--;)l[s._props[u]]=o;return s}var kt,Pt=function(e,t,i,n,r,a,s,o,l){p(n)&&(n=n(r||0,e,a));var u,c=e[t],h="get"!==i?i:p(c)?l?e[t.indexOf("set")||!p(e["get"+t.substr(3)])?t:"get"+t.substr(3)](l):e[t]():c,d=p(c)?l?Vt:Qt:Yt;if(U(n)&&(~n.indexOf("random(")&&(n=J(n)),"="===n.charAt(1)&&(n=parseFloat(h)+parseFloat(n.substr(2))*("-"===n.charAt(0)?-1:1)+(Q(h)||0))),h!==n)return isNaN(h+n)?(c||t in e||B(t,n),function(e,t,i,n,r,a,s){var o,l,u,c,h,d,p,f,g=new ti(this._pt,e,t,0,1,Zt,null,r),m=0,v=0;for(g.b=i,g.e=n,i+="",(p=~(n+="").indexOf("random("))&&(n=J(n)),a&&(a(f=[i,n],e,t),i=f[0],n=f[1]),l=i.match(qe)||[];o=qe.exec(n);)c=o[0],h=n.substring(m,o.index),u?u=(u+1)%5:"rgba("===h.substr(-5)&&(u=1),c!==l[v++]&&(d=parseFloat(l[v-1])||0,g._pt={_next:g._pt,p:h||1===v?h:",",s:d,c:"="===c.charAt(1)?parseFloat(c.substr(2))*("-"===c.charAt(0)?-1:1):parseFloat(c)-d,m:u&&u<4?Math.round:0},m=qe.lastIndex);return g.c=m<n.length?n.substring(m,n.length):"",g.fp=s,(Ze.test(n)||p)&&(g.e=0),this._pt=g}.call(this,e,t,h,n,d,o||je.stringFilter,l)):(u=new ti(this._pt,e,t,+h||0,n-(h||0),"boolean"==typeof c?Xt:qt,0,d),l&&(u.fp=l),s&&u.modifier(s,this,e),this._pt=u)},Rt=function e(t,i){var n,r,a,s,o,l,u,c,h,d,p,f,g=t.vars,m=g.ease,v=g.startAt,y=g.immediateRender,_=g.lazy,M=g.onUpdate,w=g.onUpdateParams,b=g.callbackScope,T=g.runBackwards,A=g.yoyoEase,x=g.keyframes,E=g.autoRevert,S=t._dur,D=t._startAt,N=t._targets,C=t.parent,L=C&&"nested"===C.data?C.parent._targets:N,I="auto"===t._overwrite,O=t.timeline;if(!O||x&&m||(m="none"),t._ease=Et(m,ke.ease),t._yEase=A?xt(Et(!0===A?m:A,ke.ease)):0,A&&t._yoyo&&!t._repeat&&(A=t._yEase,t._yEase=t._ease,t._ease=A),!O){if(D&&D.render(-1,!0).kill(),v){if(H(t._startAt=Ft.set(N,z({data:"isStart",overwrite:!1,parent:C,immediateRender:!0,lazy:j(_),startAt:null,delay:0,onUpdate:M,onUpdateParams:w,callbackScope:b,stagger:0},v))),y)if(0<i)E||(t._startAt=0);else if(S)return}else if(T&&S)if(D)E||(t._startAt=0);else if(i&&(y=!1),H(t._startAt=Ft.set(N,lt(G(g,et),{overwrite:!1,data:"isFromStart",lazy:y&&j(_),immediateRender:y,stagger:0,parent:C}
1))),y){if(!i)return}else e(t._startAt,Re);for(n=G(g,et),f=(c=N[t._pt=0]?P(N[0]).harness:0)&&g[c.prop],_=S&&j(_)||_&&!S,r=0;r<N.length;r++){if(u=(o=N[r])._gsap||k(N)[r]._gsap,t._ptLookup[r]=d={},it[u.id]&&R(),p=L===N?r:L.indexOf(o),c&&!1!==(h=new c).init(o,f||n,t,p,L)&&(t._pt=s=new ti(t._pt,o,h.name,0,1,h.render,h,0,h.priority),h._props.forEach(function(e){d[e]=s}),h.priority&&(l=1)),!c||f)for(a in n)nt[a]&&(h=jt(a,n,t,p,o,L))?h.priority&&(l=1):d[a]=s=Pt.call(t,o,a,"get",n[a],p,L,0,g.stringFilter);t._op&&t._op[r]&&t.kill(o,t._op[r]),I&&t._pt&&(kt=t,de.killTweensOf(o,d,"started"),kt=0),t._pt&&_&&(it[u.id]=1)}l&&ei(t),t._onInit&&t._onInit(t)}t._from=!O&&!!g.runBackwards,t._onUpdate=M,t._initted=1},zt=function(e,t,i,n,r){return p(e)?e.call(t,i,n,r):U(e)&&~e.indexOf("random(")?J(e):e},Ut=ot+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase",Bt=(Ut+",id,stagger,delay,duration,paused").split(","),Ft=function(T){function r(e,t,i,n){var r;"number"==typeof t&&(i.duration=t,t=i,i=null);var a,s,o,l,u,c,h,d,p=(r=T.call(this,n?t:C(t),i)||this).vars,f=p.duration,g=p.delay,m=p.immediateRender,v=p.stagger,y=p.overwrite,_=p.keyframes,M=p.defaults,w=r.parent,b=(Ye(e)?x(e[0]):"length"in t)?[e]:pt(e);if(r._targets=b.length?k(b):D("GSAP target "+e+" not found. https://greensock.com",!je.nullTargetWarn)||[],r._ptLookup=[],r._overwrite=y,_||v||S(f)||S(g)){if(t=r.vars,(a=r.timeline=new Ot({data:"nested",defaults:M||{}})).kill(),a.parent=A(r),_)z(a.vars.defaults,{ease:"none"}),_.forEach(function(e){return a.to(b,e,">")});else{if(l=b.length,h=v?q(v):N,E(v))for(u in v)~Ut.indexOf(u)&&((d=d||{})[u]=v[u]);for(s=0;s<l;s++){for(u in o={},t)Bt.indexOf(u)<0&&(o[u]=t[u]);o.stagger=0,d&<(o,d),t.yoyoEase&&!t.repeat&&(o.yoyoEase=t.yoyoEase),c=b[s],o.duration=+zt(f,A(r),s,c,b),o.delay=(+zt(g,A(r),s,c,b)||0)-r._delay,!v&&1===l&&o.delay&&(r._delay=g=o.delay,r._start+=g,o.delay=0),a.to(c,o,h(s,c,b))}f=g=0}f||r.duration(f=a.duration())}else r.timeline=0;return!0===y&&(kt=A(r),de.killTweensOf(b),kt=0),w&&L(w,A(r)),(m||!f&&!_&&r._start===w._time&&j(m)&&function e(t){return!t||t._ts&&e(t.parent)}(A(r))&&"nested"!==w.data)&&(r._tTime=-Re,r.render(Math.max(0,-g))),r}i(r,T);var e=r.prototype;return e.render=function(e,t,i){var n,r,a,s,o,l,u,c,h,d=this._time,p=this._tDur,f=this._dur,g=p-Re<e&&0<=e?p:e<Re?0:e;if(f){if(g!==this._tTime||!e||i||this._startAt&&this._zTime<0!=e<0){if(n=g,c=this.timeline,this._repeat){if(s=f+this._rDelay,(f<(n=F(g%s))||p===g)&&(n=f),(a=~~(g/s))&&a===g/s&&(n=f,a--),(l=this._yoyo&&1&a)&&(h=this._yEase,n=f-n),o=ut(this._tTime,s),n===d&&!i&&this._initted)return this;a!==o&&(!this.vars.repeatRefresh||l||this._lock||(this._lock=i=1,this.render(s*a,!0).invalidate()._lock=0))}if(!this._initted){if(w(this,n,i,t))return this._tTime=0,this;if(f!==this._dur)return this.render(e,t,i)}for(this._tTime=g,this._time=n,!this._act&&this._ts&&(this._act=1,this._lazy=0),this.ratio=u=(h||this._ease)(n/f),this._from&&(this.ratio=u=1-u),d||!n||t||gt(this,"onStart"),r=this._pt;r;)r.r(u,r.d),r=r._next;c&&c.render(e<0?e:!n&&l?-Re:c._dur*u,t,i)||this._startAt&&(this._zTime=e),this._onUpdate&&!t&&(e<0&&this._startAt&&this._startAt.render(e,!0,i),gt(this,"onUpdate")),this._repeat&&a!==o&&this.vars.onRepeat&&!t&&this.parent&>(this,"onRepeat"),g!==this._tDur&&g||this._tTime!==g||(e<0&&this._startAt&&!this._onUpdate&&this._startAt.render(e,!0,i),!e&&f||!(e&&0<this._ts||!g&&this._ts<0)||H(this,1),t||e<0&&!d||g<p&&0<this.timeScale()||(gt(this,g===p?"onComplete":"onReverseComplete",!0),this._prom&&this._prom()))}}else!function(e,t,i,n){var r,a=e._zTime<0?0:1,s=t<0?0:1,o=e._rDelay,l=0;if(o&&e._repeat&&(l=ht(0,e._tDur,t),ut(l,o)!==ut(e._tTime,o)&&(a=1-s,e.vars.repeatRefresh&&e._initted&&e.invali
vendor: 7,621 bytes, line 1
1date())),(e._initted||!w(e,t,n,i))&&(s!==a||n||e._zTime===Re||!t&&e._zTime)){for(e._zTime=t||(i?Re:0),e.ratio=s,e._from&&(s=1-s),e._time=0,e._tTime=l,i||gt(e,"onStart"),r=e._pt;r;)r.r(s,r.d),r=r._next;!s&&e._startAt&&!e._onUpdate&&e._start&&e._startAt.render(t,!0,n),e._onUpdate&&(i||gt(e,"onUpdate")),l&&e._repeat&&!i&&e.parent&>(e,"onRepeat"),(t>=e._tDur||t<0)&&e.ratio===s&&(e.ratio&&H(e,1),i||(gt(e,e.ratio?"onComplete":"onReverseComplete",!0),e._prom&&e._prom()))}}(this,e,t,i);return this},e.targets=function(){return this._targets},e.invalidate=function(){return this._pt=this._op=this._startAt=this._onUpdate=this._act=this._lazy=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(),T.prototype.invalidate.call(this)},e.kill=function(e,t){if(void 0===t&&(t="all"),!(e||t&&"all"!==t)&&(this._lazy=0,this.parent))return te(this);if(this.timeline)return this.timeline.killTweensOf(e,t,kt&&!0!==kt.vars.overwrite),this;var i,n,r,a,s,o,l,u=this._targets,c=e?pt(e):u,h=this._ptLookup,d=this._pt;if((!t||"all"===t)&&function(e,t){for(var i=e.length,n=i===t.length;n&&i--&&e[i]===t[i];);return i<0}(u,c))return te(this);for(i=this._op=this._op||[],"all"!==t&&(U(t)&&(s={},f(t,function(e){return s[e]=1}),t=s),t=function(e,t){var i,n,r,a,s=e[0]?P(e[0]).harness:0,o=s&&s.aliases;if(!o)return t;for(n in i=lt({},t),o)if(n in i)for(r=(a=o[n].split(",")).length;r--;)i[a[r]]=i[n];return i}(u,t)),l=u.length;l--;)if(~c.indexOf(u[l]))for(s in n=h[l],"all"===t?(i[l]=t,a=n,r={}):(r=i[l]=i[l]||{},a=t),a)(o=n&&n[s])&&("kill"in o.d&&!0!==o.d.kill(s)||m(this,o,"_pt"),delete n[s]),"all"!==r&&(r[s]=1);return this._initted&&!this._pt&&d&&te(this),this},r.to=function(e,t,i){return new r(e,t,i)},r.from=function(e,t){return new r(e,l(arguments,1))},r.delayedCall=function(e,t,i,n){return new r(t,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:e,onComplete:t,onReverseComplete:t,onCompleteParams:i,onReverseCompleteParams:i,callbackScope:n})},r.fromTo=function(e,t,i){return new r(e,l(arguments,2))},r.set=function(e,t){return t.duration=0,t.repeatDelay||(t.repeat=0),new r(e,t)},r.killTweensOf=function(e,t,i){return de.killTweensOf(e,t,i)},r}(Lt);z(Ft.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0}),f("staggerTo,staggerFrom,staggerFromTo",function(i){Ft[i]=function(){var e=new Ot,t=dt.call(arguments,0);return t.splice("staggerFromTo"===i?5:4,0,0),e[i].apply(e,t)}});function Gt(e,t,i){return e.setAttribute(t,i)}function Ht(e,t,i,n){n.mSet(e,t,n.m.call(n.tween,i,n.mt),n)}var Yt=function(e,t,i){return e[t]=i},Qt=function(e,t,i){return e[t](i)},Vt=function(e,t,i,n){return e[t](n.fp,i)},Wt=function(e,t){return p(e[t])?Qt:r(e[t])&&e.setAttribute?Gt:Yt},qt=function(e,t){return t.set(t.t,t.p,Math.round(1e4*(t.s+t.c*e))/1e4,t)},Xt=function(e,t){return t.set(t.t,t.p,!!(t.s+t.c*e),t)},Zt=function(e,t){var i=t._pt,n="";if(!e&&t.b)n=t.b;else if(1===e&&t.e)n=t.e;else{for(;i;)n=i.p+(i.m?i.m(i.s+i.c*e):Math.round(1e4*(i.s+i.c*e))/1e4)+n,i=i._next;n+=t.c}t.set(t.t,t.p,n,t)},$t=function(e,t){for(var i=t._pt;i;)i.r(e,i.d),i=i._next},Kt=function(e,t,i,n){for(var r,a=this._pt;a;)r=a._next,a.p===n&&a.modifier(e,t,i),a=r},Jt=function(e){for(var t,i,n=this._pt;n;)i=n._next,n.p===e&&!n.op||n.op===e?m(this,n,"_pt"):n.dep||(t=1),n=i;return!t},ei=function(e){for(var t,i,n,r,a=e._pt;a;){for(t=a._next,i=n;i&&i.pr>a.pr;)i=i._next;(a._prev=i?i._prev:r)?a._prev._next=a:n=a,(a._next=i)?i._prev=a:r=a,a=t}e._pt=n},ti=(ii.prototype.modifier=function(e,t,i){this.mSet=this.mSet||this.set,this.set=Ht,this.m=e,this.mt=i,this.tween=t},ii);function ii(e,t,i,n,r,a,s,o,l){this.t=t,this.s=n,this.c=r,this.p=i,this.r=a||qt,this.d=s||this,this.set=o||Yt,this.pr=l||0,(this._next=e)&&(e._prev=this)}f(ot+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert",function(e){return et[e]=1}),Ke.TweenMax=Ke.TweenLite=Ft,Ke.TimelineLite=Ke.TimelineMax=Ot,de=new Ot({sortChildren:!1,defaults:ke,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0}),je.stringFilter=se;var ni={registerPlugin:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];t.forEach(function(e){return function(e){var t=(e=!e.name&&e.default||e).name,i=p(e),n=t&&!i&&e.init?function(){this._props=[]}:e,r={init:N,render:$t,add:Pt,kill:Jt,modifier:Kt,rawVars:0},a={targetTest:0,get:0,getSetter:Wt,aliases:{},register:0};if(wt(),e!==n){if(nt[t])return;z(n,z(G(e,r),a)),lt(n.prototype,lt(r,G(e,a))),nt[n.prop=t]=n,e.targetTest&&(st.push(n),et[t]=1),t=("css"===t?"CSS":t.charAt(0).toUpperCase()+t.substr(1))+"Plugin"}s(t,n),e.register&&e.register(si,n,ti)}(e)})},timeline:function(e){return new Ot(e)},getTweensOf:function(e,t){return de.getTweensOf(e,t)},getProperty:function(n,e,t,i){U(n)&&(n=pt(n)[0]);var r=P(n||{}).get,a=t?h:c;return"native"===t&&(t=""),n?e?a((nt[e]&&nt[e].get||r)(n,e,t,i)):function(e,t,i){return a((nt[e]&&nt[e].get||r)(n,e,t,i))}:n},quickSetter:function(i,t,n){if(1<(i=pt(i)).length){var r=i.map(function(e){return si.quickSetter(e,t,n)}),a=r.length;return function(e){for(var t=a;t--;)r[t](e)}}i=i[0]||{};var s=nt[t],o=P(i),l=s?function(e){var t=new s;ye._pt=0,t.init(i,n?e+n:e,ye,0,[i]),t.render(1,t),ye._pt&&$t(1,ye)}:o.set(i,t);return s?l:function(e){return l(i,t,n?e+n:e,o,1)}},isTweening:function(e){return 0<de.getTweensOf(e,!0).length},defaults:function(e){return e&&e.ease&&(e.ease=Et(e.ease,ke.ease)),g(ke,e||{})},config:function(e){return g(je,e||{})},registerEffect:function(e){var n=e.name,r=e.effect,t=e.plugins,a=e.defaults,i=e.extendTimeline;(t||"").split(",").forEach(function(e){return e&&!nt[e]&&!Ke[e]&&D(n+" effect requires "+e+" plugin.")}),rt[n]=function(e,t,i){return r(pt(e),z(t||{},a),i)},i&&(Ot.prototype[n]=function(e,t,i){return this.add(rt[n](e,E(t)?t:(i=t)&&{},this),i)})},registerEase:function(e,t){bt[e]=Et(t)},parseEase:function(e,t){return arguments.length?Et(e,t):bt},getById:function(e){return de.getById(e)},exportRoot:function(e,t){void 0===e&&(e={});var i,n,r=new Ot(e);for(r.smoothChildTiming=j(e.smoothChildTiming),de.remove(r),r._dp=0,r._time=r._tTime=de._time,i=de._first;i;)n=i._next,!t&&!i._dur&&i instanceof Ft&&i.vars.onComplete===i._targets[0]||M(r,i,i._start-i._delay),i=n;return M(de,r,0),r},utils:{wrap:function e(t,i,n){var r=i-t;return Ye(t)?K(t,e(0,t.length),i):Y(n,function(e){return(r+(e-t)%r)%r+t})},wrapYoyo:function e(t,i,n){var r=i-t,a=2*r;return Ye(t)?K(t,e(0,t.length-1),i):Y(n,function(e){return t+(r<(e=(a+(e-t)%a)%a)?a-e:e)})},distribute:q,random:$,snap:Z,normalize:function(e,t,i){return ft(e,t,0,1,i)},getUnit:Q,clamp:function(t,i,e){return Y(e,function(e){return ht(t,i,e)})},splitColor:ne,toArray:pt,mapRange:ft,pipe:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return function(e){return t.reduce(function(e,t){return t(e)},e)}},unitize:function(t,i){return function(e){return t(parseFloat(e))+(i||Q(e))}},interpolate:function e(t,i,n,r){var a=isNaN(t+i)?0:function(e){return(1-e)*t+e*i};if(!a){var s,o,l,u,c,h=U(t),d={};if(!0===n&&(r=1)&&(n=null),h)t={p:t},i={p:i};else if(Ye(t)&&!Ye(i)){for(l=[],u=t.length,c=u-2,o=1;o<u;o++)l.push(e(t[o-1],t[o]));u--,a=function(e){e*=u;var t=Math.min(c,~~e);return l[t](e-t)},n=i}else r||(t=lt(Ye(t)?[]:{},t));if(!l){for(s in i)Pt.call(d,t,s,"get",i[s]);a=function(e){return $t(e,d)||(h?t.p:t)}}}return Y(n,a)},shuffle:W},install:n,effects:rt,ticker:Mt,updateRoot:Ot.updateRoot,plugins:nt,globalTimeline:de,core:{PropTween:ti,globals:s,Tween:Ft,Timeline:Ot,Animation:Lt,getCache:P,_removeLinkedListItem:m}}
vendor: 16,675 bytes, line 1
1;f("to,from,fromTo,delayedCall,set,killTweensOf",function(e){return ni[e]=Ft[e]}),Mt.add(Ot.updateRoot),ye=ni.to({},{duration:0});function ri(e,t){for(var i=e._pt;i&&i.p!==t&&i.op!==t&&i.fp!==t;)i=i._next;return i}function ai(e,r){return{name:e,rawVars:1,init:function(e,n,t){t._onInit=function(e){var t,i;if(U(n)&&(t={},f(n,function(e){return t[e]=1}),n=t),r){for(i in t={},n)t[i]=r(n[i]);n=t}!function(e,t){var i,n,r,a=e._targets;for(i in t)for(n=a.length;n--;)(r=(r=e._ptLookup[n][i])&&r.d)&&(r._pt&&(r=ri(r,i)),r&&r.modifier&&r.modifier(t[i],e,a[n],i))}(e,n)}}}}var si=ni.registerPlugin({name:"attr",init:function(e,t,i,n,r){for(var a in t)this.add(e,"setAttribute",(e.getAttribute(a)||0)+"",t[a],n,r,0,0,a),this._props.push(a)}},{name:"endArray",init:function(e,t){for(var i=t.length;i--;)this.add(e,i,e[i]||0,t[i])}},ai("roundProps",X),ai("modifiers"),ai("snap",Z))||ni;Ft.version=Ot.version=si.version="3.2.6",me=1,t()&&wt();function oi(e,t){return t.set(t.t,t.p,Math.round(1e4*(t.s+t.c*e))/1e4+t.u,t)}function li(e,t){return t.set(t.t,t.p,1===e?t.e:Math.round(1e4*(t.s+t.c*e))/1e4+t.u,t)}function ui(e,t){return t.set(t.t,t.p,e?Math.round(1e4*(t.s+t.c*e))/1e4+t.u:t.b,t)}function ci(e,t){var i=t.s+t.c*e;t.set(t.t,t.p,~~(i+(i<0?-.5:.5))+t.u,t)}function hi(e,t){return t.set(t.t,t.p,e?t.e:t.b,t)}function di(e,t){return t.set(t.t,t.p,1!==e?t.b:t.e,t)}function pi(e,t,i){return e.style[t]=i}function fi(e,t,i){return e.style.setProperty(t,i)}function gi(e,t,i){return e._gsap[t]=i}function mi(e,t,i){return e._gsap.scaleX=e._gsap.scaleY=i}function vi(e,t,i,n,r){var a=e._gsap;a.scaleX=a.scaleY=i,a.renderTransform(r,a)}function yi(e,t,i,n,r){var a=e._gsap;a[t]=i,a.renderTransform(r,a)}function _i(e,t){var i=zi.createElementNS?zi.createElementNS((t||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),e):zi.createElement(e);return i.style?i:zi.createElement(e)}function Mi(e,t,i){var n=getComputedStyle(e);return n[t]||n.getPropertyValue(t.replace(fn,"-$1").toLowerCase())||n.getPropertyValue(t)||!i&&Mi(e,wn(t)||t,1)||""}function wi(){"undefined"!=typeof window&&(Ui=(zi=window.document).documentElement,Fi=_i("div")||{style:{}},Gi=_i("div"),yn=wn(yn),_n=wn(_n),Fi.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",Yi=!!wn("perspective"),Bi=1)}function bi(e){var t,i=_i("svg",this.ownerSVGElement&&this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),n=this.parentNode,r=this.nextSibling,a=this.style.cssText;if(Ui.appendChild(i),i.appendChild(this),this.style.display="block",e)try{t=this.getBBox(),this._gsapBBox=this.getBBox,this.getBBox=bi}catch(e){}else this._gsapBBox&&(t=this._gsapBBox());return n&&(r?n.insertBefore(this,r):n.appendChild(this)),Ui.removeChild(i),this.style.cssText=a,t}function Ti(e,t){for(var i=t.length;i--;)if(e.hasAttribute(t[i]))return e.getAttribute(t[i])}function Ai(t){var i;try{i=t.getBBox()}catch(e){i=bi.call(t,!0)}return i&&(i.width||i.height)||t.getBBox===bi||(i=bi.call(t,!0)),!i||i.width||i.x||i.y?i:{x:+Ti(t,["x","cx","x1"])||0,y:+Ti(t,["y","cy","y1"])||0,width:0,height:0}}function xi(e){return!(!e.getCTM||e.parentNode&&!e.ownerSVGElement||!Ai(e))}function Ei(e,t){if(t){var i=e.style;t in cn&&(t=yn),i.removeProperty?("ms"!==t.substr(0,2)&&"webkit"!==t.substr(0,6)||(t="-"+t),i.removeProperty(t.replace(fn,"-$1").toLowerCase())):i.removeAttribute(t)}}function Si(e,t,i,n,r,a){var s=new ti(e._pt,t,i,0,1,a?di:hi);return(e._pt=s).b=n,s.e=r,e._props.push(i),s}function Di(e,t,i,n){var r,a,s,o,l=parseFloat(i)||0,u=(i+"").trim().substr((l+"").length)||"px",c=Fi.style,h=gn.test(t),d="svg"===e.tagName.toLowerCase(),p=(d?"client":"offset")+(h?"Width":"Height"),f="px"===n,g="%"===n;return n===u||!l||bn[n]||bn[u]?l:("px"===u||f||(l=Di(e,t,i,"px")),o=e.getCTM&&xi(e),g&&(cn[t]||~t.indexOf("adius"))?F(l/(o?e.getBBox()[h?"width":"height"]:e[p])*100):(c[h?"width":"height"]=100+(f?u:n),a=~t.indexOf("adius")||"em"===n&&e.appendChild&&!d?e:e.parentNode,o&&(a=(e.ownerSVGElement||{}).parentNode),a&&a!==zi&&a.appendChild||(a=zi.body),(s=a._gsap)&&g&&s.width&&h&&s.time===Mt.time?F(l/s.width*100):(!g&&"%"!==u||(c.position=Mi(e,"position")),a===e&&(c.position="static"),a.appendChild(Fi),r=Fi[p],a.removeChild(Fi),c.position="absolute",h&&g&&((s=P(a)).time=Mt.time,s.width=a[p]),F(f?r*l/100:r&&l?100/r*l:0))))}function Ni(e,t,i,n){var r;return Bi||wi(),t in vn&&"transform"!==t&&~(t=vn[t]).indexOf(",")&&(t=t.split(",")[0]),cn[t]&&"transform"!==t?(r=Sn(e,n),r="transformOrigin"!==t?r[t]:Dn(Mi(e,_n))+" "+r.zOrigin+"px"):(r=e.style[t])&&"auto"!==r&&!n&&!~(r+"").indexOf("calc(")||(r=An[t]&&An[t](e,t,i)||Mi(e,t)||a(e,t)||("opacity"===t?1:0)),i&&!~(r+"").indexOf(" ")?Di(e,t,r,i)+i:r}function Ci(e,t,i,n){if(!i||"none"===i){var r=wn(t,e,1),a=r&&Mi(e,r,1);a&&a!==i&&(t=r,i=a)}var s,o,l,u,c,h,d,p,f,g,m,v,y=new ti(this._pt,e.style,t,0,1,Zt),_=0,M=0;if(y.b=i,y.e=n,i+="","auto"===(n+="")&&(e.style[t]=n,n=Mi(e,t)||n,e.style[t]=i),se(s=[i,n]),n=s[1],l=(i=s[0]).match(We)||[],(n.match(We)||[]).length){for(;o=We.exec(n);)d=o[0],f=n.substring(_,o.index),c?c=(c+1)%5:"rgba("!==f.substr(-5)&&"hsla("!==f.substr(-5)||(c=1),d!==(h=l[M++]||"")&&(u=parseFloat(h)||0,m=h.substr((u+"").length),(v="="===d.charAt(1)?+(d.charAt(0)+"1"):0)&&(d=d.substr(2)),p=parseFloat(d),g=d.substr((p+"").length),_=We.lastIndex-g.length,g||(g=g||je.units[t]||m,_===n.length&&(n+=g,y.e+=g)),m!==g&&(u=Di(e,t,h,g)||0),y._pt={_next:y._pt,p:f||1===M?f:",",s:u,c:v?v*p:p-u,m:c&&c<4?Math.round:0});y.c=_<n.length?n.substring(_,n.length):""}else y.r="display"===t&&"none"===n?di:hi;return Ze.test(n)&&(y.e=0),this._pt=y}function Li(e,t){if(t.tween&&t.tween._time===t.tween._dur){var i,n,r,a=t.t,s=a.style,o=t.u,l=a._gsap;if("all"===o||!0===o)s.cssText="",n=1;else for(r=(o=o.split(",")).length;-1<--r;)i=o[r],cn[i]&&(n=1,i="transformOrigin"===i?_n:yn),Ei(a,i);n&&(Ei(a,yn),l&&(l.svg&&a.removeAttribute("transform"),Sn(a,1),l.uncache=1))}}function Ii(e){return"matrix(1, 0, 0, 1, 0, 0)"===e||"none"===e||!e}function Oi(e){var t=Mi(e,yn);return Ii(t)?xn:t.substr(7).match(Ve).map(F)}function ji(e,t){var i,n,r,a,s=e._gsap||P(e),o=e.style,l=Oi(e);return s.svg&&e.getAttribute("transform")?"1,0,0,1,0,0"===(l=[(r=e.transform.baseVal.consolidate().matrix).a,r.b,r.c,r.d,r.e,r.f]).join(",")?xn:l:(l!==xn||e.offsetParent||e===Ui||s.svg||(r=o.display,o.display="block",(i=e.parentNode)&&e.offsetParent||(a=1,n=e.nextSibling,Ui.appendChild(e)),l=Oi(e),r?o.display=r:Ei(e,"display"),a&&(n?i.insertBefore(e,n):i?i.appendChild(e):Ui.removeChild(e))),t&&6<l.length?[l[0],l[1],l[4],l[5],l[12],l[13]]:l)}function ki(e,t,i,n,r,a){var s,o,l,u=e._gsap,c=r||ji(e,!0),h=u.xOrigin||0,d=u.yOrigin||0,p=u.xOffset||0,f=u.yOffset||0,g=c[0],m=c[1],v=c[2],y=c[3],_=c[4],M=c[5],w=t.split(" "),b=parseFloat(w[0])||0,T=parseFloat(w[1])||0;i?c!==xn&&(o=g*y-m*v)&&(l=b*(-m/o)+T*(g/o)-(g*M-m*_)/o,b=b*(y/o)+T*(-v/o)+(v*M-y*_)/o,T=l):(b=(s=Ai(e)).x+(~w[0].indexOf("%")?b/100*s.width:b),T=s.y+(~(w[1]||w[0]).indexOf("%")?T/100*s.height:T)),n||!1!==n&&u.smooth?(_=b-h,M=T-d,u.xOffset=p+(_*g+M*v)-_,u.yOffset=f+(_*m+M*y)-M):u.xOffset=u.yOffset=0,u.xOrigin=b,u.yOrigin=T,u.smooth=!!n,u.origin=t,u.originIsAbsolute=!!i,e.style[_n]="0px 0px",a&&(Si(a,u,"xOrigin",h,b),Si(a,u,"yOrigin",d,T),Si(a,u,"xOffset",p,u.xOffset),Si(a,u,"yOffset",f,u.yOffset)),e.setAttribute("data-svg-origin",b+" "+T)}function Pi(e,t,i){var n=Q(t);return F(parseFloat(t)+parseFloat(Di(e,"x",i+"px",n)))+n}function Ri(e,t,i){var n,r,a,s,o,l,u,c=Gi.style,h=i._gsap;for(r in c.cssText=getComputedStyle(i).cssText+";position:absolute;display:block;",c[yn]=t,zi.body.appendChild(Gi),n=Sn(Gi,1),cn)(a=h[r])!==(s=n[r])&&"perspective,force3D,transformOrigin,svgOrigin".indexOf(r)<0&&(o=Q(a)!==(u=Q(s))?Di(i,r,a,u):parseFloat(a),l=parseFloat(s),e._pt=new ti(e._pt,h,r,o,l-o,oi),e._pt.u=u||0,e._props.push(r));zi.body.removeChild(Gi)}var zi,Ui,Bi,Fi,Gi,Hi,Yi,Qi=bt.Power0,Vi=bt.Power1,Wi=bt.Power2,qi=bt.Power3,Xi=bt.Power4,Zi=bt.Linear,$i=bt.Quad,Ki=bt.Cubic,Ji=bt.Quart,en=bt.Quint,tn=bt.Strong,nn=bt.Elastic,rn=bt.Back,an=bt.SteppedEase,sn=bt.Bounce,on=bt.Sine,ln=bt.Expo,un=bt.Circ,cn={},hn=180/Math.PI,dn=Math.PI/180,pn=Math.atan2,fn=/([A-Z])/g,gn=/(?:left|right|width|margin|padding|x)/i,mn=/[\s,\(]\S/,vn={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},yn="transform",_n=yn+"Origin",Mn="O,Moz,ms,Ms,Webkit".split(","),wn=function(e,t,i){var n=(t||Fi).style,r=5;if(e in n&&!i)return e;for(e=e.charAt(0).toUpperCase()+e.substr(1);r--&&!(Mn[r]+e in n););return r<0?null:(3===r?"ms":0<=r?Mn[r]:"")+e},bn={deg:1,rad:1,turn:1},Tn={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},An={clearProps:function(e,t,i,n,r){if("isFromStart"!==r.data){var a=e._pt=new ti(e._pt,t,i,0,0,Li);return a.u=n,a.pr=-10,a.tween=r,e._props.push(i),1}}},xn=[1,0,0,1,0,0],En={},Sn=function(e,t){var i=e._gsap||new Ct(e);if("x"in i&&!t&&!i.uncache)return i;var n,r,a,s,o,l,u,c,h,d,p,f,g,m,v,y,_,M,w,b,T,A,x,E,S,D,N,C,L,I,O,j,k=e.style,P=i.scaleX<0,R="deg",z=Mi(e,_n)||"0";return n=r=a=l=u=c=h=d=p=0,s=o=1,i.svg=!(!e.getCTM||!xi(e)),m=ji(e,i.svg),i.svg&&(E=!i.uncache&&e.getAttribute("data-svg-origin"),ki(e,E||z,!!E||i.originIsAbsolute,!1!==i.smooth,m)),f=i.xOrigin||0,g=i.yOrigin||0,m!==xn&&(M=m[0],w=m[1],b=m[2],T=m[3],n=A=m[4],r=x=m[5],6===m.length?(s=Math.sqrt(M*M+w*w),o=Math.sqrt(T*T+b*b),l=M||w?pn(w,M)*hn:0,(h=b||T?pn(b,T)*hn+l:0)&&(o*=Math.cos(h*dn)),i.svg&&(n-=f-(f*M+g*b),r-=g-(f*w+g*T))):(j=m[6],I=m[7],N=m[8],C=m[9],L=m[10],O=m[11],n=m[12],r=m[13],a=m[14],u=(v=pn(j,L))*hn,v&&(E=A*(y=Math.cos(-v))+N*(_=Math.sin(-v)),S=x*y+C*_,D=j*y+L*_,N=A*-_+N*y,C=x*-_+C*y,L=j*-_+L*y,O=I*-_+O*y,A=E,x=S,j=D),c=(v=pn(-b,L))*hn,v&&(y=Math.cos(-v),O=T*(_=Math.sin(-v))+O*y,M=E=M*y-N*_,w=S=w*y-C*_,b=D=b*y-L*_),l=(v=pn(w,M))*hn,v&&(E=M*(y=Math.cos(v))+w*(_=Math.sin(v)),S=A*y+x*_,w=w*y-M*_,x=x*y-A*_,M=E,A=S),u&&359.9<Math.abs(u)+Math.abs(l)&&(u=l=0,c=180-c),s=F(Math.sqrt(M*M+w*w+b*b)),o=F(Math.sqrt(x*x+j*j)),v=pn(A,x),h=2e-4<Math.abs(v)?v*hn:0,p=O?1/(O<0?-O:O):0),i.svg&&(m=e.getAttribute("transform"),i.forceCSS=e.setAttribute("transform","")||!Ii(Mi(e,yn)),m&&e.setAttribute("transform",m))),90<Math.abs(h)&&Math.abs(h)<270&&(P?(s*=-1,h+=l<=0?180:-180,l+=l<=0?180:-180):(o*=-1,h+=h<=0?180:-180)),i.x=((i.xPercent=n&&Math.round(e.offsetWidth/2)===Math.round(-n)?-50:0)?0:n)+"px",i.y=((i.yPercent=r&&Math.round(e.offsetHeight/2)===Math.round(-r)?-50:0)?0:r)+"px",i.z=a+"px",i.scaleX=F(s),i.scaleY=F(o),i.rotation=F(l)+R,i.rotationX=F(u)+R,i.rotationY=F(c)+R,i.skewX=h+R,i.skewY=d+R,i.transformPerspective=p+"px",(i.zOrigin=parseFloat(z.split(" ")[2])||0)&&(k[_n]=Dn(z)),i.xOffset=i.yOffset=0,i.force3D=je.force3D,i.renderTransform=i.svg?jn:Yi?On:Nn,i.uncache=0,i},Dn=function(e){return(e=e.split(" "))[0]+" "+e[1]},Nn=function(e,t){t.z="0px",t.rotationY=t.rotationX="0deg",t.force3D=0,On(e,t)},Cn="0deg",Ln="0px",In=") ",On=function(e,t){var i=t||this,n=i.xPercent,r=i.yPercent,a=i.x,s=i.y,o=i.z,l=i.rotation,u=i.rotationY,c=i.rotationX,h=i.skewX,d=i.skewY,p=i.scaleX,f=i.scaleY,g=i.transformPerspective,m=i.force3D,v=i.target,y=i.zOrigin,_="",M="auto"===m&&e&&1!==e||!0===m;if(y&&(c!==Cn||u!==Cn)){var w,b=parseFloat(u)*dn,T=Math.sin(b),A=Math.cos(b);b=parseFloat(c)*dn,w=Math.cos(b),a=Pi(v,a,T*w*-y),s=Pi(v,s,-Math.sin(b)*-y),o=Pi(v,o,A*w*-y+y)}g!==Ln&&(_+="perspective("+g+In),(n||r)&&(_+="translate("+n+"%, "+r+"%) "),!M&&a===Ln&&s===Ln&&o===Ln||(_+=o!==Ln||M?"translate3d("+a+", "+s+", "+o+") ":"translate("+a+", "+s+In),l!==Cn&&(_+="rotate("+l+In),u!==Cn&&(_+="rotateY("+u+In),c!==Cn&&(_+="rotateX("+c+In),h===Cn&&d===Cn||(_+="skew("+h+", "+d+In),1===p&&1===f||(_+="scale("+p+", "+f+In),v.style[yn]=_||"translate(0, 0)"},jn=function(e,t){var i,n,r,a,s,o=t||this,l=o.xPercent,u=o.yPercent,c=o.x,h=o.y,d=o.rotation,p=o.skewX,f=o.skewY,g=o.scaleX,m=o.scaleY,v=o.target,y=o.xOrigin,_=o.yOrigin,M=o.xOffset,w=o.yOffset,b=o.forceCSS,T=parseFloat(c),A=parseFloat(h);d=parseFloat(d),p=parseFloat(p),(f=parseFloat(f))&&(p+=f=parseFloat(f),d+=f),d||p?(d*=dn,p*=dn,i=Math.cos(d)*g,n=Math.sin(d)*g,r=Math.sin(d-p)*-m,a=Math.cos(d-p)*m,p&&(f*=dn,s=Math.tan(p-f),r*=s=Math.sqrt(1+s*s),a*=s,f&&(s=Math.tan(f),i*=s=Math.sqrt(1+s*s),n*=s)),i=F(i),n=F(n),r=F(r),a=F(a)):(i=g,a=m,n=r=0),(T&&!~(c+"").indexOf("px")||A&&!~(h+"").indexOf("px"))&&(T=Di(v,"x",c,"px"),A=Di(v,"y",h,"px")),(y||_||M||w)&&(T=F(T+y-(y*i+_*r)+M),A=F(A+_-(y*n+_*a)+w)),(l||u)&&(s=v.getBBox(),T=F(T+l/100*s.width),A=F(A+u/100*s.height)),s="matrix("+i+","+n+","+r+","+a+","+T+","+A+")",v.setAttribute("transform",s),b&&(v.style[yn]=s)};f("padding,margin,Width,Radius",function(t,i){var e="Right",n="Bottom",r="Left",o=(i<3?["Top",e,n,r]:["Top"+r,"Top"+e,n+e,n+r]).map(function(e){return i<2?t+e:"border"+e+t});An[1<i?"border"+t:t]=function(t,e,i,n,r){var a,s;if(arguments.length<4)return a=o.map(function(e){return Ni(t,e,i)}),5===(s=a.join(" ")).split(a[0]).length?a[0]:s;a=(n+"").split(" "),s={},o.forEach(function(e,t){return s[e]=a[t]=a[t]||a[(t-1)/2|0]}),t.init(e,s,r)}});var kn,Pn,Rn,zn={name:"css",register:wi,targetTest:function(e){return e.style&&e.nodeType},init:function(e,t,i,n,r){var a,s,o,l,u,c,h,d,p,f,g,m,v,y,_,M,w,b,T,A,x,E,S,D,N,C,L,I,O,j,k,P,R=this._props,z=e.style;for(h in Bi||wi(),t)if("autoRound"!==h&&(s=t[h],!nt[h]||!jt(h,t,i,n,e,r)))if(u=typeof s,c=An[h],"function"===u&&(u=typeof(s=s.call(i,n,e,r))),"string"===u&&~s.indexOf("random(")&&(s=J(s)),c)c(this,e,h,s,i)&&(_=1);else if("--"===h.substr(0,2))this.add(z,"setProperty",getComputedStyle(e).getPropertyValue(h)+"",s+"",n,r,0,0,h);else{if(a=Ni(e,h),l=parseFloat(a),(f="string"===u&&"="===s.charAt(1)?+(s.charAt(0)+"1"):0)&&(s=s.substr(2)),o=parseFloat(s),h in vn&&("autoAlpha"===h&&(1===l&&"hidden"===Ni(e,"visibility")&&o&&(l=0),Si(this,z,"visibility",l?"inherit":"hidden",o?"inherit":"hidden",!o)),"scale"!==h&&"transform"!==h&&~(h=vn[h]).indexOf(",")&&(h=h.split(",")[0])),g=h in cn)if(m||((v=e._gsap).renderTransform||Sn(e),y=!1!==t.smoothOrigin&&v.smooth,(m=this._pt=new ti(this._pt,z,yn,0,1,v.renderTransform,v,0,-1)).dep=1),"scale"===h)this._pt=new ti(this._pt,v,"scaleY",v.scaleY,f?f*o:o-v.scaleY),R.push("scaleY",h),h+="X";else{if("transformOrigin"===h){P=k=j=void 0,j=(O=s).split(" "),k=j[0],P=j[1]||"50%","top"!==k&&"bottom"!==k&&"left"!==P&&"right"!==P||(O=k,k=P,P=O),j[0]=Tn[k]||k,j[1]=Tn[P]||P,s=j.join(" "),v.svg?ki(e,s,0,y,0,this):((p=parseFloat(s.split(" ")[2])||0)!==v.zOrigin&&Si(this,v,"zOrigin",v.zOrigin,p),Si(this,z,h,Dn(a),Dn(s)));continue}if("svgOrigin"===h){ki(e,s,1,y,0,this);continue}if(h in En){M=this,w=v,b=h,T=l,x=f,L=S=E=void 0,D=360,N=U(A=s),C=parseFloat(A)*(N&&~A.indexOf("rad")?hn:1),I=T+(L=x?C*x:C-T)+"deg",N&&("short"===(E=A.split("_")[1])&&(L%=D)!=L%180&&(L+=L<0?D:-D),"cw"===E&&L<0?L=(L+36e9)%D-~~(L/D)*D:"ccw"===E&&0<L&&(L=(L-36e9)%D-~~(L/D)*D)),M._pt=S=new ti(M._pt,w,b,T,L,li),S.e=I,S.u="deg",M._props.push(b);continue}if("smoothOrigin"===h){Si(this,v,"smooth",v.smooth,s);continue}if("force3D"===h){v[h]=s;continue}if("transform"===h){Ri(this,s,e);continue}}else h in z||(h=wn(h)||h);if(g||(o||0===o)&&(l||0===l)&&!mn.test(s)&&h in z)(d=(a+"").substr((l+"").length))!==(p=(s+"").substr(((o=o||0)+"").length)||(h in je.units?je.units[h]:d))&&(l=Di(e,h,a,p)),this._pt=new ti(this._pt,g?v:z,h,l,f?f*o:o-l,"px"!==p||!1===t.autoRound||g?oi:ci),this._pt.u=p||0,d!==p&&(this._pt.b=a,this._pt.r=ui);else if(h in z)Ci.call(this,e,h,a,s);else{if(!(h in e)){B(h,s);continue}this.add(e,h,e[h],s,n,r)}R.push(h)}_&&ei(this)},get:Ni,aliases:vn,getSetter:function(e,t,i){var n=vn[t];return n&&n.indexOf(",")<0&&(t=n),t in cn&&t!==_n&&(e._gsap.x||Ni(e,"x"))?i&&Hi===i?"scale"===t?mi:gi:(Hi=i||{})&&("scale"===t?vi:yi):e.style&&!r(e.style[t])?pi:~t.indexOf("-")?fi:Wt(e,t)},core:{_removeProperty:Ei,_getMatrix:ji}};si.utils.checkPrefix=wn,Rn=f((kn="x,y,z,scale,scaleX,scaleY,xPercent,yPercent")+","+(Pn="rotation,rotationX,rotationY,skewX,skewY")+",transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective",function(e){cn[e]=1}),f(Pn,function(e){je.units[e]="deg",En[e]=1}),vn[Rn[13]]=kn+","+Pn,f("0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY",function(e){var t=e.split(":");vn[t[1]]=Rn[t[0]]}),f("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(e){je.units[e]="px"}),si.registerPlugin(zn);var Un=si.registerPlugin(zn)||si,Bn=Un.core.Tween;e.Back=rn,e.Bounce=sn,e.CSSPlugin=zn,e.Circ=un,e.Cubic=Ki,e.Elastic=nn,e.Expo=ln,e.Linear=Zi,e.Power0=Qi,e.Power1=Vi,e.Power2=Wi,e.Power3=qi,e.Power4=Xi,e.Quad=$i,e.Quart=Ji,e.Quint=en,e.Sine=on,e.SteppedEase=an,e.Strong=tn,e.TimelineLite=Ot,e.TimelineMax=Ot,e.TweenLite=Ft,e.TweenMax=Bn,e.default=Un,e.gsap=Un,"undefined"==typeof window||window!==e?Object.defineProperty(e,"__esMo
1dule",{value:!0}):delete window.default}),function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e(jQuery)}(function(c){c.fn.addBack=c.fn.addBack||c.fn.andSelf,c.fn.extend({actual:function(e,t){if(!this[e])throw'$.actual => The jQuery method "'+e+'" you called does not exist';var i,n,r=c.extend({absolute:!1,clone:!1,includeMargin:!1,display:"block"},t),a=this.eq(0);if(!0===r.clone)i=function(){a=a.clone().attr("style","position: absolute !important; top: -1000 !important; ").appendTo("body")},n=function(){a.remove()};else{var s,o=[],l="";i=function(){s=a.parents().addBack().filter(":hidden"),l+="visibility: hidden !important; display: "+r.display+" !important; ",!0===r.absolute&&(l+="position: absolute !important; "),s.each(function(){var e=c(this),t=e.attr("style");o.push(t),e.attr("style",t?t+";"+l:l)})},n=function(){s.each(function(e){var t=c(this),i=o[e];void 0===i?t.removeAttr("style"):t.attr("style",i)})}}i();var u=/(outer)/.test(e)?a[e](r.includeMargin):a[e]();return n(),u}})}),function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e(jQuery)}(function(c){var r,i=0,o=Array.prototype.slice;c.cleanData=(r=c.cleanData,function(e){var t,i,n;for(n=0;null!=(i=e[n]);n++)try{(t=c._data(i,"events"))&&t.remove&&c(i).triggerHandler("remove")}catch(e){}r(e)}),c.widget=function(e,i,t){var n,r,a,s,o={},l=e.split(".")[0];return e=e.split(".")[1],n=l+"-"+e,t||(t=i,i=c.Widget),c.expr[":"][n.toLowerCase()]=function(e){return!!c.data(e,n)},c[l]=c[l]||{},r=c[l][e],a=c[l][e]=function(e,t){return this._createWidget?void(arguments.length&&this._createWidget(e,t)):new a(e,t)},c.extend(a,r,{version:t.version,_proto:c.extend({},t),_childConstructors:[]}),(s=new i).options=c.widget.extend({},s.options),c.each(t,function(t,n){return c.isFunction(n)?void(o[t]=function(){var e,t=this._super,i=this._superApply;return this._super=r,this._superApply=a,e=n.apply(this,arguments),this._super=t,this._superApply=i,e}):void(o[t]=n);function r(){return i.prototype[t].apply(this,arguments)}function a(e){return i.prototype[t].apply(this,e)}}),a.prototype=c.widget.extend(s,{widgetEventPrefix:r&&s.widgetEventPrefix||e},o,{constructor:a,namespace:l,widgetName:e,widgetFullName:n}),r?(c.each(r._childConstructors,function(e,t){var i=t.prototype;c.widget(i.namespace+"."+i.widgetName,a,t._proto)}),delete r._childConstructors):i._childConstructors.push(a),c.widget.bridge(e,a),a},c.widget.extend=function(e){for(var t,i,n=o.call(arguments,1),r=0,a=n.length;r<a;r++)for(t in n[r])i=n[r][t],n[r].hasOwnProperty(t)&&void 0!==i&&(e[t]=c.isPlainObject(i)?c.isPlainObject(e[t])?c.widget.extend({},e[t],i):c.widget.extend({},i):i);return e},c.widget.bridge=function(a,t){var s=t.prototype.widgetFullName||a;c.fn[a]=function(i){var e="string"==typeof i,n=o.call(arguments,1),r=this;return i=!e&&n.length?c.widget.extend.apply(null,[i].concat(n)):i,e?this.each(function(){var e,t=c.data(this,s);return"instance"===i?(r=t,!1):t?c.isFunction(t[i])&&"_"!==i.charAt(0)?(e=t[i].apply(t,n))!==t&&void 0!==e?(r=e&&e.jquery?r.pushStack(e.get()):e,!1):void 0:c.error("no such method '"+i+"' for "+a+" widget instance"):c.error("cannot call methods on "+a+" prior to initialization; attempted to call method '"+i+"'")}):this.each(function(){var e=c.data(this,s);e?(e.option(i||{}),e._init&&e._init()):c.data(this,s,new t(i,this))}),r}},c.Widget=function(){},c.Widget._childConstructors=[],c.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(e,t){t=c(t||this.defaultElement||this)[0],this.element=c(t),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=c(),this.hoverable=c(),this.focusable=c(),t!==this&&(c.data(t,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===t&&this.destroy()}}),this.document=c(t.style?t.ownerDocument:t.document||t),this.window=c(this.document[0].defaultView||this.document[0].parentWindow)),this.options=c.widget.extend({},this.options,this._getCreateOptions(),e),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:c.noop,_getCreateEventData:c.noop,_create:c.noop,_init:c.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetFullName).removeData(c.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:c.noop,widget:function(){return this.element},option:function(e,t){var i,n,r,a=e;if(0===arguments.length)return c.widget.extend({},this.options);if("string"==typeof e)if(a={},e=(i=e.split(".")).shift(),i.length){for(n=a[e]=c.widget.extend({},this.options[e]),r=0;i.length-1>r;r++)n[i[r]]=n[i[r]]||{},n=n[i[r]];if(e=i.pop(),1===arguments.length)return void 0===n[e]?null:n[e];n[e]=t}else{if(1===arguments.length)return void 0===this.options[e]?null:this.options[e];a[e]=t}return this._setOptions(a),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return this.options[e]=t,"disabled"===e&&(this.widget().toggleClass(this.widgetFullName+"-disabled",!!t),t&&(this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus"))),this},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_on:function(s,o,e){var l,u=this;"boolean"!=typeof s&&(e=o,o=s,s=!1),e?(o=l=c(o),this.bindings=this.bindings.add(o)):(e=o,o=this.element,l=this.widget()),c.each(e,function(e,t){function i(){return s||!0!==u.options.disabled&&!c(this).hasClass("ui-state-disabled")?("string"==typeof t?u[t]:t).apply(u,arguments):void 0}"string"!=typeof t&&(i.guid=t.guid=t.guid||i.guid||c.guid++);var n=e.match(/^([\w:-]*)\s*(.*)$/),r=n[1]+u.eventNamespace,a=n[2];a?l.delegate(a,r,i):o.bind(r,i)})},_off:function(e,t){t=(t||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.unbind(t).undelegate(t),this.bindings=c(this.bindings.not(e).get()),this.focusable=c(this.focusable.not(e).get()),this.hoverable=c(this.hoverable.not(e).get())},_delay:function(e,t){var i=this;return setTimeout(function(){return("string"==typeof e?i[e]:e).apply(i,arguments)},t||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){c(e.currentTarget).addClass("ui-state-hover")},mouseleave:function(e){c(e.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){c(e.currentTarget).addClass("ui-state-focus")},focusout:function(e){c(e.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(e,t,i){var n,r,a=this.options[e];if(i=i||{},(t=c.Event(t)).type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),t.target=this.element[0],r=t.originalEvent)for(n in r)n in t||(t[n]=r[n]);
1return this.element.trigger(t,i),!(c.isFunction(a)&&!1===a.apply(this.element[0],[t].concat(i))||t.isDefaultPrevented())}},c.each({show:"fadeIn",hide:"fadeOut"},function(a,s){c.Widget.prototype["_"+a]=function(t,e,i){"string"==typeof e&&(e={effect:e});var n,r=e?!0!==e&&"number"!=typeof e&&e.effect||s:a;"number"==typeof(e=e||{})&&(e={duration:e}),n=!c.isEmptyObject(e),e.complete=i,e.delay&&t.delay(e.delay),n&&c.effects&&c.effects.effect[r]?t[a](e):r!==a&&t[r]?t[r](e.duration,e.easing,i):t.queue(function(e){c(this)[a](),i&&i.call(t[0]),e()})}}),c.widget}),function(s){"use strict";s.widget("aerolab.midnight",{options:{headerClass:"midnightHeader",innerClass:"midnightInner",defaultClass:"default",classPrefix:""},_headers:{},_headerInfo:{top:0,height:0},_$sections:[],_sections:[],_scrollTop:0,_documentHeight:0,_transformMode:!1,refresh:function(){this._headerInfo={top:0,height:this.element.outerHeight()},this._$sections=s("[data-midnight]"),this._sections=[],this._setupHeaders(),this.recalculate()},_create:function(){var e=this;this._scrollTop=window.pageYOffset||document.documentElement.scrollTop,this._documentHeight=s(document).height(),this._headers={},this._transformMode=this._getSupportedTransform(),this.refresh(),setInterval(function(){e._recalculateSections()},1e3),e.recalculate(),s(window).resize(function(){e.recalculate()}),this._updateHeadersLoop()},recalculate:function(){this._recalculateSections(),this._updateHeaderHeight(),this._recalculateHeaders(),this._updateHeaders()},_getSupportedTransform:function(){for(var e=["transform","WebkitTransform","MozTransform","OTransform","msTransform"],t=0;t<e.length;t++)if(void 0!==document.createElement("div").style[e[t]])return e[t];return!1},_getContainerHeight:function(){var e=this.element.find("> ."+this.options.headerClass),i=0,n=0,r=this;return e.length?e.each(function(){var e=s(this),t=e.find("> ."+r.options.innerClass);t.length?(t.css("bottom","auto").css("overflow","auto"),n=t.outerHeight(),t.css("bottom","0")):(e.css("bottom","auto"),n=e.outerHeight(),e.css("bottom","0")),i=i<n?n:i}):i=n=this.element.outerHeight(),i},_setupHeaders:function(){var n=this;this._headers[this.options.defaultClass]={},this._$sections.each(function(){var e=s(this).data("midnight");"string"!=typeof e||""!==(e=e.trim())&&(n._headers[e]={})}),this.element.css("padding-top"),this.element.css("padding-right"),this.element.css("padding-bottom"),this.element.css("padding-left"),this.element.css({position:"fixed",top:0,left:0,right:0,overflow:"hidden"}),this._updateHeaderHeight(),(e=this.element.find("> ."+this.options.headerClass)).length?e.filter("."+this.options.defaultClass).length||e.filter("."+this.options.headerClass+":first").clone(!0,!0).attr("class",this.options.headerClass+" "+this.options.defaultClass):this.element.wrapInner('<div class="'+this.options.headerClass+" "+this.options.defaultClass+'"></div>');var e,t=(e=this.element.find("> ."+this.options.headerClass)).filter("."+this.options.defaultClass).clone(!0,!0);for(var i in this._headers)if(this._headers.hasOwnProperty(i)&&void 0===this._headers[i].element){var r=e.filter("."+i);r.length?this._headers[i].element=r:this._headers[i].element=t.clone(!0,!0).removeClass(this.options.defaultClass).addClass(i).appendTo(this.element);var a={position:"absolute",overflow:"hidden",top:0,left:0,right:0,bottom:0};this._headers[i].element.css(a),!1!==this._transformMode&&this._headers[i].element.css(this._transformMode,"translateZ(0)"),this._headers[i].element.find("> ."+this.options.innerClass).length||this._headers[i].element.wrapInner('<div class="'+this.options.innerClass+'"></div>'),this._headers[i].inner=this._headers[i].element.find("> ."+this.options.innerClass),this._headers[i].inner.css(a),!1!==this._transformMode&&this._headers[i].inner.css(this._transformMode,"translateZ(0)"),this._headers[i].from="",this._headers[i].progress=0}e.each(function(){var e=s(this),t=!1;for(var i in n._headers)n._headers.hasOwnProperty(i)&&e.hasClass(i)&&(t=!0);e.find("> ."+n.options.innerClass).length||e.wrapInner('<div class="'+n.options.innerClass+'"></div>'),t?e.show():e.hide()})},_recalculateHeaders:function(){this._scrollTop=window.pageYOffset||document.body.scrollTop||document.documentElement.scrollTop,this._scrollTop=Math.max(this._scrollTop,0),this._scrollTop=Math.min(this._scrollTop,this._documentHeight);var e=this._headerInfo.height,t=this._scrollTop+this._headerInfo.top,i=t+e;if("function"==typeof window.getComputedStyle){var n=window.getComputedStyle(this.element[0],null),r=0,a=0;if(!1!==this._transformMode&&"string"==typeof n.transform){var s=n.transform.match(/(-?[0-9\.]+)/g);null!==s&&6<=s.length&&!isNaN(parseFloat(s[5]))&&(a=parseFloat(s[5]))}0<=n.top.indexOf("px")&&!isNaN(parseFloat(n.top))&&(r=parseFloat(n.top)),t+=r+a,i+=r+a}for(var o in this._headers)this._headers.hasOwnProperty(o)&&(this._headers[o].from="",this._headers[o].progress=0);for(var l=0;l<this._sections.length;l++)i>=this._sections[l].start&&t<=this._sections[l].end&&(this._headers[this._sections[l].className].visible=!0,t>=this._sections[l].start&&i<=this._sections[l].end?(this._headers[this._sections[l].className].from="top",this._headers[this._sections[l].className].progress+=1):i>this._sections[l].end&&t<this._sections[l].end?(this._headers[this._sections[l].className].from="top",this._headers[this._sections[l].className].progress=1-(i-this._sections[l].end)/e):i>this._sections[l].start&&t<this._sections[l].start&&("top"===this._headers[this._sections[l].className].from?this._headers[this._sections[l].className].progress+=(i-this._sections[l].start)/e:(this._headers[this._sections[l].className].from="bottom",this._headers[this._sections[l].className].progress=(i-this._sections[l].start)/e)))},_updateHeaders:function(){if(void 0!==this._headers[this.options.defaultClass]){var e=0,t="";for(var i in this._headers)this._headers.hasOwnProperty(i)&&""!==!this._headers[i].from&&(e+=this._headers[i].progress,t=i);for(var n in e<1&&(""===this._headers[this.options.defaultClass].from?(this._headers[this.options.defaultClass].from="top"===this._headers[t].from?"bottom":"top",this._headers[this.options.defaultClass].progress=1-e):this._headers[this.options.defaultClass].progress+=1-e),this._headers)if(this._headers.hasOwnProperty(n)&&""!==!this._headers[n].from){var r=100*(1-this._headers[n].progress);100<=r&&(r=110),r<=-100&&(r=-110),"top"===this._headers[n].from?!1!==this._transformMode?(this._headers[n].element[0].style[this._transformMode]="translateY(-"+r+"%) translateZ(0)",this._headers[n].inner[0].style[this._transformMode]="translateY(+"+r+"%) translateZ(0)"):(this._headers[n].element[0].style.top="-"+r+"%",this._headers[n].inner[0].style.top="+"+r+"%"):!1!==this._transformMode?(this._headers[n].element[0].style[this._transformMode]="translateY(+"+r+"%) translateZ(0)",this._headers[n].inner[0].style[this._transformMode]="translateY(-"+r+"%) translateZ(0)"):(this._headers[n].element[0].style.top="+"+r+"%",this._headers[n].inner[0].style.top="-"+r+"%")}}},_recalculateSections:function(){this._documentHeight=s(document).height(),this._sections=[];for(var e=0;e<this._$sections.length;e++){var t=s(this._$sections[e]);this._sections.push({element:t,className:t.data("midnight"),start:t.offset().top,end:t.offset().top+t.outerHeight()})}},_updateHeaderHeight:function(){this._headerInfo.height=this._getContainerHeight(),this.element.css("height",this._headerInfo.height+"px")},_updateHeadersLoop:function(){var e=this;this._requestAnimationFrame(function(){e._updateHeadersLoop()}),this._recalculateHeaders(),this._updateHeaders()},_requestAnimationFrame:function(e){var t=t||window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)};t(e)}})}(jQuery),function(e,t){"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?module.exports=t():e.salvattore=t()}(this,function(){return window.matchMedia||(window.matchMedia=function(){"use strict";var t=window.styleMedia||window.media;if(!t){var i,n=document.createElement("style"),e=document.getElementsByTagName("script")[0];n.type="text/css",n.id="matchmediajs-test",e.parentNode.insertBefore(n,e),i="getComputedStyle"in window&&window.getComputedStyle(n,null)||n.currentStyle,t={matchMedium:function(e){var t="@media "+e+"{ #matchmediajs-test { width: 1px; } }";return n.styleSheet?n.styleSheet.cssText=t:n.textContent=t,"1px"===i.width}}}return function(e){return{matches:t.matchMedium(e||"all"),media:e||"all"}}}()),function(){"use strict";if(!window.matchMedia||!window.matchMedia("all").addListener){var o=window.matchMedia,r=o("only all").matches,a=!1,t=0,l=[],s=function(e){clearTimeout(t),t=setTimeout(function(){for(var e=0,t=l.length;e<t;e++){var i=l[e].mql,n=l[e].listeners||[],r=o(i.media).matches;if(r!==i.matches){i.matches=r;for(var a=0,s=n.length;a<s;a++)n[a].call(window,i)}}},30)};window.matchMedia=function(e){var t=o(e),n=[],i=0;return t.addListener=function(e){r&&(a||(a=!0,window.addEventListener("resize",s,!0)),0===i&&(i=l.push({mql:t,listeners:n})),n.push(e))},t.removeListener=function(e){for(var t=0,i=n.length;t<i;t++)n[t]===e&&n.splice(t,1)},t}}}(),function(){"use strict";
vendor: 6,233 bytes, line 1
1for(var a=0,e=["ms","moz","webkit","o"],t=0;t<e.length&&!window.requestAnimationFrame;++t)window.requestAnimationFrame=window[e[t]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[e[t]+"CancelAnimationFrame"]||window[e[t]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(window.requestAnimationFrame=function(e,t){var i=(new Date).getTime(),n=Math.max(0,16-(i-a)),r=window.setTimeout(function(){e(i+n)},n);return a=i+n,r}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(e){clearTimeout(e)})}(),"function"!=typeof window.CustomEvent&&function(){"use strict";function e(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};var i=document.createEvent("CustomEvent");return i.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),i}e.prototype=window.Event.prototype,window.CustomEvent=e}(),function(o,u){"use strict";function c(e,t,i){e.dataset?e.dataset[t]=i:e.setAttribute("data-"+t,i)}var h={},n=[],r=[],a=[];return h.obtainGridSettings=function(e){var t=o.getComputedStyle(e,":before").getPropertyValue("content").slice(1,-1),i=t.match(/^\s*(\d+)(?:\s?\.(.+))?\s*$/),n=1,r=[];return i?(n=i[1],r=(r=i[2])?r.split("."):["column"]):(i=t.match(/^\s*\.(.+)\s+(\d+)\s*$/))&&(r=i[1],n=(n=i[2])&&n.split(".")),{numberOfColumns:n,columnClasses:r}},h.addColumns=function(e,t){for(var i,n=h.obtainGridSettings(e),r=n.numberOfColumns,a=n.columnClasses,s=new Array(+r),o=u.createDocumentFragment(),l=r;0!=l--;)i="[data-columns] > *:nth-child("+r+"n-"+l+")",s.push(t.querySelectorAll(i));s.forEach(function(e){var t=u.createElement("div"),i=u.createDocumentFragment();t.className=a.join(" "),Array.prototype.forEach.call(e,function(e){i.appendChild(e)}),t.appendChild(i),o.appendChild(t)}),e.appendChild(o),c(e,"columns",r)},h.removeColumns=function(e){var t=u.createRange();t.selectNodeContents(e);var i=Array.prototype.filter.call(t.extractContents().childNodes,function(e){return e instanceof o.HTMLElement}),n=i.length,r=i[0].childNodes.length,a=new Array(r*n);Array.prototype.forEach.call(i,function(e,i){Array.prototype.forEach.call(e.children,function(e,t){a[t*n+i]=e})});var s=u.createElement("div");return c(s,"columns",0),a.filter(function(e){return!!e}).forEach(function(e){s.appendChild(e)}),s},h.recreateColumns=function(t){o.requestAnimationFrame(function(){h.addColumns(t,h.removeColumns(t));var e=new CustomEvent("columnsChange");t.dispatchEvent(e)})},h.mediaQueryChange=function(e){e.matches&&Array.prototype.forEach.call(n,h.recreateColumns)},h.getCSSRules=function(e){var t;try{t=e.sheet.cssRules||e.sheet.rules}catch(e){return[]}return t||[]},h.getStylesheets=function(){var i=Array.prototype.slice.call(u.querySelectorAll("style"));return i.forEach(function(e,t){"text/css"!==e.type&&""!==e.type&&i.splice(t,1)}),Array.prototype.concat.call(i,Array.prototype.slice.call(u.querySelectorAll("link[rel='stylesheet']")))},h.mediaRuleHasColumnsSelector=function(e){var t,i;try{t=e.length}catch(e){t=0}for(;t--;)if((i=e[t]).selectorText&&i.selectorText.match(/\[data-columns\](.*)::?before$/))return!0;return!1},h.scanMediaQueries=function(){var t=[];if(o.matchMedia){h.getStylesheets().forEach(function(e){Array.prototype.forEach.call(h.getCSSRules(e),function(e){try{e.media&&e.cssRules&&h.mediaRuleHasColumnsSelector(e.cssRules)&&t.push(e)}catch(e){}})});var i=r.filter(function(e){return-1===t.indexOf(e)});a.filter(function(e){return-1!==i.indexOf(e.rule)}).forEach(function(e){e.mql.removeListener(h.mediaQueryChange)}),a=a.filter(function(e){return-1===i.indexOf(e.rule)}),t.filter(function(e){return-1==r.indexOf(e)}).forEach(function(e){var t=o.matchMedia(e.media.mediaText);t.addListener(h.mediaQueryChange),a.push({rule:e,mql:t})}),r.length=0,r=t}},h.rescanMediaQueries=function(){h.scanMediaQueries(),Array.prototype.forEach.call(n,h.recreateColumns)},h.nextElementColumnIndex=function(e,t){var i,n,r=e.children,a=r.length,s=0,o=0;for(n=0;n<a;n++)i=r[n].children.length+(t[n].children||t[n].childNodes).length,0===s&&(s=i),i<s&&(o=n,s=i);return o},h.createFragmentsList=function(e){for(var t=new Array(e),i=0;i!==e;)t[i]=u.createDocumentFragment(),i++;return t},h.appendElements=function(i,e){var t=i.children,n=t.length,r=h.createFragmentsList(n);Array.prototype.forEach.call(e,function(e){var t=h.nextElementColumnIndex(i,r);r[t].appendChild(e)}),Array.prototype.forEach.call(t,function(e,t){e.appendChild(r[t])})},h.prependElements=function(e,t){var i=e.children,n=i.length,r=h.createFragmentsList(n),a=n-1;t.forEach(function(e){var t=r[a];t.insertBefore(e,t.firstChild),0===a?a=n-1:a--}),Array.prototype.forEach.call(i,function(e,t){e.insertBefore(r[t],e.firstChild)});for(var s=u.createDocumentFragment(),o=t.length%n;0!=o--;)s.appendChild(e.lastChild);e.insertBefore(s,e.firstChild)},h.registerGrid=function(e){if("none"!==o.getComputedStyle(e).display){var t=u.createRange();t.selectNodeContents(e);var i=u.createElement("div");i.appendChild(t.extractContents()),c(i,"columns",0),h.addColumns(e,i),n.push(e)}},h.init=function(){var e=u.createElement("style");e.innerHTML="[data-columns]::before{display:block;visibility:hidden;position:absolute;font-size:1px;}",u.head.appendChild(e);var t=u.querySelectorAll("[data-columns]");Array.prototype.forEach.call(t,h.registerGrid),h.scanMediaQueries()},h.init(),{appendElements:h.appendElements,prependElements:h.prependElements,registerGrid:h.registerGrid,recreateColumns:h.recreateColumns,rescanMediaQueries:h.rescanMediaQueries,init:h.init,append_elements:h.appendElements,prepend_elements:h.prependElements,register_grid:h.registerGrid,recreate_columns:h.recreateColumns,rescan_media_queries:h.rescanMediaQueries}}(window,window.document)}),function(e,t){"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():e.ScrollMagic=t()}(this,function(){"use strict";function j(){R.log(2,"(COMPATIBILITY NOTICE) -> As of ScrollMagic 2.0.0 you need to use 'new ScrollMagic.Controller()' to create a new controller instance. Use 'new ScrollMagic.Scene()' to instance a scene.")}j.version="2.0.7",window.addEventListener("mousewheel",function(){});var k="data-scrollmagic-pin-spacer";j.Controller=function(e){function t(){if(m&&h){var i=R.type.Array(h)?h:c.slice(0);h=!1;var e=d,t=(d=l.scrollPos())-e;
10!=t&&(p=0<t?"FORWARD":s),p===s&&i.reverse(),i.forEach(function(e,t){T(3,"updating Scene "+(t+1)+"/"+i.length+" ("+c.length+" total)"),e.update(!0)}),0===i.length&&3<=u.loglevel&&T(3,"updating 0 Scenes (nothing added to controller)")}}function n(){i=R.rAF(t)}var i,r,a="ScrollMagic.Controller",s="REVERSE",o=x.defaults,l=this,u=R.extend({},o,e),c=[],h=!1,d=0,p="PAUSED",f=!0,g=0,m=!0,v=function(){0<u.refreshInterval&&(r=window.setTimeout(b,u.refreshInterval))},y=function(){return u.vertical?R.get.scrollTop(u.container):R.get.scrollLeft(u.container)},_=function(){return u.vertical?R.get.height(u.container):R.get.width(u.container)},M=this._setScrollPos=function(e){u.vertical?f?window.scrollTo(R.get.scrollLeft(),e):u.container.scrollTop=e:f?window.scrollTo(e,R.get.scrollTop()):u.container.scrollLeft=e},w=function(e){T(3,"event fired causing an update:",e.type),"resize"==e.type&&(g=_(),p="PAUSED"),!0!==h&&(h=!0,n())},b=function(){if(!f&&g!=_()){var t;try{t=new Event("resize",{bubbles:!1,cancelable:!1})}catch(e){(t=document.createEvent("Event")).initEvent("resize",!1,!1)}u.container.dispatchEvent(t)}c.forEach(function(e,t){e.refresh()}),v()},T=this._log=function(e,t){u.loglevel>=e&&(Array.prototype.splice.call(arguments,1,0,"("+a+") ->"),R.log.apply(window,arguments))};this._options=u;function A(e){if(e.length<=1)return e;var t=e.slice(0);return t.sort(function(e,t){return e.scrollOffset()>t.scrollOffset()?1:-1}),t}return this.addScene=function(e){if(R.type.Array(e))e.forEach(function(e,t){l.addScene(e)});else if(e instanceof j.Scene){if(e.controller()!==l)e.addTo(l);else if(c.indexOf(e)<0){for(var t in c.push(e),c=A(c),e.on("shift.controller_sort",function(){c=A(c)}),u.globalSceneOptions)e[t]&&e[t].call(e,u.globalSceneOptions[t]);T(3,"adding Scene (now "+c.length+" total)")}}else T(1,"ERROR: invalid argument supplied for '.addScene()'");return l},this.removeScene=function(e){if(R.type.Array(e))e.forEach(function(e,t){l.removeScene(e)});else{var t=c.indexOf(e);-1<t&&(e.off("shift.controller_sort"),c.splice(t,1),T(3,"removing Scene (now "+c.length+" left)"),e.remove())}return l},this.updateScene=function(e,i){return R.type.Array(e)?e.forEach(function(e,t){l.updateScene(e,i)}):i?e.update(!0):!0!==h&&e instanceof j.Scene&&(-1==(h=h||[]).indexOf(e)&&h.push(e),h=A(h),n()),l},this.update=function(e){return w({type:"resize"}),e&&t(),l},this.scrollTo=function(e,t){if(R.type.Number(e))M.call(u.container,e,t);else if(e instanceof j.Scene)e.controller()===l?l.scrollTo(e.scrollOffset(),t):T(2,"scrollTo(): The supplied scene does not belong to this controller. Scroll cancelled.",e);else if(R.type.Function(e))M=e;else{var i=R.get.elements(e)[0];if(i){for(;i.parentNode.hasAttribute(k);)i=i.parentNode;var n=u.vertical?"top":"left",r=R.get.offset(u.container),a=R.get.offset(i);f||(r[n]-=l.scrollPos()),l.scrollTo(a[n]-r[n],t)}else T(2,"scrollTo(): The supplied argument is invalid. Scroll cancelled.",e)}return l},this.scrollPos=function(e){return arguments.length?(R.type.Function(e)?y=e:T(2,"Provided value for method 'scrollPos' is not a function. To change the current scroll position use 'scrollTo()'."),l):y.call(l)},this.info=function(e){var t={size:g,vertical:u.vertical,scrollPos:d,scrollDirection:p,container:u.container,isDocument:f};return arguments.length?void 0!==t[e]?t[e]:void T(1,'ERROR: option "'+e+'" is not available'):t},this.loglevel=function(e){return arguments.length?(u.loglevel!=e&&(u.loglevel=e),l):u.loglevel},this.enabled=function(e){return arguments.length?(m!=e&&(m=!!e,l.updateScene(c,!0)),l):m},this.destroy=function(e){window.clearTimeout(r);for(var t=c.length;t--;)c[t].destroy(e);return u.container.removeEventListener("resize",w),u.container.removeEventListener("scroll",w),R.cAF(i),T(3,"destroyed "+a+" (reset: "+(e?"true":"false")+")"),null},function(){for(var e in u)o.hasOwnProperty(e)||(T(2,'WARNING: Unknown option "'+e+'"'),delete u[e]);if(u.container=R.get.elements(u.container)[0],!u.container)throw T(1,"ERROR creating object "+a+": No valid scroll container supplied"),a+" init failed.";(f=u.container===window||u.container===document.body||!document.body.contains(u.container))&&(u.container=window),g=_(),u.container.addEventListener("resize",w),u.container.addEventListener("scroll",w);var t=parseInt(u.refreshInterval,10);
1u.refreshInterval=R.type.Number(t)?t:o.refreshInterval,v(),T(3,"added new "+a+" controller (v"+j.version+")")}(),l};var x={defaults:{container:window,vertical:!0,globalSceneOptions:{},loglevel:2,refreshInterval:100}};j.Controller.addOption=function(e,t){x.defaults[e]=t},j.Controller.extend=function(e){var t=this;j.Controller=function(){return t.apply(this,arguments),this.$super=R.extend({},this),e.apply(this,arguments)||this},R.extend(j.Controller,t),j.Controller.prototype=t.prototype,j.Controller.prototype.constructor=j.Controller},j.Scene=function(e){var i,l,n="ScrollMagic.Scene",u="BEFORE",c="DURING",h="AFTER",r=P.defaults,d=this,p=R.extend({},r,e),f=u,g=0,o={start:0,end:0},m=0,a=!0,s={};this.on=function(e,r){return R.type.Function(r)?(e=e.trim().split(" ")).forEach(function(e){var t=e.split("."),i=t[0],n=t[1];"*"!=i&&(s[i]||(s[i]=[]),s[i].push({namespace:n||"",callback:r}))}):v(1,"ERROR when calling '.on()': Supplied callback for '"+e+"' is not a valid function!"),d},this.off=function(e,a){return e?(e=e.trim().split(" ")).forEach(function(e,t){var i=e.split("."),n=i[0],r=i[1]||"";("*"===n?Object.keys(s):[n]).forEach(function(e){for(var t=s[e]||[],i=t.length;i--;){var n=t[i];!n||r!==n.namespace&&"*"!==r||a&&a!=n.callback||t.splice(i,1)}t.length||delete s[e]})}):v(1,"ERROR: Invalid event name supplied."),d},this.trigger=function(e,i){if(e){var t=e.trim().split("."),n=t[0],r=t[1],a=s[n];v(3,"event fired:",n,i?"->":"",i||""),a&&a.forEach(function(e,t){r&&r!==e.namespace||e.callback.call(d,new j.Event(n,e.namespace,d,i))})}else v(1,"ERROR: Invalid event name supplied.");return d},d.on("change.internal",function(e){"loglevel"!==e.what&&"tweenChanges"!==e.what&&("triggerElement"===e.what?w():"reverse"===e.what&&d.update())}).on("shift.internal",function(e){t(),d.update()});var v=this._log=function(e,t){p.loglevel>=e&&(Array.prototype.splice.call(arguments,1,0,"("+n+") ->"),R.log.apply(window,arguments))};this.addTo=function(e){return e instanceof j.Controller?l!=e&&(l&&l.removeScene(d),l=e,A(),M(!0),w(!0),t(),l.info("container").addEventListener("resize",b),e.addScene(d),d.trigger("add",{controller:l}),v(3,"added "+n+" to controller"),d.update()):v(1,"ERROR: supplied argument of 'addTo()' is not a valid ScrollMagic Controller"),d},this.enabled=function(e){return arguments.length?(a!=e&&(a=!!e,d.update(!0)),d):a},this.remove=function(){if(l){l.info("container").removeEventListener("resize",b);var e=l;l=void 0,e.removeScene(d),d.trigger("remove"),v(3,"removed "+n+" from controller")}return d},this.destroy=function(e){return d.trigger("destroy",{reset:e}),d.remove(),d.off("*.*"),v(3,"destroyed "+n+" (reset: "+(e?"true":"false")+")"),null},this.update=function(e){if(l)if(e)if(l.enabled()&&a){var t,i=l.info("scrollPos");t=0<p.duration?(i-o.start)/(o.end-o.start):i>=o.start?1:0,d.trigger("update",{startPos:o.start,endPos:o.end,scrollPos:i}),d.progress(t)}else y&&f===c&&C(!0);else l.updateScene(d,!1);return d},this.refresh=function(){return M(),w(),d},this.progress=function(e){if(arguments.length){var t=!1,i=f,n=l?l.info("scrollDirection"):"PAUSED",r=p.reverse||g<=e;if(0===p.duration?(t=g!=e,f=0===(g=e<1&&r?0:1)?u:c):e<0&&f!==u&&r?(f=u,t=!(g=0)):0<=e&&e<1&&r?(g=e,f=c,t=!0):1<=e&&f!==h?(g=1,f=h,t=!0):f!==c||r||C(),t){var a={progress:g,state:f,scrollDirection:n},s=f!=i,o=function(e){d.trigger(e,a)};s&&i!==c&&(o("enter"),o(i===u?"start":"end")),o("progress"),s&&f!==c&&(o(f===u?"start":"end"),o("leave"))}return d}return g};var y,_,t=function(){o={start:m+p.offset},l&&p.triggerElement&&(o.start-=l.info("size")*p.triggerHook),o.end=o.start+p.duration},M=function(e){if(i){var t="duration";x(t,i.call(d))&&!e&&(d.trigger("change",{what:t,newval:p[t]}),d.trigger("shift",{reason:t}))}},w=function(e){var t=0,i=p.triggerElement;if(l&&(i||0<m)){if(i)if(i.parentNode){for(var n=l.info(),r=R.get.offset(n.container),a=n.vertical?"top":"left";i.parentNode.hasAttribute(k);)i=i.parentNode;var s=R.get.offset(i);n.isDocument||(r[a]-=l.scrollPos()),t=s[a]-r[a]}else v(2,"WARNING: triggerElement was removed from DOM and will be reset to",void 0),d.triggerElement(void 0);var o=t!=m;m=t,o&&!e&&d.trigger("shift",{reason:"triggerElementPosition"})}},b=function(e){0<p.triggerHook&&d.trigger("shift",{reason:"containerResize"})},T=R.extend(P.validate,{duration:function(t){if(R.type.String(t)&&t.match(/^(\.|\d)*\d+%$/)){var e=parseFloat(t)/100;t=function(){return l?l.info("size")*e:0}}if(R.type.Function(t)){i=t;
1try{t=parseFloat(i.call(d))}catch(e){t=-1}}if(t=parseFloat(t),!R.type.Number(t)||t<0)throw i?(i=void 0,['Invalid return value of supplied function for option "duration":',t]):['Invalid value for option "duration":',t];return t}}),A=function(e){(e=arguments.length?[e]:Object.keys(T)).forEach(function(t,e){var i;if(T[t])try{i=T[t](p[t])}catch(e){i=r[t];var n=R.type.String(e)?[e]:e;R.type.Array(n)?(n[0]="ERROR: "+n[0],n.unshift(1),v.apply(this,n)):v(1,"ERROR: Problem executing validation callback for option '"+t+"':",e.message)}finally{p[t]=i}})},x=function(e,t){var i=!1,n=p[e];return p[e]!=t&&(p[e]=t,A(e),i=n!=p[e]),i},E=function(t){d[t]||(d[t]=function(e){return arguments.length?("duration"===t&&(i=void 0),x(t,e)&&(d.trigger("change",{what:t,newval:p[t]}),-1<P.shifts.indexOf(t)&&d.trigger("shift",{reason:t})),d):p[t]})};this.controller=function(){return l},this.state=function(){return f},this.scrollOffset=function(){return o.start},this.triggerPosition=function(){var e=p.offset;return l&&(p.triggerElement?e+=m:e+=l.info("size")*d.triggerHook()),e},d.on("shift.internal",function(e){var t="duration"===e.reason;(f===h&&t||f===c&&0===p.duration)&&C(),t&&L()}).on("progress.internal",function(e){C()}).on("add.internal",function(e){L()}).on("destroy.internal",function(e){d.removePin(e.reset)});function S(){l&&y&&f===c&&!l.info("isDocument")&&C()}function D(){l&&y&&f===c&&((_.relSize.width||_.relSize.autoFullWidth)&&R.get.width(window)!=R.get.width(_.spacer.parentNode)||_.relSize.height&&R.get.height(window)!=R.get.height(_.spacer.parentNode))&&L()}function N(e){l&&y&&f===c&&!l.info("isDocument")&&(e.preventDefault(),l._setScrollPos(l.info("scrollPos")-((e.wheelDelta||e[l.info("vertical")?"wheelDeltaY":"wheelDeltaX"])/3||30*-e.detail)))}var C=function(e){if(y&&l){var t=l.info(),i=_.spacer.firstChild;if(e||f!==c){var n={position:_.inFlow?"relative":"absolute",top:0,left:0},r=R.css(i,"position")!=n.position;_.pushFollowers?0<p.duration&&(f===h&&0===parseFloat(R.css(_.spacer,"padding-top"))||f===u&&0===parseFloat(R.css(_.spacer,"padding-bottom")))&&(r=!0):n[t.vertical?"top":"left"]=p.duration*g,R.css(i,n),r&&L()}else{"fixed"!=R.css(i,"position")&&(R.css(i,{position:"fixed"}),L());var a=R.get.offset(_.spacer,!0),s=p.reverse||0===p.duration?t.scrollPos-o.start:Math.round(g*p.duration*10)/10;a[t.vertical?"top":"left"]+=s,R.css(_.spacer.firstChild,{top:a.top,left:a.left})}}},L=function(){if(y&&l&&_.inFlow){var e=f===c,t=l.info("vertical"),i=_.spacer.firstChild,n=R.isMarginCollapseType(R.css(_.spacer,"display")),r={};_.relSize.width||_.relSize.autoFullWidth?e?R.css(y,{width:R.get.width(_.spacer)}):R.css(y,{width:"100%"}):(r["min-width"]=R.get.width(t?y:i,!0,!0),r.width=e?r["min-width"]:"auto"),_.relSize.height?e?R.css(y,{height:R.get.height(_.spacer)-(_.pushFollowers?p.duration:0)}):R.css(y,{height:"100%"}):(r["min-height"]=R.get.height(t?i:y,!0,!n),r.height=e?r["min-height"]:"auto"),_.pushFollowers&&(r["padding"+(t?"Top":"Left")]=p.duration*g,r["padding"+(t?"Bottom":"Right")]=p.duration*(1-g)),R.css(_.spacer,r)}};this.setPin=function(e,t){var i=t&&t.hasOwnProperty("pushFollowers");if(t=R.extend({},{pushFollowers:!0,spacerClass:"scrollmagic-pin-spacer"},t),!(e=R.get.elements(e)[0]))return v(1,"ERROR calling method 'setPin()': Invalid pin element supplied."),d;if("fixed"===R.css(e,"position"))return v(1,"ERROR calling method 'setPin()': Pin does not work with elements that are positioned 'fixed'."),d;if(y){if(y===e)return d;d.removePin()}var n=(y=e).parentNode.style.display,r=["top","left","bottom","right","margin","marginLeft","marginRight","marginTop","marginBottom"];y.parentNode.style.display="none";var a="absolute"!=R.css(y,"position"),s=R.css(y,r.concat(["display"])),o=R.css(y,["width","height"]);y.parentNode.style.display=n,!a&&t.pushFollowers&&(v(2,"WARNING: If the pinned element is positioned absolutely pushFollowers will be disabled."),t.pushFollowers=!1),window.setTimeout(function(){y&&0===p.duration&&i&&t.pushFollowers&&v(2,"WARNING: pushFollowers =",!0,"has no effect, when scene duration is 0.")},0);var l=y.parentNode.insertBefore(document.createElement("div"),y),u=R.extend(s,{position:a?"relative":"absolute",boxSizing:"content-box",mozBoxSizing:"content-box",webkitBoxSizing:"content-box"});if(a||R.extend(u,R.css(y,["width","height"])),R.css(l,u),l.setAttribute(k,""),R.addClass(l,t.spacerClass),_={spacer:l,relSize:{width:"%"===o.width.slice(-1),height:"%"===o.height.slice(-1),autoFullWidth:"auto"===o.width&&a&&R.isMarginCollapseType(s.display)},pushFollowers:t.pushFollowers,inFlow:a},!y.___origStyle){y.___origStyle={};var c=y.style;r.concat(["width","height","position","boxSizing","mozBoxSizing","webkitBoxSizing"]).forEac
1h(function(e){y.___origStyle[e]=c[e]||""})}return _.relSize.width&&R.css(l,{width:o.width}),_.relSize.height&&R.css(l,{height:o.height}),l.appendChild(y),R.css(y,{position:a?"relative":"absolute",margin:"auto",top:"auto",left:"auto",bottom:"auto",right:"auto"}),(_.relSize.width||_.relSize.autoFullWidth)&&R.css(y,{boxSizing:"border-box",mozBoxSizing:"border-box",webkitBoxSizing:"border-box"}),window.addEventListener("scroll",S),window.addEventListener("resize",S),window.addEventListener("resize",D),y.addEventListener("mousewheel",N),y.addEventListener("DOMMouseScroll",N),v(3,"added pin"),C(),d},this.removePin=function(e){if(y){if(f===c&&C(!0),e||!l){var t=_.spacer.firstChild;if(t.hasAttribute(k)){var i=_.spacer.style,n={};["margin","marginLeft","marginRight","marginTop","marginBottom"].forEach(function(e){n[e]=i[e]||""}),R.css(t,n)}_.spacer.parentNode.insertBefore(t,_.spacer),_.spacer.parentNode.removeChild(_.spacer),y.parentNode.hasAttribute(k)||(R.css(y,y.___origStyle),delete y.___origStyle)}window.removeEventListener("scroll",S),window.removeEventListener("resize",S),window.removeEventListener("resize",D),y.removeEventListener("mousewheel",N),y.removeEventListener("DOMMouseScroll",N),y=void 0,v(3,"removed pin (reset: "+(e?"true":"false")+")")}return d};var I,O=[];return d.on("destroy.internal",function(e){d.removeClassToggle(e.reset)}),this.setClassToggle=function(e,t){var i=R.get.elements(e);return 0!==i.length&&R.type.String(t)?(0<O.length&&d.removeClassToggle(),I=t,O=i,d.on("enter.internal_class leave.internal_class",function(e){var i="enter"===e.type?R.addClass:R.removeClass;O.forEach(function(e,t){i(e,I)})})):v(1,"ERROR calling method 'setClassToggle()': Invalid "+(0===i.length?"element":"classes")+" supplied."),d},this.removeClassToggle=function(e){return e&&O.forEach(function(e,t){R.removeClass(e,I)}),d.off("start.internal_class end.internal_class"),I=void 0,O=[],d},function(){for(var e in p)r.hasOwnProperty(e)||(v(2,'WARNING: Unknown option "'+e+'"'),delete p[e]);for(var t in r)E(t);A()}(),d};var P={defaults:{duration:0,offset:0,triggerElement:void 0,triggerHook:.5,reverse:!0,loglevel:2},validate:{offset:function(e){if(e=parseFloat(e),!R.type.Number(e))throw['Invalid value for option "offset":',e];return e},triggerElement:function(e){if(e=e||void 0){var t=R.get.elements(e)[0];if(!t||!t.parentNode)throw['Element defined in option "triggerElement" was not found:',e];e=t}return e},triggerHook:function(e){var t={onCenter:.5,onEnter:1,onLeave:0};if(R.type.Number(e))e=Math.max(0,Math.min(parseFloat(e),1));else{if(!(e in t))throw['Invalid value for option "triggerHook": ',e];e=t[e]}return e},reverse:function(e){return!!e},loglevel:function(e){if(e=parseInt(e),!R.type.Number(e)||e<0||3<e)throw['Invalid value for option "loglevel":',e];return e}},shifts:["duration","offset","triggerHook"]};j.Scene.addOption=function(e,t,i,n){e in P.defaults?j._util.log(1,"[static] ScrollMagic.Scene -> Cannot add Scene option '"+e+"', because it already exists."):(P.defaults[e]=t,P.validate[e]=i,n&&P.shifts.push(e))},j.Scene.extend=function(e){var t=this;j.Scene=function(){return t.apply(this,arguments),this.$super=R.extend({},this),e.apply(this,arguments)||this},R.extend(j.Scene,t),j.Scene.prototype=t.prototype,j.Scene.prototype.constructor=j.Scene},j.Event=function(e,t,i,n){for(var r in n=n||{})this[r]=n[r];return this.type=e,this.target=this.currentTarget=i,this.namespace=t||"",this.timeStamp=this.timestamp=Date.now(),this};var R=j._util=function(s){function o(e){return parseFloat(e)||0}function l(e){return e.currentStyle?e.currentStyle:s.getComputedStyle(e)}function n(e,t,i,n){if((t=t===document?s:t)===s)n=!1;else if(!f.DomElement(t))return 0;e=e.charAt(0).toUpperCase()+e.substr(1).toLowerCase();var r=(i?t["offset"+e]||t["outer"+e]:t["client"+e]||t["inner"+e])||0;if(i&&n){var a=l(t);r+="Height"===e?o(a.marginTop)+o(a.marginBottom):o(a.marginLeft)+o(a.marginRight)}return r}function u(e){return e.replace(/^[^a-z]+([a-z])/g,"$1").replace(/-([a-z])/g,function(e){return e[1].toUpperCase()})}var i,e={};e.extend=function(e){for(e=e||{},i=1;i<arguments.length;
1i++)if(arguments[i])for(var t in arguments[i])arguments[i].hasOwnProperty(t)&&(e[t]=arguments[i][t]);return e},e.isMarginCollapseType=function(e){return-1<["block","flex","list-item","table","-webkit-box"].indexOf(e)};var r=0,t=["ms","moz","webkit","o"],a=s.requestAnimationFrame,c=s.cancelAnimationFrame;for(i=0;!a&&i<t.length;++i)a=s[t[i]+"RequestAnimationFrame"],c=s[t[i]+"CancelAnimationFrame"]||s[t[i]+"CancelRequestAnimationFrame"];a=a||function(e){var t=(new Date).getTime(),i=Math.max(0,16-(t-r)),n=s.setTimeout(function(){e(t+i)},i);return r=t+i,n},c=c||function(e){s.clearTimeout(e)},e.rAF=a.bind(s),e.cAF=c.bind(s);var h=["error","warn","log"],d=s.console||{};for(d.log=d.log||function(){},i=0;i<h.length;i++){var p=h[i];d[p]||(d[p]=d.log)}e.log=function(e){(h.length<e||e<=0)&&(e=h.length);var t=new Date,i=("0"+t.getHours()).slice(-2)+":"+("0"+t.getMinutes()).slice(-2)+":"+("0"+t.getSeconds()).slice(-2)+":"+("00"+t.getMilliseconds()).slice(-3),n=h[e-1],r=Array.prototype.splice.call(arguments,1),a=Function.prototype.bind.call(d[n],d);r.unshift(i),a.apply(d,r)};var f=e.type=function(e){return Object.prototype.toString.call(e).replace(/^\[object (.+)\]$/,"$1").toLowerCase()};f.String=function(e){return"string"===f(e)},f.Function=function(e){return"function"===f(e)},f.Array=function(e){return Array.isArray(e)},f.Number=function(e){return!f.Array(e)&&0<=e-parseFloat(e)+1},f.DomElement=function(e){return"object"==typeof HTMLElement||"function"==typeof HTMLElement?e instanceof HTMLElement||e instanceof SVGElement:e&&"object"==typeof e&&null!==e&&1===e.nodeType&&"string"==typeof e.nodeName};var g=e.get={};return g.elements=function(e){var t=[];if(f.String(e))try{e=document.querySelectorAll(e)}catch(e){return t}if("nodelist"===f(e)||f.Array(e)||e instanceof NodeList)for(var i=0,n=t.length=e.length;i<n;i++){var r=e[i];t[i]=f.DomElement(r)?r:g.elements(r)}else!f.DomElement(e)&&e!==document&&e!==s||(t=[e]);return t},g.scrollTop=function(e){return e&&"number"==typeof e.scrollTop?e.scrollTop:s.pageYOffset||0},g.scrollLeft=function(e){return e&&"number"==typeof e.scrollLeft?e.scrollLeft:s.pageXOffset||0},g.width=function(e,t,i){return n("width",e,t,i)},g.height=function(e,t,i){return n("height",e,t,i)},g.offset=function(e,t){var i={top:0,left:0};if(e&&e.getBoundingClientRect){var n=e.getBoundingClientRect();i.top=n.top,i.left=n.left,t||(i.top+=g.scrollTop(),i.left+=g.scrollLeft())}return i},e.addClass=function(e,t){t&&(e.classList?e.classList.add(t):e.className+=" "+t)},e.removeClass=function(e,t){t&&(e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp("(^|\\b)"+t.split(" ").join("|")+"(\\b|$)","gi")," "))},e.css=function(e,t){if(f.String(t))return l(e)[u(t)];if(f.Array(t)){var i={},n=l(e);return t.forEach(function(e,t){i[e]=n[u(e)]}),i}for(var r in t){var a=t[r];a==parseFloat(a)&&(a+="px"),e.style[u(r)]=a}},e}(window||{});return j.Scene.prototype.addIndicators=function(){return j._util.log(1,"(ScrollMagic.Scene) -> ERROR calling addIndicators() due to missing Plugin 'debug.addIndicators'. Please make sure to include plugins/debug.addIndicators.js"),this},j.Scene.prototype.removeIndicators=function(){return j._util.log(1,"(ScrollMagic.Scene) -> ERROR calling removeIndicators() due to missing Plugin 'debug.addIndicators'. Please make sure to include plugins/debug.addIndicators.js"),this},j.Scene.prototype.setTween=function(){return j._util.log(1,"(ScrollMagic.Scene) -> ERROR calling setTween() due to missing Plugin 'animation.gsap'. Please make sure to include plugins/animation.gsap.js"),this},j.Scene.prototype.removeTween=function(){return j._util.log(1,"(ScrollMagic.Scene) -> ERROR calling removeTween() due to missing Plugin 'animation.gsap'. Please make sure to include plugins/animation.gsap.js"),this},j.Scene.prototype.setVelocity=function(){return j._util.log(1,"(ScrollMagic.Scene) -> ERROR calling setVelocity() due to missing Plugin 'animation.velocity'. Please make sure to include plugins/animation.velocity.js"),this},j.Scene.prototype.removeVelocity=function(){return j._util.log(1,"(ScrollMagic.Scene) -> ERROR calling removeVelocity() due to missing Plugin 'animation.velocity'. Please make sure to include plugins/animation.velocity.js"),this},j}),function(e,t){"function"==typeof define&&define.amd?define(["ScrollMagic","TweenMax","TimelineMax"],t):"object"==typeof exports?(require("gsap"),t(require("scrollmagic"),TweenMax,TimelineMax)):t(e.ScrollMagic||e.jQuery&&e.jQuery.ScrollMagic,e.TweenMax||e.TweenLite,e.TimelineMax||e.TimelineLite)}(this,function(e,g,m){"use strict";var t="animation.gsap",i=window.console||{},n=Function.prototype.bind.call(i.error||i.log||function(){},i);e||n("("+t+") -> ERROR: The ScrollMagic main module could not be found. Please make sure it's loaded before this plugin or use an asynchronous loader like requirejs."),g||n("("+t+") -> ERROR: TweenLite or TweenMax could not be found. Please make sure GSAP is loaded before ScrollMagic or use an asynchronous loader like requirejs."),e.Scene.addOption("tweenChanges",!1,function(e){return!!e}),e.Scene.extend(function(){function h(){p._log&&(Array.prototype.splice.call(arguments,1,0,"("+t+")","->"),p._log.apply(this,arguments))}var d,p=this;p.on("progress.plugin_gsap",function(){f()}),p.on("destroy.plugin_gsap",function(e){p.removeTween(e.reset)});var f=function(){if(d){var e=p.progress(),t=p.state();d.repeat&&-1===d.repeat()?"DURING"===t&&d.paused()?d.play():"DURING"===t||d.paused()||d.pause():e!=d.progress()&&(0===p.duration()?0<e?d.play():d.reverse():p.tweenChanges()&&d.tweenTo?d.tweenTo(e*d.duration()):d.progress(e).pause())}};p.setTween=function(e,t,i){var n;1<arguments.length&&(arguments.length<3&&(i=t,t=1),e=g.to(e,t,i));try{(n=m?new m({smoothChildTiming:!0}).add(e):e).pause()}catch(e){return h(1,"ERROR calling method 'setTween()': Supplied argument is not a valid TweenObject"),p}if(d&&p.removeTween(),d=n,e.repeat&&-1===e.repeat()&&(d.repeat(-1),d.yoyo(e.yoyo())),p.tweenChanges()&&!d.tweenTo&&h(2,"WARNING: tweenChanges will only work if the TimelineMax object is available for ScrollMagic."),d&&p.controller()&&p.triggerElement()&&2<=p.loglevel()){var r=g.getTweensOf(p.triggerElement()),a=p.controller().info("vertical");r.forEach(function(e,t){var i=e.vars.css||e.vars;if(a?void 0!==i.top||void 0!==i.bottom:void 0!==i.left||void 0!==i.right)return h(2,"WARNING: Tweening the position of the trigger element affects the scene timing and should be avoided!"),!1})}if(1.14<=parseFloat(TweenLite.version))for(var s,o,l=d.getChildren?d.getChildren(!0,!0,!1):[d],u=function(){h(2,"WARNING: tween was overwritten by another. To learn how to avoid this issue see here: https://github.com/janpaepke/ScrollMagic/wiki/WARNING:-tween-was-overwritten-by-another")},c=0;c<l.length;c++)s=l[c],o!==u&&(o=s.vars.onOverwrite,s.vars.onOverwrite=function(){o&&o.apply(this,arguments),u.a
vendor: 5,022 bytes, line 1
1pply(this,arguments)});return h(3,"added tween"),f(),p},p.removeTween=function(e){return d&&(e&&d.progress(0).pause(),d.kill(),d=void 0,h(3,"removed tween (reset: "+(e?"true":"false")+")")),p}})}),function(e,t){"function"==typeof define&&define.amd?define(["ScrollMagic"],t):"object"==typeof exports?t(require("scrollmagic")):t(e.ScrollMagic||e.jQuery&&e.jQuery.ScrollMagic)}(this,function(n){"use strict";var v="debug.addIndicators",e=window.console||{},t=Function.prototype.bind.call(e.error||e.log||function(){},e);n||t("("+v+") -> ERROR: The ScrollMagic main module could not be found. Please make sure it's loaded before this plugin or use an asynchronous loader like requirejs.");var y=n._util,_=0;n.Scene.extend(function(){var i,n=this;n.addIndicators=function(e){if(!i){var t={name:"",indent:0,parent:void 0,colorStart:"green",colorEnd:"red",colorTrigger:"blue"};e=y.extend({},t,e),_++,i=new r(n,e),n.on("add.plugin_addIndicators",i.add),n.on("remove.plugin_addIndicators",i.remove),n.on("destroy.plugin_addIndicators",n.removeIndicators),n.controller()&&i.add()}return n},n.removeIndicators=function(){return i&&(i.remove(),this.off("*.plugin_addIndicators"),i=void 0),n}}),n.Controller.addOption("addIndicators",!1),n.Controller.extend(function(){var d=this,e=d.info(),p=e.container,f=e.isDocument,g=e.vertical,m={groups:[]};d._indicators&&function(){d._log&&(Array.prototype.splice.call(arguments,1,0,"("+v+")","->"),d._log.apply(this,arguments))}(2,"WARNING: Scene already has a property '_indicators', which will be overwritten by plugin."),this._indicators=m;function t(){m.updateBoundsPositions()}function i(){m.updateTriggerGroupPositions()}return p.addEventListener("resize",i),f||(window.addEventListener("resize",i),window.addEventListener("scroll",i)),p.addEventListener("resize",t),p.addEventListener("scroll",t),this._indicators.updateBoundsPositions=function(e){for(var t,i,n,r=e?[y.extend({},e.triggerGroup,{members:[e]})]:m.groups,a=r.length,s={},o=g?"left":"top",l=g?"width":"height",u=g?y.get.scrollLeft(p)+y.get.width(p)-15:y.get.scrollTop(p)+y.get.height(p)-15;a--;)for(t=(n=r[a]).members.length,i=y.get[l](n.element.firstChild);t--;)s[o]=u-i,y.css(n.members[t].bounds,s)},this._indicators.updateTriggerGroupPositions=function(e){for(var t,i,n,r,a=e?[e]:m.groups,s=a.length,o=f?document.body:p,l=f?{top:0,left:0}:y.get.offset(o,!0),u=g?y.get.width(p)-15:y.get.height(p)-15,c=g?"width":"height",h=g?"Y":"X";s--;)i=(t=a[s]).element,n=t.triggerHook*d.info("size"),r=y.get[c](i.firstChild.firstChild)<n?"translate"+h+"(-100%)":"",y.css(i,{top:l.top+(g?n:u-t.members[0].options.indent),left:l.left+(g?u-t.members[0].options.indent:n)}),y.css(i.firstChild.firstChild,{"-ms-transform":r,"-webkit-transform":r,transform:r})},this._indicators.updateTriggerGroupLabel=function(e){var t="trigger"+(1<e.members.length?"":" "+e.members[0].options.name),i=e.element.firstChild.firstChild;i.textContent!==t&&(i.textContent=t,g&&m.updateBoundsPositions())},this.addScene=function(e){this._options.addIndicators&&e instanceof n.Scene&&e.controller()===d&&e.addIndicators(),this.$super.addScene.apply(this,arguments)},this.destroy=function(){p.removeEventListener("resize",i),f||(window.removeEventListener("resize",i),window.removeEventListener("scroll",i)),p.removeEventListener("resize",t),p.removeEventListener("scroll",t),this.$super.destroy.apply(this,arguments)},d});var r=function(r,a){function t(){r._log&&(Array.prototype.splice.call(arguments,1,0,"("+v+")","->"),r._log.apply(this,arguments))}var s,o,l=this,i=M.bounds(),n=M.start(a.colorStart),u=M.end(a.colorEnd),c=a.parent&&y.get.elements(a.parent)[0];a.name=a.name||_,n.firstChild.textContent+=" "+a.name,u.textContent+=" "+a.name,i.appendChild(n),i.appendChild(u),l.options=a,l.bounds=i,l.triggerGroup=void 0,this.add=function(){o=r.controller(),s=o.info("vertical");var e=o.info("isDocument");c=c||(e?document.body:o.info("container")),e||"static"!==y.css(c,"position")||y.css(c,{position:"relative"}),r.on("change.plugin_addIndicators",d),r.on("shift.plugin_addIndicators",h),m(),f(),setTimeout(function(){o._indicators.updateBoundsPositions(l)},0),t(3,"added indicators")},this.remove=function(){if(l.triggerGroup){if(r.off("change.plugin_addIndicators",d),r.off("shift.plugin_addIndicators",h),1<l.triggerGroup.members.length){var e=l.triggerGroup;e.members.splice(e.members.indexOf(l),1),o._indicators.updateTriggerGroupLabel(e),o._indicators.updateTriggerGroupPositions(e),l.triggerGroup=void 0}else g();p(),t(3,"removed indicators")}};var h=function(){f()},d=function(e){"triggerHook"===e.what&&m()},p=function(){i.parentNode.removeChild(i)},f=function(){var e;i.parentNode!==c&&(e=o.info("vertical"),y.css(n.firstChild,{"border-bottom-width":e?1:0,"border-right-width":e?0:1,bottom:e?-1:a.indent,right:e?a.indent:-1,padding:e?"0 8px":"2px 4px"}),y.css(u,{"border-top-width":e?1:0,"border-left-width":e?0:1,top:e?"100%":"",right:e?a.indent:"",bottom:e?"":a.indent,left:e?"":"100%",padding:e?"0 8px":"2px 4px"}),c.appendChild(i));var t={};
1t[s?"top":"left"]=r.triggerPosition(),t[s?"height":"width"]=r.duration(),y.css(i,t),y.css(u,{display:0<r.duration()?"":"none"})},g=function(){o._indicators.groups.splice(o._indicators.groups.indexOf(l.triggerGroup),1),l.triggerGroup.element.parentNode.removeChild(l.triggerGroup.element),l.triggerGroup=void 0},m=function(){var e=r.triggerHook();if(!(l.triggerGroup&&Math.abs(l.triggerGroup.triggerHook-e)<1e-4)){for(var t,i=o._indicators.groups,n=i.length;n--;)if(t=i[n],Math.abs(t.triggerHook-e)<1e-4)return l.triggerGroup&&(1===l.triggerGroup.members.length?g():(l.triggerGroup.members.splice(l.triggerGroup.members.indexOf(l),1),o._indicators.updateTriggerGroupLabel(l.triggerGroup),o._indicators.updateTriggerGroupPositions(l.triggerGroup))),t.members.push(l),l.triggerGroup=t,void o._indicators.updateTriggerGroupLabel(t);if(l.triggerGroup){if(1===l.triggerGroup.members.length)return l.triggerGroup.triggerHook=e,void o._indicators.updateTriggerGroupPositions(l.triggerGroup);l.triggerGroup.members.splice(l.triggerGroup.members.indexOf(l),1),o._indicators.updateTriggerGroupLabel(l.triggerGroup),o._indicators.updateTriggerGroupPositions(l.triggerGroup),l.triggerGroup=void 0}!function(){var e=M.trigger(a.colorTrigger),t={};t[s?"right":"bottom"]=0,t[s?"border-top-width":"border-left-width"]=1,y.css(e.firstChild,t),y.css(e.firstChild.firstChild,{padding:s?"0 8px 3px 8px":"3px 4px"}),document.body.appendChild(e);var i={triggerHook:r.triggerHook(),element:e,members:[l]};o._indicators.groups.push(i),l.triggerGroup=i,o._indicators.updateTriggerGroupLabel(i),o._indicators.updateTriggerGroupPositions(i)}()}}},M={start:function(e){var t=document.createElement("div");t.textContent="start",y.css(t,{position:"absolute",overflow:"visible","border-width":0,"border-style":"solid",color:e,"border-color":e});var i=document.createElement("div");return y.css(i,{position:"absolute",overflow:"visible",width:0,height:0}),i.appendChild(t),i},end:function(e){var t=document.createElement("div");return t.textContent="end",y.css(t,{position:"absolute",overflow:"visible","border-width":0,"border-style":"solid",color:e,"border-color":e}),t},bounds:function(){var e=document.createElement("div");return y.css(e,{position:"absolute",overflow:"visible","white-space":"nowrap","pointer-events":"none","font-size":"0.85em"}),e.style.zIndex="9999",e},trigger:function(e){var t=document.createElement("div");t.textContent="trigger",y.css(t,{position:"relative"});var i=document.createElement("div");y.css(i,{position:"absolute",overflow:"visible","border-width":0,"border-style":"solid",color:e,"border-color":e}),i.appendChild(t);var n=document.createElement("div");return y.css(n,{position:"fixed",overflow:"visible","white-space":"nowrap","pointer-events":"none","font-size":"0.85em"}),n.style.zIndex="9999",n.appendChild(i),n}}}),function(i){"function"==typeof define&&define.amd?define(["jquery"],i):"object"==typeof module&&module.exports?module.exports=function(e,t){return void 0===t&&(t="undefined"!=typeof window?require("jquery"):require("jquery")(e)),i(t),t}:i(jQuery)}(function(c){var e=function(){if(c&&c.fn&&c.fn.select2&&c.fn.select2.amd)var e=c.fn.select2.amd;var t,i,n,p,a,s,f,g,m,v,y,_,r,o,M;function w(e,t){return r.call(e,t)}function l(e,t){var i,n,r,a,s,o,l,u,c,h,d,p=t&&t.split("/"),f=y.map,g=f&&f["*"]||{};if(e){for(s=(e=e.split("/")).length-1,y.nodeIdCompat&&M.test(e[s])&&(e[s]=e[s].replace(M,"")),"."===e[0].charAt(0)&&p&&(e=p.slice(0,p.length-1).concat(e)),c=0;c<e.length;c++)if("."===(d=e[c]))e.splice(c,1),--c;else if(".."===d){if(0===c||1===c&&".."===e[2]||".."===e[c-1])continue;0<c&&(e.splice(c-1,2),c-=2)}e=e.join("/")}if((p||g)&&f){for(c=(i=e.split("/")).length;0<c;--c){if(n=i.slice(0,c).join("/"),p)for(h=p.length;0<h;--h)if(r=(r=f[p.slice(0,h).join("/")])&&r[n]){a=r,o=c;break}if(a)break;!l&&g&&g[n]&&(l=g[n],u=c)}!a&&l&&(a=l,o=u),a&&(i.splice(0,o,a),e=i.join("/"))}return e}function b(t,i){return function(){var e=o.call(arguments,0);return"string"!=typeof e[0]&&1===e.length&&e.push(null),s.apply(p,e.concat([t,i]))}}function T(t){return function(e){m[t]=e}}function A(e){if(w(v,e)){var t=v[e];delete v[e],_[e]=!0,a.apply(p,t)}if(!w(m,e)&&!w(_,e))throw new Error("No "+e);return m[e]}function u(e){var t,i=e?e.indexOf("!"):-1;return-1<i&&(t=e.substring(0,i),e=e.substring(i+1,e.length)),[t,e]}function x(e){return e?u(e):[]}return e&&e.requirejs||(e?i=e:e={},m={},v={},y={},_={},r=Object.prototype.hasOwnProperty,o=[].slice,M=/\.js$/,f=function(e,t){var i,n,r=u(e),a=r[0],s=t[1];return e=r[1],a&&(i=A(a=l(a,s))),a?e=i&&i.normalize?i.normalize(e,(n=s,function(e){return l(e,n)})):l(e,s):(a=(r=u(e=l(e,s)))[0],e=r[1],a&&(i=A(a))),{f:a?a+"!"+e:e,n:e,pr:a,p:i}},g={require:function(e){return b(e)},exports:function(e){var t=m[e];return void 0!==t?t:m[e]={}},module:function(e){return{id:e,uri:"",exports:m[e],config:(t=e,function(){return y&&y.config&&y.c
vendor: 13,085 bytes, line 1
1onfig[t]||{}})};var t}},a=function(e,t,i,n){var r,a,s,o,l,u,c,h=[],d=typeof i;if(u=x(n=n||e),"undefined"==d||"function"==d){for(t=!t.length&&i.length?["require","exports","module"]:t,l=0;l<t.length;l+=1)if("require"===(a=(o=f(t[l],u)).f))h[l]=g.require(e);else if("exports"===a)h[l]=g.exports(e),c=!0;else if("module"===a)r=h[l]=g.module(e);else if(w(m,a)||w(v,a)||w(_,a))h[l]=A(a);else{if(!o.p)throw new Error(e+" missing "+a);o.p.load(o.n,b(n,!0),T(a),{}),h[l]=m[a]}s=i?i.apply(m[e],h):void 0,e&&(r&&r.exports!==p&&r.exports!==m[e]?m[e]=r.exports:s===p&&c||(m[e]=s))}else e&&(m[e]=i)},t=i=s=function(e,t,i,n,r){if("string"==typeof e)return g[e]?g[e](t):A(f(e,x(t)).f);if(!e.splice){if((y=e).deps&&s(y.deps,y.callback),!t)return;t.splice?(e=t,t=i,i=null):e=p}return t=t||function(){},"function"==typeof i&&(i=n,n=r),n?a(p,e,t,i):setTimeout(function(){a(p,e,t,i)},4),s},s.config=function(e){return s(e)},t._defined=m,(n=function(e,t,i){if("string"!=typeof e)throw new Error("See almond README: incorrect module build, no module name");t.splice||(i=t,t=[]),w(m,e)||w(v,e)||(v[e]=[e,t,i])}).amd={jQuery:!0},e.requirejs=t,e.require=i,e.define=n),e.define("almond",function(){}),e.define("jquery",[],function(){var e=c||$;return null==e&&console&&console.error&&console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page."),e}),e.define("select2/utils",["jquery"],function(a){var r={};function c(e){var t=e.prototype,i=[];for(var n in t){"function"==typeof t[n]&&"constructor"!==n&&i.push(n)}return i}r.Extend=function(e,t){var i={}.hasOwnProperty;function n(){this.constructor=e}for(var r in t)i.call(t,r)&&(e[r]=t[r]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},r.Decorate=function(n,r){var e=c(r),t=c(n);function a(){var e=Array.prototype.unshift,t=r.prototype.constructor.length,i=n.prototype.constructor;0<t&&(e.call(arguments,n.prototype.constructor),i=r.prototype.constructor),i.apply(this,arguments)}r.displayName=n.displayName,a.prototype=new function(){this.constructor=a};for(var i=0;i<t.length;i++){var s=t[i];a.prototype[s]=n.prototype[s]}function o(e){var t=function(){};e in a.prototype&&(t=a.prototype[e]);var i=r.prototype[e];return function(){return Array.prototype.unshift.call(arguments,t),i.apply(this,arguments)}}for(var l=0;l<e.length;l++){var u=e[l];a.prototype[u]=o(u)}return a};function e(){this.listeners={}}e.prototype.on=function(e,t){this.listeners=this.listeners||{},e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t]},e.prototype.trigger=function(e){var t=Array.prototype.slice,i=t.call(arguments,1);this.listeners=this.listeners||{},null==i&&(i=[]),0===i.length&&i.push({}),(i[0]._type=e)in this.listeners&&this.invoke(this.listeners[e],t.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},e.prototype.invoke=function(e,t){for(var i=0,n=e.length;i<n;i++)e[i].apply(this,t)},r.Observable=e,r.generateChars=function(e){for(var t="",i=0;i<e;i++){t+=Math.floor(36*Math.random()).toString(36)}return t},r.bind=function(e,t){return function(){e.apply(t,arguments)}},r._convertData=function(e){for(var t in e){var i=t.split("-"),n=e;if(1!==i.length){for(var r=0;r<i.length;r++){var a=i[r];(a=a.substring(0,1).toLowerCase()+a.substring(1))in n||(n[a]={}),r==i.length-1&&(n[a]=e[t]),n=n[a]}delete e[t]}}return e},r.hasScroll=function(e,t){var i=a(t),n=t.style.overflowX,r=t.style.overflowY;return(n!==r||"hidden"!==r&&"visible"!==r)&&("scroll"===n||"scroll"===r||(i.innerHeight()<t.scrollHeight||i.innerWidth()<t.scrollWidth))},r.escapeMarkup=function(e){var t={"\\":"\","&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};return"string"!=typeof e?e:String(e).replace(/[&<>"'\/\\]/g,function(e){return t[e]})},r.appendMany=function(e,t){if("1.7"===a.fn.jquery.substr(0,3)){var i=a();a.map(t,function(e){i=i.add(e)}),t=i}e.append(t)},r.__cache={};var i=0;return r.GetUniqueElementId=function(e){var t=e.getAttribute("data-select2-id");return null==t&&(e.id?(t=e.id,e.setAttribute("data-select2-id",t)):(e.setAttribute("data-select2-id",++i),t=i.toString())),t},r.StoreData=function(e,t,i){var n=r.GetUniqueElementId(e);r.__cache[n]||(r.__cache[n]={}),r.__cache[n][t]=i},r.GetData=function(e,t){var i=r.GetUniqueElementId(e);return t?r.__cache[i]&&null!=r.__cache[i][t]?r.__cache[i][t]:a(e).data(t):r.__cache[i]},r.RemoveData=function(e){var t=r.GetUniqueElementId(e);null!=r.__cache[t]&&delete r.__cache[t],e.removeAttribute("data-select2-id")},r}),e.define("select2/results",["jquery","./utils"],function(p,f){function n(e,t,i){this.$element=e,this.data=i,this.options=t,n.__super__.constructor.call(this)}return f.Extend(n,f.Observable),n.prototype.render=function(){var e=p('<ul class="select2-results__options" role="listbox"></ul>');return this.options.get("multiple")&&e.attr("aria-multiselectable","true"),this.$results=e},n.prototype.clear=function(){this.$results.empty()},n.prototype.displayMessage=function(e){var t=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var i=p('<li role="alert" aria-live="assertive" class="select2-results__option"></li>'),n=this.options.get("translations").get(e.message);i.append(t(n(e.args))),i[0].className+=" select2-results__message",this.$results.append(i)},n.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},n.prototype.append=function(e){this.hideLoading();var t=[];if(null!=e.results&&0!==e.results.length){e.results=this.sort(e.results);for(var i=0;i<e.results.length;i++){var n=e.results[i],r=this.option(n);t.push(r)}this.$results.append(t)}else 0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"})},n.prototype.position=function(e,t){t.find(".select2-results").append(e)},n.prototype.sort=function(e){return this.options.get("sorter")(e)},n.prototype.highlightFirstItem=function(){var e=this.$results.find(".select2-results__option[aria-selected]"),t=e.filter("[aria-selected=true]");0<t.length?t.first().trigger("mouseenter"):e.first().trigger("mouseenter"),this.ensureHighlightVisible()},n.prototype.setClasses=function(){var t=this;this.data.current(function(e){var n=p.map(e,function(e){return e.id.toString()});t.$results.find(".select2-results__option[aria-selected]").each(function(){var e=p(this),t=f.GetData(this,"data"),i=""+t.id;null!=t.element&&t.element.selected||null==t.element&&-1<p.inArray(i,n)?e.attr("aria-selected","true"):e.attr("aria-selected","false")})})},n.prototype.showLoading=function(e){this.hideLoading();var t={disabled:!0,loading:!0,text:this.options.get("translations").get("searching")(e)},i=this.option(t);i.className+=" loading-results",this.$results.prepend(i)},n.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},n.prototype.option=function(e){var t=document.createElement("li");t.className="select2-results__option";var i={role:"option","aria-selected":"false"},n=window.Element.prototype.matches||window.Element.prototype.msMatchesSelector||window.Element.prototype.webkitMatchesSelector;for(var r in(null!=e.element&&n.call(e.element,":disabled")||null==e.element&&e.disabled)&&(delete i["aria-selected"],i["aria-disabled"]="true"),null==e.id&&delete i["aria-selected"],null!=e._resultId&&(t.id=e._resultId),e.title&&(t.title=e.title),e.children&&(i.role="group",i["aria-label"]=e.text,delete i["aria-selected"]),i){var a=i[r];t.setAttribute(r,a)}if(e.children){var s=p(t),o=document.createElement("strong");o.className="select2-results__group";p(o);this.template(e,o);for(var l=[],u=0;u<e.children.length;u++){var c=e.children[u],h=this.option(c);l.push(h)}var d=p("<ul></ul>",{class:"select2-results__options select2-results__options--nested"});d.append(l),s.append(o),s.append(d)}else this.template(e,t);return f.StoreData(t,"data",e),t},n.prototype.bind=function(t,e){var l=this,i=t.id+"-results";this.$results.attr("id",i),t.on("results:all",function(e){l.clear(),l.append(e.data),t.isOpen()&&(l.setClasses(),l.highlightFirstItem())}),t.on("results:append",function(e){l.append(e.data),t.isOpen()&&l.setClasses()}),t.on("query",function(e){l.hideMessages(),l.showLoading(e)}),t.on("select",function(){t.isOpen()&&(l.setClasses(),l.options.get("scrollAfterSelect")&&l.highlightFirstItem())}),t.on("unselect",function(){t.isOpen()&&(l.setClasses(),l.options.get("scrollAfterSelect")&&l.highlightFirstItem())}),t.on("open",function(){l.$results.attr("aria-expanded","true"),l.$results.attr("aria-hidden","false"),l.setClasses(),l.ensureHighlightVisible()}),t.on("close",function(){l.$results.attr("aria-expanded","false"),l.$results.attr("aria-hidden","true"),l.$results.removeAttr("aria-activedescendant")}),t.on("results:toggle",function(){var e=l.getHighlightedResults();0!==e.length&&e.trigger("mouseup")}),t.on("results:select",function(){var e=l.getHighlightedResults();if(0!==e.length){var t=f.GetData(e[0],"data");"true"==e.attr("aria-selected")?l.trigger("close",{}):l.trigger("select",{data:t})}}),t.on("results:previous",function(){var e=l.getHighlightedResults(),t=l.$results.find("[aria-selected]"),i=t.index(e);if(!(i<=0)){var n=i-1;0===e.length&&(n=0);var r=t.eq(n);r.trigger("mouseenter");var a=l.$results.offset().top,s=r.offset().top,o=l.$results.scrollTop()+(s-a);0===n?l.$results.scrollTop(0):s-a<0&&l.$results.scrollTop(o)}}),t.on("results:next",function(){var e=l.getHighlightedResults(),t=l.$results.find("[aria-selected]"),i=t.index(e)+1;if(!(i>=t.length)){var n=t.eq(i);n.trigger("mouseenter");var r=l.$results.offset().top+l.$results.outerHeight(!1),a=n.offset().top+n.outerHeight(!1),s=l.$results.scrollTop()+a-r;0===i?l.$results.scrollTop(0):r<a&&l.$results.scrollTop(s)}}),t.on("results:focus",function(e){e.element.addClass("select2-results__option--highlighted")}),t.on("results:message",function(e){l.displayMessage(e)}),p.fn.mousewheel&&this.$results.on("mousewheel",function(e){var t=l.$results.scrollTop(),i=l.$results.get(0).scrollHeight-t+e.deltaY,n=0<e.deltaY&&t-e.deltaY<=0,r=e.deltaY<0&&i<=l.$results.height();n?(l.$results.scrollTop(0),e.preventDefault(),e.stopPropagation()):r&&(l.$results.scrollTop(l.$results.get(0).scrollHeight-l.$results.height()),e.preventDefault(),e.stopPropagation())}),this.$results.on("mouseup",".select2-results__option[aria-selected]",function(e){var t=p(this),i=f.GetData(this,"data");"true"!==t.attr("aria-selected")?l.trigger("select",{originalEvent:e,data:i}):l.options.get("multiple")?l.trigger("unselect",{originalEvent:e,data:i}):l.trigger("close",{})}),this.$results.on("mouseenter",".select2-results__option[aria-selected]",function(e){var t=f.GetData(this,"data");l.getHighlightedResults().removeClass("select2-results__option--highlighted"),l.trigger("results:focus",{data:t,element:p(this)})})},n.prototype.getHighlightedResults=function(){return this.$results.find(".select2-results__option--highlighted")},n.prototype.destroy=function(){this.$results.remove()},n.prototype.ensureHighlightVisible=function(){var e=this.getHighlightedResults();if(0!==e.length){var t=this.$results.find("[aria-selected]").index(e),i=this.$results.offset().top,n=e.offset().top,r=this.$results.scrollTop()+(n-i),a=n-i;r-=2*e.outerHeight(!1),t<=2?this.$results.scrollTop(0):(a>this.$results.outerHeight()||a<0)&&this.$results.scrollTop(r)}},n.prototype.template=function(e,t){var i=this.options.get("templateResult"),n=this.options.get("escapeMarkup"),r=i(e,t);null==r?t.style.display="none":"string"==typeof r?t.innerHTML=n(r):p(t).append(r)},n}),e.define("select2/keys",[],function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46}}),e.define("select2/selection/base",["jquery","../utils","../keys"],function(i,n,r){function a(e,t){this.$element=e,this.options=t,a.__super__.constructor.call(this)}return n.Extend(a,n.Observable),a.prototype.render=function(){var e=i('<span class="select2-selection" role="combobox" aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,null!=n.GetData(this.$element[0],"old-tabindex")?this._tabindex=n.GetData(this.$element[0],"old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),e.attr("title",this.$element.attr("title")),e.attr("tabindex",this._tabindex),e.attr("aria-disabled","false"),this.$selection=e},a.prototype.bind=function(e,t){var i=this,n=e.id+"-results";this.container=e,this.$selection.on("focus",function(e){i.trigger("focus",e)}),this.$selection.on("blur",function(e){i._handleBlur(e)}),this.$selection.on("keydown",function(e){i.trigger("keypress",e),e.which===r.SPACE&&e.preventDefault()}),e.on("results:focus",function(e){i.$selection.attr("aria-activedescendant",e.data._resultId)}),e.on("selection:update",function(e){i.update(e.data)}),e.on("open",function(){i.$selection.attr("aria-expanded","true"),i.$selection.attr("aria-owns",n),i._attachCloseHandler(e)}),e.on("close",function(){i.$selection.attr("aria-expanded","fal
1se"),i.$selection.removeAttr("aria-activedescendant"),i.$selection.removeAttr("aria-owns"),i.$selection.trigger("focus"),i._detachCloseHandler(e)}),e.on("enable",function(){i.$selection.attr("tabindex",i._tabindex),i.$selection.attr("aria-disabled","false")}),e.on("disable",function(){i.$selection.attr("tabindex","-1"),i.$selection.attr("aria-disabled","true")})},a.prototype._handleBlur=function(e){var t=this;window.setTimeout(function(){document.activeElement==t.$selection[0]||i.contains(t.$selection[0],document.activeElement)||t.trigger("blur",e)},1)},a.prototype._attachCloseHandler=function(e){i(document.body).on("mousedown.select2."+e.id,function(e){var t=i(e.target).closest(".select2");i(".select2.select2-container--open").each(function(){this!=t[0]&&n.GetData(this,"element").select2("close")})})},a.prototype._detachCloseHandler=function(e){i(document.body).off("mousedown.select2."+e.id)},a.prototype.position=function(e,t){t.find(".selection").append(e)},a.prototype.destroy=function(){this._detachCloseHandler(this.container)},a.prototype.update=function(e){throw new Error("The `update` method must be defined in child classes.")},a.prototype.isEnabled=function(){return!this.isDisabled()},a.prototype.isDisabled=function(){return this.options.get("disabled")},a}),e.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(e,t,i,n){function r(){r.__super__.constructor.apply(this,arguments)}return i.Extend(r,t),r.prototype.render=function(){var e=r.__super__.render.call(this);return e.addClass("select2-selection--single"),e.html('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),e},r.prototype.bind=function(t,e){var i=this;r.__super__.bind.apply(this,arguments);var n=t.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",n).attr("role","textbox").attr("aria-readonly","true"),this.$selection.attr("aria-labelledby",n),this.$selection.on("mousedown",function(e){1===e.which&&i.trigger("toggle",{originalEvent:e})}),this.$selection.on("focus",function(e){}),this.$selection.on("blur",function(e){}),t.on("focus",function(e){t.isOpen()||i.$selection.trigger("focus")})},r.prototype.clear=function(){var e=this.$selection.find(".select2-selection__rendered");e.empty(),e.removeAttr("title")},r.prototype.display=function(e,t){var i=this.options.get("templateSelection");return this.options.get("escapeMarkup")(i(e,t))},r.prototype.selectionContainer=function(){return e("<span></span>")},r.prototype.update=function(e){if(0!==e.length){var t=e[0],i=this.$selection.find(".select2-selection__rendered"),n=this.display(t,i);i.empty().append(n);var r=t.title||t.text;r?i.attr("title",r):i.removeAttr("title")}else this.clear()},r}),e.define("select2/selection/multiple",["jquery","./base","../utils"],function(r,e,l){function i(e,t){i.__super__.constructor.apply(this,arguments)}return l.Extend(i,e),i.prototype.render=function(){var e=i.__super__.render.call(this);return e.addClass("select2-selection--multiple"),e.html('<ul class="select2-selection__rendered"></ul>'),e},i.prototype.bind=function(e,t){var n=this;i.__super__.bind.apply(this,arguments),this.$selection.on("click",function(e){n.trigger("toggle",{originalEvent:e})}),this.$selection.on("click",".select2-selection__choice__remove",function(e){if(!n.isDisabled()){var t=r(this).parent(),i=l.GetData(t[0],"data");n.trigger("unselect",{originalEvent:e,data:i})}})},i.prototype.clear=function(){var e=this.$selection.find(".select2-selection__rendered");e.empty(),e.removeAttr("title")},i.prototype.display=function(e,t){var i=this.options.get("templateSelection");return this.options.get("escapeMarkup")(i(e,t))},i.prototype.selectionContainer=function(){return r('<li class="select2-selection__choice"><span class="select2-selection__choice__remove" role="presentation">×</span></li>')},i.prototype.update=function(e){if(this.clear(),0!==e.length){for(var t=[],i=0;i<e.length;i++){var n=e[i],r=this.selectionContainer(),a=this.display(n,r);r.append(a);var s=n.title||n.text;s&&r.attr("title",s),l.StoreData(r[0],"data",n),t.push(r)}var o=this.$selection.find(".select2-selection__rendered");l.appendMany(o,t)}},i}),e.define("select2/selection/placeholder",["../utils"],function(e){function t(e,t,i){this.placeholder=this.normalizePlaceholder(i.get("placeholder")),e.call(this,t,i)}return t.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},t.prototype.createPlaceholder=function(e,t){var i=this.selectionContainer();return i.html(this.display(t)),i.addClass("select2-selection__placeholder").removeClass("select2-selection__choice"),i},t.prototype.update=function(e,t){var i=1==t.length&&t[0].id!=this.placeholder.id;if(1<t.length||i)return e.call(this,t);this.clear();var n=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(n)},t}
vendor: 5,601 bytes, line 1
1),e.define("select2/selection/allowClear",["jquery","../keys","../utils"],function(r,n,o){function e(){}return e.prototype.bind=function(e,t,i){var n=this;e.call(this,t,i),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",function(e){n._handleClear(e)}),t.on("keypress",function(e){n._handleKeyboardClear(e,t)})},e.prototype._handleClear=function(e,t){if(!this.isDisabled()){var i=this.$selection.find(".select2-selection__clear");if(0!==i.length){t.stopPropagation();var n=o.GetData(i[0],"data"),r=this.$element.val();this.$element.val(this.placeholder.id);var a={data:n};if(this.trigger("clear",a),a.prevented)this.$element.val(r);else{for(var s=0;s<n.length;s++)if(a={data:n[s]},this.trigger("unselect",a),a.prevented)return void this.$element.val(r);this.$element.trigger("input").trigger("change"),this.trigger("toggle",{})}}}},e.prototype._handleKeyboardClear=function(e,t,i){i.isOpen()||t.which!=n.DELETE&&t.which!=n.BACKSPACE||this._handleClear(t)},e.prototype.update=function(e,t){if(e.call(this,t),!(0<this.$selection.find(".select2-selection__placeholder").length||0===t.length)){var i=this.options.get("translations").get("removeAllItems"),n=r('<span class="select2-selection__clear" title="'+i()+'">×</span>');o.StoreData(n[0],"data",t),this.$selection.find(".select2-selection__rendered").prepend(n)}},e}),e.define("select2/selection/search",["jquery","../utils","../keys"],function(n,o,l){function e(e,t,i){e.call(this,t,i)}return e.prototype.render=function(e){var t=n('<li class="select2-search select2-search--inline"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="none" spellcheck="false" role="searchbox" aria-autocomplete="list" /></li>');this.$searchContainer=t,this.$search=t.find("input");var i=e.call(this);return this._transferTabIndex(),i},e.prototype.bind=function(e,t,i){var n=this,r=t.id+"-results";e.call(this,t,i),t.on("open",function(){n.$search.attr("aria-controls",r),n.$search.trigger("focus")}),t.on("close",function(){n.$search.val(""),n.$search.removeAttr("aria-controls"),n.$search.removeAttr("aria-activedescendant"),n.$search.trigger("focus")}),t.on("enable",function(){n.$search.prop("disabled",!1),n._transferTabIndex()}),t.on("disable",function(){n.$search.prop("disabled",!0)}),t.on("focus",function(e){n.$search.trigger("focus")}),t.on("results:focus",function(e){e.data._resultId?n.$search.attr("aria-activedescendant",e.data._resultId):n.$search.removeAttr("aria-activedescendant")}),this.$selection.on("focusin",".select2-search--inline",function(e){n.trigger("focus",e)}),this.$selection.on("focusout",".select2-search--inline",function(e){n._handleBlur(e)}),this.$selection.on("keydown",".select2-search--inline",function(e){if(e.stopPropagation(),n.trigger("keypress",e),n._keyUpPrevented=e.isDefaultPrevented(),e.which===l.BACKSPACE&&""===n.$search.val()){var t=n.$searchContainer.prev(".select2-selection__choice");if(0<t.length){var i=o.GetData(t[0],"data");n.searchRemoveChoice(i),e.preventDefault()}}}),this.$selection.on("click",".select2-search--inline",function(e){n.$search.val()&&e.stopPropagation()});var a=document.documentMode,s=a&&a<=11;this.$selection.on("input.searchcheck",".select2-search--inline",function(e){s?n.$selection.off("input.search input.searchcheck"):n.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(e){if(s&&"input"===e.type)n.$selection.off("input.search input.searchcheck");else{var t=e.which;t!=l.SHIFT&&t!=l.CTRL&&t!=l.ALT&&t!=l.TAB&&n.handleSearch(e)}})},e.prototype._transferTabIndex=function(e){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},e.prototype.createPlaceholder=function(e,t){this.$search.attr("placeholder",t.text)},e.prototype.update=function(e,t){var i=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),e.call(this,t),this.$selection.find(".select2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),i&&this.$search.trigger("focus")},e.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var e=this.$search.val();this.trigger("query",{term:e})}this._keyUpPrevented=!1},e.prototype.searchRemoveChoice=function(e,t){this.trigger("unselect",{data:t}),this.$search.val(t.text),this.handleSearch()},e.prototype.resizeSearch=function(){this.$search.css("width","25px");var e="";""!==this.$search.attr("placeholder")?e=this.$selection.find(".select2-selection__rendered").width():e=.75*(this.$search.val().length+1)+"em";this.$search.css("width",e)},e}),e.define("select2/selection/eventRelay",["jquery"],function(s){function e(){}return e.prototype.bind=function(e,t,i){var n=this,r=["open","opening","close","closing","select","selecting","unselect","unselecting","clear","clearing"],a=["opening","closing","selecting","unselecting","clearing"];e.call(this,t,i),t.on("*",function(e,t){if(-1!==s.inArray(e,r)){t=t||{};var i=s.Event("select2:"+e,{params:t});n.$element.trigger(i),-1!==s.inArray(e,a)&&(t.prevented=i.isDefaultPrevented())}})},e}),e.define("select2/translation",["jquery","require"],function(t,i){function n(e){this.dict=e||{}}return n.prototype.all=function(){return this.dict},n.prototype.get=function(e){return this.dict[e]},n.prototype.extend=function(e){this.dict=t.extend({},e.all(),this.dict)},n._cache={}
1,n.loadPath=function(e){if(!(e in n._cache)){var t=i(e);n._cache[e]=t}return new n(n._cache[e])},n}),e.define("select2/diacritics",[],function(){return{"â¶":"A","A":"A","Ã":"A","Ã":"A","Ã":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ä":"A","Ä":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ç ":"A","Ã":"A","Ç":"A","Ả":"A","Ã
":"A","Ǻ":"A","Ç":"A","È":"A","È":"A","Ạ":"A","Ậ":"A","Ặ":"A","á¸":"A","Ä":"A","Ⱥ":"A","Ɐ":"A","ê²":"AA","Ã":"AE","Ǽ":"AE","Ç¢":"AE","ê´":"AO","ê¶":"AU","ê¸":"AV","êº":"AV","ê¼":"AY","â·":"B","ï¼¢":"B","á¸":"B","á¸":"B","á¸":"B","É":"B","Æ":"B","Æ":"B","â¸":"C","ï¼£":"C","Ä":"C","Ä":"C","Ä":"C","Ä":"C","Ã":"C","á¸":"C","Æ":"C","È»":"C","ê¾":"C","â¹":"D","D":"D","á¸":"D","Ä":"D","á¸":"D","á¸":"D","á¸":"D","á¸":"D","Ä":"D","Æ":"D","Æ":"D","Æ":"D","ê¹":"D","DZ":"DZ","Ç":"DZ","Dz":"Dz","Ç
":"Dz","âº":"E","ï¼¥":"E","Ã":"E","Ã":"E","Ã":"E","á»":"E","Ế":"E","á»":"E","á»":"E","Ẽ":"E","Ä":"E","á¸":"E","á¸":"E","Ä":"E","Ä":"E","Ã":"E","Ẻ":"E","Ä":"E","È":"E","È":"E","Ẹ":"E","á»":"E","Ȩ":"E","á¸":"E","Ä":"E","á¸":"E","á¸":"E","Æ":"E","Æ":"E","â»":"F","F":"F","á¸":"F","Æ":"F","ê»":"F","â¼":"G","ï¼§":"G","Ç´":"G","Ä":"G","Ḡ":"G","Ä":"G","Ä ":"G","Ǧ":"G","Ä¢":"G","Ǥ":"G","Æ":"G","ê ":"G","ê½":"G","ê¾":"G","â½":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","È":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","â±§":"H","â±µ":"H","ê":"H","â¾":"I","I":"I","Ã":"I","Ã":"I","Ã":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ã":"I","Ḯ":"I","á»":"I","Ç":"I","È":"I","È":"I","á»":"I","Ä®":"I","Ḭ":"I","Æ":"I","â¿":"J","J":"J","Ä´":"J","É":"J","â":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Æ":"K","Ⱪ":"K","ê":"K","ê":"K","ê":"K","ê¢":"K","â":"L","L":"L","Ä¿":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ä»":"L","Ḽ":"L","Ḻ":"L","Å":"L","Ƚ":"L","â±¢":"L","â± ":"L","ê":"L","ê":"L","ê":"L","Ç":"LJ","Ç":"Lj","â":"M","ï¼":"M","Ḿ":"M","á¹":"M","á¹":"M","â±®":"M","Æ":"M","â":"N","ï¼®":"N","Ǹ":"N","Å":"N","Ã":"N","á¹":"N","Å":"N","á¹":"N","Å
":"N","á¹":"N","á¹":"N","È ":"N","Æ":"N","ê":"N","ê¤":"N","Ç":"NJ","Ç":"Nj","â":"O","O":"O","Ã":"O","Ã":"O","Ã":"O","á»":"O","á»":"O","á»":"O","á»":"O","Ã":"O","á¹":"O","Ȭ":"O","á¹":"O","Å":"O","á¹":"O","á¹":"O","Å":"O","È®":"O","Ȱ":"O","Ã":"O","Ȫ":"O","á»":"O","Å":"O","Ç":"O","È":"O","È":"O","Æ ":"O","á»":"O","á»":"O","á» ":"O","á»":"O","Ợ":"O","á»":"O","á»":"O","Ǫ":"O","Ǭ":"O","Ã":"O","Ǿ":"O","Æ":"O","Æ":"O","ê":"O","ê":"O","Å":"OE","Æ¢":"OI","ê":"OO","È¢":"OU","â
":"P","ï¼°":"P","á¹":"P","á¹":"P","Ƥ":"P","â±£":"P","ê":"P","ê":"P","ê":"P","â":"Q","ï¼±":"Q","ê":"Q","ê":"Q","É":"Q","â":"R","ï¼²":"R","Å":"R","á¹":"R","Å":"R","È":"R","È":"R","á¹":"R","á¹":"R","Å":"R","á¹":"R","É":"R","Ɽ":"R","ê":"R","ê¦":"R","ê":"R","â":"S","ï¼³":"S","áº":"S","Å":"S","Ṥ":"S","Å":"S","á¹ ":"S","Å ":"S","Ṧ":"S","á¹¢":"S","Ṩ":"S","È":"S","Å":"S","â±¾":"S","ê¨":"S","ê":"S","â":"T","ï¼´":"T","Ṫ":"T","Ť":"T","Ṭ":"T","È":"T","Å¢":"T","á¹°":"T","á¹®":"T","Ŧ":"T","Ƭ":"T","Æ®":"T","Ⱦ":"T","ê":"T","ê¨":"TZ","â":"U","ï¼µ":"U","Ã":"U","Ã":"U","Ã":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ã":"U","Ç":"U","Ç":"U","Ç":"U","Ç":"U","Ủ":"U","Å®":"U","Ű":"U","Ç":"U","È":"U","È":"U","Ư":"U","Ừ":"U","Ứ":"U","á»®":"U","Ử":"U","á»°":"U","Ụ":"U","á¹²":"U","Ų":"U","á¹¶":"U","á¹´":"U","É":"U","â":"V","ï¼¶":"V","á¹¼":"V","á¹¾":"V","Ʋ":"V","ê":"V","É
":"V","ê ":"VY","â":"W","ï¼·":"W","áº":"W","áº":"W","Å´":"W","áº":"W","áº":"W","áº":"W","â±²":"W","â":"X","X":"X","áº":"X","áº":"X","â":"Y","ï¼¹":"Y","Ỳ":"Y","Ã":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","áº":"Y","Ÿ":"Y","á»¶":"Y","á»´":"Y","Ƴ":"Y","É":"Y","Ỿ":"Y","â":"Z","Z":"Z","Ź":"Z","áº":"Z","Å»":"Z","Ž":"Z","áº":"Z","áº":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","ê¢":"Z","â":"a","ï½":"a","áº":"a","à ":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","Ä":"a","Ä":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","Ç¡":"a","ä":"a","Ç":"a","ả":"a","Ã¥":"a","Ç»":"a","Ç":"a","È":"a","È":"a","ạ":"a","áº":"a","ặ":"a","á¸":"a","Ä
":"a","â±¥":"a","É":"a","ê³":"aa","æ":"ae","ǽ":"ae","Ç£":"ae","êµ":"ao","ê·":"au","ê¹":"av","ê»":"av","ê½":"ay","â":"b","ï½":"b","á¸":"b","á¸
":"b","á¸":"b","Æ":"b","Æ":"b","É":"b","â":"c","ï½":"c","Ä":"
1c","Ä":"c","Ä":"c","Ä":"c","ç":"c","á¸":"c","Æ":"c","ȼ":"c","ê¿":"c","â":"c","â":"d","ï½":"d","á¸":"d","Ä":"d","á¸":"d","á¸":"d","á¸":"d","á¸":"d","Ä":"d","Æ":"d","É":"d","É":"d","êº":"d","dz":"dz","Ç":"dz","â":"e","ï½
":"e","è":"e","é":"e","ê":"e","á»":"e","ế":"e","á»
":"e","á»":"e","ẽ":"e","Ä":"e","á¸":"e","á¸":"e","Ä":"e","Ä":"e","ë":"e","ẻ":"e","Ä":"e","È
":"e","È":"e","ẹ":"e","á»":"e","È©":"e","á¸":"e","Ä":"e","á¸":"e","á¸":"e","É":"e","É":"e","Ç":"e","â":"f","ï½":"f","á¸":"f","Æ":"f","ê¼":"f","â":"g","ï½":"g","ǵ":"g","Ä":"g","ḡ":"g","Ä":"g","Ä¡":"g","ǧ":"g","Ä£":"g","Ç¥":"g","É ":"g","ê¡":"g","áµ¹":"g","ê¿":"g","â":"h","ï½":"h","Ä¥":"h","ḣ":"h","ḧ":"h","È":"h","ḥ":"h","ḩ":"h","ḫ":"h","áº":"h","ħ":"h","ⱨ":"h","â±¶":"h","É¥":"h","Æ":"hv","â":"i","ï½":"i","ì":"i","Ã":"i","î":"i","Ä©":"i","Ä«":"i","Ä":"i","ï":"i","ḯ":"i","á»":"i","Ç":"i","È":"i","È":"i","á»":"i","į":"i","á¸":"i","ɨ":"i","ı":"i","â":"j","ï½":"j","ĵ":"j","ǰ":"j","É":"j","â":"k","ï½":"k","ḱ":"k","Ç©":"k","ḳ":"k","Ä·":"k","ḵ":"k","Æ":"k","ⱪ":"k","ê":"k","ê":"k","ê
":"k","ê£":"k","â":"l","ï½":"l","Å":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l",Å¿:"l","Å":"l","Æ":"l","É«":"l","ⱡ":"l","ê":"l","ê":"l","ê":"l","Ç":"lj","â":"m","ï½":"m","ḿ":"m","á¹":"m","á¹":"m","ɱ":"m","ɯ":"m","â":"n","ï½":"n","ǹ":"n","Å":"n","ñ":"n","á¹
":"n","Å":"n","á¹":"n","Å":"n","á¹":"n","á¹":"n","Æ":"n","ɲ":"n","Å":"n","ê":"n","ê¥":"n","Ç":"nj","â":"o","ï½":"o","ò":"o","ó":"o","ô":"o","á»":"o","á»":"o","á»":"o","á»":"o","õ":"o","á¹":"o","È":"o","á¹":"o","Å":"o","á¹":"o","á¹":"o","Å":"o","ȯ":"o","ȱ":"o","ö":"o","È«":"o","á»":"o","Å":"o","Ç":"o","È":"o","È":"o","Æ¡":"o","á»":"o","á»":"o","ỡ":"o","á»":"o","ợ":"o","á»":"o","á»":"o","Ç«":"o","Ç":"o","ø":"o","Ç¿":"o","É":"o","ê":"o","ê":"o","ɵ":"o","Å":"oe","Æ£":"oi","È£":"ou","ê":"oo","â":"p","ï½":"p","á¹":"p","á¹":"p","Æ¥":"p","áµ½":"p","ê":"p","ê":"p","ê":"p","â ":"q","ï½":"q","É":"q","ê":"q","ê":"q","â¡":"r","ï½":"r","Å":"r","á¹":"r","Å":"r","È":"r","È":"r","á¹":"r","á¹":"r","Å":"r","á¹":"r","É":"r","ɽ":"r","ê":"r","ê§":"r","ê":"r","â¢":"s","ï½":"s","Ã":"s","Å":"s","á¹¥":"s","Å":"s","ṡ":"s","Å¡":"s","á¹§":"s","á¹£":"s","ṩ":"s","È":"s","Å":"s","È¿":"s","ê©":"s","ê
":"s","áº":"s","â£":"t","ï½":"t","ṫ":"t","áº":"t","Å¥":"t","á¹":"t","È":"t","Å£":"t","á¹±":"t","ṯ":"t","ŧ":"t","Æ":"t","Ê":"t","ⱦ":"t","ê":"t","ê©":"tz","â¤":"u","ï½":"u","ù":"u","ú":"u","û":"u","Å©":"u","á¹¹":"u","Å«":"u","á¹»":"u","Å":"u","ü":"u","Ç":"u","Ç":"u","Ç":"u","Ç":"u","á»§":"u","ů":"u","ű":"u","Ç":"u","È":"u","È":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","á»":"u","á»±":"u","ụ":"u","á¹³":"u","ų":"u","á¹·":"u","á¹µ":"u","Ê":"u","â¥":"v","ï½":"v","á¹½":"v","ṿ":"v","Ê":"v","ê":"v","Ê":"v","ê¡":"vy","â¦":"w","ï½":"w","áº":"w","áº":"w","ŵ":"w","áº":"w","áº
":"w","áº":"w","áº":"w","â±³":"w","â§":"x","ï½":"x","áº":"x","áº":"x","â¨":"y","ï½":"y","ỳ":"y","ý":"y","Å·":"y","ỹ":"y","ȳ":"y","áº":"y","ÿ":"y","á»·":"y","áº":"y","ỵ":"y","Æ´":"y","É":"y","ỿ":"y","â©":"z","ï½":"z","ź":"z","áº":"z","ż":"z","ž":"z","áº":"z","áº":"z","ƶ":"z","È¥":"z","É":"z","ⱬ":"z","ê£":"z","Î":"Î","Î":"Î","Î":"Î","Î":"Î","Ϊ":"Î","Î":"Î","Î":"Î¥","Ϋ":"Î¥","Î":"Ω","ά":"α","Î":"ε","ή":"η","ί":"ι","Ï":"ι","Î":"ι","Ï":"ο","Ï":"Ï
","Ï":"Ï
","ΰ":"Ï
","Ï":"Ï","Ï":"Ï","â":"'"}}),e.define("select2/data/base",["../utils"],function(n){function i(e,t){i.__super__.constructor.call(this)}return n.Extend(i,n.Observable),i.prototype.current=function(e){throw new Error("The `current` method must be defined in child classes.")},i.prototype.query=function(e,t){throw new Error("The `query` method must be defined in child classes.")},i.prototype.bind=function(e,t){},i.prototype.destroy=function(){},i.prototype.generateResultId=function(e,t){var i=e.id+"-result-";return i+=n.generateChars(4),null!=t.id?i+="-"+t.id.toString():i+="-"+n.generateChars(4),i},i}),e.define("select2/data/select",["./base","../utils","jquery"],function(e,o,l){function i(e,t){this.$element=e,this.options=t,i.__super__.constructor.call(this)}return o.Extend(i,e),i.prototype.current=function(e){var i=[],n=this;this.$element.find(":selected").each(function(){var e=l(this),t=n.item(e);i.push(t)}),e(i)},i.prototype.select=function(r){var a=this;if(r.selected=!0,l(r.element).is("option"))return r.element.selected=!0,void this.$element.trigger("input").trigger("change");if(this.$element.prop("multiple"))this.current(function(e){var t=[];(r=[r]).push.apply(r,e);for(var i=0;i<r.length;i++){var n=r[i].id;-1===l.inArray(n,t)&&t.push(n)}a.$element.val(t),a.$element.trigger("input").trigger("change")});else{var e=r.id;this.$element.val(e),this.$element.trigger("input").trigger("change")}},i.prototype.unselect=function(r){var a=this;if(this.$element.prop("multiple")){if(r.selected=!1,l(r.element).is("option"))return r.element.selected=!1,void this.$element.trigger("input").trigger("change");this.current(function(e){for(var t=[],i=0;i<e.length;i++){var n=e[i].id;n!==r.id&&-1===l.inArray(n,t)&&t.push(n)}a.$element.val(t),a.$element.trigger("input").trigger("change")})}},i.prototype.bind=function(e,t){var i=this;(this.container=e).on("select",function(e){i.select(e.data)}),e.on("unselect",function(e){i.unselect(e.data)})},i.prototype.destroy=function(){this.$element.find("*").each(function(){o.RemoveData(this)})},i.prototype.query=function(n,e){var r=[],a=this;this.$element.children().each(function(){var e=l(this);if(e.is("option")||e.is("optgroup")){var t=a.item(e),i=a.matches(n,t);null!==i&&r.push(i)}}),e({results:r})},i.prototype.addOptions=function(e){o.appendMany(this.$element,e)},i.prototype.option=function(e){var t;e.children?(t=document.createElement("optgroup")).label=e.text:void 0!==(t=document.createElement("option")).textContent?t.textContent=e.text:t.innerText=e.text,void 0!==e.id&&(t.value=e.id),e.disabled&&(t.disabled=!0),e.selected&&(t.selected=!0),e.title&&(t.title=e.title);var i=l(t),n=this._normalizeItem(e);return n.element=t,o.StoreData(t,"data",n),i},i.prototype.item=function(e){var t={};if(null!=(t=o.GetData(e[0],"data")))return t;if(e.is("option"))t={id:e.val(),text:e.text(),disabled:e.prop("disabled"),selected:e.prop("selected"),title:e.prop("title")};else if(e.is("optgroup")){t={text:e.prop("label"),children:[],title:e.prop("title")};for(var i=e.children("option"),n=[],r=0;r<i.length;r++){var a=l(i[r]),s=this.item(a);n.push(s)}t.children=n}return(t=this._normalizeItem(t)).element=e[0],o.StoreData(e[0],"data",t),t},i.prototype._normalizeItem=function(e){e!==Object(e)&&(e={id:e,text:e});return null!=(e=l.extend({},{text:""},e)).id&&(e.id=e.id.toString()),null!=e.text&&(e.text=e.text.toString()),null==e._resultId&&e.id&&null!=this.container&&(e._resultId=this.generateResultId(this.container,e)),l.extend({},{selected:!1,disabled:!1},e)},i.prototype.matches=function(e,t){return this.options.get("matcher")(e,t)},i}),e.define("select2/data/array",["./select","../utils","jquery"],function(e,f,g){function n(e,t){this._dataToConvert=t.get("data")||[],n.__super__.constructor.call(this,e,t)}return f.Extend(n,e),n.prototype.bind=function(e,t){n.__super__.bind.call(this,e,t),this.addOptions(this.convertToOptions(this._dataToConvert))},n.prototype.select=function(i){var e=this.$element.find("option").filter(function(e,t){return t.value==i.id.toString()});0===e.length&&(e=this.option(i),this.addOptions(e)),n.__super__.select.call(this,i)},n.prototype.convertToOptions=function(e){var t=this,i=this.$element.find("option"),n=i.map(function(){return t.item(g(this)).id}).get(),r=[];function a(e){return function(){return g(this).val()==e.id}}for(var s=0;s<e.length;s++){var o=this._normalizeItem(e[s]);if(0<=g.inArray(o.id,n)){var l=i.filter(a(o)),u=this.item(l),c=g.extend(!0,{},o,u),h=this.option(c);l.replaceWith(h)}else{var d=this.option(o);if(o.children){var p=this.convertToOptions(o.children);f.appendMany(d,p)}r.push(d)}}return r},n}),e.define("select2/data/ajax",["./array","../utils","jquery"],function(e,t,a){function i(e,t){this.ajaxOptions=this._applyDefaults(t.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),i.__super__.constructor.call(this,e,t)}return t.Extend(i,e),i.prototype._applyDefaults=function(e){var t={data:function(e){return a.extend({},e,{q:e.term})},transport:function(e,t,i){var n=a.ajax(e);return n.then(t),n.fail(i),n}};return a.extend({},t,e,!0)},i.prototype.processResults=function(e){return e},i.prototype.query=function(i,n){var r=this;null!=this._request&&(a.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var t=a.extend({type:"GET"},this.ajaxOptions);function e(){var e=t.transport(t,function(e){var t=r.processResults(e,i);r.options.get("debug")&&window.console&&console.error&&(t&&t.results&&a.isArray(t.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),n(t)},function(){"status"in e&&(0===e.status||"0"===e.status)||r.trigger("results:message",{message:"errorLoading"})});r._request=e}"function"==typeof t.url&&(t.url=t.url.call(this.$element,i)),"function"==typeof t.data&&(t.data=t.data.call(this.$element,i)),this.ajaxOptions.delay&&null!=i.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(e,this.ajaxOptions.delay)):e()},i}),e.define("select2/data/tags",["jquery"],function(c){function e(e,t,i){var n=i.get("tags"),r=i.get("createTag");void 0!==r&&(this.createTag=r);var a=i.get("insertTag");if(void 0!==a&&(this.insertTag=a),e.call(this,t,i),c.isArray(n))for(var s=0;s<n.length;s++){var o=n[s],l=this._normalizeItem(o),u=this.option(l);this.$element.append(u)}}return e.prototype.query=function(e,u,c){var h=this;this._removeOldTags(),null!=u.term&&null==u.page?e.call(this,u,function e(t,i){for(var n=t.results,r=0;r<n.length;r++){var a=n[r],s=null!=a.children&&!e({results:a.children},!0);if((a.text||"").toUpperCase()===(u.term||"").toUpperCase()||s)return!i&&(t.data=n,void c(t))}if(i)return!0;var o=h.createTag(u);if(null!=o){var l=h.option(o);l.attr("data-select2-tag",!0),h.addOptions([l]),h.insertTag(n,o)}t.results=n,c(t)}):e.call(this,u,c)},e.prototype.createTag=function(e,t){var i=c.trim(t.term);return""===i?null:{id:i,text:i}},e.prototype.insertTag=function(e,t,i){t.unshift(i)},e.prototype._removeOldTags=function(e){this.$element.find("option[data-select2-tag]").each(function(){this.selected||c(this).remove()})},e}),e.define("select2/data/tokenizer",["jquery"],function(h){function e(e,t,i){var n=i.get("tokenizer");void 0!==n&&(this.tokenizer=n),e.call(this,t,i)}return e.prototype.bind=function(e,t,i){e.call(this,t,i),this.$search=t.dropdown.$search||t.selection.$search||i.find(".select2-search__field")},e.prototype.query=function(e,t,i){var r=this;t.term=t.term||"";var n=this.tokenizer(t,this.options,function(e){var t,i=r._normalizeItem(e);if(!r.$element.find("option").filter(function(){return h(this).val()===i.id}).length){var n=r.option(i);n.attr("data-select2-tag",!0),r._removeOldTags(),r.addOptions([n])}t=i,r.trigger("select",{data:t})});n.term!==t.term&&(this.$search.length&&(this.$search.val(n.term),this.$search.trigger("focus")),t.term=n.term),e.call(this,t,i)},e.prototype.tokenizer=function(e,t,i,n){for(var r=i.get("tokenSeparators")||[],a=t.term,s=0,o=this.createTag||function(e){return{id:e.term,text:e.term}};s<a.length;){var l=a[s];if(-1!==h.inArray(l,r)){var u=a.substr(0,s),c=o(h.extend({},t,{term:u}));null!=c?(n(c),a=a.substr(s+1)||"",s=0):s++}else s++}
vendor: 7,128 bytes, line 1
1return{term:a}},e}),e.define("select2/data/minimumInputLength",[],function(){function e(e,t,i){this.minimumInputLength=i.get("minimumInputLength"),e.call(this,t,i)}return e.prototype.query=function(e,t,i){t.term=t.term||"",t.term.length<this.minimumInputLength?this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:t.term,params:t}}):e.call(this,t,i)},e}),e.define("select2/data/maximumInputLength",[],function(){function e(e,t,i){this.maximumInputLength=i.get("maximumInputLength"),e.call(this,t,i)}return e.prototype.query=function(e,t,i){t.term=t.term||"",0<this.maximumInputLength&&t.term.length>this.maximumInputLength?this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:t.term,params:t}}):e.call(this,t,i)},e}),e.define("select2/data/maximumSelectionLength",[],function(){function e(e,t,i){this.maximumSelectionLength=i.get("maximumSelectionLength"),e.call(this,t,i)}return e.prototype.bind=function(e,t,i){var n=this;e.call(this,t,i),t.on("select",function(){n._checkIfMaximumSelected()})},e.prototype.query=function(e,t,i){var n=this;this._checkIfMaximumSelected(function(){e.call(n,t,i)})},e.prototype._checkIfMaximumSelected=function(e,i){var n=this;this.current(function(e){var t=null!=e?e.length:0;0<n.maximumSelectionLength&&t>=n.maximumSelectionLength?n.trigger("results:message",{message:"maximumSelected",args:{maximum:n.maximumSelectionLength}}):i&&i()})},e}),e.define("select2/dropdown",["jquery","./utils"],function(t,e){function i(e,t){this.$element=e,this.options=t,i.__super__.constructor.call(this)}return e.Extend(i,e.Observable),i.prototype.render=function(){var e=t('<span class="select2-dropdown"><span class="select2-results"></span></span>');return e.attr("dir",this.options.get("dir")),this.$dropdown=e},i.prototype.bind=function(){},i.prototype.position=function(e,t){},i.prototype.destroy=function(){this.$dropdown.remove()},i}),e.define("select2/dropdown/search",["jquery","../utils"],function(a,e){function t(){}return t.prototype.render=function(e){var t=e.call(this),i=a('<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="none" spellcheck="false" role="searchbox" aria-autocomplete="list" /></span>');return this.$searchContainer=i,this.$search=i.find("input"),t.prepend(i),t},t.prototype.bind=function(e,t,i){var n=this,r=t.id+"-results";e.call(this,t,i),this.$search.on("keydown",function(e){n.trigger("keypress",e),n._keyUpPrevented=e.isDefaultPrevented()}),this.$search.on("input",function(e){a(this).off("keyup")}),this.$search.on("keyup input",function(e){n.handleSearch(e)}),t.on("open",function(){n.$search.attr("tabindex",0),n.$search.attr("aria-controls",r),n.$search.trigger("focus"),window.setTimeout(function(){n.$search.trigger("focus")},0)}),t.on("close",function(){n.$search.attr("tabindex",-1),n.$search.removeAttr("aria-controls"),n.$search.removeAttr("aria-activedescendant"),n.$search.val(""),n.$search.trigger("blur")}),t.on("focus",function(){t.isOpen()||n.$search.trigger("focus")}),t.on("results:all",function(e){null!=e.query.term&&""!==e.query.term||(n.showSearch(e)?n.$searchContainer.removeClass("select2-search--hide"):n.$searchContainer.addClass("select2-search--hide"))}),t.on("results:focus",function(e){e.data._resultId?n.$search.attr("aria-activedescendant",e.data._resultId):n.$search.removeAttr("aria-activedescendant")})},t.prototype.handleSearch=function(e){if(!this._keyUpPrevented){var t=this.$search.val();this.trigger("query",{term:t})}this._keyUpPrevented=!1},t.prototype.showSearch=function(e,t){return!0},t}),e.define("select2/dropdown/hidePlaceholder",[],function(){function e(e,t,i,n){this.placeholder=this.normalizePlaceholder(i.get("placeholder")),e.call(this,t,i,n)}return e.prototype.append=function(e,t){t.results=this.removePlaceholder(t.results),e.call(this,t)},e.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},e.prototype.removePlaceholder=function(e,t){for(var i=t.slice(0),n=t.length-1;0<=n;n--){var r=t[n];this.placeholder.id===r.id&&i.splice(n,1)}return i},e}),e.define("select2/dropdown/infiniteScroll",["jquery"],function(i){function e(e,t,i,n){this.lastParams={},e.call(this,t,i,n),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return e.prototype.append=function(e,t){this.$loadingMore.remove(),this.loading=!1,e.call(this,t),this.showLoadingMore(t)&&(this.$results.append(this.$loadingMore),this.loadMoreIfNeeded())},e.prototype.bind=function(e,t,i){var n=this;e.call(this,t,i),t.on("query",function(e){n.lastParams=e,n.loading=!0}),t.on("query:append",function(e){n.lastParams=e,n.loading=!0}),this.$results.on("scroll",this.loadMoreIfNeeded.bind(this))},e.prototype.loadMoreIfNeeded=function(){var e=i.contains(document.documentElement,this.$loadingMore[0]);if(!this.loading&&e){var t=this.$results.offset().top+this.$results.outerHeight(!1);this.$loadingMore.offset().top+this.$loadingMore.outerHeight(!1)<=t+50&&this.loadMore()}},e.prototype.loadMore=function(){this.loading=!0;var e=i.extend({},{page:1},this.lastParams);e.page++,this.trigger("query:append",e)},e.prototype.showLoadingMore=function(e,t){return t.pagination&&t.pagination.more},e.prototype.createLoadingMore=function(){var e=i('<li class="select2-results__option select2-results__option--load-more"role="option" aria-disabled="true"></li>'),t=this.options.get("translations").get("loadingMore");return e.html(t(this.lastParams)),e},e}),e.define("select2/dropdown/attachBody",["jquery","../utils"],function(f,o){function e(e,t,i){this.$dropdownParent=f(i.get("dropdownParent")||document.body),e.call(this,t,i)}return e.prototype.bind=function(e,t,i){var n=this;e.call(this,t,i),t.on("open",function(){n._showDropdown(),n._attachPositioningHandler(t),n._bindContainerResultHandlers(t)}),t.on("close",function(){n._hideDropdown(),n._detachPositioningHandler(t)}),this.$dropdownContainer.on("mousedown",function(e){e.stopPropagation()})},e.prototype.destroy=function(e){e.call(this),this.$dropdownContainer.remove()},e.prototype.position=function(e,t,i){t.attr("class",i.attr("class")),t.removeClass("select2"),t.addClass("select2-container--open"),t.css({position:"absolute",top:-999999}),this.$container=i},e.prototype.render=function(e){var t=f("<span></span>"),i=e.call(this);return t.append(i),this.$dropdownContainer=t},e.prototype._hideDropdown=function(e){this.$dropdownContainer.detach()},e.prototype._bindContainerResultHandlers=function(e,t){if(!this._containerResultsHandlersBound){var i=this;t.on("results:all",function(){i._positionDropdown(),i._resizeDropdown()}),t.on("results:append",function(){i._positionDropdown(),i._resizeDropdown()}),t.on("results:message",function(){i._positionDropdown(),i._resizeDropdown()}),t.on("select",function(){i._positionDropdown(),i._resizeDropdown()}),t.on("unselect",function(){i._positionDropdown(),i._resizeDropdown()}),this._containerResultsHandlersBound=!0}},e.prototype._attachPositioningHandler=function(e,t){var i=this,n="scroll.
1select2."+t.id,r="resize.select2."+t.id,a="orientationchange.select2."+t.id,s=this.$container.parents().filter(o.hasScroll);s.each(function(){o.StoreData(this,"select2-scroll-position",{x:f(this).scrollLeft(),y:f(this).scrollTop()})}),s.on(n,function(e){var t=o.GetData(this,"select2-scroll-position");f(this).scrollTop(t.y)}),f(window).on(n+" "+r+" "+a,function(e){i._positionDropdown(),i._resizeDropdown()})},e.prototype._detachPositioningHandler=function(e,t){var i="scroll.select2."+t.id,n="resize.select2."+t.id,r="orientationchange.select2."+t.id;this.$container.parents().filter(o.hasScroll).off(i),f(window).off(i+" "+n+" "+r)},e.prototype._positionDropdown=function(){var e=f(window),t=this.$dropdown.hasClass("select2-dropdown--above"),i=this.$dropdown.hasClass("select2-dropdown--below"),n=null,r=this.$container.offset();r.bottom=r.top+this.$container.outerHeight(!1);var a={height:this.$container.outerHeight(!1)};a.top=r.top,a.bottom=r.top+a.height;var s=this.$dropdown.outerHeight(!1),o=e.scrollTop(),l=e.scrollTop()+e.height(),u=o<r.top-s,c=l>r.bottom+s,h={left:r.left,top:a.bottom},d=this.$dropdownParent;"static"===d.css("position")&&(d=d.offsetParent());var p={top:0,left:0};(f.contains(document.body,d[0])||d[0].isConnected)&&(p=d.offset()),h.top-=p.top,h.left-=p.left,t||i||(n="below"),c||!u||t?!u&&c&&t&&(n="below"):n="above",("above"==n||t&&"below"!==n)&&(h.top=a.top-p.top-s),null!=n&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+n),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+n)),this.$dropdownContainer.css(h)},e.prototype._resizeDropdown=function(){var e={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(e.minWidth=e.width,e.position="relative",e.width="auto"),this.$dropdown.css(e)},e.prototype._showDropdown=function(e){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},e}),e.define("select2/dropdown/minimumResultsForSearch",[],function(){function e(e,t,i,n){this.minimumResultsForSearch=i.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),e.call(this,t,i,n)}return e.prototype.showSearch=function(e,t){return!(function e(t){for(var i=0,n=0;n<t.length;n++){var r=t[n];r.children?i+=e(r.children):i++}return i}(t.data.results)<this.minimumResultsForSearch)&&e.call(this,t)},e}),e.define("select2/dropdown/selectOnClose",["../utils"],function(a){function e(){}return e.prototype.bind=function(e,t,i){var n=this;e.call(this,t,i),t.on("close",function(e){n._handleSelectOnClose(e)})},e.prototype._handleSelectOnClose=function(e,t){if(t&&null!=t.originalSelect2Event){var i=t.originalSelect2Event;if("select"===i._type||"unselect"===i._type)return}var n=this.getHighlightedResults();if(!(n.length<1)){var r=a.GetData(n[0],"data");null!=r.element&&r.element.selected||null==r.element&&r.selected||this.trigger("select",{data:r})}},e}),e.define("select2/dropdown/closeOnSelect",[],function(){function e(){}return e.prototype.bind=function(e,t,i){var n=this;e.call(this,t,i),t.on("select",function(e){n._selectTriggered(e)}),t.on("unselect",function(e){n._selectTriggered(e)})},e.prototype._selectTriggered=function(e,t){var i=t.originalEvent;i&&(i.ctrlKey||i.metaKey)||this.trigger("close",{originalEvent:i,originalSelect2Event:t})},e}),e.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(e){var t=e.input.length-e.maximum,i="Please delete "+t+" character";return 1!=t&&(i+="s"),i},inputTooShort:function(e){return"Please enter "+(e.minimum-e.input.length)+" or more characters"},loadingMore:function(){return"Loading more resultsâ¦"},maximumSelected:function(e){var t="You can only select "+e.maximum+" item";return 1!=e.maximum&&(t+="s"),t},noResults:function(){return"No results found"},searching:function(){return"Searchingâ¦"},removeAllItems:function(){return"Remove all items"}}}),e.define("select2/defaults",["jquery","require","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/eventRelay","./utils","./translation","./diacritics","./data/select","./data/array","./data/ajax","./data/tags","./data/tokenizer","./data/minimumInputLength","./data/maximumInputLength","./data/maximumSelectionLength","./dropdown","./dropdown/search","./dropdown/hidePlaceholder","./dropdown/infiniteScroll","./dropdown/attachBody","./dropdown/minimumResultsForSearch","./dropdown/selectOnClose","./dropdown/closeOnSelect","./i18n/en"],function(u,c,h,d,p,f,g,m,v,y,s,t,_,M,w,b,T,A,x,E,S,D,N,C,L,I,O,j,e){function i(){this.reset()}return i.prototype.apply=function(e){if(null==(e=u.extend(!0,{},this.defaults,e)).dataAdapter){if(null!=e.ajax?e.dataAdapter=w:null!=e.data?e.dataAdapter=M:e.dataAdapter=_,0<e.minimumInputLength&&(e.dataAdapter=y.Decorate(e.dataAdapter,A)),0<e.maximumInputLength&&(e.dataAdapter=y.Decorate(e.dataAdapter,x)),0<e.maximumSelectionLength&&(e.dataAdapter=y.Decorate(e.dataAdapter,E)),e.tags&&(e.dataAdapter=y.Decorate(e.dataAdapter,b)),null==e.tokenSeparators&&null==e.tokenizer||(e.dataAdapter=y.Decorate(e.dataAdapter,T)),null!=e.query){var t=c(e.amdBase+"compat/query");e.dataAdapter=y.Decorate(e.dataAdapter,t)}if(null!=e.initSelection){var i=c(e.amdBase+"compat/initSelection");e.dataAdapter=y.Decorate(e.dataAdapter,i)}}if(null==e.resultsAdapter&&(e.resultsAdapter=h,null!=e.ajax&&(e.resultsAdapter=y.Decorate(e.resultsAdapter,C)),null!=e.placeholder&&(e.resultsAdapter=y.Decorate(e.resultsAdapter,N)),e.selectOnClose&&(e.resultsAdapter=y.Decorate(e.resultsAdapter,O))),null==e.dropdownAdapter){if(e.multiple)e.dropdownAdapter=S;else{var n=y.Decorate(S,D);e.dropdownAdapter=n}if(0!==e.minimumResultsForSearch&&(e.dropdownAdapter=y.Decorate(e.dropdownAdapter,I)),e.closeOnSelect&&(e.dropdownAdapter=y.Decorate(e.dropdownAdapter,j)),null!=e.dropdownCssClass||null!=e.dropdownCss||null!=e.adaptDropdownCssClass){var r=c(e.amdBase+"compat/dropdownCss");e.dropdownAdapter=y.Decorate(e.dropdownAdapter,r)}e.dropdownAdapter=y.Decorate(e.dropdownAdapter,L)}if(null==e.selectionAdapter){if(e.multiple?e.selectionAdapter=p:e.selectionAdapter=d,null!=e.placeholder&&(e.selectionAdapter=y.Decorate(e.selectionAdapter,f)),e.allowClear&&(e.selectionAdapter=y.Decorate(e.selectionAdapter,g)),e.multiple&&(e.selectionAdapter=y.Decorate(e.selectionAdapter,m)),null!=e.containerCssClass||null!=e.containerCss||null!=e.adaptC
vendor: 11,476 bytes, line 1
1ontainerCssClass){var a=c(e.amdBase+"compat/containerCss");e.selectionAdapter=y.Decorate(e.selectionAdapter,a)}e.selectionAdapter=y.Decorate(e.selectionAdapter,v)}e.language=this._resolveLanguage(e.language),e.language.push("en");for(var s=[],o=0;o<e.language.length;o++){var l=e.language[o];-1===s.indexOf(l)&&s.push(l)}return e.language=s,e.translations=this._processTranslations(e.language,e.debug),e},i.prototype.reset=function(){function o(e){return e.replace(/[^\u0000-\u007E]/g,function(e){return t[e]||e})}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:y.escapeMarkup,language:{},matcher:function e(t,i){if(""===u.trim(t.term))return i;if(i.children&&0<i.children.length){for(var n=u.extend(!0,{},i),r=i.children.length-1;0<=r;r--)null==e(t,i.children[r])&&n.children.splice(r,1);return 0<n.children.length?n:e(t,n)}var a=o(i.text).toUpperCase(),s=o(t.term).toUpperCase();return-1<a.indexOf(s)?i:null},minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,scrollAfterSelect:!1,sorter:function(e){return e},templateResult:function(e){return e.text},templateSelection:function(e){return e.text},theme:"default",width:"resolve"}},i.prototype.applyFromElement=function(e,t){var i=e.language,n=this.defaults.language,r=t.prop("lang"),a=t.closest("[lang]").prop("lang"),s=Array.prototype.concat.call(this._resolveLanguage(r),this._resolveLanguage(i),this._resolveLanguage(n),this._resolveLanguage(a));return e.language=s,e},i.prototype._resolveLanguage=function(e){if(!e)return[];if(u.isEmptyObject(e))return[];if(u.isPlainObject(e))return[e];var t;t=u.isArray(e)?e:[e];for(var i=[],n=0;n<t.length;n++)if(i.push(t[n]),"string"==typeof t[n]&&0<t[n].indexOf("-")){var r=t[n].split("-")[0];i.push(r)}return i},i.prototype._processTranslations=function(e,t){for(var i=new s,n=0;n<e.length;n++){var r=new s,a=e[n];if("string"==typeof a)try{r=s.loadPath(a)}catch(e){try{a=this.defaults.amdLanguageBase+a,r=s.loadPath(a)}catch(e){t&&window.console&&console.warn&&console.warn('Select2: The language file for "'+a+'" could not be automatically loaded. A fallback will be used instead.')}}else r=u.isPlainObject(a)?new s(a):a;i.extend(r)}return i},i.prototype.set=function(e,t){var i={};i[u.camelCase(e)]=t;var n=y._convertData(i);u.extend(!0,this.defaults,n)},new i}),e.define("select2/options",["require","jquery","./defaults","./utils"],function(n,c,r,h){function e(e,t){if(this.options=e,null!=t&&this.fromElement(t),null!=t&&(this.options=r.applyFromElement(this.options,t)),this.options=r.apply(this.options),t&&t.is("input")){var i=n(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=h.Decorate(this.options.dataAdapter,i)}}return e.prototype.fromElement=function(e){var t=["select2"];null==this.options.multiple&&(this.options.multiple=e.prop("multiple")),null==this.options.disabled&&(this.options.disabled=e.prop("disabled")),null==this.options.dir&&(e.prop("dir")?this.options.dir=e.prop("dir"):e.closest("[dir]").prop("dir")?this.options.dir=e.closest("[dir]").prop("dir"):this.options.dir="ltr"),e.prop("disabled",this.options.disabled),e.prop("multiple",this.options.multiple),h.GetData(e[0],"select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),h.StoreData(e[0],"data",h.GetData(e[0],"select2Tags")),h.StoreData(e[0],"tags",!0)),h.GetData(e[0],"ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),e.attr("ajax--url",h.GetData(e[0],"ajaxUrl")),h.StoreData(e[0],"ajax-Url",h.GetData(e[0],"ajaxUrl")));var i={};function n(e,t){return t.toUpperCase()}for(var r=0;r<e[0].attributes.length;r++){var a=e[0].attributes[r].name;if("data-"==a.substr(0,"data-".length)){var s=a.substring("data-".length),o=h.GetData(e[0],s);i[s.replace(/-([a-z])/g,n)]=o}}c.fn.jquery&&"1."==c.fn.jquery.substr(0,2)&&e[0].dataset&&(i=c.extend(!0,{},e[0].dataset,i));var l=c.extend(!0,{},h.GetData(e[0]),i);for(var u in l=h._convertData(l))-1<c.inArray(u,t)||(c.isPlainObject(this.options[u])?c.extend(this.options[u],l[u]):this.options[u]=l[u]);return this},e.prototype.get=function(e){return this.options[e]},e.prototype.set=function(e,t){this.options[e]=t},e}),e.define("select2/core",["jquery","./options","./utils","./keys"],function(a,u,c,n){var h=function(e,t){null!=c.GetData(e[0],"select2")&&c.GetData(e[0],"select2").destroy(),this.$element=e,this.id=this._generateId(e),t=t||{},this.options=new u(t,e),h.__super__.constructor.call(this);var i=e.attr("tabindex")||0;c.StoreData(e[0],"old-tabindex",i),e.attr("tabindex","-1");var n=this.options.get("dataAdapter");this.dataAdapter=new n(e,this.options);var r=this.render();this._placeContainer(r);var a=this.options.get("selectionAdapter");this.selection=new a(e,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,r);var s=this.options.get("dropdownAdapter");this.dropdown=new s(e,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,r);var o=this.options.get("resultsAdapter");this.results=new o(e,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var l=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(e){l.trigger("selection:update",{data:e})}),e.addClass("select2-hidden-accessible"),e.attr("aria-hidden","true"),this._syncAttributes(),c.StoreData(e[0],"select2",this),e.data("select2",this)};return c.Extend(h,c.Observable),h.prototype._generateId=function(e){return"select2-"+(null!=e.attr("id")?e.attr("id"):null!=e.attr("name")?e.attr("name")+"-"+c.generateChars(2):c.generateChars(4)).replace(/(:|\.|\[|\]|,)/g,"")},h.prototype._placeContainer=function(e){e.insertAfter(this.$element);var t=this._resolveWidth(this.$element,this.options.get("width"));null!=t&&e.css("width",t)},h.prototype._resolveWidth=function(e,t){var i=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==t){var n=this._resolveWidth(e,"style");return null!=n?n:this._resolveWidth(e,"element")}if("element"==t){var r=e.outerWidth(!1);return r<=0?"auto":r+"px"}if("style"!=t)return"computedstyle"!=t?t:window.getComputedStyle(e[0]).width;var a=e.attr("style");if("string"!=typeof a)return null;for(var s=a.split(";"),o=0,l=s.length;o<l;o+=1){var u=s[o].replace(/\s/g,"").match(i);if(null!==u&&1<=u.length)return u[1]}return null},h.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},h.prototype._registerDomEvents=function(){var t=this;this.$element.on("change.select2",function(){t.dataAdapter.current(function(e){t.trigger("selection:update",{data:e})})}),this.$element.on("focus.select2",function(e){t.trigger("focus",e)}),this._syncA=c.bind(this._syncAttributes,this),this._syncS=c.bind(this._syncSubtree,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._syncA);var e=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=e?(this._observer=new e(function(e){t._syncA(),t._syncS(null,e)}),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})):this.$element[0].addEventListener&&(this.$element[0].addEventListener("DOMAttrModified",t._syncA,!1),this.$element[0].addEventListener("DOMNodeInserted",t._syncS,!1),this.$element[0].addEventListener("DOMNodeRemoved",t._syncS,!1))},h.prototype._registerDataEvents=function(){var i=this;this.dataAdapter.on("*",function(e,t){i.trigger(e,t)})},h.prototype._registerSelectionEvents=function(){var i=this,n=["toggle","focus"];this.selection.on("toggle",function(){i.toggleDropdown()}),this.selection.on("focus",function(e){i.focus(e)}),this.selection.on("*",function(e,t){-1===a.inArray(e,n)&&i.trigger(e,t)})},h.prototype._registerDropdownEvents=function(){var i=this;this.dropdown.on("*",function(e,t){i.trigger(e,t)})},h.prototype._registerResultsEvents=function(){var i=this;this.results.on("*",function(e,t){i.trigger(e,t)})},h.prototype._registerEvents=function(){var i=this;this.on("open",function(){i.$container.addClass("select2-container--open")}),this.on("close",function(){i.$container.removeClass("select2-container--open")}),this.on("enable",function(){i.$container.removeClass("select2-container--disabled")}),this.on("disable",function(){i.$container.addClass("select2-container--disabled")}),this.on("blur",function(){i.$container.removeClass("select2-container--focus")}),this.on("query",function(t){i.isOpen()||i.trigger("open",{}),this.dataAdapter.query(t,function(e){i.trigger("results:all",{data:e,query:t})})}),this.on("query:append",function(t){this.dataAdapter.query(t,function(e){i.trigger("results:append",{data:e,query:t})})}),this.on("keypress",function(e){var t=e.which;i.isOpen()?t===n.ESC||t===n.TAB||t===n.UP&&e.altKey?(i.close(e),e.preventDefault()):t===n.ENTER?(i.trigger("results:select",{}),e.preventDefault()):t===n.SPACE&&e.ctrlKey?(i.trigger("results:toggle",{}),e.preventDefault()):t===n.UP?(i.trigger("results:previous",{}),e.preventDefault()):t===n.DOWN&&(i.trigger("results:next",{}),e.preventDefault()):(t===n.ENTER||t===n.SPACE||t===n.DOWN&&e.altKey)&&(i.open(),e.preventDefault())})},h.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.isDisabled()?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},h.prototype._isChangeMutation=function(e,t){var i=!1,n=this;if(!e||!e.target||"OPTION"===e.target.nodeName||"OPTGROUP"===e.target.nodeName){if(t)if(t.addedNodes&&0<t.addedNodes.length)for(var r=0;r<t.addedNodes.length;r++){t.addedNodes[r].selected&&(i=!0)}else t.removedNodes&&0<t.removedNodes.length?i=!0:a.isArray(t)&&a.each(t,function(e,t){if(n._isChangeMutation(e,t))return!(i=!0)});else i=!0;return i}},h.prototype._syncSubtree=function(e,t){var i=this._isChangeMutation(e,t),n=this;i&&this.dataAdapter.current(function(e){n.trigger("selection:update",{data:e})})},h.prototype.trigger=function(e,t){var i=h.__super__.trigger,n={open:"opening",close:"closing",select:"selecting",unselect:"unselecting",clear:"clearing"};if(void 0===t&&(t={}),e in n){var r=n[e],a={prevented:!1,name:e,args:t};if(i.call(this,r,a),a.prevented)return void(t.prevented=!0)}i.call(this,e,t)},h.prototype.toggleDropdown=function(){this.isDisabled()||(this.isOpen()?this.close():this.open())},h.prototype.open=function(){this.isOpen()||this.isDisabled()||this.trigger("query",{})},h.prototype.close=function(e){this.isOpen()&&this.trigger("close",{originalEvent:e})},h.prototype.isEnabled=function(){return!this.isDisabled()},h.prototype.isDisabled=function(){return this.options.get("disabled")},h.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")},h.prototype.hasFocus=function(){return this.$container.hasClass("select2-container--focus")}
1,h.prototype.focus=function(e){this.hasFocus()||(this.$container.addClass("select2-container--focus"),this.trigger("focus",{}))},h.prototype.enable=function(e){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),null!=e&&0!==e.length||(e=[!0]);var t=!e[0];this.$element.prop("disabled",t)},h.prototype.data=function(){this.options.get("debug")&&0<arguments.length&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var t=[];return this.dataAdapter.current(function(e){t=e}),t},h.prototype.val=function(e){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==e||0===e.length)return this.$element.val();var t=e[0];a.isArray(t)&&(t=a.map(t,function(e){return e.toString()})),this.$element.val(t).trigger("input").trigger("change")},h.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._syncA),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&(this.$element[0].removeEventListener("DOMAttrModified",this._syncA,!1),this.$element[0].removeEventListener("DOMNodeInserted",this._syncS,!1),this.$element[0].removeEventListener("DOMNodeRemoved",this._syncS,!1)),this._syncA=null,this._syncS=null,this.$element.off(".select2"),this.$element.attr("tabindex",c.GetData(this.$element[0],"old-tabindex")),this.$element.removeClass("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),c.RemoveData(this.$element[0]),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},h.prototype.render=function(){var e=a('<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return e.attr("dir",this.options.get("dir")),this.$container=e,this.$container.addClass("select2-container--"+this.options.get("theme")),c.StoreData(e[0],"element",this.$element),e},h}),e.define("jquery-mousewheel",["jquery"],function(e){return e}),e.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults","./select2/utils"],function(r,e,a,t,s){if(null==r.fn.select2){var o=["open","close","destroy"];r.fn.select2=function(t){if("object"==typeof(t=t||{}))return this.each(function(){var e=r.extend(!0,{},t);new a(r(this),e)}),this;if("string"!=typeof t)throw new Error("Invalid arguments for Select2: "+t);var i,n=Array.prototype.slice.call(arguments,1);return this.each(function(){var e=s.GetData(this,"select2");null==e&&window.console&&console.error&&console.error("The select2('"+t+"') method was called on an element that is not using Select2."),i=e[t].apply(e,n)}),-1<r.inArray(t,o)?this:i}}return null==r.fn.select2.defaults&&(r.fn.select2.defaults=t),a}),{define:e.define,require:e.require}}(),t=e.require("jquery.select2");return c.fn.select2.amd=e,t}),function(Se,e,De){"use strict";var Ne,Ce,Le,r,a,Ie="sly",Oe=e.cancelAnimationFrame||e.cancelRequestAnimationFrame,je=e.requestAnimationFrame,ke=Se(document),Pe="touchstart."+Ie+" mousedown."+Ie,Re="mousemove."+Ie+" mouseup."+Ie,ze="touchmove."+Ie+" touchend."+Ie,Ue=(document.implementation.hasFeature("Event.wheel","3.0")?"wheel.":"mousewheel.")+Ie,Be="click."+Ie,Fe="mousedown."+Ie,Ge=["INPUT","SELECT","BUTTON","TEXTAREA"],He=[],Ye=Math.abs,Qe=Math.sqrt,Ve=Math.pow,We=Math.round,qe=Math.max,Xe=Math.min,Ze=0;function $e(o,e,n){if(!(this instanceof $e))return new $e(o,e,n);var i,r,m=Se.extend({},$e.defaults,e),l=this,v=it(o),u=Se(o),y=m.slidee?Se(m.slidee).eq(0):u.children().eq(0),_=0,M=0,w={start:0,center:0,end:0,cur:0,dest:0},b=Se(m.scrollBar).eq(0),T=b.children().eq(0),A=0,x=0,E={start:0,end:0,cur:0},S=Se(m.pagesBar),D=0,N=[],C=0,L=[],I={firstItem:0,lastItem:0,centerItem:0,activeItem:null,activePage:0},a=new at(u[0]),s=new at(y[0]),c=new at(b[0]),h=new at(T[0]),t="basic"===m.itemNav,O="forceCentered"===m.itemNav,j="centered"===m.itemNav||O,k=!v&&(t||j||O),d=m.scrollSource?Se(m.scrollSource):u,p=m.dragSource?Se(m.dragSource):u,f=Se(m.forward),g=Se(m.backward),P=Se(m.prev),R=Se(m.next),z=Se(m.prevPage),U=Se(m.nextPage),B={},F={},G={},H={},Y={released:1},Q={last:0,delta:0,resetTime:200},V=0,W=0,q=0,X=0;function Z(e){var t=N.length;if(w.old=Se.extend({},w),_=v?0:u[m.horizontal?"width":"height"](),A=b[m.horizontal?"width":"height"](),M=v?o:y[m.horizontal?"outerWidth":"outerHeight"](),N.length=0,w.start=0,w.end=qe(M-_,0),k){
1L.length,C=y.children(m.itemSelector),L.length=0;var c,h=nt(y,m.horizontal?"paddingLeft":"paddingTop"),d=nt(y,m.horizontal?"paddingRight":"paddingBottom"),i="border-box"===Se(C).css("boxSizing"),p="none"!==C.css("float"),f=0,g=C.length-1;M=0,C.each(function(e,t){var i=Se(t),n=t.getBoundingClientRect(),r=We(m.horizontal?n.width||n.right-n.left:n.height||n.bottom-n.top),a=nt(i,m.horizontal?"marginLeft":"marginTop"),s=nt(i,m.horizontal?"marginRight":"marginBottom"),o=r+a+s,l=!a||!s,u={};u.el=t,u.size=l?r:o,u.half=u.size/2,u.start=M+(l?a:0),u.center=u.start-We(_/2-u.size/2),u.end=u.start-_+u.size,e||(M+=h),M+=o,m.horizontal||p||s&&a&&0<e&&(M-=Xe(a,s)),e===g&&(u.end+=d,M+=d,f=l?s:0),L.push(u),c=u}),y[0].style[m.horizontal?"width":"height"]=(i?M:M-h-d)+"px",M-=f,L.length?(w.start=L[0][O?"center":"start"],w.end=O?c.center:_<M?c.end:w.start):w.start=w.end=0}if(w.center=We(w.end/2+w.start/2),se(),T.length&&0<A&&(m.dynamicHandle?(x=rt(x=w.start===w.end?A:We(A*_/M),m.minHandleSize,A),T[0].style[m.horizontal?"width":"height"]=x+"px"):x=T[m.horizontal?"outerWidth":"outerHeight"](),E.end=A-x,V||J()),!v&&0<_){var n=w.start,r="";if(k)Se.each(L,function(e,t){O?N.push(t.center):t.start+t.size>n&&n<=w.end&&(n=t.start,N.push(n),(n+=_)>w.end&&n<w.end+_&&N.push(w.end))});else for(;n-_<w.end;)N.push(n),n+=_;if(S[0]&&t!==N.length){for(var a=0;a<N.length;a++)r+=m.pageBuilder.call(l,a);(D=S.html(r).children()).eq(I.activePage).addClass(m.activeClass)}}if(I.slideeSize=M,I.frameSize=_,I.sbSize=A,I.handleSize=x,k){e&&null!=m.startAt&&(re(m.startAt),l[j?"toCenter":"toStart"](m.startAt));var s=L[I.activeItem];$(j&&s?s.center:rt(w.dest,w.start,w.end))}else e?null!=m.startAt&&$(m.startAt,1):$(rt(w.dest,w.start,w.end));Ee("load")}function $(e,t,i){if(k&&Y.released&&!i){var n=ae(e),r=e>w.start&&e<w.end;j?(r&&(e=L[n.centerItem].center),O&&m.activateMiddle&&re(n.centerItem)):r&&(e=L[n.firstItem].start)}Y.init&&Y.slidee&&m.elasticBounds?e>w.end?e=w.end+(e-w.end)/6:e<w.start&&(e=w.start+(e-w.start)/6):e=rt(e,w.start,w.end),G.start=+new Date,G.time=0,G.from=w.cur,G.to=e,G.delta=e-w.cur,G.tweesing=Y.tweese||Y.init&&!Y.slidee,G.immediate=!G.tweesing&&(t||Y.init&&Y.slidee||!m.speed),Y.tweese=0,e!==w.dest&&(w.dest=e,Ee("change"),V||K()),ce(),se(),oe(),D[0]&&F.page!==I.activePage&&(F.page=I.activePage,D.removeClass(m.activeClass).eq(I.activePage).addClass(m.activeClass),Ee("activePage",F.page))}function K(){if(l.initialized){if(!V)return V=je(K),void(Y.released&&Ee("moveStart"));G.immediate?w.cur=G.to:G.tweesing?(G.tweeseDelta=G.to-w.cur,Ye(G.tweeseDelta)<.1?w.cur=G.to:w.cur+=G.tweeseDelta*(Y.released?m.swingSpeed:m.syncSpeed)):(G.time=Xe(new Date-G.start,m.speed),w.cur=G.from+G.delta*Se.easing[m.easing](G.time/m.speed,G.time,0,1,m.speed)),G.to===w.cur?(w.cur=G.to,Y.tweese=V=0):V=je(K),Ee("move"),v||(Ne?y[0].style[Ne]=Ce+(m.horizontal?"translateX":"translateY")+"("+-w.cur+"px)":y[0].style[m.horizontal?"left":"top"]=-We(w.cur)+"px"),!V&&Y.released&&Ee("moveEnd"),J()}}function J(){T.length&&(E.cur=w.start===w.end?0:((Y.init&&!Y.slidee?w.dest:w.cur)-w.start)/(w.end-w.start)*E.end,E.cur=rt(We(E.cur),E.start,E.end),F.hPos!==E.cur&&(F.hPos=E.cur,Ne?T[0].style[Ne]=Ce+(m.horizontal?"translateX":"translateY")+"("+E.cur+"px)":T[0].style[m.horizontal?"left":"top"]=E.cur+"px"))}function ee(){H.speed&&w.cur!==(0<H.speed?w.end:w.start)||l.stop(),X=Y.init?je(ee):0,H.now=+new Date,H.pos=w.cur+(H.now-H.lastTime)/1e3*H.speed,$(Y.init?H.pos:We(H.pos)),Y.init||w.cur!==w.dest||Ee("moveEnd"),H.lastTime=H.now}function te(e,t,i){if("boolean"===Ke(t)&&(i=t,t=De),t===De)$(w[e],i);else{if(j&&"center"!==e)return;var n=l.getPos(t);n&&$(n[e],i,!j)}}function ie(e){return null!=e?it(e)?0<=e&&e<L.length?e:-1:C.index(e):-1}function ne(e){return ie(it(e)&&e<0?e+L.length:e)}function re(e,t){var i=ie(e);return!(!k||i<0)&&(F.active===i&&!t||(C.eq(I.activeItem).removeClass(m.activeClass),C.eq(i).addClass(m.activeClass),F.active=I.activeItem=i,oe(),Ee("active",i)),i)}function ae(e){e=rt(it(e)?e:w.dest,w.start,w.end);var t={},i=O?0:_/2;if(!v)for(var n=0,r=N.length;n<r;n++){if(e>=w.end||n===N.length-1){t.activePage=N.length-1;break}if(e<=N[n]+i){t.activePage=n;break}}if(k){for(var a=!1,s=!1,o=!1,l=0,u=L.length;l<u;l++)if(!1===a&&e<=L[l].start+L[l].half&&(a=l),!1===o&&e<=L[l].center+L[l].half&&(
1o=l),l===u-1||e<=L[l].end+L[l].half){s=l;break}t.firstItem=it(a)?a:0,t.centerItem=it(o)?o:t.firstItem,t.lastItem=it(s)?s:t.centerItem}return t}function se(e){Se.extend(I,ae(e))}function oe(){var e=w.dest<=w.start,t=w.dest>=w.end,i=(e?1:0)|(t?2:0);if(F.slideePosState!==i&&(F.slideePosState=i,z.is("button,input")&&z.prop("disabled",e),U.is("button,input")&&U.prop("disabled",t),z.add(g)[e?"addClass":"removeClass"](m.disabledClass),U.add(f)[t?"addClass":"removeClass"](m.disabledClass)),F.fwdbwdState!==i&&Y.released&&(F.fwdbwdState=i,g.is("button,input")&&g.prop("disabled",e),f.is("button,input")&&f.prop("disabled",t)),k&&null!=I.activeItem){var n=0===I.activeItem,r=I.activeItem>=L.length-1,a=(n?1:0)|(r?2:0);F.itemsButtonState!==a&&(F.itemsButtonState=a,P.is("button,input")&&P.prop("disabled",n),R.is("button,input")&&R.prop("disabled",r),P[n?"addClass":"removeClass"](m.disabledClass),R[r?"addClass":"removeClass"](m.disabledClass))}}function le(e,t,i){if(e=ne(e),t=ne(t),-1<e&&-1<t&&e!==t&&(!i||t!==e-1)&&(i||t!==e+1)){C.eq(e)[i?"insertAfter":"insertBefore"](L[t].el);var n=e<t?e:i?t:t-1,r=t<e?e:i?t+1:t,a=t<e;null!=I.activeItem&&(e===I.activeItem?F.active=I.activeItem=i?a?t+1:t:a?t:t-1:I.activeItem>n&&I.activeItem<r&&(F.active=I.activeItem+=a?1:-1)),Z()}}function ue(e,t){for(var i=0,n=B[e].length;i<n;i++)if(B[e][i]===t)return i;return-1}function ce(){Y.released&&!l.isPaused&&l.resume()}function he(e){return We(rt(e,E.start,E.end)/E.end*(w.end-w.start))+w.start}function de(){Y.history[0]=Y.history[1],Y.history[1]=Y.history[2],Y.history[2]=Y.history[3],Y.history[3]=Y.delta}function pe(e){Y.released=0,Y.source=e,Y.slidee="slidee"===e}function fe(e){var t="touchstart"===e.type,i=e.data.source,n="slidee"===i;Y.init||!t&&ve(e.target)||("handle"!==i||m.dragHandle&&E.start!==E.end)&&(n&&!(t?m.touchDragging:m.mouseDragging&&e.which<2)||(t||Je(e),pe(i),Y.init=0,Y.$source=Se(e.target),Y.touch=t,Y.pointer=t?e.originalEvent.touches[0]:e,Y.initX=Y.pointer.pageX,Y.initY=Y.pointer.pageY,Y.initPos=n?w.cur:E.cur,Y.start=+new Date,Y.time=0,Y.path=0,Y.delta=0,Y.locked=0,Y.history=[0,0,0,0],Y.pathToLock=n?t?30:10:0,ke.on(t?ze:Re,ge),l.pause(1),(n?y:T).addClass(m.draggedClass),Ee("moveStart"),n&&(W=setInterval(de,10))))}function ge(e){if(Y.released="mouseup"===e.type||"touchend"===e.type,Y.pointer=Y.touch?e.originalEvent[Y.released?"changedTouches":"touches"][0]:e,Y.pathX=Y.pointer.pageX-Y.initX,Y.pathY=Y.pointer.pageY-Y.initY,Y.path=Qe(Ve(Y.pathX,2)+Ve(Y.pathY,2)),Y.delta=m.horizontal?Y.pathX:Y.pathY,Y.released||!(Y.path<1)){if(!Y.init){if(Y.path<m.dragThreshold)return Y.released?me():De;if(!(m.horizontal?Ye(Y.pathX)>Ye(Y.pathY):Ye(Y.pathX)<Ye(Y.pathY)))return me();Y.init=1}Je(e),!Y.locked&&Y.path>Y.pathToLock&&Y.slidee&&(Y.locked=1,Y.$source.on(Be,et)),Y.released&&(me(),m.releaseSwing&&Y.slidee&&(Y.swing=(Y.delta-Y.history[0])/40*300,Y.delta+=Y.swing,Y.tweese=10<Ye(Y.swing))),$(Y.slidee?We(Y.initPos-Y.delta):he(Y.initPos+Y.delta))}}function me(){clearInterval(W),Y.released=!0,ke.off(Y.touch?ze:Re,ge),(Y.slidee?y:T).removeClass(m.draggedClass),setTimeout(function(){Y.$source.off(Be,et)}),w.cur===w.dest&&Y.init&&Ee("moveEnd"),l.resume(1),Y.init=0}function ve(e){return~Se.inArray(e.nodeName,Ge)||Se(e).is(m.interactive)}function ye(){l.stop(),ke.off("mouseup",ye)}function _e(e){switch(Je(e),this){case f[0]:case g[0]:l.moveBy(f.is(this)?m.moveBy:-m.moveBy),ke.on("mouseup",ye);break;case P[0]:l.prev();break;case R[0]:l.next();break;case z[0]:l.prevPage();break;case U[0]:l.nextPage()}}function Me(e){e.originalEvent[Ie]=l;var t=+new Date;if(Ze+m.scrollHijack>t&&d[0]!==document&&d[0]!==window)Ze=t;else if(m.scrollBy&&w.start!==w.end){var i,n=(i=e.originalEvent,Q.curDelta=(m.horizontal?i.deltaY||i.deltaX:i.deltaY)||-i.wheelDelta,Q.curDelta/=1===i.deltaMode?3:100,k?(Le=+new Date,Q.last<Le-Q.resetTime&&(Q.delta=0),Q.last=Le,Q.delta+=Q.curDelta,Ye(Q.delta)<1?Q.finalDelta=0:(Q.finalDelta=We(+Q.delta),Q.delta%=1),Q.finalDelta):Q.curDelta);(m.scrollTrap||0<n&&w.dest<w.end||n<0&&w.dest>w.start)&&Je(e,1),l.slideBy(m.scrollBy*n)}}function we(e){m.clickBar&&e.target===b[0]&&(Je(e),$(he((m.horizontal?e.pageX-b.offset().left:e.pageY-b.offset().top)-x/2)))}function be(e){if(m.keyboardNavBy)switch(e.which){case m.horizontal?37:38:Je(e),l["pages"===m.keyboardNavBy?"prevPage":"prev"]();break;case m.horizontal?39:40:Je(e),l["pages"===m.keyboardNavBy?"nextPage":"next"]()}}function Te(e){ve(this)?e.originalEvent[Ie+"ignore"]=!0:this.parentNode!==y[0]||e.originalEvent[Ie+"ignore"]||l.activate(this)}function Ae(){this.parentNode===S[0]&&l.activatePage(D.index(this))}
1function xe(e){m.pauseOnHover&&l["mouseenter"===e.type?"pause":"resume"](2)}function Ee(e,t){if(B[e]){for(r=B[e].length,He.length=0,i=0;i<r;i++)He.push(B[e][i]);for(i=0;i<r;i++)He[i].call(l,e,t)}}v||(o=u[0]),l.initialized=0,l.frame=o,l.slidee=y[0],l.pos=w,l.rel=I,l.items=L,l.pages=N,l.isPaused=0,l.options=m,l.dragging=Y,l.reload=function(){Z()},l.getPos=function(e){if(k){var t=ie(e);return-1!==t&&L[t]}var i=y.find(e).eq(0);if(i[0]){var n=m.horizontal?i.offset().left-y.offset().left:i.offset().top-y.offset().top,r=i[m.horizontal?"outerWidth":"outerHeight"]();return{start:n,center:n-_/2+r/2,end:n-_+r,size:r}}return!1},l.moveBy=function(e){H.speed=e,!Y.init&&H.speed&&w.cur!==(0<H.speed?w.end:w.start)&&(H.lastTime=+new Date,H.startPos=w.cur,pe("button"),Y.init=1,Ee("moveStart"),Oe(X),ee())},l.stop=function(){"button"===Y.source&&(Y.init=0,Y.released=1)},l.prev=function(){l.activate(null==I.activeItem?0:I.activeItem-1)},l.next=function(){l.activate(null==I.activeItem?0:I.activeItem+1)},l.prevPage=function(){l.activatePage(I.activePage-1)},l.nextPage=function(){l.activatePage(I.activePage+1)},l.slideBy=function(e,t){e&&(k?l[j?"toCenter":"toStart"](rt((j?I.centerItem:I.firstItem)+m.scrollBy*e,0,L.length)):$(w.dest+e,t))},l.slideTo=function(e,t){$(e,t)},l.toStart=function(e,t){te("start",e,t)},l.toEnd=function(e,t){te("end",e,t)},l.toCenter=function(e,t){te("center",e,t)},l.getIndex=ie,l.activate=function(e,t){var i=re(e);m.smart&&!1!==i&&(j?l.toCenter(i,t):i>=I.lastItem?l.toStart(i,t):i<=I.firstItem?l.toEnd(i,t):ce())},l.activatePage=function(e,t){it(e)&&$(N[rt(e,0,N.length-1)],t)},l.resume=function(e){m.cycleBy&&m.cycleInterval&&("items"!==m.cycleBy||L[0]&&null!=I.activeItem)&&!(e<l.isPaused)&&(l.isPaused=0,q?q=clearTimeout(q):Ee("resume"),q=setTimeout(function(){switch(Ee("cycle"),m.cycleBy){case"items":l.activate(I.activeItem>=L.length-1?0:I.activeItem+1);break;case"pages":l.activatePage(I.activePage>=N.length-1?0:I.activePage+1)}},m.cycleInterval))},l.pause=function(e){e<l.isPaused||(l.isPaused=e||100,q&&(q=clearTimeout(q),Ee("pause")))},l.toggle=function(){l[q?"pause":"resume"]()},l.set=function(e,t){Se.isPlainObject(e)?Se.extend(m,e):m.hasOwnProperty(e)&&(m[e]=t)},l.add=function(e,t){var i=Se(e);k?(null==t||!L[0]||t>=L.length?i.appendTo(y):L.length&&i.insertBefore(L[t].el),null!=I.activeItem&&t<=I.activeItem&&(F.active=I.activeItem+=i.length)):y.append(i),Z()},l.remove=function(e){if(k){var t=ne(e);if(-1<t){C.eq(t).remove();var i=t===I.activeItem;null!=I.activeItem&&t<I.activeItem&&(F.active=--I.activeItem),Z(),i&&(F.active=null,l.activate(I.activeItem))}}else Se(e).remove(),Z()},l.moveAfter=function(e,t){le(e,t,1)},l.moveBefore=function(e,t){le(e,t)},l.on=function(e,t){if("object"===Ke(e))for(var i in e)e.hasOwnProperty(i)&&l.on(i,e[i]);else if("function"===Ke(t))for(var n=e.split(" "),r=0,a=n.length;r<a;r++)B[n[r]]=B[n[r]]||[],-1===ue(n[r],t)&&B[n[r]].push(t);else if("array"===Ke(t))for(var s=0,o=t.length;s<o;s++)l.on(e,t[s])},l.one=function(t,i){l.on(t,function e(){i.apply(l,arguments),l.off(t,e)})},l.off=function(e,t){if(t instanceof Array)for(var i=0,n=t.length;i<n;i++)l.off(e,t[i]);else for(var r=e.split(" "),a=0,s=r.length;a<s;a++)if(B[r[a]]=B[r[a]]||[],null==t)B[r[a]].length=0;else{var o=ue(r[a],t);-1!==o&&B[r[a]].splice(o,1)}},l.destroy=function(){return $e.removeInstance(o),d.add(T).add(b).add(S).add(f).add(g).add(P).add(R).add(z).add(U).off("."+Ie),ke.off("keydown",be),P.add(R).add(z).add(U).removeClass(m.disabledClass),C&&null!=I.activeItem&&C.eq(I.activeItem).removeClass(m.activeClass),S.empty(),v||(u.off("."+Ie),a.restore(),s.restore(),c.restore(),h.restore(),Se.removeData(o,Ie)),L.length=N.length=0,F={},l.initialized=0,l},l.init=function(){if(!l.initialized){if($e.getInstance(o))throw new Error("There is already a Sly instance on this element");$e.storeInstance(o,l),l.on(n);var e=["overflow","position"],t=["position","webkitTransform","msTransform","transform","left","top","width","height"];a.save.apply(a,e),c.save.apply(c,e),s.save.apply(s,t),h.save.apply(h,t);var i=T;return v||(i=i.add(y),u.css("overflow","hidden"),Ne||"static"!==u.css("position")||u.css("position","relative")),Ne?Ce&&i.css(Ne,Ce):("static"===b.css("position")&&b.css("position","relative"),i.css({position:"absolute"})),m.forward&&f.on(Fe,_e),m.backward&&g.on(Fe,_e),m.prev&&P.on(Be,_e),m.next&&R.on(Be,_e),m.prevPage&&z.on(Be,_e),m.nextPage&&U.on(Be,_e),d.on(Ue,Me),b[0]&&b.on(Be,we),k&&m.activateOn&&u.on(m.activateOn+"."+Ie,"*",Te),S[0]&&m.activatePageOn&&S.on(m.activatePageOn+"."+Ie,"*",Ae),p.on(Pe,{source:"slidee"},fe),T&&T.on(Pe,{source:"handle"}
1,fe),ke.on("keydown",be),v||(u.on("mouseenter."+Ie+" mouseleave."+Ie,xe),u.on("scroll."+Ie,tt)),l.initialized=1,Z(!0),m.cycleBy&&!v&&l[m.startPaused?"pause":"resume"](),l}}}function Ke(e){return null==e?String(e):"object"==typeof e||"function"==typeof e?Object.prototype.toString.call(e).match(/\s([a-z]+)/i)[1].toLowerCase()||"object":typeof e}function Je(e,t){e.preventDefault(),t&&e.stopPropagation()}function et(e){Je(e,1),Se(this).off(e.type,et)}function tt(){this.scrollLeft=0,this.scrollTop=0}function it(e){return!isNaN(parseFloat(e))&&isFinite(e)}function nt(e,t){return 0|We(String(e.css(t)).replace(/[^\-0-9.]/g,""))}function rt(e,t,i){return e<t?t:i<e?i:e}function at(t){var i={style:{},save:function(){if(t&&t.nodeType){for(var e=0;e<arguments.length;e++)i.style[arguments[e]]=t.style[arguments[e]];return i}},restore:function(){if(t&&t.nodeType){for(var e in i.style)i.style.hasOwnProperty(e)&&(t.style[e]=i.style[e]);return i}}};return i}function t(e){for(var t=0,i=r.length;t<i;t++){var n=r[t]?r[t]+e.charAt(0).toUpperCase()+e.slice(1):e;if(null!=a.style[n])return n}}ke.on(Ue,function(e){var t=e.originalEvent[Ie],i=+new Date;(!t||t.options.scrollHijack<i-Ze)&&(Ze=i)}),$e.getInstance=function(e){return Se.data(e,Ie)},$e.storeInstance=function(e,t){return Se.data(e,Ie,t)},$e.removeInstance=function(e){return Se.removeData(e,Ie)},function(t){je=t.requestAnimationFrame||t.webkitRequestAnimationFrame||function(e){var t=(new Date).getTime(),i=Math.max(0,16-(t-r)),n=setTimeout(e,i);return r=t,n};var r=(new Date).getTime();var i=t.cancelAnimationFrame||t.webkitCancelAnimationFrame||t.clearTimeout;Oe=function(e){i.call(t,e)}}(window),r=["","Webkit","Moz","ms","O"],a=document.createElement("div"),Ne=t("transform"),Ce=t("perspective")?"translateZ(0) ":"",e.Sly=$e,Se.fn.sly=function(n,r){var a,s;return Se.isPlainObject(n)||("string"!==Ke(n)&&!1!==n||(a=!1===n?"destroy":n,s=Array.prototype.slice.call(arguments,1)),n={}),this.each(function(e,t){var i=$e.getInstance(t);i||a?i&&a&&i[a]&&i[a].apply(i,s):i=new $e(t,n,r).init()})},$e.defaults={slidee:null,horizontal:!1,itemNav:null,itemSelector:null,smart:!1,activateOn:null,activateMiddle:!1,scrollSource:null,scrollBy:0,scrollHijack:300,scrollTrap:!1,dragSource:null,mouseDragging:!1,touchDragging:!1,releaseSwing:!1,swingSpeed:.2,elasticBounds:!1,dragThreshold:3,interactive:null,scrollBar:null,dragHandle:!1,dynamicHandle:!1,minHandleSize:50,clickBar:!1,syncSpeed:.5,pagesBar:null,activatePageOn:null,pageBuilder:function(e){return"<li>"+(e+1)+"</li>"},forward:null,backward:null,prev:null,next:null,prevPage:null,nextPage:null,cycleBy:null,cycleInterval:5e3,pauseOnHover:!1,startPaused:!1,moveBy:300,speed:0,easing:"swing",startAt:null,keyboardNavBy:null,draggedClass:"dragged",activeClass:"active",disabledClass:"disabled"}}(jQuery,window),function(){var C,L;C=this.jQuery||window.jQuery,L=C(window),C.fn.stick_in_parent=function(e){var T,t,A,x,E,S,r,i,D,N,n,a,s;for(null==e&&(e={}),N=e.sticky_class,x=e.inner_scrolling,D=e.recalc_every,i=e.parent,S=e.offset_top,E=e.spacer,A=e.bottoming,null==S&&(S=0),null==i&&(i=void 0),null==x&&(x=!0),null==N&&(N="is_stuck"),T=C(document),null==A&&(A=!0),r=function(e){var t,i;return window.getComputedStyle?(e[0],t=window.getComputedStyle(e[0]),i=parseFloat(t.getPropertyValue("width"))+parseFloat(t.getPropertyValue("margin-left"))+parseFloat(t.getPropertyValue("margin-right")),"border-box"!==t.getPropertyValue("box-sizing")&&(i+=parseFloat(t.getPropertyValue("border-left-width"))+parseFloat(t.getPropertyValue("border-right-width"))+parseFloat(t.getPropertyValue("padding-left"))+parseFloat(t.getPropertyValue("padding-right"))),i):e.outerWidth(!0)},n=function(s,o,l,u,c,h,d,p){var f,e,g,m,v,y,_,M,t,w,b,n;if(!s.data("sticky_kit")){if(s.data("sticky_kit",!0),v=T.height(),_=s.parent(),null!=i&&(_=_.closest(i)),!_.length)throw"failed to find stick parent";if(f=g=!1,(b=null!=E?E&&s.closest(E):C("<div />"))&&b.css("position",s.css("position")),(M=function(){var e,t,i;if(!p)return v=T.height(),e=parseInt(_.css("border-top-width"),10),t=parseInt(_.css("padding-top"),10),o=parseInt(_.css("padding-bottom"),10),l=_.offset().top+e+t,u=_.height(),g&&(f=g=!1,null==E&&(s.insertAfter(b),b.detach()),s.css({position:"",top:"",width:"",bottom:""}).removeClass(N),i=!0),c=s.offset().top-(parseInt(s.css("margin-top"),10)||0)-S,h=s.outerHeight(!0),d=s.css("float"),b&&b.css({width:r(s),height:h,display:s.css("display"),"vertical-align":s.css("vertical-align"),float:d}),i?n():void 0})(),h!==u)return m=void 0,y=S,w=D,n=function(){var e,t,i,n,r,a;if(!p)return i=!1,null!=w&&--w<=0&&(w=D,M(),i=!0),i||T.height()===v||(M(),i=!0),n=L.scrollTop(),null!=m&&(t=n-m),m=n,g?(A&&(r=u+l<n+h+y,f&&!r&&(f=!1,s.css({position:"fixed",bottom:"",top:y}).trigger("sticky_kit:unbottom"))),n<c&&(g=!1,y=S,null==E&&("left"!==d&&"right"!==d||s.insertAfter(b),b.detach()),e={position:"",width:"",top:""},s.css(e).removeClass(N).trigger("sticky_kit:unstick")),x&&(a=L.height())<h+S&&(f||(y-=t,y=Math.max(a-h,y),y=Math.min(S,y),g&&s.css({top:y+"px"})))):c<n&&(g=!0,(e={position:"fixed",top:y}).width="border-box"===s.css("box-sizing")?s.outerWidth()+"px":s.width()+"px",s.css(e).addClass(N),null==E&&(s.after(b),"left"!==d&&"right"!==d||b.append(s)),s.trigger("sticky_kit:stick")),g&&A&&(null==r&&(r=u+l<n+h+y),!f&&r)?(f=!0,"static"===_.css("position")&&_.css({position:"relative"}),s.css({position:"absolute",bottom:o,top:"auto"}).trigger("sticky_kit:bottom")):void 0},t=function(){return M(),n()},e=function(){if(p=!0,L.off("touchmove",n),L.off("scroll",n),L.off("resize",t),C(document.body).off("sticky_kit:recalc",t),s.off("sticky_kit:detach",e),s.removeData("sticky_kit"),s.css({position:"",bottom:"",top:"",width:""}),_.position("position",""),g)return null==E&&("left"!==d&&"right"!==d||s.insertAfter(b),b.remove()),s.removeClass(N)},L.on("touchmove",n),L.on("scroll",n),L.on("resize",t),C(document.body).on("sticky_kit:recalc",t),s.on("sticky_kit:detach",e),setTimeout(n,0)}},a=0,s=this.length;a<s;a++)t=this[a],n(C(t));return this}}.call(this);var tns=function(){Object.keys||(Object.keys=function(e){var t=[];
vendor: 21,390 bytes, line 1
1for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.push(i);return t}),"remove"in Element.prototype||(Element.prototype.remove=function(){this.parentNode&&this.parentNode.removeChild(this)});var e=window,Ln=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.msRequestAnimationFrame||function(e){return setTimeout(e,16)},t=window,In=t.cancelAnimationFrame||t.mozCancelAnimationFrame||function(e){clearTimeout(e)};function On(e){for(var t,i,n,r=e||{},a=1,s=arguments.length;a<s;a++)if(null!==(t=arguments[a]))for(i in t)r!==(n=t[i])&&void 0!==n&&(r[i]=n);return r}function jn(e){return 0<=["true","false"].indexOf(e)?JSON.parse(e):e}function kn(e,t,i,n){if(n)try{e.setItem(t,i)}catch(e){}return i}function Pn(){var e=document,t=e.body;return t||((t=e.createElement("body")).fake=!0),t}var i=document.documentElement;function Rn(e){var t="";return e.fake&&(t=i.style.overflow,e.style.background="",e.style.overflow=i.style.overflow="hidden",i.appendChild(e)),t}function zn(e,t){e.fake&&(e.remove(),i.style.overflow=t,i.offsetHeight)}function Un(e,t,i,n){"insertRule"in e?e.insertRule(t+"{"+i+"}",n):e.addRule(t,i,n)}function Bn(e){return("insertRule"in e?e.cssRules:e.rules).length}function Fn(e,t,i){for(var n=0,r=e.length;n<r;n++)t.call(i,e[n],n)}var n="classList"in document.createElement("_"),Gn=n?function(e,t){return e.classList.contains(t)}:function(e,t){return 0<=e.className.indexOf(t)},Hn=n?function(e,t){Gn(e,t)||e.classList.add(t)}:function(e,t){Gn(e,t)||(e.className+=" "+t)},Yn=n?function(e,t){Gn(e,t)&&e.classList.remove(t)}:function(e,t){Gn(e,t)&&(e.className=e.className.replace(t,""))};function Qn(e,t){return e.hasAttribute(t)}function Vn(e,t){return e.getAttribute(t)}function a(e){return void 0!==e.item}function Wn(e,t){if(e=a(e)||e instanceof Array?e:[e],"[object Object]"===Object.prototype.toString.call(t))for(var i=e.length;i--;)for(var n in t)e[i].setAttribute(n,t[n])}function qn(e,t){e=a(e)||e instanceof Array?e:[e];for(var i=(t=t instanceof Array?t:[t]).length,n=e.length;n--;)for(var r=i;r--;)e[n].removeAttribute(t[r])}function Xn(e){for(var t=[],i=0,n=e.length;i<n;i++)t.push(e[i]);return t}function Zn(e,t){"none"!==e.style.display&&(e.style.display="none")}function $n(e,t){"none"===e.style.display&&(e.style.display="")}function Kn(e){return"none"!==window.getComputedStyle(e).display}function Jn(t){if("string"==typeof t){var i=[t],n=t.charAt(0).toUpperCase()+t.substr(1);["Webkit","Moz","ms","O"].forEach(function(e){"ms"===e&&"transform"!==t||i.push(e+n)}),t=i}for(var e=document.createElement("fakeelement"),r=(t.length,0);r<t.length;r++){var a=t[r];if(void 0!==e.style[a])return a}return!1}function er(e,t){var i=!1;return/^Webkit/.test(e)?i="webkit"+t+"End":/^O/.test(e)?i="o"+t+"End":e&&(i=t.toLowerCase()+"end"),i}var r=!1;try{var s=Object.defineProperty({},"passive",{get:function(){r=!0}});window.addEventListener("test",null,s)}catch(e){}var o=!!r&&{passive:!0};function tr(e,t,i){for(var n in t){var r=0<=["touchstart","touchmove"].indexOf(n)&&!i&&o;e.addEventListener(n,t[n],r)}}function ir(e,t){for(var i in t){var n=0<=["touchstart","touchmove"].indexOf(i)&&o;e.removeEventListener(i,t[i],n)}}function nr(){return{topics:{},on:function(e,t){this.topics[e]=this.topics[e]||[],this.topics[e].push(t)},off:function(e,t){if(this.topics[e])for(var i=0;i<this.topics[e].length;i++)if(this.topics[e][i]===t){this.topics[e].splice(i,1);break}},emit:function(t,i){i.type=t,this.topics[t]&&this.topics[t].forEach(function(e){e(i,t)})}}}var rr=function(L){L=On({container:".slider",mode:"carousel",axis:"horizontal",items:1,gutter:0,edgePadding:0,fixedWidth:!1,autoWidth:!1,viewportMax:!1,slideBy:1,center:!1,controls:!0,controlsPosition:"top",controlsText:["prev","next"],controlsContainer:!1,prevButton:!1,nextButton:!1,nav:!0,navPosition:"top",navContainer:!1,navAsThumbnails:!1,arrowKeys:!1,speed:300,autoplay:!1,autoplayPosition:"top",autoplayTimeout:5e3,autoplayDirection:"forward",autoplayText:["start","stop"],autoplayHoverPause:!1,autoplayButton:!1,autoplayButtonOutput:!0,autoplayResetOnVisibility:!0,animateIn:"tns-fadeIn",animateOut:"tns-fadeOut",animateNormal:"tns-normal",animateDelay:!1,loop:!0,rewind:!1,autoHeight:!1,responsive:!1,lazyload:!1,lazyloadSelector:".tns-lazy-img",touch:!0,mouseDrag:!1,swipeAngle:15,nested:!1,preventActionWhenRunning:!1,preventScrollOnTouch:!1,freezable:!0,onInit:!1,useLocalStorage:!0},L||{});var I=document,m=window,r={ENTER:13,SPACE:32,LEFT:37,RIGHT:39},t={},i=L.useLocalStorage;if(i){var e=navigator.userAgent,n=new Date;try{(t=m.localStorage)?(t.setItem(n,n),i=t.getItem(n)==n,t.removeItem(n)):i=!1,i||(t={})}catch(e){i=!1}i&&(t.tnsApp&&t.tnsApp!==e&&["tC","tPL","tMQ","tTf","t3D","tTDu","tTDe","tADu","tADe","tTE","tAE"].forEach(function(e){t.removeItem(e)}),localStorage.tnsApp=e)}var a,s,o,l,u,c,h,v=t.tC?jn(t.tC):kn(t,"tC",function(){var e=document,t=Pn(),i=Rn(t),n=e.createElement("div"),r=!1;t.appendChild(n);try{for(var a,s="(10px * 10)",o=["calc"+s,"-moz-calc"+s,"-webkit-calc"+s],l=0;l<3;l++)if(a=o[l],n.style.width=a,100===n.offsetWidth){r=a.replace(s,"");break}}catch(e){}return t.fake?zn(t,i):n.remove(),r}(),i),y=t.tPL?jn(t.tPL):kn(t,"tPL",function(){var e,t=document,i=Pn(),n=Rn(i),r=t.createElement("div"),a=t.createElement("div"),s="";r.className="tns-t-subp2",a.className="tns-t-ct";for(var o=0;o<70;o++)s+="<div></div>";return a.innerHTML=s,r.appendChild(a),i.appendChild(r),e=Math.abs(r.getBoundingClientRect().left-a.children[67].getBoundingClientRect().left)<2,i.fake?zn(i,n):r.remove(),e}(),i),O=t.tMQ?jn(t.tMQ):kn(t,"tMQ",(s=document,o=Pn(),l=Rn(o),u=s.createElement("div"),c=s.createElement("style"),h="@media all and (min-width:1px){.tns-mq-test{position:absolute}}",c.type="text/css",u.className="tns-mq-test",o.appendChild(c),o.appendChild(u),c.styleSheet?c.styleSheet.cssText=h:c.appendChild(s.createTextNode(h)),a=window.getComputedStyle?window.getComputedStyle(u).position:u.currentStyle.position,o.fake?zn(o,l):u.remove(),"absolute"===a),i),d=t.tTf?jn(t.tTf):kn(t,"tTf",Jn("transform"),i),p=t.t3D?jn(t.t3D):kn(t,"t3D",function(e){if(!e)return!1;if(!window.getComputedStyle)return!1;var t,i=document,n=Pn(),r=Rn(n),a=i.createElement("p"),s=9<e.length?"-"+e.slice(0,-9).toLowerCase()+"-":"";return s+="transform",n.insertBefore(a,null),a.style[e]="translate3d(1px,1px,1px)",t=window.getComputedStyle(a).getPropertyValue(s),n.fake?zn(n,r):a.remove(),void 0!==t&&0<t.length&&"none"!==t}(d),i),_=t.tTDu?jn(t.tTDu):kn(t,"tTDu",Jn("transitionDuration"),i),f=t.tTDe?jn(t.tTDe):kn(t,"tTDe",Jn("transitionDelay"),i),M=t.tADu?jn(t.tADu):kn(t,"tADu",Jn("animationDuration"),i),g=t.tADe?jn(t.tADe):kn(t,"tADe",Jn("animationDelay"),i),w=t.tTE?jn(t.tTE):kn(t,"tTE",er(_,"Transition"),i),b=t.tAE?jn(t.tAE):kn(t,"tAE",er(M,"Animation"),i),T=m.console&&"function"==typeof m.console.warn,A=["container","controlsContainer","prevButton","nextButton","navContainer","autoplayButton"],x={};if(A.forEach(function(e){if("string"==typeof L[e]){var t=L[e],i=I.querySelector(t);if(x[e]=t,!i||!i.nodeName)return void(T&&console.warn("Can't find",L[e]));L[e]=i}}),!(L.container.children.length<1)){var j=L.responsive,k=L.nested,P="carousel"===L.mode;if(j){0 in j&&(L=On(L,j[0]),delete j[0]);var E={};for(var S in j){var D=j[S];D="number"==typeof D?{items:D}:D,E[S]=D}j=E,E=null}if(P||!function e(t){for(var i in t)P||("slideBy"===i&&(t[i]="page"),"edgePadding"===i&&(t[i]=!1),"autoHeight"===i&&(t[i]=!1)),"responsive"===i&&e(t[i])}(L),!P){L.axis="horizontal",L.slideBy="page",L.edgePadding=!1;var R=L.animateIn,z=L.animateOut,N=L.animateDelay,U=L.animateNormal}var C,B,F="horizontal"===L.axis,G=I.createElement("div"),H=I.createElement("div"),Y=L.container,Q=Y.parentNode,V=Y.outerHTML,W=Y.children,q=W.length,X=li(),Z=!1;j&&Di(),P&&(Y.className+=" tns-vpfix");var $,K,J,ee,te,ie,ne,re,ae=L.autoWidth,se=di("fixedWidth"),oe=di("edgePadding"),le=di("gutter"),ue=ci(),ce=di("center"),he=ae?1:Math.floor(di("items")),de=di("slideBy"),pe=L.viewportMax||L.fixedWidthViewportWidth,fe=di("arrowKeys"),ge=di("speed"),me=L.rewind,ve=!me&&L.loop,ye=di("autoHeight"),_e=di("controls"),Me=di("controlsText"),we=di("nav"),be=di("touch"),Te=di("mouseDrag"),Ae=di("autoplay"),xe=di("autoplayTimeout"),Ee=di("autoplayText"),Se=di("autoplayHoverPause"),De=di("autoplayResetOnVisibility"),Ne=(re=document.createElement("style"),ne&&re.setAttribute("media",ne),document.querySelector("head").appendChild(re),re.sheet?re.sheet:re.styleSheet),Ce=L.lazyload,Le=(L.lazyloadSelector,[]),Ie=ve?(te=function(){{if(ae||se&&!pe)return q-1;var e=se?"fixedWidth":"items",t=[];if((se||L[e]<q)&&t.push(L[e]),j)for(var i in j){var n=j[i][e];n&&(se||n<q)&&t.push(n)}return t.length||t.push(0),Math.ceil(se?pe/Math.min.apply(null,t):Math.max.apply(null,t))}}(),ie=P?Math.ceil((5*te-q)/2):4*te-q,ie=Math.max(te,ie),hi("edgePadding")?ie+1:ie):0,Oe=P?q+2*Ie:q+Ie,je=!(!se&&!ae||ve),ke=se?tn():null,Pe=!P||!ve,Re=F?"left":"top",ze="",Ue="",Be=se?function(){return ce&&!ve?q-1:Math.ceil(-ke/(se+le))}:ae?function(){for(var e=Oe;e--;)if($[e]>=-ke)return e}:function(){return ce&&P&&!ve?q-1:ve||P?Math.max(0,Oe-Math.ceil(he)):Oe-1},Fe=ai(di("startIndex")),Ge=Fe,He=(ri(),0),Ye=ae?null:Be(),Qe=L.preventActionWhenRunning,Ve=L.swipeAngle,We=!Ve||"?",qe=!1,Xe=L.onInit,Ze=new nr,$e=" tns-slider tns-"+L.mode,Ke=Y.id||(ee=window.tnsId,window.tnsId=ee?ee+1:1,"tns"+window.tnsId),Je=di("disable"),et=!1,tt=L.freezable,it=!(!tt||ae)&&Si(),nt=!1,rt={click:hn,keydown:function(e){e=_n(e);var t=[r.LEFT,r.RIGHT].indexOf(e.keyCode);0<=t&&(0===t?xt.disabled||hn(e,-1):Et.disabled||hn(e,1))}},at={click:function(e){if(qe){if(Qe)return;un()}var t=Mn(e=_n(e));for(;t!==Ct&&!Qn(t,"data-nav");)t=t.parentNode;if(Qn(t,"data-nav")){var i=jt=Number(Vn(t,"data-nav")),n=se||ae?i*q/It:i*he;cn(pt?i:Math.min(Math.ceil(n),q-1),e),kt===i&&(Ft&&mn(),jt=-1)}},keydown:function(e){e=_n(e);var t=I.activeElement;if(!Qn(t,"data-nav"))return;var i=[r.LEFT,r.RIGHT,r.ENTER,r.SPACE].indexOf(e.keyCode),n=Number(Vn(t,"data-nav"));0<=i&&(0===i?0<n&&yn(Nt[n-1]):1===i?n<It-1&&yn(Nt[n+1]):cn(jt=n,e))}},st={mouseover:function(){Ft&&(pn(),Gt=!0)},mouseout:function(){Gt&&(dn(),Gt=!1)}},ot={visibilitychange:function(){I.hidden?Ft&&(pn(),Yt=!0):Yt&&(dn(),Yt=!1)}},lt={keydown:function(e){e=_n(e);var t=[r.LEFT,r.RIGHT].indexOf(e.keyCode);0<=t&&hn(e,0===t?-1:1)}},ut={touchstart:An,touchmove:xn,touchend:En,touchcancel:En},ct={mousedown:An,mousemove:xn,mouseup:En,mouseleave:En},ht=hi("controls"),dt=hi("nav"),pt=!!ae||L.navAsThumbnails,ft=hi("autoplay"),gt=hi("touch"),mt=hi("mouseDrag"),vt="tns-slide-active",yt="tns-complete",_t={load:function(e){Ri(Mn(e))},error:function(e){!function(e){Hn(e,"failed"),zi(e)}(Mn(e))}},Mt="force"===L.preventScrollOnTouch;if(ht)var wt,bt,Tt=L.controlsContainer,At=L.controlsContainer?L.controlsContainer.outerHTML:"",xt=L.prevButton,Et=L.nextButton,St=L.prevButton?L.prevButton.outerHTML:"",Dt=L.nextButton?L.nextButton.outerHTML:"";if(dt)var Nt,Ct=L.navContainer,Lt=L.navContainer?L.navContainer.outerHTML:"",It=ae?q:Dn(),Ot=0,jt=-1,kt=oi(),Pt=kt,Rt="tns-nav-active",zt="Carousel Page ",Ut=" (Current Slide)";if(ft)var Bt,Ft,Gt,Ht,Yt,Qt="forward"===L.autoplayDirection?1:-1,Vt=L.autoplayButton,Wt=L.autoplayButton?L.autoplayButton.outerHTML:"",qt=["<span class='tns-visually-hidden'>"," animation</span>"];if(gt||mt)var Xt,Zt,$t={},Kt={},Jt=!1,ei=F?function(e,t){return e.x-t.x}:function(e,t){return e.y-t.y};ae||ni(Je||it),d&&(Re=d,ze="translate",Ue=p?(ze+=F?"3d(":"3d(0px, ",F?", 0px, 0px)":", 0px)"):(ze+=F?"X(":"Y(",")")),P&&(Y.className=Y.className.replace("tns-vpfix","")),function(){hi("gutter");G.className="tns-outer",H.className="tns-inner",G.id=Ke+"-ow",H.id=Ke+"-iw",""===Y.id&&(Y.id=Ke);$e+=y||ae?" tns-subpixel":" tns-no-subpixel",$e+=v?" tns-calc":" tns-no-calc",ae&&($e+=" tns-autowidth");$e+=" tns-"+L.axis,Y.className+=$e,P?((C=I.createElement("div")).id=Ke+"-mw",C.className="tns-ovh",G.appendChild(C),C.appendChild(H)):G.appendChild(H);if(ye){(C||H).className+=" tns-ah"}if(Q.insertBefore(G,Y),H.appendChild(Y),Fn(W,function(e,t){Hn(e,"tns-item"),e.id||(e.id=Ke+"-item"+t),!P&&U&&Hn(e,U),Wn(e,{"aria-hidden":"true",tabindex:"-1"})}),Ie){for(var e=I.createDocumentFragment(),t=I.createDocumentFragment(),i=Ie;i--;){var n=i%q,r=W[n].cloneNode(!0);if(qn(r,"id"),t.insertBefore(r,t.firstChild),P){var a=W[q-1-n].cloneNode(!0);qn(a,"id"),e.appendChild(a)}}Y.insertBefore(e,Y.firstChild),Y.appendChild(t),W=Y.children}}(),function(){if(!P)for(var e=Fe,t=Fe+Math.min(q,he);e<t;e++){var i=W[e];i.style.left=100*(e-Fe)/he+"%",Hn(i,R),Yn(i,U)}F&&(y||ae?(Un(Ne,"#"+Ke+" > .tns-item","font-size:"+m.getComputedStyle(W[0]).fontSize+";",Bn(Ne)),Un(Ne,"#"+Ke,"font-size:0;",Bn(Ne))):P&&Fn(W,function(e,t){var i;e.style.marginLeft=(i=t,v?v+"("+100*i+"% / "+Oe+")":100*i/Oe+"%")}));if(O){if(_){var n=C&&L.autoHeight?yi(L.speed):"";Un(Ne,"#"+Ke+"-mw",n,Bn(Ne))}n=pi(L.edgePadding,L.gutter,L.fixedWidth,L.speed,L.autoHeight),Un(Ne,"#"+Ke+"-iw",n,Bn(Ne)),P&&(n=F&&!ae?"width:"+fi(L.fixedWidth,L.gutter,L.items)+";":"",_&&(n+=yi(ge)),Un(Ne,"#"+Ke,n,Bn(Ne))),n=F&&!ae?gi(L.fixedWidth,L.gutter,L.items):"",L.gutter&&(n+=mi(L.gutter)),P||(_&&(n+=yi(ge)),M&&(n+=_i(ge))),n&&Un(Ne,"#"+Ke+" > .tns-item",n,Bn(Ne))}else{Hi(),H.style.cssText=pi(oe,le,se,ye),P&&F&&!ae&&(Y.style.width=fi(se,le,he));n=F&&!ae?gi(se,le,he):"";le&&(n+=mi(le)),n&&Un(Ne,"#"+Ke+" > .tns-item",n,Bn(Ne))}if(j&&O)for(var r in j){r=parseInt(r);var a=j[r],s=(n="",""),o="",l="",u="",c=ae?null:di("items",r),h=di("fixedWidth",r),d=di("speed",r),p=di("edgePadding",r),f=di("autoHeight",r),g=di("gutter",r);_&&C&&di("autoHeight",r)&&"speed"in a&&(s="#"+Ke+"-mw{"+yi(d)+"}"),("edgePadding"in a||"gutter"in a)&&(o="#"+Ke+"-iw{"+pi(p,g,h,d,f)+"}"),P&&F&&!ae&&("fixedWidth"in a||"items"in a||se&&"gutter"in a)&&(l="width:"+fi(h,g,c)+";"),_&&"speed"in a&&(l+=yi(d)),l=l&&"#"+Ke+"{"+l+"}",("fixedWidth"in a||se&&"gutter"in a||!P&&"items"in a)&&(u+=gi(h,g,c)),"gutter"in a&&(u+=mi(g)),!P&&"speed"in a&&(_&&(u+=yi(d)),M&&(u+=_i(d))),(n=s+o+l+(u=u&&"#"+Ke+" > .tns-item{"+u+"}"))&&Ne.insertRule("@media (min-width: "+r/16+"em) {"+n+"}",Ne.cssRules.length)}}(),Mi();var ti=ve?P?function(){var e=He,t=Ye;e+=de,t-=de,oe?(e+=1,--t):se&&(ue+le)%(se+le)&&--t,Ie&&(t<Fe?Fe-=q:Fe<e&&(Fe+=q))}:function(){if(Ye<Fe)for(;He+q<=Fe;)Fe-=q;else if(Fe<He)for(;Fe<=Ye-q;)Fe+=q}:function(){Fe=Math.max(He,Math.min(Ye,Fe))},ii=P?function(){var t,i,n,r,e,a,s,o,l,u,c;Ji(Y,""),_||!ge?(an(),ge&&Kn(Y)||un()):(t=Y,i=Re,n=ze,r=Ue,e=nn(),a=ge,s=un,o=Math.min(a,10),l=0<=e.indexOf("%")?"%":"px",e=e.replace(l,""),u=Number(t.style[i].replace(n,"").replace(r,"").replace(l,"")),c=(e-u)/a*o,setTimeout(function e(){a-=o,u+=c,t.style[i]=n+u+l+r,0<a?setTimeout(e,o):s()},o)),F||Sn()}:function(){Le=[];var e={};e[w]=e[b]=un,ir(W[Ge],e),tr(W[Fe],e),sn(Ge,R,z,!0),sn(Fe,U,R),w&&b&&ge&&Kn(Y)||un()};return{version:"2.9.2",getInfo:Cn,events:Ze,goTo:cn,play:function(){Ae&&!Ft&&(gn(),Ht=!1)},pause:function(){Ft&&(mn(),Ht=!0)},isOn:Z,updateSliderHeight:Qi,refresh:Mi,destroy:function(){if(Ne.disabled=!0,Ne.ownerNode&&Ne.ownerNode.remove(),ir(m,{resize:xi}),fe&&ir(I,lt),Tt&&ir(Tt,rt),Ct&&ir(Ct,at),ir(Y,st),ir(Y,ot),Vt&&ir(Vt,{click:vn}),Ae&&clearInterval(Bt),P&&w){var e={};e[w]=un,ir(Y,e)}be&&ir(Y,ut),Te&&ir(Y,ct);var a=[V,At,St,Dt,Lt,Wt];for(var t in A.forEach(function(e,t){var i="container"===e?G:L[e];if("object"==typeof i){var n=!!i.previousElementSibling&&i.previousElementSibling,r=i.parentNode;i.outerHTML=a[t],L[e]=n?n.nextElementSibling:r.firstElementChild}}),A=R=z=N=U=F=G=H=Y=Q=V=W=q=B=X=ae=se=oe=le=ue=he=de=pe=fe=ge=me=ve=ye=Ne=Ce=$=Le=Ie=Oe=je=ke=Pe=Re=ze=Ue=Be=Fe=Ge=He=Ye=Ve=We=qe=Xe=Ze=$e=Ke=Je=et=tt=it=nt=rt=at=st=ot=lt=ut=ct=ht=dt=pt=ft=gt=mt=vt=yt=_t=K=_e=Me=Tt=At=xt=Et=wt=bt=we=Ct=Lt=Nt=It=Ot=jt=kt=Pt=Rt=zt=Ut=Ae=xe=Qt=Ee=Se=Vt=Wt=De=qt=Bt=Ft=Gt=Ht=Yt=$t=Kt=Xt=Jt=Zt=ei=be=Te=null,this)"rebuild"!==t&&(this[t]=null);Z=!1},rebuild:function(){return rr(On(L,x))}}}function ni(e){e&&(_e=we=be=Te=fe=Ae=Se=De=!1)}function ri(){for(var e=P?Fe-Ie:Fe;e<0;)e+=q;return e%q+1}function ai(e){return e=e?Math.max(0,Math.min(ve?q-1:q-he,e)):0,P?e+Ie:e}function si(e){for(null==e&&(e=Fe),P&&(e-=Ie);e<0;)e+=q;return Math.floor(e%q)}function oi(){var e,t=si();return e=pt?t:se||ae?Math.ceil((t+1)*It/q-1):Math.floor(t/he),!ve&&P&&Fe===Ye&&(e=It-1),e}function li(){return m.innerWidth||I.documentElement.clientWidth||I.body.clientWidth}function ui(e){return"top"===e?"afterbegin":"beforeend"}function ci(){var e=oe?2*oe-le:0;return function e(t){var i,n,r=I.createElement("div");return t.appendChild(r),n=(i=r.getBoundingClientRect()).right-i.left,r.remove(),n||e(t.parentNode)}(Q)-e}function hi(e){if(L[e])return!0;if(j)for(var t in j)if(j[t][e])return!0;return!1}function di(e,t){if(null==t&&(t=X),"items"===e&&se)return Math.floor((ue+le)/(se+le))||1;var i=L[e];if(j)for(var n in j)t>=parseInt(n)&&e in j[n]&&(i=j[n][e]);return"slideBy"===e&&"page"===i&&(i=di("items")),P||"slideBy"!==e&&"items"!==e||(i=Math.floor(i)),i}function pi(e,t,i,n,r){var a="";if(void 0!==e){var s=e;t&&(s-=t),a=F?"margin: 0 "+s+"px 0 "+e+"px;":"margin: "+e+"px 0 "+s+"px 0;"}else if(t&&!i){var o="-"+t+"px";a="margin: 0 "+(F?o+" 0 0":"0 "+o+" 0")+";"}return!P&&r&&_&&n&&(a+=yi(n)),a}function fi(e,t,i){return e?(e+t)*Oe+"px":v?v+"("+100*Oe+"% / "+i+")":100*Oe/i+"%"}function gi(e,t,i){var n;if(e)n=e+t+"px";else{P||(i=Math.floor(i));var r=P?Oe:i;n=v?v+"(100% / "+r+")":100/r+"%"}return n="width:"+n,"inner"!==k?n+";":n+" !important;"}function mi(e){var t="";!1!==e&&(t=(F?"padding-":"margin-")+(F?"right":"bottom")+": "+e+"px;");return t}function vi(e,t){var i=e.substring(0,e.length-t).toLowerCase();return i=i&&"-"+i+"-"}function yi(e){return vi(_,18)+"transition-duration:"+e/1e3+"s;"}function _i(e){return vi(M,17)+"animation-duration:"+e/1e3+"s;"}function Mi(){if(hi("autoHeight")||ae||!F){var e=Y.querySelectorAll("img");Fn(e,function(e){var t=e.src;t&&t.indexOf("data:image")<0?(tr(e,_t),e.src="",e.src=t,Hn(e,"loading")):Ce||Ri(e)}),Ln(function(){Fi(Xn(e),function(){K=!0})}),!ae&&F&&(e=Ui(Fe,Math.min(Fe+he-1,Oe-1))),Ce?wi():Ln(function(){Fi(Xn(e),wi)})}else P&&rn(),Ti(),Ai()}function wi(){if(ae){var t=ve?Fe:q-1;!function e(){W[t-1].getBoundingClientRect().right.toFixed(2)===W[t].getBoundingClientRect().left.toFixed(2)?bi():setTimeout(function(){e()},16)}()}else bi()}function bi(){F&&!ae||(Vi(),ae?(ke=tn(),tt&&(it=Si()),Ye=Be(),ni(Je||it)):Sn()),P&&rn(),Ti(),Ai()}function Ti(){if(Wi(),G.insertAdjacentHTML("afterbegin",'<div class="tns-liveregion tns-visually-hidden" aria-live="polite" aria-atomic="true">slide <span class="current">'+ji()+"</span> of "+q+"</div>"),J=G.querySelector(".tns-liveregion .current"),ft){var e=Ae?"stop":"start";Vt?Wn(Vt,{"data-action":e}):L.autoplayButtonOutput&&(G.insertAdjacentHTML(ui(L.autoplayPosition),'<button data-action="'+e+'">'+qt[0]+e+qt[1]+Ee[0]+"</button>"),Vt=G.querySelector("[data-action]")),Vt&&tr(Vt,{click:vn}),Ae&&(gn(),Se&&tr(Y,st),De&&tr(Y,ot))}if(dt){if(Ct)Wn(Ct,{"aria-label":"Carousel Pagination"}),Fn(Nt=Ct.children,function(e,t){Wn(e,{"data-nav":t,tabindex:"-1","aria-label":zt+(t+1),"aria-controls":Ke})});else{for(var t="",i=pt?"":'style="display:none"',n=0;n<q;n++)t+='<button data-nav="'+n+'" tabindex="-1" aria-controls="'+Ke+'" '+i+' aria-label="'+zt+(n+1)+'"></button>';t='<div class="tns-nav" aria-label="Carousel Pagination">'+t+"</div>",G.insertAdjacentHTML(ui(L.navPosition),t),Ct=G.querySelector(".tns-nav"),Nt=Ct.children}if(Nn(),_){var r=_.substring(0,_.length-18).toLowerCase(),a="transition: all "+ge/1e3+"s";r&&(a="-"+r+"-"+a),Un(Ne,"[aria-controls^="+Ke+"-item]",a,Bn(Ne))}Wn(Nt[kt],{"aria-label":zt+(kt+1)+Ut}),qn(Nt[kt],"tabindex"),Hn(Nt[kt],Rt),tr(Ct,at)}ht&&(Tt||xt&&Et||(G.insertAdjacentHTML(ui(L.controlsPosition),'<div class="tns-controls" aria-label="Carousel Navigation" tabindex="0"><button data-controls="prev" tabindex="-1" aria-controls="'+Ke+'">'+Me[0]+'</button><button data-controls="next" tabindex="-1" aria-controls="'+Ke+'">'+Me[1]+"</button></div>"),Tt=G.querySelector(".tns-controls")),xt&&Et||(xt=Tt.children[0],Et=Tt.children[1]),L.controlsContainer&&Wn(Tt,{"aria-label":"Carousel Navigation",tabindex:"0"}),(L.controlsContainer||L.prevButton&&L.nextButton)&&Wn([xt,Et],{"aria-controls":Ke,tabindex:"-1"}),(L.controlsContainer||L.prevButton&&L.nextButton)&&(Wn(xt,{"data-controls":"prev"}),Wn(Et,{"data-controls":"next"})),wt=Xi(xt),bt=Xi(Et),Ki(),Tt?tr(Tt,rt):(tr(xt,rt),tr(Et,rt))),Ni()}function Ai(){if(P&&w){var e={};e[w]=un,tr(Y,e)}be&&tr(Y,ut,L.preventScrollOnTouch),Te&&tr(Y,ct),fe&&tr(I,lt),"inner"===k?Ze.on("outerResized",function(){Ei(),Ze.emit("innerLoaded",Cn())}):(j||se||ae||ye||!F)&&tr(m,{resize:xi}),ye&&("outer"===k?Ze.on("innerLoaded",Bi):Je||Bi()),Pi(),Je?Ii():it&&Li(),Ze.on("indexChanged",Gi),"inner"===k&&Ze.emit("innerLoaded",Cn()),"function"==typeof Xe&&Xe(Cn()),Z=!0}function xi(e){Ln(function(){Ei(_n(e))})}function Ei(e){if(Z){"outer"===k&&Ze.emit("outerResized",Cn(e)),X=li();var t,i=B,n=!1;j&&(Di(),(t=i!==B)&&Ze.emit("newBreakpointStart",Cn(e)));var r,a,s,o,l=he,u=Je,c=it,h=fe,d=_e,p=we,f=be,g=Te,m=Ae,v=Se,y=De,_=Fe;if(t){var M=se,w=ye,b=Me,T=ce,A=Ee;if(!O)var x=le,E=oe}if(fe=di("arrowKeys"),_e=di("controls"),we=di("nav"),be=di("touch"),ce=di("center"),Te=di("mouseDrag"),Ae=di("autoplay"),Se=di("autoplayHoverPause"),De=di("autoplayResetOnVisibility"),t&&(Je=di("disable"),se=di("fixedWidth"),ge=di("speed"),ye=di("autoHeight"),Me=di("c
1ontrolsText"),Ee=di("autoplayText"),xe=di("autoplayTimeout"),O||(oe=di("edgePadding"),le=di("gutter"))),ni(Je),ue=ci(),F&&!ae||Je||(Vi(),F||(Sn(),n=!0)),(se||ae)&&(ke=tn(),Ye=Be()),(t||se)&&(he=di("items"),de=di("slideBy"),(a=he!==l)&&(se||ae||(Ye=Be()),ti())),t&&Je!==u&&(Je?Ii:function(){if(!et)return;if(Ne.disabled=!1,Y.className+=$e,rn(),ve)for(var e=Ie;e--;)P&&$n(W[e]),$n(W[Oe-e-1]);if(!P)for(var t=Fe,i=Fe+q;t<i;t++){var n=W[t],r=t<Fe+he?R:U;n.style.left=100*(t-Fe)/he+"%",Hn(n,r)}Ci(),et=!1})(),tt&&(t||se||ae)&&(it=Si())!==c&&(it?(an(nn(ai(0))),Li()):(function(){if(!nt)return;oe&&O&&(H.style.margin="");if(Ie)for(var e="tns-transparent",t=Ie;t--;)P&&Yn(W[t],e),Yn(W[Oe-t-1],e);Ci(),nt=!1}(),n=!0)),ni(Je||it),Ae||(Se=De=!1),fe!==h&&(fe?tr:ir)(I,lt),_e!==d&&(_e?Tt?$n(Tt):(xt&&$n(xt),Et&&$n(Et)):Tt?Zn(Tt):(xt&&Zn(xt),Et&&Zn(Et))),we!==p&&(we?$n:Zn)(Ct),be!==f&&(be?tr(Y,ut,L.preventScrollOnTouch):ir(Y,ut)),Te!==g&&(Te?tr:ir)(Y,ct),Ae!==m&&(Ae?(Vt&&$n(Vt),Ft||Ht||gn()):(Vt&&Zn(Vt),Ft&&mn())),Se!==v&&(Se?tr:ir)(Y,st),De!==y&&(De?tr:ir)(I,ot),t){if(se===M&&ce===T||(n=!0),ye!==w&&(ye||(H.style.height="")),_e&&Me!==b&&(xt.innerHTML=Me[0],Et.innerHTML=Me[1]),Vt&&Ee!==A){var S=Ae?1:0,D=Vt.innerHTML,N=D.length-A[S].length;D.substring(N)===A[S]&&(Vt.innerHTML=D.substring(0,N)+Ee[S])}}else ce&&(se||ae)&&(n=!0);if((a||se&&!ae)&&(It=Dn(),Nn()),(r=Fe!==_)?(Ze.emit("indexChanged",Cn()),n=!0):a?r||Gi():(se||ae)&&(Pi(),Wi(),Oi()),a&&!P&&function(){for(var e=Fe+Math.min(q,he),t=Oe;t--;){var i=W[t];Fe<=t&&t<e?(Hn(i,"tns-moving"),i.style.left=100*(t-Fe)/he+"%",Hn(i,R),Yn(i,U)):i.style.left&&(i.style.left="",Hn(i,U),Yn(i,R)),Yn(i,z)}setTimeout(function(){Fn(W,function(e){Yn(e,"tns-moving")})},300)}(),!Je&&!it){if(t&&!O&&(ye===autoheightTem&&ge===speedTem||Hi(),oe===E&&le===x||(H.style.cssText=pi(oe,le,se,ge,ye)),F)){P&&(Y.style.width=fi(se,le,he));var C=gi(se,le,he)+mi(le);o=Bn(s=Ne)-1,"deleteRule"in s?s.deleteRule(o):s.removeRule(o),Un(Ne,"#"+Ke+" > .tns-item",C,Bn(Ne))}ye&&Bi(),n&&(rn(),Ge=Fe)}t&&Ze.emit("newBreakpointEnd",Cn(e))}}function Si(){if(!se&&!ae)return q<=(ce?he-(he-1)/2:he);var e=se?(se+le)*q:$[q],t=oe?ue+2*oe:ue+le;return ce&&(t-=se?(ue-se)/2:(ue-($[Fe+1]-$[Fe]-le))/2),e<=t}function Di(){for(var e in B=0,j)(e=parseInt(e))<=X&&(B=e)}function Ni(){!Ae&&Vt&&Zn(Vt),!we&&Ct&&Zn(Ct),_e||(Tt?Zn(Tt):(xt&&Zn(xt),Et&&Zn(Et)))}function Ci(){Ae&&Vt&&$n(Vt),we&&Ct&&$n(Ct),_e&&(Tt?$n(Tt):(xt&&$n(xt),Et&&$n(Et)))}function Li(){if(!nt){if(oe&&(H.style.margin="0px"),Ie)for(var e="tns-transparent",t=Ie;t--;)P&&Hn(W[t],e),Hn(W[Oe-t-1],e);Ni(),nt=!0}}function Ii(){if(!et){if(Ne.disabled=!0,Y.className=Y.className.replace($e.substring(1),""),qn(Y,["style"]),ve)for(var e=Ie;e--;)P&&Zn(W[e]),Zn(W[Oe-e-1]);if(F&&P||qn(H,["style"]),!P)for(var t=Fe,i=Fe+q;t<i;t++){var n=W[t];qn(n,["style"]),Yn(n,R),Yn(n,U)}Ni(),et=!0}}function Oi(){var e=ji();J.innerHTML!==e&&(J.innerHTML=e)}function ji(){var e=ki(),t=e[0]+1,i=e[1]+1;return t===i?t+"":t+" to "+i}function ki(e){null==e&&(e=nn());var i,n,r,a=Fe;if(ce||oe?(ae||se)&&(n=-(parseFloat(e)+oe),r=n+ue+2*oe):ae&&(n=$[Fe],r=n+ue),ae)$.forEach(function(e,t){t<Oe&&((ce||oe)&&e<=n+.5&&(a=t),.5<=r-e&&(i=t))});else{if(se){var t=se+le;i=ce||oe?(a=Math.floor(n/t),Math.ceil(r/t-1)):a+Math.ceil(ue/t)-1}else if(ce||oe){var s=he-1;if(i=ce?(a-=s/2,Fe+s/2):Fe+s,oe){var o=oe*he/ue;a-=o,i+=o}a=Math.floor(a),i=Math.ceil(i)}else i=a+he-1;a=Math.max(a,0),i=Math.min(i,Oe-1)}return[a,i]}function Pi(){Ce&&!Je&&Ui.apply(null,ki()).forEach(function(e){if(!Gn(e,yt)){var t={};t[w]=function(e){e.stopPropagation()},tr(e,t),tr(e,_t),e.src=Vn(e,"data-src");var i=Vn(e,"data-srcset");i&&(e.srcset=i),Hn(e,"loading")}})}function Ri(e){Hn(e,"loaded"),zi(e)}function zi(e){Hn(e,"tns-complete"),Yn(e,"loading"),ir(e,_t)}function Ui(e,t){for(var i=[];e<=t;)Fn(W[e].querySelectorAll("img"),function(e){i.push(e)}),e++;return i}function Bi(){var e=Ui.apply(null,ki());Ln(function(){Fi(e,Qi)})}function Fi(i,e){return K?e():(i.forEach(function(e,t){Gn(e,yt)&&i.splice(t,1)}),i.length?void Ln(function(){Fi(i,e)}):e())}function Gi(){Pi(),Wi(),Oi(),Ki(),function(){if(we&&(kt=0<=jt?jt:oi(),jt=-1,kt!==Pt)){var e=Nt[Pt],t=Nt[kt];Wn(e,{tabindex:"-1","aria-label":zt+(Pt+1)}),Yn(e,Rt),Wn(t,{"aria-label":zt+(kt+1)+Ut}),qn(t,"tabindex"),Hn(t,Rt),Pt=kt}}()}function Hi(){P&&ye&&(C.style[_]=ge/1e3+"s")}function Yi(e,t){for(var i=[],n=e,r=Math.min(e+t,Oe);n<r;n++)i.push(W[n].offsetHeight);return Math.max.apply(null,i)}function Qi(){var e=ye?Yi(Fe,he):Yi(Ie,q),t=C||H;t.style.height!==e&&(t.style.height=e+"px")}function Vi(){$=[0];var i=F?"left":"top",n=F?"right":"bottom",r=W[0].getBoundingClientRect()[i];Fn(W,function(e,t){t&&$.push(e.getBoundingClientRect()[i]-r),t===Oe-1&&$.push(e.getBoundingClientRect()[n]-r)})}function Wi(){var e=ki(),i=e[0],n=e[1];Fn(W,function(e,t){i<=t&&t<=n?Qn(e,"aria-hidden")&&(qn(e,["aria-hidden","tabindex"]),Hn(e,vt)):Qn(e,"aria-hidden")||(Wn(e,{"aria-hidden":"true",tabindex:"-1"}),Yn(e,vt))})}
vendor: 4,686 bytes, line 1
1function qi(e){return e.nodeName.toLowerCase()}function Xi(e){return"button"===qi(e)}function Zi(e){return"true"===e.getAttribute("aria-disabled")}function $i(e,t,i){e?t.disabled=i:t.setAttribute("aria-disabled",i.toString())}function Ki(){if(_e&&!me&&!ve){var e=wt?xt.disabled:Zi(xt),t=bt?Et.disabled:Zi(Et),i=Fe<=He,n=!me&&Ye<=Fe;i&&!e&&$i(wt,xt,!0),!i&&e&&$i(wt,xt,!1),n&&!t&&$i(bt,Et,!0),!n&&t&&$i(bt,Et,!1)}}function Ji(e,t){_&&(e.style[_]=t)}function en(e){return null==e&&(e=Fe),ae?(ue-(oe?le:0)-($[e+1]-$[e]-le))/2:se?(ue-se)/2:(he-1)/2}function tn(){var e=ue+(oe?le:0)-(se?(se+le)*Oe:$[Oe]);return ce&&!ve&&(e=se?-(se+le)*(Oe-1)-en():en(Oe-1)-$[Oe-1]),0<e&&(e=0),e}function nn(e){var t;if(null==e&&(e=Fe),F&&!ae)if(se)t=-(se+le)*e,ce&&(t+=en());else{var i=d?Oe:he;ce&&(e-=en()),t=100*-e/i}else t=-$[e],ce&&ae&&(t+=en());return je&&(t=Math.max(t,ke)),t+=!F||ae||se?"px":"%"}function rn(e){Ji(Y,"0s"),an(e)}function an(e){null==e&&(e=nn()),Y.style[Re]=ze+e+Ue}function sn(e,t,i,n){var r=e+he;ve||(r=Math.min(r,Oe));for(var a=e;a<r;a++){var s=W[a];n||(s.style.left=100*(a-Fe)/he+"%"),N&&f&&(s.style[f]=s.style[g]=N*(a-e)/1e3+"s"),Yn(s,t),Hn(s,i),n&&Le.push(s)}}function on(e,t){Pe&&ti(),Fe===Ge&&!t||(Ze.emit("indexChanged",Cn()),Ze.emit("transitionStart",Cn()),ye&&Bi(),Ft&&e&&0<=["click","keydown"].indexOf(e.type)&&mn(),qe=!0,ii())}function ln(e){return e.toLowerCase().replace(/-/g,"")}function un(e){if(P||qe){if(Ze.emit("transitionEnd",Cn(e)),!P&&0<Le.length)for(var t=0;t<Le.length;t++){var i=Le[t];i.style.left="",g&&f&&(i.style[g]="",i.style[f]=""),Yn(i,z),Hn(i,U)}if(!e||!P&&e.target.parentNode===Y||e.target===Y&&ln(e.propertyName)===ln(Re)){if(!Pe){var n=Fe;ti(),Fe!==n&&(Ze.emit("indexChanged",Cn()),rn())}"inner"===k&&Ze.emit("innerLoaded",Cn()),qe=!1,Ge=Fe}}}function cn(e,t){if(!it)if("prev"===e)hn(t,-1);else if("next"===e)hn(t,1);else{if(qe){if(Qe)return;un()}var i=si(),n=0;if("first"===e?n=-i:"last"===e?n=P?q-he-i:q-1-i:("number"!=typeof e&&(e=parseInt(e)),isNaN(e)||(t||(e=Math.max(0,Math.min(q-1,e))),n=e-i)),!P&&n&&Math.abs(n)<he){var r=0<n?1:-1;n+=He<=Fe+n-q?q*r:2*q*r*-1}Fe+=n,P&&ve&&(Fe<He&&(Fe+=q),Ye<Fe&&(Fe-=q)),si(Fe)!==si(Ge)&&on(t)}}function hn(e,t){if(qe){if(Qe)return;un()}var i;if(!t){for(var n=Mn(e=_n(e));n!==Tt&&[xt,Et].indexOf(n)<0;)n=n.parentNode;var r=[xt,Et].indexOf(n);0<=r&&(i=!0,t=0===r?-1:1)}if(me){if(Fe===He&&-1===t)return void cn("last",e);if(Fe===Ye&&1===t)return void cn("first",e)}t&&(Fe+=de*t,ae&&(Fe=Math.floor(Fe)),on(i||e&&"keydown"===e.type?e:null))}function dn(){Bt=setInterval(function(){hn(null,Qt)},xe),Ft=!0}function pn(){clearInterval(Bt),Ft=!1}function fn(e,t){Wn(Vt,{"data-action":e}),Vt.innerHTML=qt[0]+e+qt[1]+t}function gn(){dn(),Vt&&fn("stop",Ee[1])}function mn(){pn(),Vt&&fn("start",Ee[0])}function vn(){Ht=Ft?(mn(),!0):(gn(),!1)}function yn(e){e.focus()}function _n(e){return wn(e=e||m.event)?e.changedTouches[0]:e}function Mn(e){return e.target||m.event.srcElement}function wn(e){return 0<=e.type.indexOf("touch")}function bn(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Tn(){return r=Kt.y-$t.y,a=Kt.x-$t.x,e=Math.atan2(r,a)*(180/Math.PI),t=Ve,i=!1,n=Math.abs(90-Math.abs(e)),90-t<=n?i="horizontal":n<=t&&(i="vertical"),i===L.axis;var e,t,i,n,r,a}function An(e){if(qe){if(Qe)return;un()}Ae&&Ft&&pn(),Jt=!0,Zt&&(In(Zt),Zt=null);var t=_n(e);Ze.emit(wn(e)?"touchStart":"dragStart",Cn(e)),!wn(e)&&0<=["img","a"].indexOf(qi(Mn(e)))&&bn(e),Kt.x=$t.x=t.clientX,Kt.y=$t.y=t.clientY,P&&(Xt=parseFloat(Y.style[Re].replace(ze,"")),Ji(Y,"0s"))}function xn(e){if(Jt){var t=_n(e);Kt.x=t.clientX,Kt.y=t.clientY,P?Zt=Zt||Ln(function(){!function e(t){if(!We)return void(Jt=!1);In(Zt);Jt&&(Zt=Ln(function(){e(t)}));"?"===We&&(We=Tn());if(We){!Mt&&wn(t)&&(Mt=!0);try{t.type&&Ze.emit(wn(t)?"touchMove":"dragMove",Cn(t))}catch(e){}var i=Xt,n=ei(Kt,$t);if(!F||se||ae)i+=n,i+="px";else{var r=d?n*he*100/((ue+le)*Oe):100*n/(ue+le);i+=r,i+="%"}Y.style[Re]=ze+i+Ue}}(e)}):("?"===We&&(We=Tn()),We&&(Mt=!0)),Mt&&e.preventDefault()}}function En(n){if(Jt){Zt&&(In(Zt),Zt=null),P&&Ji(Y,""),Jt=!1;var e=_n(n);Kt.x=e.clientX,Kt.y=e.clientY;var r=ei(Kt,$t);if(Math.abs(r)){if(!wn(n)){var i=Mn(n);tr(i,{click:function e(t){bn(t),ir(i,{click:e})}})}P?Zt=Ln(function(){if(F&&!ae){var e=-r*he/(ue+le);e=0<r?Math.floor(e):Math.ceil(e),Fe+=e}else{var t=-(Xt+r);if(t<=0)Fe=He;else if(t>=$[Oe-1])Fe=Ye;else for(var i=0;i<Oe&&t>=$[i];)t>$[Fe=i]&&r<0&&(Fe+=1),i++}on(n,r),Ze.emit(wn(n)?"touchEnd":"dragEnd",Cn(n))}):We&&hn(n,0<r?-1:1)}}"auto"===L.preventScrollOnTouch&&(Mt=!1),Ve&&(We="?"),Ae&&!Ft&&dn()}function Sn(){(C||H).style.height=$[Fe+he]-$[Fe]+"px"}function Dn(){var e=se?(se+le)*q/ue:q/he;return Math.min(Math.ceil(e),q)}
vendor: 69,602 bytes, line 1
1function Nn(){if(we&&!pt&&It!==Ot){var e=Ot,t=It,i=$n;for(It<Ot&&(e=It,t=Ot,i=Zn);e<t;)i(Nt[e]),e++;Ot=It}}function Cn(e){return{container:Y,slideItems:W,navContainer:Ct,navItems:Nt,controlsContainer:Tt,hasControls:ht,prevButton:xt,nextButton:Et,items:he,slideBy:de,cloneCount:Ie,slideCount:q,slideCountNew:Oe,index:Fe,indexCached:Ge,displayIndex:ri(),navCurrentIndex:kt,navCurrentIndexCached:Pt,pages:It,pagesCached:Ot,sheet:Ne,isOn:Z,event:e||{}}}T&&console.warn("No slides found in",L.container)};return rr}();!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("global/window"),require("global/document")):"function"==typeof define&&define.amd?define(["global/window","global/document"],t):(e=e||self).videojs=t(e.window,e.document)}(this,function(y,h){"use strict";y=y&&Object.prototype.hasOwnProperty.call(y,"default")?y.default:y,h=h&&Object.prototype.hasOwnProperty.call(h,"default")?h.default:h;var u=[],e=function(o,l){return function(e,t,i){var n=l.levels[t],r=new RegExp("^("+n+")$");if("log"!==e&&i.unshift(e.toUpperCase()+":"),i.unshift(o+":"),u){u.push([].concat(i));var a=u.length-1e3;u.splice(0,0<a?a:0)}if(y.console){var s=y.console[e];s||"debug"!==e||(s=y.console.info||y.console.log),s&&n&&r.test(e)&&s[Array.isArray(i)?"apply":"call"](y.console,i)}}};var d=function t(i){function n(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];r("log",a,t)}var r,a="info";return r=e(i,n),n.createLogger=function(e){return t(i+": "+e)},n.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:a},n.level=function(e){if("string"==typeof e){if(!n.levels.hasOwnProperty(e))throw new Error('"'+e+'" in not a valid log level');a=e}return a},(n.history=function(){return u?[].concat(u):[]}).filter=function(t){return(u||[]).filter(function(e){return new RegExp(".*"+t+".*").test(e[0])})},n.history.clear=function(){u&&(u.length=0)},n.history.disable=function(){null!==u&&(u.length=0,u=null)},n.history.enable=function(){null===u&&(u=[])},n.error=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return r("error",a,t)},n.warn=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return r("warn",a,t)},n.debug=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return r("debug",a,t)},n}("VIDEOJS"),p=d.createLogger;function t(e,t){return e(t={exports:{}},t.exports),t.exports}var r=t(function(e){function t(){return e.exports=t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},t.apply(this,arguments)}e.exports=t}),i=Object.prototype.toString,a=function(e){return o(e)?Object.keys(e):[]};function s(t,i){a(t).forEach(function(e){return i(t[e],e)})}function f(i){for(var e=arguments.length,t=new Array(1<e?e-1:0),n=1;n<e;n++)t[n-1]=arguments[n];return Object.assign?r.apply(void 0,[i].concat(t)):(t.forEach(function(e){e&&s(e,function(e,t){i[t]=e})}),i)}function o(e){return!!e&&"object"==typeof e}function l(e){return o(e)&&"[object Object]"===i.call(e)&&e.constructor===Object}function n(e,t){if(!e||!t)return"";if("function"!=typeof y.getComputedStyle)return"";var i=y.getComputedStyle(e);return i?i.getPropertyValue(t)||i[t]:""}function c(e){return"string"==typeof e&&Boolean(e.trim())}function g(e){if(0<=e.indexOf(" "))throw new Error("class has illegal whitespace characters")}function m(){return h===y.document}function v(e){return o(e)&&1===e.nodeType}function _(){try{return y.parent!==y.self}catch(e){return!0}}function M(n){return function(e,t){if(!c(e))return h[n](null);c(t)&&(t=h.querySelector(t));var i=v(t)?t:h;return i[n]&&i[n](e)}}function w(e,i,t,n){void 0===e&&(e="div"),void 0===i&&(i={}),void 0===t&&(t={});var r=h.createElement(e);return Object.getOwnPropertyNames(i).forEach(function(e){var t=i[e];-1!==e.indexOf("aria-")||"role"===e||"type"===e?(d.warn("Setting attributes in the second argument of createEl()\nhas been deprecated. Use the third argument instead.\ncreateEl(type, properties, attributes). Attempting to set "+e+" to "+t+"."),r.setAttribute(e,t)):"textContent"===e?b(r,t):r[e]!==t&&(r[e]=t)}),Object.getOwnPropertyNames(t).forEach(function(e){r.setAttribute(e,t[e])}),n&&F(r,n),r}function b(e,t){return void 0===e.textContent?e.innerText=t:e.textContent=t,e}function T(e,t){t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)}function A(e,t){return g(t),e.classList?e.classList.contains(t):new RegExp("(^|\\s)"+t+"($|\\s)").test(e.className)}function x(e,t){return e.classList?e.classList.add(t):A(e,t)||(e.className=(e.className+" "+t).trim()),e}function E(e,t){return e.classList?e.classList.remove(t):(g(t),e.className=e.className.split(/\s+/).filter(function(e){return e!==t}).join(" ")),e}function S(e,t,i){var n=A(e,t);if("function"==typeof i&&(i=i(e,t)),"boolean"!=typeof i&&(i=!n),i!==n)return(i?x:E)(e,t),e}function D(i,n){Object.getOwnPropertyNames(n).forEach(function(e){var t=n[e];null==t||!1===t?i.removeAttribute(e):i.setAttribute(e,!0===t?"":t)})}function N(e){var t={},i=",autoplay,controls,playsinline,loop,muted,default,defaultMuted,";if(e&&e.attributes&&0<e.attributes.length)for(var n=e.attributes,r=n.length-1;0<=r;r--){var a=n[r].name,s=n[r].value;"boolean"!=typeof e[a]&&-1===i.indexOf(","+a+",")||(s=null!==s),t[a]=s}return t}function C(e,t){return e.getAttribute(t)}function L(e,t,i){e.setAttribute(t,i)}function I(e,t){e.removeAttribute(t)}function O(){h.body.focus(),h.onselectstart=function(){return!1}}function j(){h.onselectstart=function(){return!0}}function k(e){if(e&&e.getBoundingClientRect&&e.parentNode){var t=e.getBoundingClientRect(),i={};return["bottom","height","left","right","top","width"].forEach(function(e){void 0!==t[e]&&(i[e]=t[e])}),i.height||(i.height=parseFloat(n(e,"height"))),i.width||(i.width=parseFloat(n(e,"width"))),i}}function P(e){var t;if(e.getBoundingClientRect&&e.parentNode&&(t=e.getBoundingClientRect()),!t)return{left:0,top:0};var i=h.documentElement,n=h.body,r=i.clientLeft||n.clientLeft||0,a=y.pageXOffset||n.scrollLeft,s=t.left+a-r,o=i.clientTop||n.clientTop||0,l=y.pageYOffset||n.scrollTop,u=t.top+l-o;return{left:Math.round(s),top:Math.round(u)}}function R(e,t){var i={},n=P(e),r=e.offsetWidth,a=e.offsetHeight,s=n.top,o=n.left,l=t.pageY,u=t.pageX;return t.changedTouches&&(u=t.changedTouches[0].pageX,l=t.changedTouches[0].pageY),i.y=Math.max(0,Math.min(1,(s-l+a)/a)),i.x=Math.max(0,Math.min(1,(u-o)/r)),i}function z(e){return o(e)&&3===e.nodeType}function U(e){for(;e.firstChild;)e.removeChild(e.firstChild);return e}function B(e){return"function"==typeof e&&(e=e()),(Array.isArray(e)?e:[e]).map(function(e){return"function"==typeof e&&(e=e()),v(e)||z(e)?e:"string"==typeof e&&/\S/.test(e)?h.createTextNode(e):void 0}).filter(function(e){return e})}function F(t,e){return B(e).forEach(function(e){return t.appendChild(e)}),t}function G(e,t){return F(U(e),t)}function H(e){return void 0===e.button&&void 0===e.buttons||(0===e.button&&void 0===e.buttons||("mouseup"===e.type&&0===e.button&&0===e.buttons||0===e.button&&1===e.buttons))}var Y,Q=M("querySelector"),V=M("querySelectorAll"),W=Object.freeze({__proto__:null,isReal:m,isEl:v,isInFrame:_,createEl:w,textContent:b,prependTo:T,hasClass:A,addClass:x,removeClass:E,toggleClass:S,setAttributes:D,getAttributes:N,getAttribute:C,setAttribute:L,removeAttribute:I,blockTextSelection:O,unblockTextSelection:j,getBoundingClientRect:k,findPosition:P,getPointerPosition:R,isTextNode:z,emptyEl:U,normalizeContent:B,appendContent:F,insertContent:G,isSingleLeftClick:H,$:Q,$$:V}),q=!1,X=function(){if(m()&&!1!==Y.options.autoSetup){var e=Array.prototype.slice.call(h.getElementsByTagName("video")),t=Array.prototype.slice.call(h.getElementsByTagName("audio")),i=Array.prototype.slice.call(h.getElementsByTagName("video-js")),n=e.concat(t,i);if(n&&0<n.length)for(var r=0,a=n.length;r<a;r++){var s=n[r];if(!s||!s.getAttribute){Z(1);break}void 0===s.player&&null!==s.getAttribute("data-setup")&&Y(s)}else q||Z(1)}};function Z(e,t){t&&(Y=t),y.setTimeout(X,e)}function $(){q=!0,y.removeEventListener("load",$)}m()&&("complete"===h.readyState?$():y.addEventListener("load",$));function K(e){var t=h.createElement("style");return t.className=e,t}function J(e,t){e.styleSheet?e.styleSheet.cssText=t:e.textContent=t}var ee,te=3;function ie(){return te++}y.WeakMap||(ee=function(){function e(){this.vdata="vdata"+Math.floor(y.performance&&y.performance.now()||Date.now()),this.data={}}var t=e.prototype;return t.set=function(e,t){var i=e[this.vdata]||ie();return e[this.vdata]||(e[this.vdata]=i),this.data[i]=t,this},t.get=function(e){var t=e[this.vdata];if(t)return this.data[t];d("We have no data for this element",e)},t.has=function(e){return e[this.vdata]in this.data},t.delete=function(e){var t=e[this.vdata];t&&(delete this.data[t],delete e[this.vdata])},e}());var ne,re=new(y.WeakMap?WeakMap:ee);function ae(e,t){if(re.has(e)){var i=re.get(e);0===i.handlers[t].length&&(delete i.handlers[t],e.removeEventListener?e.removeEventListener(t,i.dispatcher,!1):e.detachEvent&&e.detachEvent("on"+t,i.dispatcher)),Object.getOwnPropertyNames(i.handlers).length<=0&&(delete i.handlers,delete i.dispatcher,delete i.disabled),0===Object.getOwnPropertyNames(i).length&&re.delete(e)}}function se(t,i,e,n){e.forEach(function(e){t(i,e,n)})}function oe(e){if(e.fixed_)return e;function t(){return!0}function i(){return!1}if(!e||!e.isPropagationStopped){var n=e||y.event;for(var r in e={},n)"layerX"!==r&&"layerY"!==r&&"keyLocation"!==r&&"webkitMovementX"!==r&&"webkitMovementY"!==r&&("returnValue"===r&&n.preventDefault||(e[r]=n[r]));if(e.target||(e.target=e.srcElement||h),e.relatedTarget||(e.relatedTarget=e.fromElement===e.target?e.toElement:e.fromElement),e.preventDefault=function(){n.preventDefault&&n.preventDefault(),e.returnValue=!1,n.returnValue=!1,e.defaultPrevented=!0},e.defaultPrevented=!1,e.stopPropagation=function(){n.stopPropagation&&n.stopPropagation(),e.cancelBubble=!0,n.cancelBubble=!0,e.isPropagationStopped=t},e.isPropagationStopped=i,e.stopImmediatePropagation=function(){n.stopImmediatePropagation&&n.stopImmediatePropagation(),e.isImmediatePropagationStopped=t,e.stopPropagation()},e.isImmediatePropagationStopped=i,null!==e.clientX&&void 0!==e.clientX){var a=h.documentElement,s=h.body;e.pageX=e.clientX+(a&&a.scrollLeft||s&&s.scrollLeft||0)-(a&&a.clientLeft||s&&s.clientLeft||0),e.pageY=e.clientY+(a&&a.scrollTop||s&&s.scrollTop||0)-(a&&a.clientTop||s&&s.clientTop||0)}e.which=e.charCode||e.keyCode,null!==e.button&&void 0!==e.button&&(e.button=1&e.button?0:4&e.button?1:2&e.button?2:0)}return e.fixed_=!0,e}var le=function(){if("boolean"!=typeof ne){ne=!1;try{var e=Object.defineProperty({},"passive",{get:function(){ne=!0}});y.addEventListener("test",null,e),y.removeEventListener("test",null,e)}catch(e){}}return ne},ue=["touchstart","touchmove"];function ce(s,e,t){if(Array.isArray(e))return se(ce,s,e,t);re.has(s)||re.set(s,{});var o=re.get(s);if(o.handlers||(o.handlers={}),o.handlers[e]||(o.handlers[e]=[]),t.guid||(t.guid=ie()),o.handlers[e].push(t),o.dispatcher||(o.disabled=!1,o.dispatcher=function(e,t){if(!o.disabled){e=oe(e);var i=o.handlers[e.type];if(i)for(var n=i.slice(0),r=0,a=n.length;r<a&&!e.isImmediatePropagationStopped();r++)try{n[r].call(s,e,t)}catch(e){d.error(e)}}}),1===o.handlers[e].length)if(s.addEventListener){var i=!1;le()&&-1<ue.indexOf(e)&&(i={passive:!0}),s.addEventListener(e,o.dispatcher,i)}else s.attachEvent&&s.attachEvent("on"+e,o.dispatcher)}function he(e,t,i){if(re.has(e)){var n=re.get(e);if(n.handlers){if(Array.isArray(t))return se(he,e,t,i);var r=function(e,t){n.handlers[t]=[],ae(e,t)};if(void 0!==t){var a=n.handlers[t];if(a)if(i){if(i.guid)for(var s=0;s<a.length;s++)a[s].guid===i.guid&&a.splice(s--,1);ae(e,t)}else r(e,t)}else for(var o in n.handlers)Object.prototype.hasOwnProperty.call(n.handlers||{},o)&&r(e,o)}}}function de(e,t,i){var n=re.has(e)?re.get(e):{},r=e.parentNode||e.ownerDocument;if("string"==typeof t?t={type:t,target:e}:t.target||(t.target=e),t=oe(t),n.dispatcher&&n.dispatcher.call(e,t,i),r&&!t.isPropagationStopped()&&!0===t.bubbles)de.call(null,r,t,i);else if(!r&&!t.defaultPrevented&&t.target&&t.target[t.type]){re.has(t.target)||re.set(t.target,{});var a=re.get(t.target);t.target[t.type]&&(a.disabled=!0,"function"==typeof t.target[t.type]&&t.target[t.type](),a.disabled=!1)}return!t.defaultPrevented}function pe(e,t,i){if(Array.isArray(t))return se(pe,e,t,i);function n(){he(e,t,n),i.apply(this,arguments)}n.guid=i.guid=i.guid||ie(),ce(e,t,n)}function fe(e,t,i){function n(){he(e,t,n),i.apply(this,arguments)}n.guid=i.guid=i.guid||ie(),ce(e,t,n)}function ge(e,t,i){t.guid||(t.guid=ie());var n=t.bind(e);return n.guid=i?i+"_"+t.guid:t.guid,n}function me(t,i){var n=y.performance.now();return function(){var e=y.performance.now();i<=e-n&&(t.apply(void 0,arguments),n=e)}}function ve(n,r,a,s){var o;function e(){var e=this,t=arguments,i=function(){i=o=null,a||n.apply(e,t)};!o&&a&&n.apply(e,t),s.clearTimeout(o),o=s.setTimeout(i,r)}return void 0===s&&(s=y),e.cancel=function(){s.clearTimeout(o),o=null},e}function ye(){}var _e,Me=Object.freeze({__proto__:null,fixEvent:oe,on:ce,off:he,trigger:de,one:pe,any:fe});ye.prototype.allowedEvents_={},ye.prototype.addEventListener=ye.prototype.on=function(e,t){var i=this.addEventListener;this.addEventListener=function(){},ce(this,e,t),this.addEventListener=i},ye.prototype.removeEventListener=ye.prototype.off=function(e,t){he(this,e,t)},ye.prototype.one=function(e,t){var i=this.addEventListener;this.addEventListener=function(){},pe(this,e,t),this.addEventListener=i},ye.prototype.any=function(e,t){var i=this.addEventListener;this.addEventListener=function(){},fe(this,e,t),this.addEventListener=i},ye.prototype.dispatchEvent=ye.prototype.trigger=function(e){var t=e.type||e;"string"==typeof e&&(e={type:t}),e=oe(e),this.allowedEvents_[t]&&this["on"+t]&&this["on"+t](e),de(this,e)},ye.prototype.queueTrigger=function(e){var t=this;_e=_e||new Map;var i=e.type||e,n=_e.get(this);n||(n=new Map,_e.set(this,n));var r=n.get(i);n.delete(i),y.clearTimeout(r);var a=y.setTimeout(function(){0===n.size&&(n=null,_e.delete(t)),t.trigger(e)},0);n.set(i,a)};function we(e){return"string"==typeof e&&/\S/.test(e)||Array.isArray(e)&&!!e.length}function be(e){if(!e.nodeName&&!Se(e))throw new Error("Invalid target; must be a DOM node or evented object.")}function Te(e){if(!we(e))throw new Error("Invalid event type; must be a non-empty string or array.")}function Ae(e){if("function"!=typeof e)throw new Error("Invalid listener; must be a function.")}function xe(e,t){var i,n,r,a=t.length<3||t[0]===e||t[0]===e.eventBusEl_;return r=a?(i=e.eventBusEl_,3<=t.length&&t.shift(),n=t[0],t[1]):(i=t[0],n=t[1],t[2]),be(i),Te(n),Ae(r),{isTargetingSelf:a,target:i,type:n,listener:r=ge(e,r)}}function Ee(e,t,i,n){be(e),e.nodeName?Me[t](e,i,n):e[t](i,n)}var Se=function(t){return t instanceof ye||!!t.eventBusEl_&&["on","one","off","trigger"].every(function(e){return"function"==typeof t[e]})},De={on:function(){for(var e=this,t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];var r=xe(this,i),a=r.isTargetingSelf,s=r.target,o=r.type,l=r.listener;if(Ee(s,"on",o,l),!a){var u=function(){return e.off(s,o,l)};u.guid=l.guid;var c=function(){return e.off("dispose",u)};c.guid=l.guid,Ee(this,"on","dispose",u),Ee(s,"on","dispose",c)}},one:function(){for(var r=this,e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];var n=xe(this,t),a=n.isTargetingSelf,s=n.target,o=n.type,l=n.listener;if(a)Ee(s,"one",o,l);else{var u=function e(){r.off(s,o,e);for(var t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];l.apply(null,i)};u.guid=l.guid,Ee(s,"one",o,u)}},any:function(){for(var r=this,e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];var n=xe(this,t),a=n.isTargetingSelf,s=n.target,o=n.type,l=n.listener;if(a)Ee(s,"any",o,l);else{var u=function e(){r.off(s,o,e);for(var t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];l.apply(null,i)};u.guid=l.guid,Ee(s,"any",o,u)}},off:function(e,t,i){if(!e||we(e))he(this.eventBusEl_,e,t);else{var n=e,r=t;be(n),Te(r),Ae(i),i=ge(this,i),this.off("dispose",i),n.nodeName?(he(n,r,i),he(n,"dispose",i)):Se(n)&&(n.off(r,i),n.off("dispose",i))}},trigger:function(e,t){return de(this.eventBusEl_,e,t)}};function Ne(e,t){void 0===t&&(t={});var i=t.eventBusKey;if(i){if(!e[i].nodeName)throw new Error('The eventBusKey "'+i+'" does not refer to an element.');e.eventBusEl_=e[i]}else e.eventBusEl_=w("span",{className:"vjs-event-bus"});return f(e,De),e.eventedCallbacks&&e.eventedCallbacks.forEach(function(e){e()}),e.on("dispose",function(){e.off(),y.setTimeout(function(){e.eventBusEl_=null},0)}),e}var Ce={state:{},setState:function(e){var i,n=this;return"function"==typeof e&&(e=e()),s(e,function(e,t){n.state[t]!==e&&((i=i||{})[t]={from:n.state[t],to:e}),n.state[t]=e}),i&&Se(this)&&this.trigger({changes:i,type:"statechanged"}),i}};function Le(e,t){return f(e,Ce),e.state=f({},e.state,t),"function"==typeof e.handleStateChanged&&Se(e)&&e.on("statechanged",e.handleStateChanged),e}function Ie(e){return"string"!=typeof e?e:e.replace(/./,function(e){return e.toLowerCase()})}function Oe(e){return"string"!=typeof e?e:e.replace(/./,function(e){return e.toUpperCase()})}function je(){for(var i={},e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.forEach(function(e){e&&s(e,function(e,t){l(e)?(l(i[t])||(i[t]={}),i[t]=je(i[t],e)):i[t]=e})}),i}var ke=function(){function u(e,t,i){if(!e&&this.play?this.player_=e=this:this.player_=e,this.isDisposed_=!1,this.parentComponent_=null,this.options_=je({},this.options_),t=this.options_=je(this.options_,t),this.id_=t.id||t.el&&t.el.id,!this.id_){var n=e&&e.id&&e.id()||"no_player";this.id_=n+"_component_"+ie()}var r;this.name_=t.name||null,t.el?this.el_=t.el:!1!==t.createEl&&(this.el_=this.createEl()),!1!==t.evented&&Ne(this,{eventBusKey:this.el_?"el_":null}),Le(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},y.Set||(r=function(){function e(){this.set_={}}var t=e.prototype;return t.has=function(e){return e in this.set_},t.delete=function(e){var t=this.has(e);return delete this.set_[e],t},t.add=function(e){return this.set_[e]=1,this},t.forEach=function(e,t){for(var i in this.set_)e.call(t,i,i,this)},e}()),this.setTimeoutIds_=new(y.Set?Set:r),this.setIntervalIds_=new(y.Set?Set:r),this.rafIds_=new(y.Set?Set:r),(this.clearingTimersOnDispose_=!1)!==t.initChildren&&this.initChildren(),this.ready(i),!1!==t.reportTouchActivity&&this.enableTouchActivity()}var e=u.prototype;return e.dispose=function(){if(!this.isDisposed_){if(this.trigger({type:"dispose",bubbles:!1}),this.isDisposed_=!0,this.children_)for(var e=this.children_.length-1;0<=e;e--)this.children_[e].dispose&&this.children_[e].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.parentComponent_=null,this.el_&&(this.el_.parentNode&&this.el_.parentNode.removeChild(this.el_),re.has(this.el_)&&re.delete(this.el_),this.el_=null),this.player_=null}},e.isDisposed=function(){return Boolean(this.isDisposed_)},e.player=function(){return this.player_},e.options=function(e){return e&&(this.options_=je(this.options_,e)),this.options_},e.el=function(){return this.el_},e.createEl=function(e,t,i){return w(e,t,i)},e.localize=function(e,r,t){void 0===t&&(t=e);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],l=t;return a&&a[e]?l=a[e]:o&&o[e]&&(l=o[e]),r&&(l=l.replace(/\{(\d+)\}/g,function(e,t){var i=r[t-1],n=i;return void 0===i&&(n=e),n})),l},e.contentEl=function(){return this.contentEl_||this.el_},e.id=function(){return this.id_},e.name=function(){return this.name_},e.children=function(){return this.children_},e.getChildById=function(e){return this.childIndex_[e]},e.getChild=function(e){if(e)return this.childNameIndex_[e]},e.getDescendant=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];t=t.reduce(function(e,t){return e.concat(t)},[]);for(var n=this,r=0;r<t.length;r++)if(!(n=n.getChild(t[r]))||!n.getChild)return;return n},e.addChild=function(e,t,i){var n,r;if(void 0===t&&(t={}),void 0===i&&(i=this.children_.length),"string"==typeof e){r=Oe(e);var a=t.componentClass||r;t.name=r;var s=u.getComponent(a);if(!s)throw new Error("Component "+a+" does not exist");if("function"!=typeof s)return null;n=new s(this.player_||this,t)}else n=e;if(n.parentComponent_&&n.parentComponent_.removeChild(n),this.children_.splice(i,0,n),n.parentComponent_=this,"function"==typeof n.id&&(this.childIndex_[n.id()]=n),(r=r||n.name&&Oe(n.name()))&&(this.childNameIndex_[r]=n,this.childNameIndex_[Ie(r)]=n),"function"==typeof n.el&&n.el()){var o=null;this.children_[i+1]&&(this.children_[i+1].el_?o=this.children_[i+1].el_:v(this.children_[i+1])&&(o=this.children_[i+1])),this.contentEl().insertBefore(n.el(),o)}return n},e.removeChild=function(e){if("string"==typeof e&&(e=this.getChild(e)),e&&this.children_){for(var t=!1,i=this.children_.length-1;0<=i;i--)if(this.children_[i]===e){t=!0,this.children_.splice(i,1);break}if(t){e.parentComponent_=null,this.childIndex_[e.id()]=null,this.childNameIndex_[Oe(e.name())]=null,this.childNameIndex_[Ie(e.name())]=null;var n=e.el();n&&n.parentNode===this.contentEl()&&this.contentEl().removeChild(e.el())}}},e.initChildren=function(){var r=this,n=this.options_.children;if(n){var e,a=this.options_,i=u.getComponent("Tech");(e=Array.isArray(n)?n:Object.keys(n)).concat(Object.keys(this.options_).filter(function(t){return!e.some(function(e){return"string"==typeof e?t===e:t===e.name})})).map(function(e){var t,i;return i="string"==typeof e?n[t=e]||r.options_[t]||{}:(t=e.name,e),{name:t,opts:i}}).filter(function(e){var t=u.getComponent(e.opts.componentClass||Oe(e.name));return t&&!i.isTech(t)}).forEach(function(e){var t=e.name,i=e.opts;if(void 0!==a[t]&&(i=a[t]),!1!==i){!0===i&&(i={}),i.playerOptions=r.options_.playerOptions;var n=r.addChild(t,i);n&&(r[t]=n)}})}},e.buildCSSClass=function(){return""},e.ready=function(e,t){if(void 0===t&&(t=!1),e)return this.isReady_?void(t?e.call(this):this.setTimeout(e,1)):(this.readyQueue_=this.readyQueue_||[],void this.readyQueue_.push(e))},e.triggerReady=function(){this.isReady_=!0,this.setTimeout(function(){var e=this.readyQueue_;this.readyQueue_=[],e&&0<e.length&&e.forEach(function(e){e.call(this)},this),this.trigger("ready")},1)},e.$=function(e,t){return Q(e,t||this.contentEl())},e.$$=function(e,t){return V(e,t||this.contentEl())},e.hasClass=function(e){return A(this.el_,e)},e.addClass=function(e){x(this.el_,e)},e.removeClass=function(e){E(this.el_,e)},e.toggleClass=function(e,t){S(this.el_,e,t)},e.show=function(){this.removeClass("vjs-hidden")},e.hide=function(){this.addClass("vjs-hidden")},e.lockShowing=function(){this.addClass("vjs-lock-showing")},e.unlockShowing=function(){this.removeClass("vjs-lock-showing")},e.getAttribute=function(e){return C(this.el_,e)},e.setAttribute=function(e,t){L(this.el_,e,t)},e.removeAttribute=function(e){I(this.el_,e)},e.width=function(e,t){return this.dimension("width",e,t)},e.height=function(e,t){return this.dimension("height",e,t)},e.dimensions=function(e,t){this.width(e,!0),this.height(t)},e.dimension=function(e,t,i){if(void 0!==t)return null!==t&&t==t||(t=0),-1!==(""+t).indexOf("%")||-1!==(""+t).indexOf("px")?this.el_.style[e]=t:this.el_.style[e]="auto"===t?"":t+"px",void(i||this.trigger("componentresize"));if(!this.el_)return 0;var n=this.el_.style[e],r=n.indexOf("px");return-1!==r?parseInt(n.slice(0,r),10):parseInt(this.el_["offset"+Oe(e)],10)},e.currentDimension=function(e){var t=0;if("width"!==e&&"height"!==e)throw new Error("currentDimension only accepts width or height value");if(t=n(this.el_,e),0===(t=parseFloat(t))||isNaN(t)){var i="offset"+Oe(e);t=this.el_[i]}return t},e.currentDimensions=function(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}},e.currentWidth=function(){return this.currentDimension("width")},e.currentHeight=function(){return this.currentDimension("height")},e.focus=function(){this.el_.focus()},e.blur=function(){this.el_.blur()},e.handleKeyDown=function(e){this.player_&&(e.stopPropagation(),this.player_.handleKeyDown(e))},e.handleKeyPress=function(e){this.handleKeyDown(e)},e.emitTapEvents=function(){var n,t=0,r=null;this.on("touchstart",function(e){1===e.touches.length&&(r={pageX:e.touches[0].pageX,pageY:e.touches[0].pageY},t=y.performance.now(),n=!0)}),this.on("touchmove",function(e){if(1<e.touches.length)n=!1;else if(r){var t=e.touches[0].pageX-r.pageX,i=e.touches[0].pageY-r.pageY;10<Math.sqrt(t*t+i*i)&&(n=!1)}});function e(){n=!1}this.on("touchleave",e),this.on("touchcancel",e),this.on("touchend",function(e){!(r=null)===n&&y.performance.now()-t<200&&(e.preventDefault(),this.trigger("tap"))})},e.enableTouchActivity=function(){if(this.player()&&this.player().reportUserActivity){var e,t=ge(this.player(),this.player().reportUserActivity);this.on("touchstart",function(){t(),this.clearInterval(e),e=this.setInterval(t,250)});var i=function(){t(),this.clearInterval(e)};this.on("touchmove",t),this.on("touchend",i),this.on("touchcancel",i)}},e.setTimeout=function(e,t){var i,n=this;return e=ge(this,e),this.clearTimersOnDispose_(),i=y.setTimeout(function(){n.setTimeoutIds_.has(i)&&n.setTimeoutIds_.delete(i),e()},t),this.setTimeoutIds_.add(i),i},e.clearTimeout=function(e){return this.setTimeoutIds_.has(e)&&(this.setTimeoutIds_.delete(e),y.clearTimeout(e)),e},e.setInterval=function(e,t){e=ge(this,e),this.clearTimersOnDispose_();var i=y.setInterval(e,t);return this.setIntervalIds_.add(i),i},e.clearInterval=function(e){return this.setIntervalIds_.has(e)&&(this.setIntervalIds_.delete(e),y.clearInterval(e)),e},e.requestAnimationFrame=function(e){var t,i=this;return this.supportsRaf_?(this.clearTimersOnDispose_(),e=ge(this,e),t=y.requestAnimationFrame(function(){i.rafIds_.has(t)&&i.rafIds_.delete(t),e()}),this.rafIds_.add(t),t):this.setTimeout(e,1e3/60)},e.cancelAnimationFrame=function(e){return this.supportsRaf_?(this.rafIds_.has(e)&&(this.rafIds_.delete(e),y.cancelAnimationFrame(e)),e):this.clearTimeout(e)},e.clearTimersOnDispose_=function(){var n=this;this.clearingTimersOnDispose_||(this.clearingTimersOnDispose_=!0,this.one("dispose",function(){[["rafIds_","cancelAnimationFrame"],["setTimeoutIds_","clearTimeout"],["setIntervalIds_","clearInterval"]].forEach(function(e){var t=e[0],i=e[1];n[t].forEach(n[i],n)}),n.clearingTimersOnDispose_=!1}))},u.registerComponent=function(e,t){if("string"!=typeof e||!e)throw new Error('Illegal component name, "'+e+'"; must be a non-empty string.');var i,n=u.getComponent("Tech"),r=n&&n.isTech(t),a=u===t||u.prototype.isPrototypeOf(t.prototype);if(r||!a)throw i=r?"techs must be registered using Tech.registerTech()":"must be a Component subclass",new Error('Illegal component, "'+e+'"; '+i+".");e=Oe(e),u.components_||(u.components_={});var s=u.getComponent("Player");if("Player"===e&&s&&s.players){var o=s.players,l=Object.keys(o);if(o&&0<l.length&&l.map(function(e){return o[e]}).every(Boolean))throw new Error("Can not register Player component after player has been created.")}return u.components_[e]=t,u.components_[Ie(e)]=t},u.getComponent=function(e){if(e&&u.components_)return u.components_[e]},u}();ke.prototype.supportsRaf_="function"==typeof y.requestAnimationFrame&&"function"==typeof y.cancelAnimationFrame,ke.registerComponent("Component",ke);var Pe=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e};t(function(t){function i(e){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?t.exports=i=function(e){return typeof e}:t.exports=i=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}t.exports=i}),t(function(t){function i(e){return t.exports=i=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},i(e)}t.exports=i});var Re,ze,Ue,Be,Fe=function(e,t){e.prototype=Object.create(t.prototype),(e.prototype.constructor=e).__proto__=t},Ge=y.navigator&&y.navigator.userAgent||"",He=/AppleWebKit\/([\d.]+)/i.exec(Ge),Ye=He?parseFloat(He.pop()):null,Qe=/iPod/i.test(Ge),Ve=(Re=Ge.match(/OS (\d+)_/i))&&Re[1]?Re[1]:null,We=/Android/i.test(Ge),qe=function(){var e=Ge.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!e)return null;var t=e[1]&&parseFloat(e[1]),i=e[2]&&parseFloat(e[2]);return t&&i?parseFloat(e[1]+"."+e[2]):t||null}(),Xe=We&&qe<5&&Ye<537,Ze=/Firefox/i.test(Ge),$e=/Edg/i.test(Ge),Ke=!$e&&(/Chrome/i.test(Ge)||/CriOS/i.test(Ge)),Je=(ze=Ge.match(/(Chrome|CriOS)\/(\d+)/))&&ze[2]?parseFloat(ze[2]):null,et=(Ue=/MSIE\s(\d+)\.\d/.exec(Ge),!(Be=Ue&&parseFloat(Ue[1]))&&/Trident\/7.0/i.test(Ge)&&/rv:11.0/.test(Ge)&&(Be=11),Be),tt=/Safari/i.test(Ge)&&!Ke&&!We&&!$e,it=/Windows/i.test(Ge),nt=m()&&("ontouchstart"in y||y.navigator.maxTouchPoints||y.DocumentTouch&&y.document instanceof y.DocumentTouch),rt=/iPad/i.test(Ge)||tt&&nt&&!/iPhone/i.test(Ge),at=/iPhone/i.test(Ge)&&!rt,st=at||rt||Qe,ot=(tt||st)&&!Ke,lt=Object.freeze({__proto__:null,IS_IPOD:Qe,IOS_VERSION:Ve,IS_ANDROID:We,ANDROID_VERSION:qe,IS_NATIVE_ANDROID:Xe,IS_FIREFOX:Ze,IS_EDGE:$e,IS_CHROME:Ke,CHROME_VERSION:Je,IE_VERSION:et,IS_SAFARI:tt,IS_WINDOWS:it,TOUCH_ENABLED:nt,IS_IPAD:rt,IS_IPHONE:at,IS_IOS:st,IS_ANY_SAFARI:ot});function ut(e,t,i,n){return function(e,t,i){if("number"!=typeof t||t<0||i<t)throw new Error("Failed to execute '"+e+"' on 'TimeRanges': The index provided ("+t+") is non-numeric or out of bounds (0-"+i+").")}(e,n,i.length-1),i[n][t]}function ct(e){return void 0===e||0===e.length?{length:0,start:function(){throw new Error("This TimeRanges object is empty")},end:function(){throw new Error("This TimeRanges object is empty")}}:{length:e.length,start:ut.bind(null,"start",0,e),end:ut.bind(null,"end",1,e)}}function ht(e,t){return Array.isArray(e)?ct(e):void 0===e||void 0===t?ct():ct([[e,t]])}function dt(e,t){var i,n,r=0;if(!t)return 0;e&&e.length||(e=ht(0,0));for(var a=0;a<e.length;a++)i=e.start(a),t<(n=e.end(a))&&(n=t),r+=n-i;return r/t}for(var pt,ft={prefixed:!0},gt=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror","fullscreen"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror","-webkit-full-screen"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror","-moz-full-screen"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError","-ms-fullscreen"]],mt=gt[0],vt=0;vt<gt.length;vt++)if(gt[vt][1]in h){pt=gt[vt];break}if(pt){for(var yt=0;yt<pt.length;yt++)ft[mt[yt]]=pt[yt];ft.prefixed=pt[0]!==mt[0]}function _t(e){if(e instanceof _t)return e;"number"==typeof e?this.code=e:"string"==typeof e?this.message=e:o(e)&&("number"==typeof e.code&&(this.code=e.code),f(this,e)),this.message||(this.message=_t.defaultMessages[this.code]||"")}_t.prototype.code=0,_t.prototype.message="",_t.prototype.status=null,_t.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],_t.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 Mt=0;Mt<_t.errorTypes.length;Mt++)_t[_t.errorTypes[Mt]]=Mt,_t.prototype[_t.errorTypes[Mt]]=Mt;var wt=function(e,t){var i,n=null;try{i=JSON.parse(e,t)}catch(e){n=e}return[n,i]};function bt(e){return null!=e&&"function"==typeof e.then}function Tt(e){bt(e)&&e.then(null,function(e){})}function At(n){return["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce(function(e,t,i){return n[t]&&(e[t]=n[t]),e},{cues:n.cues&&Array.prototype.map.call(n.cues,function(e){return{startTime:e.startTime,endTime:e.endTime,text:e.text,id:e.id}})})}var xt=function(e){var t=e.$$("track"),i=Array.prototype.map.call(t,function(e){return e.track});return Array.prototype.map.call(t,function(e){var t=At(e.track);return e.src&&(t.src=e.src),t}).concat(Array.prototype.filter.call(e.textTracks(),function(e){return-1===i.indexOf(e)}).map(At))},Et=function(e,i){return e.forEach(function(e){var t=i.addRemoteTextTrack(e).track;!e.src&&e.cues&&e.cues.forEach(function(e){return t.addCue(e)})}),i.textTracks()},St=t(function(e,t){function i(e){if(e&&"object"==typeof e){var t=e.which||e.keyCode||e.charCode;t&&(e=t)}if("number"==typeof e)return s[e];var i,n=String(e);return(i=r[n.toLowerCase()])||(i=a[n.toLowerCase()])?i:1===n.length?n.charCodeAt(0):void 0}i.isEventKey=function(e,t){if(e&&"object"==typeof e){var i=e.which||e.keyCode||e.charCode;if(null==i)return!1;if("string"==typeof t){var n;if(n=r[t.toLowerCase()])return n===i;if(n=a[t.toLowerCase()])return n===i}else if("number"==typeof t)return t===i;return!1}};var r=(t=e.exports=i).code=t.codes={backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,"pause/break":19,"caps lock":20,esc:27,space:32,"page up":33,"page down":34,end:35,home:36,left:37,up:38,right:39,down:40,insert:45,delete:46,command:91,"left command":91,"right command":93,"numpad *":106,"numpad +":107,"numpad -":109,"numpad .":110,"numpad /":111,"num lock":144,"scroll lock":145,"my computer":182,"my calculator":183,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},a=t.aliases={windows:91,"â§":16,"â¥":18,"â":17,"â":91,ctl:17,control:17,option:18,pause:19,break:19,caps:20,return:13,escape:27,spc:32,spacebar:32,pgup:33,pgdn:34,ins:45,del:46,cmd:91};for(n=97;n<123;n++)r[String.fromCharCode(n)]=n-32;for(var n=48;n<58;n++)r[n-48]=n;for(n=1;n<13;n++)r["f"+n]=n+111;for(n=0;n<10;n++)r["numpad "+n]=n+96;var s=t.names=t.title={};for(n in r)s[r[n]]=n;for(var o in a)r[o]=a[o]}),Dt=(St.code,St.codes,St.aliases,St.names,St.title,"vjs-modal-dialog"),Nt=function(n){function e(e,t){var i;return(i=n.call(this,e,t)||this).opened_=i.hasBeenOpened_=i.hasBeenFilled_=!1,i.closeable(!i.options_.uncloseable),i.content(i.options_.content),i.contentEl_=w("div",{className:Dt+"-content"},{role:"document"}),i.descEl_=w("p",{className:Dt+"-description vjs-control-text",id:i.el().getAttribute("aria-describedby")}),b(i.descEl_,i.description()),i.el_.appendChild(i.descEl_),i.el_.appendChild(i.contentEl_),i}Fe(e,n);var t=e.prototype;return t.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"})},t.dispose=function(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,n.prototype.dispose.call(this)},t.buildCSSClass=function(){return Dt+" vjs-hidden "+n.prototype.buildCSSClass.call(this)},t.label=function(){return this.localize(this.options_.label||"Modal Window")},t.description=function(){var e=this.options_.description||this.localize("This is a modal window.");return this.closeable()&&(e+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")),e},t.open=function(){if(!this.opened_){var e=this.player();this.trigger("beforemodalopen"),this.opened_=!0,!this.options_.fillAlways&&(this.hasBeenOpened_||this.hasBeenFilled_)||this.fill(),this.wasPlaying_=!e.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&e.pause(),this.on("keydown",this.handleKeyDown),this.hadControls_=e.controls(),e.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.hasBeenOpened_=!0}},t.opened=function(e){return"boolean"==typeof e&&this[e?"open":"close"](),this.opened_},t.close=function(){if(this.opened_){var e=this.player();this.trigger("beforemodalclose"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&e.play(),this.off("keydown",this.handleKeyDown),this.hadControls_&&e.controls(!0),this.hide(),this.el().setAttribute("aria-hidden","true"),this.trigger("modalclose"),this.conditionalBlur_(),this.options_.temporary&&this.dispose()}},t.closeable=function(e){if("boolean"==typeof e){var t=this.closeable_=!!e,i=this.getChild("closeButton");if(t&&!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)}!t&&i&&(this.off(i,"close",this.close),this.removeChild(i),i.dispose())}return this.closeable_},t.fill=function(){this.fillWith(this.content())},t.fillWith=function(e){var t=this.contentEl(),i=t.parentNode,n=t.nextSibling;this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,i.removeChild(t),this.empty(),G(t,e),this.trigger("modalfill"),n?i.insertBefore(t,n):i.appendChild(t);var r=this.getChild("closeButton");r&&i.appendChild(r.el_)},t.empty=function(){this.trigger("beforemodalempty"),U(this.contentEl()),this.trigger("modalempty")},t.content=function(e){return void 0!==e&&(this.content_=e),this.content_},t.conditionalFocus_=function(){var e=h.activeElement,t=this.player_.el_;this.previouslyActiveEl_=null,!t.contains(e)&&t!==e||(this.previouslyActiveEl_=e,this.focus())},t.conditionalBlur_=function(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null)},t.handleKeyDown=function(e){if(e.stopPropagation(),St.isEventKey(e,"Escape")&&this.closeable())return e.preventDefault(),void this.close();if(St.isEventKey(e,"Tab")){for(var t,i=this.focusableEls_(),n=this.el_.querySelector(":focus"),r=0;r<i.length;r++)if(n===i[r]){t=r;break}h.activeElement===this.el_&&(t=0),e.shiftKey&&0===t?(i[i.length-1].focus(),e.preventDefault()):e.shiftKey||t!==i.length-1||(i[0].focus(),e.preventDefault())}},t.focusableEls_=function(){var e=this.el_.querySelectorAll("*");return Array.prototype.filter.call(e,function(e){return(e instanceof y.HTMLAnchorElement||e instanceof y.HTMLAreaElement)&&e.hasAttribute("href")||(e instanceof y.HTMLInputElement||e instanceof y.HTMLSelectElement||e instanceof y.HTMLTextAreaElement||e instanceof y.HTMLButtonElement)&&!e.hasAttribute("disabled")||e instanceof y.HTMLIFrameElement||e instanceof y.HTMLObjectElement||e instanceof y.HTMLEmbedElement||e.hasAttribute("tabindex")&&-1!==e.getAttribute("tabindex")||e.hasAttribute("contenteditable")})},e}(ke);Nt.prototype.options_={pauseOnOpen:!0,temporary:!0},ke.registerComponent("ModalDialog",Nt);var Ct=function(n){function e(e){var t;void 0===e&&(e=[]),(t=n.call(this)||this).tracks_=[],Object.defineProperty(Pe(t),"length",{get:function(){return this.tracks_.length}});for(var i=0;i<e.length;i++)t.addTrack(e[i]);return t}Fe(e,n);var t=e.prototype;return t.addTrack=function(e){var t=this.tracks_.length;""+t in this||Object.defineProperty(this,t,{get:function(){return this.tracks_[t]}}),-1===this.tracks_.indexOf(e)&&(this.tracks_.push(e),this.trigger({track:e,type:"addtrack",target:this}))},t.removeTrack=function(e){for(var t,i=0,n=this.length;i<n;i++)if(this[i]===e){(t=this[i]).off&&t.off(),this.tracks_.splice(i,1);break}t&&this.trigger({track:t,type:"removetrack",target:this})},t.getTrackById=function(e){for(var t=null,i=0,n=this.length;i<n;i++){var r=this[i];if(r.id===e){t=r;break}}return t},e}(ye);for(var Lt in Ct.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack"},Ct.prototype.allowedEvents_)Ct.prototype["on"+Lt]=null;function It(e,t){for(var i=0;i<e.length;i++)Object.keys(e[i]).length&&t.id!==e[i].id&&(e[i].enabled=!1)}function Ot(e,t){for(var i=0;i<e.length;i++)Object.keys(e[i]).length&&t.id!==e[i].id&&(e[i].selected=!1)}function jt(e){var t=["protocol","hostname","port","pathname","search","hash","host"],i=h.createElement("a");i.href=e;var n,r=""===i.host&&"file:"!==i.protocol;r&&((n=h.createElement("div")).innerHTML='<a href="'+e+'"></a>',i=n.firstChild,n.setAttribute("style","display:none; position:absolute;"),h.body.appendChild(n));for(var a={},s=0;s<t.length;s++)a[t[s]]=i[t[s]];return"http:"===a.protocol&&(a.host=a.host.replace(/:80$/,"")),"https:"===a.protocol&&(a.host=a.host.replace(/:443$/,"")),a.protocol||(a.protocol=y.location.protocol),r&&h.body.removeChild(n),a}function kt(e){if(!e.match(/^https?:\/\//)){var t=h.createElement("div");t.innerHTML='<a href="'+e+'">x</a>',e=t.firstChild.href}return e}function Pt(e){if("string"==typeof e){var t=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/.exec(e);if(t)return t.pop().toLowerCase()}return""}function Rt(e,t){void 0===t&&(t=y.location);var i=jt(e);return(":"===i.protocol?t.protocol:i.protocol)+i.host!==t.protocol+t.host}var zt=function(n){function e(e){var t;void 0===e&&(e=[]);for(var i=e.length-1;0<=i;i--)if(e[i].enabled){It(e,e[i]);break}return(t=n.call(this,e)||this).changing_=!1,t}Fe(e,n);var t=e.prototype;return t.addTrack=function(e){var t=this;e.enabled&&It(this,e),n.prototype.addTrack.call(this,e),e.addEventListener&&(e.enabledChange_=function(){t.changing_||(t.changing_=!0,It(t,e),t.changing_=!1,t.trigger("change"))},e.addEventListener("enabledchange",e.enabledChange_))},t.removeTrack=function(e){n.prototype.removeTrack.call(this,e),e.removeEventListener&&e.enabledChange_&&(e.removeEventListener("enabledchange",e.enabledChange_),e.enabledChange_=null)},e}(Ct),Ut=function(n){function e(e){var t;void 0===e&&(e=[]);for(var i=e.length-1;0<=i;i--)if(e[i].selected){Ot(e,e[i]);break}return(t=n.call(this,e)||this).changing_=!1,Object.defineProperty(Pe(t),"selectedIndex",{get:function(){for(var e=0;e<this.length;e++)if(this[e].selected)return e;return-1},set:function(){}}),t}Fe(e,n);var t=e.prototype;return t.addTrack=function(e){var t=this;e.selected&&Ot(this,e),n.prototype.addTrack.call(this,e),e.addEventListener&&(e.selectedChange_=function(){t.changing_||(t.changing_=!0,Ot(t,e),t.changing_=!1,t.trigger("change"))},e.addEventListener("selectedchange",e.selectedChange_))},t.removeTrack=function(e){n.prototype.removeTrack.call(this,e),e.removeEventListener&&e.selectedChange_&&(e.removeEventListener("selectedchange",e.selectedChange_),e.selectedChange_=null)},e}(Ct),Bt=function(i){function e(){return i.apply(this,arguments)||this}Fe(e,i);var t=e.prototype;return t.addTrack=function(e){var t=this;i.prototype.addTrack.call(this,e),this.queueChange_||(this.queueChange_=function(){return t.queueTrigger("change")}),this.triggerSelectedlanguagechange||(this.triggerSelectedlanguagechange_=function(){return t.trigger("selectedlanguagechange")}),e.addEventListener("modechange",this.queueChange_);-1===["metadata","chapters"].indexOf(e.kind)&&e.addEventListener("modechange",this.triggerSelectedlanguagechange_)},t.removeTrack=function(e){i.prototype.removeTrack.call(this,e),e.removeEventListener&&(this.queueChange_&&e.removeEventListener("modechange",this.queueChange_),this.selectedlanguagechange_&&e.removeEventListener("modechange",this.triggerSelectedlanguagechange_))},e}(Ct),Ft=function(){function e(e){void 0===e&&(e=[]),this.trackElements_=[],Object.defineProperty(this,"length",{get:function(){return this.trackElements_.length}});for(var t=0,i=e.length;t<i;t++)this.addTrackElement_(e[t])}var t=e.prototype;return t.addTrackElement_=function(e){var t=this.trackElements_.length;""+t in this||Object.defineProperty(this,t,{get:function(){return this.trackElements_[t]}}),-1===this.trackElements_.indexOf(e)&&this.trackElements_.push(e)},t.getTrackElementByTrack_=function(e){for(var t,i=0,n=this.trackElements_.length;i<n;i++)if(e===this.trackElements_[i].track){t=this.trackElements_[i];break}return t},t.removeTrackElement_=function(e){for(var t=0,i=this.trackElements_.length;t<i;t++)if(e===this.trackElements_[t]){this.trackElements_[t].track&&"function"==typeof this.trackElements_[t].track.off&&this.trackElements_[t].track.off(),"function"==typeof this.trackElements_[t].off&&this.trackElements_[t].off(),this.trackElements_.splice(t,1);break}},e}(),Gt=function(){function t(e){t.prototype.setCues_.call(this,e),Object.defineProperty(this,"length",{get:function(){return this.length_}})}var e=t.prototype;return e.setCues_=function(e){var t=this.length||0,i=0,n=e.length;this.cues_=e,this.length_=e.length;function r(e){""+e in this||Object.defineProperty(this,""+e,{get:function(){return this.cues_[e]}})}if(t<n)for(i=t;i<n;i++)r.call(this,i)},e.getCueById=function(e){for(var t=null,i=0,n=this.length;i<n;i++){var r=this[i];if(r.id===e){t=r;break}}return t},t}(),Ht={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},Yt={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},Qt={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},Vt={disabled:"disabled",hidden:"hidden",showing:"showing"},Wt=function(a){function e(e){var t;void 0===e&&(e={}),t=a.call(this)||this;function i(e){Object.defineProperty(Pe(t),e,{get:function(){return n[e]},set:function(){}})}var n={id:e.id||"vjs_track_"+ie(),kind:e.kind||"",label:e.label||"",language:e.language||""};for(var r in n)i(r);return t}return Fe(e,a),e}(ye),qt=Object.freeze({__proto__:null,parseUrl:jt,getAbsoluteURL:kt,getFileExtension:Pt,isCrossOrigin:Rt}),Xt=function(e){var t=Zt.call(e);return"[object Function]"===t||"function"==typeof e&&"[object RegExp]"!==t||"undefined"!=typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)},Zt=Object.prototype.toString;var $t=function(e){var r={};return e&&e.trim().split("\n").forEach(function(e){var t=e.indexOf(":"),i=e.slice(0,t).trim().toLowerCase(),n=e.slice(t+1).trim();void 0===r[i]?r[i]=n:Array.isArray(r[i])?r[i].push(n):r[i]=[r[i],n]}),r},Kt=ti,Jt=ti;function ei(e,t,i){var n=e;return Xt(t)?(i=t,"string"==typeof e&&(n={uri:e})):n=r({},t,{uri:e}),n.callback=i,n}function ti(e,t,i){return ii(t=ei(e,t,i))}function ii(n){if(void 0===n.callback)throw new Error("callback argument missing");var r=!1,a=function(e,t,i){r||(r=!0,n.callback(e,t,i))};function s(){var e=void 0;if(e=u.response?u.response:u.responseText||function(e){try{if("document"===e.responseType)return e.responseXML;var t=e.responseXML&&"parsererror"===e.responseXML.documentElement.nodeName;if(""===e.responseType&&!t)return e.responseXML}catch(e){}return null}(u),g)try{e=JSON.parse(e)}catch(e){}return e}function t(e){return clearTimeout(l),e instanceof Error||(e=new Error(""+(e||"Unknown XMLHttpRequest Error"))),e.statusCode=0,a(e,m)}function e(){if(!o){var e;clearTimeout(l),e=n.useXDR&&void 0===u.status?200:1223===u.status?204:u.status;var t=m,i=null;return 0!==e?(t={body:s(),statusCode:e,method:h,headers:{},url:c,rawRequest:u},u.getAllResponseHeaders&&(t.headers=$t(u.getAllResponseHeaders()))):i=new Error("Internal XMLHttpRequest Error"),a(i,t,t.body)}}var i,o,l,u=n.xhr||null,c=(u=u||(n.cors||n.useXDR?new ti.XDomainRequest:new ti.XMLHttpRequest)).url=n.uri||n.url,h=u.method=n.method||"GET",d=n.body||n.data,p=u.headers=n.headers||{},f=!!n.sync,g=!1,m={body:void 0,headers:{},statusCode:0,method:h,url:c,rawRequest:u};if("json"in n&&!1!==n.json&&(g=!0,p.accept||p.Accept||(p.Accept="application/json"),"GET"!==h&&"HEAD"!==h&&(p["content-type"]||p["Content-Type"]||(p["Content-Type"]="application/json"),d=JSON.stringify(!0===n.json?d:n.json))),u.onreadystatechange=function(){4===u.readyState&&setTimeout(e,0)},u.onload=e,u.onerror=t,u.onprogress=function(){},u.onabort=function(){o=!0},u.ontimeout=t,u.open(h,c,!f,n.username,n.password),f||(u.withCredentials=!!n.withCredentials),!f&&0<n.timeout&&(l=setTimeout(function(){if(!o){o=!0,u.abort("timeout");var e=new Error("XMLHttpRequest timeout");e.code="ETIMEDOUT",t(e)}},n.timeout)),u.setRequestHeader)for(i in p)p.hasOwnProperty(i)&&u.setRequestHeader(i,p[i]);else if(n.headers&&!function(e){for(var t in e)if(e.hasOwnProperty(t))return;return 1}(n.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in n&&(u.responseType=n.responseType),"beforeSend"in n&&"function"==typeof n.beforeSend&&n.beforeSend(u),u.send(d||null),u}ti.XMLHttpRequest=y.XMLHttpRequest||function(){},ti.XDomainRequest="withCredentials"in new ti.XMLHttpRequest?ti.XMLHttpRequest:y.XDomainRequest,function(e,t){for(var i=0;i<e.length;i++)t(e[i])}(["get","put","post","patch","head","delete"],function(n){ti["delete"===n?"del":n]=function(e,t,i){return(t=ei(e,t,i)).method=n.toUpperCase(),ii(t)}}),Kt.default=Jt;function ni(e,t){var i=new y.WebVTT.Parser(y,y.vttjs,y.WebVTT.StringDecoder()),n=[];i.oncue=function(e){t.addCue(e)},i.onparsingerror=function(e){n.push(e)},i.onflush=function(){t.trigger({type:"loadeddata",target:t})},i.parse(e),0<n.length&&(y.console&&y.console.groupCollapsed&&y.console.groupCollapsed("Text Track parsing errors for "+t.src),n.forEach(function(e){return d.error(e)}),y.console&&y.console.groupEnd&&y.console.groupEnd()),i.flush()}function ri(e,n){var t={uri:e},i=Rt(e);i&&(t.cors=i),Kt(t,ge(this,function(e,t,i){if(e)return d.error(e,t);n.loaded_=!0,"function"!=typeof y.WebVTT?n.tech_&&n.tech_.any(["vttjsloaded","vttjserror"],function(e){if("vttjserror"!==e.type)return ni(i,n);d.error("vttjs failed to load, stopping trying to process "+n.src)}):ni(i,n)}))}var ai=function(u){function e(e){var t;if(void 0===e&&(e={}),!e.tech)throw new Error("A tech was not provided.");var i=je(e,{kind:Qt[e.kind]||"subtitles",language:e.language||e.srclang||""}),n=Vt[i.mode]||"disabled",r=i.default;"metadata"!==i.kind&&"chapters"!==i.kind||(n="hidden"),(t=u.call(this,i)||this).tech_=i.tech,t.cues_=[],t.activeCues_=[],t.preload_=!1!==t.tech_.preloadTextTracks;var a=new Gt(t.cues_),s=new Gt(t.activeCues_),o=!1,l=ge(Pe(t),function(){this.activeCues=this.activeCues,o&&(this.trigger("cuechange"),o=!1)});return"disabled"!==n&&t.tech_.ready(function(){t.tech_.on("timeupdate",l)},!0),Object.defineProperties(Pe(t),{default:{get:function(){return r},set:function(){}},mode:{get:function(){return n},set:function(e){var t=this;Vt[e]&&(n=e,this.preload_||"disabled"===n||0!==this.cues.length||ri(this.src,this),"disabled"!==n?this.tech_.ready(function(){t.tech_.on("timeupdate",l)},!0):this.tech_.off("timeupdate",l),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 e=this.tech_.currentTime(),t=[],i=0,n=this.cues.length;i<n;i++){var r=this.cues[i];(r.startTime<=e&&r.endTime>=e||r.startTime===r.endTime&&r.startTime<=e&&r.startTime+.5>=e)&&t.push(r)}if(o=!1,t.length!==this.activeCues_.length)o=!0;else for(var a=0;a<t.length;a++)-1===this.activeCues_.indexOf(t[a])&&(o=!0);return this.activeCues_=t,s.setCues_(this.activeCues_),s},set:function(){}}}),i.src?(t.src=i.src,t.preload_||(t.loaded_=!0),(t.preload_||r||"subtitles"!==i.kind&&"captions"!==i.kind)&&ri(t.src,Pe(t))):t.loaded_=!0,t}Fe(e,u);var t=e.prototype;return t.addCue=function(e){var t=e;if(y.vttjs&&!(e instanceof y.vttjs.VTTCue)){for(var i in t=new y.vttjs.VTTCue(e.startTime,e.endTime,e.text),e)i in t||(t[i]=e[i]);t.id=e.id,t.originalCue_=e}for(var n=this.tech_.textTracks(),r=0;r<n.length;r++)n[r]!==this&&n[r].removeCue(t);this.cues_.push(t),this.cues.setCues_(this.cues_)},t.removeCue=function(e){for(var t=this.cues_.length;t--;){var i=this.cues_[t];if(i===e||i.originalCue_&&i.originalCue_===e){this.cues_.splice(t,1),this.cues.setCues_(this.cues_);break}}},e}(Wt);ai.prototype.allowedEvents_={cuechange:"cuechange"};var si=function(r){function e(e){var t;void 0===e&&(e={});var i=je(e,{kind:Yt[e.kind]||""});t=r.call(this,i)||this;var n=!1;return Object.defineProperty(Pe(t),"enabled",{get:function(){return n},set:function(e){"boolean"==typeof e&&e!==n&&(n=e,this.trigger("enabledchange"))}}),i.enabled&&(t.enabled=i.enabled),t.loaded_=!0,t}return Fe(e,r),e}(Wt),oi=function(r){function e(e){var t;void 0===e&&(e={});var i=je(e,{kind:Ht[e.kind]||""});t=r.call(this,i)||this;var n=!1;return Object.defineProperty(Pe(t),"selected",{get:function(){return n},set:function(e){"boolean"==typeof e&&e!==n&&(n=e,this.trigger("selectedchange"))}}),i.selected&&(t.selected=i.selected),t}return Fe(e,r),e}(Wt),li=function(r){function e(e){var t,i;void 0===e&&(e={}),t=r.call(this)||this;var n=new ai(e);return t.kind=n.kind,t.src=n.src,t.srclang=n.language,t.label=n.label,t.default=n.default,Object.defineProperties(Pe(t),{readyState:{get:function(){return i}},track:{get:function(){return n}}}),i=0,n.addEventListener("loadeddata",function(){i=2,t.trigger({type:"load",target:Pe(t)})}),t}return Fe(e,r),e}(ye);li.prototype.allowedEvents_={load:"load"},li.NONE=0,li.LOADING=1,li.LOADED=2,li.ERROR=3;var ui={audio:{ListClass:zt,TrackClass:si,capitalName:"Audio"},video:{ListClass:Ut,TrackClass:oi,capitalName:"Video"},text:{ListClass:Bt,TrackClass:ai,capitalName:"Text"}};Object.keys(ui).forEach(function(e){ui[e].getterName=e+"Tracks",ui[e].privateName=e+"Tracks_"});var ci={remoteText:{ListClass:Bt,TrackClass:ai,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:Ft,TrackClass:li,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},hi=r({},ui,ci);ci.names=Object.keys(ci),ui.names=Object.keys(ui),hi.names=[].concat(ci.names).concat(ui.names);var di=Object.create||function(e){if(1!==arguments.length)throw new Error("Object.create shim only accepts one parameter.");return pi.prototype=e,new pi};function pi(){}function fi(e,t){this.name="ParsingError",this.code=e.code,this.message=t||e.message}function gi(e){function t(e,t,i,n){return 3600*(0|e)+60*(0|t)+(0|i)+(0|n)/1e3}var i=e.match(/^(\d+):(\d{1,2})(:\d{1,2})?\.(\d{3})/);return i?i[3]?t(i[1],i[2],i[3].replace(":",""),i[4]):59<i[1]?t(i[1],i[2],0,i[4]):t(0,i[1],i[2],i[4]):null}function mi(){this.values=di(null)}function vi(e,t,i,n){var r=n?e.split(n):[e];for(var a in r)if("string"==typeof r[a]){var s=r[a].split(i);if(2===s.length)t(s[0],s[1])}}function yi(t,e,s){var i=t;function n(){var e=gi(t);if(null===e)throw new fi(fi.Errors.BadTimeStamp,"Malformed timestamp: "+i);return t=t.replace(/^[^\sa-zA-Z-]+/,""),e}function r(){t=t.replace(/^\s+/,"")}if(r(),e.startTime=n(),r(),"--\x3e"!==t.substr(0,3))throw new fi(fi.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '--\x3e'): "+i);t=t.substr(3),r(),e.endTime=n(),r(),function(e,t){var a=new mi;vi(e,function(e,t){switch(e){case"region":for(var i=s.length-1;0<=i;i--)if(s[i].id===t){a.set(e,s[i].region);break}break;case"vertical":a.alt(e,t,["rl","lr"]);break;case"line":var n=t.split(","),r=n[0];a.integer(e,r),a.percent(e,r)&&a.set("snapToLines",!1),a.alt(e,r,["auto"]),2===n.length&&a.alt("lineAlign",n[1],["start","center","end"]);break;case"position":n=t.split(","),a.percent(e,n[0]),2===n.length&&a.alt("positionAlign",n[1],["start","center","end"]);break;case"size":a.percent(e,t);break;case"align":a.alt(e,t,["start","center","end","left","right"])}},/:/,/\s/),t.region=a.get("region",null),t.vertical=a.get("vertical","");try{t.line=a.get("line","auto")}catch(e){}t.lineAlign=a.get("lineAlign","start"),t.snapToLines=a.get("snapToLines",!0),t.size=a.get("size",100);try{t.align=a.get("align","center")}catch(e){t.align=a.get("align","middle")}try{t.position=a.get("position","auto")}catch(e){t.position=a.get("position",{start:0,left:0,center:50,middle:50,end:100,right:100},t.align)}t.positionAlign=a.get("positionAlign",{start:"start",left:"start",center:"center",middle:"center",end:"end",right:"end"},t.align)}(t,e)}((fi.prototype=di(Error.prototype)).constructor=fi).Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}},mi.prototype={set:function(e,t){this.get(e)||""===t||(this.values[e]=t)},get:function(e,t,i){return i?this.has(e)?this.values[e]:t[i]:this.has(e)?this.values[e]:t},has:function(e){return e in this.values},alt:function(e,t,i){for(var n=0;n<i.length;++n)if(t===i[n]){this.set(e,t);break}},integer:function(e,t){/^-?\d+$/.test(t)&&this.set(e,parseInt(t,10))},percent:function(e,t){return!!(t.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&0<=(t=parseFloat(t))&&t<=100)&&(this.set(e,t),!0)}};var _i=h.createElement("textarea"),Mi={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},wi={white:"rgba(255,255,255,1)",lime:"rgba(0,255,0,1)",cyan:"rgba(0,255,255,1)",red:"rgba(255,0,0,1)",yellow:"rgba(255,255,0,1)",magenta:"rgba(255,0,255,1)",blue:"rgba(0,0,255,1)",black:"rgba(0,0,0,1)"},bi={v:"title",lang:"lang"},Ti={rt:"ruby"};function Ai(a,i){function e(){if(!i)return null;var e,t=i.match(/^([^<]*)(<[^>]*>?)?/);return e=t[1]?t[1]:t[2],i=i.substr(e.length),e}function t(e,t){var i=Mi[e];if(!i)return null;var n=a.document.createElement(i),r=bi[e];return r&&t&&(n[r]=t.trim()),n}for(var n,r,s,o,l=a.document.createElement("div"),u=l,c=[];null!==(n=e());)if("<"!==n[0])u.appendChild(a.document.createTextNode((r=n,_i.innerHTML=r,r=_i.textContent,_i.textContent="",r)));else{if("/"===n[1]){c.length&&c[c.length-1]===n.substr(2).replace(">","")&&(c.pop(),u=u.parentNode);continue}var h,d=gi(n.substr(1,n.length-2));if(d){h=a.document.createProcessingInstruction("timestamp",d),u.appendChild(h);continue}var p=n.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!p)continue;if(!(h=t(p[1],p[3])))continue;if(s=u,Ti[(o=h).localName]&&Ti[o.localName]!==s.localName)continue;if(p[2]){var f=p[2].split(".");f.forEach(function(e){var t=/^bg_/.test(e),i=t?e.slice(3):e;if(wi.hasOwnProperty(i)){var n=t?"background-color":"color",r=wi[i];h.style[n]=r}}),h.className=f.join(" ")}c.push(p[1]),u.appendChild(h),u=h}return l}var xi=[[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 Ei(e){for(var t=0;t<xi.length;t++){var i=xi[t];if(e>=i[0]&&e<=i[1])return 1}}function Si(){}function Di(e,t,i){Si.call(this),this.cue=t,this.cueDiv=Ai(e,t.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:""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext"};this.applyStyles(n,this.cueDiv),this.div=e.document.createElement("div"),n={direction:function(e){var t=[],i="";if(!e||!e.childNodes)return"ltr";function r(e,t){for(var i=t.childNodes.length-1;0<=i;i--)e.push(t.childNodes[i])}function a(e){if(!e||!e.length)return null;var t=e.pop(),i=t.textContent||t.innerText;if(i){var n=i.match(/^.*(\n|\r)/);return n?n[e.length=0]:i}return"ruby"===t.tagName?a(e):t.childNodes?(r(e,t),a(e)):void 0}for(r(t,e);i=a(t);)for(var n=0;n<i.length;n++)if(Ei(i.charCodeAt(n)))return"rtl";return"ltr"}(this.cueDiv),writingMode:""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext",textAlign:"middle"===t.align?"center":t.align,font:i.font,whiteSpace:"pre-line",position:"absolute"},this.applyStyles(n),this.div.appendChild(this.cueDiv);var r=0;switch(t.positionAlign){case"start":r=t.position;break;case"center":r=t.position-t.size/2;break;case"end":r=t.position-t.size}""===t.vertical?this.applyStyles({left:this.formatStyle(r,"%"),width:this.formatStyle(t.size,"%")}):this.applyStyles({top:this.formatStyle(r,"%"),height:this.formatStyle(t.size,"%")}),this.move=function(e){this.applyStyles({top:this.formatStyle(e.top,"px"),bottom:this.formatStyle(e.bottom,"px"),left:this.formatStyle(e.left,"px"),right:this.formatStyle(e.right,"px"),height:this.formatStyle(e.height,"px"),width:this.formatStyle(e.width,"px")})}}function Ni(e){var t,i,n,r;if(e.div){i=e.div.offsetHeight,n=e.div.offsetWidth,r=e.div.offsetTop;var a=(a=e.div.childNodes)&&(a=a[0])&&a.getClientRects&&a.getClientRects();e=e.div.getBoundingClientRect(),t=a?Math.max(a[0]&&a[0].height||0,e.height/a.length):0}this.left=e.left,this.right=e.right,this.top=e.top||r,this.height=e.height||i,this.bottom=e.bottom||r+(e.height||i),this.width=e.width||n,this.lineHeight=void 0!==t?t:e.lineHeight}function Ci(e,t,o,l){var i=new Ni(t),n=t.cue,r=function(e){if("number"==typeof e.line&&(e.snapToLines||0<=e.line&&e.line<=100))return e.line;if(!e.track||!e.track.textTrackList||!e.track.textTrackList.mediaElement)return-1;for(var t=e.track,i=t.textTrackList,n=0,r=0;r<i.length&&i[r]!==t;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 u=i.lineHeight,c=u*Math.round(r),h=o[s]+u,d=a[0];Math.abs(c)>h&&(c=c<0?-1:1,c*=Math.ceil(h/u)*u),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"center":r-=p/2;break;case"end":r-=p}switch(n.vertical){case"":t.applyStyles({top:t.formatStyle(r,"%")});break;case"rl":t.applyStyles({left:t.formatStyle(r,"%")});break;case"lr":t.applyStyles({right:t.formatStyle(r,"%")})}a=["+y","-x","+x","-y"],i=new Ni(t)}var f=function(e,t){for(var i,n=new Ni(e),r=1,a=0;a<t.length;a++){for(;e.overlapsOppositeAxis(o,t[a])||e.within(o)&&e.overlapsAny(l);)e.move(t[a]);if(e.within(o))return e;var s=e.intersectPercentage(o);s<r&&(i=new Ni(e),r=s),e=new Ni(n)}return i||n}(i,a);t.move(f.toCSSCompatValues(o))}function Li(){}Si.prototype.applyStyles=function(e,t){for(var i in t=t||this.div,e)e.hasOwnProperty(i)&&(t.style[i]=e[i])},Si.prototype.formatStyle=function(e,t){return 0===e?0:e+t},(Di.prototype=di(Si.prototype)).constructor=Di,Ni.prototype.move=function(e,t){switch(t=void 0!==t?t:this.lineHeight,e){case"+x":this.left+=t,this.right+=t;break;case"-x":this.left-=t,this.right-=t;break;case"+y":this.top+=t,this.bottom+=t;break;case"-y":this.top-=t,this.bottom-=t}},Ni.prototype.overlaps=function(e){return this.left<e.right&&this.right>e.left&&this.top<e.bottom&&this.bottom>e.top},Ni.prototype.overlapsAny=function(e){for(var t=0;t<e.length;t++)if(this.overlaps(e[t]))return!0;return!1},Ni.prototype.within=function(e){return this.top>=e.top&&this.bottom<=e.bottom&&this.left>=e.left&&this.right<=e.right},Ni.prototype.overlapsOppositeAxis=function(e,t){switch(t){case"+x":return this.left<e.left;case"-x":return this.right>e.right;case"+y":return this.top<e.top;case"-y":return this.bottom>e.bottom}},Ni.prototype.intersectPercentage=function(e){return Math.max(0,Math.min(this.right,e.right)-Math.max(this.left,e.left))*Math.max(0,Math.min(this.bottom,e.bottom)-Math.max(this.top,e.top))/(this.height*this.width)},Ni.prototype.toCSSCompatValues=function(e){return{top:this.top-e.top,bottom:e.bottom-this.bottom,left:this.left-e.left,right:e.right-this.right,height:this.height,width:this.width}},Ni.getSimpleBoxPosition=function(e){var t=e.div?e.div.offsetHeight:e.tagName?e.offsetHeight:0,i=e.div?e.div.offsetWidth:e.tagName?e.offsetWidth:0,n=e.div?e.div.offsetTop:e.tagName?e.offsetTop:0;return{left:(e=e.div?e.div.getBoundingClientRect():e.tagName?e.getBoundingClientRect():e).left,right:e.right,top:e.top||n,height:e.height||t,bottom:e.bottom||n+(e.height||t),width:e.width||i}},Li.StringDecoder=function(){return{decode:function(e){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}},Li.convertCueToDOMTree=function(e,t){return e&&t?Ai(e,t):null};Li.processCues=function(n,r,e){if(!n||!r||!e)return null;for(;e.firstChild;)e.removeChild(e.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%",e.appendChild(a),function(e){for(var t=0;t<e.length;t++)if(e[t].hasBeenReset||!e[t].displayState)return 1}(r)){var s=[],o=Ni.getSimpleBoxPosition(a),l={font:Math.round(.05*o.height*100)/100+"px sans-serif"};!function(){for(var e,t,i=0;i<r.length;i++)t=r[i],e=new Di(n,t,l),a.appendChild(e.div),Ci(0,e,o,s),t.displayState=e.div,s.push(Ni.getSimpleBoxPosition(e))}()}else for(var t=0;t<r.length;t++)a.appendChild(r[t].displayState)},(Li.Parser=function(e,t,i){i||(i=t,t={}),t=t||{},this.window=e,this.vttjs=t,this.state="INITIAL",this.buffer="",this.decoder=i||new TextDecoder("utf8"),this.regionList=[]}).prototype={reportOrThrowError:function(e){if(!(e instanceof fi))throw e;this.onparsingerror&&this.onparsingerror(e)},parse:function(e){var a=this;function t(){for(var e=a.buffer,t=0;t<e.length&&"\r"!==e[t]&&"\n"!==e[t];)++t;var i=e.substr(0,t);return"\r"===e[t]&&++t,"\n"===e[t]&&++t,a.buffer=e.substr(t),i}function i(e){e.match(/X-TIMESTAMP-MAP/)?vi(e,function(e,t){switch(e){case"X-TIMESTAMP-MAP":i=t,n=new mi,vi(i,function(e,t){switch(e){case"MPEGT":n.integer(e+"S",t);break;case"LOCA":n.set(e+"L",gi(t))}},/[^\d]:/,/,/),a.ontimestampmap&&a.ontimestampmap({MPEGTS:n.get("MPEGTS"),LOCAL:n.get("LOCAL")})}var i,n},/=/):vi(e,function(e,t){switch(e){case"Region":!function(e){var r=new mi;if(vi(e,function(e,t){switch(e){case"id":r.set(e,t);break;case"width":r.percent(e,t);break;case"lines":r.integer(e,t);break;case"regionanchor":case"viewportanchor":var i=t.split(",");if(2!==i.length)break;var n=new mi;if(n.percent("x",i[0]),n.percent("y",i[1]),!n.has("x")||!n.has("y"))break;r.set(e+"X",n.get("x")),r.set(e+"Y",n.get("y"));break;case"scroll":r.alt(e,t,["up"])}},/=/,/\s/),r.has("id")){var t=new(a.vttjs.VTTRegion||a.window.VTTRegion);t.width=r.get("width",100),t.lines=r.get("lines",3),t.regionAnchorX=r.get("regionanchorX",0),t.regionAnchorY=r.get("regionanchorY",100),t.viewportAnchorX=r.get("viewportanchorX",0),t.viewportAnchorY=r.get("viewportanchorY",100),t.scroll=r.get("scroll",""),a.onregion&&a.onregion(t),a.regionList.push({id:r.get("id"),region:t})}}(t)}},/:/)}e&&(a.buffer+=a.decoder.decode(e,{stream:!0}));try{var n;if("INITIAL"===a.state){if(!/\r\n|\n/.test(a.buffer))return this;var r=(n=t()).match(/^WEBVTT([ \t].*)?$/);if(!r||!r[0])throw new fi(fi.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=t(),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;a.cue=new(a.vttjs.VTTCue||a.window.VTTCue)(0,0,"");try{a.cue.align="center"}catch(e){a.cue.align="middle"}if(a.state="CUE",-1===n.indexOf("--\x3e")){a.cue.id=n;continue}case"CUE":try{yi(n,a.cue,a.regionList)}catch(e){a.reportOrThrowError(e),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.replace(/\u2028/g,"\n").replace(/u2029/g,"\n");continue;case"BADCUE":n||(a.state="ID");continue}}}catch(e){a.reportOrThrowError(e),"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 t=this;try{if(t.buffer+=t.decoder.decode(),!t.cue&&"HEADER"!==t.state||(t.buffer+="\n\n",t.parse()),"INITIAL"===t.state)throw new fi(fi.Errors.BadSignature)}catch(e){t.reportOrThrowError(e)}return t.onflush&&t.onflush(),this}};var Ii=Li,Oi={"":1,lr:1,rl:1},ji={start:1,center:1,end:1,left:1,right:1,auto:1,"line-left":1,"line-right":1};function ki(e){return"string"==typeof e&&(!!ji[e.toLowerCase()]&&e.toLowerCase())}function Pi(e,t,i){this.hasBeenReset=!1;var n="",r=!1,a=e,s=t,o=i,l=null,u="",c=!0,h="auto",d="start",p="auto",f="auto",g=100,m="center";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return n},set:function(e){n=""+e}},pauseOnExit:{enumerable:!0,get:function(){return r},set:function(e){r=!!e}},startTime:{enumerable:!0,get:function(){return a}
vendor: 2,965 bytes, line 1
1,set:function(e){if("number"!=typeof e)throw new TypeError("Start time must be set to a number.");a=e,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e)throw new TypeError("End time must be set to a number.");s=e,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return o},set:function(e){o=""+e,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return l},set:function(e){l=e,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return u},set:function(e){var t,i="string"==typeof(t=e)&&!!Oi[t.toLowerCase()]&&t.toLowerCase();if(!1===i)throw new SyntaxError("Vertical: an invalid or illegal direction string was specified.");u=i,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return c},set:function(e){c=!!e,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return h},set:function(e){if("number"!=typeof e&&"auto"!==e)throw new SyntaxError("Line: an invalid number or illegal string was specified.");h=e,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return d},set:function(e){var t=ki(e);t?(d=t,this.hasBeenReset=!0):console.warn("lineAlign: an invalid or illegal string was specified.")}},position:{enumerable:!0,get:function(){return p},set:function(e){if(e<0||100<e)throw new Error("Position must be between 0 and 100.");p=e,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return f},set:function(e){var t=ki(e);t?(f=t,this.hasBeenReset=!0):console.warn("positionAlign: an invalid or illegal string was specified.")}},size:{enumerable:!0,get:function(){return g},set:function(e){if(e<0||100<e)throw new Error("Size must be between 0 and 100.");g=e,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return m},set:function(e){var t=ki(e);if(!t)throw new SyntaxError("align: an invalid or illegal alignment string was specified.");m=t,this.hasBeenReset=!0}}}),this.displayState=void 0}Pi.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)};var Ri=Pi,zi={"":!0,up:!0};function Ui(e){return"number"==typeof e&&0<=e&&e<=100}function Bi(){var t=100,i=3,n=0,r=100,a=0,s=100,o="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return t},set:function(e){if(!Ui(e))throw new Error("Width must be between 0 and 100.");t=e}},lines:{enumerable:!0,get:function(){return i},set:function(e){if("number"!=typeof e)throw new TypeError("Lines must be set to a number.");i=e}},regionAnchorY:{enumerable:!0,get:function(){return r},set:function(e){if(!Ui(e))throw new Error("RegionAnchorX must be between 0 and 100.");r=e}},regionAnchorX:{enumerable:!0,get:function(){return n},set:function(e){if(!Ui(e))throw new Error("RegionAnchorY must be between 0 and 100.");n=e}},viewportAnchorY:{enumerable:!0,get:function(){return s},set:function(e){if(!Ui(e))throw new Error("ViewportAnchorY must be between 0 and 100.");s=e}},viewportAnchorX:{enumerable:!0,get:function(){return a}
vendor: 7,878 bytes, line 1
1,set:function(e){if(!Ui(e))throw new Error("ViewportAnchorX must be between 0 and 100.");a=e}},scroll:{enumerable:!0,get:function(){return o},set:function(e){var t,i="string"==typeof(t=e)&&!!zi[t.toLowerCase()]&&t.toLowerCase();!1===i?console.warn("Scroll: an invalid or illegal string was specified."):o=i}}})}var Fi=t(function(e){var t=e.exports={WebVTT:Ii,VTTCue:Ri,VTTRegion:Bi};y.vttjs=t,y.WebVTT=t.WebVTT;var i=t.VTTCue,n=t.VTTRegion,r=y.VTTCue,a=y.VTTRegion;t.shim=function(){y.VTTCue=i,y.VTTRegion=n},t.restore=function(){y.VTTCue=r,y.VTTRegion=a},y.VTTCue||t.shim()});Fi.WebVTT,Fi.VTTCue,Fi.VTTRegion;var Gi=function(t){function i(i,e){var n;return void 0===i&&(i={}),void 0===e&&(e=function(){}),i.reportTouchActivity=!1,(n=t.call(this,null,i,e)||this).hasStarted_=!1,n.on("playing",function(){this.hasStarted_=!0}),n.on("loadstart",function(){this.hasStarted_=!1}),hi.names.forEach(function(e){var t=hi[e];i&&i[t.getterName]&&(n[t.privateName]=i[t.getterName])}),n.featuresProgressEvents||n.manualProgressOn(),n.featuresTimeupdateEvents||n.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach(function(e){!1===i["native"+e+"Tracks"]&&(n["featuresNative"+e+"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.preloadTextTracks=!1!==i.preloadTextTracks,n.autoRemoteTextTracks_=new hi.text.ListClass,n.initTrackListeners(),i.nativeControlsForTouch||n.emitTapEvents(),n.constructor&&(n.name_=n.constructor.name||"Unknown Tech"),n}Fe(i,t);var e=i.prototype;return e.triggerSourceset=function(e){var t=this;this.isReady_||this.one("ready",function(){return t.setTimeout(function(){return t.triggerSourceset(e)},1)}),this.trigger({src:e,type:"sourceset"})},e.manualProgressOn=function(){this.on("durationchange",this.onDurationChange),this.manualProgress=!0,this.one("ready",this.trackProgress)},e.manualProgressOff=function(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange)},e.trackProgress=function(){this.stopTrackingProgress(),this.progressInterval=this.setInterval(ge(this,function(){var e=this.bufferedPercent();this.bufferedPercent_!==e&&this.trigger("progress"),1===(this.bufferedPercent_=e)&&this.stopTrackingProgress()}),500)},e.onDurationChange=function(){this.duration_=this.duration()},e.buffered=function(){return ht(0,0)},e.bufferedPercent=function(){return dt(this.buffered(),this.duration_)},e.stopTrackingProgress=function(){this.clearInterval(this.progressInterval)},e.manualTimeUpdatesOn=function(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime),this.on("pause",this.stopTrackingCurrentTime)},e.manualTimeUpdatesOff=function(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime),this.off("pause",this.stopTrackingCurrentTime)},e.trackCurrentTime=function(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval(function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},250)},e.stopTrackingCurrentTime=function(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},e.dispose=function(){this.clearTracks(ui.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),t.prototype.dispose.call(this)},e.clearTracks=function(e){var r=this;(e=[].concat(e)).forEach(function(e){for(var t=r[e+"Tracks"]()||[],i=t.length;i--;){var n=t[i];"text"===e&&r.removeRemoteTextTrack(n),t.removeTrack(n)}})},e.cleanupAutoTextTracks=function(){for(var e=this.autoRemoteTextTracks_||[],t=e.length;t--;){var i=e[t];this.removeRemoteTextTrack(i)}},e.reset=function(){},e.error=function(e){return void 0!==e&&(this.error_=new _t(e),this.trigger("error")),this.error_},e.played=function(){return this.hasStarted_?ht(0,0):ht()},e.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},e.initTrackListeners=function(){var r=this;ui.names.forEach(function(e){function t(){r.trigger(e+"trackchange")}var i=ui[e],n=r[i.getterName]();n.addEventListener("removetrack",t),n.addEventListener("addtrack",t),r.on("dispose",function(){n.removeEventListener("removetrack",t),n.removeEventListener("addtrack",t)})})},e.addWebVttScript_=function(){var e=this;if(!y.WebVTT)if(h.body.contains(this.el())){if(!this.options_["vtt.js"]&&l(Fi)&&0<Object.keys(Fi).length)return void this.trigger("vttjsloaded");var t=h.createElement("script");t.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js",t.onload=function(){e.trigger("vttjsloaded")},t.onerror=function(){e.trigger("vttjserror")},this.on("dispose",function(){t.onload=null,t.onerror=null}),y.WebVTT=!0,this.el().parentNode.appendChild(t)}else this.ready(this.addWebVttScript_)},e.emulateTextTracks=function(){function t(e){return n.addTrack(e.track)}function i(e){return n.removeTrack(e.track)}var e=this,n=this.textTracks(),r=this.remoteTextTracks();r.on("addtrack",t),r.on("removetrack",i),this.addWebVttScript_();function a(){return e.trigger("texttrackchange")}function s(){a();for(var e=0;e<n.length;e++){var t=n[e];t.removeEventListener("cuechange",a),"showing"===t.mode&&t.addEventListener("cuechange",a)}}s(),n.addEventListener("change",s),n.addEventListener("addtrack",s),n.addEventListener("removetrack",s),this.on("dispose",function(){r.off("addtrack",t),r.off("removetrack",i),n.removeEventListener("change",s),n.removeEventListener("addtrack",s),n.removeEventListener("removetrack",s);for(var e=0;e<n.length;e++){n[e].removeEventListener("cuechange",a)}})},e.addTextTrack=function(e,t,i){if(!e)throw new Error("TextTrack kind is required but was not provided");return function(e,t,i,n,r){void 0===r&&(r={});var a=e.textTracks();r.kind=t,i&&(r.label=i),n&&(r.language=n),r.tech=e;var s=new hi.text.TrackClass(r);return a.addTrack(s),s}(this,e,t,i)},e.createRemoteTextTrack=function(e){var t=je(e,{tech:this});return new ci.remoteTextEl.TrackClass(t)},e.addRemoteTextTrack=function(e,t){var i=this;void 0===e&&(e={});var n=this.createRemoteTextTrack(e);return!0!==t&&!1!==t&&(d.warn('Calling addRemoteTextTrack without explicitly setting the "manualCleanup" parameter to `true` is deprecated and default to `false` in future version of video.js'),t=!0),this.remoteTextTrackEls().addTrackElement_(n),this.remoteTextTracks().addTrack(n.track),!0!==t&&this.ready(function(){return i.autoRemoteTextTracks_.addTrack(n.track)}),n},e.removeRemoteTextTrack=function(e){var t=this.remoteTextTrackEls().getTrackElementByTrack_(e);this.remoteTextTrackEls().removeTrackElement_(t),this.remoteTextTracks().removeTrack(e),this.autoRemoteTextTracks_.removeTrack(e)},e.getVideoPlaybackQuality=function(){return{}},e.requestPictureInPicture=function(){var e=this.options_.Promise||y.Promise;if(e)return e.reject()},e.setPoster=function(){},e.playsinline=function(){},e.setPlaysinline=function(){},e.overrideNativeAudioTracks=function(){},e.overrideNativeVideoTracks=function(){},e.canPlayType=function(){return""},i.canPlayType=function(){return""},i.canPlaySource=function(e){return i.canPlayType(e.type)},i.isTech=function(e){return e.prototype instanceof i||e instanceof i||e===i},i.registerTech=function(e,t){if(i.techs_||(i.techs_={}),!i.isTech(t))throw new Error("Tech "+e+" 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 e=Oe(e),i.techs_[e]=t,i.techs_[Ie(e)]=t,"Tech"!==e&&i.defaultTechOrder_.push(e),t},i.getTech=function(e){if(e)return i.techs_&&i.techs_[e]?i.techs_[e]:(e=Oe(e),y&&y.videojs&&y.videojs[e]?(d.warn("The "+e+" tech w
1as added to the videojs object when it should be registered using videojs.registerTech(name, tech)"),y.videojs[e]):void 0)},i}(ke);hi.names.forEach(function(e){var t=hi[e];Gi.prototype[t.getterName]=function(){return this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName]}}),Gi.prototype.featuresVolumeControl=!0,Gi.prototype.featuresMuteControl=!0,Gi.prototype.featuresFullscreenResize=!1,Gi.prototype.featuresPlaybackRate=!1,Gi.prototype.featuresProgressEvents=!1,Gi.prototype.featuresSourceset=!1,Gi.prototype.featuresTimeupdateEvents=!1,Gi.prototype.featuresNativeTextTracks=!1,Gi.withSourceHandlers=function(r){r.registerSourceHandler=function(e,t){var i=r.sourceHandlers;i=i||(r.sourceHandlers=[]),void 0===t&&(t=i.length),i.splice(t,0,e)},r.canPlayType=function(e){for(var t,i=r.sourceHandlers||[],n=0;n<i.length;n++)if(t=i[n].canPlayType(e))return t;return""},r.selectSourceHandler=function(e,t){for(var i=r.sourceHandlers||[],n=0;n<i.length;n++)if(i[n].canHandleSource(e,t))return i[n];return null},r.canPlaySource=function(e,t){var i=r.selectSourceHandler(e,t);return i?i.canHandleSource(e,t):""};["seekable","seeking","duration"].forEach(function(e){var t=this[e];"function"==typeof t&&(this[e]=function(){return this.sourceHandler_&&this.sourceHandler_[e]?this.sourceHandler_[e].apply(this.sourceHandler_,arguments):t.apply(this,arguments)})},r.prototype),r.prototype.setSource=function(e){var t=r.selectSourceHandler(e,this.options_);t||(r.nativeSourceHandler?t=r.nativeSourceHandler:d.error("No source handler found for the current source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler),t!==r.nativeSourceHandler&&(this.currentSource_=e),this.sourceHandler_=t.handleSource(e,this,this.options_),this.one("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)}},ke.registerComponent("Tech",Gi),Gi.registerTech("Tech",Gi),Gi.defaultTechOrder_=[];var Hi={},Yi={},Qi={};function Vi(e,t,i){e.setTimeout(function(){return function i(n,e,r,a,s,o){void 0===n&&(n={});void 0===e&&(e=[]);void 0===s&&(s=[]);void 0===o&&(o=!1);var t=e,l=t[0],u=t.slice(1);if("string"==typeof l)i(n,Hi[l],r,a,s,o);else if(l){var c=Ki(a,l);if(!c.setSource)return s.push(c),i(n,u,r,a,s,o);c.setSource(f({},n),function(e,t){if(e)return i(n,u,r,a,s,o);s.push(c),i(t,n.type===t.type?u:Hi[t.type],r,a,s,o)})}else u.length?i(n,u,r,a,s,o):o?r(n,s):i(n,Hi["*"],r,a,s,!0)}(t,Hi[t.type],i,e)},1)}function Wi(e,t,i,n){void 0===n&&(n=null);var r="call"+Oe(i),a=e.reduce($i(r),n),s=a===Qi,o=s?null:t[i](a);return function(e,t,i,n){for(var r=e.length-1;0<=r;r--){var a=e[r];a[t]&&a[t](n,i)}}(e,i,o,s),o}var qi={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1},Xi={setCurrentTime:1,setMuted:1,setVolume:1},Zi={play:1,pause:1};function $i(i){return function(e,t){return e===Qi?Qi:t[i]?t[i](e):e}}function Ki(e,t){var i=Yi[e.id()],n=null;if(null==i)return n=t(e),Yi[e.id()]=[[t,n]],n;for(var r=0;r<i.length;r++){var a=i[r],s=a[0],o=a[1];s===t&&(n=o)}return null===n&&(n=t(e),i.push([t,n])),n}function Ji(e){void 0===e&&(e="");var t=Pt(e);return en[t.toLowerCase()]||""}var en={opus:"video/ogg",ogv:"video/ogg",mp4:"video/mp4",mov:"video/mp4",m4v:"video/mp4",mkv:"video/x-matroska",m4a:"audio/mp4",mp3:"audio/mpeg",aac:"audio/aac",oga:"audio/ogg",m3u8:"application/x-mpegURL",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",png:"image/png",svg:"image/svg+xml",webp:"image/webp"};function tn(e){if(!e.type){var t=Ji(e.src);t&&(e.type=t)}return e}var nn=function(u){function e(e,t,i){var n,r=je({createEl:!1},t);if(n=u.call(this,e,r,i)||this,t.playerOptions.sources&&0!==t.playerOptions.sources.length)e.src(t.playerOptions.sources);else for(var a=0,s=t.playerOptions.techOrder;a<s.length;a++){var o=Oe(s[a]),l=Gi.getTech(o);if(o||(l=ke.getComponent(o)),l&&l.isSupported()){e.loadTech_(o);break}}return n}return Fe(e,u),e}(ke);ke.registerComponent("MediaLoader",nn);var rn=function(r){function e(e,t){var i;return(i=r.call(this,e,t)||this).emitTapEvents(),i.enable(),i}Fe(e,r);var t=e.prototype;return t.createEl=function(e,t,i){void 0===e&&(e="div"),void 0===t&&(t={}),void 0===i&&(i={}),t=f({innerHTML:'<span aria-hidden="true" class="vjs-icon-placeholder"></span>',className:this.buildCSSClass(),tabIndex:0},t),"button"===e&&d.error("Creating a ClickableComponent with an HTML element of "+e+" is not supported; use a Button instead."),i=f({role:"button"},i),this.tabIndex_=t.tabIndex;var n=r.prototype.createEl.call(this,e,t,i);return this.createControlTextEl(n),n},t.dispose=function(){this.controlTextEl_=null,r.prototype.dispose.call(this)},t.createControlTextEl=function(e){return this.controlTextEl_=w("span",{className:"vjs-control-text"},{"aria-live":"polite"}),e&&e.appendChild(this.controlTextEl_),this.controlText(this.controlText_,e),this.controlTextEl_},t.controlText=function(e,t){if(void 0===t&&(t=this.el()),void 0===e)return this.controlText_||"Need Text";var i=this.localize(e);this.controlText_=e,b(this.controlTextEl_,i),this.nonIconControl||t.setAttribute("title",i)},t.buildCSSClass=function(){return"vjs-control vjs-button "+r.prototype.buildCSSClass.call(this)},t.enable=function(){this.enabled_||(this.enabled_=!0,this.removeClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","false"),void 0!==this.tabIndex_&&this.el_.setAttribute("tabIndex",this.tabIndex_),this.on(["tap","click"],this.handleClick),this.on("keydown",this.handleKeyDown))},t.disable=function(){this.enabled_=!1,this.addClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","true"),void 0!==this.tabIndex_&&this.el_.removeAttribute("tabIndex"),this.off("mouseover",this.handleMouseOver),this.off("mouseout",this.handleMouseOut),this.off(["tap","click"],this.handleClick),this.off("keydown",this.handleKeyDown)},t.handleClick=function(e){this.options_.clickHandler&&this.options_.clickHandler.call(this,arguments)}
vendor: 54,311 bytes, line 1
1,t.handleKeyDown=function(e){St.isEventKey(e,"Space")||St.isEventKey(e,"Enter")?(e.preventDefault(),e.stopPropagation(),this.trigger("click")):r.prototype.handleKeyDown.call(this,e)},e}(ke);ke.registerComponent("ClickableComponent",rn);var an=function(n){function e(e,t){var i;return(i=n.call(this,e,t)||this).update(),e.on("posterchange",ge(Pe(i),i.update)),i}Fe(e,n);var t=e.prototype;return t.dispose=function(){this.player().off("posterchange",this.update),n.prototype.dispose.call(this)},t.createEl=function(){return w("div",{className:"vjs-poster",tabIndex:-1})},t.update=function(){var e=this.player().poster();this.setSrc(e),e?this.show():this.hide()},t.setSrc=function(e){var t="";e&&(t='url("'+e+'")'),this.el_.style.backgroundImage=t},t.handleClick=function(){if(this.player_.controls()){var e=this.player_.usingPlugin("eme")&&this.player_.eme.sessions&&0<this.player_.eme.sessions.length;!this.player_.tech(!0)||(et||$e)&&e||this.player_.tech(!0).focus(),this.player_.paused()?Tt(this.player_.play()):this.player_.pause()}},e}(rn);ke.registerComponent("PosterImage",an);var sn={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 on(e,t){var i;if(4===e.length)i=e[1]+e[1]+e[2]+e[2]+e[3]+e[3];else{if(7!==e.length)throw new Error("Invalid color code provided, "+e+"; must be formatted as e.g. #f0e or #f604e2.");i=e.slice(1)}return"rgba("+parseInt(i.slice(0,2),16)+","+parseInt(i.slice(2,4),16)+","+parseInt(i.slice(4,6),16)+","+t+")"}function ln(e,t,i){try{e.style[t]=i}catch(e){return}}var un=function(a){function e(i,e,t){var n;n=a.call(this,i,e,t)||this;var r=ge(Pe(n),n.updateDisplay);return i.on("loadstart",ge(Pe(n),n.toggleDisplay)),i.on("texttrackchange",r),i.on("loadedmetadata",ge(Pe(n),n.preselectTrack)),i.ready(ge(Pe(n),function(){if(i.tech_&&i.tech_.featuresNativeTextTracks)this.hide();else{i.on("fullscreenchange",r),i.on("playerresize",r),y.addEventListener("orientationchange",r),i.on("dispose",function(){return y.removeEventListener("orientationchange",r)});for(var e=this.options_.playerOptions.tracks||[],t=0;t<e.length;t++)this.player_.addRemoteTextTrack(e[t],!0);this.preselectTrack()}})),n}Fe(e,a);var t=e.prototype;return t.preselectTrack=function(){for(var e,t,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&&a.language===o.language&&o.kind in n?i=o.kind!==a.kind&&i||o:a&&!a.enabled?t=e=i=null:o.default&&("descriptions"!==o.kind||e?o.kind in n&&!t&&(t=o):e=o)}i?i.mode="showing":t?t.mode="showing":e&&(e.mode="showing")},t.toggleDisplay=function(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()},t.createEl=function(){return a.prototype.createEl.call(this,"div",{className:"vjs-text-track-display"},{"aria-live":"off","aria-atomic":"true"})},t.clearDisplay=function(){"function"==typeof y.WebVTT&&y.WebVTT.processCues(y,[],this.el_)},t.updateDisplay=function(){var e=this.player_.textTracks(),t=this.options_.allowMultipleShowingTracks;if(this.clearDisplay(),t){for(var i=[],n=0;n<e.length;++n){var r=e[n];"showing"===r.mode&&i.push(r)}this.updateForTrack(i)}else{for(var a=null,s=null,o=e.length;o--;){var l=e[o];"showing"===l.mode&&("descriptions"===l.kind?a=l:s=l)}s?("off"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","off"),this.updateForTrack(s)):a&&("assertive"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","assertive"),this.updateForTrack(a))}},t.updateDisplayState=function(e){for(var t=this.player_.textTrackSettings.getValues(),i=e.activeCues,n=i.length;n--;){var r=i[n];if(r){var a=r.displayState;if(t.color&&(a.firstChild.style.color=t.color),t.textOpacity&&ln(a.firstChild,"color",on(t.color||"#fff",t.textOpacity)),t.backgroundColor&&(a.firstChild.style.backgroundColor=t.backgroundColor),t.backgroundOpacity&&ln(a.firstChild,"backgroundColor",on(t.backgroundColor||"#000",t.backgroundOpacity)),t.windowColor&&(t.windowOpacity?ln(a,"backgroundColor",on(t.windowColor,t.windowOpacity)):a.style.backgroundColor=t.windowColor),t.edgeStyle&&("dropshadow"===t.edgeStyle?a.firstChild.style.textShadow="2px 2px 3px #222, 2px 2px 4px #222, 2px 2px 5px #222":"raised"===t.edgeStyle?a.firstChild.style.textShadow="1px 1px #222, 2px 2px #222, 3px 3px #222":"depressed"===t.edgeStyle?a.firstChild.style.textShadow="1px 1px #ccc, 0 1px #ccc, -1px -1px #222, 0 -1px #222":"uniform"===t.edgeStyle&&(a.firstChild.style.textShadow="0 0 4px #222, 0 0 4px #222, 0 0 4px #222, 0 0 4px #222")),t.fontPercent&&1!==t.fontPercent){var s=y.parseFloat(a.style.fontSize);a.style.fontSize=s*t.fontPercent+"px",a.style.height="auto",a.style.top="auto",a.style.bottom="2px"}t.fontFamily&&"default"!==t.fontFamily&&("small-caps"===t.fontFamily?a.firstChild.style.fontVariant="small-caps":a.firstChild.style.fontFamily=sn[t.fontFamily])}}},t.updateForTrack=function(e){if(Array.isArray(e)||(e=[e]),"function"==typeof y.WebVTT&&!e.every(function(e){return!e.activeCues})){for(var t=[],i=0;i<e.length;++i)for(var n=e[i],r=0;r<n.activeCues.length;++r)t.push(n.activeCues[r]);y.WebVTT.processCues(y,t,this.el_);for(var a=0;a<e.length;++a){for(var s=e[a],o=0;o<s.activeCues.length;++o){var l=s.activeCues[o].displayState;x(l,"vjs-text-track-cue"),x(l,"vjs-text-track-cue-"+(s.language?s.language:a))}this.player_.textTrackSettings&&this.updateDisplayState(s)}}},e}(ke);ke.registerComponent("TextTrackDisplay",un);var cn=function(r){function e(){return r.apply(this,arguments)||this}return Fe(e,r),e.prototype.createEl=function(){var e=this.player_.isAudio(),t=this.localize(e?"Audio Player":"Video Player"),i=w("span",{className:"vjs-control-text",innerHTML:this.localize("{1} is loading.",[t])}),n=r.prototype.createEl.call(this,"div",{className:"vjs-loading-spinner",dir:"ltr"});return n.appendChild(i),n},e}(ke);ke.registerComponent("LoadingSpinner",cn);var hn=function(t){function e(){return t.apply(this,arguments)||this}Fe(e,t);var i=e.prototype;return i.createEl=function(e,t,i){void 0===t&&(t={}),void 0===i&&(i={}),t=f({innerHTML:'<span aria-hidden="true" class="vjs-icon-placeholder"></span>',className:this.buildCSSClass()},t),i=f({type:"button"},i);var n=ke.prototype.createEl.call(this,"button",t,i);return this.createControlTextEl(n),n},i.addChild=function(e,t){void 0===t&&(t={});var i=this.constructor.name;return d.warn("Adding an actionable (user controllable) child to a Button ("+i+") is not supported; use a ClickableComponent instead."),ke.prototype.addChild.call(this,e,t)},i.enable=function(){t.prototype.enable.call(this),this.el_.removeAttribute("disabled")},i.disable=function(){t.prototype.disable.call(this),this.el_.setAttribute("disabled","disabled")},i.handleKeyDown=function(e){St.isEventKey(e,"Space")||St.isEventKey(e,"Enter")?e.stopPropagation():t.prototype.handleKeyDown.call(this,e)},e}(rn);ke.registerComponent("Button",hn);var dn=function(n){function e(e,t){var i;return(i=n.call(this,e,t)||this).mouseused_=!1,i.on("mousedown",i.handleMouseDown),i}Fe(e,n);var t=e.prototype;return t.buildCSSClass=function(){return"vjs-big-play-button"},t.handleClick=function(e){var t=this.player_.play();if(this.mouseused_&&e.clientX&&e.clientY){var i=this.player_.usingPlugin("eme")&&this.player_.eme.sessions&&0<this.player_.eme.sessions.length;return Tt(t),void(!this.player_.tech(!0)||(et||$e)&&i||this.player_.tech(!0).focus())}var n=this.player_.getChild("controlBar"),r=n&&n.getChild("playToggle");if(r){var a=function(){return r.focus()};bt(t)?t.then(a,function(){}):this.setTimeout(a,1)}else this.player_.tech(!0).focus()},t.handleKeyDown=function(e){this.mouseused_=!1,n.prototype.handleKeyDown.call(this,e)},t.handleMouseDown=function(){this.mouseused_=!0},e}(hn);dn.prototype.controlText_="Play Video",ke.registerComponent("BigPlayButton",dn);var pn=function(n){function e(e,t){var i;return(i=n.call(this,e,t)||this).controlText(t&&t.controlText||i.localize("Close")),i}Fe(e,n);var t=e.prototype;return t.buildCSSClass=function(){return"vjs-close-button "+n.prototype.buildCSSClass.call(this)},t.handleClick=function(){this.trigger({type:"close",bubbles:!1})},t.handleKeyDown=function(e){St.isEventKey(e,"Esc")?(e.preventDefault(),e.stopPropagation(),this.trigger("click")):n.prototype.handleKeyDown.call(this,e)},e}(hn);ke.registerComponent("CloseButton",pn);var fn=function(n){function e(e,t){var i;return void 0===t&&(t={}),i=n.call(this,e,t)||this,t.replay=void 0===t.replay||t.replay,i.on(e,"play",i.handlePlay),i.on(e,"pause",i.handlePause),t.replay&&i.on(e,"ended",i.handleEnded),i}Fe(e,n);var t=e.prototype;return t.buildCSSClass=function(){return"vjs-play-control "+n.prototype.buildCSSClass.call(this)},t.handleClick=function(){this.player_.paused()?this.player_.play():this.player_.pause()},t.handleSeeked=function(e){this.removeClass("vjs-ended"),this.player_.paused()?this.handlePause(e):this.handlePlay(e)},t.handlePlay=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.controlText("Pause")},t.handlePause=function(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.controlText("Play")},t.handleEnded=function(){this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.controlText("Replay"),this.one(this.player_,"seeked",this.handleSeeked)},e}(hn);fn.prototype.controlText_="Play",ke.registerComponent("PlayToggle",fn);function gn(e,t){e=e<0?0:e;var i=Math.floor(e%60),n=Math.floor(e/60%60),r=Math.floor(e/3600),a=Math.floor(t/60%60),s=Math.floor(t/3600);return!isNaN(e)&&e!==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)}var mn=gn;function vn(e,t){return void 0===t&&(t=e),mn(e,t)}var yn=function(n){function e(e,t){var i;return(i=n.call(this,e,t)||this).on(e,["timeupdate","ended"],i.updateContent),i.updateTextNode_(),i}Fe(e,n);var t=e.prototype;return t.createEl=function(){var e=this.buildCSSClass(),t=n.prototype.createEl.call(this,"div",{className:e+" vjs-time-control vjs-control",innerHTML:'<span class="vjs-control-text" role="presentation">'+this.localize(this.labelText_)+"Â </span>"});return this.contentEl_=w("span",{className:e+"-display"},{"aria-live":"off",role:"presentation"}),t.appendChild(this.contentEl_),t},t.dispose=function(){this.contentEl_=null,this.textNode_=null,n.prototype.dispose.call(this)},t.updateTextNode_=function(e){var t=this;void 0===e&&(e=0),e=vn(e),this.formattedTime_!==e&&(this.formattedTime_=e,this.requestAnimationFrame(function(){if(t.contentEl_){var e=t.textNode_;t.textNode_=h.createTextNode(t.formattedTime_),t.textNode_&&(e?t.contentEl_.replaceChild(t.textNode_,e):t.contentEl_.appendChild(t.textNode_))}}))},t.updateContent=function(){},e}(ke);yn.prototype.labelText_="Time",yn.prototype.controlText_="Time",ke.registerComponent("TimeDisplay",yn);var _n=function(e){function t(){return e.apply(this,arguments)||this}Fe(t,e);var i=t.prototype;return i.buildCSSClass=function(){return"vjs-current-time"},i.updateContent=function(){var e;e=this.player_.ended()?this.player_.duration():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),this.updateTextNode_(e)},t}(yn);_n.prototype.labelText_="Current Time",_n.prototype.controlText_="Current Time",ke.registerComponent("CurrentTimeDisplay",_n);var Mn=function(n){function e(e,t){var i;return(i=n.call(this,e,t)||this).on(e,"durationchange",i.updateContent),i.on(e,"loadstart",i.updateContent),i.on(e,"loadedmetadata",i.updateContent),i}Fe(e,n);var t=e.prototype;return t.buildCSSClass=function(){return"vjs-duration"},t.updateContent=function(){var e=this.player_.duration();this.updateTextNode_(e)},e}(yn);Mn.prototype.labelText_="Duration",Mn.prototype.controlText_="Duration",ke.registerComponent("DurationDisplay",Mn);var wn=function(e){function t(){return e.apply(this,arguments)||this}return Fe(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider",innerHTML:"<div><span>/</span></div>"},{"aria-hidden":!0})},t}(ke);ke.registerComponent("TimeDivider",wn);var bn=function(n){function e(e,t){var i;return(i=n.call(this,e,t)||this).on(e,"durationchange",i.updateContent),i}Fe(e,n);var t=e.prototype;return t.buildCSSClass=function(){return"vjs-remaining-time"},t.createEl=function(){var e=n.prototype.createEl.call(this);return e.insertBefore(w("span",{},{"aria-hidden":!0},"-"),this.contentEl_),e},t.updateContent=function(){var e;"number"==typeof this.player_.duration()&&(e=this.player_.ended()?0:this.player_.remainingTimeDisplay?this.player_.remainingTimeDisplay():this.player_.remainingTime(),this.updateTextNode_(e))},e}(yn);bn.prototype.labelText_="Remaining Time",bn.prototype.controlText_="Remaining Time",ke.registerComponent("RemainingTimeDisplay",bn);var Tn=function(n){function e(e,t){var i;return(i=n.call(this,e,t)||this).updateShowing(),i.on(i.player(),"durationchange",i.updateShowing),i}Fe(e,n);var t=e.prototype;return t.createEl=function(){var e=n.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});return this.contentEl_=w("div",{className:"vjs-live-display",innerHTML:'<span class="vjs-control-text">'+this.localize("Stream Type")+"Â </span>"+this.localize("LIVE")},{"aria-live":"off"}),e.appendChild(this.contentEl_),e},t.dispose=function(){this.contentEl_=null,n.prototype.dispose.call(this)},t.updateShowing=function(){this.player().duration()===1/0?this.show():this.hide()},e}(ke);ke.registerComponent("LiveDisplay",Tn);var An=function(n){function e(e,t){var i;return(i=n.call(this,e,t)||this).updateLiveEdgeStatus(),i.player_.liveTracker&&i.on(i.player_.liveTracker,"liveedgechange",i.updateLiveEdgeStatus),i}Fe(e,n);var t=e.prototype;return t.createEl=function(){var e=n.prototype.createEl.call(this,"button",{className:"vjs-seek-to-live-control vjs-control"});return this.textEl_=w("span",{className:"vjs-seek-to-live-text",innerHTML:this.localize("LIVE")},{"aria-hidden":"true"}),e.appendChild(this.textEl_),e},t.updateLiveEdgeStatus=function(){!this.player_.liveTracker||this.player_.liveTracker.atLiveEdge()?(this.setAttribute("aria-disabled",!0),this.addClass("vjs-at-live-edge"),this.controlText("Seek to live, currently playing live")):(this.setAttribute("aria-disabled",!1),this.removeClass("vjs-at-live-edge"),this.controlText("Seek to live, currently behind live"))},t.handleClick=function(){this.player_.liveTracker.seekToLiveEdge()},t.dispose=function(){this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatus),this.textEl_=null,n.prototype.dispose.call(this)},e}(hn);An.prototype.controlText_="Seek to live, currently playing live",ke.registerComponent("SeekToLive",An);function xn(e,t,i){return e=Number(e),Math.min(i,Math.max(t,isNaN(e)?t:e))}var En=function(n){function e(e,t){var i;return(i=n.call(this,e,t)||this).bar=i.getChild(i.options_.barName),i.vertical(!!i.options_.vertical),i.enable(),i}Fe(e,n);var t=e.prototype;return t.enabled=function(){return this.enabled_},t.enable=function(){this.enabled()||(this.on("mousedown",this.handleMouseDown),this.on("touchstart",this.handleMouseDown),this.on("keydown",this.handleKeyDown),this.on("click",this.handleClick),this.on(this.player_,"controlsvisible",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass("disabled"),this.setAttribute("tabindex",0),this.enabled_=!0)},t.disable=function(){if(this.enabled()){var e=this.bar.el_.ownerDocument;this.off("mousedown",this.handleMouseDown),this.off("touchstart",this.handleMouseDown),this.off("keydown",this.handleKeyDown),this.off("click",this.handleClick),this.off(this.player_,"controlsvisible",this.update),this.off(e,"mousemove",this.handleMouseMove),this.off(e,"mouseup",this.handleMouseUp),this.off(e,"touchmove",this.handleMouseMove),this.off(e,"touchend",this.handleMouseUp),this.removeAttribute("tabindex"),this.addClass("disabled"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}},t.createEl=function(e,t,i){return void 0===t&&(t={}),void 0===i&&(i={}),t.className=t.className+" vjs-slider",t=f({tabIndex:0},t),i=f({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},i),n.prototype.createEl.call(this,e,t,i)},t.handleMouseDown=function(e){var t=this.bar.el_.ownerDocument;"mousedown"===e.type&&e.preventDefault(),"touchstart"!==e.type||Ke||e.preventDefault(),O(),this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(t,"mousemove",this.handleMouseMove),this.on(t,"mouseup",this.handleMouseUp),this.on(t,"touchmove",this.handleMouseMove),this.on(t,"touchend",this.handleMouseUp),this.handleMouseMove(e)},t.handleMouseMove=function(){},t.handleMouseUp=function(){var e=this.bar.el_.ownerDocument;j(),this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(e,"mousemove",this.handleMouseMove),this.off(e,"mouseup",this.handleMouseUp),this.off(e,"touchmove",this.handleMouseMove),this.off(e,"touchend",this.handleMouseUp),this.update()},t.update=function(){var t=this;if(this.el_&&this.bar){var i=this.getProgress();return i===this.progress_?i:(this.progress_=i,this.requestAnimationFrame(function(){var e=t.vertical()?"height":"width";t.bar.el().style[e]=(100*i).toFixed(2)+"%"}),i)}},t.getProgress=function(){return Number(xn(this.getPercent(),0,1).toFixed(4))},t.calculateDistance=function(e){var t=R(this.el_,e);return this.vertical()?t.y:t.x},t.handleKeyDown=function(e){St.isEventKey(e,"Left")||St.isEventKey(e,"Down")?(e.preventDefault(),e.stopPropagation(),this.stepBack()):St.isEventKey(e,"Right")||St.isEventKey(e,"Up")?(e.preventDefault(),e.stopPropagation(),this.stepForward()):n.prototype.handleKeyDown.call(this,e)},t.handleClick=function(e){e.stopPropagation(),e.preventDefault()},t.vertical=function(e){if(void 0===e)return this.vertical_||!1;this.vertical_=!!e,this.vertical_?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal")},e}(ke);ke.registerComponent("Slider",En);function Sn(e,t){return xn(e/t*100,0,100).toFixed(2)+"%"}var Dn=function(r){function e(e,t){var i;return(i=r.call(this,e,t)||this).partEls_=[],i.on(e,"progress",i.update),i}Fe(e,r);var t=e.prototype;return t.createEl=function(){var e=r.prototype.createEl.call(this,"div",{className:"vjs-load-progress"}),t=w("span",{className:"vjs-control-text"}),i=w("span",{textContent:this.localize("Loaded")}),n=h.createTextNode(": ");return this.percentageEl_=w("span",{className:"vjs-control-text-loaded-percentage",textContent:"0%"}),e.appendChild(t),t.appendChild(i),t.appendChild(n),t.appendChild(this.percentageEl_),e},t.dispose=function(){this.partEls_=null,this.percentageEl_=null,r.prototype.dispose.call(this)},t.update=function(){var h=this;this.requestAnimationFrame(function(){var e=h.player_.liveTracker,t=h.player_.buffered(),i=e&&e.isLive()?e.seekableEnd():h.player_.duration(),n=h.player_.bufferedEnd(),r=h.partEls_,a=Sn(n,i);h.percent_!==a&&(h.el_.style.width=a,b(h.percentageEl_,a),h.percent_=a);for(var s=0;s<t.length;s++){var o=t.start(s),l=t.end(s),u=r[s];u||(u=h.el_.appendChild(w()),r[s]=u),u.dataset.start===o&&u.dataset.end===l||(u.dataset.start=o,u.dataset.end=l,u.style.left=Sn(o,n),u.style.width=Sn(l-o,n))}for(var c=r.length;c>t.length;c--)h.el_.removeChild(r[c-1]);r.length=t.length})},e}(ke);ke.registerComponent("LoadProgressBar",Dn);var Nn=function(n){function e(e,t){var i;return(i=n.call(this,e,t)||this).update=me(ge(Pe(i),i.update),30),i}Fe(e,n);var t=e.prototype;return t.createEl=function(){return n.prototype.createEl.call(this,"div",{className:"vjs-time-tooltip"},{"aria-hidden":"true"})},t.update=function(e,t,i){var n=k(this.el_),r=k(this.player_.el()),a=e.width*t;if(r&&n){var s=e.left-r.left+a,o=e.width-a+(r.right-e.right),l=n.width/2;s<l?l+=l-s:o<l&&(l=o),l<0?l=0:l>n.width&&(l=n.width),this.el_.style.right="-"+l+"px",this.write(i)}},t.write=function(e){b(this.el_,e)},t.updateTime=function(r,a,s,o){var l=this;this.rafId_&&this.cancelAnimationFrame(this.rafId_),this.rafId_=this.requestAnimationFrame(function(){var e,t=l.player_.duration();if(l.player_.liveTracker&&l.player_.liveTracker.isLive()){var i=l.player_.liveTracker.liveWindow(),n=i-a*i;e=(n<1?"":"-")+vn(n,i)}else e=vn(s,t);l.update(r,a,e),o&&o()})},e}(ke);ke.registerComponent("TimeTooltip",Nn);var Cn=function(n){function e(e,t){var i;return(i=n.call(this,e,t)||this).update=me(ge(Pe(i),i.update),30),i}Fe(e,n);var t=e.prototype;return t.createEl=function(){return n.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar"},{"aria-hidden":"true"})},t.update=function(e,t){var i=this.getChild("timeTooltip");if(i){var n=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();i.updateTime(e,t,n)}},e}(ke);Cn.prototype.options_={children:[]},st||We||Cn.prototype.options_.children.push("timeTooltip"),ke.registerComponent("PlayProgressBar",Cn);var Ln=function(n){function e(e,t){var i;return(i=n.call(this,e,t)||this).update=me(ge(Pe(i),i.update),30),i}Fe(e,n);var t=e.prototype;return t.createEl=function(){return n.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},t.update=function(e,t){var i=this,n=t*this.player_.duration();this.getChild("timeTooltip").updateTime(e,t,n,function(){i.el_.style.left=e.width*t+"px"})},e}(ke);Ln.prototype.options_={children:["timeTooltip"]},ke.registerComponent("MouseTimeDisplay",Ln);var In=function(a){function e(e,t){var i;return(i=a.call(this,e,t)||this).setEventHandlers_(),i}Fe(e,a);var t=e.prototype;return t.setEventHandlers_=function(){this.update_=ge(this,this.update),this.update=me(this.update_,30),this.on(this.player_,["ended","durationchange","timeupdate"],this.update),this.player_.liveTracker&&this.on(this.player_.liveTracker,"liveedgechange",this.update),this.updateInterval=null,this.on(this.player_,["playing"],this.enableInterval_),this.on(this.player_,["ended","pause","waiting"],this.disableInterval_),"hidden"in h&&"visibilityState"in h&&this.on(h,"visibilitychange",this.toggleVisibility_)},t.toggleVisibility_=function(e){h.hidden?this.disableInterval_(e):(this.enableInterval_(),this.update())},t.enableInterval_=function(){this.updateInterval||(this.updateInterval=this.setInterval(this.update,30))},t.disableInterval_=function(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&e&&"ended"!==e.type||this.updateInterval&&(this.clearInterval(this.updateInterval),this.updateInterval=null)},t.createEl=function(){return a.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})},t.update=function(){var n=this,r=a.prototype.update.call(this);return this.requestAnimationFrame(function(){var e=n.player_.ended()?n.player_.duration():n.getCurrentTime_(),t=n.player_.liveTracker,i=n.player_.duration();t&&t.isLive()&&(i=n.player_.liveTracker.liveCurrentTime()),n.percent_!==r&&(n.el_.setAttribute("aria-valuenow",(100*r).toFixed(2)),n.percent_=r),n.currentTime_===e&&n.duration_===i||(n.el_.setAttribute("aria-valuetext",n.localize("progress bar timing: currentTime={1} duration={2}",[vn(e,i),vn(i,i)],"{1} of {2}")),n.currentTime_=e,n.duration_=i),n.bar&&n.bar.update(k(n.el()),n.getProgress())}),r},t.getCurrentTime_=function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()},t.getPercent=function(){var e,t=this.getCurrentTime_(),i=this.player_.liveTracker;return i&&i.isLive()?(e=(t-i.seekableStart())/i.liveWindow(),i.atLiveEdge()&&(e=1)):e=t/this.player_.duration(),e},t.handleMouseDown=function(e){H(e)&&(e.stopPropagation(),this.player_.scrubbing(!0),this.videoWasPlaying=!this.player_.paused(),this.player_.pause(),a.prototype.handleMouseDown.call(this,e))},t.handleMouseMove=function(e){if(H(e)){var t,i=this.calculateDistance(e),n=this.player_.liveTracker;if(n&&n.isLive()){if(.99<=i)return void n.seekToLiveEdge();var r=n.seekableStart(),a=n.liveCurrentTime();if(a<=(t=r+i*n.liveWindow())&&(t=a),t<=r&&(t=r+.1),t===1/0)return}else(t=i*this.player_.duration())===this.player_.duration()&&(t-=.1);this.player_.currentTime(t)}},t.enable=function(){a.prototype.enable.call(this);var e=this.getChild("mouseTimeDisplay");e&&e.show()},t.disable=function(){a.prototype.disable.call(this);var e=this.getChild("mouseTimeDisplay");e&&e.hide()},t.handleMouseUp=function(e){a.prototype.handleMouseUp.call(this,e),e&&e.stopPropagation(),this.player_.scrubbing(!1),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying?Tt(this.player_.play()):this.update_()},t.stepForward=function(){this.player_.currentTime(this.player_.currentTime()+5)},t.stepBack=function(){this.player_.currentTime(this.player_.currentTime()-5)},t.handleAction=function(){this.player_.paused()?this.player_.play():this.player_.pause()},t.handleKeyDown=function(e){if(St.isEventKey(e,"Space")||St.isEventKey(e,"Enter"))e.preventDefault(),e.stopPropagation(),this.handleAction(e);else if(St.isEventKey(e,"Home"))e.preventDefault(),e.stopPropagation(),this.player_.currentTime(0);else if(St.isEventKey(e,"End"))e.preventDefault(),e.stopPropagation(),this.player_.currentTime(this.player_.duration());else if(/^[0-9]$/.test(St(e))){e.preventDefault(),e.stopPropagation();var t=10*(St.codes[St(e)]-St.codes[0])/100;this.player_.currentTime(this.player_.duration()*t)}else St.isEventKey(e,"PgDn")?(e.preventDefault(),e.stopPropagation(),this.player_.currentTime(this.player_.currentTime()-60)):St.isEventKey(e,"PgUp")?(e.preventDefault(),e.stopPropagation(),this.player_.currentTime(this.player_.currentTime()+60)):a.prototype.handleKeyDown.call(this,e)},t.dispose=function(){this.disableInterval_(),this.off(this.player_,["ended","durationchange","timeupdate"],this.update),this.player_.liveTracker&&this.on(this.player_.liveTracker,"liveedgechange",this.update),this.off(this.player_,["playing"],this.enableInterval_),this.off(this.player_,["ended","pause","waiting"],this.disableInterval_),"hidden"in h&&"visibilityState"in h&&this.off(h,"visibilitychange",this.toggleVisibility_),a.prototype.dispose.call(this)},e}(En);In.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"},st||We||In.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),ke.registerComponent("SeekBar",In);var On=function(n){function e(e,t){var i;return(i=n.call(this,e,t)||this).handleMouseMove=me(ge(Pe(i),i.handleMouseMove),30),i.throttledHandleMouseSeek=me(ge(Pe(i),i.handleMouseSeek),30),i.enable(),i}Fe(e,n);var t=e.prototype;return t.createEl=function(){return n.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},t.handleMouseMove=function(e){var t=this.getChild("seekBar");if(t){var i=t.getChild("playProgressBar"),n=t.getChild("mouseTimeDisplay");if(i||n){var r=t.el(),a=k(r),s=R(r,e).x;s=xn(0,1,s),n&&n.update(a,s),i&&i.update(a,t.getProgress())}}},t.handleMouseSeek=function(e){var t=this.getChild("seekBar");t&&t.handleMouseMove(e)},t.enabled=function(){return this.enabled_},t.disable=function(){this.children().forEach(function(e){return e.disable&&e.disable()}),this.enabled()&&(this.off(["mousedown","touchstart"],this.handleMouseDown),this.off(this.el_,"mousemove",this.handleMouseMove),this.handleMouseUp(),this.addClass("disabled"),this.enabled_=!1)},t.enable=function(){this.children().forEach(function(e){return e.enable&&e.enable()}),this.enabled()||(this.on(["mousedown","touchstart"],this.handleMouseDown),this.on(this.el_,"mousemove",this.handleMouseMove),this.removeClass("disabled"),this.enabled_=!0)},t.handleMouseDown=function(e){var t=this.el_.ownerDocument,i=this.getChild("seekBar");i&&i.handleMouseDown(e),this.on(t,"mousemove",this.throttledHandleMouseSeek),this.on(t,"touchmove",this.throttledHandleMouseSeek),this.on(t,"mouseup",this.handleMouseUp),this.on(t,"touchend",this.handleMouseUp)},t.handleMouseUp=function(e){var t=this.el_.ownerDocument,i=this.getChild("seekBar");i&&i.handleMouseUp(e),this.off(t,"mousemove",this.throttledHandleMouseSeek),this.off(t,"touchmove",this.throttledHandleMouseSeek),this.off(t,"mouseup",this.handleMouseUp),this.off(t,"touchend",this.handleMouseUp)},e}(ke);On.prototype.options_={children:["seekBar"]},ke.registerComponent("ProgressControl",On);var jn=function(n){function e(e,t){var i;return(i=n.call(this,e,t)||this).on(e,["enterpictureinpicture","leavepictureinpicture"],i.handlePictureInPictureChange),h.pictureInPictureEnabled||i.disable(),i}Fe(e,n);var t=e.prototype;return t.buildCSSClass=function(){return"vjs-picture-in-picture-control "+n.prototype.buildCSSClass.call(this)},t.handlePictureInPictureChange=function(){this.player_.isInPictureInPicture()?this.controlText("Exit Picture-in-Picture"):this.controlText("Picture-in-Picture")},t.handleClick=function(){this.player_.isInPictureInPicture()?this.player_.exitPictureInPicture():this.player_.requestPictureInPicture()},e}(hn);jn.prototype.controlText_="Picture-in-Picture",ke.registerComponent("PictureInPictureToggle",jn);var kn=function(n){function e(e,t){var i;return(i=n.call(this,e,t)||this).on(e,"fullscreenchange",i.handleFullscreenChange),!1===h[e.fsApi_.fullscreenEnabled]&&i.disable(),i}Fe(e,n);var t=e.prototype;return t.buildCSSClass=function(){return"vjs-fullscreen-control "+n.prototype.buildCSSClass.call(this)},t.handleFullscreenChange=function(){this.player_.isFullscreen()?this.controlText("Non-Fullscreen"):this.controlText("Fullscreen")},t.handleClick=function(){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()},e}(hn);kn.prototype.controlText_="Fullscreen",ke.registerComponent("FullscreenToggle",kn);var Pn=function(e){function t(){return e.apply(this,arguments)||this}return Fe(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-volume-level",innerHTML:'<span class="vjs-control-text"></span>'})},t}(ke);ke.registerComponent("VolumeLevel",Pn);var Rn=function(n){function e(e,t){var i;return(i=n.call(this,e,t)||this).on("slideractive",i.updateLastVolume_),i.on(e,"volumechange",i.updateARIAAttributes),e.ready(function(){return i.updateARIAAttributes()}),i}Fe(e,n);var t=e.prototype;return t.createEl=function(){return n.prototype.createEl.call(this,"div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})},t.handleMouseDown=function(e){H(e)&&n.prototype.handleMouseDown.call(this,e)},t.handleMouseMove=function(e){H(e)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(e)))},t.checkMuted=function(){this.player_.muted()&&this.player_.muted(!1)},t.getPercent=function(){return this.player_.muted()?0:this.player_.volume()},t.stepForward=function(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)},t.stepBack=function(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)},t.updateARIAAttributes=function(){var e=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",e),this.el_.setAttribute("aria-valuetext",e+"%")},t.volumeAsPercentage_=function(){return Math.round(100*this.player_.volume())},t.updateLastVolume_=function(){var e=this,t=this.player_.volume();this.one("sliderinactive",function(){0===e.player_.volume()&&e.player_.lastVolume_(t)})},e}(En);Rn.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},Rn.prototype.playerEvent="volumechange",ke.registerComponent("VolumeBar",Rn);var zn=function(a){function e(e,t){var i,n,r;return void 0===t&&(t={}),t.vertical=t.vertical||!1,void 0!==t.volumeBar&&!l(t.volumeBar)||(t.volumeBar=t.volumeBar||{},t.volumeBar.vertical=t.vertical),i=a.call(this,e,t)||this,n=Pe(i),(r=e).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=me(ge(Pe(i),i.handleMouseMove),30),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}Fe(e,a);var t=e.prototype;return t.createEl=function(){var e="vjs-volume-horizontal";return this.options_.vertical&&(e="vjs-volume-vertical"),a.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control "+e})},t.handleMouseDown=function(){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)},t.handleMouseUp=function(){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)},t.handleMouseMove=function(e){this.volumeBar.handleMouseMove(e)},e}(ke);zn.prototype.options_={children:["volumeBar"]},ke.registerComponent("VolumeControl",zn);var Un=function(a){function e(e,t){var i,n,r;return i=a.call(this,e,t)||this,n=Pe(i),(r=e).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(e,["loadstart","volumechange"],i.update),i}Fe(e,a);var t=e.prototype;return t.buildCSSClass=function(){return"vjs-mute-control "+a.prototype.buildCSSClass.call(this)},t.handleClick=function(){var e=this.player_.volume(),t=this.player_.lastVolume_();if(0===e){var i=t<.1?.1:t;this.player_.volume(i),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())},t.update=function(){this.updateIcon_(),this.updateControlText_()},t.updateIcon_=function(){var e=this.player_.volume(),t=3;st&&this.player_.tech_&&this.player_.tech_.el_&&this.player_.muted(this.player_.tech_.el_.muted),0===e||this.player_.muted()?t=0:e<.33?t=1:e<.67&&(t=2);for(var i=0;i<4;i++)E(this.el_,"vjs-vol-"+i);x(this.el_,"vjs-vol-"+t)},t.updateControlText_=function(){var e=this.player_.muted()||0===this.player_.volume()?"Unmute":"Mute";this.controlText()!==e&&this.controlText(e)},e}(hn);Un.prototype.controlText_="Mute",ke.registerComponent("MuteToggle",Un);var Bn=function(n){function e(e,t){var i;return void 0===t&&(t={}),void 0!==t.inline?t.inline=t.inline:t.inline=!0,void 0!==t.volumeControl&&!l(t.volumeControl)||(t.volumeControl=t.volumeControl||{},t.volumeControl.vertical=!t.inline),(i=n.call(this,e,t)||this).on(e,["loadstart"],i.volumePanelState_),i.on(i.muteToggle,"keyup",i.handleKeyPress),i.on(i.volumeControl,"keyup",i.handleVolumeControlKeyUp),i.on("keydown",i.handleKeyPress),i.on("mouseover",i.handleMouseOver),i.on("mouseout",i.handleMouseOut),i.on(i.volumeControl,["slideractive"],i.sliderActive_),i.on(i.volumeControl,["sliderinactive"],i.sliderInactive_),i}Fe(e,n);var t=e.prototype;return t.sliderActive_=function(){this.addClass("vjs-slider-active")},t.sliderInactive_=function(){this.removeClass("vjs-slider-active")},t.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")},t.createEl=function(){var e="vjs-volume-panel-horizontal";return this.options_.inline||(e="vjs-volume-panel-vertical"),n.prototype.createEl.call(this,"div",{className:"vjs-volume-panel vjs-control "+e})},t.dispose=function(){this.handleMouseOut(),n.prototype.dispose.call(this)},t.handleVolumeControlKeyUp=function(e){St.isEventKey(e,"Esc")&&this.muteToggle.focus()},t.handleMouseOver=function(){this.addClass("vjs-hover"),ce(h,"keyup",ge(this,this.handleKeyPress))},t.handleMouseOut=function(){this.removeClass("vjs-hover"),he(h,"keyup",ge(this,this.handleKeyPress))},t.handleKeyPress=function(e){St.isEventKey(e,"Esc")&&this.handleMouseOut()},e}(ke);Bn.prototype.options_={children:["muteToggle","volumeControl"]},ke.registerComponent("VolumePanel",Bn);var Fn=function(n){function e(e,t){var i;return i=n.call(this,e,t)||this,t&&(i.menuButton_=t.menuButton),i.focusedChild_=-1,i.on("keydown",i.handleKeyDown),i.boundHandleBlur_=ge(Pe(i),i.handleBlur),i.boundHandleTapClick_=ge(Pe(i),i.handleTapClick),i}Fe(e,n);var t=e.prototype;return t.addEventListenerForItem=function(e){e instanceof ke&&(this.on(e,"blur",this.boundHandleBlur_),this.on(e,["tap","click"],this.boundHandleTapClick_))},t.removeEventListenerForItem=function(e){e instanceof ke&&(this.off(e,"blur",this.boundHandleBlur_),this.off(e,["tap","click"],this.boundHandleTapClick_))},t.removeChild=function(e){"string"==typeof e&&(e=this.getChild(e)),this.removeEventListenerForItem(e),n.prototype.removeChild.call(this,e)},t.addItem=function(e){var t=this.addChild(e);t&&this.addEventListenerForItem(t)},t.createEl=function(){var e=this.options_.contentElType||"ul";this.contentEl_=w(e,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");var t=n.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"});return t.appendChild(this.contentEl_),ce(t,"click",function(e){e.preventDefault(),e.stopImmediatePropagation()}),t},t.dispose=function(){this.contentEl_=null,this.boundHandleBlur_=null,this.boundHandleTapClick_=null,n.prototype.dispose.call(this)},t.handleBlur=function(e){var t=e.relatedTarget||h.activeElement;if(!this.children().some(function(e){return e.el()===t})){var i=this.menuButton_;i&&i.buttonPressed_&&t!==i.el().firstChild&&i.unpressButton()}},t.handleTapClick=function(t){if(this.menuButton_){this.menuButton_.unpressButton();var e=this.children();if(!Array.isArray(e))return;var i=e.filter(function(e){return e.el()===t.target})[0];if(!i)return;"CaptionSettingsMenuItem"!==i.name()&&this.menuButton_.focus()}},t.handleKeyDown=function(e){St.isEventKey(e,"Left")||St.isEventKey(e,"Down")?(e.preventDefault(),e.stopPropagation(),this.stepForward()):(St.isEventKey(e,"Right")||St.isEventKey(e,"Up"))&&(e.preventDefault(),e.stopPropagation(),this.stepBack())},t.stepForward=function(){var e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_+1),this.focus(e)},t.stepBack=function(){var e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_-1),this.focus(e)},t.focus=function(e){void 0===e&&(e=0);var t=this.children().slice();t.length&&t[0].className&&/vjs-menu-title/.test(t[0].className)&&t.shift(),0<t.length&&(e<0?e=0:e>=t.length&&(e=t.length-1),t[this.focusedChild_=e].el_.focus())},e}(ke);ke.registerComponent("Menu",Fn);var Gn=function(r){function e(e,t){var i;void 0===t&&(t={}),(i=r.call(this,e,t)||this).menuButton_=new hn(e,t),i.menuButton_.controlText(i.controlText_),i.menuButton_.el_.setAttribute("aria-haspopup","true");var n=hn.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_,"keydown",i.handleKeyDown),i.on(i.menuButton_,"mouseenter",function(){i.addClass("vjs-hover"),i.menu.show(),ce(h,"keyup",ge(Pe(i),i.handleMenuKeyUp))}),i.on("mouseleave",i.handleMouseLeave),i.on("keydown",i.handleSubmenuKeyDown),i}Fe(e,r);var t=e.prototype;return t.update=function(){var e=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=e,this.addChild(e),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.hideThreshold_?this.hide():this.show()},t.createMenu=function(){var e=new Fn(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var t=w("li",{className:"vjs-menu-title",innerHTML:Oe(this.options_.title),tabIndex:-1});this.hideThreshold_+=1;var i=new ke(this.player_,{el:t});e.addItem(i)}if(this.items=this.createItems(),this.items)for(var n=0;n<this.items.length;n++)e.addItem(this.items[n]);return e},t.createItems=function(){},t.createEl=function(){return r.prototype.createEl.call(this,"div",{className:this.buildWrapperCSSClass()},{})},t.buildWrapperCSSClass=function(){var e="vjs-menu-button";return!0===this.options_.inline?e+="-inline":e+="-popup","vjs-menu-button "+e+" "+hn.prototype.buildCSSClass()+" "+r.prototype.buildCSSClass.call(this)},t.buildCSSClass=function(){var e="vjs-menu-button";return!0===this.options_.inline?e+="-inline":e+="-popup","vjs-menu-button "+e+" "+r.prototype.buildCSSClass.call(this)},t.controlText=function(e,t){return void 0===t&&(t=this.menuButton_.el()),this.menuButton_.controlText(e,t)},t.dispose=function(){this.handleMouseLeave(),r.prototype.dispose.call(this)},t.handleClick=function(){this.buttonPressed_?this.unpressButton():this.pressButton()},t.handleMouseLeave=function(){this.removeClass("vjs-hover"),he(h,"keyup",ge(this,this.handleMenuKeyUp))},t.focus=function(){this.menuButton_.focus()},t.blur=function(){this.menuButton_.blur()},t.handleKeyDown=function(e){St.isEventKey(e,"Esc")||St.isEventKey(e,"Tab")?(this.buttonPressed_&&this.unpressButton(),St.isEventKey(e,"Tab")||(e.preventDefault(),this.menuButton_.focus())):(St.isEventKey(e,"Up")||St.isEventKey(e,"Down"))&&(this.buttonPressed_||(e.preventDefault(),this.pressButton()))},t.handleMenuKeyUp=function(e){(St.isEventKey(e,"Esc")||St.isEventKey(e,"Tab"))&&this.removeClass("vjs-hover")},t.handleSubmenuKeyPress=function(e){this.handleSubmenuKeyDown(e)},t.handleSubmenuKeyDown=function(e){(St.isEventKey(e,"Esc")||St.isEventKey(e,"Tab"))&&(this.buttonPressed_&&this.unpressButton(),St.isEventKey(e,"Tab")||(e.preventDefault(),this.menuButton_.focus()))},t.pressButton=function(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.show(),this.menu.lockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","true"),st&&_())return;this.menu.focus()}},t.unpressButton=function(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menu.hide(),this.menuButton_.el_.setAttribute("aria-expanded","false"))},t.disable=function(){this.unpressButton(),this.enabled_=!1,this.addClass("vjs-disabled"),this.menuButton_.disable()},t.enable=function(){this.enabled_=!0,this.removeClass("vjs-disabled"),this.menuButton_.enable()},e}(ke);ke.registerComponent("MenuButton",Gn);var Hn=function(a){function e(e,t){var i,n=t.tracks;if((i=a.call(this,e,t)||this).items.length<=1&&i.hide(),!n)return Pe(i);var r=ge(Pe(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 Fe(e,a),e}(Gn);ke.registerComponent("TrackButton",Hn);var Yn=["Tab","Esc","Up","Down","Right","Left"],Qn=function(n){function e(e,t){var i;return(i=n.call(this,e,t)||this).selectable=t.selectable,i.isSelected_=t.selected||!1,i.multiSelectable=t.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}Fe(e,n);var t=e.prototype;return t.createEl=function(e,t,i){return this.nonIconControl=!0,n.prototype.createEl.call(this,"li",f({className:"vjs-menu-item",innerHTML:'<span class="vjs-menu-item-text">'+this.localize(this.options_.label)+"</span>",tabIndex:-1},t),i)},t.handleKeyDown=function(t){Yn.some(function(e){return St.isEventKey(t,e)})||n.prototype.handleKeyDown.call(this,t)},t.handleClick=function(){this.selected(!0)},t.selected=function(e){this.selectable&&(e?(this.addClass("vjs-selected"),this.el_.setAttribute("aria-checked","true"),this.controlText(", selected"),this.isSelected_=!0):(this.removeClass("vjs-selected"),this.el_.setAttribute("aria-checked","false"),this.controlText(""),this.isSelected_=!1))},e}(rn);ke.registerComponent("MenuItem",Qn);var Vn=function(l){function e(e,t){var n,i=t.track,r=e.textTracks();t.label=i.label||i.language||"Unknown",t.selected="showing"===i.mode,(n=l.call(this,e,t)||this).track=i,n.kinds=(t.kinds||[t.kind||n.track.kind]).filter(Boolean);function a(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];n.handleTracksChange.apply(Pe(n),t)}function s(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];n.handleSelectedLanguageChange.apply(Pe(n),t)}var o;e.on(["loadstart","texttrackchange"],a),r.addEventListener("change",a),r.addEventListener("selectedlanguagechange",s),n.on("dispose",function(){e.off(["loadstart","texttrackchange"],a),r.removeEventListener("change",a),r.removeEventListener("selectedlanguagechange",s)}),void 0===r.onchange&&n.on(["tap","click"],function(){if("object"!=typeof y.Event)try{o=new y.Event("change")}catch(e){}o||(o=h.createEvent("Event")).initEvent("change",!0,!0),r.dispatchEvent(o)});return n.handleTracksChange(),n}Fe(e,l);var t=e.prototype;return t.handleClick=function(e){var t=this.track,i=this.player_.textTracks();if(l.prototype.handleClick.call(this,e),i)for(var n=0;n<i.length;n++){var r=i[n];-1!==this.kinds.indexOf(r.kind)&&(r===t?"showing"!==r.mode&&(r.mode="showing"):"disabled"!==r.mode&&(r.mode="disabled"))}},t.handleTracksChange=function(){var e="showing"===this.track.mode;e!==this.isSelected_&&this.selected(e)},t.handleSelectedLanguageChange=function(){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}}},t.dispose=function(){this.track=null,l.prototype.dispose.call(this)},e}(Qn);ke.registerComponent("TextTrackMenuItem",Vn);var Wn=function(i){function e(e,t){return t.track={player:e,kind:t.kind,kinds:t.kinds,default:!1,mode:"disabled"},t.kinds||(t.kinds=[t.kind]),t.label?t.track.label=t.label:t.track.label=t.kinds.join(" and ")+" off",t.selectable=!0,t.multiSelectable=!1,i.call(this,e,t)||this}Fe(e,i);var t=e.prototype;return t.handleTracksChange=function(){for(var e=this.player().textTracks(),t=!0,i=0,n=e.length;i<n;i++){var r=e[i];if(-1<this.options_.kinds.indexOf(r.kind)&&"showing"===r.mode){t=!1;break}}t!==this.isSelected_&&this.selected(t)},t.handleSelectedLanguageChange=function(){for(var e=this.player().textTracks(),t=!0,i=0,n=e.length;i<n;i++){var r=e[i];if(-1<["captions","descriptions","subtitles"].indexOf(r.kind)&&"showing"===r.mode){t=!1;break}}t&&(this.player_.cache_.selectedLanguage={enabled:!1})},e}(Vn);ke.registerComponent("OffTextTrackMenuItem",Wn);var qn=function(i){function e(e,t){return void 0===t&&(t={}),t.tracks=e.textTracks(),i.call(this,e,t)||this}return Fe(e,i),e.prototype.createItems=function(e,t){var i;void 0===e&&(e=[]),void 0===t&&(t=Vn),this.label_&&(i=this.label_+" off"),e.push(new Wn(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 t(this.player_,{track:a,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});s.addClass("vjs-"+a.kind+"-menu-item"),e.push(s)}}return e},e}(Hn);ke.registerComponent("TextTrackButton",qn);var Xn=function(s){function e(e,t){var i,n=t.track,r=t.cue,a=e.currentTime();return t.selectable=!0,t.multiSelectable=!1,t.label=r.text,t.selected=r.startTime<=a&&a<r.endTime,(i=s.call(this,e,t)||this).track=n,i.cue=r,n.addEventListener("cuechange",ge(Pe(i),i.update)),i}Fe(e,s);var t=e.prototype;return t.handleClick=function(){s.prototype.handleClick.call(this),this.player_.currentTime(this.cue.startTime),this.update(this.cue.startTime)},t.update=function(){var e=this.cue,t=this.player_.currentTime();this.selected(e.startTime<=t&&t<e.endTime)},e}(Qn);ke.registerComponent("ChaptersTrackMenuItem",Xn);var Zn=function(n){function e(e,t,i){return n.call(this,e,t,i)||this}Fe(e,n);var t=e.prototype;return t.buildCSSClass=function(){return"vjs-chapters-button "+n.prototype.buildCSSClass.call(this)},t.buildWrapperCSSClass=function(){return"vjs-chapters-button "+n.prototype.buildWrapperCSSClass.call(this)},t.update=function(e){this.track_&&(!e||"addtrack"!==e.type&&"removetrack"!==e.type)||this.setTrack(this.findChaptersTrack()),n.prototype.update.call(this)},t.setTrack=function(e){if(this.track_!==e){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){var t=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);t&&t.removeEventListener("load",this.updateHandler_),this.track_=null}if(this.track_=e,this.track_){this.track_.mode="hidden";var i=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);i&&i.addEventListener("load",this.updateHandler_)}}},t.findChaptersTrack=function(){for(var e=this.player_.textTracks()||[],t=e.length-1;0<=t;t--){var i=e[t];if(i.kind===this.kind_)return i}},t.getMenuCaption=function(){return this.track_&&this.track_.label?this.track_.label:this.localize(Oe(this.kind_))},t.createMenu=function(){return this.options_.title=this.getMenuCaption(),n.prototype.createMenu.call(this)},t.createItems=function(){var e=[];if(!this.track_)return e;var t=this.track_.cues;if(!t)return e;for(var i=0,n=t.length;i<n;i++){var r=t[i],a=new Xn(this.player_,{track:this.track_,cue:r});e.push(a)}return e},e}(qn);Zn.prototype.kind_="chapters",Zn.prototype.controlText_="Chapters",ke.registerComponent("ChaptersButton",Zn);var $n=function(s){function e(e,t,i){var n;n=s.call(this,e,t,i)||this;var r=e.textTracks(),a=ge(Pe(n),n.handleTracksChange);return r.addEventListener("change",a),n.on("dispose",function(){r.removeEventListener("change",a)}),n}Fe(e,s);var t=e.prototype;return t.handleTracksChange=function(){for(var e=this.player().textTracks(),t=!1,i=0,n=e.length;i<n;i++){var r=e[i];if(r.kind!==this.kind_&&"showing"===r.mode){t=!0;break}}t?this.disable():this.enable()},t.buildCSSClass=function(){return"vjs-descriptions-button "+s.prototype.buildCSSClass.call(this)},t.buildWrapperCSSClass=function(){return"vjs-descriptions-button "+s.prototype.buildWrapperCSSClass.call(this)},e}(qn);$n.prototype.kind_="descriptions",$n.prototype.controlText_="Descriptions",ke.registerComponent("DescriptionsButton",$n);var Kn=function(n){function e(e,t,i){return n.call(this,e,t,i)||this}Fe(e,n);var t=e.prototype;return t.buildCSSClass=function(){return"vjs-subtitles-button "+n.prototype.buildCSSClass.call(this)},t.buildWrapperCSSClass=function(){return"vjs-subtitles-button "+n.prototype.buildWrapperCSSClass.call(this)},e}(qn);Kn.prototype.kind_="subtitles",Kn.prototype.controlText_="Subtitles",ke.registerComponent("SubtitlesButton",Kn);var Jn=function(n){function e(e,t){var i;return t.track={player:e,kind:t.kind,label:t.kind+" settings",selectable:!1,default:!1,mode:"disabled"},t.selectable=!1,t.name="CaptionSettingsMenuItem",(i=n.call(this,e,t)||this).addClass("vjs-texttrack-settings"),i.controlText(", opens "+t.kind+" settings dialog"),i}return Fe(e,n),e.prototype.handleClick=function(){this.player().getChild("textTrackSettings").open()},e}(Vn);ke.registerComponent("CaptionSettingsMenuItem",Jn);var er=function(n){function e(e,t,i){return n.call(this,e,t,i)||this}Fe(e,n);var t=e.prototype;return t.buildCSSClass=function(){return"vjs-captions-button "+n.prototype.buildCSSClass.call(this)},t.buildWrapperCSSClass=function(){return"vjs-captions-button "+n.prototype.buildWrapperCSSClass.call(this)},t.createItems=function(){var e=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(e.push(new Jn(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),n.prototype.createItems.call(this,e)},e}(qn);er.prototype.kind_="captions",er.prototype.controlText_="Captions",ke.registerComponent("CaptionsButton",er);var tr=function(r){function e(){return r.apply(this,arguments)||this}return Fe(e,r),e.prototype.createEl=function(e,t,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,e,f({innerHTML:n},t),i)},e}(Vn);ke.registerComponent("SubsCapsMenuItem",tr);var ir=function(n){function e(e,t){var i;return void 0===t&&(t={}),(i=n.call(this,e,t)||this).label_="subtitles",-1<["en","en-us","en-ca","fr-ca"].indexOf(i.player_.language_)&&(i.label_="captions"),i.menuButton_.controlText(Oe(i.label_)),i}Fe(e,n);var t=e.prototype;return t.buildCSSClass=function(){return"vjs-subs-caps-button "+n.prototype.buildCSSClass.call(this)},t.buildWrapperCSSClass=function(){return"vjs-subs-caps-button "+n.prototype.buildWrapperCSSClass.call(this)},t.createItems=function(){var e=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(e.push(new Jn(this.player_,{kind:this.label_})),this.hideThreshold_+=1),e=n.prototype.createItems.call(this,e,tr)},e}(qn);ir.prototype.kinds_=["captions","subtitles"],ir.prototype.controlText_="Subtitles",ke.registerComponent("SubsCapsButton",ir);var nr=function(s){function e(e,t){var n,i=t.track,r=e.audioTracks();t.label=i.label||i.language||"Unknown",t.selected=i.enabled,(n=s.call(this,e,t)||this).track=i,n.addClass("vjs-"+i.kind+"-menu-item");function a(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];n.handleTracksChange.apply(Pe(n),t)}return r.addEventListener("change",a),n.on("dispose",function(){r.removeEventListener("change",a)}),n}Fe(e,s);var t=e.prototype;return t.createEl=function(e,t,i){var n='<span class="vjs-menu-item-text">'+this.localize(this.options_.label);return"main-desc"===this.options_.track.kind&&(n+='\n <sp
1an 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,e,f({innerHTML:n},t),i)},t.handleClick=function(e){var t=this.player_.audioTracks();s.prototype.handleClick.call(this,e);for(var i=0;i<t.length;i++){var n=t[i];n.enabled=n===this.track}},t.handleTracksChange=function(){this.selected(this.track.enabled)},e}(Qn);ke.registerComponent("AudioTrackMenuItem",nr);var rr=function(i){function e(e,t){return void 0===t&&(t={}),t.tracks=e.audioTracks(),i.call(this,e,t)||this}Fe(e,i);var t=e.prototype;return t.buildCSSClass=function(){return"vjs-audio-button "+i.prototype.buildCSSClass.call(this)},t.buildWrapperCSSClass=function(){return"vjs-audio-button "+i.prototype.buildWrapperCSSClass.call(this)},t.createItems=function(e){void 0===e&&(e=[]),this.hideThreshold_=1;for(var t=this.player_.audioTracks(),i=0;i<t.length;i++){var n=t[i];e.push(new nr(this.player_,{track:n,selectable:!0,multiSelectable:!1}))}return e},e}(Hn);rr.prototype.controlText_="Audio Track",ke.registerComponent("AudioTrackButton",rr);var ar=function(a){function e(e,t){var i,n=t.rate,r=parseFloat(n,10);return t.label=n,t.selected=1===r,t.selectable=!0,t.multiSelectable=!1,(i=a.call(this,e,t)||this).label=n,i.rate=r,i.on(e,"ratechange",i.update),i}Fe(e,a);var t=e.prototype;return t.handleClick=function(){a.prototype.handleClick.call(this),this.player().playbackRate(this.rate)},t.update=function(){this.selected(this.player().playbackRate()===this.rate)},e}(Qn);ar.prototype.contentElType="button",ke.registerComponent("PlaybackRateMenuItem",ar);var sr=function(n){function e(e,t){var i;return(i=n.call(this,e,t)||this).updateVisibility(),i.updateLabel(),i.on(e,"loadstart",i.updateVisibility),i.on(e,"ratechange",i.updateLabel),i}Fe(e,n);var t=e.prototype;return t.createEl=function(){var e=n.prototype.createEl.call(this);return this.labelEl_=w("div",{className:"vjs-playback-rate-value",innerHTML:"1x"}),e.appendChild(this.labelEl_),e},t.dispose=function(){this.labelEl_=null,n.prototype.dispose.call(this)},t.buildCSSClass=function(){return"vjs-playback-rate "+n.prototype.buildCSSClass.call(this)},t.buildWrapperCSSClass=function(){return"vjs-playback-rate "+n.prototype.buildWrapperCSSClass.call(this)},t.createMenu=function(){var e=new Fn(this.player()),t=this.playbackRates();if(t)for(var i=t.length-1;0<=i;i--)e.addChild(new ar(this.player(),{rate:t[i]+"x"}));return e},t.updateARIAAttributes=function(){this.el().setAttribute("aria-valuenow",this.player().playbackRate())},t.handleClick=function(){for(var e=this.player().playbackRate(),t=this.playbackRates(),i=t[0],n=0;n<t.length;n++)if(t[n]>e){i=t[n];break}this.player().playbackRate(i)},t.playbackRates=function(){return this.options_.playbackRates||this.options_.playerOptions&&this.options_.playerOptions.playbackRates},t.playbackRateSupported=function(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&0<this.playbackRates().length},t.updateVisibility=function(){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")},t.updateLabel=function(){this.playbackRateSupported()&&(this.labelEl_.innerHTML=this.player().playbackRate()+"x")},e}(Gn);sr.prototype.controlText_="Playback Rate",ke.registerComponent("PlaybackRateMenuButton",sr);var or=function(e){function t(){return e.apply(this,arguments)||this}Fe(t,e);var i=t.prototype;return i.buildCSSClass=function(){return"vjs-spacer "+e.prototype.buildCSSClass.call(this)},i.createEl=function(){return e.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},t}(ke);ke.registerComponent("Spacer",or);var lr=function(t){function e(){return t.apply(this,arguments)||this}Fe(e,t);var i=e.prototype;return i.buildCSSClass=function(){return"vjs-custom-control-spacer "+t.prototype.buildCSSClass.call(this)},i.createEl=function(){var e=t.prototype.createEl.call(this,{className:this.buildCSSClass()});return e.innerHTML="Â ",e},e}(or);ke.registerComponent("CustomControlSpacer",lr);var ur=function(e){function t(){return e.apply(this,arguments)||this}return Fe(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"})},t}(ke);ur.prototype.options_={children:["playToggle","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","seekToLive","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","fullscreenToggle"]},"exitPictureInPicture"in h&&ur.prototype.options_.children.splice(ur.prototype.options_.children.length-1,0,"pictureInPictureToggle"),ke.registerComponent("ControlBar",ur);var cr=function(n){function e(e,t){var i;return(i=n.call(this,e,t)||this).on(e,"error",i.open),i}Fe(e,n);var t=e.prototype;return t.buildCSSClass=function(){return"vjs-error-display "+n.prototype.buildCSSClass.call(this)},t.content=function(){var e=this.player().error();return e?this.localize(e.message):""},e}(Nt);cr.prototype.options_=r({}
vendor: 7,084 bytes, line 1
1,Nt.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),ke.registerComponent("ErrorDisplay",cr);var hr="vjs-text-track-settings",dr=["#000","Black"],pr=["#00F","Blue"],fr=["#0FF","Cyan"],gr=["#0F0","Green"],mr=["#F0F","Magenta"],vr=["#F00","Red"],yr=["#FFF","White"],_r=["#FF0","Yellow"],Mr=["1","Opaque"],wr=["0.5","Semi-Transparent"],br=["0","Transparent"],Tr={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[dr,yr,vr,gr,pr,_r,mr,fr]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[Mr,wr,br]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[yr,dr,vr,gr,pr,_r,mr,fr]},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(e){return"1.00"===e?null:Number(e)}},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Transparency",options:[Mr,wr]},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:[br,wr,Mr]}};function Ar(e,t){if(t&&(e=t(e)),e&&"none"!==e)return e}Tr.windowColor.options=Tr.backgroundColor.options;var xr=function(n){function e(e,t){var i;return t.temporary=!1,(i=n.call(this,e,t)||this).updateDisplay=ge(Pe(i),i.updateDisplay),i.fill(),i.hasBeenOpened_=i.hasBeenFilled_=!0,i.endDialog=w("p",{className:"vjs-control-text",textContent:i.localize("End of dialog window.")}),i.el().appendChild(i.endDialog),i.setDefaults(),void 0===t.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()}),s(Tr,function(e){i.on(i.$(e.selector),"change",i.updateDisplay)}),i.options_.persistTextTrackSettings&&i.restoreSettings(),i}Fe(e,n);var t=e.prototype;return t.dispose=function(){this.endDialog=null,n.prototype.dispose.call(this)},t.createElSelect_=function(e,t,i){var n=this;void 0===t&&(t=""),void 0===i&&(i="label");var r=Tr[e],a=r.id.replace("%s",this.id_),s=[t,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(e){var t=a+"-"+e[1].replace(/\W+/g,"");return['<option id="'+t+'" value="'+e[0]+'" ','aria-labelledby="'+s+" "+t+'">',n.localize(e[1]),"</option>"].join("")})).concat("</select>").join("")},t.createElFgColor_=function(){var e="captions-text-legend-"+this.id_;return['<fieldset class="vjs-fg-color vjs-track-setting">','<legend id="'+e+'">',this.localize("Text"),"</legend>",this.createElSelect_("color",e),'<span class="vjs-text-opacity vjs-opacity">',this.createElSelect_("textOpacity",e),"</span>","</fieldset>"].join("")},t.createElBgColor_=function(){var e="captions-background-"+this.id_;return['<fieldset class="vjs-bg-color vjs-track-setting">','<legend id="'+e+'">',this.localize("Background"),"</legend>",this.createElSelect_("backgroundColor",e),'<span class="vjs-bg-opacity vjs-opacity">',this.createElSelect_("backgroundOpacity",e),"</span>","</fieldset>"].join("")},t.createElWinColor_=function(){var e="captions-window-"+this.id_;return['<fieldset class="vjs-window-color vjs-track-setting">','<legend id="'+e+'">',this.localize("Window"),"</legend>",this.createElSelect_("windowColor",e),'<span class="vjs-window-opacity vjs-opacity">',this.createElSelect_("windowOpacity",e),"</span>","</fieldset>"].join("")},t.createElColors_=function(){return w("div",{className:"vjs-track-settings-colors",innerHTML:[this.createElFgColor_(),this.createElBgColor_(),this.createElWinColor_()].join("")})},t.createElFont_=function(){return w("div",{className:"vjs-track-settings-font",innerHTML:['<fieldset class="vjs-font-percent vjs-track-setting">',this.createElSelect_("fontPercent","","legend"),"</fieldset>",'<fieldset class="vjs-edge-style vjs-track-setting">',this.createElSelect_("edgeStyle","","legend"),"</fieldset>",'<fieldset class="vjs-font-family vjs-track-setting">',this.createElSelect_("fontFamily","","legend"),"</fieldset>"].join("")})},t.createElControls_=function(){var e=this.localize("restore all settings to the default values");return w("div",{className:"vjs-track-settings-controls",innerHTML:['<button type="button" class="vjs-default-button" title="'+e+'">',this.localize("Reset"),'<span class="vjs-control-text"> '+e+"</span>","</button>",'<button type="button" class="vjs-done-button">'+this.localize("Done")+"</button>"].join("")})},t.content=function(){return[this.createElColors_(),this.createElFont_(),this.createElControls_()]},t.label=function(){return this.localize("Caption Settings Dialog")},t.description=function(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")},t.buildCSSClass=function(){return n.prototype.buildCSSClass.call(this)+" vjs-text-track-settings"},t.getValues=function(){var i,n,e,s=this;return n=function(e,t,i){var n,r,a=(n=s.$(t.selector),r=t.parser,Ar(n.options[n.options.selectedIndex].value,r));return void 0!==a&&(e[i]=a),e},void 0===(e={})&&(e=0),a(i=Tr).reduce(function(e,t){return n(e,i[t],t)},e)},t.setValues=function(i){var n=this;s(Tr,function(e,t){!function(e,t,i){if(t)for(var n=0;n<e.options.length;n++)if(Ar(e.options[n].value,i)===t){e.selectedIndex=n;break}}(n.$(e.selector),i[t],e.parser)})},t.setDefaults=function(){var i=this;s(Tr,function(e){var t=e.hasOwnProperty("default")?e.default:0;i.$(e.selector).selectedIndex=t})},t.restoreSettings=function(){var e;try{e=JSON.parse(y.localStorage.getItem(hr))}catch(e){d.warn(e)}e&&this.setValues(e)},t.saveSettings=function(){if(this.options_.persistTextTrackSettings){var e=this.getValues();try{Object.keys(e).length?y.localStorage.setItem(hr,JSON.stringify(e)):y.localStorage.removeItem(hr)}catch(e){d.warn(e)}}},t.updateDisplay=function(){var e=this.player_.getChild("textTrackDisplay");e&&e.updateDisplay()},t.conditionalBlur_=function(){this.previouslyActiveEl_=null;var e=this.player_.controlBar,t=e&&e.subsCapsButton,i=e&&e.captionsButton;
vendor: 4,530 bytes, line 1
1t?t.focus():i&&i.focus()},e}(Nt);ke.registerComponent("TextTrackSettings",xr);var Er=function(a){function e(e,t){var i,n=t.ResizeObserver||y.ResizeObserver;null===t.ResizeObserver&&(n=!1);var r=je({createEl:!n,reportTouchActivity:!1},t);return(i=a.call(this,e,r)||this).ResizeObserver=t.ResizeObserver||y.ResizeObserver,i.loadListener_=null,i.resizeObserver_=null,i.debouncedHandler_=ve(function(){i.resizeHandler()},100,!1,Pe(i)),n?(i.resizeObserver_=new i.ResizeObserver(i.debouncedHandler_),i.resizeObserver_.observe(e.el())):(i.loadListener_=function(){if(i.el_&&i.el_.contentWindow){var e=i.debouncedHandler_,t=i.unloadListener_=function(){he(this,"resize",e),he(this,"unload",t),t=null};ce(i.el_.contentWindow,"unload",t),ce(i.el_.contentWindow,"resize",e)}},i.one("load",i.loadListener_)),i}Fe(e,a);var t=e.prototype;return t.createEl=function(){return a.prototype.createEl.call(this,"iframe",{className:"vjs-resize-manager",tabIndex:-1},{"aria-hidden":"true"})},t.resizeHandler=function(){this.player_&&this.player_.trigger&&this.player_.trigger("playerresize")},t.dispose=function(){this.debouncedHandler_&&this.debouncedHandler_.cancel(),this.resizeObserver_&&(this.player_.el()&&this.resizeObserver_.unobserve(this.player_.el()),this.resizeObserver_.disconnect()),this.loadListener_&&this.off("load",this.loadListener_),this.el_&&this.el_.contentWindow&&this.unloadListener_&&this.unloadListener_.call(this.el_.contentWindow),this.ResizeObserver=null,this.resizeObserver=null,this.debouncedHandler_=null,this.loadListener_=null,a.prototype.dispose.call(this)},e}(ke);ke.registerComponent("ResizeManager",Er);var Sr={trackingThreshold:30,liveTolerance:15},Dr=function(r){function e(e,t){var i,n=je(Sr,t,{createEl:!1});return(i=r.call(this,e,n)||this).reset_(),i.on(i.player_,"durationchange",i.handleDurationchange),et&&"hidden"in h&&"visibilityState"in h&&i.on(h,"visibilitychange",i.handleVisibilityChange),i}Fe(e,r);var t=e.prototype;return t.handleVisibilityChange=function(){this.player_.duration()===1/0&&(h.hidden?this.stopTracking():this.startTracking())},t.trackLive_=function(){var e=this.player_.seekable();if(e&&e.length){var t=Number(y.performance.now().toFixed(4)),i=-1===this.lastTime_?0:(t-this.lastTime_)/1e3;this.lastTime_=t,this.pastSeekEnd_=this.pastSeekEnd()+i;var n=this.liveCurrentTime(),r=this.player_.currentTime(),a=this.player_.paused()||this.seekedBehindLive_||Math.abs(n-r)>this.options_.liveTolerance;this.timeupdateSeen_&&n!==1/0||(a=!1),a!==this.behindLiveEdge_&&(this.behindLiveEdge_=a,this.trigger("liveedgechange"))}},t.handleDurationchange=function(){this.player_.duration()===1/0&&this.liveWindow()>=this.options_.trackingThreshold?(this.player_.options_.liveui&&this.player_.addClass("vjs-liveui"),this.startTracking()):(this.player_.removeClass("vjs-liveui"),this.stopTracking())},t.startTracking=function(){this.isTracking()||(this.timeupdateSeen_||(this.timeupdateSeen_=this.player_.hasStarted()),this.trackingInterval_=this.setInterval(this.trackLive_,30),this.trackLive_(),this.on(this.player_,["play","pause"],this.trackLive_),this.timeupdateSeen_?this.on(this.player_,"seeked",this.handleSeeked):(this.one(this.player_,"play",this.handlePlay),this.one(this.player_,"timeupdate",this.handleFirstTimeupdate)))},t.handleFirstTimeupdate=function(){this.timeupdateSeen_=!0,this.on(this.player_,"seeked",this.handleSeeked)},t.handleSeeked=function(){var e=Math.abs(this.liveCurrentTime()-this.player_.currentTime());this.seekedBehindLive_=!this.skipNextSeeked_&&2<e,this.skipNextSeeked_=!1,this.trackLive_()},t.handlePlay=function(){this.one(this.player_,"timeupdate",this.seekToLiveEdge)},t.reset_=function(){this.lastTime_=-1,this.pastSeekEnd_=0,this.lastSeekEnd_=-1,this.behindLiveEdge_=!0,this.timeupdateSeen_=!1,this.seekedBehindLive_=!1,this.skipNextSeeked_=!1,this.clearInterval(this.trackingInterval_),this.trackingInterval_=null,this.off(this.player_,["play","pause"],this.trackLive_),this.off(this.player_,"seeked",this.handleSeeked),this.off(this.player_,"play",this.handlePlay),this.off(this.player_,"timeupdate",this.handleFirstTimeupdate),this.off(this.player_,"timeupdate",this.seekToLiveEdge)},t.stopTracking=function(){this.isTracking()&&(this.reset_(),this.trigger("liveedgechange"))},t.seekableEnd=function(){for(var e=this.player_.seekable(),t=[],i=e?e.length:0;i--;)t.push(e.end(i));return t.length?t.sort()[t.length-1]:1/0},t.seekableStart=function(){for(var e=this.player_.seekable(),t=[],i=e?e.length:0;i--;)t.push(e.start(i));return t.length?t.sort()[0]:0}
vendor: 27,648 bytes, line 1
1,t.liveWindow=function(){var e=this.liveCurrentTime();return e===1/0?1/0:e-this.seekableStart()},t.isLive=function(){return this.isTracking()},t.atLiveEdge=function(){return!this.behindLiveEdge()},t.liveCurrentTime=function(){return this.pastSeekEnd()+this.seekableEnd()},t.pastSeekEnd=function(){var e=this.seekableEnd();return-1!==this.lastSeekEnd_&&e!==this.lastSeekEnd_&&(this.pastSeekEnd_=0),this.lastSeekEnd_=e,this.pastSeekEnd_},t.behindLiveEdge=function(){return this.behindLiveEdge_},t.isTracking=function(){return"number"==typeof this.trackingInterval_},t.seekToLiveEdge=function(){this.seekedBehindLive_=!1,this.atLiveEdge()||(this.skipNextSeeked_=!0,this.player_.currentTime(this.liveCurrentTime()))},t.dispose=function(){this.off(h,"visibilitychange",this.handleVisibilityChange),this.stopTracking(),r.prototype.dispose.call(this)},e}(ke);ke.registerComponent("LiveTracker",Dr);function Nr(e){var t=e.el();if(t.hasAttribute("src"))return e.triggerSourceset(t.src),1;var i=e.$$("source"),n=[],r="";if(i.length){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]),e.triggerSourceset(r),!0)}}function Cr(e,t){for(var i={},n=0;n<e.length&&!((i=Object.getOwnPropertyDescriptor(e[n],t))&&i.set&&i.get);n++);return i.enumerable=!0,i.configurable=!0,i}function Lr(a){var s=a.el();if(!s.resetSourceWatch_){var t={},e=Cr([a.el(),y.HTMLMediaElement.prototype,y.Element.prototype,kr],"innerHTML"),i=function(r){return function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];var n=r.apply(s,t);return Nr(a),n}};["append","appendChild","insertAdjacentHTML"].forEach(function(e){s[e]&&(t[e]=s[e],s[e]=i(t[e]))}),Object.defineProperty(s,"innerHTML",je(e,{set:i(e.set)})),s.resetSourceWatch_=function(){s.resetSourceWatch_=null,Object.keys(t).forEach(function(e){s[e]=t[e]}),Object.defineProperty(s,"innerHTML",e)},a.one("sourceset",s.resetSourceWatch_)}}function Ir(n){if(n.featuresSourceset){var r=n.el();if(!r.resetSourceset_){var i=Cr([n.el(),y.HTMLMediaElement.prototype,Pr],"src"),a=r.setAttribute,t=r.load;Object.defineProperty(r,"src",je(i,{set:function(e){var t=i.set.call(r,e);return n.triggerSourceset(r.src),t}})),r.setAttribute=function(e,t){var i=a.call(r,e,t);return/src/i.test(e)&&n.triggerSourceset(r.src),i},r.load=function(){var e=t.call(r);return Nr(n)||(n.triggerSourceset(""),Lr(n)),e},r.currentSrc?n.triggerSourceset(r.currentSrc):Nr(n)||Lr(n),r.resetSourceset_=function(){r.resetSourceset_=null,r.load=t,r.setAttribute=a,Object.defineProperty(r,"src",i),r.resetSourceWatch_&&r.resetSourceWatch_()}}}}function Or(t,i,n,e){function r(e){return Object.defineProperty(t,i,{value:e,enumerable:!0,writable:!0})}void 0===e&&(e=!0);var a={configurable:!0,enumerable:!0,get:function(){var e=n();return r(e),e}};return e&&(a.set=r),Object.defineProperty(t,i,a)}var jr,kr=Object.defineProperty({},"innerHTML",{get:function(){return this.cloneNode(!0).innerHTML},set:function(e){var t=h.createElement(this.nodeName.toLowerCase());t.innerHTML=e;for(var i=h.createDocumentFragment();t.childNodes.length;)i.appendChild(t.childNodes[0]);return this.innerText="",y.Element.prototype.appendChild.call(this,i),this.innerHTML}}),Pr=Object.defineProperty({},"src",{get:function(){return this.hasAttribute("src")?kt(y.Element.prototype.getAttribute.call(this,"src")):""},set:function(e){return y.Element.prototype.setAttribute.call(this,"src",e),e}}),Rr=function(c){function o(e,t){var i;i=c.call(this,e,t)||this;var n=e.source,r=!1;if(n&&(i.el_.currentSrc!==n.src||e.tag&&3===e.tag.initNetworkState_)?i.setSource(n):i.handleLateInit_(i.el_),e.enableSourceset&&i.setupSourcesetHandling_(),i.el_.hasChildNodes()){for(var a=i.el_.childNodes,s=a.length,o=[];s--;){var l=a[s];"track"===l.nodeName.toLowerCase()&&(i.featuresNativeTextTracks?(i.remoteTextTrackEls().addTrackElement_(l),i.remoteTextTracks().addTrack(l.track),i.textTracks().addTrack(l.track),r||i.el_.hasAttribute("crossorigin")||!Rt(l.src)||(r=!0)):o.push(l))}for(var u=0;u<o.length;u++)i.el_.removeChild(o[u])}return i.proxyNativeTracks_(),i.featuresNativeTextTracks&&r&&d.warn("Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\nThis may prevent text tracks from loading."),i.restoreMetadataTracksInIOSNativePlayer_(),(nt||at||Xe)&&!0===e.nativeControlsForTouch&&i.setControls(!0),i.proxyWebkitFullscreen_(),i.triggerReady(),i}Fe(o,c);var e=o.prototype;return e.dispose=function(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_(),o.disposeMediaElement(this.el_),this.options_=null,c.prototype.dispose.call(this)},e.setupSourcesetHandling_=function(){Ir(this)},e.restoreMetadataTracksInIOSNativePlayer_=function(){function e(){i=[];for(var e=0;e<n.length;e++){var t=n[e];"metadata"===t.kind&&i.push({track:t,storedMode:t.mode})}}var i,n=this.textTracks();e(),n.addEventListener("change",e),this.on("dispose",function(){return n.removeEventListener("change",e)});function r(){for(var e=0;e<i.length;e++){var t=i[e];"disabled"===t.track.mode&&t.track.mode!==t.storedMode&&(t.track.mode=t.storedMode)}n.removeEventListener("change",r)}this.on("webkitbeginfullscreen",function(){n.removeEventListener("change",e),n.removeEventListener("change",r),n.addEventListener("change",r)}),this.on("webkitendfullscreen",function(){n.removeEventListener("change",e),n.addEventListener("change",e),n.removeEventListener("change",r)})},e.overrideNative_=function(e,t){var i=this;if(t===this["featuresNative"+e+"Tracks"]){var n=e.toLowerCase();this[n+"TracksListeners_"]&&Object.keys(this[n+"TracksListeners_"]).forEach(function(e){i.el()[n+"Tracks"].removeEventListener(e,i[n+"TracksListeners_"][e])}),this["featuresNative"+e+"Tracks"]=!t,this[n+"TracksListeners_"]=null,this.proxyNativeTracksForType_(n)}},e.overrideNativeAudioTracks=function(e){this.overrideNative_("Audio",e)},e.overrideNativeVideoTracks=function(e){this.overrideNative_("Video",e)},e.proxyNativeTracksForType_=function(t){var n=this,e=ui[t],r=this.el()[e.getterName],a=this[e.getterName]();if(this["featuresNative"+e.capitalName+"Tracks"]&&r&&r.addEventListener){var s={change:function(){var e={type:"change",target:a,currentTarget:a,srcElement:a};a.trigger(e),"text"===t&&n[ci.remoteText.getterName]().trigger(e)},addtrack:function(e){a.addTrack(e.track)},removetrack:function(e){a.removeTrack(e.track)}},i=function(){for(var e=[],t=0;t<a.length;t++){for(var i=!1,n=0;n<r.length;n++)if(r[n]===a[t]){i=!0;break}i||e.push(a[t])}for(;e.length;)a.removeTrack(e.shift())};this[e.getterName+"Listeners_"]=s,Object.keys(s).forEach(function(t){var i=s[t];r.addEventListener(t,i),n.on("dispose",function(e){return r.removeEventListener(t,i)})}),this.on("loadstart",i),this.on("dispose",function(e){return n.off("loadstart",i)})}},e.proxyNativeTracks_=function(){var t=this;ui.names.forEach(function(e){t.proxyNativeTracksForType_(e)})},e.createEl=function(){var e=this.options_.tag;if(!e||!this.options_.playerElIngest&&!this.movingMediaElementInDOM){if(e){var t=e.cloneNode(!0);e.parentNode&&e.parentNode.insertBefore(t,e),o.disposeMediaElement(e),e=t}else{e=h.createElement("video");var i=je({},this.options_.tag&&N(this.options_.tag));nt&&!0===this.options_.nativeControlsForTouch||delete i.controls,D(e,f(i,{id:this.options_.techId,class:"vjs-tech"}))}e.playerId=this.options_.playerId}void 0!==this.options_.preload&&L(e,"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];void 0!==s&&(s?L(e,a,a):I(e,a),e[a]=s)}return e},e.handleLateInit_=function(e){if(0!==e.networkState&&3!==e.networkState){if(0===e.readyState){var t=!1,i=function(){t=!0};this.on("loadstart",i);var n=function(){t||this.trigger("loadstart")};return this.on("loadedmetadata",n),void this.ready(function(){this.off("loadstart",i),this.off("loadedmetadata",n),t||this.trigger("loadstart")})}var r=["loadstart"];r.push("loadedmetadata"),2<=e.readyState&&r.push("loadeddata"),3<=e.readyState&&r.push("canplay"),4<=e.readyState&&r.push("canplaythrough"),this.ready(function(){r.forEach(function(e){this.trigger(e)},this)})}},e.setCurrentTime=function(e){try{this.el_.currentTime=e}catch(e){d(e,"Video is not ready. (Video.js)")}},e.duration=function(){var t=this;if(this.el_.duration===1/0&&We&&Ke&&0===this.el_.currentTime){return this.on("timeupdate",function e(){0<t.el_.currentTime&&(t.el_.duration===1/0&&t.trigger("durationchange"),t.off("timeupdate",e))}),NaN}return this.el_.duration||NaN},e.width=function(){return this.el_.offsetWidth},e.height=function(){return this.el_.offsetHeight},e.proxyWebkitFullscreen_=function(){var e=this;if("webkitDisplayingFullscreen"in this.el_){var t=function(){this.trigger("fullscreenchange",{isFullscreen:!1})},i=function(){"webkitPresentationMode"in this.el_&&"picture-in-picture"!==this.el_.webkitPresentationMode&&(this.one("webkitendfullscreen",t),this.trigger("fullscreenchange",{isFullscreen:!0,nativeIOSFullscreen:!0}))};this.on("webkitbeginfullscreen",i),this.on("dispose",function(){e.off("webkitbeginfullscreen",i),e.off("webkitendfullscreen",t)})}},e.supportsFullScreen=function(){if("function"==typeof this.el_.webkitEnterFullScreen){var e=y.navigator&&y.navigator.userAgent||"";if(/Android/.test(e)||!/Chrome|Mac OS X 10.5/.test(e))return!0}return!1},e.enterFullScreen=function(){var e=this.el_;if(e.paused&&e.networkState<=e.HAVE_METADATA)Tt(this.el_.play()),this.setTimeout(function(){e.pause();try{e.webkitEnterFullScreen()}catch(e){this.trigger("fullscreenerror",e)}},0);else try{e.webkitEnterFullScreen()}catch(e){this.trigger("fullscreenerror",e)}},e.exitFullScreen=function(){this.el_.webkitDisplayingFullscreen?this.el_.webkitExitFullScreen():this.trigger("fullscreenerror",new Error("The video is not fullscreen"))},e.requestPictureInPicture=function(){return this.el_.requestPictureInPicture()},e.src=function(e){if(void 0===e)return this.el_.src;this.setSrc(e)},e.reset=function(){o.resetMediaElement(this.el_)},e.currentSrc=function(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc},e.setControls=function(e){this.el_.controls=!!e},e.addTextTrack=function(e,t,i){return this.featuresNativeTextTracks?this.el_.addTextTrack(e,t,i):c.prototype.addTextTrack.call(this,e,t,i)},e.createRemoteTextTrack=function(e){if(!this.featuresNativeTextTracks)return c.prototype.createRemoteTextTrack.call(this,e);var t=h.createElement("track");return e.kind&&(t.kind=e.kind),e.label&&(t.label=e.label),(e.language||e.srclang)&&(t.srclang=e.language||e.srclang),e.default&&(t.default=e.default),e.id&&(t.id=e.id),e.src&&(t.src=e.src),t},e.addRemoteTextTrack=function(e,t){var i=c.prototype.addRemoteTextTrack.call(this,e,t);return this.featuresNativeTextTracks&&this.el().appendChild(i),i},e.removeRemoteTextTrack=function(e){if(c.prototype.removeRemoteTextTrack.call(this,e),this.featuresNativeTextTracks)for(var t=this.$$("track"),i=t.length;i--;)e!==t[i]&&e!==t[i].track||this.el().removeChild(t[i])},e.getVideoPlaybackQuality=function(){if("function"==typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();var e={};return void 0!==this.el().webkitDroppedFrameCount&&void 0!==this.el().webkitDecodedFrameCount&&(e.droppedVideoFrames=this.el().webkitDroppedFrameCount,e.totalVideoFrames=this.el().webkitDecodedFrameCount),y.performance&&"function"==typeof y.performance.now?e.creationTime=y.performance.now():y.performance&&y.performance.timing&&"number"==typeof y.performance.timing.navigationStart&&(e.creationTime=y.Date.now()-y.performance.timing.navigationStart),e},o}(Gi);Or(Rr,"TEST_VID",function(){if(m()){var e=h.createElement("video"),t=h.createElement("track");return t.kind="captions",t.srclang="en",t.label="English",e.appendChild(t),e}}),Rr.isSupported=function(){try{Rr.TEST_VID.volume=.5}catch(e){return!1}return!(!Rr.TEST_VID||!Rr.TEST_VID.canPlayType)},Rr.canPlayType=function(e){return Rr.TEST_VID.canPlayType(e)},Rr.canPlaySource=function(e,t){return Rr.canPlayType(e.type)},Rr.canControlVolume=function(){try{var e=Rr.TEST_VID.volume;return Rr.TEST_VID.volume=e/2+.1,e!==Rr.TEST_VID.volume}catch(e){return!1}},Rr.canMuteVolume=function(){try{var e=Rr.TEST_VID.muted;return Rr.TEST_VID.muted=!e,Rr.TEST_VID.muted?L(Rr.TEST_VID,"muted","muted"):I(Rr.TEST_VID,"muted"),e!==Rr.TEST_VID.muted}catch(e){return!1}},Rr.canControlPlaybackRate=function(){if(We&&Ke&&Je<58)return!1;try{var e=Rr.TEST_VID.playbackRate;return Rr.TEST_VID.playbackRate=e/2+.1,e!==Rr.TEST_VID.playbackRate}catch(e){return!1}},Rr.canOverrideAttributes=function(){try{var e=function(){};Object.defineProperty(h.createElement("video"),"src",{get:e,set:e}),Object.defineProperty(h.createElement("audio"),"src",{get:e,set:e}),Object.defineProperty(h.createElement("video"),"innerHTML",{get:e,set:e}),Object.defineProperty(h.createElement("audio"),"innerHTML",{get:e,set:e})}catch(e){return!1}return!0},Rr.supportsNativeTextTracks=function(){return ot||st&&Ke},Rr.supportsNativeVideoTracks=function(){return!(!Rr.TEST_VID||!Rr.TEST_VID.videoTracks)},Rr.supportsNativeAudioTracks=function(){return!(!Rr.TEST_VID||!Rr.TEST_VID.audioTracks)},Rr.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","resize","volumechange"],[["featuresVolumeControl","canControlVolume"],["featuresMuteControl","canMuteVolume"],["featuresPlaybackRate","canControlPlaybackRate"],["featuresSourceset","canOverrideAttributes"],["featuresNativeTextTracks","supportsNativeTextTracks"],["featuresNativeVideoTracks","supportsNativeVideoTracks"],["featuresNativeAudioTracks","supportsNativeAudioTracks"]].forEach(function(e){var t=e[0],i=e[1];Or(Rr.prototype,t,function(){return Rr[i]()},!0)}),Rr.prototype.movingMediaElementInDOM=!st,Rr.prototype.featuresFullscreenResize=!0,Rr.prototype.featuresProgressEvents=!0,Rr.prototype.featuresTimeupdateEvents=!0,Rr.patchCanPlayType=function(){4<=qe&&!Ze&&!Ke&&(jr=Rr.TEST_VID&&Rr.TEST_VID.constructor.prototype.canPlayType,Rr.TEST_VID.constructor.prototype.canPlayType=function(e){return e&&/^application\/(?:x-|vnd\.apple\.)mpegurl/i.test(e)?"maybe":jr.call(this,e)})},Rr.unpatchCanPlayType=function(){var e=Rr.TEST_VID.constructor.prototype.canPlayType;return jr&&(Rr.TEST_VID.constructor.prototype.canPlayType=jr),e},Rr.patchCanPlayType(),Rr.disposeMediaElement=function(e){if(e){for(e.parentNode&&e.parentNode.removeChild(e);e.hasChildNodes();)e.removeChild(e.firstChild);e.removeAttribute("src"),"function"==typeof e.load&&function(){try{e.load()}catch(e){}}()}},Rr.resetMediaElement=function(e){if(e){for(var t=e.querySelectorAll("source"),i=t.length;i--;)e.removeChild(t[i]);e.removeAttribute("src"),"function"==typeof e.load&&function(){try{e.load()}catch(e){}}()}},["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach(function(e){Rr.prototype[e]=function(){return this.el_[e]||this.el_.hasAttribute(e)}}),["muted","defaultMuted","autoplay","loop","playsinline"].forEach(function(t){Rr.prototype["set"+Oe(t)]=function(e){(this.el_[t]=e)?this.el_.setAttribute(t,t):this.el_.removeAttribute(t)}}),["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","defaultPlaybackRate","played","networkState","readyState","videoWidth","videoHeight","crossOrigin"].forEach(function(e){Rr.prototype[e]=function(){return this.el_[e]}}),["volume","src","poster","preload","playbackRate","defaultPlaybackRate","crossOrigin"].forEach(function(t){Rr.prototype["set"+Oe(t)]=function(e){this.el_[t]=e}}),["pause","load","play"].forEach(function(e){Rr.prototype[e]=function(){return this.el_[e]()}}),Gi.withSourceHandlers(Rr),Rr.nativeSourceHandler={},Rr.nativeSourceHandler.canPlayType=function(e){try{return Rr.TEST_VID.canPlayType(e)}catch(e){return""}},Rr.nativeSourceHandler.canHandleSource=function(e,t){if(e.type)return Rr.nativeSourceHandler.canPlayType(e.type);if(e.src){var i=Pt(e.src);return Rr.nativeSourceHandler.canPlayType("video/"+i)}return""},Rr.nativeSourceHandler.handleSource=function(e,t,i){t.setSrc(e.src)},Rr.nativeSourceHandler.dispose=function(){},Rr.registerSourceHandler(Rr.nativeSourceHandler),Gi.registerTech("Html5",Rr);var zr=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"],Ur={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},Br=["tiny","xsmall","small","medium","large","xlarge","huge"],Fr={};Br.forEach(function(e){var t="x"===e.charAt(0)?"x-"+e.substring(1):e;Fr[e]="vjs-layout-"+t});var Gr={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0},Hr=function(c){function u(e,t,i){var n;if(e.id=e.id||t.id||"vjs_video_"+ie(),(t=f(u.getTagSettings(e),t)).initChildren=!1,t.createEl=!1,t.evented=!1,t.reportTouchActivity=!1,!t.language)if("function"==typeof e.closest){var r=e.closest("[lang]");r&&r.getAttribute&&(t.language=r.getAttribute("lang"))}else for(var a=e;a&&1===a.nodeType;){if(N(a).hasOwnProperty("lang")){t.language=a.getAttribute("lang");break}a=a.parentNode}if((n=c.call(this,null,t,i)||this).boundDocumentFullscreenChange_=ge(Pe(n),n.documentFullscreenChange_),n.boundFullWindowOnEscKey_=ge(Pe(n),n.fullWindowOnEscKey),n.isFullscreen_=!1,n.log=p(n.id_),n.fsApi_=ft,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=e,n.tagAttributes=e&&N(e),n.language(n.options_.language),t.languages){var s={};Object.getOwnPropertyNames(t.languages).forEach(function(e){s[e.toLowerCase()]=t.languages[e]}),n.languages_=s}else n.languages_=u.prototype.options_.languages;n.resetCache_(),n.poster_=t.poster||"",n.controls_=!!t.controls,e.controls=!1,e.removeAttribute("controls"),n.changingSrc_=!1,n.playCallbacks_=[],n.playTerminatedQueue_=[],e.hasAttribute("autoplay")?n.autoplay(!0):n.autoplay(n.options_.autoplay),t.plugins&&Object.keys(t.plugins).forEach(function(e){if("function"!=typeof n[e])throw new Error('plugin "'+e+'" does not exist')}),n.scrubbing_=!1,n.el_=n.createEl(),Ne(Pe(n),{eventBusKey:"el_"}),n.fsApi_.requestFullscreen&&(ce(h,n.fsApi_.fullscreenchange,n.boundDocumentFullscreenChange_),n.on(n.fsApi_.fullscreenchange,n.boundDocumentFullscreenChange_)),n.fluid_&&n.on("playerreset",n.updateStyleEl_);var o=je(n.options_);t.plugins&&Object.keys(t.plugins).forEach(function(e){n[e](t.plugins[e])}),n.options_.playerOptions=o,n.middleware_=[],n.initChildren(),n.isAudio("audio"===e.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"),nt&&n.addClass("vjs-touch-enabled"),st||n.addClass("vjs-workinghover"),u.players[n.id_]=Pe(n);var l="7.8.4".split(".")[0];return n.addClass("vjs-v"+l),n.userActive(!0),n.reportUserActivity(),n.one("play",n.listenForUserActivity_),n.on("stageclick",n.handleStageClick_),n.on("keydown",n.handleKeyDown),n.breakpoints(n.options_.breakpoints),n.responsive(n.options_.responsive),n}Fe(u,c);var e=u.prototype;return e.dispose=function(){var n=this;this.trigger("dispose"),this.off("dispose"),he(h,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),he(h,"keydown",this.boundFullWindowOnEscKey_),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),u.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),Yi[this.id()]=null,hi.names.forEach(function(e){var t=hi[e],i=n[t.getterName]();i&&i.off&&i.off()}),c.prototype.dispose.call(this)},e.createEl=function(){var t,i=this.tag,e=this.playerElIngest_=i.parentNode&&i.parentNode.hasAttribute&&i.parentNode.hasAttribute("data-vjs-player"),n="video-js"===this.tag.tagName.toLowerCase();e?t=this.el_=i.parentNode:n||(t=this.el_=c.prototype.createEl.call(this,"div"));var r=N(i);if(n){for(t=this.el_=i,i=this.tag=h.createElement("video");t.children.length;)i.appendChild(t.firstChild);A(t,"video-js")||x(t,"video-js"),t.appendChild(i),e=this.playerElIngest_=t,Object.keys(t).forEach(function(e){try{i[e]=t[e]}catch(e){}})}if(i.setAttribute("tabindex","-1"),r.tabindex="-1",(et||Ke&&it)&&(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(e){n&&"class"===e||t.setAttribute(e,r[e]),n&&i.setAttribute(e,r[e])}),i.playerId=i.id,i.id+="_html5_api",i.className="vjs-tech",i.player=t.player=this,this.addClass("vjs-paused"),!0!==y.VIDEOJS_NO_DYNAMIC_STYLE){this.styleEl_=K("vjs-styles-dimensions");var a=Q(".vjs-styles-defaults"),s=Q("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),this.crossOrigin(this.options_.crossOrigin||this.options_.crossorigin);for(var o=i.getElementsByTagName("a"),l=0;l<o.length;l++){var u=o.item(l);x(u,"vjs-hidden"),u.setAttribute("hidden","hidden")}return i.initNetworkState_=i.networkState,i.parentNode&&!e&&i.parentNode.insertBefore(t,i),T(i,t),this.children_.unshift(i),this.el_.setAttribute("lang",this.language_),this.el_=t},e.crossOrigin=function(e){if(!e)return this.techGet_("crossOrigin");"anonymous"===e||"use-credentials"===e?this.techCall_("setCrossOrigin",e):d.warn('crossOrigin must be "anonymous" or "use-credentials", given "'+e+'"')},e.width=function(e){return this.dimension("width",e)},e.height=function(e){return this.dimension("height",e)},e.dimension=function(e,t){var i=e+"_";if(void 0===t)return this[i]||0;if(""===t||"auto"===t)return this[i]=void 0,void this.updateStyleEl_();var n=parseFloat(t);isNaN(n)?d.error('Improper value "'+t+'" supplied for for '+e):(this[i]=n,this.updateStyleEl_())},e.fluid=function(e){if(void 0===e)return!!this.fluid_;var t,i;this.fluid_=!!e,Se(this)&&this.off("playerreset",this.updateStyleEl_),e?(this.addClass("vjs-fluid"),this.fill(!1),Se(t=function(){this.on("playerreset",this.updateStyleEl_)})?i():(t.eventedCallbacks||(t.eventedCallbacks=[]),t.eventedCallbacks.push(i))):this.removeClass("vjs-fluid"),this.updateStyleEl_()},e.fill=function(e){if(void 0===e)return!!this.fill_;this.fill_=!!e,e?(this.addClass("vjs-fill"),this.fluid(!1)):this.removeClass("vjs-fill")},e.aspectRatio=function(e){if(void 0===e)return this.aspectRatio_;if(!/^\d+\:\d+$/.test(e))throw new Error("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.aspectRatio_=e,this.fluid(!0),this.updateStyleEl_()},e.updateStyleEl_=function(){if(!0!==y.VIDEOJS_NO_DYNAMIC_STYLE){var e,t,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];e=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/r:this.videoWidth()||300,t=void 0!==this.height_?this.height_:e*r,i=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(i),J(this.styleEl_,"\n ."+i+" {\n width: "+e+"px;\n height: "+t+"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))}},e.loadTech_=function(e,t){var i=this;this.tech_&&this.unloadTech_();var n=Oe(e),r=e.charAt(0).toLowerCase()+e.slice(1);"Html5"!==n&&this.tag&&(Gi.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=n,this.isReady_=!1;var a={source:t,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,Promise:this.options_.Promise};hi.names.forEach(function(e){var t=hi[e];a[t.getterName]=i[t.privateName]}),f(a,this.options_[n]),f(a,this.options_[r]),f(a,this.options_[e.toLowerCase()]),this.tag&&(a.tag=this.tag),t&&t.src===this.cache_.src&&0<this.cache_.currentTime&&(a.startTime=this.cache_.currentTime);var s=Gi.getTech(e);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(ge(this,this.handleTechReady_),!0),Et(this.textTracksJson_||[],this.tech_),zr.forEach(function(e){i.on(i.tech_,e,i["handleTech"+Oe(e)+"_"])}),Object.keys(Ur).forEach(function(t){i.on(i.tech_,t,function(e){0===i.tech_.playbackRate()&&i.tech_.seeking()?i.queuedCallbacks_.push({callback:i["handleTech"+Ur[t]+"_"].bind(i),event:e}):i["handleTech"+Ur[t]+"_"](e)})}),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_,"fullscreenerror",this.handleTechFullscreenError_),this.on(this.tech_,"enterpictureinpicture",this.handleTechEnterPictureInPicture_),this.on(this.tech_,"leavepictureinpicture",this.handleTechLeavePictureInPicture_),this.on(this.tech_,"error",this.handleTechError_),this.on(this.tech_,"loadedmetadata",this.updateStyleEl_),this.on(this.tech_,"posterchange",this.handleTechPosterChange_),this.on(this.tech_,"textdata",this.handleTechTextData_),this.on(this.tech_,"ratechange",this.handleTechRateChange_),this.usingNativeControls(this.techGet_("controls")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode===this.el()||"Html5"===n&&this.tag||T(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)},e.unloadTech_=function(){var i=this;hi.names.forEach(function(e){var t=hi[e];i[t.privateName]=i[t.getterName]()}),this.textTracksJson_=xt(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_="",this.trigger("posterchange")),this.isPosterFromTech_=!1},e.tech=function(e){return void 0===e&&d.warn("Using the tech directly can be dangerous. I hope you know
1what you're doing.\nSee https://github.com/videojs/video.js/issues/2617 for more info.\n"),this.tech_},e.addTechControlsListeners_=function(){this.removeTechControlsListeners_(),this.on(this.tech_,"mouseup",this.handleTechClick_),this.on(this.tech_,"dblclick",this.handleTechDoubleClick_),this.on(this.tech_,"touchstart",this.handleTechTouchStart_),this.on(this.tech_,"touchmove",this.handleTechTouchMove_),this.on(this.tech_,"touchend",this.handleTechTouchEnd_),this.on(this.tech_,"tap",this.handleTechTap_)},e.removeTechControlsListeners_=function(){this.off(this.tech_,"tap",this.handleTechTap_),this.off(this.tech_,"touchstart",this.handleTechTouchStart_),this.off(this.tech_,"touchmove",this.handleTechTouchMove_),this.off(this.tech_,"touchend",this.handleTechTouchEnd_),this.off(this.tech_,"mouseup",this.handleTechClick_),this.off(this.tech_,"dblclick",this.handleTechDoubleClick_)},e.handleTechReady_=function(){this.triggerReady(),this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_()},e.handleTechLoadStart_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-seeking"),this.error(null),this.handleTechDurationChange_(),this.paused()?(this.hasStarted(!1),this.trigger("loadstart")):(this.trigger("loadstart"),this.trigger("firstplay")),this.manualAutoplay_(this.autoplay())},e.manualAutoplay_=function(t){var n=this;if(this.tech_&&"string"==typeof t){var e,i=function(){var e=n.muted();n.muted(!0);function t(){n.muted(e)}n.playTerminatedQueue_.push(t);var i=n.play();if(bt(i))return i.catch(t)};if("any"===t&&!0!==this.muted()?bt(e=this.play())&&(e=e.catch(i)):e="muted"===t&&!0!==this.muted()?i():this.play(),bt(e))return e.then(function(){n.trigger({type:"autoplay-success",autoplay:t})}).catch(function(e){n.trigger({type:"autoplay-failure",autoplay:t})})}},e.updateSourceCaches_=function(e){void 0===e&&(e="");var t=e,i="";"string"!=typeof t&&(t=e.src,i=e.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],t&&!i&&(i=function(e,t){if(!t)return"";if(e.cache_.source.src===t&&e.cache_.source.type)return e.cache_.source.type;var i=e.cache_.sources.filter(function(e){return e.src===t});if(i.length)return i[0].type;for(var n=e.$$("source"),r=0;r<n.length;r++){var a=n[r];if(a.type&&a.src&&a.src===t)return a.type}return Ji(t)}(this,t)),this.cache_.source=je({},e,{src:t,type:i});for(var n=this.cache_.sources.filter(function(e){return e.src&&e.src===t}),r=[],a=this.$$("source"),s=[],o=0;o<a.length;o++){var l=N(a[o]);r.push(l),l.src&&l.src===t&&s.push(l.src)}s.length&&!n.length?this.cache_.sources=r:n.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=t},e.handleTechSourceset_=function(e){var i=this;if(!this.changingSrc_){var t=function(e){return i.updateSourceCaches_(e)},n=this.currentSource().src,r=e.src;n&&!/^blob:/.test(n)&&/^blob:/.test(r)&&(this.lastSource_&&(this.lastSource_.tech===r||this.lastSource_.player===n)||(t=function(){})),t(r),e.src||this.tech_.any(["sourceset","loadstart"],function(e){if("sourceset"!==e.type){var t=i.techGet("currentSrc");i.lastSource_.tech=t,i.updateSourceCaches_(t)}})}this.lastSource_={player:this.currentSource().src,tech:e.src},this.trigger({src:e.src,type:"sourceset"})},e.hasStarted=function(e){if(void 0===e)return this.hasStarted_;e!==this.hasStarted_&&(this.hasStarted_=e,this.hasStarted_?(this.addClass("vjs-has-started"),this.trigger("firstplay")):this.removeClass("vjs-has-started"))},e.handleTechPlay_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")},e.handleTechRateChange_=function(){0<this.tech_.playbackRate()&&0===this.cache_.lastPlaybackRate&&(this.queuedCallbacks_.forEach(function(e){return e.callback(e.event)}),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger("ratechange")},e.handleTechWaiting_=function(){var t=this;this.addClass("vjs-waiting"),this.trigger("waiting");var i=this.currentTime();this.on("timeupdate",function e(){i!==t.currentTime()&&(t.removeClass("vjs-waiting"),t.off("timeupdate",e))})},e.handleTechCanPlay_=function(){this.removeClass("vjs-waiting"),this.trigger("canplay")},e.handleTechCanPlayThrough_=function(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")},e.handleTechPlaying_=function(){this.removeClass("vjs-waiting"),this.trigger("playing")},e.handleTechSeeking_=function(){this.addClass("vjs-seeking"),this.trigger("seeking")},e.handleTechSeeked_=function(){this.removeClass("vjs-seeking"),this.removeClass("vjs-ended"),this.trigger("seeked")},e.handleTechFirstPlay_=function(){this.options_.starttime&&(d.warn("Passing the `starttime` option to the player will be deprecated
1in 6.0"),this.currentTime(this.options_.starttime)),this.addClass("vjs-has-started"),this.trigger("firstplay")},e.handleTechPause_=function(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")},e.handleTechEnded_=function(){this.addClass("vjs-ended"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")},e.handleTechDurationChange_=function(){this.duration(this.techGet_("duration"))},e.handleTechClick_=function(e){H(e)&&this.controls_&&(this.paused()?Tt(this.play()):this.pause())},e.handleTechDoubleClick_=function(t){this.controls_&&(Array.prototype.some.call(this.$$(".vjs-control-bar, .vjs-modal-dialog"),function(e){return e.contains(t.target)})||void 0!==this.options_&&void 0!==this.options_.userActions&&void 0!==this.options_.userActions.doubleClick&&!1===this.options_.userActions.doubleClick||(void 0!==this.options_&&void 0!==this.options_.userActions&&"function"==typeof this.options_.userActions.doubleClick?this.options_.userActions.doubleClick.call(this,t):this.isFullscreen()?this.exitFullscreen():this.requestFullscreen()))},e.handleTechTap_=function(){this.userActive(!this.userActive())},e.handleTechTouchStart_=function(){this.userWasActive=this.userActive()},e.handleTechTouchMove_=function(){this.userWasActive&&this.reportUserActivity()},e.handleTechTouchEnd_=function(e){e.preventDefault()},e.handleStageClick_=function(){this.reportUserActivity()},e.toggleFullscreenClass_=function(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")},e.documentFullscreenChange_=function(e){var t=e.target.player;if(!t||t===this){var i=this.el(),n=h[this.fsApi_.fullscreenElement]===i;!n&&i.matches?n=i.matches(":"+this.fsApi_.fullscreen):!n&&i.msMatchesSelector&&(n=i.msMatchesSelector(":"+this.fsApi_.fullscreen)),this.isFullscreen(n)}},e.handleTechFullscreenChange_=function(e,t){t&&(t.nativeIOSFullscreen&&this.toggleClass("vjs-ios-native-fs"),this.isFullscreen(t.isFullscreen))},e.handleTechFullscreenError_=function(e,t){this.trigger("fullscreenerror",t)},e.togglePictureInPictureClass_=function(){this.isInPictureInPicture()?this.addClass("vjs-picture-in-picture"):this.removeClass("vjs-picture-in-picture")},e.handleTechEnterPictureInPicture_=function(){this.isInPictureInPicture(!0)},e.handleTechLeavePictureInPicture_=function(){this.isInPictureInPicture(!1)},e.handleTechError_=function(){var e=this.tech_.error();this.error(e)},e.handleTechTextData_=function(e,t){var i=null;1<arguments.length&&(i=t),this.trigger("textdata",i)},e.getCache=function(){return this.cache_},e.resetCache_=function(){this.cache_={currentTime:0,initTime:0,inactivityTimeout:this.options_.inactivityTimeout,duration:NaN,lastVolume:1,lastPlaybackRate:this.defaultPlaybackRate(),media:null,src:"",source:{},sources:[],volume:1}},e.techCall_=function(r,a){this.ready(function(){if(r in Xi)return e=this.middleware_,t=this.tech_,n=a,t[i=r](e.reduce($i(i),n));if(r in Zi)return Wi(this.middleware_,this.tech_,r,a);var e,t,i,n;try{this.tech_&&this.tech_[r](a)}catch(e){throw d(e),e}},!0)},e.techGet_=function(t){if(this.tech_&&this.tech_.isReady_){if(t in qi)return e=this.middleware_,i=this.tech_,n=t,e.reduceRight($i(n),i[n]());if(t in Zi)return Wi(this.middleware_,this.tech_,t);var e,i,n;try{return this.tech_[t]()}catch(e){if(void 0===this.tech_[t])throw d("Video.js: "+t+" method not defined for "+this.techName_+" playback technology.",e),e;if("TypeError"===e.name)throw d("Video.js: "+t+" unavailable on "+this.techName_+" playback technology element.",e),this.tech_.isReady_=!1,e;throw d(e),e}}},e.play=function(){var t=this,e=this.options_.Promise||y.Promise;return e?new e(function(e){t.play_(e)}):this.play_()},e.play_=function(e){var t=this;void 0===e&&(e=Tt),this.playCallbacks_.push(e);var i=Boolean(!this.changingSrc_&&(this.src()||this.currentSrc()));if(this.waitToPlay_&&(this.off(["ready","loadstart"],this.waitToPlay_),this.waitToPlay_=null),!this.isReady_||!i)return this.waitToPlay_=function(e){t.play_()},this.one(["ready","loadstart"],this.waitToPlay_),void(i||!ot&&!st||this.load());var n=this.techGet_("play");null===n?this.runPlayTerminatedQueue_():this.runPlayCallbacks_(n)},e.runPlayTerminatedQueue_=function(){var e=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[],e.forEach(function(e){e()})},e.runPlayCallbacks_=function(t){var e=this.playCallbacks_.slice(0);this.playCallbacks_=[],this.playTerminatedQueue_=[],e.forEach(function(e){e(t)})},e.pause=function(){this.techCall_("pause")},e.paused=function(){return!1!==this.techGet_("paused")},e.played=function(){return this.techGet_("played")||ht(0,0)},e.scrubbing=function(e){if(void 0===e)return this.scrubbing_;this.scrubbing_=!!e,e?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing")},e.currentTime=function(e){return void 0!==e?(e<0&&(e=0),this.isReady_&&!this.changingSrc_&&this.tech_&&this.tech_.isReady_?(this.techCall_("setCurrentTime",e),void(this.cache_.initTime=0)):(this.cache_.initTime=e,this.off("canplay",this.applyInitTime_),void this.one("canplay",this.applyInitTime_))):(this.cache_.currentTime=this.techGet_("currentTime")||0,this.cache_.currentTime)},e.applyInitTime_=function(){this.currentTime(this.cache_.initTime)},e.duration=function(e){if(void 0===e)return void 0!==this.cache_.duration?this.cache_.duration:NaN;(e=parseFloat(e))<0&&(e=1/0),e!==this.cache_.duration&&((this.cache_.duration=e)===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),isNaN(e)||this.trigger("durationchange"))},e.remainingTime=function(){return this.duration()-this.currentTime()},e.remainingTimeDisplay=function(){return Math.floor(this.duration())-Math.floor(this.currentTime())},e.buffered=function(){var e=this.techGet_("buffered");return e&&e.length||(e=ht(0,0)),e},e.bufferedPercent=function(){return dt(this.buffered(),this.duration())},e.bufferedEnd=function(){var e=this.buffered(),t=this.duration(),i=e.end(e.length-1);return t<i&&(i=t),i},e.volume=function(e){var t;return void 0!==e?(t=Math.max(0,Math.min(1,parseFloat(e))),this.cache_.volume=t,this.techCall_("setVolume",t),void(0<t&&this.lastVolume_(t))):(t=parseFloat(this.techGet_("volume")),isNaN(t)?1:t)},e.muted=function(e){if(void 0===e)return this.techGet_("muted")||!1;this.techCall_("setMuted",e)},e.defaultMuted=function(e){return void 0!==e?this.techCall_("setDefaultMuted",e):this.techGet_("defaultMuted")||!1},e.lastVolume_=function(e){if(void 0===e||0===e)return this.cache_.lastVolume;this.cache_.lastVolume=e},e.supportsFullScreen=function(){return this.techGet_("supportsFullScreen")||!1},e.isFullscreen=function(e){if(void 0===e)return this.isFullscreen_;var t=this.isFullscreen_;return this.isFullscreen_=Boolean(e),this.isFullscreen_!==t&&this.fsApi_.prefixed&&this.trigger("fullscreenchange"),void this.toggleFullscreenClass_()},e.requestFullscreen=function(s){var e=this.options_.Promise||y.Promise;if(e){var o=this;return new e(function(e,i){function n(){o.off("fullscreenerror",r),o.off("fullscreenchange",t)}function t(){n(),e()}function r(e,t){n(),i(t)}o.one("fullscreenchange",t),o.one("fullscreenerror",r);var a=o.requestFullscreenHelper_(s);if(a)return a.then(n,n),a})}return this.requestFullscreenHelper_()},e.requestFullscreenHelper_=function(e){var t,i=this;if(this.fsApi_.prefixed||(t=this.options_.fullscreen&&this.options_.fullscreen.options||{},void 0!==e&&(t=e)),this.fsApi_.requestFullscreen){var n=this.el_[this.fsApi_.requestFullscreen](t);return n&&n.then(function(){return i.isFullscreen(!0)},function(){return i.isFullscreen(!1)}),n}this.tech_.supportsFullScreen()?this.techCall_("enterFullScreen"):this.enterFullWindow()},e.exitFullscreen=function(){var e=this.options_.Promise||y.Promise;if(e){var s=this;return new e(function(e,i){function n(){s.off("fullscreenerror",r),s.off("fullscreenchange",t)}function t(){n(),e()}function r(e,t){n(),i(t)}s.one("fullscreenchange",t),s.one("fullscreenerror",r);var a=s.exitFullscreenHelper_();if(a)return a.then(n,n),a})}return this.exitFullscreenHelper_()},e.exitFullscreenHelper_=function(){var e=this;if(this.fsApi_.requestFullscreen){var t=h[this.fsApi_.exitFullscreen]();return t&&t.then(function(){return e.isFullscreen(!1)}),t}this.tech_.supportsFullScreen()?this.techCall_("exitFullScreen"):this.exitFullWindow()},e.enterFullWindow=function(){this.isFullscreen(!0),this.isFullWindow=!0,this.docOrigOverflow=h.documentElement.style.overflow,ce(h,"ke
1ydown",this.boundFullWindowOnEscKey_),h.documentElement.style.overflow="hidden",x(h.body,"vjs-full-window"),this.trigger("enterFullWindow")},e.fullWindowOnEscKey=function(e){St.isEventKey(e,"Esc")&&(!0===this.isFullscreen()?this.exitFullscreen():this.exitFullWindow())},e.exitFullWindow=function(){this.isFullscreen(!1),this.isFullWindow=!1,he(h,"keydown",this.boundFullWindowOnEscKey_),h.documentElement.style.overflow=this.docOrigOverflow,E(h.body,"vjs-full-window"),this.trigger("exitFullWindow")},e.isInPictureInPicture=function(e){return void 0!==e?(this.isInPictureInPicture_=!!e,void this.togglePictureInPictureClass_()):!!this.isInPictureInPicture_},e.requestPictureInPicture=function(){if("pictureInPictureEnabled"in h)return this.techGet_("requestPictureInPicture")},e.exitPictureInPicture=function(){if("pictureInPictureEnabled"in h)return h.exitPictureInPicture()},e.handleKeyDown=function(e){var t=this.options_.userActions;if(t&&t.hotkeys){!function(e){var t=e.tagName.toLowerCase();if(e.isContentEditable)return!0;if("input"===t)return-1===["button","checkbox","hidden","radio","reset","submit"].indexOf(e.type);return-1!==["textarea"].indexOf(t)}(this.el_.ownerDocument.activeElement)&&("function"==typeof t.hotkeys?t.hotkeys.call(this,e):this.handleHotkeys(e))}},e.handleHotkeys=function(e){var t=this.options_.userActions?this.options_.userActions.hotkeys:{},i=t.fullscreenKey,n=void 0===i?function(e){return St.isEventKey(e,"f")}:i,r=t.muteKey,a=void 0===r?function(e){return St.isEventKey(e,"m")}:r,s=t.playPauseKey,o=void 0===s?function(e){return St.isEventKey(e,"k")||St.isEventKey(e,"Space")}:s;if(n.call(this,e)){e.preventDefault(),e.stopPropagation();var l=ke.getComponent("FullscreenToggle");!1!==h[this.fsApi_.fullscreenEnabled]&&l.prototype.handleClick.call(this,e)}else if(a.call(this,e)){e.preventDefault(),e.stopPropagation(),ke.getComponent("MuteToggle").prototype.handleClick.call(this,e)}else if(o.call(this,e)){e.preventDefault(),e.stopPropagation(),ke.getComponent("PlayToggle").prototype.handleClick.call(this,e)}},e.canPlayType=function(e){for(var t,i=0,n=this.options_.techOrder;i<n.length;i++){var r=n[i],a=Gi.getTech(r);if(a=a||ke.getComponent(r)){if(a.isSupported()&&(t=a.canPlayType(e)))return t}else d.error('The "'+r+'" tech is undefined. Skipped browser support check for that tech.')}return""},e.selectSource=function(e){function t(e,i,n){var r;return e.some(function(t){return i.some(function(e){if(r=n(t,e))return!0})}),r}function i(e,t){var i=e[0];if(e[1].canPlaySource(t,r.options_[i.toLowerCase()]))return{source:t,tech:i}}var n,r=this,a=this.options_.techOrder.map(function(e){return[e,Gi.getTech(e)]}).filter(function(e){var t=e[0],i=e[1];return i?i.isSupported():(d.error('The "'+t+'" tech is undefined. Skipped browser support check for that tech.'),!1)});return(this.options_.sourceOrder?t(e,a,(n=i,function(e,t){return n(t,e)})):t(a,e,i))||!1},e.src=function(e){var r=this;if(void 0===e)return this.cache_.src||"";var a=function t(e){if(Array.isArray(e)){var i=[];e.forEach(function(e){e=t(e),Array.isArray(e)?i=i.concat(e):o(e)&&i.push(e)}),e=i}else e="string"==typeof e&&e.trim()?[tn({src:e})]:o(e)&&"string"==typeof e.src&&e.src&&e.src.trim()?[tn(e)]:[];return e}(e);a.length?(this.changingSrc_=!0,this.cache_.sources=a,this.updateSourceCaches_(a[0]),Vi(this,a[0],function(e,t){var i,n;if(r.middleware_=t,r.cache_.sources=a,r.updateSourceCaches_(e),r.src_(e))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=t,n=r.tech_,i.forEach(function(e){return e.setTech&&e.setTech(n)})})):this.setTimeout(function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})},0)},e.src_=function(e){var t,i,n=this,r=this.selectSource([e]);return!r||(t=r.tech,i=this.techName_,Oe(t)!==Oe(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",e):this.techCall_("src",e.src),this.changingSrc_=!1},!0),!1)},e.load=function(){this.techCall_("load")},e.reset=function(){var e=this,t=this.options_.Promise||y.Promise;this.paused()||!t?this.doReset_():Tt(this.play().then(function(){return e.doReset_()}))},e.doReset_=function(){this.tech_&&this.tech_.clearTracks("text"),this.resetCache_(),this.poster(""),this.loadTech_(this.options_.techOrder[0],null),this.techCall_("reset"),this.resetControlBarUI_(),Se(this)&&this.trigger("playerreset")},e.resetControlBarUI_=function(){this.resetProgressBar_(),this.resetPlaybackRate_(),this.resetVolumeBar_()},e.resetProgressBar_=function(){this.currentTime(0);var e=this.controlBar,t=e.durationDisplay,i=e.remainingTimeDisplay;t&&t.updateContent(),i&&i.updateContent()},e.resetPlaybackRate_=function(){this.playbackRate(this.defaultPlaybackRate()),this.handleTechRateChange_()},e.resetVolumeBar_=function(){this.volume(1),this.trigger("volumechange")},e.currentSources=function(){var e=this.currentSource(),t=[];return 0!==Object.keys(e).length&&t.push(e),this.cache_.sources||t},e.currentSource=function(){return this.cache_.source||{}},e.currentSrc=function(){return this.currentSource()&&this.currentSource().src||""},e.currentType=function(){return this.currentSource()&&this.currentSource().type||""},e.preload=function(e){return void 0!==e?(this.techCall_("setPreload",e),void(this.options_.preload=e)):this.techGet_("preload")},e.autoplay=function(e){if(void 0===e)return this.options_.autoplay||!1;var t;"string"==typeof e&&/(any|play|muted)/.test(e)?(this.options_.autoplay=e,this.manualAutoplay_(e),t=!1):this.options_.autoplay=!!e,t=void 0===t?this.options_.autoplay:t,this.tech_&&this.techCall_("setAutoplay",t)},e.playsinline=function(e){return void 0!==e?(this.techCall_("setPlaysinline",e),this.options_.playsinline=e,this):this.techGet_("playsinline")},e.loop=function(e){return void 0!==e?(this.techCall_("setLoop",e),void(this.options_.loop=e)):this.techGet_("loop")},e.poster=function(e){if(void 0===e)return this.poster_;(e=e||"")!==this.poster_&&(this.poster_=e,this.techCall_("setPoster",e),this.isPosterFromTech_=!1,this.trigger("posterchange"))},e.handleTechPosterChange_=function(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){var e=this.tech_.poster()||"";e!==this.poster_&&(this.poster_=e,this.isPosterFromTech_=!0,this.trigger("posterchange"))}},e.controls=function(e){if(void 0===e)return!!this.controls_;e=!!e,this.controls_!==e&&(this.controls_=e,this.usingNativeControls()&&this.techCall_("setControls",e),this.controls_?(this.removeClass("vjs-controls-disabled"),this.addClass("vjs-controls-enabled"),this.trigger("controlsenabled"),this.usingNativeControls()||this.addTechControl
vendor: 17,702 bytes, line 1
1sListeners_()):(this.removeClass("vjs-controls-enabled"),this.addClass("vjs-controls-disabled"),this.trigger("controlsdisabled"),this.usingNativeControls()||this.removeTechControlsListeners_()))},e.usingNativeControls=function(e){if(void 0===e)return!!this.usingNativeControls_;e=!!e,this.usingNativeControls_!==e&&(this.usingNativeControls_=e,this.usingNativeControls_?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols")))},e.error=function(e){if(void 0===e)return this.error_||null;if(this.options_.suppressNotSupportedError&&e&&4===e.code){var t=function(){this.error(e)};return this.options_.suppressNotSupportedError=!1,this.any(["click","touchstart"],t),void this.one("loadstart",function(){this.off(["click","touchstart"],t)})}if(null===e)return this.error_=e,this.removeClass("vjs-error"),void(this.errorDisplay&&this.errorDisplay.close());this.error_=new _t(e),this.addClass("vjs-error"),d.error("(CODE:"+this.error_.code+" "+_t.errorTypes[this.error_.code]+")",this.error_.message,this.error_),this.trigger("error")},e.reportUserActivity=function(){this.userActivity_=!0},e.userActive=function(e){if(void 0===e)return this.userActive_;if((e=!!e)!==this.userActive_){if(this.userActive_=e,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(e){e.stopPropagation(),e.preventDefault()}),this.userActivity_=!1,this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive")}},e.listenForUserActivity_=function(){function e(){r(),this.clearInterval(t)}var t,i,n,r=ge(this,this.reportUserActivity);this.on("mousedown",function(){r(),this.clearInterval(t),t=this.setInterval(r,250)}),this.on("mousemove",function(e){e.screenX===i&&e.screenY===n||(i=e.screenX,n=e.screenY,r())}),this.on("mouseup",e),this.on("mouseleave",e);var a,s=this.getChild("controlBar");!s||st||We||(s.on("mouseenter",function(e){this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout,this.player().options_.inactivityTimeout=0}),s.on("mouseleave",function(e){this.player().options_.inactivityTimeout=this.player().cache_.inactivityTimeout})),this.on("keydown",r),this.on("keyup",r),this.setInterval(function(){if(this.userActivity_){this.userActivity_=!1,this.userActive(!0),this.clearTimeout(a);var e=this.options_.inactivityTimeout;e<=0||(a=this.setTimeout(function(){this.userActivity_||this.userActive(!1)},e))}},250)},e.playbackRate=function(e){if(void 0===e)return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_("playbackRate"):1;this.techCall_("setPlaybackRate",e)},e.defaultPlaybackRate=function(e){return void 0!==e?this.techCall_("setDefaultPlaybackRate",e):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1},e.isAudio=function(e){if(void 0===e)return!!this.isAudio_;this.isAudio_=!!e},e.addTextTrack=function(e,t,i){if(this.tech_)return this.tech_.addTextTrack(e,t,i)},e.addRemoteTextTrack=function(e,t){if(this.tech_)return this.tech_.addRemoteTextTrack(e,t)},e.removeRemoteTextTrack=function(e){void 0===e&&(e={});var t=e.track;if(t=t||e,this.tech_)return this.tech_.removeRemoteTextTrack(t)},e.getVideoPlaybackQuality=function(){return this.techGet_("getVideoPlaybackQuality")},e.videoWidth=function(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0},e.videoHeight=function(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0},e.language=function(e){if(void 0===e)return this.language_;this.language_=String(e).toLowerCase()},e.languages=function(){return je(u.prototype.options_.languages,this.languages_)},e.toJSON=function(){var e=je(this.options_),t=e.tracks;e.tracks=[];for(var i=0;i<t.length;i++){var n=t[i];(n=je(n)).player=void 0,e.tracks[i]=n}return e},e.createModal=function(e,t){var i=this;(t=t||{}).content=e||"";var n=new Nt(this,t);return this.addChild(n),n.on("dispose",function(){i.removeChild(n)}),n.open(),n},e.updateCurrentBreakpoint_=function(){if(this.responsive())for(var e=this.currentBreakpoint(),t=this.currentWidth(),i=0;i<Br.length;i++){var n=Br[i];if(t<=this.breakpoints_[n]){if(e===n)return;e&&this.removeClass(Fr[e]),this.addClass(Fr[n]),this.breakpoint_=n;break}}},e.removeCurrentBreakpoint_=function(){var e=this.currentBreakpointClass();this.breakpoint_="",e&&this.removeClass(e)},e.breakpoints=function(e){return void 0===e||(this.breakpoint_="",this.breakpoints_=f({},Gr,e),this.updateCurrentBreakpoint_()),f(this.breakpoints_)},e.responsive=function(e){return void 0===e?this.responsive_:(e=Boolean(e))!==this.responsive_?((this.responsive_=e)?(this.on("playerresize",this.updateCurrentBreakpoint_),this.updateCurrentBreakpoint_()):(this.off("playerresize",this.updateCurrentBreakpoint_),this.removeCurrentBreakpoint_()),e):void 0},e.currentBreakpoint=function(){return this.breakpoint_},e.currentBreakpointClass=function(){return Fr[this.breakpoint_]||""},e.loadMedia=function(e,t){var i=this;if(e&&"object"==typeof e){this.reset(),this.cache_.media=je(e);var n=this.cache_.media,r=n.artwork,a=n.poster,s=n.src,o=n.textTracks;!r&&a&&(this.cache_.media.artwork=[{src:a,type:Ji(a)}]),s&&this.src(s),a&&this.poster(a),Array.isArray(o)&&o.forEach(function(e){return i.addRemoteTextTrack(e,!1)}),this.ready(t)}},e.getMedia=function(){if(this.cache_.media)return je(this.cache_.media);var e=this.poster(),t={src:this.currentSources(),textTracks:Array.prototype.map.call(this.remoteTextTracks(),function(e){return{kind:e.kind,label:e.label,language:e.language,src:e.src}})};return e&&(t.poster=e,t.artwork=[{src:t.poster,type:Ji(t.poster)}]),t},u.getTagSettings=function(e){var t={sources:[],tracks:[]},i=N(e),n=i["data-setup"];if(A(e,"vjs-fill")&&(i.fill=!0),A(e,"vjs-fluid")&&(i.fluid=!0),null!==n){var r=wt(n||"{}"),a=r[0],s=r[1];a&&d.error(a),f(i,s)}if(f(t,i),e.hasChildNodes())for(var o=e.childNodes,l=0,u=o.length;l<u;l++){var c=o[l],h=c.nodeName.toLowerCase();"source"===h?t.sources.push(N(c)):"track"===h&&t.tracks.push(N(c))}return t},e.flexNotSupported_=function(){var e=h.createElement("i");return!("flexBasis"in e.style||"webkitFlexBasis"in e.style||"mozFlexBasis"in e.style||"msFlexBasis"in e.style||"msFlexOrder"in e.style)},u}(ke);hi.names.forEach(function(e){var t=hi[e];Hr.prototype[t.getterName]=function(){return this.tech_?this.tech_[t.getterName]():(this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName])}}),Hr.prototype.crossorigin=Hr.prototype.crossOrigin,Hr.players={};var Yr=y.navigator;Hr.prototype.options_={techOrder:Gi.defaultTechOrder_,html5:{},flash:{},inactivityTimeout:2e3,playbackRates:[],liveui:!1,children:["mediaLoader","posterImage","textTrackDisplay","loadingSpinner","bigPlayButton","liveTracker","controlBar","errorDisplay","textTrackSettings","resizeManager"],language:Yr&&(Yr.languages&&Yr.languages[0]||Yr.userLanguage||Yr.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media.",fullscreen:{options:{navigationUI:"hide"}},breakpoints:{},responsive:!1},["ended","seeking","seekable","networkState","readyState"].forEach(function(e){Hr.prototype[e]=function(){return this.techGet_(e)}}),zr.forEach(function(e){Hr.prototype["handleTech"+Oe(e)+"_"]=function(){return this.trigger(e)}}),ke.registerComponent("Player",Hr);var Qr=t(function(i){function n(e,t){return i.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(e,t)}i.exports=n});function Vr(e){return ia.hasOwnProperty(e)}function Wr(e){return Vr(e)?ia[e]:void 0}function qr(e,t){e[ta]=e[ta]||{},e[ta][t]=!0}function Xr(e,t,i){var n=(i?"before":"")+"pluginsetup";e.trigger(n,t),e.trigger(n+":"+t.name,t)}function Zr(t,i){function n(){Xr(this,{name:t,plugin:i,instance:null},!0);var e=i.apply(this,arguments);return qr(this,t),Xr(this,{name:t,plugin:i,instance:e}),e}return Object.keys(i).forEach(function(e){n[e]=i[e]}),n}function $r(r,a){return a.prototype.name=r,function(){Xr(this,{name:r,plugin:a,instance:null},!0);for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];var n=Jr(a,[this].concat(t));return this[r]=function(){return n},Xr(this,n.getEventHash()),n}}var Kr=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(e){return!1}},Jr=t(function(n){function r(e,t,i){return Kr()?n.exports=r=Reflect.construct:n.exports=r=function(e,t,i){var n=[null];n.push.apply(n,t);var r=new(Function.bind.apply(e,n));return i&&Qr(r,i.prototype),r},r.apply(null,arguments)}n.exports=r}),ea="plugin",ta="activePlugins_",ia={},na=function(){function i(e){if(this.constructor===i)throw new Error("Plugin must be sub-classed; not directly instantiated.");this.player=e,Ne(this),delete this.trigger,Le(this,this.constructor.defaultState),qr(e,this.name),this.dispose=ge(this,this.dispose),e.on("dispose",this.dispose)}var e=i.prototype;return e.version=function(){return this.constructor.VERSION},e.getEventHash=function(e){return void 0===e&&(e={}),e.name=this.name,e.plugin=this.constructor,e.instance=this,e},e.trigger=function(e,t){return void 0===t&&(t={}),de(this.eventBusEl_,e,this.getEventHash(t))},e.handleStateChanged=function(){},e.dispose=function(){var e=this.name,t=this.player;this.trigger("dispose"),this.off(),t.off("dispose",this.dispose),t[ta][e]=!1,this.player=this.state=null,t[e]=$r(e,ia[e])},i.isBasic=function(e){var t="string"==typeof e?Wr(e):e;return"function"==typeof t&&!i.prototype.isPrototypeOf(t.prototype)},i.registerPlugin=function(e,t){if("string"!=typeof e)throw new Error('Illegal plugin name, "'+e+'", must be a string, was '+typeof e+".");if(Vr(e))d.warn('A plugin named "'+e+'" already exists. You may want to avoid re-registering plugins!');else if(Hr.prototype.hasOwnProperty(e))throw new Error('Illegal plugin name, "'+e+'", cannot share a name with an existing player method!');if("function"!=typeof t)throw new Error('Illegal plugin for "'+e+'", must be a function, was '+typeof t+".");return ia[e]=t,e!==ea&&(i.isBasic(t)?Hr.prototype[e]=Zr(e,t):Hr.prototype[e]=$r(e,t)),t},i.deregisterPlugin=function(e){if(e===ea)throw new Error("Cannot de-register base plugin.");Vr(e)&&(delete ia[e],delete Hr.prototype[e])},i.getPlugins=function(e){var i;return void 0===e&&(e=Object.keys(ia)),e.forEach(function(e){var t=Wr(e);t&&((i=i||{})[e]=t)}),i},i.getPluginVersion=function(e){var t=Wr(e);return t&&t.VERSION||""},i}();na.getPlugin=Wr,na.BASE_PLUGIN_NAME=ea,na.registerPlugin(ea,na),Hr.prototype.usingPlugin=function(e){return!!this[ta]&&!0===this[ta][e]},Hr.prototype.hasPlugin=function(e){return!!Vr(e)};var ra=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Qr(e,t)},aa=function(e){return 0===e.indexOf("#")?e.slice(1):e};function sa(e,i,t){var n=sa.getPlayer(e);if(n)return i&&d.warn('Player "'+e+'" is already initialised. Options will not be applied.'),t&&n.ready(t),n;var r="string"==typeof e?Q("#"+aa(e)):e;if(!v(r))throw new TypeError("The element or ID supplied is not valid. (videojs)");r.ownerDocument.defaultView&&r.ownerDocument.body.contains(r)||d.warn("The element supplied is not included in the DOM"),i=i||{},sa.hooks("beforesetup").forEach(function(e){var t=e(r,je(i));o(t)&&!Array.isArray(t)?i=je(i,t):d.error("please return an object in beforesetup hooks")});var a=ke.getComponent("Player");return n=new a(r,i,t),sa.hooks("setup").forEach(function(e){return e(n)}),n}if(sa.hooks_={},sa.hooks=function(e,t){return sa.hooks_[e]=sa.hooks_[e]||[],t&&(sa.hooks_[e]=sa.hooks_[e].concat(t)),sa.hooks_[e]},sa.hook=function(e,t){sa.hooks(e,t)},sa.hookOnce=function(i,e){sa.hooks(i,[].concat(e).map(function(t){return function e(){return sa.removeHook(i,e),t.apply(void 0,arguments)}}))},sa.removeHook=function(e,t){var i=sa.hooks(e).indexOf(t);return!(i<=-1)&&(sa.hooks_[e]=sa.hooks_[e].slice(),sa.hooks_[e].splice(i,1),!0)},!0!==y.VIDEOJS_NO_DYNAMIC_STYLE&&m()){var oa=Q(".vjs-styles-defaults");if(!oa){oa=K("vjs-styles-defaults");var la=Q("head");la&&la.insertBefore(oa,la.firstChild),J(oa,"\n .video-js {\n width: 300px;\n height: 150px;\n }\n\n .vjs-fluid {\n padding-top: 56.25%\n }\n ")}}Z(1,sa),sa.VERSION="7.8.4",sa.options=Hr.prototype.options_,sa.getPlayers=function(){return Hr.players},sa.getPlayer=function(e){var t,i=Hr.players;if("string"==typeof e){var n=aa(e),r=i[n];if(r)return r;t=Q("#"+n)}else t=e;if(v(t)){var a=t.player,s=t.playerId;if(a||i[s])return a||i[s]}},sa.getAllPlayers=function(){return Object.keys(Hr.players).map(function(e){return Hr.players[e]}).filter(Boolean)},sa.players=Hr.players,sa.getComponent=ke.getComponent,sa.registerComponent=function(e,t){Gi.isTech(t)&&d.warn("The "+e+" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)"),ke.registerComponent.call(ke,e,t)},sa.getTech=Gi.getTech,sa.registerTech=Gi.registerTech,sa.use=function(e,t){Hi[e]=Hi[e]||[],Hi[e].push(t)},Object.defineProperty(sa,"middleware",{value:{},writeable:!1,enumerable:!0}),Object.defineProperty(sa.middleware,"TERMINATOR",{value:Qi,writeable:!1,enumerable:!0}),sa.browser=lt,sa.TOUCH_ENABLED=nt,sa.extend=function(e,t){void 0===t&&(t={});var i=function(){e.apply(this,arguments)},n={};for(var r in"object"==typeof t?(t.constructor!==Object.prototype.constructor&&(i=t.constructor),n=t):"function"==typeof t&&(i=t),ra(i,e),e&&(i.super_=e),n)n.hasOwnProperty(r)&&(i.prototype[r]=n[r]);return i},sa.mergeOptions=je,sa.bind=ge,sa.registerPlugin=na.registerPlugin,sa.deregisterPlugin=na.deregisterPlugin,sa.plugin=function(e,t){return d.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),na.registerPlugin(e,t)},sa.getPlugins=na.getPlugins,sa.getPlugin=na.getPlugin,sa.getPluginVersion=na.getPluginVersion,sa.addLanguage=function(e,t){var i;return e=(""+e).toLowerCase(),sa.options.languages=je(sa.options.languages,((i={})[e]=t,i)),sa.options.languages[e]},sa.log=d,sa.createLogger=p,sa.createTimeRange=sa.createTimeRanges=ht,sa.formatTime=vn,sa.setFormatTime=function(e){mn=e},sa.resetFormatTime=function(){mn=gn},sa.parseUrl=jt,sa.isCrossOrigin=Rt,sa.EventTarget=ye,sa.on=ce,sa.one=pe,sa.off=he,sa.trigger=de,sa.xhr=Kt,sa.TextTrack=ai,sa.AudioTrack=si,sa.VideoTrack=oi,["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach(function(e){sa[e]=function(){return d.warn("videojs."+e+"() is deprecated; use videojs.dom."+e+"() instead"),W[e].apply(null,arguments)}}),sa.computedStyle=n,sa.dom=W,sa.url=qt,sa.defineLazyProperty=Or;var ua=t(function(e,t){var i,c,n,r,h;i=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/\?#]*\/)*.*?)??(;.*?)?(\?.*?)?(#.*?)?$/,c=/^([^\/?#]*)(.*)$/,n=/(?:\/|^)\.(?=\/)/g,r=/(?:\/|^)\.\.\/(?!\.\.\/).*?(?=\/)/g,h={buildAbsoluteURL:function(e,t,i){if(i=i||{},e=e.trim(),!(t=t.trim())){if(!i.alwaysNormalize)return e;var n=h.parseURL(e);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(t);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)):t;var a=h.parseURL(e);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 l=a.path,u=l.substring(0,l.lastIndexOf("/")+1)+r.path;o.path=h.normalizePath(u)}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(e){var t=i.exec(e);return t?{scheme:t[1]||"",netLoc:t[2]||"",path:t[3]||"",params:t[4]||"",query:t[5]||"",fragment:t[6]||""}:null},normalizePath:function(e){for(e=e.split("").reverse().join("").replace(n,"");e.length!==(e=e.replace(r,"")).length;);return e.split("").reverse().join("")},buildURLFromParts:function(e){return e.scheme+e.netLoc+e.path+e.params+e.query+e.fragment}},e.exports=h});function ca(){return(ca=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e}).apply(this,arguments)}function ha(e,t){e.prototype=Object.create(t.prototype),(e.prototype.constructor=e).__proto__=t}function da(e){for(var t,i=e.split(new RegExp('(?:^|,)((?:[^=]*)=(?:"[^"]*"|[^,]*))')),n={},r=i.length;r--;)""!==i[r]&&((t=/([^=]*)=(.*)/.exec(i[r]).slice(1))[0]=t[0].replace(/^\s+|\s+$/g,""),t[1]=t[1].replace(/^\s+|\s+$/g,""),t[1]=t[1].replace(/^['"](.*)['"]$/g,"$1"),n[t[0]]=t[1]);return n}var pa=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;var i=this.listeners[e].indexOf(t);return this.listeners[e].splice(i,1),-1<i},t.trigger=function(e,t){var i,n,r,a=this.listeners[e];if(a)if(2===arguments.length)for(n=a.length,i=0;i<n;++i)a[i].call(this,t);
vendor: 16,384 bytes, line 1
1else for(r=Array.prototype.slice.call(arguments,1),n=a.length,i=0;i<n;++i)a[i].apply(this,r)},t.dispose=function(){this.listeners={}},t.pipe=function(t){this.on("data",function(e){t.push(e)})},e}(),fa=function(t){function e(){var e;return(e=t.call(this)||this).buffer="",e}return ha(e,t),e.prototype.push=function(e){var t;for(this.buffer+=e,t=this.buffer.indexOf("\n");-1<t;t=this.buffer.indexOf("\n"))this.trigger("data",this.buffer.substring(0,t)),this.buffer=this.buffer.substring(t+1)},e}(pa),ga=function(t){function e(){var e;return(e=t.call(this)||this).customParsers=[],e.tagMappers=[],e}ha(e,t);var i=e.prototype;return i.push=function(n){var l,u,c=this;0!==(n=n.trim()).length&&("#"===n[0]?this.tagMappers.reduce(function(e,t){var i=t(n);return i===n?e:e.concat([i])},[n]).forEach(function(e){for(var t=0;t<c.customParsers.length;t++)if(c.customParsers[t].call(c,e))return;if(0===e.indexOf("#EXT"))if(e=e.replace("\r",""),l=/^#EXTM3U/.exec(e))c.trigger("data",{type:"tag",tagType:"m3u"});else{if(l=/^#EXTINF:?([0-9\.]*)?,?(.*)?$/.exec(e))return u={type:"tag",tagType:"inf"},l[1]&&(u.duration=parseFloat(l[1])),l[2]&&(u.title=l[2]),void c.trigger("data",u);if(l=/^#EXT-X-TARGETDURATION:?([0-9.]*)?/.exec(e))return u={type:"tag",tagType:"targetduration"},l[1]&&(u.duration=parseInt(l[1],10)),void c.trigger("data",u);if(l=/^#ZEN-TOTAL-DURATION:?([0-9.]*)?/.exec(e))return u={type:"tag",tagType:"totalduration"},l[1]&&(u.duration=parseInt(l[1],10)),void c.trigger("data",u);if(l=/^#EXT-X-VERSION:?([0-9.]*)?/.exec(e))return u={type:"tag",tagType:"version"},l[1]&&(u.version=parseInt(l[1],10)),void c.trigger("data",u);if(l=/^#EXT-X-MEDIA-SEQUENCE:?(\-?[0-9.]*)?/.exec(e))return u={type:"tag",tagType:"media-sequence"},l[1]&&(u.number=parseInt(l[1],10)),void c.trigger("data",u);if(l=/^#EXT-X-DISCONTINUITY-SEQUENCE:?(\-?[0-9.]*)?/.exec(e))return u={type:"tag",tagType:"discontinuity-sequence"},l[1]&&(u.number=parseInt(l[1],10)),void c.trigger("data",u);if(l=/^#EXT-X-PLAYLIST-TYPE:?(.*)?$/.exec(e))return u={type:"tag",tagType:"playlist-type"},l[1]&&(u.playlistType=l[1]),void c.trigger("data",u);if(l=/^#EXT-X-BYTERANGE:?([0-9.]*)?@?([0-9.]*)?/.exec(e))return u={type:"tag",tagType:"byterange"},l[1]&&(u.length=parseInt(l[1],10)),l[2]&&(u.offset=parseInt(l[2],10)),void c.trigger("data",u);if(l=/^#EXT-X-ALLOW-CACHE:?(YES|NO)?/.exec(e))return u={type:"tag",tagType:"allow-cache"},l[1]&&(u.allowed=!/NO/.test(l[1])),void c.trigger("data",u);if(l=/^#EXT-X-MAP:?(.*)$/.exec(e)){if(u={type:"tag",tagType:"map"},l[1]){var i=da(l[1]);if(i.URI&&(u.uri=i.URI),i.BYTERANGE){var n=i.BYTERANGE.split("@"),r=n[0],a=n[1];u.byterange={},r&&(u.byterange.length=parseInt(r,10)),a&&(u.byterange.offset=parseInt(a,10))}}c.trigger("data",u)}else if(l=/^#EXT-X-STREAM-INF:?(.*)$/.exec(e)){if(u={type:"tag",tagType:"stream-inf"},l[1]){if(u.attributes=da(l[1]),u.attributes.RESOLUTION){var s=u.attributes.RESOLUTION.split("x"),o={};s[0]&&(o.width=parseInt(s[0],10)),s[1]&&(o.height=parseInt(s[1],10)),u.attributes.RESOLUTION=o}u.attributes.BANDWIDTH&&(u.attributes.BANDWIDTH=parseInt(u.attributes.BANDWIDTH,10)),u.attributes["PROGRAM-ID"]&&(u.attributes["PROGRAM-ID"]=parseInt(u.attributes["PROGRAM-ID"],10))}c.trigger("data",u)}else{if(l=/^#EXT-X-MEDIA:?(.*)$/.exec(e))return u={type:"tag",tagType:"media"},l[1]&&(u.attributes=da(l[1])),void c.trigger("data",u);if(l=/^#EXT-X-ENDLIST/.exec(e))c.trigger("data",{type:"tag",tagType:"endlist"});else if(l=/^#EXT-X-DISCONTINUITY/.exec(e))c.trigger("data",{type:"tag",tagType:"discontinuity"});else{if(l=/^#EXT-X-PROGRAM-DATE-TIME:?(.*)$/.exec(e))return u={type:"tag",tagType:"program-date-time"},l[1]&&(u.dateTimeString=l[1],u.dateTimeObject=new Date(l[1])),void c.trigger("data",u);if(l=/^#EXT-X-KEY:?(.*)$/.exec(e))return u={type:"tag",tagType:"key"},l[1]&&(u.attributes=da(l[1]),u.attributes.IV&&("0x"===u.attributes.IV.substring(0,2).toLowerCase()&&(u.attributes.IV=u.attributes.IV.substring(2)),u.attributes.IV=u.attributes.IV.match(/.{8}/g),u.attributes.IV[0]=parseInt(u.attributes.IV[0],16),u.attributes.IV[1]=parseInt(u.attributes.IV[1],16),u.attributes.IV[2]=parseInt(u.attributes.IV[2],16),u.attributes.IV[3]=parseInt(u.attributes.IV[3],16),u.attributes.IV=new Uint32Array(u.attributes.IV))),void c.trigger("data",u);if(l=/^#EXT-X-START:?(.*)$/.exec(e))return u={type:"tag",tagType:"start"},l[1]&&(u.attributes=da(l[1]),u.attributes["TIME-OFFSET"]=parseFloat(u.attributes["TIME-OFFSET"]),u.attributes.PRECISE=/YES/.test(u.attributes.PRECISE)),void c.trigger("data",u);if(l=/^#EXT-X-CUE-OUT-CONT:?(.*)?$/.exec(e))return u={type:"tag",tagType:"cue-out-cont"},l[1]?u.data=l[1]:u.data="",void c.trigger("data",u);if(l=/^#EXT-X-CUE-OUT:?(.*)?$/.exec(e))return u={type:"tag",tagType:"cue-out"},l[1]?u.data=l[1]:u.data="",void c.trigger("data",u);if(l=/^#EXT-X-CUE-IN:?(.*)?$/.exec(e))return u={type:"tag",tagType:"cue-in"},l[1]?u.data=l[1]:u.data="",void c.trigger("data",u);c.trigger("data",{type:"tag",data:e.slice(4)})}}}else c.trigger("data",{type:"comment",text:e.slice(1)})}):this.trigger("data",{type:"uri",uri:n}))},i.addParser=function(e){var t=this,i=e.expression,n=e.customType,r=e.dataParser,a=e.segment;"function"!=typeof r&&(r=function(e){return e}),this.customParsers.push(function(e){if(i.exec(e))return t.trigger("data",{type:"custom",data:r(e),customType:n,segment:a}),!0})},i.addTagMapper=function(e){var t=e.expression,i=e.map;this.tagMappers.push(function(e){return t.test(e)?i(e):e})},e}(pa);var ma=function(t){function e(){var e;(e=t.call(this)||this).lineStream=new fa,e.parseStream=new ga,e.lineStream.pipe(e.parseStream);var r,a,s=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e),o=[],l={},u={AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},c=0;return e.manifest={allowCache:!0,discontinuityStarts:[],segments:[]},e.parseStream.on("data",function(t){var i,n;({tag:function(){({"allow-cache":function(){this.manifest.allowCache=t.allowed,"allowed"in t||(this.trigger("info",{message:"defaulting allowCache to YES"}),this.manifest.allowCache=!0)},byterange:function(){var e={};"length"in t&&((l.byterange=e).length=t.length,"offset"in t||(this.trigger("info",{message:"defaulting offset to zero"}),t.offset=0)),"offset"in t&&((l.byterange=e).offset=t.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<t.duration&&(l.duration=t.duration),0===t.duration&&(l.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"})),this.manifest.segments=o},key:function(){if(t.attributes)if("NONE"!==t.attributes.METHOD)if(t.attributes.URI){if("urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"===t.attributes.KEYFORMAT){return-1===["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"].indexOf(t.attributes.METHOD)?void this.trigger("warn",{message:"invalid key method provided for Widevine"}):("SAMPLE-AES-CENC"===t.attributes.METHOD&&this.trigger("warn",{message:"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead"}),"data:text/plain;base64,"!==t.attributes.URI.substring(0,23)?void this.trigger("warn",{message:"invalid key URI provided for Widevine"}):t.attributes.KEYID&&"0x"===t.attributes.KEYID.substring(0,2)?void(this.manifest.contentProtection={"com.widevine.alpha":{attributes:{schemeIdUri:t.attributes.KEYFORMAT,keyId:t.attributes.KEYID.substring(2)},pssh:function(e){for(var t=y.atob(e||""),i=new Uint8Array(t.length),n=0;n<t.length;n++)i[n]=t.charCodeAt(n);return i}(t.attributes.URI.split(",")[1])}}):void this.trigger("warn",{message:"invalid key ID provided for Widevine"}))}t.attributes.METHOD||this.trigger("warn",{message:"defaulting key method to AES-128"}),a={method:t.attributes.METHOD||"AES-128",uri:t.attributes.URI},void 0!==t.attributes.IV&&(a.iv=t.attributes.IV)}else this.trigger("warn",{message:"ignoring key declaration without URI"});else a=null;else this.trigger("warn",{message:"ignoring key declaration without attribute list"})},"media-sequence":function(){isFinite(t.number)?this.manifest.mediaSequence=t.number:this.trigger("warn",{message:"ignoring invalid media sequence: "+t.number})},"discontinuity-sequence":function(){isFinite(t.number)?(this.manifest.discontinuitySequence=t.number,c=t.number):this.trigger("warn",{message:"ignoring invalid discontinuity sequence: "+t.number})},"playlist-type":function(){/VOD|EVENT/.test(t.playlistType)?this.manifest.playlistType=t.playlistType:this.trigger("warn",{message:"ignoring unknown playlist type: "+t.playlist})},map:function(){r={},t.uri&&(r.uri=t.uri),t.byterange&&(r.byterange=t.byterange)},"stream-inf":function(){this.manifest.playlists=o,this.manifest.mediaGroups=this.manifest.mediaGroups||u,t.attributes?(l.attributes||(l.attributes={}),ca(l.attributes,t.attributes)):this.trigger("warn",{message:"ignoring empty stream-inf attributes"})},media:function(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||u,t.attributes&&t.attributes.TYPE&&t.attributes["GROUP-ID"]&&t.attributes.NAME){var e=this.manifest.mediaGroups[t.attributes.TYPE];e[t.attributes["GROUP-ID"]]=e[t.attributes["GROUP-ID"]]||{},i=e[t.attributes["GROUP-ID"]],(n={default:/yes/i.test(t.attributes.DEFAULT)}).default?n.autoselect=!0:n.autoselect=/yes/i.test(t.attributes.AUTOSELECT),t.attributes.LANGUAGE&&(n.language=t.attributes.LANGUAGE),t.attributes.URI&&(n.uri=t.attributes.URI),t.attributes["INSTREAM-ID"]&&(n.instreamId=t.attributes["INSTREAM-ID"]),t.attributes.CHARACTERISTICS&&(n.characteristics=t.attributes.CHARACTERISTICS),t.attributes.FORCED&&(n.forced=/yes/i.test(t.attributes.FORCED)),i[t.attributes.NAME]=n}else this.trigger("warn",{message:"ignoring incomplete or missing media group"})},discontinuity:function(){c+=1,l.discontinuity=!0,this.manifest.discontinuityStarts.push(o.length)},"program-date-time":function(){void 0===this.manifest.dateTimeString&&(this.manifest.dateTimeString=t.dateTimeString,this.manifest.dateTimeObject=t.dateTimeObject),l.dateTimeString=t.dateTimeString,l.dateTimeObject=t.dateTimeObject},targetduration:function(){!isFinite(t.duration)||t.duration<0?this.trigger("warn",{message:"ignoring invalid target duration: "+t.duration}):this.manifest.targetDuration=t.duration},totalduration:function(){!isFinite(t.duration)||t.duration<0?this.trigger("warn",{message:"ignoring invalid total duration: "+t.duration}):this.manifest.totalDuration=t.duration},start:function(){t.attributes&&!isNaN(t.attributes["TIME-OFFSET"])?this.manifest.start={timeOffset:t.attributes["TIME-OFFSET"],precise:t.attributes.PRECISE}:this.trigger("warn",{message:"ignoring start declaration without appropriate attribute list"})},"cue-out":function(){l.cueOut=t.data},"cue-out-cont":function(){l.cueOutCont=t.data},"cue-in":function(){l.cueIn=t.data}}[t.tagType]||function(){}).call(s)},uri:function(){l.uri=t.uri,o.push(l),!this.manifest.targetDuration||"duration"in l||(this.trigger("warn",{message:"defaulting segment duration to the target duration"}),l.duration=this.manifest.targetDuration),a&&(l.key=a),l.timeline=c,r&&(l.map=r),l={}},comment:function(){},custom:function(){t.segment?(l.custom=l.custom||{},l.custom[t.customType]=t.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[t.customType]=t.data)}})[t.type].call(s)}),e}ha(e,t);var i=e.prototype;return i.push=function(e){this.lineStream.push(e)},i.end=function(){this.lineStream.push("\n")},i.addParser=function(e){this.parseStream.addParser(e)},i.addTagMapper=function(e){this.parseStream.addTagMapper(e)},e}(pa);function va(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var ya=va(ua),_a=va(y),Ma=function(e,t){return/^[a-z]+:/i.test(t)?t:(/\/\//i.test(e)||(e=ya.buildAbsoluteURL(_a.location&&_a.location.href||"",e)),ya.buildAbsoluteURL(e,t))};var wa,ba=(wa=y)&&"object"==typeof wa&&"default"in wa?wa.default:wa;var Ta=function(e){for(var t,i=(t=e,ba.atob?ba.atob(t):Buffer.from(t,"base64").toString("binary")),n=new Uint8Array(i.length),r=0;r<i.length;r++)n[r]=i.charCodeAt(r);return n},Aa=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,xa=new RegExp("[\\-\\.0-9"+Aa.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),Ea=new RegExp("^"+Aa.source+xa.source+"*(?::"+Aa.source+xa.source+"*)?$"),Sa=0,Da=1,Na=2,Ca=3,La=4,Ia=5,Oa=6,ja=7;function ka(){}function Pa(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function Ra(e,t,i,n,r,a){for(var s,o=++t,l=Sa;;){var u=e.charAt(o);switch(u){case"=":if(l===Da)s=e.slice(t,o),l=Ca;else{if(l!==Na)throw new Error("attribute equal must after attrName");l=Ca}break;case"'":case'"':if(l===Ca||l===Da){if(l===Da&&(a.warning('attribute value must after "="'),s=e.slice(t,o)),t=o+1,!(0<(o=e.indexOf(u,t))))throw new Error("attribute value no end '"+u+"' match");c=e.slice(t,o).replace(/&#?\w+;/g,r),i.add(s,c,t-1),l=Ia}else{if(l!=La)throw new Error('attribute value must after "="');c=e.slice(t,o).replace(/&#?\w+;/g,r),i.add(s,c,t),a.warning('attribute "'+s+'" missed start quot('+u+")!!"),t=o+1,l=Ia}break;case"/":switch(l){case Sa:i.setTagName(e.slice(t,o));case Ia:case Oa:case ja:l=ja,i.closed=!0;case La:case Da:case Na:break;default:throw new Error("attribute invalid close char('/')")}break;case"":return a.error("unexpected end of input"),l==Sa&&i.setTagName(e.slice(t,o)),o;case">":switch(l){case Sa:i.setTagName(e.slice(t,o));case Ia:case Oa:case ja:break;case La:case Da:"/"===(c=e.slice(t,o)).slice(-1)&&(i.closed=!0,c=c.slice(0,-1));case Na:l===Na&&(c=s),l==La?(a.warning('attribute "'+c+'" missed quot(")!!'),i.add(s,c.replace(/&#?\w+;/g,r),t)):("http://www.w3.org/1999/xhtml"===n[""]&&c.match(/^(?:disabled|checked|selected)$/i)||a.warning('attribute "'+c+'" missed value!! "'+c+'" instead!!'),i.add(c,c,t));break;case Ca:throw new Error("attribute value missed!!")}return o;case"Â":u=" ";default:if(u<=" ")switch(l){case Sa:i.setTagName(e.slice(t,o)),l=Oa;break;case Da:s=e.slice(t,o),l=Na;break;case La:var c=e.slice(t,o).replace(/&#?\w+;/g,r);a.warning('attribute "'+c+'" missed quot(")!!'),i.add(s,c,t);case Ia:l=Oa}else switch(l){case Na:i.tagName;"http://www.w3.org/1999/xhtml"===n[""]&&s.match(/^(?:disabled|checked|selected)$/i)||a.warning('attribute "'+s+'" missed value!! "'+s+'" instead2!!'),i.add(s,s,t),t=o,l=Da;break;case Ia:a.warning('attribute space is required"'+s+'"!!');case Oa:l=Da,t=o;break;case Ca:l=La,t=o;break;case ja:throw new Error("elements closed character '/' and '>' must be connected to")}}o++}}function za(e,t,i){for(var n=e.tagName,r=null,a=e.length;a--;){var s=e[a],o=s.qName,l=s.value;if(0<(d=o.indexOf(":")))var u=s.prefix=o.slice(0,d),c=o.slice(d+1),h="xmlns"===u&&c;else u=null,h="xmlns"===(c=o)&&"";s.localName=c,!1!==h&&(null==r&&(r={},Fa(i,i={})),i[h]=r[h]=l,s.uri="http://www.w3.org/2000/xmlns/",t.startPrefixMapping(h,l))}for(a=e.length;a--;){(u=(s=e[a]).prefix)&&("xml"===u&&(s.uri="http://www.w3.org/XML/1998/namespace"),"xmlns"!==u&&(s.uri=i[u||""]))}var d;c=0<(d=n.indexOf(":"))?(u=e.prefix=n.slice(0,d),e.localName=n.slice(d+1)):(u=null,e.localName=n);var p=e.uri=i[u||""];if(t.startElement(p,c,n,e),!e.closed)return e.currentNSMap=i,e.localNSMap=r,1;if(t.endElement(p,c,n),r)for(u in r)t.endPrefixMapping(u)}function Ua(e,t,i,n,r){if(/^(?:script|textarea)$/i.test(i)){var a=e.indexOf("</"+i+">",t),s=e.substring(t+1,a);if(/[&<]/.test(s))return/^script$/i.test(i)||(s=s.replace(/&#?\w+;/g,n)),r.characters(s,0,s.length),a}return t+1}function Ba(e,t,i,n){var r=n[i];return null==r&&((r=e.lastIndexOf("</"+i+">"))<t&&(r=e.lastIndexOf("</"+i)),n[i]=r),r<t}function Fa(e,t){for(var i in e)t[i]=e[i]}function Ga(e,t,i,n){switch(e.charAt(t+2)){case"-":return"-"!==e.charAt(t+3)?-1:t<(r=e.indexOf("--\x3e",t+4))?(i.comment(e,t+4,r-t-4),r+3):(n.error("Unclosed comment"),-1);default:if("CDATA["==e.substr(t+3,6)){var r=e.indexOf("]]>",t+9);return i.startCDATA(),i.characters(e,t+9,r-t-9),i.endCDATA(),r+3}var a=function(e,t){var i,n=[],r=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;r.lastIndex=t,r.exec(e);for(;i=r.exec(e);)if(n.push(i),i[1])return n}(e,t),s=a.length;if(1<s&&/!doct
vendor: 14,826 bytes, line 1
1ype/i.test(a[0][0])){var o=a[1][0],l=3<s&&/^public$/i.test(a[2][0])&&a[3][0],u=4<s&&a[4][0],c=a[s-1];return i.startDTD(o,l&&l.replace(/^(['"])(.*?)\1$/,"$2"),u&&u.replace(/^(['"])(.*?)\1$/,"$2")),i.endDTD(),c.index+c[0].length}}return-1}function Ha(e,t,i){var n=e.indexOf("?>",t);if(n){var r=e.substring(t,n).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);if(r){r[0].length;return i.processingInstruction(r[1],r[2]),n+2}return-1}return-1}function Ya(e){}function Qa(e,t){return e.__proto__=t,e}ka.prototype={parse:function(e,t,i){var n=this.domBuilder;n.startDocument(),Fa(t,t={}),function(i,e,n,r,a){function s(e){var t=e.slice(1,-1);return t in n?n[t]:"#"===t.charAt(0)?function(e){if(65535<e){var t=55296+((e-=65536)>>10),i=56320+(1023&e);return String.fromCharCode(t,i)}return String.fromCharCode(e)}(parseInt(t.substr(1).replace("x","0x"))):(a.error("entity not found:"+e),e)}function t(e){if(f<e){var t=i.substring(f,e).replace(/&#?\w+;/g,s);h&&o(f),r.characters(t,0,e-f),f=e}}function o(e,t){for(;u<=e&&(t=c.exec(i));)l=t.index,u=l+t[0].length,h.lineNumber++;h.columnNumber=e-l+1}var l=0,u=0,c=/.*(?:\r\n?|\n)|.*$/g,h=r.locator,d=[{currentNSMap:e}],p={},f=0;for(;;){try{var g=i.indexOf("<",f);if(g<0){if(!i.substr(f).match(/^\s*$/)){var m=r.doc,v=m.createTextNode(i.substr(f));m.appendChild(v),r.currentElement=v}return}switch(f<g&&t(g),i.charAt(g+1)){case"/":var y=i.indexOf(">",g+3),_=i.substring(g+2,y),M=d.pop();y<0?(_=i.substring(g+2).replace(/[\s<].*/,""),a.error("end tag name: "+_+" is not complete:"+M.tagName),y=g+1+_.length):_.match(/\s</)&&(_=_.replace(/[\s<].*/,""),a.error("end tag name: "+_+" maybe not complete"),y=g+1+_.length);var w=M.localNSMap,b=M.tagName==_;if(b||M.tagName&&M.tagName.toLowerCase()==_.toLowerCase()){if(r.endElement(M.uri,M.localName,_),w)for(var T in w)r.endPrefixMapping(T);b||a.fatalError("end tag name: "+_+" is not match the current start tagName:"+M.tagName)}else d.push(M);y++;break;case"?":h&&o(g),y=Ha(i,g,r);break;case"!":h&&o(g),y=Ga(i,g,r,a);break;default:h&&o(g);var A=new Ya,x=d[d.length-1].currentNSMap,E=(y=Ra(i,g,A,x,s,a),A.length);if(!A.closed&&Ba(i,y,A.tagName,p)&&(A.closed=!0,n.nbsp||a.warning("unclosed xml attribute")),h&&E){for(var S=Pa(h,{}),D=0;D<E;D++){var N=A[D];o(N.offset),N.locator=Pa(h,{})}r.locator=S,za(A,r,x)&&d.push(A),r.locator=h}else za(A,r,x)&&d.push(A);"http://www.w3.org/1999/xhtml"!==A.uri||A.closed?y++:y=Ua(i,y,A.tagName,s,r)}}catch(e){a.error("element parse error: "+e),y=-1}f<y?f=y:t(Math.max(g,f)+1)}}(e,t,i,n,this.errorHandler),n.endDocument()}},Ya.prototype={setTagName:function(e){if(!Ea.test(e))throw new Error("invalid tagName:"+e);this.tagName=e},add:function(e,t,i){if(!Ea.test(e))throw new Error("invalid attribute:"+e);this[this.length++]={qName:e,value:t,offset:i}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}},Qa({},Qa.prototype)instanceof Qa||(Qa=function(e,t){function i(){}for(t in i.prototype=t,i=new i,e)i[t]=e[t];return i});var Va={XMLReader:ka};function Wa(e,t){for(var i in e)t[i]=e[i]}function qa(e,t){var i=e.prototype;if(Object.create){var n=Object.create(t.prototype);i.__proto__=n}if(!(i instanceof t)){var r=function(){};r.prototype=t.prototype,Wa(i,r=new r),e.prototype=i=r}i.constructor!=e&&("function"!=typeof e&&console.error("unknow Class:"+e),i.constructor=e)}var Xa="http://www.w3.org/1999/xhtml",Za={},$a=Za.ELEMENT_NODE=1,Ka=Za.ATTRIBUTE_NODE=2,Ja=Za.TEXT_NODE=3,es=Za.CDATA_SECTION_NODE=4,ts=Za.ENTITY_REFERENCE_NODE=5,is=Za.ENTITY_NODE=6,ns=Za.PROCESSING_INSTRUCTION_NODE=7,rs=Za.COMMENT_NODE=8,as=Za.DOCUMENT_NODE=9,ss=Za.DOCUMENT_TYPE_NODE=10,os=Za.DOCUMENT_FRAGMENT_NODE=11,ls=Za.NOTATION_NODE=12,us={},cs={},hs=(us.INDEX_SIZE_ERR=(cs[1]="Index size error",1),us.DOMSTRING_SIZE_ERR=(cs[2]="DOMString size error",2),us.HIERARCHY_REQUEST_ERR=(cs[3]="Hierarchy request error",3)),ds=(us.WRONG_DOCUMENT_ERR=(cs[4]="Wrong document",4),us.INVALID_CHARACTER_ERR=(cs[5]="Invalid character",5),us.NO_DATA_ALLOWED_ERR=(cs[6]="No data allowed",6),us.NO_MODIFICATION_ALLOWED_ERR=(cs[7]="No modification allowed",7),us.NOT_FOUND_ERR=(cs[8]="Not found",8)),ps=(us.NOT_SUPPORTED_ERR=(cs[9]="Not supported",9),us.INUSE_ATTRIBUTE_ERR=(cs[10]="Attribute in use",10));us.INVALID_STATE_ERR=(cs[11]="Invalid state",11),us.SYNTAX_ERR=(cs[12]="Syntax error",12),us.INVALID_MODIFICATION_ERR=(cs[13]="Invalid modification",13),us.NAMESPACE_ERR=(cs[14]="Invalid namespace",14),us.INVALID_ACCESS_ERR=(cs[15]="Invalid access",15);function fs(e,t){if(t instanceof Error)var i=t;else i=this,Error.call(this,cs[e]),this.message=cs[e],Error.captureStackTrace&&Error.captureStackTrace(this,fs);return i.code=e,t&&(this.message=this.message+": "+t),i}function gs(){}function ms(e,t){this._node=e,this._refresh=t,vs(this)}function vs(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!=t){var i=e._refresh(e._node);Ws(e,"length",i.length),Wa(i,e),e._inc=t}}function ys(){}function _s(e,t){for(var i=e.length;i--;)if(e[i]===t)return i}function Ms(e,t,i,n){if(n?t[_s(t,n)]=i:t[t.length++]=i,e){var r=(i.ownerElement=e).ownerDocument;r&&(n&&Ss(r,e,n),s=e,o=i,(a=r)&&a._inc++,"http://www.w3.org/2000/xmlns/"==o.namespaceURI&&(s._nsMap[o.prefix?o.localName:""]=o.value))}var a,s,o}function ws(e,t,i){var n=_s(t,i);if(!(0<=n))throw fs(ds,new Error(e.tagName+"@"+i));for(var r=t.length-1;n<r;)t[n]=t[++n];if(t.length=r,e){var a=e.ownerDocument;a&&(Ss(a,e,i),i.ownerElement=null)}}function bs(e){if(this._features={},e)for(var t in e)this._features=e[t]}function Ts(){}function As(e){return("<"==e?"<":">"==e&&">")||"&"==e&&"&"||'"'==e&&"""||"&#"+e.charCodeAt()+";"}function xs(e,t){if(t(e))return 1;if(e=e.firstChild)do{if(xs(e,t))return 1}while(e=e.nextSibling)}function Es(){}function Ss(e,t,i){e&&e._inc++,"http://www.w3.org/2000/xmlns/"==i.namespaceURI&&delete t._nsMap[i.prefix?i.localName:""]}function Ds(e,t,i){if(e&&e._inc){e._inc++;var n=t.childNodes;if(i)n[n.length++]=i;else{for(var r=t.firstChild,a=0;r;)r=(n[a++]=r).nextSibling;n.length=a}}}function Ns(e,t){var i=t.previousSibling,n=t.nextSibling;return i?i.nextSibling=n:e.firstChild=n,n?n.previousSibling=i:e.lastChild=i,Ds(e.ownerDocument,e),t}function Cs(e,t,i){var n=t.parentNode;if(n&&n.removeChild(t),t.nodeType===os){var r=t.firstChild;if(null==r)return t;var a=t.lastChild}else r=a=t;var s=i?i.previousSibling:e.lastChild;for(r.previousSibling=s,a.nextSibling=i,s?s.nextSibling=r:e.firstChild=r,null==i?e.lastChild=a:i.previousSibling=a;r.parentNode=e,r!==a&&(r=r.nextSibling););return Ds(e.ownerDocument||e,e),t.nodeType==os&&(t.firstChild=t.lastChild=null),t}function Ls(){this._nsMap={}}function Is(){}function Os(){}function js(){}function ks(){}function Ps(){}function Rs(){}function zs(){}function Us(){}function Bs(){}function Fs(){}function Gs(){}function Hs(){}function Ys(e,t){var i=[],n=9==this.nodeType?this.documentElement:this,r=n.prefix,a=n.namespaceURI;if(a&&null==r&&null==(r=n.lookupPrefix(a)))var s=[{namespace:a,prefix:null}];return Vs(this,i,e,t,s),i.join("")}function Qs(e,t,i){var n=e.prefix||"",r=e.namespaceURI;if((n||r)&&("xml"!==n||"http://www.w3.org/XML/1998/namespace"!==r)&&"http://www.w3.org/2000/xmlns/"!=r){for(var a=i.length;a--;){var s=i[a];if(s.prefix==n)return s.namespace!=r}return 1}}function Vs(e,t,i,n,r){if(n){if(!(e=n(e)))return;if("string"==typeof e)return void t.push(e)}switch(e.nodeType){case $a:r=r||[];var a=e.attributes,s=a.length,o=e.firstChild,l=e.tagName;i=Xa===e.namespaceURI||i,t.push("<",l);for(var u=0;u<s;u++){"xmlns"==(c=a.item(u)).prefix?r.push({prefix:c.localName,namespace:c.value}):"xmlns"==c.nodeName&&r.push({prefix:"",namespace:c.value})}for(u=0;u<s;u++){var c;if(Qs(c=a.item(u),0,r)){var h=c.prefix||"",d=c.namespaceURI,p=h?" xmlns:"+h:" xmlns";t.push(p,'="',d,'"'),r.push({prefix:h,namespace:d})}Vs(c,t,i,n,r)}if(Qs(e,0,r)){h=e.prefix||"",d=e.namespaceURI,p=h?" xmlns:"+h:" xmlns";t.push(p,'="',d,'"'),r.push({prefix:h,namespace:d})}if(o||i&&!/^(?:meta|link|img|br|hr|input)$/i.test(l)){if(t.push(">"),i&&/^script$/i.test(l))for(;o;)o.data?t.push(o.data):Vs(o,t,i,n,r),o=o.nextSibling;else for(;o;)Vs(o,t,i,n,r),o=o.nextSibling;t.push("</",l,">")}else t.push("/>");return;case as:case os:for(o=e.firstChild;o;)Vs(o,t,i,n,r),o=o.nextSibling;return;case Ka:return t.push(" ",e.name,'="',e.value.replace(/[<&"]/g,As),'"');case Ja:return t.push(e.data.replace(/[<&]/g,As));case es:return t.push("<![CDATA[",e.data,"]]>");case rs:return t.push("\x3c!--",e.data,"--\x3e");case ss:var f=e.publicId,g=e.systemId;if(t.push("<!DOCTYPE ",e.name),f)t.push(' PUBLIC "',f),g&&"."!=g&&t.push('" "',g),t.push('">');else if(g&&"."!=g)t.push(' SYSTEM "',g,'">');else{var m=e.internalSubset;m&&t.push(" [",m,"]"),t.push(">")}return;case ns:return t.push("<?",e.target," ",e.data,"?>");case ts:return t.push("&",e.nodeName,";");default:t.push("??",e.nodeName)}}function Ws(e,t,i){e[t]=i}fs.prototype=Error.prototype,Wa(us,fs),gs.prototype={length:0,item:function(e){return this[e]||null},toString:function(e,t){for(var i=[],n=0;n<this.length;n++)Vs(this[n],i,e,t);return i.join("")}},ms.prototype.item=function(e){return vs(this),this[e]},qa(ms,gs),ys.prototype={length:0,item:gs.prototype.item,getNamedItem:function(e){for(var t=this.length;t--;){var i=this[t];if(i.nodeName==e)return i}},setNamedItem:function(e){var t=e.ownerElement;if(t&&t!=this._ownerElement)throw new fs(ps);var i=this.getNamedItem(e.nodeName);return Ms(this._ownerElement,this,e,i),i},setNamedItemNS:function(e){var t,i=e.ownerElement;if(i&&i!=this._ownerElement)throw new fs(ps);return t=this.getNamedItemNS(e.namespaceURI,e.localName),Ms(this._ownerElement,this,e,t),t},removeNamedItem:function(e){var t=this.getNamedItem(e);return ws(this._ownerElement,this,t),t},removeNamedItemNS:function(e,t){var i=this.getNamedItemNS(e,t);return ws(this._ownerElement,this,i),i},getNamedItemNS:function(e,t){for(var i=this.length;i--;){var n=this[i];if(n.localName==t&&n.namespaceURI==e)return n}return null}},bs.prototype={hasFeature:function(e,t){var i=this._features[e.toLowerCase()];return!(!i||t&&!(t in i))},createDocument:function(e,t,i){var n=new Es;if(n.implementation=this,n.childNodes=new gs,(n.doctype=i)&&n.appendChild(i),t){var r=n.createElementNS(e,t);n.appendChild(r)}return n},createDocumentType:function(e,t,i){var n=new Rs;return n.name=e,n.nodeName=e,n.publicId=t,n.systemId=i,n}},Ts.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(e,t){return Cs(this,e,t)},replaceChild:function(e,t){this.insertBefore(e,t),t&&this.removeChild(t)},removeChild:function(e){return Ns(this,e)},appendChild:function(e){return this.insertBefore(e,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(e){return function e(t,i,n){var r=new i.constructor;for(var a in i){var s=i[a];"object"!=typeof s&&s!=r[a]&&(r[a]=s)}i.childNodes&&(r.childNodes=new gs);r.ownerDocument=t;switch(r.nodeType){case $a:var o=i.attributes,l=r.attributes=new ys,u=o.length;l._ownerElement=r;for(var c=0;c<u;c++)r.setAttributeNode(e(t,o.item(c),!0));break;case Ka:n=!0}if(n)for(var h=i.firstChild;h;)r.appendChild(e(t,h,n)),h=h.nextSibling;return r}(this.ownerDocument||this,this,e)},normalize:function(){for(var e=this.firstChild;e;){var t=e.nextSibling;t&&t.nodeType==Ja&&e.nodeType==Ja?(this.removeChild(t),e.appendData(t.data)):(e.normalize(),e=t)}},isSupported:function(e,t){return this.ownerDocument.implementation.hasFeature(e,t)},hasAttributes:function(){return 0<this.attributes.length},lookupPrefix:function(e){for(var t=this;t;){var i=t._nsMap;if(i)for(var n in i)if(i[n]==e)return n;t=t.nodeType==Ka?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var i=t._nsMap;if(i&&e in i)return i[e];t=t.nodeType==Ka?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)}},Wa(Za,Ts),Wa(Za,Ts.prototype),Es.prototype={nodeName:"#document",nodeType:as,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType!=os)return null==this.documentElement&&e.nodeType==$a&&(this.documentElement=e),Cs(this,e,t),e.ownerDocument=this,e;for(var i=e.firstChild;i;){var n=i.nextSibling;this.insertBefore(i,t),i=n}return e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),Ns(this,e)},importNode:function(e,t){return function e(t,i,n){var r;switch(i.nodeType){case $a:(r=i.cloneNode(!1)).ownerDocument=t;case os:break;case Ka:n=!0}r=r||i.cloneNode(!1);r.ownerDocument=t;r.parentNode=null;if(n)for(var a=i.firstChild;a;)r.appendChild(e(t,a,n)),a=a.nextSibling;return r}(this,e,t)},getElementById:function(t){var i=null;return xs(this.documentElement,function(e){if(e.nodeType==$a&&e.getAttribute("id")==t)return i=e,!0}),i},createElement:function(e){var t=new Ls;return t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.childNodes=new gs,(t.attributes=new ys)._ownerElement=t},createDocumentFragment:function(){var e=new Fs;return e.ownerDocument=this,e.childNodes=new gs,e},createTextNode:function(e){var t=new js;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new ks;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new Ps;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var i=new Gs;return i.ownerDocument=this,i.tagName=i.target=e,i.nodeValue=i.data=t,i},createAttribute:function(e){var t=new Is;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new Bs;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var i=new Ls,n=t.split(":"),r=i.attributes=new ys;return i.childNodes=new gs,i.ownerDocument=this,i.nodeName=t,i.tagName=t,i.namespaceURI=e,2==n.length?(i.prefix=n[0],i.localName=n[1]):i.localName=t,r._ownerElement=i},createAttributeNS:function(e,t){var i=new Is,n=t.split(":");return i.ownerDocument=this,i.nodeName=t,i.name=t,i.namespaceURI=e,i.specified=!0,2==n.length?(i.prefix=n[0],i.localName=n[1]):i.localName=t,i}},qa(Es,Ts),Es.prototype.getElementsByTagName=(Ls.prototype={nodeType:$a,hasAttribute:function(e){return null!=this.getAttributeNode(e)},getAttribute:function(e){var t=this.getAttributeNode(e);return t&&t.value||""},getAttributeNode:function(e){return this.attributes.getNamedItem(e)},setAttribute:function(e,t){var i=this.ownerDocument.createAttribute(e);i.value=i.nodeValue=""+t,this.setAttributeNode(i)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)}
vendor: 3,537 bytes, line 1
1,appendChild:function(e){return e.nodeType===os?this.insertBefore(e,null):function(e,t){var i=t.parentNode;if(i){var n=e.lastChild;i.removeChild(t);n=e.lastChild}return n=e.lastChild,t.parentNode=e,t.previousSibling=n,t.nextSibling=null,n?n.nextSibling=t:e.firstChild=t,e.lastChild=t,Ds(e.ownerDocument,e,t),t}(this,e)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var i=this.getAttributeNodeNS(e,t);i&&this.removeAttributeNode(i)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var i=this.getAttributeNodeNS(e,t);return i&&i.value||""},setAttributeNS:function(e,t,i){var n=this.ownerDocument.createAttributeNS(e,t);n.value=n.nodeValue=""+i,this.setAttributeNode(n)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(n){return new ms(this,function(t){var i=[];return xs(t,function(e){e===t||e.nodeType!=$a||"*"!==n&&e.tagName!=n||i.push(e)}),i})},getElementsByTagNameNS:function(n,r){return new ms(this,function(t){var i=[];return xs(t,function(e){e===t||e.nodeType!==$a||"*"!==n&&e.namespaceURI!==n||"*"!==r&&e.localName!=r||i.push(e)}),i})}}).getElementsByTagName,Es.prototype.getElementsByTagNameNS=Ls.prototype.getElementsByTagNameNS,qa(Ls,Ts),Is.prototype.nodeType=Ka,qa(Is,Ts),Os.prototype={data:"",substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},appendChild:function(){throw new Error(cs[hs])},deleteData:function(e,t){this.replaceData(e,t,"")},replaceData:function(e,t,i){i=this.data.substring(0,e)+i+this.data.substring(e+t),this.nodeValue=this.data=i,this.length=i.length}},qa(Os,Ts),js.prototype={nodeName:"#text",nodeType:Ja,splitText:function(e){var t=this.data,i=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var n=this.ownerDocument.createTextNode(i);return this.parentNode&&this.parentNode.insertBefore(n,this.nextSibling),n}},qa(js,Os),ks.prototype={nodeName:"#comment",nodeType:rs},qa(ks,Os),Ps.prototype={nodeName:"#cdata-section",nodeType:es},qa(Ps,Os),Rs.prototype.nodeType=ss,qa(Rs,Ts),zs.prototype.nodeType=ls,qa(zs,Ts),Us.prototype.nodeType=is,qa(Us,Ts),Bs.prototype.nodeType=ts,qa(Bs,Ts),Fs.prototype.nodeName="#document-fragment",Fs.prototype.nodeType=os,qa(Fs,Ts),Gs.prototype.nodeType=ns,qa(Gs,Ts),Hs.prototype.serializeToString=function(e,t,i){return Ys.call(e,t,i)},Ts.prototype.toString=Ys;try{if(Object.defineProperty){Object.defineProperty(ms.prototype,"length",{get:function(){return vs(this),this.$$length}}),Object.defineProperty(Ts.prototype,"textContent",{get:function(){return function e(t){switch(t.nodeType){case $a:case os:var i=[];for(t=t.firstChild;t;)7!==t.nodeType&&8!==t.nodeType&&i.push(e(t)),t=t.nextSibling;return i.join("");default:return t.nodeValue}}(this)},set:function(e){switch(this.nodeType){case $a:case os:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),Ws=function(e,t,i){e["$$"+t]=i}}}catch(e){}function qs(e){return!!e&&"object"==typeof e}function Xs(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];
vendor: 9,525 bytes, line 1
1return t.reduce(function(t,i){return Object.keys(i).forEach(function(e){Array.isArray(t[e])&&Array.isArray(i[e])?t[e]=t[e].concat(i[e]):qs(t[e])&&qs(i[e])?t[e]=Xs(t[e],i[e]):t[e]=i[e]}),t},{})}function Zs(e){return e.reduce(function(e,t){return e.concat(t)},[])}function $s(e){if(!e.length)return[];for(var t=[],i=0;i<e.length;i++)t.push(e[i]);return t}function Ks(e){var t=e.baseUrl,i=void 0===t?"":t,n=e.source,r=void 0===n?"":n,a=e.range,s=void 0===a?"":a,o=e.indexRange,l=void 0===o?"":o,u={uri:r,resolvedUri:Ma(i||"",r)};if(s||l){var c=(s||l).split("-"),h=parseInt(c[0],10),d=parseInt(c[1],10);u.byterange={length:d-h+1,offset:h}}return u}function Js(e){var o,t=e.type,i=void 0===t?"static":t,n=e.duration,r=e.timescale,a=void 0===r?1:r,s=e.sourceDuration,l=Ho[i](e),u=function(e,t){for(var i=[],n=e;n<t;n++)i.push(n);return i}(l.start,l.end).map((o=e,function(e,t){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)+e,duration:i/r,timeline:a,time:t*i}}));if("static"===i){var c=u.length-1;u[c].duration=s-n/a*c}return u}function eo(e){var t=e.baseUrl,i=e.initialization,n=void 0===i?{}:i,r=e.sourceDuration,a=e.timescale,s=void 0===a?1:a,o=e.indexRange,l=void 0===o?"":o,u=e.duration;if(!t)throw new Error(Bo);var c=Ks({baseUrl:t,source:n.sourceURL,range:n.range}),h=Ks({baseUrl:t,source:t,indexRange:l});if(h.map=c,u){var d=Js(e);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]}function to(e,t,i){for(var n=e.sidx.map?e.sidx.map:null,r=e.sidx.duration,a=e.timeline||0,s=e.sidx.byterange,o=s.offset+s.length,l=t.timescale,u=t.references.filter(function(e){return 1!==e.referenceType}),c=[],h=o+t.firstOffset,d=0;d<u.length;d++){var p=t.references[d],f=p.referencedSize,g=p.subsegmentDuration,m=eo({baseUrl:i,timescale:l,timeline:a,periodIndex:a,duration:g,sourceDuration:r,indexRange:h+"-"+(h+f-1)})[0];n&&(m.map=n),c.push(m),h+=f}return e.segments=c,e}function io(e){var t;return(t=e.reduce(function(e,t){var i,n=t.attributes.id+(t.attributes.lang||"");e[n]?(t.segments[0]&&(t.segments[0].discontinuity=!0),(i=e[n].segments).push.apply(i,t.segments),t.attributes.contentProtection&&(e[n].attributes.contentProtection=t.attributes.contentProtection)):e[n]=t;return e},{}),Object.keys(t).map(function(e){return t[e]})).map(function(e){var t,n;return e.discontinuityStarts=(t=e.segments,n="discontinuity",t.reduce(function(e,t,i){return t[n]&&e.push(i),e},[])),e})}function no(e,t){if(void 0===t&&(t={}),!Object.keys(t).length)return e;for(var i in e){var n=e[i];if(n.sidx){var r=n.sidx.uri+"-"+(s=n.sidx.byterange,o=s.offset+s.length-1,s.offset+"-"+o),a=t[r]&&t[r].sidx;n.sidx&&a&&to(n,a,n.sidx.resolvedUri)}}var s,o;return e}function ro(e,d){var p;void 0===d&&(d={});var t=e.reduce(function(e,t){var i,n,r,a,s,o,l=t.attributes.role&&t.attributes.role.value||"",u=t.attributes.lang||"",c="main";if(u){var h=l?" ("+l+")":"";c=t.attributes.lang+h}return e[c]&&e[c].playlists[0].attributes.BANDWIDTH>t.attributes.bandwidth||(e[c]={language:u,autoselect:!0,default:"main"===l,playlists:no([(r=(i=t).attributes,a=i.segments,s=i.sidx,o={attributes:((n={NAME:r.id,BANDWIDTH:r.bandwidth,CODECS:r.codecs})["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&&(o.contentProtection=r.contentProtection),s&&(o.sidx=s),o)],d),uri:""},void 0===p&&"main"===l&&((p=t).default=!0)),e},{});return p||(t[Object.keys(t)[0]].default=!0),t}function ao(e,o){return void 0===o&&(o={}),e.reduce(function(e,t){var i,n,r,a,s=t.attributes.lang||"text";return e[s]||(e[s]={language:s,default:!1,autoselect:!1,playlists:no([(r=(i=t).attributes,void 0===(a=i.segments)&&(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})["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})],o),uri:""}),e},{})}function so(e){var t,i=e.attributes,n=e.segments,r=e.sidx,a={attributes:((t={NAME:i.id,AUDIO:"audio",SUBTITLES:"subs",RESOLUTION:{width:i.width,height:i.height},CODECS:i.codecs,BANDWIDTH:i.bandwidth})["PROGRAM-ID"]=1,t),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&&(a.contentProtection=i.contentProtection),r&&(a.sidx=r),a}function oo(e,t){for(var i,n,r,a,s,o,l,u,c,h,d,p,f=e.type,g=void 0===f?"static":f,m=e.minimumUpdatePeriod,v=void 0===m?0:m,y=e.media,_=void 0===y?"":y,M=e.sourceDuration,w=e.timescale,b=void 0===w?1:w,T=e.startNumber,A=void 0===T?1:T,x=e.periodIndex,E=[],S=-1,D=0;D<t.length;D++){var N=t[D],C=N.d,L=N.r||0,I=N.t||0;S<0&&(S=I),I&&S<I&&(S=I);var O=void 0;if(L<0){var j=D+1;O=j===t.length?"dynamic"===g&&0<v&&0<_.indexOf("$Number$")?(n=S,r=C,0,a=(i=e).NOW,s=i.clientOffset,o=i.availabilityStartTime,l=i.timescale,u=void 0===l?1:l,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*u-n)/r)):(M*b-S)/C:(t[j].t-S)/C}else O=L+1;for(var k=A+E.length+O,P=A+E.length;P<k;)E.push({number:P,duration:C/b,time:S,timeline:x}),S+=C,P++}return E}function lo(e,t){return e.replace(Yo,(a=t,function(e,t,i,n){if("$$"===e)return"$";if(void 0===a[t])return e;var r=""+a[t];return"RepresentationID"===t||(n=i?parseInt(n,10):1)<=r.length?r:new Array(n-r.length+1).join("0")+r}));var a}function uo(i,e){var t,n,r={RepresentationID:i.id,Bandwidth:i.bandwidth||0},a=i.initialization,s=void 0===a?{sourceURL:"",range:""}:a,o=Ks({baseUrl:i.baseUrl,source:lo(s.sourceURL,r),range:s.range});return(n=e,(t=i).duration||n?t.duration?Js(t):oo(t,n):[{number:t.startNumber||1,duration:t.sourceDuration,time:0,timeline:t.periodIndex}]).map(function(e){r.Number=e.number,r.Time=e.time;var t=lo(i.media||"",r);return{uri:t,timeline:e.timeline,duration:e.duration,resolvedUri:Ma(i.baseUrl||"",t),map:o,number:e.number}})}function co(l,e){var t=l.duration,i=l.segmentUrls,n=void 0===i?[]:i;if(!t&&!e||t&&e)throw new Error(Fo);var r,a=n.map(function(e){return i=e,n=(t=l).baseUrl,r=t.initialization,s=Ks({baseUrl:n,source:(a=void 0===r?{}:r).sourceURL,range:a.range}),(o=Ks({baseUrl:n,source:i.media,range:i.mediaRange})).map=s,o;var t,i,n,r,a,s,o});return t&&(r=Js(l)),e&&(r=oo(l,e)),r.map(function(e,t){if(a[t]){var i=a[t];return i.timeline=e.timeline,i.duration=e.duration,i.number=e.number,i}}).filter(function(e){return e})}function ho(e){var t,i,n=e.attributes,r=e.segmentInfo;r.template?(i=uo,t=Xs(n,r.template)):r.base?(i=eo,t=Xs(n,r.base)):r.list&&(i=co,t=Xs(n,r.list));var a={attributes:n};if(!i)return a;var s=i(t,r.timeline);if(t.duration){var o=t.duration,l=t.timescale,u=void 0===l?1:l;t.duration=o/u}else s.length?t.duration=s.reduce(function(e,t){return Math.max(e,Math.ceil(t.duration))},0):t.duration=0;return a.attributes=t,a.segments=s,r.base&&t.indexRange&&(a.sidx=s[0],a.segments=[]),a}function po(e,t){return $s(e.childNodes).filter(function(e){return e.tagName===t})}function fo(e){return e.textContent.trim()}function go(e){var t=/P(?:(\d*)Y)?(?:(\d*)M)?(?:(\d*)D)?(?:T(?:(\d*)H)?(?:(\d*)M)?(?:([\d.]*)S)?)?/.exec(e);if(!t)return 0;var i=t.slice(1),n=i[0],r=i[1],a=i[2],s=i[3],o=i[4],l=i[5];return 31536e3*parseFloat(n||0)+2592e3*parseFloat(r||0)+86400*parseFloat(a||0)+3600*parseFloat(s||0)+60*parseFloat(o||0)+parseFloat(l||0)}function mo(e){return e&&e.attributes?$s(e.attributes).reduce(function(e,t){var i=Qo[t.name]||Qo.DEFAULT;return e[t.name]=i(t.value),e},{}):{}}function vo(e,i){return i.length?Zs(e.map(function(t){return i.map(function(e){return Ma(t,fo(e))})})):e}function yo(e){var t=po(e,"SegmentTemplate")[0],i=po(e,"SegmentList")[0],n=i&&po(i,"SegmentURL").map(function(e){return Xs({tag:"SegmentURL"},mo(e))}),r=po(e,"SegmentBase")[0],a=i||t,s=a&&po(a,"SegmentTimeline")[0],o=i||r||t,l=o&&po(o,"Initialization")[0],u=t&&mo(t);u&&l?u.initialization=l&&mo(l):u&&u.initialization&&(u.initialization={sourceURL:u.initialization});var c={template:u,timeline:s&&po(s,"S").map(function(e){return mo(e)}),list:i&&Xs(mo(i),{segmentUrls:n,initialization:mo(l)}),base:r&&Xs(mo(r),{initialization:mo(l)})};return Object.keys(c).forEach(function(e){c[e]||delete c[e]}),c}function _o(p,f,g){return function(e){var t=mo(e),i=vo(f,po(e,"BaseURL")),n=po(e,"Role")[0],r={role:mo(n)},a=Xs(p,t,r),s=po(e,"ContentProtection").reduce(function(e,t){var i=mo(t),n=Vo[i.schemeIdUri];if(n){e[n]={attributes:i};var r=po(t,"cenc:pssh")[0];if(r){var a=fo(r),s=a&&Ta(a);e[n].pssh=s}}return e},{});Object.keys(s).length&&(a=Xs(a,{contentProtection:s}));var o,l,u,c=yo(e),h=po(e,"Representation"),d=Xs(g,c);return Zs(h.map((o=a,l=i,u=d,function(e){var t=po(e,"BaseURL"),i=vo(l,t),n=Xs(o,mo(e)),r=yo(e);return i.map(function(e){return{segmentInfo:Xs(u,r),attributes:Xs(n,{baseUrl:e})}})})))}}function Mo(e,t){void 0===t&&(t={});var i=t,n=i.manifestUri,r=void 0===n?"":n,a=i.NOW,s=void 0===a?Date.now():a,o=i.clientOffset,l=void 0===o?0:o,u=po(e,"Period");if(!u.length)throw new Error(Ro);var c,h,d=mo(e),p=vo([r],po(e,"BaseURL"));return d.sourceDuration=d.mediaPresentationDuration||0,d.NOW=s,d.clientOffset=l,Zs(u.map((c=d,h=p,function(e,t){var i=vo(h,po(e,"BaseURL")),n=mo(e),r=parseInt(n.id,10),a=y.isNaN(r)?t:r,s=Xs(c,{peri
1odIndex:a}),o=po(e,"AdaptationSet"),l=yo(e);return Zs(o.map(_o(s,i,l)))})))}function wo(e){if(""===e)throw new Error(zo);var t=(new Po).parseFromString(e,"application/xml"),i=t&&"MPD"===t.documentElement.tagName?t.documentElement:null;if(!i||i&&0<i.getElementsByTagName("parsererror").length)throw new Error(Uo);return i}function bo(e,t){return void 0===t&&(t={}),function(e,t){var i;if(void 0===t&&(t={}),!e.length)return{};var n=e[0].attributes,r=n.sourceDuration,a=n.type,s=void 0===a?"static":a,o=n.suggestedPresentationDelay,l=n.minimumUpdatePeriod,u=void 0===l?0:l,c=io(e.filter(function(e){var t=e.attributes;return"video/mp4"===t.mimeType||"video"===t.contentType})).map(so),h=io(e.filter(function(e){var t=e.attributes;return"audio/mp4"===t.mimeType||"audio"===t.contentType})),d=e.filter(function(e){var t=e.attributes;return"text/vtt"===t.mimeType||"text"===t.contentType}),p={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:((i={AUDIO:{},VIDEO:{}})["CLOSED-CAPTIONS"]={},i.SUBTITLES={},i),uri:"",duration:r,playlists:no(c,t),minimumUpdatePeriod:1e3*u};return"dynamic"===s&&(p.suggestedPresentationDelay=o),h.length&&(p.mediaGroups.AUDIO.audio=ro(h,t)),d.length&&(p.mediaGroups.SUBTITLES.subs=ao(d,t)),p}(Mo(wo(e),t).map(ho),t.sidxMapping)}function To(e){return function(e){var t=po(e,"UTCTiming")[0];if(!t)return null;var i=mo(t);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(Go)}return i}(wo(e))}function Ao(e){return new Date(1e3*e-20828448e5)}function xo(e){return{isLeading:(12&e[0])>>>2,dependsOn:3&e[0],isDependedOn:(192&e[1])>>>6,hasRedundancy:(48&e[1])>>>4,paddingValue:(14&e[1])>>>1,isNonSyncSample:1&e[1],degradationPriority:e[2]<<8|e[3]}}function Eo(e){var t="";return t+=String.fromCharCode(e[0]),t+=String.fromCharCode(e[1]),t+=String.fromCharCode(e[2]),t+=String.fromCharCode(e[3])}var So,Do,No,Co,Lo,Io,Oo,jo={DOMImplementation:bs,XMLSerializer:Hs},ko=t(function(e,t){function i(e){this.options=e||{locator:{}}}function u(){this.cdata=!1}function c(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function h(e){if(e)return"\n@"+(e.systemId||"")+"#[line:"+e.lineNumber+",col:"+e.columnNumber+"]"}function r(e,t,i){return"string"==typeof e?e.substr(t,i):e.length>=t+i||t?new java.lang.String(e,t,i)+"":e}function d(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}i.prototype.parseFromString=function(e,t){var i=this.options,n=new p,r=i.domBuilder||new u,a=i.errorHandler,s=i.locator,o=i.xmlns||{},l={lt:"<",gt:">",amp:"&",quot:'"',apos:"'"};return s&&r.setDocumentLocator(s),n.errorHandler=function(n,e,r){if(!n){
1if(e instanceof u)return e;n=e}var a={},s=n instanceof Function;function t(t){var i=n[t];!i&&s&&(i=2==n.length?function(e){n(t,e)}:n),a[t]=i?function(e){i("[xmldom "+t+"]\t"+e+h(r))}:function(){}}return r=r||{},t("warning"),t("error"),t("fatalError"),a}(a,r,s),n.domBuilder=i.domBuilder||r,/\/x?html?$/.test(t)&&(l.nbsp=" ",l.copy="©",o[""]="http://www.w3.org/1999/xhtml"),o.xml=o.xml||"http://www.w3.org/XML/1998/namespace",e?n.parse(e,o,l):n.errorHandler.error("invalid doc source"),r.doc},u.prototype={startDocument:function(){this.doc=(new n).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,i,n){var r=this.doc,a=r.createElementNS(e,i||t),s=n.length;d(this,a),this.currentElement=a,this.locator&&c(this.locator,a);for(var o=0;o<s;o++){e=n.getURI(o);var l=n.getValue(o),u=(i=n.getQName(o),r.createAttributeNS(e,i));this.locator&&c(n.getLocator(o),u),u.value=u.nodeValue=l,a.setAttributeNode(u)}},endElement:function(){var e=this.currentElement;e.tagName;this.currentElement=e.parentNode},startPrefixMapping:function(){},endPrefixMapping:function(){},processingInstruction:function(e,t){var i=this.doc.createProcessingInstruction(e,t);this.locator&&c(this.locator,i),d(this,i)},ignorableWhitespace:function(){},characters:function(e,t,i){if(e=r.apply(this,arguments)){if(this.cdata)var n=this.doc.createCDATASection(e);else n=this.doc.createTextNode(e);this.currentElement?this.currentElement.appendChild(n):/^\s*$/.test(e)&&this.doc.appendChild(n),this.locator&&c(this.locator,n)}},skippedEntity:function(){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(e){(this.locator=e)&&(e.lineNumber=0)},comment:function(e,t,i){e=r.apply(this,arguments);var n=this.doc.createComment(e);this.locator&&c(this.locator,n),d(this,n)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(e,t,i){var n=this.doc.implementation;if(n&&n.createDocumentType){var r=n.createDocumentType(e,t,i);this.locator&&c(this.locator,r),d(this,r)}},warning:function(e){console.warn("[xmldom warning]\t"+e,h(this.locator))},error:function(e){console.error("[xmldom error]\t"+e,h(this.locator))},fatalError:function(e){throw console.error("[xmldom fatalError]\t"+e,h(this.locator)),e}},"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(e){u.prototype[e]=function(){return null}});var p=Va.XMLReader,n=t.DOMImplementation=jo.DOMImplementation;t.XMLSerializer=jo.XMLSerializer,t.DOMParser=i}),Po=(ko.DOMImplementation,ko.XMLSerializer,ko.DOMParser),Ro="INVALID_NUMBER_OF_PERIOD",zo="DASH_EMPTY_MANIFEST",Uo="DASH_INVALID_XML",Bo="NO_BASE_URL",Fo="SEGMENT_TIME_UNSPECIFIED",Go="UNSUPPORTED_UTC_TIMING_SCHEME",Ho={static:function(e){var t=e.duration,i=e.timescale,n=void 0===i?1:i,r=e.sourceDuration;return{start:0,end:Math.ceil(r/(t/n))}},dynamic:function(e){var t=e.NOW,i=e.clientOffset,n=e.availabilityStartTime,r=e.timescale,a=void 0===r?1:r,s=e.duration,o=e.start,l=void 0===o?0:o,u=e.minimumUpdatePeriod,c=void 0===u?0:u,h=e.timeShiftBufferDepth,d=void 0===h?1/0:h,p=(t+i)/1e3,f=n+l,g=p+c-f,m=Math.ceil(g*a/s),v=Math.floor((p-f-d)*a/s),y=Math.floor((p-f)*a/s);return{start:Math.max(0,v),end:Math.min(m,y)}}},Yo=/\$([A-z]*)(?:(%0)([0-9]+)d)?\$/g,Qo={mediaPresentationDuration:function(e){return go(e)},availabilityStartTime:function(e){return/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(t=e)&&(t+="Z"),Date.parse(t)/1e3;var t},minimumUpdatePeriod:function(e){return go(e)},suggestedPresentationDelay:function(e){return go(e)},type:function(e){return e},timeShiftBufferDepth:function(e){return go(e)},start:function(e){return go(e)},width:function(e){return parseInt(e,10)},height:function(e){return parseInt(e,10)},bandwidth:function(e){return parseInt(e,10)},startNumber:function(e){return parseInt(e,10)},timescale:function(e){return parseInt(e,10)},duration:function(e){var t=parseInt(e,10);return isNaN(t)?go(e):t},d:function(e){return parseInt(e,10)},t:function(e){return parseInt(e,10)},r:function(e){return parseInt(e,10)},DEFAULT:function(e){return e}},Vo={"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"},Wo=function(e){return e>>>0},qo=function(e){return("00"+e.toString(16)).slice(-2)},Xo=Wo,Zo={avc1:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength);return{dataReferenceIndex:t.getUint16(6),width:t.getUint16(24),height:t.getUint16(26),horizresolution:t.getUint16(28)+t.getUint16(30)/16,vertresolution:t.getUint16(32)+t.getUint16(34)/16,frameCount:t.getUint16(40),depth:t.getUint16(74),config:So(e.subarray(78,e.byteLength))}},avcC:function(e){var t,i,n,r,a=new DataView(e.buffer,e.byteOffset,e.byteLength),s={configurationVersion:e[0],avcProfileIndication:e[1],profileCompatibility:e[2],avcLevelIndication:e[3],lengthSizeMinusOne:3&e[4],sps:[],pps:[]},o=31&e[5];for(n=6,r=0;r<o;r++)i=a.getUint16(n),n+=2,s.sps.push(new Uint8Array(e.subarray(n,n+i))),n+=i;for(t=e[n],n++,r=0;r<t;
vendor: 221,500 bytes, line 1
1r++)i=a.getUint16(n),n+=2,s.pps.push(new Uint8Array(e.subarray(n,n+i))),n+=i;return s},btrt:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength);return{bufferSizeDB:t.getUint32(0),maxBitrate:t.getUint32(4),avgBitrate:t.getUint32(8)}},esds:function(e){return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),esId:e[6]<<8|e[7],streamPriority:31&e[8],decoderConfig:{objectProfileIndication:e[11],streamType:e[12]>>>2&63,bufferSize:e[13]<<16|e[14]<<8|e[15],maxBitrate:e[16]<<24|e[17]<<16|e[18]<<8|e[19],avgBitrate:e[20]<<24|e[21]<<16|e[22]<<8|e[23],decoderConfigDescriptor:{tag:e[24],length:e[25],audioObjectType:e[26]>>>3&31,samplingFrequencyIndex:(7&e[26])<<1|e[27]>>>7&1,channelConfiguration:e[27]>>>3&15}}}},ftyp:function(e){for(var t=new DataView(e.buffer,e.byteOffset,e.byteLength),i={majorBrand:Eo(e.subarray(0,4)),minorVersion:t.getUint32(4),compatibleBrands:[]},n=8;n<e.byteLength;)i.compatibleBrands.push(Eo(e.subarray(n,n+4))),n+=4;return i},dinf:function(e){return{boxes:So(e)}},dref:function(e){return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),dataReferences:So(e.subarray(8))}},hdlr:function(e){var t={version:new DataView(e.buffer,e.byteOffset,e.byteLength).getUint8(0),flags:new Uint8Array(e.subarray(1,4)),handlerType:Eo(e.subarray(8,12)),name:""},i=8;for(i=24;i<e.byteLength;i++){if(0===e[i]){i++;break}t.name+=String.fromCharCode(e[i])}return t.name=decodeURIComponent(escape(t.name)),t},mdat:function(e){return{byteLength:e.byteLength,nals:function(e){var t,i,n=new DataView(e.buffer,e.byteOffset,e.byteLength),r=[];for(t=0;t+4<e.length;t+=i)if(i=n.getUint32(t),t+=4,i<=0)r.push("<span style='color:red;'>MALFORMED DATA</span>");else switch(31&e[t]){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 - "+e[t]&31)}return r}(e)}},mdhd:function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength),n=4,r={version:i.getUint8(0),flags:new Uint8Array(e.subarray(1,4)),language:""};return 1===r.version?(n+=4,r.creationTime=Ao(i.getUint32(n)),n+=8,r.modificationTime=Ao(i.getUint32(n)),n+=4,r.timescale=i.getUint32(n),n+=8):(r.creationTime=Ao(i.getUint32(n)),n+=4,r.modificationTime=Ao(i.getUint32(n)),n+=4,r.timescale=i.getUint32(n),n+=4),r.duration=i.getUint32(n),n+=4,t=i.getUint16(n),r.language+=String.fromCharCode(96+(t>>10)),r.language+=String.fromCharCode(96+((992&t)>>5)),r.language+=String.fromCharCode(96+(31&t)),r},mdia:function(e){return{boxes:So(e)}},mfhd:function(e){return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),sequenceNumber:e[4]<<24|e[5]<<16|e[6]<<8|e[7]}},minf:function(e){return{boxes:So(e)}},mp4a:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),i={dataReferenceIndex:t.getUint16(6),channelcount:t.getUint16(16),samplesize:t.getUint16(18),samplerate:t.getUint16(24)+t.getUint16(26)/65536};return 28<e.byteLength&&(i.streamDescriptor=So(e.subarray(28))[0]),i},moof:function(e){return{boxes:So(e)}},moov:function(e){return{boxes:So(e)}},mvex:function(e){return{boxes:So(e)}},mvhd:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),i=4,n={version:t.getUint8(0),flags:new Uint8Array(e.subarray(1,4))};return 1===n.version?(i+=4,n.creationTime=Ao(t.getUint32(i)),i+=8,n.modificationTime=Ao(t.getUint32(i)),i+=4,n.timescale=t.getUint32(i),i+=8):(n.creationTime=Ao(t.getUint32(i)),i+=4,n.modificationTime=Ao(t.getUint32(i)),i+=4,n.timescale=t.getUint32(i),i+=4),n.duration=t.getUint32(i),i+=4,n.rate=t.getUint16(i)+t.getUint16(i+2)/16,i+=4,n.volume=t.getUint8(i)+t.getUint8(i+1)/8,i+=2,i+=2,i+=8,n.matrix=new Uint32Array(e.subarray(i,i+36)),i+=36,i+=24,n.nextTrackId=t.getUint32(i),n},pdin:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength);return{version:t.getUint8(0),flags:new Uint8Array(e.subarray(1,4)),rate:t.getUint32(4),initialDelay:t.getUint32(8)}},sdtp:function(e){var t,i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),samples:[]};for(t=4;t<e.byteLength;t++)i.samples.push({dependsOn:(48&e[t])>>4,isDependedOn:(12&e[t])>>2,hasRedundancy:3&e[t]});return i},sidx:function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength),n={version:e[0],flags:new Uint8Array(e.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(t=24;r;t+=12,r--)n.references.push({referenceType:(128&e[t])>>>7,referencedSize:2147483647&i.getUint32(t),subsegmentDuration:i.getUint32(t+4),startsWithSap:!!(128&e[t+8]),sapType:(112&e[t+8])>>>4,sapDeltaTime:268435455&i.getUint32(t+8)});return n},smhd:function(e){return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),balance:e[4]+e[5]/256}},stbl:function(e){return{boxes:So(e)}},stco:function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength),n={version:e[0],flags:new Uint8Array(e.subarray(1,4)),chunkOffsets:[]},r=i.getUint32(4);for(t=8;r;t+=4,r--)n.chunkOffsets.push(i.getUint32(t));return n},stsc:function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength),n=i.getUint32(4),r={version:e[0],flags:new Uint8Array(e.subarray(1,4)),sampleToChunks:[]};for(t=8;n;t+=12,n--)r.sampleToChunks.push({firstChunk:i.getUint32(t),samplesPerChunk:i.getUint32(t+4),sampleDescriptionIndex:i.getUint32(t+8)});return r},stsd:function(e){return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),sampleDescriptions:So(e.subarray(8))}},stsz:function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength),n={version:e[0],flags:new Uint8Array(e.subarray(1,4)),sampleSize:i.getUint32(4),entries:[]};for(t=12;t<e.byteLength;t+=4)n.entries.push(i.getUint32(t));return n},stts:function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength),n={version:e[0],flags:new Uint8Array(e.subarray(1,4)),timeToSamples:[]},r=i.getUint32(4);for(t=8;r;t+=8,r--)n.timeToSamples.push({sampleCount:i.getUint32(t),sampleDelta:i.getUint32(t+4)});return n},styp:function(e){return Zo.ftyp(e)},tfdt:function(e){var t={version:e[0],flags:new Uint8Array(e.subarray(1,4)),baseMediaDecodeTime:Xo(e[4]<<24|e[5]<<16|e[6]<<8|e[7])};return 1===t.version&&(t.baseMediaDecodeTime*=Math.pow(2,32),t.baseMediaDecodeTime+=Xo(e[8]<<24|e[9]<<16|e[10]<<8|e[11])),t},tfhd:function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength),n={version:e[0],flags:new Uint8Array(e.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],l=32&n.flags[2],u=65536&n.flags[0],c=131072&n.flags[0];return t=8,r&&(t+=4,n.baseDataOffset=i.getUint32(12),t+=4),a&&(n.sampleDescriptionIndex=i.getUint32(t),t+=4),s&&(n.defaultSampleDuration=i.getUint32(t),t+=4),o&&(n.defaultSampleSize=i.getUint32(t),t+=4),l&&(n.defaultSampleFlags=i.getUint32(t)),u&&(n.durationIsEmpty=!0),!r&&c&&(n.baseDataOffsetIsMoof=!0),n},tkhd:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),i=4,n={version:t.getUint8(0),flags:new Uint8Array(e.subarray(1,4))};return 1===n.version?(i+=4,n.creationTime=Ao(t.getUint32(i)),i+=8,n.modificationTime=Ao(t.getUint32(i)),i+=4,n.trackId=t.getUint32(i),i+=4,i+=8):(n.creationTime=Ao(t.getUint32(i)),i+=4,n.modificationTime=Ao(t.getUint32(i)),i+=4,n.trackId=t.getUint32(i),i+=4,i+=4),n.duration=t.getUint32(i),i+=4,i+=8,n.layer=t.getUint16(i),i+=2,n.alternateGroup=t.getUint16(i),i+=2,n.volume=t.getUint8(i)+t.getUint8(i+1)/8,i+=2,i+=2,n.matrix=new Uint32Array(e.subarray(i,i+36)),i+=36,n.width=t.getUint16(i)+t.getUint16(i+2)/16,i+=4,n.height=t.getUint16(i)+t.getUint16(i+2)/16,n},traf:function(e){return{boxes:So(e)}},trak:function(e){return{boxes:So(e)}},trex:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength);return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),trackId:t.getUint32(4),defaultSampleDescriptionIndex:t.getUint32(8),defaultSampleDuration:t.getUint32(12),defaultSampleSize:t.getUint32(16),sampleDependsOn:3&e[20],sampleIsDependedOn:(192&e[21])>>6,sampleHasRedundancy:(48&e[21])>>4,samplePaddingValue:(14&e[21])>>1,sampleIsDifferenceSample:!!(1&e[21]),sampleDegradationPriority:t.getUint16(22)}},trun:function(e){var t,i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),samples:[]},n=new DataView(e.buffer,e.byteOffset,e.byteLength),r=1&i.flags[2],a=4&i.flags[2],s=1&i.flags[1],o=2&i.flags[1],l=4&i.flags[1],u=8&i.flags[1],c=n.getUint32(4),h=8;for(r&&(i.dataOffset=n.getInt32(h),h+=4),a&&c&&(t={flags:xo(e.subarray(h,h+4))},h+=4,s&&(t.duration=n.getUint32(h),h+=4),o&&(t.size=n.getUint32(h),h+=4),u&&(t.compositionTimeOffset=n.getUint32(h),h+=4),i.samples.push(t),c--);c--;)t={},s&&(t.duration=n.getUint32(h),h+=4),o&&(t.size=n.getUint32(h),h+=4),l&&(t.flags=xo(e.subarray(h,h+4)),h+=4),u&&(t.compositionTimeOffset=n.getUint32(h),h+=4),i.samples.push(t);return i},"url ":function(e){return{version:e[0],flags:new Uint8Array(e.subarray(1,4))}},vmhd:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength);return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),graphicsmode:t.getUint16(4),opcolor:new Uint16Array([t.getUint16(6),t.getUint16(8),t.getUint16(10)])}}},$o={inspect:So=function(e){for(var t,i,n,r,a,s=0,o=[],l=new ArrayBuffer(e.length),u=new Uint8Array(l),c=0;c<e.length;++c)u[c]=e[c];for(t=new DataView(l);s<e.byteLength;)i=t.getUint32(s),n=Eo(e.subarray(s+4,s+8)),r=1<i?s+i:e.byteLength,(a=(Zo[n]||function(e){return{data:e}})(e.subarray(s+8,r))).size=i,a.type=n,o.push(a),s=r;return o},textify:Do=function(e,t){var a;return t=t||0,a=new Array(2*t+1).join(" "),e.map(function(r,e){return a+r.type+"\n"+Object.keys(r).filter(function(e){return"type"!==e&&"boxes"!==e}).map(function(e){var t=a+" "+e+": ",i=r[e];if(i instanceof Uint8Array||i instanceof Uint32Array){var n=Array.prototype.slice.call(new Uint8Array(i.buffer,i.byteOffset,i.byteLength)).map(function(e){return" "+("00"+e.toString(16)).slice(-2)}).join("").match(/.{1,24}/g);return n?1===n.length?t+"<"+n.join("").slice(1)+">":t+"<\n"+n.map(function(e){return a+" "+e}).join("\n")+"\n"+a+" >":t+"<>"}return t+JSON.stringify(i,null,2).split("\n").map(function(e,t){return 0===t?e:a+" "+e}).join("\n")}).join("\n")+(r.boxes?"\n"+Do(r.boxes,t+1):"")}).join("\n")},parseType:Eo,findBox:function e(t,i){var n,r,a,s,o,l=[];if(!i.length)return null;for(n=0;n<t.byteLength;)r=Xo(t[n]<<24|t[n+1]<<16|t[n+2]<<8|t[n+3]),a=Eo(t.subarray(n+4,n+8)),s=1<r?n+r:t.byteLength,a===i[0]&&(1===i.length?l.push(t.subarray(n+8,s)):(o=e(t.subarray(n+8,s),i.slice(1))).length&&(l=l.concat(o))),n=s;return l},parseTraf:Zo.traf,parseTfdt:Zo.tfdt,parseHdlr:Zo.hdlr,parseTfhd:Zo.tfhd,parseTrun:Zo.trun,parseSidx:Zo.sidx},Ko=Wo,Jo=qo;No=function(e){return $o.findBox(e,["moov","trak"]).reduce(function(e,t){var i,n,r,a,s;return(i=$o.findBox(t,["tkhd"])[0])?(n=i[0],a=Ko(i[r=0===n?12:20]<<24|i[r+1]<<16|i[r+2]<<8|i[r+3]),(s=$o.findBox(t,["mdia","mdhd"])[0])?(r=0===(n=s[0])?12:20,e[a]=Ko(s[r]<<24|s[r+1]<<16|s[r+2]<<8|s[r+3]),e):null):null},{})},Co=function(r,e){var t,i,n;return t=$o.findBox(e,["moof","traf"]),i=[].concat.apply([],t.map(function(n){return $o.findBox(n,["tfhd"]).map(function(e){var t,i;return t=Ko(e[4]<<24|e[5]<<16|e[6]<<8|e[7]),i=r[t]||9e4,($o.findBox(n,["tfdt"]).map(function(e){var t,i;return t=e[0],i=Ko(e[4]<<24|e[5]<<16|e[6]<<8|e[7]),1===t&&(i*=Math.pow(2,32),i+=Ko(e[8]<<24|e[9]<<16|e[10]<<8|e[11])),i})[0]||1/0)/i})})),n=Math.min.apply(null,i),isFinite(n)?n:0},Lo=function(e,t){var i,n=$o.findBox(t,["moof","traf"]),r=0,a=0;if(n&&n.length)for(var s=$o.parseTraf(n[0]),o=0;o<s.boxes.length;o++)"tfhd"===s.boxes[o].type?i=s.boxes[o].trackId:"tfdt"===s.boxes[o].type?r=s.boxes[o].baseMediaDecodeTime:"trun"===s.boxes[o].type&&s.boxes[o].samples.length&&(a=s.boxes[o].samples[0].compositionTimeOffset||0);return(r+a)/(e[i]||9e4)},Io=function(e){var t=$o.findBox(e,["moov","trak"]),o=[];return t.forEach(function(e){var t=$o.findBox(e,["mdia","hdlr"]),s=$o.findBox(e,["tkhd"]);t.forEach(function(e,t){var i,n,r=$o.parseType(e.subarray(8,12)),a=s[t];"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},Oo=function(e){var t=$o.findBox(e,["moov","trak"]),p=[];return t.forEach(function(e){var t,i,n={},r=$o.findBox(e,["tkhd"])[0];r&&(i=(t=new DataView(r.buffer,r.byteOffset,r.byteLength)).getUint8(0),n.id=0===i?t.getUint32(12):t.getUint32(20));var a=$o.findBox(e,["mdia","hdlr"])[0];if(a){var s=$o.parseType(a.subarray(8,12));n.type="vide"===s?"video":"soun"===s?"audio":s}var o=$o.findBox(e,["mdia","minf","stbl","stsd"])[0];if(o){var l=o.subarray(8);n.codec=$o.parseType(l.subarray(4,8));var u,c=$o.findBox(l,[n.codec])[0];c&&(/^[a-z]vc[1-9]$/i.test(n.codec)?(u=c.subarray(78),"avcC"===$o.parseType(u.subarray(4,8))&&11<u.length?(n.codec+=".",n.codec+=Jo(u[9]),n.codec+=Jo(u[10]),n.codec+=Jo(u[11])):n.codec="avc1.4d400d"):/^mp4[a,v]$/i.test(n.codec)&&(u=c.subarray(28),"esds"===$o.parseType(u.subarray(4,8))&&20<u.length&&0!==u[19]?(n.codec+="."+Jo(u[19]),n.codec+="."+Jo(u[20]>>>2&63).replace(/^0/,"")):n.codec="mp4a.40.2"))}var h=$o.findBox(e,["mdia","mdhd"])[0];if(h&&r){var d=0===i?12:20;n.timescale=Ko(h[d]<<24|h[1+d]<<16|h[2+d]<<8|h[3+d])}p.push(n)}),p};function el(){this.init=function(){var a={};this.on=function(e,t){a[e]||(a[e]=[]),a[e]=a[e].concat(t)},this.off=function(e,t){var i;return!!a[e]&&(i=a[e].indexOf(t),a[e]=a[e].slice(),a[e].splice(i,1),-1<i)},this.trigger=function(e){var t,i,n,r;if(t=a[e])if(2===arguments.length)for(n=t.length,i=0;i<n;++i)t[i].call(this,arguments[1]);else{for(r=[],i=arguments.length,i=1;i<arguments.length;++i)r.push(arguments[i]);for(n=t.length,i=0;i<n;++i)t[i].apply(this,r)}},this.dispose=function(){a={}}}}var tl={findBox:$o.findBox,parseType:$o.parseType,timescale:No,startTime:Co,compositionStartTime:Lo,videoTrackIds:Io,tracks:Oo},il=function(e){for(var t=0,i={payloadType:-1,payloadSize:0},n=0,r=0;t<e.byteLength&&128!==e[t];){for(;255===e[t];)n+=255,t++;for(n+=e[t++];255===e[t];)r+=255,t++;if(r+=e[t++],!i.payload&&4===n){i.payloadType=n,i.payloadSize=r,i.payload=e.subarray(t,t+r);break}t+=r,r=n=0}return i},nl=function(e){return 181!==e.payload[0]||49!=(e.payload[1]<<8|e.payload[2])||"GA94"!==String.fromCharCode(e.payload[3],e.payload[4],e.payload[5],e.payload[6])||3!==e.payload[7]?null:e.payload.subarray(8,e.payload.length-1)},rl=function(e,t){var i,n,r,a,s=[];if(!(64&t[0]))return s;for(n=31&t[0],i=0;i<n;i++)a={type:3&t[2+(r=3*i)],pts:e},4&t[2+r]&&(a.ccData=t[3+r]<<8|t[4+r],s.push(a));return s},al=function(e){for(var t,i,n=e.byteLength,r=[],a=1;a<n-2;)0===e[a]&&0===e[a+1]&&3===e[a+2]?(r.push(a+2),a+=2):a++;if(0===r.length)return e;t=n-r.length,i=new Uint8Array(t);var s=0;for(a=0;a<t;s++,a++)s===r[0]&&(s++,r.shift()),i[a]=e[s];return i},sl=4;el.prototype.pipe=function(t){return this.on("data",function(e){t.push(e)}),this.on("done",function(e){t.flush(e)}),this.on("partialdone",function(e){t.partialFlush(e)}),this.on("endedtimeline",function(e){t.endTimeline(e)}),this.on("reset",function(e){t.reset(e)}),t},el.prototype.push=function(e){this.trigger("data",e)},el.prototype.flush=function(e){this.trigger("done",e)},el.prototype.partialFlush=function(e){this.trigger("partialdone",e)},el.prototype.endTimeline=function(e){this.trigger("endedtimeline",e)},el.prototype.reset=function(e){this.trigger("reset",e)};function ol(){ol.prototype.init.call(this),this.captionPackets_=[],this.ccStreams_=[new pl(0,0),new pl(0,1),new pl(1,0),new pl(1,1)],this.reset(),this.ccStreams_.forEach(function(e){e.on("data",this.trigger.bind(this,"data")),e.on("partialdone",this.trigger.bind(this,"partialdone")),e.on("done",this.trigger.bind(this,"done"))},this)}var ll=el;(ol.prototype=new ll).push=function(e){var t,i,n;if("sei_rbsp"===e.nalUnitType&&(t=il(e.escapedRBSP)).payloadType===sl&&(i=nl(t)))if(e.dts<this.latestDts_)this.ignoreNextEqualDts_=!0;else{if(e.dts===this.latestDts_&&this.ignoreNextEqualDts_)return this.numSameDts_--,void(this.numSameDts_||(this.ignoreNextEqualDts_=!1));n=rl(e.pts,i),this.captionPackets_=this.captionPackets_.concat(n),this.latestDts_!==e.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=e.dts}},ol.prototype.flushCCStreams=function(t){this.ccStreams_.forEach(function(e){return"flush"===t?e.flush():e.partialFlush()},this)},ol.prototype.flushStream=function(e){this.captionPackets_.length&&(this.captionPackets_.forEach(function(e,t){e.presortIndex=t}),this.captionPackets_.sort(function(e,t){return e.pts===t.pts?e.presortIndex-t.presortIndex:e.pts-t.pts}),this.captionPackets_.forEach(function(e){e.type<2&&this.dispatchCea608Packet(e)},this),this.captionPackets_.length=0),this.flushCCStreams(e)},ol.prototype.flush=function(){return this.flushStream("flush")},ol.prototype.partialFlush=function(){return this.flushStream("partialFlush")},ol.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach(function(e){e.reset()})},ol.prototype.dispatchCea608Packet=function(e){this.setsTextOrXDSActive(e)?this.activeCea608Channel_[e.type]=null:this.setsChannel1Active(e)?this.activeCea608Channel_[e.type]=0:this.setsChannel2Active(e)&&(this.activeCea608Channel_[e.type]=1),null!==this.activeCea608Channel_[e.type]&&this.ccStreams_[(e.type<<1)+this.activeCea608Channel_[e.type]].push(e)},ol.prototype.setsChannel1Active=function(e){return 4096==(30720&e.ccData)},ol.prototype.setsChannel2Active=function(e){return 6144==(30720&e.ccData)},ol.prototype.setsTextOrXDSActive=function(e){return 256==(28928&e.ccData)||4138==(30974&e.ccData)||6186==(30974&e.ccData)};function ul(e){return null===e?"":(e=hl[e]||e,String.fromCharCode(e))}function cl(){for(var e=[],t=15;t--;)e.push("");return e}var hl={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},dl=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],pl=function e(t,i){e.prototype.init.call(this),this.field_=t||0,this.dataChannel_=i||0,this.name_="CC"+(1+(this.field_<<1|this.dataChannel_)),this.setConstants(),this.reset(),this.push=function(e){var t,i,n,r,a;if((t=32639&e.ccData)!==this.lastControlCode_){if(4096==(61440&t)?this.lastControlCode_=t:t!==this.PADDING_&&(this.lastControlCode_=null),n=t>>>8,r=255&t,t!==this.PADDING_)if(t===this.RESUME_CAPTION_LOADING_)this.mode_="popOn";else if(t===this.END_OF_CAPTION_)this.mode_="popOn",this.clearFormatting(e.pts),this.flushDisplayed(e.pts),i=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=i,this.startPts_=e.pts;else if(t===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(e.pts);else if(t===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(e.pts);else if(t===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(e.pts);else if(t===this.CARRIAGE_RETURN_)this.clearFormatting(e.pts),this.flushDisplayed(e.pts),this.shiftRowsUp_(),this.startPts_=e.pts;else if(t===this.BACKSPACE_)"popOn"===this.mode_?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1);else if(t===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(e.pts),this.displayed_=cl();else if(t===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=cl();else if(t===this.RESUME_DIRECT_CAPTIONING_)"paintOn"!==this.mode_&&(this.flushDisplayed(e.pts),this.displayed_=cl()),this.mode_="paintOn",this.startPts_=e.pts;else if(this.isSpecialCharacter(n,r))a=ul((n=(3&n)<<8)|r),this[this.mode_](e.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=ul((n=(3&n)<<8)|r),this[this.mode_](e.pts,a),this.column_++;else if(this.isMidRowCode(n,r))this.clearFormatting(e.pts),this[this.mode_](e.pts," "),this.column_++,14==(14&r)&&this.addFormatting(e.pts,["i"]),1==(1&r)&&this.addFormatting(e.pts,["u"]);else if(this.isOffsetControlCode(n,r))this.column_+=3&r;else if(this.isPAC(n,r)){var s=dl.indexOf(7968&t);"rollUp"===this.mode_&&(s-this.rollUpRows_+1<0&&(s=this.rollUpRows_-1),this.setRollUp(e.pts,s)),s!==this.row_&&(this.clearFormatting(e.pts),this.row_=s),1&r&&-1===this.formatting_.indexOf("u")&&this.addFormatting(e.pts,["u"]),16==(16&t)&&(this.column_=4*((14&t)>>1)),this.isColorPAC(r)&&14==(14&r)&&this.addFormatting(e.pts,["i"])}else this.isNormalChar(n)&&(0===r&&(r=null),a=ul(n),a+=ul(r),this[this.mode_](e.pts,a),this.column_+=a.length)}else this.lastControlCode_=null}};pl.prototype=new ll,pl.prototype.flushDisplayed=function(e){var t=this.displayed_.map(function(e){try{return e.trim()}catch(e){return console.error("Skipping malformed caption."),""}}).join("\n").replace(/^\n+|\n+$/g,"");t.length&&this.trigger("data",{startPts:this.startPts_,endPts:e,text:t,stream:this.name_})},pl.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=cl(),this.nonDisplayed_=cl(),this.lastControlCode_=null,this.column_=0,this.row_=14,this.rollUpRows_=2,this.formatting_=[]},pl.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_},pl.prototype.isSpecialCharacter=function(e,t){return e===this.EXT_&&48<=t&&t<=63},pl.prototype.isExtCharacter=function(e,t){return(e===this.EXT_+1||e===this.EXT_+2)&&32<=t&&t<=63},pl.prototype.isMidRowCode=function(e,t){return e===this.EXT_&&32<=t&&t<=47},pl.prototype.isOffsetControlCode=function(e,t){return e===this.OFFSET_&&33<=t&&t<=35},pl.prototype.isPAC=function(e,t){return e>=this.BASE_&&e<this.BASE_+8&&64<=t&&t<=127},pl.prototype.isColorPAC=function(e){return 64<=e&&e<=79||96<=e&&e<=127},pl.prototype.isNormalChar=function(e){return 32<=e&&e<=127},pl.prototype.setRollUp=function(e,t){if("rollUp"!==this.mode_&&(this.row_=14,this.mode_="rollUp",this.flushDisplayed(e),this.nonDisplayed_=cl(),this.displayed_=cl()),void 0!==t&&t!==this.row_)for(var i=0;i<this.rollUpRows_;i++)this.displayed_[t-i]=this.displayed_[this.row_-i],this.displayed_[this.row_-i]="";void 0===t&&(t=this.row_),this.topRow_=t-this.rollUpRows_+1},pl.prototype.addFormatting=function(e,t){this.formatting_=this.formatting_.concat(t);var i=t.reduce(function(e,t){return e+"<"+t+">"},"");this[this.mode_](e,i)},pl.prototype.clearFormatting=function(e){if(this.formatting_.length){var t=this.formatting_.reverse().reduce(function(e,t){return e+"</"+t+">"},"");this.formatting_=[],this[this.mode_](e,t)}},pl.prototype.popOn=function(e,t){var i=this.nonDisplayed_[this.row_];i+=t,this.nonDisplayed_[this.row_]=i},pl.prototype.rollUp=function(e,t){var i=this.displayed_[this.row_];i+=t,this.displayed_[this.row_]=i},pl.prototype.shiftRowsUp_=function(){var e;for(e=0;e<this.topRow_;e++)this.displayed_[e]="";for(e=this.row_+1;e<15;e++)this.displayed_[e]="";for(e=this.topRow_;e<this.row_;e++)this.displayed_[e]=this.displayed_[e+1];this.displayed_[this.row_]=""},pl.prototype.paintOn=function(e,t){var i=this.displayed_[this.row_];i+=t,this.displayed_[this.row_]=i};function fl(e,t){for(var i=e,n=0;n<t.length;n++){var r=t[n];if(i<r.size)return r;i-=r.size}return null}function gl(e,v){var n=tl.findBox(e,["moof","traf"]),t=tl.findBox(e,["mdat"]),y={},r=[];return t.forEach(function(e,t){var i=n[t];r.push({mdat:e,traf:i})}),r.forEach(function(e){var t,i,n,r,a,s,o,l,u=e.mdat,c=e.traf,h=tl.findBox(c,["tfhd"]),d=$o.parseTfhd(h[0]),p=d.trackId,f=tl.findBox(c,["tfdt"]),g=0<f.length?$o.parseTfdt(f[0]).baseMediaDecodeTime:0,m=tl.findBox(c,["trun"]);v===p&&0<m.length&&(i=m,r=g,a=(n=d).defaultSampleDuration||0,s=n.defaultSampleSize||0,o=n.trackId,l=[],i.forEach(function(e){var t=$o.parseTrun(e).samples;t.forEach(function(e){void 0===e.duration&&(e.duration=a),void 0===e.size&&(e.size=s),e.trackId=o,e.dts=r,void 0===e.compositionTimeOffset&&(e.compositionTimeOffset=0),e.pts=r+e.compositionTimeOffset,r+=e.duration}),l=l.concat(t)}),t=function(e,t,i){var n,r,a,s,o=new DataView(e.buffer,e.byteOffset,e.byteLength),l=[];for(r=0;r+4<e.length;r+=a)if(a=o.getUint32(r),r+=4,!(a<=0))switch(31&e[r]){case 6:var u=e.subarray(r+1,r+1+a),c=fl(r,t);n={nalUnitType:"sei_rbsp",size:a,data:u,escapedRBSP:vl(u),trackId:i},c?(n.pts=c.pts,n.dts=c.dts,s=c):(n.pts=s.pts,n.dts=s.dts),l.push(n)}return l}(u,l,p),y[p]||(y[p]=[]),y[p]=y[p].concat(t))}),y}function ml(e,t){var i=1;for(t<e&&(i=-1);4294967296<Math.abs(t-e);)e+=8589934592*i;return e}var vl=al,yl=ol,_l=function(){var t,l,u,c,h,i,n=!1;this.isInitialized=function(){return n},this.init=function(e){t=new yl,n=!0,i=!!e&&e.isPartial,t.on("data",function(e){e.startTime=e.startPts/c,e.endTime=e.endPts/c,h.captions.push(e),h.captionStreams[e.stream]=!0})},this.isNewInit=function(e,t){return!(e&&0===e.length||t&&"object"==typeof t&&0===Object.keys(t).length)&&(u!==e[0]||c!==t[u])},this.parse=function(e,t,i){var n,r,a,s;if(!this.isInitialized())return null;if(!t||!i)return null;if(this.isNewInit(t,i))u=t[0],c=i[u];else if(null===u||!c)return l.push(e),null;for(;0<l.length;){var o=l.shift();this.parse(o,t,i)}return r=e,s=c,null!==(n=null===(a=u)?null:{seiNals:gl(r,a)[a],timescale:s})&&n.seiNals?(this.pushNals(n.seiNals),this.flushStream(),h):null},this.pushNals=function(e){if(!this.isInitialized()||!e||0===e.length)return null;e.forEach(function(e){t.push(e)})},this.flushStream=function(){if(!this.isInitialized())return null;i?t.partialFlush():t.flush()},this.clearParsedCaptions=function(){h.captions=[],h.captionStreams={}},this.resetCaptionStream=function(){if(!this.isInitialized())return null;t.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){l=[],c=u=null,h?this.clearParsedCaptions():h={captions:[],captionStreams:{}},this.resetCaptionStream()},this.reset()},Ml=27,wl=15,bl=21;new ll;function Tl(e){var t=31&e[1];return t<<=8,t|=e[2]}function Al(e){return!!(64&e[1])}function xl(e){var t=0;return 1<(48&e[3])>>>4&&(t+=e[4]+1),t}function El(e){switch(e){case 5:return"slice_layer_without_partitioning_rbsp_idr";case 6:return"sei_rbsp";case 7:return"seq_parameter_set_rbsp";case 8:return"pic_parameter_set_rbsp";case 9:return"access_unit_delimiter_rbsp";default:return null}}function Sl(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]}var Dl,Nl,Cl,Ll,Il={parseType:function(e,t){var i=Tl(e);return 0===i?"pat":i===t?"pmt":t?"pes":null},parsePat:function(e){var t=Al(e),i=4+xl(e);return t&&(i+=e[i]+1),(31&e[i+10])<<8|e[i+11]},parsePmt:function(e){var t={},i=Al(e),n=4+xl(e);if(i&&(n+=e[n]+1),1&e[n+5]){var r;r=3+((15&e[n+1])<<8|e[n+2])-4;for(var a=12+((15&e[n+10])<<8|e[n+11]);a<r;){var s=n+a;t[(31&e[s+1])<<8|e[s+2]]=e[s],a+=5+((15&e[s+3])<<8|e[s+4])}return t}},parsePayloadUnitStartIndicator:Al,parsePesType:function(e,t){switch(t[Tl(e)]){case Ml:return"video";case wl:return"audio";case bl:return"timed-metadata";default:return null}},parsePesTime:function(e){if(!Al(e))return null;var t=4+xl(e);if(t>=e.byteLength)return null;var i,n=null;return 192&(i=e[t+7])&&((n={}).pts=(14&e[t+9])<<27|(255&e[t+10])<<20|(254&e[t+11])<<12|(255&e[t+12])<<5|(254&e[t+13])>>>3,n.pts*=4,n.pts+=(6&e[t+13])>>>1,n.dts=n.pts,64&i&&(n.dts=(14&e[t+14])<<27|(255&e[t+15])<<20|(254&e[t+16])<<12|(255&e[t+17])<<5|(254&e[t+18])>>>3,n.dts*=4,n.dts+=(6&e[t+18])>>>1)),n},videoPacketContainsKeyFrame:function(e){for(var t=4+xl(e),i=e.subarray(t),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"===El(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"===El(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"===El(31&i[r+3])&&(a=!0),a}},Ol=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],jl={isLikelyAacData:function(e){return e[0]==="I".charCodeAt(0)&&e[1]==="D".charCodeAt(0)&&e[2]==="3".charCodeAt(0)},parseId3TagSize:function(e,t){var i=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return(16&e[t+5])>>4?20+i:10+i},parseAdtsSize:function(e,t){var i=(224&e[t+5])>>5,n=e[t+4]<<3;return 6144&e[t+3]|n|i},parseType:function(e,t){return e[t]==="I".charCodeAt(0)&&e[t+1]==="D".charCodeAt(0)&&e[t+2]==="3".charCodeAt(0)?"timed-metadata":!0&e[t]&&240==(240&e[t+1])?"audio":null},parseSampleRate:function(e){for(var t=0;t+5<e.length;){if(255===e[t]&&240==(246&e[t+1]))return Ol[(60&e[t+2])>>>2];t++}return null},parseAacTimestamp:function(e){var t,i,n;t=10,64&e[5]&&(t+=4,t+=Sl(e.subarray(10,14)));do{if((i=Sl(e.subarray(t+4,t+8)))<1)return null;if("PRIV"===String.fromCharCode(e[t],e[t+1],e[t+2],e[t+3])){n=e.subarray(t+10,t+i+10);for(var r=0;r<n.byteLength;r++)if(0===n[r]){if("com.apple.streaming.transportStreamTimestamp"!==unescape(function(e,t,i){var n,r="";for(n=t;n<i;n++)r+="%"+("00"+e[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]}}t+=10,t+=i}while(t<e.byteLength);return null}},kl=9e4,Pl=(Dl=function(e){return 9e4*e},Nl=function(e,t){return e*t},Cl=function(e){return e/9e4},Ll=function(e,t){return e/t},ml),Rl={};Rl.ts=Il,Rl.aac=jl;function zl(e,t,i){for(var n,r,a,s,o=0,l=188,u=!1;l<=e.byteLength;)if(71!==e[o]||71!==e[l]&&l!==e.byteLength)o++,l++;else{switch(n=e.subarray(o,l),Rl.ts.parseType(n,t.pid)){case"pes":r=Rl.ts.parsePesType(n,t.table),a=Rl.ts.parsePayloadUnitStartIndicator(n),"audio"===r&&a&&(s=Rl.ts.parsePesTime(n))&&(s.type="audio",i.audio.push(s),u=!0)}if(u)break;o+=188,l+=188}for(o=(l=e.byteLength)-188,u=!1;0<=o;)if(71!==e[o]||71!==e[l]&&l!==e.byteLength)o--,l--;else{switch(n=e.subarray(o,l),Rl.ts.parseType(n,t.pid)){case"pes":r=Rl.ts.parsePesType(n,t.table),a=Rl.ts.parsePayloadUnitStartIndicator(n),"audio"===r&&a&&(s=Rl.ts.parsePesTime(n))&&(s.type="audio",i.audio.push(s),u=!0)}if(u)break;o-=188,l-=188}}function Ul(e,t,i){for(var n,r,a,s,o,l,u,c=0,h=188,d=!1,p={data:[],size:0};h<e.byteLength;)if(71!==e[c]||71!==e[h])c++,h++;else{switch(n=e.subarray(c,h),Rl.ts.parseType(n,t.pid)){case"pes":if(r=Rl.ts.parsePesType(n,t.table),a=Rl.ts.parsePayloadUnitStartIndicator(n),"video"===r&&(a&&!d&&(s=Rl.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),l=0;p.data.length;)u=p.data.shift(),o.set(u,l),l+=u.byteLength;if(Rl.ts.videoPacketContainsKeyFrame(o)){var f=Rl.ts.parsePesTime(o);f?(i.firstKeyFrame=f,i.firstKeyFrame.type="video"):console.warn("Failed to extract PTS/DTS from PES at first keyframe. This could be an unusual TS segment, or else mux.js did not parse your TS segment correctly. If you know your TS segments do contain PTS/DTS on keyframes please file a bug report! You can try ffprobe to double check for yourself.")}p.size=0}p.data.push(n),p.size+=n.byteLength}}if(d&&i.firstKeyFrame)break;c+=188,h+=188}for(c=(h=e.byteLength)-188,d=!1;0<=c;)if(71!==e[c]||71!==e[h])c--,h--;else{switch(n=e.subarray(c,h),Rl.ts.parseType(n,t.pid)){case"pes":r=Rl.ts.parsePesType(n,t.table),a=Rl.ts.parsePayloadUnitStartIndicator(n),"video"===r&&a&&(s=Rl.ts.parsePesTime(n))&&(s.type="video",i.video.push(s),d=!0)}if(d)break;c-=188,h-=188}}function Bl(e){var t={pid:null,table:null},i={};for(var n in!function(e,t){for(var i,n=0,r=188;r<e.byteLength;)if(71!==e[n]||71!==e[r])n++,r++;else{switch(i=e.subarray(n,r),Rl.ts.parseType(i,t.pid)){case"pat":t.pid||(t.pid=Rl.ts.parsePat(i));break;case"pmt":t.table||(t.table=Rl.ts.parsePmt(i))}if(t.pid&&t.table)return;n+=188,r+=188}}(e,t),t.table){if(t.table.hasOwnProperty(n))switch(t.table[n]){case Ml:i.video=[],Ul(e,t,i),0===i.video.length&&delete i.video;break;case wl:i.audio=[],zl(e,t,i),0===i.audio.length&&delete i.audio}}return i}var Fl=kl,Gl=function(e,t){var i;return(i=(Rl.aac.isLikelyAacData(e)?function(e){for(var t,i=!1,n=0,r=null,a=null,s=0,o=0;3<=e.length-o;){switch(Rl.aac.parseType(e,o)){case"timed-metadata":if(e.length-o<10){i=!0;break}if((s=Rl.aac.parseId3TagSize(e,o))>e.length){i=!0;break}null===a&&(t=e.subarray(o,o+s),a=Rl.aac.parseAacTimestamp(t)),o+=s;break;case"audio":if(e.length-o<7){i=!0;break}if((s=Rl.aac.parseAdtsSize(e,o))>e.length){i=!0;break}null===r&&(t=e.subarray(o,o+s),r=Rl.aac.parseSampleRate(t)),n++,o+=s;break;default:o++}if(i)return null}if(null===r||null===a)return null;var l=Fl/r;return{audio:[{type:"audio",dts:a,pts:a},{type:"audio",dts:a+1024*n*l,pts:a+1024*n*l}]}}:Bl)(e))&&(i.audio||i.video)?(function(e,t){if(e.audio&&e.audio.length){var i=t;void 0===i&&(i=e.audio[0].dts),e.audio.forEach(function(e){e.dts=Pl(e.dts,i),e.pts=Pl(e.pts,i),e.dtsTime=e.dts/Fl,e.ptsTime=e.pts/Fl})}if(e.video&&e.video.length){var n=t;if(void 0===n&&(n=e.video[0].dts),e.video.forEach(function(e){e.dts=Pl(e.dts,n),e.pts=Pl(e.pts,n),e.dtsTime=e.dts/Fl,e.ptsTime=e.pts/Fl}),e.firstKeyFrame){var r=e.firstKeyFrame;r.dts=Pl(r.dts,n),r.pts=Pl(r.pts,n),r.dtsTime=r.dts/Fl,r.ptsTime=r.dts/Fl}}}(i,t),i):null};function Hl(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var Yl=function(e,t,i){return t&&Ql(e.prototype,t),i&&Ql(e,i),e};function Ql(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var Vl=null,Wl=(ql.prototype.decrypt=function(e,t,i,n,r,a){var s=this._key[1],o=e^s[0],l=n^s[1],u=i^s[2],c=t^s[3],h=void 0,d=void 0,p=void 0,f=s.length/4-2,g=void 0,m=4,v=this._tables[1],y=v[0],_=v[1],M=v[2],w=v[3],b=v[4];for(g=0;g<f;g++)h=y[o>>>24]^_[l>>16&255]^M[u>>8&255]^w[255&c]^s[m],d=y[l>>>24]^_[u>>16&255]^M[c>>8&255]^w[255&o]^s[m+1],p=y[u>>>24]^_[c>>16&255]^M[o>>8&255]^w[255&l]^s[m+2],c=y[c>>>24]^_[o>>16&255]^M[l>>8&255]^w[255&u]^s[m+3],m+=4,o=h,l=d,u=p;for(g=0;g<4;g++)r[(3&-g)+a]=b[o>>>24]<<24^b[l>>16&255]<<16^b[u>>8&255]<<8^b[255&c]^s[m++],h=o,o=l,l=u,u=c,c=h},ql);function ql(e){Hl(this,ql),Vl=Vl||function(){var e=[[[],[],[],[],[]],[[],[],[],[],[]]],t=e[0],i=e[1],n=t[4],r=i[4],a=void 0,s=void 0,o=void 0,l=[],u=[],c=void 0,h=void 0,d=void 0,p=void 0,f=void 0;for(a=0;a<256;a++)u[(l[a]=a<<1^283*(a>>7))^a]=a;for(s=o=0;!n[s];s^=c||1,o=u[o]||1)for(d=(d=o^o<<1^o<<2^o<<3^o<<4)>>8^255&d^99,f=16843009*l[h=l[c=l[r[n[s]=d]=s]]]^65537*h^257*c^16843008*s,p=257*l[d]^16843008*d,a=0;a<4;a++)t[a][s]=p=p<<24^p>>>8,i[a][d]=f=f<<24^f>>>8;for(a=0;a<5;a++)t[a]=t[a].slice(0),i[a]=i[a].slice(0);return e}(),this._tables=[[Vl[0][0].slice(),Vl[0][1].slice(),Vl[0][2].slice(),Vl[0][3].slice(),Vl[0][4].slice()],[Vl[1][0].slice(),Vl[1][1].slice(),Vl[1][2].slice(),Vl[1][3].slice(),Vl[1][4].slice()]];var t=void 0,i=void 0,n=void 0,r=void 0,a=void 0,s=this._tables[0][4],o=this._tables[1],l=e.length,u=1;if(4!==l&&6!==l&&8!==l)throw new Error("Invalid aes key size");for(r=e.slice(0),a=[],this._key=[r,a],t=l;t<4*l+28;t++)n=r[t-1],(t%l==0||8===l&&t%l==4)&&(n=s[n>>>24]<<24^s[n>>16&255]<<16^s[n>>8&255]<<8^s[255&n],t%l==0&&(n=n<<8^n>>>24^u<<24,u=u<<1^283*(u>>7))),r[t]=r[t-l]^n;for(i=0;t;i++,t--)n=r[3&i?t:t-4],a[i]=t<=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]]}var Xl=(Zl.prototype.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},Zl.prototype.off=function(e,t){if(!this.listeners[e])return!1;var i=this.listeners[e].indexOf(t);return this.listeners[e].splice(i,1),-1<i},Zl.prototype.trigger=function(e,t){var i=this.listeners[e];if(i)if(2===arguments.length)for(var n=i.length,r=0;r<n;++r)i[r].call(this,t);else for(var a=Array.prototype.slice.call(arguments,1),s=i.length,o=0;o<s;++o)i[o].apply(this,a)},Zl.prototype.dispose=function(){this.listeners={}},Zl.prototype.pipe=function(t){this.on("data",function(e){t.push(e)})},Zl);function Zl(){Hl(this,Zl),this.listeners={}}var $l,Kl=(function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(Jl,$l=Xl),Jl.prototype.processJob_=function(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null},Jl.prototype.push=function(e){this.jobs.push(e),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))},Jl);function Jl(){Hl(this,Jl);var e=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,$l.call(this,Xl));return e.jobs=[],e.delay=1,e.timeout_=null,e}function eu(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24}function tu(e,t,i){var n=new Int32Array(e.buffer,e.byteOffset,e.byteLength>>2),r=new Wl(Array.prototype.slice.call(t)),a=new Uint8Array(e.byteLength),s=new Int32Array(a.buffer),o=void 0,l=void 0,u=void 0,c=void 0,h=void 0,d=void 0,p=void 0,f=void 0,g=void 0;for(o=i[0],l=i[1],u=i[2],c=i[3],g=0;g<n.length;g+=4)h=eu(n[g]),d=eu(n[g+1]),p=eu(n[g+2]),f=eu(n[g+3]),r.decrypt(h,d,p,f,s,g),s[g]=eu(s[g]^o),s[g+1]=eu(s[g+1]^l),s[g+2]=eu(s[g+2]^u),s[g+3]=eu(s[g+3]^c),o=h,l=d,u=p,c=f;return a}var iu=(nu.prototype.decryptChunk_=function(t,i,n,r){return function(){var e=tu(t,i,n);r.set(e,t.byteOffset)}},Yl(nu,null,[{key:"STEP",get:function(){return 32e3}}]),nu);function nu(e,t,i,n){Hl(this,nu);var r=nu.STEP,a=new Int32Array(e.buffer),s=new Uint8Array(e.byteLength),o=0;for(this.asyncStream_=new Kl,this.asyncStream_.push(this.decryptChunk_(a.subarray(o,o+r),t,i,s)),o=r;o<a.length;o+=r)i=new Uint32Array([eu(a[o-4]),eu(a[o-3]),eu(a[o-2]),eu(a[o-1])]),this.asyncStream_.push(this.decryptChunk_(a.subarray(o,o+r),t,i,s));this.asyncStream_.push(function(){var e;n(null,(e=s).subarray(0,e.byteLength-e[e.byteLength-1]))})}function ru(e,t){return/^[a-z]+:/i.test(t)?t:(/\/\//i.test(e)||(e=ua.buildAbsoluteURL(y.location.href,e)),ua.buildAbsoluteURL(e,t))}function au(e,t,i){return e&&i.responseURL&&t!==i.responseURL?i.responseURL:t}function su(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var ou=function(e,t,i){return t&&lu(e.prototype,t),i&&lu(e,i),e};function lu(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function uu(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function cu(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function hu(r,a){["AUDIO","SUBTITLES"].forEach(function(e){for(var t in r.mediaGroups[e])for(var i in r.mediaGroups[e][t]){var n=r.mediaGroups[e][t][i];a(n,e,t,i)}})}function du(e,t){var i=yu(e,{}),n=i.playlists[t.id];if(!n)return null;if(n.segments&&t.segments&&n.segments.length===t.segments.length&&n.endList===t.endList&&n.mediaSequence===t.mediaSequence)return null;var r=yu(n,t);n.segments&&(r.segments=function(e,t,i){var n=t.slice();i=i||0;for(var r=Math.min(e.length,t.length+i),a=i;a<r;a++)n[a-i]=yu(e[a],n[a-i]);return n}(n.segments,t.segments,t.mediaSequence-n.mediaSequence)),r.segments.forEach(function(e){var t,i;t=e,i=r.resolvedUri,t.resolvedUri||(t.resolvedUri=ru(i,t.uri)),t.key&&!t.key.resolvedUri&&(t.key.resolvedUri=ru(i,t.key.uri)),t.map&&!t.map.resolvedUri&&(t.map.resolvedUri=ru(i,t.map.uri))});for(var a=0;a<i.playlists.length;a++)i.playlists[a].id===t.id&&(i.playlists[a]=r);return i.playlists[t.id]=r,i.playlists[t.uri]=r,i}function pu(e,t){return e+"-"+t}function fu(e){for(var t=e.playlists.length;t--;){var i=e.playlists[t];i.resolvedUri=ru(e.uri,i.uri),i.id=pu(t,i.uri),e.playlists[i.id]=i,(e.playlists[i.uri]=i).attributes||(i.attributes={},_u.warn("Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute."))}}function gu(t){hu(t,function(e){e.uri&&(e.resolvedUri=ru(t.uri,e.uri))})}function mu(e,t){var i=e.segments[e.segments.length-1];return t&&i&&i.duration?1e3*i.duration:500*(e.targetDuration||10)}var vu=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var i=[],n=!0,r=!1,a=void 0;try{for(var s,o=e[Symbol.iterator]();!(n=(s=o.next()).done)&&(i.push(s.value),!t||i.length!==t);n=!0);}catch(e){r=!0,a=e}finally{try{!n&&o.return&&o.return()}finally{if(r)throw a}}return i}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},yu=sa.mergeOptions,_u=sa.log,Mu=(uu(wu,sa.EventTarget),ou(wu,[{key:"playlistRequestError",value:function(e,t,i){var n=t.uri,r=t.id;this.request=null,i&&(this.state=i),this.error={playlist:this.master.playlists[r],status:e.status,message:"HLS playlist request error at URL: "+n+".",responseText:e.responseText,code:500<=e.status?4:2},this.trigger("error")}},{key:"haveMetadata",value:function(e,t,i){var n=this;this.request=null,this.state="HAVE_METADATA";var r=new ma;this.customTagParsers.forEach(function(e){return r.addParser(e)}),this.customTagMappers.forEach(function(e){return r.addTagMapper(e)}),r.push(e.responseText),r.end(),r.manifest.uri=t,r.manifest.id=i,r.manifest.attributes=r.manifest.attributes||{};var a=du(this.master,r.manifest);this.targetDuration=r.manifest.targetDuration,a?(this.master=a,this.media_=this.master.playlists[i]):this.trigger("playlistunchanged"),this.media().endList||(y.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=y.setTimeout(function(){n.trigger("mediaupdatetimeout")},mu(this.media(),!!a))),this.trigger("loadedplaylist")}},{key:"dispose",value:function(){this.trigger("dispose"),this.stopRequest(),y.clearTimeout(this.mediaUpdateTimeout),y.clearTimeout(this.finalRenditionTimeout),this.off()}},{key:"stopRequest",value:function(){if(this.request){var e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}},{key:"media",value:function(i,e){var n=this;if(!i)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);if("string"==typeof i){if(!this.master.playlists[i])throw new Error("Unknown playlist URI: "+i);i=this.master.playlists[i]}if(y.clearTimeout(this.finalRenditionTimeout),e){var t=i.targetDuration/2*1e3||5e3;this.finalRenditionTimeout=y.setTimeout(this.media.bind(this,i,!1),t)}else{var r=this.state,a=!this.media_||i.id!==this.media_.id;if(this.master.playlists[i.id].endList)return this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state="HAVE_METADATA",this.media_=i,void(a&&(this.trigger("mediachanging"),this.trigger("mediachange")));if(a){if(this.state="SWITCHING_MEDIA",this.request){if(i.resolvedUri===this.request.url)return;this.request.onreadystatechange=null,this.request.abort(),this.request=null}this.media_&&this.trigger("mediachanging"),this.request=this.hls_.xhr({uri:i.resolvedUri,withCredentials:this.withCredentials},function(e,t){if(n.request){if(i.resolvedUri=au(n.handleManifestRedirects,i.resolvedUri,t),e)return n.playlistRequestError(n.request,i,r);n.haveMetadata(t,i.uri,i.id),"HAVE_MASTER"===r?n.trigger("loadedmetadata"):n.trigger("mediachange")}})}}}},{key:"pause",value:function(){this.stopRequest(),y.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(e){var t=this;y.clearTimeout(this.mediaUpdateTimeout);var i=this.media();if(e){var n=i?i.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=y.setTimeout(function(){return t.load()},n)}else this.started?i&&!i.endList?this.trigger("mediaupdatetimeout"):this.trigger("loadedplaylist"):this.start()}},{key:"start",value:function(){var r=this;this.started=!0,this.request=this.hls_.xhr({uri:this.srcUrl,withCredentials:this.withCredentials},function(e,t){if(r.request){if(r.request=null,e)return r.error={status:t.status,message:"HLS playlist request error at URL: "+r.srcUrl+".",responseText:t.responseText,code:2},"HAVE_NOTHING"===r.state&&(r.started=!1),r.trigger("error");var i=new ma;if(r.customTagParsers.forEach(function(e){return i.addParser(e)}),r.customTagMappers.forEach(function(e){return i.addTagMapper(e)}),i.push(t.responseText),i.end(),r.state="HAVE_MASTER",r.srcUrl=au(r.handleManifestRedirects,r.srcUrl,t),i.manifest.uri=r.srcUrl,i.manifest.playlists)return r.master=i.manifest,fu(r.master),gu(r.master),r.trigger("loadedplaylist"),void(r.request||r.media(i.manifest.playlists[0]));var n=pu(0,r.srcUrl);return r.master={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:y.location.href,playlists:[{uri:r.srcUrl,id:n,resolvedUri:r.srcUrl,attributes:{}}]},r.master.playlists[n]=r.master.playlists[0],r.master.playlists[r.srcUrl]=r.master.playlists[0],r.haveMetadata(t,r.srcUrl,n),r.trigger("loadedmetadata")}})}}]),wu);function wu(e,t){var i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};su(this,wu);var n=cu(this,(wu.__proto__||Object.getPrototypeOf(wu)).call(this)),r=i.withCredentials,a=void 0!==r&&r,s=i.handleManifestRedirects,o=void 0!==s&&s;n.srcUrl=e,n.hls_=t,n.withCredentials=a,n.handleManifestRedirects=o;var l=t.options_;if(n.customTagParsers=l&&l.customTagParsers||[],n.customTagMappers=l&&l.customTagMappers||[],!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:ru(n.master.uri,n.media().uri),withCredentials:n.withCredentials},function(e,t){if(n.request)return e?n.playlistRequestError(n.request,n.media(),"HAVE_METADATA"):void n.haveMetadata(n.request,n.media().uri,n.media().id)}))}),n}function bu(e,t,i){var n,r;return void 0===t&&(t=e.mediaSequence+e.segments.length),t<e.mediaSequence?0:(n=function(e,t){var i=0,n=t-e.mediaSequence,r=e.segments[n];if(r){if(void 0!==r.start)return{result:r.start,precise:!0};if(void 0!==r.end)return{result:r.end-r.duration,precise:!0}}for(;n--;){if(void 0!==(r=e.segments[n]).end)return{result:i+r.end,precise:!0};if(i+=r.duration,void 0!==r.start)return{result:i+r.start,precise:!0}}return{result:i,precise:!1}}(e,t)).precise?n.result:(r=function(e,t){for(var i=0,n=void 0,r=t-e.mediaSequence;r<e.segments.length;r++){if(void 0!==(n=e.segments[r]).start)return{result:n.start-i,precise:!0};if(i+=n.duration,void 0!==n.end)return{result:n.end-i,precise:!0}}return{result:-1,precise:!1}}(e,t)).precise?r.result:n.result+i}function Tu(e,t,i){if(!e)return 0;if("number"!=typeof i&&(i=0),void 0===t){if(e.totalDuration)return e.totalDuration;if(!e.endList)return y.Infinity}return bu(e,t,i)}function Au(e,t,i){var n=0;if(i<t){var r=[i,t];t=r[0],i=r[1]}if(t<0){for(var a=t;a<Math.min(0,i);a++)n+=e.targetDuration;t=0}for(var s=t;s<i;s++)n+=e.segments[s].duration;return n}function xu(e,t){if(!e.segments.length)return 0;var i=e.segments.length,n=e.segments[i-1].duration||e.targetDuration,r="number"==typeof t?t:n+2*e.targetDuration;if(0===r)return i;for(var a=0;i--&&!(r<=(a+=e.segments[i].duration)););return Math.max(0,i)}function Eu(e,t,i,n){if(!e||!e.segments)return null;if(e.endList)return Tu(e);if(null===t)return null;t=t||0;var r=i?xu(e,n):e.segments.length;return bu(e,e.mediaSequence+r,t)}function Su(e){return e-Math.floor(e)==0}function Du(e,t){if(Su(t))return t+.1*e;for(var i=t.toString().split(".")[1].length,n=1;n<=i;n++){var r=Math.pow(10,n),a=t*r;if(Su(a)||n===i)return(a+e)/r}}function Nu(e){return e.excludeUntil&&e.excludeUntil>Date.now()}function Cu(e){return e.excludeUntil&&e.excludeUntil===1/0}function Lu(e){var t=Nu(e);return!e.disabled&&!t}function Iu(e,t){return t.attributes&&t.attributes[e]}function Ou(e,t){if(1===e.playlists.length)return!0;var i=t.attributes.BANDWIDTH||Number.MAX_VALUE;return 0===e.playlists.filter(function(e){return!!Lu(e)&&(e.attributes.BANDWIDTH||0)<i}).length}function ju(){return function e(t,n){t=nc({timeout:45e3},t);var i=e.beforeRequest||sa.Hls.xhr.beforeRequest;if(i&&"function"==typeof i){var r=i(t);r&&(t=r)}var a=ic(t,function(e,t){var i=a.response;!e&&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))),t.headers&&(a.responseHeaders=t.headers),e&&"ETIMEDOUT"===e.code&&(a.timedout=!0),e||a.aborted||200===t.statusCode||206===t.statusCode||0===t.statusCode||(e=new Error("XHR Failed with a response of: "+(a&&(i||a.responseText)))),n(e,a)}),s=a.abort;return a.abort=function(){return a.aborted=!0,s.apply(a,arguments)},a.uri=t.uri,a.requestTime=Date.now(),a}}function ku(e){var t,i,n={};return e.byterange&&(n.Range=(t=e.byterange,i=t.offset+t.length-1,"bytes="+t.offset+"-"+i)),n}function Pu(e,t){var i=e.toString(16);return"00".substring(0,2-i.length)+i+(t%2?" ":"")}function Ru(e){return 32<=e&&e<126?String.fromCharCode(e):"."}function zu(i){var n={};return Object.keys(i).forEach(function(e){var t=i[e];ArrayBuffer.isView(t)?n[e]={bytes:t.buffer,byteOffset:t.byteOffset,byteLength:t.byteLength}:n[e]=t}),n}function Uu(e){var t=e.byterange||{length:1/0,offset:0};return[t.length,t.offset,e.resolvedUri].join(",")}function Bu(e){return e.resolvedUri}function Fu(e){for(var t=Array.prototype.slice.call(e),i="",n=0;n<t.length/16;n++)i+=t.slice(16*n,16*n+16).map(Pu).join("")+" "+t.slice(16*n,16*n+16).map(Ru).join("")+"\n";return i}function Gu(e){var t=e.playlist,i=e.time,n=void 0===i?void 0:i,r=e.callback;if(!r)throw new Error("getProgramTime: callback must be provided");if(!t||void 0===n)return r({message:"getProgramTime: playlist and time must be provided"});var a=function(e,t){if(!t||!t.segments||0===t.segments.length)return null;for(var i=0,n=void 0,r=0;r<t.segments.length&&!(e<=(i=(n=t.segments[r]).videoTimingInfo?n.videoTimingInfo.transmuxedPresentationEnd:i+n.duration));r++);var a=t.segments[t.segments.length-1];if(a.videoTimingInfo&&a.videoTimingInfo.transmuxedPresentationEnd<e)return null;if(i<e){if(e>i+.25*a.duration)return null;n=a}return{segment:n,estimatedStart:n.videoTimingInfo?n.videoTimingInfo.transmuxedPresentationStart:i-n.duration,type:n.videoTimingInfo?"accurate":"estimate"}}(n,t);if(!a)return r({message:"valid programTime was not found"});if("estimate"===a.type)return r({message:"Accurate programTime could not be determined. Please seek to e.seekTime and try again",seekTime:a.estimatedStart});var s={mediaSeconds:n},o=function(e,t){if(!t.dateTimeObject)return null;var i=t.videoTimingInfo.transmuxerPrependedSeconds,n=e-(t.videoTimingInfo.transmuxedPresentationStart+i);return new Date(t.dateTimeObject.getTime()+1e3*n)}(n,a.segment);return o&&(s.programDateTime=o.toISOString()),r(null,s)}function Hu(e){var t=e.programTime,i=e.playlist,n=e.retryCount,r=void 0===n?2:n,a=e.seekTo,s=e.pauseAfterSeek,o=void 0===s||s,l=e.tech,u=e.callback;if(!u)throw new Error("seekToProgramTime: callback must be provided");if(void 0===t||!i||!a)return u({message:"seekToProgramTime: programTime, seekTo and playlist must be provided"});if(!i.endList&&!l.hasStarted_)return u({message:"player must be playing a live stream to start buffering"});if(!function(e){if(!e.segments||0===e.segments.length)return!1;for(var t=0;t<e.segments.length;t++){if(!e.segments[t].dateTimeObject)return!1}return!0}(i))return u({message:"programDateTime tags must be provided in the manifest "+i.resolvedUri});var c=function(e,t){var i=void 0;try{i=new Date(e)}catch(e){return null}if(!t||!t.segments||0===t.segments.length)return null;var n=t.segments[0];if(i<n.dateTimeObject)return null;for(var r=0;r<t.segments.length-1;r++){if(n=t.segments[r],i<t.segments[r+1].dateTimeObject)break}var a,s=t.segments[t.segments.length-1],o=s.dateTimeObject,l=s.videoTimingInfo?(a=s.videoTimingInfo).transmuxedPresentationEnd-a.transmuxedPresentationStart-a.transmuxerPrependedSeconds:s.duration+.25*s.duration;return new Date(o.getTime()+1e3*l)<i?null:(o<i&&(n=s),{segment:n,estimatedStart:n.videoTimingInfo?n.videoTimingInfo.transmuxedPresentationStart:tc.duration(t,t.mediaSequence+t.segments.indexOf(n)),type:n.videoTimingInfo?"accurate":"estimate"})}(t,i);if(!c)return u({message:t+" was not found in the stream"});var h=c.segment,d=function(e,t){var i=void 0,n=void 0;try{i=new Date(e),n=new Date(t)}catch(e){}var r=i.getTime();return(n.getTime()-r)/1e3}(h.dateTimeObject,t);if("estimate"===c.type)return 0===r?u({message:t+" is not buffered yet. Try again"}):(a(c.estimatedStart+d),void l.one("seeked",function(){Hu({programTime:t,playlist:i,retryCount:r-1,seekTo:a,pauseAfterSeek:o,tech:l,callback:u})}));var p=h.start+d;l.one("seeked",function(){return u(null,l.currentTime())}),o&&l.pause(),a(p)}function Yu(e,t){var i=[],n=void 0;if(e&&e.length)for(n=0;n<e.length;n++)t(e.start(n),e.end(n))&&i.push([e.start(n),e.end(n)]);return sa.createTimeRanges(i)}function Qu(e,i){return Yu(e,function(e,t){return e-.1<=i&&i<=t+.1})}function Vu(e,t){return Yu(e,function(e){return t<=e-1/30})}function Wu(e){var t=[];if(!e||!e.length)return"";for(var i=0;i<e.length;i++)t.push(e.start(i)+" => "+e.end(i));return t.join(", ")}function qu(e){for(var t=[],i=0;i<e.length;i++)t.push({start:e.start(i),end:e.end(i)});return t}function Xu(e,t,i){var n=void 0,r=void 0;if(i&&i.cues)for(n=i.cues.length;n--;)(r=i.cues[n]).startTime<=t&&r.endTime>=e&&i.removeCue(r)}function Zu(e){return isNaN(e)||Math.abs(e)===1/0?Number.MAX_VALUE:e}function $u(e,t,i){var r=y.WebKitDataCue||y.VTTCue;if(t&&t.forEach(function(e){var t=e.stream;this.inbandTextTracks_[t].addCue(new r(e.startTime+this.timestampOffset,e.endTime+this.timestampOffset,e.text))},e),i){var a=Zu(e.mediaSource_.duration);if(i.forEach(function(e){var n=e.cueTime+this.timestampOffset;!("number"!=typeof n||y.isNaN(n)||n<0)&&n<1/0&&e.frames.forEach(function(e){var t,i=new r(n,n,e.value||e.url||e.data||"");i.frame=e,i.value=e,t=i,Object.defineProperties(t.frame,{id:{get:function(){return sa.log.warn("cue.frame.id is deprecated. Use cue.value.key instead."),t.value.key}},value:{get:function(){return sa.log.warn("cue.frame.value is deprecated. Use cue.value.data instead."),t.value.data}},privateData:{get:function(){return sa.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead."),t.value.data}}}),this.metadataTrack_.addCue(i)},this)},e),e.metadataTrack_&&e.metadataTrack_.cues&&e.metadataTrack_.cues.length){for(var n=e.metadataTrack_.cues,s=[],o=0;o<n.length;o++)n[o]&&s.push(n[o]);var l=s.reduce(function(e,t){var i=e[t.startTime]||[];return i.push(t),e[t.startTime]=i,e},{}),u=Object.keys(l).sort(function(e,t){return Number(e)-Number(t)});u.forEach(function(e,t){var i=l[e],n=Number(u[t+1])||a;i.forEach(function(e){e.endTime=n})})}}}var Ku=sa.createTimeRange,Ju=Du.bind(null,1),ec=Du.bind(null,-1),tc={duration:Tu,seekable:function(e,t,i){var n=t||0,r=Eu(e,t,!0,i);return null===r?Ku():Ku(n,r)},safeLiveIndex:xu,getMediaInfoForTime:function(e,t,i,n){var r=void 0,a=void 0,s=e.segments.length,o=t-n;if(o<0){if(0<i)for(r=i-1;0<=r;r--)if(a=e.segments[r],0<(o+=ec(a.duration)))return{mediaIndex:r,startTime:n-Au(e,i,r)};return{mediaIndex:0,startTime:t}}if(i<0){for(r=i;r<0;r++)if((o-=e.targetDuration)<0)return{mediaIndex:0,startTime:t};i=0}for(r=i;r<s;r++)if(a=e.segments[r],(o-=Ju(a.duration))<0)return{mediaIndex:r,startTime:n+Au(e,i,r)};return{mediaIndex:s-1,startTime:t}},isEnabled:Lu,isDisabled:function(e){return e.disabled},isBlacklisted:Nu,isIncompatible:Cu,playlistEnd:Eu,isAes:function(e){for(var t=0;t<e.segments.length;t++)if(e.segments[t].key)return!0;return!1},isFmp4:function(e){for(var t=0;t<e.segments.length;t++)if(e.segments[t].map)return!0;return!1},hasAttribute:Iu,estimateSegmentRequestTime:function(e,t,i,n){var r=3<arguments.length&&void 0!==n?n:0;return Iu("BANDWIDTH",i)?(e*i.attributes.BANDWIDTH-8*r)/t:NaN},isLowestEnabledRendition:Ou},ic=sa.xhr,nc=sa.mergeOptions,rc=Object.freeze({createTransferableMessage:zu,initSegmentId:Uu,segmentKeyId:Bu,hexDump:Fu,tagDump:function(e){var t=e.bytes;return Fu(t)},textRanges:function(e){var t,i,n="",r=void 0;for(r=0;r<e.length;r++)n+=(i=r,(t=e).start(i)+"-"+t.end(i)+" ");return n}}),ac="undefined"!=typeof window?window:{},sc="undefined"==typeof Symbol?"__target":Symbol(),oc="application/javascript",lc=ac.BlobBuilder||ac.WebKitBlobBuilder||ac.MozBlobBuilder||ac.MSBlobBuilder,uc=ac.URL||ac.webkitURL||uc&&uc.msURL,cc=ac.Worker;function hc(r,a){return function(e){var t=this;if(!a)return new cc(r);if(cc&&!e){var i=gc(a.toString().replace(/^function.+?{/,"").slice(0,-1));return this[sc]=new cc(i),function(e,t){if(!e||!t)return;var i=e.terminate;e.objURL=t,e.terminate=function(){e.objURL&&uc.revokeObjectURL(e.objURL),i.call(e)}}(this[sc],i),this[sc]}var n={postMessage:function(e){t.onmessage&&setTimeout(function(){t.onmessage({data:e,target:n})})}};a.call(n),this.postMessage=function(e){setTimeout(function(){n.onmessage({data:e,target:t})})},this.isThisThread=!0}}if(cc){var dc,pc=gc("self.onmessage = function () {}"),fc=new Uint8Array(1);try{(dc=new cc(pc)).postMessage(fc,[fc.buffer])}catch(e){cc=null}finally{uc.revokeObjectURL(pc),dc&&dc.terminate()}}function gc(t){try{return uc.createObjectURL(new Blob([t],{type:oc}))}catch(e){var i=new lc;return i.append(t),uc.createObjectURL(i.getBlob(type))}}function mc(e){return e.map(function(e){return e.replace(/avc1\.(\d+)\.(\d+)/i,function(e,t,i){return"avc1."+("00"+Number(t).toString(16)).slice(-2)+"00"+("00"+Number(i).toString(16)).slice(-2)})})}function vc(e){var t,i=0<arguments.length&&void 0!==e?e:"",n={codecCount:0};return n.codecCount=i.split(",").length,n.codecCount=n.codecCount||2,(t=/(^|\s|,)+(avc[13])([^ ,]*)/i.exec(i))&&(n.videoCodec=t[2],n.videoObjectTypeIndicator=t[3]),n.audioProfile=/(^|\s|,)+mp4a.[0-9A-Fa-f]+\.([0-9A-Fa-f]+)/i.exec(i),n.audioProfile=n.audioProfile&&n.audioProfile[2],n}function yc(e,t,i){return e+"/"+t+'; codecs="'+i.filter(function(e){return!!e}).join(", ")+'"'}function _c(e,t){var i,n,r=(i=t).segments&&i.segments.length&&i.segments[0].map?"mp4":"mp2t",a=(n=t.attributes||{}).CODECS?vc(n.CODECS):xc,s=t.attributes||{},o=!0,l=!1;if(!t)return[];if(e.mediaGroups.AUDIO&&s.AUDIO){var u=e.mediaGroups.AUDIO[s.AUDIO];if(u)for(var c in o=!(l=!0),u)if(!u[c].uri&&!u[c].playlists){o=!0;break}}l&&!a.audioProfile&&(o||(a.audioProfile=function(e,t){if(!e.mediaGroups.AUDIO||!t)return null;var i=e.mediaGroups.AUDIO[t];if(!i)return null;for(var n in i){var r=i[n];if(r.default&&r.playlists)return vc(r.playlists[0].attributes.CODECS).audioProfile}return null}(e,s.AUDIO)),a.audioProfile||(sa.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=xc.audioProfile));var h={};a.videoCodec&&(h.video=""+a.videoCodec+a.videoObjectTypeIndicator),a.audioProfile&&(h.audio="mp4a.40."+a.audioProfile);var d=yc("audio",r,[h.audio]),p=yc("video",r,[h.video]),f=yc("video",r,[h.video,h.audio]);return l?!o&&h.video?[p,d]:o||h.video?[f,d]:[d,d]:h.video?[f]:[d]}function Mc(e){var r={type:"",parameters:{}},t=e.trim().split(";");return r.type=t.shift().trim(),t.forEach(function(e){var t=e.trim().split("=");if(1<t.length){var i=t[0].replace(/"/g,"").trim(),n=t[1].replace(/"/g,"").trim();r.parameters[i]=n}}),r}function wc(e){return/mp4a\.\d+.\d+/i.test(e)}function bc(e){return/avc1\.[\da-f]+/i.test(e)}function Tc(e,t){var i=e.addSourceBuffer(t),n=Object.create(null);function r(t){"function"==typeof i[t]?n[t]=function(){return i[t].apply(i,arguments)}:void 0===n[t]&&Object.defineProperty(n,t,{get:function(){return i[t]},set:function(e){return i[t]=e}})}for(var a in n.updating=!1,n.realBuffer_=i)r(a);return n}var Ac=new hc("./transmuxer-worker.worker.js",function(e,t){var Tt=this;!function(){function e(){this.init=function(){var a={};this.on=function(e,t){a[e]||(a[e]=[]),a[e]=a[e].concat(t)},this.off=function(e,t){var i;return!!a[e]&&(i=a[e].indexOf(t),a[e]=a[e].slice(),a[e].splice(i,1),-1<i)},this.trigger=function(e){var t,i,n,r;if(t=a[e])if(2===arguments.length)for(n=t.length,i=0;i<n;++i)t[i].call(this,arguments[1]);else{for(r=[],i=arguments.length,i=1;i<arguments.length;++i)r.push(arguments[i]);for(n=t.length,i=0;i<n;++i)t[i].apply(this,r)}},this.dispose=function(){a={}}}}e.prototype.pipe=function(t){return this.on("data",function(e){t.push(e)}),this.on("done",function(e){t.flush(e)}),this.on("partialdone",function(e){t.partialFlush(e)}),this.on("endedtimeline",function(e){t.endTimeline(e)}),this.on("reset",function(e){t.reset(e)}),t},e.prototype.push=function(e){this.trigger("data",e)},e.prototype.flush=function(e){this.trigger("done",e)},e.prototype.partialFlush=function(e){this.trigger("partialdone",e)},e.prototype.endTimeline=function(e){this.trigger("endedtimeline",e)},e.prototype.reset=function(e){this.trigger("reset",e)};var u,t,i,r,a,n,s,o,l,c,h,d,p,f,g,m,v,y,_,M,w,b,T,A,x,E,S,D,N,C,L,I,O,j,k,P,R,z,U,B,F=e,G=Math.pow(2,32)-1;!function(){var e;if(b={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],pasp:[],sdtp:[],smhd:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],styp:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[]},"undefined"!=typeof Uint8Array){for(e in b)b.hasOwnProperty(e)&&(b[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);T=new Uint8Array(["i".charCodeAt(0),"s".charCodeAt(0),"o".charCodeAt(0),"m".charCodeAt(0)]),x=new Uint8Array(["a".charCodeAt(0),"v".charCodeAt(0),"c".charCodeAt(0),"1".charCodeAt(0)]),A=new Uint8Array([0,0,0,1]),E=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]),S=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]),D={video:E,audio:S},L=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),C=new Uint8Array([0,0,0,0,0,0,0,0]),I=new Uint8Array([0,0,0,0,0,0,0,0]),O=I,j=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),k=I,N=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}}(),u=function(e){var t,i,n=[],r=0;for(t=1;t<arguments.length;t++)n.push(arguments[t]);for(t=n.length;t--;)r+=n[t].byteLength;for(i=new Uint8Array(r+8),new DataView(i.buffer,i.byteOffset,i.byteLength).setUint32(0,i.byteLength),i.set(e,4),t=0,r=8;t<n.length;t++)i.set(n[t],r),r+=n[t].byteLength;return i},t=function(){return u(b.dinf,u(b.dref,L))},i=function(e){return u(b.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,e.audioobjecttype<<3|e.samplingfrequencyindex>>>1,e.samplingfrequencyindex<<7|e.channelcount<<3,6,1,2]))},g=function(e){return u(b.hdlr,D[e])},f=function(e){var t=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,e.duration>>>24&255,e.duration>>>16&255,e.duration>>>8&255,255&e.duration,85,196,0,0]);return e.samplerate&&(t[12]=e.samplerate>>>24&255,t[13]=e.samplerate>>>16&255,t[14]=e.samplerate>>>8&255,t[15]=255&e.samplerate),u(b.mdhd,t)},p=function(e){return u(b.mdia,f(e),g(e.type),n(e))},a=function(e){return u(b.mfhd,new Uint8Array([0,0,0,0,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e]))},n=function(e){return u(b.minf,"video"===e.type?u(b.vmhd,N):u(b.smhd,C),t(),v(e))},s=function(e,t){for(var i=[],n=t.length;n--;)i[n]=_(t[n]);return u.apply(null,[b.moof,a(e)].concat(i))},o=function(e){for(var t=e.length,i=[];t--;)i[t]=h(e[t]);return u.apply(null,[b.moov,c(4294967295)].concat(i).concat(l(e)))},l=function(e){for(var t=e.length,i=[];t--;)i[t]=M(e[t]);return u.apply(null,[b.mvex].concat(i))},c=function(e){var t=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e,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 u(b.mvhd,t)},m=function(e){var t,i,n=e.samples||[],r=new Uint8Array(4+n.length);for(i=0;i<n.length;i++)t=n[i].flags,r[i+4]=t.dependsOn<<4|t.isDependedOn<<2|t.hasRedundancy;return u(b.sdtp,r)},v=function(e){return u(b.stbl,y(e),u(b.stts,k),u(b.stsc,O),u(b.stsz,j),u(b.stco,I))},y=function(e){return u(b.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),("video"===e.type?P:R)(e))},P=function(e){var t,i,n=e.sps||[],r=e.pps||[],a=[],s=[];for(t=0;t<n.length;t++)a.push((65280&n[t].byteLength)>>>8),a.push(255&n[t].byteLength),a=a.concat(Array.prototype.slice.call(n[t]));for(t=0;t<r.length;t++)s.push((65280&r[t].byteLength)>>>8),s.push(255&r[t].byteLength),s=s.concat(Array.prototype.slice.call(r[t]));if(i=[b.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&e.width)>>8,255&e.width,(65280&e.height)>>8,255&e.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]),u(b.avcC,new Uint8Array([1,e.profileIdc,e.profileCompatibility,e.levelIdc,255].concat([n.length],a,[r.length],s))),u(b.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],e.sarRatio){var o=e.sarRatio[0],l=e.sarRatio[1];i.push(u(b.pasp,new Uint8Array([(4278190080&o)>>24,(16711680&o)>>16,(65280&o)>>8,255&o,(4278190080&l)>>24,(16711680&l)>>16,(65280&l)>>8,255&l])))}return u.apply(null,i)},R=function(e){return u(b.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(65280&e.channelcount)>>8,255&e.channelcount,(65280&e.samplesize)>>8,255&e.samplesize,0,0,0,0,(65280&e.samplerate)>>8,255&e.samplerate,0,0]),i(e))},d=function(e){var t=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,0,(4278190080&e.duration)>>24,(16711680&e.duration)>>16,(65280&e.duration)>>8,255&e.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&e.width)>>8,255&e.width,0,0,(65280&e.height)>>8,255&e.height,0,0]);return u(b.tkhd,t)},_=function(e){var t,i,n,r,a,s;return t=u(b.tfhd,new Uint8Array([0,0,0,58,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),a=Math.floor(e.baseMediaDecodeTime/(1+G)),s=Math.floor(e.baseMediaDecodeTime%(1+G)),i=u(b.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])),"audio"===e.type?(n=w(e,92),u(b.traf,t,i,n)):(r=m(e),n=w(e,r.length+92),u(b.traf,t,i,n,r))},h=function(e){return e.duration=e.duration||4294967295,u(b.trak,d(e),p(e))},M=function(e){var t=new Uint8Array([0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return"video"!==e.type&&(t[t.length-1]=0),u(b.trex,t)},B=function(e,t){var i=0,n=0,r=0,a=0;return e.length&&(void 0!==e[0].duration&&(i=1),void 0!==e[0].size&&(n=2),void 0!==e[0].flags&&(r=4),void 0!==e[0].compositionTimeOffset&&(a=8)),[0,0,i|n|r|a,1,(4278190080&e.length)>>>24,(16711680&e.length)>>>16,(65280&e.length)>>>8,255&e.length,(4278190080&t)>>>24,(16711680&t)>>>16,(65280&t)>>>8,255&t]},U=function(e,t){var i,n,r,a;for(n=e.samples||[],i=B(n,t+=20+16*n.length),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 u(b.trun,new Uint8Array(i))},z=function(e,t){var i,n,r,a;for(n=e.samples||[],i=B(n,t+=20+8*n.length),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 u(b.trun,new Uint8Array(i))},w=function(e,t){return("audio"===e.type?z:U)(e,t)};r=function(){return u(b.ftyp,T,A,T,x)};function H(e,t){var i={size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}};return i.dataOffset=t,i.compositionTimeOffset=e.pts-e.dts,i.duration=e.duration,i.size=4*e.length,i.size+=e.byteLength,e.keyFrame&&(i.flags.dependsOn=2,i.flags.isNonSyncSample=0),i}function Y(e){for(var t=[];e--;)t.push(0);return t}function Q(){Q.prototype.init.call(this),this.captionPackets_=[],this.ccStreams_=[new Ne(0,0),new Ne(0,1),new Ne(1,0),new Ne(1,1)],this.reset(),this.ccStreams_.forEach(function(e){e.on("data",this.trigger.bind(this,"data")),e.on("partialdone",this.trigger.bind(this,"partialdone")),e.on("done",this.trigger.bind(this,"done"))},this)}var V,W,q,X,Z,$=function(e){return u(b.mdat,e)},K=s,J=function(e){var t,i=r(),n=o(e);return(t=new Uint8Array(i.byteLength+n.byteLength)).set(i),t.set(n,i.byteLength),t},ee=function(e){var t,i,n=[],r=[];for(r.byteLength=0,r.nalCount=0,r.duration=0,t=n.byteLength=0;t<e.length;t++)"access_unit_delimiter_rbsp"===(i=e[t]).nalUnitType?(n.length&&(n.duration=i.dts-n.dts,r.byteLength+=n.byteLength,r.nalCount+=n.length,r.duration+=n.duration,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.byteLength+=n.byteLength,r.nalCount+=n.length,r.duration+=n.duration,r.push(n),r},te=function(e){var t,i,n=[],r=[];for(n.byteLength=0,n.nalCount=0,n.duration=0,n.pts=e[0].pts,n.dts=e[0].dts,r.byteLength=0,r.nalCount=0,r.duration=0,r.pts=e[0].pts,r.dts=e[0].dts,t=0;t<e.length;t++)(i=e[t]).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},ie=function(e){var t;return!e[0][0].keyFrame&&1<e.length&&(t=e.shift(),e.byteLength-=t.byteLength,e.nalCount-=t.nalCount,e[0][0].dts=t.dts,e[0][0].pts=t.pts,e[0][0].duration+=t.duration),e},ne=function(e,t){var i,n,r,a,s,o=t||0,l=[];for(i=0;i<e.length;i++)for(a=e[i],n=0;n<a.length;n++)s=a[n],o+=(r=H(s,o)).size,l.push(r);return l},re=function(e){var t,i,n,r,a,s,o=0,l=e.byteLength,u=e.nalCount,c=new Uint8Array(l+4*u),h=new DataView(c.buffer);for(t=0;t<e.length;t++)for(r=e[t],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},ae=[33,16,5,32,164,27],se=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],oe={96e3:[ae,[227,64],Y(154),[56]],88200:[ae,[231],Y(170),[56]],64e3:[ae,[248,192],Y(240),[56]],48e3:[ae,[255,192],Y(268),[55,148,128],Y(54),[112]],44100:[ae,[255,192],Y(268),[55,163,128],Y(84),[112]],32e3:[ae,[255,192],Y(268),[55,234],Y(226),[112]],24e3:[ae,[255,192],Y(268),[55,255,128],Y(268),[111,112],Y(126),[224]],16e3:[ae,[255,192],Y(268),[55,255,128],Y(268),[111,255],Y(269),[223,108],Y(195),[1,192]],12e3:[se,Y(268),[3,127,248],Y(268),[6,255,240],Y(268),[13,255,224],Y(268),[27,253,128],Y(259),[56]],11025:[se,Y(268),[3,127,248],Y(268),[6,255,240],Y(268),[13,255,224],Y(268),[27,255,192],Y(268),[55,175,128],Y(108),[112]],8e3:[se,Y(268),[3,121,16],Y(47),[7]]},le=(V=oe,Object.keys(V).reduce(function(e,t){return e[t]=new Uint8Array(V[t].reduce(function(e,t){return e.concat(t)},[])),e},{})),ue=9e4,ce=(W=function(e){return 9e4*e},q=function(e,t){return e*t},X=function(e){return e/9e4},Z=function(e,t){return e/t},function(e,t){return W(Z(e,t))}),he=function(e,t){return q(X(e),t)},de=function(e,t,i){return X(i?e:e-t)},pe=function(e,t,i,n){var r,a,s,o,l,u=0,c=0,h=0;if(t.length&&(r=ce(e.baseMediaDecodeTime,e.samplerate),a=Math.ceil(ue/(e.samplerate/1024)),i&&n&&(u=r-Math.max(i,n),h=(c=Math.floor(u/a))*a),!(c<1||ue/2<h))){for(s=(s=le[e.samplerate])||t[0].data,o=0;o<c;o++)l=t[0],t.splice(0,0,{data:s,dts:l.dts-a,pts:l.pts-a});e.baseMediaDecodeTime-=Math.floor(he(h,e.samplerate))}},fe=function(e,t,i){return t.minSegmentDts>=i?e:(t.minSegmentDts=1/0,e.filter(function(e){return e.dts>=i&&(t.minSegmentDts=Math.min(t.minSegmentDts,e.dts),t.minSegmentPts=t.minSegmentDts,!0)}))},ge=function(e){var t,i,n=[];for(t=0;t<e.length;t++)i=e[t],n.push({size:i.data.byteLength,duration:1024});return n},me=function(e){var t,i,n=0,r=new Uint8Array(function(e){var t,i=0;for(t=0;t<e.length;t++)i+=e[t].data.byteLength;return i}(e));for(t=0;t<e.length;t++)i=e[t],r.set(i.data,n),n+=i.data.byteLength;return r},ve=ue,ye=function(e){delete e.minSegmentDts,delete e.maxSegmentDts,delete e.minSegmentPts,delete e.maxSegmentPts},_e=function(e,t){var i,n=e.minSegmentDts;return t||(n-=e.timelineStartInfo.dts),i=e.timelineStartInfo.baseMediaDecodeTime,i+=n,i=Math.max(0,i),"audio"===e.type&&(i*=e.samplerate/ve,i=Math.floor(i)),i},Me=function(e,t){"number"==typeof t.pts&&(void 0===e.timelineStartInfo.pts&&(e.timelineStartInfo.pts=t.pts),void 0===e.minSegmentPts?e.minSegmentPts=t.pts:e.minSegmentPts=Math.min(e.minSegmentPts,t.pts),void 0===e.maxSegmentPts?e.maxSegmentPts=t.pts:e.maxSegmentPts=Math.max(e.maxSegmentPts,t.pts)),"number"==typeof t.dts&&(void 0===e.timelineStartInfo.dts&&(e.timelineStartInfo.dts=t.dts),void 0===e.minSegmentDts?e.minSegmentDts=t.dts:e.minSegmentDts=Math.min(e.minSegmentDts,t.dts),void 0===e.maxSegmentDts?e.maxSegmentDts=t.dts:e.maxSegmentDts=Math.max(e.maxSegmentDts,t.dts))},we=function(e){for(var t=0,i={payloadType:-1,payloadSize:0},n=0,r=0;t<e.byteLength&&128!==e[t];){for(;255===e[t];)n+=255,t++;for(n+=e[t++];255===e[t];)r+=255,t++;if(r+=e[t++],!i.payload&&4===n){i.payloadType=n,i.payloadSize=r,i.payload=e.subarray(t,t+r);break}t+=r,r=n=0}return i},be=function(e){return 181!==e.payload[0]||49!=(e.payload[1]<<8|e.payload[2])||"GA94"!==String.fromCharCode(e.payload[3],e.payload[4],e.payload[5],e.payload[6])||3!==e.payload[7]?null:e.payload.subarray(8,e.payload.length-1)},Te=function(e,t){var i,n,r,a,s=[];if(!(64&t[0]))return s;for(n=31&t[0],i=0;i<n;i++)a={type:3&t[2+(r=3*i)],pts:e},4&t[2+r]&&(a.ccData=t[3+r]<<8|t[4+r],s.push(a));return s},Ae=4;(Q.prototype=new F).push=function(e){var t,i,n;if("sei_rbsp"===e.nalUnitType&&(t=we(e.escapedRBSP)).payloadType===Ae&&(i=be(t)))if(e.dts<this.latestDts_)this.ignoreNextEqualDts_=!0;else{if(e.dts===this.latestDts_&&this.ignoreNextEqualDts_)return this.numSameDts_--,void(this.numSameDts_||(this.ignoreNextEqualDts_=!1));n=Te(e.pts,i),this.captionPackets_=this.captionPackets_.concat(n),this.latestDts_!==e.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=e.dts}},Q.prototype.flushCCStreams=function(t){this.ccStreams_.forEach(function(e){return"flush"===t?e.flush():e.partialFlush()},this)},Q.prototype.flushStream=function(e){this.captionPackets_.length&&(this.captionPackets_.forEach(function(e,t){e.presortIndex=t}),this.captionPackets_.sort(function(e,t){return e.pts===t.pts?e.presortIndex-t.presortIndex:e.pts-t.pts}),this.captionPackets_.forEach(function(e){e.type<2&&this.dispatchCea608Packet(e)},this),this.captionPackets_.length=0),this.flushCCStreams(e)},Q.prototype.flush=function(){return this.flushStream("flush")},Q.prototype.partialFlush=function(){return this.flushStream("partialFlush")},Q.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach(function(e){e.reset()})},Q.prototype.dispatchCea608Packet=function(e){this.setsTextOrXDSActive(e)?this.activeCea608Channel_[e.type]=null:this.setsChannel1Active(e)?this.activeCea608Channel_[e.type]=0:this.setsChannel2Active(e)&&(this.activeCea608Channel_[e.type]=1),null!==this.activeCea608Channel_[e.type]&&this.ccStreams_[(e.type<<1)+this.activeCea608Channel_[e.type]].push(e)},Q.prototype.setsChannel1Active=function(e){return 4096==(30720&e.ccData)},Q.prototype.setsChannel2Active=function(e){return 6144==(30720&e.ccData)},Q.prototype.setsTextOrXDSActive=function(e){return 256==(28928&e.ccData)||4138==(30974&e.ccData)||6186==(30974&e.ccData)};function xe(e){return null===e?"":(e=Se[e]||e,String.fromCharCode(e))}function Ee(){for(var e=[],t=15;t--;)e.push("");return e}var Se={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},De=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],Ne=function e(t,i){e.prototype.init.call(this),this.field_=t||0,this.dataChannel_=i||0,this.name_="CC"+(1+(this.field_<<1|this.dataChannel_)),this.setConstants(),this.reset(),this.push=function(e){var t,i,n,r,a;if((t=32639&e.ccData)!==this.lastControlCode_){if(4096==(61440&t)?this.lastControlCode_=t:t!==this.PADDING_&&(this.lastControlCode_=null),n=t>>>8,r=255&t,t!==this.PADDING_)if(t===this.RESUME_CAPTION_LOADING_)this.mode_="popOn";else if(t===this.END_OF_CAPTION_)this.mode_="popOn",this.clearFormatting(e.pts),this.flushDisplayed(e.pts),i=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=i,this.startPts_=e.pts;else if(t===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(e.pts);else if(t===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(e.pts);else if(t===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(e.pts);else if(t===this.CARRIAGE_RETURN_)this.clearFormatting(e.pts),this.flushDisplayed(e.pts),this.shiftRowsUp_(),this.startPts_=e.pts;else if(t===this.BACKSPACE_)"popOn"===this.mode_?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1);else if(t===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(e.pts),this.displayed_=Ee();else if(t===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=Ee();else if(t===this.RESUME_DIRECT_CAPTIONING_)"paintOn"!==this.mode_&&(this.flushDisplayed(e.pts),this.displayed_=Ee()),this.mode_="paintOn",this.startPts_=e.pts;else if(this.isSpecialCharacter(n,r))a=xe((n=(3&n)<<8)|r),this[this.mode_](e.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=xe((n=(3&n)<<8)|r),this[this.mode_](e.pts,a),this.column_++;else if(this.isMidRowCode(n,r))this.clearFormatting(e.pts),this[this.mode_](e.pts," "),this.column_++,14==(14&r)&&this.addFormatting(e.pts,["i"]),1==(1&r)&&this.addFormatting(e.pts,["u"]);else if(this.isOffsetControlCode(n,r))this.column_+=3&r;else if(this.isPAC(n,r)){var s=De.indexOf(7968&t);"rollUp"===this.mode_&&(s-this.rollUpRows_+1<0&&(s=this.rollUpRows_-1),this.setRollUp(e.pts,s)),s!==this.row_&&(this.clearFormatting(e.pts),this.row_=s),1&r&&-1===this.formatting_.indexOf("u")&&this.addFormatting(e.pts,["u"]),16==(16&t)&&(this.column_=4*((14&t)>>1)),this.isColorPAC(r)&&14==(14&r)&&this.addFormatting(e.pts,["i"])}else this.isNormalChar(n)&&(0===r&&(r=null),a=xe(n),a+=xe(r),this[this.mode_](e.pts,a),this.column_+=a.length)}else this.lastControlCode_=null}};Ne.prototype=new F,Ne.prototype.flushDisplayed=function(e){var t=this.displayed_.map(function(e){try{return e.trim()}catch(e){return console.error("Skipping malformed caption."),""}}).join("\n").replace(/^\n+|\n+$/g,"");t.length&&this.trigger("data",{startPts:this.startPts_,endPts:e,text:t,stream:this.name_})},Ne.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=Ee(),this.nonDisplayed_=Ee(),this.lastControlCode_=null,this.column_=0,this.row_=14,this.rollUpRows_=2,this.formatting_=[]},Ne.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_},Ne.prototype.isSpecialCharacter=function(e,t){return e===this.EXT_&&48<=t&&t<=63},Ne.prototype.isExtCharacter=function(e,t){return(e===this.EXT_+1||e===this.EXT_+2)&&32<=t&&t<=63},Ne.prototype.isMidRowCode=function(e,t){return e===this.EXT_&&32<=t&&t<=47},Ne.prototype.isOffsetControlCode=function(e,t){return e===this.OFFSET_&&33<=t&&t<=35},Ne.prototype.isPAC=function(e,t){return e>=this.BASE_&&e<this.BASE_+8&&64<=t&&t<=127},Ne.prototype.isColorPAC=function(e){return 64<=e&&e<=79||96<=e&&e<=127},Ne.prototype.isNormalChar=function(e){return 32<=e&&e<=127},Ne.prototype.setRollUp=function(e,t){if("rollUp"!==this.mode_&&(this.row_=14,this.mode_="rollUp",this.flushDisplayed(e),this.nonDisplayed_=Ee(),this.displayed_=Ee()),void 0!==t&&t!==this.row_)for(var i=0;i<this.rollUpRows_;i++)this.displayed_[t-i]=this.displayed_[this.row_-i],this.displayed_[this.row_-i]="";void 0===t&&(t=this.row_),this.topRow_=t-this.rollUpRows_+1},Ne.prototype.addFormatting=function(e,t){this.formatting_=this.formatting_.concat(t);var i=t.reduce(function(e,t){return e+"<"+t+">"},"");this[this.mode_](e,i)},Ne.prototype.clearFormatting=function(e){if(this.formatting_.length){var t=this.formatting_.reverse().reduce(function(e,t){return e+"</"+t+">"},"");this.formatting_=[],this[this.mode_](e,t)}},Ne.prototype.popOn=function(e,t){var i=this.nonDisplayed_[this.row_];i+=t,this.nonDisplayed_[this.row_]=i},Ne.prototype.rollUp=function(e,t){var i=this.displayed_[this.row_];i+=t,this.displayed_[this.row_]=i},Ne.prototype.shiftRowsUp_=function(){var e;for(e=0;e<this.topRow_;e++)this.displayed_[e]="";for(e=this.row_+1;e<15;e++)this.displayed_[e]="";for(e=this.topRow_;e<this.row_;e++)this.displayed_[e]=this.displayed_[e+1];this.displayed_[this.row_]=""},Ne.prototype.paintOn=function(e,t){var i=this.displayed_[this.row_];i+=t,this.displayed_[this.row_]=i};function Ce(e,t){var i=1;for(t<e&&(i=-1);4294967296<Math.abs(t-e);)e+=8589934592*i;return e}function Le(e){var t,i;Le.prototype.init.call(this),this.type_=e||"shared",this.push=function(e){"shared"!==this.type_&&e.type!==this.type_||(void 0===i&&(i=e.dts),e.dts=Ce(e.dts,i),e.pts=Ce(e.pts,i),t=e.dts,this.trigger("data",e))},this.flush=function(){i=t,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.discontinuity=function(){t=i=void 0},this.reset=function(){this.discontinuity(),this.trigger("reset")}}var Ie={CaptionStream:Q,Cea608Stream:Ne},Oe={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21};Le.prototype=new F;function je(e,t,i){var n,r="";for(n=t;n<i;n++)r+="%"+("00"+e[n].toString(16)).slice(-2);return r}function ke(e,t,i){return decodeURIComponent(je(e,t,i))}function Pe(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]}var Re,ze=Le,Ue={TXXX:function(e){var t;if(3===e.data[0]){for(t=1;t<e.data.length;t++)if(0===e.data[t]){e.description=ke(e.data,1,t),e.value=ke(e.data,t+1,e.data.length).replace(/\0*$/,"");break}e.data=e.value}},WXXX:function(e){var t;if(3===e.data[0])for(t=1;t<e.data.length;t++)if(0===e.data[t]){e.description=ke(e.data,1,t),e.url=ke(e.data,t+1,e.data.length);break}},PRIV:function(e){var t,i;for(t=0;t<e.data.length;t++)if(0===e.data[t]){e.owner=(i=e.data,unescape(je(i,0,t)));break}e.privateData=e.data.subarray(t+1),e.data=e.privateData}};(Re=function(e){var t,l={debug:!(!e||!e.debug),descriptor:e&&e.descriptor},u=0,c=[],h=0;if(Re.prototype.init.call(this),this.dispatchType=Oe.METADATA_STREAM_TYPE.toString(16),l.descriptor)for(t=0;t<l.descriptor.length;t++)this.dispatchType+=("00"+l.descriptor[t].toString(16)).slice(-2);this.push=function(e){var t,i,n,r,a;if("timed-metadata"===e.type)if(e.dataAlignmentIndicator&&(h=0,c.length=0),0===c.length&&(e.data.length<10||e.data[0]!=="I".charCodeAt(0)||e.data[1]!=="D".charCodeAt(0)||e.data[2]!=="3".charCodeAt(0)))l.debug&&console.log("Skipping unrecognized metadata packet");else if(c.push(e),h+=e.data.byteLength,1===c.length&&(u=Pe(e.data.subarray(6,10)),u+=10),!(h<u)){for(t={data:new Uint8Array(u),frames:[],pts:c[0].pts,dts:c[0].dts},a=0;a<u;)t.data.set(c[0].data.subarray(0,u-a),a),a+=c[0].data.byteLength,h-=c[0].data.byteLength,c.shift();i=10,64&t.data[5]&&(i+=4,i+=Pe(t.data.subarray(10,14)),u-=Pe(t.data.subarray(16,20)));do{if((n=Pe(t.data.subarray(i+4,i+8)))<1)return console.log("Malformed ID3 frame encountered. Skipping metadata parsing.");if((r={id:String.fromCharCode(t.data[i],t.data[i+1],t.data[i+2],t.data[i+3]),data:t.data.subarray(i+10,i+n+10)}).key=r.id,Ue[r.id]&&(Ue[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===t.pts&&void 0===t.dts&&(t.pts=r.timeStamp,t.dts=r.timeStamp),this.trigger("timestamp",r)}t.frames.push(r),i+=10,i+=n}while(i<u);this.trigger("data",t)}}}).prototype=new F;var Be,Fe,Ge,He=Re,Ye=ze;(Be=function(){var r=new Uint8Array(188),a=0;Be.prototype.init.call(this),this.push=function(e){var t,i=0,n=188;for(a?((t=new Uint8Array(e.byteLength+a)).set(r.subarray(0,a)),t.set(e,a),a=0):t=e;n<t.byteLength;)71!==t[i]||71!==t[n]?(i++,n++):(this.trigger("data",t.subarray(i,n)),i+=188,n+=188);i<t.byteLength&&(r.set(t.subarray(i),0),a=t.byteLength-i)},this.flush=function(){188===a&&71===r[0]&&(this.trigger("data",r),a=0),this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.reset=function(){a=0,this.trigger("reset")}}).prototype=new F,(Fe=function(){var n,r,a,s;Fe.prototype.init.call(this),(s=this).packetsWaitingForPmt=[],this.programMapTable=void 0,n=function(e,t){var i=0;t.payloadUnitStartIndicator&&(i+=e[i]+1),("pat"===t.type?r:a)(e.subarray(i),t)},r=function(e,t){t.section_number=e[7],t.last_section_number=e[8],s.pmtPid=(31&e[10])<<8|e[11],t.pmtPid=s.pmtPid},a=function(e,t){var i,n;if(1&e[5]){for(s.programMapTable={video:null,audio:null,"timed-metadata":{}},i=3+((15&e[1])<<8|e[2])-4,n=12+((15&e[10])<<8|e[11]);n<i;){var r=e[n],a=(31&e[n+1])<<8|e[n+2];r===Oe.H264_STREAM_TYPE&&null===s.programMapTable.video?s.programMapTable.video=a:r===Oe.ADTS_STREAM_TYPE&&null===s.programMapTable.audio?s.programMapTable.audio=a:r===Oe.METADATA_STREAM_TYPE&&(s.programMapTable["timed-metadata"][a]=r),n+=5+((15&e[n+3])<<8|e[n+4])}t.programMapTable=s.programMapTable}},this.push=function(e){var t={},i=4;if(t.payloadUnitStartIndicator=!!(64&e[1]),t.pid=31&e[1],t.pid<<=8,t.pid|=e[2],1<(48&e[3])>>>4&&(i+=e[i]+1),0===t.pid)t.type="pat",n(e.subarray(i),t),this.trigger("data",t);else if(t.pid===this.pmtPid)for(t.type="pmt",n(e.subarray(i),t),this.trigger("data",t);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else void 0===this.programMapTable?this.packetsWaitingForPmt.push([e,i,t]):this.processPes_(e,i,t)},this.processPes_=function(e,t,i){i.pid===this.programMapTable.video?i.streamType=Oe.H264_STREAM_TYPE:i.pid===this.programMapTable.audio?i.streamType=Oe.ADTS_STREAM_TYPE:i.streamType=this.programMapTable["timed-metadata"][i.pid],i.type="pes",i.data=e.subarray(t),this.trigger("data",i)}}).prototype=new F,Fe.STREAM_TYPES={h264:27,adts:15},(Ge=function(){function n(e,t,i){var n,r,a=new Uint8Array(e.size),s={type:t},o=0,l=0;if(e.data.length&&!(e.size<9)){for(s.trackId=e.data[0].pid,o=0;o<e.data.length;o++)r=e.data[o],a.set(r.data,l),l+=r.data.byteLength;var u,c,h;u=a,(c=s).packetLength=6+(u[4]<<8|u[5]),c.dataAlignmentIndicator=0!=(4&u[6]),192&(h=u[7])&&(c.pts=(14&u[9])<<27|(255&u[10])<<20|(254&u[11])<<12|(255&u[12])<<5|(254&u[13])>>>3,c.pts*=4,c.pts+=(6&u[13])>>>1,c.dts=c.pts,64&h&&(c.dts=(14&u[14])<<27|(255&u[15])<<20|(254&u[16])<<12|(255&u[17])<<5|(254&u[18])>>>3,c.dts*=4,c.dts+=(6&u[18])>>>1)),c.data=u.subarray(9+u[8]),n="video"===t||s.packetLength<=e.size,(i||n)&&(e.size=0,e.data.length=0),n&&d.trigger("data",s)}}var t,d=this,r={data:[],size:0},a={data:[],size:0},s={data:[],size:0};Ge.prototype.init.call(this),this.push=function(i){({pat:function(){},pes:function(){var e,t;switch(i.streamType){case Oe.H264_STREAM_TYPE:case Oe.H264_STREAM_TYPE:e=r,t="video";break;case Oe.ADTS_STREAM_TYPE:e=a,t="audio";break;case Oe.METADATA_STREAM_TYPE:e=s,t="timed-metadata";break;default:return}i.payloadUnitStartIndicator&&n(e,t,!0),e.data.push(i),e.size+=i.data.byteLength},pmt:function(){var e={type:"metadata",tracks:[]};null!==(t=i.programMapTable).video&&e.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+t.video,codec:"avc",type:"video"}),null!==t.audio&&e.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+t.audio,codec:"adts",type:"audio"}),d.trigger("data",e)}})[i.type]()},this.reset=function(){r.size=0,r.data.length=0,a.size=0,a.data.length=0,this.trigger("reset")},this.flushStreams_=function(){n(r,"video"),n(a,"audio"),n(s,"timed-metadata")},this.flush=function(){this.flushStreams_(),this.trigger("done")}}).prototype=new F;var Qe={PAT_PID:0,MP2T_PACKET_LENGTH:188,TransportPacketStream:Be,TransportParseStream:Fe,ElementaryStream:Ge,TimestampRolloverStream:Ye,CaptionStream:Ie.CaptionStream,Cea608Stream:Ie.Cea608Stream,MetadataStream:He};for(var Ve in Oe)Oe.hasOwnProperty(Ve)&&(Qe[Ve]=Oe[Ve]);var We,qe=Qe,Xe=ue,Ze=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];(We=function(l){var u,c=0;We.prototype.init.call(this),this.push=function(e){var t,i,n,r,a,s,o=0;if(l||(c=0),"audio"===e.type)for(u?(r=u,(u=new Uint8Array(r.byteLength+e.data.byteLength)).set(r),u.set(e.data,r.byteLength)):u=e.data;o+5<u.length;)if(255===u[o]&&240==(246&u[o+1])){if(i=2*(1&~u[o+1]),t=(3&u[o+3])<<11|u[o+4]<<3|(224&u[o+5])>>5,s=(a=1024*(1+(3&u[o+6])))*Xe/Ze[(60&u[o+2])>>>2],n=o+t,u.byteLength<n)return;if(this.trigger("data",{pts:e.pts+c*s,dts:e.dts+c*s,sampleCount:a,audioobjecttype:1+(u[o+2]>>>6&3),channelcount:(1&u[o+2])<<2|(192&u[o+3])>>>6,samplerate:Ze[(60&u[o+2])>>>2],samplingfrequencyindex:(60&u[o+2])>>>2,samplesize:16,data:u.subarray(o+7+i,n)}),c++,u.byteLength===n)return void(u=void 0);u=u.subarray(n)}else o++},this.flush=function(){c=0,this.trigger("done")},this.reset=function(){u=void 0,this.trigger("reset")},this.endTimeline=function(){u=void 0,this.trigger("endedtimeline")}}).prototype=new F;var $e,Ke,Je,et=We,tt=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 e=n.byteLength-r,t=new Uint8Array(4),i=Math.min(4,r);if(0===i)throw new Error("no bytes available");t.set(n.subarray(e,e+i)),a=new DataView(t.buffer).getUint32(0),s=8*i,r-=i},this.skipBits=function(e){var t;e<s||(e-=s,e-=8*(t=Math.floor(e/8)),r-=t,this.loadWord()),a<<=e,s-=e},this.readBits=function(e){var t=Math.min(s,e),i=a>>>32-t;return 0<(s-=t)?a<<=t:0<r&&this.loadWord(),0<(t=e-t)?i<<t|this.readBits(t):i},this.skipLeadingZeros=function(){var e;for(e=0;e<s;++e)if(0!=(a&2147483648>>>e))return a<<=e,s-=e,e;return this.loadWord(),e+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var e=this.skipLeadingZeros();return this.readBits(e+1)-1},this.readExpGolomb=function(){var e=this.readUnsignedExpGolomb();return 1&e?1+e>>>1:-1*(e>>>1)},this.readBoolean=function(){return 1===this.readBits(1)},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()};(Ke=function(){var n,r,a=0;Ke.prototype.init.call(this),this.push=function(e){for(var t,i=(r=r?((t=new Uint8Array(r.byteLength+e.data.byteLength)).set(r),t.set(e.data,r.byteLength),t):e.data).byteLength;a<i-3;a++)if(1===r[a+2]){n=a+5;break}for(;n<i;)switch(r[n]){case 0:if(0!==r[n-1]){n+=2;break}if(0!==r[n-2]){n++;break}for(a+3!==n-2&&this.trigger("data",r.subarray(a+3,n-2));1!==r[++n]&&n<i;);a=n-2,n+=3;break;case 1:if(0!==r[n-1]||0!==r[n-2]){n+=3;break}this.trigger("data",r.subarray(a+3,n-2)),a=n-2,n+=3;break;default:n+=3}r=r.subarray(a),n-=a,a=0},this.reset=function(){r=null,a=0,this.trigger("reset")},this.flush=function(){r&&3<r.byteLength&&this.trigger("data",r.subarray(a+3)),r=null,a=0,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")}}).prototype=new F,Je={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},($e=function(){var i,n,r,a,s,o,_,t=new Ke;$e.prototype.init.call(this),(i=this).push=function(e){"video"===e.type&&(n=e.trackId,r=e.pts,a=e.dts,t.push(e))},t.on("data",function(e){var t={trackId:n,pts:r,dts:a,data:e};switch(31&e[0]){case 5:t.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:t.nalUnitType="sei_rbsp",t.escapedRBSP=s(e.subarray(1));break;case 7:t.nalUnitType="seq_parameter_set_rbsp",t.escapedRBSP=s(e.subarray(1)),t.config=o(t.escapedRBSP);break;case 8:t.nalUnitType="pic_parameter_set_rbsp";break;case 9:t.nalUnitType="access_unit_delimiter_rbsp"}i.trigger("data",t)}),t.on("done",function(){i.trigger("done")}),t.on("partialdone",function(){i.trigger("partialdone")}),t.on("reset",function(){i.trigger("reset")}),t.on("endedtimeline",function(){i.trigger("endedtimeline")}),this.flush=function(){t.flush()},this.partialFlush=function(){t.partialFlush()},this.reset=function(){t.reset()},this.endTimeline=function(){t.endTimeline()},_=function(e,t){var i,n=8,r=8;for(i=0;i<e;i++)0!==r&&(r=(n+t.readExpGolomb()+256)%256),n=0===r?n:r},s=function(e){for(var t,i,n=e.byteLength,r=[],a=1;a<n-2;)0===e[a]&&0===e[a+1]&&3===e[a+2]?(r.push(a+2),a+=2):a++;if(0===r.length)return e;t=n-r.length,i=new Uint8Array(t);var s=0;for(a=0;a<t;s++,a++)s===r[0]&&(s++,r.shift()),i[a]=e[s];return i},o=function(e){var t,i,n,r,a,s,o,l,u,c,h,d,p,f=0,g=0,m=0,v=0,y=1;if(i=(t=new tt(e)).readUnsignedByte(),r=t.readUnsignedByte(),n=t.readUnsignedByte(),t.skipUnsignedExpGolomb(),Je[i]&&(3===(a=t.readUnsignedExpGolomb())&&t.skipBits(1),t.skipUnsignedExpGolomb(),t.skipUnsignedExpGolomb(),t.skipBits(1),t.readBoolean()))for(h=3!==a?8:12,p=0;p<h;p++)t.readBoolean()&&_(p<6?16:64,t);if(t.skipUnsignedExpGolomb(),0===(s=t.readUnsignedExpGolomb()))t.readUnsignedExpGolomb();else if(1===s)for(t.skipBits(1),t.skipExpGolomb(),t.skipExpGolomb(),o=t.readUnsignedExpGolomb(),p=0;p<o;p++)t.skipExpGolomb();if(t.skipUnsignedExpGolomb(),t.skipBits(1),l=t.readUnsignedExpGolomb(),u=t.readUnsignedExpGolomb(),0===(c=t.readBits(1))&&t.skipBits(1),t.skipBits(1),t.readBoolean()&&(f=t.readUnsignedExpGolomb(),g=t.readUnsignedExpGolomb(),m=t.readUnsignedExpGolomb(),v=t.readUnsignedExpGolomb()),t.readBoolean()&&t.readBoolean()){switch(t.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=[t.readUnsignedByte()<<8|t.readUnsignedByte(),t.readUnsignedByte()<<8|t.readUnsignedByte()]}d&&(y=d[0]/d[1])}return{profileIdc:i,levelIdc:n,profileCompatibility:r,width:Math.ceil((16*(l+1)-2*f-2*g)*y),height:(2-c)*(u+1)*16-2*m-2*v,sarRatio:d}}}).prototype=new F;var it,nt={H264Stream:$e,NalByteStream:Ke},rt=function(e){return e[0]==="I".charCodeAt(0)&&e[1]==="D".charCodeAt(0)&&e[2]==="3".charCodeAt(0)},at=function(e,t){var i=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return(16&e[t+5])>>4?20+i:10+i},st=function(e,t){var i=(224&e[t+5])>>5,n=e[t+4]<<3;return 6144&e[t+3]|n|i};(it=function(){var o=new Uint8Array,l=0;it.prototype.init.call(this),this.setTimestamp=function(e){l=e},this.push=function(e){var t,i,n,r,a=0,s=0;for(o.length?(r=o.length,(o=new Uint8Array(e.byteLength+r)).set(o.subarray(0,r)),o.set(e,r)):o=e;3<=o.length-s;)if(o[s]!=="I".charCodeAt(0)||o[s+1]!=="D".charCodeAt(0)||o[s+2]!=="3".charCodeAt(0))if(255!=(255&o[s])||240!=(240&o[s+1]))s++;else{if(o.length-s<7)break;if(s+(a=st(o,s))>o.length)break;n={type:"audio",data:o.subarray(s,s+a),pts:l,dts:l},this.trigger("data",n),s+=a}else{if(o.length-s<10)break;if(s+(a=at(o,s))>o.length)break;i={type:"timed-metadata",data:o.subarray(s,s+a)},this.trigger("data",i),s+=a}t=o.length-s,o=0<t?o.subarray(s):new Uint8Array},this.reset=function(){o=new Uint8Array,this.trigger("reset")},this.endTimeline=function(){o=new Uint8Array,this.trigger("endedtimeline")}}).prototype=new F;function ot(e,t){var i;if(e.length===t.length){for(i=0;i<e.length;i++)if(e[i]!==t[i])return;return 1}}function lt(e,t,i,n,r,a){return{start:{dts:e,pts:e+(i-t)},end:{dts:e+(n-t),pts:e+(r-i)},prependedContentDuration:a,baseMediaDecodeTime:e}}var ut,ct,ht,dt,pt=it,ft=nt.H264Stream,gt=rt,mt=ue,vt=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],yt=["width","height","profileIdc","levelIdc","profileCompatibility","sarRatio"];(ct=function(a,s){var o=[],l=0,u=0,c=0,h=1/0;s=s||{},ct.prototype.init.call(this),this.push=function(t){Me(a,t),a&&vt.forEach(function(e){a[e]=t[e]}),o.push(t)},this.setEarliestDts=function(e){u=e-a.timelineStartInfo.baseMediaDecodeTime},this.setVideoBaseMediaDecodeTime=function(e){h=e},this.setAudioAppendStart=function(e){c=e},this.flush=function(){var e,t,i,n,r;0!==o.length&&(e=fe(o,a,u),a.baseMediaDecodeTime=_e(a,s.keepOriginalTimestamps),pe(a,e,c,h),a.samples=ge(e),i=$(me(e)),o=[],t=K(l,[a]),n=new Uint8Array(t.byteLength+i.byteLength),l++,n.set(t),n.set(i,t.byteLength),ye(a),r=Math.ceil(1024*mt/a.samplerate),e.length&&this.trigger("timingInfo",{start:e[0].pts,end:e[0].pts+e.length*r}),this.trigger("data",{track:a,boxes:n})),this.trigger("done","AudioSegmentStream")},this.reset=function(){ye(a),o=[],this.trigger("reset")}}).prototype=new F,(ut=function(c,h){var t,i,d=0,p=[],f=[];h=h||{},ut.prototype.init.call(this),delete c.minPTS,this.gopCache_=[],this.push=function(e){Me(c,e),"seq_parameter_set_rbsp"!==e.nalUnitType||t||(t=e.config,c.sps=[e.data],yt.forEach(function(e){c[e]=t[e]},this)),"pic_parameter_set_rbsp"!==e.nalUnitType||i||(i=e.data,c.pps=[e.data]),p.push(e)},this.flush=function(){for(var e,t,i,n,r,a,s,o,l=0;p.length&&"access_unit_delimiter_rbsp"!==p[0].nalUnitType;)p.shift();if(0===p.length)return this.resetStream_(),void this.trigger("done","VideoSegmentStream");if(e=ee(p),(i=te(e))[0][0].keyFrame||((t=this.getGopForFusion_(p[0],c))?(l=t.duration,i.unshift(t),i.byteLength+=t.byteLength,i.nalCount+=t.nalCount,i.pts=t.pts,i.dts=t.dts,i.duration+=t.duration):i=ie(i)),f.length){var u;if(!(u=h.alignGopsAtEnd?this.alignGopsAtEnd_(i):this.alignGopsAtStart_(i)))return this.gopCache_.unshift({gop:i.pop(),pps:c.pps,sps:c.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),p=[],this.resetStream_(),void this.trigger("done","VideoSegmentStream");ye(c),i=u}Me(c,i),c.samples=ne(i),r=$(re(i)),c.baseMediaDecodeTime=_e(c,h.keepOriginalTimestamps),this.trigger("processedGopsInfo",i.map(function(e){return{pts:e.pts,dts:e.dts,byteLength:e.byteLength}})),s=i[0],o=i[i.length-1],this.trigger("segmentTimingInfo",lt(c.baseMediaDecodeTime,s.dts,s.pts,o.dts+o.duration,o.pts+o.duration,l)),this.trigger("timingInfo",{start:i[0].pts,end:i[i.length-1].pts+i[i.length-1].duration}),this.gopCache_.unshift({gop:i.pop(),pps:c.pps,sps:c.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),p=[],this.trigger("baseMediaDecodeTime",c.baseMediaDecodeTime),this.trigger("timelineStartInfo",c.timelineStartInfo),n=K(d,[c]),a=new Uint8Array(n.byteLength+r.byteLength),d++,a.set(n),a.set(r,n.byteLength),this.trigger("data",{track:c,boxes:a}),this.resetStream_(),this.trigger("done","VideoSegmentStream")},this.reset=function(){this.resetStream_(),p=[],this.gopCache_.length=0,f.length=0,this.trigger("reset")},this.resetStream_=function(){ye(c),i=t=void 0},this.getGopForFusion_=function(e){var t,i,n,r,a,s=1/0;for(a=0;a<this.gopCache_.length;a++)n=(r=this.gopCache_[a]).gop,c.pps&&ot(c.pps[0],r.pps[0])&&c.sps&&ot(c.sps[0],r.sps[0])&&(n.dts<c.timelineStartInfo.dts||-1e4<=(t=e.dts-n.dts-n.duration)&&t<=45e3&&(!i||t<s)&&(i=r,s=t));return i?i.gop:null},this.alignGopsAtStart_=function(e){var t,i,n,r,a,s,o,l;for(a=e.byteLength,s=e.nalCount,o=e.duration,t=i=0;t<f.length&&i<e.length&&(n=f[t],r=e[i],n.pts!==r.pts);)r.pts>n.pts?t++:(i++,a-=r.byteLength,s-=r.nalCount,o-=r.duration);return 0===i?e:i===e.length?null:((l=e.slice(i)).byteLength=a,l.duration=o,l.nalCount=s,l.pts=l[0].pts,l.dts=l[0].dts,l)},this.alignGopsAtEnd_=function(e){var t,i,n,r,a,s,o;for(t=f.length-1,i=e.length-1,a=null,s=!1;0<=t&&0<=i;){if(n=f[t],r=e[i],n.pts===r.pts){s=!0;break}n.pts>r.pts?t--:(t===f.length-1&&(a=i),i--)}if(!s&&null===a)return null;if(0===(o=s?i:a))return e;var l=e.slice(o),u=l.reduce(function(e,t){return e.byteLength+=t.byteLength,e.duration+=t.duration,e.nalCount+=t.nalCount,e},{byteLength:0,duration:0,nalCount:0});return l.byteLength=u.byteLength,l.duration=u.duration,l.nalCount=u.nalCount,l.pts=l[0].pts,l.dts=l[0].dts,l},this.alignGopsWith=function(e){f=e}}).prototype=new F,(dt=function(e,t){this.numberOfTracks=0,this.metadataStream=t,void 0!==(e=e||{}).remux?this.remuxTracks=!!e.remux:this.remuxTracks=!0,"boolean"==typeof e.keepOriginalTimestamps?this.keepOriginalTimestamps=e.keepOriginalTimestamps:this.keepOriginalTimestamps=!1,this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,dt.prototype.init.call(this),this.push=function(e){return e.text?this.pendingCaptions.push(e):e.frames?this.pendingMetadata.push(e):(this.pendingTracks.push(e.track),this.pendingBytes+=e.boxes.byteLength,"video"===e.track.type&&(this.videoTrack=e.track,this.pendingBoxes.push(e.boxes)),void("audio"===e.track.type&&(this.audioTrack=e.track,this.pendingBoxes.unshift(e.boxes))))}}).prototype=new F,dt.prototype.flush=function(e){var t,i,n,r,a=0,s={captions:[],captionStreams:{},metadata:[],info:{}},o=0;if(this.pendingTracks.length<this.numberOfTracks){if("VideoSegmentStream"!==e&&"AudioSegmentStream"!==e)return;if(this.remuxTracks)return;if(0===this.pendingTracks.length)return this.emittedTracks++,void(this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0))}if(this.videoTrack?(o=this.videoTrack.timelineStartInfo.pts,yt.forEach(function(e){s.info[e]=this.videoTrack[e]},this)):this.audioTrack&&(o=this.audioTrack.timelineStartInfo.pts,vt.forEach(function(e){s.info[e]=this.audioTrack[e]},this)),this.videoTrack||this.audioTrack){for(1===this.pendingTracks.length?s.type=this.pendingTracks[0].type:s.type="combined",this.emittedTracks+=this.pendingTracks.length,n=J(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++)(t=this.pendingCaptions[r]).startTime=de(t.startPts,o,this.keepOriginalTimestamps),t.endTime=de(t.endPts,o,this.keepOriginalTimestamps),s.captionStreams[t.stream]=!0,s.captions.push(t);for(r=0;r<this.pendingMetadata.length;r++)(i=this.pendingMetadata[r]).cueTime=de(i.pts,o,this.keepOriginalTimestamps),s.metadata.push(i);for(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),r=0;r<s.captions.length;r++)t=s.captions[r],this.trigger("caption",t);for(r=0;r<s.metadata.length;r++)i=s.metadata[r],this.trigger("id3Frame",i)}this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},dt.prototype.setRemux=function(e){this.remuxTracks=e},(ht=function(n){var r,a,s=this,i=!0;ht.prototype.init.call(this),n=n||{},this.baseMediaDecodeTime=n.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var t={};(this.transmuxPipeline_=t).type="aac",t.metadataStream=new qe.MetadataStream,t.aacStream=new pt,t.audioTimestampRolloverStream=new qe.TimestampRolloverStream("audio"),t.timedMetadataTimestampRolloverStream=new qe.TimestampRolloverStream("timed-metadata"),t.adtsStream=new et,t.coalesceStream=new dt(n,t.metadataStream),t.headOfPipeline=t.aacStream,t.aacStream.pipe(t.audioTimestampRolloverStream).pipe(t.adtsStream),t.aacStream.pipe(t.timedMetadataTimestampRolloverStream).pipe(t.metadataStream).pipe(t.coalesceStream),t.metadataStream.on("timestamp",function(e){t.aacStream.setTimestamp(e.timeStamp)}),t.aacStream.on("data",function(e){"timed-metadata"!==e.type||t.audioSegmentStream||(a=a||{timelineStartInfo:{baseMediaDecodeTime:s.baseMediaDecodeTime},codec:"adts",type:"audio"},t.coalesceStream.numberOfTracks++,t.audioSegmentStream=new ct(a,n),t.audioSegmentStream.on("timingInfo",s.trigger.bind(s,"audioTimingInfo")),t.adtsStream.pipe(t.audioSegmentStream).pipe(t.coalesceStream)),s.trigger("trackinfo",{hasAudio:!!a,hasVideo:!!r})}),t.coalesceStream.on("data",this.trigger.bind(this,"data")),t.coalesceStream.on("done",this.trigger.bind(this,"done"))},this.setupTsPipeline=function(){var i={};(this.transmuxPipeline_=i).type="ts",i.metadataStream=new qe.MetadataStream,i.packetStream=new qe.TransportPacketStream,i.parseStream=new qe.TransportParseStream,i.elementaryStream=new qe.ElementaryStream,i.timestampRolloverStream=new qe.TimestampRolloverStream,i.adtsStream=new et,i.h264Stream=new ft,i.captionStream=new qe.CaptionStream,i.coalesceStream=new dt(n,i.metadataStream),i.headOfPipeline=i.packetStream,i.packetStream.pipe(i.parseStream).pipe(i.elementaryStream).pipe(i.timestampRolloverStream),i.timestampRolloverStream.pipe(i.h264Stream),i.timestampRolloverStream.pipe(i.adtsStream),i.timestampRolloverStream.pipe(i.metadataStream).pipe(i.coalesceStream),i.h264Stream.pipe(i.captionStream).pipe(i.coalesceStream),i.elementaryStream.on("data",function(e){var t;if("metadata"===e.type){for(t=e.tracks.length;t--;)r||"video"!==e.tracks[t].type?a||"audio"!==e.tracks[t].type||((a=e.tracks[t]).timelineStartInfo.baseMediaDecodeTime=s.baseMediaDecodeTime):(r=e.tracks[t]).timelineStartInfo.baseMediaDecodeTime=s.baseMediaDecodeTime;r&&!i.videoSegmentStream&&(i.coalesceStream.numberOfTracks++,i.videoSegmentStream=new ut(r,n),i.videoSegmentStream.on("timelineStartInfo",function(e){a&&(a.timelineStartInfo=e,i.audioSegmentStream.setEarliestDts(e.dts))}),i.videoSegmentStream.on("processedGopsInfo",s.trigger.bind(s,"gopInfo")),i.videoSegmentStream.on("segmentTimingInfo",s.trigger.bind(s,"videoSegmentTimingInfo")),i.videoSegmentStream.on("baseMediaDecodeTime",function(e){a&&i.audioSegmentStream.setVideoBaseMediaDecodeTime(e)}),i.videoSegmentStream.on("timingInfo",s.trigger.bind(s,"videoTimingInfo")),i.h264Stream.pipe(i.videoSegmentStream).pipe(i.coalesceStream)),a&&!i.audioSegmentStream&&(i.coalesceStream.numberOfTracks++,i.audioSegmentStream=new ct(a,n),i.audioSegmentStream.on("timingInfo",s.trigger.bind(s,"audioTimingInfo")),i.adtsStream.pipe(i.audioSegmentStream).pipe(i.coalesceStream)),s.trigger("trackinfo",{hasAudio:!!a,hasVideo:!!r})}}),i.coalesceStream.on("data",this.trigger.bind(this,"data")),i.coalesceStream.on("id3Frame",function(e){e.dispatchType=i.metadataStream.dispatchType,s.trigger("id3Frame",e)}),i.coalesceStream.on("caption",this.trigger.bind(this,"caption")),i.coalesceStream.on("done",this.trigger.bind(this,"done"))},this.setBaseMediaDecodeTime=function(e){var t=this.transmuxPipeline_;n.keepOriginalTimestamps||(this.baseMediaDecodeTime=e),a&&(a.timelineStartInfo.dts=void 0,a.timelineStartInfo.pts=void 0,ye(a),n.keepOriginalTimestamps||(a.timelineStartInfo.baseMediaDecodeTime=e),t.audioTimestampRolloverStream&&t.audioTimestampRolloverStream.discontinuity()),r&&(t.videoSegmentStream&&(t.videoSegmentStream.gopCache_=[]),r.timelineStartInfo.dts=void 0,r.timelineStartInfo.pts=void 0,ye(r),t.captionStream.reset(),n.keepOriginalTimestamps||(r.timelineStartInfo.baseMediaDecodeTime=e)),t.timestampRolloverStream&&t.timestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(e){a&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(e)},this.setRemux=function(e){var t=this.transmuxPipeline_;n.remux=e,t&&t.coalesceStream&&t.coalesceStream.setRemux(e)},this.alignGopsWith=function(e){r&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(e)},this.push=function(e){if(i){var t=gt(e);t&&"aac"!==this.transmuxPipeline_.type?this.setupAacPipeline():t||"ts"===this.transmuxPipeline_.type||this.setupTsPipeline(),i=!1}this.transmuxPipeline_.headOfPipeline.push(e)},this.flush=function(){i=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.endTimeline=function(){this.transmuxPipeline_.headOfPipeline.endTimeline()},this.reset=function(){this.transmuxPipeline_.headOfPipeline&&this.transmuxPipeline_.headOfPipeline.reset()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}}).prototype=new F;var _t={Transmuxer:ht,VideoSegmentStream:ut,AudioSegmentStream:ct,AUDIO_PROPERTIES:vt,VIDEO_PROPERTIES:yt,generateVideoSegmentTimingInfo:lt};function Mt(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var wt=(function(e,t,i){return t&&Mt(e.prototype,t),i&&Mt(e,i),e}(bt,[{key:"init",value:function(){var n,e;this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=new _t.Transmuxer(this.options),n=this.self,(e=this.transmuxer).on("data",function(e){var t=e.initSegment;e.initSegment={data:t.buffer,byteOffset:t.byteOffset,byteLength:t.byteLength};var i=e.data;e.data=i.buffer,n.postMessage({action:"data",segment:e,byteOffset:i.byteOffset,byteLength:i.byteLength},[e.data])}),e.captionStream&&e.captionStream.on("data",function(e){n.postMessage({action:"caption",data:e})}),e.on("done",function(e){n.postMessage({action:"done"})}),e.on("gopInfo",function(e){n.postMessage({action:"gopInfo",gopInfo:e})}),e.on("videoSegmentTimingInfo",function(e){n.postMessage({action:"videoSegmentTimingInfo",videoSegmentTimingInfo:e})})}},{key:"push",value:function(e){var t=new Uint8Array(e.data,e.byteOffset,e.byteLength);this.transmuxer.push(t)}},{key:"reset",value:function(){this.init()}},{key:"setTimestampOffset",value:function(e){var t=e.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(9e4*t))}},{key:"setAudioAppendStart",value:function(e){this.transmuxer.setAudioAppendStart(Math.ceil(9e4*e.appendStart))}},{key:"flush",value:function(){this.transmuxer.flush()}},{key:"resetCaptions",value:function(){this.transmuxer.resetCaptions()}},{key:"alignGopsWith",value:function(e){this.transmuxer.alignGopsWith(e.gopsToAlignWith.slice())}}]),bt);function bt(e,t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,bt),this.options=t||{},this.self=e,this.init()}new function(t){t.onmessage=function(e){"init"===e.data.action&&e.data.options?this.messageHandlers=new wt(t,e.data.options):(this.messageHandlers||(this.messageHandlers=new wt(t)),e.data&&e.data.action&&"init"!==e.data.action&&this.messageHandlers[e.data.action]&&this.messageHandlers[e.data.action](e.data))}}(Tt)}()}),xc={videoCodec:"avc1",videoObjectTypeIndicator:".4d400d",audioProfile:"2"},Ec=(uu(Sc,sa.EventTarget),ou(Sc,[{key:"data_",value:function(e){var t=e.data.segment;t.data=new Uint8Array(t.data,e.data.byteOffset,e.data.byteLength),t.initSegment=new Uint8Array(t.initSegment.data,t.initSegment.byteOffset,t.initSegment.byteLength),function(e,t,i){var n=t.player_;if(i.captions&&i.captions.length)for(var r in e.inbandTextTracks_||(e.inbandTextTracks_={}),i.captionStreams)if(!e.inbandTextTracks_[r]){n.tech_.trigger({type:"usage",name:"hls-608"});var a=n.textTracks().getTrackById(r);e.inbandTextTracks_[r]=a||n.addRemoteTextTrack({kind:"captions",id:r,label:r},!1).track}i.metadata&&i.metadata.length&&!e.metadataTrack_&&(e.metadataTrack_=n.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},!1).track,e.metadataTrack_.inBandMetadataTrackDispatchType=i.metadata.dispatchType)}(this,this.mediaSource_,t),this.pendingBuffers_.push(t)}},{key:"done_",value:function(){"closed"!==this.mediaSource_.readyState?this.processPendingSegments_():this.pendingBuffers_.length=0}},{key:"videoSegmentTimingInfo_",value:function(e){var t={start:{decode:e.start.dts/9e4,presentation:e.start.pts/9e4},end:{decode:e.end.dts/9e4,presentation:e.end.pts/9e4},baseMediaDecodeTime:e.baseMediaDecodeTime/9e4};e.prependedContentDuration&&(t.prependedContentDuration=e.prependedContentDuration/9e4),this.trigger({type:"videoSegmentTimingInfo",videoSegmentTimingInfo:t})}},{key:"createRealSourceBuffers_",value:function(){var n=this,r=["audio","video"];r.forEach(function(t){if(n[t+"Codec_"]&&!n[t+"Buffer_"]){var i=null;if(n.mediaSource_[t+"Buffer_"])(i=n.mediaSource_[t+"Buffer_"]).updating=!1;else{var e=t+'/mp4;codecs="'+n[t+"Codec_"]+'"';i=Tc(n.mediaSource_.nativeMediaSource_,e),n.mediaSource_[t+"Buffer_"]=i}n[t+"Buffer_"]=i,["update","updatestart","updateend"].forEach(function(e){i.addEventListener(e,function(){if("audio"!==t||!n.audioDisabled_)return"updateend"===e&&(n[t+"Buffer_"].updating=!1),r.every(function(e){return!("audio"!==e||!n.audioDisabled_)||t===e||!n[e+"Buffer_"]||!n[e+"Buffer_"].updating})?n.trigger(e):void 0})})}})}},{key:"appendBuffer",value:function(e){if(this.bufferUpdating_=!0,this.audioBuffer_&&this.audioBuffer_.buffered.length){var t=this.audioBuffer_.buffered;this.transmuxer_.postMessage({action:"setAudioAppendStart",appendStart:t.end(t.length-1)})}this.videoBuffer_&&this.transmuxer_.postMessage({action:"alignGopsWith",gopsToAlignWith:function(e,t,i){if(null==t||!e.length)return[];var n=Math.ceil(9e4*(t-i+3)),r=void 0;for(r=0;r<e.length&&!(e[r].pts>n);r++);return e.slice(r)}(this.gopBuffer_,this.mediaSource_.player_?this.mediaSource_.player_.currentTime():null,this.timeMapping_)}),this.transmuxer_.postMessage({action:"push",data:e.buffer,byteOffset:e.byteOffset,byteLength:e.byteLength},[e.buffer]),this.transmuxer_.postMessage({action:"flush"})}},{key:"appendGopInfo_",value:function(e){this.gopBuffer_=function(e,t,i){if(!t.length)return e;if(i)return t.slice();for(var n=t[0].pts,r=0;r<e.length&&!(e[r].pts>=n);r++);return e.slice(0,r).concat(t)}(this.gopBuffer_,e.data.gopInfo,this.safeAppend_)}},{key:"remove",value:function(e,t){if(this.videoBuffer_&&(this.videoBuffer_.updating=!0,this.videoBuffer_.remove(e,t),this.gopBuffer_=function(e,t,i,n){for(var r=Math.ceil(9e4*(t-n)),a=Math.ceil(9e4*(i-n)),s=e.slice(),o=e.length;o--&&!(e[o].pts<=a););if(-1===o)return s;for(var l=o+1;l--&&!(e[l].pts<=r););return l=Math.max(l,0),s.splice(l,o-l+1),s}(this.gopBuffer_,e,t,this.timeMapping_)),!this.audioDisabled_&&this.audioBuffer_&&(this.audioBuffer_.updating=!0,this.audioBuffer_.remove(e,t)),Xu(e,t,this.metadataTrack_),this.inbandTextTracks_)for(var i in this.inbandTextTracks_)Xu(e,t,this.inbandTextTracks_[i])}},{key:"processPendingSegments_",value:function(){var e={video:{segments:[],bytes:0},audio:{segments:[],bytes:0},captions:[],metadata:[]};if(!this.pendingBuffers_.length)return this.trigger("updateend"),void(this.bufferUpdating_=!1);e=this.pendingBuffers_.reduce(function(e,t){var i=t.type,n=t.data,r=t.initSegment;return e[i].segments.push(n),e[i].bytes+=n.byteLength,e[i].initSegment=r,t.captions&&(e.captions=e.captions.concat(t.captions)),t.info&&(e[i].info=t.info),t.metadata&&(e.metadata=e.metadata.concat(t.metadata)),e},e),this.videoBuffer_||this.audioBuffer_||(0===e.video.bytes&&(this.videoCodec_=null),0===e.audio.bytes&&(this.audioCodec_=null),this.createRealSourceBuffers_()),e.audio.info&&this.mediaSource_.trigger({type:"audioinfo",info:e.audio.info}),e.video.info&&this.mediaSource_.trigger({type:"videoinfo",info:e.video.info}),this.appendAudioInitSegment_&&(!this.audioDisabled_&&this.audioBuffer_&&(e.audio.segments.unshift(e.audio.initSegment),e.audio.bytes+=e.audio.initSegment.byteLength),this.appendAudioInitSegment_=!1);var t=!1;this.videoBuffer_&&e.video.bytes?(e.video.segments.unshift(e.video.initSegment),e.video.bytes+=e.video.initSegment.byteLength,this.concatAndAppendSegments_(e.video,this.videoBuffer_)):!this.videoBuffer_||!this.audioDisabled_&&this.audioBuffer_||(t=!0),$u(this,e.captions,e.metadata),!this.audioDisabled_&&this.audioBuffer_&&this.concatAndAppendSegments_(e.audio,this.audioBuffer_),this.pendingBuffers_.length=0,t&&this.trigger("updateend"),this.bufferUpdating_=!1}},{key:"concatAndAppendSegments_",value:function(e,t){var i=0,n=void 0;if(e.bytes){n=new Uint8Array(e.bytes),e.segments.forEach(function(e){n.set(e,i),i+=e.byteLength});try{t.updating=!0,t.appendBuffer(n)}catch(e){this.mediaSource_.player_&&this.mediaSource_.player_.error({code:-3,type:"APPEND_BUFFER_ERR",message:e.message,originalError:e})}}}},{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}},{key:"dispose",value:function(){this.transmuxer_&&this.transmuxer_.terminate(),this.trigger("dispose"),this.off()}}]),Sc);function Sc(e,t){su(this,Sc);var i=cu(this,(Sc.__proto__||Object.getPrototypeOf(Sc)).call(this,sa.EventTarget));i.timestampOffset_=0,i.pendingBuffers_=[],i.bufferUpdating_=!1,i.mediaSource_=e,i.codecs_=t,i.audioCodec_=null,i.videoCodec_=null,i.audioDisabled_=!1,i.appendAudioInitSegment_=!0,i.gopBuffer_=[],i.timeMapping_=0,i.safeAppend_=11<=sa.browser.IE_VERSION;var n={remux:!1,alignGopsAtEnd:i.safeAppend_};return i.codecs_.forEach(function(e){wc(e)?i.audioCodec_=e:bc(e)&&(i.videoCodec_=e)}),i.transmuxer_=new Ac,i.transmuxer_.postMessage({action:"init",options:n}),i.transmuxer_.onmessage=function(e){return"data"===e.data.action?i.data_(e):"done"===e.data.action?i.done_(e):"gopInfo"===e.data.action?i.appendGopInfo_(e):"videoSegmentTimingInfo"===e.data.action?i.videoSegmentTimingInfo_(e.data.videoSegmentTimingInfo):void 0},Object.defineProperty(i,"timestampOffset",{get:function(){return this.timestampOffset_},set:function(e){"number"==typeof e&&0<=e&&(this.timestampOffset_=e,this.appendAudioInitSegment_=!0,this.gopBuffer_.length=0,this.timeMapping_=0,this.transmuxer_.postMessage({action:"setTimestampOffset",timestampOffset:e}))}}),Object.defineProperty(i,"appendWindowStart",{get:function(){return(this.videoBuffer_||this.audioBuffer_).appendWindowStart},set:function(e){this.videoBuffer_&&(this.videoBuffer_.appendWindowStart=e),this.audioBuffer_&&(this.audioBuffer_.appendWindowStart=e)}}),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(e,t,i){var n=null,r=null,a=0,s=[],o=[];if(!e&&!t)return sa.createTimeRange();if(!e)return t.buffered;if(!t)return e.buffered;if(i)return e.buffered;if(0===e.buffered.length&&0===t.buffered.length)return sa.createTimeRange();for(var l=e.buffered,u=t.buffered,c=l.length;c--;)s.push({time:l.start(c),type:"start"}),s.push({time:l.end(c),type:"end"});for(c=u.length;c--;)s.push({time:u.start(c),type:"start"}),s.push({time:u.end(c),type:"end"});for(s.sort(function(e,t){return e.time-t.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 sa.createTimeRanges(o)}(this.videoBuffer_,this.audioBuffer_,this.audioDisabled_)}}),i}var Dc=(uu(Nc,sa.EventTarget),ou(Nc,[{key:"addSeekableRange_",value:function(e,t){var i=void 0;if(this.duration!==1/0)throw(i=new Error("MediaSource.addSeekableRange() can only be invoked when the duration is Infinity")).name="InvalidStateError",i.code=11,i;(t>this.nativeMediaSource_.duration||isNaN(this.nativeMediaSource_.duration))&&(this.nativeMediaSource_.duration=t)}},{key:"addSourceBuffer",value:function(e){var t=void 0,i=Mc(e);if(/^(video|audio)\/mp2t$/i.test(i.type)){var n=[];i.parameters&&i.parameters.codecs&&(n=i.parameters.codecs.split(","),n=(n=mc(n)).filter(function(e){return wc(e)||bc(e)})),0===n.length&&(n=["avc1.4d400d","mp4a.40.2"]),t=new Ec(this,n),0!==this.sourceBuffers.length&&(this.sourceBuffers[0].createRealSourceBuffers_(),t.createRealSourceBuffers_(),this.sourceBuffers[0].audioDisabled_=!0)}else t=this.nativeMediaSource_.addSourceBuffer(e);return this.sourceBuffers.push(t),t}},{key:"dispose",value:function(){this.trigger("dispose"),this.off(),this.sourceBuffers.forEach(function(e){e.dispose&&e.dispose()}),this.sourceBuffers.length=0}}]),Nc);function Nc(){su(this,Nc);var a=cu(this,(Nc.__proto__||Object.getPrototypeOf(Nc)).call(this)),e=void 0;for(e in a.nativeMediaSource_=new y.MediaSource,a.nativeMediaSource_)e in Nc.prototype||"function"!=typeof a.nativeMediaSource_[e]||(a[e]=a.nativeMediaSource_[e].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(e){(this.duration_=e)===1/0||(this.nativeMediaSource_.duration=e)}}),Object.defineProperty(a,"seekable",{get:function(){return this.duration_===1/0?sa.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 e=a.sourceBuffers[0];return e.appendAudioInitSegment_=!0,e.audioDisabled_=!e.audioCodec_,void a.activeSourceBuffers_.push(e)}for(var i=!1,n=!0,t=0;t<a.player_.audioTracks().length;t++){var r=a.player_.audioTracks()[t];if(r.enabled&&"main"!==r.kind){n=!(i=!0);break}}a.sourceBuffers.forEach(function(e,t){if(e.appendAudioInitSegment_=!0,e.videoCodec_&&e.audioCodec_)e.audioDisabled_=i;else if(e.videoCodec_&&!e.audioCodec_)e.audioDisabled_=!0,n=!1;else if(!e.videoCodec_&&e.audioCodec_&&(e.audioDisabled_=t?n:!n,e.audioDisabled_))return;a.activeSourceBuffers_.push(e)})},a.onPlayerMediachange_=function(){a.sourceBuffers.forEach(function(e){e.appendAudioInitSegment_=!0})},a.onHlsReset_=function(){a.sourceBuffers.forEach(function(e){e.transmuxer_&&e.transmuxer_.postMessage({action:"resetCaptions"})})},a.onHlsSegmentTimeMapping_=function(t){a.sourceBuffers.forEach(function(e){return e.timeMapping_=t.mapping})},["sourceopen","sourceclose","sourceended"].forEach(function(e){this.nativeMediaSource_.addEventListener(e,this.trigger.bind(this))},a),a.on("sourceopen",function(e){var t=h.querySelector('[src="'+a.url_+'"]');t&&(a.player_=sa(t.parentNode),a.player_&&(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(e){for(var t=Zu(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=t)}}),a.on("sourceclose",function(e){this.sourceBuffers.forEach(function(e){e.transmuxer_&&e.transmuxer_.terminate()}),this.sourceBuffers.length=0,this.player_&&(this.player_.audioTracks&&this.player_.audioTracks()&&(this.player_.audioTracks().off("change",this.updateActiveSourceBuffers_),this.player_.audioTracks().off("addtrack",this.updateActiveSourceBuffers_),this.player_.audioTracks().off("removetrack",this.updateActiveSourceBuffers_)),this.player_.el_&&this.player_.off("mediachange",this.onPlayerMediachange_),this.player_.tech_&&this.player_.tech_.el_&&(this.player_.tech_.off("hls-reset",this.onHlsReset_),this.player_.tech_.off("hls-segment-time-mapping",this.onHlsSegmentTimeMapping_)))}),a}var Cc=0;sa.mediaSources={};function Lc(e,t){var i=sa.mediaSources[e];if(!i)throw new Error("Media Source not found (Video.js)");i.trigger({type:"sourceopen",swfId:t})}function Ic(){return!!y.MediaSource&&!!y.MediaSource.isTypeSupported&&y.MediaSource.isTypeSupported('video/mp4;codecs="avc1.4d400d,mp4a.40.2"')}function Oc(){if(this.MediaSource={open:Lc,supportsNativeMediaSources:Ic},Ic())return new Dc;throw new Error("Cannot use create a virtual MediaSource for this video")}Oc.open=Lc,Oc.supportsNativeMediaSources=Ic;var jc={createObjectURL:function(e){var t=void 0;return e instanceof Dc?(t=y.URL.createObjectURL(e.nativeMediaSource_),e.url_=t):e instanceof Dc?(t="blob:vjs-media-source/"+Cc,Cc++,sa.mediaSources[t]=e,t):(t=y.URL.createObjectURL(e),e.url_=t)}};sa.MediaSource=Oc,sa.URL=jc;function kc(e,t){for(var s=void 0,o=Uc(e,{duration:t.duration,minimumUpdatePeriod:t.minimumUpdatePeriod}),i=0;i<t.playlists.length;i++){var n=du(o,t.playlists[i]);n?o=n:s=!0}return hu(t,function(e,t,i,n){if(e.playlists&&e.playlists.length){var r=e.playlists[0].id,a=du(o,e.playlists[0]);a&&((o=a).mediaGroups[t][i][n].playlists[0]=o.playlists[r],s=!1)}}),s?null:o}function Pc(e){var t=e.byterange.offset+e.byterange.length-1;return e.uri+"-"+e.byterange.offset+"-"+t}function Rc(e,t){var i,n,r={};for(var a in e){var s=e[a].sidx;if(s){var o=Pc(s);if(!t[o])break;var l=t[o].sidxInfo;i=l,n=s,(Boolean(!i.map&&!n.map)||Boolean(i.map&&n.map&&i.map.byterange.offset===n.map.byterange.offset&&i.map.byterange.length===n.map.byterange.length))&&i.uri===n.uri&&i.byterange.offset===n.byterange.offset&&i.byterange.length===n.byterange.length&&(r[o]=t[o])}}return r}function zc(e,t,i,n,r){var a={uri:au(n.handleManifestRedirects,e.resolvedUri),byterange:e.byterange,playlist:t};return i(sa.mergeOptions(a,{responseType:"arraybuffer",headers:ku(a)}),r)}var Uc=sa.mergeOptions,Bc=(uu(Fc,sa.EventTarget),ou(Fc,[{key:"setupChildLoader",value:function(e,t){this.masterPlaylistLoader_=e,this.childPlaylist_=t}},{key:"dispose",value:function(){this.trigger("dispose"),this.stopRequest(),this.loadedPlaylists_={},y.clearTimeout(this.minimumUpdatePeriodTimeout_),y.clearTimeout(this.mediaRequest_),y.clearTimeout(this.mediaUpdateTimeout),this.off()}},{key:"hasPendingRequest",value:function(){return this.request||this.mediaRequest_}},{key:"stopRequest",value:function(){if(this.request){var e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}},{key:"sidxRequestFinished_",value:function(r,a,s,o){var l=this;return function(e,t){if(l.request){if(l.request=null,e)return l.error={status:t.status,message:"DASH playlist request error at URL: "+r.uri,response:t.response,code:2},s&&(l.state=s),l.trigger("error"),o(a,null);var i=new Uint8Array(t.response),n=$o.parseSidx(i.subarray(8));return o(a,n)}}}},{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 e=!this.media_||i.id!==this.media_.id;if(e&&this.loadedPlaylists_[i.id]&&this.loadedPlaylists_[i.id].endList)return this.state="HAVE_METADATA",this.media_=i,void(e&&(this.trigger("mediachanging"),this.trigger("mediachange")));if(e)if(this.media_&&this.trigger("mediachanging"),i.sidx){var t=void 0,a=void 0;a=this.masterPlaylistLoader_?(t=this.masterPlaylistLoader_.master,this.masterPlaylistLoader_.sidxMapping_):(t=this.master,this.sidxMapping_);var s=Pc(i.sidx);a[s]={sidxInfo:i.sidx},this.request=zc(i.sidx,i,this.hls_.xhr,{handleManifestRedirects:this.handleManifestRedirects},this.sidxRequestFinished_(i,t,r,function(e,t){if(!e||!t)throw new Error("failed to request sidx");a[s].sidx=t,n.haveMetadata({startingState:r,playlist:e.playlists[i.id]})}))}else this.mediaRequest_=y.setTimeout(this.haveMetadata.bind(this,{startingState:r,playlist:i}),0)}},{key:"haveMetadata",value:function(e){var t=e.startingState,i=e.playlist;this.state="HAVE_METADATA",this.loadedPlaylists_[i.id]=i,this.mediaRequest_=null,this.refreshMedia_(i.id),"HAVE_MASTER"===t?this.trigger("loadedmetadata"):this.trigger("mediachange")}},{key:"pause",value:function(){this.stopRequest(),y.clearTimeout(this.mediaUpdateTimeout),y.clearTimeout(this.minimumUpdatePeriodTimeout_),"HAVE_NOTHING"===this.state&&(this.started=!1)}},{key:"load",value:function(e){var t=this;y.clearTimeout(this.mediaUpdateTimeout),y.clearTimeout(this.minimumUpdatePeriodTimeout_);var i=this.media();if(e){var n=i?i.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=y.setTimeout(function(){return t.load()},n)}else this.started?i&&!i.endList?this.trigger("mediaupdatetimeout"):this.trigger("loadedplaylist"):this.start()}},{key:"parseMasterXml",value:function(){var s=bo(this.masterXml_,{manifestUri:this.srcUrl,clientOffset:this.clientOffset_,sidxMapping:this.sidxMapping_});s.uri=this.srcUrl;for(var e=0;e<s.playlists.length;e++){var t="placeholder-uri-"+e;s.playlists[e].uri=t}return hu(s,function(e,t,i,n){if(e.playlists&&e.playlists.length){var r="placeholder-uri-"+t+"-"+i+"-"+n,a=pu(0,r);e.playlists[0].uri=r,e.playlists[0].id=a,s.playlists[a]=e.playlists[0],s.playlists[r]=e.playlists[0]}}),fu(s),gu(s),s}},{key:"start",value:function(){var i=this;this.started=!0,this.masterPlaylistLoader_?this.mediaRequest_=y.setTimeout(this.haveMaster_.bind(this),0):this.request=this.hls_.xhr({uri:this.srcUrl,withCredentials:this.withCredentials},function(e,t){if(i.request){if(i.request=null,e)return i.error={status:t.status,message:"DASH playlist request error at URL: "+i.srcUrl,responseText:t.responseText,code:2},"HAVE_NOTHING"===i.state&&(i.started=!1),i.trigger("error");i.masterXml_=t.responseText,t.responseHeaders&&t.responseHeaders.date?i.masterLoaded_=Date.parse(t.responseHeaders.date):i.masterLoaded_=Date.now(),i.srcUrl=au(i.handleManifestRedirects,i.srcUrl,t),i.syncClientServerClock_(i.onClientServerClockSync_.bind(i))}})}},{key:"syncClientServerClock_",value:function(n){var r=this,a=To(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:ru(this.srcUrl,a.value),method:a.method,withCredentials:this.withCredentials},function(e,t){if(r.request){if(e)return r.clientOffset_=r.masterLoaded_-Date.now(),n();var i=void 0;i="HEAD"===a.method?t.responseHeaders&&t.responseHeaders.date?Date.parse(t.responseHeaders.date):r.masterLoaded_:Date.parse(t.responseText),r.clientOffset_=i-Date.now(),n()}}))}},{key:"haveMaster_",value:function(){this.state="HAVE_MASTER",this.mediaRequest_=null,this.masterPlaylistLoader_?this.media_||this.media(this.childPlaylist_):(this.master=this.parseMasterXml(),this.trigger("loadedplaylist"))}},{key:"onClientServerClockSync_",value:function(){var e=this;this.haveMaster_(),this.hasPendingRequest()||this.media_||this.media(this.master.playlists[0]),this.master&&this.master.minimumUpdatePeriod&&(this.minimumUpdatePeriodTimeout_=y.setTimeout(function(){e.trigger("minimumUpdatePeriod")},this.master.minimumUpdatePeriod))}},{key:"refreshXml_",value:function(){var p=this;this.request=this.hls_.xhr({uri:this.srcUrl,withCredentials:this.withCredentials},function(e,t){if(p.request){if(p.request=null,e)return p.error={status:t.status,message:"DASH playlist request error at URL: "+p.srcUrl,responseText:t.responseText,code:2},"HAVE_NOTHING"===p.state&&(p.started=!1),p.trigger("error");var i,n,r,a,s,o;p.masterXml_=t.responseText,p.sidxMapping_=(i=p.masterXml_,n=p.srcUrl,r=p.clientOffset_,a=p.sidxMapping_,s=bo(i,{manifestUri:n,clientOffset:r}),o=Rc(s.playlists,a),hu(s,function(e,t,i,n){if(e.playlists&&e.playlists.length){var r=e.playlists;o=Uc(o,Rc(r,a))}}),o);var l=p.parseMasterXml(),u=kc(p.master,l),c=p.media().sidx;if(u)if(c){var h=Pc(c);if(!p.sidxMapping_[h]){var d=p.media();p.request=zc(d.sidx,d,p.hls_.xhr,{handleManifestRedirects:p.handleManifestRedirects},p.sidxRequestFinished_(d,l,p.state,function(e,t){if(!e||!t)throw new Error("failed to request sidx on minimumUpdatePeriod");p.sidxMapping_[h].sidx=t,p.minimumUpdatePeriodTimeout_=y.setTimeout(function(){p.trigger("minimumUpdatePeriod")},p.master.minimumUpdatePeriod),p.refreshMedia_(p.media().id)}))}}else p.master=u;p.minimumUpdatePeriodTimeout_=y.setTimeout(function(){p.trigger("minimumUpdatePeriod")},p.master.minimumUpdatePeriod)}})}},{key:"refreshMedia_",value:function(e){var t=this;if(!e)throw new Error("refreshMedia_ must take a media id");var i=void 0,n=void 0;n=this.masterPlaylistLoader_?(i=this.masterPlaylistLoader_.master,this.masterPlaylistLoader_.parseMasterXml()):(i=this.master,this.parseMasterXml());var r=kc(i,n);r?(this.masterPlaylistLoader_?this.masterPlaylistLoader_.master=r:this.master=r,this.media_=r.playlists[e]):(this.media_=n.playlists[e],this.trigger("playlistunchanged")),this.media().endList||(this.mediaUpdateTimeout=y.setTimeout(function(){t.trigger("mediaupdatetimeout")},mu(this.media(),!!r))),this.trigger("loadedplaylist")}}]),Fc);function Fc(e,t){var i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},n=arguments[3];su(this,Fc);var r=cu(this,(Fc.__proto__||Object.getPrototypeOf(Fc)).call(this)),a=i.withCredentials,s=void 0!==a&&a,o=i.handleManifestRedirects,l=void 0!==o&&o;if(r.hls_=t,r.withCredentials=s,r.handleManifestRedirects=l,!e)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_(r.media().id)}),r.state="HAVE_NOTHING",r.loadedPlaylists_={},"string"==typeof e?(r.srcUrl=e,r.sidxMapping_={},cu(r)):(r.setupChildLoader(n,e),r)}function Gc(e){return sa.log.debug?sa.log.debug.bind(sa,"VHS:",e+" >"):function(){}}function Hc(){}var Yc=(ou(Qc,[{key:"createSourceBuffer_",value:function(e,t){var i=this;this.sourceBuffer_=this.mediaSource.addSourceBuffer(e),this.logger_("created SourceBuffer"),t&&(t.trigger("sourcebufferadded"),this.mediaSource.sourceBuffers.length<2)?t.on("sourcebufferadded",function(){i.start_()}):this.start_()}},{key:"start_",value:function(){var t=this;this.started_=!0,this.onUpdateendCallback_=function(){var e=t.pendingCallback_;t.pendingCallback_=null,t.sourceBuffer_.removing=!1,t.logger_("buffered ["+Wu(t.buffered())+"]"),e&&e(),t.runCallback_()},this.sourceBuffer_.addEventListener("updateend",this.onUpdateendCallback_),this.runCallback_()}},{key:"abort",value:function(e){var t=this;this.processedAppend_&&this.queueCallback_(function(){t.sourceBuffer_.abort()},e)}},{key:"appendBuffer",value:function(e,t){var i=this;this.processedAppend_=!0,this.queueCallback_(function(){e.videoSegmentTimingInfoCallback&&i.sourceBuffer_.addEventListener("videoSegmentTimingInfo",e.videoSegmentTimingInfoCallback),i.sourceBuffer_.appendBuffer(e.bytes)},function(){e.videoSegmentTimingInfoCallback&&i.sourceBuffer_.removeEventListener("videoSegmentTimingInfo",e.videoSegmentTimingInfoCallback),t()})}},{key:"buffered",value:function(){return this.sourceBuffer_?this.sourceBuffer_.buffered:sa.createTimeRanges()}},{key:"remove",value:function(e,t,i){var n=this,r=2<arguments.length&&void 0!==i?i:Hc;this.processedAppend_&&this.queueCallback_(function(){n.logger_("remove ["+e+" => "+t+"]"),n.sourceBuffer_.removing=!0,n.sourceBuffer_.remove(e,t)},r)}},{key:"updating",value:function(){return!this.sourceBuffer_||this.sourceBuffer_.updating||!!this.pendingCallback_&&this.pendingCallback_!==Hc}},{key:"timestampOffset",value:function(e){var t=this;return void 0!==e&&(this.queueCallback_(function(){t.sourceBuffer_.timestampOffset=e,t.runCallback_()}),this.timestampOffset_=e),this.timestampOffset_}},{key:"queueCallback_",value:function(e,t){this.callbacks_.push([e.bind(this),t]),this.runCallback_()}},{key:"runCallback_",value:function(){var e=void 0;!this.updating()&&this.callbacks_.length&&this.started_&&(e=this.callbacks_.shift(),this.pendingCallback_=e[1],e[0]())}},{key:"dispose",value:function(){function e(){t.sourceBuffer_&&"open"===t.mediaSource.readyState&&t.sourceBuffer_.abort(),t.sourceBuffer_.removeEventListener("updateend",e)}var t=this;this.sourceBuffer_.removeEventListener("updateend",this.onUpdateendCallback_),this.sourceBuffer_.removing?this.sourceBuffer_.addEventListener("updateend",e):e()}}]),Qc);function Qc(e,t,i,n){su(this,Qc),this.callbacks_=[],this.pendingCallback_=null,this.timestampOffset_=0,this.mediaSource=e,this.processedAppend_=!1,this.type_=i,this.mimeType_=t,this.logger_=Gc("SourceUpdater["+i+"]["+t+"]"),"closed"===e.readyState?e.addEventListener("sourceopen",this.createSourceBuffer_.bind(this,t,n)):this.createSourceBuffer_(t,n)}function Vc(e){e.forEach(function(e){e.abort()})}function Wc(e,t){return t.timedout?{status:t.status,message:"HLS request timed-out at URL: "+t.uri,code:rh,xhr:t}:t.aborted?{status:t.status,message:"HLS request aborted at URL: "+t.uri,code:ah,xhr:t}:e?{status:t.status,message:"HLS request errored at URL: "+t.uri,code:nh,xhr:t}:null}function qc(s,o,l){return function(e,t){var i,n=t.response,r=Wc(e,t),a=void 0;return r?l(r,s):0===n.byteLength?l({status:t.status,message:"Empty HLS segment content at URL: "+t.uri,code:nh,xhr:t},s):(s.stats={bandwidth:(i=t).bandwidth,bytesReceived:i.bytesReceived||0,roundTripTime:i.roundTripTime||0},s.key?s.encryptedBytes=new Uint8Array(t.response):s.bytes=new Uint8Array(t.response),o&&s.map&&s.map.bytes&&(o.isInitialized()||o.init(),(a=o.parse(s.bytes,s.map.videoTrackIds,s.map.timescales))&&a.captions&&(s.captionStreams=a.captionStreams,s.fmp4Captions=a.captions)),l(null,s))}}function Xc(i,n,r){var a=0,s=!1;return function(e,t){if(!s)return e?(s=!0,Vc(i),r(e,t)):(a+=1)===i.length?(t.endOfAllRequests=Date.now(),t.encryptedBytes?function(n,r,a){n.addEventListener("message",function e(t){if(t.data.source===r.requestId){n.removeEventListener("message",e);var i=t.data.decrypted;return r.bytes=new Uint8Array(i.bytes,i.byteOffset,i.byteLength),a(null,r)}});var e=void 0;e=r.key.bytes.slice?r.key.bytes.slice():new Uint32Array(Array.prototype.slice.call(r.key.bytes)),n.postMessage(zu({source:r.requestId,encrypted:r.encryptedBytes,key:e,iv:r.key.iv}),[r.encryptedBytes.buffer,e.buffer])}(n,t,r):r(null,t)):void 0}}function Zc(r,a){return function(e){var t,i,n;return r.stats=sa.mergeOptions(r.stats,(i=(t=e).target,(n={bandwidth:1/0,bytesReceived:0,roundTripTime:Date.now()-i.requestTime||0}).bytesReceived=t.loaded,n.bandwidth=Math.floor(n.bytesReceived/n.roundTripTime*8*1e3),n)),!r.stats.firstBytesReceivedAt&&r.stats.bytesReceived&&(r.stats.firstBytesReceivedAt=Date.now()),a(e,r)}}function $c(e,t,i,n,r,a,s){var o,l,u,c,h,d=[],p=Xc(d,i,s);if(r.key&&!r.key.bytes){var f=e(sa.mergeOptions(t,{uri:r.key.resolvedUri,responseType:"arraybuffer"}),(o=r,l=p,function(e,t){var i=t.response,n=Wc(e,t);if(n)return l(n,o);if(16!==i.byteLength)return l({status:t.status,message:"Invalid HLS key at URL: "+t.uri,code:nh,xhr:t},o);var r=new DataView(i);return o.key.bytes=new Uint32Array([r.getUint32(0),r.getUint32(4),r.getUint32(8),r.getUint32(12)]),l(null,o)}));d.push(f)}if(r.map&&!r.map.bytes){var g=e(sa.mergeOptions(t,{uri:r.map.resolvedUri,responseType:"arraybuffer",headers:ku(r.map)}),(u=r,c=n,h=p,function(e,t){var i=t.response,n=Wc(e,t);return n?h(n,u):0===i.byteLength?h({status:t.status,message:"Empty HLS segment content at URL: "+t.uri,code:nh,xhr:t},u):(u.map.bytes=new Uint8Array(t.response),c&&!c.isInitialized()&&c.init(),u.map.timescales=tl.timescale(u.map.bytes),u.map.videoTrackIds=tl.videoTrackIds(u.map.bytes),h(null,u))}));d.push(g)}var m=e(sa.mergeOptions(t,{uri:r.resolvedUri,responseType:"arraybuffer",headers:ku(r)}),qc(r,n,p));return m.addEventListener("progress",Zc(r,a)),d.push(m),function(){return Vc(d)}}function Kc(e,t){var i;return e&&(i=y.getComputedStyle(e))?i[t]:""}function Jc(e,n){var r=e.slice();e.sort(function(e,t){var i=n(e,t);return 0===i?r.indexOf(e)-r.indexOf(t):i})}function eh(e,t){var i=void 0,n=void 0;return e.attributes.BANDWIDTH&&(i=e.attributes.BANDWIDTH),i=i||y.Number.MAX_VALUE,t.attributes.BANDWIDTH&&(n=t.attributes.BANDWIDTH),i-(n=n||y.Number.MAX_VALUE)}function th(e){return"number"==typeof e&&isFinite(e)}var ih={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},nh=2,rh=-101,ah=-102,sh=(uu(oh,sa.EventTarget),ou(oh,[{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.trigger("dispose"),this.state="DISPOSED",this.pause(),this.abort_(),this.sourceUpdater_&&this.sourceUpdater_.dispose(),this.resetStats_(),this.captionParser_&&this.captionParser_.reset(),this.checkBufferTimeout_&&y.clearTimeout(this.checkBufferTimeout_),this.syncController_&&this.triggerSyncInfoUpdate_&&this.syncController_.off("syncinfoupdate",this.triggerSyncInfoUpdate_),this.off()}},{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(e){return void 0!==e&&(this.error_=e),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():sa.createTimeRanges()}},{key:"initSegment",value:function(e,t){var i=1<arguments.length&&void 0!==t&&t;if(!e)return null;var n=Uu(e),r=this.initSegments_[n];return i&&!r&&e.bytes&&(this.initSegments_[n]=r={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:e.bytes,timescales:e.timescales,videoTrackIds:e.videoTrackIds}),r||e}},{key:"segmentKey",value:function(e,t){var i=1<arguments.length&&void 0!==t&&t;if(!e)return null;var n=Bu(e),r=this.keyCache_[n];this.cacheEncryptionKeys_&&i&&!r&&e.bytes&&(this.keyCache_[n]=r={resolvedUri:e.resolvedUri,bytes:e.bytes});var a={resolvedUri:(r||e).resolvedUri};return r&&(a.bytes=r.bytes),a}},{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 Yc(this.mediaSource_,this.mimeType_,this.loaderType_,this.sourceBufferEmitter_),this.resetEverything(),this.monitorBuffer_()}},{key:"playlist",value:function(e,t){var i=1<arguments.length&&void 0!==t?t:{};if(e){var n=this.playlist_,r=this.pendingSegment_;this.playlist_=e,this.xhrOptions_=i,"INIT"===this.state&&(e.syncInfo={mediaSequence:e.mediaSequence,time:0});var a=null;if(n&&(n.id?a=n.id:n.uri&&(a=n.uri)),this.logger_("playlist update ["+a+" => "+(e.id||e.uri)+"]"),this.trigger("syncinfoupdate"),"INIT"===this.state&&this.couldBeginLoading_())return this.init_();if(n&&n.uri===e.uri){var s=e.mediaSequence-n.mediaSequence;this.logger_("live window shift ["+s+"]"),null!==this.mediaIndex&&(this.mediaIndex-=s),r&&(r.mediaIndex-=s,0<=r.mediaIndex&&(r.segment=e.segments[r.mediaIndex])),this.syncController_.saveExpiredSegmentInfo(n,e)}else null!==this.mediaIndex&&this.resyncLoader()}}},{key:"pause",value:function(){this.checkBufferTimeout_&&(y.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)}},{key:"paused",value:function(){return null===this.checkBufferTimeout_}},{key:"mimeType",value:function(e,t){this.mimeType_||(this.mimeType_=e,this.sourceBufferEmitter_=t,"INIT"===this.state&&this.couldBeginLoading_()&&this.init_())}},{key:"resetEverything",value:function(e){this.ended_=!1,this.resetLoader(),this.remove(0,1/0,e),this.captionParser_&&this.captionParser_.clearAllCaptions(),this.trigger("reseteverything")}},{key:"resetLoader",value:function(){this.fetchAtBuffer_=!1,this.resyncLoader()}},{key:"resyncLoader",value:function(){this.mediaIndex=null,this.syncPoint_=null,this.abort()}},{key:"remove",value:function(e,t,i){if(t===1/0&&(t=this.duration_()),this.sourceUpdater_&&this.sourceUpdater_.remove(e,t,i),Xu(e,t,this.segmentMetadataTrack_),this.inbandTextTracks_)for(var n in this.inbandTextTracks_)Xu(e,t,this.inbandTextTracks_[n])}},{key:"monitorBuffer_",value:function(){this.checkBufferTimeout_&&y.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=y.setTimeout(this.monitorBufferTick_.bind(this),1)}},{key:"monitorBufferTick_",value:function(){"READY"===this.state&&this.fillBuffer_(),this.checkBufferTimeout_&&y.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=y.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 e=this.checkBuffer_(this.buffered_(),this.playlist_,this.mediaIndex,this.hasPlayed_(),this.currentTime_(),this.syncPoint_);e&&(this.isEndOfStream_(e.mediaIndex)?this.endOfStream():e.mediaIndex===this.playlist_.segments.length-1&&"ended"===this.mediaSource_.readyState&&!this.seeking_()||(e.timeline!==this.currentTimeline_&&(this.syncController_.reset(),e.timestampOffset=e.startOfSegment,this.captionParser_&&this.captionParser_.clearAllCaptions()),this.loadSegment_(e)))}}},{key:"isEndOfStream_",value:function(e,t){return function(e,t,i){if(!e||!t)return!1;var n=i===e.segments.length;return e.endList&&"open"===t.readyState&&n}(1<arguments.length&&void 0!==t?t:this.playlist_,this.mediaSource_,e)&&!this.sourceUpdater_.updating()}},{key:"checkBuffer_",value:function(e,t,i,n,r,a){var s=0,o=void 0;e.length&&(s=e.end(e.length-1));var l=Math.max(0,s-r);if(!t.segments.length)return null;if(l>=this.goalBufferLength_())return null;if(!n&&1<=l)return null;if(null===a)return i=this.getSyncSegmentCandidate_(t),this.generateSegmentInfo_(t,i,null,!0);if(null!==i)return t.segments[i],o=s,this.generateSegmentInfo_(t,i+1,o,!1);if(this.fetchAtBuffer_){var u=tc.getMediaInfoForTime(t,s,a.segmentIndex,a.time);i=u.mediaIndex,o=u.startTime}else{var c=tc.getMediaInfoForTime(t,r,a.segmentIndex,a.time);i=c.mediaIndex,o=c.startTime}return this.generateSegmentInfo_(t,i,o,!1)}},{key:"getSyncSegmentCandidate_",value:function(e){var t=this;if(-1===this.currentTimeline_)return 0;var i=e.segments.map(function(e,t){return{timeline:e.timeline,segmentIndex:t}}).filter(function(e){return e.timeline===t.currentTimeline_});return i.length?i[Math.min(i.length-1,1)].segmentIndex:Math.max(e.segments.length-1,0)}},{key:"generateSegmentInfo_",value:function(e,t,i,n){if(t<0||t>=e.segments.length)return null;var r=e.segments[t];return{requestId:"segment-loader-"+Math.random(),uri:r.resolvedUri,mediaIndex:t,isSyncRequest:n,startOfSegment:i,playlist:e,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:r.timeline,duration:r.duration,segment:r}}},{key:"abortRequestEarly_",value:function(e){if(this.hls_.tech_.paused()||!this.xhrOptions_.timeout||!this.playlist_.attributes.BANDWIDTH)return!1;if(Date.now()-(e.firstBytesReceivedAt||Date.now())<1e3)return!1;var t=this.currentTime_(),i=e.bandwidth,n=this.pendingSegment_.duration,r=tc.estimateSegmentRequestTime(n,i,this.playlist_,e.bytesReceived),a=function(e,t,i){var n=2<arguments.length&&void 0!==i?i:1;return((e.length?e.end(e.length-1):0)-t)/n}(this.buffered_(),t,this.hls_.tech_.playbackRate())-1;if(r<=a)return!1;var s=function(e){var t=e.master,i=e.currentTime,n=e.bandwidth,r=e.duration,a=e.segmentDuration,s=e.timeUntilRebuffer,o=e.currentTimeline,l=e.syncController,u=t.playlists.filter(function(e){return!tc.isIncompatible(e)}),c=u.filter(tc.isEnabled);c.length||(c=u.filter(function(e){return!tc.isDisabled(e)}));var h=c.filter(tc.hasAttribute.bind(null,"BANDWIDTH")).map(function(e){var t=l.getSyncPoint(e,r,o,i)?1:2;return{playlist:e,rebufferingImpact:tc.estimateSegmentRequestTime(a,n,e)*t-s}}),d=h.filter(function(e){return e.rebufferingImpact<=0});return Jc(d,function(e,t){return eh(t.playlist,e.playlist)}),d.length?d[0]:(Jc(h,function(e,t){return e.rebufferingImpact-t.rebufferingImpact}),h[0]||null)}({master:this.hls_.playlists.master,currentTime:t,bandwidth:i,duration:this.duration_(),segmentDuration:n,timeUntilRebuffer:a,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(s){var o=r-a-s.rebufferingImpact,l=.5;return a<=1/30&&(l=1),!(!s.playlist||s.playlist.uri===this.playlist_.uri||o<l)&&(this.bandwidth=s.playlist.attributes.BANDWIDTH*ih.BANDWIDTH_VARIANCE+1,this.abort(),this.trigger("earlyabort"),!0)}}},{key:"handleProgress_",value:function(e,t){this.pendingSegment_&&t.requestId===this.pendingSegment_.requestId&&!this.abortRequestEarly_(t.stats)&&this.trigger("progress")}},{key:"loadSegment_",value:function(e){this.state="WAITING",this.pendingSegment_=e,this.trimBackBuffer_(e),e.abortRequests=$c(this.hls_.xhr,this.xhrOptions_,this.decrypter_,this.captionParser_,this.createSimplifiedSegmentObj_(e),this.handleProgress_.bind(this),this.segmentRequestFinished_.bind(this))}},{key:"trimBackBuffer_",value:function(){var e=function(e,t,i){var n=t-30;e.length&&(n=Math.max(n,e.start(0)));var r=t-i;return Math.min(r,n)}(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);0<e&&this.remove(0,e)}},{key:"createSimplifiedSegmentObj_",value:function(e){var t=e.segment,i={resolvedUri:t.resolvedUri,byterange:t.byterange,requestId:e.requestId};if(t.key){var n=t.key.iv||new Uint32Array([0,0,0,e.mediaIndex+e.playlist.mediaSequence]);i.key=this.segmentKey(t.key),i.key.iv=n}return t.map&&(i.map=this.initSegment(t.map)),i}},{key:"segmentRequestFinished_",value:function(e,t){if(this.mediaRequests+=1,t.stats&&(this.mediaBytesTransferred+=t.stats.bytesReceived,this.mediaTransferDuration+=t.stats.roundTripTime),this.pendingSegment_){if(t.requestId===this.pendingSegment_.requestId){if(e)return this.pendingSegment_=null,this.state="READY",e.code===ah?void(this.mediaRequestsAborted+=1):(this.pause(),e.code===rh?(this.mediaRequestsTimedout+=1,this.bandwidth=1,this.roundTrip=NaN,void this.trigger("bandwidthupdate")):(this.mediaRequestsErrored+=1,this.error(e),void this.trigger("error")));this.bandwidth=t.stats.bandwidth,this.roundTrip=t.stats.roundTripTime,t.map&&(t.map=this.initSegment(t.map,!0)),t.key&&this.segmentKey(t.key,!0),this.processSegmentResponse_(t)}}else this.mediaRequestsAborted+=1}},{key:"processSegmentResponse_",value:function(e){var t=this.pendingSegment_;t.bytes=e.bytes,e.map&&(t.segment.map.bytes=e.map.bytes),t.endOfAllRequests=e.endOfAllRequests,e.fmp4Captions&&(function(e,t,i){for(var n in i)if(!e[n]){t.trigger({type:"usage",name:"hls-608"});var r=t.textTracks().getTrackById(n);e[n]=r||t.addRemoteTextTrack({kind:"captions",id:n,label:n},!1).track}}(this.inbandTextTracks_,this.hls_.tech_,e.captionStreams),function(e){var r=e.inbandTextTracks,t=e.captionArray,a=e.timestampOffset;if(t){var s=window.WebKitDataCue||window.VTTCue;t.forEach(function(e){var t=e.stream,i=e.startTime,n=e.endTime;r[t]&&(i+=a,n+=a,r[t].addCue(new s(i,n,e.text)))})}}({inbandTextTracks:this.inbandTextTracks_,captionArray:e.fmp4Captions,timestampOffset:0}),this.captionParser_&&this.captionParser_.clearParsedCaptions()),this.handleSegment_()}},{key:"handleSegment_",value:function(){var e=this;if(this.pendingSegment_){var t=this.pendingSegment_,i=t.segment,n=this.syncController_.probeSegmentInfo(t);void 0===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(t.isSyncRequest)return this.trigger("syncinfoupdate"),this.pendingSegment_=null,void(this.state="READY");if(null!==t.timestampOffset&&t.timestampOffset!==this.sourceUpdater_.timestampOffset()){if(n&&n.segmentTimestampInfo){var l=n.segmentTimestampInfo[0].ptsTime,u=n.segmentTimestampInfo[0].dtsTime;t.timestampOffset-=l-u}this.sourceUpdater_.timestampOffset(t.timestampOffset),this.trigger("timestampoffset")}var c,h,d,p,f,g,m,v,y,_,M,w=this.syncController_.mappingForTimeline(t.timeline);if(null!==w&&this.trigger({type:"segmenttimemapping",mapping:w}),this.state="APPENDING",i.map){var b=Uu(i.map);if(!this.activeInitSegmentId_||this.activeInitSegmentId_!==b){var T=this.initSegment(i.map);this.sourceUpdater_.appendBuffer({bytes:T.bytes},function(){e.activeInitSegmentId_=b})}}t.byteLength=t.bytes.byteLength,"number"==typeof i.start&&"number"==typeof i.end?this.mediaSecondsLoaded+=i.end-i.start:this.mediaSecondsLoaded+=i.duration,this.logger_((h=(c=t).segment,d=h.start,p=h.end,f=c.playlist,g=f.mediaSequence,m=f.id,v=f.segments,y=void 0===v?[]:v,_=c.mediaIndex,M=c.timeline,["appending ["+_+"] of ["+g+", "+(g+y.length)+"] from playlist ["+m+"]","["+d+" => "+p+"] in timeline ["+M+"]"].join(" "))),this.sourceUpdater_.appendBuffer({bytes:t.bytes,videoSegmentTimingInfoCallback:this.handleVideoSegmentTimingInfo_.bind(this,t.requestId)},this.handleUpdateEnd_.bind(this))}else this.state="READY"}},{key:"handleVideoSegmentTimingInfo_",value:function(e,t){if(this.pendingSegment_&&e===this.pendingSegment_.requestId){var i=this.pendingSegment_.segment;i.videoTimingInfo||(i.videoTimingInfo={}),i.videoTimingInfo.transmuxerPrependedSeconds=t.videoSegmentTimingInfo.prependedContentDuration||0,i.videoTimingInfo.transmuxedPresentationStart=t.videoSegmentTimingInfo.start.presentation,i.videoTimingInfo.transmuxedPresentationEnd=t.videoSegmentTimingInfo.end.presentation,i.videoTimingInfo.baseMediaDecodeTime=t.videoSegmentTimingInfo.baseMediaDecodeTime}}},{key:"handleUpdateEnd_",value:function(){if(!this.pendingSegment_)return this.state="READY",void(this.paused()||this.monitorBuffer_());var e=this.pendingSegment_,t=e.segment,i=null!==this.mediaIndex;this.pendingSegment_=null,this.recordThroughput_(e),this.addSegmentMetadataCue_(e),this.state="READY",this.mediaIndex=e.mediaIndex,this.fetchAtBuffer_=!0,this.currentTimeline_=e.timeline,this.trigger("syncinfoupdate"),t.end&&this.currentTime_()-t.end>3*e.playlist.targetDuration?this.resetEverything():(i&&this.trigger("bandwidthupdate"),this.trigger("progress"),this.isEndOfStream_(e.mediaIndex+1,e.playlist)&&this.endOfStream(),this.paused()||this.monitorBuffer_())}},{key:"recordThroughput_",value:function(e){var t=this.throughput.rate,i=Date.now()-e.endOfAllRequests+1,n=Math.floor(e.byteLength/i*8*1e3);this.throughput.rate+=(n-t)/++this.throughput.count}},{key:"addSegmentMetadataCue_",value:function(e){if(this.segmentMetadataTrack_){var t=e.segment,i=t.start,n=t.end;if(th(i)&&th(n)){Xu(i,n,this.segmentMetadataTrack_);var r=y.WebKitDataCue||y.VTTCue,a={custom:t.custom,dateTimeObject:t.dateTimeObject,dateTimeString:t.dateTimeString,bandwidth:e.playlist.attributes.BANDWIDTH,resolution:e.playlist.attributes.RESOLUTION,codecs:e.playlist.attributes.CODECS,byteLength:e.byteLength,uri:e.uri,timeline:e.timeline,playlist:e.playlist.id,start:i,end:n},s=new r(i,n,JSON.stringify(a));s.value=a,this.segmentMetadataTrack_.addCue(s)}}}}]),oh);function oh(e){su(this,oh);var t=cu(this,(oh.__proto__||Object.getPrototypeOf(oh)).call(this));if(!e)throw new TypeError("Initialization settings are required");if("function"!=typeof e.currentTime)throw new TypeError("No currentTime getter specified");if(!e.mediaSource)throw new TypeError("No MediaSource specified");return t.bandwidth=e.bandwidth,t.throughput={rate:0,count:0},t.roundTrip=NaN,t.resetStats_(),t.mediaIndex=null,t.hasPlayed_=e.hasPlayed,t.currentTime_=e.currentTime,t.seekable_=e.seekable,t.seeking_=e.seeking,t.duration_=e.duration,t.mediaSource_=e.mediaSource,t.hls_=e.hls,t.loaderType_=e.loaderType,t.startingMedia_=void 0,t.segmentMetadataTrack_=e.segmentMetadataTrack,t.goalBufferLength_=e.goalBufferLength,t.sourceType_=e.sourceType,t.inbandTextTracks_=e.inbandTextTracks,t.state_="INIT",t.checkBufferTimeout_=null,t.error_=void 0,t.currentTimeline_=-1,t.pendingSegment_=null,t.mimeType_=null,t.sourceUpdater_=null,t.xhrOptions_=null,t.activeInitSegmentId_=null,t.initSegments_={},t.cacheEncryptionKeys_=e.cacheEncryptionKeys,t.keyCache_={},"main"===t.loaderType_?t.captionParser_=new _l:t.captionParser_=null,t.decrypter_=e.decrypter,t.syncController_=e.syncController,t.syncPoint_={segmentIndex:0,time:0},t.triggerSyncInfoUpdate_=function(){return t.trigger("syncinfoupdate")},t.syncController_.on("syncinfoupdate",t.triggerSyncInfoUpdate_),t.mediaSource_.addEventListener("sourceopen",function(){return t.ended_=!1}),t.fetchAtBuffer_=!1,t.logger_=Gc("SegmentLoader["+t.loaderType_+"]"),Object.defineProperty(t,"state",{get:function(){return this.state_},set:function(e){e!==this.state_&&(this.logger_(this.state_+" -> "+e),this.state_=e)}}),t}function lh(e){return decodeURIComponent(escape(String.fromCharCode.apply(null,e)))}var uh=new Uint8Array("\n\n".split("").map(function(e){return e.charCodeAt(0)})),ch=(uu(hh,sh),ou(hh,[{key:"buffered_",value:function(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues.length)return sa.createTimeRanges();var e=this.subtitlesTrack_.cues,t=e[0].startTime,i=e[e.length-1].startTime;return sa.createTimeRanges([[t,i]])}},{key:"initSegment",value:function(e,t){var i=1<arguments.length&&void 0!==t&&t;if(!e)return null;var n=Uu(e),r=this.initSegments_[n];if(i&&!r&&e.bytes){var a=uh.byteLength+e.bytes.byteLength,s=new Uint8Array(a);s.set(e.bytes),s.set(uh,e.bytes.byteLength),this.initSegments_[n]=r={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:s}}return r||e}},{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(e){return void 0===e||(this.subtitlesTrack_=e,"INIT"===this.state&&this.couldBeginLoading_()&&this.init_()),this.subtitlesTrack_}},{key:"remove",value:function(e,t){Xu(e,t,this.subtitlesTrack_)}},{key:"fillBuffer_",value:function(){var e=this;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=this.skipEmptySegments_(t)){if(null===this.syncController_.timestampOffsetForTimeline(t.timeline))return this.syncController_.one("timestampoffset",function(){e.state="READY",e.paused()||e.monitorBuffer_()}),void(this.state="WAITING_ON_TIMELINE");this.loadSegment_(t)}}},{key:"skipEmptySegments_",value:function(e){for(;e&&e.segment.empty;)e=this.generateSegmentInfo_(e.playlist,e.mediaIndex+1,e.startOfSegment+e.duration,e.isSyncRequest);return e}},{key:"handleSegment_",value:function(){var t=this;if(this.pendingSegment_&&this.subtitlesTrack_){this.state="APPENDING";var e=this.pendingSegment_,i=e.segment;if("function"!=typeof y.WebVTT&&this.subtitlesTrack_&&this.subtitlesTrack_.tech_){var n=void 0,r=function(){t.subtitlesTrack_.tech_.off("vttjsloaded",n),t.error({message:"Error loading vtt.js"}),t.state="READY",t.pause(),t.trigger("error")};return n=function(){t.subtitlesTrack_.tech_.off("vttjserror",r),t.handleSegment_()},this.state="WAITING_ON_VTTJS",this.subtitlesTrack_.tech_.one("vttjsloaded",n),void this.subtitlesTrack_.tech_.one("vttjserror",r)}i.requested=!0;try{this.parseVTTCues_(e)}catch(e){return this.error({message:e.message}),this.state="READY",this.pause(),this.trigger("error")}if(this.updateTimeMapping_(e,this.syncController_.timelines[e.timeline],this.playlist_),e.isSyncRequest)return this.trigger("syncinfoupdate"),this.pendingSegment_=null,void(this.state="READY");e.byteLength=e.bytes.byteLength,this.mediaSecondsLoaded+=i.duration,e.cues.length&&this.remove(e.cues[0].endTime,e.cues[e.cues.length-1].endTime),e.cues.forEach(function(e){t.subtitlesTrack_.addCue(t.featuresNativeTextTracks_?new y.VTTCue(e.startTime,e.endTime,e.text):e)}),this.handleUpdateEnd_()}else this.state="READY"}},{key:"parseVTTCues_",value:function(t){var e=void 0,i=!1;"function"==typeof y.TextDecoder?e=new y.TextDecoder("utf8"):(e=y.WebVTT.StringDecoder(),i=!0);var n=new y.WebVTT.Parser(y,y.vttjs,e);if(t.cues=[],t.timestampmap={MPEGTS:0,LOCAL:0},n.oncue=t.cues.push.bind(t.cues),n.ontimestampmap=function(e){return t.timestampmap=e},n.onparsingerror=function(e){sa.log.warn("Error encountered when parsing cues: "+e.message)},t.segment.map){var r=t.segment.map.bytes;i&&(r=lh(r)),n.parse(r)}var a=t.bytes;i&&(a=lh(a)),n.parse(a),n.flush()}},{key:"updateTimeMapping_",value:function(e,t,i){var n=e.segment;if(t)if(e.cues.length){var r=e.timestampmap,a=r.MPEGTS/9e4-r.LOCAL+t.mapping;if(e.cues.forEach(function(e){e.startTime+=a,e.endTime+=a}),!i.syncInfo){var s=e.cues[0].startTime,o=e.cues[e.cues.length-1].startTime;i.syncInfo={mediaSequence:i.mediaSequence+e.mediaIndex,time:Math.min(s,o-n.duration)}}}else n.empty=!0}}]),hh);function hh(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};su(this,hh);var i=cu(this,(hh.__proto__||Object.getPrototypeOf(hh)).call(this,e,t));return i.mediaSource_=null,i.subtitlesTrack_=null,i.featuresNativeTextTracks_=e.featuresNativeTextTracks,i}function dh(e,t){for(var i=e.cues,n=0;n<i.length;n++){var r=i[n];if(t>=r.adStartTime&&t<=r.adEndTime)return r}return null}var ph=Gl,fh=[{name:"VOD",run:function(e,t,i){if(i===1/0)return null;return{time:0,segmentIndex:0}}},{name:"ProgramDateTime",run:function(e,t,i,n,r){if(!e.datetimeToDisplayTime)return null;var a=t.segments||[],s=null,o=null;r=r||0;for(var l=0;l<a.length;l++){var u=a[l];if(u.dateTimeObject){var c=u.dateTimeObject.getTime()/1e3+e.datetimeToDisplayTime,h=Math.abs(r-c);if(null!==o&&(0===h||o<h))break;o=h,s={time:c,segmentIndex:l}}}return s}},{name:"Segment",run:function(e,t,i,n,r){var a=t.segments||[],s=null,o=null;r=r||0;for(var l=0;l<a.length;l++){var u=a[l];if(u.timeline===n&&void 0!==u.start){var c=Math.abs(r-u.start);if(null!==o&&o<c)break;(!s||null===o||c<=o)&&(o=c,s={time:u.start,segmentIndex:l})}}return s}},{name:"Discontinuity",run:function(e,t,i,n,r){var a=null;if(r=r||0,t.discontinuityStarts&&t.discontinuityStarts.length)for(var s=null,o=0;o<t.discontinuityStarts.length;o++){var l=t.discontinuityStarts[o],u=t.discontinuitySequence+o+1,c=e.discontinuities[u];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:l})}}return a}},{name:"Playlist",run:function(e,t){return t.syncInfo?{time:t.syncInfo.time,segmentIndex:t.syncInfo.mediaSequence-t.mediaSequence}:null}}],gh=(uu(mh,sa.EventTarget),ou(mh,[{key:"getSyncPoint",value:function(e,t,i,n){var r=this.runStrategies_(e,t,i,n);return r.length?this.selectSyncPoint_(r,{key:"time",value:n}):null}},{key:"getExpiredTime",value:function(e,t){if(!e||!e.segments)return null;var i=this.runStrategies_(e,t,e.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+Au(e,n.segmentIndex,0))}},{key:"runStrategies_",value:function(e,t,i,n){for(var r=[],a=0;a<fh.length;a++){var s=fh[a],o=s.run(this,e,t,i,n);o&&(o.strategy=s.name,r.push({strategy:s.name,syncPoint:o}))}return r}},{key:"selectSyncPoint_",value:function(e,t){for(var i=e[0].syncPoint,n=Math.abs(e[0].syncPoint[t.key]-t.value),r=e[0].strategy,a=1;a<e.length;a++){var s=Math.abs(e[a].syncPoint[t.key]-t.value);s<n&&(n=s,i=e[a].syncPoint,r=e[a].strategy)}return this.logger_("syncPoint for ["+t.key+": "+t.value+"] chosen with strategy ["+r+"]: [time:"+i.time+", segmentIndex:"+i.segmentIndex+"]"),i}},{key:"saveExpiredSegmentInfo",value:function(e,t){for(var i=t.mediaSequence-e.mediaSequence-1;0<=i;i--){var n=e.segments[i];if(n&&void 0!==n.start){t.syncInfo={mediaSequence:e.mediaSequence+i,time:n.start},this.logger_("playlist refresh sync: [time:"+t.syncInfo.time+", mediaSequence: "+t.syncInfo.mediaSequence+"]"),this.trigger("syncinfoupdate");break}}}},{key:"setDateTimeMapping",value:function(e){if(!this.datetimeToDisplayTime&&e.segments&&e.segments.length&&e.segments[0].dateTimeObject){var t=e.segments[0].dateTimeObject.getTime()/1e3;this.datetimeToDisplayTime=-t}}},{key:"reset",value:function(){this.inspectCache_=void 0}},{key:"probeSegmentInfo",value:function(e){var t=e.segment,i=e.playlist,n=void 0;return(n=t.map?this.probeMp4Segment_(e):this.probeTsSegment_(e))&&this.calculateSegmentTimeMapping_(e,n)&&(this.saveDiscontinuitySyncInfo_(e),i.syncInfo||(i.syncInfo={mediaSequence:i.mediaSequence+e.mediaIndex,time:t.start})),n}},{key:"probeMp4Segment_",value:function(e){var t=e.segment,i=tl.timescale(t.map.bytes),n=tl.compositionStartTime(i,e.bytes);return null!==e.timestampOffset&&(e.timestampOffset-=n),{start:n,end:n+t.duration}}},{key:"probeTsSegment_",value:function(e){var t=ph(e.bytes,this.inspectCache_),i=void 0,n=void 0,r=void 0;return t?(t.video&&2===t.video.length?(this.inspectCache_=t.video[1].dts,i=t.video[0].dtsTime,n=t.video[1].dtsTime,r=t.video):t.audio&&2===t.audio.length&&(this.inspectCache_=t.audio[1].dts,i=t.audio[0].dtsTime,n=t.audio[1].dtsTime,r=t.audio),{segmentTimestampInfo:r,start:i,end:n,containsVideo:t.video&&2===t.video.length,containsAudio:t.audio&&2===t.audio.length}):null}},{key:"timestampOffsetForTimeline",value:function(e){return void 0===this.timelines[e]?null:this.timelines[e].time}},{key:"mappingForTimeline",value:function(e){return void 0===this.timelines[e]?null:this.timelines[e].mapping}},{key:"calculateSegmentTimeMapping_",value:function(e,t){var i=e.segment,n=this.timelines[e.timeline];if(null!==e.timestampOffset)n={time:e.startOfSegment,mapping:e.startOfSegment-t.start},this.timelines[e.timeline]=n,this.trigger("timestampoffset"),this.logger_("time mapping for timeline "+e.timeline+": [time: "+n.time+"] [mapping: "+n.mapping+"]"),i.start=e.startOfSegment,i.end=t.end+n.mapping;else{if(!n)return!1;i.start=t.start+n.mapping,i.end=t.end+n.mapping}return!0}},{key:"saveDiscontinuitySyncInfo_",value:function(e){var t=e.playlist,i=e.segment;if(i.discontinuity)this.discontinuities[i.timeline]={time:i.start,accuracy:0};else if(t.discontinuityStarts&&t.discontinuityStarts.length)for(var n=0;n<t.discontinuityStarts.length;n++){var r=t.discontinuityStarts[n],a=t.discontinuitySequence+n+1,s=r-e.mediaIndex,o=Math.abs(s);if(!this.discontinuities[a]||this.discontinuities[a].accuracy>o){var l=void 0;l=s<0?i.start-Au(t,e.mediaIndex,r):i.end+Au(t,e.mediaIndex+1,r),this.discontinuities[a]={time:l,accuracy:o}}}}},{key:"dispose",value:function(){this.trigger("dispose"),this.off()}}]),mh);function mh(){su(this,mh);var e=cu(this,(mh.__proto__||Object.getPrototypeOf(mh)).call(this));return e.inspectCache_=void 0,e.timelines=[],e.discontinuities=[],e.datetimeToDisplayTime=null,e.logger_=Gc("SyncController"),e}function vh(e,t){e.abort(),e.pause(),t&&t.activePlaylistLoader&&(t.activePlaylistLoader.pause(),t.activePlaylistLoader=null)}function yh(e,t){(t.activePlaylistLoader=e).load()}function _h(t){["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(function(e){Th[e](e,t)});var i=t.mediaTypes,e=t.masterPlaylistLoader,n=t.tech,r=t.hls;["AUDIO","SUBTITLES"].forEach(function(e){var a,s,o,l,u,c;i[e].activeGroup=(a=e,s=t,function(t){var e=s.masterPlaylistLoader,i=s.mediaTypes[a].groups,n=e.media();if(!n)return null;var r=null;return n.attributes[a]&&(r=i[n.attributes[a]]),r=r||i.main,void 0===t?r:null!==t&&r.filter(function(e){return e.id===t.id})[0]||null}),i[e].activeTrack=Ah[e](e,t),i[e].onGroupChanged=(o=e,l=t,function(){var e=l.segmentLoaders,t=e[o],i=e.main,n=l.mediaTypes[o],r=n.activeTrack(),a=n.activeGroup(r),s=n.activePlaylistLoader;vh(t,n),a&&(a.playlistLoader?(t.resyncLoader(),yh(a.playlistLoader,n)):s&&i.resetEverything())}),i[e].onTrackChanged=(u=e,c=t,function(){var e=c.segmentLoaders,t=e[u],i=e.main,n=c.mediaTypes[u],r=n.activeTrack(),a=n.activeGroup(r),s=n.activePlaylistLoader;vh(t,n),a&&(a.playlistLoader?(s!==a.playlistLoader&&(t.track&&t.track(r),t.resetEverything()),yh(a.playlistLoader,n)):i.resetEverything())})});var a=i.AUDIO.activeGroup(),s=(a.filter(function(e){return e.default})[0]||a[0]).id;function o(){i.AUDIO.onTrackChanged(),n.trigger({type:"usage",name:"hls-audio-change"})}for(var l in i.AUDIO.tracks[s].enabled=!0,i.AUDIO.onTrackChanged(),e.on("mediachange",function(){["AUDIO","SUBTITLES"].forEach(function(e){return i[e].onGroupChanged()})}),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[l])}var Mh=new hc("./decrypter-worker.worker.js",function(e,t){var i,c,m,n,r,l,s,a=this;i=function(e,t,i){return t&&o(e.prototype,t),i&&o(e,i),e},c=null,d.prototype.decrypt=function(e,t,i,n,r,a){var s=this._key[1],o=e^s[0],l=n^s[1],u=i^s[2],c=t^s[3],h=void 0,d=void 0,p=void 0,f=s.length/4-2,g=void 0,m=4,v=this._tables[1],y=v[0],_=v[1],M=v[2],w=v[3],b=v[4];for(g=0;g<f;g++)h=y[o>>>24]^_[l>>16&255]^M[u>>8&255]^w[255&c]^s[m],d=y[l>>>24]^_[u>>16&255]^M[c>>8&255]^w[255&o]^s[m+1],p=y[u>>>24]^_[c>>16&255]^M[o>>8&255]^w[255&l]^s[m+2],c=y[c>>>24]^_[o>>16&255]^M[l>>8&255]^w[255&u]^s[m+3],m+=4,o=h,l=d,u=p;for(g=0;g<4;g++)r[(3&-g)+a]=b[o>>>24]<<24^b[l>>16&255]<<16^b[u>>8&255]<<8^b[255&c]^s[m++],h=o,o=l,l=u,u=c,c=h},m=d,u.prototype.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},u.prototype.off=function(e,t){if(!this.listeners[e])return!1;var i=this.listeners[e].indexOf(t);return this.listeners[e].splice(i,1),-1<i},u.prototype.trigger=function(e,t){var i=this.listeners[e];if(i)if(2===arguments.length)for(var n=i.length,r=0;r<n;++r)i[r].call(this,t);else for(var a=Array.prototype.slice.call(arguments,1),s=i.length,o=0;o<s;++o)i[o].apply(this,a)},u.prototype.dispose=function(){this.listeners={}},u.prototype.pipe=function(t){this.on("data",function(e){t.push(e)})},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(p,r=n=u),p.prototype.processJob_=function(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null},p.prototype.push=function(e){this.jobs.push(e),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))},l=p,f.prototype.decryptChunk_=function(t,i,n,r){return function(){var e=function(e,t,i){var n=new Int32Array(e.buffer,e.byteOffset,e.byteLength>>2),r=new m(Array.prototype.slice.call(t)),a=new Uint8Array(e.byteLength),s=new Int32Array(a.buffer),o=void 0,l=void 0,u=void 0,c=void 0,h=void 0,d=void 0,p=void 0,f=void 0,g=void 0;for(o=i[0],l=i[1],u=i[2],c=i[3],g=0;g<n.length;g+=4)h=v(n[g]),d=v(n[g+1]),p=v(n[g+2]),f=v(n[g+3]),r.decrypt(h,d,p,f,s,g),s[g]=v(s[g]^o),s[g+1]=v(s[g+1]^l),s[g+2]=v(s[g+2]^u),s[g+3]=v(s[g+3]^c),o=h,l=d,u=p,c=f;return a}(t,i,n);r.set(e,t.byteOffset)}},i(f,null,[{key:"STEP",get:function(){return 32e3}}]),s=f,new function(a){a.onmessage=function(e){var r=e.data,t=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(t,i,n,function(e,t){var i,n;a.postMessage((i={source:r.source,decrypted:t},n={},Object.keys(i).forEach(function(e){var t=i[e];ArrayBuffer.isView(t)?n[e]={bytes:t.buffer,byteOffset:t.byteOffset,byteLength:t.byteLength}:n[e]=t}),n),[t.buffer])})}}(a);function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function d(e){h(this,d),c=c||function(){var e=[[[],[],[],[],[]],[[],[],[],[],[]]],t=e[0],i=e[1],n=t[4],r=i[4],a=void 0,s=void 0,o=void 0,l=[],u=[],c=void 0,h=void 0,d=void 0,p=void 0,f=void 0;for(a=0;a<256;a++)u[(l[a]=a<<1^283*(a>>7))^a]=a;for(s=o=0;!n[s];s^=c||1,o=u[o]||1)for(d=(d=o^o<<1^o<<2^o<<3^o<<4)>>8^255&d^99,f=16843009*l[h=l[c=l[r[n[s]=d]=s]]]^65537*h^257*c^16843008*s,p=257*l[d]^16843008*d,a=0;a<4;a++)t[a][s]=p=p<<24^p>>>8,i[a][d]=f=f<<24^f>>>8;for(a=0;a<5;a++)t[a]=t[a].slice(0),i[a]=i[a].slice(0);return e}(),this._tables=[[c[0][0].slice(),c[0][1].slice(),c[0][2].slice(),c[0][3].slice(),c[0][4].slice()],[c[1][0].slice(),c[1][1].slice(),c[1][2].slice(),c[1][3].slice(),c[1][4].slice()]];var t=void 0,i=void 0,n=void 0,r=void 0,a=void 0,s=this._tables[0][4],o=this._tables[1],l=e.length,u=1;if(4!==l&&6!==l&&8!==l)throw new Error("Invalid aes key size");for(r=e.slice(0),a=[],this._key=[r,a],t=l;t<4*l+28;t++)n=r[t-1],(t%l==0||8===l&&t%l==4)&&(n=s[n>>>24]<<24^s[n>>16&255]<<16^s[n>>8&255]<<8^s[255&n],t%l==0&&(n=n<<8^n>>>24^u<<24,u=u<<1^283*(u>>7))),r[t]=r[t-l]^n;for(i=0;t;i++,t--)n=r[3&i?t:t-4],a[i]=t<=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]]}function u(){h(this,u),this.listeners={}}function p(){h(this,p);var e=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,r.call(this,n));return e.jobs=[],e.delay=1,e.timeout_=null,e}function v(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24}function f(e,t,i,n){h(this,f);var r=f.STEP,a=new Int32Array(e.buffer),s=new Uint8Array(e.byteLength),o=0;for(this.asyncStream_=new l,this.asyncStream_.push(this.decryptChunk_(a.subarray(o,o+r),t,i,s)),o=r;o<a.length;o+=r)i=new Uint32Array([v(a[o-4]),v(a[o-3]),v(a[o-2]),v(a[o-1])]),this.asyncStream_.push(this.decryptChunk_(a.subarray(o,o+r),t,i,s));this.asyncStream_.push(function(){var e;n(null,(e=s).subarray(0,e.byteLength-e[e.byteLength-1]))})}}),wh={AUDIO:function(l,u){return function(){var e=u.segmentLoaders[l],t=u.mediaTypes[l],i=u.blacklistCurrentPlaylist;vh(e,t);var n=t.activeTrack(),r=t.activeGroup(),a=(r.filter(function(e){return e.default})[0]||r[0]).id,s=t.tracks[a];if(n!==s){for(var o in sa.log.warn("Problem encountered loading the alternate audio track.Switching back to default."),t.tracks)t.tracks[o].enabled=t.tracks[o]===s;t.onTrackChanged()}else i({message:"Problem encountered loading the default audio track."})}},SUBTITLES:function(n,r){return function(){var e=r.segmentLoaders[n],t=r.mediaTypes[n];sa.log.warn("Problem encountered loading the subtitle track.Disabling subtitle track."),vh(e,t);var i=t.activeTrack();i&&(i.mode="disabled"),t.onTrackChanged()}}},bh={AUDIO:function(e,t,i){if(t){var n=i.tech,r=i.requestOptions,a=i.segmentLoaders[e];t.on("loadedmetadata",function(){var e=t.media();a.playlist(e,r),(!n.paused()||e.endList&&"none"!==n.preload())&&a.load()}),t.on("loadedplaylist",function(){a.playlist(t.media(),r),n.paused()||a.load()}),t.on("error",wh[e](e,i))}},SUBTITLES:function(e,t,i){var n=i.tech,r=i.requestOptions,a=i.segmentLoaders[e],s=i.mediaTypes[e];t.on("loadedmetadata",function(){var e=t.media();a.playlist(e,r),a.track(s.activeTrack()),(!n.paused()||e.endList&&"none"!==n.preload())&&a.load()}),t.on("loadedplaylist",function(){a.playlist(t.media(),r),n.paused()||a.load()}),t.on("error",wh[e](e,i))}},Th={AUDIO:function(e,t){var i,n,r=t.hls,a=t.sourceType,s=t.segmentLoaders[e],o=t.requestOptions,l=t.master.mediaGroups,u=t.mediaTypes[e],c=u.groups,h=u.tracks,d=t.masterPlaylistLoader;for(var p in l[e]&&0!==Object.keys(l[e]).length||(l[e]={main:{default:{default:!0}}}),l[e])for(var f in c[p]||(c[p]=[]),l[e][p]){var g=l[e][p][f],m=void 0;if(m=g.resolvedUri?new Mu(g.resolvedUri,r,o):g.playlists&&"dash"===a?new Bc(g.playlists[0],r,o,d):null,g=sa.mergeOptions({id:f,playlistLoader:m},g),bh[e](e,g.playlistLoader,t),c[p].push(g),void 0===h[f]){var v=new sa.AudioTrack({id:f,kind:(n=void 0,n=(i=g).default?"main":"alternative",i.characteristics&&0<=i.characteristics.indexOf("public.accessibility.describes-video")&&(n="main-desc"),n),enabled:!1,language:g.language,default:g.default,label:f});h[f]=v}}s.on("error",wh[e](e,t))},SUBTITLES:function(e,t){var i=t.tech,n=t.hls,r=t.sourceType,a=t.segmentLoaders[e],s=t.requestOptions,o=t.master.mediaGroups,l=t.mediaTypes[e],u=l.groups,c=l.tracks,h=t.masterPlaylistLoader;for(var d in o[e])for(var p in u[d]||(u[d]=[]),o[e][d])if(!o[e][d][p].forced){var f=o[e][d][p],g=void 0;if("hls"===r?g=new Mu(f.resolvedUri,n,s):"dash"===r&&(g=new Bc(f.playlists[0],n,s,h)),f=sa.mergeOptions({id:p,playlistLoader:g},f),bh[e](e,f.playlistLoader,t),u[d].push(f),void 0===c[p]){var m=i.addRemoteTextTrack({id:p,kind:"subtitles",default:f.default&&f.autoselect,language:f.language,label:p},!1).track;c[p]=m}}a.on("error",wh[e](e,t))},"CLOSED-CAPTIONS":function(e,t){var i=t.tech,n=t.master.mediaGroups,r=t.mediaTypes[e],a=r.groups,s=r.tracks;for(var o in n[e])for(var l in a[o]||(a[o]=[]),n[e][o]){var u=n[e][o][l];if(u.instreamId.match(/CC\d/)&&(a[o].push(sa.mergeOptions({id:l},u)),void 0===s[l])){var c=i.addRemoteTextTrack({id:u.instreamId,kind:"captions",default:u.default&&u.autoselect,language:u.language,label:l},!1).track;s[l]=c}}}},Ah={AUDIO:function(i,n){return function(){var e=n.mediaTypes[i].tracks;for(var t in e)if(e[t].enabled)return e[t];return null}},SUBTITLES:function(i,n){return function(){var e=n.mediaTypes[i].tracks;for(var t in e)if("showing"===e[t].mode||"hidden"===e[t].mode)return e[t];return null}}},xh=void 0,Eh=["mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaBytesTransferred"],Sh=(uu(Dh,sa.EventTarget),ou(Dh,[{key:"setupMasterPlaylistLoaderListeners_",value:function(){var n=this;this.masterPlaylistLoader_.on("loadedmetadata",function(){var e=n.masterPlaylistLoader_.media(),t=1.5*e.targetDuration*1e3;Ou(n.masterPlaylistLoader_.master,n.masterPlaylistLoader_.media())?n.requestOptions_.timeout=0:n.requestOptions_.timeout=t,e.endList&&"none"!==n.tech_.preload()&&(n.mainSegmentLoader_.playlist(e,n.requestOptions_),n.mainSegmentLoader_.load()),_h({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(),e);try{n.setupSourceBuffers_()}catch(e){return sa.log.warn("Failed to create SourceBuffers",e),n.mediaSource.endOfStream("decode")}n.setupFirstPlay(),!n.mediaTypes_.AUDIO.activePlaylistLoader||n.mediaTypes_.AUDIO.activePlaylistLoader.media()?n.trigger("selectedinitialmedia"):n.mediaTypes_.AUDIO.activePlaylistLoader.one("loadedmetadata",function(){n.trigger("selectedinitialmedia")})}),this.masterPlaylistLoader_.on("loadedplaylist",function(){var e=n.masterPlaylistLoader_.media();if(!e){n.excludeUnsupportedVariants_();var t=void 0;return n.enableLowInitialPlaylist&&(t=n.selectInitialPlaylist()),t=t||n.selectPlaylist(),n.initialMedia_=t,void n.masterPlaylistLoader_.media(n.initialMedia_)}if(n.useCueTags_&&n.updateAdCues_(e),n.mainSegmentLoader_.playlist(e,n.requestOptions_),n.updateDuration(),n.tech_.paused()||(n.mainSegmentLoader_.load(),n.audioSegmentLoader_&&n.audioSegmentLoader_.load()),!e.endList){var i=function(){var e=n.seekable();0!==e.length&&n.mediaSource.addSeekableRange_(e.start(0),e.end(0))};n.duration()!==1/0?n.tech_.one("durationchange",function e(){n.duration()===1/0?i():n.tech_.one("durationchange",e)}):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 e=n.masterPlaylistLoader_.media(),t=1.5*e.targetDuration*1e3;Ou(n.masterPlaylistLoader_.master,n.masterPlaylistLoader_.media())?n.requestOptions_.timeout=0:n.requestOptions_.timeout=t,n.mainSegmentLoader_.playlist(e,n.requestOptions_),n.mainSegmentLoader_.load(),n.tech_.trigger({type:"mediachange",bubbles:!0})}),this.masterPlaylistLoader_.on("playlistunchanged",function(){var e=n.masterPlaylistLoader_.media();n.stuckAtPlaylistEnd_(e)&&(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(e,t){var i=e.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"}),xh.Playlist.isAes(t)&&this.tech_.trigger({type:"usage",name:"hls-aes"}),xh.Playlist.isFmp4(t)&&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 n=this;this.mainSegmentLoader_.on("bandwidthupdate",function(){var e=n.selectPlaylist(),t=n.masterPlaylistLoader_.media(),i=n.tech_.buffered();!function(e){var t=e.currentPlaylist,i=e.nextPlaylist,n=e.forwardBuffer,r=e.bufferLowWaterLine,a=e.duration;return e.log,i?!t.endList||a<ih.MAX_BUFFER_LOW_WATER_LINE||i.attributes.BANDWIDTH<t.attributes.BANDWIDTH||r<=n:(sa.log.warn("We received no playlist to switch to. Please check your stream."),0)}({currentPlaylist:t,nextPlaylist:e,forwardBuffer:i.length?i.end(i.length-1)-n.tech_.currentTime():0,bufferLowWaterLine:n.bufferLowWaterLine(),duration:n.duration(),log:n.logger_})||n.masterPlaylistLoader_.media(e),n.tech_.trigger("bandwidthupdate")}),this.mainSegmentLoader_.on("progress",function(){n.trigger("progress")}),this.mainSegmentLoader_.on("error",function(){n.blacklistCurrentPlaylist(n.mainSegmentLoader_.error())}),this.mainSegmentLoader_.on("syncinfoupdate",function(){n.onSyncInfoUpdate_()}),this.mainSegmentLoader_.on("timestampoffset",function(){n.tech_.trigger({type:"usage",name:"hls-timestamp-offset"})}),this.audioSegmentLoader_.on("syncinfoupdate",function(){n.onSyncInfoUpdate_()}),this.mainSegmentLoader_.on("ended",function(){n.onEndOfStream()}),this.mainSegmentLoader_.on("earlyabort",function(){n.blacklistCurrentPlaylist({message:"Aborted early because there isn't enough bandwidth to complete the request without rebuffering."},120)}),this.mainSegmentLoader_.on("reseteverything",function(){n.tech_.trigger("hls-reset")}),this.mainSegmentLoader_.on("segmenttimemapping",function(e){n.tech_.trigger({type:"hls-segment-time-mapping",mapping:e.mapping})}),this.audioSegmentLoader_.on("ended",function(){n.onEndOfStream()})}},{key:"mediaSecondsLoaded_",value:function(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)}},{key:"load",value:function(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()}},{key:"smoothQualityChange_",value:function(){var e=this.selectPlaylist();e!==this.masterPlaylistLoader_.media()&&(this.masterPlaylistLoader_.media(e),this.mainSegmentLoader_.resetLoader())}},{key:"fastQualityChange_",value:function(){var e=this,t=this.selectPlaylist();t!==this.masterPlaylistLoader_.media()&&(this.masterPlaylistLoader_.media(t),this.mainSegmentLoader_.resetEverything(function(){sa.browser.IE_VERSION||sa.browser.IS_EDGE?e.tech_.setCurrentTime(e.tech_.currentTime()+.04):e.tech_.setCurrentTime(e.tech_.currentTime())}))}},{key:"play",value:function(){if(!this.setupFirstPlay()){this.tech_.ended()&&this.tech_.setCurrentTime(0),this.hasPlayed_&&this.load();var e=this.tech_.seekable();return this.tech_.duration()===1/0&&this.tech_.currentTime()<e.start(0)?this.tech_.setCurrentTime(e.end(e.length-1)):void 0}}},{key:"setupFirstPlay",value:function(){var e=this,t=this.masterPlaylistLoader_.media();if(!t||this.tech_.paused()||this.hasPlayed_)return!1;if(!t.endList){var i=this.seekable();if(!i.length)return!1;if(sa.browser.IE_VERSION&&0===this.tech_.readyState())return this.tech_.one("loadedmetadata",function(){e.trigger("firstplay"),e.tech_.setCurrentTime(i.end(0)),e.hasPlayed_=!0}),!1;this.trigger("firstplay"),this.tech_.setCurrentTime(i.end(0))}return this.hasPlayed_=!0,this.load(),!0}},{key:"handleSourceOpen_",value:function(){try{this.setupSourceBuffers_()}catch(e){return sa.log.warn("Failed to create Source Buffers",e),this.mediaSource.endOfStream("decode")}if(this.tech_.autoplay()){var e=this.tech_.play();void 0!==e&&"function"==typeof e.then&&e.then(null,function(e){})}this.trigger("sourceopen")}},{key:"onEndOfStream",value:function(){var e=this.mainSegmentLoader_.ended_;if(this.mediaTypes_.AUDIO.activePlaylistLoader&&(e=(this.mainSegmentLoader_.startingMedia_&&!this.mainSegmentLoader_.startingMedia_.containsVideo||e)&&this.audioSegmentLoader_.ended_),e){this.logger_("calling mediaSource.endOfStream()");try{this.mediaSource.endOfStream()}catch(e){sa.log.warn("Failed to call media source endOfStream",e)}}}},{key:"stuckAtPlaylistEnd_",value:function(e){if(!this.seekable().length)return!1;var t=this.syncController_.getExpiredTime(e,this.mediaSource.duration);if(null===t)return!1;var i=xh.Playlist.playlistEnd(e,t),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(e,t){var i,n=0<arguments.length&&void 0!==e?e:{},r=t,a=void 0;if(a=n.playlist||this.masterPlaylistLoader_.media(),r=r||n.blacklistDuration||this.blacklistDuration,!a){this.error=n;try{return this.mediaSource.endOfStream("network")}catch(e){return this.trigger("error")}}var s=1===this.masterPlaylistLoader_.master.playlists.filter(Lu).length,o=this.masterPlaylistLoader_.master.playlists;return 1===o.length?(sa.log.warn("Problem encountered with the current HLS playlist. Trying again since it is the only playlist."),this.tech_.trigger("retryplaylist"),this.masterPlaylistLoader_.load(s)):(s&&(sa.log.warn("Removing all playlists from the blacklist because the last rendition is about to be blacklisted."),o.forEach(function(e){e.excludeUntil!==1/0&&delete e.excludeUntil}),this.tech_.trigger("retryplaylist")),a.excludeUntil=Date.now()+1e3*r,this.tech_.trigger("blacklistplaylist"),this.tech_.trigger({type:"usage",name:"hls-rendition-blacklisted"}),i=this.selectPlaylist(),sa.log.warn("Problem encountered with the current HLS playlist."+(n.message?" "+n.message:"")+" Switching to another playlist."),this.masterPlaylistLoader_.media(i,s))}},{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(e){var t=Qu(this.tech_.buffered(),e);return this.masterPlaylistLoader_&&this.masterPlaylistLoader_.media()&&this.masterPlaylistLoader_.media().segments?t&&t.length?e:(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:xh.Playlist.duration(this.masterPlaylistLoader_.media()):0}},{key:"seekable",value:function(){return this.seekable_}},{key:"onSyncInfoUpdate_",value:function(){var e=void 0;if(this.masterPlaylistLoader_){var t=this.masterPlaylistLoader_.media();if(t){var i=this.syncController_.getExpiredTime(t,this.mediaSource.duration);if(null!==i){var n=this.masterPlaylistLoader_.master.suggestedPresentationDelay,r=xh.Playlist.seekable(t,i,n);if(0!==r.length){if(this.mediaTypes_.AUDIO.activePlaylistLoader){if(t=this.mediaTypes_.AUDIO.activePlaylistLoader.media(),null===(i=this.syncController_.getExpiredTime(t,this.mediaSource.duration)))return;if(0===(e=xh.Playlist.seekable(t,i,n)).length)return}var a=void 0,s=void 0;this.seekable_&&this.seekable_.length&&(a=this.seekable_.end(0),s=this.seekable_.start(0)),!e||e.start(0)>r.end(0)||r.start(0)>e.end(0)?this.seekable_=r:this.seekable_=sa.createTimeRanges([[e.start(0)>r.start(0)?e.start(0):r.start(0),e.end(0)<r.end(0)?e.end(0):r.end(0)]]),this.seekable_&&this.seekable_.length&&this.seekable_.end(0)===a&&this.seekable_.start(0)===s||(this.logger_("seekable updated ["+Wu(this.seekable_)+"]"),this.tech_.trigger("seekablechanged"))}}}}}},{key:"updateDuration",value:function(){function e(){t.logger_("Setting duration from "+t.mediaSource.duration+" => "+n);try{t.mediaSource.duration=n}catch(e){sa.log.warn("Failed to set media source duration",e)}t.tech_.trigger("durationchange"),t.mediaSource.removeEventListener("sourceopen",e)}var t=this,i=this.mediaSource.duration,n=xh.Playlist.duration(this.masterPlaylistLoader_.media()),r=this.tech_.buffered();0<r.length&&(n=Math.max(n,r.end(r.length-1))),i!==n&&("open"!==this.mediaSource.readyState?this.mediaSource.addEventListener("sourceopen",e):e())}},{key:"dispose",value:function(){var n=this;this.trigger("dispose"),this.decrypter_&&this.decrypter_.terminate(),this.masterPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),["AUDIO","SUBTITLES"].forEach(function(e){var t=n.mediaTypes_[e].groups;for(var i in t)t[i].forEach(function(e){e.playlistLoader&&e.playlistLoader.dispose()})}),this.audioSegmentLoader_.dispose(),this.subtitleSegmentLoader_.dispose(),this.off(),this.mediaSource.dispose&&this.mediaSource.dispose()}},{key:"master",value:function(){return this.masterPlaylistLoader_.master}},{key:"media",value:function(){return this.masterPlaylistLoader_.media()||this.initialMedia_}},{key:"setupSourceBuffers_",value:function(){var e,t=this.masterPlaylistLoader_.media();if(t&&"open"===this.mediaSource.readyState){if((e=_c(this.masterPlaylistLoader_.master,t)).length<1)return this.error="No compatible SourceBuffer configuration for the variant stream:"+t.resolvedUri,this.mediaSource.endOfStream("decode");this.configureLoaderMimeTypes_(e),this.excludeIncompatibleVariants_(t)}}},{key:"configureLoaderMimeTypes_",value:function(e){var t=1<e.length&&-1===e[0].indexOf(",")&&e[0]!==e[1]?new sa.EventTarget:null;this.mainSegmentLoader_.mimeType(e[0],t),e[1]&&this.audioSegmentLoader_.mimeType(e[1],t)}},{key:"excludeUnsupportedVariants_",value:function(){this.master().playlists.forEach(function(e){e.attributes.CODECS&&y.MediaSource&&y.MediaSource.isTypeSupported&&!y.MediaSource.isTypeSupported('video/mp4; codecs="'+e.attributes.CODECS.replace(/avc1\.(\d+)\.(\d+)/i,function(e){return mc([e])[0]})+'"')&&(e.excludeUntil=1/0)})}},{key:"excludeIncompatibleVariants_",value:function(e){var i=2,n=null,t=void 0;e.attributes.CODECS&&(t=vc(e.attributes.CODECS),n=t.videoCodec,i=t.codecCount),this.master().playlists.forEach(function(e){var t={codecCount:2,videoCodec:null};e.attributes.CODECS&&(t=vc(e.attributes.CODECS)),t.codecCount!==i&&(e.excludeUntil=1/0),t.videoCodec!==n&&(e.excludeUntil=1/0)})}},{key:"updateAdCues_",value:function(e){var t=0,i=this.seekable();i.length&&(t=i.start(0)),function(e,t,i){var n=2<arguments.length&&void 0!==i?i:0;if(e.segments)for(var r=n,a=void 0,s=0;s<e.segments.length;s++){var o=e.segments[s];if(a=a||dh(t,r+o.duration/2)){if("cueIn"in o){a.endTime=r,a.adEndTime=r,r+=o.duration,a=null;continue}if(r<a.endTime){r+=o.duration;continue}a.endTime+=o.duration}else if("cueOut"in o&&((a=new y.VTTCue(r,r+o.duration,o.cueOut)).adStartTime=r,a.adEndTime=r+parseFloat(o.cueOut),t.addCue(a)),"cueOutCont"in o){var l,u,c=o.cueOutCont.split("/").map(parseFloat),h=vu(c,2);l=h[0],u=h[1],(a=new y.VTTCue(r,r+o.duration,"")).adStartTime=r-l,a.adEndTime=a.adStartTime+u,t.addCue(a)}r+=o.duration}}(e,this.cueTagsTrack_,t)}},{key:"goalBufferLength",value:function(){var e=this.tech_.currentTime(),t=ih.GOAL_BUFFER_LENGTH,i=ih.GOAL_BUFFER_LENGTH_RATE,n=Math.max(t,ih.MAX_GOAL_BUFFER_LENGTH);return Math.min(t+e*i,n)}},{key:"bufferLowWaterLine",value:function(){var e=this.tech_.currentTime(),t=ih.BUFFER_LOW_WATER_LINE,i=ih.BUFFER_LOW_WATER_LINE_RATE,n=Math.max(t,ih.MAX_BUFFER_LOW_WATER_LINE);return Math.min(t+e*i,n)}}]),Dh);function Dh(e){su(this,Dh);var t,i=cu(this,(Dh.__proto__||Object.getPrototypeOf(Dh)).call(this)),n=e.url,r=e.handleManifestRedirects,a=e.withCredentials,s=e.tech,o=e.bandwidth,l=e.externHls,u=e.useCueTags,c=e.blacklistDuration,h=e.enableLowInitialPlaylist,d=e.cacheEncryptionKeys,p=e.sourceType;if(!n)throw new Error("A non-empty playlist URL is required");xh=l,i.withCredentials=a,i.tech_=s,i.hls_=s.hls,i.sourceType_=p,i.useCueTags_=u,i.blacklistDuration=c,i.enableLowInitialPlaylist=h,i.useCueTags_&&(i.cueTagsTrack_=i.tech_.addTextTrack("metadata","ad-cues"),i.cueTagsTrack_.inBandMetadataTrackDispatchType=""),i.requestOptions_={withCredentials:a,handleManifestRedirects:r,timeout:null},i.mediaTypes_=(t={},["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(function(e){t[e]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:Hc,activeTrack:Hc,onGroupChanged:Hc,onTrackChanged:Hc}}),t),i.mediaSource=new sa.MediaSource,i.mediaSource.addEventListener("sourceopen",i.handleSourceOpen_.bind(i)),i.seekable_=sa.createTimeRanges(),i.hasPlayed_=!1,i.syncController_=new gh(e),i.segmentMetadataTrack_=s.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},!1).track,i.decrypter_=new Mh,i.inbandTextTracks_={};var f={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:o,syncController:i.syncController_,decrypter:i.decrypter_,sourceType:i.sourceType_,inbandTextTracks:i.inbandTextTracks_,cacheEncryptionKeys:d};return i.masterPlaylistLoader_=new("dash"===i.sourceType_?Bc:Mu)(n,i.hls_,i.requestOptions_),i.setupMasterPlaylistLoaderListeners_(),i.mainSegmentLoader_=new sh(sa.mergeOptions(f,{segmentMetadataTrack:i.segmentMetadataTrack_,loaderType:"main"}),e),i.audioSegmentLoader_=new sh(sa.mergeOptions(f,{loaderType:"audio"}),e),i.subtitleSegmentLoader_=new ch(sa.mergeOptions(f,{loaderType:"vtt",featuresNativeTextTracks:i.tech_.featuresNativeTextTracks}),e),i.setupSegmentLoaderListeners_(),Eh.forEach(function(e){i[e+"_"]=function(e){return this.audioSegmentLoader_[e]+this.mainSegmentLoader_[e]}.bind(i,e)}),i.logger_=Gc("MPC"),i.masterPlaylistLoader_.load(),i}function Nh(e,t,i){su(this,Nh);var r,a,s,n=e.masterPlaylistController_,o=n[(e.options_.smoothQualityChange?"smooth":"fast")+"QualityChange_"].bind(n);if(t.attributes.RESOLUTION){var l=t.attributes.RESOLUTION;this.width=l.width,this.height=l.height}this.bandwidth=t.attributes.BANDWIDTH,this.id=i,this.enabled=(r=e.playlists,a=t.id,s=o,function(e){var t=r.master.playlists[a],i=Cu(t),n=Lu(t);return void 0===e?n:(e?delete t.disabled:t.disabled=!0,e===n||i||(s(),e?r.trigger("renditionenabled"):r.trigger("renditiondisabled")),e)})}var Ch=["seeking","seeked","pause","playing","error"],Lh=(ou(Ih,[{key:"monitorCurrentTime_",value:function(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&y.clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=y.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 e=this.tech_.currentTime(),t=this.tech_.buffered();if(this.lastRecordedTime===e&&(!t.length||e+.1>=t.end(t.length-1)))return this.techWaiting_();5<=this.consecutiveUpdates&&e===this.lastRecordedTime?(this.consecutiveUpdates++,this.waiting_()):e===this.lastRecordedTime?this.consecutiveUpdates++:(this.consecutiveUpdates=0,this.lastRecordedTime=e)}}},{key:"cancelTimer_",value:function(){this.consecutiveUpdates=0,this.timer_&&(this.logger_("cancelTimer_"),clearTimeout(this.timer_)),this.timer_=null}},{key:"fixesBadSeeks_",value:function(){if(!this.tech_.seeking())return!1;var e=this.seekable(),t=this.tech_.currentTime(),i=void 0;return this.afterSeekableWindow_(e,t,this.media(),this.allowSeeksWithinUnsafeLiveWindow)&&(i=e.end(e.length-1)),this.beforeSeekableWindow_(e,t)&&(i=e.start(0)+.1),void 0!==i&&(this.logger_("Trying to seek outside of seekable at time "+t+" with seekable range "+Wu(e)+". Seeking to "+i+"."),this.tech_.setCurrentTime(i),!0)}},{key:"waiting_",value:function(){if(!this.techWaiting_()){var e=this.tech_.currentTime(),t=this.tech_.buffered(),i=Qu(t,e);return i.length&&e+3<=i.end(0)?(this.cancelTimer_(),this.tech_.setCurrentTime(e),this.logger_("Stopped at "+e+" 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 e=this.seekable(),t=this.tech_.currentTime();if(this.tech_.seeking()&&this.fixesBadSeeks_())return!0;if(this.tech_.seeking()||null!==this.timer_)return!0;if(this.beforeSeekableWindow_(e,t)){var i=e.end(e.length-1);return this.logger_("Fell out of live window at time "+t+". Seeking to live point (seekable end) "+i),this.cancelTimer_(),this.tech_.setCurrentTime(i),this.tech_.trigger({type:"usage",name:"hls-live-resync"}),!0}var n=this.tech_.buffered(),r=Vu(n,t);if(this.videoUnderflow_(r,n,t))return this.cancelTimer_(),this.tech_.setCurrentTime(t),this.tech_.trigger({type:"usage",name:"hls-video-underflow"}),!0;if(0<r.length){var a=r.start(0)-t;return this.logger_("Stopped at "+t+", setting timer for "+a+", seeking to "+r.start(0)),this.timer_=setTimeout(this.skipTheGap_.bind(this),1e3*a,t),!0}return!1}},{key:"afterSeekableWindow_",value:function(e,t,i,n){var r=3<arguments.length&&void 0!==n&&n;if(!e.length)return!1;var a=e.end(e.length-1)+.1;return!i.endList&&r&&(a=e.end(e.length-1)+3*i.targetDuration),a<t}},{key:"beforeSeekableWindow_",value:function(e,t){return!!(e.length&&0<e.start(0)&&t<e.start(0)-.1)}},{key:"videoUnderflow_",value:function(e,t,i){if(0===e.length){var n=this.gapFromVideoUnderflow_(t,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(e){var t=this.tech_.buffered(),i=this.tech_.currentTime(),n=Vu(t,i);this.cancelTimer_(),0!==n.length&&i===e&&(this.logger_("skipTheGap_:","currentTime:",i,"scheduled currentTime:",e,"nextRange start:",n.start(0)),this.tech_.setCurrentTime(n.start(0)+1/30),this.tech_.trigger({type:"usage",name:"hls-gap-skip"}))}},{key:"gapFromVideoUnderflow_",value:function(e,t){for(var i=function(e){if(e.length<2)return sa.createTimeRanges();for(var t=[],i=1;i<e.length;i++){var n=e.end(i-1),r=e.start(i);t.push([n,r])}return sa.createTimeRanges(t)}(e),n=0;n<i.length;n++){var r=i.start(n),a=i.end(n);if(t-r<4&&2<t-r)return{start:r,end:a}}return null}}]),Ih);function Ih(e){var t=this;su(this,Ih),this.tech_=e.tech,this.seekable=e.seekable,this.allowSeeksWithinUnsafeLiveWindow=e.allowSeeksWithinUnsafeLiveWindow,this.media=e.media,this.consecutiveUpdates=0,this.lastRecordedTime=null,this.timer_=null,this.checkCurrentTimeTimeout_=null,this.logger_=Gc("PlaybackWatcher"),this.logger_("initialize");function i(){return t.monitorCurrentTime_()}function n(){return t.techWaiting_()}function r(){return t.cancelTimer_()}function a(){return t.fixesBadSeeks_()}this.tech_.on("seekablechanged",a),this.tech_.on("waiting",n),this.tech_.on(Ch,r),this.tech_.on("canplay",i),this.dispose=function(){t.logger_("dispose"),t.tech_.off("seekablechanged",a),t.tech_.off("waiting",n),t.tech_.off(Ch,r),t.tech_.off("canplay",i),t.checkCurrentTimeTimeout_&&y.clearTimeout(t.checkCurrentTimeTimeout_),t.cancelTimer_()}}function Oh(t,e){var i=0,n=0,r=sa.mergeOptions(kh,e);function a(){n&&t.currentTime(n)}function s(e){null!=e&&(n=t.duration()!==1/0&&t.currentTime()||0,t.one("loadedmetadata",a),t.src(e),t.trigger({type:"usage",name:"hls-error-reload"}),t.play())}function o(){if(Date.now()-i<1e3*r.errorInterval)t.trigger({type:"usage",name:"hls-error-reload-canceled"});else{if(r.getSource&&"function"==typeof r.getSource)return i=Date.now(),r.getSource.call(t,s);sa.log.error("ERROR: reloadSourceOnError - The option getSource must be a function!")}}function l(){t.off("loadedmetadata",a),t.off("error",o),t.off("dispose",l)}t.ready(function(){t.trigger({type:"usage",name:"hls-error-reload-initialized"})}),t.on("error",o),t.on("dispose",l),t.reloadSourceOnError=function(e){l(),Oh(t,e)}}function jh(e){Oh(this,e)}var kh={errorInterval:30,getSource:function(e){return e(this.tech({IWillNotUseThisInPlugins:!0}).currentSource_)}},Ph={PlaylistLoader:Mu,Playlist:tc,Decrypter:iu,AsyncStream:Kl,decrypt:tu,utils:rc,STANDARD_PLAYLIST_SELECTOR:function(){var e=this.useDevicePixelRatio&&y.devicePixelRatio||1;return function(e,t,i,n,r){var a=e.playlists.map(function(e){var t,i;return t=e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width,i=e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height,{bandwidth:e.attributes.BANDWIDTH||y.Number.MAX_VALUE,width:t,height:i,playlist:e}});Jc(a,function(e,t){return e.bandwidth-t.bandwidth});var s=(a=a.filter(function(e){return!tc.isIncompatible(e.playlist)})).filter(function(e){return tc.isEnabled(e.playlist)});s.length||(s=a.filter(function(e){return!tc.isDisabled(e.playlist)}));var o=s.filter(function(e){return e.bandwidth*ih.BANDWIDTH_VARIANCE<t}),l=o[o.length-1],u=o.filter(function(e){return e.bandwidth===l.bandwidth})[0];if(!1===r){var c=u||s[0]||a[0];return c?c.playlist:null}var h=o.filter(function(e){return e.width&&e.height});Jc(h,function(e,t){return e.width-t.width});var d=h.filter(function(e){return e.width===i&&e.height===n});l=d[d.length-1];var p=d.filter(function(e){return e.bandwidth===l.bandwidth})[0],f=void 0,g=void 0,m=void 0;p||(g=(f=h.filter(function(e){return e.width>i||e.height>n})).filter(function(e){return e.width===f[0].width&&e.height===f[0].height}),l=g[g.length-1],m=g.filter(function(e){return e.bandwidth===l.bandwidth})[0]);var v=m||p||u||s[0]||a[0];return v?v.playlist:null}(this.playlists.master,this.systemBandwidth,parseInt(Kc(this.tech_.el(),"width"),10)*e,parseInt(Kc(this.tech_.el(),"height"),10)*e,this.limitRenditionByPlayerDimensions)},INITIAL_PLAYLIST_SELECTOR:function(){var e=this.playlists.master.playlists.filter(tc.isEnabled);return Jc(e,function(e,t){return eh(e,t)}),e.filter(function(e){return vc(e.attributes.CODECS).videoCodec})[0]||null},comparePlaylistBandwidth:eh,comparePlaylistResolution:function(e,t){var i=void 0,n=void 0;return e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(i=e.attributes.RESOLUTION.width),i=i||y.Number.MAX_VALUE,t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width&&(n=t.attributes.RESOLUTION.width),i===(n=n||y.Number.MAX_VALUE)&&e.attributes.BANDWIDTH&&t.attributes.BANDWIDTH?e.attributes.BANDWIDTH-t.attributes.BANDWIDTH:i-n},xhr:ju()};["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(t){Object.defineProperty(Ph,t,{get:function(){return sa.log.warn("using Hls."+t+" is UNSAFE be sure you know what you are doing"),ih[t]},set:function(e){sa.log.warn("using Hls."+t+" is UNSAFE be sure you know what you are doing"),"number"!=typeof e||e<0?sa.log.warn("value of Hls."+t+" must be greater than or equal to 0"):ih[t]=e}})});function Rh(e){return/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i.test(e)?"hls":/^application\/dash\+xml/i.test(e)?"dash":null}function zh(e,t){for(var i=t.media(),n=-1,r=0;r<e.length;r++)if(e[r].id===i.id){n=r;break}e.selectedIndex_=n,e.trigger({selectedIndex:n,type:"change"})}var Uh="videojs-vhs";Ph.canPlaySource=function(){return sa.log.warn("HLS is no longer a tech. Please remove it from your player's techOrder.")};function Bh(e){var t=e.masterPlaylistController_.mainSegmentLoader_,i=e.masterPlaylistController_.audioSegmentLoader_,n=sa.players[e.tech_.options_.playerId];if(n.eme){var r=function(e,t,i){if(!e)return e;var n=void 0,r=void 0;if(i.mimeType_)n=t.mimeType_,r=i.mimeType_;else{var a=Mc(t.mimeType_),s=a.parameters.codecs.split(","),o=void 0,l=void 0;s.forEach(function(e){e=e.trim(),wc(e)?o=e:bc(e)&&(l=e)}),n=a.type+'; codecs="'+l+'"',r=a.type.replace("video","audio")+'; codecs="'+o+'"'}var u={},c=t.playlist_;for(var h in e)u[h]={audioContentType:r,videoContentType:n},c.contentProtection&&c.contentProtection[h]&&c.contentProtection[h].pssh&&(u[h].pssh=c.contentProtection[h].pssh),"string"==typeof e[h]&&(u[h].url=e[h]);return sa.mergeOptions(e,u)}(e.source_.keySystems,t,i);r&&(n.currentSource().keySystems=r,11!==sa.browser.IE_VERSION&&n.eme.initializeMediaKeys&&n.eme.initializeMediaKeys())}}function Fh(){if(!window.localStorage)return null;var e=window.localStorage.getItem(Uh);if(!e)return null;try{return JSON.parse(e)}catch(e){return null}}Ph.supportsNativeHls=function(){var t=h.createElement("video");if(!sa.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(e){return/maybe|probably/i.test(t.canPlayType(e))})}(),Ph.supportsNativeDash=!!sa.getTech("Html5").isSupported()&&/maybe|probably/i.test(h.createElement("video").canPlayType("application/dash+xml")),Ph.supportsTypeNatively=function(e){return"hls"===e?Ph.supportsNativeHls:"dash"===e&&Ph.supportsNativeDash},Ph.isSupported=function(){return sa.log.warn("HLS is no longer a tech. Please remove it from your player's techOrder.")};var Gh=sa.getComponent("Component"),Hh=(uu(Yh,Gh),ou(Yh,[{key:"setOptions_",value:function(){var t=this;if(this.options_.withCredentials=this.options_.withCredentials||!1,this.options_.handleManifestRedirects=this.options_.handleManifestRedirects||!1,this.options_.limitRenditionByPlayerDimensions=!1!==this.options_.limitRenditionByPlayerDimensions,this.options_.useDevicePixelRatio=this.options_.useDevicePixelRatio||!1,this.options_.smoothQualityChange=this.options_.smoothQualityChange||!1,this.options_.useBandwidthFromLocalStorage=void 0!==this.source_.useBandwidthFromLocalStorage?this.source_.useBandwidthFromLocalStorage:this.options_.useBandwidthFromLocalStorage||!1,this.options_.customTagParsers=this.options_.customTagParsers||[],this.options_.customTagMappers=this.options_.customTagMappers||[],this.options_.cacheEncryptionKeys=this.options_.cacheEncryptionKeys||!1,"number"!=typeof this.options_.blacklistDuration&&(this.options_.blacklistDuration=300),"number"!=typeof this.options_.bandwidth&&this.options_.useBandwidthFromLocalStorage){var e=Fh();e&&e.bandwidth&&(this.options_.bandwidth=e.bandwidth,this.tech_.trigger({type:"usage",name:"hls-bandwidth-from-local-storage"})),e&&e.throughput&&(this.options_.throughput=e.throughput,this.tech_.trigger({type:"usage",name:"hls-throughput-from-local-storage"}))}"number"!=typeof this.options_.bandwidth&&(this.options_.bandwidth=ih.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===ih.INITIAL_BANDWIDTH,["withCredentials","useDevicePixelRatio","limitRenditionByPlayerDimensions","bandwidth","smoothQualityChange","customTagParsers","customTagMappers","handleManifestRedirects","cacheEncryptionKeys"].forEach(function(e){void 0!==t.source_[e]&&(t.options_[e]=t.source_[e])}),this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions,this.useDevicePixelRatio=this.options_.useDevicePixelRatio}},{key:"src",value:function(e,t){var n=this;e&&(this.setOptions_(),this.options_.url=this.source_.src,this.options_.tech=this.tech_,this.options_.externHls=Ph,this.options_.sourceType=Rh(t),this.options_.seekTo=function(e){n.tech_.setCurrentTime(e)},this.masterPlaylistController_=new Sh(this.options_),this.playbackWatcher_=new Lh(sa.mergeOptions(this.options_,{seekable:function(){return n.seekable()},media:function(){return n.masterPlaylistController_.media()}})),this.masterPlaylistController_.on("error",function(){sa.players[n.tech_.options_.playerId].error(n.masterPlaylistController_.error)}),this.masterPlaylistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):Ph.STANDARD_PLAYLIST_SELECTOR.bind(this),this.masterPlaylistController_.selectInitialPlaylist=Ph.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(e){this.masterPlaylistController_.selectPlaylist=e.bind(this)}},throughput:{get:function(){return this.masterPlaylistController_.mainSegmentLoader_.throughput.rate},set:function(e){this.masterPlaylistController_.mainSegmentLoader_.throughput.rate=e,this.masterPlaylistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get:function(){return this.masterPlaylistController_.mainSegmentLoader_.bandwidth},set:function(e){this.masterPlaylistController_.mainSegmentLoader_.bandwidth=e,this.masterPlaylistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get:function(){var e=1/(this.bandwidth||1),t=void 0;return t=0<this.throughput?1/this.throughput:0,Math.floor(1/(e+t))},set:function(){sa.log.error('The "systemBandwidth" property is read-only')}}}),this.options_.bandwidth&&(this.bandwidth=this.options_.bandwidth),this.options_.throughput&&(this.throughput=this.options_.throughput),Object.defineProperties(this.stats,{bandwidth:{get:function(){return 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 qu(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 qu(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.tech_.on("bandwidthupdate",function(){n.options_.useBandwidthFromLocalStorage&&function(e){if(window.localStorage){var t=Fh();t=t?sa.mergeOptions(t,e):e;try{window.localStorage.setItem(Uh,JSON.stringify(t))}catch(e){return}}}({bandwidth:n.bandwidth,throughput:Math.round(n.throughput)})}),this.masterPlaylistController_.on("selectedinitialmedia",function(){var i,e;e=(i=n).playlists,i.representations=function(){return e&&e.master&&e.master.playlists?e.master.playlists.filter(function(e){return!Cu(e)}).map(function(e,t){return new Nh(i,e,e.id)}):[]},Bh(n)}),this.on(this.masterPlaylistController_,"progress",function(){this.tech_.trigger("progress")}),this.on(this.masterPlaylistController_,"firstplay",function(){this.ignoreNextSeekingEvent_=!0}),this.setupQualityLevels_(),this.tech_.el()&&this.tech_.src(sa.URL.createObjectURL(this.masterPlaylistController_.mediaSource)))}},{key:"setupQualityLevels_",value:function(){var i=this,e=sa.players[this.tech_.options_.playerId];e&&e.qualityLevels&&!this.qualityLevels_&&(this.qualityLevels_=e.qualityLevels(),this.masterPlaylistController_.on("selectedinitialmedia",function(){var t,e;t=i.qualityLevels_,(e=i).representations().forEach(function(e){t.addQualityLevel(e)}),zh(t,e.playlists)}),this.playlists.on("mediachange",function(){zh(i.qualityLevels_,i.playlists)}))}},{key:"play",value:function(){this.masterPlaylistController_.play()}},{key:"setCurrentTime",value:function(e){this.masterPlaylistController_.setCurrentTime(e)}},{key:"duration",value:function(){return this.masterPlaylistController_.duration()}},{key:"seekable",value:function(){return this.masterPlaylistController_.seekable()}},{key:"dispose",value:function(){this.playbackWatcher_&&this.playbackWatcher_.dispose(),this.masterPlaylistController_&&this.masterPlaylistController_.dispose(),this.qualityLevels_&&this.qualityLevels_.dispose(),this.player_&&(delete this.player_.vhs,delete this.player_.dash,delete this.player_.hls),this.tech_&&this.tech_.hls&&delete this.tech_.hls,function e(t,i,n){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,i);if(void 0===r){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,i,n)}if("value"in r)return r.value;var s=r.get;return void 0!==s?s.call(n):void 0}(Yh.prototype.__proto__||Object.getPrototypeOf(Yh.prototype),"dispose",this).call(this)}},{key:"convertToProgramTime",value:function(e,t){return Gu({playlist:this.masterPlaylistController_.media(),time:e,callback:t})}},{key:"seekToProgramTime",value:function(e,t,i,n){var r=!(2<arguments.length&&void 0!==i)||i,a=3<arguments.length&&void 0!==n?n:2;return Hu({programTime:e,playlist:this.masterPlaylistController_.media(),retryCount:a,pauseAfterSeek:r,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:t})}}]),Yh);function Yh(e,t,i){su(this,Yh);var n=cu(this,(Yh.__proto__||Object.getPrototypeOf(Yh)).call(this,t,i.hls));if(t.options_&&t.options_.playerId){var r=sa(t.options_.playerId);r.hasOwnProperty("hls")||Object.defineProperty(r,"hls",{get:function(){return sa.log.warn("player.hls is deprecated. Use player.tech().hls instead."),t.trigger({type:"usage",name:"hls-player-access"}),n},configurable:!0}),r.vhs=n,(r.dash=n).player_=r}if(n.tech_=t,n.source_=e,n.stats={},n.ignoreNextSeekingEvent_=!1,n.setOptions_(),n.options_.overrideNative&&t.overrideNativeAudioTracks&&t.overrideNativeVideoTracks)t.overrideNativeAudioTracks(!0),t.overrideNativeVideoTracks(!0);else if(n.options_.overrideNative&&(t.featuresNativeVideoTracks||t.featuresNativeAudioTracks))throw new Error("Overriding native HLS requires emulated tracks. See https://git.io/vMpjB");return n.on(h,["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],function(e){var t=h.fullscreenElement||h.webkitFullscreenElement||h.mozFullScreenElement||h.msFullscreenElement;t&&t.contains(n.tech_.el())&&n.masterPlaylistController_.smoothQualityChange_()}),n.on(n.tech_,"seeking",function(){this.ignoreNextSeekingEvent_?this.ignoreNextSeekingEvent_=!1:this.setCurrentTime(this.tech_.currentTime())}),n.on(n.tech_,"error",function(){this.masterPlaylistController_&&this.masterPlaylistController_.pauseLoading()}),n.on(n.tech_,"play",n.play),n}var Qh={name:"videojs-http-streaming",VERSION:"1.13.2",canHandleSource:function(e,t){var i=sa.mergeOptions(sa.options,1<arguments.length&&void 0!==t?t:{});return Qh.canPlayType(e.type,i)},handleSource:function(e,t,i){var n=sa.mergeOptions(sa.options,2<arguments.length&&void 0!==i?i:{});return t.hls=new Hh(e,t,n),t.hls.xhr=ju(),t.hls.src(e.src,e.type),t.hls},canPlayType:function(e,t){var i=sa.mergeOptions(sa.options,1<arguments.length&&void 0!==t?t:{}).hls.overrideNative,n=Rh(e);return n&&(!Ph.supportsTypeNatively(n)||i)?"maybe":""}};return void 0!==sa.MediaSource&&void 0!==sa.URL||(sa.MediaSource=Oc,sa.URL=jc),Oc.supportsNativeMediaSources()&&sa.getTech("Html5").registerSourceHandler(Qh,0),sa.HlsHandler=Hh,sa.HlsSourceHandler=Qh,sa.Hls=Ph,sa.use||sa.registerComponent("Hls",Ph),sa.options.hls=sa.options.hls||{},sa.registerPlugin?sa.registerPlugin("reloadSourceOnError",jh):sa.plugin("reloadSourceOnError",jh),sa}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("global/window"),require("global/document"),require("video.js")):"function"==typeof define&&define.amd?define(["global/window","global/document","video.js"],t):(e=e||self).videojsVr=t(e.window,e.document,e.videojs)}(this,function(s,n,o){"use strict";
1s=s&&s.hasOwnProperty("default")?s.default:s,n=n&&n.hasOwnProperty("default")?n.default:n,o=o&&o.hasOwnProperty("default")?o.default:o;var a=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e};var i=function(e,t){e.prototype=Object.create(t.prototype),(e.prototype.constructor=e).__proto__=t},f="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var e,t,r=(function(e){e.exports=function(){var Ve=typeof window!=="undefined"?window:typeof f!=="undefined"?f:typeof self!=="undefined"?self:{};function e(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e["default"]:e}function t(e,t){return t={exports:{}},e(t,t.exports),t.exports}var a=function e(n){if(Promise.race){return Promise.race(n)}return new Promise(function(e,t){for(var i=0;i<n.length;i++){n[i].then(e,t)}})},i=function e(){return/Android/i.test(navigator.userAgent)||/iPhone|iPad|iPod/i.test(navigator.userAgent)},r=function e(t,i){for(var n=0,r=t.length;n<r;n++){i[n]=t[n]}},n=function e(t,i){for(var n in i){if(i.hasOwnProperty(n)){t[n]=i[n]}}return t},s,o=e(t(function(i,e){(function(e,t){i.exports=t()})(Ve,function(){var i=function(e,t){if(!(e instanceof t)){throw new TypeError("Cannot call a class as a function")}};var e=function(){function n(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||false;n.configurable=true;if("value"in n)n.writable=true;Object.defineProperty(e,n.key,n)}}return function(e,t,i){if(t)n(e.prototype,t);if(i)n(e,i);return e}}();var l=function(){function i(e,t){var i=[];var n=true;var r=false;var a=undefined;try{for(var s=e[Symbol.iterator](),o;!(n=(o=s.next()).done);n=true){i.push(o.value);if(t&&i.length===t)break}}catch(e){r=true;a=e}finally{try{if(!n&&s["return"])s["return"]()}finally{if(r)throw a}}return i}return function(e,t){if(Array.isArray(e)){return e}else if(Symbol.iterator in Object(e)){return i(e,t)}else{throw new TypeError("Invalid attempt to destructure non-iterable instance")}}}();var a=.001;var s=1;var t=function e(t,i){return"data:"+t+";base64,"+i};var b=function e(t,i,n){return t+(i-t)*n};var p=function(){var e=/iPad|iPhone|iPod/.test(navigator.platform);return function(){return e}}();var f=function(){var e=navigator.userAgent.indexOf("Version")!==-1&&navigator.userAgent.indexOf("Android")!==-1&&navigator.userAgent.indexOf("Chrome")!==-1;return function(){return e}}();var n=function(){var e=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);return function(){return e}}();var o=function(){var e=navigator.userAgent.indexOf("Firefox")!==-1&&navigator.userAgent.indexOf("Android")!==-1;return function(){return e}}();var u=function(){var e=navigator.userAgent.match(/.*Chrome\/([0-9]+)/);var t=e?parseInt(e[1],10):null;return function(){return t}}();var c=function(){var e=false;if(u()===65){var t=navigator.userAgent.match(/.*Chrome\/([0-9\.]*)/);if(t){var i=t[1].split("."),n=l(i,4),r=n[0],a=n[1],s=n[2],o=n[3];e=parseInt(s,10)===3325&&parseInt(o,10)<148}}return function(){return e}}();var h=function(){var e=navigator.userAgent.indexOf("R7 Build")!==-1;return function(){return e}}();var d=function e(){var t=window.orientation==90||window.orientation==-90;return h()?!t:t};var r=function e(t){if(isNaN(t)){return false}if(t<=a){return false}if(t>s){return false}return true};var g=function e(){return Math.max(window.screen.width,window.screen.height)*window.devicePixelRatio};var m=function e(){return Math.min(window.screen.width,window.screen.height)*window.devicePixelRatio};var v=function e(t){if(f()){return false}if(t.requestFullscreen){t.requestFullscreen()}else if(t.webkitRequestFullscreen){t.webkitRequestFullscreen()}else if(t.mozRequestFullScreen){t.mozRequestFullScreen()}else if(t.msRequestFullscreen){t.msRequestFullscreen()}else{return false}return true};var y=function e(){if(document.exitFullscreen){document.exitFullscreen()}else if(document.webkitExitFullscreen){document.webkitExitFullscreen()}else if(document.mozCancelFullScreen){document.mozCancelFullScreen()}else if(document.msExitFullscreen){document.msExitFullscreen()}else{return false}return true};var _=function e(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement};var M=function e(t,i,n,r){var a=t.createShader(t.VERTEX_SHADER);t.shaderSource(a,i);t.compileShader(a);var s=t.createShader(t.FRAGMENT_SHADER);t.shaderSource(s,n);t.compileShader(s);var o=t.createProgram();t.attachShader(o,a);t.attachShader(o,s);for(var l in r){t.bindAttribLocation(o,r[l],l)}t.linkProgram(o);t.deleteShader(a);t.deleteShader(s);return o};var w=function e(t,i){var n={};var r=t.getProgramParameter(i,t.ACTIVE_UNIFORMS);var a="";for(var s=0;s<r;s++){var o=t.getActiveUniform(i,s);a=o.name.replace("[0]","");n[a]=t.getUniformLocation(i,a)}return n};var T=function e(t,i,n,r,a,s,o){var l=1/(i-n),u=1/(r-a),c=1/(s-o);t[0]=-2*l;t[1]=0;t[2]=0;t[3]=0;t[4]=0;t[5]=-2*u;t[6]=0;t[7]=0;t[8]=0;t[9]=0;t[10]=2*c;t[11]=0;t[12]=(i+n)*l;t[13]=(a+r)*u;t[14]=(o+s)*c;t[15]=1;return t};var A=function e(){var t=false;(function(e){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|
1sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0,4)))t=true})(navigator.userAgent||navigator.vendor||window.opera);return t};var x=function e(t,i){for(var n in i){if(i.hasOwnProperty(n)){t[n]=i[n]}}return t};var E=function e(t){if(p()){var i=t.style.width;var n=t.style.height;t.style.width=parseInt(i)+1+"px";t.style.height=parseInt(n)+"px";setTimeout(function(){t.style.width=i;t.style.height=n},100)}window.canvas=t};var S=function(){var c=Math.PI/180;var h=Math.PI*.25;function l(e,t,i,n){var r=Math.tan(t?t.upDegrees*c:h),a=Math.tan(t?t.downDegrees*c:h),s=Math.tan(t?t.leftDegrees*c:h),o=Math.tan(t?t.rightDegrees*c:h),l=2/(s+o),u=2/(r+a);e[0]=l;e[1]=0;e[2]=0;e[3]=0;e[4]=0;e[5]=u;e[6]=0;e[7]=0;e[8]=-((s-o)*l*.5);e[9]=(r-a)*u*.5;e[10]=n/(i-n);e[11]=-1;e[12]=0;e[13]=0;e[14]=n*i/(i-n);e[15]=0;return e}function u(e,t,i){var n=t[0],r=t[1],a=t[2],s=t[3],o=n+n,l=r+r,u=a+a,c=n*o,h=n*l,d=n*u,p=r*l,f=r*u,g=a*u,m=s*o,v=s*l,y=s*u;e[0]=1-(p+g);e[1]=h+y;e[2]=d-v;e[3]=0;e[4]=h-y;e[5]=1-(c+g);e[6]=f+m;e[7]=0;e[8]=d+v;e[9]=f-m;e[10]=1-(c+p);e[11]=0;e[12]=i[0];e[13]=i[1];e[14]=i[2];e[15]=1;return e}function d(e,t,i){var n=i[0],r=i[1],a=i[2],s,o,l,u,c,h,d,p,f,g,m,v;if(t===e){e[12]=t[0]*n+t[4]*r+t[8]*a+t[12];e[13]=t[1]*n+t[5]*r+t[9]*a+t[13];e[14]=t[2]*n+t[6]*r+t[10]*a+t[14];e[15]=t[3]*n+t[7]*r+t[11]*a+t[15]}else{s=t[0];o=t[1];l=t[2];u=t[3];c=t[4];h=t[5];d=t[6];p=t[7];f=t[8];g=t[9];m=t[10];v=t[11];e[0]=s;e[1]=o;e[2]=l;e[3]=u;e[4]=c;e[5]=h;e[6]=d;e[7]=p;e[8]=f;e[9]=g;e[10]=m;e[11]=v;e[12]=s*n+c*r+f*a+t[12];e[13]=o*n+h*r+g*a+t[13];e[14]=l*n+d*r+m*a+t[14];e[15]=u*n+p*r+v*a+t[15]}return e}function p(e,t){var i=t[0],n=t[1],r=t[2],a=t[3],s=t[4],o=t[5],l=t[6],u=t[7],c=t[8],h=t[9],d=t[10],p=t[11],f=t[12],g=t[13],m=t[14],v=t[15],y=i*o-n*s,_=i*l-r*s,M=i*u-a*s,w=n*l-r*o,b=n*u-a*o,T=r*u-a*l,A=c*g-h*f,x=c*m-d*f,E=c*v-p*f,S=h*m-d*g,D=h*v-p*g,N=d*v-p*m,C=y*N-_*D+M*S+w*E-b*x+T*A;if(!C){return null}C=1/C;e[0]=(o*N-l*D+u*S)*C;e[1]=(r*D-n*N-a*S)*C;e[2]=(g*T-m*b+v*w)*C;e[3]=(d*b-h*T-p*w)*C;e[4]=(l*E-s*N-u*x)*C;e[5]=(i*N-r*E+a*x)*C;e[6]=(m*M-f*T-v*_)*C;e[7]=(c*T-d*M+p*_)*C;e[8]=(s*D-o*E+u*A)*C;e[9]=(n*E-i*D-a*A)*C;e[10]=(f*b-g*M+v*y)*C;e[11]=(h*M-c*b-p*y)*C;e[12]=(o*x-s*S-l*A)*C;e[13]=(i*S-n*x+r*A)*C;e[14]=(g*_-f*w-m*y)*C;e[15]=(c*w-h*_+d*y)*C;return e}var f=new Float32Array([0,0,0,1]);var g=new Float32Array([0,0,0]);function n(e,t,i,n,r,a){l(e,n||null,a.depthNear,a.depthFar);var s=i.orientation||f;var o=i.position||g;u(t,s,o);if(r)d(t,t,r);p(t,t)}return function(e,t,i){if(!e||!t)return false;e.pose=t;e.timestamp=t.timestamp;n(e.leftProjectionMatrix,e.leftViewMatrix,t,i._getFieldOfView("left"),i._getEyeOffset("left"),i);n(e.rightProjectionMatrix,e.rightViewMatrix,t,i._getFieldOfView("right"),i._getEyeOffset("right"),i);return true}}();var D=function e(){var t=window.self!==window.top;var i=N(document.referrer);var n=N(window.location.href);return t&&i!==n};var N=function e(t){var i;var n=t.indexOf("://");if(n!==-1){i=n+3}else{i=0}var r=t.indexOf("/",i);if(r===-1){r=t.length}return t.substring(0,r)};var C=function e(t){if(t.w>1){console.warn("getQuaternionAngle: w > 1");return 0}var i=2*Math.acos(t.w);return i};var L=function(){var i={};return function(e,t){if(i[e]===undefined){console.warn("webvr-polyfill: "+t);i[e]=true}}}();var I=function e(t,i){var n=i?"Please use "+i+" instead.":"";L(t,t+" has been deprecated. "+"This may not work on native WebVR displays. "+n)};function O(e,t,i){if(!t){i(e);return}var n=[];var r=null;for(var a=0;a<t.length;++a){var s=t[a];switch(s){case e.TEXTURE_BINDING_2D:case e.TEXTURE_BINDING_CUBE_MAP:var o=t[++a];if(o<e.TEXTURE0||o>e.TEXTURE31){console.error("TEXTURE_BINDING_2D or TEXTURE_BINDING_CUBE_MAP must be followed by a valid texture unit");n.push(null,null);break}if(!r){r=e.getParameter(e.ACTIVE_TEXTURE)}e.activeTexture(o);n.push(e.getParameter(s),null);break;case e.ACTIVE_TEXTURE:r=e.getParameter(e.ACTIVE_TEXTURE);n.push(null);break;default:n.push(e.getParameter(s));break}}i(e);for(var a=0;a<t.length;++a){var s=t[a];var l=n[a];switch(s){case e.ACTIVE_TEXTURE:break;case e.ARRAY_BUFFER_BINDING:e.bindBuffer(e.ARRAY_BUFFER,l);break;case e.COLOR_CLEAR_VALUE:e.clearColor(l[0],l[1],l[2],l[3]);break;
1case e.COLOR_WRITEMASK:e.colorMask(l[0],l[1],l[2],l[3]);break;case e.CURRENT_PROGRAM:e.useProgram(l);break;case e.ELEMENT_ARRAY_BUFFER_BINDING:e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,l);break;case e.FRAMEBUFFER_BINDING:e.bindFramebuffer(e.FRAMEBUFFER,l);break;case e.RENDERBUFFER_BINDING:e.bindRenderbuffer(e.RENDERBUFFER,l);break;case e.TEXTURE_BINDING_2D:var o=t[++a];if(o<e.TEXTURE0||o>e.TEXTURE31)break;e.activeTexture(o);e.bindTexture(e.TEXTURE_2D,l);break;case e.TEXTURE_BINDING_CUBE_MAP:var o=t[++a];if(o<e.TEXTURE0||o>e.TEXTURE31)break;e.activeTexture(o);e.bindTexture(e.TEXTURE_CUBE_MAP,l);break;case e.VIEWPORT:e.viewport(l[0],l[1],l[2],l[3]);break;case e.BLEND:case e.CULL_FACE:case e.DEPTH_TEST:case e.SCISSOR_TEST:case e.STENCIL_TEST:if(l){e.enable(s)}else{e.disable(s)}break;default:console.log("No GL restore behavior for 0x"+s.toString(16));break}if(r){e.activeTexture(r)}}}var j=O;var k=["attribute vec2 position;","attribute vec3 texCoord;","varying vec2 vTexCoord;","uniform vec4 viewportOffsetScale[2];","void main() {"," vec4 viewport = viewportOffsetScale[int(texCoord.z)];"," vTexCoord = (texCoord.xy * viewport.zw) + viewport.xy;"," gl_Position = vec4( position, 1.0, 1.0 );","}"].join("\n");var P=["precision mediump float;","uniform sampler2D diffuse;","varying vec2 vTexCoord;","void main() {"," gl_FragColor = texture2D(diffuse, vTexCoord);","}"].join("\n");function R(e,t,i,n){this.gl=e;this.cardboardUI=t;this.bufferScale=i;this.dirtySubmitFrameBindings=n;this.ctxAttribs=e.getContextAttributes();this.meshWidth=20;this.meshHeight=20;this.bufferWidth=e.drawingBufferWidth;this.bufferHeight=e.drawingBufferHeight;this.realBindFramebuffer=e.bindFramebuffer;this.realEnable=e.enable;this.realDisable=e.disable;this.realColorMask=e.colorMask;this.realClearColor=e.clearColor;this.realViewport=e.viewport;if(!p()){this.realCanvasWidth=Object.getOwnPropertyDescriptor(e.canvas.__proto__,"width");this.realCanvasHeight=Object.getOwnPropertyDescriptor(e.canvas.__proto__,"height")}this.isPatched=false;this.lastBoundFramebuffer=null;this.cullFace=false;this.depthTest=false;this.blend=false;this.scissorTest=false;this.stencilTest=false;this.viewport=[0,0,0,0];this.colorMask=[true,true,true,true];this.clearColor=[0,0,0,0];this.attribs={position:0,texCoord:1};this.program=M(e,k,P,this.attribs);this.uniforms=w(e,this.program);this.viewportOffsetScale=new Float32Array(8);this.setTextureBounds();this.vertexBuffer=e.createBuffer();this.indexBuffer=e.createBuffer();this.indexCount=0;this.renderTarget=e.createTexture();this.framebuffer=e.createFramebuffer();this.depthStencilBuffer=null;this.depthBuffer=null;this.stencilBuffer=null;if(this.ctxAttribs.depth&&this.ctxAttribs.stencil){this.depthStencilBuffer=e.createRenderbuffer()}else if(this.ctxAttribs.depth){this.depthBuffer=e.createRenderbuffer()}else if(this.ctxAttribs.stencil){this.stencilBuffer=e.createRenderbuffer()}this.patch();this.onResize()}R.prototype.destroy=function(){var e=this.gl;this.unpatch();e.deleteProgram(this.program);e.deleteBuffer(this.vertexBuffer);e.deleteBuffer(this.indexBuffer);e.deleteTexture(this.renderTarget);e.deleteFramebuffer(this.framebuffer);if(this.depthStencilBuffer){e.deleteRenderbuffer(this.depthStencilBuffer)}if(this.depthBuffer){e.deleteRenderbuffer(this.depthBuffer)}if(this.stencilBuffer){e.deleteRenderbuffer(this.stencilBuffer)}if(this.cardboardUI){this.cardboardUI.destroy()}};R.prototype.onResize=function(){var e=this.gl;var t=this;var i=[e.RENDERBUFFER_BINDING,e.TEXTURE_BINDING_2D,e.TEXTURE0];j(e,i,function(e){t.realBindFramebuffer.call(e,e.FRAMEBUFFER,null);if(t.scissorTest){t.realDisable.call(e,e.SCISSOR_TEST)}t.realColorMask.call(e,true,true,true,true);t.realViewport.call(e,0,0,e.drawingBufferWidth,e.drawingBufferHeight);t.realClearColor.call(e,0,0,0,1);e.clear(e.COLOR_BUFFER_BIT);t.realBindFramebuffer.call(e,e.FRAMEBUFFER,t.framebuffer);e.bindTexture(e.TEXTURE_2D,t.renderTarget);e.texImage2D(e.TEXTURE_2D,0,t.ctxAttribs.alpha?e.RGBA:e.RGB,t.bufferWidth,t.bufferHeight,0,t.ctxAttribs.alpha?e.RGBA:e.RGB,e.UNSIGNED_BYTE,null);e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR);e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR);e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE);e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE);e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,t.renderTarget,0);if(t.ctxAttribs.depth&&t.ctxAttribs.stencil){e.bindRenderbuffer(e.RENDERBUFFER,t.depthStencilBuffer);e.renderbufferStorage(e.RENDERBUFFER,e.DEPTH_STENCIL,t.bufferWidth,t.bufferHeight);e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_STENCIL_ATTACHMENT,e.RENDERBUFFER,t.depthStencilBuffer)}else if(t.ctxAttribs.depth){e.bindRenderbuffer(e.RENDERBUFFER,t.depthBuffer);e.renderbufferStorage(e.RENDERBUFFER,e.DEPTH_COMPONENT16,t.bufferWidth,t.bufferHeight);e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.RENDERBUFFER,t.depthBuffer)}else if(t.ctxAttribs.stencil){e.bindRenderbuffer(e.RENDERBUFFER,t.stencilBuffer);e.renderbufferStorage(e.RENDERBUFFER,e.STENCIL_INDEX8,t.bufferWidth,t.bufferHeight);e.framebufferRenderbuffer(e.FRAMEBUFFER,e.STENCIL_ATTACHMENT,e.RENDERBUFFER,t.stencilBuffer)}if(!e.checkFramebufferStatus(e.FRAMEBUFFER)===e.FRAMEBUFFER_COMPLETE){console.error("Framebuffer incomplete!")}t.realBindFramebuffer.call(e,e.FRAMEBUFFER,t.lastBoundFramebuffer);if(t.scissorTest){t.realEnable.call(e,e.SCISSOR_TEST)}t.realColorMask.apply(e,t.colorMask);t.realViewport.apply(e,t.viewport);t.realClearColor.apply(e,t.clearColor)});if(this.cardboardUI){this.cardboardUI.onResize()}};R.prototype.patch=function(){if(this.isPatched){return}var r=this;var i=this.gl.canvas;var a=this.gl;if(!p()){i.width=g()*this.bufferScale;i.height=m()*this.bufferScale;Object.defineProperty(i,"width",{configurable:true,enumerable:true,get:function e(){return r.bufferWidth}
vendor: 19,078 bytes, line 1
1,set:function e(t){r.bufferWidth=t;r.realCanvasWidth.set.call(i,t);r.onResize()}});Object.defineProperty(i,"height",{configurable:true,enumerable:true,get:function e(){return r.bufferHeight},set:function e(t){r.bufferHeight=t;r.realCanvasHeight.set.call(i,t);r.onResize()}})}this.lastBoundFramebuffer=a.getParameter(a.FRAMEBUFFER_BINDING);if(this.lastBoundFramebuffer==null){this.lastBoundFramebuffer=this.framebuffer;this.gl.bindFramebuffer(a.FRAMEBUFFER,this.framebuffer)}this.gl.bindFramebuffer=function(e,t){r.lastBoundFramebuffer=t?t:r.framebuffer;r.realBindFramebuffer.call(a,e,r.lastBoundFramebuffer)};this.cullFace=a.getParameter(a.CULL_FACE);this.depthTest=a.getParameter(a.DEPTH_TEST);this.blend=a.getParameter(a.BLEND);this.scissorTest=a.getParameter(a.SCISSOR_TEST);this.stencilTest=a.getParameter(a.STENCIL_TEST);a.enable=function(e){switch(e){case a.CULL_FACE:r.cullFace=true;break;case a.DEPTH_TEST:r.depthTest=true;break;case a.BLEND:r.blend=true;break;case a.SCISSOR_TEST:r.scissorTest=true;break;case a.STENCIL_TEST:r.stencilTest=true;break}r.realEnable.call(a,e)};a.disable=function(e){switch(e){case a.CULL_FACE:r.cullFace=false;break;case a.DEPTH_TEST:r.depthTest=false;break;case a.BLEND:r.blend=false;break;case a.SCISSOR_TEST:r.scissorTest=false;break;case a.STENCIL_TEST:r.stencilTest=false;break}r.realDisable.call(a,e)};this.colorMask=a.getParameter(a.COLOR_WRITEMASK);a.colorMask=function(e,t,i,n){r.colorMask[0]=e;r.colorMask[1]=t;r.colorMask[2]=i;r.colorMask[3]=n;r.realColorMask.call(a,e,t,i,n)};this.clearColor=a.getParameter(a.COLOR_CLEAR_VALUE);a.clearColor=function(e,t,i,n){r.clearColor[0]=e;r.clearColor[1]=t;r.clearColor[2]=i;r.clearColor[3]=n;r.realClearColor.call(a,e,t,i,n)};this.viewport=a.getParameter(a.VIEWPORT);a.viewport=function(e,t,i,n){r.viewport[0]=e;r.viewport[1]=t;r.viewport[2]=i;r.viewport[3]=n;r.realViewport.call(a,e,t,i,n)};this.isPatched=true;E(i)};R.prototype.unpatch=function(){if(!this.isPatched){return}var e=this.gl;var t=this.gl.canvas;if(!p()){Object.defineProperty(t,"width",this.realCanvasWidth);Object.defineProperty(t,"height",this.realCanvasHeight)}t.width=this.bufferWidth;t.height=this.bufferHeight;e.bindFramebuffer=this.realBindFramebuffer;e.enable=this.realEnable;e.disable=this.realDisable;e.colorMask=this.realColorMask;e.clearColor=this.realClearColor;e.viewport=this.realViewport;if(this.lastBoundFramebuffer==this.framebuffer){e.bindFramebuffer(e.FRAMEBUFFER,null)}this.isPatched=false;setTimeout(function(){E(t)},1)};R.prototype.setTextureBounds=function(e,t){if(!e){e=[0,0,.5,1]}if(!t){t=[.5,0,.5,1]}this.viewportOffsetScale[0]=e[0];this.viewportOffsetScale[1]=e[1];this.viewportOffsetScale[2]=e[2];this.viewportOffsetScale[3]=e[3];this.viewportOffsetScale[4]=t[0];this.viewportOffsetScale[5]=t[1];this.viewportOffsetScale[6]=t[2];this.viewportOffsetScale[7]=t[3]};R.prototype.submitFrame=function(){var e=this.gl;var t=this;var i=[];if(!this.dirtySubmitFrameBindings){i.push(e.CURRENT_PROGRAM,e.ARRAY_BUFFER_BINDING,e.ELEMENT_ARRAY_BUFFER_BINDING,e.TEXTURE_BINDING_2D,e.TEXTURE0)}j(e,i,function(e){t.realBindFramebuffer.call(e,e.FRAMEBUFFER,null);if(t.cullFace){t.realDisable.call(e,e.CULL_FACE)}if(t.depthTest){t.realDisable.call(e,e.DEPTH_TEST)}if(t.blend){t.realDisable.call(e,e.BLEND)}if(t.scissorTest){t.realDisable.call(e,e.SCISSOR_TEST)}if(t.stencilTest){t.realDisable.call(e,e.STENCIL_TEST)}t.realColorMask.call(e,true,true,true,true);t.realViewport.call(e,0,0,e.drawingBufferWidth,e.drawingBufferHeight);if(t.ctxAttribs.alpha||p()){t.realClearColor.call(e,0,0,0,1);e.clear(e.COLOR_BUFFER_BIT)}e.useProgram(t.program);e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,t.indexBuffer);e.bindBuffer(e.ARRAY_BUFFER,t.vertexBuffer);e.enableVertexAttribArray(t.attribs.position);e.enableVertexAttribArray(t.attribs.texCoord);e.vertexAttribPointer(t.attribs.position,2,e.FLOAT,false,20,0);e.vertexAttribPointer(t.attribs.texCoord,3,e.FLOAT,false,20,8);e.activeTexture(e.TEXTURE0);e.uniform1i(t.uniforms.diffuse,0);e.bindTexture(e.TEXTURE_2D,t.renderTarget);e.uniform4fv(t.uniforms.viewportOffsetScale,t.viewportOffsetScale);e.drawElements(e.TRIANGLES,t.indexCount,e.UNSIGNED_SHORT,0);if(t.cardboardUI){t.cardboardUI.renderNoState()}t.realBindFramebuffer.call(t.gl,e.FRAMEBUFFER,t.framebuffer);if(!t.ctxAttribs.preserveDrawingBuffer){t.realClearColor.call(e,0,0,0,0);e.clear(e.COLOR_BUFFER_BIT)}if(!t.dirtySubmitFrameBindings){t.realBindFramebuffer.call(e,e.FRAMEBUFFER,t.lastBoundFramebuffer)}if(t.cullFace){t.realEnable.call(e,e.CULL_FACE)}if(t.depthTest){t.realEnable.call(e,e.DEPTH_TEST)}if(t.blend){t.realEnable.call(e,e.BLEND)}if(t.scissorTest){t.realEnable.call(e,e.SCISSOR_TEST)}if(t.stencilTest){t.realEnable.call(e,e.STENCIL_TEST)}t.realColorMask.apply(e,t.colorMask);t.realViewport.apply(e,t.viewport);if(t.ctxAttribs.alpha||!t.ctxAttribs.preserveDrawingBuffer){t.realClearColor.apply(e,t.clearColor)}});if(p()){var n=e.canvas;if(n.width!=t.bufferWidth||n.height!=t.bufferHeight){t.bufferWidth=n.width;t.bufferHeight=n.height;t.onResize()}}};R.prototype.updateDeviceInfo=function(n){var e=this.gl;var r=this;var t=[e.ARRAY_BUFFER_BINDING,e.ELEMENT_ARRAY_BUFFER_BINDING];j(e,t,function(e){var t=r.computeMeshVertices_(r.meshWidth,r.meshHeight,n);e.bindBuffer(e.ARRAY_BUFFER,r.vertexBuffer);e.bufferData(e.ARRAY_BUFFER,t,e.STATIC_DRAW);if(!r.indexCount){var i=r.computeMeshIndices_(r.meshWidth,r.meshHeight);e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,r.indexBuffer);e.bufferData(e.ELEMENT_ARRAY_BUFFER,i,e.STATIC_DRAW);r.indexCount=i.length}})};R.prototype.computeMeshVertices_=function(e,t,i){var n=new Float32Array(2*e*t*5);var r=i.getLeftEyeVisibleTanAngles();var a=i.getLeftEyeNoLensTanAngles();var s=i.getLeftEyeVisibleScreenRect(a);var o=0;for(var l=0;l<2;l++){for(var u=0;u<t;u++){for(var c=0;c<e;c++,o++){var h=c/(e-1);var d=u/(t-1);var p=h;var f=d;var g=b(r[0],r[2],h);var m=b(r[3],r[1],d);var v=Math.sqrt(g*g+m*m);var y=i.distortion.distortInverse(v);var _=g*y/v;var M=m*y/v;h=(_-a[0])/(a[2]-a[0]);d=(M-a[3])/(a[1]-a[3]);h=(s.x+h*s.width-.5)*2;d=(s.y+d*s.height-.5)*2;n[o*5+0]=h;n[o*5+1]=d;n[o*5+2]=p;n[o*5+3]=f;n[o*5+4]=l}}var w=r[2]-r[0];r[0]=-(w+r[0]);r[2]=w-r[2];w=a[2]-a[0];a[0]=-(w+a[0]);a[2]=w-a[2];s.x=1-(s.x+s.width)}return n};R.prototype.computeMeshIndices_=function(e,t){var i=new Uint16Array(2*(e-1)*(t-1)*6);var n=e/2;var r=t/2;var a=0;var s=0;for(var o=0;o<2;o++){for(var l=0;l<t;l++){for(var u=0;u<e;u++,a++){if(u==0||l==0)continue;if(u<=n==l<=r){i[s++]=a;i[s++]=a-e-1;i[s++]=a-e;i[s++]=a-e-1;i[s++]=a;i[s++]=a-1}else{i[s++]=a-1;i[s++]=a-e;i[s++]=a;i[s++]=a-e;i[s++]=a-1;i[s++]=a-e-1}}}}return i};R.prototype.getOwnPropertyDescriptor_=function(e,t){var i=Object.getOwnPropertyDescriptor(e,t);if(i.get===undefined||i.set===undefined){i.configurable=true;i.enumerable=true;i.get=function(){return this.getAttribute(t)};i.set=function(e){this.setAttribute(t,e)}}return i};var z=["attribute vec2 position;","uniform mat4 projectionMat;","void main() {"," gl_Position = projectionMat * vec4( position, -1.0, 1.0 );","}"].join("\n");var U=["precision mediump float;","uniform vec4 color;","void main() {"," gl_FragColor = color;","}"].join("\n");var B=Math.PI/180;var F=60;var G=12;var H=20;var Y=1;var Q=.75;var V=.3125;var W=4;var q=28;var X=1.5;function Z(e){this.gl=e;this.attribs={position:0};this.program=M(e,z,U,this.attribs);this.uniforms=w(e,this.program);this.vertexBuffer=e.createBuffer();this.gearOffset=0;this.gearVertexCount=0;this.arrowOffset=0;this.arrowVertexCount=0;this.projMat=new Float32Array(16);this.listener=null;this.onResize()}Z.prototype.destroy=function(){var e=this.gl;if(this.listener){e.canvas.removeEventListener("click",this.listener,false)}e.deleteProgram(this.program);e.deleteBuffer(this.vertexBuffer)};Z.prototype.listen=function(n,r){var a=this.gl.canvas;this.listener=function(e){var t=a.clientWidth/2;var i=q*X;if(e.clientX>t-i&&e.clientX<t+i&&e.clientY>a.clientHeight-i){n(e)}else if(e.clientX<i&&e.clientY<i){r(e)}};a.addEventListener("click",this.listener,false)};Z.prototype.onResize=function(){var e=this.gl;var g=this;var t=[e.ARRAY_BUFFER_BINDING];j(e,t,function(i){var a=[];var s=i.drawingBufferWidth/2;var e=Math.max(screen.width,screen.height)*window.devicePixelRatio;var t=i.drawingBufferWidth/e;var n=t*window.devicePixelRatio;var r=W*n/2;var o=q*X*n;var l=q*n/2;var u=(q*X-q)*n;a.push(s-r,o);a.push(s-r,i.drawingBufferHeight);a.push(s+r,o);a.push(s+r,i.drawingBufferHeight);g.gearOffset=a.length/2;function c(e,t){var i=(90-e)*B;var n=Math.cos(i);var r=Math.sin(i);a.push(V*n*l+s,V*r*l+l);a.push(t*n*l+s,t*r*l+l)}for(var h=0;h<=6;h++){var d=h*F;c(d,Y);c(d+G,Y);c(d+H,Q);c(d+(F-H),Q);c(d+(F-G),Y)}g.gearVertexCount=a.length/2-g.gearOffset;g.arrowOffset=a.length/2;function p(e,t){a.push(u+e,i.drawingBufferHeight-u-t)}var f=r/Math.sin(45*B);p(0,l);p(l,0);p(l+f,f);p(f,l+f);p(f,l-f);p(0,l);p(l,l*2);p(l+f,l*2-f);p(f,l-f);p(0,l);p(f,l-r);p(q*n,l-r);p(f,l+r);p(q*n,l+r);g.arrowVertexCount=a.length/2-g.arrowOffset;i.bindBuffer(i.ARRAY_BUFFER,g.vertexBuffer);i.bufferData(i.ARRAY_BUFFER,new Float32Array(a),i.STATIC_DRAW)})};Z.prototype.render=function(){var e=this.gl;var t=this;var i=[e.CULL_FACE,e.DEPTH_TEST,e.BLEND,e.SCISSOR_TEST,e.STENCIL_TEST,e.COLOR_WRITEMASK,e.VIEWPORT,e.CURRENT_PROGRAM,e.ARRAY_BUFFER_BINDING];j(e,i,function(e){e.disable(e.CULL_FACE);e.disable(e.DEPTH_TEST);e.disable(e.BLEND);e.disable(e.SCISSOR_TEST);e.disable(e.STENCIL_TEST);e.colorMask(true,true,true,true);e.viewport(0,0,e.drawingBufferWidth,e.drawingBufferHeight);t.renderNoState()})};Z.prototype.renderNoState=function(){var e=this.gl;e.useProgram(this.program);e.bindBuffer(e.ARRAY_BUFFER,this.vertexBuffer);e.enableVertexAttribArray(this.attribs.position);e.vertexAttribPointer(this.attribs.position,2,e.FLOAT,false,8,0);e.uniform4f(this.uniforms.color,1,1,1,1);T(this.projMat,0,e.drawingBufferWidth,0,e.drawingBufferHeight,.1,1024);e.uniformMatrix4fv(this.uniforms.projectionMat,false,this.projMat);e.drawArrays(e.TRIANGLE_STRIP,0,4);e.drawArrays(e.TRIANGLE_STRIP,this.gearOffset,this.gearVertexCount);e.drawArrays(e.TRIANGLE_STRIP,this.arrowOffset,this.arrowVertexCount)};function $(e){this.coefficients=e}$.prototype.distortInverse=function(e){var t=0;var i=1;var n=e-this.distort(t);while(Math.abs(i-t)>1e-4){var r=e-this.distort(i);var a=i-r*((i-t)/(r-n));t=i;i=a;n=r}return i};$.prototype.distort=function(e){var t=e*e;var i=0;for(var n=0;n<this.coefficients.length;n++){i=t*(i+this.coefficients[n])}return(i+1)*e};var K=Math.PI/180;var J=180/Math.PI;var ee=function e(t,i,n){this.x=t||0;this.y=i||0;this.z=n||0};ee.prototype={constructor:ee,set:function e(t,i,n){this.x=t;this.y=i;this.z=n;return this},copy:function e(t){this.x=t.x;this.y=t.y;this.z=t.z;return this},length:function e(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},normalize:function e(){var t=this.length();if(t!==0){var i=1/t;this.multiplyScalar(i)}else{this.x=0;this.y=0;this.z=0}return this},multiplyScalar:function e(t){this.x*=t;this.y*=t;this.z*=t},applyQuaternion:function e(t){var i=this.x;var n=this.y;var r=this.z;var a=t.x;var s=t.y;var o=t.z;var l=t.w;var u=l*i+s*r-o*n;var c=l*n+o*i-a*r;var h=l*r+a*n-s*i;var d=-a*i-s*n-o*r;this.x=u*l+d*-a+c*-o-h*-s;this.y=c*l+d*-s+h*-a-u*-o;this.z=h*l+d*-o+u*-s-c*-a;return this},dot:function e(t){return this.x*t.x+this.y*t.y+this.z*t.z},crossVectors:function e(t,i){var n=t.x,r=t.y,a=t.z;var s=i.x,o=i.y,l=i.z;this.x=r*l-a*o;this.y=a*s-n*l;this.z=n*o-r*s;return this}};var te=function e(t,i,n,r){this.x=t||0;this.y=i||0;this.z=n||0;this.w=r!==undefined?r:1};te.prototype={constructor:te,set:function e(t,i,n,r){this.x=t;this.y=i;this.z=n;this.w=r;return this},copy:function e(t){this.x=t.x;this.y=t.y;this.z=t.z;this.w=t.w;return this},setFromEulerXYZ:function e(t,i,n){var r=Math.cos(t/2);var a=Math.cos(i/2);var s=Math.cos(n/2);var o=Math.sin(t/2);var l=Math.sin(i/2);var u=Math.sin(n/2);this.x=o*a*s+r*l*u;this.y=r*l*s-o*a*u;this.z=r*a*u+o*l*s;this.w=r*a*s-o*l*u;return this},setFromEulerYXZ:function e(t,i,n){var r=Math.cos(t/2);var a=Math.cos(i/2);var s=Math.cos(n/2);var o=Math.sin(t/2);var l=Math.sin(i/2);var u=Math.sin(n/2);this.x=o*a*s+r*l*u;this.y=r*l*s-o*a*u;this.z=r*a*u-o*l*s;this.w=r*a*s+o*l*u;return this},setFromAxisAngle:function e(t,i){var n=i/2,r=Math.sin(n);this.x=t.x*r;this.y=t.y*r;this.z=t.z*r;this.w=Math.cos(n);return this},multiply:function e(t){return this.multiplyQuaternions(this,t)},multiplyQuaternions:function e(t,i){var n=t.x,r=t.y,a=t.z,s=t.w;var o=i.x,l=i.y,u=i.z,c=i.w;this.x=n*c+s*o+r*u-a*l;this.y=r*c+s*l+a*o-n*u;this.z=a*c+s*u+n*l-r*o;this.w=s*c-n*o-r*l-a*u;return this},inverse:function e(){this.x*=-1;this.y*=-1;this.z*=-1;this.normalize();return this},normalize:function e(){var t=Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w);if(t===0){this.x=0;this.y=0;this.z=0;this.w=1}else{t=1/t;this.x=this.x*t;this.y=this.y*t;this.z=this.z*t;this.w=this.w*t}return this},slerp:function e(t,i){if(i===0)return this;if(i===1)return this.copy(t);var n=this.x,r=this.y,a=this.z,s=this.w;var o=s*t.w+n*t.x+r*t.y+a*t.z;if(o<0){this.w=-t.w;this.x=-t.x;this.y=-t.y;this.z=-t.z;o=-o}else{this.copy(t)}if(o>=1){this.w=s;this.x=n;this.y=r;this.z=a;return this}var l=Math.acos(o);var u=Math.sqrt(1-o*o);if(Math.abs(u)<.001){this.w=.5*(s+this.w);this.x=.5*(n+this.x);this.y=.5*(r+this.y);this.z=.5*(a+this.z);return this}var c=Math.sin((1-i)*l)/u,h=Math.sin(i*l)/u;this.w=s*c+this.w*h;this.x=n*c+this.x*h;this.y=r*c+this.y*h;this.z=a*c+this.z*h;return this},setFromUnitVectors:function(){var i,n;var r=1e-6;return function(e,t){if(i===undefined)i=new ee;n=e.dot(t)+1;if(n<r){n=0;if(Math.abs(e.x)>Math.abs(e.z)){i.set(-e.y,e.x,0)}else{i.set(0,-e.z,e.y)}}else{i.crossVectors(e,t)}this.x=i.x;this.y=i.y;this.z=i.z;this.w=n;this.normalize();return this}}()};function ie(e){this.width=e.width||g();this.height=e.height||m();this.widthMeters=e.widthMeters;this.heightMeters=e.heightMeters;this.bevelMeters=e.bevelMeters}var ne=new ie({widthMeters:.11,heightMeters:.062,bevelMeters:.004});var re=new ie({widthMeters:.1038,heightMeters:.0584,bevelMeters:.004});var ae={CardboardV1:new oe({id:"CardboardV1",label:"Cardboard I/O 2014",fov:40,interLensDistance:.06,baselineLensDistance:.035,screenLensDistance:.042,distortionCoefficients:[.441,.156],inverseCoefficients:[-.4410035,.42756155,-.4804439,.5460139,-.58821183,.5733938,-.48303202,.33299083,-.17573841,.0651772,-.01488963,.001559834]}),CardboardV2:new oe({id:"CardboardV2",label:"Cardboard I/O 2015",fov:60,interLensDistance:.064,baselineLensDistance:.035,screenLensDistance:.039,distortionCoefficients:[.34,.55],inverseCoefficients:[-.33836704,-.18162185,.862655,-1.2462051,1.0560602,-.58208317,.21609078,-.05444823,.009177956,-.0009904169,6183535e-11,-16981803e-13]})};function se(e,t){this.viewer=ae.CardboardV2;this.updateDeviceParams(e);this.distortion=new $(this.viewer.distortionCoefficients);for(var i=0;i<t.length;i++){var n=t[i];ae[n.id]=new oe(n)}}se.prototype.updateDeviceParams=function(e){this.device=this.determineDevice_(e)||this.device};se.prototype.getDevice=function(){return this.device};se.prototype.setViewer=function(e){this.viewer=e;this.distortion=new $(this.viewer.distortionCoefficients)};se.prototype.determineDevice_=function(e){if(!e){if(p()){console.warn("Using fallback iOS device measurements.");return re}else{console.warn("Using fallback Android device measurements.");return ne}}var t=.0254;var i=t/e.xdpi;var n=t/e.ydpi;var r=g();var a=m();return new ie({widthMeters:i*r,heightMeters:n*a,bevelMeters:e.bevelMm*.001})};se.prototype.getDistortedFieldOfViewLeftEye=function(){var e=this.viewer;var t=this.device;var i=this.distortion;var n=e.screenLensDistance;var r=(t.widthMeters-e.interLensDistance)/2;var a=e.interLensDistance/2;var s=e.baselineLensDistance-t.bevelMeters;var o=t.heightMeters-s;var l=J*Math.atan(i.distort(r/n));var u=J*Math.atan(i.distort(a/n));var c=J*Math.atan(i.distort(s/n));var h=J*Math.atan(i.distort(o/n));return{leftDegrees:Math.min(l,e.fov),rightDegrees:Math.min(u,e.fov),downDegrees:Math.min(c,e.fov),upDegrees:Math.min(h,e.fov)}};se.prototype.getLeftEyeVisibleTanAngles=function(){var e=this.viewer;var t=this.device;var i=this.distortion;var n=Math.tan(-K*e.fov);var r=Math.tan(K*e.fov);var a=Math.tan(K*e.fov);var s=Math.tan(-K*e.fov);var o=t.widthMeters/4;var l=t.heightMeters/2;var u=e.baselineLensDistance-t.bevelMeters-l;var c=e.interLensDistance/2-o;var h=-u;var d=e.screenLensDistance;var p=i.distort((c-o)/d);var f=i.distort((h+l)/d);var g=i.distort((c+o)/d);var m=i.distort((h-l)/d);var v=new Float32Array(4);v[0]=Math.max(n,p);v[1]=Math.min(r,f);v[2]=Math.min(a,g);v[3]=Math.max(s,m);return v};se.prototype.getLeftEyeNoLensTanAngles=function(){var e=this.viewer;var t=this.device;var i=this.distortion;var n=new Float32Array(4);var r=i.distortInverse(Math.tan(-K*e.fov));var a=i.distortInverse(Math.tan(K*e.fov));var s=i.distortInverse(Math.tan(K*e.fov));var o=i.distortInverse(Math.tan(-K*e.fov));var l=t.widthMeters/4;var u=t.heightMeters/2;var c=e.baselineLensDistance-t.bevelMeters-u;var h=e.interLensDistance/2-l;var d=-c;var p=e.screenLensDistance;var f=(h-l)/p;var g=(d+u)/p;var m=(h+l)/p;var v=(d-u)/p;n[0]=Math.max(r,f);n[1]=Math.min(a,g);n[2]=Math.min(s,m);n[3]=Math.max(o,v);return n};se.prototype.getLeftEyeVisibleScreenRect=function(e){var t=this.viewer;var i=this.device;var n=t.screenLensDistance;var r=(i.widthMeters-t.interLensDistance)/2;var a=t.baselineLensDistance-i.bevelMeters;var s=(e[0]*n+r)/i.widthMeters;var o=(e[1]*n+a)/i.heightMeters;var l=(e[2]*n+r)/i.widthMeters;var u=(e[3]*n+a)/i.heightMeters;return{x:s,y:u,width:l-s,height:o-u}};se.prototype.getFieldOfViewLeftEye=function(e){return e?this.getUndistortedFieldOfViewLeftEye():this.getDistortedFieldOfViewLeftEye()};se.prototype.getFieldOfViewRightEye=function(e){var t=this.getFieldOfViewLeftEye(e);return{leftDegrees:t.rightDegrees,rightDegrees:t.leftDegrees,upDegrees:t.upDegrees,downDegrees:t.downDegrees}};se.prototype.getUndistortedFieldOfViewLeftEye=function(){var e=this.getUndistortedParams_();return{leftDegrees:J*Math.atan(e.outerDist),rightDegrees:J*Math.atan(e.innerDist),downDegrees:J*Math.atan(e.bottomDist),upDegrees:J*Math.atan(e.topDist)}};se.prototype.getUndistortedViewportLeftEye=function(){var e=this.getUndistortedParams_();var t=this.viewer;var i=this.device;var n=t.screenLensDistance;var r=i.widthMeters/n;var a=i.heightMeters/n;var s=i.width/r;var o=i.height/a;var l=Math.round((e.eyePosX-e.outerDist)*s);var u=Math.round((e.eyePosY-e.bottomDist)*o);return{x:l,y:u,width:Math.round((e.eyePosX+e.innerDist)*s)-l,height:Math.round((e.eyePosY+e.topDist)*o)-u}};se.prototype.getUndistortedParams_=function(){var e=this.viewer;var t=this.device;var i=this.distortion;var n=e.screenLensDistance;var r=e.interLensDistance/2/n;var a=t.widthMeters/n;var s=t.heightMeters/n;var o=a/2-r;var l=(e.baselineLensDistance-t.bevelMeters)/n;var u=e.fov;var c=i.distortInverse(Math.tan(K*u));var h=Math.min(o,c);var d=Math.min(r,c);var p=Math.min(l,c);var f=Math.min(s-l,c);return{outerDist:h,innerDist:d,topDist:f,bottomDist:p,eyePosX:o,eyePosY:l}}
1;function oe(e){this.id=e.id;this.label=e.label;this.fov=e.fov;this.interLensDistance=e.interLensDistance;this.baselineLensDistance=e.baselineLensDistance;this.screenLensDistance=e.screenLensDistance;this.distortionCoefficients=e.distortionCoefficients;this.inverseCoefficients=e.inverseCoefficients}se.Viewers=ae;var le=1;var ue="2018-02-20T22:55:10Z";var ce=[{type:"android",rules:[{mdmh:"asus/*/Nexus 7/*"},{ua:"Nexus 7"}],dpi:[320.8,323],bw:3,ac:500},{type:"android",rules:[{mdmh:"asus/*/ASUS_Z00AD/*"},{ua:"ASUS_Z00AD"}],dpi:[403,404.6],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"Google/*/Pixel XL/*"},{ua:"Pixel XL"}],dpi:[537.9,533],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"Google/*/Pixel/*"},{ua:"Pixel"}],dpi:[432.6,436.7],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"HTC/*/HTC6435LVW/*"},{ua:"HTC6435LVW"}],dpi:[449.7,443.3],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"HTC/*/HTC One XL/*"},{ua:"HTC One XL"}],dpi:[315.3,314.6],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"htc/*/Nexus 9/*"},{ua:"Nexus 9"}],dpi:289,bw:3,ac:500},{type:"android",rules:[{mdmh:"HTC/*/HTC One M9/*"},{ua:"HTC One M9"}],dpi:[442.5,443.3],bw:3,ac:500},{type:"android",rules:[{mdmh:"HTC/*/HTC One_M8/*"},{ua:"HTC One_M8"}],dpi:[449.7,447.4],bw:3,ac:500},{type:"android",rules:[{mdmh:"HTC/*/HTC One/*"},{ua:"HTC One"}],dpi:472.8,bw:3,ac:1e3},{type:"android",rules:[{mdmh:"Huawei/*/Nexus 6P/*"},{ua:"Nexus 6P"}],dpi:[515.1,518],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"LENOVO/*/Lenovo PB2-690Y/*"},{ua:"Lenovo PB2-690Y"}],dpi:[457.2,454.713],bw:3,ac:500},{type:"android",rules:[{mdmh:"LGE/*/Nexus 5X/*"},{ua:"Nexus 5X"}],dpi:[422,419.9],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"LGE/*/LGMS345/*"},{ua:"LGMS345"}],dpi:[221.7,219.1],bw:3,ac:500},{type:"android",rules:[{mdmh:"LGE/*/LG-D800/*"},{ua:"LG-D800"}],dpi:[422,424.1],bw:3,ac:500},{type:"android",rules:[{mdmh:"LGE/*/LG-D850/*"},{ua:"LG-D850"}],dpi:[537.9,541.9],bw:3,ac:500},{type:"android",rules:[{mdmh:"LGE/*/VS985 4G/*"},{ua:"VS985 4G"}],dpi:[537.9,535.6],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"LGE/*/Nexus 5/*"},{ua:"Nexus 5 B"}],dpi:[442.4,444.8],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"LGE/*/Nexus 4/*"},{ua:"Nexus 4"}],dpi:[319.8,318.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"LGE/*/LG-P769/*"},{ua:"LG-P769"}],dpi:[240.6,247.5],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"LGE/*/LGMS323/*"},{ua:"LGMS323"}],dpi:[206.6,204.6],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"LGE/*/LGLS996/*"},{ua:"LGLS996"}],dpi:[403.4,401.5],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"Micromax/*/4560MMX/*"},{ua:"4560MMX"}],dpi:[240,219.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"Micromax/*/A250/*"},{ua:"Micromax A250"}],dpi:[480,446.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"Micromax/*/Micromax AQ4501/*"},{ua:"Micromax AQ4501"}],dpi:240,bw:3,ac:500},{type:"android",rules:[{mdmh:"motorola/*/G5/*"},{ua:"Moto G (5) Plus"}],dpi:[403.4,403],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"motorola/*/DROID RAZR/*"},{ua:"DROID RAZR"}],dpi:[368.1,256.7],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"motorola/*/XT830C/*"},{ua:"XT830C"}],dpi:[254,255.9],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"motorola/*/XT1021/*"},{ua:"XT1021"}],dpi:[254,256.7],bw:3,ac:500},{type:"android",rules:[{mdmh:"motorola/*/XT1023/*"},{ua:"XT1023"}],dpi:[254,256.7],bw:3,ac:500},{type:"android",rules:[{mdmh:"motorola/*/XT1028/*"},{ua:"XT1028"}],dpi:[326.6,327.6],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"motorola/*/XT1034/*"},{ua:"XT1034"}],dpi:[326.6,328.4],bw:3,ac:500},{type:"android",rules:[{mdmh:"motorola/*/XT1053/*"},{ua:"XT1053"}],dpi:[315.3,316.1],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"motorola/*/XT1562/*"},{ua:"XT1562"}],dpi:[403.4,402.7],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"motorola/*/Nexus 6/*"},{ua:"Nexus 6 B"}],dpi:[494.3,489.7],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"motorola/*/XT1063/*"},{ua:"XT1063"}],dpi:[295,296.6],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"motorola/*/XT1064/*"},{ua:"XT1064"}],dpi:[295,295.6],bw:3,ac:500},{type:"android",rules:[{mdmh:"motorola/*/XT1092/*"},{ua:"XT1092"}],dpi:[422,424.1],bw:3,ac:500},{type:"android",rules:[{mdmh:"motorola/*/XT1095/*"},{ua:"XT1095"}],dpi:[422,423.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"motorola/*/G4/*"},{ua:"Moto G (4)"}],dpi:401,bw:4,ac:1e3}
1,{type:"android",rules:[{mdmh:"OnePlus/*/A0001/*"},{ua:"A0001"}],dpi:[403.4,401],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"OnePlus/*/ONE E1005/*"},{ua:"ONE E1005"}],dpi:[442.4,441.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"OnePlus/*/ONE A2005/*"},{ua:"ONE A2005"}],dpi:[391.9,405.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"OnePlus/*/ONEPLUS A5000/*"},{ua:"ONEPLUS A5000 "}],dpi:[403.411,399.737],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"OnePlus/*/ONE A5010/*"},{ua:"ONEPLUS A5010"}],dpi:[403,400],bw:2,ac:1e3},{type:"android",rules:[{mdmh:"OPPO/*/X909/*"},{ua:"X909"}],dpi:[442.4,444.1],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/GT-I9082/*"},{ua:"GT-I9082"}],dpi:[184.7,185.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-G360P/*"},{ua:"SM-G360P"}],dpi:[196.7,205.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/Nexus S/*"},{ua:"Nexus S"}],dpi:[234.5,229.8],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/GT-I9300/*"},{ua:"GT-I9300"}],dpi:[304.8,303.9],bw:5,ac:500},{type:"android",rules:[{mdmh:"samsung/*/SM-T230NU/*"},{ua:"SM-T230NU"}],dpi:216,bw:3,ac:500},{type:"android",rules:[{mdmh:"samsung/*/SGH-T399/*"},{ua:"SGH-T399"}],dpi:[217.7,231.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SGH-M919/*"},{ua:"SGH-M919"}],dpi:[440.8,437.7],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-N9005/*"},{ua:"SM-N9005"}],dpi:[386.4,387],bw:3,ac:500},{type:"android",rules:[{mdmh:"samsung/*/SAMSUNG-SM-N900A/*"},{ua:"SAMSUNG-SM-N900A"}],dpi:[386.4,387.7],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/GT-I9500/*"},{ua:"GT-I9500"}],dpi:[442.5,443.3],bw:3,ac:500},{type:"android",rules:[{mdmh:"samsung/*/GT-I9505/*"},{ua:"GT-I9505"}],dpi:439.4,bw:4,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-G900F/*"},{ua:"SM-G900F"}],dpi:[415.6,431.6],bw:5,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-G900M/*"},{ua:"SM-G900M"}],dpi:[415.6,431.6],bw:5,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-G800F/*"},{ua:"SM-G800F"}],dpi:326.8,bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-G906S/*"},{ua:"SM-G906S"}],dpi:[562.7,572.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/GT-I9300/*"},{ua:"GT-I9300"}],dpi:[306.7,304.8],bw:5,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-T535/*"},{ua:"SM-T535"}],dpi:[142.6,136.4],bw:3,ac:500},{type:"android",rules:[{mdmh:"samsung/*/SM-N920C/*"},{ua:"SM-N920C"}],dpi:[515.1,518.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-N920P/*"},{ua:"SM-N920P"}],dpi:[386.3655,390.144],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-N920W8/*"},{ua:"SM-N920W8"}],dpi:[515.1,518.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/GT-I9300I/*"},{ua:"GT-I9300I"}],dpi:[304.8,305.8],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/GT-I9195/*"},{ua:"GT-I9195"}],dpi:[249.4,256.7],bw:3,ac:500},{type:"android",rules:[{mdmh:"samsung/*/SPH-L520/*"},{ua:"SPH-L520"}],dpi:[249.4,255.9],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SAMSUNG-SGH-I717/*"},{ua:"SAMSUNG-SGH-I717"}],dpi:285.8,bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SPH-D710/*"},{ua:"SPH-D710"}],dpi:[217.7,204.2],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/GT-N7100/*"},{ua:"GT-N7100"}],dpi:265.1,bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SCH-I605/*"},{ua:"SCH-I605"}],dpi:265.1,bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/Galaxy Nexus/*"},{ua:"Galaxy Nexus"}],dpi:[315.3,314.2],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-N910H/*"},{ua:"SM-N910H"}],dpi:[515.1,518],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-N910C/*"},{ua:"SM-N910C"}],dpi:[515.2,520.2],bw:3,ac:500},{type:"android",rules:[{mdmh:"samsung/*/SM-G130M/*"},{ua:"SM-G130M"}],dpi:[165.9,164.8],bw:3,ac:500},{type:"android",rules:[{mdmh:"samsung/*/SM-G928I/*"},{ua:"SM-G928I"}],dpi:[515.1,518.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-G920F/*"},{ua:"SM-G920F"}],dpi:580.6,bw:3,ac:500},{type:"android",rules:[{mdmh:"samsung/*/SM-G920P/*"},{ua:"SM-G920P"}],dpi:[522.5,577],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-G925F/*"},{ua:"SM-G925F"}],dpi:580.6,bw:3,ac:500},{type:"android",rules:[{mdmh:"samsung/*/SM-G925V/*"},{ua:"SM-G925V"}],dpi:[522.5,576.6],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-G930F/*"},{ua:"SM-G930F"}],dpi:576.6,bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-G935F/*"},{ua:"SM-G935F"}],dpi:533,bw:3,ac:500},{type:"android",rules:[{mdmh:"samsung/*/SM-G950F/*"},{ua:"SM-G950F"}],dpi:[562.707,565.293],bw:3,ac:500},{type:"android",rules:[{mdmh:"samsung/*/SM-G955U/*"},{ua:"SM-G955U"}],dpi:[522.514,525.762],bw:3,ac:500},{type:"android",rules:[{mdmh:"Sony/*/C6903/*"},{ua:"C6903"}],dpi:[442.5,443.3],bw:3,ac:500},{type:"android",rules:[{mdmh:"Sony/*/D6653/*"},{ua:"D6653"}],dpi:[428.6,427.6],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"Sony/*/E6653/*"},{ua:"E6653"}],dpi:[428.6,425.7],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"Sony/*/E6853/*"},{ua:"E6853"}],dpi:[403.4,401.9],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"Sony/*/SGP321/*"},{ua:"SGP321"}],dpi:[224.7,224.1],bw:3,ac:500},{type:"android",rules:[{mdmh:"TCT/*/ALCATEL ONE TOUCH Fierce/*"},{ua:"ALCATEL ONE TOUCH Fierce"}],dpi:[240,247.5],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"THL/*/thl 5000/*"},{ua:"thl 5000"}],dpi:[480,443.3],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"Fly/*/IQ4412/*"},{ua:"IQ4412"}],dpi:307.9,bw:3,ac:1e3}
1,{type:"android",rules:[{mdmh:"ZTE/*/ZTE Blade L2/*"},{ua:"ZTE Blade L2"}],dpi:240,bw:3,ac:500},{type:"android",rules:[{mdmh:"BENEVE/*/VR518/*"},{ua:"VR518"}],dpi:480,bw:3,ac:500},{type:"ios",rules:[{res:[640,960]}],dpi:[325.1,328.4],bw:4,ac:1e3},{type:"ios",rules:[{res:[640,1136]}],dpi:[317.1,320.2],bw:3,ac:1e3},{type:"ios",rules:[{res:[750,1334]}],dpi:326.4,bw:4,ac:1e3},{type:"ios",rules:[{res:[1242,2208]}],dpi:[453.6,458.4],bw:4,ac:1e3},{type:"ios",rules:[{res:[1125,2001]}],dpi:[410.9,415.4],bw:4,ac:1e3},{type:"ios",rules:[{res:[1125,2436]}],dpi:458,bw:4,ac:1e3}];var he={format:le,last_updated:ue,devices:ce};function de(e,t){this.dpdb=he;this.recalculateDeviceParams_();if(e){this.onDeviceParamsUpdated=t;var i=new XMLHttpRequest;var n=this;i.open("GET",e,true);i.addEventListener("load",function(){n.loading=false;if(i.status>=200&&i.status<=299){n.dpdb=JSON.parse(i.response);n.recalculateDeviceParams_()}else{console.error("Error loading online DPDB!")}});i.send()}}de.prototype.getDeviceParams=function(){return this.deviceParams};de.prototype.recalculateDeviceParams_=function(){var e=this.calcDeviceParams_();if(e){this.deviceParams=e;if(this.onDeviceParamsUpdated){this.onDeviceParamsUpdated(this.deviceParams)}}else{console.error("Failed to recalculate device parameters.")}};de.prototype.calcDeviceParams_=function(){var e=this.dpdb;if(!e){console.error("DPDB not available.");return null}if(e.format!=1){console.error("DPDB has unexpected format version.");return null}if(!e.devices||!e.devices.length){console.error("DPDB does not have a devices section.");return null}var t=navigator.userAgent||navigator.vendor||window.opera;var i=g();var n=m();if(!e.devices){console.error("DPDB has no devices section.");return null}for(var r=0;r<e.devices.length;r++){var a=e.devices[r];if(!a.rules){console.warn("Device["+r+"] has no rules section.");continue}if(a.type!="ios"&&a.type!="android"){console.warn("Device["+r+"] has invalid type.");continue}if(p()!=(a.type=="ios"))continue;var s=false;for(var o=0;o<a.rules.length;o++){var l=a.rules[o];if(this.matchRule_(l,t,i,n)){s=true;break}}if(!s)continue;var u=a.dpi[0]||a.dpi;var c=a.dpi[1]||a.dpi;return new pe({xdpi:u,ydpi:c,bevelMm:a.bw})}console.warn("No DPDB device match.");return null};de.prototype.matchRule_=function(e,t,i,n){if(!e.ua&&!e.res)return false;if(e.ua&&t.indexOf(e.ua)<0)return false;if(e.res){if(!e.res[0]||!e.res[1])return false;var r=e.res[0];var a=e.res[1];if(Math.min(i,n)!=Math.min(r,a)||Math.max(i,n)!=Math.max(r,a)){return false}}return true};function pe(e){this.xdpi=e.xdpi;this.ydpi=e.ydpi;this.bevelMm=e.bevelMm}function fe(e,t){this.set(e,t)}fe.prototype.set=function(e,t){this.sample=e;this.timestampS=t};fe.prototype.copy=function(e){this.set(e.sample,e.timestampS)};function ge(e,t){this.kFilter=e;this.isDebug=t;this.currentAccelMeasurement=new fe;this.currentGyroMeasurement=new fe;this.previousGyroMeasurement=new fe;if(p()){this.filterQ=new te(-1,0,0,1)}else{this.filterQ=new te(1,0,0,1)}this.previousFilterQ=new te;this.previousFilterQ.copy(this.filterQ);this.accelQ=new te;this.isOrientationInitialized=false;this.estimatedGravity=new ee;this.measuredGravity=new ee;this.gyroIntegralQ=new te}ge.prototype.addAccelMeasurement=function(e,t){this.currentAccelMeasurement.set(e,t)};ge.prototype.addGyroMeasurement=function(e,t){this.currentGyroMeasurement.set(e,t);var i=t-this.previousGyroMeasurement.timestampS;if(r(i)){this.run_()}this.previousGyroMeasurement.copy(this.currentGyroMeasurement)};ge.prototype.run_=function(){if(!this.isOrientationInitialized){this.accelQ=this.accelToQuaternion_(this.currentAccelMeasurement.sample);this.previousFilterQ.copy(this.accelQ);this.isOrientationInitialized=true;return}var e=this.currentGyroMeasurement.timestampS-this.previousGyroMeasurement.timestampS;var t=this.gyroToQuaternionDelta_(this.currentGyroMeasurement.sample,e);this.gyroIntegralQ.multiply(t);this.filterQ.copy(this.previousFilterQ);this.filterQ.multiply(t);var i=new te;i.copy(this.filterQ);i.inverse();this.estimatedGravity.set(0,0,-1);this.estimatedGravity.applyQuaternion(i);this.estimatedGravity.normalize();this.measuredGravity.copy(this.currentAccelMeasurement.sample);this.measuredGravity.normalize();var n=new te;n.setFromUnitVectors(this.estimatedGravity,this.measuredGravity);n.inverse();if(this.isDebug){console.log("Delta: %d deg, G_est: (%s, %s, %s), G_meas: (%s, %s, %s)",J*C(n),this.estimatedGravity.x.toFixed(1),this.estimatedGravity.y.toFixed(1),this.estimatedGravity.z.toFixed(1),this.measuredGravity.x.toFixed(1),this.measuredGravity.y.toFixed(1),this.measuredGravity.z.toFixed(1))}var r=new te;r.copy(this.filterQ);r.multiply(n);this.filterQ.slerp(r,1-this.kFilter);this.previousFilterQ.copy(this.filterQ)};ge.prototype.getOrientation=function(){return this.filterQ};ge.prototype.accelToQuaternion_=function(e){var t=new ee;t.copy(e);t.normalize();var i=new te;i.setFromUnitVectors(new ee(0,0,-1),t);i.inverse();return i};ge.prototype.gyroToQuaternionDelta_=function(e,t){var i=new te;var n=new ee;n.copy(e);n.normalize();i.setFromAxisAngle(n,e.length()*t);return i};function me(e,t){this.predictionTimeS=e;this.isDebug=t;this.previousQ=new te;this.previousTimestampS=null;this.deltaQ=new te;this.outQ=new te}me.prototype.getPrediction=function(e,t,i){if(!this.previousTimestampS){this.previousQ.copy(e);this.previousTimestampS=i;return e}var n=new ee;n.copy(t);n.normalize();var r=t.length();if(r<K*20){if(this.isDebug){console.log("Moving slowly, at %s deg/s: no prediction",(J*r).toFixed(1))}this.outQ.copy(e);this.previousQ.copy(e);return this.outQ}var a=r*this.predictionTimeS;this.deltaQ.setFromAxisAngle(n,a);this.outQ.copy(this.previousQ);this.outQ.multiply(this.deltaQ);this.previousQ.copy(e);this.previousTimestampS=i;return this.outQ};function ve(e,t,i,n){this.yawOnly=i;this.accelerometer=new ee;this.gyroscope=new ee;this.filter=new ge(e,n);this.posePredictor=new me(t,n);this.isFirefoxAndroid=o();this.isIOS=p();var r=u();this.isDeviceMotionInRadians=!this.isIOS&&r&&r<66;this.isWithoutDeviceMotion=c();this.filterToWorldQ=new te;if(p()){this.filterToWorldQ.setFromAxisAngle(new ee(1,0,0),Math.PI/2)}else{this.filterToWorldQ.setFromAxisAngle(new ee(1,0,0),-Math.PI/2)}this.inverseWorldToScreenQ=new te;this.worldToScreenQ=new te;this.originalPoseAdjustQ=new te;this.originalPoseAdjustQ.setFromAxisAngle(new ee(0,0,1),-window.orientation*Math.PI/180);this.setScreenTransform_();if(d()){this.filterToWorldQ.multiply(this.inverseWorldToScreenQ)}this.resetQ=new te;this.orientationOut_=new Float32Array(4);this.start()}ve.prototype.getPosition=function(){return null};ve.prototype.getOrientation=function(){var e=void 0;if(this.isWithoutDeviceMotion&&this._deviceOrientationQ){this.deviceOrientationFixQ=this.deviceOrientationFixQ||function(){var e=(new te).setFromAxisAngle(new ee(0,0,-1),0);var t=new te;if(window.orientation===-90){t.setFromAxisAngle(new ee(0,1,0),Math.PI/-2)}else{t.setFromAxisAngle(new ee(0,1,0),Math.PI/2)}return e.multiply(t)}();this.deviceOrientationFilterToWorldQ=this.deviceOrientationFilterToWorldQ||function(){var e=new te;e.setFromAxisAngle(new ee(1,0,0),-Math.PI/2);return e}();e=this._deviceOrientationQ;var t=new te;t.copy(e);t.multiply(this.deviceOrientationFilterToWorldQ);t.multiply(this.resetQ);t.multiply(this.worldToScreenQ);t.multiplyQuaternions(this.deviceOrientationFixQ,t);
1if(this.yawOnly){t.x=0;t.z=0;t.normalize()}this.orientationOut_[0]=t.x;this.orientationOut_[1]=t.y;this.orientationOut_[2]=t.z;this.orientationOut_[3]=t.w;return this.orientationOut_}else{var i=this.filter.getOrientation();e=this.posePredictor.getPrediction(i,this.gyroscope,this.previousTimestampS)}var t=new te;t.copy(this.filterToWorldQ);t.multiply(this.resetQ);t.multiply(e);t.multiply(this.worldToScreenQ);if(this.yawOnly){t.x=0;t.z=0;t.normalize()}this.orientationOut_[0]=t.x;this.orientationOut_[1]=t.y;this.orientationOut_[2]=t.z;this.orientationOut_[3]=t.w;return this.orientationOut_};ve.prototype.resetPose=function(){this.resetQ.copy(this.filter.getOrientation());this.resetQ.x=0;this.resetQ.y=0;this.resetQ.z*=-1;this.resetQ.normalize();if(d()){this.resetQ.multiply(this.inverseWorldToScreenQ)}this.resetQ.multiply(this.originalPoseAdjustQ)};ve.prototype.onDeviceOrientation_=function(e){this._deviceOrientationQ=this._deviceOrientationQ||new te;var t=e.alpha,i=e.beta,n=e.gamma;t=(t||0)*Math.PI/180;i=(i||0)*Math.PI/180;n=(n||0)*Math.PI/180;this._deviceOrientationQ.setFromEulerYXZ(i,t,-n)};ve.prototype.onDeviceMotion_=function(e){this.updateDeviceMotion_(e)};ve.prototype.updateDeviceMotion_=function(e){var t=e.accelerationIncludingGravity;var i=e.rotationRate;var n=e.timeStamp/1e3;var r=n-this.previousTimestampS;if(r<0){L("fusion-pose-sensor:invalid:non-monotonic","Invalid timestamps detected: non-monotonic timestamp from devicemotion");this.previousTimestampS=n;return}else if(r<=a||r>s){L("fusion-pose-sensor:invalid:outside-threshold","Invalid timestamps detected: Timestamp from devicemotion outside expected range.");this.previousTimestampS=n;return}this.accelerometer.set(-t.x,-t.y,-t.z);if(h()){this.gyroscope.set(-i.beta,i.alpha,i.gamma)}else{this.gyroscope.set(i.alpha,i.beta,i.gamma)}if(!this.isDeviceMotionInRadians){this.gyroscope.multiplyScalar(Math.PI/180)}this.filter.addAccelMeasurement(this.accelerometer,n);this.filter.addGyroMeasurement(this.gyroscope,n);this.previousTimestampS=n};ve.prototype.onOrientationChange_=function(e){this.setScreenTransform_()};ve.prototype.onMessage_=function(e){var t=e.data;if(!t||!t.type){return}var i=t.type.toLowerCase();if(i!=="devicemotion"){return}this.updateDeviceMotion_(t.deviceMotionEvent)};ve.prototype.setScreenTransform_=function(){this.worldToScreenQ.set(0,0,0,1);switch(window.orientation){case 0:break;case 90:this.worldToScreenQ.setFromAxisAngle(new ee(0,0,1),-Math.PI/2);break;case-90:this.worldToScreenQ.setFromAxisAngle(new ee(0,0,1),Math.PI/2);break;case 180:break}this.inverseWorldToScreenQ.copy(this.worldToScreenQ);this.inverseWorldToScreenQ.inverse()};ve.prototype.start=function(){this.onDeviceMotionCallback_=this.onDeviceMotion_.bind(this);this.onOrientationChangeCallback_=this.onOrientationChange_.bind(this);this.onMessageCallback_=this.onMessage_.bind(this);this.onDeviceOrientationCallback_=this.onDeviceOrientation_.bind(this);if(p()&&D()){window.addEventListener("message",this.onMessageCallback_)}window.addEventListener("orientationchange",this.onOrientationChangeCallback_);if(this.isWithoutDeviceMotion){window.addEventListener("deviceorientation",this.onDeviceOrientationCallback_)}else{window.addEventListener("devicemotion",this.onDeviceMotionCallback_)}};ve.prototype.stop=function(){window.removeEventListener("devicemotion",this.onDeviceMotionCallback_);window.removeEventListener("deviceorientation",this.onDeviceOrientationCallback_);window.removeEventListener("orientationchange",this.onOrientationChangeCallback_);window.removeEventListener("message",this.onMessageCallback_)};var ye=60;var _e=new ee(1,0,0);var Me=new ee(0,0,1);var we={};if(screen.orientation){we=screen.orientation}else if(screen.msOrientation){we=screen.msOrientation}else{Object.defineProperty(we,"angle",{get:function e(){return window.orientation||0}})}var be=new te;be.setFromAxisAngle(_e,-Math.PI/2);be.multiply((new te).setFromAxisAngle(Me,Math.PI/2));var Te=function(){function t(e){i(this,t);this.config=e;this.sensor=null;this.fusionSensor=null;this._out=new Float32Array(4);this.api=null;this.errors=[];this._sensorQ=new te;this._worldToScreenQ=new te;this._outQ=new te;this._onSensorRead=this._onSensorRead.bind(this);this._onSensorError=this._onSensorError.bind(this);this._onOrientationChange=this._onOrientationChange.bind(this);this._onOrientationChange();this.init()}e(t,[{key:"init",value:function e(){var t=null;
1try{t=new RelativeOrientationSensor({frequency:ye});t.addEventListener("error",this._onSensorError)}catch(e){this.errors.push(e);if(e.name==="SecurityError"){console.error("Cannot construct sensors due to the Feature Policy");console.warn('Attempting to fall back using "devicemotion"; however this will '+"fail in the future without correct permissions.");this.useDeviceMotion()}else if(e.name==="ReferenceError"){this.useDeviceMotion()}else{console.error(e)}}if(t){this.api="sensor";this.sensor=t;this.sensor.addEventListener("reading",this._onSensorRead);this.sensor.start()}window.addEventListener("orientationchange",this._onOrientationChange)}},{key:"useDeviceMotion",value:function e(){this.api="devicemotion";this.fusionSensor=new ve(this.config.K_FILTER,this.config.PREDICTION_TIME_S,this.config.YAW_ONLY,this.config.DEBUG);if(this.sensor){this.sensor.removeEventListener("reading",this._onSensorRead);this.sensor.removeEventListener("error",this._onSensorError);this.sensor=null}}},{key:"getOrientation",value:function e(){if(this.fusionSensor){return this.fusionSensor.getOrientation()}if(!this.sensor||!this.sensor.quaternion){this._out[0]=this._out[1]=this._out[2]=0;this._out[3]=1;return this._out}var t=this.sensor.quaternion;this._sensorQ.set(t[0],t[1],t[2],t[3]);var i=this._outQ;i.copy(be);i.multiply(this._sensorQ);i.multiply(this._worldToScreenQ);if(this.config.YAW_ONLY){i.x=i.z=0;i.normalize()}this._out[0]=i.x;this._out[1]=i.y;this._out[2]=i.z;this._out[3]=i.w;return this._out}},{key:"_onSensorError",value:function e(t){this.errors.push(t.error);if(t.error.name==="NotAllowedError"){console.error("Permission to access sensor was denied")}else if(t.error.name==="NotReadableError"){console.error("Sensor could not be read")}else{console.error(t.error)}this.useDeviceMotion()}},{key:"_onSensorRead",value:function e(){}},{key:"_onOrientationChange",value:function e(){var t=-we.angle*Math.PI/180;this._worldToScreenQ.setFromAxisAngle(Me,t)}}]);return t}();var Ae="PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+Cjxzdmcgd2lkdGg9IjE5OHB4IiBoZWlnaHQ9IjI0MHB4IiB2aWV3Qm94PSIwIDAgMTk4IDI0MCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWxuczpza2V0Y2g9Imh0dHA6Ly93d3cuYm9oZW1pYW5jb2RpbmcuY29tL3NrZXRjaC9ucyI+CiAgICA8IS0tIEdlbmVyYXRvcjogU2tldGNoIDMuMy4zICgxMjA4MSkgLSBodHRwOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2ggLS0+CiAgICA8dGl0bGU+dHJhbnNpdGlvbjwvdGl0bGU+CiAgICA8ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz4KICAgIDxkZWZzPjwvZGVmcz4KICAgIDxnIGlkPSJQYWdlLTEiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIHNrZXRjaDp0eXBlPSJNU1BhZ2UiPgogICAgICAgIDxnIGlkPSJ0cmFuc2l0aW9uIiBza2V0Y2g6dHlwZT0iTVNBcnRib2FyZEdyb3VwIj4KICAgICAgICAgICAgPGcgaWQ9IkltcG9ydGVkLUxheWVycy1Db3B5LTQtKy1JbXBvcnRlZC1MYXllcnMtQ29weS0rLUltcG9ydGVkLUxheWVycy1Db3B5LTItQ29weSIgc2tldGNoOnR5cGU9Ik1TTGF5ZXJHcm91cCI+CiAgICAgICAgICAgICAgICA8ZyBpZD0iSW1wb3J0ZWQtTGF5ZXJzLUNvcHktNCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMC4wMDAwMDAsIDEwNy4wMDAwMDApIiBza2V0Y2g6dHlwZT0iTVNTaGFwZUdyb3VwIj4KICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNMTQ5LjYyNSwyLjUyNyBDMTQ5LjYyNSwyLjUyNyAxNTUuODA1LDYuMDk2IDE1Ni4zNjIsNi40MTggTDE1Ni4zNjIsNy4zMDQgQzE1Ni4zNjIsNy40ODEgMTU2LjM3NSw3LjY2NCAxNTYuNCw3Ljg1MyBDMTU2LjQxLDcuOTM0IDE1Ni40Miw4LjAxNSAxNTYuNDI3LDguMDk1IEMxNTYuNTY3LDkuNTEgMTU3LjQwMSwxMS4wOTMgMTU4LjUzMiwxMi4wOTQgTDE2NC4yNTIsMTcuMTU2IEwxNjQuMzMzLDE3LjA2NiBDMTY0LjMzMywxNy4wNjYgMTY4LjcxNSwxNC41MzYgMTY5LjU2OCwxNC4wNDIgQzE3MS4wMjUsMTQuODgzIDE5NS41MzgsMjkuMDM1IDE5NS41MzgsMjkuMDM1IEwxOTUuNTM4LDgzLjAzNiBDMTk1LjUzOCw4My44MDcgMTk1LjE1Miw4NC4yNTMgMTk0LjU5LDg0LjI1MyBDMTk0LjM1Nyw4NC4yNTMgMTk0LjA5NSw4NC4xNzcgMTkzLjgxOCw4NC4wMTcgTDE2OS44NTEsNzAuMTc5IEwxNjkuODM3LDcwLjIwMyBMMTQyLjUxNSw4NS45NzggTDE0MS42NjUsODQuNjU1IEMxMzYuOTM0LDgzLjEyNiAxMzEuOTE3LDgxLjkxNSAxMjYuNzE0LDgxLjA0NSBDMTI2LjcwOSw4MS4wNiAxMjYuNzA3LDgxLjA2OSAxMjYuNzA3LDgxLjA2OSBMMTIxLjY0LDk4LjAzIEwxMTMuNzQ5LDEwMi41ODYgTDExMy43MTIsMTAyLjUyMyBMMTEzLjcxMiwxMzAuMTEzIEMxMTMuNzEyLDEzMC44ODUgMTEzLjMyNiwxMzEuMzMgMTEyLjc2NCwxMzEuMzMgQzExMi41MzIsMTMxLjMzIDExMi4yNjksMTMxLjI1NCAxMTEuOTkyLDEzMS4wOTQgTDY5LjUxOSwxMDYuNTcyIEM2OC41NjksMTA2LjAyMyA2Ny43OTksMTA0LjY5NSA2Ny43OTksMTAzLjYwNSBMNjcuNzk5LDEwMi41NyBMNjcuNzc4LDEwMi42MTcgQzY3LjI3LDEwMi4zOTMgNjYuNjQ4LDEwMi4yNDkgNjUuOTYyLDEwMi4yMTggQzY1Ljg3NSwxMDIuMjE0IDY1Ljc4OCwxMDIuMjEyIDY1LjcwMSwxMDIuMjEyIEM2NS42MDYsMTAyLjIxMiA2NS41MTEsMTAyLjIxNSA2NS40MTYsMTAyLjIxOSBDNjUuMTk1LDEwMi4yMjkgNjQuOTc0LDEwMi4yMzUgNjQuNzU0LDEwMi4yMzUgQzY0LjMzMSwxMDIuMjM1IDYzLjkxMSwxMDIuMjE2IDYzLjQ5OCwxMDIuMTc4IEM2MS44NDMsMTAyLjAyNSA2MC4yOTgsMTAxLjU3OCA1OS4wOTQsMTAwLjg4MiBMMTIuNTE4LDczLjk5MiBMMTIuNTIzLDc0LjAwNCBMMi4yNDUsNTUuMjU0IEMxLjI0NCw1My40MjcgMi4wMDQsNTEuMDM4IDMuOTQzLDQ5LjkxOCBMNTkuOTU0LDE3LjU3MyB
1DNjAuNjI2LDE3LjE4NSA2MS4zNSwxNy4wMDEgNjIuMDUzLDE3LjAwMSBDNjMuMzc5LDE3LjAwMSA2NC42MjUsMTcuNjYgNjUuMjgsMTguODU0IEw2NS4yODUsMTguODUxIEw2NS41MTIsMTkuMjY0IEw2NS41MDYsMTkuMjY4IEM2NS45MDksMjAuMDAzIDY2LjQwNSwyMC42OCA2Ni45ODMsMjEuMjg2IEw2Ny4yNiwyMS41NTYgQzY5LjE3NCwyMy40MDYgNzEuNzI4LDI0LjM1NyA3NC4zNzMsMjQuMzU3IEM3Ni4zMjIsMjQuMzU3IDc4LjMyMSwyMy44NCA4MC4xNDgsMjIuNzg1IEM4MC4xNjEsMjIuNzg1IDg3LjQ2NywxOC41NjYgODcuNDY3LDE4LjU2NiBDODguMTM5LDE4LjE3OCA4OC44NjMsMTcuOTk0IDg5LjU2NiwxNy45OTQgQzkwLjg5MiwxNy45OTQgOTIuMTM4LDE4LjY1MiA5Mi43OTIsMTkuODQ3IEw5Ni4wNDIsMjUuNzc1IEw5Ni4wNjQsMjUuNzU3IEwxMDIuODQ5LDI5LjY3NCBMMTAyLjc0NCwyOS40OTIgTDE0OS42MjUsMi41MjcgTTE0OS42MjUsMC44OTIgQzE0OS4zNDMsMC44OTIgMTQ5LjA2MiwwLjk2NSAxNDguODEsMS4xMSBMMTAyLjY0MSwyNy42NjYgTDk3LjIzMSwyNC41NDIgTDk0LjIyNiwxOS4wNjEgQzkzLjMxMywxNy4zOTQgOTEuNTI3LDE2LjM1OSA4OS41NjYsMTYuMzU4IEM4OC41NTUsMTYuMzU4IDg3LjU0NiwxNi42MzIgODYuNjQ5LDE3LjE1IEM4My44NzgsMTguNzUgNzkuNjg3LDIxLjE2OSA3OS4zNzQsMjEuMzQ1IEM3OS4zNTksMjEuMzUzIDc5LjM0NSwyMS4zNjEgNzkuMzMsMjEuMzY5IEM3Ny43OTgsMjIuMjU0IDc2LjA4NCwyMi43MjIgNzQuMzczLDIyLjcyMiBDNzIuMDgxLDIyLjcyMiA2OS45NTksMjEuODkgNjguMzk3LDIwLjM4IEw2OC4xNDUsMjAuMTM1IEM2Ny43MDYsMTkuNjcyIDY3LjMyMywxOS4xNTYgNjcuMDA2LDE4LjYwMSBDNjYuOTg4LDE4LjU1OSA2Ni45NjgsMTguNTE5IDY2Ljk0NiwxOC40NzkgTDY2LjcxOSwxOC4wNjUgQzY2LjY5LDE4LjAxMiA2Ni42NTgsMTcuOTYgNjYuNjI0LDE3LjkxMSBDNjUuNjg2LDE2LjMzNyA2My45NTEsMTUuMzY2IDYyLjA1MywxNS4zNjYgQzYxLjA0MiwxNS4zNjYgNjAuMDMzLDE1LjY0IDU5LjEzNiwxNi4xNTggTDMuMTI1LDQ4LjUwMiBDMC40MjYsNTAuMDYxIC0wLjYxMyw1My40NDIgMC44MTEsNTYuMDQgTDExLjA4OSw3NC43OSBDMTEuMjY2LDc1LjExMyAxMS41MzcsNzUuMzUzIDExLjg1LDc1LjQ5NCBMNTguMjc2LDEwMi4yOTggQzU5LjY3OSwxMDMuMTA4IDYxLjQzMywxMDMuNjMgNjMuMzQ4LDEwMy44MDYgQzYzLjgxMiwxMDMuODQ4IDY0LjI4NSwxMDMuODcgNjQuNzU0LDEwMy44NyBDNjUsMTAzLjg3IDY1LjI0OSwxMDMuODY0IDY1LjQ5NCwxMDMuODUyIEM2NS41NjMsMTAzLjg0OSA2NS42MzIsMTAzLjg0NyA2NS43MDEsMTAzLjg0NyBDNjUuNzY0LDEwMy44NDcgNjUuODI4LDEwMy44NDkgNjUuODksMTAzLjg1MiBDNjUuOTg2LDEwMy44NTYgNjYuMDgsMTAzLjg2MyA2Ni4xNzMsMTAzLjg3NCBDNjYuMjgyLDEwNS40NjcgNjcuMzMyLDEwNy4xOTcgNjguNzAyLDEwNy45ODggTDExMS4xNzQsMTMyLjUxIEMxMTEuNjk4LDEzMi44MTIgMTEyLjIzMiwxMzIuOTY1IDExMi43NjQsMTMyLjk2NSBDMTE0LjI2MSwxMzIuOTY1IDExNS4zNDcsMTMxLjc2NSAxMTUuMzQ3LDEzMC4xMTMgTDExNS4zNDcsMTAzLjU1MSBMMTIyLjQ1OCw5OS40NDYgQzEyMi44MTksOTkuMjM3IDEyMy4wODcsOTguODk4IDEyMy4yMDcsOTguNDk4IEwxMjcuODY1LDgyLjkwNSBDMTMyLjI3OSw4My43MDIgMTM2LjU1Nyw4NC43NTMgMTQwLjYwNyw4Ni4wMzMgTDE0MS4xNCw4Ni44NjIgQzE0MS40NTEsODcuMzQ2IDE0MS45NzcsODcuNjEzIDE0Mi41MTYsODcuNjEzIEMxNDIuNzk0LDg3LjYxMyAxNDMuMDc2LDg3LjU0MiAxNDMuMzMzLDg3LjM5MyBMMTY5Ljg2NSw3Mi4wNzYgTDE5Myw4NS40MzMgQzE5My41MjMsODUuNzM1IDE5NC4wNTgsODUuODg4IDE5NC41OSw4NS44ODggQzE5Ni4wODcsODUuODg4IDE5Ny4xNzMsODQuNjg5IDE5Ny4xNzMsODMuMDM2IEwxOTcuMTczLDI5LjAzNSBDMTk3LjE3MywyOC40NTEgMTk2Ljg2MSwyNy45MTEgMTk2LjM1NSwyNy42MTkgQzE5Ni4zNTUsMjcuNjE5IDE3MS44NDMsMTMuNDY3IDE3MC4zODUsMTIuNjI2IEMxNzAuMTMyLDEyLjQ4IDE2OS44NSwxMi40MDcgMTY5LjU2OCwxMi40MDcgQzE2OS4yODUsMTIuNDA3IDE2OS4wMDIsMTIuNDgxIDE2OC43NDksMTIuNjI3IEMxNjguMTQzLDEyLjk3OCAxNjUuNzU2LDE0LjM1NyAxNjQuNDI0LDE1LjEyNSBMMTU5LjYxNSwxMC44NyBDMTU4Ljc5NiwxMC4xNDUgMTU4LjE1NCw4LjkzNyAxNTguMDU0LDcuOTM0IEMxNTguMDQ1LDcuODM3IDE1OC4wMzQsNy43MzkgMTU4LjAyMSw3LjY0IEMxNTguMDA1LDcuNTIzIDE1Ny45OTgsNy40MSAxNTcuOTk4LDcuMzA0IEwxNTcuOTk4LDYuNDE4IEMxNTcuOTk4LDUuODM0IDE1Ny42ODYsNS4yOTUgMTU3LjE4MSw1LjAwMiBDMTU2LjYyNCw0LjY4IDE1MC40NDIsMS4xMTEgMTUwLjQ0MiwxLjExMSBDMTUwLjE4OSwwLjk2NSAxNDkuOTA3LDAuODkyIDE0OS42MjUsMC44OTIiIGlkPSJGaWxsLTEiIGZpbGw9IiM0NTVBNjQiPjwvcGF0aD4KICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNOTYuMDI3LDI1LjYzNiBMMTQyLjYwMyw1Mi41MjcgQzE0My44MDcsNTMuMjIyIDE0NC41ODIsNTQuMTE0IDE0NC44NDUsNTUuMDY4IEwxNDQuODM1LDU1LjA3NSBMNjMuNDYxLDEwMi4wNTcgTDYzLjQ2LDEwMi4wNTcgQzYxLjgwNiwxMDEuOTA1IDYwLjI2MSwxMDEuNDU3IDU5LjA1NywxMDAuNzYyIEwxMi40ODEsNzMuODcxIEw5Ni4wMjcsMjUuNjM2IiBpZD0iRmlsbC0yIiBmaWxsPSIjRkFGQUZBIj48L3BhdGg+CiAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTYzLjQ2MSwxMDIuMTc0IEM2My40NTMsMTAyLjE3NCA2My40NDYsMTAyLjE3NCA2My40MzksMTAyLjE3MiBDNjEuNzQ2LDEwMi4wMTYgNjAuMjExLDEwMS41NjMgNTguOTk4LDEwMC44NjMgTDEyLjQyMiw3My45NzMgQzEyLjM4Niw3My45NTIgMTIuMzY0LDczLjkxNCAxMi4zNjQsNzMuODcxIEMxMi4zNjQsNzMuODMgMTIuMzg2LDczLjc5MSAxMi40MjIsNzMuNzcgTDk1Ljk2OCwyNS41MzUgQzk2LjAwNCwyNS41MTQgOTYuMDQ5LDI1LjUxNCA5Ni4wODUsMjUuNTM1IEwxNDIuNjYxLDUyLjQyNiBDMTQzLjg4OCw1My4xMzQgMTQ0LjY4Miw1NC4wMzggMTQ0Ljk1Nyw1NS4wMzcgQzE0NC45Nyw1NS4wODMgMTQ0Ljk1Myw1NS4xMzMgMTQ0LjkxNSw1NS4xNjEgQzE0NC45MTEsNTUuMTY1IDE0NC44OTgsNTUuMTc0IDE0NC44OTQsNTUuMTc3IEw2My41MTksMTAyLjE1OCBDNjMuNTAxLDEwMi4xNjkgNjMuNDgxLDEwMi4xNzQgNjMuNDYxLDEwMi4xNzQgTDYzLjQ2MSwxMDIuMTc0IFogTTEyLjcxNCw3My44NzEgTDU5LjExNSwxMDAuNjYxIEM2MC4yOTMsMTAxLjM0MSA2MS43ODYsMTAxLjc4MiA2My40MzUsMTAxLjkzNyBMMTQ0LjcwNyw1NS4wMTUgQzE0NC40MjgsNTQuMTA4IDE0My42ODIsNTMuMjg1IDE0Mi41NDQsNTIuNjI4IEw5Ni4wMjcsMjUuNzcxIEwxMi43MTQsNzMuODcxIEwxMi43MTQsNzMuODcxIFoiIGlkPSJGaWxsLTMiIGZpbGw9IiM2MDdEOEIiPjwvcGF0aD4KICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNMTQ4LjMyNyw1OC40NzEgQzE0OC4xNDUsNTguNDggMTQ3Ljk2Miw1OC40OCAxNDcuNzgxLDU4LjQ3MiBDMTQ1Ljg4Nyw1OC4zODkgMTQ0LjQ3OSw1Ny40MzQgMTQ0LjYzNiw1Ni4zNCB
1DMTQ0LjY4OSw1NS45NjcgMTQ0LjY2NCw1NS41OTcgMTQ0LjU2NCw1NS4yMzUgTDYzLjQ2MSwxMDIuMDU3IEM2NC4wODksMTAyLjExNSA2NC43MzMsMTAyLjEzIDY1LjM3OSwxMDIuMDk5IEM2NS41NjEsMTAyLjA5IDY1Ljc0MywxMDIuMDkgNjUuOTI1LDEwMi4wOTggQzY3LjgxOSwxMDIuMTgxIDY5LjIyNywxMDMuMTM2IDY5LjA3LDEwNC4yMyBMMTQ4LjMyNyw1OC40NzEiIGlkPSJGaWxsLTQiIGZpbGw9IiNGRkZGRkYiPjwvcGF0aD4KICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNNjkuMDcsMTA0LjM0NyBDNjkuMDQ4LDEwNC4zNDcgNjkuMDI1LDEwNC4zNCA2OS4wMDUsMTA0LjMyNyBDNjguOTY4LDEwNC4zMDEgNjguOTQ4LDEwNC4yNTcgNjguOTU1LDEwNC4yMTMgQzY5LDEwMy44OTYgNjguODk4LDEwMy41NzYgNjguNjU4LDEwMy4yODggQzY4LjE1MywxMDIuNjc4IDY3LjEwMywxMDIuMjY2IDY1LjkyLDEwMi4yMTQgQzY1Ljc0MiwxMDIuMjA2IDY1LjU2MywxMDIuMjA3IDY1LjM4NSwxMDIuMjE1IEM2NC43NDIsMTAyLjI0NiA2NC4wODcsMTAyLjIzMiA2My40NSwxMDIuMTc0IEM2My4zOTksMTAyLjE2OSA2My4zNTgsMTAyLjEzMiA2My4zNDcsMTAyLjA4MiBDNjMuMzM2LDEwMi4wMzMgNjMuMzU4LDEwMS45ODEgNjMuNDAyLDEwMS45NTYgTDE0NC41MDYsNTUuMTM0IEMxNDQuNTM3LDU1LjExNiAxNDQuNTc1LDU1LjExMyAxNDQuNjA5LDU1LjEyNyBDMTQ0LjY0Miw1NS4xNDEgMTQ0LjY2OCw1NS4xNyAxNDQuNjc3LDU1LjIwNCBDMTQ0Ljc4MSw1NS41ODUgMTQ0LjgwNiw1NS45NzIgMTQ0Ljc1MSw1Ni4zNTcgQzE0NC43MDYsNTYuNjczIDE0NC44MDgsNTYuOTk0IDE0NS4wNDcsNTcuMjgyIEMxNDUuNTUzLDU3Ljg5MiAxNDYuNjAyLDU4LjMwMyAxNDcuNzg2LDU4LjM1NSBDMTQ3Ljk2NCw1OC4zNjMgMTQ4LjE0Myw1OC4zNjMgMTQ4LjMyMSw1OC4zNTQgQzE0OC4zNzcsNTguMzUyIDE0OC40MjQsNTguMzg3IDE0OC40MzksNTguNDM4IEMxNDguNDU0LDU4LjQ5IDE0OC40MzIsNTguNTQ1IDE0OC4zODUsNTguNTcyIEw2OS4xMjksMTA0LjMzMSBDNjkuMTExLDEwNC4zNDIgNjkuMDksMTA0LjM0NyA2OS4wNywxMDQuMzQ3IEw2OS4wNywxMDQuMzQ3IFogTTY1LjY2NSwxMDEuOTc1IEM2NS43NTQsMTAxLjk3NSA2NS44NDIsMTAxLjk3NyA2NS45MywxMDEuOTgxIEM2Ny4xOTYsMTAyLjAzNyA2OC4yODMsMTAyLjQ2OSA2OC44MzgsMTAzLjEzOSBDNjkuMDY1LDEwMy40MTMgNjkuMTg4LDEwMy43MTQgNjkuMTk4LDEwNC4wMjEgTDE0Ny44ODMsNTguNTkyIEMxNDcuODQ3LDU4LjU5MiAxNDcuODExLDU4LjU5MSAxNDcuNzc2LDU4LjU4OSBDMTQ2LjUwOSw1OC41MzMgMTQ1LjQyMiw1OC4xIDE0NC44NjcsNTcuNDMxIEMxNDQuNTg1LDU3LjA5MSAxNDQuNDY1LDU2LjcwNyAxNDQuNTIsNTYuMzI0IEMxNDQuNTYzLDU2LjAyMSAxNDQuNTUyLDU1LjcxNiAxNDQuNDg4LDU1LjQxNCBMNjMuODQ2LDEwMS45NyBDNjQuMzUzLDEwMi4wMDIgNjQuODY3LDEwMi4wMDYgNjUuMzc0LDEwMS45ODIgQzY1LjQ3MSwxMDEuOTc3IDY1LjU2OCwxMDEuOTc1IDY1LjY2NSwxMDEuOTc1IEw2NS42NjUsMTAxLjk3NSBaIiBpZD0iRmlsbC01IiBmaWxsPSIjNjA3RDhCIj48L3BhdGg+CiAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTIuMjA4LDU1LjEzNCBDMS4yMDcsNTMuMzA3IDEuOTY3LDUwLjkxNyAzLjkwNiw0OS43OTcgTDU5LjkxNywxNy40NTMgQzYxLjg1NiwxNi4zMzMgNjQuMjQxLDE2LjkwNyA2NS4yNDMsMTguNzM0IEw2NS40NzUsMTkuMTQ0IEM2NS44NzIsMTkuODgyIDY2LjM2OCwyMC41NiA2Ni45NDUsMjEuMTY1IEw2Ny4yMjMsMjEuNDM1IEM3MC41NDgsMjQuNjQ5IDc1LjgwNiwyNS4xNTEgODAuMTExLDIyLjY2NSBMODcuNDMsMTguNDQ1IEM4OS4zNywxNy4zMjYgOTEuNzU0LDE3Ljg5OSA5Mi43NTUsMTkuNzI3IEw5Ni4wMDUsMjUuNjU1IEwxMi40ODYsNzMuODg0IEwyLjIwOCw1NS4xMzQgWiIgaWQ9IkZpbGwtNiIgZmlsbD0iI0ZBRkFGQSI+PC9wYXRoPgogICAgICAgICAgICAgICAgICAgIDxwYXRoIGQ9Ik0xMi40ODYsNzQuMDAxIEMxMi40NzYsNzQuMDAxIDEyLjQ2NSw3My45OTkgMTIuNDU1LDczLjk5NiBDMTIuNDI0LDczLjk4OCAxMi4zOTksNzMuOTY3IDEyLjM4NCw3My45NCBMMi4xMDYsNTUuMTkgQzEuMDc1LDUzLjMxIDEuODU3LDUwLjg0NSAzLjg0OCw0OS42OTYgTDU5Ljg1OCwxNy4zNTIgQzYwLjUyNSwxNi45NjcgNjEuMjcxLDE2Ljc2NCA2Mi4wMTYsMTYuNzY0IEM2My40MzEsMTYuNzY0IDY0LjY2NiwxNy40NjYgNjUuMzI3LDE4LjY0NiBDNjUuMzM3LDE4LjY1NCA2NS4zNDUsMTguNjYzIDY1LjM1MSwxOC42NzQgTDY1LjU3OCwxOS4wODggQzY1LjU4NCwxOS4xIDY1LjU4OSwxOS4xMTIgNjUuNTkxLDE5LjEyNiBDNjUuOTg1LDE5LjgzOCA2Ni40NjksMjAuNDk3IDY3LjAzLDIxLjA4NSBMNjcuMzA1LDIxLjM1MSBDNjkuMTUxLDIzLjEzNyA3MS42NDksMjQuMTIgNzQuMzM2LDI0LjEyIEM3Ni4zMTMsMjQuMTIgNzguMjksMjMuNTgyIDgwLjA1MywyMi41NjMgQzgwLjA2NCwyMi41NTcgODAuMDc2LDIyLjU1MyA4MC4wODgsMjIuNTUgTDg3LjM3MiwxOC4zNDQgQzg4LjAzOCwxNy45NTkgODguNzg0LDE3Ljc1NiA4OS41MjksMTcuNzU2IEM5MC45NTYsMTcuNzU2IDkyLjIwMSwxOC40NzIgOTIuODU4LDE5LjY3IEw5Ni4xMDcsMjUuNTk5IEM5Ni4xMzgsMjUuNjU0IDk2LjExOCwyNS43MjQgOTYuMDYzLDI1Ljc1NiBMMTIuNTQ1LDczLjk4NSBDMTIuNTI2LDczLjk5NiAxMi41MDYsNzQuMDAxIDEyLjQ4Niw3NC4wMDEgTDEyLjQ4Niw3NC4wMDEgWiBNNjIuMDE2LDE2Ljk5NyBDNjEuMzEyLDE2Ljk5NyA2MC42MDYsMTcuMTkgNTkuOTc1LDE3LjU1NCBMMy45NjUsNDkuODk5IEMyLjA4Myw1MC45ODUgMS4zNDEsNTMuMzA4IDIuMzEsNTUuMDc4IEwxMi41MzEsNzMuNzIzIEw5NS44NDgsMjUuNjExIEw5Mi42NTMsMTkuNzgyIEM5Mi4wMzgsMTguNjYgOTAuODcsMTcuOTkgODkuNTI5LDE3Ljk5IEM4OC44MjUsMTcuOTkgODguMTE5LDE4LjE4MiA4Ny40ODksMTguNTQ3IEw4MC4xNzIsMjIuNzcyIEM4MC4xNjEsMjIuNzc4IDgwLjE0OSwyMi43ODIgODAuMTM3LDIyLjc4NSBDNzguMzQ2LDIzLjgxMSA3Ni4zNDEsMjQuMzU0IDc0LjMzNiwyNC4zNTQgQzcxLjU4OCwyNC4zNTQgNjkuMDMzLDIzLjM0NyA2Ny4xNDIsMjEuNTE5IEw2Ni44NjQsMjEuMjQ5IEM2Ni4yNzcsMjAuNjM0IDY1Ljc3NCwxOS45NDcgNjUuMzY3LDE5LjIwMyBDNjUuMzYsMTkuMTkyIDY1LjM1NiwxOS4xNzkgNjUuMzU0LDE5LjE2NiBMNjUuMTYzLDE4LjgxOSBDNjUuMTU0LDE4LjgxMSA2NS4xNDYsMTguODAxIDY1LjE0LDE4Ljc5IEM2NC41MjUsMTcuNjY3IDYzLjM1NywxNi45OTcgNjIuMDE2LDE2Ljk5NyBMNjIuMDE2LDE2Ljk5NyBaIiBpZD0iRmlsbC03IiBmaWxsPSIjNjA3RDhCIj48L3BhdGg+CiAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTQyLjQzNCw0OC44MDggTDQyLjQzNCw0OC44MDggQzM5LjkyNCw0OC44MDcgMzcuNzM3LDQ3LjU1IDM2LjU4Miw0NS40NDMgQzM0Ljc3MSw0Mi4xMzkgMzYuMTQ0LDM3LjgwOSAzOS42NDEsMzUuNzg5IEw1MS45MzIsMjguNjkxIEM1My4xMDMsMjguMDE1IDU0LjQxMywyNy42NTggNTUuNzIxLDI3LjY1OCBDNTguMjMxLDI3LjY1OCA2MC40MTgsMjguOTE2IDYxLjU3MywzMS4wMjMgQzYzLjM4NCwzNC4zMjcgNjIuMDEyLDM4LjY1NyA1OC41MTQsNDAuNjc3IEw0Ni4yMjMsNDcuNzc1IEM0NS4wNTMsNDguNDUgNDMuNzQyLDQ4LjgwOCA0Mi40MzQsNDguODA4IEw0Mi40MzQsNDguODA4IFogTTU1LjcyMSwyOC4xMjUgQzU0LjQ5NSwyOC4xMjUgNTMuMjY1LDI4LjQ2MSA1Mi4xNjYsMjkuMDk2IEwzOS44NzUsMzYuMTk0IEMzNi41OTYsMzguMDg3IDM1LjMwMiw0Mi4xMzYgMzYuOTkyLDQ1LjIxOCBDMzguMDYzLDQ3LjE3MyA0MC4wOTgsNDguMzQgNDIuNDM0LDQ4LjM0IEM0My42NjEsNDguMzQgNDQuODksNDguMDA1IDQ1Ljk5LDQ3LjM3IEw1OC4yODEsNDAuMjcyIEM2MS41NiwzOC4zNzkgNjIuODUzLDM0LjMzIDYxLjE2NCwzMS4yNDggQzYwLjA5MiwyOS4yOTMgNTguMDU4LDI4LjEyNSA1NS43MjEsMjguMTI1IEw1NS43MjEsMjguMTI1IFoiIGlkPSJGaWxsLTgiIGZpbGw9IiM2MDdEOEIiPjwvcGF0aD4KICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNMTQ5LjU4OCwyLjQwNyBDMTQ5LjU4OCwyLjQwNyAxNTUuNzY4LDUuOTc1IDE1Ni4zMjUsNi4yOTcgTDE1Ni4zMjUsNy4xODQgQzE1Ni4zMjUsNy4zNiAxNTYuMzM4LDcuNTQ0IDE1Ni4zNjIsNy43MzMgQzE1Ni4zNzMsNy44MTQgMTU2LjM4Miw3Ljg5NCAxNTYuMzksNy45NzUgQzE1Ni41Myw5LjM5IDE1Ny4zNjMsMTAuOTczIDE1OC40OTUsMTEuOTc0IEwxNjUuODkxLDE4LjUxOSBDMTY2LjA2OCwxOC42NzUgMTY2LjI0OSwxOC44MTQgMTY2LjQzMiwxOC45MzQgQzE2OC4wMTEsMTkuOTc0IDE2OS4zODIsMTkuNCAxNjkuNDk0LDE3LjY1MiBDMTY5LjU0MywxNi44NjggMTY5LjU1MSwxNi4wNTcgMTY5LjUxNywxNS4yMjMgTDE2OS41MTQsMTUuMDYzIEwxNjkuNTE0LDEzLjkxMiBDMTcwLjc4LDE0LjY0MiAxOTUuNTAxLDI4LjkxNSAxOTUuNTAxLDI4LjkxNSBMMTk1LjUwMSw4Mi45MTUgQzE5NS41MDEsODQuMDA1IDE5NC43MzEsODQuNDQ1IDE5My43ODEsODMuODk3IEwxNTEuMzA4LDU5LjM3NCBDMTUwLjM1OCw1OC44MjYgMTQ5LjU4OCw1Ny40OTcgMTQ5LjU4OCw1Ni40MDggTDE0OS41ODgsMjIuMzc1IiBpZD0iRmlsbC05IiBmaWxsPSIjRkFGQUZBIj48L3BhdGg+CiAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTE5NC41NTMsODQuMjUgQzE5NC4yOTYsODQuMjUgMTk0LjAxMyw4NC4xNjUgMTkzLjcyMiw4My45OTcgTDE1MS4yNSw1OS40NzYgQzE1MC4yNjksNTguOTA5IDE0OS40NzEsNTcuNTMzIDE0OS40NzEsNTYuNDA4IEwxNDkuNDcxLDIyLjM3NSBMMTQ5LjcwNSwyMi4zNzUgTDE0OS43MDUsNTYuNDA4IEMxNDkuNzA1LDU3LjQ1OSAxNTAuNDUsNTguNzQ0IDE1MS4zNjYsNTkuMjc0IEwxOTMuODM5LDgzLjc5NSBDMTk0LjI2Myw4NC4wNCAxOTQuNjU1LDg0LjA4MyAxOTQuOTQyLDgzLjkxNyBDMTk1LjIyNyw4My43NTMgMTk1LjM4NCw4My4zOTcgMTk1LjM4NCw4Mi45MTUgTDE5NS4zODQsMjguOTgyIEMxOTQuMTAyLDI4LjI0MiAxNzIuMTA0LDE1LjU0MiAxNjkuNjMxLDE0LjExNCBMMTY5LjYzNCwxNS4yMiBDMTY5LjY2OCwxNi4wNTIgMTY5LjY2LDE2Ljg3NCAxNjkuNjEsMTcuNjU5IEMxNjkuNTU2LDE4LjUwMyAxNjkuMjE0LDE
15LjEyMyAxNjguNjQ3LDE5LjQwNSBDMTY4LjAyOCwxOS43MTQgMTY3LjE5NywxOS41NzggMTY2LjM2NywxOS4wMzIgQzE2Ni4xODEsMTguOTA5IDE2NS45OTUsMTguNzY2IDE2NS44MTQsMTguNjA2IEwxNTguNDE3LDEyLjA2MiBDMTU3LjI1OSwxMS4wMzYgMTU2LjQxOCw5LjQzNyAxNTYuMjc0LDcuOTg2IEMxNTYuMjY2LDcuOTA3IDE1Ni4yNTcsNy44MjcgMTU2LjI0Nyw3Ljc0OCBDMTU2LjIyMSw3LjU1NSAxNTYuMjA5LDcuMzY1IDE1Ni4yMDksNy4xODQgTDE1Ni4yMDksNi4zNjQgQzE1NS4zNzUsNS44ODMgMTQ5LjUyOSwyLjUwOCAxNDkuNTI5LDIuNTA4IEwxNDkuNjQ2LDIuMzA2IEMxNDkuNjQ2LDIuMzA2IDE1NS44MjcsNS44NzQgMTU2LjM4NCw2LjE5NiBMMTU2LjQ0Miw2LjIzIEwxNTYuNDQyLDcuMTg0IEMxNTYuNDQyLDcuMzU1IDE1Ni40NTQsNy41MzUgMTU2LjQ3OCw3LjcxNyBDMTU2LjQ4OSw3LjggMTU2LjQ5OSw3Ljg4MiAxNTYuNTA3LDcuOTYzIEMxNTYuNjQ1LDkuMzU4IDE1Ny40NTUsMTAuODk4IDE1OC41NzIsMTEuODg2IEwxNjUuOTY5LDE4LjQzMSBDMTY2LjE0MiwxOC41ODQgMTY2LjMxOSwxOC43MiAxNjYuNDk2LDE4LjgzNyBDMTY3LjI1NCwxOS4zMzYgMTY4LDE5LjQ2NyAxNjguNTQzLDE5LjE5NiBDMTY5LjAzMywxOC45NTMgMTY5LjMyOSwxOC40MDEgMTY5LjM3NywxNy42NDUgQzE2OS40MjcsMTYuODY3IDE2OS40MzQsMTYuMDU0IDE2OS40MDEsMTUuMjI4IEwxNjkuMzk3LDE1LjA2NSBMMTY5LjM5NywxMy43MSBMMTY5LjU3MiwxMy44MSBDMTcwLjgzOSwxNC41NDEgMTk1LjU1OSwyOC44MTQgMTk1LjU1OSwyOC44MTQgTDE5NS42MTgsMjguODQ3IEwxOTUuNjE4LDgyLjkxNSBDMTk1LjYxOCw4My40ODQgMTk1LjQyLDgzLjkxMSAxOTUuMDU5LDg0LjExOSBDMTk0LjkwOCw4NC4yMDYgMTk0LjczNyw4NC4yNSAxOTQuNTUzLDg0LjI1IiBpZD0iRmlsbC0xMCIgZmlsbD0iIzYwN0Q4QiI+PC9wYXRoPgogICAgICAgICAgICAgICAgICAgIDxwYXRoIGQ9Ik0xNDUuNjg1LDU2LjE2MSBMMTY5LjgsNzAuMDgzIEwxNDMuODIyLDg1LjA4MSBMMTQyLjM2LDg0Ljc3NCBDMTM1LjgyNiw4Mi42MDQgMTI4LjczMiw4MS4wNDYgMTIxLjM0MSw4MC4xNTggQzExNi45NzYsNzkuNjM0IDExMi42NzgsODEuMjU0IDExMS43NDMsODMuNzc4IEMxMTEuNTA2LDg0LjQxNCAxMTEuNTAzLDg1LjA3MSAxMTEuNzMyLDg1LjcwNiBDMTEzLjI3LDg5Ljk3MyAxMTUuOTY4LDk0LjA2OSAxMTkuNzI3LDk3Ljg0MSBMMTIwLjI1OSw5OC42ODYgQzEyMC4yNiw5OC42ODUgOTQuMjgyLDExMy42ODMgOTQuMjgyLDExMy42ODMgTDcwLjE2Nyw5OS43NjEgTDE0NS42ODUsNTYuMTYxIiBpZD0iRmlsbC0xMSIgZmlsbD0iI0ZGRkZGRiI+PC9wYXRoPgogICAgICAgICAgICAgICAgICAgIDxwYXRoIGQ9Ik05NC4yODIsMTEzLjgxOCBMOTQuMjIzLDExMy43ODUgTDY5LjkzMyw5OS43NjEgTDcwLjEwOCw5OS42NiBMMTQ1LjY4NSw1Ni4wMjYgTDE0NS43NDMsNTYuMDU5IEwxNzAuMDMzLDcwLjA4MyBMMTQzLjg0Miw4NS4yMDUgTDE0My43OTcsODUuMTk1IEMxNDMuNzcyLDg1LjE5IDE0Mi4zMzYsODQuODg4IDE0Mi4zMzYsODQuODg4IEMxMzUuNzg3LDgyLjcxNCAxMjguNzIzLDgxLjE2MyAxMjEuMzI3LDgwLjI3NCBDMTIwLjc4OCw4MC4yMDkgMTIwLjIzNiw4MC4xNzcgMTE5LjY4OSw4MC4xNzcgQzExNS45MzEsODAuMTc3IDExMi42MzUsODEuNzA4IDExMS44NTIsODMuODE5IEMxMTEuNjI0LDg0LjQzMiAxMTEuNjIxLDg1LjA1MyAxMTEuODQyLDg1LjY2NyBDMTEzLjM3Nyw4OS45MjUgMTE2LjA1OCw5My45OTMgMTE5LjgxLDk3Ljc1OCBMMTE5LjgyNiw5Ny43NzkgTDEyMC4zNTIsOTguNjE0IEMxMjAuMzU0LDk4LjYxNyAxMjAuMzU2LDk4LjYyIDEyMC4zNTgsOTguNjI0IEwxMjAuNDIyLDk4LjcyNiBMMTIwLjMxNyw5OC43ODcgQzEyMC4yNjQsOTguODE4IDk0LjU5OSwxMTMuNjM1IDk0LjM0LDExMy43ODUgTDk0LjI4MiwxMTMuODE4IEw5NC4yODIsMTEzLjgxOCBaIE03MC40MDEsOTkuNzYxIEw5NC4yODIsMTEzLjU0OSBMMTE5LjA4NCw5OS4yMjkgQzExOS42Myw5OC45MTQgMTE5LjkzLDk4Ljc0IDEyMC4xMDEsOTguNjU0IEwxMTkuNjM1LDk3LjkxNCBDMTE1Ljg2NCw5NC4xMjcgMTEzLjE2OCw5MC4wMzMgMTExLjYyMiw4NS43NDYgQzExMS4zODIsODUuMDc5IDExMS4zODYsODQuNDA0IDExMS42MzMsODMuNzM4IEMxMTIuNDQ4LDgxLjUzOSAxMTUuODM2LDc5Ljk0MyAxMTkuNjg5LDc5Ljk0MyBDMTIwLjI0Niw3OS45NDMgMTIwLjgwNiw3OS45NzYgMTIxLjM1NSw4MC4wNDIgQzEyOC43NjcsODAuOTMzIDEzNS44NDYsODIuNDg3IDE0Mi4zOTYsODQuNjYzIEMxNDMuMjMyLDg0LjgzOCAxNDMuNjExLDg0LjkxNyAxNDMuNzg2LDg0Ljk2NyBMMTY5LjU2Niw3MC4wODMgTDE0NS42ODUsNTYuMjk1IEw3MC40MDEsOTkuNzYxIEw3MC40MDEsOTkuNzYxIFoiIGlkPSJGaWxsLTEyIiBmaWxsPSIjNjA3RDhCIj48L3BhdGg+CiAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTE2Ny4yMywxOC45NzkgTDE2Ny4yMyw2OS44NSBMMTM5LjkwOSw4NS42MjMgTDEzMy40NDgsNzEuNDU2IEMxMzIuNTM4LDY5LjQ2IDEzMC4wMiw2OS43MTggMTI3LjgyNCw3Mi4wMyBDMTI2Ljc2OSw3My4xNCAxMjUuOTMxLDc0LjU4NSAxMjUuNDk0LDc2LjA0OCBMMTE5LjAzNCw5Ny42NzYgTDkxLjcxMiwxMTMuNDUgTDkxLjcxMiw2Mi41NzkgTDE2Ny4yMywxOC45NzkiIGlkPSJGaWxsLTEzIiBmaWxsPSIjRkZGRkZGIj48L3BhdGg+CiAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTkxLjcxMiwxMTMuNTY3IEM5MS42OTIsMTEzLjU2NyA5MS42NzIsMTEzLjU2MSA5MS42NTMsMTEzLjU1MSBDOTEuNjE4LDExMy41MyA5MS41OTUsMTEzLjQ5MiA5MS41OTUsMTEzLjQ1IEw5MS41OTUsNjIuNTc5IEM5MS41OTUsNjIuNTM3IDkxLjYxOCw2Mi40OTkgOTEuNjUzLDYyLjQ3OCBMMTY3LjE3MiwxOC44NzggQzE2Ny4yMDgsMTguODU3IDE2Ny4yNTIsMTguODU3IDE2Ny4yODgsMTguODc4IEMxNjcuMzI0LDE4Ljg5OSAxNjcuMzQ3LDE4LjkzNyAxNjcuMzQ3LDE4Ljk3OSBMMTY3LjM0Nyw2OS44NSBDMTY3LjM0Nyw2OS44OTEgMTY3LjMyNCw2OS45MyAxNjcuMjg4LDY5Ljk1IEwxMzkuOTY3LDg1LjcyNSBDMTM5LjkzOSw4NS43NDEgMTM5LjkwNSw4NS43NDUgMTM5Ljg3Myw4NS43MzUgQzEzOS44NDIsODUuNzI1IDEzOS44MTYsODUuNzAyIDEzOS44MDIsODUuNjcyIEwxMzMuMzQyLDcxLjUwNCBDMTMyLjk2Nyw3MC42ODIgMTMyLjI4LDcwLjIyOSAxMzEuNDA4LDcwLjIyOSBDMTMwLjMxOSw3MC4yMjkgMTI5LjA0NCw3MC45MTUgMTI3LjkwOCw3Mi4xMSBDMTI2Ljg3NCw3My4yIDEyNi4wMzQsNzQuNjQ3IDEyNS42MDYsNzYuMDgyIEwxMTkuMTQ2LDk3LjcwOSBDMTE5LjEzNyw5Ny43MzggMTE5LjExOCw5Ny43NjIgMTE5LjA5Miw5Ny43NzcgTDkxLjc3LDExMy41NTEgQzkxLjc1MiwxMTMuNTYxIDkxLjczMiwxMTMuNTY3IDkxLjcxMiwxMTMuNTY3IEw5MS43MTIsMTEzLjU2NyBaIE05MS44MjksNjIuNjQ3IEw5MS44MjksMTEzLjI0OCBMMTE4LjkzNSw5Ny41OTggTDEyNS4zODIsNzYuMDE1IEMxMjUuODI3LDc0LjUyNSAxMjYuNjY0LDczLjA4MSAxMjcuNzM5LDcxLjk1IEM
1xMjguOTE5LDcwLjcwOCAxMzAuMjU2LDY5Ljk5NiAxMzEuNDA4LDY5Ljk5NiBDMTMyLjM3Nyw2OS45OTYgMTMzLjEzOSw3MC40OTcgMTMzLjU1NCw3MS40MDcgTDEzOS45NjEsODUuNDU4IEwxNjcuMTEzLDY5Ljc4MiBMMTY3LjExMywxOS4xODEgTDkxLjgyOSw2Mi42NDcgTDkxLjgyOSw2Mi42NDcgWiIgaWQ9IkZpbGwtMTQiIGZpbGw9IiM2MDdEOEIiPjwvcGF0aD4KICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNMTY4LjU0MywxOS4yMTMgTDE2OC41NDMsNzAuMDgzIEwxNDEuMjIxLDg1Ljg1NyBMMTM0Ljc2MSw3MS42ODkgQzEzMy44NTEsNjkuNjk0IDEzMS4zMzMsNjkuOTUxIDEyOS4xMzcsNzIuMjYzIEMxMjguMDgyLDczLjM3NCAxMjcuMjQ0LDc0LjgxOSAxMjYuODA3LDc2LjI4MiBMMTIwLjM0Niw5Ny45MDkgTDkzLjAyNSwxMTMuNjgzIEw5My4wMjUsNjIuODEzIEwxNjguNTQzLDE5LjIxMyIgaWQ9IkZpbGwtMTUiIGZpbGw9IiNGRkZGRkYiPjwvcGF0aD4KICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNOTMuMDI1LDExMy44IEM5My4wMDUsMTEzLjggOTIuOTg0LDExMy43OTUgOTIuOTY2LDExMy43ODUgQzkyLjkzMSwxMTMuNzY0IDkyLjkwOCwxMTMuNzI1IDkyLjkwOCwxMTMuNjg0IEw5Mi45MDgsNjIuODEzIEM5Mi45MDgsNjIuNzcxIDkyLjkzMSw2Mi43MzMgOTIuOTY2LDYyLjcxMiBMMTY4LjQ4NCwxOS4xMTIgQzE2OC41MiwxOS4wOSAxNjguNTY1LDE5LjA5IDE2OC42MDEsMTkuMTEyIEMxNjguNjM3LDE5LjEzMiAxNjguNjYsMTkuMTcxIDE2OC42NiwxOS4yMTIgTDE2OC42Niw3MC4wODMgQzE2OC42Niw3MC4xMjUgMTY4LjYzNyw3MC4xNjQgMTY4LjYwMSw3MC4xODQgTDE0MS4yOCw4NS45NTggQzE0MS4yNTEsODUuOTc1IDE0MS4yMTcsODUuOTc5IDE0MS4xODYsODUuOTY4IEMxNDEuMTU0LDg1Ljk1OCAxNDEuMTI5LDg1LjkzNiAxNDEuMTE1LDg1LjkwNiBMMTM0LjY1NSw3MS43MzggQzEzNC4yOCw3MC45MTUgMTMzLjU5Myw3MC40NjMgMTMyLjcyLDcwLjQ2MyBDMTMxLjYzMiw3MC40NjMgMTMwLjM1Nyw3MS4xNDggMTI5LjIyMSw3Mi4zNDQgQzEyOC4xODYsNzMuNDMzIDEyNy4zNDcsNzQuODgxIDEyNi45MTksNzYuMzE1IEwxMjAuNDU4LDk3Ljk0MyBDMTIwLjQ1LDk3Ljk3MiAxMjAuNDMxLDk3Ljk5NiAxMjAuNDA1LDk4LjAxIEw5My4wODMsMTEzLjc4NSBDOTMuMDY1LDExMy43OTUgOTMuMDQ1LDExMy44IDkzLjAyNSwxMTMuOCBMOTMuMDI1LDExMy44IFogTTkzLjE0Miw2Mi44ODEgTDkzLjE0MiwxMTMuNDgxIEwxMjAuMjQ4LDk3LjgzMiBMMTI2LjY5NSw3Ni4yNDggQzEyNy4xNCw3NC43NTggMTI3Ljk3Nyw3My4zMTUgMTI5LjA1Miw3Mi4xODMgQzEzMC4yMzEsNzAuOTQyIDEzMS41NjgsNzAuMjI5IDEzMi43Miw3MC4yMjkgQzEzMy42ODksNzAuMjI5IDEzNC40NTIsNzAuNzMxIDEzNC44NjcsNzEuNjQxIEwxNDEuMjc0LDg1LjY5MiBMMTY4LjQyNiw3MC4wMTYgTDE2OC40MjYsMTkuNDE1IEw5My4xNDIsNjIuODgxIEw5My4xNDIsNjIuODgxIFoiIGlkPSJGaWxsLTE2IiBmaWxsPSIjNjA3RDhCIj48L3BhdGg+CiAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTE2OS44LDcwLjA4MyBMMTQyLjQ3OCw4NS44NTcgTDEzNi4wMTgsNzEuNjg5IEMxMzUuMTA4LDY5LjY5NCAxMzIuNTksNjkuOTUxIDEzMC4zOTMsNzIuMjYzIEMxMjkuMzM5LDczLjM3NCAxMjguNSw3NC44MTkgMTI4LjA2NCw3Ni4yODIgTDEyMS42MDMsOTcuOTA5IEw5NC4yODIsMTEzLjY4MyBMOTQuMjgyLDYyLjgxMyBMMTY5LjgsMTkuMjEzIEwxNjkuOCw3MC4wODMgWiIgaWQ9IkZpbGwtMTciIGZpbGw9IiNGQUZBRkEiPjwvcGF0aD4KICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNOTQuMjgyLDExMy45MTcgQzk0LjI0MSwxMTMuOTE3IDk0LjIwMSwxMTMuOTA3IDk0LjE2NSwxMTMuODg2IEM5NC4wOTMsMTEzLjg0NSA5NC4wNDgsMTEzLjc2NyA5NC4wNDgsMTEzLjY4NCBMOTQuMDQ4LDYyLjgxMyBDOTQuMDQ4LDYyLjczIDk0LjA5Myw2Mi42NTIgOTQuMTY1LDYyLjYxMSBMMTY5LjY4MywxOS4wMSBDMTY5Ljc1NSwxOC45NjkgMTY5Ljg0NCwxOC45NjkgMTY5LjkxNywxOS4wMSBDMTY5Ljk4OSwxOS4wNTIgMTcwLjAzMywxOS4xMjkgMTcwLjAzMywxOS4yMTIgTDE3MC4wMzMsNzAuMDgzIEMxNzAuMDMzLDcwLjE2NiAxNjkuOTg5LDcwLjI0NCAxNjkuOTE3LDcwLjI4NSBMMTQyLjU5NSw4Ni4wNiBDMTQyLjUzOCw4Ni4wOTIgMTQyLjQ2OSw4Ni4xIDE0Mi40MDcsODYuMDggQzE0Mi4zNDQsODYuMDYgMTQyLjI5Myw4Ni4wMTQgMTQyLjI2Niw4NS45NTQgTDEzNS44MDUsNzEuNzg2IEMxMzUuNDQ1LDcwLjk5NyAxMzQuODEzLDcwLjU4IDEzMy45NzcsNzAuNTggQzEzMi45MjEsNzAuNTggMTMxLjY3Niw3MS4yNTIgMTMwLjU2Miw3Mi40MjQgQzEyOS41NCw3My41MDEgMTI4LjcxMSw3NC45MzEgMTI4LjI4Nyw3Ni4zNDggTDEyMS44MjcsOTcuOTc2IEMxMjEuODEsOTguMDM0IDEyMS43NzEsOTguMDgyIDEyMS43Miw5OC4xMTIgTDk0LjM5OCwxMTMuODg2IEM5NC4zNjIsMTEzLjkwNyA5NC4zMjIsMTEzLjkxNyA5NC4yODIsMTEzLjkxNyBMOTQuMjgyLDExMy45MTcgWiBNOTQuNTE1LDYyLjk0OCBMOTQuNTE1LDExMy4yNzkgTDEyMS40MDYsOTcuNzU0IEwxMjcuODQsNzYuMjE1IEMxMjguMjksNzQuNzA4IDEyOS4xMzcsNzMuMjQ3IDEzMC4yMjQsNzIuMTAzIEMxMzEuNDI1LDcwLjgzOCAxMzIuNzkzLDcwLjExMiAxMzMuOTc3LDcwLjExMiBDMTM0Ljk5NSw3MC4xMTIgMTM1Ljc5NSw3MC42MzggMTM2LjIzLDcxLjU5MiBMMTQyLjU4NCw4NS41MjYgTDE2OS41NjYsNjkuOTQ4IEwxNjkuNTY2LDE5LjYxNyBMOTQuNTE1LDYyLjk0OCBMOTQuNTE1LDYyLjk0OCBaIiBpZD0iRmlsbC0xOCIgZmlsbD0iIzYwN0Q4QiI+PC9wYXRoPgogICAgICAgICAgICAgICAgICAgIDxwYXRoIGQ9Ik0xMDkuODk0LDkyLjk0MyBMMTA5Ljg5NCw5Mi45NDMgQzEwOC4xMiw5Mi45NDMgMTA2LjY1Myw5Mi4yMTggMTA1LjY1LDkwLjgyMyBDMTA1LjU4Myw5MC43MzEgMTA1LjU5Myw5MC42MSAxMDUuNjczLDkwLjUyOSBDMTA1Ljc1Myw5MC40NDggMTA1Ljg4LDkwLjQ0IDEwNS45NzQsOTAuNTA2IEMxMDYuNzU0LDkxLjA1MyAxMDcuNjc5LDkxLjMzMyAxMDguNzI0LDkxLjMzMyBDMTEwLjA0Nyw5MS4zMzMgMTExLjQ3OCw5MC44OTQgMTEyLjk4LDkwLjAyNyBDMTE4LjI5MSw4Ni45NiAxMjIuNjExLDc5LjUwOSAxMjIuNjExLDczLjQxNiBDMTIyLjYxMSw3MS40ODkgMTIyLjE2OSw2OS44NTYgMTIxLjMzMyw2OC42OTIgQzEyMS4yNjYsNjguNiAxMjEuMjc2LDY4LjQ3MyAxMjEuMzU2LDY4LjM5MiBDMTIxLjQzNiw2OC4zMTEgMTIxLjU2Myw2OC4yOTkgMTIxLjY1Niw2OC4zNjUgQzEyMy4zMjcsNjkuNTM3IDEyNC4yNDcsNzEuNzQ2IDEyNC4yNDcsNzQuNTg0IEMxMjQuMjQ3LDgwLjgyNiAxMTkuODIxLDg4LjQ0NyAxMTQuMzgyLDkxLjU4NyBDMTEyLjgwOCw5Mi40OTUgMTExLjI5OCw5Mi45NDMgMTA5Ljg5NCw5Mi45NDMgTDEwOS44OTQsOTIuOTQzIFogTTEwNi45MjUsOTEuNDAxIEMxMDcuNzM4LDkyLjA1MiAxMDguNzQ1LDkyLjI3OCAxMDkuODkzLDkyLjI3OCBMMTA5Ljg5NCw5Mi4yNzggQzExMS4y
1MTUsOTIuMjc4IDExMi42NDcsOTEuOTUxIDExNC4xNDgsOTEuMDg0IEMxMTkuNDU5LDg4LjAxNyAxMjMuNzgsODAuNjIxIDEyMy43OCw3NC41MjggQzEyMy43OCw3Mi41NDkgMTIzLjMxNyw3MC45MjkgMTIyLjQ1NCw2OS43NjcgQzEyMi44NjUsNzAuODAyIDEyMy4wNzksNzIuMDQyIDEyMy4wNzksNzMuNDAyIEMxMjMuMDc5LDc5LjY0NSAxMTguNjUzLDg3LjI4NSAxMTMuMjE0LDkwLjQyNSBDMTExLjY0LDkxLjMzNCAxMTAuMTMsOTEuNzQyIDEwOC43MjQsOTEuNzQyIEMxMDguMDgzLDkxLjc0MiAxMDcuNDgxLDkxLjU5MyAxMDYuOTI1LDkxLjQwMSBMMTA2LjkyNSw5MS40MDEgWiIgaWQ9IkZpbGwtMTkiIGZpbGw9IiM2MDdEOEIiPjwvcGF0aD4KICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNMTEzLjA5Nyw5MC4yMyBDMTE4LjQ4MSw4Ny4xMjIgMTIyLjg0NSw3OS41OTQgMTIyLjg0NSw3My40MTYgQzEyMi44NDUsNzEuMzY1IDEyMi4zNjIsNjkuNzI0IDEyMS41MjIsNjguNTU2IEMxMTkuNzM4LDY3LjMwNCAxMTcuMTQ4LDY3LjM2MiAxMTQuMjY1LDY5LjAyNiBDMTA4Ljg4MSw3Mi4xMzQgMTA0LjUxNyw3OS42NjIgMTA0LjUxNyw4NS44NCBDMTA0LjUxNyw4Ny44OTEgMTA1LDg5LjUzMiAxMDUuODQsOTAuNyBDMTA3LjYyNCw5MS45NTIgMTEwLjIxNCw5MS44OTQgMTEzLjA5Nyw5MC4yMyIgaWQ9IkZpbGwtMjAiIGZpbGw9IiNGQUZBRkEiPjwvcGF0aD4KICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNMTA4LjcyNCw5MS42MTQgTDEwOC43MjQsOTEuNjE0IEMxMDcuNTgyLDkxLjYxNCAxMDYuNTY2LDkxLjQwMSAxMDUuNzA1LDkwLjc5NyBDMTA1LjY4NCw5MC43ODMgMTA1LjY2NSw5MC44MTEgMTA1LjY1LDkwLjc5IEMxMDQuNzU2LDg5LjU0NiAxMDQuMjgzLDg3Ljg0MiAxMDQuMjgzLDg1LjgxNyBDMTA0LjI4Myw3OS41NzUgMTA4LjcwOSw3MS45NTMgMTE0LjE0OCw2OC44MTIgQzExNS43MjIsNjcuOTA0IDExNy4yMzIsNjcuNDQ5IDExOC42MzgsNjcuNDQ5IEMxMTkuNzgsNjcuNDQ5IDEyMC43OTYsNjcuNzU4IDEyMS42NTYsNjguMzYyIEMxMjEuNjc4LDY4LjM3NyAxMjEuNjk3LDY4LjM5NyAxMjEuNzEyLDY4LjQxOCBDMTIyLjYwNiw2OS42NjIgMTIzLjA3OSw3MS4zOSAxMjMuMDc5LDczLjQxNSBDMTIzLjA3OSw3OS42NTggMTE4LjY1Myw4Ny4xOTggMTEzLjIxNCw5MC4zMzggQzExMS42NCw5MS4yNDcgMTEwLjEzLDkxLjYxNCAxMDguNzI0LDkxLjYxNCBMMTA4LjcyNCw5MS42MTQgWiBNMTA2LjAwNiw5MC41MDUgQzEwNi43OCw5MS4wMzcgMTA3LjY5NCw5MS4yODEgMTA4LjcyNCw5MS4yODEgQzExMC4wNDcsOTEuMjgxIDExMS40NzgsOTAuODY4IDExMi45OCw5MC4wMDEgQzExOC4yOTEsODYuOTM1IDEyMi42MTEsNzkuNDk2IDEyMi42MTEsNzMuNDAzIEMxMjIuNjExLDcxLjQ5NCAxMjIuMTc3LDY5Ljg4IDEyMS4zNTYsNjguNzE4IEMxMjAuNTgyLDY4LjE4NSAxMTkuNjY4LDY3LjkxOSAxMTguNjM4LDY3LjkxOSBDMTE3LjMxNSw2Ny45MTkgMTE1Ljg4Myw2OC4zNiAxMTQuMzgyLDY5LjIyNyBDMTA5LjA3MSw3Mi4yOTMgMTA0Ljc1MSw3OS43MzMgMTA0Ljc1MSw4NS44MjYgQzEwNC43NTEsODcuNzM1IDEwNS4xODUsODkuMzQzIDEwNi4wMDYsOTAuNTA1IEwxMDYuMDA2LDkwLjUwNSBaIiBpZD0iRmlsbC0yMSIgZmlsbD0iIzYwN0Q4QiI+PC9wYXRoPgogICAgICAgICAgICAgICAgICAgIDxwYXRoIGQ9Ik0xNDkuMzE4LDcuMjYyIEwxMzkuMzM0LDE2LjE0IEwxNTUuMjI3LDI3LjE3MSBMMTYwLjgxNiwyMS4wNTkgTDE0OS4zMTgsNy4yNjIiIGlkPSJGaWxsLTIyIiBmaWxsPSIjRkFGQUZBIj48L3BhdGg+CiAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTE2OS42NzYsMTMuODQgTDE1OS45MjgsMTkuNDY3IEMxNTYuMjg2LDIxLjU3IDE1MC40LDIxLjU4IDE0Ni43ODEsMTkuNDkxIEMxNDMuMTYxLDE3LjQwMiAxNDMuMTgsMTQuMDAzIDE0Ni44MjIsMTEuOSBMMTU2LjMxNyw2LjI5MiBMMTQ5LjU4OCwyLjQwNyBMNjcuNzUyLDQ5LjQ3OCBMMTEzLjY3NSw3NS45OTIgTDExNi43NTYsNzQuMjEzIEMxMTcuMzg3LDczLjg0OCAxMTcuNjI1LDczLjMxNSAxMTcuMzc0LDcyLjgyMyBDMTE1LjAxNyw2OC4xOTEgMTE0Ljc4MSw2My4yNzcgMTE2LjY5MSw1OC41NjEgQzEyMi4zMjksNDQuNjQxIDE0MS4yLDMzLjc0NiAxNjUuMzA5LDMwLjQ5MSBDMTczLjQ3OCwyOS4zODggMTgxLjk4OSwyOS41MjQgMTkwLjAxMywzMC44ODUgQzE5MC44NjUsMzEuMDMgMTkxLjc4OSwzMC44OTMgMTkyLjQyLDMwLjUyOCBMMTk1LjUwMSwyOC43NSBMMTY5LjY3NiwxMy44NCIgaWQ9IkZpbGwtMjMiIGZpbGw9IiNGQUZBRkEiPjwvcGF0aD4KICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNMTEzLjY3NSw3Ni40NTkgQzExMy41OTQsNzYuNDU5IDExMy41MTQsNzYuNDM4IDExMy40NDIsNzYuMzk3IEw2Ny41MTgsNDkuODgyIEM2Ny4zNzQsNDkuNzk5IDY3LjI4NCw0OS42NDUgNjcuMjg1LDQ5LjQ3OCBDNjcuMjg1LDQ5LjMxMSA2Ny4zNzQsNDkuMTU3IDY3LjUxOSw0OS4wNzMgTDE0OS4zNTUsMi4wMDIgQzE0OS40OTksMS45MTkgMTQ5LjY3NywxLjkxOSAxNDkuODIxLDIuMDAyIEwxNTYuNTUsNS44ODcgQzE1Ni43NzQsNi4wMTcgMTU2Ljg1LDYuMzAyIDE1Ni43MjIsNi41MjYgQzE1Ni41OTIsNi43NDkgMTU2LjMwNyw2LjgyNiAxNTYuMDgzLDYuNjk2IEwxNDkuNTg3LDIuOTQ2IEw2OC42ODcsNDkuNDc5IEwxMTMuNjc1LDc1LjQ1MiBMMTE2LjUyMyw3My44MDggQzExNi43MTUsNzMuNjk3IDExNy4xNDMsNzMuMzk5IDExNi45NTgsNzMuMDM1IEMxMTQuNTQyLDY4LjI4NyAxMTQuMyw2My4yMjEgMTE2LjI1OCw1OC4zODUgQzExOS4wNjQsNTEuNDU4IDEyNS4xNDMsNDUuMTQzIDEzMy44NCw0MC4xMjIgQzE0Mi40OTcsMzUuMTI0IDE1My4zNTgsMzEuNjMzIDE2NS4yNDcsMzAuMDI4IEMxNzMuNDQ1LDI4LjkyMSAxODIuMDM3LDI5LjA1OCAxOTAuMDkxLDMwLjQyNSBDMTkwLjgzLDMwLjU1IDE5MS42NTIsMzAuNDMyIDE5Mi4xODYsMzAuMTI0IEwxOTQuNTY3LDI4Ljc1IEwxNjkuNDQyLDE0LjI0NCBDMTY5LjIxOSwxNC4xMTUgMTY5LjE0MiwxMy44MjkgMTY5LjI3MSwxMy42MDYgQzE2OS40LDEzLjM4MiAxNjkuNjg1LDEzLjMwNiAxNjkuOTA5LDEzLjQzNSBMMTk1LjczNCwyOC4zNDUgQzE5NS44NzksMjguNDI4IDE5NS45NjgsMjguNTgzIDE5NS45NjgsMjguNzUgQzE5NS45NjgsMjguOTE2IDE5NS44NzksMjkuMDcxIDE5NS43MzQsMjkuMTU0IEwxOTIuNjUzLDMwLjkzMyBDMTkxLjkzMiwzMS4zNSAxOTAuODksMzEuNTA4IDE4OS45MzUsMzEuMzQ2IEMxODEuOTcyLDI5Ljk5NSAxNzMuNDc4LDI5Ljg2IDE2NS4zNzIsMzAuOTU0IEMxNTMuNjAyLDMyLjU0MyAxNDIuODYsMzUuOTkzIDEzNC4zMDcsNDAuOTMxIEMxMjUuNzkzLDQ1Ljg0NyAxMTkuODUxLDUyLjAwNCAxMTcuMTI0LDU4LjczNiBDMTE1LjI3LDYzLjMxNCAxMTUuNTAxLDY4LjExMiAxMTcuNzksNzIuNjExIEMxMTguMTYsNzMuMzM2IDExNy44NDUsNzQuMTI0IDExNi45OSw3NC42MTcgTDExMy45MDksNzYuMzk3IEMxMTMuODM2LDc2LjQzOCAxMTMuNzU2LDc2LjQ1OSAxMTMuNjc1LDc2LjQ1OSIgaWQ9IkZpbGwtMjQiIGZpbGw9IiM0NTVBNjQiPjwvcGF0aD4KICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNMTUzLjMxNiwyMS4yNzkgQzE1MC45MDMsMjEuMjc5IDE0OC40OTUsMjAuNzUxIDE0Ni42NjQsMTkuNjkzIEMxNDQuODQ2LDE4LjY0NCAxNDMuODQ0LDE3LjIzMiAxNDMuODQ0LDE1LjcxOCBDMTQzLjg0NCwxNC4xOTEgMTQ0Ljg2LDEyLjc2MyAxNDYuNzA1LDExLjY5OCBMMTU2LjE5OCw2LjA5MSBDMTU2LjMwOSw2LjAyNSAxNTYuNDUyLDYuMDYyIDE1Ni41MTgsNi4xNzMgQzE1Ni41ODMsNi4yODQgMTU2LjU0Nyw2LjQyNyAxNTYuNDM2LDYuNDkzIEwxNDYuOTQsMTIuMTAyIEMxNDUuMjQ0LDEzLjA4MSAxNDQuMzEyLDE0LjM2NSAxNDQuMzEyLDE1LjcxOCBDMTQ0LjMxMiwxNy4wNTggMTQ1LjIzL
1DE4LjMyNiAxNDYuODk3LDE5LjI4OSBDMTUwLjQ0NiwyMS4zMzggMTU2LjI0LDIxLjMyNyAxNTkuODExLDE5LjI2NSBMMTY5LjU1OSwxMy42MzcgQzE2OS42NywxMy41NzMgMTY5LjgxMywxMy42MTEgMTY5Ljg3OCwxMy43MjMgQzE2OS45NDMsMTMuODM0IDE2OS45MDQsMTMuOTc3IDE2OS43OTMsMTQuMDQyIEwxNjAuMDQ1LDE5LjY3IEMxNTguMTg3LDIwLjc0MiAxNTUuNzQ5LDIxLjI3OSAxNTMuMzE2LDIxLjI3OSIgaWQ9IkZpbGwtMjUiIGZpbGw9IiM2MDdEOEIiPjwvcGF0aD4KICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNMTEzLjY3NSw3NS45OTIgTDY3Ljc2Miw0OS40ODQiIGlkPSJGaWxsLTI2IiBmaWxsPSIjNDU1QTY0Ij48L3BhdGg+CiAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTExMy42NzUsNzYuMzQyIEMxMTMuNjE1LDc2LjM0MiAxMTMuNTU1LDc2LjMyNyAxMTMuNSw3Ni4yOTUgTDY3LjU4Nyw0OS43ODcgQzY3LjQxOSw0OS42OSA2Ny4zNjIsNDkuNDc2IDY3LjQ1OSw0OS4zMDkgQzY3LjU1Niw0OS4xNDEgNjcuNzcsNDkuMDgzIDY3LjkzNyw0OS4xOCBMMTEzLjg1LDc1LjY4OCBDMTE0LjAxOCw3NS43ODUgMTE0LjA3NSw3NiAxMTMuOTc4LDc2LjE2NyBDMTEzLjkxNCw3Ni4yNzkgMTEzLjc5Niw3Ni4zNDIgMTEzLjY3NSw3Ni4zNDIiIGlkPSJGaWxsLTI3IiBmaWxsPSIjNDU1QTY0Ij48L3BhdGg+CiAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTY3Ljc2Miw0OS40ODQgTDY3Ljc2MiwxMDMuNDg1IEM2Ny43NjIsMTA0LjU3NSA2OC41MzIsMTA1LjkwMyA2OS40ODIsMTA2LjQ1MiBMMTExLjk1NSwxMzAuOTczIEMxMTIuOTA1LDEzMS41MjIgMTEzLjY3NSwxMzEuMDgzIDExMy42NzUsMTI5Ljk5MyBMMTEzLjY3NSw3NS45OTIiIGlkPSJGaWxsLTI4IiBmaWxsPSIjRkFGQUZBIj48L3BhdGg+CiAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTExMi43MjcsMTMxLjU2MSBDMTEyLjQzLDEzMS41NjEgMTEyLjEwNywxMzEuNDY2IDExMS43OCwxMzEuMjc2IEw2OS4zMDcsMTA2Ljc1NSBDNjguMjQ0LDEwNi4xNDIgNjcuNDEyLDEwNC43MDUgNjcuNDEyLDEwMy40ODUgTDY3LjQxMiw0OS40ODQgQzY3LjQxMiw0OS4yOSA2Ny41NjksNDkuMTM0IDY3Ljc2Miw0OS4xMzQgQzY3Ljk1Niw0OS4xMzQgNjguMTEzLDQ5LjI5IDY4LjExMyw0OS40ODQgTDY4LjExMywxMDMuNDg1IEM2OC4xMTMsMTA0LjQ0NSA2OC44MiwxMDUuNjY1IDY5LjY1NywxMDYuMTQ4IEwxMTIuMTMsMTMwLjY3IEMxMTIuNDc0LDEzMC44NjggMTEyLjc5MSwxMzAuOTEzIDExMywxMzAuNzkyIEMxMTMuMjA2LDEzMC42NzMgMTEzLjMyNSwxMzAuMzgxIDExMy4zMjUsMTI5Ljk5MyBMMTEzLjMyNSw3NS45OTIgQzExMy4zMjUsNzUuNzk4IDExMy40ODIsNzUuNjQxIDExMy42NzUsNzUuNjQxIEMxMTMuODY5LDc1LjY0MSAxMTQuMDI1LDc1Ljc5OCAxMTQuMDI1LDc1Ljk5MiBMMTE0LjAyNSwxMjkuOTkzIEMxMTQuMDI1LDEzMC42NDggMTEzLjc4NiwxMzEuMTQ3IDExMy4zNSwxMzEuMzk5IEMxMTMuMTYyLDEzMS41MDcgMTEyLjk1MiwxMzEuNTYxIDExMi43MjcsMTMxLjU2MSIgaWQ9IkZpbGwtMjkiIGZpbGw9IiM0NTVBNjQiPjwvcGF0aD4KICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNMTEyLjg2LDQwLjUxMiBDMTEyLjg2LDQwLjUxMiAxMTIuODYsNDAuNTEyIDExMi44NTksNDAuNTEyIEMxMTAuNTQxLDQwLjUxMiAxMDguMzYsMzkuOTkgMTA2LjcxNywzOS4wNDEgQzEwNS4wMTIsMzguMDU3IDEwNC4wNzQsMzYuNzI2IDEwNC4wNzQsMzUuMjkyIEMxMDQuMDc0LDMzLjg0NyAxMDUuMDI2LDMyLjUwMSAxMDYuNzU0LDMxLjUwNCBMMTE4Ljc5NSwyNC41NTEgQzEyMC40NjMsMjMuNTg5IDEyMi42NjksMjMuMDU4IDEyNS4wMDcsMjMuMDU4IEMxMjcuMzI1LDIzLjA1OCAxMjkuNTA2LDIzLjU4MSAxMzEuMTUsMjQuNTMgQzEzMi44NTQsMjUuNTE0IDEzMy43OTMsMjYuODQ1IDEzMy43OTMsMjguMjc4IEMxMzMuNzkzLDI5LjcyNCAxMzIuODQxLDMxLjA2OSAxMzEuMTEzLDMyLjA2NyBMMTE5LjA3MSwzOS4wMTkgQzExNy40MDMsMzkuOTgyIDExNS4xOTcsNDAuNTEyIDExMi44Niw0MC41MTIgTDExMi44Niw0MC41MTIgWiBNMTI1LjAwNywyMy43NTkgQzEyMi43OSwyMy43NTkgMTIwLjcwOSwyNC4yNTYgMTE5LjE0NiwyNS4xNTggTDEwNy4xMDQsMzIuMTEgQzEwNS42MDIsMzIuOTc4IDEwNC43NzQsMzQuMTA4IDEwNC43NzQsMzUuMjkyIEMxMDQuNzc0LDM2LjQ2NSAxMDUuNTg5LDM3LjU4MSAxMDcuMDY3LDM4LjQzNCBDMTA4LjYwNSwzOS4zMjMgMTEwLjY2MywzOS44MTIgMTEyLjg1OSwzOS44MTIgTDExMi44NiwzOS44MTIgQzExNS4wNzYsMzkuODEyIDExNy4xNTgsMzkuMzE1IDExOC43MjEsMzguNDEzIEwxMzAuNzYyLDMxLjQ2IEMxMzIuMjY0LDMwLjU5MyAxMzMuMDkyLDI5LjQ2MyAxMzMuMDkyLDI4LjI3OCBDMTMzLjA5MiwyNy4xMDYgMTMyLjI3OCwyNS45OSAxMzAuOCwyNS4xMzYgQzEyOS4yNjEsMjQuMjQ4IDEyNy4yMDQsMjMuNzU5IDEyNS4wMDcsMjMuNzU5IEwxMjUuMDA3LDIzLjc1OSBaIiBpZD0iRmlsbC0zMCIgZmlsbD0iIzYwN0Q4QiI+PC9wYXRoPgogICAgICAgICAgICAgICAgICAgIDxwYXRoIGQ9Ik0xNjUuNjMsMTYuMjE5IEwxNTkuODk2LDE5LjUzIEMxNTYuNzI5LDIxLjM1OCAxNTEuNjEsMjEuMzY3IDE0OC40NjMsMTkuNTUgQzE0NS4zMTYsMTcuNzMzIDE0NS4zMzIsMTQuNzc4IDE0OC40OTksMTIuOTQ5IEwxNTQuMjMzLDkuNjM5IEwxNjUuNjMsMTYuMjE5IiBpZD0iRmlsbC0zMSIgZmlsbD0iI0ZBRkFGQSI+PC9wYXRoPgogICAgICAgICAgICAgICAgICAgIDxwYXRoIGQ9Ik0xNTQuMjMzLDEwLjQ0OCBMMTY0LjIyOCwxNi4yMTkgTDE1OS41NDYsMTguOTIzIEMxNTguMTEyLDE
15Ljc1IDE1Ni4xOTQsMjAuMjA2IDE1NC4xNDcsMjAuMjA2IEMxNTIuMTE4LDIwLjIwNiAxNTAuMjI0LDE5Ljc1NyAxNDguODE0LDE4Ljk0MyBDMTQ3LjUyNCwxOC4xOTkgMTQ2LjgxNCwxNy4yNDkgMTQ2LjgxNCwxNi4yNjkgQzE0Ni44MTQsMTUuMjc4IDE0Ny41MzcsMTQuMzE0IDE0OC44NSwxMy41NTYgTDE1NC4yMzMsMTAuNDQ4IE0xNTQuMjMzLDkuNjM5IEwxNDguNDk5LDEyLjk0OSBDMTQ1LjMzMiwxNC43NzggMTQ1LjMxNiwxNy43MzMgMTQ4LjQ2MywxOS41NSBDMTUwLjAzMSwyMC40NTUgMTUyLjA4NiwyMC45MDcgMTU0LjE0NywyMC45MDcgQzE1Ni4yMjQsMjAuOTA3IDE1OC4zMDYsMjAuNDQ3IDE1OS44OTYsMTkuNTMgTDE2NS42MywxNi4yMTkgTDE1NC4yMzMsOS42MzkiIGlkPSJGaWxsLTMyIiBmaWxsPSIjNjA3RDhCIj48L3BhdGg+CiAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTE0NS40NDUsNzIuNjY3IEwxNDUuNDQ1LDcyLjY2NyBDMTQzLjY3Miw3Mi42NjcgMTQyLjIwNCw3MS44MTcgMTQxLjIwMiw3MC40MjIgQzE0MS4xMzUsNzAuMzMgMTQxLjE0NSw3MC4xNDcgMTQxLjIyNSw3MC4wNjYgQzE0MS4zMDUsNjkuOTg1IDE0MS40MzIsNjkuOTQ2IDE0MS41MjUsNzAuMDExIEMxNDIuMzA2LDcwLjU1OSAxNDMuMjMxLDcwLjgyMyAxNDQuMjc2LDcwLjgyMiBDMTQ1LjU5OCw3MC44MjIgMTQ3LjAzLDcwLjM3NiAxNDguNTMyLDY5LjUwOSBDMTUzLjg0Miw2Ni40NDMgMTU4LjE2Myw1OC45ODcgMTU4LjE2Myw1Mi44OTQgQzE1OC4xNjMsNTAuOTY3IDE1Ny43MjEsNDkuMzMyIDE1Ni44ODQsNDguMTY4IEMxNTYuODE4LDQ4LjA3NiAxNTYuODI4LDQ3Ljk0OCAxNTYuOTA4LDQ3Ljg2NyBDMTU2Ljk4OCw0Ny43ODYgMTU3LjExNCw0Ny43NzQgMTU3LjIwOCw0Ny44NCBDMTU4Ljg3OCw0OS4wMTIgMTU5Ljc5OCw1MS4yMiAxNTkuNzk4LDU0LjA1OSBDMTU5Ljc5OCw2MC4zMDEgMTU1LjM3Myw2OC4wNDYgMTQ5LjkzMyw3MS4xODYgQzE0OC4zNiw3Mi4wOTQgMTQ2Ljg1LDcyLjY2NyAxNDUuNDQ1LDcyLjY2NyBMMTQ1LjQ0NSw3Mi42NjcgWiBNMTQyLjQ3Niw3MSBDMTQzLjI5LDcxLjY1MSAxNDQuMjk2LDcyLjAwMiAxNDUuNDQ1LDcyLjAwMiBDMTQ2Ljc2Nyw3Mi4wMDIgMTQ4LjE5OCw3MS41NSAxNDkuNyw3MC42ODIgQzE1NS4wMSw2Ny42MTcgMTU5LjMzMSw2MC4xNTkgMTU5LjMzMSw1NC4wNjUgQzE1OS4zMzEsNTIuMDg1IDE1OC44NjgsNTAuNDM1IDE1OC4wMDYsNDkuMjcyIEMxNTguNDE3LDUwLjMwNyAxNTguNjMsNTEuNTMyIDE1OC42Myw1Mi44OTIgQzE1OC42Myw1OS4xMzQgMTU0LjIwNSw2Ni43NjcgMTQ4Ljc2NSw2OS45MDcgQzE0Ny4xOTIsNzAuODE2IDE0NS42ODEsNzEuMjgzIDE0NC4yNzYsNzEuMjgzIEMxNDMuNjM0LDcxLjI4MyAxNDMuMDMzLDcxLjE5MiAxNDIuNDc2LDcxIEwxNDIuNDc2LDcxIFoiIGlkPSJGaWxsLTMzIiBmaWxsPSIjNjA3RDhCIj48L3BhdGg+CiAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTE0OC42NDgsNjkuNzA0IEMxNTQuMDMyLDY2LjU5NiAxNTguMzk2LDU5LjA2OCAxNTguMzk2LDUyLjg5MSBDMTU4LjM5Niw1MC44MzkgMTU3LjkxMyw0OS4xOTggMTU3LjA3NCw0OC4wMyBDMTU1LjI4OSw0Ni43NzggMTUyLjY5OSw0Ni44MzYgMTQ5LjgxNiw0OC41MDEgQzE0NC40MzMsNTEuNjA5IDE0MC4wNjgsNTkuMTM3IDE0MC4wNjgsNjUuMzE0IEMxNDAuMDY4LDY3LjM2NSAxNDAuNTUyLDY5LjAwNiAxNDEuMzkxLDcwLjE3NCBDMTQzLjE3Niw3MS40MjcgMTQ1Ljc2NSw3MS4zNjkgMTQ4LjY0OCw2OS43MDQiIGlkPSJGaWxsLTM0IiBmaWxsPSIjRkFGQUZBIj48L3BhdGg+CiAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTE0NC4yNzYsNzEuMjc2IEwxNDQuMjc2LDcxLjI3NiBDMTQzLjEzMyw3MS4yNzYgMTQyLjExOCw3MC45NjkgMTQxLjI1Nyw3MC4zNjUgQzE0MS4yMzYsNzAuMzUxIDE0MS4yMTcsNzAuMzMyIDE0MS4yMDIsNzAuMzExIEMxNDAuMzA3LDY5LjA2NyAxMzkuODM1LDY3LjMzOSAxMzkuODM1LDY1LjMxNCBDMTM5LjgzNSw1OS4wNzMgMTQ0LjI2LDUxLjQzOSAxNDkuNyw0OC4yOTggQzE1MS4yNzMsNDcuMzkgMTUyLjc4NCw0Ni45MjkgMTU0LjE4OSw0Ni45MjkgQzE1NS4zMzIsNDYuOTI5IDE1Ni4zNDcsNDcuMjM2IDE1Ny4yMDgsNDcuODM5IEMxNTcuMjI5LDQ3Ljg1NCAxNTcuMjQ4LDQ3Ljg3MyAxNTcuMjYzLDQ3Ljg5NCBDMTU4LjE1Nyw0OS4xMzggMTU4LjYzLDUwLjg2NSAxNTguNjMsNTIuODkxIEMxNTguNjMsNTkuMTMyIDE1NC4yMDUsNjYuNzY2IDE0OC43NjUsNjkuOTA3IEMxNDcuMTkyLDcwLjgxNSAxNDUuNjgxLDcxLjI3NiAxNDQuMjc2LDcxLjI3NiBMMTQ0LjI3Niw3MS4yNzYgWiBNMTQxLjU1OCw3MC4xMDQgQzE0Mi4zMzEsNzAuNjM3IDE0My4yNDUsNzEuMDA1IDE0NC4yNzYsNzEuMDA1IEMxNDUuNTk4LDcxLjAwNSAxNDcuMDMsNzAuNDY3IDE0OC41MzIsNjkuNiBDMTUzLjg0Miw2Ni41MzQgMTU4LjE2Myw1OS4wMzMgMTU4LjE2Myw1Mi45MzkgQzE1OC4xNjMsNTEuMDMxIDE1Ny43MjksNDkuMzg1IDE1Ni45MDcsNDguMjIzIEMxNTYuMTMzLDQ3LjY5MSAxNTUuMjE5LDQ3LjQwOSAxNTQuMTg5LDQ3LjQwOSBDMTUyLjg2Nyw0Ny40MDkgMTUxLjQzNSw0Ny44NDIgMTQ5LjkzMyw0OC43MDkgQzE0NC42MjMsNTEuNzc1IDE0MC4zMDIsNTkuMjczIDE0MC4zMDIsNjUuMzY2IEMxNDAuMzAyLDY3LjI3NiAxNDAuNzM2LDY4Ljk0MiAxNDEuNTU4LDcwLjEwNCBMMTQxLjU1OCw3MC4xMDQgWiIgaWQ9IkZpbGwtMzUiIGZpbGw9IiM2MDdEOEIiPjwvcGF0aD4KICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNMTUwLjcyLDY1LjM2MSBMMTUwLjM1Nyw2NS4wNjYgQzE1MS4xNDcsNjQuMDkyIDE1MS44NjksNjMuMDQgMTUyLjUwNSw2MS45MzggQzE1My4zMTMsNjAuNTM5IDE1My45NzgsNTkuMDY3IDE1NC40ODIsNTcuNTYzIEwxNTQuOTI1LDU3LjcxMiBDMTU0LjQxMiw1OS4yNDUgMTUzLjczMyw2MC43NDUgMTUyLjkxLDYyLjE3MiBDMTUyLjI2Miw2My4yOTUgMTUxLjUyNSw2NC4zNjggMTUwLjcyLDY1LjM2MSIgaWQ9IkZpbGwtMzYiIGZpbGw9IiM2MDdEOEIiPjwvcGF0aD4KICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNMTE1LjkxNyw4NC41MTQgTDExNS41NTQsODQuMjIgQzExNi4zNDQsODMuMjQ1IDExNy4wNjYsODIuMTk0IDExNy43MDIsODEuMDkyIEMxMTguNTEsNzkuNjkyIDExOS4xNzUsNzguMjIgMTE5LjY3OCw3Ni43MTcgTDEyMC4xMjEsNzYuODY1IEMxMTkuNjA4LDc4LjM5OCAxMTguOTMsNzkuODk5IDExOC4xMDYsODEuMzI2IEMxMTcuNDU4LDgyLjQ0OCAxMTYuNzIyLDgzLjUyMSAxMTUuOTE3LDg0LjUxNCIgaWQ9IkZpbGwtMzciIGZpbGw9IiM2MDdEOEIiPjwvcGF0aD4KICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNMTE0LDEzMC40NzYgTDExNCwxMzAuMDA4IEwxMTQsNzYuMDUyIEwxMTQsNzUuNTg0IEwxMTQsNzYuMDUyIEwxMTQsMTMwLjAwOCBMMTE0LDEzMC40NzYiIGlkPSJGaWxsLTM4IiBmaWxsPSIjNjA3RDhCIj48L3BhdGg+CiAgICAgICAgICAgICAgICA8L2c+CiAgICAgICAgICAgICAgICA8ZyBpZD0iSW1wb3J0ZWQtTGF5ZXJzLUNvcHkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDYyLjAwMDAwMCwgMC4wMDAwMDApIiBza2V0Y2g6dHlwZT0iTVNTaGFwZUdyb3VwIj4KICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNMTkuODIyLDM3LjQ3NCBDMTkuODM5LDM3LjMzOSAxOS43NDcsMzcuMTk0IDE5LjU1NSwzNy4wODIgQzE5LjIyOCwzNi44OTQgMTguNzI5LDM2Ljg3MiAxOC40NDYsMzcuMDM3IEwxMi40MzQsNDAuNTA4IEMxMi4zMDMsNDAuNTg0IDEyLjI0LDQwLjY4NiAxMi4yNDMsNDAuNzkzIEMxMi4yNDUsNDAuOTI1IDEyLjI0NSw0MS4yNTQgMTIuMjQ1LDQxLjM3MSBMMTIuMjQ1LDQxLjQxNCBMMTIuMjM4LDQxLjU0MiBDOC4xNDgsNDMuODg3IDUuNjQ3LDQ1LjMyMSA1LjY0Nyw0NS4zMjEgQzUuNjQ2LDQ1LjMyMSAzLjU3LDQ2LjM2NyAyLjg2LDUwLjUxMyBDMi44Niw1MC41MTMgMS45NDgsNTcuNDc0IDEuOTYyLDcwLjI1OCBDMS45NzcsODIuODI4IDIuNTY4LDg3LjMyOCAzLjEyOSw5MS42MDkgQzMuMzQ5LDkzLjI5MyA2LjEzLDkzLjczNCA2LjEzLDkzLjczNCBDNi40NjEsOTMuNzc0IDYuODI4LDkzLjcwNyA3LjIxLDkzLjQ4NiBMODIuNDgzLDQ5LjkzNSBDODQuMjkxLDQ4Ljg2NiA4NS4xNSw0Ni4yMTYgODUuNTM5LDQzLjY1MSBDODYuNzUyLDM1LjY2MSA4Ny4yMTQsMTAuNjczIDg1LjI2NCwzLjc3MyBDODUuMDY4LDMuMDggODQuNzU0LDIuNjkgODQuMzk2LDIuNDkxIEw4Mi4zMSwxLjcwMSBDODEuNTgzLDEuNzI5IDgwLjg5NCwyLjE2OCA4MC43NzYsMi4yMzYgQzgwLjYzNiwyLjMxNyA0MS44MDcsMjQuNTg1IDIwLjAzMiwzNy4wNzIgTDE5LjgyMiwzNy40NzQiIGlkPSJGaWxsLTEiIGZpbGw9IiNGRkZGRkYiPjwvcGF0aD4KICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNODIuMzExLDEuNzAxIEw4NC4zOTYsMi40OTEgQzg0Ljc1NCwyLjY5IDg1LjA2OCwzLjA4IDg1LjI2NCwzLjc3MyBDODcuMjEzLDEwLjY3MyA4Ni43NTEsMzUuNjYgODUuNTM5LDQzLjY1MSBDODUuMTQ5LDQ2LjIxNiA4NC4yOSw0OC44NjYgODIuNDgzLDQ5LjkzNSB
1MNy4yMSw5My40ODYgQzYuODk3LDkzLjY2NyA2LjU5NSw5My43NDQgNi4zMTQsOTMuNzQ0IEw2LjEzMSw5My43MzMgQzYuMTMxLDkzLjczNCAzLjM0OSw5My4yOTMgMy4xMjgsOTEuNjA5IEMyLjU2OCw4Ny4zMjcgMS45NzcsODIuODI4IDEuOTYzLDcwLjI1OCBDMS45NDgsNTcuNDc0IDIuODYsNTAuNTEzIDIuODYsNTAuNTEzIEMzLjU3LDQ2LjM2NyA1LjY0Nyw0NS4zMjEgNS42NDcsNDUuMzIxIEM1LjY0Nyw0NS4zMjEgOC4xNDgsNDMuODg3IDEyLjIzOCw0MS41NDIgTDEyLjI0NSw0MS40MTQgTDEyLjI0NSw0MS4zNzEgQzEyLjI0NSw0MS4yNTQgMTIuMjQ1LDQwLjkyNSAxMi4yNDMsNDAuNzkzIEMxMi4yNCw0MC42ODYgMTIuMzAyLDQwLjU4MyAxMi40MzQsNDAuNTA4IEwxOC40NDYsMzcuMDM2IEMxOC41NzQsMzYuOTYyIDE4Ljc0NiwzNi45MjYgMTguOTI3LDM2LjkyNiBDMTkuMTQ1LDM2LjkyNiAxOS4zNzYsMzYuOTc5IDE5LjU1NCwzNy4wODIgQzE5Ljc0NywzNy4xOTQgMTkuODM5LDM3LjM0IDE5LjgyMiwzNy40NzQgTDIwLjAzMywzNy4wNzIgQzQxLjgwNiwyNC41ODUgODAuNjM2LDIuMzE4IDgwLjc3NywyLjIzNiBDODAuODk0LDIuMTY4IDgxLjU4MywxLjcyOSA4Mi4zMTEsMS43MDEgTTgyLjMxMSwwLjcwNCBMODIuMjcyLDAuNzA1IEM4MS42NTQsMC43MjggODAuOTg5LDAuOTQ5IDgwLjI5OCwxLjM2MSBMODAuMjc3LDEuMzczIEM4MC4xMjksMS40NTggNTkuNzY4LDEzLjEzNSAxOS43NTgsMzYuMDc5IEMxOS41LDM1Ljk4MSAxOS4yMTQsMzUuOTI5IDE4LjkyNywzNS45MjkgQzE4LjU2MiwzNS45MjkgMTguMjIzLDM2LjAxMyAxNy45NDcsMzYuMTczIEwxMS45MzUsMzkuNjQ0IEMxMS40OTMsMzkuODk5IDExLjIzNiw0MC4zMzQgMTEuMjQ2LDQwLjgxIEwxMS4yNDcsNDAuOTYgTDUuMTY3LDQ0LjQ0NyBDNC43OTQsNDQuNjQ2IDIuNjI1LDQ1Ljk3OCAxLjg3Nyw1MC4zNDUgTDEuODcxLDUwLjM4NCBDMS44NjIsNTAuNDU0IDAuOTUxLDU3LjU1NyAwLjk2NSw3MC4yNTkgQzAuOTc5LDgyLjg3OSAxLjU2OCw4Ny4zNzUgMi4xMzcsOTEuNzI0IEwyLjEzOSw5MS43MzkgQzIuNDQ3LDk0LjA5NCA1LjYxNCw5NC42NjIgNS45NzUsOTQuNzE5IEw2LjAwOSw5NC43MjMgQzYuMTEsOTQuNzM2IDYuMjEzLDk0Ljc0MiA2LjMxNCw5NC43NDIgQzYuNzksOTQuNzQyIDcuMjYsOTQuNjEgNy43MSw5NC4zNSBMODIuOTgzLDUwLjc5OCBDODQuNzk0LDQ5LjcyNyA4NS45ODIsNDcuMzc1IDg2LjUyNSw0My44MDEgQzg3LjcxMSwzNS45ODcgODguMjU5LDEwLjcwNSA4Ni4yMjQsMy41MDIgQzg1Ljk3MSwyLjYwOSA4NS41MiwxLjk3NSA4NC44ODEsMS42MiBMODQuNzQ5LDEuNTU4IEw4Mi42NjQsMC43NjkgQzgyLjU1MSwwLjcyNSA4Mi40MzEsMC43MDQgODIuMzExLDAuNzA0IiBpZD0iRmlsbC0yIiBmaWxsPSIjNDU1QTY0Ij48L3BhdGg+CiAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTY2LjI2NywxMS41NjUgTDY3Ljc2MiwxMS45OTkgTDExLjQyMyw0NC4zMjUiIGlkPSJGaWxsLTMiIGZpbGw9IiNGRkZGRkYiPjwvcGF0aD4KICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNMTIuMjAyLDkwLjU0NSBDMTIuMDI5LDkwLjU0NSAxMS44NjIsOTAuNDU1IDExLjc2OSw5MC4yOTUgQzExLjYzMiw5MC4wNTcgMTEuNzEzLDg5Ljc1MiAxMS45NTIsODkuNjE0IEwzMC4zODksNzguOTY5IEMzMC42MjgsNzguODMxIDMwLjkzMyw3OC45MTMgMzEuMDcxLDc5LjE1MiBDMzEuMjA4LDc5LjM5IDMxLjEyNyw3OS42OTYgMzAuODg4LDc5LjgzMyBMMTIuNDUxLDkwLjQ3OCBMMTIuMjAyLDkwLjU0NSIgaWQ9IkZpbGwtNCIgZmlsbD0iIzYwN0Q4QiI+PC9wYXRoPgogICAgICAgICAgICAgICAgICAgIDxwYXRoIGQ9Ik0xMy43NjQsNDIuNjU0IEwxMy42NTYsNDIuNTkyIEwxMy43MDIsNDIuNDIxIEwxOC44MzcsMzkuNDU3IEwxOS4wMDcsMzkuNTAyIEwxOC45NjIsMzkuNjczIEwxMy44MjcsNDIuNjM3IEwxMy43NjQsNDIuNjU0IiBpZD0iRmlsbC01IiBmaWxsPSIjNjA3RDhCIj48L3BhdGg+CiAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTguNTIsOTAuMzc1IEw4LjUyLDQ2LjQyMSBMOC41ODMsNDYuMzg1IEw3NS44NCw3LjU1NCBMNzUuODQsNTEuNTA4IEw3NS43NzgsNTEuNTQ0IEw4LjUyLDkwLjM3NSBMOC41Miw5MC4zNzUgWiBNOC43Nyw0Ni41NjQgTDguNzcsODkuOTQ0IEw3NS41OTEsNTEuMzY1IEw3NS41OTEsNy45ODUgTDguNzcsNDYuNTY0IEw4Ljc3LDQ2LjU2NCBaIiBpZD0iRmlsbC02IiBmaWxsPSIjNjA3RDhCIj48L3BhdGg+CiAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTI0Ljk4Niw4My4xODIgQzI0Ljc1Niw4My4zMzEgMjQuMzc0LDgzLjU2NiAyNC4xMzcsODMuNzA1IEwxMi42MzIsOTAuNDA2IEMxMi4zOTUsOTAuNTQ1IDEyLjQyNiw5MC42NTggMTIuNyw5MC42NTggTDEzLjI2NSw5MC42NTggQzEzLjU0LDkwLjY1OCAxMy45NTgsOTAuNTQ1IDE0LjE5NSw5MC40MDYgTDI1LjcsODMuNzA1IEMyNS45MzcsODMuNTY2IDI2LjEyOCw4My40NTIgMjYuMTI1LDgzLjQ0OSBDMjYuMTIyLDgzLjQ0NyAyNi4xMTksODMuMjIgMjYuMTE5LDgyLjk0NiBDMjYuMTE5LDgyLjY3MiAyNS45MzEsODIuNTY5IDI1LjcwMSw4Mi43MTkgTDI0Ljk4Niw4My4xODIiIGlkPSJGaWxsLTciIGZpbGw9IiM2MDdEOEIiPjwvcGF0aD4KICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNMTMuMjY2LDkwLjc4MiBMMTIuNyw5MC43ODIgQzEyLjUsOTAuNzgyIDEyLjM4NCw5MC43MjYgMTIuMzU0LDkwLjYxNiBDMTIuMzI0LDkwLjUwNiAxMi4zOTcsOTAuMzk5IDEyLjU2OSw5MC4yOTkgTDI0LjA3NCw4My41OTcgQzI0LjMxLDgzLjQ1OSAyNC42ODksODMuMjI2IDI0LjkxOCw4My4wNzggTDI1LjYzMyw4Mi42MTQgQzI1LjcyMyw4Mi41NTUgMjUuODEzLDgyLjUyNSAyNS44OTksODIuNTI1IEMyNi4wNzEsODIuNTI1IDI2LjI0NCw4Mi42NTUgMjYuMjQ0LDgyLjk0NiBDMjYuMjQ0LDgzLjE2IDI2LjI0NSw4My4zMDkgMjYuMjQ3LDgzLjM4MyBMMjYuMjUzLDgzLjM4NyBMMjYuMjQ5LDgzLjQ1NiBDMjYuMjQ2LDgzLjUzMSAyNi4yNDYsODMuNTMxIDI1Ljc2Myw4My44MTIgTDE0LjI1OCw5MC41MTQgQzE0LDkwLjY2NSAxMy41NjQsOTAuNzgyIDEzLjI2Niw5MC43ODIgTDEzLjI2Niw5MC43ODIgWiBNMTIuNjY2LDkwLjUzMiBMMTIuNyw5MC41MzMgTDEzLjI2Niw5MC41MzMgQzEzLjUxOCw5MC41MzMgMTMuOTE1LDkwLjQyNSAxNC4xMzIsOTAuMjk5IEwyNS42MzcsODMuNTk3IEMyNS44MDUsODMuNDk5IDI1LjkzMSw4My40MjQgMjUuOTk4LDgzLjM4MyBDMjUuOTk0LDgzLjI5OSAyNS45OTQsODMuMTY1IDI1Ljk5NCw4Mi45NDYgTDI1Ljg5OSw4Mi43NzUgTDI1Ljc2OCw4Mi44MjQgTDI1LjA1NCw4My4yODcgQzI0LjgyMiw4My40MzcgMjQuNDM4LDgzLjY3MyAyNC4yLDgzLjgxMiBMMTIuNjk1LDkwLjUxNCBMMTIuNjY2LDkwLjUzMiBMMTIuNjY2LDkwLjUzMiBaIiBpZD0iRmlsbC04IiBmaWxsPSIjNjA3RDhCIj48L3BhdGg+CiAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTEzLjI2Niw4OS44NzEgTDEyLjcsODkuODcxIEMxMi41LDg5Ljg3MSAxMi4zODQsODkuODE1IDEyLjM1NCw4OS43MDUgQzEyLjMyNCw4OS41OTUgMTIuMzk3LDg5LjQ4OCAxMi41NjksODkuMzg4IEwyNC4wNzQsODIuNjg2IEMyNC4zMzIsODIuNTM1IDI0Ljc2OCw4Mi40MTggMjUuMDY3LDgyLjQxOCBMMjUuNjMyLDgyLjQxOCBDMjUuODMyLDgyLjQxOCAyNS45NDgsODIuNDc0IDI1Ljk3OCw4Mi41ODQgQzI2LjAwOCw4Mi42OTQgMjUuOTM1LDgyLjgwMSAyNS43NjMsODIuOTAxIEwxNC4yNTgsODkuNjAzIEMxNCw4OS43NTQgMTMuNTY0LDg5Ljg3MSAxMy4yNjYsODkuODcxIEwxMy4yNjYsODkuODcxIFogTTEyLjY2Niw4OS42MjEgTDEyLjcsODkuNjIyIEwxMy4yNjYsODkuNjIyIEMxMy41MTgsODkuNjIyIDEzLjkxNSw4OS41MTUgMTQuMTMyLDg5LjM4OCBMMjUuNjM3LDgyLjY4NiB
1MMjUuNjY3LDgyLjY2OCBMMjUuNjMyLDgyLjY2NyBMMjUuMDY3LDgyLjY2NyBDMjQuODE1LDgyLjY2NyAyNC40MTgsODIuNzc1IDI0LjIsODIuOTAxIEwxMi42OTUsODkuNjAzIEwxMi42NjYsODkuNjIxIEwxMi42NjYsODkuNjIxIFoiIGlkPSJGaWxsLTkiIGZpbGw9IiM2MDdEOEIiPjwvcGF0aD4KICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNMTIuMzcsOTAuODAxIEwxMi4zNyw4OS41NTQgTDEyLjM3LDkwLjgwMSIgaWQ9IkZpbGwtMTAiIGZpbGw9IiM2MDdEOEIiPjwvcGF0aD4KICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNNi4xMyw5My45MDEgQzUuMzc5LDkzLjgwOCA0LjgxNiw5My4xNjQgNC42OTEsOTIuNTI1IEMzLjg2LDg4LjI4NyAzLjU0LDgzLjc0MyAzLjUyNiw3MS4xNzMgQzMuNTExLDU4LjM4OSA0LjQyMyw1MS40MjggNC40MjMsNTEuNDI4IEM1LjEzNCw0Ny4yODIgNy4yMSw0Ni4yMzYgNy4yMSw0Ni4yMzYgQzcuMjEsNDYuMjM2IDgxLjY2NywzLjI1IDgyLjA2OSwzLjAxNyBDODIuMjkyLDIuODg4IDg0LjU1NiwxLjQzMyA4NS4yNjQsMy45NCBDODcuMjE0LDEwLjg0IDg2Ljc1MiwzNS44MjcgODUuNTM5LDQzLjgxOCBDODUuMTUsNDYuMzgzIDg0LjI5MSw0OS4wMzMgODIuNDgzLDUwLjEwMSBMNy4yMSw5My42NTMgQzYuODI4LDkzLjg3NCA2LjQ2MSw5My45NDEgNi4xMyw5My45MDEgQzYuMTMsOTMuOTAxIDMuMzQ5LDkzLjQ2IDMuMTI5LDkxLjc3NiBDMi41NjgsODcuNDk1IDEuOTc3LDgyLjk5NSAxLjk2Miw3MC40MjUgQzEuOTQ4LDU3LjY0MSAyLjg2LDUwLjY4IDIuODYsNTAuNjggQzMuNTcsNDYuNTM0IDUuNjQ3LDQ1LjQ4OSA1LjY0Nyw0NS40ODkgQzUuNjQ2LDQ1LjQ4OSA4LjA2NSw0NC4wOTIgMTIuMjQ1LDQxLjY3OSBMMTMuMTE2LDQxLjU2IEwxOS43MTUsMzcuNzMgTDE5Ljc2MSwzNy4yNjkgTDYuMTMsOTMuOTAxIiBpZD0iRmlsbC0xMSIgZmlsbD0iI0ZBRkFGQSI+PC9wYXRoPgogICAgICAgICAgICAgICAgICAgIDxwYXRoIGQ9Ik02LjMxNyw5NC4xNjEgTDYuMTAyLDk0LjE0OCBMNi4xMDEsOTQuMTQ4IEw1Ljg1Nyw5NC4xMDEgQzUuMTM4LDkzLjk0NSAzLjA4NSw5My4zNjUgMi44ODEsOTEuODA5IEMyLjMxMyw4Ny40NjkgMS43MjcsODIuOTk2IDEuNzEzLDcwLjQyNSBDMS42OTksNTcuNzcxIDIuNjA0LDUwLjcxOCAyLjYxMyw1MC42NDggQzMuMzM4LDQ2LjQxNyA1LjQ0NSw0NS4zMSA1LjUzNSw0NS4yNjYgTDEyLjE2Myw0MS40MzkgTDEzLjAzMyw0MS4zMiBMMTkuNDc5LDM3LjU3OCBMMTkuNTEzLDM3LjI0NCBDMTkuNTI2LDM3LjEwNyAxOS42NDcsMzcuMDA4IDE5Ljc4NiwzNy4wMjEgQzE5LjkyMiwzNy4wMzQgMjAuMDIzLDM3LjE1NiAyMC4wMDksMzcuMjkzIEwxOS45NSwzNy44ODIgTDEzLjE5OCw0MS44MDEgTDEyLjMyOCw0MS45MTkgTDUuNzcyLDQ1LjcwNCBDNS43NDEsNDUuNzIgMy43ODIsNDYuNzcyIDMuMTA2LDUwLjcyMiBDMy4wOTksNTAuNzgyIDIuMTk4LDU3LjgwOCAyLjIxMiw3MC40MjQgQzIuMjI2LDgyLjk2MyAyLjgwOSw4Ny40MiAzLjM3Myw5MS43MjkgQzMuNDY0LDkyLjQyIDQuMDYyLDkyLjg4MyA0LjY4Miw5My4xODEgQzQuNTY2LDkyLjk4NCA0LjQ4Niw5Mi43NzYgNC40NDYsOTIuNTcyIEMzLjY2NSw4OC41ODggMy4yOTEsODQuMzcgMy4yNzYsNzEuMTczIEMzLjI2Miw1OC41MiA0LjE2Nyw1MS40NjYgNC4xNzYsNTEuMzk2IEM0LjkwMSw0Ny4xNjUgNy4wMDgsNDYuMDU5IDcuMDk4LDQ2LjAxNCBDNy4wOTQsNDYuMDE1IDgxLjU0MiwzLjAzNCA4MS45NDQsMi44MDIgTDgxLjk3MiwyLjc4NSBDODIuODc2LDIuMjQ3IDgzLjY5MiwyLjA5NyA4NC4zMzIsMi4zNTIgQzg0Ljg4NywyLjU3MyA4NS4yODEsMy4wODUgODUuNTA0LDMuODcyIEM4Ny41MTgsMTEgODYuOTY0LDM2LjA5MSA4NS43ODUsNDMuODU1IEM4NS4yNzgsNDcuMTk2IDg0LjIxLDQ5LjM3IDgyLjYxLDUwLjMxNyBMNy4zMzUsOTMuODY5IEM2Ljk5OSw5NC4wNjMgNi42NTgsOTQuMTYxIDYuMzE3LDk0LjE2MSBMNi4zMTcsOTQuMTYxIFogTTYuMTcsOTMuNjU0IEM2LjQ2Myw5My42OSA2Ljc3NCw5My42MTcgNy4wODUsOTMuNDM3IEw4Mi4zNTgsNDkuODg2IEM4NC4xODEsNDguODA4IDg0Ljk2LDQ1Ljk3MSA4NS4yOTIsNDMuNzggQzg2LjQ2NiwzNi4wNDkgODcuMDIzLDExLjA4NSA4NS4wMjQsNC4wMDggQzg0Ljg0NiwzLjM3NyA4NC41NTEsMi45NzYgODQuMTQ4LDIuODE2IEM4My42NjQsMi42MjMgODIuOTgyLDIuNzY0IDgyLjIyNywzLjIxMyBMODIuMTkzLDMuMjM0IEM4MS43OTEsMy40NjYgNy4zMzUsNDYuNDUyIDcuMzM1LDQ2LjQ1MiBDNy4zMDQsNDYuNDY5IDUuMzQ2LDQ3LjUyMSA0LjY2OSw1MS40NzEgQzQuNjYyLDUxLjUzIDMuNzYxLDU4LjU1NiAzLjc3NSw3MS4xNzMgQzMuNzksODQuMzI4IDQuMTYxLDg4LjUyNCA0LjkzNiw5Mi40NzYgQzUuMDI2LDkyLjkzNyA1LjQxMiw5My40NTkgNS45NzMsOTMuNjE1IEM2LjA4Nyw5My42NCA2LjE1OCw5My42NTIgNi4xNjksOTMuNjU0IEw2LjE3LDkzLjY1NCBMNi4xNyw5My42NTQgWiIgaWQ9IkZpbGwtMTIiIGZpbGw9IiM0NTVBNjQiPjwvcGF0aD4KICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNNy4zMTcsNjguOTgyIEM3LjgwNiw2OC43MDEgOC4yMDIsNjguOTI2IDguMjAyLDY5LjQ4NyBDOC4yMDIsNzAuMDQ3IDcuODA2LDcwLjczIDcuMzE3LDcxLjAxMiBDNi44MjksNzEuMjk0IDYuNDMzLDcxLjA2OSA2LjQzMyw3MC41MDggQzYuNDMzLDY5Ljk0OCA2LjgyOSw2OS4yNjUgNy4zMTcsNjguOTgyIiBpZD0iRmlsbC0xMyIgZmlsbD0iI0ZGRkZGRiI+PC9wYXRoPgogICAgICAgICAgICAgICAgICAgIDxwYXRoIGQ9Ik02LjkyLDcxLjEzMyBDNi42MzEsNzEuMTMzIDYuNDMzLDcwLjkwNSA2LjQzMyw3MC41MDggQzYuNDMzLDY5Ljk0OCA2LjgyOSw2OS4yNjUgNy4zMTcsNjguOTgyIEM3LjQ2LDY4LjkgNy41OTUsNjguODYxIDcuNzE0LDY4Ljg2MSBDOC4wMDMsNjguODYxIDguMjAyLDY5LjA5IDguMjAyLDY5LjQ4NyBDOC4yMDIsNzAuMDQ3IDcuODA2LDcwLjczIDcuMzE3LDcxLjAxMiBDNy4xNzQsNzEuMDk0IDcuMDM5LDcxLjEzMyA2LjkyLDcxLjEzMyBNNy43MTQsNjguNjc0IEM3LjU1Nyw2OC42NzQgNy4zOTIsNjguNzIzIDcuMjI0LDY4LjgyMSBDNi42NzYsNjkuMTM4IDYuMjQ2L
1DY5Ljg3OSA2LjI0Niw3MC41MDggQzYuMjQ2LDcwLjk5NCA2LjUxNyw3MS4zMiA2LjkyLDcxLjMyIEM3LjA3OCw3MS4zMiA3LjI0Myw3MS4yNzEgNy40MTEsNzEuMTc0IEM3Ljk1OSw3MC44NTcgOC4zODksNzAuMTE3IDguMzg5LDY5LjQ4NyBDOC4zODksNjkuMDAxIDguMTE3LDY4LjY3NCA3LjcxNCw2OC42NzQiIGlkPSJGaWxsLTE0IiBmaWxsPSIjODA5N0EyIj48L3BhdGg+CiAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTYuOTIsNzAuOTQ3IEM2LjY0OSw3MC45NDcgNi42MjEsNzAuNjQgNi42MjEsNzAuNTA4IEM2LjYyMSw3MC4wMTcgNi45ODIsNjkuMzkyIDcuNDExLDY5LjE0NSBDNy41MjEsNjkuMDgyIDcuNjI1LDY5LjA0OSA3LjcxNCw2OS4wNDkgQzcuOTg2LDY5LjA0OSA4LjAxNSw2OS4zNTUgOC4wMTUsNjkuNDg3IEM4LjAxNSw2OS45NzggNy42NTIsNzAuNjAzIDcuMjI0LDcwLjg1MSBDNy4xMTUsNzAuOTE0IDcuMDEsNzAuOTQ3IDYuOTIsNzAuOTQ3IE03LjcxNCw2OC44NjEgQzcuNTk1LDY4Ljg2MSA3LjQ2LDY4LjkgNy4zMTcsNjguOTgyIEM2LjgyOSw2OS4yNjUgNi40MzMsNjkuOTQ4IDYuNDMzLDcwLjUwOCBDNi40MzMsNzAuOTA1IDYuNjMxLDcxLjEzMyA2LjkyLDcxLjEzMyBDNy4wMzksNzEuMTMzIDcuMTc0LDcxLjA5NCA3LjMxNyw3MS4wMTIgQzcuODA2LDcwLjczIDguMjAyLDcwLjA0NyA4LjIwMiw2OS40ODcgQzguMjAyLDY5LjA5IDguMDAzLDY4Ljg2MSA3LjcxNCw2OC44NjEiIGlkPSJGaWxsLTE1IiBmaWxsPSIjODA5N0EyIj48L3BhdGg+CiAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTcuNDQ0LDg1LjM1IEM3LjcwOCw4NS4xOTggNy45MjEsODUuMzE5IDcuOTIxLDg1LjYyMiBDNy45MjEsODUuOTI1IDcuNzA4LDg2LjI5MiA3LjQ0NCw4Ni40NDQgQzcuMTgxLDg2LjU5NyA2Ljk2Nyw4Ni40NzUgNi45NjcsODYuMTczIEM2Ljk2Nyw4NS44NzEgNy4xODEsODUuNTAyIDcuNDQ0LDg1LjM1IiBpZD0iRmlsbC0xNiIgZmlsbD0iI0ZGRkZGRiI+PC9wYXRoPgogICAgICAgICAgICAgICAgICAgIDxwYXRoIGQ9Ik03LjIzLDg2LjUxIEM3LjA3NCw4Ni41MSA2Ljk2Nyw4Ni4zODcgNi45NjcsODYuMTczIEM2Ljk2Nyw4NS44NzEgNy4xODEsODUuNTAyIDcuNDQ0LDg1LjM1IEM3LjUyMSw4NS4zMDUgNy41OTQsODUuMjg0IDcuNjU4LDg1LjI4NCBDNy44MTQsODUuMjg0IDcuOTIxLDg1LjQwOCA3LjkyMSw4NS42MjIgQzcuOTIxLDg1LjkyNSA3LjcwOCw4Ni4yOTIgNy40NDQsODYuNDQ0IEM3LjM2Nyw4Ni40ODkgNy4yOTQsODYuNTEgNy4yMyw4Ni41MSBNNy42NTgsODUuMDk4IEM3LjU1OCw4NS4wOTggNy40NTUsODUuMTI3IDcuMzUxLDg1LjE4OCBDNy4wMzEsODUuMzczIDYuNzgxLDg1LjgwNiA2Ljc4MSw4Ni4xNzMgQzYuNzgxLDg2LjQ4MiA2Ljk2Niw4Ni42OTcgNy4yMyw4Ni42OTcgQzcuMzMsODYuNjk3IDcuNDMzLDg2LjY2NiA3LjUzOCw4Ni42MDcgQzcuODU4LDg2LjQyMiA4LjEwOCw4NS45ODkgOC4xMDgsODUuNjIyIEM4LjEwOCw4NS4zMTMgNy45MjMsODUuMDk4IDcuNjU4LDg1LjA5OCIgaWQ9IkZpbGwtMTciIGZpbGw9IiM4MDk3QTIiPjwvcGF0aD4KICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNNy4yMyw4Ni4zMjIgTDcuMTU0LDg2LjE3MyBDNy4xNTQsODUuOTM4IDcuMzMzLDg1LjYyOSA3LjUzOCw4NS41MTIgTDcuNjU4LDg1LjQ3MSBMNy43MzQsODUuNjIyIEM3LjczNCw4NS44NTYgNy41NTUsODYuMTY0IDcuMzUxLDg2LjI4MiBMNy4yMyw4Ni4zMjIgTTcuNjU4LDg1LjI4NCBDNy41OTQsODUuMjg0IDcuNTIxLDg1LjMwNSA3LjQ0NCw4NS4zNSBDNy4xODEsODUuNTAyIDYuOTY3LDg1Ljg3MSA2Ljk2Nyw4Ni4xNzMgQzYuOTY3LDg2LjM4NyA3LjA3NCw4Ni41MSA3LjIzLDg2LjUxIEM3LjI5NCw4Ni41MSA3LjM2Nyw4Ni40ODkgNy40NDQsODYuNDQ0IEM3LjcwOCw4Ni4yOTIgNy45MjEsODUuOTI1IDcuOTIxLDg1LjYyMiBDNy45MjEsODUuNDA4IDcuODE0LDg1LjI4NCA3LjY1OCw4NS4yODQiIGlkPSJGaWxsLTE4IiBmaWxsPSIjODA5N0EyIj48L3BhdGg+CiAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTc3LjI3OCw3Ljc2OSBMNzcuMjc4LDUxLjQzNiBMMTAuMjA4LDkwLjE2IEwxMC4yMDgsNDYuNDkzIEw3Ny4yNzgsNy43NjkiIGlkPSJGaWxsLTE5IiBmaWxsPSIjNDU1QTY0Ij48L3BhdGg+CiAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTEwLjA4Myw5MC4zNzUgTDEwLjA4Myw0Ni40MjEgTDEwLjE0Niw0Ni4zODUgTDc3LjQwMyw3LjU1NCBMNzcuNDAzLDUxLjUwOCBMNzcuMzQxLDUxLjU0NCBMMTAuMDgzLDkwLjM3NSBMMTAuMDgzLDkwLjM3NSBaIE0xMC4zMzMsNDYuNTY0IEwxMC4zMzMsODkuOTQ0IEw3Ny4xNTQsNTEuMzY1IEw3Ny4xNTQsNy45ODUgTDEwLjMzMyw0Ni41NjQgTDEwLjMzMyw0Ni41NjQgWiIgaWQ9IkZpbGwtMjAiIGZpbGw9IiM2MDdEOEIiPjwvcGF0aD4KICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgICAgIDxwYXRoIGQ9Ik0xMjUuNzM3LDg4LjY0NyBMMTE4LjA5OCw5MS45ODEgTDExOC4wOTgsODQgTDEwNi42MzksODguNzEzIEwxMDYuNjM5LDk2Ljk4MiBMOTksMTAwLjMxNSBMMTEyLjM2OSwxMDMuOTYxIEwxMjUuNzM3LDg4LjY0NyIgaWQ9IkltcG9ydGVkLUxheWVycy1Db3B5LTIiIGZpbGw9IiM0NTVBNjQiIHNrZXRjaDp0eXBlPSJNU1NoYXBlR3JvdXAiPjwvcGF0aD4KICAgICAgICAgICAgPC9nPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+";function xe(){this.loadIcon_();var e=document.createElement("div");var t=e.style;t.position="fixed";t.top=0;t.right=0;t.bottom=0;t.left=0;t.backgroundColor="gray";t.fontFamily="sans-serif";t.zIndex=1e6;var i=document.createElement("img");i.src=this.icon;var t=i.style;t.marginLeft="25%";t.marginTop="25%";t.width="50%";e.appendChild(i);var n=document.createElement("div");var t=n.style;t.textAlign="center";t.fontSize="16px";t.lineHeight="24px";t.margin="24px 25%";t.width="50%";n.innerHTML="Place your phone into your Cardboard viewer.";e.appendChild(n);var r=document.createElement("div");var t=r.style;t.backgroundColor="#CFD8DC";t.position="fixed";t.bottom=0;t.width="100%";t.height="48px";t.padding="14px 24px";t.boxSizing="border-box";t.color="#656A6B";e.appendChild(r);var a=document.createElement("div");a.style.float="left";a.innerHTML="No Cardboard viewer?";var s=document.createElement("a");s.href="https://www.google.com/get/cardboard/get-cardboard/";s.innerHTML="get one";s.target="_blank";var t=s.style;t.float="right";t.fontWeight=600;t.textTransform="uppercase";t.borderLeft="1px solid gray";t.paddingLeft="24px";t.textDecoration="none";t.color="#656A6B";r.appendChild(a);r.appendChild(s);this.overlay=e;this.text=n;this.hide()}xe.prototype.show=function(e){if(!e&&!this.overlay.parentElement){document.body.appendChild(this.overlay)}else if(e){if(this.overlay.parentElement&&this.overlay.parentElement!=e)this.overlay.parentElement.removeChild(this.overlay);e.appendChild(this.overlay)}this.overlay.style.display="block";var t=this.overlay.querySelector("img");var i=t.style;if(d()){i.width="20%";i.marginLeft="40%";i.marginTop="3%"}else{i.width="50%";i.marginLeft="25%";i.marginTop="25%"}};xe.prototype.hide=function(){this.overlay.style.display="none"};xe.prototype.showTemporarily=function(e,t){this.show(t);this.timer=setTimeout(this.hide.bind(this),e)};xe.prototype.disableShowTemporarily=function(){clearTimeout(this.timer)};xe.prototype.update=function(){this.disableShowTemporarily();if(!d()&&A()){this.show()}else{this.hide()}};xe.prototype.loadIcon_=function(){this.icon=t("image/svg+xml",Ae)};var Ee="CardboardV1";var Se="WEBVR_CARDBOARD_VIEWER";var De="webvr-polyfill-viewer-selector";function Ne(e){try{this.selectedKey=localStorage.getItem(Se)}catch(e){console.error("Failed to load viewer profile: %s",e)}if(!this.selectedKey){this.selectedKey=e||Ee}this.dialog=this.createDialog_(se.Viewers);this.root=null;this.onChangeCallbacks_=[]}Ne.prototype.show=function(e){this.root=e;
1e.appendChild(this.dialog);var t=this.dialog.querySelector("#"+this.selectedKey);t.checked=true;this.dialog.style.display="block"};Ne.prototype.hide=function(){if(this.root&&this.root.contains(this.dialog)){this.root.removeChild(this.dialog)}this.dialog.style.display="none"};Ne.prototype.getCurrentViewer=function(){return se.Viewers[this.selectedKey]};Ne.prototype.getSelectedKey_=function(){var e=this.dialog.querySelector("input[name=field]:checked");if(e){return e.id}return null};Ne.prototype.onChange=function(e){this.onChangeCallbacks_.push(e)};Ne.prototype.fireOnChange_=function(e){for(var t=0;t<this.onChangeCallbacks_.length;t++){this.onChangeCallbacks_[t](e)}};Ne.prototype.onSave_=function(){this.selectedKey=this.getSelectedKey_();if(!this.selectedKey||!se.Viewers[this.selectedKey]){console.error("ViewerSelector.onSave_: this should never happen!");return}this.fireOnChange_(se.Viewers[this.selectedKey]);try{localStorage.setItem(Se,this.selectedKey)}catch(e){console.error("Failed to save viewer profile: %s",e)}this.hide()};Ne.prototype.createDialog_=function(e){var t=document.createElement("div");t.classList.add(De);t.style.display="none";var i=document.createElement("div");var n=i.style;n.position="fixed";n.left=0;n.top=0;n.width="100%";n.height="100%";n.background="rgba(0, 0, 0, 0.3)";i.addEventListener("click",this.hide.bind(this));var r=280;var a=document.createElement("div");var n=a.style;n.boxSizing="border-box";n.position="fixed";n.top="24px";n.left="50%";n.marginLeft=-r/2+"px";n.width=r+"px";n.padding="24px";n.overflow="hidden";n.background="#fafafa";n.fontFamily="'Roboto', sans-serif";n.boxShadow="0px 5px 20px #666";a.appendChild(this.createH1_("Select your viewer"));for(var s in e){a.appendChild(this.createChoice_(s,e[s].label))}a.appendChild(this.createButton_("Save",this.onSave_.bind(this)));t.appendChild(i);t.appendChild(a);return t};Ne.prototype.createH1_=function(e){var t=document.createElement("h1");var i=t.style;i.color="black";i.fontSize="20px";i.fontWeight="bold";i.marginTop=0;i.marginBottom="24px";t.innerHTML=e;return t};Ne.prototype.createChoice_=function(e,t){var i=document.createElement("div");i.style.marginTop="8px";i.style.color="black";var n=document.createElement("input");n.style.fontSize="30px";n.setAttribute("id",e);n.setAttribute("type","radio");n.setAttribute("value",e);n.setAttribute("name","field");var r=document.createElement("label");r.style.marginLeft="4px";r.setAttribute("for",e);r.innerHTML=t;i.appendChild(n);i.appendChild(r);return i};Ne.prototype.createButton_=function(e,t){var i=document.createElement("button");i.innerHTML=e;var n=i.style;n.float="right";n.textTransform="uppercase";n.color="#1094f7";n.fontSize="14px";n.letterSpacing=0;n.border=0;n.background="none";n.marginTop="16px";i.addEventListener("click",t);return i};var Ce=typeof window!=="undefined"?window:typeof Ve!=="undefined"?Ve:typeof self!=="undefined"?self:{};function Le(e){return e&&e.__esModule?e["default"]:e}function Ie(e,t){return t={exports:{}},e(t,t.exports),t.exports}var Oe=Ie(function(n,e){(function e(t,i){n.exports=i()})(Ce,function(){return function(i){var n={};function r(e){if(n[e]){return n[e].exports}var t=n[e]={i:e,l:false,exports:{}};i[e].call(t.exports,t,t.exports,r);t.l=true;return t.exports}r.m=i;r.c=n;r.d=function(e,t,i){if(!r.o(e,t)){Object.defineProperty(e,t,{configurable:false,enumerable:true,get:i})}};r.n=function(t){var e=t&&t.__esModule?function e(){return t["default"]}:function e(){return t};r.d(e,"a",e);return e};r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};r.p="";return r(r.s=0)}([function(e,t,i){var n=function(){function n(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||false;n.configurable=true;if("value"in n)n.writable=true;Object.defineProperty(e,n.key,n)}}return function(e,t,i){if(t)n(e.prototype,t);if(i)n(e,i);return e}}();function r(e,t){if(!(e instanceof t)){throw new TypeError("Cannot call a class as a function")}}var a=i(1);var s=typeof navigator!=="undefined"&&parseFloat((""+(/CPU.*OS ([0-9_]{3,4})[0-9_]{0,1}
1|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent)||[0,""])[1]).replace("undefined","3_2").replace("_",".").replace("_",""))<10&&!window.MSStream;var o=function(){function e(){r(this,e);if(s){this.noSleepTimer=null}else{this.noSleepVideo=document.createElement("video");this.noSleepVideo.setAttribute("playsinline","");this.noSleepVideo.setAttribute("src",a);this.noSleepVideo.addEventListener("timeupdate",function(e){if(this.noSleepVideo.currentTime>.5){this.noSleepVideo.currentTime=Math.random()}}.bind(this))}}n(e,[{key:"enable",value:function e(){if(s){this.disable();this.noSleepTimer=window.setInterval(function(){window.location.href="/";window.setTimeout(window.stop,0)},15e3)}else{this.noSleepVideo.play()}}},{key:"disable",value:function e(){if(s){if(this.noSleepTimer){window.clearInterval(this.noSleepTimer);this.noSleepTimer=null}}else{this.noSleepVideo.pause()}}}]);return e}();e.exports=o},function(e,t,i){e.exports="data:video/mp4;base64,AAAAIGZ0eXBtcDQyAAACAGlzb21pc28yYXZjMW1wNDEAAAAIZnJlZQAACKBtZGF0AAAC8wYF///v3EXpvebZSLeWLNgg2SPu73gyNjQgLSBjb3JlIDE0MiByMjQ3OSBkZDc5YTYxIC0gSC4yNjQvTVBFRy00IEFWQyBjb2RlYyAtIENvcHlsZWZ0IDIwMDMtMjAxNCAtIGh0dHA6Ly93d3cudmlkZW9sYW4ub3JnL3gyNjQuaHRtbCAtIG9wdGlvbnM6IGNhYmFjPTEgcmVmPTEgZGVibG9jaz0xOjA6MCBhbmFseXNlPTB4MToweDExMSBtZT1oZXggc3VibWU9MiBwc3k9MSBwc3lfcmQ9MS4wMDowLjAwIG1peGVkX3JlZj0wIG1lX3JhbmdlPTE2IGNocm9tYV9tZT0xIHRyZWxsaXM9MCA4eDhkY3Q9MCBjcW09MCBkZWFkem9uZT0yMSwxMSBmYXN0X3Bza2lwPTEgY2hyb21hX3FwX29mZnNldD0wIHRocmVhZHM9NiBsb29rYWhlYWRfdGhyZWFkcz0xIHNsaWNlZF90aHJlYWRzPTAgbnI9MCBkZWNpbWF0ZT0xIGludGVybGFjZWQ9MCBibHVyYXlfY29tcGF0PTAgY29uc3RyYWluZWRfaW50cmE9MCBiZnJhbWVzPTMgYl9weXJhbWlkPTIgYl9hZGFwdD0xIGJfYmlhcz0wIGRpcmVjdD0xIHdlaWdodGI9MSBvcGVuX2dvcD0wIHdlaWdodHA9MSBrZXlpbnQ9MzAwIGtleWludF9taW49MzAgc2NlbmVjdXQ9NDAgaW50cmFfcmVmcmVzaD0wIHJjX2xvb2thaGVhZD0xMCByYz1jcmYgbWJ0cmVlPTEgY3JmPTIwLjAgcWNvbXA9MC42MCBxcG1pbj0wIHFwbWF4PTY5IHFwc3RlcD00IHZidl9tYXhyYXRlPTIwMDAwIHZidl9idWZzaXplPTI1MDAwIGNyZl9tYXg9MC4wIG5hbF9ocmQ9bm9uZSBmaWxsZXI9MCBpcF9yYXRpbz0xLjQwIGFxPTE6MS4wMACAAAAAOWWIhAA3//p+C7v8tDDSTjf97w55i3SbRPO4ZY+hkjD5hbkAkL3zpJ6h/LR1CAABzgB1kqqzUorlhQAAAAxBmiQYhn/+qZYADLgAAAAJQZ5CQhX/AAj5IQADQGgcIQADQGgcAAAACQGeYUQn/wALKCEAA0BoHAAAAAkBnmNEJ/8ACykhAANAaBwhAANAaBwAAAANQZpoNExDP/6plgAMuSEAA0BoHAAAAAtBnoZFESwr/wAI+SEAA0BoHCEAA0BoHAAAAAkBnqVEJ/8ACykhAANAaBwAAAAJAZ6nRCf/AAsoIQADQGgcIQADQGgcAAAADUGarDRMQz/+qZYADLghAANAaBwAAAALQZ7KRRUsK/8ACPkhAANAaBwAAAAJAZ7pRCf/AAsoIQADQGgcIQADQGgcAAAACQGe60Qn/wALKCEAA0BoHAAAAA1BmvA0TEM//qmWAAy5IQADQGgcIQADQGgcAAAAC0GfDkUVLCv/AAj5IQADQGgcAAAACQGfLUQn/wALKSEAA0BoHCEAA0BoHAAAAAkBny9EJ/8ACyghAANAaBwAAAANQZs0NExDP/6plgAMuCEAA0BoHAAAAAtBn1JFFSwr/wAI+SEAA0BoHCEAA0BoHAAAAAkBn3FEJ/8ACyghAANAaBwAAAAJAZ9zRCf/AAsoIQADQGgcIQADQGgcAAAADUGbeDRMQz/+qZYADLkhAANAaBwAAAALQZ+WRRUsK/8ACPghAANAaBwhAANAaBwAAAAJAZ+1RCf/AAspIQADQGgcAAAACQGft0Qn/wALKSEAA0BoHCEAA0BoHAAAAA1Bm7w0TEM//qmWAAy4IQADQGgcAAAAC0Gf2kUVLCv/AAj5IQADQGgcAAAACQGf+UQn/wALKCEAA0BoHCEAA0BoHAAAAAkBn/tEJ/8ACykhAANAaBwAAAANQZvgNExDP/6plgAMuSEAA0BoHCEAA0BoHAAAAAtBnh5FFSwr/wAI+CEAA0BoHAAAAAkBnj1EJ/8ACyghAANAaBwhAANAaBwAAAAJAZ4/RCf/AAspIQADQGgcAAAADUGaJDRMQz/+qZYADLghAANAaBwAAAALQZ5CRRUsK/8ACPkhAANAaBwhAANAaBwAAAAJAZ5hRCf/AAsoIQADQGgcAAAACQGeY0Qn/wALKSEAA0BoHCEAA0BoHAAAAA1Bmmg0TEM//qmWAAy5IQADQGgcAAAAC0GehkUVLCv/AAj5IQADQGgcIQADQGgcAAAACQGepUQn/wALKSEAA0BoHAAAAAkBnqdEJ/8ACyghAANAaBwAAAANQZqsNExDP/6plgAMuCEAA0BoHCEAA0BoHAAAAAtBnspFFSwr/wAI+SEAA0BoHAAAAAkBnulEJ/8ACyghAANAaBwhAANAaBwAAAAJAZ7rRCf/AAsoIQADQGgcAAAADUGa8DRMQz/+qZYADLkhAANAaBwhAANAaBwAAAALQZ8ORRUsK/8ACPkhAANAaBwAAAAJAZ8tRCf/AAspIQADQGgcIQADQGgcAAAACQGfL0Qn/wALKCEAA0BoHAAAAA1BmzQ0TEM//qmWAAy4IQADQGgcAAAAC0GfUkUVLCv/AAj5IQADQGgcIQADQGgcAAAACQGfcUQn/wALKCEAA0BoHAAAAAkBn3NEJ/8ACyghAANAaBwhAANAaBwAAAANQZt4NExC//6plgAMuSEAA0BoHAAAAAtBn5ZFFSwr/wAI+CEAA0BoHCEAA0BoHAAAAAkBn7VEJ/8ACykhAANAaBwAAAAJAZ+3RCf/AAspIQADQGgcAAAADUGbuzRMQn/+nhAAYsAhAANAaBwhAANAaBwAAAAJQZ/aQhP/AAspIQADQGgcAAAACQGf+UQn/wALKCEAA0BoHCEAA0BoHCEAA0BoHCEAA0BoHCEAA0BoHCEAA0BoHAAACiFtb292AAAAbG12aGQAAAAA1YCCX9WAgl8AAAPoAAAH/AABAAABAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAGGlvZHMAAAAAEICAgAcAT////v7/AAAF+XRyYWsAAABcdGtoZAAAAAPVgIJf1YCCXwAAAAEAAAAAAAAH0AAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAygAAAMoAAAAAACRlZHRzAAAAHGVsc3QAAAAAAAAAAQAAB9AAABdwAAEAAAAABXFtZGlhAAAAIG1kaGQAAAAA1YCCX9WAgl8AAV+QAAK/IFXEAAAAAAAtaGRscgAAAAAAAAAAdmlkZQAAAAAAAAAAAAAAAFZpZGVvSGFuZGxlcgAAAAUcbWluZgAAABR2bWhkAAAAAQAAAAAAAAAAAAAAJGRpbmYAAAAcZHJlZgAAAAAAAAABAAAADHVybCAAAAABAAAE3HN0YmwAAACYc3RzZAAAAAAAAAABAAAAiGF2YzEAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAygDKAEgAAABIAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY//8AAAAyYXZjQwFNQCj/4QAbZ01AKOyho3ySTUBAQFAAAAMAEAAr8gDxgxlgAQAEaO+G8gAAABhzdHRzAAAAAAAAAAEAAAA8AAALuAAAABRzdHNzAAAAAAAAAAEAAAABAAAB8GN0dHMAAAAAAAAAPAAAAAEAABdwAAAAAQAAOpgAAAABAAAXcAAAAAEAAAAAAAAAAQAAC7gAAAABAAA6mAAAAAEAABdwAAAAAQAAAAAAAAABAAALuAAAAAEAADqYAAAAAQAAF3AAAAABAAAAAAAAAAEAAAu4AAAAAQAAOpgAAAABAAAXcAAAAAEAAAAAAAAAAQAAC7gAAAABAAA6mAAAAAEAABdwAAAAAQAAAAAAAAABAAALuAAAAAEAADqYAAAAAQAAF3AAAAABAAAAAAAAAAEAAAu4AAAAAQAAOpgAAAABAAAXcAAAAAEAAAAAAAAAAQAAC7gAAAABAAA6mAAAAAEAABdwAAAAAQAAAAAAAAABAAALuAAAAAEAADqYAAAAAQAAF3AAAAABAAAAAAAAAAEAAAu4AAAAAQAAOpgAAAABAAAXcAAAAAEAAAAAAAAAAQAAC7gAAAABAAA6mAAAAAEAABdwAAAAAQAAAAAAAAABAAALuAAAAAEAADqYAAAAAQAAF3AAAAABAAAAAAAAAAEAAAu4AAAAAQAAOpgAAAABAAAXcAAAAAEAAAAAAAAAAQAAC7gAAAABAAA6mAAAAAEAABdwAAAAAQAAAAAAAAABAAALuAAAAAEAAC7gAAAAAQAAF3AAAAABAAAAAAAAABxzdHNjAAAAAAAAAAEAAAABAAAAAQAAAAEAAAEEc3RzegAAAAAAAAAAAAAAPAAAAzQAAAAQAAAADQAAAA0AAAANAAAAEQAAAA8AAAANAAAADQAAABEAAAAPAAAADQAAAA0AAAARAAAADwAAAA0AAAANAAAAEQAAAA8AAAANAAAADQAAABEAAAAPAAAADQAAAA0AAAARAAAADwAAAA0AAAANAAAAEQAAAA8AAAANAAAADQAAABEAAAAPAAAADQAAAA0AAAARAAAADwAAAA0AAAANAAAAEQAAAA8AAAANAAAADQAAABEAAAAPAAAADQAAAA0AAAARAAAADwAAAA0AAAANAAAAEQAAAA8AAAANAAAADQAAABEAAAANAAAADQAAAQBzdGNvAAAAAAAAADwAAAAwAAADZAAAA3QAAAONAAADoAAAA7kAAAPQAAAD6wAAA/4AAAQXAAAELgAABEMAAARcAAAEbwAABIwAAAShAAAEugAABM0AAATkAAAE/wAABRIAAAUrAAAFQgAABV0AAAVwAAAFiQAABaAAAAW1AAAFzgAABe
1EAAAX+AAAGEwAABiwAAAY/AAAGVgAABnEAAAaEAAAGnQAABrQAAAbPAAAG4gAABvUAAAcSAAAHJwAAB0AAAAdTAAAHcAAAB4UAAAeeAAAHsQAAB8gAAAfjAAAH9gAACA8AAAgmAAAIQQAACFQAAAhnAAAIhAAACJcAAAMsdHJhawAAAFx0a2hkAAAAA9WAgl/VgIJfAAAAAgAAAAAAAAf8AAAAAAAAAAAAAAABAQAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAACsm1kaWEAAAAgbWRoZAAAAADVgIJf1YCCXwAArEQAAWAAVcQAAAAAACdoZGxyAAAAAAAAAABzb3VuAAAAAAAAAAAAAAAAU3RlcmVvAAAAAmNtaW5mAAAAEHNtaGQAAAAAAAAAAAAAACRkaW5mAAAAHGRyZWYAAAAAAAAAAQAAAAx1cmwgAAAAAQAAAidzdGJsAAAAZ3N0c2QAAAAAAAAAAQAAAFdtcDRhAAAAAAAAAAEAAAAAAAAAAAACABAAAAAArEQAAAAAADNlc2RzAAAAAAOAgIAiAAIABICAgBRAFQAAAAADDUAAAAAABYCAgAISEAaAgIABAgAAABhzdHRzAAAAAAAAAAEAAABYAAAEAAAAABxzdHNjAAAAAAAAAAEAAAABAAAAAQAAAAEAAAAUc3RzegAAAAAAAAAGAAAAWAAAAXBzdGNvAAAAAAAAAFgAAAOBAAADhwAAA5oAAAOtAAADswAAA8oAAAPfAAAD5QAAA/gAAAQLAAAEEQAABCgAAAQ9AAAEUAAABFYAAARpAAAEgAAABIYAAASbAAAErgAABLQAAATHAAAE3gAABPMAAAT5AAAFDAAABR8AAAUlAAAFPAAABVEAAAVXAAAFagAABX0AAAWDAAAFmgAABa8AAAXCAAAFyAAABdsAAAXyAAAF+AAABg0AAAYgAAAGJgAABjkAAAZQAAAGZQAABmsAAAZ+AAAGkQAABpcAAAauAAAGwwAABskAAAbcAAAG7wAABwYAAAcMAAAHIQAABzQAAAc6AAAHTQAAB2QAAAdqAAAHfwAAB5IAAAeYAAAHqwAAB8IAAAfXAAAH3QAAB/AAAAgDAAAICQAACCAAAAg1AAAIOwAACE4AAAhhAAAIeAAACH4AAAiRAAAIpAAACKoAAAiwAAAItgAACLwAAAjCAAAAFnVkdGEAAAAObmFtZVN0ZXJlbwAAAHB1ZHRhAAAAaG1ldGEAAAAAAAAAIWhkbHIAAAAAAAAAAG1kaXJhcHBsAAAAAAAAAAAAAAAAO2lsc3QAAAAzqXRvbwAAACtkYXRhAAAAAQAAAABIYW5kQnJha2UgMC4xMC4yIDIwMTUwNjExMDA="}])})});var je=Le(Oe);var ke=1e3;var Pe=[0,0,.5,1];var Re=[.5,0,.5,1];var ze=window.requestAnimationFrame;var Ue=window.cancelAnimationFrame;function Be(){this.leftProjectionMatrix=new Float32Array(16);
1this.leftViewMatrix=new Float32Array(16);this.rightProjectionMatrix=new Float32Array(16);this.rightViewMatrix=new Float32Array(16);this.pose=null}function Fe(t){Object.defineProperties(this,{hasPosition:{writable:false,enumerable:true,value:t.hasPosition},hasExternalDisplay:{writable:false,enumerable:true,value:t.hasExternalDisplay},canPresent:{writable:false,enumerable:true,value:t.canPresent},maxLayers:{writable:false,enumerable:true,value:t.maxLayers},hasOrientation:{enumerable:true,get:function e(){I("VRDisplayCapabilities.prototype.hasOrientation","VRDisplay.prototype.getFrameData");return t.hasOrientation}}})}function Ge(e){e=e||{};var t="wakelock"in e?e.wakelock:true;this.isPolyfilled=true;this.displayId=ke++;this.displayName="";this.depthNear=.01;this.depthFar=1e4;this.isPresenting=false;Object.defineProperty(this,"isConnected",{get:function e(){I("VRDisplay.prototype.isConnected","VRDisplayCapabilities.prototype.hasExternalDisplay");return false}});this.capabilities=new Fe({hasPosition:false,hasOrientation:false,hasExternalDisplay:false,canPresent:false,maxLayers:1});this.stageParameters=null;this.waitingForPresent_=false;this.layer_=null;this.originalParent_=null;this.fullscreenElement_=null;this.fullscreenWrapper_=null;this.fullscreenElementCachedStyle_=null;this.fullscreenEventTarget_=null;this.fullscreenChangeHandler_=null;this.fullscreenErrorHandler_=null;if(t&&A()){this.wakelock_=new je}}Ge.prototype.getFrameData=function(e){return S(e,this._getPose(),this)};Ge.prototype.getPose=function(){I("VRDisplay.prototype.getPose","VRDisplay.prototype.getFrameData");return this._getPose()};Ge.prototype.resetPose=function(){I("VRDisplay.prototype.resetPose");return this._resetPose()};Ge.prototype.getImmediatePose=function(){I("VRDisplay.prototype.getImmediatePose","VRDisplay.prototype.getFrameData");return this._getPose()};Ge.prototype.requestAnimationFrame=function(e){return ze(e)};Ge.prototype.cancelAnimationFrame=function(e){return Ue(e)};Ge.prototype.wrapForFullscreen=function(e){if(p()){return e}if(!this.fullscreenWrapper_){this.fullscreenWrapper_=document.createElement("div");var t=["height: "+Math.min(screen.height,screen.width)+"px !important","top: 0 !important","left: 0 !important","right: 0 !important","border: 0","margin: 0","padding: 0","z-index: 999999 !important","position: fixed"];this.fullscreenWrapper_.setAttribute("style",t.join("; ")+";");this.fullscreenWrapper_.classList.add("webvr-polyfill-fullscreen-wrapper")}if(this.fullscreenElement_==e){return this.fullscreenWrapper_}if(this.fullscreenElement_){if(this.originalParent_){this.originalParent_.appendChild(this.fullscreenElement_)}else{this.fullscreenElement_.parentElement.removeChild(this.fullscreenElement_)}}this.fullscreenElement_=e;this.originalParent_=e.parentElement;if(!this.originalParent_){document.body.appendChild(e)}if(!this.fullscreenWrapper_.parentElement){var i=this.fullscreenElement_.parentElement;i.insertBefore(this.fullscreenWrapper_,this.fullscreenElement_);i.removeChild(this.fullscreenElement_)}this.fullscreenWrapper_.insertBefore(this.fullscreenElement_,this.fullscreenWrapper_.firstChild);this.fullscreenElementCachedStyle_=this.fullscreenElement_.getAttribute("style");var n=this;function r(){if(!n.fullscreenElement_){return}var e=["position: absolute","top: 0","left: 0","width: "+Math.max(screen.width,screen.height)+"px","height: "+Math.min(screen.height,screen.width)+"px","border: 0","margin: 0","padding: 0"];n.fullscreenElement_.setAttribute("style",e.join("; ")+";")}r();return this.fullscreenWrapper_};Ge.prototype.removeFullscreenWrapper=function(){if(!this.fullscreenElement_){return}var e=this.fullscreenElement_;if(this.fullscreenElementCachedStyle_){e.setAttribute("style",this.fullscreenElementCachedStyle_)}else{e.removeAttribute("style")}this.fullscreenElement_=null;this.fullscreenElementCachedStyle_=null;var t=this.fullscreenWrapper_.parentElement;this.fullscreenWrapper_.removeChild(e);if(this.originalParent_===t){t.insertBefore(e,this.fullscreenWrapper_)}else if(this.originalParent_){this.originalParent_.appendChild(e)}t.removeChild(this.fullscreenWrapper_);return e};Ge.prototype.requestPresent=function(c){var h=this.isPresenting;var d=this;if(!(c instanceof Array)){I("VRDisplay.prototype.requestPresent with non-array argument","an array of VRLayers as the first argument");c=[c]}return new Promise(function(i,t){if(!d.capabilities.canPresent){t(new Error("VRDisplay is not capable of presenting."));return}if(c.length==0||c.length>d.capabilities.maxLayers){t(new Error("Invalid number of layers."));return}var e=c[0];if(!e.source){i();return}var n=e.leftBounds||Pe;var r=e.rightBounds||Re;if(h){var a=d.layer_;if(a.source!==e.source){a.source=e.source}for(var s=0;s<4;s++){a.leftBounds[s]=n[s];a.rightBounds[s]=r[s]}d.wrapForFullscreen(d.layer_.source);
1d.updatePresent_();i();return}d.layer_={predistorted:e.predistorted,source:e.source,leftBounds:n.slice(0),rightBounds:r.slice(0)};d.waitingForPresent_=false;if(d.layer_&&d.layer_.source){var o=d.wrapForFullscreen(d.layer_.source);var l=function e(){var t=_();d.isPresenting=o===t;if(d.isPresenting){if(screen.orientation&&screen.orientation.lock){screen.orientation.lock("landscape-primary").catch(function(e){console.error("screen.orientation.lock() failed due to",e.message)})}d.waitingForPresent_=false;d.beginPresent_();i()}else{if(screen.orientation&&screen.orientation.unlock){screen.orientation.unlock()}d.removeFullscreenWrapper();d.disableWakeLock();d.endPresent_();d.removeFullscreenListeners_()}d.fireVRDisplayPresentChange_()};var u=function e(){if(!d.waitingForPresent_){return}d.removeFullscreenWrapper();d.removeFullscreenListeners_();d.disableWakeLock();d.waitingForPresent_=false;d.isPresenting=false;t(new Error("Unable to present."))};d.addFullscreenListeners_(o,l,u);if(v(o)){d.enableWakeLock();d.waitingForPresent_=true}else if(p()||f()){d.enableWakeLock();d.isPresenting=true;d.beginPresent_();d.fireVRDisplayPresentChange_();i()}}if(!d.waitingForPresent_&&!p()){y();t(new Error("Unable to present."))}})};Ge.prototype.exitPresent=function(){var i=this.isPresenting;var n=this;this.isPresenting=false;this.layer_=null;this.disableWakeLock();return new Promise(function(e,t){if(i){if(!y()&&p()){n.endPresent_();n.fireVRDisplayPresentChange_()}if(f()){n.removeFullscreenWrapper();n.removeFullscreenListeners_();n.endPresent_();n.fireVRDisplayPresentChange_()}e()}else{t(new Error("Was not presenting to VRDisplay."))}})};Ge.prototype.getLayers=function(){if(this.layer_){return[this.layer_]}return[]};Ge.prototype.fireVRDisplayPresentChange_=function(){var e=new CustomEvent("vrdisplaypresentchange",{detail:{display:this}});window.dispatchEvent(e)};Ge.prototype.fireVRDisplayConnect_=function(){var e=new CustomEvent("vrdisplayconnect",{detail:{display:this}});window.dispatchEvent(e)};Ge.prototype.addFullscreenListeners_=function(e,t,i){this.removeFullscreenListeners_();this.fullscreenEventTarget_=e;this.fullscreenChangeHandler_=t;this.fullscreenErrorHandler_=i;if(t){if(document.fullscreenEnabled){e.addEventListener("fullscreenchange",t,false)}else if(document.webkitFullscreenEnabled){e.addEventListener("webkitfullscreenchange",t,false)}else if(document.mozFullScreenEnabled){document.addEventListener("mozfullscreenchange",t,false)}else if(document.msFullscreenEnabled){e.addEventListener("msfullscreenchange",t,false)}}if(i){if(document.fullscreenEnabled){e.addEventListener("fullscreenerror",i,false)}else if(document.webkitFullscreenEnabled){e.addEventListener("webkitfullscreenerror",i,false)}else if(document.mozFullScreenEnabled){document.addEventListener("mozfullscreenerror",i,false)}else if(document.msFullscreenEnabled){e.addEventListener("msfullscreenerror",i,false)}}};Ge.prototype.removeFullscreenListeners_=function(){if(!this.fullscreenEventTarget_)return;var e=this.fullscreenEventTarget_;if(this.fullscreenChangeHandler_){var t=this.fullscreenChangeHandler_;e.removeEventListener("fullscreenchange",t,false);e.removeEventListener("webkitfullscreenchange",t,false);document.removeEventListener("mozfullscreenchange",t,false);e.removeEventListener("msfullscreenchange",t,false)}if(this.fullscreenErrorHandler_){var i=this.fullscreenErrorHandler_;e.removeEventListener("fullscreenerror",i,false);e.removeEventListener("webkitfullscreenerror",i,false);document.removeEventListener("mozfullscreenerror",i,false);e.removeEventListener("msfullscreenerror",i,false)}this.fullscreenEventTarget_=null;this.fullscreenChangeHandler_=null;this.fullscreenErrorHandler_=null};Ge.prototype.enableWakeLock=function(){if(this.wakelock_){this.wakelock_.enable()}};Ge.prototype.disableWakeLock=function(){if(this.wakelock_){this.wakelock_.disable()}};Ge.prototype.beginPresent_=function(){};Ge.prototype.endPresent_=function(){};Ge.prototype.submitFrame=function(e){};Ge.prototype.getEyeParameters=function(e){return null};var He={ADDITIONAL_VIEWERS:[],DEFAULT_VIEWER:"",MOBILE_WAKE_LOCK:true,DEBUG:false,DPDB_URL:"https://dpdb.webvr.rocks/dpdb.json",K_FILTER:.98,PREDICTION_TIME_S:.04,CARDBOARD_UI_DISABLED:false,ROTATE_INSTRUCTIONS_DISABLED:false,YAW_ONLY:false,BUFFER_SCALE:.5,DIRTY_SUBMIT_FRAME_BINDINGS:false};var Ye={LEFT:"left",RIGHT:"right"};function Qe(e){var t=x({},He);e=x(t,e||{});Ge.call(this,{wakelock:e.MOBILE_WAKE_LOCK});this.config=e;
1this.displayName="Cardboard VRDisplay";this.capabilities=new Fe({hasPosition:false,hasOrientation:true,hasExternalDisplay:false,canPresent:true,maxLayers:1});this.stageParameters=null;this.bufferScale_=this.config.BUFFER_SCALE;this.poseSensor_=new Te(this.config);this.distorter_=null;this.cardboardUI_=null;this.dpdb_=new de(this.config.DPDB_URL,this.onDeviceParamsUpdated_.bind(this));this.deviceInfo_=new se(this.dpdb_.getDeviceParams(),e.ADDITIONAL_VIEWERS);this.viewerSelector_=new Ne(e.DEFAULT_VIEWER);this.viewerSelector_.onChange(this.onViewerChanged_.bind(this));this.deviceInfo_.setViewer(this.viewerSelector_.getCurrentViewer());if(!this.config.ROTATE_INSTRUCTIONS_DISABLED){this.rotateInstructions_=new xe}if(p()){window.addEventListener("resize",this.onResize_.bind(this))}}Qe.prototype=Object.create(Ge.prototype);Qe.prototype._getPose=function(){return{position:null,orientation:this.poseSensor_.getOrientation(),linearVelocity:null,linearAcceleration:null,angularVelocity:null,angularAcceleration:null}};Qe.prototype._resetPose=function(){if(this.poseSensor_.resetPose){this.poseSensor_.resetPose()}};Qe.prototype._getFieldOfView=function(e){var t;if(e==Ye.LEFT){t=this.deviceInfo_.getFieldOfViewLeftEye()}else if(e==Ye.RIGHT){t=this.deviceInfo_.getFieldOfViewRightEye()}else{console.error("Invalid eye provided: %s",e);return null}return t};Qe.prototype._getEyeOffset=function(e){var t;if(e==Ye.LEFT){t=[-this.deviceInfo_.viewer.interLensDistance*.5,0,0]}else if(e==Ye.RIGHT){t=[this.deviceInfo_.viewer.interLensDistance*.5,0,0]}else{console.error("Invalid eye provided: %s",e);return null}return t};Qe.prototype.getEyeParameters=function(e){var t=this._getEyeOffset(e);var i=this._getFieldOfView(e);var n={offset:t,renderWidth:this.deviceInfo_.device.width*.5*this.bufferScale_,renderHeight:this.deviceInfo_.device.height*this.bufferScale_};Object.defineProperty(n,"fieldOfView",{enumerable:true,get:function e(){I("VRFieldOfView","VRFrameData's projection matrices");return i}});return n};Qe.prototype.onDeviceParamsUpdated_=function(e){if(this.config.DEBUG){console.log("DPDB reported that device params were updated.")}this.deviceInfo_.updateDeviceParams(e);if(this.distorter_){this.distorter_.updateDeviceInfo(this.deviceInfo_)}};Qe.prototype.updateBounds_=function(){if(this.layer_&&this.distorter_&&(this.layer_.leftBounds||this.layer_.rightBounds)){this.distorter_.setTextureBounds(this.layer_.leftBounds,this.layer_.rightBounds)}};Qe.prototype.beginPresent_=function(){var e=this.layer_.source.getContext("webgl");if(!e)e=this.layer_.source.getContext("experimental-webgl");if(!e)e=this.layer_.source.getContext("webgl2");if(!e)return;if(this.layer_.predistorted){if(!this.config.CARDBOARD_UI_DISABLED){e.canvas.width=g()*this.bufferScale_;e.canvas.height=m()*this.bufferScale_;this.cardboardUI_=new Z(e)}}else{if(!this.config.CARDBOARD_UI_DISABLED){this.cardboardUI_=new Z(e)}this.distorter_=new R(e,this.cardboardUI_,this.config.BUFFER_SCALE,this.config.DIRTY_SUBMIT_FRAME_BINDINGS);this.distorter_.updateDeviceInfo(this.deviceInfo_)}if(this.cardboardUI_){this.cardboardUI_.listen(function(e){this.viewerSelector_.show(this.layer_.source.parentElement);e.stopPropagation();e.preventDefault()}.bind(this),function(e){this.exitPresent();e.stopPropagation();e.preventDefault()}.bind(this))}if(this.rotateInstructions_){if(d()&&A()){this.rotateInstructions_.showTemporarily(3e3,this.layer_.source.parentElement)}else{this.rotateInstructions_.update()}}this.orientationHandler=this.onOrientationChange_.bind(this);window.addEventListener("orientationchange",this.orientationHandler);this.vrdisplaypresentchangeHandler=this.updateBounds_.bind(this);window.addEventListener("vrdisplaypresentchange",this.vrdisplaypresentchangeHandler);this.fireVRDisplayDeviceParamsChange_()};Qe.prototype.endPresent_=function(){if(this.distorter_){this.distorter_.destroy();this.distorter_=null}if(this.cardboardUI_){this.cardboardUI_.destroy();this.cardboardUI_=null}if(this.rotateInstructions_){this.rotateInstructions_.hide()}this.viewerSelector_.hide();window.removeEventListener("orientationchange",this.orientationHandler);window.removeEventListener("vrdisplaypresentchange",this.vrdisplaypresentchangeHandler)};
1Qe.prototype.updatePresent_=function(){this.endPresent_();this.beginPresent_()};Qe.prototype.submitFrame=function(e){if(this.distorter_){this.updateBounds_();this.distorter_.submitFrame()}else if(this.cardboardUI_&&this.layer_){var t=this.layer_.source.getContext("webgl").canvas;if(t.width!=this.lastWidth||t.height!=this.lastHeight){this.cardboardUI_.onResize()}this.lastWidth=t.width;this.lastHeight=t.height;this.cardboardUI_.render()}};Qe.prototype.onOrientationChange_=function(e){this.viewerSelector_.hide();if(this.rotateInstructions_){this.rotateInstructions_.update()}this.onResize_()};Qe.prototype.onResize_=function(e){if(this.layer_){var t=this.layer_.source.getContext("webgl");var i=["position: absolute","top: 0","left: 0","width: 100vw","height: 100vh","border: 0","margin: 0","padding: 0px","box-sizing: content-box"];t.canvas.setAttribute("style",i.join("; ")+";");E(t.canvas)}};Qe.prototype.onViewerChanged_=function(e){this.deviceInfo_.setViewer(e);if(this.distorter_){this.distorter_.updateDeviceInfo(this.deviceInfo_)}this.fireVRDisplayDeviceParamsChange_()};Qe.prototype.fireVRDisplayDeviceParamsChange_=function(){var e=new CustomEvent("vrdisplaydeviceparamschange",{detail:{vrdisplay:this,deviceInfo:this.deviceInfo_}});window.dispatchEvent(e)};Qe.VRFrameData=Be;Qe.VRDisplay=Ge;return Qe})})),l="0.10.6",u={ADDITIONAL_VIEWERS:[],DEFAULT_VIEWER:"",PROVIDE_MOBILE_VRDISPLAY:true,GET_VR_DISPLAYS_TIMEOUT:1e3,MOBILE_WAKE_LOCK:true,DEBUG:false,DPDB_URL:"https://dpdb.webvr.rocks/dpdb.json",K_FILTER:.98,PREDICTION_TIME_S:.04,TOUCH_PANNER_DISABLED:true,CARDBOARD_UI_DISABLED:false,ROTATE_INSTRUCTIONS_DISABLED:false,YAW_ONLY:false,BUFFER_SCALE:.5,DIRTY_SUBMIT_FRAME_BINDINGS:false};function c(e){this.config=n(n({},u),e);this.polyfillDisplays=[];this.enabled=false;this.hasNative="getVRDisplays"in navigator;this.native={};this.native.getVRDisplays=navigator.getVRDisplays;this.native.VRFrameData=window.VRFrameData;this.native.VRDisplay=window.VRDisplay;if(!this.hasNative||this.config.PROVIDE_MOBILE_VRDISPLAY&&i()){this.enable();this.getVRDisplays().then(function(e){if(e&&e[0]&&e[0].fireVRDisplayConnect_){e[0].fireVRDisplayConnect_()}})}}c.prototype.getPolyfillDisplays=function(){if(this._polyfillDisplaysPopulated){return this.polyfillDisplays}if(i()){var e=new o({ADDITIONAL_VIEWERS:this.config.ADDITIONAL_VIEWERS,DEFAULT_VIEWER:this.config.DEFAULT_VIEWER,MOBILE_WAKE_LOCK:this.config.MOBILE_WAKE_LOCK,DEBUG:this.config.DEBUG,DPDB_URL:this.config.DPDB_URL,CARDBOARD_UI_DISABLED:this.config.CARDBOARD_UI_DISABLED,K_FILTER:this.config.K_FILTER,PREDICTION_TIME_S:this.config.PREDICTION_TIME_S,TOUCH_PANNER_DISABLED:this.config.TOUCH_PANNER_DISABLED,ROTATE_INSTRUCTIONS_DISABLED:this.config.ROTATE_INSTRUCTIONS_DISABLED,YAW_ONLY:this.config.YAW_ONLY,BUFFER_SCALE:this.config.BUFFER_SCALE,DIRTY_SUBMIT_FRAME_BINDINGS:this.config.DIRTY_SUBMIT_FRAME_BINDINGS});this.polyfillDisplays.push(e)}this._polyfillDisplaysPopulated=true;return this.polyfillDisplays},c.prototype.enable=function(){this.enabled=true;if(this.hasNative&&this.native.VRFrameData){var t=this.native.VRFrameData;var i=new this.native.VRFrameData;var n=this.native.VRDisplay.prototype.getFrameData;window.VRDisplay.prototype.getFrameData=function(e){if(e instanceof t){n.call(this,e);return}n.call(this,i);e.pose=i.pose;r(i.leftProjectionMatrix,e.leftProjectionMatrix);r(i.rightProjectionMatrix,e.rightProjectionMatrix);r(i.leftViewMatrix,e.leftViewMatrix);r(i.rightViewMatrix,e.rightViewMatrix)}}navigator.getVRDisplays=this.getVRDisplays.bind(this);window.VRDisplay=o.VRDisplay;window.VRFrameData=o.VRFrameData},c.prototype.getVRDisplays=function(){var t=this;var i=this.config;if(!this.hasNative){return Promise.resolve(this.getPolyfillDisplays())}var n;var e=this.native.getVRDisplays.call(navigator);var r=new Promise(function(e){n=setTimeout(function(){console.warn("Native WebVR implementation detected, but `getVRDisplays()` failed to resolve. Falling back to polyfill.");e([])},i.GET_VR_DISPLAYS_TIMEOUT)});return a([e,r]).then(function(e){clearTimeout(n);return e.length>0?e:t.getPolyfillDisplays()})},c.version=l,c.VRFrameData=o.VRFrameData,c.VRDisplay=o.VRDisplay;var h=Object.freeze({default:c}),d=h&&c||h,p;if(typeof Ve!=="undefined"&&Ve.window){if(!Ve.document){Ve.document=Ve.window.document}if(!Ve.navigator){Ve.navigator=Ve.window.navigator}}return d}()}(e={exports:{}}),e.exports),l=(t=r)&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t;function u(){}void 0===Number.EPSILON&&(Number.EPSILON=Math.pow(2,-52)),void 0===Number.isInteger&&(Number.isInteger=function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e}),void 0===Math.sign&&(Math.sign=function(e){return e<0?-1:0<e?1:+e}),"name"in Function.prototype==!1&&Object.defineProperty(Function.prototype,"name",{get:function(){return this.toString().match(/^\s*function\s*([^\(\s]*)/)[1]}}),void 0===Object.assign&&(Object.assign=function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),i=1;i<arguments.length;i++){var n=arguments[i];if(null!=n)for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}),Object.assign(u.prototype,{addEventListener:function(e,t){void 0===this._listeners&&(this._listeners={});var i=this._listeners;void 0===i[e]&&(i[e]=[]),-1===i[e].indexOf(t)&&i[e].push(t)},hasEventListener:function(e,t){if(void 0===this._listeners)return!1;var i=this._listeners;return void 0!==i[e]&&-1!==i[e].indexOf(t)},removeEventListener:function(e,t){if(void 0!==this._listeners){var i=this._listeners[e];if(void 0!==i){var n=i.indexOf(t);-1!==n&&i.splice(n,1)}}},dispatchEvent:function(e){if(void 0!==this._listeners){var t=this._listeners[e.type];if(void 0!==t){e.target=this;for(var i=t.slice(0),n=0,r=i.length;n<r;n++)i[n].call(this,e)}}}});var c,h,d,p,g,m,v,y,_,M,w,b,T,A,x,E,S,D,N,C,L,I,V=0,W=1,q=2,Y=0,Q=1,X=2,R=1,z=2,k=0,Te=1,Z=2,Ae=0,$=0,K=1,J=2,ee=3,te=4,ie=5,O=100,j=101,P=102,U=103,B=104,F=200,G=201,H=202,ne=203,re=204,ae=205,se=206,oe=207,le=208,ue=209,ce=210,he=0,de=1,pe=2,fe=3,ge=4,me=5,ve=6,ye=7,_e=0,Me=1,we=2,be=0,xe=1,Ee=2,Se=3,De=4,Ne=301,Ce=302,Le=303,Ie=304,Oe=305,je=306,ke=307,Pe=1e3,Re=1001,ze=1002,Ue=1003,Be=1004,Fe=1005,Ge=1006,He=1007,Ye=1008,Qe=1009,Ve=1010,We=1011,qe=1012,Xe=1013,Ze=1014,$e=1015,Ke=1016,Je=1017,et=1018,tt=1019,it=1020,nt=1021,rt=1022,at=1023,st=1024,ot=1025,lt=1026,ut=1027,ct=33776,ht=33777,dt=33778,pt=33779,ft=35840,gt=35841,mt=35842,vt=35843,yt=36196,_t=37808,Mt=37809,wt=37810,bt=37811,Tt=37812,At=37813,xt=37814,Et=37815,St=37816,Dt=37817,Nt=37818,Ct=37819,Lt=37820,It=37821,Ot=0,jt=3e3,kt=3001,Pt=3007,Rt=3002,zt=3004,Ut=3005,Bt=3006,Ft=3200,Gt=3201,Ht={DEG2RAD:Math.PI/180,RAD2DEG:180/Math.PI,generateUUID:function(){for(var r=[],e=0;e<256;e++)r[e]=(e<16?"0":"")+e.toString(16);return function(){var e=4294967295*Math.random()|0,t=4294967295*Math.random()|0,i=4294967295*Math.random()|0,n=4294967295*Math.random()|0;return(r[255&e]+r[e>>8&255]+r[e>>16&255]+r[e>>24&255]+"-"+r[255&t]+r[t>>8&255]+"-"+r[t>>16&15|64]+r[t>>24&255]+"-"+r[63&i|128]+r[i>>8&255]+"-"+r[i>>16&255]+r[i>>24&255]+r[255&n]+r[n>>8&255]+r[n>>16&255]+r[n>>24&255]).toUpperCase()}}(),clamp:function(e,t,i){return Math.max(t,Math.min(i,e))},euclideanModulo:function(e,t){return(e%t+t)%t},mapLinear:function(e,t,i,n,r){return n+(e-t)*(r-n)/(i-t)},lerp:function(e,t,i){return(1-i)*e+i*t},smoothstep:function(e,t,i){return e<=t?0:i<=e?1:(e=(e-t)/(i-t))*e*(3-2*e)},smootherstep:function(e,t,i){return e<=t?0:i<=e?1:(e=(e-t)/(i-t))*e*e*(e*(6*e-15)+10)},randInt:function(e,t){return e+Math.floor(Math.random()*(t-e+1))},randFloat:function(e,t){return e+Math.random()*(t-e)},randFloatSpread:function(e){return e*(.5-Math.random())},degToRad:function(e){return e*Ht.DEG2RAD},radToDeg:function(e){return e*Ht.RAD2DEG},isPowerOfTwo:function(e){return 0==(e&e-1)&&0!==e},ceilPowerOfTwo:function(e){return Math.pow(2,Math.ceil(Math.log(e)/Math.LN2))},floorPowerOfTwo:function(e){return Math.pow(2,Math.floor(Math.log(e)/Math.LN2))}};function Yt(e,t){this.x=e||0,this.y=t||0}function Qt(){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],0<arguments.length&&console.error("THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.")}function Vt(e,t,i,n){this._x=e||0,this._y=t||0,this._z=i||0,this._w=void 0!==n?n:1}function Wt(e,t,i){this.x=e||0,this.y=t||0,this.z=i||0}function qt(){this.elements=[1,0,0,0,1,0,0,0,1],0<arguments.length&&console.error("THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.")}Object.defineProperties(Yt.prototype,{width:{get:function(){return this.x},set:function(e){this.x=e}},height:{get:function(){return this.y},set:function(e){this.y=e}}}),Object.assign(Yt.prototype,{isVector2:!0,set:function(e,t){return this.x=e,this.y=t,this},setScalar:function(e){return this.x=e,this.y=e,this},setX:function(e){return this.x=e,this},setY:function(e){return this.y=e,this},setComponent:function(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this},getComponent:function(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}},clone:function(){return new this.constructor(this.x,this.y)},copy:function(e){return this.x=e.x,this.y=e.y,this},add:function(e,t){return void 0!==t?(console.warn("THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this)},addScalar:function(e){return this.x+=e,this.y+=e,this},addVectors:function(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this},addScaledVector:function(e,t){return this.x+=e.x*t,this.y+=e.y*t,this},sub:function(e,t){return void 0!==t?(console.warn("THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.
vendor: 9,308 bytes, line 1
1y,this)},subScalar:function(e){return this.x-=e,this.y-=e,this},subVectors:function(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this},multiply:function(e){return this.x*=e.x,this.y*=e.y,this},multiplyScalar:function(e){return this.x*=e,this.y*=e,this},divide:function(e){return this.x/=e.x,this.y/=e.y,this},divideScalar:function(e){return this.multiplyScalar(1/e)},applyMatrix3:function(e){var t=this.x,i=this.y,n=e.elements;return this.x=n[0]*t+n[3]*i+n[6],this.y=n[1]*t+n[4]*i+n[7],this},min:function(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this},max:function(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this},clamp:function(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this},clampScalar:(c=new Yt,h=new Yt,function(e,t){return c.set(e,e),h.set(t,t),this.clamp(c,h)}),clampLength:function(e,t){var i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))},floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},roundToZero:function(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this},negate:function(){return this.x=-this.x,this.y=-this.y,this},dot:function(e){return this.x*e.x+this.y*e.y},lengthSq:function(){return this.x*this.x+this.y*this.y},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)},normalize:function(){return this.divideScalar(this.length()||1)},angle:function(){var e=Math.atan2(this.y,this.x);return e<0&&(e+=2*Math.PI),e},distanceTo:function(e){return Math.sqrt(this.distanceToSquared(e))},distanceToSquared:function(e){var t=this.x-e.x,i=this.y-e.y;return t*t+i*i},manhattanDistanceTo:function(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)},setLength:function(e){return this.normalize().multiplyScalar(e)},lerp:function(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this},lerpVectors:function(e,t,i){return this.subVectors(t,e).multiplyScalar(i).add(e)},equals:function(e){return e.x===this.x&&e.y===this.y},fromArray:function(e,t){return void 0===t&&(t=0),this.x=e[t],this.y=e[t+1],this},toArray:function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=0),e[t]=this.x,e[t+1]=this.y,e},fromBufferAttribute:function(e,t,i){return void 0!==i&&console.warn("THREE.Vector2: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(t),this.y=e.getY(t),this},rotateAround:function(e,t){var i=Math.cos(t),n=Math.sin(t),r=this.x-e.x,a=this.y-e.y;return this.x=r*i-a*n+e.x,this.y=r*n+a*i+e.y,this}}),Object.assign(Qt.prototype,{isMatrix4:!0,set:function(e,t,i,n,r,a,s,o,l,u,c,h,d,p,f,g){var m=this.elements;return m[0]=e,m[4]=t,m[8]=i,m[12]=n,m[1]=r,m[5]=a,m[9]=s,m[13]=o,m[2]=l,m[6]=u,m[10]=c,m[14]=h,m[3]=d,m[7]=p,m[11]=f,m[15]=g,this},identity:function(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this},clone:function(){return(new Qt).fromArray(this.elements)},copy:function(e){var t=this.elements,i=e.elements;return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t[6]=i[6],t[7]=i[7],t[8]=i[8],t[9]=i[9],t[10]=i[10],t[11]=i[11],t[12]=i[12],t[13]=i[13],t[14]=i[14],t[15]=i[15],this},copyPosition:function(e){var t=this.elements,i=e.elements;return t[12]=i[12],t[13]=i[13],t[14]=i[14],this},extractBasis:function(e,t,i){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),i.setFromMatrixColumn(this,2),this},makeBasis:function(e,t,i){return this.set(e.x,t.x,i.x,0,e.y,t.y,i.y,0,e.z,t.z,i.z,0,0,0,0,1),this},extractRotation:(w=new Wt,function(e){var t=this.elements,i=e.elements,n=1/w.setFromMatrixColumn(e,0).length(),r=1/w.setFromMatrixColumn(e,1).length(),a=1/w.setFromMatrixColumn(e,2).length();return t[0]=i[0]*n,t[1]=i[1]*n,t[2]=i[2]*n,t[3]=0,t[4]=i[4]*r,t[5]=i[5]*r,t[6]=i[6]*r,t[7]=0,t[8]=i[8]*a,t[9]=i[9]*a,t[10]=i[10]*a,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}),makeRotationFromEuler:function(e){e&&e.isEuler||console.error("THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");var t=this.elements,i=e.x,n=e.y,r=e.z,a=Math.cos(i),s=Math.sin(i),o=Math.cos(n),l=Math.sin(n),u=Math.cos(r),c=Math.sin(r);if("XYZ"===e.order){var h=a*u,d=a*c,p=s*u,f=s*c;t[0]=o*u,t[4]=-o*c,t[8]=l,t[1]=d+p*l,t[5]=h-f*l,t[9]=-s*o,t[2]=f-h*l,t[6]=p+d*l,t[10]=a*o}else if("YXZ"===e.order){var g=o*u,m=o*c,v=l*u,y=l*c;t[0]=g+y*s,t[4]=v*s-m,t[8]=a*l,t[1]=a*c,t[5]=a*u,t[9]=-s,t[2]=m*s-v,t[6]=y+g*s,t[10]=a*o}else if("ZXY"===e.order){g=o*u,m=o*c,v=l*u,y=l*c;t[0]=g-y*s,t[4]=-a*c,t[8]=v+m*s,t[1]=m+v*s,t[5]=a*u,t[9]=y-g*s,t[2]=-a*l,t[6]=s,t[10]=a*o}else if("ZYX"===e.order){h=a*u,d=a*c,p=s*u,f=s*c;t[0]=o*u,t[4]=p*l-d,t[8]=h*l+f,t[1]=o*c,t[5]=f*l+h,t[9]=d*l-p,t[2]=-l,t[6]=s*o,t[10]=a*o}else if("YZX"===e.order){var _=a*o,M=a*l,w=s*o,b=s*l;t[0]=o*u,t[4]=b-_*c,t[8]=w*c+M,t[1]=c,t[5]=a*u,t[9]=-s*u,t[2]=-l*u,t[6]=M*c+w,t[10]=_-b*c}else if("XZY"===e.order){_=a*o,M=a*l,w=s*o,b=s*l;t[0]=o*u,t[4]=-c,t[8]=l*u,t[1]=_*c+b,t[5]=a*u,t[9]=M*c-w,t[2]=w*c-M,t[6]=s*u,t[10]=b*c+_}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this},makeRotationFromQuaternion:(_=new Wt(0,0,0),M=new Wt(1,1,1),function(e){return this.compose(_,e,M)}),lookAt:(m=new Wt,v=new Wt,y=new Wt,function(e,t,i){var n=this.elements;return y.subVectors(e,t),0===y.lengthSq()&&(y.z=1),y.normalize(),m.crossVectors(i,y),0===m.lengthSq()&&(1===Math.abs(i.z)?y.x+=1e-4:y.z+=1e-4,y.normalize(),m.crossVectors(i,y)),m.normalize(),v.crossVectors(y,m),n[0]=m.x,n[4]=v.x,n[8]=y.x,n[1]=m.y,n[5]=v.y,n[9]=y.y,n[2]=m.z,n[6]=v.z,n[10]=y.z,this}),multiply:function(e,t){return void 0!==t?(console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."),this.multiplyMatrices(e,t)):this.multiplyMatrices(this,e)},premultiply:function(e){return this.multiplyMatrices(e,this)},multiplyMatrices:function(e,t){var i=e.elements,n=t.elements,r=this.elements,a=i[0],s=i[4],o=i[8],l=i[12],u=i[1],c=i[5],h=i[9],d=i[13],p=i[2],f=i[6],g=i[10],m=i[14],v=i[3],y=i[7],_=i[11],M=i[15],w=n[0],b=n[4],T=n[8],A=n[12],x=n[1],E=n[5],S=n[9],D=n[13],N=n[2],C=n[6],L=n[10],I=n[14],O=n[3],j=n[7],k=n[11],P=n[15];return r[0]=a*w+s*x+o*N+l*O,r[4]=a*b+s*E+o*C+l*j,r[8]=a*T+s*S+o*L+l*k,r[12]=a*A+s*D+o*I+l*P,r[1]=u*w+c*x+h*N+d*O,r[5]=u*b+c*E+h*C+d*j,r[9]=u*T+c*S+h*L+d*k,r[13]=u*A+c*D+h*I+d*P,r[2]=p*w+f*x+g*N+m*O,r[6]=p*b+f*E+g*C+m*j,r[10]=p*T+f*S+g*L+m*k,r[14]=p*A+f*D+g*I+m*P,r[3]=v*w+y*x+_*N+M*O,r[7]=v*b+y*E+_*C+M*j,r[11]=v*T+y*S+_*L+M*k,r[15]=v*A+y*D+_*I+M*P,this},multiplyScalar:function(e){var t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this},applyToBufferAttribute:(g=new Wt,function(e){for(var t=0,i=e.count;t<i;t++)g.x=e.getX(t),g.y=e.getY(t),g.z=e.getZ(t),g.applyMatrix4(this),e.setXYZ(t,g.x,g.y,g.z);return e}),determinant:function(){var e=this.elements,t=e[0],i=e[4],n=e[8],r=e[12],a=e[1],s=e[5],o=e[9],l=e[13],u=e[2],c=e[6],h=e[10],d=e[14];return e[3]*(r*o*c-n*l*c-r*s*h+i*l*h+n*s*d-i*o*d)+e[7]*(t*o*d-t*l*h+r*a*h-n*a*d+n*l*u-r*o*u)+e[11]*(t*l*c-t*s*d-r*a*c+i*a*d+r*s*u-i*l*u)+e[15]*(-n*s*u-t*o*c+t*s*h+n*a*c-i*a*h+i*o*u)},transpose:function(){var e,t=this.elements;return e=t[1],t[1]=t[4],t[4]=e,e=t[2],t[2]=t[8],t[8]=e,e=t[6],t[6]=t[9],t[9]=e,e=t[3],t[3]=t[12],t[12]=e,e=t[7],t[7]=t[13],t[13]=e,e=t[11],t[11]=t[14],t[14]=e,this},setPosition:function(e){var t=this.elements;return t[12]=e.x,t[13]=e.y,t[14]=e.z,this},getInverse:function(e,t){var i=this.elements,n=e.elements,r=n[0],a=n[1],s=n[2],o=n[3],l=n[4],u=n[5],c=n[6],h=n[7],d=n[8],p=n[9],f=n[10],g=n[11],m=n[12],v=n[13],y=n[14],_=n[15],M=p*y*h-v*f*h+v*c*g-u*y*g-p*c*_+u*f*_,w=m*f*h-d*y*h-m*c*g+l*y*g+d*c*_-l*f*_,b=d*v*h-m*p*h+m*u*g-l*v*g-d*u*_+l*p*_,T=m*p*c-d*v*c-m*u*f+l*v*f+d*u*y-l*p*y,A=r*M+a*w+s*b+o*T;if(0==A){var x="THREE.Matrix4: .getInverse() can't invert matrix, determinant is 0";if(!0===t)throw new Error(x);return console.warn(x),this.identity()}var E=1/A;return i[0]=M*E,i[1]=(v*f*o-p*y*o-v*s*g+a*y*g+p*s*_-a*f*_)*E,i[2]=(u*y*o-v*c*o+v*s*h-a*y*h-u*s*_+a*c*_)*E,i[3]=(p*c*o-u*f*o-p*s*h+a*f*h+u*s*g-a*c*g)*E,i[4]=w*E,i[5]=(d*y*o-m*f*o+m*s*g-r*y*g-d*s*_+r*f*_)*E,i[6]=(m*c*o-l*y*o-m*s*h+r*y*h+l*s*_-r*c*_)*E,i[7]=(l*f*o-d*c*o+d*s*h-r*f*h-l*s*g+r*c*g)*E,i[8]=b*E,i[9]=(m*p*o-d*v*o-m*a*g+r*v*g+d*a*_-r*p*_)*E,i[10]=(l*v*o-m*u*o+m*a*h-r*v*h-l*a*_+r*u*_)*E,i[11]=(d*u*o-l*p*o-d*a*h+r*p*h+l*a*g-r*u*g)*E,i[12]=T*E,i[13]=(d*v*s-m*p*s+m*a*f-r*v*f-d*a*y+r*p*y)*E,i[14]=(m*u*s-l*v*s-m*a*c+r*v*c+l*a*y-r*u*y)*E,i[15]=(l*p*s-d*u*s+d*a*c-r*p*c-l*a*f+r*u*f)*E,this},scale:function(e){var t=this.elements,i=e.x,n=e.y,r=e.z;return t[0]*=i,t[4]*=n,t[8]*=r,t[1]*=i,t[5]*=n,t[9]*=r,t[2]*=i,t[6]*=n,t[10]*=r,t[3]*=i,t[7]*=n,t[11]*=r,this},getMaxScaleOnAxis:function(){var e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],i=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],n=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,i,n))},makeTranslation:function(e,t,i){return this.set(1,0,0,e,0,1,0,t,0,0,1,i,0,0,0,1),this},makeRotationX:function(e){var t=Math.cos(e),i=Math.sin(e);
vendor: 10,507 bytes, line 1
1return this.set(1,0,0,0,0,t,-i,0,0,i,t,0,0,0,0,1),this},makeRotationY:function(e){var t=Math.cos(e),i=Math.sin(e);return this.set(t,0,i,0,0,1,0,0,-i,0,t,0,0,0,0,1),this},makeRotationZ:function(e){var t=Math.cos(e),i=Math.sin(e);return this.set(t,-i,0,0,i,t,0,0,0,0,1,0,0,0,0,1),this},makeRotationAxis:function(e,t){var i=Math.cos(t),n=Math.sin(t),r=1-i,a=e.x,s=e.y,o=e.z,l=r*a,u=r*s;return this.set(l*a+i,l*s-n*o,l*o+n*s,0,l*s+n*o,u*s+i,u*o-n*a,0,l*o-n*s,u*o+n*a,r*o*o+i,0,0,0,0,1),this},makeScale:function(e,t,i){return this.set(e,0,0,0,0,t,0,0,0,0,i,0,0,0,0,1),this},makeShear:function(e,t,i){return this.set(1,t,i,0,e,1,i,0,e,t,1,0,0,0,0,1),this},compose:function(e,t,i){var n=this.elements,r=t._x,a=t._y,s=t._z,o=t._w,l=r+r,u=a+a,c=s+s,h=r*l,d=r*u,p=r*c,f=a*u,g=a*c,m=s*c,v=o*l,y=o*u,_=o*c,M=i.x,w=i.y,b=i.z;return n[0]=(1-(f+m))*M,n[1]=(d+_)*M,n[2]=(p-y)*M,n[3]=0,n[4]=(d-_)*w,n[5]=(1-(h+m))*w,n[6]=(g+v)*w,n[7]=0,n[8]=(p+y)*b,n[9]=(g-v)*b,n[10]=(1-(h+f))*b,n[11]=0,n[12]=e.x,n[13]=e.y,n[14]=e.z,n[15]=1,this},decompose:(d=new Wt,p=new Qt,function(e,t,i){var n=this.elements,r=d.set(n[0],n[1],n[2]).length(),a=d.set(n[4],n[5],n[6]).length(),s=d.set(n[8],n[9],n[10]).length();this.determinant()<0&&(r=-r),e.x=n[12],e.y=n[13],e.z=n[14],p.copy(this);var o=1/r,l=1/a,u=1/s;return p.elements[0]*=o,p.elements[1]*=o,p.elements[2]*=o,p.elements[4]*=l,p.elements[5]*=l,p.elements[6]*=l,p.elements[8]*=u,p.elements[9]*=u,p.elements[10]*=u,t.setFromRotationMatrix(p),i.x=r,i.y=a,i.z=s,this}),makePerspective:function(e,t,i,n,r,a){void 0===a&&console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.");var s=this.elements,o=2*r/(t-e),l=2*r/(i-n),u=(t+e)/(t-e),c=(i+n)/(i-n),h=-(a+r)/(a-r),d=-2*a*r/(a-r);return s[0]=o,s[4]=0,s[8]=u,s[12]=0,s[1]=0,s[5]=l,s[9]=c,s[13]=0,s[2]=0,s[6]=0,s[10]=h,s[14]=d,s[3]=0,s[7]=0,s[11]=-1,s[15]=0,this},makeOrthographic:function(e,t,i,n,r,a){var s=this.elements,o=1/(t-e),l=1/(i-n),u=1/(a-r),c=(t+e)*o,h=(i+n)*l,d=(a+r)*u;return s[0]=2*o,s[4]=0,s[8]=0,s[12]=-c,s[1]=0,s[5]=2*l,s[9]=0,s[13]=-h,s[2]=0,s[6]=0,s[10]=-2*u,s[14]=-d,s[3]=0,s[7]=0,s[11]=0,s[15]=1,this},equals:function(e){for(var t=this.elements,i=e.elements,n=0;n<16;n++)if(t[n]!==i[n])return!1;return!0},fromArray:function(e,t){void 0===t&&(t=0);for(var i=0;i<16;i++)this.elements[i]=e[i+t];return this},toArray:function(e,t){void 0===e&&(e=[]),void 0===t&&(t=0);var i=this.elements;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e[t+9]=i[9],e[t+10]=i[10],e[t+11]=i[11],e[t+12]=i[12],e[t+13]=i[13],e[t+14]=i[14],e[t+15]=i[15],e}}),Object.assign(Vt,{slerp:function(e,t,i,n){return i.copy(e).slerp(t,n)},slerpFlat:function(e,t,i,n,r,a,s){var o=i[n+0],l=i[n+1],u=i[n+2],c=i[n+3],h=r[a+0],d=r[a+1],p=r[a+2],f=r[a+3];if(c!==f||o!==h||l!==d||u!==p){var g=1-s,m=o*h+l*d+u*p+c*f,v=0<=m?1:-1,y=1-m*m;if(y>Number.EPSILON){var _=Math.sqrt(y),M=Math.atan2(_,m*v);g=Math.sin(g*M)/_,s=Math.sin(s*M)/_}var w=s*v;if(o=o*g+h*w,l=l*g+d*w,u=u*g+p*w,c=c*g+f*w,g===1-s){var b=1/Math.sqrt(o*o+l*l+u*u+c*c);o*=b,l*=b,u*=b,c*=b}}e[t]=o,e[t+1]=l,e[t+2]=u,e[t+3]=c}}),Object.defineProperties(Vt.prototype,{x:{get:function(){return this._x},set:function(e){this._x=e,this.onChangeCallback()}},y:{get:function(){return this._y},set:function(e){this._y=e,this.onChangeCallback()}},z:{get:function(){return this._z},set:function(e){this._z=e,this.onChangeCallback()}},w:{get:function(){return this._w},set:function(e){this._w=e,this.onChangeCallback()}}}),Object.assign(Vt.prototype,{set:function(e,t,i,n){return this._x=e,this._y=t,this._z=i,this._w=n,this.onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._w)},copy:function(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this.onChangeCallback(),this},setFromEuler:function(e,t){if(!e||!e.isEuler)throw new Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");var i=e._x,n=e._y,r=e._z,a=e.order,s=Math.cos,o=Math.sin,l=s(i/2),u=s(n/2),c=s(r/2),h=o(i/2),d=o(n/2),p=o(r/2);return"XYZ"===a?(this._x=h*u*c+l*d*p,this._y=l*d*c-h*u*p,this._z=l*u*p+h*d*c,this._w=l*u*c-h*d*p):"YXZ"===a?(this._x=h*u*c+l*d*p,this._y=l*d*c-h*u*p,this._z=l*u*p-h*d*c,this._w=l*u*c+h*d*p):"ZXY"===a?(this._x=h*u*c-l*d*p,this._y=l*d*c+h*u*p,this._z=l*u*p+h*d*c,this._w=l*u*c-h*d*p):"ZYX"===a?(this._x=h*u*c-l*d*p,this._y=l*d*c+h*u*p,this._z=l*u*p-h*d*c,this._w=l*u*c+h*d*p):"YZX"===a?(this._x=h*u*c+l*d*p,this._y=l*d*c+h*u*p,this._z=l*u*p-h*d*c,this._w=l*u*c-h*d*p):"XZY"===a&&(this._x=h*u*c-l*d*p,this._y=l*d*c-h*u*p,this._z=l*u*p+h*d*c,this._w=l*u*c+h*d*p),!1!==t&&this.onChangeCallback(),this},setFromAxisAngle:function(e,t){var i=t/2,n=Math.sin(i);return this._x=e.x*n,this._y=e.y*n,this._z=e.z*n,this._w=Math.cos(i),this.onChangeCallback(),this},setFromRotationMatrix:function(e){var t,i=e.elements,n=i[0],r=i[4],a=i[8],s=i[1],o=i[5],l=i[9],u=i[2],c=i[6],h=i[10],d=n+o+h;return 0<d?(t=.5/Math.sqrt(d+1),this._w=.25/t,this._x=(c-l)*t,this._y=(a-u)*t,this._z=(s-r)*t):o<n&&h<n?(t=2*Math.sqrt(1+n-o-h),this._w=(c-l)/t,this._x=.25*t,this._y=(r+s)/t,this._z=(a+u)/t):h<o?(t=2*Math.sqrt(1+o-n-h),this._w=(a-u)/t,this._x=(r+s)/t,this._y=.25*t,this._z=(l+c)/t):(t=2*Math.sqrt(1+h-n-o),this._w=(s-r)/t,this._x=(a+u)/t,this._y=(l+c)/t,this._z=.25*t),this.onChangeCallback(),this},setFromUnitVectors:(T=new Wt,function(e,t){return void 0===T&&(T=new Wt),(b=e.dot(t)+1)<1e-6?(b=0,Math.abs(e.x)>Math.abs(e.z)?T.set(-e.y,e.x,0):T.set(0,-e.z,e.y)):T.crossVectors(e,t),this._x=T.x,this._y=T.y,this._z=T.z,this._w=b,this.normalize()}),inverse:function(){return this.conjugate()},conjugate:function(){return this._x*=-1,this._y*=-1,this._z*=-1,this.onChangeCallback(),this},dot:function(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w},lengthSq:function(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w},length:function(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)},normalize:function(){var e=this.length();return 0===e?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this.onChangeCallback(),this},multiply:function(e,t){return void 0!==t?(console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."),this.multiplyQuaternions(e,t)):this.multiplyQuaternions(this,e)},premultiply:function(e){return this.multiplyQuaternions(e,this)},multiplyQuaternions:function(e,t){var i=e._x,n=e._y,r=e._z,a=e._w,s=t._x,o=t._y,l=t._z,u=t._w;return this._x=i*u+a*s+n*l-r*o,this._y=n*u+a*o+r*s-i*l,this._z=r*u+a*l+i*o-n*s,this._w=a*u-i*s-n*o-r*l,this.onChangeCallback(),this},slerp:function(e,t){if(0===t)return this;if(1===t)return this.copy(e);var i=this._x,n=this._y,r=this._z,a=this._w,s=a*e._w+i*e._x+n*e._y+r*e._z;if(s<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,s=-s):this.copy(e),1<=s)return this._w=a,this._x=i,this._y=n,this._z=r,this;var o=Math.sqrt(1-s*s);if(Math.abs(o)<.001)return this._w=.5*(a+this._w),this._x=.5*(i+this._x),this._y=.5*(n+this._y),this._z=.5*(r+this._z),this;var l=Math.atan2(o,s),u=Math.sin((1-t)*l)/o,c=Math.sin(t*l)/o;return this._w=a*u+this._w*c,this._x=i*u+this._x*c,this._y=n*u+this._y*c,this._z=r*u+this._z*c,this.onChangeCallback(),this},equals:function(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w},fromArray:function(e,t){return void 0===t&&(t=0),this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this.onChangeCallback(),this},toArray:function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=0),e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e},onChange:function(e){return this.onChangeCallback=e,this},onChangeCallback:function(){}}),Object.assign(Wt.prototype,{isVector3:!0,set:function(e,t,i){return this.x=e,this.y=t,this.z=i,this},setScalar:function(e){return this.x=e,this.y=e,this.z=e,this},setX:function(e){return this.x=e,this},setY:function(e){return this.y=e,this},setZ:function(e){return this.z=e,this},setComponent:function(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this},getComponent:function(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}},clone:function(){return new this.constructor(this.x,this.y,this.z)},copy:function(e){return this.x=e.x,this.y=e.y,this.z=e.z,this},add:function(e,t){return void 0!==t?(console.warn("THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this.z+=e.z,this)},addScalar:function(e){return this.x+=e,this.y+=e,this.z+=e,this},addVectors:function(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this},addScaledVector:function(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this},sub:function(e,t){return void 0!==t?(console.warn("THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this.z-=e.z,this)},subScalar:function(e){return this.x-=e,this.y-=e,this.z-=e,this},subVectors:function(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this},multiply:function(e,t){return void 0!==t?(console.warn("THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."),this.multiplyVectors(e,t)):(this.x*=e.x,this.y*=e.y,this.z*=e.z,this)},multiplyScalar:function(e){return this.x*=e,this.y*=e,this.z*=e,this},multiplyVectors:function(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this},applyEuler:(L=new Vt,function(e){return e&&e.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),this.applyQuaternion(L.setFromEuler(e))}),applyAxisAngle:(C=new Vt,function(e,t){return this.applyQuaternion(C.setFromAxisAngle(e,t))}),applyMatrix3:function(e){var t=this.x,i=this.y,n=this.z,r=e.elements;return this.x=r[0]*t+r[3]*i+r[6]*n,this.y=r[1]*t+r[4]*i+r[7]*n,this.z=r[2]*t+r[5]*i+r[8]*n,this},applyMatrix4:function(e){var t=this.x,i=this.y,n=this.z,r=e.elements,a=1/(r[3]*t+r[7]*i+r[11]*n+r[15]);return this.x=(r[0]*t+r[4]*i+r[8]*n+r[12])*a,this.y=(r[1]*t+r[5]*i+r[9]*n+r[13])*a,this.z=(r[2]*t+r[6]*i+r[10]*n+r[14])*a,this},applyQuaternion:function(e){var t=this.x,i=this.y,n=this.z,r=e.x,a=e.
vendor: 6,248 bytes, line 1
1y,s=e.z,o=e.w,l=o*t+a*n-s*i,u=o*i+s*t-r*n,c=o*n+r*i-a*t,h=-r*t-a*i-s*n;return this.x=l*o+h*-r+u*-s-c*-a,this.y=u*o+h*-a+c*-r-l*-s,this.z=c*o+h*-s+l*-a-u*-r,this},project:(N=new Qt,function(e){return N.multiplyMatrices(e.projectionMatrix,N.getInverse(e.matrixWorld)),this.applyMatrix4(N)}),unproject:(D=new Qt,function(e){return D.multiplyMatrices(e.matrixWorld,D.getInverse(e.projectionMatrix)),this.applyMatrix4(D)}),transformDirection:function(e){var t=this.x,i=this.y,n=this.z,r=e.elements;return this.x=r[0]*t+r[4]*i+r[8]*n,this.y=r[1]*t+r[5]*i+r[9]*n,this.z=r[2]*t+r[6]*i+r[10]*n,this.normalize()},divide:function(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this},divideScalar:function(e){return this.multiplyScalar(1/e)},min:function(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this},max:function(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this},clamp:function(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this},clampScalar:(E=new Wt,S=new Wt,function(e,t){return E.set(e,e,e),S.set(t,t,t),this.clamp(E,S)}),clampLength:function(e,t){var i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))},floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this},roundToZero:function(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},dot:function(e){return this.x*e.x+this.y*e.y+this.z*e.z},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(e){return this.normalize().multiplyScalar(e)},lerp:function(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this},lerpVectors:function(e,t,i){return this.subVectors(t,e).multiplyScalar(i).add(e)},cross:function(e,t){return void 0!==t?(console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(e,t)):this.crossVectors(this,e)},crossVectors:function(e,t){var i=e.x,n=e.y,r=e.z,a=t.x,s=t.y,o=t.z;return this.x=n*o-r*s,this.y=r*a-i*o,this.z=i*s-n*a,this},projectOnVector:function(e){var t=e.dot(this)/e.lengthSq();return this.copy(e).multiplyScalar(t)},projectOnPlane:(x=new Wt,function(e){return x.copy(this).projectOnVector(e),this.sub(x)}),reflect:(A=new Wt,function(e){return this.sub(A.copy(e).multiplyScalar(2*this.dot(e)))}),angleTo:function(e){var t=this.dot(e)/Math.sqrt(this.lengthSq()*e.lengthSq());return Math.acos(Ht.clamp(t,-1,1))},distanceTo:function(e){return Math.sqrt(this.distanceToSquared(e))},distanceToSquared:function(e){var t=this.x-e.x,i=this.y-e.y,n=this.z-e.z;return t*t+i*i+n*n},manhattanDistanceTo:function(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)},setFromSpherical:function(e){var t=Math.sin(e.phi)*e.radius;return this.x=t*Math.sin(e.theta),this.y=Math.cos(e.phi)*e.radius,this.z=t*Math.cos(e.theta),this},setFromCylindrical:function(e){return this.x=e.radius*Math.sin(e.theta),this.y=e.y,this.z=e.radius*Math.cos(e.theta),this},setFromMatrixPosition:function(e){var t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this},setFromMatrixScale:function(e){var t=this.setFromMatrixColumn(e,0).length(),i=this.setFromMatrixColumn(e,1).length(),n=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=i,this.z=n,this},setFromMatrixColumn:function(e,t){return this.fromArray(e.elements,4*t)},equals:function(e){return e.x===this.x&&e.y===this.y&&e.z===this.z},fromArray:function(e,t){return void 0===t&&(t=0),this.x=e[t],this.y=e[t+1],this.z=e[t+2],this},toArray:function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=0),e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e},fromBufferAttribute:function(e,t,i){return void 0!==i&&console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}}),Object.assign(qt.prototype,{isMatrix3:!0,set:function(e,t,i,n,r,a,s,o,l){var u=this.elements;return u[0]=e,u[1]=n,u[2]=s,u[3]=t,u[4]=r,u[5]=o,u[6]=i,u[7]=a,u[8]=l,this},identity:function(){return this.set(1,0,0,0,1,0,0,0,1),this},clone:function(){return(new this.constructor).fromArray(this.elements)},copy:function(e){var t=this.elements,i=e.elements;return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t[6]=i[6],t[7]=i[7],t[8]=i[8],this},setFromMatrix4:function(e){var t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this},applyToBufferAttribute:(I=new Wt,function(e){for(var t=0,i=e.count;t<i;t++)I.x=e.getX(t),I.y=e.getY(t),I.z=e.getZ(t),I.applyMatrix3(this),e.setXYZ(t,I.x,I.y,I.z);return e}),multiply:function(e){return this.multiplyMatrices(this,e)},premultiply:function(e){return this.multiplyMatrices(e,this)},multiplyMatrices:function(e,t){var i=e.elements,n=t.elements,r=this.elements,a=i[0],s=i[3],o=i[6],l=i[1],u=i[4],c=i[7],h=i[2],d=i[5],p=i[8],f=n[0],g=n[3],m=n[6],v=n[1],y=n[4],_=n[7],M=n[2],w=n[5],b=n[8];return r[0]=a*f+s*v+o*M,r[3]=a*g+s*y+o*w,r[6]=a*m+s*_+o*b,r[1]=l*f+u*v+c*M,r[4]=l*g+u*y+c*w,r[7]=l*m+u*_+c*b,r[2]=h*f+d*v+p*M,r[5]=h*g+d*y+p*w,r[8]=h*m+d*_+p*b,this},multiplyScalar:function(e){var t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this},determinant:function(){var e=this.elements,t=e[0],i=e[1],n=e[2],r=e[3],a=e[4],s=e[5],o=e[6],l=e[7],u=e[8];return t*a*u-t*s*l-i*r*u+i*s*o+n*r*l-n*a*o},getInverse:function(e,t){e&&e.isMatrix4&&console.error("THREE.Matrix3: .getInverse() no longer takes a Matr
1ix4 argument.");var i=e.elements,n=this.elements,r=i[0],a=i[1],s=i[2],o=i[3],l=i[4],u=i[5],c=i[6],h=i[7],d=i[8],p=d*l-u*h,f=u*c-d*o,g=h*o-l*c,m=r*p+a*f+s*g;if(0==m){var v="THREE.Matrix3: .getInverse() can't invert matrix, determinant is 0";if(!0===t)throw new Error(v);return console.warn(v),this.identity()}var y=1/m;return n[0]=p*y,n[1]=(s*h-d*a)*y,n[2]=(u*a-s*l)*y,n[3]=f*y,n[4]=(d*r-s*c)*y,n[5]=(s*o-u*r)*y,n[6]=g*y,n[7]=(a*c-h*r)*y,n[8]=(l*r-a*o)*y,this},transpose:function(){var e,t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this},getNormalMatrix:function(e){return this.setFromMatrix4(e).getInverse(this).transpose()},transposeIntoArray:function(e){var t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this},setUvTransform:function(e,t,i,n,r,a,s){var o=Math.cos(r),l=Math.sin(r);this.set(i*o,i*l,-i*(o*a+l*s)+a+e,-n*l,n*o,-n*(-l*a+o*s)+s+t,0,0,1)},scale:function(e,t){var i=this.elements;return i[0]*=e,i[3]*=e,i[6]*=e,i[1]*=t,i[4]*=t,i[7
vendor: 5,620 bytes, line 1
1]*=t,this},rotate:function(e){var t=Math.cos(e),i=Math.sin(e),n=this.elements,r=n[0],a=n[3],s=n[6],o=n[1],l=n[4],u=n[7];return n[0]=t*r+i*o,n[3]=t*a+i*l,n[6]=t*s+i*u,n[1]=-i*r+t*o,n[4]=-i*a+t*l,n[7]=-i*s+t*u,this},translate:function(e,t){var i=this.elements;return i[0]+=e*i[2],i[3]+=e*i[5],i[6]+=e*i[8],i[1]+=t*i[2],i[4]+=t*i[5],i[7]+=t*i[8],this},equals:function(e){for(var t=this.elements,i=e.elements,n=0;n<9;n++)if(t[n]!==i[n])return!1;return!0},fromArray:function(e,t){void 0===t&&(t=0);for(var i=0;i<9;i++)this.elements[i]=e[i+t];return this},toArray:function(e,t){void 0===e&&(e=[]),void 0===t&&(t=0);var i=this.elements;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e}});var Xt,Zt,$t,Kt,Jt,ei,ti,ii,ni,ri,ai,si,oi,li,ui,ci,hi,di,pi,fi,gi,mi,vi,yi,_i,Mi,wi,bi,Ti,Ai,xi=0;function Ei(e,t,i,n,r,a,s,o,l,u){Object.defineProperty(this,"id",{value:xi++}),this.uuid=Ht.generateUUID(),this.name="",this.image=void 0!==e?e:Ei.DEFAULT_IMAGE,this.mipmaps=[],this.mapping=void 0!==t?t:Ei.DEFAULT_MAPPING,this.wrapS=void 0!==i?i:Re,this.wrapT=void 0!==n?n:Re,this.magFilter=void 0!==r?r:Ge,this.minFilter=void 0!==a?a:Ye,this.anisotropy=void 0!==l?l:1,this.format=void 0!==s?s:at,this.type=void 0!==o?o:Qe,this.offset=new Yt(0,0),this.repeat=new Yt(1,1),this.center=new Yt(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new qt,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=void 0!==u?u:jt,this.version=0,this.onUpdate=null}function Si(e,t,i,n){this.x=e||0,this.y=t||0,this.z=i||0,this.w=void 0!==n?n:1}function Di(e,t,i){this.width=e,this.height=t,this.scissor=new Si(0,0,e,t),this.scissorTest=!1,this.viewport=new Si(0,0,e,t),void 0===(i=i||{}).minFilter&&(i.minFilter=Ge),this.texture=new Ei(void 0,void 0,i.wrapS,i.wrapT,i.magFilter,i.minFilter,i.format,i.type,i.anisotropy,i.encoding),this.texture.generateMipmaps=void 0===i.generateMipmaps||i.generateMipmaps,this.depthBuffer=void 0===i.depthBuffer||i.depthBuffer,this.stencilBuffer=void 0===i.stencilBuffer||i.stencilBuffer,this.depthTexture=void 0!==i.depthTexture?i.depthTexture:null}function Ni(e,t,i){Di.call(this,e,t,i),this.activeCubeFace=0,this.activeMipMapLevel=0}function Ci(e,t,i,n,r,a,s,o,l,u,c,h){Ei.call(this,null,a,s,o,l,u,n,r,c,h),this.image={data:e,width:t,height:i},this.magFilter=void 0!==l?l:Ue,this.minFilter=void 0!==u?u:Ue,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}function Li(e,t){this.min=void 0!==e?e:new Wt(1/0,1/0,1/0),this.max=void 0!==t?t:new Wt(-1/0,-1/0,-1/0)}function Ii(e){var t,i;for(t=0,i=e.length-3;t<=i;t+=3){ai.fromArray(e,t);var n=oi.x*Math.abs(ai.x)+oi.y*Math.abs(ai.y)+oi.z*Math.abs(ai.z),r=Jt.dot(ai),a=ei.dot(ai),s=ti.dot(ai);if(Math.max(-Math.max(r,a,s),Math.min(r,a,s))>n)return!1}return!0}function Oi(e){var t=e.geometry;if(void 0!==t)if(t.isGeometry){var i=t.vertices;for(hi=0,di=i.length;hi<di;hi++)pi.copy(i[hi]),pi.applyMatrix4(e.matrixWorld),ci.expandByPoint(pi)}else if(t.isBufferGeometry){var n=t.attributes.position;if(void 0!==n)for(hi=0,di=n.count;hi<di;hi++)pi.fromBufferAttribute(n,hi).applyMatrix4(e.matrixWorld),ci.expandByPoint(pi)}}function ji(e,t){this.center=void 0!==e?e:new Wt,this.radius=void 0!==t?t:0}function ki(e,t){this.normal=void 0!==e?e:new Wt(1,0,0),this.constant=void 0!==t?t:0}function Pi(e,t,i,n,r,a){this.planes=[void 0!==e?e:new ki,void 0!==t?t:new ki,void 0!==i?i:new ki,void 0!==n?n:new ki,void 0!==r?r:new ki,void 0!==a?a:new ki]}Ei.DEFAULT_IMAGE=void 0,Ei.DEFAULT_MAPPING=300,Ei.prototype=Object.assign(Object.create(u.prototype),{constructor:Ei,isTexture:!0,updateMatrix:function(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.name=e.name,this.image=e.image,this.mipmaps=e.mipmaps.slice(0),this.mapping=e.mapping,this.wrapS=e.wrapS,this.wrapT=e.wrapT,this.magFilter=e.magFilter,this.minFilter=e.minFilter,this.anisotropy=e.anisotropy,this.format=e.format,this.type=e.type,this.offset.copy(e.offset),this.repeat.copy(e.repeat),this.center.copy(e.center),this.rotation=e.rotation,this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrix.copy(e.matrix),this.generateMipmaps=e.generateMipmaps,this.premultiplyAlpha=e.premultiplyAlpha,this.flipY=e.flipY,this.unpackAlignment=e.unpackAlignment,this.encoding=e.encoding,this},toJSON:function(e){var t=void 0===e||"string"==typeof e;if(!t&&void 0!==e.textures[this.uuid])return e.textures[this.uuid];var i={metadata:{version:4.5,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,mapping:this.mapping,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY};if(void 0!==this.image){var n=this.image;void 0===n.uuid&&(n.uuid=Ht.generateUUID()),t||void 0!==e.images[n.uuid]||(e.images[n.uuid]={uuid:n.uuid,url:function(e){var t;if(e instanceof HTMLCanvasElement)t=e;else{(t=document.createElementNS("http://www.w3.org/1999/xhtml","canvas")).width=e.width,t.height=e.height;var i=t.getContext("2d");e instanceof ImageData?i.putImageData(e,0,0):i.drawImage(e,0,0,e.width,e.height)}return 2048<t.width||2048<t.height?t.toDataURL("image/jpeg",.6):t.toDataURL("image/png")}(n)}),i.image=n.uuid}return t||(e.textures[this.uuid]=i),i},dispose:function(){this.dispatchEvent({type:"dispose"})}
vendor: 9,863 bytes, line 1
1,transformUv:function(e){if(300===this.mapping){if(e.applyMatrix3(this.matrix),e.x<0||1<e.x)switch(this.wrapS){case Pe:e.x=e.x-Math.floor(e.x);break;case Re:e.x=e.x<0?0:1;break;case ze:1===Math.abs(Math.floor(e.x)%2)?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x)}if(e.y<0||1<e.y)switch(this.wrapT){case Pe:e.y=e.y-Math.floor(e.y);break;case Re:e.y=e.y<0?0:1;break;case ze:1===Math.abs(Math.floor(e.y)%2)?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y)}this.flipY&&(e.y=1-e.y)}}}),Object.defineProperty(Ei.prototype,"needsUpdate",{set:function(e){!0===e&&this.version++}}),Object.assign(Si.prototype,{isVector4:!0,set:function(e,t,i,n){return this.x=e,this.y=t,this.z=i,this.w=n,this},setScalar:function(e){return this.x=e,this.y=e,this.z=e,this.w=e,this},setX:function(e){return this.x=e,this},setY:function(e){return this.y=e,this},setZ:function(e){return this.z=e,this},setW:function(e){return this.w=e,this},setComponent:function(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this},getComponent:function(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}},clone:function(){return new this.constructor(this.x,this.y,this.z,this.w)},copy:function(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=void 0!==e.w?e.w:1,this},add:function(e,t){return void 0!==t?(console.warn("THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this)},addScalar:function(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this},addVectors:function(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this},addScaledVector:function(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this},sub:function(e,t){return void 0!==t?(console.warn("THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this)},subScalar:function(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this},subVectors:function(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this},multiplyScalar:function(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this},applyMatrix4:function(e){var t=this.x,i=this.y,n=this.z,r=this.w,a=e.elements;return this.x=a[0]*t+a[4]*i+a[8]*n+a[12]*r,this.y=a[1]*t+a[5]*i+a[9]*n+a[13]*r,this.z=a[2]*t+a[6]*i+a[10]*n+a[14]*r,this.w=a[3]*t+a[7]*i+a[11]*n+a[15]*r,this},divideScalar:function(e){return this.multiplyScalar(1/e)},setAxisAngleFromQuaternion:function(e){this.w=2*Math.acos(e.w);var t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this},setAxisAngleFromRotationMatrix:function(e){var t,i,n,r,a=e.elements,s=a[0],o=a[4],l=a[8],u=a[1],c=a[5],h=a[9],d=a[2],p=a[6],f=a[10];if(Math.abs(o-u)<.01&&Math.abs(l-d)<.01&&Math.abs(h-p)<.01){if(Math.abs(o+u)<.1&&Math.abs(l+d)<.1&&Math.abs(h+p)<.1&&Math.abs(s+c+f-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;var g=(s+1)/2,m=(c+1)/2,v=(f+1)/2,y=(o+u)/4,_=(l+d)/4,M=(h+p)/4;return m<g&&v<g?r=g<.01?(i=0,n=.707106781):(n=y/(i=Math.sqrt(g)),_/i):v<m?r=m<.01?(n=0,i=.707106781):(i=y/(n=Math.sqrt(m)),M/n):v<.01?(n=i=.707106781,r=0):(i=_/(r=Math.sqrt(v)),n=M/r),this.set(i,n,r,t),this}var w=Math.sqrt((p-h)*(p-h)+(l-d)*(l-d)+(u-o)*(u-o));return Math.abs(w)<.001&&(w=1),this.x=(p-h)/w,this.y=(l-d)/w,this.z=(u-o)/w,this.w=Math.acos((s+c+f-1)/2),this},min:function(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this},max:function(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this},clamp:function(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this.w=Math.max(e.w,Math.min(t.w,this.w)),this},clampScalar:function(e,t){return void 0===Xt&&(Xt=new Si,Zt=new Si),Xt.set(e,e,e,e),Zt.set(t,t,t,t),this.clamp(Xt,Zt)},clampLength:function(e,t){var i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))},floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this},roundToZero:function(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this.w=this.w<0?Math.ceil(this.w):Math.floor(this.w),this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},dot:function(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(e){return this.normalize().multiplyScalar(e)},lerp:function(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this},lerpVectors:function(e,t,i){return this.subVectors(t,e).multiplyScalar(i).add(e)},equals:function(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w},fromArray:function(e,t){return void 0===t&&(t=0),this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this},toArray:function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=0),e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e},fromBufferAttribute:function(e,t,i){return void 0!==i&&console.warn("THREE.Vector4: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}}),Di.prototype=Object.assign(Object.create(u.prototype),{constructor:Di,isWebGLRenderTarget:!0,setSize:function(e,t){this.width===e&&this.height===t||(this.width=e,this.height=t,this.dispose()),this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.width=e.width,this.height=e.height,this.viewport.copy(e.viewport),this.texture=e.texture.clone(),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,this.depthTexture=e.depthTexture,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),((Ni.prototype=Object.create(Di.prototype)).constructor=Ni).prototype.isWebGLRenderTargetCube=!0,((Ci.prototype=Object.create(Ei.prototype)).constructor=Ci).prototype.isDataTexture=!0,Object.assign(Li.prototype,{isBox3:!0,set:function(e,t){return this.min.copy(e),this.max.copy(t),this},setFromArray:function(e){for(var t=1/0,i=1/0,n=1/0,r=-1/0,a=-1/0,s=-1/0,o=0,l=e.length;o<l;o+=3){var u=e[o],c=e[o+1],h=e[o+2];u<t&&(t=u),c<i&&(i=c),h<n&&(n=h),r<u&&(r=u),a<c&&(a=c),s<h&&(s=h)}return this.min.set(t,i,n),this.max.set(r,a,s),this},setFromBufferAttribute:function(e){for(var t=1/0,i=1/0,n=1/0,r=-1/0,a=-1/0,s=-1/0,o=0,l=e.count;o<l;o++){var u=e.getX(o),c=e.getY(o),h=e.getZ(o);u<t&&(t=u),c<i&&(i=c),h<n&&(n=h),r<u&&(r=u),a<c&&(a=c),s<h&&(s=h)}return this.min.set(t,i,n),this.max.set(r,a,s),this},setFromPoints:function(e){this.makeEmpty();for(var t=0,i=e.length;t<i;t++)this.expandByPoint(e[t]);return this},setFromCenterAndSize:(fi=new Wt,function(e,t){var i=fi.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(i),this.max.copy(e).add(i),this}),setFromObject:function(e){return this.makeEmpty(),this.expandByObject(e)},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.min.copy(e.min),this.max.copy(e.max),this},makeEmpty:function(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this},isEmpty:function(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z},getCenter:function(e){return void 0===e&&(console.warn("THREE.Box3: .getCenter() target is now required"),e=new Wt),this.isEmpty()?e.set(0,0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)},getSize:function(e){return void 0===e&&(console.warn("THREE.Box3: .getSize() target is now required"),e=new Wt),this.isEmpty()?e.set(0,0,0):e.subVectors(this.max,this.min)},expandByPoint:function(e){return this.min.min(e),this.max.max(e),this},expandByVector:function(e){return this.min.sub(e),this.max.add(e),this},expandByScalar:function(e){return this.min.addScalar(-e),this.max.addScalar(e),this},expandByObject:(pi=new Wt,function(e){return ci=this,e.updateMatrixWorld(!0),e.traverse(Oi),this}),containsPoint:function(e){return!(e.x<this.min.x||e.x>this.max.x||e.y<this.min.y||e.y>this.max.y||e.z<this.min.z||e.z>this.max.z)},containsBox:function(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z},getParameter:function(e,t){return void 0===t&&(console.warn("THREE.Box3: .getParameter() target is now required"),t=new Wt),t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))},intersectsBox:function(e){return!(e.max.x<this.min.x||e.min.x>this.max.x||e.max.y<this.min.y||e.min.y>this.max.y||e.max.z<this.min.z||e.min.z>this.max.z)},intersectsSphere:(ui=new Wt,function(e){return this.clampPoint(e.center,ui),ui.distanceToSquared(e.center)<=e.radius*e.radiu
vendor: 8,738 bytes, line 1
1s}),intersectsPlane:function(e){var t,i;return i=0<e.normal.x?(t=e.normal.x*this.min.x,e.normal.x*this.max.x):(t=e.normal.x*this.max.x,e.normal.x*this.min.x),0<e.normal.y?(t+=e.normal.y*this.min.y,i+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,i+=e.normal.y*this.min.y),0<e.normal.z?(t+=e.normal.z*this.min.z,i+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,i+=e.normal.z*this.min.z),t<=e.constant&&i>=e.constant},intersectsTriangle:(Jt=new Wt,ei=new Wt,ti=new Wt,ii=new Wt,ni=new Wt,ri=new Wt,ai=new Wt,si=new Wt,oi=new Wt,li=new Wt,function(e){if(this.isEmpty())return!1;this.getCenter(si),oi.subVectors(this.max,si),Jt.subVectors(e.a,si),ei.subVectors(e.b,si),ti.subVectors(e.c,si),ii.subVectors(ei,Jt),ni.subVectors(ti,ei),ri.subVectors(Jt,ti);var t=[0,-ii.z,ii.y,0,-ni.z,ni.y,0,-ri.z,ri.y,ii.z,0,-ii.x,ni.z,0,-ni.x,ri.z,0,-ri.x,-ii.y,ii.x,0,-ni.y,ni.x,0,-ri.y,ri.x,0];return!!Ii(t)&&!!Ii(t=[1,0,0,0,1,0,0,0,1])&&(li.crossVectors(ii,ni),Ii(t=[li.x,li.y,li.z]))}),clampPoint:function(e,t){return void 0===t&&(console.warn("THREE.Box3: .clampPoint() target is now required"),t=new Wt),t.copy(e).clamp(this.min,this.max)},distanceToPoint:(Kt=new Wt,function(e){return Kt.copy(e).clamp(this.min,this.max).sub(e).length()}),getBoundingSphere:($t=new Wt,function(e){return void 0===e&&(console.warn("THREE.Box3: .getBoundingSphere() target is now required"),e=new ji),this.getCenter(e.center),e.radius=.5*this.getSize($t).length(),e}),intersect:function(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this},union:function(e){return this.min.min(e.min),this.max.max(e.max),this},applyMatrix4:function(e){if(this.isEmpty())return this;var t=e.elements,i=t[0]*this.min.x,n=t[1]*this.min.x,r=t[2]*this.min.x,a=t[0]*this.max.x,s=t[1]*this.max.x,o=t[2]*this.max.x,l=t[4]*this.min.y,u=t[5]*this.min.y,c=t[6]*this.min.y,h=t[4]*this.max.y,d=t[5]*this.max.y,p=t[6]*this.max.y,f=t[8]*this.min.z,g=t[9]*this.min.z,m=t[10]*this.min.z,v=t[8]*this.max.z,y=t[9]*this.max.z,_=t[10]*this.max.z;return this.min.x=Math.min(i,a)+Math.min(l,h)+Math.min(f,v)+t[12],this.min.y=Math.min(n,s)+Math.min(u,d)+Math.min(g,y)+t[13],this.min.z=Math.min(r,o)+Math.min(c,p)+Math.min(m,_)+t[14],this.max.x=Math.max(i,a)+Math.max(l,h)+Math.max(f,v)+t[12],this.max.y=Math.max(n,s)+Math.max(u,d)+Math.max(g,y)+t[13],this.max.z=Math.max(r,o)+Math.max(c,p)+Math.max(m,_)+t[14],this},translate:function(e){return this.min.add(e),this.max.add(e),this},equals:function(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}),Object.assign(ji.prototype,{set:function(e,t){return this.center.copy(e),this.radius=t,this},setFromPoints:(gi=new Li,function(e,t){var i=this.center;void 0!==t?i.copy(t):gi.setFromPoints(e).getCenter(i);for(var n=0,r=0,a=e.length;r<a;r++)n=Math.max(n,i.distanceToSquared(e[r]));return this.radius=Math.sqrt(n),this}),clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.center.copy(e.center),this.radius=e.radius,this},empty:function(){return this.radius<=0},containsPoint:function(e){return e.distanceToSquared(this.center)<=this.radius*this.radius},distanceToPoint:function(e){return e.distanceTo(this.center)-this.radius},intersectsSphere:function(e){var t=this.radius+e.radius;return e.center.distanceToSquared(this.center)<=t*t},intersectsBox:function(e){return e.intersectsSphere(this)},intersectsPlane:function(e){return Math.abs(e.distanceToPoint(this.center))<=this.radius},clampPoint:function(e,t){var i=this.center.distanceToSquared(e);return void 0===t&&(console.warn("THREE.Sphere: .clampPoint() target is now required"),t=new Wt),t.copy(e),i>this.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t},getBoundingBox:function(e){return void 0===e&&(console.warn("THREE.Sphere: .getBoundingBox() target is now required"),e=new Li),e.set(this.center,this.center),e.expandByScalar(this.radius),e},applyMatrix4:function(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this},translate:function(e){return this.center.add(e),this},equals:function(e){return e.center.equals(this.center)&&e.radius===this.radius}}),Object.assign(ki.prototype,{set:function(e,t){return this.normal.copy(e),this.constant=t,this},setComponents:function(e,t,i,n){return this.normal.set(e,t,i),this.constant=n,this},setFromNormalAndCoplanarPoint:function(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this},setFromCoplanarPoints:(_i=new Wt,Mi=new Wt,function(e,t,i){var n=_i.subVectors(i,t).cross(Mi.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(n,e),this}),clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.normal.copy(e.normal),this.constant=e.constant,this},normalize:function(){var e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this},negate:function(){return this.constant*=-1,this.normal.negate(),this},distanceToPoint:function(e){return this.normal.dot(e)+this.constant},distanceToSphere:function(e){return this.distanceToPoint(e.center)-e.radius},projectPoint:function(e,t){return void 0===t&&(console.warn("THREE.Plane: .projectPoint() target is now required"),t=new Wt),t.copy(this.normal).multiplyScalar(-this.distanceToPoint(e)).add(e)},intersectLine:(yi=new Wt,function(e,t){void 0===t&&(console.warn("THREE.Plane: .intersectLine() target is now required"),t=new Wt);var i=e.delta(yi),n=this.normal.dot(i);if(0===n)return 0===this.distanceToPoint(e.start)?t.copy(e.start):void 0;var r=-(e.start.dot(this.normal)+this.constant)/n;return r<0||1<r?void 0:t.copy(i).multiplyScalar(r).add(e.start)}),intersectsLine:function(e){var t=this.distanceToPoint(e.start),i=this.distanceToPoint(e.end);return t<0&&0<i||i<0&&0<t},intersectsBox:function(e){return e.intersectsPlane(this)},intersectsSphere:function(e){return e.intersectsPlane(this)},coplanarPoint:function(e){return void 0===e&&(console.warn("THREE.Plane: .coplanarPoint() target is now required"),e=new Wt),e.copy(this.normal).multiplyScalar(-this.constant)},applyMatrix4:(mi=new Wt,vi=new qt,function(e,t){var i=t||vi.getNormalMatrix(e),n=this.coplanarPoint(mi).applyMatrix4(e),r=this.normal.applyMatrix3(i).normalize();return this.constant=-n.dot(r),this}),translate:function(e){return this.constant-=e.dot(this.normal),this},equals:function(e){return e.normal.equals(this.normal)&&e.constant===this.constant}}),Object.assign(Pi.prototype,{set:function(e,t,i,n,r,a){var s=this.planes;return s[0].copy(e),s[1].copy(t),s[2].copy(i),s[3].copy(n),s[4].copy(r),s[5].copy(a),this},clone:function(){return(new this.constructor).copy(this)},copy:function(e){for(var t=this.planes,i=0;i<6;i++)t[i].copy(e.planes[i]);return this},setFromMatrix:function(e){var t=this.planes,i=e.elements,n=i[0],r=i[1],a=i[2],s=i[3],o=i[4],l=i[5],u=i[6],c=i[7],h=i[8],d=i[9],p=i[10],f=i[11],g=i[12],m=i[13],v=i[14],y=i[15];return t[0].setComponents(s-n,c-o,f-h,y-g).normalize(),t[1].setComponents(s+n,c+o,f+h,y+g).normalize(),t[2].setComponents(s+r,c+l,f+d,y+m).normalize(),t[3].setComponents(s-r,c-l,f-d,y-m).normalize(),t[4].setComponents(s-a,c-u,f-p,y-v).normalize(),t[5].setComponents(s+a,c+u,f+p,y+v).normalize(),this},intersectsObject:(Ai=new ji,function(e){var t=e.geometry;return null===t.boundingSphere&&t.computeBoundingSphere(),Ai.copy(t.boundingSphere).applyMatrix4(e.matrixWorld),this.intersectsSphere(Ai)}),intersectsSprite:(Ti=new ji,function(e){return Ti.center.set(0,0,0),Ti.radius=.7071067811865476,Ti.applyMatrix4(e.matrixWorld),this.intersectsSphere(Ti)}),intersectsSphere:function(e){for(var t=this.planes,i=e.center,n=-e.radius,r=0;r<6;r++){if(t[r].distanceToPoint(i)<n)return!1}return!0},intersectsBox:(wi=new Wt,bi=new Wt,function(e){for(var t=this.planes,i=0;i<6;i++){var n=t[i];wi.x=0<n.normal.x?e.min.x:e.max.x,bi.x=0<n.normal.x?e.max.x:e.min.x,wi.y=0<n.normal.y?e.min.y:e.max.y,bi.y=0<n.normal.y?e.max.y:e.min.y,wi.z=0<n.normal.z?e.min.z:e.max.z,bi.z=0<n.normal.z?e.max.z:e.min.z;var r=n.distanceToPoint(wi),a=n.distanceToPoint(bi);if(r<0&&a<0)return!1}return!0}),containsPoint:function(e){for(var t=this.planes,i=0;i<6;i++)if(t[i].distanceToPoint(e)<0)return!1;return!0}});var Ri,zi={alphamap_fragment:"#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, vUv ).g;\n#endif\n",alphamap_pars_fragment:"#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif\n",alphatest_fragment:"#ifdef ALPHATEST\n\tif ( diffuseColor.a < ALPHATEST ) discard;\n#endif\n",aomap_fragment:"#ifdef USE_AOMAP\n\tfloat ambientOcclusion = ( texture2D( aoMap, vUv2 ).r - 1.0 ) * aoMapIntensity + 1.0;\n\treflectedLight.indirectDiffuse *= ambientOcclusion;\n\t#if defined( USE_ENVMAP ) && defined( PHYSICAL )\n\t\tfloat dotNV = saturate( dot
1( geometry.normal, geometry.viewDir ) );\n\t\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.specularRoughness );\n\t#endif\n#endif\n",aomap_pars_fragment:"#ifdef USE_AOMAP\n\tuniform sampler2D aoMap;\n\tuniform float aoMapIntensity;\n#endif",begin_vertex:"\nvec3 transformed = vec3( position );\n",beginnormal_vertex:"\nvec3 objectNormal = vec3( normal );\n",bsdfs:"float punctualLightIntensityToIrradianceFactor( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n\tif( decayExponent > 0.0 ) {\n#if defined ( PHYSICALLY_CORRECT_LIGHTS )\n\t\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\t\tfloat maxDistanceCutoffFactor = pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t\treturn distanceFalloff * maxDistanceCutoffFactor;\n#else\n\t\treturn pow( saturate( -lightDistance / cutoffDistance + 1.0 ), decayExponent );\n#endif\n\t}\n\treturn 1.0;\n}\nvec3 BRDF_Diffuse_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 specularColor, const in float dotLH ) {\n\tfloat fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );\n\treturn ( 1.0 - specularColor ) * fresnel + specularColor;\n}\nfloat G_GGX_Smith( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\tfloat gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\treturn 1.0 / ( gl * gv );\n}\nfloat G_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\treturn 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n\tfloat a2 = pow2( alpha );\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\n}\nvec3 BRDF_Specular_GGX( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\n\tfloat dotNL = saturate( dot( geometry.normal, incidentLight.direction ) );\n\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );
1\n\tfloat G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\tfloat D = D_GGX( alpha, dotNH );\n\treturn F * ( G * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n\tconst float LUT_SIZE = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\n\tfloat dotNV = saturate( dot( N, V ) );\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\treturn uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\tfloat l = length( f );\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\tfloat x = dot( v1, v2 );\n\tfloat y = abs( x );\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\treturn vec3( result );\n}\nvec3 BRDF_Specular_GGX_Environment( const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\n\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\tvec4 r = roughness * c0 + c1;\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\tvec2 AB = vec2( -1.04, 1.04 ) * a004 + r.zw;\n\treturn specularColor * AB.x + AB.y;\n}\nfloat G_BlinnPhong_Implicit( ) {\n\treturn 0.25;\n}\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\n}\nvec3 BRDF_Specular_BlinnPhong( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float shininess ) {\n\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\n\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\tfloat G = G_BlinnPhong_Implicit( );\n\tfloat D = D_BlinnPhong( shininess, dotNH );\n\treturn F * ( G * D );\n}\nfloat GGXRoughnessToBlinnExponent( const in float ggxRoughness ) {\n\treturn ( 2.0 / pow2( ggxRoughness + 0.0001 ) - 2.0 );\n}\nfloat BlinnExponentToGGXRoughness( const in float blinnExponent ) {\n\treturn sqrt( 2.0 / ( blinnExponent + 2.0 ) );\n}\n",bumpmap_pars_fragment:"#ifdef USE_BUMPMAP\n\tuniform sampler2D bumpMap;\n\tuniform float bumpScale;\n\tvec2 dHdxy_fwd() {\n\t\tvec2 dSTdx = dFdx( vUv );\n\t\tvec2 dSTdy = dFdy( vUv );\n\t\tfloat Hll = bumpScale * texture2D( bumpMap, vUv ).x;\n\t\tfloat dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;\n\t\tfloat dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;\n\t\treturn vec2( dBx, dBy );\n\t}
1\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy ) {\n\t\tvec3 vSigmaX = vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) );\n\t\tvec3 vSigmaY = vec3( dFdy( surf_pos.x ), dFdy( surf_pos.y ), dFdy( surf_pos.z ) );\n\t\tvec3 vN = surf_norm;\n\t\tvec3 R1 = cross( vSigmaY, vN );\n\t\tvec3 R2 = cross( vN, vSigmaX );\n\t\tfloat fDet = dot( vSigmaX, R1 );\n\t\tfDet *= ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\n\t}\n#endif\n",clipping_planes_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvec4 plane;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\tplane = clippingPlanes[ i ];\n\t\tif ( dot( vViewPosition, plane.xyz ) > plane.w ) discard;\n\t}\n\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\tbool clipped = true;\n\t\t#pragma unroll_loop\n\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tclipped = ( dot( vViewPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t}\n\t\tif ( clipped ) discard;\n\t#endif\n#endif\n",clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\n\t#if ! defined( PHYSICAL ) && ! defined( PHONG )\n\t\tvarying vec3 vViewPosition;\n\t#endif\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif\n",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG )\n\tvarying vec3 vViewPosition;\n#endif\n",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n",color_fragment:"#ifdef USE_COLOR\n\tdiffuseColor.rgb *= vColor;\n#endif",color_pars_fragment:"#ifdef USE_COLOR\n\tvarying vec3 vColor;\n#endif\n",color_pars_vertex:"#ifdef USE_COLOR\n\tvarying vec3 vColor;\n#endif",color_vertex:"#ifdef USE_COLOR\n\tvColor.xyz = color.xyz;\n#endif",common:"#define PI 3.14159265359\n#define PI2 6.28318530718\n#define PI_HALF 1.5707963267949\n#define RECIPROCAL_PI 0.31830988618\n#define RECIPROCAL_PI2 0.15915494\n#define LOG2 1.442695\n#define EPSILON 1e-6\n#define saturate(a) clamp( a, 0.0, 1.0 )\n#define whiteCompliment(a) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }\nhighp float rand( const in vec2 uv ) {\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\treturn fract(sin(sn) * c);\n}\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\nstruct GeometricContext {\n\tvec3 position;\n\tvec3 normal;\n\tvec3 viewDir;\n};\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nvec3 projectOnPlane(in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\tfloat distance = dot( planeNormal, point - pointOnPlane );\n\treturn - distance * planeNormal + point;\n}\nfloat sideOfPlane( in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\treturn sign( dot( point - pointOnPlane, planeNormal ) );\n}\nvec3 linePlaneIntersect( in vec3 pointOnLine, in vec3 lineDirection, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\treturn lineDirection * ( dot( planeNormal, pointOnPlane - pointOnLine ) / dot( planeNormal, lineDirection ) ) + pointOnLine;\n}\nmat3 transposeMat3( const in mat3 m ) {\n\tmat3 tmp;\n\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n\treturn tmp;\n}\nfloat linearToRelativeLuminance( const in vec3 color ) {\n\tvec3 weights = vec3( 0.2126, 0.7152, 0.0722 );\n\treturn dot( weights, color.rgb );\n}\n",cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\n#define cubeUV_textureSize (1024.0)\nint getFaceFromDirection(vec3 direction) {\n\tvec3 absDirection = abs(direction);\n\tint face = -1;\n\tif( absDirection.x > absDirection.z ) {\n\t\tif(absDirection.x > absDirection.y )\n\t\t\tface = direction.x > 0.0 ? 0 : 3;\n\t\telse\n\t\t\tface = direction.y > 0.0 ? 1 : 4;\n\t}\n\telse {\n\t\tif(absDirection.z > absDirection.y )\n\t\t\tface = direction.z > 0.0 ? 2 : 5;\n\t\telse\n\t\t\tface = direction.y > 0.0 ? 1 : 4;\n\t}\n\treturn face;\n}\n#define cubeUV_maxLods1 (log2(cubeUV_textureSize*0.25) - 1.0)\n#define cubeUV_rangeClamp (exp2((6.0 - 1.0) * 2.0))\nvec2 MipLevelInfo( vec3 vec, float roughnessLevel, float roughness ) {\n\tfloat scale = exp2(cubeUV_maxLods1 - roughnessLevel);\n\tfloat dxRoughness = dFdx(roughness);\n\tfloat dyRoughness = dFdy(roughness);\n\tvec3 dx = dFdx( vec * scale * dxRoughness );\n\tvec3 dy = dFdy( vec * scale * dyRoughness );\n\tfloat d = max( dot( dx, dx ), dot( dy, dy ) );\n\td = clamp(d, 1.0, cubeUV_rangeClamp);
1\n\tfloat mipLevel = 0.5 * log2(d);\n\treturn vec2(floor(mipLevel), fract(mipLevel));\n}\n#define cubeUV_maxLods2 (log2(cubeUV_textureSize*0.25) - 2.0)\n#define cubeUV_rcpTextureSize (1.0 / cubeUV_textureSize)\nvec2 getCubeUV(vec3 direction, float roughnessLevel, float mipLevel) {\n\tmipLevel = roughnessLevel > cubeUV_maxLods2 - 3.0 ? 0.0 : mipLevel;\n\tfloat a = 16.0 * cubeUV_rcpTextureSize;\n\tvec2 exp2_packed = exp2( vec2( roughnessLevel, mipLevel ) );\n\tvec2 rcp_exp2_packed = vec2( 1.0 ) / exp2_packed;\n\tfloat powScale = exp2_packed.x * exp2_packed.y;\n\tfloat scale = rcp_exp2_packed.x * rcp_exp2_packed.y * 0.25;\n\tfloat mipOffset = 0.75*(1.0 - rcp_exp2_packed.y) * rcp_exp2_packed.x;\n\tbool bRes = mipLevel == 0.0;\n\tscale = bRes && (scale < a) ? a : scale;\n\tvec3 r;\n\tvec2 offset;\n\tint face = getFaceFromDirection(direction);\n\tfloat rcpPowScale = 1.0 / powScale;\n\tif( face == 0) {\n\t\tr = vec3(direction.x, -direction.z, direction.y);\n\t\toffset = vec2(0.0+mipOffset,0.75 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\n\t}\n\telse if( face == 1) {\n\t\tr = vec3(direction.y, direction.x, direction.z);\n\t\toffset = vec2(scale+mipOffset, 0.75 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\n\t}\n\telse if( face == 2) {\n\t\tr = vec3(direction.z, direction.x, direction.y);\n\t\toffset = vec2(2.0*scale+mipOffset, 0.75 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\n\t}\n\telse if( face == 3) {\n\t\tr = vec3(direction.x, direction.z, direction.y);\n\t\toffset = vec2(0.0+mipOffset,0.5 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\n\t}\n\telse if( face == 4) {\n\t\tr = vec3(direction.y, direction.x, -direction.z);\n\t\toffset = vec2(scale+mipOffset, 0.5 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\n\t}\n\telse {\n\t\tr = vec3(direction.z, -direction.x, direction.y);\n\t\toffset = vec2(2.0*scale+mipOffset, 0.5 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\n\t}\n\tr = normalize(r);\n\tfloat texelOffset = 0.5 * cubeUV_rcpTextureSize;\n\tvec2 s = ( r.yz / abs( r.x ) + vec2( 1.0 ) ) * 0.5;\n\tvec2 base = offset + vec2( texelOffset );\n\treturn base + s * ( scale - 2.0 * texelOffset );\n}\n#define cubeUV_maxLods3 (log2(cubeUV_textureSize*0.25) - 3.0)\nvec4 textureCubeUV(vec3 reflectedDirection, float roughness ) {\n\tfloat roughnessVal = roughness* cubeUV_maxLods3;\n\tfloat r1 = floor(roughnessVal);\n\tfloat r2 = r1 + 1.0;\n\tfloat t = fract(roughnessVal);\n\tvec2 mipInfo = MipLevelInfo(reflectedDirection, r1, roughness);\n\tfloat s = mipInfo.y;\n\tfloat level0 = mipInfo.x;\n\tfloat level1 = level0 + 1.0;\n\tlevel1 = level1 > 5.0 ? 5.0 : level1;\n\tlevel0 += min( floor( s + 0.5 ), 5.0 );\n\tvec2 uv_10 = getCubeUV(reflectedDirection, r1, level0);\n\tvec4 color10 = envMapTexelToLinear(texture2D(envMap, uv_10));\n\tvec2 uv_20 = getCubeUV(reflectedDirection, r2, level0);\n\tvec4 color20 = envMapTexelToLinear(texture2D(envMap, uv_20));\n\tvec4 result = mix(color10, color20, t);\n\treturn vec4(result.rgb, 1.0);\n}\n#endif\n",defaultnormal_vertex:"vec3 transformedNormal = normalMatrix * objectNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif\n",displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, uv ).x * displacementScale + displacementBias );\n#endif\n",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\n\temissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb;\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif\n",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif\n",encodings_fragment:" gl_FragColor = linearToOutputTexel( gl_FragColor );\n",encodings_pars_fragment:"\nvec4 LinearToLinear( in vec4 value ) {\n\treturn value;\n}\nvec4 GammaToLinear( in vec4 value, in float gammaFactor ) {\n\treturn vec4( pow( value.xyz, vec3( gammaFactor ) ), value.w );\n}\nvec4 LinearToGamma( in vec4 value, in float gammaFactor ) {\n\treturn vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );\n}\nvec4 sRGBToLinear( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.w );\n}\nvec4 LinearTosRGB( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.w );\n}\nvec4 RGBEToLinear( in vec4 value ) {\n\treturn vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 );\n}
1\nvec4 LinearToRGBE( in vec4 value ) {\n\tfloat maxComponent = max( max( value.r, value.g ), value.b );\n\tfloat fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 );\n\treturn vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 );\n}\nvec4 RGBMToLinear( in vec4 value, in float maxRange ) {\n\treturn vec4( value.xyz * value.w * maxRange, 1.0 );\n}\nvec4 LinearToRGBM( in vec4 value, in float maxRange ) {\n\tfloat maxRGB = max( value.x, max( value.g, value.b ) );\n\tfloat M = clamp( maxRGB / maxRange, 0.0, 1.0 );\n\tM = ceil( M * 255.0 ) / 255.0;\n\treturn vec4( value.rgb / ( M * maxRange ), M );\n}\nvec4 RGBDToLinear( in vec4 value, in float maxRange ) {\n\treturn vec4( value.rgb * ( ( maxRange / 255.0 ) / value.a ), 1.0 );\n}\nvec4 LinearToRGBD( in vec4 value, in float maxRange ) {\n\tfloat maxRGB = max( value.x, max( value.g, value.b ) );\n\tfloat D = max( maxRange / maxRGB, 1.0 );\n\tD = min( floor( D ) / 255.0, 1.0 );\n\treturn vec4( value.rgb * ( D * ( 255.0 / maxRange ) ), D );\n}\nconst mat3 cLogLuvM = mat3( 0.2209, 0.3390, 0.4184, 0.1138, 0.6780, 0.7319, 0.0102, 0.1130, 0.2969 );\nvec4 LinearToLogLuv( in vec4 value ) {\n\tvec3 Xp_Y_XYZp = value.rgb * cLogLuvM;\n\tXp_Y_XYZp = max(Xp_Y_XYZp, vec3(1e-6, 1e-6, 1e-6));\n\tvec4 vResult;\n\tvResult.xy = Xp_Y_XYZp.xy / Xp_Y_XYZp.z;\n\tfloat Le = 2.0 * log2(Xp_Y_XYZp.y) + 127.0;\n\tvResult.w = fract(Le);\n\tvResult.z = (Le - (floor(vResult.w*255.0))/255.0)/255.0;\n\treturn vResult;\n}\nconst mat3 cLogLuvInverseM = mat3( 6.0014, -2.7008, -1.7996, -1.3320, 3.1029, -5.7721, 0.3008, -1.0882, 5.6268 );\nvec4 LogLuvToLinear( in vec4 value ) {\n\tfloat Le = value.z * 255.0 + value.w;\n\tvec3 Xp_Y_XYZp;\n\tXp_Y_XYZp.y = exp2((Le - 127.0) / 2.0);\n\tXp_Y_XYZp.z = Xp_Y_XYZp.y / value.y;\n\tXp_Y_XYZp.x = value.x * Xp_Y_XYZp.z;\n\tvec3 vRGB = Xp_Y_XYZp.rgb * cLogLuvInverseM;\n\treturn vec4( max(vRGB, 0.0), 1.0 );\n}\n",envmap_fragment:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\tvec3 cameraToVertex = normalize( vWorldPosition - cameraPosition );\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#elif defined( ENVMAP_TYPE_EQUIREC )\n\t\tvec2 sampleUV;\n\t\treflectVec = normalize( reflectVec );\n\t\tsampleUV.y = asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\t\tsampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\n\t\tvec4 envColor = texture2D( envMap, sampleUV );\n\t#elif defined( ENVMAP_TYPE_SPHERE )\n\t\treflectVec = normalize( reflectVec );\n\t\tvec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0, 0.0, 1.0 ) );\n\t\tvec4 envColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5 );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\tenvColor = envMapTexelToLinear( envColor );\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif\n",envmap_pars_fragment:"#if defined( USE_ENVMAP ) || defined( PHYSICAL )\n\tuniform float reflectivity;\n\tuniform float envMapIntensity;\n#endif\n#ifdef USE_ENVMAP\n\t#if ! defined( PHYSICAL ) && ( defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) )\n\t\tvarying vec3 vWorldPosition;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\tuniform float flipEnvMap;\n\tuniform int maxMipLevel;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( PHYSICAL )\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif\n",envmap_pars_vertex:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif\n",envmap_vertex:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\tvWorldPosition = worldPosition.xyz;
1\n\t#else\n\t\tvec3 cameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#endif\n#endif\n",fog_vertex:"\n#ifdef USE_FOG\nfogDepth = -mvPosition.z;\n#endif",fog_pars_vertex:"#ifdef USE_FOG\n varying float fogDepth;\n#endif\n",fog_fragment:"#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = whiteCompliment( exp2( - fogDensity * fogDensity * fogDepth * fogDepth * LOG2 ) );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, fogDepth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif\n",fog_pars_fragment:"#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\tvarying float fogDepth;\n\t#ifdef FOG_EXP2\n\t\tuniform float fogDensity;\n\t#else\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\t#endif\n#endif\n",gradientmap_pars_fragment:"#ifdef TOON\n\tuniform sampler2D gradientMap;\n\tvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\t\tfloat dotNL = dot( normal, lightDirection );\n\t\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\t\t#ifdef USE_GRADIENTMAP\n\t\t\treturn texture2D( gradientMap, coord ).rgb;\n\t\t#else\n\t\t\treturn ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 );\n\t\t#endif\n\t}\n#endif\n",lightmap_fragment:"#ifdef USE_LIGHTMAP\n\treflectedLight.indirectDiffuse += PI * texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\n#endif\n",lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif",lights_lambert_vertex:"vec3 diffuse = vec3( 1.0 );\nGeometricContext geometry;\ngeometry.position = mvPosition.xyz;\ngeometry.normal = normalize( transformedNormal );\ngeometry.viewDir = normalize( -mvPosition.xyz );\nGeometricContext backGeometry;\nbackGeometry.position = geometry.position;\nbackGeometry.normal = -geometry.normal;\nbackGeometry.viewDir = geometry.viewDir;\nvLightFront = vec3( 0.0 );\n#ifdef DOUBLE_SIDED\n\tvLightBack = vec3( 0.0 );\n#endif\nIncidentLight directLight;\nfloat dotNL;\nvec3 directLightColor_Diffuse;\n#if NUM_POINT_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tgetPointDirectLightIrradiance( pointLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tgetSpotDirectLightIrradiance( spotLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n#endif\n#if NUM_DIR_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tgetDirectionalDirectLightIrradiance( directionalLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\tvLightFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry );\n\t\t#endif\n\t}\n#endif\n",lights_pars_begin:"uniform vec3 ambientLightColor;\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treturn irradiance;\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tint shadow;\n\t\tfloat shadowBias;\n\t\tfloat shadowRadius;\n\t\tvec2 shadowMapSize;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalDirectLightIrradiance( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tdirectLight.color = directionalLight.color;\n\t\tdirectLight.direction = directionalLight.direction;\n\t\tdirectLight.visible = true;\n\t}\n#endif\n#if NUM_POINT_LIGHTS > 0\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tint shadow;\n\t\tfloat shadowBias;\n\t\tfloat shadowRadius;\n\t\tvec2 shadowMapSize;\n\t\tfloat shadowCameraNear;\n\t\tfloat shadowCameraFar;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tvoid getPointDirectLightIrradiance( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tvec3 lVector = pointLight.position - geometry.position;\n\t\tdirectLight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tdirectLight.color = pointLight.color;\n\t\tdirectLight.color *= punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.decay );\n\t\tdirectLight.visible = ( directLight.color != vec3( 0.0 ) );\n\t}
1\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t\tint shadow;\n\t\tfloat shadowBias;\n\t\tfloat shadowRadius;\n\t\tvec2 shadowMapSize;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tvoid getSpotDirectLightIrradiance( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tvec3 lVector = spotLight.position - geometry.position;\n\t\tdirectLight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tfloat angleCos = dot( directLight.direction, spotLight.direction );\n\t\tif ( angleCos > spotLight.coneCos ) {\n\t\t\tfloat spotEffect = smoothstep( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\t\tdirectLight.color = spotLight.color;\n\t\t\tdirectLight.color *= spotEffect * punctualLightIntensityToIrradianceFactor( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tdirectLight.visible = true;\n\t\t} else {\n\t\t\tdirectLight.color = vec3( 0.0 );\n\t\t\tdirectLight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\tuniform sampler2D ltc_1;\tuniform sampler2D ltc_2;\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in GeometricContext geometry ) {\n\t\tfloat dotNL = dot( geometry.normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tirradiance *= PI;\n\t\t#endif\n\t\treturn irradiance;\n\t}\n#endif\n",lights_pars_maps:"#if defined( USE_ENVMAP ) && defined( PHYSICAL )\n\tvec3 getLightProbeIndirectIrradiance( const in GeometricContext geometry, const in int maxMIPLevel ) {\n\t\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\t\t\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryVec, float( maxMIPLevel ) );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryVec, float( maxMIPLevel ) );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\n\t\t\tvec4 envMapColor = textureCubeUV( queryVec, 1.0 );\n\t\t#else\n\t\t\tvec4 envMapColor = vec4( 0.0 );\n\t\t#endif\n\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t}\n\tfloat getSpecularMIPLevel( const in float blinnShininessExponent, const in int maxMIPLevel ) {\n\t\tfloat maxMIPLevelScalar = float( maxMIPLevel );\n\t\tfloat desiredMIPLevel = maxMIPLevelScalar + 0.79248 - 0.5 * log2( pow2( blinnShininessExponent ) + 1.0 );\n\t\treturn clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );\n\t}\n\tvec3 getLightProbeIndirectRadiance( const in GeometricContext geometry, const in float blinnShininessExponent, const in int maxMIPLevel ) {\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( -geometry.viewDir, geometry.normal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( -geometry.viewDir, geometry.normal, refractionRatio );\n\t\t#endif\n\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\tfloat specularMIPLevel = getSpecularMIPLevel( blinnShininessExponent, maxMIPLevel );\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\t\t\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryReflectVec, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryReflectVec, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\n\t\t\tvec4 envMapColor = textureCubeUV(queryReflectVec, BlinnExponentToGGXRoughness(blinnShinine
1ssExponent));\n\t\t#elif defined( ENVMAP_TYPE_EQUIREC )\n\t\t\tvec2 sampleUV;\n\t\t\tsampleUV.y = asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\t\t\tsampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = texture2DLodEXT( envMap, sampleUV, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = texture2D( envMap, sampleUV, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_SPHERE )\n\t\t\tvec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0,0.0,1.0 ) );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = texture2DLodEXT( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#endif\n\t\treturn envMapColor.rgb * envMapIntensity;\n\t}\n#endif\n",lights_phong_fragment:"BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;\n",lights_phong_pars_fragment:"varying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\nstruct BlinnPhongMaterial {\n\tvec3\tdiffuseColor;\n\tvec3\tspecularColor;\n\tfloat\tspecularShininess;\n\tfloat\tspecularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\t#ifdef TOON\n\t\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\n\t#else\n\t\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\t\tvec3 irradiance = dotNL * directLight.color;\n\t#endif\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_Specular_BlinnPhong( directLight, geometry, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong\n#define Material_LightProbeLOD( material )\t(0)\n",lights_physical_fragment:"PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nmaterial.specularRoughness = clamp( roughnessFactor, 0.04, 1.0 );\n#ifdef STANDARD\n\tmaterial.specularColor = mix( vec3( DEFAULT_SPECULAR_COEFFICIENT ), diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( MAXIMUM_SPECULAR_COEFFICIENT * pow2( reflectivity ) ), diffuseColor.rgb, metalnessFactor );\n\tmaterial.clearCoat = saturate( clearCoat );\tmaterial.clearCoatRoughness = clamp( clearCoatRoughness, 0.04, 1.0 );\n#endif\n",lights_physical_pars_fragment:"struct PhysicalMaterial {\n\tvec3\tdiffuseColor;\n\tfloat\tspecularRoughness;\n\tvec3\tspecularColor;\n\t#ifndef STANDARD\n\t\tfloat clearCoat;\n\t\tfloat clearCoatRoughness;\n\t#endif\n};\n#define MAXIMUM_SPECULAR_COEFFICIENT 0.16\n#define DEFAULT_SPECULAR_COEFFICIENT 0.04\nfloat clearCoatDHRApprox( const in float roughness, const in float dotNL ) {\n\treturn DEFAULT_SPECULAR_COEFFICIENT + ( 1.0 - DEFAULT_SPECULAR_COEFFICIENT ) * ( pow( 1.0 - dotNL, 5.0 ) * pow( 1.0 - roughness, 2.0 ) );\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t\tvec3 normal = geometry.normal;\n\t\tvec3 viewDir = geometry.viewDir;\n\t\tvec3 position = geometry.position;
1\n\t\tvec3 lightPos = rectAreaLight.position;\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\n\t\tvec3 lightColor = rectAreaLight.color;\n\t\tfloat roughness = material.specularRoughness;\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] = lightPos - halfWidth - halfHeight;\t\trectCoords[ 1 ] = lightPos + halfWidth - halfHeight;\n\t\trectCoords[ 2 ] = lightPos + halfWidth + halfHeight;\n\t\trectCoords[ 3 ] = lightPos - halfWidth + halfHeight;\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\n\t\tvec4 t1 = texture2D( ltc_1, uv );\n\t\tvec4 t2 = texture2D( ltc_2, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( t1.x, 0, t1.y ),\n\t\t\tvec3( 0, 1, 0 ),\n\t\t\tvec3( t1.z, 0, t1.w )\n\t\t);\n\t\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n\t}\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\t#ifndef STANDARD\n\t\tfloat clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL );\n\t#else\n\t\tfloat clearCoatDHR = 0.0;\n\t#endif\n\treflectedLight.directSpecular += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Specular_GGX( directLight, geometry, material.specularColor, material.specularRoughness );\n\treflectedLight.directDiffuse += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n\t#ifndef STANDARD\n\t\treflectedLight.directSpecular += irradiance * material.clearCoat * BRDF_Specular_GGX( directLight, geometry, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness );\n\t#endif\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 clearCoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t#ifndef STANDARD\n\t\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\t\tfloat dotNL = dotNV;\n\t\tfloat clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL );\n\t#else\n\t\tfloat clearCoatDHR = 0.0;\n\t#endif\n\treflectedLight.indirectSpecular += ( 1.0 - clearCoatDHR ) * radiance * BRDF_Specular_GGX_Environment( geometry, material.specularColor, material.specularRoughness );\n\t#ifndef STANDARD\n\t\treflectedLight.indirectSpecular += clearCoatRadiance * material.clearCoat * BRDF_Specular_GGX_Environment( geometry, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness );\n\t#endif\n}\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\n#define Material_BlinnShininessExponent( material ) GGXRoughnessToBlinnExponent( material.specularRoughness )\n#define Material_ClearCoat_BlinnShininessExponent( material ) GGXRoughnessToBlinnExponent( material.clearCoatRoughness )\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}\n",lights_fragment_begin:"\nGeometricContext geometry;\ngeometry.position = - vViewPosition;\ngeometry.normal = normal;\ngeometry.viewDir = normalize( vViewPosition );\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointDirectLightIrradiance( pointLight, geometry, directLight );\n\t\t#ifdef USE_SHADOWMAP\n\t\tdirectLight.color *= all( bvec2( pointLight.shadow, directLight.visible ) ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}
1\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotDirectLightIrradiance( spotLight, geometry, directLight );\n\t\t#ifdef USE_SHADOWMAP\n\t\tdirectLight.color *= all( bvec2( spotLight.shadow, directLight.visible ) ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalDirectLightIrradiance( directionalLight, geometry, directLight );\n\t\t#ifdef USE_SHADOWMAP\n\t\tdirectLight.color *= all( bvec2( directionalLight.shadow, directLight.visible ) ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\t#pragma unroll_loop\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t}\n\t#endif\n#endif\n#if defined( RE_IndirectSpecular )\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearCoatRadiance = vec3( 0.0 );\n#endif\n",lights_fragment_maps:"#if defined( RE_IndirectDiffuse )\n\t#ifdef USE_LIGHTMAP\n\t\tvec3 lightMapIrradiance = texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tlightMapIrradiance *= PI;\n\t\t#endif\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( PHYSICAL ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tirradiance += getLightProbeIndirectIrradiance( geometry, maxMipLevel );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\tradiance += getLightProbeIndirectRadiance( geometry, Material_BlinnShininessExponent( material ), maxMipLevel );\n\t#ifndef STANDARD\n\t\tclearCoatRadiance += getLightProbeIndirectRadiance( geometry, Material_ClearCoat_BlinnShininessExponent( material ), maxMipLevel );\n\t#endif\n#endif\n",lights_fragment_end:"#if defined( RE_IndirectDiffuse )\n\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n\tRE_IndirectSpecular( radiance, clearCoatRadiance, geometry, material, reflectedLight );\n#endif\n",logdepthbuf_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tgl_FragDepthEXT = log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif",logdepthbuf_pars_fragment:"#ifdef USE_LOGDEPTHBUF\n\tuniform float logDepthBufFC;\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t#endif\n#endif\n",logdepthbuf_pars_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t#endif\n\tuniform float logDepthBufFC;\n#endif",logdepthbuf_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvFragDepth = 1.0 + gl_Position.w;\n\t#else\n\t\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\n\t\tgl_Position.z *= gl_Position.w;\n\t#endif\n#endif\n",map_fragment:"#ifdef USE_MAP\n\tvec4 texelColor = texture2D( map, vUv );\n\ttexelColor = mapTexelToLinear( texelColor );\n\tdiffuseColor *= texelColor;\n#endif\n",map_pars_fragment:"#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n",map_particle_fragment:"#ifdef USE_MAP\n\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n\tvec4 mapTexel = texture2D( map, uv );\n\tdiffuseColor *= mapTexelToLinear( mapTexel );\n#endif\n",map_particle_pars_fragment:"#ifdef USE_MAP\n\tuniform mat3 uvTransform;\n\tuniform sampler2D map;\n#endif\n",metalnessmap_fragment:"float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif\n",metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\n\tobjectNormal += ( morphNormal0 - normal ) * morphTargetInfluences[ 0 ];\n\tobjectNormal += ( morphNormal1 - normal ) * morphTargetInfluences[ 1 ];\n\tobjectNormal += ( morphNormal2 - normal ) * morphTargetInfluences[ 2 ];\n\tobjectNormal += ( morphNormal3 - normal ) * morphTargetInfluences[ 3 ];\n#endif\n",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\t#ifndef USE_MORPHNORMALS\n\tuniform float morphTargetInfluences[ 8 ];\n\t#else\n\tuniform float morphTargetInfluences[ 4 ];\n\t#endif\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed += ( morphTarget0 - position ) * morphTargetInfluences[ 0 ];\n\ttransformed += ( morphTarget1 - position ) * morphTargetInfluences[ 1 ];\n\ttransformed += ( morphTarget2 - position ) * morphTargetInfluences[ 2 ];\n\ttransformed += ( morphTarget3 - position ) * morphTargetInfluences[ 3 ];\n\t#ifndef USE_MORPHNORMALS\n\ttransformed += ( morphTarget4 - position ) * morphTargetInfluences[ 4 ];\n\ttransformed += ( morphTarget5 - position ) * morphTargetInfluences[ 5 ];\n\ttransformed += ( morphTarget6 - position ) * morphTargetInfluences[ 6 ];\n\ttransformed += ( morphTarget7 - position ) * morphTargetInfluences[ 7 ];\n\t#endif\n#endif\n",normal_fragment_begin:"#ifdef FLAT_SHADED\n\tvec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) );\n\tvec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t#endif\n#endif\n",normal_fragment_maps:"#ifdef USE_NORMALMAP\n\tnormal = perturbN
1ormal2Arb( -vViewPosition, normal );\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( -vViewPosition, normal, dHdxy_fwd() );\n#endif\n",normalmap_pars_fragment:"#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n\tvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm ) {\n\t\tvec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );\n\t\tvec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );\n\t\tvec2 st0 = dFdx( vUv.st );\n\t\tvec2 st1 = dFdy( vUv.st );\n\t\tfloat scale = sign( st1.t * st0.s - st0.t * st1.s );\n\t\tvec3 S = normalize( ( q0 * st1.t - q1 * st0.t ) * scale );\n\t\tvec3 T = normalize( ( - q0 * st1.s + q1 * st0.s ) * scale );\n\t\tvec3 N = normalize( surf_norm );\n\t\tmat3 tsn = mat3( S, T, N );\n\t\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\t\tmapN.xy *= normalScale;\n\t\tmapN.xy *= ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\treturn normalize( tsn * mapN );\n\t}\n#endif\n",packing:"vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\nconst float ShiftRight8 = 1. / 256.;\nvec4 packDepthToRGBA( const in float v ) {\n\tvec4 r = vec4( fract( v * PackFactors ), v );\n\tr.yzw -= r.xyz * ShiftRight8;\treturn r * PackUpscale;\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {\n\treturn linearClipZ * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn (( near + viewZ ) * far ) / (( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * invClipZ - far );\n}\n",premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif\n",project_vertex:"vec4 mvPosition = modelViewMatrix * vec4( transformed, 1.0 );\ngl_Position = projectionMatrix * mvPosition;\n",dithering_fragment:"#if defined( DITHERING )\n gl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif\n",dithering_pars_fragment:"#if defined( DITHERING )\n\tvec3 dithering( vec3 color ) {\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n\t\treturn color + dither_shift_RGB;\n\t}\n#endif\n",roughnessmap_fragment:"float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\n\troughnessFactor *= texelRoughness.g;\n#endif\n",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif",shadowmap_pars_fragment:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHTS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ];\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHTS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ];\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHTS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ];\n\t#endif\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n\t}\n\tfloat texture2DShadowLerp( sampler2D depths, vec2 size, vec2 uv, float compare ) {\n\t\tconst vec2 offset = vec2( 0.0, 1.0 );\n\t\tvec2 texelSize = vec2( 1.0 ) / size;\n\t\tvec2 centroidUV = floor( uv * size + 0.5 ) / size;\n\t\tfloat lb = texture2DCompare( depths, centroidUV + texelSize * offset.xx, compare );\n\t\tfloat lt = texture2DCompare( depths, centroidUV + texelSize * offset.xy, compare );\n\t\tfloat rb = texture2DCompare( depths, centroidUV + texelSize * offset.yx, compare );\n\t\tfloat rt = texture2DCompare( depths, centroidUV + texelSize * offset.yy, compare );\n\t\tvec2 f = fract( uv * size + 0.5 );\n\t\tfloat a = mix( lb, lt, f.y );\n\t\tfloat b = mix( rb, rt, f.y );\n\t\tfloat c = mix( a, b, f.x );\n\t\treturn c;\n\t}\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tfloat shadow = 1.0;\n\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\tshadowCoord.z += shadowBias;\n\t\tbvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 );\n\t\tbool inFrustum = all( inFrustumVec );\n\t\tbvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 );\n\t\tbool frustumTest = all( frustumTestVec );\n\t\tif ( frustumTest ) {\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tshadow = (\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#endif\n\t\t}\n\t\treturn shadow;\n\t}\n\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\n\t\tvec3 absV = abs( v );\n\t\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n\t\tabsV *= scaleToCube;\n\t\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n\t\tvec2 planar = v.xy;\n\t\tfloat almostATexel = 1.5 * texelSizeY;\n\t\tfloat almostOne = 1.0 - almostATexel;\n\t\tif ( absV.z >= almostOne ) {\n\t\t\tif ( v.z > 0.0 )\n\t\t\t\tplanar.x = 4.0 - v.x;\n\t\t} else if ( absV.x >= almostOne ) {\n\t\t\tfloat signX = sign( v.x );\n\t\t\tplanar.x = v.z * signX + 2.0 * signX;\n\t\t} else if ( absV.y >= almostOne ) {\n\t\t\tfloat signY = sign( v.y );\n\t\t\tplanar.x = v.x + 2.0 * signY + 2.0;\n\t\t\tplanar.y = v.z * signY - 2.0;\n\t\t}\n\t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n\t}\n\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );
1\t\tdp += shadowBias;\n\t\tvec3 bd3D = normalize( lightToPosition );\n\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n\t\t\treturn (\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n\t\t#endif\n\t}\n#endif\n",shadowmap_pars_vertex:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHTS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ];\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\t\tuniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHTS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ];\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHTS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ];\n\t#endif\n#endif\n",shadowmap_vertex:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tvSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n#endif\n",shadowmask_pars_fragment:"float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\tDirectionalLight directionalLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tshadow *= bool( directionalLight.shadow ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\tSpotLight spotLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tshadow *= bool( spotLight.shadow ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t}\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\tPointLight pointLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tshadow *= bool( pointLight.shadow ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t}\n\t#endif\n\t#endif\n\treturn shadow;\n}\n",skinbase_vertex:"#ifdef USE_SKINNING\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif",skinning_pars_vertex:"#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\t#ifdef BONE_TEXTURE\n\t\tuniform sampler2D boneTexture;\n\t\tuniform int boneTextureSize;\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tfloat j = i * 4.0;\n\t\t\tfloat x = mod( j, float( boneTextureSize ) );\n\t\t\tfloat y = floor( j / float( boneTextureSize ) );\n\t\t\tfloat dx = 1.0 / float( boneTextureSize );\n\t\t\tfloat dy = 1.0 / float( boneTextureSize );\n\t\t\ty = dy * ( y + 0.5 );\n\t\t\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\n\t\t\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\n\t\t\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\n\t\t\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\n\t\t\tmat4 bone = mat4( v1, v2, v3, v4 );\n\t\t\treturn bone;\n\t\t}\n\t#else\n\t\tuniform mat4 boneMatrices[ MAX_BONES ];\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tmat4 bone = boneMatrices[ int(i) ];\n\t\t\treturn bone;\n\t\t}\n\t#endif\n#endif\n",skinning_vertex:"#ifdef USE_SKINNING\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n\tvec4 skinned = vec4( 0.0 );\n\tskinned += boneMatX * skinVertex * skinWeight.x;\n\tskinned += boneMatY * skinVertex * skinWeight.y;\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\n\tskinned += boneMatW * skinVertex * skinWeight.w;\n\ttransformed = ( bindMatrixInverse * skinned ).xyz;\n#endif\n",skinnormal_vertex:"#ifdef USE_SKINNING\n\tmat4 skinMatrix = mat4( 0.0 );\n\tskinMatrix += skinWeight.x * boneMatX;\n\tskinMatrix += skinWeight.y * boneMatY;\n\tskinMatrix += skinWeight.z * boneMatZ;\n\tskinMatrix += skinWeight.w * boneMatW;
1\n\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n#endif\n",specularmap_fragment:"float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif",specularmap_pars_fragment:"#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif",tonemapping_fragment:"#if defined( TONE_MAPPING )\n gl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif\n",tonemapping_pars_fragment:"#ifndef saturate\n\t#define saturate(a) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\nuniform float toneMappingWhitePoint;\nvec3 LinearToneMapping( vec3 color ) {\n\treturn toneMappingExposure * color;\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n}\n#define Uncharted2Helper( x ) max( ( ( x * ( 0.15 * x + 0.10 * 0.50 ) + 0.20 * 0.02 ) / ( x * ( 0.15 * x + 0.50 ) + 0.20 * 0.30 ) ) - 0.02 / 0.30, vec3( 0.0 ) )\nvec3 Uncharted2ToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( Uncharted2Helper( color ) / Uncharted2Helper( vec3( toneMappingWhitePoint ) ) );\n}\nvec3 OptimizedCineonToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\n",uv_pars_fragment:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\n\tvarying vec2 vUv;\n#endif",uv_pars_vertex:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\n\tvarying vec2 vUv;\n\tuniform mat3 uvTransform;\n#endif\n",uv_vertex:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n#endif",uv2_pars_fragment:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvarying vec2 vUv2;\n#endif",uv2_pars_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tattribute vec2 uv2;\n\tvarying vec2 vUv2;\n#endif",uv2_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvUv2 = uv2;\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP )\n\tvec4 worldPosition = modelMatrix * vec4( transformed, 1.0 );\n#endif\n",cube_frag:"uniform samplerCube tCube;\nuniform float tFlip;\nuniform float opacity;\nvarying vec3 vWorldPosition;\nvoid main() {\n\tgl_FragColor = textureCube( tCube, vec3( tFlip * vWorldPosition.x, vWorldPosition.yz ) );\n\tgl_FragColor.a *= opacity;\n}\n",cube_vert:"varying vec3 vWorldPosition;\n#include <common>\nvoid main() {\n\tvWorldPosition = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\tgl_Position.z = gl_Position.w;\n}\n",depth_frag:"#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <logdepthbuf_fragment>\n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( 1.0 - gl_FragCoord.z ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( gl_FragCoord.z );\n\t#endif\n}\n",depth_vert:"#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n}\n",distanceRGBA_frag:"#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main () {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist );\n\tgl_FragColor = packDepthToRGBA( dist );\n}\n",distanceRGBA_vert:"#define DISTANCE\nvarying vec3 vWorldPosition;\n#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\tvWorldPosition = worldPosition.xyz;\n}\n",equirect_frag:"uniform sampler2D tEquirect;\nvarying vec3 vWorldPosition;\n#include <common>\nvoid main() {\n\tvec3 direction = normalize( vWorldPosition );\n\tvec2 sampleUV;\n\tsampleUV.y = asin( clamp( direction.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\tsampleUV.x = atan( direction.z, direction.x ) * RECIPROCAL_PI2 + 0.5;\n\tgl_FragColor = texture2D( tEquirect, sampleUV );\n}\n",equirect_vert:"varying vec3 vWorldPosition;\n#include <common>\nvoid main() {\n\tvWorldPosition = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n}\n",linedashed_frag:"uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <color_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <premultiplied_alpha_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}\n",linedashed_vert:"uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <color_vertex>\n\tvLineDistance = scale * lineDistance;\n\tvec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}\n",meshbasic_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\treflectedLight.indirectDiffuse += texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\n\t#else\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\t#endif\n\t#include <aomap_fragment>\n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include <envmap_fragment>\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <premultiplied_alpha_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}\n",meshbasic_vert:"#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_ENVMAP\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <envmap_vertex>\n\t#include <fog_vertex>\n}\n",meshlambert_frag:"uniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\nvarying vec3 vLightFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n#endif\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <lights_pars_maps>\n#include <fog_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <emissivemap_fragment>\n\treflectedLight.indirectDiffuse = getAmbientLightIrradiance( ambientLightColor );\n\t#include <lightmap_fragment>\n\treflectedLight.indirectDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb );\n\t#ifdef DOUBLE_SIDED\n\t\treflectedLight.directDiffuse = ( gl_FrontFacing ) ? vLightFront : vLightBack;\n\t#else\n\t\treflectedLight.directDiffuse = vLightFront;\n\t#endif\n\treflectedLight.directDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb ) * getShadowMask();\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}\n",meshlambert_vert:"#define LAMBERT\nvarying vec3 vLightFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <envmap_pars_vertex>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <lights_pars_maps>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <lights_lambert_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}\n",meshphong_frag:"#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_pars_fragment>\n#include <gradientmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <lights_pars_maps>\n#include <lights_phong_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_phong_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}\n",meshphong_vert:"#define PHONG\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_ve
1rtex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}\n",meshphysical_frag:"#define PHYSICAL\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifndef STANDARD\n\tuniform float clearCoat;\n\tuniform float clearCoatRoughness;\n#endif\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <cube_uv_reflection_fragment>\n#include <lights_pars_begin>\n#include <lights_pars_maps>\n#include <lights_physical_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <roughnessmap_pars_fragment>\n#include <metalnessmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <roughnessmap_fragment>\n\t#include <metalnessmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_physical_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}\n",meshphysical_vert:"#define PHYSICAL\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}\n",normal_frag:"#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <packing>\n#include <uv_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\nvoid main() {\n\t#include <logdepthbuf_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\n}\n",normal_vert:"#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}\n",points_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <color_pars_fragment>\n#include <map_particle_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_particle_fragment>\n\t#include <color_fragment>\n\t#include <alphatest_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <premultiplied_alpha_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}\n",points_vert:"uniform float size;\nuniform float scale;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <color_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\t#ifdef USE_SIZEATTENUATION\n\t\tgl_PointSize = size * ( scale / - mvPosition.z );\n\t#else\n\t\tgl_PointSize = size;\n\t#endif\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <fog_vertex>\n}\n",shadow_frag:"uniform vec3 color;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\nvoid main() {\n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include <fog_fragment>\n}\n",shadow_vert:"#include <fog_pars_vertex>\n#include <shadowmap_pars_vertex>\nvoid main() {\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}\n"},Ui={merge:function(e){for(var t={},i=0;i<e.length;i++){var n=this.clone(e[i]);for(var r in n)t[r]=n[r]}return t},clone:function(e){var t={};for(var i in e)for(var n in t[i]={},e[i]){var r=e[i][n];r&&(r.isColor||r.isMatrix3||r.isMatrix4||r.isVector2||r.isVector3||r.isVector4||r.isTexture)?t[i][n]=r.clone():Array.isArray(r)?t[i][n]=r.slice():t[i][n]=r}return t}},Bi={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Fi(e,t,i){return void 0===t&&void 0===i?this.set(e):this.setRGB(e,t,i)}function Gi(e,t,i){return i<0&&(i+=1),1<i&&--i,i<1/6?e+6*(t-e)*i:i<.5?t:i<2/3?e+6*(t-e)*(2/3-i):e}Object.assign(Fi.prototype,{isColor:!0,r:1,g:1,b:1,set:function(e){return e&&e.isColor?this.copy(e):"number"==typeof e?this.setHex(e):"string"==typeof e&&this.setStyle(e),this},setScalar:function(e){return this.r=e,this.g=e,this.b=e,this},setHex:function(e){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(255&e)/255,this},setRGB:function(e,t,i){return this.r=e,this.g=t,this.b=i,this},setHSL:function(e,t,i){if(e=Ht.euclideanModulo(e,1),t=Ht.clamp(t,0,1),i=Ht.clamp(i,0,1),0===t)this.r=this.g=this.b=i;else{var n=i<=.5?i*(1+t):i+t-i*t,r=2*i-n;this.r=Gi(r,n,e+1/3),this.g=Gi(r,n,e),this.b=Gi(r,n,e-1/3)}return this},setStyle:function(t){function e(e){void 0!==e&&parseFloat(e)<1&&console.warn("THREE.Color: Alpha component of "+t+" will be ignored.")}var i;if(i=/^((?:rgb|hsl)a?)\(\s*([^\)]*)\)/.exec(t)){var n,r=i[1],a=i[2];switch(r){case"rgb":case"rgba":if(n=/^(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(a))return this.r=Math.min(255,parseInt(n[1],10))/255,this.g=Math.min(255,parseInt(n[2],10))/255,this.b=Math.min(255,parseInt(n[3],10))/255,e(n[5]),this;if(n=/^(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(a))return this.r=Math.min(100,parseInt(n[1],10))/100,this.g=Math.min(100,parseInt(n[2],10))/100,this.b=Math.min(100,parseInt(n[3],10))/100,e(n[5]),this;break;case"hsl":case"hsla":if(n=/^([0-9]*\.?[0-9]+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(a)){var s=parseFloat(n[1])/360,o=parseInt(n[2],10)/100,l=parseInt(n[3],10)/100;return e(n[5]),this.setHSL(s,o,l)}}}else if(i=/^\#([A-Fa-f0-9]+)$/.exec(t)){var u,c=(u=i[1]).length;if(3===c)return this.r=parseInt(u.charAt(0)+u.charAt(0),16)/255,this.g=parseInt(u.charAt(1)+u.charAt(1),16)/255,this.b=parseInt(u.charAt(2)+u.charAt(2),16)/255,this;if(6===c)return this.r=parseInt(u.charAt(0)+u.charAt(1),16)/255,this.g=parseInt(u.charAt(2)+u.charAt(3),16)/255,this.b=parseInt(u.charAt(4)+u.charAt(5),16)/255,this}t&&0<t.length&&(void 0!==(u=Bi[t])?this.setHex(u):console.warn("THREE.Color: Unknown color "+t));return this},clone:function(){return new this.constructor(this.r,this.g,this.b)}
vendor: 13,590 bytes, line 1
1,copy:function(e){return this.r=e.r,this.g=e.g,this.b=e.b,this},copyGammaToLinear:function(e,t){return void 0===t&&(t=2),this.r=Math.pow(e.r,t),this.g=Math.pow(e.g,t),this.b=Math.pow(e.b,t),this},copyLinearToGamma:function(e,t){void 0===t&&(t=2);var i=0<t?1/t:1;return this.r=Math.pow(e.r,i),this.g=Math.pow(e.g,i),this.b=Math.pow(e.b,i),this},convertGammaToLinear:function(e){return this.copyGammaToLinear(this,e),this},convertLinearToGamma:function(e){return this.copyLinearToGamma(this,e),this},getHex:function(){return 255*this.r<<16^255*this.g<<8^255*this.b<<0},getHexString:function(){return("000000"+this.getHex().toString(16)).slice(-6)},getHSL:function(e){void 0===e&&(console.warn("THREE.Color: .getHSL() target is now required"),e={h:0,s:0,l:0});var t,i,n=this.r,r=this.g,a=this.b,s=Math.max(n,r,a),o=Math.min(n,r,a),l=(o+s)/2;if(o===s)i=t=0;else{var u=s-o;switch(i=l<=.5?u/(s+o):u/(2-s-o),s){case n:t=(r-a)/u+(r<a?6:0);break;case r:t=(a-n)/u+2;break;case a:t=(n-r)/u+4}t/=6}return e.h=t,e.s=i,e.l=l,e},getStyle:function(){return"rgb("+(255*this.r|0)+","+(255*this.g|0)+","+(255*this.b|0)+")"},offsetHSL:(Ri={},function(e,t,i){return this.getHSL(Ri),Ri.h+=e,Ri.s+=t,Ri.l+=i,this.setHSL(Ri.h,Ri.s,Ri.l),this}),add:function(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this},addColors:function(e,t){return this.r=e.r+t.r,this.g=e.g+t.g,this.b=e.b+t.b,this},addScalar:function(e){return this.r+=e,this.g+=e,this.b+=e,this},sub:function(e){return this.r=Math.max(0,this.r-e.r),this.g=Math.max(0,this.g-e.g),this.b=Math.max(0,this.b-e.b),this},multiply:function(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this},multiplyScalar:function(e){return this.r*=e,this.g*=e,this.b*=e,this},lerp:function(e,t){return this.r+=(e.r-this.r)*t,this.g+=(e.g-this.g)*t,this.b+=(e.b-this.b)*t,this},equals:function(e){return e.r===this.r&&e.g===this.g&&e.b===this.b},fromArray:function(e,t){return void 0===t&&(t=0),this.r=e[t],this.g=e[t+1],this.b=e[t+2],this},toArray:function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=0),e[t]=this.r,e[t+1]=this.g,e[t+2]=this.b,e},toJSON:function(){return this.getHex()}});var Hi,Yi,Qi={common:{diffuse:{value:new Fi(15658734)},opacity:{value:1},map:{value:null},uvTransform:{value:new qt},alphaMap:{value:null}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},refractionRatio:{value:.98},maxMipLevel:{value:0}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalScale:{value:new Yt(1,1)}},displacementmap:{displacementMap:{value:null},displacementScale:{value:1},displacementBias:{value:0}},roughnessmap:{roughnessMap:{value:null}},metalnessmap:{metalnessMap:{value:null}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Fi(16777215)}},lights:{ambientLightColor:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{}}},spotShadowMap:{value:[]},spotShadowMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}}},points:{diffuse:{value:new Fi(15658734)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},uvTransform:{value:new qt}}},Vi={basic:{uniforms:Ui.merge([Qi.common,Qi.specularmap,Qi.envmap,Qi.aomap,Qi.lightmap,Qi.fog]),vertexShader:zi.meshbasic_vert,fragmentShader:zi.meshbasic_frag},lambert:{uniforms:Ui.merge([Qi.common,Qi.specularmap,Qi.envmap,Qi.aomap,Qi.lightmap,Qi.emissivemap,Qi.fog,Qi.lights,{emissive:{value:new Fi(0)}}]),vertexShader:zi.meshlambert_vert,fragmentShader:zi.meshlambert_frag},phong:{uniforms:Ui.merge([Qi.common,Qi.specularmap,Qi.envmap,Qi.aomap,Qi.lightmap,Qi.emissivemap,Qi.bumpmap,Qi.normalmap,Qi.displacementmap,Qi.gradientmap,Qi.fog,Qi.lights,{emissive:{value:new Fi(0)},specular:{value:new Fi(1118481)},shininess:{value:30}}]),vertexShader:zi.meshphong_vert,fragmentShader:zi.meshphong_frag},standard:{uniforms:Ui.merge([Qi.common,Qi.envmap,Qi.aomap,Qi.lightmap,Qi.emissivemap,Qi.bumpmap,Qi.normalmap,Qi.displacementmap,Qi.roughnessmap,Qi.metalnessmap,Qi.fog,Qi.lights,{emissive:{value:new Fi(0)},roughness:{value:.5},metalness:{value:.5},envMapIntensity:{value:1}}]),vertexShader:zi.meshphysical_vert,fragmentShader:zi.meshphysical_frag},points:{uniforms:Ui.merge([Qi.points,Qi.fog]),vertexShader:zi.points_vert,fragmentShader:zi.points_frag},dashed:{uniforms:Ui.merge([Qi.common,Qi.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:zi.linedashed_vert,fragmentShader:zi.linedashed_frag},depth:{uniforms:Ui.merge([Qi.common,Qi.displacementmap]),vertexShader:zi.depth_vert,fragmentShader:zi.depth_frag},normal:{uniforms:Ui.merge([Qi.common,Qi.bumpmap,Qi.normalmap,Qi.displacementmap,{opacity:{value:1}}]),vertexShader:zi.normal_vert,fragmentShader:zi.normal_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:zi.cube_vert,fragmentShader:zi.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:zi.equirect_vert,fragmentShader:zi.equirect_frag},distanceRGBA:{uniforms:Ui.merge([Qi.common,Qi.displacementmap,{referencePosition:{value:new Wt},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:zi.distanceRGBA_vert,fragmentShader:zi.distanceRGBA_frag},shadow:{uniforms:Ui.merge([Qi.lights,Qi.fog,{color:{value:new Fi(0)},opacity:{value:1}}]),vertexShader:zi.shadow_vert,fragmentShader:zi.shadow_frag}};function Wi(){var i=null,n=!1,r=null;function a(e,t){!1!==n&&(r(e,t),i.requestAnimationFrame(a))}return{start:function(){!0!==n&&null!==r&&(i.requestAnimationFrame(a),n=!0)},stop:function(){n=!1},setAnimationLoop:function(e){r=e},setContext:function(e){i=e}}}function qi(l){var u=new WeakMap;return{get:function(e){return e.isInterleavedBufferAttribute&&(e=e.data),u.get(e)},remove:function(e){e.isInterleavedBufferAttribute&&(e=e.data);var t=u.get(e);t&&(l.deleteBuffer(t.buffer),u.delete(e))},update:function(e,t){e.isInterleavedBufferAttribute&&(e=e.data);var i,n,r,a,s,o=u.get(e);void 0===o?u.set(e,function(e,t){var i=e.array,n=e.dynamic?l.DYNAMIC_DRAW:l.STATIC_DRAW,r=l.createBuffer();l.bindBuffer(t,r),l.bufferData(t,i,n),e.onUploadCallback();var a=l.FLOAT;return i instanceof Float32Array?a=l.FLOAT:i instanceof Float64Array?console.warn("THREE.WebGLAttributes: Unsupported data buffer format: Float64Array."):i instanceof Uint16Array?a=l.UNSIGNED_SHORT:i instanceof Int16Array?a=l.SHORT:i instanceof Uint32Array?a=l.UNSIGNED_INT:i instanceof Int32Array?a=l.INT:i instanceof Int8Array?a=l.BYTE:i instanceof Uint8Array&&(a=l.UNSIGNED_BYTE),{buffer:r,type:a,bytesPerElement:i.BYTES_PER_ELEMENT,version:e.version}}(e,t)):o.version<e.version&&(i=o.buffer,r=t,a=(n=e).array,s=n.updateRange,l.bindBuffer(r,i),!1===n.dynamic?l.bufferData(r,a,l.STATIC_DRAW):-1===s.count?l.bufferSubData(r,0,a):0===s.count?console.error("THREE.WebGLObjects.updateBuffer: dynamic THREE.BufferAttribute marked as needsUpdate but updateRange.count is 0, ensure you are using set methods or updating manually."):(l.bufferSubData(r,s.offset*a.BYTES_PER_ELEMENT,a.subarray(s.offset,s.offset+s.count)),s.count=-1),o.version=e.version)}}}function Xi(e,t,i,n){this._x=e||0,this._y=t||0,this._z=i||0,this._order=n||Xi.DefaultOrder}function Zi(){this.mask=1}Vi.physical={uniforms:Ui.merge([Vi.standard.uniforms,{clearCoat:{value:0},clearCoatRoughness:{value:0}}]),vertexShader:zi.meshphysical_vert,fragmentShader:zi.meshphysical_frag},Xi.RotationOrders=["XYZ","YZX","ZXY","XZY","YXZ","ZYX"],Xi.DefaultOrder="XYZ",Object.defineProperties(Xi.prototype,{x:{get:function(){return this._x},set:function(e){this._x=e,this.onChangeCallback()}},y:{get:function(){return this._y},set:function(e){this._y=e,this.onChangeCallback()}},z:{get:function(){return this._z},set:function(e){this._z=e,this.onChangeCallback()}},order:{get:function(){return this._order},set:function(e){this._order=e,this.onChangeCallback()}}}),Object.assign(Xi.prototype,{isEuler:!0,set:function(e,t,i,n){return this._x=e,this._y=t,this._z=i,this._order=n||this._order,this.onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._order)},copy:function(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this.onChangeCallback(),this},setFromRotationMatrix:function(e,t,i){var n=Ht.clamp,r=e.elements,a=r[0],s=r[4],o=r[8],l=r[1],u=r[5],c=r[9],h=r[2],d=r[6],p=r[10];return"XYZ"===(t=t||this._order)?(this._y=Math.asin(n(o,-1,1)),Math.abs(o)<.99999?(this._x=Math.atan2(-c,p),this._z=Math.atan2(-s,a)):(this._x=Math.atan2(d,u),this._z=0)):"YXZ"===t?(this._x=Math.asin(-n(c,-1,1)),Math.abs(c)<.99999?(this._y=Math.atan2(o,p),this._z=Math.atan2(l,u)):(this._y=Math.atan2(-h,a),this._z=0)):"ZXY"===t?(this._x=Math.asin(n(d,-1,1)),Math.abs(d)<.99999?(this._y=Math.atan2(-h,p),this._z=Math.atan2(-s,u)):(this._y=0,this._z=Math.atan2(l,a))):"ZYX"===t?(this._y=Math.asin(-n(h,-1,1)),Math.abs(h)<.99999?(this._x=Math.atan2(d,p),this._z=Math.atan2(l,a)):(this._x=0,this._z=Math.atan2(-s,u))):"YZX"===t?(this._z=Math.asin(n(l,-1,1)),Math.abs(l)<.99999?(this._x=Math.atan2(-c,u),this._y=Math.atan2(-h,a)):(this._x=0,this._y=Math.atan2(o,p))):"XZY"===t?(this._z=Math.asin(-n(s,-1,1)),Math.abs(s)<.99999?(this._x=Math.atan2(d,u),this._y=Math.atan2(o,a)):(this._x=Math.atan2(-c,p),this._y=0)):console.warn("THREE.Euler: .setFromRotationMatrix() given unsupported order: "+t),this._order=t,!1!==i&&this.onChangeCallback(),this},setFromQuaternion:(Yi=new Qt,function(e,t,i){return Yi.makeRotationFromQuaternion(e),this.setFromRotationMatrix(Yi,t,i)}),setFromVector3:function(e,t){return this.set(e.x,e.y,e.z,t||this._order)},reorder:(Hi=new Vt,function(e){return Hi.setFromEuler(this),this.setFromQuaternion(Hi,e)}),equals:function(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order},fromArray:function(e){return this._x=e[0],this._y=e[1],this._z=e[2],void 0!==e[3]&&(this._order=e[3]),this.onChangeCallback(),this},toArray:function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=0),e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e},toVector3:function(e){return e?e.set(this._x,this._y,this._z):new Wt(this._x,this._y,this._z)},onChange:function(e){return this.onChangeCallback=e,this},onChangeCallback:function(){}}),Object.assign(Zi.prototype,{set:function(e){this.mask=1<<e|0},enable:function(e){this.mask|=1<<e|0},toggle:function(e){this.mask^=1<<e|0},disable:function(e){this.mask&=~(1<<e|0)},test:function(e){return 0!=(this.mask&e.mask)}});var $i,Ki,Ji,en,tn,nn,rn,an,sn,on,ln,un,cn,hn,dn,pn,fn,gn,mn=0;function vn(){Object.defineProperty(this,"id",{value:mn++}),this.uuid=Ht.generateUUID(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=vn.DefaultUp.clone();var e=new Wt,t=new Xi,i=new Vt,n=new Wt(1,1,1);t.onChange(function(){i.setFromEuler(t,!1)}),i.onChange(function(){t.setFromQuaternion(i,void 0,!1)}),Object.defineProperties(this,{position:{enumerable:!0,value:e},rotation:{enumerable:!0,value:t},quaternion:{enumerable:!0,value:i},scale:{enumerable:!0,value:n},modelViewMatrix:{value:new Qt},normalMatrix:{value:new qt}}),this.matrix=new Qt,this.matrixWorld=new Qt,this.matrixAutoUpdate=vn.DefaultMatrixAutoUpdate,this.matrixWorldNeedsUpdate=!1,this.layers=new Zi,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.userData={}}function yn(){vn.call(this),this.type="Camera",this.matrixWorldInverse=new Qt,this.projectionMatrix=new Qt}function _n(e,t,i,n,r,a){yn.call(this),this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=i,this.bottom=n,this.near=void 0!==r?r:.1,this.far=void 0!==a?a:2e3,this.updateProjectionMatrix()}function Mn(e,t,i,n,r,a){this.a=e,this.b=t,this.c=i,this.normal=n&&n.isVector3?n:new Wt,this.vertexNormals=Array.isArray(n)?n:[],this.color=r&&r.isColor?r:new Fi,this.vertexColors=Array.isArray(r)?r:[],this.materialIndex=void 0!==a?a:0}vn.DefaultUp=new Wt(0,1,0),vn.DefaultMatrixAutoUpdate=!0,vn.prototype=Object.assign(Object.create(u.prototype),{constructor:vn,isObject3D:!0,onBeforeRender:function(){},onAfterRender:function(){},applyMatrix:function(e){this.matrix.multiplyMatrices(e,this.matrix),this.matrix.decompose(this.position,this.quaternion,this.scale)},applyQuaternion:function(e){return this.quaternion.premultiply(e),this},setRotationFromAxisAngle:function(e,t){this.quaternion.setFromAxisAngle(e,t)},setRotationFromEuler:function(e){this.quaternion.setFromEuler(e,!0)},setRotationFromMatrix:function(e){this.quaternion.setFromRotationMatrix(e)},setRotationFromQuaternion:function(e){this.quaternion.copy(e)},rotateOnAxis:(fn=new Vt,function(e,t){return fn.setFromAxisAngle(e,t),this.quaternion.multiply(fn),this}),rotateOnWorldAxis:(pn=new Vt,function(e,t){return pn.setFromAxisAngle(e,t),this.quaternion.premultiply(
1pn),this}),rotateX:(dn=new Wt(1,0,0),function(e){return this.rotateOnAxis(dn,e)}),rotateY:(hn=new Wt(0,1,0),function(e){return this.rotateOnAxis(hn,e)}),rotateZ:(cn=new Wt(0,0,1),function(e){return this.rotateOnAxis(cn,e)}),translateOnAxis:(un=new Wt,function(e,t){return un.copy(e).applyQuaternion(this.quaternion),this.position.add(un.multiplyScalar(t)),this}),translateX:(ln=new Wt(1,0,0),function(e){return this.translateOnAxis(ln,e)}),translateY:(on=new Wt(0,1,0),function(e){return this.translateOnAxis(on,e)}),translateZ:(sn=new Wt(0,0,1),function(e){return this.translateOnAxis(sn,e)}),localToWorld:function(e){return e.applyMatrix4(this.matrixWorld)},worldToLocal:(an=new Qt,function(e){return e.applyMatrix4(an.getInverse(this.matrixWorld))}),lookAt:(nn=new Qt,rn=new Wt,function(e,t,i){e.isVector3?rn.copy(e):rn.set(e,t,i),this.isCamera?nn.lookAt(this.position,rn,this.up):nn.lookAt(rn,this.position,this.up),this.quaternion.setFromRotationMatrix(nn)}),add:function(e){if(1<arguments.length){for(var t=0;t<arguments.length;t++)this.add(arguments[t]);return this}return e===this?console.error("THREE.Object3D.add: object can't be added as a child of itself.",e):e&&e.isObject3D?(null!==e.parent&&e.parent.remove(e),e.parent=this,e.dispatchEvent({type:"added"}),this.children.push(e)):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",e),this},remove:function(e){if(1<arguments.length){for(var t=0;t<arguments.length;t++)this.remove(arguments[t]);return this}var i=this.children.indexOf(e);return-1!==i&&(e.parent=null,e.dispatchEvent({type:"removed"}),this.children.splice(i,1)),this},getObjectById:function(e){return this.getObjectByProperty("id",e)},getObjectByName:function(e){return this.getObjectByProperty("name",e)},getObjectByProperty:function(e,t){if(this[e]===t)return this;for(var i=0,n=this.children.length;i<n;i++){var r=this.children[i].getObjectByProperty(e,t);if(void 0!==r)return r}},getWorldPosition:function(e){return void 0===e&&(console.warn("THREE.Object3D: .getWorldPosition() target is now required"),e=new Wt),this.updateMatrixWorld(!0),e.setFromMatrixPosition(this.matrixWorld)},getWorldQuaternion:(en=new Wt,tn=new Wt,function(e){return void 0===e&&(console.warn("THREE.Object3D: .getWorldQuaternion() target is now required"),e=new Vt),this.updateMatrixWorld(!0),this.matrixWorld.decompose(en,e,tn),e}),getWorldScale:(Ki=new Wt,Ji=new Vt,function(e){return void 0===e&&(console.warn("THREE.Object3D: .getWorldScale() target is now required"),e=new Wt),this.updateMatrixWorld(!0),this.matrixWorld.decompose(Ki,Ji,e),e}),getWorldDirection:($i=new Vt,function(e){return void 0===e&&(console.warn("THREE.Object3D: .getWorldDirection() target is now required"),e=new Wt),this.getWorldQuaternion($i),e.set(0,0,1).applyQuaternion($i)}),raycast:function(){},traverse:function(e){e(this);for(var t=this.children,i=0,n=t.length;i<n;i++)t[i].traverse(e)},traverseVisible:function(e){if(!1!==this.visible){e(this);for(var t=this.children,i=0,n=t.length;i<n;i++)t[i].traverseVisible(e)}},traverseAncestors:function(e){var t=this.parent;null!==t&&(e(t),t.traverseAncestors(e))},updateMatrix:function(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0},updateMatrixWorld:function(e){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||e)&&(null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),e=!(this.matrixWorldNeedsUpdate=!1));for(var t=this.children,i=0,n=t.length;i<n;i++)t[i].updateMatrixWorld(e)},toJSON:function(i){var e=void 0===i||"string"==typeof i,t={};e&&(i={geometries:{},materials:{},textures:{},images:{},shapes:{}},t.metadata={version:4.5,type:"Object",generator:"Object3D.toJSON"});var n={};function r(e,t){return void 0===e[t.uuid]&&(e[t.uuid]=t.toJSON(i)),t.uuid}
vendor: 6,843 bytes, line 1
1if(n.uuid=this.uuid,n.type=this.type,""!==this.name&&(n.name=this.name),!0===this.castShadow&&(n.castShadow=!0),!0===this.receiveShadow&&(n.receiveShadow=!0),!1===this.visible&&(n.visible=!1),!1===this.frustumCulled&&(n.frustumCulled=!1),0!==this.renderOrder&&(n.renderOrder=this.renderOrder),"{}"!==JSON.stringify(this.userData)&&(n.userData=this.userData),n.matrix=this.matrix.toArray(),!1===this.matrixAutoUpdate&&(n.matrixAutoUpdate=!1),void 0!==this.geometry){n.geometry=r(i.geometries,this.geometry);var a=this.geometry.parameters;if(void 0!==a&&void 0!==a.shapes){var s=a.shapes;if(Array.isArray(s))for(var o=0,l=s.length;o<l;o++){var u=s[o];r(i.shapes,u)}else r(i.shapes,s)}}if(void 0!==this.material)if(Array.isArray(this.material)){var c=[];for(o=0,l=this.material.length;o<l;o++)c.push(r(i.materials,this.material[o]));n.material=c}else n.material=r(i.materials,this.material);if(0<this.children.length){n.children=[];for(o=0;o<this.children.length;o++)n.children.push(this.children[o].toJSON(i).object)}if(e){var h=g(i.geometries),d=g(i.materials),p=g(i.textures),f=g(i.images);s=g(i.shapes);0<h.length&&(t.geometries=h),0<d.length&&(t.materials=d),0<p.length&&(t.textures=p),0<f.length&&(t.images=f),0<s.length&&(t.shapes=s)}return t.object=n,t;function g(e){var t=[];for(var i in e){var n=e[i];delete n.metadata,t.push(n)}return t}},clone:function(e){return(new this.constructor).copy(this,e)},copy:function(e,t){if(void 0===t&&(t=!0),this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.userData=JSON.parse(JSON.stringify(e.userData)),!0===t)for(var i=0;i<e.children.length;i++){var n=e.children[i];this.add(n.clone())}return this}}),yn.prototype=Object.assign(Object.create(vn.prototype),{constructor:yn,isCamera:!0,copy:function(e,t){return vn.prototype.copy.call(this,e,t),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this},getWorldDirection:(gn=new Vt,function(e){return void 0===e&&(console.warn("THREE.Camera: .getWorldDirection() target is now required"),e=new Wt),this.getWorldQuaternion(gn),e.set(0,0,-1).applyQuaternion(gn)}),updateMatrixWorld:function(e){vn.prototype.updateMatrixWorld.call(this,e),this.matrixWorldInverse.getInverse(this.matrixWorld)},clone:function(){return(new this.constructor).copy(this)}}),_n.prototype=Object.assign(Object.create(yn.prototype),{constructor:_n,isOrthographicCamera:!0,copy:function(e,t){return yn.prototype.copy.call(this,e,t),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=null===e.view?null:Object.assign({},e.view),this},setViewOffset:function(e,t,i,n,r,a){null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=i,this.view.offsetY=n,this.view.width=r,this.view.height=a,this.updateProjectionMatrix()},clearViewOffset:function(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()},updateProjectionMatrix:function(){var e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),i=(this.right+this.left)/2,n=(this.top+this.bottom)/2,r=i-e,a=i+e,s=n+t,o=n-t;if(null!==this.view&&this.view.enabled){var l=this.zoom/(this.view.width/this.view.fullWidth),u=this.zoom/(this.view.height/this.view.fullHeight),c=(this.right-this.left)/this.view.width,h=(this.top-this.bottom)/this.view.height;a=(r+=c*(this.view.offsetX/l))+c*(this.view.width/l),o=(s-=h*(this.view.offsetY/u))-h*(this.view.height/u)}this.projectionMatrix.makeOrthographic(r,a,s,o,this.near,this.far)},toJSON:function(e){var t=vn.prototype.toJSON.call(this,e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,null!==this.view&&(t.object.view=Object.assign({},this.view)),t}}),Object.assign(Mn.prototype,{clone:function(){return(new this.constructor).copy(this)},copy:function(e){this.a=e.a,this.b=e.b,this.c=e.c,this.normal.copy(e.normal),this.color.copy(e.color),this.materialIndex=e.materialIndex;for(var t=0,i=e.vertexNormals.length;t<i;t++)this.vertexNormals[t]=e.vertexNormals[t].clone();for(t=0,i=e.vertexColors.length;t<i;t++)this.vertexColors[t]=e.vertexColors[t].clone();return this}});var wn,bn,Tn,An,xn,En,Sn,Dn=0;function Nn(){Object.defineProperty(this,"id",{value:Dn+=2}),this.uuid=Ht.generateUUID(),this.name="",this.type="Geometry",this.vertices=[],this.colors=[],this.faces=[],this.faceVertexUvs=[[]],this.morphTargets=[],this.morphNormals=[],this.skinWeights=[],this.skinIndices=[],this.lineDistances=[],this.boundingBox=null,this.boundingSphere=null,this.elementsNeedUpdate=!1,this.verticesNeedUpdate=!1,this.uvsNeedUpdate=!1,this.normalsNeedUpdate=!1,this.colorsNeedUpdate=!1,this.lineDistancesNeedUpdate=!1,this.groupsNeedUpdate=!1}function Cn(e,t,i){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.name="",this.array=e,this.itemSize=t,this.count=void 0!==e?e.length/t:0,this.normalized=!0===i,this.dynamic=!1,this.updateRange={offset:0,count:-1},this.version=0}function Ln(e,t,i){Cn.call(this,new Int8Array(e),t,i)}function In(e,t,i){Cn.call(this,new Uint8Array(e),t,i)}function On(e,t,i){Cn.call(this,new Uint8ClampedArray(e),t,i)}function jn(e,t,i){Cn.call(this,new Int16Array(e),t,i)}function kn(e,t,i){Cn.call(this,new Uint16Array(e),t,i)}function Pn(e,t,i){Cn.call(this,new Int32Array(e),t,i)}function Rn(e,t,i){Cn.call(this,new Uint32Array(e),t,i)}function zn(e,t,i){Cn.call(this,new Float32Array(e),t,i)}function Un(e,t,i){Cn.call(this,new Float64Array(e),t,i)}function Bn(){this.vertices=[],this.normals=[],this.colors=[],this.uvs=[],this.uvs2=[],this.groups=[],this.morphTargets={},this.skinWeights=[],this.skinIndices=[],this.boundingBox=null,this.boundingSphere=null,this.verticesNeedUpdate=!1,this.normalsNeedUpdate=!1,this.colorsNeedUpdate=!1,this.uvsNeedUpdate=!1,this.groupsNeedUpdate=!1}function Fn(e){if(0===e.length)return-1/0;for(var t=e[0],i=1,n=e.length;i<n;++i)e[i]>t&&(t=e[i]);return t}Nn.prototype=Object.assign(Object.create(u.prototype),{constructor:Nn,isGeometry:!0,applyMatrix:function(e){for(var t=(new qt).getNormalMatrix(e),i=0,n=this.vertices.length;i<n;i++){this.vertices[i].applyMatrix4(e)}for(i=0,n=this.faces.length;i<n;i++){var r=this.faces[i];
vendor: 4,110 bytes, line 1
1r.normal.applyMatrix3(t).normalize();for(var a=0,s=r.vertexNormals.length;a<s;a++)r.vertexNormals[a].applyMatrix3(t).normalize()}return null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this.verticesNeedUpdate=!0,this.normalsNeedUpdate=!0,this},rotateX:(Sn=new Qt,function(e){return Sn.makeRotationX(e),this.applyMatrix(Sn),this}),rotateY:(En=new Qt,function(e){return En.makeRotationY(e),this.applyMatrix(En),this}),rotateZ:(xn=new Qt,function(e){return xn.makeRotationZ(e),this.applyMatrix(xn),this}),translate:(An=new Qt,function(e,t,i){return An.makeTranslation(e,t,i),this.applyMatrix(An),this}),scale:(Tn=new Qt,function(e,t,i){return Tn.makeScale(e,t,i),this.applyMatrix(Tn),this}),lookAt:(bn=new vn,function(e){bn.lookAt(e),bn.updateMatrix(),this.applyMatrix(bn.matrix)}),fromBufferGeometry:function(e){var a=this,t=null!==e.index?e.index.array:void 0,i=e.attributes,n=i.position.array,s=void 0!==i.normal?i.normal.array:void 0,o=void 0!==i.color?i.color.array:void 0,l=void 0!==i.uv?i.uv.array:void 0,u=void 0!==i.uv2?i.uv2.array:void 0;void 0!==u&&(this.faceVertexUvs[1]=[]);for(var c=[],h=[],d=[],r=0,p=0;r<n.length;r+=3,p+=2)a.vertices.push(new Wt(n[r],n[r+1],n[r+2])),void 0!==s&&c.push(new Wt(s[r],s[r+1],s[r+2])),void 0!==o&&a.colors.push(new Fi(o[r],o[r+1],o[r+2])),void 0!==l&&h.push(new Yt(l[p],l[p+1])),void 0!==u&&d.push(new Yt(u[p],u[p+1]));function f(e,t,i,n){var r=new Mn(e,t,i,void 0!==s?[c[e].clone(),c[t].clone(),c[i].clone()]:[],void 0!==o?[a.colors[e].clone(),a.colors[t].clone(),a.colors[i].clone()]:[],n);a.faces.push(r),void 0!==l&&a.faceVertexUvs[0].push([h[e].clone(),h[t].clone(),h[i].clone()]),void 0!==u&&a.faceVertexUvs[1].push([d[e].clone(),d[t].clone(),d[i].clone()])}var g=e.groups;if(0<g.length)for(r=0;r<g.length;r++)for(var m=g[r],v=m.start,y=(p=v,v+m.count);p<y;p+=3)void 0!==t?f(t[p],t[p+1],t[p+2],m.materialIndex):f(p,p+1,p+2,m.materialIndex);else if(void 0!==t)for(r=0;r<t.length;r+=3)f(t[r],t[r+1],t[r+2]);else for(r=0;r<n.length/3;r+=3)f(r,r+1,r+2);return this.computeFaceNormals(),null!==e.boundingBox&&(this.boundingBox=e.boundingBox.clone()),null!==e.boundingSphere&&(this.boundingSphere=e.boundingSphere.clone()),this},center:(wn=new Wt,function(){return this.computeBoundingBox(),this.boundingBox.getCenter(wn).negate(),this.translate(wn.x,wn.y,wn.z),this}),normalize:function(){this.computeBoundingSphere();var e=this.boundingSphere.center,t=this.boundingSphere.radius,i=0===t?1:1/t,n=new Qt;return n.set(i,0,0,-i*e.x,0,i,0,-i*e.y,0,0,i,-i*e.z,0,0,0,1),this.applyMatrix(n),this},computeFaceNormals:function(){for(var e=new Wt,t=new Wt,i=0,n=this.faces.length;i<n;i++){var r=this.faces[i],a=this.vertices[r.a],s=this.vertices[r.b],o=this.vertices[r.c];e.subVectors(o,s),t.subVectors(a,s),e.cross(t),e.normalize(),r.normal.copy(e)}},computeVertexNormals:function(e){var t,i,n,r,a,s;for(void 0===e&&(e=!0),s=new Array(this.vertices.length),t=0,i=this.vertices.length;t<i;t++)s[t]=new Wt;if(e){var o,l,u,c=new Wt,h=new Wt;for(n=0,r=this.faces.length;n<r;n++)a=this.faces[n],o=this.vertices[a.a],l=this.vertices[a.b],u=this.vertices[a.c],c.subVectors(u,l),h.subVectors(o,l),c.cross(h),s[a.a].add(c),s[a.b].add(c),s[a.c].add(c)}else for(this.computeFaceNormals(),n=0,r=this.faces.length;n<r;n++)s[(a=this.faces[n]).a].add(a.normal),s[a.b].add(a.normal),s[a.c].add(a.normal);for(t=0,i=this.vertices.length;t<i;t++)s[t].normalize();for(n=0,r=this.faces.length;n<r;n++){var d=(a=this.faces[n]).vertexNormals;3===d.length?(d[0].copy(s[a.a]),d[1].copy(s[a.b]),d[2].copy(s[a.c])):(d[0]=s[a.a].clone(),d[1]=s[a.b].clone(),d[2]=s[a.c].clone())}0<this.faces.length&&(this.normalsNeedUpdate=!0)},computeFlatVertexNormals:function(){var e,t,i;for(this.computeFaceNormals(),e=0,t=this.faces.length;e<t;e++){var n=(i=this.faces[e]).vertexNormals;3===n.length?(n[0].copy(i.normal),n[1].copy(i.normal),n[2].copy(i.normal)):(n[0]=i.normal.clone(),n[1]=i.normal.clone(),n[2]=i.normal.clone())}0<this.faces.length&&(this.normalsNeedUpdate=!0)},computeMorphNormals:function(){var e,t,i,n,r;for(i=0,n=this.faces.length;i<n;
vendor: 11,485 bytes, line 1
1i++)for((r=this.faces[i]).__originalFaceNormal?r.__originalFaceNormal.copy(r.normal):r.__originalFaceNormal=r.normal.clone(),r.__originalVertexNormals||(r.__originalVertexNormals=[]),e=0,t=r.vertexNormals.length;e<t;e++)r.__originalVertexNormals[e]?r.__originalVertexNormals[e].copy(r.vertexNormals[e]):r.__originalVertexNormals[e]=r.vertexNormals[e].clone();var a=new Nn;for(a.faces=this.faces,e=0,t=this.morphTargets.length;e<t;e++){if(!this.morphNormals[e]){this.morphNormals[e]={},this.morphNormals[e].faceNormals=[],this.morphNormals[e].vertexNormals=[];var s=this.morphNormals[e].faceNormals,o=this.morphNormals[e].vertexNormals;for(i=0,n=this.faces.length;i<n;i++)l=new Wt,u={a:new Wt,b:new Wt,c:new Wt},s.push(l),o.push(u)}var l,u,c=this.morphNormals[e];for(a.vertices=this.morphTargets[e].vertices,a.computeFaceNormals(),a.computeVertexNormals(),i=0,n=this.faces.length;i<n;i++)r=this.faces[i],l=c.faceNormals[i],u=c.vertexNormals[i],l.copy(r.normal),u.a.copy(r.vertexNormals[0]),u.b.copy(r.vertexNormals[1]),u.c.copy(r.vertexNormals[2])}for(i=0,n=this.faces.length;i<n;i++)(r=this.faces[i]).normal=r.__originalFaceNormal,r.vertexNormals=r.__originalVertexNormals},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new Li),this.boundingBox.setFromPoints(this.vertices)},computeBoundingSphere:function(){null===this.boundingSphere&&(this.boundingSphere=new ji),this.boundingSphere.setFromPoints(this.vertices)},merge:function(e,t,i){if(e&&e.isGeometry){var n,r=this.vertices.length,a=this.vertices,s=e.vertices,o=this.faces,l=e.faces,u=this.faceVertexUvs[0],c=e.faceVertexUvs[0],h=this.colors,d=e.colors;void 0===i&&(i=0),void 0!==t&&(n=(new qt).getNormalMatrix(t));for(var p=0,f=s.length;p<f;p++){var g=s[p].clone();void 0!==t&&g.applyMatrix4(t),a.push(g)}for(p=0,f=d.length;p<f;p++)h.push(d[p].clone());for(p=0,f=l.length;p<f;p++){var m,v,y,_=l[p],M=_.vertexNormals,w=_.vertexColors;(m=new Mn(_.a+r,_.b+r,_.c+r)).normal.copy(_.normal),void 0!==n&&m.normal.applyMatrix3(n).normalize();for(var b=0,T=M.length;b<T;b++)v=M[b].clone(),void 0!==n&&v.applyMatrix3(n).normalize(),m.vertexNormals.push(v);m.color.copy(_.color);for(b=0,T=w.length;b<T;b++)y=w[b],m.vertexColors.push(y.clone());m.materialIndex=_.materialIndex+i,o.push(m)}for(p=0,f=c.length;p<f;p++){var A=c[p],x=[];if(void 0!==A){for(b=0,T=A.length;b<T;b++)x.push(A[b].clone());u.push(x)}}}else console.error("THREE.Geometry.merge(): geometry not an instance of THREE.Geometry.",e)},mergeMesh:function(e){e&&e.isMesh?(e.matrixAutoUpdate&&e.updateMatrix(),this.merge(e.geometry,e.matrix)):console.error("THREE.Geometry.mergeMesh(): mesh not an instance of THREE.Mesh.",e)},mergeVertices:function(){var e,t,i,n,r,a,s,o,l={},u=[],c=[],h=Math.pow(10,4);for(i=0,n=this.vertices.length;i<n;i++)e=this.vertices[i],void 0===l[t=Math.round(e.x*h)+"_"+Math.round(e.y*h)+"_"+Math.round(e.z*h)]?(l[t]=i,u.push(this.vertices[i]),c[i]=u.length-1):c[i]=c[l[t]];var d=[];for(i=0,n=this.faces.length;i<n;i++){(r=this.faces[i]).a=c[r.a],r.b=c[r.b],r.c=c[r.c],a=[r.a,r.b,r.c];for(var p=0;p<3;p++)if(a[p]===a[(p+1)%3]){d.push(i);break}}for(i=d.length-1;0<=i;i--){var f=d[i];for(this.faces.splice(f,1),s=0,o=this.faceVertexUvs.length;s<o;s++)this.faceVertexUvs[s].splice(f,1)}var g=this.vertices.length-u.length;return this.vertices=u,g},setFromPoints:function(e){this.vertices=[];for(var t=0,i=e.length;t<i;t++){var n=e[t];this.vertices.push(new Wt(n.x,n.y,n.z||0))}return this},sortFacesByMaterialIndex:function(){for(var e=this.faces,t=e.length,i=0;i<t;i++)e[i]._id=i;e.sort(function(e,t){return e.materialIndex-t.materialIndex});var n,r,a=this.faceVertexUvs[0],s=this.faceVertexUvs[1];a&&a.length===t&&(n=[]),s&&s.length===t&&(r=[]);for(i=0;i<t;i++){var o=e[i]._id;n&&n.push(a[o]),r&&r.push(s[o])}n&&(this.faceVertexUvs[0]=n),r&&(this.faceVertexUvs[1]=r)},toJSON:function(){var e={metadata:{version:4.5,type:"Geometry",generator:"Geometry.toJSON"}};if(e.uuid=this.uuid,e.type=this.type,""!==this.name&&(e.name=this.name),void 0!==this.parameters){var t=this.parameters;for(var i in t)void 0!==t[i]&&(e[i]=t[i]);return e}for(var n=[],r=0;r<this.vertices.length;r++){var a=this.vertices[r];n.push(a.x,a.y,a.z)}var s=[],o=[],l={},u=[],c={},h=[],d={};for(r=0;r<this.faces.length;r++){var p=this.faces[r],f=void 0!==this.faceVertexUvs[0][r],g=0<p.normal.length(),m=0<p.vertexNormals.length,v=1!==p.color.r||1!==p.color.g||1!==p.color.b,y=0<p.vertexColors.length,_=0;if(_=T(_,0,0),_=T(_,1,!0),_=T(_,2,!1),_=T(_,3,f),_=T(_,4,g),_=T(_,5,m),_=T(_,6,v),_=T(_,7,y),s.push(_),s.push(p.a,p.b,p.c),s.push(p.materialIndex),f){var M=this.faceVertexUvs[0][r];s.push(E(M[0]),E(M[1]),E(M[2]))}if(g&&s.push(A(p.normal)),m){var w=p.vertexNormals;s.push(A(w[0]),A(w[1]),A(w[2]))}if(v&&s.push(x(p.color)),y){var b=p.vertexColors;s.push(x(b[0]),x(b[1]),x(b[2]))}}function T(e,t,i){return i?e|1<<t:e&~(1<<t)}function A(e){var t=e.x.toString()+e.y.toString()+e.z.toString();return void 0!==l[t]||(l[t]=o.length/3,o.push(e.x,e.y,e.z)),l[t]}function x(e){var t=e.r.toString()+e.g.toString()+e.b.toString();return void 0!==c[t]||(c[t]=u.length,u.push(e.getHex())),c[t]}function E(e){var t=e.x.toString()+e.y.toString();return void 0!==d[t]||(d[t]=h.length/2,h.push(e.x,e.y)),d[t]}return e.data={},e.data.vertices=n,e.data.normals=o,0<u.length&&(e.data.colors=u),0<h.length&&(e.data.uvs=[h]),e.data.faces=s,e},clone:function(){return(new Nn).copy(this)},copy:function(e){var t,i,n,r,a,s;this.vertices=[],this.colors=[],this.faces=[],this.faceVertexUvs=[[]],this.morphTargets=[],this.morphNormals=[],this.skinWeights=[],this.skinIndices=[],this.lineDistances=[],this.boundingBox=null,this.boundingSphere=null,this.name=e.name;var o=e.vertices;for(t=0,i=o.length;t<i;t++)this.vertices.push(o[t].clone());var l=e.colors;for(t=0,i=l.length;t<i;t++)this.colors.push(l[t].clone());var u=e.faces;for(t=0,i=u.length;t<i;t++)this.faces.push(u[t].clone());for(t=0,i=e.faceVertexUvs.length;t<i;t++){var c=e.faceVertexUvs[t];for(void 0===this.faceVertexUvs[t]&&(this.faceVertexUvs[t]=[]),n=0,r=c.length;n<r;n++){var h=c[n],d=[];for(a=0,s=h.length;a<s;a++){var p=h[a];d.push(p.clone())}this.faceVertexUvs[t].push(d)}}var f=e.morphTargets;for(t=0,i=f.length;t<i;t++){var g={};if(g.name=f[t].name,void 0!==f[t].vertices)for(g.vertices=[],n=0,r=f[t].vertices.length;n<r;n++)g.vertices.push(f[t].vertices[n].clone());if(void 0!==f[t].normals)for(g.normals=[],n=0,r=f[t].normals.length;n<r;n++)g.normals.push(f[t].normals[n].clone());this.morphTargets.push(g)}var m=e.morphNormals;for(t=0,i=m.length;t<i;t++){var v={};if(void 0!==m[t].vertexNormals)for(v.vertexNormals=[],n=0,r=m[t].vertexNormals.length;n<r;n++){var y=m[t].vertexNormals[n],_={};_.a=y.a.clone(),_.b=y.b.clone(),_.c=y.c.clone(),v.vertexNormals.push(_)}if(void 0!==m[t].faceNormals)for(v.faceNormals=[],n=0,r=m[t].faceNormals.length;n<r;n++)v.faceNormals.push(m[t].faceNormals[n].clone());this.morphNormals.push(v)}var M=e.skinWeights;for(t=0,i=M.length;t<i;t++)this.skinWeights.push(M[t].clone());var w=e.skinIndices;for(t=0,i=w.length;t<i;t++)this.skinIndices.push(w[t].clone());var b=e.lineDistances;for(t=0,i=b.length;t<i;t++)this.lineDistances.push(b[t]);var T=e.boundingBox;null!==T&&(this.boundingBox=T.clone());var A=e.boundingSphere;return null!==A&&(this.boundingSphere=A.clone()),this.elementsNeedUpdate=e.elementsNeedUpdate,this.verticesNeedUpdate=e.verticesNeedUpdate,this.uvsNeedUpdate=e.uvsNeedUpdate,this.normalsNeedUpdate=e.normalsNeedUpdate,this.colorsNeedUpdate=e.colorsNeedUpdate,this.lineDistancesNeedUpdate=e.lineDistancesNeedUpdate,this.groupsNeedUpdate=e.groupsNeedUpdate,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Object.defineProperty(Cn.prototype,"needsUpdate",{set:function(e){!0===e&&this.version++}}),Object.assign(Cn.prototype,{isBufferAttribute:!0,onUploadCallback:function(){},setArray:function(e){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");return this.count=void 0!==e?e.length/this.itemSize:0,this.array=e,this},setDynamic:function(e){return this.dynamic=e,this},copy:function(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.dynamic=e.dynamic,this},copyAt:function(e,t,i){e*=this.itemSize,i*=t.itemSize;for(var n=0,r=this.itemSize;n<r;n++)this.array[e+n]=t.array[i+n];return this},copyArray:function(e){return this.array.set(e),this},copyColorsArray:function(e){for(var t=this.array,i=0,n=0,r=e.length;n<r;n++){var a=e[n];void 0===a&&(console.warn("THREE.BufferAttribute.copyColorsArray(): color is undefined",n),a=new Fi),t[i++]=a.r,t[i++]=a.g,t[i++]=a.b}return this},copyVector2sArray:function(e){for(var t=this.array,i=0,n=0,r=e.length;n<r;n++){var a=e[n];void 0===a&&(console.warn("THREE.BufferAttribute.copyVector2sArray(): vector is undefined",n),a=new Yt),t[i++]=a.x,t[i++]=a.y}return this},copyVector3sArray:function(e){for(var t=this.array,i=0,n=0,r=e.length;n<r;n++){var a=e[n];void 0===a&&(console.warn("THREE.BufferAttribute.copyVector3sArray(): vector is undefined",n),a=new Wt),t[i++]=a.x,t[i++]=a.y,t[i++]=a.z}return this},copyVector4sArray:function(e){for(var t=this.array,i=0,n=0,r=e.length;n<r;n++){var a=e[n];void 0===a&&(console.warn("THREE.BufferAttribute.copyVector4sArray(): vector is undefined",n),a=new Si),t[i++]=a.x,t[i++]=a.y,t[i++]=a.z,t[i++]=a.w}return this},set:function(e,t){return void 0===t&&(t=0),this.array.set(e,t),this},getX:function(e){return this.array[e*this.itemSize]},setX:function(e,t){return this.array[e*this.itemSize]=t,this},getY:function(e){return this.array[e*this.itemSize+1]},setY:function(e,t){return this.array[e*this.itemSize+1]=t,this},getZ:function(e){return this.array[e*this.itemSize+2]},setZ:function(e,t){return this.array[e*this.itemSize+2]=t,this},getW:function(e){return this.array[e*this.itemSize+3]},setW:function(e,t){return this.array[e*this.itemSize+3]=t,this},setXY:function(e,t,i){return e*=this.itemSize,this.array[e+0]=t,this.array[e+1]=i,this},setXYZ:function(e,t,i,n){return e*=this.itemSize,this.array[e+0]=t,this.array[e+1]=i,this.array[e+2]=n,this},setXYZW:function(e,t,i,n,r){return e*=this.itemSize,this.array[e+0]=t,this.array[e+1]=i,this.array[e+2]=n,this.array[e+3]=r,this},onUpload:function(e){return this.onUploadCallback=e,this},clone:function(){return new this.constructor(this.array,this.itemSize).copy(this)}}),(Ln.prototype=Object.create(Cn.prototype)).constructor=Ln,(In.prototype=Object.create(Cn.prototype)).constructor=In,(On.prototype=Object.create(Cn.prototype)).constructor=On,(jn.prototype=Object.create(Cn.prototype)).constructor=jn,(kn.prototype=Object.create(Cn.prototype)).constructor=kn,(Pn.prototype=Object.create(Cn.prototype)).constructor=Pn,(Rn.prototype=Object.create(Cn.prototype)).constructor=Rn,(zn.prototype=Object.create(Cn.prototype)).constructor=zn,(Un.prototype=Object.create(Cn.prototype)).constructor=Un,Object.assign(Bn.prototype,{computeGroups:function(e){for(var t,i=[],n=void 0,r=e.faces,a=0;a<r.length;a++){var s=r[a];s.materialIndex!==n&&(n=s.materialIndex,void 0!==t&&(t.count=3*a-t.start,i.push(t)),t={start:3*a,materialIndex:n})}void 0!==t&&(t.count=3*a-t.start,i.push(t)),this.groups=i},fromGeometry:function(e){var t,i=e.faces,n=e.vertices,r=e.faceVertexUvs,a=r[0]&&0<r[0].length,s=r[1]&&0<r[1].length,o=e.morphTargets,l=o.length;if(0<l){t=[];for(var u=0;u<l;u++)t[u]=[];this.morphTargets.position=t}var c,h=e.morphNormals,d=h.length;if(0<d){c=[];for(u=0;
vendor: 5,560 bytes, line 1
1u<d;u++)c[u]=[];this.morphTargets.normal=c}var p=e.skinIndices,f=e.skinWeights,g=p.length===n.length,m=f.length===n.length;0===i.length&&console.error("THREE.DirectGeometry: Faceless geometries are not supported.");for(u=0;u<i.length;u++){var v=i[u];this.vertices.push(n[v.a],n[v.b],n[v.c]);var y=v.vertexNormals;if(3===y.length)this.normals.push(y[0],y[1],y[2]);else{var _=v.normal;this.normals.push(_,_,_)}var M,w=v.vertexColors;if(3===w.length)this.colors.push(w[0],w[1],w[2]);else{var b=v.color;this.colors.push(b,b,b)}if(!0===a)void 0!==(M=r[0][u])?this.uvs.push(M[0],M[1],M[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv ",u),this.uvs.push(new Yt,new Yt,new Yt));if(!0===s)void 0!==(M=r[1][u])?this.uvs2.push(M[0],M[1],M[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv2 ",u),this.uvs2.push(new Yt,new Yt,new Yt));for(var T=0;T<l;T++){var A=o[T].vertices;t[T].push(A[v.a],A[v.b],A[v.c])}for(T=0;T<d;T++){var x=h[T].vertexNormals[u];c[T].push(x.a,x.b,x.c)}g&&this.skinIndices.push(p[v.a],p[v.b],p[v.c]),m&&this.skinWeights.push(f[v.a],f[v.b],f[v.c])}return this.computeGroups(e),this.verticesNeedUpdate=e.verticesNeedUpdate,this.normalsNeedUpdate=e.normalsNeedUpdate,this.colorsNeedUpdate=e.colorsNeedUpdate,this.uvsNeedUpdate=e.uvsNeedUpdate,this.groupsNeedUpdate=e.groupsNeedUpdate,this}});var Gn,Hn,Yn,Qn,Vn,Wn,qn,Xn,Zn,$n,Kn=1;function Jn(){Object.defineProperty(this,"id",{value:Kn+=2}),this.uuid=Ht.generateUUID(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}function er(e,t,i,n,r,a){Nn.call(this),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:i,widthSegments:n,heightSegments:r,depthSegments:a},this.fromBufferGeometry(new tr(e,t,i,n,r,a)),this.mergeVertices()}function tr(e,t,i,n,r,a){Jn.call(this),this.type="BoxBufferGeometry",this.parameters={width:e,height:t,depth:i,widthSegments:n,heightSegments:r,depthSegments:a};var N=this;e=e||1,t=t||1,i=i||1,n=Math.floor(n)||1,r=Math.floor(r)||1,a=Math.floor(a)||1;var C=[],L=[],I=[],O=[],j=0,k=0;function s(e,t,i,n,r,a,s,o,l,u,c){var h,d,p=a/l,f=s/u,g=a/2,m=s/2,v=o/2,y=l+1,_=u+1,M=0,w=0,b=new Wt;for(d=0;d<_;d++){var T=d*f-m;for(h=0;h<y;h++){var A=h*p-g;b[e]=A*n,b[t]=T*r,b[i]=v,L.push(b.x,b.y,b.z),b[e]=0,b[t]=0,b[i]=0<o?1:-1,I.push(b.x,b.y,b.z),O.push(h/l),O.push(1-d/u),M+=1}}for(d=0;d<u;d++)for(h=0;h<l;h++){var x=j+h+y*d,E=j+h+y*(d+1),S=j+(h+1)+y*(d+1),D=j+(h+1)+y*d;C.push(x,E,D),C.push(E,S,D),w+=6}N.addGroup(k,w,c),k+=w,j+=M}s("z","y","x",-1,-1,i,t,e,a,r,0),s("z","y","x",1,-1,i,t,-e,a,r,1),s("x","z","y",1,1,e,i,t,n,a,2),s("x","z","y",1,-1,e,i,-t,n,a,3),s("x","y","z",1,-1,e,t,i,n,r,4),s("x","y","z",-1,-1,e,t,-i,n,r,5),this.setIndex(C),this.addAttribute("position",new zn(L,3)),this.addAttribute("normal",new zn(I,3)),this.addAttribute("uv",new zn(O,2))}function ir(e,t,i,n){Nn.call(this),this.type="PlaneGeometry",this.parameters={width:e,height:t,widthSegments:i,heightSegments:n},this.fromBufferGeometry(new nr(e,t,i,n)),this.mergeVertices()}function nr(e,t,i,n){Jn.call(this),this.type="PlaneBufferGeometry",this.parameters={width:e,height:t,widthSegments:i,heightSegments:n};var r,a,s=(e=e||1)/2,o=(t=t||1)/2,l=Math.floor(i)||1,u=Math.floor(n)||1,c=l+1,h=u+1,d=e/l,p=t/u,f=[],g=[],m=[],v=[];for(a=0;a<h;a++){var y=a*p-o;for(r=0;r<c;r++){var _=r*d-s;g.push(_,-y,0),m.push(0,0,1),v.push(r/l),v.push(1-a/u)}}for(a=0;a<u;a++)for(r=0;r<l;r++){var M=r+c*a,w=r+c*(a+1),b=r+1+c*(a+1),T=r+1+c*a;f.push(M,w,T),f.push(w,b,T)}this.setIndex(f),this.addAttribute("position",new zn(g,3)),this.addAttribute("normal",new zn(m,3)),this.addAttribute("uv",new zn(v,2))}Jn.prototype=Object.assign(Object.create(u.prototype),{constructor:Jn,isBufferGeometry:!0,getIndex:function(){return this.index},setIndex:function(e){Array.isArray(e)?this.index=new(65535<Fn(e)?Rn:kn)(e,1):this.index=e},addAttribute:function(e,t){return t&&t.isBufferAttribute||t&&t.isInterleavedBufferAttribute?("index"===e?(console.warn("THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute."),this.setIndex(t)):this.attributes[e]=t,this):(console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."),this.addAttribute(e,new Cn(t,arguments[2])))},getAttribute:function(e){return this.attributes[e]},removeAttribute:function(e){return delete this.attributes[e],this},addGroup:function(e,t,i){this.groups.push({start:e,count:t,materialIndex:void 0!==i?i:0})},clearGroups:function(){this.groups=[]},setDrawRange:function(e,t){this.drawRange.start=e,this.drawRange.count=t},applyMatrix:function(e){var t=this.attributes.position;void 0!==t&&(e.applyToBufferAttribute(t),t.needsUpdate=!0);var i=this.attributes.normal;void 0!==i&&((new qt).getNormalMatrix(e).applyToBufferAttribute(i),i.needsUpdate=!0);return null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this},rotateX:($n=new Qt,function(e){return $n.makeRotationX(e),this.applyMatrix($n),this}),rotateY:(Zn=new Qt,function(e){return Zn.makeRotationY(e),this.applyMatrix(Zn),this}),rotateZ:(Xn=new Qt,function(e){return Xn.makeRotationZ(e),this.applyMatrix(Xn),this}),translate:(qn=new Qt,function(e,t,i){return qn.makeTranslation(e,t,i),this.applyMatrix(qn),this}),scale:(Wn=new Qt,function(e,t,i){return Wn.makeScale(e,t,i),this.applyMatrix(Wn),this}),lookAt:(Vn=new vn,function(e){Vn.lookAt(e),Vn.updateMatrix(),this.applyMatrix(Vn.matrix
vendor: 6,903 bytes, line 1
1)}),center:(Qn=new Wt,function(){return this.computeBoundingBox(),this.boundingBox.getCenter(Qn).negate(),this.translate(Qn.x,Qn.y,Qn.z),this}),setFromObject:function(e){var t=e.geometry;if(e.isPoints||e.isLine){var i=new zn(3*t.vertices.length,3),n=new zn(3*t.colors.length,3);if(this.addAttribute("position",i.copyVector3sArray(t.vertices)),this.addAttribute("color",n.copyColorsArray(t.colors)),t.lineDistances&&t.lineDistances.length===t.vertices.length){var r=new zn(t.lineDistances.length,1);this.addAttribute("lineDistance",r.copyArray(t.lineDistances))}null!==t.boundingSphere&&(this.boundingSphere=t.boundingSphere.clone()),null!==t.boundingBox&&(this.boundingBox=t.boundingBox.clone())}else e.isMesh&&t&&t.isGeometry&&this.fromGeometry(t);return this},setFromPoints:function(e){for(var t=[],i=0,n=e.length;i<n;i++){var r=e[i];t.push(r.x,r.y,r.z||0)}return this.addAttribute("position",new zn(t,3)),this},updateFromObject:function(e){var t,i=e.geometry;if(e.isMesh){var n=i.__directGeometry;if(!0===i.elementsNeedUpdate&&(n=void 0,i.elementsNeedUpdate=!1),void 0===n)return this.fromGeometry(i);n.verticesNeedUpdate=i.verticesNeedUpdate,n.normalsNeedUpdate=i.normalsNeedUpdate,n.colorsNeedUpdate=i.colorsNeedUpdate,n.uvsNeedUpdate=i.uvsNeedUpdate,n.groupsNeedUpdate=i.groupsNeedUpdate,i.verticesNeedUpdate=!1,i.normalsNeedUpdate=!1,i.colorsNeedUpdate=!1,i.uvsNeedUpdate=!1,i.groupsNeedUpdate=!1,i=n}return!0===i.verticesNeedUpdate&&(void 0!==(t=this.attributes.position)&&(t.copyVector3sArray(i.vertices),t.needsUpdate=!0),i.verticesNeedUpdate=!1),!0===i.normalsNeedUpdate&&(void 0!==(t=this.attributes.normal)&&(t.copyVector3sArray(i.normals),t.needsUpdate=!0),i.normalsNeedUpdate=!1),!0===i.colorsNeedUpdate&&(void 0!==(t=this.attributes.color)&&(t.copyColorsArray(i.colors),t.needsUpdate=!0),i.colorsNeedUpdate=!1),i.uvsNeedUpdate&&(void 0!==(t=this.attributes.uv)&&(t.copyVector2sArray(i.uvs),t.needsUpdate=!0),i.uvsNeedUpdate=!1),i.lineDistancesNeedUpdate&&(void 0!==(t=this.attributes.lineDistance)&&(t.copyArray(i.lineDistances),t.needsUpdate=!0),i.lineDistancesNeedUpdate=!1),i.groupsNeedUpdate&&(i.computeGroups(e.geometry),this.groups=i.groups,i.groupsNeedUpdate=!1),this},fromGeometry:function(e){return e.__directGeometry=(new Bn).fromGeometry(e),this.fromDirectGeometry(e.__directGeometry)},fromDirectGeometry:function(e){var t=new Float32Array(3*e.vertices.length);if(this.addAttribute("position",new Cn(t,3).copyVector3sArray(e.vertices)),0<e.normals.length){var i=new Float32Array(3*e.normals.length);this.addAttribute("normal",new Cn(i,3).copyVector3sArray(e.normals))}if(0<e.colors.length){var n=new Float32Array(3*e.colors.length);this.addAttribute("color",new Cn(n,3).copyColorsArray(e.colors))}if(0<e.uvs.length){var r=new Float32Array(2*e.uvs.length);this.addAttribute("uv",new Cn(r,2).copyVector2sArray(e.uvs))}if(0<e.uvs2.length){var a=new Float32Array(2*e.uvs2.length);this.addAttribute("uv2",new Cn(a,2).copyVector2sArray(e.uvs2))}for(var s in this.groups=e.groups,e.morphTargets){for(var o=[],l=e.morphTargets[s],u=0,c=l.length;u<c;u++){var h=l[u],d=new zn(3*h.length,3);o.push(d.copyVector3sArray(h))}this.morphAttributes[s]=o}if(0<e.skinIndices.length){var p=new zn(4*e.skinIndices.length,4);this.addAttribute("skinIndex",p.copyVector4sArray(e.skinIndices))}if(0<e.skinWeights.length){var f=new zn(4*e.skinWeights.length,4);this.addAttribute("skinWeight",f.copyVector4sArray(e.skinWeights))}return null!==e.boundingSphere&&(this.boundingSphere=e.boundingSphere.clone()),null!==e.boundingBox&&(this.boundingBox=e.boundingBox.clone()),this},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new Li);var e=this.attributes.position;void 0!==e?this.boundingBox.setFromBufferAttribute(e):this.boundingBox.makeEmpty(),(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&console.error('THREE.BufferGeometry.computeBoundingBox: Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)},computeBoundingSphere:(Hn=new Li,Yn=new Wt,function(){null===this.boundingSphere&&(this.boundingSphere=new ji);var e=this.attributes.position;if(e){var t=this.boundingSphere.center;Hn.setFromBufferAttribute(e),Hn.getCenter(t);for(var i=0,n=0,r=e.count;n<r;n++)Yn.x=e.getX(n),Yn.y=e.getY(n),Yn.z=e.getZ(n),i=Math.max(i,t.distanceToSquared(Yn));this.boundingSphere.radius=Math.sqrt(i),isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}),computeFaceNormals:function(){},computeVertexNormals:function(){var e=this.index,t=this.attributes,i=this.groups;if(t.position){var n=t.position.array;if(void 0===t.normal)this.addAttribute("normal",new Cn(new Float32Array(n.length),3));else for(var r=t.normal.array,a=0,s=r.length;a<s;a++)r[a]=0;var o,l,u,c=t.normal.array,h=new Wt,d=new Wt,p=new Wt,f=new Wt,g=new Wt;if(e){var m=e.array;0===i.length&&this.addGroup(0,m.length);for(var v=0,y=i.length;v<y;++v){var _=i[v],M=_.start;for(a=M,s=M+_.count;a<s;a+=3)o=3*m[a+0],l=3*m[a+1],u=3*m[a+2],h.fromArray(n,o),d.fromArray(n,l),p.fromArray(n,u),f.subVectors(p,d),g.subVectors(h,d),f.cross(g),c[o]+=f.x,c[1+o]+=f.y,c[2+o]+=f.z,c[l]+=f.x,c[1+l]+=f.y,c[2+l]+=f.z,c[u]+=f.x,c[1+u]+=f.y,c[2+u]+=f.z}}else for(a=0,s=n.length;a<s;a+=9)h.fromArray(n,a),d.fromArray(n,a+3),p.fromArray(n,a+6),f.subVectors(p,d),g.subVectors(h,d),f.cross(g),c[a]=f.x,c[a+1]=f.y,c[a+2]=f.z,c[a+3]=f.x,c[a+4]=f.y,c[a+5]=f.z,c[a+6]=f.x,c[a+7]=f.y,c[a+8]=f.z;this.normalizeNormals(),t.normal.needsUpdate=!0}},merge:function(e,t){if(e&&e.isBufferGeometry){void 0===t&&(t=0,console.warn("THREE.BufferGeometry.merge(): Overwriting original geometry, starting at offset=0. Use BufferGeometryUtils.mergeBufferGeometries() for lossless merge."));var i=this.attributes;for(var n in i)if(void 0!==e.attributes[n])for(var r=i[n].array,a=e.attributes[n],s=a.array,o=0,l=a.itemSize*t;o<s.length;o++,l++)r[l]=s[o];return this}console.error("THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.",e)},normalizeNormals:(Gn=new Wt,function(){for(var e=this.attributes.normal,t=0,i=e.count;t<i;t++)Gn.x=e.getX(t),Gn.y=e.getY(t),Gn.z=e.getZ(t),Gn.normalize(),e.setXYZ(t,Gn.x,Gn.y,Gn.z)}),toNonIndexed:function(){if(null===this.index)return console.warn("THREE.BufferGeometry.toNonIndexed(): Geometry is already non-indexed."),this;var e=new Jn,t=this.index.array,i=this.attributes;for(var n in i){for(var r=i[n],a=r.array,s=r.itemSize,o=new a.constructor(t.length*s),l=0,u=0,c=0,h=t.length;c<h;c++){l=t[c]*s;for(var d=0;d<s;d++)o[u++]=a[l++]}e.addAttribute(n,new Cn(o,s))}var p=this.groups;for(c=0,h=p.length;c<h;c++){var f=p[c];e.addGroup(f.start,f.count,f.materialIndex)}return e},toJSON:function(){var e={metadata:{version:4.5,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};
vendor: 4,795 bytes, line 1
1if(e.uuid=this.uuid,e.type=this.type,""!==this.name&&(e.name=this.name),0<Object.keys(this.userData).length&&(e.userData=this.userData),void 0!==this.parameters){var t=this.parameters;for(var i in t)void 0!==t[i]&&(e[i]=t[i]);return e}e.data={attributes:{}};var n=this.index;if(null!==n){var r=Array.prototype.slice.call(n.array);e.data.index={type:n.array.constructor.name,array:r}}var a=this.attributes;for(var i in a){var s=a[i];r=Array.prototype.slice.call(s.array);e.data.attributes[i]={itemSize:s.itemSize,type:s.array.constructor.name,array:r,normalized:s.normalized}}var o=this.groups;0<o.length&&(e.data.groups=JSON.parse(JSON.stringify(o)));var l=this.boundingSphere;return null!==l&&(e.data.boundingSphere={center:l.center.toArray(),radius:l.radius}),e},clone:function(){return(new Jn).copy(this)},copy:function(e){var t,i,n;this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.name=e.name;var r=e.index;null!==r&&this.setIndex(r.clone());var a=e.attributes;for(t in a){var s=a[t];this.addAttribute(t,s.clone())}var o=e.morphAttributes;for(t in o){var l=[],u=o[t];for(i=0,n=u.length;i<n;i++)l.push(u[i].clone());this.morphAttributes[t]=l}var c=e.groups;for(i=0,n=c.length;i<n;i++){var h=c[i];this.addGroup(h.start,h.count,h.materialIndex)}var d=e.boundingBox;null!==d&&(this.boundingBox=d.clone());var p=e.boundingSphere;return null!==p&&(this.boundingSphere=p.clone()),this.drawRange.start=e.drawRange.start,this.drawRange.count=e.drawRange.count,this.userData=e.userData,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),(er.prototype=Object.create(Nn.prototype)).constructor=er,(tr.prototype=Object.create(Jn.prototype)).constructor=tr,(ir.prototype=Object.create(Nn.prototype)).constructor=ir,(nr.prototype=Object.create(Jn.prototype)).constructor=nr;var rr,ar,sr,or,lr,ur,cr,hr,dr,pr,fr,gr,mr,vr,yr,_r,Mr,wr,br,Tr,Ar,xr,Er,Sr,Dr,Nr,Cr,Lr,Ir,Or,jr,kr,Pr,Rr,zr,Ur,Br,Fr,Gr,Hr=0;function Yr(){Object.defineProperty(this,"id",{value:Hr++}),this.uuid=Ht.generateUUID(),this.name="",this.type="Material",this.fog=!0,this.lights=!0,this.blending=K,this.side=k,this.flatShading=!1,this.vertexColors=Ae,this.opacity=1,this.transparent=!1,this.blendSrc=re,this.blendDst=ae,this.blendEquation=O,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=fe,this.depthTest=!0,this.depthWrite=!0,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaTest=0,this.premultipliedAlpha=!1,this.overdraw=0,this.visible=!0,this.userData={},this.needsUpdate=!0}function Qr(e){Yr.call(this),this.type="MeshBasicMaterial",this.color=new Fi(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=_e,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.lights=!1,this.setValues(e)}function Vr(e){Yr.call(this),this.type="ShaderMaterial",this.defines={},this.uniforms={},this.vertexShader="void main() {\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}",this.fragmentShader="void main() {\n\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\n}",this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv2:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,void 0!==e&&(void 0!==e.attributes&&console.error("THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead."),this.setValues(e))}function Wr(e,t){this.origin=void 0!==e?e:new Wt,this.direction=void 0!==t?t:new Wt}function qr(e,t){this.start=void 0!==e?e:new Wt,this.end=void 0!==t?t:new Wt}function Xr(e,t,i){this.a=void 0!==e?e:new Wt,this.b=void 0!==t?t:new Wt,this.c=void 0!==i?i:new Wt}function Zr(e,t){vn.call(this),this.type="Mesh",this.geometry=void 0!==e?e:new Jn,this.material=void 0!==t?t:new Qr({color:16777215*Math.random()}),this.drawMode=Ot,this.updateMorphTargets()}function $r(e,t,i,n,r,a,s){return Xr.getBarycoord(e,t,i,n,Br),r.multiplyScalar(Br.x),a.multiplyScalar(Br.y),s.multiplyScalar(Br.z),r.add(a).add(s),r.clone()}function Kr(e,t,i,n,r,a,s,o){if(null===(t.side===Te?n.intersectTriangle(s,a,r,!0,o):n.intersectTriangle(r,a,s,t.side!==Z,o)))return null;
vendor: 14,023 bytes, line 1
1Gr.copy(o),Gr.applyMatrix4(e.matrixWorld);var l=i.ray.origin.distanceTo(Gr);return l<i.near||l>i.far?null:{distance:l,point:Gr.clone(),object:e}}function Jr(e,t,i,n,r,a,s,o){Lr.fromBufferAttribute(n,a),Ir.fromBufferAttribute(n,s),Or.fromBufferAttribute(n,o);var l=Kr(e,e.material,t,i,Lr,Ir,Or,Fr);if(l){r&&(Rr.fromBufferAttribute(r,a),zr.fromBufferAttribute(r,s),Ur.fromBufferAttribute(r,o),l.uv=$r(Fr,Lr,Ir,Or,Rr,zr,Ur));var u=new Mn(a,s,o);Xr.getNormal(Lr,Ir,Or,u.normal),l.face=u}return l}function ea(a,i,s,n){var o,l,u,c=new Fi(0),h=0;function d(e,t){i.buffers.color.setClear(e.r,e.g,e.b,t,n)}return{getClearColor:function(){return c},setClearColor:function(e,t){c.set(e),d(c,h=void 0!==t?t:1)},getClearAlpha:function(){return h},setClearAlpha:function(e){d(c,h=e)},render:function(e,t,i,n){var r=t.background;null===r?d(c,h):r&&r.isColor&&(d(r,1),n=!0),(a.autoClear||n)&&a.clear(a.autoClearColor,a.autoClearDepth,a.autoClearStencil),r&&r.isCubeTexture?(void 0===u&&((u=new Zr(new tr(1,1,1),new Vr({uniforms:Vi.cube.uniforms,vertexShader:Vi.cube.vertexShader,fragmentShader:Vi.cube.fragmentShader,side:Te,depthTest:!0,depthWrite:!1,fog:!1}))).geometry.removeAttribute("normal"),u.geometry.removeAttribute("uv"),u.onBeforeRender=function(e,t,i){this.matrixWorld.copyPosition(i.matrixWorld)},s.update(u)),u.material.uniforms.tCube.value=r,e.push(u,u.geometry,u.material,0,null)):r&&r.isTexture&&(void 0===o&&(o=new _n(-1,1,1,-1,0,1),l=new Zr(new nr(2,2),new Qr({depthTest:!1,depthWrite:!1,fog:!1})),s.update(l)),l.material.map=r,a.renderBufferDirect(o,null,l.geometry,l.material,l,null))}}}function ta(i,r,a){var s;this.setMode=function(e){s=e},this.render=function(e,t){i.drawArrays(s,e,t),a.update(t,s)},this.renderInstances=function(e,t,i){var n=r.get("ANGLE_instanced_arrays");null!==n?(n.drawArraysInstancedANGLE(s,t,i,e.maxInstancedCount),a.update(i,s,e.maxInstancedCount)):console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.")}}function ia(t,i,e){var n;function r(e){if("highp"===e){if(0<t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.HIGH_FLOAT).precision&&0<t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT).precision)return"highp";e="mediump"}return"mediump"===e&&0<t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.MEDIUM_FLOAT).precision&&0<t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.MEDIUM_FLOAT).precision?"mediump":"lowp"}var a=void 0!==e.precision?e.precision:"highp",s=r(a);s!==a&&(console.warn("THREE.WebGLRenderer:",a,"not supported, using",s,"instead."),a=s);var o=!0===e.logarithmicDepthBuffer,l=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),u=t.getParameter(t.MAX_VERTEX_TEXTURE_IMAGE_UNITS),c=t.getParameter(t.MAX_TEXTURE_SIZE),h=t.getParameter(t.MAX_CUBE_MAP_TEXTURE_SIZE),d=t.getParameter(t.MAX_VERTEX_ATTRIBS),p=t.getParameter(t.MAX_VERTEX_UNIFORM_VECTORS),f=t.getParameter(t.MAX_VARYING_VECTORS),g=t.getParameter(t.MAX_FRAGMENT_UNIFORM_VECTORS),m=0<u,v=!!i.get("OES_texture_float");return{getMaxAnisotropy:function(){if(void 0!==n)return n;var e=i.get("EXT_texture_filter_anisotropic");return n=null!==e?t.getParameter(e.MAX_TEXTURE_MAX_ANISOTROPY_EXT):0},getMaxPrecision:r,precision:a,logarithmicDepthBuffer:o,maxTextures:l,maxVertexTextures:u,maxTextureSize:c,maxCubemapSize:h,maxAttributes:d,maxVertexUniforms:p,maxVaryings:f,maxFragmentUniforms:g,vertexTextures:m,floatFragmentTextures:v,floatVertexTextures:m&&v}}function na(){var c=this,h=null,d=0,p=!1,f=!1,g=new ki,m=new qt,v={value:null,needsUpdate:!1};function y(){v.value!==h&&(v.value=h,v.needsUpdate=0<d),c.numPlanes=d,c.numIntersection=0}function _(e,t,i,n){var r=null!==e?e.length:0,a=null;if(0!==r){if(a=v.value,!0!==n||null===a){var s=i+4*r,o=t.matrixWorldInverse;m.getNormalMatrix(o),(null===a||a.length<s)&&(a=new Float32Array(s));for(var l=0,u=i;l!==r;++l,u+=4)g.copy(e[l]).applyMatrix4(o,m),g.normal.toArray(a,u),a[u+3]=g.constant}v.value=a,v.needsUpdate=!0}return c.numPlanes=r,a}this.uniform=v,this.numPlanes=0,this.numIntersection=0,this.init=function(e,t,i){var n=0!==e.length||t||0!==d||p;return p=t,h=_(e,i,0),d=e.length,n},this.beginShadows=function(){f=!0,_(null)},this.endShadows=function(){f=!1,y()},this.setState=function(e,t,i,n,r,a){if(!p||null===e||0===e.length||f&&!i)f?_(null):y();else{var s=f?0:d,o=4*s,l=r.clippingState||null;v.value=l,l=_(e,n,o,a);for(var u=0;u!==o;++u)l[u]=h[u];r.clippingState=l,this.numIntersection=t?this.numPlanes:0,this.numPlanes+=s}}}function ra(i){var n={};return{get:function(e){if(void 0!==n[e])return n[e];var t;switch(e){case"WEBGL_depth_texture":t=i.getExtension("WEBGL_depth_texture")||i.getExtension("MOZ_WEBGL_depth_texture")||i.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":t=i.getExtension("EXT_texture_filter_anisotropic")||i.getExtension("MOZ_EXT_texture_filter_anisotropic")||i.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":t=i.getExtension("WEBGL_compressed_texture_s3tc")||i.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||i.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":t=i.getExtension("WEBGL_compressed_texture_pvrtc")||i.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:t=i.getExtension(e)}return null===t&&console.warn("THREE.WebGLRenderer: "+e+" extension not supported."),n[e]=t}}}function aa(h,d,a){var s={},p={};function o(e){var t=e.target,i=s[t.id];for(var n in null!==i.index&&d.remove(i.index),i.attributes)d.remove(i.attributes[n]);t.removeEventListener("dispose",o),delete s[t.id];var r=p[t.id];r&&(d.remove(r),delete p[t.id]),(r=p[i.id])&&(d.remove(r),delete p[i.id]),a.memory.geometries--}return{get:function(e,t){var i=s[t.id];return i||(t.addEventListener("dispose",o),t.isBufferGeometry?i=t:t.isGeometry&&(void 0===t._bufferGeometry&&(t._bufferGeometry=(new Jn).setFromObject(e)),i=t._bufferGeometry),s[t.id]=i,a.memory.geometries++,i)},update:function(e){var t=e.index,i=e.attributes;for(var n in null!==t&&d.update(t,h.ELEMENT_ARRAY_BUFFER),i)d.update(i[n],h.ARRAY_BUFFER);var r=e.morphAttributes;for(var n in r)for(var a=r[n],s=0,o=a.length;s<o;s++)d.update(a[s],h.ARRAY_BUFFER)},getWireframeAttribute:function(e){var t=p[e.id];if(t)return t;var i,n=[],r=e.index,a=e.attributes;if(null!==r)for(var s=0,o=(i=r.array).length;s<o;s+=3){var l=i[s+0],u=i[s+1],c=i[s+2];n.push(l,u,u,c,c,l)}else for(s=0,o=(i=a.position.array).length/3-1;s<o;s+=3){l=s+0,u=s+1,c=s+2;n.push(l,u,u,c,c,l)}return t=new(65535<Fn(n)?Rn:kn)(n,1),d.update(t,h.ELEMENT_ARRAY_BUFFER),p[e.id]=t}}}function sa(i,r,a){var s,o,l;this.setMode=function(e){s=e},this.setIndex=function(e){o=e.type,l=e.bytesPerElement},this.render=function(e,t){i.drawElements(s,t,o,e*l),a.update(t,s)},this.renderInstances=function(e,t,i){var n=r.get("ANGLE_instanced_arrays");null!==n?(n.drawElementsInstancedANGLE(s,i,o,t*l,e.maxInstancedCount),a.update(i,s,e.maxInstancedCount)):console.error("THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.")}}function oa(n){var r={frame:0,calls:0,triangles:0,points:0,lines:0};return{memory:{geometries:0,textures:0},render:r,programs:null,autoReset:!0,reset:function(){r.frame++,r.calls=0,r.triangles=0,r.points=0,r.lines=0},update:function(e,t,i){switch(i=i||1,r.calls++,t){case n.TRIANGLES:r.triangles+=i*(e/3);break;case n.TRIANGLE_STRIP:case n.TRIANGLE_FAN:r.triangles+=i*(e-2);break;case n.LINES:r.lines+=i*(e/2);break;case n.LINE_STRIP:r.lines+=i*(e-1);break;case n.LINE_LOOP:r.lines+=i*e;break;case n.POINTS:r.points+=i*e;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",t)}}}}function la(e,t){return Math.abs(t[1])-Math.abs(e[1])}function ua(p){var f={},g=new Float32Array(8);return{update:function(e,t,i,n){var r=e.morphTargetInfluences,a=r.length,s=f[t.id];if(void 0===s){s=[];for(var o=0;o<a;o++)s[o]=[o,0];f[t.id]=s}var l=i.morphTargets&&t.morphAttributes.position,u=i.morphNormals&&t.morphAttributes.normal;for(o=0;o<a;o++){0!==(c=s[o])[1]&&(l&&t.removeAttribute("morphTarget"+o),u&&t.removeAttribute("morphNormal"+o))}for(o=0;o<a;o++){(c=s[o])[0]=o,c[1]=r[o]}for(s.sort(la),o=0;o<8;o++){var c;if(c=s[o]){var h=c[0],d=c[1];if(d){l&&t.addAttribute("morphTarget"+o,l[h]),u&&t.addAttribute("morphNormal"+o,u[h]),g[o]=d;continue}}g[o]=0}n.getUniforms().setValue(p,"morphTargetInfluences",g)}}}function ca(r,a){var s={};return{update:function(e){var t=a.render.frame,i=e.geometry,n=r.get(e,i);return s[n.id]!==t&&(i.isGeometry&&n.updateFromObject(e),r.update(n),s[n.id]=t),n},dispose:function(){s={}}}}function ha(e,t,i,n,r,a,s,o,l,u){Ei.call(this,e=void 0!==e?e:[],t=void 0!==t?t:Ne,i,n,r,a,s,o,l,u),this.flipY=!1}Yr.prototype=Object.assign(Object.create(u.prototype),{constructor:Yr,isMaterial:!0,onBeforeCompile:function(){},setValues:function(e){if(void 0!==e)for(var t in e){var i=e[t];if(void 0!==i)if("shading"!==t){var n=this[t];void 0!==n?n&&n.isColor?n.set(i):n&&n.isVector3&&i&&i.isVector3?n.copy(i):this[t]="overdraw"===t?Number(i):i:console.warn("THREE."+this.type+": '"+t+"' is not a property of this material.")}else console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=1===i;else console.warn("THREE.Material: '"+t+"' parameter is undefined.")}},toJSON:function(e){var t=void 0===e||"string"==typeof e;t&&(e={textures:{},images:{}});var i={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};function n(e){var t=[];for(var i in e){var n=e[i];delete n.metadata,t.push(n)}return t}if(i.uuid=this.uuid,i.type=this.type,""!==this.name&&(i.name=this.name),this.color&&this.color.isColor&&(i.color=this.color.getHex()),void 0!==this.roughness&&(i.roughness=this.roughness),void 0!==this.metalness&&(i.metalness=this.metalness),this.emissive&&this.emissive.isColor&&(i.emissive=this.emissive.getHex()),1!==this.emissiveIntensity&&(i.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(i.specular=this.specular.getHex()),void 0!==this.shininess&&(i.shininess=this.shininess),void 0!==this.clearCoat&&(i.clearCoat=this.clearCoat),void 0!==this.clearCoatRoughness&&(i.clearCoatRoughness=this.clearCoatRoughness),this.map&&this.map.isTexture&&(i.map=this.map.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(i.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(i.lightMap=this.lightMap.toJSON(e).uuid),this.aoMap&&this.aoMap.isTexture&&(i.aoMap=this.aoMap.toJSON(e).uuid,i.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(i.bumpMap=this.bumpMap.toJSON(e).uuid,i.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(i.normalMap=this.normalMap.toJSON(e).uuid,i.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(i.displacementMap=this.displacementMap.toJSON(e).uuid,i.displacementScale=this.displacementScale,i.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(i.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(i.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(i.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(i.specularMap=this.specularMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(i.envMap=this.envMap.toJSON(e).uuid,i.reflectivity=this.reflectivity),this.gradientMap&&this.gradientMap.isTexture&&(i.gradientMap=this.gradientMap.toJSON(e).uuid),void 0!==this.size&&(i.size=this.size),void 0!==this.sizeAttenuation&&(i.sizeAttenuation=this.sizeAttenuation),this.blending!==K&&(i.blending=this.blending),!0===this.flatShading&&(i.flatShading=this.flatShading),this.side!==k&&(i.side=this.side),this.vertexColors!==Ae&&(i.vertexColors=this.vertexColors),this.opacity<1&&(i.opacity=this.opacity),!0===this.transparent&&(i.transparent=this.transparent),i.depthFunc=this.depthFunc,i.depthTest=this.depthTest,i.depthWrite=this.depthWrite,0!==this.rotation&&(i.rotation=this.rotation),1!==this.linewidth&&(i.linewidth=this.linewidth),void 0!==this.dashSize&&(i.dashSize=this.dashSize),void 0!==this.gapSize&&(i.gapSize=this.gapSize),void 0!==this.scale&&(i.scale=this.scale),!0===this.dithering&&(i.dithering=!0),0<this.alphaTest&&(i.alphaTest=this.alphaTest),!0===this.premultipliedAlpha&&(i.premultipliedAlpha=this.premultipliedAlpha),!0===this.wireframe&&(i.wireframe=this.wireframe),1<this.wireframeLinewidth&&(i.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(i.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(i.wireframeLinejoin=this.wireframeLinejoin),!0===this.morphTargets&&(i.morphTargets=!0),!0===this.skinning&&(i.skinning=!0),!1===this.visible&&(i.visible=!1),"{}"!==JSON.stringify(this.userData)&&(i.userData=this.userData),t){var r=n(e.textures),a=n(e.images);0<r.length&&(i.textures=r),0<a.length&&(i.images=a)}return i},clone:function(){return(new this.constructor).copy(this)},copy:function(e){this.name=e.name,this.fog=e.fog,this.lights=e.lights,this.blending=e.blending,this.side=e.side,this.flatShading=e.flatShading,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.premultipliedAlpha=e.premultipliedAlpha,this.overdraw=e.overdraw,this.visible=e.visible,this.userData=JSON.parse(JSON.stringify(e.userData)),this.clipShadows=e.clipSh
vendor: 6,478 bytes, line 1
1adows,this.clipIntersection=e.clipIntersection;var t=e.clippingPlanes,i=null;if(null!==t){var n=t.length;i=new Array(n);for(var r=0;r!==n;++r)i[r]=t[r].clone()}return this.clippingPlanes=i,this.shadowSide=e.shadowSide,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),((Qr.prototype=Object.create(Yr.prototype)).constructor=Qr).prototype.isMeshBasicMaterial=!0,Qr.prototype.copy=function(e){return Yr.prototype.copy.call(this,e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this},((Vr.prototype=Object.create(Yr.prototype)).constructor=Vr).prototype.isShaderMaterial=!0,Vr.prototype.copy=function(e){return Yr.prototype.copy.call(this,e),this.fragmentShader=e.fragmentShader,this.vertexShader=e.vertexShader,this.uniforms=Ui.clone(e.uniforms),this.defines=Object.assign({},e.defines),this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.lights=e.lights,this.clipping=e.clipping,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this.extensions=e.extensions,this},Vr.prototype.toJSON=function(e){var t=Yr.prototype.toJSON.call(this,e);return t.uniforms=this.uniforms,t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader,t},Object.assign(Wr.prototype,{set:function(e,t){return this.origin.copy(e),this.direction.copy(t),this},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this},at:function(e,t){return void 0===t&&(console.warn("THREE.Ray: .at() target is now required"),t=new Wt),t.copy(this.direction).multiplyScalar(e).add(this.origin)},lookAt:function(e){return this.direction.copy(e).sub(this.origin).normalize(),this},recast:(fr=new Wt,function(e){return this.origin.copy(this.at(e,fr)),this}),closestPointToPoint:function(e,t){void 0===t&&(console.warn("THREE.Ray: .closestPointToPoint() target is now required"),t=new Wt),t.subVectors(e,this.origin);var i=t.dot(this.direction);return i<0?t.copy(this.origin):t.copy(this.direction).multiplyScalar(i).add(this.origin)},distanceToPoint:function(e){return Math.sqrt(this.distanceSqToPoint(e))},distanceSqToPoint:(pr=new Wt,function(e){var t=pr.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(pr.copy(this.direction).multiplyScalar(t).add(this.origin),pr.distanceToSquared(e))}),distanceSqToSegment:(cr=new Wt,hr=new Wt,dr=new Wt,function(e,t,i,n){cr.copy(e).add(t).multiplyScalar(.5),hr.copy(t).sub(e).normalize(),dr.copy(this.origin).sub(cr);var r,a,s,o,l=.5*e.distanceTo(t),u=-this.direction.dot(hr),c=dr.dot(this.direction),h=-dr.dot(hr),d=dr.lengthSq(),p=Math.abs(1-u*u);if(0<p)if(a=u*c-h,o=l*p,0<=(r=u*h-c))if(-o<=a)if(a<=o){var f=1/p;s=(r*=f)*(r+u*(a*=f)+2*c)+a*(u*r+a+2*h)+d}else a=l,s=-(r=Math.max(0,-(u*a+c)))*r+a*(a+2*h)+d;else a=-l,s=-(r=Math.max(0,-(u*a+c)))*r+a*(a+2*h)+d;else s=a<=-o?-(r=Math.max(0,-(-u*l+c)))*r+(a=0<r?-l:Math.min(Math.max(-l,-h),l))*(a+2*h)+d:a<=o?(r=0,(a=Math.min(Math.max(-l,-h),l))*(a+2*h)+d):-(r=Math.max(0,-(u*l+c)))*r+(a=0<r?l:Math.min(Math.max(-l,-h),l))*(a+2*h)+d;else a=0<u?-l:l,s=-(r=Math.max(0,-(u*a+c)))*r+a*(a+2*h)+d;return i&&i.copy(this.direction).multiplyScalar(r).add(this.origin),n&&n.copy(hr).multiplyScalar(a).add(cr),s}),intersectSphere:(ur=new Wt,function(e,t){ur.subVectors(e.center,this.origin);var i=ur.dot(this.direction),n=ur.dot(ur)-i*i,r=e.radius*e.radius;if(r<n)return null;var a=Math.sqrt(r-n),s=i-a,o=i+a;return s<0&&o<0?null:s<0?this.at(o,t):this.at(s,t)}),intersectsSphere:function(e){return this.distanceToPoint(e.center)<=e.radius},distanceToPlane:function(e){var t=e.normal.dot(this.direction);if(0===t)return 0===e.distanceToPoint(this.origin)?0:null;var i=-(this.origin.dot(e.normal)+e.constant)/t;return 0<=i?i:null},intersectPlane:function(e,t){var i=this.distanceToPlane(e);return null===i?null:this.at(i,t)},intersectsPlane:function(e){var t=e.distanceToPoint(this.origin);return 0===t||e.normal.dot(this.direction)*t<0},intersectBox:function(e,t){var i,n,r,a,s,o,l=1/this.direction.x,u=1/this.direction.y,c=1/this.direction.z,h=this.origin;return n=0<=l?(i=(e.min.x-h.x)*l,(e.max.x-h.x)*l):(i=(e.max.x-h.x)*l,(e.min.x-h.x)*l),(a=0<=u?(r=(e.min.y-h.y)*u,(e.max.y-h.y)*u):(r=(e.max.y-h.y)*u,(e.min.y-h.y)*u))<i||n<r?null:((i<r||i!=i)&&(i=r),(a<n||n!=n)&&(n=a),(o=0<=c?(s=(e.min.z-h.z)*c,(e.max.z-h.z)*c):(s=(e.max.z-h.z)*c,(e.min.z-h.z)*c))<i||n<s?null:((i<s||i!=i)&&(i=s),(o<n||n!=n)&&(n=o),n<0?null:this.at(0<=i?i:n,t)))},intersectsBox:(lr=new Wt,function(e){return null!==this.intersectBox(e,lr)}),intersectTriangle:(rr=new Wt,ar=new Wt,sr=new Wt,or=new Wt,function(e,t,i,n,r){ar.subVectors(t,e),sr.subVectors(i,e),or.crossVectors(ar,sr);var a,s=this.direction.dot(or);if(0<s){if(n)return null;a=1}else{if(!(s<0))return null;a=-1,s=-s}rr.subVectors(this.origin,e);var o=a*this.direction.dot(sr.crossVectors(rr,sr));if(o<0)return null;var l=a*this.direction.dot(ar.cross(rr));if(l<0)return null;if(s<o+l)return null;var u=-a*rr.dot(or);return u<0?null:this.at(u/s,r)}),applyMatrix4:function(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this},equals:function(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}}),Object.assign(qr.prototype,{set:function(e,t){return this.start.copy(e),this.end.copy(t),this},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.start.copy(e.start),this.end.copy(e.end),this},getCenter:function(e){return void 0===e&&(console.warn("THREE.Line3: .getCenter() target is now required"),e=new Wt),e.addVectors(this.start,this.end).multiplyScalar(.5)},delta:function(e){return void 0===e&&(console.warn("THREE.Line3: .delta() target is now required"),e=new Wt),e.subVectors(this.end,this.start)},distanceSq:function(){return this.start.distanceToSquared(this.end)},distance:function(){return this.start.distanceTo(this.end)},at:function(e,t){return void 0===t&&(console.warn("THREE.Line3: .at(
1) target is now required"),t=new Wt),this.delta(t).multiplyScalar(e).add(this.start)},closestPointToPointParameter:(gr=new Wt,mr=new Wt,function(e,t){gr.subVectors(e,this.start),mr.subVectors(this.end,this.start);var i=mr.dot(mr),n=mr.dot(gr)/i;return t&&(n=Ht.clamp(n,0,1)),n}),closestPointToPoint:function(e,t,i){var n=this.closestPointToPointParameter(e,t);return void 0===i&&(console.warn("THREE.Line3: .closestPointToPoint() target is now required"),i=new Wt),this.delta(i).multiplyScalar(n).add(this.start)},applyMatrix4:function(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this},equals:function(e){return e.start.equals(this.start)&&e.end.equals(this.end)}}),Object.assign(Xr,{getNormal:(wr=new Wt,function(e,t,i,n){void 0===n&&(console.warn("THREE.Triangle: .getNormal() target is now required"),n=new Wt),n.subVectors(i,t),wr.subVectors(e,t),n.cross(wr);var r=n.lengthSq();return 0<r?n.multiplyScalar(1/Math.sqrt(r)):n.set(0,0,0)}),getBarycoord:(yr=new Wt,_r=new Wt,Mr=new Wt,function(e,t,i,n,r){yr.subVectors(n,t),_r.subVectors(i,t),Mr.subVectors(e,t);var a=yr.dot(yr),s=yr.dot(_r),o=yr.dot(Mr),l=_r.dot(_r),u=_r.dot(Mr),c=a*l-s*s;if(void 0===r&&(console.warn("THREE.Triangle: .getBarycoord() target is now required"),r=new Wt),0==c)return r.set(-2,-1,-1);var h=1/c,d=(l*o-s*u)*h,p=(a*u-s*o)*h;return r.set(1-d-p,p,d)}),containsPoint:(vr=new Wt,function(e,t,i,n){return Xr.getBarycoord(e,t,i,n,vr),0<=vr.x&&0<=vr.y&&vr.x+vr.y<=1})}),Object.assign(Xr.prototype,{set:function(e,t,i){return this.a.copy(e),this.b.copy(t),this.c.copy(i),this},setFromPointsAndIndices:function(e,t,i,n){return this.a.copy(e[t]),this.b.copy(e[i]),this.c.copy(e[n]),this},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this},getArea:(Er=new Wt,Sr=new Wt,function(){return Er.subVectors(this.c,this.b),Sr.subVectors(this.a,this.b),.5*Er.cross(Sr).length()}),getMidpoint:function(e){return void 0===e&&(console.warn("THREE.Triangle: .getMidpoint() target is now required"),e=new Wt),e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)},getNormal:function(e){return Xr.getNormal(this.a,this.b,this.c,e)},getPlane:function(e){return void 0===e&&(console.warn("THREE.Triangle: .getPlane() target is now required"),e=new Wt),e.setFromCoplanarPoints(this.a,this.b,this.c)},getBarycoord:function(e,t){return Xr.getBarycoord(e,this.a,this.b,this.c,t)},containsPoint:function(e){return Xr.containsPoint(e,this.a,this.b,this.c)},intersectsBox:function(e){return e.intersectsTriangle(this)},closestPointToPoint:(br=new ki,Tr=[new qr,new qr,new qr],Ar=new Wt,xr=new Wt,function(e,t){void 0===t&&(console.warn("THREE.Triangle: .closestPointToPoint() target is now required"),t=new Wt);var i=1/0;if(br.setFromCoplanarPoints(this.a,this.b,this.c),br.projectPoint(e,Ar),!0===this.containsPoint(Ar))t.copy(Ar);else{Tr[0].set(this.a,this.b),Tr[1].set(this.b,this.c),Tr[2].set(this.c,this.a);for(var n=0;n<Tr.length;n++){Tr[n].closestPointToPoint(Ar,!0,xr);var r=Ar.distanceToSquared(xr);r<i&&(i=r,t.copy(xr))}}return t}),equals:function(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}),Zr.prototype=Object.assign(Object.create(vn.prototype),{constructor:Zr,isMesh:!0,setDrawMode:function(e){this.drawMode=e},copy:function(e){return vn.prototype.copy.call(this,e),this.drawMode=e.drawMode,void 0!==e.morphTargetInfluences&&(this.morphTargetInfluences=e.morphTargetInfluences.slice()),void 0!==e.morphTargetDictionary&&(this.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),this},updateMorphTargets:function(){var e,t,i,n=this.geometry;if(n.isBufferGeometry){var r=n.morphAttributes,a=Object.keys(r);if(0<a.length){var s=r[a[0]];if(void 0!==s)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},e=0,t=s.length;e<t;e++)i=s[e].name||String(e),this.morphTargetInfluences.push(0),this.morphTargetDictionary[i]=e}}else{var o=n.morphTargets;if(void 0!==o&&0<o.length)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},e=0,t=o.length;e<t;e++)i=o[e].name||String(e),this.morphTargetInfluences.push(0),this.morphTargetDictionary[i]=e}},raycast:(Dr=new Qt,Nr=new Wr,Cr=new ji,Lr=new Wt,Ir=new Wt,Or=new Wt,jr=new Wt,kr=new Wt,Pr=new Wt,Rr=new Yt,zr=new Yt,Ur=new Yt,Br=ne
vendor: 5,066 bytes, line 1
1w Wt,Fr=new Wt,Gr=new Wt,function(e,t){var i,n=this.geometry,r=this.material,a=this.matrixWorld;if(void 0!==r&&(null===n.boundingSphere&&n.computeBoundingSphere(),Cr.copy(n.boundingSphere),Cr.applyMatrix4(a),!1!==e.ray.intersectsSphere(Cr)&&(Dr.getInverse(a),Nr.copy(e.ray).applyMatrix4(Dr),null===n.boundingBox||!1!==Nr.intersectsBox(n.boundingBox))))if(n.isBufferGeometry){var s,o,l,u,c,h=n.index,d=n.attributes.position,p=n.attributes.uv;if(null!==h)for(u=0,c=h.count;u<c;u+=3)s=h.getX(u),o=h.getX(u+1),l=h.getX(u+2),(i=Jr(this,e,Nr,d,p,s,o,l))&&(i.faceIndex=Math.floor(u/3),t.push(i));else if(void 0!==d)for(u=0,c=d.count;u<c;u+=3)(i=Jr(this,e,Nr,d,p,s=u,o=u+1,l=u+2))&&(i.faceIndex=Math.floor(u/3),t.push(i))}else if(n.isGeometry){var f,g,m,v,y=Array.isArray(r),_=n.vertices,M=n.faces,w=n.faceVertexUvs[0];0<w.length&&(v=w);for(var b=0,T=M.length;b<T;b++){var A=M[b],x=y?r[A.materialIndex]:r;if(void 0!==x){if(f=_[A.a],g=_[A.b],m=_[A.c],!0===x.morphTargets){var E=n.morphTargets,S=this.morphTargetInfluences;Lr.set(0,0,0),Ir.set(0,0,0),Or.set(0,0,0);for(var D=0,N=E.length;D<N;D++){var C=S[D];if(0!==C){var L=E[D].vertices;Lr.addScaledVector(jr.subVectors(L[A.a],f),C),Ir.addScaledVector(kr.subVectors(L[A.b],g),C),Or.addScaledVector(Pr.subVectors(L[A.c],m),C)}}Lr.add(f),Ir.add(g),Or.add(m),f=Lr,g=Ir,m=Or}if(i=Kr(this,x,e,Nr,f,g,m,Fr)){if(v&&v[b]){var I=v[b];Rr.copy(I[0]),zr.copy(I[1]),Ur.copy(I[2]),i.uv=$r(Fr,f,g,m,Rr,zr,Ur)}i.face=A,i.faceIndex=b,t.push(i)}}}}}),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),((ha.prototype=Object.create(Ei.prototype)).constructor=ha).prototype.isCubeTexture=!0,Object.defineProperty(ha.prototype,"images",{get:function(){return this.image},set:function(e){this.image=e}});var da=new Ei,pa=new ha;function fa(){this.seq=[],this.map={}}var ga=[],ma=[],va=new Float32Array(16),ya=new Float32Array(9),_a=new Float32Array(4);function Ma(e,t,i){var n=e[0];if(n<=0||0<n)return e;var r=t*i,a=ga[r];if(void 0===a&&(a=new Float32Array(r),ga[r]=a),0!==t){n.toArray(a,0);for(var s=1,o=0;s!==t;++s)o+=i,e[s].toArray(a,o)}return a}function wa(e,t){if(e.length!==t.length)return!1;for(var i=0,n=e.length;i<n;i++)if(e[i]!==t[i])return!1;return!0}function ba(e,t){for(var i=0,n=t.length;i<n;i++)e[i]=t[i]}function Ta(e,t){var i=ma[t];void 0===i&&(i=new Int32Array(t),ma[t]=i);for(var n=0;n!==t;++n)i[n]=e.allocTextureUnit();return i}function Aa(e,t){var i=this.cache;i[0]!==t&&(e.uniform1f(this.addr,t),i[0]=t)}function xa(e,t){var i=this.cache;i[0]!==t&&(e.uniform1i(this.addr,t),i[0]=t)}function Ea(e,t){var i=this.cache;if(void 0!==t.x)i[0]===t.x&&i[1]===t.y||(e.uniform2f(this.addr,t.x,t.y),i[0]=t.x,i[1]=t.y);else{if(wa(i,t))return;e.uniform2fv(this.addr,t),ba(i,t)}}function Sa(e,t){var i=this.cache;if(void 0!==t.x)i[0]===t.x&&i[1]===t.y&&i[2]===t.z||(e.uniform3f(this.addr,t.x,t.y,t.z),i[0]=t.x,i[1]=t.y,i[2]=t.z);else if(void 0!==t.r)i[0]===t.r&&i[1]===t.g&&i[2]===t.b||(e.uniform3f(this.addr,t.r,t.g,t.b),i[0]=t.r,i[1]=t.g,i[2]=t.b);else{if(wa(i,t))return;e.uniform3fv(this.addr,t),ba(i,t)}}function Da(e,t){var i=this.cache;if(void 0!==t.x)i[0]===t.x&&i[1]===t.y&&i[2]===t.z&&i[3]===t.w||(e.uniform4f(this.addr,t.x,t.y,t.z,t.w),i[0]=t.x,i[1]=t.y,i[2]=t.z,i[3]=t.w);else{if(wa(i,t))return;e.uniform4fv(this.addr,t),ba(i,t)}}function Na(e,t){var i=this.cache,n=t.elements;if(void 0===n){if(wa(i,t))return;e.uniformMatrix2fv(this.addr,!1,t),ba(i,t)}else{if(wa(i,n))return;_a.set(n),e.uniformMatrix2fv(this.addr,!1,_a),ba(i,n)}}function Ca(e,t){var i=this.cache,n=t.elements;if(void 0===n){if(wa(i,t))return;e.uniformMatrix3fv(this.addr,!1,t),ba(i,t)}else{if(wa(i,n))return;ya.set(n),e.uniformMatrix3fv(this.addr,!1,ya),ba(i,n)}}function La(e,t){var i=this.cache,n=t.elements;if(void 0===n){if(wa(i,t))return;e.uniformMatrix4fv(this.addr,!1,t),ba(i,t)}else{if(wa(i,n))return;va.set(n),e.uniformMatrix4fv(this.addr,!1,va),ba(i,n)}}function Ia(e,t,i){var n=this.cache,r=i.allocTextureUnit();n[0]!==r&&(e.uniform1i(this.addr,r),n[0]=r),i.setTexture2D(t||da,r)}function Oa(e,t,i){var n=this.cache,r=i.allocTextureUnit();n[0]!==r&&(e.uniform1i(this.addr,r),n[0]=r),i.setTextureCube(t||pa,r)}function ja(e,t){var i=this.cache;wa(i,t)||(e.uniform2iv(this.addr,t),ba(i,t))}function ka(e,t){var i=this.cache;wa(i,t)||(e.uniform3iv(this.addr,t),ba(i,t))}function Pa(e,t){var i=this.cache;wa(i,t)||(e.uniform4iv(this.addr,t),ba(i,t))}function Ra(e,t){var i=this.cache;wa(i,t)||(e.uniform1fv(this.addr,t),ba(i,t))}function za(e,t){var i=this.cache;wa(i,t)||(e.uniform1iv(this.addr,t),ba(i,t))}function Ua(e,t){var i=this.cache,n=Ma(t,this.size,2);wa(i,n)||(e.uniform2fv(this.addr,n),this.updateCache(n))}function Ba(e,t){var i=this.cache,n=Ma(t,this.size,3);wa(i,n)||(e.uniform3fv(this.addr,n),this.updateCache(n))}function Fa(e,t){var i=this.cache,n=Ma(t,this.size,4);wa(i,n)||(e.uniform4fv(this.addr,n),this.updateCache(n))}function Ga(e,t){var i=this.cache,n=Ma(t,this.size,4);wa(i,n)||(e.uniformMatrix2fv(this.addr,!1,n),this.updateCache(n))}function Ha(e,t){var i=this.cache,n=Ma(t,this.size,9);
1wa(i,n)||(e.uniformMatrix3fv(this.addr,!1,n),this.updateCache(n))}function Ya(e,t){var i=this.cache,n=Ma(t,this.size,16);wa(i,n)||(e.uniformMatrix4fv(this.addr,!1,n),this.updateCache(n))}function Qa(e,t,i){var n=this.cache,r=t.length,a=Ta(i,r);!1===wa(n,a)&&(e.uniform1iv(this.addr,a),ba(n,a));for(var s=0;s!==r;++s)i.setTexture2D(t[s]||da,a[s])}function Va(e,t,i){var n=this.cache,r=t.length,a=Ta(i,r);!1===wa(n,a)&&(e.uniform1iv(this.addr,a),ba(n,a));for(var s=0;s!==r;++s)i.setTextureCube(t[s]||pa,a[s])}function Wa(e,t,i){this.id=e,this.addr=i,this.cache=[],this.setValue=function(e){switch(e){case 5126:return Aa;case 35664:return Ea;case 35665:return Sa;case 35666:return Da;case 35674:return Na;case 35675:return Ca;case 35676:return La;case 35678:case 36198:return Ia;case 35680:return Oa;case 5124:case 35670:return xa;case 35667:case 35671:return ja;case 35668:case 35672:return ka;case 35669:case 35673:return Pa}}(t.type)}function qa(e,t,i){this.id=e,this.addr=i,this.cache=[],this.size=t.size,this.setValue=function(e){switch(e){case 5126:return Ra;case 35664:return Ua;case 35665:return Ba;case 35666:return Fa;case 35674:return Ga;case 35675:return Ha;case 35676:return Ya;case 35678:return Qa;case 35680:return Va;case 5124:case 35670:return za;case 35667:case 35671:return ja;case 35668:case 35672:return ka;case 35669:case 35673:return Pa}}(t.type)}function Xa(e){this.id=e,fa.call(this)}qa.prototype.updateCache=function(e){var t=this.cache;e instanceof Float32Array&&t.length!==e.length&&(this.cache=new Float32Array(e.length)),ba(t,e)},Xa.prototype.setValue=function(e,t){for(var i=this.seq,n=0,r=i.length;n!==r;++n){var a=i[n];a.setValue(e,t[a.id])}};var Za=/([\w\d_]+)(\])?(\[|\.)?/g;function $a(e,t){e.seq.push(t),e.map[t.id]=t}function Ka(e,t,i){var n=e.name,r=n.length;for(Za.lastIndex=0;;){var a=Za.exec(n),s=Za.lastIndex,o=a[1],l="]"===a[2],u=a[3];if(l&&(o|=0),void 0===u||"["===u&&s+2===r){$a(i,new(void 0===u?Wa:qa)(o,e,t));break}var c=i.map[o];void 0===c&&$a(i,c=new Xa(o)),i=c}}function Ja(e,t,i){fa.call(this),this.renderer=i;for(var n=e.getProgramParameter(t,e.ACTIVE_UNIFORMS),r=0;r<n;++r){var a=e.getActiveUniform(t,r);Ka(a,e.getUniformLocation(t,a.name),this)}}function es(e,t,i){var n=e.createShader(t);return e.shaderSource(n,i),e.compileShader(n),!1===e.getShaderParameter(n,e.COMPILE_STATUS)&&console.error("THREE.WebGLShader: Shader couldn't compile."),""!==e.getShaderInfoLog(n)&&console.warn("THREE.WebGLShader: gl.getShaderInfoLog()",t===e.VERTEX_SHADER?"vertex":"fragment",e.getShaderInfoLog(n),function(e){for(var t=e.split("\n"),i=0;i<t.length;i++)t[i]=i+1+": "+t[i];return t.join("\n")}(i)),n}Ja.prototype.setValue=function(e,t,i){var n=this.map[t];void 0!==n&&n.setValue(e,i,this.renderer)},Ja.prototype.setOptional=function(e,t,i){var n=t[i];void 0!==n&&this.setValue(e,i,n)},Ja.upload=function(e,t,i,n){for(var r=0,a=t.length;r!==a;++r){var s=t[r],o=i[s.id];!1!==o.needsUpdate&&s.setValue(e,o.value,n)}},Ja.seqWithValue=function(e,t){for(var i=[],n=0,r=e.length;n!==r;++n){var a=e[n];a.id in t&&i.push(a)}return i};var ts=0;function is(e){switch(e){case jt:return["Linear","( value )"];case kt:return["sRGB","( value )"];case Rt:return["RGBE","( value )"];case zt:return["RGBM","( value, 7.0 )"];case Ut:return["RGBM","( value, 16.0 )"];case Bt:return["RGBD","( value, 256.0 )"];case Pt:return["Gamma","( value, float( GAMMA_FACTOR ) )"];default:throw new Error("unsupported encoding: "+e)}}function ns(e,t){var i=is(t);return"vec4 "+e+"( vec4 value ) { return "+i[0]+"ToLinear"+i[1]+"; }"}function rs(e){return""!==e}function as(e,t){return e.replace(/NUM_DIR_LIGHTS/g,t.numDirLights).replace(/NUM_SPOT_LIGHTS/g,t.numSpotLights).replace(/NUM_RECT_AREA_LIGHTS/g,t.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,t.numPointLights).replace(/NUM_HEMI_LIGHTS/g,t.numHemiLights)}function ss(e,t){return e.replace(/NUM_CLIPPING_PLANES/g,t.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,t.numClippingPlanes-t.numClipIntersection)}function os(e){return e.replace(/^[ \t]*#include +<([\w\d.]+)>/gm,function(e,t){var i=zi[t];if(void 0===i)throw new Error("Can not resolve #include <"+t+">");return os(i)})}function ls(e){return e.replace(/#pragma unroll_loop[\s]+?for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}/g,function(e,t,i,n){for(var r="",a=parseInt(t);a<parseInt(i);a++)r+=n.replace(/\[ i \]/g,"[ "+a+" ]");return r})}function us(e,t,i,n,r,a){var s=e.context,o=n.defines,l=r.vertexShader,u=r.fragmentShader,c="SHADOWMAP_TYPE_BASIC";a.shadowMapType===R?c="SHADOWMAP_TYPE_PCF":a.shadowMapType===z&&(c="SHADOWMAP_TYPE_PCF_SOFT");var h="ENVMAP_TYPE_CUBE",d="ENVMAP_MODE_REFLECTION",p="ENVMAP_BLENDING_MULTIPLY";if(a.envMap){switch(n.envMap.mapping){case Ne:case Ce:h="ENVMAP_TYPE_CUBE";break;case je:case ke:h="ENVMAP_TYPE_CUBE_UV";break;case Le:case Ie:h="ENVMAP_TYPE_EQUIREC";break;case Oe:h="ENVMAP_TYPE_SPHERE"}switch(n.envMap.mapping){case Ce:case Ie:d="ENVMAP_MODE_REFRACTION"}switch(n.combine){case _e:p="ENVMAP_BLENDING_MULTIPLY";break;case Me:p="ENVMAP_BLENDING_MIX";break;case we:p="ENVMAP_BLENDING_ADD"}}var f,g,m,v,y,_,M,w,b=0<e.gammaFactor?e.gammaFactor:1,T=(f=n.extensions,g=a,m=t,[(f=f||{}).derivatives||g.envMapCubeUV||g.bumpMap||g.normalMap||g.flatShading?"#extension GL_OES_standard_derivatives : enable":"",(f.fragDepth||g.logarithmicDepthBuffer)&&m.get("EXT_frag_depth")?"#extension GL_EXT_frag_depth : enable":"",f.drawBuffers&&m.get("WEBGL_draw_buffers")?"#extension GL_EXT_draw_buffers : require":"",(f.shaderTextureLOD||g.envMap)&&m.get("EXT_shader_texture_lod")?"#extension GL_EXT_shader_texture_lod : enable":""].filter(rs).join("\n")),A=function(e){var t=[];for(var i in e){var n=e[i];!1!==n&&t.push("#define "+i+" "+n)}return t.join("\n")}(o),x=s.createProgram();n.isRawShaderMaterial?(0<(v=[A].filter(rs).join("\n")).length&&(v+="\n"),0<(y=[T,A].filter(rs).join("\n")).length&&(y+="\n")):(v=["precision "+a.precision+" float;","precision "+a.precision+" int;","#define SHADER_NAME "+r.name,A,a.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define GAMMA_FACTOR "+b,"#define MAX_BONES "+a.maxBones,a.useFog&&a.fog?"#define USE_FOG":"",a.useFog&&a.fogExp?"#define FOG_EXP2":"",a.map?"#define USE_MAP":"",a.envMap?"#define USE_ENVMAP":"",a.envMap?"#define "+d:"",a.lightMap?"#define USE_LIGHTMAP":"",a.aoMap?"#define USE_AOMAP":"",a.emissiveMap?"#define USE_EMISSIVEMAP":"",a.bumpMap?"#define USE_BUMPMAP":"",a.normalMap?"#define USE_NORMALMAP":"",a.displacementMap&&a.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",a.specularMap?"#define USE_SPECULARMAP":"",a.roughnessMap?"#define USE_ROUGHNESSMAP":"",a.metalnessMap?"#define USE_METALNESSMAP":"",a.alphaMap?"#define USE_ALPHAMAP":"",a.vertexColors?"#define USE_COLOR":"",a.flatShading?"#define FLAT_SHADED":"",a.skinning?"#define USE_SKINNING":"",a.useVertexTexture?"#define BONE_TEXTURE":"",a.morphTargets?"#define USE_MORPHTARGETS":"",a.morphNormals&&!1===a.flatShading?"#define USE_MORPHNORMALS":"",a.doubleSided?"#define DOUBLE_SIDED":"",a.flipSided?"#define FLIP_SIDED":"",a.shadowMapEnabled?"#define USE_SHADOWMAP":"",a.shadowMapEnabled?"#define "+c:"",a.sizeAttenuation?"#define USE_SIZEATTENUATION":"",a.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",a.logarithmicDepthBuffer&&t.get("EXT_frag_depth")?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_COLOR","\tattribute vec3 color;","#endif","#ifdef USE_MORPHTARGETS","\tattribute vec3 morphTarget0;","\tattribute vec3 morphTarget1;","\tattribute vec3 morphTarget2;","\tattribute vec3 morphTarget3;","\t#ifdef USE_MORPHNORMALS","\t\tattribute vec3 morphNormal0;","\t\tattribute vec3 morphNormal1;","\t\tattribute vec3 morphNormal2;","\t\tattribute vec3 morphNormal3;","\t#else","\t\tattribute vec3 morphTarget4;","\t\tattribute vec3 morphTarget5;","\t\tattribute vec3 morphTarget6;","\t\tattribute vec3 morphTarget7;","\t#endif","#endif","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(rs).join("\n"),y=[T,"precision "+a.precision+" float;","precision "+a.precision+" int;","#define SHADER_NAME "+r.name,A,a.alphaTest?"#define ALPHATEST "+a.alph
vendor: 6,523 bytes, line 1
1aTest+(a.alphaTest%1?"":".0"):"","#define GAMMA_FACTOR "+b,a.useFog&&a.fog?"#define USE_FOG":"",a.useFog&&a.fogExp?"#define FOG_EXP2":"",a.map?"#define USE_MAP":"",a.envMap?"#define USE_ENVMAP":"",a.envMap?"#define "+h:"",a.envMap?"#define "+d:"",a.envMap?"#define "+p:"",a.lightMap?"#define USE_LIGHTMAP":"",a.aoMap?"#define USE_AOMAP":"",a.emissiveMap?"#define USE_EMISSIVEMAP":"",a.bumpMap?"#define USE_BUMPMAP":"",a.normalMap?"#define USE_NORMALMAP":"",a.specularMap?"#define USE_SPECULARMAP":"",a.roughnessMap?"#define USE_ROUGHNESSMAP":"",a.metalnessMap?"#define USE_METALNESSMAP":"",a.alphaMap?"#define USE_ALPHAMAP":"",a.vertexColors?"#define USE_COLOR":"",a.gradientMap?"#define USE_GRADIENTMAP":"",a.flatShading?"#define FLAT_SHADED":"",a.doubleSided?"#define DOUBLE_SIDED":"",a.flipSided?"#define FLIP_SIDED":"",a.shadowMapEnabled?"#define USE_SHADOWMAP":"",a.shadowMapEnabled?"#define "+c:"",a.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",a.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",a.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",a.logarithmicDepthBuffer&&t.get("EXT_frag_depth")?"#define USE_LOGDEPTHBUF_EXT":"",a.envMap&&t.get("EXT_shader_texture_lod")?"#define TEXTURE_LOD_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;",a.toneMapping!==be?"#define TONE_MAPPING":"",a.toneMapping!==be?zi.tonemapping_pars_fragment:"",a.toneMapping!==be?function(e,t){var i;switch(t){case xe:i="Linear";break;case Ee:i="Reinhard";break;case Se:i="Uncharted2";break;case De:i="OptimizedCineon";break;default:throw new Error("unsupported toneMapping: "+t)}return"vec3 "+e+"( vec3 color ) { return "+i+"ToneMapping( color ); }"}("toneMapping",a.toneMapping):"",a.dithering?"#define DITHERING":"",a.outputEncoding||a.mapEncoding||a.envMapEncoding||a.emissiveMapEncoding?zi.encodings_pars_fragment:"",a.mapEncoding?ns("mapTexelToLinear",a.mapEncoding):"",a.envMapEncoding?ns("envMapTexelToLinear",a.envMapEncoding):"",a.emissiveMapEncoding?ns("emissiveMapTexelToLinear",a.emissiveMapEncoding):"",a.outputEncoding?(_="linearToOutputTexel",M=a.outputEncoding,w=is(M),"vec4 "+_+"( vec4 value ) { return LinearTo"+w[0]+w[1]+"; }"):"",a.depthPacking?"#define DEPTH_PACKING "+n.depthPacking:"","\n"].filter(rs).join("\n")),l=ss(l=as(l=os(l),a),a),u=ss(u=as(u=os(u),a),a);var E=v+(l=ls(l)),S=y+(u=ls(u)),D=es(s,s.VERTEX_SHADER,E),N=es(s,s.FRAGMENT_SHADER,S);s.attachShader(x,D),s.attachShader(x,N),void 0!==n.index0AttributeName?s.bindAttribLocation(x,0,n.index0AttributeName):!0===a.morphTargets&&s.bindAttribLocation(x,0,"position"),s.linkProgram(x);var C,L,I=s.getProgramInfoLog(x).trim(),O=s.getShaderInfoLog(D).trim(),j=s.getShaderInfoLog(N).trim(),k=!0,P=!0;return!1===s.getProgramParameter(x,s.LINK_STATUS)?(k=!1,console.error("THREE.WebGLProgram: shader error: ",s.getError(),"gl.VALIDATE_STATUS",s.getProgramParameter(x,s.VALIDATE_STATUS),"gl.getProgramInfoLog",I,O,j)):""!==I?console.warn("THREE.WebGLProgram: gl.getProgramInfoLog()",I):""!==O&&""!==j||(P=!1),P&&(this.diagnostics={runnable:k,material:n,programLog:I,vertexShader:{log:O,prefix:v},fragmentShader:{log:j,prefix:y}}),s.deleteShader(D),s.deleteShader(N),this.getUniforms=function(){return void 0===C&&(C=new Ja(s,x,e)),C},this.getAttributes=function(){return void 0===L&&(L=function(e,t){for(var i={},n=e.getProgramParameter(t,e.ACTIVE_ATTRIBUTES),r=0;r<n;r++){var a=e.getActiveAttrib(t,r).name;i[a]=e.getAttribLocation(t,a)}return i}(s,x)),L},this.destroy=function(){s.deleteProgram(x),this.program=void 0},Object.defineProperties(this,{uniforms:{get:function(){return console.warn("THREE.WebGLProgram: .uniforms is now .getUniforms()."),this.getUniforms()}},attributes:{get:function(){return console.warn("THREE.WebGLProgram: .attributes is now .getAttributes()."),this.getAttributes()}}}),this.name=r.name,this.id=ts++,this.code=i,this.usedTimes=1,this.program=x,this.vertexShader=D,this.fragmentShader=N,this}function cs(h,l,d){var u=[],p={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"phong",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow"},a=["precision","supportsVertexTextures","map","mapEncoding","envMap","envMapMode","envMapEncoding","lightMap","aoMap","emissiveMap","emissiveMapEncoding","bumpMap","normalMap","displacementMap","specularMap","roughnessMap","metalnessMap","gradientMap","alphaMap","combine","vertexColors","fog","useFog","fogExp","flatShading","sizeAttenuation","logarithmicDepthBuffer","skinning","maxBones","useVertexTexture","morphTargets","morphNormals","maxMorphTargets","maxMorphNormals","premultipliedAlpha","numDirLights","numPointLights","numSpotLights","numHemiLights","numRectAreaLights","shadowMapEnabled","shadowMapType","toneMapping","physicallyCorrectLights","alphaTest","doubleSided","flipSided","numClippingPlanes","numClipIntersection","depthPacking","dithering"];function f(e,t){var i;return e?e.isTexture?i=e.encoding:e.isWebGLRenderTarget&&(console.warn("THREE.WebGLPrograms.getTextureEncodingFromMap: don't use render targets as textures. Use their .texture property instead."),i=e.texture.encoding):i=jt,i===jt&&t&&(i=Pt),i}this.getParameters=function(e,t,i,n,r,a,s){var o=p[e.type],l=s.isSkinnedMesh?function(e){var t=e.skeleton.bones;if(d.floatVertexTextures)return 1024;var i=d.maxVertexUniforms,n=Math.floor((i-20)/4),r=Math.min(n,t.length);return r<t.length?(console.warn("THREE.WebGLRenderer: Skeleton has "+t.length+" bones. This GPU supports "+r+"."),0):r}(s):0,u=d.precision;null!==e.precision&&(u=d.getMaxPrecision(e.precision))!==e.precision&&console.warn("THREE.WebGLProgram.getParameters:",e.precision,"not supported, using",u,"instead.");var c=h.getRenderTarget();return{shaderID:o,precision:u,supportsVertexTextures:d.vertexTextures,outputEncoding:f(c?c.texture:null,h.gammaOutput),map:!!e.map,mapEncoding:f(e.map,h.gammaInput),envMap:!!e.envMap,envMapMode:e.envMap&&e.envMap.mapping,envMapEncoding:f(e.envMap,h.gammaInput),envMapCubeUV:!!e.envMap&&(e.envMap.mapping===je||e.envMap.mapping===ke),lightMap:!!e.lightMap,aoMap:!!e.aoMap,emissiveMap:!!e.emissiveMap,emissiveMapEncoding:f(e.emissiveMap,h.gammaInput),bumpMap:!!e.bumpMap,normalMap:!!e.normalMap,displacementMap:!!e.displacementMap,roughnessMap:!!e.roughnessMap,metalnessMap:!!e.metalnessMap,specularMap:!!e.specularMap,alph
vendor: 8,144 bytes, line 1
1aMap:!!e.alphaMap,gradientMap:!!e.gradientMap,combine:e.combine,vertexColors:e.vertexColors,fog:!!n,useFog:e.fog,fogExp:n&&n.isFogExp2,flatShading:e.flatShading,sizeAttenuation:e.sizeAttenuation,logarithmicDepthBuffer:d.logarithmicDepthBuffer,skinning:e.skinning&&0<l,maxBones:l,useVertexTexture:d.floatVertexTextures,morphTargets:e.morphTargets,morphNormals:e.morphNormals,maxMorphTargets:h.maxMorphTargets,maxMorphNormals:h.maxMorphNormals,numDirLights:t.directional.length,numPointLights:t.point.length,numSpotLights:t.spot.length,numRectAreaLights:t.rectArea.length,numHemiLights:t.hemi.length,numClippingPlanes:r,numClipIntersection:a,dithering:e.dithering,shadowMapEnabled:h.shadowMap.enabled&&s.receiveShadow&&0<i.length,shadowMapType:h.shadowMap.type,toneMapping:h.toneMapping,physicallyCorrectLights:h.physicallyCorrectLights,premultipliedAlpha:e.premultipliedAlpha,alphaTest:e.alphaTest,doubleSided:e.side===Z,flipSided:e.side===Te,depthPacking:void 0!==e.depthPacking&&e.depthPacking}},this.getProgramCode=function(e,t){var i=[];if(t.shaderID?i.push(t.shaderID):(i.push(e.fragmentShader),i.push(e.vertexShader)),void 0!==e.defines)for(var n in e.defines)i.push(n),i.push(e.defines[n]);for(var r=0;r<a.length;r++)i.push(t[a[r]]);return i.push(e.onBeforeCompile.toString()),i.push(h.gammaOutput),i.join()},this.acquireProgram=function(e,t,i,n){for(var r,a=0,s=u.length;a<s;a++){var o=u[a];if(o.code===n){++(r=o).usedTimes;break}}return void 0===r&&(r=new us(h,l,n,e,t,i),u.push(r)),r},this.releaseProgram=function(e){if(0==--e.usedTimes){var t=u.indexOf(e);u[t]=u[u.length-1],u.pop(),e.destroy()}},this.programs=u}function hs(){var n=new WeakMap;return{get:function(e){var t=n.get(e);return void 0===t&&(t={},n.set(e,t)),t},remove:function(e){n.delete(e)},update:function(e,t,i){n.get(e)[t]=i},dispose:function(){n=new WeakMap}}}function ds(e,t){return e.renderOrder!==t.renderOrder?e.renderOrder-t.renderOrder:e.program&&t.program&&e.program!==t.program?e.program.id-t.program.id:e.material.id!==t.material.id?e.material.id-t.material.id:e.z!==t.z?e.z-t.z:e.id-t.id}function ps(e,t){return e.renderOrder!==t.renderOrder?e.renderOrder-t.renderOrder:e.z!==t.z?t.z-e.z:e.id-t.id}function fs(){var s=[],o=0,l=[],u=[];return{opaque:l,transparent:u,init:function(){o=0,l.length=0,u.length=0},push:function(e,t,i,n,r){var a=s[o];void 0===a?(a={id:e.id,object:e,geometry:t,material:i,program:i.program,renderOrder:e.renderOrder,z:n,group:r},s[o]=a):(a.id=e.id,a.object=e,a.geometry=t,a.material=i,a.program=i.program,a.renderOrder=e.renderOrder,a.z=n,a.group=r),(!0===i.transparent?u:l).push(a),o++},sort:function(){1<l.length&&l.sort(ds),1<u.length&&u.sort(ps)}}}function gs(){var r={};return{get:function(e,t){var i=e.id+","+t.id,n=r[i];return void 0===n&&(n=new fs,r[i]=n),n},dispose:function(){r={}}}}function ms(){var i={};return{get:function(e){if(void 0!==i[e.id])return i[e.id];var t;switch(e.type){case"DirectionalLight":t={direction:new Wt,color:new Fi,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new Yt};break;case"SpotLight":t={position:new Wt,direction:new Wt,color:new Fi,distance:0,coneCos:0,penumbraCos:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new Yt};break;case"PointLight":t={position:new Wt,color:new Fi,distance:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new Yt,shadowCameraNear:1,shadowCameraFar:1e3};break;case"HemisphereLight":t={direction:new Wt,skyColor:new Fi,groundColor:new Fi};break;case"RectAreaLight":t={color:new Fi,position:new Wt,halfWidth:new Wt,halfHeight:new Wt}}return i[e.id]=t}}}var vs,ys,_s,Ms,ws,bs,Ts,As,xs,Es,Ss,Ds,Ns,Cs,Ls,Is,Os,js,ks=0;function Ps(){var w=new ms,b={id:ks++,hash:"",ambient:[0,0,0],directional:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadowMap:[],spotShadowMatrix:[],rectArea:[],point:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[]},T=new Wt,A=new Qt,x=new Qt;return{setup:function(e,t,i){for(var n=0,r=0,a=0,s=0,o=0,l=0,u=0,c=0,h=i.matrixWorldInverse,d=0,p=e.length;d<p;d++){var f=e[d],g=f.color,m=f.intensity,v=f.distance,y=f.shadow&&f.shadow.map?f.shadow.map.texture:null;if(f.isAmbientLight)n+=g.r*m,r+=g.g*m,a+=g.b*m;else if(f.isDirectionalLight){if((M=w.get(f)).color.copy(f.color).multiplyScalar(f.intensity),M.direction.setFromMatrixPosition(f.matrixWorld),T.setFromMatrixPosition(f.target.matrixWorld),M.direction.sub(T),M.direction.transformDirection(h),M.shadow=f.castShadow,f.castShadow){var _=f.shadow;M.shadowBias=_.bias,M.shadowRadius=_.radius,M.shadowMapSize=_.mapSize}b.directionalShadowMap[s]=y,b.directionalShadowMatrix[s]=f.shadow.matrix,b.directional[s]=M,s++}else if(f.isSpotLight){if((M=w.get(f)).position.setFromMatrixPosition(f.matrixWorld),M.position.applyMatrix4(h),M.color.copy(g).multiplyScalar(m),M.distance=v,M.direction.setFromMatrixPosition(f.matrixWorld),T.setFromMatrixPosition(f.target.matrixWorld),M.direction.sub(T),M.direction.transformDirection(h),M.coneCos=Math.cos(f.angle),M.penumbraCos=Math.cos(f.angle*(1-f.penumbra)),M.decay=0===f.distance?0:f.decay,M.shadow=f.castShadow,f.castShadow){_=f.shadow;M.shadowBias=_.bias,M.shadowRadius=_.radius,M.shadowMapSize=_.mapSize}b.spotShadowMap[l]=y,b.spotShadowMatrix[l]=f.shadow.matrix,b.spot[l]=M,l++}else if(f.isRectAreaLight){(M=w.get(f)).color.copy(g).multiplyScalar(m),M.position.setFromMatrixPosition(f.matrixWorld),M.position.applyMatrix4(h),x.identity(),A.copy(f.matrixWorld),A.premultiply(h),x.extractRotation(A),M.halfWidth.set(.5*f.width,0,0),M.halfHeight.set(0,.5*f.height,0),M.halfWidth.applyMatrix4(x),M.halfHeight.applyMatrix4(x),b.rectArea[u]=M,u++}else if(f.isPointLight){if((M=w.get(f)).position.setFromMatrixPosition(f.matrixWorld),M.position.applyMatrix4(h),M.color.copy(f.color).multiplyScalar(f.intensity),M.distance=f.distance,M.decay=0===f.distance?0:f.decay,M.shadow=f.castShadow,f.castShadow){_=f.shadow;M.shadowBias=_.bias,M.shadowRadius=_.radius,M.shadowMapSize=_.mapSize,M.shadowCameraNear=_.camera.near,M.shadowCameraFar=_.camera.far}b.pointShadowMap[o]=y,b.pointShadowMatrix[o]=f.shadow.matrix,b.point[o]=M,o++}else if(f.isHemisphereLight){var M;(M=w.get(f)).direction.setFromMatrixPosition(f.matrixWorld),M.direction.transformDirection(h),M.direction.normalize(),M.skyColor.copy(f.color).multiplyScalar(m),M.groundColor.copy(f.groundColor).multiplyScalar(m),b.hemi[c]=M,c++}}b.ambient[0]=n,b.ambient[1]=r,b.ambient[2]=a,b.directional.length=s,b.spot.length=l,b.rectArea.length=u,b.point.length=o,b.hemi.length=c,b.hash=b.id+","+s+","+o+","+l+","+u+","+c+","+t.length},state:b}}function Rs(){var t=new Ps,i=[],n=[],r=[];return{init:function(){i.length=0,n.length=0,r.length=0},state:{lightsArray:i,shadowsArray:n,spritesArray:r,lights:t},setupLights:function(e){t.setup(i,n,e)},pushLight:function(e){i.push(e)},pushShadow:function(e){n.push(e)},pushSprite:function(e){r.push(e)}}}function zs(){var r={};return{get:function(e,t){var i=e.id+","+t.id,n=r[i];return void 0===n&&(n=new Rs,r[i]=n),n},dispose:function(){r={}}}}function Us(e){Yr.call(this),this.type="MeshDepthMaterial",this.depthPacking=Ft,this.skinning=!1,this.morphTargets=!1,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.setValues(e)}function Bs(e){Yr.call(this),this.type="MeshDistanceMaterial",this.referencePosition=new Wt,this.nearDistance=1,this.farDistance=1e3,this.skinning=!1,this.morphTargets=!1,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.fog=!1,this.lights=!1,this.setValues(e)}function Fs(_,g,e){for(var M=new Pi,w=new Qt,b=new Yt,T=new Yt(e,e),A=new Wt,x=new Wt,v=1,y=2,t=1+(v|y),E=new Array(t),S=new Array(t),D={},N={0:Te,1:k,2:Z},C=[new Wt(1,0,0),new Wt(-1,0,0),new Wt(0,0,1),new Wt(0,0,-1),new Wt(0,1,0),new Wt(0,-1,0)],L=[new Wt(0,1,0),new Wt(0,1,0),new Wt(0,1,0),new Wt(0,1,0),new Wt(0,0,1),new Wt(0,0,-1)],I=[new Si,new Si,new Si,new Si,new Si,new Si],i=0;i!==t;++i){var n=0!=(i&v),r=0!=(i&y),a=new Us({depthPacking:Gt,morphTargets:n,skinning:r});E[i]=a;var s=new Bs({morphTargets:n,skinning:r});
1S[i]=s}var O=this;function m(e,t,i,n,r,a){var s=e.geometry,o=null,l=E,u=e.customDepthMaterial;if(i&&(l=S,u=e.customDistanceMaterial),u)o=u;else{var c=!1;t.morphTargets&&(s&&s.isBufferGeometry?c=s.morphAttributes&&s.morphAttributes.position&&0<s.morphAttributes.position.length:s&&s.isGeometry&&(c=s.morphTargets&&0<s.morphTargets.length)),e.isSkinnedMesh&&!1===t.skinning&&console.warn("THREE.WebGLShadowMap: THREE.SkinnedMesh with material.skinning set to false:",e);var h=e.isSkinnedMesh&&t.skinning,d=0;c&&(d|=v),h&&(d|=y),o=l[d]}if(_.localClippingEnabled&&!0===t.clipShadows&&0!==t.clippingPlanes.length){var p=o.uuid,f=t.uuid,g=D[p];void 0===g&&(g={},D[p]=g);var m=g[f];void 0===m&&(m=o.clone(),g[f]=m),o=m}return o.visible=t.visible,o.wireframe=t.wireframe,o.side=null!=t.shadowSide?t.shadowSide:N[t.side],o.clipShadows=t.clipShadows,o.clippingPlanes=t.clippingPlanes,o.clipIntersection=t.clipIntersection,o.wireframeLinewidth=t.wireframeLinewidth,o.linewidth=t.linewidth,i&&o.isMeshDistanceMaterial&&(o.referencePosition.copy(n),o.nearDistance=r,o.farDistance=a),o}function j(e,t,i,n){if(!1!==e.visible){if(e.layers.test(t.layers)&&(e.isMesh||e.isLine||e.isPoints)&&e.castShadow&&(!e.frustumCulled||M.intersectsObject(e))){e.modelViewMatrix.multiplyMatrices(i.matrixWorldInverse,e.matrixWorld);var r=g.update(e),a=e.material;if(Array.isArray(a))for(var s=r.groups,o=0,l=s.length;o<l;o++){var u=s[o],c=a[u.materialIndex];if(c&&c.visible){var h=m(e,c,n,x,i.near,i.far);_.renderBufferDirect(i,null,r,h,e,u)}}else if(a.visible){h=m(e,a,n,x,i.near,i.far);_.renderBufferDirect(i,null,r,h,e,null)}}for(var d=e.children,p=0,f=d.length;p<f;p++)j(d[p],t,i,n)}}this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=R,this.render=function(e,t,i){if(!1!==O.enabled&&(!1!==O.autoUpdate||!1!==O.needsUpdate)&&0!==e.length){var n,r=_.context,a=_.state;a.disable(r.BLEND),a.buffers.color.setClear(1,1,1,1),a.buffers.depth.setTest(!0),a.setScissorTest(!1);for(var s=0,o=e.length;s<o;s++){var l=e[s],u=l.shadow,c=l&&l.isPointLight;if(void 0!==u){var h=u.camera;if(b.copy(u.mapSize),b.min(T),c){var d=b.x,p=b.y;I[0].set(2*d,p,d,p),I[1].set(0,p,d,p),I[2].set(3*d,p,d,p),I[3].set(d,p,d,p),I[4].set(3*d,0,d,p),I[5].set(d,0,d,p),b.x*=4,b.y*=2}if(null===u.map){var f={minFilter:Ue,magFilter:Ue,format:at};u.map=new Di(b.x,b.y,f),u.map.texture.name=l.name+".shadowMap",h.updateProjectionMatrix()}u.isSpotLightShadow&&u.update(l);var g=u.map,m=u.matrix;x.setFromMatrixPosition(l.matrixWorld),h.position.copy(x),c?(n=6,m.makeTranslation(-x.x,-x.y,-x.z)):(n=1,A.setFromMatrixPosition(l.target.matrixWorld),h.lookAt(A),h.updateMatrixWorld(),m.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),m.multiply(h.projectionMatrix),m.multiply(h.matrixWorldInverse)),_.setRenderTarget(g),_.clear();for(var v=0;v<n;v++){if(c){A.copy(h.position),A.add(C[v]),h.up.copy(L[v]),h.lookAt(A),h.updateMatrixWorld();var y=I[v];a.viewport(y)}w.multiplyMatrices(h.projectionMatrix,h.matrixWorldInverse),M.setFromMatrix(w),j(t,i,h,c)}}else console.warn("THREE.WebGLShadowMap:",l,"has no shadow.")}O.needsUpdate=!1}}}function Gs(e,t,i,n,r,a,s,o,l){Ei.call(this,e,t,i,n,r,a,s,o,l),this.needsUpdate=!0}function Hs(p,f,g,m,o){var v,y,_,M,w,b,T=new Wt,A=new Vt,x=new Wt;function E(){var e,t,i,n=new Float32Array([-.5,-.5,0,0,.5,-.5,1,0,.5,.5,1,1,-.5,.5,0,1]),r=new Uint16Array([0,1,2,0,2,3]);v=f.createBuffer(),y=f.createBuffer(),f.bindBuffer(f.ARRAY_BUFFER,v),f.bufferData(f.ARRAY_BUFFER,n,f.STATIC_DRAW),f.bindBuffer(f.ELEMENT_ARRAY_BUFFER,y),f.bufferData(f.ELEMENT_ARRAY_BUFFER,r,f.STATIC_DRAW),e=f.createProgram(),t=f.createShader(f.VERTEX_SHADER),i=f.createShader(f.FRAGMENT_SHADER),f.shaderSource(t,["precision "+o.precision+" float;","#define SHADER_NAME SpriteMaterial","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform float rotation;","uniform vec2 center;","uniform vec2 scale;","uniform vec2 uvOffset;","uniform vec2 uvScale;","attribute vec2 position;","attribute vec2 uv;","varying vec2 vUV;","varying float fogDepth;","void main() {","\tvUV = uvOffset + uv * uvScale;","\tvec2 alignedPosition = ( position - center ) * scale;","\tvec2 rotatedPosition;","\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;","\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;","\tvec4 mvPosition;","\tmvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );","\tmvPosition.xy += rotatedPosition;","\tgl_Position = projectionMatrix * mvPosition;","\tfogDepth = - mvPosition.z;","}"].join("\n")),f.shaderSource(i,["precision "+o.precision+" float;","#define SHADER_NAME SpriteMaterial","uniform vec3 color;","uniform sampler2D map;","uniform float opacity;","uniform int fogType;","uniform vec3 fogColor;","uniform float fogDensity;","uniform float fogNear;","uniform float fogFar;","uniform float alphaTest;","varying vec2 vUV;","varying float fogDepth;","void main() {","\tvec4 texture = texture2D( map, vUV );","\tgl_FragColor = vec4( color * texture.xyz, texture.a * opacity );","\tif ( gl_FragColor.a < alphaTest ) discard;","\tif ( fogType > 0 ) {","\t\tfloat fogFactor = 0.0;","\t\tif ( fogType == 1 ) {","\t\t\tfogFactor = smoothstep( fogNear, fogFar, fogDepth );","\t\t} else {","\t\t\tconst float LOG2 = 1.442695;","\t\t\tfogFactor = exp2( - fogDensity * fogDensity * fogDepth * fogDepth * LOG2 );","\t\t\tfogFactor = 1.0 - clamp( fogFactor, 0.0, 1.0 );","\t\t}","\t\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );","\t}","}"].join("\n")),f.compileShader(t),f.compileShader(i),f.attachShader(e,t),f.attachShader(e,i),f.linkProgram(e),_=e,M={position:f.getAttribLocation(_,"position"),uv:f.getAttribLocation(_,"uv")},w={uvOffset:f.getUniformLocation(_,"uvOffset"),uvScale:f.getUniformLocation(_,"uvScale"),rotation:f.getUniformLocation(_,"rotation"),center:f.getUniformLocation(_,"center"),scale:f.getUniformLocation(_,"scale"),color:f.getUniformLocation(_,"color"),map:f.getUniformLocation(_,"map"),opacity:f.getUniformLocation(_,"opacity"),modelViewMatrix:f.getUniformLocation(_,"modelViewMatrix"),projectionMatrix:f.getUniformLocation(_,"projectionMatrix"),fogType:f.getUniformLocation(_,"fogType"),fogDensity:f.getUniformLocation(_,"fogDensity"),fogNear:f.getUniformLocation(_,"fogNear"),fogFar:f.getUniformLocation(_,"fogFar"),fogColor:f.getUniformLocation(_,"fogColor"),fogDepth:f.getUniformLocation(_,"fogDepth"),alphaTest:f.getUniformLocation(_,"alphaTest")};var a=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");a.width=8,a.height=8;var s=a.getContext("2d");s.fillStyle="white",s.fillRect(0,0,8,8),b=new Gs(a)}function S(e,t){return e.renderOrder!==t.renderOrder?e.renderOrder-t.renderOrder:e.z!==t.z?t.z-e.z:t.id-e.id}this.render=function(e,t,i){if(0!==e.length){void 0===_&&E(),g.useProgram(_),g.initAttributes(),g.enableAttribute(M.position),g.enableAttribute(M.uv),g.disableUnusedAttributes(),g.disable(f.CULL_FACE),g.enable(f.BLEND),f.bindBuffer(f.ARRAY_BUFFER,v),f.vertexAttribPointer(M.position,2,f.FLOAT,!1,16,0),f.vertexAttribPointer(M.uv,2,f.FLOAT,!1,16,8),f.bindBuffer(f.ELEMENT_ARRAY_BUFFER,y),f.uniformMatrix4fv(w.projectionMatrix,!1,i.projectionMatrix.elements),g.activeTexture(f.TEXTURE0),f.uniform1i(w.map,0);var n=0,r=0,a=t.fog;a?(f.uniform3f(w.fogColor,a.color.r,a.color.g,a.color.b),a.isFog?(f.uniform1f(w.fogNear,a.near),f.uniform1f(w.fogFar,a.far),f.uniform1i(w.fogType,1),r=n=1):a.isFogExp2&&(f.uniform1f(w.fogDensity,a.density),f.uniform1i(w.fogType,2),r=n=2)):(f.uniform1i(w.fogType,0),r=n=0);for(var s=0,o=e.length;s<o;s++){(c=e[s]).modelViewMatrix.multiplyMatrices(i.matrixWorldInverse,c.matrixWorld),c.z=-c.modelViewMatrix.elements[14]}e.sort(S);var l=[],u=[];for(s=0,o=e.length;s<o;s++){var c,h=(c=e[s]).material;if(!1!==h.visible){c.onBeforeRender(p,t,i,void 0,h,void 0),f.uniform1f(w.alphaTest,h.alphaTest),f.uniformMatrix4fv(w.modelViewMatrix,!1,c.modelViewMatrix.elements),c.matrixWorld.decompose(T,A,x),l[0]=x.x,l[1]=x.y,u[0]=c.center.x-.5,u[1]=c.center.y-.5;var d=0;t.fog&&h.fog&&(d=r),n!==d&&(f.uniform1i(w.fogType,d),n=d),null!==h.map?(f.uniform2f(w.uvOffset,h.map.offset.x,h.map.offset.y),f.uniform2f(w.uvScale,h.map.repeat.x,h.map.repeat.y)):(f.uniform2f(w.uvOffset,0,0),f.uniform2f(w.uvScale,1,1)),f.uniform1f(w.opacity,h.opacity),f.uniform3f(w.color,h.color.r,h.color.g,h.color.b),f.uniform1f(w.rotation,h.rotation),f.uniform2fv(w.center,u),f.uniform2fv(w.scale,l),g.setBlending(h.blending,h.blendEquation,h.blendSrc,h.blendDst,h.blendEquationAlpha,h.blendSrcAlpha,h.blendDstAlpha,h.premultipliedAlpha),g.buffers.depth.setTest(h.depthTest),g.buffers.depth.setMask(h.depthWrite),g.buffers.color.setMask(h.colorWrite),m.setTexture2D(h.map||b,0),f.drawElements(f.TRIANGLES,6,f.UNSIGNED_SHORT,0),c.onAfterRender(p,t,i,void 0,h,void 0)}}g.enable(f.CULL_FACE),g.reset()}}}function Ys(c,i,l){var n=new function(){var t=!1,a=new Si,i=null,s=new Si(0,0,0,0);return{setMask:function(e){i===e||t||(c.colorMask(e,e,e,e),i=e)},setLocked:function(e){t=e},setClear:function(e,t,i,n,r){!0===r&&(e*=n,t*=n,i*=n),a.set(e,t,i,n),!1===s.equals(a)&&(c.clearColor(e,t,i,n),s.copy(a))},reset:function(){t=!1,i=null,s.set(-1,0,0,0)}}},r=new function(){var t=!1,i=null,n=null,r=null;return{setTest:function(e){(e?R:z)(c.DEPTH_TEST)},setMask:function(e){i===e||t||(c.depthMask(e),i=e)},setFunc:function(e){if(n!==e){if(e)switch(e){case he:c.depthFunc(c.NEVER);break;case de:c.depthFunc(c.ALWAYS);break;case pe:c.depthFunc(c.LESS);break;case fe:c.depthFunc(c.LEQUAL);break;case ge:c.depthFunc(c.EQUAL);break;case me:c.depthFunc(c.GEQUAL);break;case ve:c.depthFunc(c.GREATER);break;case ye:c.depthFunc(c.NOTEQUAL);break;default:c.depthFunc(c.LEQUAL)}else c.depthFunc(c.LEQUAL);n=e}},setLocked:function(e){t=e},setClear:function(e){r!==e&&(c.clearDepth(e),r=e)},reset:function(){t=!1,r=n=i=null}}},t=new function(){var t=!1,i=null,n=null,r=null,a=null,s=null,o=null,l=null,u=null;return{setTest:function(e){(e?R:z)(c.STENCIL_TEST)},setMask:function(e){i===e||t||(c.stencilMask(e),i=e)},setFunc:function(e,t,i){n===e&&r===t&&a===i||(c.stencilFunc(e,t,i),n=e,r=t,a=i)},setOp:function(e,t,i){s===e&&o===t&&l===i||(c.stencilOp(e,t,i),s=e,o=t,l=i)},setLocked:function(e){t=e},setClear:function(e){u!==e&&(c.clearStencil(e),u=e)},reset:function(){t=!1,u=l=o=s=a=r=n=i=null}}},e=c.getParameter(c.MAX_VERTEX_ATTRIBS),a=new Uint8Array(e),s=new Uint8Array(e),o=new Uint8Array(e),u={},h=null,d=null,p=null,f=null,g=null,m=null,v=null,y=null,_=null,M=!1,w=null,b=null,T=null,A=null,x=null,E=c.getParameter(c.MAX_COMBINED_TEXTURE_IMAGE_UNITS),S=!1,D=0,N=c.getParameter(c.VERSION);-1!==N.indexOf("WebGL")?(D=parseFloat(/^WebGL\ ([0-9])/.exec(N)[1]),S=1<=D):-1!==N.indexOf("OpenGL ES")&&(D=parseFloat(/^OpenGL\ ES\ ([0-9])/.exec(N)[1]),S=2<=D);var C=null,L={},I=new Si,O=new Si;function j(e,t,i){var n=new Uint8Array(4),r=c.createTexture();c.bindTexture(e,r),c.texParameteri(e,c.TEXTURE_MIN_FILTER,c.NEAREST),c.texParameteri(e,c.TEXTURE_MAG_FILTER,c.NEAREST);for(var a=0;a<i;a++)c.texImage2D(t+a,0,c.RGBA,1,1,0,c.RGBA,c.UNSIGNED_BYTE,n);return r}var k={};function P(e,t){a[e]=1,0===s[e]&&(c.enableVertexAttribArray(e),s[e]=1),o[e]!==t&&(i.get("ANGLE_instanced_arrays").vertexAttribDivisorANGLE(e,t),o[e]=t)}function R(e){!0!==u[e]&&(c.enable(e),u[e]=!0)}function z(e){!1!==u[e]&&(c.disable(e),u[e]=!1)}function U(e,t,i,n,r,a,s,o){if((e!==$?R:z)(c.BLEND),e!==ie){if(e!==p||o!==M)switch(e){case J:o?(c.blendEquationSeparate(c.FUNC_ADD,c.FUNC_ADD),c.blendFuncSeparate(c.ONE,c.ONE,c.ONE,c.ONE)):(c.blendEquation(c.FUNC_ADD),c.blendFunc(c.SRC_ALPHA,c.ONE));break;case ee:o?(c.blendEquationSeparate(c.FUNC_ADD,c.FUNC_ADD),c.blendFuncSeparate(c.ZERO,c.ZERO,c.ONE_MINUS_SRC_COLOR,c.ONE_MINUS_SRC_ALPHA)):(c.blendEquation(c.FUNC_ADD),c.blendFunc(c.ZERO,c.ONE_MINUS_SRC_COLOR));break;case te:o?(c.blendEquationSeparate(c.FUNC_ADD,c.FUNC_ADD),c.blendFuncSeparate(c.ZERO,c.SRC_COLOR,c.ZERO,c.SRC_ALPHA)):(c.blendEquation(c.FUNC_ADD),c.blendFunc(c.ZERO,c.SRC_COLOR));break;default:o?(c.blendEquationSeparate(c.FUNC_ADD,c.FUNC_ADD),c.blendFuncSeparate(c.ONE,c.ONE_MINUS_SRC_ALPHA,c.ONE,c.ONE_MINUS_SRC_ALPHA)):(c.blendEquationSeparate(c.FUNC_ADD,c.FUNC_ADD),c.blendFuncSeparate(c.SRC_ALPHA,c.ONE_MINUS_SRC_ALPHA,c.ONE,c.ONE_MINUS_SRC_ALPHA))}_=y=v=m=g=f=null}else r=r||t,a=a||i,s=s||n,t===f&&r===v||(c.blendEquationSeparate(l.convert(t),l.convert(r)),f=t,v=r),i===g&&n===m&&a===y&&s===_||(c.blendFuncSeparate(l.convert(i),l.convert(n),l.convert(a),l.convert(s)),g=i,m=n,y=a,_=s);p=e,M=o}function B(e){w!==e&&(e?c.frontFace(c.CW):c.frontFace(c.CCW),w=e)}
1function F(e){e!==Y?(R(c.CULL_FACE),e!==b&&(e===Q?c.cullFace(c.BACK):e===X?c.cullFace(c.FRONT):c.cullFace(c.FRONT_AND_BACK))):z(c.CULL_FACE),b=e}function G(e,t,i){e?(R(c.POLYGON_OFFSET_FILL),A===t&&x===i||(c.polygonOffset(t,i),A=t,x=i)):z(c.POLYGON_OFFSET_FILL)}function H(e){void 0===e&&(e=c.TEXTURE0+E-1),C!==e&&(c.activeTexture(e),C=e)}return k[c.TEXTURE_2D]=j(c.TEXTURE_2D,c.TEXTURE_2D,1),k[c.TEXTURE_CUBE_MAP]=j(c.TEXTURE_CUBE_MAP,c.TEXTURE_CUBE_MAP_POSITIVE_X,6),n.setClear(0,0,0,1),r.setClear(1),t.setClear(0),R(c.DEPTH_TEST),r.setFunc(fe),B(!1),F(Q),R(c.CULL_FACE),R(c.BLEND),U(K),{buffers:{color:n,depth:r,stencil:t},initAttributes:function(){for(var e=0,t=a.length;e<t;e++)a[e]=0},enableAttribute:function(e){P(e,0)},enableAttributeAndDivisor:P,disableUnusedAttributes:function(){for(var e=0,t=s.length;e!==t;++e)s[e]!==a[e]&&(c.disableVertexAttribArray(e),s[e]=0)},enable:R,disable:z,getCompressedTextureFormats:function(){if(null===h&&(h=[],i.get("WEBGL_compressed_texture_pvrtc")||i.get("WEBGL_compressed_texture_s3tc")||i.get("WEBGL_compressed_texture_etc1")||i.get("WEBGL_compressed_texture_astc")))for(var e=c.getParameter(c.COMPRESSED_TEXTURE_FORMATS),t=0;t<e.length;t++)h.push(e[t]);return h},useProgram:function(e){return d!==e&&(c.useProgram(e),d=e,!0)},setBlending:U,setMaterial:function(e,t){(e.side===Z?z:R)(c.CULL_FACE);var i=e.side===Te;t&&(i=!i),B(i),!0===e.transparent?U(e.blending,e.blendEquation,e.blendSrc,e.blendDst,e.blendEquationAlpha,e.blendSrcAlpha,e.blendDstAlpha,e.premultipliedAlpha):U($),r.setFunc(e.depthFunc),r.setTest(e.depthTest),r.setMask(e.depthWrite),n.setMask(e.colorWrite),G(e.polygonOffset,e.polygonOffsetFactor,e.polygonOffsetUnits)},setFlipSided:B,setCullFace:F,setLineWidth:function(e){e!==T&&(S&&c.lineWidth(e),T=e)},setPolygonOffset:G,setScissorTest:function(e){(e?R:z)(c.SCISSOR_TEST)},activeTexture:H,bindTexture:function(e,t){null===C&&H();var i=L[C];void 0===i&&(i={type:void 0,texture:void 0},L[C]=i),i.type===e&&i.texture===t||(c.bindTexture(e,t||k[e]),i.type=e,i.texture=t)},compressedTexImage2D:function(){try{c.compressedTexImage2D.apply(c,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},texImage2D:function(){try{c.texImage2D.apply(c,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},scissor:function(e){!1===I.equals(e)&&(c.scissor(e.x,e.y,e.z,e.w),I.copy(e))},viewport:function(e){!1===O.equals(e)&&(c.viewport(e.x,e.y,e.z,e.w),O.copy(e))},reset:function(){for(var e=0;e<s.length;e++)1===s[e]&&(c.disableVertexAttribArray(e),s[e]=0);u={},L={},b=w=p=d=C=h=null,n.reset(),r.reset(),t.reset()}}}function Qs(g,r,m,v,y,_,M){var d,p="undefined"!=typeof WebGL2RenderingContext&&g instanceof WebGL2RenderingContext,o={};function w(e,t){if(e.width>t||e.height>t){if("data"in e)return void console.warn("THREE.WebGLRenderer: image in DataTexture is too big ("+e.width+"x"+e.height+").");var i=t/Math.max(e.width,e.height),n=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");return n.width=Math.floor(e.width*i),n.height=Math.floor(e.height*i),n.getContext("2d").drawImage(e,0,0,e.width,e.height,0,0,n.width,n.height),console.warn("THREE.WebGLRenderer: image is too big ("+e.width+"x"+e.height+"). Resized to "+n.width+"x"+n.height,e),n}return e}function b(e){return Ht.isPowerOfTwo(e.width)&&Ht.isPowerOfTwo(e.height)}function T(e,t){return e.generateMipmaps&&t&&e.minFilter!==Ue&&e.minFilter!==Ge}function A(e,t,i,n){g.generateMipmap(e),v.get(t).__maxMipLevel=Math.log(Math.max(i,n))*Math.LOG2E}function a(e){return e===Ue||e===Be||e===Fe?g.NEAREST:g.LINEAR}function x(e){var t=e.target;t.removeEventListener("dispose",x),function(e){var t=v.get(e);if(e.image&&t.__image__webglTextureCube)g.deleteTexture(t.__image__webglTextureCube);else{if(void 0===t.__webglInit)return;g.deleteTexture(t.__webglTexture)}v.remove(e)}(t),t.isVideoTexture&&delete o[t.id],M.memory.textures--}function s(e){var t=e.target;t.removeEventListener("dispose",s),function(e){var t=v.get(e),i=v.get(e.texture);if(!e)return;void 0!==i.__webglTexture&&g.deleteTexture(i.__webglTexture);e.depthTexture&&e.depthTexture.dispose();if(e.isWebGLRenderTargetCube)for(var n=0;n<6;n++)g.deleteFramebuffer(t.__webglFramebuffer[n]),t.__webglDepthbuffer&&g.deleteRenderbuffer(t.__webglDepthbuffer[n]);else g.deleteFramebuffer(t.__webglFramebuffer),t.__webglDepthbuffer&&g.deleteRenderbuffer(t.__webglDepthbuffer);v.remove(e.texture),v.remove(e)}(t),M.memory.textures--}function l(e,t){var i,n,r,a=v.get(e);if(e.isVideoTexture&&(n=(i=e).id,r=M.render.frame,o[n]!==r&&(o[n]=r,i.update())),0<e.version&&a.__version!==e.version){var s=e.image;if(void 0===s)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined",e);else{if(!1!==s.complete)return void function(e,t,i){void 0===e.__webglInit&&(e.__webglInit=!0,t.addEventListener("dispose",x),e.__webglTexture=g.createTexture(),M.memory.textures++);m.activeTexture(g.TEXTURE0+i),m.bindTexture(g.TEXTURE_2D,e.__webglTexture),g.pixelStorei(g.UNPACK_FLIP_Y_WEBGL,t.flipY),g.pixelStorei(g.UNPACK_PREMULTIPLY_ALPHA_WEBGL,t.premultiplyAlpha),g.pixelStorei(g.UNPACK_ALIGNMENT,t.unpackAlignment);var n=w(t.image,y.maxTextureSize);!function(e){return e.wrapS!==Re||e.wrapT!==Re||e.minFilter!==Ue&&e.minFilter!==Ge}(t)||!1!==b(n)||(n=function(e){return e instanceof HTMLImageElement||e instanceof HTMLCanvasElement||e instanceof ImageBitmap?(void 0===d&&(d=document.createElementNS("http://www.w3.org/1999/xhtml","canvas")),d.width=Ht.floorPowerOfTwo(e.width),d.height=Ht.floorPowerOfTwo(e.height),d.getContext("2d").drawImage(e,0,0,d.width,d.height),console.warn("THREE.WebGLRenderer: image is not power of two ("+e.width+"x"+e.height+"). Resized to "+d.width+"x"+d.height,e),d):e}(n));var r=b(n),a=_.convert(t.format),s=_.convert(t.type);E(g.TEXTURE_2D,t,r);var o,l=t.mipmaps;if(t.isDepthTexture){var u=g.DEPTH_COMPONENT;if(t.type===$e){if(!p)throw new Error("Float Depth Texture only supported in WebGL2.0");u=g.DEPTH_COMPONENT32F}else p&&(u=g.DEPTH_COMPONENT16);t.format===lt&&u===g.DEPTH_COMPONENT&&t.type!==qe&&t.type!==Ze&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),t.type=qe,s=_.convert(t.type)),t.format===ut&&(u=g.DEPTH_STENCIL,t.type!==it&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),t.type=it,s=_.convert(t.type))),m.texImage2D(g.TEXTURE_2D,0,u,n.width,n.height,0,a,s,null)}else if(t.isDataTexture)if(0<l.length&&r){for(var c=0,h=l.length;c<h;c++)o=l[c],m.texImage2D(g.TEXTURE_2D,c,a,o.width,o.height,0,a,s,o.data);t.generateMipmaps=!1,e.__maxMipLevel=l.length-1}else m.texImage2D(g.TEXTURE_2D,0,a,n.width,n.height,0,a,s,n.data),e.__maxMipLevel=0;else if(t.isCompressedTexture){for(c=0,h=l.length;c<h;c++)o=l[c],t.format!==at&&t.format!==rt?-1<m.getCompressedTextureFormats().indexOf(a)?m.compressedTexImage2D(g.TEXTURE_2D,c,a,o.width,o.height,0,o.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):m.texImage2D(g.TEXTURE_2D,c,a,o.width,o.height,0,a,s,o.data);e.__maxMipLevel=l.length-1}else if(0<l.length&&r){for(c=0,h=l.length;c<h;c++)o=l[c],m.texImage2D(g.TEXTURE_2D,c,a,a,s,o);t.generateMipmaps=!1,e.__maxMipLevel=l.length-1}else m.texImage2D(g.TEXTURE_2D,0,a,a,s,n),e.__maxMipLevel=0;T(t,r)&&A(g.TEXTURE_2D,t,n.width,n.height);e.__version=t.version,t.onUpdate&&t.onUpdate(t)}(a,e,t);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete",e)}}m.activeTexture(g.TEXTURE0+t),m.bindTexture(g.TEXTURE_2D,a.__webglTexture)}function E(e,t,i){var n;if(i?(g.texParameteri(e,g.TEXTURE_WRAP_S,_.convert(t.wrapS)),g.texParameteri(e,g.TEXTURE_WRAP_T,_.convert(t.wrapT)),g.texParameteri(e,g.TEXTURE_MAG_FILTER,_.convert(t.magFilter)),g.texParameteri(e,g.TEXTURE_MIN_FILTER,_.convert(t.minFilter))):(g.texParameteri(e,g.TEXTURE_WRAP_S,g.CLAMP_TO_EDGE),g.texParameteri(e,g.TEXTURE_WRAP_T,g.CLAMP_TO_EDGE),t.wrapS===Re&&t.wrapT===Re||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping.",t),g.texParameteri(e,g.TEXTURE_MAG_FILTER,a(t.magFilter)),g.texParameteri(e,g.TEXTURE_MIN_FILTER,a(t.minFilter)),t.minFilter!==Ue&&t.minFilter!==Ge&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.",t)),n=r.get("EXT_texture_filter_anisotropic")){if(t.type===$e&&null===r.get("OES_texture_float_linear"))return;if(t.type===Ke&&null===r.get("OES_texture_half_float_linear"))return;(1<t.anisotropy||v.get(t).__currentAnisotropy)&&(g.texParameterf(e,n.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(t.anisotropy,y.getMaxAnisotropy())),v.get(t).__currentAnisotropy=t.anisotropy)}}function u(e,t,i,n){var r=_.convert(t.texture.format),a=_.convert(t.texture.type);m.texImage2D(n,0,r,t.width,t.height,0,r,a,null),g.bindFramebuffer(g.FRAMEBUFFER,e),g.framebufferTexture2D(g.FRAMEBUFFER,i,n,v.get(t.texture).__webglTexture,0),g.bindFramebuffer(g.FRAMEBUFFER,null)}function c(e,t){g.bindRenderbuffer(g.RENDERBUFFER,e),t.depthBuffer&&!t.stencilBuffer?(g.renderbufferStorage(g.RENDERBUFFER,g.DEPTH_COMPONENT16,t.width,t.height),g.framebufferRenderbuffer(g.FRAMEBUFFER,g.DEPTH_ATTACHMENT,g.RENDERBUFFER,e)):t.depthBuffer&&t.stencilBuffer?(g.renderbufferStorage(g.RENDERBUFFER,g.DEPTH_STENCIL,t.width,t.height),g.framebufferRenderbuffer(g.FRAMEBUFFER,g.DEPTH_STENCIL_ATTACHMENT,g.RENDERBUFFER,e)):g.renderbufferStorage(g.RENDERBUFFER,g.RGBA4,t.width,t.height),g.bindRenderbuffer(g.RENDERBUFFER,null)}function h(e){var t=v.get(e),i=!0===e.isWebGLRenderTargetCube;if(e.depthTexture){if(i)throw new Error("target.depthTexture not supported in Cube render targets");!function(e,t){if(t&&t.isWebGLRenderTargetCube)throw new Error("Depth Texture with cube render targets is not supported");if(g.bindFramebuffer(g.FRAMEBUFFER,e),!t.depthTexture||!t.depthTexture.isDepthTexture)throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");v.get(t.depthTexture).__webglTexture&&t.depthTexture.image.width===t.width&&t.depthTexture.image.height===t.height||(t.depthTexture.image.width=t.width,t.depthTexture.image.height=t.height,t.depthTexture.needsUpdate=!0),l(t.depthTexture,0);var i=v.get(t.depthTexture).__webglTexture;if(t.depthTexture.format===lt)g.framebufferTexture2D(g.FRAMEBUFFER,g.DEPTH_ATTACHMENT,g.TEXTURE_2D,i,0);else{if(t.depthTexture.format!==ut)throw new Error("Unknown depthTexture format");g.framebufferTexture2D(g.FRAMEBUFFER,g.DEPTH_STENCIL_ATTACHMENT,g.TEXTURE_2D,i,0)}}(t.__webglFramebuffer,e)}else if(i){t.__webglDepthbuffer=[];for(var n=0;n<6;n++)g.bindFramebuffer(g.FRAMEBUFFER,t.__webglFramebuffer[n]),t.__webglDepthbuffer[n]=g.createRenderbuffer(),c(t.__webglDepthbuffer[n],e)}else g.bindFramebuffer(g.FRAMEBUFFER,t.__webglFramebuffer),t.__webglDepthbuffer=g.createRenderbuffer(),c(t.__webglDepthbuffer,e);g.bindFramebuffer(g.FRAMEBUFFER,null)}this.setTexture2D=l,this.setTextureCube=function(e,t){var i=v.get(e);if(6===e.image.length)if(0<e.version&&i.__version!==e.version){i.__image__webglTextureCube||(e.addEventListener("dispose",x),i.__image__webglTextureCube=g.createTexture(),M.memory.textures++),m.activeTexture(g.TEXTURE0+t),m.bindTexture(g.TEXTURE_CUBE_MAP,i.__image__webglTextureCube),g.pixelStorei(g.UNPACK_FLIP_Y_WEBGL,e.flipY);for(var n=e&&e.isCompressedTexture,r=e.image[0]&&e.image[0].isDataTexture,a=[],s=0;s<6;s++)a[s]=n||r?r?e.image[s].image:e.image[s]:w(e.image[s],y.maxCubemapSize);var o=a[0],l=b(o),u=_.convert(e.format),c=_.convert(e.type);E(g.TEXTURE_CUBE_MAP,e,l);for(s=0;s<6;s++)if(n)for(var h,d=a[s].mipmaps,p=0,f=d.length;p<f;p++)h=d[p],e.format!==at&&e.format!==rt?-1<m.getCompressedTextureFormats().indexOf(u)?m.compressedTexImage2D(g.TEXTURE_CUBE_MAP_POSITIVE_X+s,p,u,h.width,h.height,0,h.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):m.texImage2D(g.TEXTURE_CUBE_MAP_POSITIVE_X+s,p,u,h.width,h.height,0,u,c,h.data);else r?m.texImage2D(g.TEXTURE_CUBE_MAP_POSITIVE_X+s,0,u,a[s].width,a[s].height,0,u,c,a[s].data):m.texImage2D(g.TEXTURE_CUBE_MAP_POSITIVE_X+s,0,u,u,c,a[s]);i.__maxMipLevel=n?d.length-1:0,T(e,l)&&A(g.TEXTURE_CUBE_MAP,e,o.width,o.height),i.__version=e.version,e.onUpdate&&e.onUpdate(e)}else m.activeTexture(g.TEXTURE0+t),m.bindTexture(g.TEXTURE_CUBE_MAP,i.__image__webglTextureCube)},this.setTextureCubeDynamic=function(e,t){m.activeTexture(g.TEXTURE0+t),m.bindTexture(g.TEXTURE_CUBE_MAP,v.get(e).__webglTexture)},this.setupRenderTarget=function(e){var t=v.get(e),i=v.get(e.texture);e.addEventListener("dispose",s),i.__webglTexture=g.createTexture(),M.memory.textures++;var n=!0===e.isWebGLRenderTargetCube,r=b(e);
1if(n){t.__webglFramebuffer=[];for(var a=0;a<6;a++)t.__webglFramebuffer[a]=g.createFramebuffer()}else t.__webglFramebuffer=g.createFramebuffer();if(n){m.bindTexture(g.TEXTURE_CUBE_MAP,i.__webglTexture),E(g.TEXTURE_CUBE_MAP,e.texture,r);for(a=0;a<6;a++)u(t.__webglFramebuffer[a],e,g.COLOR_ATTACHMENT0,g.TEXTURE_CUBE_MAP_POSITIVE_X+a);T(e.texture,r)&&A(g.TEXTURE_CUBE_MAP,e.texture,e.width,e.height),m.bindTexture(g.TEXTURE_CUBE_MAP,null)}else m.bindTexture(g.TEXTURE_2D,i.__webglTexture),E(g.TEXTURE_2D,e.texture,r),u(t.__webglFramebuffer,e,g.COLOR_ATTACHMENT0,g.TEXTURE_2D),T(e.texture,r)&&A(g.TEXTURE_2D,e.texture,e.width,e.height),m.bindTexture(g.TEXTURE_2D,null);e.depthBuffer&&h(e)},this.updateRenderTargetMipmap=function(e){var t=e.texture;if(T(t,b(e))){var i=e.isWebGLRenderTargetCube?g.TEXTURE_CUBE_MAP:g.TEXTURE_2D,n=v.get(t).__webglTexture;m.bindTexture(i,n),A(i,t,e.width,e.height),m.bindTexture(i,null)}}}function Vs(i,n){return{convert:function(e){var t;if(e===Pe)return i.REPEAT;if(e===Re)return i.CLAMP_TO_EDGE;if(e===ze)return i.MIRRORED_REPEAT;if(e===Ue)return i.NEAREST;if(e===Be)return i.NEAREST_MIPMAP_NEAREST;if(e===Fe)return i.NEAREST_MIPMAP_LINEAR;if(e===Ge)return i.LINEAR;if(e===He)return i.LINEAR_MIPMAP_NEAREST;if(e===Ye)return i.LINEAR_MIPMAP_LINEAR;if(e===Qe)return i.UNSIGNED_BYTE;if(e===Je)return i.UNSIGNED_SHORT_4_4_4_4;if(e===et)return i.UNSIGNED_SHORT_5_5_5_1;if(e===tt)return i.UNSIGNED_SHORT_5_6_5;if(e===Ve)return i.BYTE;if(e===We)return i.SHORT;if(e===qe)return i.UNSIGNED_SHORT;if(e===Xe)return i.INT;if(e===Ze)return i.UNSIGNED_INT;if(e===$e)return i.FLOAT;if(e===Ke&&null!==(t=n.get("OES_texture_half_float")))return t.HALF_FLOAT_OES;if(e===nt)return i.ALPHA;if(e===rt)return i.RGB;if(e===at)return i.RGBA;if(e===st)return i.LUMINANCE;if(e===ot)return i.LUMINANCE_ALPHA;if(e===lt)return i.DEPTH_COMPONENT;if(e===ut)return i.DEPTH_STENCIL;if(e===O)return i.FUNC_ADD;if(e===j)return i.FUNC_SUBTRACT;if(e===P)return i.FUNC_REVERSE_SUBTRACT;if(e===F)return i.ZERO;if(e===G)return i.ONE;if(e===H)return i.SRC_COLOR;if(e===ne)return i.ONE_MINUS_SRC_COLOR;if(e===re)return i.SRC_ALPHA;if(e===ae)return i.ONE_MINUS_SRC_ALPHA;if(e===se)return i.DST_ALPHA;if(e===oe)return i.ONE_MINUS_DST_ALPHA;if(e===le)return i.DST_COLOR;if(e===ue)return i.ONE_MINUS_DST_COLOR;if(e===ce)return i.SRC_ALPHA_SATURATE;if((e===ct||e===ht||e===dt||e===pt)&&null!==(t=n.get("WEBGL_compressed_texture_s3tc"))){if(e===ct)return t.COMPRESSED_RGB_S3TC_DXT1_EXT;if(e===ht)return t.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(e===dt)return t.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(e===pt)return t.COMPRESSED_RGBA_S3TC_DXT5_EXT}if((e===ft||e===gt||e===mt||e===vt)&&null!==(t=n.get("WEBGL_compressed_texture_pvrtc"))){if
1(e===ft)return t.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(e===gt)return t.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(e===mt)return t.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(e===vt)return t.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(e===yt&&null!==(t=n.get("WEBGL_compressed_texture_etc1")))return t.COMPRESSED_RGB_ETC1_WEBGL;if((e===_t||e===Mt||e===wt||e===bt||e===Tt||e===At||e===xt||e===Et||e===St||e===Dt||e===Nt||e===Ct||e===Lt||e===It)&&null!==(t=n.get("WEBGL_compressed_texture_astc")))return e;if((e===U||e===B)&&null!==(t=n.get("EXT_blend_minmax"))){if(e===U)return t.MIN_EXT;if(e===B)return t.MAX_EXT}return e===it&&null!==(t=n.get("WEBGL_depth_texture"))?t.UNSIGNED_INT_24_8_WEBGL:0}}}function Ws(e,t,i,n){yn.call(this),this.type="PerspectiveCamera",this.fov=void 0!==e?e:50,this.zoom=1,this.near=void 0!==i?i:.1,this.far=void 0!==n?n:2e3,this.focus=10,this.aspect=void 0!==t?t:1,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}function qs(e){Ws.call(this),this.cameras=e||[]}function Xs(n){var o=this,l=null,u=null,c=null,h=new Qt,d=new Qt;"undefined"!=typeof window&&"VRFrameData"in window&&(u=new window.VRFrameData,window.addEventListener("vrdisplaypresentchange",e,!1));var p=new Qt,f=new Vt,g=new Wt,m=new Ws;m.bounds=new Si(0,0,.5,1),m.layers.enable(1);var v=new Ws;v.bounds=new Si(.5,0,.5,1),v.layers.enable(2);var r,a,y=new qs([m,v]);function s(){return null!==l&&!0===l.isPresenting}function e(){if(s()){var e=l.getEyeParameters("left"),t=e.renderWidth,i=e.renderHeight;a=n.getPixelRatio(),r=n.getSize(),n.setDrawingBufferSize(2*t,i,1),_.start()}else o.enabled&&(n.setDrawingBufferSize(r.width,r.height,a),_.stop())}y.layers.enable(1),y.layers.enable(2),this.enabled=!1,this.userHeight=1.6,this.getDevice=function(){return l},this.setDevice=function(e){void 0!==e&&(l=e),_.setContext(e)},this.setPoseTarget=function(e){void 0!==e&&(c=e)},this.getCamera=function(e){if(null===l)return e;l.depthNear=e.near,l.depthFar=e.far,l.getFrameData(u);var t=l.stageParameters;t?h.fromArray(t.sittingToStandingTransform):h.makeTranslation(0,o.userHeight,0);var i=u.pose,n=null!==c?c:e;if(n.matrix.copy(h),n.matrix.decompose(n.position,n.quaternion,n.scale),null!==i.orientation&&(f.fromArray(i.orientation),n.quaternion.multiply(f)),null!==i.position&&(f.setFromRotationMatrix(h),g.fromArray(i.position),g.applyQuaternion(f),n.position.add(g)),n.updateMatrixWorld(),!1===l.isPresenting)return e;m.near=e.near,v.near=e.near,m.far=e.far,v.far=e.far,y.matrixWorld.copy(e.matrixWorld),y.matrixWorldInverse.copy(e.matrixWorldInverse),m.matrixWorldInverse.fromArray(u.leftViewMatrix),v.matrixWorldInverse.fromArray(u.rightViewM
vendor: 6,045 bytes, line 1
1atrix),d.getInverse(h),m.matrixWorldInverse.multiply(d),v.matrixWorldInverse.multiply(d);var r=n.parent;null!==r&&(p.getInverse(r.matrixWorld),m.matrixWorldInverse.multiply(p),v.matrixWorldInverse.multiply(p)),m.matrixWorld.getInverse(m.matrixWorldInverse),v.matrixWorld.getInverse(v.matrixWorldInverse),m.projectionMatrix.fromArray(u.leftProjectionMatrix),v.projectionMatrix.fromArray(u.rightProjectionMatrix),y.projectionMatrix.copy(m.projectionMatrix);var a=l.getLayers();if(a.length){var s=a[0];null!==s.leftBounds&&4===s.leftBounds.length&&m.bounds.fromArray(s.leftBounds),null!==s.rightBounds&&4===s.rightBounds.length&&v.bounds.fromArray(s.rightBounds)}return y},this.getStandingMatrix=function(){return h},this.isPresenting=s;var _=new Wi;this.setAnimationLoop=function(e){_.setAnimationLoop(e)},this.submitFrame=function(){s()&&l.submitFrame()},this.dispose=function(){"undefined"!=typeof window&&window.removeEventListener("vrdisplaypresentchange",e)}}function Zs(i){var n=i.context,t=null,u=null,c=null,h=null;function s(){return null!==u&&null!==c}var e=new Ws;e.layers.enable(1),e.viewport=new Si;var r=new Ws;r.layers.enable(2),r.viewport=new Si;var d=new qs([e,r]);function o(e,t){null===t?e.matrixWorld.copy(e.matrix):e.matrixWorld.multiplyMatrices(t.matrixWorld,e.matrix),e.matrixWorldInverse.getInverse(e.matrixWorld)}d.layers.enable(1),d.layers.enable(2),this.enabled=!1,this.getDevice=function(){return t},this.setDevice=function(e){void 0!==e&&(t=e),n.setCompatibleXRDevice(e)},this.setSession=function(e,t){null!==(u=e)&&(u.addEventListener("end",function(){i.setFramebuffer(null),a.stop()}),u.baseLayer=new XRWebGLLayer(u,n),u.requestFrameOfReference(t.frameOfReferenceType).then(function(e){c=e,i.setFramebuffer(u.baseLayer.framebuffer),a.setContext(u),a.start()}))},this.getCamera=function(e){if(s()){var t=e.parent,i=d.cameras;o(d,t);for(var n=0;n<i.length;n++)o(i[n],t);e.matrixWorld.copy(d.matrixWorld);for(var r=e.children,a=(n=0,r.length);n<a;n++)r[n].updateMatrixWorld(!0);return d}return e},this.isPresenting=s;var p=null;var a=new Wi;a.setAnimationLoop(function(e,t){h=t.getDevicePose(c);for(var i=u.baseLayer,n=t.views,r=0;r<n.length;r++){var a=n[r],s=i.getViewport(a),o=h.getViewMatrix(a),l=d.cameras[r];l.matrix.fromArray(o).getInverse(l.matrix),l.projectionMatrix.fromArray(a.projectionMatrix),l.viewport.set(s.x,s.y,s.width,s.height),0===r&&(d.matrix.copy(l.matrix),d.projectionMatrix.copy(l.projectionMatrix))}p&&p()}),this.setAnimationLoop=function(e){p=e},this.getStandingMatrix=function(){return console.warn("THREE.WebXRManager: getStandingMatrix() is no longer needed."),new THREE.Matrix4},this.submitFrame=function(){}}function $s(e){console.log("THREE.WebGLRenderer","93");var n=void 0!==(e=e||{}).canvas?e.canvas:document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),t=void 0!==e.context?e.context:null,i=void 0!==e.alpha&&e.alpha,r=void 0===e.depth||e.depth,a=void 0===e.stencil||e.stencil,s=void 0!==e.antialias&&e.antialias,o=void 0===e.premultipliedAlpha||e.premultipliedAlpha,l=void 0!==e.preserveDrawingBuffer&&e.preserveDrawingBuffer,u=void 0!==e.powerPreference?e.powerPreference:"default",p=null,R=null;this.domElement=n,this.context=null,this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.gammaFactor=2,this.gammaInput=!1,this.gammaOutput=!1,this.physicallyCorrectLights=!1,this.toneMapping=xe,this.toneMappingExposure=1,this.toneMappingWhitePoint=1,this.maxMorphTargets=8,this.maxMorphNormals=4;var z,A,U,B,c,F,h,x,E,f,m,d,g,v,S,D,N,y,_,G=this,M=!1,w=null,b=null,T=null,H=-1,C="",Y=null,Q=null,L=new Si,I=new Si,O=null,V=0,j=n.width,W=n.height,q=1,k=new Si(0,0,j,W),P=new Si(0,0,j,W),X=!1,Z=new Pi,$=new na,K=!1,J=!1,ee=new Qt,te=new Wt;function ie(){return null===b?q:1}try{var ne={alpha:i,depth:r,stencil:a,antialias:s,premultipliedAlpha:o,preserveDrawingBuffer:l,powerPreference:u};if(n.addEventListener("webglcontextlost",oe,!1),n.addEventListener("webglcontextrestored",le,!1),null===(z=t||n.getContext("webgl",ne)||n.getContext("experimental-webgl",ne)))throw null!==n.getContext("webgl")?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.");void 0===z.getShaderPrecisionFormat&&(z.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(e){console.error("THREE.WebGLRenderer: "+e.message)}function re(){(A=new ra(z)).get("WEBGL_depth_texture"),A.get("OES_texture_float"),A.get("OES_texture_float_linear"),A.get("OES_texture_half_float"),A.get("OES_texture_half_float_linear"),A.get("OES_standard_derivatives"),A.get("OES_element_index_uint"),A.get("ANGLE_instanced_arrays"),_=new Vs(z,A),U=new ia(z,A,e),(B=new Ys(z,A,_)).scissor(I.copy(P).multiplyScalar(q)),B.viewport(L.copy(k).multiplyScalar(q)),c=new oa(z),F=new hs,h=new Qs(z,A,B,F,U,_,c),x=new qi(z),E=new aa(z,x,c),f=new ca(E,c),S=new ua(z),m=new cs(G,A,U),d=new gs,g=new zs,v=new ea(G,B,f,o),D=new ta(z,A,c),N=new sa(z,A,c),y=new Hs(G,z,B,h,U),c.programs=m.programs,G.context=z,G.capabilities=U,G.extensions=A,G.properties=F,G.renderLists=d,G.state=B,G.info=c}re();var ae=new("xr"in navigator?Zs:Xs)(G);this.vr=ae;var se=new Fs(G,f,U.maxTextureSize);function oe(e){e.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),M=!0}function le(){console.log("THREE.WebGLRenderer: Context Restored."),M=!1,re()}function ue(e){var t,i=e.target;i.removeEventListener("dispose",ue),ce(t=i),F.remove(t)}function ce(e){var t=F.get(e).program;(e.program=void 0)!==t&&m.releaseProgram(t)}this.shadowMap=se,this.getContext=function(){return z},this.getContextAttributes=function(){return z.getContextAttributes()},this.forceContextLoss=function(){var e=A.get("WEBGL_lose_context");e&&e.loseContext()},this.forceContextRestore=function(){var e=A.get("WEBGL_lose_context");e&&e.restoreContext()},this.getPixelRatio=function(){return q},this.setPixelRatio=function(e){void 0!==e&&(q=e,this.setSize(j,W,!1))}
1,this.getSize=function(){return{width:j,height:W}},this.setSize=function(e,t,i){ae.isPresenting()?console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting."):(j=e,W=t,n.width=e*q,n.height=t*q,!1!==i&&(n.style.width=e+"px",n.style.height=t+"px"),this.setViewport(0,0,e,t))},this.getDrawingBufferSize=function(){return{width:j*q,height:W*q}},this.setDrawingBufferSize=function(e,t,i){j=e,W=t,q=i,n.width=e*i,n.height=t*i,this.setViewport(0,0,e,t)},this.getCurrentViewport=function(){return L},this.setViewport=function(e,t,i,n){k.set(e,W-t-n,i,n),B.viewport(L.copy(k).multiplyScalar(q))},this.setScissor=function(e,t,i,n){P.set(e,W-t-n,i,n),B.scissor(I.copy(P).multiplyScalar(q))},this.setScissorTest=function(e){B.setScissorTest(X=e)},this.getClearColor=function(){return v.getClearColor()},this.setClearColor=function(){v.setClearColor.apply(v,arguments)},this.getClearAlpha=function(){return v.getClearAlpha()},this.setClearAlpha=function(){v.setClearAlpha.apply(v,arguments)},this.clear=function(e,t,i){var n=0;void 0!==e&&!e||(n|=z.COLOR_BUFFER_BIT),void 0!==t&&!t||(n|=z.DEPTH_BUFFER_BIT),void 0!==i&&!i||(n|=z.STENCIL_BUFFER_BIT),z.clear(n)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.clearTarget=function(e,t,i,n){this.setRenderTarget(e),this.clear(t,i,n)},this.dispose=function(){n.removeEventListener("webglcontextlost",oe,!1),n.removeEventListener("webglcontextrestored",le,!1),d.dispose(),g.dispose(),F.dispose(),f.dispose(),ae.dispose(),ge.stop()},this.renderBufferImmediate=function(e,t,i){B.initAttributes();var n=F.get(e);e.hasPositions&&!n.position&&(n.position=z.createBuffer()),e.hasNormals&&!n.normal&&(n.normal=z.createBuffer()),e.hasUvs&&!n.uv&&(n.uv=z.createBuffer()),e.hasColors&&!n.color&&(n.color=z.createBuffer());var r=t.getAttributes();if(e.hasPositions&&(z.bindBuffer(z.ARRAY_BUFFER,n.position),z.bufferData(z.ARRAY_BUFFER,e.positionArray,z.DYNAMIC_DRAW),B.enableAttribute(r.position),z.vertexAttribPointer(r.position,3,z.FLOAT,!1,0,0)),e.hasNormals){if(z.bindBuffer(z.ARRAY_BUFFER,n.normal),!i.isMeshPhongMaterial&&!i.isMeshStandardMaterial&&!i.isMeshNormalMaterial&&!0===i.flatShading)for(var a=0,s=3*e.count;a<s;a+=9){var o=e.normalArray,l=(o[a+0]+o[a+3]+o[a+6])/3,u=(o[a+1]+o[a+4]+o[a+7])/3,c=(o[a+2]+o[a+5]+o[a+8])/3;o[a+0]=l,o[a+1]=u,o[a+2]=c,o[a+3]=l,o[a+4]=u,o[a+5]=c,o[a+6]=l,o[a+7]=u,o[a+8]=c}z.bufferData(z.ARRAY_BUFFER,e.normalArray,z.DYNAMIC_DRAW),B.enableAttribute(r.normal),z.vertexAttribPointer(r.normal,3,z.FLOAT,!1,0,0)}e.hasUvs&&i.map&&(z.bindBuffer(z.ARRAY_BUFFER,n.uv),z.bufferData(z.ARRAY_BUFFER,e.uvArray,z.DYNAMIC_DRAW),B.enableAttribute(r.uv),z.vertexAttribPointer(r.uv,2,z.FLOAT,!1,0,0)),e.hasColors&&i.vertexColors!==Ae&&(z.bindBuffer(z.ARRAY_BUFFER,n.color),z.bufferData(z.ARRAY_BUFFER,e.colorArray,z.DYNAMIC_DRAW),B.enableAttribute(r.color),z.vertexAttribPointer(r.color,3,z.FLOAT,!1,0,0)),B.disableUnusedAttributes(),z.drawArrays(z.TRIANGLES,0,e.count),e.count=0},this.renderBufferDirect=function(e,t,i,n,r,a){var s=r.isMesh&&r.matrixWorld.determinant()<0;B.setMaterial(n,s);var o=_e(e,t,n,r),l=i.id+"_"+o.id+"_"+(!0===n.wireframe),u=!1;l!==C&&(C=l,u=!0),r.morphTargetInfluences&&(S.update(r,i,n,o),u=!0);var c,h=i.index,d=i.attributes.position,p=1;!0===n.wireframe&&(h=E.getWireframeAttribute(i),p=2);var f=D;null!==h&&(c=x.get(h),(f=N).setIndex(c)),u&&(function(e,t,i){if(i&&i.isInstancedBufferGeometry&&null===A.get("ANGLE_instanced_arrays"))return console.error("THREE.WebGLRenderer.setupVertexAttributes: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");B.initAttributes();var n=i.attributes,r=t.getAttributes(),a=e.defaultAttributeValues;for(var s in r){var o=r[s];if(0<=o){var l=n[s];if(void 0!==l){var u=l.normalized,c=l.itemSize,h=x.get(l);if(void 0===h)continue;var d=h.buffer,p=h.type,f=h.bytesPerElement;if(l.isInterleavedBufferAttribute){var g=l.data,m=g.stride,v=l.offset;
1g&&g.isInstancedInterleavedBuffer?(B.enableAttributeAndDivisor(o,g.meshPerAttribute),void 0===i.maxInstancedCount&&(i.maxInstancedCount=g.meshPerAttribute*g.count)):B.enableAttribute(o),z.bindBuffer(z.ARRAY_BUFFER,d),z.vertexAttribPointer(o,c,p,u,m*f,v*f)}else l.isInstancedBufferAttribute?(B.enableAttributeAndDivisor(o,l.meshPerAttribute),void 0===i.maxInstancedCount&&(i.maxInstancedCount=l.meshPerAttribute*l.count)):B.enableAttribute(o),z.bindBuffer(z.ARRAY_BUFFER,d),z.vertexAttribPointer(o,c,p,u,0,0)}else if(void 0!==a){var y=a[s];if(void 0!==y)switch(y.length){case 2:z.vertexAttrib2fv(o,y);break;case 3:z.vertexAttrib3fv(o,y);break;case 4:z.vertexAttrib4fv(o,y);break;default:z.vertexAttrib1fv(o,y)}}}}B.disableUnusedAttributes()}(n,o,i),null!==h&&z.bindBuffer(z.ELEMENT_ARRAY_BUFFER,c.buffer));var g=1/0;null!==h?g=h.count:void 0!==d&&(g=d.count);var m=i.drawRange.start*p,v=i.drawRange.count*p,y=null!==a?a.start*p:0,_=null!==a?a.count*p:1/0,M=Math.max(m,y),w=Math.min(g,m+v,y+_)-1,b=Math.max(0,w-M+1);if(0!==b){if(r.isMesh)if(!0===n.wireframe)B.setLineWidth(n.wireframeLinewidth*ie()),f.setMode(z.LINES);else switch(r.drawMode){case Ot:f.setMode(z.TRIANGLES);break;case 1:f.setMode(z.TRIANGLE_STRIP);break;case 2:f.setMode(z.TRIANGLE_FAN)}else if(r.isLine){var T=n.linewidth;void 0===T&&(T=1),B.setLineWidth(T*ie()),r.isLineSegments?f.setMode(z.LINES):r.isLineLoop?f.setMode(z.LINE_LOOP):f.setMode(z.LINE_STRIP)}else r.isPoints&&f.setMode(z.POINTS);i&&i.isInstancedBufferGeometry?0<i.maxInstancedCount&&f.renderInstances(i,M,b):f.render(M,b)}},this.compile=function(i,e){(R=g.get(i,e)).init(),i.traverse(function(e){e.isLight&&(R.pushLight(e),e.castShadow&&R.pushShadow(e))}),R.setupLights(e),i.traverse(function(e){if(e.material)if(Array.isArray(e.material))for(var t=0;t<e.material.length;t++)ye(e.material[t],i.fog,e);else ye(e.material,i.fog,e)})};var he=null;var de,pe,fe,ge=new Wi;function me(e,t,i,n){for(var r=0,a=e.length;r<a;r++){var s=e[r],o=s.object,l=s.geometry,u=void 0===n?s.material:n,c=s.group;if(i.isArrayCamera)for(var h=(Q=i).cameras,d=0,p=h.length;d<p;d++){var f=h[d];if(o.layers.test(f.layers)){if("viewport"in f)B.viewport(L.copy(f.viewport));else{var g=f.bounds,m=g.x*j,v=g.y*W,y=g.z*j,_=g.w*W;B.viewport(L.set(m,v,y,_).multiplyScalar(q))}ve(o,t,f,l,u,c)}}else Q=null,ve(o,t,i,l,u,c)}}function ve(e,t,i,n,r,a){if(e.onBeforeRender(G,t,i,n,r,a),R=g.get(t,Q||i),e.modelViewMatrix.multiplyMatrices(i.matrixWorldInverse,e.matrixWorld),e.normalMatrix.getNormalMatrix(e.modelViewMatrix),e.isImmediateRenderObject){var s=e.isMesh&&e.matrixWorld.determinant()<0;B.setMaterial(r,s);var o=_e(i,t.fog,r,e);C="",l=o,u=r,e.render(function(e){G.renderBufferImmediate(e,l,u)})}else G.renderBufferDirect(i,t.fog,n,r,e,a);var l,u;e.onAfterRender(G,t,i,n,r,a),R=g.get(t,Q||i)}function ye(e,t,i){var n=F.get(e),r=R.state.lights,a=R.state.shadowsArray,s=m.getParameters(e,r.state,a,t,$.numPlanes,$.numIntersection,i),o=m.getProgramCode(e,s),l=n.program,u=!0;if(void 0===l)e.addEventListener("dispose",ue);else if(l.code!==o)ce(e);else if(n.lightsHash!==r.state.hash)F.update(e,"lightsHash",r.state.hash),u=!1;else{if(void 0!==s.shaderID)return;u=!1}if(u){if(s.shaderID){var c=Vi[s.shaderID];n.shader={name:e.type,uniforms:Ui.clone(c.uniforms),vertexShader:c.vertexShader,fragmentShader:c.fragmentShader}}else n.shader={name:e.type,uniforms:e.uniforms,vertexShader:e.vertexShader,fragmentShader:e.fragmentShader};e.onBeforeCompile(n.shader,G),l=m.acquireProgram(e,n.shader,s,o),n.program=l,e.program=l}var h=l.getAttributes();if(e.morphTargets)for(var d=e.numSupportedMorphTargets=0;d<G.maxMorphTargets;d++)0<=h["morphTarget"+d]&&e.numSupportedMorphTargets++;if(e.morphNormals)for(d=e.numSupportedMorphNormals=0;d<G.maxMorphNormals;d++)0<=h["morphNormal"+d]&&e.numSupportedMorphNormals++;var p=n.shader.uniforms;(e.isShaderMaterial||e.isRawShaderMaterial)&&!0!==e.clipping||(n.numClippingPlanes=$.numPlanes,n.numIntersection=$.numIntersection,p.clippingPlanes=$.uniform),n.fog=t,n.lightsHash=r.state.hash,e.lights&&(p.ambientLightColor.value=r.state.ambient,p.directionalLights.value=r.state.directional,p.spotLights.value=r.state.spot,p.rectAreaLights.value=r.state.rectArea,p.pointLights.value=r.state.point,p.hemisphereLights.value=r.state.hemi,p.directionalShadowMap.value=r.state.directionalShadowMap,p.directionalShadowMatrix.value=r.state.directionalShadowMatrix,p.spotShadowMap.value=r.state.spotShadowMap,p.spotShadowMatrix.value=r.state.spotShadowMatrix,p.pointShadowMap.value=r.state.pointShadowMap,p.pointShadowMatrix.value=r.state.pointShadowMatrix);var f=n.program.getUniforms(),g=Ja.seqWithValue(f.seq,p);n.uniformsList=g}function _e(e,t,i,n){V=0;var r=F.get(i),a=R.state.lights;if(K&&(J||e!==Y)){var s=e===Y&&i.id===H;$.setState(i.clippingPlanes,i.clipIntersection,i.clipShadows,e,r,s)}!1===i.needsUpdate&&(void 0===r.program||i.fog&&r.fog!==t||i.lights&&r.lightsHash!==a.state.hash||void 0!==r.numClippingPlanes&&(r.numClippingPlanes!==$.numPlanes||r.numIntersection!==$.numIntersection))&&(i.needsUpdate=!0),i.needsUpdate&&(ye(i,t,n),i.needsUpdate=!1);var o,l,u,c,h,d,p,f,g,m,v,y,_,M,w,b,T,A,x=!1,E=!1,S=!1,D=r.program,N=D.getUniforms(),C=r.shader.uniforms;
1if(B.useProgram(D.program)&&(S=E=x=!0),i.id!==H&&(H=i.id,E=!0),x||e!==Y){if(N.setValue(z,"projectionMatrix",e.projectionMatrix),U.logarithmicDepthBuffer&&N.setValue(z,"logDepthBufFC",2/(Math.log(e.far+1)/Math.LN2)),Y!==(Q||e)&&(Y=Q||e,S=E=!0),i.isShaderMaterial||i.isMeshPhongMaterial||i.isMeshStandardMaterial||i.envMap){var L=N.map.cameraPosition;void 0!==L&&L.setValue(z,te.setFromMatrixPosition(e.matrixWorld))}(i.isMeshPhongMaterial||i.isMeshLambertMaterial||i.isMeshBasicMaterial||i.isMeshStandardMaterial||i.isShaderMaterial||i.skinning)&&N.setValue(z,"viewMatrix",e.matrixWorldInverse)}if(i.skinning){N.setOptional(z,n,"bindMatrix"),N.setOptional(z,n,"bindMatrixInverse");var I=n.skeleton;if(I){var O=I.bones;if(U.floatVertexTextures){if(void 0===I.boneTexture){var j=Math.sqrt(4*O.length);j=Ht.ceilPowerOfTwo(j),j=Math.max(j,4);var k=new Float32Array(j*j*4);k.set(I.boneMatrices);var P=new Ci(k,j,j,at,$e);P.needsUpdate=!0,I.boneMatrices=k,I.boneTexture=P,I.boneTextureSize=j}N.setValue(z,"boneTexture",I.boneTexture),N.setValue(z,"boneTextureSize",I.boneTextureSize)}else N.setOptional(z,I,"boneMatrices")}}return E&&(N.setValue(z,"toneMappingExposure",G.toneMappingExposure),N.setValue(z,"toneMappingWhitePoint",G.toneMappingWhitePoint),i.lights&&(A=S,(T=C).ambientLightColor.needsUpdate=A,T.directionalLights.needsUpdate=A,T.pointLights.needsUpdate=A,T.spotLights.needsUpdate=A,T.rectAreaLights.needsUpdate=A,T.hemisphereLights.needsUpdate=A),t&&i.fog&&(b=t,(w=C).fogColor.value=b.color,b.isFog?(w.fogNear.value=b.near,w.fogFar.value=b.far):b.isFogExp2&&(w.fogDensity.value=b.density)),i.isMeshBasicMaterial?Me(C,i):i.isMeshLambertMaterial?(Me(C,i),_=C,(M=i).emissiveMap&&(_.emissiveMap.value=M.emissiveMap)):i.isMeshPhongMaterial?(Me(C,i),i.isMeshToonMaterial?(we(v=C,y=i),y.gradientMap&&(v.gradientMap.value=y.gradientMap)):we(C,i)):i.isMeshStandardMaterial?(Me(C,i),i.isMeshPhysicalMaterial?(m=i,(g=C).clearCoat.value=m.clearCoat,g.clearCoatRoughness.value=m.clearCoatRoughness,be(g,m)):be(C,i)):i.isMeshDepthMaterial?(Me(C,i),p=C,(f=i).displacementMap&&(p.displacementMap.value=f.displacementMap,p.displacementScale.value=f.displacementScale,p.displacementBias.value=f.displacementBias)):i.isMeshDistanceMaterial?(Me(C,i),function(e,t){t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias);e.referencePosition.value.copy(t.referencePosition),e.nearDistance.value=t.nearDistance,e.farDistance.value=t.farDistance}(C,i)):i.isMeshNormalMaterial?(Me(C,i),function(e,t){t.bumpMap&&(e.bumpMap.value=t.bumpMap,e.bumpScale.value=t.bumpScale,t.side===Te&&(e.bumpScale.value*=-1));t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale),t.side===Te&&e.normalScale.value.negate());t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}(C,i)):i.isLineBasicMaterial?(d=i,(h=C).diffuse.value=d.color,h.opacity.value=d.opacity,i.isLineDashedMaterial&&(c=i,(u=C).dashSize.value=c.dashSize,u.totalSize.value=c.dashSize+c.gapSize,u.scale.value=c.scale)):i.isPointsMaterial?(l=i,(o=C).diffuse.value=l.color,o.opacity.value=l.opacity,o.size.value=l.size*q,o.scale.value=.5*W,o.map.value=l.map,null!==l.map&&(!0===l.map.matrixAutoUpdate&&l.map.updateMatrix(),o.uvTransform.value.copy(l.map.matrix))):i.isShadowMaterial&&(C.color.value=i.color,C.opacity.value=i.opacity),void 0!==C.ltc_1&&(C.ltc_1.value=Qi.LTC_1),void 0!==C.ltc_2&&(C.ltc_2.value=Qi.LTC_2),Ja.upload(z,r.uniformsList,C,G)),i.isShaderMaterial&&!0===i.uniformsNeedUpdate&&(Ja.upload(z,r.uniformsList,C,G),i.uniformsNeedUpdate=!1),N.setValue(z,"modelViewMatrix",n.modelViewMatrix),N.setValue(z,"normalMatrix",n.normalMatrix),N.setValue(z,"modelMatrix",n.matrixWorld),D}function Me(e,t){var i;e.opacity.value=t.opacity,t.color&&(e.diffuse.value=t.color),t.emissive&&e.emissive.value.copy(t.emissive).multiplyScalar(t.emissiveIntensity),t.map&&(e.map.value=t.map),t.alphaMap&&(e.alphaMap.value=t.alphaMap),t.specularMap&&(e.specularMap.value=t.specularMap),t.envMap&&(e.envMap.value=t.envMap,e.flipEnvMap.value=t.envMap&&t.envMap.isCubeTexture?-1:1,e.reflectivity.value=t.reflectivity,e.refractionRatio.value=t.refractionRatio,e.maxMipLevel.value=F.get(t.envMap).__maxMipLevel),t.lightMap&&(e.lightMap.value=t.lightMap,e.lightMapIntensity.value=t.lightMapIntensity),t.aoMap&&(e.aoMap.value=t.aoMap,e.ao
1MapIntensity.value=t.aoMapIntensity),t.map?i=t.map:t.specularMap?i=t.specularMap:t.displacementMap?i=t.displacementMap:t.normalMap?i=t.normalMap:t.bumpMap?i=t.bumpMap:t.roughnessMap?i=t.roughnessMap:t.metalnessMap?i=t.metalnessMap:t.alphaMap?i=t.alphaMap:t.emissiveMap&&(i=t.emissiveMap),void 0!==i&&(i.isWebGLRenderTarget&&(i=i.texture),!0===i.matrixAutoUpdate&&i.updateMatrix(),e.uvTransform.value.copy(i.matrix))}function we(e,t){e.specular.value=t.specular,e.shininess.value=Math.max(t.shininess,1e-4),t.emissiveMap&&(e.emissiveMap.value=t.emissiveMap),t.bumpMap&&(e.bumpMap.value=t.bumpMap,e.bumpScale.value=t.bumpScale,t.side===Te&&(e.bumpScale.value*=-1)),t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale),t.side===Te&&e.normalScale.value.negate()),t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}function be(e,t){e.roughness.value=t.roughness,e.metalness.value=t.metalness,t.roughnessMap&&(e.roughnessMap.value=t.roughnessMap),t.metalnessMap&&(e.metalnessMap.value=t.metalnessMap),t.emissiveMap&&(e.emissiveMap.value=t.emissiveMap),t.bumpMap&&(e.bumpMap.value=t.bumpMap,e.bumpScale.value=t.bumpScale,t.side===Te&&(e.bumpScale.value*=-1)),t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale),t.side===Te&&e.normalScale.value.negate()),t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias),t.envMap&&(e.envMapIntensity.value=t.envMapIntensity)}ge.setAnimationLoop(function(){ae.isPresenting()||he&&he()}),ge.setContext(window),this.setAnimationLoop=function(e){he=e,ae.setAnimationLoop(e),ge.start()},this.render=function(e,t,i,n){if(t&&t.isCamera){if(!M){C="",H=-1,!(Y=null)===e.autoUpdate&&e.updateMatrixWorld(),null===t.parent&&t.updateMatrixWorld(),ae.enabled&&(t=ae.getCamera(t)),(R=g.get(e,t)).init(),e.onBeforeRender(G,e,t,i),ee.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),Z.setFromMatrix(ee),J=this.localClippingEnabled,K=$.init(this.clippingPlanes,J,t),(p=d.get(e,t)).init(),function e(t,i,n){if(!1===t.visible)return;var r=t.layers.test(i.layers);if(r)if(t.isLight)R.pushLight(t),t.castShadow&&R.pushShadow(t);else if(t.isSprite)t.frustumCulled&&!Z.intersectsSprite(t)||R.pushSprite(t);else if(t.isImmediateRenderObject)n&&te.setFromMatrixPosition(t.matrixWorld).applyMatrix4(ee),p.push(t,null,t.material,te.z,null);else if((t.isMesh||t.isLine||t.isPoints)&&(t.isSkinnedMesh&&t.skeleton.update(),!t.frustumCulled||Z.intersectsObject(t))){n&&te.setFromMatrixPosition(t.matrixWorld).applyMatrix4(ee);var a=f.update(t),s=t.material;if(Array.isArray(s))for(var o=a.groups,l=0,u=o.length;l<u;l++){var c=o[l],h=s[c.materialIndex];h&&h.visible&&p.push(t,a,h,te.z,c)}else s.visible&&p.push(t,a,s,te.z,null)}var d=t.children;for(var l=0,u=d.length;l<u;l++)e(d[l],i,n)}(e,t,G.sortObjects),!0===G.sortObjects&&p.sort(),K&&$.beginShadows();var r=R.state.shadowsArray;se.render(r,e,t),R.setupLights(t),K&&$.endShadows(),this.info.autoReset&&this.info.reset(),void 0===i&&(i=null),this.setRenderTarget(i),v.render(p,e,t,n);var a=p.opaque,s=p.transparent;if(e.overrideMaterial){var o=e.overrideMaterial;a.length&&me(a,e,t,o),s.length&&me(s,e,t,o)}else a.length&&me(a,e,t),s.length&&me(s,e,t);var l=R.state.spritesArray;y.render(l,e,t),i&&h.updateRenderTargetMipmap(i),B.buffers.depth.setTest(!0),B.buffers.depth.setMask(!0),B.buffers.color.setMask(!0),B.setPolygonOffset(!1),e.onAfterRender(G,e,t),ae.enabled&&ae.submitFrame(),R=p=null}}else console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.")},this.allocTextureUnit=function(){var e=V;return e>=U.maxTextures&&console.warn("THREE.WebGLRenderer: Trying to use "+e+" texture units while this GPU supports only "+U.maxTextures),V+=1,e},this.setTexture2D=(de=!1,function(e,t){e&&e.isWebGLRenderTarget&&(de||(console.warn("THREE.WebGLRenderer.setTexture2D: don't use render targets as textures. Use their .texture property instead."),de=!0),e=e.texture),h.setTexture2D(e,t)}),this.setTexture=(pe=!1,function(e,t){pe||(console.warn("THREE.WebGLRenderer: .setTexture is deprecated, use setTexture2D instead."),pe=!0),h.setTexture2D(e,t)}),this.setTextureCube=(fe=!1,function(e,t){e&&e.isWebGLRenderTargetCube&&(fe||(console.warn("THREE.WebGLRenderer.setTextureCube: don't use cube render targets as textures. Use their .texture property instead."),fe=!0),e=e.texture),e&&e.isCubeTexture||Array.isArray(e.image)&&6===e.image.length?h.setTextureCube(e,t):
vendor: 6,278 bytes, line 1
1h.setTextureCubeDynamic(e,t)}),this.setFramebuffer=function(e){w=e},this.getRenderTarget=function(){return b},this.setRenderTarget=function(e){(b=e)&&void 0===F.get(e).__webglFramebuffer&&h.setupRenderTarget(e);var t=w,i=!1;if(e){var n=F.get(e).__webglFramebuffer;e.isWebGLRenderTargetCube?(t=n[e.activeCubeFace],i=!0):t=n,L.copy(e.viewport),I.copy(e.scissor),O=e.scissorTest}else L.copy(k).multiplyScalar(q),I.copy(P).multiplyScalar(q),O=X;if(T!==t&&(z.bindFramebuffer(z.FRAMEBUFFER,t),T=t),B.viewport(L),B.scissor(I),B.setScissorTest(O),i){var r=F.get(e.texture);z.framebufferTexture2D(z.FRAMEBUFFER,z.COLOR_ATTACHMENT0,z.TEXTURE_CUBE_MAP_POSITIVE_X+e.activeCubeFace,r.__webglTexture,e.activeMipMapLevel)}},this.readRenderTargetPixels=function(e,t,i,n,r,a){if(e&&e.isWebGLRenderTarget){var s=F.get(e).__webglFramebuffer;if(s){var o=!1;s!==T&&(z.bindFramebuffer(z.FRAMEBUFFER,s),o=!0);try{var l=e.texture,u=l.format,c=l.type;if(u!==at&&_.convert(u)!==z.getParameter(z.IMPLEMENTATION_COLOR_READ_FORMAT))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");if(!(c===Qe||_.convert(c)===z.getParameter(z.IMPLEMENTATION_COLOR_READ_TYPE)||c===$e&&(A.get("OES_texture_float")||A.get("WEBGL_color_buffer_float"))||c===Ke&&A.get("EXT_color_buffer_half_float")))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");z.checkFramebufferStatus(z.FRAMEBUFFER)===z.FRAMEBUFFER_COMPLETE?0<=t&&t<=e.width-n&&0<=i&&i<=e.height-r&&z.readPixels(t,i,n,r,_.convert(u),_.convert(c),a):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.")}finally{o&&z.bindFramebuffer(z.FRAMEBUFFER,T)}}}else console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.")},this.copyFramebufferToTexture=function(e,t,i){var n=t.image.width,r=t.image.height,a=_.convert(t.format);this.setTexture2D(t,0),z.copyTexImage2D(z.TEXTURE_2D,i||0,a,e.x,e.y,n,r,0)},this.copyTextureToTexture=function(e,t,i,n){var r=t.image.width,a=t.image.height,s=_.convert(i.format),o=_.convert(i.type);this.setTexture2D(i,0),t.isDataTexture?z.texSubImage2D(z.TEXTURE_2D,n||0,e.x,e.y,r,a,s,o,t.image.data):z.texSubImage2D(z.TEXTURE_2D,n||0,e.x,e.y,s,o,t.image)}}function Ks(e,t){this.name="",this.color=new Fi(e),this.density=void 0!==t?t:25e-5}function Js(e,t,i){this.name="",this.color=new Fi(e),this.near=void 0!==t?t:1,this.far=void 0!==i?i:1e3}function eo(){vn.call(this),this.type="Scene",this.background=null,this.fog=null,this.overrideMaterial=null,this.autoUpdate=!0}function to(e){Yr.call(this),this.type="SpriteMaterial",this.color=new Fi(16777215),this.map=null,this.rotation=0,this.fog=!1,this.lights=!1,this.setValues(e)}function io(e){vn.call(this),this.type="Sprite",this.material=void 0!==e?e:new to,this.center=new Yt(.5,.5)}function no(){vn.call(this),this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]}})}function ro(e,t){if(e=e||[],this.bones=e.slice(0),this.boneMatrices=new Float32Array(16*this.bones.length),void 0===t)this.calculateInverses();else if(this.bones.length===t.length)this.boneInverses=t.slice(0);else{console.warn("THREE.Skeleton boneInverses is the wrong length."),this.boneInverses=[];for(var i=0,n=this.bones.length;i<n;i++)this.boneInverses.push(new Qt)}}function ao(){vn.call(this),this.type="Bone"}function so(e,t){Zr.call(this,e,t),this.type="SkinnedMesh",this.bindMode="attached",this.bindMatrix=new Qt,this.bindMatrixInverse=new Qt;var i=new ro(this.initBones());this.bind(i,this.matrixWorld),this.normalizeSkinWeights()}function oo(e){Yr.call(this),this.type="LineBasicMaterial",this.color=new Fi(16777215),this.linewidth=1,this.linecap="round",this.linejoin="round",this.lights=!1,this.setValues(e)}function lo(e,t,i){if(1===i)return console.warn("THREE.Line: parameter THREE.LinePieces no longer supported. Created THREE.LineSegments instead."),new uo(e,t);vn.call(this),this.type="Line",this.geometry=void 0!==e?e:new Jn,this.material=void 0!==t?t:new oo({color:16777215*Math.random()})}function uo(e,t){lo.call(this,e,t),this.type="LineSegments"}function co(e,t){lo.call(this,e,t),this.type="LineLoop"}function ho(e){Yr.call(this),this.type="PointsMaterial",this.color=new Fi(16777215),this.map=null,this.size=1,this.sizeAttenuation=!0,this.morphTargets=!1,this.lights=!1,this.setValues(e)}function po(e,t){vn.call(this),this.type="Points",this.geometry=void 0!==e?e:new Jn,this.material=void 0!==t?t:new ho({color:16777215*Math.random()})}function fo(){vn.call(this),this.type="Group"}function go(e,t,i,n,r,a,s,o,l){Ei.call(this,e,t,i,n,r,a,s,o,l),this.generateMipmaps=!1}function mo(e,t,i,n,r,a,s,o,l,u,c,h){Ei.call(this,null,a,s,o,l,u,n,r,c,h),this.image={width:t,height:i},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}function vo(e,t,i,n,r,a,s,o,l,u){if((u=void 0!==u?u:lt)!==lt&&u!==ut)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===i&&u===lt&&(i=qe),void 0===i&&u===ut&&(i=it),Ei.call(this,null,n,r,a,s,o,u,i,l),this.image={width:e,height:t},this.magFilter=void 0!==s?s:Ue,this.minFilter=void 0!==o?o:Ue,this.flipY=!1,this.generateMipmaps=!1}function yo(e){Jn.call(this),this.type="WireframeGeometry";var t,i,n,r,a,s,o,l,u,c,h=[],d=[0,0],p={},f=["a","b","c"];if(e&&e.isGeometry){var g=e.faces;for(t=0,n=g.length;t<n;t++){var m=g[t];for(i=0;i<3;i++)o=m[f[i]],l=m[f[(i+1)%3]],d[0]=Math.min(o,l),d[1]=Math.max(o,l),void 0===p[u=d[0]+","+d[1]]&&(p[u]={index1:d[0],index2:d[1]})}for(u in p)s=p[u],c=e.vertices[s.index1],h.push(c.x,c.y,c.z),c=e.vertices[s.index2],h.push(c.x,c.y,c.z)}else if(e&&e.isBufferGeometry){var v,y,_,M,w,b;if(c=new Wt,null!==e.index){for(v=e.attributes.position,y=e.index,0===(_=e.groups).length&&(_=[{start:0,count:y.count,materialIndex:0}]),r=0,a=_.length;r<a;++r)for(n=(t=(M=_[r]).start)+M.count;t<n;t+=3)for(i=0;i<3;i++)o=y.getX(t+i),l=y.getX(t+(i+1)%3),d[0]=Math.min(o,l),d[1]=Math.max(o,l),void 0===p[u=d[0]+","+d[1]]&&(p[u]={index1:d[0],index2:d[1]});for(u in p)s=p[u],c.fromBufferAttribute(v,s.index1),h.push(c.x,c.y,c.z),c.fromBufferAttribute(v,s.index2),h.push(c.x,c.y,c.z)}
vendor: 4,108 bytes, line 1
1else for(t=0,n=(v=e.attributes.position).count/3;t<n;t++)for(i=0;i<3;i++)w=3*t+i,c.fromBufferAttribute(v,w),h.push(c.x,c.y,c.z),b=3*t+(i+1)%3,c.fromBufferAttribute(v,b),h.push(c.x,c.y,c.z)}this.addAttribute("position",new zn(h,3))}function _o(e,t,i){Nn.call(this),this.type="ParametricGeometry",this.parameters={func:e,slices:t,stacks:i},this.fromBufferGeometry(new Mo(e,t,i)),this.mergeVertices()}function Mo(e,t,i){Jn.call(this),this.type="ParametricBufferGeometry",this.parameters={func:e,slices:t,stacks:i};var n,r,a=[],s=[],o=[],l=[],u=new Wt,c=new Wt,h=new Wt,d=new Wt,p=new Wt;e.length<3&&console.error("THREE.ParametricGeometry: Function must now modify a Vector3 as third parameter.");var f=t+1;for(n=0;n<=i;n++){var g=n/i;for(r=0;r<=t;r++){var m=r/t;e(m,g,c),s.push(c.x,c.y,c.z),0<=m-1e-5?(e(m-1e-5,g,h),d.subVectors(c,h)):(e(1e-5+m,g,h),d.subVectors(h,c)),0<=g-1e-5?(e(m,g-1e-5,h),p.subVectors(c,h)):(e(m,1e-5+g,h),p.subVectors(h,c)),u.crossVectors(d,p).normalize(),o.push(u.x,u.y,u.z),l.push(m,g)}}for(n=0;n<i;n++)for(r=0;r<t;r++){var v=n*f+r,y=n*f+r+1,_=(n+1)*f+r+1,M=(n+1)*f+r;a.push(v,y,M),a.push(y,_,M)}this.setIndex(a),this.addAttribute("position",new zn(s,3)),this.addAttribute("normal",new zn(o,3)),this.addAttribute("uv",new zn(l,2))}function wo(e,t,i,n){Nn.call(this),this.type="PolyhedronGeometry",this.parameters={vertices:e,indices:t,radius:i,detail:n},this.fromBufferGeometry(new bo(e,t,i,n)),this.mergeVertices()}function bo(n,a,e,t){Jn.call(this),this.type="PolyhedronBufferGeometry",this.parameters={vertices:n,indices:a,radius:e,detail:t},e=e||1;var c=[],h=[];function s(e,t,i,n){var r,a,s=Math.pow(2,n),o=[];for(r=0;r<=s;r++){o[r]=[];var l=e.clone().lerp(i,r/s),u=t.clone().lerp(i,r/s),c=s-r;for(a=0;a<=c;a++)o[r][a]=0===a&&r===s?l:l.clone().lerp(u,a/c)}for(r=0;r<s;r++)for(a=0;a<2*(s-r)-1;a++){var h=Math.floor(a/2);a%2==0?(d(o[r][h+1]),d(o[r+1][h]),d(o[r][h])):(d(o[r][h+1]),d(o[r+1][h+1]),d(o[r+1][h]))}}function d(e){c.push(e.x,e.y,e.z)}function o(e,t){var i=3*e;t.x=n[0+i],t.y=n[1+i],t.z=n[2+i]}function p(e,t,i,n){n<0&&1===e.x&&(h[t]=e.x-1),0===i.x&&0===i.z&&(h[t]=n/2/Math.PI+.5)}function f(e){return Math.atan2(e.z,-e.x)}!function(e){for(var t=new Wt,i=new Wt,n=new Wt,r=0;r<a.length;r+=3)o(a[r+0],t),o(a[r+1],i),o(a[r+2],n),s(t,i,n,e)}(t=t||0),function(e){for(var t=new Wt,i=0;i<c.length;i+=3)t.x=c[i+0],t.y=c[i+1],t.z=c[i+2],t.normalize().multiplyScalar(e),c[i+0]=t.x,c[i+1]=t.y,c[i+2]=t.z}(e),function(){for(var e=new Wt,t=0;t<c.length;t+=3){e.x=c[t+0],e.y=c[t+1],e.z=c[t+2];var i=f(e)/2/Math.PI+.5,n=(r=e,Math.atan2(-r.y,Math.sqrt(r.x*r.x+r.z*r.z))/Math.PI+.5);h.push(i,1-n)}var r;(function(){for(var e=new Wt,t=new Wt,i=new Wt,n=new Wt,r=new Yt,a=new Yt,s=new Yt,o=0,l=0;o<c.length;o+=9,l+=6){e.set(c[o+0],c[o+1],c[o+2]),t.set(c[o+3],c[o+4],c[o+5]),i.set(c[o+6],c[o+7],c[o+8]),r.set(h[l+0],h[l+1]),a.set(h[l+2],h[l+3]),s.set(h[l+4],h[l+5]),n.copy(e).add(t).add(i).divideScalar(3);var u=f(n);p(r,l+0,e,u),p(a,l+2,t,u),p(s,l+4,i,u)}})(),function(){for(var e=0;e<h.length;e+=6){var t=h[e+0],i=h[e+2],n=h[e+4],r=Math.max(t,i,n),a=Math.min(t,i,n);.9<r&&a<.1&&(t<.2&&(h[e+0]+=1),i<.2&&(h[e+2]+=1),n<.2&&(h[e+4]+=1))}}()}(),this.addAttribute("position",new zn(c,3)),this.addAttribute("normal",new zn(c.slice(),3)),this.addAttribute("uv",new zn(h,2)),0===t?this.computeVertexNormals():this.normalizeNormals()}function To(e,t){Nn.call(this),this.type="TetrahedronGeometry",this.parameters={radius:e,detail:t},this.fromBufferGeometry(new Ao(e,t)),this.mergeVertices()}function Ao(e,t){bo.call(this,[1,1,1,-1,-1,1,-1,1,-1,1,-1,-1],[2,1,0,0,3,2,1,3,0,2,3,1],e,t),this.type="TetrahedronBufferGeometry",this.parameters={radius:e,detail:t}}function xo(e,t){Nn.call(this),this.type="OctahedronGeometry",this.parameters={radius:e,detail:t},this.fromBufferGeometry(new Eo(e,t)),this.mergeVertices()}function Eo(e,t){bo.call(this,[1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1],[0,2,4,0,4,3,0,3,5,0,5,2,1,2,5,1,5,3,1,3,4,1,4,2],e,t),this.type="OctahedronBufferGeometry",this.parameters={radius:e,detail:t}}function So(e,t){Nn.call(this),this.type="IcosahedronGeometry",this.parameters={radiu
vendor: 2,371 bytes, line 1
1s:e,detail:t},this.fromBufferGeometry(new Do(e,t)),this.mergeVertices()}function Do(e,t){var i=(1+Math.sqrt(5))/2;bo.call(this,[-1,i,0,1,i,0,-1,-i,0,1,-i,0,0,-1,i,0,1,i,0,-1,-i,0,1,-i,i,0,-1,i,0,1,-i,0,-1,-i,0,1],[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1],e,t),this.type="IcosahedronBufferGeometry",this.parameters={radius:e,detail:t}}function No(e,t){Nn.call(this),this.type="DodecahedronGeometry",this.parameters={radius:e,detail:t},this.fromBufferGeometry(new Co(e,t)),this.mergeVertices()}function Co(e,t){var i=(1+Math.sqrt(5))/2,n=1/i;bo.call(this,[-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-n,-i,0,-n,i,0,n,-i,0,n,i,-n,-i,0,-n,i,0,n,-i,0,n,i,0,-i,0,-n,i,0,-n,-i,0,n,i,0,n],[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,19,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9],e,t),this.type="DodecahedronBufferGeometry",this.parameters={radius:e,detail:t}}function Lo(e,t,i,n,r,a){Nn.call(this),this.type="TubeGeometry",this.parameters={path:e,tubularSegments:t,radius:i,radialSegments:n,closed:r},void 0!==a&&console.warn("THREE.TubeGeometry: taper has been removed.");var s=new Io(e,t,i,n,r);this.tangents=s.tangents,this.normals=s.normals,this.binormals=s.binormals,this.fromBufferGeometry(s),this.mergeVertices()}function Io(s,o,l,u,e){Jn.call(this),this.type="TubeBufferGeometry",this.parameters={path:s,tubularSegments:o,radius:l,radialSegments:u,closed:e},o=o||64,l=l||1,u=u||8,e=e||!1;var c=s.computeFrenetFrames(o,e);this.tangents=c.tangents,this.normals=c.normals,this.binormals=c.binormals;var r,h,d=new Wt,p=new Wt,t=new Yt,f=new Wt,g=[],m=[],i=[],a=[];function n(e){f=s.getPointAt(e/o,f);var t=c.normals[e],i=c.binormals[e];for(h=0;h<=u;h++){var n=h/u*Math.PI*2,r=Math.sin(n),a=-Math.cos(n);p.x=a*t.x+r*i.x,p.y=a*t.y+r*i.y,p.z=a*t.z+r*i.z,p.normalize(),m.push(p.x,p.y,p.z),d.x=f.x+l*p.x,d.y=f.y+l*p.y,d.z=f.z+l*p.z,g.push(d.x,d.y,d.z)}}!function(){for(r=0;r<o;r++)n(r);n(!1===e?o:0),function(){for(r=0;r<=o;r++)for(h=0;h<=u;h++)t.x=r/o,t.y=h/u,i.push(t.x,t.y)}(),function(){for(h=1;h<=o;h++)for(r=1;r<=u;r++){var e=(u+1)*(h-1)+(r-1),t=(u+1)*h+(r-1),i=(u+1)*h+r,n=(u+1)*(h-1)+r;
vendor: 4,306 bytes, line 1
1a.push(e,t,n),a.push(t,i,n)}}()}(),this.setIndex(a),this.addAttribute("position",new zn(g,3)),this.addAttribute("normal",new zn(m,3)),this.addAttribute("uv",new zn(i,2))}function Oo(e,t,i,n,r,a,s){Nn.call(this),this.type="TorusKnotGeometry",this.parameters={radius:e,tube:t,tubularSegments:i,radialSegments:n,p:r,q:a},void 0!==s&&console.warn("THREE.TorusKnotGeometry: heightScale has been deprecated. Use .scale( x, y, z ) instead."),this.fromBufferGeometry(new jo(e,t,i,n,r,a)),this.mergeVertices()}function jo(e,t,i,n,r,a){Jn.call(this),this.type="TorusKnotBufferGeometry",this.parameters={radius:e,tube:t,tubularSegments:i,radialSegments:n,p:r,q:a},e=e||1,t=t||.4,i=Math.floor(i)||64,n=Math.floor(n)||8,r=r||2,a=a||3;var s,o,l=[],u=[],c=[],h=[],d=new Wt,p=new Wt,f=new Wt,g=new Wt,m=new Wt,v=new Wt,y=new Wt;for(s=0;s<=i;++s){var _=s/i*r*Math.PI*2;for(S(_,r,a,e,f),S(.01+_,r,a,e,g),v.subVectors(g,f),y.addVectors(g,f),m.crossVectors(v,y),y.crossVectors(m,v),m.normalize(),y.normalize(),o=0;o<=n;++o){var M=o/n*Math.PI*2,w=-t*Math.cos(M),b=t*Math.sin(M);d.x=f.x+(w*y.x+b*m.x),d.y=f.y+(w*y.y+b*m.y),d.z=f.z+(w*y.z+b*m.z),u.push(d.x,d.y,d.z),p.subVectors(d,f).normalize(),c.push(p.x,p.y,p.z),h.push(s/i),h.push(o/n)}}for(o=1;o<=i;o++)for(s=1;s<=n;s++){var T=(n+1)*(o-1)+(s-1),A=(n+1)*o+(s-1),x=(n+1)*o+s,E=(n+1)*(o-1)+s;l.push(T,A,E),l.push(A,x,E)}function S(e,t,i,n,r){var a=Math.cos(e),s=Math.sin(e),o=i/t*e,l=Math.cos(o);r.x=n*(2+l)*.5*a,r.y=n*(2+l)*s*.5,r.z=n*Math.sin(o)*.5}this.setIndex(l),this.addAttribute("position",new zn(u,3)),this.addAttribute("normal",new zn(c,3)),this.addAttribute("uv",new zn(h,2))}function ko(e,t,i,n,r){Nn.call(this),this.type="TorusGeometry",this.parameters={radius:e,tube:t,radialSegments:i,tubularSegments:n,arc:r},this.fromBufferGeometry(new Po(e,t,i,n,r)),this.mergeVertices()}function Po(e,t,i,n,r){Jn.call(this),this.type="TorusBufferGeometry",this.parameters={radius:e,tube:t,radialSegments:i,tubularSegments:n,arc:r},e=e||1,t=t||.4,i=Math.floor(i)||8,n=Math.floor(n)||6,r=r||2*Math.PI;var a,s,o=[],l=[],u=[],c=[],h=new Wt,d=new Wt,p=new Wt;for(a=0;a<=i;a++)for(s=0;s<=n;s++){var f=s/n*r,g=a/i*Math.PI*2;d.x=(e+t*Math.cos(g))*Math.cos(f),d.y=(e+t*Math.cos(g))*Math.sin(f),d.z=t*Math.sin(g),l.push(d.x,d.y,d.z),h.x=e*Math.cos(f),h.y=e*Math.sin(f),p.subVectors(d,h).normalize(),u.push(p.x,p.y,p.z),c.push(s/n),c.push(a/i)}for(a=1;a<=i;a++)for(s=1;s<=n;s++){var m=(n+1)*a+s-1,v=(n+1)*(a-1)+s-1,y=(n+1)*(a-1)+s,_=(n+1)*a+s;o.push(m,v,_),o.push(v,y,_)}this.setIndex(o),this.addAttribute("position",new zn(l,3)),this.addAttribute("normal",new zn(u,3)),this.addAttribute("uv",new zn(c,2))}((Us.prototype=Object.create(Yr.prototype)).constructor=Us).prototype.isMeshDepthMaterial=!0,Us.prototype.copy=function(e){return Yr.prototype.copy.call(this,e),this.depthPacking=e.depthPacking,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this},((Bs.prototype=Object.create(Yr.prototype)).constructor=Bs).prototype.isMeshDistanceMaterial=!0,Bs.prototype.copy=function(e){return Yr.prototype.copy.call(this,e),this.referencePosition.copy(e.referencePosition),this.nearDistance=e.nearDistance,this.farDistance=e.farDistance,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this},((Gs.prototype=Object.create(Ei.prototype)).constructor=Gs).prototype.isCanvasTexture=!0,Ws.prototype=Object.assign(Object.create(yn.prototype),{constructor:Ws,isPerspectiveCamera:!0,copy:function(e,t){return yn.prototype.copy.call(this,e,t),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=null===e.view?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this},setFocalLength:function(e){var t=.5*this.getFilmHeight()/e;this.fov=2*Ht.RAD2DEG*Math.atan(t),this.updateProjectionMatrix()},getFocalLength:function(){var e=Math.tan(.5*Ht.DEG2RAD*this.fov);return.5*this.getFilmHeight()/e}
vendor: 14,494 bytes, line 1
1,getEffectiveFOV:function(){return 2*Ht.RAD2DEG*Math.atan(Math.tan(.5*Ht.DEG2RAD*this.fov)/this.zoom)},getFilmWidth:function(){return this.filmGauge*Math.min(this.aspect,1)},getFilmHeight:function(){return this.filmGauge/Math.max(this.aspect,1)},setViewOffset:function(e,t,i,n,r,a){this.aspect=e/t,null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=i,this.view.offsetY=n,this.view.width=r,this.view.height=a,this.updateProjectionMatrix()},clearViewOffset:function(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()},updateProjectionMatrix:function(){var e=this.near,t=e*Math.tan(.5*Ht.DEG2RAD*this.fov)/this.zoom,i=2*t,n=this.aspect*i,r=-.5*n,a=this.view;if(null!==this.view&&this.view.enabled){var s=a.fullWidth,o=a.fullHeight;r+=a.offsetX*n/s,t-=a.offsetY*i/o,n*=a.width/s,i*=a.height/o}var l=this.filmOffset;0!==l&&(r+=e*l/this.getFilmWidth()),this.projectionMatrix.makePerspective(r,r+n,t,t-i,e,this.far)},toJSON:function(e){var t=vn.prototype.toJSON.call(this,e);return t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,null!==this.view&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}}),qs.prototype=Object.assign(Object.create(Ws.prototype),{constructor:qs,isArrayCamera:!0}),Ks.prototype.isFogExp2=!0,Ks.prototype.clone=function(){return new Ks(this.color,this.density)},Ks.prototype.toJSON=function(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}},Js.prototype.isFog=!0,Js.prototype.clone=function(){return new Js(this.color,this.near,this.far)},Js.prototype.toJSON=function(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}},eo.prototype=Object.assign(Object.create(vn.prototype),{constructor:eo,copy:function(e,t){return vn.prototype.copy.call(this,e,t),null!==e.background&&(this.background=e.background.clone()),null!==e.fog&&(this.fog=e.fog.clone()),null!==e.overrideMaterial&&(this.overrideMaterial=e.overrideMaterial.clone()),this.autoUpdate=e.autoUpdate,this.matrixAutoUpdate=e.matrixAutoUpdate,this},toJSON:function(e){var t=vn.prototype.toJSON.call(this,e);return null!==this.background&&(t.object.background=this.background.toJSON(e)),null!==this.fog&&(t.object.fog=this.fog.toJSON()),t}}),((to.prototype=Object.create(Yr.prototype)).constructor=to).prototype.isSpriteMaterial=!0,to.prototype.copy=function(e){return Yr.prototype.copy.call(this,e),this.color.copy(e.color),this.map=e.map,this.rotation=e.rotation,this},io.prototype=Object.assign(Object.create(vn.prototype),{constructor:io,isSprite:!0,raycast:(vs=new Wt,ys=new Wt,_s=new Wt,function(e,t){ys.setFromMatrixPosition(this.matrixWorld),e.ray.closestPointToPoint(ys,vs),_s.setFromMatrixScale(this.matrixWorld);var i=_s.x*_s.y/4;if(!(ys.distanceToSquared(vs)>i)){var n=e.ray.origin.distanceTo(vs);n<e.near||n>e.far||t.push({distance:n,point:vs.clone(),face:null,object:this})}}),clone:function(){return new this.constructor(this.material).copy(this)},copy:function(e){return vn.prototype.copy.call(this,e),void 0!==e.center&&this.center.copy(e.center),this}}),no.prototype=Object.assign(Object.create(vn.prototype),{constructor:no,copy:function(e){vn.prototype.copy.call(this,e,!1);for(var t=e.levels,i=0,n=t.length;i<n;i++){var r=t[i];this.addLevel(r.object.clone(),r.distance)}return this},addLevel:function(e,t){void 0===t&&(t=0),t=Math.abs(t);for(var i=this.levels,n=0;n<i.length&&!(t<i[n].distance);n++);i.splice(n,0,{distance:t,object:e}),this.add(e)},getObjectForDistance:function(e){for(var t=this.levels,i=1,n=t.length;i<n&&!(e<t[i].distance);i++);return t[i-1].object},raycast:(bs=new Wt,function(e,t){bs.setFromMatrixPosition(this.matrixWorld);var i=e.ray.origin.distanceTo(bs);this.getObjectForDistance(i).raycast(e,t)}),update:(Ms=new Wt,ws=new Wt,function(e){var t=this.levels;if(1<t.length){Ms.setFromMatrixPosition(e.matrixWorld),ws.setFromMatrixPosition(this.matrixWorld);var i=Ms.distanceTo(ws);t[0].object.visible=!0;for(var n=1,r=t.length;n<r&&i>=t[n].distance;n++)t[n-1].object.visible=!1,t[n].object.visible=!0;for(;n<r;n++)t[n].object.visible=!1}}),toJSON:function(e){var t=vn.prototype.toJSON.call(this,e);t.object.levels=[];for(var i=this.levels,n=0,r=i.length;n<r;n++){var a=i[n];t.object.levels.push({object:a.object.uuid,distance:a.distance})}return t}}),Object.assign(ro.prototype,{calculateInverses:function(){this.boneInverses=[];for(var e=0,t=this.bones.length;e<t;e++){var i=new Qt;this.bones[e]&&i.getInverse(this.bones[e].matrixWorld),this.boneInverses.push(i)}},pose:function(){var e,t,i;for(t=0,i=this.bones.length;t<i;t++)(e=this.bones[t])&&e.matrixWorld.getInverse(this.boneInverses[t]);for(t=0,i=this.bones.length;t<i;t++)(e=this.bones[t])&&(e.parent&&e.parent.isBone?(e.matrix.getInverse(e.parent.matrixWorld),e.matrix.multiply(e.matrixWorld)):e.matrix.copy(e.matrixWorld),e.matrix.decompose(e.position,e.quaternion,e.scale))},update:(Ts=new Qt,As=new Qt,function(){for(var e=this.bones,t=this.boneInverses,i=this.boneMatrices,n=this.boneTexture,r=0,a=e.length;r<a;r++){var s=e[r]?e[r].matrixWorld:As;Ts.multiplyMatrices(s,t[r]),Ts.toArray(i,16*r)}void 0!==n&&(n.needsUpdate=!0)}),clone:function(){return new ro(this.bones,this.boneInverses)},getBoneByName:function(e){for(var t=0,i=this.bones.length;t<i;t++){var n=this.bones[t];if(n.name===e)return n}}}),ao.prototype=Object.assign(Object.create(vn.prototype),{constructor:ao,isBone:!0}),so.prototype=Object.assign(Object.create(Zr.prototype),{constructor:so,isSkinnedMesh:!0,initBones:function(){var e,t,i,n,r=[];if(this.geometry&&void 0!==this.geometry.bones){for(i=0,n=this.geometry.bones.length;i<n;i++)t=this.geometry.bones[i],e=new ao,r.push(e),e.name=t.name,e.position.fromArray(t.pos),e.quaternion.fromArray(t.rotq),void 0!==t.scl&&e.scale.fromArray(t.scl);for(i=0,n=this.geometry.bones.length;i<n;i++)-1!==(t=this.geometry.bones[i]).parent&&null!==t.parent&&void 0!==r[t.parent]?r[t.parent].add(r[i]):this.add(r[i])}return this.updateMatrixWorld(!0),r},bind:function(e,t){this.skeleton=e,void 0===t&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),t=this.matrixWorld),this.bindMatrix.copy(t),this.bindMatrixInverse.getInverse(t)},pose:function(){this.skeleton.pose()},normalizeSkinWeights:function(){var e,t;if(this.geometry&&this.geometry.isGeometry)for(t=0;t<this.geometry.skinWeights.length;t++){var i=this.geometry.skinWeights[t];(e=1/i.manhattanLength())!==1/0?i.multiplyScalar(e):i.set(1,0,0,0)}else if(this.geometry&&this.geometry.isBufferGeometry){var n=new Si,r=this.geometry.attributes.skinWeight;for(t=0;t<r.count;t++)n.x=r.getX(t),n.y=r.getY(t),n.z=r.getZ(t),n.w=r.getW(t),(e=1/n.manhattanLength())!==1/0?n.multiplyScalar(e):n.set(1,0,0,0),r.setXYZW(t,n.x,n.y,n.z,n.w)}},updateMatrixWorld:function(e){Zr.prototype.updateMatrixWorld.call(this,e),"attached"===this.bindMode?this.bindMatrixInverse.getInverse(this.matrixWorld):"detached"===this.bindMode?this.bindMatrixInverse.getInverse(this.bindMatrix):console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)},clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),((oo.prototype=Object.create(Yr.prototype)).constructor=oo).prototype.isLineBasicMaterial=!0,oo.prototype.copy=function(e){return Yr.prototype.copy.call(this,e),this.color.copy(e.color),this.linewidth=e.linewidth,this.linecap=e.linecap,this.linejoin=e.linejoin,this},lo.prototype=Object.assign(Object.create(vn.prototype),{constructor:lo,isLine:!0,computeLineDistances:(Ds=new Wt,Ns=new Wt,function(){var e=this.geometry;if(e.isBufferGeometry)if(null===e.index){for(var t=e.attributes.position,i=[0],n=1,r=t.count;n<r;n++)Ds.fromBufferAttribute(t,n-1),Ns.fromBufferAttribute(t,n),i[n]=i[n-1],i[n]+=Ds.distanceTo(Ns);e.addAttribute("lineDistance",new zn(i,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else if(e.isGeometry){var a=e.vertices;for((i=e.lineDistances)[0]=0,n=1,r=a.length;n<r;n++)i[n]=i[n-1],i[n]+=a[n-1].distanceTo(a[n])}return this}),raycast:(xs=new Qt,Es=new Wr,Ss=new ji,function(e,t){var i=e.linePrecision,n=i*i,r=this.geometry,a=this.matrixWorld;if(null===r.boundingSphere&&r.computeBoundingSphere(),Ss.copy(r.boundingSphere),Ss.applyMatrix4(a),!1!==e.ray.intersectsSphere(Ss)){xs.getInverse(a),Es.copy(e.ray).applyMatrix4(xs);var s=new Wt,o=new Wt,l=new Wt,u=new Wt,c=this&&this.isLineSegments?2:1;if(r.isBufferGeometry){var h=r.index,d=r.attributes.position.array;if(null!==h)for(var p=h.array,f=0,g=p.length-1;f<g;f+=c){var m=p[f],v=p[f+1];s.fromArray(d,3*m),o.fromArray(d,3*v),n<Es.distanceSqToSegment(s,o,u,l)||(u.applyMatrix4(this.matrixWorld),(M=e.ray.origin.distanceTo(u))<e.near||M>e.far||t.push({distance:M,point:l.clone().applyMatrix4(this.matrixWorld),index:f,face:null,faceIndex:null,object:this}))}else for(f=0,g=d.length/3-1;f<g;f+=c)s.fromArray(d,3*f),o.fromArray(d,3*f+3),n<Es.distanceSqToSegment(s,o,u,l)||(u.applyMatrix4(this.matrixWorld),(M=e.ray.origin.distanceTo(u))<e.near||M>e.far||t.push({distance:M,point:l.clone().applyMatrix4(this.matrixWorld),index:f,face:null,faceIndex:null,object:this}))}else if(r.isGeometry){var y=r.vertices,_=y.length;for(f=0;f<_-1;f+=c){var M;n<Es.distanceSqToSegment(y[f],y[f+1],u,l)||(u.applyMatrix4(this.matrixWorld),(M=e.ray.origin.distanceTo(u))<e.near||M>e.far||t.push({distance:M,point:l.clone().applyMatrix4(this.matrixWorld),index:f,face:null,faceIndex:null,object:this}))}}}}),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),uo.prototype=Object.assign(Object.create(lo.prototype),{constructor:uo,isLineSegments:!0,computeLineDistances:(Cs=new Wt,Ls=new Wt,function(){var e=this.geometry;if(e.isBufferGeometry)if(null===e.index){for(var t=e.attributes.position,i=[],n=0,r=t.count;n<r;n+=2)Cs.fromBufferAttribute(t,n),Ls.fromBufferAttribute(t,n+1),i[n]=0===n?0:i[n-1],i[n+1]=i[n]+Cs.distanceTo(Ls);e.addAttribute("lineDistance",new zn(i,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else if(e.isGeometry){var a=e.vertices;for(i=e.lineDistances,n=0,r=a.length;n<r;n+=2)Cs.copy(a[n]),Ls.copy(a[n+1]),i[n]=0===n?0:i[n-1],i[n+1]=i[n]+Cs.distanceTo(Ls)}return this})}),co.prototype=Object.assign(Object.create(lo.prototype),{constructor:co,isLineLoop:!0}),((ho.prototype=Object.create(Yr.prototype)).constructor=ho).prototype.isPointsMaterial=!0,ho.prototype.copy=function(e){return Yr.prototype.copy.call(this,e),this.color.copy(e.color),this.map=e.map,this.size=e.size,this.sizeAttenuation=e.sizeAttenuation,this.morphTargets=e.morphTargets,this},po.prototype=Object.assign(Object.create(vn.prototype),{constructor:po,isPoints:!0,raycast:(Is=new Qt,Os=new Wr,js=new ji,function(r,a){var s=this,e=this.geometry,o=this.matrixWorld,t=r.params.Points.threshold;if(null===e.boundingSphere&&e.computeBoundingSphere(),js.copy(e.boundingSphere),js.applyMatrix4(o),js.radius+=t,!1!==r.ray.intersectsSphere(js)){Is.getInverse(o),Os.copy(r.ray).applyMatrix4(Is);var i=t/((this.scale.x+this.scale.y+this.scale.z)/3),l=i*i,n=new Wt,u=new Wt;if(e.isBufferGeometry){var c=e.index,h=e.attributes.position.array;if(null!==c)for(var d=c.array,p=0,f=d.length;p<f;p++){var g=d[p];n.fromArray(h,3*g),y(n,g)}else{p=0;for(var m=h.length/3;p<m;p++)n.fromArray(h,3*p),y(n,p)}}else{var v=e.vertices;for(p=0,m=v.length;p<m;p++)y(v[p],p)}}function y(e,t){var i=Os.distanceSqToPoint(e);if(i<l){Os.closestPointToPoint(e,u),u.applyMatrix4(o);var n=r.ray.origin.distanceTo(u);if(n<r.near||n>r.far)return;a.push({distance:n,distanceToRay:Math.sqrt(i),point:u.clone(),index:t,face:null,object:s})}}}),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),fo.prototype=Object.assign(Object.create(vn.prototype),{constructor:fo,isGroup:!0}),go.prototype=Object.assign(Object.create(Ei.prototype),{constructor:go,isVideoTexture:!0,update:function(){var e=this.image;e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}),((mo.prototype=Object.create(Ei.prototype)).constructor=mo).prototype.isCompressedTexture=!0,((vo.prototype=Object.create(Ei.prototype)).constructor=vo).prototype.isDepthTexture=!0,(yo.prototype=Object.create(Jn.prototype)).constructor=yo,(_o.prototype=Object.create(Nn.prototype)).constructor=_o,(Mo.prototype=Object.create(Jn.prototype)).constructor=Mo,(wo.prototype=Object.create(Nn.prototype)).constructor=wo,(bo.prototype=Object.create(Jn.prototype)).constructor=bo,(To.prototype=Object.create(Nn.prototype)).constructor=To,(Ao.prototype=Object.create(bo.prototype)).constructor=Ao,(xo.prototype=Object.create(Nn.prototype)).constructor=xo,(Eo.prototype=Object.create(bo.prototype)).constructor=Eo,(So.prototype=Object.create(Nn.prototype)).constructor=So,(Do.prototype=Object.create(bo.prototype)).constructor=Do,(No.prototype=Object.create(Nn.prototype)).constructor=No,(Co.prototype=Object.create(bo.prototype)).constructor=Co,(Lo.prototype=Object.create(Nn.prototype)).constructor=Lo,(Io.prototype=Object.create(Jn.prototype)).constructor=Io,(Oo.prototype=Object.create(Nn.prototype)).constructor=Oo,(jo.prototype=Object.create(Jn.prototype)).constructor=jo,(ko.prototype=Object.create(Nn.prototype)).constructor=ko,(Po.prototype=Object.create(Jn.prototype)).constructor=Po;var Ro=function(e,t,i){i=i||2;var n,r,a,s,o,l,u,c=t&&t.length,h=c?t[0]*i:e.length,d=zo(e,0,h,i,!0),p=[];if(!d)return p;if(c&&(d=function(e,t,i,n){var r,a,s,o,l,u=[];for(r=0,a=t.length;r<a;r++)s=t[r]*n,o=r<a-1?t[r+1]*n:e.length,(l=zo(e,s,o,n,!1))===l.next&&(l.steiner=!0),u.push(qo(l));for(u.sort(Qo),r=0;r<u.length;r++)Vo(u[r],i),i=Uo(i,i.next);return i}(e,t,d,i)),e.length>80*i){n=a=e[0],r=s=e[1];for(var f=i;f<h;f+=i)(o=e[f])<n&&(n=o),(l=e[f+1])<r&&(r=l),a<o&&(a=o),s<l&&(s=l);u=0!==(u=Math.max(a-n,s-r))?1/u:0}return Bo(d,p,i,n,r,u),p};function zo(e,t,i,n,r){var a,s;if(r===0<function(e,t,i,n){for(var r=0,a=t,s=i-n;a<i;a+=n)r+=(e[s]-e[a])*(e[a+1]+e[s+1]),s=a;return r}(e,t,i,n))for(a=t;a<i;a+=n)s=tl(a,e[a],e[a+1],s);else for(a=i-n;t<=a;a-=n)s=tl(a,e[a],e[a+1],s);return s&&$o(s,s.next)&&(il(s),s=s.next),s}function Uo(e,t){if(!e)return e;t=t||e;var i,n=e;do{if(i=!1,n.steiner||!$o(n,n.next)&&0!==Zo(n.prev,n,n.next))n=n.next;else{if(il(n),(n=t=n.prev)===n.next)break;
1i=!0}}while(i||n!==t);return t}function Bo(e,t,i,n,r,a,s){if(e){!s&&a&&function(e,t,i,n){var r=e;for(;null===r.z&&(r.z=Wo(r.x,r.y,t,i,n)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next,r!==e;);r.prevZ.nextZ=null,r.prevZ=null,function(e){var t,i,n,r,a,s,o,l,u=1;do{for(i=e,a=e=null,s=0;i;){for(s++,n=i,t=o=0;t<u&&(o++,n=n.nextZ);t++);for(l=u;0<o||0<l&&n;)0!==o&&(0===l||!n||i.z<=n.z)?(i=(r=i).nextZ,o--):(n=(r=n).nextZ,l--),a?a.nextZ=r:e=r,r.prevZ=a,a=r;i=n}a.nextZ=null,u*=2}while(1<s)}(r)}(e,n,r,a);for(var o,l,u=e;e.prev!==e.next;)if(o=e.prev,l=e.next,a?Go(e,n,r,a):Fo(e))t.push(o.i/i),t.push(e.i/i),t.push(l.i/i),il(e),e=l.next,u=l.next;else if((e=l)===u){s?1===s?Bo(e=Ho(e,t,i),t,i,n,r,a,2):2===s&&Yo(e,t,i,n,r,a):Bo(Uo(e),t,i,n,r,a,1);break}}}function Fo(e){var t=e.prev,i=e,n=e.next;if(!(0<=Zo(t,i,n))){for(var r=e.next.next;r!==e.prev;){if(Xo(t.x,t.y,i.x,i.y,n.x,n.y,r.x,r.y)&&0<=Zo(r.prev,r,r.next))return;r=r.next}return 1}}function Go(e,t,i,n){var r=e.prev,a=e,s=e.next;if(!(0<=Zo(r,a,s))){for(var o=r.x<a.x?r.x<s.x?r.x:s.x:a.x<s.x?a.x:s.x,l=r.y<a.y?r.y<s.y?r.y:s.y:a.y<s.y?a.y:s.y,u=r.x>a.x?r.x>s.x?r.x:s.x:a.x>s.x?a.x:s.x,c=r.y>a.y?r.y>s.y?r.y:s.y:a.y>s.y?a.y:s.y,h=Wo(o,l,t,i,n),d=Wo(u,c,t,i,n),p=e.nextZ;p&&p.z<=d;){if(p!==e.prev&&p!==e.next&&Xo(r.x,r.y,a.x,a.y,s.x,s.y,p.x,p.y)&&0<=Zo(p.prev,p,p.next))return;p=p.nextZ}for(p=e.prevZ;p&&p.z>=h;){if(p!==e.prev&&p!==e.next&&Xo(r.x,r.y,a.x,a.y,s.x,s.y,p.x,p.y)&&0<=Zo(p.prev,p,p.next))return;p=p.prevZ}return 1}}function Ho(e,t,i){var n=e;do{var r=n.prev,a=n.next.next;!$o(r,a)&&Ko(r,n,n.next,a)&&Jo(r,a)&&Jo(a,r)&&(t.push(r.i/i),t.push(n.i/i),t.push(a.i/i),il(n),il(n.next),n=e=a),n=n.next}while(n!==e);return n}function Yo(e,t,i,n,r,a){var s,o,l=e;do{for(var u=l.next.next;u!==l.prev;){if(l.i!==u.i&&(o=u,(s=l).next.i!==o.i&&s.prev.i!==o.i&&!function(e,t){var i=e;do{if(i.i!==e.i&&i.next.i!==e.i&&i.i!==t.i&&i.next.i!==t.i&&Ko(i,i.next,e,t))return 1;i=i.next}while(i!==e);return}(s,o)&&Jo(s,o)&&Jo(o,s)&&function(e,t){var i=e,n=!1,r=(e.x+t.x)/2,a=(e.y+t.y)/2;for(;i.y>a!=i.next.y>a&&i.next.y!==i.y&&r<(i.next.x-i.x)*(a-i.y)/(i.next.y-i.y)+i.x&&(n=!n),i=i.next,i!==e;);return n}(s,o))){var c=el(l,u);return l=Uo(l,l.next),c=Uo(c,c.next),Bo(l,t,i,n,r,a),void Bo(c,t,i,n,r,a)}u=u.next}l=l.next}while(l!==e)}function Qo(e,t){return e.x-t.x}function Vo(e,t){if(t=function(e,t){var i,n=t,r=e.x,a=e.y,s=-1/0;do{if(a<=n.y&&a>=n.next.y&&n.next.y!==n.y){var o=n.x+(a-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(o<=r&&s<o){if((s=o)===r){if(a===n.y)return n;if(a===n.next.y)return n.next}i=n.x<n.next.x?n:n.next}}n=n.next}while(n!==t);if(!i)return null;if(r===s)return i.prev;var l,u=i,c=i.x,h=i.y,d=1/0;n=i.next;for(;n!==u;)r>=n.x&&n.x>=c&&r!==n.x&&Xo(a<h?r:s,a,c,h,a<h?s:r,a,n.x,n.y)&&((l=Math.abs(a-n.y)/(r-n.x))<d||l===d&&n.x>i.x)&&Jo(n,e)&&(i=n,d=l),n=n.next;return i}(e,t)){var i=el(t,e);Uo(i,i.next)}}function Wo(e,t,i,n,r){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-i)*r)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*r)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function qo(e){for(var t=e,i=e;t.x<i.x&&(i=t),(t=t.next)!==e;);return i}function Xo(e,t,i,n,r,a,s,o){return 0<=(r-s)*(t-o)-(e-s)*(a-o)&&0<=(e-s)*(n-o)-(i-s)*(t-o)&&0<=(i-s)*(a-o)-(r-s)*(n-o)}function Zo(e,t,i){return(t.y-e.y)*(i.x-t.x)-(t.x-e.x)*(i.y-t.y)}function $o(e,t){return e.x===t.x&&e.y===t.y}function Ko(e,t,i,n){return $o(e,t)&&$o(i,n)||$o(e,n)&&$o(i,t)||0<Zo(e,t,i)!=0<Zo(e,t,n)&&0<Zo(i,n,e)!=0<Zo(i,n,t)}function Jo(e,t){return Zo(e.prev,e,e.next)<0?0<=Zo(e,t,e.next)&&0<=Zo(e,e.prev,t):Zo(e,t,e.prev)<0||Zo(e,e.next,t)<0}function el(e,t){var i=new nl(e.i,e.x,e.y),n=new nl(t.i,t.x,t.y),r=e.next,a=t.prev;return(e.next=t).prev=e,(i.next=r).prev=i,(n.next=i).prev=n,(a.next=n).prev=a,n}function tl(e,t,i,n){var r=new nl(e,t,i);return n?(r.next=n.next,(r.prev=n).next.prev=r,n.next=r):(r.prev=r).next=r,r}function il(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function nl(e,t,i){this.i=e,this.x=t,this.y=i,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}var rl={area:function(e){for(var t=e.length,i=0,n=t-1,r=0;r<t;n=r++)i+=e[n].x*e[r].y-e[r].x*e[n].y;return.5*i},isClockWise:function(e){return rl.area(e)<0}
vendor: 12,038 bytes, line 1
1,triangulateShape:function(e,t){var i=[],n=[],r=[];al(e),sl(i,e);var a=e.length;t.forEach(al);for(var s=0;s<t.length;s++)n.push(a),a+=t[s].length,sl(i,t[s]);var o=Ro(i,n);for(s=0;s<o.length;s+=3)r.push(o.slice(s,s+3));return r}};function al(e){var t=e.length;2<t&&e[t-1].equals(e[0])&&e.pop()}function sl(e,t){for(var i=0;i<t.length;i++)e.push(t[i].x),e.push(t[i].y)}function ol(e,t){Nn.call(this),this.type="ExtrudeGeometry",this.parameters={shapes:e,options:t},this.fromBufferGeometry(new ll(e,t)),this.mergeVertices()}function ll(e,Z){Jn.call(this),this.type="ExtrudeBufferGeometry",this.parameters={shapes:e,options:Z},e=Array.isArray(e)?e:[e];for(var $=this,K=[],J=[],t=0,i=e.length;t<i;t++){n(e[t])}function n(e){var n=[],t=void 0!==Z.curveSegments?Z.curveSegments:12,l=void 0!==Z.steps?Z.steps:1,i=void 0!==Z.depth?Z.depth:100,r=void 0===Z.bevelEnabled||Z.bevelEnabled,a=void 0!==Z.bevelThickness?Z.bevelThickness:6,s=void 0!==Z.bevelSize?Z.bevelSize:a-2,u=void 0!==Z.bevelSegments?Z.bevelSegments:3,o=Z.extrudePath,c=void 0!==Z.UVGenerator?Z.UVGenerator:ul;void 0!==Z.amount&&(console.warn("THREE.ExtrudeBufferGeometry: amount has been renamed to depth."),i=Z.amount);var h,d,p,f,g,m,v,y,_=!1;o&&(h=o.getSpacedPoints(l),r=!(_=!0),d=o.computeFrenetFrames(l,!1),p=new Wt,f=new Wt,g=new Wt),r||(s=a=u=0);var M=e.extractPoints(t),w=M.shape,b=M.holes;if(!rl.isClockWise(w))for(w=w.reverse(),v=0,y=b.length;v<y;v++)m=b[v],rl.isClockWise(m)&&(b[v]=m.reverse());var T=rl.triangulateShape(w,b),A=w;for(v=0,y=b.length;v<y;v++)m=b[v],w=w.concat(m);function x(e,t,i){return t||console.error("THREE.ExtrudeGeometry: vec does not exist"),t.clone().multiplyScalar(i).add(e)}var E,S,D,N,C,L,I=w.length,O=T.length;function j(e,t,i){var n,r,a,s=e.x-t.x,o=e.y-t.y,l=i.x-e.x,u=i.y-e.y,c=s*s+o*o,h=s*u-o*l;if(Math.abs(h)>Number.EPSILON){var d=Math.sqrt(c),p=Math.sqrt(l*l+u*u),f=t.x-o/d,g=t.y+s/d,m=((i.x-u/p-f)*u-(i.y+l/p-g)*l)/(s*u-o*l),v=(n=f+s*m-e.x)*n+(r=g+o*m-e.y)*r;if(v<=2)return new Yt(n,r);a=Math.sqrt(v/2)}else{var y=!1;s>Number.EPSILON?l>Number.EPSILON&&(y=!0):s<-Number.EPSILON?l<-Number.EPSILON&&(y=!0):Math.sign(o)===Math.sign(u)&&(y=!0),a=y?(n=-o,r=s,Math.sqrt(c)):(n=s,r=o,Math.sqrt(c/2))}return new Yt(n/a,r/a)}for(var k=[],P=0,R=A.length,z=R-1,U=P+1;P<R;P++,z++,U++)z===R&&(z=0),U===R&&(U=0),k[P]=j(A[P],A[z],A[U]);var B,F,G=[],H=k.concat();for(v=0,y=b.length;v<y;v++){for(m=b[v],B=[],P=0,z=(R=m.length)-1,U=P+1;P<R;P++,z++,U++)z===R&&(z=0),U===R&&(U=0),B[P]=j(m[P],m[z],m[U]);G.push(B),H=H.concat(B)}for(E=0;E<u;E++){for(D=E/u,N=a*Math.cos(D*Math.PI/2),S=s*Math.sin(D*Math.PI/2),P=0,R=A.length;P<R;P++)Q((C=x(A[P],k[P],S)).x,C.y,-N);for(v=0,y=b.length;v<y;v++)for(m=b[v],B=G[v],P=0,R=m.length;P<R;P++)Q((C=x(m[P],B[P],S)).x,C.y,-N)}for(S=s,P=0;P<I;P++)C=r?x(w[P],H[P],S):w[P],_?(f.copy(d.normals[0]).multiplyScalar(C.x),p.copy(d.binormals[0]).multiplyScalar(C.y),g.copy(h[0]).add(f).add(p),Q(g.x,g.y,g.z)):Q(C.x,C.y,0);for(F=1;F<=l;F++)for(P=0;P<I;P++)C=r?x(w[P],H[P],S):w[P],_?(f.copy(d.normals[F]).multiplyScalar(C.x),p.copy(d.binormals[F]).multiplyScalar(C.y),g.copy(h[F]).add(f).add(p),Q(g.x,g.y,g.z)):Q(C.x,C.y,i/l*F);for(E=u-1;0<=E;E--){for(D=E/u,N=a*Math.cos(D*Math.PI/2),S=s*Math.sin(D*Math.PI/2),P=0,R=A.length;P<R;P++)Q((C=x(A[P],k[P],S)).x,C.y,i+N);for(v=0,y=b.length;v<y;v++)for(m=b[v],B=G[v],P=0,R=m.length;P<R;P++)C=x(m[P],B[P],S),_?Q(C.x,C.y+h[l-1].y,h[l-1].x+N):Q(C.x,C.y,i+N)}function Y(e,t){var i,n;for(P=e.length;0<=--P;){(n=(i=P)-1)<0&&(n=e.length-1);var r=0,a=l+2*u;for(r=0;r<a;r++){var s=I*r,o=I*(r+1);W(t+i+s,t+n+s,t+n+o,t+i+o)}}}function Q(e,t,i){n.push(e),n.push(t),n.push(i)}function V(e,t,i){q(e),q(t),q(i);var n=K.length/3,r=c.generateTopUV($,K,n-3,n-2,n-1);X(r[0]),X(r[1]),X(r[2])}function W(e,t,i,n){q(e),q(t),q(n),q(t),q(i),q(n);var r=K.length/3,a=c.generateSideWallUV($,K,r-6,r-3,r-2,r-1);X(a[0]),X(a[1]),X(a[3]),X(a[1]),X(a[2]),X(a[3])}function q(e){K.push(n[3*e+0]),K.push(n[3*e+1]),K.push(n[3*e+2])}function X(e){J.push(e.x),J.push(e.y)}!function(){var e=K.length/3;if(r){var t=0,i=I*t;for(P=0;P<O;P++)V((L=T[P])[2]+i,L[1]+i,L[0]+i);for(i=I*(t=l+2*u),P=0;P<O;P++)V((L=T[P])[0]+i,L[1]+i,L[2]+i)}else{for(P=0;P<O;P++)V((L=T[P])[2],L[1],L[0]);for(P=0;P<O;P++)V((L=T[P])[0]+I*l,L[1]+I*l,L[2]+I*l)}$.addGroup(e,K.length/3-e,0)}(),function(){var e=K.length/3,t=0;for(Y(A,t),t+=A.length,v=0,y=b.length;v<y;v++)Y(m=b[v],t),t+=m.length;$.addGroup(e,K.length/3-e,1)}()}this.addAttribute("position",new zn(K,3)),this.addAttribute("uv",new zn(J,2)),this.computeVertexNormals()}((ol.prototype=Object.create(Nn.prototype)).constructor=ol).prototype.toJSON=function(){var e=Nn.prototype.toJSON.call(this);return cl(this.parameters.shapes,this.parameters.options,e)},((ll.prototype=Object.create(Jn.prototype)).constructor=ll).prototype.toJSON=function(){var e=Jn.prototype.toJSON.call(this);return cl(this.parameters.shapes,this.parameters.options,e)};var ul={generateTopUV:function(e,t,i,n,r){var a=t[3*i],s=t[3*i+1],o=t[3*n],l=t[3*n+1],u=t[3*r],c=t[3*r+1];return[new Yt(a,s),new Yt(o,l),new Yt(u,c)]},generateSideWallUV:function(e,t,i,n,r,a){var s=t[3*i],o=t[3*i+1],l=t[3*i+2],u=t[3*n],c=t[3*n+1],h=t[3*n+2],d=t[3*r],p=t[3*r+1],f=t[3*r+2],g=t[3*a],m=t[3*a+1],v=t[3*a+2];return Math.abs(o-c)<.01?[new Yt(s,1-l),new Yt(u,1-h),new Yt(d,1-f),new Yt(g,1-v)]:[new Yt(o,1-l),new Yt(c,1-h),new Yt(p,1-f),new Yt(m,1-v)]}};function cl(e,t,i){if(i.shapes=[],Array.isArray(e))for(var n=0,r=e.length;n<r;n++){var a=e[n];i.shapes.push(a.uuid)}else i.shapes.push(e.uuid);return void 0!==t.extrudePath&&(i.options.extrudePath=t.extrudePath.toJSON()),i}function hl(e,t){Nn.call(this),this.type="TextGeometry",this.parameters={text:e,parameters:t},this.fromBufferGeometry(new dl(e,t)),this.mergeVertices()}function dl(e,t){var i=(t=t||{}).font;if(!i||!i.isFont)return console.error("THREE.TextGeometry: font parameter is not an instance of THREE.Font."),new Nn;var n=i.generateShapes(e,t.size,t.curveSegments);t.depth=void 0!==t.height?t.height:50,void 0===t.bevelThickness&&(t.bevelThickness=10),void 0===t.bevelSize&&(t.bevelSize=8),void 0===t.bevelEnabled&&(t.bevelEnabled=!1),ll.call(this,n,t),this.type="TextBufferGeometry"}function pl(e,t,i,n,r,a,s){Nn.call(this),this.type="SphereGeometry",this.parameters={radius:e,widthSegments:t,heightSegments:i,phiStart:n,phiLength:r,thetaStart:a,thetaLength:s},this.fromBufferGeometry(new fl(e,t,i,n,r,a,s)),this.mergeVertices()}function fl(e,t,i,n,r,a,s){Jn.call(this),this.type="SphereBufferGeometry",this.parameters={radius:e,widthSegments:t,heightSegments:i,phiStart:n,phiLength:r,thetaStart:a,thetaLength:s},e=e||1,t=Math.max(3,Math.floor(t)||8),i=Math.max(2,Math.floor(i)||6),n=void 0!==n?n:0,r=void 0!==r?r:2*Math.PI;var o,l,u=(a=void 0!==a?a:0)+(s=void 0!==s?s:Math.PI),c=0,h=[],d=new Wt,p=new Wt,f=[],g=[],m=[],v=[];for(l=0;l<=i;l++){var y=[],_=l/i;for(o=0;o<=t;o++){var M=o/t;d.x=-e*Math.cos(n+M*r)*Math.sin(a+_*s),d.y=e*Math.cos(a+_*s),d.z=e*Math.sin(n+M*r)*Math.sin(a+_*s),g.push(d.x,d.y,d.z),p.set(d.x,d.y,d.z).normalize(),m.push(p.x,p.y,p.z),v.push(M,1-_),y.push(c++)}h.push(y)}for(l=0;l<i;l++)for(o=0;o<t;o++){var w=h[l][o+1],b=h[l][o],T=h[l+1][o],A=h[l+1][o+1];(0!==l||0<a)&&f.push(w,b,A),(l!==i-1||u<Math.PI)&&f.push(b,T,A)}this.setIndex(f),this.addAttribute("position",new zn(g,3)),this.addAttribute("normal",new zn(m,3)),this.addAttribute("uv",new zn(v,2))}function gl(e,t,i,n,r,a){Nn.call(this),this.type="RingGeometry",this.parameters={innerRadius:e,outerRadius:t,thetaSegments:i,phiSegments:n,thetaStart:r,thetaLength:a},this.fromBufferGeometry(new ml(e,t,i,n,r,a)),this.mergeVertices()}function ml(e,t,i,n,r,a){Jn.call(this),this.type="RingBufferGeometry",this.parameters={innerRadius:e,outerRadius:t,thetaSegments:i,phiSegments:n,thetaStart:r,thetaLength:a},e=e||.5,t=t||1,r=void 0!==r?r:0,a=void 0!==a?a:2*Math.PI,i=void 0!==i?Math.max(3,i):8;var s,o,l,u=[],c=[],h=[],d=[],p=e,f=(t-e)/(n=void 0!==n?Math.max(1,n):1),g=new Wt,m=new Yt;for(o=0;o<=n;o++){for(l=0;l<=i;l++)s=r+l/i*a,g.x=p*Math.cos(s),g.y=p*Math.sin(s),c.push(g.x,g.y,g.z),h.push(0,0,1),m.x=(g.x/t+1)/2,m.y=(g.y/t+1)/2,d.push(m.x,m.y);p+=f}for(o=0;o<n;o++){var v=o*(i+1);for(l=0;l<i;l++){var y=s=l+v,_=s+i+1,M=s+i+2,w=s+1;u.push(y,_,w),u.push(_,M,w)}}this.setIndex(u),this.addAttribute("position",new zn(c,3)),this.addAttribute("normal",new zn(h,3)),this.addAttribute("uv",new zn(d,2))}function vl(e,t,i,n){Nn.call(this),this.type="LatheGeometry",this.parameters={points:e,segments:t,phiStart:i,phiLength:n},this.fromBufferGeometry(new yl(e,t,i,n)),this.mergeVertices()}function yl(e,t,i,n){Jn.call(this),this.type="LatheBufferGeometry",this.parameters={points:e,segments:t,phiStart:i,phiLength:n},t=Math.floor(t)||12,i=i||0,n=n||2*Math.PI,n=Ht.clamp(n,0,2*Math.PI);var r,a,s,o=[],l=[],u=[],c=1/t,h=new Wt,d=new Yt;for(a=0;a<=t;a++){var p=i+a*c*n,f=Math.sin(p),g=Math.cos(p);for(s=0;s<=e.length-1;s++)h.x=e[s].x*f,h.y=e[s].y,h.z=e[s].x*g,l.push(h.x,h.y,h.z),d.x=a/t,d.y=s/(e.length-1),u.push(d.x,d.y)}for(a=0;a<t;a++)for(s=0;s<e.length-1;s++){var m=r=s+a*e.length,v=r+e.length,y=r+e.length+1,_=r+1;o.push(m,v,_),o.push(v,y,_)}if(this.setIndex(o),this.addAttribute("position",new zn(l,3)),this.addAttribute("uv",new zn(u,2)),this.computeVertexNormals(),n===2*Math.PI){var M=this.attributes.normal.array,w=new Wt,b=new Wt,T=new Wt;for(r=t*e.length*3,s=a=0;a<e.length;a++,s+=3)w.x=M[s+0],w.y=M[s+1],w.z=M[s+2],b.x=M[r+s+0],b.y=M[r+s+1],b.z=M[r+s+2],T.addVectors(w,b).normalize(),M[s+0]=M[r+s+0]=T.x,M[s+1]=M[r+s+1]=T.y,M[s+2]=M[r+s+2]=T.z}}function _l(e,t){Nn.call(this),this.type="ShapeGeometry","object"==typeof t&&(console.warn("THREE.ShapeGeometry: Options parameter has been removed."),t=t.curveSegments),this.parameters={shapes:e,curveSegments:t},this.fromBufferGeometry(new Ml(e,t)),this.mergeVertices()}function Ml(e,f){Jn.call(this),this.type="ShapeBufferGeometry",this.parameters={shapes:e,curveSegments:f},f=f||12;var g=[],m=[],v=[],y=[],t=0,_=0;if(!1===Array.isArray(e))n(e);else for(var i=0;i<e.length;i++)n(e[i]),this.addGroup(t,_,i),t+=_,_=0;function n(e){var t,i,n,r=m.length/3,a=e.extractPoints(f),s=a.shape,o=a.holes;if(!1===rl.isClockWise(s))for(s=s.reverse(),t=0,i=o.length;t<i;t++)n=o[t],!0===rl.isClockWise(n)&&(o[t]=n.reverse());var l=rl.triangulateShape(s,o);for(t=0,i=o.length;t<i;t++)n=o[t],s=s.concat(n);for(t=0,i=s.length;t<i;t++){var u=s[t];m.push(u.x,u.y,0),v.push(0,0,1),y.push(u.x,u.y)}for(t=0,i=l.length;t<i;t++){var c=l[t],h=c[0]+r,d=c[1]+r,p=c[2]+r;g.push(h,d,p),_+=3}}this.setIndex(g),this.addAttribute("position",new zn(m,3)),this.addAttribute("normal",new zn(v,3)),this.addAttribute("uv",new zn(y,2))}function wl(e,t){if(t.shapes=[],Array.isArray(e))for(var i=0,n=e.length;i<n;i++){var r=e[i];t.shapes.push(r.uuid)}else t.shapes.push(e.uuid);return t}function bl(e,t){Jn.call(this),this.type="EdgesGeometry",this.parameters={thresholdAngle:t},t=void 0!==t?t:1;var i,n,r,a,s=[],o=Math.cos(Ht.DEG2RAD*t),l=[0,0],u={},c=["a","b","c"];e.isBufferGeometry?(a=new Nn).fromBufferGeometry(e):a=e.clone(),a.mergeVertices(),a.computeFaceNormals();for(var h=a.vertices,d=a.faces,p=0,f=d.length;p<f;p++)for(var g=d[p],m=0;m<3;m++)i=g[c[m]],n=g[c[(m+1)%3]],l[0]=Math.min(i,n),l[1]=Math.max(i,n),void 0===u[r=l[0]+","+l[1]]?u[r]={index1:l[0],index2:l[1],face1:p,face2:void 0}:u[r].face2=p;for(r in u){var v=u[r];if(void 0===v.face2||d[v.face1].normal.dot(d[v.face2].normal)<=o){var y=h[v.index1];s.push(y.x,y.y,y.z),y=h[v.index2],s.push(y.x,y.y,y.z)}}this.addAttribute("position",new zn(s,3))}function Tl(e,t,i,n,r,a,s,o){Nn.call(this),this.type="CylinderGeometry",this.parameters={radiusTop:e,radiusBottom:t,height:i,radialSegments:n,heightSegments:r,openEnded:a,thetaStart:s,thetaLength:o},this.fromBufferGeometry(new Al(e,t,i,n,r,a,s,o)),this.mergeVertices()}function Al(v,y,_,M,w,e,b,T){Jn.call(this),this.type="CylinderBufferGeometry",this.parameters={radiusTop:v,radiusBottom:y,height:_,radialSegments:M,heightSegments:w,openEnded:e,thetaStart:b,thetaLength:T};var A=this;v=void 0!==v?v:1,y=void 0!==y?y:1,_=_||1,M=Math.floor(M)||8,w=Math.floor(w)||1,e=void 0!==e&&e,b
vendor: 1,172 bytes, line 1
1=void 0!==b?b:0,T=void 0!==T?T:2*Math.PI;var x=[],E=[],S=[],D=[],N=0,C=[],L=_/2,I=0;function t(e){var t,i,n,r=new Yt,a=new Wt,s=0,o=!0===e?v:y,l=!0===e?1:-1;for(i=N,t=1;t<=M;t++)E.push(0,L*l,0),S.push(0,l,0),D.push(.5,.5),N++;for(n=N,t=0;t<=M;t++){var u=t/M*T+b,c=Math.cos(u),h=Math.sin(u);a.x=o*h,a.y=L*l,a.z=o*c,E.push(a.x,a.y,a.z),S.push(0,l,0),r.x=.5*c+.5,r.y=.5*h*l+.5,D.push(r.x,r.y),N++}for(t=0;t<M;t++){var d=i+t,p=n+t;!0===e?x.push(p,p+1,d):x.push(p+1,p,d),s+=3}A.addGroup(I,s,!0===e?1:2),I+=s}!function(){var e,t,i=new Wt,n=new Wt,r=0,a=(y-v)/_;for(t=0;t<=w;t++){var s=[],o=t/w,l=o*(y-v)+v;for(e=0;e<=M;e++){var u=e/M,c=u*T+b,h=Math.sin(c),d=Math.cos(c);n.x=l*h,n.y=-o*_+L,n.z=l*d,E.push(n.x,n.y,n.z),i.set(h,a,d).normalize(),S.push(i.x,i.y,i.z),D.push(u,1-o),s.push(N++)}C.push(s)}for(e=0;e<M;e++)for(t=0;t<w;t++){var p=C[t][e],f=C[t+1][e],g=C[t+1][e+1],m=C[t][e+1];x.push(p,f,m),x.push(f,g,m),r+=6}A.addGroup(I,r,0),I+=r}(),!1===e&&(0<v&&t(!0),0<y&&t(!1)),this.setIndex(x),this.addAttribute("position",new zn(E,3)),this.addAttribute("normal",new zn(S,3)),this.addAttribute("uv",new zn(D,2))}function xl(e,t,i,n,r,a,s){Tl.call(this,0,e,t,i,n,r,a,s),this.type="C
1oneGeometry",this.parameters={radius:e,height:t,radialSegments:i,heightSegments:n,openEnded:r,thetaStart:a,thetaLength:s}}function El(e,t,i,n,r,a,s){Al.call(this,0,e,t,i,n,r,a,s),this.type="ConeBufferGeometry",this.parameters={radius:e,height:t,radialSegments:i,heightSegments:n,openEnded:r,thetaStart:a,thetaLength:s}}function Sl(e,t,i,n){Nn.call(this),this.type="CircleGeometry",this.parameters={radius:e,segments:t,thetaStart:i,thetaLength:n},this.fromBufferGeometry(new Dl(e,t,i,n)),this.mergeVertices()}function Dl(e,t,i,n){Jn.call(this),this.type="CircleBufferGeometry",this.parameters={radius:e,segments:t,thetaStart:i,thetaLength:n},e=e||1,t=void 0!==t?Math.max(3,t):8,i=void 0!==i?i:0,n=void 0!==n?n:2*Math.PI;var r,a,s=[],o=[],l=[],u=[],c=new Wt,h=new Yt;for(o.push(0,0,0),l.push(0,0,1),u.push(.5,.5),a=0,r=3;a<=t;a++,r+=3){var d=i+a/t*n;c.x=e*Math.cos(d),c.y=e*Math.sin(d),o.push(c.x,c.y,c.z),l.push(0,0,1),h.x=(o[r]/e+1)/2,h.y=(o[r+1]/e+1)/2,u.push(h.x,h.y)}for(r=1;r<=t;r++)s.push(r,r+1,0);this.setIndex(s),this.addAttribute("position",new zn(o,3)),this.addAttribute("normal",new zn(l,3)),this.addAttribute("uv",new zn(u,2))}(hl.prototype=Object.create(Nn.prototype)).constructor=hl,(dl.prototype=Object.create(ll.prototype)).constructor=dl,(pl.prototype=Object.create(Nn.prototype)).constructor=pl,(fl.prototype=Object.create(Jn.prototype)).constructor=fl,(gl.prototype=Object.create(Nn.prototype)).constructor=gl,(ml.prototype=Object.create(Jn.prototype)).constructor=ml,(vl.prototype=Object.create(Nn.prototype)).constructor=vl,(yl.prototype=Object.create(Jn.prototype)).constructor=yl,((_l.prototype=Object.create(Nn.prototype)).constructor=_l).prototype.toJSON=function(){var e=Nn.prototype.toJSON.call(this);return wl(this.parameters.shapes,e)},((Ml.prototype=Object.create(Jn.prototype)).constructor=Ml).prototype.toJSON=function(){var e=Jn.prototype.toJSON.call(this);return wl(this.parameters.shapes,e)},(bl.prototype=Object.create(Jn.prototype)).constructor=bl,(Tl.prototype=Object.create(Nn.prototype)).constructor=Tl,(Al.prototype=Object.create(Jn.prototype)).constructor=Al,(xl.prototype=Object.create(Tl.prototype)).constructor=xl,(El.prototype=Object.create(Al.prototype)).constructor=El,(Sl.prototype=Object.create(Nn.prototype)).constructor=Sl,(Dl.prototype=Object.create(Jn.prototype)).constructor=Dl;var Nl=Object.freeze({WireframeGeometry:yo,ParametricGeometry:_o,ParametricBufferGeometry:Mo,TetrahedronGeometry:To,TetrahedronBufferGeometry:Ao,OctahedronGeometry:xo,OctahedronBufferGeometry:Eo,IcosahedronGeometry:So,IcosahedronBufferGeometry:Do,DodecahedronGeometry:No,DodecahedronBufferGeometry:Co,PolyhedronGeometry:wo,PolyhedronBufferGeometry:bo,TubeGeometry:Lo,TubeBufferGeometry:Io,TorusKnotGeometry:Oo,TorusKnotBufferGeometry:jo,TorusGeometry:ko,TorusBufferGeometry:Po,TextGeometry:hl,TextBufferGeometry:dl,SphereGeometry:pl,SphereBufferGeometry:fl,RingGeometry:gl,RingBufferGeometry:ml,PlaneGeometry:ir,PlaneBufferGeometry:nr,LatheGeometry:vl,LatheBufferGeometry:yl,ShapeGeometry:_l,ShapeBufferGeometry:Ml,ExtrudeGeometry:ol,ExtrudeBufferGeometry:ll,EdgesGeometry:bl,ConeGeometry:xl,ConeBufferGeometry:El,CylinderGeometry:Tl,CylinderBufferGeometry:Al,CircleGeometry:Sl,CircleBufferGeometry:Dl,BoxGeometry:er,BoxBufferGeometry:tr});function Cl(e){Yr.call(this),this.type="ShadowMaterial",this.color=new Fi(0),this.transparent=!0,this.setValues(e)}function Ll(e){Vr.call(this,e),this.type="RawShaderMaterial"}function Il(e){Yr.call(this),this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new Fi(16777215),this.roughness=.5,this.metalness=.5,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Fi(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalScale=new Yt(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapIntensity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(e)}function Ol(e){Il.call(this),this.defines={PHYSICAL:""},this.type="MeshPhysicalMaterial",this.reflectivity=.5,this.clearCoat=0,this.clearCoatRoughness=0,this.setValues(e)}function jl(e){Yr.call(this),this.type="MeshPhongMaterial",this.color=new Fi(16777215),this.specular=new Fi(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Fi(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalScale=new Yt(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=_e,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(e)}function kl(e){jl.call(this),this.defines={TOON:""},this.type="MeshToonMaterial",this.gradientMap=null,this.setValues(e)}function Pl(e){Yr.call(this),this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalScale=new Yt(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(e)}function Rl(e){Yr.call(this),this.type="MeshLambertMaterial",this.color=new Fi(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Fi(0),this.emissiveIntensity=1,this.emissiveMap=null,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=_e,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(e)}function zl(e){oo.call(this),this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(e)}((Cl.prototype=Object.create(Yr.prototype)).constructor=Cl).prototype.isShadowMaterial=!0,Cl.prototype.copy=function(e){return Yr.prototype.copy.call(this,e),this.color.copy(e.color),this},((Ll.prototype=Object.create(Vr.prototype)).constructor=Ll).prototype.isRawShaderMaterial=!0,((Il.prototype=Object.create(Yr.prototype)).constructor=Il).prototype.isMeshStandardMaterial=!0,Il.prototype.copy=function(e){return Yr.prototype.copy.call(this,e),this.defines={STANDARD:""},this.color.copy(e.color),this.roughness=e.roughness,this.metalness=e.metalness,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.roughnessMap=e.roughnessMap,this.metalnessMap=e.metalnessMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapIntensity=e.envMapIntensity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this},((Ol.prototype=Object.create(Il.prototype)).constructor=Ol).prototype.isMeshPhysicalMaterial=!0,Ol.prototype.copy=function(e){return Il.prototype.copy.call(this,e),this.defines={PHYSICAL:""},this.reflectivity=e.reflectivity,this.clearCoat=e.clearCoat,this.clearCoatRoughness=e.clearCoatRoughness,this},((jl.prototype=Object.create(Yr.prototype)).constructor=jl).prototype.isMeshPhongMaterial=!0,jl.prototype.copy=function(e){return Yr.prototype.copy.call(this,e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this},((kl.prototype=Object.create(jl.prototype)).constructor=kl).prototype.isMeshToonMaterial=!0,kl.prototype.copy=function(e){return jl.prototype.copy.call(this,e),this.gradientMap=e.gradientMap,this},((Pl.prototype=Object.create(Yr.prototype)).constructor=Pl).prototype.isMeshNormalMaterial=!0,Pl.prototype.copy=function(e){return Yr.prototype.copy.call(this,e),this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this},((Rl.prototype=Object.create(Yr.prototype)).constructor=Rl).prototype.isMeshLambertMaterial=!0,Rl.prototype.copy=function(e){return Yr.prototype.copy.call(this,e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this},((zl.prototype=Object.create(oo.prototype)).constructor=zl).prototype.isLineDashedMaterial=!0,zl.prototype.copy=function(e){return oo.prototype.copy.call(this,e),this.scale=e.scale,this.dashSize=e.dashSize,this.gapSize=e.gapSize,this};var Ul=Object.freeze({ShadowMaterial:Cl,SpriteMaterial:to,RawShaderMaterial:Ll,ShaderMaterial:Vr,PointsMaterial:ho,MeshPhysicalMaterial:Ol,MeshStandardMaterial:Il,MeshPhongMaterial:jl,MeshToonMaterial:kl,MeshNormalMaterial:Pl,MeshLambertMaterial:Rl,MeshDepthMaterial:Us,MeshDistanceMaterial:Bs,MeshBasicMaterial:Qr,LineDashedMaterial:zl,LineBasicMaterial:oo,Material:Yr}),Bl={enabled:!1,files:{},add:function(e,t){!1!==this.enabled&&(this.files[e]=t)},get:function(e){if(!1!==this.enabled)return this.files[e]},remove:function(e){delete this.files[e]},clear:function(){this.files={}}};function Fl(e,t,i){var n=this,r=!1,a=0,s=0,o=void 0;this.onStart=void 0,this.onLoad=e,this.onProgress=t,this.onError=i,this.itemStart=function(e){s++,!1===r&&void 0!==n.onStart&&n.onStart(e,a,s),r=!0},this.itemEnd=function(e){a++,void 0!==n.onProgress&&n.onProgress(e,a,s),a===s&&(r=!1,void 0!==n.onLoad&&n.onLoad())},this.itemError=function(e){void 0!==n.onError&&n.onError(e)},this.resolveURL=function(e){return o?o(e):e},this.setURLModifier=function(e){return o=e,this}}var Gl=new Fl,Hl={};function Yl(e){this.manager=void 0!==e?e:Gl}function Ql(e){this.manager=void 0!==e?e:Gl}function Vl(e){this.manager=void 0!==e?e:Gl}function Wl(){this.type="Curve",this.arcLengthDivisions=200}function ql(e,t,i,n,r,a,s,o){Wl.call(this),this.type="EllipseCurve",this.aX=e||0,this.aY=t||0,this.xRadius=i||1,this.yRadius=n||1,this.aStartAngle=r||0,this.aEndAngle=a||2*Math.PI,this.aClockwise=s||!1,this.aRotation=o||0}function Xl(e,t,i,n,r,a){ql.call(this,e,t,i,i,n,r,a),this.type="ArcCurve"}function Zl(){var r=0,a=0,s=0,o=0;function u(e,t,i,n){s=-3*(r=e)+3*t-2*(a=i)-n,o=2*e-2*t+i+n}return{initCatmullRom:function(e,t,i,n,r){u(t,i,r*(i-e),r*(n-t))},initNonuniformCatmullRom:function(e,t,i,n,r,a,s){var o=(t-e)/r-(i-e)/(r+a)+(i-t)/a,l=(i-t)/a-(n-t)/(a+s)+(n-i)/s;u(t,i,o*=a,l*=a)},calc:function(e){var t=e*e;return r+a*e+s*t+o*(t*e)}}}Object.assign(Yl.prototype,{load:function(s,e,t,i){void 0===s&&(s=""),void 0!==this.path&&(s=this.path+s),s=this.manager.resolveURL(s);var o=this,n=Bl.get(s);if(void 0!==n)return o.manager.itemStart(s),setTimeout(function(){e&&e(n),o.manager.itemEnd(s)},0),n;if(void 0===Hl[s]){var r=s.match(/^data:(.*?)(;base64)?,(.*)$/);if(r){var a=r[1],l=!!r[2],u=r[3];u=window.decodeURIComponent(u),l&&(u=window.atob(u));try{var c,h=(this.responseType||"").toLowerCase();switch(h){case"arraybuffer":case"blob":for(var d=new Uint8Array(u.length),p=0;p<u.length;p++)d[p]=u.charCodeAt(p);c="blob"===h?new Blob([d.buffer],{type:a}):d.buffer;break;case"document":var f=new DOMParser;c=f.parseFromString(u,a);break;case"json":c=JSON.parse(u);break;default:c=u}window.setTimeout(function(){e&&e(c),o.manager.itemEnd(s)},0)}catch(e){window.setTimeout(function(){i&&i(e),o.manager.itemEnd(s),o.manager.itemError(s)},0)}}else{Hl[s]=[],Hl[s].push({onLoad:e,onProgress:t,onError:i});var g=new XMLHttpRequest;for(var m in g.open("GET",s,!0),g.addEventListener("load",function(e){var t=this.response;Bl.add(s,t);var i=Hl[s];if(delete Hl[s],200===this.status||0===this.status){0===this.status&&console.warn("THREE.FileLoader: HTTP Status 0 received.");for(var n=0,r=i.length;n<r;n++){(a=i[n]).onLoad&&a.onLoad(t)}o.manager.itemEnd(s)}else{for(n=0,r=i.length;n<r;n++){var a;(a=i[n]).onError&&a.onError(e)}o.manager.itemEnd(s),o.manager.itemError(s)}},!1),g.addEventListener("progress",function(e){for(var t=Hl[s],i=0,n=t.length;i<n;i++){var r=t[i];r.onProgress&&r.onProgress(e)}},!1),g.addEventListener("error",function(e){var t=Hl[s];delete Hl[s];for(var i=0,n=t.length;i<n;i++){var r=t[i];r.onError&&r.onError(e)}o.manager.itemEnd(s),o.manager.itemError(s)},!1),void 0!==this.responseType&&(g.responseType=this.responseType),void 0!==this.withCredentials&&(g.withCredentials=this.withCredentials),g.overrideMimeType&&g.overrideMimeType(void 0!==this.mimeType?this.mimeType:"text/plain"),this.requestHeader)g.setRequestHeader(m,this.requestHeader[m]);g.send(null)}return o.manager.itemStart(s),g}Hl[s].push({onLoad:e,onProgress:t,onError:i})},setPath:function(e){return this.path=e,this},setResponseType:function(e){return this.responseType=e,this},setWithCredentials:function(e){return this.withCredentials=e,this},setMimeType:function(e){return this.mimeType=e,this},setRequestHeader:function(e){return this.requestHeader=e,this}}),Object.assign(function(e){this.manager=void 0!==e?e:Gl,this._parser=null}.prototype,{load:function(e,a,t,n){var s=this,o=[],l=new mo;l.image=o;var r=new Yl(this.manager);function i(i){r.load(e[i],function(e){var t=s._parser(e,!0);o[i]={width:t.width,height:t.height,format:t.format,mipmaps:t.mipmaps},6===(u+=1)&&(1===t.mipmapCount&&(l.minFilter=Ge),l.format=t.format,l.needsUpdate=!0,a&&a(l))},t,n)}if(r.setPath(this.path),r.setResponseType("arraybuffer"),Array.isArray(e))for(var u=0,c=0,h=e.length;c<h;++c)i(c);else r.load(e,function(e){var t=s._parser(e,!0);if(t.isCubemap)for(var i=t.mipmaps.length/t.mipmapCount,n=0;n<i;n++){o[n]={mipmaps:[]};for(var r=0;r<t.mipmapCount;r++)o[n].mipmaps.push(t.mipmaps[n*t.mipmapCount+r]),o[n].format=t.format,o[n].width=t.width,o[n].height=t.height}else l.image.width=t.width,l.image.height=t.height,l.mipmaps=t.mipmaps;1===t.mipmapCount&&(l.minFilter=Ge),l.format=t.format,l.needsUpdate=!0,a&&a(l)},t,
vendor: 8,447 bytes, line 1
1n);return l},setPath:function(e){return this.path=e,this}}),Object.assign(function(e){this.manager=void 0!==e?e:Gl,this._parser=null}.prototype,{load:function(e,i,t,n){var r=this,a=new Ci,s=new Yl(this.manager);return s.setResponseType("arraybuffer"),s.load(e,function(e){var t=r._parser(e);t&&(void 0!==t.image?a.image=t.image:void 0!==t.data&&(a.image.width=t.width,a.image.height=t.height,a.image.data=t.data),a.wrapS=void 0!==t.wrapS?t.wrapS:Re,a.wrapT=void 0!==t.wrapT?t.wrapT:Re,a.magFilter=void 0!==t.magFilter?t.magFilter:Ge,a.minFilter=void 0!==t.minFilter?t.minFilter:Ye,a.anisotropy=void 0!==t.anisotropy?t.anisotropy:1,void 0!==t.format&&(a.format=t.format),void 0!==t.type&&(a.type=t.type),void 0!==t.mipmaps&&(a.mipmaps=t.mipmaps),1===t.mipmapCount&&(a.minFilter=Ge),a.needsUpdate=!0,i&&i(a,t))},t,n),a}}),Object.assign(Ql.prototype,{crossOrigin:"Anonymous",load:function(t,e,i,n){void 0===t&&(t=""),void 0!==this.path&&(t=this.path+t),t=this.manager.resolveURL(t);var r=this,a=Bl.get(t);if(void 0!==a)return r.manager.itemStart(t),setTimeout(function(){e&&e(a),r.manager.itemEnd(t)},0),a;var s=document.createElementNS("http://www.w3.org/1999/xhtml","img");function o(){s.removeEventListener("load",o,!1),s.removeEventListener("error",l,!1),Bl.add(t,this),e&&e(this),r.manager.itemEnd(t)}function l(e){s.removeEventListener("load",o,!1),s.removeEventListener("error",l,!1),n&&n(e),r.manager.itemEnd(t),r.manager.itemError(t)}return s.addEventListener("load",o,!1),s.addEventListener("error",l,!1),"data:"!==t.substr(0,5)&&void 0!==this.crossOrigin&&(s.crossOrigin=this.crossOrigin),r.manager.itemStart(t),s.src=t,s},setCrossOrigin:function(e){return this.crossOrigin=e,this},setPath:function(e){return this.path=e,this}}),Object.assign(function(e){this.manager=void 0!==e?e:Gl}.prototype,{crossOrigin:"Anonymous",load:function(e,i,t,n){var r=new ha,a=new Ql(this.manager);a.setCrossOrigin(this.crossOrigin),a.setPath(this.path);var s=0;function o(t){a.load(e[t],function(e){r.images[t]=e,6===++s&&(r.needsUpdate=!0,i&&i(r))},void 0,n)}for(var l=0;l<e.length;++l)o(l);return r},setCrossOrigin:function(e){return this.crossOrigin=e,this},setPath:function(e){return this.path=e,this}}),Object.assign(Vl.prototype,{crossOrigin:"Anonymous",load:function(i,n,e,t){var r=new Ei,a=new Ql(this.manager);return a.setCrossOrigin(this.crossOrigin),a.setPath(this.path),a.load(i,function(e){r.image=e;var t=0<i.search(/\.(jpg|jpeg)$/)||0===i.search(/^data\:image\/jpeg/);r.format=t?rt:at,r.needsUpdate=!0,void 0!==n&&n(r)},e,t),r},setCrossOrigin:function(e){return this.crossOrigin=e,this},setPath:function(e){return this.path=e,this}}),Object.assign(Wl.prototype,{getPoint:function(){return console.warn("THREE.Curve: .getPoint() not implemented."),null},getPointAt:function(e,t){var i=this.getUtoTmapping(e);return this.getPoint(i,t)},getPoints:function(e){void 0===e&&(e=5);for(var t=[],i=0;i<=e;i++)t.push(this.getPoint(i/e));return t},getSpacedPoints:function(e){void 0===e&&(e=5);for(var t=[],i=0;i<=e;i++)t.push(this.getPointAt(i/e));return t},getLength:function(){var e=this.getLengths();return e[e.length-1]},getLengths:function(e){if(void 0===e&&(e=this.arcLengthDivisions),this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var t,i,n=[],r=this.getPoint(0),a=0;for(n.push(0),i=1;i<=e;i++)a+=(t=this.getPoint(i/e)).distanceTo(r),n.push(a),r=t;return this.cacheArcLengths=n},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()},getUtoTmapping:function(e,t){var i,n=this.getLengths(),r=0,a=n.length;i=t||e*n[a-1];for(var s,o=0,l=a-1;o<=l;)if((s=n[r=Math.floor(o+(l-o)/2)]-i)<0)o=r+1;else{if(!(0<s)){l=r;break}l=r-1}if(n[r=l]===i)return r/(a-1);var u=n[r];return(r+(i-u)/(n[r+1]-u))/(a-1)},getTangent:function(e){var t=e-1e-4,i=e+1e-4;t<0&&(t=0),1<i&&(i=1);var n=this.getPoint(t);return this.getPoint(i).clone().sub(n).normalize()},getTangentAt:function(e){var t=this.getUtoTmapping(e);return this.getTangent(t)},computeFrenetFrames:function(e,t){var i,n,r,a=new Wt,s=[],o=[],l=[],u=new Wt,c=new Qt;for(i=0;i<=e;i++)n=i/e,s[i]=this.getTangentAt(n),s[i].normalize();o[0]=new Wt,l[0]=new Wt;var h=Number.MAX_VALUE,d=Math.abs(s[0].x),p=Math.abs(s[0].y),f=Math.abs(s[0].z);for(d<=h&&(h=d,a.set(1,0,0)),p<=h&&(h=p,a.set(0,1,0)),f<=h&&a.set(0,0,1),u.crossVectors(s[0],a).normalize(),o[0].crossVectors(s[0],u),l[0].crossVectors(s[0],o[0]),i=1;i<=e;i++)o[i]=o[i-1].clone(),l[i]=l[i-1].clone(),u.crossVectors(s[i-1],s[i]),u.length()>Number.EPSILON&&(u.normalize(),r=Math.acos(Ht.clamp(s[i-1].dot(s[i]),-1,1)),o[i].applyMatrix4(c.makeRotationAxis(u,r))),l[i].crossVectors(s[i],o[i]);if(!0===t)for(r=Math.acos(Ht.clamp(o[0].dot(o[e]),-1,1)),r/=e,0<s[0].dot(u.crossVectors(o[0],o[e]))&&(r=-r),i=1;i<=e;i++)o[i].applyMatrix4(c.makeRotationAxis(s[i],r*i)),l[i].crossVectors(s[i],o[i]);return{tangents:s,normals:o,binormals:l}},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.arcLengthDivisions=e.arcLengthDivisions,this},toJSON:function(){var e={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e},fromJSON:function(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}),((ql.prototype=Object.create(Wl.prototype)).constructor=ql).prototype.isEllipseCurve=!0,ql.prototype.getPoint=function(e,t){for(var i=t||new Yt,n=2*Math.PI,r=this.aEndAngle-this.aStartAngle,a=Math.abs(r)<Number.EPSILON;r<0;)r+=n;for(;n<r;)r-=n;r<Number.EPSILON&&(r=a?0:n),!0!==this.aClockwise||a||(r===n?r=-n:r-=n);var s=this.aStartAngle+e*r,o=this.aX+this.xRadius*Math.cos(s),l=this.aY+this.yRadius*Math.sin(s);if(0!==this.aRotation){var u=Math.cos(this.aRotation),c=Math.sin(this.aRotation),h=o-this.aX,d=l-this.aY;o=h*u-d*c+this.aX,l=h*c+d*u+this.aY}return i.set(o,l)},ql.prototype.copy=function(e){return Wl.prototype.copy.call(this,e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this},ql.prototype.toJSON=function(){var e=Wl.prototype.toJSON.call(this);return e.aX=this.aX,e.aY=this.aY,e.xRadius=this.xRadius,e.yRadius=this.yRadius,e.aStartAngle=this.aStartAngle,e.aEndAngle=this.aEndAngle,e.aClockwise=this.aClockwise,e.aRotation=this.aRotation,e},ql.prototype.fromJSON=function(e){return Wl.prototype.fromJSON.call(this,e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this},((Xl.prototype=Object.create(ql.prototype)).constructor=Xl).prototype.isArcCurve=!0;var $l=new Wt,Kl=new Zl,Jl=new Zl,eu=new Zl;function tu(e,t,i,n){Wl.call(this),this.type="CatmullRomCurve3",this.points=e||[],this.closed=t||!1,this.curveType=i||"centripetal",this.tension=n||.5}function iu(e,t,i,n,r){var a=.5*(n-t),s=.5*(r-i),o=e*e;return(2*i-2*n+a+s)*(e*o)+(-3*i+3*n-2*a-s)*o+a*e+i}function nu(e,t,i,n){return(s=1-e)*s*t+2*(1-(a=e))*a*i+(r=e)*r*n;var r,a,s}function ru(e,t,i,n,r){return(u=1-e)*u*u*t+3*(l=1-(o=e))*l*o*i+3*(1-(s=e))*s*s*n+(a=e)*a*a*r;var a,s,o,l,u}function au(e,t,i,n){Wl.call(this),this.type="CubicBezierCurve",this.v0=e||new Yt,this.v1=t||new Yt,this.v2=i||new Yt,this.v3=n||new Yt}function su(e,t,i,n){Wl.call(this),this.type="CubicBezierCurve3",this.v0=e||new Wt,this.v1=t||new Wt,this.v2=i||new Wt,this.v3=n||new Wt}function ou(e,t){Wl.call(this),this.type="LineCurve",this.v1=e||new Yt,this.v2=t||new Yt}function lu(e,t){Wl.call(this),this.type="LineCurve3",this.v1=e||new Wt,this.v2=t||new Wt}function uu(e,t,i){Wl.call(this),this.type="QuadraticBezierCurve",this.v0=e||new Yt,this.v1=t||new Yt,this.v2=i||new Yt}function cu(e,t,i){Wl.call(this),this.type="QuadraticBezierCurve3",this.v0=e||new Wt,this.v1=t||new Wt,this.v2=i||new Wt}function hu(e){Wl.call(this),this.type="SplineCurve",this.points=e||[]}((tu.prototype=Object.create(Wl.prototype)).constructor=tu).prototype.isCatmullRomCurve3=!0,tu.prototype.getPoint=function(e,t){var i,n,r,a,s=t||new Wt,o=this.points,l=o.length,u=(l-(this.closed?0:1))*e,c=Math.floor(u),h=u-c;if(this.closed?c+=0<c?0:(Math.floor(Math.abs(c)/l)+1)*l:0===h&&c===l-1&&(c=l-2,h=1),i=this.closed||0<c?o[(c-1)%l]:($l.subVectors(o[0],o[1]).add(o[0]),$l),n=o[c%l],r=o[(c+1)%l],a=this.closed||c+2<l?o[(c+2)%l]:($l.subVectors(o[l-1],o[l-2]).add(o[l-1
vendor: 14,771 bytes, line 1
1]),$l),"centripetal"===this.curveType||"chordal"===this.curveType){var d="chordal"===this.curveType?.5:.25,p=Math.pow(i.distanceToSquared(n),d),f=Math.pow(n.distanceToSquared(r),d),g=Math.pow(r.distanceToSquared(a),d);f<1e-4&&(f=1),p<1e-4&&(p=f),g<1e-4&&(g=f),Kl.initNonuniformCatmullRom(i.x,n.x,r.x,a.x,p,f,g),Jl.initNonuniformCatmullRom(i.y,n.y,r.y,a.y,p,f,g),eu.initNonuniformCatmullRom(i.z,n.z,r.z,a.z,p,f,g)}else"catmullrom"===this.curveType&&(Kl.initCatmullRom(i.x,n.x,r.x,a.x,this.tension),Jl.initCatmullRom(i.y,n.y,r.y,a.y,this.tension),eu.initCatmullRom(i.z,n.z,r.z,a.z,this.tension));return s.set(Kl.calc(h),Jl.calc(h),eu.calc(h)),s},tu.prototype.copy=function(e){Wl.prototype.copy.call(this,e),this.points=[];for(var t=0,i=e.points.length;t<i;t++){var n=e.points[t];this.points.push(n.clone())}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this},tu.prototype.toJSON=function(){var e=Wl.prototype.toJSON.call(this);e.points=[];for(var t=0,i=this.points.length;t<i;t++){var n=this.points[t];e.points.push(n.toArray())}return e.closed=this.closed,e.curveType=this.curveType,e.tension=this.tension,e},tu.prototype.fromJSON=function(e){Wl.prototype.fromJSON.call(this,e),this.points=[];for(var t=0,i=e.points.length;t<i;t++){var n=e.points[t];this.points.push((new Wt).fromArray(n))}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this},((au.prototype=Object.create(Wl.prototype)).constructor=au).prototype.isCubicBezierCurve=!0,au.prototype.getPoint=function(e,t){var i=t||new Yt,n=this.v0,r=this.v1,a=this.v2,s=this.v3;return i.set(ru(e,n.x,r.x,a.x,s.x),ru(e,n.y,r.y,a.y,s.y)),i},au.prototype.copy=function(e){return Wl.prototype.copy.call(this,e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this},au.prototype.toJSON=function(){var e=Wl.prototype.toJSON.call(this);return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e},au.prototype.fromJSON=function(e){return Wl.prototype.fromJSON.call(this,e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this},((su.prototype=Object.create(Wl.prototype)).constructor=su).prototype.isCubicBezierCurve3=!0,su.prototype.getPoint=function(e,t){var i=t||new Wt,n=this.v0,r=this.v1,a=this.v2,s=this.v3;return i.set(ru(e,n.x,r.x,a.x,s.x),ru(e,n.y,r.y,a.y,s.y),ru(e,n.z,r.z,a.z,s.z)),i},su.prototype.copy=function(e){return Wl.prototype.copy.call(this,e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this},su.prototype.toJSON=function(){var e=Wl.prototype.toJSON.call(this);return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e},su.prototype.fromJSON=function(e){return Wl.prototype.fromJSON.call(this,e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this},((ou.prototype=Object.create(Wl.prototype)).constructor=ou).prototype.isLineCurve=!0,ou.prototype.getPoint=function(e,t){var i=t||new Yt;return 1===e?i.copy(this.v2):(i.copy(this.v2).sub(this.v1),i.multiplyScalar(e).add(this.v1)),i},ou.prototype.getPointAt=function(e,t){return this.getPoint(e,t)},ou.prototype.getTangent=function(){return this.v2.clone().sub(this.v1).normalize()},ou.prototype.copy=function(e){return Wl.prototype.copy.call(this,e),this.v1.copy(e.v1),this.v2.copy(e.v2),this},ou.prototype.toJSON=function(){var e=Wl.prototype.toJSON.call(this);return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e},ou.prototype.fromJSON=function(e){return Wl.prototype.fromJSON.call(this,e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this},((lu.prototype=Object.create(Wl.prototype)).constructor=lu).prototype.isLineCurve3=!0,lu.prototype.getPoint=function(e,t){var i=t||new Wt;return 1===e?i.copy(this.v2):(i.copy(this.v2).sub(this.v1),i.multiplyScalar(e).add(this.v1)),i},lu.prototype.getPointAt=function(e,t){return this.getPoint(e,t)},lu.prototype.copy=function(e){return Wl.prototype.copy.call(this,e),this.v1.copy(e.v1),this.v2.copy(e.v2),this},lu.prototype.toJSON=function(){var e=Wl.prototype.toJSON.call(this);return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e},lu.prototype.fromJSON=function(e){return Wl.prototype.fromJSON.call(this,e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this},((uu.prototype=Object.create(Wl.prototype)).constructor=uu).prototype.isQuadraticBezierCurve=!0,uu.prototype.getPoint=function(e,t){var i=t||new Yt,n=this.v0,r=this.v1,a=this.v2;return i.set(nu(e,n.x,r.x,a.x),nu(e,n.y,r.y,a.y)),i},uu.prototype.copy=function(e){return Wl.prototype.copy.call(this,e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this},uu.prototype.toJSON=function(){var e=Wl.prototype.toJSON.call(this);return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e},uu.prototype.fromJSON=function(e){return Wl.prototype.fromJSON.call(this,e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this},((cu.prototype=Object.create(Wl.prototype)).constructor=cu).prototype.isQuadraticBezierCurve3=!0,cu.prototype.getPoint=function(e,t){var i=t||new Wt,n=this.v0,r=this.v1,a=this.v2;return i.set(nu(e,n.x,r.x,a.x),nu(e,n.y,r.y,a.y),nu(e,n.z,r.z,a.z)),i},cu.prototype.copy=function(e){return Wl.prototype.copy.call(this,e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this},cu.prototype.toJSON=function(){var e=Wl.prototype.toJSON.call(this);return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e},cu.prototype.fromJSON=function(e){return Wl.prototype.fromJSON.call(this,e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this},((hu.prototype=Object.create(Wl.prototype)).constructor=hu).prototype.isSplineCurve=!0,hu.prototype.getPoint=function(e,t){var i=t||new Yt,n=this.points,r=(n.length-1)*e,a=Math.floor(r),s=r-a,o=n[0===a?a:a-1],l=n[a],u=n[a>n.length-2?n.length-1:a+1],c=n[a>n.length-3?n.length-1:a+2];return i.set(iu(s,o.x,l.x,u.x,c.x),iu(s,o.y,l.y,u.y,c.y)),i},hu.prototype.copy=function(e){Wl.prototype.copy.call(this,e),this.points=[];for(var t=0,i=e.points.length;t<i;t++){var n=e.points[t];this.points.push(n.clone())}return this},hu.prototype.toJSON=function(){var e=Wl.prototype.toJSON.call(this);e.points=[];for(var t=0,i=this.points.length;t<i;t++){var n=this.points[t];e.points.push(n.toArray())}return e},hu.prototype.fromJSON=function(e){Wl.prototype.fromJSON.call(this,e),this.points=[];for(var t=0,i=e.points.length;t<i;t++){var n=e.points[t];this.points.push((new Yt).fromArray(n))}return this};var du=Object.freeze({ArcCurve:Xl,CatmullRomCurve3:tu,CubicBezierCurve:au,CubicBezierCurve3:su,EllipseCurve:ql,LineCurve:ou,LineCurve3:lu,QuadraticBezierCurve:uu,QuadraticBezierCurve3:cu,SplineCurve:hu});function pu(){Wl.call(this),this.type="CurvePath",this.curves=[],this.autoClose=!1}function fu(e){pu.call(this),this.type="Path",this.currentPoint=new Yt,e&&this.setFromPoints(e)}function gu(e){fu.call(this,e),this.uuid=Ht.generateUUID(),this.type="Shape",this.holes=[]}function mu(e,t){vn.call(this),this.type="Light",this.color=new Fi(e),this.intensity=void 0!==t?t:1,this.receiveShadow=void 0}function vu(e,t,i){mu.call(this,e,i),this.type="HemisphereLight",this.castShadow=void 0,this.position.copy(vn.DefaultUp),this.updateMatrix(),this.groundColor=new Fi(t)}function yu(e){this.camera=e,this.bias=0,this.radius=1,this.mapSize=new Yt(512,512),this.map=null,this.matrix=new Qt}function _u(){yu.call(this,new Ws(50,1,.5,500))}function Mu(e,t,i,n,r,a){mu.call(this,e,t),this.type="SpotLight",this.position.copy(vn.DefaultUp),this.updateMatrix(),this.target=new vn,Object.defineProperty(this,"power",{get:function(){return this.intensity*Math.PI},set:function(e){this.intensity=e/Math.PI}}),this.distance=void 0!==i?i:0,this.angle=void 0!==n?n:Math.PI/3,this.penumbra=void 0!==r?r:0,this.decay=void 0!==a?a:1,this.shadow=new _u}function wu(e,t,i,n){mu.call(this,e,t),this.type="PointLight",Object.defineProperty(this,"power",{get:function(){return 4*this.intensity*Math.PI},set:function(e){this.intensity=e/(4*Math.PI)}}),this.distance=void 0!==i?i:0,this.decay=void 0!==n?n:1,this.shadow=new yu(new Ws(90,1,.5,500))}function bu(){yu.call(this,new _n(-5,5,5,-5,.5,500))}function Tu(e,t){mu.call(this,e,t),this.type="DirectionalLight",this.position.copy(vn.DefaultUp),this.updateMatrix(),this.target=new vn,this.shadow=new bu}function Au(e,t){mu.call(this,e,t),this.type="AmbientLight",this.castShadow=void 0}function xu(e,t,i,n){mu.call(this,e,t),this.type="RectAreaLight",this.width=void 0!==i?i:10,this.height=void 0!==n?n:10}function Eu(e,t,i,n){Ru.call(this,e,t,i,n)}function Su(e,t,i){Ru.call(this,e,t,i)}function Du(e,t,i,n){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=void 0!==n?n:new t.constructor(i),this.sampleValues=t,this.valueSize=i}function Nu(e,t,i,n){Du.call(this,e,t,i,n)}function Cu(e,t,i,n){Ru.call(this,e,t,i,n)}function Lu(e,t,i,n){Ru.call(this,e,t,i,n)}function Iu(e,t,i,n){Ru.call(this,e,t,i,n)}function Ou(e,t,i,n){Du.call(this,e,t,i,n),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0}function ju(e,t,i,n){Du.call(this,e,t,i,n)}function ku(e,t,i,n){Du.call(this,e,t,i,n)}pu.prototype=Object.assign(Object.create(Wl.prototype),{constructor:pu,add:function(e){this.curves.push(e)},closePath:function(){var e=this.curves[0].getPoint(0),t=this.curves[this.curves.length-1].getPoint(1);e.equals(t)||this.curves.push(new ou(t,e))},getPoint:function(e){for(var t=e*this.getLength(),i=this.getCurveLengths(),n=0;n<i.length;){if(i[n]>=t){var r=i[n]-t,a=this.curves[n],s=a.getLength(),o=0===s?0:1-r/s;return a.getPointAt(o)}n++}return null},getLength:function(){var e=this.getCurveLengths();return e[e.length-1]},updateArcLengths:function(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()},getCurveLengths:function(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;for(var e=[],t=0,i=0,n=this.curves.length;i<n;i++)t+=this.curves[i].getLength(),e.push(t);return this.cacheLengths=e},getSpacedPoints:function(e){void 0===e&&(e=40);for(var t=[],i=0;i<=e;i++)t.push(this.getPoint(i/e));return this.autoClose&&t.push(t[0]),t},getPoints:function(e){e=e||12;for(var t,i=[],n=0,r=this.curves;n<r.length;n++)for(var a=r[n],s=a&&a.isEllipseCurve?2*e:a&&a.isLineCurve?1:a&&a.isSplineCurve?e*a.points.length:e,o=a.getPoints(s),l=0;l<o.length;l++){var u=o[l];t&&t.equals(u)||(i.push(u),t=u)}return this.autoClose&&1<i.length&&!i[i.length-1].equals(i[0])&&i.push(i[0]),i},copy:function(e){Wl.prototype.copy.call(this,e),this.curves=[];for(var t=0,i=e.curves.length;t<i;t++){var n=e.curves[t];this.curves.push(n.clone())}return this.autoClose=e.autoClose,this},toJSON:function(){var e=Wl.prototype.toJSON.call(this);e.autoClose=this.autoClose,e.curves=[];for(var t=0,i=this.curves.length;t<i;t++){var n=this.curves[t];e.curves.push(n.toJSON())}return e},fromJSON:function(e){Wl.prototype.fromJSON.call(this,e),this.autoClose=e.autoClose,this.curves=[];for(var t=0,i=e.curves.length;t<i;t++){var n=e.curves[t];this.curves.push((new du[n.type]).fromJSON(n))}return this}}),fu.prototype=Object.assign(Object.create(pu.prototype),{constructor:fu,setFromPoints:function(e){this.moveTo(e[0].x,e[0].y);for(var t=1,i=e.length;t<i;t++)this.lineTo(e[t].x,e[t].y)},moveTo:function(e,t){this.currentPoint.set(e,t)},lineTo:function(e,t){var i=new ou(this.currentPoint.clone(),new Yt(e,t));this.curves.push(i),this.currentPoint.set(e,t)},quadraticCurveTo:function(e,t,i,n){var r=new uu(this.currentPoint.clone(),new Yt(e,t),new Yt(i,n));this.curves.push(r),this.currentPoint.set(i,n)},bezierCurveTo:function(e,t,i,n,r,a){var s=new au(this.currentPoint.clone(),new Yt(e,t),new Yt(i,n),new Yt(r,a));this.curves.push(s),this.currentPoint.set(r,a)},splineThru:function(e){var t=new hu([this.currentPoint.clone()].concat(e));this.curves.push(t),this.currentPoint.copy(e[e.length-1])},arc:function(e,t,i,n,r,a){var s=this.currentPoint.x,o=this.currentPoint.y;this.absarc(e+s,t+o,i,n,r,a)},absarc:function(e,t,i,n,r,a){this.absellipse(e,t,i,i,n,r,a)},ellipse:function(e,t,i,n,r,a,s,o){var l=this.currentPoint.x,u=this.currentPoint.y;this.absellipse(e+l,t+u,i,n,r,a,s,o)},absellipse:function(e,t,i,n,r,a,s,o){var l=new ql(e,t,i,n,r,a,s,o);if(0<this.curves.length){var u=l.getPoint(0);u.equals(this.currentPoint)||this.lineTo(u.x,u.y)}this.curves.push(l);var c=l.getPoint(1);this.currentPoint.copy(c)},copy:function(e){return pu.prototype.copy.call(this,e),this.currentPoint.copy(e.currentPoint),this},toJSON:function(){var e=pu.prototype.toJSON.call(this);return e.currentPoint=this.currentPoint.toArray(),e},fromJSON:function(e){return pu.prototype.fromJSON.call(this,e),this.currentPoint.fromArray(e.currentPoint),this}}),gu.prototype=Object.assign(Object.create(fu.prototype),{constructor:gu,getPointsHoles:function(e){for(var t=[],i=0,n=this.holes.length;i<n;i++)t[i]=this.holes[i].getPoints(e);return t},extractPoints:function(e){return{shape:this.getPoints(e),holes:this.getPointsHoles(e)}},copy:function(e){fu.prototype.copy.call(this,e),this.holes=[];for(var t=0,i=e.holes.length;t<i;t++){var n=e.holes[t];this.holes.push(n.clone())}return this},toJSON:function(){var e=fu.prototype.toJSON.call(this);e.uuid=this.uuid,e.holes=[];for(var t=0,i=this.holes.length;t<i;t++){var n=this.holes[t];e.holes.push(n.toJSON())}return e},fromJSON:function(e){fu.prototype.fromJSON.call(this,e),this.uuid=e.uuid,this.holes=[];for(var t=0,i=e.holes.length;t<i;t++){var n=e.holes[t];this.holes.push((new fu).fromJSON(n))}return this}}),mu.prototype=Object.assign(Object.create(vn.prototype),{constructor:mu,isLight:!0,copy:function(e){return vn.prototype.copy.call(this,e),this.color.copy(e.color),this.intensity=e.intensity,this},toJSON:function(e){var t=vn.prototype.toJSON.call(this,e);return t.object.color=this.color.getHex(),t.object.intensity=this.intensity,void 0!==this.groundColor&&(t.object.groundColor=this.groundColor.getHex()),void 0!==this.distance&&(t.object.distance=this.distance),void 0!==this.angle&&(t.object.angle=this.angle),void 0!==this.decay&&(t.object.decay=this.decay),void 0!==this.penumbra&&(t.object.penumbra=this.penumbra),void 0!==this.shadow&&(t.object.shadow=this.shadow.toJSON()),t}}),vu.prototype=Object.assign(Object.create(mu.prototype),{constructor:vu,isHemisphereLight:!0,copy:function(e){return mu.prototype.copy.call(this,e),this.groundColor.copy(e.groundColor),this}}),Object.assign(yu.prototype,{copy:function(e){return this.camera=e.camera.clone(),this.bias=e.bias,this.radius=e.radius,this.mapSize.copy(e.mapSize),this},clone:function(){return(new this.constructor).copy(this)},toJSON:function(){var e={};return 0!==this.bias&&(e.bias=this.bias),1!==this.radius&&(e.radiu
vendor: 14,842 bytes, line 1
1s=this.radius),512===this.mapSize.x&&512===this.mapSize.y||(e.mapSize=this.mapSize.toArray()),e.camera=this.camera.toJSON(!1).object,delete e.camera.matrix,e}}),_u.prototype=Object.assign(Object.create(yu.prototype),{constructor:_u,isSpotLightShadow:!0,update:function(e){var t=this.camera,i=2*Ht.RAD2DEG*e.angle,n=this.mapSize.width/this.mapSize.height,r=e.distance||t.far;i===t.fov&&n===t.aspect&&r===t.far||(t.fov=i,t.aspect=n,t.far=r,t.updateProjectionMatrix())}}),Mu.prototype=Object.assign(Object.create(mu.prototype),{constructor:Mu,isSpotLight:!0,copy:function(e){return mu.prototype.copy.call(this,e),this.distance=e.distance,this.angle=e.angle,this.penumbra=e.penumbra,this.decay=e.decay,this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}),wu.prototype=Object.assign(Object.create(mu.prototype),{constructor:wu,isPointLight:!0,copy:function(e){return mu.prototype.copy.call(this,e),this.distance=e.distance,this.decay=e.decay,this.shadow=e.shadow.clone(),this}}),bu.prototype=Object.assign(Object.create(yu.prototype),{constructor:bu}),Tu.prototype=Object.assign(Object.create(mu.prototype),{constructor:Tu,isDirectionalLight:!0,copy:function(e){return mu.prototype.copy.call(this,e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}),Au.prototype=Object.assign(Object.create(mu.prototype),{constructor:Au,isAmbientLight:!0}),xu.prototype=Object.assign(Object.create(mu.prototype),{constructor:xu,isRectAreaLight:!0,copy:function(e){return mu.prototype.copy.call(this,e),this.width=e.width,this.height=e.height,this},toJSON:function(e){var t=mu.prototype.toJSON.call(this,e);return t.object.width=this.width,t.object.height=this.height,t}}),Eu.prototype=Object.assign(Object.create(Ru.prototype),{constructor:Eu,ValueTypeName:"string",ValueBufferType:Array,DefaultInterpolation:2300,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),Su.prototype=Object.assign(Object.create(Ru.prototype),{constructor:Su,ValueTypeName:"bool",ValueBufferType:Array,DefaultInterpolation:2300,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),Object.assign(Du.prototype,{evaluate:function(e){var t=this.parameterPositions,i=this._cachedIndex,n=t[i],r=t[i-1];e:{t:{var a;i:{n:if(!(e<n)){for(var s=i+2;;){if(void 0===n){if(e<r)break n;return i=t.length,this._cachedIndex=i,this.afterEnd_(i-1,e,r)}if(i===s)break;if(r=n,e<(n=t[++i]))break t}a=t.length;break i}if(r<=e)break e;var o=t[1];e<o&&(i=2,r=o);for(s=i-2;;){if(void 0===r)return this._cachedIndex=0,this.beforeStart_(0,e,n);if(i===s)break;if(n=r,(r=t[--i-1])<=e)break t}a=i,i=0}for(;i<a;){var l=i+a>>>1;e<t[l]?a=l:i=1+l}if(n=t[i],void 0===(r=t[i-1]))return this._cachedIndex=0,this.beforeStart_(0,e,n);if(void 0===n)return i=t.length,this._cachedIndex=i,this.afterEnd_(i-1,r,e)}this._cachedIndex=i,this.intervalChanged_(i,r,n)}return this.interpolate_(i,r,e,n)},settings:null,DefaultSettings_:{},getSettings_:function(){return this.settings||this.DefaultSettings_},copySampleValue_:function(e){for(var t=this.resultBuffer,i=this.sampleValues,n=this.valueSize,r=e*n,a=0;a!==n;++a)t[a]=i[r+a];return t},interpolate_:function(){throw new Error("call to abstract method")},intervalChanged_:function(){}}),Object.assign(Du.prototype,{beforeStart_:Du.prototype.copySampleValue_,afterEnd_:Du.prototype.copySampleValue_}),Nu.prototype=Object.assign(Object.create(Du.prototype),{constructor:Nu,interpolate_:function(e,t,i,n){for(var r=this.resultBuffer,a=this.sampleValues,s=this.valueSize,o=e*s,l=(i-t)/(n-t),u=o+s;o!==u;o+=4)Vt.slerpFlat(r,0,a,o-s,a,o,l);return r}}),Cu.prototype=Object.assign(Object.create(Ru.prototype),{constructor:Cu,ValueTypeName:"quaternion",DefaultInterpolation:2301,InterpolantFactoryMethodLinear:function(e){return new Nu(this.times,this.values,this.getValueSize(),e)},InterpolantFactoryMethodSmooth:void 0}),Lu.prototype=Object.assign(Object.create(Ru.prototype),{constructor:Lu,ValueTypeName:"color"}),Iu.prototype=Object.assign(Object.create(Ru.prototype),{constructor:Iu,ValueTypeName:"number"}),Ou.prototype=Object.assign(Object.create(Du.prototype),{constructor:Ou,DefaultSettings_:{endingStart:2400,endingEnd:2400},intervalChanged_:function(e,t,i){var n=this.parameterPositions,r=e-2,a=e+1,s=n[r],o=n[a];if(void 0===s)switch(this.getSettings_().endingStart){case 2401:r=e,s=2*t-i;break;case 2402:s=t+n[r=n.length-2]-n[r+1];break;default:r=e,s=i}if(void 0===o)switch(this.getSettings_().endingEnd){case 2401:a=e,o=2*i-t;break;case 2402:o=i+n[a=1]-n[0];break;default:a=e-1,o=t}var l=.5*(i-t),u=this.valueSize;this._weightPrev=l/(t-s),this._weightNext=l/(o-i),this._offsetPrev=r*u,this._offsetNext=a*u},interpolate_:function(e,t,i,n){for(var r=this.resultBuffer,a=this.sampleValues,s=this.valueSize,o=e*s,l=o-s,u=this._offsetPrev,c=this._offsetNext,h=this._weightPrev,d=this._weightNext,p=(i-t)/(n-t),f=p*p,g=f*p,m=-h*g+2*h*f-h*p,v=(1+h)*g+(-1.5-2*h)*f+(-.5+h)*p+1,y=(-1-d)*g+(1.5+d)*f+.5*p,_=d*g-d*f,M=0;M!==s;++M)r[M]=m*a[u+M]+v*a[l+M]+y*a[o+M]+_*a[c+M];return r}}),ju.prototype=Object.assign(Object.create(Du.prototype),{constructor:ju,interpolate_:function(e,t,i,n){for(var r=this.resultBuffer,a=this.sampleValues,s=this.valueSize,o=e*s,l=o-s,u=(i-t)/(n-t),c=1-u,h=0;h!==s;++h)r[h]=a[l+h]*c+a[o+h]*u;return r}}),ku.prototype=Object.assign(Object.create(Du.prototype),{constructor:ku,interpolate_:function(e){return this.copySampleValue_(e-1)}});var Pu={arraySlice:function(e,t,i){return Pu.isTypedArray(e)?new e.constructor(e.subarray(t,void 0!==i?i:e.length)):e.slice(t,i)},convertArray:function(e,t,i){return!e||!i&&e.constructor===t?e:"number"==typeof t.BYTES_PER_ELEMENT?new t(e):Array.prototype.slice.call(e)},isTypedArray:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)},getKeyframeOrder:function(i){for(var e=i.length,t=new Array(e),n=0;n!==e;++n)t[n]=n;return t.sort(function(e,t){return i[e]-i[t]}),t},sortedArray:function(e,t,i){for(var n=e.length,r=new e.constructor(n),a=0,s=0;s!==n;++a)for(var o=i[a]*t,l=0;l!==t;++l)r[s++]=e[o+l];return r},flattenJSON:function(e,t,i,n){for(var r=1,a=e[0];void 0!==a&&void 0===a[n];)a=e[r++];if(void 0!==a){var s=a[n];if(void 0!==s)if(Array.isArray(s))for(;void 0!==(s=a[n])&&(t.push(a.time),i.push.apply(i,s)),void 0!==(a=e[r++]););else if(void 0!==s.toArray)for(;void 0!==(s=a[n])&&(t.push(a.time),s.toArray(i,i.length)),void 0!==(a=e[r++]););else for(;void 0!==(s=a[n])&&(t.push(a.time),i.push(s)),void 0!==(a=e[r++]););}}};function Ru(e,t,i,n){if(void 0===e)throw new Error("THREE.KeyframeTrack: track name is undefined");if(void 0===t||0===t.length)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+e);this.name=e,this.times=Pu.convertArray(t,this.TimeBufferType),this.values=Pu.convertArray(i,this.ValueBufferType),this.setInterpolation(n||this.DefaultInterpolation),this.validate(),this.optimize()}function zu(e,t,i,n){Ru.call(this,e,t,i,n)}function Uu(e,t,i){this.name=e,this.tracks=i,this.duration=void 0!==t?t:-1,this.uuid=Ht.generateUUID(),this.duration<0&&this.resetDuration(),this.optimize()}function Bu(e){this.manager=void 0!==e?e:Gl,this.textures={}}function Fu(e){this.manager=void 0!==e?e:Gl}Object.assign(Ru,{parse:function(e){if(void 0===e.type)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");var t=Ru._getTrackTypeForValueTypeName(e.type);if(void 0===e.times){var i=[],n=[];Pu.flattenJSON(e.keys,i,n,"value"),e.times=i,e.values=n}return void 0!==t.parse?t.parse(e):new t(e.name,e.times,e.values,e.interpolation)},toJSON:function(e){var t,i=e.constructor;if(void 0!==i.toJSON)t=i.toJSON(e);else{t={name:e.name,times:Pu.convertArray(e.times,Array),values:Pu.convertArray(e.values,Array)};var n=e.getInterpolation();n!==e.DefaultInterpolation&&(t.interpolation=n)}return t.type=e.ValueTypeName,t},_getTrackTypeForValueTypeName:function(e){switch(e.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return Iu;case"vector":case"vector2":case"vector3":case"vector4":return zu;case"color":return Lu;case"quaternion":return Cu;case"bool":case"boolean":return Su;case"string":return Eu}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+e)}}),Object.assign(Ru.prototype,{constructor:Ru,TimeBufferType:Float32Array,ValueBufferType:Float32Array,DefaultInterpolation:2301,InterpolantFactoryMethodDiscrete:function(e){return new ku(this.times,this.values,this.getValueSize(),e)},InterpolantFactoryMethodLinear:function(e){return new ju(this.times,this.values,this.getValueSize(),e)},InterpolantFactoryMethodSmooth:function(e){return new Ou(this.times,this.values,this.getValueSize(),e)},setInterpolation:function(e){var t;switch(e){case 2300:t=this.InterpolantFactoryMethodDiscrete;break;case 2301:t=this.InterpolantFactoryMethodLinear;break;case 2302:t=this.InterpolantFactoryMethodSmooth}if(void 0!==t)this.createInterpolant=t;else{var i="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(void 0===this.createInterpolant){if(e===this.DefaultInterpolation)throw new Error(i);this.setInterpolation(this.DefaultInterpolation)}console.warn("THREE.KeyframeTrack:",i)}},getInterpolation:function(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return 2300;case this.InterpolantFactoryMethodLinear:return 2301;case this.InterpolantFactoryMethodSmooth:return 2302}},getValueSize:function(){return this.values.length/this.times.length},shift:function(e){if(0!==e)for(var t=this.times,i=0,n=t.length;i!==n;++i)t[i]+=e;return this},scale:function(e){if(1!==e)for(var t=this.times,i=0,n=t.length;i!==n;++i)t[i]*=e;return this},trim:function(e,t){for(var i=this.times,n=i.length,r=0,a=n-1;r!==n&&i[r]<e;)++r;for(;-1!==a&&i[a]>t;)--a;if(++a,0!==r||a!==n){a<=r&&(r=(a=Math.max(a,1))-1);var s=this.getValueSize();this.times=Pu.arraySlice(i,r,a),this.values=Pu.arraySlice(this.values,r*s,a*s)}return this},validate:function(){var e=!0,t=this.getValueSize();t-Math.floor(t)!=0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);var i=this.times,n=this.values,r=i.length;0===r&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);for(var a=null,s=0;s!==r;s++){var o=i[s];if("number"==typeof o&&isNaN(o)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,s,o),e=!1;break}if(null!==a&&o<a){console.error("THREE.KeyframeTrack: Out of order keys.",this,s,o,a),e=!1;break}a=o}if(void 0!==n&&Pu.isTypedArray(n)){s=0;for(var l=n.length;s!==l;++s){var u=n[s];if(isNaN(u)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,s,u),e=!1;break}}}return e},optimize:function(){for(var e=this.times,t=this.values,i=this.getValueSize(),n=2302===this.getInterpolation(),r=1,a=e.length-1,s=1;s<a;++s){var o=!1,l=e[s];if(l!==e[s+1]&&(1!==s||l!==l[0]))if(n)o=!0;else for(var u=s*i,c=u-i,h=u+i,d=0;d!==i;++d){var p=t[u+d];if(p!==t[c+d]||p!==t[h+d]){o=!0;break}}if(o){if(s!==r){e[r]=e[s];var f=s*i,g=r*i;for(d=0;d!==i;++d)t[g+d]=t[f+d]}++r}}if(0<a){e[r]=e[a];for(f=a*i,g=r*i,d=0;d!==i;++d)t[g+d]=t[f+d];++r}return r!==e.length&&(this.times=Pu.arraySlice(e,0,r),this.values=Pu.arraySlice(t,0,r*i)),this}}),zu.prototype=Object.assign(Object.create(Ru.prototype),{constructor:zu,ValueTypeName:"vector"}),Object.assign(Uu,{parse:function(e){for(var t=[],i=e.tracks,n=1/(e.fps||1),r=0,a=i.length;r!==a;++r)t.push(Ru.parse(i[r]).scale(n));return new Uu(e.name,e.duration,t)},toJSON:function(e){for(var t=[],i=e.tracks,n={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid},r=0,a=i.length;r!==a;++r)t.push(Ru.toJSON(i[r]));return n},CreateFromMorphTargetSequence:function(e,t,i,n){for(var r=t.length,a=[],s=0;s<r;s++){var o=[],l=[];o.push((s+r-1)%r,s,(s+1)%r),l.push(0,1,0);var u=Pu.getKeyframeOrder(o);o=Pu.sortedArray(o,1,u),l=Pu.sortedArray(l,1,u),n||0!==o[0]||(o.push(r),l.push(l[0])),a.push(new Iu(".morphTargetInfluences["+t[s].name+"]",o,l).scale(1/i))}return new Uu(e,-1,a)},findByName:function(e,t){var i=e;if(!Array.isArray(e)){i=e.geometry&&e.geometry.animations||e.animations}for(var n=0;n<i.length;n++)if(i[n].name===t)return i[n];return null},CreateClipsFromMorphTargetSequences:function(e,t,i){for(var n={},r=/^([\w-]*?)([\d]+)$/,a=0,s=e.length;a<s;a++){var o=e[a],l=o.name.match(r);if(l&&1<l.length){var u=n[h=l[1]];u||(n[h]=u=[]),u.push(o)}}var c=[];for(var h in n)c.push(Uu.CreateFromMorphTargetSequence(h,n[h],t,i));return c},parseAnimation:function(e,t){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;for(var i=function(e,t,i,n,r){if(0!==i.length){var a=[],s=[];Pu.flattenJSON(i,a,s,n),0!==a.length&&r.push(new e(t,a,s))}},n=[],r=e.name||"default",a=e.length||-1,s=e.fps||30,o=e.hierarchy||[],l=0;l<o.length;l++){var u=o[l].keys;if(u&&0!==u.length)if(u[0].morphTargets){for(var c={},h=0;h<u.length;h++)if(u[h].morphTargets)for(var d=0;d<u[h].morphTargets.length;d++)c[u[h].morphTargets[d]]=-1;for(var p in c){var f=[],g=[];for(d=0;d!==u[h].morphTargets.length;++d){var m=u[h];f.push(m.time),g.push(m.morphTarget===p?1:0)}n.push(new Iu(".morphTargetInfluence["+p+"]",f,g))}a=c.length*(s||1)}else{var v=".bones["+t[l].name+"]";i(zu,v+".position",u,"pos",n),i(Cu,v+".quaternion",u,"rot",n),i(zu,v+".scale",u,"scl",n)}}return 0===n.length?null:new Uu(r,a,n)}}),Object.assign(Uu.prototype,{resetDuration:function(){for(var e=0,t=0,i=this.tracks.length;t!==i;++t){var n=this.tracks[t];e=Math.max(e,n.times[n.times.length-1])}this.duration=e},trim:function(){for(var e=0;e<this.tracks.length;e++)this.tracks[e].trim(0,this.duration);return this},optimize:function(){for(var e=0;e<this.tracks.length;e++)this.tracks[e].optimize();return this}}),Object.assign(Bu.prototype,{load:function(e,t,i,n){var r=this;new Yl(r.manager).load(e,function(e){t(r.parse(JSON.parse(e)))},i,n)},setTextures:function(e){this.textures=e},parse:function(e){var t=this.textures;function i(e){return void 0===t[e]&&console.warn("THREE.MaterialLoader: Undefined texture",e),t[e]}var n=new Ul[e.type];if(void 0!==e.uuid&&(n.uuid=e.uuid),void 0!==e.name&&(n.name=e.name),void 0!==e.color&&n.color.setHex(e.color),void 0!==e.roughness&&(n.roughness=e.roughness),void 0!==e.metalness&&(n.metalness=e.metalness),void 0!==e.emissive&&n.emissive.setHex(e.emissive),void 0!==e.specular&&n.specular.setHex(e.specular),void 0!==e.shininess&&(n.shininess=e.shininess),void 0!==e.clearCoat&&(n.clearCoat=e.clearCoat),void 0!==e.clearCoatRoughness&&(n.clearCoatRoughness=e.clearCoatRoughness),void 0!==e.uniforms&&(n.uniforms=e.uniforms),void 0!==e.vertexShader&&(n.vertexShader=e.vertexShader),void 0!==e.fragmentShader&&(n.fragmentShader=e.fragmentShader),void 0!==e.vertexColors&&(n.vertexColors=e.vertexColors),void 0!==e.fog&&(n.fog=e.fog),void 0!==e.flatShading&&(n.flatShading=e.flatShading),void 0!==e.blending&&(n.blending=e.blending),void 0!==e.side&&(n.side=e.side),void 0!==e.opacity&&(n.op
vendor: 7,393 bytes, line 1
1acity=e.opacity),void 0!==e.transparent&&(n.transparent=e.transparent),void 0!==e.alphaTest&&(n.alphaTest=e.alphaTest),void 0!==e.depthTest&&(n.depthTest=e.depthTest),void 0!==e.depthWrite&&(n.depthWrite=e.depthWrite),void 0!==e.colorWrite&&(n.colorWrite=e.colorWrite),void 0!==e.wireframe&&(n.wireframe=e.wireframe),void 0!==e.wireframeLinewidth&&(n.wireframeLinewidth=e.wireframeLinewidth),void 0!==e.wireframeLinecap&&(n.wireframeLinecap=e.wireframeLinecap),void 0!==e.wireframeLinejoin&&(n.wireframeLinejoin=e.wireframeLinejoin),void 0!==e.rotation&&(n.rotation=e.rotation),1!==e.linewidth&&(n.linewidth=e.linewidth),void 0!==e.dashSize&&(n.dashSize=e.dashSize),void 0!==e.gapSize&&(n.gapSize=e.gapSize),void 0!==e.scale&&(n.scale=e.scale),void 0!==e.polygonOffset&&(n.polygonOffset=e.polygonOffset),void 0!==e.polygonOffsetFactor&&(n.polygonOffsetFactor=e.polygonOffsetFactor),void 0!==e.polygonOffsetUnits&&(n.polygonOffsetUnits=e.polygonOffsetUnits),void 0!==e.skinning&&(n.skinning=e.skinning),void 0!==e.morphTargets&&(n.morphTargets=e.morphTargets),void 0!==e.dithering&&(n.dithering=e.dithering),void 0!==e.visible&&(n.visible=e.visible),void 0!==e.userData&&(n.userData=e.userData),void 0!==e.shading&&(n.flatShading=1===e.shading),void 0!==e.size&&(n.size=e.size),void 0!==e.sizeAttenuation&&(n.sizeAttenuation=e.sizeAttenuation),void 0!==e.map&&(n.map=i(e.map)),void 0!==e.alphaMap&&(n.alphaMap=i(e.alphaMap),n.transparent=!0),void 0!==e.bumpMap&&(n.bumpMap=i(e.bumpMap)),void 0!==e.bumpScale&&(n.bumpScale=e.bumpScale),void 0!==e.normalMap&&(n.normalMap=i(e.normalMap)),void 0!==e.normalScale){var r=e.normalScale;!1===Array.isArray(r)&&(r=[r,r]),n.normalScale=(new Yt).fromArray(r)}return void 0!==e.displacementMap&&(n.displacementMap=i(e.displacementMap)),void 0!==e.displacementScale&&(n.displacementScale=e.displacementScale),void 0!==e.displacementBias&&(n.displacementBias=e.displacementBias),void 0!==e.roughnessMap&&(n.roughnessMap=i(e.roughnessMap)),void 0!==e.metalnessMap&&(n.metalnessMap=i(e.metalnessMap)),void 0!==e.emissiveMap&&(n.emissiveMap=i(e.emissiveMap)),void 0!==e.emissiveIntensity&&(n.emissiveIntensity=e.emissiveIntensity),void 0!==e.specularMap&&(n.specularMap=i(e.specularMap)),void 0!==e.envMap&&(n.envMap=i(e.envMap)),void 0!==e.reflectivity&&(n.reflectivity=e.reflectivity),void 0!==e.lightMap&&(n.lightMap=i(e.lightMap)),void 0!==e.lightMapIntensity&&(n.lightMapIntensity=e.lightMapIntensity),void 0!==e.aoMap&&(n.aoMap=i(e.aoMap)),void 0!==e.aoMapIntensity&&(n.aoMapIntensity=e.aoMapIntensity),void 0!==e.gradientMap&&(n.gradientMap=i(e.gradientMap)),n}}),Object.assign(Fu.prototype,{load:function(e,t,i,n){var r=this;new Yl(r.manager).load(e,function(e){t(r.parse(JSON.parse(e)))},i,n)},parse:function(e){var t=new Jn,i=e.data.index;if(void 0!==i){var n=new Vu[i.type](i.array);t.setIndex(new Cn(n,1))}var r=e.data.attributes;for(var a in r){var s=r[a];n=new Vu[s.type](s.array);t.addAttribute(a,new Cn(n,s.itemSize,s.normalized))}var o=e.data.groups||e.data.drawcalls||e.data.offsets;if(void 0!==o)for(var l=0,u=o.length;l!==u;++l){var c=o[l];t.addGroup(c.start,c.count,c.materialIndex)}var h=e.data.boundingSphere;if(void 0!==h){var d=new Wt;void 0!==h.center&&d.fromArray(h.center),t.boundingSphere=new ji(d,h.radius)}return t}});var Gu,Hu,Yu,Qu,Vu={Int8Array:Int8Array,Uint8Array:Uint8Array,Uint8ClampedArray:"undefined"!=typeof Uint8ClampedArray?Uint8ClampedArray:Uint8Array,Int16Array:Int16Array,Uint16Array:Uint16Array,Int32Array:Int32Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array};function Wu(){}Wu.Handlers={handlers:[],add:function(e,t){this.handlers.push(e,t)},get:function(e){for(var t=this.handlers,i=0,n=t.length;i<n;i+=2){var r=t[i],a=t[i+1];if(r.test(e))return a}return null}},Object.assign(Wu.prototype,{crossOrigin:void 0,onLoadStart:function(){},onLoadProgress:function(){},onLoadComplete:function(){},initMaterials:function(e,t,i){for(var n=[],r=0;r<e.length;++r)n[r]=this.createMaterial(e[r],t,i);return n},createMaterial:(Gu={NoBlending:$,NormalBlending:K,AdditiveBlending:J,SubtractiveBlending:ee,MultiplyBlending:te,CustomBlending:ie},Hu=new Fi,Yu=new Vl,Qu=new Bu,function(e,u,c){var h={};function t(e,t,i,n,r){var a,s=u+e,o=Wu.Handlers.get(s);a=null!==o?o.load(s):(Yu.setCrossOrigin(c),Yu.load(s)),void 0!==t&&(a.repeat.fromArray(t),1!==t[0]&&(a.wrapS=Pe),1!==t[1]&&(a.wrapT=Pe)),void 0!==i&&a.offset.fromArray(i),void 0!==n&&("repeat"===n[0]&&(a.wrapS=Pe),"mirror"===n[0]&&(a.wrapS=ze),"repeat"===n[1]&&(a.wrapT=Pe),"mirror"===n[1]&&(a.wrapT=ze)),void 0!==r&&(a.anisotropy=r);var l=Ht.generateUUID();return h[l]=a,l}var i={uuid:Ht.generateUUID(),type:"MeshLambertMaterial"};for(var n in e){var r=e[n];switch(n){case"DbgColor":case"DbgIndex":case"opticalDensity":case"illumination":break;case"DbgName":i.name=r;break;case"blending":i.blending=Gu[r];break;case"colorAmbient":case"mapAmbient":console.warn("THREE.Loader.createMaterial:",n,"is no longer supported.");break;case"colorDiffuse":i.color=Hu.fromArray(r).getHex();break;case"colorSpecular":i.specular=Hu.fromArray(r).getHex();break;case"colorEmissive":i.emissive=Hu.fromArray(r).getHex();break;case"specularCoef":i.shininess=r;break;case"shading":"basic"===r.toLowerCase()&&(i.type="MeshBasicMaterial"),"phong"===r.toLowerCase()&&(i.type="MeshPhongMaterial"),"standard"===r.toLowerCase()&&(i.type="MeshStandardMaterial");break;case"mapDiffuse":i.map=t(r,e.mapDiffuseRepeat,e.mapDiffuseOffset,e.mapDiffuseWrap,e.mapDiffuseAnisotropy);break;case"mapDiffuseRepeat":case"mapDiffuseOffset":case"mapDiffuseWrap":case"mapDiffuseAnisotropy":break;case"mapEmissive":i.emissiveMap=t(r,e.mapEmissiveRepeat,e.mapEmissiveOffset,e.mapEmissiveWrap,e.mapEmissiveAnisotropy);break;case"mapEmissiveRepeat":case"mapEmissiveOffset":case"mapEmissiveWrap":case"mapEmissiveAnisotropy":break;case"mapLight":i.lightMap=t(r,e.mapLightRepeat,e.mapLightOffset,e.mapLightWrap,e.mapLightAnisotropy);break;case"mapLightRepeat":case"mapLightOffset":case"mapLightWrap":case"mapLightAnisotropy":break;case"mapAO":i.aoMap=t(r,e.mapAORepeat,e.mapAOOffset,e.mapAOWrap,e.mapAOAnisotropy);break;case"mapAORepeat":case"mapAOOffset":case"mapAOWrap":case"mapAOAnisotropy":break;case"mapBump":i.bumpMap=t(r,e.mapBumpRepeat,e.mapBumpOffset,e.mapBumpWrap,e.mapBumpAnisotropy);break;case"mapBumpScale":i.bumpScale=r;break;case"mapBumpRepeat":case"mapBumpOffset":case"mapBumpWrap":case"mapBumpAnisotropy":break;case"mapNormal":i.normalMap=t(r,e.mapNormalRepeat,e.mapNormalOffset,e.mapNormalWrap,e.mapNormalAnisotropy);break;case"mapNormalFactor":i.normalScale=r;break;case"mapNormalRepeat":case"mapNormalOffset":case"mapNormalWrap":case"mapNormalAnisotropy":break;case"mapSpecular":i.specularMap=t(r,e.mapSpecularRepeat,e.mapSpecularOffset,e.mapSpecularWrap,e.mapSpecularAnisotropy);break;case"mapSpecularRepeat":case"mapSpecularOffset":case"mapSpecularWrap":case"mapSpecularAnisotropy":break;case"mapMetalness":i.metalnessMap=t(r,e.mapMetalnessRepeat,e.mapMetalnessOffset,e.mapMetalnessWrap,e.mapMetalnessAnisotropy);break;case"mapMetalnessRepeat":case"mapMetalnessOffset":case"mapMetalnessWrap":case"mapMetalnessAnisotropy":break;case"mapRoughness":i.roughnessMap=t(r,e.mapRoughnessRepeat,e.mapRoughnessOffset,e.mapRoughnessWrap,e.mapRoughnessAnisotropy);break;case"mapRoughnessRepeat":case"mapRoughnessOffset":case"mapRoughnessWrap":case"mapRoughnessAnisotropy":break;
1case"mapAlpha":i.alphaMap=t(r,e.mapAlphaRepeat,e.mapAlphaOffset,e.mapAlphaWrap,e.mapAlphaAnisotropy);break;case"mapAlphaRepeat":case"mapAlphaOffset":case"mapAlphaWrap":case"mapAlphaAnisotropy":break;case"flipSided":i.side=Te;break;case"doubleSided":i.side=Z;break;case"transparency":console.warn("THREE.Loader.createMaterial: transparency has been renamed to opacity"),i.opacity=r;break;case"depthTest":case"depthWrite":case"colorWrite":case"opacity":case"reflectivity":case"transparent":case"visible":case"wireframe":i[n]=r;break;case"vertexColors":!0===r&&(i.vertexColors=2),"face"===r&&(i.vertexColors=1);break;default:console.error("THREE.Loader.createMaterial: Unsupported",n,r)}}return"MeshBasicMaterial"===i.type&&delete i.emissive,"MeshPhongMaterial"!==i.type&&delete i.specular,i.opacity<1&&(i.transparent=!0),Qu.setTextures(h),Qu.parse(i)})});var qu=function(e){var t=e.lastIndexOf("/");return-1===t?"./":e.substr(0,t+1)};function Xu(e){"boolean"==typeof e&&(console.warn("THREE.JSONLoader: showStatus parameter has been removed from constructor."),e=void 0),this.manager=void 0!==e?e:Gl,this.withCredentials=!1}Object.assign(Xu.prototype,{load:function(a,s,e,t){var o=this,l=this.texturePath&&"string"==typeof this.texturePath?this.texturePath:qu(a),i=new Yl(this.manager);i.setWithCredentials(this.withCredentials),i.load(a,function(e){var t=JSON.parse(e),i=t.metadata;if(void 0!==i){var n=i.type;if(void 0!==n&&"object"===n.toLowerCase())return void console.error("THREE.JSONLoader: "+a+" should be loaded with THREE.ObjectLoader instead.")}var r=o.parse(t,l);s(r.geometry,r.materials)},e,t)},setTexturePath:function(e){this.texturePath=e},parse:function(e,t){void 0!==e.data&&(e=e.data),void 0!==e.scale?e.scale=1/e.scale:e.scale=1;var i=new Nn;return function(e,t){function i(e,t){return e&1<<t}var n,r,a,s,o,l,u,c,h,d,p,f,g,m,v,y,_,M,w,b,T,A,x,E,S,D=e.faces,N=e.vertices,C=e.normals,L=e.colors,I=e.scale,O=0;if(void 0!==e.uvs){for(n=0;n<e.uvs.length;n++)e.uvs[n].length&&O++;for(n=0;n<O;n++)t.faceVertexUvs[n]=[]}for(s=0,o=N.length;s<o;)(M=new Wt).x=N[s++]*I,M.y=N[s++]*I,M.z=N[s++]*I,t.vertices.push(M);for(s=0,o=D.length;s<o;)if(p=i(d=D[s++],0),f=i(d,1),g=i(d,3),m=i(d,4),v=i(d,5),y=i(d,6),_=i(d,7),p){if((b=new Mn).a=D[s],b.b=D[s+1],b.c=D[s+3],(T=new Mn).a=D[s+1],T.b=D[s+2],T.c=D[s+3],s+=4,f&&(h=D[s++],b.materialIndex=h,T.materialIndex=h),a=t.faces.length,g)for(n=0;n<O;n++)for(E=e.uvs[n],t.faceVertexUvs[n][a]=[],t.faceVertexUvs[n][a+1]=[],r=0;r<4;r++)S=new Yt(E[2*(c=D[s++])],E[2*c+1]),2!==r&&t.faceVertexUvs[n][a].push(S),0!==r&&t.faceVertexUvs[n][a+1].push(S);if(m&&(u=3*D[s++],b.normal.set(C[u++],C[u++],C[u]),T.normal.copy(b.normal)),v)for(n=0;n<4;n++)u=3*D[s++],x=new Wt(C[u++],C[u++],C[u]),2!==n&&b.vertexNormals.push(x),0!==n&&T.vertexNormals.push(x);if(y&&(A=L[l=D[s++]],b.color.setHex(A),T.color.setHex(A)),_)for(n=0;n<4;n++)A=L[l=D[s++]],2!==n&&b.vertexColors.push(new Fi(A)),0!==n&&T.vertexColors.push(new Fi(A));t.faces.push(b),t.faces.push(T)}else{if((w=new Mn).a=D[s++],w.b=D[s++],w.c=D[s++],f&&(h=D[s++],w.materialIndex=h),a=t.faces.length,g)for(n=0;n<O;n++)for(E=e.uvs[n],t.faceVertexUvs[n][a]=[],r=0;r<3;r++)S=new Yt(E[2*(c=D[s++])],E[2*c+1]),t.faceVertexUvs[n][a].push(S);if(m&&(u=3*D[s++],w.normal.set(C[u++],C[u++],C[u])),v)for(n=0;n<3;n++)u=3*D[s++],x=new Wt(C[u++],C[u++],C[u]),w.vertexNormals.push(x);if(y&&(l=D[s++],w.color.setHex(L[l])),_)for(n=0;n<3;n++)l=D[s++],w.vertexColors.push(new Fi(L[l]));t.faces.push(w)}}(e,i),function(e,t){var i=void 0!==e.influencesPerVertex?e.influencesPerVertex:2;if(e.skinWeights)for(var n=0,r=e.skinWeights.length;n<r;n+=i){var a=e.skinWeights[n],s=1<i?e.skinWeights[n+1]:0,o=2<i?e.skinWeights[n+2]:0,l=3<i?e.skinWeights[n+3]:0;t.skinWeights.push(new Si(a,s,o,l))}if(e.skinIndices)for(n=0,r=e.skinIndices.length;n<r;n+=i){var u=e.skinIndices[n],c=1<i?e.skinIndices[n+1]:0,h=2<i?e.skinIndices[n+2]:0,d=3<i?e.skinIndices[n+3]:0;t.skinIndices.push(new Si(u,c,h,d))}t.bones=e.bones,t.bones&&0<t.bones.length&&(t.skinWeights.length!==t.skinIndices.length||t.skinIndices.length!==t.vertices.length)&&console.warn("When skinning, number of vertices ("+t.vertices.length+"), skinIndices ("+t.skinIndices.length+"), and skinWeights ("+t.skinWeights.length+") should match.")}(e,i),function(e,t){var i=e.scale;if(void 0!==e.morphTargets)for(var n=0,r=e.morphTargets.length;n<r;n++){t.morphTargets[n]={},t.morphTargets[n].name=e.morphTargets[n].name,t.morphTargets[n].vertices=[];for(var a=t.morphTargets[n].vertices,s=e.morphTargets[n].vertices,o=0,l=s.length;o<l;o+=3){var u=new Wt;u.x=s[o]*i,u.y=s[o+1]*i,u.z=s[o+2]*i,a.push(u)}}if(void 0!==e.morphColors&&0<e.morphColors.length){console.warn('THREE.JSONLoader: "morphColors" no longer supported. Using them as face colors.');var c=t.faces,h=e.morphColors[0].colors;for(n=0,r=c.length;n<r;n++)c[n].color.fromArray(h,3*n)}}(e,i),function(e,t){var i=[],n=[];void 0!==e.animation&&n.push(e.animation),void 0!==e.animations&&(e.animations.length?n=n.
1concat(e.animations):n.push(e.animations));for(var r=0;r<n.length;r++){var a=Uu.parseAnimation(n[r],t.bones);a&&i.push(a)}if(t.morphTargets){var s=Uu.CreateClipsFromMorphTargetSequences(t.morphTargets,10);i=i.concat(s)}0<i.length&&(t.animations=i)}(e,i),i.computeFaceNormals(),i.computeBoundingSphere(),void 0===e.materials||0===e.materials.length?{geometry:i}:{geometry:i,materials:Wu.prototype.initMaterials(e.materials,t,this.crossOrigin)}}}),Object.assign(function(e){this.manager=void 0!==e?e:Gl,this.texturePath=""}.prototype,{load:function(n,r,e,a){""===this.texturePath&&(this.texturePath=n.substring(0,n.lastIndexOf("/")+1));var s=this;new Yl(s.manager).load(n,function(e){var t=null;try{t=JSON.parse(e)}catch(e){return void 0!==a&&a(e),void console.error("THREE:ObjectLoader: Can't parse "+n+".",e.message)}var i=t.metadata;void 0!==i&&void 0!==i.type&&"geometry"!==i.type.toLowerCase()?s.parse(t,r):console.error("THREE.ObjectLoader: Can't load "+n+". Use THREE.JSONLoader instead.")},e,a)},setTexturePath:function(e){return this.texturePath=e,this},setCrossOrigin:function(e){return this.crossOrigin=e,this},parse:function(e,t){var i=this.parseShape(e.shapes),n=this.parseGeometries(e.geometries,i),r=this.parseImages(e.images,function(){void 0!==t&&t(o)}),a=this.parseTextures(e.textures,r),s=this.parseMaterials(e.materials,a),o=this.parseObject(e.object,n,s);return e.animations&&(o.animations=this.parseAnimations(e.animations)),void 0!==e.images&&0!==e.images.length||void 0!==t&&t(o),o},parseShape:function(e){var t={};if(void 0!==e)for(var i=0,n=e.length;i<n;i++){var r=(new gu).fromJSON(e[i]);t[r.uuid]=r}return t},parseGeometries:function(e,t){var i={};if(void 0!==e)for(var n=new Xu,r=new Fu,a=0,s=e.length;a<s;a++){var o,l=e[a];switch(l.type){case"PlaneGeometry":case"PlaneBufferGeometry":o=new Nl[l.type](l.width,l.height,l.widthSegments,l.heightSegments);break;case"BoxGeometry":case"BoxBufferGeometry":case"CubeGeometry":o=new Nl[l.type](l.width,l.height,l.depth,l.widthSegments,l.heightSegments,l.depthSegments);break;case"CircleGeometry":case"CircleBufferGeometry":o=new Nl[l.type](l.radius,l.segments,l.thetaStart,l.thetaLength);break;case"CylinderGeometry":case"CylinderBufferGeometry":o=new Nl[l.type](l.radiusTop,l.radiusBottom,l.height,l.radialSegments,l.heightSegments,l.openEnded,l.thetaStart,l.thetaLength);break;case"ConeGeometry":case"ConeBufferGeometry":o=new Nl[l.type](l.radius,l.height,l.radialSegments,l.heightSegments,l.openEnded,l.thetaStart,l.thetaLength);break;case"SphereGeometry":case"SphereBufferGeometry":o=new Nl[l.type](l.radius,l.widthSegments,l.heightSegments,l.phiStart,l.phiLength,l.thetaStart,l.thetaLength);break;case"DodecahedronGeometry":case"DodecahedronBufferGeometry":case"IcosahedronGeometry":case"IcosahedronBufferGeometry":case"OctahedronGeometry":case"OctahedronBufferGeometry":case"TetrahedronGeometry":case"TetrahedronBufferGeometry":o=new Nl[l.type](l.radius,l.detail);break;case"RingGeometry":case"RingBufferGeometry":o=new Nl[l.type](l.innerRadius,l.outerRadius,l.thetaSegments,l.phiSegments,l.thetaStart,l.thetaLength);break;case"TorusGeometry":case"TorusBufferGeometry":o=new Nl[l.type](l.radius,l.tube,l.radialSegments,l.tubularSegments,l.arc);break;case"TorusKnotGeometry":case"TorusKnotBufferGeometry":o=new Nl[l.type](l.radius,l.tube,l.tubularSegments,l.radialSegments,l.p,l.q);break;case"LatheGeometry":case"LatheBufferGeometry":o=new Nl[l.type](l.points,l.segments,l.phiStart,l.phiLength);break;case"PolyhedronGeometry":case"PolyhedronBufferGeometry":o=new Nl[l.type](l.vertices,l.indices,l.radius,l.details);break;case"ShapeGeometry":case"ShapeBufferGeometry":for(var u=[],c=0,h=l.shapes.length;c<h;c++){var d=t[l.shapes[c]];u.push(d)}o=new Nl[l.type](u,l.curveSegments);break;case"ExtrudeGeometry":case"ExtrudeBufferGeometry":for(u=[],c=0,h=l.shapes.length;c<h;c++){d=t[l.shapes[c]];u.push(d)}var p=l.options.extrudePath;void 0!==p&&(l.options.extrudePath=(new du[p.type]).fromJSON(p)),o=new Nl[l.type](u,l.options);break;case"BufferGeometry":o=r.parse(l);break;case"Geometry":o=n.parse(l,this.texturePath).geometry;break;default:console.warn('THREE.ObjectLoader: Unsupported geometry type "'+l.type+'"');continue}o.uuid=l.uuid,void 0!==l.name&&(o.name=l.name),!0===o.isBufferGeometry&&void 0!==l.userData&&(o.userData=l.userData),i[l.uuid]=o}return i},parseMaterials:function(e,t){var i={};if(void 0!==e){var n=new Bu;n.setTextures(t);for(var r=0,a=e.length;r<a;r++){var s=e[r];if("MultiMaterial"===s.type){for(var o=[],l=0;l<s.materials.length;l++)o.push(n.parse(s.materials[l]));i[s.uuid]=o}else i[s.uuid]=n.parse(s)}}return i},parseAnimations:function(e){for(var t=[],i=0;i<e.length;i++){var n=e[i],r=Uu.parse(n);void 0!==n.uuid&&(r.uuid=n.uuid),t.push(r)}return t},parseImages:function(e,t){var i=this,n={};function r(e){return i.manager.itemStart(e),a.load(e,function(){i.manager.itemEnd(e)},void 0,function(){i.manager.itemEnd(e),i.manager.itemError(e)})}if(void 0!==e&&0<e.length){var a=new Ql(new Fl(t));a.setCrossOrigin(this.crossOrigin);for(var s=0,o=e.length;s<o;s++){var l=e[s],u=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(l.url)?l.url:i.texturePath+l.url;n[l.uuid]=r(u)}}return n},parseTextures:function(e,t){function i(e,t){return"number"==typeof e?e:(console.warn("THREE.ObjectLoader.parseTexture: Constant should be in numeric form.",e),t[e])}var n={};if(void 0!==e)for(var r=0,a=e.length;r<a;r++){var s=e[r];void 0===s.image&&console.warn('THREE.ObjectLoader: No "image" specified for',s.uuid),void 0===t[s.image]&&console.warn("THREE.ObjectLoader: Undefined image",s.image);var o=new Ei(t[s.image]);o.needsUpdate=!0,o.uuid=s.uuid,void 0!==s.name&&(o.name=s.name),void 0!==s.mapping&&(o.mapping=i(s.mapping,$u)),void 0!==s.offset&&o.offset.fromArray(s.offset),void 0!==s.repeat&&o.repeat.fromArray(s.repeat),void 0!==s.center&&o.center.fromArray(s.center),void 0!==s.rotation&&(o.rotation=s.rotation),void 0!==s.wrap&&(o.wrapS=i(s.wrap[0],Ku),o.wrapT=i(s.wrap[1],Ku)),void 0!==s.format&&(o.format=s.format),void 0!==s.minFilter&&(
vendor: 12,877 bytes, line 1
1o.minFilter=i(s.minFilter,Ju)),void 0!==s.magFilter&&(o.magFilter=i(s.magFilter,Ju)),void 0!==s.anisotropy&&(o.anisotropy=s.anisotropy),void 0!==s.flipY&&(o.flipY=s.flipY),n[s.uuid]=o}return n},parseObject:function(e,t,a){var i;function n(e){return void 0===t[e]&&console.warn("THREE.ObjectLoader: Undefined geometry",e),t[e]}function r(e){if(void 0!==e){if(Array.isArray(e)){for(var t=[],i=0,n=e.length;i<n;i++){var r=e[i];void 0===a[r]&&console.warn("THREE.ObjectLoader: Undefined material",r),t.push(a[r])}return t}return void 0===a[e]&&console.warn("THREE.ObjectLoader: Undefined material",e),a[e]}}switch(e.type){case"Scene":i=new eo,void 0!==e.background&&Number.isInteger(e.background)&&(i.background=new Fi(e.background)),void 0!==e.fog&&("Fog"===e.fog.type?i.fog=new Js(e.fog.color,e.fog.near,e.fog.far):"FogExp2"===e.fog.type&&(i.fog=new Ks(e.fog.color,e.fog.density)));break;case"PerspectiveCamera":i=new Ws(e.fov,e.aspect,e.near,e.far),void 0!==e.focus&&(i.focus=e.focus),void 0!==e.zoom&&(i.zoom=e.zoom),void 0!==e.filmGauge&&(i.filmGauge=e.filmGauge),void 0!==e.filmOffset&&(i.filmOffset=e.filmOffset),void 0!==e.view&&(i.view=Object.assign({},e.view));break;case"OrthographicCamera":i=new _n(e.left,e.right,e.top,e.bottom,e.near,e.far),void 0!==e.zoom&&(i.zoom=e.zoom),void 0!==e.view&&(i.view=Object.assign({},e.view));break;case"AmbientLight":i=new Au(e.color,e.intensity);break;case"DirectionalLight":i=new Tu(e.color,e.intensity);break;case"PointLight":i=new wu(e.color,e.intensity,e.distance,e.decay);break;case"RectAreaLight":i=new xu(e.color,e.intensity,e.width,e.height);break;case"SpotLight":i=new Mu(e.color,e.intensity,e.distance,e.angle,e.penumbra,e.decay);break;case"HemisphereLight":i=new vu(e.color,e.groundColor,e.intensity);break;case"SkinnedMesh":console.warn("THREE.ObjectLoader.parseObject() does not support SkinnedMesh yet.");case"Mesh":var s=n(e.geometry),o=r(e.material);i=new(s.bones&&0<s.bones.length?so:Zr)(s,o);break;case"LOD":i=new no;break;case"Line":i=new lo(n(e.geometry),r(e.material),e.mode);break;case"LineLoop":i=new co(n(e.geometry),r(e.material));break;case"LineSegments":i=new uo(n(e.geometry),r(e.material));break;case"PointCloud":case"Points":i=new po(n(e.geometry),r(e.material));break;case"Sprite":i=new io(r(e.material));break;case"Group":i=new fo;break;default:i=new vn}if(i.uuid=e.uuid,void 0!==e.name&&(i.name=e.name),void 0!==e.matrix?(i.matrix.fromArray(e.matrix),void 0!==e.matrixAutoUpdate&&(i.matrixAutoUpdate=e.matrixAutoUpdate),i.matrixAutoUpdate&&i.matrix.decompose(i.position,i.quaternion,i.scale)):(void 0!==e.position&&i.position.fromArray(e.position),void 0!==e.rotation&&i.rotation.fromArray(e.rotation),void 0!==e.quaternion&&i.quaternion.fromArray(e.quaternion),void 0!==e.scale&&i.scale.fromArray(e.scale)),void 0!==e.castShadow&&(i.castShadow=e.castShadow),void 0!==e.receiveShadow&&(i.receiveShadow=e.receiveShadow),e.shadow&&(void 0!==e.shadow.bias&&(i.shadow.bias=e.shadow.bias),void 0!==e.shadow.radius&&(i.shadow.radius=e.shadow.radius),void 0!==e.shadow.mapSize&&i.shadow.mapSize.fromArray(e.shadow.mapSize),void 0!==e.shadow.camera&&(i.shadow.camera=this.parseObject(e.shadow.camera))),void 0!==e.visible&&(i.visible=e.visible),void 0!==e.frustumCulled&&(i.frustumCulled=e.frustumCulled),void 0!==e.renderOrder&&(i.renderOrder=e.renderOrder),void 0!==e.userData&&(i.userData=e.userData),void 0!==e.children)for(var l=e.children,u=0;u<l.length;u++)i.add(this.parseObject(l[u],t,a));if("LOD"===e.type)for(var c=e.levels,h=0;h<c.length;h++){var d=c[h],p=i.getObjectByProperty("uuid",d.object);void 0!==p&&i.addLevel(p,d.distance)}return i}});var Zu,$u={UVMapping:300,CubeReflectionMapping:Ne,CubeRefractionMapping:Ce,EquirectangularReflectionMapping:Le,EquirectangularRefractionMapping:Ie,SphericalReflectionMapping:Oe,CubeUVReflectionMapping:je,CubeUVRefractionMapping:ke},Ku={RepeatWrapping:Pe,ClampToEdgeWrapping:Re,MirroredRepeatWrapping:ze},Ju={NearestFilter:Ue,NearestMipMapNearestFilter:Be,NearestMipMapLinearFilter:Fe,LinearFilter:Ge,LinearMipMapNearestFilter:He,LinearMipMapLinearFilter:Ye};function ec(){this.type="ShapePath",this.color=new Fi,this.subPaths=[],this.currentPath=null}function tc(e){this.type="Font",this.data=e}function ic(e,t,i,n,r,a){var s=a.glyphs[e]||a.glyphs["?"];if(s){var o,l,u,c,h,d,p,f,g=new ec;if(s.o)for(var m=s._cachedOutline||(s._cachedOutline=s.o.split(" ")),v=0,y=m.length;v<y;){switch(m[v++]){case"m":o=m[v++]*i+n,l=m[v++]*i+r,g.moveTo(o,l);break;case"l":o=m[v++]*i+n,l=m[v++]*i+r,g.lineTo(o,l);break;case"q":u=m[v++]*i+n,c=m[v++]*i+r,h=m[v++]*i+n,d=m[v++]*i+r,g.quadraticCurveTo(h,d,u,c);break;case"b":u=m[v++]*i+n,c=m[v++]*i+r,h=m[v++]*i+n,d=m[v++]*i+r,p=m[v++]*i+n,f=m[v++]*i+r,g.bezierCurveTo(h,d,p,f,u,c)}}return{offsetX:s.ha*i,path:g}}}Object.assign(ec.prototype,{moveTo:function(e,t){this.currentPath=new fu,this.subPaths.push(this.currentPath),this.currentPath.moveTo(e,t)},lineTo:function(e,t){this.currentPath.lineTo(e,t)},quadraticCurveTo:function(e,t,i,n){this.currentPath.quadraticCurveTo(e,t,i,n)},bezierCurveTo:function(e,t,i,n,r,a){this.currentPath.bezierCurveTo(e,t,i,n,r,a)},splineThru:function(e){this.currentPath.splineThru(e)},toShapes:function(e,t){function i(e){for(var t=[],i=0,n=e.length;i<n;i++){var r=e[i],a=new gu;a.curves=r.curves,t.push(a)}return t}function n(e,t){for(var i=t.length,n=!1,r=i-1,a=0;a<i;r=a++){var s=t[r],o=t[a],l=o.x-s.x,u=o.y-s.y;if(Math.abs(u)>Number.EPSILON){if(u<0&&(s=t[a],l=-l,o=t[r],u=-u),e.y<s.y||e.y>o.y)continue;if(e.y===s.y){if(e.x===s.x)return 1}else{var c=u*(e.x-s.x)-l*(e.y-s.y);if(0==c)return 1;if(c<0)continue;n=!n}}else{if(e.y!==s.y)continue;if(o.x<=e.x&&e.x<=s.x||s.x<=e.x&&e.x<=o.x)return 1}}return n}var r=rl.isClockWise,a=this.subPaths;if(0===a.length)return[];if(!0===t)return i(a);var s,o,l,u=[];if(1===a.length)return o=a[0],(l=new gu).curves=o.curves,u.push(l),u;var c=!r(a[0].getPoints());c=e?!c:c;var h,d,p=[],f=[],g=[],m=0;f[m]=void 0,g[m]=[];for(var v=0,y=a.length;v<y;v++)s=r(h=(o=a[v]).getPoints()),(s=e?!s:s)?(!c&&f[m]&&m++,f[m]={s:new gu,p:h},f[m].s.curves=o.curves,c&&m++,g[m]=[]):g[m].push({h:o,p:h[0]});if(!f[0])return i(a);if(1<f.length){for(var _=!1,M=[],w=0,b=f.length;w<b;w++)p[w]=[];for(w=0,b=f.length;w<b;w++)for(var T=g[w],A=0;A<T.length;A++){for(var x=T[A],E=!0,S=0;S<f.length;S++)n(x.p,f[S].p)&&(w!==S&&M.push({froms:w,tos:S,hole:A}),E?(E=!1,p[S].push(x)):_=!0);E&&p[w].push(x)}0<M.length&&(_||(g=p))}v=0;for(var D=f.length;v<D;v++){l=f[v].s,u.push(l);for(var N=0,C=(d=g[v]).length;N<C;N++)l.holes.push(d[N].h)}return u}}),Object.assign(tc.prototype,{isFont:!0,generateShapes:function(e,t,i){void 0===t&&(t=100),void 0===i&&(i=4);for(var n=[],r=function(e,t,i,n){for(var r=Array.from?Array.from(e):String(e).split(""),a=t/n.resolution,s=(n.boundingBox.yMax-n.boundingBox.yMin+n.underlineThickness)*a,o=[],l=0,u=0,c=0;c<r.length;c++){var h=r[c];if("\n"===h)l=0,u-=s;else{var d=ic(h,0,a,l,u,n);l+=d.offsetX,o.push(d.path)}}return o}(e,t,i,this.data),a=0,s=r.length;a<s;a++)Array.prototype.push.apply(n,r[a].toShapes());return n}}),Object.assign(function(e){this.manager=void 0!==e?e:Gl}.prototype,{load:function(e,n,t,i){var r=this,a=new Yl(this.manager);a.setPath(this.path),a.load(e,function(t){var i;try{i=JSON.parse(t)}catch(e){console.warn("THREE.FontLoader: typeface.js support is being deprecated. Use typeface.json instead."),i=JSON.parse(t.substring(65,t.length-2))}var e=r.parse(i);n&&n(e)},t,i)},parse:function(e){return new tc(e)},setPath:function(e){return this.path=e,this}});var nc,rc,ac,sc,oc,lc,uc,cc,hc,dc,pc,fc,gc,mc,vc,yc=function(){return void 0===Zu&&(Zu=new(window.AudioContext||window.webkitAudioContext)),Zu};function _c(e){this.manager=void 0!==e?e:Gl}function Mc(e,t,i){vn.call(this),this.type="CubeCamera";var r=new Ws(90,1,e,t);r.up.set(0,-1,0),r.lookAt(new Wt(1,0,0)),this.add(r);var a=new Ws(90,1,e,t);a.up.set(0,-1,0),a.lookAt(new Wt(-1,0,0)),this.add(a);var s=new Ws(90,1,e,t);s.up.set(0,0,1),s.lookAt(new Wt(0,1,0)),this.add(s);var o=new Ws(90,1,e,t);o.up.set(0,0,-1),o.lookAt(new Wt(0,-1,0)),this.add(o);var l=new Ws(90,1,e,t);l.up.set(0,-1,0),l.lookAt(new Wt(0,0,1)),this.add(l);var u=new Ws(90,1,e,t);u.up.set(0,-1,0),u.lookAt(new Wt(0,0,-1)),this.add(u);var n={format:rt,magFilter:Ge,minFilter:Ge};this.renderTarget=new Ni(i,i,n),this.renderTarget.texture.name="CubeCamera",this.update=function(e,t){null===this.parent&&this.updateMatrixWorld();var i=this.renderTarget,n=i.texture.generateMipmaps;i.texture.generateMipmaps=!1,i.activeCubeFace=0,e.render(t,r,i),i.activeCubeFace=1,e.render(t,a,i),i.activeCubeFace=2,e.render(t,s,i),i.activeCubeFace=3,e.render(t,o,i),i.activeCubeFace=4,e.render(t,l,i),i.texture.generateMipmaps=n,i.activeCubeFace=5,e.render(t,u,i),e.setRenderTarget(null)},this.clear=function(e,t,i,n){for(var r=this.renderTarget,a=0;a<6;a++)r.activeCubeFace=a,e.setRenderTarget(r),e.clear(t,i,n);e.setRenderTarget(null)}}function wc(){vn.call(this),this.type="AudioListener",this.context=yc(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null}function bc(e){vn.call(this),this.type="Audio",this.context=e.context,this.gain=this.context.createGain(),this.gain.connect(e.getInput()),this.autoplay=!1,this.buffer=null,this.loop=!1,this.startTime=0,this.offset=0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.sourceType="empty",this.filters=[]}function Tc(e){bc.call(this,e),this.panner=this.context.createPanner(),this.panner.connect(this.gain)}function Ac(e,t){this.analyser=e.context.createAnalyser(),this.analyser.fftSize=void 0!==t?t:2048,this.data=new Uint8Array(this.analyser.frequencyBinCount),e.getOutput().connect(this.analyser)}function xc(e,t,i){this.binding=e,this.valueSize=i;var n,r=Float64Array;switch(t){case"quaternion":n=this._slerp;break;case"string":case"bool":r=Array,n=this._select;break;default:n=this._lerp}this.buffer=new r(4*i),this._mixBufferRegion=n,this.cumulativeWeight=0,this.useCount=0,this.referenceCount=0}Object.assign(_c.prototype,{load:function(e,t,i,n){var r=new Yl(this.manager);r.setResponseType("arraybuffer"),r.load(e,function(e){yc().decodeAudioData(e,function(e){t(e)})},i,n)}}),Object.assign(function(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new Ws,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new Ws,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1}.prototype,{update:(hc=new Qt,dc=new Qt,function(e){if(nc!==this||rc!==e.focus||ac!==e.fov||sc!==e.aspect*this.aspect||oc!==e.near||lc!==e.far||uc!==e.zoom||cc!==this.eyeSep){nc=this,rc=e.focus,ac=e.fov,sc=e.aspect*this.aspect,oc=e.near,lc=e.far,uc=e.zoom;var t,i,n=e.projectionMatrix.clone(),r=(cc=this.eyeSep/2)*oc/rc,a=oc*Math.tan(Ht.DEG2RAD*ac*.5)/uc;dc.elements[12]=-cc,hc.elements[12]=cc,t=-a*sc+r,i=a*sc+r,n.elements[0]=2*oc/(i-t),n.elements[8]=(i+t)/(i-t),this.cameraL.projectionMatrix.copy(n),t=-a*sc-r,i=a*sc-r,n.elements[0]=2*oc/(i-t),n.elements[8]=(i+t)/(i-t),this.cameraR.projectionMatrix.copy(n)}this.cameraL.matrixWorld.copy(e.matrixWorld).multiply(dc),this.cameraR.matrixWorld.copy(e.matrixWorld).multiply(hc)})}),(Mc.prototype=Object.create(vn.prototype)).constructor=Mc,wc.prototype=Object.assign(Object.create(vn.prototype),{constructor:wc,getInput:function(){return this.gain},removeFilter:function(){null!==this.filter&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null)},getFilter:function(){return this.filter},setFilter:function(e){null!==this.filter?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=e,this.gain.connect(this.filter),this.filter.connect(this.context.destination)},getMasterVolume:function(){return this.gain.gain.value},setMasterVolume:function(e){this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01)},updateMatrixWorld:(pc=new Wt,fc=new Vt,gc=new Wt,mc=new Wt,function(e){vn.prototype.updateMatrixWorld.call(this,e);var t=this.context.listener,i=this.up;this.matrixWorld.decompose(pc,fc,gc),mc.set(0,0,-1).applyQuaternion(fc),t.positionX?(t.positionX.setValueAtTime(pc.x,this.context.currentTime),t.positionY.setValueAtTime(pc.y,this.context.currentTime),t.positionZ.setValueAtTime(pc.z,this.context.currentTime),t.forwardX.setValueAtTime(mc.x,this.context.currentTime),t.forwardY.setValueAtTime(mc.y,this.context.currentTime),t.forwardZ.setValueAtTime(mc.z,this.context.currentTime),t.upX.setValueAtTime(i.x,this.context.currentTime),t.upY.setValueAtTime(i.y,this.context.currentTime),t.upZ.setValueAtTime(i.z,this.context.currentTime)):(t.setPosition(pc.x,pc.y,pc.z),t.setOrientation(mc.x,mc.y,mc.z,i.x,i.y,i.z))})}),bc.prototype=Object.assign(Object.create(vn.prototype),{constructor:bc,getOutput:function(){return this.gain}
vendor: 18,645 bytes, line 1
1,setNodeSource:function(e){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=e,this.connect(),this},setMediaElementSource:function(e){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(e),this.connect(),this},setBuffer:function(e){return this.buffer=e,this.sourceType="buffer",this.autoplay&&this.play(),this},play:function(){if(!0!==this.isPlaying){if(!1!==this.hasPlaybackControl){var e=this.context.createBufferSource();return e.buffer=this.buffer,e.loop=this.loop,e.onended=this.onEnded.bind(this),e.playbackRate.setValueAtTime(this.playbackRate,this.startTime),this.startTime=this.context.currentTime,e.start(this.startTime,this.offset),this.isPlaying=!0,this.source=e,this.connect()}console.warn("THREE.Audio: this Audio has no playback control.")}else console.warn("THREE.Audio: Audio is already playing.")},pause:function(){if(!1!==this.hasPlaybackControl)return!0===this.isPlaying&&(this.source.stop(),this.offset+=(this.context.currentTime-this.startTime)*this.playbackRate,this.isPlaying=!1),this;console.warn("THREE.Audio: this Audio has no playback control.")},stop:function(){if(!1!==this.hasPlaybackControl)return this.source.stop(),this.offset=0,this.isPlaying=!1,this;console.warn("THREE.Audio: this Audio has no playback control.")},connect:function(){if(0<this.filters.length){this.source.connect(this.filters[0]);for(var e=1,t=this.filters.length;e<t;e++)this.filters[e-1].connect(this.filters[e]);this.filters[this.filters.length-1].connect(this.getOutput())}else this.source.connect(this.getOutput());return this},disconnect:function(){if(0<this.filters.length){this.source.disconnect(this.filters[0]);for(var e=1,t=this.filters.length;e<t;e++)this.filters[e-1].disconnect(this.filters[e]);this.filters[this.filters.length-1].disconnect(this.getOutput())}else this.source.disconnect(this.getOutput());return this},getFilters:function(){return this.filters},setFilters:function(e){return e=e||[],!0===this.isPlaying?(this.disconnect(),this.filters=e,this.connect()):this.filters=e,this},getFilter:function(){return this.getFilters()[0]},setFilter:function(e){return this.setFilters(e?[e]:[])},setPlaybackRate:function(e){if(!1!==this.hasPlaybackControl)return this.playbackRate=e,!0===this.isPlaying&&this.source.playbackRate.setValueAtTime(this.playbackRate,this.context.currentTime),this;console.warn("THREE.Audio: this Audio has no playback control.")},getPlaybackRate:function(){return this.playbackRate},onEnded:function(){this.isPlaying=!1},getLoop:function(){return!1===this.hasPlaybackControl?(console.warn("THREE.Audio: this Audio has no playback control."),!1):this.loop},setLoop:function(e){if(!1!==this.hasPlaybackControl)return this.loop=e,!0===this.isPlaying&&(this.source.loop=this.loop),this;console.warn("THREE.Audio: this Audio has no playback control.")},getVolume:function(){return this.gain.gain.value},setVolume:function(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this}}),Tc.prototype=Object.assign(Object.create(bc.prototype),{constructor:Tc,getOutput:function(){return this.panner},getRefDistance:function(){return this.panner.refDistance},setRefDistance:function(e){this.panner.refDistance=e},getRolloffFactor:function(){return this.panner.rolloffFactor},setRolloffFactor:function(e){this.panner.rolloffFactor=e},getDistanceModel:function(){return this.panner.distanceModel},setDistanceModel:function(e){this.panner.distanceModel=e},getMaxDistance:function(){return this.panner.maxDistance},setMaxDistance:function(e){this.panner.maxDistance=e},updateMatrixWorld:(vc=new Wt,function(e){vn.prototype.updateMatrixWorld.call(this,e),vc.setFromMatrixPosition(this.matrixWorld),this.panner.setPosition(vc.x,vc.y,vc.z)})}),Object.assign(Ac.prototype,{getFrequencyData:function(){return this.analyser.getByteFrequencyData(this.data),this.data},getAverageFrequency:function(){for(var e=0,t=this.getFrequencyData(),i=0;i<t.length;i++)e+=t[i];return e/t.length}}),Object.assign(xc.prototype,{accumulate:function(e,t){var i=this.buffer,n=this.valueSize,r=e*n+n,a=this.cumulativeWeight;if(0===a){for(var s=0;s!==n;++s)i[r+s]=i[s];a=t}else{var o=t/(a+=t);this._mixBufferRegion(i,r,0,o,n)}this.cumulativeWeight=a},apply:function(e){var t=this.valueSize,i=this.buffer,n=e*t+t,r=this.cumulativeWeight,a=this.binding;if(this.cumulativeWeight=0,r<1){var s=3*t;this._mixBufferRegion(i,n,s,1-r,t)}for(var o=t,l=t+t;o!==l;++o)if(i[o]!==i[o+t]){a.setValue(i,n);break}},saveOriginalState:function(){var e=this.binding,t=this.buffer,i=this.valueSize,n=3*i;e.getValue(t,n);for(var r=i,a=n;r!==a;++r)t[r]=t[n+r%i];this.cumulativeWeight=0},restoreOriginalState:function(){var e=3*this.valueSize;this.binding.setValue(this.buffer,e)},_select:function(e,t,i,n,r){if(.5<=n)for(var a=0;a!==r;++a)e[t+a]=e[i+a]},_slerp:function(e,t,i,n){Vt.slerpFlat(e,t,e,t,e,i,n)},_lerp:function(e,t,i,n,r){for(var a=1-n,s=0;s!==r;++s){var o=t+s;e[o]=e[o]*a+e[i+s]*n}}});var Ec,Sc,Dc,Nc,Cc,Lc,Ic,Oc,jc,kc,Pc,Rc,zc,Uc,Bc,Fc,Gc,Hc,Yc,Qc,Vc,Wc,qc,Xc,Zc,$c,Kc,Jc,eh,th,ih,nh,rh,ah,sh,oh,lh,uh,ch="\\[\\]\\.:\\/";function hh(e,t,i){var n=i||dh.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,n)}function dh(e,t,i){this.path=t,this.parsedPath=i||dh.parseTrackName(t),this.node=dh.findNode(e,this.parsedPath.nodeName)||e,this.rootNode=e}function ph(e,t,i){this._mixer=e,this._clip=t,this._localRoot=i||null;for(var n=t.tracks,r=n.length,a=new Array(r),s={endingStart:2400,endingEnd:2400},o=0;o!==r;++o){var l=n[o].createInterpolant(null);(a[o]=l).settings=s}this._interpolantSettings=s,this._interpolants=a,this._propertyBindings=new Array(r),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=2201,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}function fh(e){this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}function gh(e){"string"==typeof e&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),e=arguments[1]),this.value=e}function mh(){Jn.call(this),this.type="InstancedBufferGeometry",this.maxInstancedCount=void 0}function vh(e,t,i,n){this.data=e,this.itemSize=t,this.offset=i,this.normalized=!0===n}function yh(e,t){this.array=e,this.stride=t,this.count=void 0!==e?e.length/t:0,this.dynamic=!1,this.updateRange={offset:0,count:-1},this.version=0}function _h(e,t,i){yh.call(this,e,t),this.meshPerAttribute=i||1}function Mh(e,t,i){Cn.call(this,e,t),this.meshPerAttribute=i||1}function wh(e,t){return e.distance-t.distance}function bh(e,t,i,n){if(!1!==e.visible&&(e.raycast(t,i),!0===n))for(var r=e.children,a=0,s=r.length;a<s;a++)bh(r[a],t,i,!0)}function Th(e,t,i){return this.radius=void 0!==e?e:1,this.phi=void 0!==t?t:0,this.theta=void 0!==i?i:0,this}function Ah(e,t){this.min=void 0!==e?e:new Yt(1/0,1/0),this.max=void 0!==t?t:new Yt(-1/0,-1/0)}function xh(e){vn.call(this),this.material=e,this.render=function(){}}function Eh(e,t,i,n){this.object=e,this.size=void 0!==t?t:1;var r=void 0!==i?i:16711680,a=void 0!==n?n:1,s=0,o=this.object.geometry;o&&o.isGeometry?s=3*o.faces.length:o&&o.isBufferGeometry&&(s=o.attributes.normal.count);var l=new Jn,u=new zn(2*s*3,3);l.addAttribute("position",u),uo.call(this,l,new oo({color:r,linewidth:a})),this.matrixAutoUpdate=!1,this.update()}function Sh(e,t){vn.call(this),this.light=e,this.light.updateMatrixWorld(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=t;for(var i=new Jn,n=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1],r=0,a=1;r<32;r++,a++){var s=r/32*Math.PI*2,o=a/32*Math.PI*2;n.push(Math.cos(s),Math.sin(s),1,Math.cos(o),Math.sin(o),1)}i.addAttribute("position",new zn(n,3));var l=new oo({fog:!1});this.cone=new uo(i,l),this.add(this.cone),this.update()}function Dh(e){for(var t=function e(t){var i=[];t&&t.isBone&&i.push(t);for(var n=0;n<t.children.length;n++)i.push.apply(i,e(t.children[n]));return i}(e),i=new Jn,n=[],r=[],a=new Fi(0,0,1),s=new Fi(0,1,0),o=0;o<t.length;o++){var l=t[o];l.parent&&l.parent.isBone&&(n.push(0,0,0),n.push(0,0,0),r.push(a.r,a.g,a.b),r.push(s.r,s.g,s.b))}i.addAttribute("position",new zn(n,3)),i.addAttribute("color",new zn(r,3));var u=new oo({vertexColors:2,depthTest:!1,depthWrite:!1,transparent:!0});uo.call(this,i,u),this.root=e,this.bones=t,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1}function Nh(e,t,i){this.light=e,this.light.updateMatrixWorld(),this.color=i;var n=new fl(t,4,2),r=new Qr({wireframe:!0,fog:!1});Zr.call(this,n,r),this.matrix=this.light.matrixWorld,this.matrixAutoUpdate=!1,this.update()}function Ch(e,t){vn.call(this),this.light=e,this.light.updateMatrixWorld(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=t;var i=new oo({fog:!1}),n=new Jn;n.addAttribute("position",new Cn(new Float32Array(15),3)),this.line=new lo(n,i),this.add(this.line),this.update()}function Lh(e,t,i){vn.call(this),this.light=e,this.light.updateMatrixWorld(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=i;var n=new Eo(t);n.rotateY(.5*Math.PI),this.material=new Qr({wireframe:!0,fog:!1}),void 0===this.color&&(this.material.vertexColors=2);var r=n.getAttribute("position"),a=new Float32Array(3*r.count);n.addAttribute("color",new Cn(a,3)),this.add(new Zr(n,this.material)),this.update()}function Ih(e,t,i,n){e=e||10,t=t||10,i=new Fi(void 0!==i?i:4473924),n=new Fi(void 0!==n?n:8947848);for(var r=t/2,a=e/t,s=e/2,o=[],l=[],u=0,c=0,h=-s;u<=t;u++,h+=a){o.push(-s,0,h,s,0,h),o.push(h,0,-s,h,0,s);var d=u===r?i:n;d.toArray(l,c),c+=3,d.toArray(l,c),c+=3,d.toArray(l,c),c+=3,d.toArray(l,c),c+=3}var p=new Jn;p.addAttribute("position",new zn(o,3)),p.addAttribute("color",new zn(l,3));var f=new oo({vertexColors:2});uo.call(this,p,f)}function Oh(e,t,i,n,r,a){e=e||10,t=t||16,i=i||8,n=n||64,r=new Fi(void 0!==r?r:4473924),a=new Fi(void 0!==a?a:8947848);var s,o,l,u,c,h,d,p=[],f=[];for(u=0;u<=t;u++)l=u/t*(2*Math.PI),s=Math.sin(l)*e,o=Math.cos(l)*e,p.push(0,0,0),p.push(s,0,o),d=1&u?r:a,f.push(d.r,d.g,d.b),f.push(d.r,d.g,d.b);for(u=0;u<=i;u++)for(d=1&u?r:a,h=e-e/i*u,c=0;c<n;c++)l=c/n*(2*Math.PI),s=Math.sin(l)*h,o=Math.cos(l)*h,p.push(s,0,o),f.push(d.r,d.g,d.b),l=(c+1)/n*(2*Math.PI),s=Math.sin(l)*h,o=Math.cos(l)*h,p.push(s,0,o),f.push(d.r,d.g,d.b);var g=new Jn;g.addAttribute("position",new zn(p,3)),g.addAttribute("color",new zn(f,3));var m=new oo({vertexColors:2});uo.call(this,g,m)}function jh(e,t,i,n){this.object=e,this.size=void 0!==t?t:1;var r=void 0!==i?i:16776960,a=void 0!==n?n:1,s=0,o=this.object.geometry;o&&o.isGeometry?s=o.faces.length:console.warn("THREE.FaceNormalsHelper: only THREE.Geometry is supported. Use THREE.VertexNormalsHelper, instead.");var l=new Jn,u=new zn(2*s*3,3);l.addAttribute("position",u),uo.call(this,l,new oo({color:r,linewidth:a})),this.matrixAutoUpdate=!1,this.update()}function kh(e,t,i){vn.call(this),this.light=e,this.light.updateMatrixWorld(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=i,void 0===t&&(t=1);var n=new Jn;n.addAttribute("position",new zn([-t,t,0,t,t,0,t,-t,0,-t,-t,0,-t,t,0],3));var r=new oo({fog:!1});this.lightPlane=new lo(n,r),this.add(this.lightPlane),(n=new Jn).addAttribute("position",new zn([0,0,0,0,0,1],3)),this.targetLine=new lo(n,r),this.add(this.targetLine),this.update()}function Ph(e){var t=new Jn,i=new oo({color:16777215,vertexColors:1}),n=[],r=[],a={},s=new Fi(16755200),o=new Fi(16711680),l=new Fi(43775),u=new Fi(16777215),c=new Fi(3355443);function h(e,t,i){d(e,i),d(t,i)}function d(e,t){n.push(0,0,0),r.push(t.r,t.g,t.b),void 0===a[e]&&(a[e]=[]),a[e].push(n.length/3-1)}h("n1","n2",s),h("n2","n4",s),h("n4","n3",s),h("n3","n1",s),h("f1","f2",s),h("f2","f4",s),h("f4","f3",s),h("f3","f1",s),h("n1","f1",s),h("n2","f2",s),h("n3","f3",s),h("n4","f4",s),h("p","n1",o),h("p","n2",o),h("p","n3",o),h("p","n4",o),h("u1","u2",l),h("u2","u3",l),h("u3","u1",l),h("c","t",u),h("p","c",c),h("cn1","cn2",c),h("cn3","cn4",c),h("cf1","cf2",c),h("cf3","cf4",c),t.addAttribute("position",new zn(n,3)),t.addAttribute("color",new zn(r,3)),uo.call(this,t,i),this.camera=e,this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.pointMap=a,this.update()}function Rh(e,t,i,n){ih.set(t,i,n).unproject(nh);var r=th[e];if(void 0!==r)for(var a=eh.getAttribute("position"),s=0,o=r.length;s<o;s++)a.setXYZ(r[s],ih.x,ih.y,ih.z)}function zh(e,t){this.object=e,void 0===t&&(t=16776960);var i=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),n=new Float32Array(24),r=new Jn;r.setIndex(new Cn(i,1)),r.addAttribute("position",new Cn(n,3)),uo.call(this,r,new oo({color:t})),this.matrixAutoUpdate=!1,this.update()}function Uh(e,t){this.type="Box3Helper",this.box=e;var i=void 0!==t?t:16776960,n=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),r=new Jn;r.setIndex(new Cn(n,1)),r.addAttribute("position",new zn([1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1],3)),uo.call(this,r,new oo({color:i})),this.geometry.computeBoundingSphere()}function Bh(e,t,i){this.type="PlaneHelper",this.plane=e,this.size=void 0===t?1:t;var n=void 0!==i?i:16776960,r=new Jn;r.addAttribute("position",new zn([1,-1,1,-1,1,1,-1,-1,1,1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,0,0,1,0,0,0],3)),r.computeBoundingSphere(),lo.call(this,r,new oo({color:n}));var a=new Jn;a.addAttribute("position",new zn([1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1],3)),a.computeBoundingSphere(),this.add(new Zr(a,new Qr({color:n,opacity:.2,transparent:!0,depthWrite:!1})))}function Fh(e,t,i,n,r,a){vn.call(this),void 0===n&&(n=16776960),void 0===i&&(i=1),void 0===r&&(r=.2*i),void 0===a&&(a=.2*r),void 0===ah&&((ah=new Jn).addAttribute("position",new zn([0,0,0,0,1,0],3)),(sh=new Al(0,.5,1,5,1)).translate(0,-.5,0)),this.position.copy(t),this.line=new lo(ah,new oo({color:n})),this.line.matrixAutoUpdate=!1,this.add(this.line),this.cone=new Zr(sh,new Qr({color:n})),this.cone.matrixAutoUpdate=!1,this.add(this.cone),this.setDirection(e),this.setLength(i,r,a)}function Gh(e){var t=[0,0,0,e=e||1,0,0,0,0,0,0,e,0,0,0,0,0,0,e],i=new Jn;i.addAttribute("position",new zn(t,3)),i.addAttribute("color",new zn([1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],3));var n=new oo({vertexColors:2});uo.call(this,i,n)}function Hh(e){console.warn("THREE.Spline has been removed. Use THREE.CatmullRomCurve3 instead."),tu.call(this,e),this.type="catmullrom"}Object.assign(hh.prototype,{getValue:function(e,t){this.bind();var i=this._targetGroup.nCachedObjects_,n=this._bindings[i];void 0!==n&&n.getValue(e,t)},setValue:function(e,t){for(var i=this._bindings,n=this._targetGroup.nCachedObjects_,r=i.length;n!==r;++n)i[n].setValue(e,t)},bind:function(){for(var e=this._bindings,t=this._targetGroup.nCachedObjects_,i=e.length;t!==i;++t)e[t].bind()},unbind:function(){for(var e=this._bindings,t=this._targetGroup.nCachedObjects_,i=e.length;t!==i;++t)e[t].unbind()}}),Object.assign(dh,{Composite:hh,create:function(e,t,i){return e&&e.isAnimationObjectGroup?new dh.Composite(e,t,i):new dh(e,t,i)},sanitizeNodeName:(jc=new RegExp("["+ch+"]","g"),function(e){return e.replace(/\s/g,"_").replace(jc,"")}),parseTrackName:(Ec="[^"+ch+"]",Sc="[^"+ch.replace("\\.","")+"]",Dc=/((?:WC+[\/:])*)/.source.replace("WC",Ec),Nc=/(WCOD+)?/.source.replace("WCOD",Sc),Cc=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",Ec),Lc=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",Ec),Ic=new RegExp("^"+Dc+Nc+Cc+Lc+"$"),Oc=["material","materials","bones"],function(e){var t=Ic.exec(e);if(!t)throw new Error("PropertyBinding: Cannot parse trackName: "+e);var i={nodeName:t[2],objectName:t[3],objectIndex:t[4],propertyName:t[5],propertyIndex:t[6]},n=i.nodeName&&i.nodeName.lastIndexOf(".");if(void 0!==n&&-1!==n){var r=i.nodeName.substring(n+1);-1!==Oc.indexOf(r)&&(i.nodeName=i.nodeName.substring(0,n),i.objectName=r)}if(null===i.propertyName||0===i.propertyName.length)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return i}),findNode:function(e,r){if(!r||""===r||"root"===r||"."===r||-1===r||r===e.name||r===e.uuid)return e;if(e.skeleton){var t=e.skeleton.getBoneByName(r);if(void 0!==t)return t}if(e.children){var a=function(e){for(var t=0;t<e.length;t++){var i=e[t];if(i.name===r||i.uuid===r)return i;var n=a(i.children);if(n)return n}return null},i=a(e.children);if(i)return i}return null}}),Object.assign(dh.prototype,{_getValue_unavailable:function(){},_setValue_unavailable:function(){},BindingType:{Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},Versioning:{None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},GetterByBindingType:[function(e,t){e[t]=this.node[this.propertyName]},function(e,t){for(var i=this.resolvedProperty,n=0,r=i.length;n!==r;++n)e[t++]=i[n]},function(e,t){e[t]=this.resolvedProperty[this.propertyIndex]},function(e,t){this.resolvedProperty.toArray(e,t)}],SetterByBindingTypeAndVersioning:[[function(e,t){this.targetObject[this.propertyName]=e[t]},function(e,t){this.targetObject[this.propertyName]=e[t],this.targetObject.needsUpdate=!0},function(e,t){this.targetObject[this.propertyName]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}],[function(e,t){for(var i=this.resolvedProperty,n=0,r=i.length;n!==r;++n)i[n]=e[t++]},function(e,t){for(var i=this.resolvedProperty,n=0,r=i.length;n!==r;++n)i[n]=e[t++];this.targetObject.needsUpdate=!0},function(e,t){for(var i=this.resolvedProperty,n=0,r=i.length;n!==r;++n)i[n]=e[t++];this.targetObject.matrixWorldNeedsUpdate=!0}],[function(e,t){this.resolvedProperty[this.propertyIndex]=e[t]},function(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.needsUpdate=!0},function(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}],[function(e,t){this.resolvedProperty.fromArray(e,t)},function(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.needsUpdate=!0},function(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.matrixWorldNeedsUpdate=!0}]],getValue:function(e,t){this.bind(),this.getValue(e,t)},setValue:function(e,t){this.bind(),this.setValue(e,t)},bind:function(){var e=this.node,t=this.parsedPath,i=t.objectName,n=t.propertyName,r=t.propertyIndex;if(e||(e=dh.findNode(this.rootNode,t.nodeName)||this.rootNode,this.node=e),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,e){if(i){var a=t.objectIndex;switch(i){case"materials":if(!e.material)return void console.error("THREE.PropertyBinding: Can not bind to material as no
1de does not have a material.",this);if(!e.material.materials)return void console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);e=e.material.materials;break;case"bones":if(!e.skeleton)return void console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);e=e.skeleton.bones;for(var s=0;s<e.length;s++)if(e[s].name===a){a=s;break}break;default:if(void 0===e[i])return void console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);e=e[i]}if(void 0!==a){if(void 0===e[a])return void console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,e);e=e[a]}}var o=e[n];if(void 0!==o){var l=this.Versioning.None;void 0!==e.needsUpdate?(l=this.Versioning.NeedsUpdate,this.targetObject=e):void 0!==e.matrixWorldNeedsUpdate&&(l=this.Versioning.MatrixWorldNeedsUpdate,this.targetObject=e);var u=this.BindingType.Direct;if(void 0!==r){if("morphTargetInfluences"===n){if(!e.geometry)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);if(e.geometry.isBufferGeometry){if(!e.geometry.morphAttributes)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);for(s=0;s<this.node.geometry.morphAttributes.position.length;s++)if(e.geometry.morphAttributes.position[s].name===r){r=s;break}}else{if(!e.geometry.morphTargets)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphTargets.",this);for(s=0;s<this.node.geometry.morphTargets.length;s++)if(e.geometry.morphTargets[s].name===r){r=s;break}}}u=this.BindingType.ArrayElement,this.resolvedProperty=o,this.propertyIndex=r}else void 0!==o.fromArray&&void 0!==o.toArray?(u=this.BindingType.HasFromToArray,this.resolvedProperty=o):Array.isArray(o)?(u=this.BindingType.EntireArray,this.resolvedProperty=o):this.propertyName=n;this.getValue=this.GetterByBindingType[u],this.setValue=this.SetterByBindingTypeAndVersioning[u][l]}else{var c=t.nodeName;console.error("THREE.PropertyBinding: Trying to update property for track: "+c+"."+n+" but it wasn't found.",e)}}else console.error("THREE.PropertyBinding: Trying to update node for track: "+this.path+" but it wasn't found.")},unbind:function(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}),Object.assign(dh.prototype,{_getValue_unbound:dh.prototype.getValue,_setValue_unbound:dh.prototype.setValue}),Object.assign(function(){this.uuid=Ht.generateUUID(),this._objects=Array.prototype.slice.call(arguments),this.nCachedObjects_=0;var e={};this._indicesByUUID=e;for(var t=0,i=arguments.length;t!==i;++t)e[arguments[t].uuid]=t;this._paths=[],this._parsedPaths=[],this._bindings=[],this._bindingsIndicesByPath={};var n=this;this.stats={objects:{get total(){return n._objects.length},get inUse(){return this.total-n.nCachedObjects_}},get bindingsPerObject(){return n._bindings.length}}}.prototype,{isAnimationObjectGroup:!0,add:function(){for(var e=this._objects,t=e.length,i=this.nCachedObjects_,n=this._indicesByUUID,r=this._paths,a=this._parsedPaths,s=this._bindings,o=s.length,l=void 0,u=0,c=arguments.length;u!==c;++u){var h=arguments[u],d=h.uuid,p=n[d];if(void 0===p){p=t++,n[d]=p,e.push(h);for(var f=0,g=o;f!==g;++f)s[f].push(new dh(h,r[f],a[f]))}else if(p<i){l=e[p];var m=--i,v=e[m];e[n[v.uuid]=p]=v,e[n[d]=m]=h;for(f=0,g=o;f!==g;++f){var y=s[f],_=y[m],M=y[p];y[p]=_,void 0===M&&(M=new dh(h,r[f],a[f])),y[m]=M}}else e[p]!==l&&console.error("THREE.AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes.")}this.nCachedObjects_=i},remove:function(){for(var e=this._objects,t=this.nCachedObjects_,i=this._indicesByUUID,n=this._bindings,r=n.length,a=0,s=arguments.length;a!==s;++a){var o=arguments[a],l=o.uuid,u=i[l];if(void 0!==u&&t<=u){var c=t++,h=e[c];e[i[h.uuid]=u]=h,e[i[l]=c]=o;for(var d=0,p=r;d!==p;++d){var f=n[d],g=f[c],m=f[u];f[u]=g,f[c]=m}}}this.nCachedObjects_=t},uncache:function(){for(var e=this._objects,t=e.length,i=this.nCachedObjects_,n=this._indicesByUUID,r=this._bindings,a=r.length,s=0,o=arguments.length;s!==o;++s){var l=arguments[s].uuid,u=n[l];if(void 0!==u)if(delete n[l],u<i){var c=--i,h=e[c],d=e[v=--t];e[n[h.uuid]=u]=h,e[n[d.uuid]=c]=d,e.pop();for(var p=0,f=a;p!==f;++p){var g=(y=r[p])[c],m=y[v];y[u]=g,y[c]=m,y.pop()}}else{var v;e[n[(d=e[v=--t]).uuid]=u]=d,e.pop();for(p=0,f=a;p!==f;++p){var y;(y=r[p])[u]=y[v],y.pop()}}}this.nCachedObjects_=i},subscribe_:function(e,t){var i=this._bindingsIndicesByPath,n=i[e],r=this._bindings;if(void 0!==n)return r[n];var a=this._paths,s=this._parsedPaths,o=this._objects,l=o.length,u=this.nCachedObjects_,c=new Array(l);n=r.length,i[e]=n,a.push(e),s.push(t),r.push(c);for(var h=u,d=o.length;h!==d;++h){var p=o[h];c[h]=new dh(p,e,t)}return c},unsubscribe_:function(e){var t=this._bindingsIndicesByPath,i=t[e];if(void 0!==i){var n=this._paths,r=this._parsedPaths,a=this._bindings,s=a.length-1,o=a[s];a[t[e[s]]=i]=o,a.pop(),r[i]=r[s],r.pop(),n[i]=n[s],n.pop()}}}),Object.assign(ph.prototype,{play:function(){return this._mixer._activateAction(this),this},stop:function(){return this._mixer._deactivateAction(this),this.reset()},reset:function(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()},isRunning:function(){return this.enabled&&!this.paused&&0!==this.timeScale&&null===this._startTime&&this._mixer._isActiveAction(this)},isScheduled:function(){return this._mixer._isActiveAction(this)},startAt:function(e){return this._startTime=e,this},setLoop:function(e,t){return this.loop=e,this.repetitions=t,this},setEffectiveWeight:function(e){return this.weight=e,this._effectiveWeight=this.enabled?e:0,this.stopFading()},getEffectiveWeight:function(){return this._effectiveWeight}
vendor: 4,062 bytes, line 1
1,fadeIn:function(e){return this._scheduleFading(e,0,1)},fadeOut:function(e){return this._scheduleFading(e,1,0)},crossFadeFrom:function(e,t,i){if(e.fadeOut(t),this.fadeIn(t),i){var n=this._clip.duration,r=e._clip.duration,a=r/n,s=n/r;e.warp(1,a,t),this.warp(s,1,t)}return this},crossFadeTo:function(e,t,i){return e.crossFadeFrom(this,t,i)},stopFading:function(){var e=this._weightInterpolant;return null!==e&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this},setEffectiveTimeScale:function(e){return this.timeScale=e,this._effectiveTimeScale=this.paused?0:e,this.stopWarping()},getEffectiveTimeScale:function(){return this._effectiveTimeScale},setDuration:function(e){return this.timeScale=this._clip.duration/e,this.stopWarping()},syncWith:function(e){return this.time=e.time,this.timeScale=e.timeScale,this.stopWarping()},halt:function(e){return this.warp(this._effectiveTimeScale,0,e)},warp:function(e,t,i){var n=this._mixer,r=n.time,a=this._timeScaleInterpolant,s=this.timeScale;null===a&&(a=n._lendControlInterpolant(),this._timeScaleInterpolant=a);var o=a.parameterPositions,l=a.sampleValues;return o[0]=r,o[1]=r+i,l[0]=e/s,l[1]=t/s,this},stopWarping:function(){var e=this._timeScaleInterpolant;return null!==e&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this},getMixer:function(){return this._mixer},getClip:function(){return this._clip},getRoot:function(){return this._localRoot||this._mixer._root},_update:function(e,t,i,n){if(this.enabled){var r=this._startTime;if(null!==r){var a=(e-r)*i;if(a<0||0===i)return;this._startTime=null,t=i*a}t*=this._updateTimeScale(e);var s=this._updateTime(t),o=this._updateWeight(e);if(0<o)for(var l=this._interpolants,u=this._propertyBindings,c=0,h=l.length;c!==h;++c)l[c].evaluate(s),u[c].accumulate(n,o)}else this._updateWeight(e)},_updateWeight:function(e){var t=0;if(this.enabled){t=this.weight;var i=this._weightInterpolant;if(null!==i){var n=i.evaluate(e)[0];t*=n,e>i.parameterPositions[1]&&(this.stopFading(),0===n&&(this.enabled=!1))}}return this._effectiveWeight=t},_updateTimeScale:function(e){var t=0;if(!this.paused){t=this.timeScale;var i=this._timeScaleInterpolant;if(null!==i)t*=i.evaluate(e)[0],e>i.parameterPositions[1]&&(this.stopWarping(),0===t?this.paused=!0:this.timeScale=t)}return this._effectiveTimeScale=t},_updateTime:function(e){var t=this.time+e;if(0===e)return t;var i=this._clip.duration,n=this.loop,r=this._loopCount;if(2200===n){-1===r&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(i<=t)t=i;else{if(!(t<0))break e;t=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else{var a=2202===n;if(-1===r&&(0<=e?(r=0,this._setEndings(!0,0===this.repetitions,a)):this._setEndings(0===this.repetitions,!0,a)),i<=t||t<0){var s=Math.floor(t/i);t-=i*s,r+=Math.abs(s);var o=this.repetitions-r;if(o<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,t=0<e?i:0,this._mixer.dispatchEvent({type:"finished",action:this,direction:0<e?1:-1});else{if(1==o){var l=e<0;this._setEndings(l,!l,a)}else this._setEndings(!1,!1,a);this._loopCount=r,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:s})}}if(a&&1==(1&r))return i-(this.time=t)}return this.time=t},_setEndings:function(e,t,i){var n=this._interpolantSettings;i?(n.endingStart=2401,n.endingEnd=2401):(n.endingStart=e?this.zeroSlopeAtStart?2401:2400:2402,n.endingEnd=t?this.zeroSlopeAtEnd?2401:2400:2402)},_scheduleFading:function(e,t,i){var n=this._mixer,r=n.time,a=this._weightInterpolant;null===a&&(a=n._lendControlInterpolant(),this._weightInterpolant=a);var s=a.parameterPositions,o=a.sampleValues;return s[0]=r,o[0]=t,s[1]=r+e,o[1]=i,this}}),fh.prototype=Object.assign(Object.create(u.prototype),{constructor:fh,_bindAction:function(e,t){var i=e._localRoot||this._root,n=e._clip.tracks,r=n.length,a=e._propertyBindings,s=e._interpolants,o=i.uuid,l=this._bindingsByRootAndName,u=l[o];void 0===u&&(u={},l[o]=u);for(var c=0;c!==r;++c){var h=n[c],d=h.name,p=u[d];if(void 0!==p)a[c]=p;
vendor: 9,394 bytes, line 1
1else{if(void 0!==(p=a[c])){null===p._cacheIndex&&(++p.referenceCount,this._addInactiveBinding(p,o,d));continue}var f=t&&t._propertyBindings[c].binding.parsedPath;++(p=new xc(dh.create(i,d,f),h.ValueTypeName,h.getValueSize())).referenceCount,this._addInactiveBinding(p,o,d),a[c]=p}s[c].resultBuffer=p.buffer}},_activateAction:function(e){if(!this._isActiveAction(e)){if(null===e._cacheIndex){var t=(e._localRoot||this._root).uuid,i=e._clip.uuid,n=this._actionsByClip[i];this._bindAction(e,n&&n.knownActions[0]),this._addInactiveAction(e,i,t)}for(var r=e._propertyBindings,a=0,s=r.length;a!==s;++a){var o=r[a];0==o.useCount++&&(this._lendBinding(o),o.saveOriginalState())}this._lendAction(e)}},_deactivateAction:function(e){if(this._isActiveAction(e)){for(var t=e._propertyBindings,i=0,n=t.length;i!==n;++i){var r=t[i];0==--r.useCount&&(r.restoreOriginalState(),this._takeBackBinding(r))}this._takeBackAction(e)}},_initMemoryManager:function(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;var e=this;this.stats={actions:{get total(){return e._actions.length},get inUse(){return e._nActiveActions}},bindings:{get total(){return e._bindings.length},get inUse(){return e._nActiveBindings}},controlInterpolants:{get total(){return e._controlInterpolants.length},get inUse(){return e._nActiveControlInterpolants}}}},_isActiveAction:function(e){var t=e._cacheIndex;return null!==t&&t<this._nActiveActions},_addInactiveAction:function(e,t,i){var n=this._actions,r=this._actionsByClip,a=r[t];if(void 0===a)a={knownActions:[e],actionByRoot:{}},e._byClipCacheIndex=0,r[t]=a;else{var s=a.knownActions;e._byClipCacheIndex=s.length,s.push(e)}e._cacheIndex=n.length,n.push(e),a.actionByRoot[i]=e},_removeInactiveAction:function(e){var t=this._actions,i=t[t.length-1],n=e._cacheIndex;t[i._cacheIndex=n]=i,t.pop(),e._cacheIndex=null;var r=e._clip.uuid,a=this._actionsByClip,s=a[r],o=s.knownActions,l=o[o.length-1],u=e._byClipCacheIndex;o[l._byClipCacheIndex=u]=l,o.pop(),e._byClipCacheIndex=null,delete s.actionByRoot[(e._localRoot||this._root).uuid],0===o.length&&delete a[r],this._removeInactiveBindingsForAction(e)},_removeInactiveBindingsForAction:function(e){for(var t=e._propertyBindings,i=0,n=t.length;i!==n;++i){var r=t[i];0==--r.referenceCount&&this._removeInactiveBinding(r)}},_lendAction:function(e){var t=this._actions,i=e._cacheIndex,n=this._nActiveActions++,r=t[n];t[e._cacheIndex=n]=e,t[r._cacheIndex=i]=r},_takeBackAction:function(e){var t=this._actions,i=e._cacheIndex,n=--this._nActiveActions,r=t[n];t[e._cacheIndex=n]=e,t[r._cacheIndex=i]=r},_addInactiveBinding:function(e,t,i){var n=this._bindingsByRootAndName,r=n[t],a=this._bindings;void 0===r&&(r={},n[t]=r),(r[i]=e)._cacheIndex=a.length,a.push(e)},_removeInactiveBinding:function(e){var t=this._bindings,i=e.binding,n=i.rootNode.uuid,r=i.path,a=this._bindingsByRootAndName,s=a[n],o=t[t.length-1],l=e._cacheIndex;t[o._cacheIndex=l]=o,t.pop(),delete s[r];e:{for(var u in s)break e;delete a[n]}},_lendBinding:function(e){var t=this._bindings,i=e._cacheIndex,n=this._nActiveBindings++,r=t[n];t[e._cacheIndex=n]=e,t[r._cacheIndex=i]=r},_takeBackBinding:function(e){var t=this._bindings,i=e._cacheIndex,n=--this._nActiveBindings,r=t[n];t[e._cacheIndex=n]=e,t[r._cacheIndex=i]=r},_lendControlInterpolant:function(){var e=this._controlInterpolants,t=this._nActiveControlInterpolants++,i=e[t];return void 0===i&&(e[(i=new ju(new Float32Array(2),new Float32Array(2),1,this._controlInterpolantsResultBuffer)).__cacheIndex=t]=i),i},_takeBackControlInterpolant:function(e){var t=this._controlInterpolants,i=e.__cacheIndex,n=--this._nActiveControlInterpolants,r=t[n];t[e.__cacheIndex=n]=e,t[r.__cacheIndex=i]=r},_controlInterpolantsResultBuffer:new Float32Array(1),clipAction:function(e,t){var i=t||this._root,n=i.uuid,r="string"==typeof e?Uu.findByName(i,e):e,a=null!==r?r.uuid:e,s=this._actionsByClip[a],o=null;if(void 0!==s){var l=s.actionByRoot[n];if(void 0!==l)return l;o=s.knownActions[0],null===r&&(r=o._clip)}if(null===r)return null;var u=new ph(this,r,t);return this._bindAction(u,o),this._addInactiveAction(u,a,n),u},existingAction:function(e,t){var i=t||this._root,n=i.uuid,r="string"==typeof e?Uu.findByName(i,e):e,a=r?r.uuid:e,s=this._actionsByClip[a];return void 0!==s&&s.actionByRoot[n]||null},stopAllAction:function(){var e=this._actions,t=this._nActiveActions,i=this._bindings,n=this._nActiveBindings;this._nActiveActions=0;for(var r=this._nActiveBindings=0;r!==t;++r)e[r].reset();for(r=0;r!==n;++r)i[r].useCount=0;return this},update:function(e){e*=this.timeScale;for(var t=this._actions,i=this._nActiveActions,n=this.time+=e,r=Math.sign(e),a=this._accuIndex^=1,s=0;s!==i;++s){t[s]._update(n,e,r,a)}var o=this._bindings,l=this._nActiveBindings;for(s=0;s!==l;++s)o[s].apply(a);return this},getRoot:function(){return this._root},uncacheClip:function(e){var t=this._actions,i=e.uuid,n=this._actionsByClip,r=n[i];if(void 0!==r){for(var a=r.knownActions,s=0,o=a.length;s!==o;++s){var l=a[s];this._deactivateAction(l);var u=l._cacheIndex,c=t[t.length-1];l._cacheIndex=null,l._byClipCacheIndex=null,t[c._cacheIndex=u]=c,t.pop(),this._removeInactiveBindingsForAction(l)}delete n[i]}},uncacheRoot:function(e){var t=e.uuid,i=this._actionsByClip;for(var n in i){var r=i[n].actionByRoot[t];void 0!==r&&(this._deactivateAction(r),this._removeInactiveAction(r))}var a=this._bindingsByRootAndName[t];if(void 0!==a)for(var s in a){var o=a[s];o.restoreOriginalState(),this._removeInactiveBinding(o)}},uncacheAction:function(e,t){var i=this.existingAction(e,t);null!==i&&(this._deactivateAction(i),this._removeInactiveAction(i))}}),gh.prototype.clone=function(){return new gh(void 0===this.value.clone?this.value:this.value.clone())},mh.prototype=Object.assign(Object.create(Jn.prototype),{constructor:mh,isInstancedBufferGeometry:!0,copy:function(e){return Jn.prototype.copy.call(this,e),this.maxInstancedCount=e.maxInstancedCount,this},clone:function(){return(new this.constructor).copy(this)}}),Object.defineProperties(vh.prototype,{count:{get:function(){return this.data.count}},array:{get:function(){return this.data.array}}}),Object.assign(vh.prototype,{isInterleavedBufferAttribute:!0,setX:function(e,t){return this.data.array[e*this.data.stride+this.offset]=t,this},setY:function(e,t){return this.data.array[e*this.data.stride+this.offset+1]=t,this},setZ:function(e,t){return this.data.array[e*this.data.stride+this.offset+2]=t,this},setW:function(e,t){return this.data.array[e*this.data.stride+this.offset+3]=t,this},getX:function(e){return this.data.array[e*this.data.stride+this.offset]},getY:function(e){return this.data.array[e*this.data.stride+this.offset+1]},getZ:function(e){return this.data.array[e*this.data.stride+this.offset+2]},getW:function(e){return this.data.array[e*this.data.stride+this.offset+3]},setXY:function(e,t,i){return e=e*this.data.stride+this.offset,this.data.array[e+0]=t,this.data.array[e+1]=i,this},setXYZ:function(e,t,i,n){return e=e*this.data.stride+this.offset,this.data.array[e+0]=t,this.data.array[e+1]=i,this.data.array[e+2]=n,this},setXYZW:function(e,t,i,n,r){return e=e*this.data.stride+this.offset,this.data.array[e+0]=t,this.data.array[e+1]=i,this.data.array[e+2]=n,this.data.array[e+3]=r,this}}),Object.defineProperty(yh.prototype,"needsUpdate",{set:function(e){!0===e&&this.version++}}),Object.assign(yh.prototype,{isInterleavedBuffer:!0,onUploadCallback:function(){},setArray:function(e){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");return this.count=void 0!==e?e.length/this.stride:0,this.array=e,this},setDynamic:function(e){return this.dynamic=e,this},copy:function(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.dynamic=e.dynamic,this},copyAt:function(e,t,i){e*=this.stride,i*=t.stride;for(var n=0,r=this.stride;n<r;n++)this.array[e+n]=t.array[i+n];return this},set:function(e,t){return void 0===t&&(t=0),this.array.set(e,t),this},clone:function(){return(new this.constructor).copy(this)},onUpload:function(e){return this.onUploadCallback=e,this}}),_h.prototype=Object.assign(Object.create(yh.prototype),{constructor:_h,isInstancedInterleavedBuffer:!0,copy:function(e){return yh.prototype.copy.call(this,e),this.meshPerAttribute=e.meshPerAttribute,this}}),Mh.prototype=Object.assign(Object.create(Cn.prototype),{constructor:Mh,isInstancedBufferAttribute:!0,copy:function(e){return Cn.prototype.copy.call(this,e),this.meshPerAttribute=e.meshPerAttribute,this}}),Object.assign(function(e,t,i,n){this.ray=new Wr(e,t),this.near=i||0,this.far=n||1/0,this.params={Mesh:{},Line:{},LOD:{},Points:{threshold:1},Sprite:{}},Object.defineProperties(this.params,{PointCloud:{get:function(){return console.warn("THREE.Raycaster: params.PointCloud has been renamed to params.Points."),this.Points}}})}.prototype,{linePrecision:1,set:function(e,t){this.ray.set(e,t)},setFromCamera:function(e,t){t&&t.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(t.matrixWorld),this.ray.direction.set(e.x,e.y,.5).unproject(t).sub(this.ray.origin).normalize()):t&&t.isOrthographicCamera?(this.ray.origin.set(e.x,e.y,(t.near+t.far)/(t.near-t.far)).unproject(t),this.ray.direction.set(0,0,-1).transformDirection(t.matrixWorld)):console.error("THREE.Raycaster:
1Unsupported camera type.")},intersectObject:function(e,t,i){var n=i||[];return bh(e,this,n,t),n.sort(wh),n},intersectObjects:function(e,t,i){var n=i||[];if(!1===Array.isArray(e))return console.warn("THREE.Raycaster.intersectObjects: objects is not an Array."),n;for(var r=0,a=e.length;r<a;r++)bh(e[r],this,n,t);return n.sort(wh),n}}),Object.assign(function(e){this.autoStart=void 0===e||e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}.prototype,{start:function(){this.startTime=("undefined"==typeof performance?Date:performance).now(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0},stop:function(){this.getElapsedTime(),this.running=!1,this.autoStart=!1},getElapsedTime:function(){return this.getDelta(),this.elapsedTime},getDelta:function(){var e=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){var t=("undefined"==typeof performance?Date:performance).now();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}}),Object.assign(Th.prototype,{set:function(e,t,i){return this.radius=e,this.phi=t,this.theta=i,this},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.radius=e.radius,this.phi=e.phi,this.theta=e.theta,this},makeSafe:function(){return this.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this.phi)),this},setFromVector3:function(e){return this.radius=e.length(),0===this.radius?(this.theta=0,this.phi=0):(this.theta=Math.atan2(e.x,e.z),this.phi=Math.acos(Ht.clamp(e.y/this.radius,-1,1))),this}}),Object.assign(function(e,t,i){return this.radius=void 0!==e?e:1,this.theta=void 0!==t?t:0,this.y=void 0!==i?i:0,this}.prototype,{set:function(e,t,i){return this.radius=e,this.theta=t,this.y=i,this},clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.radius=e.radius,this.theta=e.theta,this.y=e.y,this},setFromVector3:function(e){return this.radius=Math.sqrt(e.x*e.x+e.z*e.z),this.theta=Math.atan2(e.x,e.z),this.y=e.y,this}}),Object.assign(Ah.prototype,{set:function(e,t){return this.min.copy(e),this.max.copy(t),this},setFromPoints:function(e){this.makeEmpty();for(var t=0,i=e.length;t<i;t++)this.expandByPoint(e[t]);return this},setFromCenterAndSize:(Pc=new Yt,function(e,t){var i=Pc.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(i),this.max.copy(e).add(i),this}),clone:function(){return(new this.constructor).copy(this)},copy:function(e){return this.min.copy(e.min),this.max.copy(e.max),this},makeEmpty:function(){return this.min.x=this.min.y=1/0,this.max.x=this.max.y=-1/0,this},isEmpty:function(){return this.max.x<this.min.x||this.max.y<this.min.y},getCenter:function(e){return void 0===e&&(console.warn("THREE.Box2: .getCenter() target is now required"),e=new Yt),this.isEmpty()?e.set(0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)},getSize:function(e){return void 0===e&&(console.warn("THREE.Box2: .getSize() target is now required"),e=new Yt),this.isEmpty()?e.set(0,0):e.subVectors(this.max,this.min)},expandByPoint:function(e){return this.min.min(e),this.max.max(e),this},expandByVector:function(e){return this.min.sub(e),this.max.add(e),this},expandByScalar:function(e){return this.min.addScalar(-e),this.max.addScalar(e),this},containsPoint:function(e){return!(e.x<this.min.x||e.x>this.max.x||e.y<this.min.y||e.y>this.max.y)},containsBox:function(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y},getParameter:function(e,t){return void 0===t&&(console.warn("THREE.Box2: .getParameter() target is now required"),t=new Yt),t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y))},intersectsBox:function(e){return!(e.max.x<this.min.x||e.min.x>this.max.x||e.max.y<this.min.y||e.min.y>this.max.y)},clampPoint:function(e,t){return void 0===t&&(console.warn("THREE.Box2: .clampPoint() target is now required"),t=new Yt),t.copy(e).clamp(this.min,this.max)},distanceToPoint:(kc=new Yt,function(e){return kc.copy(e).clamp(this.min,this.max).sub(e).length()}),intersect:function(e){return this.min.max(e.min),this.max.min(e.max),this},union:function(e){return this.min.min(e.min),this.max.max(e.max),this},translate:function(e){return this.min.add(e),this.max.add(e),this},equals:function(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}),((xh.prototype=Object.create(vn.prototype)).constructor=xh).prototype.isImmediateRenderObject=!0,((Eh.prototype=Object.create(uo.prototype)).constructor=Eh).prototype.update=(Rc=new Wt,zc=new Wt,Uc=new qt,function(){var e=["a","b","c"];this.object.updateMatrixWorld(!0),Uc.getNormalMatrix(this.object.matrixWorld);var t=this.object.matrixWorld,i=this.geometry.attributes.position,n=this.object.geometry;if(n&&n.isGeometry)for(var r=n.vertices,a=n.faces,s=0,o=0,l=a.length;o<l;o++)for(var u=a[o],c=0,h=u.vertexNormals.length;c<h;c++){var d=r[u[e[c]]],p=u.vertexNormals[c];
1Rc.copy(d).applyMatrix4(t),zc.copy(p).applyMatrix3(Uc).normalize().multiplyScalar(this.size).add(Rc),i.setXYZ(s,Rc.x,Rc.y,Rc.z),s+=1,i.setXYZ(s,zc.x,zc.y,zc.z),s+=1}else if(n&&n.isBufferGeometry){var f=n.attributes.position,g=n.attributes.normal;for(c=s=0,h=f.count;c<h;c++)Rc.set(f.getX(c),f.getY(c),f.getZ(c)).applyMatrix4(t),zc.set(g.getX(c),g.getY(c),g.getZ(c)),zc.applyMatrix3(Uc).normalize().multiplyScalar(this.size).add(Rc),i.setXYZ(s,Rc.x,Rc.y,Rc.z),s+=1,i.setXYZ(s,zc.x,zc.y,zc.z),s+=1}i.needsUpdate=!0}),((Sh.prototype=Object.create(vn.prototype)).constructor=Sh).prototype.dispose=function(){this.cone.geometry.dispose(),this.cone.material.dispose()},Sh.prototype.update=(Bc=new Wt,Fc=new Wt,function(){this.light.updateMatrixWorld();var e=this.light.distance?this.light.distance:1e3,t=e*Math.tan(this.light.angle);this.cone.scale.set(t,t,e),Bc.setFromMatrixPosition(this.light.matrixWorld),Fc.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(Fc.sub(Bc)),void 0!==this.color?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)}),((Dh.prototype=Object.create(uo.prototype)).constructor=Dh).prototype.updateMatrixWorld=(Gc=new Wt,Hc=new Qt,Yc=new Qt,function(e){var t=this.bones,i=this.geometry,n=i.getAttribute("position");Yc.getInverse(this.root.matrixWorld);for(var r=0,a=0;r<t.length;r++){var s=t[r];s.parent&&s.parent.isBone&&(Hc.multiplyMatrices(Yc,s.matrixWorld),Gc.setFromMatrixPosition(Hc),n.setXYZ(a,Gc.x,Gc.y,Gc.z),Hc.multiplyMatrices(Yc,s.parent.matrixWorld),Gc.setFromMatrixPosition(Hc),n.setXYZ(a+1,Gc.x,Gc.y,Gc.z),a+=2)}i.getAttribute("position").needsUpdate=!0,vn.prototype.updateMatrixWorld.call(this,e)}),((Nh.prototype=Object.create(Zr.prototype)).constructor=Nh).prototype.dispose=function(){this.geometry.dispose(),this.material.dispose()},Nh.prototype.update=function(){void 0!==this.color?this.material.color.set(this.color):this.material.color.copy(this.light.color)},((Ch.prototype=Object.create(vn.prototype)).constructor=Ch).prototype.dispose=function(){this.children[0].geometry.dispose(),this.children[0].material.dispose()},Ch.prototype.update=function(){var e=.5*this.light.width,t=.5*this.light.height,i=this.line.geometry.attributes.position,n=i.array;n[0]=e,n[1]=-t,n[2]=0,n[3]=e,n[4]=t,n[5]=0,n[6]=-e,n[7]=t,n[8]=0,n[9]=-e,n[10]=-t,n[11]=0,n[12]=e,n[13]=-t,n[14]=0,i.needsUpdate=!0,void 0!==this.color?this.line.material.color.set(this.color):this.line.material.color.copy(this.light.color)},((Lh.prototype=Object.create(vn.prototype)).constructor=Lh).prototype.dispose=function(){this.children[0].geometry.dispose(),this.children[0].material.dispose()},Lh.prototype.update=(Qc=new Wt,Vc=new Fi,Wc=new Fi,function(){var e=this.children[0];if(void 0!==this.color)this.material.color.set(this.color);else{var t=e.geometry.getAttribute("color");Vc.copy(this.light.color),Wc.copy(this.light.groundColor);for(var i=0,n=t.count;i<n;i++){var r=i<n/2?Vc:Wc;t.setXYZ(i,r.r,r.g,r.b)}t.needsUpdate=!0}e.lookAt(Qc.setFromMatrixPosition(this.light.matrixWorld).negate())}),(Ih.prototype=Object.create(uo.prototype)).constructor=Ih,(Oh.prototype=Object.create(uo.prototype)).constructor=Oh,((jh.prototype=Object.create(uo.prototype)).constructor=jh).prototype.update=(qc=new Wt,Xc=new Wt,Zc=new qt,function(){this.object.updateMatrixWorld(!0),Zc.getNormalMatrix(this.object.matrixWorld);for(var e=this.object.matrixWorld,t=this.geometry.attributes.position,i=this.object.geometry,n=i.vertices,r=i.faces,a=0,s=0,o=r.length;s<o;s++){var l=r[s],u=l.normal;qc.copy(n[l.a]).add(n[l.b]).add(n[l.c]).divideScalar(3).applyMatrix4(e),Xc.copy(u).applyMatrix3(Zc).normalize().multiplyScalar(this.size).add(qc),t.setXYZ(a,qc.x,qc.y,qc.z),a+=1,t.setXYZ(a,Xc.x,Xc.y,Xc.z),a+=1}t.needsUpdate=!0}),((kh.prototype=Object.create(vn.prototype)).constructor=kh).prototype.dispose=function(){this.lightPlane.geometry.dispose(),this.lightPlane.material.dispose(),this.targetLine.geometry.dispose(),this.targetLine.material.dispose()},kh.prototype.update=($c=new Wt,Kc=new Wt,Jc=new Wt,function(){$c.setFromMatrixPosition(this.light.matrixWorld),Kc.setFromMatrixPosition(this.light.target.matrixWorld),Jc.subVectors(Kc,$c),this.lightPlane.lookAt(Jc),void 0!==this.color?(this.lightPlane.material.color.set(this.color),this.targetLine.material.color.set(this.color)):(this.lightPlane.material.color.copy(this.light.color),this.targetLine.material.color.copy(this.light.color)),this.targetLine.lookAt(Jc),this.targetLine.scale.z
vendor: 4,208 bytes, line 1
1=Jc.length()}),((Ph.prototype=Object.create(uo.prototype)).constructor=Ph).prototype.update=(ih=new Wt,nh=new yn,function(){eh=this.geometry,th=this.pointMap,nh.projectionMatrix.copy(this.camera.projectionMatrix),Rh("c",0,0,-1),Rh("t",0,0,1),Rh("n1",-1,-1,-1),Rh("n2",1,-1,-1),Rh("n3",-1,1,-1),Rh("n4",1,1,-1),Rh("f1",-1,-1,1),Rh("f2",1,-1,1),Rh("f3",-1,1,1),Rh("f4",1,1,1),Rh("u1",.7,1.1,-1),Rh("u2",-.7,1.1,-1),Rh("u3",0,2,-1),Rh("cf1",-1,0,1),Rh("cf2",1,0,1),Rh("cf3",0,-1,1),Rh("cf4",0,1,1),Rh("cn1",-1,0,-1),Rh("cn2",1,0,-1),Rh("cn3",0,-1,-1),Rh("cn4",0,1,-1),eh.getAttribute("position").needsUpdate=!0}),((zh.prototype=Object.create(uo.prototype)).constructor=zh).prototype.update=(rh=new Li,function(e){if(void 0!==e&&console.warn("THREE.BoxHelper: .update() has no longer arguments."),void 0!==this.object&&rh.setFromObject(this.object),!rh.isEmpty()){var t=rh.min,i=rh.max,n=this.geometry.attributes.position,r=n.array;r[0]=i.x,r[1]=i.y,r[2]=i.z,r[3]=t.x,r[4]=i.y,r[5]=i.z,r[6]=t.x,r[7]=t.y,r[8]=i.z,r[9]=i.x,r[10]=t.y,r[11]=i.z,r[12]=i.x,r[13]=i.y,r[14]=t.z,r[15]=t.x,r[16]=i.y,r[17]=t.z,r[18]=t.x,r[19]=t.y,r[20]=t.z,r[21]=i.x,r[22]=t.y,r[23]=t.z,n.needsUpdate=!0,this.geometry.computeBoundingSphere()}}),zh.prototype.setFromObject=function(e){return this.object=e,this.update(),this},((Uh.prototype=Object.create(uo.prototype)).constructor=Uh).prototype.updateMatrixWorld=function(e){var t=this.box;t.isEmpty()||(t.getCenter(this.position),t.getSize(this.scale),this.scale.multiplyScalar(.5),vn.prototype.updateMatrixWorld.call(this,e))},((Bh.prototype=Object.create(lo.prototype)).constructor=Bh).prototype.updateMatrixWorld=function(e){var t=-this.plane.constant;Math.abs(t)<1e-8&&(t=1e-8),this.scale.set(.5*this.size,.5*this.size,t),this.children[0].material.side=t<0?Te:k,this.lookAt(this.plane.normal),vn.prototype.updateMatrixWorld.call(this,e)},((Fh.prototype=Object.create(vn.prototype)).constructor=Fh).prototype.setDirection=(lh=new Wt,function(e){.99999<e.y?this.quaternion.set(0,0,0,1):e.y<-.99999?this.quaternion.set(1,0,0,0):(lh.set(e.z,0,-e.x).normalize(),oh=Math.acos(e.y),this.quaternion.setFromAxisAngle(lh,oh))}),Fh.prototype.setLength=function(e,t,i){void 0===t&&(t=.2*e),void 0===i&&(i=.2*t),this.line.scale.set(1,Math.max(0,e-t),1),this.line.updateMatrix(),this.cone.scale.set(i,t,i),this.cone.position.y=e,this.cone.updateMatrix()},Fh.prototype.setColor=function(e){this.line.material.color.copy(e),this.cone.material.color.copy(e)},(Gh.prototype=Object.create(uo.prototype)).constructor=Gh,Wl.create=function(e,t){return console.log("THREE.Curve.create() has been deprecated"),e.prototype=Object.create(Wl.prototype),(e.prototype.constructor=e).prototype.getPoint=t,e},Object.assign(pu.prototype,{createPointsGeometry:function(e){console.warn("THREE.CurvePath: .createPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");var t=this.getPoints(e);return this.createGeometry(t)},createSpacedPointsGeometry:function(e){console.warn("THREE.CurvePath: .createSpacedPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");var t=this.getSpacedPoints(e);return this.createGeometry(t)},createGeometry:function(e){console.warn("THREE.CurvePath: .createGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");for(var t=new Nn,i=0,n=e.length;i<n;i++){var r=e[i];t.vertices.push(new Wt(r.x,r.y,r.z||0))}return t}}),Object.assign(fu.prototype,{fromPoints:function(e){console.warn("THREE.Path: .fromPoints() has been renamed to .setFromPoints()."),this.setFromPoints(e)}}),Hh.prototype=Object.create(tu.prototype),Object.assign(Hh.prototype,{initFromArray:function(){console.error("THREE.Spline: .initFromArray() has been removed.")},getControlPointsArray:function(){console.error("THREE.Spline: .getControlPointsArray() has been removed.")},reparametrizeByArcLength:function(){console.error("THREE.Spline: .reparametrizeByArcLength() has been removed.")}}),Ih.prototype.setColors=function(){console.error("THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.")},Dh.prototype.update=function(){console.error("THREE.SkeletonHelper: update(
1) no longer needs to be called.")},Object.assign(Wu.prototype,{extractUrlBase:function(e){return console.warn("THREE.Loader: .extractUrlBase() has been deprecated. Use THREE.LoaderUtils.extractUrlBase() instead."),qu(e)}}),Object.assign(Ah.prototype,{center:function(e){return console.warn("THREE.Box2: .center() has been renamed to .getCenter()."),this.getCenter(e)},empty:function(){return console.warn("THREE.Box2: .empty() has been renamed to .isEmpty()."),this.isEmpty()},isIntersectionBox:function(e){return console.warn("THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(e)},size:function(e){return console.warn("THREE.Box2: .size() has been renamed to .getSize()."),this.getSize(e)}}),Object.assign(Li.prototype,{center:function(e){return console.warn("THREE.Box3: .center() has been renamed to .getCenter()."),this.getCenter(e)},empty:function(){return console.warn("THREE.Box3: .empty() has been renamed to .isEmpty()."),this.isEmpty()},isIntersectionBox:function(e){return console.warn("THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(e)},isIntersectionSphere:function(e){return console.warn("THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(e)},size:function(e){return console.warn("THREE.Box3: .size() has been renamed to .getSize()."),this.getSize(e)}}),qr.prototype.center=function(e){return console.warn("THREE.Line3: .center() has been renamed to .getCenter()."),this.getCenter(e)},Object.assign(Ht,{random16:function(){return console.warn("THREE.Math: .random16() has been deprecated. Use Math.random() instead."),Math.random()},nearestPowerOfTwo:function(e){return console.warn("THREE.Math: .nearestPowerOfTwo() has been renamed to .floorPowerOfTwo()."),Ht.floorPowerOfTwo(e)},nextPowerOfTwo:function(e){return console.warn("THREE.Math: .nextPowerOfTwo() has been renamed to .ceilPowerOfTwo()."),Ht.ceilPowerOfTwo(e)}}),Object.assign(qt.prototype,{flattenToArrayOffset:function(e,t){return console.warn("THREE.Matrix3: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(e,t)},multiplyVector3:function(e){return console.warn("THREE.Matrix3: .multiplyVector3(
1) has been removed. Use vector.applyMatrix3( matrix ) instead."),e.applyMatrix3(this)},multiplyVector3Array:function(){console.error("THREE.Matrix3: .multiplyVector3Array() has been removed.")},applyToBuffer:function(e){return console.warn("THREE.Matrix3: .applyToBuffer() has been removed. Use matrix.applyToBufferAttribute( attribute ) instead."),this.applyToBufferAttribute(e)},applyToVector3Array:function(){console.error("THREE.Matrix3: .applyToVector3Array() has been removed.")}}),Object.assign(Qt.prototype,{extractPosition:function(e){return console.warn("THREE.Matrix4: .extractPosition() has been renamed to .copyPosition()."),this.copyPosition(e)},flattenToArrayOffset:function(e,t){return console.warn("THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(e,t)},getPosition:function(){return void 0===uh&&(uh=new Wt),console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead."),uh.setFromMatrixColumn(this,3)},setRotationFromQuaternion:function(e){return console.warn("THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion()."),this.makeRotationFromQuaternion(e)},multiplyToArray:function(){console.warn("THREE.Matrix4: .multiplyToArray() has been removed.")},multiplyVector3:function(e){return console.warn("THREE.Matrix4: .multiplyVector3(
1) has been removed. Use vector.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)},multiplyVector4:function(e){return console.warn("THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)},multiplyVector3Array:function(){console.error("THREE.Matrix4: .multiplyVector3Array() has been removed.")},rotateAxis:function(e){console.warn("THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead."),e.transformDirection(this)},crossVector:function(e){return console.warn("THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)},translate:function(){console.error("THREE.Matrix4: .translate() has been removed.")},rotateX:function(){console.error("THREE.Matrix4: .rotateX() has been removed.")},rotateY:function(){console.error("THREE.Matrix4: .rotateY() has been removed.")},rotateZ:function(){console.error("THREE.Matrix4: .rotateZ() has been removed.")},rotateByAxis:function(){console.error("THREE.Matrix4: .rotateByAxis() has been removed.")},applyToBuffer:function(e){return console.warn("THREE.Matrix4: .applyToBuffer() has been removed. Use matrix.applyToBufferAttribute( attribute ) instead."),this.applyToBufferAttribute(e)},applyToVector3Array:function(){console.error("THREE.Matrix4: .applyToVector3Array() has been removed.")},makeFrustum:function(e,t,i,n,r,a){return console.warn("THREE.Matrix4: .makeFrustum() has been removed. Use .makePerspective( left, right, top, bottom, near, far ) instead."),this.makePerspective(e,t,n,i,r,a)}}),ki.prototype.isIntersectionLine=function(e){return console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine()."),this.intersectsLine(e)},Vt.prototype.multiplyVector3=function(e){return console.warn("THREE.Quaternion: .multiplyVector3(
1) has been removed. Use is now vector.applyQuaternion( quaternion ) instead."),e.applyQuaternion(this)},Object.assign(Wr.prototype,{isIntersectionBox:function(e){return console.warn("THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(e)},isIntersectionPlane:function(e){return console.warn("THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane()."),this.intersectsPlane(e)},isIntersectionSphere:function(e){return console.warn("THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(e)}}),Object.assign(Xr.prototype,{area:function(){return console.warn("THREE.Triangle: .area() has been renamed to .getArea()."),this.getArea()},barycoordFromPoint:function(e,t){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),this.getBarycoord(e,t)},midpoint:function(e){return console.warn("THREE.Triangle: .midpoint() has been renamed to .getMidpoint()."),this.getMidpoint(e)},normal:function(e){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),this.getNormal(e)},plane:function(e){return console.warn("THREE.Triangle: .plane() has been renamed to .getPlane()."),this.getPlane(e)}}),Object.assign(Xr,{barycoordFromPoint:function(e,t,i,n,r){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),Xr.getBarycoord(e,t,i,n,r)},normal:function(e,t,i,n){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),Xr.getNormal(e,t,i,n)}}),Object.assign(gu.prototype,{extractAllPoints:function(e){return console.warn("THREE.Shape: .extractAllPoints() has been removed. Use .extractPoints() instead."),this.extractPoints(e)},extrude:function(e){return console.warn("THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead."),new ol(this,e)},makeGeometry:function(e){return console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead."),new _l(this,e)}}),Object.assign(Yt.prototype,{fromAttribute:function(e,t,i){return console.warn("THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(e,t,i)},distanceToManhattan:function(e){return console.warn("THREE.Vector2: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(e)},lengthManhattan:function(){return console.warn("THREE.Vector2: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(Wt.prototype,{setEulerFromRotationMatrix:function(){console.error("THREE.Vector3: .setEulerFromRotationMatrix() has been removed. Use Euler.setFromRotationMatrix() instead.")},setEulerFromQuaternion:function(){console.error("THREE.Vector3: .setEulerFromQuaternion() has been removed. Use Euler.setFromQuaternion() instead.")},getPositionFromMatrix:function(e){return console.warn("THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition()."),this.setFromMatrixPosition(e)},getScaleFromMatrix:function(e){return console.warn("THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale()."),this.setFromMatrixScale(e)},getColumnFromMatrix:function(e,t){return console.warn("THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn()."),this.setFromMatrixColumn(t,e)},applyProjection:function(e){return console.warn("THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead."),this.applyMatrix4(e)},fromAttribute:function(e,t,i){return console.warn("THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(e,t,i)},distanceToManhattan:function(e){return console.warn("THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(e)},lengthManhattan:function(){return console.warn("THREE.Vector3: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(Si.prototype,{fromAttribute:function(e,t,i){return console.warn("THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(e,t,i)},lengthManhattan:function(){return console.warn("THREE.Vector4: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(Nn.prototype,{computeTangents:function(){console.error("THREE.Geometry: .computeTangents() has been removed.")},computeLineDistances:function(){console.error("THREE.Geometry: .computeLineDistances() has been removed. Use THREE.Line.computeLineDistances() instead.")}}),Object.assign(vn.prototype,{getChildByName:function(e){return console.warn("THREE.Object3D: .getChildByName() has been renamed to .getObjectByName()."),this.getObjectByName(e)},renderDepth:function(){console.warn("THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.")},translate:function(e,t){return console.warn("THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead."),this.translateOnAxis(t,e)},getWorldRotation:function(){console.error("THREE.Object3D: .getWorldRotation() has been removed. Use THREE.Object3D.getWorldQuaternion( target ) instead.")}}),Object.defineProperties(vn.prototype,{eulerOrder:{get:function(){return console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order},set:function(e){console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order=e}},useQuaternion:{get:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library n
1ow uses quaternions by default.")},set:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")}}}),Object.defineProperties(no.prototype,{objects:{get:function(){return console.warn("THREE.LOD: .objects has been renamed to .levels."),this.levels}}}),Object.defineProperty(ro.prototype,"useVertexTexture",{get:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")},set:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")}}),Object.defineProperty(Wl.prototype,"__arcLengthDivisions",{get:function(){return console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions."),this.arcLengthDivisions},set:function(e){console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions."),this.arcLengthDivisions=e}}),Ws.prototype.setLens=function(e,t){console.warn("THREE.PerspectiveCamera.setLens is deprecated. Use .setFocalLength and .filmGauge for a photographic setup."),void 0!==t&&(this.filmGauge=t),this.setFocalLength(e)},Object.defineProperties(mu.prototype,{onlyShadow:{set:function(){console.warn("THREE.Light: .onlyShadow has been removed.")}},shadowCameraFov:{set:function(e){console.warn("THREE.Light: .shadowCameraFov is now .shadow.camera.fov."),this.shadow.camera.fov=e}},shadowCameraLeft:{set:function(e){console.warn("THREE.Light: .shadowCameraLeft is now .shadow.camera.left."),this.shadow.camera.left=e}},shadowCameraRight:{set:function(e){console.warn("THREE.Light: .shadowCameraRight is now .shadow.camera.right."),this.shadow.camera.right=e}},shadowCameraTop:{set:function(e){console.warn("THREE.Light: .shadowCameraTop is now .shadow.camera.top."),this.shadow.camera.top=e}},shadowCameraBottom:{set:function(e){console.warn("THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom."),this.shadow.camera.bottom=e}},shadowCameraNear:{set:function(e){console.warn("THREE.Light: .shadowCameraNear is now .shadow.camera.near."),this.shadow.camera.near=e}},shadowCameraFar:{set:function(e){console.warn("THREE.Light: .shadowCameraFar is now .shadow.camera.far."),this.shadow.camera.far=e}},shadowCameraVisible:{set:function(){console.warn("THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead.")}},shadowBias:{set:function(e){console.warn("THREE.Light: .shadowBias is now .shadow.bias."),this.shadow.bias=e}},shadowDarkness:{set:function(){console.warn("THREE.Light: .shadowDarkness has been removed.")}},shadowMapWidth:{set:function(e){console.warn("THREE.Light: .shadowMapWidth is now .shadow.mapSize.width."),this.shadow.mapSize.width=e}},shadowMapHeight:{set:function(e){console.warn("THREE.Light: .shadowMapHeight is now .shadow.mapSize.height."),this.shadow.mapSize.height=e}}}),Object.defineProperties(Cn.prototype,{length:{get:function(){return console.warn("THREE.BufferAttribute: .length has been deprecated. Use .count instead."),this.array.length}},copyIndicesArray:function(){console.error("THREE.BufferAttribute: .copyIndicesArray() has been removed.")}}),Object.assign(Jn.prototype,{addIndex:function(e){console.warn("THREE.BufferGeometry: .addIndex() has been renamed to .setIndex()."),this.setIndex(e)},addDrawCall:function(e,t,i){void 0!==i&&console.warn("THREE.BufferGeometry: .addDrawCall() no longer supports indexOffset."),console.warn("THREE.BufferGeometry: .addDrawCall() is now .addGroup()."),this.addGroup(e,t)},clearDrawCalls:function(){console.warn("THREE.BufferGeometry: .clearDrawCalls() is now .clearGroups()."),this.clearGroups()},computeTangents:function(){console.warn("THREE.BufferGeometry: .computeTangents() has been removed.")},computeOffsets:function(){console.warn("THREE.BufferGeometry: .computeOffsets() has been removed.")}}),Object.defineProperties(Jn.prototype,{drawcalls:{get:function(){return console.error("THREE.BufferGeometry: .drawcalls has been renamed to .groups."),this.groups}},offsets:{get:function(){return console.warn("THREE.BufferGeometry: .offsets has been renamed to .groups."),this.groups}}}),Object.assign(ll.prototype,{getArrays:function(){console.error("THREE.ExtrudeBufferGeometry: .getArrays() has been removed.")},addShapeList:function(){console.error("THREE.ExtrudeBufferGeometry: .addShapeList() has been removed.")},addShape:function(){console.error("THREE.ExtrudeBufferGeometry: .addShape() has been removed.")}}),Object.defineProperties(gh.prototype,{dynamic:{set:function(){console.warn("THREE.Uniform: .dynamic has been removed. Use object.onBeforeRender() instead.")}},onUpdate:{value:function(){return console.warn("THREE.Uniform: .onUpdate() has been removed. Use object.onBeforeRender() instead."),this}}}),Object.defineProperties(Yr.prototype,{wrapAround:{get:function(){console.warn("THREE.Material: .wrapAround has been removed.")}
vendor: 4,097 bytes, line 1
1,set:function(){console.warn("THREE.Material: .wrapAround has been removed.")}},wrapRGB:{get:function(){return console.warn("THREE.Material: .wrapRGB has been removed."),new Fi}},shading:{get:function(){console.error("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead.")},set:function(e){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=1===e}}}),Object.defineProperties(jl.prototype,{metal:{get:function(){return console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead."),!1},set:function(){console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead")}}}),Object.defineProperties(Vr.prototype,{derivatives:{get:function(){return console.warn("THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives},set:function(e){console.warn("THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives=e}}}),Object.assign($s.prototype,{animate:function(e){console.warn("THREE.WebGLRenderer: .animate() is now .setAnimationLoop()."),this.setAnimationLoop(e)},getCurrentRenderTarget:function(){return console.warn("THREE.WebGLRenderer: .getCurrentRenderTarget() is now .getRenderTarget()."),this.getRenderTarget()},getMaxAnisotropy:function(){return console.warn("THREE.WebGLRenderer: .getMaxAnisotropy() is now .capabilities.getMaxAnisotropy()."),this.capabilities.getMaxAnisotropy()},getPrecision:function(){return console.warn("THREE.WebGLRenderer: .getPrecision() is now .capabilities.precision."),this.capabilities.precision},resetGLState:function(){return console.warn("THREE.WebGLRenderer: .resetGLState() is now .state.reset()."),this.state.reset()},supportsFloatTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( 'OES_texture_float' )."),this.extensions.get("OES_texture_float")},supportsHalfFloatTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( 'OES_texture_half_float' )."),this.extensions.get("OES_texture_half_float")},supportsStandardDerivatives:function(){return console.warn("THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( 'OES_standard_derivatives' )."),this.extensions.get("OES_standard_derivatives")},supportsCompressedTextureS3TC:function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( 'WEBGL_compressed_texture_s3tc' )."),this.extensions.get("WEBGL_compressed_texture_s3tc")},supportsCompressedTexturePVRTC:function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( 'WEBGL_compressed_texture_pvrtc' )."),this.extensions.get("WEBGL_compressed_texture_pvrtc")},supportsBlendMinMax:function(){return console.warn("THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( 'EXT_blend_minmax' )."),this.extensions.get("EXT_blend_minmax")},supportsVertexTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsVertexTextures() is now .capabilities.vertexTextures."),this.capabilities.vertexTextures},supportsInstancedArrays:function(){return console.warn("THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( 'ANGLE_instanced_arrays' )."),this.extensions.get("ANGLE_instanced_arrays")},enableScissorTest:function(e){console.warn("THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest()."),this.setScissorTest(e)},initMaterial:function(){console.warn("THREE.WebGLRenderer: .initMaterial() has been removed.")},addPrePlugin:function(){console.warn("THREE.WebGLRenderer: .addPrePlugin() has been removed.")},addPostPlugin:function(){console.warn("THREE.WebGLRenderer: .addPostPlugin() has been removed.")},updateShadowMap:function(){console.warn("THREE.WebGLRenderer: .updateShadowMap() has been removed.")},setFaceCulling:function(){console.warn("THREE.WebGLRenderer: .setFaceCulling(
1) has been removed.")}}),Object.defineProperties($s.prototype,{shadowMapEnabled:{get:function(){return this.shadowMap.enabled},set:function(e){console.warn("THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled."),this.shadowMap.enabled=e}},shadowMapType:{get:function(){return this.shadowMap.type},set:function(e){console.warn("THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type."),this.shadowMap.type=e}},shadowMapCullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")}}}),Object.defineProperties(Fs.prototype,{cullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")}},renderReverseSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")}},renderSingleSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")}}}),Object.defineProperties(Di.prototype,{wrapS:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS},set:function(e){console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS=e}},wrapT:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT},set:function(e){console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT=e}},magFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter},set:function(e){console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter=e}},minFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter},set:function(e){console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter=e}},anisotropy:{get:function(){return console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy},set:function(e){console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy=e}},offset:{get:function(){return console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset},set:function(e){console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset=e}},repeat:{get:function(){return console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat},set:function(e){console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat=e}},format:{get:function(){return console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format},set:function(e){console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format=e}},type:{get:function(){return console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type},set:function(e){console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type=e}},generateMipmaps:{get:function(){return console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps},set:function(e){console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps=e}}}),Object.defineProperties(Xs.prototype,{standing:{set:function(){console.warn("THREE.WebVRManager: .standing has been removed.")}}}),bc.prototype.load=function(e){console.warn("THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.");var t=this;return(new _c).load(e,function(e){t.setBuffer(e)}),this},Ac.prototype.getData=function(){return console.warn("THREE.AudioAnalyser: .getData() is now .getFrequencyData()."),this.getFrequencyData()},Mc.prototype.updateCubeMap=function(e,t){return console.warn("THREE.CubeCamera: .updateCubeMap() is now .update(
1)."),this.update(e,t)};function Yh(t,i){var n,r,a=this,s=new Qt,o=null;"VRFrameData"in window&&(o=new VRFrameData),navigator.getVRDisplays&&navigator.getVRDisplays().then(function(e){0<(r=e).length?n=e[0]:i&&i("VR input not available.")}).catch(function(){console.warn("VRControls: Unable to get VR Displays")}),this.scale=1,this.standing=!1,this.userHeight=1.6,this.getVRDisplay=function(){return n},this.setVRDisplay=function(e){n=e},this.getVRDisplays=function(){return console.warn("VRControls: getVRDisplays() is being deprecated."),r},this.getStandingMatrix=function(){return s},this.update=function(){var e;n&&(n.getFrameData?(n.getFrameData(o),e=o.pose):n.getPose&&(e=n.getPose()),null!==e.orientation&&t.quaternion.fromArray(e.orientation),null!==e.position?t.position.fromArray(e.position):t.position.set(0,0,0),this.standing&&(n.stageParameters?(t.updateMatrix(),s.fromArray(n.stageParameters.sittingToStandingTransform),t.applyMatrix(s)):t.position.setY(t.position.y+this.userHeight)),t.position.multiplyScalar(a.scale))},this.dispose=function(){n=null}}function Qh(d,t){var p,i,f,g,m=new Wt,v=new Wt,y=new Qt,_=new Qt,M=new Qt,w=null;"VRFrameData"in window&&(w=new window.VRFrameData),navigator.getVRDisplays&&navigator.getVRDisplays().then(function(e){0<(i=e).length?p=e[0]:t&&t("HMD not available")}).catch(function(){console.warn("VREffect: Unable to get VR Displays")}),this.isPresenting=!1;var b=this,r=d.getSize(),a=!1,s=d.getPixelRatio();this.getVRDisplay=function(){return p},this.setVRDisplay=function(e){p=e},this.getVRDisplays=function(){return console.warn("VREffect: getVRDisplays() is being deprecated."),i},this.setSize=function(e,t,i){if(r={width:e,height:t},a=i,b.isPresenting){var n=p.getEyeParameters("left");d.setPixelRatio(1),d.setSize(2*n.renderWidth,n.renderHeight,!1)}else d.setPixelRatio(s),d.setSize(e,t,i)};var n=d.domElement,T=[0,0,.5,1],A=[.5,0,.5,1];function e(){var e=b.isPresenting;if(b.isPresenting=void 0!==p&&p.isPresenting,b.isPresenting){var t=p.getEyeParameters("left"),i=t.renderWidth,n=t.renderHeight;e||(s=d.getPixelRatio(),r=d.getSize(),d.setPixelRatio(1),d.setSize(2*i,n,!1))}else e&&(d.setPixelRatio(s),d.setSize(r.width,r.height,a))}window.addEventListener("vrdisplaypresentchange",e,!1),this.setFullScreen=function(i){return new Promise(function(e,t){void 0!==p?b.isPresenting!==i?e(i?p.requestPresent([{source:n}]):p.exitPresent()):e():t(new Error("No VR hardware found."))})},this.requestPresent=function(){return this.setFullScreen(!0)},this.exitPresent=function(){return this.setFullScreen(!1)},this.requestAnimationFrame=function(e){return void 0!==p?p.requestAnimationFrame(e):window.requestAnimationFrame(e)},this.cancelAnimationFrame=function(e){void 0!==p?p.cancelAnimationFrame(e):window.cancelAnimationFrame(e)},this.submitFrame=function(){void 0!==p&&b.isPresenting&&p.submitFrame()},this.autoSubmitFrame=!0;var x=new Ws;x.layers.enable(1);var E=new Ws;E.layers.enable(2),this.render=function(e,t,i,n){if(p&&b.isPresenting){var r=e.autoUpdate;r&&(e.updateMatrixWorld(),e.autoUpdate=!1),Array.isArray(e)&&(console.warn("VREffect.render() no longer supports arrays. Use object.layers instead."),e=e[0]);var a,s,o=d.getSize(),l=p.getLayers();if(l.length){var u=l[0];a=null!==u.leftBounds&&4===u.leftBounds.length?u.leftBounds:T,s=null!==u.rightBounds&&4===u.rightBounds.length?u.rightBounds:A}else a=T,s=A;if(f={x:Math.round(o.width*a[0]),y:Math.round(o.height*a[1]),width:Math.round(o.width*a[2]),height:Math.round(o.height*a[3])},g={x:Math.round(o.width*s[0]),y:Math.round(o.height*s[1]),width:Math.round(o.width*s[2]),height:Math.round(o.height*s[3])},i?(d.setRenderTarget(i),i.scissorTest=!0):(d.setRenderTarget(null),d.setScissorTest(!0)),(d.autoClear||n)&&d.clear(),null===t.parent&&t.updateMatrixWorld(),t.matrixWorld.decompose(x.position,x.quaternion,x.scale),E.position.copy(x.position),E.quaternion.copy(x.quaternion),E.scale.copy(x.scale),p.getFrameData)p.depthNear=t.near,p.depthFar=t.far,p.getFrameData(w),x.projectionMatrix.elements=w.leftProjectionMatrix,E.projectionMatrix.elements=w.rightProjectionMatrix,function(e){e.pose.orientation?(S.fromArray(e.pose.orientation),y.makeRotationFromQuaternion(S)):y.identity();e.pose.position&&(D.fromArray(e.pose.position),y.setPosition(D));_.fromArray(e.leftViewMatrix),_.multiply(y),M.fromArray(e.rightViewM
vendor: 14,276 bytes, line 1
1atrix),M.multiply(y),_.getInverse(_),M.getInverse(M)}(w),x.updateMatrix(),x.matrix.multiply(_),x.matrix.decompose(x.position,x.quaternion,x.scale),E.updateMatrix(),E.matrix.multiply(M),E.matrix.decompose(E.position,E.quaternion,E.scale);else{var c=p.getEyeParameters("left"),h=p.getEyeParameters("right");x.projectionMatrix=N(c.fieldOfView,!0,t.near,t.far),E.projectionMatrix=N(h.fieldOfView,!0,t.near,t.far),m.fromArray(c.offset),v.fromArray(h.offset),x.translateOnAxis(m,x.scale.x),E.translateOnAxis(v,E.scale.x)}return i?(i.viewport.set(f.x,f.y,f.width,f.height),i.scissor.set(f.x,f.y,f.width,f.height)):(d.setViewport(f.x,f.y,f.width,f.height),d.setScissor(f.x,f.y,f.width,f.height)),d.render(e,x,i,n),i?(i.viewport.set(g.x,g.y,g.width,g.height),i.scissor.set(g.x,g.y,g.width,g.height)):(d.setViewport(g.x,g.y,g.width,g.height),d.setScissor(g.x,g.y,g.width,g.height)),d.render(e,E,i,n),i?(i.viewport.set(0,0,o.width,o.height),i.scissor.set(0,0,o.width,o.height),i.scissorTest=!1,d.setRenderTarget(null)):(d.setViewport(0,0,o.width,o.height),d.setScissorTest(!1)),r&&(e.autoUpdate=!0),void(b.autoSubmitFrame&&b.submitFrame())}d.render(e,t,i,n)},this.dispose=function(){window.removeEventListener("vrdisplaypresentchange",e,!1)};var S=new Vt,D=new Wt;function N(e,t,i,n){var r=Math.PI/180;return function(e,t,i,n){i=void 0===i?.01:i,n=void 0===n?1e4:n;var r,a,s,o,l=(t=void 0===t||t)?-1:1,u=new Qt,c=u.elements,h=(a=2/((r=e).leftTan+r.rightTan),s=(r.leftTan-r.rightTan)*a*.5,o=2/(r.upTan+r.downTan),{scale:[a,o],offset:[s,(r.upTan-r.downTan)*o*.5]});return c[0]=h.scale[0],c[1]=0,c[2]=h.offset[0]*l,c[3]=0,c[4]=0,c[5]=h.scale[1],c[6]=-h.offset[1]*l,c[7]=0,c[8]=0,c[9]=0,c[10]=n/(i-n)*-l,c[11]=n*i/(i-n),c[12]=0,c[13]=0,c[14]=l,c[15]=0,u.transpose(),u}({upTan:Math.tan(e.upDegrees*r),downTan:Math.tan(e.downDegrees*r),leftTan:Math.tan(e.leftDegrees*r),rightTan:Math.tan(e.rightDegrees*r)},t,i,n)}}function Vh(e,t){var i,n,r,a,s;this.object=e,this.domElement=void 0!==t?t:document,this.enabled=!0,this.target=new Wt,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.25,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!1,this.keyPanSpeed=7,this.autoRotate=!1,this.autoRotateSpeed=2,this.enableKeys=!0,this.keys={LEFT:37,UP:38,RIGHT:39,BOTTOM:40},this.mouseButtons={ORBIT:V,ZOOM:W,PAN:q},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this.getPolarAngle=function(){return f.phi},this.getAzimuthalAngle=function(){return f.theta},this.saveState=function(){o.target0.copy(o.target),o.position0.copy(o.object.position),o.zoom0=o.object.zoom},this.reset=function(){o.target.copy(o.target0),o.object.position.copy(o.position0),o.object.zoom=o.zoom0,o.object.updateProjectionMatrix(),o.dispatchEvent(l),o.update(),d=h.NONE},this.update=(i=new Wt,n=(new Vt).setFromUnitVectors(e.up,new Wt(0,1,0)),r=n.clone().inverse(),a=new Wt,s=new Vt,function(){var e=o.object.position;return i.copy(e).sub(o.target),i.applyQuaternion(n),f.setFromVector3(i),o.autoRotate&&d===h.NONE&&o.rotateLeft(2*Math.PI/60/60*o.autoRotateSpeed),f.theta+=g.theta,f.phi+=g.phi,f.theta=Math.max(o.minAzimuthAngle,Math.min(o.maxAzimuthAngle,f.theta)),f.phi=Math.max(o.minPolarAngle,Math.min(o.maxPolarAngle,f.phi)),f.makeSafe(),f.radius*=m,f.radius=Math.max(o.minDistance,Math.min(o.maxDistance,f.radius)),o.target.add(v),i.setFromSpherical(f),i.applyQuaternion(r),e.copy(o.target).add(i),o.object.lookAt(o.target),!0===o.enableDamping?(g.theta*=1-o.dampingFactor,g.phi*=1-o.dampingFactor,v.multiplyScalar(1-o.dampingFactor)):(g.set(0,0,0),v.set(0,0,0)),m=1,!(!(y||a.distanceToSquared(o.object.position)>p||8*(1-s.dot(o.object.quaternion))>p)||(o.dispatchEvent(l),a.copy(o.object.position),s.copy(o.object.quaternion),y=!1))}),this.dispose=function(){o.domElement.removeEventListener("contextmenu",Q,!1),o.domElement.removeEventListener("mousedown",R,!1),o.domElement.removeEventListener("wheel",B,!1),o.domElement.removeEventListener("touchstart",G,!1),o.domElement.removeEventListener("touchend",Y,!1),o.domElement.removeEventListener("touchmove",H,!1),document.removeEventListener("mousemove",z,!1),document.removeEventListener("mouseup",U,!1),window.removeEventListener("keydown",F,!1)};var o=this,l={type:"change"},u={type:"start"},c={type:"end"},h={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_DOLLY_PAN:4},d=h.NONE,p=1e-6,f=new Th,g=new Th,m=1,v=new Wt,y=!1,_=new Yt,M=new Yt,w=new Yt,b=new Yt,T=new Yt,A=new Yt,x=new Yt,E=new Yt,S=new Yt;function D(){return Math.pow(.95,o.zoomSpeed)}o.rotateLeft=function(e){g.theta-=e},o.rotateUp=function(e){g.phi-=e};var N,C,L,I=(N=new Wt,function(e,t){N.setFromMatrixColumn(t,0),N.multiplyScalar(-e),v.add(N)}),O=(C=new Wt,function(e,t){!0===o.screenSpacePanning?C.setFromMatrixColumn(t,1):(C.setFromMatrixColumn(t,0),C.crossVectors(o.object.up,C)),C.multiplyScalar(e),v.add(C)}),j=(L=new Wt,function(e,t){var i=o.domElement===document?o.domElement.body:o.domElement;if(o.object.isPerspectiveCamera){var n=o.object.position;L.copy(n).sub(o.target);var r=L.length();r*=Math.tan(o.object.fov/2*Math.PI/180),I(2*e*r/i.clientHeight,o.object.matrix),O(2*t*r/i.clientHeight,o.object.matrix)}else o.object.isOrthographicCamera?(I(e*(o.object.right-o.object.left)/o.object.zoom/i.clientWidth,o.object.matrix),O(t*(o.object.top-o.object.bottom)/o.object.zoom/i.clientHeight,o.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),o.enablePan=!1)});function k(e){o.object.isPerspectiveCamera?m/=e:o.object.isOrthographicCamera?(o.object.zoom=Math.max(o.minZoom,Math.min(o.maxZoom,o.object.zoom*e)),o.object.updateProjectionMatrix(),y=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),o.enableZoom=!1)}function P(e){o.object.isPerspectiveCamera?m*=e:o.object.isOrthographicCamera?(o.object.zoom=Math.max(o.minZoom,Math.min(o.maxZoom,o.object.zoom/e)),o.object.updateProjectionMatrix(),y=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),o.enableZoom=!1)}function R(e){if(!1!==o.enabled){switch(e.preventDefault(),e.button){case o.mouseButtons.ORBIT:if(!1===o.enableRotate)return;n=e,_.set(n.clientX,n.clientY),d=h.ROTATE;break;case o.mouseButtons.ZOOM:if(!1===o.enableZoom)return;i=e,x.set(i.clientX,i.clientY),d=h.DOLLY;break;case o.mouseButtons.PAN:if(!1===o.enablePan)return;t=e,b.set(t.clientX,t.clientY),d=h.PAN}var t,i,n;d!==h.NONE&&(document.addEventListener("mousemove",z,!1),document.addEventListener("mouseup",U,!1),o.dispatchEvent(u))}}function z(e){var t,i;if(!1!==o.enabled)switch(e.preventDefault(),d){case h.ROTATE:if(!1===o.enableRotate)return;!function(e){M.set(e.clientX,e.clientY),w.subVectors(M,_).multiplyScalar(o.rotateSpeed);var t=o.domElement===document?o.domElement.body:o.domElement;o.rotateLeft(2*Math.PI*w.x/t.clientHeight),o.rotateUp(2*Math.PI*w.y/t.clientHeight),_.copy(M),o.update()}(e);break;case h.DOLLY:if(!1===o.enableZoom)return;i=e,E.set(i.clientX,i.clientY),S.subVectors(E,x),0<S.y?k(D()):S.y<0&&P(D()),x.copy(E),o.update();break;case h.PAN:if(!1===o.enablePan)return;t=e,T.set(t.clientX,t.clientY),A.subVectors(T,b).multiplyScalar(o.panSpeed),j(A.x,A.y),b.copy(T),o.update()}}function U(e){!1!==o.enabled&&(document.removeEventListener("mousemove",z,!1),document.removeEventListener("mouseup",U,!1),o.dispatchEvent(c),d=h.NONE)}function B(e){var t;!1===o.enabled||!1===o.enableZoom||d!==h.NONE&&d!==h.ROTATE||(e.preventDefault(),e.stopPropagation(),o.dispatchEvent(u),(t=e).deltaY<0?P(D()):0<t.deltaY&&k(D()),o.update(),o.dispatchEvent(c))}function F(e){!1!==o.enabled&&!1!==o.enableKeys&&!1!==o.enablePan&&function(e){switch(e.keyCode){case o.keys.UP:j(0,o.keyPanSpeed),o.update();break;case o.keys.BOTTOM:j(0,-o.keyPanSpeed),o.update();break;case o.keys.LEFT:j(o.keyPanSpeed,0),o.update();break;case o.keys.RIGHT:j(-o.keyPanSpeed,0),o.update()}}(e)}function G(e){if(!1!==o.enabled){switch(e.preventDefault(),e.touches.length){case 1:if(!1===o.enableRotate)return;t=e,_.set(t.touches[0].pageX,t.touches[0].pageY),d=h.TOUCH_ROTATE;break;case 2:if(!1===o.enableZoom&&!1===o.enablePan)return;!function(e){if(o.enableZoom){var t=e.touches[0].pageX-e.touches[1].pageX,i=e.touches[0].pageY-e.touches[1].pageY,n=Math.sqrt(t*t+i*i);x.set(0,n)}if(o.enablePan){var r=.5*(e.touches[0].pageX+e.touches[1].pageX),a=.5*(e.touches[0].pageY+e.touches[1].pageY);b.set(r,a)}}(e),d=h.TOUCH_DOLLY_PAN;break;default:d=h.NONE}var t;d!==h.NONE&&o.dispatchEvent(u)}}function H(e){if(!1!==o.enabled)switch(e.preventDefault(),e.stopPropagation(),e.touches.length){case 1:if(!1===o.enableRotate)return;if(d!==h.TOUCH_ROTATE)return;!function(e){M.set(e.touches[0].pageX,e.touches[0].pageY),w.subVectors(M,_).multiplyScalar(o.rotateSpeed);var t=o.domElement===document?o.domElement.body:o.domElement;o.rotateLeft(2*Math.PI*w.x/t.clientHeight),o.rotateUp(2*Math.PI*w.y/t.clientHeight),_.copy(M),o.update()}(e);break;case 2:if(!1===o.enableZoom&&!1===o.enablePan)return;if(d!==h.TOUCH_DOLLY_PAN)return;!function(e){if(o.enableZoom){var t=e.touches[0].pageX-e.touches[1].pageX,i=e.touches[0].pageY-e.touches[1].pageY,n=Math.sqrt(t*t+i*i);E.set(0,n),S.set(0,Math.pow(E.y/x.y,o.zoomSpeed)),k(S.y),x.copy(E)}if(o.enablePan){var r=.5*(e.touches[0].pageX+e.touches[1].pageX),a=.5*(e.touches[0].pageY+e.touches[1].pageY);T.set(r,a),A.subVectors(T,b).multiplyScalar(o.panSpeed),j(A.x,A.y),b.copy(T)}o.update()}(e);break;default:d=h.NONE}}function Y(e){!1!==o.enabled&&(o.dispatchEvent(c),d=h.NONE)}function Q(e){!1!==o.enabled&&e.preventDefault()}o.domElement.addEventListener("mousedown",R,!1),o.domElement.addEventListener("wheel",B,!1),o.domElement.addEventListener("touchstart",G,!1),o.domElement.addEventListener("touchend",Y,!1),o.domElement.addEventListener("touchmove",H,!1),window.addEventListener("keydown",F,!1),this.update()}(Vh.prototype=Object.create(u.prototype)).constructor=Vh,Object.defineProperties(Vh.prototype,{center:{get:function(){return console.warn("OrbitControls: .center has been renamed to .target"),this.target}},noZoom:{get:function(){return console.warn("OrbitControls: .noZoom has been deprecated. Use .enableZoom instead."),!this.enableZoom},set:function(e){console.warn("OrbitControls: .noZoom has been deprecated. Use .enableZoom instead."),this.enableZoom=!e}},noRotate:{get:function(){return console.warn("OrbitControls: .noRotate has been deprecated. Use .enableRotate instead."),!this.enableRotate},set:function(e){console.warn("OrbitControls: .noRotate has been deprecated. Use .enableRotate instead."),this.enableRotate=!e}},noPan:{get:function(){return console.warn("OrbitControls: .noPan has been deprecated. Use .enablePan instead."),!this.enablePan},set:function(e){console.warn("OrbitControls: .noPan has been deprecated. Use .enablePan instead."),this.enablePan=!e}},noKeys:{get:function(){return console.warn("OrbitControls: .noKeys has been deprecated. Use .enableKeys instead."),!this.enableKeys},set:function(e){console.warn("OrbitControls: .noKeys has been deprecated. Use .enableKeys instead."),this.enableKeys=!e}},staticMoving:{get:function(){return console.warn("OrbitControls: .staticMoving has been deprecated. Use .enableDamping instead."),!this.enableDamping},set:function(e){console.warn("OrbitControls: .staticMoving has been deprecated. Use .enableDamping instead."),this.enableDamping=!e}},dynamicDampingFactor:{get:function(){return console.warn("OrbitControls: .dynamicDampingFactor has been renamed. Use .dampingFactor instead."),this.dampingFactor},set:function(e){console.warn("OrbitControls: .dynamicDampingFactor has been renamed. Use .dampingFactor instead."),this.dampingFactor=e}}});function Wh(e){var a=this;function t(e){a.deviceOrientation=e}function i(){a.screenOrientation=window.orientation||0}this.object=e,this.object.rotation.reorder("YXZ"),this.enabled=!0,this.deviceOrientation={},this.screenOrientation=0,this.alphaOffset=0;var s,o,l,u,c=(s=new Wt(0,0,1),o=new Xi,l=new Vt,u=new Vt(-Math.sqrt(.5),0,0,Math.sqrt(.5)),function(e,t,i,n,r){o.set(i,t,-n,"YXZ"),e.setFromEuler(o),e.multiply(u),e.multiply(l.setFromAxisAngle(s,-r))});this.connect=function(){i(),window.addEventListener("orientationchange",i,!1),window.addEventListener("deviceorientation",t,!1),a.enabled=!0},this.disconnect=function(){window.removeEventListener("orientationchange",i,!1),window.removeEventListener("deviceorientation",t,!1),a.enabled=!1},this.update=function(){if(!1!==a.enabled){var e=a.deviceOrientation;if(e){var t=e.alpha?Ht.degToRad(e.alpha)+a.alphaOffset:0,i=e.beta?Ht.degToRad(e.beta):0,n=e.gamma?Ht.degToRad(e.gamma):0,r=a.screenOrientation?Ht.degToRad(a.screenOrientation):0;c(a.object.quaternion,t,i,n,r)}}},this.dispose=function(){a.disconnect()},this.connect()}function qh(e){if(e){if(e=e.toString().trim(),/sphere/i.test(e))return"360";if(/cube/i.test(e))return"360_CUBE";if(/equirectangular/i.test(e))return"360";for(var t=0;t<Kh.length;t++)if(new RegExp("^"+Kh[t]+"$","i").test(e))return Kh[t]}}var Xh,Zh=function(){function e(e){this.object=e.camera,this.domElement=e.canvas,this.orbit=new Vh(this.object,this.domElement),this.speed=.5,this.orbit.target.set(0,0,-1),this.orbit.enableZoom=!1,this.orbit.enablePan=!1,this.orbit.rotateSpeed=-this.speed,e.orientation&&(this.orientation=new Wh(this.object)),e.halfView&&(this.orbit.minAzimuthAngle=-Math.PI/4,this.orbit.maxAzimuthAngle=Math.PI/4)}var t=e.prototype;return t.update=function(){if(this.orientation){this.orientation.update();var e=this.orientation.object.quaternion,t=function(e,t,i,n){var r=e*t+i*n;if(.499<r){var a=2*Math.atan2(e,n);return new Wt(Math.PI/2,0,a)}if(r<-.499){var s=-2*Math.atan2(e,n);return new Wt(-Math.PI/2,0,s)}var o=e*e,l=t*t,u=i*i,c=Math.atan2(2*t*n-2*e*i,1-2*l-2*u);return new Wt(Math.asin(2*r),Math.atan2(2*e*n-2*t*i,1-2*o-2*u),c)}(e.x,e.y,e.z,e.w);void 0===this.lastAngle_&&(this.lastAngle_=t),this.orbit.rotateLeft((this.lastAngle_.z-t.z)*(1+this.speed)),this.orbit.rotateUp((this.lastAngle_.y-t.y)*(1+this.speed)),this.lastAngle_=t}
1this.orbit.update()},t.dispose=function(){this.orbit.dispose(),this.orientation&&this.orientation.dispose()},e}(),$h=((Xh=n.createElement("video")).crossOrigin="anonymous",Xh.hasAttribute("crossorigin")),Kh=["360","360_LR","360_TB","360_CUBE","EAC","EAC_LR","NONE","AUTO","Sphere","Cube","equirectangular","180"],Jh=function(n){function e(e,t){var i;return(i=n.call(this)||this).player=e,i.canvas=t,i.onMoveEnd=o.bind(a(i),i.onMoveEnd),i.onMoveStart=o.bind(a(i),i.onMoveStart),i.onMove=o.bind(a(i),i.onMove),i.onControlBarMove=o.bind(a(i),i.onControlBarMove),i.player.controlBar.on(["mousedown","mousemove","mouseup","touchstart","touchmove","touchend"],i.onControlBarMove),i.oldReportUserActivity=i.player.reportUserActivity,i.player.reportUserActivity=function(){},i.canvas.addEventListener("mousedown",i.onMoveStart),i.canvas.addEventListener("touchstart",i.onMoveStart),i.canvas.addEventListener("mousemove",i.onMove),i.canvas.addEventListener("touchmove",i.onMove),i.canvas.addEventListener("mouseup",i.onMoveEnd),i.canvas.addEventListener("touchend",i.onMoveEnd),i.shouldTogglePlay=!1,i}i(e,n);var t=e.prototype;return t.togglePlay=function(){this.player.paused()?this.player.play():this.player.pause()},t.onMoveStart=function(e){this.player.controls()&&("mousedown"!==e.type||o.dom.isSingleLeftClick(e))?(this.shouldTogglePlay=!0,this.touchMoveCount_=0):this.shouldTogglePlay=!1},t.onMoveEnd=function(e){if("touchend"===e.type&&this.touchMoveCount_<10)return!1===this.player.userActive()?void this.player.userActive(!0):void this.player.userActive(!1);this.shouldTogglePlay&&"mouseup"==e.type&&this.togglePlay()},t.onMove=function(){this.touchMoveCount_++,this.shouldTogglePlay=!1},t.onControlBarMove=function(){this.player.userActive(!0)},t.dispose=function(){this.canvas.removeEventListener("mousedown",this.onMoveStart),this.canvas.removeEventListener("touchstart",this.onMoveStart),this.canvas.removeEventListener("mousemove",this.onMove),this.canvas.removeEventListener("touchmove",this.onMove),this.canvas.removeEventListener("mouseup",this.onMoveEnd),this.canvas.removeEventListener("touchend",this.onMoveEnd),this.player.controlBar.off(["mousedown","mousemove","mouseup","touchstart","touchmove","touchend"],this.onControlBarMove),this.player.reportUserActivity=this.oldReportUserActivity},e}(o.EventTarget),ed=function(s){function e(e,t,i,n){var r;r=s.call(this)||this;var a=o.mergeOptions({channelMap:o.browser.IS_SAFARI?[2,0,1,3]:[0,1,2,3],ambisonicOrder:1},n);return r.videoElementSource=e.createMediaElementSource(i),r.foaRenderer=t.createFOARenderer(e,a),r.foaRenderer.initialize().then(function(){"suspended"===e.state&&r.trigger({type:"audiocontext-suspended"}),r.videoElementSource.connect(r.foaRenderer.input),r.foaRenderer.output.connect(e.destination),r.initialized=!0,r.trigger({type:"omnitone-ready"})},function(e){o.log.warn("videojs-vr: Omnitone initializes failed with the following error: "+e+")")}),r}i(e,s);var t=e.prototype;return t.update=function(e){this.initialized&&this.foaRenderer.setRotationMatrixFromCamera(e.matrix)},t.dispose=function(){this.initialized=!1,this.foaRenderer.setRenderingMode("bypass"),this.foaRenderer=null},e}(o.EventTarget),td=function(n){function e(e,t){var i;return(i=n.call(this,e,t)||this).handleVrDisplayActivate_=o.bind(a(i),i.handleVrDisplayActivate_),i.handleVrDisplayDeactivate_=o.bind(a(i),i.handleVrDisplayDeactivate_),i.handleVrDisplayPresentChange_=o.bind(a(i),i.handleVrDisplayPresentChange_),i.handleOrientationChange_=o.bind(a(i),i.handleOrientationChange_),s.addEventListener("orientationchange",i.handleOrientationChange_),s.addEventListener("vrdisplayactivate",i.handleVrDisplayActivate_),s.addEventListener("vrdisplaydeactivate",i.handleVrDisplayDeactivate_),s.addEventListener("vrdisplaypresentchange",i.handleVrDisplayPresentChange_),o.browser.IS_ANDROID&&i.on(e,"fullscreenchange",function(){e.isFullscreen()?i.hide():i.show()}),i}i(e,n);var t=e.prototype;return t.buildCSSClass=function(){return"vjs-button-vr "+n.prototype.buildCSSClass.call(this)},t.handleVrDisplayPresentChange_=function(){!this.player_.vr().vrDisplay.isPresenting&&this.active_&&this.handleVrDisplayDeactivate_(),this.player_.vr().vrDisplay.isPresenting&&!this.active_&&this.handleVrDisplayActivate_()},t.handleOrientationChange_=function(){this.active_&&o.browser.IS_IOS&&this.changeSize_()},t.changeSize_=function(){this.player_.width(s.innerWidth),this.player_.height(s.innerHeight),s.dispatchEvent(new s.Event("resize"))},t.handleVrDisplayActivate_=function(){o.browser.IS_IOS&&(this.oldWidth_=this.player_.currentWidth(),this.oldHeight_=this.player_.currentHeight(),this.player_.enterFullWindow(),this.changeSize_()),this.active_=!0},t.handleVrDisplayDeactivate_=function(){o.browser.IS_IOS&&(this.oldWidth_&&this.player_.width(this.oldWidth_),this.oldHeight_&&this.player_.height(this.oldHeight_),this.player_.exitFullWindow()),this.active_=!1},t.handleClick=function(){this.active_?s.dispatchEvent(new s.Event("vrdisplaydeactivate")):(!this.player_.hasStarted()&&o.browser.IS_ANDROID&&this.player_.play(),s.dispatchEvent(new s.Event("vrdisplayactivate")))},t.dispose=function(){n.prototype.dispose.call(this),s.removeEventListener("vrdisplayactivate",this.handleVrDisplayActivate_),s.removeEventListener("vrdisplaydeactivate",this.handleVrDisplayDeactivate_),s.removeEventListener("vrdisplaypresentchange",this.handleVrDisplayPresentChange_)},e}(o.getComponent("Button"));o.registerComponent("CardboardButton",td);var id=function(e){function t(){return e.apply(this,arguments)||this}return i(t,e),t.prototype.buildCSSClass=function(){return"vjs-big-vr-play-button "+e.prototype.buildCSSClass.call(this)},t}(o.getComponent("BigPlayButton"));o.registerComponent("BigVrPlayButton",id);var nd={debug:!1,omnitone:!1,forceCardboard:!1,omnitoneOptions:{},projection:"AUTO"},rd={"web-vr-out-of-date":{headline:"360 is out of date",type:"360_OUT_OF_DATE",message:"Your browser supports 360 but not the latest version. See <a href='http://webvr.info'>http://webvr.info</a> for more info."}
1,"web-vr-not-supported":{headline:"360 not supported on this device",type:"360_NOT_SUPPORTED",message:"Your browser does not support 360. See <a href='http://webvr.info'>http://webvr.info</a> for assistance."},"web-vr-hls-cors-not-supported":{headline:"360 HLS video not supported on this device",type:"360_NOT_SUPPORTED",message:"Your browser/device does not support HLS 360 video. See <a href='http://webvr.info'>http://webvr.info</a> for assistance."}},ad=o.getPlugin("plugin"),sd=o.getComponent("Component"),od=function(r){function e(e,t){var i,n=o.mergeOptions(nd,t);return(i=r.call(this,e,n)||this).options_=n,i.player_=e,i.bigPlayButtonIndex_=e.children().indexOf(e.getChild("BigPlayButton"))||0,i.videojsErrorsSupport_=!!o.errors,i.videojsErrorsSupport_&&e.errors({errors:rd}),o.browser.IE_VERSION||!$h?(i.player_.on("loadstart",function(){i.triggerError_({code:"web-vr-not-supported",dismiss:!1})}),a(i)):(i.polyfill_=new l({ROTATE_INSTRUCTIONS_DISABLED:!0}),i.polyfill_=new l,i.handleVrDisplayActivate_=o.bind(a(i),i.handleVrDisplayActivate_),i.handleVrDisplayDeactivate_=o.bind(a(i),i.handleVrDisplayDeactivate_),i.handleResize_=o.bind(a(i),i.handleResize_),i.animate_=o.bind(a(i),i.animate_),i.setProjection(i.options_.projection),i.on(e,"adstart",function(){return e.setTimeout(function(){e.ads&&e.ads.videoElementRecycled()?(i.log("video element recycled for this ad, reseting"),i.reset(),i.one(e,"playing",i.init)):i.log("video element not recycled for this ad, no need to reset")})},1),i.on(e,"loadedmetadata",i.init),i)}i(e,r);var t=e.prototype;return t.changeProjection_=function(e){var T=this;e=(e=qh(e))||"NONE";var A=0,x=0,E=0;if(this.scene&&this.scene.remove(this.movieScreen),"AUTO"===e){if(this.player_.mediainfo&&this.player_.mediainfo.projection&&"AUTO"!==this.player_.mediainfo.projection){var t=qh(this.player_.mediainfo.projection);return this.changeProjection_(t)}return this.changeProjection_("NONE")}if("360"===e)this.movieGeometry=new fl(256,32,32),this.movieMaterial=new Qr({map:this.videoTexture,overdraw:!0,side:Te}),this.movieScreen=new Zr(this.movieGeometry,this.movieMaterial),this.movieScreen.position.set(A,x,E),this.movieScreen.scale.x=-1,this.movieScreen.quaternion.setFromAxisAngle({x:0,y:1,z:0},-Math.PI/2),this.scene.add(this.movieScreen);else if("360_LR"===e||"360_TB"===e){for(var i=new pl(256,32,32),n=i.faceVertexUvs[0],r=0;r<n.length;r++)for(var a=0;a<3;a++)"360_LR"===e?n[r][a].x*=.5:(n[r][a].y*=.5,n[r][a].y+=.5);this.movieGeometry=(new Jn).fromGeometry(i),this.movieMaterial=new Qr({map:this.videoTexture,overdraw:!0,side:Te}),this.movieScreen=new Zr(this.movieGeometry,this.movieMaterial),this.movieScreen.scale.x=-1,this.movieScreen.quaternion.setFromAxisAngle({x:0,y:1,z:0},-Math.PI/2),this.movieScreen.layers.set(1),this.scene.add(this.movieScreen),n=(i=new pl(256,32,32)).faceVertexUvs[0];for(var s=0;s<n.length;s++)for(var o=0;o<3;o++)"360_LR"===e?(n[s][o].x*=.5,n[s][o].x+=.5):n[s][o].y*=.5;this.movieGeometry=(new Jn).fromGeometry(i),this.movieMaterial=new Qr({map:this.videoTexture,overdraw:!0,side:Te}),this.movieScreen=new Zr(this.movieGeometry,this.movieMaterial),this.movieScreen.scale.x=-1,this.movieScreen.quaternion.setFromAxisAngle({x:0,y:1,z:0},-Math.PI/2),this.movieScreen.layers.set(2),this.scene.add(this.movieScreen)}else if("360_CUBE"===e){this.movieGeometry=new er(256,256,256),this.movieMaterial=new Qr({map:this.videoTexture,overdraw:!0,side:Te});var l=[new Yt(0,.5),new Yt(.333,.5),new Yt(.333,1),new Yt(0,1)],u=[new Yt(.333,.5),new Yt(.666,.5),new Yt(.666,1),new Yt(.333,1)],c=[new Yt(.666,.5),new Yt(1,.5),new Yt(1,1),new Yt(.666,1)],h=[new Yt(0,0),new Yt(.333,0),new Yt(.333,.5),new Yt(0,.5)],d=[new Yt(.333,0),new Yt(.666,0),new Yt(.666,.5),new Yt(.333,.5)],p=[new Yt(.666,0),new Yt(1,0),new Yt(1,.5),new Yt(.666,.5)];this.movieGeometry.faceVertexUvs[0]=[],this.movieGeometry.faceVertexUvs[0][0]=[u[2],u[1],u[3]],this.movieGeometry.faceVertexUvs[0][1]=[u[1],u[0],u[3]],this.movieGeometry.faceVertexUvs[0][2]=[l[2],l[1],l[3]],this.movieGeometry.faceVertexUvs[0][3]=[l[1],l[0],l[3]],this.movieGeometry.faceVertexUvs[0][4]=[c[2],c[1],c[3]],this.movieGeometry.faceVertexUvs[0][5]=[c[1],c[0],c[3]],this.movieGeometry.faceVertexUvs[0][6]=[h[2],h[1],h[3]],this.movieGeometry.faceVertexUvs[0][7]=[h[1],h[0],h[3]],this.movieGeometry.faceVertexUvs[0][8]=[d[2],d[1],d[3]],this.movieGeometry.faceVertexUvs[0][9]=[d[1],d[0],d[3]],this.movieGeometry.faceVertexUvs[0][10]=[p[2],p[1],p[3]],this.movieGeometry.faceVertexUvs[0][11]=[p[1],p[0],p[3]],this.movieScreen=new Zr(this.movieGeometry,this.movieMaterial),this.movieScreen.position.set(A,x,E),this.movieScreen.rotation.y=-Math.PI,this.scene.add(this.movieScreen)}else if("180"===e){var f=new pl(256,32,32,Math.PI,Math.PI);f.scale(-1,1,1);for(var g=f.faceVertexUvs[0],m=0;m<g.length;m++)for(var v=0;v<3;v++)g[m][v].x*=.5;this.movieGeometry=(new Jn).fromGeometry(f),this.movieMaterial=new Qr({map:this.videoTexture,overdraw:!0}),this.movieScreen=new Zr(this.movieGeometry,this.movieMaterial),this.movieScreen.layers.set(1),this.scene.add(this.movieScreen),(f=ne
1w pl(256,32,32,Math.PI,Math.PI)).scale(-1,1,1),g=f.faceVertexUvs[0];for(var y=0;y<g.length;y++)for(var _=0;_<3;_++)g[y][_].x*=.5,g[y][_].x+=.5;this.movieGeometry=(new Jn).fromGeometry(f),this.movieMaterial=new Qr({map:this.videoTexture,overdraw:!0}),this.movieScreen=new Zr(this.movieGeometry,this.movieMaterial),this.movieScreen.layers.set(2),this.scene.add(this.movieScreen)}else if("EAC"===e||"EAC_LR"===e){var M=function(e,t){T.movieGeometry=new er(256,256,256),T.movieMaterial=new Vr({overdraw:!0,side:Te,uniforms:{mapped:{value:T.videoTexture},mapMatrix:{value:e},contCorrect:{value:2},faceWH:{value:new Yt(1/3,.5).applyMatrix3(t)},vidWH:{value:new Yt(T.videoTexture.image.videoWidth,T.videoTexture.image.videoHeight).applyMatrix3(t)}},vertexShader:"\nvarying vec2 vUv;\nuniform mat3 mapMatrix;\n\nvoid main() {\n vUv = (mapMatrix * vec3(uv, 1.)).xy;\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.);\n}",fragmentShader:"\nvarying vec2 vUv;\nuniform sampler2D mapped;\nuniform vec2 faceWH;\nuniform vec2 vidWH;\nuniform float contCorrect;\n\nconst float PI = 3.1415926535897932384626433832795;\n\nvoid main() {\n vec2 corner = vUv - mod(vUv, faceWH) + vec2(0, contCorrect / vidWH.y);\n\n vec2 faceWHadj = faceWH - vec2(0, contCorrect * 2. / vidWH.y);\n\n vec2 p = (vUv - corner) / faceWHadj - .5;\n vec2 q = 2. / PI * atan(2. * p) + .5;\n\n vec2 eUv = corner + q * faceWHadj;\n\n gl_FragColor = texture2D(mapped, eUv);\n}"});for(var i=[new Yt(0,.5),new Yt(1/3,.5),new Yt(1/3,1),new Yt(0,1)],n=[new Yt(1/3,.5),new Yt(2/3,.5),new Yt(2/3,1),new Yt(1/3,1)],r=[new Yt(2/3,.5),new Yt(1,.5),new Yt(1,1),new Yt(2/3,1)],a=[new Yt(1/3,0),new Yt(1/3,.5),new Yt(0,.5),new Yt(0,0)],s=[new Yt(1/3,.5),new Yt(1/3,0),new Yt(2/3,0),new Yt(2/3,.5)],o=[new Yt(1,0),new Yt(1,.5),new Yt(2/3,.5),new Yt(2/3,0)],l=0,u=[i,n,r,a,s,o];l<u.length;l++){var c=u[l],h=T.videoTexture.image.videoHeight,d=1,p=0,f=c,g=Array.isArray(f),m=0;for(f=g?f:f[Symbol.iterator]();;){var v;if(g){if(m>=f.length)break;v=f[m++]}else{if((m=f.next()).done)break;v=m.value}v.y<d&&(d=v.y),v.y>p&&(p=v.y)}var y=c,_=Array.isArray(y),M=0;for(y=_?y:y[Symbol.iterator]();;){var w;if(_){if(M>=y.length)break;w=y[M++]}else{if((M=y.next()).done)break;w=M.value}var b=w;Math.abs(b.y-d)<Number.EPSILON&&(b.y+=2/h),Math.abs(b.y-p)<Number.EPSILON&&(b.y-=2/h),b.x=b.x/h*(h-4)+2/h}}return T.movieGeometry.faceVertexUvs[0]=[],T.movieGeometry.faceVertexUvs[0][0]=[i[2],i[1],i[3]],T.movieGeometry.faceVertexUvs[0][1]=[i[1],i[0],i[3]],T.movieGeometry.faceVertexUvs[0][2]=[r[2],r[1],r[3]],T.movieGeometry.faceVertexUvs[0][3]=[r[1],r[0],r[3]],T.movieGeometry.faceVertexUvs[0][4]=[o[2],o[1],o[3]],T.movieGeometry.faceVertexUvs[0][5]=[o[1],o[0],o[3]],T.movieGeometry.faceVertexUvs[0][6]=[a[2],a[1],a[3]],T.movieGeometry.faceVertexUvs[0][7]=[a[1],a[0],a[3]],T.movieGeometry.faceVertexUvs[0][8]=[n[2],n[1],n[3]],T.movieGeometry.faceVertexUvs[0][9]=[n[1],n[0],n[3]],T.movieGeometry.faceVertexUvs[0][10]=[s[2],s[1],s[3]],T.movieGeometry.faceVertexUvs[0][11]=[s[1],s[0],s[3]],T.movieScreen=new Zr(T.movieGeometry,T.movieMaterial),T.movieScreen.position.set(A,x,E),T.movieScreen.rotation.y=-Math.PI,T.movieScreen};if("EAC"===e)this.scene.add(M(new qt,new qt));else{var w=(new qt).set(0,.5,0,1,0,0,0,0,1);M((new qt).set(0,-.5,.5,1,0,0,0,0,1),w),this.movieScreen.layers.set(1),this.scene.add(this.movieScreen),M((new qt).set(0,-.5,1,1,0,0,0,0,1),w),this.movieScreen.layers.set(2),this.scene.add(this.movieScreen)}}this.currentProjection_=e},t.triggerError_=function(e){if(this.videojsErrorsSupport_)this.player_.error(e);else{var t=n.createElement("div");t.innerHTML=rd[e.code].message;var i=t.textContent||t.innerText||"";this.player_.error({code:e.code,message:i})}},t.log=function(){if(this.options_.debug){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];t.forEach(function(e){o.log("VR: ",e)})}},t.handleVrDisplayActivate_=function(){var n=this;this.vrDisplay&&this.vrDisplay.requestPresent([{source:this.renderedCanvas}]).then(function(){if(n.vrDisplay.cardboardUI_&&o.browser.IS_IOS){var i=[],e=function(e){for(var t=0;t<e.touches.length;t++)i.push(e.touches[t])},t=function(){i.length&&(i.forEach(function(e){var t=new s.MouseEvent("click",{screenX:e.screenX,screenY:e.screenY,clientX:e.clientX,clientY:e.clientY});n.renderedCanvas.dispatchEvent(t)}),i=[])};n.renderedCanvas.addEventListener("touchstart",e),n.renderedCanvas.addEventListener("touchend",t),n.iosRevertTouchToClick_=function(){n.renderedCanvas.removeEventListener("touchstart",e),n.renderedCanvas.removeEventListener("touchend",t),n.iosRevertTouchToClick_=null}}})},t.handleVrDisplayDeactivate_=function(){this.vrDisplay&&this.vrDisplay.isPresenting&&(this.iosRevertTouchToClick_&&this.iosRevertTouchToClick_(),this.vrDisplay.exitPresent())},t.requestAnimationFrame=function(e){return this.vrDisplay?this.vrDisplay.requestAnimationFrame(e):this.player_.requestAnimationFrame(e)},t.cancelAnimationFrame=function(e){return this.vrDisplay?this.vrDisplay.cancelAnimationFrame(e):this.player_.cancelAnimationFrame(e)},t.togglePlay_=function(){this.player_.paused()?this.player_.play():this.player_.pause()},t.animate_=function(){if(this.initialized_){if(this.getVideoEl_().readyState===this.getVideoEl_().HAVE_ENOUGH_DATA&&this.videoTexture&&(this.videoTexture.needsUpdate=!0),this.controls3d.update(),this.omniController&&this.omniController.update(this.camera),this.effect.render(this.scene,this.camera),s.navigator.getGamepads)for(var e=s.navigator.getGamepads(),t=0;t<e.length;++t){var i=e[t];if(i&&i.timestamp&&i.timestamp!==this.prevTimestamps_[t])for(var n=0;n<i.buttons.length;++n)if(i.buttons[n].pressed){this.togglePlay_(),this.prevTimestamps_[t]=i.timestamp;break}}this.camera.getWorldDirection(this.cameraVector),this.animationFrameId_=this.requestAnimationFrame(this.animate_)}},t.handleResize_=function(){var e=this.player_.currentWidth(),t=this.player_.currentHeight();this.effect.setSize(e,t,!1),this.camera.aspect=e/t,this.camera.updateProjectionMatrix()},t.setProjection=function(e){qh(e)?(this.currentProjection_=e,this.defaultProjection_=e):o.log.error("videojs-vr: please pass a valid projection "+Kh.join(", "))},t.init=function(){var n=this;if(this.reset(),this.camera=new Ws(75,this.player_.currentWidth()/this.player_.currentHeight(),1,1e3),this.cameraVector=new Wt,"360_LR"!==this.currentProjection_&&"360_TB"!==this.currentProjection_&&"180"!==this.currentProjection_&&"EAC_LR"!==this.currentProjection_||this.camera.layers.enable(1),this.scene=new eo,this.videoTexture=new go(this.getVideoEl_()),this.videoTexture.generateMipmaps=!1,this.videoTexture.minFilter=Ge,this.videoTexture.magFilter=Ge,this.videoTexture.format=rt,this.changeProjection_(this.currentProjection_),"NONE"===this.currentProjection_)return this.log("Projection is NONE, dont init"),void this.reset();this.player_.removeChild("BigPlayButton"),this.player_.addChild("BigVrPlayButton",{},this.bigPlayButtonIndex_),this.player_.bigPlayButton=this.player_.getChild("BigVrPlayButton"),(this.options_.forceCardboard||o.browser.IS_ANDROID||o.browser.IS_IOS)&&this.addCardboardButton_(),o.browser.IS_IOS&&this.player_.controlBar.fullscreenToggle.hide(),this.camera.position.set(0,0,0),this.renderer=new $s({devicePixelRatio:s.devicePixelRatio,alpha:!1,clearColor:16777215,antialias:!0});var r=this.renderer.getContext("webgl"),a=r.texImage2D;r.texImage2D=function(){try{for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return a.apply(r,t)}catch(e){throw n.reset(),n.player_.pause(),n.triggerError_({code:"web-vr-hls-cors-not-supported",dismiss:!1}),new Error(e)}},this.renderer.setSize(this.player_.currentWidth(),this.player_.currentHeight(),!1),this.effect=new Qh(this.renderer),this.effect.setSize(this.player_.currentWidth(),this.player_.currentHeight(),!1),this.vrDisplay=null,this.prevTimestamps_=[],this.renderedCanvas=this.renderer.domElement,this.renderedCanvas.setAttribute("style","width: 100%; height: 100%; position: absolute; top:0;");var e=this.getVideoEl_().style;if(this.player_.el().insertBefore(this.renderedCanvas,this.player_.el().firstChild),e.zIndex="-1",e.opacity="0",s.navigator.getVRDisplays?(this.log("is supported, getting vr displays"),s.navigator.getVRDisplays().then(function(e){if(0<e.length&&(n.log("Displays found",e),n.vrDisplay=e[0],n.vrDisplay.isPolyfilled||(n.log("Real HMD found using VRControl
1s",n.vrDisplay),n.addCardboardButton_(),n.controls3d=new Yh(n.camera))),!n.controls3d){n.log("no HMD found Using Orbit & Orientation Controls");var t={camera:n.camera,canvas:n.renderedCanvas,halfView:"180"===n.currentProjection_,orientation:o.browser.IS_IOS||o.browser.IS_ANDROID||!1};!1===n.options_.motionControls&&(t.orientation=!1),n.controls3d=new Zh(t),n.canvasPlayerControls=new Jh(n.player_,n.renderedCanvas)}n.animationFrameId_=n.requestAnimationFrame(n.animate_)})):s.navigator.getVRDevices?this.triggerError_({code:"web-vr-out-of-date",dismiss:!1}):this.triggerError_({code:"web-vr-not-supported",dismiss:!1}),this.options_.omnitone){var t=yc();this.omniController=new ed(t,this.options_.omnitone,this.getVideoEl_(),this.options_.omnitoneOptions),this.omniController.one("audiocontext-suspended",function(){n.player.pause(),n.player.one("playing",function(){t.resume()})})}this.on(this.player_,"fullscreenchange",this.handleResize_),s.addEventListener("vrdisplaypresentchange",this.handleResize_,!0),s.addEventListener("resize",this.handleResize_,!0),s.addEventListener("vrdisplayactivate",this.handleVrDisplayActivate_,!0),s.addEventListener("vrdisplaydeactivate",this.handleVrDisplayDeactivate_,!0),this.initialized_=!0,this.trigger("initialized")},t.addCardboardButton_=function(){this.player_.controlBar.getChild("CardboardButton")||this.player_.controlBar.addChild("CardboardButton",{})},t.getVideoEl_=function(){return this.player_.el().getElementsByTagName("video")[0]},t.reset=function(){if(this.initialized_){this.omniController&&(this.omniController.off("audiocontext-suspended"),this.omniController.dispose(),this.omniController=void 0),this.controls3d&&(this.controls3d.dispose(),this.controls3d=null),this.canvasPlayerControls&&(this.canvasPlayerControls.dispose(),this.canvasPlayerControls=null),this.effect&&(this.effect.dispose(),this.effect=null),s.removeEventListener("resize",this.handleResize_,!0),s.removeEventListener("vrdisplaypresentchange",this.handleResize_,!0),s.removeEventListener("vrdisplayactivate",this.handleVrDisplayActivate_,!0),s.removeEventListener("vrdisplaydeactivate",this.handleVrDisplayDeactivate_,!0),this.player_.getChild("BigPlayButton")||this.player_.addChild("BigPlayButton",{},this.bigPlayButtonIndex_),this.player_.getChild("BigVrPlayButton")&&this.player_.removeChild("BigVrPlayButton"),this.player_.getChild("CardboardButton")&&this.player_.controlBar.removeChild("CardboardButton"),o.browser.IS_IOS&&this.player_.controlBar.fullscreenToggle.show();var e=this.getVideoEl_().style;e.zIndex="",e.opacity="",this.currentProjection_=this.defaultProjection_,this.iosRevertTouchToClick_&&this.iosRevertTouchToClick_(),this.renderedCanvas&&this.renderedCanvas.parentNode.removeChild(this.renderedCanvas),this.animationFrameId_&&this.cancelAnimationFrame(this.animationFrameId_),this.initialized_=!1}},t.dispose=function(){r.prototype.dispose.call(this),this.reset()},t.polyfillVersion=function(){return l.version},e}(ad);return od.prototype.setTimeout=sd.prototype.setTimeout,od.prototype.clearTimeout=sd.prototype.clearTimeout,od.VERSION="1.7.1",o.registerPlugin("vr",od),od});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.