!function(e){"use strict";var t={i18n:{ru:{months:["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],dayOfWeek:["Вск","Пн","Вт","Ср","Чт","Пт","Сб"]},en:{months:["January","February","March","April","May","June","July","August","September","October","November","December"],dayOfWeek:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},de:{months:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],dayOfWeek:["So","Mo","Di","Mi","Do","Fr","Sa"]},nl:{months:["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december"],dayOfWeek:["zo","ma","di","wo","do","vr","za"]},tr:{months:["Ocak","Şubat","Mart","Nisan","Mayıs","Haziran","Temmuz","Ağustos","Eylül","Ekim","Kasım","Aralık"],dayOfWeek:["Paz","Pts","Sal","Çar","Per","Cum","Cts"]},fr:{months:["Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Décembre"],dayOfWeek:["Dim","Lun","Mar","Mer","Jeu","Ven","Sam"]},es:{months:["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"],dayOfWeek:["Dom","Lun","Mar","Mié","Jue","Vie","Sáb"]},th:{months:["มกราคม","กุมภาพันธ์","มีนาคม","เมษายน","พฤษภาคม","มิถุนายน","กรกฎาคม","สิงหาคม","กันยายน","ตุลาคม","พฤศจิกายน","ธันวาคม"],dayOfWeek:["อา.","จ.","อ.","พ.","พฤ.","ศ.","ส."]},pl:{months:["styczeń","luty","marzec","kwiecień","maj","czerwiec","lipiec","sierpień","wrzesień","październik","listopad","grudzień"],dayOfWeek:["nd","pn","wt","śr","cz","pt","sb"]},pt:{months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],dayOfWeek:["Dom","Seg","Ter","Qua","Qui","Sex","Sab"]},ch:{months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],dayOfWeek:["日","一","二","三","四","五","六"]},se:{months:["Januari","Februari","Mars","April","Maj","Juni","Juli","Augusti","September","Oktober","November","December"],dayOfWeek:["Sön","Mån","Tis","Ons","Tor","Fre","Lör"]},kr:{months:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],dayOfWeek:["일","월","화","수","목","금","토"]},it:{months:["Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre"],dayOfWeek:["Dom","Lun","Mar","Mer","Gio","Ven","Sab"]},da:{months:["January","Februar","Marts","April","Maj","Juni","July","August","September","Oktober","November","December"],dayOfWeek:["Søn","Man","Tir","ons","Tor","Fre","lør"]},ja:{months:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["日","月","火","水","木","金","土"]},vi:{months:["Tháng 1","Tháng 2","Tháng 3","Tháng 4","Tháng 5","Tháng 6","Tháng 7","Tháng 8","Tháng 9","Tháng 10","Tháng 11","Tháng 12"],dayOfWeek:["CN","T2","T3","T4","T5","T6","T7"]}},value:"",lang:"en",format:"Y/m/d H:i",formatTime:"H:i",formatDate:"Y/m/d",startDate:!1,step:60,closeOnDateSelect:!1,closeOnWithoutClick:!0,timepicker:!0,datepicker:!0,minDate:!1,maxDate:!1,minTime:!1,maxTime:!1,allowTimes:[],opened:!1,initTime:!0,inline:!1,onSelectDate:function(){},onSelectTime:function(){},onChangeMonth:function(){},onChangeDateTime:function(){},onShow:function(){},onClose:function(){},onGenerate:function(){},withoutCopyright:!0,inverseButton:!1,hours12:!1,next:"xdsoft_next",prev:"xdsoft_prev",dayOfWeekStart:0,timeHeightInTimePicker:25,timepickerScrollbar:!0,todayButton:!0,defaultSelect:!0,scrollMonth:!0,scrollTime:!0,scrollInput:!0,lazyInit:!1,mask:!1,validateOnBlur:!0,allowBlank:!0,yearStart:1950,yearEnd:2050,style:"",id:"",roundTime:"round",className:"",weekends:[],yearOffset:0};Array.prototype.indexOf||(Array.prototype.indexOf=function(e,t){for(var n=t||0,a=this.length;n<a;n++)if(this[n]===e)return n;return-1}),e.fn.xdsoftScroller=function(t){return this.each(function(){var n=e(this);if(!e(this).hasClass("xdsoft_scroller_box")){var a=function(e){var t={x:0,y:0};if("touchstart"==e.type||"touchmove"==e.type||"touchend"==e.type||"touchcancel"==e.type){var n=e.originalEvent.touches[0]||e.originalEvent.changedTouches[0];t.x=n.pageX,t.y=n.pageY}else"mousedown"!=e.type&&"mouseup"!=e.type&&"mousemove"!=e.type&&"mouseover"!=e.type&&"mouseout"!=e.type&&"mouseenter"!=e.type&&"mouseleave"!=e.type||(t.x=e.pageX,t.y=e.pageY);return t},r=0,o=n.children().eq(0),s=n[0].clientHeight,i=o[0].offsetHeight,d=e('<div class="xdsoft_scrollbar"></div>'),u=e('<div class="xdsoft_scroller"></div>'),c=100,l=!1;d.append(u),n.addClass("xdsoft_scroller_box").append(d),u.on("mousedown.xdsoft_scroller",function(a){s||n.trigger("resize_scroll.xdsoft_scroller",[t]);var o=a.pageY,i=parseInt(u.css("margin-top")),l=d[0].offsetHeight;e(document.body).addClass("xdsoft_noselect"),e([document.body,window]).on("mouseup.xdsoft_scroller",function f(){e([document.body,window]).off("mouseup.xdsoft_scroller",f).off("mousemove.xdsoft_scroller",r).removeClass("xdsoft_noselect")}),e(document.body).on("mousemove.xdsoft_scroller",r=function(e){var t=e.pageY-o+i;t<0&&(t=0),t+u[0].offsetHeight>l&&(t=l-u[0].offsetHeight),n.trigger("scroll_element.xdsoft_scroller",[c?t/c:0])})}),n.on("scroll_element.xdsoft_scroller",function(e,t){s||n.trigger("resize_scroll.xdsoft_scroller",[t,!0]),t=t>1?1:t<0||isNaN(t)?0:t,u.css("margin-top",c*t),o.css("marginTop",-parseInt((i-s)*t))}).on("resize_scroll.xdsoft_scroller",function(e,t,a){s=n[0].clientHeight,i=o[0].offsetHeight;var r=s/i,l=r*d[0].offsetHeight;r>1?u.hide():(u.show(),u.css("height",parseInt(l>10?l:10)),c=d[0].offsetHeight-u[0].offsetHeight,a!==!0&&n.trigger("scroll_element.xdsoft_scroller",[t?t:Math.abs(parseInt(o.css("marginTop")))/(i-s)]))}),n.mousewheel&&n.mousewheel(function(e,t,a,r){var d=Math.abs(parseInt(o.css("marginTop")));return n.trigger("scroll_element.xdsoft_scroller",[(d-20*t)/(i-s)]),e.stopPropagation(),!1}),n.on("touchstart",function(e){l=a(e)}),n.on("touchmove",function(e){if(l){var t=a(e),r=Math.abs(parseInt(o.css("marginTop")));n.trigger("scroll_element.xdsoft_scroller",[(r-(t.y-l.y))/(i-s)]),e.stopPropagation(),e.preventDefault()}}),n.on("touchend touchcancel",function(e){l=!1})}n.trigger("resize_scroll.xdsoft_scroller",[t])})},e.fn.datetimepicker=function(n){var a=48,r=57,o=96,s=105,i=17,d=46,u=13,c=27,l=8,f=37,m=38,h=39,g=40,p=9,x=116,v=65,y=67,D=86,T=90,w=89,b=!1,_=e.isPlainObject(n)||!n?e.extend(!0,{},t,n):e.extend({},t),M=0,k=function(e){e.on("open.xdsoft focusin.xdsoft mousedown.xdsoft",function t(n){e.is(":disabled")||e.is(":hidden")||!e.is(":visible")||e.data("xdsoft_datetimepicker")||(clearTimeout(M),M=setTimeout(function(){e.data("xdsoft_datetimepicker")||S(e),e.off("open.xdsoft focusin.xdsoft mousedown.xdsoft",t).trigger("open.xdsoft")},100))})},S=function(t){function n(){var e=_.value?_.value:t&&t.val&&t.val()?t.val():"";return e&&W.isValidDate(e=Date.parseDate(e,_.format))?M.data("changed",!0):e="",e||_.startDate===!1||(e=W.strToDateTime(_.startDate)),e?e:0}var M=e("<div "+(_.id?'id="'+_.id+'"':"")+" "+(_.style?'style="'+_.style+'"':"")+' class="xdsoft_datetimepicker xdsoft_noselect '+_.className+'"></div>'),k=e('<div class="xdsoft_copyright"><a target="_blank" href="http://xdsoft.net/jqplugins/datetimepicker/">xdsoft.net</a></div>'),S=e('<div class="xdsoft_datepicker active"></div>'),O=e('<div class="xdsoft_mounthpicker"><button type="button" class="xdsoft_prev"></button><button type="button" class="xdsoft_today_button"></button><div class="xdsoft_label xdsoft_month"><span></span></div><div class="xdsoft_label xdsoft_year"><span></span></div><button type="button" class="xdsoft_next"></button></div>'),F=e('<div class="xdsoft_calendar"></div>'),I=e('<div class="xdsoft_timepicker active"><button type="button" class="xdsoft_prev"></button><div class="xdsoft_time_box"></div><button type="button" class="xdsoft_next"></button></div>'),C=I.find(".xdsoft_time_box").eq(0),H=e('<div class="xdsoft_time_variant"></div>'),Y=e('<div class="xdsoft_scrollbar"></div>'),P=(e('<div class="xdsoft_scroller"></div>'),e('<div class="xdsoft_select xdsoft_monthselect"><div></div></div>')),A=e('<div class="xdsoft_select xdsoft_yearselect"><div></div></div>');O.find(".xdsoft_month span").after(P),O.find(".xdsoft_year span").after(A),O.find(".xdsoft_month,.xdsoft_year").on("mousedown.xdsoft",function(t){O.find(".xdsoft_select").hide();var n=e(this).find(".xdsoft_select").eq(0),a=0,r=0;W.currentTime&&(a=W.currentTime[e(this).hasClass("xdsoft_month")?"getMonth":"getFullYear"]()),n.show();for(var o=n.find("div.xdsoft_option"),s=0;s<o.length&&o.eq(s).data("value")!=a;s++)r+=o[0].offsetHeight;return n.xdsoftScroller(r/(n.children()[0].offsetHeight-n[0].clientHeight)),t.stopPropagation(),!1}),O.find(".xdsoft_select").xdsoftScroller().on("mousedown.xdsoft",function(e){e.stopPropagation(),e.preventDefault()}).on("mousedown.xdsoft",".xdsoft_option",function(t){W&&W.currentTime&&W.currentTime[e(this).parent().parent().hasClass("xdsoft_monthselect")?"setMonth":"setFullYear"](e(this).data("value")),e(this).parent().parent().hide(),M.trigger("xchange.xdsoft"),_.onChangeMonth&&_.onChangeMonth.call&&_.onChangeMonth.call(M,W.currentTime,M.data("input"))}),M.setOptions=function(n){if(_=e.extend(!0,{},_,n),n.allowTimes&&e.isArray(n.allowTimes)&&n.allowTimes.length&&(_.allowTimes=e.extend(!0,[],n.allowTimes)),n.weekends&&e.isArray(n.weekends)&&n.weekends.length&&(_.weekends=e.extend(!0,[],n.weekends)),!_.open&&!_.opened||_.inline||t.trigger("open.xdsoft"),_.inline&&(M.addClass("xdsoft_inline"),t.after(M).hide(),M.trigger("afterOpen.xdsoft")),_.inverseButton&&(_.next="xdsoft_prev",_.prev="xdsoft_next"),_.datepicker?S.addClass("active"):S.removeClass("active"),_.timepicker?I.addClass("active"):I.removeClass("active"),_.value&&(t&&t.val&&t.val(_.value),W.setCurrentTime(_.value)),isNaN(_.dayOfWeekStart)||parseInt(_.dayOfWeekStart)<0||parseInt(_.dayOfWeekStart)>6?_.dayOfWeekStart=0:_.dayOfWeekStart=parseInt(_.dayOfWeekStart),_.timepickerScrollbar||Y.hide(),_.minDate&&/^-(.*)$/.test(_.minDate)&&(_.minDate=W.strToDateTime(_.minDate).dateFormat(_.formatDate)),_.maxDate&&/^\+(.*)$/.test(_.maxDate)&&(_.maxDate=W.strToDateTime(_.maxDate).dateFormat(_.formatDate)),O.find(".xdsoft_today_button").css("visibility",_.todayButton?"visible":"hidden"),_.mask){var k=function(e){try{if(document.selection&&document.selection.createRange){var t=document.selection.createRange();return t.getBookmark().charCodeAt(2)-2}if(e.setSelectionRange)return e.selectionStart}catch(n){return 0}},F=function(e,t){var e="string"==typeof e||e instanceof String?document.getElementById(e):e;if(!e)return!1;if(e.createTextRange){var n=e.createTextRange();return n.collapse(!0),n.moveEnd(t),n.moveStart(t),n.select(),!0}return!!e.setSelectionRange&&(e.setSelectionRange(t,t),!0)},C=function(e,t){var n=e.replace(/([\[\]\/\{\}\(\)\-\.\+]{1})/g,"\\$1").replace(/_/g,"{digit+}").replace(/([0-9]{1})/g,"{digit$1}").replace(/\{digit([0-9]{1})\}/g,"[0-$1_]{1}").replace(/\{digit[\+]\}/g,"[0-9_]{1}");return RegExp(n).test(t)};switch(t.off("keydown.xdsoft"),!0){case _.mask===!0:_.mask=_.format.replace(/Y/g,"9999").replace(/F/g,"9999").replace(/m/g,"19").replace(/d/g,"39").replace(/H/g,"29").replace(/i/g,"59").replace(/s/g,"59");case"string"==e.type(_.mask):C(_.mask,t.val())||t.val(_.mask.replace(/[0-9]/g,"_")),t.on("keydown.xdsoft",function(n){var M=this.value,S=n.which;switch(!0){case S>=a&&S<=r||S>=o&&S<=s||S==l||S==d:var O=k(this),I=S!=l&&S!=d?String.fromCharCode(o<=S&&S<=s?S-a:S):"_";for(S!=l&&S!=d||!O||(O--,I="_");/[^0-9_]/.test(_.mask.substr(O,1))&&O<_.mask.length&&O>0;)O+=S==l||S==d?-1:1;if(M=M.substr(0,O)+I+M.substr(O+1),""==e.trim(M))M=_.mask.replace(/[0-9]/g,"_");else if(O==_.mask.length)break;for(O+=S==l||S==d?0:1;/[^0-9_]/.test(_.mask.substr(O,1))&&O<_.mask.length&&O>0;)O+=S==l||S==d?-1:1;C(_.mask,M)?(this.value=M,F(this,O)):""==e.trim(M)?this.value=_.mask.replace(/[0-9]/g,"_"):t.trigger("error_input.xdsoft");break;case!!~[v,y,D,T,w].indexOf(S)&&b:case!!~[c,m,g,f,h,x,i,p,u].indexOf(S):return!0}return n.preventDefault(),!1})}}_.validateOnBlur&&t.off("blur.xdsoft").on("blur.xdsoft",function(){_.allowBlank&&!e.trim(e(this).val()).length?(e(this).val(null),M.data("xdsoft_datetime").empty()):Date.parseDate(e(this).val(),_.format)?M.data("xdsoft_datetime").setCurrentTime(e(this).val()):(e(this).val(W.now().dateFormat(_.format)),M.data("xdsoft_datetime").setCurrentTime(e(this).val())),M.trigger("changedatetime.xdsoft")}),_.dayOfWeekStartPrev=0==_.dayOfWeekStart?6:_.dayOfWeekStart-1,M.trigger("xchange.xdsoft")},M.data("options",_).on("mousedown.xdsoft",function(e){return e.stopPropagation(),e.preventDefault(),A.hide(),P.hide(),!1});var N=I.find(".xdsoft_time_box");N.append(H),N.xdsoftScroller(),M.on("afterOpen.xdsoft",function(){N.xdsoftScroller()}),M.append(S).append(I),_.withoutCopyright!==!0&&M.append(k),S.append(O).append(F),e("body").append(M);var W=new function(){var e=this;e.now=function(){var e=new Date;return _.yearOffset&&e.setFullYear(e.getFullYear()+_.yearOffset),e},e.currentTime=this.now(),e.isValidDate=function(e){return"[object Date]"===Object.prototype.toString.call(e)&&!isNaN(e.getTime())},e.setCurrentTime=function(t){e.currentTime="string"==typeof t?e.strToDateTime(t):e.isValidDate(t)?t:e.now(),M.trigger("xchange.xdsoft")},e.empty=function(){e.currentTime=null},e.getCurrentTime=function(t){return e.currentTime},e.nextMonth=function(){var t=e.currentTime.getMonth()+1;return 12==t&&(e.currentTime.setFullYear(e.currentTime.getFullYear()+1),t=0),e.currentTime.setDate(Math.min(Date.daysInMonth[t],e.currentTime.getDate())),e.currentTime.setMonth(t),_.onChangeMonth&&_.onChangeMonth.call&&_.onChangeMonth.call(M,W.currentTime,M.data("input")),M.trigger("xchange.xdsoft"),t},e.prevMonth=function(){var t=e.currentTime.getMonth()-1;return t==-1&&(e.currentTime.setFullYear(e.currentTime.getFullYear()-1),t=11),e.currentTime.setDate(Math.min(Date.daysInMonth[t],e.currentTime.getDate())),e.currentTime.setMonth(t),_.onChangeMonth&&_.onChangeMonth.call&&_.onChangeMonth.call(M,W.currentTime,M.data("input")),M.trigger("xchange.xdsoft"),t},e.strToDateTime=function(t){var n,a,r=[];return(r=/^(\+|\-)(.*)$/.exec(t))&&(r[2]=Date.parseDate(r[2],_.formatDate))?(n=r[2].getTime()-1*r[2].getTimezoneOffset()*6e4,a=new Date(W.now().getTime()+parseInt(r[1]+"1")*n)):a=t?Date.parseDate(t,_.format):e.now(),e.isValidDate(a)||(a=e.now()),a},e.strtodate=function(t){var n=t?Date.parseDate(t,_.formatDate):e.now();return e.isValidDate(n)||(n=e.now()),n},e.strtotime=function(t){var n=t?Date.parseDate(t,_.formatTime):e.now();return e.isValidDate(n)||(n=e.now()),n},e.str=function(){return e.currentTime.dateFormat(_.format)}};O.find(".xdsoft_today_button").on("mousedown.xdsoft",function(){M.data("changed",!0),W.setCurrentTime(0),M.trigger("afterOpen.xdsoft")}).on("dblclick.xdsoft",function(){t.val(W.str()),M.trigger("close.xdsoft")}),O.find(".xdsoft_prev,.xdsoft_next").on("mousedown.xdsoft",function(){var t=e(this),n=0,a=!1;!function r(e){W.currentTime.getMonth();t.hasClass(_.next)?W.nextMonth():t.hasClass(_.prev)&&W.prevMonth(),!a&&(n=setTimeout(r,e?e:100))}(500),e([document.body,window]).on("mouseup.xdsoft",function o(){clearTimeout(n),a=!0,e([document.body,window]).off("mouseup.xdsoft",o)})}),I.find(".xdsoft_prev,.xdsoft_next").on("mousedown.xdsoft",function(){var t=e(this),n=0,a=!1,r=110;!function o(e){var s=C[0].clientHeight,i=H[0].offsetHeight,d=Math.abs(parseInt(H.css("marginTop")));t.hasClass(_.next)&&i-s-_.timeHeightInTimePicker>=d?H.css("marginTop","-"+(d+_.timeHeightInTimePicker)+"px"):t.hasClass(_.prev)&&d-_.timeHeightInTimePicker>=0&&H.css("marginTop","-"+(d-_.timeHeightInTimePicker)+"px"),C.trigger("scroll_element.xdsoft_scroller",[Math.abs(parseInt(H.css("marginTop"))/(i-s))]),r=r>10?10:r-10,!a&&(n=setTimeout(o,e?e:r))}(500),e([document.body,window]).on("mouseup.xdsoft",function s(){clearTimeout(n),a=!0,e([document.body,window]).off("mouseup.xdsoft",s)})});var z=0;M.on("xchange.xdsoft",function(t){clearTimeout(z),z=setTimeout(function(){for(var t="",n=new Date(W.currentTime.getFullYear(),W.currentTime.getMonth(),1,12,0,0),a=0,r=W.now();n.getDay()!=_.dayOfWeekStart;)n.setDate(n.getDate()-1);t+="<table><thead><tr>";for(var o=0;o<7;o++)t+="<th>"+_.i18n[_.lang].dayOfWeek[o+_.dayOfWeekStart>6?0:o+_.dayOfWeekStart]+"</th>";t+="</tr></thead>",t+="<tbody><tr>";var s=!1,i=!1;_.maxDate!==!1&&(s=W.strtodate(_.maxDate),s=new Date(s.getFullYear(),s.getMonth(),s.getDate(),23,59,59,999)),_.minDate!==!1&&(i=W.strtodate(_.minDate),i=new Date(i.getFullYear(),i.getMonth(),i.getDate()));for(var d,u,c,l=[];a<W.currentTime.getDaysInMonth()||n.getDay()!=_.dayOfWeekStart||W.currentTime.getMonth()==n.getMonth();)l=[],a++,d=n.getDate(),u=n.getFullYear(),c=n.getMonth(),l.push("xdsoft_date"),(s!==!1&&n>s||i!==!1&&n<i)&&l.push("xdsoft_disabled"),W.currentTime.getMonth()!=c&&l.push("xdsoft_other_month"),(_.defaultSelect||M.data("changed"))&&W.currentTime.dateFormat("d.m.Y")==n.dateFormat("d.m.Y")&&l.push("xdsoft_current"),r.dateFormat("d.m.Y")==n.dateFormat("d.m.Y")&&l.push("xdsoft_today"),(0==n.getDay()||6==n.getDay()||~_.weekends.indexOf(n.dateFormat("d.m.Y")))&&l.push("xdsoft_weekend"),_.beforeShowDay&&"function"==typeof _.beforeShowDay&&l.push(_.beforeShowDay(n)),t+='<td data-date="'+d+'" data-month="'+c+'" data-year="'+u+'" class="xdsoft_date xdsoft_day_of_week'+n.getDay()+" "+l.join(" ")+'"><div>'+d+"</div></td>",n.getDay()==_.dayOfWeekStartPrev&&(t+="</tr>"),n.setDate(d+1);t+="</tbody></table>",F.html(t),O.find(".xdsoft_label span").eq(0).text(_.i18n[_.lang].months[W.currentTime.getMonth()]),O.find(".xdsoft_label span").eq(1).text(W.currentTime.getFullYear());var f="",m="",c="",h=function(e,t){var n=W.now();n.setHours(e),e=parseInt(n.getHours()),n.setMinutes(t),t=parseInt(n.getMinutes()),l=[],(_.maxTime!==!1&&W.strtotime(_.maxTime).getTime()<n.getTime()||_.minTime!==!1&&W.strtotime(_.minTime).getTime()>n.getTime())&&l.push("xdsoft_disabled"),(_.initTime||_.defaultSelect||M.data("changed"))&&parseInt(W.currentTime.getHours())==parseInt(e)&&(_.step>59||Math[_.roundTime](W.currentTime.getMinutes()/_.step)*_.step==parseInt(t))&&(_.defaultSelect||M.data("changed")?l.push("xdsoft_current"):_.initTime&&l.push("xdsoft_init_time")),parseInt(r.getHours())==parseInt(e)&&parseInt(r.getMinutes())==parseInt(t)&&l.push("xdsoft_today"),f+='<div class="xdsoft_time '+l.join(" ")+'" data-hour="'+e+'" data-minute="'+t+'">'+n.dateFormat(_.formatTime)+"</div>"};if(_.allowTimes&&e.isArray(_.allowTimes)&&_.allowTimes.length)for(var a=0;a<_.allowTimes.length;a++)m=W.strtotime(_.allowTimes[a]).getHours(),c=W.strtotime(_.allowTimes[a]).getMinutes(),h(m,c);else for(var a=0,o=0;a<(_.hours12?12:24);a++)for(o=0;o<60;o+=_.step)m=(a<10?"0":"")+a,c=(o<10?"0":"")+o,h(m,c);H.html(f);var g="",a=0;for(a=parseInt(_.yearStart,10)+_.yearOffset;a<=parseInt(_.yearEnd,10)+_.yearOffset;a++)g+='<div class="xdsoft_option '+(W.currentTime.getFullYear()==a?"xdsoft_current":"")+'" data-value="'+a+'">'+a+"</div>";for(A.children().eq(0).html(g),a=0,g="";a<=11;a++)g+='<div class="xdsoft_option '+(W.currentTime.getMonth()==a?"xdsoft_current":"")+'" data-value="'+a+'">'+_.i18n[_.lang].months[a]+"</div>";P.children().eq(0).html(g),e(this).trigger("generate.xdsoft")},10),t.stopPropagation()}).on("afterOpen.xdsoft",function(){if(_.timepicker){var e;if(H.find(".xdsoft_current").length?e=".xdsoft_current":H.find(".xdsoft_init_time").length&&(e=".xdsoft_init_time"),e){var t=C[0].clientHeight,n=H[0].offsetHeight,a=H.find(e).index()*_.timeHeightInTimePicker+1;n-t<a&&(a=n-t),H.css("marginTop","-"+parseInt(a)+"px"),C.trigger("scroll_element.xdsoft_scroller",[parseInt(a)/(n-t)])}}});var J=0;F.on("click.xdsoft","td",function(n){n.stopPropagation(),J++;var a=e(this),r=W.currentTime;return!a.hasClass("xdsoft_disabled")&&(r.setDate(a.data("date")),r.setMonth(a.data("month")),r.setFullYear(a.data("year")),M.trigger("select.xdsoft",[r]),t.val(W.str()),(J>1||_.closeOnDateSelect===!0||0===_.closeOnDateSelect&&!_.timepicker)&&!_.inline&&M.trigger("close.xdsoft"),_.onSelectDate&&_.onSelectDate.call&&_.onSelectDate.call(M,W.currentTime,M.data("input")),M.data("changed",!0),M.trigger("xchange.xdsoft"),M.trigger("changedatetime.xdsoft"),void setTimeout(function(){J=0},200))}),H.on("click.xdsoft","div",function(t){t.stopPropagation();var n=e(this),a=W.currentTime;return!n.hasClass("xdsoft_disabled")&&(a.setHours(n.data("hour")),a.setMinutes(n.data("minute")),M.trigger("select.xdsoft",[a]),M.data("input").val(W.str()),!_.inline&&M.trigger("close.xdsoft"),_.onSelectTime&&_.onSelectTime.call&&_.onSelectTime.call(M,W.currentTime,M.data("input")),M.data("changed",!0),M.trigger("xchange.xdsoft"),void M.trigger("changedatetime.xdsoft"))}),M.mousewheel&&S.mousewheel(function(e,t,n,a){return!_.scrollMonth||(t<0?W.nextMonth():W.prevMonth(),!1)}),M.mousewheel&&C.unmousewheel().mousewheel(function(e,t,n,a){if(!_.scrollTime)return!0;var r=C[0].clientHeight,o=H[0].offsetHeight,s=Math.abs(parseInt(H.css("marginTop"))),i=!0;return t<0&&o-r-_.timeHeightInTimePicker>=s?(H.css("marginTop","-"+(s+_.timeHeightInTimePicker)+"px"),i=!1):t>0&&s-_.timeHeightInTimePicker>=0&&(H.css("marginTop","-"+(s-_.timeHeightInTimePicker)+"px"),i=!1),C.trigger("scroll_element.xdsoft_scroller",[Math.abs(parseInt(H.css("marginTop"))/(o-r))]),e.stopPropagation(),i}),M.on("changedatetime.xdsoft",function(){if(_.onChangeDateTime&&_.onChangeDateTime.call){var e=M.data("input");_.onChangeDateTime.call(M,W.currentTime,e),e.trigger("change")}}).on("generate.xdsoft",function(){_.onGenerate&&_.onGenerate.call&&_.onGenerate.call(M,W.currentTime,M.data("input"))});var j=0;t.mousewheel&&t.mousewheel(function(e,n,a,r){return!_.scrollInput||(!_.datepicker&&_.timepicker?(j=H.find(".xdsoft_current").length?H.find(".xdsoft_current").eq(0).index():0,j+n>=0&&j+n<H.children().length&&(j+=n),H.children().eq(j).length&&H.children().eq(j).trigger("mousedown"),!1):_.datepicker&&!_.timepicker?(S.trigger(e,[n,a,r]),t.val&&t.val(W.str()),M.trigger("changedatetime.xdsoft"),!1):void 0)});var L=function(){var t=M.data("input").offset(),n=t.top+M.data("input")[0].offsetHeight-1,a=t.left;n+M[0].offsetHeight>e(window).height()+e(window).scrollTop()&&(n=t.top-M[0].offsetHeight+1),n<0&&(n=0),a+M[0].offsetWidth>e(window).width()&&(a=t.left-M[0].offsetWidth+M.data("input")[0].offsetWidth),M.css({left:a,top:n})};M.on("open.xdsoft",function(){var t=!0;_.onShow&&_.onShow.call&&(t=_.onShow.call(M,W.currentTime,M.data("input"))),t!==!1&&(M.show(),M.trigger("afterOpen.xdsoft"),L(),e(window).off("resize.xdsoft",L).on("resize.xdsoft",L),_.closeOnWithoutClick&&e([document.body,window]).on("mousedown.xdsoft",function n(){M.trigger("close.xdsoft"),e([document.body,window]).off("mousedown.xdsoft",n)}))}).on("close.xdsoft",function(e){var t=!0;_.onClose&&_.onClose.call&&(t=_.onClose.call(M,W.currentTime,M.data("input"))),t===!1||_.opened||_.inline||M.hide(),e.stopPropagation()}).data("input",t);var E=0;M.data("xdsoft_datetime",W),M.setOptions(_),W.setCurrentTime(n()),M.trigger("afterOpen.xdsoft"),t.data("xdsoft_datetimepicker",M).on("open.xdsoft focusin.xdsoft mousedown.xdsoft",function(e){t.is(":disabled")||t.is(":hidden")||!t.is(":visible")||(clearTimeout(E),E=setTimeout(function(){t.is(":disabled")||t.is(":hidden")||!t.is(":visible")||(W.setCurrentTime(n()),M.trigger("open.xdsoft"))},100))}).on("keydown.xdsoft",function(t){var n=(this.value,t.which);switch(!0){case!!~[u].indexOf(n):var a=e("input:visible,textarea:visible");return M.trigger("close.xdsoft"),a.eq(a.index(this)+1).focus(),!1;case!!~[p].indexOf(n):return M.trigger("close.xdsoft"),!0}})},O=function(t){var n=t.data("xdsoft_datetimepicker");n&&(n.data("xdsoft_datetime",null),n.remove(),t.data("xdsoft_datetimepicker",null).off("open.xdsoft focusin.xdsoft focusout.xdsoft mousedown.xdsoft blur.xdsoft keydown.xdsoft"),e(window).off("resize.xdsoft"),e([window,document.body]).off("mousedown.xdsoft"),t.unmousewheel&&t.unmousewheel())};return e(document).off("keydown.xdsoftctrl keyup.xdsoftctrl").on("keydown.xdsoftctrl",function(e){e.keyCode==i&&(b=!0)}).on("keyup.xdsoftctrl",function(e){e.keyCode==i&&(b=!1)}),this.each(function(){var t;if(t=e(this).data("xdsoft_datetimepicker")){if("string"===e.type(n))switch(n){case"show":e(this).select().focus(),t.trigger("open.xdsoft");break;case"hide":t.trigger("close.xdsoft");break;case"destroy":O(e(this));break;case"reset":this.value=this.defaultValue,this.value&&t.data("xdsoft_datetime").isValidDate(Date.parseDate(this.value,_.format))||t.data("changed",!1),t.data("xdsoft_datetime").setCurrentTime(this.value)}else t.setOptions(n);return 0}"string"!==e.type(n)&&(!_.lazyInit||_.open||_.inline?S(e(this)):k(e(this)))})}}(jQuery),Date.parseFunctions={count:0},Date.parseRegexes=[],Date.formatFunctions={count:0},Date.prototype.dateFormat=function(e){if("unixtime"==e)return parseInt(this.getTime()/1e3);null==Date.formatFunctions[e]&&Date.createNewFormat(e);var t=Date.formatFunctions[e];return this[t]()},Date.createNewFormat=function(format){var funcName="format"+Date.formatFunctions.count++;Date.formatFunctions[format]=funcName;for(var code="Date.prototype."+funcName+" = function() {return ",special=!1,ch="",i=0;i<format.length;++i)ch=format.charAt(i),special||"\\"!=ch?special?(special=!1,code+="'"+String.escape(ch)+"' + "):code+=Date.getFormatCode(ch):special=!0;eval(code.substring(0,code.length-3)+";}")},Date.getFormatCode=function(e){switch(e){case"d":return"String.leftPad(this.getDate(), 2, '0') + ";case"D":return"Date.dayNames[this.getDay()].substring(0, 3) + ";case"j":return"this.getDate() + ";case"l":return"Date.dayNames[this.getDay()] + ";case"S":return"this.getSuffix() + ";case"w":return"this.getDay() + ";case"z":return"this.getDayOfYear() + ";case"W":return"this.getWeekOfYear() + ";case"F":return"Date.monthNames[this.getMonth()] + ";case"m":return"String.leftPad(this.getMonth() + 1, 2, '0') + ";case"M":return"Date.monthNames[this.getMonth()].substring(0, 3) + ";case"n":return"(this.getMonth() + 1) + ";case"t":return"this.getDaysInMonth() + ";case"L":return"(this.isLeapYear() ? 1 : 0) + ";case"Y":return"this.getFullYear() + ";case"y":return"('' + this.getFullYear()).substring(2, 4) + ";case"a":return"(this.getHours() < 12 ? 'am' : 'pm') + ";case"A":return"(this.getHours() < 12 ? 'AM' : 'PM') + ";case"g":return"((this.getHours() %12) ? this.getHours() % 12 : 12) + ";case"G":return"this.getHours() + ";case"h":return"String.leftPad((this.getHours() %12) ? this.getHours() % 12 : 12, 2, '0') + ";case"H":return"String.leftPad(this.getHours(), 2, '0') + ";case"i":return"String.leftPad(this.getMinutes(), 2, '0') + ";case"s":return"String.leftPad(this.getSeconds(), 2, '0') + ";case"O":return"this.getGMTOffset() + ";case"T":return"this.getTimezone() + ";case"Z":return"(this.getTimezoneOffset() * -60) + ";default:return"'"+String.escape(e)+"' + "}},Date.parseDate=function(e,t){if("unixtime"==t)return new Date(isNaN(parseInt(e))?0:1e3*parseInt(e));null==Date.parseFunctions[t]&&Date.createParser(t);var n=Date.parseFunctions[t];return Date[n](e)},Date.createParser=function(format){var funcName="parse"+Date.parseFunctions.count++,regexNum=Date.parseRegexes.length,currentGroup=1;Date.parseFunctions[format]=funcName;for(var code="Date."+funcName+" = function(input) {\nvar y = -1, m = -1, d = -1, h = -1, i = -1, s = -1, z = -1;\nvar d = new Date();\ny = d.getFullYear();\nm = d.getMonth();\nd = d.getDate();\nvar results = input.match(Date.parseRegexes["+regexNum+"]);\nif (results && results.length > 0) {",regex="",special=!1,ch="",i=0;i<format.length;++i)ch=format.charAt(i),special||"\\"!=ch?special?(special=!1,regex+=String.escape(ch)):(obj=Date.formatCodeToRegex(ch,currentGroup),currentGroup+=obj.g,regex+=obj.s,obj.g&&obj.c&&(code+=obj.c)):special=!0;code+="if (y > 0 && z > 0){\nvar doyDate = new Date(y,0);\ndoyDate.setDate(z);\nm = doyDate.getMonth();\nd = doyDate.getDate();\n}",code+="if (y > 0 && m >= 0 && d > 0 && h >= 0 && i >= 0 && s >= 0)\n{return new Date(y, m, d, h, i, s);}\nelse if (y > 0 && m >= 0 && d > 0 && h >= 0 && i >= 0)\n{return new Date(y, m, d, h, i);}\nelse if (y > 0 && m >= 0 && d > 0 && h >= 0)\n{return new Date(y, m, d, h);}\nelse if (y > 0 && m >= 0 && d > 0)\n{return new Date(y, m, d);}\nelse if (y > 0 && m >= 0)\n{return new Date(y, m);}\nelse if (y > 0)\n{return new Date(y);}\n}return null;}",Date.parseRegexes[regexNum]=new RegExp("^"+regex+"$"),eval(code)},Date.formatCodeToRegex=function(e,t){switch(e){case"D":return{g:0,c:null,s:"(?:Sun|Mon|Tue|Wed|Thu|Fri|Sat)"};case"j":case"d":return{g:1,c:"d = parseInt(results["+t+"], 10);\n",s:"(\\d{1,2})"};case"l":return{g:0,c:null,s:"(?:"+Date.dayNames.join("|")+")"};case"S":return{g:0,c:null,s:"(?:st|nd|rd|th)"};case"w":return{g:0,c:null,s:"\\d"};case"z":return{g:1,c:"z = parseInt(results["+t+"], 10);\n",s:"(\\d{1,3})"};case"W":return{g:0,c:null,s:"(?:\\d{2})"};case"F":return{g:1,c:"m = parseInt(Date.monthNumbers[results["+t+"].substring(0, 3)], 10);\n",s:"("+Date.monthNames.join("|")+")"};case"M":return{g:1,c:"m = parseInt(Date.monthNumbers[results["+t+"]], 10);\n",s:"(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)"};case"n":case"m":return{g:1,c:"m = parseInt(results["+t+"], 10) - 1;\n",s:"(\\d{1,2})"};case"t":return{g:0,c:null,s:"\\d{1,2}"};case"L":return{g:0,c:null,s:"(?:1|0)"};case"Y":return{g:1,c:"y = parseInt(results["+t+"], 10);\n",s:"(\\d{4})"};case"y":return{g:1,c:"var ty = parseInt(results["+t+"], 10);\ny = ty > Date.y2kYear ? 1900 + ty : 2000 + ty;\n",s:"(\\d{1,2})"};case"a":return{g:1,c:"if (results["+t+"] == 'am') {\nif (h == 12) { h = 0; }\n} else { if (h < 12) { h += 12; }}",s:"(am|pm)"};case"A":return{g:1,c:"if (results["+t+"] == 'AM') {\nif (h == 12) { h = 0; }\n} else { if (h < 12) { h += 12; }}",s:"(AM|PM)"};case"g":case"G":case"h":case"H":return{g:1,c:"h = parseInt(results["+t+"], 10);\n",s:"(\\d{1,2})"};case"i":return{g:1,c:"i = parseInt(results["+t+"], 10);\n",s:"(\\d{2})"};case"s":return{g:1,c:"s = parseInt(results["+t+"], 10);\n",s:"(\\d{2})"};case"O":return{g:0,c:null,s:"[+-]\\d{4}"};case"T":return{g:0,c:null,s:"[A-Z]{3}"};case"Z":return{g:0,c:null,s:"[+-]\\d{1,5}"};default:return{g:0,c:null,s:String.escape(e)}}},Date.prototype.getTimezone=function(){return this.toString().replace(/^.*? ([A-Z]{3}) [0-9]{4}.*$/,"$1").replace(/^.*?\(([A-Z])[a-z]+ ([A-Z])[a-z]+ ([A-Z])[a-z]+\)$/,"$1$2$3")},Date.prototype.getGMTOffset=function(){return(this.getTimezoneOffset()>0?"-":"+")+String.leftPad(Math.floor(Math.abs(this.getTimezoneOffset())/60),2,"0")+String.leftPad(Math.abs(this.getTimezoneOffset())%60,2,"0")},Date.prototype.getDayOfYear=function(){var e=0;Date.daysInMonth[1]=this.isLeapYear()?29:28;for(var t=0;t<this.getMonth();++t)e+=Date.daysInMonth[t];return e+this.getDate()},Date.prototype.getWeekOfYear=function(){var e=this.getDayOfYear()+(4-this.getDay()),t=new Date(this.getFullYear(),0,1),n=7-t.getDay()+4;return String.leftPad(Math.ceil((e-n)/7)+1,2,"0")},Date.prototype.isLeapYear=function(){var e=this.getFullYear();return 0==(3&e)&&(e%100||e%400==0&&e)},Date.prototype.getFirstDayOfMonth=function(){var e=(this.getDay()-(this.getDate()-1))%7;return e<0?e+7:e},Date.prototype.getLastDayOfMonth=function(){var e=(this.getDay()+(Date.daysInMonth[this.getMonth()]-this.getDate()))%7;return e<0?e+7:e},Date.prototype.getDaysInMonth=function(){return Date.daysInMonth[1]=this.isLeapYear()?29:28,Date.daysInMonth[this.getMonth()]},Date.prototype.getSuffix=function(){switch(this.getDate()){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}},String.escape=function(e){return e.replace(/('|\\)/g,"\\$1")},String.leftPad=function(e,t,n){var a=new String(e);for(null==n&&(n=" ");a.length<t;)a=n+a;return a},Date.daysInMonth=[31,28,31,30,31,30,31,31,30,31,30,31],Date.monthNames=["January","February","March","April","May","June","July","August","September","October","November","December"],Date.dayNames=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Date.y2kYear=50,Date.monthNumbers={Jan:0,Feb:1,Mar:2,Apr:3,May:4,Jun:5,Jul:6,Aug:7,Sep:8,Oct:9,Nov:10,Dec:11},Date.patterns={ISO8601LongPattern:"Y-m-d H:i:s",ISO8601ShortPattern:"Y-m-d",ShortDatePattern:"n/j/Y",LongDatePattern:"l, F d, Y",FullDateTimePattern:"l, F d, Y g:i:s A",MonthDayPattern:"F d",ShortTimePattern:"g:i A",LongTimePattern:"g:i:s A",SortableDateTimePattern:"Y-m-d\\TH:i:s",UniversalSortableDateTimePattern:"Y-m-d H:i:sO",YearMonthPattern:"F, Y"},function(e){"function"==typeof define&&define.amd?define(["jquery.flot.min"],e):"object"==typeof exports?module.exports=e:e(jQuery)}(function(e){function t(t){var r,o=t||window.event,s=[].slice.call(arguments,1),i=0,d=0,u=0,c=0,l=0;return t=e.event.fix(o),t.type="mousewheel",o.wheelDelta&&(i=o.wheelDelta),o.detail&&(i=o.detail*-1),o.deltaY&&(u=o.deltaY*-1,i=u),o.deltaX&&(d=o.deltaX,i=d*-1),void 0!==o.wheelDeltaY&&(u=o.wheelDeltaY),void 0!==o.wheelDeltaX&&(d=o.wheelDeltaX*-1),c=Math.abs(i),(!n||c<n)&&(n=c),l=Math.max(Math.abs(u),Math.abs(d)),(!a||l<a)&&(a=l),r=i>0?"floor":"ceil",i=Math[r](i/n),d=Math[r](d/a),u=Math[r](u/a),s.unshift(t,i,d,u),(e.event.dispatch||e.event.handle).apply(this,s)}var n,a,r=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],o="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"];if(e.event.fixHooks)for(var s=r.length;s;)e.event.fixHooks[r[--s]]=e.event.mouseHooks;e.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var e=o.length;e;)this.addEventListener(o[--e],t,!1);else this.onmousewheel=t},teardown:function(){if(this.removeEventListener)for(var e=o.length;e;)this.removeEventListener(o[--e],t,!1);else this.onmousewheel=null}},e.fn.extend({mousewheel:function(e){return e?this.bind("mousewheel",e):this.trigger("mousewheel")},unmousewheel:function(e){return this.unbind("mousewheel",e)}})});function _toConsumableArray(e){if(Array.isArray(e)){for(var t=0,i=Array(e.length);t<e.length;t++)i[t]=e[t];return i}return Array.from(e)}var _slice=Array.prototype.slice,_slicedToArray=function(){function e(e,t){var i=[],n=!0,r=!1,s=void 0;try{for(var a,o=e[Symbol.iterator]();!(n=(a=o.next()).done)&&(i.push(a.value),!t||i.length!==t);n=!0);}catch(l){r=!0,s=l}finally{try{!n&&o["return"]&&o["return"]()}finally{if(r)throw s}}return i}return function(t,i){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_extends=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};!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],t):e.parsley=t(e.jQuery)}(this,function(e){"use strict";function t(e,t){return e.parsleyAdaptedCallback||(e.parsleyAdaptedCallback=function(){var i=Array.prototype.slice.call(arguments,0);i.unshift(this),e.apply(t||T,i)}),e.parsleyAdaptedCallback}function i(e){return 0===e.lastIndexOf(D,0)?e.substr(D.length):e}function n(){var t=this,i=window||global;_extends(this,{isNativeEvent:function(e){return e.originalEvent&&e.originalEvent.isTrusted!==!1},fakeInputEvent:function(i){t.isNativeEvent(i)&&e(i.target).trigger("input")},misbehaves:function(i){t.isNativeEvent(i)&&(t.behavesOk(i),e(document).on("change.inputevent",i.data.selector,t.fakeInputEvent),t.fakeInputEvent(i))},behavesOk:function(i){t.isNativeEvent(i)&&e(document).off("input.inputevent",i.data.selector,t.behavesOk).off("change.inputevent",i.data.selector,t.misbehaves)},install:function(){if(!i.inputEventPatched){i.inputEventPatched="0.0.3";for(var n=["select",'input[type="checkbox"]','input[type="radio"]','input[type="file"]'],r=0;r<n.length;r++){var s=n[r];e(document).on("input.inputevent",s,{selector:s},t.behavesOk).on("change.inputevent",s,{selector:s},t.misbehaves)}}},uninstall:function(){delete i.inputEventPatched,e(document).off(".inputevent")}})}var r=1,s={},a={attr:function(e,t,i){var n,r,s,a=new RegExp("^"+t,"i");if("undefined"==typeof i)i={};else for(n in i)i.hasOwnProperty(n)&&delete i[n];if(!e)return i;for(s=e.attributes,n=s.length;n--;)r=s[n],r&&r.specified&&a.test(r.name)&&(i[this.camelize(r.name.slice(t.length))]=this.deserializeValue(r.value));return i},checkAttr:function(e,t,i){return e.hasAttribute(t+i)},setAttr:function(e,t,i,n){e.setAttribute(this.dasherize(t+i),String(n))},generateID:function(){return""+r++},deserializeValue:function(t){var i;try{return t?"true"==t||"false"!=t&&("null"==t?null:isNaN(i=Number(t))?/^[\[\{]/.test(t)?e.parseJSON(t):t:i):t}catch(n){return t}},camelize:function(e){return e.replace(/-+(.)?/g,function(e,t){return t?t.toUpperCase():""})},dasherize:function(e){return e.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()},warn:function(){var e;window.console&&"function"==typeof window.console.warn&&(e=window.console).warn.apply(e,arguments)},warnOnce:function(e){s[e]||(s[e]=!0,this.warn.apply(this,arguments))},_resetWarnings:function(){s={}},trimString:function(e){return e.replace(/^\s+|\s+$/g,"")},parse:{date:function S(e){var t=e.match(/^(\d{4,})-(\d\d)-(\d\d)$/);if(!t)return null;var i=t.map(function(e){return parseInt(e,10)}),n=_slicedToArray(i,4),r=(n[0],n[1]),s=n[2],a=n[3],S=new Date(r,s-1,a);return S.getFullYear()!==r||S.getMonth()+1!==s||S.getDate()!==a?null:S},string:function(e){return e},integer:function(e){return isNaN(e)?null:parseInt(e,10)},number:function(e){if(isNaN(e))throw null;return parseFloat(e)},"boolean":function(e){return!/^\s*false\s*$/i.test(e)},object:function(e){return a.deserializeValue(e)},regexp:function(e){var t="";return/^\/.*\/(?:[gimy]*)$/.test(e)?(t=e.replace(/.*\/([gimy]*)$/,"$1"),e=e.replace(new RegExp("^/(.*?)/"+t+"$"),"$1")):e="^"+e+"$",new RegExp(e,t)}},parseRequirement:function(e,t){var i=this.parse[e||"string"];if(!i)throw'Unknown requirement specification: "'+e+'"';var n=i(t);if(null===n)throw"Requirement is not a "+e+': "'+t+'"';return n},namespaceEvents:function(t,i){return t=this.trimString(t||"").split(/\s+/),t[0]?e.map(t,function(e){return e+"."+i}).join(" "):""},difference:function(t,i){var n=[];return e.each(t,function(e,t){i.indexOf(t)==-1&&n.push(t)}),n},all:function(t){return e.when.apply(e,_toConsumableArray(t).concat([42,42]))},objectCreate:Object.create||function(){var e=function(){};return function(t){if(arguments.length>1)throw Error("Second argument not supported");if("object"!=typeof t)throw TypeError("Argument must be an object");e.prototype=t;var i=new e;return e.prototype=null,i}}(),_SubmitSelector:'input[type="submit"], button:submit'},o={namespace:"data-parsley-",inputs:"input, textarea, select",excluded:"input[type=button], input[type=submit], input[type=reset], input[type=hidden]",priorityEnabled:!0,multiple:null,group:null,uiEnabled:!0,validationThreshold:3,focus:"first",trigger:!1,triggerAfterFailure:"input",errorClass:"parsley-error",successClass:"parsley-success",classHandler:function(e){},errorsContainer:function(e){},errorsWrapper:'<ul class="parsley-errors-list"></ul>',errorTemplate:"<li></li>"},l=function(){this.__id__=a.generateID()};l.prototype={asyncSupport:!0,_pipeAccordingToValidationResult:function(){var t=this,i=function(){var i=e.Deferred();return!0!==t.validationResult&&i.reject(),i.resolve().promise()};return[i,i]},actualizeOptions:function(){return a.attr(this.element,this.options.namespace,this.domOptions),this.parent&&this.parent.actualizeOptions&&this.parent.actualizeOptions(),this},_resetOptions:function(e){this.domOptions=a.objectCreate(this.parent.options),this.options=a.objectCreate(this.domOptions);for(var t in e)e.hasOwnProperty(t)&&(this.options[t]=e[t]);this.actualizeOptions()},_listeners:null,on:function(e,t){this._listeners=this._listeners||{};var i=this._listeners[e]=this._listeners[e]||[];return i.push(t),this},subscribe:function(t,i){e.listenTo(this,t.toLowerCase(),i)},off:function(e,t){var i=this._listeners&&this._listeners[e];if(i)if(t)for(var n=i.length;n--;)i[n]===t&&i.splice(n,1);else delete this._listeners[e];return this},unsubscribe:function(t,i){e.unsubscribeTo(this,t.toLowerCase())},trigger:function(e,t,i){t=t||this;var n,r=this._listeners&&this._listeners[e];if(r)for(var s=r.length;s--;)if(n=r[s].call(t,t,i),n===!1)return n;return!this.parent||this.parent.trigger(e,t,i)},asyncIsValid:function(e,t){return a.warnOnce("asyncIsValid is deprecated; please use whenValid instead"),this.whenValid({group:e,force:t})},_findRelated:function(){return this.options.multiple?e(this.parent.element.querySelectorAll("["+this.options.namespace+'multiple="'+this.options.multiple+'"]')):this.$element}};var u=function(e,t){var i=e.match(/^\s*\[(.*)\]\s*$/);if(!i)throw'Requirement is not an array: "'+e+'"';var n=i[1].split(",").map(a.trimString);if(n.length!==t)throw"Requirement has "+n.length+" values when "+t+" are needed";return n},d=function(e,t,i){var n=null,r={};for(var s in e)if(s){var o=i(s);"string"==typeof o&&(o=a.parseRequirement(e[s],o)),r[s]=o}else n=a.parseRequirement(e[s],t);return[n,r]},h=function(t){e.extend(!0,this,t)};h.prototype={validate:function(e,t){if(this.fn)return arguments.length>3&&(t=[].slice.call(arguments,1,-1)),this.fn(e,t);if(Array.isArray(e)){if(!this.validateMultiple)throw"Validator `"+this.name+"` does not handle multiple values";return this.validateMultiple.apply(this,arguments)}var i=arguments[arguments.length-1];if(this.validateDate&&i._isDateInput())return arguments[0]=a.parse.date(arguments[0]),null!==arguments[0]&&this.validateDate.apply(this,arguments);if(this.validateNumber)return!isNaN(e)&&(arguments[0]=parseFloat(arguments[0]),this.validateNumber.apply(this,arguments));if(this.validateString)return this.validateString.apply(this,arguments);throw"Validator `"+this.name+"` only handles multiple values"},parseRequirements:function(t,i){if("string"!=typeof t)return Array.isArray(t)?t:[t];var n=this.requirementType;if(Array.isArray(n)){for(var r=u(t,n.length),s=0;s<r.length;s++)r[s]=a.parseRequirement(n[s],r[s]);return r}return e.isPlainObject(n)?d(n,t,i):[a.parseRequirement(n,t)]},requirementType:"string",priority:2};var p=function(e,t){this.__class__="ValidatorRegistry",this.locale="en",this.init(e||{},t||{})},c={email:/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i,number:/^-?(\d*\.)?\d+(e[-+]?\d+)?$/i,integer:/^-?\d+$/,digits:/^\d+$/,alphanum:/^\w+$/i,date:{test:function(e){return null!==a.parse.date(e)}},url:new RegExp("^(?:(?:https?|ftp)://)?(?:\\S+(?::\\S*)?@)?(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))(?::\\d{2,5})?(?:/\\S*)?$","i")};c.range=c.number;var f=function(e){var t=(""+e).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return t?Math.max(0,(t[1]?t[1].length:0)-(t[2]?+t[2]:0)):0},m=function(e,t){return t.map(a.parse[e])},g=function(e,t){return function(i){for(var n=arguments.length,r=Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];return r.pop(),t.apply(void 0,[i].concat(_toConsumableArray(m(e,r))))}},v=function(e){return{validateDate:g("date",e),validateNumber:g("number",e),requirementType:e.length<=2?"string":["string","string"],priority:30}};p.prototype={init:function(e,t){this.catalog=t,this.validators=_extends({},this.validators);for(var i in e)this.addValidator(i,e[i].fn,e[i].priority);window.Parsley.trigger("parsley:validator:init")},setLocale:function(e){if("undefined"==typeof this.catalog[e])throw new Error(e+" is not available in the catalog");return this.locale=e,this},addCatalog:function(e,t,i){return"object"==typeof t&&(this.catalog[e]=t),!0===i?this.setLocale(e):this},addMessage:function(e,t,i){return"undefined"==typeof this.catalog[e]&&(this.catalog[e]={}),this.catalog[e][t]=i,this},addMessages:function(e,t){for(var i in t)this.addMessage(e,i,t[i]);return this},addValidator:function(e,t,i){if(this.validators[e])a.warn('Validator "'+e+'" is already defined.');else if(o.hasOwnProperty(e))return void a.warn('"'+e+'" is a restricted keyword and is not a valid validator name.');return this._setValidator.apply(this,arguments)},updateValidator:function(e,t,i){return this.validators[e]?this._setValidator.apply(this,arguments):(a.warn('Validator "'+e+'" is not already defined.'),this.addValidator.apply(this,arguments))},removeValidator:function(e){return this.validators[e]||a.warn('Validator "'+e+'" is not defined.'),delete this.validators[e],this},_setValidator:function(e,t,i){"object"!=typeof t&&(t={fn:t,priority:i}),t.validate||(t=new h(t)),this.validators[e]=t;for(var n in t.messages||{})this.addMessage(n,e,t.messages[n]);return this},getErrorMessage:function(e){var t;if("type"===e.name){var i=this.catalog[this.locale][e.name]||{};t=i[e.requirements]}else t=this.formatMessage(this.catalog[this.locale][e.name],e.requirements);return t||this.catalog[this.locale].defaultMessage||this.catalog.en.defaultMessage},formatMessage:function(e,t){if("object"==typeof t){for(var i in t)e=this.formatMessage(e,t[i]);return e}return"string"==typeof e?e.replace(/%s/i,t):""},validators:{notblank:{validateString:function(e){return/\S/.test(e)},priority:2},required:{validateMultiple:function(e){return e.length>0},validateString:function(e){return/\S/.test(e)},priority:512},type:{validateString:function(e,t){var i=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],n=i.step,r=void 0===n?"any":n,s=i.base,a=void 0===s?0:s,o=c[t];if(!o)throw new Error("validator type `"+t+"` is not supported");if(!o.test(e))return!1;if("number"===t&&!/^any$/i.test(r||"")){var l=Number(e),u=Math.max(f(r),f(a));if(f(l)>u)return!1;var d=function(e){return Math.round(e*Math.pow(10,u))};if((d(l)-d(a))%d(r)!=0)return!1}return!0},requirementType:{"":"string",step:"string",base:"number"},priority:256},pattern:{validateString:function(e,t){return t.test(e)},requirementType:"regexp",priority:64},minlength:{validateString:function(e,t){return e.length>=t},requirementType:"integer",priority:30},maxlength:{validateString:function(e,t){return e.length<=t},requirementType:"integer",priority:30},length:{validateString:function(e,t,i){return e.length>=t&&e.length<=i},requirementType:["integer","integer"],priority:30},mincheck:{validateMultiple:function(e,t){return e.length>=t},requirementType:"integer",priority:30},maxcheck:{validateMultiple:function(e,t){return e.length<=t},requirementType:"integer",priority:30},check:{validateMultiple:function(e,t,i){return e.length>=t&&e.length<=i},requirementType:["integer","integer"],priority:30},min:v(function(e,t){return e>=t}),max:v(function(e,t){return e<=t}),range:v(function(e,t,i){return e>=t&&e<=i}),equalto:{validateString:function(t,i){var n=e(i);return n.length?t===n.val():t===i},priority:256}}};var y={},_=function k(e,t,i){for(var n=[],r=[],s=0;s<e.length;s++){for(var a=!1,o=0;o<t.length;o++)if(e[s].assert.name===t[o].assert.name){a=!0;break}a?r.push(e[s]):n.push(e[s])}return{kept:r,added:n,removed:i?[]:k(t,e,!0).added}};y.Form={_actualizeTriggers:function(){var e=this;this.$element.on("submit.Parsley",function(t){e.onSubmitValidate(t)}),this.$element.on("click.Parsley",a._SubmitSelector,function(t){e.onSubmitButton(t)}),!1!==this.options.uiEnabled&&this.element.setAttribute("novalidate","")},focus:function(){if(this._focusedField=null,!0===this.validationResult||"none"===this.options.focus)return null;for(var e=0;e<this.fields.length;e++){var t=this.fields[e];if(!0!==t.validationResult&&t.validationResult.length>0&&"undefined"==typeof t.options.noFocus&&(this._focusedField=t.$element,"first"===this.options.focus))break}return null===this._focusedField?null:this._focusedField.focus()},_destroyUI:function(){this.$element.off(".Parsley")}},y.Field={_reflowUI:function(){if(this._buildUI(),this._ui){var e=_(this.validationResult,this._ui.lastValidationResult);this._ui.lastValidationResult=this.validationResult,this._manageStatusClass(),this._manageErrorsMessages(e),this._actualizeTriggers(),!e.kept.length&&!e.added.length||this._failedOnce||(this._failedOnce=!0,this._actualizeTriggers())}},getErrorsMessages:function(){if(!0===this.validationResult)return[];for(var e=[],t=0;t<this.validationResult.length;t++)e.push(this.validationResult[t].errorMessage||this._getErrorMessage(this.validationResult[t].assert));return e},addError:function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],i=t.message,n=t.assert,r=t.updateClass,s=void 0===r||r;this._buildUI(),this._addError(e,{message:i,assert:n}),s&&this._errorClass()},updateError:function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],i=t.message,n=t.assert,r=t.updateClass,s=void 0===r||r;this._buildUI(),this._updateError(e,{message:i,assert:n}),s&&this._errorClass()},removeError:function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],i=t.updateClass,n=void 0===i||i;this._buildUI(),this._removeError(e),n&&this._manageStatusClass()},_manageStatusClass:function(){this.hasConstraints()&&this.needsValidation()&&!0===this.validationResult?this._successClass():this.validationResult.length>0?this._errorClass():this._resetClass()},_manageErrorsMessages:function(t){if("undefined"==typeof this.options.errorsMessagesDisabled){if("undefined"!=typeof this.options.errorMessage)return t.added.length||t.kept.length?(this._insertErrorWrapper(),0===this._ui.$errorsWrapper.find(".parsley-custom-error-message").length&&this._ui.$errorsWrapper.append(e(this.options.errorTemplate).addClass("parsley-custom-error-message")),this._ui.$errorsWrapper.addClass("filled").find(".parsley-custom-error-message").html(this.options.errorMessage)):this._ui.$errorsWrapper.removeClass("filled").find(".parsley-custom-error-message").remove();for(var i=0;i<t.removed.length;i++)this._removeError(t.removed[i].assert.name);for(i=0;i<t.added.length;i++)this._addError(t.added[i].assert.name,{message:t.added[i].errorMessage,assert:t.added[i].assert});for(i=0;i<t.kept.length;i++)this._updateError(t.kept[i].assert.name,{message:t.kept[i].errorMessage,assert:t.kept[i].assert})}},_addError:function(t,i){var n=i.message,r=i.assert;this._insertErrorWrapper(),this._ui.$errorsWrapper.addClass("filled").append(e(this.options.errorTemplate).addClass("parsley-"+t).html(n||this._getErrorMessage(r)))},_updateError:function(e,t){var i=t.message,n=t.assert;this._ui.$errorsWrapper.addClass("filled").find(".parsley-"+e).html(i||this._getErrorMessage(n))},_removeError:function(e){this._ui.$errorsWrapper.removeClass("filled").find(".parsley-"+e).remove()},_getErrorMessage:function(e){var t=e.name+"Message";return"undefined"!=typeof this.options[t]?window.Parsley.formatMessage(this.options[t],e.requirements):window.Parsley.getErrorMessage(e)},_buildUI:function(){if(!this._ui&&!1!==this.options.uiEnabled){var t={};this.element.setAttribute(this.options.namespace+"id",this.__id__),t.$errorClassHandler=this._manageClassHandler(),t.errorsWrapperId="parsley-id-"+(this.options.multiple?"multiple-"+this.options.multiple:this.__id__),t.$errorsWrapper=e(this.options.errorsWrapper).attr("id",t.errorsWrapperId),t.lastValidationResult=[],t.validationInformationVisible=!1,this._ui=t}},_manageClassHandler:function(){if("string"==typeof this.options.classHandler)return 0===e(this.options.classHandler).length&&ParsleyUtils.warn("No elements found that match the selector `"+this.options.classHandler+"` set in options.classHandler or data-parsley-class-handler"),e(this.options.classHandler);if("function"==typeof this.options.classHandler)var t=this.options.classHandler.call(this,this);return"undefined"!=typeof t&&t.length?t:this._inputHolder()},_inputHolder:function(){return this.options.multiple&&"SELECT"!==this.element.nodeName?this.$element.parent():this.$element},_insertErrorWrapper:function(){var t;if(0!==this._ui.$errorsWrapper.parent().length)return this._ui.$errorsWrapper.parent();if("string"==typeof this.options.errorsContainer){if(e(this.options.errorsContainer).length)return e(this.options.errorsContainer).append(this._ui.$errorsWrapper);a.warn("The errors container `"+this.options.errorsContainer+"` does not exist in DOM")}else"function"==typeof this.options.errorsContainer&&(t=this.options.errorsContainer.call(this,this));return"undefined"!=typeof t&&t.length?t.append(this._ui.$errorsWrapper):this._inputHolder().after(this._ui.$errorsWrapper)},_actualizeTriggers:function(){var e,t=this,i=this._findRelated();i.off(".Parsley"),this._failedOnce?i.on(a.namespaceEvents(this.options.triggerAfterFailure,"Parsley"),function(){t._validateIfNeeded()}):(e=a.namespaceEvents(this.options.trigger,"Parsley"))&&i.on(e,function(e){t._validateIfNeeded(e)})},_validateIfNeeded:function(e){var t=this;e&&/key|input/.test(e.type)&&(!this._ui||!this._ui.validationInformationVisible)&&this.getValue().length<=this.options.validationThreshold||(this.options.debounce?(window.clearTimeout(this._debounced),this._debounced=window.setTimeout(function(){return t.validate()},this.options.debounce)):this.validate())},_resetUI:function(){this._failedOnce=!1,this._actualizeTriggers(),"undefined"!=typeof this._ui&&(this._ui.$errorsWrapper.removeClass("filled").children().remove(),this._resetClass(),this._ui.lastValidationResult=[],this._ui.validationInformationVisible=!1)},_destroyUI:function(){this._resetUI(),"undefined"!=typeof this._ui&&this._ui.$errorsWrapper.remove(),delete this._ui},_successClass:function(){this._ui.validationInformationVisible=!0,this._ui.$errorClassHandler.removeClass(this.options.errorClass).addClass(this.options.successClass)},_errorClass:function(){this._ui.validationInformationVisible=!0,this._ui.$errorClassHandler.removeClass(this.options.successClass).addClass(this.options.errorClass)},_resetClass:function(){this._ui.$errorClassHandler.removeClass(this.options.successClass).removeClass(this.options.errorClass)}};var w=function(t,i,n){this.__class__="Form",this.element=t,this.$element=e(t),this.domOptions=i,this.options=n,this.parent=window.Parsley,this.fields=[],this.validationResult=null},b={pending:null,resolved:!0,rejected:!1};w.prototype={onSubmitValidate:function(e){var t=this;if(!0!==e.parsley){var i=this._submitSource||this.$element.find(a._SubmitSelector)[0];if(this._submitSource=null,this.$element.find(".parsley-synthetic-submit-button").prop("disabled",!0),!i||null===i.getAttribute("formnovalidate")){window.Parsley._remoteCache={};var n=this.whenValidate({event:e});"resolved"===n.state()&&!1!==this._trigger("submit")||(e.stopImmediatePropagation(),e.preventDefault(),"pending"===n.state()&&n.done(function(){t._submit(i)}))}}},onSubmitButton:function(e){this._submitSource=e.currentTarget},_submit:function(t){if(!1!==this._trigger("submit")){if(t){var i=this.$element.find(".parsley-synthetic-submit-button").prop("disabled",!1);0===i.length&&(i=e('<input class="parsley-synthetic-submit-button" type="hidden">').appendTo(this.$element)),i.attr({name:t.getAttribute("name"),value:t.getAttribute("value")})}this.$element.trigger(_extends(e.Event("submit"),{parsley:!0}))}},validate:function(t){if(arguments.length>=1&&!e.isPlainObject(t)){a.warnOnce("Calling validate on a parsley form without passing arguments as an object is deprecated.");var i=_slice.call(arguments),n=i[0],r=i[1],s=i[2];t={group:n,force:r,event:s}}return b[this.whenValidate(t).state()]},whenValidate:function(){var t,i=this,n=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],r=n.group,s=n.force,o=n.event;this.submitEvent=o,o&&(this.submitEvent=_extends({},o,{preventDefault:function(){a.warnOnce("Using `this.submitEvent.preventDefault()` is deprecated; instead, call `this.validationResult = false`"),i.validationResult=!1}})),this.validationResult=!0,this._trigger("validate"),this._refreshFields();var l=this._withoutReactualizingFormOptions(function(){return e.map(i.fields,function(e){return e.whenValidate({force:s,group:r})})});return(t=a.all(l).done(function(){i._trigger("success")}).fail(function(){i.validationResult=!1,i.focus(),i._trigger("error")}).always(function(){i._trigger("validated")})).pipe.apply(t,_toConsumableArray(this._pipeAccordingToValidationResult()))},isValid:function(t){if(arguments.length>=1&&!e.isPlainObject(t)){a.warnOnce("Calling isValid on a parsley form without passing arguments as an object is deprecated.");var i=_slice.call(arguments),n=i[0],r=i[1];t={group:n,force:r}}return b[this.whenValid(t).state()]},whenValid:function(){var t=this,i=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],n=i.group,r=i.force;this._refreshFields();var s=this._withoutReactualizingFormOptions(function(){return e.map(t.fields,function(e){return e.whenValid({group:n,force:r})})});return a.all(s)},reset:function(){for(var e=0;e<this.fields.length;e++)this.fields[e].reset();this._trigger("reset")},destroy:function(){this._destroyUI();for(var e=0;e<this.fields.length;e++)this.fields[e].destroy();this.$element.removeData("Parsley"),this._trigger("destroy")},_refreshFields:function(){return this.actualizeOptions()._bindFields()},_bindFields:function(){var t=this,i=this.fields;return this.fields=[],this.fieldsMappedById={},this._withoutReactualizingFormOptions(function(){t.$element.find(t.options.inputs).not(t.options.excluded).each(function(e,i){var n=new window.Parsley.Factory(i,{},t);if(("Field"===n.__class__||"FieldMultiple"===n.__class__)&&!0!==n.options.excluded){var r=n.__class__+"-"+n.__id__;"undefined"==typeof t.fieldsMappedById[r]&&(t.fieldsMappedById[r]=n,t.fields.push(n))}}),e.each(a.difference(i,t.fields),function(e,t){t.reset()})}),this},_withoutReactualizingFormOptions:function(e){var t=this.actualizeOptions;this.actualizeOptions=function(){return this};var i=e();return this.actualizeOptions=t,i},_trigger:function(e){return this.trigger("form:"+e)}};var F=function(e,t,i,n,r){var s=window.Parsley._validatorRegistry.validators[t],a=new h(s);n=n||e.options[t+"Priority"]||a.priority,r=!0===r,_extends(this,{validator:a,name:t,requirements:i,priority:n,isDomConstraint:r}),this._parseRequirements(e.options)},C=function(e){var t=e[0].toUpperCase();return t+e.slice(1)};F.prototype={validate:function(e,t){var i;return(i=this.validator).validate.apply(i,[e].concat(_toConsumableArray(this.requirementList),[t]))},_parseRequirements:function(e){var t=this;this.requirementList=this.validator.parseRequirements(this.requirements,function(i){return e[t.name+C(i)]})}};var E=function(t,i,n,r){this.__class__="Field",this.element=t,this.$element=e(t),"undefined"!=typeof r&&(this.parent=r),this.options=n,this.domOptions=i,this.constraints=[],this.constraintsByName={},this.validationResult=!0,this._bindConstraints()},A={pending:null,resolved:!0,rejected:!1};E.prototype={validate:function(t){arguments.length>=1&&!e.isPlainObject(t)&&(a.warnOnce("Calling validate on a parsley field without passing arguments as an object is deprecated."),t={options:t});var i=this.whenValidate(t);if(!i)return!0;switch(i.state()){case"pending":return null;case"resolved":return!0;case"rejected":return this.validationResult}},whenValidate:function(){var e,t=this,i=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],n=i.force,r=i.group;if(this.refreshConstraints(),!r||this._isInGroup(r))return this.value=this.getValue(),this._trigger("validate"),(e=this.whenValid({force:n,value:this.value,_refreshed:!0}).always(function(){t._reflowUI()}).done(function(){t._trigger("success")}).fail(function(){t._trigger("error")}).always(function(){t._trigger("validated")})).pipe.apply(e,_toConsumableArray(this._pipeAccordingToValidationResult()))},hasConstraints:function(){return 0!==this.constraints.length},needsValidation:function(e){return"undefined"==typeof e&&(e=this.getValue()),!(!e.length&&!this._isRequired()&&"undefined"==typeof this.options.validateIfEmpty)},_isInGroup:function(t){return Array.isArray(this.options.group)?-1!==e.inArray(t,this.options.group):this.options.group===t},isValid:function(t){if(arguments.length>=1&&!e.isPlainObject(t)){a.warnOnce("Calling isValid on a parsley field without passing arguments as an object is deprecated.");var i=_slice.call(arguments),n=i[0],r=i[1];t={force:n,value:r}}var s=this.whenValid(t);return!s||A[s.state()]},whenValid:function(){var t=this,i=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],n=i.force,r=void 0!==n&&n,s=i.value,o=i.group,l=i._refreshed;if(l||this.refreshConstraints(),!o||this._isInGroup(o)){if(this.validationResult=!0,!this.hasConstraints())return e.when();if("undefined"!=typeof s&&null!==s||(s=this.getValue()),!this.needsValidation(s)&&!0!==r)return e.when();var u=this._getGroupedConstraints(),d=[];return e.each(u,function(i,n){var r=a.all(e.map(n,function(e){return t._validateConstraint(s,e)}));if(d.push(r),"rejected"===r.state())return!1}),a.all(d)}},_validateConstraint:function(t,i){var n=this,r=i.validate(t,this);return!1===r&&(r=e.Deferred().reject()),a.all([r]).fail(function(e){n.validationResult instanceof Array||(n.validationResult=[]),n.validationResult.push({assert:i,errorMessage:"string"==typeof e&&e})})},getValue:function(){var e;return e="function"==typeof this.options.value?this.options.value(this):"undefined"!=typeof this.options.value?this.options.value:this.$element.val(),"undefined"==typeof e||null===e?"":this._handleWhitespace(e)},reset:function(){return this._resetUI(),this._trigger("reset")},destroy:function(){this._destroyUI(),this.$element.removeData("Parsley"),this.$element.removeData("FieldMultiple"),this._trigger("destroy")},refreshConstraints:function(){return this.actualizeOptions()._bindConstraints()},addConstraint:function(e,t,i,n){if(window.Parsley._validatorRegistry.validators[e]){var r=new F(this,e,t,i,n);"undefined"!==this.constraintsByName[r.name]&&this.removeConstraint(r.name),this.constraints.push(r),this.constraintsByName[r.name]=r}return this},removeConstraint:function(e){for(var t=0;t<this.constraints.length;t++)if(e===this.constraints[t].name){this.constraints.splice(t,1);break}return delete this.constraintsByName[e],this},updateConstraint:function(e,t,i){return this.removeConstraint(e).addConstraint(e,t,i)},_bindConstraints:function(){for(var e=[],t={},i=0;i<this.constraints.length;i++)!1===this.constraints[i].isDomConstraint&&(e.push(this.constraints[i]),t[this.constraints[i].name]=this.constraints[i]);this.constraints=e,this.constraintsByName=t;for(var n in this.options)this.addConstraint(n,this.options[n],void 0,!0);return this._bindHtml5Constraints()},_bindHtml5Constraints:function(){null!==this.element.getAttribute("required")&&this.addConstraint("required",!0,void 0,!0),null!==this.element.getAttribute("pattern")&&this.addConstraint("pattern",this.element.getAttribute("pattern"),void 0,!0);var e=this.element.getAttribute("min"),t=this.element.getAttribute("max");null!==e&&null!==t?this.addConstraint("range",[e,t],void 0,!0):null!==e?this.addConstraint("min",e,void 0,!0):null!==t&&this.addConstraint("max",t,void 0,!0),null!==this.element.getAttribute("minlength")&&null!==this.element.getAttribute("maxlength")?this.addConstraint("length",[this.element.getAttribute("minlength"),this.element.getAttribute("maxlength")],void 0,!0):null!==this.element.getAttribute("minlength")?this.addConstraint("minlength",this.element.getAttribute("minlength"),void 0,!0):null!==this.element.getAttribute("maxlength")&&this.addConstraint("maxlength",this.element.getAttribute("maxlength"),void 0,!0);var i=this.element.type;return"number"===i?this.addConstraint("type",["number",{step:this.element.getAttribute("step")||"1",base:e||this.element.getAttribute("value")}],void 0,!0):/^(email|url|range|date)$/i.test(i)?this.addConstraint("type",i,void 0,!0):this},_isRequired:function(){return"undefined"!=typeof this.constraintsByName.required&&!1!==this.constraintsByName.required.requirements},_trigger:function(e){return this.trigger("field:"+e)},_handleWhitespace:function(e){return!0===this.options.trimValue&&a.warnOnce('data-parsley-trim-value="true" is deprecated, please use data-parsley-whitespace="trim"'),"squish"===this.options.whitespace&&(e=e.replace(/\s{2,}/g," ")),"trim"!==this.options.whitespace&&"squish"!==this.options.whitespace&&!0!==this.options.trimValue||(e=a.trimString(e)),e},_isDateInput:function(){var e=this.constraintsByName.type;return e&&"date"===e.requirements},_getGroupedConstraints:function(){if(!1===this.options.priorityEnabled)return[this.constraints];for(var e=[],t={},i=0;i<this.constraints.length;i++){var n=this.constraints[i].priority;t[n]||e.push(t[n]=[]),t[n].push(this.constraints[i])}return e.sort(function(e,t){return t[0].priority-e[0].priority}),e}};var x=E,$=function(){this.__class__="FieldMultiple"};$.prototype={addElement:function(e){return this.$elements.push(e),this},refreshConstraints:function(){var t;if(this.constraints=[],"SELECT"===this.element.nodeName)return this.actualizeOptions()._bindConstraints(),this;for(var i=0;i<this.$elements.length;i++)if(e("html").has(this.$elements[i]).length){t=this.$elements[i].data("FieldMultiple").refreshConstraints().constraints;for(var n=0;n<t.length;n++)this.addConstraint(t[n].name,t[n].requirements,t[n].priority,t[n].isDomConstraint)}else this.$elements.splice(i,1);return this},getValue:function(){if("function"==typeof this.options.value)return this.options.value(this);if("undefined"!=typeof this.options.value)return this.options.value;if("INPUT"===this.element.nodeName){if("radio"===this.element.type)return this._findRelated().filter(":checked").val()||"";if("checkbox"===this.element.type){var t=[];return this._findRelated().filter(":checked").each(function(){t.push(e(this).val())}),t}}return"SELECT"===this.element.nodeName&&null===this.$element.val()?[]:this.$element.val()},_init:function(){return this.$elements=[this.$element],this}};var P=function(t,i,n){this.element=t,this.$element=e(t);var r=this.$element.data("Parsley");if(r)return"undefined"!=typeof n&&r.parent===window.Parsley&&(r.parent=n,r._resetOptions(r.options)),"object"==typeof i&&_extends(r.options,i),r;if(!this.$element.length)throw new Error("You must bind Parsley on an existing element.");if("undefined"!=typeof n&&"Form"!==n.__class__)throw new Error("Parent instance must be a Form instance");return this.parent=n||window.Parsley,this.init(i)};P.prototype={init:function(e){return this.__class__="Parsley",this.__version__="2.7.2",this.__id__=a.generateID(),this._resetOptions(e),"FORM"===this.element.nodeName||a.checkAttr(this.element,this.options.namespace,"validate")&&!this.$element.is(this.options.inputs)?this.bind("parsleyForm"):this.isMultiple()?this.handleMultiple():this.bind("parsleyField")},isMultiple:function(){return"radio"===this.element.type||"checkbox"===this.element.type||"SELECT"===this.element.nodeName&&null!==this.element.getAttribute("multiple")},handleMultiple:function(){var t,i,n=this;if(this.options.multiple=this.options.multiple||(t=this.element.getAttribute("name"))||this.element.getAttribute("id"),"SELECT"===this.element.nodeName&&null!==this.element.getAttribute("multiple"))return this.options.multiple=this.options.multiple||this.__id__,this.bind("parsleyFieldMultiple");if(!this.options.multiple)return a.warn("To be bound by Parsley, a radio, a checkbox and a multiple select input must have either a name or a multiple option.",this.$element),this;this.options.multiple=this.options.multiple.replace(/(:|\.|\[|\]|\{|\}|\$)/g,""),t&&e('input[name="'+t+'"]').each(function(e,t){"radio"!==t.type&&"checkbox"!==t.type||t.setAttribute(n.options.namespace+"multiple",n.options.multiple)});for(var r=this._findRelated(),s=0;s<r.length;s++)if(i=e(r.get(s)).data("Parsley"),"undefined"!=typeof i){this.$element.data("FieldMultiple")||i.addElement(this.$element);break}return this.bind("parsleyField",!0),i||this.bind("parsleyFieldMultiple")},bind:function(t,i){var n;switch(t){case"parsleyForm":n=e.extend(new w(this.element,this.domOptions,this.options),new l,window.ParsleyExtend)._bindFields();break;case"parsleyField":n=e.extend(new x(this.element,this.domOptions,this.options,this.parent),new l,window.ParsleyExtend);break;case"parsleyFieldMultiple":n=e.extend(new x(this.element,this.domOptions,this.options,this.parent),new $,new l,window.ParsleyExtend)._init();break;default:throw new Error(t+"is not a supported Parsley type")}return this.options.multiple&&a.setAttr(this.element,this.options.namespace,"multiple",this.options.multiple),"undefined"!=typeof i?(this.$element.data("FieldMultiple",n),n):(this.$element.data("Parsley",n),n._actualizeTriggers(),n._trigger("init"),n)}};var V=e.fn.jquery.split(".");if(parseInt(V[0])<=1&&parseInt(V[1])<8)throw"The loaded version of jQuery is too old. Please upgrade to 1.8.x or better.";V.forEach||a.warn("Parsley requires ES5 to run properly. Please include https://github.com/es-shims/es5-shim");var O=_extends(new l,{element:document,$element:e(document),actualizeOptions:null,_resetOptions:null,Factory:P,version:"2.7.2"});_extends(x.prototype,y.Field,l.prototype),_extends(w.prototype,y.Form,l.prototype),_extends(P.prototype,l.prototype),e.fn.parsley=e.fn.psly=function(t){if(this.length>1){var i=[];return this.each(function(){i.push(e(this).parsley(t))}),i}return e(this).length?new P(this[0],t):void a.warn("You must bind Parsley on an existing element.")},"undefined"==typeof window.ParsleyExtend&&(window.ParsleyExtend={}),O.options=_extends(a.objectCreate(o),window.ParsleyConfig),window.ParsleyConfig=O.options,window.Parsley=window.psly=O,O.Utils=a,window.ParsleyUtils={},e.each(a,function(e,t){"function"==typeof t&&(window.ParsleyUtils[e]=function(){return a.warnOnce("Accessing `window.ParsleyUtils` is deprecated. Use `window.Parsley.Utils` instead."),a[e].apply(a,arguments)})});var M=window.Parsley._validatorRegistry=new p(window.ParsleyConfig.validators,window.ParsleyConfig.i18n);window.ParsleyValidator={},e.each("setLocale addCatalog addMessage addMessages getErrorMessage formatMessage addValidator updateValidator removeValidator".split(" "),function(e,t){window.Parsley[t]=function(){return M[t].apply(M,arguments)},window.ParsleyValidator[t]=function(){var e;return a.warnOnce("Accessing the method '"+t+"' through Validator is deprecated. Simply call 'window.Parsley."+t+"(...)'"),(e=window.Parsley)[t].apply(e,arguments)}}),window.Parsley.UI=y,window.ParsleyUI={removeError:function(e,t,i){var n=!0!==i;return a.warnOnce("Accessing UI is deprecated. Call 'removeError' on the instance directly. Please comment in issue 1073 as to your need to call this method."),e.removeError(t,{updateClass:n})},getErrorsMessages:function(e){return a.warnOnce("Accessing UI is deprecated. Call 'getErrorsMessages' on the instance directly."),e.getErrorsMessages()}},e.each("addError updateError".split(" "),function(e,t){window.ParsleyUI[t]=function(e,i,n,r,s){var o=!0!==s;return a.warnOnce("Accessing UI is deprecated. Call '"+t+"' on the instance directly. Please comment in issue 1073 as to your need to call this method."),e[t](i,{message:n,assert:r,updateClass:o})}}),!1!==window.ParsleyConfig.autoBind&&e(function(){e("[data-parsley-validate]").length&&e("[data-parsley-validate]").parsley()});var T=e({}),R=function(){a.warnOnce("Parsley's pubsub module is deprecated; use the 'on' and 'off' methods on parsley instances or window.Parsley")},D="parsley:";e.listen=function(e,n){var r;if(R(),"object"==typeof arguments[1]&&"function"==typeof arguments[2]&&(r=arguments[1],n=arguments[2]),"function"!=typeof n)throw new Error("Wrong parameters");window.Parsley.on(i(e),t(n,r))},e.listenTo=function(e,n,r){if(R(),!(e instanceof x||e instanceof w))throw new Error("Must give Parsley instance");if("string"!=typeof n||"function"!=typeof r)throw new Error("Wrong parameters");e.on(i(n),t(r))},e.unsubscribe=function(e,t){if(R(),"string"!=typeof e||"function"!=typeof t)throw new Error("Wrong arguments");window.Parsley.off(i(e),t.parsleyAdaptedCallback)},e.unsubscribeTo=function(e,t){if(R(),!(e instanceof x||e instanceof w))throw new Error("Must give Parsley instance");e.off(i(t))},e.unsubscribeAll=function(t){R(),window.Parsley.off(i(t)),e("form,input,textarea,select").each(function(){var n=e(this).data("Parsley");n&&n.off(i(t))})},e.emit=function(e,t){var n;R();var r=t instanceof x||t instanceof w,s=Array.prototype.slice.call(arguments,r?2:1);s.unshift(i(e)),r||(t=window.Parsley),(n=t).trigger.apply(n,_toConsumableArray(s))};e.extend(!0,O,{asyncValidators:{"default":{fn:function(e){return e.status>=200&&e.status<300},url:!1},reverse:{fn:function(e){return e.status<200||e.status>=300},url:!1}},addAsyncValidator:function(e,t,i,n){return O.asyncValidators[e]={fn:t,url:i||!1,options:n||{}},this}}),O.addValidator("remote",{requirementType:{"":"string",validator:"string",reverse:"boolean",options:"object"},validateString:function(t,i,n,r){var s,a,o={},l=n.validator||(!0===n.reverse?"reverse":"default");if("undefined"==typeof O.asyncValidators[l])throw new Error("Calling an undefined async validator: `"+l+"`");i=O.asyncValidators[l].url||i,i.indexOf("{value}")>-1?i=i.replace("{value}",encodeURIComponent(t)):o[r.element.getAttribute("name")||r.element.getAttribute("id")]=t;var u=e.extend(!0,n.options||{},O.asyncValidators[l].options);s=e.extend(!0,{},{url:i,data:o,type:"GET"},u),r.trigger("field:ajaxoptions",r,s),a=e.param(s),"undefined"==typeof O._remoteCache&&(O._remoteCache={});var d=O._remoteCache[a]=O._remoteCache[a]||e.ajax(s),h=function(){var t=O.asyncValidators[l].fn.call(r,d,i,n);return t||(t=e.Deferred().reject()),e.when(t)};return d.then(h,h)},priority:-1}),O.on("form:submit",function(){O._remoteCache={}}),l.prototype.addAsyncValidator=function(){return a.warnOnce("Accessing the method `addAsyncValidator` through an instance is deprecated. Simply call `Parsley.addAsyncValidator(...)`"),O.addAsyncValidator.apply(O,arguments)},O.addMessages("en",{defaultMessage:"This value seems to be invalid.",type:{email:"This value should be a valid email.",url:"This value should be a valid url.",number:"This value should be a valid number.",integer:"This value should be a valid integer.",digits:"This value should be digits.",alphanum:"This value should be alphanumeric."},notblank:"This value should not be blank.",required:"This value is required.",pattern:"This value seems to be invalid.",min:"This value should be greater than or equal to %s.",max:"This value should be lower than or equal to %s.",range:"This value should be between %s and %s.",minlength:"This value is too short. It should have %s characters or more.",maxlength:"This value is too long. It should have %s characters or fewer.",length:"This value length is invalid. It should be between %s and %s characters long.",mincheck:"You must select at least %s choices.",maxcheck:"You must select %s choices or fewer.",check:"You must select between %s and %s choices.",equalto:"This value should be the same."}),O.setLocale("en");var I=new n;I.install();var q=O;return q});jQuery(document).ready(function(e){function a(e,a){l(e,a),e.find(a.container).first().show()}function n(a,n){if(n.tabs){var t=e("<div />",{"class":n.tabMenuClassName}).insertBefore(a.children(n.container).filter(":first"));a.children(n.container).each(function(i,r){var l=e("<button/>").html(e(this).children(n.header).html()).addClass(0==i?n.tabMenuItemActiveClassName:"").addClass("item"+i).addClass("btn btn-default").prop("type","button").on("click keypress",{container:a.children(n.container),fieldset:e(r)},function(){var t=e(this),i=t.parent().children().index(t);s(a,n,t,i)});n.tabIndex&&l.prop("tabindex",i),t.append(l)})}}function t(a,n){n.navigation&&a.children(n.container).each(function(t){var i=e("<div />").addClass("powermail_fieldwrap").addClass("powermail_tab_navigation").appendTo(e(this));t>0&&i.append(c(a,n)),t<a.children(n.container).length-1&&i.append(o(a,n))})}function i(a,n){e.fn.parsley&&"data-parsley-validate"===a.data("parsley-validate")&&a.parsley().subscribe("parsley:field:validated",function(){v(a,n),C(a,n)})}function r(a,n){n.openTabOnError&&e.fn.parsley&&e.listen("parsley:field:error",function(){setTimeout(function(){a.find("."+n.tabMenuClassName+" > ."+n.tabMenuItemErrorClassName+":first").click()},50)})}function s(a,n,t,i){$activeTab=b(a,n),$activeTab.removeClass(n.tabMenuItemActiveClassName),t.addClass(n.tabMenuItemActiveClassName),l(a,n),e(".powermail_fieldset",a).slice(i,i+1).show()}function l(e,a){e.children(a.container).hide()}function c(a,n){return e("<a />").prop("href","#").addClass("btn btn-warning").html("<").click(function(e){e.preventDefault(),u(a,n)})}function o(a,n){return e("<a />").prop("href","#").addClass("btn btn-primary pull-right").html(">").click(function(e){e.preventDefault(),d(a,n)})}function d(e,a){var n=m(e,a);$activeTab=b(e,a),$activeTab.removeClass(a.tabMenuItemActiveClassName).next().addClass(a.tabMenuItemActiveClassName),f(e,a,n+1)}function u(e,a){var n=m(e,a);$activeTab=b(e,a),$activeTab.removeClass(a.tabMenuItemActiveClassName).prev().addClass(a.tabMenuItemActiveClassName),f(e,a,n-1)}function f(e,a,n){l(e,a),e.find(".powermail_fieldset").slice(n,n+1).show()}function m(e,a){var n=p(e,a),t=n.index(b(e,a));return parseInt(t)}function p(e,a){return e.find("."+a.tabMenuClassName).children()}function b(e,a){var n=p(e,a);return n.filter("."+a.tabMenuItemActiveClassName)}function v(e,a){var n=p(e,a);n.removeClass(a.tabMenuItemErrorClassName)}function C(a,n){a.parsley().isValid()||a.find(".parsley-error").each(function(){var t=a.find(".powermail_fieldset").index(e(this).closest(".powermail_fieldset")),i=p(a,n),r=i.slice(t,t+1);r.addClass(n.tabMenuItemErrorClassName)})}e.fn.powermailTabs=function(e){"use strict";var s=jQuery(this);e=jQuery.extend({container:"fieldset",header:"legend",tabs:!0,navigation:!0,openTabOnError:!0,tabIndex:!0,tabMenuClassName:"btn-group",tabMenuItemActiveClassName:"btn-primary",tabMenuItemErrorClassName:"btn-danger"},e),a(s,e),n(s,e),t(s,e),i(s,e),r(s,e)}});function PowermailForm(e){"use strict";this.initialize=function(){t(),a(),i(),r(),o(),n(),f(),l()};var t=function(){e.fn.powermailTabs&&e(".powermail_morestep").each(function(){e(this).powermailTabs()})},a=function(){e("form[data-powermail-ajax]").length&&p()},i=function(){if(e('*[data-powermail-location="prefill"]').length&&navigator.geolocation){e(this);navigator.geolocation.getCurrentPosition(function(t){var a=t.coords.latitude,i=t.coords.longitude,r=C()+"/index.php?eID=powermailEidGetLocation";jQuery.ajax({url:r,data:"lat="+a+"&lng="+i,cache:!1,success:function(t){t&&e('*[data-powermail-location="prefill"]').val(t)}})})}},r=function(){e.fn.datetimepicker&&e(".powermail_date").each(function(){var t=e(this);if("date"===t.prop("type")||"datetime-local"===t.prop("type")||"time"===t.prop("type")){if(!t.data("datepicker-force")){if(e(this).data("date-value")){var a=g(e(this).data("date-value"),e(this).data("datepicker-format"),t.prop("type"));null!==a&&e(this).val(a)}return}t.prop("type","text"),t.val(e(this).data("date-value"))}var i=!0,r=!0;"date"===t.data("datepicker-settings")?r=!1:"time"===t.data("datepicker-settings")&&(i=!1),t.datetimepicker({format:t.data("datepicker-format"),timepicker:r,datepicker:i,lang:"en",i18n:{en:{months:t.data("datepicker-months").split(","),dayOfWeek:t.data("datepicker-days").split(",")}}})})},o=function(){e(".powermail_all_type_password.powermail_all_value").html("********")},n=function(){e.fn.parsley&&e(".powermail_reset").on("click","",function(){e('form[data-parsley-validate="data-parsley-validate"]').parsley().reset()})},l=function(){window.Parsley&&(x(),b())},p=function(){var t,a=!1;e(document).on("submit","form[data-powermail-ajax]",function(i){var r=e(this),o=r.closest(".tx-powermail");r.data("powermail-ajax-uri")&&(t=r.data("powermail-ajax-uri"));var n=r.data("powermail-form");a||(e.ajax({type:"POST",url:r.prop("action"),data:new FormData(r.get(0)),contentType:!1,processData:!1,beforeSend:function(){s(r)},complete:function(){d(r),f(),c(o)},success:function(i){var o=e('*[data-powermail-form="'+n+'"]:first',i);o.length?(e('*[data-powermail-form="'+n+'"]:first').closest(".tx-powermail").html(o),e.fn.powermailTabs&&e(".powermail_morestep").powermailTabs(),e.fn.parsley&&e('form[data-parsley-validate="data-parsley-validate"]').parsley(),w()):(t?D(t):r.submit(),a=!0)}}),i.preventDefault())})},s=function(t){d(t),e(".powermail_submit",t).length?e(".powermail_submit",t).parent().append(y()):t.closest(".tx-powermail").append(y())},d=function(e){e.closest(".tx-powermail").find(".powermail_progressbar").remove()},c=function(t){var a=e.Event("submitted.powermail.form");t.trigger(a)},f=function(){e(".powermail_fieldwrap_file").find(".deleteAllFiles").each(function(){u(e(this).closest(".powermail_fieldwrap_file").find('input[type="file"]'))}),e(".deleteAllFiles").click(function(){m(e(this).closest(".powermail_fieldwrap_file").find('input[type="hidden"]')),e(this).closest("ul").fadeOut(function(){e(this).remove()})})},u=function(e){e.prop("disabled","disabled").addClass("hide").prop("type","hidden")},m=function(e){e.prop("disabled",!1).removeClass("hide").prop("type","file")},w=function(){e("img.powermail_captchaimage").each(function(){var t=h(e(this).prop("src"));e(this).prop("src",t+"?hash="+v(5))})},h=function(e){var t=e.split("?");return t[0]},v=function(e){for(var t="",a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",i=0;i<e;i++)t+=a.charAt(Math.floor(Math.random()*a.length));return t},g=function(e,t,a){var i=Date.parseDate(e,t);if(null===i)return null;var r=new Date(i),o=r.getFullYear()+"-";o+=("0"+(r.getMonth()+1)).slice(-2)+"-",o+=("0"+r.getDate()).slice(-2);var n=("0"+r.getHours()).slice(-2)+":"+("0"+r.getMinutes()).slice(-2),l=o+"T"+n;return"date"===a?o:"datetime-local"===a?l:"time"===a?n:null},y=function(){return e("<div />").addClass("powermail_progressbar").html(e("<div />").addClass("powermail_progress").html(e("<div />").addClass("powermail_progress_inner")))},_=function(e){for(var t=e.get(0),a=0,i=0;i<t.files.length;i++){var r=t.files[i];r.size>a&&(a=r.size)}return parseInt(a)},x=function(){window.Parsley.addValidator("powermailfilesize",function(t,a){if(a.indexOf(",")!==-1){var i=a.split(","),r=parseInt(i[0]),o=e('*[name="tx_powermail_pi1[field]['+i[1]+'][]"]');if(o.length&&_(o)>r)return!1}return!0},32).addMessage("en","powermailfilesize","Error")},b=function(){window.Parsley.addValidator("powermailfileextensions",function(t,a){var i=e('*[name="tx_powermail_pi1[field]['+a+'][]"]');return!i.length||k(j(t),i.prop("accept"))},32).addMessage("en","powermailfileextensions","Error")},k=function(e,t){return t.indexOf("."+e)!==-1},j=function(e){return e.split(".").pop().toLowerCase()},D=function(e){e.indexOf("http")!==-1?window.location=e:window.location.pathname=e},C=function(){var t;return t=e("base").length>0?jQuery("base").prop("href"):"https:"!=window.location.protocol?"http://"+window.location.hostname:"https://"+window.location.hostname}}jQuery(document).ready(function(e){"use strict";var t=new window.PowermailForm(e);t.initialize()});var isVisible=function(element){return $(element).is(':visible');};var breakpoints=function(){var breakpoints={},breakpoint_selector,breakpoint_isVisible;var init=function(){$('.bp_checking').each(function(){manage($(this).attr('id'));});$(window).on('resize',function(){$.each(breakpoints,function(breakpoint_id){manage(breakpoint_id);});});};var is=function(breakpoint){return breakpoints[breakpoint];};var manage=function(breakpoint_id){breakpoint_selector='#'+breakpoint_id;breakpoint_isVisible=isVisible(breakpoint_selector);breakpoints[breakpoint_id]=breakpoint_isVisible;};return{init:init,is:is};}();breakpoints.init();var sliderGallery=function(){var gallery='.portfolio-slider-init',slider=false;var init=function(){manage();$(window).on('resize',function(){waitForFinalEvent(function(){manage();},200,"sliderGallery");});};var manage=function(){var isMobile=breakpoints.is('bp_mobile');if(isMobile&&!slider){build();}else if(!isMobile&&slider){destroy();}};var build=function(){var acctive_date=$('.portfolio .col-md-4.active').index();slider=$(gallery).addClass('owl-carousel');$('.portfolio-slider-init').owlCarousel({slideBy:1,nav:true,margin:15,dots:false,navText:['<i class="fa fa-angle-left"></i>','<i class="fa fa-angle-right"></i>'],responsive:{0:{items:1,},600:{items:2,},768:{items:2,},992:{items:3,}}});$('.portfolio-slider-init').trigger("to.owl.carousel",[acctive_date,500,true]);$('.portfolio-slider-init').trigger('refresh.owl.carousel');};var destroy=function(){slider.trigger('destroy.owl.carousel');slider=false;$(gallery).removeClass('owl-carousel');};return{init:init};}();var waitForFinalEvent=(function(){var timers={};return function(callback,ms,uniqueId){if(!uniqueId){uniqueId="Don't call this twice without a uniqueId";}
if(timers[uniqueId]){clearTimeout(timers[uniqueId]);}
timers[uniqueId]=setTimeout(callback,ms);};})();$(document).ready(function(){var month1;var month;var selCat=0;var days;$(".cat-filter ul a").click(function(){month1=$('.mobile-month li.active a').attr('data-month');month=$('.mobile-month li.active a').attr('month');selCat=$(this).attr('cat');days=$('.mobile-days li.active a').attr('days');if(days==null)
{days=1;}});$(".mobile-month li a").click(function(){month1=$(this).attr('data-month');month=$(this).attr('month');selCat=$(".cat-filter li.active a").attr('cat');days=$('.mobile-days li.active a').attr('days');if(selCat==null)
{selCat=0;}});$(".mobile-days li a").click(function(){month1=$('.mobile-month li.active a').attr('data-month');month=$('.mobile-month li.active a').attr('month');selCat=$(".cat-filter li.active a").attr('cat');if(selCat==null)
{selCat=0;}});$(".desktop-month li a").click(function(){month1=$(this).attr('data-month');month=$(this).attr('month');active_month=$(this).parent().find('.btn-main').attr('data-month');$('.topMonth.desktop-month li').each(function(){ans=$(this).children().data('month');if(active_month==ans){$(this).siblings().removeClass('active');$(this).addClass('active');}});});setTimeout(function(){sliderGallery.init();},200);if($('.eventCalender-section').length){var curr_month_text=$('.eventCalender-section .mobile-month li.active a').data('month');$('.selected-month').html(curr_month_text+' <i class="fa fa-angle-down" aria-hidden="true"></i>');$('.selected-month').on('click',function(){$(this).parents('.eventCalender-section-wrapper').find('.portfolio-nav').toggle();});var curr_cat_text=$('.eventCalender-section .cat-filter li.active a').data('category');if(curr_cat_text=="*"){var curr_cat_new_text="All";}
$('.selected-category').html(curr_cat_new_text+' <i class="fa fa-angle-down" aria-hidden="true"></i>');$('.selected-category').on('click',function(){$(this).parents('.eventCalender-section-wrapper').find('.category-nav').toggle();});var curr_day=$('.eventCalender-section .mobile-days li.active a').data('days');$('.selected-day').html(curr_day+' <i class="fa fa-angle-down" aria-hidden="true"></i>');$('.selected-day').on('click',function(){$(this).parents('.eventCalender-section-wrapper').find('ul.mobile-days').toggle();});}
$('.intro-section .text-center').each(function(){var $this=$(this);if($this.html().replace(/\s|&nbsp;/g,'').length==0)
$this.remove();});$('.tx-cnty-calendar .cus-loader').hide();$('.portfolio-item').each(function(){days=new Date().getDate();var desktop_final_days=days-1;if($(this).data('date')<=desktop_final_days)
{$(this).remove();}});$('.load-month').click(function(e){$('.mobile-days li.active').removeClass('active');if(month==new Date().getMonth()+1)
{if(selCat==0)
{days=new Date().getDate();$('.selected-day').html(new Date().getDate()+' <i class="fa fa-angle-down" aria-hidden="true"></i>');}
else{days=$(".portfolio-slider-init .owl-stage .owl-item .portfolio-item").attr('data-date');$('.selected-day').html(days+' <i class="fa fa-angle-down" aria-hidden="true"></i>');}}
else{days=1;$('.selected-day').html(days+' <i class="fa fa-angle-down" aria-hidden="true"></i>');}
for(i=1;i<=31;i++){$('a:contains('+i+')').css("display","block");}
if($(this).data('days'))
{days=$(this).data('days');$('.selected-day').html(days+' <i class="fa fa-angle-down" aria-hidden="true"></i>');}
if($(this).data('cat'))
{selCat=$(this).data('cat');selCatName=$(this).data('catname');if(selCatName=="All"){var selCatName="All";$('.portfolio-nav-cat .firstAll').hide();}
else{$('.portfolio-nav-cat .firstAll').show();}
$('.selected-category').html(selCatName+' <i class="fa fa-angle-down" aria-hidden="true"></i>');}
var date=new Date();var lastDay=new Date(date.getFullYear(),month,0);var i;for(i=lastDay.getDate()+1;i<=31;i++){$('a:contains('+i+')').css("display","none");}
$('.selected-month').html(month1+' <i class="fa fa-angle-down" aria-hidden="true"></i>');if(winw()<1026){$(this).parents('.eventCalender-section-wrapper').find('.portfolio-nav').hide();$(this).parents('.eventCalender-section-wrapper').find('.category-nav').hide();}
$(this).parent().siblings().removeClass('active');$(this).parent().addClass('active');active_month=$(this).parent().find('.btn-main').attr('data-month');$('#parent .desktop-month li').each(function(){ans=$(this).attr('class');if(active_month==ans){$(this).siblings().removeClass('active');$(this).addClass('active');}});var href=$(this).attr('href');var detailPid=$(this).attr('detailPid');var storedPages=$(this).attr('storedPages');$('.portfolio').fadeOut('fast');$('.mobile-days').fadeOut('fast');$('.tx-cnty-calendar .cus-loader').fadeIn('fast');$.ajax({type:"POST",url:href,data:{"tx_cntycalendar_entry[result][month]":month,"tx_cntycalendar_entry[result][days]":days,"tx_cntycalendar_entry[result][detailPid]":detailPid,"tx_cntycalendar_entry[result][storedPages]":storedPages,"tx_cntycalendar_entry[result][selCat]":selCat,},success:function(data){$('.tx-cnty-calendar .cus-loader').fadeOut('fast');$('.portfolio').html(data).fadeIn('fast',function(){if(winw()<1026){$('.portfolio-item').filter(function(){var final_days=days-1;return $(this).data('date')<=final_days;}).hide();var slide_item=parseInt($('.portfolio-slider-init').find('.portfolio-item').length);var acctive_date=$('.portfolio .col-md-4.active').index();$('#portfolio .col-md-4.active').index();}else{var activecat=$('.cat-filter').find('.active a').data('category');$('[data-category="*"]').trigger('click');$('[data-category="'+activecat+'"]').trigger('click');var slide_item=parseInt($('.portfolio-slider-init').find('.portfolio-item').length);setTimeout(function(){$('.portfolio-slider-init').isotope('destroy');},1000);}});const observer=lozad();observer.observe();}});e.preventDefault();});$('.load-day').click(function(e){var selected_day=$(this).data('days');$('.selected-day').html(selected_day+' <i class="fa fa-angle-down" aria-hidden="true"></i>');$(this).parents('.eventCalender-section-wrapper').find('.mobile-days').hide();$(this).parent().siblings().removeClass('active');$(this).parent().addClass('active');$('.portfolio').find(".portfolio-item").removeClass('active');$('.portfolio .portfolio-item[data-date = '+selected_day+']').addClass('active');setTimeout(function(){var active_day=$('.portfolio .portfolio-item.active').index();$('.portfolio-slider-init').trigger("to.owl.carousel",[active_day,500,true]);},300);e.preventDefault();});});function winh(){return $(window).height();}
function winw(){return $(window).width();}
$(function(){$("#tx_cookies_accept").submit(function(e){e.preventDefault();const d=new Date();d.setTime(d.getTime()+($(this).attr("data-expire")*24*60*60*1000));const expires='expires='+d.toUTCString();document.cookie='tx_cookies_accepted=1;'+expires+';path=/;samesite=strict';$("#tx_cookies_close").click();$("#tx_cookies").fadeOut('slow');});var cookiesAccepted=readCookie("tx_cookies_accepted");console.log(cookiesAccepted);if(!cookiesAccepted){$("#tx_cookies").fadeIn('slow');}});function readCookie(name){var nameEQ=name+"=";var ca=document.cookie.split(';');for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==' ')c=c.substring(1,c.length);if(c.indexOf(nameEQ)==0)return c.substring(nameEQ.length,c.length);}
return null;}
function onYouTubeIframeAPIReady(){ytp.YTAPIReady||(ytp.YTAPIReady=!0,jQuery(document).trigger("YTAPIReady"))}function uncamel(t){return t.replace(/([A-Z])/g,function(t){return"-"+t.toLowerCase()})}function setUnit(t,e){return"string"!=typeof t||t.match(/^[\-0-9\.]+jQuery/)?""+t+e:t}function setFilter(t,e,i){var n=uncamel(e),r=jQuery.browser.mozilla?"":jQuery.CSS.sfx;t[r+"filter"]=t[r+"filter"]||"",i=setUnit(i>jQuery.CSS.filters[e].max?jQuery.CSS.filters[e].max:i,jQuery.CSS.filters[e].unit),t[r+"filter"]+=n+"("+i+") ",delete t[e]}if(!function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof exports?module.exports=t(require("jquery")):t(jQuery)}(function(t){"use strict";var e="animsition",i={init:function(n){n=t.extend({inClass:"fade-in",outClass:"fade-out",inDuration:1500,outDuration:800,linkElement:".animsition-link",loading:!0,loadingParentElement:"body",loadingClass:"animsition-loading",loadingInner:"",timeout:!1,timeoutCountdown:5e3,onLoadEvent:!0,browser:["animation-duration","-webkit-animation-duration"],overlay:!1,overlayClass:"animsition-overlay-slide",overlayParentElement:"body",transition:function(t){window.location.href=t}},n),i.settings={timer:!1,data:{inClass:"animsition-in-class",inDuration:"animsition-in-duration",outClass:"animsition-out-class",outDuration:"animsition-out-duration",overlay:"animsition-overlay"},events:{inStart:"animsition.inStart",inEnd:"animsition.inEnd",outStart:"animsition.outStart",outEnd:"animsition.outEnd"}};var r=i.supportCheck.call(this,n);if(!r&&n.browser.length>0&&(!r||!this.length))return"console"in window||(window.console={},window.console.log=function(t){return t}),this.length||console.log("Animsition: Element does not exist on page."),r||console.log("Animsition: Does not support this browser."),i.destroy.call(this);var o=i.optionCheck.call(this,n);return o&&t("."+n.overlayClass).length<=0&&i.addOverlay.call(this,n),n.loading&&t("."+n.loadingClass).length<=0&&i.addLoading.call(this,n),this.each(function(){var r=this,o=t(this),s=t(window),a=t(document),l=o.data(e);l||(n=t.extend({},n),o.data(e,{options:n}),n.timeout&&i.addTimer.call(r),n.onLoadEvent&&s.on("load."+e,function(){i.settings.timer&&clearTimeout(i.settings.timer),i["in"].call(r)}),s.on("pageshow."+e,function(t){t.originalEvent.persisted&&i["in"].call(r)}),s.on("unload."+e,function(){}),a.on("click."+e,n.linkElement,function(e){e.preventDefault();var n=t(this),o=n.attr("href");2===e.which||e.metaKey||e.shiftKey||-1!==navigator.platform.toUpperCase().indexOf("WIN")&&e.ctrlKey?window.open(o,"_blank"):i.out.call(r,n,o)}))})},addOverlay:function(e){t(e.overlayParentElement).prepend('<div class="'+e.overlayClass+'"></div>')},addLoading:function(e){t(e.loadingParentElement).append('<div class="'+e.loadingClass+'">'+e.loadingInner+"</div>")},removeLoading:function(){var i=t(this),n=i.data(e).options,r=t(n.loadingParentElement).children("."+n.loadingClass);r.fadeOut().remove()},addTimer:function(){var n=this,r=t(this),o=r.data(e).options;i.settings.timer=setTimeout(function(){i["in"].call(n),t(window).off("load."+e)},o.timeoutCountdown)},supportCheck:function(e){var i=t(this),n=e.browser,r=n.length,o=!1;0===r&&(o=!0);for(var s=0;r>s;s++)if("string"==typeof i.css(n[s])){o=!0;break}return o},optionCheck:function(e){var n,r=t(this);return n=!(!e.overlay&&!r.data(i.settings.data.overlay))},animationCheck:function(i,n,r){var o=t(this),s=o.data(e).options,a=typeof i,l=!n&&"number"===a,u=n&&"string"===a&&i.length>0;return l||u?i=i:n&&r?i=s.inClass:!n&&r?i=s.inDuration:n&&!r?i=s.outClass:n||r||(i=s.outDuration),i},"in":function(){var n=this,r=t(this),o=r.data(e).options,s=r.data(i.settings.data.inDuration),a=r.data(i.settings.data.inClass),l=i.animationCheck.call(n,s,!1,!0),u=i.animationCheck.call(n,a,!0,!0),c=i.optionCheck.call(n,o),d=r.data(e).outClass;o.loading&&i.removeLoading.call(n),d&&r.removeClass(d),c?i.inOverlay.call(n,u,l):i.inDefault.call(n,u,l)},inDefault:function(e,n){var r=t(this);r.css({"animation-duration":n+"ms"}).addClass(e).trigger(i.settings.events.inStart).animateCallback(function(){r.removeClass(e).css({opacity:1}).trigger(i.settings.events.inEnd)})},inOverlay:function(n,r){var o=t(this),s=o.data(e).options;o.css({opacity:1}).trigger(i.settings.events.inStart),t(s.overlayParentElement).children("."+s.overlayClass).css({"animation-duration":r+"ms"}).addClass(n).animateCallback(function(){o.trigger(i.settings.events.inEnd)})},out:function(n,r){var o=this,s=t(this),a=s.data(e).options,l=n.data(i.settings.data.outClass),u=s.data(i.settings.data.outClass),c=n.data(i.settings.data.outDuration),d=s.data(i.settings.data.outDuration),h=l?l:u,p=c?c:d,f=i.animationCheck.call(o,h,!0,!1),m=i.animationCheck.call(o,p,!1,!1),g=i.optionCheck.call(o,a);s.data(e).outClass=f,g?i.outOverlay.call(o,f,m,r):i.outDefault.call(o,f,m,r)},outDefault:function(n,r,o){var s=t(this),a=s.data(e).options;s.css({"animation-duration":r+1+"ms"}).addClass(n).trigger(i.settings.events.outStart).animateCallback(function(){s.trigger(i.settings.events.outEnd),a.transition(o)})},outOverlay:function(n,r,o){var s=this,a=t(this),l=a.data(e).options,u=a.data(i.settings.data.inClass),c=i.animationCheck.call(s,u,!0,!0);t(l.overlayParentElement).children("."+l.overlayClass).css({"animation-duration":r+1+"ms"}).removeClass(c).addClass(n).trigger(i.settings.events.outStart).animateCallback(function(){a.trigger(i.settings.events.outEnd),l.transition(o)})},destroy:function(){return this.each(function(){var i=t(this);t(window).off("."+e),i.css({opacity:1}).removeData(e)})}};t.fn.animateCallback=function(e){var i="animationend webkitAnimationEnd";return this.each(function(){var n=t(this);n.on(i,function(){return n.off(i),e.call(this)})})},t.fn.animsition=function(n){return i[n]?i[n].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof n&&n?void t.error("Method "+n+" does not exist on jQuery."+e):i.init.apply(this,arguments)}}),!function(t){"function"==typeof define&&define.amd?define(["jquery"],function(e){return t(e)}):"object"==typeof module&&"object"==typeof module.exports?exports=t(require("jquery")):t(jQuery)}(function(t){function e(t){var e=7.5625,i=2.75;return 1/i>t?e*t*t:2/i>t?e*(t-=1.5/i)*t+.75:2.5/i>t?e*(t-=2.25/i)*t+.9375:e*(t-=2.625/i)*t+.984375}t.easing.jswing=t.easing.swing;var i=Math.pow,n=Math.sqrt,r=Math.sin,o=Math.cos,s=Math.PI,a=1.70158,l=1.525*a,u=2*s/3,c=2*s/4.5;t.extend(t.easing,{def:"easeOutQuad",swing:function(e){return t.easing[t.easing.def](e)},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return 1-(1-t)*(1-t)},easeInOutQuad:function(t){return.5>t?2*t*t:1-i(-2*t+2,2)/2},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return 1-i(1-t,3)},easeInOutCubic:function(t){return.5>t?4*t*t*t:1-i(-2*t+2,3)/2},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return 1-i(1-t,4)},easeInOutQuart:function(t){return.5>t?8*t*t*t*t:1-i(-2*t+2,4)/2},easeInQuint:function(t){return t*t*t*t*t},easeOutQuint:function(t){return 1-i(1-t,5)},easeInOutQuint:function(t){return.5>t?16*t*t*t*t*t:1-i(-2*t+2,5)/2},easeInSine:function(t){return 1-o(t*s/2)},easeOutSine:function(t){return r(t*s/2)},easeInOutSine:function(t){return-(o(s*t)-1)/2},easeInExpo:function(t){return 0===t?0:i(2,10*t-10)},easeOutExpo:function(t){return 1===t?1:1-i(2,-10*t)},easeInOutExpo:function(t){return 0===t?0:1===t?1:.5>t?i(2,20*t-10)/2:(2-i(2,-20*t+10))/2},easeInCirc:function(t){return 1-n(1-i(t,2))},easeOutCirc:function(t){return n(1-i(t-1,2))},easeInOutCirc:function(t){return.5>t?(1-n(1-i(2*t,2)))/2:(n(1-i(-2*t+2,2))+1)/2},easeInElastic:function(t){return 0===t?0:1===t?1:-i(2,10*t-10)*r((10*t-10.75)*u)},easeOutElastic:function(t){return 0===t?0:1===t?1:i(2,-10*t)*r((10*t-.75)*u)+1},easeInOutElastic:function(t){return 0===t?0:1===t?1:.5>t?-(i(2,20*t-10)*r((20*t-11.125)*c))/2:i(2,-20*t+10)*r((20*t-11.125)*c)/2+1},easeInBack:function(t){return(a+1)*t*t*t-a*t*t},easeOutBack:function(t){return 1+(a+1)*i(t-1,3)+a*i(t-1,2)},easeInOutBack:function(t){return.5>t?i(2*t,2)*(7.189819*t-l)/2:(i(2*t-2,2)*((l+1)*(2*t-2)+l)+2)/2},easeInBounce:function(t){return 1-e(1-t)},easeOutBounce:e,easeInOutBounce:function(t){return.5>t?(1-e(1-2*t))/2:(1+e(2*t-1))/2}})}),"undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(t){"use strict";var e=t.fn.jquery.split(" ")[0].split(".");if(e[0]<2&&e[1]<9||1==e[0]&&9==e[1]&&e[2]<1||e[0]>3)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4")}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var i=t(this),r=i.data("bs.alert");r||i.data("bs.alert",r=new n(this)),"string"==typeof e&&r[e].call(i)})}var i='[data-dismiss="alert"]',n=function(e){t(e).on("click",i,this.close)};n.VERSION="3.3.7",n.TRANSITION_DURATION=150,n.prototype.close=function(e){function i(){s.detach().trigger("closed.bs.alert").remove()}var r=t(this),o=r.attr("data-target");o||(o=r.attr("href"),o=o&&o.replace(/.*(?=#[^\s]*$)/,""));var s=t("#"===o?[]:o);e&&e.preventDefault(),s.length||(s=r.closest(".alert")),s.trigger(e=t.Event("close.bs.alert")),e.isDefaultPrevented()||(s.removeClass("in"),t.support.transition&&s.hasClass("fade")?s.one("bsTransitionEnd",i).emulateTransitionEnd(n.TRANSITION_DURATION):i())};var r=t.fn.alert;t.fn.alert=e,t.fn.alert.Constructor=n,t.fn.alert.noConflict=function(){return t.fn.alert=r,this},t(document).on("click.bs.alert.data-api",i,n.prototype.close)}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var n=t(this),r=n.data("bs.button"),o="object"==typeof e&&e;r||n.data("bs.button",r=new i(this,o)),"toggle"==e?r.toggle():e&&r.setState(e)})}var i=function(e,n){this.$element=t(e),this.options=t.extend({},i.DEFAULTS,n),this.isLoading=!1};i.VERSION="3.3.7",i.DEFAULTS={loadingText:"loading..."},i.prototype.setState=function(e){var i="disabled",n=this.$element,r=n.is("input")?"val":"html",o=n.data();e+="Text",null==o.resetText&&n.data("resetText",n[r]()),setTimeout(t.proxy(function(){n[r](null==o[e]?this.options[e]:o[e]),"loadingText"==e?(this.isLoading=!0,n.addClass(i).attr(i,i).prop(i,!0)):this.isLoading&&(this.isLoading=!1,n.removeClass(i).removeAttr(i).prop(i,!1))},this),0)},i.prototype.toggle=function(){var t=!0,e=this.$element.closest('[data-toggle="buttons"]');if(e.length){var i=this.$element.find("input");"radio"==i.prop("type")?(i.prop("checked")&&(t=!1),e.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==i.prop("type")&&(i.prop("checked")!==this.$element.hasClass("active")&&(t=!1),this.$element.toggleClass("active")),i.prop("checked",this.$element.hasClass("active")),t&&i.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var n=t.fn.button;t.fn.button=e,t.fn.button.Constructor=i,t.fn.button.noConflict=function(){return t.fn.button=n,this},t(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(i){var n=t(i.target).closest(".btn");e.call(n,"toggle"),t(i.target).is('input[type="radio"], input[type="checkbox"]')||(i.preventDefault(),n.is("input,button")?n.trigger("focus"):n.find("input:visible,button:visible").first().trigger("focus"))}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(e){t(e.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(e.type))})}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var n=t(this),r=n.data("bs.carousel"),o=t.extend({},i.DEFAULTS,n.data(),"object"==typeof e&&e),s="string"==typeof e?e:o.slide;r||n.data("bs.carousel",r=new i(this,o)),"number"==typeof e?r.to(e):s?r[s]():o.interval&&r.pause().cycle()})}var i=function(e,i){this.$element=t(e),this.$indicators=this.$element.find(".carousel-indicators"),this.options=i,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",t.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",t.proxy(this.pause,this)).on("mouseleave.bs.carousel",t.proxy(this.cycle,this))};i.VERSION="3.3.7",i.TRANSITION_DURATION=600,i.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},i.prototype.keydown=function(t){if(!/input|textarea/i.test(t.target.tagName)){switch(t.which){case 37:this.prev();break;case 39:this.next();break;default:return}t.preventDefault()}},i.prototype.cycle=function(e){return e||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(t.proxy(this.next,this),this.options.interval)),this},i.prototype.getItemIndex=function(t){return this.$items=t.parent().children(".item"),this.$items.index(t||this.$active)},i.prototype.getItemForDirection=function(t,e){var i=this.getItemIndex(e),n="prev"==t&&0===i||"next"==t&&i==this.$items.length-1;if(n&&!this.options.wrap)return e;var r="prev"==t?-1:1,o=(i+r)%this.$items.length;return this.$items.eq(o)},i.prototype.to=function(t){var e=this,i=this.getItemIndex(this.$active=this.$element.find(".item.active"));return t>this.$items.length-1||0>t?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){e.to(t)}):i==t?this.pause().cycle():this.slide(t>i?"next":"prev",this.$items.eq(t))},i.prototype.pause=function(e){return e||(this.paused=!0),this.$element.find(".next, .prev").length&&t.support.transition&&(this.$element.trigger(t.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},i.prototype.next=function(){return this.sliding?void 0:this.slide("next")},i.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},i.prototype.slide=function(e,n){var r=this.$element.find(".item.active"),o=n||this.getItemForDirection(e,r),s=this.interval,a="next"==e?"left":"right",l=this;if(o.hasClass("active"))return this.sliding=!1;var u=o[0],c=t.Event("slide.bs.carousel",{relatedTarget:u,direction:a});if(this.$element.trigger(c),!c.isDefaultPrevented()){if(this.sliding=!0,s&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var d=t(this.$indicators.children()[this.getItemIndex(o)]);d&&d.addClass("active")}var h=t.Event("slid.bs.carousel",{relatedTarget:u,direction:a});return t.support.transition&&this.$element.hasClass("slide")?(o.addClass(e),o[0].offsetWidth,r.addClass(a),o.addClass(a),r.one("bsTransitionEnd",function(){o.removeClass([e,a].join(" ")).addClass("active"),r.removeClass(["active",a].join(" ")),l.sliding=!1,setTimeout(function(){l.$element.trigger(h)},0)}).emulateTransitionEnd(i.TRANSITION_DURATION)):(r.removeClass("active"),o.addClass("active"),this.sliding=!1,this.$element.trigger(h)),s&&this.cycle(),this}};var n=t.fn.carousel;t.fn.carousel=e,t.fn.carousel.Constructor=i,t.fn.carousel.noConflict=function(){return t.fn.carousel=n,this};var r=function(i){var n,r=t(this),o=t(r.attr("data-target")||(n=r.attr("href"))&&n.replace(/.*(?=#[^\s]+$)/,""));if(o.hasClass("carousel")){var s=t.extend({},o.data(),r.data()),a=r.attr("data-slide-to");a&&(s.interval=!1),e.call(o,s),a&&o.data("bs.carousel").to(a),i.preventDefault()}};t(document).on("click.bs.carousel.data-api","[data-slide]",r).on("click.bs.carousel.data-api","[data-slide-to]",r),t(window).on("load",function(){t('[data-ride="carousel"]').each(function(){var i=t(this);e.call(i,i.data())})})}(jQuery),+function(t){"use strict";function e(e){var i=e.attr("data-target");i||(i=e.attr("href"),i=i&&/#[A-Za-z]/.test(i)&&i.replace(/.*(?=#[^\s]*$)/,""));var n=i&&t(i);return n&&n.length?n:e.parent()}function i(i){i&&3===i.which||(t(r).remove(),t(o).each(function(){var n=t(this),r=e(n),o={relatedTarget:this};r.hasClass("open")&&(i&&"click"==i.type&&/input|textarea/i.test(i.target.tagName)&&t.contains(r[0],i.target)||(r.trigger(i=t.Event("hide.bs.dropdown",o)),i.isDefaultPrevented()||(n.attr("aria-expanded","false"),r.removeClass("open").trigger(t.Event("hidden.bs.dropdown",o)))))}))}function n(e){return this.each(function(){var i=t(this),n=i.data("bs.dropdown");n||i.data("bs.dropdown",n=new s(this)),"string"==typeof e&&n[e].call(i)})}var r=".dropdown-backdrop",o='[data-toggle="dropdown"]',s=function(e){t(e).on("click.bs.dropdown",this.toggle)};s.VERSION="3.3.7",s.prototype.toggle=function(n){var r=t(this);if(!r.is(".disabled, :disabled")){var o=e(r),s=o.hasClass("open");if(i(),!s){"ontouchstart"in document.documentElement&&!o.closest(".navbar-nav").length&&t(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(t(this)).on("click",i);var a={relatedTarget:this};if(o.trigger(n=t.Event("show.bs.dropdown",a)),n.isDefaultPrevented())return;r.trigger("focus").attr("aria-expanded","true"),o.toggleClass("open").trigger(t.Event("shown.bs.dropdown",a))}return!1}},s.prototype.keydown=function(i){if(/(38|40|27|32)/.test(i.which)&&!/input|textarea/i.test(i.target.tagName)){var n=t(this);if(i.preventDefault(),i.stopPropagation(),!n.is(".disabled, :disabled")){var r=e(n),s=r.hasClass("open");if(!s&&27!=i.which||s&&27==i.which)return 27==i.which&&r.find(o).trigger("focus"),n.trigger("click");var a=" li:not(.disabled):visible a",l=r.find(".dropdown-menu"+a);if(l.length){var u=l.index(i.target);38==i.which&&u>0&&u--,40==i.which&&u<l.length-1&&u++,~u||(u=0),l.eq(u).trigger("focus")}}}};var a=t.fn.dropdown;t.fn.dropdown=n,t.fn.dropdown.Constructor=s,t.fn.dropdown.noConflict=function(){return t.fn.dropdown=a,this},t(document).on("click.bs.dropdown.data-api",i).on("click.bs.dropdown.data-api",".dropdown form",function(t){t.stopPropagation()}).on("click.bs.dropdown.data-api",o,s.prototype.toggle).on("keydown.bs.dropdown.data-api",o,s.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",s.prototype.keydown)}(jQuery),+function(t){"use strict";function e(e,n){return this.each(function(){var r=t(this),o=r.data("bs.modal"),s=t.extend({},i.DEFAULTS,r.data(),"object"==typeof e&&e);o||r.data("bs.modal",o=new i(this,s)),"string"==typeof e?o[e](n):s.show&&o.show(n)})}var i=function(e,i){this.options=i,this.$body=t(document.body),this.$element=t(e),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,t.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};i.VERSION="3.3.7",i.TRANSITION_DURATION=300,i.BACKDROP_TRANSITION_DURATION=150,i.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},i.prototype.toggle=function(t){return this.isShown?this.hide():this.show(t)},i.prototype.show=function(e){var n=this,r=t.Event("show.bs.modal",{relatedTarget:e});this.$element.trigger(r),this.isShown||r.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',t.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){n.$element.one("mouseup.dismiss.bs.modal",function(e){t(e.target).is(n.$element)&&(n.ignoreBackdropClick=!0)})}),this.backdrop(function(){var r=t.support.transition&&n.$element.hasClass("fade");n.$element.parent().length||n.$element.appendTo(n.$body),n.$element.show().scrollTop(0),n.adjustDialog(),r&&n.$element[0].offsetWidth,n.$element.addClass("in"),n.enforceFocus();var o=t.Event("shown.bs.modal",{relatedTarget:e});r?n.$dialog.one("bsTransitionEnd",function(){n.$element.trigger("focus").trigger(o)}).emulateTransitionEnd(i.TRANSITION_DURATION):n.$element.trigger("focus").trigger(o)}))},i.prototype.hide=function(e){e&&e.preventDefault(),e=t.Event("hide.bs.modal"),this.$element.trigger(e),this.isShown&&!e.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),t(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),t.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",t.proxy(this.hideModal,this)).emulateTransitionEnd(i.TRANSITION_DURATION):this.hideModal())},i.prototype.enforceFocus=function(){t(document).off("focusin.bs.modal").on("focusin.bs.modal",t.proxy(function(t){document===t.target||this.$element[0]===t.target||this.$element.has(t.target).length||this.$element.trigger("focus")},this))},i.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",t.proxy(function(t){27==t.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},i.prototype.resize=function(){this.isShown?t(window).on("resize.bs.modal",t.proxy(this.handleUpdate,this)):t(window).off("resize.bs.modal")},i.prototype.hideModal=function(){var t=this;this.$element.hide(),this.backdrop(function(){t.$body.removeClass("modal-open"),t.resetAdjustments(),t.resetScrollbar(),t.$element.trigger("hidden.bs.modal")})},i.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},i.prototype.backdrop=function(e){var n=this,r=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var o=t.support.transition&&r;if(this.$backdrop=t(document.createElement("div")).addClass("modal-backdrop "+r).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",t.proxy(function(t){return this.ignoreBackdropClick?void(this.ignoreBackdropClick=!1):void(t.target===t.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide()))},this)),o&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!e)return;o?this.$backdrop.one("bsTransitionEnd",e).emulateTransitionEnd(i.BACKDROP_TRANSITION_DURATION):e()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var s=function(){n.removeBackdrop(),e&&e()};t.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",s).emulateTransitionEnd(i.BACKDROP_TRANSITION_DURATION):s()}else e&&e()},i.prototype.handleUpdate=function(){this.adjustDialog()},i.prototype.adjustDialog=function(){var t=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&t?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!t?this.scrollbarWidth:""})},i.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},i.prototype.checkScrollbar=function(){var t=window.innerWidth;if(!t){var e=document.documentElement.getBoundingClientRect();t=e.right-Math.abs(e.left)}this.bodyIsOverflowing=document.body.clientWidth<t,this.scrollbarWidth=this.measureScrollbar()},i.prototype.setScrollbar=function(){var t=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"",this.bodyIsOverflowing&&this.$body.css("padding-right",t+this.scrollbarWidth)},i.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad)},i.prototype.measureScrollbar=function(){var t=document.createElement("div");t.className="modal-scrollbar-measure",this.$body.append(t);var e=t.offsetWidth-t.clientWidth;return this.$body[0].removeChild(t),e};var n=t.fn.modal;t.fn.modal=e,t.fn.modal.Constructor=i,t.fn.modal.noConflict=function(){return t.fn.modal=n,this},t(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(i){var n=t(this),r=n.attr("href"),o=t(n.attr("data-target")||r&&r.replace(/.*(?=#[^\s]+$)/,"")),s=o.data("bs.modal")?"toggle":t.extend({remote:!/#/.test(r)&&r},o.data(),n.data());n.is("a")&&i.preventDefault(),o.one("show.bs.modal",function(t){t.isDefaultPrevented()||o.one("hidden.bs.modal",function(){n.is(":visible")&&n.trigger("focus")})}),e.call(o,s,this)})}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var n=t(this),r=n.data("bs.tooltip"),o="object"==typeof e&&e;!r&&/destroy|hide/.test(e)||(r||n.data("bs.tooltip",r=new i(this,o)),"string"==typeof e&&r[e]())})}var i=function(t,e){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.inState=null,this.init("tooltip",t,e)};i.VERSION="3.3.7",i.TRANSITION_DURATION=150,i.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},i.prototype.init=function(e,i,n){if(this.enabled=!0,this.type=e,this.$element=t(i),this.options=this.getOptions(n),this.$viewport=this.options.viewport&&t(t.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var r=this.options.trigger.split(" "),o=r.length;o--;){var s=r[o];if("click"==s)this.$element.on("click."+this.type,this.options.selector,t.proxy(this.toggle,this));else if("manual"!=s){var a="hover"==s?"mouseenter":"focusin",l="hover"==s?"mouseleave":"focusout";this.$element.on(a+"."+this.type,this.options.selector,t.proxy(this.enter,this)),this.$element.on(l+"."+this.type,this.options.selector,t.proxy(this.leave,this))}}this.options.selector?this._options=t.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},i.prototype.getDefaults=function(){return i.DEFAULTS},i.prototype.getOptions=function(e){return e=t.extend({},this.getDefaults(),this.$element.data(),e),e.delay&&"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),e},i.prototype.getDelegateOptions=function(){var e={},i=this.getDefaults();return this._options&&t.each(this._options,function(t,n){i[t]!=n&&(e[t]=n)}),e},i.prototype.enter=function(e){var i=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);return i||(i=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,i)),e instanceof t.Event&&(i.inState["focusin"==e.type?"focus":"hover"]=!0),i.tip().hasClass("in")||"in"==i.hoverState?void(i.hoverState="in"):(clearTimeout(i.timeout),i.hoverState="in",i.options.delay&&i.options.delay.show?void(i.timeout=setTimeout(function(){"in"==i.hoverState&&i.show()},i.options.delay.show)):i.show())},i.prototype.isInStateTrue=function(){for(var t in this.inState)if(this.inState[t])return!0;return!1},i.prototype.leave=function(e){var i=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);return i||(i=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,i)),e instanceof t.Event&&(i.inState["focusout"==e.type?"focus":"hover"]=!1),i.isInStateTrue()?void 0:(clearTimeout(i.timeout),i.hoverState="out",i.options.delay&&i.options.delay.hide?void(i.timeout=setTimeout(function(){"out"==i.hoverState&&i.hide()},i.options.delay.hide)):i.hide())},i.prototype.show=function(){var e=t.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(e);var n=t.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(e.isDefaultPrevented()||!n)return;var r=this,o=this.tip(),s=this.getUID(this.type);this.setContent(),o.attr("id",s),this.$element.attr("aria-describedby",s),this.options.animation&&o.addClass("fade");var a="function"==typeof this.options.placement?this.options.placement.call(this,o[0],this.$element[0]):this.options.placement,l=/\s?auto?\s?/i,u=l.test(a);u&&(a=a.replace(l,"")||"top"),o.detach().css({top:0,left:0,display:"block"}).addClass(a).data("bs."+this.type,this),this.options.container?o.appendTo(this.options.container):o.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var c=this.getPosition(),d=o[0].offsetWidth,h=o[0].offsetHeight;if(u){var p=a,f=this.getPosition(this.$viewport);a="bottom"==a&&c.bottom+h>f.bottom?"top":"top"==a&&c.top-h<f.top?"bottom":"right"==a&&c.right+d>f.width?"left":"left"==a&&c.left-d<f.left?"right":a,o.removeClass(p).addClass(a)}var m=this.getCalculatedOffset(a,c,d,h);this.applyPlacement(m,a);var g=function(){var t=r.hoverState;r.$element.trigger("shown.bs."+r.type),r.hoverState=null,"out"==t&&r.leave(r)};t.support.transition&&this.$tip.hasClass("fade")?o.one("bsTransitionEnd",g).emulateTransitionEnd(i.TRANSITION_DURATION):g()}},i.prototype.applyPlacement=function(e,i){var n=this.tip(),r=n[0].offsetWidth,o=n[0].offsetHeight,s=parseInt(n.css("margin-top"),10),a=parseInt(n.css("margin-left"),10);isNaN(s)&&(s=0),isNaN(a)&&(a=0),e.top+=s,e.left+=a,t.offset.setOffset(n[0],t.extend({using:function(t){n.css({top:Math.round(t.top),left:Math.round(t.left)})}},e),0),n.addClass("in");var l=n[0].offsetWidth,u=n[0].offsetHeight;"top"==i&&u!=o&&(e.top=e.top+o-u);var c=this.getViewportAdjustedDelta(i,e,l,u);c.left?e.left+=c.left:e.top+=c.top;var d=/top|bottom/.test(i),h=d?2*c.left-r+l:2*c.top-o+u,p=d?"offsetWidth":"offsetHeight";n.offset(e),this.replaceArrow(h,n[0][p],d)},i.prototype.replaceArrow=function(t,e,i){this.arrow().css(i?"left":"top",50*(1-t/e)+"%").css(i?"top":"left","")},i.prototype.setContent=function(){var t=this.tip(),e=this.getTitle();t.find(".tooltip-inner")[this.options.html?"html":"text"](e),t.removeClass("fade in top bottom left right")},i.prototype.hide=function(e){function n(){"in"!=r.hoverState&&o.detach(),r.$element&&r.$element.removeAttr("aria-describedby").trigger("hidden.bs."+r.type),e&&e()}var r=this,o=t(this.$tip),s=t.Event("hide.bs."+this.type);return this.$element.trigger(s),s.isDefaultPrevented()?void 0:(o.removeClass("in"),t.support.transition&&o.hasClass("fade")?o.one("bsTransitionEnd",n).emulateTransitionEnd(i.TRANSITION_DURATION):n(),this.hoverState=null,this)},i.prototype.fixTitle=function(){var t=this.$element;(t.attr("title")||"string"!=typeof t.attr("data-original-title"))&&t.attr("data-original-title",t.attr("title")||"").attr("title","")},i.prototype.hasContent=function(){return this.getTitle()},i.prototype.getPosition=function(e){e=e||this.$element;var i=e[0],n="BODY"==i.tagName,r=i.getBoundingClientRect();null==r.width&&(r=t.extend({},r,{width:r.right-r.left,height:r.bottom-r.top}));var o=window.SVGElement&&i instanceof window.SVGElement,s=n?{top:0,left:0}:o?null:e.offset(),a={scroll:n?document.documentElement.scrollTop||document.body.scrollTop:e.scrollTop()},l=n?{width:t(window).width(),height:t(window).height()}:null;return t.extend({},r,a,l,s)},i.prototype.getCalculatedOffset=function(t,e,i,n){return"bottom"==t?{top:e.top+e.height,left:e.left+e.width/2-i/2}:"top"==t?{top:e.top-n,left:e.left+e.width/2-i/2}:"left"==t?{top:e.top+e.height/2-n/2,left:e.left-i}:{top:e.top+e.height/2-n/2,left:e.left+e.width}},i.prototype.getViewportAdjustedDelta=function(t,e,i,n){var r={top:0,left:0};if(!this.$viewport)return r;var o=this.options.viewport&&this.options.viewport.padding||0,s=this.getPosition(this.$viewport);if(/right|left/.test(t)){var a=e.top-o-s.scroll,l=e.top+o-s.scroll+n;a<s.top?r.top=s.top-a:l>s.top+s.height&&(r.top=s.top+s.height-l)}else{var u=e.left-o,c=e.left+o+i;u<s.left?r.left=s.left-u:c>s.right&&(r.left=s.left+s.width-c)}return r},i.prototype.getTitle=function(){var t,e=this.$element,i=this.options;return t=e.attr("data-original-title")||("function"==typeof i.title?i.title.call(e[0]):i.title)},i.prototype.getUID=function(t){do t+=~~(1e6*Math.random());while(document.getElementById(t));return t},i.prototype.tip=function(){if(!this.$tip&&(this.$tip=t(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},i.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},i.prototype.enable=function(){this.enabled=!0;},i.prototype.disable=function(){this.enabled=!1},i.prototype.toggleEnabled=function(){this.enabled=!this.enabled},i.prototype.toggle=function(e){var i=this;e&&(i=t(e.currentTarget).data("bs."+this.type),i||(i=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,i))),e?(i.inState.click=!i.inState.click,i.isInStateTrue()?i.enter(i):i.leave(i)):i.tip().hasClass("in")?i.leave(i):i.enter(i)},i.prototype.destroy=function(){var t=this;clearTimeout(this.timeout),this.hide(function(){t.$element.off("."+t.type).removeData("bs."+t.type),t.$tip&&t.$tip.detach(),t.$tip=null,t.$arrow=null,t.$viewport=null,t.$element=null})};var n=t.fn.tooltip;t.fn.tooltip=e,t.fn.tooltip.Constructor=i,t.fn.tooltip.noConflict=function(){return t.fn.tooltip=n,this}}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var n=t(this),r=n.data("bs.popover"),o="object"==typeof e&&e;!r&&/destroy|hide/.test(e)||(r||n.data("bs.popover",r=new i(this,o)),"string"==typeof e&&r[e]())})}var i=function(t,e){this.init("popover",t,e)};if(!t.fn.tooltip)throw new Error("Popover requires tooltip.js");i.VERSION="3.3.7",i.DEFAULTS=t.extend({},t.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),i.prototype=t.extend({},t.fn.tooltip.Constructor.prototype),i.prototype.constructor=i,i.prototype.getDefaults=function(){return i.DEFAULTS},i.prototype.setContent=function(){var t=this.tip(),e=this.getTitle(),i=this.getContent();t.find(".popover-title")[this.options.html?"html":"text"](e),t.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof i?"html":"append":"text"](i),t.removeClass("fade top bottom left right in"),t.find(".popover-title").html()||t.find(".popover-title").hide()},i.prototype.hasContent=function(){return this.getTitle()||this.getContent()},i.prototype.getContent=function(){var t=this.$element,e=this.options;return t.attr("data-content")||("function"==typeof e.content?e.content.call(t[0]):e.content)},i.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var n=t.fn.popover;t.fn.popover=e,t.fn.popover.Constructor=i,t.fn.popover.noConflict=function(){return t.fn.popover=n,this}}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var n=t(this),r=n.data("bs.tab");r||n.data("bs.tab",r=new i(this)),"string"==typeof e&&r[e]()})}var i=function(e){this.element=t(e)};i.VERSION="3.3.7",i.TRANSITION_DURATION=150,i.prototype.show=function(){var e=this.element,i=e.closest("ul:not(.dropdown-menu)"),n=e.data("target");if(n||(n=e.attr("href"),n=n&&n.replace(/.*(?=#[^\s]*$)/,"")),!e.parent("li").hasClass("active")){var r=i.find(".active:last a"),o=t.Event("hide.bs.tab",{relatedTarget:e[0]}),s=t.Event("show.bs.tab",{relatedTarget:r[0]});if(r.trigger(o),e.trigger(s),!s.isDefaultPrevented()&&!o.isDefaultPrevented()){var a=t(n);this.activate(e.closest("li"),i),this.activate(a,a.parent(),function(){r.trigger({type:"hidden.bs.tab",relatedTarget:e[0]}),e.trigger({type:"shown.bs.tab",relatedTarget:r[0]})})}}},i.prototype.activate=function(e,n,r){function o(){s.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),e.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),a?(e[0].offsetWidth,e.addClass("in")):e.removeClass("fade"),e.parent(".dropdown-menu").length&&e.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),r&&r()}var s=n.find("> .active"),a=r&&t.support.transition&&(s.length&&s.hasClass("fade")||!!n.find("> .fade").length);s.length&&a?s.one("bsTransitionEnd",o).emulateTransitionEnd(i.TRANSITION_DURATION):o(),s.removeClass("in")};var n=t.fn.tab;t.fn.tab=e,t.fn.tab.Constructor=i,t.fn.tab.noConflict=function(){return t.fn.tab=n,this};var r=function(i){i.preventDefault(),e.call(t(this),"show")};t(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',r).on("click.bs.tab.data-api",'[data-toggle="pill"]',r)}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var n=t(this),r=n.data("bs.affix"),o="object"==typeof e&&e;r||n.data("bs.affix",r=new i(this,o)),"string"==typeof e&&r[e]()})}var i=function(e,n){this.options=t.extend({},i.DEFAULTS,n),this.$target=t(this.options.target).on("scroll.bs.affix.data-api",t.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",t.proxy(this.checkPositionWithEventLoop,this)),this.$element=t(e),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};i.VERSION="3.3.7",i.RESET="affix affix-top affix-bottom",i.DEFAULTS={offset:0,target:window},i.prototype.getState=function(t,e,i,n){var r=this.$target.scrollTop(),o=this.$element.offset(),s=this.$target.height();if(null!=i&&"top"==this.affixed)return i>r?"top":!1;if("bottom"==this.affixed)return null!=i?r+this.unpin<=o.top?!1:"bottom":t-n>=r+s?!1:"bottom";var a=null==this.affixed,l=a?r:o.top,u=a?s:e;return null!=i&&i>=r?"top":null!=n&&l+u>=t-n?"bottom":!1},i.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(i.RESET).addClass("affix");var t=this.$target.scrollTop(),e=this.$element.offset();return this.pinnedOffset=e.top-t},i.prototype.checkPositionWithEventLoop=function(){setTimeout(t.proxy(this.checkPosition,this),1)},i.prototype.checkPosition=function(){if(this.$element.is(":visible")){var e=this.$element.height(),n=this.options.offset,r=n.top,o=n.bottom,s=Math.max(t(document).height(),t(document.body).height());"object"!=typeof n&&(o=r=n),"function"==typeof r&&(r=n.top(this.$element)),"function"==typeof o&&(o=n.bottom(this.$element));var a=this.getState(s,e,r,o);if(this.affixed!=a){null!=this.unpin&&this.$element.css("top","");var l="affix"+(a?"-"+a:""),u=t.Event(l+".bs.affix");if(this.$element.trigger(u),u.isDefaultPrevented())return;this.affixed=a,this.unpin="bottom"==a?this.getPinnedOffset():null,this.$element.removeClass(i.RESET).addClass(l).trigger(l.replace("affix","affixed")+".bs.affix")}"bottom"==a&&this.$element.offset({top:s-e-o})}};var n=t.fn.affix;t.fn.affix=e,t.fn.affix.Constructor=i,t.fn.affix.noConflict=function(){return t.fn.affix=n,this},t(window).on("load",function(){t('[data-spy="affix"]').each(function(){var i=t(this),n=i.data();n.offset=n.offset||{},null!=n.offsetBottom&&(n.offset.bottom=n.offsetBottom),null!=n.offsetTop&&(n.offset.top=n.offsetTop),e.call(i,n)})})}(jQuery),+function(t){"use strict";function e(e){var i,n=e.attr("data-target")||(i=e.attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,"");return t(n)}function i(e){return this.each(function(){var i=t(this),r=i.data("bs.collapse"),o=t.extend({},n.DEFAULTS,i.data(),"object"==typeof e&&e);!r&&o.toggle&&/show|hide/.test(e)&&(o.toggle=!1),r||i.data("bs.collapse",r=new n(this,o)),"string"==typeof e&&r[e]()})}var n=function(e,i){this.$element=t(e),this.options=t.extend({},n.DEFAULTS,i),this.$trigger=t('[data-toggle="collapse"][href="#'+e.id+'"],[data-toggle="collapse"][data-target="#'+e.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};n.VERSION="3.3.7",n.TRANSITION_DURATION=350,n.DEFAULTS={toggle:!0},n.prototype.dimension=function(){var t=this.$element.hasClass("width");return t?"width":"height"},n.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var e,r=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(r&&r.length&&(e=r.data("bs.collapse"),e&&e.transitioning))){var o=t.Event("show.bs.collapse");if(this.$element.trigger(o),!o.isDefaultPrevented()){r&&r.length&&(i.call(r,"hide"),e||r.data("bs.collapse",null));var s=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[s](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var a=function(){this.$element.removeClass("collapsing").addClass("collapse in")[s](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!t.support.transition)return a.call(this);var l=t.camelCase(["scroll",s].join("-"));this.$element.one("bsTransitionEnd",t.proxy(a,this)).emulateTransitionEnd(n.TRANSITION_DURATION)[s](this.$element[0][l])}}}},n.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var e=t.Event("hide.bs.collapse");if(this.$element.trigger(e),!e.isDefaultPrevented()){var i=this.dimension();this.$element[i](this.$element[i]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var r=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return t.support.transition?void this.$element[i](0).one("bsTransitionEnd",t.proxy(r,this)).emulateTransitionEnd(n.TRANSITION_DURATION):r.call(this)}}},n.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},n.prototype.getParent=function(){return t(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(t.proxy(function(i,n){var r=t(n);this.addAriaAndCollapsedClass(e(r),r)},this)).end()},n.prototype.addAriaAndCollapsedClass=function(t,e){var i=t.hasClass("in");t.attr("aria-expanded",i),e.toggleClass("collapsed",!i).attr("aria-expanded",i)};var r=t.fn.collapse;t.fn.collapse=i,t.fn.collapse.Constructor=n,t.fn.collapse.noConflict=function(){return t.fn.collapse=r,this},t(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(n){var r=t(this);r.attr("data-target")||n.preventDefault();var o=e(r),s=o.data("bs.collapse"),a=s?"toggle":r.data();i.call(o,a)})}(jQuery),+function(t){"use strict";function e(i,n){this.$body=t(document.body),this.$scrollElement=t(t(i).is(document.body)?window:i),this.options=t.extend({},e.DEFAULTS,n),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",t.proxy(this.process,this)),this.refresh(),this.process()}function i(i){return this.each(function(){var n=t(this),r=n.data("bs.scrollspy"),o="object"==typeof i&&i;r||n.data("bs.scrollspy",r=new e(this,o)),"string"==typeof i&&r[i]()})}e.VERSION="3.3.7",e.DEFAULTS={offset:10},e.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},e.prototype.refresh=function(){var e=this,i="offset",n=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),t.isWindow(this.$scrollElement[0])||(i="position",n=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var e=t(this),r=e.data("target")||e.attr("href"),o=/^#./.test(r)&&t(r);return o&&o.length&&o.is(":visible")&&[[o[i]().top+n,r]]||null}).sort(function(t,e){return t[0]-e[0]}).each(function(){e.offsets.push(this[0]),e.targets.push(this[1])})},e.prototype.process=function(){var t,e=this.$scrollElement.scrollTop()+this.options.offset,i=this.getScrollHeight(),n=this.options.offset+i-this.$scrollElement.height(),r=this.offsets,o=this.targets,s=this.activeTarget;if(this.scrollHeight!=i&&this.refresh(),e>=n)return s!=(t=o[o.length-1])&&this.activate(t);if(s&&e<r[0])return this.activeTarget=null,this.clear();for(t=r.length;t--;)s!=o[t]&&e>=r[t]&&(void 0===r[t+1]||e<r[t+1])&&this.activate(o[t])},e.prototype.activate=function(e){this.activeTarget=e,this.clear();var i=this.selector+'[data-target="'+e+'"],'+this.selector+'[href="'+e+'"]',n=t(i).parents("li").addClass("active");n.parent(".dropdown-menu").length&&(n=n.closest("li.dropdown").addClass("active")),n.trigger("activate.bs.scrollspy")},e.prototype.clear=function(){t(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var n=t.fn.scrollspy;t.fn.scrollspy=i,t.fn.scrollspy.Constructor=e,t.fn.scrollspy.noConflict=function(){return t.fn.scrollspy=n,this},t(window).on("load.bs.scrollspy.data-api",function(){t('[data-spy="scroll"]').each(function(){var e=t(this);i.call(e,e.data())})})}(jQuery),+function(t){"use strict";function e(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var i in e)if(void 0!==t.style[i])return{end:e[i]};return!1}t.fn.emulateTransitionEnd=function(e){var i=!1,n=this;t(this).one("bsTransitionEnd",function(){i=!0});var r=function(){i||t(n).trigger(t.support.transition.end)};return setTimeout(r,e),this},t(function(){t.support.transition=e(),t.support.transition&&(t.event.special.bsTransitionEnd={bindType:t.support.transition.end,delegateType:t.support.transition.end,handle:function(e){return t(e.target).is(this)?e.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),!function(t,e,i){"object"==typeof module&&module&&"object"==typeof module.exports?module.exports=i:(t[e]=i,"function"==typeof define&&define.amd&&define(e,[],function(){return i}))}(this,"jRespond",function(t,e,i){"use strict";return function(t){var e=[],n=[],r=t,o="",s="",a=0,l=100,u=500,c=u,d=function(){var t=0;return t="number"!=typeof window.innerWidth?0!==document.documentElement.clientWidth?document.documentElement.clientWidth:document.body.clientWidth:window.innerWidth},h=function(t){if(t.length===i)p(t);else for(var e=0;e<t.length;e++)p(t[e])},p=function(t){var r=t.breakpoint,a=t.enter||i;e.push(t),n.push(!1),g(r)&&(a!==i&&a.call(null,{entering:o,exiting:s}),n[e.length-1]=!0)},f=function(){for(var t=[],r=[],a=0;a<e.length;a++){var l=e[a].breakpoint,u=e[a].enter||i,c=e[a].exit||i;"*"===l?(u!==i&&t.push(u),c!==i&&r.push(c)):g(l)?(u===i||n[a]||t.push(u),n[a]=!0):(c!==i&&n[a]&&r.push(c),n[a]=!1)}for(var d={entering:o,exiting:s},h=0;h<r.length;h++)r[h].call(null,d);for(var p=0;p<t.length;p++)t[p].call(null,d)},m=function(t){for(var e=!1,i=0;i<r.length;i++)if(t>=r[i].enter&&t<=r[i].exit){e=!0;break}e&&o!==r[i].label?(s=o,o=r[i].label,f()):e||""===o||(o="",f())},g=function(t){if("object"==typeof t){if(t.join().indexOf(o)>=0)return!0}else{if("*"===t)return!0;if("string"==typeof t&&o===t)return!0}},y=function(){var t=d();t!==a?(c=l,m(t)):c=u,a=t,setTimeout(y,c)};return y(),{addFunc:function(t){h(t)},getBreakpoint:function(){return o}}}}(this,this.document)),function(t){t.fn.appear=function(e,i){var n=t.extend({data:void 0,one:!0,accX:0,accY:0},i);return this.each(function(){var i=t(this);if(i.appeared=!1,!e)return void i.trigger("appear",n.data);var r=t(window),o=function(){if(!i.is(":visible"))return void(i.appeared=!1);var t=r.scrollLeft(),e=r.scrollTop(),o=i.offset(),s=o.left,a=o.top,l=n.accX,u=n.accY,c=i.height(),d=r.height(),h=i.width(),p=r.width();a+c+u>=e&&e+d+u>=a&&s+h+l>=t&&t+p+l>=s?i.appeared||i.trigger("appear",n.data):i.appeared=!1},s=function(){if(i.appeared=!0,n.one){r.unbind("scroll",o);var s=t.inArray(o,t.fn.appear.checks);s>=0&&t.fn.appear.checks.splice(s,1)}e.apply(this,arguments)};n.one?i.one("appear",n.data,s):i.bind("appear",n.data,s),r.scroll(o),t.fn.appear.checks.push(o),o()})},t.extend(t.fn.appear,{checks:[],timeout:null,checkAll:function(){var e=t.fn.appear.checks.length;if(e>0)for(;e--;)t.fn.appear.checks[e]()},run:function(){t.fn.appear.timeout&&clearTimeout(t.fn.appear.timeout),t.fn.appear.timeout=setTimeout(t.fn.appear.checkAll,20)}}),t.each(["append","prepend","after","before","attr","removeAttr","addClass","removeClass","toggleClass","remove","css","show","hide"],function(e,i){var n=t.fn[i];n&&(t.fn[i]=function(){var e=n.apply(this,arguments);return t.fn.appear.run(),e})})}(jQuery),!function(t,e){"function"==typeof define&&define.amd?define("jquery-bridget/jquery-bridget",["jquery"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("jquery")):t.jQueryBridget=e(t,t.jQuery)}(window,function(t,e){"use strict";function i(i,o,a){function l(t,e,n){var r,o="$()."+i+'("'+e+'")';return t.each(function(t,l){var u=a.data(l,i);if(!u)return void s(i+" not initialized. Cannot call methods, i.e. "+o);var c=u[e];if(!c||"_"==e.charAt(0))return void s(o+" is not a valid method");var d=c.apply(u,n);r=void 0===r?d:r}),void 0!==r?r:t}function u(t,e){t.each(function(t,n){var r=a.data(n,i);r?(r.option(e),r._init()):(r=new o(n,e),a.data(n,i,r))})}a=a||e||t.jQuery,a&&(o.prototype.option||(o.prototype.option=function(t){a.isPlainObject(t)&&(this.options=a.extend(!0,this.options,t))}),a.fn[i]=function(t){if("string"==typeof t){var e=r.call(arguments,1);return l(this,t,e)}return u(this,t),this},n(a))}function n(t){!t||t&&t.bridget||(t.bridget=i)}var r=Array.prototype.slice,o=t.console,s="undefined"==typeof o?function(){}:function(t){o.error(t)};return n(e||t.jQuery),i}),function(t,e){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",e):"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,function(){function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var i=this._events=this._events||{},n=i[t]=i[t]||[];return-1==n.indexOf(e)&&n.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var i=this._onceEvents=this._onceEvents||{},n=i[t]=i[t]||{};return n[e]=!0,this}},e.off=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var n=i.indexOf(e);return-1!=n&&i.splice(n,1),this}},e.emitEvent=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var n=0,r=i[n];e=e||[];for(var o=this._onceEvents&&this._onceEvents[t];r;){var s=o&&o[r];s&&(this.off(t,r),delete o[r]),r.apply(this,e),n+=s?0:1,r=i[n]}return this}},t}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("get-size/get-size",[],function(){return e()}):"object"==typeof module&&module.exports?module.exports=e():t.getSize=e()}(window,function(){"use strict";function t(t){var e=parseFloat(t),i=-1==t.indexOf("%")&&!isNaN(e);return i&&e}function e(){}function i(){for(var t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},e=0;u>e;e++){var i=l[e];t[i]=0}return t}function n(t){var e=getComputedStyle(t);return e||a("Style returned "+e+". Are you running this code in a hidden iframe on Firefox? See http://bit.ly/getsizebug1"),e}function r(){if(!c){c=!0;var e=document.createElement("div");e.style.width="200px",e.style.padding="1px 2px 3px 4px",e.style.borderStyle="solid",e.style.borderWidth="1px 2px 3px 4px",e.style.boxSizing="border-box";var i=document.body||document.documentElement;i.appendChild(e);var r=n(e);o.isBoxSizeOuter=s=200==t(r.width),i.removeChild(e)}}function o(e){if(r(),"string"==typeof e&&(e=document.querySelector(e)),e&&"object"==typeof e&&e.nodeType){var o=n(e);if("none"==o.display)return i();var a={};a.width=e.offsetWidth,a.height=e.offsetHeight;for(var c=a.isBorderBox="border-box"==o.boxSizing,d=0;u>d;d++){var h=l[d],p=o[h],f=parseFloat(p);a[h]=isNaN(f)?0:f}var m=a.paddingLeft+a.paddingRight,g=a.paddingTop+a.paddingBottom,y=a.marginLeft+a.marginRight,v=a.marginTop+a.marginBottom,b=a.borderLeftWidth+a.borderRightWidth,T=a.borderTopWidth+a.borderBottomWidth,w=c&&s,P=t(o.width);P!==!1&&(a.width=P+(w?0:m+b));var x=t(o.height);return x!==!1&&(a.height=x+(w?0:g+T)),a.innerWidth=a.width-(m+b),a.innerHeight=a.height-(g+T),a.outerWidth=a.width+y,a.outerHeight=a.height+v,a}}var s,a="undefined"==typeof console?e:function(t){console.error(t)},l=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],u=l.length,c=!1;return o}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("desandro-matches-selector/matches-selector",e):"object"==typeof module&&module.exports?module.exports=e():t.matchesSelector=e()}(window,function(){"use strict";var t=function(){var t=window.Element.prototype;if(t.matches)return"matches";if(t.matchesSelector)return"matchesSelector";for(var e=["webkit","moz","ms","o"],i=0;i<e.length;i++){var n=e[i],r=n+"MatchesSelector";if(t[r])return r}}();return function(e,i){return e[t](i)}}),function(t,e){"function"==typeof define&&define.amd?define("fizzy-ui-utils/utils",["desandro-matches-selector/matches-selector"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("desandro-matches-selector")):t.fizzyUIUtils=e(t,t.matchesSelector)}(window,function(t,e){var i={};i.extend=function(t,e){for(var i in e)t[i]=e[i];return t},i.modulo=function(t,e){return(t%e+e)%e},i.makeArray=function(t){var e=[];if(Array.isArray(t))e=t;else if(t&&"object"==typeof t&&"number"==typeof t.length)for(var i=0;i<t.length;i++)e.push(t[i]);else e.push(t);return e},i.removeFrom=function(t,e){var i=t.indexOf(e);-1!=i&&t.splice(i,1)},i.getParent=function(t,i){for(;t.parentNode&&t!=document.body;)if(t=t.parentNode,e(t,i))return t},i.getQueryElement=function(t){return"string"==typeof t?document.querySelector(t):t},i.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},i.filterFindElements=function(t,n){t=i.makeArray(t);var r=[];return t.forEach(function(t){if(t instanceof HTMLElement){if(!n)return void r.push(t);e(t,n)&&r.push(t);for(var i=t.querySelectorAll(n),o=0;o<i.length;o++)r.push(i[o])}}),r},i.debounceMethod=function(t,e,i){var n=t.prototype[e],r=e+"Timeout";t.prototype[e]=function(){var t=this[r];t&&clearTimeout(t);var e=arguments,o=this;this[r]=setTimeout(function(){n.apply(o,e),delete o[r]},i||100)}},i.docReady=function(t){var e=document.readyState;"complete"==e||"interactive"==e?setTimeout(t):document.addEventListener("DOMContentLoaded",t)},i.toDashed=function(t){return t.replace(/(.)([A-Z])/g,function(t,e,i){return e+"-"+i}).toLowerCase()};var n=t.console;return i.htmlInit=function(e,r){i.docReady(function(){var o=i.toDashed(r),s="data-"+o,a=document.querySelectorAll("["+s+"]"),l=document.querySelectorAll(".js-"+o),u=i.makeArray(a).concat(i.makeArray(l)),c=s+"-options",d=t.jQuery;u.forEach(function(t){var i,o=t.getAttribute(s)||t.getAttribute(c);try{i=o&&JSON.parse(o)}catch(a){return void(n&&n.error("Error parsing "+s+" on "+t.className+": "+a))}var l=new e(t,i);d&&d.data(t,r,l)})})},i}),function(t,e){"function"==typeof define&&define.amd?define("outlayer/item",["ev-emitter/ev-emitter","get-size/get-size"],e):"object"==typeof module&&module.exports?module.exports=e(require("ev-emitter"),require("get-size")):(t.Outlayer={},t.Outlayer.Item=e(t.EvEmitter,t.getSize))}(window,function(t,e){"use strict";function i(t){for(var e in t)return!1;return e=null,!0}function n(t,e){t&&(this.element=t,this.layout=e,this.position={x:0,y:0},this._create())}function r(t){return t.replace(/([A-Z])/g,function(t){return"-"+t.toLowerCase()})}var o=document.documentElement.style,s="string"==typeof o.transition?"transition":"WebkitTransition",a="string"==typeof o.transform?"transform":"WebkitTransform",l={WebkitTransition:"webkitTransitionEnd",transition:"transitionend"}[s],u={transform:a,transition:s,transitionDuration:s+"Duration",transitionProperty:s+"Property",transitionDelay:s+"Delay"},c=n.prototype=Object.create(t.prototype);c.constructor=n,c._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},c.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},c.getSize=function(){this.size=e(this.element)},c.css=function(t){var e=this.element.style;for(var i in t){var n=u[i]||i;e[n]=t[i]}},c.getPosition=function(){var t=getComputedStyle(this.element),e=this.layout._getOption("originLeft"),i=this.layout._getOption("originTop"),n=t[e?"left":"right"],r=t[i?"top":"bottom"],o=this.layout.size,s=-1!=n.indexOf("%")?parseFloat(n)/100*o.width:parseInt(n,10),a=-1!=r.indexOf("%")?parseFloat(r)/100*o.height:parseInt(r,10);s=isNaN(s)?0:s,a=isNaN(a)?0:a,s-=e?o.paddingLeft:o.paddingRight,a-=i?o.paddingTop:o.paddingBottom,this.position.x=s,this.position.y=a},c.layoutPosition=function(){var t=this.layout.size,e={},i=this.layout._getOption("originLeft"),n=this.layout._getOption("originTop"),r=i?"paddingLeft":"paddingRight",o=i?"left":"right",s=i?"right":"left",a=this.position.x+t[r];e[o]=this.getXValue(a),e[s]="";var l=n?"paddingTop":"paddingBottom",u=n?"top":"bottom",c=n?"bottom":"top",d=this.position.y+t[l];e[u]=this.getYValue(d),e[c]="",this.css(e),this.emitEvent("layout",[this])},c.getXValue=function(t){var e=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&!e?t/this.layout.size.width*100+"%":t+"px"},c.getYValue=function(t){var e=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&e?t/this.layout.size.height*100+"%":t+"px"},c._transitionTo=function(t,e){this.getPosition();var i=this.position.x,n=this.position.y,r=parseInt(t,10),o=parseInt(e,10),s=r===this.position.x&&o===this.position.y;if(this.setPosition(t,e),s&&!this.isTransitioning)return void this.layoutPosition();var a=t-i,l=e-n,u={};u.transform=this.getTranslate(a,l),this.transition({to:u,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})},c.getTranslate=function(t,e){var i=this.layout._getOption("originLeft"),n=this.layout._getOption("originTop");return t=i?t:-t,e=n?e:-e,"translate3d("+t+"px, "+e+"px, 0)"},c.goTo=function(t,e){this.setPosition(t,e),this.layoutPosition()},c.moveTo=c._transitionTo,c.setPosition=function(t,e){this.position.x=parseInt(t,10),this.position.y=parseInt(e,10)},c._nonTransition=function(t){this.css(t.to),t.isCleaning&&this._removeStyles(t.to);for(var e in t.onTransitionEnd)t.onTransitionEnd[e].call(this)},c.transition=function(t){if(!parseFloat(this.layout.options.transitionDuration))return void this._nonTransition(t);var e=this._transn;for(var i in t.onTransitionEnd)e.onEnd[i]=t.onTransitionEnd[i];for(i in t.to)e.ingProperties[i]=!0,t.isCleaning&&(e.clean[i]=!0);if(t.from){this.css(t.from);var n=this.element.offsetHeight;n=null}this.enableTransition(t.to),this.css(t.to),this.isTransitioning=!0};var d="opacity,"+r(a);c.enableTransition=function(){if(!this.isTransitioning){var t=this.layout.options.transitionDuration;t="number"==typeof t?t+"ms":t,this.css({transitionProperty:d,transitionDuration:t,transitionDelay:this.staggerDelay||0}),this.element.addEventListener(l,this,!1)}},c.onwebkitTransitionEnd=function(t){this.ontransitionend(t)},c.onotransitionend=function(t){this.ontransitionend(t)};var h={"-webkit-transform":"transform"};c.ontransitionend=function(t){if(t.target===this.element){var e=this._transn,n=h[t.propertyName]||t.propertyName;if(delete e.ingProperties[n],i(e.ingProperties)&&this.disableTransition(),n in e.clean&&(this.element.style[t.propertyName]="",delete e.clean[n]),n in e.onEnd){var r=e.onEnd[n];r.call(this),delete e.onEnd[n]}this.emitEvent("transitionEnd",[this])}},c.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(l,this,!1),this.isTransitioning=!1},c._removeStyles=function(t){var e={};for(var i in t)e[i]="";this.css(e)};var p={transitionProperty:"",transitionDuration:"",transitionDelay:""};return c.removeTransitionStyles=function(){this.css(p)},c.stagger=function(t){t=isNaN(t)?0:t,this.staggerDelay=t+"ms"},c.removeElem=function(){this.element.parentNode.removeChild(this.element),this.css({display:""}),this.emitEvent("remove",[this])},c.remove=function(){return s&&parseFloat(this.layout.options.transitionDuration)?(this.once("transitionEnd",function(){this.removeElem()}),void this.hide()):void this.removeElem()},c.reveal=function(){delete this.isHidden,this.css({display:""});var t=this.layout.options,e={},i=this.getHideRevealTransitionEndProperty("visibleStyle");e[i]=this.onRevealTransitionEnd,this.transition({from:t.hiddenStyle,to:t.visibleStyle,isCleaning:!0,onTransitionEnd:e})},c.onRevealTransitionEnd=function(){this.isHidden||this.emitEvent("reveal")},c.getHideRevealTransitionEndProperty=function(t){var e=this.layout.options[t];if(e.opacity)return"opacity";for(var i in e)return i},c.hide=function(){this.isHidden=!0,this.css({display:""});var t=this.layout.options,e={},i=this.getHideRevealTransitionEndProperty("hiddenStyle");e[i]=this.onHideTransitionEnd,this.transition({from:t.visibleStyle,to:t.hiddenStyle,isCleaning:!0,onTransitionEnd:e})},c.onHideTransitionEnd=function(){this.isHidden&&(this.css({display:"none"}),this.emitEvent("hide"))},c.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},n}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("outlayer/outlayer",["ev-emitter/ev-emitter","get-size/get-size","fizzy-ui-utils/utils","./item"],function(i,n,r,o){return e(t,i,n,r,o)}):"object"==typeof module&&module.exports?module.exports=e(t,require("ev-emitter"),require("get-size"),require("fizzy-ui-utils"),require("./item")):t.Outlayer=e(t,t.EvEmitter,t.getSize,t.fizzyUIUtils,t.Outlayer.Item)}(window,function(t,e,i,n,r){"use strict";function o(t,e){var i=n.getQueryElement(t);if(!i)return void(l&&l.error("Bad element for "+this.constructor.namespace+": "+(i||t)));this.element=i,u&&(this.$element=u(this.element)),this.options=n.extend({},this.constructor.defaults),this.option(e);var r=++d;this.element.outlayerGUID=r,h[r]=this,this._create();var o=this._getOption("initLayout");o&&this.layout()}function s(t){function e(){t.apply(this,arguments)}return e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e}function a(t){if("number"==typeof t)return t;var e=t.match(/(^\d*\.?\d*)(\w*)/),i=e&&e[1],n=e&&e[2];if(!i.length)return 0;i=parseFloat(i);var r=f[n]||1;return i*r}var l=t.console,u=t.jQuery,c=function(){},d=0,h={};o.namespace="outlayer",o.Item=r,o.defaults={containerStyle:{position:"relative"},initLayout:!0,originLeft:!0,originTop:!0,resize:!0,resizeContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}};var p=o.prototype;n.extend(p,e.prototype),p.option=function(t){n.extend(this.options,t)},p._getOption=function(t){var e=this.constructor.compatOptions[t];return e&&void 0!==this.options[e]?this.options[e]:this.options[t]},o.compatOptions={initLayout:"isInitLayout",horizontal:"isHorizontal",layoutInstant:"isLayoutInstant",originLeft:"isOriginLeft",originTop:"isOriginTop",resize:"isResizeBound",resizeContainer:"isResizingContainer"},p._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),n.extend(this.element.style,this.options.containerStyle);var t=this._getOption("resize");t&&this.bindResize()},p.reloadItems=function(){this.items=this._itemize(this.element.children)},p._itemize=function(t){for(var e=this._filterFindItemElements(t),i=this.constructor.Item,n=[],r=0;r<e.length;r++){var o=e[r],s=new i(o,this);n.push(s)}return n},p._filterFindItemElements=function(t){return n.filterFindElements(t,this.options.itemSelector)},p.getItemElements=function(){return this.items.map(function(t){return t.element})},p.layout=function(){this._resetLayout(),this._manageStamps();var t=this._getOption("layoutInstant"),e=void 0!==t?t:!this._isLayoutInited;this.layoutItems(this.items,e),this._isLayoutInited=!0},p._init=p.layout,p._resetLayout=function(){this.getSize()},p.getSize=function(){this.size=i(this.element)},p._getMeasurement=function(t,e){var n,r=this.options[t];r?("string"==typeof r?n=this.element.querySelector(r):r instanceof HTMLElement&&(n=r),this[t]=n?i(n)[e]:r):this[t]=0},p.layoutItems=function(t,e){t=this._getItemsForLayout(t),this._layoutItems(t,e),this._postLayout()},p._getItemsForLayout=function(t){return t.filter(function(t){return!t.isIgnored})},p._layoutItems=function(t,e){if(this._emitCompleteOnItems("layout",t),t&&t.length){var i=[];t.forEach(function(t){var n=this._getItemLayoutPosition(t);n.item=t,n.isInstant=e||t.isLayoutInstant,i.push(n)},this),this._processLayoutQueue(i)}},p._getItemLayoutPosition=function(){return{x:0,y:0}},p._processLayoutQueue=function(t){this.updateStagger(),t.forEach(function(t,e){this._positionItem(t.item,t.x,t.y,t.isInstant,e)},this)},p.updateStagger=function(){var t=this.options.stagger;return null===t||void 0===t?void(this.stagger=0):(this.stagger=a(t),this.stagger)},p._positionItem=function(t,e,i,n,r){n?t.goTo(e,i):(t.stagger(r*this.stagger),t.moveTo(e,i))},p._postLayout=function(){this.resizeContainer()},p.resizeContainer=function(){var t=this._getOption("resizeContainer");if(t){var e=this._getContainerSize();e&&(this._setContainerMeasure(e.width,!0),this._setContainerMeasure(e.height,!1))}},p._getContainerSize=c,p._setContainerMeasure=function(t,e){if(void 0!==t){var i=this.size;i.isBorderBox&&(t+=e?i.paddingLeft+i.paddingRight+i.borderLeftWidth+i.borderRightWidth:i.paddingBottom+i.paddingTop+i.borderTopWidth+i.borderBottomWidth),t=Math.max(t,0),this.element.style[e?"width":"height"]=t+"px"}},p._emitCompleteOnItems=function(t,e){function i(){r.dispatchEvent(t+"Complete",null,[e])}function n(){s++,s==o&&i()}var r=this,o=e.length;if(!e||!o)return void i();var s=0;e.forEach(function(e){e.once(t,n)})},p.dispatchEvent=function(t,e,i){var n=e?[e].concat(i):i;if(this.emitEvent(t,n),u)if(this.$element=this.$element||u(this.element),e){var r=u.Event(e);r.type=t,this.$element.trigger(r,i)}else this.$element.trigger(t,i)},p.ignore=function(t){var e=this.getItem(t);e&&(e.isIgnored=!0)},p.unignore=function(t){var e=this.getItem(t);e&&delete e.isIgnored},p.stamp=function(t){t=this._find(t),t&&(this.stamps=this.stamps.concat(t),t.forEach(this.ignore,this))},p.unstamp=function(t){t=this._find(t),t&&t.forEach(function(t){n.removeFrom(this.stamps,t),this.unignore(t)},this)},p._find=function(t){return t?("string"==typeof t&&(t=this.element.querySelectorAll(t)),t=n.makeArray(t)):void 0},p._manageStamps=function(){this.stamps&&this.stamps.length&&(this._getBoundingRect(),this.stamps.forEach(this._manageStamp,this))},p._getBoundingRect=function(){var t=this.element.getBoundingClientRect(),e=this.size;this._boundingRect={left:t.left+e.paddingLeft+e.borderLeftWidth,top:t.top+e.paddingTop+e.borderTopWidth,right:t.right-(e.paddingRight+e.borderRightWidth),bottom:t.bottom-(e.paddingBottom+e.borderBottomWidth)}},p._manageStamp=c,p._getElementOffset=function(t){var e=t.getBoundingClientRect(),n=this._boundingRect,r=i(t),o={left:e.left-n.left-r.marginLeft,top:e.top-n.top-r.marginTop,right:n.right-e.right-r.marginRight,bottom:n.bottom-e.bottom-r.marginBottom};return o},p.handleEvent=n.handleEvent,p.bindResize=function(){t.addEventListener("resize",this),this.isResizeBound=!0},p.unbindResize=function(){t.removeEventListener("resize",this),this.isResizeBound=!1},p.onresize=function(){this.resize()},n.debounceMethod(o,"onresize",100),p.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&this.layout()},p.needsResizeLayout=function(){var t=i(this.element),e=this.size&&t;return e&&t.innerWidth!==this.size.innerWidth},p.addItems=function(t){var e=this._itemize(t);return e.length&&(this.items=this.items.concat(e)),e},p.appended=function(t){var e=this.addItems(t);e.length&&(this.layoutItems(e,!0),this.reveal(e))},p.prepended=function(t){var e=this._itemize(t);if(e.length){var i=this.items.slice(0);this.items=e.concat(i),this._resetLayout(),this._manageStamps(),this.layoutItems(e,!0),this.reveal(e),this.layoutItems(i)}},p.reveal=function(t){if(this._emitCompleteOnItems("reveal",t),t&&t.length){var e=this.updateStagger();t.forEach(function(t,i){t.stagger(i*e),t.reveal()})}},p.hide=function(t){if(this._emitCompleteOnItems("hide",t),t&&t.length){var e=this.updateStagger();t.forEach(function(t,i){t.stagger(i*e),t.hide()})}},p.revealItemElements=function(t){var e=this.getItems(t);this.reveal(e)},p.hideItemElements=function(t){var e=this.getItems(t);this.hide(e)},p.getItem=function(t){for(var e=0;e<this.items.length;e++){var i=this.items[e];if(i.element==t)return i}},p.getItems=function(t){t=n.makeArray(t);var e=[];return t.forEach(function(t){var i=this.getItem(t);i&&e.push(i)},this),e},p.remove=function(t){var e=this.getItems(t);this._emitCompleteOnItems("remove",e),e&&e.length&&e.forEach(function(t){t.remove(),n.removeFrom(this.items,t)},this)},p.destroy=function(){var t=this.element.style;t.height="",t.position="",t.width="",this.items.forEach(function(t){t.destroy()}),this.unbindResize();var e=this.element.outlayerGUID;delete h[e],delete this.element.outlayerGUID,u&&u.removeData(this.element,this.constructor.namespace)},o.data=function(t){t=n.getQueryElement(t);var e=t&&t.outlayerGUID;return e&&h[e]},o.create=function(t,e){var i=s(o);return i.defaults=n.extend({},o.defaults),n.extend(i.defaults,e),i.compatOptions=n.extend({},o.compatOptions),i.namespace=t,i.data=o.data,i.Item=s(r),n.htmlInit(i,t),u&&u.bridget&&u.bridget(t,i),i};var f={ms:1,s:1e3};return o.Item=r,o}),function(t,e){"function"==typeof define&&define.amd?define("isotope/js/item",["outlayer/outlayer"],e):"object"==typeof module&&module.exports?module.exports=e(require("outlayer")):(t.Isotope=t.Isotope||{},t.Isotope.Item=e(t.Outlayer))}(window,function(t){"use strict";function e(){t.Item.apply(this,arguments)}var i=e.prototype=Object.create(t.Item.prototype),n=i._create;i._create=function(){this.id=this.layout.itemGUID++,n.call(this),this.sortData={}},i.updateSortData=function(){if(!this.isIgnored){this.sortData.id=this.id,this.sortData["original-order"]=this.id,this.sortData.random=Math.random();var t=this.layout.options.getSortData,e=this.layout._sorters;for(var i in t){var n=e[i];this.sortData[i]=n(this.element,this)}}};var r=i.destroy;return i.destroy=function(){r.apply(this,arguments),this.css({display:""})},e}),function(t,e){"function"==typeof define&&define.amd?define("isotope/js/layout-mode",["get-size/get-size","outlayer/outlayer"],e):"object"==typeof module&&module.exports?module.exports=e(require("get-size"),require("outlayer")):(t.Isotope=t.Isotope||{},t.Isotope.LayoutMode=e(t.getSize,t.Outlayer))}(window,function(t,e){"use strict";function i(t){this.isotope=t,t&&(this.options=t.options[this.namespace],this.element=t.element,this.items=t.filteredItems,this.size=t.size)}var n=i.prototype,r=["_resetLayout","_getItemLayoutPosition","_manageStamp","_getContainerSize","_getElementOffset","needsResizeLayout","_getOption"];return r.forEach(function(t){n[t]=function(){return e.prototype[t].apply(this.isotope,arguments)}}),n.needsVerticalResizeLayout=function(){var e=t(this.isotope.element),i=this.isotope.size&&e;return i&&e.innerHeight!=this.isotope.size.innerHeight},n._getMeasurement=function(){this.isotope._getMeasurement.apply(this,arguments)},n.getColumnWidth=function(){this.getSegmentSize("column","Width")},n.getRowHeight=function(){this.getSegmentSize("row","Height")},n.getSegmentSize=function(t,e){var i=t+e,n="outer"+e;if(this._getMeasurement(i,n),!this[i]){var r=this.getFirstItemSize();this[i]=r&&r[n]||this.isotope.size["inner"+e]}},n.getFirstItemSize=function(){var e=this.isotope.filteredItems[0];return e&&e.element&&t(e.element)},n.layout=function(){this.isotope.layout.apply(this.isotope,arguments)},n.getSize=function(){this.isotope.getSize(),this.size=this.isotope.size},i.modes={},i.create=function(t,e){function r(){i.apply(this,arguments)}return r.prototype=Object.create(n),r.prototype.constructor=r,e&&(r.options=e),r.prototype.namespace=t,i.modes[t]=r,r},i}),function(t,e){"function"==typeof define&&define.amd?define("masonry/masonry",["outlayer/outlayer","get-size/get-size"],e):"object"==typeof module&&module.exports?module.exports=e(require("outlayer"),require("get-size")):t.Masonry=e(t.Outlayer,t.getSize)}(window,function(t,e){var i=t.create("masonry");i.compatOptions.fitWidth="isFitWidth";var n=i.prototype;return n._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns(),this.colYs=[];for(var t=0;t<this.cols;t++)this.colYs.push(0);this.maxY=0,this.horizontalColIndex=0},n.measureColumns=function(){if(this.getContainerWidth(),!this.columnWidth){var t=this.items[0],i=t&&t.element;this.columnWidth=i&&e(i).outerWidth||this.containerWidth}var n=this.columnWidth+=this.gutter,r=this.containerWidth+this.gutter,o=r/n,s=n-r%n,a=s&&1>s?"round":"floor";o=Math[a](o),this.cols=Math.max(o,1)},n.getContainerWidth=function(){var t=this._getOption("fitWidth"),i=t?this.element.parentNode:this.element,n=e(i);this.containerWidth=n&&n.innerWidth},n._getItemLayoutPosition=function(t){t.getSize();var e=t.size.outerWidth%this.columnWidth,i=e&&1>e?"round":"ceil",n=Math[i](t.size.outerWidth/this.columnWidth);n=Math.min(n,this.cols);for(var r=this.options.horizontalOrder?"_getHorizontalColPosition":"_getTopColPosition",o=this[r](n,t),s={x:this.columnWidth*o.col,y:o.y},a=o.y+t.size.outerHeight,l=n+o.col,u=o.col;l>u;u++)this.colYs[u]=a;return s},n._getTopColPosition=function(t){var e=this._getTopColGroup(t),i=Math.min.apply(Math,e);return{col:e.indexOf(i),y:i}},n._getTopColGroup=function(t){if(2>t)return this.colYs;for(var e=[],i=this.cols+1-t,n=0;i>n;n++)e[n]=this._getColGroupY(n,t);return e},n._getColGroupY=function(t,e){if(2>e)return this.colYs[t];var i=this.colYs.slice(t,t+e);return Math.max.apply(Math,i)},n._getHorizontalColPosition=function(t,e){var i=this.horizontalColIndex%this.cols,n=t>1&&i+t>this.cols;i=n?0:i;var r=e.size.outerWidth&&e.size.outerHeight;return this.horizontalColIndex=r?i+t:this.horizontalColIndex,{col:i,y:this._getColGroupY(i,t)}},n._manageStamp=function(t){var i=e(t),n=this._getElementOffset(t),r=this._getOption("originLeft"),o=r?n.left:n.right,s=o+i.outerWidth,a=Math.floor(o/this.columnWidth);a=Math.max(0,a);var l=Math.floor(s/this.columnWidth);l-=s%this.columnWidth?0:1,l=Math.min(this.cols-1,l);for(var u=this._getOption("originTop"),c=(u?n.top:n.bottom)+i.outerHeight,d=a;l>=d;d++)this.colYs[d]=Math.max(c,this.colYs[d])},n._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var t={height:this.maxY};return this._getOption("fitWidth")&&(t.width=this._getContainerFitWidth()),t},n._getContainerFitWidth=function(){for(var t=0,e=this.cols;--e&&0===this.colYs[e];)t++;return(this.cols-t)*this.columnWidth-this.gutter},n.needsResizeLayout=function(){var t=this.containerWidth;return this.getContainerWidth(),t!=this.containerWidth},i}),function(t,e){"function"==typeof define&&define.amd?define("isotope/js/layout-modes/masonry",["../layout-mode","masonry/masonry"],e):"object"==typeof module&&module.exports?module.exports=e(require("../layout-mode"),require("masonry-layout")):e(t.Isotope.LayoutMode,t.Masonry)}(window,function(t,e){"use strict";var i=t.create("masonry"),n=i.prototype,r={_getElementOffset:!0,layout:!0,_getMeasurement:!0};for(var o in e.prototype)r[o]||(n[o]=e.prototype[o]);var s=n.measureColumns;n.measureColumns=function(){this.items=this.isotope.filteredItems,s.call(this)};var a=n._getOption;return n._getOption=function(t){return"fitWidth"==t?void 0!==this.options.isFitWidth?this.options.isFitWidth:this.options.fitWidth:a.apply(this.isotope,arguments)},i}),function(t,e){"function"==typeof define&&define.amd?define("isotope/js/layout-modes/fit-rows",["../layout-mode"],e):"object"==typeof exports?module.exports=e(require("../layout-mode")):e(t.Isotope.LayoutMode)}(window,function(t){"use strict";var e=t.create("fitRows"),i=e.prototype;return i._resetLayout=function(){this.x=0,this.y=0,this.maxY=0,this._getMeasurement("gutter","outerWidth")},i._getItemLayoutPosition=function(t){t.getSize();var e=t.size.outerWidth+this.gutter,i=this.isotope.size.innerWidth+this.gutter;0!==this.x&&e+this.x>i&&(this.x=0,this.y=this.maxY);var n={x:this.x,y:this.y};return this.maxY=Math.max(this.maxY,this.y+t.size.outerHeight),this.x+=e,n},i._getContainerSize=function(){return{height:this.maxY}},e}),function(t,e){"function"==typeof define&&define.amd?define("isotope/js/layout-modes/vertical",["../layout-mode"],e):"object"==typeof module&&module.exports?module.exports=e(require("../layout-mode")):e(t.Isotope.LayoutMode)}(window,function(t){"use strict";var e=t.create("vertical",{horizontalAlignment:0}),i=e.prototype;return i._resetLayout=function(){this.y=0},i._getItemLayoutPosition=function(t){t.getSize();var e=(this.isotope.size.innerWidth-t.size.outerWidth)*this.options.horizontalAlignment,i=this.y;return this.y+=t.size.outerHeight,{x:e,y:i}},i._getContainerSize=function(){return{height:this.y}},e}),function(t,e){"function"==typeof define&&define.amd?define(["outlayer/outlayer","get-size/get-size","desandro-matches-selector/matches-selector","fizzy-ui-utils/utils","isotope/js/item","isotope/js/layout-mode","isotope/js/layout-modes/masonry","isotope/js/layout-modes/fit-rows","isotope/js/layout-modes/vertical"],function(i,n,r,o,s,a){return e(t,i,n,r,o,s,a)}):"object"==typeof module&&module.exports?module.exports=e(t,require("outlayer"),require("get-size"),require("desandro-matches-selector"),require("fizzy-ui-utils"),require("isotope/js/item"),require("isotope/js/layout-mode"),require("isotope/js/layout-modes/masonry"),require("isotope/js/layout-modes/fit-rows"),require("isotope/js/layout-modes/vertical")):t.Isotope=e(t,t.Outlayer,t.getSize,t.matchesSelector,t.fizzyUIUtils,t.Isotope.Item,t.Isotope.LayoutMode)}(window,function(t,e,i,n,r,o,s){function a(t,e){return function(i,n){for(var r=0;r<t.length;r++){var o=t[r],s=i.sortData[o],a=n.sortData[o];if(s>a||a>s){var l=void 0!==e[o]?e[o]:e,u=l?1:-1;return(s>a?1:-1)*u}}return 0}}var l=t.jQuery,u=String.prototype.trim?function(t){return t.trim()}:function(t){return t.replace(/^\s+|\s+$/g,"")},c=e.create("isotope",{layoutMode:"masonry",isJQueryFiltering:!0,sortAscending:!0});c.Item=o,c.LayoutMode=s;var d=c.prototype;d._create=function(){this.itemGUID=0,this._sorters={},this._getSorters(),e.prototype._create.call(this),this.modes={},this.filteredItems=this.items,this.sortHistory=["original-order"];for(var t in s.modes)this._initLayoutMode(t)},d.reloadItems=function(){this.itemGUID=0,e.prototype.reloadItems.call(this)},d._itemize=function(){for(var t=e.prototype._itemize.apply(this,arguments),i=0;i<t.length;i++){var n=t[i];n.id=this.itemGUID++}return this._updateItemsSortData(t),t},d._initLayoutMode=function(t){var e=s.modes[t],i=this.options[t]||{};this.options[t]=e.options?r.extend(e.options,i):i,this.modes[t]=new e(this)},d.layout=function(){return!this._isLayoutInited&&this._getOption("initLayout")?void this.arrange():void this._layout()},d._layout=function(){var t=this._getIsInstant();this._resetLayout(),this._manageStamps(),this.layoutItems(this.filteredItems,t),this._isLayoutInited=!0},d.arrange=function(t){this.option(t),this._getIsInstant();var e=this._filter(this.items);this.filteredItems=e.matches,this._bindArrangeComplete(),this._isInstant?this._noTransition(this._hideReveal,[e]):this._hideReveal(e),this._sort(),this._layout()},d._init=d.arrange,d._hideReveal=function(t){this.reveal(t.needReveal),this.hide(t.needHide)},d._getIsInstant=function(){var t=this._getOption("layoutInstant"),e=void 0!==t?t:!this._isLayoutInited;return this._isInstant=e,e},d._bindArrangeComplete=function(){function t(){e&&i&&n&&r.dispatchEvent("arrangeComplete",null,[r.filteredItems])}var e,i,n,r=this;this.once("layoutComplete",function(){e=!0,t()}),this.once("hideComplete",function(){i=!0,t()}),this.once("revealComplete",function(){n=!0,t()})},d._filter=function(t){var e=this.options.filter;e=e||"*";for(var i=[],n=[],r=[],o=this._getFilterTest(e),s=0;s<t.length;s++){var a=t[s];if(!a.isIgnored){var l=o(a);l&&i.push(a),l&&a.isHidden?n.push(a):l||a.isHidden||r.push(a)}}return{matches:i,needReveal:n,needHide:r}},d._getFilterTest=function(t){return l&&this.options.isJQueryFiltering?function(e){return l(e.element).is(t)}:"function"==typeof t?function(e){return t(e.element)}:function(e){return n(e.element,t)}},d.updateSortData=function(t){var e;t?(t=r.makeArray(t),e=this.getItems(t)):e=this.items,this._getSorters(),this._updateItemsSortData(e)},d._getSorters=function(){var t=this.options.getSortData;for(var e in t){var i=t[e];this._sorters[e]=h(i)}},d._updateItemsSortData=function(t){for(var e=t&&t.length,i=0;e&&e>i;i++){var n=t[i];n.updateSortData()}};var h=function(){function t(t){if("string"!=typeof t)return t;var i=u(t).split(" "),n=i[0],r=n.match(/^\[(.+)\]$/),o=r&&r[1],s=e(o,n),a=c.sortDataParsers[i[1]];return t=a?function(t){return t&&a(s(t))}:function(t){return t&&s(t)}}function e(t,e){return t?function(e){return e.getAttribute(t)}:function(t){var i=t.querySelector(e);return i&&i.textContent}}return t}();c.sortDataParsers={parseInt:function(t){return parseInt(t,10)},parseFloat:function(t){return parseFloat(t)}},d._sort=function(){if(this.options.sortBy){var t=r.makeArray(this.options.sortBy);this._getIsSameSortBy(t)||(this.sortHistory=t.concat(this.sortHistory));var e=a(this.sortHistory,this.options.sortAscending);this.filteredItems.sort(e)}},d._getIsSameSortBy=function(t){for(var e=0;e<t.length;e++)if(t[e]!=this.sortHistory[e])return!1;return!0},d._mode=function(){var t=this.options.layoutMode,e=this.modes[t];if(!e)throw new Error("No layout mode: "+t);return e.options=this.options[t],e},d._resetLayout=function(){e.prototype._resetLayout.call(this),this._mode()._resetLayout()},d._getItemLayoutPosition=function(t){return this._mode()._getItemLayoutPosition(t)},d._manageStamp=function(t){this._mode()._manageStamp(t)},d._getContainerSize=function(){return this._mode()._getContainerSize()},d.needsResizeLayout=function(){return this._mode().needsResizeLayout()},d.appended=function(t){var e=this.addItems(t);if(e.length){var i=this._filterRevealAdded(e);this.filteredItems=this.filteredItems.concat(i)}},d.prepended=function(t){var e=this._itemize(t);if(e.length){this._resetLayout(),this._manageStamps();var i=this._filterRevealAdded(e);this.layoutItems(this.filteredItems),this.filteredItems=i.concat(this.filteredItems),this.items=e.concat(this.items)}},d._filterRevealAdded=function(t){var e=this._filter(t);return this.hide(e.needHide),this.reveal(e.matches),this.layoutItems(e.matches,!0),e.matches},d.insert=function(t){var e=this.addItems(t);if(e.length){var i,n,r=e.length;for(i=0;r>i;i++)n=e[i],this.element.appendChild(n.element);var o=this._filter(e).matches;for(i=0;r>i;i++)e[i].isLayoutInstant=!0;for(this.arrange(),i=0;r>i;i++)delete e[i].isLayoutInstant;this.reveal(o)}};var p=d.remove;return d.remove=function(t){t=r.makeArray(t);var e=this.getItems(t);p.call(this,t);for(var i=e&&e.length,n=0;i&&i>n;n++){var o=e[n];r.removeFrom(this.filteredItems,o)}},d.shuffle=function(){for(var t=0;t<this.items.length;t++){var e=this.items[t];e.sortData.random=Math.random()}this.options.sortBy="random",this._sort(),this._layout()},d._noTransition=function(t,e){var i=this.options.transitionDuration;this.options.transitionDuration=0;var n=t.apply(this,e);return this.options.transitionDuration=i,n},d.getFilteredItemElements=function(){return this.filteredItems.map(function(t){return t.element})},c}),!function(t,e,i,n){function r(e,i){this.settings=null,this.options=t.extend({},r.Defaults,i),this.$element=t(e),this.drag=t.extend({},h),this.state=t.extend({},p),this.e=t.extend({},f),this._plugins={},this._supress={},this._current=null,this._speed=null,this._coordinates=[],this._breakpoint=null,this._width=null,this._items=[],this._clones=[],this._mergers=[],this._invalidated={},this._pipe=[],t.each(r.Plugins,t.proxy(function(t,e){this._plugins[t[0].toLowerCase()+t.slice(1)]=new e(this)},this)),t.each(r.Pipe,t.proxy(function(e,i){this._pipe.push({filter:i.filter,run:t.proxy(i.run,this)})},this)),this.setup(),this.initialize()}function o(t){if(t.touches!==n)return{x:t.touches[0].pageX,y:t.touches[0].pageY};if(t.touches===n){if(t.pageX!==n)return{x:t.pageX,y:t.pageY};if(t.pageX===n)return{x:t.clientX,y:t.clientY}}}function s(t){var e,n,r=i.createElement("div"),o=t;for(e in o)if(n=o[e],"undefined"!=typeof r.style[n])return r=null,[n,e];return[!1]}function a(){return s(["transition","WebkitTransition","MozTransition","OTransition"])[1]}function l(){return s(["transform","WebkitTransform","MozTransform","OTransform","msTransform"])[0]}function u(){return s(["perspective","webkitPerspective","MozPerspective","OPerspective","MsPerspective"])[0]}function c(){return"ontouchstart"in e||!!navigator.msMaxTouchPoints}function d(){return e.navigator.msPointerEnabled}var h,p,f;h={start:0,startX:0,startY:0,current:0,currentX:0,currentY:0,offsetX:0,offsetY:0,distance:null,startTime:0,endTime:0,updatedX:0,targetEl:null},p={isTouch:!1,isScrolling:!1,isSwiping:!1,direction:!1,inMotion:!1},f={_onDragStart:null,_onDragMove:null,_onDragEnd:null,_transitionEnd:null,_resizer:null,_responsiveCall:null,_goToLoop:null,_checkVisibile:null},r.Defaults={items:3,loop:!1,center:!1,mouseDrag:!0,touchDrag:!0,pullDrag:!0,freeDrag:!1,margin:0,stagePadding:0,merge:!1,mergeFit:!0,autoWidth:!1,startPosition:0,rtl:!1,smartSpeed:250,fluidSpeed:!1,dragEndSpeed:!1,responsive:{},responsiveRefreshRate:200,responsiveBaseElement:e,responsiveClass:!1,fallbackEasing:"swing",info:!1,nestedItemSelector:!1,itemElement:"div",stageElement:"div",themeClass:"owl-theme",baseClass:"owl-carousel",itemClass:"owl-item",centerClass:"center",activeClass:"active"},r.Width={Default:"default",Inner:"inner",Outer:"outer"},r.Plugins={},r.Pipe=[{filter:["width","items","settings"],run:function(t){t.current=this._items&&this._items[this.relative(this._current)]}},{filter:["items","settings"],run:function(){var t=this._clones,e=this.$stage.children(".cloned");(e.length!==t.length||!this.settings.loop&&t.length>0)&&(this.$stage.children(".cloned").remove(),this._clones=[])}},{filter:["items","settings"],run:function(){var t,e,i=this._clones,n=this._items,r=this.settings.loop?i.length-Math.max(2*this.settings.items,4):0;for(t=0,e=Math.abs(r/2);e>t;t++)r>0?(this.$stage.children().eq(n.length+i.length-1).remove(),i.pop(),this.$stage.children().eq(0).remove(),i.pop()):(i.push(i.length/2),this.$stage.append(n[i[i.length-1]].clone().addClass("cloned")),i.push(n.length-1-(i.length-1)/2),this.$stage.prepend(n[i[i.length-1]].clone().addClass("cloned")))}},{filter:["width","items","settings"],run:function(){var t,e,i,n=this.settings.rtl?1:-1,r=(this.width()/this.settings.items).toFixed(3),o=0;for(this._coordinates=[],e=0,i=this._clones.length+this._items.length;i>e;e++)t=this._mergers[this.relative(e)],t=this.settings.mergeFit&&Math.min(t,this.settings.items)||t,o+=(this.settings.autoWidth?this._items[this.relative(e)].width()+this.settings.margin:r*t)*n,this._coordinates.push(o)}},{filter:["width","items","settings"],run:function(){var e,i,n=(this.width()/this.settings.items).toFixed(3),r={width:Math.abs(this._coordinates[this._coordinates.length-1])+2*this.settings.stagePadding,"padding-left":this.settings.stagePadding||"","padding-right":this.settings.stagePadding||""};if(this.$stage.css(r),r={width:this.settings.autoWidth?"auto":n-this.settings.margin},r[this.settings.rtl?"margin-left":"margin-right"]=this.settings.margin,!this.settings.autoWidth&&t.grep(this._mergers,function(t){return t>1}).length>0)for(e=0,i=this._coordinates.length;i>e;e++)r.width=Math.abs(this._coordinates[e])-Math.abs(this._coordinates[e-1]||0)-this.settings.margin,this.$stage.children().eq(e).css(r);else this.$stage.children().css(r)}},{filter:["width","items","settings"],run:function(t){t.current&&this.reset(this.$stage.children().index(t.current))}},{filter:["position"],run:function(){this.animate(this.coordinates(this._current))}},{filter:["width","position","items","settings"],run:function(){var t,e,i,n,r=this.settings.rtl?1:-1,o=2*this.settings.stagePadding,s=this.coordinates(this.current())+o,a=s+this.width()*r,l=[];for(i=0,n=this._coordinates.length;n>i;i++)t=this._coordinates[i-1]||0,e=Math.abs(this._coordinates[i])+o*r,(this.op(t,"<=",s)&&this.op(t,">",a)||this.op(e,"<",s)&&this.op(e,">",a))&&l.push(i);this.$stage.children("."+this.settings.activeClass).removeClass(this.settings.activeClass),this.$stage.children(":eq("+l.join("), :eq(")+")").addClass(this.settings.activeClass),this.settings.center&&(this.$stage.children("."+this.settings.centerClass).removeClass(this.settings.centerClass),this.$stage.children().eq(this.current()).addClass(this.settings.centerClass))}}],r.prototype.initialize=function(){if(this.trigger("initialize"),this.$element.addClass(this.settings.baseClass).addClass(this.settings.themeClass).toggleClass("owl-rtl",this.settings.rtl),this.browserSupport(),this.settings.autoWidth&&this.state.imagesLoaded!==!0){var e,i,r;if(e=this.$element.find("img"),i=this.settings.nestedItemSelector?"."+this.settings.nestedItemSelector:n,r=this.$element.children(i).width(),e.length&&0>=r)return this.preloadAutoWidthImages(e),!1}this.$element.addClass("owl-loading"),this.$stage=t("<"+this.settings.stageElement+' class="owl-stage"/>').wrap('<div class="owl-stage-outer">'),this.$element.append(this.$stage.parent()),this.replace(this.$element.children().not(this.$stage.parent())),this._width=this.$element.width(),this.refresh(),this.$element.removeClass("owl-loading").addClass("owl-loaded"),this.eventsCall(),this.internalEvents(),this.addTriggerableEvents(),this.trigger("initialized")},r.prototype.setup=function(){var e=this.viewport(),i=this.options.responsive,n=-1,r=null;i?(t.each(i,function(t){e>=t&&t>n&&(n=Number(t))}),r=t.extend({},this.options,i[n]),delete r.responsive,r.responsiveClass&&this.$element.attr("class",function(t,e){return e.replace(/\b owl-responsive-\S+/g,"")}).addClass("owl-responsive-"+n)):r=t.extend({},this.options),(null===this.settings||this._breakpoint!==n)&&(this.trigger("change",{property:{name:"settings",value:r}}),this._breakpoint=n,this.settings=r,this.invalidate("settings"),this.trigger("changed",{property:{name:"settings",value:this.settings}}))},r.prototype.optionsLogic=function(){this.$element.toggleClass("owl-center",this.settings.center),this.settings.loop&&this._items.length<this.settings.items&&(this.settings.loop=!1),this.settings.autoWidth&&(this.settings.stagePadding=!1,this.settings.merge=!1)},r.prototype.prepare=function(e){var i=this.trigger("prepare",{content:e});return i.data||(i.data=t("<"+this.settings.itemElement+"/>").addClass(this.settings.itemClass).append(e)),this.trigger("prepared",{content:i.data}),i.data},r.prototype.update=function(){for(var e=0,i=this._pipe.length,n=t.proxy(function(t){return this[t]},this._invalidated),r={};i>e;)(this._invalidated.all||t.grep(this._pipe[e].filter,n).length>0)&&this._pipe[e].run(r),e++;this._invalidated={}},r.prototype.width=function(t){switch(t=t||r.Width.Default){case r.Width.Inner:case r.Width.Outer:return this._width;default:return this._width-2*this.settings.stagePadding+this.settings.margin}},r.prototype.refresh=function(){return 0===this._items.length?!1:((new Date).getTime(),this.trigger("refresh"),this.setup(),this.optionsLogic(),this.$stage.addClass("owl-refresh"),this.update(),this.$stage.removeClass("owl-refresh"),this.state.orientation=e.orientation,this.watchVisibility(),this.trigger("refreshed"),void 0)},r.prototype.eventsCall=function(){this.e._onDragStart=t.proxy(function(t){this.onDragStart(t)},this),this.e._onDragMove=t.proxy(function(t){this.onDragMove(t)},this),this.e._onDragEnd=t.proxy(function(t){this.onDragEnd(t)},this),this.e._onResize=t.proxy(function(t){this.onResize(t)},this),this.e._transitionEnd=t.proxy(function(t){this.transitionEnd(t)},this),this.e._preventClick=t.proxy(function(t){this.preventClick(t)},this)},r.prototype.onThrottledResize=function(){e.clearTimeout(this.resizeTimer),this.resizeTimer=e.setTimeout(this.e._onResize,this.settings.responsiveRefreshRate)},r.prototype.onResize=function(){return this._items.length?this._width===this.$element.width()?!1:this.trigger("resize").isDefaultPrevented()?!1:(this._width=this.$element.width(),this.invalidate("width"),this.refresh(),void this.trigger("resized")):!1},r.prototype.eventsRouter=function(t){var e=t.type;"mousedown"===e||"touchstart"===e?this.onDragStart(t):"mousemove"===e||"touchmove"===e?this.onDragMove(t):"mouseup"===e||"touchend"===e?this.onDragEnd(t):"touchcancel"===e&&this.onDragEnd(t)},r.prototype.internalEvents=function(){var i=(c(),d());this.settings.mouseDrag?(this.$stage.on("mousedown",t.proxy(function(t){this.eventsRouter(t)},this)),this.$stage.on("dragstart",function(){return!1}),this.$stage.get(0).onselectstart=function(){return!1}):this.$element.addClass("owl-text-select-on"),this.settings.touchDrag&&!i&&this.$stage.on("touchstart touchcancel",t.proxy(function(t){this.eventsRouter(t)},this)),this.transitionEndVendor&&this.on(this.$stage.get(0),this.transitionEndVendor,this.e._transitionEnd,!1),this.settings.responsive!==!1&&this.on(e,"resize",t.proxy(this.onThrottledResize,this))},r.prototype.onDragStart=function(n){var r,s,a,l;if(r=n.originalEvent||n||e.event,3===r.which||this.state.isTouch)return!1;if("mousedown"===r.type&&this.$stage.addClass("owl-grab"),this.trigger("drag"),this.drag.startTime=(new Date).getTime(),this.speed(0),this.state.isTouch=!0,this.state.isScrolling=!1,this.state.isSwiping=!1,this.drag.distance=0,s=o(r).x,a=o(r).y,this.drag.offsetX=this.$stage.position().left,this.drag.offsetY=this.$stage.position().top,this.settings.rtl&&(this.drag.offsetX=this.$stage.position().left+this.$stage.width()-this.width()+this.settings.margin),this.state.inMotion&&this.support3d)l=this.getTransformProperty(),this.drag.offsetX=l,this.animate(l),this.state.inMotion=!0;else if(this.state.inMotion&&!this.support3d)return this.state.inMotion=!1,!1;this.drag.startX=s-this.drag.offsetX,this.drag.startY=a-this.drag.offsetY,this.drag.start=s-this.drag.startX,this.drag.targetEl=r.target||r.srcElement,this.drag.updatedX=this.drag.start,("IMG"===this.drag.targetEl.tagName||"A"===this.drag.targetEl.tagName)&&(this.drag.targetEl.draggable=!1),t(i).on("mousemove.owl.dragEvents mouseup.owl.dragEvents touchmove.owl.dragEvents touchend.owl.dragEvents",t.proxy(function(t){this.eventsRouter(t)},this))},r.prototype.onDragMove=function(t){var i,r,s,a,l,u;this.state.isTouch&&(this.state.isScrolling||(i=t.originalEvent||t||e.event,r=o(i).x,s=o(i).y,this.drag.currentX=r-this.drag.startX,this.drag.currentY=s-this.drag.startY,this.drag.distance=this.drag.currentX-this.drag.offsetX,this.drag.distance<0?this.state.direction=this.settings.rtl?"right":"left":this.drag.distance>0&&(this.state.direction=this.settings.rtl?"left":"right"),this.settings.loop?this.op(this.drag.currentX,">",this.coordinates(this.minimum()))&&"right"===this.state.direction?this.drag.currentX-=(this.settings.center&&this.coordinates(0))-this.coordinates(this._items.length):this.op(this.drag.currentX,"<",this.coordinates(this.maximum()))&&"left"===this.state.direction&&(this.drag.currentX+=(this.settings.center&&this.coordinates(0))-this.coordinates(this._items.length)):(a=this.coordinates(this.settings.rtl?this.maximum():this.minimum()),l=this.coordinates(this.settings.rtl?this.minimum():this.maximum()),u=this.settings.pullDrag?this.drag.distance/5:0,this.drag.currentX=Math.max(Math.min(this.drag.currentX,a+u),l+u)),(this.drag.distance>8||this.drag.distance<-8)&&(i.preventDefault!==n?i.preventDefault():i.returnValue=!1,this.state.isSwiping=!0),this.drag.updatedX=this.drag.currentX,(this.drag.currentY>16||this.drag.currentY<-16)&&this.state.isSwiping===!1&&(this.state.isScrolling=!0,this.drag.updatedX=this.drag.start),this.animate(this.drag.updatedX)))},r.prototype.onDragEnd=function(e){var n,r,o;if(this.state.isTouch){if("mouseup"===e.type&&this.$stage.removeClass("owl-grab"),this.trigger("dragged"),this.drag.targetEl.removeAttribute("draggable"),this.state.isTouch=!1,this.state.isScrolling=!1,this.state.isSwiping=!1,0===this.drag.distance&&this.state.inMotion!==!0)return this.state.inMotion=!1,!1;this.drag.endTime=(new Date).getTime(),n=this.drag.endTime-this.drag.startTime,r=Math.abs(this.drag.distance),(r>3||n>300)&&this.removeClick(this.drag.targetEl),o=this.closest(this.drag.updatedX),this.speed(this.settings.dragEndSpeed||this.settings.smartSpeed),this.current(o),this.invalidate("position"),this.update(),this.settings.pullDrag||this.drag.updatedX!==this.coordinates(o)||this.transitionEnd(),this.drag.distance=0,t(i).off(".owl.dragEvents")}},r.prototype.removeClick=function(i){this.drag.targetEl=i,t(i).on("click.preventClick",this.e._preventClick),e.setTimeout(function(){t(i).off("click.preventClick")},300)},r.prototype.preventClick=function(e){e.preventDefault?e.preventDefault():e.returnValue=!1,e.stopPropagation&&e.stopPropagation(),t(e.target).off("click.preventClick")},r.prototype.getTransformProperty=function(){var t,i;return t=e.getComputedStyle(this.$stage.get(0),null).getPropertyValue(this.vendorName+"transform"),t=t.replace(/matrix(3d)?\(|\)/g,"").split(","),i=16===t.length,i!==!0?t[4]:t[12]},r.prototype.closest=function(e){var i=-1,n=30,r=this.width(),o=this.coordinates();return this.settings.freeDrag||t.each(o,t.proxy(function(t,s){return e>s-n&&s+n>e?i=t:this.op(e,"<",s)&&this.op(e,">",o[t+1]||s-r)&&(i="left"===this.state.direction?t+1:t),-1===i},this)),this.settings.loop||(this.op(e,">",o[this.minimum()])?i=e=this.minimum():this.op(e,"<",o[this.maximum()])&&(i=e=this.maximum())),i},r.prototype.animate=function(e){this.trigger("translate"),this.state.inMotion=this.speed()>0,this.support3d?this.$stage.css({transform:"translate3d("+e+"px,0px, 0px)",transition:this.speed()/1e3+"s"}):this.state.isTouch?this.$stage.css({left:e+"px"}):this.$stage.animate({left:e},this.speed()/1e3,this.settings.fallbackEasing,t.proxy(function(){this.state.inMotion&&this.transitionEnd()},this))},r.prototype.current=function(t){if(t===n)return this._current;if(0===this._items.length)return n;if(t=this.normalize(t),this._current!==t){var e=this.trigger("change",{property:{name:"position",value:t}});e.data!==n&&(t=this.normalize(e.data)),this._current=t,this.invalidate("position"),this.trigger("changed",{property:{name:"position",value:this._current}})}return this._current},r.prototype.invalidate=function(t){this._invalidated[t]=!0},r.prototype.reset=function(t){t=this.normalize(t),t!==n&&(this._speed=0,this._current=t,this.suppress(["translate","translated"]),this.animate(this.coordinates(t)),this.release(["translate","translated"]))},r.prototype.normalize=function(e,i){var r=i?this._items.length:this._items.length+this._clones.length;return!t.isNumeric(e)||1>r?n:e=this._clones.length?(e%r+r)%r:Math.max(this.minimum(i),Math.min(this.maximum(i),e))},r.prototype.relative=function(t){return t=this.normalize(t),t-=this._clones.length/2,this.normalize(t,!0)},r.prototype.maximum=function(t){var e,i,n,r=0,o=this.settings;if(t)return this._items.length-1;if(!o.loop&&o.center)e=this._items.length-1;else if(o.loop||o.center)if(o.loop||o.center)e=this._items.length+o.items;else{if(!o.autoWidth&&!o.merge)throw"Can not detect maximum absolute position.";for(revert=o.rtl?1:-1,i=this.$stage.width()-this.$element.width();(n=this.coordinates(r))&&!(n*revert>=i);)e=++r}else e=this._items.length-o.items;return e},r.prototype.minimum=function(t){return t?0:this._clones.length/2},r.prototype.items=function(t){return t===n?this._items.slice():(t=this.normalize(t,!0),this._items[t])},r.prototype.mergers=function(t){return t===n?this._mergers.slice():(t=this.normalize(t,!0),this._mergers[t])},r.prototype.clones=function(e){var i=this._clones.length/2,r=i+this._items.length,o=function(t){return t%2===0?r+t/2:i-(t+1)/2};return e===n?t.map(this._clones,function(t,e){return o(e)}):t.map(this._clones,function(t,i){return t===e?o(i):null})},r.prototype.speed=function(t){return t!==n&&(this._speed=t),this._speed},r.prototype.coordinates=function(e){var i=null;return e===n?t.map(this._coordinates,t.proxy(function(t,e){return this.coordinates(e)},this)):(this.settings.center?(i=this._coordinates[e],i+=(this.width()-i+(this._coordinates[e-1]||0))/2*(this.settings.rtl?-1:1)):i=this._coordinates[e-1]||0,i)},r.prototype.duration=function(t,e,i){return Math.min(Math.max(Math.abs(e-t),1),6)*Math.abs(i||this.settings.smartSpeed)},r.prototype.to=function(i,n){if(this.settings.loop){var r=i-this.relative(this.current()),o=this.current(),s=this.current(),a=this.current()+r,l=0>s-a,u=this._clones.length+this._items.length;a<this.settings.items&&l===!1?(o=s+this._items.length,this.reset(o)):a>=u-this.settings.items&&l===!0&&(o=s-this._items.length,this.reset(o)),e.clearTimeout(this.e._goToLoop),this.e._goToLoop=e.setTimeout(t.proxy(function(){this.speed(this.duration(this.current(),o+r,n)),this.current(o+r),this.update()},this),30)}else this.speed(this.duration(this.current(),i,n)),this.current(i),this.update()},r.prototype.next=function(t){t=t||!1,this.to(this.relative(this.current())+1,t)},r.prototype.prev=function(t){t=t||!1,this.to(this.relative(this.current())-1,t)},r.prototype.transitionEnd=function(t){return t!==n&&(t.stopPropagation(),(t.target||t.srcElement||t.originalTarget)!==this.$stage.get(0))?!1:(this.state.inMotion=!1,void this.trigger("translated"))},r.prototype.viewport=function(){var n;if(this.options.responsiveBaseElement!==e)n=t(this.options.responsiveBaseElement).width();else if(e.innerWidth)n=e.innerWidth;else{if(!i.documentElement||!i.documentElement.clientWidth)throw"Can not detect viewport width.";n=i.documentElement.clientWidth}return n},r.prototype.replace=function(e){this.$stage.empty(),this._items=[],e&&(e=e instanceof jQuery?e:t(e)),this.settings.nestedItemSelector&&(e=e.find("."+this.settings.nestedItemSelector)),e.filter(function(){return 1===this.nodeType}).each(t.proxy(function(t,e){e=this.prepare(e),this.$stage.append(e),this._items.push(e),this._mergers.push(1*e.find("[data-merge]").andSelf("[data-merge]").attr("data-merge")||1)},this)),this.reset(t.isNumeric(this.settings.startPosition)?this.settings.startPosition:0),this.invalidate("items")},r.prototype.add=function(t,e){e=e===n?this._items.length:this.normalize(e,!0),this.trigger("add",{content:t,position:e}),0===this._items.length||e===this._items.length?(this.$stage.append(t),this._items.push(t),this._mergers.push(1*t.find("[data-merge]").andSelf("[data-merge]").attr("data-merge")||1)):(this._items[e].before(t),this._items.splice(e,0,t),this._mergers.splice(e,0,1*t.find("[data-merge]").andSelf("[data-merge]").attr("data-merge")||1)),this.invalidate("items"),this.trigger("added",{content:t,position:e})},r.prototype.remove=function(t){t=this.normalize(t,!0),t!==n&&(this.trigger("remove",{content:this._items[t],position:t}),this._items[t].remove(),this._items.splice(t,1),this._mergers.splice(t,1),this.invalidate("items"),this.trigger("removed",{content:null,position:t}))},r.prototype.addTriggerableEvents=function(){var e=t.proxy(function(e,i){return t.proxy(function(t){t.relatedTarget!==this&&(this.suppress([i]),e.apply(this,[].slice.call(arguments,1)),this.release([i]))},this)},this);t.each({next:this.next,prev:this.prev,to:this.to,destroy:this.destroy,refresh:this.refresh,replace:this.replace,add:this.add,remove:this.remove},t.proxy(function(t,i){this.$element.on(t+".owl.carousel",e(i,t+".owl.carousel"))},this))},r.prototype.watchVisibility=function(){function i(t){return t.offsetWidth>0&&t.offsetHeight>0}function n(){i(this.$element.get(0))&&(this.$element.removeClass("owl-hidden"),this.refresh(),e.clearInterval(this.e._checkVisibile))}i(this.$element.get(0))||(this.$element.addClass("owl-hidden"),e.clearInterval(this.e._checkVisibile),this.e._checkVisibile=e.setInterval(t.proxy(n,this),500))},r.prototype.preloadAutoWidthImages=function(e){var i,n,r,o;i=0,n=this,e.each(function(s,a){r=t(a),o=new Image,o.onload=function(){i++,r.attr("src",o.src),r.css("opacity",1),i>=e.length&&(n.state.imagesLoaded=!0,n.initialize())},o.src=r.attr("src")||r.attr("data-src")||r.attr("data-src-retina")})},r.prototype.destroy=function(){this.$element.hasClass(this.settings.themeClass)&&this.$element.removeClass(this.settings.themeClass),this.settings.responsive!==!1&&t(e).off("resize.owl.carousel"),this.transitionEndVendor&&this.off(this.$stage.get(0),this.transitionEndVendor,this.e._transitionEnd);for(var n in this._plugins)this._plugins[n].destroy();(this.settings.mouseDrag||this.settings.touchDrag)&&(this.$stage.off("mousedown touchstart touchcancel"),t(i).off(".owl.dragEvents"),this.$stage.get(0).onselectstart=function(){},this.$stage.off("dragstart",function(){return!1})),this.$element.off(".owl"),this.$stage.children(".cloned").remove(),this.e=null,this.$element.removeData("owlCarousel"),this.$stage.children().contents().unwrap(),this.$stage.children().unwrap(),this.$stage.unwrap()},r.prototype.op=function(t,e,i){var n=this.settings.rtl;switch(e){case"<":return n?t>i:i>t;case">":return n?i>t:t>i;case">=":return n?i>=t:t>=i;case"<=":return n?t>=i:i>=t}},r.prototype.on=function(t,e,i,n){t.addEventListener?t.addEventListener(e,i,n):t.attachEvent&&t.attachEvent("on"+e,i)},r.prototype.off=function(t,e,i,n){t.removeEventListener?t.removeEventListener(e,i,n):t.detachEvent&&t.detachEvent("on"+e,i)},r.prototype.trigger=function(e,i,n){var r={item:{count:this._items.length,index:this.current()}},o=t.camelCase(t.grep(["on",e,n],function(t){return t}).join("-").toLowerCase()),s=t.Event([e,"owl",n||"carousel"].join(".").toLowerCase(),t.extend({relatedTarget:this},r,i));return this._supress[e]||(t.each(this._plugins,function(t,e){e.onTrigger&&e.onTrigger(s)}),this.$element.trigger(s),this.settings&&"function"==typeof this.settings[o]&&this.settings[o].apply(this,s)),s},r.prototype.suppress=function(e){t.each(e,t.proxy(function(t,e){this._supress[e]=!0},this))},r.prototype.release=function(e){t.each(e,t.proxy(function(t,e){delete this._supress[e]},this))},r.prototype.browserSupport=function(){if(this.support3d=u(),this.support3d){this.transformVendor=l();var t=["transitionend","webkitTransitionEnd","transitionend","oTransitionEnd"];this.transitionEndVendor=t[a()],this.vendorName=this.transformVendor.replace(/Transform/i,""),this.vendorName=""!==this.vendorName?"-"+this.vendorName.toLowerCase()+"-":""}this.state.orientation=e.orientation},t.fn.owlCarousel=function(e){return this.each(function(){t(this).data("owlCarousel")||t(this).data("owlCarousel",new r(this,e))})},t.fn.owlCarousel.Constructor=r}(window.Zepto||window.jQuery,window,document),function(t,e){var i=function(e){this._core=e,this._loaded=[],this._handlers={"initialized.owl.carousel change.owl.carousel":t.proxy(function(e){if(e.namespace&&this._core.settings&&this._core.settings.lazyLoad&&(e.property&&"position"==e.property.name||"initialized"==e.type))for(var i=this._core.settings,n=i.center&&Math.ceil(i.items/2)||i.items,r=i.center&&-1*n||0,o=(e.property&&e.property.value||this._core.current())+r,s=this._core.clones().length,a=t.proxy(function(t,e){this.load(e)},this);r++<n;)this.load(s/2+this._core.relative(o)),s&&t.each(this._core.clones(this._core.relative(o++)),a)},this)},this._core.options=t.extend({},i.Defaults,this._core.options),this._core.$element.on(this._handlers)};i.Defaults={lazyLoad:!1},i.prototype.load=function(i){var n=this._core.$stage.children().eq(i),r=n&&n.find(".owl-lazy");!r||t.inArray(n.get(0),this._loaded)>-1||(r.each(t.proxy(function(i,n){var r,o=t(n),s=e.devicePixelRatio>1&&o.attr("data-src-retina")||o.attr("data-src");this._core.trigger("load",{element:o,url:s},"lazy"),o.is("img")?o.one("load.owl.lazy",t.proxy(function(){o.css("opacity",1),this._core.trigger("loaded",{element:o,url:s},"lazy")},this)).attr("src",s):(r=new Image,r.onload=t.proxy(function(){o.css({"background-image":"url("+s+")",opacity:"1"}),this._core.trigger("loaded",{element:o,url:s},"lazy")},this),r.src=s)},this)),this._loaded.push(n.get(0)))},i.prototype.destroy=function(){var t,e;for(t in this.handlers)this._core.$element.off(t,this.handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},t.fn.owlCarousel.Constructor.Plugins.Lazy=i}(window.Zepto||window.jQuery,window,document),function(t){var e=function(i){this._core=i,this._handlers={"initialized.owl.carousel":t.proxy(function(){this._core.settings.autoHeight&&this.update()},this),"changed.owl.carousel":t.proxy(function(t){this._core.settings.autoHeight&&"position"==t.property.name&&this.update()},this),"loaded.owl.lazy":t.proxy(function(t){this._core.settings.autoHeight&&t.element.closest("."+this._core.settings.itemClass)===this._core.$stage.children().eq(this._core.current())&&this.update()},this)},this._core.options=t.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers)};e.Defaults={autoHeight:!1,autoHeightClass:"owl-height"},e.prototype.update=function(){this._core.$stage.parent().height(this._core.$stage.children().eq(this._core.current()).height()).addClass(this._core.settings.autoHeightClass)},e.prototype.destroy=function(){var t,e;for(t in this._handlers)this._core.$element.off(t,this._handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},t.fn.owlCarousel.Constructor.Plugins.AutoHeight=e}(window.Zepto||window.jQuery,window,document),function(t,e,i){var n=function(e){this._core=e,this._videos={},this._playing=null,this._fullscreen=!1,this._handlers={"resize.owl.carousel":t.proxy(function(t){this._core.settings.video&&!this.isInFullScreen()&&t.preventDefault()},this),"refresh.owl.carousel changed.owl.carousel":t.proxy(function(){this._playing&&this.stop()},this),"prepared.owl.carousel":t.proxy(function(e){var i=t(e.content).find(".owl-video");i.length&&(i.css("display","none"),this.fetch(i,t(e.content)))},this)},this._core.options=t.extend({},n.Defaults,this._core.options),this._core.$element.on(this._handlers),this._core.$element.on("click.owl.video",".owl-video-play-icon",t.proxy(function(t){this.play(t)},this))};n.Defaults={video:!1,videoHeight:!1,videoWidth:!1},n.prototype.fetch=function(t,e){var i=t.attr("data-vimeo-id")?"vimeo":"youtube",n=t.attr("data-vimeo-id")||t.attr("data-youtube-id"),r=t.attr("data-width")||this._core.settings.videoWidth,o=t.attr("data-height")||this._core.settings.videoHeight,s=t.attr("href");if(!s)throw new Error("Missing video URL.");if(n=s.match(/(http:|https:|)\/\/(player.|www.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com))\/(video\/|embed\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?/),n[3].indexOf("youtu")>-1)i="youtube";else{if(!(n[3].indexOf("vimeo")>-1))throw new Error("Video URL not supported.");i="vimeo"}n=n[6],this._videos[s]={type:i,id:n,width:r,height:o},e.attr("data-video",s),this.thumbnail(t,this._videos[s])},n.prototype.thumbnail=function(e,i){var n,r,o,s=i.width&&i.height?'style="width:'+i.width+"px;height:"+i.height+'px;"':"",a=e.find("img"),l="src",u="",c=this._core.settings,d=function(t){r='<div class="owl-video-play-icon"></div>',n=c.lazyLoad?'<div class="owl-video-tn '+u+'" '+l+'="'+t+'"></div>':'<div class="owl-video-tn" style="opacity:1;background-image:url('+t+')"></div>',e.after(n),e.after(r)};return e.wrap('<div class="owl-video-wrapper"'+s+"></div>"),this._core.settings.lazyLoad&&(l="data-src",u="owl-lazy"),a.length?(d(a.attr(l)),a.remove(),!1):void("youtube"===i.type?(o="http://img.youtube.com/vi/"+i.id+"/hqdefault.jpg",d(o)):"vimeo"===i.type&&t.ajax({type:"GET",url:"http://vimeo.com/api/v2/video/"+i.id+".json",jsonp:"callback",dataType:"jsonp",success:function(t){o=t[0].thumbnail_large,d(o)}}))},n.prototype.stop=function(){this._core.trigger("stop",null,"video"),this._playing.find(".owl-video-frame").remove(),this._playing.removeClass("owl-video-playing"),this._playing=null},n.prototype.play=function(e){this._core.trigger("play",null,"video"),this._playing&&this.stop();var i,n,r=t(e.target||e.srcElement),o=r.closest("."+this._core.settings.itemClass),s=this._videos[o.attr("data-video")],a=s.width||"100%",l=s.height||this._core.$stage.height();"youtube"===s.type?i='<iframe width="'+a+'" height="'+l+'" src="http://www.youtube.com/embed/'+s.id+"?autoplay=1&v="+s.id+'" frameborder="0" allowfullscreen></iframe>':"vimeo"===s.type&&(i='<iframe src="http://player.vimeo.com/video/'+s.id+'?autoplay=1" width="'+a+'" height="'+l+'" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>'),o.addClass("owl-video-playing"),this._playing=o,n=t('<div style="height:'+l+"px; width:"+a+'px" class="owl-video-frame">'+i+"</div>"),r.after(n)},n.prototype.isInFullScreen=function(){var n=i.fullscreenElement||i.mozFullScreenElement||i.webkitFullscreenElement;return n&&t(n).parent().hasClass("owl-video-frame")&&(this._core.speed(0),this._fullscreen=!0),n&&this._fullscreen&&this._playing?!1:this._fullscreen?(this._fullscreen=!1,!1):this._playing&&this._core.state.orientation!==e.orientation?(this._core.state.orientation=e.orientation,!1):!0},n.prototype.destroy=function(){var t,e;this._core.$element.off("click.owl.video");for(t in this._handlers)this._core.$element.off(t,this._handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},t.fn.owlCarousel.Constructor.Plugins.Video=n}(window.Zepto||window.jQuery,window,document),function(t,e,i,n){var r=function(e){this.core=e,this.core.options=t.extend({},r.Defaults,this.core.options),this.swapping=!0,this.previous=n,this.next=n,this.handlers={"change.owl.carousel":t.proxy(function(t){"position"==t.property.name&&(this.previous=this.core.current(),this.next=t.property.value)},this),"drag.owl.carousel dragged.owl.carousel translated.owl.carousel":t.proxy(function(t){this.swapping="translated"==t.type},this),"translate.owl.carousel":t.proxy(function(){this.swapping&&(this.core.options.animateOut||this.core.options.animateIn)&&this.swap()},this)},this.core.$element.on(this.handlers)};r.Defaults={animateOut:!1,animateIn:!1},r.prototype.swap=function(){if(1===this.core.settings.items&&this.core.support3d){this.core.speed(0);var e,i=t.proxy(this.clear,this),n=this.core.$stage.children().eq(this.previous),r=this.core.$stage.children().eq(this.next),o=this.core.settings.animateIn,s=this.core.settings.animateOut;this.core.current()!==this.previous&&(s&&(e=this.core.coordinates(this.previous)-this.core.coordinates(this.next),n.css({left:e+"px"}).addClass("animated owl-animated-out").addClass(s).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",i)),o&&r.addClass("animated owl-animated-in").addClass(o).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",i))}},r.prototype.clear=function(e){t(e.target).css({left:""}).removeClass("animated owl-animated-out owl-animated-in").removeClass(this.core.settings.animateIn).removeClass(this.core.settings.animateOut),this.core.transitionEnd()},r.prototype.destroy=function(){var t,e;for(t in this.handlers)this.core.$element.off(t,this.handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},t.fn.owlCarousel.Constructor.Plugins.Animate=r}(window.Zepto||window.jQuery,window,document),function(t,e,i){var n=function(e){this.core=e,this.core.options=t.extend({},n.Defaults,this.core.options),this.handlers={"translated.owl.carousel refreshed.owl.carousel":t.proxy(function(){this.autoplay()},this),"play.owl.autoplay":t.proxy(function(t,e,i){this.play(e,i)},this),"stop.owl.autoplay":t.proxy(function(){this.stop()},this),"mouseover.owl.autoplay":t.proxy(function(){this.core.settings.autoplayHoverPause&&this.pause()},this),"mouseleave.owl.autoplay":t.proxy(function(){this.core.settings.autoplayHoverPause&&this.autoplay()},this)},this.core.$element.on(this.handlers)};n.Defaults={autoplay:!1,autoplayTimeout:5e3,autoplayHoverPause:!1,autoplaySpeed:!1},n.prototype.autoplay=function(){this.core.settings.autoplay&&!this.core.state.videoPlay?(e.clearInterval(this.interval),this.interval=e.setInterval(t.proxy(function(){this.play()},this),this.core.settings.autoplayTimeout)):e.clearInterval(this.interval)},n.prototype.play=function(){return i.hidden===!0||this.core.state.isTouch||this.core.state.isScrolling||this.core.state.isSwiping||this.core.state.inMotion?void 0:this.core.settings.autoplay===!1?void e.clearInterval(this.interval):void this.core.next(this.core.settings.autoplaySpeed)},n.prototype.stop=function(){e.clearInterval(this.interval)},n.prototype.pause=function(){e.clearInterval(this.interval)},n.prototype.destroy=function(){var t,i;e.clearInterval(this.interval);for(t in this.handlers)this.core.$element.off(t,this.handlers[t]);for(i in Object.getOwnPropertyNames(this))"function"!=typeof this[i]&&(this[i]=null)},t.fn.owlCarousel.Constructor.Plugins.autoplay=n}(window.Zepto||window.jQuery,window,document),function(t){"use strict";var e=function(i){this._core=i,this._initialized=!1,this._pages=[],this._controls={},this._templates=[],this.$element=this._core.$element,this._overrides={next:this._core.next,prev:this._core.prev,to:this._core.to},this._handlers={"prepared.owl.carousel":t.proxy(function(e){this._core.settings.dotsData&&this._templates.push(t(e.content).find("[data-dot]").andSelf("[data-dot]").attr("data-dot"))},this),"add.owl.carousel":t.proxy(function(e){this._core.settings.dotsData&&this._templates.splice(e.position,0,t(e.content).find("[data-dot]").andSelf("[data-dot]").attr("data-dot"))},this),"remove.owl.carousel prepared.owl.carousel":t.proxy(function(t){this._core.settings.dotsData&&this._templates.splice(t.position,1)},this),"change.owl.carousel":t.proxy(function(t){if("position"==t.property.name&&!this._core.state.revert&&!this._core.settings.loop&&this._core.settings.navRewind){var e=this._core.current(),i=this._core.maximum(),n=this._core.minimum();t.data=t.property.value>i?e>=i?n:i:t.property.value<n?i:t.property.value}},this),"changed.owl.carousel":t.proxy(function(t){"position"==t.property.name&&this.draw()},this),"refreshed.owl.carousel":t.proxy(function(){this._initialized||(this.initialize(),this._initialized=!0),this._core.trigger("refresh",null,"navigation"),this.update(),this.draw(),this._core.trigger("refreshed",null,"navigation")},this)},this._core.options=t.extend({},e.Defaults,this._core.options),this.$element.on(this._handlers)};e.Defaults={nav:!1,navRewind:!0,navText:["prev","next"],navSpeed:!1,navElement:"div",navContainer:!1,navContainerClass:"owl-nav",navClass:["owl-prev","owl-next"],slideBy:1,dotClass:"owl-dot",dotsClass:"owl-dots",dots:!0,dotsEach:!1,dotData:!1,dotsSpeed:!1,dotsContainer:!1,controlsClass:"owl-controls"},e.prototype.initialize=function(){var e,i,n=this._core.settings;n.dotsData||(this._templates=[t("<div>").addClass(n.dotClass).append(t("<span>")).prop("outerHTML")]),n.navContainer&&n.dotsContainer||(this._controls.$container=t("<div>").addClass(n.controlsClass).appendTo(this.$element)),this._controls.$indicators=n.dotsContainer?t(n.dotsContainer):t("<div>").hide().addClass(n.dotsClass).appendTo(this._controls.$container),this._controls.$indicators.on("click","div",t.proxy(function(e){var i=t(e.target).parent().is(this._controls.$indicators)?t(e.target).index():t(e.target).parent().index();e.preventDefault(),this.to(i,n.dotsSpeed)},this)),e=n.navContainer?t(n.navContainer):t("<div>").addClass(n.navContainerClass).prependTo(this._controls.$container),this._controls.$next=t("<"+n.navElement+">"),this._controls.$previous=this._controls.$next.clone(),this._controls.$previous.addClass(n.navClass[0]).html(n.navText[0]).hide().prependTo(e).on("click",t.proxy(function(){this.prev(n.navSpeed)},this)),this._controls.$next.addClass(n.navClass[1]).html(n.navText[1]).hide().appendTo(e).on("click",t.proxy(function(){this.next(n.navSpeed)},this));for(i in this._overrides)this._core[i]=t.proxy(this[i],this)},e.prototype.destroy=function(){var t,e,i,n;for(t in this._handlers)this.$element.off(t,this._handlers[t]);for(e in this._controls)this._controls[e].remove();for(n in this.overides)this._core[n]=this._overrides[n];for(i in Object.getOwnPropertyNames(this))"function"!=typeof this[i]&&(this[i]=null)},e.prototype.update=function(){var t,e,i,n=this._core.settings,r=this._core.clones().length/2,o=r+this._core.items().length,s=n.center||n.autoWidth||n.dotData?1:n.dotsEach||n.items;if("page"!==n.slideBy&&(n.slideBy=Math.min(n.slideBy,n.items)),n.dots||"page"==n.slideBy)for(this._pages=[],t=r,e=0,i=0;o>t;t++)(e>=s||0===e)&&(this._pages.push({start:t-r,end:t-r+s-1}),e=0,++i),e+=this._core.mergers(this._core.relative(t))},e.prototype.draw=function(){var e,i,n="",r=this._core.settings,o=(this._core.$stage.children(),this._core.relative(this._core.current()));if(!r.nav||r.loop||r.navRewind||(this._controls.$previous.toggleClass("disabled",0>=o),this._controls.$next.toggleClass("disabled",o>=this._core.maximum())),this._controls.$previous.toggle(r.nav),this._controls.$next.toggle(r.nav),r.dots){if(e=this._pages.length-this._controls.$indicators.children().length,r.dotData&&0!==e){for(i=0;i<this._controls.$indicators.children().length;i++)n+=this._templates[this._core.relative(i)];this._controls.$indicators.html(n)}else e>0?(n=new Array(e+1).join(this._templates[0]),this._controls.$indicators.append(n)):0>e&&this._controls.$indicators.children().slice(e).remove();this._controls.$indicators.find(".active").removeClass("active"),this._controls.$indicators.children().eq(t.inArray(this.current(),this._pages)).addClass("active")}this._controls.$indicators.toggle(r.dots)},e.prototype.onTrigger=function(e){var i=this._core.settings;e.page={index:t.inArray(this.current(),this._pages),count:this._pages.length,size:i&&(i.center||i.autoWidth||i.dotData?1:i.dotsEach||i.items)}},e.prototype.current=function(){var e=this._core.relative(this._core.current());return t.grep(this._pages,function(t){return t.start<=e&&t.end>=e}).pop()},e.prototype.getPosition=function(e){var i,n,r=this._core.settings;return"page"==r.slideBy?(i=t.inArray(this.current(),this._pages),n=this._pages.length,e?++i:--i,i=this._pages[(i%n+n)%n].start):(i=this._core.relative(this._core.current()),n=this._core.items().length,e?i+=r.slideBy:i-=r.slideBy),i},e.prototype.next=function(e){t.proxy(this._overrides.to,this._core)(this.getPosition(!0),e)},e.prototype.prev=function(e){t.proxy(this._overrides.to,this._core)(this.getPosition(!1),e)},e.prototype.to=function(e,i,n){var r;n?t.proxy(this._overrides.to,this._core)(e,i):(r=this._pages.length,t.proxy(this._overrides.to,this._core)(this._pages[(e%r+r)%r].start,i))},t.fn.owlCarousel.Constructor.Plugins.Navigation=e}(window.Zepto||window.jQuery,window,document),function(t,e){"use strict";var i=function(n){this._core=n,this._hashes={},this.$element=this._core.$element,this._handlers={"initialized.owl.carousel":t.proxy(function(){"URLHash"==this._core.settings.startPosition&&t(e).trigger("hashchange.owl.navigation")},this),"prepared.owl.carousel":t.proxy(function(e){var i=t(e.content).find("[data-hash]").andSelf("[data-hash]").attr("data-hash");this._hashes[i]=e.content},this)},this._core.options=t.extend({},i.Defaults,this._core.options),this.$element.on(this._handlers),t(e).on("hashchange.owl.navigation",t.proxy(function(){var t=e.location.hash.substring(1),i=this._core.$stage.children(),n=this._hashes[t]&&i.index(this._hashes[t])||0;return t?void this._core.to(n,!1,!0):!1},this))};i.Defaults={URLhashListener:!1},i.prototype.destroy=function(){var i,n;t(e).off("hashchange.owl.navigation");for(i in this._handlers)this._core.$element.off(i,this._handlers[i]);for(n in Object.getOwnPropertyNames(this))"function"!=typeof this[n]&&(this[n]=null)},t.fn.owlCarousel.Constructor.Plugins.Hash=i}(window.Zepto||window.jQuery,window,document),!function(t){"use strict";t.fn.fitVids=function(e){var i={customSelector:null,ignore:null};if(!document.getElementById("fit-vids-style")){var n=document.head||document.getElementsByTagName("head")[0],r=".fluid-width-video-wrapper{width:100%;position:relative;padding:0;}.fluid-width-video-wrapper iframe,.fluid-width-video-wrapper object,.fluid-width-video-wrapper embed {position:absolute;top:0;left:0;width:100%;height:100%;}",o=document.createElement("div");o.innerHTML='<p>x</p><style id="fit-vids-style">'+r+"</style>",n.appendChild(o.childNodes[1])}return e&&t.extend(i,e),this.each(function(){var e=['iframe[src*="player.vimeo.com"]','iframe[src*="youtube.com"]','iframe[src*="youtube-nocookie.com"]','iframe[src*="kickstarter.com"][src*="video.html"]',"object","embed"];i.customSelector&&e.push(i.customSelector);var n=".fitvidsignore";i.ignore&&(n=n+", "+i.ignore);var r=t(this).find(e.join(","));r=r.not("object object"),r=r.not(n),r.each(function(e){var i=t(this);if(!(i.parents(n).length>0||"embed"===this.tagName.toLowerCase()&&i.parent("object").length||i.parent(".fluid-width-video-wrapper").length)){i.css("height")||i.css("width")||!isNaN(i.attr("height"))&&!isNaN(i.attr("width"))||(i.attr("height",9),i.attr("width",16));var r="object"===this.tagName.toLowerCase()||i.attr("height")&&!isNaN(parseInt(i.attr("height"),10))?parseInt(i.attr("height"),10):i.height(),o=isNaN(parseInt(i.attr("width"),10))?i.width():parseInt(i.attr("width"),10),s=r/o;if(!i.attr("id")){var a="fitvid"+e;i.attr("id",a)}i.wrap('<div class="fluid-width-video-wrapper"></div>').parent(".fluid-width-video-wrapper").css("padding-top",100*s+"%"),i.removeAttr("height").removeAttr("width")}})})}}(window.jQuery||window.Zepto),!function(t,e){"function"==typeof define&&define.amd?define(["jquery"],e):e("object"==typeof exports?require("jquery"):t.jQuery)}(this,function(t){"use strict";function e(t){var e,i,n,r,o,s,a,l={};for(o=t.replace(/\s*:\s*/g,":").replace(/\s*,\s*/g,",").split(","),a=0,s=o.length;s>a&&(i=o[a],-1===i.search(/^(http|https|ftp):\/\//)&&-1!==i.search(":"));a++)e=i.indexOf(":"),n=i.substring(0,e),r=i.substring(e+1),r||(r=void 0),"string"==typeof r&&(r="true"===r||"false"!==r&&r),"string"==typeof r&&(r=isNaN(r)?r:+r),l[n]=r;return null==n&&null==r?t:l}function i(t){t=""+t;var e,i,n,r=t.split(/\s+/),o="50%",s="50%";for(n=0,e=r.length;e>n;n++)i=r[n],"left"===i?o="0%":"right"===i?o="100%":"top"===i?s="0%":"bottom"===i?s="100%":"center"===i?0===n?o="50%":s="50%":0===n?o=i:s=i;return{x:o,y:s}}function n(e,i){var n=function(){i(this.src)};t('<img src="'+e+'.gif">').on("load",n),t('<img src="'+e+'.jpg">').on("load",n),t('<img src="'+e+'.jpeg">').on("load",n),t('<img src="'+e+'.png">').on("load",n)}function r(i,n,r){if(this.$element=t(i),"string"==typeof n&&(n=e(n)),r?"string"==typeof r&&(r=e(r)):r={},"string"==typeof n)n=n.replace(/\.\w*$/,"");else if("object"==typeof n)for(var o in n)n.hasOwnProperty(o)&&(n[o]=n[o].replace(/\.\w*$/,""));this.settings=t.extend({},s,r),this.path=n;try{this.init()}catch(l){if(l.message!==a)throw l}}var o="vide",s={volume:1,playbackRate:1,muted:!0,loop:!0,autoplay:!0,position:"50% 50%",posterType:"detect",resizing:!0,bgColor:"transparent",className:""},a="Not implemented";r.prototype.init=function(){var e,r,o=this,s=o.path,l=s,u="",c=o.$element,d=o.settings,h=i(d.position),p=d.posterType;r=o.$wrapper=t("<div>").addClass(d.className).css({position:"absolute","z-index":-1,top:0,left:0,bottom:0,right:0,overflow:"hidden","-webkit-background-size":"cover","-moz-background-size":"cover","-o-background-size":"cover","background-size":"cover","background-color":d.bgColor,"background-repeat":"no-repeat","background-position":h.x+" "+h.y}),"object"==typeof s&&(s.poster?l=s.poster:s.mp4?l=s.mp4:s.webm?l=s.webm:s.ogv&&(l=s.ogv)),"detect"===p?n(l,function(t){r.css("background-image","url("+t+")")}):"none"!==p&&r.css("background-image","url("+l+"."+p+")"),"static"===c.css("position")&&c.css("position","relative"),c.prepend(r),"object"==typeof s?(s.mp4&&(u+='<source src="'+s.mp4+'.mp4" type="video/mp4">'),s.webm&&(u+='<source src="'+s.webm+'.webm" type="video/webm">'),s.ogv&&(u+='<source src="'+s.ogv+'.ogv" type="video/ogg">'),e=o.$video=t("<video>"+u+"</video>")):e=o.$video=t('<video><source src="'+s+'.mp4" type="video/mp4"><source src="'+s+'.webm" type="video/webm"><source src="'+s+'.ogv" type="video/ogg"></video>');try{e.prop({autoplay:d.autoplay,loop:d.loop,volume:d.volume,muted:d.muted,defaultMuted:d.muted,playbackRate:d.playbackRate,defaultPlaybackRate:d.playbackRate})}catch(f){throw new Error(a)}e.css({margin:"auto",position:"absolute","z-index":-1,top:h.y,left:h.x,"-webkit-transform":"translate(-"+h.x+", -"+h.y+")","-ms-transform":"translate(-"+h.x+", -"+h.y+")","-moz-transform":"translate(-"+h.x+", -"+h.y+")",transform:"translate(-"+h.x+", -"+h.y+")",visibility:"hidden",opacity:0}).one("canplaythrough.vide",function(){o.resize()}).one("playing.vide",function(){e.css({visibility:"visible",opacity:1}),r.css("background-image","none")}),c.on("resize.vide",function(){d.resizing&&o.resize()}),r.append(e)},r.prototype.getVideoObject=function(){return this.$video[0]},r.prototype.resize=function(){if(this.$video){var t=this.$wrapper,e=this.$video,i=e[0],n=i.videoHeight,r=i.videoWidth,o=t.height(),s=t.width();s/r>o/n?e.css({width:s+2,height:"auto"}):e.css({width:"auto",height:o+2})}},r.prototype.destroy=function(){delete t[o].lookup[this.index],this.$video&&this.$video.off(o),this.$element.off(o).removeData(o),this.$wrapper.remove()},t[o]={lookup:[]},t.fn[o]=function(e,i){var n;return this.each(function(){n=t.data(this,o),n&&n.destroy(),n=new r(this,e,i),n.index=t[o].lookup.push(n)-1,t.data(this,o,n)}),this},t(document).ready(function(){var e=t(window);e.on("resize.vide",function(){for(var e,i=t[o].lookup.length,n=0;i>n;n++)e=t[o].lookup[n],e&&e.settings.resizing&&e.resize()}),e.on("unload.vide",function(){return!1}),t(document).find("[data-vide-bg]").each(function(e,i){var n=t(i),r=n.data("vide-options"),s=n.data("vide-bg");n[o](s,r)})})});var ytp=ytp||{},getYTPVideoID=function(t){var e,i;return t.indexOf("youtu.be")>0?(e=t.substr(t.lastIndexOf("/")+1,t.length),i=e.indexOf("?list=")>0?e.substr(e.lastIndexOf("="),e.length):null,e=i?e.substr(0,e.lastIndexOf("?")):e):t.indexOf("http")>-1?(e=t.match(/[\\?&]v=([^&#]*)/)[1],i=t.indexOf("list=")>0?t.match(/[\\?&]list=([^&#]*)/)[1]:null):(e=t.length>15?null:t,i=e?null:t),{videoID:e,playlistID:i}};!function(jQuery,ytp){jQuery.mbYTPlayer={name:"jquery.mb.YTPlayer",version:"3.0.18",build:"6220",author:"Matteo Bicocchi (pupunzi)",apiKey:"",defaults:{containment:"body",ratio:"auto",videoURL:null,playlistURL:null,startAt:0,stopAt:0,autoPlay:!0,vol:50,addRaster:!1,mask:!1,opacity:1,quality:"default",mute:!1,loop:!0,fadeOnStartTime:500,showControls:!0,showAnnotations:!1,showYTLogo:!0,stopMovieOnBlur:!0,realfullscreen:!0,mobileFallbackImage:null,gaTrack:!0,optimizeDisplay:!0,remember_last_time:!1,anchor:"center,center",onReady:function(){},onError:function(){}},controls:{play:"P",pause:"p",mute:"M",unmute:"A",onlyYT:"O",showSite:"R",ytLogo:"Y"},controlBar:null,loading:null,locationProtocol:"https:",filters:{grayscale:{value:0,unit:"%"},hue_rotate:{value:0,unit:"deg"},invert:{value:0,unit:"%"},opacity:{value:0,unit:"%"},saturate:{value:0,unit:"%"},sepia:{value:0,unit:"%"},brightness:{value:0,unit:"%"},contrast:{value:0,unit:"%"},blur:{value:0,unit:"px"}},buildPlayer:function(options){return this.each(function(){var YTPlayer=this,$YTPlayer=jQuery(YTPlayer);YTPlayer.loop=0,YTPlayer.opt={},YTPlayer.state={},YTPlayer.filters=jQuery.mbYTPlayer.filters,YTPlayer.filtersEnabled=!0,YTPlayer.id=YTPlayer.id||"YTP_"+(new Date).getTime(),$YTPlayer.addClass("mb_YTPlayer");var property=$YTPlayer.data("property")&&"string"==typeof $YTPlayer.data("property")?eval("("+$YTPlayer.data("property")+")"):$YTPlayer.data("property");"undefined"!=typeof property&&"undefined"!=typeof property.vol&&(property.vol=0===property.vol?property.vol=1:property.vol),jQuery.extend(YTPlayer.opt,jQuery.mbYTPlayer.defaults,options,property),YTPlayer.hasChanged||(YTPlayer.defaultOpt={},jQuery.extend(YTPlayer.defaultOpt,jQuery.mbYTPlayer.defaults,options)),"true"==YTPlayer.opt.loop&&(YTPlayer.opt.loop=9999),YTPlayer.isRetina=window.retina||window.devicePixelRatio>1;var isIframe=function(){var t=!1;try{self.location.href!=top.location.href&&(t=!0)}catch(e){t=!0}return t};YTPlayer.canGoFullScreen=!(jQuery.browser.msie||jQuery.browser.opera||isIframe()),YTPlayer.canGoFullScreen||(YTPlayer.opt.realfullscreen=!1),$YTPlayer.attr("id")||$YTPlayer.attr("id","ytp_"+(new Date).getTime());var playerID="iframe_"+YTPlayer.id;YTPlayer.isAlone=!1,YTPlayer.hasFocus=!0,YTPlayer.videoID=this.opt.videoURL?getYTPVideoID(this.opt.videoURL).videoID:$YTPlayer.attr("href")?getYTPVideoID($YTPlayer.attr("href")).videoID:!1,YTPlayer.playlistID=this.opt.videoURL?getYTPVideoID(this.opt.videoURL).playlistID:$YTPlayer.attr("href")?getYTPVideoID($YTPlayer.attr("href")).playlistID:!1,YTPlayer.opt.showAnnotations=YTPlayer.opt.showAnnotations?"1":"3";var start_from_last=0;jQuery.mbCookie.get("YTPlayer_"+YTPlayer.videoID)&&(start_from_last=parseFloat(jQuery.mbCookie.get("YTPlayer_"+YTPlayer.videoID))),YTPlayer.opt.remember_last_time&&start_from_last&&(YTPlayer.start_from_last=start_from_last,jQuery.mbCookie.remove("YTPlayer_"+YTPlayer.videoID));var playerVars={modestbranding:1,autoplay:0,controls:0,showinfo:0,rel:0,enablejsapi:1,version:3,playerapiid:playerID,origin:"*",allowfullscreen:!0,wmode:"transparent",iv_load_policy:YTPlayer.opt.showAnnotations};if(document.createElement("video").canPlayType&&jQuery.extend(playerVars,{html5:1}),jQuery.browser.msie&&jQuery.browser.version<9&&(this.opt.opacity=1),YTPlayer.isSelf="self"==YTPlayer.opt.containment,YTPlayer.defaultOpt.containment=YTPlayer.opt.containment=jQuery("self"==YTPlayer.opt.containment?this:YTPlayer.opt.containment),YTPlayer.isBackground=YTPlayer.opt.containment.is("body"),!YTPlayer.isBackground||!ytp.backgroundIsInited){var isPlayer=YTPlayer.opt.containment.is(jQuery(this));YTPlayer.canPlayOnMobile=isPlayer&&0===jQuery(this).children().length,YTPlayer.isPlayer=!1,isPlayer?YTPlayer.isPlayer=!0:$YTPlayer.hide();var overlay=jQuery("<div/>").css({position:"absolute",top:0,left:0,width:"100%",height:"100%"}).addClass("YTPOverlay");YTPlayer.isPlayer&&overlay.on("click",function(){$YTPlayer.YTPTogglePlay()});var wrapper=jQuery("<div/>").addClass("mbYTP_wrapper").attr("id","wrapper_"+YTPlayer.id);wrapper.css({position:"absolute",zIndex:0,minWidth:"100%",minHeight:"100%",left:0,top:0,overflow:"hidden",opacity:0});var playerBox=jQuery("<div/>").attr("id",playerID).addClass("playerBox");if(playerBox.css({position:"absolute",zIndex:0,width:"100%",height:"100%",top:0,left:0,overflow:"hidden"}),wrapper.append(playerBox),YTPlayer.opt.containment.children().not("script, style").each(function(){"static"==jQuery(this).css("position")&&jQuery(this).css("position","relative")}),YTPlayer.isBackground?(jQuery("body").css({boxSizing:"border-box"}),wrapper.css({position:"fixed",top:0,left:0,zIndex:0}),$YTPlayer.hide()):"static"==YTPlayer.opt.containment.css("position")&&YTPlayer.opt.containment.css({position:"relative"}),YTPlayer.opt.containment.prepend(wrapper),YTPlayer.wrapper=wrapper,playerBox.css({opacity:1}),jQuery.browser.mobile||(playerBox.after(overlay),YTPlayer.overlay=overlay),YTPlayer.isBackground||overlay.on("mouseenter",function(){YTPlayer.controlBar&&YTPlayer.controlBar.length&&YTPlayer.controlBar.addClass("visible")}).on("mouseleave",function(){YTPlayer.controlBar&&YTPlayer.controlBar.length&&YTPlayer.controlBar.removeClass("visible")}),ytp.YTAPIReady)setTimeout(function(){jQuery(document).trigger("YTAPIReady")},100);else{jQuery("#YTAPI").remove();var tag=jQuery("<script></script>").attr({src:jQuery.mbYTPlayer.locationProtocol+"//www.youtube.com/iframe_api?v="+jQuery.mbYTPlayer.version,id:"YTAPI"});jQuery("head").prepend(tag)}if(jQuery.browser.mobile&&!YTPlayer.canPlayOnMobile)return YTPlayer.opt.mobileFallbackImage&&wrapper.css({backgroundImage:"url("+YTPlayer.opt.mobileFallbackImage+")",backgroundPosition:"center center",backgroundSize:"cover",backgroundRepeat:"no-repeat",opacity:1}),$YTPlayer.remove(),void jQuery(document).trigger("YTPUnavailable");jQuery(document).on("YTAPIReady",function(){YTPlayer.isBackground&&ytp.backgroundIsInited||YTPlayer.isInit||(YTPlayer.isBackground&&(ytp.backgroundIsInited=!0),YTPlayer.opt.autoPlay="undefined"==typeof YTPlayer.opt.autoPlay?!!YTPlayer.isBackground:YTPlayer.opt.autoPlay,YTPlayer.opt.vol=YTPlayer.opt.vol?YTPlayer.opt.vol:100,jQuery.mbYTPlayer.getDataFromAPI(YTPlayer),jQuery(YTPlayer).on("YTPChanged",function(){if(!YTPlayer.isInit){if(YTPlayer.isInit=!0,jQuery.browser.mobile&&YTPlayer.canPlayOnMobile){if(YTPlayer.opt.containment.outerWidth()>jQuery(window).width()){YTPlayer.opt.containment.css({maxWidth:"100%"});var h=.563*YTPlayer.opt.containment.outerWidth();YTPlayer.opt.containment.css({maxHeight:h})}return void new YT.Player(playerID,{videoId:YTPlayer.videoID.toString(),width:"100%",height:h,playerVars:playerVars,events:{onReady:function(t){YTPlayer.player=t.target,playerBox.css({opacity:1}),YTPlayer.wrapper.css({opacity:1})}}})}new YT.Player(playerID,{videoId:YTPlayer.videoID.toString(),playerVars:playerVars,events:{onReady:function(t){YTPlayer.player=t.target,YTPlayer.isReady||(YTPlayer.isReady=!YTPlayer.isPlayer||YTPlayer.opt.autoPlay,YTPlayer.playerEl=YTPlayer.player.getIframe(),jQuery(YTPlayer.playerEl).unselectable(),$YTPlayer.optimizeDisplay(),jQuery(window).off("resize.YTP_"+YTPlayer.id).on("resize.YTP_"+YTPlayer.id,function(){$YTPlayer.optimizeDisplay()}),YTPlayer.opt.remember_last_time&&jQuery(window).on("unload.YTP_"+YTPlayer.id,function(){var t=YTPlayer.player.getCurrentTime();jQuery.mbCookie.set("YTPlayer_"+YTPlayer.videoID,t,1)}),jQuery.mbYTPlayer.checkForState(YTPlayer))},onStateChange:function(event){if("function"==typeof event.target.getPlayerState){var state=event.target.getPlayerState();if(YTPlayer.preventTrigger)return void(YTPlayer.preventTrigger=!1);YTPlayer.state=state;var eventType;switch(state){case-1:eventType="YTPUnstarted";break;case 0:eventType="YTPEnd";break;case 1:eventType="YTPPlay",YTPlayer.controlBar.length&&YTPlayer.controlBar.find(".mb_YTPPlaypause").html(jQuery.mbYTPlayer.controls.pause),"undefined"!=typeof _gaq&&eval(YTPlayer.opt.gaTrack)&&_gaq.push(["_trackEvent","YTPlayer","Play",YTPlayer.hasData?YTPlayer.videoData.title:YTPlayer.videoID.toString()]),"undefined"!=typeof ga&&eval(YTPlayer.opt.gaTrack)&&ga("send","event","YTPlayer","play",YTPlayer.hasData?YTPlayer.videoData.title:YTPlayer.videoID.toString());break;case 2:eventType="YTPPause",YTPlayer.controlBar.length&&YTPlayer.controlBar.find(".mb_YTPPlaypause").html(jQuery.mbYTPlayer.controls.play);break;case 3:YTPlayer.player.setPlaybackQuality(YTPlayer.opt.quality),eventType="YTPBuffering",YTPlayer.controlBar.length&&YTPlayer.controlBar.find(".mb_YTPPlaypause").html(jQuery.mbYTPlayer.controls.play);break;case 5:eventType="YTPCued"}var YTPEvent=jQuery.Event(eventType);YTPEvent.time=YTPlayer.currentTime,YTPlayer.canTrigger&&jQuery(YTPlayer).trigger(YTPEvent)}},onPlaybackQualityChange:function(t){var e=t.target.getPlaybackQuality(),i=jQuery.Event("YTPQualityChange");i.quality=e,jQuery(YTPlayer).trigger(i)},onError:function(t){150==t.data&&(console.log("Embedding this video is restricted by Youtube."),YTPlayer.isPlayList&&jQuery(YTPlayer).playNext()),2==t.data&&YTPlayer.isPlayList&&jQuery(YTPlayer).playNext(),"function"==typeof YTPlayer.opt.onError&&YTPlayer.opt.onError($YTPlayer,t)}}})}}))}),$YTPlayer.off("YTPTime.mask"),jQuery.mbYTPlayer.applyMask(YTPlayer)}})},getDataFromAPI:function(t){if(t.videoData=jQuery.mbStorage.get("YTPlayer_data_"+t.videoID),jQuery(t).off("YTPData.YTPlayer").on("YTPData.YTPlayer",function(){if(t.hasData&&t.isPlayer&&!t.opt.autoPlay){var e=t.videoData.thumb_max||t.videoData.thumb_high||t.videoData.thumb_medium;t.opt.containment.css({background:"rgba(0,0,0,0.5) url("+e+") center center",backgroundSize:"cover"}),t.opt.backgroundUrl=e}}),t.videoData)setTimeout(function(){t.opt.ratio="auto"==t.opt.ratio?"16/9":t.opt.ratio,t.dataReceived=!0,jQuery(t).trigger("YTPChanged");var e=jQuery.Event("YTPData");e.prop={};for(var i in t.videoData)e.prop[i]=t.videoData[i];jQuery(t).trigger(e)},t.opt.fadeOnStartTime),t.hasData=!0;else if(jQuery.mbYTPlayer.apiKey)jQuery.getJSON(jQuery.mbYTPlayer.locationProtocol+"//www.googleapis.com/youtube/v3/videos?id="+t.videoID+"&key="+jQuery.mbYTPlayer.apiKey+"&part=snippet",function(e){function i(e){t.videoData={},t.videoData.id=t.videoID,t.videoData.channelTitle=e.channelTitle,t.videoData.title=e.title,t.videoData.description=e.description.length<400?e.description:e.description.substring(0,400)+" ...",t.videoData.aspectratio="auto"==t.opt.ratio?"16/9":t.opt.ratio,t.opt.ratio=t.videoData.aspectratio,t.videoData.thumb_max=e.thumbnails.maxres?e.thumbnails.maxres.url:null,t.videoData.thumb_high=e.thumbnails.high?e.thumbnails.high.url:null,t.videoData.thumb_medium=e.thumbnails.medium?e.thumbnails.medium.url:null,jQuery.mbStorage.set("YTPlayer_data_"+t.videoID,t.videoData)}t.dataReceived=!0,jQuery(t).trigger("YTPChanged"),i(e.items[0].snippet),t.hasData=!0;var n=jQuery.Event("YTPData");n.prop={};for(var r in t.videoData)n.prop[r]=t.videoData[r];jQuery(t).trigger(n)});else{if(setTimeout(function(){jQuery(t).trigger("YTPChanged")},50),t.isPlayer&&!t.opt.autoPlay){var e=jQuery.mbYTPlayer.locationProtocol+"//i.ytimg.com/vi/"+t.videoID+"/hqdefault.jpg";e&&t.opt.containment.css({background:"rgba(0,0,0,0.5) url("+e+") center center",backgroundSize:"cover"}),t.opt.backgroundUrl=e}t.videoData=null,t.opt.ratio="auto"==t.opt.ratio?"16/9":t.opt.ratio}!t.isPlayer||t.opt.autoPlay||jQuery.browser.mobile||(t.loading=jQuery("<div/>").addClass("loading").html("Loading").hide(),jQuery(t).append(t.loading),t.loading.fadeIn())},removeStoredData:function(){jQuery.mbStorage.remove()},getVideoData:function(){var t=this.get(0);return t.videoData},getVideoID:function(){var t=this.get(0);return t.videoID||!1},setVideoQuality:function(t){var e=this.get(0);e.player.setPlaybackQuality(t)},playlist:function(t,e,i,n){var r=this,o=r.get(0);return o.isPlayList=!0,e&&(t=jQuery.shuffle(t)),o.videoID||(o.videos=t,o.videoCounter=0,o.videoLength=t.length,jQuery(o).data("property",t[0]),jQuery(o).mb_YTPlayer()),"function"==typeof i&&jQuery(o).one("YTPChanged",function(){i(o)}),jQuery(o).on("YTPEnd",function(){n="undefined"==typeof n?!0:n,jQuery(o).playNext(n)}),this},playNext:function(t){var e=this.get(0);return e.checkForStartAt&&(clearTimeout(e.checkForStartAt),clearInterval(e.getState)),e.videoCounter++,e.videoCounter>=e.videoLength&&t&&(e.videoCounter=0),e.videoCounter<e.videoLength?jQuery(e).YTPChangeMovie(e.videos[e.videoCounter]):e.videoCounter--,this},playPrev:function(){var t=this.get(0);return t.checkForStartAt&&(clearInterval(t.checkForStartAt),clearInterval(t.getState)),t.videoCounter--,t.videoCounter<0&&(t.videoCounter=t.videoLength-1),jQuery(t).YTPChangeMovie(t.videos[t.videoCounter]),this},playIndex:function(t){var e=this.get(0);return t-=1,e.checkForStartAt&&(clearInterval(e.checkForStartAt),clearInterval(e.getState)),e.videoCounter=t,e.videoCounter>=e.videoLength-1&&(e.videoCounter=e.videoLength-1),jQuery(e).YTPChangeMovie(e.videos[e.videoCounter]),this},changeMovie:function(t){var e=this,i=e.get(0);i.opt.startAt=0,i.opt.stopAt=0,i.opt.mask=!1,i.opt.mute=!0,i.hasData=!1,i.hasChanged=!0,i.player.loopTime=void 0,t&&jQuery.extend(i.opt,t),i.videoID=getYTPVideoID(i.opt.videoURL).videoID,"true"==i.opt.loop&&(i.opt.loop=9999),jQuery(i.playerEl).CSSAnimate({opacity:0},i.opt.fadeOnStartTime,function(){var t=jQuery.Event("YTPChangeMovie");t.time=i.currentTime,t.videoId=i.videoID,jQuery(i).trigger(t),jQuery(i).YTPGetPlayer().cueVideoByUrl(encodeURI(jQuery.mbYTPlayer.locationProtocol+"//www.youtube.com/v/"+i.videoID),1,i.opt.quality),jQuery(i).optimizeDisplay(),jQuery.mbYTPlayer.checkForState(i),jQuery.mbYTPlayer.getDataFromAPI(i)}),jQuery.mbYTPlayer.applyMask(i)},getPlayer:function(){return jQuery(this).get(0).player},playerDestroy:function(){var t=this.get(0);ytp.YTAPIReady=!0,ytp.backgroundIsInited=!1,t.isInit=!1,t.videoID=null,t.isReady=!1;var e=t.wrapper;return e.remove(),jQuery("#controlBar_"+t.id).remove(),clearInterval(t.checkForStartAt),clearInterval(t.getState),this},fullscreen:function(real){function hideMouse(){YTPlayer.overlay.css({cursor:"none"})}function RunPrefixMethod(t,e){for(var i,n,r=["webkit","moz","ms","o",""],o=0;o<r.length&&!t[i];){if(i=e,""==r[o]&&(i=i.substr(0,1).toLowerCase()+i.substr(1)),i=r[o]+i,n=typeof t[i],"undefined"!=n)return r=[r[o]],"function"==n?t[i]():t[i];o++}}function launchFullscreen(t){RunPrefixMethod(t,"RequestFullScreen")}function cancelFullscreen(){(RunPrefixMethod(document,"FullScreen")||RunPrefixMethod(document,"IsFullScreen"))&&RunPrefixMethod(document,"CancelFullScreen")}var YTPlayer=this.get(0);"undefined"==typeof real&&(real=YTPlayer.opt.realfullscreen),real=eval(real);var controls=jQuery("#controlBar_"+YTPlayer.id),fullScreenBtn=controls.find(".mb_OnlyYT"),videoWrapper=YTPlayer.isSelf?YTPlayer.opt.containment:YTPlayer.wrapper;if(real){var fullscreenchange=jQuery.browser.mozilla?"mozfullscreenchange":jQuery.browser.webkit?"webkitfullscreenchange":"fullscreenchange";jQuery(document).off(fullscreenchange).on(fullscreenchange,function(){var t=RunPrefixMethod(document,"IsFullScreen")||RunPrefixMethod(document,"FullScreen");t?(jQuery(YTPlayer).YTPSetVideoQuality("default"),jQuery(YTPlayer).trigger("YTPFullScreenStart")):(YTPlayer.isAlone=!1,fullScreenBtn.html(jQuery.mbYTPlayer.controls.onlyYT),jQuery(YTPlayer).YTPSetVideoQuality(YTPlayer.opt.quality),videoWrapper.removeClass("YTPFullscreen"),videoWrapper.CSSAnimate({opacity:YTPlayer.opt.opacity},YTPlayer.opt.fadeOnStartTime),videoWrapper.css({zIndex:0}),YTPlayer.isBackground?jQuery("body").after(controls):YTPlayer.wrapper.before(controls),jQuery(window).resize(),jQuery(YTPlayer).trigger("YTPFullScreenEnd"))})}return YTPlayer.isAlone?(jQuery(document).off("mousemove.YTPlayer"),clearTimeout(YTPlayer.hideCursor),YTPlayer.overlay.css({cursor:"auto"}),real?cancelFullscreen():(videoWrapper.CSSAnimate({opacity:YTPlayer.opt.opacity},YTPlayer.opt.fadeOnStartTime),videoWrapper.css({zIndex:0})),fullScreenBtn.html(jQuery.mbYTPlayer.controls.onlyYT),YTPlayer.isAlone=!1):(jQuery(document).on("mousemove.YTPlayer",function(t){YTPlayer.overlay.css({cursor:"auto"}),clearTimeout(YTPlayer.hideCursor),jQuery(t.target).parents().is(".mb_YTPBar")||(YTPlayer.hideCursor=setTimeout(hideMouse,3e3))}),hideMouse(),real?(videoWrapper.css({opacity:0}),videoWrapper.addClass("YTPFullscreen"),launchFullscreen(videoWrapper.get(0)),setTimeout(function(){videoWrapper.CSSAnimate({opacity:1},2*YTPlayer.opt.fadeOnStartTime),YTPlayer.wrapper.append(controls),jQuery(YTPlayer).optimizeDisplay(),YTPlayer.player.seekTo(YTPlayer.player.getCurrentTime()+.1,!0)},YTPlayer.opt.fadeOnStartTime)):videoWrapper.css({zIndex:1e4}).CSSAnimate({opacity:1},2*YTPlayer.opt.fadeOnStartTime),fullScreenBtn.html(jQuery.mbYTPlayer.controls.showSite),YTPlayer.isAlone=!0),this},toggleLoops:function(){var t=this.get(0),e=t.opt;return 1==e.loop?e.loop=0:(e.startAt?t.player.seekTo(e.startAt):t.player.playVideo(),e.loop=1),this},play:function(){var t=this.get(0);if(!t.isReady)return this;t.player.playVideo(),t.wrapper.CSSAnimate({opacity:t.isAlone?1:t.opt.opacity},4*t.opt.fadeOnStartTime),jQuery(t.playerEl).CSSAnimate({opacity:1},2*t.opt.fadeOnStartTime);var e=jQuery("#controlBar_"+t.id),i=e.find(".mb_YTPPlaypause");return i.html(jQuery.mbYTPlayer.controls.pause),t.state=1,t.orig_background=jQuery(t).css("background-image"),this},togglePlay:function(t){var e=this.get(0);return 1==e.state?this.YTPPause():this.YTPPlay(),"function"==typeof t&&t(e.state),this},stop:function(){var t=this.get(0),e=jQuery("#controlBar_"+t.id),i=e.find(".mb_YTPPlaypause");return i.html(jQuery.mbYTPlayer.controls.play),t.player.stopVideo(),this},pause:function(){var t=this.get(0);return t.player.pauseVideo(),t.state=2,this},seekTo:function(t){var e=this.get(0);return e.player.seekTo(t,!0),this},setVolume:function(t){var e=this.get(0);return t||e.opt.vol||0!=e.player.getVolume()?!t&&e.player.getVolume()>0||t&&e.opt.vol==t?e.isMute?jQuery(e).YTPUnmute():jQuery(e).YTPMute():(e.opt.vol=t,e.player.setVolume(e.opt.vol),e.volumeBar&&e.volumeBar.length&&e.volumeBar.updateSliderVal(t)):jQuery(e).YTPUnmute(),this},toggleVolume:function(){var t=this.get(0);return t?t.player.isMuted()?(jQuery(t).YTPUnmute(),!0):(jQuery(t).YTPMute(),!1):void 0},mute:function(){var t=this.get(0);if(!t.isMute){t.player.mute(),t.isMute=!0,t.player.setVolume(0),t.volumeBar&&t.volumeBar.length&&t.volumeBar.width()>10&&t.volumeBar.updateSliderVal(0);var e=jQuery("#controlBar_"+t.id),i=e.find(".mb_YTPMuteUnmute");i.html(jQuery.mbYTPlayer.controls.unmute),jQuery(t).addClass("isMuted"),t.volumeBar&&t.volumeBar.length&&t.volumeBar.addClass("muted");var n=jQuery.Event("YTPMuted");return n.time=t.currentTime,t.canTrigger&&jQuery(t).trigger(n),this}},unmute:function(){var t=this.get(0);if(t.isMute){t.player.unMute(),t.isMute=!1,t.player.setVolume(t.opt.vol),t.volumeBar&&t.volumeBar.length&&t.volumeBar.updateSliderVal(t.opt.vol>10?t.opt.vol:10);var e=jQuery("#controlBar_"+t.id),i=e.find(".mb_YTPMuteUnmute");i.html(jQuery.mbYTPlayer.controls.mute),jQuery(t).removeClass("isMuted"),t.volumeBar&&t.volumeBar.length&&t.volumeBar.removeClass("muted");var n=jQuery.Event("YTPUnmuted");return n.time=t.currentTime,t.canTrigger&&jQuery(t).trigger(n),this}},applyFilter:function(t,e){return this.each(function(){var i=this;i.filters[t].value=e,i.filtersEnabled&&jQuery(i).YTPEnableFilters()})},applyFilters:function(t){return this.each(function(){var e=this;if(!e.isReady)return void jQuery(e).on("YTPReady",function(){jQuery(e).YTPApplyFilters(t)});for(var i in t)jQuery(e).YTPApplyFilter(i,t[i]);jQuery(e).trigger("YTPFiltersApplied")})},toggleFilter:function(t,e){return this.each(function(){var i=this;i.filters[t].value?i.filters[t].value=0:i.filters[t].value=e,i.filtersEnabled&&jQuery(this).YTPEnableFilters()})},toggleFilters:function(t){return this.each(function(){var e=this;e.filtersEnabled?(jQuery(e).trigger("YTPDisableFilters"),jQuery(e).YTPDisableFilters()):(jQuery(e).YTPEnableFilters(),jQuery(e).trigger("YTPEnableFilters")),"function"==typeof t&&t(e.filtersEnabled)})},disableFilters:function(){return this.each(function(){var t=this,e=jQuery(t.playerEl);e.css("-webkit-filter",""),e.css("filter",""),t.filtersEnabled=!1})},enableFilters:function(){return this.each(function(){var t=this,e=jQuery(t.playerEl),i="";for(var n in t.filters)t.filters[n].value&&(i+=n.replace("_","-")+"("+t.filters[n].value+t.filters[n].unit+") ");e.css("-webkit-filter",i),e.css("filter",i),t.filtersEnabled=!0})},removeFilter:function(t,e){return this.each(function(){var i=this;if("function"==typeof t&&(e=t,t=null),t)jQuery(this).YTPApplyFilter(t,0),"function"==typeof e&&e(t);else for(var n in i.filters)jQuery(this).YTPApplyFilter(n,0),"function"==typeof e&&e(n)})},getFilters:function(){var t=this.get(0);return t.filters},addMask:function(t){var e=this.get(0),i=e.overlay;t||(t=e.actualMask);var n=jQuery("<img/>").attr("src",t).on("load",function(){i.CSSAnimate({opacity:0},e.opt.fadeOnStartTime,function(){e.hasMask=!0,n.remove(),i.css({backgroundImage:"url("+t+")",backgroundRepeat:"no-repeat",backgroundPosition:"center center",backgroundSize:"cover"}),i.CSSAnimate({opacity:1},e.opt.fadeOnStartTime)})});return this},removeMask:function(){var t=this.get(0),e=t.overlay;return e.CSSAnimate({opacity:0},t.opt.fadeOnStartTime,function(){t.hasMask=!1,e.css({backgroundImage:"",backgroundRepeat:"",backgroundPosition:"",backgroundSize:""}),e.CSSAnimate({opacity:1},t.opt.fadeOnStartTime)}),this},applyMask:function(t){var e=jQuery(t);if(e.off("YTPTime.mask"),t.opt.mask)if("string"==typeof t.opt.mask)e.YTPAddMask(t.opt.mask),t.actualMask=t.opt.mask;else if("object"==typeof t.opt.mask){for(var i in t.opt.mask)t.opt.mask[i]&&jQuery("<img/>").attr("src",t.opt.mask[i]);t.opt.mask[0]&&e.YTPAddMask(t.opt.mask[0]),e.on("YTPTime.mask",function(i){for(var n in t.opt.mask)i.time==n&&(t.opt.mask[n]?(e.YTPAddMask(t.opt.mask[n]),t.actualMask=t.opt.mask[n]):e.YTPRemoveMask())})}},toggleMask:function(){var t=this.get(0),e=$(t);return t.hasMask?e.YTPRemoveMask():e.YTPAddMask(),this},manageProgress:function(){var t=this.get(0),e=jQuery("#controlBar_"+t.id),i=e.find(".mb_YTPProgress"),n=e.find(".mb_YTPLoaded"),r=e.find(".mb_YTPseekbar"),o=i.outerWidth(),s=Math.floor(t.player.getCurrentTime()),a=Math.floor(t.player.getDuration()),l=s*o/a,u=0,c=100*t.player.getVideoLoadedFraction();return n.css({left:u,width:c+"%"}),r.css({left:0,width:l}),{totalTime:a,currentTime:s}},buildControls:function(YTPlayer){var data=YTPlayer.opt;if(data.showYTLogo=data.showYTLogo||data.printUrl,!jQuery("#controlBar_"+YTPlayer.id).length){YTPlayer.controlBar=jQuery("<span/>").attr("id","controlBar_"+YTPlayer.id).addClass("mb_YTPBar").css({whiteSpace:"noWrap",position:YTPlayer.isBackground?"fixed":"absolute",zIndex:YTPlayer.isBackground?1e4:1e3}).hide();var buttonBar=jQuery("<div/>").addClass("buttonBar"),playpause=jQuery("<span>"+jQuery.mbYTPlayer.controls.play+"</span>").addClass("mb_YTPPlaypause ytpicon").click(function(){1==YTPlayer.player.getPlayerState()?jQuery(YTPlayer).YTPPause():jQuery(YTPlayer).YTPPlay()}),MuteUnmute=jQuery("<span>"+jQuery.mbYTPlayer.controls.mute+"</span>").addClass("mb_YTPMuteUnmute ytpicon").click(function(){0==YTPlayer.player.getVolume()?jQuery(YTPlayer).YTPUnmute():jQuery(YTPlayer).YTPMute()}),volumeBar=jQuery("<div/>").addClass("mb_YTPVolumeBar").css({display:"inline-block"});YTPlayer.volumeBar=volumeBar;var idx=jQuery("<span/>").addClass("mb_YTPTime"),vURL=data.videoURL?data.videoURL:"";vURL.indexOf("http")<0&&(vURL=jQuery.mbYTPlayer.locationProtocol+"//www.youtube.com/watch?v="+data.videoURL);var movieUrl=jQuery("<span/>").html(jQuery.mbYTPlayer.controls.ytLogo).addClass("mb_YTPUrl ytpicon").attr("title","view on YouTube").on("click",function(){window.open(vURL,"viewOnYT")}),onlyVideo=jQuery("<span/>").html(jQuery.mbYTPlayer.controls.onlyYT).addClass("mb_OnlyYT ytpicon").on("click",function(){jQuery(YTPlayer).YTPFullscreen(data.realfullscreen)}),progressBar=jQuery("<div/>").addClass("mb_YTPProgress").css("position","absolute").click(function(t){timeBar.css({width:t.clientX-timeBar.offset().left}),YTPlayer.timeW=t.clientX-timeBar.offset().left,YTPlayer.controlBar.find(".mb_YTPLoaded").css({width:0});var e=Math.floor(YTPlayer.player.getDuration());YTPlayer["goto"]=timeBar.outerWidth()*e/progressBar.outerWidth(),YTPlayer.player.seekTo(parseFloat(YTPlayer["goto"]),!0),YTPlayer.controlBar.find(".mb_YTPLoaded").css({width:0})}),loadedBar=jQuery("<div/>").addClass("mb_YTPLoaded").css("position","absolute"),timeBar=jQuery("<div/>").addClass("mb_YTPseekbar").css("position","absolute");progressBar.append(loadedBar).append(timeBar),buttonBar.append(playpause).append(MuteUnmute).append(volumeBar).append(idx),data.showYTLogo&&buttonBar.append(movieUrl),(YTPlayer.isBackground||eval(YTPlayer.opt.realfullscreen)&&!YTPlayer.isBackground)&&buttonBar.append(onlyVideo),YTPlayer.controlBar.append(buttonBar).append(progressBar),YTPlayer.isBackground?jQuery("body").after(YTPlayer.controlBar):(YTPlayer.controlBar.addClass("inlinePlayer"),YTPlayer.wrapper.before(YTPlayer.controlBar)),volumeBar.simpleSlider({initialval:YTPlayer.opt.vol,scale:100,orientation:"h",callback:function(t){0==t.value?jQuery(YTPlayer).YTPMute():jQuery(YTPlayer).YTPUnmute(),YTPlayer.player.setVolume(t.value),YTPlayer.isMute||(YTPlayer.opt.vol=t.value)}})}},checkForState:function(YTPlayer){var interval=YTPlayer.opt.showControls?100:400;return clearInterval(YTPlayer.getState),jQuery.contains(document,YTPlayer)?(jQuery.mbYTPlayer.checkForStart(YTPlayer),void(YTPlayer.getState=setInterval(function(){var prog=jQuery(YTPlayer).YTPManageProgress(),$YTPlayer=jQuery(YTPlayer),data=YTPlayer.opt,startAt=YTPlayer.opt.startAt?YTPlayer.start_from_last?YTPlayer.start_from_last:YTPlayer.opt.startAt:1;YTPlayer.start_from_last=null;var stopAt=YTPlayer.opt.stopAt>YTPlayer.opt.startAt?YTPlayer.opt.stopAt:0;if(stopAt=stopAt<YTPlayer.player.getDuration()?stopAt:0,YTPlayer.currentTime!=prog.currentTime){var YTPEvent=jQuery.Event("YTPTime");YTPEvent.time=YTPlayer.currentTime,jQuery(YTPlayer).trigger(YTPEvent)}if(YTPlayer.currentTime=prog.currentTime,YTPlayer.totalTime=YTPlayer.player.getDuration(),0==YTPlayer.player.getVolume()?$YTPlayer.addClass("isMuted"):$YTPlayer.removeClass("isMuted"),YTPlayer.opt.showControls&&(prog.totalTime?YTPlayer.controlBar.find(".mb_YTPTime").html(jQuery.mbYTPlayer.formatTime(prog.currentTime)+" / "+jQuery.mbYTPlayer.formatTime(prog.totalTime)):YTPlayer.controlBar.find(".mb_YTPTime").html("-- : -- / -- : --")),eval(YTPlayer.opt.stopMovieOnBlur)&&(document.hasFocus()?document.hasFocus()&&!YTPlayer.hasFocus&&-1!=YTPlayer.state&&0!=YTPlayer.state&&(YTPlayer.hasFocus=!0,$YTPlayer.YTPPlay()):1==YTPlayer.state&&(YTPlayer.hasFocus=!1,$YTPlayer.YTPPause())),YTPlayer.controlBar.length&&YTPlayer.controlBar.outerWidth()<=400&&!YTPlayer.isCompact?(YTPlayer.controlBar.addClass("compact"),YTPlayer.isCompact=!0,!YTPlayer.isMute&&YTPlayer.volumeBar&&YTPlayer.volumeBar.updateSliderVal(YTPlayer.opt.vol)):YTPlayer.controlBar.length&&YTPlayer.controlBar.outerWidth()>400&&YTPlayer.isCompact&&(YTPlayer.controlBar.removeClass("compact"),YTPlayer.isCompact=!1,!YTPlayer.isMute&&YTPlayer.volumeBar&&YTPlayer.volumeBar.updateSliderVal(YTPlayer.opt.vol)),1==YTPlayer.player.getPlayerState()&&(parseFloat(YTPlayer.player.getDuration()-.5)<YTPlayer.player.getCurrentTime()||stopAt>0&&parseFloat(YTPlayer.player.getCurrentTime())>stopAt)){if(YTPlayer.isEnded)return;if(YTPlayer.isEnded=!0,setTimeout(function(){YTPlayer.isEnded=!1},1e3),YTPlayer.isPlayList){if(!data.loop||data.loop>0&&YTPlayer.player.loopTime===data.loop-1){YTPlayer.player.loopTime=void 0,clearInterval(YTPlayer.getState);var YTPEnd=jQuery.Event("YTPEnd");return YTPEnd.time=YTPlayer.currentTime,void jQuery(YTPlayer).trigger(YTPEnd)}}else if(!data.loop||data.loop>0&&YTPlayer.player.loopTime===data.loop-1)return YTPlayer.player.loopTime=void 0,YTPlayer.preventTrigger=!0,YTPlayer.state=2,jQuery(YTPlayer).YTPPause(),void YTPlayer.wrapper.CSSAnimate({opacity:0},YTPlayer.opt.fadeOnStartTime,function(){YTPlayer.controlBar.length&&YTPlayer.controlBar.find(".mb_YTPPlaypause").html(jQuery.mbYTPlayer.controls.play);var t=jQuery.Event("YTPEnd");t.time=YTPlayer.currentTime,jQuery(YTPlayer).trigger(t),YTPlayer.player.seekTo(startAt,!0),YTPlayer.isBackground?YTPlayer.orig_background&&jQuery(YTPlayer).css("background-image",YTPlayer.orig_background):YTPlayer.opt.backgroundUrl&&YTPlayer.isPlayer&&(YTPlayer.opt.backgroundUrl=YTPlayer.opt.backgroundUrl||YTPlayer.orig_background,YTPlayer.opt.containment.css({background:"url("+YTPlayer.opt.backgroundUrl+") center center",backgroundSize:"cover"}))});YTPlayer.player.loopTime=YTPlayer.player.loopTime?++YTPlayer.player.loopTime:1,startAt=startAt||1,YTPlayer.preventTrigger=!0,YTPlayer.state=2,jQuery(YTPlayer).YTPPause(),YTPlayer.player.seekTo(startAt,!0),$YTPlayer.YTPPlay()}},interval))):(jQuery(YTPlayer).YTPPlayerDestroy(),clearInterval(YTPlayer.getState),void clearInterval(YTPlayer.checkForStartAt))},getTime:function(){var t=this.get(0);return jQuery.mbYTPlayer.formatTime(t.currentTime)},getTotalTime:function(){var t=this.get(0);return jQuery.mbYTPlayer.formatTime(t.totalTime)},checkForStart:function(t){var e=jQuery(t);if(!jQuery.contains(document,t))return void jQuery(t).YTPPlayerDestroy();if(t.preventTrigger=!0,t.state=2,jQuery(t).YTPPause(),jQuery(t).muteYTPVolume(),jQuery("#controlBar_"+t.id).remove(),t.controlBar=!1,t.opt.showControls&&jQuery.mbYTPlayer.buildControls(t),t.opt.addRaster){var i="dot"==t.opt.addRaster?"raster-dot":"raster";t.overlay.addClass(t.isRetina?i+" retina":i)}else t.overlay.removeClass(function(t,e){var i=e.split(" "),n=[];return jQuery.each(i,function(t,e){/raster.*/.test(e)&&n.push(e)}),n.push("retina"),n.join(" ")});var n=t.opt.startAt?t.start_from_last?t.start_from_last:t.opt.startAt:1;t.start_from_last=null,t.player.playVideo(),t.player.seekTo(n,!0),t.checkForStartAt=setInterval(function(){jQuery(t).YTPMute();var i=t.player.getVideoLoadedFraction()>=n/t.player.getDuration();if(t.player.getDuration()>0&&t.player.getCurrentTime()>=n&&i){clearInterval(t.checkForStartAt),"function"==typeof t.opt.onReady&&t.opt.onReady(t),t.isReady=!0;var r=jQuery.Event("YTPReady");if(r.time=t.currentTime,jQuery(t).trigger(r),t.preventTrigger=!0,t.state=2,jQuery(t).YTPPause(),t.opt.mute||jQuery(t).YTPUnmute(),t.canTrigger=!0,t.opt.autoPlay){var o=jQuery.Event("YTPStart");o.time=t.currentTime,jQuery(t).trigger(o),jQuery(t.playerEl).CSSAnimate({opacity:1},1e3),e.YTPPlay(),t.wrapper.CSSAnimate({opacity:t.isAlone?1:t.opt.opacity},2*t.opt.fadeOnStartTime),"mac"==jQuery.browser.os.name&&jQuery.browser.safari&&jQuery.browser.versionCompare(jQuery.browser.fullVersion,"10.1")<0&&(t.safariPlay=setInterval(function(){1!=t.state?e.YTPPlay():clearInterval(t.safariPlay)},10)),e.one("YTPReady",function(){e.YTPPlay()})}else t.player.pauseVideo(),t.isPlayer||(jQuery(t.playerEl).CSSAnimate({opacity:1},t.opt.fadeOnStartTime),t.wrapper.CSSAnimate({opacity:t.isAlone?1:t.opt.opacity},t.opt.fadeOnStartTime)),t.controlBar.length&&t.controlBar.find(".mb_YTPPlaypause").html(jQuery.mbYTPlayer.controls.play);t.isPlayer&&!t.opt.autoPlay&&t.loading&&t.loading.length&&(t.loading.html("Ready"),setTimeout(function(){t.loading.fadeOut()},100)),t.controlBar&&t.controlBar.length&&t.controlBar.slideDown(1e3)}else"mac"==jQuery.browser.os.name&&jQuery.browser.safari&&jQuery.browser.fullVersion&&jQuery.browser.versionCompare(jQuery.browser.fullVersion,"10.1")<0&&(t.player.playVideo(),n>=0&&t.player.seekTo(n,!0))},10)},setAnchor:function(t){var e=this;e.optimizeDisplay(t)},getAnchor:function(){var t=this.get(0);return t.opt.anchor},formatTime:function(t){var e=Math.floor(t/60),i=Math.floor(t-60*e);return(9>=e?"0"+e:e)+" : "+(9>=i?"0"+i:i)}},jQuery.fn.optimizeDisplay=function(anchor){var YTPlayer=this.get(0),playerBox=jQuery(YTPlayer.playerEl),vid={};YTPlayer.opt.anchor=anchor||YTPlayer.opt.anchor,YTPlayer.opt.anchor="undefined "!=typeof YTPlayer.opt.anchor?YTPlayer.opt.anchor:"center,center";var YTPAlign=YTPlayer.opt.anchor.split(",");if(YTPlayer.opt.optimizeDisplay){var abundance=YTPlayer.isPlayer?0:80,win={},el=YTPlayer.wrapper;win.width=el.outerWidth(),win.height=el.outerHeight()+abundance,YTPlayer.opt.ratio=eval(YTPlayer.opt.ratio),vid.width=win.width,vid.height=Math.ceil(vid.width/YTPlayer.opt.ratio),vid.marginTop=Math.ceil(-((vid.height-win.height)/2)),vid.marginLeft=0;var lowest=vid.height<win.height;lowest&&(vid.height=win.height,vid.width=Math.ceil(vid.height*YTPlayer.opt.ratio),vid.marginTop=0,vid.marginLeft=Math.ceil(-((vid.width-win.width)/2)));for(var a in YTPAlign)if(YTPAlign.hasOwnProperty(a)){var al=YTPAlign[a].replace(/ /g,"");switch(al){case"top":vid.marginTop=lowest?-((vid.height-win.height)/2):0;break;case"bottom":vid.marginTop=lowest?0:-(vid.height-win.height);break;case"left":vid.marginLeft=0;break;case"right":vid.marginLeft=lowest?-(vid.width-win.width):0;break;default:vid.width>win.width&&(vid.marginLeft=-((vid.width-win.width)/2))}}}else vid.width="100%",vid.height="100%",vid.marginTop=0,vid.marginLeft=0;playerBox.css({width:vid.width,height:vid.height,marginTop:vid.marginTop,marginLeft:vid.marginLeft,maxWidth:"initial"})},jQuery.shuffle=function(t){for(var e=t.slice(),i=e.length,n=i;n--;){var r=parseInt(Math.random()*i),o=e[n];e[n]=e[r],e[r]=o}return e},jQuery.fn.unselectable=function(){return this.each(function(){jQuery(this).css({"-moz-user-select":"none","-webkit-user-select":"none","user-select":"none"}).attr("unselectable","on")})},jQuery.fn.YTPlayer=jQuery.mbYTPlayer.buildPlayer,jQuery.fn.YTPGetPlayer=jQuery.mbYTPlayer.getPlayer,jQuery.fn.YTPGetVideoID=jQuery.mbYTPlayer.getVideoID,jQuery.fn.YTPChangeMovie=jQuery.mbYTPlayer.changeMovie,jQuery.fn.YTPPlayerDestroy=jQuery.mbYTPlayer.playerDestroy,jQuery.fn.YTPPlay=jQuery.mbYTPlayer.play,jQuery.fn.YTPTogglePlay=jQuery.mbYTPlayer.togglePlay,jQuery.fn.YTPStop=jQuery.mbYTPlayer.stop,jQuery.fn.YTPPause=jQuery.mbYTPlayer.pause,jQuery.fn.YTPSeekTo=jQuery.mbYTPlayer.seekTo,jQuery.fn.YTPlaylist=jQuery.mbYTPlayer.playlist,jQuery.fn.YTPPlayNext=jQuery.mbYTPlayer.playNext,jQuery.fn.YTPPlayPrev=jQuery.mbYTPlayer.playPrev,jQuery.fn.YTPPlayIndex=jQuery.mbYTPlayer.playIndex,jQuery.fn.YTPMute=jQuery.mbYTPlayer.mute,jQuery.fn.YTPUnmute=jQuery.mbYTPlayer.unmute,jQuery.fn.YTPToggleVolume=jQuery.mbYTPlayer.toggleVolume,jQuery.fn.YTPSetVolume=jQuery.mbYTPlayer.setVolume,jQuery.fn.YTPGetVideoData=jQuery.mbYTPlayer.getVideoData,jQuery.fn.YTPFullscreen=jQuery.mbYTPlayer.fullscreen,jQuery.fn.YTPToggleLoops=jQuery.mbYTPlayer.toggleLoops,jQuery.fn.YTPSetVideoQuality=jQuery.mbYTPlayer.setVideoQuality,jQuery.fn.YTPManageProgress=jQuery.mbYTPlayer.manageProgress,jQuery.fn.YTPApplyFilter=jQuery.mbYTPlayer.applyFilter,jQuery.fn.YTPApplyFilters=jQuery.mbYTPlayer.applyFilters,jQuery.fn.YTPToggleFilter=jQuery.mbYTPlayer.toggleFilter,jQuery.fn.YTPToggleFilters=jQuery.mbYTPlayer.toggleFilters,jQuery.fn.YTPRemoveFilter=jQuery.mbYTPlayer.removeFilter,jQuery.fn.YTPDisableFilters=jQuery.mbYTPlayer.disableFilters,jQuery.fn.YTPEnableFilters=jQuery.mbYTPlayer.enableFilters,jQuery.fn.YTPGetFilters=jQuery.mbYTPlayer.getFilters,jQuery.fn.YTPGetTime=jQuery.mbYTPlayer.getTime,jQuery.fn.YTPGetTotalTime=jQuery.mbYTPlayer.getTotalTime,jQuery.fn.YTPAddMask=jQuery.mbYTPlayer.addMask,jQuery.fn.YTPRemoveMask=jQuery.mbYTPlayer.removeMask,jQuery.fn.YTPToggleMask=jQuery.mbYTPlayer.toggleMask,jQuery.fn.YTPSetAnchor=jQuery.mbYTPlayer.setAnchor,jQuery.fn.YTPGetAnchor=jQuery.mbYTPlayer.getAnchor,jQuery.fn.mb_YTPlayer=jQuery.mbYTPlayer.buildPlayer,jQuery.fn.playNext=jQuery.mbYTPlayer.playNext,jQuery.fn.playPrev=jQuery.mbYTPlayer.playPrev,jQuery.fn.changeMovie=jQuery.mbYTPlayer.changeMovie,jQuery.fn.getVideoID=jQuery.mbYTPlayer.getVideoID,jQuery.fn.getPlayer=jQuery.mbYTPlayer.getPlayer,jQuery.fn.playerDestroy=jQuery.mbYTPlayer.playerDestroy,jQuery.fn.fullscreen=jQuery.mbYTPlayer.fullscreen,jQuery.fn.buildYTPControls=jQuery.mbYTPlayer.buildControls,jQuery.fn.playYTP=jQuery.mbYTPlayer.play,jQuery.fn.toggleLoops=jQuery.mbYTPlayer.toggleLoops,jQuery.fn.stopYTP=jQuery.mbYTPlayer.stop,jQuery.fn.pauseYTP=jQuery.mbYTPlayer.pause,jQuery.fn.seekToYTP=jQuery.mbYTPlayer.seekTo,jQuery.fn.muteYTPVolume=jQuery.mbYTPlayer.mute,jQuery.fn.unmuteYTPVolume=jQuery.mbYTPlayer.unmute,jQuery.fn.setYTPVolume=jQuery.mbYTPlayer.setVolume,jQuery.fn.setVideoQuality=jQuery.mbYTPlayer.setVideoQuality,jQuery.fn.manageYTPProgress=jQuery.mbYTPlayer.manageProgress,jQuery.fn.YTPGetDataFromFeed=jQuery.mbYTPlayer.getVideoData}(jQuery,ytp),jQuery.support.CSStransition=function(){var t=document.body||document.documentElement,e=t.style;return void 0!==e.transition||void 0!==e.WebkitTransition||void 0!==e.MozTransition||void 0!==e.MsTransition||void 0!==e.OTransition}(),jQuery.CSS={name:"mb.CSSAnimate",author:"Matteo Bicocchi",version:"2.0.0",transitionEnd:"transitionEnd",sfx:"",filters:{blur:{min:0,max:100,unit:"px"},brightness:{min:0,max:400,unit:"%"},contrast:{min:0,max:400,unit:"%"},grayscale:{min:0,max:100,unit:"%"},hueRotate:{min:0,max:360,unit:"deg"},invert:{min:0,max:100,unit:"%"},saturate:{min:0,max:400,unit:"%"},sepia:{min:0,max:100,unit:"%"}},normalizeCss:function(t){var e=jQuery.extend(!0,{},t);jQuery.browser.webkit||jQuery.browser.opera?jQuery.CSS.sfx="-webkit-":jQuery.browser.mozilla?jQuery.CSS.sfx="-moz-":jQuery.browser.msie&&(jQuery.CSS.sfx="-ms-");for(var i in e){"transform"===i&&(e[jQuery.CSS.sfx+"transform"]=e[i],delete e[i]),"transform-origin"===i&&(e[jQuery.CSS.sfx+"transform-origin"]=t[i],delete e[i]),"filter"!==i||jQuery.browser.mozilla||(e[jQuery.CSS.sfx+"filter"]=t[i],delete e[i]),"blur"===i&&setFilter(e,"blur",t[i]),"brightness"===i&&setFilter(e,"brightness",t[i]),"contrast"===i&&setFilter(e,"contrast",t[i]),"grayscale"===i&&setFilter(e,"grayscale",t[i]),"hueRotate"===i&&setFilter(e,"hueRotate",t[i]),"invert"===i&&setFilter(e,"invert",t[i]),"saturate"===i&&setFilter(e,"saturate",t[i]),"sepia"===i&&setFilter(e,"sepia",t[i]);var n="";"x"===i&&(n=jQuery.CSS.sfx+"transform",e[n]=e[n]||"",e[n]+=" translateX("+setUnit(t[i],"px")+")",delete e[i]),"y"===i&&(n=jQuery.CSS.sfx+"transform",e[n]=e[n]||"",e[n]+=" translateY("+setUnit(t[i],"px")+")",delete e[i]),"z"===i&&(n=jQuery.CSS.sfx+"transform",e[n]=e[n]||"",e[n]+=" translateZ("+setUnit(t[i],"px")+")",delete e[i]),"rotate"===i&&(n=jQuery.CSS.sfx+"transform",e[n]=e[n]||"",e[n]+=" rotate("+setUnit(t[i],"deg")+")",delete e[i]),"rotateX"===i&&(n=jQuery.CSS.sfx+"transform",e[n]=e[n]||"",e[n]+=" rotateX("+setUnit(t[i],"deg")+")",delete e[i]),"rotateY"===i&&(n=jQuery.CSS.sfx+"transform",e[n]=e[n]||"",e[n]+=" rotateY("+setUnit(t[i],"deg")+")",delete e[i]),"rotateZ"===i&&(n=jQuery.CSS.sfx+"transform",e[n]=e[n]||"",e[n]+=" rotateZ("+setUnit(t[i],"deg")+")",delete e[i]),"scale"===i&&(n=jQuery.CSS.sfx+"transform",e[n]=e[n]||"",e[n]+=" scale("+setUnit(t[i],"")+")",delete e[i]),"scaleX"===i&&(n=jQuery.CSS.sfx+"transform",e[n]=e[n]||"",e[n]+=" scaleX("+setUnit(t[i],"")+")",delete e[i]),"scaleY"===i&&(n=jQuery.CSS.sfx+"transform",e[n]=e[n]||"",e[n]+=" scaleY("+setUnit(t[i],"")+")",delete e[i]),"scaleZ"===i&&(n=jQuery.CSS.sfx+"transform",e[n]=e[n]||"",e[n]+=" scaleZ("+setUnit(t[i],"")+")",delete e[i]),"skew"===i&&(n=jQuery.CSS.sfx+"transform",e[n]=e[n]||"",e[n]+=" skew("+setUnit(t[i],"deg")+")",delete e[i]),"skewX"===i&&(n=jQuery.CSS.sfx+"transform",e[n]=e[n]||"",e[n]+=" skewX("+setUnit(t[i],"deg")+")",delete e[i]),"skewY"===i&&(n=jQuery.CSS.sfx+"transform",e[n]=e[n]||"",e[n]+=" skewY("+setUnit(t[i],"deg")+")",delete e[i]),"perspective"===i&&(n=jQuery.CSS.sfx+"transform",e[n]=e[n]||"",e[n]+=" perspective("+setUnit(t[i],"px")+")",delete e[i])}return e},getProp:function(t){var e=[];for(var i in t)e.indexOf(i)<0&&e.push(uncamel(i));return e.join(",")},animate:function(t,e,i,n,r){return this.each(function(){function o(){s.called=!0,s.CSSAIsRunning=!1,a.off(jQuery.CSS.transitionEnd+"."+s.id),clearTimeout(s.timeout),a.css(jQuery.CSS.sfx+"transition",""),"function"==typeof r&&r.apply(s),"function"==typeof s.CSSqueue&&(s.CSSqueue(),s.CSSqueue=null)}var s=this,a=jQuery(this);s.id=s.id||"CSSA_"+(new Date).getTime();var l=l||{type:"noEvent"};if(s.CSSAIsRunning&&s.eventType==l.type&&!jQuery.browser.msie&&jQuery.browser.version<=9)return void(s.CSSqueue=function(){a.CSSAnimate(t,e,i,n,r)});if(s.CSSqueue=null,s.eventType=l.type,0!==a.length&&t){if(t=jQuery.normalizeCss(t),s.CSSAIsRunning=!0,"function"==typeof e&&(r=e,e=jQuery.fx.speeds._default),"function"==typeof i&&(n=i,i=0),"string"==typeof i&&(r=i,i=0),"function"==typeof n&&(r=n,n="cubic-bezier(0.65,0.03,0.36,0.72)"),"string"==typeof e)for(var u in jQuery.fx.speeds){if(e==u){e=jQuery.fx.speeds[u];break}e=jQuery.fx.speeds._default}if(e||(e=jQuery.fx.speeds._default),"string"==typeof r&&(n=r,r=null),!jQuery.support.CSStransition){for(var c in t){if("transform"===c&&delete t[c],"filter"===c&&delete t[c],"transform-origin"===c&&delete t[c],"auto"===t[c]&&delete t[c],"x"===c){var d=t[c],h="left";t[h]=d,delete t[c]}if("y"===c){var d=t[c],h="top";t[h]=d,delete t[c]}("-ms-transform"===c||"-ms-filter"===c)&&delete t[c]}return void a.delay(i).animate(t,e,r)}var p={"default":"ease","in":"ease-in",out:"ease-out","in-out":"ease-in-out",snap:"cubic-bezier(0,1,.5,1)",easeOutCubic:"cubic-bezier(.215,.61,.355,1)",easeInOutCubic:"cubic-bezier(.645,.045,.355,1)",easeInCirc:"cubic-bezier(.6,.04,.98,.335)",easeOutCirc:"cubic-bezier(.075,.82,.165,1)",easeInOutCirc:"cubic-bezier(.785,.135,.15,.86)",easeInExpo:"cubic-bezier(.95,.05,.795,.035)",easeOutExpo:"cubic-bezier(.19,1,.22,1)",easeInOutExpo:"cubic-bezier(1,0,0,1)",easeInQuad:"cubic-bezier(.55,.085,.68,.53)",easeOutQuad:"cubic-bezier(.25,.46,.45,.94)",easeInOutQuad:"cubic-bezier(.455,.03,.515,.955)",easeInQuart:"cubic-bezier(.895,.03,.685,.22)",easeOutQuart:"cubic-bezier(.165,.84,.44,1)",easeInOutQuart:"cubic-bezier(.77,0,.175,1)",easeInQuint:"cubic-bezier(.755,.05,.855,.06)",easeOutQuint:"cubic-bezier(.23,1,.32,1)",easeInOutQuint:"cubic-bezier(.86,0,.07,1)",easeInSine:"cubic-bezier(.47,0,.745,.715)",easeOutSine:"cubic-bezier(.39,.575,.565,1)",easeInOutSine:"cubic-bezier(.445,.05,.55,.95)",easeInBack:"cubic-bezier(.6,-.28,.735,.045)",easeOutBack:"cubic-bezier(.175, .885,.32,1.275)",easeInOutBack:"cubic-bezier(.68,-.55,.265,1.55)"};p[n]&&(n=p[n]),a.off(jQuery.CSS.transitionEnd+"."+s.id);var f=jQuery.CSS.getProp(t),m={};jQuery.extend(m,t),m[jQuery.CSS.sfx+"transition-property"]=f,m[jQuery.CSS.sfx+"transition-duration"]=e+"ms",m[jQuery.CSS.sfx+"transition-delay"]=i+"ms",m[jQuery.CSS.sfx+"transition-timing-function"]=n,setTimeout(function(){a.one(jQuery.CSS.transitionEnd+"."+s.id,o),a.css(m)},1),s.timeout=setTimeout(function(){return s.called||!r?(s.called=!1,void(s.CSSAIsRunning=!1)):(a.css(jQuery.CSS.sfx+"transition",""),r.apply(s),s.CSSAIsRunning=!1,void("function"==typeof s.CSSqueue&&(s.CSSqueue(),s.CSSqueue=null)))},e+i+10)}})}},jQuery.fn.CSSAnimate=jQuery.CSS.animate,jQuery.normalizeCss=jQuery.CSS.normalizeCss,jQuery.fn.css3=function(t){return this.each(function(){var e=jQuery(this),i=jQuery.normalizeCss(t);e.css(i)})};var nAgt=navigator.userAgent;if(!jQuery.browser){var isTouchSupported=function(){var t=nAgt.msMaxTouchPoints,e="ontouchstart"in document.createElement("div");return!(!t&&!e)};jQuery.browser={},jQuery.browser.mozilla=!1,jQuery.browser.webkit=!1,jQuery.browser.opera=!1,jQuery.browser.safari=!1,jQuery.browser.chrome=!1,jQuery.browser.androidStock=!1,jQuery.browser.msie=!1,jQuery.browser.edge=!1;var getOS=function(){var t={version:"Unknown version",name:"Unknown OS"};return-1!=navigator.appVersion.indexOf("Win")&&(t.name="Windows"),-1==navigator.appVersion.indexOf("Mac")||navigator.appVersion.indexOf("Mobile")||(t.name="Mac"),-1!=navigator.appVersion.indexOf("Linux")&&(t.name="Linux"),t.name=t.name.toLowerCase(),"mac"==t.name&&(t.version=/Mac OS X (10[\.\_\d]+)/.exec(nAgt)[1],t.version=t.version.replace(/_/g,".").substring(0,5)),"windows"==t.name&&(t.version="Unknown.Unknown"),/Windows NT 5.1/.test(nAgt)&&(t.version="5.1"),/Windows NT 6.0/.test(nAgt)&&(t.version="6.0"),/Windows NT 6.1/.test(nAgt)&&(t.version="6.1"),/Windows NT 6.2/.test(nAgt)&&(t.version="6.2"),/Windows NT 10.0/.test(nAgt)&&(t.version="10.0"),/Linux/.test(nAgt)&&/Linux/.test(nAgt)&&(t.version="Unknown.Unknown"),t.major_version="Unknown",t.minor_version="Unknown","Unknown.Unknown"!=t.version&&(t.major_version=parseFloat(t.version.split(".")[0]),t.minor_version=parseFloat(t.version.split(".")[1])),t};jQuery.browser.ua=nAgt,jQuery.browser.os=getOS(),jQuery.browser.hasTouch=isTouchSupported(),jQuery.browser.name=navigator.appName,jQuery.browser.fullVersion=""+parseFloat(navigator.appVersion),jQuery.browser.majorVersion=parseInt(navigator.appVersion,10);var nameOffset,verOffset,ix;if(-1!=(verOffset=nAgt.indexOf("Opera")))jQuery.browser.opera=!0,jQuery.browser.name="Opera",jQuery.browser.fullVersion=nAgt.substring(verOffset+6),-1!=(verOffset=nAgt.indexOf("Version"))&&(jQuery.browser.fullVersion=nAgt.substring(verOffset+8));else if(-1!=(verOffset=nAgt.indexOf("OPR")))jQuery.browser.opera=!0,jQuery.browser.name="Opera",jQuery.browser.fullVersion=nAgt.substring(verOffset+4);else if(-1!=(verOffset=nAgt.indexOf("MSIE")))jQuery.browser.msie=!0,jQuery.browser.name="Microsoft Internet Explorer",jQuery.browser.fullVersion=nAgt.substring(verOffset+5);else if(-1!=nAgt.indexOf("Trident")){jQuery.browser.msie=!0,jQuery.browser.name="Microsoft Internet Explorer";var start=nAgt.indexOf("rv:")+3,end=start+4;jQuery.browser.fullVersion=nAgt.substring(start,end)}else-1!=(verOffset=nAgt.indexOf("Edge"))?(jQuery.browser.edge=!0,jQuery.browser.name="Microsoft Edge",jQuery.browser.fullVersion=nAgt.substring(verOffset+5)):-1!=(verOffset=nAgt.indexOf("Chrome"))?(jQuery.browser.webkit=!0,jQuery.browser.chrome=!0,jQuery.browser.name="Chrome",jQuery.browser.fullVersion=nAgt.substring(verOffset+7)):-1<nAgt.indexOf("mozilla/5.0")&&-1<nAgt.indexOf("android ")&&-1<nAgt.indexOf("applewebkit")&&!(-1<nAgt.indexOf("chrome"))?(verOffset=nAgt.indexOf("Chrome"),jQuery.browser.webkit=!0,jQuery.browser.androidStock=!0,jQuery.browser.name="androidStock",jQuery.browser.fullVersion=nAgt.substring(verOffset+7)):-1!=(verOffset=nAgt.indexOf("Safari"))?(jQuery.browser.webkit=!0,jQuery.browser.safari=!0,jQuery.browser.name="Safari",jQuery.browser.fullVersion=nAgt.substring(verOffset+7),-1!=(verOffset=nAgt.indexOf("Version"))&&(jQuery.browser.fullVersion=nAgt.substring(verOffset+8))):-1!=(verOffset=nAgt.indexOf("AppleWebkit"))?(jQuery.browser.webkit=!0,jQuery.browser.safari=!0,jQuery.browser.name="Safari",jQuery.browser.fullVersion=nAgt.substring(verOffset+7),-1!=(verOffset=nAgt.indexOf("Version"))&&(jQuery.browser.fullVersion=nAgt.substring(verOffset+8))):-1!=(verOffset=nAgt.indexOf("Firefox"))?(jQuery.browser.mozilla=!0,jQuery.browser.name="Firefox",jQuery.browser.fullVersion=nAgt.substring(verOffset+8)):(nameOffset=nAgt.lastIndexOf(" ")+1)<(verOffset=nAgt.lastIndexOf("/"))&&(jQuery.browser.name=nAgt.substring(nameOffset,verOffset),jQuery.browser.fullVersion=nAgt.substring(verOffset+1),jQuery.browser.name.toLowerCase()==jQuery.browser.name.toUpperCase()&&(jQuery.browser.name=navigator.appName));-1!=(ix=jQuery.browser.fullVersion.indexOf(";"))&&(jQuery.browser.fullVersion=jQuery.browser.fullVersion.substring(0,ix)),-1!=(ix=jQuery.browser.fullVersion.indexOf(" "))&&(jQuery.browser.fullVersion=jQuery.browser.fullVersion.substring(0,ix)),jQuery.browser.majorVersion=parseInt(""+jQuery.browser.fullVersion,10),isNaN(jQuery.browser.majorVersion)&&(jQuery.browser.fullVersion=""+parseFloat(navigator.appVersion),jQuery.browser.majorVersion=parseInt(navigator.appVersion,10)),jQuery.browser.version=jQuery.browser.majorVersion,jQuery.browser.android=/Android/i.test(nAgt),jQuery.browser.blackberry=/BlackBerry|BB|PlayBook/i.test(nAgt),jQuery.browser.ios=/iPhone|iPad|iPod|webOS/i.test(nAgt),jQuery.browser.operaMobile=/Opera Mini/i.test(nAgt),jQuery.browser.windowsMobile=/IEMobile|Windows Phone/i.test(nAgt),jQuery.browser.kindle=/Kindle|Silk/i.test(nAgt),jQuery.browser.mobile=jQuery.browser.android||jQuery.browser.blackberry||jQuery.browser.ios||jQuery.browser.windowsMobile||jQuery.browser.operaMobile||jQuery.browser.kindle,jQuery.isMobile=jQuery.browser.mobile,jQuery.isTablet=jQuery.browser.mobile&&765<jQuery(window).width(),jQuery.isAndroidDefault=jQuery.browser.android&&!/chrome/i.test(nAgt)}jQuery.browser.versionCompare=function(t,e){if("stringstring"!=typeof t+typeof e)return!1;for(var i=t.split("."),n=e.split("."),r=0,o=Math.max(i.length,n.length);o>r;r++){if(i[r]&&!n[r]&&0<parseInt(i[r])||parseInt(i[r])>parseInt(n[r]))return 1;if(n[r]&&!i[r]&&0<parseInt(n[r])||parseInt(i[r])<parseInt(n[r]))return-1}return 0},function(t){t.simpleSlider={defaults:{initialval:0,scale:100,orientation:"h",readonly:!1,callback:!1},events:{start:t.browser.mobile?"touchstart":"mousedown",end:t.browser.mobile?"touchend":"mouseup",move:t.browser.mobile?"touchmove":"mousemove"},init:function(e){return this.each(function(){var i=this,n=t(i);n.addClass("simpleSlider"),i.opt={},t.extend(i.opt,t.simpleSlider.defaults,e),t.extend(i.opt,n.data());var r="h"==i.opt.orientation?"horizontal":"vertical",r=t("<div/>").addClass("level").addClass(r);n.prepend(r),i.level=r,n.css({cursor:"default"}),"auto"==i.opt.scale&&(i.opt.scale=t(i).outerWidth()),n.updateSliderVal(),i.opt.readonly||(n.on(t.simpleSlider.events.start,function(e){t.browser.mobile&&(e=e.changedTouches[0]),i.canSlide=!0,n.updateSliderVal(e),"h"==i.opt.orientation?n.css({cursor:"col-resize"}):n.css({cursor:"row-resize"}),e.preventDefault(),e.stopPropagation()}),t(document).on(t.simpleSlider.events.move,function(e){t.browser.mobile&&(e=e.changedTouches[0]),i.canSlide&&(t(document).css({cursor:"default"}),n.updateSliderVal(e),e.preventDefault(),e.stopPropagation())}).on(t.simpleSlider.events.end,function(){t(document).css({cursor:"auto"}),i.canSlide=!1,n.css({cursor:"auto"})}))})},updateSliderVal:function(e){var i=this.get(0);if(i.opt){i.opt.initialval="number"==typeof i.opt.initialval?i.opt.initialval:i.opt.initialval(i);var n=t(i).outerWidth(),r=t(i).outerHeight();i.x="object"==typeof e?e.clientX+document.body.scrollLeft-this.offset().left:"number"==typeof e?e*n/i.opt.scale:i.opt.initialval*n/i.opt.scale,i.y="object"==typeof e?e.clientY+document.body.scrollTop-this.offset().top:"number"==typeof e?(i.opt.scale-i.opt.initialval-e)*r/i.opt.scale:i.opt.initialval*r/i.opt.scale,i.y=this.outerHeight()-i.y,i.scaleX=i.x*i.opt.scale/n,i.scaleY=i.y*i.opt.scale/r,i.outOfRangeX=i.scaleX>i.opt.scale?i.scaleX-i.opt.scale:0>i.scaleX?i.scaleX:0,i.outOfRangeY=i.scaleY>i.opt.scale?i.scaleY-i.opt.scale:0>i.scaleY?i.scaleY:0,i.outOfRange="h"==i.opt.orientation?i.outOfRangeX:i.outOfRangeY,i.value="undefined"!=typeof e?"h"==i.opt.orientation?i.x>=this.outerWidth()?i.opt.scale:0>=i.x?0:i.scaleX:i.y>=this.outerHeight()?i.opt.scale:0>=i.y?0:i.scaleY:"h"==i.opt.orientation?i.scaleX:i.scaleY,"h"==i.opt.orientation?i.level.width(Math.floor(100*i.x/n)+"%"):i.level.height(Math.floor(100*i.y/r)),"function"==typeof i.opt.callback&&i.opt.callback(i)}}},t.fn.simpleSlider=t.simpleSlider.init,t.fn.updateSliderVal=t.simpleSlider.updateSliderVal}(jQuery),function(t){t.mbCookie={set:function(t,e,i,n){"object"==typeof e&&(e=JSON.stringify(e)),i||(i=7),n=n?"; domain="+n:"";var r=new Date;r.setTime(r.getTime()+864e5*i),i="; expires="+r.toGMTString(),document.cookie=t+"="+e+i+"; path=/"+n},get:function(t){t+="=";for(var e=document.cookie.split(";"),i=0;i<e.length;i++){for(var n=e[i];" "==n.charAt(0);)n=n.substring(1,n.length);if(0==n.indexOf(t))try{return JSON.parse(n.substring(t.length,n.length))}catch(r){return n.substring(t.length,n.length)}}return null},remove:function(e){t.mbCookie.set(e,"",-1)}},t.mbStorage={set:function(t,e){"object"==typeof e&&(e=JSON.stringify(e)),localStorage.setItem(t,e)},get:function(t){if(!localStorage[t])return null;try{return JSON.parse(localStorage[t])}catch(e){return localStorage[t]}},remove:function(t){t?localStorage.removeItem(t):localStorage.clear()}}}(jQuery),!function(t,e){"function"==typeof define&&define.amd?define(["jquery"],e):e(t.jQuery)}(this,function(t){"use strict";function e(e,r){this.element=e,this.$element=t(this.element),this.options=t.extend({},n,r),this._defaults=n,this._name=i,this.init()}var i="scrolly",n={bgParallax:!1};e.prototype.init=function(){var e=this;this.startPosition=this.$element.position().top,this.offsetTop=this.$element.offset().top,this.height=this.$element.outerHeight(!0),this.velocity=this.$element.attr("data-velocity"),this.bgStart=parseInt(this.$element.attr("data-fit"),10),t(document).scroll(function(){e.didScroll=!0}),setInterval(function(){e.didScroll&&(e.didScroll=!1,e.scrolly())},10)},e.prototype.scrolly=function(){var e=t(window).scrollTop(),i=t(window).height(),n=this.startPosition;this.offsetTop>=e+i?this.$element.addClass("scrolly-invisible"):n=this.$element.hasClass("scrolly-invisible")?this.startPosition+(e+(i-this.offsetTop))*this.velocity:this.startPosition+e*this.velocity,this.bgStart&&(n+=this.bgStart),this.options.bgParallax===!0?this.$element.css({backgroundPositionY:n+"px"}):this.$element.css({top:n})},t.fn[i]=function(n){return this.each(function(){t.data(this,"plugin_"+i)||t.data(this,"plugin_"+i,new e(this,n))})}}),!function(t){t.fn.gMap=function(e,i){switch(e){case"addMarker":return t(this).trigger("gMap.addMarker",[i.latitude,i.longitude,i.content,i.icon,i.popup]);case"centerAt":return t(this).trigger("gMap.centerAt",[i.latitude,i.longitude,i.zoom]);case"clearMarkers":return t(this).trigger("gMap.clearMarkers")}var n=t.extend({},t.fn.gMap.defaults,e);return this.each(function(){var e=new google.maps.Map(this);t(this).data("gMap.reference",e);var i=new google.maps.Geocoder;n.address?i.geocode({address:n.address},function(t){t&&t.length&&e.setCenter(t[0].geometry.location)}):n.latitude&&n.longitude?e.setCenter(new google.maps.LatLng(n.latitude,n.longitude)):t.isArray(n.markers)&&n.markers.length>0?n.markers[0].address?i.geocode({address:n.markers[0].address},function(t){t&&t.length>0&&e.setCenter(t[0].geometry.location)}):e.setCenter(new google.maps.LatLng(n.markers[0].latitude,n.markers[0].longitude)):e.setCenter(new google.maps.LatLng(34.885931,9.84375)),e.setZoom(n.zoom),e.setMapTypeId(google.maps.MapTypeId[n.maptype]);var r={scrollwheel:n.scrollwheel,disableDoubleClickZoom:!n.doubleclickzoom};n.controls===!1?t.extend(r,{disableDefaultUI:!0}):0!==n.controls.length&&t.extend(r,n.controls,{disableDefaultUI:!0}),e.setOptions(r),e.setOptions({styles:n.styles});var o,s,a=new google.maps.Marker;o=new google.maps.MarkerImage(n.icon.image),o.size=new google.maps.Size(n.icon.iconsize[0],n.icon.iconsize[1]),o.anchor=new google.maps.Point(n.icon.iconanchor[0],n.icon.iconanchor[1]),a.setIcon(o),n.icon.shadow&&(s=new google.maps.MarkerImage(n.icon.shadow),s.size=new google.maps.Size(n.icon.shadowsize[0],n.icon.shadowsize[1]),s.anchor=new google.maps.Point(n.icon.shadowanchor[0],n.icon.shadowanchor[1]),a.setShadow(s)),t(this).bind("gMap.centerAt",function(t,i,n,r){r&&e.setZoom(r),e.panTo(new google.maps.LatLng(parseFloat(i),parseFloat(n)))});var l=[];t(this).bind("gMap.clearMarkers",function(){for(;l[0];)l.pop().setMap(null)});var u;t(this).bind("gMap.addMarker",function(t,i,r,o,s,c){var d,h,p=new google.maps.LatLng(parseFloat(i),parseFloat(r)),f=new google.maps.Marker({position:p});if(s?(d=new google.maps.MarkerImage(s.image),d.size=new google.maps.Size(s.iconsize[0],s.iconsize[1]),d.anchor=new google.maps.Point(s.iconanchor[0],s.iconanchor[1]),f.setIcon(d),s.shadow&&(h=new google.maps.MarkerImage(s.shadow),h.size=new google.maps.Size(s.shadowsize[0],s.shadowsize[1]),h.anchor=new google.maps.Point(s.shadowanchor[0],s.shadowanchor[1]),a.setShadow(h))):(f.setIcon(a.getIcon()),f.setShadow(a.getShadow())),o){"_latlng"===o&&(o=i+", "+r);var m=new google.maps.InfoWindow({content:n.html_prepend+o+n.html_append});google.maps.event.addListener(f,"click",function(){u&&u.close(),m.open(e,f),u=m}),c&&google.maps.event.addListenerOnce(e,"tilesloaded",function(){m.open(e,f)})}f.setMap(e),l.push(f)});for(var c,d=this,h=function(e){return function(i){i&&i.length>0&&t(d).trigger("gMap.addMarker",[i[0].geometry.location.lat(),i[0].geometry.location.lng(),e.html,e.icon,e.popup])}},p=0;p<n.markers.length;p++)c=n.markers[p],c.address?("_address"===c.html&&(c.html=c.address),i.geocode({address:c.address},h(c))):t(this).trigger("gMap.addMarker",[c.latitude,c.longitude,c.html,c.icon,c.popup])})},t.fn.gMap.defaults={address:"",latitude:0,longitude:0,zoom:1,markers:[],controls:[],styles:[],scrollwheel:!1,doubleclickzoom:!0,maptype:"ROADMAP",html_prepend:'<div class="gmap_marker">',html_append:"</div>",icon:{image:"http://www.google.com/mapfiles/marker.png",shadow:"http://www.google.com/mapfiles/shadow50.png",iconsize:[20,34],shadowsize:[37,34],iconanchor:[9,34],shadowanchor:[6,34]}}}(jQuery),!function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t("object"==typeof exports?require("jquery"):window.jQuery||window.Zepto)}(function(t){var e,i,n,r,o,s,a="Close",l="BeforeClose",u="AfterClose",c="BeforeAppend",d="MarkupParse",h="Open",p="Change",f="mfp",m="."+f,g="mfp-ready",y="mfp-removing",v="mfp-prevent-close",b=function(){},T=!!window.jQuery,w=t(window),P=function(t,i){e.ev.on(f+t+m,i)},x=function(e,i,n,r){var o=document.createElement("div");return o.className="mfp-"+e,n&&(o.innerHTML=n),r?i&&i.appendChild(o):(o=t(o),i&&o.appendTo(i)),o},_=function(i,n){e.ev.triggerHandler(f+i,n),e.st.callbacks&&(i=i.charAt(0).toLowerCase()+i.slice(1),e.st.callbacks[i]&&e.st.callbacks[i].apply(e,t.isArray(n)?n:[n]))},C=function(i){return i===s&&e.currTemplate.closeBtn||(e.currTemplate.closeBtn=t(e.st.closeMarkup.replace("%title%",e.st.tClose)),s=i),e.currTemplate.closeBtn},S=function(){t.magnificPopup.instance||(e=new b,e.init(),t.magnificPopup.instance=e)},j=function(){var t=document.createElement("p").style,e=["ms","O","Moz","Webkit"];if(void 0!==t.transition)return!0;for(;e.length;)if(e.pop()+"Transition"in t)return!0;return!1};b.prototype={constructor:b,init:function(){var i=navigator.appVersion;e.isLowIE=e.isIE8=document.all&&!document.addEventListener,e.isAndroid=/android/gi.test(i),e.isIOS=/iphone|ipad|ipod/gi.test(i),e.supportsTransition=j(),e.probablyMobile=e.isAndroid||e.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),n=t(document),e.popupsCache={}},open:function(i){var r;if(i.isObj===!1){e.items=i.items.toArray(),e.index=0;var s,a=i.items;for(r=0;r<a.length;r++)if(s=a[r],s.parsed&&(s=s.el[0]),s===i.el[0]){e.index=r;break}}else e.items=t.isArray(i.items)?i.items:[i.items],e.index=i.index||0;if(e.isOpen)return void e.updateItemHTML();e.types=[],o="",i.mainEl&&i.mainEl.length?e.ev=i.mainEl.eq(0):e.ev=n,i.key?(e.popupsCache[i.key]||(e.popupsCache[i.key]={}),e.currTemplate=e.popupsCache[i.key]):e.currTemplate={},e.st=t.extend(!0,{},t.magnificPopup.defaults,i),e.fixedContentPos="auto"===e.st.fixedContentPos?!e.probablyMobile:e.st.fixedContentPos,e.st.modal&&(e.st.closeOnContentClick=!1,e.st.closeOnBgClick=!1,e.st.showCloseBtn=!1,e.st.enableEscapeKey=!1),e.bgOverlay||(e.bgOverlay=x("bg").on("click"+m,function(){e.close()}),e.wrap=x("wrap").attr("tabindex",-1).on("click"+m,function(t){e._checkIfClose(t.target)&&e.close()}),e.container=x("container",e.wrap)),e.contentContainer=x("content"),e.st.preloader&&(e.preloader=x("preloader",e.container,e.st.tLoading));var l=t.magnificPopup.modules;for(r=0;r<l.length;r++){var u=l[r];u=u.charAt(0).toUpperCase()+u.slice(1),e["init"+u].call(e)}_("BeforeOpen"),e.st.showCloseBtn&&(e.st.closeBtnInside?(P(d,function(t,e,i,n){i.close_replaceWith=C(n.type)}),o+=" mfp-close-btn-in"):e.wrap.append(C())),e.st.alignTop&&(o+=" mfp-align-top"),e.fixedContentPos?e.wrap.css({overflow:e.st.overflowY,overflowX:"hidden",overflowY:e.st.overflowY}):e.wrap.css({top:w.scrollTop(),position:"absolute"}),(e.st.fixedBgPos===!1||"auto"===e.st.fixedBgPos&&!e.fixedContentPos)&&e.bgOverlay.css({height:n.height(),position:"absolute"}),e.st.enableEscapeKey&&n.on("keyup"+m,function(t){27===t.keyCode&&e.close()}),w.on("resize"+m,function(){e.updateSize()}),e.st.closeOnContentClick||(o+=" mfp-auto-cursor"),o&&e.wrap.addClass(o);var c=e.wH=w.height(),p={};if(e.fixedContentPos&&e._hasScrollBar(c)){var f=e._getScrollbarSize();f&&(p.marginRight=f)}e.fixedContentPos&&(e.isIE7?t("body, html").css("overflow","hidden"):p.overflow="hidden");var y=e.st.mainClass;return e.isIE7&&(y+=" mfp-ie7"),y&&e._addClassToMFP(y),e.updateItemHTML(),_("BuildControls"),t("html").css(p),e.bgOverlay.add(e.wrap).prependTo(e.st.prependTo||t(document.body)),e._lastFocusedEl=document.activeElement,setTimeout(function(){e.content?(e._addClassToMFP(g),e._setFocus()):e.bgOverlay.addClass(g),n.on("focusin"+m,e._onFocusIn)},16),e.isOpen=!0,e.updateSize(c),_(h),i},close:function(){e.isOpen&&(_(l),e.isOpen=!1,e.st.removalDelay&&!e.isLowIE&&e.supportsTransition?(e._addClassToMFP(y),setTimeout(function(){e._close()},e.st.removalDelay)):e._close())},_close:function(){_(a);var i=y+" "+g+" ";if(e.bgOverlay.detach(),e.wrap.detach(),e.container.empty(),e.st.mainClass&&(i+=e.st.mainClass+" "),e._removeClassFromMFP(i),e.fixedContentPos){var r={marginRight:""};e.isIE7?t("body, html").css("overflow",""):r.overflow="",t("html").css(r)}n.off("keyup"+m+" focusin"+m),e.ev.off(m),e.wrap.attr("class","mfp-wrap").removeAttr("style"),e.bgOverlay.attr("class","mfp-bg"),e.container.attr("class","mfp-container"),!e.st.showCloseBtn||e.st.closeBtnInside&&e.currTemplate[e.currItem.type]!==!0||e.currTemplate.closeBtn&&e.currTemplate.closeBtn.detach(),e.st.autoFocusLast&&e._lastFocusedEl&&t(e._lastFocusedEl).focus(),e.currItem=null,e.content=null,e.currTemplate=null,e.prevHeight=0,_(u)},updateSize:function(t){if(e.isIOS){var i=document.documentElement.clientWidth/window.innerWidth,n=window.innerHeight*i;e.wrap.css("height",n),e.wH=n}else e.wH=t||w.height();e.fixedContentPos||e.wrap.css("height",e.wH),_("Resize")},updateItemHTML:function(){var i=e.items[e.index];e.contentContainer.detach(),e.content&&e.content.detach(),i.parsed||(i=e.parseEl(e.index));var n=i.type;if(_("BeforeChange",[e.currItem?e.currItem.type:"",n]),e.currItem=i,!e.currTemplate[n]){var o=e.st[n]?e.st[n].markup:!1;_("FirstMarkupParse",o),o?e.currTemplate[n]=t(o):e.currTemplate[n]=!0}r&&r!==i.type&&e.container.removeClass("mfp-"+r+"-holder");var s=e["get"+n.charAt(0).toUpperCase()+n.slice(1)](i,e.currTemplate[n]);e.appendContent(s,n),i.preloaded=!0,_(p,i),r=i.type,e.container.prepend(e.contentContainer),_("AfterChange")},appendContent:function(t,i){e.content=t,t?e.st.showCloseBtn&&e.st.closeBtnInside&&e.currTemplate[i]===!0?e.content.find(".mfp-close").length||e.content.append(C()):e.content=t:e.content="",_(c),e.container.addClass("mfp-"+i+"-holder"),e.contentContainer.append(e.content)},parseEl:function(i){var n,r=e.items[i];if(r.tagName?r={el:t(r)}:(n=r.type,r={data:r,src:r.src}),r.el){for(var o=e.types,s=0;s<o.length;s++)if(r.el.hasClass("mfp-"+o[s])){n=o[s];break}r.src=r.el.attr("data-mfp-src"),r.src||(r.src=r.el.attr("href"))}return r.type=n||e.st.type||"inline",r.index=i,r.parsed=!0,e.items[i]=r,_("ElementParse",r),e.items[i]},addGroup:function(t,i){var n=function(n){n.mfpEl=this,e._openClick(n,t,i)};i||(i={});var r="click.magnificPopup";i.mainEl=t,i.items?(i.isObj=!0,t.off(r).on(r,n)):(i.isObj=!1,i.delegate?t.off(r).on(r,i.delegate,n):(i.items=t,t.off(r).on(r,n)))},_openClick:function(i,n,r){var o=void 0!==r.midClick?r.midClick:t.magnificPopup.defaults.midClick;if(o||!(2===i.which||i.ctrlKey||i.metaKey||i.altKey||i.shiftKey)){var s=void 0!==r.disableOn?r.disableOn:t.magnificPopup.defaults.disableOn;if(s)if(t.isFunction(s)){if(!s.call(e))return!0}else if(w.width()<s)return!0;i.type&&(i.preventDefault(),e.isOpen&&i.stopPropagation()),r.el=t(i.mfpEl),r.delegate&&(r.items=n.find(r.delegate)),e.open(r)}},updateStatus:function(t,n){if(e.preloader){i!==t&&e.container.removeClass("mfp-s-"+i),n||"loading"!==t||(n=e.st.tLoading);var r={status:t,text:n};_("UpdateStatus",r),t=r.status,n=r.text,e.preloader.html(n),e.preloader.find("a").on("click",function(t){t.stopImmediatePropagation()}),e.container.addClass("mfp-s-"+t),i=t}},_checkIfClose:function(i){if(!t(i).hasClass(v)){var n=e.st.closeOnContentClick,r=e.st.closeOnBgClick;if(n&&r)return!0;if(!e.content||t(i).hasClass("mfp-close")||e.preloader&&i===e.preloader[0])return!0;if(i===e.content[0]||t.contains(e.content[0],i)){if(n)return!0}else if(r&&t.contains(document,i))return!0;return!1}},_addClassToMFP:function(t){e.bgOverlay.addClass(t),e.wrap.addClass(t)},_removeClassFromMFP:function(t){this.bgOverlay.removeClass(t),e.wrap.removeClass(t)},_hasScrollBar:function(t){return(e.isIE7?n.height():document.body.scrollHeight)>(t||w.height())},_setFocus:function(){(e.st.focus?e.content.find(e.st.focus).eq(0):e.wrap).focus()},_onFocusIn:function(i){return i.target===e.wrap[0]||t.contains(e.wrap[0],i.target)?void 0:(e._setFocus(),!1)},_parseMarkup:function(e,i,n){var r;n.data&&(i=t.extend(n.data,i)),_(d,[e,i,n]),t.each(i,function(i,n){if(void 0===n||n===!1)return!0;if(r=i.split("_"),r.length>1){var o=e.find(m+"-"+r[0]);if(o.length>0){var s=r[1];"replaceWith"===s?o[0]!==n[0]&&o.replaceWith(n):"img"===s?o.is("img")?o.attr("src",n):o.replaceWith(t("<img>").attr("src",n).attr("class",o.attr("class"))):o.attr(r[1],n)}}else e.find(m+"-"+i).html(n)})},_getScrollbarSize:function(){if(void 0===e.scrollbarSize){var t=document.createElement("div");t.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(t),e.scrollbarSize=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return e.scrollbarSize}},t.magnificPopup={instance:null,proto:b.prototype,modules:[],open:function(e,i){return S(),e=e?t.extend(!0,{},e):{},e.isObj=!0,e.index=i||0,this.instance.open(e)},close:function(){return t.magnificPopup.instance&&t.magnificPopup.instance.close()},registerModule:function(e,i){i.options&&(t.magnificPopup.defaults[e]=i.options),t.extend(this.proto,i.proto),this.modules.push(e)},defaults:{disableOn:0,key:null,midClick:!1,mainClass:"",preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!0,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:0,prependTo:null,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'<button title="%title%" type="button" class="mfp-close">&#215;</button>',tClose:"Close (Esc)",tLoading:"Loading...",autoFocusLast:!0}},t.fn.magnificPopup=function(i){S();var n=t(this);if("string"==typeof i)if("open"===i){var r,o=T?n.data("magnificPopup"):n[0].magnificPopup,s=parseInt(arguments[1],10)||0;o.items?r=o.items[s]:(r=n,o.delegate&&(r=r.find(o.delegate)),r=r.eq(s)),e._openClick({mfpEl:r},n,o)}else e.isOpen&&e[i].apply(e,Array.prototype.slice.call(arguments,1));else i=t.extend(!0,{},i),T?n.data("magnificPopup",i):n[0].magnificPopup=i,e.addGroup(n,i);return n};var Y,k,I,Q="inline",E=function(){I&&(k.after(I.addClass(Y)).detach(),I=null)};t.magnificPopup.registerModule(Q,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){e.types.push(Q),P(a+"."+Q,function(){E()})},getInline:function(i,n){if(E(),i.src){var r=e.st.inline,o=t(i.src);if(o.length){var s=o[0].parentNode;s&&s.tagName&&(k||(Y=r.hiddenClass,k=x(Y),Y="mfp-"+Y),I=o.after(k).detach().removeClass(Y)),e.updateStatus("ready")}else e.updateStatus("error",r.tNotFound),o=t("<div>");return i.inlineElement=o,o}return e.updateStatus("ready"),e._parseMarkup(n,{},i),n}}});var $,A="ajax",D=function(){$&&t(document.body).removeClass($)},z=function(){D(),e.req&&e.req.abort()};t.magnificPopup.registerModule(A,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'<a href="%url%">The content</a> could not be loaded.'},proto:{initAjax:function(){e.types.push(A),$=e.st.ajax.cursor,P(a+"."+A,z),P("BeforeChange."+A,z)},getAjax:function(i){$&&t(document.body).addClass($),e.updateStatus("loading");var n=t.extend({url:i.src,success:function(n,r,o){var s={data:n,xhr:o};_("ParseAjax",s),e.appendContent(t(s.data),A),i.finished=!0,D(),e._setFocus(),setTimeout(function(){e.wrap.addClass(g)},16),e.updateStatus("ready"),_("AjaxContentAdded")},error:function(){D(),i.finished=i.loadError=!0,e.updateStatus("error",e.st.ajax.tError.replace("%url%",i.src))}},e.st.ajax.settings);return e.req=t.ajax(n),""}}});var O,M=function(i){if(i.data&&void 0!==i.data.title)return i.data.title;var n=e.st.image.titleSrc;if(n){if(t.isFunction(n))return n.call(e,i);if(i.el)return i.el.attr(n)||""}return""};t.magnificPopup.registerModule("image",{options:{markup:'<div class="mfp-figure"><div class="mfp-close"></div><figure><div class="mfp-img"></div><figcaption><div class="mfp-bottom-bar"><div class="mfp-title"></div><div class="mfp-counter"></div></div></figcaption></figure></div>',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'<a href="%url%">The image</a> could not be loaded.'},proto:{initImage:function(){var i=e.st.image,n=".image";e.types.push("image"),P(h+n,function(){"image"===e.currItem.type&&i.cursor&&t(document.body).addClass(i.cursor)}),P(a+n,function(){i.cursor&&t(document.body).removeClass(i.cursor),w.off("resize"+m)}),P("Resize"+n,e.resizeImage),e.isLowIE&&P("AfterChange",e.resizeImage)},resizeImage:function(){var t=e.currItem;if(t&&t.img&&e.st.image.verticalFit){var i=0;e.isLowIE&&(i=parseInt(t.img.css("padding-top"),10)+parseInt(t.img.css("padding-bottom"),10)),t.img.css("max-height",e.wH-i)}},_onImageHasSize:function(t){t.img&&(t.hasSize=!0,O&&clearInterval(O),t.isCheckingImgSize=!1,_("ImageHasSize",t),t.imgHidden&&(e.content&&e.content.removeClass("mfp-loading"),t.imgHidden=!1))},findImageSize:function(t){var i=0,n=t.img[0],r=function(o){O&&clearInterval(O),O=setInterval(function(){return n.naturalWidth>0?void e._onImageHasSize(t):(i>200&&clearInterval(O),i++,void(3===i?r(10):40===i?r(50):100===i&&r(500)))},o)};r(1)},getImage:function(i,n){var r=0,o=function(){i&&(i.img[0].complete?(i.img.off(".mfploader"),i===e.currItem&&(e._onImageHasSize(i),e.updateStatus("ready")),i.hasSize=!0,i.loaded=!0,_("ImageLoadComplete")):(r++,200>r?setTimeout(o,100):s()))},s=function(){i&&(i.img.off(".mfploader"),i===e.currItem&&(e._onImageHasSize(i),e.updateStatus("error",a.tError.replace("%url%",i.src))),i.hasSize=!0,i.loaded=!0,i.loadError=!0)},a=e.st.image,l=n.find(".mfp-img");if(l.length){var u=document.createElement("img");u.className="mfp-img",i.el&&i.el.find("img").length&&(u.alt=i.el.find("img").attr("alt")),i.img=t(u).on("load.mfploader",o).on("error.mfploader",s),u.src=i.src,l.is("img")&&(i.img=i.img.clone()),u=i.img[0],u.naturalWidth>0?i.hasSize=!0:u.width||(i.hasSize=!1)}return e._parseMarkup(n,{title:M(i),img_replaceWith:i.img},i),e.resizeImage(),i.hasSize?(O&&clearInterval(O),i.loadError?(n.addClass("mfp-loading"),e.updateStatus("error",a.tError.replace("%url%",i.src))):(n.removeClass("mfp-loading"),e.updateStatus("ready")),n):(e.updateStatus("loading"),i.loading=!0,i.hasSize||(i.imgHidden=!0,n.addClass("mfp-loading"),e.findImageSize(i)),n)}}});var L,R=function(){return void 0===L&&(L=void 0!==document.createElement("p").style.MozTransform),L};t.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(t){return t.is("img")?t:t.find("img")}},proto:{initZoom:function(){var t,i=e.st.zoom,n=".zoom";if(i.enabled&&e.supportsTransition){var r,o,s=i.duration,u=function(t){var e=t.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),n="all "+i.duration/1e3+"s "+i.easing,r={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},o="transition";return r["-webkit-"+o]=r["-moz-"+o]=r["-o-"+o]=r[o]=n,e.css(r),e},c=function(){e.content.css("visibility","visible")};P("BuildControls"+n,function(){if(e._allowZoom()){if(clearTimeout(r),e.content.css("visibility","hidden"),t=e._getItemToZoom(),!t)return void c();o=u(t),o.css(e._getOffset()),e.wrap.append(o),r=setTimeout(function(){o.css(e._getOffset(!0)),r=setTimeout(function(){c(),setTimeout(function(){o.remove(),t=o=null,_("ZoomAnimationEnded")},16)},s)},16)}}),P(l+n,function(){if(e._allowZoom()){if(clearTimeout(r),e.st.removalDelay=s,!t){if(t=e._getItemToZoom(),!t)return;o=u(t)}o.css(e._getOffset(!0)),e.wrap.append(o),e.content.css("visibility","hidden"),setTimeout(function(){o.css(e._getOffset())},16)}}),P(a+n,function(){e._allowZoom()&&(c(),o&&o.remove(),t=null)})}},_allowZoom:function(){return"image"===e.currItem.type},_getItemToZoom:function(){return e.currItem.hasSize?e.currItem.img:!1},_getOffset:function(i){var n;n=i?e.currItem.img:e.st.zoom.opener(e.currItem.el||e.currItem);var r=n.offset(),o=parseInt(n.css("padding-top"),10),s=parseInt(n.css("padding-bottom"),10);r.top-=t(window).scrollTop()-o;var a={width:n.width(),height:(T?n.innerHeight():n[0].offsetHeight)-s-o};return R()?a["-moz-transform"]=a.transform="translate("+r.left+"px,"+r.top+"px)":(a.left=r.left,a.top=r.top),a}}});var F="iframe",B="//about:blank",N=function(t){if(e.currTemplate[F]){var i=e.currTemplate[F].find("iframe");i.length&&(t||(i[0].src=B),e.isIE8&&i.css("display",t?"block":"none"))}};t.magnificPopup.registerModule(F,{options:{markup:'<div class="mfp-iframe-scaler"><div class="mfp-close"></div><iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe></div>',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe:function(){e.types.push(F),P("BeforeChange",function(t,e,i){e!==i&&(e===F?N():i===F&&N(!0))}),P(a+"."+F,function(){N()})},getIframe:function(i,n){var r=i.src,o=e.st.iframe;t.each(o.patterns,function(){return r.indexOf(this.index)>-1?(this.id&&(r="string"==typeof this.id?r.substr(r.lastIndexOf(this.id)+this.id.length,r.length):this.id.call(this,r)),r=this.src.replace("%id%",r),!1):void 0});var s={};return o.srcAction&&(s[o.srcAction]=r),e._parseMarkup(n,s,i),e.updateStatus("ready"),n}}});var W=function(t){var i=e.items.length;return t>i-1?t-i:0>t?i+t:t},V=function(t,e,i){return t.replace(/%curr%/gi,e+1).replace(/%total%/gi,i)};t.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow key)",tCounter:"%curr% of %total%"},proto:{initGallery:function(){var i=e.st.gallery,r=".mfp-gallery";return e.direction=!0,i&&i.enabled?(o+=" mfp-gallery",P(h+r,function(){i.navigateByImgClick&&e.wrap.on("click"+r,".mfp-img",function(){return e.items.length>1?(e.next(),!1):void 0}),n.on("keydown"+r,function(t){37===t.keyCode?e.prev():39===t.keyCode&&e.next()})}),P("UpdateStatus"+r,function(t,i){i.text&&(i.text=V(i.text,e.currItem.index,e.items.length))}),P(d+r,function(t,n,r,o){var s=e.items.length;r.counter=s>1?V(i.tCounter,o.index,s):""}),P("BuildControls"+r,function(){if(e.items.length>1&&i.arrows&&!e.arrowLeft){var n=i.arrowMarkup,r=e.arrowLeft=t(n.replace(/%title%/gi,i.tPrev).replace(/%dir%/gi,"left")).addClass(v),o=e.arrowRight=t(n.replace(/%title%/gi,i.tNext).replace(/%dir%/gi,"right")).addClass(v);r.click(function(){e.prev()}),o.click(function(){e.next()}),e.container.append(r.add(o))}}),P(p+r,function(){e._preloadTimeout&&clearTimeout(e._preloadTimeout),e._preloadTimeout=setTimeout(function(){e.preloadNearbyImages(),e._preloadTimeout=null},16)}),void P(a+r,function(){n.off(r),e.wrap.off("click"+r),e.arrowRight=e.arrowLeft=null})):!1},next:function(){e.direction=!0,e.index=W(e.index+1),e.updateItemHTML()},prev:function(){e.direction=!1,e.index=W(e.index-1),e.updateItemHTML()},goTo:function(t){e.direction=t>=e.index,e.index=t,e.updateItemHTML()},preloadNearbyImages:function(){var t,i=e.st.gallery.preload,n=Math.min(i[0],e.items.length),r=Math.min(i[1],e.items.length);for(t=1;t<=(e.direction?r:n);t++)e._preloadItem(e.index+t);for(t=1;t<=(e.direction?n:r);t++)e._preloadItem(e.index-t)},_preloadItem:function(i){if(i=W(i),!e.items[i].preloaded){var n=e.items[i];n.parsed||(n=e.parseEl(i)),_("LazyLoad",n),"image"===n.type&&(n.img=t('<img class="mfp-img" />').on("load.mfploader",function(){n.hasSize=!0}).on("error.mfploader",function(){n.hasSize=!0,n.loadError=!0,_("LazyLoadError",n)}).attr("src",n.src)),n.preloaded=!0}}}});var H="retina";t.magnificPopup.registerModule(H,{options:{replaceSrc:function(t){return t.src.replace(/\.\w+$/,function(t){return"@2x"+t})},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var t=e.st.retina,i=t.ratio;i=isNaN(i)?i():i,i>1&&(P("ImageHasSize."+H,function(t,e){e.img.css({"max-width":e.img[0].naturalWidth/i,width:"100%"})}),P("ElementParse."+H,function(e,n){n.src=t.replaceSrc(n,i)}))}}}}),S()}),!function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof exports?module.exports=t(require("jquery")):t(jQuery)}(function(t){function e(t){return a.raw?t:encodeURIComponent(t)}function i(t){return a.raw?t:decodeURIComponent(t)}function n(t){return e(a.json?JSON.stringify(t):String(t))}function r(t){0===t.indexOf('"')&&(t=t.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return t=decodeURIComponent(t.replace(s," ")),a.json?JSON.parse(t):t}catch(e){}}function o(e,i){var n=a.raw?e:r(e);return t.isFunction(i)?i(n):n}var s=/\+/g,a=t.cookie=function(r,s,l){if(arguments.length>1&&!t.isFunction(s)){if(l=t.extend({},a.defaults,l),"number"==typeof l.expires){var u=l.expires,c=l.expires=new Date;c.setMilliseconds(c.getMilliseconds()+864e5*u)}return document.cookie=[e(r),"=",n(s),l.expires?"; expires="+l.expires.toUTCString():"",l.path?"; path="+l.path:"",l.domain?"; domain="+l.domain:"",l.secure?"; secure":""].join("")}for(var d=r?void 0:{},h=document.cookie?document.cookie.split("; "):[],p=0,f=h.length;f>p;p++){var m=h[p].split("="),g=i(m.shift()),y=m.join("=");if(r===g){d=o(y,s);break}r||void 0===(y=o(y))||(d[g]=y)}return d};a.defaults={},t.removeCookie=function(e,i){return t.cookie(e,"",t.extend({},i,{expires:-1})),!t.cookie(e)}}),!function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):t("undefined"!=typeof jQuery?jQuery:window.Zepto)}(function(t){"use strict";function e(e){var i=e.data;e.isDefaultPrevented()||(e.preventDefault(),t(e.target).ajaxSubmit(i))}function i(e){var i=e.target,n=t(i);if(!n.is("[type=submit],[type=image]")){var r=n.closest("[type=submit]");if(0===r.length)return;i=r[0]}var o=this;if(o.clk=i,"image"==i.type)if(void 0!==e.offsetX)o.clk_x=e.offsetX,o.clk_y=e.offsetY;else if("function"==typeof t.fn.offset){var s=n.offset();o.clk_x=e.pageX-s.left,o.clk_y=e.pageY-s.top}else o.clk_x=e.pageX-i.offsetLeft,o.clk_y=e.pageY-i.offsetTop;setTimeout(function(){o.clk=o.clk_x=o.clk_y=null},100)}function n(){if(t.fn.ajaxSubmit.debug){var e="[jquery.form] "+Array.prototype.join.call(arguments,"");window.console&&window.console.log?window.console.log(e):window.opera&&window.opera.postError&&window.opera.postError(e)}}var r={};r.fileapi=void 0!==t("<input type='file'/>").get(0).files,r.formdata=void 0!==window.FormData;var o=!!t.fn.prop;t.fn.attr2=function(){if(!o)return this.attr.apply(this,arguments);var t=this.prop.apply(this,arguments);return t&&t.jquery||"string"==typeof t?t:this.attr.apply(this,arguments)},t.fn.ajaxSubmit=function(e){function i(i){var n,r,o=t.param(i,e.traditional).split("&"),s=o.length,a=[];for(n=0;s>n;n++)o[n]=o[n].replace(/\+/g," "),r=o[n].split("="),a.push([decodeURIComponent(r[0]),decodeURIComponent(r[1])]);return a}function s(n){for(var r=new FormData,o=0;o<n.length;o++)r.append(n[o].name,n[o].value);if(e.extraData){var s=i(e.extraData);for(o=0;o<s.length;o++)s[o]&&r.append(s[o][0],s[o][1])}e.data=null;var a=t.extend(!0,{},t.ajaxSettings,e,{contentType:!1,processData:!1,cache:!1,type:l||"POST"});e.uploadProgress&&(a.xhr=function(){var i=t.ajaxSettings.xhr();return i.upload&&i.upload.addEventListener("progress",function(t){var i=0,n=t.loaded||t.position,r=t.total;t.lengthComputable&&(i=Math.ceil(n/r*100)),e.uploadProgress(t,n,r,i)},!1),i}),a.data=null;var u=a.beforeSend;return a.beforeSend=function(t,i){i.data=e.formData?e.formData:r,u&&u.call(this,t,i)},t.ajax(a)}function a(i){function r(t){var e=null;try{t.contentWindow&&(e=t.contentWindow.document)}catch(i){n("cannot get iframe.contentWindow document: "+i)}if(e)return e;try{e=t.contentDocument?t.contentDocument:t.document}catch(i){n("cannot get iframe.contentDocument: "+i),e=t.document}return e}function s(){function e(){try{var t=r(y).readyState;n("state = "+t),t&&"uninitialized"==t.toLowerCase()&&setTimeout(e,50)}catch(i){n("Server abort: ",i," (",i.name,")"),a(S),P&&clearTimeout(P),P=void 0}}var i=d.attr2("target"),o=d.attr2("action"),s="multipart/form-data",u=d.attr("enctype")||d.attr("encoding")||s;x.setAttribute("target",f),(!l||/post/i.test(l))&&x.setAttribute("method","POST"),o!=h.url&&x.setAttribute("action",h.url),h.skipEncodingOverride||l&&!/post/i.test(l)||d.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"}),h.timeout&&(P=setTimeout(function(){w=!0,a(C)},h.timeout));var c=[];try{if(h.extraData)for(var p in h.extraData)h.extraData.hasOwnProperty(p)&&c.push(t.isPlainObject(h.extraData[p])&&h.extraData[p].hasOwnProperty("name")&&h.extraData[p].hasOwnProperty("value")?t('<input type="hidden" name="'+h.extraData[p].name+'">').val(h.extraData[p].value).appendTo(x)[0]:t('<input type="hidden" name="'+p+'">').val(h.extraData[p]).appendTo(x)[0]);h.iframeTarget||g.appendTo("body"),y.attachEvent?y.attachEvent("onload",a):y.addEventListener("load",a,!1),setTimeout(e,15);try{x.submit()}catch(m){var v=document.createElement("form").submit;v.apply(x)}}finally{x.setAttribute("action",o),x.setAttribute("enctype",u),i?x.setAttribute("target",i):d.removeAttr("target"),t(c).remove()}}function a(e){if(!v.aborted&&!Q){if(I=r(y),I||(n("cannot access response document"),e=S),e===C&&v)return v.abort("timeout"),void _.reject(v,"timeout");if(e==S&&v)return v.abort("server abort"),void _.reject(v,"error","server abort");if(I&&I.location.href!=h.iframeSrc||w){y.detachEvent?y.detachEvent("onload",a):y.removeEventListener("load",a,!1);var i,o="success";try{if(w)throw"timeout";var s="xml"==h.dataType||I.XMLDocument||t.isXMLDoc(I);if(n("isXml="+s),!s&&window.opera&&(null===I.body||!I.body.innerHTML)&&--E)return n("requeing onLoad callback, DOM not available"),void setTimeout(a,250);var l=I.body?I.body:I.documentElement;v.responseText=l?l.innerHTML:null,v.responseXML=I.XMLDocument?I.XMLDocument:I,s&&(h.dataType="xml"),v.getResponseHeader=function(t){var e={"content-type":h.dataType};return e[t.toLowerCase()]},l&&(v.status=Number(l.getAttribute("status"))||v.status,v.statusText=l.getAttribute("statusText")||v.statusText);var u=(h.dataType||"").toLowerCase(),c=/(json|script|text)/.test(u);if(c||h.textarea){var d=I.getElementsByTagName("textarea")[0];if(d)v.responseText=d.value,v.status=Number(d.getAttribute("status"))||v.status,v.statusText=d.getAttribute("statusText")||v.statusText;else if(c){var f=I.getElementsByTagName("pre")[0],m=I.getElementsByTagName("body")[0];f?v.responseText=f.textContent?f.textContent:f.innerText:m&&(v.responseText=m.textContent?m.textContent:m.innerText)}}else"xml"==u&&!v.responseXML&&v.responseText&&(v.responseXML=$(v.responseText));try{k=D(v,u,h)}catch(b){o="parsererror",v.error=i=b||o}}catch(b){n("error caught: ",b),o="error",v.error=i=b||o}v.aborted&&(n("upload aborted"),o=null),v.status&&(o=v.status>=200&&v.status<300||304===v.status?"success":"error"),"success"===o?(h.success&&h.success.call(h.context,k,"success",v),_.resolve(v.responseText,"success",v),p&&t.event.trigger("ajaxSuccess",[v,h])):o&&(void 0===i&&(i=v.statusText),h.error&&h.error.call(h.context,v,o,i),_.reject(v,"error",i),p&&t.event.trigger("ajaxError",[v,h,i])),p&&t.event.trigger("ajaxComplete",[v,h]),p&&!--t.active&&t.event.trigger("ajaxStop"),h.complete&&h.complete.call(h.context,v,o),Q=!0,h.timeout&&clearTimeout(P),setTimeout(function(){h.iframeTarget?g.attr("src",h.iframeSrc):g.remove(),v.responseXML=null},100)}}}var u,c,h,p,f,g,y,v,b,T,w,P,x=d[0],_=t.Deferred();if(_.abort=function(t){v.abort(t)},i)for(c=0;c<m.length;c++)u=t(m[c]),o?u.prop("disabled",!1):u.removeAttr("disabled");if(h=t.extend(!0,{},t.ajaxSettings,e),h.context=h.context||h,f="jqFormIO"+(new Date).getTime(),h.iframeTarget?(g=t(h.iframeTarget),T=g.attr2("name"),T?f=T:g.attr2("name",f)):(g=t('<iframe name="'+f+'" src="'+h.iframeSrc+'" />'),g.css({position:"absolute",top:"-1000px",left:"-1000px"})),y=g[0],v={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(e){var i="timeout"===e?"timeout":"aborted";n("aborting upload... "+i),this.aborted=1;try{y.contentWindow.document.execCommand&&y.contentWindow.document.execCommand("Stop")}catch(r){}g.attr("src",h.iframeSrc),v.error=i,h.error&&h.error.call(h.context,v,i,e),p&&t.event.trigger("ajaxError",[v,h,i]),h.complete&&h.complete.call(h.context,v,i)}},p=h.global,p&&0===t.active++&&t.event.trigger("ajaxStart"),p&&t.event.trigger("ajaxSend",[v,h]),h.beforeSend&&h.beforeSend.call(h.context,v,h)===!1)return h.global&&t.active--,_.reject(),_;if(v.aborted)return _.reject(),_;b=x.clk,b&&(T=b.name,T&&!b.disabled&&(h.extraData=h.extraData||{},h.extraData[T]=b.value,"image"==b.type&&(h.extraData[T+".x"]=x.clk_x,h.extraData[T+".y"]=x.clk_y)));var C=1,S=2,j=t("meta[name=csrf-token]").attr("content"),Y=t("meta[name=csrf-param]").attr("content");Y&&j&&(h.extraData=h.extraData||{},h.extraData[Y]=j),h.forceSync?s():setTimeout(s,10);var k,I,Q,E=50,$=t.parseXML||function(t,e){return window.ActiveXObject?(e=new ActiveXObject("Microsoft.XMLDOM"),e.async="false",e.loadXML(t)):e=(new DOMParser).parseFromString(t,"text/xml"),e&&e.documentElement&&"parsererror"!=e.documentElement.nodeName?e:null},A=t.parseJSON||function(t){return window.eval("("+t+")")},D=function(e,i,n){var r=e.getResponseHeader("content-type")||"",o="xml"===i||!i&&r.indexOf("xml")>=0,s=o?e.responseXML:e.responseText;return o&&"parsererror"===s.documentElement.nodeName&&t.error&&t.error("parsererror"),n&&n.dataFilter&&(s=n.dataFilter(s,i)),"string"==typeof s&&("json"===i||!i&&r.indexOf("json")>=0?s=A(s):("script"===i||!i&&r.indexOf("javascript")>=0)&&t.globalEval(s)),s};return _}if(!this.length)return n("ajaxSubmit: skipping submit process - no element selected"),this;var l,u,c,d=this;"function"==typeof e?e={success:e}:void 0===e&&(e={}),l=e.type||this.attr2("method"),u=e.url||this.attr2("action"),c="string"==typeof u?t.trim(u):"",c=c||window.location.href||"",c&&(c=(c.match(/^([^#]+)/)||[])[1]),e=t.extend(!0,{url:c,success:t.ajaxSettings.success,type:l||t.ajaxSettings.type,iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank"},e);var h={};if(this.trigger("form-pre-serialize",[this,e,h]),h.veto)return n("ajaxSubmit: submit vetoed via form-pre-serialize trigger"),this;if(e.beforeSerialize&&e.beforeSerialize(this,e)===!1)return n("ajaxSubmit: submit aborted via beforeSerialize callback"),this;var p=e.traditional;void 0===p&&(p=t.ajaxSettings.traditional);var f,m=[],g=this.formToArray(e.semantic,m);if(e.data&&(e.extraData=e.data,f=t.param(e.data,p)),e.beforeSubmit&&e.beforeSubmit(g,this,e)===!1)return n("ajaxSubmit: submit aborted via beforeSubmit callback"),this;if(this.trigger("form-submit-validate",[g,this,e,h]),h.veto)return n("ajaxSubmit: submit vetoed via form-submit-validate trigger"),this;var y=t.param(g,p);f&&(y=y?y+"&"+f:f),"GET"==e.type.toUpperCase()?(e.url+=(e.url.indexOf("?")>=0?"&":"?")+y,e.data=null):e.data=y;var v=[];if(e.resetForm&&v.push(function(){d.resetForm()}),e.clearForm&&v.push(function(){d.clearForm(e.includeHidden)}),!e.dataType&&e.target){var b=e.success||function(){};v.push(function(i){var n=e.replaceTarget?"replaceWith":"html";t(e.target)[n](i).each(b,arguments)})}else e.success&&v.push(e.success);if(e.success=function(t,i,n){for(var r=e.context||this,o=0,s=v.length;s>o;o++)v[o].apply(r,[t,i,n||d,d])},e.error){var T=e.error;e.error=function(t,i,n){var r=e.context||this;T.apply(r,[t,i,n,d])}}if(e.complete){var w=e.complete;e.complete=function(t,i){var n=e.context||this;w.apply(n,[t,i,d])}}var P=t("input[type=file]:enabled",this).filter(function(){return""!==t(this).val()}),x=P.length>0,_="multipart/form-data",C=d.attr("enctype")==_||d.attr("encoding")==_,S=r.fileapi&&r.formdata;n("fileAPI :"+S);var j,Y=(x||C)&&!S;e.iframe!==!1&&(e.iframe||Y)?e.closeKeepAlive?t.get(e.closeKeepAlive,function(){j=a(g)}):j=a(g):j=(x||C)&&S?s(g):t.ajax(e),d.removeData("jqxhr").data("jqxhr",j);for(var k=0;k<m.length;k++)m[k]=null;return this.trigger("form-submit-notify",[this,e]),this},t.fn.ajaxForm=function(r){if(r=r||{},r.delegation=r.delegation&&t.isFunction(t.fn.on),!r.delegation&&0===this.length){var o={s:this.selector,c:this.context};return!t.isReady&&o.s?(n("DOM not ready, queuing ajaxForm"),t(function(){t(o.s,o.c).ajaxForm(r)}),this):(n("terminating; zero elements found by selector"+(t.isReady?"":" (DOM not ready)")),this)}return r.delegation?(t(document).off("submit.form-plugin",this.selector,e).off("click.form-plugin",this.selector,i).on("submit.form-plugin",this.selector,r,e).on("click.form-plugin",this.selector,r,i),this):this.ajaxFormUnbind().bind("submit.form-plugin",r,e).bind("click.form-plugin",r,i)},t.fn.ajaxFormUnbind=function(){return this.unbind("submit.form-plugin click.form-plugin")},t.fn.formToArray=function(e,i){var n=[];if(0===this.length)return n;var o,s=this[0],a=this.attr("id"),l=e?s.getElementsByTagName("*"):s.elements;if(l&&!/MSIE [678]/.test(navigator.userAgent)&&(l=t(l).get()),a&&(o=t(':input[form="'+a+'"]').get(),o.length&&(l=(l||[]).concat(o))),!l||!l.length)return n;var u,c,d,h,p,f,m;for(u=0,f=l.length;f>u;u++)if(p=l[u],d=p.name,d&&!p.disabled)if(e&&s.clk&&"image"==p.type)s.clk==p&&(n.push({name:d,value:t(p).val(),type:p.type}),n.push({name:d+".x",value:s.clk_x},{name:d+".y",value:s.clk_y}));else if(h=t.fieldValue(p,!0),h&&h.constructor==Array)for(i&&i.push(p),c=0,m=h.length;m>c;c++)n.push({name:d,value:h[c]});else if(r.fileapi&&"file"==p.type){i&&i.push(p);var g=p.files;if(g.length)for(c=0;c<g.length;c++)n.push({name:d,value:g[c],type:p.type});else n.push({name:d,value:"",type:p.type})}else null!==h&&"undefined"!=typeof h&&(i&&i.push(p),n.push({name:d,value:h,type:p.type,required:p.required}));if(!e&&s.clk){var y=t(s.clk),v=y[0];d=v.name,d&&!v.disabled&&"image"==v.type&&(n.push({name:d,value:y.val()}),n.push({name:d+".x",value:s.clk_x},{name:d+".y",value:s.clk_y}))}return n},t.fn.formSerialize=function(e){return t.param(this.formToArray(e))},t.fn.fieldSerialize=function(e){var i=[];return this.each(function(){var n=this.name;if(n){var r=t.fieldValue(this,e);if(r&&r.constructor==Array)for(var o=0,s=r.length;s>o;o++)i.push({name:n,value:r[o]});else null!==r&&"undefined"!=typeof r&&i.push({name:this.name,value:r})}}),t.param(i)},t.fn.fieldValue=function(e){for(var i=[],n=0,r=this.length;r>n;n++){var o=this[n],s=t.fieldValue(o,e);null===s||"undefined"==typeof s||s.constructor==Array&&!s.length||(s.constructor==Array?t.merge(i,s):i.push(s))}return i},t.fieldValue=function(e,i){var n=e.name,r=e.type,o=e.tagName.toLowerCase();if(void 0===i&&(i=!0),i&&(!n||e.disabled||"reset"==r||"button"==r||("checkbox"==r||"radio"==r)&&!e.checked||("submit"==r||"image"==r)&&e.form&&e.form.clk!=e||"select"==o&&-1==e.selectedIndex))return null;if("select"==o){var s=e.selectedIndex;if(0>s)return null;for(var a=[],l=e.options,u="select-one"==r,c=u?s+1:l.length,d=u?s:0;c>d;d++){var h=l[d];if(h.selected){var p=h.value;if(p||(p=h.attributes&&h.attributes.value&&!h.attributes.value.specified?h.text:h.value),u)return p;a.push(p)}}return a}return t(e).val()},t.fn.clearForm=function(e){return this.each(function(){t("input,select,textarea",this).clearFields(e)})},t.fn.clearFields=t.fn.clearInputs=function(e){var i=/^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i;return this.each(function(){var n=this.type,r=this.tagName.toLowerCase();i.test(n)||"textarea"==r?this.value="":"checkbox"==n||"radio"==n?this.checked=!1:"select"==r?this.selectedIndex=-1:"file"==n?/MSIE/.test(navigator.userAgent)?t(this).replaceWith(t(this).clone(!0)):t(this).val(""):e&&(e===!0&&/hidden/.test(n)||"string"==typeof e&&t(this).is(e))&&(this.value="")})},t.fn.resetForm=function(){return this.each(function(){("function"==typeof this.reset||"object"==typeof this.reset&&!this.reset.nodeType)&&this.reset()})},t.fn.enable=function(t){return void 0===t&&(t=!0),this.each(function(){this.disabled=!t})},t.fn.selected=function(e){return void 0===e&&(e=!0),this.each(function(){var i=this.type;if("checkbox"==i||"radio"==i)this.checked=e;else if("option"==this.tagName.toLowerCase()){var n=t(this).parent("select");e&&n[0]&&"select-one"==n[0].type&&n.find("option").selected(!1),this.selected=e}})},t.fn.ajaxSubmit.debug=!1}),!function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(t){t.extend(t.fn,{validate:function(e){if(!this.length)return void(e&&e.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."));var i=t.data(this[0],"validator");return i?i:(this.attr("novalidate","novalidate"),i=new t.validator(e,this[0]),t.data(this[0],"validator",i),i.settings.onsubmit&&(this.on("click.validate",":submit",function(e){i.settings.submitHandler&&(i.submitButton=e.target),t(this).hasClass("cancel")&&(i.cancelSubmit=!0),void 0!==t(this).attr("formnovalidate")&&(i.cancelSubmit=!0)}),this.on("submit.validate",function(e){function n(){var n,r;return i.settings.submitHandler?(i.submitButton&&(n=t("<input type='hidden'/>").attr("name",i.submitButton.name).val(t(i.submitButton).val()).appendTo(i.currentForm)),r=i.settings.submitHandler.call(i,i.currentForm,e),i.submitButton&&n.remove(),void 0!==r?r:!1):!0}return i.settings.debug&&e.preventDefault(),i.cancelSubmit?(i.cancelSubmit=!1,n()):i.form()?i.pendingRequest?(i.formSubmitted=!0,!1):n():(i.focusInvalid(),!1)})),i)},valid:function(){var e,i,n;return t(this[0]).is("form")?e=this.validate().form():(n=[],e=!0,i=t(this[0].form).validate(),this.each(function(){e=i.element(this)&&e,n=n.concat(i.errorList)}),i.errorList=n),e},rules:function(e,i){var n,r,o,s,a,l,u=this[0];if(e)switch(n=t.data(u.form,"validator").settings,r=n.rules,o=t.validator.staticRules(u),e){case"add":t.extend(o,t.validator.normalizeRule(i)),delete o.messages,r[u.name]=o,i.messages&&(n.messages[u.name]=t.extend(n.messages[u.name],i.messages));break;case"remove":return i?(l={},t.each(i.split(/\s/),function(e,i){l[i]=o[i],delete o[i],"required"===i&&t(u).removeAttr("aria-required")}),l):(delete r[u.name],o)}return s=t.validator.normalizeRules(t.extend({},t.validator.classRules(u),t.validator.attributeRules(u),t.validator.dataRules(u),t.validator.staticRules(u)),u),s.required&&(a=s.required,delete s.required,s=t.extend({required:a},s),t(u).attr("aria-required","true")),s.remote&&(a=s.remote,delete s.remote,s=t.extend(s,{remote:a})),s}}),t.extend(t.expr[":"],{blank:function(e){return!t.trim(""+t(e).val())},filled:function(e){return!!t.trim(""+t(e).val())},unchecked:function(e){return!t(e).prop("checked")}}),t.validator=function(e,i){this.settings=t.extend(!0,{},t.validator.defaults,e),this.currentForm=i,this.init()},t.validator.format=function(e,i){return 1===arguments.length?function(){var i=t.makeArray(arguments);return i.unshift(e),t.validator.format.apply(this,i)}:(arguments.length>2&&i.constructor!==Array&&(i=t.makeArray(arguments).slice(1)),i.constructor!==Array&&(i=[i]),t.each(i,function(t,i){e=e.replace(new RegExp("\\{"+t+"\\}","g"),function(){return i})}),e)},t.extend(t.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",validClass:"valid",errorElement:"label",focusCleanup:!1,focusInvalid:!0,errorContainer:t([]),errorLabelContainer:t([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(t){this.lastActive=t,this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,t,this.settings.errorClass,this.settings.validClass),this.hideThese(this.errorsFor(t)))},onfocusout:function(t){this.checkable(t)||!(t.name in this.submitted)&&this.optional(t)||this.element(t)},onkeyup:function(e,i){var n=[16,17,18,20,35,36,37,38,39,40,45,144,225];9===i.which&&""===this.elementValue(e)||-1!==t.inArray(i.keyCode,n)||(e.name in this.submitted||e===this.lastElement)&&this.element(e)},onclick:function(t){t.name in this.submitted?this.element(t):t.parentNode.name in this.submitted&&this.element(t.parentNode)},highlight:function(e,i,n){"radio"===e.type?this.findByName(e.name).addClass(i).removeClass(n):t(e).addClass(i).removeClass(n)},unhighlight:function(e,i,n){"radio"===e.type?this.findByName(e.name).removeClass(i).addClass(n):t(e).removeClass(i).addClass(n)}},setDefaults:function(e){t.extend(t.validator.defaults,e)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date ( ISO ).",number:"Please enter a valid number.",digits:"Please enter only digits.",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",maxlength:t.validator.format("Please enter no more than {0} characters."),minlength:t.validator.format("Please enter at least {0} characters."),rangelength:t.validator.format("Please enter a value between {0} and {1} characters long."),range:t.validator.format("Please enter a value between {0} and {1}."),max:t.validator.format("Please enter a value less than or equal to {0}."),min:t.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:!1,prototype:{init:function(){function e(e){var i=t.data(this.form,"validator"),n="on"+e.type.replace(/^validate/,""),r=i.settings;r[n]&&!t(this).is(r.ignore)&&r[n].call(i,this,e)}this.labelContainer=t(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||t(this.currentForm),this.containers=t(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var i,n=this.groups={};t.each(this.settings.groups,function(e,i){"string"==typeof i&&(i=i.split(/\s/)),t.each(i,function(t,i){n[i]=e})}),i=this.settings.rules,t.each(i,function(e,n){i[e]=t.validator.normalizeRule(n)}),t(this.currentForm).on("focusin.validate focusout.validate keyup.validate",":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], [type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], [type='radio'], [type='checkbox']",e).on("click.validate","select, option, [type='radio'], [type='checkbox']",e),this.settings.invalidHandler&&t(this.currentForm).on("invalid-form.validate",this.settings.invalidHandler),t(this.currentForm).find("[required], [data-rule-required], .required").attr("aria-required","true")},form:function(){return this.checkForm(),t.extend(this.submitted,this.errorMap),this.invalid=t.extend({},this.errorMap),this.valid()||t(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var t=0,e=this.currentElements=this.elements();e[t];t++)this.check(e[t]);return this.valid()},element:function(e){var i=this.clean(e),n=this.validationTargetFor(i),r=!0;return this.lastElement=n,void 0===n?delete this.invalid[i.name]:(this.prepareElement(n),this.currentElements=t(n),r=this.check(n)!==!1,r?delete this.invalid[n.name]:this.invalid[n.name]=!0),t(e).attr("aria-invalid",!r),this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),r},showErrors:function(e){if(e){t.extend(this.errorMap,e),this.errorList=[];for(var i in e)this.errorList.push({message:e[i],element:this.findByName(i)[0]});this.successList=t.grep(this.successList,function(t){return!(t.name in e)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){t.fn.resetForm&&t(this.currentForm).resetForm(),this.submitted={},this.lastElement=null,this.prepareForm(),this.hideErrors();var e,i=this.elements().removeData("previousValue").removeAttr("aria-invalid");if(this.settings.unhighlight)for(e=0;i[e];e++)this.settings.unhighlight.call(this,i[e],this.settings.errorClass,"");else i.removeClass(this.settings.errorClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(t){var e,i=0;for(e in t)i++;return i},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(t){t.not(this.containers).text(""),this.addWrapper(t).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{t(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(e){}},findLastActive:function(){var e=this.lastActive;return e&&1===t.grep(this.errorList,function(t){return t.element.name===e.name}).length&&e},elements:function(){var e=this,i={};return t(this.currentForm).find("input, select, textarea").not(":submit, :reset, :image, :disabled").not(this.settings.ignore).filter(function(){return!this.name&&e.settings.debug&&window.console&&console.error("%o has no name assigned",this),this.name in i||!e.objectLength(t(this).rules())?!1:(i[this.name]=!0,!0)})},clean:function(e){return t(e)[0]},errors:function(){var e=this.settings.errorClass.split(" ").join(".");return t(this.settings.errorElement+"."+e,this.errorContext)},reset:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=t([]),this.toHide=t([]),this.currentElements=t([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(t){this.reset(),this.toHide=this.errorsFor(t)},elementValue:function(e){var i,n=t(e),r=e.type;return"radio"===r||"checkbox"===r?this.findByName(e.name).filter(":checked").val():"number"===r&&"undefined"!=typeof e.validity?e.validity.badInput?!1:n.val():(i=n.val(),"string"==typeof i?i.replace(/\r/g,""):i)},check:function(e){e=this.validationTargetFor(this.clean(e));var i,n,r,o=t(e).rules(),s=t.map(o,function(t,e){return e}).length,a=!1,l=this.elementValue(e);for(n in o){r={method:n,parameters:o[n]};try{if(i=t.validator.methods[n].call(this,l,e,r.parameters),"dependency-mismatch"===i&&1===s){a=!0;continue}if(a=!1,"pending"===i)return void(this.toHide=this.toHide.not(this.errorsFor(e)));if(!i)return this.formatAndAdd(e,r),!1}catch(u){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+e.id+", check the '"+r.method+"' method.",u),u instanceof TypeError&&(u.message+=".  Exception occurred when checking element "+e.id+", check the '"+r.method+"' method."),u}}return a?void 0:(this.objectLength(o)&&this.successList.push(e),!0)},customDataMessage:function(e,i){return t(e).data("msg"+i.charAt(0).toUpperCase()+i.substring(1).toLowerCase())||t(e).data("msg")},customMessage:function(t,e){var i=this.settings.messages[t];return i&&(i.constructor===String?i:i[e])},findDefined:function(){for(var t=0;t<arguments.length;t++)if(void 0!==arguments[t])return arguments[t]},defaultMessage:function(e,i){return this.findDefined(this.customMessage(e.name,i),this.customDataMessage(e,i),!this.settings.ignoreTitle&&e.title||void 0,t.validator.messages[i],"<strong>Warning: No message defined for "+e.name+"</strong>")},formatAndAdd:function(e,i){var n=this.defaultMessage(e,i.method),r=/\$?\{(\d+)\}/g;"function"==typeof n?n=n.call(this,i.parameters,e):r.test(n)&&(n=t.validator.format(n.replace(r,"{$1}"),i.parameters)),this.errorList.push({message:n,element:e,method:i.method}),this.errorMap[e.name]=n,this.submitted[e.name]=n},addWrapper:function(t){return this.settings.wrapper&&(t=t.add(t.parent(this.settings.wrapper))),t},defaultShowErrors:function(){var t,e,i;for(t=0;this.errorList[t];t++)i=this.errorList[t],this.settings.highlight&&this.settings.highlight.call(this,i.element,this.settings.errorClass,this.settings.validClass),this.showLabel(i.element,i.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(t=0;this.successList[t];t++)this.showLabel(this.successList[t]);if(this.settings.unhighlight)for(t=0,e=this.validElements();e[t];t++)this.settings.unhighlight.call(this,e[t],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return t(this.errorList).map(function(){return this.element})},showLabel:function(e,i){var n,r,o,s=this.errorsFor(e),a=this.idOrName(e),l=t(e).attr("aria-describedby");s.length?(s.removeClass(this.settings.validClass).addClass(this.settings.errorClass),s.html(i)):(s=t("<"+this.settings.errorElement+">").attr("id",a+"-error").addClass(this.settings.errorClass).html(i||""),n=s,this.settings.wrapper&&(n=s.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.length?this.labelContainer.append(n):this.settings.errorPlacement?this.settings.errorPlacement(n,t(e)):n.insertAfter(e),s.is("label")?s.attr("for",a):0===s.parents("label[for='"+a+"']").length&&(o=s.attr("id").replace(/(:|\.|\[|\]|\$)/g,"\\$1"),l?l.match(new RegExp("\\b"+o+"\\b"))||(l+=" "+o):l=o,t(e).attr("aria-describedby",l),r=this.groups[e.name],r&&t.each(this.groups,function(e,i){i===r&&t("[name='"+e+"']",this.currentForm).attr("aria-describedby",s.attr("id"))}))),!i&&this.settings.success&&(s.text(""),"string"==typeof this.settings.success?s.addClass(this.settings.success):this.settings.success(s,e)),this.toShow=this.toShow.add(s)},errorsFor:function(e){var i=this.idOrName(e),n=t(e).attr("aria-describedby"),r="label[for='"+i+"'], label[for='"+i+"'] *";return n&&(r=r+", #"+n.replace(/\s+/g,", #")),this.errors().filter(r)},idOrName:function(t){return this.groups[t.name]||(this.checkable(t)?t.name:t.id||t.name)},validationTargetFor:function(e){return this.checkable(e)&&(e=this.findByName(e.name)),t(e).not(this.settings.ignore)[0]},checkable:function(t){return/radio|checkbox/i.test(t.type)},findByName:function(e){return t(this.currentForm).find("[name='"+e+"']")},getLength:function(e,i){switch(i.nodeName.toLowerCase()){case"select":return t("option:selected",i).length;case"input":if(this.checkable(i))return this.findByName(i.name).filter(":checked").length}return e.length},depend:function(t,e){return this.dependTypes[typeof t]?this.dependTypes[typeof t](t,e):!0},dependTypes:{"boolean":function(t){return t},string:function(e,i){return!!t(e,i.form).length},"function":function(t,e){return t(e)}},optional:function(e){var i=this.elementValue(e);return!t.validator.methods.required.call(this,i,e)&&"dependency-mismatch"},startRequest:function(t){this.pending[t.name]||(this.pendingRequest++,this.pending[t.name]=!0)},stopRequest:function(e,i){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[e.name],i&&0===this.pendingRequest&&this.formSubmitted&&this.form()?(t(this.currentForm).submit(),this.formSubmitted=!1):!i&&0===this.pendingRequest&&this.formSubmitted&&(t(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(e){return t.data(e,"previousValue")||t.data(e,"previousValue",{old:null,valid:!0,message:this.defaultMessage(e,"remote")})},destroy:function(){this.resetForm(),t(this.currentForm).off(".validate").removeData("validator")}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(e,i){e.constructor===String?this.classRuleSettings[e]=i:t.extend(this.classRuleSettings,e)},classRules:function(e){var i={},n=t(e).attr("class");return n&&t.each(n.split(" "),function(){this in t.validator.classRuleSettings&&t.extend(i,t.validator.classRuleSettings[this])}),i},normalizeAttributeRule:function(t,e,i,n){/min|max/.test(i)&&(null===e||/number|range|text/.test(e))&&(n=Number(n),isNaN(n)&&(n=void 0)),n||0===n?t[i]=n:e===i&&"range"!==e&&(t[i]=!0)},attributeRules:function(e){var i,n,r={},o=t(e),s=e.getAttribute("type");for(i in t.validator.methods)"required"===i?(n=e.getAttribute(i),""===n&&(n=!0),n=!!n):n=o.attr(i),this.normalizeAttributeRule(r,s,i,n);return r.maxlength&&/-1|2147483647|524288/.test(r.maxlength)&&delete r.maxlength,r},dataRules:function(e){var i,n,r={},o=t(e),s=e.getAttribute("type");for(i in t.validator.methods)n=o.data("rule"+i.charAt(0).toUpperCase()+i.substring(1).toLowerCase()),this.normalizeAttributeRule(r,s,i,n);return r},staticRules:function(e){var i={},n=t.data(e.form,"validator");return n.settings.rules&&(i=t.validator.normalizeRule(n.settings.rules[e.name])||{}),i},normalizeRules:function(e,i){return t.each(e,function(n,r){if(r===!1)return void delete e[n];if(r.param||r.depends){var o=!0;switch(typeof r.depends){case"string":o=!!t(r.depends,i.form).length;break;case"function":o=r.depends.call(i,i)}o?e[n]=void 0!==r.param?r.param:!0:delete e[n]}}),t.each(e,function(n,r){e[n]=t.isFunction(r)?r(i):r}),t.each(["minlength","maxlength"],function(){e[this]&&(e[this]=Number(e[this]))}),t.each(["rangelength","range"],function(){var i;e[this]&&(t.isArray(e[this])?e[this]=[Number(e[this][0]),Number(e[this][1])]:"string"==typeof e[this]&&(i=e[this].replace(/[\[\]]/g,"").split(/[\s,]+/),e[this]=[Number(i[0]),Number(i[1])]))}),t.validator.autoCreateRanges&&(null!=e.min&&null!=e.max&&(e.range=[e.min,e.max],delete e.min,delete e.max),null!=e.minlength&&null!=e.maxlength&&(e.rangelength=[e.minlength,e.maxlength],delete e.minlength,delete e.maxlength)),e},normalizeRule:function(e){if("string"==typeof e){var i={};t.each(e.split(/\s/),function(){i[this]=!0}),e=i}return e},addMethod:function(e,i,n){t.validator.methods[e]=i,t.validator.messages[e]=void 0!==n?n:t.validator.messages[e],i.length<3&&t.validator.addClassRules(e,t.validator.normalizeRule(e))},methods:{required:function(e,i,n){if(!this.depend(n,i))return"dependency-mismatch";if("select"===i.nodeName.toLowerCase()){var r=t(i).val();return r&&r.length>0}return this.checkable(i)?this.getLength(e,i)>0:e.length>0},email:function(t,e){return this.optional(e)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(t)},url:function(t,e){return this.optional(e)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(t)},date:function(t,e){return this.optional(e)||!/Invalid|NaN/.test(new Date(t).toString())},dateISO:function(t,e){return this.optional(e)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(t)},number:function(t,e){return this.optional(e)||/^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(t)},digits:function(t,e){return this.optional(e)||/^\d+$/.test(t)},creditcard:function(t,e){if(this.optional(e))return"dependency-mismatch";if(/[^0-9 \-]+/.test(t))return!1;var i,n,r=0,o=0,s=!1;if(t=t.replace(/\D/g,""),t.length<13||t.length>19)return!1;for(i=t.length-1;i>=0;i--)n=t.charAt(i),o=parseInt(n,10),s&&(o*=2)>9&&(o-=9),r+=o,s=!s;return r%10===0},minlength:function(e,i,n){var r=t.isArray(e)?e.length:this.getLength(e,i);return this.optional(i)||r>=n},maxlength:function(e,i,n){var r=t.isArray(e)?e.length:this.getLength(e,i);return this.optional(i)||n>=r},rangelength:function(e,i,n){var r=t.isArray(e)?e.length:this.getLength(e,i);return this.optional(i)||r>=n[0]&&r<=n[1]},min:function(t,e,i){return this.optional(e)||t>=i},max:function(t,e,i){return this.optional(e)||i>=t},range:function(t,e,i){return this.optional(e)||t>=i[0]&&t<=i[1]},equalTo:function(e,i,n){var r=t(n);return this.settings.onfocusout&&r.off(".validate-equalTo").on("blur.validate-equalTo",function(){t(i).valid()}),e===r.val()},remote:function(e,i,n){if(this.optional(i))return"dependency-mismatch";var r,o,s=this.previousValue(i);return this.settings.messages[i.name]||(this.settings.messages[i.name]={}),s.originalMessage=this.settings.messages[i.name].remote,this.settings.messages[i.name].remote=s.message,n="string"==typeof n&&{url:n}||n,s.old===e?s.valid:(s.old=e,r=this,this.startRequest(i),o={},o[i.name]=e,t.ajax(t.extend(!0,{mode:"abort",port:"validate"+i.name,dataType:"json",data:o,context:r.currentForm,success:function(n){var o,a,l,u=n===!0||"true"===n;r.settings.messages[i.name].remote=s.originalMessage,u?(l=r.formSubmitted,r.prepareElement(i),r.formSubmitted=l,r.successList.push(i),delete r.invalid[i.name],r.showErrors()):(o={},a=n||r.defaultMessage(i,"remote"),o[i.name]=s.message=t.isFunction(a)?a(e):a,r.invalid[i.name]=!0,r.showErrors(o)),s.valid=u,r.stopRequest(i,u)}},n)),"pending")}}});var e,i={};t.ajaxPrefilter?t.ajaxPrefilter(function(t,e,n){var r=t.port;"abort"===t.mode&&(i[r]&&i[r].abort(),i[r]=n)}):(e=t.ajax,t.ajax=function(n){var r=("mode"in n?n:t.ajaxSettings).mode,o=("port"in n?n:t.ajaxSettings).port;return"abort"===r?(i[o]&&i[o].abort(),i[o]=e.apply(this,arguments),i[o]):e.apply(this,arguments)})}),!function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t("object"==typeof exports?require("jquery"):jQuery)}(function(t){function e(e){var i=!1;return t('[data-notify="container"]').each(function(n,r){var o=t(r),s=o.find('[data-notify="title"]').html().trim(),a=o.find('[data-notify="message"]').html().trim(),l=s===t("<div>"+e.settings.content.title+"</div>").html().trim(),u=a===t("<div>"+e.settings.content.message+"</div>").html().trim(),c=o.hasClass("alert-"+e.settings.type);return l&&u&&c&&(i=!0),!i}),i}function i(i,r,o){var s={content:{message:"object"==typeof r?r.message:r,title:r.title?r.title:"",icon:r.icon?r.icon:"",url:r.url?r.url:"#",target:r.target?r.target:"-"}};o=t.extend(!0,{},s,o),this.settings=t.extend(!0,{},n,o),this._defaults=n,"-"===this.settings.content.target&&(this.settings.content.target=this.settings.url_target),this.animations={start:"webkitAnimationStart oanimationstart MSAnimationStart animationstart",end:"webkitAnimationEnd oanimationend MSAnimationEnd animationend"},"number"==typeof this.settings.offset&&(this.settings.offset={x:this.settings.offset,y:this.settings.offset}),(this.settings.allow_duplicates||!this.settings.allow_duplicates&&!e(this))&&this.init()}var n={element:"body",position:null,type:"info",allow_dismiss:!0,allow_duplicates:!0,newest_on_top:!1,showProgressbar:!1,placement:{from:"top",align:"right"},offset:20,spacing:10,z_index:1031,delay:5e3,timer:1e3,url_target:"_blank",mouse_over:null,animate:{enter:"animated fadeInDown",exit:"animated fadeOutUp"},onShow:null,onShown:null,onClose:null,onClosed:null,onClick:null,icon_type:"class",template:'<div data-notify="container" class="col-xs-11 col-sm-4 alert alert-{0}" role="alert"><button type="button" aria-hidden="true" class="close" data-notify="dismiss">&times;</button><span data-notify="icon"></span> <span data-notify="title">{1}</span> <span data-notify="message">{2}</span><div class="progress" data-notify="progressbar"><div class="progress-bar progress-bar-{0}" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%;"></div></div><a href="{3}" target="{4}" data-notify="url"></a></div>'};String.format=function(){var t=arguments,e=arguments[0];return e.replace(/(\{\{\d\}\}|\{\d\})/g,function(e){if("{{"===e.substring(0,2))return e;var i=parseInt(e.match(/\d/)[0]);return t[i+1]})},t.extend(i.prototype,{init:function(){var t=this;this.buildNotify(),this.settings.content.icon&&this.setIcon(),"#"!=this.settings.content.url&&this.styleURL(),this.styleDismiss(),this.placement(),this.bind(),this.notify={$ele:this.$ele,update:function(e,i){var n={};"string"==typeof e?n[e]=i:n=e;for(var r in n)switch(r){case"type":this.$ele.removeClass("alert-"+t.settings.type),this.$ele.find('[data-notify="progressbar"] > .progress-bar').removeClass("progress-bar-"+t.settings.type),t.settings.type=n[r],this.$ele.addClass("alert-"+n[r]).find('[data-notify="progressbar"] > .progress-bar').addClass("progress-bar-"+n[r]);break;case"icon":var o=this.$ele.find('[data-notify="icon"]');"class"===t.settings.icon_type.toLowerCase()?o.removeClass(t.settings.content.icon).addClass(n[r]):(o.is("img")||o.find("img"),o.attr("src",n[r])),t.settings.content.icon=n[e];break;case"progress":var s=t.settings.delay-t.settings.delay*(n[r]/100);this.$ele.data("notify-delay",s),this.$ele.find('[data-notify="progressbar"] > div').attr("aria-valuenow",n[r]).css("width",n[r]+"%");break;case"url":this.$ele.find('[data-notify="url"]').attr("href",n[r]);break;case"target":this.$ele.find('[data-notify="url"]').attr("target",n[r]);break;default:this.$ele.find('[data-notify="'+r+'"]').html(n[r])}var a=this.$ele.outerHeight()+parseInt(t.settings.spacing)+parseInt(t.settings.offset.y);t.reposition(a)},close:function(){t.close()}}},buildNotify:function(){var e=this.settings.content;this.$ele=t(String.format(this.settings.template,this.settings.type,e.title,e.message,e.url,e.target)),this.$ele.attr("data-notify-position",this.settings.placement.from+"-"+this.settings.placement.align),this.settings.allow_dismiss||this.$ele.find('[data-notify="dismiss"]').css("display","none"),(this.settings.delay<=0&&!this.settings.showProgressbar||!this.settings.showProgressbar)&&this.$ele.find('[data-notify="progressbar"]').remove()},setIcon:function(){"class"===this.settings.icon_type.toLowerCase()?this.$ele.find('[data-notify="icon"]').addClass(this.settings.content.icon):this.$ele.find('[data-notify="icon"]').is("img")?this.$ele.find('[data-notify="icon"]').attr("src",this.settings.content.icon):this.$ele.find('[data-notify="icon"]').append('<img src="'+this.settings.content.icon+'" alt="Notify Icon" />')},styleDismiss:function(){this.$ele.find('[data-notify="dismiss"]').css({position:"absolute",right:"10px",top:"5px",zIndex:this.settings.z_index+2})},styleURL:function(){this.$ele.find('[data-notify="url"]').css({backgroundImage:"url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)",height:"100%",left:0,position:"absolute",top:0,width:"100%",zIndex:this.settings.z_index+1})},placement:function(){var e=this,i=this.settings.offset.y,n={display:"inline-block",margin:"0px auto",position:this.settings.position?this.settings.position:"body"===this.settings.element?"fixed":"absolute",transition:"all .5s ease-in-out",zIndex:this.settings.z_index},r=!1,o=this.settings;switch(t('[data-notify-position="'+this.settings.placement.from+"-"+this.settings.placement.align+'"]:not([data-closing="true"])').each(function(){i=Math.max(i,parseInt(t(this).css(o.placement.from))+parseInt(t(this).outerHeight())+parseInt(o.spacing))}),this.settings.newest_on_top===!0&&(i=this.settings.offset.y),n[this.settings.placement.from]=i+"px",this.settings.placement.align){case"left":case"right":n[this.settings.placement.align]=this.settings.offset.x+"px";break;case"center":n.left=0,n.right=0}this.$ele.css(n).addClass(this.settings.animate.enter),t.each(Array("webkit-","moz-","o-","ms-",""),function(t,i){e.$ele[0].style[i+"AnimationIterationCount"]=1}),t(this.settings.element).append(this.$ele),this.settings.newest_on_top===!0&&(i=parseInt(i)+parseInt(this.settings.spacing)+this.$ele.outerHeight(),this.reposition(i)),t.isFunction(e.settings.onShow)&&e.settings.onShow.call(this.$ele),this.$ele.one(this.animations.start,function(){r=!0}).one(this.animations.end,function(){e.$ele.removeClass(e.settings.animate.enter),t.isFunction(e.settings.onShown)&&e.settings.onShown.call(this)}),setTimeout(function(){r||t.isFunction(e.settings.onShown)&&e.settings.onShown.call(this)},600)},bind:function(){var e=this;if(this.$ele.find('[data-notify="dismiss"]').on("click",function(){e.close()}),t.isFunction(e.settings.onClick)&&this.$ele.on("click",function(t){t.target!=e.$ele.find('[data-notify="dismiss"]')[0]&&e.settings.onClick.call(this,t)}),this.$ele.mouseover(function(){t(this).data("data-hover","true")}).mouseout(function(){t(this).data("data-hover","false")}),this.$ele.data("data-hover","false"),this.settings.delay>0){e.$ele.data("notify-delay",e.settings.delay);var i=setInterval(function(){var t=parseInt(e.$ele.data("notify-delay"))-e.settings.timer;if("false"===e.$ele.data("data-hover")&&"pause"===e.settings.mouse_over||"pause"!=e.settings.mouse_over){var n=(e.settings.delay-t)/e.settings.delay*100;e.$ele.data("notify-delay",t),e.$ele.find('[data-notify="progressbar"] > div').attr("aria-valuenow",n).css("width",n+"%")}t<=-e.settings.timer&&(clearInterval(i),e.close())},e.settings.timer)}},close:function(){var e=this,i=parseInt(this.$ele.css(this.settings.placement.from)),n=!1;this.$ele.attr("data-closing","true").addClass(this.settings.animate.exit),e.reposition(i),t.isFunction(e.settings.onClose)&&e.settings.onClose.call(this.$ele),this.$ele.one(this.animations.start,function(){n=!0}).one(this.animations.end,function(){t(this).remove(),t.isFunction(e.settings.onClosed)&&e.settings.onClosed.call(this)}),setTimeout(function(){n||(e.$ele.remove(),e.settings.onClosed&&e.settings.onClosed(e.$ele))},600)},reposition:function(e){var i=this,n='[data-notify-position="'+this.settings.placement.from+"-"+this.settings.placement.align+'"]:not([data-closing="true"])',r=this.$ele.nextAll(n);this.settings.newest_on_top===!0&&(r=this.$ele.prevAll(n)),r.each(function(){t(this).css(i.settings.placement.from,e),e=parseInt(e)+parseInt(i.settings.spacing)+t(this).outerHeight()})}}),t.notify=function(t,e){var n=new i(this,t,e);return n.notify},t.notifyDefaults=function(e){return n=t.extend(!0,{},n,e)},t.notifyClose=function(e){"undefined"==typeof e||"all"===e?t("[data-notify]").find('[data-notify="dismiss"]').trigger("click"):"success"===e||"info"===e||"warning"===e||"danger"===e?t(".alert-"+e+"[data-notify]").find('[data-notify="dismiss"]').trigger("click"):e?t(e+"[data-notify]").find('[data-notify="dismiss"]').trigger("click"):t('[data-notify-position="'+e+'"]').find('[data-notify="dismiss"]').trigger("click")},t.notifyCloseExcept=function(e){"success"===e||"info"===e||"warning"===e||"danger"===e?t("[data-notify]").not(".alert-"+e).find('[data-notify="dismiss"]').trigger("click"):t("[data-notify]").not(e).find('[data-notify="dismiss"]').trigger("click")}}),!function(t,e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],function(i){return e(i,t,t.document)}):"object"==typeof module&&module.exports?module.exports=e(require("jquery"),t,t.document):e(jQuery,t,t.document)}("undefined"!=typeof window?window:this,function(t,e,i,n){"use strict";function r(t,i,n,r){if(y===t&&(n=!1),C===!0)return!0;if(p[t]){if(P=!1,n&&E.before(t,f),v=1,I=h[t],Y===!1&&y>t&&r===!1&&m[t]&&(v=parseInt(f[t].outerHeight()/T.height()),I=parseInt(h[t])+(f[t].outerHeight()-T.height())),E.updateHash&&E.sectionName&&(Y!==!0||0!==t))if(history.pushState)try{history.replaceState(null,null,p[t])}catch(o){e.console&&console.warn("Scrollify warning: Page must be hosted to manipulate the hash value.")}else e.location.hash=p[t];if(Y&&(E.afterRender(),Y=!1),y=t,i)o(E.target).stop().scrollTop(I),n&&E.after(t,f);else{if(x=!0,o().velocity?o(E.target).stop().velocity("scroll",{duration:E.scrollSpeed,easing:E.easing,offset:I,mobileHA:!1}):o(E.target).stop().animate({scrollTop:I},E.scrollSpeed,E.easing),e.location.hash.length&&E.sectionName&&e.console)try{o(e.location.hash).length&&console.warn("Scrollify warning: ID matches hash value - this will cause the page to anchor.")}catch(o){}o(E.target).promise().done(function(){x=!1,Y=!1,n&&E.after(t,f)})}}}function o(t){function e(e){for(var i=0,n=t.slice(Math.max(t.length-e,1)),r=0;r<n.length;r++)i+=n[r];return Math.ceil(i/e)}var i=e(10),n=e(70);return i>=n}function s(t,e){for(var i=p.length;i>=0;i--)"string"==typeof t?p[i]===t&&(g=i,r(i,e,!0,!0)):i===t&&(g=i,r(i,e,!0,!0))}var a,l,u,c,d,h=[],p=[],f=[],m=[],g=0,y=0,v=1,b=!1,T=t(e),w=T.scrollTop(),P=!1,x=!1,_=!1,C=!1,S=[],j=(new Date).getTime(),Y=!0,k=!1,I=0,Q="onwheel"in i?"wheel":i.onmousewheel!==n?"mousewheel":"DOMMouseScroll",E={section:".section",sectionName:"section-name",interstitialSection:"",easing:"easeOutExpo",scrollSpeed:1100,offset:0,scrollbars:!0,target:"html,body",standardScrollElements:!1,setHeights:!0,overflowScroll:!0,updateHash:!0,touchScroll:!0,before:function(){},after:function(){},afterResize:function(){},afterRender:function(){}},$=function(n){function s(e){t().velocity?t(E.target).stop().velocity("scroll",{duration:E.scrollSpeed,easing:E.easing,offset:e,mobileHA:!1}):t(E.target).stop().animate({scrollTop:e},E.scrollSpeed,E.easing)}function y(e){e&&(w=T.scrollTop());var i=E.section;m=[],E.interstitialSection.length&&(i+=","+E.interstitialSection),E.scrollbars===!1&&(E.overflowScroll=!1),t(i).each(function(e){var i=t(this);E.setHeights?i.is(E.interstitialSection)?m[e]=!1:i.css("height","auto").outerHeight()<T.height()||"hidden"===i.css("overflow")?(i.css({height:T.height()}),m[e]=!1):(i.css({height:i.height()}),E.overflowScroll?m[e]=!0:m[e]=!1):i.outerHeight()<T.height()||E.overflowScroll===!1?m[e]=!1:m[e]=!0}),e&&T.scrollTop(w)}function Y(i){var n=E.section;E.interstitialSection.length&&(n+=","+E.interstitialSection),h=[],p=[],f=[],t(n).each(function(t){var i=r(this);t>0?h[t]=parseInt(i.offset().top)+E.offset:h[t]=parseInt(i.offset().top),E.sectionName&&i.data(E.sectionName)?p[t]="#"+i.data(E.sectionName).toString().replace(/ /g,"-"):i.is(E.interstitialSection)===!1?p[t]="#"+(t+1):(p[t]="#",t===r(n).length-1&&t>1&&(h[t]=h[t-1]+(parseInt(r(r(n)[t-1]).outerHeight())-parseInt(r(e).height()))+parseInt(i.outerHeight()))),f[t]=i;try{r(p[t]).length&&e.console&&console.warn("Scrollify warning: Section names can't match IDs - this will cause the browser to anchor.")}catch(r){}e.location.hash===p[t]&&(g=t,b=!0)}),!0===i&&r(g,!1,!1,!1)}function I(){return!(m[g]&&(w=T.scrollTop(),w>parseInt(h[g])))}function $(){return!(m[g]&&(w=T.scrollTop(),w<parseInt(h[g])+(f[g].outerHeight()-T.height())-28))}k=!0,t.easing.easeOutExpo=function(t,e,i,n,r){return e==r?i+n:n*(-Math.pow(2,-10*e/r)+1)+i},u={handleMousedown:function(){return C===!0||(P=!1,void(_=!1))},handleMouseup:function(){return C===!0||(P=!0,void(_&&u.calculateNearest(!1,!0)))},handleScroll:function(){return C===!0||(a&&clearTimeout(a),void(a=setTimeout(function(){return _=!0,P!==!1&&(P=!1,void u.calculateNearest(!1,!0))},200)))},calculateNearest:function(t,e){w=T.scrollTop();for(var i,n=1,o=h.length,s=0,a=Math.abs(h[0]-w);o>n;n++)i=Math.abs(h[n]-w),a>i&&(a=i,s=n);($()&&s>g||I())&&(g=s,r(s,t,e,!1))},wheelHandler:function(i){if(C===!0)return!0;if(E.standardScrollElements&&(t(i.target).is(E.standardScrollElements)||t(i.target).closest(E.standardScrollElements).length))return!0;m[g]||i.preventDefault();var n=(new Date).getTime();i=i||e.event;var s=i.originalEvent.wheelDelta||-i.originalEvent.deltaY||-i.originalEvent.detail,a=Math.max(-1,Math.min(1,s));if(S.length>149&&S.shift(),S.push(Math.abs(s)),n-j>200&&(S=[]),j=n,x)return!1;if(0>a){if(g<h.length-1&&$()){if(!o(S))return!1;i.preventDefault(),g++,x=!0,r(g,!1,!0,!1)}}else if(a>0&&g>0&&I()){if(!o(S))return!1;i.preventDefault(),g--,x=!0,r(g,!1,!0,!1)}},keyHandler:function(t){return C===!0||x!==!0&&void(38==t.keyCode||33==t.keyCode?g>0&&I()&&(t.preventDefault(),g--,r(g,!1,!0,!1)):40!=t.keyCode&&34!=t.keyCode||g<h.length-1&&$()&&(t.preventDefault(),g++,r(g,!1,!0,!1)))},init:function(){E.scrollbars?(T.on("mousedown",u.handleMousedown),T.on("mouseup",u.handleMouseup),T.on("scroll",u.handleScroll)):t("body").css({overflow:"hidden"}),T.on(Q,u.wheelHandler),T.on("keydown",u.keyHandler)}},c={touches:{touchstart:{y:-1,x:-1},touchmove:{y:-1,x:-1},touchend:!1,direction:"undetermined"},options:{distance:30,timeGap:800,timeStamp:(new Date).getTime()},touchHandler:function(e){if(C===!0)return!0;if(E.standardScrollElements&&(t(e.target).is(E.standardScrollElements)||t(e.target).closest(E.standardScrollElements).length))return!0;var i;if("undefined"!=typeof e&&"undefined"!=typeof e.touches)switch(i=e.touches[0],e.type){case"touchstart":c.touches.touchstart.y=i.pageY,c.touches.touchmove.y=-1,c.touches.touchstart.x=i.pageX,c.touches.touchmove.x=-1,c.options.timeStamp=(new Date).getTime(),c.touches.touchend=!1;case"touchmove":c.touches.touchmove.y=i.pageY,c.touches.touchmove.x=i.pageX,c.touches.touchstart.y!==c.touches.touchmove.y&&Math.abs(c.touches.touchstart.y-c.touches.touchmove.y)>Math.abs(c.touches.touchstart.x-c.touches.touchmove.x)&&(e.preventDefault(),c.touches.direction="y",c.options.timeStamp+c.options.timeGap<(new Date).getTime()&&0==c.touches.touchend&&(c.touches.touchend=!0,c.touches.touchstart.y>-1&&Math.abs(c.touches.touchmove.y-c.touches.touchstart.y)>c.options.distance&&(c.touches.touchstart.y<c.touches.touchmove.y?c.up():c.down())));break;case"touchend":c.touches[e.type]===!1&&(c.touches[e.type]=!0,c.touches.touchstart.y>-1&&c.touches.touchmove.y>-1&&"y"===c.touches.direction&&(Math.abs(c.touches.touchmove.y-c.touches.touchstart.y)>c.options.distance&&(c.touches.touchstart.y<c.touches.touchmove.y?c.up():c.down()),c.touches.touchstart.y=-1,c.touches.touchstart.x=-1,c.touches.direction="undetermined"))}},down:function(){g<h.length-1&&($()&&g<h.length-1?(g++,r(g,!1,!0,!1)):Math.floor(f[g].height()/T.height())>v?(s(parseInt(h[g])+T.height()*v),v+=1):s(parseInt(h[g])+(f[g].outerHeight()-T.height())))},up:function(){g>=0&&(I()&&g>0?(g--,r(g,!1,!0,!1)):v>2?(v-=1,s(parseInt(h[g])+T.height()*v)):(v=1,s(parseInt(h[g]))))},init:function(){i.addEventListener&&E.touchScroll&&(i.addEventListener("touchstart",c.touchHandler,!1),i.addEventListener("touchmove",c.touchHandler,!1),i.addEventListener("touchend",c.touchHandler,!1))}},d={refresh:function(t,e){clearTimeout(l),l=setTimeout(function(){y(!0),Y(e,!1),t&&E.afterResize()},400)},handleUpdate:function(){d.refresh(!1,!1)},handleResize:function(){d.refresh(!0,!1)},handleOrientation:function(){d.refresh(!0,!0)}},E=t.extend(E,n),y(!1),Y(!1,!0),!0===b?r(g,!1,!0,!0):setTimeout(function(){u.calculateNearest(!0,!1)},200),h.length&&(u.init(),c.init(),T.on("resize",d.handleResize),i.addEventListener&&e.addEventListener("orientationchange",d.handleOrientation,!1))};return $.move=function(e){return e!==n&&(e.originalEvent&&(e=t(this).attr("href")),void s(e,!1))},$.instantMove=function(t){return t!==n&&void s(t,!0)},$.next=function(){g<p.length&&(g+=1,r(g,!1,!0,!0))},$.previous=function(){g>0&&(g-=1,r(g,!1,!0,!0))},$.instantNext=function(){g<p.length&&(g+=1,r(g,!0,!0,!0))},$.instantPrevious=function(){g>0&&(g-=1,r(g,!0,!0,!0))},$.destroy=function(){return!!k&&(E.setHeights&&t(E.section).each(function(){t(this).css("height","auto")}),T.off("resize",d.handleResize),E.scrollbars&&(T.off("mousedown",u.handleMousedown),T.off("mouseup",u.handleMouseup),T.off("scroll",u.handleScroll)),T.off(Q,u.wheelHandler),T.off("keydown",u.keyHandler),i.addEventListener&&E.touchScroll&&(i.removeEventListener("touchstart",c.touchHandler,!1),i.removeEventListener("touchmove",c.touchHandler,!1),i.removeEventListener("touchend",c.touchHandler,!1)),h=[],p=[],f=[],void(m=[]))},$.update=function(){return!!k&&void d.handleUpdate()},$.current=function(){return f[g]},$.disable=function(){C=!0},$.enable=function(){C=!1,k&&u.calculateNearest(!1,!1)},$.isDisabled=function(){return C},$.setOptions=function(i){return!!k&&void("object"==typeof i?(E=t.extend(E,i),d.handleUpdate()):e.console&&console.warn("Scrollify warning: setOptions expects an object."))},t.scrollify=$,$}),!function(t){"use strict";t.fn.twittie=function(){var e=arguments[0]instanceof Object?arguments[0]:{},i="function"==typeof arguments[0]?arguments[0]:arguments[1],n=t.extend({username:null,list:null,hashtag:null,count:10,hideReplies:!1,dateFormat:"%b/%d/%Y",template:"{{date}} - {{tweet}}",apiPath:"api/tweet.php",loadingText:"Loading..."},e);n.list&&!n.username&&t.error("If you want to fetch tweets from a list, you must define the username of the list owner.");var r=function(t){var e=t.replace(/(https?:\/\/([-\w\.]+)+(:\d+)?(\/([\w\/_\.]*(\?\S+)?)?)?)/gi,'<a href="$1" target="_blank" title="Visit this link">$1</a>').replace(/#([a-zA-Z0-9_]+)/g,'<a href="https://twitter.com/search?q=%23$1&amp;src=hash" target="_blank" title="Search for #$1">#$1</a>').replace(/@([a-zA-Z0-9_]+)/g,'<a href="https://twitter.com/$1" target="_blank" title="$1 on Twitter">@$1</a>');return e},o=function(t){var e=t.split(" ");t=new Date(Date.parse(e[1]+" "+e[2]+", "+e[5]+" "+e[3]+" UTC"));for(var i=["January","February","March","April","May","June","July","August","September","October","November","December"],r={"%d":t.getDate(),"%m":t.getMonth()+1,"%b":i[t.getMonth()].substr(0,3),"%B":i[t.getMonth()],"%y":String(t.getFullYear()).slice(-2),"%Y":t.getFullYear()},o=n.dateFormat,s=n.dateFormat.match(/%[dmbByY]/g),a=0,l=s.length;l>a;a++)o=o.replace(s[a],r[s[a]]);return o},s=function(t){for(var e=n.template,i=["date","tweet","avatar","url","retweeted","screen_name","user_name"],r=0,o=i.length;o>r;r++)e=e.replace(new RegExp("{{"+i[r]+"}}","gi"),t[i[r]]);return e};this.html("<span>"+n.loadingText+"</span>");var a=this;t.getJSON(n.apiPath,{username:n.username,list:n.list,hashtag:n.hashtag,count:n.count,exclude_replies:n.hideReplies},function(t){a.find("span").fadeOut("fast",function(){a.html("<ul></ul>");for(var e=0;e<n.count;e++){var l=!1;if(t[e])l=t[e];else{if(void 0===t.statuses||!t.statuses[e])break;l=t.statuses[e]}var u={user_name:l.user.name,date:o(l.created_at),tweet:r(l.retweeted?"RT @"+l.user.screen_name+": "+l.retweeted_status.text:l.text),avatar:'<img src="'+l.user.profile_image_url+'" />',url:"https://twitter.com/"+l.user.screen_name+"/status/"+l.id_str,retweeted:l.retweeted,screen_name:r("@"+l.user.screen_name)};a.find("ul").append("<li>"+s(u)+"</li>")}"function"==typeof i&&i()})})}}(jQuery),function(t){t.fn.jflickrfeed=function(e,i){e=t.extend(!0,{flickrbase:"http://api.flickr.com/services/feeds/",feedapi:"photos_public.gne",limit:20,qstrings:{lang:"en-us",format:"json",jsoncallback:"?"},cleanDescription:!0,useTemplate:!0,itemTemplate:"",itemCallback:function(){}},e);var n=e.flickrbase+e.feedapi+"?",r=!0;for(var o in e.qstrings)r||(n+="&"),n+=o+"="+e.qstrings[o],r=!1;return t(this).each(function(){var r=t(this),o=this;t.getJSON(n,function(n){t.each(n.items,function(t,i){if(t<e.limit){if(e.cleanDescription){var n=/<p>(.*?)<\/p>/g,s=i.description;n.test(s)&&(i.description=s.match(n)[2],void 0!=i.description&&(i.description=i.description.replace("<p>","").replace("</p>","")))}if(i.image_s=i.media.m.replace("_m","_s"),i.image_t=i.media.m.replace("_m","_t"),i.image_m=i.media.m.replace("_m","_m"),i.image=i.media.m.replace("_m",""),i.image_b=i.media.m.replace("_m","_b"),delete i.media,e.useTemplate){var a=e.itemTemplate;for(var l in i){var u=new RegExp("{{"+l+"}}","g");a=a.replace(u,i[l])}r.append(a)}e.itemCallback.call(o,i)}}),t.isFunction(i)&&i.call(o,n)})})}}(jQuery),function(t){function e(t,e){return t.toFixed(e.decimals)}t.fn.countTo=function(e){return e=e||{},t(this).each(function(){function i(){c+=s,u++,n(c),"function"==typeof r.onUpdate&&r.onUpdate.call(a,c),u>=o&&(l.removeData("countTo"),clearInterval(d.interval),c=r.to,"function"==typeof r.onComplete&&r.onComplete.call(a,c))}function n(t){var e=r.formatter.call(a,t,r);l.text(e)}var r=t.extend({},t.fn.countTo.defaults,{from:t(this).data("from"),to:t(this).data("to"),speed:t(this).data("speed"),refreshInterval:t(this).data("refresh-interval"),decimals:t(this).data("decimals")},e),o=Math.ceil(r.speed/r.refreshInterval),s=(r.to-r.from)/o,a=this,l=t(this),u=0,c=r.from,d=l.data("countTo")||{};l.data("countTo",d),d.interval&&clearInterval(d.interval),d.interval=setInterval(i,r.refreshInterval),n(c)})},t.fn.countTo.defaults={from:0,to:0,speed:1e3,refreshInterval:100,decimals:0,formatter:e,onUpdate:null,onComplete:null}}(jQuery),!function(t){"use strict";function e(e,i){this.element=t(e),this.settings=t.extend({},n,i),this._defaults=n,this._init()}var i="Morphext",n={animation:"bounceIn",separator:",",speed:2e3,complete:t.noop};e.prototype={_init:function(){var e=this;this.phrases=[],this.element.addClass("morphext"),t.each(this.element.text().split(this.settings.separator),function(i,n){e.phrases.push(t.trim(n))}),this.index=-1,this.animate(),this.start()},animate:function(){this.index=++this.index%this.phrases.length,this.element[0].innerHTML='<span class="animated '+this.settings.animation+'">'+this.phrases[this.index]+"</span>",t.isFunction(this.settings.complete)&&this.settings.complete.call(this)},start:function(){var t=this;this._interval=setInterval(function(){t.animate()},this.settings.speed)},stop:function(){this._interval=clearInterval(this._interval)}},t.fn[i]=function(n){return this.each(function(){t.data(this,"plugin_"+i)||t.data(this,"plugin_"+i,new e(this,n))})}}(jQuery),!function(t,e){"function"==typeof define&&define.amd?define(["jquery"],function(t){return e(t)}):"object"==typeof exports?module.exports=e(require("jquery")):e(jQuery)}(this,function(t){var e=function(t,e){var i,n=document.createElement("canvas");t.appendChild(n),"object"==typeof G_vmlCanvasManager&&G_vmlCanvasManager.initElement(n);var r=n.getContext("2d");n.width=n.height=e.size;var o=1;window.devicePixelRatio>1&&(o=window.devicePixelRatio,n.style.width=n.style.height=[e.size,"px"].join(""),n.width=n.height=e.size*o,r.scale(o,o)),r.translate(e.size/2,e.size/2),r.rotate((-.5+e.rotate/180)*Math.PI);var s=(e.size-e.lineWidth)/2;e.scaleColor&&e.scaleLength&&(s-=e.scaleLength+2),Date.now=Date.now||function(){return+new Date};var a=function(t,e,i){i=Math.min(Math.max(-1,i||0),1);var n=0>=i;r.beginPath(),r.arc(0,0,s,0,2*Math.PI*i,n),r.strokeStyle=t,r.lineWidth=e,r.stroke()},l=function(){var t,i;r.lineWidth=1,r.fillStyle=e.scaleColor,r.save();for(var n=24;n>0;--n)n%6===0?(i=e.scaleLength,t=0):(i=.6*e.scaleLength,t=e.scaleLength-i),r.fillRect(-e.size/2+t,0,i,1),r.rotate(Math.PI/12);r.restore()},u=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(t){window.setTimeout(t,1e3/60)}}(),c=function(){e.scaleColor&&l(),e.trackColor&&a(e.trackColor,e.trackWidth||e.lineWidth,1)};this.getCanvas=function(){return n},this.getCtx=function(){return r},this.clear=function(){r.clearRect(e.size/-2,e.size/-2,e.size,e.size)},this.draw=function(t){e.scaleColor||e.trackColor?r.getImageData&&r.putImageData?i?r.putImageData(i,0,0):(c(),i=r.getImageData(0,0,e.size*o,e.size*o)):(this.clear(),c()):this.clear(),r.lineCap=e.lineCap;var n;n="function"==typeof e.barColor?e.barColor(t):e.barColor,a(n,e.lineWidth,t/100)}.bind(this),this.animate=function(t,i){var n=Date.now();e.onStart(t,i);var r=function(){var o=Math.min(Date.now()-n,e.animate.duration),s=e.easing(this,o,t,i-t,e.animate.duration);this.draw(s),e.onStep(t,i,s),o>=e.animate.duration?e.onStop(t,i):u(r)}.bind(this);u(r)}.bind(this)},i=function(t,i){var n={barColor:"#ef1e25",trackColor:"#f9f9f9",scaleColor:"#dfe0e0",scaleLength:5,lineCap:"round",lineWidth:3,trackWidth:void 0,size:110,rotate:0,animate:{duration:1e3,enabled:!0},easing:function(t,e,i,n,r){return e/=r/2,1>e?n/2*e*e+i:-n/2*(--e*(e-2)-1)+i},onStart:function(){},onStep:function(){},onStop:function(){}};if("undefined"!=typeof e)n.renderer=e;else{if("undefined"==typeof SVGRenderer)throw new Error("Please load either the SVG- or the CanvasRenderer");n.renderer=SVGRenderer}var r={},o=0,s=function(){this.el=t,this.options=r;for(var e in n)n.hasOwnProperty(e)&&(r[e]=i&&"undefined"!=typeof i[e]?i[e]:n[e],"function"==typeof r[e]&&(r[e]=r[e].bind(this)));"string"==typeof r.easing&&"undefined"!=typeof jQuery&&jQuery.isFunction(jQuery.easing[r.easing])?r.easing=jQuery.easing[r.easing]:r.easing=n.easing,"number"==typeof r.animate&&(r.animate={duration:r.animate,enabled:!0}),"boolean"!=typeof r.animate||r.animate||(r.animate={duration:1e3,enabled:r.animate}),this.renderer=new r.renderer(t,r),this.renderer.draw(o),t.dataset&&t.dataset.percent?this.update(parseFloat(t.dataset.percent)):t.getAttribute&&t.getAttribute("data-percent")&&this.update(parseFloat(t.getAttribute("data-percent")))}.bind(this);this.update=function(t){return t=parseFloat(t),r.animate.enabled?this.renderer.animate(o,t):this.renderer.draw(t),o=t,this}.bind(this),this.disableAnimation=function(){return r.animate.enabled=!1,this},this.enableAnimation=function(){return r.animate.enabled=!0,this},s()};t.fn.easyPieChart=function(e){return this.each(function(){var n;t.data(this,"easyPieChart")||(n=t.extend({},e,t(this).data()),t.data(this,"easyPieChart",new i(this,n)))})}}),!function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(t){"use strict";function e(t){if(t instanceof Date)return t;if(String(t).match(s))return String(t).match(/^[0-9]*$/)&&(t=Number(t)),String(t).match(/\-/)&&(t=String(t).replace(/\-/g,"/")),new Date(t);throw new Error("Couldn't cast `"+t+"` to a date object.")}function i(t){var e=t.toString().replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1");return new RegExp(e)}function n(t){return function(e){var n=e.match(/%(-|!)?[A-Z]{1}(:[^;]+;)?/gi);if(n)for(var o=0,s=n.length;s>o;++o){var a=n[o].match(/%(-|!)?([a-zA-Z]{1})(:[^;]+;)?/),u=i(a[0]),c=a[1]||"",d=a[3]||"",h=null;a=a[2],l.hasOwnProperty(a)&&(h=l[a],h=Number(t[h])),null!==h&&("!"===c&&(h=r(d,h)),""===c&&10>h&&(h="0"+h.toString()),e=e.replace(u,h.toString()))}return e=e.replace(/%%/,"%")}}function r(t,e){var i="s",n="";return t&&(t=t.replace(/(:|;|\s)/gi,"").split(/\,/),1===t.length?i=t[0]:(n=t[0],i=t[1])),Math.abs(e)>1?i:n}var o=[],s=[],a={precision:100,elapse:!1,defer:!1};s.push(/^[0-9]*$/.source),s.push(/([0-9]{1,2}\/){2}[0-9]{4}( [0-9]{1,2}(:[0-9]{2}){2})?/.source),s.push(/[0-9]{4}([\/\-][0-9]{1,2}){2}( [0-9]{1,2}(:[0-9]{2}){2})?/.source),s=new RegExp(s.join("|"));var l={Y:"years",m:"months",n:"daysToMonth",d:"daysToWeek",w:"weeks",W:"weeksToMonth",H:"hours",M:"minutes",S:"seconds",D:"totalDays",I:"totalHours",N:"totalMinutes",T:"totalSeconds"},u=function(e,i,n){this.el=e,this.$el=t(e),this.interval=null,this.offset={},this.options=t.extend({},a),this.firstTick=!0,this.instanceNumber=o.length,o.push(this),this.$el.data("countdown-instance",this.instanceNumber),n&&("function"==typeof n?(this.$el.on("update.countdown",n),this.$el.on("stoped.countdown",n),this.$el.on("finish.countdown",n)):this.options=t.extend({},a,n)),this.setFinalDate(i),this.options.defer===!1&&this.start()};t.extend(u.prototype,{start:function(){null!==this.interval&&clearInterval(this.interval);var t=this;this.update(),this.interval=setInterval(function(){t.update.call(t)},this.options.precision)},stop:function(){clearInterval(this.interval),this.interval=null,this.dispatchEvent("stoped")},toggle:function(){this.interval?this.stop():this.start()},pause:function(){this.stop()},resume:function(){this.start()},remove:function(){this.stop.call(this),o[this.instanceNumber]=null,delete this.$el.data().countdownInstance},setFinalDate:function(t){this.finalDate=e(t)},update:function(){if(0===this.$el.closest("html").length)return void this.remove();var t,e=new Date;return t=this.finalDate.getTime()-e.getTime(),t=Math.ceil(t/1e3),t=!this.options.elapse&&0>t?0:Math.abs(t),this.totalSecsLeft===t||this.firstTick?void(this.firstTick=!1):(this.totalSecsLeft=t,this.elapsed=e>=this.finalDate,this.offset={seconds:this.totalSecsLeft%60,minutes:Math.floor(this.totalSecsLeft/60)%60,hours:Math.floor(this.totalSecsLeft/60/60)%24,days:Math.floor(this.totalSecsLeft/60/60/24)%7,daysToWeek:Math.floor(this.totalSecsLeft/60/60/24)%7,daysToMonth:Math.floor(this.totalSecsLeft/60/60/24%30.4368),weeks:Math.floor(this.totalSecsLeft/60/60/24/7),weeksToMonth:Math.floor(this.totalSecsLeft/60/60/24/7)%4,months:Math.floor(this.totalSecsLeft/60/60/24/30.4368),years:Math.abs(this.finalDate.getFullYear()-e.getFullYear()),totalDays:Math.floor(this.totalSecsLeft/60/60/24),totalHours:Math.floor(this.totalSecsLeft/60/60),totalMinutes:Math.floor(this.totalSecsLeft/60),totalSeconds:this.totalSecsLeft},void(this.options.elapse||0!==this.totalSecsLeft?this.dispatchEvent("update"):(this.stop(),this.dispatchEvent("finish"))))},dispatchEvent:function(e){var i=t.Event(e+".countdown");i.finalDate=this.finalDate,i.elapsed=this.elapsed,i.offset=t.extend({},this.offset),i.strftime=n(this.offset),this.$el.trigger(i)}}),t.fn.countdown=function(){var e=Array.prototype.slice.call(arguments,0);return this.each(function(){var i=t(this).data("countdown-instance");if(void 0!==i){var n=o[i],r=e[0];u.prototype.hasOwnProperty(r)?n[r].apply(n,e.slice(1)):null===String(r).match(/^[$A-Z_][0-9A-Z_$]*$/i)?(n.setFinalDate.call(n,r),n.start()):t.error("Method %s does not exist on jQuery.countdown".replace(/\%s/gi,r))}else new u(this,e[0],e[1])})}}),function(t,e,i){"use strict";e.infinitescroll=function(t,i,n){this.element=e(n),this._create(t,i)||(this.failed=!0)},e.infinitescroll.defaults={loading:{finished:i,finishedMsg:"<em>Congratulations, you've reached the end of the internet.44</em>",img:"",msg:null,msgText:"<em>Loading the next set of posts...</em>",selector:null,speed:"fast",start:i},state:{isDuringAjax:!1,isInvalidPage:!1,isDestroyed:!1,isDone:!1,isPaused:!1,isBeyondMaxPage:!1,currPage:1},debug:!1,behavior:i,binder:e(t),nextSelector:"div.navigation a:first",navSelector:"div.navigation",contentSelector:null,extraScrollPx:150,itemSelector:"div.post",animate:!1,pathParse:i,dataType:"html",appendCallback:!0,bufferPx:40,errorCallback:function(){},infid:0,pixelsFromNavToBottom:i,path:i,prefill:!1,maxPage:i},e.infinitescroll.prototype={_binding:function(t){var e=this,n=e.options;return n.v="2.0b2.120520",n.behavior&&this["_binding_"+n.behavior]!==i?void this["_binding_"+n.behavior].call(this):"bind"!==t&&"unbind"!==t?(this._debug("Binding value  "+t+" not valid"),!1):("unbind"===t?this.options.binder.unbind("smartscroll.infscr."+e.options.infid):this.options.binder[t]("smartscroll.infscr."+e.options.infid,function(){e.scroll()}),void this._debug("Binding",t))},_create:function(n,r){var o=e.extend(!0,{},e.infinitescroll.defaults,n);this.options=o;var s=e(t),a=this;if(!a._validate(n))return!1;var l=e(o.nextSelector).attr("href");if(!l)return this._debug("Navigation selector not found"),!1;o.path=o.path||this._determinepath(l),o.contentSelector=o.contentSelector||this.element,o.loading.selector=o.loading.selector||o.contentSelector,o.loading.msg=o.loading.msg||e('<div id="infscr-loading"><img alt="Loading..." src="'+o.loading.img+'" /><div>'+o.loading.msgText+"</div></div>"),(new Image).src=o.loading.img,o.pixelsFromNavToBottom===i&&(o.pixelsFromNavToBottom=e(document).height()-e(o.navSelector).offset().top,this._debug("pixelsFromNavToBottom: "+o.pixelsFromNavToBottom));var u=this;return o.loading.start=o.loading.start||function(){e(o.navSelector).hide(),o.loading.msg.appendTo(o.loading.selector).show(o.loading.speed,e.proxy(function(){this.beginAjax(o)},u))},o.loading.finished=o.loading.finished||function(){o.state.isBeyondMaxPage||o.loading.msg.fadeOut(o.loading.speed)},o.callback=function(t,n,a){o.behavior&&t["_callback_"+o.behavior]!==i&&t["_callback_"+o.behavior].call(e(o.contentSelector)[0],n,a),r&&r.call(e(o.contentSelector)[0],n,o,a),o.prefill&&s.bind("resize.infinite-scroll",t._prefill)},n.debug&&(!Function.prototype.bind||"object"!=typeof console&&"function"!=typeof console||"object"!=typeof console.log||["log","info","warn","error","assert","dir","clear","profile","profileEnd"].forEach(function(t){console[t]=this.call(console[t],console)},Function.prototype.bind)),this._setup(),o.prefill&&this._prefill(),!0},_prefill:function(){function i(){return n.options.contentSelector.height()<=r.height()}var n=this,r=e(t);this._prefill=function(){i()&&n.scroll(),r.bind("resize.infinite-scroll",function(){i()&&(r.unbind("resize.infinite-scroll"),n.scroll())})},this._prefill()},_debug:function(){!0===this.options.debug&&("undefined"!=typeof console&&"function"==typeof console.log?1===Array.prototype.slice.call(arguments).length&&"string"==typeof Array.prototype.slice.call(arguments)[0]?console.log(Array.prototype.slice.call(arguments).toString()):console.log(Array.prototype.slice.call(arguments)):Function.prototype.bind||"undefined"==typeof console||"object"!=typeof console.log||Function.prototype.call.call(console.log,console,Array.prototype.slice.call(arguments)))},_determinepath:function(t){var e=this.options;if(e.behavior&&this["_determinepath_"+e.behavior]!==i)return this["_determinepath_"+e.behavior].call(this,t);if(e.pathParse)return this._debug("pathParse manual"),e.pathParse(t,this.options.state.currPage+1);if(t.match(/^(.*?)\b2\b(.*?$)/))t=t.match(/^(.*?)\b2\b(.*?$)/).slice(1);else if(t.match(/^(.*?)2(.*?$)/)){if(t.match(/^(.*?page=)2(\/.*|$)/))return t=t.match(/^(.*?page=)2(\/.*|$)/).slice(1);t=t.match(/^(.*?)2(.*?$)/).slice(1)}else{if(t.match(/^(.*?page=)1(\/.*|$)/))return t=t.match(/^(.*?page=)1(\/.*|$)/).slice(1);this._debug("Sorry, we couldn't parse your Next (Previous Posts) URL. Verify your the css selector points to the correct A tag. If you still get this error: yell, scream, and kindly ask for help at infinite-scroll.com."),e.state.isInvalidPage=!0}return this._debug("determinePath",t),t},_error:function(t){var e=this.options;return e.behavior&&this["_error_"+e.behavior]!==i?void this["_error_"+e.behavior].call(this,t):("destroy"!==t&&"end"!==t&&(t="unknown"),this._debug("Error",t),("end"===t||e.state.isBeyondMaxPage)&&this._showdonemsg(),e.state.isDone=!0,e.state.currPage=1,e.state.isPaused=!1,e.state.isBeyondMaxPage=!1,void this._binding("unbind"))},_loadcallback:function(n,r,o){var s,a=this.options,l=this.options.callback,u=a.state.isDone?"done":a.appendCallback?"append":"no-append";if(a.behavior&&this["_loadcallback_"+a.behavior]!==i)return void this["_loadcallback_"+a.behavior].call(this,n,r);switch(u){case"done":return this._showdonemsg(),!1;case"no-append":"html"===a.dataType&&(r="<div>"+r+"</div>",r=e(r).find(a.itemSelector));break;case"append":var c=n.children();if(0===c.length)return this._error("end");for(s=document.createDocumentFragment();n[0].firstChild;)s.appendChild(n[0].firstChild);this._debug("contentSelector",e(a.contentSelector)[0]),e(a.contentSelector)[0].appendChild(s),r=c.get()}if(a.loading.finished.call(e(a.contentSelector)[0],a),a.animate){var d=e(t).scrollTop()+e(a.loading.msg).height()+a.extraScrollPx+"px";e("html,body").animate({scrollTop:d},800,function(){a.state.isDuringAjax=!1})}a.animate||(a.state.isDuringAjax=!1),l(this,r,o),a.prefill&&this._prefill()},_nearbottom:function(){var n=this.options,r=0+e(document).height()-n.binder.scrollTop()-e(t).height();return n.behavior&&this["_nearbottom_"+n.behavior]!==i?this["_nearbottom_"+n.behavior].call(this):(this._debug("math:",r,n.pixelsFromNavToBottom),r-n.bufferPx<n.pixelsFromNavToBottom)},_pausing:function(t){var e=this.options;if(e.behavior&&this["_pausing_"+e.behavior]!==i)return void this["_pausing_"+e.behavior].call(this,t);switch("pause"!==t&&"resume"!==t&&null!==t&&this._debug("Invalid argument. Toggling pause value instead"),t=!t||"pause"!==t&&"resume"!==t?"toggle":t){case"pause":e.state.isPaused=!0;break;case"resume":e.state.isPaused=!1;break;case"toggle":e.state.isPaused=!e.state.isPaused}return this._debug("Paused",e.state.isPaused),!1},_setup:function(){var t=this.options;return t.behavior&&this["_setup_"+t.behavior]!==i?void this["_setup_"+t.behavior].call(this):(this._binding("bind"),!1)},_showdonemsg:function(){var t=this.options;return t.behavior&&this["_showdonemsg_"+t.behavior]!==i?void this["_showdonemsg_"+t.behavior].call(this):(t.loading.msg.find("img").hide().parent().find("div").html(t.loading.finishedMsg).animate({opacity:1},2e3,function(){e(this).parent().fadeOut(t.loading.speed)}),void t.errorCallback.call(e(t.contentSelector)[0],"done"))},_validate:function(t){for(var i in t)if(i.indexOf&&i.indexOf("Selector")>-1&&0===e(t[i]).length)return this._debug("Your "+i+" found no elements."),!1;return!0},bind:function(){this._binding("bind")},destroy:function(){return this.options.state.isDestroyed=!0,this.options.loading.finished(),this._error("destroy")},pause:function(){this._pausing("pause")},resume:function(){this._pausing("resume")},beginAjax:function(t){var n,r,o,s,a=this,l=t.path;if(t.state.currPage++,t.maxPage!=i&&t.state.currPage>t.maxPage)return t.state.isBeyondMaxPage=!0,void this.destroy();switch(n=e(e(t.contentSelector).is("table, tbody")?"<tbody/>":"<div/>"),r="function"==typeof l?l(t.state.currPage):l.join(t.state.currPage),a._debug("heading into ajax",r),o="html"===t.dataType||"json"===t.dataType?t.dataType:"html+callback",t.appendCallback&&"html"===t.dataType&&(o+="+callback"),o){case"html+callback":a._debug("Using HTML via .load() method"),n.load(r+" "+t.itemSelector,i,function(t){a._loadcallback(n,t,r)});break;case"html":a._debug("Using "+o.toUpperCase()+" via $.ajax() method"),e.ajax({url:r,dataType:t.dataType,complete:function(t,e){s="undefined"!=typeof t.isResolved?t.isResolved():"success"===e||"notmodified"===e,s?a._loadcallback(n,t.responseText,r):a._error("end")}});break;case"json":a._debug("Using "+o.toUpperCase()+" via $.ajax() method"),e.ajax({dataType:"json",type:"GET",url:r,success:function(e,o,l){if(s="undefined"!=typeof l.isResolved?l.isResolved():"success"===o||"notmodified"===o,t.appendCallback)if(t.template!==i){var u=t.template(e);n.append(u),s?a._loadcallback(n,u):a._error("end")}else a._debug("template must be defined."),a._error("end");else s?a._loadcallback(n,e,r):a._error("end")},error:function(){a._debug("JSON ajax request failed."),a._error("end")}})}},retrieve:function(t){t=t||null;var n=this,r=n.options;return r.behavior&&this["retrieve_"+r.behavior]!==i?void this["retrieve_"+r.behavior].call(this,t):r.state.isDestroyed?(this._debug("Instance is destroyed"),!1):(r.state.isDuringAjax=!0,void r.loading.start.call(e(r.contentSelector)[0],r))},scroll:function(){var t=this.options,e=t.state;return t.behavior&&this["scroll_"+t.behavior]!==i?void this["scroll_"+t.behavior].call(this):void(e.isDuringAjax||e.isInvalidPage||e.isDone||e.isDestroyed||e.isPaused||this._nearbottom()&&this.retrieve())},toggle:function(){this._pausing()},unbind:function(){this._binding("unbind")},update:function(t){e.isPlainObject(t)&&(this.options=e.extend(!0,this.options,t))}},e.fn.infinitescroll=function(t,i){var n=typeof t;switch(n){case"string":var r=Array.prototype.slice.call(arguments,1);this.each(function(){var i=e.data(this,"infinitescroll");return i&&e.isFunction(i[t])&&"_"!==t.charAt(0)?void i[t].apply(i,r):!1});break;case"object":this.each(function(){var n=e.data(this,"infinitescroll");n?n.update(t):(n=new e.infinitescroll(t,i,this),n.failed||e.data(this,"infinitescroll",n))})}return this};var n,r=e.event;r.special.smartscroll={setup:function(){e(this).bind("scroll",r.special.smartscroll.handler)},teardown:function(){e(this).unbind("scroll",r.special.smartscroll.handler)},handler:function(t,i){var r=this,o=arguments;t.type="smartscroll",n&&clearTimeout(n),n=setTimeout(function(){e(r).trigger("smartscroll",o)},"execAsap"===i?0:100)}},e.fn.smartscroll=function(t){return t?this.bind("smartscroll",t):this.trigger("smartscroll",["execAsap"])}}(window,jQuery),!function(t){t.fn.hover3d=function(e){var i=t.extend({selector:null,perspective:1e3,sensitivity:20,invert:!1,shine:!1,hoverInClass:"hover-in",hoverOutClass:"hover-out",hoverClass:"hover-3d"},e);return this.each(function(){function e(){s.addClass(i.hoverInClass+" "+i.hoverClass),currentX=currentY=0,setTimeout(function(){s.removeClass(i.hoverInClass)},1e3)}function n(t){var e=s.innerWidth(),n=s.innerHeight(),r=Math.round(t.pageX-s.offset().left),o=Math.round(t.pageY-s.offset().top),l=i.invert?(e/2-r)/i.sensitivity:-(e/2-r)/i.sensitivity,u=i.invert?-(n/2-o)/i.sensitivity:(n/2-o)/i.sensitivity,c=r-e/2,d=o-n/2,h=Math.atan2(d,c),p=180*h/Math.PI-90;0>p&&(p+=360),s.css({perspective:i.perspective+"px",transformStyle:"preserve-3d",transform:"rotateY("+l+"deg) rotateX("+u+"deg)"}),a.css("background","linear-gradient("+p+"deg, rgba(255,255,255,"+t.offsetY/n*.5+") 0%,rgba(255,255,255,0) 80%)")}function r(){s.addClass(i.hoverOutClass+" "+i.hoverClass),s.css({perspective:i.perspective+"px",transformStyle:"preserve-3d",transform:"rotateX(0) rotateY(0)"}),setTimeout(function(){s.removeClass(i.hoverOutClass+" "+i.hoverClass),currentX=currentY=0},1e3)}var o=t(this),s=o.find(i.selector);currentX=0,currentY=0,i.shine&&s.append('<div class="shine"></div>');var a=t(this).find(".shine");o.css({perspective:i.perspective+"px",transformStyle:"preserve-3d"}),s.css({perspective:i.perspective+"px",transformStyle:"preserve-3d"}),a.css({position:"absolute",top:0,left:0,bottom:0,right:0,transform:"translateZ(1px)","z-index":9}),o.on("mouseenter",function(){return e()}),o.on("mousemove",function(t){return n(t)}),o.on("mouseleave",function(){return r()})})}}(jQuery);var INSPIRO={},$=jQuery.noConflict();(function($){"use strict";var $window=$(window),$body=$('body'),$wrapper=$('#wrapper'),$section=$('section'),$pageContent=$('#page-content'),$pageTitle=$('#page-title'),$topbar=$('#topbar'),$header=$('#header'),$headerCurrentClasses=$header.attr('class'),logo=$('#logo').find('.logo'),logoImg=logo.find('img').attr('src'),logoDark=logo.attr('data-dark-logo'),$mainmenu=$('#mainMenu'),$mainmenuitems=$mainmenu.find('li.dropdown > a'),$mainsubmenuitems=$mainmenu.find('li.dropdown-submenu > a, li.dropdown-submenu > span'),$dotsMenu=$('#dotsMenu'),$dotsMenuItems=$dotsMenu.find("ul > li > a"),$pageMenu=$('.page-menu'),sidePanel=$('#side-panel'),sidePanellogo=$('#panel-logo').find('.logo'),sidePanellogoImg=sidePanellogo.find('img').attr('src'),sidePanellogoDark=sidePanellogo.attr('data-dark-logo'),$footer=$('#footer'),$footerStickyClass=$(".footer-sticky"),fullScreenPanel=$('#fullscreen-panel'),$topSearch=$('#top-search'),$parallax=$('[data-parallax-image]'),$textRotator=$('.text-rotator'),$fullScreen=$('.fullscreen')||$('.section-fullscreen'),$halfScreen=$('.halfscreen'),$slider=$('#slider'),$carousel=$('.carousel'),$carouselIcons=['<i class="fa fa-angle-left"></i>','<i class="fa fa-angle-right"></i>'],$flickity=$('.carousell'),$equalize=$('.equalize'),$gridLayout=$(".grid-layout"),$gridFilter=$(".grid-filter"),dataAnimation=$("[data-animation]"),$counter=$('.counter:not(.counter-instant)'),$countdownTimer=$('.countdown'),$progressBar=$('.progress-bar'),$pieChart=$('.pie-chart'),$map=$('.map'),accordionType="accordion",toogleType="toggle",accordionItem="ac-item",itemActive="ac-active",itemTitle="ac-title",itemContent="ac-content",$lightbox_gallery=$('[data-lightbox="gallery"]'),$lightbox_image=$('[data-lightbox="image"]'),$lightbox_iframe=$('[data-lightbox="iframe"]'),$lightbox_ajax=$('[data-lightbox="ajax"]'),$lightbox_inline=$('[data-lightbox="inline"]'),$widget_twitter=$('.widget-tweeter')||$('.widget-twitter'),$flickr_widget=$('.flickr-widget'),$ytPlayer=$('.youtube-background'),$pinOnScroll=$('.pinOnScroll'),$contactForm=$(".widget-contact-form"),$subscribeForm=$(".widget-subscribe-form"),$goToTop=$('#goToTop'),classFinder=".";if($header.length>0){var $headerOffsetTop=$header.offset().top;}
INSPIRO.core={functions:function(){INSPIRO.core.pageLoader();INSPIRO.core.responsiveClasses();INSPIRO.core.goToTop();INSPIRO.core.screenSizeControl();INSPIRO.core.rtlStatus();INSPIRO.core.customHeight();INSPIRO.core.equalize();INSPIRO.core.stickyFooter();INSPIRO.core.detectTouchDevices();},detectTouchDevices:function(){return 'ontouchstart'in window||navigator.maxTouchPoints;},responsiveClasses:function(){if(typeof jRespond==='undefined'){console.log('responsiveClasses: jRespond plugin is missing.');return true;}
var jRes=jRespond([{label:'smallest',enter:0,exit:479},{label:'handheld',enter:480,exit:767},{label:'tablet',enter:768,exit:991},{label:'laptop',enter:992,exit:1199},{label:'desktop',enter:1200,exit:10000}]);jRes.addFunc([{breakpoint:'desktop',enter:function(){$body.addClass('device-lg');},exit:function(){$body.removeClass('device-lg');}},{breakpoint:'laptop',enter:function(){$body.addClass('device-md');},exit:function(){$body.removeClass('device-md');}},{breakpoint:'tablet',enter:function(){$body.addClass('device-sm');},exit:function(){$body.removeClass('device-sm');}},{breakpoint:'handheld',enter:function(){$body.addClass('device-xs');},exit:function(){$body.removeClass('device-xs');}},{breakpoint:'smallest',enter:function(){$body.addClass('device-xxs');},exit:function(){$body.removeClass('device-xxs');}}]);},goToTop:function(){if($goToTop.length>0){var scrollOffset=$body.attr('data-offset')||50;if($window.scrollTop()>scrollOffset){$goToTop.css({'bottom':'26px','opacity':1});}else{$goToTop.css({'bottom':'0px','opacity':0});}
$goToTop.click(function(){$('body,html').stop(true).animate({'scrollTop':0},1500,'easeInOutExpo');return false;});}},pageLoader:function(){if(!$().animsition){console.log('pageLoader: animsition plugin is missing.');return true;}
if(!$body.hasClass('no-page-loader').length){$body.addClass("no-page-loader");setTimeout(function(){if($(".animsition-loading").length){$body.addClass("no-page-loader");$(".animsition-loading").hide();}},10000);}},screenSizeControl:function(){if($fullScreen.length>0){$fullScreen.each(function(){var $elem=$(this),elemHeight=$window.height();if($body.hasClass('device-lg')||$body.hasClass('device-md')){$elem.css('height',elemHeight);}else{$elem.css('height',elemHeight);}});}
if($halfScreen.length>0){$halfScreen.each(function(){var $elem=$(this),elemHeight=$window.height();$elem.css('height',elemHeight/1.5);});}},rtlStatus:function(){var $rtlStatusCheck=$("html").attr("dir");var $rtlStatus=false;if($rtlStatusCheck=="rtl"){$('head').append('<link rel="stylesheet" type="text/css" href="css/rtl.css">');$rtlStatus=true;}else{$rtlStatus=false;}},customHeight:function(){var $customHeightXxs=$('[data-height-xxs]'),$customHeightXs=$('[data-height-xs]'),$customHeightSm=$('[data-height-sm]'),$customHeightMd=$('[data-height-md]'),$customHeightLg=$('[data-height-lg]');if($customHeightXxs.length>0){$customHeightXxs.each(function(){var element=$(this),elementHeight=element.attr('data-height-xxs');if($body.hasClass('device-xxs')){if(elementHeight!==''){element.css('height',elementHeight);}}});}
if($customHeightXs.length>0){$customHeightXs.each(function(){var element=$(this),elementHeight=element.attr('data-height-xs');if($body.hasClass('device-xs')){if(elementHeight!==''){element.css('height',elementHeight);}}});}
if($customHeightSm.length>0){$customHeightSm.each(function(){var element=$(this),elementHeight=element.attr('data-height-sm');if($body.hasClass('device-sm')){if(elementHeight!==''){element.css('height',elementHeight);}}});}
if($customHeightMd.length>0){$customHeightMd.each(function(){var element=$(this),elementHeight=element.attr('data-height-md');if($body.hasClass('device-md')){if(elementHeight!==''){element.css('height',elementHeight);}}});}
if($customHeightLg.length>0){$customHeightLg.each(function(){var element=$(this),elementHeight=element.attr('data-height-lg');if($body.hasClass('device-lg')){if(elementHeight!==''){element.css('height',elementHeight);}}});}},equalize:function(){if($equalize.length>0){$equalize.each(function(){var elem=$(this),selectorItem=elem.find(elem.attr('data-equalize-item'))||"> div",maxHeight=0;selectorItem.each(function(){if($(this).height()>maxHeight){maxHeight=$(this).outerHeight();}});selectorItem.height(maxHeight);});}},stickyFooter:function(){if($footerStickyClass.length>0){if($body.hasClass('device-lg')||$body.hasClass('device-md')){var elemOuterHeight=$footerStickyClass.outerHeight();setTimeout(function(){$footerStickyClass.addClass("footer-sticky-active");},1000);$wrapper.css({'margin-bottom':elemOuterHeight,'z-index':1});}else{$wrapper.css({'margin-bottom':0});$footerStickyClass.removeClass("footer-sticky-active");}}}};INSPIRO.header={functions:function(){INSPIRO.header.logoStatus();INSPIRO.header.stickyHeader();INSPIRO.header.topBar();INSPIRO.header.topSearch();INSPIRO.header.mainMenu();INSPIRO.header.pageTitle();INSPIRO.header.pageMenu();INSPIRO.header.sidePanel();INSPIRO.header.dotsMenu();INSPIRO.header.onepageMenu();},logoStatus:function(){if(!$body.is('.device-lg, .device-md, .menu-overlay-active')&&$header.is('.dark.header-transparent, .dark.header-colored-transparent, .dark.header-colored')){logo.find('img').attr('src',logoImg);}else if($header.hasClass('dark')){if(logoDark){logo.find('img').attr('src',logoDark);}else{logo.find('img').attr('src',logoImg);}}else{logo.find('img').attr('src',logoImg);}},stickyHeader:function(){var elem=$(this),shrinkHeader=elem.attr('data-shrink')||0,shrinkHeaderActive=elem.attr('data-sticky-active')||200,scrollOnTop=$window.scrollTop();if($header.hasClass("header-modern")){shrinkHeader=300;}
if(!$header.is(".header-no-sticky, .header-static")){if($header.hasClass("header-sticky-resposnive")||$body.is('.device-lg, .device-md')){if(scrollOnTop>$headerOffsetTop+shrinkHeader){$("#header").addClass('header-sticky');if(scrollOnTop>$headerOffsetTop+shrinkHeaderActive){if(!$body.is(".overlay-menu")&&$header.is(".header-transparent:not(.header-modern), .header-colored, .header-colored-transparent")){$header.addClass('sticky-active').removeClass("dark");}else{$header.addClass('sticky-active');}}}else{$header.removeClass().addClass($headerCurrentClasses);INSPIRO.header.logoStatus();}}}},topBar:function(){if($topbar.length>0){$("#topbar .topbar-dropdown .topbar-form").each(function(index,element){if($window.width()-($(element).width()+$(element).offset().left)<0){$(element).addClass('dropdown-invert');}});}},topSearch:function(){$("#top-search-trigger").on("click",function(){$body.toggleClass('top-search-active');$topSearch.find('input').focus();return false;});},mainMenu:function(){if($mainmenu.length>0){if($body.is('.device-lg, .device-md')){$("#mainMenu.menu-onclick nav > ul > li > a, .dropdown-submenu > a, .dropdown-submenu > span").on('click',function(e){$(this).parent('li').siblings().removeClass('hover-active');$(this).parent('li').toggleClass('hover-active');return false;});}else{$("#mainMenu nav > ul > li > a, .dropdown-submenu > a, .dropdown-submenu > span").on('click',function(e){$(this).parent('li').siblings().removeClass('hover-active');$(this).parent('li').toggleClass('hover-active');});}
$("#mainMenu-trigger button").click(function(){$body.toggleClass("mainMenu-open");$(this).toggleClass("toggle-active");if($body.hasClass("mainMenu-open")){$header.find("#mainMenu").css("max-height",$window.height()-$header.height());}else{$header.find("#mainMenu").css("max-height",0);}
return false;});$('#mainMenu a').on('click',function(){if($body.hasClass("mainMenu-open")){$header.find("#mainMenu").css("max-height",0);$body.removeClass("mainMenu-open")
$('#mainMenu-trigger .lines-button').removeClass('toggle-active');}});if($body.is('.device-lg, .device-md')){$('.dropdown:not(.mega-menu-item) ul ul').each(function(index,element){if($window.width()-($(element).width()+$(element).offset().left)<0){$(element).addClass('menu-invert');}});}}},pageTitle:function(){if($pageTitle.length>0){}},pageMenu:function(){if($pageMenu.length>0){$pageMenu.each(function(){if($pageMenu.hasClass("slide-menu")){$pageMenu.addClass("slide-menu-version");$("#menu-responsive-icon").on("click",function(){$pageMenu.toggleClass("page-menu-active");$pageMenu.toggleClass("items-visible");});}else{$("#menu-responsive-icon").on("click",function(){$pageMenu.toggleClass("page-menu-active");$pageMenu.toggleClass("items-visible");});}});}},sidePanel:function(){if(sidePanel.length>0){$("#wrapper, #close-panel").on("click",function(){$body.removeClass("side-panel-active");$("#side-panel-trigger").removeClass("toggle-active");});setTimeout(function(){INSPIRO.elements.gridLayoutRefresh();},1000);}},dotsMenu:function(){if($dotsMenu.length>0){$dotsMenuItems.on('click',function(){$dotsMenuItems.parent("li").removeClass('current');$(this).parent("li").addClass('current');return false;});$dotsMenuItems.parents("li").removeClass('current');$dotsMenu.find('a[href="#'+INSPIRO.header.currentSection()+'"]').parent("li").addClass('current');}},onepageMenu:function(){if($mainmenu.hasClass("menu-one-page")){$mainmenu.find("nav > ul > li > a").parents("li").removeClass('current');$mainmenu.find('nav > ul > li > a[href="#'+INSPIRO.header.currentSection()+'"]').parent("li").addClass('current');}},currentSection:function(){var elemCurrent="body";$section.each(function(){var elem=$(this),elemeId=elem.attr("id");if((elem.offset().top-$window.height()/3<$window.scrollTop())&&(elem.offset().top+elem.height()-$window.height()/3>$window.scrollTop())){elemCurrent=elemeId;}});return elemCurrent;}};INSPIRO.slider={functions:function(){INSPIRO.slider.sliderScreenSizeControl();INSPIRO.slider.inspiroSlider();INSPIRO.slider.carousel();},sliderScreenSizeControl:function(){if($(".inspiro-slider").length>0){var headerHeight=$header.height(),topbarHeight=$topbar.height(),windowHeight=$window.height(),screenHeightExtra=headerHeight+topbarHeight,sliderFullscreen=$('#slider').hasClass('slider-fullscreen'),screenRatio=$('#slider').hasClass('slider-fullscreen')?1:1.28,transparentHeader=$header.hasClass("header-transparent")||$header.hasClass("header-light-transparent")||$header.hasClass("header-dark-transparent")||$header.hasClass("header-colored-transparent")||$header.hasClass("header-modern"),sliderTargetElements=$(".inspiro-slider, .inspiro-slider .owl-stage-outer, .inspiro-slider .owl-stage, .inspiro-slider .slide"),customHeight=$(".inspiro-slider").data("height"),responsiveHeightxs=$(".inspiro-slider").data("height-xs");if($body.hasClass('device-lg')||$body.hasClass('device-md')||$body.hasClass('device-sm')){if(transparentHeader){if(sliderFullscreen){sliderTargetElements.css('height',windowHeight+'px');}else{if(!$header.hasClass(".header-transparent")){$(".inspiro-slider .slide").css('padding-top',screenHeightExtra+'px');}
if(!customHeight){sliderTargetElements.css('height',windowHeight/screenRatio+'px');}else{sliderTargetElements.css('height',customHeight+'px');}}}else{if(sliderFullscreen){sliderTargetElements.css('height',windowHeight-screenHeightExtra+'px');}else{sliderTargetElements.css('height',windowHeight/screenRatio-screenHeightExtra+'px');}
if(customHeight){sliderTargetElements.css('height',customHeight+'px');}}}else{sliderTargetElements.css('height',responsiveHeightxs+'px');}}},inspiroSlider:function(){if(!$().owlCarousel){console.log('inspiroSlider: owlCarousel plugin is missing.');return true;}
if($(".inspiro-slider").length>0){$(".inspiro-slider").each(function(){var elem=$(this),carouselNav=elem.attr('data-arrows'),carouselDots=elem.attr('data-dots')||true,carouselAutoPlay=elem.attr('data-autoplay')||false,carouselAutoplayTimeout=elem.attr('data-autoplay-timeout')||5000,carouseAnimateIn=elem.attr('data-animate-in')||false,carouseAnimateOut=elem.attr('data-animate-out')||false,carouselLoop=elem.attr('data-loop')||false,carouselMargin=elem.attr('data-margin')||0,carouselVideo=elem.attr('data-video')||true,carouselItems=elem.attr('data-items')||4,carouselSmartSpeed=elem.attr('data-smart-speed')||1300,carouselItemsLg=elem.attr('data-items-lg')||Number(carouselItems),carouselItemsMd=elem.attr('data-items-md')||Number(carouselItemsLg),carouselItemsSm=elem.attr('data-items-sm')||Number(carouselItemsMd),carouselItemsXs=elem.attr('data-items-xs')||Number(carouselItemsSm),carouselItemsXxs=elem.attr('data-items-xxs')||Number(carouselItemsXs);if(carouselNav=='false'){carouselNav=false;}else{carouselNav=true;}
if(carouselDots=='false'){carouselDots=false;}else{carouselDots=true;}
if(elem.find('.slide').length>1){var t=setTimeout(function(){elem.owlCarousel({nav:carouselNav,dots:carouselDots,navText:$carouselIcons,autoplay:carouselAutoPlay,autoplayTimeout:carouselAutoplayTimeout,autoplayHoverPause:false,loop:carouselLoop,margin:Number(carouselMargin),smartSpeed:Number(carouselSmartSpeed),video:carouselVideo,animateIn:carouseAnimateIn,animateOut:carouseAnimateOut,rtl:INSPIRO.core.rtlStatus(),items:1,callbacks:true,onInitialize:function(event){setTimeout(function(){elem.find(".owl-item:not(.active) .slide > video").each(function(){this.pause();});elem.find(".owl-item.active .slide .kenburns-bg").addClass("kenburns-bg-animate");elem.addClass("slider-loaded");},100);}});var $captions=elem.find('.slide-captions > *');$captions.each(function(){var $captionElem=$(this);var animationDuration="600ms";if($(this).data("animation-duration")){animationDuration=$(this).data("animation-duration")+"ms";}
$(this).css("animation-duration",animationDuration);$captionElem.addClass('slide-caption-hide');});$captions.each(function(index){var $captionElem=$(this),captionDelay=$captionElem.data("caption-delay")||index*80,captionAnimation=$captionElem.data('caption-animation')||"fadeInUp";setTimeout(function(){$captionElem.removeClass('slide-caption-hide').addClass(captionAnimation);},captionDelay);});elem.on('changed.owl.carousel',function(property){var current=property.item.index,currentSlide=$(property.target).find(".owl-item").eq(current),currentSlideCaptions=currentSlide.find(".slide-captions > *"),currentSlideDark=currentSlide.find(".slide").hasClass("slide-dark"),currentSlideKenburns=currentSlide.find(".slide").hasClass("kenburns");if(currentSlideKenburns){$(this).find(".kenburns-bg").addClass("kenburns-bg-animate");}
currentSlideCaptions.each(function(index){var $captionElem=$(this),captionDelay=$captionElem.data("caption-delay")||(index*350+1000),captionAnimation=$captionElem.data('caption-animation')||"fadeInUp";setTimeout(function(){$captionElem.removeClass('slide-caption-hide').addClass(captionAnimation);},captionDelay);});if($window.width()>992){if(currentSlide.find("video").length>0){setTimeout(function(){currentSlide.find(".slide video").get(0).play();},1000);}}});elem.on('change.owl.carousel',function(property){var current=property.item.index,currentSlide=$(property.target).find(".owl-item").eq(current),currentSlideCaptions=$(property.target).find(".owl-item:not(.active)").find(".slide-captions > *"),currentSlideKenburns=currentSlide.find(".slide").hasClass("kenburns");currentSlideCaptions.each(function(){var $captionElem=$(this),captionAnimation=$captionElem.data('caption-animation')||"fadeInUp";$captionElem.removeClass(captionAnimation).addClass('slide-caption-hide');});elem.find(".slide video").each(function(){this.pause();});if(currentSlideKenburns){$(this).find(".kenburns-bg").removeClass("kenburns-bg-animate");}});},0);}else{elem.addClass("slider-loaded");setTimeout(function(){elem.find('.slide').find(".kenburns-bg").addClass("kenburns-bg-animate");},200);}});}},carouselAjax:function(){if(!$().owlCarousel){console.log('carouselAjax: owlCarousel plugin is missing.');return true;}
var carousel=$(".carousel"),carouselNav=carousel.attr('data-arrows'),carouselDots=carousel.attr('data-dots')||true,carouselAutoPlay=carousel.attr('data-autoplay')||false,carouselAutoplayTimeout=carousel.attr('data-autoplay-timeout')||5000,carouseAnimateIn=carousel.attr('data-animate-in')||false,carouseAnimateOut=carousel.attr('data-animate-out')||false,carouselLoop=carousel.attr('data-loop')||false,carouselMargin=carousel.attr('data-margin')||0,carouselVideo=carousel.attr('data-video')||true,carouselItems=carousel.attr('data-items')||4,carouselItemsLg=carousel.attr('data-items-lg')||Number(carouselItems),carouselItemsMd=carousel.attr('data-items-md')||Number(carouselItemsLg),carouselItemsSm=carousel.attr('data-items-sm')||Number(carouselItemsMd),carouselItemsXs=carousel.attr('data-items-xs')||Number(carouselItemsSm),carouselItemsXxs=carousel.attr('data-items-xxs')||Number(carouselItemsXs);if(carouselNav=='false'){carouselNav=false;}else{carouselNav=true;}
if(carouselDots=='false'){carouselDots=false;}else{carouselDots=true;}
carousel.owlCarousel({nav:carouselNav,dots:carouselDots,navText:$carouselIcons,autoplay:carouselAutoPlay,autoplayTimeout:carouselAutoplayTimeout,autoplayHoverPause:true,loop:carouselLoop,margin:Number(carouselMargin),smartSpeed:Number(1000),video:carouselVideo,animateIn:carouseAnimateIn,animateOut:carouseAnimateOut,rtl:INSPIRO.core.rtlStatus(),onInitialize:function(event){carousel.addClass("carousel-loaded owl-carousel");},responsive:{0:{items:Number(carouselItemsXxs),nav:true,dots:true,},480:{items:Number(carouselItemsXs),nav:true,dots:true,},768:{items:Number(carouselItemsSm),nav:true,dots:true,},992:{items:Number(carouselItemsMd),nav:true,dots:true,},1200:{items:Number(carouselItemsLg),nav:carouselNav,dots:carouselDots,}}});},carousel:function(){if(!$().owlCarousel){console.log('carousel: owlCarousel plugin is missing.');return true;}
if($carousel.length>0){$carousel.each(function(){var elem=$(this),carouselNav=elem.attr('data-arrows'),carouselDots=elem.attr('data-dots')||true,carouselAutoHeight=elem.attr('data-autoHeight')||false,carouselAutoPlay=elem.attr('data-autoplay')||false,carouselAutoplayTimeout=elem.attr('data-autoplay-timeout')||5000,carouselAutoWidth=elem.attr('data-auto-width')||false,carouseAnimateIn=elem.attr('data-animate-in')||false,carouseAnimateOut=elem.attr('data-animate-out')||false,carouselLoop=elem.attr('data-loop')||false,carouselMargin=elem.attr('data-margin')||0,carouselVideo=elem.attr('data-video')||false,carouselItems=elem.attr('data-items')||4,carouselItemsLg=elem.attr('data-items-lg')||Number(carouselItems),carouselItemsMd=elem.attr('data-items-md')||Number(carouselItemsLg),carouselItemsSm=elem.attr('data-items-sm')||Number(carouselItemsMd),carouselItemsXs=elem.attr('data-items-xs')||Number(carouselItemsSm),carouselItemsXxs=elem.attr('data-items-xxs')||Number(carouselItemsXs);if(carouselItemsMd>=3){var carouselItemsSm=elem.attr('data-items-sm')||Number(2);}
if(carouselItemsSm>=2){var carouselItemsXs=elem.attr('data-items-xs')||Number(2);}
if(carouselItemsXs>=1){var carouselItemsXxs=elem.attr('data-items-xxs')||Number(1);}
if(carouselNav=='false'){carouselNav=false;}else{carouselNav=true;}
if(carouselDots=='false'){carouselDots=false;}else{carouselDots=true;}
if($('.news-section').length){var post_items=$('.post-item').length;if(post_items==carouselItems){carouselNav=false;carouselDots=false;}}
var t=setTimeout(function(){elem.owlCarousel({nav:carouselNav,dots:carouselDots,navText:$carouselIcons,autoplay:carouselAutoPlay,autoplayTimeout:carouselAutoplayTimeout,autoplayHoverPause:true,autoWidth:carouselAutoWidth,loop:carouselLoop,margin:Number(carouselMargin),smartSpeed:Number(500),video:carouselVideo,autoHeight:carouselAutoHeight,animateIn:carouseAnimateIn,animateOut:carouseAnimateOut,rtl:INSPIRO.core.rtlStatus(),onInitialize:function(event){elem.addClass("carousel-loaded owl-carousel");},responsive:{0:{items:Number(carouselItemsXxs),nav:true,dots:true,},600:{nav:true,dots:true,items:Number(carouselItemsXs)},768:{items:Number(carouselItemsSm),nav:true,dots:true,},992:{items:Number(carouselItemsMd),nav:true,dots:true,},1200:{items:Number(carouselItemsLg),nav:carouselNav,dots:carouselDots,}}});},100);});}},flickityCarousel:function(){if(!$().flickity){console.log('flickityCarousel: flickity plugin is missing.');return true;}
if($flickity.length>0){$flickity.each(function(){var elem=$(this),accessibility=elem.attr('data-accessibility')||false,adaptiveHeight=elem.attr('data-adaptiveHeight')||false,autoPlay=elem.attr('data-autoPlay')||true,cellAlign=elem.attr('data-cellAlign')||0,cellSelector=elem.attr('data-cellSelector')||undefined,contain=elem.attr('data-contain')||true,draggable=elem.attr('data-draggable')||true,dragThreshold=elem.attr('data-dragThreshold')||3,freeScroll=elem.attr('data-freeScroll')||false,friction=elem.attr('data-friction')||0.2,groupCells=elem.attr('data-groupCells')||false,initialIndex=elem.attr('data-initialIndex')||0,lazyLoad=elem.attr('data-lazyLoad')||true,percentPosition=elem.attr('data-percentPosition')||true,prevNextButtons=elem.attr('data-prevNextButtons')||true,pageDots=elem.attr('data- pageDots')||true,resize=elem.attr('data-resize')||true,rightToLeft=elem.attr('data-rightToLeft')||false,setGallerySize=elem.attr('data-setGallerySize')||true,watchCSS=elem.attr('data-watchCSS')||false,wrapAround=elem.attr('data-wrapAround')||false;var t=setTimeout(function(){elem.flickity({accessibility:accessibility,adaptiveHeight:adaptiveHeight,autoPlay:autoPlay,cellAlign:cellAlign,cellSelector:cellSelector,contain:contain,draggable:draggable,dragThreshold:dragThreshold,freeScroll:freeScroll,friction:friction,groupCells:groupCells,initialIndex:initialIndex,lazyLoad:lazyLoad,percentPosition:percentPosition,prevNextButtons:prevNextButtons,pageDots:pageDots,resize:resize,rightToLeft:rightToLeft,setGallerySize:setGallerySize,watchCSS:watchCSS,wrapAround:wrapAround});},100);});}},};INSPIRO.elements={functions:function(){INSPIRO.elements.naTo();INSPIRO.elements.textRotator();INSPIRO.elements.buttons();INSPIRO.elements.accordion();INSPIRO.elements.tabs();INSPIRO.elements.animations();INSPIRO.elements.parallax();INSPIRO.elements.responsiveVideos();INSPIRO.elements.counters();INSPIRO.elements.countdownTimer();INSPIRO.elements.progressBar();INSPIRO.elements.pieChart();INSPIRO.elements.maps();INSPIRO.elements.gridLayout();INSPIRO.elements.tooltip();INSPIRO.elements.popover();INSPIRO.elements.lightBoxInspiro();INSPIRO.elements.youTubeBgPlayer();INSPIRO.elements.modal();INSPIRO.elements.pinOnScroll();INSPIRO.elements.other();},other:function(){if($(".toggle-item").length>0){$(".toggle-item").each(function(){var elem=$(this),toggleItemClass=elem.attr('data-class'),toggleItemClassTarget=elem.attr('data-target');elem.on("click",function(){if(toggleItemClass){if(toggleItemClassTarget){$(toggleItemClassTarget).toggleClass(toggleItemClass);}else{elem.toggleClass(toggleItemClass);}}
INSPIRO.header.logoStatus();elem.toggleClass("toggle-active");return false;});});}
if($(".hover-3d").length>0){$(".hover-3d").each(function(){var $elem=$(this),selector=$elem.attr("data-selector")||".portfolio-item-wrap",shine=$elem.attr("data-shine")||false,sensitivity=$elem.attr("data-sensitivity")||16;$elem.hover3d({selector:selector,shine:shine,sensitivity:Number(sensitivity)});});}},naTo:function(){$('a.scroll-to, #dotsMenu > ul > li > a, .menu-one-page nav > ul > li > a').on('click',function(){var $anchor=$(this);$('html, body').stop(true,false).animate({scrollTop:$($anchor.attr('href')).offset().top},1500,'easeInOutExpo');return false;});},textRotator:function(){if(!$().Morphext){console.log('textRotator: Morphext plugin is missing.');return true;}
if($textRotator.length>0){$textRotator.each(function(){var $elem=$(this),dataTextSeperator=$elem.attr('data-rotate-separator')||",",dataTextEffect=$elem.attr('data-rotate-effect')||"flipInX",dataTextSpeed=$elem.attr('data-rotate-speed')||2000;$elem.Morphext({animation:dataTextEffect,separator:dataTextSeperator,speed:Number(dataTextSpeed)});});}},buttons:function(){if($(".btn-slide[data-width]")){$(".btn.btn-slide[data-width]").each(function(){var elem=$(this),elemWidth=elem.attr('data-width'),elemDefaultWidth;switch(true){case elem.hasClass('btn-lg'):elemDefaultWidth="60";break;case elem.hasClass('btn-sm'):elemDefaultWidth="36";break;case elem.hasClass('btn-xs'):elemDefaultWidth="28";break;default:elemDefaultWidth="48";break;}
elem.hover(function(){$(this).css("width",elemWidth+"px");},function(){$(this).css("width",elemDefaultWidth+"px");});});}},accordion:function(){var $accs=$(classFinder+accordionItem);$accs.length&&($accs.each(function(){var $item=$(this);$item.hasClass(itemActive)?$item.addClass(itemActive):$item.find(classFinder+itemContent).hide();}),$(classFinder+itemTitle).on("click",function(e){var $link=$(this),$item=$link.parents(classFinder+accordionItem),$acc=$item.parents(classFinder+accordionType);$item.hasClass(itemActive)?$acc.hasClass(toogleType)?($item.removeClass(itemActive),$link.next(classFinder+itemContent).slideUp("fast")):($acc.find(classFinder+accordionItem).removeClass(itemActive),$acc.find(classFinder+itemContent).slideUp("fast")):($acc.hasClass(toogleType)||($acc.find(classFinder+accordionItem).removeClass(itemActive),$acc.find(classFinder+itemContent).slideUp("fast")),$item.addClass(itemActive),$link.next(classFinder+itemContent).slideToggle("fast")),e.preventDefault();return false;}));},tabs:function(){var $tabNavigation=$(".tabs-navigation a");if($tabNavigation.length>0){$tabNavigation.on("click",function(e){$(this).tab("show"),e.preventDefault();return false;});}},animations:function(){if(dataAnimation.length>0&&$body.hasClass('device-lg')||$body.hasClass('device-md')){dataAnimation.each(function(){$(this).addClass("animated");var $elem=$(this),animationType=$elem.attr("data-animation")||"fadeIn",animationDelay=$elem.attr("data-animation-delay")||200,animationDirection=~animationType.indexOf("Out")?"back":"forward";if(animationDirection=="forward"){$elem.appear(function(){setTimeout(function(){$elem.addClass(animationType+" visible");},animationDelay);},{accX:0,accY:-120},'easeInCubic');}else{$elem.addClass("visible");$elem.on("click",function(){$elem.addClass(animationType);return false;});}
if($elem.parents('.demo-play-animations').length){$elem.on("click",function(){$elem.removeClass(animationType);setTimeout(function(){$elem.addClass(animationType);},50);return false;});}});}},parallax:function(){if(!$().scrolly){console.log('parallax: scrolly plugin is missing.');return true;}
if($parallax.length>0){$parallax.each(function(){var $elem=$(this),elemImageSrc=$elem.attr("data-parallax-image");$elem.prepend('<div class="parallax-container" data-velocity="-.090" style="background: url('+elemImageSrc+')"></div>');if($body.hasClass('device-lg')||$body.hasClass('device-md')){$elem.find(".parallax-container").scrolly({bgParallax:true});}else{$elem.find(".parallax-container").addClass("parallax-responsive");}});}},responsiveVideos:function(){if(!$().fitVids){console.log('responsiveVideos: fitVids plugin is missing.');return true;}
$("section, .content, .post-content, .video-js, .post-video, .video-wrap, .ajax-quick-view,#slider:not(.revslider-wrap)").fitVids();},counters:function(){if(!$().countTo){console.log('counters: countTo plugin is missing.');return true;}
if($counter.length>0){$counter.each(function(){var $elem=$(this);if($body.hasClass('device-lg')||$body.hasClass('device-md')){$elem.appear(function(){$elem.find('span').countTo();});}else{var countTo=$elem.find('span').attr('data-to');$elem.find('span').html(countTo);}});}},countdownTimer:function(){if(!$().countdown){console.log('countdownTimer: countdown plugin is missing.');return true;}
if($countdownTimer.length>0){setTimeout(function(){$('[data-countdown]').each(function(){var $this=$(this),finalDate=$(this).data('countdown');$this.countdown(finalDate,function(event){$this.html(event.strftime('<div class="countdown-container"><div class="countdown-box"><div class="number">%-D</div><span>Day%!d</span></div>'+'<div class="countdown-box"><div class="number">%H</div><span>Hours</span></div>'+'<div class="countdown-box"><div class="number">%M</div><span>Minutes</span></div>'+'<div class="countdown-box"><div class="number">%S</div><span>Seconds</span></div></div>'));});});},300);}},progressBar:function(){if($progressBar.length>0){$progressBar.each(function(i,elem){var $elem=$(this),percent=$elem.attr('data-percent')||"100",delay=$elem.attr('data-delay')||"60",type=$elem.attr('data-type')||"%";if(!$elem.hasClass('progress-animated')){$elem.css({'width':'0%'});}
var progressBarRun=function(){$elem.animate({'width':percent+'%'},'easeInOutCirc').addClass('progress-animated');$elem.delay(delay).append('<span class="progress-type">'+type+'</span><span class="progress-number animated fadeIn">'+percent+'</span>');};if($body.hasClass('device-lg')||$body.hasClass('device-md')){$(elem).appear(function(){setTimeout(function(){progressBarRun();},delay);});}else{progressBarRun();}});}},pieChart:function(){if(!$().easyPieChart){console.log('pieChart: easyPieChart plugin is missing.');return true;}
if($pieChart.length>0){$pieChart.each(function(){var $elem=$(this),pieChartSize=$elem.attr('data-size')||"160",pieChartAnimate=$elem.attr('data-animate')||"2000",pieChartWidth=$elem.attr('data-width')||"6",pieChartColor=$elem.attr('data-color')||"$base-color",pieChartTrackColor=$elem.attr('data-trackcolor')||"rgba(0,0,0,0.10)";$elem.find('span, i').css({'width':pieChartSize+'px','height':pieChartSize+'px','line-height':pieChartSize+'px'});$elem.appear(function(){$elem.easyPieChart({size:Number(pieChartSize),animate:Number(pieChartAnimate),trackColor:pieChartTrackColor,lineWidth:Number(pieChartWidth),barColor:pieChartColor,scaleColor:false,lineCap:'square',onStep:function(from,to,percent){$elem.find('span.percent').text(Math.round(percent));}});});});}},maps:function(){if(!$().gMap){console.log('maps: gMap plugin is missing.');return true;}
if($map.length>0){$map.each(function(){var $elem=$(this),mapMarkerText=$elem.attr('data-map-title')?$elem.attr('data-map-title'):"Melbourne, Australia",mapAddress=$elem.attr('data-map-address')?$elem.attr('data-map-address'):"Melbourne, Australia",mapType=$elem.attr('data-map-type')?$elem.attr('data-map-type'):"ROADMAP",mapZoom=$elem.attr('data-map-zoom')?$elem.attr('data-map-zoom'):"14",mapIcon=$elem.attr('data-map-icon')?$elem.attr('data-map-icon'):"images/markers/marker2.png",maplat=$elem.attr('data-map-lat')?$elem.attr('data-map-lat'):"53.312011",maplong=$elem.attr('data-map-long')?$elem.attr('data-map-long'):"-113.558437";var markers=[{address:mapAddress,html:mapMarkerText,icon:{image:mapIcon,iconsize:[40,63],iconanchor:[18,60],},}];$elem.gMap({lat:maplat,lng:maplong,address:mapAddress,maptype:mapType,markers:markers,zoom:Number(mapZoom),doubleclickzoom:true,controls:{panControl:true,zoomControl:true,mapTypeControl:true,scaleControl:true,streetViewControl:false,overviewMapControl:true},styles:[{featureType:"poi",elementType:"labels",stylers:[{visibility:"off"}]}]});});}},gridLayout:function(){if(!$().isotope){console.log('gridLayout: isotope plugin is missing.');return true;}
if($gridLayout.length>0){$gridLayout.each(function(){var elem=$(this),gridItem=elem.attr('data-item')||"portfolio-item",gridLayoutMode=elem.attr('data-layout')||"masonry",gridStagger=elem.attr('data-stagger')||10,gridMargin=elem.attr('data-margin')||20,gridTransition=elem.attr("data-transition")||"0.4s";if(gridLayoutMode=="fitRows"){var gridMargin2=(gridMargin+2);}else{var gridMargin2=gridMargin;var gridMargin2=gridMargin;}
elem.css("margin","0 -"+gridMargin2+"px -"+gridMargin+"px 0");elem.find('.'+gridItem).css("padding","0 "+gridMargin+"px "+gridMargin+"px 0");$window.on("load",function(){setTimeout(function(){elem.isotope({layoutMode:gridLayoutMode,transitionDuration:gridTransition,stagger:Number(gridStagger),itemSelector:"."+gridItem,autoHeight:true,masonry:{columnWidth:elem.find('.'+gridItem+':not(.large-width)')[0],}});$gridLayout.addClass("grid-loaded");},100);});if(elem.next().hasClass("infinite-scroll")){INSPIRO.elements.gridLayoutInfinite(elem,gridItem,gridMargin);}});if($gridFilter.length>0){$(window).load(function(){setTimeout(function(){var isIsotopeInit=false;var hashFilter=INSPIRO.elements.getHashFilter();if(!hashFilter&&isIsotopeInit){return;}
isIsotopeInit=true;$('.grid-layout').isotope({itemSelector:'.portfolio-item',layoutMode:'fitRows',filter:hashFilter});},500);});$gridFilter.each(function(){var elem=$(this),elemLayoutCnt=elem.attr('data-layout'),elemActive=elem.attr('data-active-class')||"active";elem.find('a').click(function(){elem.find('li').removeClass(elemActive);$(this).parent('li').addClass(elemActive);$(elemLayoutCnt).isotope({filter:$(this).attr('data-category')});if($(this).parents('.grid-filter.gf-outline').length){location.hash='filter='+encodeURIComponent($(this).attr('data-category'));}
if($(".grid-active-title").length>0){$(".grid-active-title").empty().append($(this).text())}
return false;});});}}},getHashFilter:function(){var matches=location.hash.match(/filter=([^&]+)/i);var hashFilter=matches&&matches[1];if(matches.length){$('.grid-filter.gf-outline li.active').removeClass('active');$('.grid-filter.gf-outline').find("[data-category='"+hashFilter+"']").parent().addClass('active');}
return hashFilter&&decodeURIComponent(hashFilter);},gridLayoutRefresh:function(){if($gridLayout.length>0){$gridLayout.each(function(){var elem=$(this);setTimeout(function(){elem.isotope('layout');},300);});}},gridLayoutInfinite:function(element,elementSelector,elemGridMargin){if(!$().infinitescroll){console.log('gridLayoutInfinite: infinitescroll plugin is missing.');return true;}
var elem=element,gridItem=elementSelector,gridMargin=elemGridMargin,navSelector="#pagination",loadMoreElem=$("#showMore"),loadMoreBtn=$("#showMore a.btn"),loadMoreBtnText=$("#showMore a.btn").text(),loadMoreMessage=$('<div class="infinite-scroll-message"><p class="animated visible fadeIn">No more posts to show</p></div>');$window.on("load",function(){elem.infinitescroll({itemSelector:"."+gridItem,navSelector:navSelector,nextSelector:navSelector+' a:not(.btn)',state:{isDone:false},extraScrollPx:10,errorCallback:function(){loadMoreElem.addClass("animated visible fadeOut");setTimeout(function(){loadMoreElem.hide();elem.after(loadMoreMessage);},500);setTimeout(function(){$(".infinite-scroll-message").addClass("animated visible fadeOut");},3800);},},function(newElements){loadMoreBtn.text(loadMoreBtnText);elem.css("margin","0 -"+gridMargin+"px -"+gridMargin+"px 0");elem.find('.'+gridItem).css("padding","0 "+gridMargin+"px "+gridMargin+"px 0");INSPIRO.slider.carouselAjax();elem.isotope('appended',newElements);INSPIRO.elements.gridLayoutRefresh();});});if(loadMoreElem.length>0){$window.unbind('.infscr');loadMoreBtn.click(function(){loadMoreBtn.text("Loading...");elem.infinitescroll('retrieve');return false;});}},tooltip:function(){if(!$().tooltip){console.log('tooltip: tooltip plugin is missing.');return true;}
var $tooltip=$('[data-toggle="tooltip"]');if($tooltip.length>0){$('[data-toggle="tooltip"]').tooltip();}},popover:function(){if(!$().popover){console.log('popover: popover plugin is missing.');return true;}
var $popover=$('[data-toggle="popover"]');if($popover.length>0){$('[data-toggle="popover"]').popover({container:'body',html:true});}},lightBoxInspiro:function(){if(!$().magnificPopup){console.log('lightBoxInspiro: magnificPopup plugin is missing.');return true;}
if($lightbox_image.length>0){$lightbox_image.magnificPopup({type:'image',removalDelay:500,callbacks:{beforeOpen:function(){this.st.image.markup=this.st.image.markup.replace('mfp-figure','mfp-figure mfp-with-anim');this.st.mainClass="mfp-zoom-out";}},});}
if($lightbox_gallery.length>0){$lightbox_gallery.each(function(){$(this).magnificPopup({delegate:'a[data-lightbox="gallery-item"], a[data-lightbox="gallery-image"]',type:'image',image:{verticalFit:true},gallery:{enabled:true,arrowMarkup:'<button type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',navigateByImgClick:true,preload:[0,1]},removalDelay:500,callbacks:{beforeOpen:function(){this.st.image.markup=this.st.image.markup.replace('mfp-figure','mfp-figure mfp-with-anim');this.st.mainClass="mfp-zoom-out";}},});});}
if($lightbox_iframe.length>0){if($('.pdf-lightbox-listing').length){if(!INSPIRO.core.detectTouchDevices()){$lightbox_iframe.each(function(){$(this).magnificPopup({type:'iframe',removalDelay:500,callbacks:{beforeOpen:function(){this.st.image.markup=this.st.image.markup.replace('mfp-figure','mfp-figure mfp-with-anim');this.st.mainClass="mfp-zoom-out";}},});});}else{$('.lightbox-popup-block a').on('click',function(e){var pdf_url=$(this).attr('href');window.open(pdf_url,'_blank');e.preventDefault();});}}else{$lightbox_iframe.each(function(){$(this).magnificPopup({type:'iframe',removalDelay:500,callbacks:{beforeOpen:function(){this.st.image.markup=this.st.image.markup.replace('mfp-figure','mfp-figure mfp-with-anim');this.st.mainClass="mfp-zoom-out";}},});});}}
if($lightbox_ajax.length>0){$lightbox_ajax.each(function(){$(this).magnificPopup({type:'ajax',removalDelay:500,callbacks:{ajaxContentAdded:function(mfpResponse){INSPIRO.slider.carouselAjax();INSPIRO.elements.responsiveVideos();INSPIRO.elements.buttons();}}});});}
if($lightbox_inline.length>0){$lightbox_inline.magnificPopup({type:'inline',removalDelay:500,callbacks:{beforeOpen:function(){this.st.image.markup=this.st.image.markup.replace('mfp-figure','mfp-figure mfp-with-anim');this.st.mainClass="mfp-zoom-out";}},closeBtnInside:false,fixedContentPos:true,overflowY:'scroll',});}},youTubeBgPlayer:function(){if(!$().mb_YTPlayer){console.log('youTubeBgPlayer: mb_YTPlayer plugin is missing.');return true;}
if($ytPlayer.length>0){$ytPlayer.each(function(){var elem=$(this),ytPlayerVideo=elem.attr('data-youtube-url')||null,ytPlayerMute=elem.attr('data-youtube-mute')||false,ytPlayerRatio=elem.attr('data-youtube-ratio')||'16/9',ytPlayerQuality=elem.attr('data-youtube-quality')||'hd720',ytPlayerOpacity=elem.attr('data-youtube-opacity')||1,ytPlayerContainer=elem.attr('data-youtube-container')||'self',ytPlayerOptimize=elem.attr('data-youtube-optimize')||true,ytPlayerLoop=elem.attr('data-youtube-loop')||true,ytPlayerVolume=elem.attr('data-youtube-volume')||70,ytPlayerStart=elem.attr('data-youtube-start')||0,ytPlayerStop=elem.attr('data-youtube-stop')||0,ytPlayerAutoPlay=elem.attr('data-youtube-autoplay')||true,ytPlayerFullScreen=elem.attr('data-youtube-fullscreen')||true,ytPlayerControls=elem.attr('data-youtube-controls')||false,ytPlayerLogo=elem.attr('data-youtube-logo')||false,ytPlayerAutoPause=elem.attr('data-youtube-autopause')||false;elem.mb_YTPlayer({videoURL:ytPlayerVideo,mute:ytPlayerMute,ratio:ytPlayerRatio,quality:ytPlayerQuality,opacity:ytPlayerOpacity,containment:ytPlayerContainer,optimizeDisplay:ytPlayerOptimize,loop:ytPlayerLoop,vol:ytPlayerVolume,startAt:ytPlayerStart,stopAt:ytPlayerStop,autoPlay:ytPlayerAutoPlay,realfullscreen:ytPlayerFullScreen,showYTLogo:ytPlayerLogo,showControls:ytPlayerControls});if(!ytPlayerAutoPlay){elem.find("#youtube-background-controls").addClass("video-is-playing");}
elem.on("YTPReady",function(){$("#youtube-background-controls").on("click",function(){if(!$(this).hasClass("video-is-playing")){$(this).addClass("video-is-playing");$ytPlayer.YTPPause();}else{$(this).removeClass("video-is-playing");$ytPlayer.YTPPlay();}
return false;});var elemContainerHeight=elem.height();if(ytPlayerAutoPause){$window.on('scroll',function(){if($window.scrollTop()>elemContainerHeight){$("#youtube-background-controls").addClass("video-is-playing");}});}});});}},modal:function(){if(!$().magnificPopup){console.log('lightBoxInspiro: magnificPopup plugin is missing.');return true;}
var $modal=$(".modal"),$modalStrip=$(".modal-strip"),$btnModal=$(".btn-modal"),modalShow="modal-auto-open",modalShowClass="modal-active",modalDecline=$(".modal-close"),cookieNotify=$(".cookie-notify"),cookieConfirm=cookieNotify.find(".modal-confirm"),coockieExpire=cookieNotify.attr("data-expire")||365,coockieName=cookieNotify.attr("data-name")||"websiteCookies";if($modal.length>0){$modal.each(function(){var elem=$(this),elemDelay=elem.attr("data-delay")||3000;if(elem.hasClass(modalShow)){var t=setTimeout(function(){$.magnificPopup.open({items:{src:elem},type:'inline',closeBtnInside:true,removalDelay:500,callbacks:{beforeOpen:function(){this.st.image.markup=this.st.image.markup.replace('mfp-figure','mfp-figure mfp-with-anim');this.st.mainClass="mfp-zoom-out";},open:function(){if(elem.find("video").length>0){elem.find("video").get(0).play();}}}},0);},elemDelay);}
elem.find(modalDecline).click(function(){$.magnificPopup.close();return false;});});}
if($modalStrip.length>0){$modalStrip.each(function(){var elem=$(this),modalDelay=elem.attr("data-delay")||3000;if(elem.hasClass(modalShow)){var modalElem=$(this);setTimeout(function(){modalElem.addClass(modalShowClass);},modalDelay);}
elem.find(modalDecline).click(function(){elem.removeClass(modalShowClass);return false;});if($modalStrip.hasClass("cookie-notify")){setTimeout(function(){if($.cookie(coockieName)!='confirfmed'){cookieNotify.addClass(modalShowClass);}},modalDelay);cookieConfirm.click(function(){$.cookie(coockieName,'confirfmed',{expires:Number(coockieExpire)});cookieNotify.removeClass(modalShowClass);return false;});}});}
if($btnModal.length>0){$btnModal.each(function(){var elem=$(this),modalTarget=elem.attr("data-modal");elem.click(function(){$(modalTarget).toggleClass(modalShowClass,1000);return false;});});}},pinOnScroll:function(){if($pinOnScroll.length>0&&$body.hasClass('device-lg')||$body.hasClass('device-md')){$pinOnScroll.each(function(){var elem=$(this),elemOffsetTop=elem.attr("data-offset-top")||elem.offset().top,elemOffsetBottom=elem.attr("data-offset-bottom")||$('#footer').height()+160,elemParentWidth=elem.parent().width(),elemParentHeight=elem.parent().height();elem.width(elemParentWidth).height(elemParentHeight);if($pageTitle.length>0){elemOffsetTop=elemOffsetTop-($pageTitle.innerHeight()-$header.height()+40);elem.on('affix.bs.affix',function(){elem.css({'position':'fixed','top':'100px'});});elem.on('affix-top.bs.affix',function(){elem.css({'position':'inherit','top':'auto'});});}
elem.affix({offset:{top:elemOffsetTop,bottom:elemOffsetBottom}});});}}};INSPIRO.widgets={functions:function(){INSPIRO.widgets.twitter();INSPIRO.widgets.flickr();INSPIRO.widgets.contactForm();INSPIRO.widgets.subscribeForm();},twitter:function(){if(!$().twittie){console.log('twitter: twittie plugin is missing.');return true;}
setTimeout(function(){if($widget_twitter.length>0){$widget_twitter.each(function(){var $elem=$(this),twitterUsername=$elem.attr('data-username')||"ardianmusliu",twitterLimit=$elem.attr('data-limit')||2,twitterDateFormat=$elem.attr('data-format')||'%b/%d/%Y',twitterLoadingText=$elem.attr('data-loading-text')||'Loading...',twitterApiPAth=$elem.attr('data-loader')||"include/twitter/tweet.php",twitterAvatar=$elem.attr('data-avatar')||false;if(twitterAvatar=='true'){twitterAvatar="{{avatar}}";}else{twitterAvatar="";}
$elem.append('<div id="twitter-cnt"></div>')
$elem.find('#twitter-cnt').twittie({'username':twitterUsername,'count':twitterLimit,'dateFormat':twitterDateFormat,'template':twitterAvatar+'{{tweet}}<small>{{date}}</small>','apiPath':twitterApiPAth,'loadingText':twitterLoadingText});});}},2000);},flickr:function(){if(!$().jflickrfeed){console.log('flickr: jflickrfeed plugin is missing.');return true;}
if($flickr_widget.length>0){$flickr_widget.each(function(){var $elem=$(this),$flickrId=$elem.attr('data-flickr-id')||"52617155@N08",$flickrImages=$elem.attr('data-flickr-images')||"9";$flickr_widget.jflickrfeed({limit:$flickrImages,qstrings:{id:$flickrId},itemTemplate:'<a href="{{image}}" title="{{title}}"><img src="{{image_s}}" alt="{{title}}" /></a>'},function(){$elem.magnificPopup({delegate:'a',type:'image',gallery:{enabled:true}});});});}},contactForm:function(){if(!$().validate){console.log('contactForm: validate plugin is missing.');return true;}
if(!$().ajaxSubmit){console.log('contactForm: ajaxSubmit plugin is missing.');return true;}
if(!$.notify){console.log('contactForm: notify plugin is missing.');return true;}
if($contactForm.length>0){$contactForm.each(function(){var elem=$(this),elemSuccessMessage=elem.attr('success-message')||"We have <strong>successfully</strong> received your Message and will get Back to you as soon as possible.";elem.validate({submitHandler:function(form){var button=$(form).find('button#form-submit'),buttonText=button.html();button.html('<i class="fa fa-refresh fa-spin"></i> Sending...');jQuery(form).ajaxSubmit({success:function(text){if(text.response=='success'){$.notify({message:elemSuccessMessage},{type:'success'});if($(form).find('.g-recaptcha').children('div').length>0){grecaptcha.reset();}
$(form)[0].reset();button.html(buttonText);}else{$.notify({message:elem.attr('data-error-message')||text.message},{type:'danger'});setTimeout(function(){button.html(buttonText);},1000);}}});}});});}},subscribeForm:function(){if(!$().validate){console.log('subscribeForm: validate plugin is missing.');return true;}
if(!$().ajaxSubmit){console.log('subscribeForm: ajaxSubmit plugin is missing.');return true;}
if(!$.notify){console.log('subscribeForm: notify plugin is missing.');return true;}
if($subscribeForm.length>0){$subscribeForm.each(function(){var elem=$(this),elemSuccessMessage=elem.attr('success-message')||"You have successfully subscribed to our mailing list.";elem.validate({submitHandler:function(form){var addonIcon=elem.find('.input-group-addon'),addonIconText=addonIcon.html();addonIcon.html('<i class="fa fa-refresh fa-spin"></i>');$(form).ajaxSubmit({dataType:'json',success:function(text){if(text.response=='success'){$.notify({message:elemSuccessMessage},{type:'success'});$(form)[0].reset();addonIcon.html(addonIconText);}else{$.notify({message:text.message},{type:'warning'});addonIcon.html(addonIconText);}}});}});});}},};INSPIRO.documentOnResize={functions:function(){setTimeout(function(){INSPIRO.header.logoStatus();INSPIRO.header.stickyHeader();INSPIRO.core.screenSizeControl();INSPIRO.slider.sliderScreenSizeControl();INSPIRO.slider.inspiroSlider();INSPIRO.slider.carousel();INSPIRO.core.customHeight();INSPIRO.core.stickyFooter();},200);},};$window.on('resize',INSPIRO.documentOnResize.functions);INSPIRO.documentReady={functions:function(){INSPIRO.core.pageLoader();INSPIRO.slider.sliderScreenSizeControl();INSPIRO.core.functions();INSPIRO.header.functions();INSPIRO.slider.functions();INSPIRO.elements.functions();INSPIRO.widgets.functions();},};$(document).ready(INSPIRO.documentReady.functions);INSPIRO.documentOnLoad={functions:function(){},};$(window).on('load',INSPIRO.documentOnLoad.functions);INSPIRO.documentScroll={functions:function(){INSPIRO.header.logoStatus();INSPIRO.header.stickyHeader();INSPIRO.core.goToTop();INSPIRO.header.dotsMenu();INSPIRO.header.onepageMenu();},};$window.on('scroll',INSPIRO.documentScroll.functions);INSPIRO.lightBoxInspiro=function(){if($lightbox_image.length>0){$lightbox_image.magnificPopup({type:'image',removalDelay:500,callbacks:{beforeOpen:function(){this.st.image.markup=this.st.image.markup.replace('mfp-figure','mfp-figure mfp-with-anim');this.st.mainClass="mfp-zoom-out";}},});}
if($lightbox_gallery.length>0){$lightbox_gallery.each(function(){$(this).magnificPopup({delegate:'a[data-lightbox="gallery-item"]',type:'image',image:{verticalFit:true},gallery:{arrowMarkup:'<button type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',enabled:true,navigateByImgClick:true,preload:[0,1]},removalDelay:500,callbacks:{beforeOpen:function(){this.st.image.markup=this.st.image.markup.replace('mfp-figure','mfp-figure mfp-with-anim');this.st.mainClass="mfp-zoom-out";}},});});}
if($lightbox_iframe.length>0){$lightbox_iframe.each(function(){$(this).magnificPopup({type:'iframe',removalDelay:500,callbacks:{beforeOpen:function(){this.st.image.markup=this.st.image.markup.replace('mfp-figure','mfp-figure mfp-with-anim');this.st.mainClass="mfp-zoom-out";}},});});}
if($lightbox_ajax.length>0){$lightbox_ajax.each(function(){$(this).magnificPopup({type:'ajax',removalDelay:500,callbacks:{ajaxContentAdded:function(mfpResponse){INSPIRO.lightBoxInspiro();INSPIRO.slider.carouselAjax();INSPIRO.elements.responsiveVideos();INSPIRO.elements.accordion();}}});});}
if($lightbox_inline.length>0){$lightbox_inline.magnificPopup({type:'inline',removalDelay:500,callbacks:{beforeOpen:function(){this.st.image.markup=this.st.image.markup.replace('mfp-figure','mfp-figure mfp-with-anim');this.st.mainClass="mfp-zoom-out";}},closeBtnInside:false,fixedContentPos:true,overflowY:'scroll',});}};})(jQuery);;(function(factory){'use strict';if(typeof define==='function'&&define.amd){define(['jquery'],factory);}else if(typeof module!=='undefined'&&module.exports){module.exports=factory(require('jquery'));}else{factory(jQuery);}})(function($){var _previousResizeWidth=-1,_updateTimeout=-1;var _parse=function(value){return parseFloat(value)||0;};var _rows=function(elements){var tolerance=1,$elements=$(elements),lastTop=null,rows=[];$elements.each(function(){var $that=$(this),top=$that.offset().top-_parse($that.css('margin-top')),lastRow=rows.length>0?rows[rows.length-1]:null;if(lastRow===null){rows.push($that);}else{if(Math.floor(Math.abs(lastTop-top))<=tolerance){rows[rows.length-1]=lastRow.add($that);}else{rows.push($that);}}
lastTop=top;});return rows;};var _parseOptions=function(options){var opts={byRow:true,property:'height',target:null,remove:false};if(typeof options==='object'){return $.extend(opts,options);}
if(typeof options==='boolean'){opts.byRow=options;}else if(options==='remove'){opts.remove=true;}
return opts;};var matchHeight=$.fn.matchHeight=function(options){var opts=_parseOptions(options);if(opts.remove){var that=this;this.css(opts.property,'');$.each(matchHeight._groups,function(key,group){group.elements=group.elements.not(that);});return this;}
if(this.length<=1&&!opts.target){return this;}
matchHeight._groups.push({elements:this,options:opts});matchHeight._apply(this,opts);return this;};matchHeight.version='master';matchHeight._groups=[];matchHeight._throttle=80;matchHeight._maintainScroll=false;matchHeight._beforeUpdate=null;matchHeight._afterUpdate=null;matchHeight._rows=_rows;matchHeight._parse=_parse;matchHeight._parseOptions=_parseOptions;matchHeight._apply=function(elements,options){var opts=_parseOptions(options),$elements=$(elements),rows=[$elements];var scrollTop=$(window).scrollTop(),htmlHeight=$('html').outerHeight(true);var $hiddenParents=$elements.parents().filter(':hidden');$hiddenParents.each(function(){var $that=$(this);$that.data('style-cache',$that.attr('style'));});$hiddenParents.css('display','block');if(opts.byRow&&!opts.target){$elements.each(function(){var $that=$(this),display=$that.css('display');if(display!=='inline-block'&&display!=='flex'&&display!=='inline-flex'){display='block';}
$that.data('style-cache',$that.attr('style'));$that.css({'display':display,'padding-top':'0','padding-bottom':'0','margin-top':'0','margin-bottom':'0','border-top-width':'0','border-bottom-width':'0','height':'100px','overflow':'hidden'});});rows=_rows($elements);$elements.each(function(){var $that=$(this);$that.attr('style',$that.data('style-cache')||'');});}
$.each(rows,function(key,row){var $row=$(row),targetHeight=0;if(!opts.target){if(opts.byRow&&$row.length<=1){$row.css(opts.property,'');return;}
$row.each(function(){var $that=$(this),style=$that.attr('style'),display=$that.css('display');if(display!=='inline-block'&&display!=='flex'&&display!=='inline-flex'){display='block';}
var css={'display':display};css[opts.property]='';$that.css(css);if($that.outerHeight(false)>targetHeight){targetHeight=$that.outerHeight(false);}
if(style){$that.attr('style',style);}else{$that.css('display','');}});}else{targetHeight=opts.target.outerHeight(false);}
$row.each(function(){var $that=$(this),verticalPadding=0;if(opts.target&&$that.is(opts.target)){return;}
if($that.css('box-sizing')!=='border-box'){verticalPadding+=_parse($that.css('border-top-width'))+_parse($that.css('border-bottom-width'));verticalPadding+=_parse($that.css('padding-top'))+_parse($that.css('padding-bottom'));}
$that.css(opts.property,(targetHeight-verticalPadding)+'px');});});$hiddenParents.each(function(){var $that=$(this);$that.attr('style',$that.data('style-cache')||null);});if(matchHeight._maintainScroll){$(window).scrollTop((scrollTop/htmlHeight)*$('html').outerHeight(true));}
return this;};matchHeight._applyDataApi=function(){var groups={};$('[data-match-height], [data-mh]').each(function(){var $this=$(this),groupId=$this.attr('data-mh')||$this.attr('data-match-height');if(groupId in groups){groups[groupId]=groups[groupId].add($this);}else{groups[groupId]=$this;}});$.each(groups,function(){this.matchHeight(true);});};var _update=function(event){if(matchHeight._beforeUpdate){matchHeight._beforeUpdate(event,matchHeight._groups);}
$.each(matchHeight._groups,function(){matchHeight._apply(this.elements,this.options);});if(matchHeight._afterUpdate){matchHeight._afterUpdate(event,matchHeight._groups);}};matchHeight._update=function(throttle,event){if(event&&event.type==='resize'){var windowWidth=$(window).width();if(windowWidth===_previousResizeWidth){return;}
_previousResizeWidth=windowWidth;}
if(!throttle){_update(event);}else if(_updateTimeout===-1){_updateTimeout=setTimeout(function(){_update(event);_updateTimeout=-1;},matchHeight._throttle);}};$(matchHeight._applyDataApi);$(window).bind('load',function(event){matchHeight._update(false,event);});$(window).bind('resize orientationchange',function(event){matchHeight._update(true,event);});});(function(factory){if(typeof define==="function"&&define.amd){define(["jquery"],factory);}else if(typeof exports==='object'){factory(require('jquery'));}else{factory(jQuery);}}(function($,undefined){function UTCDate(){return new Date(Date.UTC.apply(Date,arguments));}
function UTCToday(){var today=new Date();return UTCDate(today.getFullYear(),today.getMonth(),today.getDate());}
function isUTCEquals(date1,date2){return(date1.getUTCFullYear()===date2.getUTCFullYear()&&date1.getUTCMonth()===date2.getUTCMonth()&&date1.getUTCDate()===date2.getUTCDate());}
function alias(method,deprecationMsg){return function(){if(deprecationMsg!==undefined){$.fn.datepicker.deprecated(deprecationMsg);}
return this[method].apply(this,arguments);};}
function isValidDate(d){return d&&!isNaN(d.getTime());}
var DateArray=(function(){var extras={get:function(i){return this.slice(i)[0];},contains:function(d){var val=d&&d.valueOf();for(var i=0,l=this.length;i<l;i++)
if(0<=this[i].valueOf()-val&&this[i].valueOf()-val<1000*60*60*24)
return i;return-1;},remove:function(i){this.splice(i,1);},replace:function(new_array){if(!new_array)
return;if(!$.isArray(new_array))
new_array=[new_array];this.clear();this.push.apply(this,new_array);},clear:function(){this.length=0;},copy:function(){var a=new DateArray();a.replace(this);return a;}};return function(){var a=[];a.push.apply(a,arguments);$.extend(a,extras);return a;};})();var Datepicker=function(element,options){$.data(element,'datepicker',this);this._process_options(options);this.dates=new DateArray();this.viewDate=this.o.defaultViewDate;this.focusDate=null;this.element=$(element);this.isInput=this.element.is('input');this.inputField=this.isInput?this.element:this.element.find('input');this.component=this.element.hasClass('date')?this.element.find('.add-on, .input-group-addon, .btn'):false;if(this.component&&this.component.length===0)
this.component=false;this.isInline=!this.component&&this.element.is('div');this.picker=$(DPGlobal.template);if(this._check_template(this.o.templates.leftArrow)){this.picker.find('.prev').html(this.o.templates.leftArrow);}
if(this._check_template(this.o.templates.rightArrow)){this.picker.find('.next').html(this.o.templates.rightArrow);}
this._buildEvents();this._attachEvents();if(this.isInline){this.picker.addClass('datepicker-inline').appendTo(this.element);}else{this.picker.addClass('datepicker-dropdown dropdown-menu');}
if(this.o.rtl){this.picker.addClass('datepicker-rtl');}
if(this.o.calendarWeeks){this.picker.find('.datepicker-days .datepicker-switch, thead .datepicker-title, tfoot .today, tfoot .clear').attr('colspan',function(i,val){return Number(val)+1;});}
this._process_options({startDate:this._o.startDate,endDate:this._o.endDate,daysOfWeekDisabled:this.o.daysOfWeekDisabled,daysOfWeekHighlighted:this.o.daysOfWeekHighlighted,datesDisabled:this.o.datesDisabled});this._allow_update=false;this.setViewMode(this.o.startView);this._allow_update=true;this.fillDow();this.fillMonths();this.update();if(this.isInline){this.show();}};Datepicker.prototype={constructor:Datepicker,_resolveViewName:function(view){$.each(DPGlobal.viewModes,function(i,viewMode){if(view===i||$.inArray(view,viewMode.names)!==-1){view=i;return false;}});return view;},_resolveDaysOfWeek:function(daysOfWeek){if(!$.isArray(daysOfWeek))
daysOfWeek=daysOfWeek.split(/[,\s]*/);return $.map(daysOfWeek,Number);},_check_template:function(tmp){try{if(tmp===undefined||tmp===""){return false;}
if((tmp.match(/[<>]/g)||[]).length<=0){return true;}
var jDom=$(tmp);return jDom.length>0;}catch(ex){return false;}},_process_options:function(opts){this._o=$.extend({},this._o,opts);var o=this.o=$.extend({},this._o);var lang=o.language;if(!dates[lang]){lang=lang.split('-')[0];if(!dates[lang])
lang=defaults.language;}
o.language=lang;o.startView=this._resolveViewName(o.startView);o.minViewMode=this._resolveViewName(o.minViewMode);o.maxViewMode=this._resolveViewName(o.maxViewMode);o.startView=Math.max(this.o.minViewMode,Math.min(this.o.maxViewMode,o.startView));if(o.multidate!==true){o.multidate=Number(o.multidate)||false;if(o.multidate!==false)
o.multidate=Math.max(0,o.multidate);}
o.multidateSeparator=String(o.multidateSeparator);o.weekStart%=7;o.weekEnd=(o.weekStart+6)%7;var format=DPGlobal.parseFormat(o.format);if(o.startDate!==-Infinity){if(!!o.startDate){if(o.startDate instanceof Date)
o.startDate=this._local_to_utc(this._zero_time(o.startDate));else
o.startDate=DPGlobal.parseDate(o.startDate,format,o.language,o.assumeNearbyYear);}else{o.startDate=-Infinity;}}
if(o.endDate!==Infinity){if(!!o.endDate){if(o.endDate instanceof Date)
o.endDate=this._local_to_utc(this._zero_time(o.endDate));else
o.endDate=DPGlobal.parseDate(o.endDate,format,o.language,o.assumeNearbyYear);}else{o.endDate=Infinity;}}
o.daysOfWeekDisabled=this._resolveDaysOfWeek(o.daysOfWeekDisabled||[]);o.daysOfWeekHighlighted=this._resolveDaysOfWeek(o.daysOfWeekHighlighted||[]);o.datesDisabled=o.datesDisabled||[];if(!$.isArray(o.datesDisabled)){o.datesDisabled=o.datesDisabled.split(',');}
o.datesDisabled=$.map(o.datesDisabled,function(d){return DPGlobal.parseDate(d,format,o.language,o.assumeNearbyYear);});var plc=String(o.orientation).toLowerCase().split(/\s+/g),_plc=o.orientation.toLowerCase();plc=$.grep(plc,function(word){return /^auto|left|right|top|bottom$/.test(word);});o.orientation={x:'auto',y:'auto'};if(!_plc||_plc==='auto');else if(plc.length===1){switch(plc[0]){case 'top':case 'bottom':o.orientation.y=plc[0];break;case 'left':case 'right':o.orientation.x=plc[0];break;}}else{_plc=$.grep(plc,function(word){return /^left|right$/.test(word);});o.orientation.x=_plc[0]||'auto';_plc=$.grep(plc,function(word){return /^top|bottom$/.test(word);});o.orientation.y=_plc[0]||'auto';}
if(o.defaultViewDate instanceof Date||typeof o.defaultViewDate==='string'){o.defaultViewDate=DPGlobal.parseDate(o.defaultViewDate,format,o.language,o.assumeNearbyYear);}else if(o.defaultViewDate){var year=o.defaultViewDate.year||new Date().getFullYear();var month=o.defaultViewDate.month||0;var day=o.defaultViewDate.day||1;o.defaultViewDate=UTCDate(year,month,day);}else{o.defaultViewDate=UTCToday();}},_events:[],_secondaryEvents:[],_applyEvents:function(evs){for(var i=0,el,ch,ev;i<evs.length;i++){el=evs[i][0];if(evs[i].length===2){ch=undefined;ev=evs[i][1];}else if(evs[i].length===3){ch=evs[i][1];ev=evs[i][2];}
el.on(ev,ch);}},_unapplyEvents:function(evs){for(var i=0,el,ev,ch;i<evs.length;i++){el=evs[i][0];if(evs[i].length===2){ch=undefined;ev=evs[i][1];}else if(evs[i].length===3){ch=evs[i][1];ev=evs[i][2];}
el.off(ev,ch);}},_buildEvents:function(){var events={keyup:$.proxy(function(e){if($.inArray(e.keyCode,[27,37,39,38,40,32,13,9])===-1)
this.update();},this),keydown:$.proxy(this.keydown,this),paste:$.proxy(this.paste,this)};if(this.o.showOnFocus===true){events.focus=$.proxy(this.show,this);}
if(this.isInput){this._events=[[this.element,events]];}
else if(this.component&&this.inputField.length){this._events=[[this.inputField,events],[this.component,{click:$.proxy(this.show,this)}]];}else{this._events=[[this.element,{click:$.proxy(this.show,this),keydown:$.proxy(this.keydown,this)}]];}
this._events.push([this.element,'*',{blur:$.proxy(function(e){this._focused_from=e.target;},this)}],[this.element,{blur:$.proxy(function(e){this._focused_from=e.target;},this)}]);if(this.o.immediateUpdates){this._events.push([this.element,{'changeYear changeMonth':$.proxy(function(e){this.update(e.date);},this)}]);}
this._secondaryEvents=[[this.picker,{click:$.proxy(this.click,this)}],[this.picker,'.prev, .next',{click:$.proxy(this.navArrowsClick,this)}],[this.picker,'.day:not(.disabled)',{click:$.proxy(this.dayCellClick,this)}],[$(window),{resize:$.proxy(this.place,this)}],[$(document),{'mousedown touchstart':$.proxy(function(e){if(!(this.element.is(e.target)||this.element.find(e.target).length||this.picker.is(e.target)||this.picker.find(e.target).length||this.isInline)){this.hide();}},this)}]];},_attachEvents:function(){this._detachEvents();this._applyEvents(this._events);},_detachEvents:function(){this._unapplyEvents(this._events);},_attachSecondaryEvents:function(){this._detachSecondaryEvents();this._applyEvents(this._secondaryEvents);},_detachSecondaryEvents:function(){this._unapplyEvents(this._secondaryEvents);},_trigger:function(event,altdate){var date=altdate||this.dates.get(-1),local_date=this._utc_to_local(date);this.element.trigger({type:event,date:local_date,viewMode:this.viewMode,dates:$.map(this.dates,this._utc_to_local),format:$.proxy(function(ix,format){if(arguments.length===0){ix=this.dates.length-1;format=this.o.format;}else if(typeof ix==='string'){format=ix;ix=this.dates.length-1;}
format=format||this.o.format;var date=this.dates.get(ix);return DPGlobal.formatDate(date,format,this.o.language);},this)});},show:function(){if(this.inputField.prop('disabled')||(this.inputField.prop('readonly')&&this.o.enableOnReadonly===false))
return;if(!this.isInline)
this.picker.appendTo(this.o.container);this.place();this.picker.show();this._attachSecondaryEvents();this._trigger('show');if((window.navigator.msMaxTouchPoints||'ontouchstart'in document)&&this.o.disableTouchKeyboard){$(this.element).blur();}
return this;},hide:function(){if(this.isInline||!this.picker.is(':visible'))
return this;this.focusDate=null;this.picker.hide().detach();this._detachSecondaryEvents();this.setViewMode(this.o.startView);if(this.o.forceParse&&this.inputField.val())
this.setValue();this._trigger('hide');return this;},destroy:function(){this.hide();this._detachEvents();this._detachSecondaryEvents();this.picker.remove();delete this.element.data().datepicker;if(!this.isInput){delete this.element.data().date;}
return this;},paste:function(e){var dateString;if(e.originalEvent.clipboardData&&e.originalEvent.clipboardData.types&&$.inArray('text/plain',e.originalEvent.clipboardData.types)!==-1){dateString=e.originalEvent.clipboardData.getData('text/plain');}else if(window.clipboardData){dateString=window.clipboardData.getData('Text');}else{return;}
this.setDate(dateString);this.update();e.preventDefault();},_utc_to_local:function(utc){if(!utc){return utc;}
var local=new Date(utc.getTime()+(utc.getTimezoneOffset()*60000));if(local.getTimezoneOffset()!==utc.getTimezoneOffset()){local=new Date(utc.getTime()+(local.getTimezoneOffset()*60000));}
return local;},_local_to_utc:function(local){return local&&new Date(local.getTime()-(local.getTimezoneOffset()*60000));},_zero_time:function(local){return local&&new Date(local.getFullYear(),local.getMonth(),local.getDate());},_zero_utc_time:function(utc){return utc&&UTCDate(utc.getUTCFullYear(),utc.getUTCMonth(),utc.getUTCDate());},getDates:function(){return $.map(this.dates,this._utc_to_local);},getUTCDates:function(){return $.map(this.dates,function(d){return new Date(d);});},getDate:function(){return this._utc_to_local(this.getUTCDate());},getUTCDate:function(){var selected_date=this.dates.get(-1);if(selected_date!==undefined){return new Date(selected_date);}else{return null;}},clearDates:function(){this.inputField.val('');this.update();this._trigger('changeDate');if(this.o.autoclose){this.hide();}},setDates:function(){var args=$.isArray(arguments[0])?arguments[0]:arguments;this.update.apply(this,args);this._trigger('changeDate');this.setValue();return this;},setUTCDates:function(){var args=$.isArray(arguments[0])?arguments[0]:arguments;this.setDates.apply(this,$.map(args,this._utc_to_local));return this;},setDate:alias('setDates'),setUTCDate:alias('setUTCDates'),remove:alias('destroy','Method `remove` is deprecated and will be removed in version 2.0. Use `destroy` instead'),setValue:function(){var formatted=this.getFormattedDate();this.inputField.val(formatted);return this;},getFormattedDate:function(format){if(format===undefined)
format=this.o.format;var lang=this.o.language;return $.map(this.dates,function(d){return DPGlobal.formatDate(d,format,lang);}).join(this.o.multidateSeparator);},getStartDate:function(){return this.o.startDate;},setStartDate:function(startDate){this._process_options({startDate:startDate});this.update();this.updateNavArrows();return this;},getEndDate:function(){return this.o.endDate;},setEndDate:function(endDate){this._process_options({endDate:endDate});this.update();this.updateNavArrows();return this;},setDaysOfWeekDisabled:function(daysOfWeekDisabled){this._process_options({daysOfWeekDisabled:daysOfWeekDisabled});this.update();return this;},setDaysOfWeekHighlighted:function(daysOfWeekHighlighted){this._process_options({daysOfWeekHighlighted:daysOfWeekHighlighted});this.update();return this;},setDatesDisabled:function(datesDisabled){this._process_options({datesDisabled:datesDisabled});this.update();return this;},place:function(){if(this.isInline)
return this;var calendarWidth=this.picker.outerWidth(),calendarHeight=this.picker.outerHeight(),visualPadding=10,container=$(this.o.container),windowWidth=container.width(),scrollTop=this.o.container==='body'?$(document).scrollTop():container.scrollTop(),appendOffset=container.offset();var parentsZindex=[0];this.element.parents().each(function(){var itemZIndex=$(this).css('z-index');if(itemZIndex!=='auto'&&Number(itemZIndex)!==0)
parentsZindex.push(Number(itemZIndex));});var zIndex=Math.max.apply(Math,parentsZindex)+this.o.zIndexOffset;var offset=this.component?this.component.parent().offset():this.element.offset();var height=this.component?this.component.outerHeight(true):this.element.outerHeight(false);var width=this.component?this.component.outerWidth(true):this.element.outerWidth(false);var left=offset.left-appendOffset.left;var top=offset.top-appendOffset.top;if(this.o.container!=='body'){top+=scrollTop;}
this.picker.removeClass('datepicker-orient-top datepicker-orient-bottom '+
'datepicker-orient-right datepicker-orient-left');if(this.o.orientation.x!=='auto'){this.picker.addClass('datepicker-orient-'+this.o.orientation.x);if(this.o.orientation.x==='right')
left-=calendarWidth-width;}
else{if(offset.left<0){this.picker.addClass('datepicker-orient-left');left-=offset.left-visualPadding;}else if(left+calendarWidth>windowWidth){this.picker.addClass('datepicker-orient-right');left+=width-calendarWidth;}else{if(this.o.rtl){this.picker.addClass('datepicker-orient-right');}else{this.picker.addClass('datepicker-orient-left');}}}
var yorient=this.o.orientation.y,top_overflow;if(yorient==='auto'){top_overflow=-scrollTop+top-calendarHeight;yorient=top_overflow<0?'bottom':'top';}
this.picker.addClass('datepicker-orient-'+yorient);if(yorient==='top')
top-=calendarHeight+parseInt(this.picker.css('padding-top'));else
top+=height;if(this.o.rtl){var right=windowWidth-(left+width);this.picker.css({top:top,right:right,zIndex:zIndex});}else{this.picker.css({top:top,left:left,zIndex:zIndex});}
return this;},_allow_update:true,update:function(){if(!this._allow_update)
return this;var oldDates=this.dates.copy(),dates=[],fromArgs=false;if(arguments.length){$.each(arguments,$.proxy(function(i,date){if(date instanceof Date)
date=this._local_to_utc(date);dates.push(date);},this));fromArgs=true;}else{dates=this.isInput?this.element.val():this.element.data('date')||this.inputField.val();if(dates&&this.o.multidate)
dates=dates.split(this.o.multidateSeparator);else
dates=[dates];delete this.element.data().date;}
dates=$.map(dates,$.proxy(function(date){return DPGlobal.parseDate(date,this.o.format,this.o.language,this.o.assumeNearbyYear);},this));dates=$.grep(dates,$.proxy(function(date){return(!this.dateWithinRange(date)||!date);},this),true);this.dates.replace(dates);if(this.o.updateViewDate){if(this.dates.length)
this.viewDate=new Date(this.dates.get(-1));else if(this.viewDate<this.o.startDate)
this.viewDate=new Date(this.o.startDate);else if(this.viewDate>this.o.endDate)
this.viewDate=new Date(this.o.endDate);else
this.viewDate=this.o.defaultViewDate;}
if(fromArgs){this.setValue();this.element.change();}else if(this.dates.length){if(String(oldDates)!==String(this.dates)&&fromArgs){this._trigger('changeDate');this.element.change();}}
if(!this.dates.length&&oldDates.length){this._trigger('clearDate');this.element.change();}
this.fill();return this;},fillDow:function(){if(this.o.showWeekDays){var dowCnt=this.o.weekStart,html='<tr>';if(this.o.calendarWeeks){html+='<th class="cw">&#160;</th>';}
while(dowCnt<this.o.weekStart+7){html+='<th class="dow';if($.inArray(dowCnt,this.o.daysOfWeekDisabled)!==-1)
html+=' disabled';html+='">'+dates[this.o.language].daysMin[(dowCnt++)%7]+'</th>';}
html+='</tr>';this.picker.find('.datepicker-days thead').append(html);}},fillMonths:function(){var localDate=this._utc_to_local(this.viewDate);var html='';var focused;for(var i=0;i<12;i++){focused=localDate&&localDate.getMonth()===i?' focused':'';html+='<span class="month'+focused+'">'+dates[this.o.language].monthsShort[i]+'</span>';}
this.picker.find('.datepicker-months td').html(html);},setRange:function(range){if(!range||!range.length)
delete this.range;else
this.range=$.map(range,function(d){return d.valueOf();});this.fill();},getClassNames:function(date){var cls=[],year=this.viewDate.getUTCFullYear(),month=this.viewDate.getUTCMonth(),today=UTCToday();if(date.getUTCFullYear()<year||(date.getUTCFullYear()===year&&date.getUTCMonth()<month)){cls.push('old');}else if(date.getUTCFullYear()>year||(date.getUTCFullYear()===year&&date.getUTCMonth()>month)){cls.push('new');}
if(this.focusDate&&date.valueOf()===this.focusDate.valueOf())
cls.push('focused');if(this.o.todayHighlight&&isUTCEquals(date,today)){cls.push('today');}
if(this.dates.contains(date)!==-1)
cls.push('active');if(!this.dateWithinRange(date)){cls.push('disabled');}
if(this.dateIsDisabled(date)){cls.push('disabled','disabled-date');}
if($.inArray(date.getUTCDay(),this.o.daysOfWeekHighlighted)!==-1){cls.push('highlighted');}
if(this.range){if(date>this.range[0]&&date<this.range[this.range.length-1]){cls.push('range');}
if($.inArray(date.valueOf(),this.range)!==-1){cls.push('selected');}
if(date.valueOf()===this.range[0]){cls.push('range-start');}
if(date.valueOf()===this.range[this.range.length-1]){cls.push('range-end');}}
return cls;},_fill_yearsView:function(selector,cssClass,factor,year,startYear,endYear,beforeFn){var html='';var step=factor/10;var view=this.picker.find(selector);var startVal=Math.floor(year/factor)*factor;var endVal=startVal+step*9;var focusedVal=Math.floor(this.viewDate.getFullYear()/step)*step;var selected=$.map(this.dates,function(d){return Math.floor(d.getUTCFullYear()/step)*step;});var classes,tooltip,before;for(var currVal=startVal-step;currVal<=endVal+step;currVal+=step){classes=[cssClass];tooltip=null;if(currVal===startVal-step){classes.push('old');}else if(currVal===endVal+step){classes.push('new');}
if($.inArray(currVal,selected)!==-1){classes.push('active');}
if(currVal<startYear||currVal>endYear){classes.push('disabled');}
if(currVal===focusedVal){classes.push('focused');}
if(beforeFn!==$.noop){before=beforeFn(new Date(currVal,0,1));if(before===undefined){before={};}else if(typeof before==='boolean'){before={enabled:before};}else if(typeof before==='string'){before={classes:before};}
if(before.enabled===false){classes.push('disabled');}
if(before.classes){classes=classes.concat(before.classes.split(/\s+/));}
if(before.tooltip){tooltip=before.tooltip;}}
html+='<span class="'+classes.join(' ')+'"'+(tooltip?' title="'+tooltip+'"':'')+'>'+currVal+'</span>';}
view.find('.datepicker-switch').text(startVal+'-'+endVal);view.find('td').html(html);},fill:function(){var d=new Date(this.viewDate),year=d.getUTCFullYear(),month=d.getUTCMonth(),startYear=this.o.startDate!==-Infinity?this.o.startDate.getUTCFullYear():-Infinity,startMonth=this.o.startDate!==-Infinity?this.o.startDate.getUTCMonth():-Infinity,endYear=this.o.endDate!==Infinity?this.o.endDate.getUTCFullYear():Infinity,endMonth=this.o.endDate!==Infinity?this.o.endDate.getUTCMonth():Infinity,todaytxt=dates[this.o.language].today||dates['en'].today||'',cleartxt=dates[this.o.language].clear||dates['en'].clear||'',titleFormat=dates[this.o.language].titleFormat||dates['en'].titleFormat,tooltip,before;if(isNaN(year)||isNaN(month))
return;this.picker.find('.datepicker-days .datepicker-switch').text(DPGlobal.formatDate(d,titleFormat,this.o.language));this.picker.find('tfoot .today').text(todaytxt).css('display',this.o.todayBtn===true||this.o.todayBtn==='linked'?'table-cell':'none');this.picker.find('tfoot .clear').text(cleartxt).css('display',this.o.clearBtn===true?'table-cell':'none');this.picker.find('thead .datepicker-title').text(this.o.title).css('display',typeof this.o.title==='string'&&this.o.title!==''?'table-cell':'none');this.updateNavArrows();this.fillMonths();var prevMonth=UTCDate(year,month,0),day=prevMonth.getUTCDate();prevMonth.setUTCDate(day-(prevMonth.getUTCDay()-this.o.weekStart+7)%7);var nextMonth=new Date(prevMonth);if(prevMonth.getUTCFullYear()<100){nextMonth.setUTCFullYear(prevMonth.getUTCFullYear());}
nextMonth.setUTCDate(nextMonth.getUTCDate()+42);nextMonth=nextMonth.valueOf();var html=[];var weekDay,clsName;while(prevMonth.valueOf()<nextMonth){weekDay=prevMonth.getUTCDay();if(weekDay===this.o.weekStart){html.push('<tr>');if(this.o.calendarWeeks){var
ws=new Date(+prevMonth+(this.o.weekStart-weekDay-7)%7*864e5),th=new Date(Number(ws)+(7+4-ws.getUTCDay())%7*864e5),yth=new Date(Number(yth=UTCDate(th.getUTCFullYear(),0,1))+(7+4-yth.getUTCDay())%7*864e5),calWeek=(th-yth)/864e5/7+1;html.push('<td class="cw">'+calWeek+'</td>');}}
clsName=this.getClassNames(prevMonth);clsName.push('day');var content=prevMonth.getUTCDate();if(this.o.beforeShowDay!==$.noop){before=this.o.beforeShowDay(this._utc_to_local(prevMonth));if(before===undefined)
before={};else if(typeof before==='boolean')
before={enabled:before};else if(typeof before==='string')
before={classes:before};if(before.enabled===false)
clsName.push('disabled');if(before.classes)
clsName=clsName.concat(before.classes.split(/\s+/));if(before.tooltip)
tooltip=before.tooltip;if(before.content)
content=before.content;}
if($.isFunction($.uniqueSort)){clsName=$.uniqueSort(clsName);}else{clsName=$.unique(clsName);}
html.push('<td class="'+clsName.join(' ')+'"'+(tooltip?' title="'+tooltip+'"':'')+' data-date="'+prevMonth.getTime().toString()+'">'+content+'</td>');tooltip=null;if(weekDay===this.o.weekEnd){html.push('</tr>');}
prevMonth.setUTCDate(prevMonth.getUTCDate()+1);}
this.picker.find('.datepicker-days tbody').html(html.join(''));var monthsTitle=dates[this.o.language].monthsTitle||dates['en'].monthsTitle||'Months';var months=this.picker.find('.datepicker-months').find('.datepicker-switch').text(this.o.maxViewMode<2?monthsTitle:year).end().find('tbody span').removeClass('active');$.each(this.dates,function(i,d){if(d.getUTCFullYear()===year)
months.eq(d.getUTCMonth()).addClass('active');});if(year<startYear||year>endYear){months.addClass('disabled');}
if(year===startYear){months.slice(0,startMonth).addClass('disabled');}
if(year===endYear){months.slice(endMonth+1).addClass('disabled');}
if(this.o.beforeShowMonth!==$.noop){var that=this;$.each(months,function(i,month){var moDate=new Date(year,i,1);var before=that.o.beforeShowMonth(moDate);if(before===undefined)
before={};else if(typeof before==='boolean')
before={enabled:before};else if(typeof before==='string')
before={classes:before};if(before.enabled===false&&!$(month).hasClass('disabled'))
$(month).addClass('disabled');if(before.classes)
$(month).addClass(before.classes);if(before.tooltip)
$(month).prop('title',before.tooltip);});}
this._fill_yearsView('.datepicker-years','year',10,year,startYear,endYear,this.o.beforeShowYear);this._fill_yearsView('.datepicker-decades','decade',100,year,startYear,endYear,this.o.beforeShowDecade);this._fill_yearsView('.datepicker-centuries','century',1000,year,startYear,endYear,this.o.beforeShowCentury);},updateNavArrows:function(){if(!this._allow_update)
return;var d=new Date(this.viewDate),year=d.getUTCFullYear(),month=d.getUTCMonth(),startYear=this.o.startDate!==-Infinity?this.o.startDate.getUTCFullYear():-Infinity,startMonth=this.o.startDate!==-Infinity?this.o.startDate.getUTCMonth():-Infinity,endYear=this.o.endDate!==Infinity?this.o.endDate.getUTCFullYear():Infinity,endMonth=this.o.endDate!==Infinity?this.o.endDate.getUTCMonth():Infinity,prevIsDisabled,nextIsDisabled,factor=1;switch(this.viewMode){case 0:prevIsDisabled=year<=startYear&&month<=startMonth;nextIsDisabled=year>=endYear&&month>=endMonth;break;case 4:factor*=10;case 3:factor*=10;case 2:factor*=10;case 1:prevIsDisabled=Math.floor(year/factor)*factor<=startYear;nextIsDisabled=Math.floor(year/factor)*factor+factor>=endYear;break;}
this.picker.find('.prev').toggleClass('disabled',prevIsDisabled);this.picker.find('.next').toggleClass('disabled',nextIsDisabled);},click:function(e){e.preventDefault();e.stopPropagation();var target,dir,day,year,month;target=$(e.target);if(target.hasClass('datepicker-switch')&&this.viewMode!==this.o.maxViewMode){this.setViewMode(this.viewMode+1);}
if(target.hasClass('today')&&!target.hasClass('day')){this.setViewMode(0);this._setDate(UTCToday(),this.o.todayBtn==='linked'?null:'view');}
if(target.hasClass('clear')){this.clearDates();}
if(!target.hasClass('disabled')){if(target.hasClass('month')||target.hasClass('year')||target.hasClass('decade')||target.hasClass('century')){this.viewDate.setUTCDate(1);day=1;if(this.viewMode===1){month=target.parent().find('span').index(target);year=this.viewDate.getUTCFullYear();this.viewDate.setUTCMonth(month);}else{month=0;year=Number(target.text());this.viewDate.setUTCFullYear(year);}
this._trigger(DPGlobal.viewModes[this.viewMode-1].e,this.viewDate);if(this.viewMode===this.o.minViewMode){this._setDate(UTCDate(year,month,day));}else{this.setViewMode(this.viewMode-1);this.fill();}}}
if(this.picker.is(':visible')&&this._focused_from){this._focused_from.focus();}
delete this._focused_from;},dayCellClick:function(e){var $target=$(e.currentTarget);var timestamp=$target.data('date');var date=new Date(timestamp);if(this.o.updateViewDate){if(date.getUTCFullYear()!==this.viewDate.getUTCFullYear()){this._trigger('changeYear',this.viewDate);}
if(date.getUTCMonth()!==this.viewDate.getUTCMonth()){this._trigger('changeMonth',this.viewDate);}}
this._setDate(date);},navArrowsClick:function(e){var $target=$(e.currentTarget);var dir=$target.hasClass('prev')?-1:1;if(this.viewMode!==0){dir*=DPGlobal.viewModes[this.viewMode].navStep*12;}
this.viewDate=this.moveMonth(this.viewDate,dir);this._trigger(DPGlobal.viewModes[this.viewMode].e,this.viewDate);this.fill();},_toggle_multidate:function(date){var ix=this.dates.contains(date);if(!date){this.dates.clear();}
if(ix!==-1){if(this.o.multidate===true||this.o.multidate>1||this.o.toggleActive){this.dates.remove(ix);}}else if(this.o.multidate===false){this.dates.clear();this.dates.push(date);}else{this.dates.push(date);}
if(typeof this.o.multidate==='number')
while(this.dates.length>this.o.multidate)
this.dates.remove(0);},_setDate:function(date,which){if(!which||which==='date')
this._toggle_multidate(date&&new Date(date));if((!which&&this.o.updateViewDate)||which==='view')
this.viewDate=date&&new Date(date);this.fill();this.setValue();if(!which||which!=='view'){this._trigger('changeDate');}
this.inputField.trigger('change');if(this.o.autoclose&&(!which||which==='date')){this.hide();}},moveDay:function(date,dir){var newDate=new Date(date);newDate.setUTCDate(date.getUTCDate()+dir);return newDate;},moveWeek:function(date,dir){return this.moveDay(date,dir*7);},moveMonth:function(date,dir){if(!isValidDate(date))
return this.o.defaultViewDate;if(!dir)
return date;var new_date=new Date(date.valueOf()),day=new_date.getUTCDate(),month=new_date.getUTCMonth(),mag=Math.abs(dir),new_month,test;dir=dir>0?1:-1;if(mag===1){test=dir===-1?function(){return new_date.getUTCMonth()===month;}:function(){return new_date.getUTCMonth()!==new_month;};new_month=month+dir;new_date.setUTCMonth(new_month);new_month=(new_month+12)%12;}else{for(var i=0;i<mag;i++)
new_date=this.moveMonth(new_date,dir);new_month=new_date.getUTCMonth();new_date.setUTCDate(day);test=function(){return new_month!==new_date.getUTCMonth();};}
while(test()){new_date.setUTCDate(--day);new_date.setUTCMonth(new_month);}
return new_date;},moveYear:function(date,dir){return this.moveMonth(date,dir*12);},moveAvailableDate:function(date,dir,fn){do{date=this[fn](date,dir);if(!this.dateWithinRange(date))
return false;fn='moveDay';}while(this.dateIsDisabled(date));return date;},weekOfDateIsDisabled:function(date){return $.inArray(date.getUTCDay(),this.o.daysOfWeekDisabled)!==-1;},dateIsDisabled:function(date){return(this.weekOfDateIsDisabled(date)||$.grep(this.o.datesDisabled,function(d){return isUTCEquals(date,d);}).length>0);},dateWithinRange:function(date){return date>=this.o.startDate&&date<=this.o.endDate;},keydown:function(e){if(!this.picker.is(':visible')){if(e.keyCode===40||e.keyCode===27){this.show();e.stopPropagation();}
return;}
var dateChanged=false,dir,newViewDate,focusDate=this.focusDate||this.viewDate;switch(e.keyCode){case 27:if(this.focusDate){this.focusDate=null;this.viewDate=this.dates.get(-1)||this.viewDate;this.fill();}else
this.hide();e.preventDefault();e.stopPropagation();break;case 37:case 38:case 39:case 40:if(!this.o.keyboardNavigation||this.o.daysOfWeekDisabled.length===7)
break;dir=e.keyCode===37||e.keyCode===38?-1:1;if(this.viewMode===0){if(e.ctrlKey){newViewDate=this.moveAvailableDate(focusDate,dir,'moveYear');if(newViewDate)
this._trigger('changeYear',this.viewDate);}else if(e.shiftKey){newViewDate=this.moveAvailableDate(focusDate,dir,'moveMonth');if(newViewDate)
this._trigger('changeMonth',this.viewDate);}else if(e.keyCode===37||e.keyCode===39){newViewDate=this.moveAvailableDate(focusDate,dir,'moveDay');}else if(!this.weekOfDateIsDisabled(focusDate)){newViewDate=this.moveAvailableDate(focusDate,dir,'moveWeek');}}else if(this.viewMode===1){if(e.keyCode===38||e.keyCode===40){dir=dir*4;}
newViewDate=this.moveAvailableDate(focusDate,dir,'moveMonth');}else if(this.viewMode===2){if(e.keyCode===38||e.keyCode===40){dir=dir*4;}
newViewDate=this.moveAvailableDate(focusDate,dir,'moveYear');}
if(newViewDate){this.focusDate=this.viewDate=newViewDate;this.setValue();this.fill();e.preventDefault();}
break;case 13:if(!this.o.forceParse)
break;focusDate=this.focusDate||this.dates.get(-1)||this.viewDate;if(this.o.keyboardNavigation){this._toggle_multidate(focusDate);dateChanged=true;}
this.focusDate=null;this.viewDate=this.dates.get(-1)||this.viewDate;this.setValue();this.fill();if(this.picker.is(':visible')){e.preventDefault();e.stopPropagation();if(this.o.autoclose)
this.hide();}
break;case 9:this.focusDate=null;this.viewDate=this.dates.get(-1)||this.viewDate;this.fill();this.hide();break;}
if(dateChanged){if(this.dates.length)
this._trigger('changeDate');else
this._trigger('clearDate');this.inputField.trigger('change');}},setViewMode:function(viewMode){this.viewMode=viewMode;this.picker.children('div').hide().filter('.datepicker-'+DPGlobal.viewModes[this.viewMode].clsName).show();this.updateNavArrows();this._trigger('changeViewMode',new Date(this.viewDate));}};var DateRangePicker=function(element,options){$.data(element,'datepicker',this);this.element=$(element);this.inputs=$.map(options.inputs,function(i){return i.jquery?i[0]:i;});delete options.inputs;this.keepEmptyValues=options.keepEmptyValues;delete options.keepEmptyValues;datepickerPlugin.call($(this.inputs),options).on('changeDate',$.proxy(this.dateUpdated,this));this.pickers=$.map(this.inputs,function(i){return $.data(i,'datepicker');});this.updateDates();};DateRangePicker.prototype={updateDates:function(){this.dates=$.map(this.pickers,function(i){return i.getUTCDate();});this.updateRanges();},updateRanges:function(){var range=$.map(this.dates,function(d){return d.valueOf();});$.each(this.pickers,function(i,p){p.setRange(range);});},dateUpdated:function(e){if(this.updating)
return;this.updating=true;var dp=$.data(e.target,'datepicker');if(dp===undefined){return;}
var new_date=dp.getUTCDate(),keep_empty_values=this.keepEmptyValues,i=$.inArray(e.target,this.inputs),j=i-1,k=i+1,l=this.inputs.length;if(i===-1)
return;$.each(this.pickers,function(i,p){if(!p.getUTCDate()&&(p===dp||!keep_empty_values))
p.setUTCDate(new_date);});if(new_date<this.dates[j]){while(j>=0&&new_date<this.dates[j]){this.pickers[j--].setUTCDate(new_date);}}else if(new_date>this.dates[k]){while(k<l&&new_date>this.dates[k]){this.pickers[k++].setUTCDate(new_date);}}
this.updateDates();delete this.updating;},destroy:function(){$.map(this.pickers,function(p){p.destroy();});$(this.inputs).off('changeDate',this.dateUpdated);delete this.element.data().datepicker;},remove:alias('destroy','Method `remove` is deprecated and will be removed in version 2.0. Use `destroy` instead')};function opts_from_el(el,prefix){var data=$(el).data(),out={},inkey,replace=new RegExp('^'+prefix.toLowerCase()+'([A-Z])');prefix=new RegExp('^'+prefix.toLowerCase());function re_lower(_,a){return a.toLowerCase();}
for(var key in data)
if(prefix.test(key)){inkey=key.replace(replace,re_lower);out[inkey]=data[key];}
return out;}
function opts_from_locale(lang){var out={};if(!dates[lang]){lang=lang.split('-')[0];if(!dates[lang])
return;}
var d=dates[lang];$.each(locale_opts,function(i,k){if(k in d)
out[k]=d[k];});return out;}
var old=$.fn.datepicker;var datepickerPlugin=function(option){var args=Array.apply(null,arguments);args.shift();var internal_return;this.each(function(){var $this=$(this),data=$this.data('datepicker'),options=typeof option==='object'&&option;if(!data){var elopts=opts_from_el(this,'date'),xopts=$.extend({},defaults,elopts,options),locopts=opts_from_locale(xopts.language),opts=$.extend({},defaults,locopts,elopts,options);if($this.hasClass('input-daterange')||opts.inputs){$.extend(opts,{inputs:opts.inputs||$this.find('input').toArray()});data=new DateRangePicker(this,opts);}else{data=new Datepicker(this,opts);}
$this.data('datepicker',data);}
if(typeof option==='string'&&typeof data[option]==='function'){internal_return=data[option].apply(data,args);}});if(internal_return===undefined||internal_return instanceof Datepicker||internal_return instanceof DateRangePicker)
return this;if(this.length>1)
throw new Error('Using only allowed for the collection of a single element ('+option+' function)');else
return internal_return;};$.fn.datepicker=datepickerPlugin;var defaults=$.fn.datepicker.defaults={assumeNearbyYear:false,autoclose:false,beforeShowDay:$.noop,beforeShowMonth:$.noop,beforeShowYear:$.noop,beforeShowDecade:$.noop,beforeShowCentury:$.noop,calendarWeeks:false,clearBtn:false,toggleActive:false,daysOfWeekDisabled:[],daysOfWeekHighlighted:[],datesDisabled:[],endDate:Infinity,forceParse:true,format:'mm/dd/yyyy',keepEmptyValues:false,keyboardNavigation:true,language:'en',minViewMode:0,maxViewMode:4,multidate:false,multidateSeparator:',',orientation:"auto",rtl:false,startDate:-Infinity,startView:0,todayBtn:false,todayHighlight:true,updateViewDate:true,weekStart:0,disableTouchKeyboard:false,enableOnReadonly:true,showOnFocus:true,zIndexOffset:10,container:'body',immediateUpdates:false,title:'',templates:{leftArrow:'&#x00AB;',rightArrow:'&#x00BB;'},showWeekDays:true};var locale_opts=$.fn.datepicker.locale_opts=['format','rtl','weekStart'];$.fn.datepicker.Constructor=Datepicker;var dates=$.fn.datepicker.dates={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",clear:"Clear",titleFormat:"MM yyyy"}};var DPGlobal={viewModes:[{names:['days','month'],clsName:'days',e:'changeMonth'},{names:['months','year'],clsName:'months',e:'changeYear',navStep:1},{names:['years','decade'],clsName:'years',e:'changeDecade',navStep:10},{names:['decades','century'],clsName:'decades',e:'changeCentury',navStep:100},{names:['centuries','millennium'],clsName:'centuries',e:'changeMillennium',navStep:1000}],validParts:/dd?|DD?|mm?|MM?|yy(?:yy)?/g,nonpunctuation:/[^ -\/:-@\u5e74\u6708\u65e5\[-`{-~\t\n\r]+/g,parseFormat:function(format){if(typeof format.toValue==='function'&&typeof format.toDisplay==='function')
return format;var separators=format.replace(this.validParts,'\0').split('\0'),parts=format.match(this.validParts);if(!separators||!separators.length||!parts||parts.length===0){throw new Error("Invalid date format.");}
return{separators:separators,parts:parts};},parseDate:function(date,format,language,assumeNearby){if(!date)
return undefined;if(date instanceof Date)
return date;if(typeof format==='string')
format=DPGlobal.parseFormat(format);if(format.toValue)
return format.toValue(date,format,language);var fn_map={d:'moveDay',m:'moveMonth',w:'moveWeek',y:'moveYear'},dateAliases={yesterday:'-1d',today:'+0d',tomorrow:'+1d'},parts,part,dir,i,fn;if(date in dateAliases){date=dateAliases[date];}
if(/^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/i.test(date)){parts=date.match(/([\-+]\d+)([dmwy])/gi);date=new Date();for(i=0;i<parts.length;i++){part=parts[i].match(/([\-+]\d+)([dmwy])/i);dir=Number(part[1]);fn=fn_map[part[2].toLowerCase()];date=Datepicker.prototype[fn](date,dir);}
return Datepicker.prototype._zero_utc_time(date);}
parts=date&&date.match(this.nonpunctuation)||[];function applyNearbyYear(year,threshold){if(threshold===true)
threshold=10;if(year<100){year+=2000;if(year>((new Date()).getFullYear()+threshold)){year-=100;}}
return year;}
var parsed={},setters_order=['yyyy','yy','M','MM','m','mm','d','dd'],setters_map={yyyy:function(d,v){return d.setUTCFullYear(assumeNearby?applyNearbyYear(v,assumeNearby):v);},m:function(d,v){if(isNaN(d))
return d;v-=1;while(v<0)
v+=12;v%=12;d.setUTCMonth(v);while(d.getUTCMonth()!==v)
d.setUTCDate(d.getUTCDate()-1);return d;},d:function(d,v){return d.setUTCDate(v);}},val,filtered;setters_map['yy']=setters_map['yyyy'];setters_map['M']=setters_map['MM']=setters_map['mm']=setters_map['m'];setters_map['dd']=setters_map['d'];date=UTCToday();var fparts=format.parts.slice();if(parts.length!==fparts.length){fparts=$(fparts).filter(function(i,p){return $.inArray(p,setters_order)!==-1;}).toArray();}
function match_part(){var m=this.slice(0,parts[i].length),p=parts[i].slice(0,m.length);return m.toLowerCase()===p.toLowerCase();}
if(parts.length===fparts.length){var cnt;for(i=0,cnt=fparts.length;i<cnt;i++){val=parseInt(parts[i],10);part=fparts[i];if(isNaN(val)){switch(part){case 'MM':filtered=$(dates[language].months).filter(match_part);val=$.inArray(filtered[0],dates[language].months)+1;break;case 'M':filtered=$(dates[language].monthsShort).filter(match_part);val=$.inArray(filtered[0],dates[language].monthsShort)+1;break;}}
parsed[part]=val;}
var _date,s;for(i=0;i<setters_order.length;i++){s=setters_order[i];if(s in parsed&&!isNaN(parsed[s])){_date=new Date(date);setters_map[s](_date,parsed[s]);if(!isNaN(_date))
date=_date;}}}
return date;},formatDate:function(date,format,language){if(!date)
return '';if(typeof format==='string')
format=DPGlobal.parseFormat(format);if(format.toDisplay)
return format.toDisplay(date,format,language);var val={d:date.getUTCDate(),D:dates[language].daysShort[date.getUTCDay()],DD:dates[language].days[date.getUTCDay()],m:date.getUTCMonth()+1,M:dates[language].monthsShort[date.getUTCMonth()],MM:dates[language].months[date.getUTCMonth()],yy:date.getUTCFullYear().toString().substring(2),yyyy:date.getUTCFullYear()};val.dd=(val.d<10?'0':'')+val.d;val.mm=(val.m<10?'0':'')+val.m;date=[];var seps=$.extend([],format.separators);for(var i=0,cnt=format.parts.length;i<=cnt;i++){if(seps.length)
date.push(seps.shift());date.push(val[format.parts[i]]);}
return date.join('');},headTemplate:'<thead>'+
'<tr>'+
'<th colspan="7" class="datepicker-title"></th>'+
'</tr>'+
'<tr>'+
'<th class="prev">&laquo;</th>'+
'<th colspan="5" class="datepicker-switch"></th>'+
'<th class="next">&raquo;</th>'+
'</tr>'+
'</thead>',contTemplate:'<tbody><tr><td colspan="7"></td></tr></tbody>',footTemplate:'<tfoot>'+
'<tr>'+
'<th colspan="7" class="today"></th>'+
'</tr>'+
'<tr>'+
'<th colspan="7" class="clear"></th>'+
'</tr>'+
'</tfoot>'};DPGlobal.template='<div class="datepicker">'+
'<div class="datepicker-days">'+
'<table class="table-condensed">'+
DPGlobal.headTemplate+
'<tbody></tbody>'+
DPGlobal.footTemplate+
'</table>'+
'</div>'+
'<div class="datepicker-months">'+
'<table class="table-condensed">'+
DPGlobal.headTemplate+
DPGlobal.contTemplate+
DPGlobal.footTemplate+
'</table>'+
'</div>'+
'<div class="datepicker-years">'+
'<table class="table-condensed">'+
DPGlobal.headTemplate+
DPGlobal.contTemplate+
DPGlobal.footTemplate+
'</table>'+
'</div>'+
'<div class="datepicker-decades">'+
'<table class="table-condensed">'+
DPGlobal.headTemplate+
DPGlobal.contTemplate+
DPGlobal.footTemplate+
'</table>'+
'</div>'+
'<div class="datepicker-centuries">'+
'<table class="table-condensed">'+
DPGlobal.headTemplate+
DPGlobal.contTemplate+
DPGlobal.footTemplate+
'</table>'+
'</div>'+
'</div>';$.fn.datepicker.DPGlobal=DPGlobal;$.fn.datepicker.noConflict=function(){$.fn.datepicker=old;return this;};$.fn.datepicker.version='1.7.0-RC1';$.fn.datepicker.deprecated=function(msg){var console=window.console;if(console&&console.warn){console.warn('DEPRECATED: '+msg);}};$(document).on('focus.datepicker.data-api click.datepicker.data-api','[data-provide="datepicker"]',function(e){var $this=$(this);if($this.data('datepicker'))
return;e.preventDefault();datepickerPlugin.call($this,'show');});$(function(){datepickerPlugin.call($('[data-provide="datepicker-inline"]'));});}));var headerHeight=$('#header-wrap').outerHeight();$(function(){setDotPosition();$('#page-content .col-md-6 p.lead').matchHeight({byRow:false,});$('#page-content .col-md-6 h2.text-center').matchHeight({byRow:false,});$(document).ready(function(){$(".btn__google-custom").click(function(){$('#loadingbtn').show();$('#loginbtn').css('pointer-events','none');});});if($('.trendingbar-hide').length){$('.trendingbar-hide').remove();$("header#header").css("top","0");}
if($('.customZoomEffect').length){$('.customZoomEffect .animateText').addClass('zoomIn');}
$(this).scrollTop(0);replceBG();$('.scroll-down a,.scroll').bind('click',function(event){var anchor=$(this);console.log("scroll works");$('html, body').stop().animate({scrollTop:($(anchor.attr('href')).offset().top-headerH())},1500,'easeInOutQuart');event.preventDefault();});$('#mainMenu nav > ul > li a').bind('click',function(event){var anchor=this.hash.substr(0);if(anchor.length){$('html, body').stop().animate({scrollTop:($(anchor).offset().top-headerH())},1500,'easeInOutQuart');event.preventDefault();}});$('.cus-scroll').bind('click',function(event){var anchor=this.hash.substr(0);if(anchor.length){$('html, body').stop().animate({scrollTop:($(anchor).offset().top-headerH()+3)},1500,'easeInOutQuart');event.preventDefault();}});$(document).on('click','.next-step',function(){$('.tabs-navigation .active').next().find('a').trigger('click');});$(document).on('click','.prev-step',function(){$('.tabs-navigation .active').prev().find('a').trigger('click');});$('.dropdown').each(function(){$(this).append('<div class="arrow"><i class="fa fa-angle-down"></i></div>');});$('.arrow').on('click',function(){$(this).parent().siblings('li').removeClass('sub--active').find('.dropdown-menu').slideUp();$(this).parent().siblings('li').find('.dropdown').removeClass('sub--active');$(this).parent().toggleClass('sub--active').find('.dropdown-menu').first().slideToggle();});$('.navmenu-item a').on('click',function(){$(this).parent().siblings('li').removeClass('sub--active').find('.dropdown-menu').slideUp();$(this).parent().siblings('li').find('.dropdown').removeClass('sub--active');$(this).parent().toggleClass('sub--active').find('.dropdown-menu').first().slideToggle();$('#mainMenu').css('max-height','660px');});$('.has-sub > a').on('click',function(e){$(this).parent().siblings().removeClass('open').find('ul').slideUp('fast');$(this).parent().toggleClass('open').find('ul').slideToggle('fast');e.preventDefault();});setTimeout(function(){$('.cus-loader').fadeOut();},1000);$('.inspiro-slider .slide,.winh,.section-video').height(winh());$('.sec-404').height(winh());$('.topbar-dropdown .title').on('click',function(){$(this).parent().find('.dropdown-list').toggle();});if($('.century-mile').length){$('body').addClass('centurymile-body');}
$('.next-deal-trigger').on('click',function(){$('body').removeClass('landing-calander--hidden');});$('.landing-calander-close').on('click',function(){$('body').addClass('landing-calander--hidden');});if(winw()<1026&&$('.eventCalender-section-wrapper').length){$('.grid-filter.gf-outline li:first-child a').trigger('click');$('.mobile-filter-wrap.first-filter li:first-child a').trigger('click');}
if($('.calender-details-section').length){$('.calender-details-section .image-block-img').each(function(){$(this).parent().css('background-image','url('+$(this).attr('src')+')');});}
$('.menu_image').each(function(){$(this).parent().addClass('has-image');});dailyPromotionsSlider();promotionsThreeSlider();locationSlider();});function dailyPromotionsSlider(){var dailyPromotions=$('.daily-promotions-slider-init');if(dailyPromotions.length){var item_count=parseInt($('.daily-promotions-slider-init').find('.daily-promotions-slide').length);if(winw()<992){if(dailyPromotions.find('.daily-promotions-slide').length>1){dailyPromotions.owlCarousel({items:4,loop:true,nav:true,margin:20,navText:['<i class="fa fa-angle-left"></i>','<i class="fa fa-angle-right"></i>'],dots:true,touchDrag:true,mouseDrag:true,onInitialize:function(){if(item_count<2){this.settings.autoplay=false;this.settings.nav=false;this.settings.dots=false;this.settings.touchDrag=false;this.settings.mouseDrag=false;}},responsive:{0:{items:1},600:{items:2},767:{items:2},992:{items:3},1300:{items:4}}});}}else{if(dailyPromotions.find('.daily-promotions-slide').length>3){dailyPromotions.owlCarousel({items:4,loop:true,nav:true,margin:20,navText:['<i class="fa fa-angle-left"></i>','<i class="fa fa-angle-right"></i>'],dots:true,touchDrag:true,mouseDrag:true,onInitialize:function(){if(item_count<5){this.settings.autoplay=false;this.settings.nav=false;this.settings.dots=false;this.settings.touchDrag=false;this.settings.mouseDrag=false;}},responsive:{0:{items:1},600:{items:2},767:{items:2},992:{items:3},1300:{items:4}}});}}}}
function promotionsThreeSlider(){var promotionsThree=$('.promotions-three-slider-init');if(promotionsThree.length){var item_count=parseInt($('.promotions-three-slider-init').find('.daily-promotions-slide').length);if(winw()<992){if(promotionsThree.find('.daily-promotions-slide').length>1){promotionsThree.owlCarousel({items:3,loop:true,nav:true,margin:20,navText:['<i class="fa fa-angle-left"></i>','<i class="fa fa-angle-right"></i>'],dots:true,dotsEach:true,touchDrag:true,mouseDrag:true,onInitialize:function(){if(item_count<2){this.settings.autoplay=false;this.settings.nav=false;this.settings.dots=false;this.settings.touchDrag=false;this.settings.mouseDrag=false;}},responsive:{0:{items:1},600:{items:2},767:{items:2}}});}}else{if(promotionsThree.find('.daily-promotions-slide').length>2){promotionsThree.owlCarousel({items:3,loop:true,nav:true,margin:20,navText:['<i class="fa fa-angle-left"></i>','<i class="fa fa-angle-right"></i>'],dots:true,dotsEach:true,touchDrag:true,mouseDrag:true,onInitialize:function(){if(item_count<4){this.settings.autoplay=false;this.settings.nav=false;this.settings.dots=false;this.settings.touchDrag=false;this.settings.mouseDrag=false;}},responsive:{0:{items:1},600:{items:2},767:{items:2},992:{items:3},1300:{items:3}}});}}}}
function locationSlider(){var locationSlider=$('.location-mobile-slider-init');if(locationSlider.length){var item_count=parseInt($('.location-mobile-slider-init').find('.team-member').length);if(winw()<992){if(locationSlider.find('.team-member').length>1){locationSlider.owlCarousel({items:3,loop:true,nav:true,margin:15,navText:['<i class="fa fa-angle-left"></i>','<i class="fa fa-angle-right"></i>'],dots:false,touchDrag:true,mouseDrag:true,onInitialize:function(){if(item_count<2){this.settings.autoplay=false;this.settings.nav=false;this.settings.touchDrag=false;this.settings.mouseDrag=false;}},responsive:{0:{items:1},600:{items:2},767:{items:2},992:{items:3}}});}}}}
$(window).resize(function(){setDotPosition();$('.inspiro-slider .slide,.winh,.section-video').height(winh());$('.sec-404').height(winh());if(winw()<1026&&$('.eventCalender-section-wrapper').length){$('.grid-filter.gf-outline li:first-child a').trigger('click');}
setTimeout(function(){dailyPromotionsSlider();promotionsThreeSlider();locationSlider();$('.tx-cnty-calendar .image-block .col-md-6').css('min-height',winh()-$('#page-title').outerHeight()-$('.cus-footer').outerHeight());},100);});function headerH(){return $('header').outerHeight();}
function winh(){return $(window).height();}
function winw(){return $(window).width();}
function footerh(){return $('footer').outerHeight();}
$(window).load(function(){setDotPosition();$('.cus-loader').fadeOut();setTimeout(function(){var type=window.location.hash.substr(1);if(type.length&&window.location.href.indexOf("filter")<0){var MainTarget=($('#'+type).offset().top);$('html, body').animate({scrollTop:MainTarget-headerHeight},1500,'easeInOutQuart');}},200);setTimeout(function(){$('.tx-cnty-calendar .image-block .col-md-6').css('min-height',winh()-$('#page-title').outerHeight()-$('.cus-footer').outerHeight());},100);});$(document).ready(function(){var d=new Date();var day=d.getDate()-1;var month=d.getMonth();var year=d.getFullYear();var date=year+'-'+month+'-'+day;if(($(window).width()<1025)){$('#myModal .modal-body').css('height',$(window).height()-40);$('#myModal .modal-body iframe').css('height',$(window).height()-140);setTimeout(function(){$('#myModal').modal('show');},1400);}
$('.powermail_fieldwrap_av').hide();$('#powermail_field_optionalpackage').change(function(){var opt_pack=$('#powermail_field_optionalpackage').val();if(opt_pack==''){$('.powermail_fieldwrap_av').hide();}else{$('.powermail_fieldwrap_av').show();}});var datepicker=$('#datetimepicker1');var datebirthday=$('#birthday');if(datepicker.length>0){datepicker.datepicker({startDate:new Date()});}
if(datebirthday.length>0){datebirthday.datepicker({format:'yyyy-mm-dd',endDate:date});}
if($('.selectable-datepicker').length){$('.selectable-datepicker').datepicker();}
$('.gallery-block .image-hover-zoom').on('click',function(e){if(winw()<768){e.stopPropagation()
e.preventDefault();}});$('#powermail_field_confirmemail').on('blur',function(){var email=$("#powermail_field_email").val();var confemail=$("#powermail_field_confirmemail").val();if(email!=confemail){$("#powermail_field_confirmemail").val('');$("#powermail_field_confirmemail").css("border-color","#b70c14");}else{$("#powermail_field_confirmemail").removeAttr("style")}});var pTags=$("p span").not(".slide-captions p span");pTags.unwrap();var spTags=$("p small");spTags.unwrap();$("div.seperator p").remove('p');$('p:empty').remove();$(".mega-menu-item.scrollmenu .mega-menu-content .col-md-3 ul li a").each(function(){if($(this).attr("data-id")!=''||$(this).attr("data-id")!='undefined'){var parentEls=$(this).parent().parent().parent().parent().parent().parent().siblings("a").attr("href");var subt=$(this).attr("data-id");if(subt!=''||subt!='undefined'){$(this).attr("href",parentEls+subt);}}});$(".page-menu.scroll-down ul li a").each(function(){if($(this).attr("data-id")!=''||$(this).attr("data-id")!='undefined'){var subt=$(this).attr("data-id");if(subt!=''||subt!='undefined'){var curr_url=window.location.href.split('#',1);$(this).attr("href",curr_url+subt);}}});$(".footer-nav ul li a.scrollmenu").each(function(){if($(this).attr("data-id")!=''){var subt=$(this).attr("data-id");if(subt!=''||subt!='undefined'){var scrollmenuurl=$(".dropdown.mega-menu-item.scrollmenu a:first").attr("href");$(this).attr("href",scrollmenuurl+subt);}}});$('.pdf-lightbox-listing').each(function(){if($(this).find('.row').length){var $this=$(this).find('.row');if($this.html().replace(/\s|&nbsp;/g,'').length==0){$this.parents('.pdf-lightbox-listing').remove();}}});$('.trending-close-icon').on('click',function(e){$('.trending-topbar').addClass('trendingbar-hide')})
var len=$('.ticker-item').text().length;if(len<17){$(".ticker").css('animation-duration','10s');}
else if(len>17&&len<30){$(".ticker").css('animation-duration','15s');}
else if(len>30&&len<55){$(".ticker").css('animation-duration','18s');}
else if(len>55&&len<80){$(".ticker").css('animation-duration','23s');}
else{$(".ticker").css('animation-duration','35s');}});$(window).load(function(){if(($(window).width()<1025)){$('#myModal .modal-body').css('height',$(window).height()-40);$('#myModal .modal-body iframe').css('height',$(window).height()-140);setTimeout(function(){$('#myModal').modal('show');},1400);}});$(window).resize(function(){if(($(window).width()<1025)){$('#myModal .modal-body').css('height',$(window).height()-40);$('#myModal .modal-body iframe').css('height',$(window).height()-140);}});$(document).on("touchstart click",function(e){container=$('.topbar-dropdown');contactInfo=$('.topbar-dropdown');if(!container.is(e.target)&&container.has(e.target).length===0&&!contactInfo.is(e.target)&&contactInfo.has(e.target).length===0)
{$('.topbar-dropdown .dropdown-list').hide();}});$(window).scroll(function(){if(!$(".trending-topbar").hasClass("trendingbar-hide")){var Topscroll=$(window).scrollTop();if(Topscroll>=1){$("header").addClass("trendingHeader");}
else{$("header").removeClass("trendingHeader");}}});if($('.landing-calander-slider').length){$(window).scroll(function(){var scroll=$(window).scrollTop();if(scroll>=100){$('body').addClass('landing-calander--hidden');}else{$('body').removeClass('landing-calander--hidden');}});}
function replceBG(){$('.bg-place-holder').each(function(){var imgSrc=$(this).children('img').attr('src');$(this).css('background-image','url("'+imgSrc+'")');$(this).children('img').hide();});}
function setDotPosition(){if(window.matchMedia('(max-width: 767px)').matches){var imgHeight=$('.pattern-carousel-section-full .pattern-carousel .owl-item.active .pattern-slide__image').outerHeight();$('.pattern-carousel-section-full .owl-controls .owl-dots').css('top',(imgHeight-35)+'px')
var imgHeight=$('.pattern-carousel-section-full .pattern-carousel .owl-item.active .pattern-slide__image').outerHeight();$('.pattern-carousel-section-full .scrolldown-animation').css('top',(imgHeight-60)+'px')}else{$('.pattern-carousel-section-full .owl-controls .owl-dots').css('top','auto');$('.pattern-carousel-section-full .scrolldown-animation').css('top','auto');}}/*! lozad.js - v1.16.0 - 2020-09-06
* https://github.com/ApoorvSaxena/lozad.js
* Copyright (c) 2020 Apoorv Saxena; Licensed MIT */
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.lozad=e()}(this,function(){"use strict";var g="undefined"!=typeof document&&document.documentMode,f={rootMargin:"0px",threshold:0,load:function(t){if("picture"===t.nodeName.toLowerCase()){var e=t.querySelector("img"),r=!1;null===e&&(e=document.createElement("img"),r=!0),g&&t.getAttribute("data-iesrc")&&(e.src=t.getAttribute("data-iesrc")),t.getAttribute("data-alt")&&(e.alt=t.getAttribute("data-alt")),r&&t.append(e)}if("video"===t.nodeName.toLowerCase()&&!t.getAttribute("data-src")&&t.children){for(var a=t.children,o=void 0,i=0;i<=a.length-1;i++)(o=a[i].getAttribute("data-src"))&&(a[i].src=o);t.load()}t.getAttribute("data-poster")&&(t.poster=t.getAttribute("data-poster")),t.getAttribute("data-src")&&(t.src=t.getAttribute("data-src")),t.getAttribute("data-srcset")&&t.setAttribute("srcset",t.getAttribute("data-srcset"));var n=",";if(t.getAttribute("data-background-delimiter")&&(n=t.getAttribute("data-background-delimiter")),t.getAttribute("data-background-image"))t.style.backgroundImage="url('"+t.getAttribute("data-background-image").split(n).join("'),url('")+"')";else if(t.getAttribute("data-background-image-set")){var d=t.getAttribute("data-background-image-set").split(n),u=d[0].substr(0,d[0].indexOf(" "))||d[0];u=-1===u.indexOf("url(")?"url("+u+")":u,1===d.length?t.style.backgroundImage=u:t.setAttribute("style",(t.getAttribute("style")||"")+"background-image: "+u+"; background-image: -webkit-image-set("+d+"); background-image: image-set("+d+")")}t.getAttribute("data-toggle-class")&&t.classList.toggle(t.getAttribute("data-toggle-class"))},loaded:function(){}};function A(t){t.setAttribute("data-loaded",!0)}var m=function(t){return"true"===t.getAttribute("data-loaded")},v=function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:document;return t instanceof Element?[t]:t instanceof NodeList?t:e.querySelectorAll(t)};return function(){var r,a,o=0<arguments.length&&void 0!==arguments[0]?arguments[0]:".lozad",t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},e=Object.assign({},f,t),i=e.root,n=e.rootMargin,d=e.threshold,u=e.load,g=e.loaded,s=void 0;"undefined"!=typeof window&&window.IntersectionObserver&&(s=new IntersectionObserver((r=u,a=g,function(t,e){t.forEach(function(t){(0<t.intersectionRatio||t.isIntersecting)&&(e.unobserve(t.target),m(t.target)||(r(t.target),A(t.target),a(t.target)))})}),{root:i,rootMargin:n,threshold:d}));for(var c,l=v(o,i),b=0;b<l.length;b++)(c=l[b]).getAttribute("data-placeholder-background")&&(c.style.background=c.getAttribute("data-placeholder-background"));return{observe:function(){for(var t=v(o,i),e=0;e<t.length;e++)m(t[e])||(s?s.observe(t[e]):(u(t[e]),A(t[e]),g(t[e])))},triggerLoad:function(t){m(t)||(u(t),A(t),g(t))},observer:s}}});!function(t,e){function n(t,e){var n=arguments.length>2?arguments[2]:[];if(!1===i(t))throw new TypeError(Object.prototype.toString.call(t)+"is not a function.");return t.apply(e,n)}function r(t,e,n){var r={value:n,writable:!0,enumerable:!1,configurable:!0};Object.defineProperty(t,e,r)}function o(t,e){return t[e]}function i(t){return"function"==typeof t}function s(t){if(null===t||t===e)throw TypeError();return Object(t)}function c(t,n){var r,o=(r=n,s(t)[r]);if(null===o||o===e)return e;if(!1===i(o))throw new TypeError("Method not callable: "+n);return o}function a(e){switch(typeof e){case"undefined":return"undefined";case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"symbol":return"symbol";default:return null===e?"null":"Symbol"in t&&(e instanceof t.Symbol||e.constructor===t.Symbol)?"symbol":"object"}}function u(t){if("symbol"===a(t))throw new TypeError("Cannot convert a Symbol value to a number");var e=Number(t);return isNaN(e)?0:1/e==1/0||1/e==-1/0||e===1/0||e===-1/0?e:(e<0?-1:1)*Math.floor(Math.abs(e))}function l(r){var s=arguments.length>1?arguments[1]:e;if("object"===a(r)){if(arguments.length<2)var u="default";else s===String?u="string":s===Number&&(u="number");var l="function"==typeof t.Symbol&&"symbol"==typeof t.Symbol.toPrimitive?c(r,t.Symbol.toPrimitive):e;if(l!==e){var h=n(l,r,[u]);if("object"!==a(h))return h;throw new TypeError("Cannot convert exotic object to primitive.")}return"default"===u&&(u="number"),function(t,e){if("string"===e)var r=["toString","valueOf"];else r=["valueOf","toString"];for(var s=0;s<r.length;++s){var c=o(t,r[s]);if(i(c)){var u=n(c,t);if("object"!==a(u))return u}}throw new TypeError("Cannot convert to primitive.")}(r,u)}return r}function h(t){switch(a(t)){case"symbol":throw new TypeError("Cannot convert a Symbol value to a string");case"object":return h(l(t,String));default:return String(t)}}var p,f,v;"includes"in Array.prototype||r(Array.prototype,"includes",function(t){"use strict";var e=s(this),n=function(t){var e=u(t);return e<=0?0:Math.min(e,Math.pow(2,53)-1)}(o(e,"length"));if(0===n)return!1;var r,i,c=u(arguments[1]);if(c>=0)var l=c;else(l=n+c)<0&&(l=0);for(;l<n;){var p=o(e,h(l));if(i=p,a(r=t)===a(i)&&("number"===a(r)?isNaN(r)&&isNaN(i)||1/r==1/0&&1/i==-1/0||1/r==-1/0&&1/i==1/0||r===i:function(t,e){return t===e}(r,i)))return!0;l+=1}return!1}),function(e){if(!("Event"in t))return!1;try{return new Event("click"),!0}catch(t){return!1}}()||function(){var t={click:1,dblclick:1,keyup:1,keypress:1,keydown:1,mousedown:1,mouseup:1,mousemove:1,mouseover:1,mouseenter:1,mouseleave:1,mouseout:1,storage:1,storagecommit:1,textinput:1};if("undefined"!=typeof document&&"undefined"!=typeof window){var n=window.Event&&window.Event.prototype||null;r.NONE=0,r.CAPTURING_PHASE=1,r.AT_TARGET=2,r.BUBBLING_PHASE=3,window.Event=Window.prototype.Event=r,n&&Object.defineProperty(window.Event,"prototype",{configurable:!1,enumerable:!1,writable:!0,value:n}),"createEvent"in document||(window.addEventListener=Window.prototype.addEventListener=Document.prototype.addEventListener=Element.prototype.addEventListener=function(){var e=this,n=arguments[0],r=arguments[1];if(e===window&&n in t)throw new Error("In IE8 the event: "+n+" is not available on the window object. Please see https://github.com/Financial-Times/polyfill-service/issues/317 for more information.");e._events||(e._events={}),e._events[n]||(e._events[n]=function(t){var n,r=e._events[t.type].list,o=r.slice(),i=-1,s=o.length;for(t.preventDefault=function(){!1!==t.cancelable&&(t.returnValue=!1)},t.stopPropagation=function(){t.cancelBubble=!0},t.stopImmediatePropagation=function(){t.cancelBubble=!0,t.cancelImmediate=!0},t.currentTarget=e,t.relatedTarget=t.fromElement||null,t.target=t.target||t.srcElement||e,t.timeStamp=(new Date).getTime(),t.clientX&&(t.pageX=t.clientX+document.documentElement.scrollLeft,t.pageY=t.clientY+document.documentElement.scrollTop);++i<s&&!t.cancelImmediate;)i in o&&(n=o[i],r.includes(n)&&"function"==typeof n&&n.call(e,t))},e._events[n].list=[],e.attachEvent&&e.attachEvent("on"+n,e._events[n])),e._events[n].list.push(r)},window.removeEventListener=Window.prototype.removeEventListener=Document.prototype.removeEventListener=Element.prototype.removeEventListener=function(){var t,e=arguments[0],n=arguments[1];this._events&&this._events[e]&&this._events[e].list&&-1!==(t=this._events[e].list.indexOf(n))&&(this._events[e].list.splice(t,1),this._events[e].list.length||(this.detachEvent&&this.detachEvent("on"+e,this._events[e]),delete this._events[e]))},window.dispatchEvent=Window.prototype.dispatchEvent=Document.prototype.dispatchEvent=Element.prototype.dispatchEvent=function(t){if(!arguments.length)throw new Error("Not enough arguments");if(!t||"string"!=typeof t.type)throw new Error("DOM Events Exception 0");var e=this,n=t.type;try{if(!t.bubbles){t.cancelBubble=!0;var r=function(t){t.cancelBubble=!0,(e||window).detachEvent("on"+n,r)};this.attachEvent("on"+n,r)}this.fireEvent("on"+n,t)}catch(r){t.target=e;do{t.currentTarget=e,"_events"in e&&"function"==typeof e._events[n]&&e._events[n].call(e,t),"function"==typeof e["on"+n]&&e["on"+n].call(e,t),e=9===e.nodeType?e.parentWindow:e.parentNode}while(e&&!t.cancelBubble)}return!0},document.attachEvent("onreadystatechange",function(){"complete"===document.readyState&&document.dispatchEvent(new r("DOMContentLoaded",{bubbles:!0}))}))}function r(t,n){if(!t)throw new Error("Not enough arguments");var r;if("createEvent"in document){r=document.createEvent("Event");var o=!(!n||n.bubbles===e)&&n.bubbles,i=!(!n||n.cancelable===e)&&n.cancelable;return r.initEvent(t,o,i),r}return(r=document.createEventObject()).type=t,r.bubbles=!(!n||n.bubbles===e)&&n.bubbles,r.cancelable=!(!n||n.cancelable===e)&&n.cancelable,r}}(),"IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype||function(t,e){"use strict";var n=[];function r(t){this.time=t.time,this.target=t.target,this.rootBounds=t.rootBounds,this.boundingClientRect=t.boundingClientRect,this.intersectionRect=t.intersectionRect||{top:0,bottom:0,left:0,right:0,width:0,height:0};try{this.isIntersecting=!!t.intersectionRect}catch(t){}var e=this.boundingClientRect,n=e.width*e.height,r=this.intersectionRect,o=r.width*r.height;this.intersectionRatio=n?Number((o/n).toFixed(4)):this.isIntersecting?1:0}function o(t,e){var n,r,o,i=e||{};if("function"!=typeof t)throw new Error("callback must be a function");if(i.root&&1!=i.root.nodeType)throw new Error("root must be an Element");this._checkForIntersections=(n=this._checkForIntersections.bind(this),r=this.THROTTLE_TIMEOUT,o=null,function(){o||(o=setTimeout(function(){n(),o=null},r))}),this._callback=t,this._observationTargets=[],this._queuedEntries=[],this._rootMarginValues=this._parseRootMargin(i.rootMargin),this.thresholds=this._initThresholds(i.threshold),this.root=i.root||null,this.rootMargin=this._rootMarginValues.map(function(t){return t.value+t.unit}).join(" ")}function i(t,e,n,r){"function"==typeof t.addEventListener?t.addEventListener(e,n,r||!1):"function"==typeof t.attachEvent&&t.attachEvent("on"+e,n)}function s(t,e,n,r){"function"==typeof t.removeEventListener?t.removeEventListener(e,n,r||!1):"function"==typeof t.detatchEvent&&t.detatchEvent("on"+e,n)}function c(t){var e;try{e=t.getBoundingClientRect()}catch(t){}return e?(e.width&&e.height||(e={top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.right-e.left,height:e.bottom-e.top}),e):{top:0,bottom:0,left:0,right:0,width:0,height:0}}function a(t,e){for(var n=e;n;){if(n==t)return!0;n=u(n)}return!1}function u(t){var e=t.parentNode;return e&&11==e.nodeType&&e.host?e.host:e&&e.assignedSlot?e.assignedSlot.parentNode:e}o.prototype.THROTTLE_TIMEOUT=100,o.prototype.POLL_INTERVAL=null,o.prototype.USE_MUTATION_OBSERVER=!0,o.prototype.observe=function(t){if(!this._observationTargets.some(function(e){return e.element==t})){if(!t||1!=t.nodeType)throw new Error("target must be an Element");this._registerInstance(),this._observationTargets.push({element:t,entry:null}),this._monitorIntersections(),this._checkForIntersections()}},o.prototype.unobserve=function(t){this._observationTargets=this._observationTargets.filter(function(e){return e.element!=t}),this._observationTargets.length||(this._unmonitorIntersections(),this._unregisterInstance())},o.prototype.disconnect=function(){this._observationTargets=[],this._unmonitorIntersections(),this._unregisterInstance()},o.prototype.takeRecords=function(){var t=this._queuedEntries.slice();return this._queuedEntries=[],t},o.prototype._initThresholds=function(t){var e=t||[0];return Array.isArray(e)||(e=[e]),e.sort().filter(function(t,e,n){if("number"!=typeof t||isNaN(t)||t<0||t>1)throw new Error("threshold must be a number between 0 and 1 inclusively");return t!==n[e-1]})},o.prototype._parseRootMargin=function(t){var e=(t||"0px").split(/\s+/).map(function(t){var e=/^(-?\d*\.?\d+)(px|%)$/.exec(t);if(!e)throw new Error("rootMargin must be specified in pixels or percent");return{value:parseFloat(e[1]),unit:e[2]}});return e[1]=e[1]||e[0],e[2]=e[2]||e[0],e[3]=e[3]||e[1],e},o.prototype._monitorIntersections=function(){this._monitoringIntersections||(this._monitoringIntersections=!0,this.POLL_INTERVAL?this._monitoringInterval=setInterval(this._checkForIntersections,this.POLL_INTERVAL):(i(t,"resize",this._checkForIntersections,!0),i(e,"scroll",this._checkForIntersections,!0),this.USE_MUTATION_OBSERVER&&"MutationObserver"in t&&(this._domObserver=new MutationObserver(this._checkForIntersections),this._domObserver.observe(e,{attributes:!0,childList:!0,characterData:!0,subtree:!0}))))},o.prototype._unmonitorIntersections=function(){this._monitoringIntersections&&(this._monitoringIntersections=!1,clearInterval(this._monitoringInterval),this._monitoringInterval=null,s(t,"resize",this._checkForIntersections,!0),s(e,"scroll",this._checkForIntersections,!0),this._domObserver&&(this._domObserver.disconnect(),this._domObserver=null))},o.prototype._checkForIntersections=function(){var e=this._rootIsInDom(),n=e?this._getRootRect():{top:0,bottom:0,left:0,right:0,width:0,height:0};this._observationTargets.forEach(function(o){var i=o.element,s=c(i),a=this._rootContainsTarget(i),u=o.entry,l=e&&a&&this._computeTargetAndRootIntersection(i,n),h=o.entry=new r({time:t.performance&&performance.now&&performance.now(),target:i,boundingClientRect:s,rootBounds:n,intersectionRect:l});u?e&&a?this._hasCrossedThreshold(u,h)&&this._queuedEntries.push(h):u&&u.isIntersecting&&this._queuedEntries.push(h):this._queuedEntries.push(h)},this),this._queuedEntries.length&&this._callback(this.takeRecords(),this)},o.prototype._computeTargetAndRootIntersection=function(n,r){if("none"!=t.getComputedStyle(n).display){for(var o,i,s,a,l,h,p,f,v=c(n),d=u(n),b=!1;!b;){var g=null,m=1==d.nodeType?t.getComputedStyle(d):{};if("none"==m.display)return;if(d==this.root||d==e?(b=!0,g=r):d!=e.body&&d!=e.documentElement&&"visible"!=m.overflow&&(g=c(d)),g&&(o=g,i=v,s=void 0,a=void 0,l=void 0,h=void 0,p=void 0,f=void 0,s=Math.max(o.top,i.top),a=Math.min(o.bottom,i.bottom),l=Math.max(o.left,i.left),h=Math.min(o.right,i.right),f=a-s,!(v=(p=h-l)>=0&&f>=0&&{top:s,bottom:a,left:l,right:h,width:p,height:f})))break;d=u(d)}return v}},o.prototype._getRootRect=function(){var t;if(this.root)t=c(this.root);else{var n=e.documentElement,r=e.body;t={top:0,left:0,right:n.clientWidth||r.clientWidth,width:n.clientWidth||r.clientWidth,bottom:n.clientHeight||r.clientHeight,height:n.clientHeight||r.clientHeight}}return this._expandRectByRootMargin(t)},o.prototype._expandRectByRootMargin=function(t){var e=this._rootMarginValues.map(function(e,n){return"px"==e.unit?e.value:e.value*(n%2?t.width:t.height)/100}),n={top:t.top-e[0],right:t.right+e[1],bottom:t.bottom+e[2],left:t.left-e[3]};return n.width=n.right-n.left,n.height=n.bottom-n.top,n},o.prototype._hasCrossedThreshold=function(t,e){var n=t&&t.isIntersecting?t.intersectionRatio||0:-1,r=e.isIntersecting?e.intersectionRatio||0:-1;if(n!==r)for(var o=0;o<this.thresholds.length;o++){var i=this.thresholds[o];if(i==n||i==r||i<n!=i<r)return!0}},o.prototype._rootIsInDom=function(){return!this.root||a(e,this.root)},o.prototype._rootContainsTarget=function(t){return a(this.root||e,t)},o.prototype._registerInstance=function(){n.indexOf(this)<0&&n.push(this)},o.prototype._unregisterInstance=function(){var t=n.indexOf(this);-1!=t&&n.splice(t,1)},t.IntersectionObserver=o,t.IntersectionObserverEntry=r}(window,document),"getOwnPropertyDescriptor"in Object&&"function"==typeof Object.getOwnPropertyDescriptor&&function(){try{return"3"===Object.getOwnPropertyDescriptor("13.7",1).value}catch(t){return!1}}()||(p=Object.getOwnPropertyDescriptor,f={}.toString,v="".split,r(Object,"getOwnPropertyDescriptor",function(t,e){var n=s(t);n=("string"===a(n)||n instanceof String)&&"[object String]"==f.call(t)?v.call(t,""):Object(t);var r,o,i=function(t){var e=l(t,String);return"symbol"===a(e)?e:h(e)}(e);if(function(){try{return 1===Object.defineProperty(document.createElement("div"),"one",{get:function(){return 1}}).one}catch(t){return!1}})try{return p(n,i)}catch(t){}if(r=n,o=i,Object.prototype.hasOwnProperty.call(r,o))return{enumerable:!0,configurable:!0,writable:!0,value:n[i]}})),"keys"in Object&&function(){return 2===Object.keys(arguments).length}(1,2)&&function(){try{return Object.keys(""),!0}catch(t){return!1}}()||r(Object,"keys",function(){"use strict";var t=Object.prototype.hasOwnProperty,n=Object.prototype.toString,r=Object.prototype.propertyIsEnumerable,o=!r.call({toString:null},"toString"),i=r.call(function(){},"prototype");function s(){var t;try{t=Object.create({})}catch(t){return!0}return r.call(t,"__proto__")}var c=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],a=function(t){var e=t.constructor;return e&&e.prototype===t},u={$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},l=function(){if("undefined"==typeof window)return!1;for(var e in window)try{if(!u["$"+e]&&t.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{a(window[e])}catch(t){return!0}}catch(t){return!0}return!1}();return function(r){var u,h,p,f="[object Function]"===n.call(r),v=(u=r,h=n.call(u),(p="[object Arguments]"===h)||(p="[object Array]"!==h&&null!==u&&"object"==typeof u&&"number"==typeof u.length&&u.length>=0&&"[object Function]"===n.call(u.callee)),p),d="[object String]"===n.call(r),b=[];if(r===e||null===r)throw new TypeError("Cannot convert undefined or null to object");var g=i&&f;if(d&&r.length>0&&!t.call(r,0))for(var m=0;m<r.length;++m)b.push(String(m));if(v&&r.length>0)for(var y=0;y<r.length;++y)b.push(String(y));else for(var w in r)s()&&"__proto__"===w||g&&"prototype"===w||!t.call(r,w)||b.push(String(w));if(o)for(var _=function(t){if("undefined"==typeof window||!l)return a(t);try{return a(t)}catch(t){return!1}}(r),E=0;E<c.length;++E)_&&"constructor"===c[E]||!t.call(r,c[E])||b.push(c[E]);return b}}()),"assign"in Object||r(Object,"assign",function(t,n){var r=s(t);if(1===arguments.length)return r;var i,c,a,u,l=Array.prototype.slice.call(arguments,1);for(i=0;i<l.length;i++){var h=l[i];for(h===e||null===h?a=[]:(u="[object String]"===Object.prototype.toString.call(h)?String(h).split(""):s(h),a=Object.keys(u)),c=0;c<a.length;c++){var p,f=a[c];try{var v=Object.getOwnPropertyDescriptor(u,f);p=v!==e&&!0===v.enumerable}catch(t){p=Object.prototype.propertyIsEnumerable.call(u,f)}if(p){var d=o(u,f);r[f]=d}}}return r})}("object"==typeof window&&window||"object"==typeof self&&self||"object"==typeof global&&global||{});$(document).ready(function(){$('#owlCarouselSlider').owlCarousel();const observer=lozad();observer.observe();});/*!odometer 0.4.6*/(function(){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G=[].slice;q='<span class="odometer-value"></span>',n='<span class="odometer-ribbon"><span class="odometer-ribbon-inner">'+q+"</span></span>",d='<span class="odometer-digit"><span class="odometer-digit-spacer">8</span><span class="odometer-digit-inner">'+n+"</span></span>",g='<span class="odometer-formatting-mark"></span>',c="(,ddd).dd",h=/^\(?([^)]*)\)?(?:(.)(d+))?$/,i=30,f=2e3,a=20,j=2,e=.5,k=1e3/i,b=1e3/a,o="transitionend webkitTransitionEnd oTransitionEnd otransitionend MSTransitionEnd",y=document.createElement("div").style,p=null!=y.transition||null!=y.webkitTransition||null!=y.mozTransition||null!=y.oTransition,w=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,l=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver,s=function(a){var b;return b=document.createElement("div"),b.innerHTML=a,b.children[0]},v=function(a,b){return a.className=a.className.replace(new RegExp("(^| )"+b.split(" ").join("|")+"( |$)","gi")," ")},r=function(a,b){return v(a,b),a.className+=" "+b},z=function(a,b){var c;return null!=document.createEvent?(c=document.createEvent("HTMLEvents"),c.initEvent(b,!0,!0),a.dispatchEvent(c)):void 0},u=function(){var a,b;return null!=(a=null!=(b=window.performance)?"function"==typeof b.now?b.now():void 0:void 0)?a:+new Date},x=function(a,b){return null==b&&(b=0),b?(a*=Math.pow(10,b),a+=.5,a=Math.floor(a),a/=Math.pow(10,b)):Math.round(a)},A=function(a){return 0>a?Math.ceil(a):Math.floor(a)},t=function(a){return a-x(a)},C=!1,(B=function(){var a,b,c,d,e;if(!C&&null!=window.jQuery){for(C=!0,d=["html","text"],e=[],b=0,c=d.length;c>b;b++)a=d[b],e.push(function(a){var b;return b=window.jQuery.fn[a],window.jQuery.fn[a]=function(a){var c;return null==a||null==(null!=(c=this[0])?c.odometer:void 0)?b.apply(this,arguments):this[0].odometer.update(a)}}(a));return e}})(),setTimeout(B,0),m=function(){function a(b){var c,d,e,g,h,i,l,m,n,o,p=this;if(this.options=b,this.el=this.options.el,null!=this.el.odometer)return this.el.odometer;this.el.odometer=this,m=a.options;for(d in m)g=m[d],null==this.options[d]&&(this.options[d]=g);null==(h=this.options).duration&&(h.duration=f),this.MAX_VALUES=this.options.duration/k/j|0,this.resetFormat(),this.value=this.cleanValue(null!=(n=this.options.value)?n:""),this.renderInside(),this.render();try{for(o=["innerHTML","innerText","textContent"],i=0,l=o.length;l>i;i++)e=o[i],null!=this.el[e]&&!function(a){return Object.defineProperty(p.el,a,{get:function(){var b;return"innerHTML"===a?p.inside.outerHTML:null!=(b=p.inside.innerText)?b:p.inside.textContent},set:function(a){return p.update(a)}})}(e)}catch(q){c=q,this.watchForMutations()}}return a.prototype.renderInside=function(){return this.inside=document.createElement("div"),this.inside.className="odometer-inside",this.el.innerHTML="",this.el.appendChild(this.inside)},a.prototype.watchForMutations=function(){var a,b=this;if(null!=l)try{return null==this.observer&&(this.observer=new l(function(){var a;return a=b.el.innerText,b.renderInside(),b.render(b.value),b.update(a)})),this.watchMutations=!0,this.startWatchingMutations()}catch(c){a=c}},a.prototype.startWatchingMutations=function(){return this.watchMutations?this.observer.observe(this.el,{childList:!0}):void 0},a.prototype.stopWatchingMutations=function(){var a;return null!=(a=this.observer)?a.disconnect():void 0},a.prototype.cleanValue=function(a){var b;return"string"==typeof a&&(a=a.replace(null!=(b=this.format.radix)?b:".","<radix>"),a=a.replace(/[.,]/g,""),a=a.replace("<radix>","."),a=parseFloat(a,10)||0),x(a,this.format.precision)},a.prototype.bindTransitionEnd=function(){var a,b,c,d,e,f,g=this;if(!this.transitionEndBound){for(this.transitionEndBound=!0,b=!1,e=o.split(" "),f=[],c=0,d=e.length;d>c;c++)a=e[c],f.push(this.el.addEventListener(a,function(){return b?!0:(b=!0,setTimeout(function(){return g.render(),b=!1,z(g.el,"odometerdone")},0),!0)},!1));return f}},a.prototype.resetFormat=function(){var a,b,d,e,f,g,i,j;if(a=null!=(i=this.options.format)?i:c,a||(a="d"),d=h.exec(a),!d)throw new Error("Odometer: Unparsable digit format");return j=d.slice(1,4),g=j[0],f=j[1],b=j[2],e=(null!=b?b.length:void 0)||0,this.format={repeating:g,radix:f,precision:e}},a.prototype.render=function(a){var b,c,d,e,f,g,h,i,j,k,l,m;for(null==a&&(a=this.value),this.stopWatchingMutations(),this.resetFormat(),this.inside.innerHTML="",g=this.options.theme,b=this.el.className.split(" "),f=[],i=0,k=b.length;k>i;i++)c=b[i],c.length&&((e=/^odometer-theme-(.+)$/.exec(c))?g=e[1]:/^odometer(-|$)/.test(c)||f.push(c));for(f.push("odometer"),p||f.push("odometer-no-transitions"),f.push(g?"odometer-theme-"+g:"odometer-auto-theme"),this.el.className=f.join(" "),this.ribbons={},this.digits=[],h=!this.format.precision||!t(a)||!1,m=a.toString().split("").reverse(),j=0,l=m.length;l>j;j++)d=m[j],"."===d&&(h=!0),this.addDigit(d,h);return this.startWatchingMutations()},a.prototype.update=function(a){var b,c=this;return a=this.cleanValue(a),(b=a-this.value)?(v(this.el,"odometer-animating-up odometer-animating-down odometer-animating"),b>0?r(this.el,"odometer-animating-up"):r(this.el,"odometer-animating-down"),this.stopWatchingMutations(),this.animate(a),this.startWatchingMutations(),setTimeout(function(){return c.el.offsetHeight,r(c.el,"odometer-animating")},0),this.value=a):void 0},a.prototype.renderDigit=function(){return s(d)},a.prototype.insertDigit=function(a,b){return null!=b?this.inside.insertBefore(a,b):this.inside.children.length?this.inside.insertBefore(a,this.inside.children[0]):this.inside.appendChild(a)},a.prototype.addSpacer=function(a,b,c){var d;return d=s(g),d.innerHTML=a,c&&r(d,c),this.insertDigit(d,b)},a.prototype.addDigit=function(a,b){var c,d,e,f;if(null==b&&(b=!0),"-"===a)return this.addSpacer(a,null,"odometer-negation-mark");if("."===a)return this.addSpacer(null!=(f=this.format.radix)?f:".",null,"odometer-radix-mark");if(b)for(e=!1;;){if(!this.format.repeating.length){if(e)throw new Error("Bad odometer format without digits");this.resetFormat(),e=!0}if(c=this.format.repeating[this.format.repeating.length-1],this.format.repeating=this.format.repeating.substring(0,this.format.repeating.length-1),"d"===c)break;this.addSpacer(c)}return d=this.renderDigit(),d.querySelector(".odometer-value").innerHTML=a,this.digits.push(d),this.insertDigit(d)},a.prototype.animate=function(a){return p&&"count"!==this.options.animation?this.animateSlide(a):this.animateCount(a)},a.prototype.animateCount=function(a){var c,d,e,f,g,h=this;if(d=+a-this.value)return f=e=u(),c=this.value,(g=function(){var i,j,k;return u()-f>h.options.duration?(h.value=a,h.render(),void z(h.el,"odometerdone")):(i=u()-e,i>b&&(e=u(),k=i/h.options.duration,j=d*k,c+=j,h.render(Math.round(c))),null!=w?w(g):setTimeout(g,b))})()},a.prototype.getDigitCount=function(){var a,b,c,d,e,f;for(d=1<=arguments.length?G.call(arguments,0):[],a=e=0,f=d.length;f>e;a=++e)c=d[a],d[a]=Math.abs(c);return b=Math.max.apply(Math,d),Math.ceil(Math.log(b+1)/Math.log(10))},a.prototype.getFractionalDigitCount=function(){var a,b,c,d,e,f,g;for(e=1<=arguments.length?G.call(arguments,0):[],b=/^\-?\d*\.(\d*?)0*$/,a=f=0,g=e.length;g>f;a=++f)d=e[a],e[a]=d.toString(),c=b.exec(e[a]),e[a]=null==c?0:c[1].length;return Math.max.apply(Math,e)},a.prototype.resetDigits=function(){return this.digits=[],this.ribbons=[],this.inside.innerHTML="",this.resetFormat()},a.prototype.animateSlide=function(a){var b,c,d,f,g,h,i,j,k,l,m,n,o,p,q,s,t,u,v,w,x,y,z,B,C,D,E;if(s=this.value,j=this.getFractionalDigitCount(s,a),j&&(a*=Math.pow(10,j),s*=Math.pow(10,j)),d=a-s){for(this.bindTransitionEnd(),f=this.getDigitCount(s,a),g=[],b=0,m=v=0;f>=0?f>v:v>f;m=f>=0?++v:--v){if(t=A(s/Math.pow(10,f-m-1)),i=A(a/Math.pow(10,f-m-1)),h=i-t,Math.abs(h)>this.MAX_VALUES){for(l=[],n=h/(this.MAX_VALUES+this.MAX_VALUES*b*e),c=t;h>0&&i>c||0>h&&c>i;)l.push(Math.round(c)),c+=n;l[l.length-1]!==i&&l.push(i),b++}else l=function(){E=[];for(var a=t;i>=t?i>=a:a>=i;i>=t?a++:a--)E.push(a);return E}.apply(this);for(m=w=0,y=l.length;y>w;m=++w)k=l[m],l[m]=Math.abs(k%10);g.push(l)}for(this.resetDigits(),D=g.reverse(),m=x=0,z=D.length;z>x;m=++x)for(l=D[m],this.digits[m]||this.addDigit(" ",m>=j),null==(u=this.ribbons)[m]&&(u[m]=this.digits[m].querySelector(".odometer-ribbon-inner")),this.ribbons[m].innerHTML="",0>d&&(l=l.reverse()),o=C=0,B=l.length;B>C;o=++C)k=l[o],q=document.createElement("div"),q.className="odometer-value",q.innerHTML=k,this.ribbons[m].appendChild(q),o===l.length-1&&r(q,"odometer-last-value"),0===o&&r(q,"odometer-first-value");return 0>t&&this.addDigit("-"),p=this.inside.querySelector(".odometer-radix-mark"),null!=p&&p.parent.removeChild(p),j?this.addSpacer(this.format.radix,this.digits[j-1],"odometer-radix-mark"):void 0}},a}(),m.options=null!=(E=window.odometerOptions)?E:{},setTimeout(function(){var a,b,c,d,e;if(window.odometerOptions){d=window.odometerOptions,e=[];for(a in d)b=d[a],e.push(null!=(c=m.options)[a]?(c=m.options)[a]:c[a]=b);return e}},0),m.init=function(){var a,b,c,d,e,f;if(null!=document.querySelectorAll){for(b=document.querySelectorAll(m.options.selector||".odometer"),f=[],c=0,d=b.length;d>c;c++)a=b[c],f.push(a.odometer=new m({el:a,value:null!=(e=a.innerText)?e:a.textContent}));return f}},null!=(null!=(F=document.documentElement)?F.doScroll:void 0)&&null!=document.createEventObject?(D=document.onreadystatechange,document.onreadystatechange=function(){return"complete"===document.readyState&&m.options.auto!==!1&&m.init(),null!=D?D.apply(this,arguments):void 0}):document.addEventListener("DOMContentLoaded",function(){return m.options.auto!==!1?m.init():void 0},!1),"function"==typeof define&&define.amd?define(["jquery"],function(){return m}):typeof exports===!1?module.exports=m:window.Odometer=m}).call(this);/*!p5.js v1.1.9 July 22, 2020*/!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).p5=e()}}(function(){return function o(i,s,l){function p(t,e){if(!s[t]){if(!i[t]){var r="function"==typeof require&&require;if(!e&&r)return r(t,!0);if(u)return u(t,!0);var n=new Error("Cannot find module '"+t+"'");throw n.code="MODULE_NOT_FOUND",n}var a=s[t]={exports:{}};i[t][0].call(a.exports,function(e){return p(i[t][1][e]||e)},a,a.exports,o,i,s,l)}return s[t].exports}for(var u="function"==typeof require&&require,e=0;e<l.length;e++)p(l[e]);return p}({1:[function(e,t,r){t.exports={p5:{alpha:{name:"alpha",params:[{name:"color",description:'<p><a href="#/p5.Color">p5.Color</a> object, color components,\n                                        or CSS color</p>\n',type:"p5.Color|Number[]|String"}],class:"p5",module:"Color"},blue:{name:"blue",params:[{name:"color",description:'<p><a href="#/p5.Color">p5.Color</a> object, color components,\n                                        or CSS color</p>\n',type:"p5.Color|Number[]|String"}],class:"p5",module:"Color"},brightness:{name:"brightness",params:[{name:"color",description:'<p><a href="#/p5.Color">p5.Color</a> object, color components,\n                                        or CSS color</p>\n',type:"p5.Color|Number[]|String"}],class:"p5",module:"Color"},color:{name:"color",class:"p5",module:"Color",overloads:[{params:[{name:"gray",description:"<p>number specifying value between white and black.</p>\n",type:"Number"},{name:"alpha",description:"<p>alpha value relative to current color range\n                                (default is 0-255)</p>\n",type:"Number",optional:!0}]},{params:[{name:"v1",description:"<p>red or hue value relative to\n                                the current color range</p>\n",type:"Number"},{name:"v2",description:"<p>green or saturation value\n                                relative to the current color range</p>\n",type:"Number"},{name:"v3",description:"<p>blue or brightness value\n                                relative to the current color range</p>\n",type:"Number"},{name:"alpha",description:"",type:"Number",optional:!0}]},{params:[{name:"value",description:"<p>a color string</p>\n",type:"String"}]},{params:[{name:"values",description:"<p>an array containing the red,green,blue &\n                                and alpha components of the color</p>\n",type:"Number[]"}]},{params:[{name:"color",description:"",type:"p5.Color"}]}]},green:{name:"green",params:[{name:"color",description:'<p><a href="#/p5.Color">p5.Color</a> object, color components,\n                                        or CSS color</p>\n',type:"p5.Color|Number[]|String"}],class:"p5",module:"Color"},hue:{name:"hue",params:[{name:"color",description:'<p><a href="#/p5.Color">p5.Color</a> object, color components,\n                                        or CSS color</p>\n',type:"p5.Color|Number[]|String"}],class:"p5",module:"Color"},lerpColor:{name:"lerpColor",params:[{name:"c1",description:"<p>interpolate from this color</p>\n",type:"p5.Color"},{name:"c2",description:"<p>interpolate to this color</p>\n",type:"p5.Color"},{name:"amt",description:"<p>number between 0 and 1</p>\n",type:"Number"}],class:"p5",module:"Color"},lightness:{name:"lightness",params:[{name:"color",description:'<p><a href="#/p5.Color">p5.Color</a> object, color components,\n                                        or CSS color</p>\n',type:"p5.Color|Number[]|String"}],class:"p5",module:"Color"},red:{name:"red",params:[{name:"color",description:'<p><a href="#/p5.Color">p5.Color</a> object, color components,\n                                        or CSS color</p>\n',type:"p5.Color|Number[]|String"}],class:"p5",module:"Color"},saturation:{name:"saturation",params:[{name:"color",description:'<p><a href="#/p5.Color">p5.Color</a> object, color components,\n                                        or CSS color</p>\n',type:"p5.Color|Number[]|String"}],class:"p5",module:"Color"},background:{name:"background",class:"p5",module:"Color",overloads:[{params:[{name:"color",description:'<p>any value created by the <a href="#/p5/color">color()</a> function</p>\n',type:"p5.Color"}],chainable:1},{params:[{name:"colorstring",description:"<p>color string, possible formats include: integer\n                        rgb() or rgba(), percentage rgb() or rgba(),\n                        3-digit hex, 6-digit hex</p>\n",type:"String"},{name:"a",description:"<p>opacity of the background relative to current\n                            color range (default is 0-255)</p>\n",type:"Number",optional:!0}],chainable:1},{params:[{name:"gray",description:"<p>specifies a value between white and black</p>\n",type:"Number"},{name:"a",description:"",type:"Number",optional:!0}],chainable:1},{params:[{name:"v1",description:"<p>red or hue value (depending on the current color\n                       mode)</p>\n",type:"Number"},{name:"v2",description:"<p>green or saturation value (depending on the current\n                       color mode)</p>\n",type:"Number"},{name:"v3",description:"<p>blue or brightness value (depending on the current\n                       color mode)</p>\n",type:"Number"},{name:"a",description:"",type:"Number",optional:!0}],chainable:1},{params:[{name:"values",description:"<p>an array containing the red, green, blue\n                                and alpha components of the color</p>\n",type:"Number[]"}],chainable:1},{params:[{name:"image",description:'<p>image created with <a href="#/p5/loadImage">loadImage()</a> or <a href="#/p5/createImage">createImage()</a>,\n                            to set as background\n                            (must be same size as the sketch window)</p>\n',type:"p5.Image"},{name:"a",description:"",type:"Number",optional:!0}],chainable:1}]},clear:{name:"clear",class:"p5",module:"Color"},colorMode:{name:"colorMode",class:"p5",module:"Color",overloads:[{params:[{name:"mode",description:"<p>either RGB, HSB or HSL, corresponding to\n                         Red/Green/Blue and Hue/Saturation/Brightness\n                         (or Lightness)</p>\n",type:"Constant"},{name:"max",description:"<p>range for all values</p>\n",type:"Number",optional:!0}],chainable:1},{params:[{name:"mode",description:"",type:"Constant"},{name:"max1",description:"<p>range for the red or hue depending on the\n                             current color mode</p>\n",type:"Number"},{name:"max2",description:"<p>range for the green or saturation depending\n                             on the current color mode</p>\n",type:"Number"},{name:"max3",description:"<p>range for the blue or brightness/lightness\n                             depending on the current color mode</p>\n",type:"Number"},{name:"maxA",description:"<p>range for the alpha</p>\n",type:"Number",optional:!0}],chainable:1}]},fill:{name:"fill",class:"p5",module:"Color",overloads:[{params:[{name:"v1",description:"<p>red or hue value relative to\n                                the current color range</p>\n",type:"Number"},{name:"v2",description:"<p>green or saturation value\n                                relative to the current color range</p>\n",type:"Number"},{name:"v3",description:"<p>blue or brightness value\n                                relative to the current color range</p>\n",type:"Number"},{name:"alpha",description:"",type:"Number",optional:!0}],chainable:1},{params:[{name:"value",description:"<p>a color string</p>\n",type:"String"}],chainable:1},{params:[{name:"gray",description:"<p>a gray value</p>\n",type:"Number"},{name:"alpha",description:"",type:"Number",optional:!0}],chainable:1},{params:[{name:"values",description:"<p>an array containing the red,green,blue &\n                                and alpha components of the color</p>\n",type:"Number[]"}],chainable:1},{params:[{name:"color",description:"<p>the fill color</p>\n",type:"p5.Color"}],chainable:1}]},noFill:{name:"noFill",class:"p5",module:"Color"},noStroke:{name:"noStroke",class:"p5",module:"Color"},stroke:{name:"stroke",class:"p5",module:"Color",overloads:[{params:[{name:"v1",description:"<p>red or hue value relative to\n                                the current color range</p>\n",type:"Number"},{name:"v2",description:"<p>green or saturation value\n                                relative to the current color range</p>\n",type:"Number"},{name:"v3",description:"<p>blue or brightness value\n                                relative to the current color range</p>\n",type:"Number"},{name:"alpha",description:"",type:"Number",optional:!0}],chainable:1},{params:[{name:"value",description:"<p>a color string</p>\n",type:"String"}],chainable:1},{params:[{name:"gray",description:"<p>a gray value</p>\n",type:"Number"},{name:"alpha",description:"",type:"Number",optional:!0}],chainable:1},{params:[{name:"values",description:"<p>an array containing the red,green,blue &\n                                and alpha components of the color</p>\n",type:"Number[]"}],chainable:1},{params:[{name:"color",description:"<p>the stroke color</p>\n",type:"p5.Color"}],chainable:1}]},erase:{name:"erase",params:[{name:"strengthFill",description:"<p>A number (0-255) for the strength of erasing for a shape's fill.\n                                       This will default to 255 when no argument is given, which\n                                       is full strength.</p>\n",type:"Number",optional:!0},{name:"strengthStroke",description:"<p>A number (0-255) for the strength of erasing for a shape's stroke.\n                                       This will default to 255 when no argument is given, which\n                                       is full strength.</p>\n",type:"Number",optional:!0}],class:"p5",module:"Color"},noErase:{name:"noErase",class:"p5",module:"Color"},arc:{name:"arc",params:[{name:"x",description:"<p>x-coordinate of the arc's ellipse</p>\n",type:"Number"},{name:"y",description:"<p>y-coordinate of the arc's ellipse</p>\n",type:"Number"},{name:"w",description:"<p>width of the arc's ellipse by default</p>\n",type:"Number"},{name:"h",description:"<p>height of the arc's ellipse by default</p>\n",type:"Number"},{name:"start",description:"<p>angle to start the arc, specified in radians</p>\n",type:"Number"},{name:"stop",description:"<p>angle to stop the arc, specified in radians</p>\n",type:"Number"},{name:"mode",description:"<p>optional parameter to determine the way of drawing\n                        the arc. either CHORD, PIE or OPEN</p>\n",type:"Constant",optional:!0},{name:"detail",description:"<p>optional parameter for WebGL mode only. This is to\n                        specify the number of vertices that makes up the\n                        perimeter of the arc. Default value is 25.</p>\n",type:"Number",optional:!0}],class:"p5",module:"Shape"},ellipse:{name:"ellipse",class:"p5",module:"Shape",overloads:[{params:[{name:"x",description:"<p>x-coordinate of the center of ellipse.</p>\n",type:"Number"},{name:"y",description:"<p>y-coordinate of the center of ellipse.</p>\n",type:"Number"},{name:"w",description:"<p>width of the ellipse.</p>\n",type:"Number"},{name:"h",description:"<p>height of the ellipse.</p>\n",type:"Number",optional:!0}],chainable:1},{params:[{name:"x",description:"",type:"Number"},{name:"y",description:"",type:"Number"},{name:"w",description:"",type:"Number"},{name:"h",description:"",type:"Number"},{name:"detail",description:"<p>number of radial sectors to draw (for WebGL mode)</p>\n",type:"Integer"}]}]},circle:{name:"circle",params:[{name:"x",description:"<p>x-coordinate of the centre of the circle.</p>\n",type:"Number"},{name:"y",description:"<p>y-coordinate of the centre of the circle.</p>\n",type:"Number"},{name:"d",description:"<p>diameter of the circle.</p>\n",type:"Number"}],class:"p5",module:"Shape"},line:{name:"line",class:"p5",module:"Shape",overloads:[{params:[{name:"x1",description:"<p>the x-coordinate of the first point</p>\n",type:"Number"},{name:"y1",description:"<p>the y-coordinate of the first point</p>\n",type:"Number"},{name:"x2",description:"<p>the x-coordinate of the second point</p>\n",type:"Number"},{name:"y2",description:"<p>the y-coordinate of the second point</p>\n",type:"Number"}],chainable:1},{params:[{name:"x1",description:"",type:"Number"},{name:"y1",description:"",type:"Number"},{name:"z1",description:"<p>the z-coordinate of the first point</p>\n",type:"Number"},{name:"x2",description:"",type:"Number"},{name:"y2",description:"",type:"Number"},{name:"z2",description:"<p>the z-coordinate of the second point</p>\n",type:"Number"}],chainable:1}]},point:{name:"point",class:"p5",module:"Shape",overloads:[{params:[{name:"x",description:"<p>the x-coordinate</p>\n",type:"Number"},{name:"y",description:"<p>the y-coordinate</p>\n",type:"Number"},{name:"z",description:"<p>the z-coordinate (for WebGL mode)</p>\n",type:"Number",optional:!0}],chainable:1},{params:[{name:"coordinate_vector",description:"<p>the coordinate vector</p>\n",type:"p5.Vector"}],chainable:1}]},quad:{name:"quad",class:"p5",module:"Shape",overloads:[{params:[{name:"x1",description:"<p>the x-coordinate of the first point</p>\n",type:"Number"},{name:"y1",description:"<p>the y-coordinate of the first point</p>\n",type:"Number"},{name:"x2",description:"<p>the x-coordinate of the second point</p>\n",type:"Number"},{name:"y2",description:"<p>the y-coordinate of the second point</p>\n",type:"Number"},{name:"x3",description:"<p>the x-coordinate of the third point</p>\n",type:"Number"},{name:"y3",description:"<p>the y-coordinate of the third point</p>\n",type:"Number"},{name:"x4",description:"<p>the x-coordinate of the fourth point</p>\n",type:"Number"},{name:"y4",description:"<p>the y-coordinate of the fourth point</p>\n",type:"Number"}],chainable:1},{params:[{name:"x1",description:"",type:"Number"},{name:"y1",description:"",type:"Number"},{name:"z1",description:"<p>the z-coordinate of the first point</p>\n",type:"Number"},{name:"x2",description:"",type:"Number"},{name:"y2",description:"",type:"Number"},{name:"z2",description:"<p>the z-coordinate of the second point</p>\n",type:"Number"},{name:"x3",description:"",type:"Number"},{name:"y3",description:"",type:"Number"},{name:"z3",description:"<p>the z-coordinate of the third point</p>\n",type:"Number"},{name:"x4",description:"",type:"Number"},{name:"y4",description:"",type:"Number"},{name:"z4",description:"<p>the z-coordinate of the fourth point</p>\n",type:"Number"}],chainable:1}]},rect:{name:"rect",class:"p5",module:"Shape",overloads:[{params:[{name:"x",description:"<p>x-coordinate of the rectangle.</p>\n",type:"Number"},{name:"y",description:"<p>y-coordinate of the rectangle.</p>\n",type:"Number"},{name:"w",description:"<p>width of the rectangle.</p>\n",type:"Number"},{name:"h",description:"<p>height of the rectangle.</p>\n",type:"Number",optional:!0},{name:"tl",description:"<p>optional radius of top-left corner.</p>\n",type:"Number",optional:!0},{name:"tr",description:"<p>optional radius of top-right corner.</p>\n",type:"Number",optional:!0},{name:"br",description:"<p>optional radius of bottom-right corner.</p>\n",type:"Number",optional:!0},{name:"bl",description:"<p>optional radius of bottom-left corner.</p>\n",type:"Number",optional:!0}],chainable:1},{params:[{name:"x",description:"",type:"Number"},{name:"y",description:"",type:"Number"},{name:"w",description:"",type:"Number"},{name:"h",description:"",type:"Number"},{name:"detailX",description:"<p>number of segments in the x-direction (for WebGL mode)</p>\n",type:"Integer",optional:!0},{name:"detailY",description:"<p>number of segments in the y-direction (for WebGL mode)</p>\n",type:"Integer",optional:!0}],chainable:1}]},square:{name:"square",params:[{name:"x",description:"<p>x-coordinate of the square.</p>\n",type:"Number"},{name:"y",description:"<p>y-coordinate of the square.</p>\n",type:"Number"},{name:"s",description:"<p>side size of the square.</p>\n",type:"Number"},{name:"tl",description:"<p>optional radius of top-left corner.</p>\n",type:"Number",optional:!0},{name:"tr",description:"<p>optional radius of top-right corner.</p>\n",type:"Number",optional:!0},{name:"br",description:"<p>optional radius of bottom-right corner.</p>\n",type:"Number",optional:!0},{name:"bl",description:"<p>optional radius of bottom-left corner.</p>\n",type:"Number",optional:!0}],class:"p5",module:"Shape"},triangle:{name:"triangle",params:[{name:"x1",description:"<p>x-coordinate of the first point</p>\n",type:"Number"},{name:"y1",description:"<p>y-coordinate of the first point</p>\n",type:"Number"},{name:"x2",description:"<p>x-coordinate of the second point</p>\n",type:"Number"},{name:"y2",description:"<p>y-coordinate of the second point</p>\n",type:"Number"},{name:"x3",description:"<p>x-coordinate of the third point</p>\n",type:"Number"},{name:"y3",description:"<p>y-coordinate of the third point</p>\n",type:"Number"}],class:"p5",module:"Shape"},ellipseMode:{name:"ellipseMode",params:[{name:"mode",description:"<p>either CENTER, RADIUS, CORNER, or CORNERS</p>\n",type:"Constant"}],class:"p5",module:"Shape"},noSmooth:{name:"noSmooth",class:"p5",module:"Shape"},rectMode:{name:"rectMode",params:[{name:"mode",description:"<p>either CORNER, CORNERS, CENTER, or RADIUS</p>\n",type:"Constant"}],class:"p5",module:"Shape"},smooth:{name:"smooth",class:"p5",module:"Shape"},strokeCap:{name:"strokeCap",params:[{name:"cap",description:"<p>either ROUND, SQUARE or PROJECT</p>\n",type:"Constant"}],class:"p5",module:"Shape"},strokeJoin:{name:"strokeJoin",params:[{name:"join",description:"<p>either MITER, BEVEL, ROUND</p>\n",type:"Constant"}],class:"p5",module:"Shape"},strokeWeight:{name:"strokeWeight",params:[{name:"weight",description:"<p>the weight of the stroke (in pixels)</p>\n",type:"Number"}],class:"p5",module:"Shape"},bezier:{name:"bezier",class:"p5",module:"Shape",overloads:[{params:[{name:"x1",description:"<p>x-coordinate for the first anchor point</p>\n",type:"Number"},{name:"y1",description:"<p>y-coordinate for the first anchor point</p>\n",type:"Number"},{name:"x2",description:"<p>x-coordinate for the first control point</p>\n",type:"Number"},{name:"y2",description:"<p>y-coordinate for the first control point</p>\n",type:"Number"},{name:"x3",description:"<p>x-coordinate for the second control point</p>\n",type:"Number"},{name:"y3",description:"<p>y-coordinate for the second control point</p>\n",type:"Number"},{name:"x4",description:"<p>x-coordinate for the second anchor point</p>\n",type:"Number"},{name:"y4",description:"<p>y-coordinate for the second anchor point</p>\n",type:"Number"}],chainable:1},{params:[{name:"x1",description:"",type:"Number"},{name:"y1",description:"",type:"Number"},{name:"z1",description:"<p>z-coordinate for the first anchor point</p>\n",type:"Number"},{name:"x2",description:"",type:"Number"},{name:"y2",description:"",type:"Number"},{name:"z2",description:"<p>z-coordinate for the first control point</p>\n",type:"Number"},{name:"x3",description:"",type:"Number"},{name:"y3",description:"",type:"Number"},{name:"z3",description:"<p>z-coordinate for the second control point</p>\n",type:"Number"},{name:"x4",description:"",type:"Number"},{name:"y4",description:"",type:"Number"},{name:"z4",description:"<p>z-coordinate for the second anchor point</p>\n",type:"Number"}],chainable:1}]},bezierDetail:{name:"bezierDetail",params:[{name:"detail",description:"<p>resolution of the curves</p>\n",type:"Number"}],class:"p5",module:"Shape"},bezierPoint:{name:"bezierPoint",params:[{name:"a",description:"<p>coordinate of first point on the curve</p>\n",type:"Number"},{name:"b",description:"<p>coordinate of first control point</p>\n",type:"Number"},{name:"c",description:"<p>coordinate of second control point</p>\n",type:"Number"},{name:"d",description:"<p>coordinate of second point on the curve</p>\n",type:"Number"},{name:"t",description:"<p>value between 0 and 1</p>\n",type:"Number"}],class:"p5",module:"Shape"},bezierTangent:{name:"bezierTangent",params:[{name:"a",description:"<p>coordinate of first point on the curve</p>\n",type:"Number"},{name:"b",description:"<p>coordinate of first control point</p>\n",type:"Number"},{name:"c",description:"<p>coordinate of second control point</p>\n",type:"Number"},{name:"d",description:"<p>coordinate of second point on the curve</p>\n",type:"Number"},{name:"t",description:"<p>value between 0 and 1</p>\n",type:"Number"}],class:"p5",module:"Shape"},curve:{name:"curve",class:"p5",module:"Shape",overloads:[{params:[{name:"x1",description:"<p>x-coordinate for the beginning control point</p>\n",type:"Number"},{name:"y1",description:"<p>y-coordinate for the beginning control point</p>\n",type:"Number"},{name:"x2",description:"<p>x-coordinate for the first point</p>\n",type:"Number"},{name:"y2",description:"<p>y-coordinate for the first point</p>\n",type:"Number"},{name:"x3",description:"<p>x-coordinate for the second point</p>\n",type:"Number"},{name:"y3",description:"<p>y-coordinate for the second point</p>\n",type:"Number"},{name:"x4",description:"<p>x-coordinate for the ending control point</p>\n",type:"Number"},{name:"y4",description:"<p>y-coordinate for the ending control point</p>\n",type:"Number"}],chainable:1},{params:[{name:"x1",description:"",type:"Number"},{name:"y1",description:"",type:"Number"},{name:"z1",description:"<p>z-coordinate for the beginning control point</p>\n",type:"Number"},{name:"x2",description:"",type:"Number"},{name:"y2",description:"",type:"Number"},{name:"z2",description:"<p>z-coordinate for the first point</p>\n",type:"Number"},{name:"x3",description:"",type:"Number"},{name:"y3",description:"",type:"Number"},{name:"z3",description:"<p>z-coordinate for the second point</p>\n",type:"Number"},{name:"x4",description:"",type:"Number"},{name:"y4",description:"",type:"Number"},{name:"z4",description:"<p>z-coordinate for the ending control point</p>\n",type:"Number"}],chainable:1}]},curveDetail:{name:"curveDetail",params:[{name:"resolution",description:"<p>resolution of the curves</p>\n",type:"Number"}],class:"p5",module:"Shape"},curveTightness:{name:"curveTightness",params:[{name:"amount",description:"<p>amount of deformation from the original vertices</p>\n",type:"Number"}],class:"p5",module:"Shape"},curvePoint:{name:"curvePoint",params:[{name:"a",description:"<p>coordinate of first control point of the curve</p>\n",type:"Number"},{name:"b",description:"<p>coordinate of first point</p>\n",type:"Number"},{name:"c",description:"<p>coordinate of second point</p>\n",type:"Number"},{name:"d",description:"<p>coordinate of second control point</p>\n",type:"Number"},{name:"t",description:"<p>value between 0 and 1</p>\n",type:"Number"}],class:"p5",module:"Shape"},curveTangent:{name:"curveTangent",params:[{name:"a",description:"<p>coordinate of first control point</p>\n",type:"Number"},{name:"b",description:"<p>coordinate of first point on the curve</p>\n",type:"Number"},{name:"c",description:"<p>coordinate of second point on the curve</p>\n",type:"Number"},{name:"d",description:"<p>coordinate of second conrol point</p>\n",type:"Number"},{name:"t",description:"<p>value between 0 and 1</p>\n",type:"Number"}],class:"p5",module:"Shape"},beginContour:{name:"beginContour",class:"p5",module:"Shape"},beginShape:{name:"beginShape",params:[{name:"kind",description:"<p>either POINTS, LINES, TRIANGLES, TRIANGLE_FAN\n                               TRIANGLE_STRIP, QUADS, QUAD_STRIP or TESS</p>\n",type:"Constant",optional:!0}],class:"p5",module:"Shape"},bezierVertex:{name:"bezierVertex",class:"p5",module:"Shape",overloads:[{params:[{name:"x2",description:"<p>x-coordinate for the first control point</p>\n",type:"Number"},{name:"y2",description:"<p>y-coordinate for the first control point</p>\n",type:"Number"},{name:"x3",description:"<p>x-coordinate for the second control point</p>\n",type:"Number"},{name:"y3",description:"<p>y-coordinate for the second control point</p>\n",type:"Number"},{name:"x4",description:"<p>x-coordinate for the anchor point</p>\n",type:"Number"},{name:"y4",description:"<p>y-coordinate for the anchor point</p>\n",type:"Number"}],chainable:1},{params:[{name:"x2",description:"",type:"Number"},{name:"y2",description:"",type:"Number"},{name:"z2",description:"<p>z-coordinate for the first control point (for WebGL mode)</p>\n",type:"Number"},{name:"x3",description:"",type:"Number"},{name:"y3",description:"",type:"Number"},{name:"z3",description:"<p>z-coordinate for the second control point (for WebGL mode)</p>\n",type:"Number"},{name:"x4",description:"",type:"Number"},{name:"y4",description:"",type:"Number"},{name:"z4",description:"<p>z-coordinate for the anchor point (for WebGL mode)</p>\n",type:"Number"}],chainable:1}]},curveVertex:{name:"curveVertex",class:"p5",module:"Shape",overloads:[{params:[{name:"x",description:"<p>x-coordinate of the vertex</p>\n",type:"Number"},{name:"y",description:"<p>y-coordinate of the vertex</p>\n",type:"Number"}],chainable:1},{params:[{name:"x",description:"",type:"Number"},{name:"y",description:"",type:"Number"},{name:"z",description:"<p>z-coordinate of the vertex (for WebGL mode)</p>\n",type:"Number",optional:!0}],chainable:1}]},endContour:{name:"endContour",class:"p5",module:"Shape"},endShape:{name:"endShape",params:[{name:"mode",description:"<p>use CLOSE to close the shape</p>\n",type:"Constant",optional:!0}],class:"p5",module:"Shape"},quadraticVertex:{name:"quadraticVertex",class:"p5",module:"Shape",overloads:[{params:[{name:"cx",description:"<p>x-coordinate for the control point</p>\n",type:"Number"},{name:"cy",description:"<p>y-coordinate for the control point</p>\n",type:"Number"},{name:"x3",description:"<p>x-coordinate for the anchor point</p>\n",type:"Number"},{name:"y3",description:"<p>y-coordinate for the anchor point</p>\n",type:"Number"}],chainable:1},{params:[{name:"cx",description:"",type:"Number"},{name:"cy",description:"",type:"Number"},{name:"cz",description:"<p>z-coordinate for the control point (for WebGL mode)</p>\n",type:"Number"},{name:"x3",description:"",type:"Number"},{name:"y3",description:"",type:"Number"},{name:"z3",description:"<p>z-coordinate for the anchor point (for WebGL mode)</p>\n",type:"Number"}],chainable:1}]},vertex:{name:"vertex",class:"p5",module:"Shape",overloads:[{params:[{name:"x",description:"<p>x-coordinate of the vertex</p>\n",type:"Number"},{name:"y",description:"<p>y-coordinate of the vertex</p>\n",type:"Number"}],chainable:1},{params:[{name:"x",description:"",type:"Number"},{name:"y",description:"",type:"Number"},{name:"z",description:"<p>z-coordinate of the vertex</p>\n",type:"Number"},{name:"u",description:"<p>the vertex's texture u-coordinate</p>\n",type:"Number",optional:!0},{name:"v",description:"<p>the vertex's texture v-coordinate</p>\n",type:"Number",optional:!0}],chainable:1}]},P2D:{name:"P2D",class:"p5",module:"Constants"},WEBGL:{name:"WEBGL",class:"p5",module:"Constants"},ARROW:{name:"ARROW",class:"p5",module:"Constants"},CROSS:{name:"CROSS",class:"p5",module:"Constants"},HAND:{name:"HAND",class:"p5",module:"Constants"},MOVE:{name:"MOVE",class:"p5",module:"Constants"},TEXT:{name:"TEXT",class:"p5",module:"Constants"},WAIT:{name:"WAIT",class:"p5",module:"Constants"},HALF_PI:{name:"HALF_PI",class:"p5",module:"Constants"},PI:{name:"PI",class:"p5",module:"Constants"},QUARTER_PI:{name:"QUARTER_PI",class:"p5",module:"Constants"},TAU:{name:"TAU",class:"p5",module:"Constants"},TWO_PI:{name:"TWO_PI",class:"p5",module:"Constants"},DEGREES:{name:"DEGREES",class:"p5",module:"Constants"},RADIANS:{name:"RADIANS",class:"p5",module:"Constants"},CORNER:{name:"CORNER",class:"p5",module:"Constants"},CORNERS:{name:"CORNERS",class:"p5",module:"Constants"},RADIUS:{name:"RADIUS",class:"p5",module:"Constants"},RIGHT:{name:"RIGHT",class:"p5",module:"Constants"},LEFT:{name:"LEFT",class:"p5",module:"Constants"},CENTER:{name:"CENTER",class:"p5",module:"Constants"},TOP:{name:"TOP",class:"p5",module:"Constants"},BOTTOM:{name:"BOTTOM",class:"p5",module:"Constants"},BASELINE:{name:"BASELINE",class:"p5",module:"Constants"},POINTS:{name:"POINTS",class:"p5",module:"Constants"},LINES:{name:"LINES",class:"p5",module:"Constants"},LINE_STRIP:{name:"LINE_STRIP",class:"p5",module:"Constants"},LINE_LOOP:{name:"LINE_LOOP",class:"p5",module:"Constants"},TRIANGLES:{name:"TRIANGLES",class:"p5",module:"Constants"},TRIANGLE_FAN:{name:"TRIANGLE_FAN",class:"p5",module:"Constants"},TRIANGLE_STRIP:{name:"TRIANGLE_STRIP",class:"p5",module:"Constants"},QUADS:{name:"QUADS",class:"p5",module:"Constants"},QUAD_STRIP:{name:"QUAD_STRIP",class:"p5",module:"Constants"},TESS:{name:"TESS",class:"p5",module:"Constants"},CLOSE:{name:"CLOSE",class:"p5",module:"Constants"},OPEN:{name:"OPEN",class:"p5",module:"Constants"},CHORD:{name:"CHORD",class:"p5",module:"Constants"},PIE:{name:"PIE",class:"p5",module:"Constants"},PROJECT:{name:"PROJECT",class:"p5",module:"Constants"},SQUARE:{name:"SQUARE",class:"p5",module:"Constants"},ROUND:{name:"ROUND",class:"p5",module:"Constants"},BEVEL:{name:"BEVEL",class:"p5",module:"Constants"},MITER:{name:"MITER",class:"p5",module:"Constants"},RGB:{name:"RGB",class:"p5",module:"Constants"},HSB:{name:"HSB",class:"p5",module:"Constants"},HSL:{name:"HSL",class:"p5",module:"Constants"},AUTO:{name:"AUTO",class:"p5",module:"Constants"},ALT:{name:"ALT",class:"p5",module:"Constants"},BACKSPACE:{name:"BACKSPACE",class:"p5",module:"Constants"},CONTROL:{name:"CONTROL",class:"p5",module:"Constants"},DELETE:{name:"DELETE",class:"p5",module:"Constants"},DOWN_ARROW:{name:"DOWN_ARROW",class:"p5",module:"Constants"},ENTER:{name:"ENTER",class:"p5",module:"Constants"},ESCAPE:{name:"ESCAPE",class:"p5",module:"Constants"},LEFT_ARROW:{name:"LEFT_ARROW",class:"p5",module:"Constants"},OPTION:{name:"OPTION",class:"p5",module:"Constants"},RETURN:{name:"RETURN",class:"p5",module:"Constants"},RIGHT_ARROW:{name:"RIGHT_ARROW",class:"p5",module:"Constants"},SHIFT:{name:"SHIFT",class:"p5",module:"Constants"},TAB:{name:"TAB",class:"p5",module:"Constants"},UP_ARROW:{name:"UP_ARROW",class:"p5",module:"Constants"},BLEND:{name:"BLEND",class:"p5",module:"Constants"},REMOVE:{name:"REMOVE",class:"p5",module:"Constants"},ADD:{name:"ADD",class:"p5",module:"Constants"},DARKEST:{name:"DARKEST",class:"p5",module:"Constants"},LIGHTEST:{name:"LIGHTEST",class:"p5",module:"Constants"},DIFFERENCE:{name:"DIFFERENCE",class:"p5",module:"Constants"},SUBTRACT:{name:"SUBTRACT",class:"p5",module:"Constants"},EXCLUSION:{name:"EXCLUSION",class:"p5",module:"Constants"},MULTIPLY:{name:"MULTIPLY",class:"p5",module:"Constants"},SCREEN:{name:"SCREEN",class:"p5",module:"Constants"},REPLACE:{name:"REPLACE",class:"p5",module:"Constants"},OVERLAY:{name:"OVERLAY",class:"p5",module:"Constants"},HARD_LIGHT:{name:"HARD_LIGHT",class:"p5",module:"Constants"},SOFT_LIGHT:{name:"SOFT_LIGHT",class:"p5",module:"Constants"},DODGE:{name:"DODGE",class:"p5",module:"Constants"},BURN:{name:"BURN",class:"p5",module:"Constants"},THRESHOLD:{name:"THRESHOLD",class:"p5",module:"Constants"},GRAY:{name:"GRAY",class:"p5",module:"Constants"},OPAQUE:{name:"OPAQUE",class:"p5",module:"Constants"},INVERT:{name:"INVERT",class:"p5",module:"Constants"},POSTERIZE:{name:"POSTERIZE",class:"p5",module:"Constants"},DILATE:{name:"DILATE",class:"p5",module:"Constants"},ERODE:{name:"ERODE",class:"p5",module:"Constants"},BLUR:{name:"BLUR",class:"p5",module:"Constants"},NORMAL:{name:"NORMAL",class:"p5",module:"Constants"},ITALIC:{name:"ITALIC",class:"p5",module:"Constants"},BOLD:{name:"BOLD",class:"p5",module:"Constants"},BOLDITALIC:{name:"BOLDITALIC",class:"p5",module:"Constants"},LINEAR:{name:"LINEAR",class:"p5",module:"Constants"},QUADRATIC:{name:"QUADRATIC",class:"p5",module:"Constants"},BEZIER:{name:"BEZIER",class:"p5",module:"Constants"},CURVE:{name:"CURVE",class:"p5",module:"Constants"},STROKE:{name:"STROKE",class:"p5",module:"Constants"},FILL:{name:"FILL",class:"p5",module:"Constants"},TEXTURE:{name:"TEXTURE",class:"p5",module:"Constants"},IMMEDIATE:{name:"IMMEDIATE",class:"p5",module:"Constants"},IMAGE:{name:"IMAGE",class:"p5",module:"Constants"},NEAREST:{name:"NEAREST",class:"p5",module:"Constants"},REPEAT:{name:"REPEAT",class:"p5",module:"Constants"},CLAMP:{name:"CLAMP",class:"p5",module:"Constants"},MIRROR:{name:"MIRROR",class:"p5",module:"Constants"},LANDSCAPE:{name:"LANDSCAPE",class:"p5",module:"Constants"},PORTRAIT:{name:"PORTRAIT",class:"p5",module:"Constants"},GRID:{name:"GRID",class:"p5",module:"Constants"},AXES:{name:"AXES",class:"p5",module:"Constants"},print:{name:"print",params:[{name:"contents",description:"<p>any combination of Number, String, Object, Boolean,\n                      Array to print</p>\n",type:"Any"}],class:"p5",module:"Environment"},frameCount:{name:"frameCount",class:"p5",module:"Environment"},deltaTime:{name:"deltaTime",class:"p5",module:"Environment"},focused:{name:"focused",class:"p5",module:"Environment"},cursor:{name:"cursor",params:[{name:"type",description:"<p>Built-In: either ARROW, CROSS, HAND, MOVE, TEXT and WAIT\n                              Native CSS properties: 'grab', 'progress', 'cell' etc.\n                              External: path for cursor's images\n                              (Allowed File extensions: .cur, .gif, .jpg, .jpeg, .png)\n                              For more information on Native CSS cursors and url visit:\n                              <a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/cursor\">https://developer.mozilla.org/en-US/docs/Web/CSS/cursor</a></p>\n",type:"String|Constant"},{name:"x",description:"<p>the horizontal active spot of the cursor (must be less than 32)</p>\n",type:"Number",optional:!0},{name:"y",description:"<p>the vertical active spot of the cursor (must be less than 32)</p>\n",type:"Number",optional:!0}],class:"p5",module:"Environment"},frameRate:{name:"frameRate",class:"p5",module:"Environment",overloads:[{params:[{name:"fps",description:"<p>number of frames to be displayed every second</p>\n",type:"Number"}],chainable:1},{params:[]}]},noCursor:{name:"noCursor",class:"p5",module:"Environment"},displayWidth:{name:"displayWidth",class:"p5",module:"Environment"},displayHeight:{name:"displayHeight",class:"p5",module:"Environment"},windowWidth:{name:"windowWidth",class:"p5",module:"Environment"},windowHeight:{name:"windowHeight",class:"p5",module:"Environment"},windowResized:{name:"windowResized",class:"p5",module:"Environment"},width:{name:"width",class:"p5",module:"Environment"},height:{name:"height",class:"p5",module:"Environment"},fullscreen:{name:"fullscreen",params:[{name:"val",description:"<p>whether the sketch should be in fullscreen mode\nor not</p>\n",type:"Boolean",optional:!0}],class:"p5",module:"Environment"},pixelDensity:{name:"pixelDensity",class:"p5",module:"Environment",overloads:[{params:[{name:"val",description:"<p>whether or how much the sketch should scale</p>\n",type:"Number"}],chainable:1},{params:[]}]},displayDensity:{name:"displayDensity",class:"p5",module:"Environment"},getURL:{name:"getURL",class:"p5",module:"Environment"},getURLPath:{name:"getURLPath",class:"p5",module:"Environment"},getURLParams:{name:"getURLParams",class:"p5",module:"Environment"},preload:{name:"preload",class:"p5",module:"Structure"},setup:{name:"setup",class:"p5",module:"Structure"},draw:{name:"draw",class:"p5",module:"Structure"},remove:{name:"remove",class:"p5",module:"Structure"},disableFriendlyErrors:{name:"disableFriendlyErrors",class:"p5",module:"Structure"},let:{name:"let",class:"p5",module:"Foundation"},const:{name:"const",class:"p5",module:"Foundation"},"===":{name:"===",class:"p5",module:"Foundation"},">":{name:">",class:"p5",module:"Foundation"},">=":{name:">=",class:"p5",module:"Foundation"},"<":{name:"<",class:"p5",module:"Foundation"},"<=":{name:"<=",class:"p5",module:"Foundation"},"if-else":{name:"if-else",class:"p5",module:"Foundation"},function:{name:"function",class:"p5",module:"Foundation"},return:{name:"return",class:"p5",module:"Foundation"},boolean:{name:"boolean",params:[{name:"n",description:"<p>value to parse</p>\n",type:"String|Boolean|Number|Array"}],class:"p5",module:"Data"},string:{name:"string",class:"p5",module:"Foundation"},number:{name:"number",class:"p5",module:"Foundation"},object:{name:"object",class:"p5",module:"Foundation"},class:{name:"class",class:"p5",module:"Foundation"},for:{name:"for",class:"p5",module:"Foundation"},while:{name:"while",class:"p5",module:"Foundation"},createCanvas:{name:"createCanvas",params:[{name:"w",description:"<p>width of the canvas</p>\n",type:"Number"},{name:"h",description:"<p>height of the canvas</p>\n",type:"Number"},{name:"renderer",description:"<p>either P2D or WEBGL</p>\n",type:"Constant",optional:!0}],class:"p5",module:"Rendering"},resizeCanvas:{name:"resizeCanvas",params:[{name:"w",description:"<p>width of the canvas</p>\n",type:"Number"},{name:"h",description:"<p>height of the canvas</p>\n",type:"Number"},{name:"noRedraw",description:"<p>don't redraw the canvas immediately</p>\n",type:"Boolean",optional:!0}],class:"p5",module:"Rendering"},noCanvas:{name:"noCanvas",class:"p5",module:"Rendering"},createGraphics:{name:"createGraphics",params:[{name:"w",description:"<p>width of the offscreen graphics buffer</p>\n",type:"Number"},{name:"h",description:"<p>height of the offscreen graphics buffer</p>\n",type:"Number"},{name:"renderer",description:"<p>either P2D or WEBGL\n                              undefined defaults to p2d</p>\n",type:"Constant",optional:!0}],class:"p5",module:"Rendering"},blendMode:{name:"blendMode",params:[{name:"mode",description:"<p>blend mode to set for canvas.\n               either BLEND, DARKEST, LIGHTEST, DIFFERENCE, MULTIPLY,\n               EXCLUSION, SCREEN, REPLACE, OVERLAY, HARD_LIGHT,\n               SOFT_LIGHT, DODGE, BURN, ADD, REMOVE or SUBTRACT</p>\n",type:"Constant"}],class:"p5",module:"Rendering"},drawingContext:{name:"drawingContext",class:"p5",module:"Rendering"},noLoop:{name:"noLoop",class:"p5",module:"Structure"},loop:{name:"loop",class:"p5",module:"Structure"},isLooping:{name:"isLooping",class:"p5",module:"Structure"},push:{name:"push",class:"p5",module:"Structure"},pop:{name:"pop",class:"p5",module:"Structure"},redraw:{name:"redraw",params:[{name:"n",description:"<p>Redraw for n-times. The default value is 1.</p>\n",type:"Integer",optional:!0}],class:"p5",module:"Structure"},p5:{name:"p5",params:[{name:"sketch",description:"<p>a function containing a p5.js sketch</p>\n",type:"Object"},{name:"node",description:"<p>ID or pointer to HTML DOM node to contain sketch in</p>\n",type:"String|Object"}],class:"p5",module:"Structure"},applyMatrix:{name:"applyMatrix",params:[{name:"a",description:"<p>numbers which define the 2x3 matrix to be multiplied</p>\n",type:"Number"},{name:"b",description:"<p>numbers which define the 2x3 matrix to be multiplied</p>\n",type:"Number"},{name:"c",description:"<p>numbers which define the 2x3 matrix to be multiplied</p>\n",type:"Number"},{name:"d",description:"<p>numbers which define the 2x3 matrix to be multiplied</p>\n",type:"Number"},{name:"e",description:"<p>numbers which define the 2x3 matrix to be multiplied</p>\n",type:"Number"},{name:"f",description:"<p>numbers which define the 2x3 matrix to be multiplied</p>\n",type:"Number"}],class:"p5",module:"Transform"},resetMatrix:{name:"resetMatrix",class:"p5",module:"Transform"},rotate:{name:"rotate",params:[{name:"angle",description:"<p>the angle of rotation, specified in radians\n                       or degrees, depending on current angleMode</p>\n",type:"Number"},{name:"axis",description:"<p>(in 3d) the axis to rotate around</p>\n",type:"p5.Vector|Number[]",optional:!0}],class:"p5",module:"Transform"},rotateX:{name:"rotateX",params:[{name:"angle",description:"<p>the angle of rotation, specified in radians\n                       or degrees, depending on current angleMode</p>\n",type:"Number"}],class:"p5",module:"Transform"},rotateY:{name:"rotateY",params:[{name:"angle",description:"<p>the angle of rotation, specified in radians\n                       or degrees, depending on current angleMode</p>\n",type:"Number"}],class:"p5",module:"Transform"},rotateZ:{name:"rotateZ",params:[{name:"angle",description:"<p>the angle of rotation, specified in radians\n                       or degrees, depending on current angleMode</p>\n",type:"Number"}],class:"p5",module:"Transform"},scale:{name:"scale",class:"p5",module:"Transform",overloads:[{params:[{name:"s",description:"<p>percent to scale the object, or percentage to\n                     scale the object in the x-axis if multiple arguments\n                     are given</p>\n",type:"Number|p5.Vector|Number[]"},{name:"y",description:"<p>percent to scale the object in the y-axis</p>\n",type:"Number",optional:!0},{name:"z",description:"<p>percent to scale the object in the z-axis (webgl only)</p>\n",type:"Number",optional:!0}],chainable:1},{params:[{name:"scales",description:"<p>per-axis percents to scale the object</p>\n",type:"p5.Vector|Number[]"}],chainable:1}]},shearX:{name:"shearX",params:[{name:"angle",description:"<p>angle of shear specified in radians or degrees,\n                       depending on current angleMode</p>\n",type:"Number"}],class:"p5",module:"Transform"},shearY:{name:"shearY",params:[{name:"angle",description:"<p>angle of shear specified in radians or degrees,\n                       depending on current angleMode</p>\n",type:"Number"}],class:"p5",module:"Transform"},translate:{name:"translate",class:"p5",module:"Transform",overloads:[{params:[{name:"x",description:"<p>left/right translation</p>\n",type:"Number"},{name:"y",description:"<p>up/down translation</p>\n",type:"Number"},{name:"z",description:"<p>forward/backward translation (webgl only)</p>\n",type:"Number",optional:!0}],chainable:1},{params:[{name:"vector",description:"<p>the vector to translate by</p>\n",type:"p5.Vector"}],chainable:1}]},storeItem:{name:"storeItem",params:[{name:"key",description:"",type:"String"},{name:"value",description:"",type:"String|Number|Object|Boolean|p5.Color|p5.Vector"}],class:"p5",module:"Data"},getItem:{name:"getItem",params:[{name:"key",description:"<p>name that you wish to use to store in local storage</p>\n",type:"String"}],class:"p5",module:"Data"},clearStorage:{name:"clearStorage",class:"p5",module:"Data"},removeItem:{name:"removeItem",params:[{name:"key",description:"",type:"String"}],class:"p5",module:"Data"},createStringDict:{name:"createStringDict",class:"p5",module:"Data",overloads:[{params:[{name:"key",description:"",type:"String"},{name:"value",description:"",type:"String"}]},{params:[{name:"object",description:"<p>object</p>\n",type:"Object"}]}]},createNumberDict:{name:"createNumberDict",class:"p5",module:"Data",overloads:[{params:[{name:"key",description:"",type:"Number"},{name:"value",description:"",type:"Number"}]},{params:[{name:"object",description:"<p>object</p>\n",type:"Object"}]}]},select:{name:"select",params:[{name:"selectors",description:"<p>CSS selector string of element to search for</p>\n",type:"String"},{name:"container",description:'<p>CSS selector string, <a href="#/p5.Element">p5.Element</a>, or\n                                            HTML element to search within</p>\n',type:"String|p5.Element|HTMLElement",optional:!0}],class:"p5",module:"DOM"},selectAll:{name:"selectAll",params:[{name:"selectors",description:"<p>CSS selector string of elements to search for</p>\n",type:"String"},{name:"container",description:'<p>CSS selector string, <a href="#/p5.Element">p5.Element</a>\n                                            , or HTML element to search within</p>\n',type:"String|p5.Element|HTMLElement",optional:!0}],class:"p5",module:"DOM"},removeElements:{name:"removeElements",class:"p5",module:"DOM"},changed:{name:"changed",params:[{name:"fxn",description:"<p>function to be fired when the value of\n                               an element changes.\n                               if <code>false</code> is passed instead, the previously\n                               firing function will no longer fire.</p>\n",type:"Function|Boolean"}],class:"p5",module:"DOM"},input:{name:"input",params:[{name:"fxn",description:"<p>function to be fired when any user input is\n                               detected within the element.\n                               if <code>false</code> is passed instead, the previously\n                               firing function will no longer fire.</p>\n",type:"Function|Boolean"}],class:"p5",module:"DOM"},createDiv:{name:"createDiv",params:[{name:"html",description:"<p>inner HTML for element created</p>\n",type:"String",optional:!0}],class:"p5",module:"DOM"},createP:{name:"createP",params:[{name:"html",description:"<p>inner HTML for element created</p>\n",type:"String",optional:!0}],class:"p5",module:"DOM"},createSpan:{name:"createSpan",params:[{name:"html",description:"<p>inner HTML for element created</p>\n",type:"String",optional:!0}],class:"p5",module:"DOM"},createImg:{name:"createImg",class:"p5",module:"DOM",overloads:[{params:[{name:"src",description:"<p>src path or url for image</p>\n",type:"String"},{name:"alt",description:'<p><a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Img#Attributes">alternate text</a> to be used if image does not load. You can use also an empty string (<code>""</code>) if that an image is not intended to be viewed.</p>\n',type:"String"}]},{params:[{name:"src",description:"",type:"String"},{name:"alt",description:"",type:"String"},{name:"crossOrigin",description:"<p><a href=\"https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes\">crossOrigin property</a> of the <code>img</code> element; use either 'anonymous' or 'use-credentials' to retrieve the image with cross-origin access (for later use with <code>canvas</code>. if an empty string(<code>\"\"</code>) is passed, CORS is not used</p>\n",type:"String"},{name:"successCallback",description:'<p>callback to be called once image data is loaded with the <a href="#/p5.Element">p5.Element</a> as argument</p>\n',type:"Function",optional:!0}]}]},createA:{name:"createA",params:[{name:"href",description:"<p>url of page to link to</p>\n",type:"String"},{name:"html",description:"<p>inner html of link element to display</p>\n",type:"String"},{name:"target",description:"<p>target where new link should open,\n                            could be _blank, _self, _parent, _top.</p>\n",type:"String",optional:!0}],class:"p5",module:"DOM"},createSlider:{name:"createSlider",params:[{name:"min",description:"<p>minimum value of the slider</p>\n",type:"Number"},{name:"max",description:"<p>maximum value of the slider</p>\n",type:"Number"},{name:"value",description:"<p>default value of the slider</p>\n",type:"Number",optional:!0},{name:"step",description:"<p>step size for each tick of the slider (if step is set to 0, the slider will move continuously from the minimum to the maximum value)</p>\n",type:"Number",optional:!0}],class:"p5",module:"DOM"},createButton:{name:"createButton",params:[{name:"label",description:"<p>label displayed on the button</p>\n",type:"String"},{name:"value",description:"<p>value of the button</p>\n",type:"String",optional:!0}],class:"p5",module:"DOM"},createCheckbox:{name:"createCheckbox",params:[{name:"label",description:"<p>label displayed after checkbox</p>\n",type:"String",optional:!0},{name:"value",description:"<p>value of the checkbox; checked is true, unchecked is false</p>\n",type:"Boolean",optional:!0}],class:"p5",module:"DOM"},createSelect:{name:"createSelect",class:"p5",module:"DOM",overloads:[{params:[{name:"multiple",description:"<p>true if dropdown should support multiple selections</p>\n",type:"Boolean",optional:!0}]},{params:[{name:"existing",description:"<p>DOM select element</p>\n",type:"Object"}]}]},createRadio:{name:"createRadio",class:"p5",module:"DOM",overloads:[{params:[{name:"containerElement",description:"<p>An container HTML Element either a div\nor span inside which all existing radio inputs will be considered as options.</p>\n",type:"Object"},{name:"name",description:"<p>A name parameter for each Input Element.</p>\n",type:"String",optional:!0}]},{params:[{name:"name",description:"",type:"String"}]},{params:[]}]},createColorPicker:{name:"createColorPicker",params:[{name:"value",description:"<p>default color of element</p>\n",type:"String|p5.Color",optional:!0}],class:"p5",module:"DOM"},createInput:{name:"createInput",class:"p5",module:"DOM",overloads:[{params:[{name:"value",description:"<p>default value of the input box</p>\n",type:"String"},{name:"type",description:"<p>type of text, ie text, password etc. Defaults to text.\n  Needs a value to be specified first.</p>\n",type:"String",optional:!0}]},{params:[{name:"value",description:"",type:"String",optional:!0}]}]},createFileInput:{name:"createFileInput",params:[{name:"callback",description:"<p>callback function for when a file is loaded</p>\n",type:"Function"},{name:"multiple",description:"<p>optional, to allow multiple files to be selected</p>\n",type:"Boolean",optional:!0}],class:"p5",module:"DOM"},createVideo:{name:"createVideo",params:[{name:"src",description:"<p>path to a video file, or array of paths for\n                            supporting different browsers</p>\n",type:"String|String[]"},{name:"callback",description:"<p>callback function to be called upon\n                            'canplaythrough' event fire, that is, when the\n                            browser can play the media, and estimates that\n                            enough data has been loaded to play the media\n                            up to its end without having to stop for\n                            further buffering of content</p>\n",type:"Function",optional:!0}],class:"p5",module:"DOM"},createAudio:{name:"createAudio",params:[{name:"src",description:"<p>path to an audio file, or array of paths\n                            for supporting different browsers</p>\n",type:"String|String[]",optional:!0},{name:"callback",description:"<p>callback function to be called upon\n                            'canplaythrough' event fire, that is, when the\n                            browser can play the media, and estimates that\n                            enough data has been loaded to play the media\n                            up to its end without having to stop for\n                            further buffering of content</p>\n",type:"Function",optional:!0}],class:"p5",module:"DOM"},VIDEO:{name:"VIDEO",class:"p5",module:"DOM"},AUDIO:{name:"AUDIO",class:"p5",module:"DOM"},createCapture:{name:"createCapture",params:[{name:"type",description:"<p>type of capture, either VIDEO or\n                                  AUDIO if none specified, default both,\n                                  or a Constraints object</p>\n",type:"String|Constant|Object"},{name:"callback",description:"<p>function to be called once\n                                  stream has loaded</p>\n",type:"Function",optional:!0}],class:"p5",module:"DOM"},createElement:{name:"createElement",params:[{name:"tag",description:"<p>tag for the new element</p>\n",type:"String"},{name:"content",description:"<p>html content to be inserted into the element</p>\n",type:"String",optional:!0}],class:"p5",module:"DOM"},deviceOrientation:{name:"deviceOrientation",class:"p5",module:"Events"},accelerationX:{name:"accelerationX",class:"p5",module:"Events"},accelerationY:{name:"accelerationY",class:"p5",module:"Events"},accelerationZ:{name:"accelerationZ",class:"p5",module:"Events"},pAccelerationX:{name:"pAccelerationX",class:"p5",module:"Events"},pAccelerationY:{name:"pAccelerationY",class:"p5",module:"Events"},pAccelerationZ:{name:"pAccelerationZ",class:"p5",module:"Events"},rotationX:{name:"rotationX",class:"p5",module:"Events"},rotationY:{name:"rotationY",class:"p5",module:"Events"},rotationZ:{name:"rotationZ",class:"p5",module:"Events"},pRotationX:{name:"pRotationX",class:"p5",module:"Events"},pRotationY:{name:"pRotationY",class:"p5",module:"Events"},pRotationZ:{name:"pRotationZ",class:"p5",module:"Events"},turnAxis:{name:"turnAxis",class:"p5",module:"Events"},setMoveThreshold:{name:"setMoveThreshold",params:[{name:"value",description:"<p>The threshold value</p>\n",type:"Number"}],class:"p5",module:"Events"},setShakeThreshold:{name:"setShakeThreshold",params:[{name:"value",description:"<p>The threshold value</p>\n",type:"Number"}],class:"p5",module:"Events"},deviceMoved:{name:"deviceMoved",class:"p5",module:"Events"},deviceTurned:{name:"deviceTurned",class:"p5",module:"Events"},deviceShaken:{name:"deviceShaken",class:"p5",module:"Events"},keyIsPressed:{name:"keyIsPressed",class:"p5",module:"Events"},key:{name:"key",class:"p5",module:"Events"},keyCode:{name:"keyCode",class:"p5",module:"Events"},keyPressed:{name:"keyPressed",class:"p5",module:"Events"},keyReleased:{name:"keyReleased",class:"p5",module:"Events"},keyTyped:{name:"keyTyped",class:"p5",module:"Events"},keyIsDown:{name:"keyIsDown",params:[{name:"code",description:"<p>The key to check for.</p>\n",type:"Number"}],class:"p5",module:"Events"},movedX:{name:"movedX",class:"p5",module:"Events"},movedY:{name:"movedY",class:"p5",module:"Events"},mouseX:{name:"mouseX",class:"p5",module:"Events"},mouseY:{name:"mouseY",class:"p5",module:"Events"},pmouseX:{name:"pmouseX",class:"p5",module:"Events"},pmouseY:{name:"pmouseY",class:"p5",module:"Events"},winMouseX:{name:"winMouseX",class:"p5",module:"Events"},winMouseY:{name:"winMouseY",class:"p5",module:"Events"},pwinMouseX:{name:"pwinMouseX",class:"p5",module:"Events"},pwinMouseY:{name:"pwinMouseY",class:"p5",module:"Events"},mouseButton:{name:"mouseButton",class:"p5",module:"Events"},mouseIsPressed:{name:"mouseIsPressed",class:"p5",module:"Events"},mouseMoved:{name:"mouseMoved",params:[{name:"event",description:"<p>optional MouseEvent callback argument.</p>\n",type:"Object",optional:!0}],class:"p5",module:"Events"},mouseDragged:{name:"mouseDragged",params:[{name:"event",description:"<p>optional MouseEvent callback argument.</p>\n",type:"Object",optional:!0}],class:"p5",module:"Events"},mousePressed:{name:"mousePressed",params:[{name:"event",description:"<p>optional MouseEvent callback argument.</p>\n",type:"Object",optional:!0}],class:"p5",module:"Events"},mouseReleased:{name:"mouseReleased",params:[{name:"event",description:"<p>optional MouseEvent callback argument.</p>\n",type:"Object",optional:!0}],class:"p5",module:"Events"},mouseClicked:{name:"mouseClicked",params:[{name:"event",description:"<p>optional MouseEvent callback argument.</p>\n",type:"Object",optional:!0}],class:"p5",module:"Events"},doubleClicked:{name:"doubleClicked",params:[{name:"event",description:"<p>optional MouseEvent callback argument.</p>\n",type:"Object",optional:!0}],class:"p5",module:"Events"},mouseWheel:{name:"mouseWheel",params:[{name:"event",description:"<p>optional WheelEvent callback argument.</p>\n",type:"Object",optional:!0}],class:"p5",module:"Events"},requestPointerLock:{name:"requestPointerLock",class:"p5",module:"Events"},exitPointerLock:{name:"exitPointerLock",class:"p5",module:"Events"},touches:{name:"touches",class:"p5",module:"Events"},touchStarted:{name:"touchStarted",params:[{name:"event",description:"<p>optional TouchEvent callback argument.</p>\n",type:"Object",optional:!0}],class:"p5",module:"Events"},touchMoved:{name:"touchMoved",params:[{name:"event",description:"<p>optional TouchEvent callback argument.</p>\n",type:"Object",optional:!0}],class:"p5",module:"Events"},touchEnded:{name:"touchEnded",params:[{name:"event",description:"<p>optional TouchEvent callback argument.</p>\n",type:"Object",optional:!0}],class:"p5",module:"Events"},createImage:{name:"createImage",params:[{name:"width",description:"<p>width in pixels</p>\n",type:"Integer"},{name:"height",description:"<p>height in pixels</p>\n",type:"Integer"}],class:"p5",module:"Image"},saveCanvas:{name:"saveCanvas",class:"p5",module:"Image",overloads:[{params:[{name:"selectedCanvas",description:"<p>a variable\n                                representing a specific html5 canvas (optional)</p>\n",type:"p5.Element|HTMLCanvasElement"},{name:"filename",description:"",type:"String",optional:!0},{name:"extension",description:"<p>'jpg' or 'png'</p>\n",type:"String",optional:!0}]},{params:[{name:"filename",description:"",type:"String",optional:!0},{name:"extension",description:"",type:"String",optional:!0}]}]},saveFrames:{name:"saveFrames",params:[{name:"filename",description:"",type:"String"},{name:"extension",description:"<p>'jpg' or 'png'</p>\n",type:"String"},{name:"duration",description:"<p>Duration in seconds to save the frames for.</p>\n",type:"Number"},{name:"framerate",description:"<p>Framerate to save the frames in.</p>\n",type:"Number"},{name:"callback",description:"<p>A callback function that will be executed\n                                to handle the image data. This function\n                                should accept an array as argument. The\n                                array will contain the specified number of\n                                frames of objects. Each object has three\n                                properties: imageData - an\n                                image/octet-stream, filename and extension.</p>\n",type:"Function(Array)",optional:!0}],class:"p5",module:"Image"},loadImage:{name:"loadImage",params:[{name:"path",description:"<p>Path of the image to be loaded</p>\n",type:"String"},{name:"successCallback",description:'<p>Function to be called once\n                               the image is loaded. Will be passed the\n                               <a href="#/p5.Image">p5.Image</a>.</p>\n',type:"function(p5.Image)",optional:!0},{name:"failureCallback",description:"<p>called with event error if\n                               the image fails to load.</p>\n",type:"Function(Event)",optional:!0}],class:"p5",module:"Image"},image:{name:"image",class:"p5",module:"Image",overloads:[{params:[{name:"img",description:"<p>the image to display</p>\n",type:"p5.Image|p5.Element"},{name:"x",description:"<p>the x-coordinate of the top-left corner of the image</p>\n",type:"Number"},{name:"y",description:"<p>the y-coordinate of the top-left corner of the image</p>\n",type:"Number"},{name:"width",description:"<p>the width to draw the image</p>\n",type:"Number",optional:!0},{name:"height",description:"<p>the height to draw the image</p>\n",type:"Number",optional:!0}]},{params:[{name:"img",description:"",type:"p5.Image|p5.Element"},{name:"dx",description:"<p>the x-coordinate of the destination\n                          rectangle in which to draw the source image</p>\n",type:"Number"},{name:"dy",description:"<p>the y-coordinate of the destination\n                          rectangle in which to draw the source image</p>\n",type:"Number"},{name:"dWidth",description:"<p>the width of the destination rectangle</p>\n",type:"Number"},{name:"dHeight",description:"<p>the height of the destination rectangle</p>\n",type:"Number"},{name:"sx",description:"<p>the x-coordinate of the subsection of the source\nimage to draw into the destination rectangle</p>\n",type:"Number"},{name:"sy",description:"<p>the y-coordinate of the subsection of the source\nimage to draw into the destination rectangle</p>\n",type:"Number"},{name:"sWidth",description:"<p>the width of the subsection of the\n                          source image to draw into the destination\n                          rectangle</p>\n",type:"Number",optional:!0},{name:"sHeight",description:"<p>the height of the subsection of the\n                           source image to draw into the destination rectangle</p>\n",type:"Number",optional:!0}]}]},tint:{name:"tint",class:"p5",module:"Image",overloads:[{params:[{name:"v1",description:"<p>red or hue value relative to\n                                the current color range</p>\n",type:"Number"},{name:"v2",description:"<p>green or saturation value\n                                relative to the current color range</p>\n",type:"Number"},{name:"v3",description:"<p>blue or brightness value\n                                relative to the current color range</p>\n",type:"Number"},{name:"alpha",description:"",type:"Number",optional:!0}]},{params:[{name:"value",description:"<p>a color string</p>\n",type:"String"}]},{params:[{name:"gray",description:"<p>a gray value</p>\n",type:"Number"},{name:"alpha",description:"",type:"Number",optional:!0}]},{params:[{name:"values",description:"<p>an array containing the red,green,blue &\n                                and alpha components of the color</p>\n",type:"Number[]"}]},{params:[{name:"color",description:"<p>the tint color</p>\n",type:"p5.Color"}]}]},noTint:{name:"noTint",class:"p5",module:"Image"},imageMode:{name:"imageMode",params:[{name:"mode",description:"<p>either CORNER, CORNERS, or CENTER</p>\n",type:"Constant"}],class:"p5",module:"Image"},pixels:{name:"pixels",class:"p5",module:"Image"},blend:{name:"blend",class:"p5",module:"Image",overloads:[{params:[{name:"srcImage",description:"<p>source image</p>\n",type:"p5.Image"},{name:"sx",description:"<p>X coordinate of the source's upper left corner</p>\n",type:"Integer"},{name:"sy",description:"<p>Y coordinate of the source's upper left corner</p>\n",type:"Integer"},{name:"sw",description:"<p>source image width</p>\n",type:"Integer"},{name:"sh",description:"<p>source image height</p>\n",type:"Integer"},{name:"dx",description:"<p>X coordinate of the destination's upper left corner</p>\n",type:"Integer"},{name:"dy",description:"<p>Y coordinate of the destination's upper left corner</p>\n",type:"Integer"},{name:"dw",description:"<p>destination image width</p>\n",type:"Integer"},{name:"dh",description:"<p>destination image height</p>\n",type:"Integer"},{name:"blendMode",description:"<p>the blend mode. either\n    BLEND, DARKEST, LIGHTEST, DIFFERENCE,\n    MULTIPLY, EXCLUSION, SCREEN, REPLACE, OVERLAY, HARD_LIGHT,\n    SOFT_LIGHT, DODGE, BURN, ADD or NORMAL.</p>\n",type:"Constant"}]},{params:[{name:"sx",description:"",type:"Integer"},{name:"sy",description:"",type:"Integer"},{name:"sw",description:"",type:"Integer"},{name:"sh",description:"",type:"Integer"},{name:"dx",description:"",type:"Integer"},{name:"dy",description:"",type:"Integer"},{name:"dw",description:"",type:"Integer"},{name:"dh",description:"",type:"Integer"},{name:"blendMode",description:"",type:"Constant"}]}]},copy:{name:"copy",class:"p5",module:"Image",overloads:[{params:[{name:"srcImage",description:"<p>source image</p>\n",type:"p5.Image|p5.Element"},{name:"sx",description:"<p>X coordinate of the source's upper left corner</p>\n",type:"Integer"},{name:"sy",description:"<p>Y coordinate of the source's upper left corner</p>\n",type:"Integer"},{name:"sw",description:"<p>source image width</p>\n",type:"Integer"},{name:"sh",description:"<p>source image height</p>\n",type:"Integer"},{name:"dx",description:"<p>X coordinate of the destination's upper left corner</p>\n",type:"Integer"},{name:"dy",description:"<p>Y coordinate of the destination's upper left corner</p>\n",type:"Integer"},{name:"dw",description:"<p>destination image width</p>\n",type:"Integer"},{name:"dh",description:"<p>destination image height</p>\n",type:"Integer"}]},{params:[{name:"sx",description:"",type:"Integer"},{name:"sy",description:"",type:"Integer"},{name:"sw",description:"",type:"Integer"},{name:"sh",description:"",type:"Integer"},{name:"dx",description:"",type:"Integer"},{name:"dy",description:"",type:"Integer"},{name:"dw",description:"",type:"Integer"},{name:"dh",description:"",type:"Integer"}]}]},filter:{name:"filter",params:[{name:"filterType",description:"<p>either THRESHOLD, GRAY, OPAQUE, INVERT,\n                               POSTERIZE, BLUR, ERODE, DILATE or BLUR.\n                               See Filters.js for docs on\n                               each available filter</p>\n",type:"Constant"},{name:"filterParam",description:"<p>an optional parameter unique\n                               to each filter, see above</p>\n",type:"Number",optional:!0}],class:"p5",module:"Image"},get:{name:"get",class:"p5",module:"Image",overloads:[{params:[{name:"x",description:"<p>x-coordinate of the pixel</p>\n",type:"Number"},{name:"y",description:"<p>y-coordinate of the pixel</p>\n",type:"Number"},{name:"w",description:"<p>width</p>\n",type:"Number"},{name:"h",description:"<p>height</p>\n",type:"Number"}]},{params:[]},{params:[{name:"x",description:"",type:"Number"},{name:"y",description:"",type:"Number"}]}]},loadPixels:{name:"loadPixels",class:"p5",module:"Image"},set:{name:"set",params:[{name:"x",description:"<p>x-coordinate of the pixel</p>\n",type:"Number"},{name:"y",description:"<p>y-coordinate of the pixel</p>\n",type:"Number"},{name:"c",description:'<p>insert a grayscale value | a pixel array |\n                               a <a href="#/p5.Color">p5.Color</a> object | a <a href="#/p5.Image">p5.Image</a> to copy</p>\n',type:"Number|Number[]|Object"}],class:"p5",module:"Image"},updatePixels:{name:"updatePixels",params:[{name:"x",description:"<p>x-coordinate of the upper-left corner of region\n                        to update</p>\n",type:"Number",optional:!0},{name:"y",description:"<p>y-coordinate of the upper-left corner of region\n                        to update</p>\n",type:"Number",optional:!0},{name:"w",description:"<p>width of region to update</p>\n",type:"Number",optional:!0},{name:"h",description:"<p>height of region to update</p>\n",type:"Number",optional:!0}],class:"p5",module:"Image"},loadJSON:{name:"loadJSON",class:"p5",module:"IO",overloads:[{params:[{name:"path",description:"<p>name of the file or url to load</p>\n",type:"String"},{name:"jsonpOptions",description:"<p>options object for jsonp related settings</p>\n",type:"Object",optional:!0},{name:"datatype",description:'<p>"json" or "jsonp"</p>\n',type:"String",optional:!0},{name:"callback",description:'<p>function to be executed after\n                                   <a href="#/p5/loadJSON">loadJSON()</a> completes, data is passed\n                                   in as first argument</p>\n',type:"Function",optional:!0},{name:"errorCallback",description:"<p>function to be executed if\n                                   there is an error, response is passed\n                                   in as first argument</p>\n",type:"Function",optional:!0}]},{params:[{name:"path",description:"",type:"String"},{name:"datatype",description:"",type:"String"},{name:"callback",description:"",type:"Function",optional:!0},{name:"errorCallback",description:"",type:"Function",optional:!0}]},{params:[{name:"path",description:"",type:"String"},{name:"callback",description:"",type:"Function"},{name:"errorCallback",description:"",type:"Function",optional:!0}]}]},loadStrings:{name:"loadStrings",params:[{name:"filename",description:"<p>name of the file or url to load</p>\n",type:"String"},{name:"callback",description:'<p>function to be executed after <a href="#/p5/loadStrings">loadStrings()</a>\n                              completes, Array is passed in as first\n                              argument</p>\n',type:"Function",optional:!0},{name:"errorCallback",description:"<p>function to be executed if\n                              there is an error, response is passed\n                              in as first argument</p>\n",type:"Function",optional:!0}],class:"p5",module:"IO"},loadTable:{name:"loadTable",params:[{name:"filename",description:"<p>name of the file or URL to load</p>\n",type:"String"},{name:"extension",description:'<p>parse the table by comma-separated values "csv", semicolon-separated\n                                     values "ssv", or tab-separated values "tsv"</p>\n',type:"String",optional:!0},{name:"header",description:'<p>"header" to indicate table has header row</p>\n',type:"String",optional:!0},{name:"callback",description:'<p>function to be executed after\n                                     <a href="#/p5/loadTable">loadTable()</a> completes. On success, the\n                                     <a href="#/p5.Table">Table</a> object is passed in as the\n                                     first argument.</p>\n',type:"Function",optional:!0},{name:"errorCallback",description:"<p>function to be executed if\n                                     there is an error, response is passed\n                                     in as first argument</p>\n",type:"Function",optional:!0}],class:"p5",module:"IO"},loadXML:{name:"loadXML",params:[{name:"filename",description:"<p>name of the file or URL to load</p>\n",type:"String"},{name:"callback",description:'<p>function to be executed after <a href="#/p5/loadXML">loadXML()</a>\n                              completes, XML object is passed in as\n                              first argument</p>\n',type:"Function",optional:!0},{name:"errorCallback",description:"<p>function to be executed if\n                              there is an error, response is passed\n                              in as first argument</p>\n",type:"Function",optional:!0}],class:"p5",module:"IO"},loadBytes:{name:"loadBytes",params:[{name:"file",description:"<p>name of the file or URL to load</p>\n",type:"String"},{name:"callback",description:'<p>function to be executed after <a href="#/p5/loadBytes">loadBytes()</a>\n                                   completes</p>\n',type:"Function",optional:!0},{name:"errorCallback",description:"<p>function to be executed if there\n                                   is an error</p>\n",type:"Function",optional:!0}],class:"p5",module:"IO"},httpGet:{name:"httpGet",class:"p5",module:"IO",overloads:[{params:[{name:"path",description:"<p>name of the file or url to load</p>\n",type:"String"},{name:"datatype",description:'<p>"json", "jsonp", "binary", "arrayBuffer",\n                                   "xml", or "text"</p>\n',type:"String",optional:!0},{name:"data",description:"<p>param data passed sent with request</p>\n",type:"Object|Boolean",optional:!0},{name:"callback",description:'<p>function to be executed after\n                                   <a href="#/p5/httpGet">httpGet()</a> completes, data is passed in\n                                   as first argument</p>\n',type:"Function",optional:!0},{name:"errorCallback",description:"<p>function to be executed if\n                                   there is an error, response is passed\n                                   in as first argument</p>\n",type:"Function",optional:!0}]},{params:[{name:"path",description:"",type:"String"},{name:"data",description:"",type:"Object|Boolean"},{name:"callback",description:"",type:"Function",optional:!0},{name:"errorCallback",description:"",type:"Function",optional:!0}]},{params:[{name:"path",description:"",type:"String"},{name:"callback",description:"",type:"Function"},{name:"errorCallback",description:"",type:"Function",optional:!0}]}]},httpPost:{name:"httpPost",class:"p5",module:"IO",overloads:[{params:[{name:"path",description:"<p>name of the file or url to load</p>\n",type:"String"},{name:"datatype",description:'<p>"json", "jsonp", "xml", or "text".\n                                   If omitted, <a href="#/p5/httpPost">httpPost()</a> will guess.</p>\n',type:"String",optional:!0},{name:"data",description:"<p>param data passed sent with request</p>\n",type:"Object|Boolean",optional:!0},{name:"callback",description:'<p>function to be executed after\n                                   <a href="#/p5/httpPost">httpPost()</a> completes, data is passed in\n                                   as first argument</p>\n',type:"Function",optional:!0},{name:"errorCallback",description:"<p>function to be executed if\n                                   there is an error, response is passed\n                                   in as first argument</p>\n",type:"Function",optional:!0}]},{params:[{name:"path",description:"",type:"String"},{name:"data",description:"",type:"Object|Boolean"},{name:"callback",description:"",type:"Function",optional:!0},{name:"errorCallback",description:"",type:"Function",optional:!0}]},{params:[{name:"path",description:"",type:"String"},{name:"callback",description:"",type:"Function"},{name:"errorCallback",description:"",type:"Function",optional:!0}]}]},httpDo:{name:"httpDo",class:"p5",module:"IO",overloads:[{params:[{name:"path",description:"<p>name of the file or url to load</p>\n",type:"String"},{name:"method",description:'<p>either "GET", "POST", or "PUT",\n                                   defaults to "GET"</p>\n',type:"String",optional:!0},{name:"datatype",description:'<p>"json", "jsonp", "xml", or "text"</p>\n',type:"String",optional:!0},{name:"data",description:"<p>param data passed sent with request</p>\n",type:"Object",optional:!0},{name:"callback",description:'<p>function to be executed after\n                                   <a href="#/p5/httpGet">httpGet()</a> completes, data is passed in\n                                   as first argument</p>\n',type:"Function",optional:!0},{name:"errorCallback",description:"<p>function to be executed if\n                                   there is an error, response is passed\n                                   in as first argument</p>\n",type:"Function",optional:!0}]},{params:[{name:"path",description:"",type:"String"},{name:"options",description:'<p>Request object options as documented in the\n                                   "fetch" API\n<a href="https://developer.mozilla.org/en/docs/Web/API/Fetch_API">reference</a></p>\n',type:"Object"},{name:"callback",description:"",type:"Function",optional:!0},{name:"errorCallback",description:"",type:"Function",optional:!0}]}]},createWriter:{name:"createWriter",params:[{name:"name",description:"<p>name of the file to be created</p>\n",type:"String"},{name:"extension",description:"",type:"String",optional:!0}],class:"p5",module:"IO"},save:{name:"save",params:[{name:"objectOrFilename",description:"<p>If filename is provided, will\n                                           save canvas as an image with\n                                           either png or jpg extension\n                                           depending on the filename.\n                                           If object is provided, will\n                                           save depending on the object\n                                           and filename (see examples\n                                           above).</p>\n",type:"Object|String",optional:!0},{name:"filename",description:"<p>If an object is provided as the first\n                             parameter, then the second parameter\n                             indicates the filename,\n                             and should include an appropriate\n                             file extension (see examples above).</p>\n",type:"String",optional:!0},{name:"options",description:"<p>Additional options depend on\n                          filetype. For example, when saving JSON,\n                          <code>true</code> indicates that the\n                          output will be optimized for filesize,\n                          rather than readability.</p>\n",type:"Boolean|String",optional:!0}],class:"p5",module:"IO"},saveJSON:{name:"saveJSON",params:[{name:"json",description:"",type:"Array|Object"},{name:"filename",description:"",type:"String"},{name:"optimize",description:"<p>If true, removes line breaks\n                               and spaces from the output\n                               file to optimize filesize\n                               (but not readability).</p>\n",type:"Boolean",optional:!0}],class:"p5",module:"IO"},saveStrings:{name:"saveStrings",params:[{name:"list",description:"<p>string array to be written</p>\n",type:"String[]"},{name:"filename",description:"<p>filename for output</p>\n",type:"String"},{name:"extension",description:"<p>the filename's extension</p>\n",type:"String",optional:!0},{name:"isCRLF",description:"<p>if true, change line-break to CRLF</p>\n",type:"Boolean",optional:!0}],class:"p5",module:"IO"},saveTable:{name:"saveTable",params:[{name:"Table",description:'<p>the <a href="#/p5.Table">Table</a> object to save to a file</p>\n',type:"p5.Table"},{name:"filename",description:"<p>the filename to which the Table should be saved</p>\n",type:"String"},{name:"options",description:'<p>can be one of "tsv", "csv", or "html"</p>\n',type:"String",optional:!0}],class:"p5",module:"IO"},abs:{name:"abs",params:[{name:"n",description:"<p>number to compute</p>\n",type:"Number"}],class:"p5",module:"Math"},ceil:{name:"ceil",params:[{name:"n",description:"<p>number to round up</p>\n",type:"Number"}],class:"p5",module:"Math"},constrain:{name:"constrain",params:[{name:"n",description:"<p>number to constrain</p>\n",type:"Number"},{name:"low",description:"<p>minimum limit</p>\n",type:"Number"},{name:"high",description:"<p>maximum limit</p>\n",type:"Number"}],class:"p5",module:"Math"},dist:{name:"dist",class:"p5",module:"Math",overloads:[{params:[{name:"x1",description:"<p>x-coordinate of the first point</p>\n",type:"Number"},{name:"y1",description:"<p>y-coordinate of the first point</p>\n",type:"Number"},{name:"x2",description:"<p>x-coordinate of the second point</p>\n",type:"Number"},{name:"y2",description:"<p>y-coordinate of the second point</p>\n",type:"Number"}]},{params:[{name:"x1",description:"",type:"Number"},{name:"y1",description:"",type:"Number"},{name:"z1",description:"<p>z-coordinate of the first point</p>\n",type:"Number"},{name:"x2",description:"",type:"Number"},{name:"y2",description:"",type:"Number"},{name:"z2",description:"<p>z-coordinate of the second point</p>\n",type:"Number"}]}]},exp:{name:"exp",params:[{name:"n",description:"<p>exponent to raise</p>\n",type:"Number"}],class:"p5",module:"Math"},floor:{name:"floor",params:[{name:"n",description:"<p>number to round down</p>\n",type:"Number"}],class:"p5",module:"Math"},lerp:{name:"lerp",params:[{name:"start",description:"<p>first value</p>\n",type:"Number"},{name:"stop",description:"<p>second value</p>\n",type:"Number"},{name:"amt",description:"<p>number</p>\n",type:"Number"}],class:"p5",module:"Math"},log:{name:"log",params:[{name:"n",description:"<p>number greater than 0</p>\n",type:"Number"}],class:"p5",module:"Math"},mag:{name:"mag",params:[{name:"a",description:"<p>first value</p>\n",type:"Number"},{name:"b",description:"<p>second value</p>\n",type:"Number"}],class:"p5",module:"Math"},map:{name:"map",params:[{name:"value",description:"<p>the incoming value to be converted</p>\n",type:"Number"},{name:"start1",description:"<p>lower bound of the value's current range</p>\n",type:"Number"},{name:"stop1",description:"<p>upper bound of the value's current range</p>\n",type:"Number"},{name:"start2",description:"<p>lower bound of the value's target range</p>\n",type:"Number"},{name:"stop2",description:"<p>upper bound of the value's target range</p>\n",type:"Number"},{name:"withinBounds",description:"<p>constrain the value to the newly mapped range</p>\n",type:"Boolean",optional:!0}],class:"p5",module:"Math"},max:{name:"max",class:"p5",module:"Math",overloads:[{params:[{name:"n0",description:"<p>Number to compare</p>\n",type:"Number"},{name:"n1",description:"<p>Number to compare</p>\n",type:"Number"}]},{params:[{name:"nums",description:"<p>Numbers to compare</p>\n",type:"Number[]"}]}]},min:{name:"min",class:"p5",module:"Math",overloads:[{params:[{name:"n0",description:"<p>Number to compare</p>\n",type:"Number"},{name:"n1",description:"<p>Number to compare</p>\n",type:"Number"}]},{params:[{name:"nums",description:"<p>Numbers to compare</p>\n",type:"Number[]"}]}]},norm:{name:"norm",params:[{name:"value",description:"<p>incoming value to be normalized</p>\n",type:"Number"},{name:"start",description:"<p>lower bound of the value's current range</p>\n",type:"Number"},{name:"stop",description:"<p>upper bound of the value's current range</p>\n",type:"Number"}],class:"p5",module:"Math"},pow:{name:"pow",params:[{name:"n",description:"<p>base of the exponential expression</p>\n",type:"Number"},{name:"e",description:"<p>power by which to raise the base</p>\n",type:"Number"}],class:"p5",module:"Math"},round:{name:"round",params:[{name:"n",description:"<p>number to round</p>\n",type:"Number"},{name:"decimals",description:"<p>number of decimal places to round to, default is 0</p>\n",type:"Number",optional:!0}],class:"p5",module:"Math"},sq:{name:"sq",params:[{name:"n",description:"<p>number to square</p>\n",type:"Number"}],class:"p5",module:"Math"},sqrt:{name:"sqrt",params:[{name:"n",description:"<p>non-negative number to square root</p>\n",type:"Number"}],class:"p5",module:"Math"},fract:{name:"fract",params:[{name:"num",description:"<p>Number whose fractional part needs to be found out</p>\n",type:"Number"}],class:"p5",module:"Math"},createVector:{name:"createVector",params:[{name:"x",description:"<p>x component of the vector</p>\n",type:"Number",optional:!0},{name:"y",description:"<p>y component of the vector</p>\n",type:"Number",optional:!0},{name:"z",description:"<p>z component of the vector</p>\n",type:"Number",optional:!0}],class:"p5",module:"Math"},noise:{name:"noise",params:[{name:"x",description:"<p>x-coordinate in noise space</p>\n",type:"Number"},{name:"y",description:"<p>y-coordinate in noise space</p>\n",type:"Number",optional:!0},{name:"z",description:"<p>z-coordinate in noise space</p>\n",type:"Number",optional:!0}],class:"p5",module:"Math"},noiseDetail:{name:"noiseDetail",params:[{name:"lod",description:"<p>number of octaves to be used by the noise</p>\n",type:"Number"},{name:"falloff",description:"<p>falloff factor for each octave</p>\n",type:"Number"}],class:"p5",module:"Math"},noiseSeed:{name:"noiseSeed",params:[{name:"seed",description:"<p>the seed value</p>\n",type:"Number"}],class:"p5",module:"Math"},randomSeed:{name:"randomSeed",params:[{name:"seed",description:"<p>the seed value</p>\n",type:"Number"}],class:"p5",module:"Math"},random:{name:"random",class:"p5",module:"Math",overloads:[{params:[{name:"min",description:"<p>the lower bound (inclusive)</p>\n",type:"Number",optional:!0},{name:"max",description:"<p>the upper bound (exclusive)</p>\n",type:"Number",optional:!0}]},{params:[{name:"choices",description:"<p>the array to choose from</p>\n",type:"Array"}]}]},randomGaussian:{name:"randomGaussian",params:[{name:"mean",description:"<p>the mean</p>\n",type:"Number"},{name:"sd",description:"<p>the standard deviation</p>\n",type:"Number"}],class:"p5",module:"Math"},acos:{name:"acos",params:[{name:"value",description:"<p>the value whose arc cosine is to be returned</p>\n",type:"Number"}],class:"p5",module:"Math"},asin:{name:"asin",params:[{name:"value",description:"<p>the value whose arc sine is to be returned</p>\n",type:"Number"}],class:"p5",module:"Math"},atan:{name:"atan",params:[{name:"value",description:"<p>the value whose arc tangent is to be returned</p>\n",type:"Number"}],class:"p5",module:"Math"},atan2:{name:"atan2",params:[{name:"y",description:"<p>y-coordinate of the point</p>\n",type:"Number"},{name:"x",description:"<p>x-coordinate of the point</p>\n",type:"Number"}],class:"p5",module:"Math"},cos:{name:"cos",params:[{name:"angle",description:"<p>the angle</p>\n",type:"Number"}],class:"p5",module:"Math"},sin:{name:"sin",params:[{name:"angle",description:"<p>the angle</p>\n",type:"Number"}],class:"p5",module:"Math"},tan:{name:"tan",params:[{name:"angle",description:"<p>the angle</p>\n",type:"Number"}],class:"p5",module:"Math"},degrees:{name:"degrees",params:[{name:"radians",description:"<p>the radians value to convert to degrees</p>\n",type:"Number"}],class:"p5",module:"Math"},radians:{name:"radians",params:[{name:"degrees",description:"<p>the degree value to convert to radians</p>\n",type:"Number"}],class:"p5",module:"Math"},angleMode:{name:"angleMode",params:[{name:"mode",description:"<p>either RADIANS or DEGREES</p>\n",type:"Constant"}],class:"p5",module:"Math"},textAlign:{name:"textAlign",class:"p5",module:"Typography",overloads:[{params:[{name:"horizAlign",description:"<p>horizontal alignment, either LEFT,\n                           CENTER, or RIGHT</p>\n",type:"Constant"},{name:"vertAlign",description:"<p>vertical alignment, either TOP,\n                           BOTTOM, CENTER, or BASELINE</p>\n",type:"Constant",optional:!0}],chainable:1},{params:[]}]},textLeading:{name:"textLeading",class:"p5",module:"Typography",overloads:[{params:[{name:"leading",description:"<p>the size in pixels for spacing between lines</p>\n",type:"Number"}],chainable:1},{params:[]}]},textSize:{name:"textSize",class:"p5",module:"Typography",overloads:[{params:[{name:"theSize",description:"<p>the size of the letters in units of pixels</p>\n",type:"Number"}],chainable:1},{params:[]}]},textStyle:{name:"textStyle",class:"p5",module:"Typography",overloads:[{params:[{name:"theStyle",description:"<p>styling for text, either NORMAL,\n                           ITALIC, BOLD or BOLDITALIC</p>\n",type:"Constant"}],chainable:1},{params:[]}]},textWidth:{name:"textWidth",params:[{name:"theText",description:"<p>the String of characters to measure</p>\n",type:"String"}],class:"p5",module:"Typography"},textAscent:{name:"textAscent",class:"p5",module:"Typography"},textDescent:{name:"textDescent",class:"p5",module:"Typography"},loadFont:{name:"loadFont",params:[{name:"path",description:"<p>name of the file or url to load</p>\n",type:"String"},{name:"callback",description:'<p>function to be executed after\n                                   <a href="#/p5/loadFont">loadFont()</a> completes</p>\n',type:"Function",optional:!0},{name:"onError",description:"<p>function to be executed if\n                                   an error occurs</p>\n",type:"Function",optional:!0}],class:"p5",module:"Typography"},text:{name:"text",params:[{name:"str",description:"<p>the alphanumeric\n                                            symbols to be displayed</p>\n",type:"String|Object|Array|Number|Boolean"},{name:"x",description:"<p>x-coordinate of text</p>\n",type:"Number"},{name:"y",description:"<p>y-coordinate of text</p>\n",type:"Number"},{name:"x2",description:'<p>by default, the width of the text box,\n                    see <a href="#/p5/rectMode">rectMode()</a> for more info</p>\n',type:"Number",optional:!0},{name:"y2",description:'<p>by default, the height of the text box,\n                    see <a href="#/p5/rectMode">rectMode()</a> for more info</p>\n',type:"Number",optional:!0}],class:"p5",module:"Typography"},textFont:{name:"textFont",class:"p5",module:"Typography",overloads:[{params:[]},{params:[{name:"font",description:'<p>a font loaded via <a href="#/p5/loadFont">loadFont()</a>,\nor a String representing a <a href="https://mzl.la/2dOw8WD">web safe font</a>\n(a font that is generally available across all systems)</p>\n',type:"Object|String"},{name:"size",description:"<p>the font size to use</p>\n",type:"Number",optional:!0}],chainable:1}]},append:{name:"append",params:[{name:"array",description:"<p>Array to append</p>\n",type:"Array"},{name:"value",description:"<p>to be added to the Array</p>\n",type:"Any"}],class:"p5",module:"Data"},arrayCopy:{name:"arrayCopy",class:"p5",module:"Data",overloads:[{params:[{name:"src",description:"<p>the source Array</p>\n",type:"Array"},{name:"srcPosition",description:"<p>starting position in the source Array</p>\n",type:"Integer"},{name:"dst",description:"<p>the destination Array</p>\n",type:"Array"},{name:"dstPosition",description:"<p>starting position in the destination Array</p>\n",type:"Integer"},{name:"length",description:"<p>number of Array elements to be copied</p>\n",type:"Integer"}]},{params:[{name:"src",description:"",type:"Array"},{name:"dst",description:"",type:"Array"},{name:"length",description:"",type:"Integer",optional:!0}]}]},concat:{name:"concat",params:[{name:"a",description:"<p>first Array to concatenate</p>\n",type:"Array"},{name:"b",description:"<p>second Array to concatenate</p>\n",type:"Array"}],class:"p5",module:"Data"},reverse:{name:"reverse",params:[{name:"list",description:"<p>Array to reverse</p>\n",type:"Array"}],class:"p5",module:"Data"},shorten:{name:"shorten",params:[{name:"list",description:"<p>Array to shorten</p>\n",type:"Array"}],class:"p5",module:"Data"},shuffle:{name:"shuffle",params:[{name:"array",description:"<p>Array to shuffle</p>\n",type:"Array"},{name:"bool",description:"<p>modify passed array</p>\n",type:"Boolean",optional:!0}],class:"p5",module:"Data"},sort:{name:"sort",params:[{name:"list",description:"<p>Array to sort</p>\n",type:"Array"},{name:"count",description:"<p>number of elements to sort, starting from 0</p>\n",type:"Integer",optional:!0}],class:"p5",module:"Data"},splice:{name:"splice",params:[{name:"list",description:"<p>Array to splice into</p>\n",type:"Array"},{name:"value",description:"<p>value to be spliced in</p>\n",type:"Any"},{name:"position",description:"<p>in the array from which to insert data</p>\n",type:"Integer"}],class:"p5",module:"Data"},subset:{name:"subset",params:[{name:"list",description:"<p>Array to extract from</p>\n",type:"Array"},{name:"start",description:"<p>position to begin</p>\n",type:"Integer"},{name:"count",description:"<p>number of values to extract</p>\n",type:"Integer",optional:!0}],class:"p5",module:"Data"},float:{name:"float",params:[{name:"str",description:"<p>float string to parse</p>\n",type:"String"}],class:"p5",module:"Data"},int:{name:"int",class:"p5",module:"Data",overloads:[{params:[{name:"n",description:"<p>value to parse</p>\n",type:"String|Boolean|Number"},{name:"radix",description:"<p>the radix to convert to (default: 10)</p>\n",type:"Integer",optional:!0}]},{params:[{name:"ns",description:"<p>values to parse</p>\n",type:"Array"}]}]},str:{name:"str",params:[{name:"n",description:"<p>value to parse</p>\n",type:"String|Boolean|Number|Array"}],class:"p5",module:"Data"},byte:{name:"byte",class:"p5",module:"Data",overloads:[{params:[{name:"n",description:"<p>value to parse</p>\n",type:"String|Boolean|Number"}]},{params:[{name:"ns",description:"<p>values to parse</p>\n",type:"Array"}]}]},char:{name:"char",class:"p5",module:"Data",overloads:[{params:[{name:"n",description:"<p>value to parse</p>\n",type:"String|Number"}]},{params:[{name:"ns",description:"<p>values to parse</p>\n",type:"Array"}]}]},unchar:{name:"unchar",class:"p5",module:"Data",overloads:[{params:[{name:"n",description:"<p>value to parse</p>\n",type:"String"}]},{params:[{name:"ns",description:"<p>values to parse</p>\n",type:"Array"}]}]},hex:{name:"hex",class:"p5",module:"Data",overloads:[{params:[{name:"n",description:"<p>value to parse</p>\n",type:"Number"},{name:"digits",description:"",type:"Number",optional:!0}]},{params:[{name:"ns",description:"<p>array of values to parse</p>\n",type:"Number[]"},{name:"digits",description:"",type:"Number",optional:!0}]}]},unhex:{name:"unhex",class:"p5",module:"Data",overloads:[{params:[{name:"n",description:"<p>value to parse</p>\n",type:"String"}]},{params:[{name:"ns",description:"<p>values to parse</p>\n",type:"Array"}]}]},join:{name:"join",params:[{name:"list",description:"<p>array of Strings to be joined</p>\n",type:"Array"},{name:"separator",description:"<p>String to be placed between each item</p>\n",type:"String"}],class:"p5",module:"Data"},match:{name:"match",params:[{name:"str",description:"<p>the String to be searched</p>\n",type:"String"},{name:"regexp",description:"<p>the regexp to be used for matching</p>\n",type:"String"}],class:"p5",module:"Data"},matchAll:{name:"matchAll",params:[{name:"str",description:"<p>the String to be searched</p>\n",type:"String"},{name:"regexp",description:"<p>the regexp to be used for matching</p>\n",type:"String"}],class:"p5",module:"Data"},nf:{name:"nf",class:"p5",module:"Data",overloads:[{params:[{name:"num",description:"<p>the Number to format</p>\n",type:"Number|String"},{name:"left",description:"<p>number of digits to the left of the\n                               decimal point</p>\n",type:"Integer|String",optional:!0},{name:"right",description:"<p>number of digits to the right of the\n                               decimal point</p>\n",type:"Integer|String",optional:!0}]},{params:[{name:"nums",description:"<p>the Numbers to format</p>\n",type:"Array"},{name:"left",description:"",type:"Integer|String",optional:!0},{name:"right",description:"",type:"Integer|String",optional:!0}]}]},nfc:{name:"nfc",class:"p5",module:"Data",overloads:[{params:[{name:"num",description:"<p>the Number to format</p>\n",type:"Number|String"},{name:"right",description:"<p>number of digits to the right of the\n                                 decimal point</p>\n",type:"Integer|String",optional:!0}]},{params:[{name:"nums",description:"<p>the Numbers to format</p>\n",type:"Array"},{name:"right",description:"",type:"Integer|String",optional:!0}]}]},nfp:{name:"nfp",class:"p5",module:"Data",overloads:[{params:[{name:"num",description:"<p>the Number to format</p>\n",type:"Number"},{name:"left",description:"<p>number of digits to the left of the decimal\n                               point</p>\n",type:"Integer",optional:!0},{name:"right",description:"<p>number of digits to the right of the\n                               decimal point</p>\n",type:"Integer",optional:!0}]},{params:[{name:"nums",description:"<p>the Numbers to format</p>\n",type:"Number[]"},{name:"left",description:"",type:"Integer",optional:!0},{name:"right",description:"",type:"Integer",optional:!0}]}]},nfs:{name:"nfs",class:"p5",module:"Data",overloads:[{params:[{name:"num",description:"<p>the Number to format</p>\n",type:"Number"},{name:"left",description:"<p>number of digits to the left of the decimal\n                               point</p>\n",type:"Integer",optional:!0},{name:"right",description:"<p>number of digits to the right of the\n                               decimal point</p>\n",type:"Integer",optional:!0}]},{params:[{name:"nums",description:"<p>the Numbers to format</p>\n",type:"Array"},{name:"left",description:"",type:"Integer",optional:!0},{name:"right",description:"",type:"Integer",optional:!0}]}]},split:{name:"split",params:[{name:"value",description:"<p>the String to be split</p>\n",type:"String"},{name:"delim",description:"<p>the String used to separate the data</p>\n",type:"String"}],class:"p5",module:"Data"},splitTokens:{name:"splitTokens",params:[{name:"value",description:"<p>the String to be split</p>\n",type:"String"},{name:"delim",description:"<p>list of individual Strings that will be used as\n                         separators</p>\n",type:"String",optional:!0}],class:"p5",module:"Data"},trim:{name:"trim",class:"p5",module:"Data",overloads:[{params:[{name:"str",description:"<p>a String to be trimmed</p>\n",type:"String"}]},{params:[{name:"strs",description:"<p>an Array of Strings to be trimmed</p>\n",type:"Array"}]}]},day:{name:"day",class:"p5",module:"IO"},hour:{name:"hour",class:"p5",module:"IO"},minute:{name:"minute",class:"p5",module:"IO"},millis:{name:"millis",class:"p5",module:"IO"},month:{name:"month",class:"p5",module:"IO"},second:{name:"second",class:"p5",module:"IO"},year:{name:"year",class:"p5",module:"IO"},plane:{name:"plane",params:[{name:"width",description:"<p>width of the plane</p>\n",type:"Number",optional:!0},{name:"height",description:"<p>height of the plane</p>\n",type:"Number",optional:!0},{name:"detailX",description:"<p>Optional number of triangle\n                            subdivisions in x-dimension</p>\n",type:"Integer",optional:!0},{name:"detailY",description:"<p>Optional number of triangle\n                            subdivisions in y-dimension</p>\n",type:"Integer",optional:!0}],class:"p5",module:"Shape"},box:{name:"box",params:[{name:"width",description:"<p>width of the box</p>\n",type:"Number",optional:!0},{name:"Height",description:"<p>height of the box</p>\n",type:"Number",optional:!0},{name:"depth",description:"<p>depth of the box</p>\n",type:"Number",optional:!0},{name:"detailX",description:"<p>Optional number of triangle\n                           subdivisions in x-dimension</p>\n",type:"Integer",optional:!0},{name:"detailY",description:"<p>Optional number of triangle\n                           subdivisions in y-dimension</p>\n",type:"Integer",optional:!0}],class:"p5",module:"Shape"},sphere:{name:"sphere",params:[{name:"radius",description:"<p>radius of circle</p>\n",type:"Number",optional:!0},{name:"detailX",description:"<p>optional number of subdivisions in x-dimension</p>\n",type:"Integer",optional:!0},{name:"detailY",description:"<p>optional number of subdivisions in y-dimension</p>\n",type:"Integer",optional:!0}],class:"p5",module:"Shape"},cylinder:{name:"cylinder",params:[{name:"radius",description:"<p>radius of the surface</p>\n",type:"Number",optional:!0},{name:"height",description:"<p>height of the cylinder</p>\n",type:"Number",optional:!0},{name:"detailX",description:"<p>number of subdivisions in x-dimension;\n                              default is 24</p>\n",type:"Integer",optional:!0},{name:"detailY",description:"<p>number of subdivisions in y-dimension;\n                              default is 1</p>\n",type:"Integer",optional:!0},{name:"bottomCap",description:"<p>whether to draw the bottom of the cylinder</p>\n",type:"Boolean",optional:!0},{name:"topCap",description:"<p>whether to draw the top of the cylinder</p>\n",type:"Boolean",optional:!0}],class:"p5",module:"Shape"},cone:{name:"cone",params:[{name:"radius",description:"<p>radius of the bottom surface</p>\n",type:"Number",optional:!0},{name:"height",description:"<p>height of the cone</p>\n",type:"Number",optional:!0},{name:"detailX",description:"<p>number of segments,\n                            the more segments the smoother geometry\n                            default is 24</p>\n",type:"Integer",optional:!0},{name:"detailY",description:"<p>number of segments,\n                            the more segments the smoother geometry\n                            default is 1</p>\n",type:"Integer",optional:!0},{name:"cap",description:"<p>whether to draw the base of the cone</p>\n",type:"Boolean",optional:!0}],class:"p5",module:"Shape"},ellipsoid:{name:"ellipsoid",params:[{name:"radiusx",description:"<p>x-radius of ellipsoid</p>\n",type:"Number",optional:!0},{name:"radiusy",description:"<p>y-radius of ellipsoid</p>\n",type:"Number",optional:!0},{name:"radiusz",description:"<p>z-radius of ellipsoid</p>\n",type:"Number",optional:!0},{name:"detailX",description:"<p>number of segments,\n                                   the more segments the smoother geometry\n                                   default is 24. Avoid detail number above\n                                   150, it may crash the browser.</p>\n",type:"Integer",optional:!0},{name:"detailY",description:"<p>number of segments,\n                                   the more segments the smoother geometry\n                                   default is 16. Avoid detail number above\n                                   150, it may crash the browser.</p>\n",type:"Integer",optional:!0}],class:"p5",module:"Shape"},torus:{name:"torus",params:[{name:"radius",description:"<p>radius of the whole ring</p>\n",type:"Number",optional:!0},{name:"tubeRadius",description:"<p>radius of the tube</p>\n",type:"Number",optional:!0},{name:"detailX",description:"<p>number of segments in x-dimension,\n                               the more segments the smoother geometry\n                               default is 24</p>\n",type:"Integer",optional:!0},{name:"detailY",description:"<p>number of segments in y-dimension,\n                               the more segments the smoother geometry\n                               default is 16</p>\n",type:"Integer",optional:!0}],class:"p5",module:"Shape"},orbitControl:{name:"orbitControl",params:[{name:"sensitivityX",description:"<p>sensitivity to mouse movement along X axis</p>\n",type:"Number",optional:!0},{name:"sensitivityY",description:"<p>sensitivity to mouse movement along Y axis</p>\n",type:"Number",optional:!0},{name:"sensitivityZ",description:"<p>sensitivity to scroll movement along Z axis</p>\n",type:"Number",optional:!0}],class:"p5",module:"Lights, Camera"},debugMode:{name:"debugMode",class:"p5",module:"Lights, Camera",overloads:[{params:[]},{params:[{name:"mode",description:"<p>either GRID or AXES</p>\n",type:"Constant"}]},{params:[{name:"mode",description:"",type:"Constant"},{name:"gridSize",description:"<p>size of one side of the grid</p>\n",type:"Number",optional:!0},{name:"gridDivisions",description:"<p>number of divisions in the grid</p>\n",type:"Number",optional:!0},{name:"xOff",description:"<p>X axis offset from origin (0,0,0)</p>\n",type:"Number",optional:!0},{name:"yOff",description:"<p>Y axis offset from origin (0,0,0)</p>\n",type:"Number",optional:!0},{name:"zOff",description:"<p>Z axis offset from origin (0,0,0)</p>\n",type:"Number",optional:!0}]},{params:[{name:"mode",description:"",type:"Constant"},{name:"axesSize",description:"<p>size of axes icon</p>\n",type:"Number",optional:!0},{name:"xOff",description:"",type:"Number",optional:!0},{name:"yOff",description:"",type:"Number",optional:!0},{name:"zOff",description:"",type:"Number",optional:!0}]},{params:[{name:"gridSize",description:"",type:"Number",optional:!0},{name:"gridDivisions",description:"",type:"Number",optional:!0},{name:"gridXOff",description:"",type:"Number",optional:!0},{name:"gridYOff",description:"",type:"Number",optional:!0},{name:"gridZOff",description:"",type:"Number",optional:!0},{name:"axesSize",description:"",type:"Number",optional:!0},{name:"axesXOff",description:"",type:"Number",optional:!0},{name:"axesYOff",description:"",type:"Number",optional:!0},{name:"axesZOff",description:"",type:"Number",optional:!0}]}]},noDebugMode:{name:"noDebugMode",class:"p5",module:"Lights, Camera"},ambientLight:{name:"ambientLight",class:"p5",module:"Lights, Camera",overloads:[{params:[{name:"v1",description:"<p>red or hue value relative to\n                                the current color range</p>\n",type:"Number"},{name:"v2",description:"<p>green or saturation value\n                                relative to the current color range</p>\n",type:"Number"},{name:"v3",description:"<p>blue or brightness value\n                                relative to the current color range</p>\n",type:"Number"},{name:"alpha",description:"<p>the alpha value</p>\n",type:"Number",optional:!0}],chainable:1},{params:[{name:"value",description:"<p>a color string</p>\n",type:"String"}],chainable:1},{params:[{name:"gray",description:"<p>a gray value</p>\n",type:"Number"},{name:"alpha",description:"",type:"Number",optional:!0}],chainable:1},{params:[{name:"values",description:"<p>an array containing the red,green,blue &\n                                and alpha components of the color</p>\n",type:"Number[]"}],chainable:1},{params:[{name:"color",description:"<p>the ambient light color</p>\n",type:"p5.Color"}],chainable:1}]},specularColor:{name:"specularColor",class:"p5",module:"Lights, Camera",overloads:[{params:[{name:"v1",description:"<p>red or hue value relative to\n                                the current color range</p>\n",type:"Number"},{name:"v2",description:"<p>green or saturation value\n                                relative to the current color range</p>\n",type:"Number"},{name:"v3",description:"<p>blue or brightness value\n                                relative to the current color range</p>\n",type:"Number"}],chainable:1},{params:[{name:"value",description:"<p>a color string</p>\n",type:"String"}],chainable:1},{params:[{name:"gray",description:"<p>a gray value</p>\n",type:"Number"}],chainable:1},{params:[{name:"values",description:"<p>an array containing the red,green,blue &\n                                and alpha components of the color</p>\n",type:"Number[]"}],chainable:1},{params:[{name:"color",description:"<p>the ambient light color</p>\n",type:"p5.Color"}],chainable:1}]},directionalLight:{name:"directionalLight",class:"p5",module:"Lights, Camera",overloads:[{params:[{name:"v1",description:"<p>red or hue value (depending on the current\ncolor mode),</p>\n",type:"Number"},{name:"v2",description:"<p>green or saturation value</p>\n",type:"Number"},{name:"v3",description:"<p>blue or brightness value</p>\n",type:"Number"},{name:"position",description:"<p>the direction of the light</p>\n",type:"p5.Vector"}],chainable:1},{params:[{name:"color",description:'<p>color Array, CSS color string,\n                                            or <a href="#/p5.Color">p5.Color</a> value</p>\n',type:"Number[]|String|p5.Color"},{name:"x",description:"<p>x axis direction</p>\n",type:"Number"},{name:"y",description:"<p>y axis direction</p>\n",type:"Number"},{name:"z",description:"<p>z axis direction</p>\n",type:"Number"}],chainable:1},{params:[{name:"color",description:"",type:"Number[]|String|p5.Color"},{name:"position",description:"",type:"p5.Vector"}],chainable:1},{params:[{name:"v1",description:"",type:"Number"},{name:"v2",description:"",type:"Number"},{name:"v3",description:"",type:"Number"},{name:"x",description:"",type:"Number"},{name:"y",description:"",type:"Number"},{name:"z",description:"",type:"Number"}],chainable:1}]},pointLight:{name:"pointLight",class:"p5",module:"Lights, Camera",overloads:[{params:[{name:"v1",description:"<p>red or hue value (depending on the current\ncolor mode),</p>\n",type:"Number"},{name:"v2",description:"<p>green or saturation value</p>\n",type:"Number"},{name:"v3",description:"<p>blue or brightness value</p>\n",type:"Number"},{name:"x",description:"<p>x axis position</p>\n",type:"Number"},{name:"y",description:"<p>y axis position</p>\n",type:"Number"},{name:"z",description:"<p>z axis position</p>\n",type:"Number"}],chainable:1},{params:[{name:"v1",description:"",type:"Number"},{name:"v2",description:"",type:"Number"},{name:"v3",description:"",type:"Number"},{name:"position",description:"<p>the position of the light</p>\n",type:"p5.Vector"}],chainable:1},{params:[{name:"color",description:'<p>color Array, CSS color string,\nor <a href="#/p5.Color">p5.Color</a> value</p>\n',type:"Number[]|String|p5.Color"},{name:"x",description:"",type:"Number"},{name:"y",description:"",type:"Number"},{name:"z",description:"",type:"Number"}],chainable:1},{params:[{name:"color",description:"",type:"Number[]|String|p5.Color"},{name:"position",description:"",type:"p5.Vector"}],chainable:1}]},lights:{name:"lights",class:"p5",module:"Lights, Camera"},lightFalloff:{name:"lightFalloff",params:[{name:"constant",description:"<p>constant value for determining falloff</p>\n",type:"Number"},{name:"linear",description:"<p>linear value for determining falloff</p>\n",type:"Number"},{name:"quadratic",description:"<p>quadratic value for determining falloff</p>\n",type:"Number"}],class:"p5",module:"Lights, Camera"},spotLight:{name:"spotLight",class:"p5",module:"Lights, Camera",overloads:[{params:[{name:"v1",description:"<p>red or hue value (depending on the current\ncolor mode),</p>\n",type:"Number"},{name:"v2",description:"<p>green or saturation value</p>\n",type:"Number"},{name:"v3",description:"<p>blue or brightness value</p>\n",type:"Number"},{name:"x",description:"<p>x axis position</p>\n",type:"Number"},{name:"y",description:"<p>y axis position</p>\n",type:"Number"},{name:"z",description:"<p>z axis position</p>\n",type:"Number"},{name:"rx",description:"<p>x axis direction of light</p>\n",type:"Number"},{name:"ry",description:"<p>y axis direction of light</p>\n",type:"Number"},{name:"rz",description:"<p>z axis direction of light</p>\n",type:"Number"},{name:"angle",description:"<p>optional parameter for angle. Defaults to PI/3</p>\n",type:"Number",optional:!0},{name:"conc",description:"<p>optional parameter for concentration. Defaults to 100</p>\n",type:"Number",optional:!0}],chainable:1},{params:[{name:"color",description:'<p>color Array, CSS color string,\nor <a href="#/p5.Color">p5.Color</a> value</p>\n',type:"Number[]|String|p5.Color"},{name:"position",description:"<p>the position of the light</p>\n",type:"p5.Vector"},{name:"direction",description:"<p>the direction of the light</p>\n",type:"p5.Vector"},{name:"angle",description:"",type:"Number",optional:!0},{name:"conc",description:"",type:"Number",optional:!0}]},{params:[{name:"v1",description:"",type:"Number"},{name:"v2",description:"",type:"Number"},{name:"v3",description:"",type:"Number"},{name:"position",description:"",type:"p5.Vector"},{name:"direction",description:"",type:"p5.Vector"},{name:"angle",description:"",type:"Number",optional:!0},{name:"conc",description:"",type:"Number",optional:!0}]},{params:[{name:"color",description:"",type:"Number[]|String|p5.Color"},{name:"x",description:"",type:"Number"},{name:"y",description:"",type:"Number"},{name:"z",description:"",type:"Number"},{name:"direction",description:"",type:"p5.Vector"},{name:"angle",description:"",type:"Number",optional:!0},{name:"conc",description:"",type:"Number",optional:!0}]},{params:[{name:"color",description:"",type:"Number[]|String|p5.Color"},{name:"position",description:"",type:"p5.Vector"},{name:"rx",description:"",type:"Number"},{name:"ry",description:"",type:"Number"},{name:"rz",description:"",type:"Number"},{name:"angle",description:"",type:"Number",optional:!0},{name:"conc",description:"",type:"Number",optional:!0}]},{params:[{name:"v1",description:"",type:"Number"},{name:"v2",description:"",type:"Number"},{name:"v3",description:"",type:"Number"},{name:"x",description:"",type:"Number"},{name:"y",description:"",type:"Number"},{name:"z",description:"",type:"Number"},{name:"direction",description:"",type:"p5.Vector"},{name:"angle",description:"",type:"Number",optional:!0},{name:"conc",description:"",type:"Number",optional:!0}]},{params:[{name:"v1",description:"",type:"Number"},{name:"v2",description:"",type:"Number"},{name:"v3",description:"",type:"Number"},{name:"position",description:"",type:"p5.Vector"},{name:"rx",description:"",type:"Number"},{name:"ry",description:"",type:"Number"},{name:"rz",description:"",type:"Number"},{name:"angle",description:"",type:"Number",optional:!0},{name:"conc",description:"",type:"Number",optional:!0}]},{params:[{name:"color",description:"",type:"Number[]|String|p5.Color"},{name:"x",description:"",type:"Number"},{name:"y",description:"",type:"Number"},{name:"z",description:"",type:"Number"},{name:"rx",description:"",type:"Number"},{name:"ry",description:"",type:"Number"},{name:"rz",description:"",type:"Number"},{name:"angle",description:"",type:"Number",optional:!0},{name:"conc",description:"",type:"Number",optional:!0}]}]},noLights:{name:"noLights",class:"p5",module:"Lights, Camera"},loadModel:{name:"loadModel",class:"p5",module:"Shape",overloads:[{params:[{name:"path",description:"<p>Path of the model to be loaded</p>\n",type:"String"},{name:"normalize",description:"<p>If true, scale the model to a\n                                     standardized size when loading</p>\n",type:"Boolean"},{name:"successCallback",description:"<p>Function to be called\n                                    once the model is loaded. Will be passed\n                                    the 3D model object.</p>\n",type:"function(p5.Geometry)",optional:!0},{name:"failureCallback",description:"<p>called with event error if\n                                        the model fails to load.</p>\n",type:"Function(Event)",optional:!0},{name:"fileType",description:"<p>The file extension of the model\n                                     (<code>.stl</code>, <code>.obj</code>).</p>\n",type:"String",optional:!0}]},{params:[{name:"path",description:"",type:"String"},{name:"successCallback",description:"",type:"function(p5.Geometry)",optional:!0},{name:"failureCallback",description:"",type:"Function(Event)",optional:!0},{name:"fileType",description:"",type:"String",optional:!0}]}]},model:{name:"model",params:[{name:"model",description:"<p>Loaded 3d model to be rendered</p>\n",type:"p5.Geometry"}],class:"p5",module:"Shape"},loadShader:{name:"loadShader",params:[{name:"vertFilename",description:"<p>path to file containing vertex shader\nsource code</p>\n",type:"String"},{name:"fragFilename",description:"<p>path to file containing fragment shader\nsource code</p>\n",type:"String"},{name:"callback",description:"<p>callback to be executed after loadShader\ncompletes. On success, the Shader object is passed as the first argument.</p>\n",type:"Function",optional:!0},{name:"errorCallback",description:"<p>callback to be executed when an error\noccurs inside loadShader. On error, the error is passed as the first\nargument.</p>\n",type:"Function",optional:!0}],class:"p5",module:"Lights, Camera"},createShader:{name:"createShader",params:[{name:"vertSrc",description:"<p>source code for the vertex shader</p>\n",type:"String"},{name:"fragSrc",description:"<p>source code for the fragment shader</p>\n",type:"String"}],class:"p5",module:"Lights, Camera"},shader:{name:"shader",params:[{name:"s",description:'<p>the desired <a href="#/p5.Shader">p5.Shader</a> to use for rendering\nshapes.</p>\n',type:"p5.Shader",optional:!0}],class:"p5",module:"Lights, Camera"},resetShader:{name:"resetShader",class:"p5",module:"Lights, Camera"},normalMaterial:{name:"normalMaterial",class:"p5",module:"Lights, Camera"},texture:{name:"texture",params:[{name:"tex",description:"<p>2-dimensional graphics\n                   to render as texture</p>\n",type:"p5.Image|p5.MediaElement|p5.Graphics"}],class:"p5",module:"Lights, Camera"},textureMode:{name:"textureMode",params:[{name:"mode",description:"<p>either IMAGE or NORMAL</p>\n",type:"Constant"}],class:"p5",module:"Lights, Camera"},textureWrap:{name:"textureWrap",params:[{name:"wrapX",description:"<p>either CLAMP, REPEAT, or MIRROR</p>\n",type:"Constant"},{name:"wrapY",description:"<p>either CLAMP, REPEAT, or MIRROR</p>\n",type:"Constant",optional:!0}],class:"p5",module:"Lights, Camera"},ambientMaterial:{name:"ambientMaterial",class:"p5",module:"Lights, Camera",overloads:[{params:[{name:"v1",description:"<p>gray value, red or hue value\n                        (depending on the current color mode),</p>\n",type:"Number"},{name:"v2",description:"<p>green or saturation value</p>\n",type:"Number",optional:!0},{name:"v3",description:"<p>blue or brightness value</p>\n",type:"Number",optional:!0}],chainable:1},{params:[{name:"color",description:"<p>color, color Array, or CSS color string</p>\n",type:"Number[]|String|p5.Color"}],chainable:1}]},emissiveMaterial:{name:"emissiveMaterial",class:"p5",module:"Lights, Camera",overloads:[{params:[{name:"v1",description:"<p>gray value, red or hue value\n                        (depending on the current color mode),</p>\n",type:"Number"},{name:"v2",description:"<p>green or saturation value</p>\n",type:"Number",optional:!0},{name:"v3",description:"<p>blue or brightness value</p>\n",type:"Number",optional:!0},{name:"a",description:"<p>opacity</p>\n",type:"Number",optional:!0}],chainable:1},{params:[{name:"color",description:"<p>color, color Array, or CSS color string</p>\n",type:"Number[]|String|p5.Color"}],chainable:1}]},specularMaterial:{name:"specularMaterial",class:"p5",module:"Lights, Camera",overloads:[{params:[{name:"gray",description:"<p>number specifying value between white and black.</p>\n",type:"Number"},{name:"alpha",description:"<p>alpha value relative to current color range\n                                (default is 0-255)</p>\n",type:"Number",optional:!0}],chainable:1},{params:[{name:"v1",description:"<p>red or hue value relative to\n                                the current color range</p>\n",type:"Number"},{name:"v2",description:"<p>green or saturation value\n                                relative to the current color range</p>\n",type:"Number"},{name:"v3",description:"<p>blue or brightness value\n                                relative to the current color range</p>\n",type:"Number"},{name:"alpha",description:"",type:"Number",optional:!0}],chainable:1},{params:[{name:"color",description:"<p>color Array, or CSS color string</p>\n",type:"Number[]|String|p5.Color"}],chainable:1}]},shininess:{name:"shininess",params:[{name:"shine",description:"<p>Degree of Shininess.\n                      Defaults to 1.</p>\n",type:"Number"}],class:"p5",module:"Lights, Camera"},camera:{name:"camera",params:[{name:"x",description:"<p>camera position value on x axis</p>\n",type:"Number",optional:!0},{name:"y",description:"<p>camera position value on y axis</p>\n",type:"Number",optional:!0},{name:"z",description:"<p>camera position value on z axis</p>\n",type:"Number",optional:!0},{name:"centerX",description:"<p>x coordinate representing center of the sketch</p>\n",type:"Number",optional:!0},{name:"centerY",description:"<p>y coordinate representing center of the sketch</p>\n",type:"Number",optional:!0},{name:"centerZ",description:"<p>z coordinate representing center of the sketch</p>\n",type:"Number",optional:!0},{name:"upX",description:"<p>x component of direction 'up' from camera</p>\n",type:"Number",optional:!0},{name:"upY",description:"<p>y component of direction 'up' from camera</p>\n",type:"Number",optional:!0},{name:"upZ",description:"<p>z component of direction 'up' from camera</p>\n",type:"Number",optional:!0}],class:"p5",module:"Lights, Camera"},perspective:{name:"perspective",params:[{name:"fovy",description:'<p>camera frustum vertical field of view,\n                          from bottom to top of view, in <a href="#/p5/angleMode">angleMode</a> units</p>\n',type:"Number",optional:!0},{name:"aspect",description:"<p>camera frustum aspect ratio</p>\n",type:"Number",optional:!0},{name:"near",description:"<p>frustum near plane length</p>\n",type:"Number",optional:!0},{name:"far",description:"<p>frustum far plane length</p>\n",type:"Number",optional:!0}],class:"p5",module:"Lights, Camera"},ortho:{name:"ortho",params:[{name:"left",description:"<p>camera frustum left plane</p>\n",type:"Number",optional:!0},{name:"right",description:"<p>camera frustum right plane</p>\n",type:"Number",optional:!0},{name:"bottom",description:"<p>camera frustum bottom plane</p>\n",type:"Number",optional:!0},{name:"top",description:"<p>camera frustum top plane</p>\n",type:"Number",optional:!0},{name:"near",description:"<p>camera frustum near plane</p>\n",type:"Number",optional:!0},{name:"far",description:"<p>camera frustum far plane</p>\n",type:"Number",optional:!0}],class:"p5",module:"Lights, Camera"},frustum:{name:"frustum",params:[{name:"left",description:"<p>camera frustum left plane</p>\n",type:"Number",optional:!0},{name:"right",description:"<p>camera frustum right plane</p>\n",type:"Number",optional:!0},{name:"bottom",description:"<p>camera frustum bottom plane</p>\n",type:"Number",optional:!0},{name:"top",description:"<p>camera frustum top plane</p>\n",type:"Number",optional:!0},{name:"near",description:"<p>camera frustum near plane</p>\n",type:"Number",optional:!0},{name:"far",description:"<p>camera frustum far plane</p>\n",type:"Number",optional:!0}],class:"p5",module:"Lights, Camera"},createCamera:{name:"createCamera",class:"p5",module:"Lights, Camera"},setCamera:{name:"setCamera",params:[{name:"cam",description:"<p>p5.Camera object</p>\n",type:"p5.Camera"}],class:"p5",module:"Lights, Camera"},setAttributes:{name:"setAttributes",class:"p5",module:"Rendering",overloads:[{params:[{name:"key",description:"<p>Name of attribute</p>\n",type:"String"},{name:"value",description:"<p>New value of named attribute</p>\n",type:"Boolean"}]},{params:[{name:"obj",description:"<p>object with key-value pairs</p>\n",type:"Object"}]}]},sampleRate:{name:"sampleRate",class:"p5",module:"p5.sound"},freqToMidi:{name:"freqToMidi",params:[{name:"frequency",description:'<p>A freqeuncy, for example, the "A"\n                           above Middle C is 440Hz</p>\n',type:"Number"}],class:"p5",module:"p5.sound"},midiToFreq:{name:"midiToFreq",params:[{name:"midiNote",description:"<p>The number of a MIDI note</p>\n",type:"Number"}],class:"p5",module:"p5.sound"},soundFormats:{name:"soundFormats",params:[{name:"formats",description:"<p>i.e. 'mp3', 'wav', 'ogg'</p>\n",type:"String",optional:!0,multiple:!0}],class:"p5",module:"p5.sound"},getAudioContext:{name:"getAudioContext",class:"p5",module:"p5.sound"},userStartAudio:{params:[{name:"element(s)",description:"<p>This argument can be an Element,\n                              Selector String, NodeList, p5.Element,\n                              jQuery Element, or an Array of any of those.</p>\n",type:"Element|Array",optional:!0},{name:"callback",description:"<p>Callback to invoke when the AudioContext\n                              has started</p>\n",type:"Function",optional:!0}],name:"userStartAudio",class:"p5",module:"p5.sound"},loadSound:{name:"loadSound",params:[{name:"path",description:"<p>Path to the sound file, or an array with\n                                  paths to soundfiles in multiple formats\n                                  i.e. ['sound.ogg', 'sound.mp3'].\n                                  Alternately, accepts an object: either\n                                  from the HTML5 File API, or a p5.File.</p>\n",type:"String|Array"},{name:"successCallback",description:"<p>Name of a function to call once file loads</p>\n",type:"Function",optional:!0},{name:"errorCallback",description:"<p>Name of a function to call if there is\n                                    an error loading the file.</p>\n",type:"Function",optional:!0},{name:"whileLoading",description:"<p>Name of a function to call while file is loading.\n                               This function will receive the percentage loaded\n                               so far, from 0.0 to 1.0.</p>\n",type:"Function",optional:!0}],class:"p5",module:"p5.sound"},createConvolver:{name:"createConvolver",params:[{name:"path",description:"<p>path to a sound file</p>\n",type:"String"},{name:"callback",description:"<p>function to call if loading is successful.\n                              The object will be passed in as the argument\n                              to the callback function.</p>\n",type:"Function",optional:!0},{name:"errorCallback",description:"<p>function to call if loading is not successful.\n                              A custom error will be passed in as the argument\n                              to the callback function.</p>\n",type:"Function",optional:!0}],class:"p5",module:"p5.sound"},setBPM:{name:"setBPM",params:[{name:"BPM",description:"<p>Beats Per Minute</p>\n",type:"Number"},{name:"rampTime",description:"<p>Seconds from now</p>\n",type:"Number"}],class:"p5",module:"p5.sound"},saveSound:{name:"saveSound",params:[{name:"soundFile",description:"<p>p5.SoundFile that you wish to save</p>\n",type:"p5.SoundFile"},{name:"fileName",description:"<p>name of the resulting .wav file.</p>\n",type:"String"}],class:"p5",module:"p5.sound"}},"p5.Color":{toString:{name:"toString",params:[{name:"format",description:"<p>How the color string will be formatted.\nLeaving this empty formats the string as rgba(r, g, b, a).\n'#rgb' '#rgba' '#rrggbb' and '#rrggbbaa' format as hexadecimal color codes.\n'rgb' 'hsb' and 'hsl' return the color formatted in the specified color mode.\n'rgba' 'hsba' and 'hsla' are the same as above but with alpha channels.\n'rgb%' 'hsb%' 'hsl%' 'rgba%' 'hsba%' and 'hsla%' format as percentages.</p>\n",type:"String",optional:!0}],class:"p5.Color",module:"Color"},setRed:{name:"setRed",params:[{name:"red",description:"<p>the new red value</p>\n",type:"Number"}],class:"p5.Color",module:"Color"},setGreen:{name:"setGreen",params:[{name:"green",description:"<p>the new green value</p>\n",type:"Number"}],class:"p5.Color",module:"Color"},setBlue:{name:"setBlue",params:[{name:"blue",description:"<p>the new blue value</p>\n",type:"Number"}],class:"p5.Color",module:"Color"},setAlpha:{name:"setAlpha",params:[{name:"alpha",description:"<p>the new alpha value</p>\n",type:"Number"}],class:"p5.Color",module:"Color"}},"p5.Element":{elt:{name:"elt",class:"p5.Element",module:"DOM"},parent:{name:"parent",class:"p5.Element",module:"DOM",overloads:[{params:[{name:"parent",description:'<p>the ID, DOM node, or <a href="#/p5.Element">p5.Element</a>\n                         of desired parent element</p>\n',type:"String|p5.Element|Object"}],chainable:1},{params:[]}]},id:{name:"id",class:"p5.Element",module:"DOM",overloads:[{params:[{name:"id",description:"<p>ID of the element</p>\n",type:"String"}],chainable:1},{params:[]}]},class:{name:"class",class:"p5.Element",module:"DOM",overloads:[{params:[{name:"class",description:"<p>class to add</p>\n",type:"String"}],chainable:1},{params:[]}]},mousePressed:{name:"mousePressed",params:[{name:"fxn",description:"<p>function to be fired when mouse is\n                               pressed over the element.\n                               if <code>false</code> is passed instead, the previously\n                               firing function will no longer fire.</p>\n",type:"Function|Boolean"}],class:"p5.Element",module:"DOM"},doubleClicked:{name:"doubleClicked",params:[{name:"fxn",description:"<p>function to be fired when mouse is\n                               double clicked over the element.\n                               if <code>false</code> is passed instead, the previously\n                               firing function will no longer fire.</p>\n",type:"Function|Boolean"}],class:"p5.Element",module:"DOM"},mouseWheel:{name:"mouseWheel",params:[{name:"fxn",description:"<p>function to be fired when mouse is\n                               scrolled over the element.\n                               if <code>false</code> is passed instead, the previously\n                               firing function will no longer fire.</p>\n",type:"Function|Boolean"}],class:"p5.Element",module:"DOM"},mouseReleased:{name:"mouseReleased",params:[{name:"fxn",description:"<p>function to be fired when mouse is\n                               released over the element.\n                               if <code>false</code> is passed instead, the previously\n                               firing function will no longer fire.</p>\n",type:"Function|Boolean"}],class:"p5.Element",module:"DOM"},mouseClicked:{name:"mouseClicked",params:[{name:"fxn",description:"<p>function to be fired when mouse is\n                               clicked over the element.\n                               if <code>false</code> is passed instead, the previously\n                               firing function will no longer fire.</p>\n",type:"Function|Boolean"}],class:"p5.Element",module:"DOM"},mouseMoved:{name:"mouseMoved",params:[{name:"fxn",description:"<p>function to be fired when a mouse moves\n                               over the element.\n                               if <code>false</code> is passed instead, the previously\n                               firing function will no longer fire.</p>\n",type:"Function|Boolean"}],class:"p5.Element",module:"DOM"},mouseOver:{name:"mouseOver",params:[{name:"fxn",description:"<p>function to be fired when a mouse moves\n                               onto the element.\n                               if <code>false</code> is passed instead, the previously\n                               firing function will no longer fire.</p>\n",type:"Function|Boolean"}],class:"p5.Element",module:"DOM"},mouseOut:{name:"mouseOut",params:[{name:"fxn",description:"<p>function to be fired when a mouse\n                               moves off of an element.\n                               if <code>false</code> is passed instead, the previously\n                               firing function will no longer fire.</p>\n",type:"Function|Boolean"}],class:"p5.Element",module:"DOM"},touchStarted:{name:"touchStarted",params:[{name:"fxn",description:"<p>function to be fired when a touch\n                               starts over the element.\n                               if <code>false</code> is passed instead, the previously\n                               firing function will no longer fire.</p>\n",type:"Function|Boolean"}],class:"p5.Element",module:"DOM"},touchMoved:{name:"touchMoved",params:[{name:"fxn",description:"<p>function to be fired when a touch moves over\n                               the element.\n                               if <code>false</code> is passed instead, the previously\n                               firing function will no longer fire.</p>\n",type:"Function|Boolean"}],class:"p5.Element",module:"DOM"},touchEnded:{name:"touchEnded",params:[{name:"fxn",description:"<p>function to be fired when a touch ends\n                               over the element.\n                               if <code>false</code> is passed instead, the previously\n                               firing function will no longer fire.</p>\n",type:"Function|Boolean"}],class:"p5.Element",module:"DOM"},dragOver:{name:"dragOver",params:[{name:"fxn",description:"<p>function to be fired when a file is\n                               dragged over the element.\n                               if <code>false</code> is passed instead, the previously\n                               firing function will no longer fire.</p>\n",type:"Function|Boolean"}],class:"p5.Element",module:"DOM"},dragLeave:{name:"dragLeave",params:[{name:"fxn",description:"<p>function to be fired when a file is\n                               dragged off the element.\n                               if <code>false</code> is passed instead, the previously\n                               firing function will no longer fire.</p>\n",type:"Function|Boolean"}],class:"p5.Element",module:"DOM"},addClass:{name:"addClass",params:[{name:"class",description:"<p>name of class to add</p>\n",type:"String"}],class:"p5.Element",module:"DOM"},removeClass:{name:"removeClass",params:[{name:"class",description:"<p>name of class to remove</p>\n",type:"String"}],class:"p5.Element",module:"DOM"},hasClass:{name:"hasClass",params:[{name:"c",description:"<p>class name of class to check</p>\n",type:"String"}],class:"p5.Element",module:"DOM"},toggleClass:{name:"toggleClass",params:[{name:"c",description:"<p>class name to toggle</p>\n",type:"String"}],class:"p5.Element",module:"DOM"},child:{name:"child",class:"p5.Element",module:"DOM",overloads:[{params:[]},{params:[{name:"child",description:'<p>the ID, DOM node, or <a href="#/p5.Element">p5.Element</a>\n                        to add to the current element</p>\n',type:"String|p5.Element",optional:!0}],chainable:1}]},center:{name:"center",params:[{name:"align",description:"<p>passing 'vertical', 'horizontal' aligns element accordingly</p>\n",type:"String",optional:!0}],class:"p5.Element",module:"DOM"},html:{name:"html",class:"p5.Element",module:"DOM",overloads:[{params:[]},{params:[{name:"html",description:"<p>the HTML to be placed inside the element</p>\n",type:"String",optional:!0},{name:"append",description:"<p>whether to append HTML to existing</p>\n",type:"Boolean",optional:!0}],chainable:1}]},position:{name:"position",class:"p5.Element",module:"DOM",overloads:[{params:[]},{params:[{name:"x",description:"<p>x-position relative to upper left of window (optional)</p>\n",type:"Number",optional:!0},{name:"y",description:"<p>y-position relative to upper left of window (optional)</p>\n",type:"Number",optional:!0},{name:"positionType",description:"<p>it can be static, fixed, relative, sticky, initial or inherit (optional)</p>\n",type:"String"}],chainable:1}]},style:{name:"style",class:"p5.Element",module:"DOM",overloads:[{params:[{name:"property",description:"<p>property to be set</p>\n",type:"String"}]},{params:[{name:"property",description:"",type:"String"},{name:"value",description:"<p>value to assign to property</p>\n",type:"String|p5.Color"}],chainable:1}]},attribute:{name:"attribute",class:"p5.Element",module:"DOM",overloads:[{params:[]},{params:[{name:"attr",description:"<p>attribute to set</p>\n",type:"String"},{name:"value",description:"<p>value to assign to attribute</p>\n",type:"String"}],chainable:1}]},removeAttribute:{name:"removeAttribute",params:[{name:"attr",description:"<p>attribute to remove</p>\n",type:"String"}],class:"p5.Element",module:"DOM"},value:{name:"value",class:"p5.Element",module:"DOM",overloads:[{params:[]},{params:[{name:"value",description:"",type:"String|Number"}],chainable:1}]},show:{name:"show",class:"p5.Element",module:"DOM"},hide:{name:"hide",class:"p5.Element",module:"DOM"},size:{name:"size",class:"p5.Element",module:"DOM",overloads:[{params:[]},{params:[{name:"w",description:"<p>width of the element, either AUTO, or a number</p>\n",type:"Number|Constant"},{name:"h",description:"<p>height of the element, either AUTO, or a number</p>\n",type:"Number|Constant",optional:!0}],chainable:1}]},remove:{name:"remove",class:"p5.Element",module:"DOM"},drop:{name:"drop",params:[{name:"callback",description:"<p>callback to receive loaded file, called for each file dropped.</p>\n",type:"Function"},{name:"fxn",description:"<p>callback triggered once when files are dropped with the drop event.</p>\n",type:"Function",optional:!0}],class:"p5.Element",module:"DOM"}},"p5.Graphics":{reset:{name:"reset",class:"p5.Graphics",module:"Rendering"},remove:{name:"remove",class:"p5.Graphics",module:"Rendering"}},JSON:{stringify:{name:"stringify",params:[{name:"object",description:"<p>:Javascript object that you would like to convert to JSON</p>\n",type:"Object"}],class:"JSON",module:"Foundation"}},console:{log:{name:"log",params:[{name:"message",description:"<p>:Message that you would like to print to the console</p>\n",type:"String|Expression|Object"}],class:"console",module:"Foundation"}},"p5.TypedDict":{size:{name:"size",class:"p5.TypedDict",module:"Data"},hasKey:{name:"hasKey",params:[{name:"key",description:"<p>that you want to look up</p>\n",type:"Number|String"}],class:"p5.TypedDict",module:"Data"},get:{name:"get",params:[{name:"the",description:"<p>key you want to access</p>\n",type:"Number|String"}],class:"p5.TypedDict",module:"Data"},set:{name:"set",params:[{name:"key",description:"",type:"Number|String"},{name:"value",description:"",type:"Number|String"}],class:"p5.TypedDict",module:"Data"},create:{name:"create",class:"p5.TypedDict",module:"Data",overloads:[{params:[{name:"key",description:"",type:"Number|String"},{name:"value",description:"",type:"Number|String"}]},{params:[{name:"obj",description:"<p>key/value pair</p>\n",type:"Object"}]}]},clear:{name:"clear",class:"p5.TypedDict",module:"Data"},remove:{name:"remove",params:[{name:"key",description:"<p>for the pair to remove</p>\n",type:"Number|String"}],class:"p5.TypedDict",module:"Data"},print:{name:"print",class:"p5.TypedDict",module:"Data"},saveTable:{name:"saveTable",class:"p5.TypedDict",module:"Data"},saveJSON:{name:"saveJSON",class:"p5.TypedDict",module:"Data"}},"p5.NumberDict":{add:{name:"add",params:[{name:"Key",description:"<p>for the value you wish to add to</p>\n",type:"Number"},{name:"Number",description:"<p>to add to the value</p>\n",type:"Number"}],class:"p5.NumberDict",module:"Data"},sub:{name:"sub",params:[{name:"Key",description:"<p>for the value you wish to subtract from</p>\n",type:"Number"},{name:"Number",description:"<p>to subtract from the value</p>\n",type:"Number"}],class:"p5.NumberDict",module:"Data"},mult:{name:"mult",params:[{name:"Key",description:"<p>for value you wish to multiply</p>\n",type:"Number"},{name:"Amount",description:"<p>to multiply the value by</p>\n",type:"Number"}],class:"p5.NumberDict",module:"Data"},div:{name:"div",params:[{name:"Key",description:"<p>for value you wish to divide</p>\n",type:"Number"},{name:"Amount",description:"<p>to divide the value by</p>\n",type:"Number"}],class:"p5.NumberDict",module:"Data"},minValue:{name:"minValue",class:"p5.NumberDict",module:"Data"},maxValue:{name:"maxValue",class:"p5.NumberDict",module:"Data"},minKey:{name:"minKey",class:"p5.NumberDict",module:"Data"},maxKey:{name:"maxKey",class:"p5.NumberDict",module:"Data"}},"p5.MediaElement":{src:{name:"src",class:"p5.MediaElement",module:"DOM"},play:{name:"play",class:"p5.MediaElement",module:"DOM"},stop:{name:"stop",class:"p5.MediaElement",module:"DOM"},pause:{name:"pause",class:"p5.MediaElement",module:"DOM"},loop:{name:"loop",class:"p5.MediaElement",module:"DOM"},noLoop:{name:"noLoop",class:"p5.MediaElement",module:"DOM"},autoplay:{name:"autoplay",params:[{name:"shouldAutoplay",description:"<p>whether the element should autoplay</p>\n",type:"Boolean"}],class:"p5.MediaElement",module:"DOM"},volume:{name:"volume",class:"p5.MediaElement",module:"DOM",overloads:[{params:[]},{params:[{name:"val",description:"<p>volume between 0.0 and 1.0</p>\n",type:"Number"}],chainable:1}]},speed:{name:"speed",class:"p5.MediaElement",module:"DOM",overloads:[{params:[]},{params:[{name:"speed",description:"<p>speed multiplier for element playback</p>\n",type:"Number"}],chainable:1}]},time:{name:"time",class:"p5.MediaElement",module:"DOM",overloads:[{params:[]},{params:[{name:"time",description:"<p>time to jump to (in seconds)</p>\n",type:"Number"}],chainable:1}]},duration:{name:"duration",class:"p5.MediaElement",module:"DOM"},onended:{name:"onended",params:[{name:"callback",description:"<p>function to call when the\n                            soundfile has ended. The\n                            media element will be passed\n                            in as the argument to the\n                            callback.</p>\n",type:"Function"}],class:"p5.MediaElement",module:"DOM"},connect:{name:"connect",params:[{name:"audioNode",description:"<p>AudioNode from the Web Audio API,\nor an object from the p5.sound library</p>\n",type:"AudioNode|Object"}],class:"p5.MediaElement",module:"DOM"},disconnect:{name:"disconnect",class:"p5.MediaElement",module:"DOM"},showControls:{name:"showControls",class:"p5.MediaElement",module:"DOM"},hideControls:{name:"hideControls",class:"p5.MediaElement",module:"DOM"},addCue:{name:"addCue",params:[{name:"time",description:"<p>Time in seconds, relative to this media\n                            element's playback. For example, to trigger\n                            an event every time playback reaches two\n                            seconds, pass in the number 2. This will be\n                            passed as the first parameter to\n                            the callback function.</p>\n",type:"Number"},{name:"callback",description:"<p>Name of a function that will be\n                            called at the given time. The callback will\n                            receive time and (optionally) param as its\n                            two parameters.</p>\n",type:"Function"},{name:"value",description:"<p>An object to be passed as the\n                            second parameter to the\n                            callback function.</p>\n",type:"Object",optional:!0}],class:"p5.MediaElement",module:"DOM"},removeCue:{name:"removeCue",params:[{name:"id",description:"<p>ID of the cue, as returned by addCue</p>\n",type:"Number"}],class:"p5.MediaElement",module:"DOM"},clearCues:{name:"clearCues",params:[{name:"id",description:"<p>ID of the cue, as returned by addCue</p>\n",type:"Number"}],class:"p5.MediaElement",module:"DOM"}},"p5.File":{file:{name:"file",class:"p5.File",module:"DOM"},type:{name:"type",class:"p5.File",module:"DOM"},subtype:{name:"subtype",class:"p5.File",module:"DOM"},name:{name:"name",class:"p5.File",module:"DOM"},size:{name:"size",class:"p5.File",module:"DOM"},data:{name:"data",class:"p5.File",module:"DOM"}},"p5.Image":{width:{name:"width",class:"p5.Image",module:"Image"},height:{name:"height",class:"p5.Image",module:"Image"},pixels:{name:"pixels",class:"p5.Image",module:"Image"},loadPixels:{name:"loadPixels",class:"p5.Image",module:"Image"},updatePixels:{name:"updatePixels",class:"p5.Image",module:"Image",overloads:[{params:[{name:"x",description:"<p>x-offset of the target update area for the\n                             underlying canvas</p>\n",type:"Integer"},{name:"y",description:"<p>y-offset of the target update area for the\n                             underlying canvas</p>\n",type:"Integer"},{name:"w",description:"<p>height of the target update area for the\n                             underlying canvas</p>\n",type:"Integer"},{name:"h",description:"<p>height of the target update area for the\n                             underlying canvas</p>\n",type:"Integer"}]},{params:[]}]},get:{name:"get",class:"p5.Image",module:"Image",overloads:[{params:[{name:"x",description:"<p>x-coordinate of the pixel</p>\n",type:"Number"},{name:"y",description:"<p>y-coordinate of the pixel</p>\n",type:"Number"},{name:"w",description:"<p>width</p>\n",type:"Number"},{name:"h",description:"<p>height</p>\n",type:"Number"}]},{params:[]},{params:[{name:"x",description:"",type:"Number"},{name:"y",description:"",type:"Number"}]}]},set:{name:"set",params:[{name:"x",description:"<p>x-coordinate of the pixel</p>\n",type:"Number"},{name:"y",description:"<p>y-coordinate of the pixel</p>\n",type:"Number"},{name:"a",description:'<p>grayscale value | pixel array |\n                               a <a href="#/p5.Color">p5.Color</a> | image to copy</p>\n',type:"Number|Number[]|Object"}],class:"p5.Image",module:"Image"},resize:{name:"resize",params:[{name:"width",description:"<p>the resized image width</p>\n",type:"Number"},{name:"height",description:"<p>the resized image height</p>\n",type:"Number"}],class:"p5.Image",module:"Image"},copy:{name:"copy",class:"p5.Image",module:"Image",overloads:[{params:[{name:"srcImage",description:"<p>source image</p>\n",type:"p5.Image|p5.Element"},{name:"sx",description:"<p>X coordinate of the source's upper left corner</p>\n",type:"Integer"},{name:"sy",description:"<p>Y coordinate of the source's upper left corner</p>\n",type:"Integer"},{name:"sw",description:"<p>source image width</p>\n",type:"Integer"},{name:"sh",description:"<p>source image height</p>\n",type:"Integer"},{name:"dx",description:"<p>X coordinate of the destination's upper left corner</p>\n",type:"Integer"},{name:"dy",description:"<p>Y coordinate of the destination's upper left corner</p>\n",type:"Integer"},{name:"dw",description:"<p>destination image width</p>\n",type:"Integer"},{name:"dh",description:"<p>destination image height</p>\n",type:"Integer"}]},{params:[{name:"sx",description:"",type:"Integer"},{name:"sy",description:"",type:"Integer"},{name:"sw",description:"",type:"Integer"},{name:"sh",description:"",type:"Integer"},{name:"dx",description:"",type:"Integer"},{name:"dy",description:"",type:"Integer"},{name:"dw",description:"",type:"Integer"},{name:"dh",description:"",type:"Integer"}]}]},mask:{name:"mask",params:[{name:"srcImage",description:"<p>source image</p>\n",type:"p5.Image"}],class:"p5.Image",module:"Image"},filter:{name:"filter",params:[{name:"filterType",description:"<p>either THRESHOLD, GRAY, OPAQUE, INVERT,\n                               POSTERIZE, BLUR, ERODE, DILATE or BLUR.\n                               See Filters.js for docs on\n                               each available filter</p>\n",type:"Constant"},{name:"filterParam",description:"<p>an optional parameter unique\n                               to each filter, see above</p>\n",type:"Number",optional:!0}],class:"p5.Image",module:"Image"},blend:{name:"blend",class:"p5.Image",module:"Image",overloads:[{params:[{name:"srcImage",description:"<p>source image</p>\n",type:"p5.Image"},{name:"sx",description:"<p>X coordinate of the source's upper left corner</p>\n",type:"Integer"},{name:"sy",description:"<p>Y coordinate of the source's upper left corner</p>\n",type:"Integer"},{name:"sw",description:"<p>source image width</p>\n",type:"Integer"},{name:"sh",description:"<p>source image height</p>\n",type:"Integer"},{name:"dx",description:"<p>X coordinate of the destination's upper left corner</p>\n",type:"Integer"},{name:"dy",description:"<p>Y coordinate of the destination's upper left corner</p>\n",type:"Integer"},{name:"dw",description:"<p>destination image width</p>\n",type:"Integer"},{name:"dh",description:"<p>destination image height</p>\n",type:"Integer"},{name:"blendMode",description:'<p>the blend mode. either\n    BLEND, DARKEST, LIGHTEST, DIFFERENCE,\n    MULTIPLY, EXCLUSION, SCREEN, REPLACE, OVERLAY, HARD_LIGHT,\n    SOFT_LIGHT, DODGE, BURN, ADD or NORMAL.</p>\n<p>Available blend modes are: normal | multiply | screen | overlay |\n           darken | lighten | color-dodge | color-burn | hard-light |\n           soft-light | difference | exclusion | hue | saturation |\n           color | luminosity</p>\n<p><a href="http://blogs.adobe.com/webplatform/2013/01/28/blending-features-in-canvas/">http://blogs.adobe.com/webplatform/2013/01/28/blending-features-in-canvas/</a></p>\n',type:"Constant"}]},{params:[{name:"sx",description:"",type:"Integer"},{name:"sy",description:"",type:"Integer"},{name:"sw",description:"",type:"Integer"},{name:"sh",description:"",type:"Integer"},{name:"dx",description:"",type:"Integer"},{name:"dy",description:"",type:"Integer"},{name:"dw",description:"",type:"Integer"},{name:"dh",description:"",type:"Integer"},{name:"blendMode",description:"",type:"Constant"}]}]},save:{name:"save",params:[{name:"filename",description:"<p>give your file a name</p>\n",type:"String"},{name:"extension",description:"<p>'png' or 'jpg'</p>\n",type:"String"}],class:"p5.Image",module:"Image"},reset:{name:"reset",class:"p5.Image",module:"Image"},getCurrentFrame:{name:"getCurrentFrame",class:"p5.Image",module:"Image"},setFrame:{name:"setFrame",params:[{name:"index",description:"<p>the index for the frame that should be displayed</p>\n",type:"Number"}],class:"p5.Image",module:"Image"},numFrames:{name:"numFrames",class:"p5.Image",module:"Image"},play:{name:"play",class:"p5.Image",module:"Image"},pause:{name:"pause",class:"p5.Image",module:"Image"},delay:{name:"delay",params:[{name:"d",description:"<p>the amount in milliseconds to delay between switching frames</p>\n",type:"Number"},{name:"index",description:"<p>the index of the frame that should have the new delay value {optional}</p>\n",type:"Number",optional:!0}],class:"p5.Image",module:"Image"}},"p5.PrintWriter":{write:{name:"write",params:[{name:"data",description:"<p>all data to be written by the PrintWriter</p>\n",type:"Array"}],class:"p5.PrintWriter",module:"IO"},print:{name:"print",params:[{name:"data",description:"<p>all data to be printed by the PrintWriter</p>\n",type:"Array"}],class:"p5.PrintWriter",module:"IO"},clear:{name:"clear",class:"p5.PrintWriter",module:"IO"},close:{name:"close",class:"p5.PrintWriter",module:"IO"}},"p5.Table":{columns:{name:"columns",class:"p5.Table",module:"IO"},rows:{name:"rows",class:"p5.Table",module:"IO"},addRow:{name:"addRow",params:[{name:"row",description:"<p>row to be added to the table</p>\n",type:"p5.TableRow",optional:!0}],class:"p5.Table",module:"IO"},removeRow:{name:"removeRow",params:[{name:"id",description:"<p>ID number of the row to remove</p>\n",type:"Integer"}],class:"p5.Table",module:"IO"},getRow:{name:"getRow",params:[{name:"rowID",description:"<p>ID number of the row to get</p>\n",type:"Integer"}],class:"p5.Table",module:"IO"},getRows:{name:"getRows",class:"p5.Table",module:"IO"},findRow:{name:"findRow",params:[{name:"value",description:"<p>The value to match</p>\n",type:"String"},{name:"column",description:"<p>ID number or title of the\n                               column to search</p>\n",type:"Integer|String"}],class:"p5.Table",module:"IO"},findRows:{name:"findRows",params:[{name:"value",description:"<p>The value to match</p>\n",type:"String"},{name:"column",description:"<p>ID number or title of the\n                               column to search</p>\n",type:"Integer|String"}],class:"p5.Table",module:"IO"},matchRow:{name:"matchRow",params:[{name:"regexp",description:"<p>The regular expression to match</p>\n",type:"String|RegExp"},{name:"column",description:"<p>The column ID (number) or\n                                 title (string)</p>\n",type:"String|Integer"}],class:"p5.Table",module:"IO"},matchRows:{name:"matchRows",params:[{name:"regexp",description:"<p>The regular expression to match</p>\n",type:"String"},{name:"column",description:"<p>The column ID (number) or\n                                 title (string)</p>\n",type:"String|Integer",optional:!0}],class:"p5.Table",module:"IO"},getColumn:{name:"getColumn",params:[{name:"column",description:"<p>String or Number of the column to return</p>\n",type:"String|Number"}],class:"p5.Table",module:"IO"},clearRows:{name:"clearRows",class:"p5.Table",module:"IO"},addColumn:{name:"addColumn",params:[{name:"title",description:"<p>title of the given column</p>\n",type:"String",optional:!0}],class:"p5.Table",module:"IO"},getColumnCount:{name:"getColumnCount",class:"p5.Table",module:"IO"},getRowCount:{name:"getRowCount",class:"p5.Table",module:"IO"},removeTokens:{name:"removeTokens",params:[{name:"chars",description:"<p>String listing characters to be removed</p>\n",type:"String"},{name:"column",description:"<p>Column ID (number)\n                                 or name (string)</p>\n",type:"String|Integer",optional:!0}],class:"p5.Table",module:"IO"},trim:{name:"trim",params:[{name:"column",description:"<p>Column ID (number)\n                                 or name (string)</p>\n",type:"String|Integer",optional:!0}],class:"p5.Table",module:"IO"},removeColumn:{name:"removeColumn",params:[{name:"column",description:"<p>columnName (string) or ID (number)</p>\n",type:"String|Integer"}],class:"p5.Table",module:"IO"},set:{name:"set",params:[{name:"row",description:"<p>row ID</p>\n",type:"Integer"},{name:"column",description:"<p>column ID (Number)\n                              or title (String)</p>\n",type:"String|Integer"},{name:"value",description:"<p>value to assign</p>\n",type:"String|Number"}],class:"p5.Table",module:"IO"},setNum:{name:"setNum",params:[{name:"row",description:"<p>row ID</p>\n",type:"Integer"},{name:"column",description:"<p>column ID (Number)\n                              or title (String)</p>\n",type:"String|Integer"},{name:"value",description:"<p>value to assign</p>\n",type:"Number"}],class:"p5.Table",module:"IO"},setString:{name:"setString",params:[{name:"row",description:"<p>row ID</p>\n",type:"Integer"},{name:"column",description:"<p>column ID (Number)\n                              or title (String)</p>\n",type:"String|Integer"},{name:"value",description:"<p>value to assign</p>\n",type:"String"}],class:"p5.Table",module:"IO"},get:{name:"get",params:[{name:"row",description:"<p>row ID</p>\n",type:"Integer"},{name:"column",description:"<p>columnName (string) or\n                                  ID (number)</p>\n",type:"String|Integer"}],class:"p5.Table",module:"IO"},getNum:{name:"getNum",params:[{name:"row",description:"<p>row ID</p>\n",type:"Integer"},{name:"column",description:"<p>columnName (string) or\n                                  ID (number)</p>\n",type:"String|Integer"}],class:"p5.Table",module:"IO"},getString:{name:"getString",params:[{name:"row",description:"<p>row ID</p>\n",type:"Integer"},{name:"column",description:"<p>columnName (string) or\n                                  ID (number)</p>\n",type:"String|Integer"}],class:"p5.Table",module:"IO"},getObject:{name:"getObject",params:[{name:"headerColumn",description:"<p>Name of the column which should be used to\n                             title each row object (optional)</p>\n",type:"String",optional:!0}],class:"p5.Table",module:"IO"},getArray:{name:"getArray",class:"p5.Table",module:"IO"}},"p5.TableRow":{set:{name:"set",params:[{name:"column",description:"<p>Column ID (Number)\n                              or Title (String)</p>\n",type:"String|Integer"},{name:"value",description:"<p>The value to be stored</p>\n",type:"String|Number"}],class:"p5.TableRow",module:"IO"},setNum:{name:"setNum",params:[{name:"column",description:"<p>Column ID (Number)\n                              or Title (String)</p>\n",type:"String|Integer"},{name:"value",description:"<p>The value to be stored\n                              as a Float</p>\n",type:"Number|String"}],class:"p5.TableRow",module:"IO"},setString:{name:"setString",params:[{name:"column",description:"<p>Column ID (Number)\n                              or Title (String)</p>\n",type:"String|Integer"},{name:"value",description:"<p>The value to be stored\n                              as a String</p>\n",type:"String|Number|Boolean|Object"}],class:"p5.TableRow",module:"IO"},get:{name:"get",params:[{name:"column",description:"<p>columnName (string) or\n                                 ID (number)</p>\n",type:"String|Integer"}],class:"p5.TableRow",module:"IO"},getNum:{name:"getNum",params:[{name:"column",description:"<p>columnName (string) or\n                                 ID (number)</p>\n",type:"String|Integer"}],class:"p5.TableRow",module:"IO"},getString:{name:"getString",params:[{name:"column",description:"<p>columnName (string) or\n                                 ID (number)</p>\n",type:"String|Integer"}],class:"p5.TableRow",module:"IO"}},"p5.XML":{getParent:{name:"getParent",class:"p5.XML",module:"IO"},getName:{name:"getName",class:"p5.XML",module:"IO"},setName:{name:"setName",params:[{name:"the",description:"<p>new name of the node</p>\n",type:"String"}],class:"p5.XML",module:"IO"},hasChildren:{name:"hasChildren",class:"p5.XML",module:"IO"},listChildren:{name:"listChildren",class:"p5.XML",module:"IO"},getChildren:{name:"getChildren",params:[{name:"name",description:"<p>element name</p>\n",type:"String",optional:!0}],class:"p5.XML",module:"IO"},getChild:{name:"getChild",params:[{name:"name",description:"<p>element name or index</p>\n",type:"String|Integer"}],class:"p5.XML",module:"IO"},addChild:{name:"addChild",params:[{name:"node",description:'<p>a <a href="#/p5.XML">p5.XML</a> Object which will be the child to be added</p>\n',type:"p5.XML"}],class:"p5.XML",module:"IO"},removeChild:{name:"removeChild",params:[{name:"name",description:"<p>element name or index</p>\n",type:"String|Integer"}],class:"p5.XML",module:"IO"},getAttributeCount:{name:"getAttributeCount",class:"p5.XML",module:"IO"},listAttributes:{name:"listAttributes",class:"p5.XML",module:"IO"},hasAttribute:{name:"hasAttribute",params:[{name:"the",description:"<p>attribute to be checked</p>\n",type:"String"}],class:"p5.XML",module:"IO"},getNum:{name:"getNum",params:[{name:"name",description:"<p>the non-null full name of the attribute</p>\n",type:"String"},{name:"defaultValue",description:"<p>the default value of the attribute</p>\n",type:"Number",optional:!0}],class:"p5.XML",module:"IO"},getString:{name:"getString",params:[{name:"name",description:"<p>the non-null full name of the attribute</p>\n",type:"String"},{name:"defaultValue",description:"<p>the default value of the attribute</p>\n",type:"Number",optional:!0}],class:"p5.XML",module:"IO"},setAttribute:{name:"setAttribute",params:[{name:"name",description:"<p>the full name of the attribute</p>\n",type:"String"},{name:"value",description:"<p>the value of the attribute</p>\n",type:"Number|String|Boolean"}],class:"p5.XML",module:"IO"},getContent:{name:"getContent",params:[{name:"defaultValue",description:"<p>value returned if no content is found</p>\n",type:"String",optional:!0}],class:"p5.XML",module:"IO"},setContent:{name:"setContent",params:[{name:"text",description:"<p>the new content</p>\n",type:"String"}],class:"p5.XML",module:"IO"},serialize:{name:"serialize",class:"p5.XML",module:"IO"}},"p5.Vector":{x:{name:"x",class:"p5.Vector",module:"Math"},y:{name:"y",class:"p5.Vector",module:"Math"},z:{name:"z",class:"p5.Vector",module:"Math"},toString:{name:"toString",class:"p5.Vector",module:"Math"},set:{name:"set",class:"p5.Vector",module:"Math",overloads:[{params:[{name:"x",description:"<p>the x component of the vector</p>\n",type:"Number",optional:!0},{name:"y",description:"<p>the y component of the vector</p>\n",type:"Number",optional:!0},{name:"z",description:"<p>the z component of the vector</p>\n",type:"Number",optional:!0}],chainable:1},{params:[{name:"value",description:"<p>the vector to set</p>\n",type:"p5.Vector|Number[]"}],chainable:1}]},copy:{name:"copy",class:"p5.Vector",module:"Math"},add:{name:"add",class:"p5.Vector",module:"Math",overloads:[{params:[{name:"x",description:"<p>the x component of the vector to be added</p>\n",type:"Number"},{name:"y",description:"<p>the y component of the vector to be added</p>\n",type:"Number",optional:!0},{name:"z",description:"<p>the z component of the vector to be added</p>\n",type:"Number",optional:!0}],chainable:1},{params:[{name:"value",description:"<p>the vector to add</p>\n",type:"p5.Vector|Number[]"}],chainable:1},{params:[{name:"v1",description:'<p>a <a href="#/p5.Vector">p5.Vector</a> to add</p>\n',type:"p5.Vector"},{name:"v2",description:'<p>a <a href="#/p5.Vector">p5.Vector</a> to add</p>\n',type:"p5.Vector"},{name:"target",description:"<p>the vector to receive the result (Optional)</p>\n",type:"p5.Vector",optional:!0}],static:1}]},rem:{name:"rem",class:"p5.Vector",module:"Math",overloads:[{params:[{name:"x",description:"<p>the x component of divisor vector</p>\n",type:"Number"},{name:"y",description:"<p>the y component of divisor vector</p>\n",type:"Number"},{name:"z",description:"<p>the z component of divisor vector</p>\n",type:"Number"}],chainable:1},{params:[{name:"value",description:"<p>divisor vector</p>\n",type:"p5.Vector | Number[]"}],chainable:1},{params:[{name:"v1",description:'<p>dividend <a href="#/p5.Vector">p5.Vector</a></p>\n',type:"p5.Vector"},{name:"v2",description:'<p>divisor <a href="#/p5.Vector">p5.Vector</a></p>\n',type:"p5.Vector"}],static:1},{params:[{name:"v1",description:"",type:"p5.Vector"},{name:"v2",description:"",type:"p5.Vector"}],static:1}]},sub:{name:"sub",class:"p5.Vector",module:"Math",overloads:[{params:[{name:"x",description:"<p>the x component of the vector to subtract</p>\n",type:"Number"},{name:"y",description:"<p>the y component of the vector to subtract</p>\n",type:"Number",optional:!0},{name:"z",description:"<p>the z component of the vector to subtract</p>\n",type:"Number",optional:!0}],chainable:1},{params:[{name:"value",description:"<p>the vector to subtract</p>\n",type:"p5.Vector|Number[]"}],chainable:1},{params:[{name:"v1",description:'<p>a <a href="#/p5.Vector">p5.Vector</a> to subtract from</p>\n',type:"p5.Vector"},{name:"v2",description:'<p>a <a href="#/p5.Vector">p5.Vector</a> to subtract</p>\n',type:"p5.Vector"},{name:"target",description:"<p>the vector to receive the result (Optional)</p>\n",type:"p5.Vector",optional:!0}],static:1}]},mult:{name:"mult",class:"p5.Vector",module:"Math",overloads:[{params:[{name:"n",description:"<p>The number to multiply with the vector</p>\n",type:"Number"}],chainable:1},{params:[{name:"x",description:"<p>The number to multiply with the x component of the vector</p>\n",type:"Number"},{name:"y",description:"<p>The number to multiply with the y component of the vector</p>\n",type:"Number"},{name:"z",description:"<p>The number to multiply with the z component of the vector</p>\n",type:"Number",optional:!0}],chainable:1},{params:[{name:"arr",description:"<p>The array to multiply with the components of the vector</p>\n",type:"Number[]"}],chainable:1},{params:[{name:"v",description:"<p>The vector to multiply with the components of the original vector</p>\n",type:"p5.Vector"}],chainable:1},{params:[{name:"x",description:"",type:"Number"},{name:"y",description:"",type:"Number"},{name:"z",description:"",type:"Number",optional:!0}],static:1},{params:[{name:"v",description:"",type:"p5.Vector"},{name:"n",description:"",type:"Number"},{name:"target",description:"<p>the vector to receive the result (Optional)</p>\n",type:"p5.Vector",optional:!0}],static:1},{params:[{name:"v0",description:"",type:"p5.Vector"},{name:"v1",description:"",type:"p5.Vector"},{name:"target",description:"",type:"p5.Vector",optional:!0}],static:1},{params:[{name:"v0",description:"",type:"p5.Vector"},{name:"arr",description:"",type:"Number[]"},{name:"target",description:"",type:"p5.Vector",optional:!0}],static:1}]},div:{name:"div",class:"p5.Vector",module:"Math",overloads:[{params:[{name:"n",description:"<p>The number to divide the vector by</p>\n",type:"Number"}],chainable:1},{params:[{name:"x",description:"<p>The number to divide with the x component of the vector</p>\n",type:"Number"},{name:"y",description:"<p>The number to divide with the y component of the vector</p>\n",type:"Number"},{name:"z",description:"<p>The number to divide with the z component of the vector</p>\n",type:"Number",optional:!0}],chainable:1},{params:[{name:"arr",description:"<p>The array to divide the components of the vector by</p>\n",type:"Number[]"}],chainable:1},{params:[{name:"v",description:"<p>The vector to divide the components of the original vector by</p>\n",type:"p5.Vector"}],chainable:1},{params:[{name:"x",description:"",type:"Number"},{name:"y",description:"",type:"Number"},{name:"z",description:"",type:"Number",optional:!0}],static:1},{params:[{name:"v",description:"",type:"p5.Vector"},{name:"n",description:"",type:"Number"},{name:"target",description:"<p>the vector to receive the result (Optional)</p>\n",type:"p5.Vector",optional:!0}],static:1},{params:[{name:"v0",description:"",type:"p5.Vector"},{name:"v1",description:"",type:"p5.Vector"},{name:"target",description:"",type:"p5.Vector",optional:!0}],static:1},{params:[{name:"v0",description:"",type:"p5.Vector"},{name:"arr",description:"",type:"Number[]"},{name:"target",description:"",type:"p5.Vector",optional:!0}],static:1}]},mag:{name:"mag",class:"p5.Vector",module:"Math",overloads:[{params:[]},{params:[{name:"vecT",description:"<p>the vector to return the magnitude of</p>\n",type:"p5.Vector"}],static:1}]},magSq:{name:"magSq",class:"p5.Vector",module:"Math"},dot:{name:"dot",class:"p5.Vector",module:"Math",overloads:[{params:[{name:"x",description:"<p>x component of the vector</p>\n",type:"Number"},{name:"y",description:"<p>y component of the vector</p>\n",type:"Number",optional:!0},{name:"z",description:"<p>z component of the vector</p>\n",type:"Number",optional:!0}]},{params:[{name:"value",description:'<p>value component of the vector or a <a href="#/p5.Vector">p5.Vector</a></p>\n',type:"p5.Vector"}]},{params:[{name:"v1",description:'<p>the first <a href="#/p5.Vector">p5.Vector</a></p>\n',type:"p5.Vector"},{name:"v2",description:'<p>the second <a href="#/p5.Vector">p5.Vector</a></p>\n',type:"p5.Vector"}],static:1}]},cross:{name:"cross",class:"p5.Vector",module:"Math",overloads:[{params:[{name:"v",description:'<p><a href="#/p5.Vector">p5.Vector</a> to be crossed</p>\n',type:"p5.Vector"}]},{params:[{name:"v1",description:'<p>the first <a href="#/p5.Vector">p5.Vector</a></p>\n',type:"p5.Vector"},{name:"v2",description:'<p>the second <a href="#/p5.Vector">p5.Vector</a></p>\n',type:"p5.Vector"}],static:1}]},dist:{name:"dist",class:"p5.Vector",module:"Math",overloads:[{params:[{name:"v",description:'<p>the x, y, and z coordinates of a <a href="#/p5.Vector">p5.Vector</a></p>\n',type:"p5.Vector"}]},{params:[{name:"v1",description:'<p>the first <a href="#/p5.Vector">p5.Vector</a></p>\n',type:"p5.Vector"},{name:"v2",description:'<p>the second <a href="#/p5.Vector">p5.Vector</a></p>\n',type:"p5.Vector"}],static:1}]},normalize:{name:"normalize",class:"p5.Vector",module:"Math"},limit:{name:"limit",params:[{name:"max",description:"<p>the maximum magnitude for the vector</p>\n",type:"Number"}],class:"p5.Vector",module:"Math"},setMag:{name:"setMag",params:[{name:"len",description:"<p>the new length for this vector</p>\n",type:"Number"}],class:"p5.Vector",module:"Math"},heading:{name:"heading",class:"p5.Vector",module:"Math"},rotate:{name:"rotate",params:[{name:"angle",description:"<p>the angle of rotation</p>\n",type:"Number"}],class:"p5.Vector",module:"Math"},angleBetween:{name:"angleBetween",params:[{name:"value",description:'<p>the x, y, and z components of a <a href="#/p5.Vector">p5.Vector</a></p>\n',type:"p5.Vector"}],class:"p5.Vector",module:"Math"},lerp:{name:"lerp",class:"p5.Vector",module:"Math",overloads:[{params:[{name:"x",description:"<p>the x component</p>\n",type:"Number"},{name:"y",description:"<p>the y component</p>\n",type:"Number"},{name:"z",description:"<p>the z component</p>\n",type:"Number"},{name:"amt",description:"<p>the amount of interpolation; some value between 0.0\n                        (old vector) and 1.0 (new vector). 0.9 is very near\n                        the new vector. 0.5 is halfway in between.</p>\n",type:"Number"}],chainable:1},{params:[{name:"v",description:'<p>the <a href="#/p5.Vector">p5.Vector</a> to lerp to</p>\n',type:"p5.Vector"},{name:"amt",description:"",type:"Number"}],chainable:1},{params:[{name:"v1",description:"",type:"p5.Vector"},{name:"v2",description:"",type:"p5.Vector"},{name:"amt",description:"",type:"Number"},{name:"target",description:"<p>the vector to receive the result (Optional)</p>\n",type:"p5.Vector",optional:!0}],static:1}]},reflect:{name:"reflect",params:[{name:"surfaceNormal",description:'<p>the <a href="#/p5.Vector">p5.Vector</a> to reflect about, will be normalized by this method</p>\n',type:"p5.Vector"}],class:"p5.Vector",module:"Math"},array:{name:"array",class:"p5.Vector",module:"Math"},equals:{name:"equals",class:"p5.Vector",module:"Math",overloads:[{params:[{name:"x",description:"<p>the x component of the vector</p>\n",type:"Number",optional:!0},{name:"y",description:"<p>the y component of the vector</p>\n",type:"Number",optional:!0},{name:"z",description:"<p>the z component of the vector</p>\n",type:"Number",optional:!0}]},{params:[{name:"value",description:"<p>the vector to compare</p>\n",type:"p5.Vector|Array"}]}]},fromAngle:{name:"fromAngle",params:[{name:"angle",description:'<p>the desired angle, in radians (unaffected by <a href="#/p5/angleMode">angleMode</a>)</p>\n',type:"Number"},{name:"length",description:"<p>the length of the new vector (defaults to 1)</p>\n",type:"Number",optional:!0}],class:"p5.Vector",module:"Math"},fromAngles:{name:"fromAngles",params:[{name:"theta",description:"<p>the polar angle, in radians (zero is up)</p>\n",type:"Number"},{name:"phi",description:"<p>the azimuthal angle, in radians\n                              (zero is out of the screen)</p>\n",type:"Number"},{name:"length",description:"<p>the length of the new vector (defaults to 1)</p>\n",type:"Number",optional:!0}],class:"p5.Vector",module:"Math"},random2D:{name:"random2D",class:"p5.Vector",module:"Math"},random3D:{name:"random3D",class:"p5.Vector",module:"Math"}},"p5.Font":{font:{name:"font",class:"p5.Font",module:"Typography"},textBounds:{name:"textBounds",params:[{name:"line",description:"<p>a line of text</p>\n",type:"String"},{name:"x",description:"<p>x-position</p>\n",type:"Number"},{name:"y",description:"<p>y-position</p>\n",type:"Number"},{name:"fontSize",description:"<p>font size to use (optional) Default is 12.</p>\n",type:"Number",optional:!0},{name:"options",description:"<p>opentype options (optional)\n                           opentype fonts contains alignment and baseline options.\n                           Default is 'LEFT' and 'alphabetic'</p>\n",type:"Object",optional:!0}],class:"p5.Font",module:"Typography"},textToPoints:{name:"textToPoints",params:[{name:"txt",description:"<p>a line of text</p>\n",type:"String"},{name:"x",description:"<p>x-position</p>\n",type:"Number"},{name:"y",description:"<p>y-position</p>\n",type:"Number"},{name:"fontSize",description:"<p>font size to use (optional)</p>\n",type:"Number"},{name:"options",description:"<p>an (optional) object that can contain:</p>\n<p><br>sampleFactor - the ratio of path-length to number of samples\n(default=.1); higher values yield more points and are therefore\nmore precise</p>\n<p><br>simplifyThreshold - if set to a non-zero value, collinear points will be\nbe removed from the polygon; the value represents the threshold angle to use\nwhen determining whether two edges are collinear</p>\n",type:"Object",optional:!0}],class:"p5.Font",module:"Typography"}},"p5.Camera":{perspective:{name:"perspective",class:"p5.Camera",module:"Lights, Camera"},ortho:{name:"ortho",class:"p5.Camera",module:"Lights, Camera"},frustum:{name:"frustum",class:"p5.Camera",module:"Lights, Camera"},pan:{name:"pan",params:[{name:"angle",description:'<p>amount to rotate camera in current\n<a href="#/p5/angleMode">angleMode</a> units.\nGreater than 0 values rotate counterclockwise (to the left).</p>\n',type:"Number"}],class:"p5.Camera",module:"Lights, Camera"},tilt:{name:"tilt",params:[{name:"angle",description:'<p>amount to rotate camera in current\n<a href="#/p5/angleMode">angleMode</a> units.\nGreater than 0 values rotate counterclockwise (to the left).</p>\n',type:"Number"}],class:"p5.Camera",module:"Lights, Camera"},lookAt:{name:"lookAt",params:[{name:"x",description:"<p>x position of a point in world space</p>\n",type:"Number"},{name:"y",description:"<p>y position of a point in world space</p>\n",type:"Number"},{name:"z",description:"<p>z position of a point in world space</p>\n",type:"Number"}],class:"p5.Camera",module:"Lights, Camera"},camera:{name:"camera",class:"p5.Camera",module:"Lights, Camera"},move:{name:"move",params:[{name:"x",description:"<p>amount to move along camera's left-right axis</p>\n",type:"Number"},{name:"y",description:"<p>amount to move along camera's up-down axis</p>\n",type:"Number"},{name:"z",description:"<p>amount to move along camera's forward-backward axis</p>\n",type:"Number"}],class:"p5.Camera",module:"Lights, Camera"},setPosition:{name:"setPosition",params:[{name:"x",description:"<p>x position of a point in world space</p>\n",type:"Number"},{name:"y",description:"<p>y position of a point in world space</p>\n",type:"Number"},{name:"z",description:"<p>z position of a point in world space</p>\n",type:"Number"}],class:"p5.Camera",module:"Lights, Camera"}},"p5.Geometry":{computeFaces:{name:"computeFaces",class:"p5.Geometry",module:"Lights, Camera"},computeNormals:{name:"computeNormals",class:"p5.Geometry",module:"Lights, Camera"},averageNormals:{name:"averageNormals",class:"p5.Geometry",module:"Lights, Camera"},averagePoleNormals:{name:"averagePoleNormals",class:"p5.Geometry",module:"Lights, Camera"},normalize:{name:"normalize",class:"p5.Geometry",module:"Lights, Camera"}},"p5.Shader":{setUniform:{name:"setUniform",params:[{name:"uniformName",description:"<p>the name of the uniform in the\nshader program</p>\n",type:"String"},{name:"data",description:"<p>the data to be associated\nwith that uniform; type varies (could be a single numerical value, array,\nmatrix, or texture / sampler reference)</p>\n",type:"Object|Number|Boolean|Number[]"}],class:"p5.Shader",module:"Lights, Camera"}},"p5.sound":{getMasterVolume:{name:"getMasterVolume",class:"p5.sound",module:"p5.sound"},masterVolume:{name:"masterVolume",params:[{name:"volume",description:"<p>Volume (amplitude) between 0.0\n                                   and 1.0 or modulating signal/oscillator</p>\n",type:"Number|Object"},{name:"rampTime",description:"<p>Fade for t seconds</p>\n",type:"Number",optional:!0},{name:"timeFromNow",description:"<p>Schedule this event to happen at\n                               t seconds in the future</p>\n",type:"Number",optional:!0}],class:"p5.sound",module:"p5.sound"},soundOut:{name:"soundOut",class:"p5.sound",module:"p5.sound"}},"p5.Effect":{amp:{name:"amp",params:[{name:"vol",description:"<p>amplitude between 0 and 1.0</p>\n",type:"Number",optional:!0},{name:"rampTime",description:"<p>create a fade that lasts until rampTime</p>\n",type:"Number",optional:!0},{name:"tFromNow",description:"<p>schedule this event to happen in tFromNow seconds</p>\n",type:"Number",optional:!0}],class:"p5.Effect",module:"p5.sound"},chain:{name:"chain",params:[{name:"arguments",description:"<p>Chain together multiple sound objects</p>\n",type:"Object",optional:!0}],class:"p5.Effect",module:"p5.sound"},drywet:{name:"drywet",params:[{name:"fade",description:"<p>The desired drywet value (0 - 1.0)</p>\n",type:"Number",optional:!0}],class:"p5.Effect",module:"p5.sound"},connect:{name:"connect",params:[{name:"unit",description:"",type:"Object"}],class:"p5.Effect",module:"p5.sound"},disconnect:{name:"disconnect",class:"p5.Effect",module:"p5.sound"}},"p5.Filter":{biquadFilter:{name:"biquadFilter",class:"p5.Filter",module:"p5.sound"},process:{name:"process",params:[{name:"Signal",description:"<p>An object that outputs audio</p>\n",type:"Object"},{name:"freq",description:"<p>Frequency in Hz, from 10 to 22050</p>\n",type:"Number",optional:!0},{name:"res",description:"<p>Resonance/Width of the filter frequency\n                      from 0.001 to 1000</p>\n",type:"Number",optional:!0}],class:"p5.Filter",module:"p5.sound"},set:{name:"set",params:[{name:"freq",description:"<p>Frequency in Hz, from 10 to 22050</p>\n",type:"Number",optional:!0},{name:"res",description:"<p>Resonance (Q) from 0.001 to 1000</p>\n",type:"Number",optional:!0},{name:"timeFromNow",description:"<p>schedule this event to happen\n                              seconds from now</p>\n",type:"Number",optional:!0}],class:"p5.Filter",module:"p5.sound"},freq:{name:"freq",params:[{name:"freq",description:"<p>Filter Frequency</p>\n",type:"Number"},{name:"timeFromNow",description:"<p>schedule this event to happen\n                              seconds from now</p>\n",type:"Number",optional:!0}],class:"p5.Filter",module:"p5.sound"},res:{name:"res",params:[{name:"res",description:"<p>Resonance/Width of filter freq\n                     from 0.001 to 1000</p>\n",type:"Number"},{name:"timeFromNow",description:"<p>schedule this event to happen\n                              seconds from now</p>\n",type:"Number",optional:!0}],class:"p5.Filter",module:"p5.sound"},gain:{name:"gain",params:[{name:"gain",description:"",type:"Number"}],class:"p5.Filter",module:"p5.sound"},toggle:{name:"toggle",class:"p5.Filter",module:"p5.sound"},setType:{name:"setType",params:[{name:"t",description:"",type:"String"}],class:"p5.Filter",module:"p5.sound"}},"p5.Oscillator":{start:{name:"start",params:[{name:"time",description:"<p>startTime in seconds from now.</p>\n",type:"Number",optional:!0},{name:"frequency",description:"<p>frequency in Hz.</p>\n",type:"Number",optional:!0}],class:"p5.Oscillator",module:"p5.sound"},stop:{name:"stop",params:[{name:"secondsFromNow",description:"<p>Time, in seconds from now.</p>\n",type:"Number"}],class:"p5.Oscillator",module:"p5.sound"},amp:{name:"amp",params:[{name:"vol",description:"<p>between 0 and 1.0\n                            or a modulating signal/oscillator</p>\n",type:"Number|Object"},{name:"rampTime",description:"<p>create a fade that lasts rampTime</p>\n",type:"Number",optional:!0},{name:"timeFromNow",description:"<p>schedule this event to happen\n                              seconds from now</p>\n",type:"Number",optional:!0}],class:"p5.Oscillator",module:"p5.sound"},freq:{name:"freq",params:[{name:"Frequency",description:"<p>Frequency in Hz\n                                      or modulating signal/oscillator</p>\n",type:"Number|Object"},{name:"rampTime",description:"<p>Ramp time (in seconds)</p>\n",type:"Number",optional:!0},{name:"timeFromNow",description:"<p>Schedule this event to happen\n                                 at x seconds from now</p>\n",type:"Number",optional:!0}],class:"p5.Oscillator",module:"p5.sound"},setType:{name:"setType",params:[{name:"type",description:"<p>'sine', 'triangle', 'sawtooth' or 'square'.</p>\n",type:"String"}],class:"p5.Oscillator",module:"p5.sound"},connect:{name:"connect",params:[{name:"unit",description:"<p>A p5.sound or Web Audio object</p>\n",type:"Object"}],class:"p5.Oscillator",module:"p5.sound"},disconnect:{name:"disconnect",class:"p5.Oscillator",module:"p5.sound"},pan:{name:"pan",params:[{name:"panning",description:"<p>Number between -1 and 1</p>\n",type:"Number"},{name:"timeFromNow",description:"<p>schedule this event to happen\n                              seconds from now</p>\n",type:"Number"}],class:"p5.Oscillator",module:"p5.sound"},phase:{name:"phase",params:[{name:"phase",description:"<p>float between 0.0 and 1.0</p>\n",type:"Number"}],class:"p5.Oscillator",module:"p5.sound"},add:{name:"add",params:[{name:"number",description:"<p>Constant number to add</p>\n",type:"Number"}],class:"p5.Oscillator",module:"p5.sound"},mult:{name:"mult",params:[{name:"number",description:"<p>Constant number to multiply</p>\n",type:"Number"}],class:"p5.Oscillator",module:"p5.sound"},scale:{name:"scale",params:[{name:"inMin",description:"<p>input range minumum</p>\n",type:"Number"},{name:"inMax",description:"<p>input range maximum</p>\n",type:"Number"},{name:"outMin",description:"<p>input range minumum</p>\n",type:"Number"},{name:"outMax",description:"<p>input range maximum</p>\n",type:"Number"}],class:"p5.Oscillator",module:"p5.sound"}},"p5.MonoSynth":{play:{name:"play",params:[{name:"note",description:'<p>the note you want to play, specified as a\n                               frequency in Hertz (Number) or as a midi\n                               value in Note/Octave format ("C4", "Eb3"...etc")\n                               See <a href = "https://github.com/Tonejs/Tone.js/wiki/Instruments">\n                               Tone</a>. Defaults to 440 hz.</p>\n',type:"String | Number"},{name:"velocity",description:"<p>velocity of the note to play (ranging from 0 to 1)</p>\n",type:"Number",optional:!0},{name:"secondsFromNow",description:"<p>time from now (in seconds) at which to play</p>\n",type:"Number",optional:!0},{name:"sustainTime",description:"<p>time to sustain before releasing the envelope. Defaults to 0.15 seconds.</p>\n",type:"Number",optional:!0}],class:"p5.MonoSynth",module:"p5.sound"},triggerAttack:{params:[{name:"note",description:'<p>the note you want to play, specified as a\n                               frequency in Hertz (Number) or as a midi\n                               value in Note/Octave format ("C4", "Eb3"...etc")\n                               See <a href = "https://github.com/Tonejs/Tone.js/wiki/Instruments">\n                               Tone</a>. Defaults to 440 hz</p>\n',type:"String | Number"},{name:"velocity",description:"<p>velocity of the note to play (ranging from 0 to 1)</p>\n",type:"Number",optional:!0},{name:"secondsFromNow",description:"<p>time from now (in seconds) at which to play</p>\n",type:"Number",optional:!0}],name:"triggerAttack",class:"p5.MonoSynth",module:"p5.sound"},triggerRelease:{params:[{name:"secondsFromNow",description:"<p>time to trigger the release</p>\n",type:"Number"}],name:"triggerRelease",class:"p5.MonoSynth",module:"p5.sound"},setADSR:{name:"setADSR",params:[{name:"attackTime",description:"<p>Time (in seconds before envelope\n                              reaches Attack Level</p>\n",type:"Number"},{name:"decayTime",description:"<p>Time (in seconds) before envelope\n                              reaches Decay/Sustain Level</p>\n",type:"Number",optional:!0},{name:"susRatio",description:"<p>Ratio between attackLevel and releaseLevel, on a scale from 0 to 1,\n                              where 1.0 = attackLevel, 0.0 = releaseLevel.\n                              The susRatio determines the decayLevel and the level at which the\n                              sustain portion of the envelope will sustain.\n                              For example, if attackLevel is 0.4, releaseLevel is 0,\n                              and susAmt is 0.5, the decayLevel would be 0.2. If attackLevel is\n                              increased to 1.0 (using <code>setRange</code>),\n                              then decayLevel would increase proportionally, to become 0.5.</p>\n",type:"Number",optional:!0},{name:"releaseTime",description:"<p>Time in seconds from now (defaults to 0)</p>\n",type:"Number",optional:!0}],class:"p5.MonoSynth",module:"p5.sound"},attack:{name:"attack",class:"p5.MonoSynth",module:"p5.sound"},decay:{name:"decay",class:"p5.MonoSynth",module:"p5.sound"},sustain:{name:"sustain",class:"p5.MonoSynth",module:"p5.sound"},release:{name:"release",class:"p5.MonoSynth",module:"p5.sound"},amp:{name:"amp",params:[{name:"vol",description:"<p>desired volume</p>\n",type:"Number"},{name:"rampTime",description:"<p>Time to reach new volume</p>\n",type:"Number",optional:!0}],class:"p5.MonoSynth",module:"p5.sound"},connect:{name:"connect",params:[{name:"unit",description:"<p>A p5.sound or Web Audio object</p>\n",type:"Object"}],class:"p5.MonoSynth",module:"p5.sound"},disconnect:{name:"disconnect",class:"p5.MonoSynth",module:"p5.sound"},dispose:{name:"dispose",class:"p5.MonoSynth",module:"p5.sound"}},"p5.AudioVoice":{connect:{name:"connect",params:[{name:"unit",description:"",type:"Object"}],class:"p5.AudioVoice",module:"p5.sound"},disconnect:{name:"disconnect",class:"p5.AudioVoice",module:"p5.sound"}},"p5.PolySynth":{notes:{name:"notes",class:"p5.PolySynth",module:"p5.sound"},polyvalue:{name:"polyvalue",class:"p5.PolySynth",module:"p5.sound"},AudioVoice:{name:"AudioVoice",class:"p5.PolySynth",module:"p5.sound"},play:{name:"play",params:[{name:"note",description:"<p>midi note to play (ranging from 0 to 127 - 60 being a middle C)</p>\n",type:"Number",optional:!0},{name:"velocity",description:"<p>velocity of the note to play (ranging from 0 to 1)</p>\n",type:"Number",optional:!0},{name:"secondsFromNow",description:"<p>time from now (in seconds) at which to play</p>\n",type:"Number",optional:!0},{name:"sustainTime",description:"<p>time to sustain before releasing the envelope</p>\n",type:"Number",optional:!0}],class:"p5.PolySynth",module:"p5.sound"},noteADSR:{name:"noteADSR",params:[{name:"note",description:"<p>Midi note on which ADSR should be set.</p>\n",type:"Number",optional:!0},{name:"attackTime",description:"<p>Time (in seconds before envelope\n                              reaches Attack Level</p>\n",type:"Number",optional:!0},{name:"decayTime",description:"<p>Time (in seconds) before envelope\n                              reaches Decay/Sustain Level</p>\n",type:"Number",optional:!0},{name:"susRatio",description:"<p>Ratio between attackLevel and releaseLevel, on a scale from 0 to 1,\n                              where 1.0 = attackLevel, 0.0 = releaseLevel.\n                              The susRatio determines the decayLevel and the level at which the\n                              sustain portion of the envelope will sustain.\n                              For example, if attackLevel is 0.4, releaseLevel is 0,\n                              and susAmt is 0.5, the decayLevel would be 0.2. If attackLevel is\n                              increased to 1.0 (using <code>setRange</code>),\n                              then decayLevel would increase proportionally, to become 0.5.</p>\n",type:"Number",optional:!0},{name:"releaseTime",description:"<p>Time in seconds from now (defaults to 0)</p>\n",type:"Number",optional:!0}],class:"p5.PolySynth",module:"p5.sound"},setADSR:{name:"setADSR",params:[{name:"attackTime",description:"<p>Time (in seconds before envelope\n                               reaches Attack Level</p>\n",type:"Number",optional:!0},{name:"decayTime",description:"<p>Time (in seconds) before envelope\n                               reaches Decay/Sustain Level</p>\n",type:"Number",optional:!0},{name:"susRatio",description:"<p>Ratio between attackLevel and releaseLevel, on a scale from 0 to 1,\n                               where 1.0 = attackLevel, 0.0 = releaseLevel.\n                               The susRatio determines the decayLevel and the level at which the\n                               sustain portion of the envelope will sustain.\n                               For example, if attackLevel is 0.4, releaseLevel is 0,\n                               and susAmt is 0.5, the decayLevel would be 0.2. If attackLevel is\n                               increased to 1.0 (using <code>setRange</code>),\n                               then decayLevel would increase proportionally, to become 0.5.</p>\n",type:"Number",optional:!0},{name:"releaseTime",description:"<p>Time in seconds from now (defaults to 0)</p>\n",type:"Number",optional:!0}],class:"p5.PolySynth",module:"p5.sound"},noteAttack:{name:"noteAttack",params:[{name:"note",description:"<p>midi note on which attack should be triggered.</p>\n",type:"Number",optional:!0},{name:"velocity",description:"<p>velocity of the note to play (ranging from 0 to 1)/</p>\n",type:"Number",optional:!0},{name:"secondsFromNow",description:"<p>time from now (in seconds)</p>\n",type:"Number",optional:!0}],class:"p5.PolySynth",module:"p5.sound"},noteRelease:{name:"noteRelease",params:[{name:"note",description:"<p>midi note on which attack should be triggered.\n                                  If no value is provided, all notes will be released.</p>\n",type:"Number",optional:!0},{name:"secondsFromNow",description:"<p>time to trigger the release</p>\n",type:"Number",optional:!0}],class:"p5.PolySynth",module:"p5.sound"},connect:{name:"connect",params:[{name:"unit",description:"<p>A p5.sound or Web Audio object</p>\n",type:"Object"}],class:"p5.PolySynth",module:"p5.sound"},disconnect:{name:"disconnect",class:"p5.PolySynth",module:"p5.sound"},dispose:{name:"dispose",class:"p5.PolySynth",module:"p5.sound"}},"p5.SoundFile":{isLoaded:{name:"isLoaded",class:"p5.SoundFile",module:"p5.sound"},play:{name:"play",params:[{name:"startTime",description:"<p>(optional) schedule playback to start (in seconds from now).</p>\n",type:"Number",optional:!0},{name:"rate",description:"<p>(optional) playback rate</p>\n",type:"Number",optional:!0},{name:"amp",description:"<p>(optional) amplitude (volume)\n                                    of playback</p>\n",type:"Number",optional:!0},{name:"cueStart",description:"<p>(optional) cue start time in seconds</p>\n",type:"Number",optional:!0},{name:"duration",description:"<p>(optional) duration of playback in seconds</p>\n",type:"Number",optional:!0}],class:"p5.SoundFile",module:"p5.sound"},playMode:{name:"playMode",params:[{name:"str",description:"<p>'restart' or 'sustain' or 'untilDone'</p>\n",type:"String"}],class:"p5.SoundFile",module:"p5.sound"},pause:{name:"pause",params:[{name:"startTime",description:"<p>(optional) schedule event to occur\n                             seconds from now</p>\n",type:"Number",optional:!0}],class:"p5.SoundFile",module:"p5.sound"},loop:{name:"loop",params:[{name:"startTime",description:"<p>(optional) schedule event to occur\n                            seconds from now</p>\n",type:"Number",optional:!0},{name:"rate",description:"<p>(optional) playback rate</p>\n",type:"Number",optional:!0},{name:"amp",description:"<p>(optional) playback volume</p>\n",type:"Number",optional:!0},{name:"cueLoopStart",description:"<p>(optional) startTime in seconds</p>\n",type:"Number",optional:!0},{name:"duration",description:"<p>(optional) loop duration in seconds</p>\n",type:"Number",optional:!0}],class:"p5.SoundFile",module:"p5.sound"},setLoop:{name:"setLoop",params:[{name:"Boolean",description:"<p>set looping to true or false</p>\n",type:"Boolean"}],class:"p5.SoundFile",module:"p5.sound"},isLooping:{name:"isLooping",class:"p5.SoundFile",module:"p5.sound"},isPlaying:{name:"isPlaying",class:"p5.SoundFile",module:"p5.sound"},isPaused:{name:"isPaused",class:"p5.SoundFile",module:"p5.sound"},stop:{name:"stop",params:[{name:"startTime",description:"<p>(optional) schedule event to occur\n                            in seconds from now</p>\n",type:"Number",optional:!0}],class:"p5.SoundFile",module:"p5.sound"},setVolume:{name:"setVolume",params:[{name:"volume",description:"<p>Volume (amplitude) between 0.0\n                                   and 1.0 or modulating signal/oscillator</p>\n",type:"Number|Object"},{name:"rampTime",description:"<p>Fade for t seconds</p>\n",type:"Number",optional:!0},{name:"timeFromNow",description:"<p>Schedule this event to happen at\n                               t seconds in the future</p>\n",type:"Number",optional:!0}],class:"p5.SoundFile",module:"p5.sound"},pan:{name:"pan",params:[{name:"panValue",description:"<p>Set the stereo panner</p>\n",type:"Number",optional:!0},{name:"timeFromNow",description:"<p>schedule this event to happen\n                                seconds from now</p>\n",type:"Number",optional:!0}],class:"p5.SoundFile",module:"p5.sound"},getPan:{name:"getPan",class:"p5.SoundFile",module:"p5.sound"},rate:{name:"rate",params:[{name:"playbackRate",description:"<p>Set the playback rate. 1.0 is normal,\n                                   .5 is half-speed, 2.0 is twice as fast.\n                                   Values less than zero play backwards.</p>\n",type:"Number",optional:!0}],class:"p5.SoundFile",module:"p5.sound"},duration:{name:"duration",class:"p5.SoundFile",module:"p5.sound"},currentTime:{name:"currentTime",class:"p5.SoundFile",module:"p5.sound"},jump:{name:"jump",params:[{name:"cueTime",description:"<p>cueTime of the soundFile in seconds.</p>\n",type:"Number"},{name:"duration",description:"<p>duration in seconds.</p>\n",type:"Number"}],class:"p5.SoundFile",module:"p5.sound"},channels:{name:"channels",class:"p5.SoundFile",module:"p5.sound"},sampleRate:{name:"sampleRate",class:"p5.SoundFile",module:"p5.sound"},frames:{name:"frames",class:"p5.SoundFile",module:"p5.sound"},getPeaks:{name:"getPeaks",params:[{name:"length",description:"<p>length is the size of the returned array.\n                         Larger length results in more precision.\n                         Defaults to 5*width of the browser window.</p>\n",type:"Number",optional:!0}],class:"p5.SoundFile",module:"p5.sound"},reverseBuffer:{name:"reverseBuffer",class:"p5.SoundFile",module:"p5.sound"},onended:{name:"onended",params:[{name:"callback",description:"<p>function to call when the\n                            soundfile has ended.</p>\n",type:"Function"}],class:"p5.SoundFile",module:"p5.sound"},connect:{name:"connect",params:[{name:"object",description:"<p>Audio object that accepts an input</p>\n",type:"Object",optional:!0}],class:"p5.SoundFile",module:"p5.sound"},disconnect:{name:"disconnect",class:"p5.SoundFile",module:"p5.sound"},setPath:{name:"setPath",params:[{name:"path",description:"<p>path to audio file</p>\n",type:"String"},{name:"callback",description:"<p>Callback</p>\n",type:"Function"}],class:"p5.SoundFile",module:"p5.sound"},setBuffer:{name:"setBuffer",params:[{name:"buf",description:"<p>Array of Float32 Array(s). 2 Float32 Arrays\n                   will create a stereo source. 1 will create\n                   a mono source.</p>\n",type:"Array"}],class:"p5.SoundFile",module:"p5.sound"},processPeaks:{name:"processPeaks",params:[{name:"callback",description:"<p>a function to call once this data is returned</p>\n",type:"Function"},{name:"initThreshold",description:"<p>initial threshold defaults to 0.9</p>\n",type:"Number",optional:!0},{name:"minThreshold",description:"<p>minimum threshold defaults to 0.22</p>\n",type:"Number",optional:!0},{name:"minPeaks",description:"<p>minimum number of peaks defaults to 200</p>\n",type:"Number",optional:!0}],class:"p5.SoundFile",module:"p5.sound"},addCue:{name:"addCue",params:[{name:"time",description:"<p>Time in seconds, relative to this media\n                           element's playback. For example, to trigger\n                           an event every time playback reaches two\n                           seconds, pass in the number 2. This will be\n                           passed as the first parameter to\n                           the callback function.</p>\n",type:"Number"},{name:"callback",description:"<p>Name of a function that will be\n                           called at the given time. The callback will\n                           receive time and (optionally) param as its\n                           two parameters.</p>\n",type:"Function"},{name:"value",description:"<p>An object to be passed as the\n                           second parameter to the\n                           callback function.</p>\n",type:"Object",optional:!0}],class:"p5.SoundFile",module:"p5.sound"},removeCue:{name:"removeCue",params:[{name:"id",description:"<p>ID of the cue, as returned by addCue</p>\n",type:"Number"}],class:"p5.SoundFile",module:"p5.sound"},clearCues:{name:"clearCues",class:"p5.SoundFile",module:"p5.sound"},save:{name:"save",params:[{name:"fileName",description:"<p>name of the resulting .wav file.</p>\n",type:"String",optional:!0}],class:"p5.SoundFile",module:"p5.sound"},getBlob:{name:"getBlob",class:"p5.SoundFile",module:"p5.sound"}},"p5.Amplitude":{setInput:{name:"setInput",params:[{name:"snd",description:"<p>set the sound source\n                                     (optional, defaults to\n                                     master output)</p>\n",type:"SoundObject|undefined",optional:!0},{name:"smoothing",description:"<p>a range between 0.0 and 1.0\n                                      to smooth amplitude readings</p>\n",type:"Number|undefined",optional:!0}],class:"p5.Amplitude",module:"p5.sound"},getLevel:{name:"getLevel",params:[{name:"channel",description:"<p>Optionally return only channel 0 (left) or 1 (right)</p>\n",type:"Number",optional:!0}],class:"p5.Amplitude",module:"p5.sound"},toggleNormalize:{name:"toggleNormalize",params:[{name:"boolean",description:"<p>set normalize to true (1) or false (0)</p>\n",type:"Boolean",optional:!0}],class:"p5.Amplitude",module:"p5.sound"},smooth:{name:"smooth",params:[{name:"set",description:"<p>smoothing from 0.0 <= 1</p>\n",type:"Number"}],class:"p5.Amplitude",module:"p5.sound"}},"p5.FFT":{setInput:{name:"setInput",params:[{name:"source",description:"<p>p5.sound object (or web audio API source node)</p>\n",type:"Object",optional:!0}],class:"p5.FFT",module:"p5.sound"},waveform:{name:"waveform",params:[{name:"bins",description:"<p>Must be a power of two between\n                          16 and 1024. Defaults to 1024.</p>\n",type:"Number",optional:!0},{name:"precision",description:"<p>If any value is provided, will return results\n                            in a Float32 Array which is more precise\n                            than a regular array.</p>\n",type:"String",optional:!0}],class:"p5.FFT",module:"p5.sound"},analyze:{name:"analyze",params:[{name:"bins",description:"<p>Must be a power of two between\n                           16 and 1024. Defaults to 1024.</p>\n",type:"Number",optional:!0},{name:"scale",description:'<p>If "dB," returns decibel\n                           float measurements between\n                           -140 and 0 (max).\n                           Otherwise returns integers from 0-255.</p>\n',type:"Number",optional:!0}],class:"p5.FFT",module:"p5.sound"},getEnergy:{name:"getEnergy",params:[{name:"frequency1",description:'<p>Will return a value representing\n                              energy at this frequency. Alternately,\n                              the strings "bass", "lowMid" "mid",\n                              "highMid", and "treble" will return\n                              predefined frequency ranges.</p>\n',type:"Number|String"},{name:"frequency2",description:"<p>If a second frequency is given,\n                              will return average amount of\n                              energy that exists between the\n                              two frequencies.</p>\n",type:"Number",optional:!0}],class:"p5.FFT",module:"p5.sound"},getCentroid:{name:"getCentroid",class:"p5.FFT",module:"p5.sound"},smooth:{name:"smooth",params:[{name:"smoothing",description:"<p>0.0 < smoothing < 1.0.\n                             Defaults to 0.8.</p>\n",type:"Number"}],class:"p5.FFT",module:"p5.sound"},linAverages:{name:"linAverages",params:[{name:"N",description:"<p>Number of returned frequency groups</p>\n",type:"Number"}],class:"p5.FFT",module:"p5.sound"},logAverages:{name:"logAverages",params:[{name:"octaveBands",description:"<p>Array of Octave Bands objects for grouping</p>\n",type:"Array"}],class:"p5.FFT",module:"p5.sound"},getOctaveBands:{name:"getOctaveBands",params:[{name:"N",description:"<p>Specifies the 1/N type of generated octave bands</p>\n",type:"Number"},{name:"fCtr0",description:"<p>Minimum central frequency for the lowest band</p>\n",type:"Number"}],class:"p5.FFT",module:"p5.sound"}},"p5.Signal":{fade:{name:"fade",params:[{name:"value",description:"<p>Value to set this signal</p>\n",type:"Number"},{name:"secondsFromNow",description:"<p>Length of fade, in seconds from now</p>\n",type:"Number",optional:!0}],class:"p5.Signal",module:"p5.sound"},setInput:{name:"setInput",params:[{name:"input",description:"",type:"Object"}],class:"p5.Signal",module:"p5.sound"},add:{name:"add",params:[{name:"number",description:"",type:"Number"}],class:"p5.Signal",module:"p5.sound"},mult:{name:"mult",params:[{name:"number",description:"<p>to multiply</p>\n",type:"Number"}],class:"p5.Signal",module:"p5.sound"},scale:{name:"scale",params:[{name:"number",description:"<p>to multiply</p>\n",type:"Number"},{name:"inMin",description:"<p>input range minumum</p>\n",type:"Number"},{name:"inMax",description:"<p>input range maximum</p>\n",type:"Number"},{name:"outMin",description:"<p>input range minumum</p>\n",type:"Number"},{name:"outMax",description:"<p>input range maximum</p>\n",type:"Number"}],class:"p5.Signal",module:"p5.sound"}},"p5.Envelope":{attackTime:{name:"attackTime",class:"p5.Envelope",module:"p5.sound"},attackLevel:{name:"attackLevel",class:"p5.Envelope",module:"p5.sound"},decayTime:{name:"decayTime",class:"p5.Envelope",module:"p5.sound"},decayLevel:{name:"decayLevel",class:"p5.Envelope",module:"p5.sound"},releaseTime:{name:"releaseTime",class:"p5.Envelope",module:"p5.sound"},releaseLevel:{name:"releaseLevel",class:"p5.Envelope",module:"p5.sound"},set:{name:"set",params:[{name:"attackTime",description:"<p>Time (in seconds) before level\n                               reaches attackLevel</p>\n",type:"Number"},{name:"attackLevel",description:"<p>Typically an amplitude between\n                               0.0 and 1.0</p>\n",type:"Number"},{name:"decayTime",description:"<p>Time</p>\n",type:"Number"},{name:"decayLevel",description:"<p>Amplitude (In a standard ADSR envelope,\n                               decayLevel = sustainLevel)</p>\n",type:"Number"},{name:"releaseTime",description:"<p>Release Time (in seconds)</p>\n",type:"Number"},{name:"releaseLevel",description:"<p>Amplitude</p>\n",type:"Number"}],class:"p5.Envelope",module:"p5.sound"},setADSR:{name:"setADSR",params:[{name:"attackTime",description:"<p>Time (in seconds before envelope\n                              reaches Attack Level</p>\n",type:"Number"},{name:"decayTime",description:"<p>Time (in seconds) before envelope\n                              reaches Decay/Sustain Level</p>\n",type:"Number",optional:!0},{name:"susRatio",description:"<p>Ratio between attackLevel and releaseLevel, on a scale from 0 to 1,\n                              where 1.0 = attackLevel, 0.0 = releaseLevel.\n                              The susRatio determines the decayLevel and the level at which the\n                              sustain portion of the envelope will sustain.\n                              For example, if attackLevel is 0.4, releaseLevel is 0,\n                              and susAmt is 0.5, the decayLevel would be 0.2. If attackLevel is\n                              increased to 1.0 (using <code>setRange</code>),\n                              then decayLevel would increase proportionally, to become 0.5.</p>\n",type:"Number",optional:!0},{name:"releaseTime",description:"<p>Time in seconds from now (defaults to 0)</p>\n",type:"Number",optional:!0}],class:"p5.Envelope",module:"p5.sound"},setRange:{name:"setRange",params:[{name:"aLevel",description:"<p>attack level (defaults to 1)</p>\n",type:"Number"},{name:"rLevel",description:"<p>release level (defaults to 0)</p>\n",type:"Number"}],class:"p5.Envelope",module:"p5.sound"},setInput:{name:"setInput",params:[{name:"inputs",description:"<p>A p5.sound object or\n                              Web Audio Param.</p>\n",type:"Object",optional:!0,multiple:!0}],class:"p5.Envelope",module:"p5.sound"},setExp:{name:"setExp",params:[{name:"isExp",description:"<p>true is exponential, false is linear</p>\n",type:"Boolean"}],class:"p5.Envelope",module:"p5.sound"},play:{name:"play",params:[{name:"unit",description:"<p>A p5.sound object or\n                              Web Audio Param.</p>\n",type:"Object"},{name:"startTime",description:"<p>time from now (in seconds) at which to play</p>\n",type:"Number",optional:!0},{name:"sustainTime",description:"<p>time to sustain before releasing the envelope</p>\n",type:"Number",optional:!0}],class:"p5.Envelope",module:"p5.sound"},triggerAttack:{name:"triggerAttack",params:[{name:"unit",description:"<p>p5.sound Object or Web Audio Param</p>\n",type:"Object"},{name:"secondsFromNow",description:"<p>time from now (in seconds)</p>\n",type:"Number"}],class:"p5.Envelope",module:"p5.sound"},triggerRelease:{name:"triggerRelease",params:[{name:"unit",description:"<p>p5.sound Object or Web Audio Param</p>\n",type:"Object"},{name:"secondsFromNow",description:"<p>time to trigger the release</p>\n",type:"Number"}],class:"p5.Envelope",module:"p5.sound"},ramp:{name:"ramp",params:[{name:"unit",description:"<p>p5.sound Object or Web Audio Param</p>\n",type:"Object"},{name:"secondsFromNow",description:"<p>When to trigger the ramp</p>\n",type:"Number"},{name:"v",description:"<p>Target value</p>\n",type:"Number"},{name:"v2",description:"<p>Second target value (optional)</p>\n",type:"Number",optional:!0}],class:"p5.Envelope",module:"p5.sound"},add:{name:"add",params:[{name:"number",description:"<p>Constant number to add</p>\n",type:"Number"}],class:"p5.Envelope",module:"p5.sound"},mult:{name:"mult",params:[{name:"number",description:"<p>Constant number to multiply</p>\n",type:"Number"}],class:"p5.Envelope",module:"p5.sound"},scale:{name:"scale",params:[{name:"inMin",description:"<p>input range minumum</p>\n",type:"Number"},{name:"inMax",description:"<p>input range maximum</p>\n",type:"Number"},{name:"outMin",description:"<p>input range minumum</p>\n",type:"Number"},{name:"outMax",description:"<p>input range maximum</p>\n",type:"Number"}],class:"p5.Envelope",module:"p5.sound"}},"p5.Pulse":{width:{name:"width",params:[{name:"width",description:"<p>Width between the pulses (0 to 1.0,\n                       defaults to 0)</p>\n",type:"Number",optional:!0}],class:"p5.Pulse",module:"p5.sound"}},"p5.Noise":{setType:{name:"setType",params:[{name:"type",description:"<p>'white', 'pink' or 'brown'</p>\n",type:"String",optional:!0}],class:"p5.Noise",module:"p5.sound"}},"p5.AudioIn":{input:{name:"input",class:"p5.AudioIn",module:"p5.sound"},output:{name:"output",class:"p5.AudioIn",module:"p5.sound"},stream:{name:"stream",class:"p5.AudioIn",module:"p5.sound"},mediaStream:{name:"mediaStream",class:"p5.AudioIn",module:"p5.sound"},currentSource:{name:"currentSource",class:"p5.AudioIn",module:"p5.sound"},enabled:{name:"enabled",class:"p5.AudioIn",module:"p5.sound"},amplitude:{name:"amplitude",class:"p5.AudioIn",module:"p5.sound"},start:{name:"start",params:[{name:"successCallback",description:"<p>Name of a function to call on\n                                  success.</p>\n",type:"Function",optional:!0},{name:"errorCallback",description:"<p>Name of a function to call if\n                                  there was an error. For example,\n                                  some browsers do not support\n                                  getUserMedia.</p>\n",type:"Function",optional:!0}],class:"p5.AudioIn",module:"p5.sound"},stop:{name:"stop",class:"p5.AudioIn",module:"p5.sound"},connect:{name:"connect",params:[{name:"unit",description:"<p>An object that accepts audio input,\n                        such as an FFT</p>\n",type:"Object",optional:!0}],class:"p5.AudioIn",module:"p5.sound"},disconnect:{name:"disconnect",class:"p5.AudioIn",module:"p5.sound"},getLevel:{name:"getLevel",params:[{name:"smoothing",description:"<p>Smoothing is 0.0 by default.\n                             Smooths values based on previous values.</p>\n",type:"Number",optional:!0}],class:"p5.AudioIn",module:"p5.sound"},amp:{name:"amp",params:[{name:"vol",description:"<p>between 0 and 1.0</p>\n",type:"Number"},{name:"time",description:"<p>ramp time (optional)</p>\n",type:"Number",optional:!0}],class:"p5.AudioIn",module:"p5.sound"},getSources:{name:"getSources",params:[{name:"successCallback",description:"<p>This callback function handles the sources when they\n                                     have been enumerated. The callback function\n                                     receives the deviceList array as its only argument</p>\n",type:"Function",optional:!0},{name:"errorCallback",description:"<p>This optional callback receives the error\n                                   message as its argument.</p>\n",type:"Function",optional:!0}],class:"p5.AudioIn",module:"p5.sound"},setSource:{name:"setSource",params:[{name:"num",description:"<p>position of input source in the array</p>\n",type:"Number"}],class:"p5.AudioIn",module:"p5.sound"}},"p5.EQ":{bands:{name:"bands",class:"p5.EQ",module:"p5.sound"},process:{name:"process",params:[{name:"src",description:"<p>Audio source</p>\n",type:"Object"}],class:"p5.EQ",module:"p5.sound"}},"p5.Panner3D":{panner:{name:"panner",class:"p5.Panner3D",module:"p5.sound"},process:{name:"process",params:[{name:"src",description:"<p>Input source</p>\n",type:"Object"}],class:"p5.Panner3D",module:"p5.sound"},set:{name:"set",params:[{name:"xVal",description:"",type:"Number"},{name:"yVal",description:"",type:"Number"},{name:"zVal",description:"",type:"Number"},{name:"time",description:"",type:"Number"}],class:"p5.Panner3D",module:"p5.sound"},positionX:{name:"positionX",class:"p5.Panner3D",module:"p5.sound"},positionY:{name:"positionY",class:"p5.Panner3D",module:"p5.sound"},positionZ:{name:"positionZ",class:"p5.Panner3D",module:"p5.sound"},orient:{name:"orient",params:[{name:"xVal",description:"",type:"Number"},{name:"yVal",description:"",type:"Number"},{name:"zVal",description:"",type:"Number"},{name:"time",description:"",type:"Number"}],class:"p5.Panner3D",module:"p5.sound"},orientX:{name:"orientX",class:"p5.Panner3D",module:"p5.sound"},orientY:{name:"orientY",class:"p5.Panner3D",module:"p5.sound"},orientZ:{name:"orientZ",class:"p5.Panner3D",module:"p5.sound"},setFalloff:{name:"setFalloff",params:[{name:"maxDistance",description:"",type:"Number",optional:!0},{name:"rolloffFactor",description:"",type:"Number",optional:!0}],class:"p5.Panner3D",module:"p5.sound"},maxDist:{name:"maxDist",params:[{name:"maxDistance",description:"",type:"Number"}],class:"p5.Panner3D",module:"p5.sound"},rollof:{name:"rollof",params:[{name:"rolloffFactor",description:"",type:"Number"}],class:"p5.Panner3D",module:"p5.sound"}},"p5.Delay":{leftDelay:{name:"leftDelay",class:"p5.Delay",module:"p5.sound"},rightDelay:{name:"rightDelay",class:"p5.Delay",module:"p5.sound"},process:{name:"process",params:[{name:"Signal",description:"<p>An object that outputs audio</p>\n",type:"Object"},{name:"delayTime",description:"<p>Time (in seconds) of the delay/echo.\n                             Some browsers limit delayTime to\n                             1 second.</p>\n",type:"Number",optional:!0},{name:"feedback",description:"<p>sends the delay back through itself\n                             in a loop that decreases in volume\n                             each time.</p>\n",type:"Number",optional:!0},{name:"lowPass",description:"<p>Cutoff frequency. Only frequencies\n                             below the lowPass will be part of the\n                             delay.</p>\n",type:"Number",optional:!0}],class:"p5.Delay",module:"p5.sound"},delayTime:{name:"delayTime",params:[{name:"delayTime",description:"<p>Time (in seconds) of the delay</p>\n",type:"Number"}],class:"p5.Delay",module:"p5.sound"},feedback:{name:"feedback",params:[{name:"feedback",description:"<p>0.0 to 1.0, or an object such as an\n                                Oscillator that can be used to\n                                modulate this param</p>\n",type:"Number|Object"}],class:"p5.Delay",module:"p5.sound"},filter:{name:"filter",params:[{name:"cutoffFreq",description:"<p>A lowpass filter will cut off any\n                            frequencies higher than the filter frequency.</p>\n",type:"Number|Object"},{name:"res",description:"<p>Resonance of the filter frequency\n                            cutoff, or an object (i.e. a p5.Oscillator)\n                            that can be used to modulate this parameter.\n                            High numbers (i.e. 15) will produce a resonance,\n                            low numbers (i.e. .2) will produce a slope.</p>\n",type:"Number|Object"}],class:"p5.Delay",module:"p5.sound"},setType:{name:"setType",params:[{name:"type",description:"<p>'pingPong' (1) or 'default' (0)</p>\n",type:"String|Number"}],class:"p5.Delay",module:"p5.sound"},amp:{name:"amp",params:[{name:"volume",description:"<p>amplitude between 0 and 1.0</p>\n",type:"Number"},{name:"rampTime",description:"<p>create a fade that lasts rampTime</p>\n",type:"Number",optional:!0},{name:"timeFromNow",description:"<p>schedule this event to happen\n                              seconds from now</p>\n",type:"Number",optional:!0}],class:"p5.Delay",module:"p5.sound"},connect:{name:"connect",params:[{name:"unit",description:"",type:"Object"}],class:"p5.Delay",module:"p5.sound"},disconnect:{name:"disconnect",class:"p5.Delay",module:"p5.sound"}},"p5.Reverb":{process:{name:"process",params:[{name:"src",description:"<p>p5.sound / Web Audio object with a sound\n                         output.</p>\n",type:"Object"},{name:"seconds",description:"<p>Duration of the reverb, in seconds.\n                         Min: 0, Max: 10. Defaults to 3.</p>\n",type:"Number",optional:!0},{name:"decayRate",description:"<p>Percentage of decay with each echo.\n                          Min: 0, Max: 100. Defaults to 2.</p>\n",type:"Number",optional:!0},{name:"reverse",description:"<p>Play the reverb backwards or forwards.</p>\n",type:"Boolean",optional:!0}],class:"p5.Reverb",module:"p5.sound"},set:{name:"set",params:[{name:"seconds",description:"<p>Duration of the reverb, in seconds.\n                         Min: 0, Max: 10. Defaults to 3.</p>\n",type:"Number",optional:!0},{name:"decayRate",description:"<p>Percentage of decay with each echo.\n                          Min: 0, Max: 100. Defaults to 2.</p>\n",type:"Number",optional:!0},{name:"reverse",description:"<p>Play the reverb backwards or forwards.</p>\n",type:"Boolean",optional:!0}],class:"p5.Reverb",module:"p5.sound"},amp:{name:"amp",params:[{name:"volume",description:"<p>amplitude between 0 and 1.0</p>\n",type:"Number"},{name:"rampTime",description:"<p>create a fade that lasts rampTime</p>\n",type:"Number",optional:!0},{name:"timeFromNow",description:"<p>schedule this event to happen\n                              seconds from now</p>\n",type:"Number",optional:!0}],class:"p5.Reverb",module:"p5.sound"},connect:{name:"connect",params:[{name:"unit",description:"",type:"Object"}],class:"p5.Reverb",module:"p5.sound"},disconnect:{name:"disconnect",class:"p5.Reverb",module:"p5.sound"}},"p5.Convolver":{convolverNode:{name:"convolverNode",class:"p5.Convolver",module:"p5.sound"},process:{name:"process",params:[{name:"src",description:"<p>p5.sound / Web Audio object with a sound\n                         output.</p>\n",type:"Object"}],class:"p5.Convolver",module:"p5.sound"},impulses:{name:"impulses",class:"p5.Convolver",module:"p5.sound"},addImpulse:{name:"addImpulse",params:[{name:"path",description:"<p>path to a sound file</p>\n",type:"String"},{name:"callback",description:"<p>function (optional)</p>\n",type:"Function"},{name:"errorCallback",description:"<p>function (optional)</p>\n",type:"Function"}],class:"p5.Convolver",module:"p5.sound"},resetImpulse:{name:"resetImpulse",params:[{name:"path",description:"<p>path to a sound file</p>\n",type:"String"},{name:"callback",description:"<p>function (optional)</p>\n",type:"Function"},{name:"errorCallback",description:"<p>function (optional)</p>\n",type:"Function"}],class:"p5.Convolver",module:"p5.sound"},toggleImpulse:{name:"toggleImpulse",params:[{name:"id",description:"<p>Identify the impulse by its original filename\n                          (String), or by its position in the\n                          <code>.impulses</code> Array (Number).</p>\n",type:"String|Number"}],class:"p5.Convolver",module:"p5.sound"}},"p5.Phrase":{sequence:{name:"sequence",class:"p5.Phrase",module:"p5.sound"}},"p5.Part":{setBPM:{name:"setBPM",params:[{name:"BPM",description:"<p>Beats Per Minute</p>\n",type:"Number"},{name:"rampTime",description:"<p>Seconds from now</p>\n",type:"Number",optional:!0}],class:"p5.Part",module:"p5.sound"},getBPM:{name:"getBPM",class:"p5.Part",module:"p5.sound"},start:{name:"start",params:[{name:"time",description:"<p>seconds from now</p>\n",type:"Number",optional:!0}],class:"p5.Part",module:"p5.sound"},loop:{name:"loop",params:[{name:"time",description:"<p>seconds from now</p>\n",type:"Number",optional:!0}],class:"p5.Part",module:"p5.sound"},noLoop:{name:"noLoop",class:"p5.Part",module:"p5.sound"},stop:{name:"stop",params:[{name:"time",description:"<p>seconds from now</p>\n",type:"Number",optional:!0}],class:"p5.Part",module:"p5.sound"},pause:{name:"pause",params:[{name:"time",description:"<p>seconds from now</p>\n",type:"Number"}],class:"p5.Part",module:"p5.sound"},addPhrase:{name:"addPhrase",params:[{name:"phrase",description:"<p>reference to a p5.Phrase</p>\n",type:"p5.Phrase"}],class:"p5.Part",module:"p5.sound"},removePhrase:{name:"removePhrase",params:[{name:"phraseName",description:"",type:"String"}],class:"p5.Part",module:"p5.sound"},getPhrase:{name:"getPhrase",params:[{name:"phraseName",description:"",type:"String"}],class:"p5.Part",module:"p5.sound"},replaceSequence:{name:"replaceSequence",params:[{name:"phraseName",description:"",type:"String"},{name:"sequence",description:"<p>Array of values to pass into the callback\n                          at each step of the phrase.</p>\n",type:"Array"}],class:"p5.Part",module:"p5.sound"},onStep:{name:"onStep",params:[{name:"callback",description:"<p>The name of the callback\n                            you want to fire\n                            on every beat/tatum.</p>\n",type:"Function"}],class:"p5.Part",module:"p5.sound"}},"p5.Score":{start:{name:"start",class:"p5.Score",module:"p5.sound"},stop:{name:"stop",class:"p5.Score",module:"p5.sound"},pause:{name:"pause",class:"p5.Score",module:"p5.sound"},loop:{name:"loop",class:"p5.Score",module:"p5.sound"},noLoop:{name:"noLoop",class:"p5.Score",module:"p5.sound"},setBPM:{name:"setBPM",params:[{name:"BPM",description:"<p>Beats Per Minute</p>\n",type:"Number"},{name:"rampTime",description:"<p>Seconds from now</p>\n",type:"Number"}],class:"p5.Score",module:"p5.sound"}},"p5.SoundLoop":{musicalTimeMode:{name:"musicalTimeMode",class:"p5.SoundLoop",module:"p5.sound"},maxIterations:{name:"maxIterations",class:"p5.SoundLoop",module:"p5.sound"},start:{name:"start",params:[{name:"timeFromNow",description:"<p>schedule a starting time</p>\n",type:"Number",optional:!0}],class:"p5.SoundLoop",module:"p5.sound"},stop:{name:"stop",params:[{name:"timeFromNow",description:"<p>schedule a stopping time</p>\n",type:"Number",optional:!0}],class:"p5.SoundLoop",module:"p5.sound"},pause:{name:"pause",params:[{name:"timeFromNow",description:"<p>schedule a pausing time</p>\n",type:"Number",optional:!0}],class:"p5.SoundLoop",module:"p5.sound"},syncedStart:{name:"syncedStart",params:[{name:"otherLoop",description:"<p>a p5.SoundLoop to sync with</p>\n",type:"Object"},{name:"timeFromNow",description:"<p>Start the loops in sync after timeFromNow seconds</p>\n",type:"Number",optional:!0}],class:"p5.SoundLoop",module:"p5.sound"},bpm:{name:"bpm",class:"p5.SoundLoop",module:"p5.sound"},timeSignature:{name:"timeSignature",class:"p5.SoundLoop",module:"p5.sound"},interval:{name:"interval",class:"p5.SoundLoop",module:"p5.sound"},iterations:{name:"iterations",class:"p5.SoundLoop",module:"p5.sound"}},"p5.Compressor":{compressor:{name:"compressor",class:"p5.Compressor",module:"p5.sound"},process:{name:"process",params:[{name:"src",description:"<p>Sound source to be connected</p>\n",type:"Object"},{name:"attack",description:"<p>The amount of time (in seconds) to reduce the gain by 10dB,\n                           default = .003, range 0 - 1</p>\n",type:"Number",optional:!0},{name:"knee",description:'<p>A decibel value representing the range above the\n                           threshold where the curve smoothly transitions to the "ratio" portion.\n                           default = 30, range 0 - 40</p>\n',type:"Number",optional:!0},{name:"ratio",description:"<p>The amount of dB change in input for a 1 dB change in output\n                           default = 12, range 1 - 20</p>\n",type:"Number",optional:!0},{name:"threshold",description:"<p>The decibel value above which the compression will start taking effect\n                           default = -24, range -100 - 0</p>\n",type:"Number",optional:!0},{name:"release",description:"<p>The amount of time (in seconds) to increase the gain by 10dB\n                           default = .25, range 0 - 1</p>\n",type:"Number",optional:!0}],class:"p5.Compressor",module:"p5.sound"},set:{name:"set",params:[{name:"attack",description:"<p>The amount of time (in seconds) to reduce the gain by 10dB,\n                           default = .003, range 0 - 1</p>\n",type:"Number"},{name:"knee",description:'<p>A decibel value representing the range above the\n                           threshold where the curve smoothly transitions to the "ratio" portion.\n                           default = 30, range 0 - 40</p>\n',type:"Number"},{name:"ratio",description:"<p>The amount of dB change in input for a 1 dB change in output\n                           default = 12, range 1 - 20</p>\n",type:"Number"},{name:"threshold",description:"<p>The decibel value above which the compression will start taking effect\n                           default = -24, range -100 - 0</p>\n",type:"Number"},{name:"release",description:"<p>The amount of time (in seconds) to increase the gain by 10dB\n                           default = .25, range 0 - 1</p>\n",type:"Number"}],class:"p5.Compressor",module:"p5.sound"},attack:{name:"attack",params:[{name:"attack",description:"<p>Attack is the amount of time (in seconds) to reduce the gain by 10dB,\n                         default = .003, range 0 - 1</p>\n",type:"Number",optional:!0},{name:"time",description:"<p>Assign time value to schedule the change in value</p>\n",type:"Number",optional:!0}],class:"p5.Compressor",module:"p5.sound"},knee:{name:"knee",params:[{name:"knee",description:'<p>A decibel value representing the range above the\n                       threshold where the curve smoothly transitions to the "ratio" portion.\n                       default = 30, range 0 - 40</p>\n',type:"Number",optional:!0},{name:"time",description:"<p>Assign time value to schedule the change in value</p>\n",type:"Number",optional:!0}],class:"p5.Compressor",module:"p5.sound"},ratio:{name:"ratio",params:[{name:"ratio",description:"<p>The amount of dB change in input for a 1 dB change in output\n                           default = 12, range 1 - 20</p>\n",type:"Number",optional:!0},{name:"time",description:"<p>Assign time value to schedule the change in value</p>\n",type:"Number",optional:!0}],class:"p5.Compressor",module:"p5.sound"},threshold:{name:"threshold",params:[{name:"threshold",description:"<p>The decibel value above which the compression will start taking effect\n                           default = -24, range -100 - 0</p>\n",type:"Number"},{name:"time",description:"<p>Assign time value to schedule the change in value</p>\n",type:"Number",optional:!0}],class:"p5.Compressor",module:"p5.sound"},release:{name:"release",params:[{name:"release",description:"<p>The amount of time (in seconds) to increase the gain by 10dB\n                           default = .25, range 0 - 1</p>\n",type:"Number"},{name:"time",description:"<p>Assign time value to schedule the change in value</p>\n",type:"Number",optional:!0}],class:"p5.Compressor",module:"p5.sound"},reduction:{name:"reduction",class:"p5.Compressor",module:"p5.sound"}},"p5.SoundRecorder":{setInput:{name:"setInput",params:[{name:"unit",description:"<p>p5.sound object or a web audio unit\n                       that outputs sound</p>\n",type:"Object",optional:!0}],class:"p5.SoundRecorder",module:"p5.sound"},record:{name:"record",params:[{name:"soundFile",description:"<p>p5.SoundFile</p>\n",type:"p5.SoundFile"},{name:"duration",description:"<p>Time (in seconds)</p>\n",type:"Number",optional:!0},{name:"callback",description:"<p>The name of a function that will be\n                              called once the recording completes</p>\n",type:"Function",optional:!0}],class:"p5.SoundRecorder",module:"p5.sound"},stop:{name:"stop",class:"p5.SoundRecorder",module:"p5.sound"}},"p5.PeakDetect":{isDetected:{name:"isDetected",class:"p5.PeakDetect",module:"p5.sound"},update:{name:"update",params:[{name:"fftObject",description:"<p>A p5.FFT object</p>\n",type:"p5.FFT"}],class:"p5.PeakDetect",module:"p5.sound"},onPeak:{name:"onPeak",params:[{name:"callback",description:"<p>Name of a function that will\n                            be called when a peak is\n                            detected.</p>\n",type:"Function"},{name:"val",description:"<p>Optional value to pass\n                            into the function when\n                            a peak is detected.</p>\n",type:"Object",optional:!0}],class:"p5.PeakDetect",module:"p5.sound"}},"p5.Gain":{setInput:{name:"setInput",params:[{name:"src",description:"<p>p5.sound / Web Audio object with a sound\n                         output.</p>\n",type:"Object"}],class:"p5.Gain",module:"p5.sound"},connect:{name:"connect",params:[{name:"unit",description:"",type:"Object"}],class:"p5.Gain",module:"p5.sound"},disconnect:{name:"disconnect",class:"p5.Gain",module:"p5.sound"},amp:{name:"amp",params:[{name:"volume",description:"<p>amplitude between 0 and 1.0</p>\n",type:"Number"},{name:"rampTime",description:"<p>create a fade that lasts rampTime</p>\n",type:"Number",optional:!0},{name:"timeFromNow",description:"<p>schedule this event to happen\n                              seconds from now</p>\n",type:"Number",optional:!0}],class:"p5.Gain",module:"p5.sound"}},"p5.Distortion":{WaveShaperNode:{name:"WaveShaperNode",class:"p5.Distortion",module:"p5.sound"},process:{name:"process",params:[{name:"amount",description:"<p>Unbounded distortion amount.\n                               Normal values range from 0-1.</p>\n",type:"Number",optional:!0,optdefault:"0.25"},{name:"oversample",description:"<p>'none', '2x', or '4x'.</p>\n",type:"String",optional:!0,optdefault:"'none'"}],class:"p5.Distortion",module:"p5.sound"},set:{name:"set",params:[{name:"amount",description:"<p>Unbounded distortion amount.\n                               Normal values range from 0-1.</p>\n",type:"Number",optional:!0,optdefault:"0.25"},{name:"oversample",description:"<p>'none', '2x', or '4x'.</p>\n",type:"String",optional:!0,optdefault:"'none'"}],class:"p5.Distortion",module:"p5.sound"},getAmount:{name:"getAmount",class:"p5.Distortion",module:"p5.sound"},getOversample:{name:"getOversample",class:"p5.Distortion",module:"p5.sound"}}}},{}],2:[function(e,t,r){"use strict";r.byteLength=function(e){var t=c(e),r=t[0],n=t[1];return 3*(r+n)/4-n},r.toByteArray=function(e){var t,r,n=c(e),a=n[0],o=n[1],i=new u(function(e,t){return 3*(e+t)/4-t}(a,o)),s=0,l=0<o?a-4:a;for(r=0;r<l;r+=4)t=p[e.charCodeAt(r)]<<18|p[e.charCodeAt(r+1)]<<12|p[e.charCodeAt(r+2)]<<6|p[e.charCodeAt(r+3)],i[s++]=t>>16&255,i[s++]=t>>8&255,i[s++]=255&t;2===o&&(t=p[e.charCodeAt(r)]<<2|p[e.charCodeAt(r+1)]>>4,i[s++]=255&t);1===o&&(t=p[e.charCodeAt(r)]<<10|p[e.charCodeAt(r+1)]<<4|p[e.charCodeAt(r+2)]>>2,i[s++]=t>>8&255,i[s++]=255&t);return i},r.fromByteArray=function(e){for(var t,r=e.length,n=r%3,a=[],o=0,i=r-n;o<i;o+=16383)a.push(l(e,o,i<o+16383?i:o+16383));1==n?(t=e[r-1],a.push(s[t>>2]+s[t<<4&63]+"==")):2==n&&(t=(e[r-2]<<8)+e[r-1],a.push(s[t>>10]+s[t>>4&63]+s[t<<2&63]+"="));return a.join("")};for(var s=[],p=[],u="undefined"!=typeof Uint8Array?Uint8Array:Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,o=n.length;a<o;++a)s[a]=n[a],p[n.charCodeAt(a)]=a;function c(e){var t=e.length;if(0<t%4)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function l(e,t,r){for(var n,a,o=[],i=t;i<r;i+=3)n=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(255&e[i+2]),o.push(s[(a=n)>>18&63]+s[a>>12&63]+s[a>>6&63]+s[63&a]);return o.join("")}p["-".charCodeAt(0)]=62,p["_".charCodeAt(0)]=63},{}],3:[function(e,t,r){},{}],4:[function(e,t,r){arguments[4][3][0].apply(r,arguments)},{dup:3}],5:[function(F,e,U){(function(c){"use strict";var n=F("base64-js"),o=F("ieee754"),e="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;U.Buffer=c,U.SlowBuffer=function(e){+e!=e&&(e=0);return c.alloc(+e)},U.INSPECT_MAX_BYTES=50;var r=2147483647;function i(e){if(r<e)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,c.prototype),t}function c(e,t,r){if("number"!=typeof e)return a(e,t,r);if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return l(e)}function a(e,t,r){if("string"==typeof e)return function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!c.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var r=0|d(e,t),n=i(r),a=n.write(e,t);a!==r&&(n=n.slice(0,a));return n}(e,t);if(ArrayBuffer.isView(e))return p(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(D(e,ArrayBuffer)||e&&D(e.buffer,ArrayBuffer))return function(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');var n;n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r);return Object.setPrototypeOf(n,c.prototype),n}(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return c.from(n,t,r);var a=function(e){if(c.isBuffer(e)){var t=0|u(e.length),r=i(t);return 0===r.length||e.copy(r,0,0,t),r}if(void 0!==e.length)return"number"!=typeof e.length||A(e.length)?i(0):p(e);if("Buffer"===e.type&&Array.isArray(e.data))return p(e.data)}(e);if(a)return a;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return c.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function s(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function l(e){return s(e),i(e<0?0:0|u(e))}function p(e){for(var t=e.length<0?0:0|u(e.length),r=i(t),n=0;n<t;n+=1)r[n]=255&e[n];return r}function u(e){if(r<=e)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r.toString(16)+" bytes");return 0|e}function d(e,t){if(c.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||D(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,n=2<arguments.length&&!0===arguments[2];if(!n&&0===r)return 0;for(var a=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return I(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return P(e).length;default:if(a)return n?-1:I(e).length;t=(""+t).toLowerCase(),a=!0}}function h(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function m(e,t,r,n,a){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):2147483647<r?r=2147483647:r<-2147483648&&(r=-2147483648),A(r=+r)&&(r=a?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(a)return-1;r=e.length-1}else if(r<0){if(!a)return-1;r=0}if("string"==typeof t&&(t=c.from(t,n)),c.isBuffer(t))return 0===t.length?-1:f(e,t,r,n,a);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?a?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):f(e,[t],r,n,a);throw new TypeError("val must be string, number or Buffer")}function f(e,t,r,n,a){var o,i=1,s=e.length,l=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;s/=i=2,l/=2,r/=2}function p(e,t){return 1===i?e[t]:e.readUInt16BE(t*i)}if(a){var u=-1;for(o=r;o<s;o++)if(p(e,o)===p(t,-1===u?0:o-u)){if(-1===u&&(u=o),o-u+1===l)return u*i}else-1!==u&&(o-=o-u),u=-1}else for(s<r+l&&(r=s-l),o=r;0<=o;o--){for(var c=!0,d=0;d<l;d++)if(p(e,o+d)!==p(t,d)){c=!1;break}if(c)return o}return-1}function y(e,t,r,n){r=Number(r)||0;var a=e.length-r;n?a<(n=Number(n))&&(n=a):n=a;var o=t.length;o/2<n&&(n=o/2);for(var i=0;i<n;++i){var s=parseInt(t.substr(2*i,2),16);if(A(s))return i;e[r+i]=s}return i}function g(e,t,r,n){return R(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function v(e,t,r,n){return R(function(e,t){for(var r,n,a,o=[],i=0;i<e.length&&!((t-=2)<0);++i)r=e.charCodeAt(i),n=r>>8,a=r%256,o.push(a),o.push(n);return o}(t,e.length-r),e,r,n)}function b(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function _(e,t,r){r=Math.min(e.length,r);for(var n=[],a=t;a<r;){var o,i,s,l,p=e[a],u=null,c=239<p?4:223<p?3:191<p?2:1;if(a+c<=r)switch(c){case 1:p<128&&(u=p);break;case 2:128==(192&(o=e[a+1]))&&127<(l=(31&p)<<6|63&o)&&(u=l);break;case 3:o=e[a+1],i=e[a+2],128==(192&o)&&128==(192&i)&&2047<(l=(15&p)<<12|(63&o)<<6|63&i)&&(l<55296||57343<l)&&(u=l);break;case 4:o=e[a+1],i=e[a+2],s=e[a+3],128==(192&o)&&128==(192&i)&&128==(192&s)&&65535<(l=(15&p)<<18|(63&o)<<12|(63&i)<<6|63&s)&&l<1114112&&(u=l)}null===u?(u=65533,c=1):65535<u&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|1023&u),n.push(u),a+=c}return function(e){var t=e.length;if(t<=x)return String.fromCharCode.apply(String,e);var r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=x));return r}(n)}U.kMaxLength=r,(c.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}())||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}}),"undefined"!=typeof Symbol&&null!=Symbol.species&&c[Symbol.species]===c&&Object.defineProperty(c,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),c.poolSize=8192,c.from=function(e,t,r){return a(e,t,r)},Object.setPrototypeOf(c.prototype,Uint8Array.prototype),Object.setPrototypeOf(c,Uint8Array),c.alloc=function(e,t,r){return a=t,o=r,s(n=e),n<=0?i(n):void 0!==a?"string"==typeof o?i(n).fill(a,o):i(n).fill(a):i(n);var n,a,o},c.allocUnsafe=function(e){return l(e)},c.allocUnsafeSlow=function(e){return l(e)},c.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==c.prototype},c.compare=function(e,t){if(D(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),D(t,Uint8Array)&&(t=c.from(t,t.offset,t.byteLength)),!c.isBuffer(e)||!c.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var r=e.length,n=t.length,a=0,o=Math.min(r,n);a<o;++a)if(e[a]!==t[a]){r=e[a],n=t[a];break}return r<n?-1:n<r?1:0},c.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return c.alloc(0);var r;if(void 0===t)for(r=t=0;r<e.length;++r)t+=e[r].length;var n=c.allocUnsafe(t),a=0;for(r=0;r<e.length;++r){var o=e[r];if(D(o,Uint8Array)&&(o=c.from(o)),!c.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(n,a),a+=o.length}return n},c.byteLength=d,c.prototype._isBuffer=!0,c.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)h(this,t,t+1);return this},c.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)h(this,t,t+3),h(this,t+1,t+2);return this},c.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)h(this,t,t+7),h(this,t+1,t+6),h(this,t+2,t+5),h(this,t+3,t+4);return this},c.prototype.toLocaleString=c.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?_(this,0,e):function(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e=e||"utf8";;)switch(e){case"hex":return M(this,t,r);case"utf8":case"utf-8":return _(this,t,r);case"ascii":return S(this,t,r);case"latin1":case"binary":return w(this,t,r);case"base64":return b(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}.apply(this,arguments)},c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){var e="",t=U.INSPECT_MAX_BYTES;return e=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(e+=" ... "),"<Buffer "+e+">"},e&&(c.prototype[e]=c.prototype.inspect),c.prototype.compare=function(e,t,r,n,a){if(D(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),!c.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===a&&(a=this.length),t<0||r>e.length||n<0||a>this.length)throw new RangeError("out of range index");if(a<=n&&r<=t)return 0;if(a<=n)return-1;if(r<=t)return 1;if(this===e)return 0;for(var o=(a>>>=0)-(n>>>=0),i=(r>>>=0)-(t>>>=0),s=Math.min(o,i),l=this.slice(n,a),p=e.slice(t,r),u=0;u<s;++u)if(l[u]!==p[u]){o=l[u],i=p[u];break}return o<i?-1:i<o?1:0},c.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},c.prototype.indexOf=function(e,t,r){return m(this,e,t,r,!0)},c.prototype.lastIndexOf=function(e,t,r){return m(this,e,t,r,!1)},c.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var a=this.length-t;if((void 0===r||a<r)&&(r=a),0<e.length&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n=n||"utf8";for(var o,i,s,l,p,u,c=!1;;)switch(n){case"hex":return y(this,e,t,r);case"utf8":case"utf-8":return p=t,u=r,R(I(e,(l=this).length-p),l,p,u);case"ascii":return g(this,e,t,r);case"latin1":case"binary":return g(this,e,t,r);case"base64":return o=this,i=t,s=r,R(P(e),o,i,s);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return v(this,e,t,r);default:if(c)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),c=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var x=4096;function S(e,t,r){var n="";r=Math.min(e.length,r);for(var a=t;a<r;++a)n+=String.fromCharCode(127&e[a]);return n}function w(e,t,r){var n="";r=Math.min(e.length,r);for(var a=t;a<r;++a)n+=String.fromCharCode(e[a]);return n}function M(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||n<r)&&(r=n);for(var a="",o=t;o<r;++o)a+=k[e[o]];return a}function E(e,t,r){for(var n=e.slice(t,r),a="",o=0;o<n.length;o+=2)a+=String.fromCharCode(n[o]+256*n[o+1]);return a}function T(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(r<e+t)throw new RangeError("Trying to access beyond buffer length")}function C(e,t,r,n,a,o){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(a<t||t<o)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function N(e,t,r,n){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function O(e,t,r,n,a){return t=+t,r>>>=0,a||N(e,0,r,4),o.write(e,t,r,n,23,4),r+4}function L(e,t,r,n,a){return t=+t,r>>>=0,a||N(e,0,r,8),o.write(e,t,r,n,52,8),r+8}c.prototype.slice=function(e,t){var r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):r<e&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):r<t&&(t=r),t<e&&(t=e);var n=this.subarray(e,t);return Object.setPrototypeOf(n,c.prototype),n},c.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||T(e,t,this.length);for(var n=this[e],a=1,o=0;++o<t&&(a*=256);)n+=this[e+o]*a;return n},c.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||T(e,t,this.length);for(var n=this[e+--t],a=1;0<t&&(a*=256);)n+=this[e+--t]*a;return n},c.prototype.readUInt8=function(e,t){return e>>>=0,t||T(e,1,this.length),this[e]},c.prototype.readUInt16LE=function(e,t){return e>>>=0,t||T(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUInt16BE=function(e,t){return e>>>=0,t||T(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUInt32LE=function(e,t){return e>>>=0,t||T(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUInt32BE=function(e,t){return e>>>=0,t||T(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||T(e,t,this.length);for(var n=this[e],a=1,o=0;++o<t&&(a*=256);)n+=this[e+o]*a;return(a*=128)<=n&&(n-=Math.pow(2,8*t)),n},c.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||T(e,t,this.length);for(var n=t,a=1,o=this[e+--n];0<n&&(a*=256);)o+=this[e+--n]*a;return(a*=128)<=o&&(o-=Math.pow(2,8*t)),o},c.prototype.readInt8=function(e,t){return e>>>=0,t||T(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){e>>>=0,t||T(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt16BE=function(e,t){e>>>=0,t||T(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt32LE=function(e,t){return e>>>=0,t||T(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return e>>>=0,t||T(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readFloatLE=function(e,t){return e>>>=0,t||T(e,4,this.length),o.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return e>>>=0,t||T(e,4,this.length),o.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return e>>>=0,t||T(e,8,this.length),o.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return e>>>=0,t||T(e,8,this.length),o.read(this,e,!1,52,8)},c.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||C(this,e,t,r,Math.pow(2,8*r)-1,0);var a=1,o=0;for(this[t]=255&e;++o<r&&(a*=256);)this[t+o]=e/a&255;return t+r},c.prototype.writeUIntBE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||C(this,e,t,r,Math.pow(2,8*r)-1,0);var a=r-1,o=1;for(this[t+a]=255&e;0<=--a&&(o*=256);)this[t+a]=e/o&255;return t+r},c.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,1,255,0),this[t]=255&e,t+1},c.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},c.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var a=Math.pow(2,8*r-1);C(this,e,t,r,a-1,-a)}var o=0,i=1,s=0;for(this[t]=255&e;++o<r&&(i*=256);)e<0&&0===s&&0!==this[t+o-1]&&(s=1),this[t+o]=(e/i>>0)-s&255;return t+r},c.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var a=Math.pow(2,8*r-1);C(this,e,t,r,a-1,-a)}var o=r-1,i=1,s=0;for(this[t+o]=255&e;0<=--o&&(i*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/i>>0)-s&255;return t+r},c.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},c.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeFloatLE=function(e,t,r){return O(this,e,t,!0,r)},c.prototype.writeFloatBE=function(e,t,r){return O(this,e,t,!1,r)},c.prototype.writeDoubleLE=function(e,t,r){return L(this,e,t,!0,r)},c.prototype.writeDoubleBE=function(e,t,r){return L(this,e,t,!1,r)},c.prototype.copy=function(e,t,r,n){if(!c.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r=r||0,n||0===n||(n=this.length),t>=e.length&&(t=e.length),t=t||0,0<n&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var a=n-r;if(this===e&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(t,r,n);else if(this===e&&r<t&&t<n)for(var o=a-1;0<=o;--o)e[o+t]=this[o+r];else Uint8Array.prototype.set.call(e,this.subarray(r,n),t);return a},c.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!c.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){var a=e.charCodeAt(0);("utf8"===n&&a<128||"latin1"===n)&&(e=a)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;var o;if(t>>>=0,r=void 0===r?this.length:r>>>0,"number"==typeof(e=e||0))for(o=t;o<r;++o)this[o]=e;else{var i=c.isBuffer(e)?e:c.from(e,n),s=i.length;if(0===s)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(o=0;o<r-t;++o)this[o+t]=i[o%s]}return this};var t=/[^+/0-9A-Za-z-_]/g;function I(e,t){var r;t=t||1/0;for(var n=e.length,a=null,o=[],i=0;i<n;++i){if(55295<(r=e.charCodeAt(i))&&r<57344){if(!a){if(56319<r){-1<(t-=3)&&o.push(239,191,189);continue}if(i+1===n){-1<(t-=3)&&o.push(239,191,189);continue}a=r;continue}if(r<56320){-1<(t-=3)&&o.push(239,191,189),a=r;continue}r=65536+(a-55296<<10|r-56320)}else a&&-1<(t-=3)&&o.push(239,191,189);if(a=null,r<128){if(--t<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function P(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(t,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function R(e,t,r,n){for(var a=0;a<n&&!(a+r>=t.length||a>=e.length);++a)t[a+r]=e[a];return a}function D(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function A(e){return e!=e}var k=function(){for(var e="0123456789abcdef",t=new Array(256),r=0;r<16;++r)for(var n=16*r,a=0;a<16;++a)t[n+a]=e[r]+e[a];return t}()}).call(this,F("buffer").Buffer)},{"base64-js":2,buffer:5,ieee754:10}],6:[function(e,t,r){"use strict";t.exports=e("./").polyfill()},{"./":7}],7:[function(z,r,n){(function(j,V){var e,t;e=this,t=function(){"use strict";function l(e){return"function"==typeof e}var r=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},n=0,t=void 0,a=void 0,i=function(e,t){d[n]=e,d[n+1]=t,2===(n+=2)&&(a?a(h):v())};var e="undefined"!=typeof window?window:void 0,o=e||{},s=o.MutationObserver||o.WebKitMutationObserver,p="undefined"==typeof self&&void 0!==j&&"[object process]"==={}.toString.call(j),u="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function c(){var e=setTimeout;return function(){return e(h,1)}}var d=new Array(1e3);function h(){for(var e=0;e<n;e+=2){(0,d[e])(d[e+1]),d[e]=void 0,d[e+1]=void 0}n=0}var m,f,y,g,v=void 0;function b(e,t){var r=this,n=new this.constructor(S);void 0===n[x]&&k(n);var a=r._state;if(a){var o=arguments[a-1];i(function(){return D(a,n,o,r._result)})}else P(r,n,e,t);return n}function _(e){if(e&&"object"==typeof e&&e.constructor===this)return e;var t=new this(S);return N(t,e),t}v=p?function(){return j.nextTick(h)}:s?(f=0,y=new s(h),g=document.createTextNode(""),y.observe(g,{characterData:!0}),function(){g.data=f=++f%2}):u?((m=new MessageChannel).port1.onmessage=h,function(){return m.port2.postMessage(0)}):void 0===e&&"function"==typeof z?function(){try{var e=Function("return this")().require("vertx");return void 0!==(t=e.runOnLoop||e.runOnContext)?function(){t(h)}:c()}catch(e){return c()}}():c();var x=Math.random().toString(36).substring(2);function S(){}var w=void 0,M=1,E=2;function T(e,n,a){i(function(t){var r=!1,e=function(e,t,r,n){try{e.call(t,r,n)}catch(e){return e}}(a,n,function(e){r||(r=!0,n!==e?N(t,e):L(t,e))},function(e){r||(r=!0,I(t,e))},t._label);!r&&e&&(r=!0,I(t,e))},e)}function C(e,t,r){var n,a;t.constructor===e.constructor&&r===b&&t.constructor.resolve===_?(n=e,(a=t)._state===M?L(n,a._result):a._state===E?I(n,a._result):P(a,void 0,function(e){return N(n,e)},function(e){return I(n,e)})):void 0===r?L(e,t):l(r)?T(e,t,r):L(e,t)}function N(t,e){if(t===e)I(t,new TypeError("You cannot resolve a promise with itself"));else if(a=typeof(n=e),null===n||"object"!=a&&"function"!=a)L(t,e);else{var r=void 0;try{r=e.then}catch(e){return void I(t,e)}C(t,e,r)}var n,a}function O(e){e._onerror&&e._onerror(e._result),R(e)}function L(e,t){e._state===w&&(e._result=t,e._state=M,0!==e._subscribers.length&&i(R,e))}function I(e,t){e._state===w&&(e._state=E,e._result=t,i(O,e))}function P(e,t,r,n){var a=e._subscribers,o=a.length;e._onerror=null,a[o]=t,a[o+M]=r,a[o+E]=n,0===o&&e._state&&i(R,e)}function R(e){var t=e._subscribers,r=e._state;if(0!==t.length){for(var n=void 0,a=void 0,o=e._result,i=0;i<t.length;i+=3)n=t[i],a=t[i+r],n?D(r,n,a,o):a(o);e._subscribers.length=0}}function D(e,t,r,n){var a=l(r),o=void 0,i=void 0,s=!0;if(a){try{o=r(n)}catch(e){s=!1,i=e}if(t===o)return void I(t,new TypeError("A promises callback cannot return that same promise."))}else o=n;t._state!==w||(a&&s?N(t,o):!1===s?I(t,i):e===M?L(t,o):e===E&&I(t,o))}var A=0;function k(e){e[x]=A++,e._state=void 0,e._result=void 0,e._subscribers=[]}var F=(U.prototype._enumerate=function(e){for(var t=0;this._state===w&&t<e.length;t++)this._eachEntry(e[t],t)},U.prototype._eachEntry=function(t,e){var r=this._instanceConstructor,n=r.resolve;if(n===_){var a=void 0,o=void 0,i=!1;try{a=t.then}catch(e){i=!0,o=e}if(a===b&&t._state!==w)this._settledAt(t._state,e,t._result);else if("function"!=typeof a)this._remaining--,this._result[e]=t;else if(r===B){var s=new r(S);i?I(s,o):C(s,t,a),this._willSettleAt(s,e)}else this._willSettleAt(new r(function(e){return e(t)}),e)}else this._willSettleAt(n(t),e)},U.prototype._settledAt=function(e,t,r){var n=this.promise;n._state===w&&(this._remaining--,e===E?I(n,r):this._result[t]=r),0===this._remaining&&L(n,this._result)},U.prototype._willSettleAt=function(e,t){var r=this;P(e,void 0,function(e){return r._settledAt(M,t,e)},function(e){return r._settledAt(E,t,e)})},U);function U(e,t){this._instanceConstructor=e,this.promise=new e(S),this.promise[x]||k(this.promise),r(t)?(this.length=t.length,this._remaining=t.length,this._result=new Array(this.length),0===this.length?L(this.promise,this._result):(this.length=this.length||0,this._enumerate(t),0===this._remaining&&L(this.promise,this._result))):I(this.promise,new Error("Array Methods must be provided an Array"))}var B=(G.prototype.catch=function(e){return this.then(null,e)},G.prototype.finally=function(t){var r=this.constructor;return l(t)?this.then(function(e){return r.resolve(t()).then(function(){return e})},function(e){return r.resolve(t()).then(function(){throw e})}):this.then(t,t)},G);function G(e){this[x]=A++,this._result=this._state=void 0,this._subscribers=[],S!==e&&("function"!=typeof e&&function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof G?function(t,e){try{e(function(e){N(t,e)},function(e){I(t,e)})}catch(e){I(t,e)}}(this,e):function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}())}return B.prototype.then=b,B.all=function(e){return new F(this,e).promise},B.race=function(a){var o=this;return r(a)?new o(function(e,t){for(var r=a.length,n=0;n<r;n++)o.resolve(a[n]).then(e,t)}):new o(function(e,t){return t(new TypeError("You must pass an array to race."))})},B.resolve=_,B.reject=function(e){var t=new this(S);return I(t,e),t},B._setScheduler=function(e){a=e},B._setAsap=function(e){i=e},B._asap=i,B.polyfill=function(){var e=void 0;if(void 0!==V)e=V;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var t=e.Promise;if(t){var r=null;try{r=Object.prototype.toString.call(t.resolve())}catch(e){}if("[object Promise]"===r&&!t.cast)return}e.Promise=B},B.Promise=B},"object"==typeof n&&void 0!==r?r.exports=t():e.ES6Promise=t()}).call(this,z("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:15}],8:[function(e,n,a){!function(e,t){if(0,void 0!==a&&void 0!==n)t(a,n);else{var r={exports:{}};t(r.exports,r),e.fetchJsonp=r.exports}}(this,function(e,t){"use strict";var r=5e3,n="callback";function c(t){try{delete window[t]}catch(e){window[t]=void 0}}function d(e){var t=document.getElementById(e);t&&document.getElementsByTagName("head")[0].removeChild(t)}t.exports=function(o){var i=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],s=o,l=i.timeout||r,p=i.jsonpCallback||n,u=void 0;return new Promise(function(t,e){var r=i.jsonpCallbackFunction||"jsonp_"+Date.now()+"_"+Math.ceil(1e5*Math.random()),n=p+"_"+r;window[r]=function(e){t({ok:!0,json:function(){return Promise.resolve(e)}}),u&&clearTimeout(u),d(n),c(r)},s+=-1===s.indexOf("?")?"?":"&";var a=document.createElement("script");a.setAttribute("src",""+s+p+"="+r),i.charset&&a.setAttribute("charset",i.charset),a.id=n,document.getElementsByTagName("head")[0].appendChild(a),u=setTimeout(function(){e(new Error("JSONP request to "+o+" timed out")),c(r),d(n),window[r]=function(){c(r)}},l),a.onerror=function(){e(new Error("JSONP request to "+o+" failed")),c(r),d(n),u&&clearTimeout(u)}})}})},{}],9:[function(e,t,r){var n=n||function(s){"use strict";if(!(void 0===s||"undefined"!=typeof navigator&&/MSIE [1-9]\./.test(navigator.userAgent))){var e=s.document,l=function(){return s.URL||s.webkitURL||s},p=e.createElementNS("http://www.w3.org/1999/xhtml","a"),u="download"in p,c=/constructor/i.test(s.HTMLElement)||s.safari,d=/CriOS\/[\d]+/.test(navigator.userAgent),h=function(e){(s.setImmediate||s.setTimeout)(function(){throw e},0)},m=function(e){setTimeout(function(){"string"==typeof e?l().revokeObjectURL(e):e.remove()},4e4)},f=function(e){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob([String.fromCharCode(65279),e],{type:e.type}):e},n=function(e,r,t){t||(e=f(e));function n(){!function(e,t,r){for(var n=(t=[].concat(t)).length;n--;){var a=e["on"+t[n]];if("function"==typeof a)try{a.call(e,r||e)}catch(e){h(e)}}}(o,"writestart progress write writeend".split(" "))}var a,o=this,i="application/octet-stream"===e.type;if(o.readyState=o.INIT,u)return a=l().createObjectURL(e),void setTimeout(function(){var e,t;p.href=a,p.download=r,e=p,t=new MouseEvent("click"),e.dispatchEvent(t),n(),m(a),o.readyState=o.DONE});!function(){if((d||i&&c)&&s.FileReader){var t=new FileReader;return t.onloadend=function(){var e=d?t.result:t.result.replace(/^data:[^;]*;/,"data:attachment/file;");s.open(e,"_blank")||(s.location.href=e),e=void 0,o.readyState=o.DONE,n()},t.readAsDataURL(e),o.readyState=o.INIT}(a=a||l().createObjectURL(e),i)?s.location.href=a:s.open(a,"_blank")||(s.location.href=a);o.readyState=o.DONE,n(),m(a)}()},t=n.prototype;return"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob?function(e,t,r){return t=t||e.name||"download",r||(e=f(e)),navigator.msSaveOrOpenBlob(e,t)}:(t.abort=function(){},t.readyState=t.INIT=0,t.WRITING=1,t.DONE=2,t.error=t.onwritestart=t.onprogress=t.onwrite=t.onabort=t.onerror=t.onwriteend=null,function(e,t,r){return new n(e,t||e.name||"download",r)})}}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content);void 0!==t&&t.exports&&(t.exports.saveAs=n)},{}],10:[function(e,t,r){r.read=function(e,t,r,n,a){var o,i,s=8*a-n-1,l=(1<<s)-1,p=l>>1,u=-7,c=r?a-1:0,d=r?-1:1,h=e[t+c];for(c+=d,o=h&(1<<-u)-1,h>>=-u,u+=s;0<u;o=256*o+e[t+c],c+=d,u-=8);for(i=o&(1<<-u)-1,o>>=-u,u+=n;0<u;i=256*i+e[t+c],c+=d,u-=8);if(0===o)o=1-p;else{if(o===l)return i?NaN:1/0*(h?-1:1);i+=Math.pow(2,n),o-=p}return(h?-1:1)*i*Math.pow(2,o-n)},r.write=function(e,t,r,n,a,o){var i,s,l,p=8*o-a-1,u=(1<<p)-1,c=u>>1,d=23===a?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:o-1,m=n?1:-1,f=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,i=u):(i=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-i))<1&&(i--,l*=2),2<=(t+=1<=i+c?d/l:d*Math.pow(2,1-c))*l&&(i++,l/=2),u<=i+c?(s=0,i=u):1<=i+c?(s=(t*l-1)*Math.pow(2,a),i+=c):(s=t*Math.pow(2,c-1)*Math.pow(2,a),i=0));8<=a;e[r+h]=255&s,h+=m,s/=256,a-=8);for(i=i<<a|s,p+=a;0<p;e[r+h]=255&i,h+=m,i/=256,p-=8);e[r+h-m]|=128*f}},{}],11:[function(e,t,r){"use strict";var n;function y(e,t){return e.b===t.b&&e.a===t.a}function g(e,t){return e.b<t.b||e.b===t.b&&e.a<=t.a}function v(e,t,r){var n=t.b-e.b,a=r.b-t.b;return 0<n+a?n<a?t.a-e.a+n/(n+a)*(e.a-r.a):t.a-r.a+a/(n+a)*(r.a-e.a):0}function b(e,t,r){var n=t.b-e.b,a=r.b-t.b;return 0<n+a?(t.a-r.a)*n+(t.a-e.a)*a:0}function _(e,t){return e.a<t.a||e.a===t.a&&e.b<=t.b}function x(e,t,r){var n=t.a-e.a,a=r.a-t.a;return 0<n+a?n<a?t.b-e.b+n/(n+a)*(e.b-r.b):t.b-r.b+a/(n+a)*(r.b-e.b):0}function S(e,t,r){var n=t.a-e.a,a=r.a-t.a;return 0<n+a?(t.b-r.b)*n+(t.b-e.b)*a:0}function w(e,t,r,n){return(e=e<0?0:e)<=(r=r<0?0:r)?0===r?(t+n)/2:t+e/(e+r)*(n-t):n+r/(e+r)*(t-n)}function i(e){var t=o(e.b);return a(t,e.c),a(t.b,e.c),s(t,e.a),t}function M(e,t){var r=!1,n=!1;e!==t&&(t.a!==e.a&&(n=!0,f(t.a,e.a)),t.d!==e.d&&(r=!0,l(t.d,e.d)),h(t,e),n||(a(t,e.a),e.a.c=e),r||(s(t,e.d),e.d.a=e))}function c(e){var t=e.b,r=!1;e.d!==e.b.d&&(r=!0,l(e.d,e.b.d)),e.c===e?f(e.a,null):(e.b.d.a=J(e),e.a.c=e.c,h(e,J(e)),r||s(e,e.d)),t.c===t?(f(t.a,null),l(t.d,null)):(e.d.a=J(t),t.a.c=t.c,h(t,J(t))),m(e)}function E(e){var t=o(e),r=t.b;return h(t,e.e),t.a=e.b.a,a(r,t.a),t.d=r.d=e.d,t=t.b,h(e.b,J(e.b)),h(e.b,t),e.b.a=t.a,t.b.a.c=t.b,t.b.d=e.b.d,t.f=e.f,t.b.f=e.b.f,t}function d(e,t){var r=!1,n=o(e),a=n.b;return t.d!==e.d&&(r=!0,l(t.d,e.d)),h(n,e.e),h(a,t),n.a=e.b.a,a.a=t.a,n.d=a.d=e.d,e.d.a=a,r||s(n,e.d),n}function o(e){var t=new K,r=new K,n=e.b.h;return(((r.h=n).b.h=t).h=e).b.h=r,t.b=r,((t.c=t).e=r).b=t,(r.c=r).e=t}function h(e,t){var r=e.c,n=t.c;r.b.e=t,(n.b.e=e).c=n,t.c=r}function a(e,t){var r=t.f,n=new ee(t,r);for(r.e=n,r=(t.f=n).c=e;r.a=n,(r=r.c)!==e;);}function s(e,t){var r=t.d,n=new Q(t,r);for(r.b=n,(t.d=n).a=e,n.c=t.c,r=e;r.d=n,(r=r.e)!==e;);}function m(e){var t=e.h;e=e.b.h,(t.b.h=e).b.h=t}function f(e,t){for(var r=e.c,n=r;n.a=t,(n=n.c)!==r;);r=e.f,((n=e.e).f=r).e=n}function l(e,t){for(var r=e.a,n=r;n.d=t,(n=n.e)!==r;);r=e.d,((n=e.b).d=r).b=n}function T(e){var t=0;return Math.abs(e[1])>Math.abs(e[0])&&(t=1),Math.abs(e[2])>Math.abs(e[t])&&(t=2),t}var C=4e150;function N(e,t){e.f+=t.f,e.b.f+=t.b.f}function p(e,t,r){return e=e.a,t=t.a,r=r.a,t.b.a===e?r.b.a===e?g(t.a,r.a)?b(r.b.a,t.a,r.a)<=0:0<=b(t.b.a,r.a,t.a):b(r.b.a,e,r.a)<=0:r.b.a===e?0<=b(t.b.a,e,t.a):(t=v(t.b.a,e,t.a),(e=v(r.b.a,e,r.a))<=t)}function O(e){e.a.i=null;var t=e.e;t.a.c=t.c,t.c.a=t.a,e.e=null}function u(e,t){c(e.a),e.c=!1,(e.a=t).i=e}function L(e){for(var t=e.a.a;(e=de(e)).a.a===t;);return e.c&&(u(e,t=d(ce(e).a.b,e.a.e)),e=de(e)),e}function I(e,t,r){var n=new ue;return n.a=r,n.e=W(e.f,t.e,n),r.i=n}function P(e,t){switch(e.s){case 100130:return 0!=(1&t);case 100131:return 0!==t;case 100132:return 0<t;case 100133:return t<0;case 100134:return 2<=t||t<=-2}return!1}function R(e){var t=e.a,r=t.d;r.c=e.d,r.a=t,O(e)}function D(e,t,r){for(t=(e=t).a;e!==r;){e.c=!1;var n=ce(e),a=n.a;if(a.a!==t.a){if(!n.c){R(e);break}u(n,a=d(t.c.b,a.b))}t.c!==a&&(M(J(a),a),M(t,a)),R(e),t=n.a,e=n}return t}function A(e,t,r,n,a,o){for(var i=!0;I(e,t,r.b),(r=r.c)!==n;);for(null===a&&(a=ce(t).a.b.c);(r=(n=ce(t)).a.b).a===a.a;)r.c!==a&&(M(J(r),r),M(J(a),r)),n.f=t.f-r.f,n.d=P(e,n.f),t.b=!0,!i&&B(e,t)&&(N(r,a),O(t),c(a)),i=!1,t=n,a=r;t.b=!0,o&&j(e,t)}function k(e,t,r,n,a){var o=[t.g[0],t.g[1],t.g[2]];t.d=null,t.d=e.o&&e.o(o,r,n,e.c)||null,null===t.d&&(a?e.n||(Z(e,100156),e.n=!0):t.d=r[0])}function F(e,t,r){var n=[null,null,null,null];n[0]=t.a.d,n[1]=r.a.d,k(e,t.a,n,[.5,.5,0,0],!1),M(t,r)}function U(e,t,r,n,a){var o=Math.abs(t.b-e.b)+Math.abs(t.a-e.a),i=Math.abs(r.b-e.b)+Math.abs(r.a-e.a),s=a+1;n[a]=.5*i/(o+i),n[s]=.5*o/(o+i),e.g[0]+=n[a]*t.g[0]+n[s]*r.g[0],e.g[1]+=n[a]*t.g[1]+n[s]*r.g[1],e.g[2]+=n[a]*t.g[2]+n[s]*r.g[2]}function B(e,t){var r=ce(t),n=t.a,a=r.a;if(g(n.a,a.a)){if(0<b(a.b.a,n.a,a.a))return!1;if(y(n.a,a.a)){if(n.a!==a.a){r=e.e;var o=n.a.h;if(0<=o){var i=(r=r.b).d,s=r.e,l=r.c,p=l[o];i[p]=i[r.a],(l[i[p]]=p)<=--r.a&&(p<=1?le(r,p):g(s[i[p>>1]],s[i[p]])?le(r,p):pe(r,p)),s[o]=null,l[o]=r.b,r.b=o}else for(r.c[-(o+1)]=null;0<r.a&&null===r.c[r.d[r.a-1]];)--r.a;F(e,J(a),n)}}else E(a.b),M(n,J(a)),t.b=r.b=!0}else{if(b(n.b.a,a.a,n.a)<0)return!1;de(t).b=t.b=!0,E(n.b),M(J(a),n)}return!0}function G(e,t){var r=ce(t),n=t.a,a=r.a,o=n.a,i=a.a,s=n.b.a,l=a.b.a,p=new ee;if(b(s,e.a,o),b(l,e.a,i),o===i||Math.min(o.a,s.a)>Math.max(i.a,l.a))return!1;if(g(o,i)){if(0<b(l,o,i))return!1}else if(b(s,i,o)<0)return!1;var u,c,d=s,h=o,m=l,f=i;if(g(d,h)||(u=d,d=h,h=u),g(m,f)||(u=m,m=f,f=u),g(d,m)||(u=d,d=m,m=u,u=h,h=f,f=u),g(m,h)?g(h,f)?((u=v(d,m,h))+(c=v(m,h,f))<0&&(u=-u,c=-c),p.b=w(u,m.b,c,h.b)):((u=b(d,m,h))+(c=-b(d,f,h))<0&&(u=-u,c=-c),p.b=w(u,m.b,c,f.b)):p.b=(m.b+h.b)/2,_(d,h)||(u=d,d=h,h=u),_(m,f)||(u=m,m=f,f=u),_(d,m)||(u=d,d=m,m=u,u=h,h=f,f=u),_(m,h)?_(h,f)?((u=x(d,m,h))+(c=x(m,h,f))<0&&(u=-u,c=-c),p.a=w(u,m.a,c,h.a)):((u=S(d,m,h))+(c=-S(d,f,h))<0&&(u=-u,c=-c),p.a=w(u,m.a,c,f.a)):p.a=(m.a+h.a)/2,g(p,e.a)&&(p.b=e.a.b,p.a=e.a.a),d=g(o,i)?o:i,g(d,p)&&(p.b=d.b,p.a=d.a),y(p,o)||y(p,i))return B(e,t),!1;if(!y(s,e.a)&&0<=b(s,e.a,p)||!y(l,e.a)&&b(l,e.a,p)<=0){if(l===e.a)return E(n.b),M(a.b,n),n=ce(t=L(t)).a,D(e,ce(t),r),A(e,t,J(n),n,n,!0),!0;if(s!==e.a)return 0<=b(s,e.a,p)&&(de(t).b=t.b=!0,E(n.b),n.a.b=e.a.b,n.a.a=e.a.a),b(l,e.a,p)<=0&&(t.b=r.b=!0,E(a.b),a.a.b=e.a.b,a.a.a=e.a.a),!1;for(E(a.b),M(n.e,J(a)),i=(o=r=t).a.b.a;(o=de(o)).a.b.a===i;);return o=ce(t=o).a.b.c,r.a=J(a),A(e,t,(a=D(e,r,null)).c,n.b.c,o,!0),!0}return E(n.b),E(a.b),M(J(a),n),n.a.b=p.b,n.a.a=p.a,n.a.h=re(e.e,n.a),n=n.a,a=[0,0,0,0],p=[o.d,s.d,i.d,l.d],n.g[0]=n.g[1]=n.g[2]=0,U(n,o,s,a,0),U(n,i,l,a,2),k(e,n,p,a,!0),de(t).b=t.b=r.b=!0,!1}function j(e,t){for(var r=ce(t);;){for(;r.b;)r=ce(t=r);if(!t.b&&(null===(t=de(r=t))||!t.b))break;t.b=!1;var n,a=t.a,o=r.a;if(n=a.b.a!==o.b.a)e:{var i=ce(n=t),s=n.a,l=i.a,p=void 0;if(g(s.b.a,l.b.a)){if(b(s.b.a,l.b.a,s.a)<0){n=!1;break e}de(n).b=n.b=!0,p=E(s),M(l.b,p),p.d.c=n.d}else{if(0<b(l.b.a,s.b.a,l.a)){n=!1;break e}n.b=i.b=!0,p=E(l),M(s.e,l.b),p.b.d.c=n.d}n=!0}if(n&&(r.c?(O(r),c(o),o=(r=ce(t)).a):t.c&&(O(t),c(a),a=(t=de(r)).a)),a.a!==o.a)if(a.b.a===o.b.a||t.c||r.c||a.b.a!==e.a&&o.b.a!==e.a)B(e,t);else if(G(e,t))break;a.a===o.a&&a.b.a===o.b.a&&(N(o,a),O(t),c(a),t=de(r))}}function V(e,t){for(var r=(e.a=t).c;null===r.i;)if((r=r.c)===t.c){r=e;var n=t;(i=new ue).a=n.c.b;for(var a=(l=r.f).a;null!==(a=a.a).b&&!l.c(l.b,i,a.b););var o=ce(l=a.b),i=l.a;a=o.a;if(0===b(i.b.a,n,i.a))y((i=l.a).a,n)||y(i.b.a,n)||(E(i.b),l.c&&(c(i.c),l.c=!1),M(n.c,i),V(r,n));else{var s=g(a.b.a,i.b.a)?l:o;o=void 0;l.d||s.c?(o=s===l?d(n.c.b,i.e):d(a.b.c.b,n.c).b,s.c?u(s,o):((l=I(i=r,l,o)).f=de(l).f+l.a.f,l.d=P(i,l.f)),V(r,n)):A(r,l,n.c,n.c,null,!0)}return}if(l=(i=ce(r=L(r.i))).a,(i=D(e,i,null)).c===l){i=(l=i).c,a=ce(r),o=r.a,s=a.a;var l,p=!1;o.b.a!==s.b.a&&G(e,r),y(o.a,e.a)&&(M(J(i),o),i=ce(r=L(r)).a,D(e,ce(r),a),p=!0),y(s.a,e.a)&&(M(l,J(s)),l=D(e,a,null),p=!0),p?A(e,r,l.c,i,i,!0):(n=g(s.a,o.a)?J(s):o,A(e,r,n=d(l.c.b,n),n.c,n.c,!1),n.b.i.c=!0,j(e,r))}else A(e,r,i.c,l,l,!0)}function z(e,t){var r=new ue,n=i(e.b);n.a.b=C,n.a.a=t,n.b.a.b=-C,n.b.a.a=t,e.a=n.b.a,r.a=n,r.f=0,r.d=!1,r.c=!1,r.h=!0,r.b=!1,n=W(n=e.f,n.a,r),r.e=n}function H(e){this.a=new X,this.b=e,this.c=p}function W(e,t,r){for(;null!==(t=t.c).b&&!e.c(e.b,t.b,r););return e=new X(r,t.a,t),t.a.c=e,t.a=e}function X(e,t,r){this.b=e||null,this.a=t||this,this.c=r||this}function q(){this.d=0,this.p=this.b=this.q=null,this.j=[0,0,0],this.s=100130,this.n=!1,this.o=this.a=this.e=this.f=null,this.m=!1,this.c=this.r=this.i=this.k=this.l=this.h=null}function Y(e,t){if(e.d!==t)for(;e.d!==t;)if(e.d<t)switch(e.d){case 0:Z(e,100151),e.u(null);break;case 1:Z(e,100152),e.t()}else switch(e.d){case 2:Z(e,100154),e.v();break;case 1:Z(e,100153),e.w()}}function Z(e,t){e.p&&e.p(t,e.c)}function Q(e,t){this.b=e||this,this.d=t||this,this.a=null,this.c=!1}function K(){(this.h=this).i=this.d=this.a=this.e=this.c=this.b=null,this.f=0}function J(e){return e.b.e}function $(){this.c=new ee,this.a=new Q,this.b=new K,this.d=new K,this.b.b=this.d,this.d.b=this.b}function ee(e,t){this.e=e||this,this.f=t||this,this.d=this.c=null,this.g=[0,0,0],this.h=this.a=this.b=0}function te(){this.c=[],this.d=null,this.a=0,this.e=!1,this.b=new ae}function re(e,t){if(e.e){var r,n=e.b,a=++n.a;return 2*a>n.f&&(n.f*=2,n.c=oe(n.c,n.f+1)),0===n.b?r=a:(r=n.b,n.b=n.c[n.b]),n.e[r]=t,n.c[r]=a,n.d[a]=r,n.h&&pe(n,a),r}return n=e.a++,e.c[n]=t,-(n+1)}function ne(e){if(0===e.a)return se(e.b);var t=e.c[e.d[e.a-1]];if(0!==e.b.a&&g(ie(e.b),t))return se(e.b);for(;--e.a,0<e.a&&null===e.c[e.d[e.a-1]];);return t}function ae(){this.d=oe([0],33),this.e=[null,null],this.c=[0,0],this.a=0,this.f=32,this.b=0,this.h=!1,this.d[1]=1}function oe(e,t){for(var r=Array(t),n=0;n<e.length;n++)r[n]=e[n];for(;n<t;n++)r[n]=0;return r}function ie(e){return e.e[e.d[1]]}function se(e){var t=e.d,r=e.e,n=e.c,a=t[1],o=r[a];return 0<e.a&&(t[1]=t[e.a],n[t[1]]=1,r[a]=null,n[a]=e.b,e.b=a,0<--e.a&&le(e,1)),o}function le(e,t){for(var r=e.d,n=e.e,a=e.c,o=t,i=r[o];;){var s=o<<1;s<e.a&&g(n[r[s+1]],n[r[s]])&&(s+=1);var l=r[s];if(s>e.a||g(n[i],n[l])){a[r[o]=i]=o;break}a[r[o]=l]=o,o=s}}function pe(e,t){for(var r=e.d,n=e.e,a=e.c,o=t,i=r[o];;){var s=o>>1,l=r[s];if(0==s||g(n[l],n[i])){a[r[o]=i]=o;break}a[r[o]=l]=o,o=s}}function ue(){this.e=this.a=null,this.f=0,this.c=this.b=this.h=this.d=!1}function ce(e){return e.e.c.b}function de(e){return e.e.a.b}(n=q.prototype).x=function(){Y(this,0)},n.B=function(e,t){switch(e){case 100142:return;case 100140:switch(t){case 100130:case 100131:case 100132:case 100133:case 100134:return void(this.s=t)}break;case 100141:return void(this.m=!!t);default:return void Z(this,100900)}Z(this,100901)},n.y=function(e){switch(e){case 100142:return 0;case 100140:return this.s;case 100141:return this.m;default:Z(this,100900)}return!1},n.A=function(e,t,r){this.j[0]=e,this.j[1]=t,this.j[2]=r},n.z=function(e,t){var r=t||null;switch(e){case 100100:case 100106:this.h=r;break;case 100104:case 100110:this.l=r;break;case 100101:case 100107:this.k=r;break;case 100102:case 100108:this.i=r;break;case 100103:case 100109:this.p=r;break;case 100105:case 100111:this.o=r;break;case 100112:this.r=r;break;default:Z(this,100900)}},n.C=function(e,t){var r=!1,n=[0,0,0];Y(this,2);for(var a=0;a<3;++a){var o=e[a];o<-1e150&&(o=-1e150,r=!0),1e150<o&&(o=1e150,r=!0),n[a]=o}r&&Z(this,100155),null===(r=this.q)?M(r=i(this.b),r.b):(E(r),r=r.e),r.a.d=t,r.a.g[0]=n[0],r.a.g[1]=n[1],r.a.g[2]=n[2],r.f=1,r.b.f=-1,this.q=r},n.u=function(e){Y(this,0),this.d=1,this.b=new $,this.c=e},n.t=function(){Y(this,1),this.d=2,this.q=null},n.v=function(){Y(this,2),this.d=1},n.w=function(){Y(this,1),this.d=0;var e,t,r=!1,n=[l=this.j[0],a=this.j[1],i=this.j[2]];if(0===l&&0===a&&0===i){for(var a=[-2e150,-2e150,-2e150],o=[2e150,2e150,2e150],i=[],s=[],l=(r=this.b.c).e;l!==r;l=l.e)for(var p=0;p<3;++p){var u=l.g[p];u<o[p]&&(o[p]=u,s[p]=l),u>a[p]&&(a[p]=u,i[p]=l)}if(l=0,a[1]-o[1]>a[0]-o[0]&&(l=1),a[2]-o[2]>a[l]-o[l]&&(l=2),o[l]>=a[l])n[0]=0,n[1]=0,n[2]=1;else{for(a=0,o=s[l],i=i[l],s=[0,0,0],o=[o.g[0]-i.g[0],o.g[1]-i.g[1],o.g[2]-i.g[2]],p=[0,0,0],l=r.e;l!==r;l=l.e)p[0]=l.g[0]-i.g[0],p[1]=l.g[1]-i.g[1],p[2]=l.g[2]-i.g[2],s[0]=o[1]*p[2]-o[2]*p[1],s[1]=o[2]*p[0]-o[0]*p[2],s[2]=o[0]*p[1]-o[1]*p[0],a<(u=s[0]*s[0]+s[1]*s[1]+s[2]*s[2])&&(a=u,n[0]=s[0],n[1]=s[1],n[2]=s[2]);a<=0&&(n[0]=n[1]=n[2]=0,n[T(o)]=1)}r=!0}for(s=T(n),l=this.b.c,a=(s+1)%3,i=(s+2)%3,s=0<n[s]?1:-1,n=l.e;n!==l;n=n.e)n.b=n.g[a],n.a=s*n.g[i];if(r){for(n=0,l=(r=this.b.a).b;l!==r;l=l.b)if(!((a=l.a).f<=0))for(;n+=(a.a.b-a.b.a.b)*(a.a.a+a.b.a.a),(a=a.e)!==l.a;);if(n<0)for(r=(n=this.b.c).e;r!==n;r=r.e)r.a=-r.a}for(this.n=!1,l=(n=this.b.b).h;l!==n;l=r)r=l.h,a=l.e,y(l.a,l.b.a)&&l.e.e!==l&&(F(this,a,l),c(l),a=(l=a).e),a.e===l&&(a!==l&&(a!==r&&a!==r.b||(r=r.h),c(a)),l!==r&&l!==r.b||(r=r.h),c(l));for(this.e=n=new te,l=(r=this.b.c).e;l!==r;l=l.e)l.h=re(n,l);for(!function(e){e.d=[];for(var t=0;t<e.a;t++)e.d[t]=t;e.d.sort(function(r){return function(e,t){return g(r[e],r[t])?1:-1}}(e.c)),e.e=!0,function(e){for(var t=e.a;1<=t;--t)le(e,t);e.h=!0}(e.b)}(n),this.f=new H(this),z(this,-C),z(this,C);null!==(n=ne(this.e));){for(;;){e:if(l=this.e,0===l.a)r=ie(l.b);else if(r=l.c[l.d[l.a-1]],0!==l.b.a&&(l=ie(l.b),g(l,r))){r=l;break e}if(null===r||!y(r,n))break;r=ne(this.e),F(this,n.c,r.c)}V(this,n)}for(this.a=this.f.a.a.b.a.a,n=0;null!==(r=this.f.a.a.b);)r.h||++n,O(r);for(this.f=null,(n=this.e).b=null,n.d=null,this.e=n.c=null,l=(n=this.b).a.b;l!==n.a;l=r)r=l.b,(l=l.a).e.e===l&&(N(l.c,l),c(l));if(!this.n){if(n=this.b,this.m)for(l=n.b.h;l!==n.b;l=r)r=l.h,l.b.d.c!==l.d.c?l.f=l.d.c?1:-1:c(l);else for(l=n.a.b;l!==n.a;l=r)if(r=l.b,l.c){for(l=l.a;g(l.b.a,l.a);l=l.c.b);for(;g(l.a,l.b.a);l=l.e);for(a=l.c.b,i=void 0;l.e!==a;)if(g(l.b.a,a.a)){for(;a.e!==l&&(g((t=a.e).b.a,t.a)||b(a.a,a.b.a,a.e.b.a)<=0);)a=(i=d(a.e,a)).b;a=a.c.b}else{for(;a.e!==l&&(g((e=l.c.b).a,e.b.a)||0<=b(l.b.a,l.a,l.c.b.a));)l=(i=d(l,l.c.b)).b;l=l.e}for(;a.e.e!==l;)a=(i=d(a.e,a)).b}if(this.h||this.i||this.k||this.l)if(this.m){for(r=(n=this.b).a.b;r!==n.a;r=r.b)if(r.c){for(this.h&&this.h(2,this.c),l=r.a;this.k&&this.k(l.a.d,this.c),(l=l.e)!==r.a;);this.i&&this.i(this.c)}}else{for(n=this.b,r=!!this.l,l=!1,a=-1,i=n.a.d;i!==n.a;i=i.d)if(i.c)for(l||(this.h&&this.h(4,this.c),l=!0),s=i.a;r&&(a!==(o=s.b.d.c?0:1)&&(a=o,this.l&&this.l(!!a,this.c))),this.k&&this.k(s.a.d,this.c),(s=s.e)!==i.a;);l&&this.i&&this.i(this.c)}if(this.r){for(l=(n=this.b).a.b;l!==n.a;l=r)if(r=l.b,!l.c){for(i=(a=l.a).e,s=void 0;i=(s=i).e,(s.d=null)===s.b.d&&(s.c===s?f(s.a,null):(s.a.c=s.c,h(s,J(s))),(o=s.b).c===o?f(o.a,null):(o.a.c=o.c,h(o,J(o))),m(s)),s!==a;);a=l.d,((l=l.b).d=a).b=l}return this.r(this.b),void(this.c=this.b=null)}}this.b=this.c=null},this.libtess={GluTesselator:q,windingRule:{GLU_TESS_WINDING_ODD:100130,GLU_TESS_WINDING_NONZERO:100131,GLU_TESS_WINDING_POSITIVE:100132,GLU_TESS_WINDING_NEGATIVE:100133,GLU_TESS_WINDING_ABS_GEQ_TWO:100134},primitiveType:{GL_LINE_LOOP:2,GL_TRIANGLES:4,GL_TRIANGLE_STRIP:5,GL_TRIANGLE_FAN:6},errorType:{GLU_TESS_MISSING_BEGIN_POLYGON:100151,GLU_TESS_MISSING_END_POLYGON:100153,GLU_TESS_MISSING_BEGIN_CONTOUR:100152,GLU_TESS_MISSING_END_CONTOUR:100154,GLU_TESS_COORD_TOO_LARGE:100155,GLU_TESS_NEED_COMBINE_CALLBACK:100156},gluEnum:{GLU_TESS_MESH:100112,GLU_TESS_TOLERANCE:100142,GLU_TESS_WINDING_RULE:100140,GLU_TESS_BOUNDARY_ONLY:100141,GLU_INVALID_ENUM:100900,GLU_INVALID_VALUE:100901,GLU_TESS_BEGIN:100100,GLU_TESS_VERTEX:100101,GLU_TESS_END:100102,GLU_TESS_ERROR:100103,GLU_TESS_EDGE_FLAG:100104,GLU_TESS_COMBINE:100105,GLU_TESS_BEGIN_DATA:100106,GLU_TESS_VERTEX_DATA:100107,GLU_TESS_END_DATA:100108,GLU_TESS_ERROR_DATA:100109,GLU_TESS_EDGE_FLAG_DATA:100110,GLU_TESS_COMBINE_DATA:100111}},q.prototype.gluDeleteTess=q.prototype.x,q.prototype.gluTessProperty=q.prototype.B,q.prototype.gluGetTessProperty=q.prototype.y,q.prototype.gluTessNormal=q.prototype.A,q.prototype.gluTessCallback=q.prototype.z,q.prototype.gluTessVertex=q.prototype.C,q.prototype.gluTessBeginPolygon=q.prototype.u,q.prototype.gluTessBeginContour=q.prototype.t,q.prototype.gluTessEndContour=q.prototype.v,q.prototype.gluTessEndPolygon=q.prototype.w,void 0!==t&&(t.exports=this.libtess)},{}],12:[function(e,t,r){"use strict";function N(e,t,r,n){for(var a=e[t++],o=1<<a,i=1+o,s=1+i,l=a+1,p=(1<<l)-1,u=0,c=0,d=0,h=e[t++],m=new Int32Array(4096),f=null;;){for(;u<16&&0!==h;)c|=e[t++]<<u,u+=8,1===h?h=e[t++]:--h;if(u<l)break;var y=c&p;if(c>>=l,u-=l,y!=o){if(y==i)break;for(var g=y<s?y:f,v=0,b=g;o<b;)b=m[b]>>8,++v;var _=b;if(n<d+v+(g!==y?1:0))return void console.log("Warning, gif stream longer than expected.");r[d++]=_;var x=d+=v;for(g!==y&&(r[d++]=_),b=g;v--;)b=m[b],r[--x]=255&b,b>>=8;null!==f&&s<4096&&(m[s++]=f<<8|_,p+1<=s&&l<12&&(++l,p=p<<1|1)),f=y}else s=1+i,p=(1<<(l=a+1))-1,f=null}return d!==n&&console.log("Warning, gif stream shorter than expected."),r}try{r.GifWriter=function(g,e,t,r){var v=0,n=void 0===(r=void 0===r?{}:r).loop?null:r.loop,b=void 0===r.palette?null:r.palette;if(e<=0||t<=0||65535<e||65535<t)throw new Error("Width/Height invalid.");function _(e){var t=e.length;if(t<2||256<t||t&t-1)throw new Error("Invalid code/color length, must be power of 2 and 2 .. 256.");return t}g[v++]=71,g[v++]=73,g[v++]=70,g[v++]=56,g[v++]=57,g[v++]=97;var a=0,o=0;if(null!==b){for(var i=_(b);i>>=1;)++a;if(i=1<<a,--a,void 0!==r.background){if(i<=(o=r.background))throw new Error("Background index out of range.");if(0===o)throw new Error("Background index explicitly passed as 0.")}}if(g[v++]=255&e,g[v++]=e>>8&255,g[v++]=255&t,g[v++]=t>>8&255,g[v++]=(null!==b?128:0)|a,g[v++]=o,g[v++]=0,null!==b)for(var s=0,l=b.length;s<l;++s){var p=b[s];g[v++]=p>>16&255,g[v++]=p>>8&255,g[v++]=255&p}if(null!==n){if(n<0||65535<n)throw new Error("Loop count invalid.");g[v++]=33,g[v++]=255,g[v++]=11,g[v++]=78,g[v++]=69,g[v++]=84,g[v++]=83,g[v++]=67,g[v++]=65,g[v++]=80,g[v++]=69,g[v++]=50,g[v++]=46,g[v++]=48,g[v++]=3,g[v++]=1,g[v++]=255&n,g[v++]=n>>8&255,g[v++]=0}var x=!1;this.addFrame=function(e,t,r,n,a,o){if(!0===x&&(--v,x=!1),o=void 0===o?{}:o,e<0||t<0||65535<e||65535<t)throw new Error("x/y invalid.");if(r<=0||n<=0||65535<r||65535<n)throw new Error("Width/Height invalid.");if(a.length<r*n)throw new Error("Not enough pixels for the frame size.");var i=!0,s=o.palette;if(null==s&&(i=!1,s=b),null==s)throw new Error("Must supply either a local or global palette.");for(var l=_(s),p=0;l>>=1;)++p;l=1<<p;var u=void 0===o.delay?0:o.delay,c=void 0===o.disposal?0:o.disposal;if(c<0||3<c)throw new Error("Disposal out of range.");var d=!1,h=0;if(void 0!==o.transparent&&null!==o.transparent&&(d=!0,(h=o.transparent)<0||l<=h))throw new Error("Transparent color index.");if(0===c&&!d&&0===u||(g[v++]=33,g[v++]=249,g[v++]=4,g[v++]=c<<2|(!0===d?1:0),g[v++]=255&u,g[v++]=u>>8&255,g[v++]=h,g[v++]=0),g[v++]=44,g[v++]=255&e,g[v++]=e>>8&255,g[v++]=255&t,g[v++]=t>>8&255,g[v++]=255&r,g[v++]=r>>8&255,g[v++]=255&n,g[v++]=n>>8&255,g[v++]=!0===i?128|p-1:0,!0===i)for(var m=0,f=s.length;m<f;++m){var y=s[m];g[v++]=y>>16&255,g[v++]=y>>8&255,g[v++]=255&y}return v=function(t,r,e,n){t[r++]=e;var a=r++,o=1<<e,i=o-1,s=1+o,l=1+s,p=e+1,u=0,c=0;function d(e){for(;e<=u;)t[r++]=255&c,c>>=8,u-=8,r===a+256&&(t[a]=255,a=r++)}function h(e){c|=e<<u,u+=p,d(8)}var m=n[0]&i,f={};h(o);for(var y=1,g=n.length;y<g;++y){var v=n[y]&i,b=m<<8|v,_=f[b];if(void 0===_){for(c|=m<<u,u+=p;8<=u;)t[r++]=255&c,c>>=8,u-=8,r===a+256&&(t[a]=255,a=r++);4096===l?(h(o),l=1+s,p=e+1,f={}):(1<<p<=l&&++p,f[b]=l++),m=v}else m=_}h(m),h(s),d(1),a+1===r?t[a]=0:(t[a]=r-a-1,t[r++]=0);return r}(g,v,p<2?2:p,a)},this.end=function(){return!1===x&&(g[v++]=59,x=!0),v},this.getOutputBuffer=function(){return g},this.setOutputBuffer=function(e){g=e},this.getOutputBufferPosition=function(){return v},this.setOutputBufferPosition=function(e){v=e}},r.GifReader=function(x){var e=0;if(71!==x[e++]||73!==x[e++]||70!==x[e++]||56!==x[e++]||56!=(x[e++]+1&253)||97!==x[e++])throw new Error("Invalid GIF 87a/89a header.");var S=x[e++]|x[e++]<<8,t=x[e++]|x[e++]<<8,r=x[e++],n=r>>7,a=1<<1+(7&r);x[e++],x[e++];var o=null,i=null;n&&(o=e,e+=3*(i=a));var s=!0,l=[],p=0,u=null,c=0,d=null;for(this.width=S,this.height=t;s&&e<x.length;)switch(x[e++]){case 33:switch(x[e++]){case 255:if(11!==x[e]||78==x[e+1]&&69==x[e+2]&&84==x[e+3]&&83==x[e+4]&&67==x[e+5]&&65==x[e+6]&&80==x[e+7]&&69==x[e+8]&&50==x[e+9]&&46==x[e+10]&&48==x[e+11]&&3==x[e+12]&&1==x[e+13]&&0==x[e+16])e+=14,d=x[e++]|x[e++]<<8,e++;else for(e+=12;;){if(!(0<=(C=x[e++])))throw Error("Invalid block size");if(0===C)break;e+=C}break;case 249:if(4!==x[e++]||0!==x[e+4])throw new Error("Invalid graphics extension block.");var h=x[e++];p=x[e++]|x[e++]<<8,u=x[e++],0==(1&h)&&(u=null),c=h>>2&7,e++;break;case 254:for(;;){if(!(0<=(C=x[e++])))throw Error("Invalid block size");if(0===C)break;e+=C}break;default:throw new Error("Unknown graphic control label: 0x"+x[e-1].toString(16))}break;case 44:var m=x[e++]|x[e++]<<8,f=x[e++]|x[e++]<<8,y=x[e++]|x[e++]<<8,g=x[e++]|x[e++]<<8,v=x[e++],b=v>>6&1,_=1<<1+(7&v),w=o,M=i,E=!1;if(v>>7){E=!0;w=e,e+=3*(M=_)}var T=e;for(e++;;){var C;if(!(0<=(C=x[e++])))throw Error("Invalid block size");if(0===C)break;e+=C}l.push({x:m,y:f,width:y,height:g,has_local_palette:E,palette_offset:w,palette_size:M,data_offset:T,data_length:e-T,transparent_index:u,interlaced:!!b,delay:p,disposal:c});break;case 59:s=!1;break;default:throw new Error("Unknown gif block: 0x"+x[e-1].toString(16))}this.numFrames=function(){return l.length},this.loopCount=function(){return d},this.frameInfo=function(e){if(e<0||e>=l.length)throw new Error("Frame index out of range.");return l[e]},this.decodeAndBlitFrameBGRA=function(e,t){var r=this.frameInfo(e),n=r.width*r.height,a=new Uint8Array(n);N(x,r.data_offset,a,n);var o=r.palette_offset,i=r.transparent_index;null===i&&(i=256);var s=r.width,l=S-s,p=s,u=4*(r.y*S+r.x),c=4*((r.y+r.height)*S+r.x),d=u,h=4*l;!0===r.interlaced&&(h+=4*S*7);for(var m=8,f=0,y=a.length;f<y;++f){var g=a[f];if(0===p&&(p=s,c<=(d+=h)&&(h=4*l+4*S*(m-1),d=u+(s+l)*(m<<1),m>>=1)),g===i)d+=4;else{var v=x[o+3*g],b=x[o+3*g+1],_=x[o+3*g+2];t[d++]=_,t[d++]=b,t[d++]=v,t[d++]=255}--p}},this.decodeAndBlitFrameRGBA=function(e,t){var r=this.frameInfo(e),n=r.width*r.height,a=new Uint8Array(n);N(x,r.data_offset,a,n);var o=r.palette_offset,i=r.transparent_index;null===i&&(i=256);var s=r.width,l=S-s,p=s,u=4*(r.y*S+r.x),c=4*((r.y+r.height)*S+r.x),d=u,h=4*l;!0===r.interlaced&&(h+=4*S*7);for(var m=8,f=0,y=a.length;f<y;++f){var g=a[f];if(0===p&&(p=s,c<=(d+=h)&&(h=4*l+4*S*(m-1),d=u+(s+l)*(m<<1),m>>=1)),g===i)d+=4;else{var v=x[o+3*g],b=x[o+3*g+1],_=x[o+3*g+2];t[d++]=v,t[d++]=b,t[d++]=_,t[d++]=255}--p}}}}catch(e){}},{}],13:[function(jr,t,r){(function(Gr){var e;e=this,function(E){"use strict";function e(e){if(null==this)throw TypeError();var t=String(this),r=t.length,n=e?Number(e):0;if(n!=n&&(n=0),!(n<0||r<=n)){var a,o=t.charCodeAt(n);return 55296<=o&&o<=56319&&n+1<r&&56320<=(a=t.charCodeAt(n+1))&&a<=57343?1024*(o-55296)+a-56320+65536:o}}var t;String.prototype.codePointAt||((t=function(){try{var e={},t=Object.defineProperty,r=t(e,e,e)&&t}catch(e){}return r}())?t(String.prototype,"codePointAt",{value:e,configurable:!0,writable:!0}):String.prototype.codePointAt=e);var l=0,o=-3;function r(){this.table=new Uint16Array(16),this.trans=new Uint16Array(288)}function i(e,t){this.source=e,this.sourceIndex=0,this.tag=0,this.bitcount=0,this.dest=t,this.destLen=0,this.ltree=new r,this.dtree=new r}var s=new r,p=new r,u=new Uint8Array(30),c=new Uint16Array(30),d=new Uint8Array(30),h=new Uint16Array(30),m=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),f=new r,y=new Uint8Array(320);function n(e,t,r,n){var a,o;for(a=0;a<r;++a)e[a]=0;for(a=0;a<30-r;++a)e[a+r]=a/r|0;for(o=n,a=0;a<30;++a)t[a]=o,o+=1<<e[a]}var g=new Uint16Array(16);function v(e,t,r,n){var a,o;for(a=0;a<16;++a)e.table[a]=0;for(a=0;a<n;++a)e.table[t[r+a]]++;for(a=o=e.table[0]=0;a<16;++a)g[a]=o,o+=e.table[a];for(a=0;a<n;++a)t[r+a]&&(e.trans[g[t[r+a]]++]=a)}function b(e){e.bitcount--||(e.tag=e.source[e.sourceIndex++],e.bitcount=7);var t=1&e.tag;return e.tag>>>=1,t}function _(e,t,r){if(!t)return r;for(;e.bitcount<24;)e.tag|=e.source[e.sourceIndex++]<<e.bitcount,e.bitcount+=8;var n=e.tag&65535>>>16-t;return e.tag>>>=t,e.bitcount-=t,n+r}function x(e,t){for(;e.bitcount<24;)e.tag|=e.source[e.sourceIndex++]<<e.bitcount,e.bitcount+=8;for(var r=0,n=0,a=0,o=e.tag;n=2*n+(1&o),o>>>=1,++a,r+=t.table[a],0<=(n-=t.table[a]););return e.tag=o,e.bitcount-=a,t.trans[r+n]}function S(e,t,r){var n,a,o,i,s,l;for(n=_(e,5,257),a=_(e,5,1),o=_(e,4,4),i=0;i<19;++i)y[i]=0;for(i=0;i<o;++i){var p=_(e,3,0);y[m[i]]=p}for(v(f,y,0,19),s=0;s<n+a;){var u=x(e,f);switch(u){case 16:var c=y[s-1];for(l=_(e,2,3);l;--l)y[s++]=c;break;case 17:for(l=_(e,3,3);l;--l)y[s++]=0;break;case 18:for(l=_(e,7,11);l;--l)y[s++]=0;break;default:y[s++]=u}}v(t,y,0,n),v(r,y,n,a)}function w(e,t,r){for(;;){var n,a,o,i,s=x(e,t);if(256===s)return l;if(s<256)e.dest[e.destLen++]=s;else for(n=_(e,u[s-=257],c[s]),a=x(e,r),i=o=e.destLen-_(e,d[a],h[a]);i<o+n;++i)e.dest[e.destLen++]=e.dest[i]}}function M(e){for(var t,r;8<e.bitcount;)e.sourceIndex--,e.bitcount-=8;if((t=256*(t=e.source[e.sourceIndex+1])+e.source[e.sourceIndex])!==(65535&~(256*e.source[e.sourceIndex+3]+e.source[e.sourceIndex+2])))return o;for(e.sourceIndex+=4,r=t;r;--r)e.dest[e.destLen++]=e.source[e.sourceIndex++];return e.bitcount=0,l}!function(e,t){var r;for(r=0;r<7;++r)e.table[r]=0;for(e.table[7]=24,e.table[8]=152,e.table[9]=112,r=0;r<24;++r)e.trans[r]=256+r;for(r=0;r<144;++r)e.trans[24+r]=r;for(r=0;r<8;++r)e.trans[168+r]=280+r;for(r=0;r<112;++r)e.trans[176+r]=144+r;for(r=0;r<5;++r)t.table[r]=0;for(t.table[5]=32,r=0;r<32;++r)t.trans[r]=r}(s,p),n(u,c,4,3),n(d,h,2,1),u[28]=0,c[28]=258;var a=function(e,t){var r,n,a=new i(e,t);do{switch(r=b(a),_(a,2,0)){case 0:n=M(a);break;case 1:n=w(a,s,p);break;case 2:S(a,a.ltree,a.dtree),n=w(a,a.ltree,a.dtree);break;default:n=o}if(n!==l)throw new Error("Data error")}while(!r);return a.destLen<a.dest.length?"function"==typeof a.dest.slice?a.dest.slice(0,a.destLen):a.dest.subarray(0,a.destLen):a.dest};function T(e,t,r,n,a){return Math.pow(1-a,3)*e+3*Math.pow(1-a,2)*a*t+3*(1-a)*Math.pow(a,2)*r+Math.pow(a,3)*n}function C(){this.x1=Number.NaN,this.y1=Number.NaN,this.x2=Number.NaN,this.y2=Number.NaN}function A(){this.commands=[],this.fill="black",this.stroke=null,this.strokeWidth=1}function N(e){throw new Error(e)}function O(e,t){e||N(t)}C.prototype.isEmpty=function(){return isNaN(this.x1)||isNaN(this.y1)||isNaN(this.x2)||isNaN(this.y2)},C.prototype.addPoint=function(e,t){"number"==typeof e&&((isNaN(this.x1)||isNaN(this.x2))&&(this.x1=e,this.x2=e),e<this.x1&&(this.x1=e),e>this.x2&&(this.x2=e)),"number"==typeof t&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=t,this.y2=t),t<this.y1&&(this.y1=t),t>this.y2&&(this.y2=t))},C.prototype.addX=function(e){this.addPoint(e,null)},C.prototype.addY=function(e){this.addPoint(null,e)},C.prototype.addBezier=function(e,t,r,n,a,o,i,s){var l=this,p=[e,t],u=[r,n],c=[a,o],d=[i,s];this.addPoint(e,t),this.addPoint(i,s);for(var h=0;h<=1;h++){var m=6*p[h]-12*u[h]+6*c[h],f=-3*p[h]+9*u[h]-9*c[h]+3*d[h],y=3*u[h]-3*p[h];if(0!=f){var g=Math.pow(m,2)-4*y*f;if(!(g<0)){var v=(-m+Math.sqrt(g))/(2*f);0<v&&v<1&&(0===h&&l.addX(T(p[h],u[h],c[h],d[h],v)),1===h&&l.addY(T(p[h],u[h],c[h],d[h],v)));var b=(-m-Math.sqrt(g))/(2*f);0<b&&b<1&&(0===h&&l.addX(T(p[h],u[h],c[h],d[h],b)),1===h&&l.addY(T(p[h],u[h],c[h],d[h],b)))}}else{if(0==m)continue;var _=-y/m;0<_&&_<1&&(0===h&&l.addX(T(p[h],u[h],c[h],d[h],_)),1===h&&l.addY(T(p[h],u[h],c[h],d[h],_)))}}},C.prototype.addQuad=function(e,t,r,n,a,o){var i=e+2/3*(r-e),s=t+2/3*(n-t),l=i+1/3*(a-e),p=s+1/3*(o-t);this.addBezier(e,t,i,s,l,p,a,o)},A.prototype.moveTo=function(e,t){this.commands.push({type:"M",x:e,y:t})},A.prototype.lineTo=function(e,t){this.commands.push({type:"L",x:e,y:t})},A.prototype.curveTo=A.prototype.bezierCurveTo=function(e,t,r,n,a,o){this.commands.push({type:"C",x1:e,y1:t,x2:r,y2:n,x:a,y:o})},A.prototype.quadTo=A.prototype.quadraticCurveTo=function(e,t,r,n){this.commands.push({type:"Q",x1:e,y1:t,x:r,y:n})},A.prototype.close=A.prototype.closePath=function(){this.commands.push({type:"Z"})},A.prototype.extend=function(e){if(e.commands)e=e.commands;else if(e instanceof C){var t=e;return this.moveTo(t.x1,t.y1),this.lineTo(t.x2,t.y1),this.lineTo(t.x2,t.y2),this.lineTo(t.x1,t.y2),void this.close()}Array.prototype.push.apply(this.commands,e)},A.prototype.getBoundingBox=function(){for(var e=new C,t=0,r=0,n=0,a=0,o=0;o<this.commands.length;o++){var i=this.commands[o];switch(i.type){case"M":e.addPoint(i.x,i.y),t=n=i.x,r=a=i.y;break;case"L":e.addPoint(i.x,i.y),n=i.x,a=i.y;break;case"Q":e.addQuad(n,a,i.x1,i.y1,i.x,i.y),n=i.x,a=i.y;break;case"C":e.addBezier(n,a,i.x1,i.y1,i.x2,i.y2,i.x,i.y),n=i.x,a=i.y;break;case"Z":n=t,a=r;break;default:throw new Error("Unexpected path command "+i.type)}}return e.isEmpty()&&e.addPoint(0,0),e},A.prototype.draw=function(e){e.beginPath();for(var t=0;t<this.commands.length;t+=1){var r=this.commands[t];"M"===r.type?e.moveTo(r.x,r.y):"L"===r.type?e.lineTo(r.x,r.y):"C"===r.type?e.bezierCurveTo(r.x1,r.y1,r.x2,r.y2,r.x,r.y):"Q"===r.type?e.quadraticCurveTo(r.x1,r.y1,r.x,r.y):"Z"===r.type&&e.closePath()}this.fill&&(e.fillStyle=this.fill,e.fill()),this.stroke&&(e.strokeStyle=this.stroke,e.lineWidth=this.strokeWidth,e.stroke())},A.prototype.toPathData=function(o){function e(){for(var e,t=arguments,r="",n=0;n<arguments.length;n+=1){var a=t[n];0<=a&&0<n&&(r+=" "),r+=(e=a,Math.round(e)===e?""+Math.round(e):e.toFixed(o))}return r}o=void 0!==o?o:2;for(var t="",r=0;r<this.commands.length;r+=1){var n=this.commands[r];"M"===n.type?t+="M"+e(n.x,n.y):"L"===n.type?t+="L"+e(n.x,n.y):"C"===n.type?t+="C"+e(n.x1,n.y1,n.x2,n.y2,n.x,n.y):"Q"===n.type?t+="Q"+e(n.x1,n.y1,n.x,n.y):"Z"===n.type&&(t+="Z")}return t},A.prototype.toSVG=function(e){var t='<path d="';return t+=this.toPathData(e),t+='"',this.fill&&"black"!==this.fill&&(null===this.fill?t+=' fill="none"':t+=' fill="'+this.fill+'"'),this.stroke&&(t+=' stroke="'+this.stroke+'" stroke-width="'+this.strokeWidth+'"'),t+="/>"},A.prototype.toDOMElement=function(e){var t=this.toPathData(e),r=document.createElementNS("http://www.w3.org/2000/svg","path");return r.setAttribute("d",t),r};var L={fail:N,argument:O,assert:O},I=2147483648,P={},R={},D={};function k(e){return function(){return e}}R.BYTE=function(e){return L.argument(0<=e&&e<=255,"Byte value should be between 0 and 255."),[e]},D.BYTE=k(1),R.CHAR=function(e){return[e.charCodeAt(0)]},D.CHAR=k(1),R.CHARARRAY=function(e){for(var t=[],r=0;r<e.length;r+=1)t[r]=e.charCodeAt(r);return t},D.CHARARRAY=function(e){return e.length},R.USHORT=function(e){return[e>>8&255,255&e]},D.USHORT=k(2),R.SHORT=function(e){return 32768<=e&&(e=-(65536-e)),[e>>8&255,255&e]},D.SHORT=k(2),R.UINT24=function(e){return[e>>16&255,e>>8&255,255&e]},D.UINT24=k(3),R.ULONG=function(e){return[e>>24&255,e>>16&255,e>>8&255,255&e]},D.ULONG=k(4),R.LONG=function(e){return I<=e&&(e=-(2*I-e)),[e>>24&255,e>>16&255,e>>8&255,255&e]},D.LONG=k(4),R.FIXED=R.ULONG,D.FIXED=D.ULONG,R.FWORD=R.SHORT,D.FWORD=D.SHORT,R.UFWORD=R.USHORT,D.UFWORD=D.USHORT,R.LONGDATETIME=function(e){return[0,0,0,0,e>>24&255,e>>16&255,e>>8&255,255&e]},D.LONGDATETIME=k(8),R.TAG=function(e){return L.argument(4===e.length,"Tag should be exactly 4 ASCII characters."),[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]},D.TAG=k(4),R.Card8=R.BYTE,D.Card8=D.BYTE,R.Card16=R.USHORT,D.Card16=D.USHORT,R.OffSize=R.BYTE,D.OffSize=D.BYTE,R.SID=R.USHORT,D.SID=D.USHORT,R.NUMBER=function(e){return-107<=e&&e<=107?[e+139]:108<=e&&e<=1131?[247+((e-=108)>>8),255&e]:-1131<=e&&e<=-108?[251+((e=-e-108)>>8),255&e]:-32768<=e&&e<=32767?R.NUMBER16(e):R.NUMBER32(e)},D.NUMBER=function(e){return R.NUMBER(e).length},R.NUMBER16=function(e){return[28,e>>8&255,255&e]},D.NUMBER16=k(3),R.NUMBER32=function(e){return[29,e>>24&255,e>>16&255,e>>8&255,255&e]},D.NUMBER32=k(5),R.REAL=function(e){var t=e.toString(),r=/\.(\d*?)(?:9{5,20}|0{5,20})\d{0,2}(?:e(.+)|$)/.exec(t);if(r){var n=parseFloat("1e"+((r[2]?+r[2]:0)+r[1].length));t=(Math.round(e*n)/n).toString()}for(var a="",o=0,i=t.length;o<i;o+=1){var s=t[o];a+="e"===s?"-"===t[++o]?"c":"b":"."===s?"a":"-"===s?"e":s}for(var l=[30],p=0,u=(a+=1&a.length?"f":"ff").length;p<u;p+=2)l.push(parseInt(a.substr(p,2),16));return l},D.REAL=function(e){return R.REAL(e).length},R.NAME=R.CHARARRAY,D.NAME=D.CHARARRAY,R.STRING=R.CHARARRAY,D.STRING=D.CHARARRAY,P.UTF8=function(e,t,r){for(var n=[],a=r,o=0;o<a;o++,t+=1)n[o]=e.getUint8(t);return String.fromCharCode.apply(null,n)},P.UTF16=function(e,t,r){for(var n=[],a=r/2,o=0;o<a;o++,t+=2)n[o]=e.getUint16(t);return String.fromCharCode.apply(null,n)},R.UTF16=function(e){for(var t=[],r=0;r<e.length;r+=1){var n=e.charCodeAt(r);t[t.length]=n>>8&255,t[t.length]=255&n}return t},D.UTF16=function(e){return 2*e.length};var F={"x-mac-croatian":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®Š™´¨≠ŽØ∞±≤≥∆µ∂∑∏š∫ªºΩžø¿¡¬√ƒ≈Ć«Č… ÀÃÕŒœĐ—“”‘’÷◊©⁄€‹›Æ»–·‚„‰ÂćÁčÈÍÎÏÌÓÔđÒÚÛÙıˆ˜¯πË˚¸Êæˇ","x-mac-cyrillic":"АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ†°Ґ£§•¶І®©™Ђђ≠Ѓѓ∞±≤≥іµґЈЄєЇїЉљЊњјЅ¬√ƒ≈∆«»… ЋћЌќѕ–—“”‘’÷„ЎўЏџ№Ёёяабвгдежзийклмнопрстуфхцчшщъыьэю","x-mac-gaelic":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØḂ±≤≥ḃĊċḊḋḞḟĠġṀæøṁṖṗɼƒſṠ«»… ÀÃÕŒœ–—“”‘’ṡẛÿŸṪ€‹›Ŷŷṫ·Ỳỳ⁊ÂÊÁËÈÍÎÏÌÓÔ♣ÒÚÛÙıÝýŴŵẄẅẀẁẂẃ","x-mac-greek":"Ä¹²É³ÖÜ΅àâä΄¨çéèêë£™îï•½‰ôö¦€ùûü†ΓΔΘΛΞΠß®©ΣΪ§≠°·Α±≤≥¥ΒΕΖΗΙΚΜΦΫΨΩάΝ¬ΟΡ≈Τ«»… ΥΧΆΈœ–―“”‘’÷ΉΊΌΎέήίόΏύαβψδεφγηιξκλμνοπώρστθωςχυζϊϋΐΰ­","x-mac-icelandic":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûüÝ°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€ÐðÞþý·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ","x-mac-inuit":"ᐃᐄᐅᐆᐊᐋᐱᐲᐳᐴᐸᐹᑉᑎᑏᑐᑑᑕᑖᑦᑭᑮᑯᑰᑲᑳᒃᒋᒌᒍᒎᒐᒑ°ᒡᒥᒦ•¶ᒧ®©™ᒨᒪᒫᒻᓂᓃᓄᓅᓇᓈᓐᓯᓰᓱᓲᓴᓵᔅᓕᓖᓗᓘᓚᓛᓪᔨᔩᔪᔫᔭ… ᔮᔾᕕᕖᕗ–—“”‘’ᕘᕙᕚᕝᕆᕇᕈᕉᕋᕌᕐᕿᖀᖁᖂᖃᖄᖅᖏᖐᖑᖒᖓᖔᖕᙱᙲᙳᙴᙵᙶᖖᖠᖡᖢᖣᖤᖥᖦᕼŁł","x-mac-ce":"ÄĀāÉĄÖÜáąČäčĆćéŹźĎíďĒēĖóėôöõúĚěü†°Ę£§•¶ß®©™ę¨≠ģĮįĪ≤≥īĶ∂∑łĻļĽľĹĺŅņŃ¬√ńŇ∆«»… ňŐÕőŌ–—“”‘’÷◊ōŔŕŘ‹›řŖŗŠ‚„šŚśÁŤťÍŽžŪÓÔūŮÚůŰűŲųÝýķŻŁżĢˇ",macintosh:"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€‹›ﬁﬂ‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ","x-mac-romanian":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ĂȘ∞±≤≥¥µ∂∑∏π∫ªºΩăș¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€‹›Țț‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ","x-mac-turkish":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸĞğİıŞş‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙˆ˜¯˘˙˚¸˝˛ˇ"};P.MACSTRING=function(e,t,r,n){var a=F[n];if(void 0!==a){for(var o="",i=0;i<r;i++){var s=e.getUint8(t+i);o+=s<=127?String.fromCharCode(s):a[127&s]}return o}};var U,B="function"==typeof WeakMap&&new WeakMap;function G(e){return-128<=e&&e<=127}function j(e,t,r){for(var n=0,a=e.length;t<a&&n<64&&0===e[t];)++t,++n;return r.push(128|n-1),t}function V(e,t,r){for(var n=0,a=e.length,o=t;o<a&&n<64;){var i=e[o];if(!G(i))break;if(0===i&&o+1<a&&0===e[o+1])break;++o,++n}r.push(n-1);for(var s=t;s<o;++s)r.push(e[s]+256&255);return o}function z(e,t,r){for(var n=0,a=e.length,o=t;o<a&&n<64;){var i=e[o];if(0===i)break;if(G(i)&&o+1<a&&G(e[o+1]))break;++o,++n}r.push(64|n-1);for(var s=t;s<o;++s){var l=e[s];r.push(l+65536>>8&255,l+256&255)}return o}R.MACSTRING=function(e,t){var r=function(e){if(!U)for(var t in U={},F)U[t]=new String(t);var r=U[e];if(void 0!==r){if(B){var n=B.get(r);if(void 0!==n)return n}var a=F[e];if(void 0!==a){for(var o={},i=0;i<a.length;i++)o[a.charCodeAt(i)]=i+128;return B&&B.set(r,o),o}}}(t);if(void 0!==r){for(var n=[],a=0;a<e.length;a++){var o=e.charCodeAt(a);if(128<=o&&void 0===(o=r[o]))return;n[a]=o}return n}},D.MACSTRING=function(e,t){var r=R.MACSTRING(e,t);return void 0!==r?r.length:0},R.VARDELTAS=function(e){for(var t=0,r=[];t<e.length;){var n=e[t];t=0===n?j(e,t,r):-128<=n&&n<=127?V(e,t,r):z(e,t,r)}return r},R.INDEX=function(e){for(var t=1,r=[t],n=[],a=0;a<e.length;a+=1){var o=R.OBJECT(e[a]);Array.prototype.push.apply(n,o),t+=o.length,r.push(t)}if(0===n.length)return[0,0];for(var i=[],s=1+Math.floor(Math.log(t)/Math.log(2))/8|0,l=[void 0,R.BYTE,R.USHORT,R.UINT24,R.ULONG][s],p=0;p<r.length;p+=1){var u=l(r[p]);Array.prototype.push.apply(i,u)}return Array.prototype.concat(R.Card16(e.length),R.OffSize(s),i,n)},D.INDEX=function(e){return R.INDEX(e).length},R.DICT=function(e){for(var t=[],r=Object.keys(e),n=r.length,a=0;a<n;a+=1){var o=parseInt(r[a],0),i=e[o];t=(t=t.concat(R.OPERAND(i.value,i.type))).concat(R.OPERATOR(o))}return t},D.DICT=function(e){return R.DICT(e).length},R.OPERATOR=function(e){return e<1200?[e]:[12,e-1200]},R.OPERAND=function(e,t){var r=[];if(Array.isArray(t))for(var n=0;n<t.length;n+=1)L.argument(e.length===t.length,"Not enough arguments given for type"+t),r=r.concat(R.OPERAND(e[n],t[n]));else if("SID"===t)r=r.concat(R.NUMBER(e));else if("offset"===t)r=r.concat(R.NUMBER32(e));else if("number"===t)r=r.concat(R.NUMBER(e));else{if("real"!==t)throw new Error("Unknown operand type "+t);r=r.concat(R.REAL(e))}return r},R.OP=R.BYTE,D.OP=D.BYTE;var H="function"==typeof WeakMap&&new WeakMap;function W(e,t,r){for(var n=0;n<t.length;n+=1){var a=t[n];this[a.name]=a.value}if(this.tableName=e,this.fields=t,r)for(var o=Object.keys(r),i=0;i<o.length;i+=1){var s=o[i],l=r[s];void 0!==this[s]&&(this[s]=l)}}function X(e,t,r){void 0===r&&(r=t.length);var n=new Array(t.length+1);n[0]={name:e+"Count",type:"USHORT",value:r};for(var a=0;a<t.length;a++)n[a+1]={name:e+a,type:"USHORT",value:t[a]};return n}function q(e,t,r){var n=t.length,a=new Array(n+1);a[0]={name:e+"Count",type:"USHORT",value:n};for(var o=0;o<n;o++)a[o+1]={name:e+o,type:"TABLE",value:r(t[o],o)};return a}function Y(e,t,r){var n=t.length,a=[];a[0]={name:e+"Count",type:"USHORT",value:n};for(var o=0;o<n;o++)a=a.concat(r(t[o],o));return a}function Z(e){1===e.format?W.call(this,"coverageTable",[{name:"coverageFormat",type:"USHORT",value:1}].concat(X("glyph",e.glyphs))):L.assert(!1,"Can't create coverage table format 2 yet.")}function Q(e){W.call(this,"scriptListTable",Y("scriptRecord",e,function(e,t){var r=e.script,n=r.defaultLangSys;return L.assert(!!n,"Unable to write GSUB: script "+e.tag+" has no default language system."),[{name:"scriptTag"+t,type:"TAG",value:e.tag},{name:"script"+t,type:"TABLE",value:new W("scriptTable",[{name:"defaultLangSys",type:"TABLE",value:new W("defaultLangSys",[{name:"lookupOrder",type:"USHORT",value:0},{name:"reqFeatureIndex",type:"USHORT",value:n.reqFeatureIndex}].concat(X("featureIndex",n.featureIndexes)))}].concat(Y("langSys",r.langSysRecords,function(e,t){var r=e.langSys;return[{name:"langSysTag"+t,type:"TAG",value:e.tag},{name:"langSys"+t,type:"TABLE",value:new W("langSys",[{name:"lookupOrder",type:"USHORT",value:0},{name:"reqFeatureIndex",type:"USHORT",value:r.reqFeatureIndex}].concat(X("featureIndex",r.featureIndexes)))}]})))}]}))}function K(e){W.call(this,"featureListTable",Y("featureRecord",e,function(e,t){var r=e.feature;return[{name:"featureTag"+t,type:"TAG",value:e.tag},{name:"feature"+t,type:"TABLE",value:new W("featureTable",[{name:"featureParams",type:"USHORT",value:r.featureParams}].concat(X("lookupListIndex",r.lookupListIndexes)))}]}))}function J(e,r){W.call(this,"lookupListTable",q("lookup",e,function(e){var t=r[e.lookupType];return L.assert(!!t,"Unable to write GSUB lookup type "+e.lookupType+" tables."),new W("lookupTable",[{name:"lookupType",type:"USHORT",value:e.lookupType},{name:"lookupFlag",type:"USHORT",value:e.lookupFlag}].concat(q("subtable",e.subtables,t)))}))}R.CHARSTRING=function(e){if(H){var t=H.get(e);if(void 0!==t)return t}for(var r=[],n=e.length,a=0;a<n;a+=1){var o=e[a];r=r.concat(R[o.type](o.value))}return H&&H.set(e,r),r},D.CHARSTRING=function(e){return R.CHARSTRING(e).length},R.OBJECT=function(e){var t=R[e.type];return L.argument(void 0!==t,"No encoding function for type "+e.type),t(e.value)},D.OBJECT=function(e){var t=D[e.type];return L.argument(void 0!==t,"No sizeOf function for type "+e.type),t(e.value)},R.TABLE=function(e){for(var t=[],r=e.fields.length,n=[],a=[],o=0;o<r;o+=1){var i=e.fields[o],s=R[i.type];L.argument(void 0!==s,"No encoding function for field type "+i.type+" ("+i.name+")");var l=e[i.name];void 0===l&&(l=i.value);var p=s(l);"TABLE"===i.type?(a.push(t.length),t=t.concat([0,0]),n.push(p)):t=t.concat(p)}for(var u=0;u<n.length;u+=1){var c=a[u],d=t.length;L.argument(d<65536,"Table "+e.tableName+" too big."),t[c]=d>>8,t[c+1]=255&d,t=t.concat(n[u])}return t},D.TABLE=function(e){for(var t=0,r=e.fields.length,n=0;n<r;n+=1){var a=e.fields[n],o=D[a.type];L.argument(void 0!==o,"No sizeOf function for field type "+a.type+" ("+a.name+")");var i=e[a.name];void 0===i&&(i=a.value),t+=o(i),"TABLE"===a.type&&(t+=2)}return t},R.RECORD=R.TABLE,D.RECORD=D.TABLE,R.LITERAL=function(e){return e},D.LITERAL=function(e){return e.length},W.prototype.encode=function(){return R.TABLE(this)},W.prototype.sizeOf=function(){return D.TABLE(this)};var $={Table:W,Record:W,Coverage:(Z.prototype=Object.create(W.prototype)).constructor=Z,ScriptList:(Q.prototype=Object.create(W.prototype)).constructor=Q,FeatureList:(K.prototype=Object.create(W.prototype)).constructor=K,LookupList:(J.prototype=Object.create(W.prototype)).constructor=J,ushortList:X,tableList:q,recordList:Y};function ee(e,t){return e.getUint8(t)}function te(e,t){return e.getUint16(t,!1)}function re(e,t){return e.getUint32(t,!1)}function ne(e,t){return e.getInt16(t,!1)+e.getUint16(t+2,!1)/65535}var ae={byte:1,uShort:2,short:2,uLong:4,fixed:4,longDateTime:8,tag:4};function oe(e,t){this.data=e,this.offset=t,this.relativeOffset=0}oe.prototype.parseByte=function(){var e=this.data.getUint8(this.offset+this.relativeOffset);return this.relativeOffset+=1,e},oe.prototype.parseChar=function(){var e=this.data.getInt8(this.offset+this.relativeOffset);return this.relativeOffset+=1,e},oe.prototype.parseCard8=oe.prototype.parseByte,oe.prototype.parseCard16=oe.prototype.parseUShort=function(){var e=this.data.getUint16(this.offset+this.relativeOffset);return this.relativeOffset+=2,e},oe.prototype.parseSID=oe.prototype.parseUShort,oe.prototype.parseOffset16=oe.prototype.parseUShort,oe.prototype.parseShort=function(){var e=this.data.getInt16(this.offset+this.relativeOffset);return this.relativeOffset+=2,e},oe.prototype.parseF2Dot14=function(){var e=this.data.getInt16(this.offset+this.relativeOffset)/16384;return this.relativeOffset+=2,e},oe.prototype.parseOffset32=oe.prototype.parseULong=function(){var e=re(this.data,this.offset+this.relativeOffset);return this.relativeOffset+=4,e},oe.prototype.parseFixed=function(){var e=ne(this.data,this.offset+this.relativeOffset);return this.relativeOffset+=4,e},oe.prototype.parseString=function(e){var t=this.data,r=this.offset+this.relativeOffset,n="";this.relativeOffset+=e;for(var a=0;a<e;a++)n+=String.fromCharCode(t.getUint8(r+a));return n},oe.prototype.parseTag=function(){return this.parseString(4)},oe.prototype.parseLongDateTime=function(){var e=re(this.data,this.offset+this.relativeOffset+4);return e-=2082844800,this.relativeOffset+=8,e},oe.prototype.parseVersion=function(e){var t=te(this.data,this.offset+this.relativeOffset),r=te(this.data,this.offset+this.relativeOffset+2);return this.relativeOffset+=4,void 0===e&&(e=4096),t+r/e/10},oe.prototype.skip=function(e,t){void 0===t&&(t=1),this.relativeOffset+=ae[e]*t},oe.prototype.parseULongList=function(e){void 0===e&&(e=this.parseULong());for(var t=new Array(e),r=this.data,n=this.offset+this.relativeOffset,a=0;a<e;a++)t[a]=r.getUint32(n),n+=4;return this.relativeOffset+=4*e,t},oe.prototype.parseOffset16List=oe.prototype.parseUShortList=function(e){void 0===e&&(e=this.parseUShort());for(var t=new Array(e),r=this.data,n=this.offset+this.relativeOffset,a=0;a<e;a++)t[a]=r.getUint16(n),n+=2;return this.relativeOffset+=2*e,t},oe.prototype.parseShortList=function(e){for(var t=new Array(e),r=this.data,n=this.offset+this.relativeOffset,a=0;a<e;a++)t[a]=r.getInt16(n),n+=2;return this.relativeOffset+=2*e,t},oe.prototype.parseByteList=function(e){for(var t=new Array(e),r=this.data,n=this.offset+this.relativeOffset,a=0;a<e;a++)t[a]=r.getUint8(n++);return this.relativeOffset+=e,t},oe.prototype.parseList=function(e,t){t||(t=e,e=this.parseUShort());for(var r=new Array(e),n=0;n<e;n++)r[n]=t.call(this);return r},oe.prototype.parseList32=function(e,t){t||(t=e,e=this.parseULong());for(var r=new Array(e),n=0;n<e;n++)r[n]=t.call(this);return r},oe.prototype.parseRecordList=function(e,t){t||(t=e,e=this.parseUShort());for(var r=new Array(e),n=Object.keys(t),a=0;a<e;a++){for(var o={},i=0;i<n.length;i++){var s=n[i],l=t[s];o[s]=l.call(this)}r[a]=o}return r},oe.prototype.parseRecordList32=function(e,t){t||(t=e,e=this.parseULong());for(var r=new Array(e),n=Object.keys(t),a=0;a<e;a++){for(var o={},i=0;i<n.length;i++){var s=n[i],l=t[s];o[s]=l.call(this)}r[a]=o}return r},oe.prototype.parseStruct=function(e){if("function"==typeof e)return e.call(this);for(var t=Object.keys(e),r={},n=0;n<t.length;n++){var a=t[n],o=e[a];r[a]=o.call(this)}return r},oe.prototype.parseValueRecord=function(e){if(void 0===e&&(e=this.parseUShort()),0!==e){var t={};return 1&e&&(t.xPlacement=this.parseShort()),2&e&&(t.yPlacement=this.parseShort()),4&e&&(t.xAdvance=this.parseShort()),8&e&&(t.yAdvance=this.parseShort()),16&e&&(t.xPlaDevice=void 0,this.parseShort()),32&e&&(t.yPlaDevice=void 0,this.parseShort()),64&e&&(t.xAdvDevice=void 0,this.parseShort()),128&e&&(t.yAdvDevice=void 0,this.parseShort()),t}},oe.prototype.parseValueRecordList=function(){for(var e=this.parseUShort(),t=this.parseUShort(),r=new Array(t),n=0;n<t;n++)r[n]=this.parseValueRecord(e);return r},oe.prototype.parsePointer=function(e){var t=this.parseOffset16();if(0<t)return new oe(this.data,this.offset+t).parseStruct(e)},oe.prototype.parsePointer32=function(e){var t=this.parseOffset32();if(0<t)return new oe(this.data,this.offset+t).parseStruct(e)},oe.prototype.parseListOfLists=function(e){for(var t=this,r=this.parseOffset16List(),n=r.length,a=this.relativeOffset,o=new Array(n),i=0;i<n;i++){var s=r[i];if(0!==s)if(t.relativeOffset=s,e){for(var l=t.parseOffset16List(),p=new Array(l.length),u=0;u<l.length;u++)t.relativeOffset=s+l[u],p[u]=e.call(t);o[i]=p}else o[i]=t.parseUShortList();else o[i]=void 0}return this.relativeOffset=a,o},oe.prototype.parseCoverage=function(){var e=this.offset+this.relativeOffset,t=this.parseUShort(),r=this.parseUShort();if(1===t)return{format:1,glyphs:this.parseUShortList(r)};if(2!==t)throw new Error("0x"+e.toString(16)+": Coverage format must be 1 or 2.");for(var n=new Array(r),a=0;a<r;a++)n[a]={start:this.parseUShort(),end:this.parseUShort(),index:this.parseUShort()};return{format:2,ranges:n}},oe.prototype.parseClassDef=function(){var e=this.offset+this.relativeOffset,t=this.parseUShort();if(1===t)return{format:1,startGlyph:this.parseUShort(),classes:this.parseUShortList()};if(2===t)return{format:2,ranges:this.parseRecordList({start:oe.uShort,end:oe.uShort,classId:oe.uShort})};throw new Error("0x"+e.toString(16)+": ClassDef format must be 1 or 2.")},oe.list=function(e,t){return function(){return this.parseList(e,t)}},oe.list32=function(e,t){return function(){return this.parseList32(e,t)}},oe.recordList=function(e,t){return function(){return this.parseRecordList(e,t)}},oe.recordList32=function(e,t){return function(){return this.parseRecordList32(e,t)}},oe.pointer=function(e){return function(){return this.parsePointer(e)}},oe.pointer32=function(e){return function(){return this.parsePointer32(e)}},oe.tag=oe.prototype.parseTag,oe.byte=oe.prototype.parseByte,oe.uShort=oe.offset16=oe.prototype.parseUShort,oe.uShortList=oe.prototype.parseUShortList,oe.uLong=oe.offset32=oe.prototype.parseULong,oe.uLongList=oe.prototype.parseULongList,oe.struct=oe.prototype.parseStruct,oe.coverage=oe.prototype.parseCoverage,oe.classDef=oe.prototype.parseClassDef;var ie={reserved:oe.uShort,reqFeatureIndex:oe.uShort,featureIndexes:oe.uShortList};oe.prototype.parseScriptList=function(){return this.parsePointer(oe.recordList({tag:oe.tag,script:oe.pointer({defaultLangSys:oe.pointer(ie),langSysRecords:oe.recordList({tag:oe.tag,langSys:oe.pointer(ie)})})}))||[]},oe.prototype.parseFeatureList=function(){return this.parsePointer(oe.recordList({tag:oe.tag,feature:oe.pointer({featureParams:oe.offset16,lookupListIndexes:oe.uShortList})}))||[]},oe.prototype.parseLookupList=function(n){return this.parsePointer(oe.list(oe.pointer(function(){var e=this.parseUShort();L.argument(1<=e&&e<=9,"GPOS/GSUB lookup type "+e+" unknown.");var t=this.parseUShort(),r=16&t;return{lookupType:e,lookupFlag:t,subtables:this.parseList(oe.pointer(n[e])),markFilteringSet:r?this.parseUShort():void 0}})))||[]},oe.prototype.parseFeatureVariationsList=function(){return this.parsePointer32(function(){var e=this.parseUShort(),t=this.parseUShort();return L.argument(1===e&&t<1,"GPOS/GSUB feature variations table unknown."),this.parseRecordList32({conditionSetOffset:oe.offset32,featureTableSubstitutionOffset:oe.offset32})})||[]};var se={getByte:ee,getCard8:ee,getUShort:te,getCard16:te,getShort:function(e,t){return e.getInt16(t,!1)},getULong:re,getFixed:ne,getTag:function(e,t){for(var r="",n=t;n<t+4;n+=1)r+=String.fromCharCode(e.getInt8(n));return r},getOffset:function(e,t,r){for(var n=0,a=0;a<r;a+=1)n<<=8,n+=e.getUint8(t+a);return n},getBytes:function(e,t,r){for(var n=[],a=t;a<r;a+=1)n.push(e.getUint8(a));return n},bytesToString:function(e){for(var t="",r=0;r<e.length;r+=1)t+=String.fromCharCode(e[r]);return t},Parser:oe};var le={parse:function(e,t){var r={};r.version=se.getUShort(e,t),L.argument(0===r.version,"cmap table version should be 0."),r.numTables=se.getUShort(e,t+2);for(var n=-1,a=r.numTables-1;0<=a;--a){var o=se.getUShort(e,t+4+8*a),i=se.getUShort(e,t+4+8*a+2);if(3===o&&(0===i||1===i||10===i)||0===o&&(0===i||1===i||2===i||3===i||4===i)){n=se.getULong(e,t+4+8*a+4);break}}if(-1===n)throw new Error("No valid cmap sub-tables found.");var s=new se.Parser(e,t+n);if(r.format=s.parseUShort(),12===r.format)!function(e,t){var r;t.parseUShort(),e.length=t.parseULong(),e.language=t.parseULong(),e.groupCount=r=t.parseULong(),e.glyphIndexMap={};for(var n=0;n<r;n+=1)for(var a=t.parseULong(),o=t.parseULong(),i=t.parseULong(),s=a;s<=o;s+=1)e.glyphIndexMap[s]=i,i++}(r,s);else{if(4!==r.format)throw new Error("Only format 4 and 12 cmap tables are supported (found format "+r.format+").");!function(e,t,r,n,a){var o;e.length=t.parseUShort(),e.language=t.parseUShort(),e.segCount=o=t.parseUShort()>>1,t.skip("uShort",3),e.glyphIndexMap={};for(var i=new se.Parser(r,n+a+14),s=new se.Parser(r,n+a+16+2*o),l=new se.Parser(r,n+a+16+4*o),p=new se.Parser(r,n+a+16+6*o),u=n+a+16+8*o,c=0;c<o-1;c+=1)for(var d=void 0,h=i.parseUShort(),m=s.parseUShort(),f=l.parseShort(),y=p.parseUShort(),g=m;g<=h;g+=1)0!==y?(u=p.offset+p.relativeOffset-2,u+=y,u+=2*(g-m),0!==(d=se.getUShort(r,u))&&(d=d+f&65535)):d=g+f&65535,e.glyphIndexMap[g]=d}(r,s,e,t,n)}return r},make:function(e){var t,r=!0;for(t=e.length-1;0<t;--t){if(65535<e.get(t).unicode){console.log("Adding CMAP format 12 (needed!)"),r=!1;break}}var n=[{name:"version",type:"USHORT",value:0},{name:"numTables",type:"USHORT",value:r?1:2},{name:"platformID",type:"USHORT",value:3},{name:"encodingID",type:"USHORT",value:1},{name:"offset",type:"ULONG",value:r?12:20}];r||(n=n.concat([{name:"cmap12PlatformID",type:"USHORT",value:3},{name:"cmap12EncodingID",type:"USHORT",value:10},{name:"cmap12Offset",type:"ULONG",value:0}])),n=n.concat([{name:"format",type:"USHORT",value:4},{name:"cmap4Length",type:"USHORT",value:0},{name:"language",type:"USHORT",value:0},{name:"segCountX2",type:"USHORT",value:0},{name:"searchRange",type:"USHORT",value:0},{name:"entrySelector",type:"USHORT",value:0},{name:"rangeShift",type:"USHORT",value:0}]);var a,o,i,s=new $.Table("cmap",n);for(s.segments=[],t=0;t<e.length;t+=1){for(var l=e.get(t),p=0;p<l.unicodes.length;p+=1)a=s,o=l.unicodes[p],i=t,a.segments.push({end:o,start:o,delta:-(o-i),offset:0,glyphIndex:i});s.segments=s.segments.sort(function(e,t){return e.start-t.start})}s.segments.push({end:65535,start:65535,delta:1,offset:0});var u=s.segments.length,c=0,d=[],h=[],m=[],f=[],y=[],g=[];for(t=0;t<u;t+=1){var v=s.segments[t];v.end<=65535&&v.start<=65535?(d=d.concat({name:"end_"+t,type:"USHORT",value:v.end}),h=h.concat({name:"start_"+t,type:"USHORT",value:v.start}),m=m.concat({name:"idDelta_"+t,type:"SHORT",value:v.delta}),f=f.concat({name:"idRangeOffset_"+t,type:"USHORT",value:v.offset}),void 0!==v.glyphId&&(y=y.concat({name:"glyph_"+t,type:"USHORT",value:v.glyphId}))):c+=1,r||void 0===v.glyphIndex||(g=(g=(g=g.concat({name:"cmap12Start_"+t,type:"ULONG",value:v.start})).concat({name:"cmap12End_"+t,type:"ULONG",value:v.end})).concat({name:"cmap12Glyph_"+t,type:"ULONG",value:v.glyphIndex}))}if(s.segCountX2=2*(u-c),s.searchRange=2*Math.pow(2,Math.floor(Math.log(u-c)/Math.log(2))),s.entrySelector=Math.log(s.searchRange/2)/Math.log(2),s.rangeShift=s.segCountX2-s.searchRange,s.fields=s.fields.concat(d),s.fields.push({name:"reservedPad",type:"USHORT",value:0}),s.fields=s.fields.concat(h),s.fields=s.fields.concat(m),s.fields=s.fields.concat(f),s.fields=s.fields.concat(y),s.cmap4Length=14+2*d.length+2+2*h.length+2*m.length+2*f.length+2*y.length,!r){var b=16+4*g.length;s.cmap12Offset=20+s.cmap4Length,s.fields=s.fields.concat([{name:"cmap12Format",type:"USHORT",value:12},{name:"cmap12Reserved",type:"USHORT",value:0},{name:"cmap12Length",type:"ULONG",value:b},{name:"cmap12Language",type:"ULONG",value:0},{name:"cmap12nGroups",type:"ULONG",value:g.length/3}]),s.fields=s.fields.concat(g)}return s}},pe=[".notdef","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","endash","dagger","daggerdbl","periodcentered","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","questiondown","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","ring","cedilla","hungarumlaut","ogonek","caron","emdash","AE","ordfeminine","Lslash","Oslash","OE","ordmasculine","ae","dotlessi","lslash","oslash","oe","germandbls","onesuperior","logicalnot","mu","trademark","Eth","onehalf","plusminus","Thorn","onequarter","divide","brokenbar","degree","thorn","threequarters","twosuperior","registered","minus","eth","multiply","threesuperior","copyright","Aacute","Acircumflex","Adieresis","Agrave","Aring","Atilde","Ccedilla","Eacute","Ecircumflex","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Ntilde","Oacute","Ocircumflex","Odieresis","Ograve","Otilde","Scaron","Uacute","Ucircumflex","Udieresis","Ugrave","Yacute","Ydieresis","Zcaron","aacute","acircumflex","adieresis","agrave","aring","atilde","ccedilla","eacute","ecircumflex","edieresis","egrave","iacute","icircumflex","idieresis","igrave","ntilde","oacute","ocircumflex","odieresis","ograve","otilde","scaron","uacute","ucircumflex","udieresis","ugrave","yacute","ydieresis","zcaron","exclamsmall","Hungarumlautsmall","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","266 ff","onedotenleader","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","commasuperior","threequartersemdash","periodsuperior","questionsmall","asuperior","bsuperior","centsuperior","dsuperior","esuperior","isuperior","lsuperior","msuperior","nsuperior","osuperior","rsuperior","ssuperior","tsuperior","ff","ffi","ffl","parenleftinferior","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","exclamdownsmall","centoldstyle","Lslashsmall","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","Dotaccentsmall","Macronsmall","figuredash","hypheninferior","Ogoneksmall","Ringsmall","Cedillasmall","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","zerosuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmall","Ydieresissmall","001.000","001.001","001.002","001.003","Black","Bold","Book","Light","Medium","Regular","Roman","Semibold"],ue=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","","endash","dagger","daggerdbl","periodcentered","","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","","questiondown","","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","","ring","cedilla","","hungarumlaut","ogonek","caron","emdash","","","","","","","","","","","","","","","","","AE","","ordfeminine","","","","","Lslash","Oslash","OE","ordmasculine","","","","","","ae","","","","dotlessi","","","lslash","oslash","oe","germandbls"],ce=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclamsmall","Hungarumlautsmall","","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","comma","hyphen","period","fraction","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","colon","semicolon","commasuperior","threequartersemdash","periodsuperior","questionsmall","","asuperior","bsuperior","centsuperior","dsuperior","esuperior","","","isuperior","","","lsuperior","msuperior","nsuperior","osuperior","","","rsuperior","ssuperior","tsuperior","","ff","fi","fl","ffi","ffl","parenleftinferior","","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","exclamdownsmall","centoldstyle","Lslashsmall","","","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","","Dotaccentsmall","","","Macronsmall","","","figuredash","hypheninferior","","","Ogoneksmall","Ringsmall","Cedillasmall","","","","onequarter","onehalf","threequarters","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","","","zerosuperior","onesuperior","twosuperior","threesuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmall","Ydieresissmall"],de=[".notdef",".null","nonmarkingreturn","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quotesingle","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","grave","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","Adieresis","Aring","Ccedilla","Eacute","Ntilde","Odieresis","Udieresis","aacute","agrave","acircumflex","adieresis","atilde","aring","ccedilla","eacute","egrave","ecircumflex","edieresis","iacute","igrave","icircumflex","idieresis","ntilde","oacute","ograve","ocircumflex","odieresis","otilde","uacute","ugrave","ucircumflex","udieresis","dagger","degree","cent","sterling","section","bullet","paragraph","germandbls","registered","copyright","trademark","acute","dieresis","notequal","AE","Oslash","infinity","plusminus","lessequal","greaterequal","yen","mu","partialdiff","summation","product","pi","integral","ordfeminine","ordmasculine","Omega","ae","oslash","questiondown","exclamdown","logicalnot","radical","florin","approxequal","Delta","guillemotleft","guillemotright","ellipsis","nonbreakingspace","Agrave","Atilde","Otilde","OE","oe","endash","emdash","quotedblleft","quotedblright","quoteleft","quoteright","divide","lozenge","ydieresis","Ydieresis","fraction","currency","guilsinglleft","guilsinglright","fi","fl","daggerdbl","periodcentered","quotesinglbase","quotedblbase","perthousand","Acircumflex","Ecircumflex","Aacute","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Oacute","Ocircumflex","apple","Ograve","Uacute","Ucircumflex","Ugrave","dotlessi","circumflex","tilde","macron","breve","dotaccent","ring","cedilla","hungarumlaut","ogonek","caron","Lslash","lslash","Scaron","scaron","Zcaron","zcaron","brokenbar","Eth","eth","Yacute","yacute","Thorn","thorn","minus","multiply","onesuperior","twosuperior","threesuperior","onehalf","onequarter","threequarters","franc","Gbreve","gbreve","Idotaccent","Scedilla","scedilla","Cacute","cacute","Ccaron","ccaron","dcroat"];function he(e){this.font=e}function me(e){this.cmap=e}function fe(e,t){this.encoding=e,this.charset=t}function ye(e){switch(e.version){case 1:this.names=de.slice();break;case 2:this.names=new Array(e.numberOfGlyphs);for(var t=0;t<e.numberOfGlyphs;t++)e.glyphNameIndex[t]<de.length?this.names[t]=de[e.glyphNameIndex[t]]:this.names[t]=e.names[e.glyphNameIndex[t]-de.length];break;case 2.5:this.names=new Array(e.numberOfGlyphs);for(var r=0;r<e.numberOfGlyphs;r++)this.names[r]=de[r+e.glyphNameIndex[r]];break;case 3:default:this.names=[]}}he.prototype.charToGlyphIndex=function(e){var t=e.codePointAt(0),r=this.font.glyphs;if(r)for(var n=0;n<r.length;n+=1)for(var a=r.get(n),o=0;o<a.unicodes.length;o+=1)if(a.unicodes[o]===t)return n;return null},me.prototype.charToGlyphIndex=function(e){return this.cmap.glyphIndexMap[e.codePointAt(0)]||0},fe.prototype.charToGlyphIndex=function(e){var t=e.codePointAt(0),r=this.encoding[t];return this.charset.indexOf(r)},ye.prototype.nameToGlyphIndex=function(e){return this.names.indexOf(e)},ye.prototype.glyphIndexToName=function(e){return this.names[e]};var ge={line:function(e,t,r,n,a){e.beginPath(),e.moveTo(t,r),e.lineTo(n,a),e.stroke()}};function ve(e){this.bindConstructorValues(e)}function be(t,e,r){Object.defineProperty(t,e,{get:function(){return t.path,t[r]},set:function(e){t[r]=e},enumerable:!0,configurable:!0})}function _e(e,t){if(this.font=e,this.glyphs={},Array.isArray(t))for(var r=0;r<t.length;r++)this.glyphs[r]=t[r];this.length=t&&t.length||0}ve.prototype.bindConstructorValues=function(e){var t,r;this.index=e.index||0,this.name=e.name||null,this.unicode=e.unicode||void 0,this.unicodes=e.unicodes||void 0!==e.unicode?[e.unicode]:[],e.xMin&&(this.xMin=e.xMin),e.yMin&&(this.yMin=e.yMin),e.xMax&&(this.xMax=e.xMax),e.yMax&&(this.yMax=e.yMax),e.advanceWidth&&(this.advanceWidth=e.advanceWidth),Object.defineProperty(this,"path",(t=e.path,r=t||new A,{configurable:!0,get:function(){return"function"==typeof r&&(r=r()),r},set:function(e){r=e}}))},ve.prototype.addUnicode=function(e){0===this.unicodes.length&&(this.unicode=e),this.unicodes.push(e)},ve.prototype.getBoundingBox=function(){return this.path.getBoundingBox()},ve.prototype.getPath=function(e,t,r,n,a){var o,i;e=void 0!==e?e:0,t=void 0!==t?t:0,r=void 0!==r?r:72;var s=(n=n||{}).xScale,l=n.yScale;if(n.hinting&&a&&a.hinting&&(i=this.path&&a.hinting.exec(this,r)),i)o=a.hinting.getCommands(i),e=Math.round(e),t=Math.round(t),s=l=1;else{o=this.path.commands;var p=1/this.path.unitsPerEm*r;void 0===s&&(s=p),void 0===l&&(l=p)}for(var u=new A,c=0;c<o.length;c+=1){var d=o[c];"M"===d.type?u.moveTo(e+d.x*s,t+-d.y*l):"L"===d.type?u.lineTo(e+d.x*s,t+-d.y*l):"Q"===d.type?u.quadraticCurveTo(e+d.x1*s,t+-d.y1*l,e+d.x*s,t+-d.y*l):"C"===d.type?u.curveTo(e+d.x1*s,t+-d.y1*l,e+d.x2*s,t+-d.y2*l,e+d.x*s,t+-d.y*l):"Z"===d.type&&u.closePath()}return u},ve.prototype.getContours=function(){if(void 0===this.points)return[];for(var e=[],t=[],r=0;r<this.points.length;r+=1){var n=this.points[r];t.push(n),n.lastPointOfContour&&(e.push(t),t=[])}return L.argument(0===t.length,"There are still points left in the current contour."),e},ve.prototype.getMetrics=function(){for(var e=this.path.commands,t=[],r=[],n=0;n<e.length;n+=1){var a=e[n];"Z"!==a.type&&(t.push(a.x),r.push(a.y)),"Q"!==a.type&&"C"!==a.type||(t.push(a.x1),r.push(a.y1)),"C"===a.type&&(t.push(a.x2),r.push(a.y2))}var o={xMin:Math.min.apply(null,t),yMin:Math.min.apply(null,r),xMax:Math.max.apply(null,t),yMax:Math.max.apply(null,r),leftSideBearing:this.leftSideBearing};return isFinite(o.xMin)||(o.xMin=0),isFinite(o.xMax)||(o.xMax=this.advanceWidth),isFinite(o.yMin)||(o.yMin=0),isFinite(o.yMax)||(o.yMax=0),o.rightSideBearing=this.advanceWidth-o.leftSideBearing-(o.xMax-o.xMin),o},ve.prototype.draw=function(e,t,r,n,a){this.getPath(t,r,n,a).draw(e)},ve.prototype.drawPoints=function(i,e,t,r){function n(e,t,r,n){var a=2*Math.PI;i.beginPath();for(var o=0;o<e.length;o+=1)i.moveTo(t+e[o].x*n,r+e[o].y*n),i.arc(t+e[o].x*n,r+e[o].y*n,2,0,a,!1);i.closePath(),i.fill()}e=void 0!==e?e:0,t=void 0!==t?t:0,r=void 0!==r?r:24;for(var a=1/this.path.unitsPerEm*r,o=[],s=[],l=this.path,p=0;p<l.commands.length;p+=1){var u=l.commands[p];void 0!==u.x&&o.push({x:u.x,y:-u.y}),void 0!==u.x1&&s.push({x:u.x1,y:-u.y1}),void 0!==u.x2&&s.push({x:u.x2,y:-u.y2})}i.fillStyle="blue",n(o,e,t,a),i.fillStyle="red",n(s,e,t,a)},ve.prototype.drawMetrics=function(e,t,r,n){var a;t=void 0!==t?t:0,r=void 0!==r?r:0,n=void 0!==n?n:24,a=1/this.path.unitsPerEm*n,e.lineWidth=1,e.strokeStyle="black",ge.line(e,t,-1e4,t,1e4),ge.line(e,-1e4,r,1e4,r);var o=this.xMin||0,i=this.yMin||0,s=this.xMax||0,l=this.yMax||0,p=this.advanceWidth||0;e.strokeStyle="blue",ge.line(e,t+o*a,-1e4,t+o*a,1e4),ge.line(e,t+s*a,-1e4,t+s*a,1e4),ge.line(e,-1e4,r+-i*a,1e4,r+-i*a),ge.line(e,-1e4,r+-l*a,1e4,r+-l*a),e.strokeStyle="green",ge.line(e,t+p*a,-1e4,t+p*a,1e4)},_e.prototype.get=function(e){return"function"==typeof this.glyphs[e]&&(this.glyphs[e]=this.glyphs[e]()),this.glyphs[e]},_e.prototype.push=function(e,t){this.glyphs[e]=t,this.length++};var xe={GlyphSet:_e,glyphLoader:function(e,t){return new ve({index:t,font:e})},ttfGlyphLoader:function(r,e,n,a,o,i){return function(){var t=new ve({index:e,font:r});return t.path=function(){n(t,a,o);var e=i(r.glyphs,t);return e.unitsPerEm=r.unitsPerEm,e},be(t,"xMin","_xMin"),be(t,"xMax","_xMax"),be(t,"yMin","_yMin"),be(t,"yMax","_yMax"),t}},cffGlyphLoader:function(r,e,n,a){return function(){var t=new ve({index:e,font:r});return t.path=function(){var e=n(r,t,a);return e.unitsPerEm=r.unitsPerEm,e},t}}};function Se(e,t){if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(var r=0;r<e.length;r+=1)if(!Se(e[r],t[r]))return!1;return!0}return!1}function we(e){return e.length<1240?107:e.length<33900?1131:32768}function Me(e,t,r){var n,a,o=[],i=[],s=se.getCard16(e,t);if(0!==s){var l=se.getByte(e,t+2);n=t+(s+1)*l+2;for(var p=t+3,u=0;u<s+1;u+=1)o.push(se.getOffset(e,p,l)),p+=l;a=n+o[s]}else a=t+2;for(var c=0;c<o.length-1;c+=1){var d=se.getBytes(e,n+o[c],n+o[c+1]);r&&(d=r(d)),i.push(d)}return{objects:i,startOffset:t,endOffset:a}}function Ee(e,t){if(28===t)return e.parseByte()<<8|e.parseByte();if(29===t)return e.parseByte()<<24|e.parseByte()<<16|e.parseByte()<<8|e.parseByte();if(30===t)return function(e){for(var t="",r=["0","1","2","3","4","5","6","7","8","9",".","E","E-",null,"-"];;){var n=e.parseByte(),a=n>>4,o=15&n;if(15==a)break;if(t+=r[a],15==o)break;t+=r[o]}return parseFloat(t)}(e);if(32<=t&&t<=246)return t-139;if(247<=t&&t<=250)return 256*(t-247)+e.parseByte()+108;if(251<=t&&t<=254)return 256*-(t-251)-e.parseByte()-108;throw new Error("Invalid b0 "+t)}function Te(e,t,r){t=void 0!==t?t:0;var n=new se.Parser(e,t),a=[],o=[];for(r=void 0!==r?r:e.length;n.relativeOffset<r;){var i=n.parseByte();i<=21?(12===i&&(i=1200+n.parseByte()),a.push([i,o]),o=[]):o.push(Ee(n,i))}return function(e){for(var t={},r=0;r<e.length;r+=1){var n=e[r][0],a=e[r][1],o=void 0;if(o=1===a.length?a[0]:a,t.hasOwnProperty(n)&&!isNaN(t[n]))throw new Error("Object "+t+" already has key "+n);t[n]=o}return t}(a)}function Ce(e,t){return t=t<=390?pe[t]:e[t-391]}function Ne(e,t,r){for(var n,a={},o=0;o<t.length;o+=1){var i=t[o];if(Array.isArray(i.type)){var s=[];s.length=i.type.length;for(var l=0;l<i.type.length;l++)void 0===(n=void 0!==e[i.op]?e[i.op][l]:void 0)&&(n=void 0!==i.value&&void 0!==i.value[l]?i.value[l]:null),"SID"===i.type[l]&&(n=Ce(r,n)),s[l]=n;a[i.name]=s}else void 0===(n=e[i.op])&&(n=void 0!==i.value?i.value:null),"SID"===i.type&&(n=Ce(r,n)),a[i.name]=n}return a}var Oe=[{name:"version",op:0,type:"SID"},{name:"notice",op:1,type:"SID"},{name:"copyright",op:1200,type:"SID"},{name:"fullName",op:2,type:"SID"},{name:"familyName",op:3,type:"SID"},{name:"weight",op:4,type:"SID"},{name:"isFixedPitch",op:1201,type:"number",value:0},{name:"italicAngle",op:1202,type:"number",value:0},{name:"underlinePosition",op:1203,type:"number",value:-100},{name:"underlineThickness",op:1204,type:"number",value:50},{name:"paintType",op:1205,type:"number",value:0},{name:"charstringType",op:1206,type:"number",value:2},{name:"fontMatrix",op:1207,type:["real","real","real","real","real","real"],value:[.001,0,0,.001,0,0]},{name:"uniqueId",op:13,type:"number"},{name:"fontBBox",op:5,type:["number","number","number","number"],value:[0,0,0,0]},{name:"strokeWidth",op:1208,type:"number",value:0},{name:"xuid",op:14,type:[],value:null},{name:"charset",op:15,type:"offset",value:0},{name:"encoding",op:16,type:"offset",value:0},{name:"charStrings",op:17,type:"offset",value:0},{name:"private",op:18,type:["number","offset"],value:[0,0]},{name:"ros",op:1230,type:["SID","SID","number"]},{name:"cidFontVersion",op:1231,type:"number",value:0},{name:"cidFontRevision",op:1232,type:"number",value:0},{name:"cidFontType",op:1233,type:"number",value:0},{name:"cidCount",op:1234,type:"number",value:8720},{name:"uidBase",op:1235,type:"number"},{name:"fdArray",op:1236,type:"offset"},{name:"fdSelect",op:1237,type:"offset"},{name:"fontName",op:1238,type:"SID"}],Le=[{name:"subrs",op:19,type:"offset",value:0},{name:"defaultWidthX",op:20,type:"number",value:0},{name:"nominalWidthX",op:21,type:"number",value:0}];function Ie(e,t,r,n){return Ne(Te(e,t,r),Le,n)}function Pe(e,t,r,n){for(var a,o,i=[],s=0;s<r.length;s+=1){var l=new DataView(new Uint8Array(r[s]).buffer),p=(o=n,Ne(Te(a=l,0,a.byteLength),Oe,o));p._subrs=[],p._subrsBias=0;var u=p.private[0],c=p.private[1];if(0!==u&&0!==c){var d=Ie(e,c+t,u,n);if(p._defaultWidthX=d.defaultWidthX,p._nominalWidthX=d.nominalWidthX,0!==d.subrs){var h=Me(e,c+d.subrs+t);p._subrs=h.objects,p._subrsBias=we(p._subrs)}p._privateDict=d}i.push(p)}return i}function Re(y,g,e){var v,b,_,x,S,w,t,M,E=new A,T=[],C=0,N=!1,O=!1,L=0,I=0;if(y.isCIDFont){var r=y.tables.cff.topDict._fdSelect[g.index],n=y.tables.cff.topDict._fdArray[r];S=n._subrs,w=n._subrsBias,t=n._defaultWidthX,M=n._nominalWidthX}else S=y.tables.cff.topDict._subrs,w=y.tables.cff.topDict._subrsBias,t=y.tables.cff.topDict._defaultWidthX,M=y.tables.cff.topDict._nominalWidthX;var P=t;function R(e,t){O&&E.closePath(),E.moveTo(e,t),O=!0}function D(){T.length%2==0||N||(P=T.shift()+M),C+=T.length>>1,T.length=0,N=!0}return function e(t){for(var r,n,a,o,i,s,l,p,u,c,d,h,m=0;m<t.length;){var f=t[m];switch(m+=1,f){case 1:case 3:D();break;case 4:1<T.length&&!N&&(P=T.shift()+M,N=!0),I+=T.pop(),R(L,I);break;case 5:for(;0<T.length;)L+=T.shift(),I+=T.shift(),E.lineTo(L,I);break;case 6:for(;0<T.length&&(L+=T.shift(),E.lineTo(L,I),0!==T.length);)I+=T.shift(),E.lineTo(L,I);break;case 7:for(;0<T.length&&(I+=T.shift(),E.lineTo(L,I),0!==T.length);)L+=T.shift(),E.lineTo(L,I);break;case 8:for(;0<T.length;)v=L+T.shift(),b=I+T.shift(),_=v+T.shift(),x=b+T.shift(),L=_+T.shift(),I=x+T.shift(),E.curveTo(v,b,_,x,L,I);break;case 10:i=T.pop()+w,(s=S[i])&&e(s);break;case 11:return;case 12:switch(f=t[m],m+=1,f){case 35:v=L+T.shift(),b=I+T.shift(),_=v+T.shift(),x=b+T.shift(),l=_+T.shift(),p=x+T.shift(),u=l+T.shift(),c=p+T.shift(),d=u+T.shift(),h=c+T.shift(),L=d+T.shift(),I=h+T.shift(),T.shift(),E.curveTo(v,b,_,x,l,p),E.curveTo(u,c,d,h,L,I);break;case 34:v=L+T.shift(),b=I,_=v+T.shift(),x=b+T.shift(),l=_+T.shift(),p=x,u=l+T.shift(),c=x,d=u+T.shift(),h=I,L=d+T.shift(),E.curveTo(v,b,_,x,l,p),E.curveTo(u,c,d,h,L,I);break;case 36:v=L+T.shift(),b=I+T.shift(),_=v+T.shift(),x=b+T.shift(),l=_+T.shift(),p=x,u=l+T.shift(),c=x,d=u+T.shift(),h=c+T.shift(),L=d+T.shift(),E.curveTo(v,b,_,x,l,p),E.curveTo(u,c,d,h,L,I);break;case 37:v=L+T.shift(),b=I+T.shift(),_=v+T.shift(),x=b+T.shift(),l=_+T.shift(),p=x+T.shift(),u=l+T.shift(),c=p+T.shift(),d=u+T.shift(),h=c+T.shift(),Math.abs(d-L)>Math.abs(h-I)?L=d+T.shift():I=h+T.shift(),E.curveTo(v,b,_,x,l,p),E.curveTo(u,c,d,h,L,I);break;default:console.log("Glyph "+g.index+": unknown operator 1200"+f),T.length=0}break;case 14:0<T.length&&!N&&(P=T.shift()+M,N=!0),O&&(E.closePath(),O=!1);break;case 18:D();break;case 19:case 20:D(),m+=C+7>>3;break;case 21:2<T.length&&!N&&(P=T.shift()+M,N=!0),I+=T.pop(),R(L+=T.pop(),I);break;case 22:1<T.length&&!N&&(P=T.shift()+M,N=!0),R(L+=T.pop(),I);break;case 23:D();break;case 24:for(;2<T.length;)v=L+T.shift(),b=I+T.shift(),_=v+T.shift(),x=b+T.shift(),L=_+T.shift(),I=x+T.shift(),E.curveTo(v,b,_,x,L,I);L+=T.shift(),I+=T.shift(),E.lineTo(L,I);break;case 25:for(;6<T.length;)L+=T.shift(),I+=T.shift(),E.lineTo(L,I);v=L+T.shift(),b=I+T.shift(),_=v+T.shift(),x=b+T.shift(),L=_+T.shift(),I=x+T.shift(),E.curveTo(v,b,_,x,L,I);break;case 26:for(T.length%2&&(L+=T.shift());0<T.length;)v=L,b=I+T.shift(),_=v+T.shift(),x=b+T.shift(),L=_,I=x+T.shift(),E.curveTo(v,b,_,x,L,I);break;case 27:for(T.length%2&&(I+=T.shift());0<T.length;)v=L+T.shift(),b=I,_=v+T.shift(),x=b+T.shift(),L=_+T.shift(),I=x,E.curveTo(v,b,_,x,L,I);break;case 28:r=t[m],n=t[m+1],T.push((r<<24|n<<16)>>16),m+=2;break;case 29:i=T.pop()+y.gsubrsBias,(s=y.gsubrs[i])&&e(s);break;case 30:for(;0<T.length&&(v=L,b=I+T.shift(),_=v+T.shift(),x=b+T.shift(),L=_+T.shift(),I=x+(1===T.length?T.shift():0),E.curveTo(v,b,_,x,L,I),0!==T.length);)v=L+T.shift(),b=I,_=v+T.shift(),x=b+T.shift(),I=x+T.shift(),L=_+(1===T.length?T.shift():0),E.curveTo(v,b,_,x,L,I);break;case 31:for(;0<T.length&&(v=L+T.shift(),b=I,_=v+T.shift(),x=b+T.shift(),I=x+T.shift(),L=_+(1===T.length?T.shift():0),E.curveTo(v,b,_,x,L,I),0!==T.length);)v=L,b=I+T.shift(),_=v+T.shift(),x=b+T.shift(),L=_+T.shift(),I=x+(1===T.length?T.shift():0),E.curveTo(v,b,_,x,L,I);break;default:f<32?console.log("Glyph "+g.index+": unknown operator "+f):f<247?T.push(f-139):f<251?(r=t[m],m+=1,T.push(256*(f-247)+r+108)):f<255?(r=t[m],m+=1,T.push(256*-(f-251)-r-108)):(r=t[m],n=t[m+1],a=t[m+2],o=t[m+3],m+=4,T.push((r<<24|n<<16|a<<8|o)/65536))}}}(e),g.advanceWidth=P,E}function De(e,t){var r,n=pe.indexOf(e);return 0<=n&&(r=n),0<=(n=t.indexOf(e))?r=n+pe.length:(r=pe.length+t.length,t.push(e)),r}function Ae(e,t,r){for(var n={},a=0;a<e.length;a+=1){var o=e[a],i=t[o.name];void 0===i||Se(i,o.value)||("SID"===o.type&&(i=De(i,r)),n[o.op]={name:o.name,type:o.type,value:i})}return n}function ke(e,t){var r=new $.Record("Top DICT",[{name:"dict",type:"DICT",value:{}}]);return r.dict=Ae(Oe,e,t),r}function Fe(e){var t=new $.Record("Top DICT INDEX",[{name:"topDicts",type:"INDEX",value:[]}]);return t.topDicts=[{name:"topDict_0",type:"TABLE",value:e}],t}function Ue(e){var t=[],r=e.path;t.push({name:"width",type:"NUMBER",value:e.advanceWidth});for(var n=0,a=0,o=0;o<r.commands.length;o+=1){var i=void 0,s=void 0,l=r.commands[o];if("Q"===l.type){l={type:"C",x:l.x,y:l.y,x1:1/3*n+2/3*l.x1,y1:1/3*a+2/3*l.y1,x2:1/3*l.x+2/3*l.x1,y2:1/3*l.y+2/3*l.y1}}if("M"===l.type)i=Math.round(l.x-n),s=Math.round(l.y-a),t.push({name:"dx",type:"NUMBER",value:i}),t.push({name:"dy",type:"NUMBER",value:s}),t.push({name:"rmoveto",type:"OP",value:21}),n=Math.round(l.x),a=Math.round(l.y);else if("L"===l.type)i=Math.round(l.x-n),s=Math.round(l.y-a),t.push({name:"dx",type:"NUMBER",value:i}),t.push({name:"dy",type:"NUMBER",value:s}),t.push({name:"rlineto",type:"OP",value:5}),n=Math.round(l.x),a=Math.round(l.y);else if("C"===l.type){var p=Math.round(l.x1-n),u=Math.round(l.y1-a),c=Math.round(l.x2-l.x1),d=Math.round(l.y2-l.y1);i=Math.round(l.x-l.x2),s=Math.round(l.y-l.y2),t.push({name:"dx1",type:"NUMBER",value:p}),t.push({name:"dy1",type:"NUMBER",value:u}),t.push({name:"dx2",type:"NUMBER",value:c}),t.push({name:"dy2",type:"NUMBER",value:d}),t.push({name:"dx",type:"NUMBER",value:i}),t.push({name:"dy",type:"NUMBER",value:s}),t.push({name:"rrcurveto",type:"OP",value:8}),n=Math.round(l.x),a=Math.round(l.y)}}return t.push({name:"endchar",type:"OP",value:14}),t}var Be={parse:function(e,t,r){r.tables.cff={};var n,a,o,i=Me(e,(n=e,a=t,(o={}).formatMajor=se.getCard8(n,a),o.formatMinor=se.getCard8(n,a+1),o.size=se.getCard8(n,a+2),o.offsetSize=se.getCard8(n,a+3),o.startOffset=a,o.endOffset=a+4,o).endOffset,se.bytesToString),s=Me(e,i.endOffset),l=Me(e,s.endOffset,se.bytesToString),p=Me(e,l.endOffset);r.gsubrs=p.objects,r.gsubrsBias=we(r.gsubrs);var u=Pe(e,t,s.objects,l.objects);if(1!==u.length)throw new Error("CFF table has too many fonts in 'FontSet' - count of fonts NameIndex.length = "+u.length);var c=u[0];if((r.tables.cff.topDict=c)._privateDict&&(r.defaultWidthX=c._privateDict.defaultWidthX,r.nominalWidthX=c._privateDict.nominalWidthX),void 0!==c.ros[0]&&void 0!==c.ros[1]&&(r.isCIDFont=!0),r.isCIDFont){var d=c.fdArray,h=c.fdSelect;if(0===d||0===h)throw new Error("Font is marked as a CID font, but FDArray and/or FDSelect information is missing");var m=Pe(e,t,Me(e,d+=t).objects,l.objects);c._fdArray=m,h+=t,c._fdSelect=function(e,t,r,n){var a,o=[],i=new se.Parser(e,t),s=i.parseCard8();if(0===s)for(var l=0;l<r;l++){if(n<=(a=i.parseCard8()))throw new Error("CFF table CID Font FDSelect has bad FD index value "+a+" (FD count "+n+")");o.push(a)}else{if(3!==s)throw new Error("CFF Table CID Font FDSelect table has unsupported format "+s);var p,u=i.parseCard16(),c=i.parseCard16();if(0!==c)throw new Error("CFF Table CID Font FDSelect format 3 range has bad initial GID "+c);for(var d=0;d<u;d++){if(a=i.parseCard8(),p=i.parseCard16(),n<=a)throw new Error("CFF table CID Font FDSelect has bad FD index value "+a+" (FD count "+n+")");if(r<p)throw new Error("CFF Table CID Font FDSelect format 3 range has bad GID "+p);for(;c<p;c++)o.push(a);c=p}if(p!==r)throw new Error("CFF Table CID Font FDSelect format 3 range has bad final GID "+p)}return o}(e,h,r.numGlyphs,m.length)}var f=t+c.private[1],y=Ie(e,f,c.private[0],l.objects);if(r.defaultWidthX=y.defaultWidthX,r.nominalWidthX=y.nominalWidthX,0!==y.subrs){var g=Me(e,f+y.subrs);r.subrs=g.objects,r.subrsBias=we(r.subrs)}else r.subrs=[],r.subrsBias=0;var v=Me(e,t+c.charStrings);r.nGlyphs=v.objects.length;var b=function(e,t,r,n){var a,o,i=new se.Parser(e,t);--r;var s=[".notdef"],l=i.parseCard8();if(0===l)for(var p=0;p<r;p+=1)a=i.parseSID(),s.push(Ce(n,a));else if(1===l)for(;s.length<=r;){a=i.parseSID(),o=i.parseCard8();for(var u=0;u<=o;u+=1)s.push(Ce(n,a)),a+=1}else{if(2!==l)throw new Error("Unknown charset format "+l);for(;s.length<=r;){a=i.parseSID(),o=i.parseCard16();for(var c=0;c<=o;c+=1)s.push(Ce(n,a)),a+=1}}return s}(e,t+c.charset,r.nGlyphs,l.objects);0===c.encoding?r.cffEncoding=new fe(ue,b):1===c.encoding?r.cffEncoding=new fe(ce,b):r.cffEncoding=function(e,t,r){var n,a={},o=new se.Parser(e,t),i=o.parseCard8();if(0===i)for(var s=o.parseCard8(),l=0;l<s;l+=1)a[n=o.parseCard8()]=l;else{if(1!==i)throw new Error("Unknown encoding format "+i);var p=o.parseCard8();n=1;for(var u=0;u<p;u+=1)for(var c=o.parseCard8(),d=o.parseCard8(),h=c;h<=c+d;h+=1)a[h]=n,n+=1}return new fe(a,r)}(e,t+c.encoding,b),r.encoding=r.encoding||r.cffEncoding,r.glyphs=new xe.GlyphSet(r);for(var _=0;_<r.nGlyphs;_+=1){var x=v.objects[_];r.glyphs.push(_,xe.cffGlyphLoader(r,_,Re,x))}},make:function(e,t){for(var r,n=new $.Table("CFF ",[{name:"header",type:"RECORD"},{name:"nameIndex",type:"RECORD"},{name:"topDictIndex",type:"RECORD"},{name:"stringIndex",type:"RECORD"},{name:"globalSubrIndex",type:"RECORD"},{name:"charsets",type:"RECORD"},{name:"charStringsIndex",type:"RECORD"},{name:"privateDict",type:"RECORD"}]),a=1/t.unitsPerEm,o={version:t.version,fullName:t.fullName,familyName:t.familyName,weight:t.weightName,fontBBox:t.fontBBox||[0,0,0,0],fontMatrix:[a,0,0,a,0,0],charset:999,encoding:0,charStrings:999,private:[0,999]},i=[],s=1;s<e.length;s+=1)r=e.get(s),i.push(r.name);var l=[];n.header=new $.Record("Header",[{name:"major",type:"Card8",value:1},{name:"minor",type:"Card8",value:0},{name:"hdrSize",type:"Card8",value:4},{name:"major",type:"Card8",value:1}]),n.nameIndex=function(e){var t=new $.Record("Name INDEX",[{name:"names",type:"INDEX",value:[]}]);t.names=[];for(var r=0;r<e.length;r+=1)t.names.push({name:"name_"+r,type:"NAME",value:e[r]});return t}([t.postScriptName]);var p,u,c,d=ke(o,l);n.topDictIndex=Fe(d),n.globalSubrIndex=new $.Record("Global Subr INDEX",[{name:"subrs",type:"INDEX",value:[]}]),n.charsets=function(e,t){for(var r=new $.Record("Charsets",[{name:"format",type:"Card8",value:0}]),n=0;n<e.length;n+=1){var a=De(e[n],t);r.fields.push({name:"glyph_"+n,type:"SID",value:a})}return r}(i,l),n.charStringsIndex=function(e){for(var t=new $.Record("CharStrings INDEX",[{name:"charStrings",type:"INDEX",value:[]}]),r=0;r<e.length;r+=1){var n=e.get(r),a=Ue(n);t.charStrings.push({name:n.name,type:"CHARSTRING",value:a})}return t}(e),n.privateDict=(p={},u=l,(c=new $.Record("Private DICT",[{name:"dict",type:"DICT",value:{}}])).dict=Ae(Le,p,u),c),n.stringIndex=function(e){var t=new $.Record("String INDEX",[{name:"strings",type:"INDEX",value:[]}]);t.strings=[];for(var r=0;r<e.length;r+=1)t.strings.push({name:"string_"+r,type:"STRING",value:e[r]});return t}(l);var h=n.header.sizeOf()+n.nameIndex.sizeOf()+n.topDictIndex.sizeOf()+n.stringIndex.sizeOf()+n.globalSubrIndex.sizeOf();return o.charset=h,o.encoding=0,o.charStrings=o.charset+n.charsets.sizeOf(),o.private[1]=o.charStrings+n.charStringsIndex.sizeOf(),d=ke(o,l),n.topDictIndex=Fe(d),n}};var Ge={parse:function(e,t){var r={},n=new se.Parser(e,t);return r.version=n.parseVersion(),r.fontRevision=Math.round(1e3*n.parseFixed())/1e3,r.checkSumAdjustment=n.parseULong(),r.magicNumber=n.parseULong(),L.argument(1594834165===r.magicNumber,"Font header has wrong magic number."),r.flags=n.parseUShort(),r.unitsPerEm=n.parseUShort(),r.created=n.parseLongDateTime(),r.modified=n.parseLongDateTime(),r.xMin=n.parseShort(),r.yMin=n.parseShort(),r.xMax=n.parseShort(),r.yMax=n.parseShort(),r.macStyle=n.parseUShort(),r.lowestRecPPEM=n.parseUShort(),r.fontDirectionHint=n.parseShort(),r.indexToLocFormat=n.parseShort(),r.glyphDataFormat=n.parseShort(),r},make:function(e){var t=Math.round((new Date).getTime()/1e3)+2082844800,r=t;return e.createdTimestamp&&(r=e.createdTimestamp+2082844800),new $.Table("head",[{name:"version",type:"FIXED",value:65536},{name:"fontRevision",type:"FIXED",value:65536},{name:"checkSumAdjustment",type:"ULONG",value:0},{name:"magicNumber",type:"ULONG",value:1594834165},{name:"flags",type:"USHORT",value:0},{name:"unitsPerEm",type:"USHORT",value:1e3},{name:"created",type:"LONGDATETIME",value:r},{name:"modified",type:"LONGDATETIME",value:t},{name:"xMin",type:"SHORT",value:0},{name:"yMin",type:"SHORT",value:0},{name:"xMax",type:"SHORT",value:0},{name:"yMax",type:"SHORT",value:0},{name:"macStyle",type:"USHORT",value:0},{name:"lowestRecPPEM",type:"USHORT",value:0},{name:"fontDirectionHint",type:"SHORT",value:2},{name:"indexToLocFormat",type:"SHORT",value:0},{name:"glyphDataFormat",type:"SHORT",value:0}],e)}};var je={parse:function(e,t){var r={},n=new se.Parser(e,t);return r.version=n.parseVersion(),r.ascender=n.parseShort(),r.descender=n.parseShort(),r.lineGap=n.parseShort(),r.advanceWidthMax=n.parseUShort(),r.minLeftSideBearing=n.parseShort(),r.minRightSideBearing=n.parseShort(),r.xMaxExtent=n.parseShort(),r.caretSlopeRise=n.parseShort(),r.caretSlopeRun=n.parseShort(),r.caretOffset=n.parseShort(),n.relativeOffset+=8,r.metricDataFormat=n.parseShort(),r.numberOfHMetrics=n.parseUShort(),r},make:function(e){return new $.Table("hhea",[{name:"version",type:"FIXED",value:65536},{name:"ascender",type:"FWORD",value:0},{name:"descender",type:"FWORD",value:0},{name:"lineGap",type:"FWORD",value:0},{name:"advanceWidthMax",type:"UFWORD",value:0},{name:"minLeftSideBearing",type:"FWORD",value:0},{name:"minRightSideBearing",type:"FWORD",value:0},{name:"xMaxExtent",type:"FWORD",value:0},{name:"caretSlopeRise",type:"SHORT",value:1},{name:"caretSlopeRun",type:"SHORT",value:0},{name:"caretOffset",type:"SHORT",value:0},{name:"reserved1",type:"SHORT",value:0},{name:"reserved2",type:"SHORT",value:0},{name:"reserved3",type:"SHORT",value:0},{name:"reserved4",type:"SHORT",value:0},{name:"metricDataFormat",type:"SHORT",value:0},{name:"numberOfHMetrics",type:"USHORT",value:0}],e)}};var Ve={parse:function(e,t,r,n,a){for(var o,i,s=new se.Parser(e,t),l=0;l<n;l+=1){l<r&&(o=s.parseUShort(),i=s.parseShort());var p=a.get(l);p.advanceWidth=o,p.leftSideBearing=i}},make:function(e){for(var t=new $.Table("hmtx",[]),r=0;r<e.length;r+=1){var n=e.get(r),a=n.advanceWidth||0,o=n.leftSideBearing||0;t.fields.push({name:"advanceWidth_"+r,type:"USHORT",value:a}),t.fields.push({name:"leftSideBearing_"+r,type:"SHORT",value:o})}return t}};var ze={make:function(e){for(var t=new $.Table("ltag",[{name:"version",type:"ULONG",value:1},{name:"flags",type:"ULONG",value:0},{name:"numTags",type:"ULONG",value:e.length}]),r="",n=12+4*e.length,a=0;a<e.length;++a){var o=r.indexOf(e[a]);o<0&&(o=r.length,r+=e[a]),t.fields.push({name:"offset "+a,type:"USHORT",value:n+o}),t.fields.push({name:"length "+a,type:"USHORT",value:e[a].length})}return t.fields.push({name:"stringPool",type:"CHARARRAY",value:r}),t},parse:function(e,t){var r=new se.Parser(e,t),n=r.parseULong();L.argument(1===n,"Unsupported ltag table version."),r.skip("uLong",1);for(var a=r.parseULong(),o=[],i=0;i<a;i++){for(var s="",l=t+r.parseUShort(),p=r.parseUShort(),u=l;u<l+p;++u)s+=String.fromCharCode(e.getInt8(u));o.push(s)}return o}};var He={parse:function(e,t){var r={},n=new se.Parser(e,t);return r.version=n.parseVersion(),r.numGlyphs=n.parseUShort(),1===r.version&&(r.maxPoints=n.parseUShort(),r.maxContours=n.parseUShort(),r.maxCompositePoints=n.parseUShort(),r.maxCompositeContours=n.parseUShort(),r.maxZones=n.parseUShort(),r.maxTwilightPoints=n.parseUShort(),r.maxStorage=n.parseUShort(),r.maxFunctionDefs=n.parseUShort(),r.maxInstructionDefs=n.parseUShort(),r.maxStackElements=n.parseUShort(),r.maxSizeOfInstructions=n.parseUShort(),r.maxComponentElements=n.parseUShort(),r.maxComponentDepth=n.parseUShort()),r},make:function(e){return new $.Table("maxp",[{name:"version",type:"FIXED",value:20480},{name:"numGlyphs",type:"USHORT",value:e}])}},We=["copyright","fontFamily","fontSubfamily","uniqueID","fullName","version","postScriptName","trademark","manufacturer","designer","description","manufacturerURL","designerURL","license","licenseURL","reserved","preferredFamily","preferredSubfamily","compatibleFullName","sampleText","postScriptFindFontName","wwsFamily","wwsSubfamily"],Xe={0:"en",1:"fr",2:"de",3:"it",4:"nl",5:"sv",6:"es",7:"da",8:"pt",9:"no",10:"he",11:"ja",12:"ar",13:"fi",14:"el",15:"is",16:"mt",17:"tr",18:"hr",19:"zh-Hant",20:"ur",21:"hi",22:"th",23:"ko",24:"lt",25:"pl",26:"hu",27:"es",28:"lv",29:"se",30:"fo",31:"fa",32:"ru",33:"zh",34:"nl-BE",35:"ga",36:"sq",37:"ro",38:"cz",39:"sk",40:"si",41:"yi",42:"sr",43:"mk",44:"bg",45:"uk",46:"be",47:"uz",48:"kk",49:"az-Cyrl",50:"az-Arab",51:"hy",52:"ka",53:"mo",54:"ky",55:"tg",56:"tk",57:"mn-CN",58:"mn",59:"ps",60:"ks",61:"ku",62:"sd",63:"bo",64:"ne",65:"sa",66:"mr",67:"bn",68:"as",69:"gu",70:"pa",71:"or",72:"ml",73:"kn",74:"ta",75:"te",76:"si",77:"my",78:"km",79:"lo",80:"vi",81:"id",82:"tl",83:"ms",84:"ms-Arab",85:"am",86:"ti",87:"om",88:"so",89:"sw",90:"rw",91:"rn",92:"ny",93:"mg",94:"eo",128:"cy",129:"eu",130:"ca",131:"la",132:"qu",133:"gn",134:"ay",135:"tt",136:"ug",137:"dz",138:"jv",139:"su",140:"gl",141:"af",142:"br",143:"iu",144:"gd",145:"gv",146:"ga",147:"to",148:"el-polyton",149:"kl",150:"az",151:"nn"},qe={0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:5,11:1,12:4,13:0,14:6,15:0,16:0,17:0,18:0,19:2,20:4,21:9,22:21,23:3,24:29,25:29,26:29,27:29,28:29,29:0,30:0,31:4,32:7,33:25,34:0,35:0,36:0,37:0,38:29,39:29,40:0,41:5,42:7,43:7,44:7,45:7,46:7,47:7,48:7,49:7,50:4,51:24,52:23,53:7,54:7,55:7,56:7,57:27,58:7,59:4,60:4,61:4,62:4,63:26,64:9,65:9,66:9,67:13,68:13,69:11,70:10,71:12,72:17,73:16,74:14,75:15,76:18,77:19,78:20,79:22,80:30,81:0,82:0,83:0,84:4,85:28,86:28,87:28,88:0,89:0,90:0,91:0,92:0,93:0,94:0,128:0,129:0,130:0,131:0,132:0,133:0,134:0,135:7,136:4,137:26,138:0,139:0,140:0,141:0,142:0,143:28,144:0,145:0,146:0,147:0,148:6,149:0,150:0,151:0},Ye={1078:"af",1052:"sq",1156:"gsw",1118:"am",5121:"ar-DZ",15361:"ar-BH",3073:"ar",2049:"ar-IQ",11265:"ar-JO",13313:"ar-KW",12289:"ar-LB",4097:"ar-LY",6145:"ary",8193:"ar-OM",16385:"ar-QA",1025:"ar-SA",10241:"ar-SY",7169:"aeb",14337:"ar-AE",9217:"ar-YE",1067:"hy",1101:"as",2092:"az-Cyrl",1068:"az",1133:"ba",1069:"eu",1059:"be",2117:"bn",1093:"bn-IN",8218:"bs-Cyrl",5146:"bs",1150:"br",1026:"bg",1027:"ca",3076:"zh-HK",5124:"zh-MO",2052:"zh",4100:"zh-SG",1028:"zh-TW",1155:"co",1050:"hr",4122:"hr-BA",1029:"cs",1030:"da",1164:"prs",1125:"dv",2067:"nl-BE",1043:"nl",3081:"en-AU",10249:"en-BZ",4105:"en-CA",9225:"en-029",16393:"en-IN",6153:"en-IE",8201:"en-JM",17417:"en-MY",5129:"en-NZ",13321:"en-PH",18441:"en-SG",7177:"en-ZA",11273:"en-TT",2057:"en-GB",1033:"en",12297:"en-ZW",1061:"et",1080:"fo",1124:"fil",1035:"fi",2060:"fr-BE",3084:"fr-CA",1036:"fr",5132:"fr-LU",6156:"fr-MC",4108:"fr-CH",1122:"fy",1110:"gl",1079:"ka",3079:"de-AT",1031:"de",5127:"de-LI",4103:"de-LU",2055:"de-CH",1032:"el",1135:"kl",1095:"gu",1128:"ha",1037:"he",1081:"hi",1038:"hu",1039:"is",1136:"ig",1057:"id",1117:"iu",2141:"iu-Latn",2108:"ga",1076:"xh",1077:"zu",1040:"it",2064:"it-CH",1041:"ja",1099:"kn",1087:"kk",1107:"km",1158:"quc",1159:"rw",1089:"sw",1111:"kok",1042:"ko",1088:"ky",1108:"lo",1062:"lv",1063:"lt",2094:"dsb",1134:"lb",1071:"mk",2110:"ms-BN",1086:"ms",1100:"ml",1082:"mt",1153:"mi",1146:"arn",1102:"mr",1148:"moh",1104:"mn",2128:"mn-CN",1121:"ne",1044:"nb",2068:"nn",1154:"oc",1096:"or",1123:"ps",1045:"pl",1046:"pt",2070:"pt-PT",1094:"pa",1131:"qu-BO",2155:"qu-EC",3179:"qu",1048:"ro",1047:"rm",1049:"ru",9275:"smn",4155:"smj-NO",5179:"smj",3131:"se-FI",1083:"se",2107:"se-SE",8251:"sms",6203:"sma-NO",7227:"sms",1103:"sa",7194:"sr-Cyrl-BA",3098:"sr",6170:"sr-Latn-BA",2074:"sr-Latn",1132:"nso",1074:"tn",1115:"si",1051:"sk",1060:"sl",11274:"es-AR",16394:"es-BO",13322:"es-CL",9226:"es-CO",5130:"es-CR",7178:"es-DO",12298:"es-EC",17418:"es-SV",4106:"es-GT",18442:"es-HN",2058:"es-MX",19466:"es-NI",6154:"es-PA",15370:"es-PY",10250:"es-PE",20490:"es-PR",3082:"es",1034:"es",21514:"es-US",14346:"es-UY",8202:"es-VE",2077:"sv-FI",1053:"sv",1114:"syr",1064:"tg",2143:"tzm",1097:"ta",1092:"tt",1098:"te",1054:"th",1105:"bo",1055:"tr",1090:"tk",1152:"ug",1058:"uk",1070:"hsb",1056:"ur",2115:"uz-Cyrl",1091:"uz",1066:"vi",1106:"cy",1160:"wo",1157:"sah",1144:"ii",1130:"yo"};function Ze(e,t,r){switch(e){case 0:if(65535===t)return"und";if(r)return r[t];break;case 1:return Xe[t];case 3:return Ye[t]}}var Qe="utf-16",Ke={0:"macintosh",1:"x-mac-japanese",2:"x-mac-chinesetrad",3:"x-mac-korean",6:"x-mac-greek",7:"x-mac-cyrillic",9:"x-mac-devanagai",10:"x-mac-gurmukhi",11:"x-mac-gujarati",12:"x-mac-oriya",13:"x-mac-bengali",14:"x-mac-tamil",15:"x-mac-telugu",16:"x-mac-kannada",17:"x-mac-malayalam",18:"x-mac-sinhalese",19:"x-mac-burmese",20:"x-mac-khmer",21:"x-mac-thai",22:"x-mac-lao",23:"x-mac-georgian",24:"x-mac-armenian",25:"x-mac-chinesesimp",26:"x-mac-tibetan",27:"x-mac-mongolian",28:"x-mac-ethiopic",29:"x-mac-ce",30:"x-mac-vietnamese",31:"x-mac-extarabic"},Je={15:"x-mac-icelandic",17:"x-mac-turkish",18:"x-mac-croatian",24:"x-mac-ce",25:"x-mac-ce",26:"x-mac-ce",27:"x-mac-ce",28:"x-mac-ce",30:"x-mac-icelandic",37:"x-mac-romanian",38:"x-mac-ce",39:"x-mac-ce",40:"x-mac-ce",143:"x-mac-inuit",146:"x-mac-gaelic"};function $e(e,t,r){switch(e){case 0:return Qe;case 1:return Je[r]||Ke[t];case 3:if(1===t||10===t)return Qe}}function et(e){var t={};for(var r in e)t[e[r]]=parseInt(r);return t}function tt(e,t,r,n,a,o){return new $.Record("NameRecord",[{name:"platformID",type:"USHORT",value:e},{name:"encodingID",type:"USHORT",value:t},{name:"languageID",type:"USHORT",value:r},{name:"nameID",type:"USHORT",value:n},{name:"length",type:"USHORT",value:a},{name:"offset",type:"USHORT",value:o}])}function rt(e,t){var r=function(e,t){var r=e.length,n=t.length-r+1;e:for(var a=0;a<n;a++)for(;a<n;a++){for(var o=0;o<r;o++)if(t[a+o]!==e[o])continue e;return a}return-1}(e,t);if(r<0){r=t.length;for(var n=0,a=e.length;n<a;++n)t.push(e[n])}return r}var nt={parse:function(e,t,r){for(var n={},a=new se.Parser(e,t),o=a.parseUShort(),i=a.parseUShort(),s=a.offset+a.parseUShort(),l=0;l<i;l++){var p=a.parseUShort(),u=a.parseUShort(),c=a.parseUShort(),d=a.parseUShort(),h=We[d]||d,m=a.parseUShort(),f=a.parseUShort(),y=Ze(p,c,r),g=$e(p,u,c);if(void 0!==g&&void 0!==y){var v=void 0;if(v=g===Qe?P.UTF16(e,s+f,m):P.MACSTRING(e,s+f,m,g)){var b=n[h];void 0===b&&(b=n[h]={}),b[y]=v}}}return 1===o&&a.parseUShort(),n},make:function(e,t){var r,n=[],a={},o=et(We);for(var i in e){var s=o[i];if(void 0===s&&(s=i),r=parseInt(s),isNaN(r))throw new Error('Name table entry "'+i+'" does not exist, see nameTableNames for complete list.');a[r]=e[i],n.push(r)}for(var l=et(Xe),p=et(Ye),u=[],c=[],d=0;d<n.length;d++){var h=a[r=n[d]];for(var m in h){var f=h[m],y=1,g=l[m],v=qe[g],b=$e(y,v,g),_=R.MACSTRING(f,b);void 0===_&&(y=0,(g=t.indexOf(m))<0&&(g=t.length,t.push(m)),v=4,_=R.UTF16(f));var x=rt(_,c);u.push(tt(y,v,g,r,_.length,x));var S=p[m];if(void 0!==S){var w=R.UTF16(f),M=rt(w,c);u.push(tt(3,1,S,r,w.length,M))}}}u.sort(function(e,t){return e.platformID-t.platformID||e.encodingID-t.encodingID||e.languageID-t.languageID||e.nameID-t.nameID});for(var E=new $.Table("name",[{name:"format",type:"USHORT",value:0},{name:"count",type:"USHORT",value:u.length},{name:"stringOffset",type:"USHORT",value:6+12*u.length}]),T=0;T<u.length;T++)E.fields.push({name:"record_"+T,type:"RECORD",value:u[T]});return E.fields.push({name:"strings",type:"LITERAL",value:c}),E}},at=[{begin:0,end:127},{begin:128,end:255},{begin:256,end:383},{begin:384,end:591},{begin:592,end:687},{begin:688,end:767},{begin:768,end:879},{begin:880,end:1023},{begin:11392,end:11519},{begin:1024,end:1279},{begin:1328,end:1423},{begin:1424,end:1535},{begin:42240,end:42559},{begin:1536,end:1791},{begin:1984,end:2047},{begin:2304,end:2431},{begin:2432,end:2559},{begin:2560,end:2687},{begin:2688,end:2815},{begin:2816,end:2943},{begin:2944,end:3071},{begin:3072,end:3199},{begin:3200,end:3327},{begin:3328,end:3455},{begin:3584,end:3711},{begin:3712,end:3839},{begin:4256,end:4351},{begin:6912,end:7039},{begin:4352,end:4607},{begin:7680,end:7935},{begin:7936,end:8191},{begin:8192,end:8303},{begin:8304,end:8351},{begin:8352,end:8399},{begin:8400,end:8447},{begin:8448,end:8527},{begin:8528,end:8591},{begin:8592,end:8703},{begin:8704,end:8959},{begin:8960,end:9215},{begin:9216,end:9279},{begin:9280,end:9311},{begin:9312,end:9471},{begin:9472,end:9599},{begin:9600,end:9631},{begin:9632,end:9727},{begin:9728,end:9983},{begin:9984,end:10175},{begin:12288,end:12351},{begin:12352,end:12447},{begin:12448,end:12543},{begin:12544,end:12591},{begin:12592,end:12687},{begin:43072,end:43135},{begin:12800,end:13055},{begin:13056,end:13311},{begin:44032,end:55215},{begin:55296,end:57343},{begin:67840,end:67871},{begin:19968,end:40959},{begin:57344,end:63743},{begin:12736,end:12783},{begin:64256,end:64335},{begin:64336,end:65023},{begin:65056,end:65071},{begin:65040,end:65055},{begin:65104,end:65135},{begin:65136,end:65279},{begin:65280,end:65519},{begin:65520,end:65535},{begin:3840,end:4095},{begin:1792,end:1871},{begin:1920,end:1983},{begin:3456,end:3583},{begin:4096,end:4255},{begin:4608,end:4991},{begin:5024,end:5119},{begin:5120,end:5759},{begin:5760,end:5791},{begin:5792,end:5887},{begin:6016,end:6143},{begin:6144,end:6319},{begin:10240,end:10495},{begin:40960,end:42127},{begin:5888,end:5919},{begin:66304,end:66351},{begin:66352,end:66383},{begin:66560,end:66639},{begin:118784,end:119039},{begin:119808,end:120831},{begin:1044480,end:1048573},{begin:65024,end:65039},{begin:917504,end:917631},{begin:6400,end:6479},{begin:6480,end:6527},{begin:6528,end:6623},{begin:6656,end:6687},{begin:11264,end:11359},{begin:11568,end:11647},{begin:19904,end:19967},{begin:43008,end:43055},{begin:65536,end:65663},{begin:65856,end:65935},{begin:66432,end:66463},{begin:66464,end:66527},{begin:66640,end:66687},{begin:66688,end:66735},{begin:67584,end:67647},{begin:68096,end:68191},{begin:119552,end:119647},{begin:73728,end:74751},{begin:119648,end:119679},{begin:7040,end:7103},{begin:7168,end:7247},{begin:7248,end:7295},{begin:43136,end:43231},{begin:43264,end:43311},{begin:43312,end:43359},{begin:43520,end:43615},{begin:65936,end:65999},{begin:66e3,end:66047},{begin:66208,end:66271},{begin:127024,end:127135}];var ot={parse:function(e,t){var r={},n=new se.Parser(e,t);r.version=n.parseUShort(),r.xAvgCharWidth=n.parseShort(),r.usWeightClass=n.parseUShort(),r.usWidthClass=n.parseUShort(),r.fsType=n.parseUShort(),r.ySubscriptXSize=n.parseShort(),r.ySubscriptYSize=n.parseShort(),r.ySubscriptXOffset=n.parseShort(),r.ySubscriptYOffset=n.parseShort(),r.ySuperscriptXSize=n.parseShort(),r.ySuperscriptYSize=n.parseShort(),r.ySuperscriptXOffset=n.parseShort(),r.ySuperscriptYOffset=n.parseShort(),r.yStrikeoutSize=n.parseShort(),r.yStrikeoutPosition=n.parseShort(),r.sFamilyClass=n.parseShort(),r.panose=[];for(var a=0;a<10;a++)r.panose[a]=n.parseByte();return r.ulUnicodeRange1=n.parseULong(),r.ulUnicodeRange2=n.parseULong(),r.ulUnicodeRange3=n.parseULong(),r.ulUnicodeRange4=n.parseULong(),r.achVendID=String.fromCharCode(n.parseByte(),n.parseByte(),n.parseByte(),n.parseByte()),r.fsSelection=n.parseUShort(),r.usFirstCharIndex=n.parseUShort(),r.usLastCharIndex=n.parseUShort(),r.sTypoAscender=n.parseShort(),r.sTypoDescender=n.parseShort(),r.sTypoLineGap=n.parseShort(),r.usWinAscent=n.parseUShort(),r.usWinDescent=n.parseUShort(),1<=r.version&&(r.ulCodePageRange1=n.parseULong(),r.ulCodePageRange2=n.parseULong()),2<=r.version&&(r.sxHeight=n.parseShort(),r.sCapHeight=n.parseShort(),r.usDefaultChar=n.parseUShort(),r.usBreakChar=n.parseUShort(),r.usMaxContent=n.parseUShort()),r},make:function(e){return new $.Table("OS/2",[{name:"version",type:"USHORT",value:3},{name:"xAvgCharWidth",type:"SHORT",value:0},{name:"usWeightClass",type:"USHORT",value:0},{name:"usWidthClass",type:"USHORT",value:0},{name:"fsType",type:"USHORT",value:0},{name:"ySubscriptXSize",type:"SHORT",value:650},{name:"ySubscriptYSize",type:"SHORT",value:699},{name:"ySubscriptXOffset",type:"SHORT",value:0},{name:"ySubscriptYOffset",type:"SHORT",value:140},{name:"ySuperscriptXSize",type:"SHORT",value:650},{name:"ySuperscriptYSize",type:"SHORT",value:699},{name:"ySuperscriptXOffset",type:"SHORT",value:0},{name:"ySuperscriptYOffset",type:"SHORT",value:479},{name:"yStrikeoutSize",type:"SHORT",value:49},{name:"yStrikeoutPosition",type:"SHORT",value:258},{name:"sFamilyClass",type:"SHORT",value:0},{name:"bFamilyType",type:"BYTE",value:0},{name:"bSerifStyle",type:"BYTE",value:0},{name:"bWeight",type:"BYTE",value:0},{name:"bProportion",type:"BYTE",value:0},{name:"bContrast",type:"BYTE",value:0},{name:"bStrokeVariation",type:"BYTE",value:0},{name:"bArmStyle",type:"BYTE",value:0},{name:"bLetterform",type:"BYTE",value:0},{name:"bMidline",type:"BYTE",value:0},{name:"bXHeight",type:"BYTE",value:0},{name:"ulUnicodeRange1",type:"ULONG",value:0},{name:"ulUnicodeRange2",type:"ULONG",value:0},{name:"ulUnicodeRange3",type:"ULONG",value:0},{name:"ulUnicodeRange4",type:"ULONG",value:0},{name:"achVendID",type:"CHARARRAY",value:"XXXX"},{name:"fsSelection",type:"USHORT",value:0},{name:"usFirstCharIndex",type:"USHORT",value:0},{name:"usLastCharIndex",type:"USHORT",value:0},{name:"sTypoAscender",type:"SHORT",value:0},{name:"sTypoDescender",type:"SHORT",value:0},{name:"sTypoLineGap",type:"SHORT",value:0},{name:"usWinAscent",type:"USHORT",value:0},{name:"usWinDescent",type:"USHORT",value:0},{name:"ulCodePageRange1",type:"ULONG",value:0},{name:"ulCodePageRange2",type:"ULONG",value:0},{name:"sxHeight",type:"SHORT",value:0},{name:"sCapHeight",type:"SHORT",value:0},{name:"usDefaultChar",type:"USHORT",value:0},{name:"usBreakChar",type:"USHORT",value:0},{name:"usMaxContext",type:"USHORT",value:0}],e)},unicodeRanges:at,getUnicodeRange:function(e){for(var t=0;t<at.length;t+=1){var r=at[t];if(e>=r.begin&&e<r.end)return t}return-1}};var it={parse:function(e,t){var r={},n=new se.Parser(e,t);switch(r.version=n.parseVersion(),r.italicAngle=n.parseFixed(),r.underlinePosition=n.parseShort(),r.underlineThickness=n.parseShort(),r.isFixedPitch=n.parseULong(),r.minMemType42=n.parseULong(),r.maxMemType42=n.parseULong(),r.minMemType1=n.parseULong(),r.maxMemType1=n.parseULong(),r.version){case 1:r.names=de.slice();break;case 2:r.numberOfGlyphs=n.parseUShort(),r.glyphNameIndex=new Array(r.numberOfGlyphs);for(var a=0;a<r.numberOfGlyphs;a++)r.glyphNameIndex[a]=n.parseUShort();r.names=[];for(var o=0;o<r.numberOfGlyphs;o++)if(r.glyphNameIndex[o]>=de.length){var i=n.parseChar();r.names.push(n.parseString(i))}break;case 2.5:r.numberOfGlyphs=n.parseUShort(),r.offset=new Array(r.numberOfGlyphs);for(var s=0;s<r.numberOfGlyphs;s++)r.offset[s]=n.parseChar()}return r},make:function(){return new $.Table("post",[{name:"version",type:"FIXED",value:196608},{name:"italicAngle",type:"FIXED",value:0},{name:"underlinePosition",type:"FWORD",value:0},{name:"underlineThickness",type:"FWORD",value:0},{name:"isFixedPitch",type:"ULONG",value:0},{name:"minMemType42",type:"ULONG",value:0},{name:"maxMemType42",type:"ULONG",value:0},{name:"minMemType1",type:"ULONG",value:0},{name:"maxMemType1",type:"ULONG",value:0}])}},st=new Array(9);st[1]=function(){var e=this.offset+this.relativeOffset,t=this.parseUShort();return 1===t?{substFormat:1,coverage:this.parsePointer(oe.coverage),deltaGlyphId:this.parseUShort()}:2===t?{substFormat:2,coverage:this.parsePointer(oe.coverage),substitute:this.parseOffset16List()}:void L.assert(!1,"0x"+e.toString(16)+": lookup type 1 format must be 1 or 2.")},st[2]=function(){var e=this.parseUShort();return L.argument(1===e,"GSUB Multiple Substitution Subtable identifier-format must be 1"),{substFormat:e,coverage:this.parsePointer(oe.coverage),sequences:this.parseListOfLists()}},st[3]=function(){var e=this.parseUShort();return L.argument(1===e,"GSUB Alternate Substitution Subtable identifier-format must be 1"),{substFormat:e,coverage:this.parsePointer(oe.coverage),alternateSets:this.parseListOfLists()}},st[4]=function(){var e=this.parseUShort();return L.argument(1===e,"GSUB ligature table identifier-format must be 1"),{substFormat:e,coverage:this.parsePointer(oe.coverage),ligatureSets:this.parseListOfLists(function(){return{ligGlyph:this.parseUShort(),components:this.parseUShortList(this.parseUShort()-1)}})}};var lt={sequenceIndex:oe.uShort,lookupListIndex:oe.uShort};st[5]=function(){var e=this.offset+this.relativeOffset,t=this.parseUShort();if(1===t)return{substFormat:t,coverage:this.parsePointer(oe.coverage),ruleSets:this.parseListOfLists(function(){var e=this.parseUShort(),t=this.parseUShort();return{input:this.parseUShortList(e-1),lookupRecords:this.parseRecordList(t,lt)}})};if(2===t)return{substFormat:t,coverage:this.parsePointer(oe.coverage),classDef:this.parsePointer(oe.classDef),classSets:this.parseListOfLists(function(){var e=this.parseUShort(),t=this.parseUShort();return{classes:this.parseUShortList(e-1),lookupRecords:this.parseRecordList(t,lt)}})};if(3===t){var r=this.parseUShort(),n=this.parseUShort();return{substFormat:t,coverages:this.parseList(r,oe.pointer(oe.coverage)),lookupRecords:this.parseRecordList(n,lt)}}L.assert(!1,"0x"+e.toString(16)+": lookup type 5 format must be 1, 2 or 3.")},st[6]=function(){var e=this.offset+this.relativeOffset,t=this.parseUShort();return 1===t?{substFormat:1,coverage:this.parsePointer(oe.coverage),chainRuleSets:this.parseListOfLists(function(){return{backtrack:this.parseUShortList(),input:this.parseUShortList(this.parseShort()-1),lookahead:this.parseUShortList(),lookupRecords:this.parseRecordList(lt)}})}:2===t?{substFormat:2,coverage:this.parsePointer(oe.coverage),backtrackClassDef:this.parsePointer(oe.classDef),inputClassDef:this.parsePointer(oe.classDef),lookaheadClassDef:this.parsePointer(oe.classDef),chainClassSet:this.parseListOfLists(function(){return{backtrack:this.parseUShortList(),input:this.parseUShortList(this.parseShort()-1),lookahead:this.parseUShortList(),lookupRecords:this.parseRecordList(lt)}})}:3===t?{substFormat:3,backtrackCoverage:this.parseList(oe.pointer(oe.coverage)),inputCoverage:this.parseList(oe.pointer(oe.coverage)),lookaheadCoverage:this.parseList(oe.pointer(oe.coverage)),lookupRecords:this.parseRecordList(lt)}:void L.assert(!1,"0x"+e.toString(16)+": lookup type 6 format must be 1, 2 or 3.")},st[7]=function(){var e=this.parseUShort();L.argument(1===e,"GSUB Extension Substitution subtable identifier-format must be 1");var t=this.parseUShort(),r=new oe(this.data,this.offset+this.parseULong());return{substFormat:1,lookupType:t,extension:st[t].call(r)}},st[8]=function(){var e=this.parseUShort();return L.argument(1===e,"GSUB Reverse Chaining Contextual Single Substitution Subtable identifier-format must be 1"),{substFormat:e,coverage:this.parsePointer(oe.coverage),backtrackCoverage:this.parseList(oe.pointer(oe.coverage)),lookaheadCoverage:this.parseList(oe.pointer(oe.coverage)),substitutes:this.parseUShortList()}};var pt=new Array(9);pt[1]=function(e){return 1===e.substFormat?new $.Table("substitutionTable",[{name:"substFormat",type:"USHORT",value:1},{name:"coverage",type:"TABLE",value:new $.Coverage(e.coverage)},{name:"deltaGlyphID",type:"USHORT",value:e.deltaGlyphId}]):new $.Table("substitutionTable",[{name:"substFormat",type:"USHORT",value:2},{name:"coverage",type:"TABLE",value:new $.Coverage(e.coverage)}].concat($.ushortList("substitute",e.substitute)))},pt[3]=function(e){return L.assert(1===e.substFormat,"Lookup type 3 substFormat must be 1."),new $.Table("substitutionTable",[{name:"substFormat",type:"USHORT",value:1},{name:"coverage",type:"TABLE",value:new $.Coverage(e.coverage)}].concat($.tableList("altSet",e.alternateSets,function(e){return new $.Table("alternateSetTable",$.ushortList("alternate",e))})))},pt[4]=function(e){return L.assert(1===e.substFormat,"Lookup type 4 substFormat must be 1."),new $.Table("substitutionTable",[{name:"substFormat",type:"USHORT",value:1},{name:"coverage",type:"TABLE",value:new $.Coverage(e.coverage)}].concat($.tableList("ligSet",e.ligatureSets,function(e){return new $.Table("ligatureSetTable",$.tableList("ligature",e,function(e){return new $.Table("ligatureTable",[{name:"ligGlyph",type:"USHORT",value:e.ligGlyph}].concat($.ushortList("component",e.components,e.components.length+1)))}))})))};var ut={parse:function(e,t){var r=new oe(e,t=t||0),n=r.parseVersion(1);return L.argument(1===n||1.1===n,"Unsupported GSUB table version."),1===n?{version:n,scripts:r.parseScriptList(),features:r.parseFeatureList(),lookups:r.parseLookupList(st)}:{version:n,scripts:r.parseScriptList(),features:r.parseFeatureList(),lookups:r.parseLookupList(st),variations:r.parseFeatureVariationsList()}},make:function(e){return new $.Table("GSUB",[{name:"version",type:"ULONG",value:65536},{name:"scripts",type:"TABLE",value:new $.ScriptList(e.scripts)},{name:"features",type:"TABLE",value:new $.FeatureList(e.features)},{name:"lookups",type:"TABLE",value:new $.LookupList(e.lookups,pt)}])}};var ct={parse:function(e,t){var r=new se.Parser(e,t),n=r.parseULong();L.argument(1===n,"Unsupported META table version."),r.parseULong(),r.parseULong();for(var a=r.parseULong(),o={},i=0;i<a;i++){var s=r.parseTag(),l=r.parseULong(),p=r.parseULong(),u=P.UTF8(e,t+l,p);o[s]=u}return o},make:function(e){var t=Object.keys(e).length,r="",n=16+12*t,a=new $.Table("meta",[{name:"version",type:"ULONG",value:1},{name:"flags",type:"ULONG",value:0},{name:"offset",type:"ULONG",value:n},{name:"numTags",type:"ULONG",value:t}]);for(var o in e){var i=r.length;r+=e[o],a.fields.push({name:"tag "+o,type:"TAG",value:o}),a.fields.push({name:"offset "+o,type:"ULONG",value:n+i}),a.fields.push({name:"length "+o,type:"ULONG",value:e[o].length})}return a.fields.push({name:"stringPool",type:"CHARARRAY",value:r}),a}};function dt(e){return Math.log(e)/Math.log(2)|0}function ht(e){for(;e.length%4!=0;)e.push(0);for(var t=0,r=0;r<e.length;r+=4)t+=(e[r]<<24)+(e[r+1]<<16)+(e[r+2]<<8)+e[r+3];return t%=Math.pow(2,32)}function mt(e,t,r,n){return new $.Record("Table Record",[{name:"tag",type:"TAG",value:void 0!==e?e:""},{name:"checkSum",type:"ULONG",value:void 0!==t?t:0},{name:"offset",type:"ULONG",value:void 0!==r?r:0},{name:"length",type:"ULONG",value:void 0!==n?n:0}])}function ft(e){var t=new $.Table("sfnt",[{name:"version",type:"TAG",value:"OTTO"},{name:"numTables",type:"USHORT",value:0},{name:"searchRange",type:"USHORT",value:0},{name:"entrySelector",type:"USHORT",value:0},{name:"rangeShift",type:"USHORT",value:0}]);t.tables=e,t.numTables=e.length;var r=Math.pow(2,dt(t.numTables));t.searchRange=16*r,t.entrySelector=dt(r),t.rangeShift=16*t.numTables-t.searchRange;for(var n=[],a=[],o=t.sizeOf()+mt().sizeOf()*t.numTables;o%4!=0;)o+=1,a.push({name:"padding",type:"BYTE",value:0});for(var i=0;i<e.length;i+=1){var s=e[i];L.argument(4===s.tableName.length,"Table name"+s.tableName+" is invalid.");var l=s.sizeOf(),p=mt(s.tableName,ht(s.encode()),o,l);for(n.push({name:p.tag+" Table Record",type:"RECORD",value:p}),a.push({name:s.tableName+" table",type:"RECORD",value:s}),o+=l,L.argument(!isNaN(o),"Something went wrong calculating the offset.");o%4!=0;)o+=1,a.push({name:"padding",type:"BYTE",value:0})}return n.sort(function(e,t){return e.value.tag>t.value.tag?1:-1}),t.fields=t.fields.concat(n),t.fields=t.fields.concat(a),t}function yt(e,t,r){for(var n=0;n<t.length;n+=1){var a=e.charToGlyphIndex(t[n]);if(0<a)return e.glyphs.get(a).getMetrics()}return r}var gt={make:ft,fontToTable:function(e){for(var t,r=[],n=[],a=[],o=[],i=[],s=[],l=[],p=0,u=0,c=0,d=0,h=0,m=0;m<e.glyphs.length;m+=1){var f=e.glyphs.get(m),y=0|f.unicode;if(isNaN(f.advanceWidth))throw new Error("Glyph "+f.name+" ("+m+"): advanceWidth is not a number.");(y<t||void 0===t)&&0<y&&(t=y),p<y&&(p=y);var g=ot.getUnicodeRange(y);if(g<32)u|=1<<g;else if(g<64)c|=1<<g-32;else if(g<96)d|=1<<g-64;else{if(!(g<123))throw new Error("Unicode ranges bits > 123 are reserved for internal usage");h|=1<<g-96}if(".notdef"!==f.name){var v=f.getMetrics();r.push(v.xMin),n.push(v.yMin),a.push(v.xMax),o.push(v.yMax),s.push(v.leftSideBearing),l.push(v.rightSideBearing),i.push(f.advanceWidth)}}var b={xMin:Math.min.apply(null,r),yMin:Math.min.apply(null,n),xMax:Math.max.apply(null,a),yMax:Math.max.apply(null,o),advanceWidthMax:Math.max.apply(null,i),advanceWidthAvg:function(e){for(var t=0,r=0;r<e.length;r+=1)t+=e[r];return t/e.length}(i),minLeftSideBearing:Math.min.apply(null,s),maxLeftSideBearing:Math.max.apply(null,s),minRightSideBearing:Math.min.apply(null,l)};b.ascender=e.ascender,b.descender=e.descender;var _=Ge.make({flags:3,unitsPerEm:e.unitsPerEm,xMin:b.xMin,yMin:b.yMin,xMax:b.xMax,yMax:b.yMax,lowestRecPPEM:3,createdTimestamp:e.createdTimestamp}),x=je.make({ascender:b.ascender,descender:b.descender,advanceWidthMax:b.advanceWidthMax,minLeftSideBearing:b.minLeftSideBearing,minRightSideBearing:b.minRightSideBearing,xMaxExtent:b.maxLeftSideBearing+(b.xMax-b.xMin),numberOfHMetrics:e.glyphs.length}),S=He.make(e.glyphs.length),w=ot.make({xAvgCharWidth:Math.round(b.advanceWidthAvg),usWeightClass:e.tables.os2.usWeightClass,usWidthClass:e.tables.os2.usWidthClass,usFirstCharIndex:t,usLastCharIndex:p,ulUnicodeRange1:u,ulUnicodeRange2:c,ulUnicodeRange3:d,ulUnicodeRange4:h,fsSelection:e.tables.os2.fsSelection,sTypoAscender:b.ascender,sTypoDescender:b.descender,sTypoLineGap:0,usWinAscent:b.yMax,usWinDescent:Math.abs(b.yMin),ulCodePageRange1:1,sxHeight:yt(e,"xyvw",{yMax:Math.round(b.ascender/2)}).yMax,sCapHeight:yt(e,"HIKLEFJMNTZBDPRAGOQSUVWXY",b).yMax,usDefaultChar:e.hasChar(" ")?32:0,usBreakChar:e.hasChar(" ")?32:0}),M=Ve.make(e.glyphs),E=le.make(e.glyphs),T=e.getEnglishName("fontFamily"),C=e.getEnglishName("fontSubfamily"),N=T+" "+C,O=e.getEnglishName("postScriptName");O=O||T.replace(/\s/g,"")+"-"+C;var L={};for(var I in e.names)L[I]=e.names[I];L.uniqueID||(L.uniqueID={en:e.getEnglishName("manufacturer")+":"+N}),L.postScriptName||(L.postScriptName={en:O}),L.preferredFamily||(L.preferredFamily=e.names.fontFamily),L.preferredSubfamily||(L.preferredSubfamily=e.names.fontSubfamily);var P=[],R=nt.make(L,P),D=0<P.length?ze.make(P):void 0,A=it.make(),k=Be.make(e.glyphs,{version:e.getEnglishName("version"),fullName:N,familyName:T,weightName:C,postScriptName:O,unitsPerEm:e.unitsPerEm,fontBBox:[0,b.yMin,b.ascender,b.advanceWidthMax]}),F=e.metas&&0<Object.keys(e.metas).length?ct.make(e.metas):void 0,U=[_,x,S,w,R,E,A,k,M];D&&U.push(D),e.tables.gsub&&U.push(ut.make(e.tables.gsub)),F&&U.push(F);for(var B=ft(U),G=ht(B.encode()),j=B.fields,V=!1,z=0;z<j.length;z+=1)if("head table"===j[z].name){j[z].value.checkSumAdjustment=2981146554-G,V=!0;break}if(!V)throw new Error("Could not find head table with checkSum to adjust.");return B},computeCheckSum:ht};function vt(e,t){for(var r=0,n=e.length-1;r<=n;){var a=r+n>>>1,o=e[a].tag;if(o===t)return a;o<t?r=1+a:n=a-1}return-r-1}function bt(e,t){for(var r=0,n=e.length-1;r<=n;){var a=r+n>>>1,o=e[a];if(o===t)return a;o<t?r=1+a:n=a-1}return-r-1}function _t(e,t){for(var r,n=0,a=e.length-1;n<=a;){var o=n+a>>>1,i=(r=e[o]).start;if(i===t)return r;i<t?n=1+o:a=o-1}if(0<n)return t>(r=e[n-1]).end?0:r}function xt(e,t){this.font=e,this.tableName=t}function St(e){xt.call(this,e,"gpos")}function wt(e){xt.call(this,e,"gsub")}function Mt(e,t){var r=e.length;if(r!==t.length)return!1;for(var n=0;n<r;n++)if(e[n]!==t[n])return!1;return!0}function Et(e,t,r){for(var n=e.subtables,a=0;a<n.length;a++){var o=n[a];if(o.substFormat===t)return o}if(r)return n.push(r),r}function Tt(e){for(var t=new ArrayBuffer(e.length),r=new Uint8Array(t),n=0;n<e.length;++n)r[n]=e[n];return t}function Ct(e,t){if(!e)throw t}function Nt(e,t,r,n,a){var o;return o=0<(t&n)?(o=e.parseByte(),0==(t&a)&&(o=-o),r+o):0<(t&a)?r:r+e.parseShort()}function Ot(e,t,r){var n,a,o=new se.Parser(t,r);if(e.numberOfContours=o.parseShort(),e._xMin=o.parseShort(),e._yMin=o.parseShort(),e._xMax=o.parseShort(),e._yMax=o.parseShort(),0<e.numberOfContours){for(var i=e.endPointIndices=[],s=0;s<e.numberOfContours;s+=1)i.push(o.parseUShort());e.instructionLength=o.parseUShort(),e.instructions=[];for(var l=0;l<e.instructionLength;l+=1)e.instructions.push(o.parseByte());var p=i[i.length-1]+1;n=[];for(var u=0;u<p;u+=1)if(a=o.parseByte(),n.push(a),0<(8&a))for(var c=o.parseByte(),d=0;d<c;d+=1)n.push(a),u+=1;if(L.argument(n.length===p,"Bad flags."),0<i.length){var h,m=[];if(0<p){for(var f=0;f<p;f+=1)a=n[f],(h={}).onCurve=!!(1&a),h.lastPointOfContour=0<=i.indexOf(f),m.push(h);for(var y=0,g=0;g<p;g+=1)a=n[g],(h=m[g]).x=Nt(o,a,y,2,16),y=h.x;for(var v=0,b=0;b<p;b+=1)a=n[b],(h=m[b]).y=Nt(o,a,v,4,32),v=h.y}e.points=m}else e.points=[]}else if(0===e.numberOfContours)e.points=[];else{e.isComposite=!0,e.points=[],e.components=[];for(var _=!0;_;){n=o.parseUShort();var x={glyphIndex:o.parseUShort(),xScale:1,scale01:0,scale10:0,yScale:1,dx:0,dy:0};0<(1&n)?0<(2&n)?(x.dx=o.parseShort(),x.dy=o.parseShort()):x.matchedPoints=[o.parseUShort(),o.parseUShort()]:0<(2&n)?(x.dx=o.parseChar(),x.dy=o.parseChar()):x.matchedPoints=[o.parseByte(),o.parseByte()],0<(8&n)?x.xScale=x.yScale=o.parseF2Dot14():0<(64&n)?(x.xScale=o.parseF2Dot14(),x.yScale=o.parseF2Dot14()):0<(128&n)&&(x.xScale=o.parseF2Dot14(),x.scale01=o.parseF2Dot14(),x.scale10=o.parseF2Dot14(),x.yScale=o.parseF2Dot14()),e.components.push(x),_=!!(32&n)}if(256&n){e.instructionLength=o.parseUShort(),e.instructions=[];for(var S=0;S<e.instructionLength;S+=1)e.instructions.push(o.parseByte())}}}function Lt(e,t){for(var r=[],n=0;n<e.length;n+=1){var a=e[n],o={x:t.xScale*a.x+t.scale01*a.y+t.dx,y:t.scale10*a.x+t.yScale*a.y+t.dy,onCurve:a.onCurve,lastPointOfContour:a.lastPointOfContour};r.push(o)}return r}function It(e){var t=new A;if(!e)return t;for(var r=function(e){for(var t=[],r=[],n=0;n<e.length;n+=1){var a=e[n];r.push(a),a.lastPointOfContour&&(t.push(r),r=[])}return L.argument(0===r.length,"There are still points left in the current contour."),t}(e),n=0;n<r.length;++n){var a=r[n],o=null,i=a[a.length-1],s=a[0];if(i.onCurve)t.moveTo(i.x,i.y);else if(s.onCurve)t.moveTo(s.x,s.y);else{var l={x:.5*(i.x+s.x),y:.5*(i.y+s.y)};t.moveTo(l.x,l.y)}for(var p=0;p<a.length;++p)if(o=i,i=s,s=a[(p+1)%a.length],i.onCurve)t.lineTo(i.x,i.y);else{var u=s;o.onCurve||{x:.5*(i.x+o.x),y:.5*(i.y+o.y)},s.onCurve||(u={x:.5*(i.x+s.x),y:.5*(i.y+s.y)}),t.quadraticCurveTo(i.x,i.y,u.x,u.y)}t.closePath()}return t}function Pt(e,t){if(t.isComposite)for(var r=0;r<t.components.length;r+=1){var n=t.components[r],a=e.get(n.glyphIndex);if(a.getPath(),a.points){var o=void 0;if(void 0===n.matchedPoints)o=Lt(a.points,n);else{if(n.matchedPoints[0]>t.points.length-1||n.matchedPoints[1]>a.points.length-1)throw Error("Matched points out of range in "+t.name);var i=t.points[n.matchedPoints[0]],s=a.points[n.matchedPoints[1]],l={xScale:n.xScale,scale01:n.scale01,scale10:n.scale10,yScale:n.yScale,dx:0,dy:0};s=Lt([s],l)[0],l.dx=i.x-s.x,l.dy=i.y-s.y,o=Lt(a.points,l)}t.points=t.points.concat(o)}}return It(t.points)}(St.prototype=xt.prototype={searchTag:vt,binSearch:bt,getTable:function(e){var t=this.font.tables[this.tableName];return!t&&e&&(t=this.font.tables[this.tableName]=this.createDefaultTable()),t},getScriptNames:function(){var e=this.getTable();return e?e.scripts.map(function(e){return e.tag}):[]},getDefaultScriptName:function(){var e=this.getTable();if(e){for(var t=!1,r=0;r<e.scripts.length;r++){var n=e.scripts[r].tag;if("DFLT"===n)return n;"latn"===n&&(t=!0)}return t?"latn":void 0}},getScriptTable:function(e,t){var r=this.getTable(t);if(r){e=e||"DFLT";var n=r.scripts,a=vt(r.scripts,e);if(0<=a)return n[a].script;if(t){var o={tag:e,script:{defaultLangSys:{reserved:0,reqFeatureIndex:65535,featureIndexes:[]},langSysRecords:[]}};return n.splice(-1-a,0,o),o.script}}},getLangSysTable:function(e,t,r){var n=this.getScriptTable(e,r);if(n){if(!t||"dflt"===t||"DFLT"===t)return n.defaultLangSys;var a=vt(n.langSysRecords,t);if(0<=a)return n.langSysRecords[a].langSys;if(r){var o={tag:t,langSys:{reserved:0,reqFeatureIndex:65535,featureIndexes:[]}};return n.langSysRecords.splice(-1-a,0,o),o.langSys}}},getFeatureTable:function(e,t,r,n){var a=this.getLangSysTable(e,t,n);if(a){for(var o,i=a.featureIndexes,s=this.font.tables[this.tableName].features,l=0;l<i.length;l++)if((o=s[i[l]]).tag===r)return o.feature;if(n){var p=s.length;return L.assert(0===p||r>=s[p-1].tag,"Features must be added in alphabetical order."),o={tag:r,feature:{params:0,lookupListIndexes:[]}},s.push(o),i.push(p),o.feature}}},getLookupTables:function(e,t,r,n,a){var o=this.getFeatureTable(e,t,r,a),i=[];if(o){for(var s,l=o.lookupListIndexes,p=this.font.tables[this.tableName].lookups,u=0;u<l.length;u++)(s=p[l[u]]).lookupType===n&&i.push(s);if(0===i.length&&a){s={lookupType:n,lookupFlag:0,subtables:[],markFilteringSet:void 0};var c=p.length;return p.push(s),l.push(c),[s]}}return i},getGlyphClass:function(e,t){switch(e.format){case 1:return e.startGlyph<=t&&t<e.startGlyph+e.classes.length?e.classes[t-e.startGlyph]:0;case 2:var r=_t(e.ranges,t);return r?r.classId:0}},getCoverageIndex:function(e,t){switch(e.format){case 1:var r=bt(e.glyphs,t);return 0<=r?r:-1;case 2:var n=_t(e.ranges,t);return n?n.index+t-n.start:-1}},expandCoverage:function(e){if(1===e.format)return e.glyphs;for(var t=[],r=e.ranges,n=0;n<r.length;n++)for(var a=r[n],o=a.start,i=a.end,s=o;s<=i;s++)t.push(s);return t}}).init=function(){var e=this.getDefaultScriptName();this.defaultKerningTables=this.getKerningTables(e)},St.prototype.getKerningValue=function(e,t,r){for(var n=0;n<e.length;n++)for(var a=e[n].subtables,o=0;o<a.length;o++){var i=a[o],s=this.getCoverageIndex(i.coverage,t);if(!(s<0))switch(i.posFormat){case 1:for(var l=i.pairSets[s],p=0;p<l.length;p++){var u=l[p];if(u.secondGlyph===r)return u.value1&&u.value1.xAdvance||0}break;case 2:var c=this.getGlyphClass(i.classDef1,t),d=this.getGlyphClass(i.classDef2,r),h=i.classRecords[c][d];return h.value1&&h.value1.xAdvance||0}}return 0},St.prototype.getKerningTables=function(e,t){if(this.font.tables.gpos)return this.getLookupTables(e,t,"kern",2)},(wt.prototype=xt.prototype).createDefaultTable=function(){return{version:1,scripts:[{tag:"DFLT",script:{defaultLangSys:{reserved:0,reqFeatureIndex:65535,featureIndexes:[]},langSysRecords:[]}}],features:[],lookups:[]}},wt.prototype.getSingle=function(e,t,r){for(var n=[],a=this.getLookupTables(t,r,e,1),o=0;o<a.length;o++)for(var i=a[o].subtables,s=0;s<i.length;s++){var l=i[s],p=this.expandCoverage(l.coverage),u=void 0;if(1===l.substFormat){var c=l.deltaGlyphId;for(u=0;u<p.length;u++){var d=p[u];n.push({sub:d,by:d+c})}}else{var h=l.substitute;for(u=0;u<p.length;u++)n.push({sub:p[u],by:h[u]})}}return n},wt.prototype.getAlternates=function(e,t,r){for(var n=[],a=this.getLookupTables(t,r,e,3),o=0;o<a.length;o++)for(var i=a[o].subtables,s=0;s<i.length;s++)for(var l=i[s],p=this.expandCoverage(l.coverage),u=l.alternateSets,c=0;c<p.length;c++)n.push({sub:p[c],by:u[c]});return n},wt.prototype.getLigatures=function(e,t,r){for(var n=[],a=this.getLookupTables(t,r,e,4),o=0;o<a.length;o++)for(var i=a[o].subtables,s=0;s<i.length;s++)for(var l=i[s],p=this.expandCoverage(l.coverage),u=l.ligatureSets,c=0;c<p.length;c++)for(var d=p[c],h=u[c],m=0;m<h.length;m++){var f=h[m];n.push({sub:[d].concat(f.components),by:f.ligGlyph})}return n},wt.prototype.addSingle=function(e,t,r,n){var a=Et(this.getLookupTables(r,n,e,1,!0)[0],2,{substFormat:2,coverage:{format:1,glyphs:[]},substitute:[]});L.assert(1===a.coverage.format,"Ligature: unable to modify coverage table format "+a.coverage.format);var o=t.sub,i=this.binSearch(a.coverage.glyphs,o);i<0&&(i=-1-i,a.coverage.glyphs.splice(i,0,o),a.substitute.splice(i,0,0)),a.substitute[i]=t.by},wt.prototype.addAlternate=function(e,t,r,n){var a=Et(this.getLookupTables(r,n,e,3,!0)[0],1,{substFormat:1,coverage:{format:1,glyphs:[]},alternateSets:[]});L.assert(1===a.coverage.format,"Ligature: unable to modify coverage table format "+a.coverage.format);var o=t.sub,i=this.binSearch(a.coverage.glyphs,o);i<0&&(i=-1-i,a.coverage.glyphs.splice(i,0,o),a.alternateSets.splice(i,0,0)),a.alternateSets[i]=t.by},wt.prototype.addLigature=function(e,t,r,n){var a=this.getLookupTables(r,n,e,4,!0)[0],o=a.subtables[0];o||(o={substFormat:1,coverage:{format:1,glyphs:[]},ligatureSets:[]},a.subtables[0]=o),L.assert(1===o.coverage.format,"Ligature: unable to modify coverage table format "+o.coverage.format);var i=t.sub[0],s=t.sub.slice(1),l={ligGlyph:t.by,components:s},p=this.binSearch(o.coverage.glyphs,i);if(0<=p){for(var u=o.ligatureSets[p],c=0;c<u.length;c++)if(Mt(u[c].components,s))return;u.push(l)}else p=-1-p,o.coverage.glyphs.splice(p,0,i),o.ligatureSets.splice(p,0,[l])},wt.prototype.getFeature=function(e,t,r){if(/ss\d\d/.test(e))return this.getSingle(e,t,r);switch(e){case"aalt":case"salt":return this.getSingle(e,t,r).concat(this.getAlternates(e,t,r));case"dlig":case"liga":case"rlig":return this.getLigatures(e,t,r)}},wt.prototype.add=function(e,t,r,n){if(/ss\d\d/.test(e))return this.addSingle(e,t,r,n);switch(e){case"aalt":case"salt":return"number"==typeof t.by?this.addSingle(e,t,r,n):this.addAlternate(e,t,r,n);case"dlig":case"liga":case"rlig":return this.addLigature(e,t,r,n)}};var Rt,Dt,At,kt,Ft={getPath:It,parse:function(e,t,r,n){for(var a=new xe.GlyphSet(n),o=0;o<r.length-1;o+=1){var i=r[o];i!==r[o+1]?a.push(o,xe.ttfGlyphLoader(n,o,Ot,e,t+i,Pt)):a.push(o,xe.glyphLoader(n,o))}return a}};function Ut(e){this.font=e,this.getCommands=function(e){return Ft.getPath(e).commands},this._fpgmState=this._prepState=void 0,this._errorState=0}function Bt(e){return e}function Gt(e){return Math.sign(e)*Math.round(Math.abs(e))}function jt(e){return Math.sign(e)*Math.round(Math.abs(2*e))/2}function Vt(e){return Math.sign(e)*(Math.round(Math.abs(e)+.5)-.5)}function zt(e){return Math.sign(e)*Math.ceil(Math.abs(e))}function Ht(e){return Math.sign(e)*Math.floor(Math.abs(e))}function Wt(e){var t=this.srPeriod,r=this.srPhase,n=1;return e<0&&(e=-e,n=-1),e+=this.srThreshold-r,e=Math.trunc(e/t)*t,(e+=r)<0?r*n:e*n}var Xt={x:1,y:0,axis:"x",distance:function(e,t,r,n){return(r?e.xo:e.x)-(n?t.xo:t.x)},interpolate:function(e,t,r,n){var a,o,i,s,l,p,u;if(!n||n===this)return a=e.xo-t.xo,o=e.xo-r.xo,l=t.x-t.xo,p=r.x-r.xo,0===(u=(i=Math.abs(a))+(s=Math.abs(o)))?void(e.x=e.xo+(l+p)/2):void(e.x=e.xo+(l*s+p*i)/u);a=n.distance(e,t,!0,!0),o=n.distance(e,r,!0,!0),l=n.distance(t,t,!1,!0),p=n.distance(r,r,!1,!0),0!==(u=(i=Math.abs(a))+(s=Math.abs(o)))?Xt.setRelative(e,e,(l*s+p*i)/u,n,!0):Xt.setRelative(e,e,(l+p)/2,n,!0)},normalSlope:Number.NEGATIVE_INFINITY,setRelative:function(e,t,r,n,a){if(n&&n!==this){var o=a?t.xo:t.x,i=a?t.yo:t.y,s=o+r*n.x,l=i+r*n.y;e.x=s+(e.y-l)/n.normalSlope}else e.x=(a?t.xo:t.x)+r},slope:0,touch:function(e){e.xTouched=!0},touched:function(e){return e.xTouched},untouch:function(e){e.xTouched=!1}},qt={x:0,y:1,axis:"y",distance:function(e,t,r,n){return(r?e.yo:e.y)-(n?t.yo:t.y)},interpolate:function(e,t,r,n){var a,o,i,s,l,p,u;if(!n||n===this)return a=e.yo-t.yo,o=e.yo-r.yo,l=t.y-t.yo,p=r.y-r.yo,0===(u=(i=Math.abs(a))+(s=Math.abs(o)))?void(e.y=e.yo+(l+p)/2):void(e.y=e.yo+(l*s+p*i)/u);a=n.distance(e,t,!0,!0),o=n.distance(e,r,!0,!0),l=n.distance(t,t,!1,!0),p=n.distance(r,r,!1,!0),0!==(u=(i=Math.abs(a))+(s=Math.abs(o)))?qt.setRelative(e,e,(l*s+p*i)/u,n,!0):qt.setRelative(e,e,(l+p)/2,n,!0)},normalSlope:0,setRelative:function(e,t,r,n,a){if(n&&n!==this){var o=a?t.xo:t.x,i=a?t.yo:t.y,s=o+r*n.x,l=i+r*n.y;e.y=l+n.normalSlope*(e.x-s)}else e.y=(a?t.yo:t.y)+r},slope:Number.POSITIVE_INFINITY,touch:function(e){e.yTouched=!0},touched:function(e){return e.yTouched},untouch:function(e){e.yTouched=!1}};function Yt(e,t){this.x=e,this.y=t,this.axis=void 0,this.slope=t/e,this.normalSlope=-e/t,Object.freeze(this)}function Zt(e,t){var r=Math.sqrt(e*e+t*t);return t/=r,1===(e/=r)&&0===t?Xt:0===e&&1===t?qt:new Yt(e,t)}function Qt(e,t,r,n){this.x=this.xo=Math.round(64*e)/64,this.y=this.yo=Math.round(64*t)/64,this.lastPointOfContour=r,this.onCurve=n,this.prevPointOnContour=void 0,this.nextPointOnContour=void 0,this.xTouched=!1,this.yTouched=!1,Object.preventExtensions(this)}Object.freeze(Xt),Object.freeze(qt),Yt.prototype.distance=function(e,t,r,n){return this.x*Xt.distance(e,t,r,n)+this.y*qt.distance(e,t,r,n)},Yt.prototype.interpolate=function(e,t,r,n){var a,o,i,s,l,p,u;i=n.distance(e,t,!0,!0),s=n.distance(e,r,!0,!0),a=n.distance(t,t,!1,!0),o=n.distance(r,r,!1,!0),0!==(u=(l=Math.abs(i))+(p=Math.abs(s)))?this.setRelative(e,e,(a*p+o*l)/u,n,!0):this.setRelative(e,e,(a+o)/2,n,!0)},Yt.prototype.setRelative=function(e,t,r,n,a){n=n||this;var o=a?t.xo:t.x,i=a?t.yo:t.y,s=o+r*n.x,l=i+r*n.y,p=n.normalSlope,u=this.slope,c=e.x,d=e.y;e.x=(u*c-p*s+l-d)/(u-p),e.y=u*(e.x-c)+d},Yt.prototype.touch=function(e){e.xTouched=!0,e.yTouched=!0},Qt.prototype.nextTouched=function(e){for(var t=this.nextPointOnContour;!e.touched(t)&&t!==this;)t=t.nextPointOnContour;return t},Qt.prototype.prevTouched=function(e){for(var t=this.prevPointOnContour;!e.touched(t)&&t!==this;)t=t.prevPointOnContour;return t};var Kt=Object.freeze(new Qt(0,0)),Jt={cvCutIn:17/16,deltaBase:9,deltaShift:.125,loop:1,minDis:1,autoFlip:!0};function $t(e,t){switch(this.env=e,this.stack=[],this.prog=t,e){case"glyf":this.zp0=this.zp1=this.zp2=1,this.rp0=this.rp1=this.rp2=0;case"prep":this.fv=this.pv=this.dpv=Xt,this.round=Gt}}function er(e){for(var t=e.tZone=new Array(e.gZone.length),r=0;r<t.length;r++)t[r]=new Qt(0,0)}function tr(e,t){var r,n=e.prog,a=e.ip,o=1;do{if(88===(r=n[++a]))o++;else if(89===r)o--;else if(64===r)a+=n[a+1]+1;else if(65===r)a+=2*n[a+1]+1;else if(176<=r&&r<=183)a+=r-176+1;else if(184<=r&&r<=191)a+=2*(r-184+1);else if(t&&1===o&&27===r)break}while(0<o);e.ip=a}function rr(e,t){E.DEBUG&&console.log(t.step,"SVTCA["+e.axis+"]"),t.fv=t.pv=t.dpv=e}function nr(e,t){E.DEBUG&&console.log(t.step,"SPVTCA["+e.axis+"]"),t.pv=t.dpv=e}function ar(e,t){E.DEBUG&&console.log(t.step,"SFVTCA["+e.axis+"]"),t.fv=e}function or(e,t){var r,n,a=t.stack,o=a.pop(),i=a.pop(),s=t.z2[o],l=t.z1[i];E.DEBUG&&console.log("SPVTL["+e+"]",o,i),n=e?(r=s.y-l.y,l.x-s.x):(r=l.x-s.x,l.y-s.y),t.pv=t.dpv=Zt(r,n)}function ir(e,t){var r,n,a=t.stack,o=a.pop(),i=a.pop(),s=t.z2[o],l=t.z1[i];E.DEBUG&&console.log("SFVTL["+e+"]",o,i),n=e?(r=s.y-l.y,l.x-s.x):(r=l.x-s.x,l.y-s.y),t.fv=Zt(r,n)}function sr(e){E.DEBUG&&console.log(e.step,"POP[]"),e.stack.pop()}function lr(e,t){var r=t.stack.pop(),n=t.z0[r],a=t.fv,o=t.pv;E.DEBUG&&console.log(t.step,"MDAP["+e+"]",r);var i=o.distance(n,Kt);e&&(i=t.round(i)),a.setRelative(n,Kt,i,o),a.touch(n),t.rp0=t.rp1=r}function pr(e,t){var r,n,a,o=t.z2,i=o.length-2;E.DEBUG&&console.log(t.step,"IUP["+e.axis+"]");for(var s=0;s<i;s++)r=o[s],e.touched(r)||(n=r.prevTouched(e))!==r&&(n===(a=r.nextTouched(e))&&e.setRelative(r,r,e.distance(n,n,!1,!0),e,!0),e.interpolate(r,n,a,e))}function ur(e,t){for(var r=t.stack,n=e?t.rp1:t.rp2,a=(e?t.z0:t.z1)[n],o=t.fv,i=t.pv,s=t.loop,l=t.z2;s--;){var p=r.pop(),u=l[p],c=i.distance(a,a,!1,!0);o.setRelative(u,u,c,i),o.touch(u),E.DEBUG&&console.log(t.step,(1<t.loop?"loop "+(t.loop-s)+": ":"")+"SHP["+(e?"rp1":"rp2")+"]",p)}t.loop=1}function cr(e,t){var r=t.stack,n=e?t.rp1:t.rp2,a=(e?t.z0:t.z1)[n],o=t.fv,i=t.pv,s=r.pop(),l=t.z2[t.contours[s]],p=l;E.DEBUG&&console.log(t.step,"SHC["+e+"]",s);for(var u=i.distance(a,a,!1,!0);p!==a&&o.setRelative(p,p,u,i),(p=p.nextPointOnContour)!==l;);}function dr(e,t){var r,n,a=t.stack,o=e?t.rp1:t.rp2,i=(e?t.z0:t.z1)[o],s=t.fv,l=t.pv,p=a.pop();switch(E.DEBUG&&console.log(t.step,"SHZ["+e+"]",p),p){case 0:r=t.tZone;break;case 1:r=t.gZone;break;default:throw new Error("Invalid zone")}for(var u=l.distance(i,i,!1,!0),c=r.length-2,d=0;d<c;d++)n=r[d],s.setRelative(n,n,u,l)}function hr(e,t){var r=t.stack,n=r.pop()/64,a=r.pop(),o=t.z1[a],i=t.z0[t.rp0],s=t.fv,l=t.pv;s.setRelative(o,i,n,l),s.touch(o),E.DEBUG&&console.log(t.step,"MSIRP["+e+"]",n,a),t.rp1=t.rp0,t.rp2=a,e&&(t.rp0=a)}function mr(e,t){var r=t.stack,n=r.pop(),a=r.pop(),o=t.z0[a],i=t.fv,s=t.pv,l=t.cvt[n];E.DEBUG&&console.log(t.step,"MIAP["+e+"]",n,"(",l,")",a);var p=s.distance(o,Kt);e&&(Math.abs(p-l)<t.cvCutIn&&(p=l),p=t.round(p)),i.setRelative(o,Kt,p,s),0===t.zp0&&(o.xo=o.x,o.yo=o.y),i.touch(o),t.rp0=t.rp1=a}function fr(e,t){var r=t.stack,n=r.pop(),a=t.z2[n];E.DEBUG&&console.log(t.step,"GC["+e+"]",n),r.push(64*t.dpv.distance(a,Kt,e,!1))}function yr(e,t){var r=t.stack,n=r.pop(),a=r.pop(),o=t.z1[n],i=t.z0[a],s=t.dpv.distance(i,o,e,e);E.DEBUG&&console.log(t.step,"MD["+e+"]",n,a,"->",s),t.stack.push(Math.round(64*s))}function gr(e,t){var r=t.stack,n=r.pop(),a=t.fv,o=t.pv,i=t.ppem,s=t.deltaBase+16*(e-1),l=t.deltaShift,p=t.z0;E.DEBUG&&console.log(t.step,"DELTAP["+e+"]",n,r);for(var u=0;u<n;u++){var c=r.pop(),d=r.pop();if(s+((240&d)>>4)===i){var h=(15&d)-8;0<=h&&h++,E.DEBUG&&console.log(t.step,"DELTAPFIX",c,"by",h*l);var m=p[c];a.setRelative(m,m,h*l,o)}}}function vr(e,t){var r=t.stack,n=r.pop();E.DEBUG&&console.log(t.step,"ROUND[]"),r.push(64*t.round(n/64))}function br(e,t){var r=t.stack,n=r.pop(),a=t.ppem,o=t.deltaBase+16*(e-1),i=t.deltaShift;E.DEBUG&&console.log(t.step,"DELTAC["+e+"]",n,r);for(var s=0;s<n;s++){var l=r.pop(),p=r.pop();if(o+((240&p)>>4)===a){var u=(15&p)-8;0<=u&&u++;var c=u*i;E.DEBUG&&console.log(t.step,"DELTACFIX",l,"by",c),t.cvt[l]+=c}}}function _r(e,t){var r,n,a=t.stack,o=a.pop(),i=a.pop(),s=t.z2[o],l=t.z1[i];E.DEBUG&&console.log(t.step,"SDPVTL["+e+"]",o,i),n=e?(r=s.y-l.y,l.x-s.x):(r=l.x-s.x,l.y-s.y),t.dpv=Zt(r,n)}function xr(e,t){var r=t.stack,n=t.prog,a=t.ip;E.DEBUG&&console.log(t.step,"PUSHB["+e+"]");for(var o=0;o<e;o++)r.push(n[++a]);t.ip=a}function Sr(e,t){var r=t.ip,n=t.prog,a=t.stack;E.DEBUG&&console.log(t.ip,"PUSHW["+e+"]");for(var o=0;o<e;o++){var i=n[++r]<<8|n[++r];32768&i&&(i=-(1+(65535^i))),a.push(i)}t.ip=r}function wr(e,t,r,n,a,o){var i,s,l,p,u=o.stack,c=e&&u.pop(),d=u.pop(),h=o.rp0,m=o.z0[h],f=o.z1[d],y=o.minDis,g=o.fv,v=o.dpv;l=0<=(s=i=v.distance(f,m,!0,!0))?1:-1,s=Math.abs(s),e&&(p=o.cvt[c],n&&Math.abs(s-p)<o.cvCutIn&&(s=p)),r&&s<y&&(s=y),n&&(s=o.round(s)),g.setRelative(f,m,l*s,v),g.touch(f),E.DEBUG&&console.log(o.step,(e?"MIRP[":"MDRP[")+(t?"M":"m")+(r?">":"_")+(n?"R":"_")+(0===a?"Gr":1===a?"Bl":2===a?"Wh":"")+"]",e?c+"("+o.cvt[c]+","+p+")":"",d,"(d =",i,"->",l*s,")"),o.rp1=o.rp0,o.rp2=d,t&&(o.rp0=d)}Ut.prototype.exec=function(e,t){if("number"!=typeof t)throw new Error("Point size is not a number!");if(!(2<this._errorState)){var r=this.font,n=this._prepState;if(!n||n.ppem!==t){var a=this._fpgmState;if(!a){$t.prototype=Jt,(a=this._fpgmState=new $t("fpgm",r.tables.fpgm)).funcs=[],a.font=r,E.DEBUG&&(console.log("---EXEC FPGM---"),a.step=-1);try{Dt(a)}catch(e){return console.log("Hinting error in FPGM:"+e),void(this._errorState=3)}}$t.prototype=a,(n=this._prepState=new $t("prep",r.tables.prep)).ppem=t;var o=r.tables.cvt;if(o)for(var i=n.cvt=new Array(o.length),s=t/r.unitsPerEm,l=0;l<o.length;l++)i[l]=o[l]*s;else n.cvt=[];E.DEBUG&&(console.log("---EXEC PREP---"),n.step=-1);try{Dt(n)}catch(e){this._errorState<2&&console.log("Hinting error in PREP:"+e),this._errorState=2}}if(!(1<this._errorState))try{return At(e,n)}catch(e){return this._errorState<1&&(console.log("Hinting error:"+e),console.log("Note: further hinting errors are silenced")),void(this._errorState=1)}}},At=function(e,t){var r,n,a,o=t.ppem/t.font.unitsPerEm,i=o,s=e.components;if($t.prototype=t,s){var l=t.font;n=[],r=[];for(var p=0;p<s.length;p++){var u=s[p],c=l.glyphs.get(u.glyphIndex);a=new $t("glyf",c.instructions),E.DEBUG&&(console.log("---EXEC COMP "+p+"---"),a.step=-1),kt(c,a,o,i);for(var d=Math.round(u.dx*o),h=Math.round(u.dy*i),m=a.gZone,f=a.contours,y=0;y<m.length;y++){var g=m[y];g.xTouched=g.yTouched=!1,g.xo=g.x=g.x+d,g.yo=g.y=g.y+h}var v=n.length;n.push.apply(n,m);for(var b=0;b<f.length;b++)r.push(f[b]+v)}e.instructions&&!a.inhibitGridFit&&((a=new $t("glyf",e.instructions)).gZone=a.z0=a.z1=a.z2=n,a.contours=r,n.push(new Qt(0,0),new Qt(Math.round(e.advanceWidth*o),0)),E.DEBUG&&(console.log("---EXEC COMPOSITE---"),a.step=-1),Dt(a),n.length-=2)}else a=new $t("glyf",e.instructions),E.DEBUG&&(console.log("---EXEC GLYPH---"),a.step=-1),kt(e,a,o,i),n=a.gZone;return n},kt=function(e,t,r,n){for(var a,o,i,s=e.points||[],l=s.length,p=t.gZone=t.z0=t.z1=t.z2=[],u=t.contours=[],c=0;c<l;c++)a=s[c],p[c]=new Qt(a.x*r,a.y*n,a.lastPointOfContour,a.onCurve);for(var d=0;d<l;d++)a=p[d],o||(o=a,u.push(d)),a.lastPointOfContour?((a.nextPointOnContour=o).prevPointOnContour=a,o=void 0):(i=p[d+1],(a.nextPointOnContour=i).prevPointOnContour=a);if(!t.inhibitGridFit){if(E.DEBUG){console.log("PROCESSING GLYPH",t.stack);for(var h=0;h<l;h++)console.log(h,p[h].x,p[h].y)}if(p.push(new Qt(0,0),new Qt(Math.round(e.advanceWidth*r),0)),Dt(t),p.length-=2,E.DEBUG){console.log("FINISHED GLYPH",t.stack);for(var m=0;m<l;m++)console.log(m,p[m].x,p[m].y)}}},Dt=function(e){var t=e.prog;if(t){var r,n=t.length;for(e.ip=0;e.ip<n;e.ip++){if(E.DEBUG&&e.step++,!(r=Rt[t[e.ip]]))throw new Error("unknown instruction: 0x"+Number(t[e.ip]).toString(16));r(e)}}},Rt=[rr.bind(void 0,qt),rr.bind(void 0,Xt),nr.bind(void 0,qt),nr.bind(void 0,Xt),ar.bind(void 0,qt),ar.bind(void 0,Xt),or.bind(void 0,0),or.bind(void 0,1),ir.bind(void 0,0),ir.bind(void 0,1),function(e){var t=e.stack,r=t.pop(),n=t.pop();E.DEBUG&&console.log(e.step,"SPVFS[]",r,n),e.pv=e.dpv=Zt(n,r)},function(e){var t=e.stack,r=t.pop(),n=t.pop();E.DEBUG&&console.log(e.step,"SPVFS[]",r,n),e.fv=Zt(n,r)},function(e){var t=e.stack,r=e.pv;E.DEBUG&&console.log(e.step,"GPV[]"),t.push(16384*r.x),t.push(16384*r.y)},function(e){var t=e.stack,r=e.fv;E.DEBUG&&console.log(e.step,"GFV[]"),t.push(16384*r.x),t.push(16384*r.y)},function(e){e.fv=e.pv,E.DEBUG&&console.log(e.step,"SFVTPV[]")},function(e){var t=e.stack,r=t.pop(),n=t.pop(),a=t.pop(),o=t.pop(),i=t.pop(),s=e.z0,l=e.z1,p=s[r],u=s[n],c=l[a],d=l[o],h=e.z2[i];E.DEBUG&&console.log("ISECT[], ",r,n,a,o,i);var m=p.x,f=p.y,y=u.x,g=u.y,v=c.x,b=c.y,_=d.x,x=d.y,S=(m-y)*(b-x)-(f-g)*(v-_),w=m*g-f*y,M=v*x-b*_;h.x=(w*(v-_)-M*(m-y))/S,h.y=(w*(b-x)-M*(f-g))/S},function(e){e.rp0=e.stack.pop(),E.DEBUG&&console.log(e.step,"SRP0[]",e.rp0)},function(e){e.rp1=e.stack.pop(),E.DEBUG&&console.log(e.step,"SRP1[]",e.rp1)},function(e){e.rp2=e.stack.pop(),E.DEBUG&&console.log(e.step,"SRP2[]",e.rp2)},function(e){var t=e.stack.pop();switch(E.DEBUG&&console.log(e.step,"SZP0[]",t),e.zp0=t){case 0:e.tZone||er(e),e.z0=e.tZone;break;case 1:e.z0=e.gZone;break;default:throw new Error("Invalid zone pointer")}},function(e){var t=e.stack.pop();switch(E.DEBUG&&console.log(e.step,"SZP1[]",t),e.zp1=t){case 0:e.tZone||er(e),e.z1=e.tZone;break;case 1:e.z1=e.gZone;break;default:throw new Error("Invalid zone pointer")}},function(e){var t=e.stack.pop();switch(E.DEBUG&&console.log(e.step,"SZP2[]",t),e.zp2=t){case 0:e.tZone||er(e),e.z2=e.tZone;break;case 1:e.z2=e.gZone;break;default:throw new Error("Invalid zone pointer")}},function(e){var t=e.stack.pop();switch(E.DEBUG&&console.log(e.step,"SZPS[]",t),e.zp0=e.zp1=e.zp2=t,t){case 0:e.tZone||er(e),e.z0=e.z1=e.z2=e.tZone;break;case 1:e.z0=e.z1=e.z2=e.gZone;break;default:throw new Error("Invalid zone pointer")}},function(e){e.loop=e.stack.pop(),E.DEBUG&&console.log(e.step,"SLOOP[]",e.loop)},function(e){E.DEBUG&&console.log(e.step,"RTG[]"),e.round=Gt},function(e){E.DEBUG&&console.log(e.step,"RTHG[]"),e.round=Vt},function(e){var t=e.stack.pop();E.DEBUG&&console.log(e.step,"SMD[]",t),e.minDis=t/64},function(e){E.DEBUG&&console.log(e.step,"ELSE[]"),tr(e,!1)},function(e){var t=e.stack.pop();E.DEBUG&&console.log(e.step,"JMPR[]",t),e.ip+=t-1},function(e){var t=e.stack.pop();E.DEBUG&&console.log(e.step,"SCVTCI[]",t),e.cvCutIn=t/64},void 0,void 0,function(e){var t=e.stack;E.DEBUG&&console.log(e.step,"DUP[]"),t.push(t[t.length-1])},sr,function(e){E.DEBUG&&console.log(e.step,"CLEAR[]"),e.stack.length=0},function(e){var t=e.stack,r=t.pop(),n=t.pop();E.DEBUG&&console.log(e.step,"SWAP[]"),t.push(r),t.push(n)},function(e){var t=e.stack;E.DEBUG&&console.log(e.step,"DEPTH[]"),t.push(t.length)},function(e){var t=e.stack,r=t.pop();E.DEBUG&&console.log(e.step,"CINDEX[]",r),t.push(t[t.length-r])},function(e){var t=e.stack,r=t.pop();E.DEBUG&&console.log(e.step,"MINDEX[]",r),t.push(t.splice(t.length-r,1)[0])},void 0,void 0,void 0,function(e){var t=e.stack,r=t.pop(),n=t.pop();E.DEBUG&&console.log(e.step,"LOOPCALL[]",r,n);var a=e.ip,o=e.prog;e.prog=e.funcs[r];for(var i=0;i<n;i++)Dt(e),E.DEBUG&&console.log(++e.step,i+1<n?"next loopcall":"done loopcall",i);e.ip=a,e.prog=o},function(e){var t=e.stack.pop();E.DEBUG&&console.log(e.step,"CALL[]",t);var r=e.ip,n=e.prog;e.prog=e.funcs[t],Dt(e),e.ip=r,e.prog=n,E.DEBUG&&console.log(++e.step,"returning from",t)},function(e){if("fpgm"!==e.env)throw new Error("FDEF not allowed here");var t=e.stack,r=e.prog,n=e.ip,a=t.pop(),o=n;for(E.DEBUG&&console.log(e.step,"FDEF[]",a);45!==r[++n];);e.ip=n,e.funcs[a]=r.slice(o+1,n)},void 0,lr.bind(void 0,0),lr.bind(void 0,1),pr.bind(void 0,qt),pr.bind(void 0,Xt),ur.bind(void 0,0),ur.bind(void 0,1),cr.bind(void 0,0),cr.bind(void 0,1),dr.bind(void 0,0),dr.bind(void 0,1),function(e){for(var t=e.stack,r=e.loop,n=e.fv,a=t.pop()/64,o=e.z2;r--;){var i=t.pop(),s=o[i];E.DEBUG&&console.log(e.step,(1<e.loop?"loop "+(e.loop-r)+": ":"")+"SHPIX[]",i,a),n.setRelative(s,s,a),n.touch(s)}e.loop=1},function(e){for(var t=e.stack,r=e.rp1,n=e.rp2,a=e.loop,o=e.z0[r],i=e.z1[n],s=e.fv,l=e.dpv,p=e.z2;a--;){var u=t.pop(),c=p[u];E.DEBUG&&console.log(e.step,(1<e.loop?"loop "+(e.loop-a)+": ":"")+"IP[]",u,r,"<->",n),s.interpolate(c,o,i,l),s.touch(c)}e.loop=1},hr.bind(void 0,0),hr.bind(void 0,1),function(e){for(var t=e.stack,r=e.rp0,n=e.z0[r],a=e.loop,o=e.fv,i=e.pv,s=e.z1;a--;){var l=t.pop(),p=s[l];E.DEBUG&&console.log(e.step,(1<e.loop?"loop "+(e.loop-a)+": ":"")+"ALIGNRP[]",l),o.setRelative(p,n,0,i),o.touch(p)}e.loop=1},function(e){E.DEBUG&&console.log(e.step,"RTDG[]"),e.round=jt},mr.bind(void 0,0),mr.bind(void 0,1),function(e){var t=e.prog,r=e.ip,n=e.stack,a=t[++r];E.DEBUG&&console.log(e.step,"NPUSHB[]",a);for(var o=0;o<a;o++)n.push(t[++r]);e.ip=r},function(e){var t=e.ip,r=e.prog,n=e.stack,a=r[++t];E.DEBUG&&console.log(e.step,"NPUSHW[]",a);for(var o=0;o<a;o++){var i=r[++t]<<8|r[++t];32768&i&&(i=-(1+(65535^i))),n.push(i)}e.ip=t},function(e){var t=e.stack,r=e.store;r=r||(e.store=[]);var n=t.pop(),a=t.pop();E.DEBUG&&console.log(e.step,"WS",n,a),r[a]=n},function(e){var t=e.stack,r=e.store,n=t.pop();E.DEBUG&&console.log(e.step,"RS",n);var a=r&&r[n]||0;t.push(a)},function(e){var t=e.stack,r=t.pop(),n=t.pop();E.DEBUG&&console.log(e.step,"WCVTP",r,n),e.cvt[n]=r/64},function(e){var t=e.stack,r=t.pop();E.DEBUG&&console.log(e.step,"RCVT",r),t.push(64*e.cvt[r])},fr.bind(void 0,0),fr.bind(void 0,1),void 0,yr.bind(void 0,0),yr.bind(void 0,1),function(e){E.DEBUG&&console.log(e.step,"MPPEM[]"),e.stack.push(e.ppem)},void 0,function(e){E.DEBUG&&console.log(e.step,"FLIPON[]"),e.autoFlip=!0},void 0,void 0,function(e){var t=e.stack,r=t.pop(),n=t.pop();E.DEBUG&&console.log(e.step,"LT[]",r,n),t.push(n<r?1:0)},function(e){var t=e.stack,r=t.pop(),n=t.pop();E.DEBUG&&console.log(e.step,"LTEQ[]",r,n),t.push(n<=r?1:0)},function(e){var t=e.stack,r=t.pop(),n=t.pop();E.DEBUG&&console.log(e.step,"GT[]",r,n),t.push(r<n?1:0)},function(e){var t=e.stack,r=t.pop(),n=t.pop();E.DEBUG&&console.log(e.step,"GTEQ[]",r,n),t.push(r<=n?1:0)},function(e){var t=e.stack,r=t.pop(),n=t.pop();E.DEBUG&&console.log(e.step,"EQ[]",r,n),t.push(r===n?1:0)},function(e){var t=e.stack,r=t.pop(),n=t.pop();E.DEBUG&&console.log(e.step,"NEQ[]",r,n),t.push(r!==n?1:0)},function(e){var t=e.stack,r=t.pop();E.DEBUG&&console.log(e.step,"ODD[]",r),t.push(Math.trunc(r)%2?1:0)},function(e){var t=e.stack,r=t.pop();E.DEBUG&&console.log(e.step,"EVEN[]",r),t.push(Math.trunc(r)%2?0:1)},function(e){var t=e.stack.pop();E.DEBUG&&console.log(e.step,"IF[]",t),t||(tr(e,!0),E.DEBUG&&console.log(e.step,"EIF[]"))},function(e){E.DEBUG&&console.log(e.step,"EIF[]")},function(e){var t=e.stack,r=t.pop(),n=t.pop();E.DEBUG&&console.log(e.step,"AND[]",r,n),t.push(r&&n?1:0)},function(e){var t=e.stack,r=t.pop(),n=t.pop();E.DEBUG&&console.log(e.step,"OR[]",r,n),t.push(r||n?1:0)},function(e){var t=e.stack,r=t.pop();E.DEBUG&&console.log(e.step,"NOT[]",r),t.push(r?0:1)},gr.bind(void 0,1),function(e){var t=e.stack.pop();E.DEBUG&&console.log(e.step,"SDB[]",t),e.deltaBase=t},function(e){var t=e.stack.pop();E.DEBUG&&console.log(e.step,"SDS[]",t),e.deltaShift=Math.pow(.5,t)},function(e){var t=e.stack,r=t.pop(),n=t.pop();E.DEBUG&&console.log(e.step,"ADD[]",r,n),t.push(n+r)},function(e){var t=e.stack,r=t.pop(),n=t.pop();E.DEBUG&&console.log(e.step,"SUB[]",r,n),t.push(n-r)},function(e){var t=e.stack,r=t.pop(),n=t.pop();E.DEBUG&&console.log(e.step,"DIV[]",r,n),t.push(64*n/r)},function(e){var t=e.stack,r=t.pop(),n=t.pop();E.DEBUG&&console.log(e.step,"MUL[]",r,n),t.push(n*r/64)},function(e){var t=e.stack,r=t.pop();E.DEBUG&&console.log(e.step,"ABS[]",r),t.push(Math.abs(r))},function(e){var t=e.stack,r=t.pop();E.DEBUG&&console.log(e.step,"NEG[]",r),t.push(-r)},function(e){var t=e.stack,r=t.pop();E.DEBUG&&console.log(e.step,"FLOOR[]",r),t.push(64*Math.floor(r/64))},function(e){var t=e.stack,r=t.pop();E.DEBUG&&console.log(e.step,"CEILING[]",r),t.push(64*Math.ceil(r/64))},vr.bind(void 0,0),vr.bind(void 0,1),vr.bind(void 0,2),vr.bind(void 0,3),void 0,void 0,void 0,void 0,function(e){var t=e.stack,r=t.pop(),n=t.pop();E.DEBUG&&console.log(e.step,"WCVTF[]",r,n),e.cvt[n]=r*e.ppem/e.font.unitsPerEm},gr.bind(void 0,2),gr.bind(void 0,3),br.bind(void 0,1),br.bind(void 0,2),br.bind(void 0,3),function(e){var t,r=e.stack.pop();switch(E.DEBUG&&console.log(e.step,"SROUND[]",r),e.round=Wt,192&r){case 0:t=.5;break;case 64:t=1;break;case 128:t=2;break;default:throw new Error("invalid SROUND value")}switch(e.srPeriod=t,48&r){case 0:e.srPhase=0;break;case 16:e.srPhase=.25*t;break;case 32:e.srPhase=.5*t;break;case 48:e.srPhase=.75*t;break;default:throw new Error("invalid SROUND value")}r&=15,e.srThreshold=0===r?0:(r/8-.5)*t},function(e){var t,r=e.stack.pop();switch(E.DEBUG&&console.log(e.step,"S45ROUND[]",r),e.round=Wt,192&r){case 0:t=Math.sqrt(2)/2;break;case 64:t=Math.sqrt(2);break;case 128:t=2*Math.sqrt(2);break;default:throw new Error("invalid S45ROUND value")}switch(e.srPeriod=t,48&r){case 0:e.srPhase=0;break;case 16:e.srPhase=.25*t;break;case 32:e.srPhase=.5*t;break;case 48:e.srPhase=.75*t;break;default:throw new Error("invalid S45ROUND value")}r&=15,e.srThreshold=0===r?0:(r/8-.5)*t},void 0,void 0,function(e){E.DEBUG&&console.log(e.step,"ROFF[]"),e.round=Bt},void 0,function(e){E.DEBUG&&console.log(e.step,"RUTG[]"),e.round=zt},function(e){E.DEBUG&&console.log(e.step,"RDTG[]"),e.round=Ht},sr,sr,void 0,void 0,void 0,void 0,void 0,function(e){var t=e.stack.pop();E.DEBUG&&console.log(e.step,"SCANCTRL[]",t)},_r.bind(void 0,0),_r.bind(void 0,1),function(e){var t=e.stack,r=t.pop(),n=0;E.DEBUG&&console.log(e.step,"GETINFO[]",r),1&r&&(n=35),32&r&&(n|=4096),t.push(n)},void 0,function(e){var t=e.stack,r=t.pop(),n=t.pop(),a=t.pop();E.DEBUG&&console.log(e.step,"ROLL[]"),t.push(n),t.push(r),t.push(a)},function(e){var t=e.stack,r=t.pop(),n=t.pop();E.DEBUG&&console.log(e.step,"MAX[]",r,n),t.push(Math.max(n,r))},function(e){var t=e.stack,r=t.pop(),n=t.pop();E.DEBUG&&console.log(e.step,"MIN[]",r,n),t.push(Math.min(n,r))},function(e){var t=e.stack.pop();E.DEBUG&&console.log(e.step,"SCANTYPE[]",t)},function(e){var t=e.stack.pop(),r=e.stack.pop();switch(E.DEBUG&&console.log(e.step,"INSTCTRL[]",t,r),t){case 1:return void(e.inhibitGridFit=!!r);case 2:return void(e.ignoreCvt=!!r);default:throw new Error("invalid INSTCTRL[] selector")}},void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,xr.bind(void 0,1),xr.bind(void 0,2),xr.bind(void 0,3),xr.bind(void 0,4),xr.bind(void 0,5),xr.bind(void 0,6),xr.bind(void 0,7),xr.bind(void 0,8),Sr.bind(void 0,1),Sr.bind(void 0,2),Sr.bind(void 0,3),Sr.bind(void 0,4),Sr.bind(void 0,5),Sr.bind(void 0,6),Sr.bind(void 0,7),Sr.bind(void 0,8),wr.bind(void 0,0,0,0,0,0),wr.bind(void 0,0,0,0,0,1),wr.bind(void 0,0,0,0,0,2),wr.bind(void 0,0,0,0,0,3),wr.bind(void 0,0,0,0,1,0),wr.bind(void 0,0,0,0,1,1),wr.bind(void 0,0,0,0,1,2),wr.bind(void 0,0,0,0,1,3),wr.bind(void 0,0,0,1,0,0),wr.bind(void 0,0,0,1,0,1),wr.bind(void 0,0,0,1,0,2),wr.bind(void 0,0,0,1,0,3),wr.bind(void 0,0,0,1,1,0),wr.bind(void 0,0,0,1,1,1),wr.bind(void 0,0,0,1,1,2),wr.bind(void 0,0,0,1,1,3),wr.bind(void 0,0,1,0,0,0),wr.bind(void 0,0,1,0,0,1),wr.bind(void 0,0,1,0,0,2),wr.bind(void 0,0,1,0,0,3),wr.bind(void 0,0,1,0,1,0),wr.bind(void 0,0,1,0,1,1),wr.bind(void 0,0,1,0,1,2),wr.bind(void 0,0,1,0,1,3),wr.bind(void 0,0,1,1,0,0),wr.bind(void 0,0,1,1,0,1),wr.bind(void 0,0,1,1,0,2),wr.bind(void 0,0,1,1,0,3),wr.bind(void 0,0,1,1,1,0),wr.bind(void 0,0,1,1,1,1),wr.bind(void 0,0,1,1,1,2),wr.bind(void 0,0,1,1,1,3),wr.bind(void 0,1,0,0,0,0),wr.bind(void 0,1,0,0,0,1),wr.bind(void 0,1,0,0,0,2),wr.bind(void 0,1,0,0,0,3),wr.bind(void 0,1,0,0,1,0),wr.bind(void 0,1,0,0,1,1),wr.bind(void 0,1,0,0,1,2),wr.bind(void 0,1,0,0,1,3),wr.bind(void 0,1,0,1,0,0),wr.bind(void 0,1,0,1,0,1),wr.bind(void 0,1,0,1,0,2),wr.bind(void 0,1,0,1,0,3),wr.bind(void 0,1,0,1,1,0),wr.bind(void 0,1,0,1,1,1),wr.bind(void 0,1,0,1,1,2),wr.bind(void 0,1,0,1,1,3),wr.bind(void 0,1,1,0,0,0),wr.bind(void 0,1,1,0,0,1),wr.bind(void 0,1,1,0,0,2),wr.bind(void 0,1,1,0,0,3),wr.bind(void 0,1,1,0,1,0),wr.bind(void 0,1,1,0,1,1),wr.bind(void 0,1,1,0,1,2),wr.bind(void 0,1,1,0,1,3),wr.bind(void 0,1,1,1,0,0),wr.bind(void 0,1,1,1,0,1),wr.bind(void 0,1,1,1,0,2),wr.bind(void 0,1,1,1,0,3),wr.bind(void 0,1,1,1,1,0),wr.bind(void 0,1,1,1,1,1),wr.bind(void 0,1,1,1,1,2),wr.bind(void 0,1,1,1,1,3)];var Mr=Array.from||function(e){return e.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]?|[^\uD800-\uDFFF]|./g)||[]};function Er(e){(e=e||{}).empty||(Ct(e.familyName,"When creating a new Font object, familyName is required."),Ct(e.styleName,"When creating a new Font object, styleName is required."),Ct(e.unitsPerEm,"When creating a new Font object, unitsPerEm is required."),Ct(e.ascender,"When creating a new Font object, ascender is required."),Ct(e.descender,"When creating a new Font object, descender is required."),Ct(e.descender<0,"Descender should be negative (e.g. -512)."),this.names={fontFamily:{en:e.familyName||" "},fontSubfamily:{en:e.styleName||" "},fullName:{en:e.fullName||e.familyName+" "+e.styleName},postScriptName:{en:e.postScriptName||(e.familyName+e.styleName).replace(/\s/g,"")},designer:{en:e.designer||" "},designerURL:{en:e.designerURL||" "},manufacturer:{en:e.manufacturer||" "},manufacturerURL:{en:e.manufacturerURL||" "},license:{en:e.license||" "},licenseURL:{en:e.licenseURL||" "},version:{en:e.version||"Version 0.1"},description:{en:e.description||" "},copyright:{en:e.copyright||" "},trademark:{en:e.trademark||" "}},this.unitsPerEm=e.unitsPerEm||1e3,this.ascender=e.ascender,this.descender=e.descender,this.createdTimestamp=e.createdTimestamp,this.tables={os2:{usWeightClass:e.weightClass||this.usWeightClasses.MEDIUM,usWidthClass:e.widthClass||this.usWidthClasses.MEDIUM,fsSelection:e.fsSelection||this.fsSelectionValues.REGULAR}}),this.supported=!0,this.glyphs=new xe.GlyphSet(this,e.glyphs||[]),this.encoding=new he(this),this.position=new St(this),this.substitution=new wt(this),this.tables=this.tables||{},Object.defineProperty(this,"hinting",{get:function(){return this._hinting?this._hinting:"truetype"===this.outlinesFormat?this._hinting=new Ut(this):void 0}})}function Tr(e,t){var r=JSON.stringify(e),n=256;for(var a in t){var o=parseInt(a);if(o&&!(o<256)){if(JSON.stringify(t[a])===r)return o;n<=o&&(n=o+1)}}return t[n]=e,n}function Cr(e,t,r,n){for(var a=[{name:"nameID_"+e,type:"USHORT",value:Tr(t.name,n)},{name:"flags_"+e,type:"USHORT",value:0}],o=0;o<r.length;++o){var i=r[o].tag;a.push({name:"axis_"+e+" "+i,type:"FIXED",value:t.coordinates[i]<<16})}return a}function Nr(e,t,r,n){var a={},o=new se.Parser(e,t);a.name=n[o.parseUShort()]||{},o.skip("uShort",1),a.coordinates={};for(var i=0;i<r.length;++i)a.coordinates[r[i].tag]=o.parseFixed();return a}Er.prototype.hasChar=function(e){return null!==this.encoding.charToGlyphIndex(e)},Er.prototype.charToGlyphIndex=function(e){return this.encoding.charToGlyphIndex(e)},Er.prototype.charToGlyph=function(e){var t=this.charToGlyphIndex(e),r=this.glyphs.get(t);return r=r||this.glyphs.get(0)},Er.prototype.stringToGlyphs=function(e,t){t=t||this.defaultRenderOptions;for(var r=Mr(e),n=[],a=0;a<r.length;a+=1){var o=r[a];n.push(this.charToGlyphIndex(o))}var i=n.length;if(t.features){var s=t.script||this.substitution.getDefaultScriptName(),l=[];t.features.liga&&(l=l.concat(this.substitution.getFeature("liga",s,t.language))),t.features.rlig&&(l=l.concat(this.substitution.getFeature("rlig",s,t.language)));for(var p=0;p<i;p+=1)for(var u=0;u<l.length;u++){for(var c=l[u],d=c.sub,h=d.length,m=0;m<h&&d[m]===n[p+m];)m++;m===h&&(n.splice(p,h,c.by),i=i-h+1)}}for(var f=new Array(i),y=this.glyphs.get(0),g=0;g<i;g+=1)f[g]=this.glyphs.get(n[g])||y;return f},Er.prototype.nameToGlyphIndex=function(e){return this.glyphNames.nameToGlyphIndex(e)},Er.prototype.nameToGlyph=function(e){var t=this.nameToGlyphIndex(e),r=this.glyphs.get(t);return r=r||this.glyphs.get(0)},Er.prototype.glyphIndexToName=function(e){return this.glyphNames.glyphIndexToName?this.glyphNames.glyphIndexToName(e):""},Er.prototype.getKerningValue=function(e,t){e=e.index||e,t=t.index||t;var r=this.position.defaultKerningTables;return r?this.position.getKerningValue(r,e,t):this.kerningPairs[e+","+t]||0},Er.prototype.defaultRenderOptions={kerning:!0,features:{liga:!0,rlig:!0}},Er.prototype.forEachGlyph=function(e,t,r,n,a,o){t=void 0!==t?t:0,r=void 0!==r?r:0,n=void 0!==n?n:72,a=a||this.defaultRenderOptions;var i,s=1/this.unitsPerEm*n,l=this.stringToGlyphs(e,a);if(a.kerning){var p=a.script||this.position.getDefaultScriptName();i=this.position.getKerningTables(p,a.language)}for(var u=0;u<l.length;u+=1){var c=l[u];if(o.call(this,c,t,r,n,a),c.advanceWidth&&(t+=c.advanceWidth*s),a.kerning&&u<l.length-1)t+=(i?this.position.getKerningValue(i,c.index,l[u+1].index):this.getKerningValue(c,l[u+1]))*s;a.letterSpacing?t+=a.letterSpacing*n:a.tracking&&(t+=a.tracking/1e3*n)}return t},Er.prototype.getPath=function(e,t,r,n,o){var i=new A;return this.forEachGlyph(e,t,r,n,o,function(e,t,r,n){var a=e.getPath(t,r,n,o,this);i.extend(a)}),i},Er.prototype.getPaths=function(e,t,r,n,o){var i=[];return this.forEachGlyph(e,t,r,n,o,function(e,t,r,n){var a=e.getPath(t,r,n,o,this);i.push(a)}),i},Er.prototype.getAdvanceWidth=function(e,t,r){return this.forEachGlyph(e,0,0,t,r,function(){})},Er.prototype.draw=function(e,t,r,n,a,o){this.getPath(t,r,n,a,o).draw(e)},Er.prototype.drawPoints=function(a,e,t,r,n,o){this.forEachGlyph(e,t,r,n,o,function(e,t,r,n){e.drawPoints(a,t,r,n)})},Er.prototype.drawMetrics=function(a,e,t,r,n,o){this.forEachGlyph(e,t,r,n,o,function(e,t,r,n){e.drawMetrics(a,t,r,n)})},Er.prototype.getEnglishName=function(e){var t=this.names[e];if(t)return t.en},Er.prototype.validate=function(){var r=this;function e(e){var t=r.getEnglishName(e);t&&t.trim().length}e("fontFamily"),e("weightName"),e("manufacturer"),e("copyright"),e("version"),this.unitsPerEm},Er.prototype.toTables=function(){return gt.fontToTable(this)},Er.prototype.toBuffer=function(){return console.warn("Font.toBuffer is deprecated. Use Font.toArrayBuffer instead."),this.toArrayBuffer()},Er.prototype.toArrayBuffer=function(){for(var e=this.toTables().encode(),t=new ArrayBuffer(e.length),r=new Uint8Array(t),n=0;n<e.length;n++)r[n]=e[n];return t},Er.prototype.download=function(t){var e=this.getEnglishName("fontFamily"),r=this.getEnglishName("fontSubfamily");t=t||e.replace(/\s/g,"")+"-"+r+".otf";var a=this.toArrayBuffer();if("undefined"!=typeof window)window.requestFileSystem=window.requestFileSystem||window.webkitRequestFileSystem,window.requestFileSystem(window.TEMPORARY,a.byteLength,function(e){e.root.getFile(t,{create:!0},function(n){n.createWriter(function(e){var t=new DataView(a),r=new Blob([t],{type:"font/opentype"});e.write(r),e.addEventListener("writeend",function(){location.href=n.toURL()},!1)})})},function(e){throw new Error(e.name+": "+e.message)});else{var n=jr("fs"),o=function(e){for(var t=new Gr(e.byteLength),r=new Uint8Array(e),n=0;n<t.length;++n)t[n]=r[n];return t}(a);n.writeFileSync(t,o)}},Er.prototype.fsSelectionValues={ITALIC:1,UNDERSCORE:2,NEGATIVE:4,OUTLINED:8,STRIKEOUT:16,BOLD:32,REGULAR:64,USER_TYPO_METRICS:128,WWS:256,OBLIQUE:512},Er.prototype.usWidthClasses={ULTRA_CONDENSED:1,EXTRA_CONDENSED:2,CONDENSED:3,SEMI_CONDENSED:4,MEDIUM:5,SEMI_EXPANDED:6,EXPANDED:7,EXTRA_EXPANDED:8,ULTRA_EXPANDED:9},Er.prototype.usWeightClasses={THIN:100,EXTRA_LIGHT:200,LIGHT:300,NORMAL:400,MEDIUM:500,SEMI_BOLD:600,BOLD:700,EXTRA_BOLD:800,BLACK:900};var Or={make:function(e,t){var r,n,a,o,i=new $.Table("fvar",[{name:"version",type:"ULONG",value:65536},{name:"offsetToData",type:"USHORT",value:0},{name:"countSizePairs",type:"USHORT",value:2},{name:"axisCount",type:"USHORT",value:e.axes.length},{name:"axisSize",type:"USHORT",value:20},{name:"instanceCount",type:"USHORT",value:e.instances.length},{name:"instanceSize",type:"USHORT",value:4+4*e.axes.length}]);i.offsetToData=i.sizeOf();for(var s=0;s<e.axes.length;s++)i.fields=i.fields.concat((r=s,n=e.axes[s],a=t,o=Tr(n.name,a),[{name:"tag_"+r,type:"TAG",value:n.tag},{name:"minValue_"+r,type:"FIXED",value:n.minValue<<16},{name:"defaultValue_"+r,type:"FIXED",value:n.defaultValue<<16},{name:"maxValue_"+r,type:"FIXED",value:n.maxValue<<16},{name:"flags_"+r,type:"USHORT",value:0},{name:"nameID_"+r,type:"USHORT",value:o}]));for(var l=0;l<e.instances.length;l++)i.fields=i.fields.concat(Cr(l,e.instances[l],e.axes,t));return i},parse:function(e,t,r){var n=new se.Parser(e,t),a=n.parseULong();L.argument(65536===a,"Unsupported fvar table version.");var o=n.parseOffset16();n.skip("uShort",1);for(var i,s,l,p,u,c=n.parseUShort(),d=n.parseUShort(),h=n.parseUShort(),m=n.parseUShort(),f=[],y=0;y<c;y++)f.push((i=e,s=t+o+y*d,l=r,u=p=void 0,p={},u=new se.Parser(i,s),p.tag=u.parseTag(),p.minValue=u.parseFixed(),p.defaultValue=u.parseFixed(),p.maxValue=u.parseFixed(),u.skip("uShort",1),p.name=l[u.parseUShort()]||{},p));for(var g=[],v=t+o+c*d,b=0;b<h;b++)g.push(Nr(e,v+b*m,f,r));return{axes:f,instances:g}}},Lr=new Array(10);Lr[1]=function(){var e=this.offset+this.relativeOffset,t=this.parseUShort();return 1===t?{posFormat:1,coverage:this.parsePointer(oe.coverage),value:this.parseValueRecord()}:2===t?{posFormat:2,coverage:this.parsePointer(oe.coverage),values:this.parseValueRecordList()}:void L.assert(!1,"0x"+e.toString(16)+": GPOS lookup type 1 format must be 1 or 2.")},Lr[2]=function(){var e=this.offset+this.relativeOffset,t=this.parseUShort();L.assert(1===t||2===t,"0x"+e.toString(16)+": GPOS lookup type 2 format must be 1 or 2.");var r=this.parsePointer(oe.coverage),n=this.parseUShort(),a=this.parseUShort();if(1===t)return{posFormat:t,coverage:r,valueFormat1:n,valueFormat2:a,pairSets:this.parseList(oe.pointer(oe.list(function(){return{secondGlyph:this.parseUShort(),value1:this.parseValueRecord(n),value2:this.parseValueRecord(a)}})))};if(2===t){var o=this.parsePointer(oe.classDef),i=this.parsePointer(oe.classDef),s=this.parseUShort(),l=this.parseUShort();return{posFormat:t,coverage:r,valueFormat1:n,valueFormat2:a,classDef1:o,classDef2:i,class1Count:s,class2Count:l,classRecords:this.parseList(s,oe.list(l,function(){return{value1:this.parseValueRecord(n),value2:this.parseValueRecord(a)}}))}}},Lr[3]=function(){return{error:"GPOS Lookup 3 not supported"}},Lr[4]=function(){return{error:"GPOS Lookup 4 not supported"}},Lr[5]=function(){return{error:"GPOS Lookup 5 not supported"}},Lr[6]=function(){return{error:"GPOS Lookup 6 not supported"}},Lr[7]=function(){return{error:"GPOS Lookup 7 not supported"}},Lr[8]=function(){return{error:"GPOS Lookup 8 not supported"}},Lr[9]=function(){return{error:"GPOS Lookup 9 not supported"}};var Ir=new Array(10);var Pr={parse:function(e,t){var r=new oe(e,t=t||0),n=r.parseVersion(1);return L.argument(1===n||1.1===n,"Unsupported GPOS table version "+n),1===n?{version:n,scripts:r.parseScriptList(),features:r.parseFeatureList(),lookups:r.parseLookupList(Lr)}:{version:n,scripts:r.parseScriptList(),features:r.parseFeatureList(),lookups:r.parseLookupList(Lr),variations:r.parseFeatureVariationsList()}},make:function(e){return new $.Table("GPOS",[{name:"version",type:"ULONG",value:65536},{name:"scripts",type:"TABLE",value:new $.ScriptList(e.scripts)},{name:"features",type:"TABLE",value:new $.FeatureList(e.features)},{name:"lookups",type:"TABLE",value:new $.LookupList(e.lookups,Ir)}])}};var Rr={parse:function(e,t){var r=new se.Parser(e,t),n=r.parseUShort();if(0===n)return function(e){var t={};e.skip("uShort");var r=e.parseUShort();L.argument(0===r,"Unsupported kern sub-table version."),e.skip("uShort",2);var n=e.parseUShort();e.skip("uShort",3);for(var a=0;a<n;a+=1){var o=e.parseUShort(),i=e.parseUShort(),s=e.parseShort();t[o+","+i]=s}return t}(r);if(1===n)return function(e){var t={};e.skip("uShort"),1<e.parseULong()&&console.warn("Only the first kern subtable is supported."),e.skip("uLong");var r=255&e.parseUShort();if(e.skip("uShort"),0==r){var n=e.parseUShort();e.skip("uShort",3);for(var a=0;a<n;a+=1){var o=e.parseUShort(),i=e.parseUShort(),s=e.parseShort();t[o+","+i]=s}}return t}(r);throw new Error("Unsupported kern table version ("+n+").")}};var Dr={parse:function(e,t,r,n){for(var a=new se.Parser(e,t),o=n?a.parseUShort:a.parseULong,i=[],s=0;s<r+1;s+=1){var l=o.call(a);n&&(l*=2),i.push(l)}return i}};function Ar(e,r){jr("fs").readFile(e,function(e,t){if(e)return r(e.message);r(null,Tt(t))})}function kr(e,t){var r=new XMLHttpRequest;r.open("get",e,!0),r.responseType="arraybuffer",r.onload=function(){return r.response?t(null,r.response):t("Font could not be loaded: "+r.statusText)},r.onerror=function(){t("Font could not be loaded")},r.send()}function Fr(e,t){for(var r=[],n=12,a=0;a<t;a+=1){var o=se.getTag(e,n),i=se.getULong(e,n+4),s=se.getULong(e,n+8),l=se.getULong(e,n+12);r.push({tag:o,checksum:i,offset:s,length:l,compression:!1}),n+=16}return r}function Ur(e,t){if("WOFF"!==t.compression)return{data:e,offset:t.offset};var r=new Uint8Array(e.buffer,t.offset+2,t.compressedLength-2),n=new Uint8Array(t.length);if(a(r,n),n.byteLength!==t.length)throw new Error("Decompression error: "+t.tag+" decompressed length doesn't match recorded length");return{data:new DataView(n.buffer,0),offset:0}}function Br(e){var t,r,n,a,o,i,s,l,p,u,c,d,h,m,f=new Er({empty:!0}),y=new DataView(e,0),g=[],v=se.getTag(y,0);if(v===String.fromCharCode(0,1,0,0)||"true"===v||"typ1"===v)f.outlinesFormat="truetype",g=Fr(y,n=se.getUShort(y,4));else if("OTTO"===v)f.outlinesFormat="cff",g=Fr(y,n=se.getUShort(y,4));else{if("wOFF"!==v)throw new Error("Unsupported OpenType signature "+v);var b=se.getTag(y,4);if(b===String.fromCharCode(0,1,0,0))f.outlinesFormat="truetype";else{if("OTTO"!==b)throw new Error("Unsupported OpenType flavor "+v);f.outlinesFormat="cff"}g=function(e,t){for(var r=[],n=44,a=0;a<t;a+=1){var o=se.getTag(e,n),i=se.getULong(e,n+4),s=se.getULong(e,n+8),l=se.getULong(e,n+12),p=void 0;p=s<l&&"WOFF",r.push({tag:o,offset:i,compression:p,compressedLength:s,length:l}),n+=20}return r}(y,n=se.getUShort(y,12))}for(var _=0;_<n;_+=1){var x=g[_],S=void 0;switch(x.tag){case"cmap":S=Ur(y,x),f.tables.cmap=le.parse(S.data,S.offset),f.encoding=new me(f.tables.cmap);break;case"cvt ":S=Ur(y,x),m=new se.Parser(S.data,S.offset),f.tables.cvt=m.parseShortList(x.length/2);break;case"fvar":o=x;break;case"fpgm":S=Ur(y,x),m=new se.Parser(S.data,S.offset),f.tables.fpgm=m.parseByteList(x.length);break;case"head":S=Ur(y,x),f.tables.head=Ge.parse(S.data,S.offset),f.unitsPerEm=f.tables.head.unitsPerEm,t=f.tables.head.indexToLocFormat;break;case"hhea":S=Ur(y,x),f.tables.hhea=je.parse(S.data,S.offset),f.ascender=f.tables.hhea.ascender,f.descender=f.tables.hhea.descender,f.numberOfHMetrics=f.tables.hhea.numberOfHMetrics;break;case"hmtx":p=x;break;case"ltag":S=Ur(y,x),r=ze.parse(S.data,S.offset);break;case"maxp":S=Ur(y,x),f.tables.maxp=He.parse(S.data,S.offset),f.numGlyphs=f.tables.maxp.numGlyphs;break;case"name":d=x;break;case"OS/2":S=Ur(y,x),f.tables.os2=ot.parse(S.data,S.offset);break;case"post":S=Ur(y,x),f.tables.post=it.parse(S.data,S.offset),f.glyphNames=new ye(f.tables.post);break;case"prep":S=Ur(y,x),m=new se.Parser(S.data,S.offset),f.tables.prep=m.parseByteList(x.length);break;case"glyf":i=x;break;case"loca":c=x;break;case"CFF ":a=x;break;case"kern":u=x;break;case"GPOS":s=x;break;case"GSUB":l=x;break;case"meta":h=x}}var w=Ur(y,d);if(f.tables.name=nt.parse(w.data,w.offset,r),f.names=f.tables.name,i&&c){var M=0===t,E=Ur(y,c),T=Dr.parse(E.data,E.offset,f.numGlyphs,M),C=Ur(y,i);f.glyphs=Ft.parse(C.data,C.offset,T,f)}else{if(!a)throw new Error("Font doesn't contain TrueType or CFF outlines.");var N=Ur(y,a);Be.parse(N.data,N.offset,f)}var O=Ur(y,p);if(Ve.parse(O.data,O.offset,f.numberOfHMetrics,f.numGlyphs,f.glyphs),function(e){for(var t,r=e.tables.cmap.glyphIndexMap,n=Object.keys(r),a=0;a<n.length;a+=1){var o=n[a],i=r[o];(t=e.glyphs.get(i)).addUnicode(parseInt(o))}for(var s=0;s<e.glyphs.length;s+=1)t=e.glyphs.get(s),e.cffEncoding?e.isCIDFont?t.name="gid"+s:t.name=e.cffEncoding.charset[s]:e.glyphNames.names&&(t.name=e.glyphNames.glyphIndexToName(s))}(f),u){var L=Ur(y,u);f.kerningPairs=Rr.parse(L.data,L.offset)}else f.kerningPairs={};if(s){var I=Ur(y,s);f.tables.gpos=Pr.parse(I.data,I.offset),f.position.init()}if(l){var P=Ur(y,l);f.tables.gsub=ut.parse(P.data,P.offset)}if(o){var R=Ur(y,o);f.tables.fvar=Or.parse(R.data,R.offset,f.names)}if(h){var D=Ur(y,h);f.tables.meta=ct.parse(D.data,D.offset),f.metas=f.tables.meta}return f}E.Font=Er,E.Glyph=ve,E.Path=A,E.BoundingBox=C,E._parse=se,E.parse=Br,E.load=function(e,n){("undefined"==typeof window?Ar:kr)(e,function(e,t){if(e)return n(e);var r;try{r=Br(t)}catch(e){return n(e,null)}return n(null,r)})},E.loadSync=function(e){return Br(Tt(jr("fs").readFileSync(e)))},Object.defineProperty(E,"__esModule",{value:!0})}("object"==typeof r&&void 0!==t?r:e.opentype={})}).call(this,jr("buffer").Buffer)},{buffer:5,fs:3}],14:[function(e,t,p){(function(a){function o(e,t){for(var r=0,n=e.length-1;0<=n;n--){var a=e[n];"."===a?e.splice(n,1):".."===a?(e.splice(n,1),r++):r&&(e.splice(n,1),r--)}if(t)for(;r--;)e.unshift("..");return e}function i(e,t){if(e.filter)return e.filter(t);for(var r=[],n=0;n<e.length;n++)t(e[n],n,e)&&r.push(e[n]);return r}p.resolve=function(){for(var e="",t=!1,r=arguments.length-1;-1<=r&&!t;r--){var n=0<=r?arguments[r]:a.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");n&&(e=n+"/"+e,t="/"===n.charAt(0))}return(t?"/":"")+(e=o(i(e.split("/"),function(e){return!!e}),!t).join("/"))||"."},p.normalize=function(e){var t=p.isAbsolute(e),r="/"===n(e,-1);return(e=o(i(e.split("/"),function(e){return!!e}),!t).join("/"))||t||(e="."),e&&r&&(e+="/"),(t?"/":"")+e},p.isAbsolute=function(e){return"/"===e.charAt(0)},p.join=function(){var e=Array.prototype.slice.call(arguments,0);return p.normalize(i(e,function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e}).join("/"))},p.relative=function(e,t){function r(e){for(var t=0;t<e.length&&""===e[t];t++);for(var r=e.length-1;0<=r&&""===e[r];r--);return r<t?[]:e.slice(t,r-t+1)}e=p.resolve(e).substr(1),t=p.resolve(t).substr(1);for(var n=r(e.split("/")),a=r(t.split("/")),o=Math.min(n.length,a.length),i=o,s=0;s<o;s++)if(n[s]!==a[s]){i=s;break}var l=[];for(s=i;s<n.length;s++)l.push("..");return(l=l.concat(a.slice(i))).join("/")},p.sep="/",p.delimiter=":",p.dirname=function(e){if("string"!=typeof e&&(e+=""),0===e.length)return".";for(var t=e.charCodeAt(0),r=47===t,n=-1,a=!0,o=e.length-1;1<=o;--o)if(47===(t=e.charCodeAt(o))){if(!a){n=o;break}}else a=!1;return-1===n?r?"/":".":r&&1===n?"/":e.slice(0,n)},p.basename=function(e,t){var r=function(e){"string"!=typeof e&&(e+="");var t,r=0,n=-1,a=!0;for(t=e.length-1;0<=t;--t)if(47===e.charCodeAt(t)){if(!a){r=t+1;break}}else-1===n&&(a=!1,n=t+1);return-1===n?"":e.slice(r,n)}(e);return t&&r.substr(-1*t.length)===t&&(r=r.substr(0,r.length-t.length)),r},p.extname=function(e){"string"!=typeof e&&(e+="");for(var t=-1,r=0,n=-1,a=!0,o=0,i=e.length-1;0<=i;--i){var s=e.charCodeAt(i);if(47===s){if(a)continue;r=i+1;break}-1===n&&(a=!1,n=i+1),46===s?-1===t?t=i:1!==o&&(o=1):-1!==t&&(o=-1)}return-1===t||-1===n||0===o||1===o&&t===n-1&&t===r+1?"":e.slice(t,n)};var n="b"==="ab".substr(-1)?function(e,t,r){return e.substr(t,r)}:function(e,t,r){return t<0&&(t=e.length+t),e.substr(t,r)}}).call(this,e("_process"))},{_process:15}],15:[function(e,t,r){var n,a,o=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function l(t){if(n===setTimeout)return setTimeout(t,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{a="function"==typeof clearTimeout?clearTimeout:s}catch(e){a=s}}();var p,u=[],c=!1,d=-1;function h(){c&&p&&(c=!1,p.length?u=p.concat(u):d=-1,u.length&&m())}function m(){if(!c){var e=l(h);c=!0;for(var t=u.length;t;){for(p=u,u=[];++d<t;)p&&p[d].run();d=-1,t=u.length}p=null,c=!1,function(t){if(a===clearTimeout)return clearTimeout(t);if((a===s||!a)&&clearTimeout)return a=clearTimeout,clearTimeout(t);try{a(t)}catch(e){try{return a.call(null,t)}catch(e){return a.call(this,t)}}}(e)}}function f(e,t){this.fun=e,this.array=t}function y(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(1<arguments.length)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];u.push(new f(e,t)),1!==u.length||c||l(m)},f.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=y,o.addListener=y,o.once=y,o.off=y,o.removeListener=y,o.removeAllListeners=y,o.emit=y,o.prependListener=y,o.prependOnceListener=y,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},{}],16:[function(e,t,r){!function(e){"use strict";if(!e.fetch){var t="URLSearchParams"in e,r="Symbol"in e&&"iterator"in Symbol,i="FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),n="FormData"in e,a="ArrayBuffer"in e;if(a)var o=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],s=function(e){return e&&DataView.prototype.isPrototypeOf(e)},l=ArrayBuffer.isView||function(e){return e&&-1<o.indexOf(Object.prototype.toString.call(e))};m.prototype.append=function(e,t){e=c(e),t=d(t);var r=this.map[e];this.map[e]=r?r+","+t:t},m.prototype.delete=function(e){delete this.map[c(e)]},m.prototype.get=function(e){return e=c(e),this.has(e)?this.map[e]:null},m.prototype.has=function(e){return this.map.hasOwnProperty(c(e))},m.prototype.set=function(e,t){this.map[c(e)]=d(t)},m.prototype.forEach=function(e,t){for(var r in this.map)this.map.hasOwnProperty(r)&&e.call(t,this.map[r],r,this)},m.prototype.keys=function(){var r=[];return this.forEach(function(e,t){r.push(t)}),h(r)},m.prototype.values=function(){var t=[];return this.forEach(function(e){t.push(e)}),h(t)},m.prototype.entries=function(){var r=[];return this.forEach(function(e,t){r.push([t,e])}),h(r)},r&&(m.prototype[Symbol.iterator]=m.prototype.entries);var p=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];_.prototype.clone=function(){return new _(this,{body:this._bodyInit})},b.call(_.prototype),b.call(S.prototype),S.prototype.clone=function(){return new S(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new m(this.headers),url:this.url})},S.error=function(){var e=new S(null,{status:0,statusText:""});return e.type="error",e};var u=[301,302,303,307,308];S.redirect=function(e,t){if(-1===u.indexOf(t))throw new RangeError("Invalid status code");return new S(null,{status:t,headers:{location:e}})},e.Headers=m,e.Request=_,e.Response=S,e.fetch=function(r,a){return new Promise(function(n,e){var t=new _(r,a),o=new XMLHttpRequest;o.onload=function(){var e,a,t={status:o.status,statusText:o.statusText,headers:(e=o.getAllResponseHeaders()||"",a=new m,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach(function(e){var t=e.split(":"),r=t.shift().trim();if(r){var n=t.join(":").trim();a.append(r,n)}}),a)};t.url="responseURL"in o?o.responseURL:t.headers.get("X-Request-URL");var r="response"in o?o.response:o.responseText;n(new S(r,t))},o.onerror=function(){e(new TypeError("Network request failed"))},o.ontimeout=function(){e(new TypeError("Network request failed"))},o.open(t.method,t.url,!0),"include"===t.credentials?o.withCredentials=!0:"omit"===t.credentials&&(o.withCredentials=!1),"responseType"in o&&i&&(o.responseType="blob"),t.headers.forEach(function(e,t){o.setRequestHeader(t,e)}),o.send(void 0===t._bodyInit?null:t._bodyInit)})},e.fetch.polyfill=!0}function c(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function d(e){return"string"!=typeof e&&(e=String(e)),e}function h(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return r&&(e[Symbol.iterator]=function(){return e}),e}function m(t){this.map={},t instanceof m?t.forEach(function(e,t){this.append(t,e)},this):Array.isArray(t)?t.forEach(function(e){this.append(e[0],e[1])},this):t&&Object.getOwnPropertyNames(t).forEach(function(e){this.append(e,t[e])},this)}function f(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function y(r){return new Promise(function(e,t){r.onload=function(){e(r.result)},r.onerror=function(){t(r.error)}})}function g(e){var t=new FileReader,r=y(t);return t.readAsArrayBuffer(e),r}function v(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function b(){return this.bodyUsed=!1,this._initBody=function(e){if(this._bodyInit=e)if("string"==typeof e)this._bodyText=e;else if(i&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e;else if(n&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(t&&URLSearchParams.prototype.isPrototypeOf(e))this._bodyText=e.toString();else if(a&&i&&s(e))this._bodyArrayBuffer=v(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer]);else{if(!a||!ArrayBuffer.prototype.isPrototypeOf(e)&&!l(e))throw new Error("unsupported BodyInit type");this._bodyArrayBuffer=v(e)}else this._bodyText="";this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):t&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i&&(this.blob=function(){var e=f(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?f(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(g)}),this.text=function(){var e,t,r,n=f(this);if(n)return n;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,r=y(t),t.readAsText(e),r;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),r=new Array(t.length),n=0;n<t.length;n++)r[n]=String.fromCharCode(t[n]);return r.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},n&&(this.formData=function(){return this.text().then(x)}),this.json=function(){return this.text().then(JSON.parse)},this}function _(e,t){var r,n,a=(t=t||{}).body;if(e instanceof _){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new m(e.headers)),this.method=e.method,this.mode=e.mode,a||null==e._bodyInit||(a=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"omit",!t.headers&&this.headers||(this.headers=new m(t.headers)),this.method=(r=t.method||this.method||"GET",n=r.toUpperCase(),-1<p.indexOf(n)?n:r),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&a)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(a)}function x(e){var a=new FormData;return e.trim().split("&").forEach(function(e){if(e){var t=e.split("="),r=t.shift().replace(/\+/g," "),n=t.join("=").replace(/\+/g," ");a.append(decodeURIComponent(r),decodeURIComponent(n))}}),a}function S(e,t){t=t||{},this.type="default",this.status=void 0===t.status?200:t.status,this.ok=200<=this.status&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new m(t.headers),this.url=t.url||"",this._initBody(e)}}("undefined"!=typeof self?self:this)},{}],17:[function(e,t,r){"use strict";var n,a=(n=e("./core/main"))&&n.__esModule?n:{default:n};e("./core/constants"),e("./core/environment"),e("./core/friendly_errors/stacktrace"),e("./core/friendly_errors/validate_params"),e("./core/friendly_errors/file_errors"),e("./core/friendly_errors/fes_core"),e("./core/helpers"),e("./core/legacy"),e("./core/preload"),e("./core/p5.Element"),e("./core/p5.Graphics"),e("./core/p5.Renderer"),e("./core/p5.Renderer2D"),e("./core/rendering"),e("./core/shim"),e("./core/structure"),e("./core/transform"),e("./core/shape/2d_primitives"),e("./core/shape/attributes"),e("./core/shape/curves"),e("./core/shape/vertex"),e("./color/color_conversion"),e("./color/creating_reading"),e("./color/p5.Color"),e("./color/setting"),e("./data/p5.TypedDict"),e("./data/local_storage.js"),e("./dom/dom"),e("./events/acceleration"),e("./events/keyboard"),e("./events/mouse"),e("./events/touch"),e("./image/filters"),e("./image/image"),e("./image/loading_displaying"),e("./image/p5.Image"),e("./image/pixels"),e("./io/files"),e("./io/p5.Table"),e("./io/p5.TableRow"),e("./io/p5.XML"),e("./math/calculation"),e("./math/math"),e("./math/noise"),e("./math/p5.Vector"),e("./math/random"),e("./math/trigonometry"),e("./typography/attributes"),e("./typography/loading_displaying"),e("./typography/p5.Font"),e("./utilities/array_functions"),e("./utilities/conversion"),e("./utilities/string_functions"),e("./utilities/time_date"),e("./webgl/3d_primitives"),e("./webgl/interaction"),e("./webgl/light"),e("./webgl/loading"),e("./webgl/material"),e("./webgl/p5.Camera"),e("./webgl/p5.Geometry"),e("./webgl/p5.Matrix"),e("./webgl/p5.RendererGL.Immediate"),e("./webgl/p5.RendererGL"),e("./webgl/p5.RendererGL.Retained"),e("./webgl/p5.Shader"),e("./webgl/p5.RenderBuffer"),e("./webgl/p5.Texture"),e("./webgl/text"),e("./core/init"),t.exports=a.default},{"./color/color_conversion":18,"./color/creating_reading":19,"./color/p5.Color":20,"./color/setting":21,"./core/constants":22,"./core/environment":23,"./core/friendly_errors/fes_core":24,"./core/friendly_errors/file_errors":25,"./core/friendly_errors/stacktrace":26,"./core/friendly_errors/validate_params":27,"./core/helpers":28,"./core/init":29,"./core/legacy":31,"./core/main":32,"./core/p5.Element":33,"./core/p5.Graphics":34,"./core/p5.Renderer":35,"./core/p5.Renderer2D":36,"./core/preload":37,"./core/rendering":38,"./core/shape/2d_primitives":39,"./core/shape/attributes":40,"./core/shape/curves":41,"./core/shape/vertex":42,"./core/shim":43,"./core/structure":44,"./core/transform":45,"./data/local_storage.js":46,"./data/p5.TypedDict":47,"./dom/dom":48,"./events/acceleration":49,"./events/keyboard":50,"./events/mouse":51,"./events/touch":52,"./image/filters":53,"./image/image":54,"./image/loading_displaying":55,"./image/p5.Image":56,"./image/pixels":57,"./io/files":58,"./io/p5.Table":59,"./io/p5.TableRow":60,"./io/p5.XML":61,"./math/calculation":62,"./math/math":63,"./math/noise":64,"./math/p5.Vector":65,"./math/random":66,"./math/trigonometry":67,"./typography/attributes":68,"./typography/loading_displaying":69,"./typography/p5.Font":70,"./utilities/array_functions":71,"./utilities/conversion":72,"./utilities/string_functions":73,"./utilities/time_date":74,"./webgl/3d_primitives":75,"./webgl/interaction":76,"./webgl/light":77,"./webgl/loading":78,"./webgl/material":79,"./webgl/p5.Camera":80,"./webgl/p5.Geometry":81,"./webgl/p5.Matrix":82,"./webgl/p5.RenderBuffer":83,"./webgl/p5.RendererGL":86,"./webgl/p5.RendererGL.Immediate":84,"./webgl/p5.RendererGL.Retained":85,"./webgl/p5.Shader":87,"./webgl/p5.Texture":88,"./webgl/text":89}],18:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n,a=(n=e("../core/main"))&&n.__esModule?n:{default:n};a.default.ColorConversion={},a.default.ColorConversion._hsbaToHSLA=function(e){var t=e[0],r=e[1],n=e[2],a=(2-r)*n/2;return 0!=a&&(1==a?r=0:a<.5?r/=2-r:r=r*n/(2-2*a)),[t,r,a,e[3]]},a.default.ColorConversion._hsbaToRGBA=function(e){var t=6*e[0],r=e[1],n=e[2],a=[];if(0===r)a=[n,n,n,e[3]];else{var o,i,s,l=Math.floor(t),p=n*(1-r),u=n*(1-r*(t-l)),c=n*(1-r*(1+l-t));s=1===l?(o=u,i=n,p):2===l?(o=p,i=n,c):3===l?(o=p,i=u,n):4===l?(o=c,i=p,n):5===l?(o=n,i=p,u):(o=n,i=c,p),a=[o,i,s,e[3]]}return a},a.default.ColorConversion._hslaToHSBA=function(e){var t,r=e[0],n=e[1],a=e[2];return[r,n=2*((t=a<.5?(1+n)*a:a+n-a*n)-a)/t,t,e[3]]},a.default.ColorConversion._hslaToRGBA=function(e){var t=6*e[0],r=e[1],n=e[2],a=[];if(0===r)a=[n,n,n,e[3]];else{var o,i=2*n-(o=n<.5?(1+r)*n:n+r-n*r),s=function(e,t,r){return e<0?e+=6:6<=e&&(e-=6),e<1?t+(r-t)*e:e<3?r:e<4?t+(r-t)*(4-e):t};a=[s(2+t,i,o),s(t,i,o),s(t-2,i,o),e[3]]}return a},a.default.ColorConversion._rgbaToHSBA=function(e){var t,r,n=e[0],a=e[1],o=e[2],i=Math.max(n,a,o),s=i-Math.min(n,a,o);return 0==s?r=t=0:(r=s/i,n===i?t=(a-o)/s:a===i?t=2+(o-n)/s:o===i&&(t=4+(n-a)/s),t<0?t+=6:6<=t&&(t-=6)),[t/6,r,i,e[3]]},a.default.ColorConversion._rgbaToHSLA=function(e){var t,r,n=e[0],a=e[1],o=e[2],i=Math.max(n,a,o),s=Math.min(n,a,o),l=i+s,p=i-s;return 0==p?r=t=0:(r=l<1?p/l:p/(2-l),n===i?t=(a-o)/p:a===i?t=2+(o-n)/p:o===i&&(t=4+(n-a)/p),t<0?t+=6:6<=t&&(t-=6)),[t/6,r,l/2,e[3]]};var o=a.default.ColorConversion;r.default=o},{"../core/main":32}],19:[function(e,t,r){"use strict";function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n,c=(n=e("../core/main"))&&n.__esModule?n:{default:n},d=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==i(e)&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=n?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(r,a,o):r[a]=e[a]}r.default=e,t&&t.set(e,r);return r}(e("../core/constants"));function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}e("./p5.Color"),e("../core/friendly_errors/validate_params"),e("../core/friendly_errors/file_errors"),e("../core/friendly_errors/fes_core"),c.default.prototype.alpha=function(e){return c.default._validateParameters("alpha",arguments),this.color(e)._getAlpha()},c.default.prototype.blue=function(e){return c.default._validateParameters("blue",arguments),this.color(e)._getBlue()},c.default.prototype.brightness=function(e){return c.default._validateParameters("brightness",arguments),this.color(e)._getBrightness()},c.default.prototype.color=function(){if(c.default._validateParameters("color",arguments),arguments[0]instanceof c.default.Color)return arguments[0];var e=arguments[0]instanceof Array?arguments[0]:arguments;return new c.default.Color(this,e)},c.default.prototype.green=function(e){return c.default._validateParameters("green",arguments),this.color(e)._getGreen()},c.default.prototype.hue=function(e){return c.default._validateParameters("hue",arguments),this.color(e)._getHue()},c.default.prototype.lerpColor=function(e,t,r){c.default._validateParameters("lerpColor",arguments);var n,a,o,i,s,l,p=this._colorMode,u=this._colorMaxes;if(p===d.RGB)s=e.levels.map(function(e){return e/255}),l=t.levels.map(function(e){return e/255});else if(p===d.HSB)e._getBrightness(),t._getBrightness(),s=e.hsba,l=t.hsba;else{if(p!==d.HSL)throw new Error("".concat(p,"cannot be used for interpolation."));e._getLightness(),t._getLightness(),s=e.hsla,l=t.hsla}return r=Math.max(Math.min(r,1),0),void 0===this.lerp&&(this.lerp=function(e,t,r){return r*(t-e)+e}),n=this.lerp(s[0],l[0],r),a=this.lerp(s[1],l[1],r),o=this.lerp(s[2],l[2],r),i=this.lerp(s[3],l[3],r),n*=u[p][0],a*=u[p][1],o*=u[p][2],i*=u[p][3],this.color(n,a,o,i)},c.default.prototype.lightness=function(e){return c.default._validateParameters("lightness",arguments),this.color(e)._getLightness()},c.default.prototype.red=function(e){return c.default._validateParameters("red",arguments),this.color(e)._getRed()},c.default.prototype.saturation=function(e){return c.default._validateParameters("saturation",arguments),this.color(e)._getSaturation()};var a=c.default;r.default=a},{"../core/constants":22,"../core/friendly_errors/fes_core":24,"../core/friendly_errors/file_errors":25,"../core/friendly_errors/validate_params":27,"../core/main":32,"./p5.Color":20}],20:[function(e,t,r){"use strict";function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var c=n(e("../core/main")),d=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==i(e)&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=n?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(r,a,o):r[a]=e[a]}r.default=e,t&&t.set(e,r);return r}(e("../core/constants")),h=n(e("./color_conversion"));function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function n(e){return e&&e.__esModule?e:{default:e}}c.default.Color=function(e,t){if(this._storeModeAndMaxes(e._colorMode,e._colorMaxes),this.mode!==d.RGB&&this.mode!==d.HSL&&this.mode!==d.HSB)throw new Error("".concat(this.mode," is an invalid colorMode."));return this._array=c.default.Color._parseInputs.apply(this,t),this._calculateLevels(),this},c.default.Color.prototype.toString=function(e){var t=this.levels,r=this._array,n=r[3];switch(e){case"#rrggbb":return"#".concat(t[0]<16?"0".concat(t[0].toString(16)):t[0].toString(16),t[1]<16?"0".concat(t[1].toString(16)):t[1].toString(16),t[2]<16?"0".concat(t[2].toString(16)):t[2].toString(16));case"#rrggbbaa":return"#".concat(t[0]<16?"0".concat(t[0].toString(16)):t[0].toString(16),t[1]<16?"0".concat(t[1].toString(16)):t[1].toString(16),t[2]<16?"0".concat(t[2].toString(16)):t[2].toString(16),t[3]<16?"0".concat(t[2].toString(16)):t[3].toString(16));case"#rgb":return"#".concat(Math.round(15*r[0]).toString(16),Math.round(15*r[1]).toString(16),Math.round(15*r[2]).toString(16));case"#rgba":return"#".concat(Math.round(15*r[0]).toString(16),Math.round(15*r[1]).toString(16),Math.round(15*r[2]).toString(16),Math.round(15*r[3]).toString(16));case"rgb":return"rgb(".concat(t[0],", ",t[1],", ",t[2],")");case"rgb%":return"rgb(".concat((100*r[0]).toPrecision(3),"%, ",(100*r[1]).toPrecision(3),"%, ",(100*r[2]).toPrecision(3),"%)");case"rgba%":return"rgba(".concat((100*r[0]).toPrecision(3),"%, ",(100*r[1]).toPrecision(3),"%, ",(100*r[2]).toPrecision(3),"%, ",(100*r[3]).toPrecision(3),"%)");case"hsb":case"hsv":return this.hsba||(this.hsba=h.default._rgbaToHSBA(this._array)),"hsb(".concat(this.hsba[0]*this.maxes[d.HSB][0],", ",this.hsba[1]*this.maxes[d.HSB][1],", ",this.hsba[2]*this.maxes[d.HSB][2],")");case"hsb%":case"hsv%":return this.hsba||(this.hsba=h.default._rgbaToHSBA(this._array)),"hsb(".concat((100*this.hsba[0]).toPrecision(3),"%, ",(100*this.hsba[1]).toPrecision(3),"%, ",(100*this.hsba[2]).toPrecision(3),"%)");case"hsba":case"hsva":return this.hsba||(this.hsba=h.default._rgbaToHSBA(this._array)),"hsba(".concat(this.hsba[0]*this.maxes[d.HSB][0],", ",this.hsba[1]*this.maxes[d.HSB][1],", ",this.hsba[2]*this.maxes[d.HSB][2],", ",n,")");case"hsba%":case"hsva%":return this.hsba||(this.hsba=h.default._rgbaToHSBA(this._array)),"hsba(".concat((100*this.hsba[0]).toPrecision(3),"%, ",(100*this.hsba[1]).toPrecision(3),"%, ",(100*this.hsba[2]).toPrecision(3),"%, ",(100*n).toPrecision(3),"%)");case"hsl":return this.hsla||(this.hsla=h.default._rgbaToHSLA(this._array)),"hsl(".concat(this.hsla[0]*this.maxes[d.HSL][0],", ",this.hsla[1]*this.maxes[d.HSL][1],", ",this.hsla[2]*this.maxes[d.HSL][2],")");case"hsl%":return this.hsla||(this.hsla=h.default._rgbaToHSLA(this._array)),"hsl(".concat((100*this.hsla[0]).toPrecision(3),"%, ",(100*this.hsla[1]).toPrecision(3),"%, ",(100*this.hsla[2]).toPrecision(3),"%)");case"hsla":return this.hsla||(this.hsla=h.default._rgbaToHSLA(this._array)),"hsla(".concat(this.hsla[0]*this.maxes[d.HSL][0],", ",this.hsla[1]*this.maxes[d.HSL][1],", ",this.hsla[2]*this.maxes[d.HSL][2],", ",n,")");case"hsla%":return this.hsla||(this.hsla=h.default._rgbaToHSLA(this._array)),"hsl(".concat((100*this.hsla[0]).toPrecision(3),"%, ",(100*this.hsla[1]).toPrecision(3),"%, ",(100*this.hsla[2]).toPrecision(3),"%, ",(100*n).toPrecision(3),"%)");case"rgba":default:return"rgba(".concat(t[0],",",t[1],",",t[2],",",n,")")}},c.default.Color.prototype.setRed=function(e){this._array[0]=e/this.maxes[d.RGB][0],this._calculateLevels()},c.default.Color.prototype.setGreen=function(e){this._array[1]=e/this.maxes[d.RGB][1],this._calculateLevels()},c.default.Color.prototype.setBlue=function(e){this._array[2]=e/this.maxes[d.RGB][2],this._calculateLevels()},c.default.Color.prototype.setAlpha=function(e){this._array[3]=e/this.maxes[this.mode][3],this._calculateLevels()},c.default.Color.prototype._calculateLevels=function(){for(var e=this._array,t=this.levels=new Array(e.length),r=e.length-1;0<=r;--r)t[r]=Math.round(255*e[r])},c.default.Color.prototype._getAlpha=function(){return this._array[3]*this.maxes[this.mode][3]},c.default.Color.prototype._storeModeAndMaxes=function(e,t){this.mode=e,this.maxes=t},c.default.Color.prototype._getMode=function(){return this.mode},c.default.Color.prototype._getMaxes=function(){return this.maxes},c.default.Color.prototype._getBlue=function(){return this._array[2]*this.maxes[d.RGB][2]},c.default.Color.prototype._getBrightness=function(){return this.hsba||(this.hsba=h.default._rgbaToHSBA(this._array)),this.hsba[2]*this.maxes[d.HSB][2]},c.default.Color.prototype._getGreen=function(){return this._array[1]*this.maxes[d.RGB][1]},c.default.Color.prototype._getHue=function(){return this.mode===d.HSB?(this.hsba||(this.hsba=h.default._rgbaToHSBA(this._array)),this.hsba[0]*this.maxes[d.HSB][0]):(this.hsla||(this.hsla=h.default._rgbaToHSLA(this._array)),this.hsla[0]*this.maxes[d.HSL][0])},c.default.Color.prototype._getLightness=function(){return this.hsla||(this.hsla=h.default._rgbaToHSLA(this._array)),this.hsla[2]*this.maxes[d.HSL][2]},c.default.Color.prototype._getRed=function(){return this._array[0]*this.maxes[d.RGB][0]},c.default.Color.prototype._getSaturation=function(){return this.mode===d.HSB?(this.hsba||(this.hsba=h.default._rgbaToHSBA(this._array)),this.hsba[1]*this.maxes[d.HSB][1]):(this.hsla||(this.hsla=h.default._rgbaToHSLA(this._array)),this.hsla[1]*this.maxes[d.HSL][1])};var m={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},a=/\s*/,o=/(\d{1,3})/,l=/((?:\d+(?:\.\d+)?)|(?:\.\d+))/,p=new RegExp("".concat(l.source,"%")),f={HEX3:/^#([a-f0-9])([a-f0-9])([a-f0-9])$/i,HEX4:/^#([a-f0-9])([a-f0-9])([a-f0-9])([a-f0-9])$/i,HEX6:/^#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})$/i,HEX8:/^#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})$/i,RGB:new RegExp(["^rgb\\(",o.source,",",o.source,",",o.source,"\\)$"].join(a.source),"i"),RGB_PERCENT:new RegExp(["^rgb\\(",p.source,",",p.source,",",p.source,"\\)$"].join(a.source),"i"),RGBA:new RegExp(["^rgba\\(",o.source,",",o.source,",",o.source,",",l.source,"\\)$"].join(a.source),"i"),RGBA_PERCENT:new RegExp(["^rgba\\(",p.source,",",p.source,",",p.source,",",l.source,"\\)$"].join(a.source),"i"),HSL:new RegExp(["^hsl\\(",o.source,",",p.source,",",p.source,"\\)$"].join(a.source),"i"),HSLA:new RegExp(["^hsla\\(",o.source,",",p.source,",",p.source,",",l.source,"\\)$"].join(a.source),"i"),HSB:new RegExp(["^hsb\\(",o.source,",",p.source,",",p.source,"\\)$"].join(a.source),"i"),HSBA:new RegExp(["^hsba\\(",o.source,",",p.source,",",p.source,",",l.source,"\\)$"].join(a.source),"i")};c.default.Color._parseInputs=function(e,t,r,n){var a,o=arguments.length,i=this.mode,s=this.maxes[i],l=[];if(3<=o){for(l[0]=e/s[0],l[1]=t/s[1],l[2]=r/s[2],l[3]="number"==typeof n?n/s[3]:1,a=l.length-1;0<=a;--a){var p=l[a];p<0?l[a]=0:1<p&&(l[a]=1)}return i===d.HSL?h.default._hslaToRGBA(l):i===d.HSB?h.default._hsbaToRGBA(l):l}if(1===o&&"string"==typeof e){var u=e.trim().toLowerCase();if(m[u])return c.default.Color._parseInputs.call(this,m[u]);if(f.HEX3.test(u))return(l=f.HEX3.exec(u).slice(1).map(function(e){return parseInt(e+e,16)/255}))[3]=1,l;if(f.HEX6.test(u))return(l=f.HEX6.exec(u).slice(1).map(function(e){return parseInt(e,16)/255}))[3]=1,l;if(f.HEX4.test(u))return l=f.HEX4.exec(u).slice(1).map(function(e){return parseInt(e+e,16)/255});if(f.HEX8.test(u))return l=f.HEX8.exec(u).slice(1).map(function(e){return parseInt(e,16)/255});if(f.RGB.test(u))return(l=f.RGB.exec(u).slice(1).map(function(e){return e/255}))[3]=1,l;if(f.RGB_PERCENT.test(u))return(l=f.RGB_PERCENT.exec(u).slice(1).map(function(e){return parseFloat(e)/100}))[3]=1,l;if(f.RGBA.test(u))return l=f.RGBA.exec(u).slice(1).map(function(e,t){return 3===t?parseFloat(e):e/255});if(f.RGBA_PERCENT.test(u))return l=f.RGBA_PERCENT.exec(u).slice(1).map(function(e,t){return 3===t?parseFloat(e):parseFloat(e)/100});if(f.HSL.test(u)?(l=f.HSL.exec(u).slice(1).map(function(e,t){return 0===t?parseInt(e,10)/360:parseInt(e,10)/100}))[3]=1:f.HSLA.test(u)&&(l=f.HSLA.exec(u).slice(1).map(function(e,t){return 0===t?parseInt(e,10)/360:3===t?parseFloat(e):parseInt(e,10)/100})),(l=l.map(function(e){return Math.max(Math.min(e,1),0)})).length)return h.default._hslaToRGBA(l);if(f.HSB.test(u)?(l=f.HSB.exec(u).slice(1).map(function(e,t){return 0===t?parseInt(e,10)/360:parseInt(e,10)/100}))[3]=1:f.HSBA.test(u)&&(l=f.HSBA.exec(u).slice(1).map(function(e,t){return 0===t?parseInt(e,10)/360:3===t?parseFloat(e):parseInt(e,10)/100})),l.length){for(a=l.length-1;0<=a;--a)l[a]=Math.max(Math.min(l[a],1),0);return h.default._hsbaToRGBA(l)}l=[1,1,1,1]}else{if(1!==o&&2!==o||"number"!=typeof e)throw new Error("".concat(arguments,"is not a valid color representation."));l[0]=e/s[2],l[1]=e/s[2],l[2]=e/s[2],l[3]="number"==typeof t?t/s[3]:1,l=l.map(function(e){return Math.max(Math.min(e,1),0)})}return l};var u=c.default.Color;r.default=u},{"../core/constants":22,"../core/main":32,"./color_conversion":18}],21:[function(e,t,r){"use strict";function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n,s=(n=e("../core/main"))&&n.__esModule?n:{default:n},l=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==i(e)&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=n?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(r,a,o):r[a]=e[a]}r.default=e,t&&t.set(e,r);return r}(e("../core/constants"));function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}e("./p5.Color"),s.default.prototype.background=function(){var e;return(e=this._renderer).background.apply(e,arguments),this},s.default.prototype.clear=function(){return this._renderer.clear(),this},s.default.prototype.colorMode=function(e,t,r,n,a){if(s.default._validateParameters("colorMode",arguments),e===l.RGB||e===l.HSB||e===l.HSL){this._colorMode=e;var o=this._colorMaxes[e];2===arguments.length?(o[0]=t,o[1]=t,o[2]=t,o[3]=t):4===arguments.length?(o[0]=t,o[1]=r,o[2]=n):5===arguments.length&&(o[0]=t,o[1]=r,o[2]=n,o[3]=a)}return this},s.default.prototype.fill=function(){var e;return this._renderer._setProperty("_fillSet",!0),this._renderer._setProperty("_doFill",!0),(e=this._renderer).fill.apply(e,arguments),this},s.default.prototype.noFill=function(){return this._renderer._setProperty("_doFill",!1),this},s.default.prototype.noStroke=function(){return this._renderer._setProperty("_doStroke",!1),this},s.default.prototype.stroke=function(){var e;return this._renderer._setProperty("_strokeSet",!0),this._renderer._setProperty("_doStroke",!0),(e=this._renderer).stroke.apply(e,arguments),this},s.default.prototype.erase=function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:255,t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:255;return this._renderer.erase(e,t),this},s.default.prototype.noErase=function(){return this._renderer.noErase(),this};var a=s.default;r.default=a},{"../core/constants":22,"../core/main":32,"./p5.Color":20}],22:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.FILL=r.STROKE=r.CURVE=r.BEZIER=r.QUADRATIC=r.LINEAR=r._CTX_MIDDLE=r._DEFAULT_LEADMULT=r._DEFAULT_TEXT_FILL=r.BOLDITALIC=r.BOLD=r.ITALIC=r.NORMAL=r.BLUR=r.ERODE=r.DILATE=r.POSTERIZE=r.INVERT=r.OPAQUE=r.GRAY=r.THRESHOLD=r.BURN=r.DODGE=r.SOFT_LIGHT=r.HARD_LIGHT=r.OVERLAY=r.REPLACE=r.SCREEN=r.MULTIPLY=r.EXCLUSION=r.SUBTRACT=r.DIFFERENCE=r.LIGHTEST=r.DARKEST=r.ADD=r.REMOVE=r.BLEND=r.UP_ARROW=r.TAB=r.SHIFT=r.RIGHT_ARROW=r.RETURN=r.OPTION=r.LEFT_ARROW=r.ESCAPE=r.ENTER=r.DOWN_ARROW=r.DELETE=r.CONTROL=r.BACKSPACE=r.ALT=r.AUTO=r.HSL=r.HSB=r.RGB=r.MITER=r.BEVEL=r.ROUND=r.SQUARE=r.PROJECT=r.PIE=r.CHORD=r.OPEN=r.CLOSE=r.TESS=r.QUAD_STRIP=r.QUADS=r.TRIANGLE_STRIP=r.TRIANGLE_FAN=r.TRIANGLES=r.LINE_LOOP=r.LINE_STRIP=r.LINES=r.POINTS=r.BASELINE=r.BOTTOM=r.TOP=r.CENTER=r.LEFT=r.RIGHT=r.RADIUS=r.CORNERS=r.CORNER=r.RAD_TO_DEG=r.DEG_TO_RAD=r.RADIANS=r.DEGREES=r.TWO_PI=r.TAU=r.QUARTER_PI=r.PI=r.HALF_PI=r.WAIT=r.TEXT=r.MOVE=r.HAND=r.CROSS=r.ARROW=r.WEBGL=r.P2D=void 0,r.AXES=r.GRID=r._DEFAULT_FILL=r._DEFAULT_STROKE=r.PORTRAIT=r.LANDSCAPE=r.MIRROR=r.CLAMP=r.REPEAT=r.NEAREST=r.IMAGE=r.IMMEDIATE=r.TEXTURE=void 0;var n=Math.PI;r.P2D="p2d";r.WEBGL="webgl";r.ARROW="default";r.CROSS="crosshair";r.HAND="pointer";r.MOVE="move";r.TEXT="text";r.WAIT="wait";var a=n/2;r.HALF_PI=a;var o=n;r.PI=o;var i=n/4;r.QUARTER_PI=i;var s=2*n;r.TAU=s;var l=2*n;r.TWO_PI=l;r.DEGREES="degrees";r.RADIANS="radians";var p=n/180;r.DEG_TO_RAD=p;var u=180/n;r.RAD_TO_DEG=u;r.CORNER="corner";r.CORNERS="corners";r.RADIUS="radius";r.RIGHT="right";r.LEFT="left";r.CENTER="center";r.TOP="top";r.BOTTOM="bottom";r.BASELINE="alphabetic";r.POINTS=0;r.LINES=1;r.LINE_STRIP=3;r.LINE_LOOP=2;r.TRIANGLES=4;r.TRIANGLE_FAN=6;r.TRIANGLE_STRIP=5;r.QUADS="quads";r.QUAD_STRIP="quad_strip";r.TESS="tess";r.CLOSE="close";r.OPEN="open";r.CHORD="chord";r.PIE="pie";r.PROJECT="square";r.SQUARE="butt";r.ROUND="round";r.BEVEL="bevel";r.MITER="miter";r.RGB="rgb";r.HSB="hsb";r.HSL="hsl";r.AUTO="auto";r.ALT=18;r.BACKSPACE=8;r.CONTROL=17;r.DELETE=46;r.DOWN_ARROW=40;r.ENTER=13;r.ESCAPE=27;r.LEFT_ARROW=37;r.OPTION=18;r.RETURN=13;r.RIGHT_ARROW=39;r.SHIFT=16;r.TAB=9;r.UP_ARROW=38;r.BLEND="source-over";r.REMOVE="destination-out";r.ADD="lighter";r.DARKEST="darken";r.LIGHTEST="lighten";r.DIFFERENCE="difference";r.SUBTRACT="subtract";r.EXCLUSION="exclusion";r.MULTIPLY="multiply";r.SCREEN="screen";r.REPLACE="copy";r.OVERLAY="overlay";r.HARD_LIGHT="hard-light";r.SOFT_LIGHT="soft-light";r.DODGE="color-dodge";r.BURN="color-burn";r.THRESHOLD="threshold";r.GRAY="gray";r.OPAQUE="opaque";r.INVERT="invert";r.POSTERIZE="posterize";r.DILATE="dilate";r.ERODE="erode";r.BLUR="blur";r.NORMAL="normal";r.ITALIC="italic";r.BOLD="bold";r.BOLDITALIC="bold italic";r._DEFAULT_TEXT_FILL="#000000";r._DEFAULT_LEADMULT=1.25;r._CTX_MIDDLE="middle";r.LINEAR="linear";r.QUADRATIC="quadratic";r.BEZIER="bezier";r.CURVE="curve";r.STROKE="stroke";r.FILL="fill";r.TEXTURE="texture";r.IMMEDIATE="immediate";r.IMAGE="image";r.NEAREST="nearest";r.REPEAT="repeat";r.CLAMP="clamp";r.MIRROR="mirror";r.LANDSCAPE="landscape";r.PORTRAIT="portrait";r._DEFAULT_STROKE="#000000";r._DEFAULT_FILL="#FFFFFF";r.GRID="grid";r.AXES="axes"},{}],23:[function(e,t,r){"use strict";function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n,a=(n=e("./main"))&&n.__esModule?n:{default:n},o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==i(e)&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=n?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(r,a,o):r[a]=e[a]}r.default=e,t&&t.set(e,r);return r}(e("./constants"));function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}var l=[o.ARROW,o.CROSS,o.HAND,o.MOVE,o.TEXT,o.WAIT];a.default.prototype._frameRate=0,a.default.prototype._lastFrameTime=window.performance.now(),a.default.prototype._targetFrameRate=60;var p=window.print;function u(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth||0}function c(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight||0}a.default.prototype.print=function(){var e;arguments.length?(e=console).log.apply(e,arguments):p()},a.default.prototype.frameCount=0,a.default.prototype.deltaTime=0,a.default.prototype.focused=document.hasFocus(),a.default.prototype.cursor=function(e,t,r){var n="auto",a=this._curElement.elt;if(l.includes(e))n=e;else if("string"==typeof e){var o="";t&&r&&"number"==typeof t&&"number"==typeof r&&(o="".concat(t," ").concat(r)),n="http://"===e.substring(0,7)||"https://"===e.substring(0,8)?"url(".concat(e,") ").concat(o,", auto"):/\.(cur|jpg|jpeg|gif|png|CUR|JPG|JPEG|GIF|PNG)$/.test(e)?"url(".concat(e,") ").concat(o,", auto"):e}a.style.cursor=n},a.default.prototype.frameRate=function(e){return a.default._validateParameters("frameRate",arguments),"number"!=typeof e||e<0?this._frameRate:(this._setProperty("_targetFrameRate",e),0===e&&this._setProperty("_frameRate",e),this)},a.default.prototype.getFrameRate=function(){return this.frameRate()},a.default.prototype.setFrameRate=function(e){return this.frameRate(e)},a.default.prototype.noCursor=function(){this._curElement.elt.style.cursor="none"},a.default.prototype.displayWidth=screen.width,a.default.prototype.displayHeight=screen.height,a.default.prototype.windowWidth=u(),a.default.prototype.windowHeight=c(),a.default.prototype._onresize=function(e){this._setProperty("windowWidth",u()),this._setProperty("windowHeight",c());var t,r=this._isGlobal?window:this;"function"==typeof r.windowResized&&(void 0===(t=r.windowResized(e))||t||e.preventDefault())},a.default.prototype.width=0,a.default.prototype.height=0,a.default.prototype.fullscreen=function(e){if(a.default._validateParameters("fullscreen",arguments),void 0===e)return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement;e?function(e){if(!(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled))throw new Error("Fullscreen not enabled in this browser.");e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen?e.webkitRequestFullscreen():e.msRequestFullscreen&&e.msRequestFullscreen()}(document.documentElement):document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.msExitFullscreen&&document.msExitFullscreen()},a.default.prototype.pixelDensity=function(e){var t;return a.default._validateParameters("pixelDensity",arguments),"number"==typeof e?(e!==this._pixelDensity&&(this._pixelDensity=e),(t=this).resizeCanvas(this.width,this.height,!0)):t=this._pixelDensity,t},a.default.prototype.displayDensity=function(){return window.devicePixelRatio},a.default.prototype.getURL=function(){return location.href},a.default.prototype.getURLPath=function(){return location.pathname.split("/").filter(function(e){return""!==e})},a.default.prototype.getURLParams=function(){for(var e,t=/[?&]([^&=]+)(?:[&=])([^&=]+)/gim,r={};null!=(e=t.exec(location.search));)e.index===t.lastIndex&&t.lastIndex++,r[e[1]]=e[2];return r};var d=a.default;r.default=d},{"./constants":22,"./main":32}],24:[function(r,e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,a=(n=r("../main"))&&n.__esModule?n:{default:n};r("../internationalization");var o=null,i=null;a.default._friendlyError=a.default._checkForUserDefinedFunctions=a.default._fesErrorMonitor=function(){},o=null;var s="https://github.com/processing/p5.js/wiki/p5.js-overview#why-cant-i-assign-variables-using-p5-functions-and-variables-before-setup";i=function(){function e(r){return Object.getOwnPropertyNames(r).filter(function(e){return"_"!==e[0]&&(!(e in t)&&(t[e]=!0))}).map(function(e){var t;return t="function"==typeof r[e]?"function":e===e.toUpperCase()?"constant":"variable",{name:e,type:t}})}var t={};(o=[].concat(e(a.default.prototype),e(r("../constants")))).sort(function(e,t){return t.name.length-e.name.length})};function l(r,n){n=n||console.log.bind(console),o||i(),o.some(function(e){if(r.message&&null!==r.message.match("\\W?".concat(e.name,"\\W"))){var t="function"===e.type?"".concat(e.name,"()"):e.name;return n("Did you just try to use p5.js's ".concat(t," ").concat(e.type,"? If so, you may want to move it into your sketch's setup() function.\n\nFor more details, see: ").concat(s)),!0}})}a.default.prototype._helpForMisusedAtTopLevelCode=l,"complete"!==document.readyState&&(window.addEventListener("error",l,!1),window.addEventListener("load",function(){window.removeEventListener("error",l,!1)}));var p=a.default;t.default=p},{"../constants":22,"../internationalization":30,"../main":32,"./browser_errors":void 0}],25:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n,a=(n=e("../main"))&&n.__esModule?n:{default:n};e("../internationalization");a.default._friendlyFileLoadError=function(){};var o=a.default;r.default=o},{"../internationalization":30,"../main":32}],26:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n,a=(n=e("../main"))&&n.__esModule?n:{default:n};function o(){var t=/(^|@)\S+:\d+/,r=/^\s*at .*(\S+:\d+|\(native\))/m,n=/^(eval@)?(\[native code])?$/;return{parse:function(e){return void 0!==e.stacktrace||void 0!==e["opera#sourceloc"]?this.parseOpera(e):e.stack&&e.stack.match(r)?this.parseV8OrIE(e):e.stack?this.parseFFOrSafari(e):void 0},extractLocation:function(e){if(-1===e.indexOf(":"))return[e];var t=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/[()]/g,""));return[t[1],t[2]||void 0,t[3]||void 0]},parseV8OrIE:function(e){return e.stack.split("\n").filter(function(e){return!!e.match(r)},this).map(function(e){-1<e.indexOf("(eval ")&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));var t=e.replace(/^\s+/,"").replace(/\(eval code/g,"("),r=t.match(/ (\((.+):(\d+):(\d+)\)$)/),n=(t=r?t.replace(r[0],""):t).split(/\s+/).slice(1),a=this.extractLocation(r?r[1]:n.pop());return{functionName:n.join(" ")||void 0,fileName:-1<["eval","<anonymous>"].indexOf(a[0])?void 0:a[0],lineNumber:a[1],columnNumber:a[2],source:e}},this)},parseFFOrSafari:function(e){return e.stack.split("\n").filter(function(e){return!e.match(n)},this).map(function(e){if(-1<e.indexOf(" > eval")&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),-1===e.indexOf("@")&&-1===e.indexOf(":"))return{functionName:e};var t=/((.*".+"[^@]*)?[^@]*)(?:@)/,r=e.match(t),n=r&&r[1]?r[1]:void 0,a=this.extractLocation(e.replace(t,""));return{functionName:n,fileName:a[0],lineNumber:a[1],columnNumber:a[2],source:e}},this)},parseOpera:function(e){return!e.stacktrace||-1<e.message.indexOf("\n")&&e.message.split("\n").length>e.stacktrace.split("\n").length?this.parseOpera9(e):e.stack?this.parseOpera11(e):this.parseOpera10(e)},parseOpera9:function(e){for(var t=/Line (\d+).*script (?:in )?(\S+)/i,r=e.message.split("\n"),n=[],a=2,o=r.length;a<o;a+=2){var i=t.exec(r[a]);i&&n.push({fileName:i[2],lineNumber:i[1],source:r[a]})}return n},parseOpera10:function(e){for(var t=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,r=e.stacktrace.split("\n"),n=[],a=0,o=r.length;a<o;a+=2){var i=t.exec(r[a]);i&&n.push({functionName:i[3]||void 0,fileName:i[2],lineNumber:i[1],source:r[a]})}return n},parseOpera11:function(e){return e.stack.split("\n").filter(function(e){return!!e.match(t)&&!e.match(/^Error created at/)},this).map(function(e){var t,r=e.split("@"),n=this.extractLocation(r.pop()),a=r.shift()||"",o=a.replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0;return a.match(/\(([^)]*)\)/)&&(t=a.replace(/^[^(]+\(([^)]*)\)$/,"$1")),{functionName:o,args:void 0===t||"[arguments not available]"===t?void 0:t.split(","),fileName:n[0],lineNumber:n[1],columnNumber:n[2],source:e}},this)}}}a.default._getErrorStackParser=function(){return new o};var i=a.default;r.default=i},{"../main":32}],27:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n,a=(n=e("../main"))&&n.__esModule?n:{default:n};(function(e){if(e&&e.__esModule)return;if(null===e||"object"!==s(e)&&"function"!=typeof e)return;var t=i();if(t&&t.has(e))return t.get(e);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=n?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(r,a,o):r[a]=e[a]}r.default=e,t&&t.set(e,r)})(e("../constants")),e("../internationalization");function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}a.default._validateParameters=a.default._clearValidateParamsCache=function(){};var o=a.default;r.default=o},{"../../../docs/parameterData.json":1,"../constants":22,"../internationalization":30,"../main":32}],28:[function(e,t,r){"use strict";function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==i(e)&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=n?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(r,a,o):r[a]=e[a]}r.default=e,t&&t.set(e,r);return r}(e("./constants"));function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}var n={modeAdjust:function(e,t,r,n,a){return a===o.CORNER?{x:e,y:t,w:r,h:n}:a===o.CORNERS?{x:e,y:t,w:r-e,h:n-t}:a===o.RADIUS?{x:e-r,y:t-n,w:2*r,h:2*n}:a===o.CENTER?{x:e-.5*r,y:t-.5*n,w:r,h:n}:void 0}};r.default=n},{"./constants":22}],29:[function(e,t,r){"use strict";var n,a=(n=e("../core/main"))&&n.__esModule?n:{default:n};e("./internationalization");var o=Promise.resolve();Promise.all([new Promise(function(e,t){"complete"===document.readyState?e():window.addEventListener("load",e,!1)}),o]).then(function(){void 0===window._setupDone?window.mocha||(window.setup&&"function"==typeof window.setup||window.draw&&"function"==typeof window.draw)&&!a.default.instance&&new a.default:console.warn("p5.js seems to have been imported multiple times. Please remove the duplicate import")})},{"../core/main":32,"./internationalization":30}],30:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.initialize=n.translator=void 0;var a,o=r(e("i18next")),i=r(e("i18next-browser-languagedetector"));function r(e){return e&&e.__esModule?e:{default:e}}var s=function(){return console.debug("p5.js translator called before translations were loaded"),""};n.translator=s;n.initialize=function(){return new Promise(function(t,r){o.default.use(i.default).init({fallbackLng:"en",nestingPrefix:"$tr(",nestingSuffix:")",defaultNS:"translation",returnEmptyString:!1,interpolation:{escapeValue:!1},detection:{checkWhitelist:!1},resources:a}).then(function(e){n.translator=s=e,t()},function(e){return r("Translations failed to load (".concat(e,")"))})})}},{"../../translations":void 0,i18next:4,"i18next-browser-languagedetector":4}],31:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n,a=(n=e("./main"))&&n.__esModule?n:{default:n};a.default.prototype.pushStyle=function(){throw new Error("pushStyle() not used, see push()")},a.default.prototype.popStyle=function(){throw new Error("popStyle() not used, see pop()")},a.default.prototype.popMatrix=function(){throw new Error("popMatrix() not used, see pop()")},a.default.prototype.pushMatrix=function(){throw new Error("pushMatrix() not used, see push()")};var o=a.default;r.default=o},{"./main":32}],32:[function(e,t,r){"use strict";function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,e("./shim");var n=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==i(e)&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=n?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(r,a,o):r[a]=e[a]}r.default=e,t&&t.set(e,r);return r}(e("./constants"));function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var o=function(){function _(e,t,r){var d=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,_),this._setupDone=!1,this._pixelDensity=Math.ceil(window.devicePixelRatio)||1,this._userNode=t,this._curElement=null,this._elements=[],this._glAttributes=null,this._requestAnimId=0,this._preloadCount=0,this._isGlobal=!1,this._loop=!0,this._initializeInstanceVariables(),this._defaultCanvasSize={width:100,height:100},this._events={mousemove:null,mousedown:null,mouseup:null,dragend:null,dragover:null,click:null,dblclick:null,mouseover:null,mouseout:null,keydown:null,keyup:null,keypress:null,touchstart:null,touchmove:null,touchend:null,resize:null,blur:null},this._millisStart=-1,this._lcg_random_state=null,this._gaussian_previous=!1,this._events.wheel=null,this._loadingScreenId="p5_loading",this._registeredMethods={};var n=Object.getOwnPropertyNames(_.prototype._registeredMethods),a=!0,o=!1,i=void 0;try{for(var s,l=n[Symbol.iterator]();!(a=(s=l.next()).done);a=!0){var p=s.value;this._registeredMethods[p]=_.prototype._registeredMethods[p].slice()}}catch(e){o=!0,i=e}finally{try{a||null==l.return||l.return()}finally{if(o)throw i}}window.DeviceOrientationEvent&&(this._events.deviceorientation=null),window.DeviceMotionEvent&&!window._isNodeWebkit&&(this._events.devicemotion=null),this._start=function(){d._userNode&&"string"==typeof d._userNode&&(d._userNode=document.getElementById(d._userNode));var e=(d._isGlobal?window:d).preload;if(e){var t=document.getElementById(d._loadingScreenId);if(!t)(t=document.createElement("div")).innerHTML="Loading...",t.style.position="absolute",t.id=d._loadingScreenId,(d._userNode||document.body).appendChild(t);var r=d._preloadMethods;for(var n in r){r[n]=r[n]||_;var a=r[n];a!==_.prototype&&a!==_||(d._isGlobal&&(window[n]=d._wrapPreload(d,n)),a=d),d._registeredPreloadMethods[n]=a[n],a[n]=d._wrapPreload(a,n)}e(),d._runIfPreloadsAreDone()}else d._setup(),d._draw()},this._runIfPreloadsAreDone=function(){var e=this._isGlobal?window:this;if(0===e._preloadCount){var t=document.getElementById(e._loadingScreenId);t&&t.parentNode.removeChild(t),this._lastFrameTime=window.performance.now(),e._setup(),e._draw()}},this._decrementPreload=function(){var e=this._isGlobal?window:this;"function"==typeof e.preload&&(e._setProperty("_preloadCount",e._preloadCount-1),e._runIfPreloadsAreDone())},this._wrapPreload=function(n,a){var o=this;return function(){o._incrementPreload();for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return o._registeredPreloadMethods[a].apply(n,t)}},this._incrementPreload=function(){var e=this._isGlobal?window:this;e._setProperty("_preloadCount",e._preloadCount+1)},this._setup=function(){d.createCanvas(d._defaultCanvasSize.width,d._defaultCanvasSize.height,"p2d");var e=d._isGlobal?window:d;if("function"==typeof e.preload)for(var t in d._preloadMethods)e[t]=d._preloadMethods[t][t],e[t]&&d&&(e[t]=e[t].bind(d));d._millisStart=window.performance.now(),"function"==typeof e.setup&&e.setup();var r=document.getElementsByTagName("canvas"),n=!0,a=!1,o=void 0;try{for(var i,s=r[Symbol.iterator]();!(n=(i=s.next()).done);n=!0){var l=i.value;"true"===l.dataset.hidden&&(l.style.visibility="",delete l.dataset.hidden)}}catch(e){a=!0,o=e}finally{try{n||null==s.return||s.return()}finally{if(a)throw o}}d._lastFrameTime=window.performance.now(),d._setupDone=!0},this._draw=function(){var e=window.performance.now(),t=e-d._lastFrameTime,r=1e3/d._targetFrameRate;(!d._loop||r-5<=t)&&(d.redraw(),d._frameRate=1e3/(e-d._lastFrameTime),d.deltaTime=e-d._lastFrameTime,d._setProperty("deltaTime",d.deltaTime),d._lastFrameTime=e,void 0!==d._updateMouseCoords&&(d._updateMouseCoords(),d._setProperty("movedX",0),d._setProperty("movedY",0))),d._loop&&(d._requestAnimId=window.requestAnimationFrame(d._draw))},this._setProperty=function(e,t){d[e]=t,d._isGlobal&&(window[e]=t)},this.remove=function(){var e=document.getElementById(d._loadingScreenId);if(e&&(e.parentNode.removeChild(e),d._incrementPreload()),d._curElement){for(var t in d._loop=!1,d._requestAnimId&&window.cancelAnimationFrame(d._requestAnimId),d._events)window.removeEventListener(t,d._events[t]);var r=!0,n=!1,a=void 0;try{for(var o,i=d._elements[Symbol.iterator]();!(r=(o=i.next()).done);r=!0){var s=o.value;for(var l in s.elt&&s.elt.parentNode&&s.elt.parentNode.removeChild(s.elt),s._events)s.elt.removeEventListener(l,s._events[l])}}catch(e){n=!0,a=e}finally{try{r||null==i.return||i.return()}finally{if(n)throw a}}var p=d;d._registeredMethods.remove.forEach(function(e){void 0!==e&&e.call(p)})}if(d._isGlobal){for(var u in _.prototype)try{delete window[u]}catch(e){window[u]=void 0}for(var c in d)if(d.hasOwnProperty(c))try{delete window[c]}catch(e){window[c]=void 0}_.instance=null}},this._registeredMethods.init.forEach(function(e){void 0!==e&&e.call(this)},this),this._setupPromisePreloads();var u=this._createFriendlyGlobalFunctionBinder();if(e)e(this),_._checkForUserDefinedFunctions(this);else{for(var c in this._isGlobal=!0,_.instance=this,_.prototype)if("function"==typeof _.prototype[c]){var h=c.substring(2);this._events.hasOwnProperty(h)||(Math.hasOwnProperty(c)&&Math[c]===_.prototype[c]?u(c,_.prototype[c]):u(c,_.prototype[c].bind(this)))}else u(c,_.prototype[c]);for(var m in this)this.hasOwnProperty(m)&&u(m,this[m])}for(var f in this._events){var y=this["_on".concat(f)];if(y){var g=y.bind(this);window.addEventListener(f,g,{passive:!1}),this._events[f]=g}}function v(){d._setProperty("focused",!0)}function b(){d._setProperty("focused",!1)}window.addEventListener("focus",v),window.addEventListener("blur",b),this.registerMethod("remove",function(){window.removeEventListener("focus",v),window.removeEventListener("blur",b)}),"complete"===document.readyState?this._start():window.addEventListener("load",this._start.bind(this),!1)}var e,t,r;return e=_,(t=[{key:"_initializeInstanceVariables",value:function(){this._styles=[],this._bezierDetail=20,this._curveDetail=20,this._colorMode=n.RGB,this._colorMaxes={rgb:[255,255,255,255],hsb:[360,100,100,1],hsl:[360,100,100,1]},this._downKeys={}}},{key:"registerPreloadMethod",value:function(e,t){_.prototype._preloadMethods.hasOwnProperty(e)||(_.prototype._preloadMethods[e]=t)}},{key:"registerMethod",value:function(e,t){var r=this||_.prototype;r._registeredMethods.hasOwnProperty(e)||(r._registeredMethods[e]=[]),r._registeredMethods[e].push(t)}},{key:"_createFriendlyGlobalFunctionBinder",value:function(e){var t=0<arguments.length&&void 0!==e?e:{},r=t.globalObject||window;t.log||console.log.bind(console);return function(e,t){r[e]=t}}}])&&a(e.prototype,t),r&&a(e,r),_}();for(var l in o.instance=null,o.disableFriendlyErrors=!1,n)o.prototype[l]=n[l];o.prototype._preloadMethods={loadJSON:o.prototype,loadImage:o.prototype,loadStrings:o.prototype,loadXML:o.prototype,loadBytes:o.prototype,loadTable:o.prototype,loadFont:o.prototype,loadModel:o.prototype,loadShader:o.prototype},o.prototype._registeredMethods={init:[],pre:[],post:[],remove:[]},o.prototype._registeredPreloadMethods={};var p=o;r.default=p},{"./constants":22,"./shim":43}],33:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n,a=(n=e("./main"))&&n.__esModule?n:{default:n};a.default.Element=function(e,t){this.elt=e,this._pInst=this._pixelsState=t,this._events={},this.width=this.elt.offsetWidth,this.height=this.elt.offsetHeight},a.default.Element.prototype.parent=function(e){return void 0===e?this.elt.parentNode:("string"==typeof e?("#"===e[0]&&(e=e.substring(1)),e=document.getElementById(e)):e instanceof a.default.Element&&(e=e.elt),e.appendChild(this.elt),this)},a.default.Element.prototype.id=function(e){return void 0===e?this.elt.id:(this.elt.id=e,this.width=this.elt.offsetWidth,this.height=this.elt.offsetHeight,this)},a.default.Element.prototype.class=function(e){return void 0===e?this.elt.className:(this.elt.className=e,this)},a.default.Element.prototype.mousePressed=function(t){return a.default.Element._adjustListener("mousedown",function(e){return this._pInst._setProperty("mouseIsPressed",!0),this._pInst._setMouseButton(e),t.call(this)},this),this},a.default.Element.prototype.doubleClicked=function(e){return a.default.Element._adjustListener("dblclick",e,this),this},a.default.Element.prototype.mouseWheel=function(e){return a.default.Element._adjustListener("wheel",e,this),this},a.default.Element.prototype.mouseReleased=function(e){return a.default.Element._adjustListener("mouseup",e,this),this},a.default.Element.prototype.mouseClicked=function(e){return a.default.Element._adjustListener("click",e,this),this},a.default.Element.prototype.mouseMoved=function(e){return a.default.Element._adjustListener("mousemove",e,this),this},a.default.Element.prototype.mouseOver=function(e){return a.default.Element._adjustListener("mouseover",e,this),this},a.default.Element.prototype.mouseOut=function(e){return a.default.Element._adjustListener("mouseout",e,this),this},a.default.Element.prototype.touchStarted=function(e){return a.default.Element._adjustListener("touchstart",e,this),this},a.default.Element.prototype.touchMoved=function(e){return a.default.Element._adjustListener("touchmove",e,this),this},a.default.Element.prototype.touchEnded=function(e){return a.default.Element._adjustListener("touchend",e,this),this},a.default.Element.prototype.dragOver=function(e){return a.default.Element._adjustListener("dragover",e,this),this},a.default.Element.prototype.dragLeave=function(e){return a.default.Element._adjustListener("dragleave",e,this),this},a.default.Element._adjustListener=function(e,t,r){return!1===t?a.default.Element._detachListener(e,r):a.default.Element._attachListener(e,t,r),this},a.default.Element._attachListener=function(e,t,r){r._events[e]&&a.default.Element._detachListener(e,r);var n=t.bind(r);r.elt.addEventListener(e,n,!1),r._events[e]=n},a.default.Element._detachListener=function(e,t){var r=t._events[e];t.elt.removeEventListener(e,r,!1),t._events[e]=null},a.default.Element.prototype._setProperty=function(e,t){this[e]=t};var o=a.default.Element;r.default=o},{"./main":32}],34:[function(e,t,r){"use strict";function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n,s=(n=e("./main"))&&n.__esModule?n:{default:n},l=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==i(e)&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=n?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(r,a,o):r[a]=e[a]}r.default=e,t&&t.set(e,r);return r}(e("./constants"));function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}s.default.Graphics=function(e,t,r,n){var a=r||l.P2D;this.canvas=document.createElement("canvas");var o=n._userNode||document.body;for(var i in o.appendChild(this.canvas),s.default.Element.call(this,this.canvas,n),s.default.prototype)this[i]||("function"==typeof s.default.prototype[i]?this[i]=s.default.prototype[i].bind(this):this[i]=s.default.prototype[i]);return s.default.prototype._initializeInstanceVariables.apply(this),this.width=e,this.height=t,this._pixelDensity=n._pixelDensity,a===l.WEBGL?this._renderer=new s.default.RendererGL(this.canvas,this,!1):this._renderer=new s.default.Renderer2D(this.canvas,this,!1),n._elements.push(this),Object.defineProperty(this,"deltaTime",{get:function(){return this._pInst.deltaTime}}),this._renderer.resize(e,t),this._renderer._applyDefaults(),this},s.default.Graphics.prototype=Object.create(s.default.Element.prototype),s.default.Graphics.prototype.reset=function(){this._renderer.resetMatrix(),this._renderer.isP3D&&this._renderer._update()},s.default.Graphics.prototype.remove=function(){this.elt.parentNode&&this.elt.parentNode.removeChild(this.elt);var e=this._pInst._elements.indexOf(this);for(var t in-1!==e&&this._pInst._elements.splice(e,1),this._events)this.elt.removeEventListener(t,this._events[t])};var a=s.default.Graphics;r.default=a},{"./constants":22,"./main":32}],35:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n,l=(n=e("./main"))&&n.__esModule?n:{default:n},b=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==s(e)&&"function"!=typeof e)return{default:e};var t=i();if(t&&t.has(e))return t.get(e);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=n?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(r,a,o):r[a]=e[a]}r.default=e,t&&t.set(e,r);return r}(e("../core/constants"));function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function p(e){var t=0,r=0;if(e.offsetParent)for(;t+=e.offsetLeft,r+=e.offsetTop,e=e.offsetParent;);else t+=e.offsetLeft,r+=e.offsetTop;return[t,r]}l.default.Renderer=function(e,t,r){l.default.Element.call(this,e,t),this.canvas=e,this._pixelsState=t,r?(this._isMainCanvas=!0,this._pInst._setProperty("_curElement",this),this._pInst._setProperty("canvas",this.canvas),this._pInst._setProperty("width",this.width),this._pInst._setProperty("height",this.height)):(this.canvas.style.display="none",this._styles=[]),this._textSize=12,this._textLeading=15,this._textFont="sans-serif",this._textStyle=b.NORMAL,this._textAscent=null,this._textDescent=null,this._textAlign=b.LEFT,this._textBaseline=b.BASELINE,this._rectMode=b.CORNER,this._ellipseMode=b.CENTER,this._curveTightness=0,this._imageMode=b.CORNER,this._tint=null,this._doStroke=!0,this._doFill=!0,this._strokeSet=!1,this._fillSet=!1},l.default.Renderer.prototype=Object.create(l.default.Element.prototype),l.default.Renderer.prototype.push=function(){return{properties:{_doStroke:this._doStroke,_strokeSet:this._strokeSet,_doFill:this._doFill,_fillSet:this._fillSet,_tint:this._tint,_imageMode:this._imageMode,_rectMode:this._rectMode,_ellipseMode:this._ellipseMode,_textFont:this._textFont,_textLeading:this._textLeading,_textSize:this._textSize,_textAlign:this._textAlign,_textBaseline:this._textBaseline,_textStyle:this._textStyle}}},l.default.Renderer.prototype.pop=function(e){e.properties&&Object.assign(this,e.properties)},l.default.Renderer.prototype.resize=function(e,t){this.width=e,this.height=t,this.elt.width=e*this._pInst._pixelDensity,this.elt.height=t*this._pInst._pixelDensity,this.elt.style.width="".concat(e,"px"),this.elt.style.height="".concat(t,"px"),this._isMainCanvas&&(this._pInst._setProperty("width",this.width),this._pInst._setProperty("height",this.height))},l.default.Renderer.prototype.get=function(e,t,r,n){var a=this._pixelsState,o=a._pixelDensity,i=this.canvas;if(void 0===e&&void 0===t)e=t=0,r=a.width,n=a.height;else if(e*=o,t*=o,void 0===r&&void 0===n)return e<0||t<0||e>=i.width||t>=i.height?[0,0,0,0]:this._getPixel(e,t);var s=new l.default.Image(r,n);return s.canvas.getContext("2d").drawImage(i,e,t,r*o,n*o,0,0,r,n),s},l.default.Renderer.prototype.textLeading=function(e){return"number"==typeof e?(this._setProperty("_textLeading",e),this._pInst):this._textLeading},l.default.Renderer.prototype.textSize=function(e){return"number"==typeof e?(this._setProperty("_textSize",e),this._setProperty("_textLeading",e*b._DEFAULT_LEADMULT),this._applyTextProperties()):this._textSize},l.default.Renderer.prototype.textStyle=function(e){return e?(e!==b.NORMAL&&e!==b.ITALIC&&e!==b.BOLD&&e!==b.BOLDITALIC||this._setProperty("_textStyle",e),this._applyTextProperties()):this._textStyle},l.default.Renderer.prototype.textAscent=function(){return null===this._textAscent&&this._updateTextMetrics(),this._textAscent},l.default.Renderer.prototype.textDescent=function(){return null===this._textDescent&&this._updateTextMetrics(),this._textDescent},l.default.Renderer.prototype.textAlign=function(e,t){return void 0!==e?(this._setProperty("_textAlign",e),void 0!==t&&this._setProperty("_textBaseline",t),this._applyTextProperties()):{horizontal:this._textAlign,vertical:this._textBaseline}},l.default.Renderer.prototype.text=function(e,t,r,n,a){var o,i,s,l,p,u,c,d,h,m=this._pInst,f=Number.MAX_VALUE;if((this._doFill||this._doStroke)&&void 0!==e){if("string"!=typeof e&&(e=e.toString()),o=(e=e.replace(/(\t)/g,"  ")).split("\n"),void 0!==n){for(c=1,s=h=0;s<o.length;s++){for(p="",d=o[s].split(" "),i=0;i<d.length;i++)u="".concat(p+d[i]," "),n<this.textWidth(u)&&1<c?(p="".concat(d[i]," "),h+=m.textLeading(),c=1):(p=u,c+=1);s<o.length-1&&(h+=m.textLeading())}switch(this._rectMode===b.CENTER&&(t-=n/2,r-=a/2),this._textAlign){case b.CENTER:t+=n/2;break;case b.RIGHT:t+=n}var y=!1;if(void 0!==a){switch(this._textBaseline){case b.BOTTOM:r+=a-h;break;case b.CENTER:r+=(a-h)/2;break;case b.BASELINE:y=!0,this._textBaseline=b.TOP}f=r+a-m.textAscent()}for(s=0;s<o.length;s++){for(p="",d=o[s].split(" "),i=0;i<d.length;i++)u="".concat(p+d[i]," "),n<this.textWidth(u)&&0<p.length?(this._renderText(m,p,t,r,f),p="".concat(d[i]," "),r+=m.textLeading()):p=u;this._renderText(m,p,t,r,f),r+=m.textLeading(),y&&(this._textBaseline=b.BASELINE)}}else{var g=0,v=m.textAlign().vertical;for(v===b.CENTER?g=(o.length-1)*m.textLeading()/2:v===b.BOTTOM&&(g=(o.length-1)*m.textLeading()),l=0;l<o.length;l++)this._renderText(m,o[l],t,r-g,f),r+=m.textLeading()}return m}},l.default.Renderer.prototype._applyDefaults=function(){return this},l.default.Renderer.prototype._isOpenType=function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:this._textFont;return"object"===s(e)&&e.font&&e.font.supported},l.default.Renderer.prototype._updateTextMetrics=function(){if(this._isOpenType())return this._setProperty("_textAscent",this._textFont._textAscent()),this._setProperty("_textDescent",this._textFont._textDescent()),this;var e=document.createElement("span");e.style.fontFamily=this._textFont,e.style.fontSize="".concat(this._textSize,"px"),e.innerHTML="ABCjgq|";var t=document.createElement("div");t.style.display="inline-block",t.style.width="1px",t.style.height="0px";var r=document.createElement("div");r.appendChild(e),r.appendChild(t),r.style.height="0px",r.style.overflow="hidden",document.body.appendChild(r),t.style.verticalAlign="baseline";var n=p(t),a=p(e),o=n[1]-a[1];t.style.verticalAlign="bottom",n=p(t),a=p(e);var i=n[1]-a[1]-o;return document.body.removeChild(r),this._setProperty("_textAscent",o),this._setProperty("_textDescent",i),this};var a=l.default.Renderer;r.default=a},{"../core/constants":22,"./main":32}],36:[function(e,t,r){"use strict";function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var c=n(e("./main")),m=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==i(e)&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=n?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(r,a,o):r[a]=e[a]}r.default=e,t&&t.set(e,r);return r}(e("./constants")),d=n(e("../image/filters"));function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function n(e){return e&&e.__esModule?e:{default:e}}e("./p5.Renderer");var y="rgba(0,0,0,0)";c.default.Renderer2D=function(e,t,r){return c.default.Renderer.call(this,e,t,r),this.drawingContext=this.canvas.getContext("2d"),this._pInst._setProperty("drawingContext",this.drawingContext),this},c.default.Renderer2D.prototype=Object.create(c.default.Renderer.prototype),c.default.Renderer2D.prototype._applyDefaults=function(){this._cachedFillStyle=this._cachedStrokeStyle=void 0,this._cachedBlendMode=m.BLEND,this._setFill(m._DEFAULT_FILL),this._setStroke(m._DEFAULT_STROKE),this.drawingContext.lineCap=m.ROUND,this.drawingContext.font="normal 12px sans-serif"},c.default.Renderer2D.prototype.resize=function(e,t){c.default.Renderer.prototype.resize.call(this,e,t),this.drawingContext.scale(this._pInst._pixelDensity,this._pInst._pixelDensity)},c.default.Renderer2D.prototype.background=function(){if(this.drawingContext.save(),this.resetMatrix(),(arguments.length<=0?void 0:arguments[0])instanceof c.default.Image)this._pInst.image(arguments.length<=0?void 0:arguments[0],0,0,this.width,this.height);else{var e,t=this._getFill(),r=(e=this._pInst).color.apply(e,arguments).toString();this._setFill(r),this._isErasing&&this.blendMode(this._cachedBlendMode),this.drawingContext.fillRect(0,0,this.width,this.height),this._setFill(t),this._isErasing&&this._pInst.erase()}this.drawingContext.restore()},c.default.Renderer2D.prototype.clear=function(){this.drawingContext.save(),this.resetMatrix(),this.drawingContext.clearRect(0,0,this.width,this.height),this.drawingContext.restore()},c.default.Renderer2D.prototype.fill=function(){var e,t=(e=this._pInst).color.apply(e,arguments);this._setFill(t.toString())},c.default.Renderer2D.prototype.stroke=function(){var e,t=(e=this._pInst).color.apply(e,arguments);this._setStroke(t.toString())},c.default.Renderer2D.prototype.erase=function(e,t){if(!this._isErasing){this._cachedFillStyle=this.drawingContext.fillStyle;var r=this._pInst.color(255,e).toString();this.drawingContext.fillStyle=r,this._cachedStrokeStyle=this.drawingContext.strokeStyle;var n=this._pInst.color(255,t).toString();this.drawingContext.strokeStyle=n;var a=this._cachedBlendMode;this.blendMode(m.REMOVE),this._cachedBlendMode=a,this._isErasing=!0}},c.default.Renderer2D.prototype.noErase=function(){this._isErasing&&(this.drawingContext.fillStyle=this._cachedFillStyle,this.drawingContext.strokeStyle=this._cachedStrokeStyle,this.blendMode(this._cachedBlendMode),this._isErasing=!1)},c.default.Renderer2D.prototype.image=function(e,t,r,n,a,o,i,s,l){var p;e.gifProperties&&e._animateGif(this._pInst);try{this._tint&&(c.default.MediaElement&&e instanceof c.default.MediaElement&&e.loadPixels(),e.canvas&&(p=this._getTintedImageCanvas(e))),p=p||(e.canvas||e.elt);var u=1;e.width&&0<e.width&&(u=p.width/e.width),this._isErasing&&this.blendMode(this._cachedBlendMode),this.drawingContext.drawImage(p,u*t,u*r,u*n,u*a,o,i,s,l),this._isErasing&&this._pInst.erase()}catch(e){if("NS_ERROR_NOT_AVAILABLE"!==e.name)throw e}},c.default.Renderer2D.prototype._getTintedImageCanvas=function(e){if(!e.canvas)return e;var t=d.default._toPixels(e.canvas),r=document.createElement("canvas");r.width=e.canvas.width,r.height=e.canvas.height;for(var n=r.getContext("2d"),a=n.createImageData(e.canvas.width,e.canvas.height),o=a.data,i=0;i<t.length;i+=4){var s=t[i],l=t[i+1],p=t[i+2],u=t[i+3];o[i]=s*this._tint[0]/255,o[i+1]=l*this._tint[1]/255,o[i+2]=p*this._tint[2]/255,o[i+3]=u*this._tint[3]/255}return n.putImageData(a,0,0),r},c.default.Renderer2D.prototype.blendMode=function(e){if(e===m.SUBTRACT)console.warn("blendMode(SUBTRACT) only works in WEBGL mode.");else{if(e!==m.BLEND&&e!==m.REMOVE&&e!==m.DARKEST&&e!==m.LIGHTEST&&e!==m.DIFFERENCE&&e!==m.MULTIPLY&&e!==m.EXCLUSION&&e!==m.SCREEN&&e!==m.REPLACE&&e!==m.OVERLAY&&e!==m.HARD_LIGHT&&e!==m.SOFT_LIGHT&&e!==m.DODGE&&e!==m.BURN&&e!==m.ADD)throw new Error("Mode ".concat(e," not recognized."));this._cachedBlendMode=e,this.drawingContext.globalCompositeOperation=e}},c.default.Renderer2D.prototype.blend=function(){for(var e=this.drawingContext.globalCompositeOperation,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var a=r[r.length-1],o=Array.prototype.slice.call(r,0,r.length-1);this.drawingContext.globalCompositeOperation=a,c.default.prototype.copy.apply(this,o),this.drawingContext.globalCompositeOperation=e},c.default.Renderer2D.prototype._getPixel=function(e,t){var r;return[(r=this.drawingContext.getImageData(e,t,1,1).data)[0],r[1],r[2],r[3]]},c.default.Renderer2D.prototype.loadPixels=function(){var e=this._pixelsState,t=e._pixelDensity,r=this.width*t,n=this.height*t,a=this.drawingContext.getImageData(0,0,r,n);e._setProperty("imageData",a),e._setProperty("pixels",a.data)},c.default.Renderer2D.prototype.set=function(e,t,r){e=Math.floor(e),t=Math.floor(t);var n=this._pixelsState;if(r instanceof c.default.Image)this.drawingContext.save(),this.drawingContext.setTransform(1,0,0,1,0,0),this.drawingContext.scale(n._pixelDensity,n._pixelDensity),this.drawingContext.clearRect(e,t,r.width,r.height),this.drawingContext.drawImage(r.canvas,e,t),this.drawingContext.restore();else{var a=0,o=0,i=0,s=0,l=4*(t*n._pixelDensity*(this.width*n._pixelDensity)+e*n._pixelDensity);if(n.imageData||n.loadPixels.call(n),"number"==typeof r)l<n.pixels.length&&(i=o=a=r,s=255);else if(r instanceof Array){if(r.length<4)throw new Error("pixel array must be of the form [R, G, B, A]");l<n.pixels.length&&(a=r[0],o=r[1],i=r[2],s=r[3])}else r instanceof c.default.Color&&l<n.pixels.length&&(a=r.levels[0],o=r.levels[1],i=r.levels[2],s=r.levels[3]);for(var p=0;p<n._pixelDensity;p++)for(var u=0;u<n._pixelDensity;u++)l=4*((t*n._pixelDensity+u)*this.width*n._pixelDensity+(e*n._pixelDensity+p)),n.pixels[l]=a,n.pixels[l+1]=o,n.pixels[l+2]=i,n.pixels[l+3]=s}},c.default.Renderer2D.prototype.updatePixels=function(e,t,r,n){var a=this._pixelsState,o=a._pixelDensity;void 0===e&&void 0===t&&void 0===r&&void 0===n&&(t=e=0,r=this.width,n=this.height),e*=o,t*=o,r*=o,n*=o,this.gifProperties&&(this.gifProperties.frames[this.gifProperties.displayIndex].image=a.imageData),this.drawingContext.putImageData(a.imageData,e,t,0,0,r,n)},c.default.Renderer2D.prototype._acuteArcToBezier=function(e,t){var r=t/2,n=Math.cos(r),a=Math.sin(r),o=1/Math.tan(r),i=e+r,s=Math.cos(i),l=Math.sin(i),p=(4-n)/3,u=a+(n-p)*o;return{ax:Math.cos(e).toFixed(7),ay:Math.sin(e).toFixed(7),bx:(p*s+u*l).toFixed(7),by:(p*l-u*s).toFixed(7),cx:(p*s-u*l).toFixed(7),cy:(p*l+u*s).toFixed(7),dx:Math.cos(e+t).toFixed(7),dy:Math.sin(e+t).toFixed(7)}},c.default.Renderer2D.prototype.arc=function(r,n,e,t,a,o,i){var s=this.drawingContext,l=e/2,p=t/2,u=0,c=[];for(r+=l,n+=p;1e-5<=o-a;)u=Math.min(o-a,m.HALF_PI),c.push(this._acuteArcToBezier(a,u)),a+=u;return this._doFill&&(s.beginPath(),c.forEach(function(e,t){0===t&&s.moveTo(r+e.ax*l,n+e.ay*p),s.bezierCurveTo(r+e.bx*l,n+e.by*p,r+e.cx*l,n+e.cy*p,r+e.dx*l,n+e.dy*p)}),i!==m.PIE&&null!=i||s.lineTo(r,n),s.closePath(),s.fill()),this._doStroke&&(s.beginPath(),c.forEach(function(e,t){0===t&&s.moveTo(r+e.ax*l,n+e.ay*p),s.bezierCurveTo(r+e.bx*l,n+e.by*p,r+e.cx*l,n+e.cy*p,r+e.dx*l,n+e.dy*p)}),i===m.PIE?(s.lineTo(r,n),s.closePath()):i===m.CHORD&&s.closePath(),s.stroke()),this},c.default.Renderer2D.prototype.ellipse=function(e){var t=this.drawingContext,r=this._doFill,n=this._doStroke,a=parseFloat(e[0]),o=parseFloat(e[1]),i=parseFloat(e[2]),s=parseFloat(e[3]);if(r&&!n){if(this._getFill()===y)return this}else if(!r&&n&&this._getStroke()===y)return this;var l=i/2*.5522847498,p=s/2*.5522847498,u=a+i,c=o+s,d=a+i/2,h=o+s/2;t.beginPath(),t.moveTo(a,h),t.bezierCurveTo(a,h-p,d-l,o,d,o),t.bezierCurveTo(d+l,o,u,h-p,u,h),t.bezierCurveTo(u,h+p,d+l,c,d,c),t.bezierCurveTo(d-l,c,a,h+p,a,h),r&&t.fill(),n&&t.stroke()},c.default.Renderer2D.prototype.line=function(e,t,r,n){var a=this.drawingContext;return this._doStroke&&(this._getStroke()===y||(a.beginPath(),a.moveTo(e,t),a.lineTo(r,n),a.stroke())),this},c.default.Renderer2D.prototype.point=function(e,t){var r=this.drawingContext;if(!this._doStroke)return this;if(this._getStroke()===y)return this;var n=this._getStroke(),a=this._getFill();e=Math.round(e),t=Math.round(t),this._setFill(n),1<r.lineWidth?(r.beginPath(),r.arc(e,t,r.lineWidth/2,0,m.TWO_PI,!1),r.fill()):r.fillRect(e,t,1,1),this._setFill(a)},c.default.Renderer2D.prototype.quad=function(e,t,r,n,a,o,i,s){var l=this.drawingContext,p=this._doFill,u=this._doStroke;if(p&&!u){if(this._getFill()===y)return this}else if(!p&&u&&this._getStroke()===y)return this;return l.beginPath(),l.moveTo(e,t),l.lineTo(r,n),l.lineTo(a,o),l.lineTo(i,s),l.closePath(),p&&l.fill(),u&&l.stroke(),this},c.default.Renderer2D.prototype.rect=function(e){var t=e[0],r=e[1],n=e[2],a=e[3],o=e[4],i=e[5],s=e[6],l=e[7],p=this.drawingContext,u=this._doFill,c=this._doStroke;if(u&&!c){if(this._getFill()===y)return this}else if(!u&&c&&this._getStroke()===y)return this;if(p.beginPath(),void 0===o)p.rect(t,r,n,a);else{void 0===i&&(i=o),void 0===s&&(s=i),void 0===l&&(l=s);var d=Math.abs(n),h=Math.abs(a),m=d/2,f=h/2;d<2*o&&(o=m),h<2*o&&(o=f),d<2*i&&(i=m),h<2*i&&(i=f),d<2*s&&(s=m),h<2*s&&(s=f),d<2*l&&(l=m),h<2*l&&(l=f),p.beginPath(),p.moveTo(t+o,r),p.arcTo(t+n,r,t+n,r+a,i),p.arcTo(t+n,r+a,t,r+a,s),p.arcTo(t,r+a,t,r,l),p.arcTo(t,r,t+n,r,o),p.closePath()}return this._doFill&&p.fill(),this._doStroke&&p.stroke(),this},c.default.Renderer2D.prototype.triangle=function(e){var t=this.drawingContext,r=this._doFill,n=this._doStroke,a=e[0],o=e[1],i=e[2],s=e[3],l=e[4],p=e[5];if(r&&!n){if(this._getFill()===y)return this}else if(!r&&n&&this._getStroke()===y)return this;t.beginPath(),t.moveTo(a,o),t.lineTo(i,s),t.lineTo(l,p),t.closePath(),r&&t.fill(),n&&t.stroke()},c.default.Renderer2D.prototype.endShape=function(e,t,r,n,a,o,i){if(0===t.length)return this;if(!this._doStroke&&!this._doFill)return this;var s,l,p,u=e===m.CLOSE;u&&!o&&t.push(t[0]);var c=t.length;if(!r||i!==m.POLYGON&&null!==i)if(!n||i!==m.POLYGON&&null!==i)if(!a||i!==m.POLYGON&&null!==i)if(i===m.POINTS)for(l=0;l<c;l++)s=t[l],this._doStroke&&this._pInst.stroke(s[6]),this._pInst.point(s[0],s[1]);else if(i===m.LINES)for(l=0;l+1<c;l+=2)s=t[l],this._doStroke&&this._pInst.stroke(t[l+1][6]),this._pInst.line(s[0],s[1],t[l+1][0],t[l+1][1]);else if(i===m.TRIANGLES)for(l=0;l+2<c;l+=3)s=t[l],this.drawingContext.beginPath(),this.drawingContext.moveTo(s[0],s[1]),this.drawingContext.lineTo(t[l+1][0],t[l+1][1]),this.drawingContext.lineTo(t[l+2][0],t[l+2][1]),this.drawingContext.closePath(),this._doFill&&(this._pInst.fill(t[l+2][5]),this.drawingContext.fill()),this._doStroke&&(this._pInst.stroke(t[l+2][6]),this.drawingContext.stroke());else if(i===m.TRIANGLE_STRIP)for(l=0;l+1<c;l++)s=t[l],this.drawingContext.beginPath(),this.drawingContext.moveTo(t[l+1][0],t[l+1][1]),this.drawingContext.lineTo(s[0],s[1]),this._doStroke&&this._pInst.stroke(t[l+1][6]),this._doFill&&this._pInst.fill(t[l+1][5]),l+2<c&&(this.drawingContext.lineTo(t[l+2][0],t[l+2][1]),this._doStroke&&this._pInst.stroke(t[l+2][6]),this._doFill&&this._pInst.fill(t[l+2][5])),this._doFillStrokeClose(u);else if(i===m.TRIANGLE_FAN){if(2<c){for(this.drawingContext.beginPath(),l=2;l<c;l++)s=t[l],this.drawingContext.moveTo(t[0][0],t[0][1]),this.drawingContext.lineTo(t[l-1][0],t[l-1][1]),this.drawingContext.lineTo(s[0],s[1]),this.drawingContext.lineTo(t[0][0],t[0][1]),l<c-1&&(this._doFill&&s[5]!==t[l+1][5]||this._doStroke&&s[6]!==t[l+1][6])&&(this._doFill&&(this._pInst.fill(s[5]),this.drawingContext.fill(),this._pInst.fill(t[l+1][5])),this._doStroke&&(this._pInst.stroke(s[6]),this.drawingContext.stroke(),this._pInst.stroke(t[l+1][6])),this.drawingContext.closePath(),this.drawingContext.beginPath());this._doFillStrokeClose(u)}}else if(i===m.QUADS)for(l=0;l+3<c;l+=4){for(s=t[l],this.drawingContext.beginPath(),this.drawingContext.moveTo(s[0],s[1]),p=1;p<4;p++)this.drawingContext.lineTo(t[l+p][0],t[l+p][1]);this.drawingContext.lineTo(s[0],s[1]),this._doFill&&this._pInst.fill(t[l+3][5]),this._doStroke&&this._pInst.stroke(t[l+3][6]),this._doFillStrokeClose(u)}else if(i===m.QUAD_STRIP){if(3<c)for(l=0;l+1<c;l+=2)s=t[l],this.drawingContext.beginPath(),l+3<c?(this.drawingContext.moveTo(t[l+2][0],t[l+2][1]),this.drawingContext.lineTo(s[0],s[1]),this.drawingContext.lineTo(t[l+1][0],t[l+1][1]),this.drawingContext.lineTo(t[l+3][0],t[l+3][1]),this._doFill&&this._pInst.fill(t[l+3][5]),this._doStroke&&this._pInst.stroke(t[l+3][6])):(this.drawingContext.moveTo(s[0],s[1]),this.drawingContext.lineTo(t[l+1][0],t[l+1][1])),this._doFillStrokeClose(u)}else{for(this.drawingContext.beginPath(),this.drawingContext.moveTo(t[0][0],t[0][1]),l=1;l<c;l++)(s=t[l]).isVert&&(s.moveTo?this.drawingContext.moveTo(s[0],s[1]):this.drawingContext.lineTo(s[0],s[1]));this._doFillStrokeClose(u)}else{for(this.drawingContext.beginPath(),l=0;l<c;l++)t[l].isVert?t[l].moveTo?this.drawingContext.moveTo(t[l][0],t[l][1]):this.drawingContext.lineTo(t[l][0],t[l][1]):this.drawingContext.quadraticCurveTo(t[l][0],t[l][1],t[l][2],t[l][3]);this._doFillStrokeClose(u)}else{for(this.drawingContext.beginPath(),l=0;l<c;l++)t[l].isVert?t[l].moveTo?this.drawingContext.moveTo(t[l][0],t[l][1]):this.drawingContext.lineTo(t[l][0],t[l][1]):this.drawingContext.bezierCurveTo(t[l][0],t[l][1],t[l][2],t[l][3],t[l][4],t[l][5]);this._doFillStrokeClose(u)}else if(3<c){var d=[],h=1-this._curveTightness;for(this.drawingContext.beginPath(),this.drawingContext.moveTo(t[1][0],t[1][1]),l=1;l+2<c;l++)s=t[l],d[0]=[s[0],s[1]],d[1]=[s[0]+(h*t[l+1][0]-h*t[l-1][0])/6,s[1]+(h*t[l+1][1]-h*t[l-1][1])/6],d[2]=[t[l+1][0]+(h*t[l][0]-h*t[l+2][0])/6,t[l+1][1]+(h*t[l][1]-h*t[l+2][1])/6],d[3]=[t[l+1][0],t[l+1][1]],this.drawingContext.bezierCurveTo(d[1][0],d[1][1],d[2][0],d[2][1],d[3][0],d[3][1]);u&&this.drawingContext.lineTo(t[l+1][0],t[l+1][1]),this._doFillStrokeClose(u)}return o=a=n=r=!1,u&&t.pop(),this},c.default.Renderer2D.prototype.strokeCap=function(e){return e!==m.ROUND&&e!==m.SQUARE&&e!==m.PROJECT||(this.drawingContext.lineCap=e),this},c.default.Renderer2D.prototype.strokeJoin=function(e){return e!==m.ROUND&&e!==m.BEVEL&&e!==m.MITER||(this.drawingContext.lineJoin=e),this},c.default.Renderer2D.prototype.strokeWeight=function(e){return this.drawingContext.lineWidth=void 0===e||0===e?1e-4:e,this},c.default.Renderer2D.prototype._getFill=function(){return this._cachedFillStyle||(this._cachedFillStyle=this.drawingContext.fillStyle),this._cachedFillStyle},c.default.Renderer2D.prototype._setFill=function(e){e!==this._cachedFillStyle&&(this.drawingContext.fillStyle=e,this._cachedFillStyle=e)},c.default.Renderer2D.prototype._getStroke=function(){return this._cachedStrokeStyle||(this._cachedStrokeStyle=this.drawingContext.strokeStyle),this._cachedStrokeStyle},c.default.Renderer2D.prototype._setStroke=function(e){e!==this._cachedStrokeStyle&&(this.drawingContext.strokeStyle=e,this._cachedStrokeStyle=e)},c.default.Renderer2D.prototype.bezier=function(e,t,r,n,a,o,i,s){return this._pInst.beginShape(),this._pInst.vertex(e,t),this._pInst.bezierVertex(r,n,a,o,i,s),this._pInst.endShape(),this},c.default.Renderer2D.prototype.curve=function(e,t,r,n,a,o,i,s){return this._pInst.beginShape(),this._pInst.curveVertex(e,t),this._pInst.curveVertex(r,n),this._pInst.curveVertex(a,o),this._pInst.curveVertex(i,s),this._pInst.endShape(),this},c.default.Renderer2D.prototype._doFillStrokeClose=function(e){e&&this.drawingContext.closePath(),this._doFill&&this.drawingContext.fill(),this._doStroke&&this.drawingContext.stroke()},c.default.Renderer2D.prototype.applyMatrix=function(e,t,r,n,a,o){this.drawingContext.transform(e,t,r,n,a,o)},c.default.Renderer2D.prototype.resetMatrix=function(){return this.drawingContext.setTransform(1,0,0,1,0,0),this.drawingContext.scale(this._pInst._pixelDensity,this._pInst._pixelDensity),this},c.default.Renderer2D.prototype.rotate=function(e){this.drawingContext.rotate(e)},c.default.Renderer2D.prototype.scale=function(e,t){return this.drawingContext.scale(e,t),this},c.default.Renderer2D.prototype.translate=function(e,t){return e instanceof c.default.Vector&&(t=e.y,e=e.x),this.drawingContext.translate(e,t),this},c.default.Renderer2D.prototype.text=function(e,t,r,n,a){var o;void 0!==n&&this.drawingContext.textBaseline===m.BASELINE&&(o=!0,this.drawingContext.textBaseline=m.TOP);var i=c.default.Renderer.prototype.text.apply(this,arguments);return o&&(this.drawingContext.textBaseline=m.BASELINE),i},c.default.Renderer2D.prototype._renderText=function(e,t,r,n,a){if(!(a<=n))return e.push(),this._isOpenType()?this._textFont._renderPath(t,r,n,{renderer:this}):(this._doStroke&&this._strokeSet&&this.drawingContext.strokeText(t,r,n),this._doFill&&(this._fillSet||this._setFill(m._DEFAULT_TEXT_FILL),this.drawingContext.fillText(t,r,n))),e.pop(),e},c.default.Renderer2D.prototype.textWidth=function(e){return this._isOpenType()?this._textFont._textWidth(e,this._textSize):this.drawingContext.measureText(e).width},c.default.Renderer2D.prototype._applyTextProperties=function(){var e,t=this._pInst;return this._setProperty("_textAscent",null),this._setProperty("_textDescent",null),e=this._textFont,this._isOpenType()&&(e=this._textFont.font.familyName,this._setProperty("_textStyle",this._textFont.font.styleName)),this.drawingContext.font="".concat(this._textStyle||"normal"," ").concat(this._textSize||12,"px ").concat(e||"sans-serif"),this.drawingContext.textAlign=this._textAlign,this._textBaseline===m.CENTER?this.drawingContext.textBaseline=m._CTX_MIDDLE:this.drawingContext.textBaseline=this._textBaseline,t},c.default.Renderer2D.prototype.push=function(){return this.drawingContext.save(),c.default.Renderer.prototype.push.apply(this)},c.default.Renderer2D.prototype.pop=function(e){this.drawingContext.restore(),this._cachedFillStyle=this.drawingContext.fillStyle,this._cachedStrokeStyle=this.drawingContext.strokeStyle,c.default.Renderer.prototype.pop.call(this,e)};var a=c.default.Renderer2D;r.default=a},{"../image/filters":53,"./constants":22,"./main":32,"./p5.Renderer":35}],37:[function(e,t,r){"use strict";var n,d=(n=e("./main"))&&n.__esModule?n:{default:n};d.default.prototype._promisePreloads=[];var h=!(d.default.prototype.registerPromisePreload=function(e){d.default.prototype._promisePreloads.push(e)});d.default.prototype._setupPromisePreloads=function(){var e=!0,t=!1,r=void 0;try{for(var n,a=this._promisePreloads[Symbol.iterator]();!(e=(n=a.next()).done);e=!0){var o=n.value,i=this,s=o.method,l=o.addCallbacks,p=o.legacyPreloadSetup,u=o.target||this,c=u[s].bind(u);if(u===d.default.prototype){if(h)continue;i=null,c=u[s]}if(u[s]=this._wrapPromisePreload(i,c,l),p)u[p.method]=this._legacyPreloadGenerator(i,p,u[s])}}catch(e){t=!0,r=e}finally{try{e||null==a.return||a.return()}finally{if(t)throw r}}h=!0},d.default.prototype._wrapPromisePreload=function(e,l,p){var t=function(){var e=this;this._incrementPreload();for(var t=null,r=null,n=arguments.length,a=new Array(n),o=0;o<n;o++)a[o]=arguments[o];if(p)for(var i=a.length-1;0<=i&&!r&&"function"==typeof a[i];i--)r=t,t=a.pop();var s=Promise.resolve(l.apply(this,a));return t&&s.then(t),r&&s.catch(r),s.then(function(){return e._decrementPreload()}),s};return e&&(t=t.bind(e)),t};function o(){return{}}d.default.prototype._legacyPreloadGenerator=function(e,t,n){var a=t.createBaseObject||o,r=function(){var t=this;this._incrementPreload();var r=a.apply(this,arguments);return n.apply(this,arguments).then(function(e){Object.assign(r,e),t._decrementPreload()}),r};return e&&(r=r.bind(e)),r}},{"./main":32}],38:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n,l=(n=e("./main"))&&n.__esModule?n:{default:n},p=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==s(e)&&"function"!=typeof e)return{default:e};var t=i();if(t&&t.has(e))return t.get(e);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=n?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(r,a,o):r[a]=e[a]}r.default=e,t&&t.set(e,r);return r}(e("./constants"));function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}e("./p5.Graphics"),e("./p5.Renderer2D"),e("../webgl/p5.RendererGL");var u="defaultCanvas0";l.default.prototype.createCanvas=function(e,t,r){l.default._validateParameters("createCanvas",arguments);var n,a=r||p.P2D;if(a===p.WEBGL){if(n=document.getElementById(u)){n.parentNode.removeChild(n);var o=this._renderer;this._elements=this._elements.filter(function(e){return e!==o})}(n=document.createElement("canvas")).id=u,n.classList.add("p5Canvas")}else if(this._defaultGraphicsCreated)n=this.canvas;else{n=document.createElement("canvas");for(var i=0;document.getElementById("defaultCanvas".concat(i));)i++;u="defaultCanvas".concat(i),n.id=u,n.classList.add("p5Canvas")}if(this._setupDone||(n.dataset.hidden=!0,n.style.visibility="hidden"),this._userNode)this._userNode.appendChild(n);else{if(0===document.getElementsByTagName("main").length){var s=document.createElement("main");document.body.appendChild(s)}document.getElementsByTagName("main")[0].appendChild(n)}return a===p.WEBGL?(this._setProperty("_renderer",new l.default.RendererGL(n,this,!0)),this._elements.push(this._renderer)):this._defaultGraphicsCreated||(this._setProperty("_renderer",new l.default.Renderer2D(n,this,!0)),this._defaultGraphicsCreated=!0,this._elements.push(this._renderer)),this._renderer.resize(e,t),this._renderer._applyDefaults(),this._renderer},l.default.prototype.resizeCanvas=function(e,t,r){if(l.default._validateParameters("resizeCanvas",arguments),this._renderer){var n={};for(var a in this.drawingContext){var o=this.drawingContext[a];"object"!==s(o)&&"function"!=typeof o&&(n[a]=o)}for(var i in this._renderer.resize(e,t),this.width=e,this.height=t,n)try{this.drawingContext[i]=n[i]}catch(e){}r||this.redraw()}},l.default.prototype.noCanvas=function(){this.canvas&&this.canvas.parentNode.removeChild(this.canvas)},l.default.prototype.createGraphics=function(e,t,r){return l.default._validateParameters("createGraphics",arguments),new l.default.Graphics(e,t,r,this)},l.default.prototype.blendMode=function(e){l.default._validateParameters("blendMode",arguments),e===p.NORMAL&&(console.warn("NORMAL has been deprecated for use in blendMode. defaulting to BLEND instead."),e=p.BLEND),this._renderer.blendMode(e)};var a=l.default;r.default=a},{"../webgl/p5.RendererGL":86,"./constants":22,"./main":32,"./p5.Graphics":34,"./p5.Renderer2D":36}],39:[function(e,t,r){"use strict";function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var u=n(e("../main")),s=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==i(e)&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=n?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(r,a,o):r[a]=e[a]}r.default=e,t&&t.set(e,r);return r}(e("../constants")),c=n(e("../helpers"));function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function n(e){return e&&e.__esModule?e:{default:e}}e("../friendly_errors/fes_core"),e("../friendly_errors/file_errors"),e("../friendly_errors/validate_params"),u.default.prototype._normalizeArcAngles=function(e,t,r,n,a){var o;return e-=s.TWO_PI*Math.floor(e/s.TWO_PI),t-=s.TWO_PI*Math.floor(t/s.TWO_PI),o=Math.min(Math.abs(e-t),s.TWO_PI-Math.abs(e-t)),a&&(e=e<=s.HALF_PI?Math.atan(r/n*Math.tan(e)):e>s.HALF_PI&&e<=3*s.HALF_PI?Math.atan(r/n*Math.tan(e))+s.PI:Math.atan(r/n*Math.tan(e))+s.TWO_PI,t=t<=s.HALF_PI?Math.atan(r/n*Math.tan(t)):t>s.HALF_PI&&t<=3*s.HALF_PI?Math.atan(r/n*Math.tan(t))+s.PI:Math.atan(r/n*Math.tan(t))+s.TWO_PI),t<e&&(t+=s.TWO_PI),{start:e,stop:t,correspondToSamePoint:o<1e-5}},u.default.prototype.arc=function(e,t,r,n,a,o,i,s){if(u.default._validateParameters("arc",arguments),!this._renderer._doStroke&&!this._renderer._doFill)return this;if(a===o)return this;a=this._toRadians(a),o=this._toRadians(o),r=Math.abs(r),n=Math.abs(n);var l=c.default.modeAdjust(e,t,r,n,this._renderer._ellipseMode),p=this._normalizeArcAngles(a,o,l.w,l.h,!0);return p.correspondToSamePoint?this._renderer.ellipse([l.x,l.y,l.w,l.h,s]):this._renderer.arc(l.x,l.y,l.w,l.h,p.start,p.stop,i,s),this},u.default.prototype.ellipse=function(e,t,r,n,a){return u.default._validateParameters("ellipse",arguments),this._renderEllipse.apply(this,arguments)},u.default.prototype.circle=function(){u.default._validateParameters("circle",arguments);var e=Array.prototype.slice.call(arguments,0,2);return e.push(arguments[2]),e.push(arguments[2]),this._renderEllipse.apply(this,e)},u.default.prototype._renderEllipse=function(e,t,r,n,a){if(!this._renderer._doStroke&&!this._renderer._doFill)return this;r<0&&(r=Math.abs(r)),void 0===n?n=r:n<0&&(n=Math.abs(n));var o=c.default.modeAdjust(e,t,r,n,this._renderer._ellipseMode);return this._renderer.ellipse([o.x,o.y,o.w,o.h,a]),this},u.default.prototype.line=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n;u.default._validateParameters("line",t),this._renderer._doStroke&&(n=this._renderer).line.apply(n,t);return this},u.default.prototype.point=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n;u.default._validateParameters("point",t),this._renderer._doStroke&&(1===t.length&&t[0]instanceof u.default.Vector?this._renderer.point.call(this._renderer,t[0].x,t[0].y,t[0].z):(n=this._renderer).point.apply(n,t));return this},u.default.prototype.quad=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n;u.default._validateParameters("quad",t),(this._renderer._doStroke||this._renderer._doFill)&&(this._renderer.isP3D&&12!==t.length?this._renderer.quad.call(this._renderer,t[0],t[1],0,t[2],t[3],0,t[4],t[5],0,t[6],t[7],0):(n=this._renderer).quad.apply(n,t));return this},u.default.prototype.rect=function(){return u.default._validateParameters("rect",arguments),this._renderRect.apply(this,arguments)},u.default.prototype.square=function(e,t,r,n,a,o,i){return u.default._validateParameters("square",arguments),this._renderRect.call(this,e,t,r,r,n,a,o,i)},u.default.prototype._renderRect=function(){if(this._renderer._doStroke||this._renderer._doFill){3===arguments.length&&(arguments[3]=arguments[2]);for(var e=c.default.modeAdjust(arguments[0],arguments[1],arguments[2],arguments[3],this._renderer._rectMode),t=[e.x,e.y,e.w,e.h],r=4;r<arguments.length;r++)t[r]=arguments[r];this._renderer.rect(t)}return this},u.default.prototype.triangle=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return u.default._validateParameters("triangle",t),(this._renderer._doStroke||this._renderer._doFill)&&this._renderer.triangle(t),this};var a=u.default;r.default=a},{"../constants":22,"../friendly_errors/fes_core":24,"../friendly_errors/file_errors":25,"../friendly_errors/validate_params":27,"../helpers":28,"../main":32}],40:[function(e,t,r){"use strict";function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n,a=(n=e("../main"))&&n.__esModule?n:{default:n},o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==i(e)&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=n?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(r,a,o):r[a]=e[a]}r.default=e,t&&t.set(e,r);return r}(e("../constants"));function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}a.default.prototype.ellipseMode=function(e){return a.default._validateParameters("ellipseMode",arguments),e!==o.CORNER&&e!==o.CORNERS&&e!==o.RADIUS&&e!==o.CENTER||(this._renderer._ellipseMode=e),this},a.default.prototype.noSmooth=function(){return this.setAttributes("antialias",!1),this._renderer.isP3D||"imageSmoothingEnabled"in this.drawingContext&&(this.drawingContext.imageSmoothingEnabled=!1),this},a.default.prototype.rectMode=function(e){return a.default._validateParameters("rectMode",arguments),e!==o.CORNER&&e!==o.CORNERS&&e!==o.RADIUS&&e!==o.CENTER||(this._renderer._rectMode=e),this},a.default.prototype.smooth=function(){return this.setAttributes("antialias",!0),this._renderer.isP3D||"imageSmoothingEnabled"in this.drawingContext&&(this.drawingContext.imageSmoothingEnabled=!0),this},a.default.prototype.strokeCap=function(e){return a.default._validateParameters("strokeCap",arguments),e!==o.ROUND&&e!==o.SQUARE&&e!==o.PROJECT||this._renderer.strokeCap(e),this},a.default.prototype.strokeJoin=function(e){return a.default._validateParameters("strokeJoin",arguments),e!==o.ROUND&&e!==o.BEVEL&&e!==o.MITER||this._renderer.strokeJoin(e),this},a.default.prototype.strokeWeight=function(e){return a.default._validateParameters("strokeWeight",arguments),this._renderer.strokeWeight(e),this};var l=a.default;r.default=l},{"../constants":22,"../main":32}],41:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n,s=(n=e("../main"))&&n.__esModule?n:{default:n};e("../friendly_errors/fes_core"),e("../friendly_errors/file_errors"),e("../friendly_errors/validate_params"),s.default.prototype.bezier=function(){for(var e,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return s.default._validateParameters("bezier",r),(this._renderer._doStroke||this._renderer._doFill)&&(e=this._renderer).bezier.apply(e,r),this},s.default.prototype.bezierDetail=function(e){return s.default._validateParameters("bezierDetail",arguments),this._bezierDetail=e,this},s.default.prototype.bezierPoint=function(e,t,r,n,a){s.default._validateParameters("bezierPoint",arguments);var o=1-a;return Math.pow(o,3)*e+3*Math.pow(o,2)*a*t+3*o*Math.pow(a,2)*r+Math.pow(a,3)*n},s.default.prototype.bezierTangent=function(e,t,r,n,a){s.default._validateParameters("bezierTangent",arguments);var o=1-a;return 3*n*Math.pow(a,2)-3*r*Math.pow(a,2)+6*r*o*a-6*t*o*a+3*t*Math.pow(o,2)-3*e*Math.pow(o,2)},s.default.prototype.curve=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n;s.default._validateParameters("curve",t),this._renderer._doStroke&&(n=this._renderer).curve.apply(n,t);return this},s.default.prototype.curveDetail=function(e){return s.default._validateParameters("curveDetail",arguments),this._curveDetail=e<3?3:e,this},s.default.prototype.curveTightness=function(e){return s.default._validateParameters("curveTightness",arguments),this._renderer._curveTightness=e,this},s.default.prototype.curvePoint=function(e,t,r,n,a){s.default._validateParameters("curvePoint",arguments);var o=a*a*a,i=a*a;return e*(-.5*o+i-.5*a)+t*(1.5*o-2.5*i+1)+r*(-1.5*o+2*i+.5*a)+n*(.5*o-.5*i)},s.default.prototype.curveTangent=function(e,t,r,n,a){s.default._validateParameters("curveTangent",arguments);var o=a*a;return e*(-3*o/2+2*a-.5)+t*(9*o/2-5*a)+r*(-9*o/2+4*a+.5)+n*(3*o/2-a)};var a=s.default;r.default=a},{"../friendly_errors/fes_core":24,"../friendly_errors/file_errors":25,"../friendly_errors/validate_params":27,"../main":32}],42:[function(e,t,r){"use strict";function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n,s=(n=e("../main"))&&n.__esModule?n:{default:n},l=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==i(e)&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=n?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(r,a,o):r[a]=e[a]}r.default=e,t&&t.set(e,r);return r}(e("../constants"));function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}var a=null,u=[],c=[],d=!1,o=!1,h=!1,m=!1,f=!0;s.default.prototype.beginContour=function(){return c=[],m=!0,this},s.default.prototype.beginShape=function(e){var t;(s.default._validateParameters("beginShape",arguments),this._renderer.isP3D)?(t=this._renderer).beginShape.apply(t,arguments):(a=e===l.POINTS||e===l.LINES||e===l.TRIANGLES||e===l.TRIANGLE_FAN||e===l.TRIANGLE_STRIP||e===l.QUADS||e===l.QUAD_STRIP?e:null,u=[],c=[]);return this},s.default.prototype.bezierVertex=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n;if(s.default._validateParameters("bezierVertex",t),this._renderer.isP3D)(n=this._renderer).bezierVertex.apply(n,t);else if(0===u.length)s.default._friendlyError("vertex() must be used once before calling bezierVertex()","bezierVertex");else{d=!0;for(var a=[],o=0;o<t.length;o++)a[o]=t[o];a.isVert=!1,m?c.push(a):u.push(a)}return this},s.default.prototype.curveVertex=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n;(s.default._validateParameters("curveVertex",t),this._renderer.isP3D)?(n=this._renderer).curveVertex.apply(n,t):(o=!0,this.vertex(t[0],t[1]));return this},s.default.prototype.endContour=function(){var e=c[0].slice();e.isVert=c[0].isVert,e.moveTo=!1,c.push(e),f&&(u.push(u[0]),f=!1);for(var t=0;t<c.length;t++)u.push(c[t]);return this},s.default.prototype.endShape=function(e){if(s.default._validateParameters("endShape",arguments),this._renderer.isP3D)this._renderer.endShape(e,o,d,h,m,a);else{if(0===u.length)return this;if(!this._renderer._doStroke&&!this._renderer._doFill)return this;var t=e===l.CLOSE;t&&!m&&u.push(u[0]),this._renderer.endShape(e,u,o,d,h,m,a),f=!(m=h=d=o=!1),t&&u.pop()}return this},s.default.prototype.quadraticVertex=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];if(s.default._validateParameters("quadraticVertex",t),this._renderer.isP3D){var n;(n=this._renderer).quadraticVertex.apply(n,t)}else{if(this._contourInited){var a={};return a.x=t[0],a.y=t[1],a.x3=t[2],a.y3=t[3],a.type=l.QUADRATIC,this._contourVertices.push(a),this}if(0<u.length){h=!0;for(var o=[],i=0;i<t.length;i++)o[i]=t[i];o.isVert=!1,m?c.push(o):u.push(o)}else s.default._friendlyError("vertex() must be used once before calling quadraticVertex()","quadraticVertex")}return this},s.default.prototype.vertex=function(e,t,r,n,a){if(this._renderer.isP3D){var o;(o=this._renderer).vertex.apply(o,arguments)}else{var i=[];i.isVert=!0,i[0]=e,i[1]=t,i[2]=0,i[3]=0,i[4]=0,i[5]=this._renderer._getFill(),i[6]=this._renderer._getStroke(),r&&(i.moveTo=r),m?(0===c.length&&(i.moveTo=!0),c.push(i)):u.push(i)}return this};var y=s.default;r.default=y},{"../constants":22,"../main":32}],43:[function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}window.requestAnimationFrame=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(e,t){window.setTimeout(e,1e3/60)},"undefined"==typeof Uint8ClampedArray||Uint8ClampedArray.prototype.slice||Object.defineProperty(Uint8ClampedArray.prototype,"slice",{value:Array.prototype.slice,writable:!0,configurable:!0,enumerable:!1}),function(){if(!Object.assign){var s=Object.keys,e=Object.defineProperty,l="function"==typeof Symbol&&"symbol"===n(Symbol()),r=Object.prototype.propertyIsEnumerable,p=function(t){return function(e){return r.call(t,e)}};e(Object,"assign",{value:function(e,t){if(null==e)throw new TypeError("target must be an object");var r,n,a,o,i=Object(e);for(r=1;r<arguments.length;++r)for(n=Object(arguments[r]),o=s(n),l&&Object.getOwnPropertySymbols&&o.push.apply(o,Object.getOwnPropertySymbols(n).filter(p(n))),a=0;a<o.length;++a)i[o[a]]=n[o[a]];return i},configurable:!0,enumerable:!1,writable:!0})}}()},{}],44:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n,a=(n=e("./main"))&&n.__esModule?n:{default:n};a.default.prototype.noLoop=function(){this._loop=!1},a.default.prototype.loop=function(){this._loop||(this._loop=!0,this._setupDone&&this._draw())},a.default.prototype.isLooping=function(){return this._loop},a.default.prototype.push=function(){this._styles.push({props:{_colorMode:this._colorMode},renderer:this._renderer.push()})},a.default.prototype.pop=function(){var e=this._styles.pop();e?(this._renderer.pop(e.renderer),Object.assign(this,e.props)):console.warn("pop() was called without matching push()")},a.default.prototype.redraw=function(e){if(!this._inUserDraw&&this._setupDone){var t=parseInt(e);(isNaN(t)||t<1)&&(t=1);var r=this._isGlobal?window:this,n=r.setup,a=r.draw;if("function"==typeof a){void 0===n&&r.scale(r._pixelDensity,r._pixelDensity);for(var o=function(e){e.call(r)},i=0;i<t;i++){r.resetMatrix(),r._renderer.isP3D&&r._renderer._update(),r._setProperty("frameCount",r.frameCount+1),r._registeredMethods.pre.forEach(o),this._inUserDraw=!0;try{a()}finally{this._inUserDraw=!1}r._registeredMethods.post.forEach(o)}}}};var o=a.default;r.default=o},{"./main":32}],45:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n,o=(n=e("./main"))&&n.__esModule?n:{default:n};o.default.prototype.applyMatrix=function(e,t,r,n,a,o){var i;return(i=this._renderer).applyMatrix.apply(i,arguments),this},o.default.prototype.resetMatrix=function(){return this._renderer.resetMatrix(),this},o.default.prototype.rotate=function(e,t){return o.default._validateParameters("rotate",arguments),this._renderer.rotate(this._toRadians(e),t),this},o.default.prototype.rotateX=function(e){return this._assert3d("rotateX"),o.default._validateParameters("rotateX",arguments),this._renderer.rotateX(this._toRadians(e)),this},o.default.prototype.rotateY=function(e){return this._assert3d("rotateY"),o.default._validateParameters("rotateY",arguments),this._renderer.rotateY(this._toRadians(e)),this},o.default.prototype.rotateZ=function(e){return this._assert3d("rotateZ"),o.default._validateParameters("rotateZ",arguments),this._renderer.rotateZ(this._toRadians(e)),this},o.default.prototype.scale=function(e,t,r){if(o.default._validateParameters("scale",arguments),e instanceof o.default.Vector){var n=e;e=n.x,t=n.y,r=n.z}else if(e instanceof Array){var a=e;e=a[0],t=a[1],r=a[2]||1}return isNaN(t)?t=r=e:isNaN(r)&&(r=1),this._renderer.scale.call(this._renderer,e,t,r),this},o.default.prototype.shearX=function(e){o.default._validateParameters("shearX",arguments);var t=this._toRadians(e);return this._renderer.applyMatrix(1,0,Math.tan(t),1,0,0),this},o.default.prototype.shearY=function(e){o.default._validateParameters("shearY",arguments);var t=this._toRadians(e);return this._renderer.applyMatrix(1,Math.tan(t),0,1,0,0),this},o.default.prototype.translate=function(e,t,r){return o.default._validateParameters("translate",arguments),this._renderer.isP3D?this._renderer.translate(e,t,r):this._renderer.translate(e,t),this};var a=o.default;r.default=a},{"./main":32}],46:[function(e,t,r){"use strict";var n,a=(n=e("../core/main"))&&n.__esModule?n:{default:n};function o(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}a.default.prototype.storeItem=function(e,t){"string"!=typeof e&&console.log("The argument that you passed to storeItem() - ".concat(e," is not a string.")),e.endsWith("p5TypeID")&&console.log("The argument that you passed to storeItem() - ".concat(e," must not end with 'p5TypeID'.")),void 0===t&&console.log("You cannot store undefined variables using storeItem().");var r=i(t);switch(r){case"number":case"boolean":t=t.toString();break;case"object":if(t instanceof a.default.Color)r="p5.Color";else if(t instanceof a.default.Vector){r="p5.Vector",t=[t.x,t.y,t.z]}t=JSON.stringify(t)}localStorage.setItem(e,t);var n="".concat(e,"p5TypeID");localStorage.setItem(n,r)},a.default.prototype.getItem=function(e){var t=localStorage.getItem(e),r=localStorage.getItem("".concat(e,"p5TypeID"));if(void 0===r)console.log("Unable to determine type of item stored under ".concat(e,"in local storage. Did you save the item with something other than setItem()?"));else if(null!==t)switch(r){case"number":t=parseInt(t);break;case"boolean":t="true"===t;break;case"object":t=JSON.parse(t);break;case"p5.Color":t=JSON.parse(t),t=this.color.apply(this,o(t.levels));break;case"p5.Vector":t=JSON.parse(t),t=this.createVector.apply(this,o(t))}return t},a.default.prototype.clearStorage=function(){localStorage.clear()},a.default.prototype.removeItem=function(e){"string"!=typeof e&&console.log("The argument that you passed to removeItem() - ".concat(e," is not a string.")),localStorage.removeItem(e),localStorage.removeItem("".concat(e,"p5TypeID"))}},{"../core/main":32}],47:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n,a=(n=e("../core/main"))&&n.__esModule?n:{default:n};a.default.prototype.createStringDict=function(e,t){return a.default._validateParameters("createStringDict",arguments),new a.default.StringDict(e,t)},a.default.prototype.createNumberDict=function(e,t){return a.default._validateParameters("createNumberDict",arguments),new a.default.NumberDict(e,t)},a.default.TypedDict=function(e,t){return e instanceof Object?this.data=e:(this.data={},this.data[e]=t),this},a.default.TypedDict.prototype.size=function(){return Object.keys(this.data).length},a.default.TypedDict.prototype.hasKey=function(e){return this.data.hasOwnProperty(e)},a.default.TypedDict.prototype.get=function(e){if(this.data.hasOwnProperty(e))return this.data[e];console.log("".concat(e," does not exist in this Dictionary"))},a.default.TypedDict.prototype.set=function(e,t){this._validate(t)?this.data[e]=t:console.log("Those values dont work for this dictionary type.")},a.default.TypedDict.prototype._addObj=function(e){for(var t in e)this.set(t,e[t])},a.default.TypedDict.prototype.create=function(e,t){e instanceof Object&&void 0===t?this._addObj(e):void 0!==e?this.set(e,t):console.log("In order to create a new Dictionary entry you must pass an object or a key, value pair")},a.default.TypedDict.prototype.clear=function(){this.data={}},a.default.TypedDict.prototype.remove=function(e){if(!this.data.hasOwnProperty(e))throw new Error("".concat(e," does not exist in this Dictionary"));delete this.data[e]},a.default.TypedDict.prototype.print=function(){for(var e in this.data)console.log("key:".concat(e," value:").concat(this.data[e]))},a.default.TypedDict.prototype.saveTable=function(e){var t="";for(var r in this.data)t+="".concat(r,",").concat(this.data[r],"\n");var n=new Blob([t],{type:"text/csv"});a.default.prototype.downloadFile(n,e||"mycsv","csv")},a.default.TypedDict.prototype.saveJSON=function(e,t){a.default.prototype.saveJSON(this.data,e,t)},a.default.TypedDict.prototype._validate=function(e){return!0},a.default.StringDict=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];a.default.TypedDict.apply(this,t)},a.default.StringDict.prototype=Object.create(a.default.TypedDict.prototype),a.default.StringDict.prototype._validate=function(e){return"string"==typeof e},a.default.NumberDict=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];a.default.TypedDict.apply(this,t)},a.default.NumberDict.prototype=Object.create(a.default.TypedDict.prototype),a.default.NumberDict.prototype._validate=function(e){return"number"==typeof e},a.default.NumberDict.prototype.add=function(e,t){this.data.hasOwnProperty(e)?this.data[e]+=t:console.log("The key - ".concat(e," does not exist in this dictionary."))},a.default.NumberDict.prototype.sub=function(e,t){this.add(e,-t)},a.default.NumberDict.prototype.mult=function(e,t){this.data.hasOwnProperty(e)?this.data[e]*=t:console.log("The key - ".concat(e," does not exist in this dictionary."))},a.default.NumberDict.prototype.div=function(e,t){this.data.hasOwnProperty(e)?this.data[e]/=t:console.log("The key - ".concat(e," does not exist in this dictionary."))},a.default.NumberDict.prototype._valueTest=function(e){if(0===Object.keys(this.data).length)throw new Error("Unable to search for a minimum or maximum value on an empty NumberDict");if(1===Object.keys(this.data).length)return this.data[Object.keys(this.data)[0]];var t=this.data[Object.keys(this.data)[0]];for(var r in this.data)this.data[r]*e<t*e&&(t=this.data[r]);return t},a.default.NumberDict.prototype.minValue=function(){return this._valueTest(1)},a.default.NumberDict.prototype.maxValue=function(){return this._valueTest(-1)},a.default.NumberDict.prototype._keyTest=function(e){if(0===Object.keys(this.data).length)throw new Error("Unable to use minValue on an empty NumberDict");if(1===Object.keys(this.data).length)return Object.keys(this.data)[0];for(var t=Object.keys(this.data)[0],r=1;r<Object.keys(this.data).length;r++)Object.keys(this.data)[r]*e<t*e&&(t=Object.keys(this.data)[r]);return t},a.default.NumberDict.prototype.minKey=function(){return this._keyTest(1)},a.default.NumberDict.prototype.maxKey=function(){return this._keyTest(-1)};var o=a.default.TypedDict;r.default=o},{"../core/main":32}],48:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n,d=(n=e("../core/main"))&&n.__esModule?n:{default:n};function h(e){return(h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function f(e,t,r){(t._userNode?t._userNode:document.body).appendChild(e);var n=r?new d.default.MediaElement(e,t):new d.default.Element(e,t);return t._elements.push(n),n}function a(e,t,r,n){var a=document.createElement(t);"string"==typeof(r=r||"")&&(r=[r]);var o=!0,i=!1,s=void 0;try{for(var l,p=r[Symbol.iterator]();!(o=(l=p.next()).done);o=!0){var u=l.value,c=document.createElement("source");c.setAttribute("src",u),a.appendChild(c)}}catch(e){i=!0,s=e}finally{try{o||null==p.return||p.return()}finally{if(i)throw s}}if("function"==typeof n){a.addEventListener("canplaythrough",function e(){n(),a.removeEventListener("canplaythrough",e)})}var d=f(a,e,!0);return d.loadedmetadata=!1,a.addEventListener("loadedmetadata",function(){d.width=a.videoWidth,d.height=a.videoHeight,0===d.elt.width&&(d.elt.width=a.videoWidth),0===d.elt.height&&(d.elt.height=a.videoHeight),d.presetPlaybackRate&&(d.elt.playbackRate=d.presetPlaybackRate,delete d.presetPlaybackRate),d.loadedmetadata=!0}),d}d.default.prototype.select=function(e,t){d.default._validateParameters("select",arguments);var r=this._getContainer(t).querySelector(e);return r?this._wrapElement(r):null},d.default.prototype.selectAll=function(e,t){d.default._validateParameters("selectAll",arguments);var r=[],n=this._getContainer(t).querySelectorAll(e);if(n)for(var a=0;a<n.length;a++){var o=this._wrapElement(n[a]);r.push(o)}return r},d.default.prototype._getContainer=function(e){var t=document;return"string"==typeof e?t=document.querySelector(e)||document:e instanceof d.default.Element?t=e.elt:e instanceof HTMLElement&&(t=e),t},d.default.prototype._wrapElement=function(e){var t=Array.prototype.slice.call(e.children);if("INPUT"!==e.tagName||"checkbox"!==e.type)return"VIDEO"===e.tagName||"AUDIO"===e.tagName?new d.default.MediaElement(e,this):"SELECT"===e.tagName?this.createSelect(new d.default.Element(e,this)):0<t.length&&t.every(function(e){return"INPUT"===e.tagName||"LABEL"===e.tagName})?this.createRadio(new d.default.Element(e,this)):new d.default.Element(e,this);var r=new d.default.Element(e,this);return r.checked=function(){return 0===arguments.length?this.elt.checked:(this.elt.checked=!!arguments[0],this)},r},d.default.prototype.removeElements=function(e){d.default._validateParameters("removeElements",arguments);this._elements.filter(function(e){return!(e.elt instanceof HTMLCanvasElement)}).map(function(e){return e.remove()})},d.default.Element.prototype.changed=function(e){return d.default.Element._adjustListener("change",e,this),this},d.default.Element.prototype.input=function(e){return d.default.Element._adjustListener("input",e,this),this},d.default.prototype.createDiv=function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",t=document.createElement("div");return t.innerHTML=e,f(t,this)},d.default.prototype.createP=function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",t=document.createElement("p");return t.innerHTML=e,f(t,this)},d.default.prototype.createSpan=function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",t=document.createElement("span");return t.innerHTML=e,f(t,this)},d.default.prototype.createImg=function(){d.default._validateParameters("createImg",arguments);var t,r=document.createElement("img"),n=arguments;return 1<n.length&&"string"==typeof n[1]&&(r.alt=n[1]),2<n.length&&"string"==typeof n[2]&&(r.crossOrigin=n[2]),r.src=n[0],t=f(r,this),r.addEventListener("load",function(){t.width=r.offsetWidth||r.width,t.height=r.offsetHeight||r.height;var e=n[n.length-1];"function"==typeof e&&e(t)}),t},d.default.prototype.createA=function(e,t,r){d.default._validateParameters("createA",arguments);var n=document.createElement("a");return n.href=e,n.innerHTML=t,r&&(n.target=r),f(n,this)},d.default.prototype.createSlider=function(e,t,r,n){d.default._validateParameters("createSlider",arguments);var a=document.createElement("input");return a.type="range",a.min=e,a.max=t,0===n?a.step=1e-18:n&&(a.step=n),"number"==typeof r&&(a.value=r),f(a,this)},d.default.prototype.createButton=function(e,t){d.default._validateParameters("createButton",arguments);var r=document.createElement("button");return r.innerHTML=e,t&&(r.value=t),f(r,this)},d.default.prototype.createCheckbox=function(){d.default._validateParameters("createCheckbox",arguments);var e=document.createElement("div"),t=document.createElement("input");t.type="checkbox",e.appendChild(t);var r=f(e,this);if(r.checked=function(){var e=r.elt.getElementsByTagName("input")[0];if(e){if(0===arguments.length)return e.checked;e.checked=!!arguments[0]}return r},this.value=function(e){return r.value=e,this},arguments[0]){var n=Math.random().toString(36).slice(2),a=document.createElement("label");t.setAttribute("id",n),a.htmlFor=n,r.value(arguments[0]),a.appendChild(document.createTextNode(arguments[0])),e.appendChild(a)}return arguments[1]&&(t.checked=!0),r},d.default.prototype.createSelect=function(){var e;d.default._validateParameters("createSelect",arguments);var t=arguments[0];if(t instanceof d.default.Element&&t.elt instanceof HTMLSelectElement)e=t,this.elt=t.elt;else if(t instanceof HTMLSelectElement)e=f(t,this),this.elt=t;else{var r=document.createElement("select");t&&"boolean"==typeof t&&r.setAttribute("multiple","true"),e=f(r,this),this.elt=r}return e.option=function(e,t){var r;if(void 0!==e){for(var n=0;n<this.elt.length;n+=1)if(this.elt[n].innerHTML===e){r=n;break}if(void 0!==r)!1===t?this.elt.remove(r):this.elt[r].value=t;else{var a=document.createElement("option");a.innerHTML=e,a.value=void 0===t?e:t,this.elt.appendChild(a),this._pInst._elements.push(a)}}},e.selected=function(e){if(void 0!==e){for(var t=0;t<this.elt.length;t+=1)this.elt[t].value.toString()===e.toString()&&(this.elt.selectedIndex=t);return this}if(this.elt.getAttribute("multiple")){var r=[],n=!0,a=!1,o=void 0;try{for(var i,s=this.elt.selectedOptions[Symbol.iterator]();!(n=(i=s.next()).done);n=!0){var l=i.value;r.push(l.value)}}catch(e){a=!0,o=e}finally{try{n||null==s.return||s.return()}finally{if(a)throw o}}return r}return this.elt.value},e.disable=function(e){if("string"==typeof e)for(var t=0;t<this.elt.length;t++)this.elt[t].value.toString()===e&&(this.elt[t].disabled=!0,this.elt[t].selected=!1);else this.elt.disabled=!0;return this},e},d.default.prototype.createRadio=function(){var e,t,r=arguments[0];r instanceof HTMLDivElement||r instanceof HTMLSpanElement?(e=r,"string"==typeof arguments[1]&&(t=arguments[1])):("string"==typeof r&&(t=r),e=document.createElement("div"));var m=f(this.elt=e,this);m._name=t||"radioOption";function n(e){return e instanceof HTMLInputElement&&"radio"===e.type}function u(e){return e.nextElementSibling instanceof HTMLLabelElement}return m._getOptionsArray=function(){return Array.from(this.elt.children).filter(n)},m.option=function(e,t){var r,n,a=!0,o=!1,i=void 0;try{for(var s,l=m._getOptionsArray()[Symbol.iterator]();!(a=(s=l.next()).done);a=!0){var p=s.value;if(p.value===e){r=p;break}}}catch(e){o=!0,i=e}finally{try{a||null==l.return||l.return()}finally{if(o)throw i}}return void 0===r&&((r=document.createElement("input")).setAttribute("type","radio"),r.setAttribute("value",e),this.elt.appendChild(r)),u(r)?n=r.nextElementSibling:(n=document.createElement("label"),r.insertAdjacentElement("afterend",n)),n.innerHTML=void 0===t?e:t,r.setAttribute("name",m._name),r},m.remove=function(e){var t=!0,r=!1,n=void 0;try{for(var a,o=m._getOptionsArray()[Symbol.iterator]();!(t=(a=o.next()).done);t=!0){var i=a.value;if(i.value===e)return u(i)&&i.nextElementSibling.remove(),void i.remove()}}catch(e){r=!0,n=e}finally{try{t||null==o.return||o.return()}finally{if(r)throw n}}},m.value=function(){var e="",t=!0,r=!1,n=void 0;try{for(var a,o=m._getOptionsArray()[Symbol.iterator]();!(t=(a=o.next()).done);t=!0){var i=a.value;if(i.checked){e=i.value;break}}}catch(e){r=!0,n=e}finally{try{t||null==o.return||o.return()}finally{if(r)throw n}}return e},m.selected=function(e){var t=null;if(void 0===e){var r=!0,n=!1,a=void 0;try{for(var o,i=m._getOptionsArray()[Symbol.iterator]();!(r=(o=i.next()).done);r=!0){var s=o.value;if(s.checked){t=s;break}}}catch(e){n=!0,a=e}finally{try{r||null==i.return||i.return()}finally{if(n)throw a}}}else{var l=!0,p=!1,u=void 0;try{for(var c,d=m._getOptionsArray()[Symbol.iterator]();!(l=(c=d.next()).done);l=!0){var h=c.value;h.value===e&&(h.setAttribute("checked",!0),t=h)}}catch(e){p=!0,u=e}finally{try{l||null==d.return||d.return()}finally{if(p)throw u}}}return t},m.disable=function(){var e=!(0<arguments.length&&void 0!==arguments[0])||arguments[0],t=!0,r=!1,n=void 0;try{for(var a,o=m._getOptionsArray()[Symbol.iterator]();!(t=(a=o.next()).done);t=!0){a.value.setAttribute("disabled",e)}}catch(e){r=!0,n=e}finally{try{t||null==o.return||o.return()}finally{if(r)throw n}}},m},d.default.prototype.createColorPicker=function(e){d.default._validateParameters("createColorPicker",arguments);var t,r=document.createElement("input");return r.type="color",e?e instanceof d.default.Color?r.value=e.toString("#rrggbb"):(d.default.prototype._colorMode="rgb",d.default.prototype._colorMaxes={rgb:[255,255,255,255],hsb:[360,100,100,1],hsl:[360,100,100,1]},r.value=d.default.prototype.color(e).toString("#rrggbb")):r.value="#000000",(t=f(r,this)).color=function(){return e&&(e.mode&&(d.default.prototype._colorMode=e.mode),e.maxes&&(d.default.prototype._colorMaxes=e.maxes)),d.default.prototype.color(this.elt.value)},t},d.default.prototype.createInput=function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"text";d.default._validateParameters("createInput",arguments);var r=document.createElement("input");return r.setAttribute("value",e),r.setAttribute("type",t),f(r,this)},d.default.prototype.createFileInput=function(s){var e=1<arguments.length&&void 0!==arguments[1]&&arguments[1];d.default._validateParameters("createFileInput",arguments);if(window.File&&window.FileReader&&window.FileList&&window.Blob){var t=document.createElement("input");return t.setAttribute("type","file"),e&&t.setAttribute("multiple",!0),t.addEventListener("change",function(e){var t=!0,r=!1,n=void 0;try{for(var a,o=e.target.files[Symbol.iterator]();!(t=(a=o.next()).done);t=!0){var i=a.value;d.default.File._load(i,s)}}catch(e){r=!0,n=e}finally{try{t||null==o.return||o.return()}finally{if(r)throw n}}},!1),f(t,this)}console.log("The File APIs are not fully supported in this browser. Cannot create element.")},d.default.prototype.createVideo=function(e,t){return d.default._validateParameters("createVideo",arguments),a(this,"video",e,t)},d.default.prototype.createAudio=function(e,t){return d.default._validateParameters("createAudio",arguments),a(this,"audio",e,t)},d.default.prototype.VIDEO="video",d.default.prototype.AUDIO="audio",void 0===navigator.mediaDevices&&(navigator.mediaDevices={}),void 0===navigator.mediaDevices.getUserMedia&&(navigator.mediaDevices.getUserMedia=function(r){var n=navigator.webkitGetUserMedia||navigator.mozGetUserMedia;return n?new Promise(function(e,t){n.call(navigator,r,e,t)}):Promise.reject(new Error("getUserMedia is not implemented in this browser"))}),d.default.prototype.createCapture=function(){if(d.default._validateParameters("createCapture",arguments),!navigator.mediaDevices||!navigator.mediaDevices.getUserMedia)throw new DOMException("getUserMedia not supported in this browser");var e,t,r=!0,n=!0,a=!0,o=!1,i=void 0;try{for(var s,l=arguments[Symbol.iterator]();!(a=(s=l.next()).done);a=!0){var p=s.value;p===d.default.prototype.VIDEO?n=!1:p===d.default.prototype.AUDIO?r=!1:"object"===h(p)?e=p:"function"==typeof p&&(t=p)}}catch(e){o=!0,i=e}finally{try{a||null==l.return||l.return()}finally{if(o)throw i}}e=e||{video:r,audio:n};var u=document.createElement("video");u.setAttribute("playsinline",""),navigator.mediaDevices.getUserMedia(e).then(function(t){try{"srcObject"in u?u.srcObject=t:u.src=window.URL.createObjectURL(t)}catch(e){u.src=t}},console.log);var c=f(u,this,!0);return c.loadedmetadata=!1,u.addEventListener("loadedmetadata",function(){u.play(),u.width?(c.width=u.width,c.height=u.height):(c.width=c.elt.width=u.videoWidth,c.height=c.elt.height=u.videoHeight),c.loadedmetadata=!0,t&&t(u.srcObject)}),c},d.default.prototype.createElement=function(e,t){d.default._validateParameters("createElement",arguments);var r=document.createElement(e);return void 0!==t&&(r.innerHTML=t),f(r,this)},d.default.Element.prototype.addClass=function(e){return this.elt.className?this.hasClass(e)||(this.elt.className=this.elt.className+" "+e):this.elt.className=e,this},d.default.Element.prototype.removeClass=function(e){return this.elt.classList.remove(e),this},d.default.Element.prototype.hasClass=function(e){return this.elt.classList.contains(e)},d.default.Element.prototype.toggleClass=function(e){return this.elt.classList.contains(e)?this.elt.classList.remove(e):this.elt.classList.add(e),this},d.default.Element.prototype.child=function(e){return void 0===e?this.elt.childNodes:("string"==typeof e?("#"===e[0]&&(e=e.substring(1)),e=document.getElementById(e)):e instanceof d.default.Element&&(e=e.elt),e instanceof HTMLElement&&this.elt.appendChild(e),this)},d.default.Element.prototype.center=function(e){var t=this.elt.style.display,r="none"===this.elt.style.display,n="none"===this.parent().style.display,a={x:this.elt.offsetLeft,y:this.elt.offsetTop};r&&this.show(),n&&this.parent().show(),this.elt.style.display="block",this.position(0,0);var o=Math.abs(this.parent().offsetWidth-this.elt.offsetWidth),i=Math.abs(this.parent().offsetHeight-this.elt.offsetHeight);return"both"===e||void 0===e?this.position(o/2+this.parent().offsetLeft,i/2+this.parent().offsetTop):"horizontal"===e?this.position(o/2+this.parent().offsetLeft,a.y):"vertical"===e&&this.position(a.x,i/2+this.parent().offsetTop),this.style("display",t),r&&this.hide(),n&&this.parent().hide(),this},d.default.Element.prototype.html=function(){return 0===arguments.length?this.elt.innerHTML:(arguments[1]?this.elt.insertAdjacentHTML("beforeend",arguments[0]):this.elt.innerHTML=arguments[0],this)},d.default.Element.prototype.position=function(){if(0===arguments.length)return{x:this.elt.offsetLeft,y:this.elt.offsetTop};var e="absolute";return"static"!==arguments[2]&&"fixed"!==arguments[2]&&"relative"!==arguments[2]&&"sticky"!==arguments[2]&&"initial"!==arguments[2]&&"inherit"!==arguments[2]||(e=arguments[2]),this.elt.style.position=e,this.elt.style.left=arguments[0]+"px",this.elt.style.top=arguments[1]+"px",this.x=arguments[0],this.y=arguments[1],this},d.default.Element.prototype._translate=function(){this.elt.style.position="absolute";var e="";return this.elt.style.transform&&(e=(e=this.elt.style.transform.replace(/translate3d\(.*\)/g,"")).replace(/translate[X-Z]?\(.*\)/g,"")),2===arguments.length?this.elt.style.transform="translate("+arguments[0]+"px, "+arguments[1]+"px)":2<arguments.length&&(this.elt.style.transform="translate3d("+arguments[0]+"px,"+arguments[1]+"px,"+arguments[2]+"px)",this.elt.parentElement.style.perspective=3===arguments.length?"1000px":arguments[3]+"px"),this.elt.style.transform+=e,this},d.default.Element.prototype._rotate=function(){var e="";return this.elt.style.transform&&(e=(e=this.elt.style.transform.replace(/rotate3d\(.*\)/g,"")).replace(/rotate[X-Z]?\(.*\)/g,"")),1===arguments.length?this.elt.style.transform="rotate("+arguments[0]+"deg)":2===arguments.length?this.elt.style.transform="rotate("+arguments[0]+"deg, "+arguments[1]+"deg)":3===arguments.length&&(this.elt.style.transform="rotateX("+arguments[0]+"deg)",this.elt.style.transform+="rotateY("+arguments[1]+"deg)",this.elt.style.transform+="rotateZ("+arguments[2]+"deg)"),this.elt.style.transform+=e,this},d.default.Element.prototype.style=function(e,t){if(t instanceof d.default.Color&&(t="rgba("+t.levels[0]+","+t.levels[1]+","+t.levels[2]+","+t.levels[3]/255+")"),void 0===t){if(-1===e.indexOf(":"))return window.getComputedStyle(this.elt).getPropertyValue(e);for(var r=e.split(";"),n=0;n<r.length;n++){var a=r[n].split(":");a[0]&&a[1]&&(this.elt.style[a[0].trim()]=a[1].trim())}}else if(this.elt.style[e]=t,"width"===e||"height"===e||"left"===e||"top"===e){var o=window.getComputedStyle(this.elt).getPropertyValue(e).replace(/\D+/g,"");this[e]=parseInt(o,10)}return this},d.default.Element.prototype.attribute=function(e,t){if(null==this.elt.firstChild||"checkbox"!==this.elt.firstChild.type&&"radio"!==this.elt.firstChild.type)return void 0===t?this.elt.getAttribute(e):(this.elt.setAttribute(e,t),this);if(void 0===t)return this.elt.firstChild.getAttribute(e);for(var r=0;r<this.elt.childNodes.length;r++)this.elt.childNodes[r].setAttribute(e,t)},d.default.Element.prototype.removeAttribute=function(e){if(null!=this.elt.firstChild&&("checkbox"===this.elt.firstChild.type||"radio"===this.elt.firstChild.type))for(var t=0;t<this.elt.childNodes.length;t++)this.elt.childNodes[t].removeAttribute(e);return this.elt.removeAttribute(e),this},d.default.Element.prototype.value=function(){return 0<arguments.length?(this.elt.value=arguments[0],this):"range"===this.elt.type?parseFloat(this.elt.value):this.elt.value},d.default.Element.prototype.show=function(){return this.elt.style.display="block",this},d.default.Element.prototype.hide=function(){return this.elt.style.display="none",this},d.default.Element.prototype.size=function(e,t){if(0===arguments.length)return{width:this.elt.offsetWidth,height:this.elt.offsetHeight};var r=e,n=t,a=d.default.prototype.AUTO;if(r!==a||n!==a){if(r===a?r=t*this.width/this.height:n===a&&(n=e*this.height/this.width),this.elt instanceof HTMLCanvasElement){var o,i={},s=this.elt.getContext("2d");for(o in s)i[o]=s[o];for(o in this.elt.setAttribute("width",r*this._pInst._pixelDensity),this.elt.setAttribute("height",n*this._pInst._pixelDensity),this.elt.style.width=r+"px",this.elt.style.height=n+"px",this._pInst.scale(this._pInst._pixelDensity,this._pInst._pixelDensity),i)this.elt.getContext("2d")[o]=i[o]}else this.elt.style.width=r+"px",this.elt.style.height=n+"px",this.elt.width=r,this.elt.height=n;this.width=this.elt.offsetWidth,this.height=this.elt.offsetHeight,this._pInst&&this._pInst._curElement&&this._pInst._curElement.elt===this.elt&&(this._pInst._setProperty("width",this.elt.offsetWidth),this._pInst._setProperty("height",this.elt.offsetHeight))}return this},d.default.Element.prototype.remove=function(){this instanceof d.default.MediaElement&&this.elt.srcObject.getTracks().forEach(function(e){e.stop()});var e=this._pInst._elements.indexOf(this);for(var t in-1!==e&&this._pInst._elements.splice(e,1),this._events)this.elt.removeEventListener(t,this._events[t]);this.elt&&this.elt.parentNode&&this.elt.parentNode.removeChild(this.elt)},d.default.Element.prototype.drop=function(a,o){if(window.File&&window.FileReader&&window.FileList&&window.Blob){if(!this._dragDisabled){this._dragDisabled=!0;var e=function(e){e.preventDefault()};this.elt.addEventListener("dragover",e),this.elt.addEventListener("dragleave",e)}d.default.Element._attachListener("drop",function(e){e.preventDefault(),"function"==typeof o&&o.call(this,e);for(var t=e.dataTransfer.files,r=0;r<t.length;r++){var n=t[r];d.default.File._load(n,a)}},this)}else console.log("The File APIs are not fully supported in this browser.");return this},d.default.MediaElement=function(n,e){d.default.Element.call(this,n,e);var a=this;this.elt.crossOrigin="anonymous",this._prevTime=0,this._cueIDCounter=0,this._cues=[],(this._pixelsState=this)._pixelDensity=1,this._modified=!1,Object.defineProperty(a,"src",{get:function(){var e=a.elt.children[0].src,t=a.elt.src===window.location.href?"":a.elt.src;return e===window.location.href?t:e},set:function(e){for(var t=0;t<a.elt.children.length;t++)a.elt.removeChild(a.elt.children[t]);var r=document.createElement("source");r.src=e,n.appendChild(r),a.elt.src=e,a.modified=!0}}),a._onended=function(){},a.elt.onended=function(){a._onended(a)}},d.default.MediaElement.prototype=Object.create(d.default.Element.prototype),d.default.MediaElement.prototype.play=function(){var e;return this.elt.currentTime===this.elt.duration&&(this.elt.currentTime=0),(e=(1<this.elt.readyState||this.elt.load(),this.elt.play()))&&e.catch&&e.catch(function(e){"NotAllowedError"===e.name?d.default._friendlyAutoplayError(this.src):console.error("Media play method encountered an unexpected error",e)}),this},d.default.MediaElement.prototype.stop=function(){return this.elt.pause(),this.elt.currentTime=0,this},d.default.MediaElement.prototype.pause=function(){return this.elt.pause(),this},d.default.MediaElement.prototype.loop=function(){return this.elt.setAttribute("loop",!0),this.play(),this},d.default.MediaElement.prototype.noLoop=function(){return this.elt.removeAttribute("loop"),this},d.default.MediaElement.prototype._setupAutoplayFailDetection=function(){var e=this,t=setTimeout(function(){return d.default._friendlyAutoplayError(e.src)},500);this.elt.addEventListener("play",function(){return clearTimeout(t)},{passive:!0,once:!0})},d.default.MediaElement.prototype.autoplay=function(e){var t=this,r=this.elt.getAttribute("autoplay");if(this.elt.setAttribute("autoplay",e),e&&!r){var n=function(){return t._setupAutoplayFailDetection()};4===this.elt.readyState?n():this.elt.addEventListener("canplay",n,{passive:!0,once:!0})}return this},d.default.MediaElement.prototype.volume=function(e){if(void 0===e)return this.elt.volume;this.elt.volume=e},d.default.MediaElement.prototype.speed=function(e){if(void 0===e)return this.presetPlaybackRate||this.elt.playbackRate;this.loadedmetadata?this.elt.playbackRate=e:this.presetPlaybackRate=e},d.default.MediaElement.prototype.time=function(e){return void 0===e?this.elt.currentTime:(this.elt.currentTime=e,this)},d.default.MediaElement.prototype.duration=function(){return this.elt.duration},d.default.MediaElement.prototype.pixels=[],d.default.MediaElement.prototype._ensureCanvas=function(){this.canvas||(this.canvas=document.createElement("canvas"),this.drawingContext=this.canvas.getContext("2d"),this.setModified(!0)),this.loadedmetadata&&(this.canvas.width!==this.elt.width&&(this.canvas.width=this.elt.width,this.canvas.height=this.elt.height,this.width=this.canvas.width,this.height=this.canvas.height),this.drawingContext.drawImage(this.elt,0,0,this.canvas.width,this.canvas.height),this.setModified(!0))},d.default.MediaElement.prototype.loadPixels=function(){return this._ensureCanvas(),d.default.Renderer2D.prototype.loadPixels.apply(this,arguments)},d.default.MediaElement.prototype.updatePixels=function(e,t,r,n){return this.loadedmetadata&&(this._ensureCanvas(),d.default.Renderer2D.prototype.updatePixels.call(this,e,t,r,n)),this.setModified(!0),this},d.default.MediaElement.prototype.get=function(){return this._ensureCanvas(),d.default.Renderer2D.prototype.get.apply(this,arguments)},d.default.MediaElement.prototype._getPixel=function(){return this.loadPixels(),d.default.Renderer2D.prototype._getPixel.apply(this,arguments)},d.default.MediaElement.prototype.set=function(e,t,r){this.loadedmetadata&&(this._ensureCanvas(),d.default.Renderer2D.prototype.set.call(this,e,t,r),this.setModified(!0))},d.default.MediaElement.prototype.copy=function(){this._ensureCanvas(),d.default.prototype.copy.apply(this,arguments)},d.default.MediaElement.prototype.mask=function(){this.loadPixels(),this.setModified(!0),d.default.Image.prototype.mask.apply(this,arguments)},d.default.MediaElement.prototype.isModified=function(){return this._modified},d.default.MediaElement.prototype.setModified=function(e){this._modified=e},d.default.MediaElement.prototype.onended=function(e){return this._onended=e,this},d.default.MediaElement.prototype.connect=function(e){var t,r;if("function"==typeof d.default.prototype.getAudioContext)t=d.default.prototype.getAudioContext(),r=d.default.soundOut.input;else try{r=(t=e.context).destination}catch(e){throw"connect() is meant to be used with Web Audio API or p5.sound.js"}this.audioSourceNode||(this.audioSourceNode=t.createMediaElementSource(this.elt),this.audioSourceNode.connect(r)),e?e.input?this.audioSourceNode.connect(e.input):this.audioSourceNode.connect(e):this.audioSourceNode.connect(r)},d.default.MediaElement.prototype.disconnect=function(){if(!this.audioSourceNode)throw"nothing to disconnect";this.audioSourceNode.disconnect()},d.default.MediaElement.prototype.showControls=function(){this.elt.style["text-align"]="inherit",this.elt.controls=!0},d.default.MediaElement.prototype.hideControls=function(){this.elt.controls=!1};function o(e,t,r,n){this.callback=e,this.time=t,this.id=r,this.val=n}d.default.MediaElement.prototype.addCue=function(e,t,r){var n=this._cueIDCounter++,a=new o(t,e,n,r);return this._cues.push(a),this.elt.ontimeupdate||(this.elt.ontimeupdate=this._onTimeUpdate.bind(this)),n},d.default.MediaElement.prototype.removeCue=function(e){for(var t=0;t<this._cues.length;t++)this._cues[t].id===e&&(console.log(e),this._cues.splice(t,1));0===this._cues.length&&(this.elt.ontimeupdate=null)},d.default.MediaElement.prototype.clearCues=function(){this._cues=[],this.elt.ontimeupdate=null},d.default.MediaElement.prototype._onTimeUpdate=function(){for(var e=this.time(),t=0;t<this._cues.length;t++){var r=this._cues[t].time,n=this._cues[t].val;this._prevTime<r&&r<=e&&this._cues[t].callback(n)}this._prevTime=e},d.default.File=function(e,t){this.file=e,this._pInst=t;var r=e.type.split("/");this.type=r[0],this.subtype=r[1],this.name=e.name,this.size=e.size,this.data=void 0},d.default.File._createLoader=function(n,a){var e=new FileReader;return e.onload=function(e){var t=new d.default.File(n);if("application/json"===t.file.type)t.data=JSON.parse(e.target.result);else if("text/xml"===t.file.type){var r=(new DOMParser).parseFromString(e.target.result,"text/xml");t.data=new d.default.XML(r.documentElement)}else t.data=e.target.result;a(t)},e},d.default.File._load=function(e,t){if(/^text\//.test(e.type)||"application/json"===e.type)d.default.File._createLoader(e,t).readAsText(e);else if(/^(video|audio)\//.test(e.type)){var r=new d.default.File(e);r.data=URL.createObjectURL(e),t(r)}else d.default.File._createLoader(e,t).readAsDataURL(e)};var i=d.default;r.default=i},{"../core/main":32}],49:[function(e,t,r){"use strict";function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n,a=(n=e("../core/main"))&&n.__esModule?n:{default:n},o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==i(e)&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=n?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(r,a,o):r[a]=e[a]}r.default=e,t&&t.set(e,r);return r}(e("../core/constants"));function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}a.default.prototype.deviceOrientation=1<window.innerWidth/window.innerHeight?"landscape":"portrait",a.default.prototype.accelerationX=0,a.default.prototype.accelerationY=0,a.default.prototype.accelerationZ=0,a.default.prototype.pAccelerationX=0,a.default.prototype.pAccelerationY=0,a.default.prototype.pAccelerationZ=0,a.default.prototype._updatePAccelerations=function(){this._setProperty("pAccelerationX",this.accelerationX),this._setProperty("pAccelerationY",this.accelerationY),this._setProperty("pAccelerationZ",this.accelerationZ)},a.default.prototype.rotationX=0,a.default.prototype.rotationY=0,a.default.prototype.rotationZ=0,a.default.prototype.pRotationX=0,a.default.prototype.pRotationY=0;var c=a.default.prototype.pRotationZ=0,d=0,h=0,m="clockwise",f="clockwise",y="clockwise";a.default.prototype.pRotateDirectionX=void 0,a.default.prototype.pRotateDirectionY=void 0,a.default.prototype.pRotateDirectionZ=void 0,a.default.prototype._updatePRotations=function(){this._setProperty("pRotationX",this.rotationX),this._setProperty("pRotationY",this.rotationY),this._setProperty("pRotationZ",this.rotationZ)},a.default.prototype.turnAxis=void 0;var g=.5,v=30;a.default.prototype.setMoveThreshold=function(e){a.default._validateParameters("setMoveThreshold",arguments),g=e},a.default.prototype.setShakeThreshold=function(e){a.default._validateParameters("setShakeThreshold",arguments),v=e},a.default.prototype._ondeviceorientation=function(e){this._updatePRotations(),this._angleMode===o.radians&&(e.beta=e.beta*(_PI/180),e.gamma=e.gamma*(_PI/180),e.alpha=e.alpha*(_PI/180)),this._setProperty("rotationX",e.beta),this._setProperty("rotationY",e.gamma),this._setProperty("rotationZ",e.alpha),this._handleMotion()},a.default.prototype._ondevicemotion=function(e){this._updatePAccelerations(),this._setProperty("accelerationX",2*e.acceleration.x),this._setProperty("accelerationY",2*e.acceleration.y),this._setProperty("accelerationZ",2*e.acceleration.z),this._handleMotion()},a.default.prototype._handleMotion=function(){90===window.orientation||-90===window.orientation?this._setProperty("deviceOrientation","landscape"):0===window.orientation?this._setProperty("deviceOrientation","portrait"):void 0===window.orientation&&this._setProperty("deviceOrientation","undefined");var e=this.deviceMoved||window.deviceMoved;"function"==typeof e&&(Math.abs(this.accelerationX-this.pAccelerationX)>g||Math.abs(this.accelerationY-this.pAccelerationY)>g||Math.abs(this.accelerationZ-this.pAccelerationZ)>g)&&e();var t=this.deviceTurned||window.deviceTurned;if("function"==typeof t){var r=this.rotationX+180,n=this.pRotationX+180,a=c+180;0<r-n&&r-n<270||r-n<-270?m="clockwise":(r-n<0||270<r-n)&&(m="counter-clockwise"),m!==this.pRotateDirectionX&&(a=r),90<Math.abs(r-a)&&Math.abs(r-a)<270&&(a=r,this._setProperty("turnAxis","X"),t()),this.pRotateDirectionX=m,c=a-180;var o=this.rotationY+180,i=this.pRotationY+180,s=d+180;0<o-i&&o-i<270||o-i<-270?f="clockwise":(o-i<0||270<o-this.pRotationY)&&(f="counter-clockwise"),f!==this.pRotateDirectionY&&(s=o),90<Math.abs(o-s)&&Math.abs(o-s)<270&&(s=o,this._setProperty("turnAxis","Y"),t()),this.pRotateDirectionY=f,d=s-180,0<this.rotationZ-this.pRotationZ&&this.rotationZ-this.pRotationZ<270||this.rotationZ-this.pRotationZ<-270?y="clockwise":(this.rotationZ-this.pRotationZ<0||270<this.rotationZ-this.pRotationZ)&&(y="counter-clockwise"),y!==this.pRotateDirectionZ&&(h=this.rotationZ),90<Math.abs(this.rotationZ-h)&&Math.abs(this.rotationZ-h)<270&&(h=this.rotationZ,this._setProperty("turnAxis","Z"),t()),this.pRotateDirectionZ=y,this._setProperty("turnAxis",void 0)}var l,p,u=this.deviceShaken||window.deviceShaken;"function"==typeof u&&(null!==this.pAccelerationX&&(l=Math.abs(this.accelerationX-this.pAccelerationX),p=Math.abs(this.accelerationY-this.pAccelerationY)),v<l+p&&u())};var l=a.default;r.default=l},{"../core/constants":22,"../core/main":32}],50:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n,a=(n=e("../core/main"))&&n.__esModule?n:{default:n};a.default.prototype.isKeyPressed=!1,a.default.prototype.keyIsPressed=!1,a.default.prototype.key="",a.default.prototype.keyCode=0,a.default.prototype._onkeydown=function(e){if(!this._downKeys[e.which]){this._setProperty("isKeyPressed",!0),this._setProperty("keyIsPressed",!0),this._setProperty("keyCode",e.which),this._downKeys[e.which]=!0,this._setProperty("key",e.key||String.fromCharCode(e.which)||e.which);var t=this.keyPressed||window.keyPressed;if("function"==typeof t&&!e.charCode)!1===t(e)&&e.preventDefault()}},a.default.prototype._onkeyup=function(e){var t=this.keyReleased||window.keyReleased;this._downKeys[e.which]=!1,this._areDownKeys()||(this._setProperty("isKeyPressed",!1),this._setProperty("keyIsPressed",!1)),this._setProperty("_lastKeyCodeTyped",null),this._setProperty("key",e.key||String.fromCharCode(e.which)||e.which),this._setProperty("keyCode",e.which),"function"!=typeof t||!1===t(e)&&e.preventDefault()},a.default.prototype._onkeypress=function(e){if(e.which!==this._lastKeyCodeTyped){this._setProperty("_lastKeyCodeTyped",e.which),this._setProperty("key",String.fromCharCode(e.which));var t=this.keyTyped||window.keyTyped;if("function"==typeof t)!1===t(e)&&e.preventDefault()}},a.default.prototype._onblur=function(e){this._downKeys={}},a.default.prototype.keyIsDown=function(e){return a.default._validateParameters("keyIsDown",arguments),this._downKeys[e]||!1},a.default.prototype._areDownKeys=function(){for(var e in this._downKeys)if(this._downKeys.hasOwnProperty(e)&&!0===this._downKeys[e])return!0;return!1};var o=a.default;r.default=o},{"../core/main":32}],51:[function(e,t,r){"use strict";function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n,a=(n=e("../core/main"))&&n.__esModule?n:{default:n},o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==i(e)&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=n?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(r,a,o):r[a]=e[a]}r.default=e,t&&t.set(e,r);return r}(e("../core/constants"));function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}a.default.prototype.movedX=0,a.default.prototype.movedY=0,a.default.prototype._hasMouseInteracted=!1,a.default.prototype.mouseX=0,a.default.prototype.mouseY=0,a.default.prototype.pmouseX=0,a.default.prototype.pmouseY=0,a.default.prototype.winMouseX=0,a.default.prototype.winMouseY=0,a.default.prototype.pwinMouseX=0,a.default.prototype.pwinMouseY=0,a.default.prototype.mouseButton=0,a.default.prototype.mouseIsPressed=!1,a.default.prototype._updateNextMouseCoords=function(e){if(null!==this._curElement&&(!e.touches||0<e.touches.length)){var t=function(e,t,r,n){n&&!n.clientX&&(n.touches?n=n.touches[0]:n.changedTouches&&(n=n.changedTouches[0]));var a=e.getBoundingClientRect(),o=e.scrollWidth/t||1,i=e.scrollHeight/r||1;return{x:(n.clientX-a.left)/o,y:(n.clientY-a.top)/i,winX:n.clientX,winY:n.clientY,id:n.identifier}}(this._curElement.elt,this.width,this.height,e);this._setProperty("movedX",e.movementX),this._setProperty("movedY",e.movementY),this._setProperty("mouseX",t.x),this._setProperty("mouseY",t.y),this._setProperty("winMouseX",t.winX),this._setProperty("winMouseY",t.winY)}this._hasMouseInteracted||(this._updateMouseCoords(),this._setProperty("_hasMouseInteracted",!0))},a.default.prototype._updateMouseCoords=function(){this._setProperty("pmouseX",this.mouseX),this._setProperty("pmouseY",this.mouseY),this._setProperty("pwinMouseX",this.winMouseX),this._setProperty("pwinMouseY",this.winMouseY),this._setProperty("_pmouseWheelDeltaY",this._mouseWheelDeltaY)},a.default.prototype._setMouseButton=function(e){1===e.button?this._setProperty("mouseButton",o.CENTER):2===e.button?this._setProperty("mouseButton",o.RIGHT):this._setProperty("mouseButton",o.LEFT)},a.default.prototype._onmousemove=function(e){var t=this._isGlobal?window:this;this._updateNextMouseCoords(e),this.mouseIsPressed?"function"==typeof t.mouseDragged?!1===t.mouseDragged(e)&&e.preventDefault():"function"==typeof t.touchMoved&&!1===t.touchMoved(e)&&e.preventDefault():"function"==typeof t.mouseMoved&&!1===t.mouseMoved(e)&&e.preventDefault()},a.default.prototype._onmousedown=function(e){var t=this._isGlobal?window:this;this._setProperty("mouseIsPressed",!0),this._setMouseButton(e),this._updateNextMouseCoords(e),"function"==typeof t.mousePressed?!1===t.mousePressed(e)&&e.preventDefault():navigator.userAgent.toLowerCase().includes("safari")&&"function"==typeof t.touchStarted&&!1===t.touchStarted(e)&&e.preventDefault()},a.default.prototype._onmouseup=function(e){var t=this._isGlobal?window:this;this._setProperty("mouseIsPressed",!1),"function"==typeof t.mouseReleased?!1===t.mouseReleased(e)&&e.preventDefault():"function"==typeof t.touchEnded&&!1===t.touchEnded(e)&&e.preventDefault()},a.default.prototype._ondragend=a.default.prototype._onmouseup,a.default.prototype._ondragover=a.default.prototype._onmousemove,a.default.prototype._onclick=function(e){var t=this._isGlobal?window:this;"function"==typeof t.mouseClicked&&!1===t.mouseClicked(e)&&e.preventDefault()},a.default.prototype._ondblclick=function(e){var t=this._isGlobal?window:this;"function"==typeof t.doubleClicked&&!1===t.doubleClicked(e)&&e.preventDefault()},a.default.prototype._mouseWheelDeltaY=0,a.default.prototype._pmouseWheelDeltaY=0,a.default.prototype._onwheel=function(e){var t=this._isGlobal?window:this;this._setProperty("_mouseWheelDeltaY",e.deltaY),"function"==typeof t.mouseWheel&&(e.delta=e.deltaY,!1===t.mouseWheel(e)&&e.preventDefault())},a.default.prototype.requestPointerLock=function(){var e=this._curElement.elt;return e.requestPointerLock=e.requestPointerLock||e.mozRequestPointerLock,e.requestPointerLock?(e.requestPointerLock(),!0):(console.log("requestPointerLock is not implemented in this browser"),!1)},a.default.prototype.exitPointerLock=function(){document.exitPointerLock()};var l=a.default;r.default=l},{"../core/constants":22,"../core/main":32}],52:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n,a=(n=e("../core/main"))&&n.__esModule?n:{default:n};function o(e,t,r,n,a){var o=4<arguments.length&&void 0!==a?a:0,i=e.getBoundingClientRect(),s=e.scrollWidth/t||1,l=e.scrollHeight/r||1,p=n.touches[o]||n.changedTouches[o];return{x:(p.clientX-i.left)/s,y:(p.clientY-i.top)/l,winX:p.clientX,winY:p.clientY,id:p.identifier}}a.default.prototype.touches=[],a.default.prototype._updateTouchCoords=function(e){if(null!==this._curElement){for(var t=[],r=0;r<e.touches.length;r++)t[r]=o(this._curElement.elt,this.width,this.height,e,r);this._setProperty("touches",t)}},a.default.prototype._ontouchstart=function(e){var t=this._isGlobal?window:this;this._setProperty("mouseIsPressed",!0),this._updateTouchCoords(e),this._updateNextMouseCoords(e),this._updateMouseCoords(),"function"==typeof t.touchStarted?!1===t.touchStarted(e)&&e.preventDefault():navigator.userAgent.toLowerCase().includes("safari")&&"function"==typeof t.mousePressed&&!1===t.mousePressed(e)&&e.preventDefault()},a.default.prototype._ontouchmove=function(e){var t=this._isGlobal?window:this;this._updateTouchCoords(e),this._updateNextMouseCoords(e),"function"==typeof t.touchMoved?!1===t.touchMoved(e)&&e.preventDefault():"function"==typeof t.mouseDragged&&!1===t.mouseDragged(e)&&e.preventDefault()},a.default.prototype._ontouchend=function(e){this._setProperty("mouseIsPressed",!1),this._updateTouchCoords(e),this._updateNextMouseCoords(e);var t=this._isGlobal?window:this;"function"==typeof t.touchEnded?!1===t.touchEnded(e)&&e.preventDefault():"function"==typeof t.mouseReleased&&!1===t.mouseReleased(e)&&e.preventDefault()};var i=a.default;r.default=i},{"../core/main":32}],53:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var N,O,L,I,P={};function n(e,t){for(var r,n,a,o,i,s,l,p,u,c,d=P._toPixels(e),h=e.width,m=e.height,f=h*m,y=new Int32Array(f),g=0;g<f;g++)y[g]=P._getARGB(d,g);var v,b,_,x,S=new Int32Array(f),w=new Int32Array(f),M=new Int32Array(f),E=new Int32Array(f),T=0;for(!function(e){var t=3.5*e|0;if(N!==(t=t<1?1:t<248?t:248)){O=1+(N=t)<<1,L=new Int32Array(O),I=new Array(O);for(var r=0;r<O;r++)I[r]=new Int32Array(256);for(var n,a,o,i,s=1,l=t-1;s<t;s++){L[t+s]=L[l]=a=l*l,o=I[t+s],i=I[l--];for(var p=0;p<256;p++)o[p]=i[p]=a*p}n=L[t]=t*t,o=I[t];for(var u=0;u<256;u++)o[u]=n*u}}(t),b=0;b<m;b++){for(v=0;v<h;v++){if(o=a=n=i=r=0,(s=v-N)<0)c=-s,s=0;else{if(h<=s)break;c=0}for(_=c;_<O&&!(h<=s);_++){var C=y[s+T];i+=(x=I[_])[(-16777216&C)>>>24],n+=x[(16711680&C)>>16],a+=x[(65280&C)>>8],o+=x[255&C],r+=L[_],s++}S[l=T+v]=i/r,w[l]=n/r,M[l]=a/r,E[l]=o/r}T+=h}for(u=(p=-N)*h,b=T=0;b<m;b++){for(v=0;v<h;v++){if(o=a=n=i=r=0,p<0)c=l=-p,s=v;else{if(m<=p)break;c=0,l=p,s=v+u}for(_=c;_<O&&!(m<=l);_++)i+=(x=I[_])[S[s]],n+=x[w[s]],a+=x[M[s]],o+=x[E[s]],r+=L[_],l++,s+=h;y[v+T]=i/r<<24|n/r<<16|a/r<<8|o/r}T+=h,u+=h,p++}P._setPixels(d,y)}P._toPixels=function(e){return e instanceof ImageData?e.data:e.getContext("2d").getImageData(0,0,e.width,e.height).data},P._getARGB=function(e,t){var r=4*t;return e[3+r]<<24&4278190080|e[r]<<16&16711680|e[1+r]<<8&65280|255&e[2+r]},P._setPixels=function(e,t){for(var r=0,n=0,a=e.length;n<a;n++)e[(r=4*n)+0]=(16711680&t[n])>>>16,e[r+1]=(65280&t[n])>>>8,e[r+2]=255&t[n],e[r+3]=(4278190080&t[n])>>>24},P._toImageData=function(e){return e instanceof ImageData?e:e.getContext("2d").getImageData(0,0,e.width,e.height)},P._createImageData=function(e,t){return P._tmpCanvas=document.createElement("canvas"),P._tmpCtx=P._tmpCanvas.getContext("2d"),this._tmpCtx.createImageData(e,t)},P.apply=function(e,t,r){var n=e.getContext("2d"),a=n.getImageData(0,0,e.width,e.height),o=t(a,r);o instanceof ImageData?n.putImageData(o,0,0,0,0,e.width,e.height):n.putImageData(a,0,0,0,0,e.width,e.height)},P.threshold=function(e,t){var r=P._toPixels(e);void 0===t&&(t=.5);for(var n=Math.floor(255*t),a=0;a<r.length;a+=4){var o=void 0;o=n<=.2126*r[a]+.7152*r[a+1]+.0722*r[a+2]?255:0,r[a]=r[a+1]=r[a+2]=o}},P.gray=function(e){for(var t=P._toPixels(e),r=0;r<t.length;r+=4){var n=.2126*t[r]+.7152*t[r+1]+.0722*t[r+2];t[r]=t[r+1]=t[r+2]=n}},P.opaque=function(e){for(var t=P._toPixels(e),r=0;r<t.length;r+=4)t[r+3]=255;return t},P.invert=function(e){for(var t=P._toPixels(e),r=0;r<t.length;r+=4)t[r]=255-t[r],t[r+1]=255-t[r+1],t[r+2]=255-t[r+2]},P.posterize=function(e,t){var r=P._toPixels(e);if(t<2||255<t)throw new Error("Level must be greater than 2 and less than 255 for posterize");for(var n=t-1,a=0;a<r.length;a+=4){var o=r[a],i=r[a+1],s=r[a+2];r[a]=255*(o*t>>8)/n,r[a+1]=255*(i*t>>8)/n,r[a+2]=255*(s*t>>8)/n}},P.dilate=function(e){for(var t,r,n,a,o,i,s,l,p,u,c,d,h,m,f,y,g,v=P._toPixels(e),b=0,_=v.length?v.length/4:0,x=new Int32Array(_);b<_;)for(r=(t=b)+e.width;b<r;)n=a=P._getARGB(v,b),(s=b-1)<t&&(s=b),r<=(i=b+1)&&(i=b),(l=b-e.width)<0&&(l=0),_<=(p=b+e.width)&&(p=b),d=P._getARGB(v,l),c=P._getARGB(v,s),h=P._getARGB(v,p),(o=77*(n>>16&255)+151*(n>>8&255)+28*(255&n))<(f=77*(c>>16&255)+151*(c>>8&255)+28*(255&c))&&(a=c,o=f),o<(m=77*((u=P._getARGB(v,i))>>16&255)+151*(u>>8&255)+28*(255&u))&&(a=u,o=m),o<(y=77*(d>>16&255)+151*(d>>8&255)+28*(255&d))&&(a=d,o=y),o<(g=77*(h>>16&255)+151*(h>>8&255)+28*(255&h))&&(a=h,o=g),x[b++]=a;P._setPixels(v,x)},P.erode=function(e){for(var t,r,n,a,o,i,s,l,p,u,c,d,h,m,f,y,g,v=P._toPixels(e),b=0,_=v.length?v.length/4:0,x=new Int32Array(_);b<_;)for(r=(t=b)+e.width;b<r;)n=a=P._getARGB(v,b),(s=b-1)<t&&(s=b),r<=(i=b+1)&&(i=b),(l=b-e.width)<0&&(l=0),_<=(p=b+e.width)&&(p=b),d=P._getARGB(v,l),c=P._getARGB(v,s),h=P._getARGB(v,p),(f=77*(c>>16&255)+151*(c>>8&255)+28*(255&c))<(o=77*(n>>16&255)+151*(n>>8&255)+28*(255&n))&&(a=c,o=f),(m=77*((u=P._getARGB(v,i))>>16&255)+151*(u>>8&255)+28*(255&u))<o&&(a=u,o=m),(y=77*(d>>16&255)+151*(d>>8&255)+28*(255&d))<o&&(a=d,o=y),(g=77*(h>>16&255)+151*(h>>8&255)+28*(255&h))<o&&(a=h,o=g),x[b++]=a;P._setPixels(v,x)},P.blur=function(e,t){n(e,t)};var a=P;r.default=a},{}],54:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var P=n(e("../core/main")),R=n(e("omggif"));function n(e){return e&&e.__esModule?e:{default:e}}function D(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}P.default.prototype.createImage=function(e,t){return P.default._validateParameters("createImage",arguments),new P.default.Image(e,t)},P.default.prototype.saveCanvas=function(){P.default._validateParameters("saveCanvas",arguments);var e,t,r,n,a=[].slice.call(arguments);switch(arguments[0]instanceof HTMLCanvasElement?(e=arguments[0],a.shift()):arguments[0]instanceof P.default.Element?(e=arguments[0].elt,a.shift()):e=this._curElement&&this._curElement.elt,1<=a.length&&(t=a[0]),2<=a.length&&(r=a[1]),r=r||P.default.prototype._checkFileExtension(t,r)[1]||"png"){default:n="image/png";break;case"jpeg":case"jpg":n="image/jpeg"}e.toBlob(function(e){P.default.prototype.downloadFile(e,t,r)},n)},P.default.prototype.saveGif=function(m,e){var f=m.gifProperties,t=f.loopLimit;1===t?t=null:null===t&&(t=0);for(var r=new Uint8Array(m.width*m.height*f.numFrames),y=[],n={},a=0;a<f.numFrames;a++){for(var o=new Set,i=f.frames[a].image.data,s=i.length,l=new Uint32Array(m.width*m.height),p=0,u=0;p<s;p+=4,u++){var c=i[p+0]<<16|i[p+1]<<8|i[p+2]<<0;o.add(c),l[u]=c}var d=D(o).sort().toString();void 0===n[d]?n[d]={freq:1,frames:[a]}:(n[d].freq+=1,n[d].frames.push(a)),y.push(l)}var g=[],h=Object.keys(n).sort(function(e,t){return n[t].freq-n[e].freq}),v=h[0].split(",").map(function(e){return parseInt(e)});g=g.concat(n[v].frames);for(var b=new Set(v),_=1;_<h.length;_++){var x=h[_].split(",").map(function(e){return parseInt(e)}).filter(function(e){return!b.has(e)});if(v.length+x.length<=256){for(var S=0;S<x.length;S++)v.push(x[S]),b.add(x[S]);g=g.concat(n[h[_]].frames)}}g=new Set(g);for(var w={},M=0;M<v.length;M++)w[v[M]]||(w[v[M]]=M);for(var E=1;E<v.length;)E<<=1;v.length=E;for(var T={loop:t,palette:new Uint32Array(v)},C=new R.default.GifWriter(r,m.width,m.height,T),N={},O=function(e){for(var t=!g.has(e),r=t?[]:v,n=new Uint8Array(m.width*m.height),a={},o=new Set,i=0;i<y[e].length;i++){var s=y[e][i];t?(void 0===a[s]&&(a[s]=r.length,r.push(s)),n[i]=a[s]):n[i]=w[s],0<e&&y[e-1][i]!==s&&o.add(s)}var l={},p=r.filter(function(e){return!o.has(e)});if(0<p.length){var u=p[0],c=t?a[u]:w[u];if(0<e){for(var d=0;d<y[e].length;d++)y[e-1][d]===y[e][d]&&(n[d]=c);l.transparent=c,N.frameOpts.disposal=1}}if(l.delay=f.frames[e].delay/10,t){for(var h=1;h<r.length;)h<<=1;r.length=h,l.palette=new Uint32Array(r)}0<e&&C.addFrame(0,0,m.width,m.height,N.pixelPaletteIndex,N.frameOpts),N={pixelPaletteIndex:n,frameOpts:l}},L=0;L<f.numFrames;L++)O(L);N.frameOpts.disposal=1,C.addFrame(0,0,m.width,m.height,N.pixelPaletteIndex,N.frameOpts);var I=new Blob([r.slice(0,C.end())],{type:"image/gif"});P.default.prototype.downloadFile(I,e,"gif")},P.default.prototype.saveFrames=function(e,t,r,n,i){P.default._validateParameters("saveFrames",arguments);var a=r||3;a=P.default.prototype.constrain(a,0,15),a*=1e3;var o=n||15;o=P.default.prototype.constrain(o,0,22);var s=0,l=P.default.prototype._makeFrame,p=this._curElement.elt,u=[],c=setInterval(function(){u.push(l(e+s,t,p)),s++},1e3/o);setTimeout(function(){if(clearInterval(c),i)i(u);else{var e=!0,t=!1,r=void 0;try{for(var n,a=u[Symbol.iterator]();!(e=(n=a.next()).done);e=!0){var o=n.value;P.default.prototype.downloadFile(o.imageData,o.filename,o.ext)}}catch(e){t=!0,r=e}finally{try{e||null==a.return||a.return()}finally{if(t)throw r}}}u=[]},a+.01)},P.default.prototype._makeFrame=function(e,t,r){var n,a;if(n=this?this._curElement.elt:r,t)switch(t.toLowerCase()){case"png":a="image/png";break;case"jpeg":case"jpg":a="image/jpeg";break;default:a="image/png"}else t="png",a="image/png";var o=n.toDataURL(a);o=o.replace(a,"image/octet-stream");var i={};return i.imageData=o,i.filename=e,i.ext=t,i};var a=P.default;r.default=a},{"../core/main":32,omggif:12}],55:[function(e,t,r){"use strict";function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var x=a(e("../core/main")),c=a(e("./filters")),S=a(e("../core/helpers")),n=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==i(e)&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=n?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(r,a,o):r[a]=e[a]}r.default=e,t&&t.set(e,r);return r}(e("../core/constants")),m=a(e("omggif"));function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function a(e){return e&&e.__esModule?e:{default:e}}function w(e,t){return 0<e&&e<t?e:t}e("../core/friendly_errors/validate_params"),e("../core/friendly_errors/file_errors"),e("../core/friendly_errors/fes_core"),x.default.prototype.loadImage=function(n,a,o){x.default._validateParameters("loadImage",arguments);var i=new x.default.Image(1,1,this),s=this,e=new Request(n,{method:"GET",mode:"cors"});return fetch(n,e).then(function(e){var t=e.headers.get("content-type");if(null===t&&console.warn("The image you loaded does not have a Content-Type header. If you are using the online editor consider reuploading the asset."),t&&t.includes("image/gif"))e.arrayBuffer().then(function(e){e&&function(e,r,t,n,a){var o=new m.default.GifReader(e);r.width=r.canvas.width=o.width,r.height=r.canvas.height=o.height;var i=[],s=o.numFrames(),l=new Uint8ClampedArray(r.width*r.height*4);if(1<s){for(var p=function(e,t){try{t.decodeAndBlitFrameRGBA(e,l)}catch(e){x.default._friendlyFileLoadError(8,r.src),"function"==typeof n?n(e):console.error(e)}},u=0;u<s;u++){var c=o.frameInfo(u);1===o.frameInfo(u).disposal&&0<u?r.drawingContext.putImageData(i[u-1].image,0,0):(r.drawingContext.clearRect(0,0,r.width,r.height),l=new Uint8ClampedArray(r.width*r.height*4)),p(u,o);var d=new ImageData(l,r.width,r.height);r.drawingContext.putImageData(d,0,0),i.push({image:r.drawingContext.getImageData(0,0,r.width,r.height),delay:10*c.delay})}var h=o.loopCount();null===h?h=1:0===h&&(h=null),r.gifProperties={displayIndex:0,loopLimit:h,loopCount:0,frames:i,numFrames:s,playing:!0,timeDisplayed:0}}"function"==typeof t&&t(r);a()}(new Uint8Array(e),i,a,o,function(e){s._decrementPreload()}.bind(s))},function(e){"function"==typeof o?o(e):console.error(e)});else{var r=new Image;r.onload=function(){i.width=i.canvas.width=r.width,i.height=i.canvas.height=r.height,i.drawingContext.drawImage(r,0,0),i.modified=!0,"function"==typeof a&&a(i),s._decrementPreload()},r.onerror=function(e){x.default._friendlyFileLoadError(0,r.src),"function"==typeof o?o(e):console.error(e)},0!==n.indexOf("data:image/")&&(r.crossOrigin="Anonymous"),r.src=n}i.modified=!0}),i},x.default.prototype.image=function(e,t,r,n,a,o,i,s,l){x.default._validateParameters("image",arguments);var p=e.width,u=e.height;e.elt&&e.elt.videoWidth&&!e.canvas&&(p=e.elt.videoWidth,u=e.elt.videoHeight);var c=t,d=r,h=n||p,m=a||u,f=o||0,y=i||0,g=s||p,v=l||u;g=w(g,p),v=w(v,u);var b=1;e.elt&&!e.canvas&&e.elt.style.width&&(b=e.elt.videoWidth&&!n?e.elt.videoWidth:e.elt.width,b/=parseInt(e.elt.style.width,10)),f*=b,y*=b,v*=b,g*=b;var _=S.default.modeAdjust(c,d,h,m,this._renderer._imageMode);this._renderer.image(e,f,y,g,v,_.x,_.y,_.w,_.h)},x.default.prototype.tint=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];x.default._validateParameters("tint",t);var n=this.color.apply(this,t);this._renderer._tint=n.levels},x.default.prototype.noTint=function(){this._renderer._tint=null},x.default.prototype._getTintedImageCanvas=function(e){if(!e.canvas)return e;var t=c.default._toPixels(e.canvas),r=document.createElement("canvas");r.width=e.canvas.width,r.height=e.canvas.height;for(var n=r.getContext("2d"),a=n.createImageData(e.canvas.width,e.canvas.height),o=a.data,i=0;i<t.length;i+=4){var s=t[i],l=t[i+1],p=t[i+2],u=t[i+3];o[i]=s*this._renderer._tint[0]/255,o[i+1]=l*this._renderer._tint[1]/255,o[i+2]=p*this._renderer._tint[2]/255,o[i+3]=u*this._renderer._tint[3]/255}return n.putImageData(a,0,0),r},x.default.prototype.imageMode=function(e){x.default._validateParameters("imageMode",arguments),e!==n.CORNER&&e!==n.CORNERS&&e!==n.CENTER||(this._renderer._imageMode=e)};var o=x.default;r.default=o},{"../core/constants":22,"../core/friendly_errors/fes_core":24,"../core/friendly_errors/file_errors":25,"../core/friendly_errors/validate_params":27,"../core/helpers":28,"../core/main":32,"./filters":53,omggif:12}],56:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var a=o(e("../core/main")),n=o(e("./filters"));function o(e){return e&&e.__esModule?e:{default:e}}a.default.Image=function(e,t){this.width=e,this.height=t,this.canvas=document.createElement("canvas"),this.canvas.width=this.width,this.canvas.height=this.height,this.drawingContext=this.canvas.getContext("2d"),(this._pixelsState=this)._pixelDensity=1,this.gifProperties=null,this._modified=!1,this.pixels=[]},a.default.Image.prototype._animateGif=function(e){var t=this.gifProperties;if(t.playing){t.timeDisplayed+=e.deltaTime;var r=t.frames[t.displayIndex].delay;if(t.timeDisplayed>=r){var n=Math.floor(t.timeDisplayed/r);if(t.timeDisplayed=0,t.displayIndex+=n,t.loopCount=Math.floor(t.displayIndex/t.numFrames),null!==t.loopLimit&&t.loopCount>=t.loopLimit)t.playing=!1;else{var a=t.displayIndex%t.numFrames;this.drawingContext.putImageData(t.frames[a].image,0,0),t.displayIndex=a,this.setModified(!0)}}}},a.default.Image.prototype._setProperty=function(e,t){this[e]=t,this.setModified(!0)},a.default.Image.prototype.loadPixels=function(){a.default.Renderer2D.prototype.loadPixels.call(this),this.setModified(!0)},a.default.Image.prototype.updatePixels=function(e,t,r,n){a.default.Renderer2D.prototype.updatePixels.call(this,e,t,r,n),this.setModified(!0)},a.default.Image.prototype.get=function(e,t,r,n){return a.default._validateParameters("p5.Image.get",arguments),a.default.Renderer2D.prototype.get.apply(this,arguments)},a.default.Image.prototype._getPixel=a.default.Renderer2D.prototype._getPixel,a.default.Image.prototype.set=function(e,t,r){a.default.Renderer2D.prototype.set.call(this,e,t,r),this.setModified(!0)},a.default.Image.prototype.resize=function(e,t){0===e&&0===t?(e=this.canvas.width,t=this.canvas.height):0===e?e=this.canvas.width*t/this.canvas.height:0===t&&(t=this.canvas.height*e/this.canvas.width),e=Math.floor(e),t=Math.floor(t);var r=document.createElement("canvas");if(r.width=e,r.height=t,this.gifProperties)for(var n=this.gifProperties,a=function(e,t){for(var r=0,n=0;n<t.height;n++)for(var a=0;a<t.width;a++){var o=Math.floor(a*e.width/t.width),i=4*(Math.floor(n*e.height/t.height)*e.width+o);t.data[r++]=e.data[i++],t.data[r++]=e.data[i++],t.data[r++]=e.data[i++],t.data[r++]=e.data[i++]}},o=0;o<n.numFrames;o++){var i=this.drawingContext.createImageData(e,t);a(n.frames[o].image,i),n.frames[o].image=i}r.getContext("2d").drawImage(this.canvas,0,0,this.canvas.width,this.canvas.height,0,0,r.width,r.height),this.canvas.width=this.width=e,this.canvas.height=this.height=t,this.drawingContext.drawImage(r,0,0,e,t,0,0,e,t),0<this.pixels.length&&this.loadPixels(),this.setModified(!0)},a.default.Image.prototype.copy=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];a.default.prototype.copy.apply(this,t)},a.default.Image.prototype.mask=function(e){void 0===e&&(e=this);var t=this.drawingContext.globalCompositeOperation,r=1;e instanceof a.default.Renderer&&(r=e._pInst._pixelDensity);var n=[e,0,0,r*e.width,r*e.height,0,0,this.width,this.height];this.drawingContext.globalCompositeOperation="destination-in",a.default.Image.prototype.copy.apply(this,n),this.drawingContext.globalCompositeOperation=t,this.setModified(!0)},a.default.Image.prototype.filter=function(e,t){n.default.apply(this.canvas,n.default[e],t),this.setModified(!0)},a.default.Image.prototype.blend=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];a.default._validateParameters("p5.Image.blend",arguments),a.default.prototype.blend.apply(this,t),this.setModified(!0)},a.default.Image.prototype.setModified=function(e){this._modified=e},a.default.Image.prototype.isModified=function(){return this._modified},a.default.Image.prototype.save=function(e,t){this.gifProperties?a.default.prototype.saveGif(this,e):a.default.prototype.saveCanvas(this.canvas,e,t)},a.default.Image.prototype.reset=function(){if(this.gifProperties){var e=this.gifProperties;e.playing=!0,e.timeSinceStart=0,e.timeDisplayed=0,e.loopCount=0,e.displayIndex=0,this.drawingContext.putImageData(e.frames[0].image,0,0)}},a.default.Image.prototype.getCurrentFrame=function(){if(this.gifProperties){var e=this.gifProperties;return e.displayIndex%e.numFrames}},a.default.Image.prototype.setFrame=function(e){if(this.gifProperties){var t=this.gifProperties;e<t.numFrames&&0<=e?(t.timeDisplayed=0,t.displayIndex=e,this.drawingContext.putImageData(t.frames[e].image,0,0)):console.log("Cannot set GIF to a frame number that is higher than total number of frames or below zero.")}},a.default.Image.prototype.numFrames=function(){if(this.gifProperties)return this.gifProperties.numFrames},a.default.Image.prototype.play=function(){this.gifProperties&&(this.gifProperties.playing=!0)},a.default.Image.prototype.pause=function(){this.gifProperties&&(this.gifProperties.playing=!1)},a.default.Image.prototype.delay=function(e,t){if(this.gifProperties){var r=this.gifProperties;if(t<r.numFrames&&0<=t)r.frames[t].delay=e;else{var n=!0,a=!1,o=void 0;try{for(var i,s=r.frames[Symbol.iterator]();!(n=(i=s.next()).done);n=!0){i.value.delay=e}}catch(e){a=!0,o=e}finally{try{n||null==s.return||s.return()}finally{if(a)throw o}}}}};var i=a.default.Image;r.default=i},{"../core/main":32,"./filters":53}],57:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var h=a(e("../core/main")),n=a(e("./filters"));function a(e){return e&&e.__esModule?e:{default:e}}e("../color/p5.Color"),h.default.prototype.pixels=[],h.default.prototype.blend=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n;(h.default._validateParameters("blend",t),this._renderer)?(n=this._renderer).blend.apply(n,t):h.default.Renderer2D.prototype.blend.apply(this,t)},h.default.prototype.copy=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n,a,o,i,s,l,p,u,c;if(h.default._validateParameters("copy",t),9===t.length)n=t[0],a=t[1],o=t[2],i=t[3],s=t[4],l=t[5],p=t[6],u=t[7],c=t[8];else{if(8!==t.length)throw new Error("Signature not supported");n=this,a=t[0],o=t[1],i=t[2],s=t[3],l=t[4],p=t[5],u=t[6],c=t[7]}h.default.prototype._copyHelper(this,n,a,o,i,s,l,p,u,c)},h.default.prototype._copyHelper=function(e,t,r,n,a,o,i,s,l,p){t.loadPixels();var u=t.canvas.width/t.width,c=0,d=0;t._renderer&&t._renderer.isP3D&&(c=t.width/2,d=t.height/2),e._renderer&&e._renderer.isP3D?h.default.RendererGL.prototype.image.call(e._renderer,t,r+c,n+d,a,o,i,s,l,p):e.drawingContext.drawImage(t.canvas,u*(r+c),u*(n+d),u*a,u*o,i,s,l,p)},h.default.prototype.filter=function(e,t){h.default._validateParameters("filter",arguments),void 0!==this.canvas?n.default.apply(this.canvas,n.default[e],t):n.default.apply(this.elt,n.default[e],t)},h.default.prototype.get=function(e,t,r,n){var a;return h.default._validateParameters("get",arguments),(a=this._renderer).get.apply(a,arguments)},h.default.prototype.loadPixels=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];h.default._validateParameters("loadPixels",t),this._renderer.loadPixels()},h.default.prototype.set=function(e,t,r){this._renderer.set(e,t,r)},h.default.prototype.updatePixels=function(e,t,r,n){h.default._validateParameters("updatePixels",arguments),0!==this.pixels.length&&this._renderer.updatePixels(e,t,r,n)};var o=h.default;r.default=o},{"../color/p5.Color":20,"../core/main":32,"./filters":53}],58:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var g=n(e("../core/main"));e("whatwg-fetch"),e("es6-promise/auto");var y=n(e("fetch-jsonp")),s=n(e("file-saver"));function n(e){return e&&e.__esModule?e:{default:e}}function v(e){return(v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function b(e,t){var r={};if(void 0===(t=t||[]))for(var n=0;n<e.length;n++)t[n.toString()]=n;for(var a=0;a<t.length;a++){var o=t[a],i=e[a];r[o]=i}return r}function f(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}function l(e,t){t&&!0!==t&&"true"!==t||(t="");var r="";return(e=e||"untitled")&&e.includes(".")&&(r=e.split(".").pop()),t&&r!==t&&(r=t,e="".concat(e,".").concat(r)),[e,r]}e("../core/friendly_errors/validate_params"),e("../core/friendly_errors/file_errors"),e("../core/friendly_errors/fes_core"),g.default.prototype.loadJSON=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];g.default._validateParameters("loadJSON",t);for(var n,a,o,i=t[0],s={},l="json",p=1;p<t.length;p++){var u=t[p];"string"==typeof u?"jsonp"!==u&&"json"!==u||(l=u):"function"==typeof u?n?a=u:n=u:"object"===v(u)&&(u.hasOwnProperty("jsonpCallback")||u.hasOwnProperty("jsonpCallbackFunction"))&&(l="jsonp",o=u)}var c=this;return this.httpDo(i,"GET",o,l,function(e){for(var t in e)s[t]=e[t];void 0!==n&&n(e),c._decrementPreload()},function(e){if(g.default._friendlyFileLoadError(5,i),!a)throw e;a(e)}),s},g.default.prototype.loadStrings=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];g.default._validateParameters("loadStrings",t);for(var n,a,o=[],i=1;i<t.length;i++){var s=t[i];"function"==typeof s&&(void 0===n?n=s:void 0===a&&(a=s))}var l=this;return g.default.prototype.httpDo.call(this,t[0],"GET","text",function(e){var t=e.replace(/\r\n/g,"\r").replace(/\n/g,"\r").split(/\r/);Array.prototype.push.apply(o,t),void 0!==n&&n(o),l._decrementPreload()},function(e){if(g.default._friendlyFileLoadError(3,e),!a)throw e;a(e)}),o},g.default.prototype.loadTable=function(t){var d,r,h,e=[],m=!1,n=t.substring(t.lastIndexOf(".")+1,t.length);"csv"===n?h=",":"ssv"===n?h=";":"tsv"===n&&(h="\t");for(var a=1;a<arguments.length;a++)"function"==typeof arguments[a]?void 0===d?d=arguments[a]:void 0===r&&(r=arguments[a]):"string"==typeof arguments[a]&&(e.push(arguments[a]),"header"===arguments[a]&&(m=!0),"csv"===arguments[a]?h=",":"ssv"===arguments[a]?h=";":"tsv"===arguments[a]&&(h="\t"));console.log("SEP IS "+h);var f=new g.default.Table,y=this;return this.httpDo(t,"GET","table",function(e){for(var t,r,n={},a=[],o=0,i=null,s=function(){n.currentState=0,n.token=""},l=function(){i.push(n.token),s()},p=function(){n.currentState=4,a.push(i),i=null};;){if(null==(t=e[o++])){if(n.escaped)throw new Error("Unclosed quote in file.");if(i){l(),p();break}}if(null===i&&(n.escaped=!1,i=[],s()),0===n.currentState){if('"'===t){n.escaped=!0,n.currentState=1;continue}n.currentState=1}if(1===n.currentState&&n.escaped)if('"'===t)'"'===e[o]?(n.token+='"',o++):(n.escaped=!1,n.currentState=2);else{if("\r"===t)continue;n.token+=t}else"\r"===t?("\n"===e[o]&&o++,l(),p()):"\n"===t?(l(),p()):t===h?l():1===n.currentState&&(n.token+=t)}if(m)f.columns=a.shift();else for(var u=0;u<a[0].length;u++)f.columns[u]="null";for(var c=0;c<a.length;c++)(1!==a[c].length||"undefined"!==a[c][0]&&""!==a[c][0])&&((r=new g.default.TableRow).arr=a[c],r.obj=b(a[c],f.columns),f.addRow(r));"function"==typeof d&&d(f),y._decrementPreload()},function(e){g.default._friendlyFileLoadError(2,t),r?r(e):console.error(e)}),f},g.default.prototype.loadXML=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];for(var n,a,o=new g.default.XML,i=1;i<t.length;i++){var s=t[i];"function"==typeof s&&(void 0===n?n=s:void 0===a&&(a=s))}var l=this;return this.httpDo(t[0],"GET","xml",function(e){for(var t in e)o[t]=e[t];void 0!==n&&n(o),l._decrementPreload()},function(e){if(g.default._friendlyFileLoadError(1,e),!a)throw e;a(e)}),o},g.default.prototype.loadBytes=function(t,r,n){var a={},o=this;return this.httpDo(t,"GET","arrayBuffer",function(e){a.bytes=new Uint8Array(e),"function"==typeof r&&r(a),o._decrementPreload()},function(e){if(g.default._friendlyFileLoadError(6,t),!n)throw e;n(e)}),a},g.default.prototype.httpGet=function(){g.default._validateParameters("httpGet",arguments);var e=Array.prototype.slice.call(arguments);return e.splice(1,0,"GET"),g.default.prototype.httpDo.apply(this,e)},g.default.prototype.httpPost=function(){g.default._validateParameters("httpPost",arguments);var e=Array.prototype.slice.call(arguments);return e.splice(1,0,"POST"),g.default.prototype.httpDo.apply(this,e)},g.default.prototype.httpDo=function(){for(var n,e,t,r,a,o={},i=0,s="text/plain",l=arguments.length-1;0<l&&"function"==typeof(l<0||arguments.length<=l?void 0:arguments[l]);l--)i++;var p=arguments.length<=0?void 0:arguments[0];if(2==arguments.length-i&&"string"==typeof p&&"object"===v(arguments.length<=1?void 0:arguments[1]))r=new Request(p,arguments.length<=1?void 0:arguments[1]),e=arguments.length<=2?void 0:arguments[2],t=arguments.length<=3?void 0:arguments[3];else{for(var u,c="GET",d=1;d<arguments.length;d++){var h=d<0||arguments.length<=d?void 0:arguments[d];if("string"==typeof h)"GET"===h||"POST"===h||"PUT"===h||"DELETE"===h?c=h:"json"===h||"jsonp"===h||"binary"===h||"arrayBuffer"===h||"xml"===h||"text"===h||"table"===h?n=h:u=h;else if("number"==typeof h)u=h.toString();else if("object"===v(h))if(h.hasOwnProperty("jsonpCallback")||h.hasOwnProperty("jsonpCallbackFunction"))for(var m in h)o[m]=h[m];else s=h instanceof g.default.XML?(u=h.serialize(),"application/xml"):(u=JSON.stringify(h),"application/json");else"function"==typeof h&&(e?t=h:e=h)}var f="GET"===c?new Headers:new Headers({"Content-Type":s});r=new Request(p,{method:c,mode:"cors",body:u,headers:f})}return(a=(a="jsonp"===(n=n||(p.includes("json")?"json":p.includes("xml")?"xml":"text"))?(0,y.default)(p,o):fetch(r)).then(function(e){if(!e.ok){var t=new Error(e.body);throw t.status=e.status,t.ok=!1,t}var r=0;switch("jsonp"!==n&&(r=e.headers.get("content-length")),r&&64e6<r&&g.default._friendlyFileLoadError(7,p),n){case"json":case"jsonp":return e.json();case"binary":return e.blob();case"arrayBuffer":return e.arrayBuffer();case"xml":return e.text().then(function(e){var t=(new DOMParser).parseFromString(e,"text/xml");return new g.default.XML(t.documentElement)});default:return e.text()}})).then(e||function(){}),a.catch(t||console.error),a},window.URL=window.URL||window.webkitURL,g.default.prototype._pWriters=[],g.default.prototype.createWriter=function(e,t){var r;for(var n in g.default.prototype._pWriters)if(g.default.prototype._pWriters[n].name===e)return r=new g.default.PrintWriter(e+this.millis(),t),g.default.prototype._pWriters.push(r),r;return r=new g.default.PrintWriter(e,t),g.default.prototype._pWriters.push(r),r},g.default.PrintWriter=function(r,n){var a=this;this.name=r,this.content="",this.write=function(e){this.content+=e},this.print=function(e){this.content+="".concat(e,"\n")},this.clear=function(){this.content=""},this.close=function(){var e=[];for(var t in e.push(this.content),g.default.prototype.writeFile(e,r,n),g.default.prototype._pWriters)g.default.prototype._pWriters[t].name===this.name&&g.default.prototype._pWriters.splice(t,1);a.clear(),a={}}},g.default.prototype.save=function(e,t,r){var n=arguments,a=this._curElement?this._curElement.elt:this.elt;if(0!==n.length)if(n[0]instanceof g.default.Renderer||n[0]instanceof g.default.Graphics)g.default.prototype.saveCanvas(n[0].elt,n[1],n[2]);else if(1===n.length&&"string"==typeof n[0])g.default.prototype.saveCanvas(a,n[0]);else switch(l(n[1],n[2])[1]){case"json":return void g.default.prototype.saveJSON(n[0],n[1],n[2]);case"txt":return void g.default.prototype.saveStrings(n[0],n[1],n[2]);default:n[0]instanceof Array?g.default.prototype.saveStrings(n[0],n[1],n[2]):n[0]instanceof g.default.Table?g.default.prototype.saveTable(n[0],n[1],n[2]):n[0]instanceof g.default.Image?g.default.prototype.saveCanvas(n[0].canvas,n[1]):n[0]instanceof g.default.SoundFile&&g.default.prototype.saveSound(n[0],n[1],n[2],n[3])}else g.default.prototype.saveCanvas(a)},g.default.prototype.saveJSON=function(e,t,r){var n;g.default._validateParameters("saveJSON",arguments),n=r?JSON.stringify(e):JSON.stringify(e,void 0,2),this.saveStrings(n.split("\n"),t,"json")},g.default.prototype.saveJSONObject=g.default.prototype.saveJSON,g.default.prototype.saveJSONArray=g.default.prototype.saveJSON,g.default.prototype.saveStrings=function(e,t,r,n){g.default._validateParameters("saveStrings",arguments);for(var a=r||"txt",o=this.createWriter(t,a),i=0;i<e.length;i++)n?o.write(e[i]+"\r\n"):o.write(e[i]+"\n");o.close(),o.clear()},g.default.prototype.saveTable=function(e,t,r){var n;g.default._validateParameters("saveTable",arguments),n=void 0===r?t.substring(t.lastIndexOf(".")+1,t.length):r;var a=this.createWriter(t,n),o=e.columns,i=",";if("tsv"===n&&(i="\t"),"html"!==n){if("0"!==o[0]){for(var s=0;s<o.length;s++)s<o.length-1?a.write(o[s]+i):a.write(o[s]);a.write("\n")}for(var l=0;l<e.rows.length;l++){var p=void 0;for(p=0;p<e.rows[l].arr.length;p++)p<e.rows[l].arr.length-1?a.write(e.rows[l].arr[p]+i):(e.rows.length,a.write(e.rows[l].arr[p]));a.write("\n")}}else{a.print("<html>"),a.print("<head>");if(a.print('  <meta http-equiv="content-type" content="text/html;charset=utf-8" />'),a.print("</head>"),a.print("<body>"),a.print("  <table>"),"0"!==o[0]){a.print("    <tr>");for(var u=0;u<o.length;u++){var c=f(o[u]);a.print("      <td>".concat(c)),a.print("      </td>")}a.print("    </tr>")}for(var d=0;d<e.rows.length;d++){a.print("    <tr>");for(var h=0;h<e.columns.length;h++){var m=f(e.rows[d].getString(h));a.print("      <td>".concat(m)),a.print("      </td>")}a.print("    </tr>")}a.print("  </table>"),a.print("</body>"),a.print("</html>")}a.close(),a.clear()},g.default.prototype.writeFile=function(e,t,r){var n="application/octet-stream";g.default.prototype._isSafari()&&(n="text/plain");var a=new Blob(e,{type:n});g.default.prototype.downloadFile(a,t,r)},g.default.prototype.downloadFile=function(e,t,r){var n=l(t,r),a=n[0];if(e instanceof Blob)s.default.saveAs(e,a);else{var o=document.createElement("a");if(o.href=e,o.download=a,o.onclick=function(e){var t;t=e,document.body.removeChild(t.target),e.stopPropagation()},o.style.display="none",document.body.appendChild(o),g.default.prototype._isSafari()){var i="Hello, Safari user! To download this file...\n";i+="1. Go to File --\x3e Save As.\n",i+='2. Choose "Page Source" as the Format.\n',i+='3. Name it with this extension: ."'.concat(n[1],'"'),alert(i)}o.click()}},g.default.prototype._checkFileExtension=l,g.default.prototype._isSafari=function(){return 0<Object.prototype.toString.call(window.HTMLElement).indexOf("Constructor")};var a=g.default;r.default=a},{"../core/friendly_errors/fes_core":24,"../core/friendly_errors/file_errors":25,"../core/friendly_errors/validate_params":27,"../core/main":32,"es6-promise/auto":6,"fetch-jsonp":8,"file-saver":9,"whatwg-fetch":16}],59:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n,a=(n=e("../core/main"))&&n.__esModule?n:{default:n};a.default.Table=function(e){this.columns=[],this.rows=[]},a.default.Table.prototype.addRow=function(e){var t=e||new a.default.TableRow;if(void 0===t.arr||void 0===t.obj)throw new Error("invalid TableRow: ".concat(t));return(t.table=this).rows.push(t),t},a.default.Table.prototype.removeRow=function(e){this.rows[e].table=null;var t=this.rows.splice(e+1,this.rows.length);this.rows.pop(),this.rows=this.rows.concat(t)},a.default.Table.prototype.getRow=function(e){return this.rows[e]},a.default.Table.prototype.getRows=function(){return this.rows},a.default.Table.prototype.findRow=function(e,t){if("string"==typeof t){for(var r=0;r<this.rows.length;r++)if(this.rows[r].obj[t]===e)return this.rows[r]}else for(var n=0;n<this.rows.length;n++)if(this.rows[n].arr[t]===e)return this.rows[n];return null},a.default.Table.prototype.findRows=function(e,t){var r=[];if("string"==typeof t)for(var n=0;n<this.rows.length;n++)this.rows[n].obj[t]===e&&r.push(this.rows[n]);else for(var a=0;a<this.rows.length;a++)this.rows[a].arr[t]===e&&r.push(this.rows[a]);return r},a.default.Table.prototype.matchRow=function(e,t){if("number"==typeof t){for(var r=0;r<this.rows.length;r++)if(this.rows[r].arr[t].match(e))return this.rows[r]}else for(var n=0;n<this.rows.length;n++)if(this.rows[n].obj[t].match(e))return this.rows[n];return null},a.default.Table.prototype.matchRows=function(e,t){var r=[];if("number"==typeof t)for(var n=0;n<this.rows.length;n++)this.rows[n].arr[t].match(e)&&r.push(this.rows[n]);else for(var a=0;a<this.rows.length;a++)this.rows[a].obj[t].match(e)&&r.push(this.rows[a]);return r},a.default.Table.prototype.getColumn=function(e){var t=[];if("string"==typeof e)for(var r=0;r<this.rows.length;r++)t.push(this.rows[r].obj[e]);else for(var n=0;n<this.rows.length;n++)t.push(this.rows[n].arr[e]);return t},a.default.Table.prototype.clearRows=function(){delete this.rows,this.rows=[]},a.default.Table.prototype.addColumn=function(e){var t=e||null;this.columns.push(t)},a.default.Table.prototype.getColumnCount=function(){return this.columns.length},a.default.Table.prototype.getRowCount=function(){return this.rows.length},a.default.Table.prototype.removeTokens=function(e,t){for(var r=[],n=0;n<e.length;n++)r.push(e.charAt(n).replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"));var a=new RegExp(r.join("|"),"g");if(void 0===t)for(var o=0;o<this.columns.length;o++)for(var i=0;i<this.rows.length;i++){var s=this.rows[i].arr[o];s=s.replace(a,""),this.rows[i].arr[o]=s,this.rows[i].obj[this.columns[o]]=s}else if("string"==typeof t)for(var l=0;l<this.rows.length;l++){var p=this.rows[l].obj[t];p=p.replace(a,""),this.rows[l].obj[t]=p;var u=this.columns.indexOf(t);this.rows[l].arr[u]=p}else for(var c=0;c<this.rows.length;c++){var d=this.rows[c].arr[t];d=d.replace(a,""),this.rows[c].arr[t]=d,this.rows[c].obj[this.columns[t]]=d}},a.default.Table.prototype.trim=function(e){var t=new RegExp(" ","g");if(void 0===e)for(var r=0;r<this.columns.length;r++)for(var n=0;n<this.rows.length;n++){var a=this.rows[n].arr[r];a=a.replace(t,""),this.rows[n].arr[r]=a,this.rows[n].obj[this.columns[r]]=a}else if("string"==typeof e)for(var o=0;o<this.rows.length;o++){var i=this.rows[o].obj[e];i=i.replace(t,""),this.rows[o].obj[e]=i;var s=this.columns.indexOf(e);this.rows[o].arr[s]=i}else for(var l=0;l<this.rows.length;l++){var p=this.rows[l].arr[e];p=p.replace(t,""),this.rows[l].arr[e]=p,this.rows[l].obj[this.columns[e]]=p}},a.default.Table.prototype.removeColumn=function(e){var t,r;"string"==typeof e?(t=e,r=this.columns.indexOf(e)):(r=e,t=this.columns[e]);var n=this.columns.splice(r+1,this.columns.length);this.columns.pop(),this.columns=this.columns.concat(n);for(var a=0;a<this.rows.length;a++){var o=this.rows[a].arr,i=o.splice(r+1,o.length);o.pop(),this.rows[a].arr=o.concat(i),delete this.rows[a].obj[t]}},a.default.Table.prototype.set=function(e,t,r){this.rows[e].set(t,r)},a.default.Table.prototype.setNum=function(e,t,r){this.rows[e].setNum(t,r)},a.default.Table.prototype.setString=function(e,t,r){this.rows[e].setString(t,r)},a.default.Table.prototype.get=function(e,t){return this.rows[e].get(t)},a.default.Table.prototype.getNum=function(e,t){return this.rows[e].getNum(t)},a.default.Table.prototype.getString=function(e,t){return this.rows[e].getString(t)},a.default.Table.prototype.getObject=function(e){for(var t,r={},n=0;n<this.rows.length;n++)if(t=this.rows[n].obj,"string"==typeof e){if(!(0<=this.columns.indexOf(e)))throw new Error('This table has no column named "'.concat(e,'"'));r[t[e]]=t}else r[n]=this.rows[n].obj;return r},a.default.Table.prototype.getArray=function(){for(var e=[],t=0;t<this.rows.length;t++)e.push(this.rows[t].arr);return e};var o=a.default;r.default=o},{"../core/main":32}],60:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n,a=(n=e("../core/main"))&&n.__esModule?n:{default:n};a.default.TableRow=function(e,t){var r=[],n={};e&&(t=t||",",r=e.split(t));for(var a=0;a<r.length;a++){var o=a,i=r[a];n[o]=i}this.arr=r,this.obj=n,this.table=null},a.default.TableRow.prototype.set=function(e,t){if("string"==typeof e){var r=this.table.columns.indexOf(e);if(!(0<=r))throw new Error('This table has no column named "'.concat(e,'"'));this.obj[e]=t,this.arr[r]=t}else{if(!(e<this.table.columns.length))throw new Error("Column #".concat(e," is out of the range of this table"));this.arr[e]=t;var n=this.table.columns[e];this.obj[n]=t}},a.default.TableRow.prototype.setNum=function(e,t){var r=parseFloat(t);this.set(e,r)},a.default.TableRow.prototype.setString=function(e,t){var r=t.toString();this.set(e,r)},a.default.TableRow.prototype.get=function(e){return"string"==typeof e?this.obj[e]:this.arr[e]},a.default.TableRow.prototype.getNum=function(e){var t;if("NaN"===(t="string"==typeof e?parseFloat(this.obj[e]):parseFloat(this.arr[e])).toString())throw"Error: ".concat(this.obj[e]," is NaN (Not a Number)");return t},a.default.TableRow.prototype.getString=function(e){return"string"==typeof e?this.obj[e].toString():this.arr[e].toString()};var o=a.default;r.default=o},{"../core/main":32}],61:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n,s=(n=e("../core/main"))&&n.__esModule?n:{default:n};function a(e){for(var t=[],r=0;r<e.length;r++)t.push(new s.default.XML(e[r]));return t}s.default.XML=function(e){if(e)this.DOM=e;else{var t=document.implementation.createDocument(null,"doc");this.DOM=t.createElement("root")}},s.default.XML.prototype.getParent=function(){return new s.default.XML(this.DOM.parentElement)},s.default.XML.prototype.getName=function(){return this.DOM.tagName},s.default.XML.prototype.setName=function(e){var t=this.DOM.innerHTML,r=this.DOM.attributes,n=document.implementation.createDocument(null,"default").createElement(e);n.innerHTML=t;for(var a=0;a<r.length;a++)n.setAttribute(r[a].nodeName,r.nodeValue);this.DOM=n},s.default.XML.prototype.hasChildren=function(){return 0<this.DOM.children.length},s.default.XML.prototype.listChildren=function(){for(var e=[],t=0;t<this.DOM.childNodes.length;t++)e.push(this.DOM.childNodes[t].nodeName);return e},s.default.XML.prototype.getChildren=function(e){return a(e?this.DOM.getElementsByTagName(e):this.DOM.children)},s.default.XML.prototype.getChild=function(e){if("string"!=typeof e)return new s.default.XML(this.DOM.children[e]);var t=!0,r=!1,n=void 0;try{for(var a,o=this.DOM.children[Symbol.iterator]();!(t=(a=o.next()).done);t=!0){var i=a.value;if(i.tagName===e)return new s.default.XML(i)}}catch(e){r=!0,n=e}finally{try{t||null==o.return||o.return()}finally{if(r)throw n}}},s.default.XML.prototype.addChild=function(e){e instanceof s.default.XML&&this.DOM.appendChild(e.DOM)},s.default.XML.prototype.removeChild=function(e){var t=-1;if("string"==typeof e){for(var r=0;r<this.DOM.children.length;r++)if(this.DOM.children[r].tagName===e){t=r;break}}else t=e;-1!==t&&this.DOM.removeChild(this.DOM.children[t])},s.default.XML.prototype.getAttributeCount=function(){return this.DOM.attributes.length},s.default.XML.prototype.listAttributes=function(){var e=[],t=!0,r=!1,n=void 0;try{for(var a,o=this.DOM.attributes[Symbol.iterator]();!(t=(a=o.next()).done);t=!0){var i=a.value;e.push(i.nodeName)}}catch(e){r=!0,n=e}finally{try{t||null==o.return||o.return()}finally{if(r)throw n}}return e},s.default.XML.prototype.hasAttribute=function(e){var t={},r=!0,n=!1,a=void 0;try{for(var o,i=this.DOM.attributes[Symbol.iterator]();!(r=(o=i.next()).done);r=!0){var s=o.value;t[s.nodeName]=s.nodeValue}}catch(e){n=!0,a=e}finally{try{r||null==i.return||i.return()}finally{if(n)throw a}}return!!t[e]},s.default.XML.prototype.getNum=function(e,t){var r={},n=!0,a=!1,o=void 0;try{for(var i,s=this.DOM.attributes[Symbol.iterator]();!(n=(i=s.next()).done);n=!0){var l=i.value;r[l.nodeName]=l.nodeValue}}catch(e){a=!0,o=e}finally{try{n||null==s.return||s.return()}finally{if(a)throw o}}return Number(r[e])||t||0},s.default.XML.prototype.getString=function(e,t){var r={},n=!0,a=!1,o=void 0;try{for(var i,s=this.DOM.attributes[Symbol.iterator]();!(n=(i=s.next()).done);n=!0){var l=i.value;r[l.nodeName]=l.nodeValue}}catch(e){a=!0,o=e}finally{try{n||null==s.return||s.return()}finally{if(a)throw o}}return r[e]?String(r[e]):t||null},s.default.XML.prototype.setAttribute=function(e,t){this.DOM.setAttribute(e,t)},s.default.XML.prototype.getContent=function(e){return this.DOM.textContent.replace(/\s\s+/g,",")||e||null},s.default.XML.prototype.setContent=function(e){this.DOM.children.length||(this.DOM.textContent=e)},s.default.XML.prototype.serialize=function(){return(new XMLSerializer).serializeToString(this.DOM)};var o=s.default;r.default=o},{"../core/main":32}],62:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n,s=(n=e("../core/main"))&&n.__esModule?n:{default:n};function a(){if("function"==typeof Math.hypot)return Math.hypot.apply(null,arguments);for(var e=arguments.length,t=[],r=0,n=0;n<e;n++){var a=arguments[n];if((a=+a)===1/0||a===-1/0)return 1/0;r<(a=Math.abs(a))&&(r=a),t[n]=a}0===r&&(r=1);for(var o=0,i=0,s=0;s<e;s++){var l=t[s]/r,p=l*l-i,u=o+p;i=u-o-p,o=u}return Math.sqrt(o)*r}s.default.prototype.abs=Math.abs,s.default.prototype.ceil=Math.ceil,s.default.prototype.constrain=function(e,t,r){return s.default._validateParameters("constrain",arguments),Math.max(Math.min(e,r),t)},s.default.prototype.dist=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return s.default._validateParameters("dist",t),4===t.length?a(t[2]-t[0],t[3]-t[1]):6===t.length?a(t[3]-t[0],t[4]-t[1],t[5]-t[2]):void 0},s.default.prototype.exp=Math.exp,s.default.prototype.floor=Math.floor,s.default.prototype.lerp=function(e,t,r){return s.default._validateParameters("lerp",arguments),r*(t-e)+e},s.default.prototype.log=Math.log,s.default.prototype.mag=function(e,t){return s.default._validateParameters("mag",arguments),a(e,t)},s.default.prototype.map=function(e,t,r,n,a,o){s.default._validateParameters("map",arguments);var i=(e-t)/(r-t)*(a-n)+n;return o?n<a?this.constrain(i,n,a):this.constrain(i,a,n):i},s.default.prototype.max=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return s.default._validateParameters("max",t),t[0]instanceof Array?Math.max.apply(null,t[0]):Math.max.apply(null,t)},s.default.prototype.min=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return s.default._validateParameters("min",t),t[0]instanceof Array?Math.min.apply(null,t[0]):Math.min.apply(null,t)},s.default.prototype.norm=function(e,t,r){return s.default._validateParameters("norm",arguments),this.map(e,t,r,0,1)},s.default.prototype.pow=Math.pow,s.default.prototype.round=function(e,t){return t?Number(Math.round(e+"e"+t)+"e-"+t):Math.round(e)},s.default.prototype.sq=function(e){return e*e},s.default.prototype.sqrt=Math.sqrt,s.default.prototype.fract=function(e){s.default._validateParameters("fract",arguments);var t=0,r=Number(e);if(isNaN(r)||Math.abs(r)===1/0)return r;if(r<0&&(r=-r,t=1),!String(r).includes(".")||String(r).includes("e"))return r<1?Math.abs(t-r):0;var n=String(r);return n=Number("0"+n.slice(n.indexOf("."))),Math.abs(t-n)};var o=s.default;r.default=o},{"../core/main":32}],63:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n,a=(n=e("../core/main"))&&n.__esModule?n:{default:n};a.default.prototype.createVector=function(e,t,r){return this instanceof a.default?new a.default.Vector(this,arguments):new a.default.Vector(e,t,r)};var o=a.default;r.default=o},{"../core/main":32}],64:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n,a=(n=e("../core/main"))&&n.__esModule?n:{default:n};function b(e){return.5*(1-Math.cos(e*Math.PI))}var _,x=4095,S=4,w=.5;a.default.prototype.noise=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0;if(null==_){_=new Array(4096);for(var n=0;n<4096;n++)_[n]=Math.random()}e<0&&(e=-e),t<0&&(t=-t),r<0&&(r=-r);for(var a,o,i,s,l,p=Math.floor(e),u=Math.floor(t),c=Math.floor(r),d=e-p,h=t-u,m=r-c,f=0,y=.5,g=0;g<S;g++){var v=p+(u<<4)+(c<<8);a=b(d),o=b(h),i=_[v&x],i+=a*(_[v+1&x]-i),s=_[v+16&x],i+=o*((s+=a*(_[v+16+1&x]-s))-i),s=_[(v+=256)&x],s+=a*(_[v+1&x]-s),l=_[v+16&x],s+=o*((l+=a*(_[v+16+1&x]-l))-s),f+=(i+=b(m)*(s-i))*y,y*=w,p<<=1,u<<=1,c<<=1,1<=(d*=2)&&(p++,d--),1<=(h*=2)&&(u++,h--),1<=(m*=2)&&(c++,m--)}return f},a.default.prototype.noiseDetail=function(e,t){0<e&&(S=e),0<t&&(w=t)},a.default.prototype.noiseSeed=function(e){var t,r,n,a=(n=4294967296,{setSeed:function(e){r=t=(null==e?Math.random()*n:e)>>>0},getSeed:function(){return t},rand:function(){return(r=(1664525*r+1013904223)%n)/n}});a.setSeed(e),_=new Array(4096);for(var o=0;o<4096;o++)_[o]=a.rand()};var o=a.default;r.default=o},{"../core/main":32}],65:[function(e,t,r){"use strict";function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n,l=(n=e("../core/main"))&&n.__esModule?n:{default:n},o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==i(e)&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=n?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(r,a,o):r[a]=e[a]}r.default=e,t&&t.set(e,r);return r}(e("../core/constants"));function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}l.default.Vector=function(e,t,r){var n,a,o;o=e instanceof l.default?(this.p5=e,n=t[0]||0,a=t[1]||0,t[2]||0):(n=e||0,a=t||0,r||0),this.x=n,this.y=a,this.z=o},l.default.Vector.prototype.toString=function(){return"p5.Vector Object : [".concat(this.x,", ").concat(this.y,", ").concat(this.z,"]")},l.default.Vector.prototype.set=function(e,t,r){return e instanceof l.default.Vector?(this.x=e.x||0,this.y=e.y||0,this.z=e.z||0):e instanceof Array?(this.x=e[0]||0,this.y=e[1]||0,this.z=e[2]||0):(this.x=e||0,this.y=t||0,this.z=r||0),this},l.default.Vector.prototype.copy=function(){return this.p5?new l.default.Vector(this.p5,[this.x,this.y,this.z]):new l.default.Vector(this.x,this.y,this.z)},l.default.Vector.prototype.add=function(e,t,r){return e instanceof l.default.Vector?(this.x+=e.x||0,this.y+=e.y||0,this.z+=e.z||0):e instanceof Array?(this.x+=e[0]||0,this.y+=e[1]||0,this.z+=e[2]||0):(this.x+=e||0,this.y+=t||0,this.z+=r||0),this};function p(e,t){return 0!==e&&(this.x=this.x%e),0!==t&&(this.y=this.y%t),this}function u(e,t,r){return 0!==e&&(this.x=this.x%e),0!==t&&(this.y=this.y%t),0!==r&&(this.z=this.z%r),this}l.default.Vector.prototype.rem=function(e,t,r){if(e instanceof l.default.Vector){if(Number.isFinite(e.x)&&Number.isFinite(e.y)&&Number.isFinite(e.z)){var n=parseFloat(e.x),a=parseFloat(e.y),o=parseFloat(e.z);u.call(this,n,a,o)}}else if(e instanceof Array)e.every(function(e){return Number.isFinite(e)})&&(2===e.length&&p.call(this,e[0],e[1]),3===e.length&&u.call(this,e[0],e[1],e[2]));else if(1===arguments.length){if(Number.isFinite(e)&&0!==e)return this.x=this.x%e,this.y=this.y%e,this.z=this.z%e,this}else if(2===arguments.length){var i=Array.prototype.slice.call(arguments);i.every(function(e){return Number.isFinite(e)})&&2===i.length&&p.call(this,i[0],i[1])}else if(3===arguments.length){var s=Array.prototype.slice.call(arguments);s.every(function(e){return Number.isFinite(e)})&&3===s.length&&u.call(this,s[0],s[1],s[2])}},l.default.Vector.prototype.sub=function(e,t,r){return e instanceof l.default.Vector?(this.x-=e.x||0,this.y-=e.y||0,this.z-=e.z||0):e instanceof Array?(this.x-=e[0]||0,this.y-=e[1]||0,this.z-=e[2]||0):(this.x-=e||0,this.y-=t||0,this.z-=r||0),this},l.default.Vector.prototype.mult=function(e,t,r){if(e instanceof l.default.Vector)return Number.isFinite(e.x)&&Number.isFinite(e.y)&&Number.isFinite(e.z)&&"number"==typeof e.x&&"number"==typeof e.y&&"number"==typeof e.z?(this.x*=e.x,this.y*=e.y,this.z*=e.z):console.warn("p5.Vector.prototype.mult:","x contains components that are either undefined or not finite numbers"),this;if(e instanceof Array)return e.every(function(e){return Number.isFinite(e)})&&e.every(function(e){return"number"==typeof e})?1===e.length?(this.x*=e[0],this.y*=e[0],this.z*=e[0]):2===e.length?(this.x*=e[0],this.y*=e[1]):3===e.length&&(this.x*=e[0],this.y*=e[1],this.z*=e[2]):console.warn("p5.Vector.prototype.mult:","x contains elements that are either undefined or not finite numbers"),this;var n=Array.prototype.slice.call(arguments);return n.every(function(e){return Number.isFinite(e)})&&n.every(function(e){return"number"==typeof e})?(1===arguments.length&&(this.x*=e,this.y*=e,this.z*=e),2===arguments.length&&(this.x*=e,this.y*=t),3===arguments.length&&(this.x*=e,this.y*=t,this.z*=r)):console.warn("p5.Vector.prototype.mult:","x, y, or z arguments are either undefined or not a finite number"),this},l.default.Vector.prototype.div=function(e,t,r){if(e instanceof l.default.Vector){if(Number.isFinite(e.x)&&Number.isFinite(e.y)&&Number.isFinite(e.z)&&"number"==typeof e.x&&"number"==typeof e.y&&"number"==typeof e.z){if(0===e.x||0===e.y||0===e.z)return console.warn("p5.Vector.prototype.div:","divide by 0"),this;this.x/=e.x,this.y/=e.y,this.z/=e.z}else console.warn("p5.Vector.prototype.div:","x contains components that are either undefined or not finite numbers");return this}if(e instanceof Array){if(e.every(function(e){return Number.isFinite(e)})&&e.every(function(e){return"number"==typeof e})){if(e.some(function(e){return 0===e}))return console.warn("p5.Vector.prototype.div:","divide by 0"),this;1===e.length?(this.x/=e[0],this.y/=e[0],this.z/=e[0]):2===e.length?(this.x/=e[0],this.y/=e[1]):3===e.length&&(this.x/=e[0],this.y/=e[1],this.z/=e[2])}else console.warn("p5.Vector.prototype.div:","x contains components that are either undefined or not finite numbers");return this}var n=Array.prototype.slice.call(arguments);if(n.every(function(e){return Number.isFinite(e)})&&n.every(function(e){return"number"==typeof e})){if(n.some(function(e){return 0===e}))return console.warn("p5.Vector.prototype.div:","divide by 0"),this;1===arguments.length&&(this.x/=e,this.y/=e,this.z/=e),2===arguments.length&&(this.x/=e,this.y/=t),3===arguments.length&&(this.x/=e,this.y/=t,this.z/=r)}else console.warn("p5.Vector.prototype.div:","x, y, or z arguments are either undefined or not a finite number");return this},l.default.Vector.prototype.mag=function(){return Math.sqrt(this.magSq())},l.default.Vector.prototype.magSq=function(){var e=this.x,t=this.y,r=this.z;return e*e+t*t+r*r},l.default.Vector.prototype.dot=function(e,t,r){return e instanceof l.default.Vector?this.dot(e.x,e.y,e.z):this.x*(e||0)+this.y*(t||0)+this.z*(r||0)},l.default.Vector.prototype.cross=function(e){var t=this.y*e.z-this.z*e.y,r=this.z*e.x-this.x*e.z,n=this.x*e.y-this.y*e.x;return this.p5?new l.default.Vector(this.p5,[t,r,n]):new l.default.Vector(t,r,n)},l.default.Vector.prototype.dist=function(e){return e.copy().sub(this).mag()},l.default.Vector.prototype.normalize=function(){var e=this.mag();return 0!==e&&this.mult(1/e),this},l.default.Vector.prototype.limit=function(e){var t=this.magSq();return e*e<t&&this.div(Math.sqrt(t)).mult(e),this},l.default.Vector.prototype.setMag=function(e){return this.normalize().mult(e)},l.default.Vector.prototype.heading=function(){var e=Math.atan2(this.y,this.x);return this.p5?this.p5._fromRadians(e):e},l.default.Vector.prototype.rotate=function(e){var t=this.heading()+e;this.p5&&(t=this.p5._toRadians(t));var r=this.mag();return this.x=Math.cos(t)*r,this.y=Math.sin(t)*r,this},l.default.Vector.prototype.angleBetween=function(e){var t,r=this.dot(e)/(this.mag()*e.mag());return t=Math.acos(Math.min(1,Math.max(-1,r))),t*=Math.sign(this.cross(e).z||1),this.p5&&(t=this.p5._fromRadians(t)),t},l.default.Vector.prototype.lerp=function(e,t,r,n){return e instanceof l.default.Vector?this.lerp(e.x,e.y,e.z,t):(this.x+=(e-this.x)*n||0,this.y+=(t-this.y)*n||0,this.z+=(r-this.z)*n||0,this)},l.default.Vector.prototype.reflect=function(e){return e.normalize(),this.sub(e.mult(2*this.dot(e)))},l.default.Vector.prototype.array=function(){return[this.x||0,this.y||0,this.z||0]},l.default.Vector.prototype.equals=function(e,t,r){var n,a,o;return o=e instanceof l.default.Vector?(n=e.x||0,a=e.y||0,e.z||0):e instanceof Array?(n=e[0]||0,a=e[1]||0,e[2]||0):(n=e||0,a=t||0,r||0),this.x===n&&this.y===a&&this.z===o},l.default.Vector.fromAngle=function(e,t){return void 0===t&&(t=1),new l.default.Vector(t*Math.cos(e),t*Math.sin(e),0)},l.default.Vector.fromAngles=function(e,t,r){void 0===r&&(r=1);var n=Math.cos(t),a=Math.sin(t),o=Math.cos(e),i=Math.sin(e);return new l.default.Vector(r*i*a,-r*o,r*i*n)},l.default.Vector.random2D=function(){return this.fromAngle(Math.random()*o.TWO_PI)},l.default.Vector.random3D=function(){var e=Math.random()*o.TWO_PI,t=2*Math.random()-1,r=Math.sqrt(1-t*t),n=r*Math.cos(e),a=r*Math.sin(e);return new l.default.Vector(n,a,t)},l.default.Vector.add=function(e,t,r){return r?r.set(e):(r=e.copy(),3===arguments.length&&l.default._friendlyError("The target parameter is undefined, it should be of type p5.Vector","p5.Vector.add")),r.add(t),r},l.default.Vector.rem=function(e,t){if(e instanceof l.default.Vector&&t instanceof l.default.Vector){var r=e.copy();return r.rem(t),r}},l.default.Vector.sub=function(e,t,r){return r?r.set(e):(r=e.copy(),3===arguments.length&&l.default._friendlyError("The target parameter is undefined, it should be of type p5.Vector","p5.Vector.sub")),r.sub(t),r},l.default.Vector.mult=function(e,t,r){return r?r.set(e):(r=e.copy(),3===arguments.length&&l.default._friendlyError("The target parameter is undefined, it should be of type p5.Vector","p5.Vector.mult")),r.mult(t),r},l.default.Vector.div=function(e,t,r){return r?r.set(e):(r=e.copy(),3===arguments.length&&l.default._friendlyError("The target parameter is undefined, it should be of type p5.Vector","p5.Vector.div")),r.div(t),r},l.default.Vector.dot=function(e,t){return e.dot(t)},l.default.Vector.cross=function(e,t){return e.cross(t)},l.default.Vector.dist=function(e,t){return e.dist(t)},l.default.Vector.lerp=function(e,t,r,n){return n?n.set(e):(n=e.copy(),4===arguments.length&&l.default._friendlyError("The target parameter is undefined, it should be of type p5.Vector","p5.Vector.lerp")),n.lerp(t,r),n},l.default.Vector.mag=function(e){var t=e.x,r=e.y,n=e.z,a=t*t+r*r+n*n;return Math.sqrt(a)};var a=l.default.Vector;r.default=a},{"../core/constants":22,"../core/main":32}],66:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n,a=(n=e("../core/main"))&&n.__esModule?n:{default:n};var o="_lcg_random_state",i=4294967296,s=0;a.default.prototype._lcg=function(e){return this[e]=(1664525*this[e]+1013904223)%i,this[e]/i},a.default.prototype._lcgSetSeed=function(e,t){this[e]=(null==t?Math.random()*i:t)>>>0},a.default.prototype.randomSeed=function(e){this._lcgSetSeed(o,e),this._gaussian_previous=!1},a.default.prototype.random=function(e,t){var r;if(a.default._validateParameters("random",arguments),r=null!=this[o]?this._lcg(o):Math.random(),void 0===e)return r;if(void 0===t)return e instanceof Array?e[Math.floor(r*e.length)]:r*e;if(t<e){var n=e;e=t,t=n}return r*(t-e)+e},a.default.prototype.randomGaussian=function(e,t){var r,n,a,o;if(this._gaussian_previous)r=s,this._gaussian_previous=!1;else{for(;1<=(o=(n=this.random(2)-1)*n+(a=this.random(2)-1)*a););r=n*(o=Math.sqrt(-2*Math.log(o)/o)),s=a*o,this._gaussian_previous=!0}return r*(t||1)+(e||0)};var l=a.default;r.default=l},{"../core/main":32}],67:[function(e,t,r){"use strict";function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n,a=(n=e("../core/main"))&&n.__esModule?n:{default:n},o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==i(e)&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=n?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(r,a,o):r[a]=e[a]}r.default=e,t&&t.set(e,r);return r}(e("../core/constants"));function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}a.default.prototype._angleMode=o.RADIANS,a.default.prototype.acos=function(e){return this._fromRadians(Math.acos(e))},a.default.prototype.asin=function(e){return this._fromRadians(Math.asin(e))},a.default.prototype.atan=function(e){return this._fromRadians(Math.atan(e))},a.default.prototype.atan2=function(e,t){return this._fromRadians(Math.atan2(e,t))},a.default.prototype.cos=function(e){return Math.cos(this._toRadians(e))},a.default.prototype.sin=function(e){return Math.sin(this._toRadians(e))},a.default.prototype.tan=function(e){return Math.tan(this._toRadians(e))},a.default.prototype.degrees=function(e){return e*o.RAD_TO_DEG},a.default.prototype.radians=function(e){return e*o.DEG_TO_RAD},a.default.prototype.angleMode=function(e){e!==o.DEGREES&&e!==o.RADIANS||(this._angleMode=e)},a.default.prototype._toRadians=function(e){return this._angleMode===o.DEGREES?e*o.DEG_TO_RAD:e},a.default.prototype._toDegrees=function(e){return this._angleMode===o.RADIANS?e*o.RAD_TO_DEG:e},a.default.prototype._fromRadians=function(e){return this._angleMode===o.DEGREES?e*o.RAD_TO_DEG:e};var l=a.default;r.default=l},{"../core/constants":22,"../core/main":32}],68:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n,a=(n=e("../core/main"))&&n.__esModule?n:{default:n};a.default.prototype.textAlign=function(e,t){var r;return a.default._validateParameters("textAlign",arguments),(r=this._renderer).textAlign.apply(r,arguments)},a.default.prototype.textLeading=function(e){var t;return a.default._validateParameters("textLeading",arguments),(t=this._renderer).textLeading.apply(t,arguments)},a.default.prototype.textSize=function(e){var t;return a.default._validateParameters("textSize",arguments),(t=this._renderer).textSize.apply(t,arguments)},a.default.prototype.textStyle=function(e){var t;return a.default._validateParameters("textStyle",arguments),(t=this._renderer).textStyle.apply(t,arguments)},a.default.prototype.textWidth=function(){for(var e,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return r[0]+="",a.default._validateParameters("textWidth",r),0===r[0].length?0:(e=this._renderer).textWidth.apply(e,r)},a.default.prototype.textAscent=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return a.default._validateParameters("textAscent",t),this._renderer.textAscent()},a.default.prototype.textDescent=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return a.default._validateParameters("textDescent",t),this._renderer.textDescent()},a.default.prototype._updateTextMetrics=function(){return this._renderer._updateTextMetrics()};var o=a.default;r.default=o},{"../core/main":32}],69:[function(e,t,r){"use strict";function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n,d=(n=e("../core/main"))&&n.__esModule?n:{default:n},a=l(e("../core/constants")),o=l(e("opentype.js"));function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function l(e){if(e&&e.__esModule)return e;if(null===e||"object"!==i(e)&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=n?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(r,a,o):r[a]=e[a]}return r.default=e,t&&t.set(e,r),r}e("../core/friendly_errors/validate_params"),e("../core/friendly_errors/file_errors"),e("../core/friendly_errors/fes_core"),d.default.prototype.loadFont=function(s,l,p){d.default._validateParameters("loadFont",arguments);var u=new d.default.Font(this),c=this;return o.load(s,function(e,t){if(e)return d.default._friendlyFileLoadError(4,s),void 0!==p?p(e):void console.error(e,s);u.font=t,void 0!==l&&l(u),c._decrementPreload();var r,n,a=s.split("\\").pop().split("/").pop(),o=a.lastIndexOf("."),i=o<1?null:a.substr(o+1);["ttf","otf","woff","woff2"].includes(i)&&(r=a.substr(0,o),(n=document.createElement("style")).appendChild(document.createTextNode("\n@font-face {\nfont-family: ".concat(r,";\nsrc: url(").concat(s,");\n}\n"))),document.head.appendChild(n))}),u},d.default.prototype.text=function(e,t,r,n,a){var o;return d.default._validateParameters("text",arguments),this._renderer._doFill||this._renderer._doStroke?(o=this._renderer).text.apply(o,arguments):this},d.default.prototype.textFont=function(e,t){if(d.default._validateParameters("textFont",arguments),arguments.length){if(!e)throw new Error("null font passed to textFont");return this._renderer._setProperty("_textFont",e),t&&(this._renderer._setProperty("_textSize",t),this._renderer._setProperty("_textLeading",t*a._DEFAULT_LEADMULT)),this._renderer._applyTextProperties()}return this._renderer._textFont};var p=d.default;r.default=p},{"../core/constants":22,"../core/friendly_errors/fes_core":24,"../core/friendly_errors/file_errors":25,"../core/friendly_errors/validate_params":27,"../core/main":32,"opentype.js":13}],70:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n,a=(n=e("../core/main"))&&n.__esModule?n:{default:n},x=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==h(e)&&"function"!=typeof e)return{default:e};var t=i();if(t&&t.has(e))return t.get(e);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=n?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(r,a,o):r[a]=e[a]}r.default=e,t&&t.set(e,r);return r}(e("../core/constants"));function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}function h(e){return(h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function m(e,t){for(var r=function(e,t){if("object"!==h(e))e=t;else for(var r in t)void 0===e[r]&&(e[r]=t[r]);return e}(t,{sampleFactor:.1,simplifyThreshold:0}),n=l(e,0,1),a=n/(n*r.sampleFactor),o=[],i=0;i<n;i+=a)o.push(l(e,i));return r.simplifyThreshold&&function(e){for(var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,r=0,n=e.length-1;3<e.length&&0<=n;--n)d(s(e,n-1),s(e,n),s(e,n+1),t)&&(e.splice(n%e.length,1),r++)}(o,r.simplifyThreshold),o}function f(e){for(var t,r=[],n=0;n<e.length;n++)"M"===e[n].type&&(t&&r.push(t),t=[]),t.push(o(e[n]));return r.push(t),r}function o(e){var t=[e.type];return"M"===e.type||"L"===e.type?t.push(e.x,e.y):"C"===e.type?t.push(e.x1,e.y1,e.x2,e.y2,e.x,e.y):"Q"===e.type&&t.push(e.x1,e.y1,e.x,e.y),t}function s(e,t){var r=e.length;return e[t<0?t%r+r:t%r]}function d(e,t,r,n){if(!n)return 0==(a=e,i=r,((o=t)[0]-a[0])*(i[1]-a[1])-(i[0]-a[0])*(o[1]-a[1]));var a,o,i;void 0===d.tmpPoint1&&(d.tmpPoint1=[],d.tmpPoint2=[]);var s=d.tmpPoint1,l=d.tmpPoint2;s.x=t.x-e.x,s.y=t.y-e.y,l.x=r.x-t.x,l.y=r.y-t.y;var p=s.x*l.x+s.y*l.y,u=Math.sqrt(s.x*s.x+s.y*s.y),c=Math.sqrt(l.x*l.x+l.y*l.y);return Math.acos(p/(u*c))<n}function c(e,t,r,n,a,o,i,s,l){var p=1-l,u=Math.pow(p,3),c=Math.pow(p,2),d=l*l,h=d*l,m=u*e+3*c*l*r+3*p*l*l*a+h*i,f=u*t+3*c*l*n+3*p*l*l*o+h*s,y=e+2*l*(r-e)+d*(a-2*r+e),g=t+2*l*(n-t)+d*(o-2*n+t),v=r+2*l*(a-r)+d*(i-2*a+r),b=n+2*l*(o-n)+d*(s-2*o+n),_=p*e+l*r,x=p*t+l*n,S=p*a+l*i,w=p*o+l*s,M=90-180*Math.atan2(y-v,g-b)/Math.PI;return(v<y||g<b)&&(M+=180),{x:m,y:f,m:{x:y,y:g},n:{x:v,y:b},start:{x:_,y:x},end:{x:S,y:w},alpha:M}}function y(e,t,r,n,a,o,i,s,l){return null==l?g(e,t,r,n,a,o,i,s):c(e,t,r,n,a,o,i,s,function(e,t,r,n,a,o,i,s,l){if(l<0||g(e,t,r,n,a,o,i,s)<l)return;var p,u=.5,c=1-u;p=g(e,t,r,n,a,o,i,s,c);for(;.01<Math.abs(p-l);)p=g(e,t,r,n,a,o,i,s,c+=(p<l?1:-1)*(u/=2));return c}(e,t,r,n,a,o,i,s,l))}function l(e,t,r){for(var n,a,o,i,s,l=0,p=0,u=(e=function(e,t){function r(e,t,r){var n,a;if(!e)return["C",t.x,t.y,t.x,t.y,t.x,t.y];switch(e[0]in{T:1,Q:1}||(t.qx=t.qy=null),e[0]){case"M":t.X=e[1],t.Y=e[2];break;case"A":e=["C"].concat(function e(t,r,n,a,o,i,s,l,p,u){var c=Math.PI;var d=120*c/180;var h;var m;var f;var y;var g=c/180*(+o||0);var v=[];var b;var _=function(e,t,r){var n=e*Math.cos(r)-t*Math.sin(r),a=e*Math.sin(r)+t*Math.cos(r);return{x:n,y:a}};if(u)h=u[0],m=u[1],f=u[2],y=u[3];else{b=_(t,r,-g),t=b.x,r=b.y,b=_(l,p,-g),l=b.x,p=b.y;var x=(t-l)/2,S=(r-p)/2,w=x*x/(n*n)+S*S/(a*a);1<w&&(w=Math.sqrt(w),n*=w,a*=w);var M=n*n,E=a*a,T=(i===s?-1:1)*Math.sqrt(Math.abs((M*E-M*S*S-E*x*x)/(M*S*S+E*x*x)));f=T*n*S/a+(t+l)/2,y=T*-a*x/n+(r+p)/2,h=Math.asin(((r-y)/a).toFixed(9)),m=Math.asin(((p-y)/a).toFixed(9)),(h=t<f?c-h:h)<0&&(h=2*c+h),(m=l<f?c-m:m)<0&&(m=2*c+m),s&&m<h&&(h-=2*c),!s&&h<m&&(m-=2*c)}var C=m-h;if(Math.abs(C)>d){var N=m,O=l,L=p;m=h+d*(s&&h<m?1:-1),l=f+n*Math.cos(m),p=y+a*Math.sin(m),v=e(l,p,n,a,o,0,s,O,L,[m,N,f,y])}C=m-h;var I=Math.cos(h),P=Math.sin(h),R=Math.cos(m),D=Math.sin(m),A=Math.tan(C/4),k=4/3*n*A,F=4/3*a*A,U=[t,r],B=[t+k*P,r-F*I],G=[l+k*D,p-F*R],j=[l,p];B[0]=2*U[0]-B[0];B[1]=2*U[1]-B[1];{if(u)return[B,G,j].concat(v);v=[B,G,j].concat(v).join().split(",");for(var V=[],z=0,H=v.length;z<H;z++)V[z]=z%2?_(v[z-1],v[z],g).y:_(v[z],v[z+1],g).x;return V}}.apply(0,[t.x,t.y].concat(e.slice(1))));break;case"S":a="C"===r||"S"===r?(n=2*t.x-t.bx,2*t.y-t.by):(n=t.x,t.y),e=["C",n,a].concat(e.slice(1));break;case"T":"Q"===r||"T"===r?(t.qx=2*t.x-t.qx,t.qy=2*t.y-t.qy):(t.qx=t.x,t.qy=t.y),e=["C"].concat(w(t.x,t.y,t.qx,t.qy,e[1],e[2]));break;case"Q":t.qx=e[1],t.qy=e[2],e=["C"].concat(w(t.x,t.y,e[1],e[2],e[3],e[4]));break;case"L":e=["C"].concat(S(t.x,t.y,e[1],e[2]));break;case"H":e=["C"].concat(S(t.x,t.y,e[1],t.y));break;case"V":e=["C"].concat(S(t.x,t.y,t.x,e[1]));break;case"Z":e=["C"].concat(S(t.x,t.y,t.X,t.Y))}return e}function n(e,t){if(7<e[t].length){e[t].shift();for(var r=e[t];r.length;)u[t]="A",s&&(c[t]="A"),e.splice(t++,0,["C"].concat(r.splice(0,6)));e.splice(t,1),o=Math.max(i.length,s&&s.length||0)}}function a(e,t,r,n,a){e&&t&&"M"===e[a][0]&&"M"!==t[a][0]&&(t.splice(a,0,["M",n.x,n.y]),r.bx=0,r.by=0,r.x=e[a][1],r.y=e[a][2],o=Math.max(i.length,s&&s.length||0))}var o,i=b(e),s=t&&b(t),l={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},p={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},u=[],c=[],d="",h="";o=Math.max(i.length,s&&s.length||0);for(var m=0;m<o;m++){i[m]&&(d=i[m][0]),"C"!==d&&(u[m]=d,m&&(h=u[m-1])),i[m]=r(i[m],l,h),"A"!==u[m]&&"C"===d&&(u[m]="C"),n(i,m),s&&(s[m]&&(d=s[m][0]),"C"!==d&&(c[m]=d,m&&(h=c[m-1])),s[m]=r(s[m],p,h),"A"!==c[m]&&"C"===d&&(c[m]="C"),n(s,m)),a(i,s,l,p,m),a(s,i,p,l,m);var f=i[m],y=s&&s[m],g=f.length,v=s&&y.length;l.x=f[g-2],l.y=f[g-1],l.bx=parseFloat(f[g-4])||l.x,l.by=parseFloat(f[g-3])||l.y,p.bx=s&&(parseFloat(y[v-4])||p.x),p.by=s&&(parseFloat(y[v-3])||p.y),p.x=s&&y[v-2],p.y=s&&y[v-1]}return s?[i,s]:i}(e)).length;p<u;p++){if("M"===(o=e[p])[0])n=+o[1],a=+o[2];else{if(t<l+(i=y(n,a,o[1],o[2],o[3],o[4],o[5],o[6]))&&!r)return{x:(s=y(n,a,o[1],o[2],o[3],o[4],o[5],o[6],t-l)).x,y:s.y,alpha:s.alpha};l+=i,n=+o[5],a=+o[6]}o.shift()+o}return(s=r?l:c(n,a,o[0],o[1],o[2],o[3],o[4],o[5],1)).alpha&&(s={x:s.x,y:s.y,alpha:s.alpha}),s}function b(e){var t,r=[],n=0,a=0,o=0,i=0,s=0;if(!e)return r;"M"===e[0][0]&&(o=n=+e[0][1],i=a=+e[0][2],s++,r[0]=["M",n,a]);for(var l,p,u=3===e.length&&"M"===e[0][0]&&"R"===e[1][0].toUpperCase()&&"Z"===e[2][0].toUpperCase(),c=s,d=e.length;c<d;c++){if(r.push(l=[]),(p=e[c])[0]!==String.prototype.toUpperCase.call(p[0]))switch(l[0]=String.prototype.toUpperCase.call(p[0]),l[0]){case"A":l[1]=p[1],l[2]=p[2],l[3]=p[3],l[4]=p[4],l[5]=p[5],l[6]=+(p[6]+n),l[7]=+(p[7]+a);break;case"V":l[1]=+p[1]+a;break;case"H":l[1]=+p[1]+n;break;case"R":for(var h=2,m=(t=[n,a].concat(p.slice(1))).length;h<m;h++)t[h]=+t[h]+n,t[++h]=+t[h]+a;r.pop(),r=r.concat(_(t,u));break;case"M":o=+p[1]+n,i=+p[2]+a;break;default:for(var f=1,y=p.length;f<y;f++)l[f]=+p[f]+(f%2?n:a)}else if("R"===p[0])t=[n,a].concat(p.slice(1)),r.pop(),r=r.concat(_(t,u)),l=["R"].concat(p.slice(-2));else for(var g=0,v=p.length;g<v;g++)l[g]=p[g];switch(l[0]){case"Z":n=o,a=i;break;case"H":n=l[1];break;case"V":a=l[1];break;case"M":o=l[l.length-2],i=l[l.length-1];break;default:n=l[l.length-2],a=l[l.length-1]}}return r}function _(e,t){for(var r=[],n=0,a=e.length;n<a-2*!t;n+=2){var o=[{x:+e[n-2],y:+e[n-1]},{x:+e[n],y:+e[n+1]},{x:+e[n+2],y:+e[n+3]},{x:+e[n+4],y:+e[n+5]}];t?n?a-4===n?o[3]={x:+e[0],y:+e[1]}:a-2===n&&(o[2]={x:+e[0],y:+e[1]},o[3]={x:+e[2],y:+e[3]}):o[0]={x:+e[a-2],y:+e[a-1]}:a-4===n?o[3]=o[2]:n||(o[0]={x:+e[n],y:+e[n+1]}),r.push(["C",(-o[0].x+6*o[1].x+o[2].x)/6,(-o[0].y+6*o[1].y+o[2].y)/6,(o[1].x+6*o[2].x-o[3].x)/6,(o[1].y+6*o[2].y-o[3].y)/6,o[2].x,o[2].y])}return r}function S(e,t,r,n){return[e,t,r,n,r,n]}function w(e,t,r,n,a,o){return[1/3*e+2/3*r,1/3*t+2/3*n,1/3*a+2/3*r,1/3*o+2/3*n,a,o]}function g(e,t,r,n,a,o,i,s,l){null==l&&(l=1);for(var p=(l=1<l?1:l<0?0:l)/2,u=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],c=0,d=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],h=0;h<12;h++){var m=p*u[h]+p,f=v(m,e,r,a,i),y=v(m,t,n,o,s),g=f*f+y*y;c+=d[h]*Math.sqrt(g)}return p*c}function v(e,t,r,n,a){return e*(e*(-3*t+9*r-9*n+3*a)+6*t-12*r+6*n)-3*t+3*r}a.default.Font=function(e){this.parent=e,this.cache={},this.font=void 0},a.default.Font.prototype.textBounds=function(e){var t,r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,a=3<arguments.length?arguments[3]:void 0,o=4<arguments.length?arguments[4]:void 0,i=o&&o.renderer&&o.renderer._pInst||this.parent,s=i._renderer.drawingContext;s.textAlign||x.LEFT,s.textBaseline||x.BASELINE;if(a=a||i._renderer._textSize,!t){var l,p,u=[],c=[],d=[];d[0]=[];var h=[],m=this._scale(a),f=i._renderer.textLeading(),y=0;this.font.forEachGlyph(e,r,n,a,o,function(e,t,r,n){var a=e.getMetrics();0===e.index||10===e.index?d[y+=1]=[]:(d[y].push(t+a.xMin*m),d[y].push(t+a.xMax*m),h.push(r+y*f+-a.yMin*m),h.push(r+y*f+-a.yMax*m))}),0<d[y].length&&(u[y]=Math.min.apply(null,d[y]),c[y]=Math.max.apply(null,d[y]));for(var g=0,v=0;v<=y;v++){u[v]=Math.min.apply(null,d[v]),c[v]=Math.max.apply(null,d[v]);var b=c[v]-u[v];g<b&&(g=b)}var _=Math.min.apply(null,u);t={x:_,y:l=Math.min.apply(null,h),h:Math.max.apply(null,h)-l,w:g,advance:_-r},p=this._handleAlignment(i._renderer,e,t.x,t.y,t.w+t.advance),t.x=p.x,t.y=p.y}return t},a.default.Font.prototype.textToPoints=function(e,t,r,n,a){var o,i=0,s=[],l=this._getGlyphs(e);n=n||this.parent._renderer._textSize;for(var p=0;p<l.length;p++){if(!(l[o=p].name&&"space"===l[o].name||e.length===l.length&&" "===e[o]||l[o].index&&3===l[o].index))for(var u=f(l[p].getPath(t,r,n).commands),c=0;c<u.length;c++)for(var d=m(u[c],a),h=0;h<d.length;h++)d[h].x+=i,s.push(d[h]);i+=l[p].advanceWidth*this._scale(n)}return s},a.default.Font.prototype._getGlyphs=function(e){return this.font.stringToGlyphs(e)},a.default.Font.prototype._getPath=function(e,t,r,n){var a=(n&&n.renderer&&n.renderer._pInst||this.parent)._renderer,o=this._handleAlignment(a,e,t,r);return this.font.getPath(e,o.x,o.y,a._textSize,n)},a.default.Font.prototype._getPathData=function(e,t,r,n){var a=3;return"string"==typeof e&&2<arguments.length?e=this._getPath(e,t,r,n):"object"===h(t)&&(n=t),n&&"number"==typeof n.decimals&&(a=n.decimals),e.toPathData(a)},a.default.Font.prototype._getSVG=function(e,t,r,n){var a=3;return"string"==typeof e&&2<arguments.length?e=this._getPath(e,t,r,n):"object"===h(t)&&(n=t),n&&("number"==typeof n.decimals&&(a=n.decimals),"number"==typeof n.strokeWidth&&(e.strokeWidth=n.strokeWidth),void 0!==n.fill&&(e.fill=n.fill),void 0!==n.stroke&&(e.stroke=n.stroke)),e.toSVG(a)},a.default.Font.prototype._renderPath=function(e,t,r,n){var a,o=n&&n.renderer||this.parent._renderer,i=o.drawingContext;a="object"===h(e)&&e.commands?e.commands:this._getPath(e,t,r,n).commands,i.beginPath();var s=!0,l=!1,p=void 0;try{for(var u,c=a[Symbol.iterator]();!(s=(u=c.next()).done);s=!0){var d=u.value;"M"===d.type?i.moveTo(d.x,d.y):"L"===d.type?i.lineTo(d.x,d.y):"C"===d.type?i.bezierCurveTo(d.x1,d.y1,d.x2,d.y2,d.x,d.y):"Q"===d.type?i.quadraticCurveTo(d.x1,d.y1,d.x,d.y):"Z"===d.type&&i.closePath()}}catch(e){l=!0,p=e}finally{try{s||null==c.return||c.return()}finally{if(l)throw p}}return o._doStroke&&o._strokeSet&&i.stroke(),o._doFill&&(o._fillSet||o._setFill(x._DEFAULT_TEXT_FILL),i.fill()),this},a.default.Font.prototype._textWidth=function(e,t){return this.font.getAdvanceWidth(e,t)},a.default.Font.prototype._textAscent=function(e){return this.font.ascender*this._scale(e)},a.default.Font.prototype._textDescent=function(e){return-this.font.descender*this._scale(e)},a.default.Font.prototype._scale=function(e){return 1/this.font.unitsPerEm*(e||this.parent._renderer._textSize)},a.default.Font.prototype._handleAlignment=function(e,t,r,n,a){var o=e._textSize;switch(void 0===a&&(a=this._textWidth(t,o)),e._textAlign){case x.CENTER:r-=a/2;break;case x.RIGHT:r-=a}switch(e._textBaseline){case x.TOP:n+=this._textAscent(o);break;case x.CENTER:n+=this._textAscent(o)/2;break;case x.BOTTOM:n-=this._textDescent(o)}return{x:r,y:n}};var p=a.default;r.default=p},{"../core/constants":22,"../core/main":32}],71:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n,a=(n=e("../core/main"))&&n.__esModule?n:{default:n};a.default.prototype.append=function(e,t){return e.push(t),e},a.default.prototype.arrayCopy=function(e,t,r,n,a){var o,i;e=void 0!==a?(i=Math.min(a,e.length),o=n,e.slice(t,i+t)):(i=void 0!==r?(i=r,Math.min(i,e.length)):e.length,o=0,r=t,e.slice(0,i)),Array.prototype.splice.apply(r,[o,i].concat(e))},a.default.prototype.concat=function(e,t){return e.concat(t)},a.default.prototype.reverse=function(e){return e.reverse()},a.default.prototype.shorten=function(e){return e.pop(),e},a.default.prototype.shuffle=function(e,t){for(var r,n,a=ArrayBuffer&&ArrayBuffer.isView&&ArrayBuffer.isView(e),o=(e=t||a?e:e.slice()).length;1<o;)r=this.random(0,1)*o|0,n=e[--o],e[o]=e[r],e[r]=n;return e},a.default.prototype.sort=function(e,t){var r=t?e.slice(0,Math.min(t,e.length)):e,n=t?e.slice(Math.min(t,e.length)):[];return(r="string"==typeof r[0]?r.sort():r.sort(function(e,t){return e-t})).concat(n)},a.default.prototype.splice=function(e,t,r){return Array.prototype.splice.apply(e,[r,0].concat(t)),e},a.default.prototype.subset=function(e,t,r){return void 0!==r?e.slice(t,t+r):e.slice(t,e.length)};var o=a.default;r.default=o},{"../core/main":32}],72:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n,a=(n=e("../core/main"))&&n.__esModule?n:{default:n};a.default.prototype.float=function(e){return e instanceof Array?e.map(parseFloat):parseFloat(e)},a.default.prototype.int=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:10;return e===1/0||"Infinity"===e?1/0:e===-1/0||"-Infinity"===e?-1/0:"string"==typeof e?parseInt(e,t):"number"==typeof e?0|e:"boolean"==typeof e?e?1:0:e instanceof Array?e.map(function(e){return a.default.prototype.int(e,t)}):void 0},a.default.prototype.str=function(e){return e instanceof Array?e.map(a.default.prototype.str):String(e)},a.default.prototype.boolean=function(e){return"number"==typeof e?0!==e:"string"==typeof e?"true"===e.toLowerCase():"boolean"==typeof e?e:e instanceof Array?e.map(a.default.prototype.boolean):void 0},a.default.prototype.byte=function(e){var t=a.default.prototype.int(e,10);return"number"==typeof t?(t+128)%256-128:t instanceof Array?t.map(a.default.prototype.byte):void 0},a.default.prototype.char=function(e){return"number"!=typeof e||isNaN(e)?e instanceof Array?e.map(a.default.prototype.char):"string"==typeof e?a.default.prototype.char(parseInt(e,10)):void 0:String.fromCharCode(e)},a.default.prototype.unchar=function(e){return"string"==typeof e&&1===e.length?e.charCodeAt(0):e instanceof Array?e.map(a.default.prototype.unchar):void 0},a.default.prototype.hex=function(e,t){if(t=null==t?t=8:t,e instanceof Array)return e.map(function(e){return a.default.prototype.hex(e,t)});if(e===1/0||e===-1/0)return(e===1/0?"F":"0").repeat(t);if("number"==typeof e){e<0&&(e=4294967295+e+1);for(var r=Number(e).toString(16).toUpperCase();r.length<t;)r="0".concat(r);return r.length>=t&&(r=r.substring(r.length-t,r.length)),r}},a.default.prototype.unhex=function(e){return e instanceof Array?e.map(a.default.prototype.unhex):parseInt("0x".concat(e),16)};var o=a.default;r.default=o},{"../core/main":32}],73:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n,i=(n=e("../core/main"))&&n.__esModule?n:{default:n};function a(e,t,r){var n=e<0,a=n?e.toString().substring(1):e.toString(),o=a.indexOf("."),i=-1!==o?a.substring(0,o):a,s=-1!==o?a.substring(o+1):"",l=n?"-":"";if(void 0!==r){var p="";(-1!==o||0<r-s.length)&&(p="."),s.length>r&&(s=s.substring(0,r));for(var u=0;u<t-i.length;u++)l+="0";l+=i,l+=p,l+=s;for(var c=0;c<r-s.length;c++)l+="0";return l}for(var d=0;d<Math.max(t-i.length,0);d++)l+="0";return l+=a}function o(e,t){var r=(e=e.toString()).indexOf("."),n=-1!==r?e.substring(r):"",a=-1!==r?e.substring(0,r):e;if(a=a.toString().replace(/\B(?=(\d{3})+(?!\d))/g,","),0===t)n="";else if(void 0!==t)if(t>n.length)for(var o=t-(n+=-1===r?".":"").length+1,i=0;i<o;i++)n+="0";else n=n.substring(0,t+1);return a+n}function s(e){return 0<parseFloat(e)?"+".concat(e.toString()):e.toString()}function l(e){return 0<=parseFloat(e)?" ".concat(e.toString()):e.toString()}e("../core/friendly_errors/validate_params"),e("../core/friendly_errors/file_errors"),e("../core/friendly_errors/fes_core"),i.default.prototype.join=function(e,t){return i.default._validateParameters("join",arguments),e.join(t)},i.default.prototype.match=function(e,t){return i.default._validateParameters("match",arguments),e.match(t)},i.default.prototype.matchAll=function(e,t){i.default._validateParameters("matchAll",arguments);for(var r=new RegExp(t,"g"),n=r.exec(e),a=[];null!==n;)a.push(n),n=r.exec(e);return a},i.default.prototype.nf=function(e,t,r){return i.default._validateParameters("nf",arguments),e instanceof Array?e.map(function(e){return a(e,t,r)}):"[object Arguments]"===Object.prototype.toString.call(e)?3===e.length?this.nf(e[0],e[1],e[2]):2===e.length?this.nf(e[0],e[1]):this.nf(e[0]):a(e,t,r)},i.default.prototype.nfc=function(e,t){return i.default._validateParameters("nfc",arguments),e instanceof Array?e.map(function(e){return o(e,t)}):o(e,t)},i.default.prototype.nfp=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];i.default._validateParameters("nfp",t);var n=i.default.prototype.nf.apply(this,t);return n instanceof Array?n.map(s):s(n)},i.default.prototype.nfs=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];i.default._validateParameters("nfs",t);var n=i.default.prototype.nf.apply(this,t);return n instanceof Array?n.map(l):l(n)},i.default.prototype.split=function(e,t){return i.default._validateParameters("split",arguments),e.split(t)},i.default.prototype.splitTokens=function(e,t){var r;if(i.default._validateParameters("splitTokens",arguments),void 0!==t){var n=t,a=/\]/g.exec(n),o=/\[/g.exec(n);r=o&&a?(n=n.slice(0,a.index)+n.slice(a.index+1),o=/\[/g.exec(n),n=n.slice(0,o.index)+n.slice(o.index+1),new RegExp("[\\[".concat(n,"\\]]"),"g")):a?(n=n.slice(0,a.index)+n.slice(a.index+1),new RegExp("[".concat(n,"\\]]"),"g")):o?(n=n.slice(0,o.index)+n.slice(o.index+1),new RegExp("[".concat(n,"\\[]"),"g")):new RegExp("[".concat(n,"]"),"g")}else r=/\s/g;return e.split(r).filter(function(e){return e})},i.default.prototype.trim=function(e){return i.default._validateParameters("trim",arguments),e instanceof Array?e.map(this.trim):e.trim()};var p=i.default;r.default=p},{"../core/friendly_errors/fes_core":24,"../core/friendly_errors/file_errors":25,"../core/friendly_errors/validate_params":27,"../core/main":32}],74:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n,a=(n=e("../core/main"))&&n.__esModule?n:{default:n};a.default.prototype.day=function(){return(new Date).getDate()},a.default.prototype.hour=function(){return(new Date).getHours()},a.default.prototype.minute=function(){return(new Date).getMinutes()},a.default.prototype.millis=function(){return-1===this._millisStart?0:window.performance.now()-this._millisStart},a.default.prototype.month=function(){return(new Date).getMonth()+1},a.default.prototype.second=function(){return(new Date).getSeconds()},a.default.prototype.year=function(){return(new Date).getFullYear()};var o=a.default;r.default=o},{"../core/main":32}],75:[function(e,t,r){"use strict";function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n,T=(n=e("../core/main"))&&n.__esModule?n:{default:n};e("./p5.Geometry");var h=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==i(e)&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=n?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(r,a,o):r[a]=e[a]}r.default=e,t&&t.set(e,r);return r}(e("../core/constants"));function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}T.default.prototype.plane=function(e,t,r,n){this._assert3d("plane"),T.default._validateParameters("plane",arguments),void 0===e&&(e=50),void 0===t&&(t=e),void 0===r&&(r=1),void 0===n&&(n=1);var a="plane|".concat(r,"|").concat(n);if(!this._renderer.geometryInHash(a)){var o=new T.default.Geometry(r,n,function(){for(var e,t,r,n=0;n<=this.detailY;n++){t=n/this.detailY;for(var a=0;a<=this.detailX;a++)e=a/this.detailX,r=new T.default.Vector(e-.5,t-.5,0),this.vertices.push(r),this.uvs.push(e,t)}});o.computeFaces().computeNormals(),r<=1&&n<=1?o._makeTriangleEdges()._edgesToVertices():this._renderer._doStroke&&console.log("Cannot draw stroke on plane objects with more than 1 detailX or 1 detailY"),this._renderer.createBuffers(a,o)}return this._renderer.drawBuffersScaled(a,e,t,1),this},T.default.prototype.box=function(e,t,r,n,a){this._assert3d("box"),T.default._validateParameters("box",arguments),void 0===e&&(e=50),void 0===t&&(t=e),void 0===r&&(r=t);var o=this._renderer.attributes&&this._renderer.attributes.perPixelLighting;void 0===n&&(n=o?1:4),void 0===a&&(a=o?1:4);var i="box|".concat(n,"|").concat(a);if(!this._renderer.geometryInHash(i)){var s=new T.default.Geometry(n,a,function(){var e=[[0,4,2,6],[1,3,5,7],[0,1,4,5],[2,6,3,7],[0,2,1,3],[4,5,6,7]];this.strokeIndices=[[0,1],[1,3],[3,2],[6,7],[8,9],[9,11],[14,15],[16,17],[17,19],[18,19],[20,21],[22,23]];for(var t=0;t<e.length;t++){for(var r=e[t],n=4*t,a=0;a<4;a++){var o=r[a],i=new T.default.Vector((2*(1&o)-1)/2,((2&o)-1)/2,((4&o)/2-1)/2);this.vertices.push(i),this.uvs.push(1&a,(2&a)/2)}this.faces.push([n,1+n,2+n]),this.faces.push([2+n,1+n,3+n])}});s.computeNormals(),n<=4&&a<=4?s._makeTriangleEdges()._edgesToVertices():this._renderer._doStroke&&console.log("Cannot draw stroke on box objects with more than 4 detailX or 4 detailY"),this._renderer.createBuffers(i,s)}return this._renderer.drawBuffersScaled(i,e,t,r),this},T.default.prototype.sphere=function(e,t,r){return this._assert3d("sphere"),T.default._validateParameters("sphere",arguments),void 0===e&&(e=50),void 0===t&&(t=24),void 0===r&&(r=16),this.ellipsoid(e,e,e,t,r),this};function l(e,t,r,n,a,o,i){e=e<=0?1:e,t=t<0?0:t,r=r<=0?e:r,n=n<3?3:n;var s,l,p,u=(o=void 0===o||o)?-2:0,c=(a=a<1?1:a)+((i=void 0===i?0!==t:i)?2:0),d=Math.atan2(e-t,r),h=Math.sin(d),m=Math.cos(d);for(s=u;s<=c;++s){var f=s/a,y=r*f,g=void 0;for(g=s<0?(f=y=0,e):a<s?(y=r,f=1,t):e+(t-e)*f,-2!==s&&s!==a+2||(g=0),y-=r/2,l=0;l<n;++l){var v=l/(n-1),b=2*Math.PI*v,_=Math.sin(b),x=Math.cos(b);this.vertices.push(new T.default.Vector(_*g,y,x*g));var S=void 0;S=s<0?new T.default.Vector(0,-1,0):a<s&&t?new T.default.Vector(0,1,0):new T.default.Vector(_*m,h,x*m),this.vertexNormals.push(S),this.uvs.push(v,f)}}var w=0;if(o){for(p=0;p<n;++p){var M=(p+1)%n;this.faces.push([w+p,w+n+M,w+n+p])}w+=2*n}for(s=0;s<a;++s){for(l=0;l<n;++l){var E=(l+1)%n;this.faces.push([w+l,w+E,w+n+E]),this.faces.push([w+l,w+n+E,w+n+l])}w+=n}if(i)for(w+=n,l=0;l<n;++l)this.faces.push([w+l,w+(l+1)%n,w+n])}T.default.prototype.cylinder=function(e,t,r,n,a,o){this._assert3d("cylinder"),T.default._validateParameters("cylinder",arguments),void 0===e&&(e=50),void 0===t&&(t=e),void 0===r&&(r=24),void 0===n&&(n=1),void 0===o&&(o=!0),void 0===a&&(a=!0);var i="cylinder|".concat(r,"|").concat(n,"|").concat(a,"|").concat(o);if(!this._renderer.geometryInHash(i)){var s=new T.default.Geometry(r,n);l.call(s,1,1,1,r,n,a,o),r<=24&&n<=16?s._makeTriangleEdges()._edgesToVertices():this._renderer._doStroke&&console.log("Cannot draw stroke on cylinder objects with more than 24 detailX or 16 detailY"),this._renderer.createBuffers(i,s)}return this._renderer.drawBuffersScaled(i,e,t,e),this},T.default.prototype.cone=function(e,t,r,n,a){this._assert3d("cone"),T.default._validateParameters("cone",arguments),void 0===e&&(e=50),void 0===t&&(t=e),void 0===r&&(r=24),void 0===n&&(n=1),void 0===a&&(a=!0);var o="cone|".concat(r,"|").concat(n,"|").concat(a);if(!this._renderer.geometryInHash(o)){var i=new T.default.Geometry(r,n);l.call(i,1,0,1,r,n,a,!1),r<=24&&n<=16?i._makeTriangleEdges()._edgesToVertices():this._renderer._doStroke&&console.log("Cannot draw stroke on cone objects with more than 24 detailX or 16 detailY"),this._renderer.createBuffers(o,i)}return this._renderer.drawBuffersScaled(o,e,t,e),this},T.default.prototype.ellipsoid=function(e,t,r,n,a){this._assert3d("ellipsoid"),T.default._validateParameters("ellipsoid",arguments),void 0===e&&(e=50),void 0===t&&(t=e),void 0===r&&(r=e),void 0===n&&(n=24),void 0===a&&(a=16);var o="ellipsoid|".concat(n,"|").concat(a);if(!this._renderer.geometryInHash(o)){var i=new T.default.Geometry(n,a,function(){for(var e=0;e<=this.detailY;e++)for(var t=e/this.detailY,r=Math.PI*t-Math.PI/2,n=Math.cos(r),a=Math.sin(r),o=0;o<=this.detailX;o++){var i=o/this.detailX,s=2*Math.PI*i,l=Math.cos(s),p=Math.sin(s),u=new T.default.Vector(n*p,a,n*l);this.vertices.push(u),this.vertexNormals.push(u),this.uvs.push(i,t)}});i.computeFaces(),n<=24&&a<=24?i._makeTriangleEdges()._edgesToVertices():this._renderer._doStroke&&console.log("Cannot draw stroke on ellipsoids with more than 24 detailX or 24 detailY"),this._renderer.createBuffers(o,i)}return this._renderer.drawBuffersScaled(o,e,t,r),this},T.default.prototype.torus=function(e,t,r,n){if(this._assert3d("torus"),T.default._validateParameters("torus",arguments),void 0===e)e=50;else if(!e)return;if(void 0===t)t=10;else if(!t)return;void 0===r&&(r=24),void 0===n&&(n=16);var h=(t/e).toPrecision(4),a="torus|".concat(h,"|").concat(r,"|").concat(n);if(!this._renderer.geometryInHash(a)){var o=new T.default.Geometry(r,n,function(){for(var e=0;e<=this.detailY;e++)for(var t=e/this.detailY,r=2*Math.PI*t,n=Math.cos(r),a=Math.sin(r),o=1+h*n,i=0;i<=this.detailX;i++){var s=i/this.detailX,l=2*Math.PI*s,p=Math.cos(l),u=Math.sin(l),c=new T.default.Vector(o*p,o*u,h*a),d=new T.default.Vector(n*p,n*u,a);this.vertices.push(c),this.vertexNormals.push(d),this.uvs.push(s,t)}});o.computeFaces(),r<=24&&n<=16?o._makeTriangleEdges()._edgesToVertices():this._renderer._doStroke&&console.log("Cannot draw strokes on torus object with more than 24 detailX or 16 detailY"),this._renderer.createBuffers(a,o)}return this._renderer.drawBuffersScaled(a,e,e,e),this},T.default.RendererGL.prototype.point=function(e,t,r){void 0===r&&(r=0);var n=[];return n.push(new T.default.Vector(e,t,r)),this._drawPoints(n,this.immediateMode.buffers.point),this},T.default.RendererGL.prototype.triangle=function(e){var t=e[0],r=e[1],n=e[2],a=e[3],o=e[4],i=e[5];if(!this.geometryInHash("tri")){var s=new T.default.Geometry(1,1,function(){var e=[];e.push(new T.default.Vector(0,0,0)),e.push(new T.default.Vector(0,1,0)),e.push(new T.default.Vector(1,0,0)),this.strokeIndices=[[0,1],[1,2],[2,0]],this.vertices=e,this.faces=[[0,1,2]],this.uvs=[0,0,0,1,1,1]});s._makeTriangleEdges()._edgesToVertices(),s.computeNormals(),this.createBuffers("tri",s)}var l=this.uMVMatrix.copy();try{var p=new T.default.Matrix([n-t,a-r,0,0,o-t,i-r,0,0,0,0,1,0,t,r,0,1]).mult(this.uMVMatrix);this.uMVMatrix=p,this.drawBuffers("tri")}finally{this.uMVMatrix=l}return this},T.default.RendererGL.prototype.ellipse=function(e){this.arc(e[0],e[1],e[2],e[3],0,h.TWO_PI,h.OPEN,e[4])},T.default.RendererGL.prototype.arc=function(e){var t,r=e,n=arguments[1],a=arguments[2],o=arguments[3],i=arguments[4],s=arguments[5],l=arguments[6],p=arguments[7]||25;if(t=Math.abs(s-i)>=h.TWO_PI?"".concat("ellipse","|").concat(p,"|"):"".concat("arc","|").concat(i,"|").concat(s,"|").concat(l,"|").concat(p,"|"),!this.geometryInHash(t)){var u=new T.default.Geometry(p,1,function(){if(this.strokeIndices=[],i.toFixed(10)!==s.toFixed(10)){l!==h.PIE&&void 0!==l||(this.vertices.push(new T.default.Vector(.5,.5,0)),this.uvs.push([.5,.5]));for(var e=0;e<=p;e++){var t=(s-i)*(e/p)+i,r=.5+Math.cos(t)/2,n=.5+Math.sin(t)/2;this.vertices.push(new T.default.Vector(r,n,0)),this.uvs.push([r,n]),e<p-1&&(this.faces.push([0,e+1,e+2]),this.strokeIndices.push([e+1,e+2]))}switch(l){case h.PIE:this.faces.push([0,this.vertices.length-2,this.vertices.length-1]),this.strokeIndices.push([0,1]),this.strokeIndices.push([this.vertices.length-2,this.vertices.length-1]),this.strokeIndices.push([0,this.vertices.length-1]);break;case h.CHORD:this.strokeIndices.push([0,1]),this.strokeIndices.push([0,this.vertices.length-1]);break;case h.OPEN:this.strokeIndices.push([0,1]);break;default:this.faces.push([0,this.vertices.length-2,this.vertices.length-1]),this.strokeIndices.push([this.vertices.length-2,this.vertices.length-1])}}});u.computeNormals(),p<=50?u._makeTriangleEdges()._edgesToVertices(u):this._renderer._doStroke&&console.log("Cannot stroke ${shape} with more than 50 detail"),this.createBuffers(t,u)}var c=this.uMVMatrix.copy();try{this.uMVMatrix.translate([r,n,0]),this.uMVMatrix.scale(a,o,1),this.drawBuffers(t)}finally{this.uMVMatrix=c}return this},T.default.RendererGL.prototype.rect=function(e){var t=this._pInst._glAttributes.perPixelLighting,r=e[0],n=e[1],a=e[2],o=e[3],i=e[4]||(t?1:24),s=e[5]||(t?1:16),l="rect|".concat(i,"|").concat(s);if(!this.geometryInHash(l)){var p=new T.default.Geometry(i,s,function(){for(var e=0;e<=this.detailY;e++)for(var t=e/this.detailY,r=0;r<=this.detailX;r++){var n=r/this.detailX,a=new T.default.Vector(n,t,0);this.vertices.push(a),this.uvs.push(n,t)}0<i&&0<s&&(this.strokeIndices=[[0,i],[i,(i+1)*(s+1)-1],[(i+1)*(s+1)-1,(i+1)*s],[(i+1)*s,0]])});p.computeFaces().computeNormals()._makeTriangleEdges()._edgesToVertices(),this.createBuffers(l,p)}var u=this.uMVMatrix.copy();try{this.uMVMatrix.translate([r,n,0]),this.uMVMatrix.scale(a,o,1),this.drawBuffers(l)}finally{this.uMVMatrix=u}return this},T.default.RendererGL.prototype.quad=function(e,t,r,n,a,o,i,s,l,p,u,c){var d="quad|".concat(e,"|").concat(t,"|").concat(r,"|").concat(n,"|").concat(a,"|").concat(o,"|").concat(i,"|").concat(s,"|").concat(l,"|").concat(p,"|").concat(u,"|").concat(c);if(!this.geometryInHash(d)){var h=new T.default.Geometry(2,2,function(){this.vertices.push(new T.default.Vector(e,t,r)),this.vertices.push(new T.default.Vector(n,a,o)),this.vertices.push(new T.default.Vector(i,s,l)),this.vertices.push(new T.default.Vector(p,u,c)),this.uvs.push(0,0,1,0,1,1,0,1),this.strokeIndices=[[0,1],[1,2],[2,3],[3,0]]});h.computeNormals()._makeTriangleEdges()._edgesToVertices(),h.faces=[[0,1,2],[2,3,0]],this.createBuffers(d,h)}return this.drawBuffers(d),this},T.default.RendererGL.prototype.bezier=function(e,t,r,n,a,o,i,s,l,p,u,c){8===arguments.length&&(u=s,p=i,s=o,i=a,a=n,n=r,r=o=l=c=0);var d=this._pInst._bezierDetail||20;this.beginShape();for(var h=0;h<=d;h++){var m=Math.pow(1-h/d,3),f=h/d*3*Math.pow(1-h/d,2),y=3*Math.pow(h/d,2)*(1-h/d),g=Math.pow(h/d,3);this.vertex(e*m+n*f+i*y+p*g,t*m+a*f+s*y+u*g,r*m+o*f+l*y+c*g)}return this.endShape(),this},T.default.RendererGL.prototype.curve=function(e,t,r,n,a,o,i,s,l,p,u,c){8===arguments.length&&(p=i,u=s,i=a,s=n,a=n=r,r=o=l=c=0);var d=this._pInst._curveDetail;this.beginShape();for(var h=0;h<=d;h++){var m=.5*Math.pow(h/d,3),f=.5*Math.pow(h/d,2),y=h/d*.5,g=m*(3*n-e-3*i+p)+f*(2*e-5*n+4*i-p)+y*(-e+i)+2*n*.5,v=m*(3*a-t-3*s+u)+f*(2*t-5*a+4*s-u)+y*(-t+s)+2*a*.5,b=m*(3*o-r-3*l+c)+f*(2*r-5*o+4*l-c)+y*(-r+l)+2*o*.5;this.vertex(g,v,b)}return this.endShape(),this},T.default.RendererGL.prototype.line=function(){return 6===arguments.length?(this.beginShape(h.LINES),this.vertex(arguments.length<=0?void 0:arguments[0],arguments.length<=1?void 0:arguments[1],arguments.length<=2?void 0:arguments[2]),this.vertex(arguments.length<=3?void 0:arguments[3],arguments.length<=4?void 0:arguments[4],arguments.length<=5?void 0:arguments[5]),this.endShape()):4===arguments.length&&(this.beginShape(h.LINES),this.vertex(arguments.length<=0?void 0:arguments[0],arguments.length<=1?void 0:arguments[1],0),this.vertex(arguments.length<=2?void 0:arguments[2],arguments.length<=3?void 0:arguments[3],0),this.endShape()),this},T.default.RendererGL.prototype.bezierVertex=function(){if(0===this.immediateMode._bezierVertex.length)throw Error("vertex() must be used once before calling bezierVertex()");var e,t,r,n,a,o=[],i=[],s=[],l=arguments.length;if((e=0)===this._lookUpTableBezier.length||this._lutBezierDetail!==this._pInst._curveDetail){this._lookUpTableBezier=[],this._lutBezierDetail=this._pInst._curveDetail;for(var p=1/this._lutBezierDetail,u=0,c=1,d=0;u<1;){if(e=parseFloat(u.toFixed(6)),this._lookUpTableBezier[d]=this._bezierCoefficients(e),c.toFixed(6)===p.toFixed(6)){e=parseFloat(c.toFixed(6))+parseFloat(u.toFixed(6)),++d,this._lookUpTableBezier[d]=this._bezierCoefficients(e);break}u+=p,c-=p,++d}}var h=this._lookUpTableBezier.length;if(6===l){for(this.isBezier=!0,o=[this.immediateMode._bezierVertex[0],arguments.length<=0?void 0:arguments[0],arguments.length<=2?void 0:arguments[2],arguments.length<=4?void 0:arguments[4]],i=[this.immediateMode._bezierVertex[1],arguments.length<=1?void 0:arguments[1],arguments.length<=3?void 0:arguments[3],arguments.length<=5?void 0:arguments[5]],a=0;a<h;a++)t=o[0]*this._lookUpTableBezier[a][0]+o[1]*this._lookUpTableBezier[a][1]+o[2]*this._lookUpTableBezier[a][2]+o[3]*this._lookUpTableBezier[a][3],r=i[0]*this._lookUpTableBezier[a][0]+i[1]*this._lookUpTableBezier[a][1]+i[2]*this._lookUpTableBezier[a][2]+i[3]*this._lookUpTableBezier[a][3],this.vertex(t,r);this.immediateMode._bezierVertex[0]=arguments.length<=4?void 0:arguments[4],this.immediateMode._bezierVertex[1]=arguments.length<=5?void 0:arguments[5]}else if(9===l){for(this.isBezier=!0,o=[this.immediateMode._bezierVertex[0],arguments.length<=0?void 0:arguments[0],arguments.length<=3?void 0:arguments[3],arguments.length<=6?void 0:arguments[6]],i=[this.immediateMode._bezierVertex[1],arguments.length<=1?void 0:arguments[1],arguments.length<=4?void 0:arguments[4],arguments.length<=7?void 0:arguments[7]],s=[this.immediateMode._bezierVertex[2],arguments.length<=2?void 0:arguments[2],arguments.length<=5?void 0:arguments[5],arguments.length<=8?void 0:arguments[8]],a=0;a<h;a++)t=o[0]*this._lookUpTableBezier[a][0]+o[1]*this._lookUpTableBezier[a][1]+o[2]*this._lookUpTableBezier[a][2]+o[3]*this._lookUpTableBezier[a][3],r=i[0]*this._lookUpTableBezier[a][0]+i[1]*this._lookUpTableBezier[a][1]+i[2]*this._lookUpTableBezier[a][2]+i[3]*this._lookUpTableBezier[a][3],n=s[0]*this._lookUpTableBezier[a][0]+s[1]*this._lookUpTableBezier[a][1]+s[2]*this._lookUpTableBezier[a][2]+s[3]*this._lookUpTableBezier[a][3],this.vertex(t,r,n);this.immediateMode._bezierVertex[0]=arguments.length<=6?void 0:arguments[6],this.immediateMode._bezierVertex[1]=arguments.length<=7?void 0:arguments[7],this.immediateMode._bezierVertex[2]=arguments.length<=8?void 0:arguments[8]}},T.default.RendererGL.prototype.quadraticVertex=function(){if(0===this.immediateMode._quadraticVertex.length)throw Error("vertex() must be used once before calling quadraticVertex()");var e,t,r,n,a,o=[],i=[],s=[],l=arguments.length;if((e=0)===this._lookUpTableQuadratic.length||this._lutQuadraticDetail!==this._pInst._curveDetail){this._lookUpTableQuadratic=[],this._lutQuadraticDetail=this._pInst._curveDetail;for(var p=1/this._lutQuadraticDetail,u=0,c=1,d=0;u<1;){if(e=parseFloat(u.toFixed(6)),this._lookUpTableQuadratic[d]=this._quadraticCoefficients(e),c.toFixed(6)===p.toFixed(6)){e=parseFloat(c.toFixed(6))+parseFloat(u.toFixed(6)),++d,this._lookUpTableQuadratic[d]=this._quadraticCoefficients(e);break}u+=p,c-=p,++d}}var h=this._lookUpTableQuadratic.length;if(4===l){for(this.isQuadratic=!0,o=[this.immediateMode._quadraticVertex[0],arguments.length<=0?void 0:arguments[0],arguments.length<=2?void 0:arguments[2]],i=[this.immediateMode._quadraticVertex[1],arguments.length<=1?void 0:arguments[1],arguments.length<=3?void 0:arguments[3]],a=0;a<h;a++)t=o[0]*this._lookUpTableQuadratic[a][0]+o[1]*this._lookUpTableQuadratic[a][1]+o[2]*this._lookUpTableQuadratic[a][2],r=i[0]*this._lookUpTableQuadratic[a][0]+i[1]*this._lookUpTableQuadratic[a][1]+i[2]*this._lookUpTableQuadratic[a][2],this.vertex(t,r);this.immediateMode._quadraticVertex[0]=arguments.length<=2?void 0:arguments[2],this.immediateMode._quadraticVertex[1]=arguments.length<=3?void 0:arguments[3]}else if(6===l){for(this.isQuadratic=!0,o=[this.immediateMode._quadraticVertex[0],arguments.length<=0?void 0:arguments[0],arguments.length<=3?void 0:arguments[3]],i=[this.immediateMode._quadraticVertex[1],arguments.length<=1?void 0:arguments[1],arguments.length<=4?void 0:arguments[4]],s=[this.immediateMode._quadraticVertex[2],arguments.length<=2?void 0:arguments[2],arguments.length<=5?void 0:arguments[5]],a=0;a<h;a++)t=o[0]*this._lookUpTableQuadratic[a][0]+o[1]*this._lookUpTableQuadratic[a][1]+o[2]*this._lookUpTableQuadratic[a][2],r=i[0]*this._lookUpTableQuadratic[a][0]+i[1]*this._lookUpTableQuadratic[a][1]+i[2]*this._lookUpTableQuadratic[a][2],n=s[0]*this._lookUpTableQuadratic[a][0]+s[1]*this._lookUpTableQuadratic[a][1]+s[2]*this._lookUpTableQuadratic[a][2],this.vertex(t,r,n);this.immediateMode._quadraticVertex[0]=arguments.length<=3?void 0:arguments[3],this.immediateMode._quadraticVertex[1]=arguments.length<=4?void 0:arguments[4],this.immediateMode._quadraticVertex[2]=arguments.length<=5?void 0:arguments[5]}},T.default.RendererGL.prototype.curveVertex=function(){var e,t,r,n,a,o=[],i=[],s=[],l=arguments.length;if((e=0)===this._lookUpTableBezier.length||this._lutBezierDetail!==this._pInst._curveDetail){this._lookUpTableBezier=[],this._lutBezierDetail=this._pInst._curveDetail;for(var p=1/this._lutBezierDetail,u=0,c=1,d=0;u<1;){if(e=parseFloat(u.toFixed(6)),this._lookUpTableBezier[d]=this._bezierCoefficients(e),c.toFixed(6)===p.toFixed(6)){e=parseFloat(c.toFixed(6))+parseFloat(u.toFixed(6)),++d,this._lookUpTableBezier[d]=this._bezierCoefficients(e);break}u+=p,c-=p,++d}}var h=this._lookUpTableBezier.length;if(2===l){if(this.immediateMode._curveVertex.push(arguments.length<=0?void 0:arguments[0]),this.immediateMode._curveVertex.push(arguments.length<=1?void 0:arguments[1]),8===this.immediateMode._curveVertex.length){for(this.isCurve=!0,o=this._bezierToCatmull([this.immediateMode._curveVertex[0],this.immediateMode._curveVertex[2],this.immediateMode._curveVertex[4],this.immediateMode._curveVertex[6]]),i=this._bezierToCatmull([this.immediateMode._curveVertex[1],this.immediateMode._curveVertex[3],this.immediateMode._curveVertex[5],this.immediateMode._curveVertex[7]]),a=0;a<h;a++)t=o[0]*this._lookUpTableBezier[a][0]+o[1]*this._lookUpTableBezier[a][1]+o[2]*this._lookUpTableBezier[a][2]+o[3]*this._lookUpTableBezier[a][3],r=i[0]*this._lookUpTableBezier[a][0]+i[1]*this._lookUpTableBezier[a][1]+i[2]*this._lookUpTableBezier[a][2]+i[3]*this._lookUpTableBezier[a][3],this.vertex(t,r);for(a=0;a<l;a++)this.immediateMode._curveVertex.shift()}}else if(3===l&&(this.immediateMode._curveVertex.push(arguments.length<=0?void 0:arguments[0]),this.immediateMode._curveVertex.push(arguments.length<=1?void 0:arguments[1]),this.immediateMode._curveVertex.push(arguments.length<=2?void 0:arguments[2]),12===this.immediateMode._curveVertex.length)){for(this.isCurve=!0,o=this._bezierToCatmull([this.immediateMode._curveVertex[0],this.immediateMode._curveVertex[3],this.immediateMode._curveVertex[6],this.immediateMode._curveVertex[9]]),i=this._bezierToCatmull([this.immediateMode._curveVertex[1],this.immediateMode._curveVertex[4],this.immediateMode._curveVertex[7],this.immediateMode._curveVertex[10]]),s=this._bezierToCatmull([this.immediateMode._curveVertex[2],this.immediateMode._curveVertex[5],this.immediateMode._curveVertex[8],this.immediateMode._curveVertex[11]]),a=0;a<h;a++)t=o[0]*this._lookUpTableBezier[a][0]+o[1]*this._lookUpTableBezier[a][1]+o[2]*this._lookUpTableBezier[a][2]+o[3]*this._lookUpTableBezier[a][3],r=i[0]*this._lookUpTableBezier[a][0]+i[1]*this._lookUpTableBezier[a][1]+i[2]*this._lookUpTableBezier[a][2]+i[3]*this._lookUpTableBezier[a][3],n=s[0]*this._lookUpTableBezier[a][0]+s[1]*this._lookUpTableBezier[a][1]+s[2]*this._lookUpTableBezier[a][2]+s[3]*this._lookUpTableBezier[a][3],this.vertex(t,r,n);for(a=0;a<l;a++)this.immediateMode._curveVertex.shift()}},T.default.RendererGL.prototype.image=function(e,t,r,n,a,o,i,s,l){this._isErasing&&this.blendMode(this._cachedBlendMode),this._pInst.push(),this._pInst.noLights(),this._pInst.texture(e),this._pInst.textureMode(h.NORMAL);var p=0;t<=e.width&&(p=t/e.width);var u=1;t+n<=e.width&&(u=(t+n)/e.width);var c=0;r<=e.height&&(c=r/e.height);var d=1;r+a<=e.height&&(d=(r+a)/e.height),this.beginShape(),this.vertex(o,i,0,p,c),this.vertex(o+s,i,0,u,c),this.vertex(o+s,i+l,0,u,d),this.vertex(o,i+l,0,p,d),this.endShape(h.CLOSE),this._pInst.pop(),this._isErasing&&this.blendMode(h.REMOVE)};var a=T.default;r.default=a},{"../core/constants":22,"../core/main":32,"./p5.Geometry":81}],76:[function(e,t,r){"use strict";function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n,d=(n=e("../core/main"))&&n.__esModule?n:{default:n},a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==i(e)&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=n?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(r,a,o):r[a]=e[a]}r.default=e,t&&t.set(e,r);return r}(e("../core/constants"));function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}d.default.prototype.orbitControl=function(e,t,r){if(this._assert3d("orbitControl"),d.default._validateParameters("orbitControl",arguments),this.mouseX<this.width&&0<this.mouseX&&this.mouseY<this.height&&0<this.mouseY){var n=this._renderer._curCamera;void 0===e&&(e=1),void 0===t&&(t=e),void 0===r&&(r=.5),!0!==this.contextMenuDisabled&&(this.canvas.oncontextmenu=function(){return!1},this._setProperty("contextMenuDisabled",!0)),!0!==this.wheelDefaultDisabled&&(this.canvas.onwheel=function(){return!1},this._setProperty("wheelDefaultDisabled",!0));var a=this.height<this.width?this.height:this.width;if(this._mouseWheelDeltaY!==this._pmouseWheelDeltaY&&(0<this._mouseWheelDeltaY?this._renderer._curCamera._orbit(0,0,r*a):this._renderer._curCamera._orbit(0,0,-r*a)),this.mouseIsPressed)if(this.mouseButton===this.LEFT){var o=-e*(this.mouseX-this.pmouseX)/a,i=t*(this.mouseY-this.pmouseY)/a;this._renderer._curCamera._orbit(o,i,0)}else if(this.mouseButton===this.RIGHT){var s=n._getLocalAxes(),l=Math.sqrt(s.x[0]*s.x[0]+s.x[2]*s.x[2]);0!==l&&(s.x[0]/=l,s.x[2]/=l);var p=Math.sqrt(s.y[0]*s.y[0]+s.y[2]*s.y[2]);0!==p&&(s.y[0]/=p,s.y[2]/=p);var u=-1*e*(this.mouseX-this.pmouseX),c=-1*t*(this.mouseY-this.pmouseY);n.setPosition(n.eyeX+u*s.x[0]+c*s.z[0],n.eyeY,n.eyeZ+u*s.x[2]+c*s.z[2])}return this}},d.default.prototype.debugMode=function(){this._assert3d("debugMode");for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];d.default._validateParameters("debugMode",t);for(var n=this._registeredMethods.post.length-1;0<=n;n--)this._registeredMethods.post[n].toString()!==this._grid().toString()&&this._registeredMethods.post[n].toString()!==this._axesIcon().toString()||this._registeredMethods.post.splice(n,1);t[0]===a.GRID?this.registerMethod("post",this._grid.call(this,t[1],t[2],t[3],t[4],t[5])):t[0]===a.AXES?this.registerMethod("post",this._axesIcon.call(this,t[1],t[2],t[3],t[4])):(this.registerMethod("post",this._grid.call(this,t[0],t[1],t[2],t[3],t[4])),this.registerMethod("post",this._axesIcon.call(this,t[5],t[6],t[7],t[8])))},d.default.prototype.noDebugMode=function(){this._assert3d("noDebugMode");for(var e=this._registeredMethods.post.length-1;0<=e;e--)this._registeredMethods.post[e].toString()!==this._grid().toString()&&this._registeredMethods.post[e].toString()!==this._axesIcon().toString()||this._registeredMethods.post.splice(e,1)},d.default.prototype._grid=function(e,r,n,a,o){void 0===e&&(e=this.width/2),void 0===r&&(r=Math.round(e/30)<4?4:Math.round(e/30)),void 0===n&&(n=0),void 0===a&&(a=0),void 0===o&&(o=0);var i=e/r,s=e/2;return function(){this.push(),this.stroke(255*this._renderer.curStrokeColor[0],255*this._renderer.curStrokeColor[1],255*this._renderer.curStrokeColor[2]),this._renderer.uMVMatrix.set(this._renderer._curCamera.cameraMatrix.mat4[0],this._renderer._curCamera.cameraMatrix.mat4[1],this._renderer._curCamera.cameraMatrix.mat4[2],this._renderer._curCamera.cameraMatrix.mat4[3],this._renderer._curCamera.cameraMatrix.mat4[4],this._renderer._curCamera.cameraMatrix.mat4[5],this._renderer._curCamera.cameraMatrix.mat4[6],this._renderer._curCamera.cameraMatrix.mat4[7],this._renderer._curCamera.cameraMatrix.mat4[8],this._renderer._curCamera.cameraMatrix.mat4[9],this._renderer._curCamera.cameraMatrix.mat4[10],this._renderer._curCamera.cameraMatrix.mat4[11],this._renderer._curCamera.cameraMatrix.mat4[12],this._renderer._curCamera.cameraMatrix.mat4[13],this._renderer._curCamera.cameraMatrix.mat4[14],this._renderer._curCamera.cameraMatrix.mat4[15]);for(var e=0;e<=r;e++)this.beginShape(this.LINES),this.vertex(-s+n,a,e*i-s+o),this.vertex(+s+n,a,e*i-s+o),this.endShape();for(var t=0;t<=r;t++)this.beginShape(this.LINES),this.vertex(t*i-s+n,a,-s+o),this.vertex(t*i-s+n,a,+s+o),this.endShape();this.pop()}},d.default.prototype._axesIcon=function(e,t,r,n){return void 0===e&&(e=40<this.width/20?this.width/20:40),void 0===t&&(t=-this.width/4),void 0===r&&(r=t),void 0===n&&(n=t),function(){this.push(),this._renderer.uMVMatrix.set(this._renderer._curCamera.cameraMatrix.mat4[0],this._renderer._curCamera.cameraMatrix.mat4[1],this._renderer._curCamera.cameraMatrix.mat4[2],this._renderer._curCamera.cameraMatrix.mat4[3],this._renderer._curCamera.cameraMatrix.mat4[4],this._renderer._curCamera.cameraMatrix.mat4[5],this._renderer._curCamera.cameraMatrix.mat4[6],this._renderer._curCamera.cameraMatrix.mat4[7],this._renderer._curCamera.cameraMatrix.mat4[8],this._renderer._curCamera.cameraMatrix.mat4[9],this._renderer._curCamera.cameraMatrix.mat4[10],this._renderer._curCamera.cameraMatrix.mat4[11],this._renderer._curCamera.cameraMatrix.mat4[12],this._renderer._curCamera.cameraMatrix.mat4[13],this._renderer._curCamera.cameraMatrix.mat4[14],this._renderer._curCamera.cameraMatrix.mat4[15]),this.strokeWeight(2),this.stroke(255,0,0),this.beginShape(this.LINES),this.vertex(t,r,n),this.vertex(t+e,r,n),this.endShape(),this.stroke(0,255,0),this.beginShape(this.LINES),this.vertex(t,r,n),this.vertex(t,r+e,n),this.endShape(),this.stroke(0,0,255),this.beginShape(this.LINES),this.vertex(t,r,n),this.vertex(t,r,n+e),this.endShape(),this.pop()}};var o=d.default;r.default=o},{"../core/constants":22,"../core/main":32}],77:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n,f=(n=e("../core/main"))&&n.__esModule?n:{default:n};f.default.prototype.ambientLight=function(e,t,r,n){this._assert3d("ambientLight"),f.default._validateParameters("ambientLight",arguments);var a=this.color.apply(this,arguments);return this._renderer.ambientLightColors.push(a._array[0],a._array[1],a._array[2]),this._renderer._enableLighting=!0,this},f.default.prototype.specularColor=function(e,t,r){this._assert3d("specularColor"),f.default._validateParameters("specularColor",arguments);var n=this.color.apply(this,arguments);return this._renderer.specularColors=[n._array[0],n._array[1],n._array[2]],this},f.default.prototype.directionalLight=function(e,t,r,n,a,o){var i,s,l,p;this._assert3d("directionalLight"),f.default._validateParameters("directionalLight",arguments),i=e instanceof f.default.Color?e:this.color(e,t,r);var u=arguments[arguments.length-1];p="number"==typeof u?(s=arguments[arguments.length-3],l=arguments[arguments.length-2],arguments[arguments.length-1]):(s=u.x,l=u.y,u.z);var c=Math.sqrt(s*s+l*l+p*p);return this._renderer.directionalLightDirections.push(s/c,l/c,p/c),this._renderer.directionalLightDiffuseColors.push(i._array[0],i._array[1],i._array[2]),Array.prototype.push.apply(this._renderer.directionalLightSpecularColors,this._renderer.specularColors),this._renderer._enableLighting=!0,this},f.default.prototype.pointLight=function(e,t,r,n,a,o){var i,s,l,p;this._assert3d("pointLight"),f.default._validateParameters("pointLight",arguments),i=e instanceof f.default.Color?e:this.color(e,t,r);var u=arguments[arguments.length-1];return p="number"==typeof u?(s=arguments[arguments.length-3],l=arguments[arguments.length-2],arguments[arguments.length-1]):(s=u.x,l=u.y,u.z),this._renderer.pointLightPositions.push(s,l,p),this._renderer.pointLightDiffuseColors.push(i._array[0],i._array[1],i._array[2]),Array.prototype.push.apply(this._renderer.pointLightSpecularColors,this._renderer.specularColors),this._renderer._enableLighting=!0,this},f.default.prototype.lights=function(){return this._assert3d("lights"),this.ambientLight(128,128,128),this.directionalLight(128,128,128,0,0,-1),this},f.default.prototype.lightFalloff=function(e,t,r){return this._assert3d("lightFalloff"),f.default._validateParameters("lightFalloff",arguments),e<0&&(e=0,console.warn("Value of constant argument in lightFalloff() should be never be negative. Set to 0.")),t<0&&(t=0,console.warn("Value of linear argument in lightFalloff() should be never be negative. Set to 0.")),r<0&&(r=0,console.warn("Value of quadratic argument in lightFalloff() should be never be negative. Set to 0.")),0===e&&0===t&&0===r&&(e=1,console.warn("Either one of the three arguments in lightFalloff() should be greater than zero. Set constant argument to 1.")),this._renderer.constantAttenuation=e,this._renderer.linearAttenuation=t,this._renderer.quadraticAttenuation=r,this},f.default.prototype.spotLight=function(e,t,r,n,a,o,i,s,l,p,u){var c,d,h;this._assert3d("spotLight"),f.default._validateParameters("spotLight",arguments);var m=arguments.length;switch(m){case 11:case 10:c=this.color(e,t,r),d=new f.default.Vector(n,a,o),h=new f.default.Vector(i,s,l);break;case 9:e instanceof f.default.Color?(c=e,d=new f.default.Vector(t,r,n),h=new f.default.Vector(a,o,i),p=s,u=l):n instanceof f.default.Vector?(c=this.color(e,t,r),d=n,h=new f.default.Vector(a,o,i),p=s,u=l):i instanceof f.default.Vector?(c=this.color(e,t,r),d=new f.default.Vector(n,a,o),h=i,p=s,u=l):(c=this.color(e,t,r),d=new f.default.Vector(n,a,o),h=new f.default.Vector(i,s,l));break;case 8:p=(h=e instanceof f.default.Color?(c=e,d=new f.default.Vector(t,r,n),new f.default.Vector(a,o,i)):n instanceof f.default.Vector?(c=this.color(e,t,r),d=n,new f.default.Vector(a,o,i)):(c=this.color(e,t,r),d=new f.default.Vector(n,a,o),i),s);break;case 7:e instanceof f.default.Color&&t instanceof f.default.Vector?(c=e,d=t,h=new f.default.Vector(r,n,a),p=o,u=i):e instanceof f.default.Color&&a instanceof f.default.Vector?(c=e,d=new f.default.Vector(t,r,n),h=a,p=o,u=i):n instanceof f.default.Vector&&a instanceof f.default.Vector?(c=this.color(e,t,r),d=n,h=a,p=o,u=i):h=e instanceof f.default.Color?(c=e,d=new f.default.Vector(t,r,n),new f.default.Vector(a,o,i)):n instanceof f.default.Vector?(c=this.color(e,t,r),d=n,new f.default.Vector(a,o,i)):(c=this.color(e,t,r),d=new f.default.Vector(n,a,o),i);break;case 6:n instanceof f.default.Vector&&a instanceof f.default.Vector?(c=this.color(e,t,r),d=n,h=a,p=o):e instanceof f.default.Color&&a instanceof f.default.Vector?(c=e,d=new f.default.Vector(t,r,n),h=a,p=o):e instanceof f.default.Color&&t instanceof f.default.Vector&&(c=e,d=t,h=new f.default.Vector(r,n,a),p=o);break;case 5:e instanceof f.default.Color&&t instanceof f.default.Vector&&r instanceof f.default.Vector?(c=e,d=t,h=r,p=n,u=a):n instanceof f.default.Vector&&a instanceof f.default.Vector?(c=this.color(e,t,r),d=n,h=a):e instanceof f.default.Color&&a instanceof f.default.Vector?(c=e,d=new f.default.Vector(t,r,n),h=a):e instanceof f.default.Color&&t instanceof f.default.Vector&&(c=e,d=t,h=new f.default.Vector(r,n,a));break;case 4:c=e,d=t,h=r,p=n;break;case 3:c=e,d=t,h=r;break;default:return console.warn("Sorry, input for spotlight() is not in prescribed format. Too ".concat(m<3?"few":"many"," arguments were provided")),this}return this._renderer.spotLightDiffuseColors.push(c._array[0],c._array[1],c._array[2]),Array.prototype.push.apply(this._renderer.spotLightSpecularColors,this._renderer.specularColors),this._renderer.spotLightPositions.push(d.x,d.y,d.z),h.normalize(),this._renderer.spotLightDirections.push(h.x,h.y,h.z),void 0===p&&(p=Math.PI/3),void 0!==u&&u<1?(u=1,console.warn("Value of concentration needs to be greater than 1. Setting it to 1")):void 0===u&&(u=100),p=this._renderer._pInst._toRadians(p),this._renderer.spotLightAngle.push(Math.cos(p)),this._renderer.spotLightConc.push(u),this._renderer._enableLighting=!0,this},f.default.prototype.noLights=function(){return this._assert3d("noLights"),f.default._validateParameters("noLights",arguments),this._renderer._enableLighting=!1,this._renderer.ambientLightColors.length=0,this._renderer.specularColors=[1,1,1],this._renderer.directionalLightDirections.length=0,this._renderer.directionalLightDiffuseColors.length=0,this._renderer.directionalLightSpecularColors.length=0,this._renderer.pointLightPositions.length=0,this._renderer.pointLightDiffuseColors.length=0,this._renderer.pointLightSpecularColors.length=0,this._renderer.spotLightPositions.length=0,this._renderer.spotLightDirections.length=0,this._renderer.spotLightDiffuseColors.length=0,this._renderer.spotLightSpecularColors.length=0,this._renderer.spotLightAngle.length=0,this._renderer.spotLightConc.length=0,this._renderer.constantAttenuation=1,this._renderer.linearAttenuation=0,this._renderer.quadraticAttenuation=0,this._renderer._useShininess=1,this};var a=f.default;r.default=a},{"../core/main":32}],78:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n,w=(n=e("../core/main"))&&n.__esModule?n:{default:n};function s(e,t,r){for(var n=0,a=e.length;n<a;n++)if(e[n]!==t.getUint8(r+n,!1))return!1;return!0}e("./p5.Geometry"),w.default.prototype.loadModel=function(e){var t,r,n;w.default._validateParameters("loadModel",arguments);var a=e.slice(-4);"boolean"==typeof arguments[1]?(t=arguments[1],r=arguments[2],n=arguments[3],void 0!==arguments[4]&&(a=arguments[4])):(t=!1,r=arguments[1],n=arguments[2],void 0!==arguments[3]&&(a=arguments[3]));var o=new w.default.Geometry;o.gid="".concat(e,"|").concat(t);var i=this;return a.match(/\.stl$/i)?this.httpDo(e,"GET","arrayBuffer",function(e){!function(e,t){if(function(e){for(var t=new DataView(e),r=[115,111,108,105,100],n=0;n<5;n++)if(s(r,t,n))return!1;return!0}(t))!function(e,t){for(var r,n,a,o,i,s,l,p=new DataView(t),u=p.getUint32(80,!0),c=!1,d=0;d<70;d++)1129270351===p.getUint32(d,!1)&&82===p.getUint8(d+4)&&61===p.getUint8(d+5)&&(c=!0,o=[],i=p.getUint8(d+6)/255,s=p.getUint8(d+7)/255,l=p.getUint8(d+8)/255);for(var h=0;h<u;h++){var m=84+50*h,f=p.getFloat32(m,!0),y=p.getFloat32(4+m,!0),g=p.getFloat32(8+m,!0);if(c){var v=p.getUint16(48+m,!0);a=0==(32768&v)?(r=(31&v)/31,n=(v>>5&31)/31,(v>>10&31)/31):(r=i,n=s,l)}for(var b=new w.default.Vector(f,y,g),_=1;_<=3;_++){var x=m+12*_,S=new w.default.Vector(p.getFloat32(x,!0),p.getFloat32(4+x,!0),p.getFloat32(8+x,!0));e.vertices.push(S),e.vertexNormals.push(b),c&&o.push(r,n,a)}e.faces.push([3*h,3*h+1,3*h+2]),e.uvs.push([0,0],[0,0],[0,0])}}(e,t);else{var r=new DataView(t);if(!("TextDecoder"in window))return console.warn("Sorry, ASCII STL loading only works in browsers that support TextDecoder (https://caniuse.com/#feat=textencoder)");var n=new TextDecoder("utf-8").decode(r).split("\n");!function(e,t){for(var r,n,a="",o=[],i=0;i<t.length;++i){for(var s=t[i].trim(),l=s.split(" "),p=0;p<l.length;++p)""===l[p]&&l.splice(p,1);if(0!==l.length)switch(a){case"":if("solid"!==l[0])return console.error(s),console.error('Invalid state "'.concat(l[0],'", should be "solid"'));a="solid";break;case"solid":if("facet"!==l[0]||"normal"!==l[1])return console.error(s),console.error('Invalid state "'.concat(l[0],'", should be "facet normal"'));r=new w.default.Vector(parseFloat(l[2]),parseFloat(l[3]),parseFloat(l[4])),e.vertexNormals.push(r,r,r),a="facet normal";break;case"facet normal":if("outer"!==l[0]||"loop"!==l[1])return console.error(s),console.error('Invalid state "'.concat(l[0],'", should be "outer loop"'));a="vertex";break;case"vertex":if("vertex"===l[0])n=new w.default.Vector(parseFloat(l[1]),parseFloat(l[2]),parseFloat(l[3])),e.vertices.push(n),e.uvs.push([0,0]),o.push(e.vertices.indexOf(n));else{if("endloop"!==l[0])return console.error(s),console.error('Invalid state "'.concat(l[0],'", should be "vertex" or "endloop"'));e.faces.push(o),o=[],a="endloop"}break;case"endloop":if("endfacet"!==l[0])return console.error(s),console.error('Invalid state "'.concat(l[0],'", should be "endfacet"'));a="endfacet";break;case"endfacet":if("endsolid"!==l[0]){if("facet"!==l[0]||"normal"!==l[1])return console.error(s),console.error('Invalid state "'.concat(l[0],'", should be "endsolid" or "facet normal"'));r=new w.default.Vector(parseFloat(l[2]),parseFloat(l[3]),parseFloat(l[4])),e.vertexNormals.push(r,r,r),a="facet normal"}break;default:console.error('Invalid state "'.concat(a,'"'))}}}(e,n)}}(o,e),t&&o.normalize(),i._decrementPreload(),"function"==typeof r&&r(o)},n):a.match(/\.obj$/i)?this.loadStrings(e,function(e){!function(e,t){for(var r={v:[],vt:[],vn:[]},n={},a=0;a<t.length;++a){var o=t[a].trim().split(/\b\s+/);if(0<o.length)if("v"===o[0]||"vn"===o[0]){var i=new w.default.Vector(parseFloat(o[1]),parseFloat(o[2]),parseFloat(o[3]));r[o[0]].push(i)}else if("vt"===o[0]){var s=[parseFloat(o[1]),parseFloat(o[2])];r[o[0]].push(s)}else if("f"===o[0])for(var l=3;l<o.length;++l){for(var p=[],u=[1,l-1,l],c=0;c<u.length;++c){var d=o[u[c]],h=0;if(void 0!==n[d])h=n[d];else{for(var m=d.split("/"),f=0;f<m.length;f++)m[f]=parseInt(m[f])-1;h=n[d]=e.vertices.length,e.vertices.push(r.v[m[0]].copy()),r.vt[m[1]]?e.uvs.push(r.vt[m[1]].slice()):e.uvs.push([0,0]),r.vn[m[2]]&&e.vertexNormals.push(r.vn[m[2]].copy())}p.push(h)}p[0]!==p[1]&&p[0]!==p[2]&&p[1]!==p[2]&&e.faces.push(p)}}0===e.vertexNormals.length&&e.computeNormals()}(o,e),t&&o.normalize(),i._decrementPreload(),"function"==typeof r&&r(o)},n):(w.default._friendlyFileLoadError(3,e),n?n():console.error("Sorry, the file type is invalid. Only OBJ and STL files are supported.")),o},w.default.prototype.model=function(e){this._assert3d("model"),w.default._validateParameters("model",arguments),0<e.vertices.length&&(this._renderer.geometryInHash(e.gid)||(e._makeTriangleEdges()._edgesToVertices(),this._renderer.createBuffers(e.gid,e)),this._renderer.drawBuffers(e.gid))};var a=w.default;r.default=a},{"../core/main":32,"./p5.Geometry":81}],79:[function(e,t,r){"use strict";function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n,p=(n=e("../core/main"))&&n.__esModule?n:{default:n},a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==i(e)&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=n?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(r,a,o):r[a]=e[a]}r.default=e,t&&t.set(e,r);return r}(e("../core/constants"));function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}e("./p5.Texture"),p.default.prototype.loadShader=function(e,t,r,n){p.default._validateParameters("loadShader",arguments),n=n||console.error;function a(){i._decrementPreload(),r&&r(o)}var o=new p.default.Shader,i=this,s=!1,l=!1;return this.loadStrings(e,function(e){o._vertSrc=e.join("\n"),l=!0,s&&a()},n),this.loadStrings(t,function(e){o._fragSrc=e.join("\n"),s=!0,l&&a()},n),o},p.default.prototype.createShader=function(e,t){return this._assert3d("createShader"),p.default._validateParameters("createShader",arguments),new p.default.Shader(this._renderer,e,t)},p.default.prototype.shader=function(e){return this._assert3d("shader"),p.default._validateParameters("shader",arguments),void 0===e._renderer&&(e._renderer=this._renderer),e.isStrokeShader()?this._renderer.userStrokeShader=e:(this._renderer.userFillShader=e,this._renderer._useNormalMaterial=!1),e.init(),this},p.default.prototype.resetShader=function(){return this._renderer.userFillShader=this._renderer.userStrokeShader=null,this},p.default.prototype.normalMaterial=function(){this._assert3d("normalMaterial");for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return p.default._validateParameters("normalMaterial",t),this._renderer.drawMode=a.FILL,this._renderer._useSpecularMaterial=!1,this._renderer._useEmissiveMaterial=!1,this._renderer._useNormalMaterial=!0,this._renderer.curFillColor=[1,1,1,1],this._renderer._setProperty("_doFill",!0),this.noStroke(),this},p.default.prototype.texture=function(e){return this._assert3d("texture"),p.default._validateParameters("texture",arguments),e.gifProperties&&e._animateGif(this),this._renderer.drawMode=a.TEXTURE,this._renderer._useSpecularMaterial=!1,this._renderer._useEmissiveMaterial=!1,this._renderer._useNormalMaterial=!1,this._renderer._tex=e,this._renderer._setProperty("_doFill",!0),this},p.default.prototype.textureMode=function(e){e!==a.IMAGE&&e!==a.NORMAL?console.warn("You tried to set ".concat(e," textureMode only supports IMAGE & NORMAL ")):this._renderer.textureMode=e},p.default.prototype.textureWrap=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:e;this._renderer.textureWrapX=e,this._renderer.textureWrapY=t;for(var r=this._renderer.textures,n=0;n<r.length;n++)r[n].setWrapMode(e,t)},p.default.prototype.ambientMaterial=function(e,t,r){this._assert3d("ambientMaterial"),p.default._validateParameters("ambientMaterial",arguments);var n=p.default.prototype.color.apply(this,arguments);return this._renderer.curFillColor=n._array,this._renderer._useSpecularMaterial=!1,this._renderer._useEmissiveMaterial=!1,this._renderer._useNormalMaterial=!1,this._renderer._enableLighting=!0,this._renderer._tex=null,this},p.default.prototype.emissiveMaterial=function(e,t,r,n){this._assert3d("emissiveMaterial"),p.default._validateParameters("emissiveMaterial",arguments);var a=p.default.prototype.color.apply(this,arguments);return this._renderer.curFillColor=a._array,this._renderer._useSpecularMaterial=!1,this._renderer._useEmissiveMaterial=!0,this._renderer._useNormalMaterial=!1,this._renderer._enableLighting=!0,this._renderer._tex=null,this},p.default.prototype.specularMaterial=function(e,t,r,n){this._assert3d("specularMaterial"),p.default._validateParameters("specularMaterial",arguments);var a=p.default.prototype.color.apply(this,arguments);return this._renderer.curFillColor=a._array,this._renderer._useSpecularMaterial=!0,this._renderer._useEmissiveMaterial=!1,this._renderer._useNormalMaterial=!1,this._renderer._enableLighting=!0,this._renderer._tex=null,this},p.default.prototype.shininess=function(e){return this._assert3d("shininess"),p.default._validateParameters("shininess",arguments),e<1&&(e=1),this._renderer._useShininess=e,this},p.default.RendererGL.prototype._applyColorBlend=function(e){var t=this.GL,r=this.drawMode===a.TEXTURE||e[e.length-1]<1||this._isErasing;return r!==this._isBlending&&(r||this.curBlendMode!==a.BLEND&&this.curBlendMode!==a.ADD?t.enable(t.BLEND):t.disable(t.BLEND),t.depthMask(!0),this._isBlending=r),this._applyBlendMode(),e},p.default.RendererGL.prototype._applyBlendMode=function(){if(this._cachedBlendMode!==this.curBlendMode){var e=this.GL;switch(this.curBlendMode){case a.BLEND:case a.ADD:e.blendEquation(e.FUNC_ADD),e.blendFunc(e.SRC_ALPHA,e.ONE_MINUS_SRC_ALPHA);break;case a.REMOVE:e.blendEquation(e.FUNC_REVERSE_SUBTRACT),e.blendFunc(e.SRC_ALPHA,e.DST_ALPHA);break;case a.MULTIPLY:e.blendEquationSeparate(e.FUNC_ADD,e.FUNC_ADD),e.blendFuncSeparate(e.ZERO,e.SRC_COLOR,e.ONE,e.ONE);break;case a.SCREEN:e.blendEquationSeparate(e.FUNC_ADD,e.FUNC_ADD),e.blendFuncSeparate(e.ONE_MINUS_DST_COLOR,e.ONE,e.ONE,e.ONE);break;case a.EXCLUSION:e.blendEquationSeparate(e.FUNC_ADD,e.FUNC_ADD),e.blendFuncSeparate(e.ONE_MINUS_DST_COLOR,e.ONE_MINUS_SRC_COLOR,e.ONE,e.ONE);break;case a.REPLACE:e.blendEquation(e.FUNC_ADD),e.blendFunc(e.ONE,e.ZERO);break;case a.SUBTRACT:e.blendEquationSeparate(e.FUNC_REVERSE_SUBTRACT,e.FUNC_ADD),e.blendFuncSeparate(e.SRC_ALPHA,e.ONE,e.ONE,e.ONE);break;case a.DARKEST:this.blendExt?(e.blendEquationSeparate(this.blendExt.MIN_EXT,e.FUNC_ADD),e.blendFuncSeparate(e.ONE,e.ONE,e.ONE,e.ONE)):console.warn("blendMode(DARKEST) does not work in your browser in WEBGL mode.");break;case a.LIGHTEST:this.blendExt?(e.blendEquationSeparate(this.blendExt.MAX_EXT,e.FUNC_ADD),e.blendFuncSeparate(e.ONE,e.ONE,e.ONE,e.ONE)):console.warn("blendMode(LIGHTEST) does not work in your browser in WEBGL mode.");break;default:console.error("Oops! Somehow RendererGL set curBlendMode to an unsupported mode.")}this._isErasing||(this._cachedBlendMode=this.curBlendMode)}};var o=p.default;r.default=o},{"../core/constants":22,"../core/main":32,"./p5.Texture":88}],80:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n,f=(n=e("../core/main"))&&n.__esModule?n:{default:n};f.default.prototype.camera=function(){var e;this._assert3d("camera");for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return f.default._validateParameters("camera",r),(e=this._renderer._curCamera).camera.apply(e,r),this},f.default.prototype.perspective=function(){var e;this._assert3d("perspective");for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return f.default._validateParameters("perspective",r),(e=this._renderer._curCamera).perspective.apply(e,r),this},f.default.prototype.ortho=function(){var e;this._assert3d("ortho");for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return f.default._validateParameters("ortho",r),(e=this._renderer._curCamera).ortho.apply(e,r),this},f.default.prototype.frustum=function(){var e;this._assert3d("frustum");for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return f.default._validateParameters("frustum",r),(e=this._renderer._curCamera).frustum.apply(e,r),this},f.default.prototype.createCamera=function(){this._assert3d("createCamera");var e=new f.default.Camera(this._renderer);return e._computeCameraDefaultSettings(),e._setDefaultCamera(),this._renderer._curCamera=e},f.default.Camera=function(e){this._renderer=e,this.cameraType="default",this.cameraMatrix=new f.default.Matrix,this.projMatrix=new f.default.Matrix},f.default.Camera.prototype.perspective=function(e,t,r,n){this.cameraType=0<arguments.length?"custom":"default",void 0===e?(e=this.defaultCameraFOV,this.cameraFOV=e):this.cameraFOV=this._renderer._pInst._toRadians(e),void 0===t&&(t=this.defaultAspectRatio),void 0===r&&(r=this.defaultCameraNear),void 0===n&&(n=this.defaultCameraFar),r<=1e-4&&(r=.01,console.log("Avoid perspective near plane values close to or below 0. Setting value to 0.01.")),n<r&&console.log("Perspective far plane value is less than near plane value. Nothing will be shown."),this.aspectRatio=t,this.cameraNear=r,this.cameraFar=n,this.projMatrix=f.default.Matrix.identity();var a=1/Math.tan(this.cameraFOV/2),o=1/(this.cameraNear-this.cameraFar);this.projMatrix.set(a/t,0,0,0,0,-a,0,0,0,0,(n+r)*o,-1,0,0,2*n*r*o,0),this._isActive()&&this._renderer.uPMatrix.set(this.projMatrix.mat4[0],this.projMatrix.mat4[1],this.projMatrix.mat4[2],this.projMatrix.mat4[3],this.projMatrix.mat4[4],this.projMatrix.mat4[5],this.projMatrix.mat4[6],this.projMatrix.mat4[7],this.projMatrix.mat4[8],this.projMatrix.mat4[9],this.projMatrix.mat4[10],this.projMatrix.mat4[11],this.projMatrix.mat4[12],this.projMatrix.mat4[13],this.projMatrix.mat4[14],this.projMatrix.mat4[15])},f.default.Camera.prototype.ortho=function(e,t,r,n,a,o){void 0===e&&(e=-this._renderer.width/2),void 0===t&&(t=this._renderer.width/2),void 0===r&&(r=-this._renderer.height/2),void 0===n&&(n=this._renderer.height/2),void 0===a&&(a=0),void 0===o&&(o=Math.max(this._renderer.width,this._renderer.height));var i=t-e,s=n-r,l=o-a,p=2/i,u=2/s,c=-2/l,d=-(t+e)/i,h=-(n+r)/s,m=-(o+a)/l;this.projMatrix=f.default.Matrix.identity(),this.projMatrix.set(p,0,0,0,0,-u,0,0,0,0,c,0,d,h,m,1),this._isActive()&&this._renderer.uPMatrix.set(this.projMatrix.mat4[0],this.projMatrix.mat4[1],this.projMatrix.mat4[2],this.projMatrix.mat4[3],this.projMatrix.mat4[4],this.projMatrix.mat4[5],this.projMatrix.mat4[6],this.projMatrix.mat4[7],this.projMatrix.mat4[8],this.projMatrix.mat4[9],this.projMatrix.mat4[10],this.projMatrix.mat4[11],this.projMatrix.mat4[12],this.projMatrix.mat4[13],this.projMatrix.mat4[14],this.projMatrix.mat4[15]),this.cameraType="custom"},f.default.Camera.prototype.frustum=function(e,t,r,n,a,o){void 0===e&&(e=-this._renderer.width/2),void 0===t&&(t=this._renderer.width/2),void 0===r&&(r=-this._renderer.height/2),void 0===n&&(n=this._renderer.height/2),void 0===a&&(a=0),void 0===o&&(o=Math.max(this._renderer.width,this._renderer.height));var i=t-e,s=n-r,l=o-a,p=2*a/i,u=2*a/s,c=-2*o*a/l,d=(t+e)/i,h=(n+r)/s,m=-(o+a)/l;this.projMatrix=f.default.Matrix.identity(),this.projMatrix.set(p,0,0,0,0,u,0,0,d,h,m,-1,0,0,c,0),this._isActive()&&this._renderer.uPMatrix.set(this.projMatrix.mat4[0],this.projMatrix.mat4[1],this.projMatrix.mat4[2],this.projMatrix.mat4[3],this.projMatrix.mat4[4],this.projMatrix.mat4[5],this.projMatrix.mat4[6],this.projMatrix.mat4[7],this.projMatrix.mat4[8],this.projMatrix.mat4[9],this.projMatrix.mat4[10],this.projMatrix.mat4[11],this.projMatrix.mat4[12],this.projMatrix.mat4[13],this.projMatrix.mat4[14],this.projMatrix.mat4[15]),this.cameraType="custom"},f.default.Camera.prototype._rotateView=function(e,t,r,n){var a=this.centerX,o=this.centerY,i=this.centerZ;a-=this.eyeX,o-=this.eyeY,i-=this.eyeZ;var s=f.default.Matrix.identity(this._renderer._pInst);s.rotate(this._renderer._pInst._toRadians(e),t,r,n);var l=[a*s.mat4[0]+o*s.mat4[4]+i*s.mat4[8],a*s.mat4[1]+o*s.mat4[5]+i*s.mat4[9],a*s.mat4[2]+o*s.mat4[6]+i*s.mat4[10]];l[0]+=this.eyeX,l[1]+=this.eyeY,l[2]+=this.eyeZ,this.camera(this.eyeX,this.eyeY,this.eyeZ,l[0],l[1],l[2],this.upX,this.upY,this.upZ)},f.default.Camera.prototype.pan=function(e){var t=this._getLocalAxes();this._rotateView(e,t.y[0],t.y[1],t.y[2])},f.default.Camera.prototype.tilt=function(e){var t=this._getLocalAxes();this._rotateView(e,t.x[0],t.x[1],t.x[2])},f.default.Camera.prototype.lookAt=function(e,t,r){this.camera(this.eyeX,this.eyeY,this.eyeZ,e,t,r,this.upX,this.upY,this.upZ)},f.default.Camera.prototype.camera=function(e,t,r,n,a,o,i,s,l){void 0===e&&(e=this.defaultEyeX,t=this.defaultEyeY,r=this.defaultEyeZ,n=e,a=t,s=1,l=i=o=0),this.eyeX=e,this.eyeY=t,this.eyeZ=r,this.centerX=n,this.centerY=a,this.centerZ=o,this.upX=i,this.upY=s,this.upZ=l;var p=this._getLocalAxes();this.cameraMatrix.set(p.x[0],p.y[0],p.z[0],0,p.x[1],p.y[1],p.z[1],0,p.x[2],p.y[2],p.z[2],0,0,0,0,1);var u=-e,c=-t,d=-r;return this.cameraMatrix.translate([u,c,d]),this._isActive()&&this._renderer.uMVMatrix.set(this.cameraMatrix.mat4[0],this.cameraMatrix.mat4[1],this.cameraMatrix.mat4[2],this.cameraMatrix.mat4[3],this.cameraMatrix.mat4[4],this.cameraMatrix.mat4[5],this.cameraMatrix.mat4[6],this.cameraMatrix.mat4[7],this.cameraMatrix.mat4[8],this.cameraMatrix.mat4[9],this.cameraMatrix.mat4[10],this.cameraMatrix.mat4[11],this.cameraMatrix.mat4[12],this.cameraMatrix.mat4[13],this.cameraMatrix.mat4[14],this.cameraMatrix.mat4[15]),this},f.default.Camera.prototype.move=function(e,t,r){var n=this._getLocalAxes(),a=[n.x[0]*e,n.x[1]*e,n.x[2]*e],o=[n.y[0]*t,n.y[1]*t,n.y[2]*t],i=[n.z[0]*r,n.z[1]*r,n.z[2]*r];this.camera(this.eyeX+a[0]+o[0]+i[0],this.eyeY+a[1]+o[1]+i[1],this.eyeZ+a[2]+o[2]+i[2],this.centerX+a[0]+o[0]+i[0],this.centerY+a[1]+o[1]+i[1],this.centerZ+a[2]+o[2]+i[2],0,1,0)},f.default.Camera.prototype.setPosition=function(e,t,r){var n=e-this.eyeX,a=t-this.eyeY,o=r-this.eyeZ;this.camera(e,t,r,this.centerX+n,this.centerY+a,this.centerZ+o,0,1,0)},f.default.Camera.prototype._computeCameraDefaultSettings=function(){this.defaultCameraFOV=60/180*Math.PI,this.defaultAspectRatio=this._renderer.width/this._renderer.height,this.defaultEyeX=0,this.defaultEyeY=0,this.defaultEyeZ=this._renderer.height/2/Math.tan(this.defaultCameraFOV/2),this.defaultCenterX=0,this.defaultCenterY=0,this.defaultCenterZ=0,this.defaultCameraNear=.1*this.defaultEyeZ,this.defaultCameraFar=10*this.defaultEyeZ},f.default.Camera.prototype._setDefaultCamera=function(){this.cameraFOV=this.defaultCameraFOV,this.aspectRatio=this.defaultAspectRatio,this.eyeX=this.defaultEyeX,this.eyeY=this.defaultEyeY,this.eyeZ=this.defaultEyeZ,this.centerX=this.defaultCenterX,this.centerY=this.defaultCenterY,this.centerZ=this.defaultCenterZ,this.upX=0,this.upY=1,this.upZ=0,this.cameraNear=this.defaultCameraNear,this.cameraFar=this.defaultCameraFar,this.perspective(),this.camera(),this.cameraType="default"},f.default.Camera.prototype._resize=function(){"default"===this.cameraType?(this._computeCameraDefaultSettings(),this._setDefaultCamera()):this.perspective(this.cameraFOV,this._renderer.width/this._renderer.height)},f.default.Camera.prototype.copy=function(){var e=new f.default.Camera(this._renderer);return e.cameraFOV=this.cameraFOV,e.aspectRatio=this.aspectRatio,e.eyeX=this.eyeX,e.eyeY=this.eyeY,e.eyeZ=this.eyeZ,e.centerX=this.centerX,e.centerY=this.centerY,e.centerZ=this.centerZ,e.cameraNear=this.cameraNear,e.cameraFar=this.cameraFar,e.cameraType=this.cameraType,e.cameraMatrix=this.cameraMatrix.copy(),e.projMatrix=this.projMatrix.copy(),e},f.default.Camera.prototype._getLocalAxes=function(){var e=this.eyeX-this.centerX,t=this.eyeY-this.centerY,r=this.eyeZ-this.centerZ,n=Math.sqrt(e*e+t*t+r*r);0!==n&&(e/=n,t/=n,r/=n);var a=this.upX,o=this.upY,i=this.upZ,s=o*r-i*t,l=-a*r+i*e,p=a*t-o*e;a=t*p-r*l,o=-e*p+r*s,i=e*l-t*s;var u=Math.sqrt(s*s+l*l+p*p);0!==u&&(s/=u,l/=u,p/=u);var c=Math.sqrt(a*a+o*o+i*i);return 0!==c&&(a/=c,o/=c,i/=c),{x:[s,l,p],y:[a,o,i],z:[e,t,r]}},f.default.Camera.prototype._orbit=function(e,t,r){var n=this.eyeX-this.centerX,a=this.eyeY-this.centerY,o=this.eyeZ-this.centerZ,i=Math.sqrt(n*n+a*a+o*o),s=Math.atan2(n,o),l=Math.acos(Math.max(-1,Math.min(1,a/i)));s+=e,(i+=r)<0&&(i=.1),(l+=t)>Math.PI?l=Math.PI:l<=0&&(l=.001);var p=Math.sin(l)*i*Math.sin(s),u=Math.cos(l)*i,c=Math.sin(l)*i*Math.cos(s);this.camera(p+this.centerX,u+this.centerY,c+this.centerZ,this.centerX,this.centerY,this.centerZ,0,1,0)},f.default.Camera.prototype._isActive=function(){return this===this._renderer._curCamera},f.default.prototype.setCamera=function(e){this._renderer._curCamera=e,this._renderer.uPMatrix.set(e.projMatrix.mat4[0],e.projMatrix.mat4[1],e.projMatrix.mat4[2],e.projMatrix.mat4[3],e.projMatrix.mat4[4],e.projMatrix.mat4[5],e.projMatrix.mat4[6],e.projMatrix.mat4[7],e.projMatrix.mat4[8],e.projMatrix.mat4[9],e.projMatrix.mat4[10],e.projMatrix.mat4[11],e.projMatrix.mat4[12],e.projMatrix.mat4[13],e.projMatrix.mat4[14],e.projMatrix.mat4[15])};var a=f.default.Camera;r.default=a},{"../core/main":32}],81:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n,u=(n=e("../core/main"))&&n.__esModule?n:{default:n};u.default.Geometry=function(e,t,r){return this.vertices=[],this.lineVertices=[],this.lineNormals=[],this.vertexNormals=[],this.faces=[],this.uvs=[],this.edges=[],this.vertexColors=[],this.detailX=void 0!==e?e:1,this.detailY=void 0!==t?t:1,this.dirtyFlags={},r instanceof Function&&r.call(this),this},u.default.Geometry.prototype.reset=function(){this.lineVertices.length=0,this.lineNormals.length=0,this.vertices.length=0,this.edges.length=0,this.vertexColors.length=0,this.vertexNormals.length=0,this.uvs.length=0,this.dirtyFlags={}},u.default.Geometry.prototype.computeFaces=function(){this.faces.length=0;for(var e,t,r,n,a=this.detailX+1,o=0;o<this.detailY;o++)for(var i=0;i<this.detailX;i++)t=(e=o*a+i)+1,r=(o+1)*a+i+1,n=(o+1)*a+i,this.faces.push([e,t,n]),this.faces.push([n,t,r]);return this},u.default.Geometry.prototype._getFaceNormal=function(e){var t=this.faces[e],r=this.vertices[t[0]],n=this.vertices[t[1]],a=this.vertices[t[2]],o=u.default.Vector.sub(n,r),i=u.default.Vector.sub(a,r),s=u.default.Vector.cross(o,i),l=u.default.Vector.mag(s),p=l/(u.default.Vector.mag(o)*u.default.Vector.mag(i));return 0===p||isNaN(p)?(console.warn("p5.Geometry.prototype._getFaceNormal:","face has colinear sides or a repeated vertex"),s):(1<p&&(p=1),s.mult(Math.asin(p)/l))},u.default.Geometry.prototype.computeNormals=function(){var e,t=this.vertexNormals,r=this.vertices,n=this.faces;for(e=t.length=0;e<r.length;++e)t.push(new u.default.Vector);for(var a=0;a<n.length;++a)for(var o=n[a],i=this._getFaceNormal(a),s=0;s<3;++s){t[o[s]].add(i)}for(e=0;e<r.length;++e)t[e].normalize();return this},u.default.Geometry.prototype.averageNormals=function(){for(var e=0;e<=this.detailY;e++){var t=this.detailX+1,r=u.default.Vector.add(this.vertexNormals[e*t],this.vertexNormals[e*t+this.detailX]);r=u.default.Vector.div(r,2),this.vertexNormals[e*t]=r,this.vertexNormals[e*t+this.detailX]=r}return this},u.default.Geometry.prototype.averagePoleNormals=function(){for(var e=new u.default.Vector(0,0,0),t=0;t<this.detailX;t++)e.add(this.vertexNormals[t]);e=u.default.Vector.div(e,this.detailX);for(var r=0;r<this.detailX;r++)this.vertexNormals[r]=e;e=new u.default.Vector(0,0,0);for(var n=this.vertices.length-1;n>this.vertices.length-1-this.detailX;n--)e.add(this.vertexNormals[n]);e=u.default.Vector.div(e,this.detailX);for(var a=this.vertices.length-1;a>this.vertices.length-1-this.detailX;a--)this.vertexNormals[a]=e;return this},u.default.Geometry.prototype._makeTriangleEdges=function(){if(this.edges.length=0,Array.isArray(this.strokeIndices))for(var e=0,t=this.strokeIndices.length;e<t;e++)this.edges.push(this.strokeIndices[e]);else for(var r=0;r<this.faces.length;r++)this.edges.push([this.faces[r][0],this.faces[r][1]]),this.edges.push([this.faces[r][1],this.faces[r][2]]),this.edges.push([this.faces[r][2],this.faces[r][0]]);return this},u.default.Geometry.prototype._edgesToVertices=function(){this.lineVertices.length=0;for(var e=this.lineNormals.length=0;e<this.edges.length;e++){var t=this.vertices[this.edges[e][0]],r=this.vertices[this.edges[e][1]],n=r.copy().sub(t).normalize(),a=t.array(),o=t.array(),i=r.array(),s=r.array(),l=n.array(),p=n.array();l.push(1),p.push(-1),this.lineNormals.push(l,p,l,l,p,p),this.lineVertices.push(a,o,i,i,o,s)}return this},u.default.Geometry.prototype.normalize=function(){if(0<this.vertices.length){for(var e=this.vertices[0].copy(),t=this.vertices[0].copy(),r=0;r<this.vertices.length;r++)e.x=Math.max(e.x,this.vertices[r].x),t.x=Math.min(t.x,this.vertices[r].x),e.y=Math.max(e.y,this.vertices[r].y),t.y=Math.min(t.y,this.vertices[r].y),e.z=Math.max(e.z,this.vertices[r].z),t.z=Math.min(t.z,this.vertices[r].z);for(var n=u.default.Vector.lerp(e,t,.5),a=u.default.Vector.sub(e,t),o=200/Math.max(Math.max(a.x,a.y),a.z),i=0;i<this.vertices.length;i++)this.vertices[i].sub(n),this.vertices[i].mult(o)}return this};var a=u.default.Geometry;r.default=a},{"../core/main":32}],82:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n,L=(n=e("../core/main"))&&n.__esModule?n:{default:n};var a=Array,I=function(e){return e instanceof Array};"undefined"!=typeof Float32Array&&(a=Float32Array,I=function(e){return e instanceof Array||e instanceof Float32Array}),L.default.Matrix=function(){for(var e=new Array(arguments.length),t=0;t<e.length;++t)e[t]=arguments[t];return e.length&&e[e.length-1]instanceof L.default&&(this.p5=e[e.length-1]),"mat3"===e[0]?this.mat3=Array.isArray(e[1])?e[1]:new a([1,0,0,0,1,0,0,0,1]):this.mat4=Array.isArray(e[0])?e[0]:new a([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this},L.default.Matrix.prototype.set=function(e){return e instanceof L.default.Matrix?this.mat4=e.mat4:I(e)?this.mat4=e:16===arguments.length&&(this.mat4[0]=e,this.mat4[1]=arguments[1],this.mat4[2]=arguments[2],this.mat4[3]=arguments[3],this.mat4[4]=arguments[4],this.mat4[5]=arguments[5],this.mat4[6]=arguments[6],this.mat4[7]=arguments[7],this.mat4[8]=arguments[8],this.mat4[9]=arguments[9],this.mat4[10]=arguments[10],this.mat4[11]=arguments[11],this.mat4[12]=arguments[12],this.mat4[13]=arguments[13],this.mat4[14]=arguments[14],this.mat4[15]=arguments[15]),this},L.default.Matrix.prototype.get=function(){return new L.default.Matrix(this.mat4,this.p5)},L.default.Matrix.prototype.copy=function(){var e=new L.default.Matrix(this.p5);return e.mat4[0]=this.mat4[0],e.mat4[1]=this.mat4[1],e.mat4[2]=this.mat4[2],e.mat4[3]=this.mat4[3],e.mat4[4]=this.mat4[4],e.mat4[5]=this.mat4[5],e.mat4[6]=this.mat4[6],e.mat4[7]=this.mat4[7],e.mat4[8]=this.mat4[8],e.mat4[9]=this.mat4[9],e.mat4[10]=this.mat4[10],e.mat4[11]=this.mat4[11],e.mat4[12]=this.mat4[12],e.mat4[13]=this.mat4[13],e.mat4[14]=this.mat4[14],e.mat4[15]=this.mat4[15],e},L.default.Matrix.identity=function(e){return new L.default.Matrix(e)},L.default.Matrix.prototype.transpose=function(e){var t,r,n,a,o,i;return e instanceof L.default.Matrix?(t=e.mat4[1],r=e.mat4[2],n=e.mat4[3],a=e.mat4[6],o=e.mat4[7],i=e.mat4[11],this.mat4[0]=e.mat4[0],this.mat4[1]=e.mat4[4],this.mat4[2]=e.mat4[8],this.mat4[3]=e.mat4[12],this.mat4[4]=t,this.mat4[5]=e.mat4[5],this.mat4[6]=e.mat4[9],this.mat4[7]=e.mat4[13],this.mat4[8]=r,this.mat4[9]=a,this.mat4[10]=e.mat4[10],this.mat4[11]=e.mat4[14],this.mat4[12]=n,this.mat4[13]=o,this.mat4[14]=i,this.mat4[15]=e.mat4[15]):I(e)&&(t=e[1],r=e[2],n=e[3],a=e[6],o=e[7],i=e[11],this.mat4[0]=e[0],this.mat4[1]=e[4],this.mat4[2]=e[8],this.mat4[3]=e[12],this.mat4[4]=t,this.mat4[5]=e[5],this.mat4[6]=e[9],this.mat4[7]=e[13],this.mat4[8]=r,this.mat4[9]=a,this.mat4[10]=e[10],this.mat4[11]=e[14],this.mat4[12]=n,this.mat4[13]=o,this.mat4[14]=i,this.mat4[15]=e[15]),this},L.default.Matrix.prototype.invert=function(e){var t,r,n,a,o,i,s,l,p,u,c,d,h,m,f,y;e instanceof L.default.Matrix?(t=e.mat4[0],r=e.mat4[1],n=e.mat4[2],a=e.mat4[3],o=e.mat4[4],i=e.mat4[5],s=e.mat4[6],l=e.mat4[7],p=e.mat4[8],u=e.mat4[9],c=e.mat4[10],d=e.mat4[11],h=e.mat4[12],m=e.mat4[13],f=e.mat4[14],y=e.mat4[15]):I(e)&&(t=e[0],r=e[1],n=e[2],a=e[3],o=e[4],i=e[5],s=e[6],l=e[7],p=e[8],u=e[9],c=e[10],d=e[11],h=e[12],m=e[13],f=e[14],y=e[15]);var g=t*i-r*o,v=t*s-n*o,b=t*l-a*o,_=r*s-n*i,x=r*l-a*i,S=n*l-a*s,w=p*m-u*h,M=p*f-c*h,E=p*y-d*h,T=u*f-c*m,C=u*y-d*m,N=c*y-d*f,O=g*N-v*C+b*T+_*E-x*M+S*w;return O?(O=1/O,this.mat4[0]=(i*N-s*C+l*T)*O,this.mat4[1]=(n*C-r*N-a*T)*O,this.mat4[2]=(m*S-f*x+y*_)*O,this.mat4[3]=(c*x-u*S-d*_)*O,this.mat4[4]=(s*E-o*N-l*M)*O,this.mat4[5]=(t*N-n*E+a*M)*O,this.mat4[6]=(f*b-h*S-y*v)*O,this.mat4[7]=(p*S-c*b+d*v)*O,this.mat4[8]=(o*C-i*E+l*w)*O,this.mat4[9]=(r*E-t*C-a*w)*O,this.mat4[10]=(h*x-m*b+y*g)*O,this.mat4[11]=(u*b-p*x-d*g)*O,this.mat4[12]=(i*M-o*T-s*w)*O,this.mat4[13]=(t*T-r*M+n*w)*O,this.mat4[14]=(m*v-h*_-f*g)*O,this.mat4[15]=(p*_-u*v+c*g)*O,this):null},L.default.Matrix.prototype.invert3x3=function(){var e=this.mat3[0],t=this.mat3[1],r=this.mat3[2],n=this.mat3[3],a=this.mat3[4],o=this.mat3[5],i=this.mat3[6],s=this.mat3[7],l=this.mat3[8],p=l*a-o*s,u=-l*n+o*i,c=s*n-a*i,d=e*p+t*u+r*c;return d?(d=1/d,this.mat3[0]=p*d,this.mat3[1]=(-l*t+r*s)*d,this.mat3[2]=(o*t-r*a)*d,this.mat3[3]=u*d,this.mat3[4]=(l*e-r*i)*d,this.mat3[5]=(-o*e+r*n)*d,this.mat3[6]=c*d,this.mat3[7]=(-s*e+t*i)*d,this.mat3[8]=(a*e-t*n)*d,this):null},L.default.Matrix.prototype.transpose3x3=function(e){var t=e[1],r=e[2],n=e[5];return this.mat3[1]=e[3],this.mat3[2]=e[6],this.mat3[3]=t,this.mat3[5]=e[7],this.mat3[6]=r,this.mat3[7]=n,this},L.default.Matrix.prototype.inverseTranspose=function(e){void 0===this.mat3?console.error("sorry, this function only works with mat3"):(this.mat3[0]=e.mat4[0],this.mat3[1]=e.mat4[1],this.mat3[2]=e.mat4[2],this.mat3[3]=e.mat4[4],this.mat3[4]=e.mat4[5],this.mat3[5]=e.mat4[6],this.mat3[6]=e.mat4[8],this.mat3[7]=e.mat4[9],this.mat3[8]=e.mat4[10]);var t=this.invert3x3();if(t)t.transpose3x3(this.mat3);else for(var r=0;r<9;r++)this.mat3[r]=0;return this},L.default.Matrix.prototype.determinant=function(){var e=this.mat4[0]*this.mat4[5]-this.mat4[1]*this.mat4[4],t=this.mat4[0]*this.mat4[6]-this.mat4[2]*this.mat4[4],r=this.mat4[0]*this.mat4[7]-this.mat4[3]*this.mat4[4],n=this.mat4[1]*this.mat4[6]-this.mat4[2]*this.mat4[5],a=this.mat4[1]*this.mat4[7]-this.mat4[3]*this.mat4[5],o=this.mat4[2]*this.mat4[7]-this.mat4[3]*this.mat4[6],i=this.mat4[8]*this.mat4[13]-this.mat4[9]*this.mat4[12],s=this.mat4[8]*this.mat4[14]-this.mat4[10]*this.mat4[12],l=this.mat4[8]*this.mat4[15]-this.mat4[11]*this.mat4[12],p=this.mat4[9]*this.mat4[14]-this.mat4[10]*this.mat4[13],u=this.mat4[9]*this.mat4[15]-this.mat4[11]*this.mat4[13];return e*(this.mat4[10]*this.mat4[15]-this.mat4[11]*this.mat4[14])-t*u+r*p+n*l-a*s+o*i},L.default.Matrix.prototype.mult=function(e){var t;if(e===this||e===this.mat4)t=this.copy().mat4;else if(e instanceof L.default.Matrix)t=e.mat4;else if(I(e))t=e;else{if(16!==arguments.length)return;t=arguments}var r=this.mat4[0],n=this.mat4[1],a=this.mat4[2],o=this.mat4[3];return this.mat4[0]=r*t[0]+n*t[4]+a*t[8]+o*t[12],this.mat4[1]=r*t[1]+n*t[5]+a*t[9]+o*t[13],this.mat4[2]=r*t[2]+n*t[6]+a*t[10]+o*t[14],this.mat4[3]=r*t[3]+n*t[7]+a*t[11]+o*t[15],r=this.mat4[4],n=this.mat4[5],a=this.mat4[6],o=this.mat4[7],this.mat4[4]=r*t[0]+n*t[4]+a*t[8]+o*t[12],this.mat4[5]=r*t[1]+n*t[5]+a*t[9]+o*t[13],this.mat4[6]=r*t[2]+n*t[6]+a*t[10]+o*t[14],this.mat4[7]=r*t[3]+n*t[7]+a*t[11]+o*t[15],r=this.mat4[8],n=this.mat4[9],a=this.mat4[10],o=this.mat4[11],this.mat4[8]=r*t[0]+n*t[4]+a*t[8]+o*t[12],this.mat4[9]=r*t[1]+n*t[5]+a*t[9]+o*t[13],this.mat4[10]=r*t[2]+n*t[6]+a*t[10]+o*t[14],this.mat4[11]=r*t[3]+n*t[7]+a*t[11]+o*t[15],r=this.mat4[12],n=this.mat4[13],a=this.mat4[14],o=this.mat4[15],this.mat4[12]=r*t[0]+n*t[4]+a*t[8]+o*t[12],this.mat4[13]=r*t[1]+n*t[5]+a*t[9]+o*t[13],this.mat4[14]=r*t[2]+n*t[6]+a*t[10]+o*t[14],this.mat4[15]=r*t[3]+n*t[7]+a*t[11]+o*t[15],this},L.default.Matrix.prototype.apply=function(e){var t;if(e===this||e===this.mat4)t=this.copy().mat4;else if(e instanceof L.default.Matrix)t=e.mat4;else if(I(e))t=e;else{if(16!==arguments.length)return;t=arguments}var r=this.mat4,n=r[0],a=r[4],o=r[8],i=r[12];r[0]=t[0]*n+t[1]*a+t[2]*o+t[3]*i,r[4]=t[4]*n+t[5]*a+t[6]*o+t[7]*i,r[8]=t[8]*n+t[9]*a+t[10]*o+t[11]*i,r[12]=t[12]*n+t[13]*a+t[14]*o+t[15]*i;var s=r[1],l=r[5],p=r[9],u=r[13];r[1]=t[0]*s+t[1]*l+t[2]*p+t[3]*u,r[5]=t[4]*s+t[5]*l+t[6]*p+t[7]*u,r[9]=t[8]*s+t[9]*l+t[10]*p+t[11]*u,r[13]=t[12]*s+t[13]*l+t[14]*p+t[15]*u;var c=r[2],d=r[6],h=r[10],m=r[14];r[2]=t[0]*c+t[1]*d+t[2]*h+t[3]*m,r[6]=t[4]*c+t[5]*d+t[6]*h+t[7]*m,r[10]=t[8]*c+t[9]*d+t[10]*h+t[11]*m,r[14]=t[12]*c+t[13]*d+t[14]*h+t[15]*m;var f=r[3],y=r[7],g=r[11],v=r[15];return r[3]=t[0]*f+t[1]*y+t[2]*g+t[3]*v,r[7]=t[4]*f+t[5]*y+t[6]*g+t[7]*v,r[11]=t[8]*f+t[9]*y+t[10]*g+t[11]*v,r[15]=t[12]*f+t[13]*y+t[14]*g+t[15]*v,this},L.default.Matrix.prototype.scale=function(e,t,r){return e instanceof L.default.Vector?(t=e.y,r=e.z,e=e.x):e instanceof Array&&(t=e[1],r=e[2],e=e[0]),this.mat4[0]*=e,this.mat4[1]*=e,this.mat4[2]*=e,this.mat4[3]*=e,this.mat4[4]*=t,this.mat4[5]*=t,this.mat4[6]*=t,this.mat4[7]*=t,this.mat4[8]*=r,this.mat4[9]*=r,this.mat4[10]*=r,this.mat4[11]*=r,this},L.default.Matrix.prototype.rotate=function(e,t,r,n){t instanceof L.default.Vector?(r=t.y,n=t.z,t=t.x):t instanceof Array&&(r=t[1],n=t[2],t=t[0]);var a=Math.sqrt(t*t+r*r+n*n);t*=1/a,r*=1/a,n*=1/a;var o=this.mat4[0],i=this.mat4[1],s=this.mat4[2],l=this.mat4[3],p=this.mat4[4],u=this.mat4[5],c=this.mat4[6],d=this.mat4[7],h=this.mat4[8],m=this.mat4[9],f=this.mat4[10],y=this.mat4[11],g=Math.sin(e),v=Math.cos(e),b=1-v,_=t*t*b+v,x=r*t*b+n*g,S=n*t*b-r*g,w=t*r*b-n*g,M=r*r*b+v,E=n*r*b+t*g,T=t*n*b+r*g,C=r*n*b-t*g,N=n*n*b+v;return this.mat4[0]=o*_+p*x+h*S,this.mat4[1]=i*_+u*x+m*S,this.mat4[2]=s*_+c*x+f*S,this.mat4[3]=l*_+d*x+y*S,this.mat4[4]=o*w+p*M+h*E,this.mat4[5]=i*w+u*M+m*E,this.mat4[6]=s*w+c*M+f*E,this.mat4[7]=l*w+d*M+y*E,this.mat4[8]=o*T+p*C+h*N,this.mat4[9]=i*T+u*C+m*N,this.mat4[10]=s*T+c*C+f*N,this.mat4[11]=l*T+d*C+y*N,this},L.default.Matrix.prototype.translate=function(e){var t=e[0],r=e[1],n=e[2]||0;this.mat4[12]+=this.mat4[0]*t+this.mat4[4]*r+this.mat4[8]*n,this.mat4[13]+=this.mat4[1]*t+this.mat4[5]*r+this.mat4[9]*n,this.mat4[14]+=this.mat4[2]*t+this.mat4[6]*r+this.mat4[10]*n,this.mat4[15]+=this.mat4[3]*t+this.mat4[7]*r+this.mat4[11]*n},L.default.Matrix.prototype.rotateX=function(e){this.rotate(e,1,0,0)},L.default.Matrix.prototype.rotateY=function(e){this.rotate(e,0,1,0)},L.default.Matrix.prototype.rotateZ=function(e){this.rotate(e,0,0,1)},L.default.Matrix.prototype.perspective=function(e,t,r,n){var a=1/Math.tan(e/2),o=1/(r-n);return this.mat4[0]=a/t,this.mat4[1]=0,this.mat4[2]=0,this.mat4[3]=0,this.mat4[4]=0,this.mat4[5]=a,this.mat4[6]=0,this.mat4[7]=0,this.mat4[8]=0,this.mat4[9]=0,this.mat4[10]=(n+r)*o,this.mat4[11]=-1,this.mat4[12]=0,this.mat4[13]=0,this.mat4[14]=2*n*r*o,this.mat4[15]=0,this},L.default.Matrix.prototype.ortho=function(e,t,r,n,a,o){var i=1/(e-t),s=1/(r-n),l=1/(a-o);return this.mat4[0]=-2*i,this.mat4[1]=0,this.mat4[2]=0,this.mat4[3]=0,this.mat4[4]=0,this.mat4[5]=-2*s,this.mat4[6]=0,this.mat4[7]=0,this.mat4[8]=0,this.mat4[9]=0,this.mat4[10]=2*l,this.mat4[11]=0,this.mat4[12]=(e+t)*i,this.mat4[13]=(n+r)*s,this.mat4[14]=(o+a)*l,this.mat4[15]=1,this};var o=L.default.Matrix;r.default=o},{"../core/main":32}],83:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n,a=(n=e("../core/main"))&&n.__esModule?n:{default:n};a.default.RenderBuffer=function(e,t,r,n,a,o){this.size=e,this.src=t,this.dst=r,this.attr=n,this._renderer=a,this.map=o},a.default.RenderBuffer.prototype._prepareBuffer=function(e,t){var r,n=t.attributes,a=this._renderer.GL;r=e.model?e.model:e;var o=n[this.attr];if(o){var i=e[this.dst],s=r[this.src];if(0<s.length){var l=!i;if(l&&(e[this.dst]=i=a.createBuffer()),a.bindBuffer(a.ARRAY_BUFFER,i),l||!1!==r.dirtyFlags[this.src]){var p=this.map,u=p?p(s):s;this._renderer._bindBuffer(i,a.ARRAY_BUFFER,u),r.dirtyFlags[this.src]=!1}t.enableAttrib(o,this.size)}}};var o=a.default.RenderBuffer;r.default=o},{"../core/main":32}],84:[function(e,t,r){"use strict";function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n,s=(n=e("../core/main"))&&n.__esModule?n:{default:n},l=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==i(e)&&"function"!=typeof e)return{default:e};var t=p();if(t&&t.has(e))return t.get(e);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=n?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(r,a,o):r[a]=e[a]}r.default=e,t&&t.set(e,r);return r}(e("../core/constants"));function p(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return p=function(){return e},e}e("./p5.RenderBuffer"),s.default.RendererGL.prototype.beginShape=function(e){return this.immediateMode.shapeMode=void 0!==e?e:l.TRIANGLE_FAN,this.immediateMode.geometry.reset(),this},s.default.RendererGL.prototype.vertex=function(e,t){var r,n,a;r=n=a=0,3===arguments.length?r=arguments[2]:4===arguments.length?(n=arguments[2],a=arguments[3]):5===arguments.length&&(r=arguments[2],n=arguments[3],a=arguments[4]);var o=new s.default.Vector(e,t,r);this.immediateMode.geometry.vertices.push(o);var i=this.curFillColor||[.5,.5,.5,1];return this.immediateMode.geometry.vertexColors.push(i[0],i[1],i[2],i[3]),this.textureMode===l.IMAGE&&(null!==this._tex?0<this._tex.width&&0<this._tex.height&&(n/=this._tex.width,a/=this._tex.height):null===this._tex&&4<=arguments.length&&console.warn("You must first call texture() before using vertex() with image based u and v coordinates")),this.immediateMode.geometry.uvs.push(n,a),this.immediateMode._bezierVertex[0]=e,this.immediateMode._bezierVertex[1]=t,this.immediateMode._bezierVertex[2]=r,this.immediateMode._quadraticVertex[0]=e,this.immediateMode._quadraticVertex[1]=t,this.immediateMode._quadraticVertex[2]=r,this},s.default.RendererGL.prototype.endShape=function(e,t,r,n,a,o){return this.immediateMode.shapeMode===l.POINTS?this._drawPoints(this.immediateMode.geometry.vertices,this.immediateMode.buffers.point):(this._processVertices.apply(this,arguments),this._doFill&&1<this.immediateMode.geometry.vertices.length&&this._drawImmediateFill(),this._doStroke&&1<this.immediateMode.geometry.lineVertices.length&&this._drawImmediateStroke(),this.isBezier=!1,this.isQuadratic=!1,this.isCurve=!1,this.immediateMode._bezierVertex.length=0,this.immediateMode._quadraticVertex.length=0,this.immediateMode._curveVertex.length=0),this},s.default.RendererGL.prototype._processVertices=function(e){if(0!==this.immediateMode.geometry.vertices.length){var t=this._doStroke&&this.drawMode!==l.TEXTURE,r=e===l.CLOSE;t&&(this.immediateMode.geometry.edges=this._calculateEdges(this.immediateMode.shapeMode,this.immediateMode.geometry.vertices,r),this.immediateMode.geometry._edgesToVertices());var n=this.immediateMode.shapeMode===l.TESS;(this.isBezier||this.isQuadratic||this.isCurve||n)&&this.immediateMode.shapeMode!==l.LINES&&this._tesselateShape()}},s.default.RendererGL.prototype._calculateEdges=function(e,t,r){var n=[],a=0;switch(e){case l.TRIANGLE_STRIP:for(a=0;a<t.length-2;a++)n.push([a,a+1]),n.push([a,a+2]);n.push([a,a+1]);break;case l.TRIANGLES:for(a=0;a<t.length-2;a+=3)n.push([a,a+1]),n.push([a+1,a+2]),n.push([a+2,a]);break;case l.LINES:for(a=0;a<t.length-1;a+=2)n.push([a,a+1]);break;default:for(a=0;a<t.length-1;a++)n.push([a,a+1])}return r&&n.push([t.length-1,0]),n},s.default.RendererGL.prototype._tesselateShape=function(){this.immediateMode.shapeMode=l.TRIANGLES;var e=[new Float32Array(this._vToNArray(this.immediateMode.geometry.vertices))],t=this._triangulate(e);this.immediateMode.geometry.vertices=[];for(var r=0,n=t.length;r<n;r+=3)this.vertex(t[r],t[r+1],t[r+2])},s.default.RendererGL.prototype._drawImmediateFill=function(){var e=this.GL,t=this._getImmediateFillShader();this._calculateNormals(this.immediateMode.geometry),this._setFillUniforms(t);var r=!0,n=!1,a=void 0;try{for(var o,i=this.immediateMode.buffers.fill[Symbol.iterator]();!(r=(o=i.next()).done);r=!0){o.value._prepareBuffer(this.immediateMode.geometry,t)}}catch(e){n=!0,a=e}finally{try{r||null==i.return||i.return()}finally{if(n)throw a}}this.immediateMode.shapeMode!==l.LINE_STRIP&&this.immediateMode.shapeMode!==l.LINES||(this.immediateMode.shapeMode=l.TRIANGLE_FAN),this._applyColorBlend(this.curFillColor),e.drawArrays(this.immediateMode.shapeMode,0,this.immediateMode.geometry.vertices.length),t.unbindShader()},s.default.RendererGL.prototype._drawImmediateStroke=function(){var e=this.GL,t=this._getImmediateStrokeShader();this._setStrokeUniforms(t);var r=!0,n=!1,a=void 0;try{for(var o,i=this.immediateMode.buffers.stroke[Symbol.iterator]();!(r=(o=i.next()).done);r=!0){o.value._prepareBuffer(this.immediateMode.geometry,t)}}catch(e){n=!0,a=e}finally{try{r||null==i.return||i.return()}finally{if(n)throw a}}this._applyColorBlend(this.curStrokeColor),e.drawArrays(e.TRIANGLES,0,this.immediateMode.geometry.lineVertices.length),t.unbindShader()},s.default.RendererGL.prototype._calculateNormals=function(e){e.vertices.forEach(function(){e.vertexNormals.push(new s.default.Vector(0,0,1))})};var a=s.default.RendererGL;r.default=a},{"../core/constants":22,"../core/main":32,"./p5.RenderBuffer":83}],85:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n,i=(n=e("../core/main"))&&n.__esModule?n:{default:n};e("./p5.RendererGL"),e("./p5.RenderBuffer");var a=0;i.default.RendererGL.prototype._initBufferDefaults=function(e){if(this._freeBuffers(e),1e3<++a){var t=Object.keys(this.retainedMode.geometry)[0];delete this.retainedMode.geometry[t],a--}return this.retainedMode.geometry[e]={}},i.default.RendererGL.prototype._freeBuffers=function(e){var s=this.retainedMode.geometry[e];if(s){delete this.retainedMode.geometry[e],a--;var l=this.GL;s.indexBuffer&&l.deleteBuffer(s.indexBuffer),t(this.retainedMode.buffers.stroke),t(this.retainedMode.buffers.fill)}function t(e){var t=!0,r=!1,n=void 0;try{for(var a,o=e[Symbol.iterator]();!(t=(a=o.next()).done);t=!0){var i=a.value;s[i.dst]&&(l.deleteBuffer(s[i.dst]),s[i.dst]=null)}}catch(e){r=!0,n=e}finally{try{t||null==o.return||o.return()}finally{if(r)throw n}}}},i.default.RendererGL.prototype.createBuffers=function(e,t){var r=this.GL,n=this._initBufferDefaults(e);n.model=t;var a=n.indexBuffer;if(t.faces.length){a=a||(n.indexBuffer=r.createBuffer());var o=i.default.RendererGL.prototype._flatten(t.faces);this._bindBuffer(a,r.ELEMENT_ARRAY_BUFFER,o,Uint16Array),n.vertexCount=3*t.faces.length}else a&&(r.deleteBuffer(a),n.indexBuffer=null),n.vertexCount=t.vertices?t.vertices.length:0;return n.lineVertexCount=t.lineVertices?t.lineVertices.length:0,n},i.default.RendererGL.prototype.drawBuffers=function(e){var t=this.GL,r=this.retainedMode.geometry[e];if(this._doStroke&&0<r.lineVertexCount){var n=this._getRetainedStrokeShader();this._setStrokeUniforms(n);var a=!0,o=!1,i=void 0;try{for(var s,l=this.retainedMode.buffers.stroke[Symbol.iterator]();!(a=(s=l.next()).done);a=!0){s.value._prepareBuffer(r,n)}}catch(e){o=!0,i=e}finally{try{a||null==l.return||l.return()}finally{if(o)throw i}}this._applyColorBlend(this.curStrokeColor),this._drawArrays(t.TRIANGLES,e),n.unbindShader()}if(this._doFill){var p=this._getRetainedFillShader();this._setFillUniforms(p);var u=!0,c=!1,d=void 0;try{for(var h,m=this.retainedMode.buffers.fill[Symbol.iterator]();!(u=(h=m.next()).done);u=!0){h.value._prepareBuffer(r,p)}}catch(e){c=!0,d=e}finally{try{u||null==m.return||m.return()}finally{if(c)throw d}}r.indexBuffer&&this._bindBuffer(r.indexBuffer,t.ELEMENT_ARRAY_BUFFER),this._applyColorBlend(this.curFillColor),this._drawElements(t.TRIANGLES,e),p.unbindShader()}return this},i.default.RendererGL.prototype.drawBuffersScaled=function(e,t,r,n){var a=this.uMVMatrix.copy();try{this.uMVMatrix.scale(t,r,n),this.drawBuffers(e)}finally{this.uMVMatrix=a}},i.default.RendererGL.prototype._drawArrays=function(e,t){return this.GL.drawArrays(e,0,this.retainedMode.geometry[t].lineVertexCount),this},i.default.RendererGL.prototype._drawElements=function(e,t){var r=this.retainedMode.geometry[t],n=this.GL;r.indexBuffer?n.drawElements(n.TRIANGLES,r.vertexCount,n.UNSIGNED_SHORT,0):n.drawArrays(e||n.TRIANGLES,0,r.vertexCount)},i.default.RendererGL.prototype._drawPoints=function(e,t){var r=this.GL,n=this._getImmediatePointShader();this._setPointUniforms(n),this._bindBuffer(t,r.ARRAY_BUFFER,this._vToNArray(e),Float32Array,r.STATIC_DRAW),n.enableAttrib(n.attributes.aPosition,3),r.drawArrays(r.Points,0,e.length),n.unbindShader()};var o=i.default.RendererGL;r.default=o},{"../core/main":32,"./p5.RenderBuffer":83,"./p5.RendererGL":86}],86:[function(e,t,r){"use strict";function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var p=a(e("../core/main")),o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==i(e)&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=n?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(r,a,o):r[a]=e[a]}r.default=e,t&&t.set(e,r);return r}(e("../core/constants")),n=a(e("libtess"));e("./p5.Shader"),e("./p5.Camera"),e("../core/p5.Renderer"),e("./p5.Matrix");e("path");function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function a(e){return e&&e.__esModule?e:{default:e}}function l(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var u="precision highp float;\nprecision highp int;\n\nuniform mat4 uViewMatrix;\n\nuniform bool uUseLighting;\n\nuniform int uAmbientLightCount;\nuniform vec3 uAmbientColor[5];\n\nuniform int uDirectionalLightCount;\nuniform vec3 uLightingDirection[5];\nuniform vec3 uDirectionalDiffuseColors[5];\nuniform vec3 uDirectionalSpecularColors[5];\n\nuniform int uPointLightCount;\nuniform vec3 uPointLightLocation[5];\nuniform vec3 uPointLightDiffuseColors[5];\t\nuniform vec3 uPointLightSpecularColors[5];\n\nuniform int uSpotLightCount;\nuniform float uSpotLightAngle[5];\nuniform float uSpotLightConc[5];\nuniform vec3 uSpotLightDiffuseColors[5];\nuniform vec3 uSpotLightSpecularColors[5];\nuniform vec3 uSpotLightLocation[5];\nuniform vec3 uSpotLightDirection[5];\n\nuniform bool uSpecular;\nuniform float uShininess;\n\nuniform float uConstantAttenuation;\nuniform float uLinearAttenuation;\nuniform float uQuadraticAttenuation;\n\nconst float specularFactor = 2.0;\nconst float diffuseFactor = 0.73;\n\nstruct LightResult {\n  float specular;\n  float diffuse;\n};\n\nfloat _phongSpecular(\n  vec3 lightDirection,\n  vec3 viewDirection,\n  vec3 surfaceNormal,\n  float shininess) {\n\n  vec3 R = reflect(lightDirection, surfaceNormal);\n  return pow(max(0.0, dot(R, viewDirection)), shininess);\n}\n\nfloat _lambertDiffuse(vec3 lightDirection, vec3 surfaceNormal) {\n  return max(0.0, dot(-lightDirection, surfaceNormal));\n}\n\nLightResult _light(vec3 viewDirection, vec3 normal, vec3 lightVector) {\n\n  vec3 lightDir = normalize(lightVector);\n\n  //compute our diffuse & specular terms\n  LightResult lr;\n  if (uSpecular)\n    lr.specular = _phongSpecular(lightDir, viewDirection, normal, uShininess);\n  lr.diffuse = _lambertDiffuse(lightDir, normal);\n  return lr;\n}\n\nvoid totalLight(\n  vec3 modelPosition,\n  vec3 normal,\n  out vec3 totalDiffuse,\n  out vec3 totalSpecular\n) {\n\n  totalSpecular = vec3(0.0);\n\n  if (!uUseLighting) {\n    totalDiffuse = vec3(1.0);\n    return;\n  }\n\n  totalDiffuse = vec3(0.0);\n\n  vec3 viewDirection = normalize(-modelPosition);\n\n  for (int j = 0; j < 5; j++) {\n    if (j < uDirectionalLightCount) {\n      vec3 lightVector = (uViewMatrix * vec4(uLightingDirection[j], 0.0)).xyz;\n      vec3 lightColor = uDirectionalDiffuseColors[j];\n      vec3 specularColor = uDirectionalSpecularColors[j];\n      LightResult result = _light(viewDirection, normal, lightVector);\n      totalDiffuse += result.diffuse * lightColor;\n      totalSpecular += result.specular * lightColor * specularColor;\n    }\n\n    if (j < uPointLightCount) {\n      vec3 lightPosition = (uViewMatrix * vec4(uPointLightLocation[j], 1.0)).xyz;\n      vec3 lightVector = modelPosition - lightPosition;\n    \n      //calculate attenuation\n      float lightDistance = length(lightVector);\n      float lightFalloff = 1.0 / (uConstantAttenuation + lightDistance * uLinearAttenuation + (lightDistance * lightDistance) * uQuadraticAttenuation);\n      vec3 lightColor = lightFalloff * uPointLightDiffuseColors[j];\n      vec3 specularColor = lightFalloff * uPointLightSpecularColors[j];\n\n      LightResult result = _light(viewDirection, normal, lightVector);\n      totalDiffuse += result.diffuse * lightColor;\n      totalSpecular += result.specular * lightColor * specularColor;\n    }\n\n    if(j < uSpotLightCount) {\n      vec3 lightPosition = (uViewMatrix * vec4(uSpotLightLocation[j], 1.0)).xyz;\n      vec3 lightVector = modelPosition - lightPosition;\n    \n      float lightDistance = length(lightVector);\n      float lightFalloff = 1.0 / (uConstantAttenuation + lightDistance * uLinearAttenuation + (lightDistance * lightDistance) * uQuadraticAttenuation);\n\n      vec3 lightDirection = (uViewMatrix * vec4(uSpotLightDirection[j], 0.0)).xyz;\n      float spotDot = dot(normalize(lightVector), normalize(lightDirection));\n      float spotFalloff;\n      if(spotDot < uSpotLightAngle[j]) {\n        spotFalloff = 0.0;\n      }\n      else {\n        spotFalloff = pow(spotDot, uSpotLightConc[j]);\n      }\n      lightFalloff *= spotFalloff;\n\n      vec3 lightColor = uSpotLightDiffuseColors[j];\n      vec3 specularColor = uSpotLightSpecularColors[j];\n     \n      LightResult result = _light(viewDirection, normal, lightVector);\n      \n      totalDiffuse += result.diffuse * lightColor * lightFalloff;\n      totalSpecular += result.specular * lightColor * specularColor * lightFalloff;\n    }\n  }\n\n  totalDiffuse *= diffuseFactor;\n  totalSpecular *= specularFactor;\n}\n",c={immediateVert:"attribute vec3 aPosition;\nattribute vec4 aVertexColor;\n\nuniform mat4 uModelViewMatrix;\nuniform mat4 uProjectionMatrix;\nuniform float uResolution;\nuniform float uPointSize;\n\nvarying vec4 vColor;\nvoid main(void) {\n  vec4 positionVec4 = vec4(aPosition, 1.0);\n  gl_Position = uProjectionMatrix * uModelViewMatrix * positionVec4;\n  vColor = aVertexColor;\n  gl_PointSize = uPointSize;\n}\n",vertexColorVert:"attribute vec3 aPosition;\nattribute vec4 aVertexColor;\n\nuniform mat4 uModelViewMatrix;\nuniform mat4 uProjectionMatrix;\n\nvarying vec4 vColor;\n\nvoid main(void) {\n  vec4 positionVec4 = vec4(aPosition, 1.0);\n  gl_Position = uProjectionMatrix * uModelViewMatrix * positionVec4;\n  vColor = aVertexColor;\n}\n",vertexColorFrag:"precision mediump float;\nvarying vec4 vColor;\nvoid main(void) {\n  gl_FragColor = vColor;\n}",normalVert:"attribute vec3 aPosition;\nattribute vec3 aNormal;\nattribute vec2 aTexCoord;\n\nuniform mat4 uModelViewMatrix;\nuniform mat4 uProjectionMatrix;\nuniform mat3 uNormalMatrix;\n\nvarying vec3 vVertexNormal;\nvarying highp vec2 vVertTexCoord;\n\nvoid main(void) {\n  vec4 positionVec4 = vec4(aPosition, 1.0);\n  gl_Position = uProjectionMatrix * uModelViewMatrix * positionVec4;\n  vVertexNormal = normalize(vec3( uNormalMatrix * aNormal ));\n  vVertTexCoord = aTexCoord;\n}\n",normalFrag:"precision mediump float;\nvarying vec3 vVertexNormal;\nvoid main(void) {\n  gl_FragColor = vec4(vVertexNormal, 1.0);\n}",basicFrag:"precision mediump float;\nuniform vec4 uMaterialColor;\nvoid main(void) {\n  gl_FragColor = uMaterialColor;\n}",lightVert:u+"// include lighting.glgl\n\nattribute vec3 aPosition;\nattribute vec3 aNormal;\nattribute vec2 aTexCoord;\n\nuniform mat4 uModelViewMatrix;\nuniform mat4 uProjectionMatrix;\nuniform mat3 uNormalMatrix;\n\nvarying highp vec2 vVertTexCoord;\nvarying vec3 vDiffuseColor;\nvarying vec3 vSpecularColor;\n\nvoid main(void) {\n\n  vec4 viewModelPosition = uModelViewMatrix * vec4(aPosition, 1.0);\n  gl_Position = uProjectionMatrix * viewModelPosition;\n\n  vec3 vertexNormal = normalize(uNormalMatrix * aNormal);\n  vVertTexCoord = aTexCoord;\n\n  totalLight(viewModelPosition.xyz, vertexNormal, vDiffuseColor, vSpecularColor);\n\n  for (int i = 0; i < 8; i++) {\n    if (i < uAmbientLightCount) {\n      vDiffuseColor += uAmbientColor[i];\n    }\n  }\n}\n",lightTextureFrag:"precision highp float;\n\nuniform vec4 uMaterialColor;\nuniform vec4 uTint;\nuniform sampler2D uSampler;\nuniform bool isTexture;\nuniform bool uEmissive;\n\nvarying highp vec2 vVertTexCoord;\nvarying vec3 vDiffuseColor;\nvarying vec3 vSpecularColor;\n\nvoid main(void) {\n  if(uEmissive && !isTexture) {\n    gl_FragColor = uMaterialColor;\n  }\n  else {\n    gl_FragColor = isTexture ? texture2D(uSampler, vVertTexCoord) * (uTint / vec4(255, 255, 255, 255)) : uMaterialColor;\n    gl_FragColor.rgb = gl_FragColor.rgb * vDiffuseColor + vSpecularColor;\n  }\n}",phongVert:"precision highp float;\nprecision highp int;\n\nattribute vec3 aPosition;\nattribute vec3 aNormal;\nattribute vec2 aTexCoord;\n\nuniform vec3 uAmbientColor[5];\n\nuniform mat4 uModelViewMatrix;\nuniform mat4 uProjectionMatrix;\nuniform mat3 uNormalMatrix;\nuniform int uAmbientLightCount;\n\nvarying vec3 vNormal;\nvarying vec2 vTexCoord;\nvarying vec3 vViewPosition;\nvarying vec3 vAmbientColor;\n\nvoid main(void) {\n\n  vec4 viewModelPosition = uModelViewMatrix * vec4(aPosition, 1.0);\n\n  // Pass varyings to fragment shader\n  vViewPosition = viewModelPosition.xyz;\n  gl_Position = uProjectionMatrix * viewModelPosition;  \n\n  vNormal = uNormalMatrix * aNormal;\n  vTexCoord = aTexCoord;\n\n  // TODO: this should be a uniform\n  vAmbientColor = vec3(0.0);\n  for (int i = 0; i < 5; i++) {\n    if (i < uAmbientLightCount) {\n      vAmbientColor += uAmbientColor[i];\n    }\n  }\n}\n",phongFrag:u+"// include lighting.glsl\nprecision highp float;\nprecision highp int;\n\nuniform vec4 uMaterialColor;\nuniform vec4 uTint;\nuniform sampler2D uSampler;\nuniform bool isTexture;\nuniform bool uEmissive;\n\nvarying vec3 vNormal;\nvarying vec2 vTexCoord;\nvarying vec3 vViewPosition;\nvarying vec3 vAmbientColor;\n\nvoid main(void) {\n\n  vec3 diffuse;\n  vec3 specular;\n  totalLight(vViewPosition, normalize(vNormal), diffuse, specular);\n\n  if(uEmissive && !isTexture) {\n    gl_FragColor = uMaterialColor;\n  }\n  else {\n    gl_FragColor = isTexture ? texture2D(uSampler, vTexCoord) * (uTint / vec4(255, 255, 255, 255)) : uMaterialColor;\n    gl_FragColor.rgb = gl_FragColor.rgb * (diffuse + vAmbientColor) + specular;\n  }\n}",fontVert:"precision mediump float;\n\nattribute vec3 aPosition;\nattribute vec2 aTexCoord;\nuniform mat4 uModelViewMatrix;\nuniform mat4 uProjectionMatrix;\n\nuniform vec4 uGlyphRect;\nuniform float uGlyphOffset;\n\nvarying vec2 vTexCoord;\nvarying float w;\n\nvoid main() {\n  vec4 positionVec4 = vec4(aPosition, 1.0);\n\n  // scale by the size of the glyph's rectangle\n  positionVec4.xy *= uGlyphRect.zw - uGlyphRect.xy;\n\n  // move to the corner of the glyph\n  positionVec4.xy += uGlyphRect.xy;\n\n  // move to the letter's line offset\n  positionVec4.x += uGlyphOffset;\n  \n  gl_Position = uProjectionMatrix * uModelViewMatrix * positionVec4;\n  vTexCoord = aTexCoord;\n  w = gl_Position.w;\n}\n",fontFrag:"#extension GL_OES_standard_derivatives : enable\nprecision mediump float;\n\n#if 0\n  // simulate integer math using floats\n\t#define int float\n\t#define ivec2 vec2\n\t#define INT(x) float(x)\n\n\tint ifloor(float v) { return floor(v); }\n\tivec2 ifloor(vec2 v) { return floor(v); }\n\n#else\n  // use native integer math\n\tprecision highp int;\n\t#define INT(x) x\n\n\tint ifloor(float v) { return int(v); }\n\tint ifloor(int v) { return v; }\n\tivec2 ifloor(vec2 v) { return ivec2(v); }\n\n#endif\n\nuniform sampler2D uSamplerStrokes;\nuniform sampler2D uSamplerRowStrokes;\nuniform sampler2D uSamplerRows;\nuniform sampler2D uSamplerColStrokes;\nuniform sampler2D uSamplerCols;\n\nuniform ivec2 uStrokeImageSize;\nuniform ivec2 uCellsImageSize;\nuniform ivec2 uGridImageSize;\n\nuniform ivec2 uGridOffset;\nuniform ivec2 uGridSize;\nuniform vec4 uMaterialColor;\n\nvarying vec2 vTexCoord;\n\n// some helper functions\nint round(float v) { return ifloor(v + 0.5); }\nivec2 round(vec2 v) { return ifloor(v + 0.5); }\nfloat saturate(float v) { return clamp(v, 0.0, 1.0); }\nvec2 saturate(vec2 v) { return clamp(v, 0.0, 1.0); }\n\nint mul(float v1, int v2) {\n  return ifloor(v1 * float(v2));\n}\n\nivec2 mul(vec2 v1, ivec2 v2) {\n  return ifloor(v1 * vec2(v2) + 0.5);\n}\n\n// unpack a 16-bit integer from a float vec2\nint getInt16(vec2 v) {\n  ivec2 iv = round(v * 255.0);\n  return iv.x * INT(128) + iv.y;\n}\n\nvec2 pixelScale;\nvec2 coverage = vec2(0.0);\nvec2 weight = vec2(0.5);\nconst float minDistance = 1.0/8192.0;\nconst float hardness = 1.05; // amount of antialias\n\n// the maximum number of curves in a glyph\nconst int N = INT(250);\n\n// retrieves an indexed pixel from a sampler\nvec4 getTexel(sampler2D sampler, int pos, ivec2 size) {\n  int width = size.x;\n  int y = ifloor(pos / width);\n  int x = pos - y * width;  // pos % width\n\n  return texture2D(sampler, (vec2(x, y) + 0.5) / vec2(size));\n}\n\nvoid calulateCrossings(vec2 p0, vec2 p1, vec2 p2, out vec2 C1, out vec2 C2) {\n\n  // get the coefficients of the quadratic in t\n  vec2 a = p0 - p1 * 2.0 + p2;\n  vec2 b = p0 - p1;\n  vec2 c = p0 - vTexCoord;\n\n  // found out which values of 't' it crosses the axes\n  vec2 surd = sqrt(max(vec2(0.0), b * b - a * c));\n  vec2 t1 = ((b - surd) / a).yx;\n  vec2 t2 = ((b + surd) / a).yx;\n\n  // approximate straight lines to avoid rounding errors\n  if (abs(a.y) < 0.001)\n    t1.x = t2.x = c.y / (2.0 * b.y);\n\n  if (abs(a.x) < 0.001)\n    t1.y = t2.y = c.x / (2.0 * b.x);\n\n  // plug into quadratic formula to find the corrdinates of the crossings\n  C1 = ((a * t1 - b * 2.0) * t1 + c) * pixelScale;\n  C2 = ((a * t2 - b * 2.0) * t2 + c) * pixelScale;\n}\n\nvoid coverageX(vec2 p0, vec2 p1, vec2 p2) {\n\n  vec2 C1, C2;\n  calulateCrossings(p0, p1, p2, C1, C2);\n\n  // determine on which side of the x-axis the points lie\n  bool y0 = p0.y > vTexCoord.y;\n  bool y1 = p1.y > vTexCoord.y;\n  bool y2 = p2.y > vTexCoord.y;\n\n  // could web be under the curve (after t1)?\n  if (y1 ? !y2 : y0) {\n    // add the coverage for t1\n    coverage.x += saturate(C1.x + 0.5);\n    // calculate the anti-aliasing for t1\n    weight.x = min(weight.x, abs(C1.x));\n  }\n\n  // are we outside the curve (after t2)?\n  if (y1 ? !y0 : y2) {\n    // subtract the coverage for t2\n    coverage.x -= saturate(C2.x + 0.5);\n    // calculate the anti-aliasing for t2\n    weight.x = min(weight.x, abs(C2.x));\n  }\n}\n\n// this is essentially the same as coverageX, but with the axes swapped\nvoid coverageY(vec2 p0, vec2 p1, vec2 p2) {\n\n  vec2 C1, C2;\n  calulateCrossings(p0, p1, p2, C1, C2);\n\n  bool x0 = p0.x > vTexCoord.x;\n  bool x1 = p1.x > vTexCoord.x;\n  bool x2 = p2.x > vTexCoord.x;\n\n  if (x1 ? !x2 : x0) {\n    coverage.y -= saturate(C1.y + 0.5);\n    weight.y = min(weight.y, abs(C1.y));\n  }\n\n  if (x1 ? !x0 : x2) {\n    coverage.y += saturate(C2.y + 0.5);\n    weight.y = min(weight.y, abs(C2.y));\n  }\n}\n\nvoid main() {\n\n  // calculate the pixel scale based on screen-coordinates\n  pixelScale = hardness / fwidth(vTexCoord);\n\n  // which grid cell is this pixel in?\n  ivec2 gridCoord = ifloor(vTexCoord * vec2(uGridSize));\n\n  // intersect curves in this row\n  {\n    // the index into the row info bitmap\n    int rowIndex = gridCoord.y + uGridOffset.y;\n    // fetch the info texel\n    vec4 rowInfo = getTexel(uSamplerRows, rowIndex, uGridImageSize);\n    // unpack the rowInfo\n    int rowStrokeIndex = getInt16(rowInfo.xy);\n    int rowStrokeCount = getInt16(rowInfo.zw);\n\n    for (int iRowStroke = INT(0); iRowStroke < N; iRowStroke++) {\n      if (iRowStroke >= rowStrokeCount)\n        break;\n\n      // each stroke is made up of 3 points: the start and control point\n      // and the start of the next curve.\n      // fetch the indices of this pair of strokes:\n      vec4 strokeIndices = getTexel(uSamplerRowStrokes, rowStrokeIndex++, uCellsImageSize);\n\n      // unpack the stroke index\n      int strokePos = getInt16(strokeIndices.xy);\n\n      // fetch the two strokes\n      vec4 stroke0 = getTexel(uSamplerStrokes, strokePos + INT(0), uStrokeImageSize);\n      vec4 stroke1 = getTexel(uSamplerStrokes, strokePos + INT(1), uStrokeImageSize);\n\n      // calculate the coverage\n      coverageX(stroke0.xy, stroke0.zw, stroke1.xy);\n    }\n  }\n\n  // intersect curves in this column\n  {\n    int colIndex = gridCoord.x + uGridOffset.x;\n    vec4 colInfo = getTexel(uSamplerCols, colIndex, uGridImageSize);\n    int colStrokeIndex = getInt16(colInfo.xy);\n    int colStrokeCount = getInt16(colInfo.zw);\n    \n    for (int iColStroke = INT(0); iColStroke < N; iColStroke++) {\n      if (iColStroke >= colStrokeCount)\n        break;\n\n      vec4 strokeIndices = getTexel(uSamplerColStrokes, colStrokeIndex++, uCellsImageSize);\n\n      int strokePos = getInt16(strokeIndices.xy);\n      vec4 stroke0 = getTexel(uSamplerStrokes, strokePos + INT(0), uStrokeImageSize);\n      vec4 stroke1 = getTexel(uSamplerStrokes, strokePos + INT(1), uStrokeImageSize);\n      coverageY(stroke0.xy, stroke0.zw, stroke1.xy);\n    }\n  }\n\n  weight = saturate(1.0 - weight * 2.0);\n  float distance = max(weight.x + weight.y, minDistance); // manhattan approx.\n  float antialias = abs(dot(coverage, weight) / distance);\n  float cover = min(abs(coverage.x), abs(coverage.y));\n  gl_FragColor = uMaterialColor;\n  gl_FragColor.a *= saturate(max(antialias, cover));\n}",lineVert:"/*\n  Part of the Processing project - http://processing.org\n  Copyright (c) 2012-15 The Processing Foundation\n  Copyright (c) 2004-12 Ben Fry and Casey Reas\n  Copyright (c) 2001-04 Massachusetts Institute of Technology\n  This library is free software; you can redistribute it and/or\n  modify it under the terms of the GNU Lesser General Public\n  License as published by the Free Software Foundation, version 2.1.\n  This library is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n  Lesser General Public License for more details.\n  You should have received a copy of the GNU Lesser General\n  Public License along with this library; if not, write to the\n  Free Software Foundation, Inc., 59 Temple Place, Suite 330,\n  Boston, MA  02111-1307  USA\n*/\n\n#define PROCESSING_LINE_SHADER\n\nuniform mat4 uModelViewMatrix;\nuniform mat4 uProjectionMatrix;\nuniform float uStrokeWeight;\n\nuniform vec4 uViewport;\nuniform int uPerspective;\n\nattribute vec4 aPosition;\nattribute vec4 aDirection;\n  \nvoid main() {\n  // using a scale <1 moves the lines towards the camera\n  // in order to prevent popping effects due to half of\n  // the line disappearing behind the geometry faces.\n  vec3 scale = vec3(0.9995);\n\n  vec4 posp = uModelViewMatrix * aPosition;\n  vec4 posq = uModelViewMatrix * (aPosition + vec4(aDirection.xyz, 0));\n\n  // Moving vertices slightly toward the camera\n  // to avoid depth-fighting with the fill triangles.\n  // Discussed here:\n  // http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&Number=252848  \n  posp.xyz = posp.xyz * scale;\n  posq.xyz = posq.xyz * scale;\n\n  vec4 p = uProjectionMatrix * posp;\n  vec4 q = uProjectionMatrix * posq;\n\n  // formula to convert from clip space (range -1..1) to screen space (range 0..[width or height])\n  // screen_p = (p.xy/p.w + <1,1>) * 0.5 * uViewport.zw\n\n  // prevent division by W by transforming the tangent formula (div by 0 causes\n  // the line to disappear, see https://github.com/processing/processing/issues/5183)\n  // t = screen_q - screen_p\n  //\n  // tangent is normalized and we don't care which aDirection it points to (+-)\n  // t = +- normalize( screen_q - screen_p )\n  // t = +- normalize( (q.xy/q.w+<1,1>)*0.5*uViewport.zw - (p.xy/p.w+<1,1>)*0.5*uViewport.zw )\n  //\n  // extract common factor, <1,1> - <1,1> cancels out\n  // t = +- normalize( (q.xy/q.w - p.xy/p.w) * 0.5 * uViewport.zw )\n  //\n  // convert to common divisor\n  // t = +- normalize( ((q.xy*p.w - p.xy*q.w) / (p.w*q.w)) * 0.5 * uViewport.zw )\n  //\n  // remove the common scalar divisor/factor, not needed due to normalize and +-\n  // (keep uViewport - can't remove because it has different components for x and y\n  //  and corrects for aspect ratio, see https://github.com/processing/processing/issues/5181)\n  // t = +- normalize( (q.xy*p.w - p.xy*q.w) * uViewport.zw )\n\n  vec2 tangent = normalize((q.xy*p.w - p.xy*q.w) * uViewport.zw);\n\n  // flip tangent to normal (it's already normalized)\n  vec2 normal = vec2(-tangent.y, tangent.x);\n\n  float thickness = aDirection.w * uStrokeWeight;\n  vec2 offset = normal * thickness / 2.0;\n\n  vec2 curPerspScale;\n\n  if(uPerspective == 1) {\n    // Perspective ---\n    // convert from world to clip by multiplying with projection scaling factor\n    // to get the right thickness (see https://github.com/processing/processing/issues/5182)\n    // invert Y, projections in Processing invert Y\n    curPerspScale = (uProjectionMatrix * vec4(1, -1, 0, 0)).xy;\n  } else {\n    // No Perspective ---\n    // multiply by W (to cancel out division by W later in the pipeline) and\n    // convert from screen to clip (derived from clip to screen above)\n    curPerspScale = p.w / (0.5 * uViewport.zw);\n  }\n\n  gl_Position.xy = p.xy + offset.xy * curPerspScale;\n  gl_Position.zw = p.zw;\n}\n",lineFrag:"precision mediump float;\nprecision mediump int;\n\nuniform vec4 uMaterialColor;\n\nvoid main() {\n  gl_FragColor = uMaterialColor;\n}",pointVert:"attribute vec3 aPosition;\nuniform float uPointSize;\nvarying float vStrokeWeight;\nuniform mat4 uModelViewMatrix;\nuniform mat4 uProjectionMatrix;\nvoid main() {\n\tvec4 positionVec4 =  vec4(aPosition, 1.0);\n\tgl_Position = uProjectionMatrix * uModelViewMatrix * positionVec4;\n\tgl_PointSize = uPointSize;\n\tvStrokeWeight = uPointSize;\n}",pointFrag:"precision mediump float;\nprecision mediump int;\nuniform vec4 uMaterialColor;\nvarying float vStrokeWeight;\n\nvoid main(){\n\tfloat mask = 0.0;\n\n\t// make a circular mask using the gl_PointCoord (goes from 0 - 1 on a point)\n    // might be able to get a nicer edge on big strokeweights with smoothstep but slightly less performant\n\n\tmask = step(0.98, length(gl_PointCoord * 2.0 - 1.0));\n\n\t// if strokeWeight is 1 or less lets just draw a square\n\t// this prevents weird artifacting from carving circles when our points are really small\n\t// if strokeWeight is larger than 1, we just use it as is\n\n\tmask = mix(0.0, mask, clamp(floor(vStrokeWeight - 0.5),0.0,1.0));\n\n\t// throw away the borders of the mask\n    // otherwise we get weird alpha blending issues\n\n\tif(mask > 0.98){\n      discard;\n  \t}\n\n  \tgl_FragColor = vec4(uMaterialColor.rgb * (1.0 - mask), uMaterialColor.a) ;\n}"};p.default.RendererGL=function(e,t,r,n){return p.default.Renderer.call(this,e,t,r),this._setAttributeDefaults(t),this._initContext(),this.isP3D=!0,this.GL=this.drawingContext,this._pInst._setProperty("drawingContext",this.drawingContext),this._isErasing=!1,this._enableLighting=!1,this.ambientLightColors=[],this.specularColors=[1,1,1],this.directionalLightDirections=[],this.directionalLightDiffuseColors=[],this.directionalLightSpecularColors=[],this.pointLightPositions=[],this.pointLightDiffuseColors=[],this.pointLightSpecularColors=[],this.spotLightPositions=[],this.spotLightDirections=[],this.spotLightDiffuseColors=[],this.spotLightSpecularColors=[],this.spotLightAngle=[],this.spotLightConc=[],this.drawMode=o.FILL,this.curFillColor=this._cachedFillStyle=[1,1,1,1],this.curStrokeColor=this._cachedStrokeStyle=[0,0,0,1],this.curBlendMode=o.BLEND,this._cachedBlendMode=void 0,this.blendExt=this.GL.getExtension("EXT_blend_minmax"),this._isBlending=!1,this._useSpecularMaterial=!1,this._useEmissiveMaterial=!1,this._useNormalMaterial=!1,this._useShininess=1,this._tint=[255,255,255,255],this.constantAttenuation=1,this.linearAttenuation=0,this.quadraticAttenuation=0,this.uMVMatrix=new p.default.Matrix,this.uPMatrix=new p.default.Matrix,this.uNMatrix=new p.default.Matrix("mat3"),this._curCamera=new p.default.Camera(this),this._curCamera._computeCameraDefaultSettings(),this._curCamera._setDefaultCamera(),this._defaultLightShader=void 0,this._defaultImmediateModeShader=void 0,this._defaultNormalShader=void 0,this._defaultColorShader=void 0,this._defaultPointShader=void 0,this.userFillShader=void 0,this.userStrokeShader=void 0,this.userPointShader=void 0,this.retainedMode={geometry:{},buffers:{stroke:[new p.default.RenderBuffer(3,"lineVertices","lineVertexBuffer","aPosition",this,this._flatten),new p.default.RenderBuffer(4,"lineNormals","lineNormalBuffer","aDirection",this,this._flatten)],fill:[new p.default.RenderBuffer(3,"vertices","vertexBuffer","aPosition",this,this._vToNArray),new p.default.RenderBuffer(3,"vertexNormals","normalBuffer","aNormal",this,this._vToNArray),new p.default.RenderBuffer(4,"vertexColors","colorBuffer","aMaterialColor",this),new p.default.RenderBuffer(3,"vertexAmbients","ambientBuffer","aAmbientColor",this),new p.default.RenderBuffer(2,"uvs","uvBuffer","aTexCoord",this,this._flatten)],text:[new p.default.RenderBuffer(3,"vertices","vertexBuffer","aPosition",this,this._vToNArray),new p.default.RenderBuffer(2,"uvs","uvBuffer","aTexCoord",this,this._flatten)]}},this.immediateMode={geometry:new p.default.Geometry,shapeMode:o.TRIANGLE_FAN,_bezierVertex:[],_quadraticVertex:[],_curveVertex:[],buffers:{fill:[new p.default.RenderBuffer(3,"vertices","vertexBuffer","aPosition",this,this._vToNArray),new p.default.RenderBuffer(3,"vertexNormals","normalBuffer","aNormal",this,this._vToNArray),new p.default.RenderBuffer(4,"vertexColors","colorBuffer","aVertexColor",this),new p.default.RenderBuffer(3,"vertexAmbients","ambientBuffer","aAmbientColor",this),new p.default.RenderBuffer(2,"uvs","uvBuffer","aTexCoord",this,this._flatten)],stroke:[new p.default.RenderBuffer(3,"lineVertices","lineVertexBuffer","aPosition",this,this._flatten),new p.default.RenderBuffer(4,"lineNormals","lineNormalBuffer","aDirection",this,this._flatten)],point:this.GL.createBuffer()}},this.pointSize=5,this.curStrokeWeight=1,this.textures=[],this.textureMode=o.IMAGE,this.textureWrapX=o.CLAMP,this.textureWrapY=o.CLAMP,this._tex=null,this._curveTightness=6,this._lookUpTableBezier=[],this._lookUpTableQuadratic=[],this._lutBezierDetail=0,this._lutQuadraticDetail=0,this._tessy=this._initTessy(),this.fontInfos={},this._curShader=void 0,this},p.default.RendererGL.prototype=Object.create(p.default.Renderer.prototype),p.default.RendererGL.prototype._setAttributeDefaults=function(e){var t={alpha:!0,depth:!0,stencil:!0,antialias:navigator.userAgent.toLowerCase().includes("safari"),premultipliedAlpha:!1,preserveDrawingBuffer:!0,perPixelLighting:!0};null===e._glAttributes?e._glAttributes=t:e._glAttributes=Object.assign(t,e._glAttributes)},p.default.RendererGL.prototype._initContext=function(){try{if(this.drawingContext=this.canvas.getContext("webgl",this._pInst._glAttributes)||this.canvas.getContext("experimental-webgl",this._pInst._glAttributes),null===this.drawingContext)throw new Error("Error creating webgl context");var e=this.drawingContext;e.enable(e.DEPTH_TEST),e.depthFunc(e.LEQUAL),e.viewport(0,0,e.drawingBufferWidth,e.drawingBufferHeight),this._viewport=this.drawingContext.getParameter(this.drawingContext.VIEWPORT)}catch(e){throw e}},p.default.RendererGL.prototype._resetContext=function(e,t){var r=this.width,n=this.height,a=this.canvas.id,o=this._pInst instanceof p.default.Graphics;if(o){var i=this._pInst;i.canvas.parentNode.removeChild(i.canvas),i.canvas=document.createElement("canvas"),(i._pInst._userNode||document.body).appendChild(i.canvas),p.default.Element.call(i,i.canvas,i._pInst),i.width=r,i.height=n}else{var s=this.canvas;s&&s.parentNode.removeChild(s),(s=document.createElement("canvas")).id=a,this._pInst._userNode?this._pInst._userNode.appendChild(s):document.body.appendChild(s),this._pInst.canvas=s}var l=new p.default.RendererGL(this._pInst.canvas,this._pInst,!o);this._pInst._setProperty("_renderer",l),l.resize(r,n),l._applyDefaults(),o||this._pInst._elements.push(l),"function"==typeof t&&setTimeout(function(){t.apply(window._renderer,e)},0)},p.default.prototype.setAttributes=function(e,t){if(void 0!==this._glAttributes){var r=!0;if(void 0!==t?(null===this._glAttributes&&(this._glAttributes={}),this._glAttributes[e]!==t&&(this._glAttributes[e]=t,r=!1)):e instanceof Object&&this._glAttributes!==e&&(this._glAttributes=e,r=!1),this._renderer.isP3D&&!r){if(!this._setupDone)for(var n in this._renderer.retainedMode.geometry)if(this._renderer.retainedMode.geometry.hasOwnProperty(n))return void console.error("Sorry, Could not set the attributes, you need to call setAttributes() before calling the other drawing methods in setup()");this.push(),this._renderer._resetContext(),this.pop(),this._renderer._curCamera&&(this._renderer._curCamera._renderer=this._renderer)}}else console.log("You are trying to use setAttributes on a p5.Graphics object that does not use a WEBGL renderer.")},p.default.RendererGL.prototype._update=function(){this.uMVMatrix.set(this._curCamera.cameraMatrix.mat4[0],this._curCamera.cameraMatrix.mat4[1],this._curCamera.cameraMatrix.mat4[2],this._curCamera.cameraMatrix.mat4[3],this._curCamera.cameraMatrix.mat4[4],this._curCamera.cameraMatrix.mat4[5],this._curCamera.cameraMatrix.mat4[6],this._curCamera.cameraMatrix.mat4[7],this._curCamera.cameraMatrix.mat4[8],this._curCamera.cameraMatrix.mat4[9],this._curCamera.cameraMatrix.mat4[10],this._curCamera.cameraMatrix.mat4[11],this._curCamera.cameraMatrix.mat4[12],this._curCamera.cameraMatrix.mat4[13],this._curCamera.cameraMatrix.mat4[14],this._curCamera.cameraMatrix.mat4[15]),this.ambientLightColors.length=0,this.specularColors=[1,1,1],this.directionalLightDirections.length=0,this.directionalLightDiffuseColors.length=0,this.directionalLightSpecularColors.length=0,this.pointLightPositions.length=0,this.pointLightDiffuseColors.length=0,this.pointLightSpecularColors.length=0,this.spotLightPositions.length=0,this.spotLightDirections.length=0,this.spotLightDiffuseColors.length=0,this.spotLightSpecularColors.length=0,this.spotLightAngle.length=0,this.spotLightConc.length=0,this._enableLighting=!1,this._tint=[255,255,255,255],this.GL.clear(this.GL.DEPTH_BUFFER_BIT)},p.default.RendererGL.prototype.background=function(){var e,t=(e=this._pInst).color.apply(e,arguments),r=t.levels[0]/255,n=t.levels[1]/255,a=t.levels[2]/255,o=t.levels[3]/255;this.GL.clearColor(r,n,a,o),this.GL.clear(this.GL.COLOR_BUFFER_BIT)},p.default.RendererGL.prototype.fill=function(e,t,r,n){var a=p.default.prototype.color.apply(this._pInst,arguments);this.curFillColor=a._array,this.drawMode=o.FILL,this._useNormalMaterial=!1,this._tex=null},p.default.RendererGL.prototype.stroke=function(e,t,r,n){arguments[3]=255;var a=p.default.prototype.color.apply(this._pInst,arguments);this.curStrokeColor=a._array},p.default.RendererGL.prototype.strokeCap=function(e){console.error("Sorry, strokeCap() is not yet implemented in WEBGL mode")},p.default.RendererGL.prototype.strokeJoin=function(e){console.error("Sorry, strokeJoin() is not yet implemented in WEBGL mode")},p.default.RendererGL.prototype.filter=function(e){console.error("filter() does not work in WEBGL mode")},p.default.RendererGL.prototype.blendMode=function(e){e===o.DARKEST||e===o.LIGHTEST||e===o.ADD||e===o.BLEND||e===o.SUBTRACT||e===o.SCREEN||e===o.EXCLUSION||e===o.REPLACE||e===o.MULTIPLY||e===o.REMOVE?this.curBlendMode=e:e!==o.BURN&&e!==o.OVERLAY&&e!==o.HARD_LIGHT&&e!==o.SOFT_LIGHT&&e!==o.DODGE||console.warn("BURN, OVERLAY, HARD_LIGHT, SOFT_LIGHT, and DODGE only work for blendMode in 2D mode.")},p.default.RendererGL.prototype.erase=function(e,t){this._isErasing||(this._applyBlendMode(o.REMOVE),this._isErasing=!0,this._cachedFillStyle=this.curFillColor.slice(),this.curFillColor=[1,1,1,e/255],this._cachedStrokeStyle=this.curStrokeColor.slice(),this.curStrokeColor=[1,1,1,t/255])},p.default.RendererGL.prototype.noErase=function(){this._isErasing&&(this._isErasing=!1,this.curFillColor=this._cachedFillStyle.slice(),this.curStrokeColor=this._cachedStrokeStyle.slice(),this.blendMode(this._cachedBlendMode))},p.default.RendererGL.prototype.strokeWeight=function(e){this.curStrokeWeight!==e&&(this.pointSize=e,this.curStrokeWeight=e)},p.default.RendererGL.prototype._getPixel=function(e,t){var r;return r=new Uint8Array(4),this.drawingContext.readPixels(e,t,1,1,this.drawingContext.RGBA,this.drawingContext.UNSIGNED_BYTE,r),[r[0],r[1],r[2],r[3]]},p.default.RendererGL.prototype.loadPixels=function(){var e=this._pixelsState;if(!0===this._pInst._glAttributes.preserveDrawingBuffer){var t=e.pixels,r=this.GL.drawingBufferWidth*this.GL.drawingBufferHeight*4;t instanceof Uint8Array&&t.length===r||(t=new Uint8Array(r),this._pixelsState._setProperty("pixels",t));var n=this._pInst._pixelDensity;this.GL.readPixels(0,0,this.width*n,this.height*n,this.GL.RGBA,this.GL.UNSIGNED_BYTE,t)}else console.log("loadPixels only works in WebGL when preserveDrawingBuffer is true.")},p.default.RendererGL.prototype.geometryInHash=function(e){return void 0!==this.retainedMode.geometry[e]},p.default.RendererGL.prototype.resize=function(e,t){p.default.Renderer.prototype.resize.call(this,e,t),this.GL.viewport(0,0,this.GL.drawingBufferWidth,this.GL.drawingBufferHeight),this._viewport=this.GL.getParameter(this.GL.VIEWPORT),this._curCamera._resize();var r=this._pixelsState;void 0!==r.pixels&&r._setProperty("pixels",new Uint8Array(this.GL.drawingBufferWidth*this.GL.drawingBufferHeight*4))},p.default.RendererGL.prototype.clear=function(){var e=(arguments.length<=0?void 0:arguments[0])||0,t=(arguments.length<=1?void 0:arguments[1])||0,r=(arguments.length<=2?void 0:arguments[2])||0,n=(arguments.length<=3?void 0:arguments[3])||0;this.GL.clearColor(e,t,r,n),this.GL.clear(this.GL.COLOR_BUFFER_BIT|this.GL.DEPTH_BUFFER_BIT)},p.default.RendererGL.prototype.applyMatrix=function(e,t,r,n,a,o){16===arguments.length?p.default.Matrix.prototype.apply.apply(this.uMVMatrix,arguments):this.uMVMatrix.apply([e,t,0,0,r,n,0,0,0,0,1,0,a,o,0,1])},p.default.RendererGL.prototype.translate=function(e,t,r){return e instanceof p.default.Vector&&(r=e.z,t=e.y,e=e.x),this.uMVMatrix.translate([e,t,r]),this},p.default.RendererGL.prototype.scale=function(e,t,r){return this.uMVMatrix.scale(e,t,r),this},p.default.RendererGL.prototype.rotate=function(e,t){return void 0===t?this.rotateZ(e):(p.default.Matrix.prototype.rotate.apply(this.uMVMatrix,arguments),this)},p.default.RendererGL.prototype.rotateX=function(e){return this.rotate(e,1,0,0),this},p.default.RendererGL.prototype.rotateY=function(e){return this.rotate(e,0,1,0),this},p.default.RendererGL.prototype.rotateZ=function(e){return this.rotate(e,0,0,1),this},p.default.RendererGL.prototype.push=function(){var e=p.default.Renderer.prototype.push.apply(this),t=e.properties;return t.uMVMatrix=this.uMVMatrix.copy(),t.uPMatrix=this.uPMatrix.copy(),t._curCamera=this._curCamera,this._curCamera=this._curCamera.copy(),t.ambientLightColors=this.ambientLightColors.slice(),t.specularColors=this.specularColors.slice(),t.directionalLightDirections=this.directionalLightDirections.slice(),t.directionalLightDiffuseColors=this.directionalLightDiffuseColors.slice(),t.directionalLightSpecularColors=this.directionalLightSpecularColors.slice(),t.pointLightPositions=this.pointLightPositions.slice(),t.pointLightDiffuseColors=this.pointLightDiffuseColors.slice(),t.pointLightSpecularColors=this.pointLightSpecularColors.slice(),t.spotLightPositions=this.spotLightPositions.slice(),t.spotLightDirections=this.spotLightDirections.slice(),t.spotLightDiffuseColors=this.spotLightDiffuseColors.slice(),t.spotLightSpecularColors=this.spotLightSpecularColors.slice(),t.spotLightAngle=this.spotLightAngle.slice(),t.spotLightConc=this.spotLightConc.slice(),t.userFillShader=this.userFillShader,t.userStrokeShader=this.userStrokeShader,t.userPointShader=this.userPointShader,t.pointSize=this.pointSize,t.curStrokeWeight=this.curStrokeWeight,t.curStrokeColor=this.curStrokeColor,t.curFillColor=this.curFillColor,t._useSpecularMaterial=this._useSpecularMaterial,t._useEmissiveMaterial=this._useEmissiveMaterial,t._useShininess=this._useShininess,t.constantAttenuation=this.constantAttenuation,t.linearAttenuation=this.linearAttenuation,t.quadraticAttenuation=this.quadraticAttenuation,t._enableLighting=this._enableLighting,t._useNormalMaterial=this._useNormalMaterial,t._tex=this._tex,t.drawMode=this.drawMode,e},p.default.RendererGL.prototype.resetMatrix=function(){return this.uMVMatrix=p.default.Matrix.identity(this._pInst),this},p.default.RendererGL.prototype._getImmediateStrokeShader=function(){var e=this.userStrokeShader;return e&&e.isStrokeShader()?e:this._getLineShader()},p.default.RendererGL.prototype._getRetainedStrokeShader=p.default.RendererGL.prototype._getImmediateStrokeShader,p.default.RendererGL.prototype._getImmediateFillShader=function(){var e=this.userFillShader;if(this._useNormalMaterial&&(!e||!e.isNormalShader()))return this._getNormalShader();if(this._enableLighting){if(!e||!e.isLightShader())return this._getLightShader()}else if(this._tex){if(!e||!e.isTextureShader())return this._getLightShader()}else if(!e)return this._getImmediateModeShader();return e},p.default.RendererGL.prototype._getRetainedFillShader=function(){if(this._useNormalMaterial)return this._getNormalShader();var e=this.userFillShader;if(this._enableLighting){if(!e||!e.isLightShader())return this._getLightShader()}else if(this._tex){if(!e||!e.isTextureShader())return this._getLightShader()}else if(!e)return this._getColorShader();return e},p.default.RendererGL.prototype._getImmediatePointShader=function(){var e=this.userPointShader;return e&&e.isPointShader()?e:this._getPointShader()},p.default.RendererGL.prototype._getRetainedLineShader=p.default.RendererGL.prototype._getImmediateLineShader,p.default.RendererGL.prototype._getLightShader=function(){return this._defaultLightShader||(this._pInst._glAttributes.perPixelLighting?this._defaultLightShader=new p.default.Shader(this,c.phongVert,c.phongFrag):this._defaultLightShader=new p.default.Shader(this,c.lightVert,c.lightTextureFrag)),this._defaultLightShader},p.default.RendererGL.prototype._getImmediateModeShader=function(){return this._defaultImmediateModeShader||(this._defaultImmediateModeShader=new p.default.Shader(this,c.immediateVert,c.vertexColorFrag)),this._defaultImmediateModeShader},p.default.RendererGL.prototype._getNormalShader=function(){return this._defaultNormalShader||(this._defaultNormalShader=new p.default.Shader(this,c.normalVert,c.normalFrag)),this._defaultNormalShader},p.default.RendererGL.prototype._getColorShader=function(){return this._defaultColorShader||(this._defaultColorShader=new p.default.Shader(this,c.normalVert,c.basicFrag)),this._defaultColorShader},p.default.RendererGL.prototype._getPointShader=function(){return this._defaultPointShader||(this._defaultPointShader=new p.default.Shader(this,c.pointVert,c.pointFrag)),this._defaultPointShader},p.default.RendererGL.prototype._getLineShader=function(){return this._defaultLineShader||(this._defaultLineShader=new p.default.Shader(this,c.lineVert,c.lineFrag)),this._defaultLineShader},p.default.RendererGL.prototype._getFontShader=function(){return this._defaultFontShader||(this.GL.getExtension("OES_standard_derivatives"),this._defaultFontShader=new p.default.Shader(this,c.fontVert,c.fontFrag)),this._defaultFontShader},p.default.RendererGL.prototype._getEmptyTexture=function(){if(!this._emptyTexture){var e=new p.default.Image(1,1);e.set(0,0,255),this._emptyTexture=new p.default.Texture(this,e)}return this._emptyTexture},p.default.RendererGL.prototype.getTexture=function(e){var t=this.textures,r=!0,n=!1,a=void 0;try{for(var o,i=t[Symbol.iterator]();!(r=(o=i.next()).done);r=!0){var s=o.value;if(s.src===e)return s}}catch(e){n=!0,a=e}finally{try{r||null==i.return||i.return()}finally{if(n)throw a}}var l=new p.default.Texture(this,e);return t.push(l),l},p.default.RendererGL.prototype._setStrokeUniforms=function(e){e.bindShader(),e.setUniform("uMaterialColor",this.curStrokeColor),e.setUniform("uStrokeWeight",this.curStrokeWeight)},p.default.RendererGL.prototype._setFillUniforms=function(e){e.bindShader(),e.setUniform("uMaterialColor",this.curFillColor),e.setUniform("isTexture",!!this._tex),this._tex&&e.setUniform("uSampler",this._tex),e.setUniform("uTint",this._tint),e.setUniform("uSpecular",this._useSpecularMaterial),e.setUniform("uEmissive",this._useEmissiveMaterial),e.setUniform("uShininess",this._useShininess),e.setUniform("uUseLighting",this._enableLighting);var t=this.pointLightDiffuseColors.length/3;e.setUniform("uPointLightCount",t),e.setUniform("uPointLightLocation",this.pointLightPositions),e.setUniform("uPointLightDiffuseColors",this.pointLightDiffuseColors),e.setUniform("uPointLightSpecularColors",this.pointLightSpecularColors);var r=this.directionalLightDiffuseColors.length/3;e.setUniform("uDirectionalLightCount",r),e.setUniform("uLightingDirection",this.directionalLightDirections),e.setUniform("uDirectionalDiffuseColors",this.directionalLightDiffuseColors),e.setUniform("uDirectionalSpecularColors",this.directionalLightSpecularColors);var n=this.ambientLightColors.length/3;e.setUniform("uAmbientLightCount",n),e.setUniform("uAmbientColor",this.ambientLightColors);var a=this.spotLightDiffuseColors.length/3;e.setUniform("uSpotLightCount",a),e.setUniform("uSpotLightAngle",this.spotLightAngle),e.setUniform("uSpotLightConc",this.spotLightConc),e.setUniform("uSpotLightDiffuseColors",this.spotLightDiffuseColors),e.setUniform("uSpotLightSpecularColors",this.spotLightSpecularColors),e.setUniform("uSpotLightLocation",this.spotLightPositions),e.setUniform("uSpotLightDirection",this.spotLightDirections),e.setUniform("uConstantAttenuation",this.constantAttenuation),e.setUniform("uLinearAttenuation",this.linearAttenuation),e.setUniform("uQuadraticAttenuation",this.quadraticAttenuation),e.bindTextures()},p.default.RendererGL.prototype._setPointUniforms=function(e){e.bindShader(),e.setUniform("uMaterialColor",this.curStrokeColor),e.setUniform("uPointSize",this.pointSize)},p.default.RendererGL.prototype._bindBuffer=function(e,t,r,n,a){if(t=t||this.GL.ARRAY_BUFFER,this.GL.bindBuffer(t,e),void 0!==r){var o=new(n||Float32Array)(r);this.GL.bufferData(t,o,a||this.GL.STATIC_DRAW)}},p.default.RendererGL.prototype._arraysEqual=function(e,t){var r=e.length;if(r!==t.length)return!1;for(var n=0;n<r;n++)if(e[n]!==t[n])return!1;return!0},p.default.RendererGL.prototype._isTypedArray=function(e){return Float32Array,Float64Array,Int16Array,Uint16Array,e instanceof Uint32Array},p.default.RendererGL.prototype._flatten=function(e){if(0===e.length)return[];if(2e4<e.length){var t,r=Object.prototype.toString,n=[],a=e.slice();for(t=a.pop();"[object Array]"===r.call(t)?a.push.apply(a,l(t)):n.push(t),a.length&&void 0!==(t=a.pop()););return n.reverse(),n}var o;return(o=[]).concat.apply(o,l(e))},p.default.RendererGL.prototype._vToNArray=function(e){var t=[],r=!0,n=!1,a=void 0;try{for(var o,i=e[Symbol.iterator]();!(r=(o=i.next()).done);r=!0){var s=o.value;t.push(s.x,s.y,s.z)}}catch(e){n=!0,a=e}finally{try{r||null==i.return||i.return()}finally{if(n)throw a}}return t},p.default.prototype._assert3d=function(e){if(!this._renderer.isP3D)throw new Error("".concat(e,"() is only supported in WEBGL mode. If you'd like to use 3D graphics and WebGL, see  https://p5js.org/examples/form-3d-primitives.html for more information."))},p.default.RendererGL.prototype._initTessy=function(){var e=new n.default.GluTesselator;return e.gluTessCallback(n.default.gluEnum.GLU_TESS_VERTEX_DATA,function(e,t){t[t.length]=e[0],t[t.length]=e[1],t[t.length]=e[2]}),e.gluTessCallback(n.default.gluEnum.GLU_TESS_BEGIN,function(e){e!==n.default.primitiveType.GL_TRIANGLES&&console.log("expected TRIANGLES but got type: ".concat(e))}),e.gluTessCallback(n.default.gluEnum.GLU_TESS_ERROR,function(e){console.log("error callback"),console.log("error number: ".concat(e))}),e.gluTessCallback(n.default.gluEnum.GLU_TESS_COMBINE,function(e,t,r){return[e[0],e[1],e[2]]}),e.gluTessCallback(n.default.gluEnum.GLU_TESS_EDGE_FLAG,function(e){}),e},p.default.RendererGL.prototype._triangulate=function(e){this._tessy.gluTessNormal(0,0,1);var t=[];this._tessy.gluTessBeginPolygon(t);for(var r=0;r<e.length;r++){this._tessy.gluTessBeginContour();for(var n=e[r],a=0;a<n.length;a+=3){var o=[n[a],n[a+1],n[a+2]];this._tessy.gluTessVertex(o,o)}this._tessy.gluTessEndContour()}return this._tessy.gluTessEndPolygon(),t},p.default.RendererGL.prototype._bezierCoefficients=function(e){var t=e*e,r=1-e,n=r*r;return[n*r,3*n*e,3*r*t,t*e]},p.default.RendererGL.prototype._quadraticCoefficients=function(e){var t=1-e;return[t*t,2*t*e,e*e]},p.default.RendererGL.prototype._bezierToCatmull=function(e){return[e[1],e[1]+(e[2]-e[0])/this._curveTightness,e[2]-(e[3]-e[1])/this._curveTightness,e[2]]};var d=p.default.RendererGL;r.default=d},{"../core/constants":22,"../core/main":32,"../core/p5.Renderer":35,"./p5.Camera":80,"./p5.Matrix":82,"./p5.Shader":87,libtess:11,path:14}],87:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n,a=(n=e("../core/main"))&&n.__esModule?n:{default:n};a.default.Shader=function(e,t,r){this._renderer=e,this._vertSrc=t,this._fragSrc=r,this._vertShader=-1,this._fragShader=-1,this._glProgram=0,this._loadedAttributes=!1,this.attributes={},this._loadedUniforms=!1,this.uniforms={},this._bound=!1,this.samplers=[]},a.default.Shader.prototype.init=function(){if(0===this._glProgram){var e=this._renderer.GL;if(this._vertShader=e.createShader(e.VERTEX_SHADER),e.shaderSource(this._vertShader,this._vertSrc),e.compileShader(this._vertShader),!e.getShaderParameter(this._vertShader,e.COMPILE_STATUS))return console.error("Yikes! An error occurred compiling the vertex shader:".concat(e.getShaderInfoLog(this._vertShader))),null;if(this._fragShader=e.createShader(e.FRAGMENT_SHADER),e.shaderSource(this._fragShader,this._fragSrc),e.compileShader(this._fragShader),!e.getShaderParameter(this._fragShader,e.COMPILE_STATUS))return console.error("Darn! An error occurred compiling the fragment shader:".concat(e.getShaderInfoLog(this._fragShader))),null;this._glProgram=e.createProgram(),e.attachShader(this._glProgram,this._vertShader),e.attachShader(this._glProgram,this._fragShader),e.linkProgram(this._glProgram),e.getProgramParameter(this._glProgram,e.LINK_STATUS)||console.error("Snap! Error linking shader program: ".concat(e.getProgramInfoLog(this._glProgram))),this._loadAttributes(),this._loadUniforms()}return this},a.default.Shader.prototype._loadAttributes=function(){if(!this._loadedAttributes){this.attributes={};for(var e=this._renderer.GL,t=e.getProgramParameter(this._glProgram,e.ACTIVE_ATTRIBUTES),r=0;r<t;++r){var n=e.getActiveAttrib(this._glProgram,r),a=n.name,o=e.getAttribLocation(this._glProgram,a),i={};i.name=a,i.location=o,i.index=r,i.type=n.type,i.size=n.size,this.attributes[a]=i}this._loadedAttributes=!0}},a.default.Shader.prototype._loadUniforms=function(){if(!this._loadedUniforms){for(var e=this._renderer.GL,t=e.getProgramParameter(this._glProgram,e.ACTIVE_UNIFORMS),r=0,n=0;n<t;++n){var a=e.getActiveUniform(this._glProgram,n),o={};o.location=e.getUniformLocation(this._glProgram,a.name),o.size=a.size;var i=a.name;1<a.size&&(i=i.substring(0,i.indexOf("[0]"))),o.name=i,o.type=a.type,o._cachedData=void 0,o.type===e.SAMPLER_2D&&(o.samplerIndex=r,r++,this.samplers.push(o)),o.isArray=o.type===e.FLOAT_MAT3||o.type===e.FLOAT_MAT4||o.type===e.FLOAT_VEC2||o.type===e.FLOAT_VEC3||o.type===e.FLOAT_VEC4||o.type===e.INT_VEC2||o.type===e.INT_VEC3||o.type===e.INT_VEC4,this.uniforms[i]=o}this._loadedUniforms=!0}},a.default.Shader.prototype.compile=function(){},a.default.Shader.prototype.bindShader=function(){this.init(),this._bound||(this.useProgram(),this._bound=!0,this._setMatrixUniforms(),this.setUniform("uViewport",this._renderer._viewport))},a.default.Shader.prototype.unbindShader=function(){return this._bound&&(this.unbindTextures(),this._bound=!1),this},a.default.Shader.prototype.bindTextures=function(){var e=this._renderer.GL,t=!0,r=!1,n=void 0;try{for(var a,o=this.samplers[Symbol.iterator]();!(t=(a=o.next()).done);t=!0){var i=a.value,s=i.texture;void 0===s&&(s=this._renderer._getEmptyTexture()),e.activeTexture(e.TEXTURE0+i.samplerIndex),s.bindTexture(),s.update(),e.uniform1i(i.location,i.samplerIndex)}}catch(e){r=!0,n=e}finally{try{t||null==o.return||o.return()}finally{if(r)throw n}}},a.default.Shader.prototype.updateTextures=function(){var e=!0,t=!1,r=void 0;try{for(var n,a=this.samplers[Symbol.iterator]();!(e=(n=a.next()).done);e=!0){var o=n.value.texture;o&&o.update()}}catch(e){t=!0,r=e}finally{try{e||null==a.return||a.return()}finally{if(t)throw r}}},a.default.Shader.prototype.unbindTextures=function(){},a.default.Shader.prototype._setMatrixUniforms=function(){this.setUniform("uProjectionMatrix",this._renderer.uPMatrix.mat4),this.isStrokeShader()&&("default"===this._renderer._curCamera.cameraType?this.setUniform("uPerspective",1):this.setUniform("uPerspective",0)),this.setUniform("uModelViewMatrix",this._renderer.uMVMatrix.mat4),this.setUniform("uViewMatrix",this._renderer._curCamera.cameraMatrix.mat4),this.uniforms.uNormalMatrix&&(this._renderer.uNMatrix.inverseTranspose(this._renderer.uMVMatrix),this.setUniform("uNormalMatrix",this._renderer.uNMatrix.mat3))},a.default.Shader.prototype.useProgram=function(){var e=this._renderer.GL;return this._renderer._curShader!==this&&(e.useProgram(this._glProgram),this._renderer._curShader=this),this},a.default.Shader.prototype.setUniform=function(e,t){var r=this.uniforms[e];if(r){var n=this._renderer.GL;if(r.isArray){if(r._cachedData&&this._renderer._arraysEqual(r._cachedData,t))return;r._cachedData=t.slice(0)}else{if(r._cachedData&&r._cachedData===t)return;r._cachedData=t}var a=r.location;switch(this.useProgram(),r.type){case n.BOOL:!0===t?n.uniform1i(a,1):n.uniform1i(a,0);break;case n.INT:1<r.size?t.length&&n.uniform1iv(a,t):n.uniform1i(a,t);break;case n.FLOAT:1<r.size?t.length&&n.uniform1fv(a,t):n.uniform1f(a,t);break;case n.FLOAT_MAT3:n.uniformMatrix3fv(a,!1,t);break;case n.FLOAT_MAT4:n.uniformMatrix4fv(a,!1,t);break;case n.FLOAT_VEC2:1<r.size?t.length&&n.uniform2fv(a,t):n.uniform2f(a,t[0],t[1]);break;case n.FLOAT_VEC3:1<r.size?t.length&&n.uniform3fv(a,t):n.uniform3f(a,t[0],t[1],t[2]);break;case n.FLOAT_VEC4:1<r.size?t.length&&n.uniform4fv(a,t):n.uniform4f(a,t[0],t[1],t[2],t[3]);break;case n.INT_VEC2:1<r.size?t.length&&n.uniform2iv(a,t):n.uniform2i(a,t[0],t[1]);break;case n.INT_VEC3:1<r.size?t.length&&n.uniform3iv(a,t):n.uniform3i(a,t[0],t[1],t[2]);break;case n.INT_VEC4:1<r.size?t.length&&n.uniform4iv(a,t):n.uniform4i(a,t[0],t[1],t[2],t[3]);break;case n.SAMPLER_2D:n.activeTexture(n.TEXTURE0+r.samplerIndex),r.texture=this._renderer.getTexture(t),n.uniform1i(r.location,r.samplerIndex)}return this}},a.default.Shader.prototype.isLightShader=function(){return void 0!==this.attributes.aNormal||void 0!==this.uniforms.uUseLighting||void 0!==this.uniforms.uAmbientLightCount||void 0!==this.uniforms.uDirectionalLightCount||void 0!==this.uniforms.uPointLightCount||void 0!==this.uniforms.uAmbientColor||void 0!==this.uniforms.uDirectionalDiffuseColors||void 0!==this.uniforms.uDirectionalSpecularColors||void 0!==this.uniforms.uPointLightLocation||void 0!==this.uniforms.uPointLightDiffuseColors||void 0!==this.uniforms.uPointLightSpecularColors||void 0!==this.uniforms.uLightingDirection||void 0!==this.uniforms.uSpecular},a.default.Shader.prototype.isNormalShader=function(){return void 0!==this.attributes.aNormal},a.default.Shader.prototype.isTextureShader=function(){return 0<this.samplerIndex},a.default.Shader.prototype.isColorShader=function(){return void 0!==this.attributes.aVertexColor||void 0!==this.uniforms.uMaterialColor},a.default.Shader.prototype.isTexLightShader=function(){return this.isLightShader()&&this.isTextureShader()},a.default.Shader.prototype.isStrokeShader=function(){return void 0!==this.uniforms.uStrokeWeight},a.default.Shader.prototype.enableAttrib=function(e,t,r,n,a,o){if(e){0;var i=e.location;if(-1!==i){var s=this._renderer.GL;e.enabled||(s.enableVertexAttribArray(i),e.enabled=!0),this._renderer.GL.vertexAttribPointer(i,t,r||s.FLOAT,n||!1,a||0,o||0)}}return this};var o=a.default.Shader;r.default=o},{"../core/main":32}],88:[function(e,t,r){"use strict";function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n,a=(n=e("../core/main"))&&n.__esModule?n:{default:n},s=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==i(e)&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=n?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(r,a,o):r[a]=e[a]}r.default=e,t&&t.set(e,r);return r}(e("../core/constants"));function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}a.default.Texture=function(e,t){this._renderer=e;var r=this._renderer.GL;this.src=t,this.glTex=void 0,this.glTarget=r.TEXTURE_2D,this.glFormat=r.RGBA,this.mipmaps=!1,this.glMinFilter=r.LINEAR,this.glMagFilter=r.LINEAR,this.glWrapS=r.CLAMP_TO_EDGE,this.glWrapT=r.CLAMP_TO_EDGE,this.isSrcMediaElement=void 0!==a.default.MediaElement&&t instanceof a.default.MediaElement,this._videoPrevUpdateTime=0,this.isSrcHTMLElement=void 0!==a.default.Element&&t instanceof a.default.Element&&!(t instanceof a.default.Graphics),this.isSrcP5Image=t instanceof a.default.Image,this.isSrcP5Graphics=t instanceof a.default.Graphics,this.isImageData="undefined"!=typeof ImageData&&t instanceof ImageData;var n=this._getTextureDataFromSource();return this.width=n.width,this.height=n.height,this.init(n),this},a.default.Texture.prototype._getTextureDataFromSource=function(){var e;return this.isSrcP5Image?e=this.src.canvas:this.isSrcMediaElement||this.isSrcP5Graphics||this.isSrcHTMLElement?e=this.src.elt:this.isImageData&&(e=this.src),e},a.default.Texture.prototype.init=function(e){var t=this._renderer.GL;if(this.glTex=t.createTexture(),this.glWrapS=this._renderer.textureWrapX,this.glWrapT=this._renderer.textureWrapY,this.setWrapMode(this.glWrapS,this.glWrapT),this.bindTexture(),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,this.glMagFilter),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,this.glMinFilter),0===this.width||0===this.height||this.isSrcMediaElement&&!this.src.loadedmetadata){var r=new Uint8Array([1,1,1,1]);t.texImage2D(this.glTarget,0,t.RGBA,1,1,0,this.glFormat,t.UNSIGNED_BYTE,r)}else t.texImage2D(this.glTarget,0,this.glFormat,this.glFormat,t.UNSIGNED_BYTE,e)},a.default.Texture.prototype.update=function(){var e=this.src;if(0===e.width||0===e.height)return!1;var t=this._getTextureDataFromSource(),r=!1,n=this._renderer.GL;return t.width!==this.width||t.height!==this.height?(r=!0,this.width=t.width,this.height=t.height,this.isSrcP5Image?e.setModified(!1):(this.isSrcMediaElement||this.isSrcHTMLElement)&&e.setModified(!0)):this.isSrcP5Image?e.isModified()&&(r=!0,e.setModified(!1)):this.isSrcMediaElement?e.isModified()?(r=!0,e.setModified(!1)):e.loadedmetadata&&this._videoPrevUpdateTime!==e.time()&&(this._videoPrevUpdateTime=e.time(),r=!0):this.isImageData?e._dirty&&(r=!(e._dirty=!1)):r=!0,r&&(this.bindTexture(),n.texImage2D(this.glTarget,0,this.glFormat,this.glFormat,n.UNSIGNED_BYTE,t)),r},a.default.Texture.prototype.bindTexture=function(){return this._renderer.GL.bindTexture(this.glTarget,this.glTex),this},a.default.Texture.prototype.unbindTexture=function(){this._renderer.GL.bindTexture(this.glTarget,null)},a.default.Texture.prototype.setInterpolation=function(e,t){var r=this._renderer.GL;e===s.NEAREST?this.glMinFilter=r.NEAREST:this.glMinFilter=r.LINEAR,t===s.NEAREST?this.glMagFilter=r.NEAREST:this.glMagFilter=r.LINEAR,this.bindTexture(),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,this.glMinFilter),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MAG_FILTER,this.glMagFilter),this.unbindTexture()},a.default.Texture.prototype.setWrapMode=function(e,t){function r(e){return 0==(e&e-1)}var n=this._renderer.GL,a=r(this.width),o=r(this.height);e===s.REPEAT?a&&o?this.glWrapS=n.REPEAT:(console.warn("You tried to set the wrap mode to REPEAT but the texture size is not a power of two. Setting to CLAMP instead"),this.glWrapS=n.CLAMP_TO_EDGE):e===s.MIRROR?a&&o?this.glWrapS=n.MIRRORED_REPEAT:(console.warn("You tried to set the wrap mode to MIRROR but the texture size is not a power of two. Setting to CLAMP instead"),this.glWrapS=n.CLAMP_TO_EDGE):this.glWrapS=n.CLAMP_TO_EDGE,t===s.REPEAT?a&&o?this.glWrapT=n.REPEAT:(console.warn("You tried to set the wrap mode to REPEAT but the texture size is not a power of two. Setting to CLAMP instead"),this.glWrapT=n.CLAMP_TO_EDGE):t===s.MIRROR?a&&o?this.glWrapT=n.MIRRORED_REPEAT:(console.warn("You tried to set the wrap mode to MIRROR but the texture size is not a power of two. Setting to CLAMP instead"),this.glWrapT=n.CLAMP_TO_EDGE):this.glWrapT=n.CLAMP_TO_EDGE,this.bindTexture(),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,this.glWrapS),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,this.glWrapT),this.unbindTexture()};var o=a.default.Texture;r.default=o},{"../core/constants":22,"../core/main":32}],89:[function(e,t,r){"use strict";function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var n,j=(n=e("../core/main"))&&n.__esModule?n:{default:n},R=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==i(e)&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=n?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(r,a,o):r[a]=e[a]}r.default=e,t&&t.set(e,r);return r}(e("../core/constants"));function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}e("./p5.Shader"),e("./p5.RendererGL.Retained"),j.default.RendererGL.prototype._applyTextProperties=function(){},j.default.RendererGL.prototype.textWidth=function(e){return this._isOpenType()?this._textFont._textWidth(e,this._textSize):0};function a(e,t){this.width=e,this.height=t,this.infos=[],this.findImage=function(e){var t,r,n=this.width*this.height;if(n<e)throw new Error("font is too complex to render in 3D");for(var a=this.infos.length-1;0<=a;--a){var o=this.infos[a];if(o.index+e<n){r=(t=o).imageData;break}}if(!t){try{r=new ImageData(this.width,this.height)}catch(e){var i=document.getElementsByTagName("canvas")[0],s=!i;i||((i=document.createElement("canvas")).style.display="none",document.body.appendChild(i));var l=i.getContext("2d");l&&(r=l.createImageData(this.width,this.height)),s&&document.body.removeChild(i)}t={index:0,imageData:r},this.infos.push(t)}var p=t.index;return t.index+=e,r._dirty=!0,{imageData:r,index:p}}}function V(e,t,r,n,a){var o=e.imageData.data,i=4*e.index++;o[i++]=t,o[i++]=r,o[i++]=n,o[i++]=a}function D(e){this.font=e,this.strokeImageInfos=new a(64,64),this.colDimImageInfos=new a(64,64),this.rowDimImageInfos=new a(64,64),this.colCellImageInfos=new a(64,64),this.rowCellImageInfos=new a(64,64),this.glyphInfos={},this.getGlyphInfo=function(e){var t=this.glyphInfos[e.index];if(t)return t;var r,n=e.getBoundingBox(),a=n.x1,o=n.y1,i=n.x2-a,s=n.y2-o,l=e.path.commands;if(0==i||0==s||!l.length)return this.glyphInfos[e.index]={};var p,u,c,d,h=[],m=[],f=[];for(r=8;0<=r;--r)f.push([]);for(r=8;0<=r;--r)m.push([]);function y(e,t,r){var n=h.length;function a(e,t,r){for(var n=e.length;0<n--;){var a=e[n];a<t&&(t=a),r<a&&(r=a)}return{min:t,max:r}}h.push(r);for(var o=a(e,1,0),i=Math.max(Math.floor(9*o.min),0),s=Math.min(Math.ceil(9*o.max),9),l=i;l<s;++l)f[l].push(n);for(var p=a(t,1,0),u=Math.max(Math.floor(9*p.min),0),c=Math.min(Math.ceil(9*p.max),9),d=u;d<c;++d)m[d].push(n)}function g(e){return(t=(n=255)*e)<(r=0)?r:n<t?n:t;var t,r,n}function S(e,t,r,n){this.p0=e,this.c0=t,this.c1=r,this.p1=n,this.toQuadratic=function(){return{x:this.p0.x,y:this.p0.y,x1:this.p1.x,y1:this.p1.y,cx:(3*(this.c0.x+this.c1.x)-(this.p0.x+this.p1.x))/4,cy:(3*(this.c0.y+this.c1.y)-(this.p0.y+this.p1.y))/4}},this.quadError=function(){return j.default.Vector.sub(j.default.Vector.sub(this.p1,this.p0),j.default.Vector.mult(j.default.Vector.sub(this.c1,this.c0),3)).mag()/2},this.split=function(e){var t=j.default.Vector.lerp(this.p0,this.c0,e),r=j.default.Vector.lerp(this.c0,this.c1,e),n=j.default.Vector.lerp(t,r,e);this.c1=j.default.Vector.lerp(this.c1,this.p1,e),this.c0=j.default.Vector.lerp(r,this.c1,e);var a=j.default.Vector.lerp(n,this.c0,e),o=new S(this.p0,t,n,a);return this.p0=a,o},this.splitInflections=function(){var e=j.default.Vector.sub(this.c0,this.p0),t=j.default.Vector.sub(j.default.Vector.sub(this.c1,this.c0),e),r=j.default.Vector.sub(j.default.Vector.sub(j.default.Vector.sub(this.p1,this.c1),e),j.default.Vector.mult(t,2)),n=[],a=t.x*r.y-t.y*r.x;if(0!==a){var o=e.x*r.y-e.y*r.x,i=e.x*t.y-e.y*t.x,s=o*o-4*a*i;if(0<=s){a<0&&(a=-a,o=-o,i=-i);var l=Math.sqrt(s),p=(-o-l)/(2*a),u=(-o+l)/(2*a);0<p&&p<1&&(n.push(this.split(p)),u=1-(1-u)/(1-p)),0<u&&u<1&&n.push(this.split(u))}}return n.push(this),n}}function v(e,t,r,n,a,o,i,s){var l=new S(new j.default.Vector(e,t),new j.default.Vector(r,n),new j.default.Vector(a,o),new j.default.Vector(i,s)).splitInflections(),p=[],u=30/z,c=!0,d=!1,h=void 0;try{for(var m,f=l[Symbol.iterator]();!(c=(m=f.next()).done);c=!0){for(var y=m.value,g=[],v=void 0;!(.125<=(v=u/y.quadError()));){var b=Math.pow(v,1/3),_=y.split(b),x=y.split(1-b/(1-b));p.push(_),g.push(y),y=x}v<1&&p.push(y.split(.5)),p.push(y),Array.prototype.push.apply(p,g.reverse())}}catch(e){d=!0,h=e}finally{try{c||null==f.return||f.return()}finally{if(d)throw h}}return p}function b(e,t,r,n){y([e,r],[t,n],{x:e,y:t,cx:(e+r)/2,cy:(t+n)/2})}function _(e,t,r,n){return Math.abs(r-e)<1e-5&&Math.abs(n-t)<1e-5}var x=!0,w=!1,M=void 0;try{for(var E,T=l[Symbol.iterator]();!(x=(E=T.next()).done);x=!0){var C=E.value,N=(C.x-a)/i,O=(C.y-o)/s;if(!_(p,u,N,O)){switch(C.type){case"M":c=N,d=O;break;case"L":b(p,u,N,O);break;case"Q":var L=(C.x1-a)/i,I=(C.y1-o)/s;y([p,N,L],[u,O,I],{x:p,y:u,cx:L,cy:I});break;case"Z":_(p,u,c,d)?h.push({x:p,y:u}):(b(p,u,c,d),h.push({x:c,y:d}));break;case"C":for(var P=v(p,u,(C.x1-a)/i,(C.y1-o)/s,(C.x2-a)/i,(C.y2-o)/s,N,O),R=0;R<P.length;R++){var D=P[R].toQuadratic();y([D.x,D.x1,D.cx],[D.y,D.y1,D.cy],D)}break;default:throw new Error("unknown command type: ".concat(C.type))}p=N,u=O}}}catch(e){w=!0,M=e}finally{try{x||null==T.return||T.return()}finally{if(w)throw M}}for(var A=h.length,k=this.strokeImageInfos.findImage(A),F=k.index,U=0;U<A;++U){var B=h[U];V(k,g(B.x),g(B.y),g(B.cx),g(B.cy))}function G(e,t,r){for(var n=e.length,a=t.findImage(n),o=a.index,i=0,s=0;s<n;++s)i+=e[s].length;for(var l=r.findImage(i),p=0;p<n;++p){var u=e[p],c=u.length,d=l.index;V(a,d>>7,127&d,c>>7,127&c);for(var h=0;h<c;++h){var m=u[h]+F;V(l,m>>7,127&m,0,0)}}return{cellImageInfo:l,dimOffset:o,dimImageInfo:a}}return(t=this.glyphInfos[e.index]={glyph:e,uGlyphRect:[n.x1,-n.y1,n.x2,-n.y2],strokeImageInfo:k,strokes:h,colInfo:G(f,this.colDimImageInfos,this.colCellImageInfos),rowInfo:G(m,this.rowDimImageInfos,this.rowCellImageInfos)}).uGridOffset=[t.colInfo.dimOffset,t.rowInfo.dimOffset],t}}var z=Math.sqrt(3);j.default.RendererGL.prototype._renderText=function(e,t,r,n,a){if(this._textFont&&"string"!=typeof this._textFont){if(!(a<=n)&&this._doFill){if(!this._isOpenType())return console.log("WEBGL: only Opentype (.otf) and Truetype (.ttf) fonts are supported"),e;e.push();var o=this._doStroke,i=this.drawMode;this._doStroke=!1,this.drawMode=R.TEXTURE;var s=this._textFont.font,l=this._textFont._fontInfo;l=l||(this._textFont._fontInfo=new D(s));var p=this._textFont._handleAlignment(this,t,r,n),u=this._textSize/s.unitsPerEm;this.translate(p.x,p.y,0),this.scale(u,u,1);var c=this.GL,d=!this._defaultFontShader,h=this._getFontShader();h.init(),h.bindShader(),d&&(h.setUniform("uGridImageSize",[64,64]),h.setUniform("uCellsImageSize",[64,64]),h.setUniform("uStrokeImageSize",[64,64]),h.setUniform("uGridSize",[9,9])),this._applyColorBlend(this.curFillColor);var m=this.retainedMode.geometry.glyph;if(!m){var f=this._textGeom=new j.default.Geometry(1,1,function(){for(var e=0;e<=1;e++)for(var t=0;t<=1;t++)this.vertices.push(new j.default.Vector(t,e,0)),this.uvs.push(t,e)});f.computeFaces().computeNormals(),m=this.createBuffers("glyph",f)}var y=!0,g=!1,v=void 0;try{for(var b,_=this.retainedMode.buffers.text[Symbol.iterator]();!(y=(b=_.next()).done);y=!0){b.value._prepareBuffer(m,h)}}catch(e){g=!0,v=e}finally{try{y||null==_.return||_.return()}finally{if(g)throw v}}this._bindBuffer(m.indexBuffer,c.ELEMENT_ARRAY_BUFFER),h.setUniform("uMaterialColor",this.curFillColor);try{var x=0,S=null,w=s.stringToGlyphs(t),M=!0,E=!1,T=void 0;try{for(var C,N=w[Symbol.iterator]();!(M=(C=N.next()).done);M=!0){var O=C.value;S&&(x+=s.getKerningValue(S,O));var L=l.getGlyphInfo(O);if(L.uGlyphRect){var I=L.rowInfo,P=L.colInfo;h.setUniform("uSamplerStrokes",L.strokeImageInfo.imageData),h.setUniform("uSamplerRowStrokes",I.cellImageInfo.imageData),h.setUniform("uSamplerRows",I.dimImageInfo.imageData),h.setUniform("uSamplerColStrokes",P.cellImageInfo.imageData),h.setUniform("uSamplerCols",P.dimImageInfo.imageData),h.setUniform("uGridOffset",L.uGridOffset),h.setUniform("uGlyphRect",L.uGlyphRect),h.setUniform("uGlyphOffset",x),h.bindTextures(),c.drawElements(c.TRIANGLES,6,this.GL.UNSIGNED_SHORT,0)}x+=O.advanceWidth,S=O}}catch(e){E=!0,T=e}finally{try{M||null==N.return||N.return()}finally{if(E)throw T}}}finally{h.unbindShader(),this._doStroke=o,this.drawMode=i,e.pop()}return e}}else console.log("WEBGL: you must load and set a font before drawing text. See `loadFont` and `textFont` for more details.")}},{"../core/constants":22,"../core/main":32,"./p5.RendererGL.Retained":85,"./p5.Shader":87}]},{},[17])(17)});const Y_AXIS=1;const X_AXIS=2;let canvas1;let W;let H;let fireworks=[];let star=[];let s=[];function windowResized(){if($(".firework-active").length){W=document.querySelector(".firework-active").offsetWidth;H=document.querySelector(".firework-active").offsetHeight;resizeCanvas(W,H);}}
if($(".firework-active").length){W=document.querySelector(".firework-active").offsetWidth;H=document.querySelector(".firework-active").offsetHeight;}
const parentInital=document.querySelectorAll('.firework-active');let customSketch=[];for(let n=0;n<parentInital.length;n++){s[n]=function(sketch){customSketch[n]=null;customSketch[n]=sketch;var name='jackpot-firework-'+n;sketch.setup=function(){canvas1=null;canvas1=sketch.createCanvas(W,H);canvas1.position(0,0);sketch.colorMode(sketch.RGB);sketch.frameRate(90);canvas1.style("z-index","-1");canvas1.parent(name);}
sketch.draw=function(){customSketch[n].noFill();setGradient1(0,0,W,H,sketch.color(255,255,255),sketch.color(255,255,255),Y_AXIS,n);sketch.noStroke();if(0===sketch.frameCount%100){let speed=sketch.random(1,1);fireworks.push(new FireWork1(sketch.random(W),H,0,10,0.98));}
for(let fw of fireworks){if(2===fw.getType||30000<fw.getFrame){fireworks=fireworks.filter((n)=>n!==fw);continue;}
fw.fire();}}
class FireWork1{constructor(x,y,vx,vy,gv){this.frame=0;this.type=0;this.next=0;this.r=customSketch[n].random(155)+80;this.g=customSketch[n].random(155)+80;this.b=customSketch[n].random(155)+80;this.a=255;this.x=x;this.y=y;this.w=customSketch[n].random(10,5);this.maxHeight=customSketch[n].random(H/6,H/2);this.fireHeight=H-this.maxHeight;this.vx=vx;this.vy=vy;this.gv=gv;this.afterImages=[];this.explosions=[];this.exDelay=customSketch[n].random(10,40);this.large=customSketch[n].random(5,15);this.ball=customSketch[n].random(20,100);this.exEnd=customSketch[n].random(20,40);this.exStop=0.96;}
get getFrame(){return this.frame;}
get getType(){return this.type;}
fire(){switch(this.type){case 0:this.rising();break;case 1:this.explosion();break;}}
rising(){if(this.y*0.8<this.maxHeight){this.a=this.a-6;}
this.x+=this.vx;this.y-=this.vy*((this.fireHeight-(H-this.y))/this.fireHeight);this.afterImages.push(new Afterimage1(this.r,this.g,this.b,this.x,this.y,this.w,this.a));for(let ai of this.afterImages){if(ai.getAlpha<=0){this.afterImages=this.afterImages.filter((n)=>n!==ai);continue;}
ai.rsImage();}
this.update(this.x,this.y,this.w);if(0==this.afterImages.length){if(0===this.next){this.next=this.frame+Math.round(this.exDelay);}else if(this.next===this.frame){for(let i=0;i<this.ball;i++){let r=customSketch[n].random(0,360);let s=customSketch[n].random(0.1,0.9);let vx=Math.cos((r*Math.PI)/180)*s*this.large;let vy=Math.sin((r*Math.PI)/180)*s*this.large;this.explosions.push(new FireWork1(this.x,this.y,vx,vy,this.exStop));let cr=customSketch[n].random(0,360);let cs=customSketch[n].random(0.9,1);let cvx=Math.cos((cr*Math.PI)/180)*cs*this.large;let cvy=Math.sin((cr*Math.PI)/180)*cs*this.large;this.explosions.push(new FireWork1(this.x,this.y,cvx,cvy,this.exStop));}
this.a=255;this.type=1;}}}
explosion(){for(let ex of this.explosions){ex.frame++;if(2===ex.getType){this.explosions=this.explosions.filter((n)=>n!==ex);continue;}
if(0===Math.round(customSketch[n].random(0,32))){ex.afterImages.push(new Afterimage1(this.r,this.g,this.b,ex.x,ex.y,ex.w,ex.a));}
for(let ai of ex.afterImages){if(ai.getAlpha<0){ex.afterImages=ex.afterImages.filter((n)=>n!==ai);continue;}
ai.exImage();}
this.update(ex.x,ex.y,ex.w,ex.a);ex.x+=ex.vx;ex.y+=ex.vy;ex.vx=ex.vx*ex.gv;ex.vy=ex.vy*ex.gv;ex.vy=ex.vy+ex.gv/30;if(this.exEnd<ex.frame){ex.w-=0.1;ex.a=ex.a-4;if(ex.a<0&&0===ex.afterImages.length){ex.type=2;}}}}
update(x,y,w,a){this.frame++;if(0<this.a){let c=customSketch[n].color(this.r,this.g,this.b);c.setAlpha(a);customSketch[n].fill(c);customSketch[n].ellipse(x,y,w,w);}}}
class Afterimage1{constructor(r,g,b,x,y,w,a){this.frame=0;this.r=r;this.g=g;this.b=b;this.x=x;this.y=y;this.w=w;this.a=a;this.vx=customSketch[n].random(-0.24,0.24);this.vy=customSketch[n].random(0.2,0.8);this.vw=customSketch[n].random(0.05,0.2);}
get getAlpha(){return this.a;}
rsImage(){if(0<this.a){this.update(this.r,this.g,this.b,this.x,this.y,this.w,this.a);this.r+=4;this.g+=4;this.b+=4;this.x=this.x+this.vx;this.y=this.y+this.vy;if(0<this.w){this.w=this.w-this.vw;}
this.a=this.a-4;}}
exImage(){if(0<this.a){this.update(this.r,this.g,this.b,this.x,this.y,this.w,this.a);this.r+=2.5;this.g+=2.5;this.b+=2.5;this.x=this.x+this.vx;this.y=this.y+this.vy;if(0<this.w){this.w=this.w-this.vw;}
this.a=this.a-1.5;}}
update(r,g,b,x,y,w,a){this.frame++;let c=customSketch[n].color(r,g,b);c.setAlpha(a);customSketch[n].fill(c);customSketch[n].ellipse(x,y,w,w);}}};new p5(s[n]);}
function setGradient1(x,y,w,h,c1,c2,axis,n){if(axis===Y_AXIS){for(let i=y;i<=y+h;i++){let inter=customSketch[n].map(i,y,y+h,0,1);let c=customSketch[n].lerpColor(c1,c2,inter);customSketch[n].stroke(c);customSketch[n].line(x,i,x+w,i);}}else if(axis===X_AXIS){for(let i=x;i<=x+w;i++){let inter=customSketch[n].map(i,x,x+w,0,1);let c=customSketch[n].lerpColor(c1,c2,inter);customSketch[n].stroke(c);customSketch[n].line(i,y,i,y+h);}}}
$(document).ready(function(){odoMeterCounter();slotSlider();});function winw(){return $(window).width();}
function odoMeterCounter(){$('.odometer').each(function(){var v=jQuery(this).data('start');var o=new Odometer({el:this,value:0,theme:'slot-machine'});o.render();setTimeout(function(){o.update(v);},3000);});}
function slotSlider(){var slotSlider=$('.jackpot-element__slider');if(slotSlider.length){var item_count=parseInt($('.jackpot-element__slider').find('.jackpot-element__slider-item').length);if(winw()<992){if(slotSlider.find('.jackpot-element__slider-item').length>1){slotSlider.owlCarousel({items:3,loop:true,nav:true,margin:15,navText:['<i class="fa fa-angle-left"></i>','<i class="fa fa-angle-right"></i>'],dots:false,touchDrag:true,mouseDrag:true,onInitialize:function(){if(item_count<2){this.settings.autoplay=false;this.settings.nav=false;this.settings.touchDrag=false;this.settings.mouseDrag=false;}},responsive:{0:{items:1}}});}}}}
$(document).ready(function(){$('#c748 #form-submit').click(function(){response=grecaptcha.getResponse();if(response.length!=0){$("#recaptcha-field").val("thanks");}});$('#c756 #form-submit').click(function(){response=grecaptcha.getResponse();if(response.length!=0){$("#recaptcha-field").val("thanks");}});$('#c759 #form-submit').click(function(){response=grecaptcha.getResponse();if(response.length!=0){$("#recaptcha-field").val("thanks");}});$('#c2476 #form-submit').click(function(){response=grecaptcha.getResponse();if(response.length!=0){$("#recaptcha-field").val("thanks");}});});$(window).load(function(){page_title();$('.preregistration div .hidden-field').css('display','none');});$(document).ready(function(){$('form').get(0).reset();});$(window).bind("pageshow",function(){$('form')[0].reset();$("#recaptcha-field").val('');});function page_title(){var msg1="Welcome to ...";var msg2="... the Winners' Zone!";var original=document.title;var hold;$(window).focus(function(){clearInterval(hold);if(original){document.title=original;}}).blur(function(){var title=$('title').text();hold=window.setInterval(function(){if(document.title==msg1){document.title=msg2;}else{document.title=msg1;}},500);});}
$(document).on('change','#powermail_field_receiveemails_1, #powermail_field_receivedirectmails_1',function(e){if($('.preregistration #powermail_field_receiveemails_1').is(":checked")){$(".preregistration #powermail_field_email").prop('required',true);$('#powermail_field_email').parent().closest('div.hidden-field').css('display','block');}
else{$(".preregistration #powermail_field_email").val('');$(".preregistration #powermail_field_email").prop('required',false);$('.preregistration #powermail_field_email').parent().closest('div.hidden-field').css('display','none');}
if($('.preregistration #powermail_field_receivedirectmails_1').is(":checked")){$(".preregistration #powermail_field_address").prop('required',true);$(".preregistration #powermail_field_city").prop('required',true);$(".preregistration #powermail_field_province").prop('required',true);$(".preregistration #powermail_field_postalcode").prop('required',true);$('.preregistration #powermail_field_address').parent().closest('div.hidden-field').css('display','block');$('.preregistration #powermail_field_city').parent().closest('div.hidden-field').css('display','block');$('.preregistration #powermail_field_province').parent().closest('div.hidden-field').css('display','block');$('.preregistration #powermail_field_postalcode').parent().closest('div.hidden-field').css('display','block');}
else{$(".preregistration #powermail_field_address").val('');$(".preregistration #powermail_field_city").val('');$(".preregistration #powermail_field_province").val('');$(".preregistration #powermail_field_postalcode").val('');$(".preregistration #powermail_field_address").prop('required',false);$(".preregistration #powermail_field_city").prop('required',false);$(".preregistration #powermail_field_province").prop('required',false);$(".preregistration #powermail_field_postalcode").prop('required',false);$('.preregistration #powermail_field_address').parent().closest('div.hidden-field').css('display','none');$('.preregistration #powermail_field_city').parent().closest('div.hidden-field').css('display','none');$('.preregistration #powermail_field_province').parent().closest('div.hidden-field').css('display','none');$('.preregistration #powermail_field_postalcode').parent().closest('div.hidden-field').css('display','none');}});